zapping-0.10cvs6/ 777 764 144 0 10443536410 7011 5zapping-0.10cvs6/po/ 777 764 144 0 10443536345 7436 5zapping-0.10cvs6/po/Makevars 644 764 144 2403 7762173333 11111 # Makefile variables for PO directory in any package using GNU gettext. # Usually the message domain is the same as the package name. DOMAIN = $(PACKAGE) # These two variables depend on the location of this directory. subdir = po top_builddir = .. # These options get passed to xgettext. XGETTEXT_OPTIONS = --keyword=_ --keyword=N_ COPYRIGHT_HOLDER = Zapping authors # This is the email address or URL to which the translators shall report # bugs in the untranslated strings: # - Strings which are not entire sentences, see the maintainer guidelines # in the GNU gettext documentation, section 'Preparing Strings'. # - Strings which use unclear terms or require additional context to be # understood. # - Strings which make invalid assumptions about notation of date, time or # money. # - Pluralisation problems. # - Incorrect English spelling. # - Incorrect formatting. # It can be your email address, or a mailing list address where translators # can write to without being subscribed, or the URL of a web page through # which the translators can contact you. MSGID_BUGS_ADDRESS = mschimek@users.sourceforge.net # This is the list of locale categories, beyond LC_MESSAGES, for which the # message catalogs shall be used. It is usually empty. EXTRA_LOCALE_CATEGORIES = zapping-0.10cvs6/po/de.po 644 764 144 242013 10443535633 10423 # Zapping German translation -*- coding: utf-8 -*- # Copyright (C) 2000-2005 Michael H. Schimek # msgid "" msgstr "" "Project-Id-Version: zapping 0.7\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2006-03-31 16:06+0200\n" "PO-Revision-Date: 2006-03-06 03:12+0100\n" "Last-Translator: Michael H. Schimek \n" "Language-Team: German \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #: ../glade/zapping.glade2.h:1 msgid "320x240" msgstr "320 × 240" #: ../glade/zapping.glade2.h:2 msgid "" "A format string describing the main window title when changing channels: " "$(alias), $(index), $(id), $(freq), $(standard) and $(input) are substituted " "by the respective values." msgstr "" "Eine Zeichenkette die beschreibt was in der Titelzeile des Hauptfensters " "gezeigt werden soll:\n" "$(alias) - Sendername\n" "$(index) - Nummer des Senders in der Liste\n" "$(id) - Kanalnummer\n" "$(freq) - Sendefrequenz\n" "$(standard) - Videostandard\n" "$(input) - Videoeingang" #: ../glade/zapping.glade2.h:3 msgid "Advanced" msgstr "Komplex" #: ../glade/zapping.glade2.h:4 ../src/audio.c:829 ../src/audio.c:834 #: ../src/tveng.c:4830 msgid "Audio" msgstr "Audio" #: ../glade/zapping.glade2.h:5 msgid "Author:" msgstr "Autor:" #: ../glade/zapping.glade2.h:6 msgid "Biggest noninterlaced (autodetect)" msgstr "Größtmögliche ohne Zeilensprung (automatisch)" # src/interface.c:405 #: ../glade/zapping.glade2.h:7 msgid "Canonical name:" msgstr "Programmname:" # src/interface.c:362 #: ../glade/zapping.glade2.h:8 msgid "Channel list number" msgstr "Durch Nummer in der Senderliste" #: ../glade/zapping.glade2.h:9 msgid "Choose a color" msgstr "Wählen Sie eine Farbe" #: ../glade/zapping.glade2.h:10 msgid "Chroma _key:" msgstr "Chroma_key:" #: ../glade/zapping.glade2.h:11 msgid "Clean console" msgstr "Konsole leeren" # src/interface.c:448 #: ../glade/zapping.glade2.h:12 msgid "Click here when you are done" msgstr "Hier klicken wenn Sie fertig sind" #: ../glade/zapping.glade2.h:13 msgid "Console" msgstr "Konsole" #: ../glade/zapping.glade2.h:14 msgid "Copyright (C) 2000-2005 the contributors\n" msgstr "Copyright (C) 2000-2005 die Mitwirkenden\n" #: ../glade/zapping.glade2.h:16 msgid "Current controller:" msgstr "Controller:" #: ../glade/zapping.glade2.h:17 msgid "DVB PES File" msgstr "DVB PES Datei" #: ../glade/zapping.glade2.h:18 msgid "DVB _PES File" msgstr "DVB _PES Datei" #: ../glade/zapping.glade2.h:19 msgid "Device name:" msgstr "Gerätename:" #: ../glade/zapping.glade2.h:20 ../src/audio.c:839 #: ../src/properties-handler.c:1352 ../src/zvbi.c:2537 msgid "Devices" msgstr "Geräte" #: ../glade/zapping.glade2.h:21 msgid "Disable _screensaver" msgstr "_Bildschirmschoner deaktivieren" #: ../glade/zapping.glade2.h:22 msgid "Enter key" msgstr "Taste drücken" #: ../glade/zapping.glade2.h:23 msgid "F_ont:" msgstr "_Schrift:" #: ../glade/zapping.glade2.h:24 msgid "Favorite _picture sizes:" msgstr "_Bevorzugte Bildgrößen:" #: ../glade/zapping.glade2.h:25 msgid "General options" msgstr "Allgemeine Optionen" #: ../glade/zapping.glade2.h:26 msgid "Interlaced (window size)" msgstr "Mit Zeilensprung (Fenstergröße)" #: ../glade/zapping.glade2.h:27 msgid "Kernel VBI device" msgstr "Kernel VBI-Gerät" #: ../glade/zapping.glade2.h:28 msgid "Kernel _device" msgstr "Kernel_gerät" #: ../glade/zapping.glade2.h:29 ../src/keyboard.c:1149 msgid "Keyboard" msgstr "Tastatur" #: ../glade/zapping.glade2.h:30 msgid "Known key names" msgstr "Tastennamen" #: ../glade/zapping.glade2.h:31 msgid "Maximum capture size:" msgstr "Maximale Capture-Größe:" #: ../glade/zapping.glade2.h:32 msgid "Minimum capture size:" msgstr "Minimale Capture-Größe:" #: ../glade/zapping.glade2.h:33 msgid "Mute while ch_anging channels" msgstr "Stumm beim _Kanalwechsel" #: ../glade/zapping.glade2.h:34 msgid "NTSC" msgstr "NTSC" #: ../glade/zapping.glade2.h:35 msgid "No Display" msgstr "Deaktiviert" #: ../glade/zapping.glade2.h:36 msgid "OK, let's go on" msgstr "Ok, los geht's" #: ../glade/zapping.glade2.h:37 ../src/osd.c:1075 msgid "OSD" msgstr "OSD" #: ../glade/zapping.glade2.h:38 msgid "On Screen Display (OSD)" msgstr "On Screen Display (OSD)" #: ../glade/zapping.glade2.h:39 msgid "PAL" msgstr "PAL" #: ../glade/zapping.glade2.h:40 msgid "Plugin location" msgstr "Plugin Quelle" #: ../glade/zapping.glade2.h:41 msgid "Plugin priority:" msgstr "Priorität:" #: ../glade/zapping.glade2.h:42 msgid "Plugin properties" msgstr "Plugin Eigenschaften" #: ../glade/zapping.glade2.h:43 msgid "Plugin version:" msgstr "Version:" #: ../glade/zapping.glade2.h:44 msgid "Properties" msgstr "Eigenschaften" # src/interface.c:362 #: ../glade/zapping.glade2.h:45 msgid "RF channel number" msgstr "Durch Kanalname" # src/v4l2interface.c:344 #: ../glade/zapping.glade2.h:46 msgid "Remember this video standard" msgstr "Diesen Videostandard speichern" #: ../glade/zapping.glade2.h:47 msgid "Remove all this mess" msgstr "Weg mit diesem Käse" #: ../glade/zapping.glade2.h:48 msgid "Run the plugin" msgstr "Plugin ausführen" #: ../glade/zapping.glade2.h:49 msgid "SECAM" msgstr "SECAM" # src/interface.c:247 #: ../glade/zapping.glade2.h:50 msgid "S_how toolbar as:" msgstr "_Werkzeugleiste zeigen als:" #: ../glade/zapping.glade2.h:51 msgid "Save _control values per channel" msgstr "Bildeinstellungen _per Sender speichern" #: ../glade/zapping.glade2.h:52 msgid "Select OSD font" msgstr "OSD Schrift wählen" #: ../glade/zapping.glade2.h:53 msgid "Select the V4L device" msgstr "V4L-Gerät wählen" # src/interface.c:247 #: ../glade/zapping.glade2.h:54 msgid "Show _tooltips" msgstr "_Minihilfen anzeigen" #: ../glade/zapping.glade2.h:55 msgid "Status Bar" msgstr "Statusleiste" #: ../glade/zapping.glade2.h:56 msgid "Stop this plugin" msgstr "Plugin anhalten" #: ../glade/zapping.glade2.h:57 msgid "TV viewer for the Gnome environment" msgstr "Ein Programm zum Fernsehen für den Gnome-Desktop" #: ../glade/zapping.glade2.h:58 msgid "" "The video capture device does not report the correct video standard, please " "select manually:" msgstr "" "Das Videogerät gibt nicht den korrekten Videostandard an, bitte manuell " "eingeben:" #: ../glade/zapping.glade2.h:59 msgid "Title _bar contents:" msgstr "Inhalt der _Titelleiste:" #: ../glade/zapping.glade2.h:60 ../src/zvbi.c:2532 msgid "VBI" msgstr "VBI" #: ../glade/zapping.glade2.h:61 ../src/main.c:200 #: ../src/properties-handler.c:1339 ../src/properties-handler.c:1347 msgid "Video" msgstr "Video" # src/v4l2interface.c:344 #: ../glade/zapping.glade2.h:62 msgid "Video Standard" msgstr "Videostandard:" #: ../glade/zapping.glade2.h:63 msgid "Video device capabilities" msgstr "Möglichkeiten des Videogeräts" #: ../glade/zapping.glade2.h:64 msgid "Window" msgstr "Fenster" #: ../glade/zapping.glade2.h:65 msgid "Zapping Preferences" msgstr "Zapping-Eigenschaften" #: ../glade/zapping.glade2.h:66 msgid "Zapping error console" msgstr "Zapping-Fehlerkonsole" #: ../glade/zapping.glade2.h:67 msgid "_Background color:" msgstr "_Hintergrundfarbe:" #: ../glade/zapping.glade2.h:68 msgid "_Capture size under XVideo:" msgstr "_Capture-Größe unter XVideo:" #: ../glade/zapping.glade2.h:69 msgid "_Command:" msgstr "_Befehl:" #: ../glade/zapping.glade2.h:70 msgid "_Control volume with soundcard mixer" msgstr "_Lautstärke mit Mixer der Soundkarte regeln" #: ../glade/zapping.glade2.h:71 msgid "_Device file:" msgstr "_Gerätedatei:" #: ../glade/zapping.glade2.h:72 msgid "_Display mode:" msgstr "Anzeige_modus:" # src/v4l2interface.c:146 #: ../glade/zapping.glade2.h:73 msgid "_Enter channels by:" msgstr "_Senderwahl:" #: ../glade/zapping.glade2.h:74 msgid "_Foreground color:" msgstr "_Textfarbe:" #: ../glade/zapping.glade2.h:75 msgid "_Fullscreen video resolution:" msgstr "_Vollbildauflösung:" #: ../glade/zapping.glade2.h:76 msgid "_Gnome sound daemon (ESD)" msgstr "_Gnome Sound Dämon (ESD)" #: ../glade/zapping.glade2.h:77 msgid "_KDE sound daemon (ARTS)" msgstr "_KDE Sound Dämon (ARTS)" #: ../glade/zapping.glade2.h:78 msgid "_Mute on exit" msgstr "Zapping stumm _beenden" #: ../glade/zapping.glade2.h:79 msgid "_No VBI services" msgstr "_Keine VBI Funktionen" #: ../glade/zapping.glade2.h:80 msgid "_No audio recording" msgstr "Keine _Tonaufzeichnung" #: ../glade/zapping.glade2.h:81 msgid "_Remove after:" msgstr "_Entfernen nach:" #: ../glade/zapping.glade2.h:82 msgid "_Resize using fixed increments" msgstr "_Fenstergröße in festen Schritten verändern" #: ../glade/zapping.glade2.h:83 msgid "_Start Zapping muted" msgstr "Zapping stumm _starten" #: ../glade/zapping.glade2.h:84 msgid "_Use VBI Proxy if available" msgstr "_VBI Proxy verwenden" #: ../glade/zapping.glade2.h:85 msgid "seconds" msgstr "Sekunden" #: ../libvbi/exp-gfx.c:1483 msgid "Correct aspect ratio" msgstr "Korrektes Seitenverhältnis" #: ../libvbi/exp-gfx.c:1484 msgid "" "Approach an image aspect ratio similar to a real TV. This will double the " "image size." msgstr "" "Ein Seitenverhältnis entsprechend einem Fernsehbild anstreben, verdoppelt " "die Dateigröße" #: ../libvbi/exp-gfx.c:1623 msgid "PPM" msgstr "PPM" #: ../libvbi/exp-gfx.c:1624 msgid "Export this page as raw PPM image" msgstr "Diese Seite als PPM-Grafik ausgeben" #. XXX gettext encoding #: ../libvbi/exp-gfx.c:1824 ../libvbi/exp-html.c:532 ../libvbi/exp-sub.c:633 #: ../libvbi/exp-sub.c:764 ../libvbi/exp-sub.c:821 #, c-format msgid "Teletext Page %3x.%x" msgstr "Teletext-Seite %3x.%x" #: ../libvbi/exp-gfx.c:1828 ../libvbi/exp-html.c:535 ../libvbi/exp-sub.c:636 #: ../libvbi/exp-sub.c:767 ../libvbi/exp-sub.c:824 #, c-format msgid "Teletext Page %3x" msgstr "Teletext-Seite %x" #: ../libvbi/exp-gfx.c:2019 msgid "PNG" msgstr "PNG" #: ../libvbi/exp-gfx.c:2020 msgid "Export this page as PNG image" msgstr "Diese Seite als PNG-Grafik ausgeben" #: ../libvbi/exp-html.c:110 ../libvbi/exp-txt.c:133 msgid "Graphics char" msgstr "Grafikzeichen" #: ../libvbi/exp-html.c:111 ../libvbi/exp-txt.c:134 msgid "" "Replacement for block graphic characters: a single character or decimal (32) " "or hex (0x20) code" msgstr "" "Ersatz für Blockgrafikzeichen: Ein einzelnes Zeichen oder der Dezimal- (32) " "oder Hexadezimal (0x20) Code" #: ../libvbi/exp-html.c:114 ../libvbi/exp-txt.c:137 msgid "ASCII art" msgstr "ASCII-Grafik" #: ../libvbi/exp-html.c:115 ../libvbi/exp-txt.c:138 msgid "Replace graphic characters by ASCII art" msgstr "Blockgrafikzeichen durch ASCII-Grafik ersetzen" #: ../libvbi/exp-html.c:117 msgid "Color (CSS)" msgstr "Farbe" #: ../libvbi/exp-html.c:118 msgid "Store the page colors using CSS attributes" msgstr "Die Textfarbe als CSS (Style Sheet) Attribut speichern" #: ../libvbi/exp-html.c:120 msgid "HTML header" msgstr "HTML-Header" #: ../libvbi/exp-html.c:121 msgid "Include HTML page header" msgstr "Einen HTML-Header erzeugen" #. TRANSLATORS: lang=\"en\" refers to the page title #. "Teletext Page ...". Please specify "de", "fr", "es" #. etc. #: ../libvbi/exp-html.c:521 msgid "" msgstr "<title lang=\"de\">" #: ../libvbi/exp-html.c:843 msgid "HTML" msgstr "HTML" #: ../libvbi/exp-html.c:844 msgid "Export this page as HTML page" msgstr "Diese Seite als HTML-Seite ausgeben" #: ../libvbi/export.c:200 msgid "Write error." msgstr "Schreibfehler." #: ../libvbi/export.c:210 msgid "Out of memory." msgstr "Speichermangel." #: ../libvbi/export.c:235 #, c-format msgid "Export module %s has no option %s." msgstr "Exportmodul %s hat keine Option %s." #: ../libvbi/export.c:295 #, c-format msgid "Invalid argument %s for option %s of export module %s." msgstr "Fehlerhaftes Argument %s für Option %s von Ausgabemodul %s." #: ../libvbi/export.c:350 msgid "Unknown error." msgstr "Unbekannter Fehler." #: ../libvbi/export.c:436 #, c-format msgid "Could not create %s. %s." msgstr "Konnte %s nicht erstellen. %s" #: ../libvbi/export.c:1334 #, c-format msgid "Invalid option string \"%s\"." msgstr "Optionen \"%s\" fehlerhaft." #: ../libvbi/export.c:1438 #, c-format msgid "Unknown export module '%s'." msgstr "Unbekanntes Ausgabemodul '%s'." #: ../libvbi/export.c:1452 #, c-format msgid "Cannot initialize export module '%s', probably lack of memory." msgstr "" "Kann Ausgabemodul '%s' nicht initialisieren, vermutlich Speichermangel." #: ../libvbi/export.c:1476 #, c-format msgid "Cannot initialize export module '%s', out of memory." msgstr "Kann Exportmodul %s wegen Speichermangel nicht initialisieren." #: ../libvbi/exp-sub.c:124 ../libvbi/exp-txt.c:81 msgid "ASCII" msgstr "ASCII" #: ../libvbi/exp-sub.c:125 ../libvbi/exp-txt.c:82 msgid "ISO-8859-1 (Latin-1 Western languages)" msgstr "ISO-8859-1 (Latin-1 Westeuropäische Sprachen)" #: ../libvbi/exp-sub.c:126 ../libvbi/exp-txt.c:83 msgid "ISO-8859-2 (Latin-2 Central and Eastern European languages)" msgstr "ISO-8859-2 (Latin-2 Mittel- und Osteuropäische Sprachen)" #: ../libvbi/exp-sub.c:127 ../libvbi/exp-txt.c:84 msgid "ISO-8859-4 (Latin-3 Baltic languages)" msgstr "ISO-8859-4 (Latin-3 Baltische Sprachen)" #: ../libvbi/exp-sub.c:128 ../libvbi/exp-txt.c:85 msgid "ISO-8859-5 (Cyrillic)" msgstr "ISO-8859-5 (Kyrillisch)" #: ../libvbi/exp-sub.c:129 ../libvbi/exp-txt.c:86 msgid "ISO-8859-7 (Greek)" msgstr "ISO-8859-7 (Griechisch)" #: ../libvbi/exp-sub.c:130 ../libvbi/exp-txt.c:87 msgid "ISO-8859-8 (Hebrew)" msgstr "ISO-8859-8 (Hebräisch)" #: ../libvbi/exp-sub.c:131 ../libvbi/exp-txt.c:88 msgid "ISO-8859-9 (Turkish)" msgstr "ISO-8859-9 (Türkisch)" #: ../libvbi/exp-sub.c:132 ../libvbi/exp-txt.c:89 msgid "KOI8-R (Russian and Bulgarian)" msgstr "KOI8-R (Russisch und Bulgarisch)" #: ../libvbi/exp-sub.c:133 ../libvbi/exp-txt.c:90 msgid "KOI8-U (Ukranian)" msgstr "KOI8-U (Ukrainisch)" #: ../libvbi/exp-sub.c:134 ../libvbi/exp-txt.c:91 msgid "ISO-10646/UTF-8 (Unicode)" msgstr "ISO-10646/UTF-8 (Unicode)" #. TRANSLATORS: Text export encoding (ASCII, Unicode, ...) menu #: ../libvbi/exp-sub.c:155 ../libvbi/exp-sub.c:165 ../libvbi/exp-txt.c:127 msgid "Encoding" msgstr "Zeichenkodierung" #: ../libvbi/exp-sub.c:171 msgid "Font face" msgstr "Schriftbild" #. TRANSLATORS: #. Caption is an aid for the hearing impaired, #. subtitles for foreign language viewers. #: ../libvbi/exp-sub.c:1534 msgid "MPlayer caption/subtitle file" msgstr "MPlayer Untertiteldatei" #. TRANSLATORS: #. Styles like bold, italic, underlined, etc. #. Justification to the left, right, centered. #: ../libvbi/exp-sub.c:1559 msgid "" "QuickTime Text caption/subtitle file preserving text styles, justification " "and color" msgstr "" "QuickTime Text Untertiteldatei, erhält Schriftarten, Ausrichtung und Farbe" #: ../libvbi/exp-sub.c:1583 msgid "RealText caption/subtitle file preserving text styles and color" msgstr "RealText Untertiteldatei, erhält Schriftart und Farbe" #: ../libvbi/exp-sub.c:1606 msgid "" "SAMI 1.0 caption/subtitle file preserving text styles, justification and " "color" msgstr "SAMI 1.0 Untertiteldatei, erhält Scriftarten, Ausrichtung und Farbe" #: ../libvbi/exp-sub.c:1630 msgid "SubRip caption/subtitle file" msgstr "SubRip Untertiteldatei" #: ../libvbi/exp-sub.c:1652 msgid "SubViewer 2.x caption/subtitle file" msgstr "SubViewer 2.x Untertiteldatei" #. TRANSLATORS: Terminal control codes menu #: ../libvbi/exp-txt.c:112 msgid "None" msgstr "Keinen" #: ../libvbi/exp-txt.c:113 msgid "ANSI X3.64 / VT 100" msgstr "ANSI X3.64 / VT 100" #: ../libvbi/exp-txt.c:114 msgid "VT 200" msgstr "VT 200" #: ../libvbi/exp-txt.c:140 msgid "Control codes" msgstr "Steuerzeichen" #: ../libvbi/exp-txt.c:1030 msgid "Text" msgstr "Text" #: ../libvbi/exp-txt.c:1031 msgid "Export this page as text file" msgstr "Diese Seite als Textdatei speichern" #: ../libvbi/exp-vtx.c:82 msgid "Can only export Teletext pages." msgstr "Kann nur Teletext-Seiten ausgeben." #: ../libvbi/exp-vtx.c:89 msgid "Page is not cached." msgstr "Die Seite ist nicht gespeichert." #: ../libvbi/exp-vtx.c:98 msgid "Cannot export this page, is not displayable." msgstr "Kann diese Seite nicht exportieren, ist nicht darstellbar." #: ../libvbi/exp-vtx.c:135 msgid "VTX" msgstr "VTX" #: ../libvbi/exp-vtx.c:136 msgid "" "Export this page as VTX file, the format used by VideoteXt and vbidecode" msgstr "" "Diese Seite als VTX-Datei ausgeben, das Format von VideoteXt und vbidecode" #: ../plugins/alirc/alirc.c:37 msgid "Another lirc plugin" msgstr "Ein weiteres LIRC-Plugin" #: ../plugins/alirc/alirc.c:39 msgid "" "Another plugin to control zapping through lirc\n" "\n" "To enable this plugin you must edit your ~/.lircrc\n" "file. See the Zapping documentation for details.\n" msgstr "" "Ein weiteres Plugin um Zapping mittels LIRC zu steuern.\n" "\n" "Um dieses Plugin zu aktivieren müssen Sie Ihre ~/.lircrc\n" "Datei editieren. Näheres dazu in der Zapping-Dokumentation.\n" #: ../plugins/alirc/alirc.c:44 msgid "Lets you control zapping through lirc" msgstr "Lässt Sie Zapping mittels LIRC (Linux Infrared Remote Control) steuern" #. hash collision code #. Warn #. hash collision code #. hash collision code #. Warn #: ../plugins/alirc/alirc.c:375 ../plugins/mpeg/mpeg.c:3026 #: ../plugins/screenshot/screenshot.c:1778 #, c-format msgid "Check error: \"%s\" in plugin %s has hash 0x%x vs. 0x%x" msgstr "Warnung: \"%s\" im Plugin %s hat Hash 0x%x ggü. 0x%x" #: ../plugins/deinterlace/DI_GreedyH/DI_GreedyH.c:240 msgid "Max Comb" msgstr "Kamm Maximum" #: ../plugins/deinterlace/DI_GreedyH/DI_GreedyH.c:246 msgid "Motion Threshold" msgstr "Bewegungsgrenze" #: ../plugins/deinterlace/DI_GreedyH/DI_GreedyH.c:252 msgid "Motion Sense" msgstr "Bewegungserkennung" #: ../plugins/deinterlace/DI_GreedyH/DI_GreedyH.c:258 msgid "Good PullDown Lvl" msgstr "Obere Pulldown-Grenze" #: ../plugins/deinterlace/DI_GreedyH/DI_GreedyH.c:264 msgid "Bad PullDown Lvl" msgstr "Untere Pulldown-Grenze" #: ../plugins/deinterlace/DI_GreedyH/DI_GreedyH.c:270 #: ../plugins/deinterlace/DI_GreedyH/DI_GreedyH.c:318 msgid "H. Sharpness" msgstr "Horizontale Schärfe" #: ../plugins/deinterlace/DI_GreedyH/DI_GreedyH.c:276 #: ../plugins/deinterlace/DI_GreedyH/DI_GreedyH.c:312 msgid "V. Sharpness" msgstr "Vertikale Schärfe" #: ../plugins/deinterlace/DI_GreedyH/DI_GreedyH.c:282 #: ../plugins/deinterlace/DI_GreedyH/DI_GreedyH.c:306 msgid "Median Filter" msgstr "Medianfilter" #: ../plugins/deinterlace/DI_GreedyH/DI_GreedyH.c:288 msgid "High Comb Skip" msgstr "Kamm-Grenzwert" #: ../plugins/deinterlace/DI_GreedyH/DI_GreedyH.c:294 msgid "Auto Pull-Down" msgstr "Autom. Pulldown" #: ../plugins/deinterlace/DI_GreedyH/DI_GreedyH.c:300 msgid "In-Between Frames" msgstr "Zwischenbilder" #. size of this struct #. curr version compiled #: ../plugins/deinterlace/DI_GreedyH/DI_GreedyH.c:336 msgid "Video (Greedy, High Motion)" msgstr "Video (Greedy, viel Bewegung)" #: ../plugins/deinterlace/DI_Misc/DI_Bob.c:150 msgid "Simple Bob" msgstr "Simple Bob" #: ../plugins/deinterlace/DI_Misc/DI_EvenOnly.c:123 msgid "Even Scanlines Only" msgstr "Gerade Bildzeilen" #: ../plugins/deinterlace/DI_Misc/DI_Greedy2Frame.c:258 msgid "Greedy 2 Frame Luma Threshold" msgstr "Helligkeitsgrenze" #: ../plugins/deinterlace/DI_Misc/DI_Greedy2Frame.c:270 msgid "Greedy 2 Frame" msgstr "Greedy 2 Bilder" #: ../plugins/deinterlace/DI_Misc/DI_Greedy.c:235 msgid "Greedy Max Comb" msgstr "Kamm Maximum" #: ../plugins/deinterlace/DI_Misc/DI_Greedy.c:246 msgid "Video (Greedy, Low Motion)" msgstr "Video (Greedy, wenig Bewegung)" #: ../plugins/deinterlace/DI_Misc/DI_MoComp2.c:351 msgid "Video (MoComp2)" msgstr "Video (MoComp2)" #: ../plugins/deinterlace/DI_Misc/DI_OddOnly.c:125 msgid "Odd Scanlines Only" msgstr "Ungerade Bildzeilen" #: ../plugins/deinterlace/DI_Misc/DI_ScalerBob.c:117 msgid "Scaler Bob" msgstr "Scaler Bob" #: ../plugins/deinterlace/DI_Misc/DI_TomsMoComp.c:955 msgid "Search Effort" msgstr "Suchaufwand" #: ../plugins/deinterlace/DI_Misc/DI_TomsMoComp.c:961 msgid "Use Strange Bob" msgstr "Strange Bob verwenden" #: ../plugins/deinterlace/DI_Misc/DI_TomsMoComp.c:972 msgid "Video (TomsMoComp)" msgstr "Video (TomsMoComp)" #: ../plugins/deinterlace/DI_Misc/DI_TwoFrame.c:317 msgid "2 Frame Spatial Tolerance" msgstr "Räumliche Toleranz" #: ../plugins/deinterlace/DI_Misc/DI_TwoFrame.c:323 msgid "2 Frame Temporal Tolerance" msgstr "Zeitliche Toleranz" #: ../plugins/deinterlace/DI_Misc/DI_TwoFrame.c:334 msgid "Video Deinterlace (2-Frame)" msgstr "Video Deinterlace (2 Bilder)" #: ../plugins/deinterlace/DI_Misc/DI_VideoBob.c:237 msgid "Weave Edge Detect" msgstr "Kantenerkennung" #: ../plugins/deinterlace/DI_Misc/DI_VideoBob.c:243 msgid "Weave Jaggie Threshold" msgstr "Jaggie Grenzwert" #: ../plugins/deinterlace/DI_Misc/DI_VideoBob.c:254 msgid "Video Deinterlace (Bob)" msgstr "Video Deinterlace (Bob)" #: ../plugins/deinterlace/DI_Misc/DI_VideoWeave.c:270 msgid "Temporal Tolerance" msgstr "Zeitliche Toleranz" #: ../plugins/deinterlace/DI_Misc/DI_VideoWeave.c:276 msgid "Spatial Tolerance" msgstr "Räumliche Toleranz" #: ../plugins/deinterlace/DI_Misc/DI_VideoWeave.c:282 msgid "Similarity Threshold" msgstr "Ähnlichkeit" #: ../plugins/deinterlace/DI_Misc/DI_VideoWeave.c:293 msgid "Video Deinterlace (Weave)" msgstr "Video Deinterlace (Weave)" #: ../plugins/deinterlace/DI_Misc/DI_Weave.c:155 msgid "Simple Weave" msgstr "Simple Weave" #: ../plugins/deinterlace/main.c:352 msgid "Could not start deinterlace plugin" msgstr "Konnte das Deinterlace-Plugin nicht starten" #: ../plugins/deinterlace/main.c:353 #, c-format msgid "Could not switch to capture format YUYV %u x %u." msgstr "Konnte nicht zu Format YUYV %u × %u wechseln." #: ../plugins/deinterlace/main.c:447 msgid "Deinterlace" msgstr "Deinterlace" #: ../plugins/deinterlace/main.c:454 ../plugins/mpeg/mpeg.c:2336 #: ../plugins/mpeg/mpeg.c:2956 ../plugins/screenshot/screenshot.c:522 #: ../plugins/screenshot/screenshot.c:1525 ../plugins/subtitle/main.c:55 #: ../plugins/teletext/main.c:212 msgid "Plugins" msgstr "Plugins" #: ../plugins/deinterlace/main.c:523 msgid "Deinterlace plugin" msgstr "Deinterlace-Plugin" #: ../plugins/deinterlace/preferences.c:48 ../src/plugin_properties.c:120 msgid "Low" msgstr "Niedrig" #: ../plugins/deinterlace/preferences.c:49 msgid "Medium" msgstr "Mittel" #: ../plugins/deinterlace/preferences.c:50 ../src/plugin_properties.c:128 msgid "High" msgstr "Hoch" #: ../plugins/deinterlace/preferences.c:287 msgid "_Resolution:" msgstr "_Auflösung:" # src/frequencies.c:827 #. TRANSLATORS: Relative display duration of the first and #. second field in deinterlace mode. #: ../plugins/deinterlace/preferences.c:296 msgid "_Field Balance:" msgstr "_Feldgewichtung:" #: ../plugins/deinterlace/preferences.c:708 ../src/eggcellrendererkeys.c:222 msgid "Disabled" msgstr "Deaktiviert" #: ../plugins/mpeg/mpeg.c:846 #, c-format msgid "Format %s is incomplete, please configure the video or audio codec." msgstr "" "Format %s ist unvollständig, bitte konfigurieren Sie den Video- oder Audio-" "Codec." #: ../plugins/mpeg/mpeg.c:1156 #, c-format msgid "Cannot create file %s: %s\n" msgstr "Kann Datei »%s« nicht erstellen: %s\n" #: ../plugins/mpeg/mpeg.c:1726 ../plugins/mpeg/options.c:407 #: ../plugins/teletext/export.c:128 msgid "Options" msgstr "Optionen" #: ../plugins/mpeg/mpeg.c:2150 msgid "New format" msgstr "Neues Format" #: ../plugins/mpeg/mpeg.c:2151 msgid "Format name:" msgstr "Formatname:" #: ../plugins/mpeg/mpeg.c:2336 ../plugins/mpeg/mpeg.c:2809 #: ../plugins/mpeg/mpeg.c:2837 ../plugins/mpeg/mpeg.c:2945 #: ../plugins/mpeg/mpeg_properties.glade2.h:7 msgid "Record" msgstr "Aufnahme" #: ../plugins/mpeg/mpeg.c:2625 msgid "Not implemented yet" msgstr "Noch nicht eingebaut" #: ../plugins/mpeg/mpeg.c:2802 msgid "Record a video stream" msgstr "Eine Videodatei aufzeichnen" #: ../plugins/mpeg/mpeg.c:2887 msgid "Audio/Video Recorder" msgstr "Audio/Videorekorder" #: ../plugins/mpeg/mpeg.c:2890 msgid "This plugin records video and audio into a file" msgstr "Dieses Plugin nimmt Bild und Ton als Datei auf" #: ../plugins/mpeg/mpeg.c:2893 msgid "Record video and audio." msgstr "Bild und Ton aufzeichnen." #: ../plugins/mpeg/mpeg_properties.glade2.h:1 msgid "-" msgstr "-" #: ../plugins/mpeg/mpeg_properties.glade2.h:2 msgid "Capture _height:" msgstr "Bild_höhe:" #: ../plugins/mpeg/mpeg_properties.glade2.h:3 msgid "Capture _width:" msgstr "Bild_breite:" #: ../plugins/mpeg/mpeg_properties.glade2.h:4 msgid "Co_dec:" msgstr "Co_dec:" #: ../plugins/mpeg/mpeg_properties.glade2.h:5 #: ../plugins/screenshot/screenshot.glade2.h:3 msgid "Destination file" msgstr "Zieldatei" #: ../plugins/mpeg/mpeg_properties.glade2.h:6 msgid "Fil_e format" msgstr "_Dateiformat" #: ../plugins/mpeg/mpeg_properties.glade2.h:8 msgid "Record _all subtitles" msgstr "_Alle Untertitel aufzeichnen" #: ../plugins/mpeg/mpeg_properties.glade2.h:9 msgid "Record this channel or _page:" msgstr "_Diese Untertitelseiten aufzeichnen:" #: ../plugins/mpeg/mpeg_properties.glade2.h:10 msgid "Save _as:" msgstr "Speichern _unter:" #: ../plugins/mpeg/mpeg_properties.glade2.h:11 msgid "_Audio" msgstr "_Audio" #: ../plugins/mpeg/mpeg_properties.glade2.h:12 msgid "_Caption and Subtitles" msgstr "_Untertitel" #: ../plugins/mpeg/mpeg_properties.glade2.h:13 msgid "_Codec:" msgstr "_Codec:" #: ../plugins/mpeg/mpeg_properties.glade2.h:14 msgid "_Configure..." msgstr "_Konfigurieren..." #: ../plugins/mpeg/mpeg_properties.glade2.h:15 msgid "_Delete" msgstr "_Löschen" #: ../plugins/mpeg/mpeg_properties.glade2.h:16 msgid "_Embedded in the video file:" msgstr "_Eingebettet in die Videodatei:" #: ../plugins/mpeg/mpeg_properties.glade2.h:17 #: ../plugins/screenshot/screenshot.glade2.h:13 msgid "_Format:" msgstr "_Format:" #: ../plugins/mpeg/mpeg_properties.glade2.h:18 msgid "_New" msgstr "_Neu" #: ../plugins/mpeg/mpeg_properties.glade2.h:19 msgid "_No caption or subtitle recording" msgstr "_Keine Untertitelaufzeichnung" #: ../plugins/mpeg/mpeg_properties.glade2.h:20 msgid "_Pause" msgstr "_Pause" #: ../plugins/mpeg/mpeg_properties.glade2.h:21 msgid "_Record" msgstr "_Aufnahme" #: ../plugins/mpeg/mpeg_properties.glade2.h:22 msgid "_Record the displayed caption or subtitles" msgstr "Die _eingeblendeten Untertitel aufzeichnen." #: ../plugins/mpeg/mpeg_properties.glade2.h:23 msgid "_Stop" msgstr "_Stopp" #: ../plugins/mpeg/mpeg_properties.glade2.h:24 msgid "_Subtitle file:" msgstr "_Untertiteldatei:" #: ../plugins/mpeg/mpeg_properties.glade2.h:25 msgid "_Superimposed onto the picture" msgstr "In das _Bild eingeblendet" #: ../plugins/mpeg/mpeg_properties.glade2.h:26 msgid "_Update live caption at line breaks" msgstr "_Live-Untertitel bei Zeilenumbrüchen auffrischen" # src/v4l2interface.c:344 #: ../plugins/mpeg/mpeg_properties.glade2.h:27 ../src/zapping.c:500 msgid "_Video" msgstr "_Video" #: ../plugins/mpeg/options.c:741 msgid "No codec" msgstr "Kein Codec" #: ../plugins/screenshot/screenshot.c:45 msgid "Screenshot saver" msgstr "Speichern von Bildschirmfotos" #: ../plugins/screenshot/screenshot.c:47 msgid "" "With this plugin you can take screen shots of the program you are watching " "and save them in various formats." msgstr "" "Mit diesem Plugin können Sie das gezeigte\n" "Fernsehbild als Standbild in verschiedenen Formaten speichern." #: ../plugins/screenshot/screenshot.c:50 msgid "This plugin takes screenshots of the video capture." msgstr "Dieses Plugin speichert Bildschirmfotos." #: ../plugins/screenshot/screenshot.c:517 #: ../plugins/screenshot/screenshot.c:542 #: ../plugins/screenshot/screenshot.c:1525 msgid "Screenshot" msgstr "Bildschirmfoto" #: ../plugins/screenshot/screenshot.c:547 msgid "Take a screenshot" msgstr "Ein Bildschirmfoto speichern" #: ../plugins/screenshot/screenshot.c:684 #: ../plugins/screenshot/screenshot.c:842 msgid "Error while writing screenshot\n" msgstr "Fehler beim Speichern des Bildschirmfotos\n" #: ../plugins/screenshot/screenshot.c:892 msgid "Saving..." msgstr "Wird gespeichert..." # src/tveng.c:70 #: ../plugins/screenshot/screenshot.c:919 #, c-format msgid "" "Sorry, but I cannot write %s\n" "%s" msgstr "" "Kann %s nicht schreiben.\n" "%s" #: ../plugins/screenshot/screenshot.c:953 msgid "Sorry, not enough resources to create a new thread" msgstr "Ressourcenmangel verhindert Starten eines neuen Threads" #: ../plugins/screenshot/screenshot.c:958 msgid "There are too many threads" msgstr "Es gibt schon zu viele Threads" #: ../plugins/screenshot/screenshot.c:1147 #, c-format msgid "appx %u KB" msgstr "ca. %u KB" #: ../plugins/screenshot/screenshot.c:1150 #, c-format msgid "appx %.2f MB" msgstr "ca. %.2f MB" #: ../plugins/screenshot/screenshot.c:1225 #: ../plugins/screenshot/screenshot.c:1369 msgid "This format has no quality option" msgstr "Dieses Format hat keine Qualitätsoption" #: ../plugins/screenshot/screenshot.c:1405 msgid "Only useful with full size, unscaled picture (480 or 576 lines)" msgstr "Nur sinnvoll bei unskaliertem Vollbild (480 oder 576 Zeilen)" #: ../plugins/screenshot/screenshot.glade2.h:1 msgid "Backward" msgstr "Rückwärts" #: ../plugins/screenshot/screenshot.glade2.h:2 msgid "Command to execute after the image has been saved" msgstr "Befehl auszuführen nachdem das Bild gespeichert wurde" #: ../plugins/screenshot/screenshot.glade2.h:4 msgid "Forward" msgstr "Vorwärts" #: ../plugins/screenshot/screenshot.glade2.h:5 msgid "Grab full size image" msgstr "Vollbild speichern" #: ../plugins/screenshot/screenshot.glade2.h:6 msgid "Off" msgstr "Aus" #: ../plugins/screenshot/screenshot.glade2.h:7 msgid "Preview" msgstr "Vorschau" #: ../plugins/screenshot/screenshot.glade2.h:8 ../plugins/teletext/view.c:2767 msgid "S_ubtitles" msgstr "_Untertitel" #: ../plugins/screenshot/screenshot.glade2.h:9 msgid "Save Screenshot" msgstr "Bildschirmfoto speichern" #: ../plugins/screenshot/screenshot.glade2.h:10 msgid "_Add toolbar button" msgstr "_Knopf in die Werkzeugleiste einfügen" #: ../plugins/screenshot/screenshot.glade2.h:11 msgid "_Completion command:" msgstr "_Abschlussbefehl:" #: ../plugins/screenshot/screenshot.glade2.h:12 msgid "_Deinterlace:" msgstr "_Deinterlace:" #: ../plugins/screenshot/screenshot.glade2.h:14 msgid "_Grab on clicking OK" msgstr "_Bild beim Klicken auf OK festhalten" #: ../plugins/screenshot/screenshot.glade2.h:15 msgid "_Quality:" msgstr "_Qualität:" #: ../plugins/screenshot/screenshot.glade2.h:16 msgid "_Save as:" msgstr "_Speichern unter:" #: ../plugins/screenshot/screenshot.glade2.h:17 msgid "_Skip" msgstr "Ü_berspringe" #: ../plugins/screenshot/screenshot.glade2.h:18 msgid "pictures before grabbing" msgstr "Bilder vor dem Bildschirmfoto" #: ../plugins/subtitle/main.c:47 ../src/main.c:199 msgid "Subtitles" msgstr "Untertitel" #: ../plugins/subtitle/main.c:89 msgid "Subtitle plugin" msgstr "Untertitel-Plugin" #: ../plugins/subtitle/preferences.c:55 ../plugins/teletext/preferences.c:57 msgid "Western and Central Europe" msgstr "West- und Mitteleuropa" # src/frequencies.c:821 #: ../plugins/subtitle/preferences.c:56 ../plugins/teletext/preferences.c:58 msgid "Eastern Europe" msgstr "Osteuropa" #: ../plugins/subtitle/preferences.c:57 ../plugins/teletext/preferences.c:59 msgid "Western Europe and Turkey" msgstr "Westeuropa und die Türkei" #: ../plugins/subtitle/preferences.c:58 ../plugins/teletext/preferences.c:60 msgid "Central and Southeast Europe" msgstr "Mittel- und Südosteuropa" #: ../plugins/subtitle/preferences.c:59 ../plugins/teletext/preferences.c:61 msgid "Cyrillic" msgstr "Kyrillisch" #: ../plugins/subtitle/preferences.c:60 ../plugins/teletext/preferences.c:62 msgid "Greek and Turkish" msgstr "Griechisch und Türkisch" #: ../plugins/subtitle/preferences.c:61 ../plugins/teletext/preferences.c:63 msgid "Arabic" msgstr "Arabisch" #: ../plugins/subtitle/preferences.c:62 ../plugins/teletext/preferences.c:64 msgid "Hebrew and Arabic" msgstr "Hebräisch und Arabisch" #: ../plugins/subtitle/preferences.c:77 ../plugins/teletext/preferences.c:97 msgid "Nearest (fast, low quality)" msgstr "Nearest (schnell, geringe Qualität)" #: ../plugins/subtitle/preferences.c:78 ../plugins/teletext/preferences.c:98 msgid "Tiles" msgstr "Tiles" #: ../plugins/subtitle/preferences.c:79 ../plugins/teletext/preferences.c:99 msgid "Bilinear" msgstr "Bilinear" #: ../plugins/subtitle/preferences.c:80 ../plugins/teletext/preferences.c:100 msgid "Hyper (slow, high quality)" msgstr "Hyper (langsam, hohe Qualität)" #: ../plugins/subtitle/preferences.c:345 msgid "<b>Teletext</b>" msgstr "<b>Teletext</b>" #: ../plugins/subtitle/preferences.c:347 ../plugins/teletext/preferences.c:303 msgid "_Default encoding:" msgstr "_Zeichenkodierung:" #: ../plugins/subtitle/preferences.c:351 msgid "" "Some stations fail to transmit a complete language identifier, so the " "Subtitle viewer may not display the correct font or national characters. You " "can select your geographical region here as an additional hint." msgstr "" "Einige Sender geben die verwendete Sprache nur unvollständig an, dadurch " "kann der Untertitel-Dekoder eine falsche Schrift oder falsche Sonderzeichen " "zeigen. Zur Ergänzung können Sie hier Ihre geographische Region vorgeben." #: ../plugins/subtitle/preferences.c:358 msgid "_Show double height characters" msgstr "_Doppelt hohe Zeichen zeigen" #. TRANSLATORS: #. Closed Caption is a captioning system used mainly in the USA, #. and on VHS/LD/DVD in other countries. Europe uses Teletext for #. caption and subtitle transmissions. #: ../plugins/subtitle/preferences.c:365 msgid "<b>Closed Caption</b>" msgstr "<b>Closed Caption</b>" #: ../plugins/subtitle/preferences.c:367 msgid "_Foreground:" msgstr "_Textfarbe:" #: ../plugins/subtitle/preferences.c:369 msgid "Closed Caption foreground color" msgstr "Closed Caption Textfarbe" #: ../plugins/subtitle/preferences.c:372 msgid "_Background:" msgstr "_Hintergrund:" #: ../plugins/subtitle/preferences.c:374 msgid "Closed Caption background color" msgstr "Closed Caption Hintergrundfarbe" #: ../plugins/subtitle/preferences.c:383 msgid "_Roll live caption" msgstr "_Live-Caption rollen" #: ../plugins/subtitle/preferences.c:386 ../plugins/teletext/preferences.c:368 msgid "<b>Display</b>" msgstr "<b>Anzeigen</b>" #: ../plugins/subtitle/preferences.c:388 ../plugins/teletext/preferences.c:370 msgid "_Brightness:" msgstr "_Helligkeit:" # src/interface.c:247 #: ../plugins/subtitle/preferences.c:410 ../plugins/teletext/preferences.c:392 msgid "_Contrast:" msgstr "_Kontrast:" #: ../plugins/subtitle/preferences.c:432 ../plugins/teletext/preferences.c:414 msgid "S_caling:" msgstr "_Skalierung:" #: ../plugins/subtitle/preferences.c:436 ../plugins/teletext/preferences.c:418 msgid "Quality/speed trade-off when scaling and anti-aliasing the page." msgstr "" "Verhältnis von Qualität und Geschwindigkeit beim Skalieren und Antialiasing." #: ../plugins/subtitle/view.c:1660 ../src/subtitle.c:321 msgid "_Disable" msgstr "_Deaktivieren" #: ../plugins/subtitle/view.c:1662 msgid "_Reset position" msgstr "_Position zurücksetzen" #: ../plugins/subtitle/view.c:1664 ../plugins/teletext/window.c:810 msgid "_Encoding" msgstr "_Zeichenkodierung" #: ../plugins/teletext/bookmark.c:283 #, c-format msgid "Added page %x.%02x to bookmarks" msgstr "Seite %x.%02x zu Lesezeichen hinzugefügt" #: ../plugins/teletext/bookmark.c:287 #, c-format msgid "Added page %x to bookmarks" msgstr "Seite %x zu Lesezeichen hinzugefügt" #: ../plugins/teletext/bookmark.c:348 msgid "_Add Bookmark" msgstr "Lesezeichen _hinzufügen" #: ../plugins/teletext/bookmark.c:354 msgid "_Edit Bookmarks..." msgstr "Lesezeichen _bearbeiten..." #: ../plugins/teletext/bookmark.c:595 msgid "Bookmarks" msgstr "Lesezeichen" # src/interface.c:362 #: ../plugins/teletext/bookmark.c:634 msgid "Channel" msgstr "Sender" #: ../plugins/teletext/bookmark.c:640 msgid "Page" msgstr "Seite" #: ../plugins/teletext/bookmark.c:645 msgid "Description" msgstr "Beschreibung" #: ../plugins/teletext/export.c:168 ../plugins/teletext/export.c:194 msgid "Could not save page" msgstr "Konnte Seite nicht speichern" #: ../plugins/teletext/export.c:239 msgid "Save as" msgstr "Speichern unter" #: ../plugins/teletext/export.c:257 msgid "Format:" msgstr "Format:" #: ../plugins/teletext/main.c:176 msgid "_Preferences" msgstr "_Einstellungen" #: ../plugins/teletext/main.c:178 msgid "_Colors" msgstr "_Farben" #: ../plugins/teletext/main.c:204 ../src/main.c:198 msgid "Teletext" msgstr "Teletext" #: ../plugins/teletext/main.c:277 msgid "Teletext plugin" msgstr "Teletext-Plugin" #: ../plugins/teletext/preferences.c:79 msgid "Level 1" msgstr "Level 1" #: ../plugins/teletext/preferences.c:80 msgid "Level 1.5 (additional national characters)" msgstr "Level 1.5 (zusätzliche Sonderzeichen)" #: ../plugins/teletext/preferences.c:81 msgid "Level 2.5 (more colors, font styles and graphics)" msgstr "Level 2.5 (\"HiText\" - mehr Farben, Schriftarten und Grafik)" #: ../plugins/teletext/preferences.c:82 msgid "Level 3.5 (proportional spacing, multicolor graphics)" msgstr "Level 3.5 (Proportionalschrift, mehrfarbige Grafik)" #: ../plugins/teletext/preferences.c:295 msgid "<b>General</b>" msgstr "<b>Allgemein</b>" #: ../plugins/teletext/preferences.c:297 msgid "_Teletext implementation:" msgstr "_Teletext-Implementation:" #: ../plugins/teletext/preferences.c:307 msgid "" "Some stations fail to transmit a complete language identifier, so the " "Teletext viewer may not display the correct font or national characters. You " "can select your geographical region here as an additional hint." msgstr "" "Einige Sender geben die verwendete Sprache nur unvollständig an, dadurch " "kann der Teletext-Dekoder eine falsche Schrift oder falsche Sonderzeichen " "zeigen. Zur Ergänzung können Sie hier Ihre geographische Region vorgeben." #: ../plugins/teletext/preferences.c:313 msgid "<b>Page memory</b>" msgstr "<b>Seitenspeicher</b>" #: ../plugins/teletext/preferences.c:315 msgid "_Size:" msgstr "_Größe:" #. expand #. fill #. pad #. TRANSLATORS: Kilobyte (2^10) #: ../plugins/teletext/preferences.c:341 msgid "KiB" msgstr "KiB" # src/interface.c:362 #: ../plugins/teletext/preferences.c:348 msgid "_Channels:" msgstr "_Sender:" #: ../plugins/teletext/search.c:131 ../plugins/teletext/search.c:349 msgid "Search text:" msgstr "Suchtext:" #: ../plugins/teletext/search.c:153 #, c-format msgid "Found text on page %x.%02x:" msgstr "Text auf Seite %x.%02x gefunden:" #: ../plugins/teletext/search.c:160 msgid "Not found:" msgstr "Nicht gefunden:" #: ../plugins/teletext/search.c:171 msgid "Page memory is empty" msgstr "Seitenspeicher ist leer" #: ../plugins/teletext/search.c:342 ../plugins/teletext/view.c:3260 msgid "Search page memory" msgstr "Suche im Seitenspeicher" #: ../plugins/teletext/search.c:358 msgid "_Regular expression" msgstr "_Regulärer Ausdruck" #: ../plugins/teletext/search.c:363 msgid "Search case _insensitive" msgstr "Groß-/Kleinschreibung _ignorieren" # src/v4l2interface.c:146 #. Future stuff. #: ../plugins/teletext/search.c:369 msgid "_All channels" msgstr "_Alle Sender" #: ../plugins/teletext/toolbar.c:122 msgid "Next page" msgstr "Nächste Seite" #: ../plugins/teletext/toolbar.c:125 msgid "Previous page" msgstr "Vorhergehende Seite" #: ../plugins/teletext/toolbar.c:128 msgid "Previous subpage" msgstr "Vorhergehende Unterseite" #: ../plugins/teletext/toolbar.c:131 msgid "Next subpage" msgstr "Nächste Unterseite" #: ../plugins/teletext/toolbar.c:188 msgid "Open new Teletext window" msgstr "Neues Teletext Fenster öffnen" #: ../plugins/teletext/toolbar.c:210 msgid "Hold the current subpage" msgstr "Seite festhalten" #: ../plugins/teletext/toolbar.c:240 msgid "Reveal" msgstr "Aufdecken" #: ../plugins/teletext/toolbar.c:241 msgid "Reveal concealed text" msgstr "Verborgenen Text aufdecken" #: ../plugins/teletext/view.c:846 #, c-format msgid " Page %x" msgstr " Seite %x" #: ../plugins/teletext/view.c:850 #, c-format msgid " Subpage %x" msgstr " Unterseite %x" #: ../plugins/teletext/view.c:1459 #, c-format msgid "Loading page %X..." msgstr "Lade Seite %X..." #: ../plugins/teletext/view.c:1461 #, c-format msgid "Loading page %X.%02X..." msgstr "Lade Seite %X.%02X..." #: ../plugins/teletext/view.c:2372 msgid "Selection copied to clipboard" msgstr "Markierter Text zur Zwischenablage kopiert" #: ../plugins/teletext/view.c:2454 msgid "No page loaded" msgstr "Keine Seite geladen" #: ../plugins/teletext/view.c:2467 msgid "Selecting - press Shift key for table mode" msgstr "Markieren - für Blockmodus Hochstelltaste gedrückt halten" #: ../plugins/teletext/view.c:2627 msgid "Subtitle index" msgstr "Untertitel Übersicht" #: ../plugins/teletext/view.c:2634 msgid "Now and Next" msgstr "Jetzt und danach" #: ../plugins/teletext/view.c:2640 msgid "Current program" msgstr "Über diese Sendung" #: ../plugins/teletext/view.c:2646 msgid "Program Index" msgstr "Programminhalt" #: ../plugins/teletext/view.c:2652 msgid "Program Schedule" msgstr "Programmvorschau" #. TRANSLATORS: Schedule changes and the like. #: ../plugins/teletext/view.c:2660 msgid "Program Warning" msgstr "Programmhinweis" #: ../plugins/teletext/view.c:2721 msgid "_Open" msgstr "Ö_ffnen" #: ../plugins/teletext/view.c:2727 msgid "Open in _New Window" msgstr "_Neues Fenster öffnen" #: ../plugins/teletext/view.c:2738 msgid "_Open Link" msgstr "_Link öffnen" #: ../plugins/teletext/view.c:2749 ../plugins/teletext/window.c:805 msgid "_New Window" msgstr "_Neues Fenster" #: ../plugins/teletext/view.c:2755 msgid "_Save as..." msgstr "_Speichern unter..." #: ../plugins/teletext/view.c:2761 msgid "S_earch..." msgstr "_Suche..." #: ../plugins/teletext/view.c:2773 ../plugins/teletext/window.c:812 #: ../src/zapping.c:497 msgid "_Bookmarks" msgstr "_Lesezeichen" #: ../plugins/teletext/view.c:3252 msgid "_Go" msgstr "_Gehe zu" #: ../plugins/teletext/view.c:3254 msgid "Previous page in history" msgstr "Vorhergehende Seite in der Chronik" #: ../plugins/teletext/view.c:3256 msgid "Next page in history" msgstr "Nächste Seite in der Chronik" #: ../plugins/teletext/view.c:3257 msgid "Index" msgstr "Index" #: ../plugins/teletext/view.c:3258 msgid "Go to the index page" msgstr "Zur Hauptseite" #: ../plugins/teletext/view.c:3262 msgid "Save this page to a file" msgstr "Seite speichern" #. TRANSLATORS: Choose from the Teletext page cache the currently #. received channel. #: ../plugins/teletext/window.c:317 msgid "_Received" msgstr "_Empfangener" # Unbenannt #: ../plugins/teletext/window.c:349 ../src/v4linterface.c:1317 #: ../src/v4linterface.c:2520 msgid "Unnamed" msgstr "Namenlos" #: ../plugins/teletext/window.c:571 ../src/zvbi.c:221 msgid " (Latin)" msgstr " (Latein)" #: ../plugins/teletext/window.c:573 ../src/zvbi.c:223 msgid " (Cyrillic)" msgstr " (Kyrillisch)" #: ../plugins/teletext/window.c:616 ../src/zvbi.c:238 msgid "_Automatic" msgstr "_Automatisch" #: ../plugins/teletext/window.c:804 ../src/zapping.c:428 msgid "_File" msgstr "_Datei" #: ../plugins/teletext/window.c:808 ../src/zapping.c:436 msgid "_Edit" msgstr "_Bearbeiten" # src/v4l2interface.c:344 #: ../plugins/teletext/window.c:809 ../src/zapping.c:443 msgid "_View" msgstr "_Ansicht" # src/interface.c:362 #. 2.6 GTK_STOCK_EDIT #: ../plugins/teletext/window.c:811 ../src/zapping.c:441 ../src/zapping.c:454 msgid "_Channels" msgstr "_Sender" #: ../plugins/teletext/window.c:871 ../src/zapping.c:476 msgid "_Toolbar" msgstr "_Werkzeugleiste" #: ../plugins/teletext/window.c:873 msgid "_Statusbar" msgstr "_Statusleiste" #. TRANSLATORS: Soundcard mixer line. #: ../src/audio.c:807 msgid "Input:" msgstr "Eingang:" #: ../src/audio.c:840 ../src/keyboard.c:1154 ../src/osd.c:1080 #: ../src/properties.c:991 ../src/properties-handler.c:1353 msgid "General Options" msgstr "Allgemeine Optionen" #: ../src/audio.c:939 msgid "<span foreground=\"blue\">Audio off</span>" msgstr "<span foreground=\"blue\">Ton aus</span>" #: ../src/audio.c:940 msgid "<span foreground=\"yellow\">Audio on</span>" msgstr "<span foreground=\"yellow\">Ton an</span>" #: ../src/capture.c:866 msgid "Cannot stop capturing while recording." msgstr "Kann Capturing während Aufzeichnung nicht unterbrechen." #: ../src/capture.c:1052 #, c-format msgid "Cannot start capturing: %s" msgstr "Kann Capturing nicht aktivieren: %s" #: ../src/channel_editor.c:592 #, c-format msgid "Channel: %s Found: %u" msgstr "Kanal: %s Gefunden: %u" #: ../src/channel_editor.c:715 msgid "Searching..." msgstr "Suche..." # src/interface.c:336 #: ../src/channel_editor.c:1452 msgid "Select the frequency table used in your country" msgstr "Wählen Sie die Frequenztabelle die in Ihrem Land benutzt wird" #: ../src/channel_editor.c:1596 msgid "Ch. Name" msgstr "Kanalname" # src/interface.c:369 # glade/glade_strings.c:149, glade/glade_strings.c:155 #: ../src/channel_editor.c:1601 msgid "Freq (MHz)" msgstr "Frequ. (MHz)" # src/interface.c:405 #. append #: ../src/channel_editor.c:1654 msgid "Channel name" msgstr "Kanalname" #. append #: ../src/channel_editor.c:1658 msgid "Video input" msgstr "Videoeingang" # src/interface.c:362 #. append #: ../src/channel_editor.c:1662 msgid "RF Channel" msgstr "Kanal" # src/v4l2interface.c:344 #. append #: ../src/channel_editor.c:1666 msgid "Video standard" msgstr "Videostandard" #. append #: ../src/channel_editor.c:1670 ../src/keyboard.c:444 msgid "Accelerator" msgstr "Tastenkombination" #: ../src/channel_editor.c:1685 msgid "Do not change input" msgstr "Eingang beibehalten" #: ../src/channel_editor.c:1709 msgid "Do not change standard" msgstr "Videostandard beibehalten" # src/interface.c:362 #: ../src/channel_editor.c:1748 msgid "Channel editor" msgstr "Senderprogrammierung" #: ../src/channel_editor.c:1772 msgid "Region" msgstr "Region" #: ../src/channel_editor.c:1808 msgid "Automatic station _search" msgstr "_Sendersuchlauf" #: ../src/channel_editor.c:1814 msgid "" "Select a suitable frequency table, then click here to search through all " "channels in the table and add the received stations to the channel list." msgstr "" "Wählen Sie eine passende Frequenztabelle, danach klicken Sie hier um all " "Kanäle in der Tabelle abzusuchen und die empfangenen Sender in der " "Senderliste zu speichern." # src/v4l2interface.c:146 #: ../src/channel_editor.c:1820 msgid "Add all _channels" msgstr "Alle _Kanäle speichern" #: ../src/channel_editor.c:1827 msgid "Add all channels in the frequency table to the channel list." msgstr "Alle Kanäle der Frequenztabelle in der Senderliste speichern." #: ../src/channel_editor.c:1831 msgid "_Import XawTV configuration" msgstr "_XawTV Konfiguration importieren" # src/interface.c:362 #: ../src/channel_editor.c:1858 msgid "Channel List" msgstr "Senderliste" # src/interface.c:362 #: ../src/channel_editor.c:1893 msgid "Edit channel" msgstr "Sendereinstellungen editieren" #: ../src/channel_editor.c:1910 msgid "Name:" msgstr "Name:" #: ../src/channel_editor.c:1919 msgid "Video input:" msgstr "Videoeingang:" #: ../src/channel_editor.c:1930 msgid "Fine tuning:" msgstr "Feintuning:" #: ../src/channel_editor.c:1936 msgid "MHz" msgstr "MHz" # src/v4l2interface.c:344 #: ../src/channel_editor.c:1947 msgid "Video standard:" msgstr "Videostandard:" #: ../src/channel_editor.c:1958 msgid "Accelerator:" msgstr "Tastenkombination:" #: ../src/eggcellrendererkeys.c:163 ../src/eggcellrendererkeys.c:164 msgid "Accelerator key" msgstr "Auslösetasten der Kombination" #: ../src/eggcellrendererkeys.c:173 ../src/eggcellrendererkeys.c:174 msgid "Accelerator modifiers" msgstr "Umschalttasten der Kombination" #: ../src/eggcellrendererkeys.c:183 msgid "Accelerator Mode" msgstr "Kürzelmodus" #: ../src/eggcellrendererkeys.c:184 msgid "The type of accelerator." msgstr "Der Tastenkombinationstyp." # extrem gekürzt, wirkt sich auf Fensterbreite aus #: ../src/eggcellrendererkeys.c:333 ../src/eggcellrendererkeys.c:567 msgid "Type a new accelerator, or press Backspace to clear" msgstr "Tastenkombination eingeben oder Rücktaste zum Löschen" #: ../src/eggcellrendererkeys.c:570 msgid "Type a new accelerator" msgstr "Tastenkombination eingeben" #: ../src/frequencies.c:94 ../src/frequencies.c:160 msgid "broadcast" msgstr "Rundfunk" #: ../src/frequencies.c:107 msgid "cable IRC" msgstr "Kabel IRC" #: ../src/frequencies.c:126 msgid "cable HRC" msgstr "Kabel HRC" # src/frequencies.c:817 #: ../src/frequencies.c:144 ../src/frequencies.c:172 msgid "cable" msgstr "Kabel" #. TRANSLATORS: Leave "Autocom" untranslated. #: ../src/frequencies.c:275 msgid "Autocom cable" msgstr "Autocom Kabel" #: ../src/keyboard.c:89 ../src/keyboard.c:112 msgid "Ctrl+" msgstr "Strg+" #: ../src/keyboard.c:90 ../src/keyboard.c:113 msgid "Alt+" msgstr "Alt+" #: ../src/keyboard.c:91 ../src/keyboard.c:114 msgid "Shift+" msgstr "Hoch+" #: ../src/keyboard.c:525 msgid "Key table..." msgstr "Tastenliste..." #: ../src/keyboard.c:1106 msgid "Command" msgstr "Befehl" #: ../src/keyboard.c:1120 ../src/properties-handler.c:801 msgid "Shortcut" msgstr "Tastenkombination" #: ../src/main.c:197 ../src/tveng1.c:1358 ../src/tveng25.c:566 #: ../src/tvengbktr.c:414 ../src/tveng.c:2340 ../src/tvengxv.c:878 msgid "Mute" msgstr "Stumm" #. warnings #: ../src/main.c:273 ../src/main.c:308 #, c-format msgid "" "Capture mode couldn't be started:\n" "%s" msgstr "" "Capture-Modus konnte nicht gestartet werden:\n" "%s" #: ../src/main.c:291 #, c-format msgid "" "Cannot restore previous mode, will try capture mode:\n" "%s" msgstr "" "Kann alten Modus nicht wiederherstellen, werde Capture-Modus versuchen\n" "%s" #: ../src/main.c:299 #, c-format msgid "" "Capture mode couldn't be started either:\n" "%s" msgstr "" "Capture-Modus konnte auch nicht gestartet werden:\n" "%s" #: ../src/main.c:302 #, c-format msgid "" "Cannot restore previous mode:\n" "%s" msgstr "" "Kann alten Modus nicht wiederherstellen:\n" "%s" #: ../src/main.c:376 msgid "Kernel video device" msgstr "Kernel-Videogerät" #: ../src/main.c:377 msgid "FILENAME" msgstr "DATEINAME" #: ../src/main.c:388 ../src/main.c:406 msgid "XVideo video input port" msgstr "XVideo video input port" #: ../src/main.c:397 msgid "XVideo image overlay port" msgstr "XVideo image overlay port" #: ../src/main.c:415 msgid "Disable XVideo video input support" msgstr "XVideo Videoeingang nicht verwenden" #: ../src/main.c:424 msgid "Disable XVideo image overlay support" msgstr "XVideo Bilddarstellung nicht verwenden" #: ../src/main.c:433 msgid "Disable XVideo extension support" msgstr "XVideo nicht verwenden" #: ../src/main.c:445 msgid "Disable video overlay" msgstr "Video Overlay nicht verwenden" #: ../src/main.c:454 msgid "X display is remote, disable video overlay" msgstr "X Display ist fern, Video Overlay nicht verwenden" #: ../src/main.c:463 msgid "Disable VBI support" msgstr "VBI nicht verwenden" #: ../src/main.c:472 msgid "Disable plugins" msgstr "Keine Plugins verwenden" #. TRANSLATORS: --no-zsfb command line option. #. TRANSLATORS: --yuv-format command line option. #. TRANSLATORS: --tunerless-norm command line option. #: ../src/main.c:486 ../src/main.c:550 ../src/main.c:560 msgid "Obsolete" msgstr "Obsolet" #: ../src/main.c:504 msgid "Color depth of the X display" msgstr "X-Display-Farbtiefe" #: ../src/main.c:505 msgid "BPP" msgstr "BPP" #: ../src/main.c:513 msgid "Print debug messages" msgstr "Diagnosemeldungen zeigen" #: ../src/main.c:531 msgid "Force dword alignment of the overlay window" msgstr "DWord-Ausrichtung des Overlayfensters erzwingen" #: ../src/main.c:540 msgid "Execute the given command and exit" msgstr "Angegebenen Befehl ausführen und das Programm beenden" #: ../src/main.c:541 msgid "CMD" msgstr "CMD" #: ../src/main.c:569 msgid "Override CPU detection" msgstr "Prozessorerkennung aufheben" #: ../src/main.c:658 msgid "Sorry, but there is no module support in GLib" msgstr "Module werden von GLib leider nicht unterstützt" # src/callbacks.c:320 src/v4l2interface.c:89 #: ../src/main.c:782 msgid "Cannot get device info struct" msgstr "Kann device info Struktur nicht erstellen" #: ../src/main.c:791 msgid "Zapping couldn't be started" msgstr "Zapping konnte nicht gestartet werden" #: ../src/main.c:845 #, c-format msgid "Couldn't open %s, try other devices?" msgstr "Kann %s nicht öffnen, andere Geräte versuchen?" #: ../src/main.c:872 #, c-format msgid "%s suceeded, setting it as the new default" msgstr "Erfolg mit %s, wird gespeichert" #: ../src/main.c:882 #, c-format msgid "" "Sorry, but \"%s\" could not be opened:\n" "%s" msgstr "" "»%s« konnte leider nicht geöffnet werden:\n" "%s" #: ../src/main.c:1242 #, c-format msgid "" "ZConf could not be closed properly , your\n" "configuration will be lost.\n" "Possible causes for this are:\n" " - There is not enough free memory\n" " - You do not have permissions to write to $HOME/.zapping\n" " - libxml is non-functional (?)\n" " - or, more probably, you have found a bug in\n" " %s. Please contact the author.\n" msgstr "" "ZConf konnte nicht gespeichert werden, die\n" "aktuellen Einstellungen sind verloren.\n" "Mögliche Ursachen:\n" " - Nicht genug Speicher\n" " - Sie haben keinen Schreibrechte auf $HOME/.zapping\n" " - libxml funktioniert nicht (?)\n" " - oder, wahrscheinlicher, Sie haben einen Fehler in\n" " %s gefunden. Bitte kontaktieren Sie den Autor.\n" #: ../src/main.c:1268 msgid "Sorry, Zapping is unable to create the config tree" msgstr "Zapping kann den Konfigurationsbaum nicht erstellen" #: ../src/mixer.c:103 msgid "The soundcard mixer is not configured." msgstr "Der Mixer der Soundkarte ist nicht konfiguriert." #: ../src/osd.c:601 msgid "Please choose a font for OSD in preferences." msgstr "Bitte wählen Sie eine Schrift für OSD in den Programmeinstellungen." #: ../src/osd.c:604 #, c-format msgid "" "The configured font \"%s\" cannot be loaded, please select another one in " "preferences\n" msgstr "" "Die konfigurierte Schrift »%s« kann nicht geladen werden, bitte wählen Sie " "eine andere in den Programmeinstellungen.\n" #: ../src/osd.c:614 msgid "" "No font could be loaded, please make sure\n" "your system is properly configured." msgstr "" "Es konnte kein Schrift für OSD geladen werden,\n" "bitte prüfen Sie ob Ihr System korrekt konfiguriert ist." # src/frequencies.c:827 #: ../src/oss.c:186 msgid "Audio device:" msgstr "Audiogerät:" #: ../src/oss.c:189 msgid "Select the audio device" msgstr "Wählen Sie das zu verwendende Audiogerät" #: ../src/oss.c:216 #, c-format msgid "The given audio device \"%s\" doesn't exist" msgstr "Das Audiogerät »%s« existiert nicht" #. TRANSLATORS: Name of mixer line, mono as #. opposed to stereo. #: ../src/oss.c:920 #, c-format msgid "%s (Mono)" msgstr "%s (Mono)" #: ../src/plugin_properties.c:118 msgid "Very low" msgstr "Sehr niedrig" #: ../src/plugin_properties.c:122 msgid "Lower" msgstr "Niedriger" #: ../src/plugin_properties.c:124 msgid "Normal" msgstr "Normal" #: ../src/plugin_properties.c:126 msgid "Very high" msgstr "Sehr hoch" #: ../src/plugin_properties.c:130 msgid "Higher" msgstr "Höher" #: ../src/plugin_properties.c:152 msgid "This plugin has no public symbols" msgstr "Dieses Plugin hat keine öffentlichen Symbole" #: ../src/plugin_properties.c:171 msgid "List of symbols exported by the plugin" msgstr "Liste der vom Plugin exportierten Symbole" #: ../src/plugin_properties.c:213 msgid "Sorry, the plugin couldn't be started" msgstr "Das Plugin konnte leider nicht gestartet werden" #: ../src/plugin_properties.c:273 msgid "Sorry, but no plugins have been loaded" msgstr "Es wurden noch keine Plugins geladen" #: ../src/plugin_properties.c:308 msgid "Plugin name" msgstr "Plugin Name" #: ../src/plugin_properties.c:335 msgid "Symbol" msgstr "Symbol" #: ../src/plugin_properties.c:340 msgid "Hash" msgstr "Schlüssel" #: ../src/plugins.c:190 #, c-format msgid "\"%s\" doesn't provide a version" msgstr "»%s« gibt keine Versionsnummer an" #: ../src/plugins.c:227 msgid "Insufficient memory" msgstr "Nicht genug Speicher verfügbar" #: ../src/plugins.c:236 msgid "No description available" msgstr "Keine Beschreibung verfügbar" #. Warn #: ../src/plugins.c:350 #, c-format msgid "" "Check error: \"%s\" in plugin %s was supposed to be \"%s\" but it is:\"%s\". " "Hashes are 0x%x vs. 0x%x" msgstr "" "Kontrolle: \"%s\" im Plugin %s sollte \"%s\" sein, ist aber: \"%s\". Hashes " "sind 0x%x ggü. 0x%x" #: ../src/properties.c:622 msgid "Zapping Properties" msgstr "Zapping Eigenschaften" #: ../src/properties-handler.c:86 msgid "Can capture to memory.\n" msgstr "Kann Bilder speichern.\n" #: ../src/properties-handler.c:88 msgid "Has some tuner.\n" msgstr "Hat einen Tuner.\n" #: ../src/properties-handler.c:90 msgid "Supports the teletext service.\n" msgstr "Unterstützt Teletext.\n" #: ../src/properties-handler.c:92 msgid "Can overlay the image.\n" msgstr "Unterstützt Overlay.\n" #: ../src/properties-handler.c:94 msgid "Can chromakey the image.\n" msgstr "Kann das Bild überblenden.\n" #: ../src/properties-handler.c:96 msgid "Clipping rectangles are supported.\n" msgstr "Clipping wird unterstützt.\n" #: ../src/properties-handler.c:98 msgid "Framebuffer memory is overwritten.\n" msgstr "Schreibt in Gerätespeicher.\n" #: ../src/properties-handler.c:100 msgid "The capture can be scaled.\n" msgstr "Skalieren ist möglich.\n" #: ../src/properties-handler.c:102 msgid "Only monochrome is available\n" msgstr "Nur einfarbig\n" #: ../src/properties-handler.c:104 msgid "The capture can be zoomed\n" msgstr "Zoomen ist möglich\n" # src/v4l2interface.c:344 #: ../src/properties-handler.c:115 msgid "No available inputs" msgstr "Keine Eingänge vorhanden" #: ../src/properties-handler.c:117 msgid "Your video device has no inputs" msgstr "Ihr Videogerät hat keine Eingänge" #: ../src/properties-handler.c:132 msgid "TV input" msgstr "TV Eingang" #: ../src/properties-handler.c:134 msgid "Camera" msgstr "Kamera" #: ../src/properties-handler.c:413 #, c-format msgid "Resize to %ux%u" msgstr "Größe %u × %u" #. append #: ../src/properties-handler.c:778 msgid "Width" msgstr "Breite" #: ../src/properties-handler.c:778 msgid "Height" msgstr "Höhe" #: ../src/properties-handler.c:892 msgid "Text Below Icons" msgstr "Text unter Symbolen" #: ../src/properties-handler.c:893 msgid "Priority Text Beside Icons" msgstr "Nur wichtiger Text neben Symbolen" #: ../src/properties-handler.c:894 msgid "Icons Only" msgstr "Nur Symbole" #: ../src/properties-handler.c:895 msgid "Text Only" msgstr "Nur Text" #: ../src/properties-handler.c:960 #, c-format msgid "Use desktop default (%s)" msgstr "Desktopvorgaben verwenden (%s)" #. TRANSLATORS: Fullscreen video mode #: ../src/properties-handler.c:1160 msgid "Do not change" msgstr "Nicht verändern" #: ../src/properties-handler.c:1164 ../src/tveng.c:4841 msgid "Automatic" msgstr "Automatisch" #. TRANSLATORS: Fullscreen video mode #: ../src/properties-handler.c:1179 #, c-format msgid "%u x %u @ %u Hz" msgstr "%u × %u, %u Hz" #: ../src/properties-handler.c:1344 msgid "Main Window" msgstr "Hauptfenster" #: ../src/subtitle.c:258 #, c-format msgid "Page %x" msgstr "Seite %x" #: ../src/tveng1.c:1419 msgid "Frame Rate" msgstr "Bildrate" #: ../src/tveng1.c:1434 msgid "Snapshot Mode" msgstr "Standbildmodus" #: ../src/tveng1.c:2571 ../src/tveng25.c:1490 #, c-format msgid "Driver %s returned an unknown or invalid frame buffer format." msgstr "" "Treiber %s gibt ein unbekanntes oder inkorrektes Format für den " "Bildschirmspeicher an." #: ../src/tveng25.c:547 ../src/tvengbktr.c:383 ../src/tvengbktr.c:400 #: ../src/tvengxv.c:872 msgid "Brightness" msgstr "Helligkeit" # src/interface.c:247 #: ../src/tveng25.c:548 ../src/tvengbktr.c:385 ../src/tvengbktr.c:402 #: ../src/tvengxv.c:873 msgid "Contrast" msgstr "Kontrast" #: ../src/tveng25.c:549 ../src/tvengbktr.c:387 ../src/tvengbktr.c:404 #: ../src/tvengxv.c:874 msgid "Saturation" msgstr "Sättigung" #: ../src/tveng25.c:550 ../src/tvengbktr.c:393 ../src/tvengbktr.c:412 #: ../src/tvengxv.c:875 msgid "Hue" msgstr "Farbton" #: ../src/tveng25.c:551 msgid "Whiteness" msgstr "Weißabgleich" #: ../src/tveng25.c:552 msgid "Black level" msgstr "Schwarzabgleich" # src/frequencies.c:827 #: ../src/tveng25.c:553 ../src/tveng25.c:554 msgid "White balance" msgstr "Weißabgleich" # src/frequencies.c:827 #: ../src/tveng25.c:555 msgid "Red balance" msgstr "Rotabgleich" # src/frequencies.c:827 #: ../src/tveng25.c:556 msgid "Blue balance" msgstr "Blauabgleich" #: ../src/tveng25.c:557 msgid "Gamma" msgstr "Gamma" #: ../src/tveng25.c:558 msgid "Exposure" msgstr "Belichtung" #: ../src/tveng25.c:559 msgid "Auto gain" msgstr "Automatische Verstärkung" #: ../src/tveng25.c:560 msgid "Gain" msgstr "Verstärkung" #: ../src/tveng25.c:561 msgid "HCenter" msgstr "Horizontal zentrieren" #: ../src/tveng25.c:562 msgid "VCenter" msgstr "Vertikal zentrieren" #: ../src/tveng25.c:563 msgid "Hor. flipping" msgstr "Horizontal spiegeln" #: ../src/tveng25.c:564 msgid "Vert. flipping" msgstr "Vertikal spiegeln" #: ../src/tveng25.c:565 ../src/tveng.c:2327 ../src/tvengxv.c:879 msgid "Volume" msgstr "Lautstärke" #: ../src/tveng25.c:567 msgid "Audio Mute" msgstr "Stumm schalten" # src/frequencies.c:827 #: ../src/tveng25.c:568 msgid "Balance" msgstr "Symmetrie" # src/frequencies.c:827 #: ../src/tveng25.c:569 msgid "Audio Balance" msgstr "Audiosymmetrie" #: ../src/tveng25.c:570 msgid "Treble" msgstr "Höhen" #: ../src/tveng25.c:571 msgid "Loudness" msgstr "Lautstärke" #: ../src/tveng25.c:572 msgid "Bass" msgstr "Bässe" #: ../src/tveng25.c:2745 #, c-format msgid "%s doesn't look like a valid capture device" msgstr "%s scheint kein Videogerät zu sein" # src/tveng.c:70 #: ../src/tveng25.c:2764 #, c-format msgid "Sorry, but \"%s\" cannot do streaming" msgstr "»%s« unterstützt leider kein Streaming" #: ../src/tvengbktr.c:390 msgid "U/V Gain" msgstr "U/V Verstärkung" #: ../src/tvengbktr.c:407 msgid "U Saturation" msgstr "U Sättigung" #: ../src/tvengbktr.c:409 msgid "V Saturation" msgstr "V Sättigung" #: ../src/tveng.c:3214 #, c-format msgid "Cannot execute %s. Pipe error." msgstr "Konnte %s nicht ausführen. Pipe Fehler." #: ../src/tveng.c:3221 ../src/tveng.c:3253 #, c-format msgid "Cannot execute %s. %s." msgstr "Konnte %s nicht ausführen. %s" #. TRANSLATORS: Program name, error message. #: ../src/tveng.c:3231 #, c-format msgid "" "%s failed.\n" "%s" msgstr "" "%s fehlgeschlagen.\n" "%s" #. Something executed, but it wasn't #. zapping_setup_fb. Perhaps consolehelper #. couldn't authenticate the user? #: ../src/tveng.c:3243 #, c-format msgid "Cannot execute %s. No permission?" msgstr "Konnte %s nicht ausführen. Keine Berechtigung?" #: ../src/tveng.c:3352 #, c-format msgid "Cannot determine current overlay parameters. %s" msgstr "Konnte die aktuellen Overlay-Parameter nicht feststellen. %s" #. TRANSLATORS: Program name. #: ../src/tveng.c:3361 #, c-format msgid "%s did not work as expected." msgstr "%s hat versagt." #: ../src/tveng.c:3466 #, c-format msgid "%s not found in %s or the executable search path." msgstr "%s weder in »%s« noch Programmsuchpfad gefunden." #: ../src/tveng.c:4848 msgid "Mono" msgstr "Mono" #: ../src/tveng.c:4855 msgid "Stereo" msgstr "Stereo" #: ../src/tveng.c:4863 msgid "Language 2" msgstr "Sprache 2" #: ../src/tvengxv.c:876 msgid "Color" msgstr "Farbe" #: ../src/tvengxv.c:877 msgid "Interlace" msgstr "Zeilensprung" #: ../src/tvengxv.c:918 msgid "No" msgstr "Nein" #: ../src/tvengxv.c:919 msgid "Yes" msgstr "Ja" #: ../src/tvengxv.c:920 msgid "Doublescan" msgstr "Doublescan" #. TRANSLATORS: In controls box, color picker control, #. something like "Adjust Chroma-Key" for overlay. #: ../src/v4linterface.c:452 #, c-format msgid "Adjust %s" msgstr "%s einstellen" #: ../src/v4linterface.c:621 ../src/zapping.c:466 msgid "Controls" msgstr "Einstellungen" #: ../src/v4linterface.c:1308 ../src/zmisc.c:1811 msgid "Unknown" msgstr "Unbekannt" #: ../src/v4linterface.c:1326 msgid "No input" msgstr "Kein Eingang" # src/v4l2interface.c:344 #: ../src/v4linterface.c:1337 msgid "No standard" msgstr "Keine Standard" # src/v4l2interface.c:344 #: ../src/v4linterface.c:2410 msgid "Video standards" msgstr "Videostandards" #: ../src/v4linterface.c:2430 msgid "Audio inputs" msgstr "Audioeingänge" #: ../src/v4linterface.c:2450 msgid "Video inputs" msgstr "Videoeingänge" # src/v4l2interface.c:146 #. TRANSLATORS: This is displayed in the channel menu when #. the channel list is empty. #: ../src/v4linterface.c:2548 msgid "No channels" msgstr "Keine Sender" #: ../src/zapping.c:439 msgid "P_lugins" msgstr "P_lugins" #: ../src/zapping.c:444 ../src/zapping.c:485 msgid "_Window" msgstr "_Fenster" #: ../src/zapping.c:446 ../src/zapping.c:487 msgid "_Fullscreen" msgstr "_Vollbildmodus" #: ../src/zapping.c:448 ../src/zapping.c:489 msgid "_Background" msgstr "_Hintergrund" #: ../src/zapping.c:450 msgid "_Overlay mode" msgstr "_Overlay-Modus" #: ../src/zapping.c:452 msgid "_Capture mode" msgstr "_Capture-Modus" #: ../src/zapping.c:455 msgid "_Help" msgstr "_Hilfe" #: ../src/zapping.c:456 msgid "_Contents" msgstr "I_nhalt" #: ../src/zapping.c:458 msgid "_About" msgstr "_Info" #: ../src/zapping.c:461 msgid "Appearance" msgstr "Erscheinungsbild" #: ../src/zapping.c:462 msgid "Ch. Up" msgstr "Kanal +" #: ../src/zapping.c:463 msgid "Switch to higher channel" msgstr "Zum nächsten Sender wechseln" #: ../src/zapping.c:464 msgid "Ch. Down" msgstr "Kanal -" #: ../src/zapping.c:465 msgid "Switch to lower channel" msgstr "Zum vorhergehenden Sender wechseln" #: ../src/zapping.c:467 msgid "Change picture controls" msgstr "Bildeinstellungen ändern" #: ../src/zapping.c:472 msgid "_Mute" msgstr "_Stumm" #: ../src/zapping.c:473 msgid "Switch audio on or off" msgstr "Ton ein- oder ausschalten" #: ../src/zapping.c:474 msgid "Menu" msgstr "Menü" #: ../src/zapping.c:478 ../src/zapping.c:1092 msgid "Keep window on top" msgstr "Fenster über anderen halten" #: ../src/zapping.c:496 ../src/zapping.c:498 msgid "_Teletext" msgstr "_Teletext" #: ../src/zapping.c:499 msgid "Activate Teletext mode" msgstr "Zu Teletext-Modus wechseln" #: ../src/zapping.c:501 msgid "Return to video mode" msgstr "Zurück zum Videomodus" #: ../src/zapping.c:502 msgid "_New Teletext View" msgstr "_Neues Teletext-Fenster" #: ../src/zapping.c:508 ../src/zapping.c:513 msgid "_Subtitles" msgstr "_Untertitel" #: ../src/zapping.c:514 msgid "Switch subtitles on or off" msgstr "Untertitel ein- oder ausschalten" #: ../src/zapping.c:1090 msgid "Show menu and toolbar" msgstr "Menü und Werkzeugleiste zeigen" #: ../src/zmisc.c:662 msgid "Could not switch to capture mode" msgstr "Konnte nicht zu Capture-Modus wechseln" #: ../src/zmisc.c:684 ../src/zmisc.c:702 msgid "Could not switch to overlay mode" msgstr "Konnte nicht zu Overlay-Modus wechseln" #: ../src/zmisc.c:685 ../src/zmisc.c:737 msgid "Video overlay has been disabled." msgstr "Video Overlay wurde deaktiviert." #: ../src/zmisc.c:718 msgid "Could not switch to Teletext mode" msgstr "Konnte nicht zu Teletext-Modus wechseln" #: ../src/zmisc.c:719 msgid "VBI has been disabled, or it doesn't work." msgstr "VBI wurde deaktiviert oder funktioniert nicht." #: ../src/zmisc.c:736 ../src/zmisc.c:765 msgid "Could not switch to fullscreen mode" msgstr "Konnte nicht zu Vollbilddardstellung wechseln" #: ../src/zmisc.c:1031 msgid "Hide the statusbar" msgstr "Statusleiste verbergen" #: ../src/zmisc.c:1243 #, c-format msgid "%s is not a directory." msgstr "%s ist kein Verzeichnis." #: ../src/zmisc.c:1285 msgid "Could not create directory" msgstr "Konnte ein Verzeichnis nicht erstellen" #: ../src/zmisc.c:1286 #, c-format msgid "" "Could not create %s.\n" "%s" msgstr "" "Konnte %s nicht erstellen.\n" "%s" #: ../src/zmisc.c:2006 msgid "Device:" msgstr "Gerät:" #: ../src/zmisc.c:2007 msgid "Driver:" msgstr "Treiber:" #: ../src/zmisc.c:2008 msgid "Device file:" msgstr "Gerätedatei:" #: ../src/zmisc.c:2354 #, c-format msgid "Overwrite %s?" msgstr "%s überschreiben?" #: ../src/zmisc.c:2359 msgid "_Overwrite" msgstr "_Überschreiben" #: ../src/zmisc.c:2367 #, c-format msgid "%s is a directory." msgstr "%s ist ein Verzeichnis." #: ../src/zmisc.c:2382 #, c-format msgid "%s is a special file" msgstr "%s ist eine spezielle Datei" #: ../src/zmisc.c:2386 msgid "Continue" msgstr "Fortfahren" #: ../src/zmisc.c:2664 msgid "Could not open help file" msgstr "Konnte Hilfedatei nicht öffnen" #: ../src/zmisc.c:2697 msgid "Could not open URL" msgstr "Konnte die URL nicht öffnen" #: ../src/zspinslider.c:306 ../src/zspinslider.c:310 msgid "Reset" msgstr "Zurücksetzen" #: ../src/zvbi.c:1044 #, c-format msgid " %s: Teletext Page %x" msgstr " %s: Teletext-Seite %x" #: ../src/zvbi.c:1047 #, c-format msgid " Teletext Page %x" msgstr " Teletext-Seite %x" #: ../src/zvbi.c:1048 msgid "Open this page with Zapzilla" msgstr "Seite mit Zapzilla öffnen" #: ../src/zvbi.c:1434 msgid "PES file read error" msgstr "PES Datei Lesefehler" #: ../src/zvbi.c:1653 msgid "VBI interface timeout" msgstr "V4L/V4L2 VBI Schnittstelle: Lesefehler" #: ../src/zvbi.c:1685 msgid "VBI interface: Failed to read from the device" msgstr "V4L/V4L2 VBI Schnittstelle: Lesefehler" #: ../src/zvbi.c:1763 ../src/zvbi.c:2006 ../src/zvbi.c:2114 msgid "VBI initialization failed" msgstr "VBI-Initialisierung fehlgeschlagen" #: ../src/zvbi.c:2060 msgid "Cannot open PES file" msgstr "Konnte PES Datei nicht öffnen" #: ../src/zvbi.c:2115 #, c-format msgid "%s is no VBI device." msgstr "%s ist kein VBI-Gerät." #: ../zapping.desktop.in.h:1 msgid "Lets you watch TV in a window" msgstr "Zum Fernsehen in einem Fenster" #: ../zapping.desktop.in.h:2 msgid "Zapping TV Viewer" msgstr "Zapping Fernseher" #: ../zapping.schemas.in.h:1 msgid "Adds spaces around words in Closed Caption text to improve legibility." msgstr "Fügt Leerzeichen zu Closed Caption hinzu um die Lesbarkeit zu erhöhen" #: ../zapping.schemas.in.h:2 msgid "Caption/subtitle scaling quality." msgstr "Qualität beim Skalieren von Untertiteln." #: ../zapping.schemas.in.h:3 msgid "Closed Caption default background color." msgstr "Vorgabe der Closed Caption Hintergrundfarbe." #: ../zapping.schemas.in.h:4 msgid "Closed Caption default foreground color." msgstr "Vorgabe der Closed Caption Textfarbe." #: ../zapping.schemas.in.h:5 msgid "Color for chroma-key overlay (#RRGGBB), default #FFCCCC." msgstr "Farbe für Chromakey-Overlay (#RRGGBB). Vorgabe #FFCCCC." #: ../zapping.schemas.in.h:6 msgid "Default Teletext character set." msgstr "Vorgabe der Teletext-Zeichenkodierung." #: ../zapping.schemas.in.h:7 msgid "" "Default Teletext home page, usually 100. Valid values range from 100 to 899." msgstr "" "Vorgabe für die Teletext Hauptseite, normalerweise 100. Mögliche Werte " "reichen von 100 bis 899." #: ../zapping.schemas.in.h:8 msgid "Default Teletext home page." msgstr "Vorgabe für die Teletext Hauptseite." #: ../zapping.schemas.in.h:9 msgid "" "Default background color of Closed Caption text (#RRGGBB), default #000000." msgstr "Vorgabe der Closed Caption Hintergrundfarbe (#RRGGBB), normal #000000." #: ../zapping.schemas.in.h:10 msgid "" "Default foreground color of Closed Caption text (#RRGGBB), default #FFFFFF." msgstr "Vorgabe der Closed Caption Vordergrundfarbe (#RRGGBB), normal #FFFFFF." #: ../zapping.schemas.in.h:11 msgid "Deinterlace option." msgstr "Deinterlaceoption." #: ../zapping.schemas.in.h:12 msgid "Display delay of second field (0.0 to 1.0 of one frame period)." msgstr "" "Verzögerung vor der Darstellung des zweiten Felds (0,0 bis 1,0 eines " "Bildzyklus)." #: ../zapping.schemas.in.h:13 msgid "" "Enable navigation elements in the bottom row of the Teletext page. Valid " "values: disabled, flof_top1 (FLOF or TOP style 1), flof_top2 (TOP style 2)." msgstr "" "Navigationselemente am unteren Rand von Teletext-Seiten anzeigen. Mögliche " "Werte: disabled (deaktiviert), flof_top1 (FLOF oder TOP Variante 1), " "flof_top2 (TOP Variante 2)." #: ../zapping.schemas.in.h:14 msgid "Enable navigation elements." msgstr "Navigationselemente aktivieren." #: ../zapping.schemas.in.h:15 msgid "Enable smooth rolling of real time Closed Caption." msgstr "Sanftes Rollen von Live-Untertitelung aktivieren." #: ../zapping.schemas.in.h:16 msgid "Enables slow MMX and 3DNow! optimized functions for tests." msgstr "Langsame MMX und 3DNow! Funktionen für Tests aktivieren." #: ../zapping.schemas.in.h:17 msgid "Greedy (high motion) deinterlace test mode." msgstr "Greedy (viel Bewegung) Testmodus aktivieren." #: ../zapping.schemas.in.h:18 msgid "Horizontal image resolution in deinterlace mode." msgstr "Horizontale Bildauflösung im Deinterlace-Modus." #: ../zapping.schemas.in.h:19 msgid "Interpret the Teletext search text as regular expression." msgstr "Den Teletext Suchbegriff als regulären Ausdruck interpretieren." #: ../zapping.schemas.in.h:20 msgid "Keep the main window above other windows." msgstr "Das Hauptfenster über anderen halten." #: ../zapping.schemas.in.h:21 msgid "Maximum number of networks in the Teletext page cache." msgstr "Maximale Zahl von Sendern im Teletext Seitenspeicher." #: ../zapping.schemas.in.h:22 msgid "Maximum size of the Teletext page cache in bytes." msgstr "Maximale Größe des Teletext Seitenspeichers in Bytes." #: ../zapping.schemas.in.h:23 msgid "Pad Closed Caption text with spaces." msgstr "Closed Caption Text mit Leerzeichen auspolstern." #: ../zapping.schemas.in.h:24 msgid "" "Quality/speed trade-off when scaling and anti-aliasing Teletext pages. Valid " "values: nearest, tiles, bilinear, hyper." msgstr "" "Verhältnis von Qualität und Geschwindigkeit beim Skalieren und Antialiasing " "von Teletext-Seiten. Mögliche Werte: nearest, tiles, bilinear, hyper." #: ../zapping.schemas.in.h:25 msgid "" "Quality/speed trade-off when scaling and anti-aliasing caption/subtitles. " "Valid values: nearest, tiles, bilinear, hyper." msgstr "" "Verhältnis von Qualität und Geschwindigkeit beim Skalieren und Antialiasing " "von Untertiteln. Mögliche Werte: nearest, tiles, bilinear, hyper." #: ../zapping.schemas.in.h:26 msgid "Reverse the temporal field order." msgstr "Anzeigereihenfolge von Videofeldern umkehren." #: ../zapping.schemas.in.h:27 msgid "Roll Teletext page numbers." msgstr "Laufende Teletext Seitennummern." #: ../zapping.schemas.in.h:28 msgid "" "Roll the Teletext page number in the page header until the requested page " "has arrived." msgstr "" "Seitennummern in der Kopfzeile durchlaufen lassen bis die gewünschte Seite " "empfangen wurde." #: ../zapping.schemas.in.h:29 msgid "Search all channels in the Teletext page memory." msgstr "Alle Sender im Teletext Seitenspeicher durchsuchen." #: ../zapping.schemas.in.h:30 msgid "Show a menu bar in the main window." msgstr "Menü im Hauptfenster zeigen." #: ../zapping.schemas.in.h:31 msgid "Show a status bar in Teletext windows." msgstr "Statusleiste im Hauptfenster zeigen." #: ../zapping.schemas.in.h:32 msgid "Show a toolbar in Teletext windows." msgstr "Werkzeugleiste in Teletextfenstern zeigen." #: ../zapping.schemas.in.h:33 msgid "Show a toolbar in the main window." msgstr "Werkzeugleiste im Hauptfenster zeigen." #: ../zapping.schemas.in.h:34 msgid "Show double height characters in Teletext subtitles." msgstr "Doppelt hohe Zeichen in Teletextuntertiteln zeigen." #: ../zapping.schemas.in.h:35 msgid "" "Some stations fail to transmit a complete language identifier, so the " "Teletext viewer may not display the correct font or national characters. You " "can select your geographical region here as an additional hint. Valid " "values: western_and_central_europe, eastern_europe, " "western_europe_and_turkey, central_and_southeast_europe, cyrillic, " "greek_and_turkish, arabic, hebrew_and_arabic." msgstr "" "Einige Sender geben die verwendete Sprache nur unvollständig an, dadurch " "kann der Teletext-Dekoder eine falsche Schrift oder falsche Sonderzeichen " "zeigen. Zur Ergänzung können Sie hier ihre geographische Region vorgeben. " "Mögliche Werte sind: western_and_central_europe, eastern_europe, " "western_europe_and_turkey, central_and_southeast_europe, cyrillic, " "greek_and_turkish, arabic, hebrew_and_arabic." #: ../zapping.schemas.in.h:36 msgid "Switch to full capture size for screenshot." msgstr "Vor dem Bildschirmfoto auf volle Auflösung umschalten." #: ../zapping.schemas.in.h:37 msgid "Teletext implementation level." msgstr "Teletext-Implementation." #: ../zapping.schemas.in.h:38 msgid "Teletext implementation level. Valid values: 1, 1.5, 2.5, 3.5." msgstr "Teletext-Implementation. Mögliche Werte: 1, 1.5, 2.5, 3.5." #: ../zapping.schemas.in.h:39 msgid "Teletext page scaling quality." msgstr "Qualität beim Skalieren von Teletext Seiten." #: ../zapping.schemas.in.h:40 msgid "Text brightness, valid values range from 0 to 255." msgstr "Text Helligkeit. Mögliche Werte reichen von 0 bis 255." #: ../zapping.schemas.in.h:41 msgid "Text contrast, valid values range from -128 to 127." msgstr "Text Kontrast. Mögliche Werte reichen von -128 bis 127." #: ../zapping.schemas.in.h:42 msgid "The Teletext search is case insensitive." msgstr "Groß-/Kleinschreibung bei Teletextsuche ignorieren." #: ../zapping.schemas.in.h:43 msgid "" "This is the time in milliseconds Zapping will wait between pointer movements " "and blanking the pointer when over the video. A value of zero disables this " "feature." msgstr "" "Die Zeit in Millisekunden seit der letzten Mausbewegungen, nach der Zapping " "den Mauszeiger verbirgt. Der Wert 0 deaktiviert diese Funktion." #: ../zapping.schemas.in.h:44 msgid "Time to wait until blanking the pointer." msgstr "Zeit bis zum Verbergen des Mauszeigers." #: ../zapping.schemas.in.h:45 msgid "Update the clock in the Teletext page header." msgstr "Die Uhrzeit in der Kopfzeile von Teletext-Seiten aktualisieren." #: ../zapping.schemas.in.h:46 msgid "" "When your CPU is too slow to use the desired deinterlace mode you can reduce " "the horizontal resolution. Valid values: low, medium, high." msgstr "" "Wenn Ihr Prozessor für den gewünschten Deinterlace-Modus zu langsam ist, " "können Sie die horizontale Bildauflösung veringern. Mögliche Werte: low " "(niedrig), medium (mittel), high (hoch)." #: ../zapping_setup_fb/zapping_setup_fb.c:136 #, c-format msgid "Device name %s is unsafe, contains dots." msgstr "Gerätename %s ist unsicher, enthält Punkte." #: ../zapping_setup_fb/zapping_setup_fb.c:144 #, c-format msgid "Device name %s is unsafe, does not begin with /dev/." msgstr "Gerätename %s ist unsicher, beginnt nicht mit /dev/." # src/callbacks.c:320 src/v4l2interface.c:89 #. TRANSLATORS: File name, error message. #: ../zapping_setup_fb/zapping_setup_fb.c:163 #, c-format msgid "Cannot open device %s. %s." msgstr "Kann Gerät %s nicht öffnen. %s." #. TRANSLATORS: File name, error message. #: ../zapping_setup_fb/zapping_setup_fb.c:178 #, c-format msgid "Cannot identify %s. %s." msgstr "Kann %s nicht identifizieren. %s." #: ../zapping_setup_fb/zapping_setup_fb.c:190 #, c-format msgid "%s is not a device." msgstr "%s ist kein Gerät." #: ../zapping_setup_fb/zapping_setup_fb.c:204 #, c-format msgid "%s is not a video device." msgstr "%s ist kein Video-Gerät." #: ../zapping_setup_fb/zapping_setup_fb.c:218 #, c-format msgid "Cannot identify file descriptor %d. %s." msgstr "Kann Dateideskriptor %d nicht identifizieren. %s." #: ../zapping_setup_fb/zapping_setup_fb.c:229 #, c-format msgid "File descriptor %d is not a device." msgstr "Dateideskriptor %d ist kein Gerät." #: ../zapping_setup_fb/zapping_setup_fb.c:239 #, c-format msgid "File descriptor %d is not a video device." msgstr "Dateideskriptor %d ist kein Video-Gerät." #: ../zapping_setup_fb/zapping_setup_fb.c:254 #, c-format msgid "Internal error at %s:%u." msgstr "Interner Fehler bei %s:%u." #: ../zapping_setup_fb/zapping_setup_fb.c:273 #, c-format msgid "Cannot drop root privileges despite running with UID %d, EUID %d." msgstr "" "Kann Root-Privilegien nicht ablegen obwohl das Programm mit UID %d und EUID %" "d läuft." #: ../zapping_setup_fb/zapping_setup_fb.c:303 #, c-format msgid "Cannot restore root privileges despite running with UID %d, EUID %d." msgstr "" "Kann Root-Privilegien nicht wiederherstellen obwohl das Programm mit UID %d " "und EUID %d läuft." #: ../zapping_setup_fb/zapping_setup_fb.c:396 msgid "No standard input, output or error file." msgstr "Keine Standardeingabe, -ausgabe oder -fehlerdatei." #: ../zapping_setup_fb/zapping_setup_fb.c:449 #, c-format msgid "Invalid bpp argument %d. Expected 24 or 32." msgstr "Unzulässiger bpp-Wert %d. Erwartet wurde 24 oder 32." #: ../zapping_setup_fb/zapping_setup_fb.c:482 #, c-format msgid "Invalid device file descriptor %d." msgstr "Unzulässiger Gerätedateideskriptor %d." #: ../zapping_setup_fb/zapping_setup_fb.c:539 msgid "No screens found." msgstr "Keine X-Bildschirme gefunden." #: ../zapping_setup_fb/zapping_setup_fb.c:573 #, c-format msgid "Cannot open display %s." msgstr "Kann X-Anzeige %s nicht öffnen." #: ../zapping_setup_fb/zapping_setup_fb.c:590 #, c-format msgid "Screen %d not found." msgstr "Kann X-Bildschirm %d nicht finden." #: ../zapping_setup_fb/zapping_setup_fb.c:598 #, c-format msgid "DMA is not possible on screen %d." msgstr "DMA ist auf X-Bildschirm %d nicht möglich." #: ../zapping_setup_fb/zapping_setup_fb.c:614 #, c-format msgid "%s is not a V4L or V4L2 device." msgstr "%s ist kein V4L- oder V4L2-Gerät." #: ../zapping_setup_fb/zapping_setup_fb.c:617 #, c-format msgid "File descriptor %d is not a V4L or V4L2 device." msgstr "Dateideskriptor %d ist kein V4L- oder V4L2-Gerät." #: ../zapping_setup_fb/zapping_setup_fb.c:620 msgid "Cannot identify the video capture device." msgstr "Kann das Videogerät nicht identifizieren." #: ../zapping_setup_fb/zapping_setup_fb.h:56 #, c-format msgid "Ioctl %s failed: %s." msgstr "Ioctl %s fehlgeschlagen: %s." #: ../zapping_setup_fb/v4l.c:89 ../zapping_setup_fb/v4l25.c:91 msgid "The device does not support video overlay." msgstr "Das Gerät unterstützt Video-Overlay nicht." #~ msgid "Adaptive" #~ msgstr "Adaptiv" #~ msgid "Blended Clip" #~ msgstr "Blended Clip" #~ msgid "Maximum motion" #~ msgstr "Maximale Bewegungskompensation" #~ msgid "Composite mode" #~ msgstr "Composite-Modus" #~ msgid "Old Game" #~ msgstr "Old Game" #~ msgid "Unknown error in %s." #~ msgstr "Unbekannter Fehler in %s." #~ msgid "VBI device to use" #~ msgstr "Name des VBI-Geräts" #~ msgid "DEVICE" #~ msgstr "GERÄT" #~ msgid "Zapzilla couldn't be started" #~ msgstr "Zapzilla konnte nicht gestartet werden" #~ msgid "Sorry, Zapzilla is unable to create the config tree" #~ msgstr "Zapzilla kann den Konfigurationsbaum nicht erstellen" ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������zapping-0.10cvs6/po/cs.po��������������������������������������������������������������������������� 644 � 764 � 144 � 241056 10443535623 10445� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# Zapping Czech translation -*- coding: utf-8 -*- # Copyright (C) 2000-2005 Pavel Mlčoch <pavkamlc@centrum.cz> # msgid "" msgstr "" "Project-Id-Version: zapping 0.7\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2006-03-31 16:06+0200\n" "PO-Revision-Date: 2006-03-22 17:33+0100\n" "Last-Translator: Pavel Mlčoch <pavkamlc@centrum.cz>\n" "Language-Team: Czech <cs@li.org>\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #: ../glade/zapping.glade2.h:1 msgid "320x240" msgstr "320×240" #: ../glade/zapping.glade2.h:2 msgid "" "A format string describing the main window title when changing channels: " "$(alias), $(index), $(id), $(freq), $(standard) and $(input) are substituted " "by the respective values." msgstr "" "Formátovací řetězec popisující popisek hlavního okna při změně kanálu: " "$(alias), $(index), $(id), $(freq), $(standard) a $(input) jsou nahrazeny " "příslušnými hodnotami." #: ../glade/zapping.glade2.h:3 msgid "Advanced" msgstr "Rozšířené" #: ../glade/zapping.glade2.h:4 ../src/audio.c:829 ../src/audio.c:834 #: ../src/tveng.c:4830 msgid "Audio" msgstr "Zvuk" #: ../glade/zapping.glade2.h:5 msgid "Author:" msgstr "Autor:" #: ../glade/zapping.glade2.h:6 msgid "Biggest noninterlaced (autodetect)" msgstr "Větší neprokládané (autodetekce)" # src/interface.c:405 #: ../glade/zapping.glade2.h:7 msgid "Canonical name:" msgstr "Standardní jméno:" # src/interface.c:362 #: ../glade/zapping.glade2.h:8 msgid "Channel list number" msgstr "Číslo v seznamu kanálů" #: ../glade/zapping.glade2.h:9 msgid "Choose a color" msgstr "Vyberte barvu" #: ../glade/zapping.glade2.h:10 msgid "Chroma _key:" msgstr "" #: ../glade/zapping.glade2.h:11 msgid "Clean console" msgstr "Smaž konzolu" # src/interface.c:448 #: ../glade/zapping.glade2.h:12 msgid "Click here when you are done" msgstr "Klikni zde pro dokončení" #: ../glade/zapping.glade2.h:13 msgid "Console" msgstr "Konzola" #: ../glade/zapping.glade2.h:14 msgid "Copyright (C) 2000-2005 the contributors\n" msgstr "Copyright (C) 2000-2005 přispěvatelé\n" #: ../glade/zapping.glade2.h:16 msgid "Current controller:" msgstr "Aktuální ovladač:" #: ../glade/zapping.glade2.h:17 msgid "DVB PES File" msgstr "DVB PES Soubor" #: ../glade/zapping.glade2.h:18 msgid "DVB _PES File" msgstr "DVB _PES Soubor" #: ../glade/zapping.glade2.h:19 msgid "Device name:" msgstr "Jméno zařízení:" #: ../glade/zapping.glade2.h:20 ../src/audio.c:839 #: ../src/properties-handler.c:1352 ../src/zvbi.c:2537 msgid "Devices" msgstr "Zařízení" #: ../glade/zapping.glade2.h:21 msgid "Disable _screensaver" msgstr "_Zakaž spořič obrazovky" #: ../glade/zapping.glade2.h:22 msgid "Enter key" msgstr "Stiskni klávesu" #: ../glade/zapping.glade2.h:23 msgid "F_ont:" msgstr "_Písmo:" #: ../glade/zapping.glade2.h:24 msgid "Favorite _picture sizes:" msgstr "_Oblíbené velikosti obrazu:" #: ../glade/zapping.glade2.h:25 msgid "General options" msgstr "Základní nastavení" #: ../glade/zapping.glade2.h:26 msgid "Interlaced (window size)" msgstr "Prokládané (velikost okna)" #: ../glade/zapping.glade2.h:27 msgid "Kernel VBI device" msgstr "Zařízení VBI v jádře" #: ../glade/zapping.glade2.h:28 msgid "Kernel _device" msgstr "Zařízení _jádra" #: ../glade/zapping.glade2.h:29 ../src/keyboard.c:1149 msgid "Keyboard" msgstr "Klávesnice" #: ../glade/zapping.glade2.h:30 msgid "Known key names" msgstr "Jména známých kláves" #: ../glade/zapping.glade2.h:31 msgid "Maximum capture size:" msgstr "Největší velikost obrazu:" #: ../glade/zapping.glade2.h:32 msgid "Minimum capture size:" msgstr "Nejmenší velikost obrazu:" #: ../glade/zapping.glade2.h:33 msgid "Mute while ch_anging channels" msgstr "Ztlumit při změně kanálu" #: ../glade/zapping.glade2.h:34 msgid "NTSC" msgstr "NTSC" #: ../glade/zapping.glade2.h:35 msgid "No Display" msgstr "Nezobrazovat" #: ../glade/zapping.glade2.h:36 msgid "OK, let's go on" msgstr "Ok, spustit" #: ../glade/zapping.glade2.h:37 ../src/osd.c:1075 msgid "OSD" msgstr "OSD" #: ../glade/zapping.glade2.h:38 msgid "On Screen Display (OSD)" msgstr "Zobrazuj v obrazu (OSD)" #: ../glade/zapping.glade2.h:39 msgid "PAL" msgstr "PAL" #: ../glade/zapping.glade2.h:40 msgid "Plugin location" msgstr "Umístění pluginu" #: ../glade/zapping.glade2.h:41 msgid "Plugin priority:" msgstr "Priorita pluginu:" #: ../glade/zapping.glade2.h:42 msgid "Plugin properties" msgstr "Vlastnosti pluginu" #: ../glade/zapping.glade2.h:43 msgid "Plugin version:" msgstr "Verze pluginu:" #: ../glade/zapping.glade2.h:44 msgid "Properties" msgstr "Vlastnosti" # src/interface.c:362 #: ../glade/zapping.glade2.h:45 msgid "RF channel number" msgstr "Číslo RF kanálu" # src/v4l2interface.c:344 #: ../glade/zapping.glade2.h:46 msgid "Remember this video standard" msgstr "Používej tento video standard" #: ../glade/zapping.glade2.h:47 msgid "Remove all this mess" msgstr "Odstraň všechen tento nepořádek" #: ../glade/zapping.glade2.h:48 msgid "Run the plugin" msgstr "Spusť plugin" #: ../glade/zapping.glade2.h:49 msgid "SECAM" msgstr "SECAM" # src/interface.c:247 #: ../glade/zapping.glade2.h:50 msgid "S_how toolbar as:" msgstr "_Zobrazuj toolbar jako:" #: ../glade/zapping.glade2.h:51 msgid "Save _control values per channel" msgstr "Ukládej _hodnoty nastavení pro každý kanál" #: ../glade/zapping.glade2.h:52 msgid "Select OSD font" msgstr "Vyber OSD font" #: ../glade/zapping.glade2.h:53 msgid "Select the V4L device" msgstr "Vyber V4L zařízení" # src/interface.c:247 #: ../glade/zapping.glade2.h:54 msgid "Show _tooltips" msgstr "_Zobrazuj tooltipy" #: ../glade/zapping.glade2.h:55 msgid "Status Bar" msgstr "Stavový řádek" #: ../glade/zapping.glade2.h:56 msgid "Stop this plugin" msgstr "Zastav plugin" #: ../glade/zapping.glade2.h:57 msgid "TV viewer for the Gnome environment" msgstr "TV prohlížeč pro prostředí Gnome" #: ../glade/zapping.glade2.h:58 msgid "" "The video capture device does not report the correct video standard, please " "select manually:" msgstr "" "Zařízení pro snímání videa nevrací správný video standard, prosím vyberte " "manuálně:" #: ../glade/zapping.glade2.h:59 msgid "Title _bar contents:" msgstr "Obsah _popisu okna:" #: ../glade/zapping.glade2.h:60 ../src/zvbi.c:2532 msgid "VBI" msgstr "VBI" #: ../glade/zapping.glade2.h:61 ../src/main.c:200 #: ../src/properties-handler.c:1339 ../src/properties-handler.c:1347 msgid "Video" msgstr "Video" # src/v4l2interface.c:344 #: ../glade/zapping.glade2.h:62 msgid "Video Standard" msgstr "Videostandard:" #: ../glade/zapping.glade2.h:63 msgid "Video device capabilities" msgstr "Možnosti video zařízení" #: ../glade/zapping.glade2.h:64 msgid "Window" msgstr "Okno" #: ../glade/zapping.glade2.h:65 msgid "Zapping Preferences" msgstr "Vlastnosti Programu" #: ../glade/zapping.glade2.h:66 msgid "Zapping error console" msgstr "Chybová konzola programu" #: ../glade/zapping.glade2.h:67 msgid "_Background color:" msgstr "_Barva pozadí:" #: ../glade/zapping.glade2.h:68 msgid "_Capture size under XVideo:" msgstr "_Velikost obrazu pro XVideo:" #: ../glade/zapping.glade2.h:69 msgid "_Command:" msgstr "_Příkaz:" #: ../glade/zapping.glade2.h:70 msgid "_Control volume with soundcard mixer" msgstr "_Ovládání hlasitosti pomocí zvukové karty" #: ../glade/zapping.glade2.h:71 msgid "_Device file:" msgstr "_Soubor zařízení:" #: ../glade/zapping.glade2.h:72 msgid "_Display mode:" msgstr "_Režim obrazovky:" # src/v4l2interface.c:146 #: ../glade/zapping.glade2.h:73 msgid "_Enter channels by:" msgstr "_Zadat kanál pomocí:" #: ../glade/zapping.glade2.h:74 msgid "_Foreground color:" msgstr "_Barva textu:" #: ../glade/zapping.glade2.h:75 msgid "_Fullscreen video resolution:" msgstr "_Rozlišení v režimu celé obrazovky:" #: ../glade/zapping.glade2.h:76 msgid "_Gnome sound daemon (ESD)" msgstr "_Zvukový démon pro Gnome (ESD)" #: ../glade/zapping.glade2.h:77 msgid "_KDE sound daemon (ARTS)" msgstr "_Zvukový démon pro KDE (ARTS)" #: ../glade/zapping.glade2.h:78 msgid "_Mute on exit" msgstr "_Ztlumit při ukončení" #: ../glade/zapping.glade2.h:79 msgid "_No VBI services" msgstr "_Žádné VBI funkce" #: ../glade/zapping.glade2.h:80 msgid "_No audio recording" msgstr "Žádné ovládání zvuku" #: ../glade/zapping.glade2.h:81 msgid "_Remove after:" msgstr "_Odstraň po:" #: ../glade/zapping.glade2.h:82 msgid "_Resize using fixed increments" msgstr "_Měnit velikost postupně" #: ../glade/zapping.glade2.h:83 msgid "_Start Zapping muted" msgstr "Spusť program _ztlumený" #: ../glade/zapping.glade2.h:84 msgid "_Use VBI Proxy if available" msgstr "_Použij VBI Proxy je-li dostupná" #: ../glade/zapping.glade2.h:85 msgid "seconds" msgstr "sekund" #: ../libvbi/exp-gfx.c:1483 msgid "Correct aspect ratio" msgstr "Správný poměr stran" #: ../libvbi/exp-gfx.c:1484 msgid "" "Approach an image aspect ratio similar to a real TV. This will double the " "image size." msgstr "" "Poměr stran obrazu podobný opravdové TV. Velikost obrazu bude dvojnásobná." #: ../libvbi/exp-gfx.c:1623 msgid "PPM" msgstr "PPM" #: ../libvbi/exp-gfx.c:1624 msgid "Export this page as raw PPM image" msgstr "Exportuj tuto stránku jako PPM-obrázek" #. XXX gettext encoding #: ../libvbi/exp-gfx.c:1824 ../libvbi/exp-html.c:532 ../libvbi/exp-sub.c:633 #: ../libvbi/exp-sub.c:764 ../libvbi/exp-sub.c:821 #, c-format msgid "Teletext Page %3x.%x" msgstr "Stránka Teletextu %3x.%x" #: ../libvbi/exp-gfx.c:1828 ../libvbi/exp-html.c:535 ../libvbi/exp-sub.c:636 #: ../libvbi/exp-sub.c:767 ../libvbi/exp-sub.c:824 #, c-format msgid "Teletext Page %3x" msgstr "Stránka Teletextu %x" #: ../libvbi/exp-gfx.c:2019 msgid "PNG" msgstr "PNG" #: ../libvbi/exp-gfx.c:2020 msgid "Export this page as PNG image" msgstr "Exportuj tuto stránku jako PNG obrázek" #: ../libvbi/exp-html.c:110 ../libvbi/exp-txt.c:133 msgid "Graphics char" msgstr "Grafický znak" #: ../libvbi/exp-html.c:111 ../libvbi/exp-txt.c:134 msgid "" "Replacement for block graphic characters: a single character or decimal (32) " "or hex (0x20) code" msgstr "" "Přepisování bloku grafických znaků: znak, desítkové (32), nebo šestnáctkové " "(0x20) číslo" #: ../libvbi/exp-html.c:114 ../libvbi/exp-txt.c:137 msgid "ASCII art" msgstr "ASCII-grafika" #: ../libvbi/exp-html.c:115 ../libvbi/exp-txt.c:138 msgid "Replace graphic characters by ASCII art" msgstr "Přepisuj grafické znaky pomocí ASCII" #: ../libvbi/exp-html.c:117 msgid "Color (CSS)" msgstr "Barva (CSS)" #: ../libvbi/exp-html.c:118 msgid "Store the page colors using CSS attributes" msgstr "Ulož barvy stránky použitím CSS atributů" #: ../libvbi/exp-html.c:120 msgid "HTML header" msgstr "HTML hlavička" #: ../libvbi/exp-html.c:121 msgid "Include HTML page header" msgstr "Vlož hlavičku HTML stránky" #. TRANSLATORS: lang=\"en\" refers to the page title #. "Teletext Page ...". Please specify "de", "fr", "es" #. etc. #: ../libvbi/exp-html.c:521 msgid "<title lang=\"en\">" msgstr "<title lang=\"cs\">" #: ../libvbi/exp-html.c:843 msgid "HTML" msgstr "HTML" #: ../libvbi/exp-html.c:844 msgid "Export this page as HTML page" msgstr "Ulož tuto stránku jako HTML" #: ../libvbi/export.c:200 msgid "Write error." msgstr "Chyba zápisu." #: ../libvbi/export.c:210 msgid "Out of memory." msgstr "Chyba paměti." #: ../libvbi/export.c:235 #, c-format msgid "Export module %s has no option %s." msgstr "Exportní modul %s nemá žádné volby %s." #: ../libvbi/export.c:295 #, c-format msgid "Invalid argument %s for option %s of export module %s." msgstr "Nesprávný argument %s pro volbu %s exportního modulu %s." #: ../libvbi/export.c:350 msgid "Unknown error." msgstr "Neznámá chyba." #: ../libvbi/export.c:436 #, c-format msgid "Could not create %s. %s." msgstr "Nemohu vytvořit %s. %s." #: ../libvbi/export.c:1334 #, c-format msgid "Invalid option string \"%s\"." msgstr "Nesprávný řetězec volby \"%s\"." #: ../libvbi/export.c:1438 #, c-format msgid "Unknown export module '%s'." msgstr "Neznámý exportní modul '%s'." #: ../libvbi/export.c:1452 #, c-format msgid "Cannot initialize export module '%s', probably lack of memory." msgstr "" "Nemohu inicializovat exportní modul '%s'. Pravděpodobně nemáte dostatek " "paměti." #: ../libvbi/export.c:1476 #, c-format msgid "Cannot initialize export module '%s', out of memory." msgstr "Nemohu inicializovat exportní modul %s, chyba paměti." #: ../libvbi/exp-sub.c:124 ../libvbi/exp-txt.c:81 msgid "ASCII" msgstr "ASCII" #: ../libvbi/exp-sub.c:125 ../libvbi/exp-txt.c:82 msgid "ISO-8859-1 (Latin-1 Western languages)" msgstr "ISO-8859-1 (Latin-1 západní jazyky)" #: ../libvbi/exp-sub.c:126 ../libvbi/exp-txt.c:83 msgid "ISO-8859-2 (Latin-2 Central and Eastern European languages)" msgstr "ISO-8859-2 (Latin-2 středo a východoevropské jazyky)" #: ../libvbi/exp-sub.c:127 ../libvbi/exp-txt.c:84 msgid "ISO-8859-4 (Latin-3 Baltic languages)" msgstr "ISO-8859-4 (Latin-3 pobaltské jazyky)" #: ../libvbi/exp-sub.c:128 ../libvbi/exp-txt.c:85 msgid "ISO-8859-5 (Cyrillic)" msgstr "ISO-8859-5 (Cirilice)" #: ../libvbi/exp-sub.c:129 ../libvbi/exp-txt.c:86 msgid "ISO-8859-7 (Greek)" msgstr "ISO-8859-7 (Řecké)" #: ../libvbi/exp-sub.c:130 ../libvbi/exp-txt.c:87 msgid "ISO-8859-8 (Hebrew)" msgstr "ISO-8859-8 (Hebrejské)" #: ../libvbi/exp-sub.c:131 ../libvbi/exp-txt.c:88 msgid "ISO-8859-9 (Turkish)" msgstr "ISO-8859-9 (Turecké)" #: ../libvbi/exp-sub.c:132 ../libvbi/exp-txt.c:89 msgid "KOI8-R (Russian and Bulgarian)" msgstr "KOI8-R (Ruské a bulharské)" #: ../libvbi/exp-sub.c:133 ../libvbi/exp-txt.c:90 msgid "KOI8-U (Ukranian)" msgstr "KOI8-U (Ukrajina)" #: ../libvbi/exp-sub.c:134 ../libvbi/exp-txt.c:91 msgid "ISO-10646/UTF-8 (Unicode)" msgstr "ISO-10646/UTF-8 (Unicode)" #. TRANSLATORS: Text export encoding (ASCII, Unicode, ...) menu #: ../libvbi/exp-sub.c:155 ../libvbi/exp-sub.c:165 ../libvbi/exp-txt.c:127 msgid "Encoding" msgstr "Kódování" #: ../libvbi/exp-sub.c:171 msgid "Font face" msgstr "Písmo" #. TRANSLATORS: #. Caption is an aid for the hearing impaired, #. subtitles for foreign language viewers. #: ../libvbi/exp-sub.c:1534 msgid "MPlayer caption/subtitle file" msgstr "MPlayer soubor nadpisu/titulků" #. TRANSLATORS: #. Styles like bold, italic, underlined, etc. #. Justification to the left, right, centered. #: ../libvbi/exp-sub.c:1559 msgid "" "QuickTime Text caption/subtitle file preserving text styles, justification " "and color" msgstr "" "QuickTime soubor textu nadpisu/titulků, zachovává styly textu, zarovnání a " "barvy" #: ../libvbi/exp-sub.c:1583 msgid "RealText caption/subtitle file preserving text styles and color" msgstr "RealText soubor nadpisu/titulků zachovává styly a barvy" #: ../libvbi/exp-sub.c:1606 msgid "" "SAMI 1.0 caption/subtitle file preserving text styles, justification and " "color" msgstr "" "SAMI 1.0 soubor nadpisu/titulků, zachovává styly textu, zarovnání a barvy" #: ../libvbi/exp-sub.c:1630 msgid "SubRip caption/subtitle file" msgstr "SubRip soubor nadpisu/titulků" #: ../libvbi/exp-sub.c:1652 msgid "SubViewer 2.x caption/subtitle file" msgstr "SubViewer 2.x soubor nadpisu/titulků" #. TRANSLATORS: Terminal control codes menu #: ../libvbi/exp-txt.c:112 msgid "None" msgstr "Žádné" #: ../libvbi/exp-txt.c:113 msgid "ANSI X3.64 / VT 100" msgstr "ANSI X3.64 / VT 100" #: ../libvbi/exp-txt.c:114 msgid "VT 200" msgstr "VT 200" #: ../libvbi/exp-txt.c:140 msgid "Control codes" msgstr "Kódy barev" #: ../libvbi/exp-txt.c:1030 msgid "Text" msgstr "Text" #: ../libvbi/exp-txt.c:1031 msgid "Export this page as text file" msgstr "Ulož tuto stránku jako textový soubor" #: ../libvbi/exp-vtx.c:82 msgid "Can only export Teletext pages." msgstr "Mužu exportovat pouze stránky teletextu." #: ../libvbi/exp-vtx.c:89 msgid "Page is not cached." msgstr "Stránka není v paměti." #: ../libvbi/exp-vtx.c:98 msgid "Cannot export this page, is not displayable." msgstr "Nemohu exportovat tuto stránku, není zobrazitelná." #: ../libvbi/exp-vtx.c:135 msgid "VTX" msgstr "VTX" #: ../libvbi/exp-vtx.c:136 msgid "" "Export this page as VTX file, the format used by VideoteXt and vbidecode" msgstr "" "Export této stránky jako VTX soubor, formát používaný VideoteXtem a " "vbidekodérem" #: ../plugins/alirc/alirc.c:37 msgid "Another lirc plugin" msgstr "Další LIRC plugin" #: ../plugins/alirc/alirc.c:39 msgid "" "Another plugin to control zapping through lirc\n" "\n" "To enable this plugin you must edit your ~/.lircrc\n" "file. See the Zapping documentation for details.\n" msgstr "" "Další plugin k ovládání programu pomocí LIRC\n" "\n" "K povolení tohoto pluginu musíte upravit soubor ~/.lircrc\n" "Pro detaily nahlédněte do dokumentace programu.\n" #: ../plugins/alirc/alirc.c:44 msgid "Lets you control zapping through lirc" msgstr "Nyní můžete program ovládat pomocí LIRC" #. hash collision code #. Warn #. hash collision code #. hash collision code #. Warn #: ../plugins/alirc/alirc.c:375 ../plugins/mpeg/mpeg.c:3026 #: ../plugins/screenshot/screenshot.c:1778 #, c-format msgid "Check error: \"%s\" in plugin %s has hash 0x%x vs. 0x%x" msgstr "Chyba: \"%s\" v pluginu %s má kód 0x%x oproti. 0x%x" #: ../plugins/deinterlace/DI_GreedyH/DI_GreedyH.c:240 msgid "Max Comb" msgstr "Maximální Comb" #: ../plugins/deinterlace/DI_GreedyH/DI_GreedyH.c:246 msgid "Motion Threshold" msgstr "Práh pohybu" #: ../plugins/deinterlace/DI_GreedyH/DI_GreedyH.c:252 msgid "Motion Sense" msgstr "Citlivost pohybu" #: ../plugins/deinterlace/DI_GreedyH/DI_GreedyH.c:258 msgid "Good PullDown Lvl" msgstr "Dobrá úroveň Pulldownu" #: ../plugins/deinterlace/DI_GreedyH/DI_GreedyH.c:264 msgid "Bad PullDown Lvl" msgstr "Špatná úroveň Pulldownu" #: ../plugins/deinterlace/DI_GreedyH/DI_GreedyH.c:270 #: ../plugins/deinterlace/DI_GreedyH/DI_GreedyH.c:318 msgid "H. Sharpness" msgstr "Horizontální citlivost" #: ../plugins/deinterlace/DI_GreedyH/DI_GreedyH.c:276 #: ../plugins/deinterlace/DI_GreedyH/DI_GreedyH.c:312 msgid "V. Sharpness" msgstr "Vertikální citlivost" #: ../plugins/deinterlace/DI_GreedyH/DI_GreedyH.c:282 #: ../plugins/deinterlace/DI_GreedyH/DI_GreedyH.c:306 msgid "Median Filter" msgstr "Medián filtr" #: ../plugins/deinterlace/DI_GreedyH/DI_GreedyH.c:288 msgid "High Comb Skip" msgstr "Přeskoč velký Comb" #: ../plugins/deinterlace/DI_GreedyH/DI_GreedyH.c:294 msgid "Auto Pull-Down" msgstr "Autom. Pulldown" #: ../plugins/deinterlace/DI_GreedyH/DI_GreedyH.c:300 msgid "In-Between Frames" msgstr "Mezi snímky" #. size of this struct #. curr version compiled #: ../plugins/deinterlace/DI_GreedyH/DI_GreedyH.c:336 msgid "Video (Greedy, High Motion)" msgstr "Video (Greedy, velký pohyb)" #: ../plugins/deinterlace/DI_Misc/DI_Bob.c:150 msgid "Simple Bob" msgstr "Jednoduchý Bob" #: ../plugins/deinterlace/DI_Misc/DI_EvenOnly.c:123 msgid "Even Scanlines Only" msgstr "Pouze stejné scan řádky" #: ../plugins/deinterlace/DI_Misc/DI_Greedy2Frame.c:258 msgid "Greedy 2 Frame Luma Threshold" msgstr "Greedy 2 frame práh světla" #: ../plugins/deinterlace/DI_Misc/DI_Greedy2Frame.c:270 msgid "Greedy 2 Frame" msgstr "Greedy 2 frame" #: ../plugins/deinterlace/DI_Misc/DI_Greedy.c:235 msgid "Greedy Max Comb" msgstr "Greedy maxímální Comb" #: ../plugins/deinterlace/DI_Misc/DI_Greedy.c:246 msgid "Video (Greedy, Low Motion)" msgstr "Video (Greedy, malý pohyb)" #: ../plugins/deinterlace/DI_Misc/DI_MoComp2.c:351 msgid "Video (MoComp2)" msgstr "Video (MoComp2)" #: ../plugins/deinterlace/DI_Misc/DI_OddOnly.c:125 msgid "Odd Scanlines Only" msgstr "Pouze zvláštní scan řádky" #: ../plugins/deinterlace/DI_Misc/DI_ScalerBob.c:117 msgid "Scaler Bob" msgstr "Scaler Bob" #: ../plugins/deinterlace/DI_Misc/DI_TomsMoComp.c:955 msgid "Search Effort" msgstr "Snaha hledat" #: ../plugins/deinterlace/DI_Misc/DI_TomsMoComp.c:961 msgid "Use Strange Bob" msgstr "Použij zvlástní Bob" #: ../plugins/deinterlace/DI_Misc/DI_TomsMoComp.c:972 msgid "Video (TomsMoComp)" msgstr "Video (TomsMoComp)" #: ../plugins/deinterlace/DI_Misc/DI_TwoFrame.c:317 msgid "2 Frame Spatial Tolerance" msgstr "2 frame prostorová tolerance" #: ../plugins/deinterlace/DI_Misc/DI_TwoFrame.c:323 msgid "2 Frame Temporal Tolerance" msgstr "2 frame běžná tolerance" #: ../plugins/deinterlace/DI_Misc/DI_TwoFrame.c:334 msgid "Video Deinterlace (2-Frame)" msgstr "Video Deinterlace (2 frame)" #: ../plugins/deinterlace/DI_Misc/DI_VideoBob.c:237 msgid "Weave Edge Detect" msgstr "Detekce plovoucích hran" #: ../plugins/deinterlace/DI_Misc/DI_VideoBob.c:243 msgid "Weave Jaggie Threshold" msgstr "Práh plovoucích roztřesení" #: ../plugins/deinterlace/DI_Misc/DI_VideoBob.c:254 msgid "Video Deinterlace (Bob)" msgstr "Video Deinterlace (Bob)" #: ../plugins/deinterlace/DI_Misc/DI_VideoWeave.c:270 msgid "Temporal Tolerance" msgstr "Běžná tolerance" #: ../plugins/deinterlace/DI_Misc/DI_VideoWeave.c:276 msgid "Spatial Tolerance" msgstr "Prostorová tolerance" #: ../plugins/deinterlace/DI_Misc/DI_VideoWeave.c:282 msgid "Similarity Threshold" msgstr "Práh podobnosti" #: ../plugins/deinterlace/DI_Misc/DI_VideoWeave.c:293 msgid "Video Deinterlace (Weave)" msgstr "Video Deinterlace (Plovoucí)" #: ../plugins/deinterlace/DI_Misc/DI_Weave.c:155 msgid "Simple Weave" msgstr "Prosté plovoucí" #: ../plugins/deinterlace/main.c:352 msgid "Could not start deinterlace plugin" msgstr "Nemohu spustit deinterlace plugin" #: ../plugins/deinterlace/main.c:353 #, c-format msgid "Could not switch to capture format YUYV %u x %u." msgstr "Nemohu přepnout do formátu zobrazení YUYV %u × %u." #: ../plugins/deinterlace/main.c:447 msgid "Deinterlace" msgstr "Deinterlace" #: ../plugins/deinterlace/main.c:454 ../plugins/mpeg/mpeg.c:2336 #: ../plugins/mpeg/mpeg.c:2956 ../plugins/screenshot/screenshot.c:522 #: ../plugins/screenshot/screenshot.c:1525 ../plugins/subtitle/main.c:55 #: ../plugins/teletext/main.c:212 msgid "Plugins" msgstr "Pluginy" #: ../plugins/deinterlace/main.c:523 msgid "Deinterlace plugin" msgstr "Deinterlace plugin" #: ../plugins/deinterlace/preferences.c:48 ../src/plugin_properties.c:120 msgid "Low" msgstr "Nízké" #: ../plugins/deinterlace/preferences.c:49 msgid "Medium" msgstr "Střední" #: ../plugins/deinterlace/preferences.c:50 ../src/plugin_properties.c:128 msgid "High" msgstr "Vysoké" #: ../plugins/deinterlace/preferences.c:287 msgid "_Resolution:" msgstr "_Rozlišení:" # src/frequencies.c:827 #. TRANSLATORS: Relative display duration of the first and #. second field in deinterlace mode. #: ../plugins/deinterlace/preferences.c:296 msgid "_Field Balance:" msgstr "_Vyvážení položek:" #: ../plugins/deinterlace/preferences.c:708 ../src/eggcellrendererkeys.c:222 msgid "Disabled" msgstr "Vypnuty" #: ../plugins/mpeg/mpeg.c:846 #, c-format msgid "Format %s is incomplete, please configure the video or audio codec." msgstr "Formát %s není kompletní, prosím nastavte video nebo audio kodek." #: ../plugins/mpeg/mpeg.c:1156 #, c-format msgid "Cannot create file %s: %s\n" msgstr "Nemohu vytvořit soubori %s: %s\n" #: ../plugins/mpeg/mpeg.c:1726 ../plugins/mpeg/options.c:407 #: ../plugins/teletext/export.c:128 msgid "Options" msgstr "Volby" #: ../plugins/mpeg/mpeg.c:2150 msgid "New format" msgstr "Nový formát" #: ../plugins/mpeg/mpeg.c:2151 msgid "Format name:" msgstr "Jméno formátu" #: ../plugins/mpeg/mpeg.c:2336 ../plugins/mpeg/mpeg.c:2809 #: ../plugins/mpeg/mpeg.c:2837 ../plugins/mpeg/mpeg.c:2945 #: ../plugins/mpeg/mpeg_properties.glade2.h:7 msgid "Record" msgstr "Záznam" #: ../plugins/mpeg/mpeg.c:2625 msgid "Not implemented yet" msgstr "Dosud není implementováno" #: ../plugins/mpeg/mpeg.c:2802 msgid "Record a video stream" msgstr "Záznam video streamu" #: ../plugins/mpeg/mpeg.c:2887 msgid "Audio/Video Recorder" msgstr "Audio/Video rekordér" #: ../plugins/mpeg/mpeg.c:2890 msgid "This plugin records video and audio into a file" msgstr "Tento plugin nahrává video a audio do souboru" #: ../plugins/mpeg/mpeg.c:2893 msgid "Record video and audio." msgstr "Nahrává obraz a zvuk." #: ../plugins/mpeg/mpeg_properties.glade2.h:1 msgid "-" msgstr "-" #: ../plugins/mpeg/mpeg_properties.glade2.h:2 msgid "Capture _height:" msgstr "Výška _obrazu:" #: ../plugins/mpeg/mpeg_properties.glade2.h:3 msgid "Capture _width:" msgstr "Šíř_ka obrazu:" #: ../plugins/mpeg/mpeg_properties.glade2.h:4 msgid "Co_dec:" msgstr "Ko_dek:" #: ../plugins/mpeg/mpeg_properties.glade2.h:5 #: ../plugins/screenshot/screenshot.glade2.h:3 msgid "Destination file" msgstr "Cílový soubor" #: ../plugins/mpeg/mpeg_properties.glade2.h:6 msgid "Fil_e format" msgstr "_Formát souboru" #: ../plugins/mpeg/mpeg_properties.glade2.h:8 msgid "Record _all subtitles" msgstr "Nahraj všechny titulky" #: ../plugins/mpeg/mpeg_properties.glade2.h:9 msgid "Record this channel or _page:" msgstr "Nahraj t_ento kanál nebo stránku:" #: ../plugins/mpeg/mpeg_properties.glade2.h:10 msgid "Save _as:" msgstr "Ulož _jako:" #: ../plugins/mpeg/mpeg_properties.glade2.h:11 msgid "_Audio" msgstr "_Audio" #: ../plugins/mpeg/mpeg_properties.glade2.h:12 msgid "_Caption and Subtitles" msgstr "_Nadpis a titulky" #: ../plugins/mpeg/mpeg_properties.glade2.h:13 msgid "_Codec:" msgstr "_Kodek:" #: ../plugins/mpeg/mpeg_properties.glade2.h:14 msgid "_Configure..." msgstr "_Konfiguruj..." #: ../plugins/mpeg/mpeg_properties.glade2.h:15 msgid "_Delete" msgstr "_Smaž" #: ../plugins/mpeg/mpeg_properties.glade2.h:16 msgid "_Embedded in the video file:" msgstr "_Vložený ve video souboru:" #: ../plugins/mpeg/mpeg_properties.glade2.h:17 #: ../plugins/screenshot/screenshot.glade2.h:13 msgid "_Format:" msgstr "_Formát:" #: ../plugins/mpeg/mpeg_properties.glade2.h:18 msgid "_New" msgstr "_Nový" #: ../plugins/mpeg/mpeg_properties.glade2.h:19 msgid "_No caption or subtitle recording" msgstr "_Nenahrávej nadpis ani titulky" #: ../plugins/mpeg/mpeg_properties.glade2.h:20 msgid "_Pause" msgstr "_Pauza" #: ../plugins/mpeg/mpeg_properties.glade2.h:21 msgid "_Record" msgstr "_Nahrávej" #: ../plugins/mpeg/mpeg_properties.glade2.h:22 msgid "_Record the displayed caption or subtitles" msgstr "Nahraj _zobrazený nadpis nebo titulky" #: ../plugins/mpeg/mpeg_properties.glade2.h:23 msgid "_Stop" msgstr "_Stop" #: ../plugins/mpeg/mpeg_properties.glade2.h:24 msgid "_Subtitle file:" msgstr "_soubor titulků:" #: ../plugins/mpeg/mpeg_properties.glade2.h:25 msgid "_Superimposed onto the picture" msgstr "_Překrýt na obraz" #: ../plugins/mpeg/mpeg_properties.glade2.h:26 msgid "_Update live caption at line breaks" msgstr "_Aktualizuj pohyblivý nadpis na koncích řádků" # src/v4l2interface.c:344 #: ../plugins/mpeg/mpeg_properties.glade2.h:27 ../src/zapping.c:500 msgid "_Video" msgstr "_Video" #: ../plugins/mpeg/options.c:741 msgid "No codec" msgstr "Kodek nenalezen" #: ../plugins/screenshot/screenshot.c:45 msgid "Screenshot saver" msgstr "Uložit screenshoty" #: ../plugins/screenshot/screenshot.c:47 msgid "" "With this plugin you can take screen shots of the program you are watching " "and save them in various formats." msgstr "" "Pomocí tohoto pluginu můžete sejmnout screenshot kanálu který právě " "sledujete a uložit v různých formátech." #: ../plugins/screenshot/screenshot.c:50 msgid "This plugin takes screenshots of the video capture." msgstr "Tento plugin sejme screenshot oblasti videa." #: ../plugins/screenshot/screenshot.c:517 #: ../plugins/screenshot/screenshot.c:542 #: ../plugins/screenshot/screenshot.c:1525 msgid "Screenshot" msgstr "Screenshot" #: ../plugins/screenshot/screenshot.c:547 msgid "Take a screenshot" msgstr "Sejme screenshot" #: ../plugins/screenshot/screenshot.c:684 #: ../plugins/screenshot/screenshot.c:842 msgid "Error while writing screenshot\n" msgstr "Chyba při zápisu screenshotu\n" #: ../plugins/screenshot/screenshot.c:892 msgid "Saving..." msgstr "Ukládání..." # src/tveng.c:70 #: ../plugins/screenshot/screenshot.c:919 #, c-format msgid "" "Sorry, but I cannot write %s\n" "%s" msgstr "" "Promiňte, nemohu zapsat %s\n" "%s" #: ../plugins/screenshot/screenshot.c:953 msgid "Sorry, not enough resources to create a new thread" msgstr "Promiňte, není dostatek prostředků pro vytvoření nového vlákna" #: ../plugins/screenshot/screenshot.c:958 msgid "There are too many threads" msgstr "Příliž mnoho vláken" #: ../plugins/screenshot/screenshot.c:1147 #, c-format msgid "appx %u KB" msgstr "asi %u KB" #: ../plugins/screenshot/screenshot.c:1150 #, c-format msgid "appx %.2f MB" msgstr "asi. %.2f MB" #: ../plugins/screenshot/screenshot.c:1225 #: ../plugins/screenshot/screenshot.c:1369 msgid "This format has no quality option" msgstr "Tento formát nemá volbu kvality" #: ../plugins/screenshot/screenshot.c:1405 msgid "Only useful with full size, unscaled picture (480 or 576 lines)" msgstr "" "Použitelné pouze pro plnou velikost - nezvětšený obraz (480 nebo 576 řádků)" #: ../plugins/screenshot/screenshot.glade2.h:1 msgid "Backward" msgstr "Zpět" #: ../plugins/screenshot/screenshot.glade2.h:2 msgid "Command to execute after the image has been saved" msgstr "Příkaz k provedení po uložení obrázku" #: ../plugins/screenshot/screenshot.glade2.h:4 msgid "Forward" msgstr "Vpřed" #: ../plugins/screenshot/screenshot.glade2.h:5 msgid "Grab full size image" msgstr "Sejmi obrázek v plné velikosti" #: ../plugins/screenshot/screenshot.glade2.h:6 msgid "Off" msgstr "Vypnout" #: ../plugins/screenshot/screenshot.glade2.h:7 msgid "Preview" msgstr "Náhled" #: ../plugins/screenshot/screenshot.glade2.h:8 ../plugins/teletext/view.c:2767 msgid "S_ubtitles" msgstr "_Titulky" #: ../plugins/screenshot/screenshot.glade2.h:9 msgid "Save Screenshot" msgstr "Ulož screenshot" #: ../plugins/screenshot/screenshot.glade2.h:10 msgid "_Add toolbar button" msgstr "_Přidej tlačítko do toolbaru" #: ../plugins/screenshot/screenshot.glade2.h:11 msgid "_Completion command:" msgstr "_Příkaz pro dokončení:" #: ../plugins/screenshot/screenshot.glade2.h:12 msgid "_Deinterlace:" msgstr "_Deinterlace:" #: ../plugins/screenshot/screenshot.glade2.h:14 msgid "_Grab on clicking OK" msgstr "_Sejmi při stisknutí OK" #: ../plugins/screenshot/screenshot.glade2.h:15 msgid "_Quality:" msgstr "_Kvalita:" #: ../plugins/screenshot/screenshot.glade2.h:16 msgid "_Save as:" msgstr "_Ulož jako:" #: ../plugins/screenshot/screenshot.glade2.h:17 msgid "_Skip" msgstr "_Přeskočit" #: ../plugins/screenshot/screenshot.glade2.h:18 msgid "pictures before grabbing" msgstr "obrázků před sejmutím" #: ../plugins/subtitle/main.c:47 ../src/main.c:199 msgid "Subtitles" msgstr "Titulky" #: ../plugins/subtitle/main.c:89 msgid "Subtitle plugin" msgstr "Plugin titulků" #: ../plugins/subtitle/preferences.c:55 ../plugins/teletext/preferences.c:57 msgid "Western and Central Europe" msgstr "Západo a středo evropské" # src/frequencies.c:821 #: ../plugins/subtitle/preferences.c:56 ../plugins/teletext/preferences.c:58 msgid "Eastern Europe" msgstr "Východo evropské" #: ../plugins/subtitle/preferences.c:57 ../plugins/teletext/preferences.c:59 msgid "Western Europe and Turkey" msgstr "Západo evropské a Turecké" #: ../plugins/subtitle/preferences.c:58 ../plugins/teletext/preferences.c:60 msgid "Central and Southeast Europe" msgstr "Středo a jihovýchodo evropské" #: ../plugins/subtitle/preferences.c:59 ../plugins/teletext/preferences.c:61 msgid "Cyrillic" msgstr "Cirilice" #: ../plugins/subtitle/preferences.c:60 ../plugins/teletext/preferences.c:62 msgid "Greek and Turkish" msgstr "Řecké a Turecké" #: ../plugins/subtitle/preferences.c:61 ../plugins/teletext/preferences.c:63 msgid "Arabic" msgstr "Arabské" #: ../plugins/subtitle/preferences.c:62 ../plugins/teletext/preferences.c:64 msgid "Hebrew and Arabic" msgstr "Hebrejské a arabské" #: ../plugins/subtitle/preferences.c:77 ../plugins/teletext/preferences.c:97 msgid "Nearest (fast, low quality)" msgstr "Blízké (rychlé, nízká kvalita)" #: ../plugins/subtitle/preferences.c:78 ../plugins/teletext/preferences.c:98 msgid "Tiles" msgstr "Dlaždice" #: ../plugins/subtitle/preferences.c:79 ../plugins/teletext/preferences.c:99 msgid "Bilinear" msgstr "Bilinearní" #: ../plugins/subtitle/preferences.c:80 ../plugins/teletext/preferences.c:100 msgid "Hyper (slow, high quality)" msgstr " Hyper (pomalé, vysoká kvalita)" #: ../plugins/subtitle/preferences.c:345 msgid "<b>Teletext</b>" msgstr "<b>Teletext</b>" #: ../plugins/subtitle/preferences.c:347 ../plugins/teletext/preferences.c:303 msgid "_Default encoding:" msgstr "_Standartní kódování:" #: ../plugins/subtitle/preferences.c:351 msgid "" "Some stations fail to transmit a complete language identifier, so the " "Subtitle viewer may not display the correct font or national characters. You " "can select your geographical region here as an additional hint." msgstr "" "Některé stanice selhávají při přenosu kompletního jazykového identifikátoru, " "prohlížeč titulků nemusí zobrazit správné písmo nebo znaky s diakritikou. " "Zde můžetevybrat geografickou oblast jako pomocnou informaci." #: ../plugins/subtitle/preferences.c:358 msgid "_Show double height characters" msgstr "_Zobraz znaky ve dvojité výšce" #. TRANSLATORS: #. Closed Caption is a captioning system used mainly in the USA, #. and on VHS/LD/DVD in other countries. Europe uses Teletext for #. caption and subtitle transmissions. #: ../plugins/subtitle/preferences.c:365 msgid "<b>Closed Caption</b>" msgstr "<b>Uzavřený nadpis</b>" #: ../plugins/subtitle/preferences.c:367 msgid "_Foreground:" msgstr "_Barva písma:" #: ../plugins/subtitle/preferences.c:369 msgid "Closed Caption foreground color" msgstr "Barva písma uzavřeného nadpisu" #: ../plugins/subtitle/preferences.c:372 msgid "_Background:" msgstr "_Pozadí:" #: ../plugins/subtitle/preferences.c:374 msgid "Closed Caption background color" msgstr "Barva pozadí uzavřeného nadpisu" #: ../plugins/subtitle/preferences.c:383 msgid "_Roll live caption" msgstr "_Rolující nadpis" #: ../plugins/subtitle/preferences.c:386 ../plugins/teletext/preferences.c:368 msgid "<b>Display</b>" msgstr "<b>Zobrazení</b>" #: ../plugins/subtitle/preferences.c:388 ../plugins/teletext/preferences.c:370 msgid "_Brightness:" msgstr "_Jas:" # src/interface.c:247 #: ../plugins/subtitle/preferences.c:410 ../plugins/teletext/preferences.c:392 msgid "_Contrast:" msgstr "_Kontrast:" #: ../plugins/subtitle/preferences.c:432 ../plugins/teletext/preferences.c:414 msgid "S_caling:" msgstr "_Zvětšení:" #: ../plugins/subtitle/preferences.c:436 ../plugins/teletext/preferences.c:418 msgid "Quality/speed trade-off when scaling and anti-aliasing the page." msgstr "Záměna kvalita/rychlost při zvětšení a vyhlazování stránky." #: ../plugins/subtitle/view.c:1660 ../src/subtitle.c:321 msgid "_Disable" msgstr "_Vypnuto" #: ../plugins/subtitle/view.c:1662 msgid "_Reset position" msgstr "_Obnovení umístění" #: ../plugins/subtitle/view.c:1664 ../plugins/teletext/window.c:810 msgid "_Encoding" msgstr "_Kódování" #: ../plugins/teletext/bookmark.c:283 #, c-format msgid "Added page %x.%02x to bookmarks" msgstr "Přidání stránky %x.%02x do záložek" #: ../plugins/teletext/bookmark.c:287 #, c-format msgid "Added page %x to bookmarks" msgstr "Přidání stránky %x do záložek" #: ../plugins/teletext/bookmark.c:348 msgid "_Add Bookmark" msgstr "_Přidání záložky" #: ../plugins/teletext/bookmark.c:354 msgid "_Edit Bookmarks..." msgstr "Editace _záložek..." #: ../plugins/teletext/bookmark.c:595 msgid "Bookmarks" msgstr "Záložky" # src/interface.c:362 #: ../plugins/teletext/bookmark.c:634 msgid "Channel" msgstr "Kanál" #: ../plugins/teletext/bookmark.c:640 msgid "Page" msgstr "Stránka" #: ../plugins/teletext/bookmark.c:645 msgid "Description" msgstr "Popis" #: ../plugins/teletext/export.c:168 ../plugins/teletext/export.c:194 msgid "Could not save page" msgstr "Nemohu uložit stránku" #: ../plugins/teletext/export.c:239 msgid "Save as" msgstr "Uložit jako" #: ../plugins/teletext/export.c:257 msgid "Format:" msgstr "Formát:" #: ../plugins/teletext/main.c:176 msgid "_Preferences" msgstr "_Nastavení" #: ../plugins/teletext/main.c:178 msgid "_Colors" msgstr "_Barvy" #: ../plugins/teletext/main.c:204 ../src/main.c:198 msgid "Teletext" msgstr "Teletext" #: ../plugins/teletext/main.c:277 msgid "Teletext plugin" msgstr "Plugin teletextu" #: ../plugins/teletext/preferences.c:79 msgid "Level 1" msgstr "Úroveň 1" #: ../plugins/teletext/preferences.c:80 msgid "Level 1.5 (additional national characters)" msgstr "Úroveň 1.5 (další národní znaky)" #: ../plugins/teletext/preferences.c:81 msgid "Level 2.5 (more colors, font styles and graphics)" msgstr "Úroveň 2.5 (více barev, stylů písma a grafiky)" #: ../plugins/teletext/preferences.c:82 msgid "Level 3.5 (proportional spacing, multicolor graphics)" msgstr "Úroveň 3.5 (proporciální mezery, vícebarevná grafika)" #: ../plugins/teletext/preferences.c:295 msgid "<b>General</b>" msgstr "<b>Obecné</b>" #: ../plugins/teletext/preferences.c:297 msgid "_Teletext implementation:" msgstr "_Implementace teletextu:" #: ../plugins/teletext/preferences.c:307 msgid "" "Some stations fail to transmit a complete language identifier, so the " "Teletext viewer may not display the correct font or national characters. You " "can select your geographical region here as an additional hint." msgstr "" "Některé stanice selhávají při přenosu kompletního jazykového identifikátoru, " "prohlížeč titulků nemusí zobrazit správné písmo nebo znaky s diakritikou. " "Zde můžetevybrat geografickou oblast jako pomocnou informaci." #: ../plugins/teletext/preferences.c:313 msgid "<b>Page memory</b>" msgstr "<b>Paměť stránek</b>" #: ../plugins/teletext/preferences.c:315 msgid "_Size:" msgstr "_Velikost:" #. expand #. fill #. pad #. TRANSLATORS: Kilobyte (2^10) #: ../plugins/teletext/preferences.c:341 msgid "KiB" msgstr "KiB" # src/interface.c:362 #: ../plugins/teletext/preferences.c:348 msgid "_Channels:" msgstr "_Kanály:" #: ../plugins/teletext/search.c:131 ../plugins/teletext/search.c:349 msgid "Search text:" msgstr "Hledej text:" #: ../plugins/teletext/search.c:153 #, c-format msgid "Found text on page %x.%02x:" msgstr "Text nalezen na stránce %x.%02x:" #: ../plugins/teletext/search.c:160 msgid "Not found:" msgstr "Nenalezeno:" #: ../plugins/teletext/search.c:171 msgid "Page memory is empty" msgstr "Paměť stránek je prázdná" #: ../plugins/teletext/search.c:342 ../plugins/teletext/view.c:3260 msgid "Search page memory" msgstr "Hledej stránku v paměti" #: ../plugins/teletext/search.c:358 msgid "_Regular expression" msgstr "_Regulární výraz" #: ../plugins/teletext/search.c:363 msgid "Search case _insensitive" msgstr "Hledej - nerozlišuj velikost" # src/v4l2interface.c:146 #. Future stuff. #: ../plugins/teletext/search.c:369 msgid "_All channels" msgstr "_Všechny kanály" #: ../plugins/teletext/toolbar.c:122 msgid "Next page" msgstr "Další stránka" #: ../plugins/teletext/toolbar.c:125 msgid "Previous page" msgstr "Předchozí stránka" #: ../plugins/teletext/toolbar.c:128 msgid "Previous subpage" msgstr "Předchozí podstránka" #: ../plugins/teletext/toolbar.c:131 msgid "Next subpage" msgstr "Další podstránka" #: ../plugins/teletext/toolbar.c:188 msgid "Open new Teletext window" msgstr "Otevři nové okno teletextu" #: ../plugins/teletext/toolbar.c:210 msgid "Hold the current subpage" msgstr "Podržet aktuální podstránku" #: ../plugins/teletext/toolbar.c:240 msgid "Reveal" msgstr "Odkrýt" #: ../plugins/teletext/toolbar.c:241 msgid "Reveal concealed text" msgstr "Odkrýt skrytý text" #: ../plugins/teletext/view.c:846 #, c-format msgid " Page %x" msgstr " Stránka %x" #: ../plugins/teletext/view.c:850 #, c-format msgid " Subpage %x" msgstr " Podstránka %x" #: ../plugins/teletext/view.c:1459 #, c-format msgid "Loading page %X..." msgstr "Nahrávám stránku %X..." #: ../plugins/teletext/view.c:1461 #, c-format msgid "Loading page %X.%02X..." msgstr "Nahrávám stránku %X.%02X..." #: ../plugins/teletext/view.c:2372 msgid "Selection copied to clipboard" msgstr "Výběr zkopírován do schránky" #: ../plugins/teletext/view.c:2454 msgid "No page loaded" msgstr "Nenahrána žádná stránka" #: ../plugins/teletext/view.c:2467 msgid "Selecting - press Shift key for table mode" msgstr "Výběr - stiskněte klávesu Shift pro režim tabulky" #: ../plugins/teletext/view.c:2627 msgid "Subtitle index" msgstr "Obsah titulků" #: ../plugins/teletext/view.c:2634 msgid "Now and Next" msgstr "Nyní a příště" #: ../plugins/teletext/view.c:2640 msgid "Current program" msgstr "Aktuální program" #: ../plugins/teletext/view.c:2646 msgid "Program Index" msgstr "Obsah programu" #: ../plugins/teletext/view.c:2652 msgid "Program Schedule" msgstr "Plánování programu" #. TRANSLATORS: Schedule changes and the like. #: ../plugins/teletext/view.c:2660 msgid "Program Warning" msgstr "Varování programu" #: ../plugins/teletext/view.c:2721 msgid "_Open" msgstr "_Otevřít" #: ../plugins/teletext/view.c:2727 msgid "Open in _New Window" msgstr "Otevřít v _novém okně" #: ../plugins/teletext/view.c:2738 msgid "_Open Link" msgstr "_Otevři odkaz" #: ../plugins/teletext/view.c:2749 ../plugins/teletext/window.c:805 msgid "_New Window" msgstr "_Nové okno" #: ../plugins/teletext/view.c:2755 msgid "_Save as..." msgstr "_Ulož jako..." #: ../plugins/teletext/view.c:2761 msgid "S_earch..." msgstr "_Hledej..." #: ../plugins/teletext/view.c:2773 ../plugins/teletext/window.c:812 #: ../src/zapping.c:497 msgid "_Bookmarks" msgstr "_Záložky" #: ../plugins/teletext/view.c:3252 msgid "_Go" msgstr "_Přejít" #: ../plugins/teletext/view.c:3254 msgid "Previous page in history" msgstr "Předchozí stránka v historii" #: ../plugins/teletext/view.c:3256 msgid "Next page in history" msgstr "Další stránka v historii" #: ../plugins/teletext/view.c:3257 msgid "Index" msgstr "Obsah" #: ../plugins/teletext/view.c:3258 msgid "Go to the index page" msgstr "Přejít na stránku obsahu" #: ../plugins/teletext/view.c:3262 msgid "Save this page to a file" msgstr "Ulož tuto stránku do souboru" #. TRANSLATORS: Choose from the Teletext page cache the currently #. received channel. #: ../plugins/teletext/window.c:317 msgid "_Received" msgstr "_Přijaté" # Unbenannt #: ../plugins/teletext/window.c:349 ../src/v4linterface.c:1317 #: ../src/v4linterface.c:2520 msgid "Unnamed" msgstr "Beze jména" #: ../plugins/teletext/window.c:571 ../src/zvbi.c:221 msgid " (Latin)" msgstr " (Latin)" #: ../plugins/teletext/window.c:573 ../src/zvbi.c:223 msgid " (Cyrillic)" msgstr " (Kyrilice)" #: ../plugins/teletext/window.c:616 ../src/zvbi.c:238 msgid "_Automatic" msgstr "_Automatické" #: ../plugins/teletext/window.c:804 ../src/zapping.c:428 msgid "_File" msgstr "_Soubor" #: ../plugins/teletext/window.c:808 ../src/zapping.c:436 msgid "_Edit" msgstr "_Editace" # src/v4l2interface.c:344 #: ../plugins/teletext/window.c:809 ../src/zapping.c:443 msgid "_View" msgstr "_Zobrazení" # src/interface.c:362 #. 2.6 GTK_STOCK_EDIT #: ../plugins/teletext/window.c:811 ../src/zapping.c:441 ../src/zapping.c:454 msgid "_Channels" msgstr "_Kanály" #: ../plugins/teletext/window.c:871 ../src/zapping.c:476 msgid "_Toolbar" msgstr "_Toolbar" #: ../plugins/teletext/window.c:873 msgid "_Statusbar" msgstr "_Stavový řádek" #. TRANSLATORS: Soundcard mixer line. #: ../src/audio.c:807 msgid "Input:" msgstr "Vstup:" #: ../src/audio.c:840 ../src/keyboard.c:1154 ../src/osd.c:1080 #: ../src/properties.c:991 ../src/properties-handler.c:1353 msgid "General Options" msgstr "Obecné nastavení" #: ../src/audio.c:939 msgid "<span foreground=\"blue\">Audio off</span>" msgstr "<span foreground=\"blue\">Ztlumit zvuk</span>" #: ../src/audio.c:940 msgid "<span foreground=\"yellow\">Audio on</span>" msgstr "<span foreground=\"yellow\">Zapnout zvuk</span>" #: ../src/capture.c:866 msgid "Cannot stop capturing while recording." msgstr "Nemohu zastavit přehrávání dokud nahrávám." #: ../src/capture.c:1052 #, c-format msgid "Cannot start capturing: %s" msgstr "Nemohu spustit přehrávání: %s" #: ../src/channel_editor.c:592 #, c-format msgid "Channel: %s Found: %u" msgstr "Kanál: %s Nalezen: %u" #: ../src/channel_editor.c:715 msgid "Searching..." msgstr "Hledání..." # src/interface.c:336 #: ../src/channel_editor.c:1452 msgid "Select the frequency table used in your country" msgstr "Vyberte frekvenční tabulku používanou ve vaší zemi" #: ../src/channel_editor.c:1596 msgid "Ch. Name" msgstr "Jméno kanálu" # src/interface.c:369 # glade/glade_strings.c:149, glade/glade_strings.c:155 #: ../src/channel_editor.c:1601 msgid "Freq (MHz)" msgstr "Frekvence. (MHz)" # src/interface.c:405 #. append #: ../src/channel_editor.c:1654 msgid "Channel name" msgstr "Jméno kanálu" #. append #: ../src/channel_editor.c:1658 msgid "Video input" msgstr "Video vstup" # src/interface.c:362 #. append #: ../src/channel_editor.c:1662 msgid "RF Channel" msgstr "RF Kanál" # src/v4l2interface.c:344 #. append #: ../src/channel_editor.c:1666 msgid "Video standard" msgstr "Videostandard" #. append #: ../src/channel_editor.c:1670 ../src/keyboard.c:444 msgid "Accelerator" msgstr "Akcelerátor" #: ../src/channel_editor.c:1685 msgid "Do not change input" msgstr "Nelze změnit vstup" #: ../src/channel_editor.c:1709 msgid "Do not change standard" msgstr "Nelze změnit standard" # src/interface.c:362 #: ../src/channel_editor.c:1748 msgid "Channel editor" msgstr "Editor kanálů" #: ../src/channel_editor.c:1772 msgid "Region" msgstr "Oblast" #: ../src/channel_editor.c:1808 msgid "Automatic station _search" msgstr "_Automatické hledání stanic" #: ../src/channel_editor.c:1814 msgid "" "Select a suitable frequency table, then click here to search through all " "channels in the table and add the received stations to the channel list." msgstr "" "Vyberte vhodnou frekvenční tabulku, poté klikněte zde pro hledaní ve všech " "kanálech tabulky a přidání získaných stanic do seznamu kanálů." # src/v4l2interface.c:146 #: ../src/channel_editor.c:1820 msgid "Add all _channels" msgstr "Přidej všechny _kanály" #: ../src/channel_editor.c:1827 msgid "Add all channels in the frequency table to the channel list." msgstr "Přidej všechny kanály ve frekvenční tabulce do seznamu kanálů." #: ../src/channel_editor.c:1831 msgid "_Import XawTV configuration" msgstr "_Importuj konfiguraci XawTV" # src/interface.c:362 #: ../src/channel_editor.c:1858 msgid "Channel List" msgstr "Seznam kanálů" # src/interface.c:362 #: ../src/channel_editor.c:1893 msgid "Edit channel" msgstr "Edituj kanál" #: ../src/channel_editor.c:1910 msgid "Name:" msgstr "Jméno:" #: ../src/channel_editor.c:1919 msgid "Video input:" msgstr "Video vstup:" #: ../src/channel_editor.c:1930 msgid "Fine tuning:" msgstr "Jemné ladění:" #: ../src/channel_editor.c:1936 msgid "MHz" msgstr "MHz" # src/v4l2interface.c:344 #: ../src/channel_editor.c:1947 msgid "Video standard:" msgstr "Videostandard:" #: ../src/channel_editor.c:1958 msgid "Accelerator:" msgstr "Klávesová zkratka:" #: ../src/eggcellrendererkeys.c:163 ../src/eggcellrendererkeys.c:164 msgid "Accelerator key" msgstr "Klávesa klávesové zkratky" #: ../src/eggcellrendererkeys.c:173 ../src/eggcellrendererkeys.c:174 msgid "Accelerator modifiers" msgstr "Modifikátor klávesové zkratky" #: ../src/eggcellrendererkeys.c:183 msgid "Accelerator Mode" msgstr "Režim klávesové zkratky" #: ../src/eggcellrendererkeys.c:184 msgid "The type of accelerator." msgstr "Typ klávesové zkratky." # extrem gekürzt, wirkt sich auf Fensterbreite aus #: ../src/eggcellrendererkeys.c:333 ../src/eggcellrendererkeys.c:567 msgid "Type a new accelerator, or press Backspace to clear" msgstr "Zadejte nový klávesovou zkratku, nebo stistkněte Backspace pro výmaz" #: ../src/eggcellrendererkeys.c:570 msgid "Type a new accelerator" msgstr "Zadejte nový akcelerátor" #: ../src/frequencies.c:94 ../src/frequencies.c:160 msgid "broadcast" msgstr "vysílání" #: ../src/frequencies.c:107 msgid "cable IRC" msgstr "Kabelové IRC" #: ../src/frequencies.c:126 msgid "cable HRC" msgstr "Kabelové HRC" # src/frequencies.c:817 #: ../src/frequencies.c:144 ../src/frequencies.c:172 msgid "cable" msgstr "Kabelové" #. TRANSLATORS: Leave "Autocom" untranslated. #: ../src/frequencies.c:275 msgid "Autocom cable" msgstr "Autocom Kabelová" #: ../src/keyboard.c:89 ../src/keyboard.c:112 msgid "Ctrl+" msgstr "Ctrl+" #: ../src/keyboard.c:90 ../src/keyboard.c:113 msgid "Alt+" msgstr "Alt+" #: ../src/keyboard.c:91 ../src/keyboard.c:114 msgid "Shift+" msgstr "Shift+" #: ../src/keyboard.c:525 msgid "Key table..." msgstr "Tabulka kláves..." #: ../src/keyboard.c:1106 msgid "Command" msgstr "Příkaz" #: ../src/keyboard.c:1120 ../src/properties-handler.c:801 msgid "Shortcut" msgstr "Zkratka" #: ../src/main.c:197 ../src/tveng1.c:1358 ../src/tveng25.c:566 #: ../src/tvengbktr.c:414 ../src/tveng.c:2340 ../src/tvengxv.c:878 msgid "Mute" msgstr "Ztlum" #. warnings #: ../src/main.c:273 ../src/main.c:308 #, c-format msgid "" "Capture mode couldn't be started:\n" "%s" msgstr "" "Nemohu spustit capture režim:\n" "%s" #: ../src/main.c:291 #, c-format msgid "" "Cannot restore previous mode, will try capture mode:\n" "%s" msgstr "" "Nemohu obnovit předchozí režim, použijte capture režim \n" "%s" #: ../src/main.c:299 #, c-format msgid "" "Capture mode couldn't be started either:\n" "%s" msgstr "" "Nemohu spustit ani capture režim:\n" "%s" #: ../src/main.c:302 #, c-format msgid "" "Cannot restore previous mode:\n" "%s" msgstr "" "Nemohu obnovit předchozí režim:\n" "%s" #: ../src/main.c:376 msgid "Kernel video device" msgstr "Video zařízení jádra" #: ../src/main.c:377 msgid "FILENAME" msgstr "FILENAME" #: ../src/main.c:388 ../src/main.c:406 msgid "XVideo video input port" msgstr "Port video vstupu XVideo" #: ../src/main.c:397 msgid "XVideo image overlay port" msgstr "port ovelay obrazu XVideo" #: ../src/main.c:415 msgid "Disable XVideo video input support" msgstr "Vypnout podporu XVideo video vstupu" #: ../src/main.c:424 msgid "Disable XVideo image overlay support" msgstr "Vypnout podporu overlay obrazu XVideo" #: ../src/main.c:433 msgid "Disable XVideo extension support" msgstr "Vypnoutu podporu XVideo rozšíření" #: ../src/main.c:445 msgid "Disable video overlay" msgstr "Vypnout overlay video" #: ../src/main.c:454 msgid "X display is remote, disable video overlay" msgstr "X server je vzdálený, vypne video overlay" #: ../src/main.c:463 msgid "Disable VBI support" msgstr "Vypnout podporu VBI" #: ../src/main.c:472 msgid "Disable plugins" msgstr "Vypnout pluginy" #. TRANSLATORS: --no-zsfb command line option. #. TRANSLATORS: --yuv-format command line option. #. TRANSLATORS: --tunerless-norm command line option. #: ../src/main.c:486 ../src/main.c:550 ../src/main.c:560 msgid "Obsolete" msgstr "Zastaralé" #: ../src/main.c:504 msgid "Color depth of the X display" msgstr "Barevná hloubka X-serveru" #: ../src/main.c:505 msgid "BPP" msgstr "BPP" #: ../src/main.c:513 msgid "Print debug messages" msgstr "Vypisuj ladicí zprávy" #: ../src/main.c:531 msgid "Force dword alignment of the overlay window" msgstr "Rychlé zarovnání dword overlay okna" #: ../src/main.c:540 msgid "Execute the given command and exit" msgstr "Spusť daný příkaz a ukonči" #: ../src/main.c:541 msgid "CMD" msgstr "CMD" #: ../src/main.c:569 msgid "Override CPU detection" msgstr "Detekováno přetížení procesoru" #: ../src/main.c:658 msgid "Sorry, but there is no module support in GLib" msgstr "Promiňte, ale tento modul není v glib podporován" # src/callbacks.c:320 src/v4l2interface.c:89 #: ../src/main.c:782 msgid "Cannot get device info struct" msgstr "Nemohu získat strukturu informací zařízení" #: ../src/main.c:791 msgid "Zapping couldn't be started" msgstr "Zapping nemohl být spuštěn" #: ../src/main.c:845 #, c-format msgid "Couldn't open %s, try other devices?" msgstr "Nemohu otevřít %s, zkusit jiné zařízení?" #: ../src/main.c:872 #, c-format msgid "%s suceeded, setting it as the new default" msgstr "%s dokončeno, nastavuji jako nové standardní" #: ../src/main.c:882 #, c-format msgid "" "Sorry, but \"%s\" could not be opened:\n" "%s" msgstr "" "Promiňte, ale nemohu otevřít »%s«:\n" "%s" #: ../src/main.c:1242 #, c-format msgid "" "ZConf could not be closed properly , your\n" "configuration will be lost.\n" "Possible causes for this are:\n" " - There is not enough free memory\n" " - You do not have permissions to write to $HOME/.zapping\n" " - libxml is non-functional (?)\n" " - or, more probably, you have found a bug in\n" " %s. Please contact the author.\n" msgstr "" "ZConf nemohl být korektně uzavřen, vaše\n" "konfigurace bude ztracena.\n" "Možná řešení jsou:\n" " - Málo paměti\n" " - Nemáte práva pro zápis do $HOME/.zapping\n" " - Nefunkční libxml (?)\n" " - nebo další, nalezli jste chybu programu\n" " %s. Prosím kontaktujte Autora.\n" #: ../src/main.c:1268 msgid "Sorry, Zapping is unable to create the config tree" msgstr "Promiňte, Zapping nemohl vytvořit konfigurační strom" #: ../src/mixer.c:103 msgid "The soundcard mixer is not configured." msgstr "Mixer zvukové karty není nakonfigurován." #: ../src/osd.c:601 msgid "Please choose a font for OSD in preferences." msgstr "Prosím vyberte písmo pro OSD ve nastavení." #: ../src/osd.c:604 #, c-format msgid "" "The configured font \"%s\" cannot be loaded, please select another one in " "preferences\n" msgstr "" "Nastavené písmo \"%s\" nemohlo být nahráno, prosím vyberte jiné písmo v " "nastavení\n" #: ../src/osd.c:614 msgid "" "No font could be loaded, please make sure\n" "your system is properly configured." msgstr "" "Nemohu nahrát písmo, prosím náležitě nastavte\n" "váš systém." # src/frequencies.c:827 #: ../src/oss.c:186 msgid "Audio device:" msgstr "Audio zařízení:" #: ../src/oss.c:189 msgid "Select the audio device" msgstr "Vyberte audio zařízení" #: ../src/oss.c:216 #, c-format msgid "The given audio device \"%s\" doesn't exist" msgstr "Dané audio zařízení \"%s\" neexistuje" #. TRANSLATORS: Name of mixer line, mono as #. opposed to stereo. #: ../src/oss.c:920 #, c-format msgid "%s (Mono)" msgstr "%s (Mono)" #: ../src/plugin_properties.c:118 msgid "Very low" msgstr "Velmi malá" #: ../src/plugin_properties.c:122 msgid "Lower" msgstr "Malé" #: ../src/plugin_properties.c:124 msgid "Normal" msgstr "Normální" #: ../src/plugin_properties.c:126 msgid "Very high" msgstr "Velmi vysoké" #: ../src/plugin_properties.c:130 msgid "Higher" msgstr "Vyžší" #: ../src/plugin_properties.c:152 msgid "This plugin has no public symbols" msgstr "Tento plugin nemá přístupné symboly" #: ../src/plugin_properties.c:171 msgid "List of symbols exported by the plugin" msgstr "Seznam symbolů exportovaných pluginem" #: ../src/plugin_properties.c:213 msgid "Sorry, the plugin couldn't be started" msgstr "Promiňte, nemohu spustit plugin" #: ../src/plugin_properties.c:273 msgid "Sorry, but no plugins have been loaded" msgstr "Promiňte, nemohu nahrát plugin" #: ../src/plugin_properties.c:308 msgid "Plugin name" msgstr "Jméno pluginu" #: ../src/plugin_properties.c:335 msgid "Symbol" msgstr "Symbol" #: ../src/plugin_properties.c:340 msgid "Hash" msgstr "Hash" #: ../src/plugins.c:190 #, c-format msgid "\"%s\" doesn't provide a version" msgstr "\"%s\" neposkytuje verzi" #: ../src/plugins.c:227 msgid "Insufficient memory" msgstr "Nedostatečná pamět" #: ../src/plugins.c:236 msgid "No description available" msgstr "Není dostupný žádný popis" #. Warn #: ../src/plugins.c:350 #, c-format msgid "" "Check error: \"%s\" in plugin %s was supposed to be \"%s\" but it is:\"%s\". " "Hashes are 0x%x vs. 0x%x" msgstr "" "Chyba kontroly: \"%s\" v pluginu %s očekává \"%s\", ale je: \"%s\". Hashe " "jsou 0x%x vs. 0x%x" #: ../src/properties.c:622 msgid "Zapping Properties" msgstr "Vlastnosti programu" #: ../src/properties-handler.c:86 msgid "Can capture to memory.\n" msgstr "Může snímat do paměti.\n" #: ../src/properties-handler.c:88 msgid "Has some tuner.\n" msgstr "Má alespoň jeden tuner.\n" #: ../src/properties-handler.c:90 msgid "Supports the teletext service.\n" msgstr "Podporuje službu teletextu.\n" #: ../src/properties-handler.c:92 msgid "Can overlay the image.\n" msgstr "Umožňuje overlay obrazu.\n" #: ../src/properties-handler.c:94 msgid "Can chromakey the image.\n" msgstr "Umožňuje tónování obrazu.\n" #: ../src/properties-handler.c:96 msgid "Clipping rectangles are supported.\n" msgstr "Podporuje obdelníkové výseče.\n" #: ../src/properties-handler.c:98 msgid "Framebuffer memory is overwritten.\n" msgstr "Paměť framebufferu je přepisovatelná.\n" #: ../src/properties-handler.c:100 msgid "The capture can be scaled.\n" msgstr "Obraz může měnit velikost.\n" #: ../src/properties-handler.c:102 msgid "Only monochrome is available\n" msgstr "Dostupné pouze černobíle\n" #: ../src/properties-handler.c:104 msgid "The capture can be zoomed\n" msgstr "Obraz může být zvětšován\n" # src/v4l2interface.c:344 #: ../src/properties-handler.c:115 msgid "No available inputs" msgstr "Nedostupné vstupy" #: ../src/properties-handler.c:117 msgid "Your video device has no inputs" msgstr "Vaše video zařízení nemá vstupy" #: ../src/properties-handler.c:132 msgid "TV input" msgstr "TV vstup" #: ../src/properties-handler.c:134 msgid "Camera" msgstr "Kamera" #: ../src/properties-handler.c:413 #, c-format msgid "Resize to %ux%u" msgstr "Změň velikost na %u×%u" #. append #: ../src/properties-handler.c:778 msgid "Width" msgstr "Šiřka" #: ../src/properties-handler.c:778 msgid "Height" msgstr "Výška" #: ../src/properties-handler.c:892 msgid "Text Below Icons" msgstr "Text pod ikonami" #: ../src/properties-handler.c:893 msgid "Priority Text Beside Icons" msgstr "Důležitý text vedle ikon" #: ../src/properties-handler.c:894 msgid "Icons Only" msgstr "Pouze ikony" #: ../src/properties-handler.c:895 msgid "Text Only" msgstr "Pouze text" #: ../src/properties-handler.c:960 #, c-format msgid "Use desktop default (%s)" msgstr "Použít standartně plochu (%s)" #. TRANSLATORS: Fullscreen video mode #: ../src/properties-handler.c:1160 msgid "Do not change" msgstr "Neměnit" #: ../src/properties-handler.c:1164 ../src/tveng.c:4841 msgid "Automatic" msgstr "Automaticky" #. TRANSLATORS: Fullscreen video mode #: ../src/properties-handler.c:1179 #, c-format msgid "%u x %u @ %u Hz" msgstr "%u × %u, %u Hz" #: ../src/properties-handler.c:1344 msgid "Main Window" msgstr "Hlavní okno" #: ../src/subtitle.c:258 #, c-format msgid "Page %x" msgstr "Stránka %x" #: ../src/tveng1.c:1419 msgid "Frame Rate" msgstr "Snímková frekvence" #: ../src/tveng1.c:1434 msgid "Snapshot Mode" msgstr "Režim snímků" #: ../src/tveng1.c:2571 ../src/tveng25.c:1490 #, c-format msgid "Driver %s returned an unknown or invalid frame buffer format." msgstr "" #: ../src/tveng25.c:547 ../src/tvengbktr.c:383 ../src/tvengbktr.c:400 #: ../src/tvengxv.c:872 msgid "Brightness" msgstr "Jas" # src/interface.c:247 #: ../src/tveng25.c:548 ../src/tvengbktr.c:385 ../src/tvengbktr.c:402 #: ../src/tvengxv.c:873 msgid "Contrast" msgstr "Kontrast" #: ../src/tveng25.c:549 ../src/tvengbktr.c:387 ../src/tvengbktr.c:404 #: ../src/tvengxv.c:874 msgid "Saturation" msgstr "Saturace" #: ../src/tveng25.c:550 ../src/tvengbktr.c:393 ../src/tvengbktr.c:412 #: ../src/tvengxv.c:875 msgid "Hue" msgstr "Odstín" #: ../src/tveng25.c:551 msgid "Whiteness" msgstr "Světlost" #: ../src/tveng25.c:552 msgid "Black level" msgstr "Úroveň černé" # src/frequencies.c:827 #: ../src/tveng25.c:553 ../src/tveng25.c:554 msgid "White balance" msgstr "Vyvážení bílé" # src/frequencies.c:827 #: ../src/tveng25.c:555 msgid "Red balance" msgstr "Vyvážení červené" # src/frequencies.c:827 #: ../src/tveng25.c:556 msgid "Blue balance" msgstr "Vyvážení modré" #: ../src/tveng25.c:557 msgid "Gamma" msgstr "Gamma" #: ../src/tveng25.c:558 msgid "Exposure" msgstr "Expozice" #: ../src/tveng25.c:559 msgid "Auto gain" msgstr "Automatické získávání" #: ../src/tveng25.c:560 msgid "Gain" msgstr "Získávání" #: ../src/tveng25.c:561 msgid "HCenter" msgstr "Horizontální centrování" #: ../src/tveng25.c:562 msgid "VCenter" msgstr "Vertikální centrování" #: ../src/tveng25.c:563 msgid "Hor. flipping" msgstr "Horizontální otočení" #: ../src/tveng25.c:564 msgid "Vert. flipping" msgstr "Vertikální otočení" #: ../src/tveng25.c:565 ../src/tveng.c:2327 ../src/tvengxv.c:879 msgid "Volume" msgstr "Hlasitost" #: ../src/tveng25.c:567 msgid "Audio Mute" msgstr "Ztlumení zvuku" # src/frequencies.c:827 #: ../src/tveng25.c:568 msgid "Balance" msgstr "Vyvážení" # src/frequencies.c:827 #: ../src/tveng25.c:569 msgid "Audio Balance" msgstr "Vyvážení zvuku" #: ../src/tveng25.c:570 msgid "Treble" msgstr "Výšky" #: ../src/tveng25.c:571 msgid "Loudness" msgstr "Hlasitost" #: ../src/tveng25.c:572 msgid "Bass" msgstr "Basy" #: ../src/tveng25.c:2745 #, c-format msgid "%s doesn't look like a valid capture device" msgstr "%s nevypadá jako opravdové obrazové zařízení" # src/tveng.c:70 #: ../src/tveng25.c:2764 #, c-format msgid "Sorry, but \"%s\" cannot do streaming" msgstr "Promiňte, ale \"%s\" nemůže streamovat" #: ../src/tvengbktr.c:390 msgid "U/V Gain" msgstr "Získávání U/V" #: ../src/tvengbktr.c:407 msgid "U Saturation" msgstr "U Saturace" #: ../src/tvengbktr.c:409 msgid "V Saturation" msgstr "V Saturace" #: ../src/tveng.c:3214 #, fuzzy, c-format msgid "Cannot execute %s. Pipe error." msgstr "" "Nemohu spustit %s.\n" "%s" #: ../src/tveng.c:3221 ../src/tveng.c:3253 #, fuzzy, c-format msgid "Cannot execute %s. %s." msgstr "" "Nemohu spustit %s.\n" "%s" #. TRANSLATORS: Program name, error message. #: ../src/tveng.c:3231 #, c-format msgid "" "%s failed.\n" "%s" msgstr "" "%s chyba.\n" "%s" #. Something executed, but it wasn't #. zapping_setup_fb. Perhaps consolehelper #. couldn't authenticate the user? #: ../src/tveng.c:3243 #, fuzzy, c-format msgid "Cannot execute %s. No permission?" msgstr "" "Nemohu spustit %s.\n" "%s" #: ../src/tveng.c:3352 #, c-format msgid "Cannot determine current overlay parameters. %s" msgstr "" #. TRANSLATORS: Program name. #: ../src/tveng.c:3361 #, fuzzy, c-format msgid "%s did not work as expected." msgstr "%s není zařízení." #: ../src/tveng.c:3466 #, c-format msgid "%s not found in %s or the executable search path." msgstr "%s nenalezeno v %s nebo v cestě hledání spustitelných souborů." #: ../src/tveng.c:4848 msgid "Mono" msgstr "Mono" #: ../src/tveng.c:4855 msgid "Stereo" msgstr "Stereo" #: ../src/tveng.c:4863 msgid "Language 2" msgstr "Jazyk 2" #: ../src/tvengxv.c:876 msgid "Color" msgstr "Barva" #: ../src/tvengxv.c:877 msgid "Interlace" msgstr "Prokládání" #: ../src/tvengxv.c:918 msgid "No" msgstr "Ne" #: ../src/tvengxv.c:919 msgid "Yes" msgstr "Ano" #: ../src/tvengxv.c:920 msgid "Doublescan" msgstr "Doublescan" #. TRANSLATORS: In controls box, color picker control, #. something like "Adjust Chroma-Key" for overlay. #: ../src/v4linterface.c:452 #, c-format msgid "Adjust %s" msgstr "Upravit %s" #: ../src/v4linterface.c:621 ../src/zapping.c:466 msgid "Controls" msgstr "Ovládací prvky" #: ../src/v4linterface.c:1308 ../src/zmisc.c:1811 msgid "Unknown" msgstr "Neznámé" #: ../src/v4linterface.c:1326 msgid "No input" msgstr "Žádný vstup" # src/v4l2interface.c:344 #: ../src/v4linterface.c:1337 msgid "No standard" msgstr "Žádný standard" # src/v4l2interface.c:344 #: ../src/v4linterface.c:2410 msgid "Video standards" msgstr "Video standardy" #: ../src/v4linterface.c:2430 msgid "Audio inputs" msgstr "Audio vstupy" #: ../src/v4linterface.c:2450 msgid "Video inputs" msgstr "Video vstupy" # src/v4l2interface.c:146 #. TRANSLATORS: This is displayed in the channel menu when #. the channel list is empty. #: ../src/v4linterface.c:2548 msgid "No channels" msgstr "Žádné kanály" #: ../src/zapping.c:439 msgid "P_lugins" msgstr "P_luginy" #: ../src/zapping.c:444 ../src/zapping.c:485 msgid "_Window" msgstr "Okno" #: ../src/zapping.c:446 ../src/zapping.c:487 msgid "_Fullscreen" msgstr "_Celá obrazovka" #: ../src/zapping.c:448 ../src/zapping.c:489 msgid "_Background" msgstr "_Pozadí" #: ../src/zapping.c:450 msgid "_Overlay mode" msgstr "_Overlay režim" #: ../src/zapping.c:452 msgid "_Capture mode" msgstr "_Capture režim" #: ../src/zapping.c:455 msgid "_Help" msgstr "_Nápověda" #: ../src/zapping.c:456 msgid "_Contents" msgstr "_Obsah" #: ../src/zapping.c:458 msgid "_About" msgstr "_O programu" #: ../src/zapping.c:461 msgid "Appearance" msgstr "Vzhled" #: ../src/zapping.c:462 msgid "Ch. Up" msgstr "Kanál +" #: ../src/zapping.c:463 msgid "Switch to higher channel" msgstr "Přepni na další kanál" #: ../src/zapping.c:464 msgid "Ch. Down" msgstr "Kanál -" #: ../src/zapping.c:465 msgid "Switch to lower channel" msgstr "Přepni na předchozí kanál" #: ../src/zapping.c:467 msgid "Change picture controls" msgstr "Změň nastavení obrazu" #: ../src/zapping.c:472 msgid "_Mute" msgstr "_Ztlum" #: ../src/zapping.c:473 msgid "Switch audio on or off" msgstr "Zapní nebo vypni zvuk" #: ../src/zapping.c:474 msgid "Menu" msgstr "Menu" #: ../src/zapping.c:478 ../src/zapping.c:1092 msgid "Keep window on top" msgstr "Vždy nahoře" #: ../src/zapping.c:496 ../src/zapping.c:498 msgid "_Teletext" msgstr "_Teletext" #: ../src/zapping.c:499 msgid "Activate Teletext mode" msgstr "Aktivuj Teletext" #: ../src/zapping.c:501 msgid "Return to video mode" msgstr "Vrať do video režimu" #: ../src/zapping.c:502 msgid "_New Teletext View" msgstr "_Nové okno teletextu" #: ../src/zapping.c:508 ../src/zapping.c:513 msgid "_Subtitles" msgstr "_Titulky" #: ../src/zapping.c:514 msgid "Switch subtitles on or off" msgstr "Zapnout nebo vypnout titulky" #: ../src/zapping.c:1090 msgid "Show menu and toolbar" msgstr "Zobraz menu a toolbar" #: ../src/zmisc.c:662 msgid "Could not switch to capture mode" msgstr "Nemohu přepnout do capture režimu" #: ../src/zmisc.c:684 ../src/zmisc.c:702 msgid "Could not switch to overlay mode" msgstr "Nemohu přepnout do overlay režimu" #: ../src/zmisc.c:685 ../src/zmisc.c:737 msgid "Video overlay has been disabled." msgstr "Video overlay bude vypnuto." #: ../src/zmisc.c:718 msgid "Could not switch to Teletext mode" msgstr "Nemohu přepnout do režimu teletextu" #: ../src/zmisc.c:719 msgid "VBI has been disabled, or it doesn't work." msgstr "VBI bylo vypnuto nebo nepracuje" #: ../src/zmisc.c:736 ../src/zmisc.c:765 msgid "Could not switch to fullscreen mode" msgstr "Nemohu přepnout na celou obrazovku" #: ../src/zmisc.c:1031 msgid "Hide the statusbar" msgstr "Skryj stavový řádek" #: ../src/zmisc.c:1243 #, c-format msgid "%s is not a directory." msgstr "%s není adresář." #: ../src/zmisc.c:1285 msgid "Could not create directory" msgstr "Nemohu vytvořit adresář" #: ../src/zmisc.c:1286 #, c-format msgid "" "Could not create %s.\n" "%s" msgstr "" "Nemohu vytvořit %s.\n" "%s" #: ../src/zmisc.c:2006 msgid "Device:" msgstr "Zařízení:" #: ../src/zmisc.c:2007 msgid "Driver:" msgstr "Ovladač:" #: ../src/zmisc.c:2008 msgid "Device file:" msgstr "Soubor zařízení:" #: ../src/zmisc.c:2354 #, c-format msgid "Overwrite %s?" msgstr "Přepsat %s?" #: ../src/zmisc.c:2359 msgid "_Overwrite" msgstr "_Přepsat" #: ../src/zmisc.c:2367 #, c-format msgid "%s is a directory." msgstr "%s je adresář." #: ../src/zmisc.c:2382 #, c-format msgid "%s is a special file" msgstr "%s je speciální soubor" #: ../src/zmisc.c:2386 msgid "Continue" msgstr "Pokračovat" #: ../src/zmisc.c:2664 msgid "Could not open help file" msgstr "Nemohu otevřít soubor nápovědy" #: ../src/zmisc.c:2697 msgid "Could not open URL" msgstr "Nemohu otevřít URL" #: ../src/zspinslider.c:306 ../src/zspinslider.c:310 msgid "Reset" msgstr "Reset" #: ../src/zvbi.c:1044 #, c-format msgid " %s: Teletext Page %x" msgstr " %s: strana teletextu %x" #: ../src/zvbi.c:1047 #, c-format msgid " Teletext Page %x" msgstr " Strana teletextu %x" #: ../src/zvbi.c:1048 msgid "Open this page with Zapzilla" msgstr "Otevři tuto stránku v Zapzille" #: ../src/zvbi.c:1434 msgid "PES file read error" msgstr "Chyba čtení PES souboru" #: ../src/zvbi.c:1653 msgid "VBI interface timeout" msgstr "V4L/V4L2 timeout VBI rozhraní" #: ../src/zvbi.c:1685 msgid "VBI interface: Failed to read from the device" msgstr "V4L/V4L2 VBI rozhraní: Chyba čtení ze zařízení" #: ../src/zvbi.c:1763 ../src/zvbi.c:2006 ../src/zvbi.c:2114 msgid "VBI initialization failed" msgstr "Chyba inicializace VBI" #: ../src/zvbi.c:2060 msgid "Cannot open PES file" msgstr "Nemohu otevřít PES soubor" #: ../src/zvbi.c:2115 #, c-format msgid "%s is no VBI device." msgstr "%s není VBI zařízení." #: ../zapping.desktop.in.h:1 msgid "Lets you watch TV in a window" msgstr "Sledujte TV v okně" #: ../zapping.desktop.in.h:2 msgid "Zapping TV Viewer" msgstr "Prohližeč TV - Zapping" #: ../zapping.schemas.in.h:1 msgid "Adds spaces around words in Closed Caption text to improve legibility." msgstr "Přidá mezery okolo slov v uzavřeném nadpisu ke zlepšení čitelnosti." #: ../zapping.schemas.in.h:2 msgid "Caption/subtitle scaling quality." msgstr "Měření kvality nadpisu/titulků." #: ../zapping.schemas.in.h:3 msgid "Closed Caption default background color." msgstr "Standardní barva pozadí uzavřeného nadpisu." #: ../zapping.schemas.in.h:4 msgid "Closed Caption default foreground color." msgstr "Standardní barva písma uzavřeného nadpisu." #: ../zapping.schemas.in.h:5 msgid "Color for chroma-key overlay (#RRGGBB), default #FFCCCC." msgstr "" #: ../zapping.schemas.in.h:6 msgid "Default Teletext character set." msgstr "Standardní znaková sada teletextu." #: ../zapping.schemas.in.h:7 msgid "" "Default Teletext home page, usually 100. Valid values range from 100 to 899." msgstr "" "Standardní domácí stránka teletextu, obvykle 100. Možné hodnoty od 100 do " "899." #: ../zapping.schemas.in.h:8 msgid "Default Teletext home page." msgstr "Standartní domácí stránka teletextu." #: ../zapping.schemas.in.h:9 msgid "" "Default background color of Closed Caption text (#RRGGBB), default #000000." msgstr "" "Standartní barva pozadí textu uzavřeného nadpisu (#RRGGBB), standartně " "#000000." #: ../zapping.schemas.in.h:10 msgid "" "Default foreground color of Closed Caption text (#RRGGBB), default #FFFFFF." msgstr "" "Standartní barva písma textu uzavřeného nadpisu (#RRGGBB), standartně " "#FFFFFF." #: ../zapping.schemas.in.h:11 msgid "Deinterlace option." msgstr "Deinterlace volby." #: ../zapping.schemas.in.h:12 msgid "Display delay of second field (0.0 to 1.0 of one frame period)." msgstr "Zobraz položku po dobu (0,0 až 1,0 snímkovací frekvence)." #: ../zapping.schemas.in.h:13 msgid "" "Enable navigation elements in the bottom row of the Teletext page. Valid " "values: disabled, flof_top1 (FLOF or TOP style 1), flof_top2 (TOP style 2)." msgstr "" "Povolí navigační elementy ve spodním řádku stránky teletextu. Platné " "hodnoty : disabled (vypnuté), flof_top1 (FLOF nebo TOP varianta 1), " "flof_top2 (TOP varianta 2)." #: ../zapping.schemas.in.h:14 msgid "Enable navigation elements." msgstr "Povol navigační elementy." #: ../zapping.schemas.in.h:15 msgid "Enable smooth rolling of real time Closed Caption." msgstr "Povol vyhlazování pohyblivého closed nadpisu." #: ../zapping.schemas.in.h:16 msgid "Enables slow MMX and 3DNow! optimized functions for tests." msgstr "Povoluji optimalizované funkce MMX a 3DNow! pro testy." #: ../zapping.schemas.in.h:17 msgid "Greedy (high motion) deinterlace test mode." msgstr "Zátěžový (velkého pohybu) test deinterlace režimu." #: ../zapping.schemas.in.h:18 msgid "Horizontal image resolution in deinterlace mode." msgstr "Horizontální rozlišení obrazu v deinterlace režimu." #: ../zapping.schemas.in.h:19 msgid "Interpret the Teletext search text as regular expression." msgstr "Interpret teletextu hledá text jako regulární výraz." #: ../zapping.schemas.in.h:20 msgid "Keep the main window above other windows." msgstr "Hlavní okno vždy nad ostatními." #: ../zapping.schemas.in.h:21 msgid "Maximum number of networks in the Teletext page cache." msgstr "Největší počet sítí v mezipaměti stránek teletextu." #: ../zapping.schemas.in.h:22 msgid "Maximum size of the Teletext page cache in bytes." msgstr "Největší velikost mezipaměti stránek teletextu v bytech." #: ../zapping.schemas.in.h:23 msgid "Pad Closed Caption text with spaces." msgstr "Text closed nadpisu s podkreslenými mezerami." #: ../zapping.schemas.in.h:24 msgid "" "Quality/speed trade-off when scaling and anti-aliasing Teletext pages. Valid " "values: nearest, tiles, bilinear, hyper." msgstr "" "Poměr kvality a rychlosti pro zvětšování a vyhlazování textu teletextových " "stránek. Možné hodnoty: nearest, tiles, bilinear, hyper." #: ../zapping.schemas.in.h:25 msgid "" "Quality/speed trade-off when scaling and anti-aliasing caption/subtitles. " "Valid values: nearest, tiles, bilinear, hyper." msgstr "" "Poměr kvality a rychlosti pro zvětšování a vyhlazování textu nadpisu/" "titulků. Možné hodnoty: nearest, tiles, bilinear, hyper." #: ../zapping.schemas.in.h:26 msgid "Reverse the temporal field order." msgstr "Obrácené pořadí běžných položek." #: ../zapping.schemas.in.h:27 msgid "Roll Teletext page numbers." msgstr "Roluj čísla teletextových stránek." #: ../zapping.schemas.in.h:28 msgid "" "Roll the Teletext page number in the page header until the requested page " "has arrived." msgstr "" "Roluj číslo teletextové stránky v hlavičce stránky dokud není stránka " "nahraná." #: ../zapping.schemas.in.h:29 msgid "Search all channels in the Teletext page memory." msgstr "Prohledej všechny kanály v paměti teletextových stránek." #: ../zapping.schemas.in.h:30 msgid "Show a menu bar in the main window." msgstr "Zobraz menu v hlavním okně." #: ../zapping.schemas.in.h:31 msgid "Show a status bar in Teletext windows." msgstr "Zobraz stavový řádek v oknech teletextu." #: ../zapping.schemas.in.h:32 msgid "Show a toolbar in Teletext windows." msgstr "Zobraz toolbar v oknech teletextu." #: ../zapping.schemas.in.h:33 msgid "Show a toolbar in the main window." msgstr "Zobraz toolbar v hlavním okně." #: ../zapping.schemas.in.h:34 msgid "Show double height characters in Teletext subtitles." msgstr "Zobrazuj dvojitou výšku znaků v titulcích." #: ../zapping.schemas.in.h:35 msgid "" "Some stations fail to transmit a complete language identifier, so the " "Teletext viewer may not display the correct font or national characters. You " "can select your geographical region here as an additional hint. Valid " "values: western_and_central_europe, eastern_europe, " "western_europe_and_turkey, central_and_southeast_europe, cyrillic, " "greek_and_turkish, arabic, hebrew_and_arabic." msgstr "" "Některé stanice chybují při přenosu celého identifikátoru jazyka, proto " "nemusí prohlížeč titulků zobrazovat správné písmo nebo národní znaky. Můžete " "vybrat vaši geografickou oblast jako dodatečnou informaci. Možné hodnoty " "jsou: western_and_central_europe, eastern_europe, western_europe_and_turkey, " "central_and_southeast_europe, cyrillic, greek_and_turkish, arabic, " "hebrew_and_arabic." #: ../zapping.schemas.in.h:36 msgid "Switch to full capture size for screenshot." msgstr "Přepnout na plnou velikost snímání pro screenshot." #: ../zapping.schemas.in.h:37 msgid "Teletext implementation level." msgstr "Úroveň implementace teletextu." #: ../zapping.schemas.in.h:38 msgid "Teletext implementation level. Valid values: 1, 1.5, 2.5, 3.5." msgstr "Úroveň implementace teletextu. Možné hodnoty: 1, 1.5, 2.5, 3.5." #: ../zapping.schemas.in.h:39 msgid "Teletext page scaling quality." msgstr "Volba kvality stránek teletextu." #: ../zapping.schemas.in.h:40 msgid "Text brightness, valid values range from 0 to 255." msgstr "Jas textu. Možné hodnoty v rozsahu od 0 do 255." #: ../zapping.schemas.in.h:41 msgid "Text contrast, valid values range from -128 to 127." msgstr "Kontrast textu. Možné hodnoty v rozsahu od -128 do 127." #: ../zapping.schemas.in.h:42 msgid "The Teletext search is case insensitive." msgstr "Hledání v teletextu rozlišovat velikost." #: ../zapping.schemas.in.h:43 msgid "" "This is the time in milliseconds Zapping will wait between pointer movements " "and blanking the pointer when over the video. A value of zero disables this " "feature." msgstr "" "Toto je doba v milisekundách po kterou bude program čekat mezi ukazateli " "změny a skrytí ukazatele nad videem. Hodnota nula vlastnost vypne." #: ../zapping.schemas.in.h:44 msgid "Time to wait until blanking the pointer." msgstr "Doba do skrytí ukazatele." #: ../zapping.schemas.in.h:45 msgid "Update the clock in the Teletext page header." msgstr "Aktualizuj hodiny v hlavičce teletextové stránky." #: ../zapping.schemas.in.h:46 msgid "" "When your CPU is too slow to use the desired deinterlace mode you can reduce " "the horizontal resolution. Valid values: low, medium, high." msgstr "" "Jestliže je váš procesor velmi pomalý k použití žádaného režimu prokládání " "můžete snížit horizontální rozlišení. Možné hodnoty: low (malé), medium " "(střední), high (velké)." #: ../zapping_setup_fb/zapping_setup_fb.c:136 #, c-format msgid "Device name %s is unsafe, contains dots." msgstr "Jméno zařízení %s není bezpečné, obsahuje tečky." #: ../zapping_setup_fb/zapping_setup_fb.c:144 #, c-format msgid "Device name %s is unsafe, does not begin with /dev/." msgstr "Jméno zařízení %s není bezpečné, začíná jinak než /dev/." # src/callbacks.c:320 src/v4l2interface.c:89 #. TRANSLATORS: File name, error message. #: ../zapping_setup_fb/zapping_setup_fb.c:163 #, c-format msgid "Cannot open device %s. %s." msgstr "Nemohu otevřít zařízení %s. %s." #. TRANSLATORS: File name, error message. #: ../zapping_setup_fb/zapping_setup_fb.c:178 #, c-format msgid "Cannot identify %s. %s." msgstr "Nemohu rozpoznat %s. %s." #: ../zapping_setup_fb/zapping_setup_fb.c:190 #, c-format msgid "%s is not a device." msgstr "%s není zařízení." #: ../zapping_setup_fb/zapping_setup_fb.c:204 #, c-format msgid "%s is not a video device." msgstr "%s není zařízení videa." #: ../zapping_setup_fb/zapping_setup_fb.c:218 #, c-format msgid "Cannot identify file descriptor %d. %s." msgstr "Nemohu rozpoznat popisovač souboru %d. %s." #: ../zapping_setup_fb/zapping_setup_fb.c:229 #, c-format msgid "File descriptor %d is not a device." msgstr "Popisovač souboru %d není zařízení." #: ../zapping_setup_fb/zapping_setup_fb.c:239 #, c-format msgid "File descriptor %d is not a video device." msgstr "Popisovač souboru %d není zařízení videa." #: ../zapping_setup_fb/zapping_setup_fb.c:254 #, c-format msgid "Internal error at %s:%u." msgstr "" #: ../zapping_setup_fb/zapping_setup_fb.c:273 #, c-format msgid "Cannot drop root privileges despite running with UID %d, EUID %d." msgstr "Nemohu získat práva roota navzdory spuštění s UID %d a EUID %d." #: ../zapping_setup_fb/zapping_setup_fb.c:303 #, c-format msgid "Cannot restore root privileges despite running with UID %d, EUID %d." msgstr "Nemohu obnovit práva roota navzdory spuštění s UID %d a EUID %d." #: ../zapping_setup_fb/zapping_setup_fb.c:396 msgid "No standard input, output or error file." msgstr "" #: ../zapping_setup_fb/zapping_setup_fb.c:449 #, c-format msgid "Invalid bpp argument %d. Expected 24 or 32." msgstr "Nesprávný parametr bpp %d. Očekávám 24 nebo 32." #: ../zapping_setup_fb/zapping_setup_fb.c:482 #, c-format msgid "Invalid device file descriptor %d." msgstr "Neplatný popisovač souboru zařízení %d." #: ../zapping_setup_fb/zapping_setup_fb.c:539 msgid "No screens found." msgstr "Nenalezen X-server." #: ../zapping_setup_fb/zapping_setup_fb.c:573 #, c-format msgid "Cannot open display %s." msgstr "Nemohu otevřít displej %s." #: ../zapping_setup_fb/zapping_setup_fb.c:590 #, c-format msgid "Screen %d not found." msgstr "X-server %d nenalezen." #: ../zapping_setup_fb/zapping_setup_fb.c:598 #, c-format msgid "DMA is not possible on screen %d." msgstr "X-server %d neumožňuje DMA přenosy." #: ../zapping_setup_fb/zapping_setup_fb.c:614 #, c-format msgid "%s is not a V4L or V4L2 device." msgstr "%s není V4L- oder V4L2-Gerät." #: ../zapping_setup_fb/zapping_setup_fb.c:617 #, c-format msgid "File descriptor %d is not a V4L or V4L2 device." msgstr "Popisovač souboru %d není V4L ani V4L2 zařízení." #: ../zapping_setup_fb/zapping_setup_fb.c:620 #, fuzzy msgid "Cannot identify the video capture device." msgstr "Nemohu rozpoznat popisovač souboru %d. %s." #: ../zapping_setup_fb/zapping_setup_fb.h:56 #, fuzzy, c-format msgid "Ioctl %s failed: %s." msgstr "%s chyba." #: ../zapping_setup_fb/v4l.c:89 ../zapping_setup_fb/v4l25.c:91 msgid "The device does not support video overlay." msgstr "Zařízení nepodporuje video režim overlay." #~ msgid "Adaptive" #~ msgstr "Adaptivní" #~ msgid "Blended Clip" #~ msgstr "Prolínaný klip" #~ msgid "Maximum motion" #~ msgstr "Maximální pohyb" #~ msgid "Composite mode" #~ msgstr "Compositní režim" #~ msgid "Old Game" #~ msgstr "Starý způsob" #~ msgid "Unknown error in %s." #~ msgstr "Neznámá chyba v %s." #~ msgid "VBI device to use" #~ msgstr "VBI zařízení k použití" #~ msgid "DEVICE" #~ msgstr "DEVICE" #~ msgid "Zapzilla couldn't be started" #~ msgstr "Zapzilla nemůže být spuštěna" #~ msgid "Sorry, Zapzilla is unable to create the config tree" #~ msgstr "Promiňte, Zapzilla nemůže vytvořit konfigurační strom" ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������zapping-0.10cvs6/po/es.po��������������������������������������������������������������������������� 644 � 764 � 144 � 243767 10443535641 10462� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# Zapping (a Gnome TV viewer) / Zapping (TV para Gnome) -*- coding: utf-8 -*- # Copyright (C) 2000 Joseba García Etxebarria <josebag@mixmail.com> # Copyright (C) 2000-2003 Iñaki García Etxebarria <garetxe@users.sourceforge.net> # msgid "" msgstr "" "Project-Id-Version: zapping 0.7\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2006-03-31 16:06+0200\n" "PO-Revision-Date: 2005-10-29 16:57+0200\n" "Last-Translator: Iñaki García Etxebarria <garetxe@users.sourceforge.net>\n" "Language-Team: Spanish <es@li.org>\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n != 1\n" #: ../glade/zapping.glade2.h:1 msgid "320x240" msgstr "320x240" #: ../glade/zapping.glade2.h:2 msgid "" "A format string describing the main window title when changing channels: " "$(alias), $(index), $(id), $(freq), $(standard) and $(input) are substituted " "by the respective values." msgstr "" "Una cadena de formato describiendo qué debe poner el programa como título de " "la ventana principal al cambiar los canales. $(alias),$(index), $(id), " "$(freq), $(standard) e $(input) son sustituídos por los valores correctos." #: ../glade/zapping.glade2.h:3 msgid "Advanced" msgstr "Avanzado" #: ../glade/zapping.glade2.h:4 ../src/audio.c:829 ../src/audio.c:834 #: ../src/tveng.c:4830 msgid "Audio" msgstr "Audio" #: ../glade/zapping.glade2.h:5 msgid "Author:" msgstr "Autor:" #: ../glade/zapping.glade2.h:6 msgid "Biggest noninterlaced (autodetect)" msgstr "Mayor no entrelazado (autodetectar)" # src/interface.c:405 #: ../glade/zapping.glade2.h:7 msgid "Canonical name:" msgstr "Nombre canónico:" # src/interface.c:405 #: ../glade/zapping.glade2.h:8 msgid "Channel list number" msgstr "Número en la lista de canales" #: ../glade/zapping.glade2.h:9 msgid "Choose a color" msgstr "Elija un color:" #: ../glade/zapping.glade2.h:10 msgid "Chroma _key:" msgstr "" #: ../glade/zapping.glade2.h:11 msgid "Clean console" msgstr "Limpiar consola" # src/interface.c:448 #: ../glade/zapping.glade2.h:12 msgid "Click here when you are done" msgstr "Pulsa aquí cuando hayas acabado" #: ../glade/zapping.glade2.h:13 msgid "Console" msgstr "Consola" #: ../glade/zapping.glade2.h:14 #, fuzzy msgid "Copyright (C) 2000-2005 the contributors\n" msgstr "Copyright (C) 2000-2003 aquellos que han contribuído\n" #: ../glade/zapping.glade2.h:16 msgid "Current controller:" msgstr "Controlador:" #: ../glade/zapping.glade2.h:17 msgid "DVB PES File" msgstr "Fichero DVB PES" #: ../glade/zapping.glade2.h:18 msgid "DVB _PES File" msgstr "Fichero DVB _PES" #: ../glade/zapping.glade2.h:19 msgid "Device name:" msgstr "Nombre:" #: ../glade/zapping.glade2.h:20 ../src/audio.c:839 #: ../src/properties-handler.c:1352 ../src/zvbi.c:2537 msgid "Devices" msgstr "Dispositivos" #: ../glade/zapping.glade2.h:21 msgid "Disable _screensaver" msgstr "_Inhabilitar el protector de pantalla" #: ../glade/zapping.glade2.h:22 msgid "Enter key" msgstr "Introduzca tecla" #: ../glade/zapping.glade2.h:23 msgid "F_ont:" msgstr "_Fuente:" #: ../glade/zapping.glade2.h:24 msgid "Favorite _picture sizes:" msgstr "Tamaños de imagen preferidos:" #: ../glade/zapping.glade2.h:25 msgid "General options" msgstr "Opciones generales" #: ../glade/zapping.glade2.h:26 msgid "Interlaced (window size)" msgstr "Entrelazado (tamaño de la ventana)" #: ../glade/zapping.glade2.h:27 msgid "Kernel VBI device" msgstr "Dispositivo VBI del núcleo" #: ../glade/zapping.glade2.h:28 msgid "Kernel _device" msgstr "_Dispositivo del núcleo" #: ../glade/zapping.glade2.h:29 ../src/keyboard.c:1149 msgid "Keyboard" msgstr "Teclado..." #: ../glade/zapping.glade2.h:30 msgid "Known key names" msgstr "Nombres de tecla conocidos" #: ../glade/zapping.glade2.h:31 msgid "Maximum capture size:" msgstr "Tamaño máximo de captura:" #: ../glade/zapping.glade2.h:32 msgid "Minimum capture size:" msgstr "Tamaño mínimo de captura:" #: ../glade/zapping.glade2.h:33 msgid "Mute while ch_anging channels" msgstr "_Tratar de evitar el ruido al cambiar de canal" #: ../glade/zapping.glade2.h:34 msgid "NTSC" msgstr "NTSC" #: ../glade/zapping.glade2.h:35 msgid "No Display" msgstr "Sin notificaciones" #: ../glade/zapping.glade2.h:36 msgid "OK, let's go on" msgstr "Bien, prosigamos" #: ../glade/zapping.glade2.h:37 ../src/osd.c:1075 msgid "OSD" msgstr "OSD" #: ../glade/zapping.glade2.h:38 msgid "On Screen Display (OSD)" msgstr "Notificación en pantalla (OSD)" #: ../glade/zapping.glade2.h:39 msgid "PAL" msgstr "PAL" #: ../glade/zapping.glade2.h:40 msgid "Plugin location" msgstr "Ubicación" #: ../glade/zapping.glade2.h:41 msgid "Plugin priority:" msgstr "Prioridad:" #: ../glade/zapping.glade2.h:42 msgid "Plugin properties" msgstr "Propiedades del plugin" #: ../glade/zapping.glade2.h:43 msgid "Plugin version:" msgstr "Version:" #: ../glade/zapping.glade2.h:44 msgid "Properties" msgstr "Propiedades" # src/interface.c:362 #: ../glade/zapping.glade2.h:45 msgid "RF channel number" msgstr "Índice RF del canal" # src/v4l2interface.c:344 #: ../glade/zapping.glade2.h:46 msgid "Remember this video standard" msgstr "Recordar éste estándar de vídeo:" #: ../glade/zapping.glade2.h:47 msgid "Remove all this mess" msgstr "Borrar este barullo" #: ../glade/zapping.glade2.h:48 msgid "Run the plugin" msgstr "Ejecutar el plugin" #: ../glade/zapping.glade2.h:49 msgid "SECAM" msgstr "SECAM" # src/interface.c:247 #: ../glade/zapping.glade2.h:50 msgid "S_how toolbar as:" msgstr "_Mostrar la barra de herramientas como:" #: ../glade/zapping.glade2.h:51 msgid "Save _control values per channel" msgstr "Salvar _controles con el canal" #: ../glade/zapping.glade2.h:52 msgid "Select OSD font" msgstr "Seleccione la fuente OSD:" #: ../glade/zapping.glade2.h:53 msgid "Select the V4L device" msgstr "Selecciona el dispositivo V4L" # src/interface.c:247 #: ../glade/zapping.glade2.h:54 msgid "Show _tooltips" msgstr "Mostrar _tooltips" #: ../glade/zapping.glade2.h:55 msgid "Status Bar" msgstr "Barra de estado" #: ../glade/zapping.glade2.h:56 msgid "Stop this plugin" msgstr "Parar el plugin" #: ../glade/zapping.glade2.h:57 msgid "TV viewer for the Gnome environment" msgstr "La televisión para Gnome" #: ../glade/zapping.glade2.h:58 msgid "" "The video capture device does not report the correct video standard, please " "select manually:" msgstr "" "El dispositivo de captura de vídeo no devuelve es estándar de vídeo " "correcto, por favor selecciónelo manualmente:" #: ../glade/zapping.glade2.h:59 msgid "Title _bar contents:" msgstr "Contenidos de la _barra de título:" #: ../glade/zapping.glade2.h:60 ../src/zvbi.c:2532 msgid "VBI" msgstr "VBI" # src/v4l2interface.c:344 #: ../glade/zapping.glade2.h:61 ../src/main.c:200 #: ../src/properties-handler.c:1339 ../src/properties-handler.c:1347 msgid "Video" msgstr "Video" # src/v4l2interface.c:344 #: ../glade/zapping.glade2.h:62 msgid "Video Standard" msgstr "Estándar de Vídeo" #: ../glade/zapping.glade2.h:63 msgid "Video device capabilities" msgstr "Características del dispositivo de video." #: ../glade/zapping.glade2.h:64 msgid "Window" msgstr "Ventana" #: ../glade/zapping.glade2.h:65 msgid "Zapping Preferences" msgstr "Preferencias de Zapping" #: ../glade/zapping.glade2.h:66 msgid "Zapping error console" msgstr "Consola de errores de Zapping" #: ../glade/zapping.glade2.h:67 msgid "_Background color:" msgstr "Color de _fondo:" #: ../glade/zapping.glade2.h:68 msgid "_Capture size under XVideo:" msgstr "Tamaño de la _captura bajo XVideo:" #: ../glade/zapping.glade2.h:69 msgid "_Command:" msgstr "_Comando:" #: ../glade/zapping.glade2.h:70 msgid "_Control volume with soundcard mixer" msgstr "_Controlar el volumen con el mezclador de la tarjeta" #: ../glade/zapping.glade2.h:71 msgid "_Device file:" msgstr "_Fichero:" #: ../glade/zapping.glade2.h:72 msgid "_Display mode:" msgstr "Modo de las notificaciones:" # src/v4l2interface.c:146 #: ../glade/zapping.glade2.h:73 msgid "_Enter channels by:" msgstr "_Introducir canales mediante:" #: ../glade/zapping.glade2.h:74 msgid "_Foreground color:" msgstr "Color de _primer plano:" #: ../glade/zapping.glade2.h:75 msgid "_Fullscreen video resolution:" msgstr "Resolución _Pantalla completa:" #: ../glade/zapping.glade2.h:76 msgid "_Gnome sound daemon (ESD)" msgstr "Demonio de sonido de _Gnome (ESD)" #: ../glade/zapping.glade2.h:77 msgid "_KDE sound daemon (ARTS)" msgstr "Demonio de sonido de _KDE (ARTS)" #: ../glade/zapping.glade2.h:78 msgid "_Mute on exit" msgstr "_Silenciar al terminar" #: ../glade/zapping.glade2.h:79 msgid "_No VBI services" msgstr "_Sin servicios VBI" #: ../glade/zapping.glade2.h:80 msgid "_No audio recording" msgstr "_Sin grabación de audio" #: ../glade/zapping.glade2.h:81 msgid "_Remove after:" msgstr "_Eliminar tras:" #: ../glade/zapping.glade2.h:82 msgid "_Resize using fixed increments" msgstr "_Redimensionar mediante incrementos fijos" #: ../glade/zapping.glade2.h:83 msgid "_Start Zapping muted" msgstr "_Iniciar Zapping sin sonido" #: ../glade/zapping.glade2.h:84 msgid "_Use VBI Proxy if available" msgstr "_Utilizar el proxy VBI si está disponible" #: ../glade/zapping.glade2.h:85 msgid "seconds" msgstr "segundos" #: ../libvbi/exp-gfx.c:1483 msgid "Correct aspect ratio" msgstr "Relación de aspecto correcta" #: ../libvbi/exp-gfx.c:1484 msgid "" "Approach an image aspect ratio similar to a real TV. This will double the " "image size." msgstr "" "Aproximar una relación de tamaños similar a una TV real, esto duplicará el " "tamaño de la imagen." #: ../libvbi/exp-gfx.c:1623 msgid "PPM" msgstr "PPM" #: ../libvbi/exp-gfx.c:1624 msgid "Export this page as raw PPM image" msgstr "Exportar la página actual como PPM" #. XXX gettext encoding #: ../libvbi/exp-gfx.c:1824 ../libvbi/exp-html.c:532 ../libvbi/exp-sub.c:633 #: ../libvbi/exp-sub.c:764 ../libvbi/exp-sub.c:821 #, c-format msgid "Teletext Page %3x.%x" msgstr "Página de Teletexto %3x.%x" #: ../libvbi/exp-gfx.c:1828 ../libvbi/exp-html.c:535 ../libvbi/exp-sub.c:636 #: ../libvbi/exp-sub.c:767 ../libvbi/exp-sub.c:824 #, c-format msgid "Teletext Page %3x" msgstr "Página de Teletexto %3x" #: ../libvbi/exp-gfx.c:2019 msgid "PNG" msgstr "PNG" #: ../libvbi/exp-gfx.c:2020 msgid "Export this page as PNG image" msgstr "Exportar la página actual como PNG" #: ../libvbi/exp-html.c:110 ../libvbi/exp-txt.c:133 msgid "Graphics char" msgstr "Caracter gráfico" #: ../libvbi/exp-html.c:111 ../libvbi/exp-txt.c:134 msgid "" "Replacement for block graphic characters: a single character or decimal (32) " "or hex (0x20) code" msgstr "" "Sustituto para los caracteres gráficos de bloque: un único caracter o un " "código decimal (32) o hexadecimal (0x20)" #: ../libvbi/exp-html.c:114 ../libvbi/exp-txt.c:137 msgid "ASCII art" msgstr "Diagramas ASCII" #: ../libvbi/exp-html.c:115 ../libvbi/exp-txt.c:138 msgid "Replace graphic characters by ASCII art" msgstr "Reemplazar caracteres gráficos por diagramas ASCII." #: ../libvbi/exp-html.c:117 msgid "Color (CSS)" msgstr "Color (CSS)" #: ../libvbi/exp-html.c:118 msgid "Store the page colors using CSS attributes" msgstr "Guardar los colores de la página utilizando atributos CSS" #: ../libvbi/exp-html.c:120 msgid "HTML header" msgstr "Cabecera HTML" #: ../libvbi/exp-html.c:121 msgid "Include HTML page header" msgstr "Incluir la cabecera de la página HTML" #. TRANSLATORS: lang=\"en\" refers to the page title #. "Teletext Page ...". Please specify "de", "fr", "es" #. etc. #: ../libvbi/exp-html.c:521 msgid "<title lang=\"en\">" msgstr "<title lang=\"es\">" #: ../libvbi/exp-html.c:843 msgid "HTML" msgstr "HTML" #: ../libvbi/exp-html.c:844 msgid "Export this page as HTML page" msgstr "Exportar la página actual como HTML" #: ../libvbi/export.c:200 msgid "Write error." msgstr "Error de escritura." #: ../libvbi/export.c:210 msgid "Out of memory." msgstr "Sin memoria disponible." #: ../libvbi/export.c:235 #, c-format msgid "Export module %s has no option %s." msgstr "El módulo %s no tiene ninguna opción %s." #: ../libvbi/export.c:295 #, c-format msgid "Invalid argument %s for option %s of export module %s." msgstr "Argumento %s incorrecto para la opción %s del módulo %s." #: ../libvbi/export.c:350 msgid "Unknown error." msgstr "Error desconocido." #: ../libvbi/export.c:436 #, c-format msgid "Could not create %s. %s." msgstr "No se puede crear %s: %s." #: ../libvbi/export.c:1334 #, c-format msgid "Invalid option string \"%s\"." msgstr "Cadena de opción incorrecta \"%s\"." #: ../libvbi/export.c:1438 #, c-format msgid "Unknown export module '%s'." msgstr "Módulo de exportación desconocido '%s'." #: ../libvbi/export.c:1452 #, c-format msgid "Cannot initialize export module '%s', probably lack of memory." msgstr "" "No se puede iniciar el módulo de exportación '%s', probablemente falta de " "memoria." #: ../libvbi/export.c:1476 #, c-format msgid "Cannot initialize export module '%s', out of memory." msgstr "" "No se puede inicializar el módulo de exportación '%s', no queda memoria." #: ../libvbi/exp-sub.c:124 ../libvbi/exp-txt.c:81 msgid "ASCII" msgstr "ASCII" #: ../libvbi/exp-sub.c:125 ../libvbi/exp-txt.c:82 msgid "ISO-8859-1 (Latin-1 Western languages)" msgstr "ISO-8859-1 (Latin-1 Idiomas occidentales)" #: ../libvbi/exp-sub.c:126 ../libvbi/exp-txt.c:83 msgid "ISO-8859-2 (Latin-2 Central and Eastern European languages)" msgstr "ISO-8859-2 (Latin-2 Idiomas de Europa central y del este)" #: ../libvbi/exp-sub.c:127 ../libvbi/exp-txt.c:84 msgid "ISO-8859-4 (Latin-3 Baltic languages)" msgstr "ISO-8859-4 (Latin-3 Idiomas bálticos)" #: ../libvbi/exp-sub.c:128 ../libvbi/exp-txt.c:85 msgid "ISO-8859-5 (Cyrillic)" msgstr "ISO-8859-5 (Cirílico)" #: ../libvbi/exp-sub.c:129 ../libvbi/exp-txt.c:86 msgid "ISO-8859-7 (Greek)" msgstr "ISO-8859-7 (Griego)" #: ../libvbi/exp-sub.c:130 ../libvbi/exp-txt.c:87 msgid "ISO-8859-8 (Hebrew)" msgstr "ISO-8859-8 (Hebreo)" #: ../libvbi/exp-sub.c:131 ../libvbi/exp-txt.c:88 msgid "ISO-8859-9 (Turkish)" msgstr "ISO-8859-9 (Turco)" #: ../libvbi/exp-sub.c:132 ../libvbi/exp-txt.c:89 msgid "KOI8-R (Russian and Bulgarian)" msgstr "KOI8-R (Ruso y búlgaro)" #: ../libvbi/exp-sub.c:133 ../libvbi/exp-txt.c:90 msgid "KOI8-U (Ukranian)" msgstr "KOI8-U (Ucraniano)" #: ../libvbi/exp-sub.c:134 ../libvbi/exp-txt.c:91 msgid "ISO-10646/UTF-8 (Unicode)" msgstr "ISO-10646/UTF-8 (Unicode)" #. TRANSLATORS: Text export encoding (ASCII, Unicode, ...) menu #: ../libvbi/exp-sub.c:155 ../libvbi/exp-sub.c:165 ../libvbi/exp-txt.c:127 msgid "Encoding" msgstr "Codificación" #: ../libvbi/exp-sub.c:171 msgid "Font face" msgstr "Tipografía" #. TRANSLATORS: #. Caption is an aid for the hearing impaired, #. subtitles for foreign language viewers. #: ../libvbi/exp-sub.c:1534 msgid "MPlayer caption/subtitle file" msgstr "Fichero de subtítulos de MPlayer" #. TRANSLATORS: #. Styles like bold, italic, underlined, etc. #. Justification to the left, right, centered. #: ../libvbi/exp-sub.c:1559 msgid "" "QuickTime Text caption/subtitle file preserving text styles, justification " "and color" msgstr "" "Fichero de subtítulos Quicktime Text manteniendo los estilos de texto, la " "justificación y el color" #: ../libvbi/exp-sub.c:1583 msgid "RealText caption/subtitle file preserving text styles and color" msgstr "" "Fichero de subtítulos RealText manteniendo los estilos de texto y el color" #: ../libvbi/exp-sub.c:1606 msgid "" "SAMI 1.0 caption/subtitle file preserving text styles, justification and " "color" msgstr "" "Fichero de subtítulos SAMI 1.0 manteniendo los estilos de texto, la " "justificación y el color" #: ../libvbi/exp-sub.c:1630 msgid "SubRip caption/subtitle file" msgstr "Fichero de subtítulos SubRip" #: ../libvbi/exp-sub.c:1652 msgid "SubViewer 2.x caption/subtitle file" msgstr "Fichero de subtítulos SubViewer 2.x" #. TRANSLATORS: Terminal control codes menu #: ../libvbi/exp-txt.c:112 msgid "None" msgstr "Ninguno" #: ../libvbi/exp-txt.c:113 msgid "ANSI X3.64 / VT 100" msgstr "ANSI X3.64 / VT 100" #: ../libvbi/exp-txt.c:114 msgid "VT 200" msgstr "VT 200" # src/interface.c:247 #: ../libvbi/exp-txt.c:140 msgid "Control codes" msgstr "Códigos de control" #: ../libvbi/exp-txt.c:1030 msgid "Text" msgstr "Texto" #: ../libvbi/exp-txt.c:1031 msgid "Export this page as text file" msgstr "Exportar esta página como texto" #: ../libvbi/exp-vtx.c:82 msgid "Can only export Teletext pages." msgstr "Sólo se pueden exportar páginas de Teletexto." #: ../libvbi/exp-vtx.c:89 msgid "Page is not cached." msgstr "La página no está en la memoria caché." #: ../libvbi/exp-vtx.c:98 msgid "Cannot export this page, is not displayable." msgstr "No se puede exportar esta página, no es representable." #: ../libvbi/exp-vtx.c:135 msgid "VTX" msgstr "VTX" #: ../libvbi/exp-vtx.c:136 msgid "" "Export this page as VTX file, the format used by VideoteXt and vbidecode" msgstr "" "Exportar esta página como un fichero VTX, el formato utilizado por VideoteXt " "y vbidecode" #: ../plugins/alirc/alirc.c:37 msgid "Another lirc plugin" msgstr "Otro plugin de lirc" #: ../plugins/alirc/alirc.c:39 msgid "" "Another plugin to control zapping through lirc\n" "\n" "To enable this plugin you must edit your ~/.lircrc\n" "file. See the Zapping documentation for details.\n" msgstr "" "Otro plugin para controlar Zapping a través de LIRC.\n" "\n" "Para habilitar este plugin debe editar su fichero ~/.lircrc,\n" "por favor lea la documentación de Zapping para obtener intrucciones " "detalladas.\n" #: ../plugins/alirc/alirc.c:44 msgid "Lets you control zapping through lirc" msgstr "Le permite controlar Zapping a través de lirc" #. hash collision code #. Warn #. hash collision code #. hash collision code #. Warn #: ../plugins/alirc/alirc.c:375 ../plugins/mpeg/mpeg.c:3026 #: ../plugins/screenshot/screenshot.c:1778 #, c-format msgid "Check error: \"%s\" in plugin %s has hash 0x%x vs. 0x%x" msgstr "Error de comprobación: \"%s\" en el plugin %s tiene hash 0x%x vs. 0x%x" #: ../plugins/deinterlace/DI_GreedyH/DI_GreedyH.c:240 msgid "Max Comb" msgstr "Peinado (comb) máximo" #: ../plugins/deinterlace/DI_GreedyH/DI_GreedyH.c:246 msgid "Motion Threshold" msgstr "Umbral de movimiento" #: ../plugins/deinterlace/DI_GreedyH/DI_GreedyH.c:252 msgid "Motion Sense" msgstr "Detección de movimiento" #: ../plugins/deinterlace/DI_GreedyH/DI_GreedyH.c:258 msgid "Good PullDown Lvl" msgstr "Nivel de buen Pulldown" #: ../plugins/deinterlace/DI_GreedyH/DI_GreedyH.c:264 msgid "Bad PullDown Lvl" msgstr "Nivel de mal Pulldown" #: ../plugins/deinterlace/DI_GreedyH/DI_GreedyH.c:270 #: ../plugins/deinterlace/DI_GreedyH/DI_GreedyH.c:318 msgid "H. Sharpness" msgstr "Enfoque horizontal" #: ../plugins/deinterlace/DI_GreedyH/DI_GreedyH.c:276 #: ../plugins/deinterlace/DI_GreedyH/DI_GreedyH.c:312 msgid "V. Sharpness" msgstr "Enfoque vertical" #: ../plugins/deinterlace/DI_GreedyH/DI_GreedyH.c:282 #: ../plugins/deinterlace/DI_GreedyH/DI_GreedyH.c:306 msgid "Median Filter" msgstr "Filtro Median" #: ../plugins/deinterlace/DI_GreedyH/DI_GreedyH.c:288 msgid "High Comb Skip" msgstr "Límite del peinado (Comb)" #: ../plugins/deinterlace/DI_GreedyH/DI_GreedyH.c:294 msgid "Auto Pull-Down" msgstr "Pull-Down automático" #: ../plugins/deinterlace/DI_GreedyH/DI_GreedyH.c:300 msgid "In-Between Frames" msgstr "Entre Cuadros" #. size of this struct #. curr version compiled #: ../plugins/deinterlace/DI_GreedyH/DI_GreedyH.c:336 msgid "Video (Greedy, High Motion)" msgstr "Video (Greedy, mucho movimiento)" #: ../plugins/deinterlace/DI_Misc/DI_Bob.c:150 msgid "Simple Bob" msgstr "Simple Bob" #: ../plugins/deinterlace/DI_Misc/DI_EvenOnly.c:123 msgid "Even Scanlines Only" msgstr "Sólo líneas pares" #: ../plugins/deinterlace/DI_Misc/DI_Greedy2Frame.c:258 msgid "Greedy 2 Frame Luma Threshold" msgstr "Umbral de luminosidad Greedy 2 cuadros" #: ../plugins/deinterlace/DI_Misc/DI_Greedy2Frame.c:270 msgid "Greedy 2 Frame" msgstr "Greedy 2 cuadros" #: ../plugins/deinterlace/DI_Misc/DI_Greedy.c:235 msgid "Greedy Max Comb" msgstr "Greedy Peinado (comb) Máximo" #: ../plugins/deinterlace/DI_Misc/DI_Greedy.c:246 msgid "Video (Greedy, Low Motion)" msgstr "Video (Greedy, poco movimiento)" #: ../plugins/deinterlace/DI_Misc/DI_MoComp2.c:351 msgid "Video (MoComp2)" msgstr "Video (MoComp2)" #: ../plugins/deinterlace/DI_Misc/DI_OddOnly.c:125 msgid "Odd Scanlines Only" msgstr "Sólo líneas impares" #: ../plugins/deinterlace/DI_Misc/DI_ScalerBob.c:117 msgid "Scaler Bob" msgstr "Scaler Bob" #: ../plugins/deinterlace/DI_Misc/DI_TomsMoComp.c:955 msgid "Search Effort" msgstr "Esfuerzo en la búsqueda" #: ../plugins/deinterlace/DI_Misc/DI_TomsMoComp.c:961 msgid "Use Strange Bob" msgstr "Utilizar Strange Bob" #: ../plugins/deinterlace/DI_Misc/DI_TomsMoComp.c:972 msgid "Video (TomsMoComp)" msgstr "Video (TomsMoComp)" #: ../plugins/deinterlace/DI_Misc/DI_TwoFrame.c:317 msgid "2 Frame Spatial Tolerance" msgstr "Tolerancia Espacial (2 Cuadros)" #: ../plugins/deinterlace/DI_Misc/DI_TwoFrame.c:323 msgid "2 Frame Temporal Tolerance" msgstr "Tolerancia Temporal (2 Cuadros)" #: ../plugins/deinterlace/DI_Misc/DI_TwoFrame.c:334 msgid "Video Deinterlace (2-Frame)" msgstr "Video deinterlace (2 Cuadros)" #: ../plugins/deinterlace/DI_Misc/DI_VideoBob.c:237 msgid "Weave Edge Detect" msgstr "Detección de bordes" #: ../plugins/deinterlace/DI_Misc/DI_VideoBob.c:243 msgid "Weave Jaggie Threshold" msgstr "Umbral de Jaggie" #: ../plugins/deinterlace/DI_Misc/DI_VideoBob.c:254 msgid "Video Deinterlace (Bob)" msgstr "Video Deinterlace (Bob)" #: ../plugins/deinterlace/DI_Misc/DI_VideoWeave.c:270 msgid "Temporal Tolerance" msgstr "Tolerancia temporal" #: ../plugins/deinterlace/DI_Misc/DI_VideoWeave.c:276 msgid "Spatial Tolerance" msgstr "Tolerancia Espacial" #: ../plugins/deinterlace/DI_Misc/DI_VideoWeave.c:282 msgid "Similarity Threshold" msgstr "Umbral de Similitud" #: ../plugins/deinterlace/DI_Misc/DI_VideoWeave.c:293 msgid "Video Deinterlace (Weave)" msgstr "Video Deinterlace (Weave)" #: ../plugins/deinterlace/DI_Misc/DI_Weave.c:155 msgid "Simple Weave" msgstr "Simple Weave" #: ../plugins/deinterlace/main.c:352 msgid "Could not start deinterlace plugin" msgstr "No se pudo iniciar el plugin de desentrelazado" #: ../plugins/deinterlace/main.c:353 #, c-format msgid "Could not switch to capture format YUYV %u x %u." msgstr "No se pudo cambiar al modo de captura YUYV %u x %u." #: ../plugins/deinterlace/main.c:447 msgid "Deinterlace" msgstr "Desentrelazar:" #: ../plugins/deinterlace/main.c:454 ../plugins/mpeg/mpeg.c:2336 #: ../plugins/mpeg/mpeg.c:2956 ../plugins/screenshot/screenshot.c:522 #: ../plugins/screenshot/screenshot.c:1525 ../plugins/subtitle/main.c:55 #: ../plugins/teletext/main.c:212 msgid "Plugins" msgstr "Plugins" #: ../plugins/deinterlace/main.c:523 msgid "Deinterlace plugin" msgstr "Plugin de desentrelazado" #: ../plugins/deinterlace/preferences.c:48 ../src/plugin_properties.c:120 msgid "Low" msgstr "Baja" #: ../plugins/deinterlace/preferences.c:49 msgid "Medium" msgstr "Media" #: ../plugins/deinterlace/preferences.c:50 ../src/plugin_properties.c:128 msgid "High" msgstr "Alta" #: ../plugins/deinterlace/preferences.c:287 msgid "_Resolution:" msgstr "_Resolución:" # src/frequencies.c:827 #. TRANSLATORS: Relative display duration of the first and #. second field in deinterlace mode. #: ../plugins/deinterlace/preferences.c:296 msgid "_Field Balance:" msgstr "_Balance de los campos:" # src/frequencies.c:817 #: ../plugins/deinterlace/preferences.c:708 ../src/eggcellrendererkeys.c:222 msgid "Disabled" msgstr "Inhabilitado" #: ../plugins/mpeg/mpeg.c:846 #, c-format msgid "Format %s is incomplete, please configure the video or audio codec." msgstr "El formato %s no está completo, por favor configura el compresor." #: ../plugins/mpeg/mpeg.c:1156 #, c-format msgid "Cannot create file %s: %s\n" msgstr "No se puede crear %s: %s\n" #: ../plugins/mpeg/mpeg.c:1726 ../plugins/mpeg/options.c:407 #: ../plugins/teletext/export.c:128 msgid "Options" msgstr "Opciones" #: ../plugins/mpeg/mpeg.c:2150 msgid "New format" msgstr "Nuevo formato" #: ../plugins/mpeg/mpeg.c:2151 msgid "Format name:" msgstr "Formato:" #: ../plugins/mpeg/mpeg.c:2336 ../plugins/mpeg/mpeg.c:2809 #: ../plugins/mpeg/mpeg.c:2837 ../plugins/mpeg/mpeg.c:2945 #: ../plugins/mpeg/mpeg_properties.glade2.h:7 msgid "Record" msgstr "Grabar" #: ../plugins/mpeg/mpeg.c:2625 msgid "Not implemented yet" msgstr "No hecho todavía" #: ../plugins/mpeg/mpeg.c:2802 msgid "Record a video stream" msgstr "Grabar un vídeo." #: ../plugins/mpeg/mpeg.c:2887 msgid "Audio/Video Recorder" msgstr "Grabador de Audio/Vídeo" #: ../plugins/mpeg/mpeg.c:2890 msgid "This plugin records video and audio into a file" msgstr "Este plugin te permite comprimir audio y vídeo a un fichero" #: ../plugins/mpeg/mpeg.c:2893 msgid "Record video and audio." msgstr "Grabar audio y vídeo." #: ../plugins/mpeg/mpeg_properties.glade2.h:1 msgid "-" msgstr "-" #: ../plugins/mpeg/mpeg_properties.glade2.h:2 msgid "Capture _height:" msgstr "A_lto de la captura:" #: ../plugins/mpeg/mpeg_properties.glade2.h:3 msgid "Capture _width:" msgstr "A_ncho de la captura:" #: ../plugins/mpeg/mpeg_properties.glade2.h:4 msgid "Co_dec:" msgstr "Co_dec:" #: ../plugins/mpeg/mpeg_properties.glade2.h:5 #: ../plugins/screenshot/screenshot.glade2.h:3 msgid "Destination file" msgstr "Fichero destino" #: ../plugins/mpeg/mpeg_properties.glade2.h:6 msgid "Fil_e format" msgstr "_Formato" #: ../plugins/mpeg/mpeg_properties.glade2.h:8 msgid "Record _all subtitles" msgstr "Grabar _todos los subtítulos" #: ../plugins/mpeg/mpeg_properties.glade2.h:9 msgid "Record this channel or _page:" msgstr "Grabar este canal o _página:" #: ../plugins/mpeg/mpeg_properties.glade2.h:10 msgid "Save _as:" msgstr "Guardar _como:" #: ../plugins/mpeg/mpeg_properties.glade2.h:11 msgid "_Audio" msgstr "_Audio" #: ../plugins/mpeg/mpeg_properties.glade2.h:12 msgid "_Caption and Subtitles" msgstr "_Texto y Subtítulos" #: ../plugins/mpeg/mpeg_properties.glade2.h:13 msgid "_Codec:" msgstr "_Codec:" #: ../plugins/mpeg/mpeg_properties.glade2.h:14 msgid "_Configure..." msgstr "_Configurar..." #: ../plugins/mpeg/mpeg_properties.glade2.h:15 msgid "_Delete" msgstr "_Eliminar" #: ../plugins/mpeg/mpeg_properties.glade2.h:16 msgid "_Embedded in the video file:" msgstr "_En el fichero de vídeo:" #: ../plugins/mpeg/mpeg_properties.glade2.h:17 #: ../plugins/screenshot/screenshot.glade2.h:13 msgid "_Format:" msgstr "_Formato:" #: ../plugins/mpeg/mpeg_properties.glade2.h:18 msgid "_New" msgstr "_Nueva" #: ../plugins/mpeg/mpeg_properties.glade2.h:19 msgid "_No caption or subtitle recording" msgstr "_Sin grabación de subtítulos" #: ../plugins/mpeg/mpeg_properties.glade2.h:20 msgid "_Pause" msgstr "_Pausa" #: ../plugins/mpeg/mpeg_properties.glade2.h:21 msgid "_Record" msgstr "_Grabar" #: ../plugins/mpeg/mpeg_properties.glade2.h:22 msgid "_Record the displayed caption or subtitles" msgstr "_Grabar los subtítulos mostrados" #: ../plugins/mpeg/mpeg_properties.glade2.h:23 msgid "_Stop" msgstr "_Parar" #: ../plugins/mpeg/mpeg_properties.glade2.h:24 msgid "_Subtitle file:" msgstr "Ficheros de _subtítulos:" #: ../plugins/mpeg/mpeg_properties.glade2.h:25 msgid "_Superimposed onto the picture" msgstr "_Sobre la imagen" #: ../plugins/mpeg/mpeg_properties.glade2.h:26 msgid "_Update live caption at line breaks" msgstr "_Actualizar el subtítulo en los saltos de línea" # src/v4l2interface.c:344 #: ../plugins/mpeg/mpeg_properties.glade2.h:27 ../src/zapping.c:500 msgid "_Video" msgstr "_Video" #: ../plugins/mpeg/options.c:741 msgid "No codec" msgstr "Ningún codec" #: ../plugins/screenshot/screenshot.c:45 msgid "Screenshot saver" msgstr "Grabador de screenshots" #: ../plugins/screenshot/screenshot.c:47 msgid "" "With this plugin you can take screen shots of the program you are watching " "and save them in various formats." msgstr "" "Puedes usar este plugin para grabar la imagen de lo que estás viendo en " "múltiples formatos." #: ../plugins/screenshot/screenshot.c:50 msgid "This plugin takes screenshots of the video capture." msgstr "Este plugin toma un screenshot de lo que estés viendo." #: ../plugins/screenshot/screenshot.c:517 #: ../plugins/screenshot/screenshot.c:542 #: ../plugins/screenshot/screenshot.c:1525 msgid "Screenshot" msgstr "Screenshot" #: ../plugins/screenshot/screenshot.c:547 msgid "Take a screenshot" msgstr "Graba un screenshot" #: ../plugins/screenshot/screenshot.c:684 #: ../plugins/screenshot/screenshot.c:842 msgid "Error while writing screenshot\n" msgstr "Error al escribir el screenshot\n" #: ../plugins/screenshot/screenshot.c:892 msgid "Saving..." msgstr "Guardando..." # src/tveng.c:70 #: ../plugins/screenshot/screenshot.c:919 #, c-format msgid "" "Sorry, but I cannot write %s\n" "%s" msgstr "" "No se puede escribir %s\n" "%s" #: ../plugins/screenshot/screenshot.c:953 msgid "Sorry, not enough resources to create a new thread" msgstr "No hay suficientes recursos para crear un nuevo hilo, lo siento" #: ../plugins/screenshot/screenshot.c:958 msgid "There are too many threads" msgstr "Demasiados hilos" #: ../plugins/screenshot/screenshot.c:1147 #, c-format msgid "appx %u KB" msgstr "aproximadamente %u KB" #: ../plugins/screenshot/screenshot.c:1150 #, c-format msgid "appx %.2f MB" msgstr "aproximadamente %.2f MB" #: ../plugins/screenshot/screenshot.c:1225 #: ../plugins/screenshot/screenshot.c:1369 msgid "This format has no quality option" msgstr "Este formato no tiene opción de calidad" #: ../plugins/screenshot/screenshot.c:1405 msgid "Only useful with full size, unscaled picture (480 or 576 lines)" msgstr "Sólo es útil a tamaño completo, imagen no escalada (480 o 576 líneas)" #: ../plugins/screenshot/screenshot.glade2.h:1 msgid "Backward" msgstr "Atrás" #: ../plugins/screenshot/screenshot.glade2.h:2 msgid "Command to execute after the image has been saved" msgstr "Comando a ejecutar tras grabar la imagen" #: ../plugins/screenshot/screenshot.glade2.h:4 msgid "Forward" msgstr "Adelante" #: ../plugins/screenshot/screenshot.glade2.h:5 msgid "Grab full size image" msgstr "Capturar imagen de tamaño completo" #: ../plugins/screenshot/screenshot.glade2.h:6 msgid "Off" msgstr "Inactivo" #: ../plugins/screenshot/screenshot.glade2.h:7 msgid "Preview" msgstr "Previsualizar" #: ../plugins/screenshot/screenshot.glade2.h:8 ../plugins/teletext/view.c:2767 msgid "S_ubtitles" msgstr "S_ubtítulos" #: ../plugins/screenshot/screenshot.glade2.h:9 msgid "Save Screenshot" msgstr "Grabar Screenshot" #: ../plugins/screenshot/screenshot.glade2.h:10 msgid "_Add toolbar button" msgstr "_Añadir botón a la barra de herramientas" #: ../plugins/screenshot/screenshot.glade2.h:11 msgid "_Completion command:" msgstr "_Comando de completación:" #: ../plugins/screenshot/screenshot.glade2.h:12 msgid "_Deinterlace:" msgstr "_Deentrelazar:" #: ../plugins/screenshot/screenshot.glade2.h:14 msgid "_Grab on clicking OK" msgstr "_Grabar al pulsar Aceptar" #: ../plugins/screenshot/screenshot.glade2.h:15 msgid "_Quality:" msgstr "_Calidad:" #: ../plugins/screenshot/screenshot.glade2.h:16 msgid "_Save as:" msgstr "_Guardar como:" #: ../plugins/screenshot/screenshot.glade2.h:17 msgid "_Skip" msgstr "_Ignorar" #: ../plugins/screenshot/screenshot.glade2.h:18 msgid "pictures before grabbing" msgstr "cuadros antes de capturar" #: ../plugins/subtitle/main.c:47 ../src/main.c:199 msgid "Subtitles" msgstr "Subtítulos" #: ../plugins/subtitle/main.c:89 msgid "Subtitle plugin" msgstr "Plugin de subtítulos" #: ../plugins/subtitle/preferences.c:55 ../plugins/teletext/preferences.c:57 msgid "Western and Central Europe" msgstr "Europa Central y Occidental" # src/frequencies.c:821 #: ../plugins/subtitle/preferences.c:56 ../plugins/teletext/preferences.c:58 msgid "Eastern Europe" msgstr "Europa del Este" #: ../plugins/subtitle/preferences.c:57 ../plugins/teletext/preferences.c:59 msgid "Western Europe and Turkey" msgstr "Europa Occidental y Turquía" #: ../plugins/subtitle/preferences.c:58 ../plugins/teletext/preferences.c:60 msgid "Central and Southeast Europe" msgstr "Europa Central y Sudeste" #: ../plugins/subtitle/preferences.c:59 ../plugins/teletext/preferences.c:61 msgid "Cyrillic" msgstr "Cirílico" #: ../plugins/subtitle/preferences.c:60 ../plugins/teletext/preferences.c:62 msgid "Greek and Turkish" msgstr "Griego y Turco" #: ../plugins/subtitle/preferences.c:61 ../plugins/teletext/preferences.c:63 msgid "Arabic" msgstr "Árabe" #: ../plugins/subtitle/preferences.c:62 ../plugins/teletext/preferences.c:64 msgid "Hebrew and Arabic" msgstr "Hebreo y Árabe" #: ../plugins/subtitle/preferences.c:77 ../plugins/teletext/preferences.c:97 msgid "Nearest (fast, low quality)" msgstr "Más cercano (rápido, poca calidad)" #: ../plugins/subtitle/preferences.c:78 ../plugins/teletext/preferences.c:98 msgid "Tiles" msgstr "Losetas" #: ../plugins/subtitle/preferences.c:79 ../plugins/teletext/preferences.c:99 msgid "Bilinear" msgstr "Bilineal" #: ../plugins/subtitle/preferences.c:80 ../plugins/teletext/preferences.c:100 msgid "Hyper (slow, high quality)" msgstr "Hyper (lento, gran calidad)" #: ../plugins/subtitle/preferences.c:345 msgid "<b>Teletext</b>" msgstr "<b>Teletexto</b>" #: ../plugins/subtitle/preferences.c:347 ../plugins/teletext/preferences.c:303 msgid "_Default encoding:" msgstr "_Codificación por defecto:" #: ../plugins/subtitle/preferences.c:351 msgid "" "Some stations fail to transmit a complete language identifier, so the " "Subtitle viewer may not display the correct font or national characters. You " "can select your geographical region here as an additional hint." msgstr "" "Algunos canales no transmiten un identificador de idioma apropiado, así que " "puede que el visor de Teletexto no represente adecuadamente la fuente o los " "caracteres nacionales. Puedes seleccionar aquí tu zona geográfica como una " "ayuda adicional." #: ../plugins/subtitle/preferences.c:358 msgid "_Show double height characters" msgstr "_Mostrar caracteres de altura doble" #. TRANSLATORS: #. Closed Caption is a captioning system used mainly in the USA, #. and on VHS/LD/DVD in other countries. Europe uses Teletext for #. caption and subtitle transmissions. #: ../plugins/subtitle/preferences.c:365 msgid "<b>Closed Caption</b>" msgstr "<b>Closed Caption</b>" #: ../plugins/subtitle/preferences.c:367 msgid "_Foreground:" msgstr "_Primer plano:" #: ../plugins/subtitle/preferences.c:369 msgid "Closed Caption foreground color" msgstr "Color de _primer plano de Closed Caption:" #: ../plugins/subtitle/preferences.c:372 msgid "_Background:" msgstr "_Fondo:" #: ../plugins/subtitle/preferences.c:374 msgid "Closed Caption background color" msgstr "Color de fondo de Closed Caption" #: ../plugins/subtitle/preferences.c:383 msgid "_Roll live caption" msgstr "_Subtítulos dinámicos" #: ../plugins/subtitle/preferences.c:386 ../plugins/teletext/preferences.c:368 msgid "<b>Display</b>" msgstr "<b>Pantalla</b>" #: ../plugins/subtitle/preferences.c:388 ../plugins/teletext/preferences.c:370 msgid "_Brightness:" msgstr "_Brillo:" # src/interface.c:247 #: ../plugins/subtitle/preferences.c:410 ../plugins/teletext/preferences.c:392 msgid "_Contrast:" msgstr "_Contraste:" #: ../plugins/subtitle/preferences.c:432 ../plugins/teletext/preferences.c:414 msgid "S_caling:" msgstr "Es_calado:" #: ../plugins/subtitle/preferences.c:436 ../plugins/teletext/preferences.c:418 msgid "Quality/speed trade-off when scaling and anti-aliasing the page." msgstr "Relación calidad/velocidad al redimensionar y suavizar la página." # src/frequencies.c:817 #: ../plugins/subtitle/view.c:1660 ../src/subtitle.c:321 msgid "_Disable" msgstr "_Inhabilitar" #: ../plugins/subtitle/view.c:1662 msgid "_Reset position" msgstr "_Restaurar la posición" #: ../plugins/subtitle/view.c:1664 ../plugins/teletext/window.c:810 msgid "_Encoding" msgstr "_Codificación" #: ../plugins/teletext/bookmark.c:283 #, c-format msgid "Added page %x.%02x to bookmarks" msgstr "Página %x.%02x añadida a los marcadores" #: ../plugins/teletext/bookmark.c:287 #, c-format msgid "Added page %x to bookmarks" msgstr "Página %x añadida a los marcadores" #: ../plugins/teletext/bookmark.c:348 msgid "_Add Bookmark" msgstr "_Añadir Marcador" #: ../plugins/teletext/bookmark.c:354 msgid "_Edit Bookmarks..." msgstr "_Editar Marcadores..." #: ../plugins/teletext/bookmark.c:595 msgid "Bookmarks" msgstr "Marcadores" # src/interface.c:362 #: ../plugins/teletext/bookmark.c:634 msgid "Channel" msgstr "Canal" #: ../plugins/teletext/bookmark.c:640 msgid "Page" msgstr "Página" #: ../plugins/teletext/bookmark.c:645 msgid "Description" msgstr "Descripción" #: ../plugins/teletext/export.c:168 ../plugins/teletext/export.c:194 msgid "Could not save page" msgstr "No se puede grabar la página" #: ../plugins/teletext/export.c:239 msgid "Save as" msgstr "Guardar como" #: ../plugins/teletext/export.c:257 msgid "Format:" msgstr "Formato:" #: ../plugins/teletext/main.c:176 msgid "_Preferences" msgstr "_Preferencias" #: ../plugins/teletext/main.c:178 msgid "_Colors" msgstr "_Colores" #: ../plugins/teletext/main.c:204 ../src/main.c:198 msgid "Teletext" msgstr "Teletexto" #: ../plugins/teletext/main.c:277 msgid "Teletext plugin" msgstr "Plugin de teletexto" #: ../plugins/teletext/preferences.c:79 msgid "Level 1" msgstr "Nivel 1" #: ../plugins/teletext/preferences.c:80 msgid "Level 1.5 (additional national characters)" msgstr "Nivel 1.5 (caracteres nacionales adicionales)" #: ../plugins/teletext/preferences.c:81 msgid "Level 2.5 (more colors, font styles and graphics)" msgstr "Nivel 2.5 (más colores, fuentes y gráficos)" #: ../plugins/teletext/preferences.c:82 msgid "Level 3.5 (proportional spacing, multicolor graphics)" msgstr "Nivel 3.5 (espaciado proporcional, gráficos multicolor)" #: ../plugins/teletext/preferences.c:295 msgid "<b>General</b>" msgstr "<b>General</b>" #: ../plugins/teletext/preferences.c:297 msgid "_Teletext implementation:" msgstr "_Implementación de Teletexto:" #: ../plugins/teletext/preferences.c:307 msgid "" "Some stations fail to transmit a complete language identifier, so the " "Teletext viewer may not display the correct font or national characters. You " "can select your geographical region here as an additional hint." msgstr "" "Algunos canales no transmiten un identificador de idioma apropiado, así que " "puede que el Teletexto no represente adecuadamente la fuente o los " "caracteres nacionales. Puedes seleccionar aquí tu zona geográfica como una " "ayuda adicional." #: ../plugins/teletext/preferences.c:313 msgid "<b>Page memory</b>" msgstr "<b>Memoria de páginas</b>" #: ../plugins/teletext/preferences.c:315 msgid "_Size:" msgstr "_Tamaño:" #. expand #. fill #. pad #. TRANSLATORS: Kilobyte (2^10) #: ../plugins/teletext/preferences.c:341 msgid "KiB" msgstr "KiB" # src/interface.c:362 #: ../plugins/teletext/preferences.c:348 msgid "_Channels:" msgstr "_Canales:" #: ../plugins/teletext/search.c:131 ../plugins/teletext/search.c:349 msgid "Search text:" msgstr "Buscar texto:" #: ../plugins/teletext/search.c:153 #, c-format msgid "Found text on page %x.%02x:" msgstr "Se encontró el texto en la página %x.%02x:" #: ../plugins/teletext/search.c:160 msgid "Not found:" msgstr "No encontrado:" #: ../plugins/teletext/search.c:171 msgid "Page memory is empty" msgstr "La memoria de páginas está vacía" #: ../plugins/teletext/search.c:342 ../plugins/teletext/view.c:3260 msgid "Search page memory" msgstr "Buscar en la memoria de páginas" #: ../plugins/teletext/search.c:358 msgid "_Regular expression" msgstr "_Expresión regular" #: ../plugins/teletext/search.c:363 msgid "Search case _insensitive" msgstr "Buscar sin distinguir _mayúsculas y minúsculas" # src/v4l2interface.c:146 #. Future stuff. #: ../plugins/teletext/search.c:369 msgid "_All channels" msgstr "_Todos los canales" #: ../plugins/teletext/toolbar.c:122 msgid "Next page" msgstr "Siguiente página" #: ../plugins/teletext/toolbar.c:125 msgid "Previous page" msgstr "Página anterior" #: ../plugins/teletext/toolbar.c:128 msgid "Previous subpage" msgstr "Subpágina anterior" #: ../plugins/teletext/toolbar.c:131 msgid "Next subpage" msgstr "Siguiente subpágina" #: ../plugins/teletext/toolbar.c:188 msgid "Open new Teletext window" msgstr "Abrir una nueva ventana de Teletexto" #: ../plugins/teletext/toolbar.c:210 msgid "Hold the current subpage" msgstr "Congelar la subpágina actual" #: ../plugins/teletext/toolbar.c:240 msgid "Reveal" msgstr "Mostrar" #: ../plugins/teletext/toolbar.c:241 msgid "Reveal concealed text" msgstr "Mostrar texto oculto" #: ../plugins/teletext/view.c:846 #, c-format msgid " Page %x" msgstr " Página %x" #: ../plugins/teletext/view.c:850 #, c-format msgid " Subpage %x" msgstr " Subpágina %x" #: ../plugins/teletext/view.c:1459 #, c-format msgid "Loading page %X..." msgstr "Cargando página %X..." #: ../plugins/teletext/view.c:1461 #, c-format msgid "Loading page %X.%02X..." msgstr "Cargando página %X.%02X..." #: ../plugins/teletext/view.c:2372 msgid "Selection copied to clipboard" msgstr "Selección copiada al portapapeles" #: ../plugins/teletext/view.c:2454 msgid "No page loaded" msgstr "Ninguna página cargada" #: ../plugins/teletext/view.c:2467 msgid "Selecting - press Shift key for table mode" msgstr "Seleccionando - pulse Shift para modo tabla" #: ../plugins/teletext/view.c:2627 msgid "Subtitle index" msgstr "Índice de subtítulos" #: ../plugins/teletext/view.c:2634 msgid "Now and Next" msgstr "Acto y seguido" #: ../plugins/teletext/view.c:2640 msgid "Current program" msgstr "Programa actual" #: ../plugins/teletext/view.c:2646 msgid "Program Index" msgstr "Índice de programas" #: ../plugins/teletext/view.c:2652 msgid "Program Schedule" msgstr "Horario de emisión" #. TRANSLATORS: Schedule changes and the like. #: ../plugins/teletext/view.c:2660 msgid "Program Warning" msgstr "Aviso del programa" #: ../plugins/teletext/view.c:2721 msgid "_Open" msgstr "_Abrir" #: ../plugins/teletext/view.c:2727 msgid "Open in _New Window" msgstr "Abrir en _Nueva ventana" #: ../plugins/teletext/view.c:2738 msgid "_Open Link" msgstr "A_brir Vínculo" #: ../plugins/teletext/view.c:2749 ../plugins/teletext/window.c:805 msgid "_New Window" msgstr "Nueva _Ventana" #: ../plugins/teletext/view.c:2755 msgid "_Save as..." msgstr "_Guardar como..." #: ../plugins/teletext/view.c:2761 msgid "S_earch..." msgstr "_Buscar..." #: ../plugins/teletext/view.c:2773 ../plugins/teletext/window.c:812 #: ../src/zapping.c:497 msgid "_Bookmarks" msgstr "_Marcadores" #: ../plugins/teletext/view.c:3252 msgid "_Go" msgstr "_Ir" #: ../plugins/teletext/view.c:3254 msgid "Previous page in history" msgstr "Historia - Anterior" #: ../plugins/teletext/view.c:3256 msgid "Next page in history" msgstr "Historia - Siguiente" #: ../plugins/teletext/view.c:3257 msgid "Index" msgstr "Índice" #: ../plugins/teletext/view.c:3258 msgid "Go to the index page" msgstr "Ir al índice" #: ../plugins/teletext/view.c:3262 msgid "Save this page to a file" msgstr "Guardar esta página en un fichero" #. TRANSLATORS: Choose from the Teletext page cache the currently #. received channel. #: ../plugins/teletext/window.c:317 msgid "_Received" msgstr "_Recibido" #: ../plugins/teletext/window.c:349 ../src/v4linterface.c:1317 #: ../src/v4linterface.c:2520 msgid "Unnamed" msgstr "Sin nombre" #: ../plugins/teletext/window.c:571 ../src/zvbi.c:221 msgid " (Latin)" msgstr " (Latín)" #: ../plugins/teletext/window.c:573 ../src/zvbi.c:223 msgid " (Cyrillic)" msgstr " (Cirílico)" #: ../plugins/teletext/window.c:616 ../src/zvbi.c:238 msgid "_Automatic" msgstr "_Automático" #: ../plugins/teletext/window.c:804 ../src/zapping.c:428 msgid "_File" msgstr "_Archivo" #: ../plugins/teletext/window.c:808 ../src/zapping.c:436 msgid "_Edit" msgstr "_Editar" # src/v4l2interface.c:344 #: ../plugins/teletext/window.c:809 ../src/zapping.c:443 msgid "_View" msgstr "_Ver" # src/interface.c:362 #. 2.6 GTK_STOCK_EDIT #: ../plugins/teletext/window.c:811 ../src/zapping.c:441 ../src/zapping.c:454 msgid "_Channels" msgstr "_Canales" #: ../plugins/teletext/window.c:871 ../src/zapping.c:476 msgid "_Toolbar" msgstr "_Barra de herramientas" #: ../plugins/teletext/window.c:873 msgid "_Statusbar" msgstr "Barra de _Estado" #. TRANSLATORS: Soundcard mixer line. #: ../src/audio.c:807 msgid "Input:" msgstr "Entrada:" #: ../src/audio.c:840 ../src/keyboard.c:1154 ../src/osd.c:1080 #: ../src/properties.c:991 ../src/properties-handler.c:1353 msgid "General Options" msgstr "Opciones generales" #: ../src/audio.c:939 msgid "<span foreground=\"blue\">Audio off</span>" msgstr "<span foreground=\"blue\">Audio apagado</span>" #: ../src/audio.c:940 msgid "<span foreground=\"yellow\">Audio on</span>" msgstr "<span foreground=\"yellow\">Audio encendido</span>" #: ../src/capture.c:866 msgid "Cannot stop capturing while recording." msgstr "No se puede para la captura mientras se graba." #: ../src/capture.c:1052 #, c-format msgid "Cannot start capturing: %s" msgstr "No se puede empezar a capturar: %s" #: ../src/channel_editor.c:592 #, c-format msgid "Channel: %s Found: %u" msgstr "Canal: %s Encontrados: %u" #: ../src/channel_editor.c:715 msgid "Searching..." msgstr "Buscando..." # src/interface.c:336 #: ../src/channel_editor.c:1452 msgid "Select the frequency table used in your country" msgstr "Selecciona la tabla de frecuencias utilizada en tu país" #: ../src/channel_editor.c:1596 msgid "Ch. Name" msgstr "Nombre" # src/interface.c:369 # glade/glade_strings.c:149, glade/glade_strings.c:155 #: ../src/channel_editor.c:1601 msgid "Freq (MHz)" msgstr "Frec (MHz)" # src/interface.c:405 #. append #: ../src/channel_editor.c:1654 msgid "Channel name" msgstr "Nombre del canal" #. append #: ../src/channel_editor.c:1658 msgid "Video input" msgstr "Entrada de vídeo" # src/interface.c:362 #. append #: ../src/channel_editor.c:1662 msgid "RF Channel" msgstr "Canal RF" # src/v4l2interface.c:344 #. append #: ../src/channel_editor.c:1666 msgid "Video standard" msgstr "Estándar de vídeo" #. append #: ../src/channel_editor.c:1670 ../src/keyboard.c:444 msgid "Accelerator" msgstr "Acelerador" #: ../src/channel_editor.c:1685 msgid "Do not change input" msgstr "No cambiar la entrada" #: ../src/channel_editor.c:1709 msgid "Do not change standard" msgstr "No cambiar el estándar" # src/interface.c:405 #: ../src/channel_editor.c:1748 msgid "Channel editor" msgstr "Editor de canales" #: ../src/channel_editor.c:1772 msgid "Region" msgstr "Región" #: ../src/channel_editor.c:1808 msgid "Automatic station _search" msgstr "_Busqueda automática de canales" #: ../src/channel_editor.c:1814 msgid "" "Select a suitable frequency table, then click here to search through all " "channels in the table and add the received stations to the channel list." msgstr "" "Selecciona tu país y pulsa aquí para buscar los canales recibidos entre los " "canales presentes en la tabla de frecuencias." # src/v4l2interface.c:146 #: ../src/channel_editor.c:1820 msgid "Add all _channels" msgstr "Añadir todos los _canales" #: ../src/channel_editor.c:1827 msgid "Add all channels in the frequency table to the channel list." msgstr "" "Añadir todos los canales en la tabla de frecuencias a la lista de canales." #: ../src/channel_editor.c:1831 msgid "_Import XawTV configuration" msgstr "_Importar la configuración de XawTV" # src/interface.c:405 #: ../src/channel_editor.c:1858 msgid "Channel List" msgstr "Lista de canales" # src/interface.c:362 #: ../src/channel_editor.c:1893 msgid "Edit channel" msgstr "Editar el canal" #: ../src/channel_editor.c:1910 msgid "Name:" msgstr "Nombre:" #: ../src/channel_editor.c:1919 msgid "Video input:" msgstr "Entrada de vídeo:" #: ../src/channel_editor.c:1930 msgid "Fine tuning:" msgstr "Ajuste fino:" #: ../src/channel_editor.c:1936 msgid "MHz" msgstr "MHz" # src/v4l2interface.c:344 #: ../src/channel_editor.c:1947 msgid "Video standard:" msgstr "Estándar de vídeo:" #: ../src/channel_editor.c:1958 msgid "Accelerator:" msgstr "Acelerador:" #: ../src/eggcellrendererkeys.c:163 ../src/eggcellrendererkeys.c:164 msgid "Accelerator key" msgstr "Tecla" #: ../src/eggcellrendererkeys.c:173 ../src/eggcellrendererkeys.c:174 msgid "Accelerator modifiers" msgstr "Modificadores" #: ../src/eggcellrendererkeys.c:183 msgid "Accelerator Mode" msgstr "Modo" #: ../src/eggcellrendererkeys.c:184 msgid "The type of accelerator." msgstr "El tipo de acelerador." #: ../src/eggcellrendererkeys.c:333 ../src/eggcellrendererkeys.c:567 msgid "Type a new accelerator, or press Backspace to clear" msgstr "Teclee un nuevo acelerador, o retorno (BkSp) para borrar" #: ../src/eggcellrendererkeys.c:570 msgid "Type a new accelerator" msgstr "Teclee un nuevo acelerador" #: ../src/frequencies.c:94 ../src/frequencies.c:160 msgid "broadcast" msgstr "difusión" #: ../src/frequencies.c:107 msgid "cable IRC" msgstr "cable IRC" #: ../src/frequencies.c:126 msgid "cable HRC" msgstr "cable HRC" # src/frequencies.c:817 #: ../src/frequencies.c:144 ../src/frequencies.c:172 msgid "cable" msgstr "cable" #. TRANSLATORS: Leave "Autocom" untranslated. #: ../src/frequencies.c:275 msgid "Autocom cable" msgstr "Cable Autocom" # src/interface.c:247 #: ../src/keyboard.c:89 ../src/keyboard.c:112 msgid "Ctrl+" msgstr "Ctrl+" #: ../src/keyboard.c:90 ../src/keyboard.c:113 msgid "Alt+" msgstr "Alt+" #: ../src/keyboard.c:91 ../src/keyboard.c:114 msgid "Shift+" msgstr "Shift+" #: ../src/keyboard.c:525 msgid "Key table..." msgstr "Teclas..." #: ../src/keyboard.c:1106 msgid "Command" msgstr "Comando" #: ../src/keyboard.c:1120 ../src/properties-handler.c:801 msgid "Shortcut" msgstr "Atajo" #: ../src/main.c:197 ../src/tveng1.c:1358 ../src/tveng25.c:566 #: ../src/tvengbktr.c:414 ../src/tveng.c:2340 ../src/tvengxv.c:878 msgid "Mute" msgstr "Silencio" #. warnings #: ../src/main.c:273 ../src/main.c:308 #, c-format msgid "" "Capture mode couldn't be started:\n" "%s" msgstr "" "No se pudo iniciar el modo captura:\n" "%s" #: ../src/main.c:291 #, c-format msgid "" "Cannot restore previous mode, will try capture mode:\n" "%s" msgstr "" "No se pudo restaurar el modo anterior, se intentará el modo captura:\n" "%s" #: ../src/main.c:299 #, c-format msgid "" "Capture mode couldn't be started either:\n" "%s" msgstr "" "El modo captura tampoco pudo ser iniciado:\n" "%s" #: ../src/main.c:302 #, c-format msgid "" "Cannot restore previous mode:\n" "%s" msgstr "" "No se pudo restaurar el modo anterior:\n" "%s" #: ../src/main.c:376 msgid "Kernel video device" msgstr "Dispositivo de vídeo del núcleo" #: ../src/main.c:377 msgid "FILENAME" msgstr "FICHERO" #: ../src/main.c:388 ../src/main.c:406 msgid "XVideo video input port" msgstr "Puerto de entrada de XVideo" #: ../src/main.c:397 msgid "XVideo image overlay port" msgstr "Puerto para el overlay XVideo" #: ../src/main.c:415 msgid "Disable XVideo video input support" msgstr "Sin soporte de entrada de vídeo XVideo" #: ../src/main.c:424 msgid "Disable XVideo image overlay support" msgstr "Sin soporte de overlay XVideo" #: ../src/main.c:433 msgid "Disable XVideo extension support" msgstr "Sin soporte de XVideo" #: ../src/main.c:445 msgid "Disable video overlay" msgstr "Inhabilitar overlay de vídeo" #: ../src/main.c:454 msgid "X display is remote, disable video overlay" msgstr "El display X es remoto, se inhabilita el overlay de video" #: ../src/main.c:463 msgid "Disable VBI support" msgstr "Sin soporte de VBI" #: ../src/main.c:472 msgid "Disable plugins" msgstr "Sin soporte de plugins" #. TRANSLATORS: --no-zsfb command line option. #. TRANSLATORS: --yuv-format command line option. #. TRANSLATORS: --tunerless-norm command line option. #: ../src/main.c:486 ../src/main.c:550 ../src/main.c:560 msgid "Obsolete" msgstr "Obsoleto" #: ../src/main.c:504 msgid "Color depth of the X display" msgstr "Profundidad de color del servidor X" #: ../src/main.c:505 msgid "BPP" msgstr "BPP" #: ../src/main.c:513 msgid "Print debug messages" msgstr "Imprimir mensajes de depurado" #: ../src/main.c:531 msgid "Force dword alignment of the overlay window" msgstr "Forzar alineamiento a dword de la ventana de overlay" #: ../src/main.c:540 msgid "Execute the given command and exit" msgstr "Ejecutar el comando dado y salir" #: ../src/main.c:541 msgid "CMD" msgstr "CMD" #: ../src/main.c:569 msgid "Override CPU detection" msgstr "Especificar la CPU manualmente" #: ../src/main.c:658 msgid "Sorry, but there is no module support in GLib" msgstr "Lo siento, pero no hay soporte para módulos en GLib" # src/callbacks.c:320 src/v4l2interface.c:89 #: ../src/main.c:782 msgid "Cannot get device info struct" msgstr "No se puede obtener el dispositivo" #: ../src/main.c:791 msgid "Zapping couldn't be started" msgstr "Zapping no se pudo iniciar" #: ../src/main.c:845 #, c-format msgid "Couldn't open %s, try other devices?" msgstr "No se pudo abrir %s, ¿pruebo algunos otros dispositivos?" #: ../src/main.c:872 #, c-format msgid "%s suceeded, setting it as the new default" msgstr "%s funcionó, es el nuevo valor por defecto" #: ../src/main.c:882 #, c-format msgid "" "Sorry, but \"%s\" could not be opened:\n" "%s" msgstr "" "Lo siento, pero \"%s\" no se pudo abrir:\n" "%s" #: ../src/main.c:1242 #, c-format msgid "" "ZConf could not be closed properly , your\n" "configuration will be lost.\n" "Possible causes for this are:\n" " - There is not enough free memory\n" " - You do not have permissions to write to $HOME/.zapping\n" " - libxml is non-functional (?)\n" " - or, more probably, you have found a bug in\n" " %s. Please contact the author.\n" msgstr "" "Zconf falló al ser cerrado, se perderá la configuración.\n" "Algunas posibles causas son:\n" " - No hay suficiente memoria libre\n" " - $HOME/.zapping no tiene permiso de escritura\n" " - libxml no funciona bien (?)\n" " - o, más probablemente, esto es un fallo de %s.\n" " Por favor contacte con el autor.\n" #: ../src/main.c:1268 msgid "Sorry, Zapping is unable to create the config tree" msgstr "Zapping no puede crear la configuración" #: ../src/mixer.c:103 msgid "The soundcard mixer is not configured." msgstr "EL mezclador de sonido no está configurado." #: ../src/osd.c:601 msgid "Please choose a font for OSD in preferences." msgstr "Por favor elija una fuente para OSD en las preferencias." #: ../src/osd.c:604 #, c-format msgid "" "The configured font \"%s\" cannot be loaded, please select another one in " "preferences\n" msgstr "" "La fuente configurada \"%s\" no pudo ser cargada, por favor elija otra en " "las preferencias\n" #: ../src/osd.c:614 msgid "" "No font could be loaded, please make sure\n" "your system is properly configured." msgstr "" "No se pudo cargar ninguna fuente, por favor asegúrese\n" "de que sus sistema está configurado correctamente." # src/frequencies.c:827 #: ../src/oss.c:186 msgid "Audio device:" msgstr "Dispositivo de audio:" #: ../src/oss.c:189 msgid "Select the audio device" msgstr "Selecciona el dispositivo de audio" #: ../src/oss.c:216 #, c-format msgid "The given audio device \"%s\" doesn't exist" msgstr "El dispositivo de audio \"%s\" no existe" #. TRANSLATORS: Name of mixer line, mono as #. opposed to stereo. #: ../src/oss.c:920 #, c-format msgid "%s (Mono)" msgstr "%s (Mono)" #: ../src/plugin_properties.c:118 msgid "Very low" msgstr "Muy baja" #: ../src/plugin_properties.c:122 msgid "Lower" msgstr "Más baja" #: ../src/plugin_properties.c:124 msgid "Normal" msgstr "Normal" #: ../src/plugin_properties.c:126 msgid "Very high" msgstr "Muy alta" #: ../src/plugin_properties.c:130 msgid "Higher" msgstr "Más alta" #: ../src/plugin_properties.c:152 msgid "This plugin has no public symbols" msgstr "Este plugin no tiene símbolos públicos" #: ../src/plugin_properties.c:171 msgid "List of symbols exported by the plugin" msgstr "Lista de símbolos exportados por el plugin" #: ../src/plugin_properties.c:213 msgid "Sorry, the plugin couldn't be started" msgstr "Lo siento, el plugin no puede ser iniciado" #: ../src/plugin_properties.c:273 msgid "Sorry, but no plugins have been loaded" msgstr "No se ha cargado ningún plugin" #: ../src/plugin_properties.c:308 msgid "Plugin name" msgstr "Nombre del Plugin" #: ../src/plugin_properties.c:335 msgid "Symbol" msgstr "Símbolo" #: ../src/plugin_properties.c:340 msgid "Hash" msgstr "Hash" #: ../src/plugins.c:190 #, c-format msgid "\"%s\" doesn't provide a version" msgstr "\"%s\" no proporciona una versión" #: ../src/plugins.c:227 msgid "Insufficient memory" msgstr "Memoria insuficiente" #: ../src/plugins.c:236 msgid "No description available" msgstr "Sin descripción" #. Warn #: ../src/plugins.c:350 #, c-format msgid "" "Check error: \"%s\" in plugin %s was supposed to be \"%s\" but it is:\"%s\". " "Hashes are 0x%x vs. 0x%x" msgstr "" "Error de comprobación: \"%s\" en el plugin %s se suponía \"%s\", pero es\n" "\"%s\".\n" "Las hashes son 0x%x y 0x%x" #: ../src/properties.c:622 msgid "Zapping Properties" msgstr "Propiedades de Zapping" #: ../src/properties-handler.c:86 msgid "Can capture to memory.\n" msgstr "Puede capturar a la memoria.\n" #: ../src/properties-handler.c:88 msgid "Has some tuner.\n" msgstr "Tiene un sintonizador.\n" #: ../src/properties-handler.c:90 msgid "Supports the teletext service.\n" msgstr "Soporta teletexto.\n" #: ../src/properties-handler.c:92 msgid "Can overlay the image.\n" msgstr "Soporta overlay.\n" #: ../src/properties-handler.c:94 msgid "Can chromakey the image.\n" msgstr "Puede hacer chromakey.\n" #: ../src/properties-handler.c:96 msgid "Clipping rectangles are supported.\n" msgstr "Recorte de zonas soportado.\n" #: ../src/properties-handler.c:98 msgid "Framebuffer memory is overwritten.\n" msgstr "Se sobreescribe la memoria del FB.\n" #: ../src/properties-handler.c:100 msgid "The capture can be scaled.\n" msgstr "La captura puede ser escalada.\n" #: ../src/properties-handler.c:102 msgid "Only monochrome is available\n" msgstr "Sólo se soporta monocromo.\n" #: ../src/properties-handler.c:104 msgid "The capture can be zoomed\n" msgstr "Se pueden hacer zooms\n" # src/v4l2interface.c:344 #: ../src/properties-handler.c:115 msgid "No available inputs" msgstr "Sin entradas desponibles" #: ../src/properties-handler.c:117 msgid "Your video device has no inputs" msgstr "Tu dispositivo no tiene entradas" #: ../src/properties-handler.c:132 msgid "TV input" msgstr "Entrada de TV" #: ../src/properties-handler.c:134 msgid "Camera" msgstr "Cámara" #: ../src/properties-handler.c:413 #, c-format msgid "Resize to %ux%u" msgstr "Redimensionar a %ux%u" #. append #: ../src/properties-handler.c:778 msgid "Width" msgstr "Ancho" #: ../src/properties-handler.c:778 msgid "Height" msgstr "Altura" #: ../src/properties-handler.c:892 msgid "Text Below Icons" msgstr "Texto bajo iconos" #: ../src/properties-handler.c:893 msgid "Priority Text Beside Icons" msgstr "Texto prioritario al lado de iconos" #: ../src/properties-handler.c:894 msgid "Icons Only" msgstr "Sólo iconos" #: ../src/properties-handler.c:895 msgid "Text Only" msgstr "Sólo texto" #: ../src/properties-handler.c:960 #, c-format msgid "Use desktop default (%s)" msgstr "Usar lo preestablecido en el escritorio (%s)" #. TRANSLATORS: Fullscreen video mode #: ../src/properties-handler.c:1160 msgid "Do not change" msgstr "No cambiar" #: ../src/properties-handler.c:1164 ../src/tveng.c:4841 msgid "Automatic" msgstr "Automático" #. TRANSLATORS: Fullscreen video mode #: ../src/properties-handler.c:1179 #, c-format msgid "%u x %u @ %u Hz" msgstr "%u x %u @ %u Hz" #: ../src/properties-handler.c:1344 msgid "Main Window" msgstr "Ventana principal" #: ../src/subtitle.c:258 #, c-format msgid "Page %x" msgstr "Página %x" #: ../src/tveng1.c:1419 msgid "Frame Rate" msgstr "Cuadros por segundo" #: ../src/tveng1.c:1434 msgid "Snapshot Mode" msgstr "Modo \"Snapshot\"" #: ../src/tveng1.c:2571 ../src/tveng25.c:1490 #, c-format msgid "Driver %s returned an unknown or invalid frame buffer format." msgstr "" #: ../src/tveng25.c:547 ../src/tvengbktr.c:383 ../src/tvengbktr.c:400 #: ../src/tvengxv.c:872 msgid "Brightness" msgstr "Brillo" # src/interface.c:247 #: ../src/tveng25.c:548 ../src/tvengbktr.c:385 ../src/tvengbktr.c:402 #: ../src/tvengxv.c:873 msgid "Contrast" msgstr "Contraste" #: ../src/tveng25.c:549 ../src/tvengbktr.c:387 ../src/tvengbktr.c:404 #: ../src/tvengxv.c:874 msgid "Saturation" msgstr "Saturación" #: ../src/tveng25.c:550 ../src/tvengbktr.c:393 ../src/tvengbktr.c:412 #: ../src/tvengxv.c:875 msgid "Hue" msgstr "Intensidad" #: ../src/tveng25.c:551 msgid "Whiteness" msgstr "Blanco" #: ../src/tveng25.c:552 msgid "Black level" msgstr "Nivel de negro" # src/frequencies.c:827 #: ../src/tveng25.c:553 ../src/tveng25.c:554 msgid "White balance" msgstr "Nivel de blanco" # src/frequencies.c:827 #: ../src/tveng25.c:555 msgid "Red balance" msgstr "Nivel de rojo" # src/frequencies.c:827 #: ../src/tveng25.c:556 msgid "Blue balance" msgstr "Nivel de azul" #: ../src/tveng25.c:557 msgid "Gamma" msgstr "Gamma" #: ../src/tveng25.c:558 msgid "Exposure" msgstr "Exposición" #: ../src/tveng25.c:559 msgid "Auto gain" msgstr "Auto ganancia" #: ../src/tveng25.c:560 msgid "Gain" msgstr "Ganancia" #: ../src/tveng25.c:561 msgid "HCenter" msgstr "CentroH" #: ../src/tveng25.c:562 msgid "VCenter" msgstr "CentroV" #: ../src/tveng25.c:563 msgid "Hor. flipping" msgstr "Voltear hor." #: ../src/tveng25.c:564 msgid "Vert. flipping" msgstr "Voltear vert." #: ../src/tveng25.c:565 ../src/tveng.c:2327 ../src/tvengxv.c:879 msgid "Volume" msgstr "Volumen" #: ../src/tveng25.c:567 msgid "Audio Mute" msgstr "Silencio" # src/frequencies.c:827 #: ../src/tveng25.c:568 msgid "Balance" msgstr "Balance" # src/frequencies.c:827 #: ../src/tveng25.c:569 msgid "Audio Balance" msgstr "Balance" #: ../src/tveng25.c:570 msgid "Treble" msgstr "Trémolo" #: ../src/tveng25.c:571 msgid "Loudness" msgstr "Volúmen" #: ../src/tveng25.c:572 msgid "Bass" msgstr "Bajos" #: ../src/tveng25.c:2745 #, c-format msgid "%s doesn't look like a valid capture device" msgstr "%s no parece un dispositivo de captura válido" # src/tveng.c:70 #: ../src/tveng25.c:2764 #, c-format msgid "Sorry, but \"%s\" cannot do streaming" msgstr "\"%s\" no puede capturar, lo siento" #: ../src/tvengbktr.c:390 msgid "U/V Gain" msgstr "Ganancia U/B" #: ../src/tvengbktr.c:407 msgid "U Saturation" msgstr "Saturación U" #: ../src/tvengbktr.c:409 msgid "V Saturation" msgstr "Saturación V" #: ../src/tveng.c:3214 #, fuzzy, c-format msgid "Cannot execute %s. Pipe error." msgstr "" "No se puede ejecutar %s.\n" "%s" #: ../src/tveng.c:3221 ../src/tveng.c:3253 #, fuzzy, c-format msgid "Cannot execute %s. %s." msgstr "" "No se puede ejecutar %s.\n" "%s" #. TRANSLATORS: Program name, error message. #: ../src/tveng.c:3231 #, c-format msgid "" "%s failed.\n" "%s" msgstr "" "%s falló.\n" "%s" #. Something executed, but it wasn't #. zapping_setup_fb. Perhaps consolehelper #. couldn't authenticate the user? #: ../src/tveng.c:3243 #, fuzzy, c-format msgid "Cannot execute %s. No permission?" msgstr "" "No se puede ejecutar %s.\n" "%s" #: ../src/tveng.c:3352 #, c-format msgid "Cannot determine current overlay parameters. %s" msgstr "" #. TRANSLATORS: Program name. #: ../src/tveng.c:3361 #, fuzzy, c-format msgid "%s did not work as expected." msgstr "%s no es un dispositivo." #: ../src/tveng.c:3466 #, c-format msgid "%s not found in %s or the executable search path." msgstr "%s no se encuentra en %s o en la ruta de búsqueda de ejecutables." #: ../src/tveng.c:4848 msgid "Mono" msgstr "Mono" #: ../src/tveng.c:4855 msgid "Stereo" msgstr "Estéreo" #: ../src/tveng.c:4863 msgid "Language 2" msgstr "Idioma 2" #: ../src/tvengxv.c:876 msgid "Color" msgstr "Color" #: ../src/tvengxv.c:877 msgid "Interlace" msgstr "Entrelazado" #: ../src/tvengxv.c:918 msgid "No" msgstr "No" #: ../src/tvengxv.c:919 msgid "Yes" msgstr "Sí" #: ../src/tvengxv.c:920 msgid "Doublescan" msgstr "Doublescan" #. TRANSLATORS: In controls box, color picker control, #. something like "Adjust Chroma-Key" for overlay. #: ../src/v4linterface.c:452 #, c-format msgid "Adjust %s" msgstr "Ajustar %s" # src/interface.c:247 #: ../src/v4linterface.c:621 ../src/zapping.c:466 msgid "Controls" msgstr "Controles" #: ../src/v4linterface.c:1308 ../src/zmisc.c:1811 msgid "Unknown" msgstr "Desconocido" #: ../src/v4linterface.c:1326 msgid "No input" msgstr "Sin entradas" # src/v4l2interface.c:344 #: ../src/v4linterface.c:1337 msgid "No standard" msgstr "Sin estándares" # src/v4l2interface.c:344 #: ../src/v4linterface.c:2410 msgid "Video standards" msgstr "Estándares de vídeo" #: ../src/v4linterface.c:2430 msgid "Audio inputs" msgstr "Entradas de audio" #: ../src/v4linterface.c:2450 msgid "Video inputs" msgstr "Entradas de vídeo" # src/v4l2interface.c:146 #. TRANSLATORS: This is displayed in the channel menu when #. the channel list is empty. #: ../src/v4linterface.c:2548 msgid "No channels" msgstr "No hay canales" #: ../src/zapping.c:439 msgid "P_lugins" msgstr "P_lugins" #: ../src/zapping.c:444 ../src/zapping.c:485 msgid "_Window" msgstr "_Ventana" #: ../src/zapping.c:446 ../src/zapping.c:487 msgid "_Fullscreen" msgstr "_Pantalla Completa" #: ../src/zapping.c:448 ../src/zapping.c:489 msgid "_Background" msgstr "_Fondo" #: ../src/zapping.c:450 msgid "_Overlay mode" msgstr "Modo _Overlay" #: ../src/zapping.c:452 msgid "_Capture mode" msgstr "Modo _Captura" #: ../src/zapping.c:455 msgid "_Help" msgstr "A_yuda" #: ../src/zapping.c:456 msgid "_Contents" msgstr "_Índice" #: ../src/zapping.c:458 msgid "_About" msgstr "_Acerca de..." #: ../src/zapping.c:461 msgid "Appearance" msgstr "Apariencia" #: ../src/zapping.c:462 msgid "Ch. Up" msgstr "Canal Arriba" #: ../src/zapping.c:463 msgid "Switch to higher channel" msgstr "Cambiar al canal superior" #: ../src/zapping.c:464 msgid "Ch. Down" msgstr "Canal Abajo" #: ../src/zapping.c:465 msgid "Switch to lower channel" msgstr "Cambiar al canal inferior" # src/v4l2interface.c:344 #: ../src/zapping.c:467 msgid "Change picture controls" msgstr "Cambiar los controles de imagen" #: ../src/zapping.c:472 msgid "_Mute" msgstr "S_ilencio" #: ../src/zapping.c:473 msgid "Switch audio on or off" msgstr "Conmutar el estado del audio" #: ../src/zapping.c:474 msgid "Menu" msgstr "Menu" #: ../src/zapping.c:478 ../src/zapping.c:1092 msgid "Keep window on top" msgstr "Mantener la ventana encima del resto" #: ../src/zapping.c:496 ../src/zapping.c:498 msgid "_Teletext" msgstr "_Teletexto" #: ../src/zapping.c:499 msgid "Activate Teletext mode" msgstr "Activar modo Teletexto" #: ../src/zapping.c:501 msgid "Return to video mode" msgstr "Volver al modo de vídeo" #: ../src/zapping.c:502 msgid "_New Teletext View" msgstr "_Nueva Vista TTX" #: ../src/zapping.c:508 ../src/zapping.c:513 msgid "_Subtitles" msgstr "_Subtítulos" # msgid "S_ubtitles" # msgstr "S_ubtítulos" #: ../src/zapping.c:514 msgid "Switch subtitles on or off" msgstr "Conmutar los subtítulos" #: ../src/zapping.c:1090 msgid "Show menu and toolbar" msgstr "Mostrar el menu y la barra de herramientas" #: ../src/zmisc.c:662 msgid "Could not switch to capture mode" msgstr "No se pudo cambiar al modo de captura" #: ../src/zmisc.c:684 ../src/zmisc.c:702 msgid "Could not switch to overlay mode" msgstr "No se pudo cambiar al modo overlay" #: ../src/zmisc.c:685 ../src/zmisc.c:737 msgid "Video overlay has been disabled." msgstr "El overlay de vídeo ha sido inhabilitado." #: ../src/zmisc.c:718 msgid "Could not switch to Teletext mode" msgstr "No se puedo cambiar al modo de Teletexto" #: ../src/zmisc.c:719 msgid "VBI has been disabled, or it doesn't work." msgstr "VBI ha sido inhabilitado, o no funciona." #: ../src/zmisc.c:736 ../src/zmisc.c:765 msgid "Could not switch to fullscreen mode" msgstr "No se pudo cambiar al modo de pantalla completa" #: ../src/zmisc.c:1031 msgid "Hide the statusbar" msgstr "Ocultar la barra de estado" #: ../src/zmisc.c:1243 #, c-format msgid "%s is not a directory." msgstr "%s no es un directorio." #: ../src/zmisc.c:1285 msgid "Could not create directory" msgstr "No se puede crear el directorio" #: ../src/zmisc.c:1286 #, c-format msgid "" "Could not create %s.\n" "%s" msgstr "" "No se puede crear %s.\n" "%s" #: ../src/zmisc.c:2006 msgid "Device:" msgstr "Dispositivo:" #: ../src/zmisc.c:2007 msgid "Driver:" msgstr "Controlador:" #: ../src/zmisc.c:2008 msgid "Device file:" msgstr "Fichero:" #: ../src/zmisc.c:2354 #, c-format msgid "Overwrite %s?" msgstr "¿Sobrescribir %s?" #: ../src/zmisc.c:2359 msgid "_Overwrite" msgstr "_Sobreescribir" #: ../src/zmisc.c:2367 #, c-format msgid "%s is a directory." msgstr "%s no es un directorio." #: ../src/zmisc.c:2382 #, c-format msgid "%s is a special file" msgstr "%s es un fichero especial" #: ../src/zmisc.c:2386 msgid "Continue" msgstr "Continuar" #: ../src/zmisc.c:2664 msgid "Could not open help file" msgstr "No se pudo abrir el fichero de ayuda" #: ../src/zmisc.c:2697 msgid "Could not open URL" msgstr "No se pudo abrir la URL" #: ../src/zspinslider.c:306 ../src/zspinslider.c:310 msgid "Reset" msgstr "Restablecer" #: ../src/zvbi.c:1044 #, c-format msgid " %s: Teletext Page %x" msgstr " %s: Página de Teletexto %x" #: ../src/zvbi.c:1047 #, c-format msgid " Teletext Page %x" msgstr "Página de Teletexto %x" #: ../src/zvbi.c:1048 msgid "Open this page with Zapzilla" msgstr "Abrir esta página con Zapzilla" #: ../src/zvbi.c:1434 msgid "PES file read error" msgstr "Error al leer el fichero PES" #: ../src/zvbi.c:1653 msgid "VBI interface timeout" msgstr "Exceso de tiempo en el interfaz VBI" #: ../src/zvbi.c:1685 msgid "VBI interface: Failed to read from the device" msgstr "Interfaz VBI: Fallo al leer del dispositivo" #: ../src/zvbi.c:1763 ../src/zvbi.c:2006 ../src/zvbi.c:2114 msgid "VBI initialization failed" msgstr "La inicialización VBI falló" #: ../src/zvbi.c:2060 msgid "Cannot open PES file" msgstr "No se pudo abrir el fichero PES" #: ../src/zvbi.c:2115 #, c-format msgid "%s is no VBI device." msgstr "%s no es un dispositivo VBI." #: ../zapping.desktop.in.h:1 msgid "Lets you watch TV in a window" msgstr "Le permite ver TV en una ventana" #: ../zapping.desktop.in.h:2 msgid "Zapping TV Viewer" msgstr "Zapping Pantalla de TV" #: ../zapping.schemas.in.h:1 msgid "Adds spaces around words in Closed Caption text to improve legibility." msgstr "" "Añade espacios alrededor de las palabras en el texto de Closed Caption\n" "para mejorar la legibilidad." #: ../zapping.schemas.in.h:2 msgid "Caption/subtitle scaling quality." msgstr "Calidad del escalado de los subtítulos." #: ../zapping.schemas.in.h:3 msgid "Closed Caption default background color." msgstr "Color de fondo por defecto para Closed Caption." #: ../zapping.schemas.in.h:4 msgid "Closed Caption default foreground color." msgstr "Color de primer plano por defecto para Closed Caption." #: ../zapping.schemas.in.h:5 msgid "Color for chroma-key overlay (#RRGGBB), default #FFCCCC." msgstr "" #: ../zapping.schemas.in.h:6 msgid "Default Teletext character set." msgstr "Conjunto de caracteres por defecto para el Teletexto." #: ../zapping.schemas.in.h:7 msgid "" "Default Teletext home page, usually 100. Valid values range from 100 to 899." msgstr "" "Página de inicio para el teletexto por defecto, normalmente 100. Los\n" "valores válidos van de 100 a 899." #: ../zapping.schemas.in.h:8 msgid "Default Teletext home page." msgstr "Página de inicio del Teletexto por defecto." #: ../zapping.schemas.in.h:9 msgid "" "Default background color of Closed Caption text (#RRGGBB), default #000000." msgstr "" "Color de fondo por defecto para el texto Closed Caption (#RRGGBB), por\n" "defecto #000000." #: ../zapping.schemas.in.h:10 msgid "" "Default foreground color of Closed Caption text (#RRGGBB), default #FFFFFF." msgstr "" "Color de primer plano por defecto para el texto Closed Caption (#RRGGBB),\n" "por defecto #FFFFFF." #: ../zapping.schemas.in.h:11 msgid "Deinterlace option." msgstr "Opción de desentrelazado." #: ../zapping.schemas.in.h:12 msgid "Display delay of second field (0.0 to 1.0 of one frame period)." msgstr "" "Demora para mostrar el segundo campo (de 0.0 a 1.0 del período de un cuadro)." #: ../zapping.schemas.in.h:13 msgid "" "Enable navigation elements in the bottom row of the Teletext page. Valid " "values: disabled, flof_top1 (FLOF or TOP style 1), flof_top2 (TOP style 2)." msgstr "" "Habilita los elementos de navegación en la fila inferior de la página\n" "de teletexto. Los valores válidos son: disabled, flof_top1 (estilo 1\n" "de TOP o FLOF), flof_top2 (estilo 2 TOP)." #: ../zapping.schemas.in.h:14 msgid "Enable navigation elements." msgstr "Habilitar los elementos de navegación." #: ../zapping.schemas.in.h:15 msgid "Enable smooth rolling of real time Closed Caption." msgstr "Habilitar movimiento suave del Closed Caption en tiempo real." #: ../zapping.schemas.in.h:16 msgid "Enables slow MMX and 3DNow! optimized functions for tests." msgstr "" "Habilita las funciones optimizadas para MMX y 3DNow! lentas para las pruebas." #: ../zapping.schemas.in.h:17 msgid "Greedy (high motion) deinterlace test mode." msgstr "Modo de pruebas de desentrelazado Greedy (mucho movimiento)." #: ../zapping.schemas.in.h:18 msgid "Horizontal image resolution in deinterlace mode." msgstr "Resolución horizontal de la imagen en modo de desentrelazado." #: ../zapping.schemas.in.h:19 msgid "Interpret the Teletext search text as regular expression." msgstr "" "Interpretar el texto de búsqueda de Teletexto como una expresión regular." #: ../zapping.schemas.in.h:20 msgid "Keep the main window above other windows." msgstr "Mantener la ventana principal sobre las otras ventanas." #: ../zapping.schemas.in.h:21 msgid "Maximum number of networks in the Teletext page cache." msgstr "Número máximo de emisoras en la caché de Teletexto." #: ../zapping.schemas.in.h:22 msgid "Maximum size of the Teletext page cache in bytes." msgstr "Tamaño máximo de la caché de teletexto en bytes." #: ../zapping.schemas.in.h:23 msgid "Pad Closed Caption text with spaces." msgstr "Rellenar el texto Closed Caption con espacios." #: ../zapping.schemas.in.h:24 msgid "" "Quality/speed trade-off when scaling and anti-aliasing Teletext pages. Valid " "values: nearest, tiles, bilinear, hyper." msgstr "" "Relación calidad/velocidad al redimensionar y suavizar la página. Los\n" "valores válidos son: nearest, tiles, bilinear e hyper." #: ../zapping.schemas.in.h:25 msgid "" "Quality/speed trade-off when scaling and anti-aliasing caption/subtitles. " "Valid values: nearest, tiles, bilinear, hyper." msgstr "" "Relación calidad/velocidad al redimensionar y suavizar los subtítulos.\n" "Los valores válidos son: nearest, tiles, bilinear e hyper." #: ../zapping.schemas.in.h:26 msgid "Reverse the temporal field order." msgstr "Invertir el orden temporal de los campos." #: ../zapping.schemas.in.h:27 msgid "Roll Teletext page numbers." msgstr "Cambiar los números de página de Teletexto." #: ../zapping.schemas.in.h:28 msgid "" "Roll the Teletext page number in the page header until the requested page " "has arrived." msgstr "" "Cambiar el número de página de Teletexto en la cabecera de la página\n" "hasta que la página pedida llegue." #: ../zapping.schemas.in.h:29 msgid "Search all channels in the Teletext page memory." msgstr "Buscar en todos los canales en la memoria de Teletexto." #: ../zapping.schemas.in.h:30 msgid "Show a menu bar in the main window." msgstr "Mostrar un menu en la ventana principal." #: ../zapping.schemas.in.h:31 msgid "Show a status bar in Teletext windows." msgstr "Mostrar una barra de estado en las ventanas de Teletexto." #: ../zapping.schemas.in.h:32 msgid "Show a toolbar in Teletext windows." msgstr "Mostrar una barra de herramientas en las ventanas de Teletexto." #: ../zapping.schemas.in.h:33 msgid "Show a toolbar in the main window." msgstr "Mostrar una barra de herramientas en la ventana principal." #: ../zapping.schemas.in.h:34 msgid "Show double height characters in Teletext subtitles." msgstr "Mostrar caracteres de doble altura en los subtítulos de Teletexto." #: ../zapping.schemas.in.h:35 msgid "" "Some stations fail to transmit a complete language identifier, so the " "Teletext viewer may not display the correct font or national characters. You " "can select your geographical region here as an additional hint. Valid " "values: western_and_central_europe, eastern_europe, " "western_europe_and_turkey, central_and_southeast_europe, cyrillic, " "greek_and_turkish, arabic, hebrew_and_arabic." msgstr "" "Algunos canales no transmiten un identificador de idioma apropiado,\n" "así que puede que el visor de Teletexto no represente adecuadamente la\n" "fuente o los caracteres nacionales. Puedes seleccionar aquí tu zona\n" "geográfica como una ayuda adicional. Los valores válidos son\n" "western_and_central_europe, eastern_europe,\n" "western_europe_and_turkey, central_and_southeast_europe, cyrillic,\n" "greek_and_turkish, arabic, hebrew_and_arabic." #: ../zapping.schemas.in.h:36 msgid "Switch to full capture size for screenshot." msgstr "Cambiar a resolución completa para las capturas de imagen." #: ../zapping.schemas.in.h:37 msgid "Teletext implementation level." msgstr "Nivel de la implementación de Teletexto." #: ../zapping.schemas.in.h:38 msgid "Teletext implementation level. Valid values: 1, 1.5, 2.5, 3.5." msgstr "" "Nivel de la implementación de Teletexto. Valores válidos: 1, 1.5, 2.5, 3.5." #: ../zapping.schemas.in.h:39 msgid "Teletext page scaling quality." msgstr "Calidad del escalado del teletexto." #: ../zapping.schemas.in.h:40 msgid "Text brightness, valid values range from 0 to 255." msgstr "Brillo del texto, los valores válidos van de 0 a 255." #: ../zapping.schemas.in.h:41 msgid "Text contrast, valid values range from -128 to 127." msgstr "Contraste del texto, los valores válidos van de -128 a 127." #: ../zapping.schemas.in.h:42 msgid "The Teletext search is case insensitive." msgstr "La búsqueda de Teletexto no distingue mayúsculas y minúsculas." #: ../zapping.schemas.in.h:43 msgid "" "This is the time in milliseconds Zapping will wait between pointer movements " "and blanking the pointer when over the video. A value of zero disables this " "feature." msgstr "" "Esto es en tiempo en milisegundos que Zapping esperará entre detectar\n" "un movimiento del puntero y ocultar el puntero sobre el vídeo. Un\n" "valor de 0 deshabilita este comportamiento." #: ../zapping.schemas.in.h:44 msgid "Time to wait until blanking the pointer." msgstr "Tiempo a esperar antes de ocultar el puntero." #: ../zapping.schemas.in.h:45 msgid "Update the clock in the Teletext page header." msgstr "Actualizar el reloj en la cabecera de vídeo." #: ../zapping.schemas.in.h:46 msgid "" "When your CPU is too slow to use the desired deinterlace mode you can reduce " "the horizontal resolution. Valid values: low, medium, high." msgstr "" "Cuando su CPU es demasiado lenta para utilizar el modo de\n" "desentrelazado pedido, puede reducir la resolución horizontal. Los\n" "valores válidos son low, medium y high." #: ../zapping_setup_fb/zapping_setup_fb.c:136 #, c-format msgid "Device name %s is unsafe, contains dots." msgstr "El nombre de dispositivo %s es inseguro, contiene puntos." #: ../zapping_setup_fb/zapping_setup_fb.c:144 #, c-format msgid "Device name %s is unsafe, does not begin with /dev/." msgstr "El nombre de dispositivo %s es inseguro, no comienza con /dev/." #. TRANSLATORS: File name, error message. #: ../zapping_setup_fb/zapping_setup_fb.c:163 #, c-format msgid "Cannot open device %s. %s." msgstr "No se puede abrir el dispositivo %s. %s." #. TRANSLATORS: File name, error message. #: ../zapping_setup_fb/zapping_setup_fb.c:178 #, c-format msgid "Cannot identify %s. %s." msgstr "No se puede identificar %s. %s." #: ../zapping_setup_fb/zapping_setup_fb.c:190 #, c-format msgid "%s is not a device." msgstr "%s no es un dispositivo." #: ../zapping_setup_fb/zapping_setup_fb.c:204 #, c-format msgid "%s is not a video device." msgstr "%s no es un dispositivo de vídeo." #: ../zapping_setup_fb/zapping_setup_fb.c:218 #, c-format msgid "Cannot identify file descriptor %d. %s." msgstr "No se puede identificar el descriptor de fichero %d. %s." #: ../zapping_setup_fb/zapping_setup_fb.c:229 #, c-format msgid "File descriptor %d is not a device." msgstr "El descriptor de fichero %d no es un dispositivo." #: ../zapping_setup_fb/zapping_setup_fb.c:239 #, c-format msgid "File descriptor %d is not a video device." msgstr "El descriptor de fichero %d no es un dispositivo de vídeo." #: ../zapping_setup_fb/zapping_setup_fb.c:254 #, c-format msgid "Internal error at %s:%u." msgstr "" #: ../zapping_setup_fb/zapping_setup_fb.c:273 #, c-format msgid "Cannot drop root privileges despite running with UID %d, EUID %d." msgstr "" "No se puede renunciar a los privilegios de root a pesar de tener\n" "UID %d, EUID %d." #: ../zapping_setup_fb/zapping_setup_fb.c:303 #, c-format msgid "Cannot restore root privileges despite running with UID %d, EUID %d." msgstr "" "No se pueden readquirir los privilegios de root a pesar de ejecutarse\n" "con UID %d, EUID %d." #: ../zapping_setup_fb/zapping_setup_fb.c:396 msgid "No standard input, output or error file." msgstr "" #: ../zapping_setup_fb/zapping_setup_fb.c:449 #, c-format msgid "Invalid bpp argument %d. Expected 24 or 32." msgstr "Argumento de bpp %d inválido. Se esperaba 24 o 32." #: ../zapping_setup_fb/zapping_setup_fb.c:482 #, c-format msgid "Invalid device file descriptor %d." msgstr "Descriptor de fichero %d inválido." #: ../zapping_setup_fb/zapping_setup_fb.c:539 msgid "No screens found." msgstr "No se encontraron pantallas." #: ../zapping_setup_fb/zapping_setup_fb.c:573 #, c-format msgid "Cannot open display %s." msgstr "No se puede abrir el display %s." #: ../zapping_setup_fb/zapping_setup_fb.c:590 #, c-format msgid "Screen %d not found." msgstr "Pantalla %d no encontrada." #: ../zapping_setup_fb/zapping_setup_fb.c:598 #, c-format msgid "DMA is not possible on screen %d." msgstr "No es posible hacer DMA en la pantalla %d." #: ../zapping_setup_fb/zapping_setup_fb.c:614 #, c-format msgid "%s is not a V4L or V4L2 device." msgstr "%s no es un dispositivo V4L o V4L2." #: ../zapping_setup_fb/zapping_setup_fb.c:617 #, c-format msgid "File descriptor %d is not a V4L or V4L2 device." msgstr "El descriptor de fichero %d no es un dispositivo V4L o V4L2." #: ../zapping_setup_fb/zapping_setup_fb.c:620 #, fuzzy msgid "Cannot identify the video capture device." msgstr "No se puede identificar el descriptor de fichero %d. %s." #: ../zapping_setup_fb/zapping_setup_fb.h:56 #, fuzzy, c-format msgid "Ioctl %s failed: %s." msgstr "%s falló." #: ../zapping_setup_fb/v4l.c:89 ../zapping_setup_fb/v4l25.c:91 msgid "The device does not support video overlay." msgstr "El dispositivo no soporta overlay de vídeo." #~ msgid "Adaptive" #~ msgstr "Adaptativo" #~ msgid "Blended Clip" #~ msgstr "Blended Clip" #~ msgid "Maximum motion" #~ msgstr "Movimiento máximo" #~ msgid "Composite mode" #~ msgstr "Modo composición" #~ msgid "Old Game" #~ msgstr "Old Game" #~ msgid "Unknown error in %s." #~ msgstr "Error desconocido en %s." #~ msgid "VBI device to use" #~ msgstr "Dispositivo de VBI" #~ msgid "DEVICE" #~ msgstr "DISPOSITIVO" #~ msgid "Zapzilla couldn't be started" #~ msgstr "Zapzilla no se pudo iniciar" #~ msgid "Sorry, Zapzilla is unable to create the config tree" #~ msgstr "Zapzilla no puede crear la configuración" ���������zapping-0.10cvs6/po/fr.po��������������������������������������������������������������������������� 644 � 764 � 144 � 242045 10443535657 10455� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# French translation for Zapping. -*- coding: utf-8 -*- # Christian Marillat <marillat@free.fr>, 2000-2003. # msgid "" msgstr "" "Project-Id-Version: zapping 0.10\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2006-03-31 16:06+0200\n" "PO-Revision-Date: 2005-11-02 15:06+0100\n" "Last-Translator: Christian Marillat <marillat@debian.org>\n" "Language-Team: French <fr@li.org>\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" #: ../glade/zapping.glade2.h:1 msgid "320x240" msgstr "320x240" #: ../glade/zapping.glade2.h:2 msgid "" "A format string describing the main window title when changing channels: " "$(alias), $(index), $(id), $(freq), $(standard) and $(input) are substituted " "by the respective values." msgstr "" "Un format de chaînes décrivant ce que le programme doit mettre dans le titre " "de la fenêtre quand vous changez de chaîne : $(alias), $(index), $(id), " "$(freq), $(standard) et $(input) seront remplacés par leurs valeurs." #: ../glade/zapping.glade2.h:3 msgid "Advanced" msgstr "Avancé" #: ../glade/zapping.glade2.h:4 ../src/audio.c:829 ../src/audio.c:834 #: ../src/tveng.c:4830 msgid "Audio" msgstr "Audio" #: ../glade/zapping.glade2.h:5 msgid "Author:" msgstr "Auteur :" #: ../glade/zapping.glade2.h:6 msgid "Biggest noninterlaced (autodetect)" msgstr "Important non-interlacé (auto-detecté)" #: ../glade/zapping.glade2.h:7 msgid "Canonical name:" msgstr "Nom principal :" #: ../glade/zapping.glade2.h:8 msgid "Channel list number" msgstr "Liste des chaînes" #: ../glade/zapping.glade2.h:9 msgid "Choose a color" msgstr "Choisissez une couleur" #: ../glade/zapping.glade2.h:10 msgid "Chroma _key:" msgstr "" #: ../glade/zapping.glade2.h:11 msgid "Clean console" msgstr "Nettoyer la console" #: ../glade/zapping.glade2.h:12 msgid "Click here when you are done" msgstr "Cliquez ici une fois fini" #: ../glade/zapping.glade2.h:13 msgid "Console" msgstr "Console" #: ../glade/zapping.glade2.h:14 msgid "Copyright (C) 2000-2005 the contributors\n" msgstr "Copyright (C) 2000-2005 les contributeurs\n" #: ../glade/zapping.glade2.h:16 msgid "Current controller:" msgstr "Contrôleur courant :" #: ../glade/zapping.glade2.h:17 msgid "DVB PES File" msgstr "Fichier DVB PES" #: ../glade/zapping.glade2.h:18 msgid "DVB _PES File" msgstr "_Fichier DVB PES" #: ../glade/zapping.glade2.h:19 msgid "Device name:" msgstr "Nom du périphérique :" #: ../glade/zapping.glade2.h:20 ../src/audio.c:839 #: ../src/properties-handler.c:1352 ../src/zvbi.c:2537 msgid "Devices" msgstr "Périphériques" #: ../glade/zapping.glade2.h:21 msgid "Disable _screensaver" msgstr "Déactiver l'économi_seur d'écran" #: ../glade/zapping.glade2.h:22 msgid "Enter key" msgstr "Entrer une touche" #: ../glade/zapping.glade2.h:23 msgid "F_ont:" msgstr "P_olice :" #: ../glade/zapping.glade2.h:24 msgid "Favorite _picture sizes:" msgstr "Taille préférée des _images :" #: ../glade/zapping.glade2.h:25 msgid "General options" msgstr "Options général" #: ../glade/zapping.glade2.h:26 msgid "Interlaced (window size)" msgstr "Interlacé (taille de la fenêtre)" #: ../glade/zapping.glade2.h:27 msgid "Kernel VBI device" msgstr "Périphérique VBI du noyau" #: ../glade/zapping.glade2.h:28 msgid "Kernel _device" msgstr "Périphérique _du noyau" #: ../glade/zapping.glade2.h:29 ../src/keyboard.c:1149 msgid "Keyboard" msgstr "Clavier" #: ../glade/zapping.glade2.h:30 msgid "Known key names" msgstr "Nom de touche connu" #: ../glade/zapping.glade2.h:31 msgid "Maximum capture size:" msgstr "Taille maximum de la capture :" #: ../glade/zapping.glade2.h:32 msgid "Minimum capture size:" msgstr "Taille minimum de la capture :" #: ../glade/zapping.glade2.h:33 msgid "Mute while ch_anging channels" msgstr "Éviter le bruit lors du changement de _chaîne" #: ../glade/zapping.glade2.h:34 msgid "NTSC" msgstr "NTSC" #: ../glade/zapping.glade2.h:35 msgid "No Display" msgstr "Pas d'affichage" #: ../glade/zapping.glade2.h:36 msgid "OK, let's go on" msgstr "OK, laissez faire" #: ../glade/zapping.glade2.h:37 ../src/osd.c:1075 msgid "OSD" msgstr "OSD" #: ../glade/zapping.glade2.h:38 msgid "On Screen Display (OSD)" msgstr "On Screen Display (OSD)" #: ../glade/zapping.glade2.h:39 msgid "PAL" msgstr "PAL" #: ../glade/zapping.glade2.h:40 msgid "Plugin location" msgstr "Location du greffon" #: ../glade/zapping.glade2.h:41 msgid "Plugin priority:" msgstr "Priorité du greffon :" #: ../glade/zapping.glade2.h:42 msgid "Plugin properties" msgstr "Propriétés du greffon" #: ../glade/zapping.glade2.h:43 msgid "Plugin version:" msgstr "Version du greffon :" #: ../glade/zapping.glade2.h:44 msgid "Properties" msgstr "Propriétés" #: ../glade/zapping.glade2.h:45 msgid "RF channel number" msgstr "RF numéro de chaîne" #: ../glade/zapping.glade2.h:46 msgid "Remember this video standard" msgstr "Mémoriser ce standard vidéo" #: ../glade/zapping.glade2.h:47 msgid "Remove all this mess" msgstr "Enlever toute cette pagaille" #: ../glade/zapping.glade2.h:48 msgid "Run the plugin" msgstr "Démarrer ce greffon" #: ../glade/zapping.glade2.h:49 msgid "SECAM" msgstr "SECAM" #: ../glade/zapping.glade2.h:50 msgid "S_how toolbar as:" msgstr "A_fficher les contrôles comme :" #: ../glade/zapping.glade2.h:51 msgid "Save _control values per channel" msgstr "" "Sauvegarder les valeurs de _contrôle avec la configuration de la chaîne" #: ../glade/zapping.glade2.h:52 msgid "Select OSD font" msgstr "Sélectionner la polices pour l'OSD" #: ../glade/zapping.glade2.h:53 msgid "Select the V4L device" msgstr "Sélectionner le périphérique V4L" #: ../glade/zapping.glade2.h:54 msgid "Show _tooltips" msgstr "Afficher les _bulles d'aide" #: ../glade/zapping.glade2.h:55 msgid "Status Bar" msgstr "Barre d'état" #: ../glade/zapping.glade2.h:56 msgid "Stop this plugin" msgstr "Arrêter ce greffon" #: ../glade/zapping.glade2.h:57 msgid "TV viewer for the Gnome environment" msgstr "Un visualiseur de TV pour l'environnement GNOME" #: ../glade/zapping.glade2.h:58 msgid "" "The video capture device does not report the correct video standard, please " "select manually:" msgstr "" "Le périphérique de capture vidéo ne retourne pas le bon standard vidéo, " "sélectionnez le manuellement :" #: ../glade/zapping.glade2.h:59 msgid "Title _bar contents:" msgstr "Contenu de la barre de _titre :" #: ../glade/zapping.glade2.h:60 ../src/zvbi.c:2532 msgid "VBI" msgstr "VBI" #: ../glade/zapping.glade2.h:61 ../src/main.c:200 #: ../src/properties-handler.c:1339 ../src/properties-handler.c:1347 msgid "Video" msgstr "Vidéo" #: ../glade/zapping.glade2.h:62 msgid "Video Standard" msgstr "Standard vidéo" #: ../glade/zapping.glade2.h:63 msgid "Video device capabilities" msgstr "Capacité du périphérique vidéo" #: ../glade/zapping.glade2.h:64 msgid "Window" msgstr "Fenêtre" #: ../glade/zapping.glade2.h:65 msgid "Zapping Preferences" msgstr "Propriétés de Zapping" #: ../glade/zapping.glade2.h:66 msgid "Zapping error console" msgstr "Console d'erreur de Zapping" #: ../glade/zapping.glade2.h:67 msgid "_Background color:" msgstr "Couleur du _fond d'écran :" #: ../glade/zapping.glade2.h:68 msgid "_Capture size under XVideo:" msgstr "Taille de la _capture avec XVideo :" #: ../glade/zapping.glade2.h:69 msgid "_Command:" msgstr "_Commande :" #: ../glade/zapping.glade2.h:70 msgid "_Control volume with soundcard mixer" msgstr "_Contrôler le volume avec le mixer de la carte audio" #: ../glade/zapping.glade2.h:71 msgid "_Device file:" msgstr "Fichier _du périphérique :" #: ../glade/zapping.glade2.h:72 msgid "_Display mode:" msgstr "Mode _d'affichage" #: ../glade/zapping.glade2.h:73 msgid "_Enter channels by:" msgstr "_Entrer les Chaînes par :" #: ../glade/zapping.glade2.h:74 msgid "_Foreground color:" msgstr "Couleur du _texte :" #: ../glade/zapping.glade2.h:75 msgid "_Fullscreen video resolution:" msgstr "_Mode vidéo plein écran :" #: ../glade/zapping.glade2.h:76 msgid "_Gnome sound daemon (ESD)" msgstr "_Gnome sound daemon (ESD)" #: ../glade/zapping.glade2.h:77 msgid "_KDE sound daemon (ARTS)" msgstr "_KDE sound daemon (ARTS)" #: ../glade/zapping.glade2.h:78 msgid "_Mute on exit" msgstr "_Muet en quittant" #: ../glade/zapping.glade2.h:79 msgid "_No VBI services" msgstr "Pa_s de service VBI" #: ../glade/zapping.glade2.h:80 msgid "_No audio recording" msgstr "Pa_s d'enregistrement audio" #: ../glade/zapping.glade2.h:81 msgid "_Remove after:" msgstr "_Enlever après :" #: ../glade/zapping.glade2.h:82 msgid "_Resize using fixed increments" msgstr "_Redimensionner en utilisant un incrément fixe" #: ../glade/zapping.glade2.h:83 msgid "_Start Zapping muted" msgstr "Démarrer Zapping _sans le son" #: ../glade/zapping.glade2.h:84 msgid "_Use VBI Proxy if available" msgstr "_Utiliser le proxy VBI si disponible" #: ../glade/zapping.glade2.h:85 msgid "seconds" msgstr "secondes" #: ../libvbi/exp-gfx.c:1483 msgid "Correct aspect ratio" msgstr "Corriger les proportions" #: ../libvbi/exp-gfx.c:1484 msgid "" "Approach an image aspect ratio similar to a real TV. This will double the " "image size." msgstr "" "Approche les proportions d'une image d'une vraie TV. Cela doublera la taille " "de l'image." #: ../libvbi/exp-gfx.c:1623 msgid "PPM" msgstr "PPM" #: ../libvbi/exp-gfx.c:1624 msgid "Export this page as raw PPM image" msgstr "Exporter cette page en une image PPM brute" #. XXX gettext encoding #: ../libvbi/exp-gfx.c:1824 ../libvbi/exp-html.c:532 ../libvbi/exp-sub.c:633 #: ../libvbi/exp-sub.c:764 ../libvbi/exp-sub.c:821 #, c-format msgid "Teletext Page %3x.%x" msgstr "Page Télétexte %3x.%x" #: ../libvbi/exp-gfx.c:1828 ../libvbi/exp-html.c:535 ../libvbi/exp-sub.c:636 #: ../libvbi/exp-sub.c:767 ../libvbi/exp-sub.c:824 #, c-format msgid "Teletext Page %3x" msgstr "Page Télétexte %3x" #: ../libvbi/exp-gfx.c:2019 msgid "PNG" msgstr "PNG" #: ../libvbi/exp-gfx.c:2020 msgid "Export this page as PNG image" msgstr "Exporter cette page en une image PNG" #: ../libvbi/exp-html.c:110 ../libvbi/exp-txt.c:133 msgid "Graphics char" msgstr "Nettoyage graphique" #: ../libvbi/exp-html.c:111 ../libvbi/exp-txt.c:134 msgid "" "Replacement for block graphic characters: a single character or decimal (32) " "or hex (0x20) code" msgstr "" "Replacement pour les blocs de caractère graphique : un simple caractère ou " "décimal (32) ou hexa (0x20) code" #: ../libvbi/exp-html.c:114 ../libvbi/exp-txt.c:137 msgid "ASCII art" msgstr "ASCII art" #: ../libvbi/exp-html.c:115 ../libvbi/exp-txt.c:138 msgid "Replace graphic characters by ASCII art" msgstr "Remplacer les caractères graphique par de l'ASCII art" #: ../libvbi/exp-html.c:117 msgid "Color (CSS)" msgstr "Couleur (CSS)" #: ../libvbi/exp-html.c:118 msgid "Store the page colors using CSS attributes" msgstr "Stocker cette page en utilisant les couleurs des attributs CSS" #: ../libvbi/exp-html.c:120 msgid "HTML header" msgstr "En-tête HTML" #: ../libvbi/exp-html.c:121 msgid "Include HTML page header" msgstr "Inclure l'entête de page HTML" #. TRANSLATORS: lang=\"en\" refers to the page title #. "Teletext Page ...". Please specify "de", "fr", "es" #. etc. #: ../libvbi/exp-html.c:521 msgid "<title lang=\"en\">" msgstr "<title lang=\"fr\">" #: ../libvbi/exp-html.c:843 msgid "HTML" msgstr "HTML" #: ../libvbi/exp-html.c:844 msgid "Export this page as HTML page" msgstr "Exporter cette page en HTML" #: ../libvbi/export.c:200 msgid "Write error." msgstr "Erreur d'écriture." #: ../libvbi/export.c:210 msgid "Out of memory." msgstr "Plus de mémoire." #: ../libvbi/export.c:235 #, c-format msgid "Export module %s has no option %s." msgstr "Le module d'export %s n'a pas d'option %s." #: ../libvbi/export.c:295 #, c-format msgid "Invalid argument %s for option %s of export module %s." msgstr "Argument invalide %s pour l'option %s du module d'export %s." #: ../libvbi/export.c:350 msgid "Unknown error." msgstr "Erreur inconnu." #: ../libvbi/export.c:436 #, c-format msgid "Could not create %s. %s." msgstr "Ne peut créer %s. %s." #: ../libvbi/export.c:1334 #, c-format msgid "Invalid option string \"%s\"." msgstr "Chaîne d'option invalide \"%s\"." #: ../libvbi/export.c:1438 #, c-format msgid "Unknown export module '%s'." msgstr "Module d'export inconnu '%s'." #: ../libvbi/export.c:1452 #, c-format msgid "Cannot initialize export module '%s', probably lack of memory." msgstr "" "Ne peut initialiser le module d'export '%s', probablement un manque de " "mémoire." #: ../libvbi/export.c:1476 #, c-format msgid "Cannot initialize export module '%s', out of memory." msgstr "Ne peut initialiser le module d'export '%s', plus de mémoire." #: ../libvbi/exp-sub.c:124 ../libvbi/exp-txt.c:81 msgid "ASCII" msgstr "ASCII" #: ../libvbi/exp-sub.c:125 ../libvbi/exp-txt.c:82 msgid "ISO-8859-1 (Latin-1 Western languages)" msgstr "ISO-8859-1 (Latin-1 Langages occidentaux)" #: ../libvbi/exp-sub.c:126 ../libvbi/exp-txt.c:83 msgid "ISO-8859-2 (Latin-2 Central and Eastern European languages)" msgstr "ISO-8859-2 (Latin-2 Langages de l'Europe de l'est et central)" #: ../libvbi/exp-sub.c:127 ../libvbi/exp-txt.c:84 msgid "ISO-8859-4 (Latin-3 Baltic languages)" msgstr "ISO-8859-4 (Latin-3 Langages Baltique)" #: ../libvbi/exp-sub.c:128 ../libvbi/exp-txt.c:85 msgid "ISO-8859-5 (Cyrillic)" msgstr "ISO-8859-5 (Cyrillique)" #: ../libvbi/exp-sub.c:129 ../libvbi/exp-txt.c:86 msgid "ISO-8859-7 (Greek)" msgstr "ISO-8859-7 (Grecque)" #: ../libvbi/exp-sub.c:130 ../libvbi/exp-txt.c:87 msgid "ISO-8859-8 (Hebrew)" msgstr "ISO-8859-8 (Hébreu)" #: ../libvbi/exp-sub.c:131 ../libvbi/exp-txt.c:88 msgid "ISO-8859-9 (Turkish)" msgstr "ISO-8859-9 (Turc)" #: ../libvbi/exp-sub.c:132 ../libvbi/exp-txt.c:89 msgid "KOI8-R (Russian and Bulgarian)" msgstr "KOI8-R (Russe et Bulgare)" #: ../libvbi/exp-sub.c:133 ../libvbi/exp-txt.c:90 msgid "KOI8-U (Ukranian)" msgstr "KOI8-U (Ukranien)" #: ../libvbi/exp-sub.c:134 ../libvbi/exp-txt.c:91 msgid "ISO-10646/UTF-8 (Unicode)" msgstr "ISO-10646/UTF-8 (Unicode)" #. TRANSLATORS: Text export encoding (ASCII, Unicode, ...) menu #: ../libvbi/exp-sub.c:155 ../libvbi/exp-sub.c:165 ../libvbi/exp-txt.c:127 msgid "Encoding" msgstr "Encodage" #: ../libvbi/exp-sub.c:171 msgid "Font face" msgstr "Police" #. TRANSLATORS: #. Caption is an aid for the hearing impaired, #. subtitles for foreign language viewers. #: ../libvbi/exp-sub.c:1534 msgid "MPlayer caption/subtitle file" msgstr "Fichier de sous-titres pour MPlayer" #. TRANSLATORS: #. Styles like bold, italic, underlined, etc. #. Justification to the left, right, centered. #: ../libvbi/exp-sub.c:1559 msgid "" "QuickTime Text caption/subtitle file preserving text styles, justification " "and color" msgstr "" "Sous-titres QuickTime Text, qui garde les styles, la couleur et la " "justification du texte" #: ../libvbi/exp-sub.c:1583 msgid "RealText caption/subtitle file preserving text styles and color" msgstr "Sous-titres RealText, qui garde le style et la couleur du texte" #: ../libvbi/exp-sub.c:1606 msgid "" "SAMI 1.0 caption/subtitle file preserving text styles, justification and " "color" msgstr "Sous-titres SAMI 1.0, qui garde le style et la couleur du texte" #: ../libvbi/exp-sub.c:1630 msgid "SubRip caption/subtitle file" msgstr "Fichier de sous-titres SubRip" #: ../libvbi/exp-sub.c:1652 msgid "SubViewer 2.x caption/subtitle file" msgstr "Fichier de sous-titre SubViewer 2.x" #. TRANSLATORS: Terminal control codes menu #: ../libvbi/exp-txt.c:112 msgid "None" msgstr "Rien" #: ../libvbi/exp-txt.c:113 msgid "ANSI X3.64 / VT 100" msgstr "ANSI X3.64 / VT 100" #: ../libvbi/exp-txt.c:114 msgid "VT 200" msgstr "VT 200" #: ../libvbi/exp-txt.c:140 msgid "Control codes" msgstr "Codes de contrôles" #: ../libvbi/exp-txt.c:1030 msgid "Text" msgstr "Texte" #: ../libvbi/exp-txt.c:1031 msgid "Export this page as text file" msgstr "Exporter cette page dans un fichier texte" #: ../libvbi/exp-vtx.c:82 msgid "Can only export Teletext pages." msgstr "Ne peut seulement exporter les pages Teletext." #: ../libvbi/exp-vtx.c:89 msgid "Page is not cached." msgstr "Ctee page n'est pas cachée." #: ../libvbi/exp-vtx.c:98 msgid "Cannot export this page, is not displayable." msgstr "Ne peut exporte cette page, car elle n'est pas affichable." #: ../libvbi/exp-vtx.c:135 msgid "VTX" msgstr "VTX" #: ../libvbi/exp-vtx.c:136 msgid "" "Export this page as VTX file, the format used by VideoteXt and vbidecode" msgstr "" "Exporter cette page en un fichier VTX, le format utilisé par Videotext et " "vbidecode" #: ../plugins/alirc/alirc.c:37 msgid "Another lirc plugin" msgstr "Un autre greffon lirc" #: ../plugins/alirc/alirc.c:39 msgid "" "Another plugin to control zapping through lirc\n" "\n" "To enable this plugin you must edit your ~/.lircrc\n" "file. See the Zapping documentation for details.\n" msgstr "" "Un autre greffon pour contrôler zapping au travers de lirc\n" "\n" "Pour utiliser ce greffon vous devez éditer votre fichier\n" "~/.lircrc. Voir la documentation de Zapping pour les détails.\n" #: ../plugins/alirc/alirc.c:44 msgid "Lets you control zapping through lirc" msgstr "Vous permet de contrôler zapping avec lirc" #. hash collision code #. Warn #. hash collision code #. hash collision code #. Warn #: ../plugins/alirc/alirc.c:375 ../plugins/mpeg/mpeg.c:3026 #: ../plugins/screenshot/screenshot.c:1778 #, c-format msgid "Check error: \"%s\" in plugin %s has hash 0x%x vs. 0x%x" msgstr "Check erreur : \"%s\" du greffon %s has hash 0x%x vs. 0x%x" #: ../plugins/deinterlace/DI_GreedyH/DI_GreedyH.c:240 msgid "Max Comb" msgstr "Max Comb" #: ../plugins/deinterlace/DI_GreedyH/DI_GreedyH.c:246 msgid "Motion Threshold" msgstr "Seuil du mouvement" #: ../plugins/deinterlace/DI_GreedyH/DI_GreedyH.c:252 msgid "Motion Sense" msgstr "Sens du mouvement" #: ../plugins/deinterlace/DI_GreedyH/DI_GreedyH.c:258 msgid "Good PullDown Lvl" msgstr "Good PullDown Lvl" #: ../plugins/deinterlace/DI_GreedyH/DI_GreedyH.c:264 msgid "Bad PullDown Lvl" msgstr "Bad PullDown Lvl" #: ../plugins/deinterlace/DI_GreedyH/DI_GreedyH.c:270 #: ../plugins/deinterlace/DI_GreedyH/DI_GreedyH.c:318 msgid "H. Sharpness" msgstr "Netteté H." #: ../plugins/deinterlace/DI_GreedyH/DI_GreedyH.c:276 #: ../plugins/deinterlace/DI_GreedyH/DI_GreedyH.c:312 msgid "V. Sharpness" msgstr "Netteté V." #: ../plugins/deinterlace/DI_GreedyH/DI_GreedyH.c:282 #: ../plugins/deinterlace/DI_GreedyH/DI_GreedyH.c:306 msgid "Median Filter" msgstr "Filtre median" #: ../plugins/deinterlace/DI_GreedyH/DI_GreedyH.c:288 msgid "High Comb Skip" msgstr "High Comb Skip" #: ../plugins/deinterlace/DI_GreedyH/DI_GreedyH.c:294 msgid "Auto Pull-Down" msgstr "Auto Pull-Down" #: ../plugins/deinterlace/DI_GreedyH/DI_GreedyH.c:300 msgid "In-Between Frames" msgstr "In-Between Frames" #. size of this struct #. curr version compiled #: ../plugins/deinterlace/DI_GreedyH/DI_GreedyH.c:336 msgid "Video (Greedy, High Motion)" msgstr "Vidéo (Greedy, Beaucoup de mouvement)" #: ../plugins/deinterlace/DI_Misc/DI_Bob.c:150 msgid "Simple Bob" msgstr "Bob simple" #: ../plugins/deinterlace/DI_Misc/DI_EvenOnly.c:123 msgid "Even Scanlines Only" msgstr "Lignes paire seulement" #: ../plugins/deinterlace/DI_Misc/DI_Greedy2Frame.c:258 msgid "Greedy 2 Frame Luma Threshold" msgstr "Greedy 2 Frame Luma Threshold" #: ../plugins/deinterlace/DI_Misc/DI_Greedy2Frame.c:270 msgid "Greedy 2 Frame" msgstr "Greedy 2 Frames" #: ../plugins/deinterlace/DI_Misc/DI_Greedy.c:235 msgid "Greedy Max Comb" msgstr "Greedy Max Comb" #: ../plugins/deinterlace/DI_Misc/DI_Greedy.c:246 msgid "Video (Greedy, Low Motion)" msgstr "Vidéo (Greedy, peu de mouvement)" #: ../plugins/deinterlace/DI_Misc/DI_MoComp2.c:351 msgid "Video (MoComp2)" msgstr "Vidéo (MoComp2)" #: ../plugins/deinterlace/DI_Misc/DI_OddOnly.c:125 msgid "Odd Scanlines Only" msgstr "Lignes impaire seulement" #: ../plugins/deinterlace/DI_Misc/DI_ScalerBob.c:117 msgid "Scaler Bob" msgstr "Scaler Bob" #: ../plugins/deinterlace/DI_Misc/DI_TomsMoComp.c:955 msgid "Search Effort" msgstr "Effort de recherche" #: ../plugins/deinterlace/DI_Misc/DI_TomsMoComp.c:961 msgid "Use Strange Bob" msgstr "Utiliser 'Strange Bob'" #: ../plugins/deinterlace/DI_Misc/DI_TomsMoComp.c:972 msgid "Video (TomsMoComp)" msgstr "Vidéo (TomsMoComp)" #: ../plugins/deinterlace/DI_Misc/DI_TwoFrame.c:317 msgid "2 Frame Spatial Tolerance" msgstr "Tolérance spatiale de 2 frames" #: ../plugins/deinterlace/DI_Misc/DI_TwoFrame.c:323 msgid "2 Frame Temporal Tolerance" msgstr "Tolérance temporelle de 2 frames" #: ../plugins/deinterlace/DI_Misc/DI_TwoFrame.c:334 msgid "Video Deinterlace (2-Frame)" msgstr "Désentrelacement vidéo (2-Frame)" #: ../plugins/deinterlace/DI_Misc/DI_VideoBob.c:237 msgid "Weave Edge Detect" msgstr "Weave Edge Detect" #: ../plugins/deinterlace/DI_Misc/DI_VideoBob.c:243 msgid "Weave Jaggie Threshold" msgstr "Weave Jaggie Threshold" #: ../plugins/deinterlace/DI_Misc/DI_VideoBob.c:254 msgid "Video Deinterlace (Bob)" msgstr "Désentrelacement vidéo (bob)" #: ../plugins/deinterlace/DI_Misc/DI_VideoWeave.c:270 msgid "Temporal Tolerance" msgstr "Tolérance temporelle" #: ../plugins/deinterlace/DI_Misc/DI_VideoWeave.c:276 msgid "Spatial Tolerance" msgstr "Tolérance spatiale" #: ../plugins/deinterlace/DI_Misc/DI_VideoWeave.c:282 msgid "Similarity Threshold" msgstr "Seuil similaire" #: ../plugins/deinterlace/DI_Misc/DI_VideoWeave.c:293 msgid "Video Deinterlace (Weave)" msgstr "Désentrelacement vidéo (Weave)" #: ../plugins/deinterlace/DI_Misc/DI_Weave.c:155 msgid "Simple Weave" msgstr "Weave simple" #: ../plugins/deinterlace/main.c:352 msgid "Could not start deinterlace plugin" msgstr "Ne peut démarrer le plugin de désentrelacement" #: ../plugins/deinterlace/main.c:353 #, c-format msgid "Could not switch to capture format YUYV %u x %u." msgstr "Ne peut changer le format de capture YUYV %u x %u." #: ../plugins/deinterlace/main.c:447 msgid "Deinterlace" msgstr "Désentrelacement" #: ../plugins/deinterlace/main.c:454 ../plugins/mpeg/mpeg.c:2336 #: ../plugins/mpeg/mpeg.c:2956 ../plugins/screenshot/screenshot.c:522 #: ../plugins/screenshot/screenshot.c:1525 ../plugins/subtitle/main.c:55 #: ../plugins/teletext/main.c:212 msgid "Plugins" msgstr "Greffons" #: ../plugins/deinterlace/main.c:523 msgid "Deinterlace plugin" msgstr "Greffon deinterlacer" #: ../plugins/deinterlace/preferences.c:48 ../src/plugin_properties.c:120 msgid "Low" msgstr "Basse" #: ../plugins/deinterlace/preferences.c:49 msgid "Medium" msgstr "Moyen" #: ../plugins/deinterlace/preferences.c:50 ../src/plugin_properties.c:128 msgid "High" msgstr "Haute" #: ../plugins/deinterlace/preferences.c:287 msgid "_Resolution:" msgstr "_Résolution :" #. TRANSLATORS: Relative display duration of the first and #. second field in deinterlace mode. #: ../plugins/deinterlace/preferences.c:296 msgid "_Field Balance:" msgstr "_Balance des champs :" #: ../plugins/deinterlace/preferences.c:708 ../src/eggcellrendererkeys.c:222 msgid "Disabled" msgstr "Non activé" #: ../plugins/mpeg/mpeg.c:846 #, c-format msgid "Format %s is incomplete, please configure the video or audio codec." msgstr "Le format %s est incomplet, configurer le codec video ou audio." #: ../plugins/mpeg/mpeg.c:1156 #, c-format msgid "Cannot create file %s: %s\n" msgstr "Ne peut créer le fichier %s : %s\n" #: ../plugins/mpeg/mpeg.c:1726 ../plugins/mpeg/options.c:407 #: ../plugins/teletext/export.c:128 msgid "Options" msgstr "Options" #: ../plugins/mpeg/mpeg.c:2150 msgid "New format" msgstr "Nouveau format" #: ../plugins/mpeg/mpeg.c:2151 msgid "Format name:" msgstr "Nom du format :" #: ../plugins/mpeg/mpeg.c:2336 ../plugins/mpeg/mpeg.c:2809 #: ../plugins/mpeg/mpeg.c:2837 ../plugins/mpeg/mpeg.c:2945 #: ../plugins/mpeg/mpeg_properties.glade2.h:7 msgid "Record" msgstr "Enregistrement" #: ../plugins/mpeg/mpeg.c:2625 msgid "Not implemented yet" msgstr "Pas encore implémenté" #: ../plugins/mpeg/mpeg.c:2802 msgid "Record a video stream" msgstr "Enregistrer le flux vidéo" #: ../plugins/mpeg/mpeg.c:2887 msgid "Audio/Video Recorder" msgstr "Enregistrement Audio/Video" #: ../plugins/mpeg/mpeg.c:2890 msgid "This plugin records video and audio into a file" msgstr "Ce greffon enregistre les flux image et audio dans un fichier" #: ../plugins/mpeg/mpeg.c:2893 msgid "Record video and audio." msgstr "Enregistrer la vidéo et l'audio." #: ../plugins/mpeg/mpeg_properties.glade2.h:1 msgid "-" msgstr "-" #: ../plugins/mpeg/mpeg_properties.glade2.h:2 msgid "Capture _height:" msgstr "_Hauteur de la capture :" #: ../plugins/mpeg/mpeg_properties.glade2.h:3 msgid "Capture _width:" msgstr "_Largeur de la capture :" #: ../plugins/mpeg/mpeg_properties.glade2.h:4 msgid "Co_dec:" msgstr "C_odec :" #: ../plugins/mpeg/mpeg_properties.glade2.h:5 #: ../plugins/screenshot/screenshot.glade2.h:3 msgid "Destination file" msgstr "Fichier de destination" #: ../plugins/mpeg/mpeg_properties.glade2.h:6 msgid "Fil_e format" msgstr "Format du fichi_er :" #: ../plugins/mpeg/mpeg_properties.glade2.h:8 msgid "Record _all subtitles" msgstr "Enregistrer _tous les sous-titres" #: ../plugins/mpeg/mpeg_properties.glade2.h:9 msgid "Record this channel or _page:" msgstr "Enregistrer cette chaîne ou _page :" #: ../plugins/mpeg/mpeg_properties.glade2.h:10 msgid "Save _as:" msgstr "S_auver sous :" #: ../plugins/mpeg/mpeg_properties.glade2.h:11 msgid "_Audio" msgstr "_Audio" #: ../plugins/mpeg/mpeg_properties.glade2.h:12 msgid "_Caption and Subtitles" msgstr "Légende et _Sous-titres" #: ../plugins/mpeg/mpeg_properties.glade2.h:13 msgid "_Codec:" msgstr "_Codec :" #: ../plugins/mpeg/mpeg_properties.glade2.h:14 msgid "_Configure..." msgstr "_Configurer..." #: ../plugins/mpeg/mpeg_properties.glade2.h:15 msgid "_Delete" msgstr "_Effacer" #: ../plugins/mpeg/mpeg_properties.glade2.h:16 msgid "_Embedded in the video file:" msgstr "Incrusté dans l_e fichier vidéo :" #: ../plugins/mpeg/mpeg_properties.glade2.h:17 #: ../plugins/screenshot/screenshot.glade2.h:13 msgid "_Format:" msgstr "_Format :" #: ../plugins/mpeg/mpeg_properties.glade2.h:18 msgid "_New" msgstr "_Nouveau" #: ../plugins/mpeg/mpeg_properties.glade2.h:19 msgid "_No caption or subtitle recording" msgstr "Pas d'e_nregistrement des sous-titres/légendes" #: ../plugins/mpeg/mpeg_properties.glade2.h:20 msgid "_Pause" msgstr "_Pause" #: ../plugins/mpeg/mpeg_properties.glade2.h:21 msgid "_Record" msgstr "Enregist_rement" #: ../plugins/mpeg/mpeg_properties.glade2.h:22 msgid "_Record the displayed caption or subtitles" msgstr "En_registrer le sous-titre affiché" #: ../plugins/mpeg/mpeg_properties.glade2.h:23 msgid "_Stop" msgstr "_Stop" #: ../plugins/mpeg/mpeg_properties.glade2.h:24 msgid "_Subtitle file:" msgstr "Fichier des sous-titres :" #: ../plugins/mpeg/mpeg_properties.glade2.h:25 msgid "_Superimposed onto the picture" msgstr "Superposer dans une image" #: ../plugins/mpeg/mpeg_properties.glade2.h:26 msgid "_Update live caption at line breaks" msgstr "Mettre à jo_ur les sous-titres en direct après la fin d'une ligne" #: ../plugins/mpeg/mpeg_properties.glade2.h:27 ../src/zapping.c:500 msgid "_Video" msgstr "_Vidéo" #: ../plugins/mpeg/options.c:741 msgid "No codec" msgstr "Pas de codec" #: ../plugins/screenshot/screenshot.c:45 msgid "Screenshot saver" msgstr "Copie d'écran" #: ../plugins/screenshot/screenshot.c:47 msgid "" "With this plugin you can take screen shots of the program you are watching " "and save them in various formats." msgstr "" "Avec ce greffon vous pouvez faire des copies d'écran de la chaîne que vous " "êtes entrain de regarder et les sauver dans différent formats." #: ../plugins/screenshot/screenshot.c:50 msgid "This plugin takes screenshots of the video capture." msgstr "Ce greffon fait des copies d'écran de la capture vidéo" #: ../plugins/screenshot/screenshot.c:517 #: ../plugins/screenshot/screenshot.c:542 #: ../plugins/screenshot/screenshot.c:1525 msgid "Screenshot" msgstr "Copie d'écran" #: ../plugins/screenshot/screenshot.c:547 msgid "Take a screenshot" msgstr "Faire une copie d'écran" #: ../plugins/screenshot/screenshot.c:684 #: ../plugins/screenshot/screenshot.c:842 msgid "Error while writing screenshot\n" msgstr "Erreur lors de la sauvegarde de la copie d'écran\n" #: ../plugins/screenshot/screenshot.c:892 msgid "Saving..." msgstr "Sauvegarde..." #: ../plugins/screenshot/screenshot.c:919 #, c-format msgid "" "Sorry, but I cannot write %s\n" "%s" msgstr "" "Désolé, mais je ne peut pas écrire %s\n" "%s" #: ../plugins/screenshot/screenshot.c:953 msgid "Sorry, not enough resources to create a new thread" msgstr "Désolé, plus de ressources pour créer un nouveau thread" #: ../plugins/screenshot/screenshot.c:958 msgid "There are too many threads" msgstr "Il y a trop de threads" #: ../plugins/screenshot/screenshot.c:1147 #, c-format msgid "appx %u KB" msgstr "environ %u Ko" #: ../plugins/screenshot/screenshot.c:1150 #, c-format msgid "appx %.2f MB" msgstr "environ %.2f Mo" #: ../plugins/screenshot/screenshot.c:1225 #: ../plugins/screenshot/screenshot.c:1369 msgid "This format has no quality option" msgstr "Ce format n'a pas d'option pour la qualité" #: ../plugins/screenshot/screenshot.c:1405 msgid "Only useful with full size, unscaled picture (480 or 576 lines)" msgstr "Seulement utilisable avec de grande résolution (480 ou 576 lignes)" #: ../plugins/screenshot/screenshot.glade2.h:1 msgid "Backward" msgstr "En arrière" #: ../plugins/screenshot/screenshot.glade2.h:2 msgid "Command to execute after the image has been saved" msgstr "Commande à exécuter après sauvegarde de l'image" #: ../plugins/screenshot/screenshot.glade2.h:4 msgid "Forward" msgstr "En avant" #: ../plugins/screenshot/screenshot.glade2.h:5 msgid "Grab full size image" msgstr "Capturer m'image en taille maximale" #: ../plugins/screenshot/screenshot.glade2.h:6 msgid "Off" msgstr "Off" #: ../plugins/screenshot/screenshot.glade2.h:7 msgid "Preview" msgstr "Pré-visualisation" #: ../plugins/screenshot/screenshot.glade2.h:8 ../plugins/teletext/view.c:2767 msgid "S_ubtitles" msgstr "So_us-titres" #: ../plugins/screenshot/screenshot.glade2.h:9 msgid "Save Screenshot" msgstr "Sauver la copie d'écran" #: ../plugins/screenshot/screenshot.glade2.h:10 msgid "_Add toolbar button" msgstr "_Ajouter une icône dans la barre d'outils" #: ../plugins/screenshot/screenshot.glade2.h:11 msgid "_Completion command:" msgstr "_Commande de complétion :" #: ../plugins/screenshot/screenshot.glade2.h:12 msgid "_Deinterlace:" msgstr "_Deinterlacer :" #: ../plugins/screenshot/screenshot.glade2.h:14 msgid "_Grab on clicking OK" msgstr "_Capturer lors du clique sur OK" #: ../plugins/screenshot/screenshot.glade2.h:15 msgid "_Quality:" msgstr "_Qualité :" #: ../plugins/screenshot/screenshot.glade2.h:16 msgid "_Save as:" msgstr "_Sauver sous :" #: ../plugins/screenshot/screenshot.glade2.h:17 msgid "_Skip" msgstr "_Sauter" #: ../plugins/screenshot/screenshot.glade2.h:18 msgid "pictures before grabbing" msgstr "images avant la capture" #: ../plugins/subtitle/main.c:47 ../src/main.c:199 msgid "Subtitles" msgstr "Sous-titres" #: ../plugins/subtitle/main.c:89 msgid "Subtitle plugin" msgstr "Greffon des sous-titre" #: ../plugins/subtitle/preferences.c:55 ../plugins/teletext/preferences.c:57 msgid "Western and Central Europe" msgstr "Europe de l'ouest et centrale" #: ../plugins/subtitle/preferences.c:56 ../plugins/teletext/preferences.c:58 msgid "Eastern Europe" msgstr "Europe de l'est" #: ../plugins/subtitle/preferences.c:57 ../plugins/teletext/preferences.c:59 msgid "Western Europe and Turkey" msgstr "Europe de l'ouest et Turquie" #: ../plugins/subtitle/preferences.c:58 ../plugins/teletext/preferences.c:60 msgid "Central and Southeast Europe" msgstr "Europe centrale et sud-est" #: ../plugins/subtitle/preferences.c:59 ../plugins/teletext/preferences.c:61 msgid "Cyrillic" msgstr "Cyrillique" #: ../plugins/subtitle/preferences.c:60 ../plugins/teletext/preferences.c:62 msgid "Greek and Turkish" msgstr "Grec et Turc" #: ../plugins/subtitle/preferences.c:61 ../plugins/teletext/preferences.c:63 msgid "Arabic" msgstr "Arabe" #: ../plugins/subtitle/preferences.c:62 ../plugins/teletext/preferences.c:64 msgid "Hebrew and Arabic" msgstr "Hébreu et Arabe" #: ../plugins/subtitle/preferences.c:77 ../plugins/teletext/preferences.c:97 msgid "Nearest (fast, low quality)" msgstr "Nearest (rapide, faible qualité)" #: ../plugins/subtitle/preferences.c:78 ../plugins/teletext/preferences.c:98 msgid "Tiles" msgstr "Mosaïque" #: ../plugins/subtitle/preferences.c:79 ../plugins/teletext/preferences.c:99 msgid "Bilinear" msgstr "Bilinéaire" #: ../plugins/subtitle/preferences.c:80 ../plugins/teletext/preferences.c:100 msgid "Hyper (slow, high quality)" msgstr "Hyper (lent, haute qualité)" #: ../plugins/subtitle/preferences.c:345 msgid "<b>Teletext</b>" msgstr "<b>Télétexte</b>" #: ../plugins/subtitle/preferences.c:347 ../plugins/teletext/preferences.c:303 msgid "_Default encoding:" msgstr "Encodage par _défaut :" #: ../plugins/subtitle/preferences.c:351 msgid "" "Some stations fail to transmit a complete language identifier, so the " "Subtitle viewer may not display the correct font or national characters. You " "can select your geographical region here as an additional hint." msgstr "" "Certaines stations échouent à transmettre une identification de langage, " "ainsi l'affichage des sous-titres peut ne pas correctement afficher les " "polices ou les caractères nationaux. Vous pouvez sélectionner ici une région " "comme une pré-configuration." #: ../plugins/subtitle/preferences.c:358 msgid "_Show double height characters" msgstr "Aficher les caractère_s en double taille" #. TRANSLATORS: #. Closed Caption is a captioning system used mainly in the USA, #. and on VHS/LD/DVD in other countries. Europe uses Teletext for #. caption and subtitle transmissions. #: ../plugins/subtitle/preferences.c:365 msgid "<b>Closed Caption</b>" msgstr "<b>Closed Caption</b>" #: ../plugins/subtitle/preferences.c:367 msgid "_Foreground:" msgstr "T_exte :" #: ../plugins/subtitle/preferences.c:369 msgid "Closed Caption foreground color" msgstr "Couleur de la légende du t_exte" #: ../plugins/subtitle/preferences.c:372 msgid "_Background:" msgstr "_Arrière-plan :" #: ../plugins/subtitle/preferences.c:374 msgid "Closed Caption background color" msgstr "Couleur du fond d'écran" #: ../plugins/subtitle/preferences.c:383 msgid "_Roll live caption" msgstr "Enrouler les sous-titres en live." #: ../plugins/subtitle/preferences.c:386 ../plugins/teletext/preferences.c:368 msgid "<b>Display</b>" msgstr "<b>Affichage</b>" #: ../plugins/subtitle/preferences.c:388 ../plugins/teletext/preferences.c:370 msgid "_Brightness:" msgstr "_Luminosité :" #: ../plugins/subtitle/preferences.c:410 ../plugins/teletext/preferences.c:392 msgid "_Contrast:" msgstr "C_ontraste :" #: ../plugins/subtitle/preferences.c:432 ../plugins/teletext/preferences.c:414 msgid "S_caling:" msgstr "Éch_elle :" #: ../plugins/subtitle/preferences.c:436 ../plugins/teletext/preferences.c:418 msgid "Quality/speed trade-off when scaling and anti-aliasing the page." msgstr "" "Qualité/vitesse lors du redimensionnement et du anti-aliasing de la page." #: ../plugins/subtitle/view.c:1660 ../src/subtitle.c:321 msgid "_Disable" msgstr "N_on activé" #: ../plugins/subtitle/view.c:1662 msgid "_Reset position" msgstr "Anu_lation de la position" #: ../plugins/subtitle/view.c:1664 ../plugins/teletext/window.c:810 msgid "_Encoding" msgstr "_Encodage" #: ../plugins/teletext/bookmark.c:283 #, c-format msgid "Added page %x.%02x to bookmarks" msgstr "Ajouté page %x.%02x aux signets" #: ../plugins/teletext/bookmark.c:287 #, c-format msgid "Added page %x to bookmarks" msgstr "Ajouté page %x aux signets" #: ../plugins/teletext/bookmark.c:348 msgid "_Add Bookmark" msgstr "_Ajouter Signet" #: ../plugins/teletext/bookmark.c:354 msgid "_Edit Bookmarks..." msgstr "_Éditer les Signets..." #: ../plugins/teletext/bookmark.c:595 msgid "Bookmarks" msgstr "Signets" #: ../plugins/teletext/bookmark.c:634 msgid "Channel" msgstr "Chaînes" #: ../plugins/teletext/bookmark.c:640 msgid "Page" msgstr "Page" #: ../plugins/teletext/bookmark.c:645 msgid "Description" msgstr "Description" #: ../plugins/teletext/export.c:168 ../plugins/teletext/export.c:194 msgid "Could not save page" msgstr "Ne peut suavegarder la page" #: ../plugins/teletext/export.c:239 msgid "Save as" msgstr "Sauver sous" #: ../plugins/teletext/export.c:257 msgid "Format:" msgstr "Format :" #: ../plugins/teletext/main.c:176 msgid "_Preferences" msgstr "_Propriétés" #: ../plugins/teletext/main.c:178 msgid "_Colors" msgstr "_Couleurs" #: ../plugins/teletext/main.c:204 ../src/main.c:198 msgid "Teletext" msgstr "Télétexte" #: ../plugins/teletext/main.c:277 msgid "Teletext plugin" msgstr "Greffon télétexte" #: ../plugins/teletext/preferences.c:79 msgid "Level 1" msgstr "Niveau 1" #: ../plugins/teletext/preferences.c:80 msgid "Level 1.5 (additional national characters)" msgstr "Niveau 1.5 (caractères nationaux supplémentaire)" #: ../plugins/teletext/preferences.c:81 msgid "Level 2.5 (more colors, font styles and graphics)" msgstr "Niveau 2.5 (plus de couleurs, styles de police et graphiques)" #: ../plugins/teletext/preferences.c:82 msgid "Level 3.5 (proportional spacing, multicolor graphics)" msgstr "Niveau 3.5 (espacement proportionnel, graphique multi-couleurs)" #: ../plugins/teletext/preferences.c:295 msgid "<b>General</b>" msgstr "<b>Général</b>" #: ../plugins/teletext/preferences.c:297 msgid "_Teletext implementation:" msgstr "Implémentation _Télétexte :" #: ../plugins/teletext/preferences.c:307 msgid "" "Some stations fail to transmit a complete language identifier, so the " "Teletext viewer may not display the correct font or national characters. You " "can select your geographical region here as an additional hint." msgstr "" "Certaines stations échouent à transmettre une identification de langage, " "ainsi le visualiseur Télétexte ne peut pas correctement afficher les polices " "ou les caractères nationaux. Vous pouvez sélectionner ici une région comme " "une pré-configuration" #: ../plugins/teletext/preferences.c:313 msgid "<b>Page memory</b>" msgstr "<b>Page mémoire</b>" #: ../plugins/teletext/preferences.c:315 msgid "_Size:" msgstr "Taill_e :" #. expand #. fill #. pad #. TRANSLATORS: Kilobyte (2^10) #: ../plugins/teletext/preferences.c:341 msgid "KiB" msgstr "KB" #: ../plugins/teletext/preferences.c:348 msgid "_Channels:" msgstr "_Chaînes :" #: ../plugins/teletext/search.c:131 ../plugins/teletext/search.c:349 msgid "Search text:" msgstr "Texte à chercher :" #: ../plugins/teletext/search.c:153 #, c-format msgid "Found text on page %x.%02x:" msgstr "Trouvé texte dans la page %x.%02x :" #: ../plugins/teletext/search.c:160 msgid "Not found:" msgstr "Non trouvé :" #: ../plugins/teletext/search.c:171 msgid "Page memory is empty" msgstr "La page mémoire est vide" #: ../plugins/teletext/search.c:342 ../plugins/teletext/view.c:3260 msgid "Search page memory" msgstr "Chercher la page mémoire" #: ../plugins/teletext/search.c:358 msgid "_Regular expression" msgstr "Expression _régulière" #: ../plugins/teletext/search.c:363 msgid "Search case _insensitive" msgstr "Recherche avec la casse _insensible" #. Future stuff. #: ../plugins/teletext/search.c:369 msgid "_All channels" msgstr "Toutes les _chaînes" #: ../plugins/teletext/toolbar.c:122 msgid "Next page" msgstr "Page suivante" #: ../plugins/teletext/toolbar.c:125 msgid "Previous page" msgstr "Page précédente" #: ../plugins/teletext/toolbar.c:128 msgid "Previous subpage" msgstr "Sous-page précédente" #: ../plugins/teletext/toolbar.c:131 msgid "Next subpage" msgstr "Sous-page suivante" #: ../plugins/teletext/toolbar.c:188 msgid "Open new Teletext window" msgstr "Ouvrir une nouvelle fenêtre Télétexte" #: ../plugins/teletext/toolbar.c:210 msgid "Hold the current subpage" msgstr "Retenir la sous-page courante" #: ../plugins/teletext/toolbar.c:240 msgid "Reveal" msgstr "Découvrir" #: ../plugins/teletext/toolbar.c:241 msgid "Reveal concealed text" msgstr "Afficher le texte caché" #: ../plugins/teletext/view.c:846 #, c-format msgid " Page %x" msgstr "Page %x" #: ../plugins/teletext/view.c:850 #, c-format msgid " Subpage %x" msgstr " Sous-page %x" #: ../plugins/teletext/view.c:1459 #, c-format msgid "Loading page %X..." msgstr "Chargement de la page %X..." #: ../plugins/teletext/view.c:1461 #, c-format msgid "Loading page %X.%02X..." msgstr "Chargement de la page %X.%02X..." #: ../plugins/teletext/view.c:2372 msgid "Selection copied to clipboard" msgstr "Sélection copiée dans le presse papier" #: ../plugins/teletext/view.c:2454 msgid "No page loaded" msgstr "Pas de page chargée" #: ../plugins/teletext/view.c:2467 msgid "Selecting - press Shift key for table mode" msgstr "Sélection - appuyez sur Shift pour le mode table" #: ../plugins/teletext/view.c:2627 msgid "Subtitle index" msgstr "Index du sous-titre" #: ../plugins/teletext/view.c:2634 msgid "Now and Next" msgstr "Maintenant et suivant" #: ../plugins/teletext/view.c:2640 msgid "Current program" msgstr "Programme courant" #: ../plugins/teletext/view.c:2646 msgid "Program Index" msgstr "Index des programmes" #: ../plugins/teletext/view.c:2652 msgid "Program Schedule" msgstr "Calendrier des programmes" #. TRANSLATORS: Schedule changes and the like. #: ../plugins/teletext/view.c:2660 msgid "Program Warning" msgstr "Préavis des programmes" #: ../plugins/teletext/view.c:2721 msgid "_Open" msgstr "_Ouvrir" #: ../plugins/teletext/view.c:2727 msgid "Open in _New Window" msgstr "Ouvrir dans une nouvelle fe_nêtre" #: ../plugins/teletext/view.c:2738 msgid "_Open Link" msgstr "_Ouvrir Lien" #: ../plugins/teletext/view.c:2749 ../plugins/teletext/window.c:805 msgid "_New Window" msgstr "_Nouvelle Fenêtre" #: ../plugins/teletext/view.c:2755 msgid "_Save as..." msgstr "_Sauver sous..." #: ../plugins/teletext/view.c:2761 msgid "S_earch..." msgstr "R_echerche..." #: ../plugins/teletext/view.c:2773 ../plugins/teletext/window.c:812 #: ../src/zapping.c:497 msgid "_Bookmarks" msgstr "_Signets" #: ../plugins/teletext/view.c:3252 msgid "_Go" msgstr "_Aller" #: ../plugins/teletext/view.c:3254 msgid "Previous page in history" msgstr "Page précédente dans l'historique" #: ../plugins/teletext/view.c:3256 msgid "Next page in history" msgstr "Entrée suivante dans l'historique" #: ../plugins/teletext/view.c:3257 msgid "Index" msgstr "Index" #: ../plugins/teletext/view.c:3258 msgid "Go to the index page" msgstr "Aller à la page d'index" #: ../plugins/teletext/view.c:3262 msgid "Save this page to a file" msgstr "Sauvegarder cette page dans un fichier" #. TRANSLATORS: Choose from the Teletext page cache the currently #. received channel. #: ../plugins/teletext/window.c:317 msgid "_Received" msgstr "_Reçu" #: ../plugins/teletext/window.c:349 ../src/v4linterface.c:1317 #: ../src/v4linterface.c:2520 msgid "Unnamed" msgstr "Sans nom" #: ../plugins/teletext/window.c:571 ../src/zvbi.c:221 msgid " (Latin)" msgstr " (Latin)" #: ../plugins/teletext/window.c:573 ../src/zvbi.c:223 msgid " (Cyrillic)" msgstr " (Cyrillique)" #: ../plugins/teletext/window.c:616 ../src/zvbi.c:238 msgid "_Automatic" msgstr "_Automatique" #: ../plugins/teletext/window.c:804 ../src/zapping.c:428 msgid "_File" msgstr "_Fichier" #: ../plugins/teletext/window.c:808 ../src/zapping.c:436 msgid "_Edit" msgstr "_Éditer" #: ../plugins/teletext/window.c:809 ../src/zapping.c:443 msgid "_View" msgstr "Afficha_ge" #. 2.6 GTK_STOCK_EDIT #: ../plugins/teletext/window.c:811 ../src/zapping.c:441 ../src/zapping.c:454 msgid "_Channels" msgstr "_Chaînes" #: ../plugins/teletext/window.c:871 ../src/zapping.c:476 msgid "_Toolbar" msgstr "Barre d'ou_tils" #: ../plugins/teletext/window.c:873 msgid "_Statusbar" msgstr "_Barre d'état" #. TRANSLATORS: Soundcard mixer line. #: ../src/audio.c:807 msgid "Input:" msgstr "Entrée :" #: ../src/audio.c:840 ../src/keyboard.c:1154 ../src/osd.c:1080 #: ../src/properties.c:991 ../src/properties-handler.c:1353 msgid "General Options" msgstr "Options Générale" #: ../src/audio.c:939 msgid "<span foreground=\"blue\">Audio off</span>" msgstr "<span foreground=\"blue\">Arrêt audio</span>" #: ../src/audio.c:940 msgid "<span foreground=\"yellow\">Audio on</span>" msgstr "<span foreground=\"yellow\">Audio en marche</span>" #: ../src/capture.c:866 msgid "Cannot stop capturing while recording." msgstr "Ne peut arrêter la capture." #: ../src/capture.c:1052 #, c-format msgid "Cannot start capturing: %s" msgstr "Ne peut démarrer la capture : %s" #: ../src/channel_editor.c:592 #, c-format msgid "Channel: %s Found: %u" msgstr "Chaîne : %s Trouvé : %u" #: ../src/channel_editor.c:715 msgid "Searching..." msgstr "Recherche..." #: ../src/channel_editor.c:1452 msgid "Select the frequency table used in your country" msgstr "Sélectionnez la table de fréquence utilisée dans votre pays" #: ../src/channel_editor.c:1596 msgid "Ch. Name" msgstr "Nom Ch." # glade/glade_strings.c:149, glade/glade_strings.c:155 #: ../src/channel_editor.c:1601 msgid "Freq (MHz)" msgstr "Freq (MHz)" #. append #: ../src/channel_editor.c:1654 msgid "Channel name" msgstr "Nom de la chaîne" #. append #: ../src/channel_editor.c:1658 msgid "Video input" msgstr "Entrée vidéo" #. append #: ../src/channel_editor.c:1662 msgid "RF Channel" msgstr "Chaîne RF" #. append #: ../src/channel_editor.c:1666 msgid "Video standard" msgstr "Standard vidéo" #. append #: ../src/channel_editor.c:1670 ../src/keyboard.c:444 msgid "Accelerator" msgstr "Accélérateur" #: ../src/channel_editor.c:1685 msgid "Do not change input" msgstr "Ne pas changer l'entrée" #: ../src/channel_editor.c:1709 msgid "Do not change standard" msgstr "Ne pas changer le standard" #: ../src/channel_editor.c:1748 msgid "Channel editor" msgstr "Éditeur de chaîne" #: ../src/channel_editor.c:1772 msgid "Region" msgstr "Région" #: ../src/channel_editor.c:1808 msgid "Automatic station _search" msgstr "Recherche automatique des _stations" #: ../src/channel_editor.c:1814 msgid "" "Select a suitable frequency table, then click here to search through all " "channels in the table and add the received stations to the channel list." msgstr "" "Sélectionnez une table de fréquence appropriée, et cliquez ici pour " "rechercher à travers toutes les chaînes de la table et ajouter les stations " "reçues dans la liste des chaînes." #: ../src/channel_editor.c:1820 msgid "Add all _channels" msgstr "Ajouter toutes les _chaînes" #: ../src/channel_editor.c:1827 msgid "Add all channels in the frequency table to the channel list." msgstr "" "Ajouter toutes les chaînes de la table de fréquence dans la liste des " "chaînes." #: ../src/channel_editor.c:1831 msgid "_Import XawTV configuration" msgstr "_Importer la configuration d'XawTV" #: ../src/channel_editor.c:1858 msgid "Channel List" msgstr "Liste des chaînes" #: ../src/channel_editor.c:1893 msgid "Edit channel" msgstr "Éditer la chaîne" #: ../src/channel_editor.c:1910 msgid "Name:" msgstr "Nom :" #: ../src/channel_editor.c:1919 msgid "Video input:" msgstr "Entrée vidéo :" #: ../src/channel_editor.c:1930 msgid "Fine tuning:" msgstr "Ajustement fin :" #: ../src/channel_editor.c:1936 msgid "MHz" msgstr "MHz" #: ../src/channel_editor.c:1947 msgid "Video standard:" msgstr "Standard vidéo :" #: ../src/channel_editor.c:1958 msgid "Accelerator:" msgstr "Accélérateur :" #: ../src/eggcellrendererkeys.c:163 ../src/eggcellrendererkeys.c:164 msgid "Accelerator key" msgstr "Touche accélératrice" #: ../src/eggcellrendererkeys.c:173 ../src/eggcellrendererkeys.c:174 msgid "Accelerator modifiers" msgstr "Modifiers pour l'accélérateur" #: ../src/eggcellrendererkeys.c:183 msgid "Accelerator Mode" msgstr "Mode Accélérateur" #: ../src/eggcellrendererkeys.c:184 msgid "The type of accelerator." msgstr "Type d'accélérateur." #: ../src/eggcellrendererkeys.c:333 ../src/eggcellrendererkeys.c:567 msgid "Type a new accelerator, or press Backspace to clear" msgstr "Entrez un nouvel accélérateur, ou pressez Backspace pour effacer" #: ../src/eggcellrendererkeys.c:570 msgid "Type a new accelerator" msgstr "Entrez un nouveau accélérateur" #: ../src/frequencies.c:94 ../src/frequencies.c:160 msgid "broadcast" msgstr "broadcast" #: ../src/frequencies.c:107 msgid "cable IRC" msgstr "cable IRC" #: ../src/frequencies.c:126 msgid "cable HRC" msgstr "cable HRC" #: ../src/frequencies.c:144 ../src/frequencies.c:172 msgid "cable" msgstr "cable" #. TRANSLATORS: Leave "Autocom" untranslated. #: ../src/frequencies.c:275 msgid "Autocom cable" msgstr "Cable autocom" #: ../src/keyboard.c:89 ../src/keyboard.c:112 msgid "Ctrl+" msgstr "Ctrl+" #: ../src/keyboard.c:90 ../src/keyboard.c:113 msgid "Alt+" msgstr "Alt+" #: ../src/keyboard.c:91 ../src/keyboard.c:114 msgid "Shift+" msgstr "Shift+" #: ../src/keyboard.c:525 msgid "Key table..." msgstr "Table des touches..." #: ../src/keyboard.c:1106 msgid "Command" msgstr "Commande" #: ../src/keyboard.c:1120 ../src/properties-handler.c:801 msgid "Shortcut" msgstr "Raccourcis" #: ../src/main.c:197 ../src/tveng1.c:1358 ../src/tveng25.c:566 #: ../src/tvengbktr.c:414 ../src/tveng.c:2340 ../src/tvengxv.c:878 msgid "Mute" msgstr "Sourdine" #. warnings #: ../src/main.c:273 ../src/main.c:308 #, c-format msgid "" "Capture mode couldn't be started:\n" "%s" msgstr "" "Le mode capture ne peut être démarré :\n" "%s" #: ../src/main.c:291 #, c-format msgid "" "Cannot restore previous mode, will try capture mode:\n" "%s" msgstr "" "Ne peut restaurer le mode précédent, essaie en mode capture :\n" "%s" #: ../src/main.c:299 #, c-format msgid "" "Capture mode couldn't be started either:\n" "%s" msgstr "" "La capture ne peut pas être faites soit :\n" "%s" #: ../src/main.c:302 #, c-format msgid "" "Cannot restore previous mode:\n" "%s" msgstr "" "Ne peut restaurer le mode précédent :\n" "%s" #: ../src/main.c:376 msgid "Kernel video device" msgstr "Périphérique vidéo du noyau" #: ../src/main.c:377 msgid "FILENAME" msgstr "FILENAME" #: ../src/main.c:388 ../src/main.c:406 msgid "XVideo video input port" msgstr "Entrée vidéo XVideo" #: ../src/main.c:397 msgid "XVideo image overlay port" msgstr "Interface pour l'overlay image XVideo" #: ../src/main.c:415 msgid "Disable XVideo video input support" msgstr "Déactiver le support XVideo pour l'entrée vidéo" #: ../src/main.c:424 msgid "Disable XVideo image overlay support" msgstr "Déactiver le support XVideo de l'overlay" #: ../src/main.c:433 msgid "Disable XVideo extension support" msgstr "Déactiver le support XVideo" #: ../src/main.c:445 msgid "Disable video overlay" msgstr "Déactiver l'overlay vidéo" #: ../src/main.c:454 msgid "X display is remote, disable video overlay" msgstr "L'affichage de X est distant, dé-activation de l'overlay vidéo" #: ../src/main.c:463 msgid "Disable VBI support" msgstr "Déactiver le support VBI" #: ../src/main.c:472 msgid "Disable plugins" msgstr "Déactiver les greffons" #. TRANSLATORS: --no-zsfb command line option. #. TRANSLATORS: --yuv-format command line option. #. TRANSLATORS: --tunerless-norm command line option. #: ../src/main.c:486 ../src/main.c:550 ../src/main.c:560 msgid "Obsolete" msgstr "Obsolète" #: ../src/main.c:504 msgid "Color depth of the X display" msgstr "Nombres de couleurs du display X" #: ../src/main.c:505 msgid "BPP" msgstr "BPP" #: ../src/main.c:513 msgid "Print debug messages" msgstr "Afficher les messages de déboguage" #: ../src/main.c:531 msgid "Force dword alignment of the overlay window" msgstr "Forcer l'alignement en dword pour la fenêtre d'overlay" #: ../src/main.c:540 msgid "Execute the given command and exit" msgstr "Exécuter la commande donnée et quitter" #: ../src/main.c:541 msgid "CMD" msgstr "CMD" #: ../src/main.c:569 msgid "Override CPU detection" msgstr "Ne pas tenir compte de la détection du CPU" #: ../src/main.c:658 msgid "Sorry, but there is no module support in GLib" msgstr "Désolé, mais il n'y a pas le support des modules dans Glib" #: ../src/main.c:782 msgid "Cannot get device info struct" msgstr "Impossible d'obtenir les infos du périphérique" #: ../src/main.c:791 msgid "Zapping couldn't be started" msgstr "Zapping ne peut pas démarrer" #: ../src/main.c:845 #, c-format msgid "Couldn't open %s, try other devices?" msgstr "Ne peut ouvrir %s, dois-je essayer un autre périphérique ?" #: ../src/main.c:872 #, c-format msgid "%s suceeded, setting it as the new default" msgstr "%s avec succès, prendre comme le nouveau défaut" #: ../src/main.c:882 #, c-format msgid "" "Sorry, but \"%s\" could not be opened:\n" "%s" msgstr "" "Désolé, mais \"%s\" ne peut pas être ouvert :\n" "%s" #: ../src/main.c:1242 #, c-format msgid "" "ZConf could not be closed properly , your\n" "configuration will be lost.\n" "Possible causes for this are:\n" " - There is not enough free memory\n" " - You do not have permissions to write to $HOME/.zapping\n" " - libxml is non-functional (?)\n" " - or, more probably, you have found a bug in\n" " %s. Please contact the author.\n" msgstr "" "ZConf ne peut pas être fermé proprement, votre\n" "configuration sera perdu.\n" "Les causes possibles sont :\n" " - Il n'y a plus de mémoire libre\n" " - Vous n'avez pas la permission d'écrire dans $HOME/.zapping\n" " - libxml ne fonctionne pas (?)\n" " - ou, plus sûrement, vous venez de trouver un bogue dans\n" " %s. Contactez l'auteur SVP.\n" #: ../src/main.c:1268 msgid "Sorry, Zapping is unable to create the config tree" msgstr "Désolé, Zapping est incapable de créer la configuration par défaut" #: ../src/mixer.c:103 msgid "The soundcard mixer is not configured." msgstr "Le mixeur de la carte son n'est pas configuré." #: ../src/osd.c:601 msgid "Please choose a font for OSD in preferences." msgstr "Choisissez une police pour l'OSD dans les préférences." #: ../src/osd.c:604 #, c-format msgid "" "The configured font \"%s\" cannot be loaded, please select another one in " "preferences\n" msgstr "" "La police choisie \"%s\" ne peut-être chargée, sélectionnez en une autre " "dans les préférences\n" #: ../src/osd.c:614 msgid "" "No font could be loaded, please make sure\n" "your system is properly configured." msgstr "" "Aucune police ne peut-être chargée, soyez sur\n" "que votre machine est correctement configurée." #: ../src/oss.c:186 msgid "Audio device:" msgstr "Périphérique audio :" #: ../src/oss.c:189 msgid "Select the audio device" msgstr "Sélectionner le périphérique audio" #: ../src/oss.c:216 #, c-format msgid "The given audio device \"%s\" doesn't exist" msgstr "Le périphérique audio \"%s\" n'existe pas" #. TRANSLATORS: Name of mixer line, mono as #. opposed to stereo. #: ../src/oss.c:920 #, c-format msgid "%s (Mono)" msgstr "%s (Mono)" #: ../src/plugin_properties.c:118 msgid "Very low" msgstr "Très bas" #: ../src/plugin_properties.c:122 msgid "Lower" msgstr "Le plus bas" #: ../src/plugin_properties.c:124 msgid "Normal" msgstr "Normal" #: ../src/plugin_properties.c:126 msgid "Very high" msgstr "Très haut" #: ../src/plugin_properties.c:130 msgid "Higher" msgstr "Le plus haut" #: ../src/plugin_properties.c:152 msgid "This plugin has no public symbols" msgstr "Ce greffon n'a pas de symboles public" #: ../src/plugin_properties.c:171 msgid "List of symbols exported by the plugin" msgstr "Liste des symboles exportés par le greffon" #: ../src/plugin_properties.c:213 msgid "Sorry, the plugin couldn't be started" msgstr "Désolé, mais le greffon ne peut être démarré" #: ../src/plugin_properties.c:273 msgid "Sorry, but no plugins have been loaded" msgstr "Désolé, mais aucun greffon n'a été chargé" #: ../src/plugin_properties.c:308 msgid "Plugin name" msgstr "Nom du greffon" #: ../src/plugin_properties.c:335 msgid "Symbol" msgstr "Symbole" #: ../src/plugin_properties.c:340 msgid "Hash" msgstr "Hash" #: ../src/plugins.c:190 #, c-format msgid "\"%s\" doesn't provide a version" msgstr "\"%s\" ne fournit pas de version" #: ../src/plugins.c:227 msgid "Insufficient memory" msgstr "Pas assez de mémoire" #: ../src/plugins.c:236 msgid "No description available" msgstr "Pas de description disponible" #. Warn #: ../src/plugins.c:350 #, c-format msgid "" "Check error: \"%s\" in plugin %s was supposed to be \"%s\" but it is:\"%s\". " "Hashes are 0x%x vs. 0x%x" msgstr "" "Check erreur : \"%s\" du greffon %s devrait être \"%s\" mais il est : \"%s" "\". Hashes are 0x%x vs. 0x%x" #: ../src/properties.c:622 msgid "Zapping Properties" msgstr "Propriétés de Zapping" #: ../src/properties-handler.c:86 msgid "Can capture to memory.\n" msgstr "Peut capturer vers la mémoire.\n" #: ../src/properties-handler.c:88 msgid "Has some tuner.\n" msgstr "A un tuner.\n" #: ../src/properties-handler.c:90 msgid "Supports the teletext service.\n" msgstr "Support du service télétexte.\n" #: ../src/properties-handler.c:92 msgid "Can overlay the image.\n" msgstr "Peut faire l'overlay de l'image.\n" #: ../src/properties-handler.c:94 msgid "Can chromakey the image.\n" msgstr "Can chromakey the image.\n" #: ../src/properties-handler.c:96 msgid "Clipping rectangles are supported.\n" msgstr "Clipping des rectangles supporté.\n" #: ../src/properties-handler.c:98 msgid "Framebuffer memory is overwritten.\n" msgstr "La mémoire du framebuffer est réécrite.\n" #: ../src/properties-handler.c:100 msgid "The capture can be scaled.\n" msgstr "La capture peut être redimensionnée.\n" #: ../src/properties-handler.c:102 msgid "Only monochrome is available\n" msgstr "Seulement le monochrome est disponible\n" #: ../src/properties-handler.c:104 msgid "The capture can be zoomed\n" msgstr "La capture peut-être zoomée\n" #: ../src/properties-handler.c:115 msgid "No available inputs" msgstr "Pas d'entrée valide" #: ../src/properties-handler.c:117 msgid "Your video device has no inputs" msgstr "Votre périphérique vidéo n'a pas d'entrée" #: ../src/properties-handler.c:132 msgid "TV input" msgstr "Entrée TV" #: ../src/properties-handler.c:134 msgid "Camera" msgstr "Caméra" #: ../src/properties-handler.c:413 #, c-format msgid "Resize to %ux%u" msgstr "Redimensionner à %ux%u" #. append #: ../src/properties-handler.c:778 msgid "Width" msgstr "Largeur" #: ../src/properties-handler.c:778 msgid "Height" msgstr "Hauteur" #: ../src/properties-handler.c:892 msgid "Text Below Icons" msgstr "Texte sous les icônes" #: ../src/properties-handler.c:893 msgid "Priority Text Beside Icons" msgstr "Priorité au texte a coté des icônes" #: ../src/properties-handler.c:894 msgid "Icons Only" msgstr "Icônes seulement" #: ../src/properties-handler.c:895 msgid "Text Only" msgstr "Texte seulement" #: ../src/properties-handler.c:960 #, c-format msgid "Use desktop default (%s)" msgstr "Utiliser la valeur par défaut du bureau (%s)" #. TRANSLATORS: Fullscreen video mode #: ../src/properties-handler.c:1160 msgid "Do not change" msgstr "Ne pas changer" #: ../src/properties-handler.c:1164 ../src/tveng.c:4841 msgid "Automatic" msgstr "Automatique" #. TRANSLATORS: Fullscreen video mode #: ../src/properties-handler.c:1179 #, c-format msgid "%u x %u @ %u Hz" msgstr "%u x %u @ %u Hz" #: ../src/properties-handler.c:1344 msgid "Main Window" msgstr "Fenêtre Principale" #: ../src/subtitle.c:258 #, c-format msgid "Page %x" msgstr "Page %x" #: ../src/tveng1.c:1419 msgid "Frame Rate" msgstr "Débit de trame" #: ../src/tveng1.c:1434 msgid "Snapshot Mode" msgstr "Mode copie d'écran" #: ../src/tveng1.c:2571 ../src/tveng25.c:1490 #, c-format msgid "Driver %s returned an unknown or invalid frame buffer format." msgstr "" #: ../src/tveng25.c:547 ../src/tvengbktr.c:383 ../src/tvengbktr.c:400 #: ../src/tvengxv.c:872 msgid "Brightness" msgstr "Luminosité" #: ../src/tveng25.c:548 ../src/tvengbktr.c:385 ../src/tvengbktr.c:402 #: ../src/tvengxv.c:873 msgid "Contrast" msgstr "Contraste" #: ../src/tveng25.c:549 ../src/tvengbktr.c:387 ../src/tvengbktr.c:404 #: ../src/tvengxv.c:874 msgid "Saturation" msgstr "Saturation" #: ../src/tveng25.c:550 ../src/tvengbktr.c:393 ../src/tvengbktr.c:412 #: ../src/tvengxv.c:875 msgid "Hue" msgstr "Teinte" #: ../src/tveng25.c:551 msgid "Whiteness" msgstr "Blancheur" #: ../src/tveng25.c:552 msgid "Black level" msgstr "Niveau de noir" #: ../src/tveng25.c:553 ../src/tveng25.c:554 msgid "White balance" msgstr "Balance du blanc" #: ../src/tveng25.c:555 msgid "Red balance" msgstr "Balance rouge" #: ../src/tveng25.c:556 msgid "Blue balance" msgstr "Balance Bleu" #: ../src/tveng25.c:557 msgid "Gamma" msgstr "Gamma" #: ../src/tveng25.c:558 msgid "Exposure" msgstr "Exposition" #: ../src/tveng25.c:559 msgid "Auto gain" msgstr "Gain auto" #: ../src/tveng25.c:560 msgid "Gain" msgstr "Gain" #: ../src/tveng25.c:561 msgid "HCenter" msgstr "Hcentre" #: ../src/tveng25.c:562 msgid "VCenter" msgstr "Vcentre" #: ../src/tveng25.c:563 msgid "Hor. flipping" msgstr "Retournement Hor." #: ../src/tveng25.c:564 msgid "Vert. flipping" msgstr "Retournement Vert." #: ../src/tveng25.c:565 ../src/tveng.c:2327 ../src/tvengxv.c:879 msgid "Volume" msgstr "Volume" #: ../src/tveng25.c:567 msgid "Audio Mute" msgstr "Audio Muet" #: ../src/tveng25.c:568 msgid "Balance" msgstr "Balance" #: ../src/tveng25.c:569 msgid "Audio Balance" msgstr "Balance Audio" #: ../src/tveng25.c:570 msgid "Treble" msgstr "Aigu" #: ../src/tveng25.c:571 msgid "Loudness" msgstr "Loudness" #: ../src/tveng25.c:572 msgid "Bass" msgstr "Grave" #: ../src/tveng25.c:2745 #, c-format msgid "%s doesn't look like a valid capture device" msgstr "%s n'est pas un périphérique de capture valide" #: ../src/tveng25.c:2764 #, c-format msgid "Sorry, but \"%s\" cannot do streaming" msgstr "Désolé, mais \"%s\" ne peu pas faire de streaming" #: ../src/tvengbktr.c:390 msgid "U/V Gain" msgstr "U/V Gain" #: ../src/tvengbktr.c:407 msgid "U Saturation" msgstr "Saturation U" #: ../src/tvengbktr.c:409 msgid "V Saturation" msgstr "Saturation V" #: ../src/tveng.c:3214 #, fuzzy, c-format msgid "Cannot execute %s. Pipe error." msgstr "" "Ne peut exécuter %s.\n" "%s." #: ../src/tveng.c:3221 ../src/tveng.c:3253 #, fuzzy, c-format msgid "Cannot execute %s. %s." msgstr "" "Ne peut exécuter %s.\n" "%s." #. TRANSLATORS: Program name, error message. #: ../src/tveng.c:3231 #, c-format msgid "" "%s failed.\n" "%s" msgstr "" "%s à échoué.\n" "%s" #. Something executed, but it wasn't #. zapping_setup_fb. Perhaps consolehelper #. couldn't authenticate the user? #: ../src/tveng.c:3243 #, fuzzy, c-format msgid "Cannot execute %s. No permission?" msgstr "" "Ne peut exécuter %s.\n" "%s." #: ../src/tveng.c:3352 #, c-format msgid "Cannot determine current overlay parameters. %s" msgstr "" #. TRANSLATORS: Program name. #: ../src/tveng.c:3361 #, fuzzy, c-format msgid "%s did not work as expected." msgstr "%s n'est pas un périphérique." #: ../src/tveng.c:3466 #, c-format msgid "%s not found in %s or the executable search path." msgstr "%s non trouvé dans %s ou dans les chemins des exécutables." #: ../src/tveng.c:4848 msgid "Mono" msgstr "Mono" #: ../src/tveng.c:4855 msgid "Stereo" msgstr "Stéréo" #: ../src/tveng.c:4863 msgid "Language 2" msgstr "Language 2" #: ../src/tvengxv.c:876 msgid "Color" msgstr "Couleur" #: ../src/tvengxv.c:877 msgid "Interlace" msgstr "Deinterlacer" #: ../src/tvengxv.c:918 msgid "No" msgstr "Non" #: ../src/tvengxv.c:919 msgid "Yes" msgstr "Oui" #: ../src/tvengxv.c:920 msgid "Doublescan" msgstr "Balayage double" #. TRANSLATORS: In controls box, color picker control, #. something like "Adjust Chroma-Key" for overlay. #: ../src/v4linterface.c:452 #, c-format msgid "Adjust %s" msgstr "Ajuster %s" #: ../src/v4linterface.c:621 ../src/zapping.c:466 msgid "Controls" msgstr "Contrôles" #: ../src/v4linterface.c:1308 ../src/zmisc.c:1811 msgid "Unknown" msgstr "Inconnu" #: ../src/v4linterface.c:1326 msgid "No input" msgstr "Pas d'entrée" #: ../src/v4linterface.c:1337 msgid "No standard" msgstr "Pas de standard" #: ../src/v4linterface.c:2410 msgid "Video standards" msgstr "Standards vidéo" #: ../src/v4linterface.c:2430 msgid "Audio inputs" msgstr "Entrées Audio" #: ../src/v4linterface.c:2450 msgid "Video inputs" msgstr "Entrée vidéo" #. TRANSLATORS: This is displayed in the channel menu when #. the channel list is empty. #: ../src/v4linterface.c:2548 msgid "No channels" msgstr "Pas de chaîne" #: ../src/zapping.c:439 msgid "P_lugins" msgstr "_Greffons" #: ../src/zapping.c:444 ../src/zapping.c:485 msgid "_Window" msgstr "_Fenêtre" #: ../src/zapping.c:446 ../src/zapping.c:487 msgid "_Fullscreen" msgstr "_Plein écran" #: ../src/zapping.c:448 ../src/zapping.c:489 msgid "_Background" msgstr "_Arrière-plan" #: ../src/zapping.c:450 msgid "_Overlay mode" msgstr "Mode _Overlay" #: ../src/zapping.c:452 msgid "_Capture mode" msgstr "Mode _Capture" #: ../src/zapping.c:455 msgid "_Help" msgstr "_Aide" #: ../src/zapping.c:456 msgid "_Contents" msgstr "_Sommaire" #: ../src/zapping.c:458 msgid "_About" msgstr "À _propos" #: ../src/zapping.c:461 msgid "Appearance" msgstr "Apparence" #: ../src/zapping.c:462 msgid "Ch. Up" msgstr "Ch. Haut" #: ../src/zapping.c:463 msgid "Switch to higher channel" msgstr "Changer pour la chaîne la plus haute" #: ../src/zapping.c:464 msgid "Ch. Down" msgstr "Ch. Bas" #: ../src/zapping.c:465 msgid "Switch to lower channel" msgstr "Changer pour la chaîne la plus basse" #: ../src/zapping.c:467 msgid "Change picture controls" msgstr "Régler l'image et le son" #: ../src/zapping.c:472 msgid "_Mute" msgstr "_Sourdine" #: ../src/zapping.c:473 msgid "Switch audio on or off" msgstr "Basculer le son on ou off" #: ../src/zapping.c:474 msgid "Menu" msgstr "Menu" #: ../src/zapping.c:478 ../src/zapping.c:1092 msgid "Keep window on top" msgstr "Garder la fenêtre au premier plan" #: ../src/zapping.c:496 ../src/zapping.c:498 msgid "_Teletext" msgstr "_Télétexte" #: ../src/zapping.c:499 msgid "Activate Teletext mode" msgstr "Activer le mode Télétexte" #: ../src/zapping.c:501 msgid "Return to video mode" msgstr "Retour au mode vidéo" #: ../src/zapping.c:502 msgid "_New Teletext View" msgstr "_Nouvelle vue Télétexte" #: ../src/zapping.c:508 ../src/zapping.c:513 msgid "_Subtitles" msgstr "_Sous-titres" #: ../src/zapping.c:514 msgid "Switch subtitles on or off" msgstr "Basculer les sous-titres on ou off" #: ../src/zapping.c:1090 msgid "Show menu and toolbar" msgstr "Voir le menu et la barre d'outils" #: ../src/zmisc.c:662 msgid "Could not switch to capture mode" msgstr "Ne peut basculer en mode capture" #: ../src/zmisc.c:684 ../src/zmisc.c:702 msgid "Could not switch to overlay mode" msgstr "Ne peut basculer en mode overlay." #: ../src/zmisc.c:685 ../src/zmisc.c:737 msgid "Video overlay has been disabled." msgstr "Video overlay n'est pas activé." #: ../src/zmisc.c:718 msgid "Could not switch to Teletext mode" msgstr "Ne peut basculer en mode télétexte" #: ../src/zmisc.c:719 msgid "VBI has been disabled, or it doesn't work." msgstr "Le VBI n'a pas été activé, ou il ne marche pas." #: ../src/zmisc.c:736 ../src/zmisc.c:765 msgid "Could not switch to fullscreen mode" msgstr "Ne peut basculer en plein écran" #: ../src/zmisc.c:1031 msgid "Hide the statusbar" msgstr "Cacher la barre d'état" #: ../src/zmisc.c:1243 #, c-format msgid "%s is not a directory." msgstr "%s n'est pas un répertoire." #: ../src/zmisc.c:1285 msgid "Could not create directory" msgstr "Ne peut créer le répertoire" #: ../src/zmisc.c:1286 #, c-format msgid "" "Could not create %s.\n" "%s" msgstr "" "Ne peut créer %s.\n" "%s." #: ../src/zmisc.c:2006 msgid "Device:" msgstr "Périphérique :" #: ../src/zmisc.c:2007 msgid "Driver:" msgstr "Pilote :" #: ../src/zmisc.c:2008 msgid "Device file:" msgstr "Fichier du périphérique :" #: ../src/zmisc.c:2354 #, c-format msgid "Overwrite %s?" msgstr "Écraser %s ?" #: ../src/zmisc.c:2359 msgid "_Overwrite" msgstr "É_craser" #: ../src/zmisc.c:2367 #, c-format msgid "%s is a directory." msgstr "%s est un répertoire." #: ../src/zmisc.c:2382 #, c-format msgid "%s is a special file" msgstr "%s est un fichier spécial" #: ../src/zmisc.c:2386 msgid "Continue" msgstr "Continuer" #: ../src/zmisc.c:2664 msgid "Could not open help file" msgstr "Ne peut ouvrir le fichier d'aide" #: ../src/zmisc.c:2697 msgid "Could not open URL" msgstr "Ne peut ouvrir l'URL" #: ../src/zspinslider.c:306 ../src/zspinslider.c:310 msgid "Reset" msgstr "Reset" #: ../src/zvbi.c:1044 #, c-format msgid " %s: Teletext Page %x" msgstr " %s : Page Télétexte %x" #: ../src/zvbi.c:1047 #, c-format msgid " Teletext Page %x" msgstr " Page Télétexte %x" #: ../src/zvbi.c:1048 msgid "Open this page with Zapzilla" msgstr "Ouvrir cette page avec Zapzilla" #: ../src/zvbi.c:1434 msgid "PES file read error" msgstr "Erreur de lecture du fichier PES" #: ../src/zvbi.c:1653 msgid "VBI interface timeout" msgstr "Pause de l'interface VBI" #: ../src/zvbi.c:1685 msgid "VBI interface: Failed to read from the device" msgstr "Interface VBI : Échec de la lecture à partir du périphérique" #: ../src/zvbi.c:1763 ../src/zvbi.c:2006 ../src/zvbi.c:2114 msgid "VBI initialization failed" msgstr "L'initialisation du VBI à échouée." #: ../src/zvbi.c:2060 msgid "Cannot open PES file" msgstr "Ne peut ouvrir le fichier PES" #: ../src/zvbi.c:2115 #, c-format msgid "%s is no VBI device." msgstr "%s n'est périphérique VBI." #: ../zapping.desktop.in.h:1 msgid "Lets you watch TV in a window" msgstr "Permet de voir la TV dans une fenêtre" #: ../zapping.desktop.in.h:2 msgid "Zapping TV Viewer" msgstr "Zapping Visualiseur de TV" #: ../zapping.schemas.in.h:1 msgid "Adds spaces around words in Closed Caption text to improve legibility." msgstr "" "Ajouter des espaces entre les mots dans les sous-titres pour augmenter la " "lisibilité." #: ../zapping.schemas.in.h:2 msgid "Caption/subtitle scaling quality." msgstr "Qualité du redimensionnement des sous-titres/légendes." #: ../zapping.schemas.in.h:3 msgid "Closed Caption default background color." msgstr "Fond de couleur pour les sous-titres." #: ../zapping.schemas.in.h:4 msgid "Closed Caption default foreground color." msgstr "Couleur du texte pour les sous-titres." #: ../zapping.schemas.in.h:5 msgid "Color for chroma-key overlay (#RRGGBB), default #FFCCCC." msgstr "" #: ../zapping.schemas.in.h:6 msgid "Default Teletext character set." msgstr "Défaut caractère pour le télétexte." #: ../zapping.schemas.in.h:7 msgid "" "Default Teletext home page, usually 100. Valid values range from 100 to 899." msgstr "" "Page télétexte par défaut, normalement 100. Les valeurs peuvent être " "comprise entre 100 et 899." #: ../zapping.schemas.in.h:8 msgid "Default Teletext home page." msgstr "Page télétexte par défaut." #: ../zapping.schemas.in.h:9 msgid "" "Default background color of Closed Caption text (#RRGGBB), default #000000." msgstr "Couleur pas défaut du fond des sous-titres (#RRGGBB), défaut #000000." #: ../zapping.schemas.in.h:10 msgid "" "Default foreground color of Closed Caption text (#RRGGBB), default #FFFFFF." msgstr "Couleur par défaut des sous-titres (#RRGGBB), défaut #FFFFFF." #: ../zapping.schemas.in.h:11 msgid "Deinterlace option." msgstr "Option de dé-entrelacement." #: ../zapping.schemas.in.h:12 msgid "Display delay of second field (0.0 to 1.0 of one frame period)." msgstr "Délai d'affichage du second champ (0.0 à 1.0 par frame)." #: ../zapping.schemas.in.h:13 msgid "" "Enable navigation elements in the bottom row of the Teletext page. Valid " "values: disabled, flof_top1 (FLOF or TOP style 1), flof_top2 (TOP style 2)." msgstr "" "Afficher les éléments de navigation sur la ligne du bas de la page " "télétexte. Valeurs valides : disabled, flof_top1 (FLOF or TOP style 1), " "flof_top2 (TOP style 2)." #: ../zapping.schemas.in.h:14 msgid "Enable navigation elements." msgstr "Afficher les éléments de navigation." #: ../zapping.schemas.in.h:15 msgid "Enable smooth rolling of real time Closed Caption." msgstr "Activer l'enroulement des sous-titres en temps réel." #: ../zapping.schemas.in.h:16 msgid "Enables slow MMX and 3DNow! optimized functions for tests." msgstr "Activer les lentes fonctions MMX and 3DNow! pour tests." #: ../zapping.schemas.in.h:17 msgid "Greedy (high motion) deinterlace test mode." msgstr "Greedy (high motion) déentrelacement mode test." #: ../zapping.schemas.in.h:18 msgid "Horizontal image resolution in deinterlace mode." msgstr "Résolution horizontale en mode dé-entrelacement." #: ../zapping.schemas.in.h:19 msgid "Interpret the Teletext search text as regular expression." msgstr "Interpréter le texte de recherche comme une expression régulière." #: ../zapping.schemas.in.h:20 msgid "Keep the main window above other windows." msgstr "Garder la fenêtre principale devant les autres fenêtres." #: ../zapping.schemas.in.h:21 msgid "Maximum number of networks in the Teletext page cache." msgstr "Nombre maximum de réseau dans la page cache de télétexte." #: ../zapping.schemas.in.h:22 msgid "Maximum size of the Teletext page cache in bytes." msgstr "Taille maximum du cache des pages télétexte en octets." #: ../zapping.schemas.in.h:23 msgid "Pad Closed Caption text with spaces." msgstr "Remplir les sous-titres avec des espaces." #: ../zapping.schemas.in.h:24 msgid "" "Quality/speed trade-off when scaling and anti-aliasing Teletext pages. Valid " "values: nearest, tiles, bilinear, hyper." msgstr "" "Compromit entre la qualité et la vitesse lors du redimensionnement et de " "l'anti-aliasing de la page télétexte. Valeur : nearest, tiles, bilinear, " "hyper." #: ../zapping.schemas.in.h:25 msgid "" "Quality/speed trade-off when scaling and anti-aliasing caption/subtitles. " "Valid values: nearest, tiles, bilinear, hyper." msgstr "" "Compromit entre la qualité et la vitesse lors du redimensionnement et de " "l'anti-aliasing des sous-titres. Valeurs : nearest, tiles, bilinear, hyper." #: ../zapping.schemas.in.h:26 msgid "Reverse the temporal field order." msgstr "Inverser l'ordre des champs temporel." #: ../zapping.schemas.in.h:27 msgid "Roll Teletext page numbers." msgstr "Enrouler le numéro de la page télétexte." #: ../zapping.schemas.in.h:28 msgid "" "Roll the Teletext page number in the page header until the requested page " "has arrived." msgstr "" "Enrouler le numéro de la page télétexte dans l'entête en attendant que la " "page demandée arrive." #: ../zapping.schemas.in.h:29 msgid "Search all channels in the Teletext page memory." msgstr "Chercher toutes les chaînes dans le cache des page télétexte." #: ../zapping.schemas.in.h:30 msgid "Show a menu bar in the main window." msgstr "Afficher le menu dans la fenêtre principale." #: ../zapping.schemas.in.h:31 msgid "Show a status bar in Teletext windows." msgstr "Afficher la barre d'état dans la fenêtre télétexte." #: ../zapping.schemas.in.h:32 msgid "Show a toolbar in Teletext windows." msgstr "Afficher la barre d'outils dans la fenêtre télétexte." #: ../zapping.schemas.in.h:33 msgid "Show a toolbar in the main window." msgstr "Afficher la barre d'outils dans la fenêtre principale." #: ../zapping.schemas.in.h:34 msgid "Show double height characters in Teletext subtitles." msgstr "Doubler la taille des sous-titres télétexte." #: ../zapping.schemas.in.h:35 msgid "" "Some stations fail to transmit a complete language identifier, so the " "Teletext viewer may not display the correct font or national characters. You " "can select your geographical region here as an additional hint. Valid " "values: western_and_central_europe, eastern_europe, " "western_europe_and_turkey, central_and_southeast_europe, cyrillic, " "greek_and_turkish, arabic, hebrew_and_arabic." msgstr "" "Certaines stations échouent à transmettre une identification de langage, " "ainsi l'affichage Télétexte ne peut pas correctement afficher les polices ou " "les caractères nationaux. Vous pouvez sélectionner ici une région comme une " "pré-configuration. Valeur : western_and_central_europe, eastern_europe, " "western_europe_and_turkey, central_and_southeast_europe, cyrillic, " "greek_and_turkish, arabic, hebrew_and_arabic." #: ../zapping.schemas.in.h:36 msgid "Switch to full capture size for screenshot." msgstr "" "Basculer dans la taille de la capture d'écran lors d'une copie d'écran." #: ../zapping.schemas.in.h:37 msgid "Teletext implementation level." msgstr "Niveau d'implémentation télétexte." #: ../zapping.schemas.in.h:38 msgid "Teletext implementation level. Valid values: 1, 1.5, 2.5, 3.5." msgstr "Niveau du télétexte. Valeurs valides : 1, 1.5, 2.5, 3.5." #: ../zapping.schemas.in.h:39 msgid "Teletext page scaling quality." msgstr "Qualité du redimensionnement des pages télétexte." #: ../zapping.schemas.in.h:40 msgid "Text brightness, valid values range from 0 to 255." msgstr "Luminosité du texte, intervalle de 0 à 255." #: ../zapping.schemas.in.h:41 msgid "Text contrast, valid values range from -128 to 127." msgstr "Contraste du texte, intervalle de -128 à 127." #: ../zapping.schemas.in.h:42 msgid "The Teletext search is case insensitive." msgstr "La recherche télétexte est insensible à la casse." #: ../zapping.schemas.in.h:43 msgid "" "This is the time in milliseconds Zapping will wait between pointer movements " "and blanking the pointer when over the video. A value of zero disables this " "feature." msgstr "" "C'est le temps en milliseconde pour l'effacement du pointeur de la souris. " "Une valeur de zéro le déactive." #: ../zapping.schemas.in.h:44 msgid "Time to wait until blanking the pointer." msgstr "Temps avant la disparition du pointeur de la souris." #: ../zapping.schemas.in.h:45 msgid "Update the clock in the Teletext page header." msgstr "Mise à jour de l'horloge dans l'entête de la page télétexte." #: ../zapping.schemas.in.h:46 msgid "" "When your CPU is too slow to use the desired deinterlace mode you can reduce " "the horizontal resolution. Valid values: low, medium, high." msgstr "" "Quand votre CPU est trop lent pour utiliser le dé-entrelacement vous pouvez " "réduire la résolution horizontale. Valeurs : low, medium, high." #: ../zapping_setup_fb/zapping_setup_fb.c:136 #, c-format msgid "Device name %s is unsafe, contains dots." msgstr "Le nom de périphérique %s n'est pas sur, car il contient des points." #: ../zapping_setup_fb/zapping_setup_fb.c:144 #, c-format msgid "Device name %s is unsafe, does not begin with /dev/." msgstr "" "Le nom de périphérique %s n'est pas sur, car il ne commence pas par /dev/." #. TRANSLATORS: File name, error message. #: ../zapping_setup_fb/zapping_setup_fb.c:163 #, c-format msgid "Cannot open device %s. %s." msgstr "Impossible d'ouvrir %s. %s." #. TRANSLATORS: File name, error message. #: ../zapping_setup_fb/zapping_setup_fb.c:178 #, c-format msgid "Cannot identify %s. %s." msgstr "Ne peut identifier %s. %s." #: ../zapping_setup_fb/zapping_setup_fb.c:190 #, c-format msgid "%s is not a device." msgstr "%s n'est pas un périphérique." #: ../zapping_setup_fb/zapping_setup_fb.c:204 #, c-format msgid "%s is not a video device." msgstr "%s n'est pas périphérisque vidéo." #: ../zapping_setup_fb/zapping_setup_fb.c:218 #, c-format msgid "Cannot identify file descriptor %d. %s." msgstr "Ne peut identifier le descripteur de fichier %d. %s." #: ../zapping_setup_fb/zapping_setup_fb.c:229 #, c-format msgid "File descriptor %d is not a device." msgstr "Le descripteur de fichier %d n'est pas un périphérique." #: ../zapping_setup_fb/zapping_setup_fb.c:239 #, c-format msgid "File descriptor %d is not a video device." msgstr "Le descripteur de fichier %d n'est pas un périphérique vidéo." #: ../zapping_setup_fb/zapping_setup_fb.c:254 #, c-format msgid "Internal error at %s:%u." msgstr "" #: ../zapping_setup_fb/zapping_setup_fb.c:273 #, c-format msgid "Cannot drop root privileges despite running with UID %d, EUID %d." msgstr "N'a pas les privilèges root avec un UID %d, EUID %d." #: ../zapping_setup_fb/zapping_setup_fb.c:303 #, c-format msgid "Cannot restore root privileges despite running with UID %d, EUID %d." msgstr "Ne peut restorer les privilèges root avec un UID %d, EUID %d." #: ../zapping_setup_fb/zapping_setup_fb.c:396 msgid "No standard input, output or error file." msgstr "" #: ../zapping_setup_fb/zapping_setup_fb.c:449 #, c-format msgid "Invalid bpp argument %d. Expected 24 or 32." msgstr "Argument bpp non valide %d. Doit être 24 ou 32." #: ../zapping_setup_fb/zapping_setup_fb.c:482 #, c-format msgid "Invalid device file descriptor %d." msgstr "Descripteur de fichier non valide %d." #: ../zapping_setup_fb/zapping_setup_fb.c:539 msgid "No screens found." msgstr "Pas trouvé d'écran." #: ../zapping_setup_fb/zapping_setup_fb.c:573 #, c-format msgid "Cannot open display %s." msgstr "Ne peut ouvrir le display %s." #: ../zapping_setup_fb/zapping_setup_fb.c:590 #, c-format msgid "Screen %d not found." msgstr "Écran %d non trouvé." #: ../zapping_setup_fb/zapping_setup_fb.c:598 #, c-format msgid "DMA is not possible on screen %d." msgstr "Le DMA n'est pas possible avec l'écran %d." #: ../zapping_setup_fb/zapping_setup_fb.c:614 #, c-format msgid "%s is not a V4L or V4L2 device." msgstr "%s n'est pas un périphérique V4L ou V4L2." #: ../zapping_setup_fb/zapping_setup_fb.c:617 #, c-format msgid "File descriptor %d is not a V4L or V4L2 device." msgstr "Le descripteur de fichier %d n'est pas un périphérique V4L ou V4L2." #: ../zapping_setup_fb/zapping_setup_fb.c:620 #, fuzzy msgid "Cannot identify the video capture device." msgstr "Ne peut identifier le descripteur de fichier %d. %s." #: ../zapping_setup_fb/zapping_setup_fb.h:56 #, fuzzy, c-format msgid "Ioctl %s failed: %s." msgstr "%s à échoué." #: ../zapping_setup_fb/v4l.c:89 ../zapping_setup_fb/v4l25.c:91 msgid "The device does not support video overlay." msgstr "Ce périphérique n'a pas d'overlay vidéo." #~ msgid "Adaptive" #~ msgstr "Adaptatif" #~ msgid "Blended Clip" #~ msgstr "Blended Clip" #~ msgid "Maximum motion" #~ msgstr "Mouvement maximum" #~ msgid "Composite mode" #~ msgstr "Mode composite" #~ msgid "Old Game" #~ msgstr "Old Game" #~ msgid "Unknown error in %s." #~ msgstr "Erreur inconnu dans %s." #~ msgid "VBI device to use" #~ msgstr "Périphérique VBI à utiliser" #~ msgid "DEVICE" #~ msgstr "PÉRIPHÉRIQUE" #~ msgid "Zapzilla couldn't be started" #~ msgstr "Zapzilla ne peut pas démarrer" #~ msgid "Sorry, Zapzilla is unable to create the config tree" #~ msgstr "Désolé, Zapzilla est incapable de créer la configuration par défaut" �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������zapping-0.10cvs6/po/ja.po��������������������������������������������������������������������������� 644 � 764 � 144 � 247652 10443535663 10446� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# Japanese translation file for the Zapping user interface # # Hiroshi Hasebe <hhasebe@DVOI.COM>, 2006. msgid "" msgstr "" "Project-Id-Version: zapping\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2006-04-22 03:07+0900\n" "PO-Revision-Date: 2006-04-25 23:15+0900\n" "Last-Translator: Hiroshi Hasebe <hhasebe@DVOI.COM>\n" "Language-Team: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0;\n" #: ../glade/zapping.glade2.h:1 msgid "320x240" msgstr "320x240" #: ../glade/zapping.glade2.h:2 msgid "" "A format string describing the main window title when changing channels: " "$(alias), $(index), $(id), $(freq), $(standard) and $(input) are substituted " "by the respective values." msgstr "" "TVウィンドウのタイトルでは, つぎの文字列置換マクロを使用できます.\n" "$(alias), $(index), $(id), $(freq), $(standard), $(input)\n" "これらは所定の値に置換されます." #: ../glade/zapping.glade2.h:3 msgid "Advanced" msgstr "詳細" #: ../glade/zapping.glade2.h:4 ../src/audio.c:829 ../src/audio.c:834 #: ../src/tveng.c:4791 msgid "Audio" msgstr "オーディオ" #: ../glade/zapping.glade2.h:5 msgid "Author:" msgstr "著者:" #: ../glade/zapping.glade2.h:6 msgid "Biggest noninterlaced (autodetect)" msgstr "インターレース除去で最大 (自動)" #: ../glade/zapping.glade2.h:7 msgid "Canonical name:" msgstr "登録名:" #: ../glade/zapping.glade2.h:8 msgid "Channel list number" msgstr "チャンネル一覧の番号で指定" #: ../glade/zapping.glade2.h:9 msgid "Choose a color" msgstr "色を選択" #: ../glade/zapping.glade2.h:10 msgid "Chroma _key:" msgstr "クロマキー(_K)" #: ../glade/zapping.glade2.h:11 msgid "Clean console" msgstr "Clean console" #: ../glade/zapping.glade2.h:12 msgid "Click here when you are done" msgstr "Click here when you are done" #: ../glade/zapping.glade2.h:13 msgid "Console" msgstr "コンソール" #: ../glade/zapping.glade2.h:14 #, fuzzy msgid "Copyright (C) 2000-2005 the contributors\n" msgstr "Copyright (C) 2000-2005 the contributors (開発協力者)\n" #: ../glade/zapping.glade2.h:16 msgid "Current controller:" msgstr "選択されているコントローラ:" #: ../glade/zapping.glade2.h:17 msgid "DVB PES File" msgstr "DVB PESファイル" #: ../glade/zapping.glade2.h:18 msgid "DVB _PES File" msgstr "DVB _PESファイル" #: ../glade/zapping.glade2.h:19 msgid "Device name:" msgstr "デバイス名:" #: ../glade/zapping.glade2.h:20 ../src/audio.c:839 #: ../src/properties-handler.c:1352 ../src/zvbi.c:2537 msgid "Devices" msgstr "ハードウェア" #: ../glade/zapping.glade2.h:21 msgid "Disable _screensaver" msgstr "スクリーンセーバーを無効に(_S)" #: ../glade/zapping.glade2.h:22 msgid "Enter key" msgstr "キー入力" #: ../glade/zapping.glade2.h:23 msgid "F_ont:" msgstr "フォント(_F):" #: ../glade/zapping.glade2.h:24 msgid "Favorite _picture sizes:" msgstr "解像度の登録(_P):" #: ../glade/zapping.glade2.h:25 msgid "General options" msgstr "一般設定" #: ../glade/zapping.glade2.h:26 msgid "Interlaced (window size)" msgstr "インターレースあり (ウィンドウサイズ)" #: ../glade/zapping.glade2.h:27 msgid "Kernel VBI device" msgstr "カーネルVBIデバイス" #: ../glade/zapping.glade2.h:28 msgid "Kernel _device" msgstr "カーネルデバイス(_D)" #: ../glade/zapping.glade2.h:29 ../src/keyboard.c:1149 msgid "Keyboard" msgstr "キーボード" #: ../glade/zapping.glade2.h:30 msgid "Known key names" msgstr "Known key names" #: ../glade/zapping.glade2.h:31 msgid "Maximum capture size:" msgstr "最大取り込みサイズ:" #: ../glade/zapping.glade2.h:32 msgid "Minimum capture size:" msgstr "最小取り込みサイズ:" #: ../glade/zapping.glade2.h:33 msgid "Mute while ch_anging channels" msgstr "チャンネル切替時に消音(_A)" #: ../glade/zapping.glade2.h:34 msgid "NTSC" msgstr "NTSC" #: ../glade/zapping.glade2.h:35 msgid "No Display" msgstr "表示無し" #: ../glade/zapping.glade2.h:36 msgid "OK, let's go on" msgstr "OK, let's go on" #: ../glade/zapping.glade2.h:37 ../src/osd.c:1075 msgid "OSD" msgstr "OSD" #: ../glade/zapping.glade2.h:38 msgid "On Screen Display (OSD)" msgstr "オンスクリーン・ディスプレイ (OSD)" #: ../glade/zapping.glade2.h:39 msgid "PAL" msgstr "PAL" #: ../glade/zapping.glade2.h:40 msgid "Plugin location" msgstr "プラグインのパス" #: ../glade/zapping.glade2.h:41 msgid "Plugin priority:" msgstr "プラグイン優先度:" #: ../glade/zapping.glade2.h:42 msgid "Plugin properties" msgstr "プラグインのプロパティ" #: ../glade/zapping.glade2.h:43 msgid "Plugin version:" msgstr "プラグインのバージョン:" #: ../glade/zapping.glade2.h:44 msgid "Properties" msgstr "プロパティ" #: ../glade/zapping.glade2.h:45 msgid "RF channel number" msgstr "チャンネル番号で指定" #: ../glade/zapping.glade2.h:46 msgid "Remember this video standard" msgstr "この放送方式の設定を記憶" #: ../glade/zapping.glade2.h:47 msgid "Remove all this mess" msgstr "すべて削除" #: ../glade/zapping.glade2.h:48 msgid "Run the plugin" msgstr "プラグイン実行" #: ../glade/zapping.glade2.h:49 msgid "SECAM" msgstr "SECAM" #: ../glade/zapping.glade2.h:50 msgid "S_how toolbar as:" msgstr "ツールバーの表示内容(_H):" #: ../glade/zapping.glade2.h:51 msgid "Save _control values per channel" msgstr "チャンネルごとに設定を記憶 (_C)" #: ../glade/zapping.glade2.h:52 msgid "Select OSD font" msgstr "OSDフォント選択" #: ../glade/zapping.glade2.h:53 msgid "Select the V4L device" msgstr "V4Lデバイス選択" #: ../glade/zapping.glade2.h:54 msgid "Show _tooltips" msgstr "ヘルプバルーンを表示" #: ../glade/zapping.glade2.h:55 msgid "Status Bar" msgstr "ステータスバー" #: ../glade/zapping.glade2.h:56 msgid "Stop this plugin" msgstr "プラグインを停止" #: ../glade/zapping.glade2.h:57 msgid "TV viewer for the Gnome environment" msgstr "GNOMEデスクトップ対応TVビューア" #: ../glade/zapping.glade2.h:58 msgid "" "The video capture device does not report the correct video standard, please " "select manually:" msgstr "" "ビデオキャプチャデバイスから適正な映像規格を示す情報が得られません. 手動で指定してください:" "select manually:" #: ../glade/zapping.glade2.h:59 msgid "Title _bar contents:" msgstr "タイトルバーの表示内容(_B):" #: ../glade/zapping.glade2.h:60 ../src/zvbi.c:2532 msgid "VBI" msgstr "VBI" #: ../glade/zapping.glade2.h:61 ../src/main.c:200 #: ../src/properties-handler.c:1339 ../src/properties-handler.c:1347 msgid "Video" msgstr "ビデオ" #: ../glade/zapping.glade2.h:62 msgid "Video Standard" msgstr "放送方式" #: ../glade/zapping.glade2.h:63 msgid "Video device capabilities" msgstr "ビデオデバイスの機能" #: ../glade/zapping.glade2.h:64 msgid "Window" msgstr "ウィンドウ" #: ../glade/zapping.glade2.h:65 msgid "Zapping Preferences" msgstr "Zappingの設定" #: ../glade/zapping.glade2.h:66 msgid "Zapping error console" msgstr "Zappingエラーコンソール" #: ../glade/zapping.glade2.h:67 msgid "_Background color:" msgstr "背景色(_B):" #: ../glade/zapping.glade2.h:68 msgid "_Capture size under XVideo:" msgstr "XVideo使用時の取り込みサイズ(_C):" #: ../glade/zapping.glade2.h:69 msgid "_Command:" msgstr "コマンド (_C):" #: ../glade/zapping.glade2.h:70 msgid "_Control volume with soundcard mixer" msgstr "サウンドカードのミキサで音量調節(_C)" #: ../glade/zapping.glade2.h:71 msgid "_Device file:" msgstr "デバイスファイル (_D):" #: ../glade/zapping.glade2.h:72 msgid "_Display mode:" msgstr "表示モード:" #: ../glade/zapping.glade2.h:73 msgid "_Enter channels by:" msgstr "チャンネルの選択方法(_E):" #: ../glade/zapping.glade2.h:74 msgid "_Foreground color:" msgstr "前景色 (_F):" #: ../glade/zapping.glade2.h:75 msgid "_Fullscreen video resolution:" msgstr "全画面表示の解像度 (_F):" #: ../glade/zapping.glade2.h:76 msgid "_Gnome sound daemon (ESD)" msgstr "_GNOMEサウンドサーバー (ESD)" #: ../glade/zapping.glade2.h:77 msgid "_KDE sound daemon (ARTS)" msgstr "_KDEサウンドサーバー (ARTS)" #: ../glade/zapping.glade2.h:78 msgid "_Mute on exit" msgstr "終了時に消音(_M)" #: ../glade/zapping.glade2.h:79 msgid "_No VBI services" msgstr "VBI無し(_N)" #: ../glade/zapping.glade2.h:80 msgid "_No audio recording" msgstr "録音しない(_N)" #: ../glade/zapping.glade2.h:81 msgid "_Remove after:" msgstr "表示時間(_R):" #: ../glade/zapping.glade2.h:82 msgid "_Resize using fixed increments" msgstr "ウィンドウサイズ変更時に登録済み解像度を順に辿る(_R)" #: ../glade/zapping.glade2.h:83 msgid "_Start Zapping muted" msgstr "起動時に消音(_S)" #: ../glade/zapping.glade2.h:84 msgid "_Use VBI Proxy if available" msgstr "可能であればVBIプロクシを使用(_U)" #: ../glade/zapping.glade2.h:85 msgid "seconds" msgstr "秒" #: ../libvbi/exp-gfx.c:1483 msgid "Correct aspect ratio" msgstr "アスペクト比補正" #: ../libvbi/exp-gfx.c:1484 msgid "" "Approach an image aspect ratio similar to a real TV. This will double the " "image size." msgstr "" "実際のテレビ画面に近いアスペクト比を設定します. これよって" "画像サイズが倍になります." #: ../libvbi/exp-gfx.c:1623 msgid "PPM" msgstr "PPM" #: ../libvbi/exp-gfx.c:1624 msgid "Export this page as raw PPM image" msgstr "このページをraw PPM画像としてエキスポート" #. XXX gettext encoding #: ../libvbi/exp-gfx.c:1824 ../libvbi/exp-html.c:532 ../libvbi/exp-sub.c:633 #: ../libvbi/exp-sub.c:764 ../libvbi/exp-sub.c:821 #, c-format msgid "Teletext Page %3x.%x" msgstr "Teletextページ %3x.%x" #: ../libvbi/exp-gfx.c:1828 ../libvbi/exp-html.c:535 ../libvbi/exp-sub.c:636 #: ../libvbi/exp-sub.c:767 ../libvbi/exp-sub.c:824 #, c-format msgid "Teletext Page %3x" msgstr "Teletextページ %3x" #: ../libvbi/exp-gfx.c:2019 msgid "PNG" msgstr "PNG" #: ../libvbi/exp-gfx.c:2020 msgid "Export this page as PNG image" msgstr "このページをPNG画像としてエクスポート" #: ../libvbi/exp-html.c:110 ../libvbi/exp-txt.c:133 msgid "Graphics char" msgstr "グラフィックキャラクタ" #: ../libvbi/exp-html.c:111 ../libvbi/exp-txt.c:134 msgid "" "Replacement for block graphic characters: a single character or decimal (32) " "or hex (0x20) code" msgstr "" "Replacement for block graphic characters: a single character or decimal (32) " "or hex (0x20) code" #: ../libvbi/exp-html.c:114 ../libvbi/exp-txt.c:137 msgid "ASCII art" msgstr "ASCIIアート" #: ../libvbi/exp-html.c:115 ../libvbi/exp-txt.c:138 msgid "Replace graphic characters by ASCII art" msgstr "Replace graphic characters by ASCII art" #: ../libvbi/exp-html.c:117 msgid "Color (CSS)" msgstr "カラー (CSS)" #: ../libvbi/exp-html.c:118 msgid "Store the page colors using CSS attributes" msgstr "Store the page colors using CSS attributes" #: ../libvbi/exp-html.c:120 msgid "HTML header" msgstr "HTMLヘッダ" #: ../libvbi/exp-html.c:121 msgid "Include HTML page header" msgstr "HTMLヘッダーを含める" #. TRANSLATORS: lang=\"en\" refers to the page title #. "Teletext Page ...". Please specify "de", "fr", "es" #. etc. #: ../libvbi/exp-html.c:521 msgid "<title lang=\"en\">" msgstr "<title lang=\"ja\">" #: ../libvbi/exp-html.c:843 msgid "HTML" msgstr "HTML" #: ../libvbi/exp-html.c:844 msgid "Export this page as HTML page" msgstr "このページをHTMLファイルとしてエクスポート" #: ../libvbi/export.c:200 msgid "Write error." msgstr "書き込みエラー." #: ../libvbi/export.c:210 msgid "Out of memory." msgstr "メモリの確保に失敗." #: ../libvbi/export.c:235 #, c-format msgid "Export module %s has no option %s." msgstr "エキスポートモジュール %s にはオプション %s はありません." #: ../libvbi/export.c:295 #, c-format msgid "Invalid argument %s for option %s of export module %s." msgstr "Invalid argument %s for option %s of export module %s." #: ../libvbi/export.c:350 msgid "Unknown error." msgstr "未知のエラー." #: ../libvbi/export.c:436 #, c-format msgid "Could not create %s. %s." msgstr "%s. %s の作成に失敗." #: ../libvbi/export.c:1334 #, c-format msgid "Invalid option string \"%s\"." msgstr "Invalid option string \"%s\"." #: ../libvbi/export.c:1438 #, c-format msgid "Unknown export module '%s'." msgstr "未知のエキスポートモジュール '%s'." #: ../libvbi/export.c:1452 #, c-format msgid "Cannot initialize export module '%s', probably lack of memory." msgstr "" "エキスポートモジュール '%s' の初期化に失敗, おそらくメモリが不足している." "" #: ../libvbi/export.c:1476 #, c-format msgid "Cannot initialize export module '%s', out of memory." msgstr "" "エキスポートモジュール '%s' の初期化に失敗, メモリを確保できなかった." "" #: ../libvbi/exp-sub.c:124 ../libvbi/exp-txt.c:81 msgid "ASCII" msgstr "ASCII" #: ../libvbi/exp-sub.c:125 ../libvbi/exp-txt.c:82 msgid "ISO-8859-1 (Latin-1 Western languages)" msgstr "ISO-8859-1 (Latin-1 西欧語)" #: ../libvbi/exp-sub.c:126 ../libvbi/exp-txt.c:83 msgid "ISO-8859-2 (Latin-2 Central and Eastern European languages)" msgstr "ISO-8859-2 (Latin-2 中欧語・東欧語)" #: ../libvbi/exp-sub.c:127 ../libvbi/exp-txt.c:84 msgid "ISO-8859-4 (Latin-3 Baltic languages)" msgstr "ISO-8859-4 (Latin-3 バルト語)" #: ../libvbi/exp-sub.c:128 ../libvbi/exp-txt.c:85 msgid "ISO-8859-5 (Cyrillic)" msgstr "ISO-8859-5 (キリール文字)" #: ../libvbi/exp-sub.c:129 ../libvbi/exp-txt.c:86 msgid "ISO-8859-7 (Greek)" msgstr "ISO-8859-7 (ギリシャ語)" #: ../libvbi/exp-sub.c:130 ../libvbi/exp-txt.c:87 msgid "ISO-8859-8 (Hebrew)" msgstr "ISO-8859-8 (ヘブライ語)" #: ../libvbi/exp-sub.c:131 ../libvbi/exp-txt.c:88 msgid "ISO-8859-9 (Turkish)" msgstr "ISO-8859-9 (トルコ語)" #: ../libvbi/exp-sub.c:132 ../libvbi/exp-txt.c:89 msgid "KOI8-R (Russian and Bulgarian)" msgstr "KOI8-R (ロシア語・ブルガリア語)" #: ../libvbi/exp-sub.c:133 ../libvbi/exp-txt.c:90 msgid "KOI8-U (Ukranian)" msgstr "KOI8-U (ウクライナ語)" #: ../libvbi/exp-sub.c:134 ../libvbi/exp-txt.c:91 msgid "ISO-10646/UTF-8 (Unicode)" msgstr "ISO-10646/UTF-8 (Unicode)" #. TRANSLATORS: Text export encoding (ASCII, Unicode, ...) menu #: ../libvbi/exp-sub.c:155 ../libvbi/exp-sub.c:165 ../libvbi/exp-txt.c:127 msgid "Encoding" msgstr "エンコーディング" #: ../libvbi/exp-sub.c:171 msgid "Font face" msgstr "フォント" #. TRANSLATORS: #. Caption is an aid for the hearing impaired, #. subtitles for foreign language viewers. #: ../libvbi/exp-sub.c:1534 msgid "MPlayer caption/subtitle file" msgstr "MPlayerキャプション/サブタイトルファイル" #. TRANSLATORS: #. Styles like bold, italic, underlined, etc. #. Justification to the left, right, centered. #: ../libvbi/exp-sub.c:1559 msgid "" "QuickTime Text caption/subtitle file preserving text styles, justification " "and color" msgstr "" #: ../libvbi/exp-sub.c:1583 msgid "RealText caption/subtitle file preserving text styles and color" msgstr "" #: ../libvbi/exp-sub.c:1606 msgid "" "SAMI 1.0 caption/subtitle file preserving text styles, justification and " "color" msgstr "" #: ../libvbi/exp-sub.c:1630 msgid "SubRip caption/subtitle file" msgstr "" #: ../libvbi/exp-sub.c:1652 msgid "SubViewer 2.x caption/subtitle file" msgstr "" #. TRANSLATORS: Terminal control codes menu #: ../libvbi/exp-txt.c:112 msgid "None" msgstr "無し" #: ../libvbi/exp-txt.c:113 msgid "ANSI X3.64 / VT 100" msgstr "ANSI X3.64 / VT 100" #: ../libvbi/exp-txt.c:114 msgid "VT 200" msgstr "VT 200" #: ../libvbi/exp-txt.c:140 msgid "Control codes" msgstr "Control codes" #: ../libvbi/exp-txt.c:1030 msgid "Text" msgstr "テキスト" #: ../libvbi/exp-txt.c:1031 msgid "Export this page as text file" msgstr "Export this page as text file" #: ../libvbi/exp-vtx.c:82 msgid "Can only export Teletext pages." msgstr "Can only export Teletext pages." #: ../libvbi/exp-vtx.c:89 msgid "Page is not cached." msgstr "ページをキャッシュできません." #: ../libvbi/exp-vtx.c:98 msgid "Cannot export this page, is not displayable." msgstr "このページのエキスポートに失敗, 表示不可." #: ../libvbi/exp-vtx.c:135 msgid "VTX" msgstr "VTX" #: ../libvbi/exp-vtx.c:136 msgid "" "Export this page as VTX file, the format used by VideoteXt and vbidecode" msgstr "" "Export this page as VTX file, the format used by VideoteXt and vbidecode" "" #: ../plugins/alirc/alirc.c:37 msgid "Another lirc plugin" msgstr "Another LIRCプラグイン" #: ../plugins/alirc/alirc.c:39 msgid "" "Another plugin to control zapping through lirc\n" "\n" "To enable this plugin you must edit your ~/.lircrc\n" "file. See the Zapping documentation for details.\n" msgstr "" "LIRCでZappingを操作するための, \"もうひとつの\"プラグイン\n" "\n" "このプラグインを使うには, ~/.lircrc の設定が必要です.\n" "詳細についてはZappingのドキュメントを参照.\n" #: ../plugins/alirc/alirc.c:44 msgid "Lets you control zapping through lirc" msgstr "LIRCでZappingを操作するためのものです" #. hash collision code #. Warn #. hash collision code #. hash collision code #. Warn #: ../plugins/alirc/alirc.c:375 ../plugins/mpeg/mpeg.c:3026 #: ../plugins/screenshot/screenshot.c:1778 #, c-format msgid "Check error: \"%s\" in plugin %s has hash 0x%x vs. 0x%x" msgstr "Check error: \"%s\" in plugin %s has hash 0x%x vs. 0x%x" #: ../plugins/deinterlace/DI_GreedyH/DI_GreedyH.c:240 msgid "Max Comb" msgstr "Max Comb" #: ../plugins/deinterlace/DI_GreedyH/DI_GreedyH.c:246 msgid "Motion Threshold" msgstr "Motion Threshold" #: ../plugins/deinterlace/DI_GreedyH/DI_GreedyH.c:252 msgid "Motion Sense" msgstr "Motion Sense" #: ../plugins/deinterlace/DI_GreedyH/DI_GreedyH.c:258 msgid "Good PullDown Lvl" msgstr "Good PullDown Lvl" #: ../plugins/deinterlace/DI_GreedyH/DI_GreedyH.c:264 msgid "Bad PullDown Lvl" msgstr "Bad PullDown Lvl" #: ../plugins/deinterlace/DI_GreedyH/DI_GreedyH.c:270 #: ../plugins/deinterlace/DI_GreedyH/DI_GreedyH.c:318 msgid "H. Sharpness" msgstr "H. Sharpness" #: ../plugins/deinterlace/DI_GreedyH/DI_GreedyH.c:276 #: ../plugins/deinterlace/DI_GreedyH/DI_GreedyH.c:312 msgid "V. Sharpness" msgstr "V. Sharpness" #: ../plugins/deinterlace/DI_GreedyH/DI_GreedyH.c:282 #: ../plugins/deinterlace/DI_GreedyH/DI_GreedyH.c:306 msgid "Median Filter" msgstr "Median Filter" #: ../plugins/deinterlace/DI_GreedyH/DI_GreedyH.c:288 msgid "High Comb Skip" msgstr "High Comb Skip" #: ../plugins/deinterlace/DI_GreedyH/DI_GreedyH.c:294 msgid "Auto Pull-Down" msgstr "Auto Pull-Down" #: ../plugins/deinterlace/DI_GreedyH/DI_GreedyH.c:300 msgid "In-Between Frames" msgstr "In-Between Frames" #. size of this struct #. curr version compiled #: ../plugins/deinterlace/DI_GreedyH/DI_GreedyH.c:336 msgid "Video (Greedy, High Motion)" msgstr "Video (Greedy, High Motion)" #: ../plugins/deinterlace/DI_Misc/DI_Bob.c:150 msgid "Simple Bob" msgstr "Simple Bob" #: ../plugins/deinterlace/DI_Misc/DI_EvenOnly.c:123 msgid "Even Scanlines Only" msgstr "Even Scanlines Only" #: ../plugins/deinterlace/DI_Misc/DI_Greedy2Frame.c:258 msgid "Greedy 2 Frame Luma Threshold" msgstr "Greedy 2 Frame Luma Threshold" #: ../plugins/deinterlace/DI_Misc/DI_Greedy2Frame.c:270 msgid "Greedy 2 Frame" msgstr "Greedy 2 Frame" #: ../plugins/deinterlace/DI_Misc/DI_Greedy.c:235 msgid "Greedy Max Comb" msgstr "Greedy Max Comb" #: ../plugins/deinterlace/DI_Misc/DI_Greedy.c:246 msgid "Video (Greedy, Low Motion)" msgstr "Video (Greedy, Low Motion)" #: ../plugins/deinterlace/DI_Misc/DI_MoComp2.c:351 msgid "Video (MoComp2)" msgstr "Video (MoComp2)" #: ../plugins/deinterlace/DI_Misc/DI_OddOnly.c:125 msgid "Odd Scanlines Only" msgstr "Odd Scanlines Only" #: ../plugins/deinterlace/DI_Misc/DI_ScalerBob.c:117 msgid "Scaler Bob" msgstr "Scaler Bob" #: ../plugins/deinterlace/DI_Misc/DI_TomsMoComp.c:955 msgid "Search Effort" msgstr "Search Effort" #: ../plugins/deinterlace/DI_Misc/DI_TomsMoComp.c:961 msgid "Use Strange Bob" msgstr "Use Strange Bob" #: ../plugins/deinterlace/DI_Misc/DI_TomsMoComp.c:972 msgid "Video (TomsMoComp)" msgstr "Video (TomsMoComp)" #: ../plugins/deinterlace/DI_Misc/DI_TwoFrame.c:317 msgid "2 Frame Spatial Tolerance" msgstr "2 Frame Spatial Tolerance" #: ../plugins/deinterlace/DI_Misc/DI_TwoFrame.c:323 msgid "2 Frame Temporal Tolerance" msgstr "2 Frame Temporal Tolerance" #: ../plugins/deinterlace/DI_Misc/DI_TwoFrame.c:334 msgid "Video Deinterlace (2-Frame)" msgstr "Video Deinterlace (2-Frame)" #: ../plugins/deinterlace/DI_Misc/DI_VideoBob.c:237 msgid "Weave Edge Detect" msgstr "Weave Edge Detect" #: ../plugins/deinterlace/DI_Misc/DI_VideoBob.c:243 msgid "Weave Jaggie Threshold" msgstr "Weave Jaggie Threshold" #: ../plugins/deinterlace/DI_Misc/DI_VideoBob.c:254 msgid "Video Deinterlace (Bob)" msgstr "Video Deinterlace (Bob)" #: ../plugins/deinterlace/DI_Misc/DI_VideoWeave.c:270 msgid "Temporal Tolerance" msgstr "Temporal Tolerance" #: ../plugins/deinterlace/DI_Misc/DI_VideoWeave.c:276 msgid "Spatial Tolerance" msgstr "Spatial Tolerance" #: ../plugins/deinterlace/DI_Misc/DI_VideoWeave.c:282 msgid "Similarity Threshold" msgstr "Similarity Threshold" #: ../plugins/deinterlace/DI_Misc/DI_VideoWeave.c:293 msgid "Video Deinterlace (Weave)" msgstr "Video Deinterlace (Weave)" #: ../plugins/deinterlace/DI_Misc/DI_Weave.c:155 msgid "Simple Weave" msgstr "Simple Weave" #: ../plugins/deinterlace/main.c:352 msgid "Could not start deinterlace plugin" msgstr "Could not start deinterlace plugin" #: ../plugins/deinterlace/main.c:353 #, c-format msgid "Could not switch to capture format YUYV %u x %u." msgstr "Could not switch to capture format YUYV %u x %u." #: ../plugins/deinterlace/main.c:447 msgid "Deinterlace" msgstr "インターレース除去" # TRANSLATOR'S NOTE: It seems that this string also has to appear as is in # the plugin namespace... (thus not translated as of 0.10cvs4) #: ../plugins/deinterlace/main.c:454 ../plugins/mpeg/mpeg.c:2336 #: ../plugins/mpeg/mpeg.c:2956 ../plugins/screenshot/screenshot.c:522 #: ../plugins/screenshot/screenshot.c:1525 ../plugins/subtitle/main.c:55 #: ../plugins/teletext/main.c:212 msgid "Plugins" msgstr "Plugins" #: ../plugins/deinterlace/main.c:523 msgid "Deinterlace plugin" msgstr "インターレース除去プラグイン" #: ../plugins/deinterlace/preferences.c:48 ../src/plugin_properties.c:120 msgid "Low" msgstr "低" #: ../plugins/deinterlace/preferences.c:49 msgid "Medium" msgstr "中" #: ../plugins/deinterlace/preferences.c:50 ../src/plugin_properties.c:128 msgid "High" msgstr "高" #: ../plugins/deinterlace/preferences.c:287 msgid "_Resolution:" msgstr "解像度(_R):" #. TRANSLATORS: Relative display duration of the first and #. second field in deinterlace mode. #: ../plugins/deinterlace/preferences.c:296 msgid "_Field Balance:" msgstr "フィールドバランス(_F):" #: ../plugins/deinterlace/preferences.c:708 ../src/eggcellrendererkeys.c:222 msgid "Disabled" msgstr "無効" #: ../plugins/mpeg/mpeg.c:846 #, c-format msgid "Format %s is incomplete, please configure the video or audio codec." msgstr "フォーマット\"%s\"の設定に不備があります. ビデオかオーディオのcodecの" "設定をしてください." #: ../plugins/mpeg/mpeg.c:1156 #, c-format msgid "Cannot create file %s: %s\n" msgstr "ファイルの作成に失敗 %s: %s\n" #: ../plugins/mpeg/mpeg.c:1726 ../plugins/mpeg/options.c:407 #: ../plugins/teletext/export.c:128 msgid "Options" msgstr "オプション" #: ../plugins/mpeg/mpeg.c:2150 msgid "New format" msgstr "新規フォーマット" #: ../plugins/mpeg/mpeg.c:2151 msgid "Format name:" msgstr "フォーマット名称:" # TRANSLATOR'S NOTE: It seems that this string also has to appear as is in # the plugin namespace... (thus not translated as of 0.10cvs4) #: ../plugins/mpeg/mpeg.c:2336 ../plugins/mpeg/mpeg.c:2809 #: ../plugins/mpeg/mpeg.c:2837 ../plugins/mpeg/mpeg.c:2945 #: ../plugins/mpeg/mpeg_properties.glade2.h:7 msgid "Record" msgstr "Record" #: ../plugins/mpeg/mpeg.c:2625 msgid "Not implemented yet" msgstr "未実装" #: ../plugins/mpeg/mpeg.c:2802 msgid "Record a video stream" msgstr "ビデオストリームを記録" #: ../plugins/mpeg/mpeg.c:2887 msgid "Audio/Video Recorder" msgstr "オーディオ/ビデオレコーダ" #: ../plugins/mpeg/mpeg.c:2890 msgid "This plugin records video and audio into a file" msgstr "映像と音声をファイルに記録するためのプラグインです" #: ../plugins/mpeg/mpeg.c:2893 msgid "Record video and audio." msgstr "映像と音声の記録." #: ../plugins/mpeg/mpeg_properties.glade2.h:1 msgid "-" msgstr "-" #: ../plugins/mpeg/mpeg_properties.glade2.h:2 msgid "Capture _height:" msgstr "縦サイズ(_H):" #: ../plugins/mpeg/mpeg_properties.glade2.h:3 msgid "Capture _width:" msgstr "横サイズ(_W):" #: ../plugins/mpeg/mpeg_properties.glade2.h:4 msgid "Co_dec:" msgstr "Co_dec:" #: ../plugins/mpeg/mpeg_properties.glade2.h:5 #: ../plugins/screenshot/screenshot.glade2.h:3 msgid "Destination file" msgstr "出力先ファイル" #: ../plugins/mpeg/mpeg_properties.glade2.h:6 msgid "Fil_e format" msgstr "ファイルフォーマット(_E)" #: ../plugins/mpeg/mpeg_properties.glade2.h:8 msgid "Record _all subtitles" msgstr "サブタイトルを全部記録(_A)" #: ../plugins/mpeg/mpeg_properties.glade2.h:9 msgid "Record this channel or _page:" msgstr "現チャンネル/ページのみ記録 (_P):" #: ../plugins/mpeg/mpeg_properties.glade2.h:10 msgid "Save _as:" msgstr "保存先(_A):" #: ../plugins/mpeg/mpeg_properties.glade2.h:11 msgid "_Audio" msgstr "オーディオ(_A)" #: ../plugins/mpeg/mpeg_properties.glade2.h:12 #, fuzzy msgid "_Caption and Subtitles" msgstr "キャプション/サブタイトル(_C)" #: ../plugins/mpeg/mpeg_properties.glade2.h:13 msgid "_Codec:" msgstr "_Codec:" #: ../plugins/mpeg/mpeg_properties.glade2.h:14 msgid "_Configure..." msgstr "設定(_C)..." #: ../plugins/mpeg/mpeg_properties.glade2.h:15 msgid "_Delete" msgstr "削除(_D)" #: ../plugins/mpeg/mpeg_properties.glade2.h:16 msgid "_Embedded in the video file:" msgstr "ビデオファイルに埋め込み(_E):" #: ../plugins/mpeg/mpeg_properties.glade2.h:17 #: ../plugins/screenshot/screenshot.glade2.h:13 msgid "_Format:" msgstr "フォーマット(_F):" #: ../plugins/mpeg/mpeg_properties.glade2.h:18 msgid "_New" msgstr "新規(_N)" #: ../plugins/mpeg/mpeg_properties.glade2.h:19 #, fuzzy msgid "_No caption or subtitle recording" msgstr "キャプショもサブタイトルも記録しない(_N)" #: ../plugins/mpeg/mpeg_properties.glade2.h:20 msgid "_Pause" msgstr "一時停止(_P)" #: ../plugins/mpeg/mpeg_properties.glade2.h:21 msgid "_Record" msgstr "記録(_R)" #: ../plugins/mpeg/mpeg_properties.glade2.h:22 msgid "_Record the displayed caption or subtitles" msgstr "画面上のキャプションとサブタイトルを記録(_R)" #: ../plugins/mpeg/mpeg_properties.glade2.h:23 msgid "_Stop" msgstr "停止(_S)" #: ../plugins/mpeg/mpeg_properties.glade2.h:24 msgid "_Subtitle file:" msgstr "サブタイトルファイル(_S):" #: ../plugins/mpeg/mpeg_properties.glade2.h:25 msgid "_Superimposed onto the picture" msgstr "映像にスーパーインポース(_S)" #: ../plugins/mpeg/mpeg_properties.glade2.h:26 msgid "_Update live caption at line breaks" msgstr "改行位置でキャプションを自動更新(_U)" #: ../plugins/mpeg/mpeg_properties.glade2.h:27 ../src/zapping.c:500 msgid "_Video" msgstr "ビデオ(_V)" #: ../plugins/mpeg/options.c:741 msgid "No codec" msgstr "No codec" #: ../plugins/screenshot/screenshot.c:45 msgid "Screenshot saver" msgstr "スクリーンショット保存" #: ../plugins/screenshot/screenshot.c:47 msgid "" "With this plugin you can take screen shots of the program you are watching " "and save them in various formats." msgstr "" "映像のひとコマを静止画像として記録するプラグインです. " "画像フォーマットの指定もできます." #: ../plugins/screenshot/screenshot.c:50 msgid "This plugin takes screenshots of the video capture." msgstr "このプラグインはキャプチャした映像のスクリーンショットを作成します." #: ../plugins/screenshot/screenshot.c:517 #: ../plugins/screenshot/screenshot.c:542 #: ../plugins/screenshot/screenshot.c:1525 msgid "Screenshot" msgstr "Screenshot" #: ../plugins/screenshot/screenshot.c:547 msgid "Take a screenshot" msgstr "スクリーンショットを撮る" #: ../plugins/screenshot/screenshot.c:684 #: ../plugins/screenshot/screenshot.c:842 msgid "Error while writing screenshot\n" msgstr "スクリーンショットの書き込み時にエラー発生\n" #: ../plugins/screenshot/screenshot.c:892 msgid "Saving..." msgstr "保存中..." #: ../plugins/screenshot/screenshot.c:919 #, c-format msgid "" "Sorry, but I cannot write %s\n" "%s" msgstr "" "%s への書き込み失敗\n" "%s" #: ../plugins/screenshot/screenshot.c:953 msgid "Sorry, not enough resources to create a new thread" msgstr "スレッド新規生成のリソースが不足" #: ../plugins/screenshot/screenshot.c:958 msgid "There are too many threads" msgstr "スレッド多すぎ" #: ../plugins/screenshot/screenshot.c:1147 #, c-format msgid "appx %u KB" msgstr "約 %u KB" #: ../plugins/screenshot/screenshot.c:1150 #, c-format msgid "appx %.2f MB" msgstr "約 %.2f MB" #: ../plugins/screenshot/screenshot.c:1225 #: ../plugins/screenshot/screenshot.c:1369 msgid "This format has no quality option" msgstr "このフォーマットで画質指定はできません" #: ../plugins/screenshot/screenshot.c:1405 msgid "Only useful with full size, unscaled picture (480 or 576 lines)" msgstr "Only useful with full size, unscaled picture (480 or 576 lines)" #: ../plugins/screenshot/screenshot.glade2.h:1 msgid "Backward" msgstr "Backward" #: ../plugins/screenshot/screenshot.glade2.h:2 msgid "Command to execute after the image has been saved" msgstr "画像が保存された後に実行するコマンド" #: ../plugins/screenshot/screenshot.glade2.h:4 msgid "Forward" msgstr "Forward" #: ../plugins/screenshot/screenshot.glade2.h:5 msgid "Grab full size image" msgstr "フルサイズで取り込み" #: ../plugins/screenshot/screenshot.glade2.h:6 msgid "Off" msgstr "Off" #: ../plugins/screenshot/screenshot.glade2.h:7 msgid "Preview" msgstr "プレビュー" #: ../plugins/screenshot/screenshot.glade2.h:8 ../plugins/teletext/view.c:2767 msgid "S_ubtitles" msgstr "サブタイトル(_U)" #: ../plugins/screenshot/screenshot.glade2.h:9 msgid "Save Screenshot" msgstr "スクリーンショット保存" #: ../plugins/screenshot/screenshot.glade2.h:10 msgid "_Add toolbar button" msgstr "ツールバーにボタンを表示(_A)" #: ../plugins/screenshot/screenshot.glade2.h:11 msgid "_Completion command:" msgstr "終了コマンド(_C):" #: ../plugins/screenshot/screenshot.glade2.h:12 msgid "_Deinterlace:" msgstr "インターレース除去(_D):" #: ../plugins/screenshot/screenshot.glade2.h:14 msgid "_Grab on clicking OK" msgstr "OKをクリックして取り込み(_G)" #: ../plugins/screenshot/screenshot.glade2.h:15 msgid "_Quality:" msgstr "画質(_Q):" #: ../plugins/screenshot/screenshot.glade2.h:16 msgid "_Save as:" msgstr "保存先(_S):" #: ../plugins/screenshot/screenshot.glade2.h:17 msgid "_Skip" msgstr "_Skip" #: ../plugins/screenshot/screenshot.glade2.h:18 msgid "pictures before grabbing" msgstr "pictures before grabbing" #: ../plugins/subtitle/main.c:47 ../src/main.c:199 msgid "Subtitles" msgstr "サブタイトル" #: ../plugins/subtitle/main.c:89 msgid "Subtitle plugin" msgstr "サブタイトルプラグイン" #: ../plugins/subtitle/preferences.c:55 ../plugins/teletext/preferences.c:57 msgid "Western and Central Europe" msgstr "西欧・中欧" #: ../plugins/subtitle/preferences.c:56 ../plugins/teletext/preferences.c:58 msgid "Eastern Europe" msgstr "東欧" #: ../plugins/subtitle/preferences.c:57 ../plugins/teletext/preferences.c:59 msgid "Western Europe and Turkey" msgstr "西欧・トルコ" #: ../plugins/subtitle/preferences.c:58 ../plugins/teletext/preferences.c:60 msgid "Central and Southeast Europe" msgstr "中央・南東ヨーロッパ" #: ../plugins/subtitle/preferences.c:59 ../plugins/teletext/preferences.c:61 msgid "Cyrillic" msgstr "キリール文字" #: ../plugins/subtitle/preferences.c:60 ../plugins/teletext/preferences.c:62 msgid "Greek and Turkish" msgstr "ギリシャ語・トルコ語" #: ../plugins/subtitle/preferences.c:61 ../plugins/teletext/preferences.c:63 msgid "Arabic" msgstr "アラビア語" #: ../plugins/subtitle/preferences.c:62 ../plugins/teletext/preferences.c:64 msgid "Hebrew and Arabic" msgstr "ヘブライ語・アラビア語" #: ../plugins/subtitle/preferences.c:77 ../plugins/teletext/preferences.c:97 msgid "Nearest (fast, low quality)" msgstr "Nearest (高速, 低画質)" #: ../plugins/subtitle/preferences.c:78 ../plugins/teletext/preferences.c:98 msgid "Tiles" msgstr "Tiles" #: ../plugins/subtitle/preferences.c:79 ../plugins/teletext/preferences.c:99 msgid "Bilinear" msgstr "Bilinear" #: ../plugins/subtitle/preferences.c:80 ../plugins/teletext/preferences.c:100 msgid "Hyper (slow, high quality)" msgstr "Hyper (低速, 高画質)" #: ../plugins/subtitle/preferences.c:345 msgid "<b>Teletext</b>" msgstr "<b>Teletext</b>" #: ../plugins/subtitle/preferences.c:347 ../plugins/teletext/preferences.c:303 msgid "_Default encoding:" msgstr "デフォルトのエンコーディング(_D):" #: ../plugins/subtitle/preferences.c:351 msgid "" "Some stations fail to transmit a complete language identifier, so the " "Subtitle viewer may not display the correct font or national characters. You " "can select your geographical region here as an additional hint." msgstr "" "Some stations fail to transmit a complete language identifier, so the " "Subtitle viewer may not display the correct font or national characters. You " "can select your geographical region here as an additional hint." "" #: ../plugins/subtitle/preferences.c:358 msgid "_Show double height characters" msgstr "倍の高さの文字を表示" #. TRANSLATORS: #. Closed Caption is a captioning system used mainly in the USA, #. and on VHS/LD/DVD in other countries. Europe uses Teletext for #. caption and subtitle transmissions. #: ../plugins/subtitle/preferences.c:365 msgid "<b>Closed Caption</b>" msgstr "<b>クローズドキャプション</b>" #: ../plugins/subtitle/preferences.c:367 msgid "_Foreground:" msgstr "前景色(_F):" #: ../plugins/subtitle/preferences.c:369 #, fuzzy msgid "Closed Caption foreground color" msgstr "クローズドキャプションの前景色" #: ../plugins/subtitle/preferences.c:372 msgid "_Background:" msgstr "背景色(_B):" #: ../plugins/subtitle/preferences.c:374 #, fuzzy msgid "Closed Caption background color" msgstr "クローズドキャプションの背景色" #: ../plugins/subtitle/preferences.c:383 msgid "_Roll live caption" msgstr "キャプションをスクロール" #: ../plugins/subtitle/preferences.c:386 ../plugins/teletext/preferences.c:368 msgid "<b>Display</b>" msgstr "<b>ディスプレイ</b>" #: ../plugins/subtitle/preferences.c:388 ../plugins/teletext/preferences.c:370 msgid "_Brightness:" msgstr "輝度(_B):" #: ../plugins/subtitle/preferences.c:410 ../plugins/teletext/preferences.c:392 msgid "_Contrast:" msgstr "コントラスト(_C):" #: ../plugins/subtitle/preferences.c:432 ../plugins/teletext/preferences.c:414 msgid "S_caling:" msgstr "スケーリング(_C):" #: ../plugins/subtitle/preferences.c:436 ../plugins/teletext/preferences.c:418 msgid "Quality/speed trade-off when scaling and anti-aliasing the page." msgstr "Quality/speed trade-off when scaling and anti-aliasing the page." #: ../plugins/subtitle/view.c:1660 ../src/subtitle.c:321 msgid "_Disable" msgstr "無効(_D)" #: ../plugins/subtitle/view.c:1662 msgid "_Reset position" msgstr "_Reset position" #: ../plugins/subtitle/view.c:1664 ../plugins/teletext/window.c:810 msgid "_Encoding" msgstr "エンコーディング(_E)" #: ../plugins/teletext/bookmark.c:283 #, c-format msgid "Added page %x.%02x to bookmarks" msgstr "ページ %x.%02x をブックマーク" #: ../plugins/teletext/bookmark.c:287 #, c-format msgid "Added page %x to bookmarks" msgstr "ページ %x をブックマーク" #: ../plugins/teletext/bookmark.c:348 msgid "_Add Bookmark" msgstr "ブックマーク(_A)" #: ../plugins/teletext/bookmark.c:354 msgid "_Edit Bookmarks..." msgstr "ブックマーク編集(_E)..." #: ../plugins/teletext/bookmark.c:595 msgid "Bookmarks" msgstr "ブックマーク" #: ../plugins/teletext/bookmark.c:634 msgid "Channel" msgstr "チャンネル" #: ../plugins/teletext/bookmark.c:640 msgid "Page" msgstr "ページ" #: ../plugins/teletext/bookmark.c:645 msgid "Description" msgstr "概要" #: ../plugins/teletext/export.c:168 ../plugins/teletext/export.c:194 msgid "Could not save page" msgstr "ページの保存に失敗" #: ../plugins/teletext/export.c:239 msgid "Save as" msgstr "保存先" #: ../plugins/teletext/export.c:257 msgid "Format:" msgstr "フォーマット:" #: ../plugins/teletext/main.c:176 msgid "_Preferences" msgstr "設定(_P)" #: ../plugins/teletext/main.c:178 msgid "_Colors" msgstr "色(_C)" #: ../plugins/teletext/main.c:204 ../src/main.c:198 msgid "Teletext" msgstr "Teletext" #: ../plugins/teletext/main.c:277 msgid "Teletext plugin" msgstr "Teletextプラグイン" #: ../plugins/teletext/preferences.c:79 msgid "Level 1" msgstr "レベル1" #: ../plugins/teletext/preferences.c:80 msgid "Level 1.5 (additional national characters)" msgstr "レベル1.5 (他言語キャラクタを含む)" #: ../plugins/teletext/preferences.c:81 msgid "Level 2.5 (more colors, font styles and graphics)" msgstr "レベル2.5 (色数, フォントスタイル, グラフィックスを拡張)" #: ../plugins/teletext/preferences.c:82 msgid "Level 3.5 (proportional spacing, multicolor graphics)" msgstr "レベル3.5 (プロポーショナル・スペーシング, 多色画像)" #: ../plugins/teletext/preferences.c:295 msgid "<b>General</b>" msgstr "<b>基本設定</b>" #: ../plugins/teletext/preferences.c:297 msgid "_Teletext implementation:" msgstr "_Teletext実装レベル:" #: ../plugins/teletext/preferences.c:307 msgid "" "Some stations fail to transmit a complete language identifier, so the " "Teletext viewer may not display the correct font or national characters. You " "can select your geographical region here as an additional hint." msgstr "" "完全な言語識別情報を送信しない局もあるため, 使用言語に合ったフォントと文字が" "正しく選択されない場合があります. ここでお住いの地域を指定しておくと, " "そうした場合の設定補完ができます." "" #: ../plugins/teletext/preferences.c:313 msgid "<b>Page memory</b>" msgstr "<b>ページメモリ</b>" #: ../plugins/teletext/preferences.c:315 msgid "_Size:" msgstr "サイズ(_S):" #. expand #. fill #. pad #. TRANSLATORS: Kilobyte (2^10) #: ../plugins/teletext/preferences.c:341 msgid "KiB" msgstr "KB" #: ../plugins/teletext/preferences.c:348 msgid "_Channels:" msgstr "チャンネル(_C):" #: ../plugins/teletext/search.c:131 ../plugins/teletext/search.c:349 msgid "Search text:" msgstr "テキスト検索:" #: ../plugins/teletext/search.c:153 #, c-format msgid "Found text on page %x.%02x:" msgstr "ページ %x.%02x に一致するテキストを発見:" #: ../plugins/teletext/search.c:160 msgid "Not found:" msgstr "該当無し:" #: ../plugins/teletext/search.c:171 msgid "Page memory is empty" msgstr "ページメモリが空です" #: ../plugins/teletext/search.c:342 ../plugins/teletext/view.c:3260 msgid "Search page memory" msgstr "ページメモリを検索" #: ../plugins/teletext/search.c:358 msgid "_Regular expression" msgstr "正規表現(_R)" #: ../plugins/teletext/search.c:363 msgid "Search case _insensitive" msgstr "大文字/小文字を区別せず検索" #. Future stuff. #: ../plugins/teletext/search.c:369 msgid "_All channels" msgstr "全チャンネル(_A)" #: ../plugins/teletext/toolbar.c:122 msgid "Next page" msgstr "次のページ" #: ../plugins/teletext/toolbar.c:125 msgid "Previous page" msgstr "前のページ" #: ../plugins/teletext/toolbar.c:128 msgid "Previous subpage" msgstr "前のサブページ" #: ../plugins/teletext/toolbar.c:131 msgid "Next subpage" msgstr "次のサブページ" #: ../plugins/teletext/toolbar.c:188 msgid "Open new Teletext window" msgstr "Teletextウィンドウを新規に開く" #: ../plugins/teletext/toolbar.c:210 msgid "Hold the current subpage" msgstr "現在のサブページを保持" #: ../plugins/teletext/toolbar.c:240 msgid "Reveal" msgstr "表示" #: ../plugins/teletext/toolbar.c:241 msgid "Reveal concealed text" msgstr "隠されているテキストを表示" #: ../plugins/teletext/view.c:846 #, c-format msgid " Page %x" msgstr " ページ %x" #: ../plugins/teletext/view.c:850 #, c-format msgid " Subpage %x" msgstr " サブページ %x" #: ../plugins/teletext/view.c:1459 #, c-format msgid "Loading page %X..." msgstr "ページ %X を読み込み中..." #: ../plugins/teletext/view.c:1461 #, c-format msgid "Loading page %X.%02X..." msgstr "ページ %X.%02X を読み込み中..." #: ../plugins/teletext/view.c:2372 msgid "Selection copied to clipboard" msgstr "選択部分をクリップボードへコピー" #: ../plugins/teletext/view.c:2454 msgid "No page loaded" msgstr "ページが読み込まれていない" #: ../plugins/teletext/view.c:2467 msgid "Selecting - press Shift key for table mode" msgstr "選択中 - Shiftキーでテーブルモード" #: ../plugins/teletext/view.c:2627 msgid "Subtitle index" msgstr "サブタイトルインデックス" #: ../plugins/teletext/view.c:2634 msgid "Now and Next" msgstr "Now and Next" #: ../plugins/teletext/view.c:2640 msgid "Current program" msgstr "現在の番組" #: ../plugins/teletext/view.c:2646 msgid "Program Index" msgstr "番組インデックス" #: ../plugins/teletext/view.c:2652 msgid "Program Schedule" msgstr "番組予定" #. TRANSLATORS: Schedule changes and the like. #: ../plugins/teletext/view.c:2660 msgid "Program Warning" msgstr "番組に関する注意事項" #: ../plugins/teletext/view.c:2721 msgid "_Open" msgstr "開く (_O)" #: ../plugins/teletext/view.c:2727 msgid "Open in _New Window" msgstr "新規ウィンドウで開く (_N)" #: ../plugins/teletext/view.c:2738 msgid "_Open Link" msgstr "リンクを開く (_O)" #: ../plugins/teletext/view.c:2749 ../plugins/teletext/window.c:805 msgid "_New Window" msgstr "新規ウィンドウ (_N)" #: ../plugins/teletext/view.c:2755 msgid "名前を付けて保存 (_S)..." msgstr "_Salva come..." #: ../plugins/teletext/view.c:2761 msgid "S_earch..." msgstr "検索 (_C)..." #: ../plugins/teletext/view.c:2773 ../plugins/teletext/window.c:812 #: ../src/zapping.c:497 msgid "_Bookmarks" msgstr "ブックマーク (_B)" #: ../plugins/teletext/view.c:3252 msgid "_Go" msgstr "_Go" #: ../plugins/teletext/view.c:3254 msgid "Previous page in history" msgstr "履歴内の前のページ" #: ../plugins/teletext/view.c:3256 msgid "Next page in history" msgstr "履歴内の次ページ" #: ../plugins/teletext/view.c:3257 msgid "Index" msgstr "インデックス" #: ../plugins/teletext/view.c:3258 msgid "Go to the index page" msgstr "インデックスページへ" #: ../plugins/teletext/view.c:3262 msgid "Save this page to a file" msgstr "このページを保存" #. TRANSLATORS: Choose from the Teletext page cache the currently #. received channel. #: ../plugins/teletext/window.c:317 msgid "_Received" msgstr "受信済ページ(_R)" #: ../plugins/teletext/window.c:349 ../src/v4linterface.c:1317 #: ../src/v4linterface.c:2520 msgid "Unnamed" msgstr "名称未設定" #: ../plugins/teletext/window.c:571 ../src/zvbi.c:221 msgid " (Latin)" msgstr " (ラテン文字)" #: ../plugins/teletext/window.c:573 ../src/zvbi.c:223 msgid " (Cyrillic)" msgstr " (キリール文字)" #: ../plugins/teletext/window.c:616 ../src/zvbi.c:238 msgid "_Automatic" msgstr "自動(_A)" #: ../plugins/teletext/window.c:804 ../src/zapping.c:428 msgid "_File" msgstr "ファイル(_F)" #: ../plugins/teletext/window.c:808 ../src/zapping.c:436 msgid "_Edit" msgstr "編集(_E)" #: ../plugins/teletext/window.c:809 ../src/zapping.c:443 msgid "_View" msgstr "表示(_V)" #. 2.6 GTK_STOCK_EDIT #: ../plugins/teletext/window.c:811 ../src/zapping.c:441 ../src/zapping.c:454 msgid "_Channels" msgstr "チャンネル(_C)" #: ../plugins/teletext/window.c:871 ../src/zapping.c:476 msgid "_Toolbar" msgstr "ツールバー(_T)" #: ../plugins/teletext/window.c:873 msgid "_Statusbar" msgstr "ステータスバー(_S)" #. TRANSLATORS: Soundcard mixer line. #: ../src/audio.c:807 msgid "Input:" msgstr "入力ソース:" #: ../src/audio.c:840 ../src/keyboard.c:1154 ../src/osd.c:1080 #: ../src/properties.c:991 ../src/properties-handler.c:1353 msgid "General Options" msgstr "一般設定" #: ../src/audio.c:939 msgid "<span foreground=\"blue\">Audio off</span>" msgstr "<span foreground=\"blue\">Audio off</span>" #: ../src/audio.c:940 msgid "<span foreground=\"yellow\">Audio on</span>" msgstr "<span foreground=\"yellow\">Audio on</span>" #: ../src/capture.c:866 msgid "Cannot stop capturing while recording." msgstr "録画中にキャプチャ解除はできません." #: ../src/capture.c:1052 #, c-format msgid "Cannot start capturing: %s" msgstr "キャプチャ開始に失敗: %s" #: ../src/channel_editor.c:592 #, c-format msgid "Channel: %s Found: %u" msgstr "チャンネル: %s 検出: %u" #: ../src/channel_editor.c:715 msgid "Searching..." msgstr "検索中..." #: ../src/channel_editor.c:1452 msgid "Select the frequency table used in your country" msgstr "お住いの地域の周波数テーブルを選択します" #: ../src/channel_editor.c:1596 msgid "Ch. Name" msgstr "CH" #: ../src/channel_editor.c:1601 msgid "Freq (MHz)" msgstr "周波数 (MHz)" #. append #: ../src/channel_editor.c:1654 msgid "Channel name" msgstr "放送局" #. append #: ../src/channel_editor.c:1658 msgid "Video input" msgstr "映像ソース" #. append #: ../src/channel_editor.c:1662 msgid "RF Channel" msgstr "チャンネル/周波数" #. append #: ../src/channel_editor.c:1666 msgid "Video standard" msgstr "放送方式" #. append #: ../src/channel_editor.c:1670 ../src/keyboard.c:444 msgid "Accelerator" msgstr "ショートカット" #: ../src/channel_editor.c:1685 msgid "Do not change input" msgstr "共通の入力ソースを使う" #: ../src/channel_editor.c:1709 msgid "Do not change standard" msgstr "共通の放送方式を使う" #: ../src/channel_editor.c:1748 msgid "Channel editor" msgstr "チャンネル設定" #: ../src/channel_editor.c:1772 msgid "Region" msgstr "地域" #: ../src/channel_editor.c:1808 msgid "Automatic station _search" msgstr "放送周波数の自動走査(_S)" #: ../src/channel_editor.c:1814 msgid "" "Select a suitable frequency table, then click here to search through all " "channels in the table and add the received stations to the channel list." msgstr "" "適切な周波数テーブルを選択してからここをクリックすると, 該当する全放送局の受信" "チェックを開始します. その結果から, 視聴可能な局をチャンネル一覧に" "登録できます." #: ../src/channel_editor.c:1820 msgid "Add all _channels" msgstr "全チャンネルを登録" #: ../src/channel_editor.c:1827 msgid "Add all channels in the frequency table to the channel list." msgstr "" "周波数テーブルに含まれる全チャンネルを登録します." #: ../src/channel_editor.c:1831 msgid "_Import XawTV configuration" msgstr "XawTVの設定を読み込む(_I)" #: ../src/channel_editor.c:1858 msgid "Channel List" msgstr "チャンネル一覧" #: ../src/channel_editor.c:1893 msgid "Edit channel" msgstr "チャンネル設定" #: ../src/channel_editor.c:1910 msgid "Name:" msgstr "局名:" #: ../src/channel_editor.c:1919 msgid "Video input:" msgstr "映像ソース:" #: ../src/channel_editor.c:1930 msgid "Fine tuning:" msgstr "微調整:" #: ../src/channel_editor.c:1936 msgid "MHz" msgstr "MHz" #: ../src/channel_editor.c:1947 msgid "Video standard:" msgstr "放送方式:" #: ../src/channel_editor.c:1958 msgid "Accelerator:" msgstr "キーボードショートカット:" #: ../src/eggcellrendererkeys.c:163 ../src/eggcellrendererkeys.c:164 msgid "Accelerator key" msgstr "ショートカットキー" #: ../src/eggcellrendererkeys.c:173 ../src/eggcellrendererkeys.c:174 msgid "Accelerator modifiers" msgstr "同時に押すキー" #: ../src/eggcellrendererkeys.c:183 msgid "Accelerator Mode" msgstr "Accelerator Mode" #: ../src/eggcellrendererkeys.c:184 msgid "The type of accelerator." msgstr "ショートカット種別." #: ../src/eggcellrendererkeys.c:333 ../src/eggcellrendererkeys.c:567 msgid "Type a new accelerator, or press Backspace to clear" msgstr "キーを押してください. 消去するときはBackspaceです." #: ../src/eggcellrendererkeys.c:570 msgid "Type a new accelerator" msgstr "キーを押してください" #: ../src/frequencies.c:94 ../src/frequencies.c:160 msgid "broadcast" msgstr "broadcast" #: ../src/frequencies.c:107 msgid "cable IRC" msgstr "cable IRC" #: ../src/frequencies.c:126 msgid "cable HRC" msgstr "cable HRC" #: ../src/frequencies.c:144 ../src/frequencies.c:172 msgid "cable" msgstr "cable" #. TRANSLATORS: Leave "Autocom" untranslated. #: ../src/frequencies.c:275 msgid "Autocom cable" msgstr "Autocom cable" #: ../src/keyboard.c:89 ../src/keyboard.c:112 msgid "Ctrl+" msgstr "Ctrl+" #: ../src/keyboard.c:90 ../src/keyboard.c:113 msgid "Alt+" msgstr "Alt+" #: ../src/keyboard.c:91 ../src/keyboard.c:114 msgid "Shift+" msgstr "Shift+" #: ../src/keyboard.c:525 msgid "Key table..." msgstr "キー一覧..." #: ../src/keyboard.c:1106 msgid "Command" msgstr "コマンド" #: ../src/keyboard.c:1120 ../src/properties-handler.c:801 msgid "Shortcut" msgstr "ショートカットキー" #: ../src/main.c:197 ../src/tveng1.c:1211 ../src/tveng25.c:538 #: ../src/tvengbktr.c:414 ../src/tveng.c:2312 ../src/tvengxv.c:574 msgid "Mute" msgstr "消音" #. warnings #: ../src/main.c:273 ../src/main.c:308 #, c-format msgid "" "Capture mode couldn't be started:\n" "%s" msgstr "" "キャプチャモードへの移行に失敗:\n" "%s" #: ../src/main.c:291 #, c-format msgid "" "Cannot restore previous mode, will try capture mode:\n" "%s" msgstr "" "事前のモードへの復帰に失敗. キャプチャモードへの切り替えを試みます:\n" "%s" #: ../src/main.c:299 #, c-format msgid "" "Capture mode couldn't be started either:\n" "%s" msgstr "" "キャプチャモードへの移行にも失敗:\n" "%s" #: ../src/main.c:302 #, c-format msgid "" "Cannot restore previous mode:\n" "%s" msgstr "" "事前のモードへの復帰に失敗:\n" "%s" #: ../src/main.c:376 msgid "Kernel video device" msgstr "カーネルビデオデバイス" #: ../src/main.c:377 msgid "FILENAME" msgstr "FILENAME" #: ../src/main.c:388 ../src/main.c:406 msgid "XVideo video input port" msgstr "XVideoビデオ入力ポート" #: ../src/main.c:397 msgid "XVideo image overlay port" msgstr "XVideoイメージオーバーレイポート" #: ../src/main.c:415 msgid "Disable XVideo video input support" msgstr "XVideoビデオ入力を無効に" #: ../src/main.c:424 msgid "Disable XVideo image overlay support" msgstr "XVideoイメージオーバーレイを無効に" #: ../src/main.c:433 msgid "Disable XVideo extension support" msgstr "XVideoイクステンションを無効に" #: ../src/main.c:445 msgid "Disable video overlay" msgstr "オーバーレイを無効に" #: ../src/main.c:454 msgid "X display is remote, disable video overlay" msgstr "ローカルなXディスプレイでないため, ビデオオーバーレイが無効" #: ../src/main.c:463 msgid "Disable VBI support" msgstr "VBIを無効に" #: ../src/main.c:472 msgid "Disable plugins" msgstr "プラグインを無効に" #. TRANSLATORS: --no-zsfb command line option. #. TRANSLATORS: --yuv-format command line option. #. TRANSLATORS: --tunerless-norm command line option. #: ../src/main.c:486 ../src/main.c:550 ../src/main.c:560 msgid "Obsolete" msgstr "旧バージョン" #: ../src/main.c:504 msgid "Color depth of the X display" msgstr "Xディスプレイの色深度" #: ../src/main.c:505 msgid "BPP" msgstr "BPP" #: ../src/main.c:513 msgid "Print debug messages" msgstr "デバッグメッセージを出力" #: ../src/main.c:531 msgid "Force dword alignment of the overlay window" msgstr "オーバーレイウィンドウのdwordアライメントを強制" #: ../src/main.c:540 msgid "Execute the given command and exit" msgstr "与えられたコマンドを実行し、終了" #: ../src/main.c:541 msgid "CMD" msgstr "CMD" #: ../src/main.c:569 msgid "Override CPU detection" msgstr "CPUの自動判別を無視" #: ../src/main.c:658 msgid "Sorry, but there is no module support in GLib" msgstr "GLibでモジュールを使用できない" #: ../src/main.c:782 msgid "Cannot get device info struct" msgstr "device info structの取得に失敗" #: ../src/main.c:791 msgid "Zapping couldn't be started" msgstr "Zappingが起動できない" #: ../src/main.c:845 #, c-format msgid "Couldn't open %s, try other devices?" msgstr "%s のオープンに失敗, 別のデバイスを試す?" #: ../src/main.c:872 #, c-format msgid "%s suceeded, setting it as the new default" msgstr "%s に成功, これを新しいデフォルトに設定" #: ../src/main.c:882 #, c-format msgid "" "Sorry, but \"%s\" could not be opened:\n" "%s" msgstr "" "\"%s\" をオープンできない:\n" "%s" #: ../src/main.c:1242 #, c-format msgid "" "ZConf could not be closed properly , your\n" "configuration will be lost.\n" "Possible causes for this are:\n" " - There is not enough free memory\n" " - You do not have permissions to write to $HOME/.zapping\n" " - libxml is non-functional (?)\n" " - or, more probably, you have found a bug in\n" " %s. Please contact the author.\n" msgstr "" "ZConf が適正にクローズできなかったため, \n" "設定は正しく記録されない.\n" "原因として考えられるのは:\n" " - メモリの確保に失敗\n" " - $HOME/.zapping への書き込み権限がない\n" " - libxml が正常に機能しない (?)\n" " - 以上のほか, %s でバグが健在化した可能性もあります.\n" " 開発者にご連絡ください.\n" #: ../src/main.c:1268 msgid "Sorry, Zapping is unable to create the config tree" msgstr "Sorry, Zapping is unable to create the config tree" #: ../src/mixer.c:103 msgid "The soundcard mixer is not configured." msgstr "サウンドカードのミキサが未設定." #: ../src/osd.c:601 msgid "Please choose a font for OSD in preferences." msgstr "Please choose a font for OSD in preferences." #: ../src/osd.c:604 #, c-format msgid "" "The configured font \"%s\" cannot be loaded, please select another one in " "preferences\n" msgstr "" "指定されたフォント \"%s\" の読み込みに失敗, 別のフォントを選択して" "ください\n" #: ../src/osd.c:614 msgid "" "No font could be loaded, please make sure\n" "your system is properly configured." msgstr "" "フォントの読み込みに失敗, お使いのシステムの設定に問題がないかどうかを\n" "ご確認ください." #: ../src/oss.c:186 msgid "Audio device:" msgstr "オーディオデバイス:" #: ../src/oss.c:189 msgid "Select the audio device" msgstr "オーディオデバイスを選択" #: ../src/oss.c:216 #, c-format msgid "The given audio device \"%s\" doesn't exist" msgstr "\"%s\"は存在しません" #. TRANSLATORS: Name of mixer line, mono as #. opposed to stereo. #: ../src/oss.c:920 #, c-format msgid "%s (Mono)" msgstr "%s (モノラル)" #: ../src/plugin_properties.c:118 msgid "Very low" msgstr "たいへん低い" #: ../src/plugin_properties.c:122 msgid "Lower" msgstr "低い" #: ../src/plugin_properties.c:124 msgid "Normal" msgstr "通常" #: ../src/plugin_properties.c:126 msgid "Very high" msgstr "たいへん高い" #: ../src/plugin_properties.c:130 msgid "Higher" msgstr "高い" #: ../src/plugin_properties.c:152 msgid "This plugin has no public symbols" msgstr "このプラグインのパブリックシンボルはありません" #: ../src/plugin_properties.c:171 msgid "List of symbols exported by the plugin" msgstr "このプラグインのエキスポート可能なシンボルの一覧" #: ../src/plugin_properties.c:213 msgid "Sorry, the plugin couldn't be started" msgstr "プラグインの初期化に失敗" #: ../src/plugin_properties.c:273 msgid "Sorry, but no plugins have been loaded" msgstr "プラグインの読み込みに失敗" #: ../src/plugin_properties.c:308 msgid "Plugin name" msgstr "プラグイン名" #: ../src/plugin_properties.c:335 msgid "Symbol" msgstr "シンボル" #: ../src/plugin_properties.c:340 msgid "Hash" msgstr "ハッシュ" #: ../src/plugins.c:190 #, c-format msgid "\"%s\" doesn't provide a version" msgstr "\"%s\"にはバージョン情報がありません" #: ../src/plugins.c:227 msgid "Insufficient memory" msgstr "メモリの確保に失敗" #: ../src/plugins.c:236 msgid "No description available" msgstr "説明無し" #. Warn #: ../src/plugins.c:350 #, c-format msgid "" "Check error: \"%s\" in plugin %s was supposed to be \"%s\" but it is:\"%s\". " "Hashes are 0x%x vs. 0x%x" msgstr "" "Check error: \"%s\" (%s プラグイン) が \"%s\" であるべきところ, \"%s\"" "となっている. ハッシュ値は 0x%x vs. 0x%x" #: ../src/properties.c:622 msgid "Zapping Properties" msgstr "Zappingの設定" #: ../src/properties-handler.c:86 msgid "Can capture to memory.\n" msgstr "メモリへ取り込み可.\n" #: ../src/properties-handler.c:88 msgid "Has some tuner.\n" msgstr "チューナあり.\n" #: ../src/properties-handler.c:90 msgid "Supports the teletext service.\n" msgstr "Teletext対応.\n" #: ../src/properties-handler.c:92 msgid "Can overlay the image.\n" msgstr "オーバーレイ可.\n" #: ../src/properties-handler.c:94 msgid "Can chromakey the image.\n" msgstr "クロマキー可.\n" #: ../src/properties-handler.c:96 msgid "Clipping rectangles are supported.\n" msgstr "矩形クリッピング可.\n" #: ../src/properties-handler.c:98 msgid "Framebuffer memory is overwritten.\n" msgstr "フレームバッファ書き換えあり.\n" #: ../src/properties-handler.c:100 msgid "The capture can be scaled.\n" msgstr "キャプチャ後、スケーリング可.\n" #: ../src/properties-handler.c:102 msgid "Only monochrome is available\n" msgstr "モノクロのみ\n" #: ../src/properties-handler.c:104 msgid "The capture can be zoomed\n" msgstr "キャプチャ後、ズーム可\n" #: ../src/properties-handler.c:115 msgid "No available inputs" msgstr "入力ソース無し" #: ../src/properties-handler.c:117 msgid "Your video device has no inputs" msgstr "ビデオデバイスへの入力無し" #: ../src/properties-handler.c:132 msgid "TV input" msgstr "TV入力" #: ../src/properties-handler.c:134 msgid "Camera" msgstr "カメラ" #: ../src/properties-handler.c:413 #, c-format msgid "Resize to %ux%u" msgstr "%ux%u にサイズ変更" #. append #: ../src/properties-handler.c:778 msgid "Width" msgstr "幅" #: ../src/properties-handler.c:778 msgid "Height" msgstr "高さ" #: ../src/properties-handler.c:892 msgid "Text Below Icons" msgstr "アイコンの下にテキスト" #: ../src/properties-handler.c:893 msgid "Priority Text Beside Icons" msgstr "アイコン脇に優先度の高いテキストのみ表示" #: ../src/properties-handler.c:894 msgid "Icons Only" msgstr "アイコンのみ" #: ../src/properties-handler.c:895 msgid "Text Only" msgstr "テキストのみ" #: ../src/properties-handler.c:960 #, c-format msgid "Use desktop default (%s)" msgstr "デスクトップ環境の設定に準じる (現在は%s)" #. TRANSLATORS: Fullscreen video mode #: ../src/properties-handler.c:1160 msgid "Do not change" msgstr "変更しない" #: ../src/properties-handler.c:1164 ../src/tveng.c:4802 msgid "Automatic" msgstr "自動" #. TRANSLATORS: Fullscreen video mode #: ../src/properties-handler.c:1179 #, c-format msgid "%u x %u @ %u Hz" msgstr "%u x %u @ %u Hz" #: ../src/properties-handler.c:1344 msgid "Main Window" msgstr "TVウィンドウ" #: ../src/subtitle.c:258 #, c-format msgid "Page %x" msgstr "ページ %x" #: ../src/tveng1.c:1265 msgid "Frame Rate" msgstr "フレームレート" #. TRANSLATORS: PWC driver control. In 'Snapshot' mode the #. camera freezes its automatic exposure and colour balance #. controls. #: ../src/tveng1.c:1278 msgid "Snapshot Mode" msgstr "スナップショットモード" #: ../src/tveng1.c:2179 ../src/tveng25.c:1443 #, c-format msgid "Driver %s returned an unknown or invalid frame buffer format." msgstr "%s ドライバが返すフレームバッファフォーマットが未知もしくは不明." #: ../src/tveng25.c:519 ../src/tvengbktr.c:383 ../src/tvengbktr.c:400 #: ../src/tvengxv.c:568 msgid "Brightness" msgstr "輝度" #: ../src/tveng25.c:520 ../src/tvengbktr.c:385 ../src/tvengbktr.c:402 #: ../src/tvengxv.c:569 msgid "Contrast" msgstr "コントラスト" #: ../src/tveng25.c:521 ../src/tvengbktr.c:387 ../src/tvengbktr.c:404 #: ../src/tvengxv.c:570 msgid "Saturation" msgstr "彩度" #: ../src/tveng25.c:522 ../src/tvengbktr.c:393 ../src/tvengbktr.c:412 #: ../src/tvengxv.c:571 msgid "Hue" msgstr "色相" #: ../src/tveng25.c:523 msgid "Whiteness" msgstr "ホワイトネス" #: ../src/tveng25.c:524 msgid "Black level" msgstr "黒レベル" #: ../src/tveng25.c:525 ../src/tveng25.c:526 msgid "White balance" msgstr "ホワイトバランス" #: ../src/tveng25.c:527 msgid "Red balance" msgstr "レッドバランス" #: ../src/tveng25.c:528 msgid "Blue balance" msgstr "ブルーバランス" #: ../src/tveng25.c:529 msgid "Gamma" msgstr "ガンマ" #: ../src/tveng25.c:530 msgid "Exposure" msgstr "露出" #: ../src/tveng25.c:531 msgid "Auto gain" msgstr "自動ゲイン" #: ../src/tveng25.c:532 msgid "Gain" msgstr "ゲイン" #: ../src/tveng25.c:533 msgid "HCenter" msgstr "HCenter" #: ../src/tveng25.c:534 msgid "VCenter" msgstr "VCenter" #: ../src/tveng25.c:535 msgid "Hor. flipping" msgstr "水平反転" #: ../src/tveng25.c:536 msgid "Vert. flipping" msgstr "垂直反転" #: ../src/tveng25.c:537 ../src/tveng.c:2299 ../src/tvengxv.c:575 msgid "Volume" msgstr "音量" #: ../src/tveng25.c:539 msgid "Audio Mute" msgstr "消音" #: ../src/tveng25.c:540 msgid "Balance" msgstr "バランス" #: ../src/tveng25.c:541 msgid "Audio Balance" msgstr "オーディオバランス" #: ../src/tveng25.c:542 msgid "Treble" msgstr "高音" #: ../src/tveng25.c:543 msgid "Loudness" msgstr "ラウドネス" #: ../src/tveng25.c:544 msgid "Bass" msgstr "低音" #: ../src/tveng25.c:2651 #, c-format msgid "%s doesn't look like a valid capture device" msgstr "%s は使用可能なキャプチャデバイスでないかもしれない" #: ../src/tveng25.c:2670 #, c-format msgid "Sorry, but \"%s\" cannot do streaming" msgstr "\"%s\" によるストリーミングに失敗" #: ../src/tvengbktr.c:390 msgid "U/V Gain" msgstr "U/V ゲイン" #: ../src/tvengbktr.c:407 msgid "U Saturation" msgstr "U 彩度" #: ../src/tvengbktr.c:409 msgid "V Saturation" msgstr "V 彩度" #: ../src/tveng.c:3186 #, fuzzy, c-format msgid "Cannot execute %s. Pipe error." msgstr "%s の実行に失敗. パイプエラー." #: ../src/tveng.c:3193 ../src/tveng.c:3225 #, fuzzy, c-format msgid "Cannot execute %s. %s." msgstr "%s. %s の実行に失敗." #. TRANSLATORS: Program name, error message. #: ../src/tveng.c:3203 #, c-format msgid "" "%s failed.\n" "%s" msgstr "" "%s に失敗.\n" "%s" #. Something executed, but it wasn't #. zapping_setup_fb. Perhaps consolehelper #. couldn't authenticate the user? #: ../src/tveng.c:3215 #, fuzzy, c-format msgid "Cannot execute %s. No permission?" msgstr "%s の実行に失敗. パーミッションの問題?" #: ../src/tveng.c:3324 #, c-format msgid "Cannot determine current overlay parameters. %s" msgstr "現在のオーバーレイパラメタの判別に失敗. %s" #. TRANSLATORS: Program name. #: ../src/tveng.c:3333 #, fuzzy, c-format msgid "%s did not work as expected." msgstr "%s が意図どおりに動作しなかった." #: ../src/tveng.c:3436 #, c-format msgid "%s not found in %s or the executable search path." msgstr "%s が %s にもコマンド検索パスにも見当たらない." #: ../src/tveng.c:4809 msgid "Mono" msgstr "モノラル" #: ../src/tveng.c:4816 msgid "Stereo" msgstr "ステレオ" #: ../src/tveng.c:4824 msgid "Language 2" msgstr "言語2" #: ../src/tvengxv.c:572 msgid "Color" msgstr "カラー" #: ../src/tvengxv.c:573 msgid "Interlace" msgstr "インターレース" #: ../src/tvengxv.c:614 msgid "No" msgstr "いいえ" #: ../src/tvengxv.c:615 msgid "Yes" msgstr "はい" #: ../src/tvengxv.c:616 msgid "Doublescan" msgstr "ダブルスキャン" #. TRANSLATORS: In controls box, color picker control, #. something like "Adjust Chroma-Key" for overlay. #: ../src/v4linterface.c:452 #, c-format msgid "Adjust %s" msgstr "%s を調整" #: ../src/v4linterface.c:621 ../src/zapping.c:466 msgid "Controls" msgstr "設定" #: ../src/v4linterface.c:1308 ../src/zmisc.c:1813 msgid "Unknown" msgstr "不明" #: ../src/v4linterface.c:1326 msgid "No input" msgstr "入力無し" #: ../src/v4linterface.c:1337 msgid "No standard" msgstr "放送方式指定無し" #: ../src/v4linterface.c:2410 msgid "Video standards" msgstr "放送方式" #: ../src/v4linterface.c:2430 msgid "Audio inputs" msgstr "音声ソース" #: ../src/v4linterface.c:2450 msgid "Video inputs" msgstr "映像ソース" #. TRANSLATORS: This is displayed in the channel menu when #. the channel list is empty. #: ../src/v4linterface.c:2548 msgid "No channels" msgstr "チャンネル無し" #: ../src/zapping.c:439 msgid "P_lugins" msgstr "プラグイン(_L)" #: ../src/zapping.c:444 ../src/zapping.c:485 msgid "_Window" msgstr "ウィンドウ(_W)" #: ../src/zapping.c:446 ../src/zapping.c:487 msgid "_Fullscreen" msgstr "全画面表示(_F)" #: ../src/zapping.c:448 ../src/zapping.c:489 msgid "_Background" msgstr "背景に表示(_B)" #: ../src/zapping.c:450 msgid "_Overlay mode" msgstr "オーバーレイモード(_O)" #: ../src/zapping.c:452 msgid "_Capture mode" msgstr "キャプチャモード(_C)" #: ../src/zapping.c:455 msgid "_Help" msgstr "ヘルプ(_H)" #: ../src/zapping.c:456 msgid "_Contents" msgstr "目次(_C)" #: ../src/zapping.c:458 msgid "_About" msgstr "情報(_I)" #: ../src/zapping.c:461 msgid "Appearance" msgstr "表示設定" #: ../src/zapping.c:462 msgid "Ch. Up" msgstr "次のチャンネル" #: ../src/zapping.c:463 msgid "Switch to higher channel" msgstr "上位チャンネルへ" #: ../src/zapping.c:464 msgid "Ch. Down" msgstr "前のチャンネル" #: ../src/zapping.c:465 msgid "Switch to lower channel" msgstr "下位チャンネルへ" #: ../src/zapping.c:467 msgid "Change picture controls" msgstr "画質設定" #: ../src/zapping.c:472 msgid "_Mute" msgstr "消音(_M)" #: ../src/zapping.c:473 msgid "Switch audio on or off" msgstr "消音する/しない" #: ../src/zapping.c:474 msgid "Menu" msgstr "メニュー" #: ../src/zapping.c:478 ../src/zapping.c:1092 msgid "Keep window on top" msgstr "最前面に表示" #: ../src/zapping.c:496 ../src/zapping.c:498 msgid "_Teletext" msgstr "_Teletext" #: ../src/zapping.c:499 msgid "Activate Teletext mode" msgstr "Teletextモードへ移行" #: ../src/zapping.c:501 msgid "Return to video mode" msgstr "ビデオモードへ復帰" #: ../src/zapping.c:502 msgid "_New Teletext View" msgstr "新規Teletext表示(_N)" #: ../src/zapping.c:508 ../src/zapping.c:513 msgid "_Subtitles" msgstr "サブタイトル(_S)" #: ../src/zapping.c:514 msgid "Switch subtitles on or off" msgstr "サブタイトルの表示/非表示" #: ../src/zapping.c:1090 msgid "Show menu and toolbar" msgstr "メニューとツールバーを表示" #: ../src/zmisc.c:664 msgid "Could not switch to capture mode" msgstr "キャプチャモードへの移行に失敗" #: ../src/zmisc.c:686 ../src/zmisc.c:704 msgid "Could not switch to overlay mode" msgstr "オーバーレイモードへの移行に失敗" #: ../src/zmisc.c:687 ../src/zmisc.c:739 msgid "Video overlay has been disabled." msgstr "現在, ビデオオーバーレイが無効." #: ../src/zmisc.c:720 msgid "Could not switch to Teletext mode" msgstr "Teletextモードへの移行に失敗" #: ../src/zmisc.c:721 msgid "VBI has been disabled, or it doesn't work." msgstr "VBIが機能せず (設定で無効になっているのかも)" #: ../src/zmisc.c:738 ../src/zmisc.c:767 msgid "Could not switch to fullscreen mode" msgstr "全画面表示モードへの移行に失敗" #: ../src/zmisc.c:1033 msgid "Hide the statusbar" msgstr "ステータスバーを隠す" #: ../src/zmisc.c:1245 #, c-format msgid "%s is not a directory." msgstr "%sはディレクトリではありません." #: ../src/zmisc.c:1287 msgid "Could not create directory" msgstr "ディレクトリの作成に失敗" #: ../src/zmisc.c:1288 #, c-format msgid "" "Could not create %s.\n" "%s" msgstr "" "%sの作成に失敗.\n" "%s." #: ../src/zmisc.c:2008 msgid "Device:" msgstr "デバイス:" #: ../src/zmisc.c:2009 msgid "Driver:" msgstr "ドライバ:" #: ../src/zmisc.c:2010 msgid "Device file:" msgstr "デバイスファイル:" #: ../src/zmisc.c:2356 #, c-format msgid "Overwrite %s?" msgstr "%sを上書きしますか?" #: ../src/zmisc.c:2361 msgid "_Overwrite" msgstr "上書き(_O)" #: ../src/zmisc.c:2369 #, c-format msgid "%s is a directory." msgstr "%sはディレクトリです." #: ../src/zmisc.c:2384 #, c-format msgid "%s is a special file" msgstr "%s はスペシャルファイル" #: ../src/zmisc.c:2388 msgid "Continue" msgstr "継続" #: ../src/zmisc.c:2666 msgid "Could not open help file" msgstr "ヘルプファイルの参照に失敗" #: ../src/zmisc.c:2699 msgid "Could not open URL" msgstr "URLへのアクセスに失敗" #: ../src/zspinslider.c:306 ../src/zspinslider.c:310 msgid "Reset" msgstr "リセット" #: ../src/zvbi.c:1044 #, c-format msgid " %s: Teletext Page %x" msgstr " %s: Teletextページ %x" #: ../src/zvbi.c:1047 #, c-format msgid " Teletext Page %x" msgstr " Teletext ページ %x" #: ../src/zvbi.c:1048 msgid "Open this page with Zapzilla" msgstr "このページをZapzillaで開く" #: ../src/zvbi.c:1434 msgid "PES file read error" msgstr "PESファイルのリード・エラー" #: ../src/zvbi.c:1653 msgid "VBI interface timeout" msgstr "VBIインタフェース: タイムアウト" #: ../src/zvbi.c:1685 msgid "VBI interface: Failed to read from the device" msgstr "VBIインタフェース: デバイスからの読み出しに失敗" #: ../src/zvbi.c:1763 ../src/zvbi.c:2006 ../src/zvbi.c:2114 msgid "VBI initialization failed" msgstr "VBIの初期化に失敗" #: ../src/zvbi.c:2060 msgid "Cannot open PES file" msgstr "PESファイルのオープンに失敗" #: ../src/zvbi.c:2115 #, c-format msgid "%s is no VBI device." msgstr "%sはVBIデバイスではありません." #: ../zapping.desktop.in.h:1 msgid "Lets you watch TV in a window" msgstr "ウィンドウに映像を表示" #: ../zapping.desktop.in.h:2 msgid "Zapping TV Viewer" msgstr "Zapping TVビューア" #: ../zapping.schemas.in.h:1 msgid "Adds spaces around words in Closed Caption text to improve legibility." msgstr "クローズドキャプションの語間を広げ、判読しやすくする." #: ../zapping.schemas.in.h:2 #, fuzzy msgid "Caption/subtitle scaling quality." msgstr "キャプション/サブタイトルのスケーリング品質." #: ../zapping.schemas.in.h:3 msgid "Closed Caption default background color." msgstr "クローズドキャプションのデフォルト背景色" #: ../zapping.schemas.in.h:4 msgid "Closed Caption default foreground color." msgstr "クローズドキャプションのデフォルト前景色" #: ../zapping.schemas.in.h:5 msgid "Color for chroma-key overlay (#RRGGBB), default #FFCCCC." msgstr "クロマキーオーバーレイの色 (#RRGGBB), デフォルトは #FFCCCC." #: ../zapping.schemas.in.h:6 msgid "Default Teletext character set." msgstr "Teletextのデフォルトキャラクタセット." #: ../zapping.schemas.in.h:7 msgid "" "Default Teletext home page, usually 100. Valid values range from 100 to 899." msgstr "" "デフォルトのTeletextホームページ, 通常は100. 100 から 899 までの値で指定可." "" #: ../zapping.schemas.in.h:8 msgid "Default Teletext home page." msgstr "デフォルトのTeletextホームページ." #: ../zapping.schemas.in.h:9 msgid "" "Default background color of Closed Caption text (#RRGGBB), default #000000." msgstr "クローズドキャプションのデフォルト背景色 (#RRGGBB), " "デフォルトは #000000." #: ../zapping.schemas.in.h:10 msgid "" "Default foreground color of Closed Caption text (#RRGGBB), default #FFFFFF." msgstr "クローズドキャプションのデフォルト前景色 (#RRGGBB), " "デフォルトは #FFFFFF." #: ../zapping.schemas.in.h:11 msgid "Deinterlace option." msgstr "インターレース除去の設定." #: ../zapping.schemas.in.h:12 msgid "Display delay of second field (0.0 to 1.0 of one frame period)." msgstr "表示遅延秒数 (1フレームにつき 0.0 から 1.0)." #: ../zapping.schemas.in.h:13 #, fuzzy msgid "" "Enable navigation elements in the bottom row of the Teletext page. Valid " "values: disabled, flof_top1 (FLOF or TOP style 1), flof_top2 (TOP style 2)." msgstr "" "Teletextページの最下部のナビゲーション要素を有効にする. 有効な値は, " "disabled, flof_top1 (FLOF もしくは TOP style 1), flof_top2 (TOP style 2)." "" #: ../zapping.schemas.in.h:14 msgid "Enable navigation elements." msgstr "Abilita elementi di navigazione." #: ../zapping.schemas.in.h:15 msgid "Enable smooth rolling of real time Closed Caption." msgstr "リアルタイムのクローズドキャプションでスムーズスクロールを有効に" #: ../zapping.schemas.in.h:16 msgid "Enables slow MMX and 3DNow! optimized functions for tests." msgstr "MMX と 3DNow! の低速最適化を有効に (テスト用)" #: ../zapping.schemas.in.h:17 msgid "Greedy (high motion) deinterlace test mode." msgstr "高負荷 (動画変化の頻発) のインターレース除去テストモード." #: ../zapping.schemas.in.h:18 msgid "Horizontal image resolution in deinterlace mode." msgstr "インターレース除去モードの水平解像度." #: ../zapping.schemas.in.h:19 msgid "Interpret the Teletext search text as regular expression." msgstr "" "Teletext検索語を正規表現として解釈." #: ../zapping.schemas.in.h:20 msgid "Keep the main window above other windows." msgstr "TVウィンドウを最前面に表示." #: ../zapping.schemas.in.h:21 msgid "Maximum number of networks in the Teletext page cache." msgstr "Teletextページキャッシュの最大ネットワーク数." #: ../zapping.schemas.in.h:22 msgid "Maximum size of the Teletext page cache in bytes." msgstr "Teletextページキャッシュの最大サイズ (バイト単位)." #: ../zapping.schemas.in.h:23 msgid "Pad Closed Caption text with spaces." msgstr "クローズドキャプションの余白を空白で埋める" #: ../zapping.schemas.in.h:24 msgid "" "Quality/speed trade-off when scaling and anti-aliasing Teletext pages. Valid " "values: nearest, tiles, bilinear, hyper." msgstr "" "Teletextページのスケーリング, アンチエイリアシング時の画質/速度バランス. " "有効値は, nearest, tiles, bilinear, hyper." #: ../zapping.schemas.in.h:25 #, fuzzy msgid "" "Quality/speed trade-off when scaling and anti-aliasing caption/subtitles. " "Valid values: nearest, tiles, bilinear, hyper." msgstr "" "キャプション/サブタイトルのスケーリング, アンチエイリアシング時の" "画質/速度バランス. 有効値は, nearest, tiles, bilinear, hyper." #: ../zapping.schemas.in.h:26 msgid "Reverse the temporal field order." msgstr "フィールドの時系列配置順序を逆転." #: ../zapping.schemas.in.h:27 #, fuzzy msgid "Roll Teletext page numbers." msgstr "Teletextのページ番号をスクロール." #: ../zapping.schemas.in.h:28 msgid "" "Roll the Teletext page number in the page header until the requested page " "has arrived." msgstr "要求されたTeletextの受信完了まで, ヘッダのページ番号をスクロール." #: ../zapping.schemas.in.h:29 msgid "Search all channels in the Teletext page memory." msgstr "Teletextページメモリの全チャンネルを検索." #: ../zapping.schemas.in.h:30 msgid "Show a menu bar in the main window." msgstr "TVウィンドウにメニューバーを表示." #: ../zapping.schemas.in.h:31 msgid "Show a status bar in Teletext windows." msgstr "Teletextウィンドウにステータスバーを表示." #: ../zapping.schemas.in.h:32 msgid "Show a toolbar in Teletext windows." msgstr "Teletextウィンドウにツールバーを表示." #: ../zapping.schemas.in.h:33 msgid "Show a toolbar in the main window." msgstr "TVウィンドウにツールバーを表示." #: ../zapping.schemas.in.h:34 msgid "Show double height characters in Teletext subtitles." msgstr "Teletextのサブタイトルで倍の高さの文字を表示." #: ../zapping.schemas.in.h:35 #, fuzzy msgid "" "Some stations fail to transmit a complete language identifier, so the " "Teletext viewer may not display the correct font or national characters. You " "can select your geographical region here as an additional hint. Valid " "values: western_and_central_europe, eastern_europe, " "western_europe_and_turkey, central_and_southeast_europe, cyrillic, " "greek_and_turkish, arabic, hebrew_and_arabic." msgstr "" "完全な言語識別情報を送信しない局もあるため, 使用言語に合ったフォントと文字が" "正しく選択されない場合があります. ここでお住いの地域を指定しておくと, " "そうした場合の設定補完ができます. 有効な設定値は, " "western_and_central_europe, eastern_europe, " "western_europe_and_turkey, central_and_southeast_europe, cyrillic, " "greek_and_turkish, arabic, hebrew_and_arabic." #: ../zapping.schemas.in.h:36 msgid "Switch to full capture size for screenshot." msgstr "スクリーンショット取得時にフルサイズ表示へ移行." #: ../zapping.schemas.in.h:37 msgid "Teletext implementation level." msgstr "Teletextの実装レベル." #: ../zapping.schemas.in.h:38 msgid "Teletext implementation level. Valid values: 1, 1.5, 2.5, 3.5." msgstr "Teletextの実装レベル. 有効値は, 1, 1.5, 2.5, 3.5." #: ../zapping.schemas.in.h:39 #, fuzzy msgid "Teletext page scaling quality." msgstr "Teletextページのスケーリング品質." #: ../zapping.schemas.in.h:40 msgid "Text brightness, valid values range from 0 to 255." msgstr "テキストの輝度, 有効値は 0 から 255." #: ../zapping.schemas.in.h:41 msgid "Text contrast, valid values range from -128 to 127." msgstr "テキストのコントラスト, 有効値は -128 から 127." #: ../zapping.schemas.in.h:42 msgid "The Teletext search is case insensitive." msgstr "Teletext検索時, 大文字/小文字の区別をしない." #: ../zapping.schemas.in.h:43 msgid "" "This is the time in milliseconds Zapping will wait between pointer movements " "and blanking the pointer when over the video. A value of zero disables this " "feature." msgstr "" "映像表示部にポインタが入ってから, ポインタを見えなくするまでの時間を" "ミリ秒で指定します. この機能を無効にするときは, 0 (ゼロ) を指定します." "" #: ../zapping.schemas.in.h:44 msgid "Time to wait until blanking the pointer." msgstr "ポインタを見えなくするまでの待ち時間." #: ../zapping.schemas.in.h:45 msgid "Update the clock in the Teletext page header." msgstr "Teletextページヘッダの日時を更新." #: ../zapping.schemas.in.h:46 msgid "" "When your CPU is too slow to use the desired deinterlace mode you can reduce " "the horizontal resolution. Valid values: low, medium, high." msgstr "" "指定されたインターレース除去モードの使用にCPUパワーが不足しているときは, " "水平解像度を低くして対応できます. 有効な設定値は, low, medium, high." #: ../zapping_setup_fb/zapping_setup_fb.c:136 #, c-format msgid "Device name %s is unsafe, contains dots." msgstr "デバイス名 %s にドット (.) が含まれ, 安全でない." #: ../zapping_setup_fb/zapping_setup_fb.c:144 #, c-format msgid "Device name %s is unsafe, does not begin with /dev/." msgstr "デバイス名 %s の先頭に /dev/ がなく, 安全でない." #. TRANSLATORS: File name, error message. #: ../zapping_setup_fb/zapping_setup_fb.c:163 #, c-format msgid "Cannot open device %s. %s." msgstr "%s. %s デバイスのオープンに失敗." #. TRANSLATORS: File name, error message. #: ../zapping_setup_fb/zapping_setup_fb.c:178 #, c-format msgid "Cannot identify %s. %s." msgstr "%s. %s の識別に失敗." #: ../zapping_setup_fb/zapping_setup_fb.c:190 #, c-format msgid "%s is not a device." msgstr "%s はデバイスではない." #: ../zapping_setup_fb/zapping_setup_fb.c:204 #, c-format msgid "%s is not a video device." msgstr "%s はビデオデバイスではない." #: ../zapping_setup_fb/zapping_setup_fb.c:218 #, c-format msgid "Cannot identify file descriptor %d. %s." msgstr "%d. %s: ファイル・ディスクリプタ識別できず." #: ../zapping_setup_fb/zapping_setup_fb.c:229 #, c-format msgid "File descriptor %d is not a device." msgstr "ファイル・ディスクリプタ %d はデバイスではない." #: ../zapping_setup_fb/zapping_setup_fb.c:239 #, c-format msgid "File descriptor %d is not a video device." msgstr "ファイル・ディスクリプタ %d はビデオデバイスではない." #: ../zapping_setup_fb/zapping_setup_fb.c:254 #, c-format msgid "Internal error at %s:%u." msgstr "%s:%u で内部エラー発生." #: ../zapping_setup_fb/zapping_setup_fb.c:273 #, c-format msgid "Cannot drop root privileges despite running with UID %d, EUID %d." msgstr "UID %d, EUID %d で実行中, root権限の破棄に失敗." #: ../zapping_setup_fb/zapping_setup_fb.c:303 #, c-format msgid "Cannot restore root privileges despite running with UID %d, EUID %d." msgstr "UID %d, EUID %d で実行中, root権限の再取得に失敗." #: ../zapping_setup_fb/zapping_setup_fb.c:396 msgid "No standard input, output or error file." msgstr "標準入出力を使用不能, もしくはファイルエラー." #: ../zapping_setup_fb/zapping_setup_fb.c:449 #, c-format msgid "Invalid bpp argument %d. Expected 24 or 32." msgstr "bpp値 %d が不正. 24 か 32 を指定してください." #: ../zapping_setup_fb/zapping_setup_fb.c:482 #, c-format msgid "Invalid device file descriptor %d." msgstr "%d: デバイス・ディスクリプタが不正です." #: ../zapping_setup_fb/zapping_setup_fb.c:539 msgid "No screens found." msgstr "スクリーンが存在しません." #: ../zapping_setup_fb/zapping_setup_fb.c:573 #, c-format msgid "Cannot open display %s." msgstr "ディスプレイ %s のオープンに失敗." #: ../zapping_setup_fb/zapping_setup_fb.c:590 #, c-format msgid "Screen %d not found." msgstr "スクリーン %d が存在しません." #: ../zapping_setup_fb/zapping_setup_fb.c:598 #, c-format msgid "DMA is not possible on screen %d." msgstr "スクリーン %d でDMA不可." #: ../zapping_setup_fb/zapping_setup_fb.c:614 #, c-format msgid "%s is not a V4L or V4L2 device." msgstr "%s は V4L / V4L2 デバイスではありません." #: ../zapping_setup_fb/zapping_setup_fb.c:617 #, c-format msgid "File descriptor %d is not a V4L or V4L2 device." msgstr "ファイルディスクリプタ %d は有効な V4L / V4L2 デバイスでない." #: ../zapping_setup_fb/zapping_setup_fb.c:620 #, fuzzy msgid "Cannot identify the video capture device." msgstr "ビデオキャプチャデバイスを認識できません." #: ../zapping_setup_fb/zapping_setup_fb.h:56 #, fuzzy, c-format msgid "Ioctl %s failed: %s." msgstr "Ioctl %s に失敗: %s." #: ../zapping_setup_fb/v4l.c:89 ../zapping_setup_fb/v4l25.c:91 msgid "The device does not support video overlay." msgstr "このデバイスでビデオオーバーレイはできません." #~ msgid "Adaptive" #~ msgstr "Adaptive" #~ msgid "Blended Clip" #~ msgstr "Blended Clip" #~ msgid "Maximum motion" #~ msgstr "最大モーション" #~ msgid "Composite mode" #~ msgstr "コンポジットモード" #~ msgid "Old Game" #~ msgstr "Old Game" #~ msgid "Unknown error in %s." #~ msgstr "%s で未知のエラー発生." #~ msgid "VBI device to use" #~ msgstr "使用するVBIデバイス" #~ msgid "DEVICE" #~ msgstr "DEVICE" #~ msgid "Zapzilla couldn't be started" #~ msgstr "Zapzillaの起動に失敗" #~ msgid "Sorry, Zapzilla is unable to create the config tree" #~ msgstr "Zapzillaが設定ツリーの作成に失敗" ��������������������������������������������������������������������������������������zapping-0.10cvs6/po/it.po��������������������������������������������������������������������������� 644 � 764 � 144 � 236374 10443535660 10464� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# translation of zapping.po to Italian # Zapping (a Gnome TV viewer) / Zapping (Visualizzatore TV per Gnome) # Zapping italian translation # # Pino Toscano <toscano.pino@tiscali.it>, 2002, 2003, 2004, 2005. msgid "" msgstr "" "Project-Id-Version: zapping\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2006-03-31 16:06+0200\n" "PO-Revision-Date: 2005-11-09 16:14+0100\n" "Last-Translator: Pino Toscano <toscano.pino@tiscali.it>\n" "Language-Team: Italian <en@li.org>\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" "X-Generator: KBabel 1.11\n" #: ../glade/zapping.glade2.h:1 msgid "320x240" msgstr "320x240" #: ../glade/zapping.glade2.h:2 msgid "" "A format string describing the main window title when changing channels: " "$(alias), $(index), $(id), $(freq), $(standard) and $(input) are substituted " "by the respective values." msgstr "" "Una stringa di formato che descrive il titolo della finestra principale al " "cambiamento dei canali: $(alias), $(index), $(id), $(freq), $(standard) e " "$(input) sono sostituiti dai rispettivi valori." #: ../glade/zapping.glade2.h:3 msgid "Advanced" msgstr "Avanzato" #: ../glade/zapping.glade2.h:4 ../src/audio.c:829 ../src/audio.c:834 #: ../src/tveng.c:4830 msgid "Audio" msgstr "Audio" #: ../glade/zapping.glade2.h:5 msgid "Author:" msgstr "Autore:" #: ../glade/zapping.glade2.h:6 msgid "Biggest noninterlaced (autodetect)" msgstr "Più grande non interlacciato (rileva autom.)" #: ../glade/zapping.glade2.h:7 msgid "Canonical name:" msgstr "Nome canonico:" #: ../glade/zapping.glade2.h:8 msgid "Channel list number" msgstr "Numero nella lista dei canali" #: ../glade/zapping.glade2.h:9 msgid "Choose a color" msgstr "Scegli un colore" #: ../glade/zapping.glade2.h:10 msgid "Chroma _key:" msgstr "" #: ../glade/zapping.glade2.h:11 msgid "Clean console" msgstr "Svuota console" #: ../glade/zapping.glade2.h:12 msgid "Click here when you are done" msgstr "Fai clic qui quando hai fatto" #: ../glade/zapping.glade2.h:13 msgid "Console" msgstr "Console" #: ../glade/zapping.glade2.h:14 #, fuzzy msgid "Copyright (C) 2000-2005 the contributors\n" msgstr "Copyright (C) 2000-2003 gli sviluppatori\n" #: ../glade/zapping.glade2.h:16 msgid "Current controller:" msgstr "Controller corrente:" #: ../glade/zapping.glade2.h:17 msgid "DVB PES File" msgstr "File DVB PES" #: ../glade/zapping.glade2.h:18 msgid "DVB _PES File" msgstr "File DVB _PES" #: ../glade/zapping.glade2.h:19 msgid "Device name:" msgstr "Nome del dispositivo:" #: ../glade/zapping.glade2.h:20 ../src/audio.c:839 #: ../src/properties-handler.c:1352 ../src/zvbi.c:2537 msgid "Devices" msgstr "Dispositivi" #: ../glade/zapping.glade2.h:21 msgid "Disable _screensaver" msgstr "Di_sabilita salvaschermo" #: ../glade/zapping.glade2.h:22 msgid "Enter key" msgstr "Inserisci tasto" #: ../glade/zapping.glade2.h:23 msgid "F_ont:" msgstr "Tip_o di carattere:" #: ../glade/zapping.glade2.h:24 msgid "Favorite _picture sizes:" msgstr "Dimensioni _preferite dell'immagine:" #: ../glade/zapping.glade2.h:25 msgid "General options" msgstr "Opzioni generali" #: ../glade/zapping.glade2.h:26 msgid "Interlaced (window size)" msgstr "Interlacciato (dimensione della finestra)" #: ../glade/zapping.glade2.h:27 msgid "Kernel VBI device" msgstr "Dispositivo VBI del kernel" #: ../glade/zapping.glade2.h:28 msgid "Kernel _device" msgstr "_Dispositivo del kernel" #: ../glade/zapping.glade2.h:29 ../src/keyboard.c:1149 msgid "Keyboard" msgstr "Tastiera" #: ../glade/zapping.glade2.h:30 msgid "Known key names" msgstr "Nomi dei tasti conosciuti" #: ../glade/zapping.glade2.h:31 msgid "Maximum capture size:" msgstr "Dimensione massima della cattura:" #: ../glade/zapping.glade2.h:32 msgid "Minimum capture size:" msgstr "Dimensione minima della cattura:" #: ../glade/zapping.glade2.h:33 msgid "Mute while ch_anging channels" msgstr "Evit_a rumore nel cambiare canale" #: ../glade/zapping.glade2.h:34 msgid "NTSC" msgstr "NTSC" #: ../glade/zapping.glade2.h:35 msgid "No Display" msgstr "Nessun display" #: ../glade/zapping.glade2.h:36 msgid "OK, let's go on" msgstr "OK, andiamo avanti" #: ../glade/zapping.glade2.h:37 ../src/osd.c:1075 msgid "OSD" msgstr "OSD" #: ../glade/zapping.glade2.h:38 msgid "On Screen Display (OSD)" msgstr "Display su Schermo (OSD)" #: ../glade/zapping.glade2.h:39 msgid "PAL" msgstr "PAL" #: ../glade/zapping.glade2.h:40 msgid "Plugin location" msgstr "Percorso del plugin" #: ../glade/zapping.glade2.h:41 msgid "Plugin priority:" msgstr "Priorità:" #: ../glade/zapping.glade2.h:42 msgid "Plugin properties" msgstr "Proprietà del plugin" #: ../glade/zapping.glade2.h:43 msgid "Plugin version:" msgstr "Versione:" #: ../glade/zapping.glade2.h:44 msgid "Properties" msgstr "Proprietà" #: ../glade/zapping.glade2.h:45 msgid "RF channel number" msgstr "Numero del canale RF" #: ../glade/zapping.glade2.h:46 msgid "Remember this video standard" msgstr "Ricorda questo standard video" #: ../glade/zapping.glade2.h:47 msgid "Remove all this mess" msgstr "Elimina tutti questi messaggi" #: ../glade/zapping.glade2.h:48 msgid "Run the plugin" msgstr "Avvia il plugin" #: ../glade/zapping.glade2.h:49 msgid "SECAM" msgstr "SECAM" #: ../glade/zapping.glade2.h:50 msgid "S_how toolbar as:" msgstr "_Mostra barra degli strumenti come:" #: ../glade/zapping.glade2.h:51 msgid "Save _control values per channel" msgstr "Salva i valori del _controllo per ogni canale" #: ../glade/zapping.glade2.h:52 msgid "Select OSD font" msgstr "Seleziona il carattere per OSD" #: ../glade/zapping.glade2.h:53 msgid "Select the V4L device" msgstr "Seleziona il dispositivo V4L" #: ../glade/zapping.glade2.h:54 msgid "Show _tooltips" msgstr "Mos_tra suggerimenti" #: ../glade/zapping.glade2.h:55 msgid "Status Bar" msgstr "Barra di stato" #: ../glade/zapping.glade2.h:56 msgid "Stop this plugin" msgstr "Ferma questo plugin" #: ../glade/zapping.glade2.h:57 msgid "TV viewer for the Gnome environment" msgstr "Visualizzatore TV per Gnome" #: ../glade/zapping.glade2.h:58 msgid "" "The video capture device does not report the correct video standard, please " "select manually:" msgstr "" "Il dispositivo di cattura video non riporta il corretto standard video, " "selezionalo manualmente:" #: ../glade/zapping.glade2.h:59 msgid "Title _bar contents:" msgstr "Contenuti della _barra del titolo:" #: ../glade/zapping.glade2.h:60 ../src/zvbi.c:2532 msgid "VBI" msgstr "VBI" #: ../glade/zapping.glade2.h:61 ../src/main.c:200 #: ../src/properties-handler.c:1339 ../src/properties-handler.c:1347 msgid "Video" msgstr "Video" #: ../glade/zapping.glade2.h:62 msgid "Video Standard" msgstr "Standard video" #: ../glade/zapping.glade2.h:63 msgid "Video device capabilities" msgstr "Caratteristiche del dispositivo video" #: ../glade/zapping.glade2.h:64 msgid "Window" msgstr "Finestra" #: ../glade/zapping.glade2.h:65 msgid "Zapping Preferences" msgstr "Preferenze di Zapping" #: ../glade/zapping.glade2.h:66 msgid "Zapping error console" msgstr "Console degli errori di Zapping" #: ../glade/zapping.glade2.h:67 msgid "_Background color:" msgstr "Colore di _sfondo:" #: ../glade/zapping.glade2.h:68 msgid "_Capture size under XVideo:" msgstr "Dimensione della _cattura sotto XVideo:" #: ../glade/zapping.glade2.h:69 msgid "_Command:" msgstr "_Comando:" #: ../glade/zapping.glade2.h:70 msgid "_Control volume with soundcard mixer" msgstr "_Controlla il volume con il mixer della scheda sonora" #: ../glade/zapping.glade2.h:71 msgid "_Device file:" msgstr "File del _dispositivo:" #: ../glade/zapping.glade2.h:72 msgid "_Display mode:" msgstr "Mo_dalità del display:" #: ../glade/zapping.glade2.h:73 msgid "_Enter channels by:" msgstr "Cambia i canali s_econdo:" #: ../glade/zapping.glade2.h:74 msgid "_Foreground color:" msgstr "Colore di _primo piano:" #: ../glade/zapping.glade2.h:75 msgid "_Fullscreen video resolution:" msgstr "_Risoluzione video a tutto schermo:" #: ../glade/zapping.glade2.h:76 msgid "_Gnome sound daemon (ESD)" msgstr "Demone sonoro di _Gnome (ESD)" #: ../glade/zapping.glade2.h:77 msgid "_KDE sound daemon (ARTS)" msgstr "Demone sonoro di _KDE (ARTS)" #: ../glade/zapping.glade2.h:78 msgid "_Mute on exit" msgstr "Silenzioso all'_uscita" #: ../glade/zapping.glade2.h:79 msgid "_No VBI services" msgstr "_Nessun servizio VBI" #: ../glade/zapping.glade2.h:80 msgid "_No audio recording" msgstr "_Nessuna registrazione audio" #: ../glade/zapping.glade2.h:81 msgid "_Remove after:" msgstr "_Rimuovi dopo:" #: ../glade/zapping.glade2.h:82 msgid "_Resize using fixed increments" msgstr "_Ridimensiona con incrementi predefiniti" #: ../glade/zapping.glade2.h:83 msgid "_Start Zapping muted" msgstr "Avvia Zapping _silenzioso" #: ../glade/zapping.glade2.h:84 msgid "_Use VBI Proxy if available" msgstr "_Usa proxy VBI se disponibile" #: ../glade/zapping.glade2.h:85 msgid "seconds" msgstr "secondi" #: ../libvbi/exp-gfx.c:1483 msgid "Correct aspect ratio" msgstr "Correggi proporzioni" #: ../libvbi/exp-gfx.c:1484 msgid "" "Approach an image aspect ratio similar to a real TV. This will double the " "image size." msgstr "" "Si avvicina alle proporzioni dell'immagine simile ad una reale TV. Questo " "raddoppierà la dimensione dell'immagine." #: ../libvbi/exp-gfx.c:1623 msgid "PPM" msgstr "PPM" #: ../libvbi/exp-gfx.c:1624 msgid "Export this page as raw PPM image" msgstr "Esporta questa pagina come grezza immagine PPM" #. XXX gettext encoding #: ../libvbi/exp-gfx.c:1824 ../libvbi/exp-html.c:532 ../libvbi/exp-sub.c:633 #: ../libvbi/exp-sub.c:764 ../libvbi/exp-sub.c:821 #, c-format msgid "Teletext Page %3x.%x" msgstr "Pagina del Televideo %3x.%x" #: ../libvbi/exp-gfx.c:1828 ../libvbi/exp-html.c:535 ../libvbi/exp-sub.c:636 #: ../libvbi/exp-sub.c:767 ../libvbi/exp-sub.c:824 #, c-format msgid "Teletext Page %3x" msgstr "Pagina del Televideo %3x" #: ../libvbi/exp-gfx.c:2019 msgid "PNG" msgstr "PNG" #: ../libvbi/exp-gfx.c:2020 msgid "Export this page as PNG image" msgstr "Esporta questa pagina come immagine PNG" #: ../libvbi/exp-html.c:110 ../libvbi/exp-txt.c:133 msgid "Graphics char" msgstr "Carattere della grafica" #: ../libvbi/exp-html.c:111 ../libvbi/exp-txt.c:134 msgid "" "Replacement for block graphic characters: a single character or decimal (32) " "or hex (0x20) code" msgstr "" "Rimpiazzo per i caratteri di blocchi grafici: un singolo carattere o un " "codice decimale (32) o esadecimale (0x20)" #: ../libvbi/exp-html.c:114 ../libvbi/exp-txt.c:137 msgid "ASCII art" msgstr "Grafica ASCII" #: ../libvbi/exp-html.c:115 ../libvbi/exp-txt.c:138 msgid "Replace graphic characters by ASCII art" msgstr "Sostituisci i caratteri grafici con grafica ASCII" #: ../libvbi/exp-html.c:117 msgid "Color (CSS)" msgstr "Colore (CSS)" #: ../libvbi/exp-html.c:118 msgid "Store the page colors using CSS attributes" msgstr "Salva i colori della pagina usando gli attributi CSS" #: ../libvbi/exp-html.c:120 msgid "HTML header" msgstr "Intestazione HTML" #: ../libvbi/exp-html.c:121 msgid "Include HTML page header" msgstr "Include intestazione HTML di pagina" #. TRANSLATORS: lang=\"en\" refers to the page title #. "Teletext Page ...". Please specify "de", "fr", "es" #. etc. #: ../libvbi/exp-html.c:521 msgid "<title lang=\"en\">" msgstr "<title lang=\"it\">" #: ../libvbi/exp-html.c:843 msgid "HTML" msgstr "HTML" #: ../libvbi/exp-html.c:844 msgid "Export this page as HTML page" msgstr "Esporta questa pagina come pagina HTML" #: ../libvbi/export.c:200 msgid "Write error." msgstr "Errore di scrittura." #: ../libvbi/export.c:210 msgid "Out of memory." msgstr "Senza memoria disponibile." #: ../libvbi/export.c:235 #, c-format msgid "Export module %s has no option %s." msgstr "Il modulo di esportazione %s non ha l'opzione %s." #: ../libvbi/export.c:295 #, c-format msgid "Invalid argument %s for option %s of export module %s." msgstr "Invalido argomento %s per l'opzione %s del modulo di esportazione %s." #: ../libvbi/export.c:350 msgid "Unknown error." msgstr "Errore sconosciuto." #: ../libvbi/export.c:436 #, c-format msgid "Could not create %s. %s." msgstr "Impossibile creare %s. %s." #: ../libvbi/export.c:1334 #, c-format msgid "Invalid option string \"%s\"." msgstr "Invalida stringa di opzione \"%s\"." #: ../libvbi/export.c:1438 #, c-format msgid "Unknown export module '%s'." msgstr "Modulo di esportazione sconosciuto '%s'." #: ../libvbi/export.c:1452 #, c-format msgid "Cannot initialize export module '%s', probably lack of memory." msgstr "" "Impossibile inizializzare il modulo di esportazione '%s', probabile mancanza " "di memoria." #: ../libvbi/export.c:1476 #, c-format msgid "Cannot initialize export module '%s', out of memory." msgstr "" "Impossibile inizializzare il modulo di esportazione '%s', senza memoria " "disponibile." #: ../libvbi/exp-sub.c:124 ../libvbi/exp-txt.c:81 msgid "ASCII" msgstr "ASCII" #: ../libvbi/exp-sub.c:125 ../libvbi/exp-txt.c:82 msgid "ISO-8859-1 (Latin-1 Western languages)" msgstr "ISO-8859-1 (Latin-1 Lingue occidentali)" #: ../libvbi/exp-sub.c:126 ../libvbi/exp-txt.c:83 msgid "ISO-8859-2 (Latin-2 Central and Eastern European languages)" msgstr "ISO-8859-2 (Latin-2 Lingue dell'Europa centrale ed orientale)" #: ../libvbi/exp-sub.c:127 ../libvbi/exp-txt.c:84 msgid "ISO-8859-4 (Latin-3 Baltic languages)" msgstr "ISO-8859-4 (Latin-3 Lingue baltiche)" #: ../libvbi/exp-sub.c:128 ../libvbi/exp-txt.c:85 msgid "ISO-8859-5 (Cyrillic)" msgstr "ISO-8859-5 (cirillico)" #: ../libvbi/exp-sub.c:129 ../libvbi/exp-txt.c:86 msgid "ISO-8859-7 (Greek)" msgstr "ISO-8859-7 (greco)" #: ../libvbi/exp-sub.c:130 ../libvbi/exp-txt.c:87 msgid "ISO-8859-8 (Hebrew)" msgstr "ISO-8859-8 (ebraico)" #: ../libvbi/exp-sub.c:131 ../libvbi/exp-txt.c:88 msgid "ISO-8859-9 (Turkish)" msgstr "ISO-8859-9 (turco)" #: ../libvbi/exp-sub.c:132 ../libvbi/exp-txt.c:89 msgid "KOI8-R (Russian and Bulgarian)" msgstr "KOI8-R (russo e bulgaro)" #: ../libvbi/exp-sub.c:133 ../libvbi/exp-txt.c:90 msgid "KOI8-U (Ukranian)" msgstr "KOI8-U (ucraino)" #: ../libvbi/exp-sub.c:134 ../libvbi/exp-txt.c:91 msgid "ISO-10646/UTF-8 (Unicode)" msgstr "ISO-10646/UTF-8 (Unicode)" #. TRANSLATORS: Text export encoding (ASCII, Unicode, ...) menu #: ../libvbi/exp-sub.c:155 ../libvbi/exp-sub.c:165 ../libvbi/exp-txt.c:127 msgid "Encoding" msgstr "Codifica" #: ../libvbi/exp-sub.c:171 msgid "Font face" msgstr "Tipo di carattere" #. TRANSLATORS: #. Caption is an aid for the hearing impaired, #. subtitles for foreign language viewers. #: ../libvbi/exp-sub.c:1534 msgid "MPlayer caption/subtitle file" msgstr "" #. TRANSLATORS: #. Styles like bold, italic, underlined, etc. #. Justification to the left, right, centered. #: ../libvbi/exp-sub.c:1559 msgid "" "QuickTime Text caption/subtitle file preserving text styles, justification " "and color" msgstr "" #: ../libvbi/exp-sub.c:1583 msgid "RealText caption/subtitle file preserving text styles and color" msgstr "" #: ../libvbi/exp-sub.c:1606 msgid "" "SAMI 1.0 caption/subtitle file preserving text styles, justification and " "color" msgstr "" #: ../libvbi/exp-sub.c:1630 msgid "SubRip caption/subtitle file" msgstr "" #: ../libvbi/exp-sub.c:1652 msgid "SubViewer 2.x caption/subtitle file" msgstr "" #. TRANSLATORS: Terminal control codes menu #: ../libvbi/exp-txt.c:112 msgid "None" msgstr "Nessuno" #: ../libvbi/exp-txt.c:113 msgid "ANSI X3.64 / VT 100" msgstr "ANSI X3.64 / VT 100" #: ../libvbi/exp-txt.c:114 msgid "VT 200" msgstr "VT 200" #: ../libvbi/exp-txt.c:140 msgid "Control codes" msgstr "Codici di controllo" #: ../libvbi/exp-txt.c:1030 msgid "Text" msgstr "Testo" #: ../libvbi/exp-txt.c:1031 msgid "Export this page as text file" msgstr "Esporta questa pagina come file di testo" #: ../libvbi/exp-vtx.c:82 msgid "Can only export Teletext pages." msgstr "Possibile solo l'esportazione di pagine del Televideo." #: ../libvbi/exp-vtx.c:89 msgid "Page is not cached." msgstr "La pagina non è salvata in cache." #: ../libvbi/exp-vtx.c:98 msgid "Cannot export this page, is not displayable." msgstr "Impossibile esportare questa pagina, non è visualizzabile." #: ../libvbi/exp-vtx.c:135 msgid "VTX" msgstr "VTX" #: ../libvbi/exp-vtx.c:136 msgid "" "Export this page as VTX file, the format used by VideoteXt and vbidecode" msgstr "" "Esporta questa pagina come file VTX, il formato usato da VideoteXt e " "vbidecode" #: ../plugins/alirc/alirc.c:37 msgid "Another lirc plugin" msgstr "Un altro plugin di LIRC" #: ../plugins/alirc/alirc.c:39 msgid "" "Another plugin to control zapping through lirc\n" "\n" "To enable this plugin you must edit your ~/.lircrc\n" "file. See the Zapping documentation for details.\n" msgstr "" "Altro plugin per controllare Zapping attraverso LIRC\n" "\n" "Per abilitare questo plugin è necessario modificare\n" "il file ~/.lircrc. Consulta la documentazione di\n" "Zapping per i dettagli.\n" #: ../plugins/alirc/alirc.c:44 msgid "Lets you control zapping through lirc" msgstr "Permette di controllare Zapping attraverso LIRC" #. hash collision code #. Warn #. hash collision code #. hash collision code #. Warn #: ../plugins/alirc/alirc.c:375 ../plugins/mpeg/mpeg.c:3026 #: ../plugins/screenshot/screenshot.c:1778 #, c-format msgid "Check error: \"%s\" in plugin %s has hash 0x%x vs. 0x%x" msgstr "Errore di controllo: \"%s\" nel plugin %s ha hash 0x%x vs. 0x%x" #: ../plugins/deinterlace/DI_GreedyH/DI_GreedyH.c:240 msgid "Max Comb" msgstr "Max Comb" #: ../plugins/deinterlace/DI_GreedyH/DI_GreedyH.c:246 msgid "Motion Threshold" msgstr "Motion Threshold" #: ../plugins/deinterlace/DI_GreedyH/DI_GreedyH.c:252 msgid "Motion Sense" msgstr "Motion Sense" #: ../plugins/deinterlace/DI_GreedyH/DI_GreedyH.c:258 msgid "Good PullDown Lvl" msgstr "Good PullDown Lvl" #: ../plugins/deinterlace/DI_GreedyH/DI_GreedyH.c:264 msgid "Bad PullDown Lvl" msgstr "Bad PullDown Lvl" #: ../plugins/deinterlace/DI_GreedyH/DI_GreedyH.c:270 #: ../plugins/deinterlace/DI_GreedyH/DI_GreedyH.c:318 msgid "H. Sharpness" msgstr "H. Sharpness" #: ../plugins/deinterlace/DI_GreedyH/DI_GreedyH.c:276 #: ../plugins/deinterlace/DI_GreedyH/DI_GreedyH.c:312 msgid "V. Sharpness" msgstr "V. Sharpness" #: ../plugins/deinterlace/DI_GreedyH/DI_GreedyH.c:282 #: ../plugins/deinterlace/DI_GreedyH/DI_GreedyH.c:306 msgid "Median Filter" msgstr "Median Filter" #: ../plugins/deinterlace/DI_GreedyH/DI_GreedyH.c:288 msgid "High Comb Skip" msgstr "High Comb Skip" #: ../plugins/deinterlace/DI_GreedyH/DI_GreedyH.c:294 msgid "Auto Pull-Down" msgstr "Auto Pull-Down" #: ../plugins/deinterlace/DI_GreedyH/DI_GreedyH.c:300 msgid "In-Between Frames" msgstr "In-Between Frames" #. size of this struct #. curr version compiled #: ../plugins/deinterlace/DI_GreedyH/DI_GreedyH.c:336 msgid "Video (Greedy, High Motion)" msgstr "Video (Greedy, High Motion)" #: ../plugins/deinterlace/DI_Misc/DI_Bob.c:150 msgid "Simple Bob" msgstr "Simple Bob" #: ../plugins/deinterlace/DI_Misc/DI_EvenOnly.c:123 msgid "Even Scanlines Only" msgstr "Even Scanlines Only" #: ../plugins/deinterlace/DI_Misc/DI_Greedy2Frame.c:258 msgid "Greedy 2 Frame Luma Threshold" msgstr "Greedy 2 Frame Luma Threshold" #: ../plugins/deinterlace/DI_Misc/DI_Greedy2Frame.c:270 msgid "Greedy 2 Frame" msgstr "Greedy 2 Frame" #: ../plugins/deinterlace/DI_Misc/DI_Greedy.c:235 msgid "Greedy Max Comb" msgstr "Greedy Max Comb" #: ../plugins/deinterlace/DI_Misc/DI_Greedy.c:246 msgid "Video (Greedy, Low Motion)" msgstr "Video (Greedy, Low Motion)" #: ../plugins/deinterlace/DI_Misc/DI_MoComp2.c:351 msgid "Video (MoComp2)" msgstr "Video (MoComp2)" #: ../plugins/deinterlace/DI_Misc/DI_OddOnly.c:125 msgid "Odd Scanlines Only" msgstr "Odd Scanlines Only" #: ../plugins/deinterlace/DI_Misc/DI_ScalerBob.c:117 msgid "Scaler Bob" msgstr "Scaler Bob" #: ../plugins/deinterlace/DI_Misc/DI_TomsMoComp.c:955 msgid "Search Effort" msgstr "Search Effort" #: ../plugins/deinterlace/DI_Misc/DI_TomsMoComp.c:961 msgid "Use Strange Bob" msgstr "Use Strange Bob" #: ../plugins/deinterlace/DI_Misc/DI_TomsMoComp.c:972 msgid "Video (TomsMoComp)" msgstr "Video (TomsMoComp)" #: ../plugins/deinterlace/DI_Misc/DI_TwoFrame.c:317 msgid "2 Frame Spatial Tolerance" msgstr "2 Frame Spatial Tolerance" #: ../plugins/deinterlace/DI_Misc/DI_TwoFrame.c:323 msgid "2 Frame Temporal Tolerance" msgstr "2 Frame Temporal Tolerance" #: ../plugins/deinterlace/DI_Misc/DI_TwoFrame.c:334 msgid "Video Deinterlace (2-Frame)" msgstr "Video Deinterlace (2-Frame)" #: ../plugins/deinterlace/DI_Misc/DI_VideoBob.c:237 msgid "Weave Edge Detect" msgstr "Weave Edge Detect" #: ../plugins/deinterlace/DI_Misc/DI_VideoBob.c:243 msgid "Weave Jaggie Threshold" msgstr "Weave Jaggie Threshold" #: ../plugins/deinterlace/DI_Misc/DI_VideoBob.c:254 msgid "Video Deinterlace (Bob)" msgstr "Video Deinterlace (Bob)" #: ../plugins/deinterlace/DI_Misc/DI_VideoWeave.c:270 msgid "Temporal Tolerance" msgstr "Temporal Tolerance" #: ../plugins/deinterlace/DI_Misc/DI_VideoWeave.c:276 msgid "Spatial Tolerance" msgstr "Spatial Tolerance" #: ../plugins/deinterlace/DI_Misc/DI_VideoWeave.c:282 msgid "Similarity Threshold" msgstr "Similarity Threshold" #: ../plugins/deinterlace/DI_Misc/DI_VideoWeave.c:293 msgid "Video Deinterlace (Weave)" msgstr "Video Deinterlace (Weave)" #: ../plugins/deinterlace/DI_Misc/DI_Weave.c:155 msgid "Simple Weave" msgstr "Simple Weave" #: ../plugins/deinterlace/main.c:352 msgid "Could not start deinterlace plugin" msgstr "Impossibile avviare il plugin di deinterlacciamento" #: ../plugins/deinterlace/main.c:353 #, c-format msgid "Could not switch to capture format YUYV %u x %u." msgstr "Impossibile passare al formato di cattura YUYV %u x %u." #: ../plugins/deinterlace/main.c:447 msgid "Deinterlace" msgstr "Deinterlacciamento" #: ../plugins/deinterlace/main.c:454 ../plugins/mpeg/mpeg.c:2336 #: ../plugins/mpeg/mpeg.c:2956 ../plugins/screenshot/screenshot.c:522 #: ../plugins/screenshot/screenshot.c:1525 ../plugins/subtitle/main.c:55 #: ../plugins/teletext/main.c:212 msgid "Plugins" msgstr "Plugin" #: ../plugins/deinterlace/main.c:523 msgid "Deinterlace plugin" msgstr "Plugin di deinterlacciamento" #: ../plugins/deinterlace/preferences.c:48 ../src/plugin_properties.c:120 msgid "Low" msgstr "Bassa" #: ../plugins/deinterlace/preferences.c:49 msgid "Medium" msgstr "Medio" #: ../plugins/deinterlace/preferences.c:50 ../src/plugin_properties.c:128 msgid "High" msgstr "Alta" #: ../plugins/deinterlace/preferences.c:287 msgid "_Resolution:" msgstr "_Risoluzione:" #. TRANSLATORS: Relative display duration of the first and #. second field in deinterlace mode. #: ../plugins/deinterlace/preferences.c:296 msgid "_Field Balance:" msgstr "Bilanciamento del _campo:" #: ../plugins/deinterlace/preferences.c:708 ../src/eggcellrendererkeys.c:222 msgid "Disabled" msgstr "Disabilitato" #: ../plugins/mpeg/mpeg.c:846 #, c-format msgid "Format %s is incomplete, please configure the video or audio codec." msgstr "Il formato %s è incompleto, configura il codec video o audio." #: ../plugins/mpeg/mpeg.c:1156 #, c-format msgid "Cannot create file %s: %s\n" msgstr "Impossibile creare il file %s: %s\n" #: ../plugins/mpeg/mpeg.c:1726 ../plugins/mpeg/options.c:407 #: ../plugins/teletext/export.c:128 msgid "Options" msgstr "Opzioni" #: ../plugins/mpeg/mpeg.c:2150 msgid "New format" msgstr "Nuovo formato" #: ../plugins/mpeg/mpeg.c:2151 msgid "Format name:" msgstr "Nome del formato:" #: ../plugins/mpeg/mpeg.c:2336 ../plugins/mpeg/mpeg.c:2809 #: ../plugins/mpeg/mpeg.c:2837 ../plugins/mpeg/mpeg.c:2945 #: ../plugins/mpeg/mpeg_properties.glade2.h:7 msgid "Record" msgstr "Registra" #: ../plugins/mpeg/mpeg.c:2625 msgid "Not implemented yet" msgstr "Non ancora implementato" #: ../plugins/mpeg/mpeg.c:2802 msgid "Record a video stream" msgstr "Registra un flusso video" #: ../plugins/mpeg/mpeg.c:2887 msgid "Audio/Video Recorder" msgstr "Registratore audio/video" #: ../plugins/mpeg/mpeg.c:2890 msgid "This plugin records video and audio into a file" msgstr "Questo plugin registra video e audio in un file" #: ../plugins/mpeg/mpeg.c:2893 msgid "Record video and audio." msgstr "Registra video e audio." #: ../plugins/mpeg/mpeg_properties.glade2.h:1 msgid "-" msgstr "-" #: ../plugins/mpeg/mpeg_properties.glade2.h:2 msgid "Capture _height:" msgstr "_Altezza della cattura:" #: ../plugins/mpeg/mpeg_properties.glade2.h:3 msgid "Capture _width:" msgstr "_Larghezza della cattura:" #: ../plugins/mpeg/mpeg_properties.glade2.h:4 msgid "Co_dec:" msgstr "Co_dec:" #: ../plugins/mpeg/mpeg_properties.glade2.h:5 #: ../plugins/screenshot/screenshot.glade2.h:3 msgid "Destination file" msgstr "File di destinazione" #: ../plugins/mpeg/mpeg_properties.glade2.h:6 msgid "Fil_e format" msgstr "Formato d_el file" #: ../plugins/mpeg/mpeg_properties.glade2.h:8 msgid "Record _all subtitles" msgstr "Registr_a tutti i sottotitoli" #: ../plugins/mpeg/mpeg_properties.glade2.h:9 msgid "Record this channel or _page:" msgstr "Registra questo canale o questa _pagina:" #: ../plugins/mpeg/mpeg_properties.glade2.h:10 msgid "Save _as:" msgstr "S_alva come:" #: ../plugins/mpeg/mpeg_properties.glade2.h:11 msgid "_Audio" msgstr "_Audio" #: ../plugins/mpeg/mpeg_properties.glade2.h:12 #, fuzzy msgid "_Caption and Subtitles" msgstr "Sottotitoli" #: ../plugins/mpeg/mpeg_properties.glade2.h:13 msgid "_Codec:" msgstr "_Codec:" #: ../plugins/mpeg/mpeg_properties.glade2.h:14 msgid "_Configure..." msgstr "_Configura..." #: ../plugins/mpeg/mpeg_properties.glade2.h:15 msgid "_Delete" msgstr "_Elimina" #: ../plugins/mpeg/mpeg_properties.glade2.h:16 msgid "_Embedded in the video file:" msgstr "_Integrati nel file video:" #: ../plugins/mpeg/mpeg_properties.glade2.h:17 #: ../plugins/screenshot/screenshot.glade2.h:13 msgid "_Format:" msgstr "_Formato:" #: ../plugins/mpeg/mpeg_properties.glade2.h:18 msgid "_New" msgstr "_Nuovo" #: ../plugins/mpeg/mpeg_properties.glade2.h:19 #, fuzzy msgid "_No caption or subtitle recording" msgstr "_Nessuna registrazione audio" #: ../plugins/mpeg/mpeg_properties.glade2.h:20 msgid "_Pause" msgstr "_Pausa" #: ../plugins/mpeg/mpeg_properties.glade2.h:21 msgid "_Record" msgstr "_Registra" #: ../plugins/mpeg/mpeg_properties.glade2.h:22 msgid "_Record the displayed caption or subtitles" msgstr "" #: ../plugins/mpeg/mpeg_properties.glade2.h:23 msgid "_Stop" msgstr "_Ferma" #: ../plugins/mpeg/mpeg_properties.glade2.h:24 msgid "_Subtitle file:" msgstr "File dei _sottotitoli:" #: ../plugins/mpeg/mpeg_properties.glade2.h:25 msgid "_Superimposed onto the picture" msgstr "_Sovraimpressi al filmato" #: ../plugins/mpeg/mpeg_properties.glade2.h:26 msgid "_Update live caption at line breaks" msgstr "" #: ../plugins/mpeg/mpeg_properties.glade2.h:27 ../src/zapping.c:500 msgid "_Video" msgstr "_Video" #: ../plugins/mpeg/options.c:741 msgid "No codec" msgstr "Nessun codec" #: ../plugins/screenshot/screenshot.c:45 msgid "Screenshot saver" msgstr "Salva istantanee" #: ../plugins/screenshot/screenshot.c:47 msgid "" "With this plugin you can take screen shots of the program you are watching " "and save them in various formats." msgstr "" "Con questo plugin puoi ottenere istantanee del programma che stai guardando " "e salvarle in vari formati." #: ../plugins/screenshot/screenshot.c:50 msgid "This plugin takes screenshots of the video capture." msgstr "Questo plugin prende istantanee della cattura video." #: ../plugins/screenshot/screenshot.c:517 #: ../plugins/screenshot/screenshot.c:542 #: ../plugins/screenshot/screenshot.c:1525 msgid "Screenshot" msgstr "Istantanea" #: ../plugins/screenshot/screenshot.c:547 msgid "Take a screenshot" msgstr "Prendi un'istantanea" #: ../plugins/screenshot/screenshot.c:684 #: ../plugins/screenshot/screenshot.c:842 msgid "Error while writing screenshot\n" msgstr "Errore durante la scrittura dell'istantanea\n" #: ../plugins/screenshot/screenshot.c:892 msgid "Saving..." msgstr "Salvataggio..." #: ../plugins/screenshot/screenshot.c:919 #, c-format msgid "" "Sorry, but I cannot write %s\n" "%s" msgstr "" "Spiacente, impossibile scrivere %s\n" "%s" #: ../plugins/screenshot/screenshot.c:953 msgid "Sorry, not enough resources to create a new thread" msgstr "Spiacente, non abbastanza risorse per creare un nuovo thread" #: ../plugins/screenshot/screenshot.c:958 msgid "There are too many threads" msgstr "Ci sono troppi thread" #: ../plugins/screenshot/screenshot.c:1147 #, c-format msgid "appx %u KB" msgstr "circa %u KB" #: ../plugins/screenshot/screenshot.c:1150 #, c-format msgid "appx %.2f MB" msgstr "circa %.2f MB" #: ../plugins/screenshot/screenshot.c:1225 #: ../plugins/screenshot/screenshot.c:1369 msgid "This format has no quality option" msgstr "Questo formato non ha opzioni di qualità" #: ../plugins/screenshot/screenshot.c:1405 msgid "Only useful with full size, unscaled picture (480 or 576 lines)" msgstr "Utile solo a tutto schermo, con disegno non scalato (480 o 576 linee)" #: ../plugins/screenshot/screenshot.glade2.h:1 msgid "Backward" msgstr "Indietro" #: ../plugins/screenshot/screenshot.glade2.h:2 msgid "Command to execute after the image has been saved" msgstr "Comando da eseguire dopo aver salvato l'immagine" #: ../plugins/screenshot/screenshot.glade2.h:4 msgid "Forward" msgstr "Avanti" #: ../plugins/screenshot/screenshot.glade2.h:5 msgid "Grab full size image" msgstr "Cattura immagine a dimensione massima" #: ../plugins/screenshot/screenshot.glade2.h:6 msgid "Off" msgstr "Inattivo" #: ../plugins/screenshot/screenshot.glade2.h:7 msgid "Preview" msgstr "Anteprima" #: ../plugins/screenshot/screenshot.glade2.h:8 ../plugins/teletext/view.c:2767 msgid "S_ubtitles" msgstr "S_ottotitoli" #: ../plugins/screenshot/screenshot.glade2.h:9 msgid "Save Screenshot" msgstr "Salva istantanea" #: ../plugins/screenshot/screenshot.glade2.h:10 msgid "_Add toolbar button" msgstr "_Aggiungi pulsante alla barra degli strumenti" #: ../plugins/screenshot/screenshot.glade2.h:11 msgid "_Completion command:" msgstr "_Comando di completamento:" #: ../plugins/screenshot/screenshot.glade2.h:12 msgid "_Deinterlace:" msgstr "_Deinterlaccia:" #: ../plugins/screenshot/screenshot.glade2.h:14 msgid "_Grab on clicking OK" msgstr "_Cattura al clic su OK" #: ../plugins/screenshot/screenshot.glade2.h:15 msgid "_Quality:" msgstr "_Qualità:" #: ../plugins/screenshot/screenshot.glade2.h:16 msgid "_Save as:" msgstr "_Salva come:" #: ../plugins/screenshot/screenshot.glade2.h:17 msgid "_Skip" msgstr "_Salta" #: ../plugins/screenshot/screenshot.glade2.h:18 msgid "pictures before grabbing" msgstr "immagini prima di catturare" #: ../plugins/subtitle/main.c:47 ../src/main.c:199 msgid "Subtitles" msgstr "Sottotitoli" #: ../plugins/subtitle/main.c:89 msgid "Subtitle plugin" msgstr "Plugin per i sottotitoli" #: ../plugins/subtitle/preferences.c:55 ../plugins/teletext/preferences.c:57 msgid "Western and Central Europe" msgstr "Europa occidentale e centrale" #: ../plugins/subtitle/preferences.c:56 ../plugins/teletext/preferences.c:58 msgid "Eastern Europe" msgstr "Europa orientale" #: ../plugins/subtitle/preferences.c:57 ../plugins/teletext/preferences.c:59 msgid "Western Europe and Turkey" msgstr "Europa occidentale e turchia" #: ../plugins/subtitle/preferences.c:58 ../plugins/teletext/preferences.c:60 msgid "Central and Southeast Europe" msgstr "Europa centrale e sud-orientale" #: ../plugins/subtitle/preferences.c:59 ../plugins/teletext/preferences.c:61 msgid "Cyrillic" msgstr "Cirillica" #: ../plugins/subtitle/preferences.c:60 ../plugins/teletext/preferences.c:62 msgid "Greek and Turkish" msgstr "Greca e turca" #: ../plugins/subtitle/preferences.c:61 ../plugins/teletext/preferences.c:63 msgid "Arabic" msgstr "Araba" #: ../plugins/subtitle/preferences.c:62 ../plugins/teletext/preferences.c:64 msgid "Hebrew and Arabic" msgstr "Ebraica ed araba" #: ../plugins/subtitle/preferences.c:77 ../plugins/teletext/preferences.c:97 msgid "Nearest (fast, low quality)" msgstr "Più vicino (veloce, bassa qualità)" #: ../plugins/subtitle/preferences.c:78 ../plugins/teletext/preferences.c:98 msgid "Tiles" msgstr "Tessere" #: ../plugins/subtitle/preferences.c:79 ../plugins/teletext/preferences.c:99 msgid "Bilinear" msgstr "Bilineare" #: ../plugins/subtitle/preferences.c:80 ../plugins/teletext/preferences.c:100 msgid "Hyper (slow, high quality)" msgstr "Iper (lento, alta qualità)" #: ../plugins/subtitle/preferences.c:345 msgid "<b>Teletext</b>" msgstr "<b>Televideo</b>" #: ../plugins/subtitle/preferences.c:347 ../plugins/teletext/preferences.c:303 msgid "_Default encoding:" msgstr "Co_difica predefinita:" #: ../plugins/subtitle/preferences.c:351 msgid "" "Some stations fail to transmit a complete language identifier, so the " "Subtitle viewer may not display the correct font or national characters. You " "can select your geographical region here as an additional hint." msgstr "" "Alcune stazioni non trasmettono un identificatore di lingua completo, così " "il visualizzatore dei sottotitoli non può visualizzare correttamente i " "caratteri nazionali. Puoi selezionare qui la tua regione geografica come " "aiuto addizionale." #: ../plugins/subtitle/preferences.c:358 msgid "_Show double height characters" msgstr "" #. TRANSLATORS: #. Closed Caption is a captioning system used mainly in the USA, #. and on VHS/LD/DVD in other countries. Europe uses Teletext for #. caption and subtitle transmissions. #: ../plugins/subtitle/preferences.c:365 msgid "<b>Closed Caption</b>" msgstr "" #: ../plugins/subtitle/preferences.c:367 msgid "_Foreground:" msgstr "_Primo piano:" #: ../plugins/subtitle/preferences.c:369 #, fuzzy msgid "Closed Caption foreground color" msgstr "Colore di _primo piano:" #: ../plugins/subtitle/preferences.c:372 msgid "_Background:" msgstr "_Sfondo:" #: ../plugins/subtitle/preferences.c:374 #, fuzzy msgid "Closed Caption background color" msgstr "Colore di _sfondo:" #: ../plugins/subtitle/preferences.c:383 msgid "_Roll live caption" msgstr "" #: ../plugins/subtitle/preferences.c:386 ../plugins/teletext/preferences.c:368 msgid "<b>Display</b>" msgstr "<b>Visualizzazione</b>" #: ../plugins/subtitle/preferences.c:388 ../plugins/teletext/preferences.c:370 msgid "_Brightness:" msgstr "_Luminosità:" #: ../plugins/subtitle/preferences.c:410 ../plugins/teletext/preferences.c:392 msgid "_Contrast:" msgstr "_Contrasto:" #: ../plugins/subtitle/preferences.c:432 ../plugins/teletext/preferences.c:414 msgid "S_caling:" msgstr "S_cala:" #: ../plugins/subtitle/preferences.c:436 ../plugins/teletext/preferences.c:418 msgid "Quality/speed trade-off when scaling and anti-aliasing the page." msgstr "Compromesso qualità/velocità quando scala e migliora la pagina." #: ../plugins/subtitle/view.c:1660 ../src/subtitle.c:321 msgid "_Disable" msgstr "_Disabilita" #: ../plugins/subtitle/view.c:1662 msgid "_Reset position" msgstr "_Ripristina posizione:" #: ../plugins/subtitle/view.c:1664 ../plugins/teletext/window.c:810 msgid "_Encoding" msgstr "_Codifica" #: ../plugins/teletext/bookmark.c:283 #, c-format msgid "Added page %x.%02x to bookmarks" msgstr "Pagina %x.%02x aggiunta ai segnalibri" #: ../plugins/teletext/bookmark.c:287 #, c-format msgid "Added page %x to bookmarks" msgstr "Pagina %x aggiunta ai segnalibri" #: ../plugins/teletext/bookmark.c:348 msgid "_Add Bookmark" msgstr "_Aggiungi segnalibro" #: ../plugins/teletext/bookmark.c:354 msgid "_Edit Bookmarks..." msgstr "_Modifica segnalibri..." #: ../plugins/teletext/bookmark.c:595 msgid "Bookmarks" msgstr "Segnalibri" #: ../plugins/teletext/bookmark.c:634 msgid "Channel" msgstr "Canale" #: ../plugins/teletext/bookmark.c:640 msgid "Page" msgstr "Pagina" #: ../plugins/teletext/bookmark.c:645 msgid "Description" msgstr "Descrizione" #: ../plugins/teletext/export.c:168 ../plugins/teletext/export.c:194 msgid "Could not save page" msgstr "Impossibile salvare la pagina" #: ../plugins/teletext/export.c:239 msgid "Save as" msgstr "Salva come" #: ../plugins/teletext/export.c:257 msgid "Format:" msgstr "Formato:" #: ../plugins/teletext/main.c:176 msgid "_Preferences" msgstr "_Preferenze" #: ../plugins/teletext/main.c:178 msgid "_Colors" msgstr "_Colori" #: ../plugins/teletext/main.c:204 ../src/main.c:198 msgid "Teletext" msgstr "Televideo" #: ../plugins/teletext/main.c:277 msgid "Teletext plugin" msgstr "Plugin del televideo" #: ../plugins/teletext/preferences.c:79 msgid "Level 1" msgstr "Livello 1" #: ../plugins/teletext/preferences.c:80 msgid "Level 1.5 (additional national characters)" msgstr "Livello 1.5 (caratteri nazionali aggiuntivi)" #: ../plugins/teletext/preferences.c:81 msgid "Level 2.5 (more colors, font styles and graphics)" msgstr "Livello 2.5 (più colori, stili per i caratteri e grafica)" #: ../plugins/teletext/preferences.c:82 msgid "Level 3.5 (proportional spacing, multicolor graphics)" msgstr "Livello 3.5 (proporzionato, grafica multicolori)" #: ../plugins/teletext/preferences.c:295 msgid "<b>General</b>" msgstr "<b>Generale</b>" #: ../plugins/teletext/preferences.c:297 msgid "_Teletext implementation:" msgstr "Implemen_tazione del Televideo:" #: ../plugins/teletext/preferences.c:307 msgid "" "Some stations fail to transmit a complete language identifier, so the " "Teletext viewer may not display the correct font or national characters. You " "can select your geographical region here as an additional hint." msgstr "" "Alcune stazioni non trasmettono un identificatore di lingua completo, così " "il visualizzatore del Televideo non può visualizzare correttamente i " "caratteri nazionali. Puoi selezionare qui la tua regione geografica come " "aiuto addizionale." #: ../plugins/teletext/preferences.c:313 msgid "<b>Page memory</b>" msgstr "<b>Memoria di pagina</b>" #: ../plugins/teletext/preferences.c:315 msgid "_Size:" msgstr "_Dimensione:" #. expand #. fill #. pad #. TRANSLATORS: Kilobyte (2^10) #: ../plugins/teletext/preferences.c:341 msgid "KiB" msgstr "KB" #: ../plugins/teletext/preferences.c:348 msgid "_Channels:" msgstr "_Canali:" #: ../plugins/teletext/search.c:131 ../plugins/teletext/search.c:349 msgid "Search text:" msgstr "Testo da cercare:" #: ../plugins/teletext/search.c:153 #, c-format msgid "Found text on page %x.%02x:" msgstr "Testo trovato nella pagina %x.%02x:" #: ../plugins/teletext/search.c:160 msgid "Not found:" msgstr "Non trovato:" #: ../plugins/teletext/search.c:171 msgid "Page memory is empty" msgstr "La memoria delle pagine è vuota" #: ../plugins/teletext/search.c:342 ../plugins/teletext/view.c:3260 msgid "Search page memory" msgstr "Cerca nella memoria delle pagine:" #: ../plugins/teletext/search.c:358 msgid "_Regular expression" msgstr "Esp_ressione regolare" #: ../plugins/teletext/search.c:363 msgid "Search case _insensitive" msgstr "Non d_istinguere MAIUSCOLE/minuscole" #. Future stuff. #: ../plugins/teletext/search.c:369 msgid "_All channels" msgstr "Tutti i c_anali" #: ../plugins/teletext/toolbar.c:122 msgid "Next page" msgstr "Pagina successiva" #: ../plugins/teletext/toolbar.c:125 msgid "Previous page" msgstr "Pagina precedente" #: ../plugins/teletext/toolbar.c:128 msgid "Previous subpage" msgstr "Sottopagina precedente" #: ../plugins/teletext/toolbar.c:131 msgid "Next subpage" msgstr "Sottopagina successiva" #: ../plugins/teletext/toolbar.c:188 msgid "Open new Teletext window" msgstr "Apri una nuova finestra di Televideo" #: ../plugins/teletext/toolbar.c:210 msgid "Hold the current subpage" msgstr "Blocca la sottopagina corrente" #: ../plugins/teletext/toolbar.c:240 msgid "Reveal" msgstr "Rivela" #: ../plugins/teletext/toolbar.c:241 msgid "Reveal concealed text" msgstr "Rivela il testo nascosto" #: ../plugins/teletext/view.c:846 #, c-format msgid " Page %x" msgstr " Pagina %x" #: ../plugins/teletext/view.c:850 #, c-format msgid " Subpage %x" msgstr " Sottopagina %x" #: ../plugins/teletext/view.c:1459 #, c-format msgid "Loading page %X..." msgstr "Caricamento pagina %X..." #: ../plugins/teletext/view.c:1461 #, c-format msgid "Loading page %X.%02X..." msgstr "Caricamento pagina %X.%02X..." #: ../plugins/teletext/view.c:2372 msgid "Selection copied to clipboard" msgstr "Selezione copiata negli appunti" #: ../plugins/teletext/view.c:2454 msgid "No page loaded" msgstr "Nessuna pagina caricata" #: ../plugins/teletext/view.c:2467 msgid "Selecting - press Shift key for table mode" msgstr "Selezione - premi Shift per la modalità tabella" #: ../plugins/teletext/view.c:2627 msgid "Subtitle index" msgstr "Indice dei sottotitoli" #: ../plugins/teletext/view.c:2634 msgid "Now and Next" msgstr "Ora e in seguito" #: ../plugins/teletext/view.c:2640 msgid "Current program" msgstr "Programma corrente" #: ../plugins/teletext/view.c:2646 msgid "Program Index" msgstr "Indice del programma" #: ../plugins/teletext/view.c:2652 msgid "Program Schedule" msgstr "Orario del programma" #. TRANSLATORS: Schedule changes and the like. #: ../plugins/teletext/view.c:2660 msgid "Program Warning" msgstr "Avviso del programma" #: ../plugins/teletext/view.c:2721 msgid "_Open" msgstr "_Apri" #: ../plugins/teletext/view.c:2727 msgid "Open in _New Window" msgstr "Apri i_n una nuova finestra" #: ../plugins/teletext/view.c:2738 msgid "_Open Link" msgstr "_Apri collegamento" #: ../plugins/teletext/view.c:2749 ../plugins/teletext/window.c:805 msgid "_New Window" msgstr "_Nuova finestra" #: ../plugins/teletext/view.c:2755 msgid "_Save as..." msgstr "_Salva come..." #: ../plugins/teletext/view.c:2761 msgid "S_earch..." msgstr "C_erca..." #: ../plugins/teletext/view.c:2773 ../plugins/teletext/window.c:812 #: ../src/zapping.c:497 msgid "_Bookmarks" msgstr "Segnali_bri" #: ../plugins/teletext/view.c:3252 msgid "_Go" msgstr "_Vai" #: ../plugins/teletext/view.c:3254 msgid "Previous page in history" msgstr "Pagina precedente nella cronologia" #: ../plugins/teletext/view.c:3256 msgid "Next page in history" msgstr "Pagina successiva nella cronologia" #: ../plugins/teletext/view.c:3257 msgid "Index" msgstr "Indice" #: ../plugins/teletext/view.c:3258 msgid "Go to the index page" msgstr "Vai alla pagina indice" #: ../plugins/teletext/view.c:3262 msgid "Save this page to a file" msgstr "Salva questa pagina su file" #. TRANSLATORS: Choose from the Teletext page cache the currently #. received channel. #: ../plugins/teletext/window.c:317 msgid "_Received" msgstr "_Ricevuto" #: ../plugins/teletext/window.c:349 ../src/v4linterface.c:1317 #: ../src/v4linterface.c:2520 msgid "Unnamed" msgstr "Senza nome" #: ../plugins/teletext/window.c:571 ../src/zvbi.c:221 msgid " (Latin)" msgstr " (Latino)" #: ../plugins/teletext/window.c:573 ../src/zvbi.c:223 msgid " (Cyrillic)" msgstr " (Cirillico)" #: ../plugins/teletext/window.c:616 ../src/zvbi.c:238 msgid "_Automatic" msgstr "_Automatico" #: ../plugins/teletext/window.c:804 ../src/zapping.c:428 msgid "_File" msgstr "_File" #: ../plugins/teletext/window.c:808 ../src/zapping.c:436 msgid "_Edit" msgstr "_Modifica" #: ../plugins/teletext/window.c:809 ../src/zapping.c:443 msgid "_View" msgstr "_Visualizza" #. 2.6 GTK_STOCK_EDIT #: ../plugins/teletext/window.c:811 ../src/zapping.c:441 ../src/zapping.c:454 msgid "_Channels" msgstr "_Canali" #: ../plugins/teletext/window.c:871 ../src/zapping.c:476 msgid "_Toolbar" msgstr "Barra degli s_trumenti" #: ../plugins/teletext/window.c:873 msgid "_Statusbar" msgstr "Barra di _stato" #. TRANSLATORS: Soundcard mixer line. #: ../src/audio.c:807 msgid "Input:" msgstr "Ingresso:" #: ../src/audio.c:840 ../src/keyboard.c:1154 ../src/osd.c:1080 #: ../src/properties.c:991 ../src/properties-handler.c:1353 msgid "General Options" msgstr "Opzioni generali" #: ../src/audio.c:939 msgid "<span foreground=\"blue\">Audio off</span>" msgstr "<span foreground=\"blue\">Audio non attivo</span>" #: ../src/audio.c:940 msgid "<span foreground=\"yellow\">Audio on</span>" msgstr "<span foreground=\"yellow\">Audio attivo</span>" #: ../src/capture.c:866 msgid "Cannot stop capturing while recording." msgstr "Impossibile fermare la cattura durante una registrazione." #: ../src/capture.c:1052 #, c-format msgid "Cannot start capturing: %s" msgstr "Impossibile iniziare a catturare: %s" #: ../src/channel_editor.c:592 #, c-format msgid "Channel: %s Found: %u" msgstr "Canale: %s Trovato: %u" #: ../src/channel_editor.c:715 msgid "Searching..." msgstr "Ricerca..." #: ../src/channel_editor.c:1452 msgid "Select the frequency table used in your country" msgstr "Seleziona la tavola delle frequenze usata nel tuo paese" #: ../src/channel_editor.c:1596 msgid "Ch. Name" msgstr "Nome del can." #: ../src/channel_editor.c:1601 msgid "Freq (MHz)" msgstr "Freq (MHz)" #. append #: ../src/channel_editor.c:1654 msgid "Channel name" msgstr "Nome del canale" #. append #: ../src/channel_editor.c:1658 msgid "Video input" msgstr "Ingresso video" #. append #: ../src/channel_editor.c:1662 msgid "RF Channel" msgstr "Canale RF" #. append #: ../src/channel_editor.c:1666 msgid "Video standard" msgstr "Standard video" #. append #: ../src/channel_editor.c:1670 ../src/keyboard.c:444 msgid "Accelerator" msgstr "Acceleratore" #: ../src/channel_editor.c:1685 msgid "Do not change input" msgstr "Non cambiare ingresso" #: ../src/channel_editor.c:1709 msgid "Do not change standard" msgstr "Non cambiare standard" #: ../src/channel_editor.c:1748 msgid "Channel editor" msgstr "Editor dei canali" #: ../src/channel_editor.c:1772 msgid "Region" msgstr "Regione" #: ../src/channel_editor.c:1808 msgid "Automatic station _search" msgstr "Ricerca automatica delle _stazioni" #: ../src/channel_editor.c:1814 msgid "" "Select a suitable frequency table, then click here to search through all " "channels in the table and add the received stations to the channel list." msgstr "" "Seleziona una tavola delle frequenze adatta, quindi fai click qui per " "cercare attraverso tutti i canali della tavola e aggiungere le stazioni " "ricevute alla lista dei canali." #: ../src/channel_editor.c:1820 msgid "Add all _channels" msgstr "Aggiungi tutti i _canali" #: ../src/channel_editor.c:1827 msgid "Add all channels in the frequency table to the channel list." msgstr "" "Aggiungi tutti i canali della tavola delle frequenze alla lista dei canali." #: ../src/channel_editor.c:1831 msgid "_Import XawTV configuration" msgstr "_Importa configurazione XawTV" #: ../src/channel_editor.c:1858 msgid "Channel List" msgstr "Lista dei canali" #: ../src/channel_editor.c:1893 msgid "Edit channel" msgstr "Modifica canale" #: ../src/channel_editor.c:1910 msgid "Name:" msgstr "Nome:" #: ../src/channel_editor.c:1919 msgid "Video input:" msgstr "Ingresso video:" #: ../src/channel_editor.c:1930 msgid "Fine tuning:" msgstr "Sintonizzazione precisa:" #: ../src/channel_editor.c:1936 msgid "MHz" msgstr "MHz" #: ../src/channel_editor.c:1947 msgid "Video standard:" msgstr "Standard video:" #: ../src/channel_editor.c:1958 msgid "Accelerator:" msgstr "Acceleratore:" #: ../src/eggcellrendererkeys.c:163 ../src/eggcellrendererkeys.c:164 msgid "Accelerator key" msgstr "Tasto acceleratore" #: ../src/eggcellrendererkeys.c:173 ../src/eggcellrendererkeys.c:174 msgid "Accelerator modifiers" msgstr "Modificatori degli acceleratori" #: ../src/eggcellrendererkeys.c:183 msgid "Accelerator Mode" msgstr "Modalità dell'acceleratore" #: ../src/eggcellrendererkeys.c:184 msgid "The type of accelerator." msgstr "Il tipo di acceleratore." #: ../src/eggcellrendererkeys.c:333 ../src/eggcellrendererkeys.c:567 msgid "Type a new accelerator, or press Backspace to clear" msgstr "Digita un nuovo acceleratore, o premi la barra spazio per azzerare" #: ../src/eggcellrendererkeys.c:570 msgid "Type a new accelerator" msgstr "Digita un nuovo acceleratore" #: ../src/frequencies.c:94 ../src/frequencies.c:160 msgid "broadcast" msgstr "trasmissione" #: ../src/frequencies.c:107 msgid "cable IRC" msgstr "cavo IRC" #: ../src/frequencies.c:126 msgid "cable HRC" msgstr "cavo HRC" #: ../src/frequencies.c:144 ../src/frequencies.c:172 msgid "cable" msgstr "cavo" #. TRANSLATORS: Leave "Autocom" untranslated. #: ../src/frequencies.c:275 msgid "Autocom cable" msgstr "cavo Autocom" #: ../src/keyboard.c:89 ../src/keyboard.c:112 msgid "Ctrl+" msgstr "Ctrl+" #: ../src/keyboard.c:90 ../src/keyboard.c:113 msgid "Alt+" msgstr "Alt+" #: ../src/keyboard.c:91 ../src/keyboard.c:114 msgid "Shift+" msgstr "Shift+" #: ../src/keyboard.c:525 msgid "Key table..." msgstr "Tabella dei tasti..." #: ../src/keyboard.c:1106 msgid "Command" msgstr "Comando" #: ../src/keyboard.c:1120 ../src/properties-handler.c:801 msgid "Shortcut" msgstr "Scorciatoia" #: ../src/main.c:197 ../src/tveng1.c:1358 ../src/tveng25.c:566 #: ../src/tvengbktr.c:414 ../src/tveng.c:2340 ../src/tvengxv.c:878 msgid "Mute" msgstr "Silenzio" #. warnings #: ../src/main.c:273 ../src/main.c:308 #, c-format msgid "" "Capture mode couldn't be started:\n" "%s" msgstr "" "Impossibile avviare la modalità cattura:\n" "%s" #: ../src/main.c:291 #, c-format msgid "" "Cannot restore previous mode, will try capture mode:\n" "%s" msgstr "" "Impossibile ripristinare la modalità precedente, proverò la modalità " "cattura:\n" "%s" #: ../src/main.c:299 #, c-format msgid "" "Capture mode couldn't be started either:\n" "%s" msgstr "" "Impossibile avviare anche la modalità cattura:\n" "%s" #: ../src/main.c:302 #, c-format msgid "" "Cannot restore previous mode:\n" "%s" msgstr "" "Impossibile ripristinare la modalità precedente:\n" "%s" #: ../src/main.c:376 msgid "Kernel video device" msgstr "Dispositivo video del kernel" #: ../src/main.c:377 msgid "FILENAME" msgstr "NOME DEL FILE" #: ../src/main.c:388 ../src/main.c:406 msgid "XVideo video input port" msgstr "Porta dell'ingresso video di XVideo" #: ../src/main.c:397 msgid "XVideo image overlay port" msgstr "Porta di overlay dell'immagine di XVideo" #: ../src/main.c:415 msgid "Disable XVideo video input support" msgstr "Disabilita supporto ingresso video di XVideo" #: ../src/main.c:424 msgid "Disable XVideo image overlay support" msgstr "Disabilita overlay dell'immagine di XVideo" #: ../src/main.c:433 msgid "Disable XVideo extension support" msgstr "Disabilita supporto estensioni XVideo" #: ../src/main.c:445 msgid "Disable video overlay" msgstr "Disabilita overlay video" #: ../src/main.c:454 msgid "X display is remote, disable video overlay" msgstr "Il display X è remoto, disabilita overlay" #: ../src/main.c:463 msgid "Disable VBI support" msgstr "Disabilita supporto VBI" #: ../src/main.c:472 msgid "Disable plugins" msgstr "Disabilita plugin" #. TRANSLATORS: --no-zsfb command line option. #. TRANSLATORS: --yuv-format command line option. #. TRANSLATORS: --tunerless-norm command line option. #: ../src/main.c:486 ../src/main.c:550 ../src/main.c:560 msgid "Obsolete" msgstr "Obsoleto" #: ../src/main.c:504 msgid "Color depth of the X display" msgstr "Profondità di colore del server X" #: ../src/main.c:505 msgid "BPP" msgstr "BPP" #: ../src/main.c:513 msgid "Print debug messages" msgstr "Stampa i messaggi di debug" #: ../src/main.c:531 msgid "Force dword alignment of the overlay window" msgstr "Forza allineamento a dword della finestra di overlay" #: ../src/main.c:540 msgid "Execute the given command and exit" msgstr "Esegue il comando dato ed esce" #: ../src/main.c:541 msgid "CMD" msgstr "CMD" #: ../src/main.c:569 msgid "Override CPU detection" msgstr "Sovrascrivi il rilevamento della CPU" #: ../src/main.c:658 msgid "Sorry, but there is no module support in GLib" msgstr "Spiacente, ma non c'è il supporto per i moduli nelle GLib" #: ../src/main.c:782 msgid "Cannot get device info struct" msgstr "Impossibile ottenere la struttura delle informazioni del dispositivo" #: ../src/main.c:791 msgid "Zapping couldn't be started" msgstr "Impossibile avviare Zapping" #: ../src/main.c:845 #, c-format msgid "Couldn't open %s, try other devices?" msgstr "Impossibile aprire %s, provare con altri dispositivi?" #: ../src/main.c:872 #, c-format msgid "%s suceeded, setting it as the new default" msgstr "%s riuscito, impostato come nuovo valore predefinito" #: ../src/main.c:882 #, c-format msgid "" "Sorry, but \"%s\" could not be opened:\n" "%s" msgstr "" "Spiacente, ma \"%s\" non può essere aperto:\n" "%s" #: ../src/main.c:1242 #, c-format msgid "" "ZConf could not be closed properly , your\n" "configuration will be lost.\n" "Possible causes for this are:\n" " - There is not enough free memory\n" " - You do not have permissions to write to $HOME/.zapping\n" " - libxml is non-functional (?)\n" " - or, more probably, you have found a bug in\n" " %s. Please contact the author.\n" msgstr "" "ZConf non ha potuto chiudersi correttamente,\n" "la configurazione sarà perduta.\n" "Possibili cause di ciò:\n" " - Non c'è abbastanza memoria libera\n" " - Non hai i permessi di scrittura a $HOME/.zapping\n" " - libxml non funziona (?)\n" " - o, più probabilmente, hai trovato un bug in\n" " %s. Contatta l'autore.\n" #: ../src/main.c:1268 msgid "Sorry, Zapping is unable to create the config tree" msgstr "Spiacente, Zapping non può creare la conigurazione" #: ../src/mixer.c:103 msgid "The soundcard mixer is not configured." msgstr "Il mixer della scheda sonora non è configurato." #: ../src/osd.c:601 msgid "Please choose a font for OSD in preferences." msgstr "Scegliere un carattere per l'OSD nelle preferenze." #: ../src/osd.c:604 #, c-format msgid "" "The configured font \"%s\" cannot be loaded, please select another one in " "preferences\n" msgstr "" "Impossibile caricare il tipo carattere configurato \"%s\", selezionarne un " "altro nelle preferenze\n" #: ../src/osd.c:614 msgid "" "No font could be loaded, please make sure\n" "your system is properly configured." msgstr "" "Non è stato possibile caricare alcun tipo carattere,\n" "assicurarsi di aver configurato correttamente il sistema." #: ../src/oss.c:186 msgid "Audio device:" msgstr "Dispositivo audio:" #: ../src/oss.c:189 msgid "Select the audio device" msgstr "Seleziona il dispositivo audio" #: ../src/oss.c:216 #, c-format msgid "The given audio device \"%s\" doesn't exist" msgstr "Il dispositivo audio \"%s\" non esiste" #. TRANSLATORS: Name of mixer line, mono as #. opposed to stereo. #: ../src/oss.c:920 #, c-format msgid "%s (Mono)" msgstr "%s (mono)" #: ../src/plugin_properties.c:118 msgid "Very low" msgstr "Molto bassa" #: ../src/plugin_properties.c:122 msgid "Lower" msgstr "Più bassa" #: ../src/plugin_properties.c:124 msgid "Normal" msgstr "Normale" #: ../src/plugin_properties.c:126 msgid "Very high" msgstr "Molto alta" #: ../src/plugin_properties.c:130 msgid "Higher" msgstr "Più alta" #: ../src/plugin_properties.c:152 msgid "This plugin has no public symbols" msgstr "Questo plugin non ha simboli pubblici" #: ../src/plugin_properties.c:171 msgid "List of symbols exported by the plugin" msgstr "Lista dei simboli esportati dal plugin" #: ../src/plugin_properties.c:213 msgid "Sorry, the plugin couldn't be started" msgstr "Spiacente, impossibile avviare il plugin" #: ../src/plugin_properties.c:273 msgid "Sorry, but no plugins have been loaded" msgstr "Spiacente, ma nessun plugin è stato caricato" #: ../src/plugin_properties.c:308 msgid "Plugin name" msgstr "Nome del plugin" #: ../src/plugin_properties.c:335 msgid "Symbol" msgstr "Simbolo" #: ../src/plugin_properties.c:340 msgid "Hash" msgstr "Hash" #: ../src/plugins.c:190 #, c-format msgid "\"%s\" doesn't provide a version" msgstr "\"%s\" non fornisce una versione" #: ../src/plugins.c:227 msgid "Insufficient memory" msgstr "Memoria insufficiente" #: ../src/plugins.c:236 msgid "No description available" msgstr "Nessuna descrizione disponibile" #. Warn #: ../src/plugins.c:350 #, c-format msgid "" "Check error: \"%s\" in plugin %s was supposed to be \"%s\" but it is:\"%s\". " "Hashes are 0x%x vs. 0x%x" msgstr "" "Errore di controllo: \"%s\" nel plugin %s si supponeva essere \"%s\" ma è:\"%" "s\". Gli hash sono 0x%x vs. 0x%x" #: ../src/properties.c:622 msgid "Zapping Properties" msgstr "Proprietà di Zapping" #: ../src/properties-handler.c:86 msgid "Can capture to memory.\n" msgstr "Può catturare in memoria.\n" #: ../src/properties-handler.c:88 msgid "Has some tuner.\n" msgstr "Ha alcuni sintonizzatori.\n" #: ../src/properties-handler.c:90 msgid "Supports the teletext service.\n" msgstr "Supporta il servizio del televideo.\n" #: ../src/properties-handler.c:92 msgid "Can overlay the image.\n" msgstr "Può effettuare l'overlay sull'immagine.\n" #: ../src/properties-handler.c:94 msgid "Can chromakey the image.\n" msgstr "L'immagine può subire il chromakey.\n" #: ../src/properties-handler.c:96 msgid "Clipping rectangles are supported.\n" msgstr "I ritagli rettangolari sono supportati.\n" #: ../src/properties-handler.c:98 msgid "Framebuffer memory is overwritten.\n" msgstr "La memoria del framebuffer è sovrascritta.\n" #: ../src/properties-handler.c:100 msgid "The capture can be scaled.\n" msgstr "La cattura può essere scalata.\n" #: ../src/properties-handler.c:102 msgid "Only monochrome is available\n" msgstr "Solo il monocromo è disponibile.\n" #: ../src/properties-handler.c:104 msgid "The capture can be zoomed\n" msgstr "La cattura può subire lo zoom\n" #: ../src/properties-handler.c:115 msgid "No available inputs" msgstr "Nessun ingresso disponibile" #: ../src/properties-handler.c:117 msgid "Your video device has no inputs" msgstr "Il tuo dispositivo video non ha ingressi" #: ../src/properties-handler.c:132 msgid "TV input" msgstr "Ingresso TV" #: ../src/properties-handler.c:134 msgid "Camera" msgstr "Camera" #: ../src/properties-handler.c:413 #, c-format msgid "Resize to %ux%u" msgstr "Ridimensiona a %ux%u" #. append #: ../src/properties-handler.c:778 msgid "Width" msgstr "Larghezza" #: ../src/properties-handler.c:778 msgid "Height" msgstr "Altezza" #: ../src/properties-handler.c:892 msgid "Text Below Icons" msgstr "Testo sotto le icone" #: ../src/properties-handler.c:893 msgid "Priority Text Beside Icons" msgstr "Testo prioritario accanto le icone" #: ../src/properties-handler.c:894 msgid "Icons Only" msgstr "Solo icone" #: ../src/properties-handler.c:895 msgid "Text Only" msgstr "Solo testo" #: ../src/properties-handler.c:960 #, c-format msgid "Use desktop default (%s)" msgstr "Impostazioni predefinite del desktop (%s)" #. TRANSLATORS: Fullscreen video mode #: ../src/properties-handler.c:1160 msgid "Do not change" msgstr "Non cambiare" #: ../src/properties-handler.c:1164 ../src/tveng.c:4841 msgid "Automatic" msgstr "Automatica" #. TRANSLATORS: Fullscreen video mode #: ../src/properties-handler.c:1179 #, c-format msgid "%u x %u @ %u Hz" msgstr "%u x %u @ %u Hz" #: ../src/properties-handler.c:1344 msgid "Main Window" msgstr "Finestra principale" #: ../src/subtitle.c:258 #, c-format msgid "Page %x" msgstr "Pagina %x" #: ../src/tveng1.c:1419 msgid "Frame Rate" msgstr "Frame rate" #: ../src/tveng1.c:1434 msgid "Snapshot Mode" msgstr "Modalità di istantanea" #: ../src/tveng1.c:2571 ../src/tveng25.c:1490 #, c-format msgid "Driver %s returned an unknown or invalid frame buffer format." msgstr "" #: ../src/tveng25.c:547 ../src/tvengbktr.c:383 ../src/tvengbktr.c:400 #: ../src/tvengxv.c:872 msgid "Brightness" msgstr "Luminosità" #: ../src/tveng25.c:548 ../src/tvengbktr.c:385 ../src/tvengbktr.c:402 #: ../src/tvengxv.c:873 msgid "Contrast" msgstr "Contrasto" #: ../src/tveng25.c:549 ../src/tvengbktr.c:387 ../src/tvengbktr.c:404 #: ../src/tvengxv.c:874 msgid "Saturation" msgstr "Saturazione" #: ../src/tveng25.c:550 ../src/tvengbktr.c:393 ../src/tvengbktr.c:412 #: ../src/tvengxv.c:875 msgid "Hue" msgstr "Tonalità" #: ../src/tveng25.c:551 msgid "Whiteness" msgstr "Bianco" #: ../src/tveng25.c:552 msgid "Black level" msgstr "Livello di nero" #: ../src/tveng25.c:553 ../src/tveng25.c:554 msgid "White balance" msgstr "Bilanciamento di bianco" #: ../src/tveng25.c:555 msgid "Red balance" msgstr "Bilanciamento di rosso" #: ../src/tveng25.c:556 msgid "Blue balance" msgstr "Bilanciamento di blu" #: ../src/tveng25.c:557 msgid "Gamma" msgstr "Gamma" #: ../src/tveng25.c:558 msgid "Exposure" msgstr "Esposizione" #: ../src/tveng25.c:559 msgid "Auto gain" msgstr "Gain automatico" #: ../src/tveng25.c:560 msgid "Gain" msgstr "Gain" #: ../src/tveng25.c:561 msgid "HCenter" msgstr "CentroH" #: ../src/tveng25.c:562 msgid "VCenter" msgstr "CentroV" #: ../src/tveng25.c:563 msgid "Hor. flipping" msgstr "Inversione oriz." #: ../src/tveng25.c:564 msgid "Vert. flipping" msgstr "Inversione vert." #: ../src/tveng25.c:565 ../src/tveng.c:2327 ../src/tvengxv.c:879 msgid "Volume" msgstr "Volume" #: ../src/tveng25.c:567 msgid "Audio Mute" msgstr "Silenzio" #: ../src/tveng25.c:568 msgid "Balance" msgstr "Bilanciamento" #: ../src/tveng25.c:569 msgid "Audio Balance" msgstr "Bilanciamento audio" #: ../src/tveng25.c:570 msgid "Treble" msgstr "Alti" #: ../src/tveng25.c:571 msgid "Loudness" msgstr "Rumorosità" #: ../src/tveng25.c:572 msgid "Bass" msgstr "Bassi" #: ../src/tveng25.c:2745 #, c-format msgid "%s doesn't look like a valid capture device" msgstr "%s non sembra un dispositivo di cattura valido" #: ../src/tveng25.c:2764 #, c-format msgid "Sorry, but \"%s\" cannot do streaming" msgstr "Spiacente, ma \"%s\" non può fare streaming" #: ../src/tvengbktr.c:390 msgid "U/V Gain" msgstr "Gain U/V" #: ../src/tvengbktr.c:407 msgid "U Saturation" msgstr "Saturazione U" #: ../src/tvengbktr.c:409 msgid "V Saturation" msgstr "Saturazione V" #: ../src/tveng.c:3214 #, fuzzy, c-format msgid "Cannot execute %s. Pipe error." msgstr "" "Impossibile eseguire %s.\n" "%s." #: ../src/tveng.c:3221 ../src/tveng.c:3253 #, fuzzy, c-format msgid "Cannot execute %s. %s." msgstr "" "Impossibile eseguire %s.\n" "%s." #. TRANSLATORS: Program name, error message. #: ../src/tveng.c:3231 #, c-format msgid "" "%s failed.\n" "%s" msgstr "" "%s fallito.\n" "%s" #. Something executed, but it wasn't #. zapping_setup_fb. Perhaps consolehelper #. couldn't authenticate the user? #: ../src/tveng.c:3243 #, fuzzy, c-format msgid "Cannot execute %s. No permission?" msgstr "" "Impossibile eseguire %s.\n" "%s." #: ../src/tveng.c:3352 #, c-format msgid "Cannot determine current overlay parameters. %s" msgstr "" #. TRANSLATORS: Program name. #: ../src/tveng.c:3361 #, fuzzy, c-format msgid "%s did not work as expected." msgstr "%s non è un dispositivo." #: ../src/tveng.c:3466 #, c-format msgid "%s not found in %s or the executable search path." msgstr "%s non trovato in %s o nel percorso di ricerca degli eseguibili." #: ../src/tveng.c:4848 msgid "Mono" msgstr "Mono" #: ../src/tveng.c:4855 msgid "Stereo" msgstr "Stereo" #: ../src/tveng.c:4863 msgid "Language 2" msgstr "Lingua 2" #: ../src/tvengxv.c:876 msgid "Color" msgstr "Colore" #: ../src/tvengxv.c:877 msgid "Interlace" msgstr "Interlaccia" #: ../src/tvengxv.c:918 msgid "No" msgstr "No" #: ../src/tvengxv.c:919 msgid "Yes" msgstr "Sì" #: ../src/tvengxv.c:920 msgid "Doublescan" msgstr "Doublescan" #. TRANSLATORS: In controls box, color picker control, #. something like "Adjust Chroma-Key" for overlay. #: ../src/v4linterface.c:452 #, c-format msgid "Adjust %s" msgstr "Regola %s" #: ../src/v4linterface.c:621 ../src/zapping.c:466 msgid "Controls" msgstr "Controlli" #: ../src/v4linterface.c:1308 ../src/zmisc.c:1811 msgid "Unknown" msgstr "Sconosciuto" #: ../src/v4linterface.c:1326 msgid "No input" msgstr "Nessun ingresso" #: ../src/v4linterface.c:1337 msgid "No standard" msgstr "Nessuno standard" #: ../src/v4linterface.c:2410 msgid "Video standards" msgstr "Standard video" #: ../src/v4linterface.c:2430 msgid "Audio inputs" msgstr "Ingressi audio" #: ../src/v4linterface.c:2450 msgid "Video inputs" msgstr "Ingressi video" #. TRANSLATORS: This is displayed in the channel menu when #. the channel list is empty. #: ../src/v4linterface.c:2548 msgid "No channels" msgstr "Nessun canale" #: ../src/zapping.c:439 msgid "P_lugins" msgstr "P_lugin" #: ../src/zapping.c:444 ../src/zapping.c:485 msgid "_Window" msgstr "_Finestra" #: ../src/zapping.c:446 ../src/zapping.c:487 msgid "_Fullscreen" msgstr "_A tutto schermo" #: ../src/zapping.c:448 ../src/zapping.c:489 msgid "_Background" msgstr "_Sfondo" #: ../src/zapping.c:450 msgid "_Overlay mode" msgstr "M_odalità overlay" #: ../src/zapping.c:452 msgid "_Capture mode" msgstr "Modalità _cattura" #: ../src/zapping.c:455 msgid "_Help" msgstr "_Aiuto" #: ../src/zapping.c:456 msgid "_Contents" msgstr "_Sommario" #: ../src/zapping.c:458 msgid "_About" msgstr "I_nformazioni" #: ../src/zapping.c:461 msgid "Appearance" msgstr "Aspetto" #: ../src/zapping.c:462 msgid "Ch. Up" msgstr "Can. su" #: ../src/zapping.c:463 msgid "Switch to higher channel" msgstr "Cambia al canale precedente" #: ../src/zapping.c:464 msgid "Ch. Down" msgstr "Can. giù" #: ../src/zapping.c:465 msgid "Switch to lower channel" msgstr "Cambia al canale successivo" #: ../src/zapping.c:467 msgid "Change picture controls" msgstr "Cambia controlli dell'immagine" #: ../src/zapping.c:472 msgid "_Mute" msgstr "S_ilenzio" #: ../src/zapping.c:473 msgid "Switch audio on or off" msgstr "Attiva e disattiva l'audio" #: ../src/zapping.c:474 msgid "Menu" msgstr "Menu" #: ../src/zapping.c:478 ../src/zapping.c:1092 msgid "Keep window on top" msgstr "Mantieni finestra in primo piano" #: ../src/zapping.c:496 ../src/zapping.c:498 msgid "_Teletext" msgstr "_Televideo" #: ../src/zapping.c:499 msgid "Activate Teletext mode" msgstr "Attiva la modalità Televideo" #: ../src/zapping.c:501 msgid "Return to video mode" msgstr "Ritorna alla modalità video" #: ../src/zapping.c:502 msgid "_New Teletext View" msgstr "_Nuova vista Televideo" #: ../src/zapping.c:508 ../src/zapping.c:513 msgid "_Subtitles" msgstr "_Sottotitoli" #: ../src/zapping.c:514 msgid "Switch subtitles on or off" msgstr "Attiva e disattiva i sottotitoli" #: ../src/zapping.c:1090 msgid "Show menu and toolbar" msgstr "Mostra menu e barra strumenti" #: ../src/zmisc.c:662 msgid "Could not switch to capture mode" msgstr "Impossibile passare al formato di cattura" #: ../src/zmisc.c:684 ../src/zmisc.c:702 msgid "Could not switch to overlay mode" msgstr "Impossibile passare alla modalità di overlay" #: ../src/zmisc.c:685 ../src/zmisc.c:737 msgid "Video overlay has been disabled." msgstr "L'overlay video è stato disabilitato." #: ../src/zmisc.c:718 msgid "Could not switch to Teletext mode" msgstr "Impossibile passare alla modalità Televideo" #: ../src/zmisc.c:719 msgid "VBI has been disabled, or it doesn't work." msgstr "VBI è stato disabilitato, o non funziona." #: ../src/zmisc.c:736 ../src/zmisc.c:765 msgid "Could not switch to fullscreen mode" msgstr "Impossibile passare alla modalità a tutto schermo" #: ../src/zmisc.c:1031 msgid "Hide the statusbar" msgstr "Nascondi la barra di stato" #: ../src/zmisc.c:1243 #, c-format msgid "%s is not a directory." msgstr "%s non è una directory." #: ../src/zmisc.c:1285 msgid "Could not create directory" msgstr "Impossibile creare la directory" #: ../src/zmisc.c:1286 #, c-format msgid "" "Could not create %s.\n" "%s" msgstr "" "Impossibile creare %s.\n" "%s." #: ../src/zmisc.c:2006 msgid "Device:" msgstr "Dispositivo:" #: ../src/zmisc.c:2007 msgid "Driver:" msgstr "Driver:" #: ../src/zmisc.c:2008 msgid "Device file:" msgstr "File del dispositivo:" #: ../src/zmisc.c:2354 #, c-format msgid "Overwrite %s?" msgstr "Sovrascrivere %s?" #: ../src/zmisc.c:2359 msgid "_Overwrite" msgstr "S_ovrascrivi" #: ../src/zmisc.c:2367 #, c-format msgid "%s is a directory." msgstr "%s è una directory." #: ../src/zmisc.c:2382 #, c-format msgid "%s is a special file" msgstr "%s è un file speciale" #: ../src/zmisc.c:2386 msgid "Continue" msgstr "Continua" #: ../src/zmisc.c:2664 msgid "Could not open help file" msgstr "Impossibile aprire il file d'aiuto" #: ../src/zmisc.c:2697 msgid "Could not open URL" msgstr "Impossibile aprire l'URL" #: ../src/zspinslider.c:306 ../src/zspinslider.c:310 msgid "Reset" msgstr "Ripristina" #: ../src/zvbi.c:1044 #, c-format msgid " %s: Teletext Page %x" msgstr " %s: Pagina del Televideo %x" #: ../src/zvbi.c:1047 #, c-format msgid " Teletext Page %x" msgstr " Pagina del Televideo %x" #: ../src/zvbi.c:1048 msgid "Open this page with Zapzilla" msgstr "Apri questa pagina con Zapzilla" #: ../src/zvbi.c:1434 msgid "PES file read error" msgstr "Errore di lettura del file PES" #: ../src/zvbi.c:1653 msgid "VBI interface timeout" msgstr "Timeout dell'interfaccia VBI" #: ../src/zvbi.c:1685 msgid "VBI interface: Failed to read from the device" msgstr "Interfaccia VBI: Lettura dal dispositivo fallita" #: ../src/zvbi.c:1763 ../src/zvbi.c:2006 ../src/zvbi.c:2114 msgid "VBI initialization failed" msgstr "Inizializzazione VBI fallita" #: ../src/zvbi.c:2060 msgid "Cannot open PES file" msgstr "Impossibile aprire il file PES" #: ../src/zvbi.c:2115 #, c-format msgid "%s is no VBI device." msgstr "%s non è un dispositivo VBI." #: ../zapping.desktop.in.h:1 msgid "Lets you watch TV in a window" msgstr "Ti permette di vedere la TV in una finestra" #: ../zapping.desktop.in.h:2 msgid "Zapping TV Viewer" msgstr "Zapping Visualizzatore TV" #: ../zapping.schemas.in.h:1 msgid "Adds spaces around words in Closed Caption text to improve legibility." msgstr "" #: ../zapping.schemas.in.h:2 #, fuzzy msgid "Caption/subtitle scaling quality." msgstr "Pagina successiva nella cronologia" #: ../zapping.schemas.in.h:3 msgid "Closed Caption default background color." msgstr "" #: ../zapping.schemas.in.h:4 msgid "Closed Caption default foreground color." msgstr "" #: ../zapping.schemas.in.h:5 msgid "Color for chroma-key overlay (#RRGGBB), default #FFCCCC." msgstr "" #: ../zapping.schemas.in.h:6 msgid "Default Teletext character set." msgstr "Insieme di caratteri predefinito del televideo." #: ../zapping.schemas.in.h:7 msgid "" "Default Teletext home page, usually 100. Valid values range from 100 to 899." msgstr "" "Pagina d'avvio predefinita del televideo, di solito 100. I valori validi " "variano da 100 a 899." #: ../zapping.schemas.in.h:8 msgid "Default Teletext home page." msgstr "Pagina d'avvio predefinita del televideo." #: ../zapping.schemas.in.h:9 msgid "" "Default background color of Closed Caption text (#RRGGBB), default #000000." msgstr "" #: ../zapping.schemas.in.h:10 msgid "" "Default foreground color of Closed Caption text (#RRGGBB), default #FFFFFF." msgstr "" #: ../zapping.schemas.in.h:11 msgid "Deinterlace option." msgstr "Opzioni del deinterlacciamento." #: ../zapping.schemas.in.h:12 msgid "Display delay of second field (0.0 to 1.0 of one frame period)." msgstr "" #: ../zapping.schemas.in.h:13 #, fuzzy msgid "" "Enable navigation elements in the bottom row of the Teletext page. Valid " "values: disabled, flof_top1 (FLOF or TOP style 1), flof_top2 (TOP style 2)." msgstr "" "Abilita gli elementi di navigazione nella riga in basso della pagina del " "televideo. Valori validi: [disabled, flof_top1 (FLOF or TOP style 1), " "flof_top2 (TOP style 2)]." #: ../zapping.schemas.in.h:14 msgid "Enable navigation elements." msgstr "Abilita elementi di navigazione." #: ../zapping.schemas.in.h:15 msgid "Enable smooth rolling of real time Closed Caption." msgstr "" #: ../zapping.schemas.in.h:16 msgid "Enables slow MMX and 3DNow! optimized functions for tests." msgstr "" #: ../zapping.schemas.in.h:17 msgid "Greedy (high motion) deinterlace test mode." msgstr "" #: ../zapping.schemas.in.h:18 msgid "Horizontal image resolution in deinterlace mode." msgstr "" #: ../zapping.schemas.in.h:19 msgid "Interpret the Teletext search text as regular expression." msgstr "" "Interpreta il testo di ricerca del Televideo come espressione regolare." #: ../zapping.schemas.in.h:20 msgid "Keep the main window above other windows." msgstr "Tieni la finestra principale sopra le altre finestre." #: ../zapping.schemas.in.h:21 msgid "Maximum number of networks in the Teletext page cache." msgstr "Massimo numero di reti nella cache delle pagine del televideo." #: ../zapping.schemas.in.h:22 msgid "Maximum size of the Teletext page cache in bytes." msgstr "Massima dimensione della cache delle pagine del televideo in byte." #: ../zapping.schemas.in.h:23 msgid "Pad Closed Caption text with spaces." msgstr "" #: ../zapping.schemas.in.h:24 msgid "" "Quality/speed trade-off when scaling and anti-aliasing Teletext pages. Valid " "values: nearest, tiles, bilinear, hyper." msgstr "" "Compromesso qualità/velocità quando scala e migliora la pagina. Valori " "validi: più vicino, tessere, bilineare, iper." #: ../zapping.schemas.in.h:25 #, fuzzy msgid "" "Quality/speed trade-off when scaling and anti-aliasing caption/subtitles. " "Valid values: nearest, tiles, bilinear, hyper." msgstr "" "Compromesso qualità/velocità quando scala e migliora la pagina. Valori " "validi: più vicino, tessere, bilineare, iper." #: ../zapping.schemas.in.h:26 msgid "Reverse the temporal field order." msgstr "" #: ../zapping.schemas.in.h:27 #, fuzzy msgid "Roll Teletext page numbers." msgstr " Pagina del Televideo %x" #: ../zapping.schemas.in.h:28 msgid "" "Roll the Teletext page number in the page header until the requested page " "has arrived." msgstr "" #: ../zapping.schemas.in.h:29 msgid "Search all channels in the Teletext page memory." msgstr "Cerca in tutti i canali nella memoria delle pagine del televideo." #: ../zapping.schemas.in.h:30 msgid "Show a menu bar in the main window." msgstr "Mostra una barra dei menu nella finestra principale." #: ../zapping.schemas.in.h:31 msgid "Show a status bar in Teletext windows." msgstr "Mostra una barra di stato nelle finestre del televideo." #: ../zapping.schemas.in.h:32 msgid "Show a toolbar in Teletext windows." msgstr "Mostra una barra degli strumenti nelle finestre del televideo." #: ../zapping.schemas.in.h:33 msgid "Show a toolbar in the main window." msgstr "Mostra una barra degli strumenti nella finestra principale." #: ../zapping.schemas.in.h:34 msgid "Show double height characters in Teletext subtitles." msgstr "" #: ../zapping.schemas.in.h:35 #, fuzzy msgid "" "Some stations fail to transmit a complete language identifier, so the " "Teletext viewer may not display the correct font or national characters. You " "can select your geographical region here as an additional hint. Valid " "values: western_and_central_europe, eastern_europe, " "western_europe_and_turkey, central_and_southeast_europe, cyrillic, " "greek_and_turkish, arabic, hebrew_and_arabic." msgstr "" "Alcune stazioni non trasmettono un identificatore di lingua completo, così " "il visualizzatore del Televideo non può visualizzare correttamente i " "caratteri nazionali. Puoi selezionare qui la tua regione geografica come " "aiuto addizionale." #: ../zapping.schemas.in.h:36 msgid "Switch to full capture size for screenshot." msgstr "Passa alla dimensione massima di cattura per le istantanee." #: ../zapping.schemas.in.h:37 msgid "Teletext implementation level." msgstr "Livello di implementazione del televideo." #: ../zapping.schemas.in.h:38 msgid "Teletext implementation level. Valid values: 1, 1.5, 2.5, 3.5." msgstr "" "Livello di implementazione del televideo. Valori validi: 1, 1.5, 2.5, 3.5." #: ../zapping.schemas.in.h:39 #, fuzzy msgid "Teletext page scaling quality." msgstr "Pagina successiva nella cronologia" #: ../zapping.schemas.in.h:40 msgid "Text brightness, valid values range from 0 to 255." msgstr "Luminosità del testo, valori validi variano da 0 a 255." #: ../zapping.schemas.in.h:41 msgid "Text contrast, valid values range from -128 to 127." msgstr "Contrasto del testo, valori validi variano da -128 a 127." #: ../zapping.schemas.in.h:42 msgid "The Teletext search is case insensitive." msgstr "La ricerca del televideo non distingue maiuscole/minuscole." #: ../zapping.schemas.in.h:43 msgid "" "This is the time in milliseconds Zapping will wait between pointer movements " "and blanking the pointer when over the video. A value of zero disables this " "feature." msgstr "" "Questo è il tempo in millisecondi durante il quale Zapping attenderà " "eventuali movimenti del puntatore e lo nasconderà quando si trova sul video. " "Un valore di zero disabilita questa funzione." #: ../zapping.schemas.in.h:44 msgid "Time to wait until blanking the pointer." msgstr "Tempo di attesa prima di nascondere il puntatore." #: ../zapping.schemas.in.h:45 msgid "Update the clock in the Teletext page header." msgstr "Aggiorna l'orologio nell'intestazione di ogni pagina del televideo." #: ../zapping.schemas.in.h:46 msgid "" "When your CPU is too slow to use the desired deinterlace mode you can reduce " "the horizontal resolution. Valid values: low, medium, high." msgstr "" "Quando la CPU è troppo lenta per poter usare la modalità di " "deinterlacciamento desiderata, puoi ridurre la risoluzione orizzontale. " "Valori validi: bassa, media, alta." #: ../zapping_setup_fb/zapping_setup_fb.c:136 #, c-format msgid "Device name %s is unsafe, contains dots." msgstr "Il nome del dispositivo %s non è sicuro, contiene puntini." #: ../zapping_setup_fb/zapping_setup_fb.c:144 #, c-format msgid "Device name %s is unsafe, does not begin with /dev/." msgstr "Il nome del dispositivo %s non è sicuro, non inizia per /dev/." #. TRANSLATORS: File name, error message. #: ../zapping_setup_fb/zapping_setup_fb.c:163 #, c-format msgid "Cannot open device %s. %s." msgstr "Impossibile aprire il dispositivo %s. %s." #. TRANSLATORS: File name, error message. #: ../zapping_setup_fb/zapping_setup_fb.c:178 #, c-format msgid "Cannot identify %s. %s." msgstr "Impossibile identificare %s: %s." #: ../zapping_setup_fb/zapping_setup_fb.c:190 #, c-format msgid "%s is not a device." msgstr "%s non è un dispositivo." #: ../zapping_setup_fb/zapping_setup_fb.c:204 #, c-format msgid "%s is not a video device." msgstr "%s non è un dispositivo video." #: ../zapping_setup_fb/zapping_setup_fb.c:218 #, c-format msgid "Cannot identify file descriptor %d. %s." msgstr "Impossibile identificare il descrittore di file %d. %s." #: ../zapping_setup_fb/zapping_setup_fb.c:229 #, c-format msgid "File descriptor %d is not a device." msgstr "Il descrittore di file %d non è un dispositivo." #: ../zapping_setup_fb/zapping_setup_fb.c:239 #, c-format msgid "File descriptor %d is not a video device." msgstr "Il descrittore di file %d non è un dispositivo video." #: ../zapping_setup_fb/zapping_setup_fb.c:254 #, c-format msgid "Internal error at %s:%u." msgstr "" #: ../zapping_setup_fb/zapping_setup_fb.c:273 #, c-format msgid "Cannot drop root privileges despite running with UID %d, EUID %d." msgstr "" #: ../zapping_setup_fb/zapping_setup_fb.c:303 #, c-format msgid "Cannot restore root privileges despite running with UID %d, EUID %d." msgstr "" #: ../zapping_setup_fb/zapping_setup_fb.c:396 msgid "No standard input, output or error file." msgstr "" #: ../zapping_setup_fb/zapping_setup_fb.c:449 #, c-format msgid "Invalid bpp argument %d. Expected 24 or 32." msgstr "Argomento %d non valido di bpp. Atteso 24 o 32." #: ../zapping_setup_fb/zapping_setup_fb.c:482 #, c-format msgid "Invalid device file descriptor %d." msgstr "" #: ../zapping_setup_fb/zapping_setup_fb.c:539 msgid "No screens found." msgstr "Nessuno schermo trovato." #: ../zapping_setup_fb/zapping_setup_fb.c:573 #, c-format msgid "Cannot open display %s." msgstr "Impossibile aprire il display %s." #: ../zapping_setup_fb/zapping_setup_fb.c:590 #, c-format msgid "Screen %d not found." msgstr "Schermo %d non trovato." #: ../zapping_setup_fb/zapping_setup_fb.c:598 #, c-format msgid "DMA is not possible on screen %d." msgstr "Il DMA non è possibile sullo schermo %d." #: ../zapping_setup_fb/zapping_setup_fb.c:614 #, c-format msgid "%s is not a V4L or V4L2 device." msgstr "%s non è un dispositivo V4L o V4L2." #: ../zapping_setup_fb/zapping_setup_fb.c:617 #, c-format msgid "File descriptor %d is not a V4L or V4L2 device." msgstr "Il descrittore di file %d non è un dispositivo V4L o V4L2." #: ../zapping_setup_fb/zapping_setup_fb.c:620 #, fuzzy msgid "Cannot identify the video capture device." msgstr "Impossibile identificare il descrittore di file %d. %s." #: ../zapping_setup_fb/zapping_setup_fb.h:56 #, fuzzy, c-format msgid "Ioctl %s failed: %s." msgstr "%s fallito." #: ../zapping_setup_fb/v4l.c:89 ../zapping_setup_fb/v4l25.c:91 msgid "The device does not support video overlay." msgstr "Il dispositivo non supporta l'overlay video." #~ msgid "Adaptive" #~ msgstr "Adaptive" #~ msgid "Blended Clip" #~ msgstr "Blended Clip" #~ msgid "Maximum motion" #~ msgstr "Maximum motion" #~ msgid "Composite mode" #~ msgstr "Composite mode" #~ msgid "Old Game" #~ msgstr "Old Game" #~ msgid "Unknown error in %s." #~ msgstr "Errore sconosciuto in %s." #~ msgid "VBI device to use" #~ msgstr "Dispositivo VBI" #~ msgid "DEVICE" #~ msgstr "DISPOSITIVO" #~ msgid "Zapzilla couldn't be started" #~ msgstr "Impossibile avviare Zapzilla" #~ msgid "Sorry, Zapzilla is unable to create the config tree" #~ msgstr "Spiacente, Zapzilla non può creare la configurazione" ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������zapping-0.10cvs6/po/nl.po��������������������������������������������������������������������������� 644 � 764 � 144 � 415070 10443535711 10446� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# Zapping Dutch translation -*- coding: utf-8 -*- # Copyleft (L) 2001 Ime Smits <ime@iae.nl> # Reviewed: Reinout van Schouwen <reinout@cs.vu.nl> # Adjusted: Guus Bonnema <abonnema@xs4all.nl> # msgid "" msgstr "" "Project-Id-Version: zapping 0.7\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2006-03-31 16:06+0200\n" "PO-Revision-Date: 2005-10-28 02:49+0200\n" "Last-Translator: Guus Bonnema <abonnema@xs4all.nl>\n" "Language-Team: Dutch\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #: ../glade/zapping.glade2.h:1 msgid "320x240" msgstr "320x240" #: ../glade/zapping.glade2.h:2 msgid "" "A format string describing the main window title when changing channels: " "$(alias), $(index), $(id), $(freq), $(standard) and $(input) are substituted " "by the respective values." msgstr "" "Een opmaaktekenreeks die aangeeft wat in de titelbalk van het hoofdvenster " "getoond moet worden:\n" "$(alias) - Zendernaam\n" "$(index) - Indexnummer in de zenderlijst\n" "$(id) - Kanaalnummer\n" "$(freq) - Frequentie\n" "$(standard) - Videostandaard\n" "$(input) - Input\n" "\n" "Deze waarden komen in de plaats van de variabelen (substitutie)." #: ../glade/zapping.glade2.h:3 msgid "Advanced" msgstr "Geavanceerd" #: ../glade/zapping.glade2.h:4 ../src/audio.c:829 ../src/audio.c:834 #: ../src/tveng.c:4830 msgid "Audio" msgstr "Audio" #: ../glade/zapping.glade2.h:5 msgid "Author:" msgstr "Auteur:" #: ../glade/zapping.glade2.h:6 msgid "Biggest noninterlaced (autodetect)" msgstr "Grootst mogelijk zonder interlace (automatisch)" # src/interface.c:405 #: ../glade/zapping.glade2.h:7 msgid "Canonical name:" msgstr "Programmanaam:" # src/interface.c:362 #: ../glade/zapping.glade2.h:8 msgid "Channel list number" msgstr "Kanaalnummer" #: ../glade/zapping.glade2.h:9 msgid "Choose a color" msgstr "Kies een kleur" #: ../glade/zapping.glade2.h:10 msgid "Chroma _key:" msgstr "" #: ../glade/zapping.glade2.h:11 msgid "Clean console" msgstr "Wis scherm" # src/interface.c:448 #: ../glade/zapping.glade2.h:12 msgid "Click here when you are done" msgstr "Klik hier indien voltooid" #: ../glade/zapping.glade2.h:13 msgid "Console" msgstr "Console" #: ../glade/zapping.glade2.h:14 #, fuzzy msgid "Copyright (C) 2000-2005 the contributors\n" msgstr "Copyright (C) 2000-2003 degenen die bijgedragen hebben\n" #: ../glade/zapping.glade2.h:16 msgid "Current controller:" msgstr "Huidige controller:" #: ../glade/zapping.glade2.h:17 msgid "DVB PES File" msgstr "DVB PES bestand" #: ../glade/zapping.glade2.h:18 msgid "DVB _PES File" msgstr "DVB _PES Bestand" #: ../glade/zapping.glade2.h:19 msgid "Device name:" msgstr "Appraatnaam:" #: ../glade/zapping.glade2.h:20 ../src/audio.c:839 #: ../src/properties-handler.c:1352 ../src/zvbi.c:2537 msgid "Devices" msgstr "Apparaten" #: ../glade/zapping.glade2.h:21 msgid "Disable _screensaver" msgstr "Uitzetten _screensaver" #: ../glade/zapping.glade2.h:22 msgid "Enter key" msgstr "Kies toets" #: ../glade/zapping.glade2.h:23 msgid "F_ont:" msgstr "F_ont: " #: ../glade/zapping.glade2.h:24 msgid "Favorite _picture sizes:" msgstr "Favoriete _picture formaat:" #: ../glade/zapping.glade2.h:25 msgid "General options" msgstr "Algemene opties" #: ../glade/zapping.glade2.h:26 msgid "Interlaced (window size)" msgstr "Interlaced (venstergrootte)" #: ../glade/zapping.glade2.h:27 msgid "Kernel VBI device" msgstr "Kernel VBI device (apparaat)" #: ../glade/zapping.glade2.h:28 msgid "Kernel _device" msgstr "Kernel _device (apparaat)" #: ../glade/zapping.glade2.h:29 ../src/keyboard.c:1149 msgid "Keyboard" msgstr "Toetsenbord" #: ../glade/zapping.glade2.h:30 msgid "Known key names" msgstr "Bekende toetsen" #: ../glade/zapping.glade2.h:31 msgid "Maximum capture size:" msgstr "Maximale opnamegrootte:" #: ../glade/zapping.glade2.h:32 msgid "Minimum capture size:" msgstr "Minimale opnamegrootte:" #: ../glade/zapping.glade2.h:33 msgid "Mute while ch_anging channels" msgstr "Onderdruk ruis tijdens _kanaalwisseling" #: ../glade/zapping.glade2.h:34 msgid "NTSC" msgstr "NTSC" #: ../glade/zapping.glade2.h:35 msgid "No Display" msgstr "Geen display" #: ../glade/zapping.glade2.h:36 msgid "OK, let's go on" msgstr "OK, doorgaan" #: ../glade/zapping.glade2.h:37 ../src/osd.c:1075 msgid "OSD" msgstr "OSD" #: ../glade/zapping.glade2.h:38 msgid "On Screen Display (OSD)" msgstr "On Screen Display (OSD)" #: ../glade/zapping.glade2.h:39 msgid "PAL" msgstr "PAL" #: ../glade/zapping.glade2.h:40 msgid "Plugin location" msgstr "Plugin locatie" #: ../glade/zapping.glade2.h:41 msgid "Plugin priority:" msgstr "Prioriteit:" #: ../glade/zapping.glade2.h:42 msgid "Plugin properties" msgstr "Plugin-eigenschappen" #: ../glade/zapping.glade2.h:43 msgid "Plugin version:" msgstr "Pluginversie:" #: ../glade/zapping.glade2.h:44 msgid "Properties" msgstr "Eigenschappen" # src/interface.c:362 #: ../glade/zapping.glade2.h:45 msgid "RF channel number" msgstr "RF kanaalnr" # src/v4l2interface.c:344ï #: ../glade/zapping.glade2.h:46 msgid "Remember this video standard" msgstr "Onthoud deze video standaard" #: ../glade/zapping.glade2.h:47 msgid "Remove all this mess" msgstr "Verwijder deze troep" #: ../glade/zapping.glade2.h:48 msgid "Run the plugin" msgstr "Plugin uitvoeren" #: ../glade/zapping.glade2.h:49 msgid "SECAM" msgstr "SECAM" # src/interface.c:247 #: ../glade/zapping.glade2.h:50 msgid "S_how toolbar as:" msgstr "Toon _knoppenbalk als: " #: ../glade/zapping.glade2.h:51 msgid "Save _control values per channel" msgstr "_Control waarden opslaan per kanaal" #: ../glade/zapping.glade2.h:52 msgid "Select OSD font" msgstr "Selecteer OSD lettertype" #: ../glade/zapping.glade2.h:53 msgid "Select the V4L device" msgstr "Video4Linux-apparaat kiezen" # src/interface.c:247 #: ../glade/zapping.glade2.h:54 msgid "Show _tooltips" msgstr "Toon _tooltips" #: ../glade/zapping.glade2.h:55 msgid "Status Bar" msgstr "Statusbalk" #: ../glade/zapping.glade2.h:56 msgid "Stop this plugin" msgstr "Stop deze plugin" #: ../glade/zapping.glade2.h:57 msgid "TV viewer for the Gnome environment" msgstr "Een TV viewer voor de Gnome omgeving" #: ../glade/zapping.glade2.h:58 msgid "" "The video capture device does not report the correct video standard, please " "select manually:" msgstr "" "Het video opname apparaat (device capture) komt niet met een geldige video " "standaard: graag met de hand aanpassen." #: ../glade/zapping.glade2.h:59 msgid "Title _bar contents:" msgstr "Inhoud titel _bar:" #: ../glade/zapping.glade2.h:60 ../src/zvbi.c:2532 msgid "VBI" msgstr "VBI" # src/v4l2interface.c:344 #: ../glade/zapping.glade2.h:61 ../src/main.c:200 #: ../src/properties-handler.c:1339 ../src/properties-handler.c:1347 msgid "Video" msgstr "Beeld" # src/v4l2interface.c:344ï #: ../glade/zapping.glade2.h:62 msgid "Video Standard" msgstr "Video standaard" #: ../glade/zapping.glade2.h:63 msgid "Video device capabilities" msgstr "Mogelijkheden van video-apparaat" #: ../glade/zapping.glade2.h:64 msgid "Window" msgstr "Window" #: ../glade/zapping.glade2.h:65 msgid "Zapping Preferences" msgstr "Zapping voorkeuren" #: ../glade/zapping.glade2.h:66 msgid "Zapping error console" msgstr "Zapping foutmeldingenscherm" #: ../glade/zapping.glade2.h:67 msgid "_Background color:" msgstr "_Achtergrondkleur" #: ../glade/zapping.glade2.h:68 msgid "_Capture size under XVideo:" msgstr "_Opnamegrootte met XVideo:" #: ../glade/zapping.glade2.h:69 msgid "_Command:" msgstr "_Commando:" #: ../glade/zapping.glade2.h:70 msgid "_Control volume with soundcard mixer" msgstr "_Control volume met soundcard mixer" #: ../glade/zapping.glade2.h:71 msgid "_Device file:" msgstr "_Apparaatbestand:" #: ../glade/zapping.glade2.h:72 msgid "_Display mode:" msgstr "_Display modus:" # src/v4l2interface.c:146 #: ../glade/zapping.glade2.h:73 msgid "_Enter channels by:" msgstr "_Voer kanalen in per:" #: ../glade/zapping.glade2.h:74 msgid "_Foreground color:" msgstr "_Voorgrond kleur:" #: ../glade/zapping.glade2.h:75 msgid "_Fullscreen video resolution:" msgstr "_Fullscreen video resolutie" #: ../glade/zapping.glade2.h:76 msgid "_Gnome sound daemon (ESD)" msgstr "G_nome geluid server (ESD)" #: ../glade/zapping.glade2.h:77 msgid "_KDE sound daemon (ARTS)" msgstr "_KDE geluid server (ARTS)" #: ../glade/zapping.glade2.h:78 msgid "_Mute on exit" msgstr "_Geluid uit bij afsluiten" #: ../glade/zapping.glade2.h:79 msgid "_No VBI services" msgstr "Geen VBI diensten" #: ../glade/zapping.glade2.h:80 msgid "_No audio recording" msgstr "_Geen audio opname" #: ../glade/zapping.glade2.h:81 msgid "_Remove after:" msgstr "Ve_rwijderen na:" #: ../glade/zapping.glade2.h:82 msgid "_Resize using fixed increments" msgstr "_Schalen in vaste stappen" #: ../glade/zapping.glade2.h:83 msgid "_Start Zapping muted" msgstr "_Zapping opstarten zonder geluid" #: ../glade/zapping.glade2.h:84 msgid "_Use VBI Proxy if available" msgstr "_gebruik VBI proxy, indien mogelijk" #: ../glade/zapping.glade2.h:85 msgid "seconds" msgstr "seconden" #: ../libvbi/exp-gfx.c:1483 msgid "Correct aspect ratio" msgstr "Corrigeer beeldverhouding" #: ../libvbi/exp-gfx.c:1484 msgid "" "Approach an image aspect ratio similar to a real TV. This will double the " "image size." msgstr "" "Een standaard TV (4:3) verhouding benaderen, hierdoor krijg je een dubbel " "beeldafmeting." #: ../libvbi/exp-gfx.c:1623 msgid "PPM" msgstr "_PPM" #: ../libvbi/exp-gfx.c:1624 msgid "Export this page as raw PPM image" msgstr "Exporteer deze pagina in (raw) PPM-formaat" #. XXX gettext encoding #: ../libvbi/exp-gfx.c:1824 ../libvbi/exp-html.c:532 ../libvbi/exp-sub.c:633 #: ../libvbi/exp-sub.c:764 ../libvbi/exp-sub.c:821 #, c-format msgid "Teletext Page %3x.%x" msgstr "Teletekst pagina %3x.%x" #: ../libvbi/exp-gfx.c:1828 ../libvbi/exp-html.c:535 ../libvbi/exp-sub.c:636 #: ../libvbi/exp-sub.c:767 ../libvbi/exp-sub.c:824 #, c-format msgid "Teletext Page %3x" msgstr "Teletekst pagina %3x" #: ../libvbi/exp-gfx.c:2019 msgid "PNG" msgstr "P_NG" #: ../libvbi/exp-gfx.c:2020 msgid "Export this page as PNG image" msgstr "Exporteren in PNG-formaat" #: ../libvbi/exp-html.c:110 ../libvbi/exp-txt.c:133 msgid "Graphics char" msgstr "Grafische tekens" #: ../libvbi/exp-html.c:111 ../libvbi/exp-txt.c:134 msgid "" "Replacement for block graphic characters: a single character or decimal (32) " "or hex (0x20) code" msgstr "" "Vervangingsteken voor blokgrafiektekens: een enkel teken of een decimale " "(32) ofhexadecimale (0x20) code" #: ../libvbi/exp-html.c:114 ../libvbi/exp-txt.c:137 msgid "ASCII art" msgstr "ASCII art" #: ../libvbi/exp-html.c:115 ../libvbi/exp-txt.c:138 msgid "Replace graphic characters by ASCII art" msgstr "Vervang grafische characters door ASCII art" #: ../libvbi/exp-html.c:117 msgid "Color (CSS)" msgstr "Kleur (stylesheet)" #: ../libvbi/exp-html.c:118 msgid "Store the page colors using CSS attributes" msgstr "De tekstkleur als stylesheet opslaan" #: ../libvbi/exp-html.c:120 msgid "HTML header" msgstr "HTML-kop" #: ../libvbi/exp-html.c:121 msgid "Include HTML page header" msgstr "HTML-kop invoegen" #. TRANSLATORS: lang=\"en\" refers to the page title #. "Teletext Page ...". Please specify "de", "fr", "es" #. etc. #: ../libvbi/exp-html.c:521 msgid "<title lang=\"en\">" msgstr "<title lang=\"nl\">" #: ../libvbi/exp-html.c:843 msgid "HTML" msgstr "_HTML" #: ../libvbi/exp-html.c:844 msgid "Export this page as HTML page" msgstr "Exporteren als HTML-pagina" #: ../libvbi/export.c:200 msgid "Write error." msgstr "Schrijf fout" #: ../libvbi/export.c:210 msgid "Out of memory." msgstr "Geheugentekort." #: ../libvbi/export.c:235 #, c-format msgid "Export module %s has no option %s." msgstr "Export module %s heeft geen optie %s." #: ../libvbi/export.c:295 #, c-format msgid "Invalid argument %s for option %s of export module %s." msgstr "Ongeldig argument %s voor optie %s van export module %s." #: ../libvbi/export.c:350 msgid "Unknown error." msgstr "Onbekende fout" #: ../libvbi/export.c:436 #, c-format msgid "Could not create %s. %s." msgstr "Kon '%s' niet aanmaken: %s" #: ../libvbi/export.c:1334 #, c-format msgid "Invalid option string \"%s\"." msgstr "Ongeldige optie string \"%s\"." #: ../libvbi/export.c:1438 #, c-format msgid "Unknown export module '%s'." msgstr "Onbekende export module '%s'." #: ../libvbi/export.c:1452 #, c-format msgid "Cannot initialize export module '%s', probably lack of memory." msgstr "" "Kan export module '%s' niet initialiseren. Waarschijnlijk geheugenprobleem." #: ../libvbi/export.c:1476 #, c-format msgid "Cannot initialize export module '%s', out of memory." msgstr "Kan export module '%s' niet initialiseren, geheugentekort." #: ../libvbi/exp-sub.c:124 ../libvbi/exp-txt.c:81 msgid "ASCII" msgstr "_ASCII" #: ../libvbi/exp-sub.c:125 ../libvbi/exp-txt.c:82 msgid "ISO-8859-1 (Latin-1 Western languages)" msgstr "ISO-8859-1 (Latin-1 Westerse talen)" #: ../libvbi/exp-sub.c:126 ../libvbi/exp-txt.c:83 msgid "ISO-8859-2 (Latin-2 Central and Eastern European languages)" msgstr "ISO-8859-2 (Latin-2 Centraal en Oost Europese talen)" #: ../libvbi/exp-sub.c:127 ../libvbi/exp-txt.c:84 msgid "ISO-8859-4 (Latin-3 Baltic languages)" msgstr "ISO8859-4 (Latin-3 Baltische talen)" #: ../libvbi/exp-sub.c:128 ../libvbi/exp-txt.c:85 msgid "ISO-8859-5 (Cyrillic)" msgstr "ISO-8859-5 (Cyrillisch)" #: ../libvbi/exp-sub.c:129 ../libvbi/exp-txt.c:86 msgid "ISO-8859-7 (Greek)" msgstr "ISO-8859-7 (Grieks)" #: ../libvbi/exp-sub.c:130 ../libvbi/exp-txt.c:87 msgid "ISO-8859-8 (Hebrew)" msgstr "ISO-8859-8 (Hebreeuws)" #: ../libvbi/exp-sub.c:131 ../libvbi/exp-txt.c:88 msgid "ISO-8859-9 (Turkish)" msgstr "ISO-8859-9 (Turks)" #: ../libvbi/exp-sub.c:132 ../libvbi/exp-txt.c:89 msgid "KOI8-R (Russian and Bulgarian)" msgstr "KOI8-R (Russisch en Bulgaars)" #: ../libvbi/exp-sub.c:133 ../libvbi/exp-txt.c:90 msgid "KOI8-U (Ukranian)" msgstr "KOI8-U (Ukrainsch)" #: ../libvbi/exp-sub.c:134 ../libvbi/exp-txt.c:91 msgid "ISO-10646/UTF-8 (Unicode)" msgstr "ISO-10646/UTF-8 (Unicode)" #. TRANSLATORS: Text export encoding (ASCII, Unicode, ...) menu #: ../libvbi/exp-sub.c:155 ../libvbi/exp-sub.c:165 ../libvbi/exp-txt.c:127 msgid "Encoding" msgstr "Codering" #: ../libvbi/exp-sub.c:171 msgid "Font face" msgstr "Font type" #. TRANSLATORS: #. Caption is an aid for the hearing impaired, #. subtitles for foreign language viewers. #: ../libvbi/exp-sub.c:1534 msgid "MPlayer caption/subtitle file" msgstr "MPlayer (sub)titel bestand" #. TRANSLATORS: #. Styles like bold, italic, underlined, etc. #. Justification to the left, right, centered. #: ../libvbi/exp-sub.c:1559 msgid "" "QuickTime Text caption/subtitle file preserving text styles, justification " "and color" msgstr "" "QuickTime Tekst (sub)titel bestand met behoud van tekst style, uitlijning en " "kleur" #: ../libvbi/exp-sub.c:1583 msgid "RealText caption/subtitle file preserving text styles and color" msgstr "RealText (sub)titel bestand met behoud van tekst style en kleur" #: ../libvbi/exp-sub.c:1606 msgid "" "SAMI 1.0 caption/subtitle file preserving text styles, justification and " "color" msgstr "" "SAMI 1.0 (sub)titel bestand met behoud van tekst style, uitlijning en kleur" #: ../libvbi/exp-sub.c:1630 msgid "SubRip caption/subtitle file" msgstr "SubRip (sub)titel bestand" #: ../libvbi/exp-sub.c:1652 msgid "SubViewer 2.x caption/subtitle file" msgstr "SubViewer 2.x (sub)titel bestand" #. TRANSLATORS: Terminal control codes menu #: ../libvbi/exp-txt.c:112 msgid "None" msgstr "geen" #: ../libvbi/exp-txt.c:113 msgid "ANSI X3.64 / VT 100" msgstr "ANSI X3.64 / VT 100" #: ../libvbi/exp-txt.c:114 msgid "VT 200" msgstr "VT 200" #: ../libvbi/exp-txt.c:140 msgid "Control codes" msgstr "Control codes" #: ../libvbi/exp-txt.c:1030 msgid "Text" msgstr "Tekst" #: ../libvbi/exp-txt.c:1031 msgid "Export this page as text file" msgstr "Exporteer deze pagina als tekstbestand" #: ../libvbi/exp-vtx.c:82 msgid "Can only export Teletext pages." msgstr "Kan alleen teletekstpaginas exporteren" #: ../libvbi/exp-vtx.c:89 msgid "Page is not cached." msgstr "Pagina is niet gecached" #: ../libvbi/exp-vtx.c:98 msgid "Cannot export this page, is not displayable." msgstr "Kan deze pagina niet exporteren (niet displayable)" #: ../libvbi/exp-vtx.c:135 msgid "VTX" msgstr "_VTX" #: ../libvbi/exp-vtx.c:136 msgid "" "Export this page as VTX file, the format used by VideoteXt and vbidecode" msgstr "" "Deze pagina als VTX-bestand exporteren, het formaat dat gebruikt wordt door " "VideoteXt en vbidecode" #: ../plugins/alirc/alirc.c:37 msgid "Another lirc plugin" msgstr "Een andere LIRC plugin" #: ../plugins/alirc/alirc.c:39 msgid "" "Another plugin to control zapping through lirc\n" "\n" "To enable this plugin you must edit your ~/.lircrc\n" "file. See the Zapping documentation for details.\n" msgstr "" "Nog een plugin om zapping via lirc te gebruiken\n" "Om dit te enablen moet je de ~/.lirc wijzigen.\n" "Bekijk de Zapping documentatie voor verdere aanwijzingen.\n" #: ../plugins/alirc/alirc.c:44 msgid "Lets you control zapping through lirc" msgstr "Bestuur Zapping met LIRC (Linux Infrared Remote Control)" #. hash collision code #. Warn #. hash collision code #. hash collision code #. Warn #: ../plugins/alirc/alirc.c:375 ../plugins/mpeg/mpeg.c:3026 #: ../plugins/screenshot/screenshot.c:1778 #, c-format msgid "Check error: \"%s\" in plugin %s has hash 0x%x vs. 0x%x" msgstr "Waarschuwing: \"%s\" in plugin %s heeft checksum 0x%x i.p.v. 0x%x" #: ../plugins/deinterlace/DI_GreedyH/DI_GreedyH.c:240 msgid "Max Comb" msgstr "Max Comb" #: ../plugins/deinterlace/DI_GreedyH/DI_GreedyH.c:246 msgid "Motion Threshold" msgstr "Bewegingsgrenswaarde" #: ../plugins/deinterlace/DI_GreedyH/DI_GreedyH.c:252 msgid "Motion Sense" msgstr "Bewegingssensor" #: ../plugins/deinterlace/DI_GreedyH/DI_GreedyH.c:258 msgid "Good PullDown Lvl" msgstr "Goed pulldown nivo" #: ../plugins/deinterlace/DI_GreedyH/DI_GreedyH.c:264 msgid "Bad PullDown Lvl" msgstr "Slecht pulldown nivo" #: ../plugins/deinterlace/DI_GreedyH/DI_GreedyH.c:270 #: ../plugins/deinterlace/DI_GreedyH/DI_GreedyH.c:318 msgid "H. Sharpness" msgstr "H. scherpte" #: ../plugins/deinterlace/DI_GreedyH/DI_GreedyH.c:276 #: ../plugins/deinterlace/DI_GreedyH/DI_GreedyH.c:312 msgid "V. Sharpness" msgstr "V. scherpte" #: ../plugins/deinterlace/DI_GreedyH/DI_GreedyH.c:282 #: ../plugins/deinterlace/DI_GreedyH/DI_GreedyH.c:306 msgid "Median Filter" msgstr "Median Filter" #: ../plugins/deinterlace/DI_GreedyH/DI_GreedyH.c:288 msgid "High Comb Skip" msgstr "High comb skip" #: ../plugins/deinterlace/DI_GreedyH/DI_GreedyH.c:294 msgid "Auto Pull-Down" msgstr "Auto pull-down" #: ../plugins/deinterlace/DI_GreedyH/DI_GreedyH.c:300 msgid "In-Between Frames" msgstr "Tussen-frames" #. size of this struct #. curr version compiled #: ../plugins/deinterlace/DI_GreedyH/DI_GreedyH.c:336 msgid "Video (Greedy, High Motion)" msgstr "Video (greedy, high motion)" #: ../plugins/deinterlace/DI_Misc/DI_Bob.c:150 msgid "Simple Bob" msgstr "Simple Bob" #: ../plugins/deinterlace/DI_Misc/DI_EvenOnly.c:123 msgid "Even Scanlines Only" msgstr "Alleen even scanregels" #: ../plugins/deinterlace/DI_Misc/DI_Greedy2Frame.c:258 msgid "Greedy 2 Frame Luma Threshold" msgstr "Greedy 2 frame Luma grenswaarde" #: ../plugins/deinterlace/DI_Misc/DI_Greedy2Frame.c:270 msgid "Greedy 2 Frame" msgstr "Greedy 2 frame" #: ../plugins/deinterlace/DI_Misc/DI_Greedy.c:235 msgid "Greedy Max Comb" msgstr "Greedy max comb" #: ../plugins/deinterlace/DI_Misc/DI_Greedy.c:246 msgid "Video (Greedy, Low Motion)" msgstr "Video (Greedy, Low Motion)" #: ../plugins/deinterlace/DI_Misc/DI_MoComp2.c:351 msgid "Video (MoComp2)" msgstr "Video (MoComp2)" #: ../plugins/deinterlace/DI_Misc/DI_OddOnly.c:125 msgid "Odd Scanlines Only" msgstr "Alleen oneven scanregels" #: ../plugins/deinterlace/DI_Misc/DI_ScalerBob.c:117 msgid "Scaler Bob" msgstr "Scaler Bob" #: ../plugins/deinterlace/DI_Misc/DI_TomsMoComp.c:955 msgid "Search Effort" msgstr "Zoek effort" #: ../plugins/deinterlace/DI_Misc/DI_TomsMoComp.c:961 msgid "Use Strange Bob" msgstr "Gebruik Strange Bob" #: ../plugins/deinterlace/DI_Misc/DI_TomsMoComp.c:972 msgid "Video (TomsMoComp)" msgstr "Video (TomsMoComp)" #: ../plugins/deinterlace/DI_Misc/DI_TwoFrame.c:317 msgid "2 Frame Spatial Tolerance" msgstr "2 Frame Spatial Tolerantie" #: ../plugins/deinterlace/DI_Misc/DI_TwoFrame.c:323 msgid "2 Frame Temporal Tolerance" msgstr "2 Frame Tijd tolerantie" #: ../plugins/deinterlace/DI_Misc/DI_TwoFrame.c:334 msgid "Video Deinterlace (2-Frame)" msgstr "Video deinterlace (2-frame)" #: ../plugins/deinterlace/DI_Misc/DI_VideoBob.c:237 msgid "Weave Edge Detect" msgstr "Weave edge detect" #: ../plugins/deinterlace/DI_Misc/DI_VideoBob.c:243 msgid "Weave Jaggie Threshold" msgstr "Weave jaggie grenswaarde" #: ../plugins/deinterlace/DI_Misc/DI_VideoBob.c:254 msgid "Video Deinterlace (Bob)" msgstr "Video deinterlacen (Bob)" #: ../plugins/deinterlace/DI_Misc/DI_VideoWeave.c:270 msgid "Temporal Tolerance" msgstr "Tijd tolerantie" #: ../plugins/deinterlace/DI_Misc/DI_VideoWeave.c:276 msgid "Spatial Tolerance" msgstr "Ruimtelijke tolerantie" #: ../plugins/deinterlace/DI_Misc/DI_VideoWeave.c:282 msgid "Similarity Threshold" msgstr "Overeenkomst grenswaarde" #: ../plugins/deinterlace/DI_Misc/DI_VideoWeave.c:293 msgid "Video Deinterlace (Weave)" msgstr "Video Deinterlace (Weave)" #: ../plugins/deinterlace/DI_Misc/DI_Weave.c:155 msgid "Simple Weave" msgstr "Simple weave" #: ../plugins/deinterlace/main.c:352 msgid "Could not start deinterlace plugin" msgstr "Kon deinterlace plugin niet starten" #: ../plugins/deinterlace/main.c:353 #, c-format msgid "Could not switch to capture format YUYV %u x %u." msgstr "Overgang naar capture formaat YUYV %u x %u lukte niet." #: ../plugins/deinterlace/main.c:447 msgid "Deinterlace" msgstr "Deinterlacen" #: ../plugins/deinterlace/main.c:454 ../plugins/mpeg/mpeg.c:2336 #: ../plugins/mpeg/mpeg.c:2956 ../plugins/screenshot/screenshot.c:522 #: ../plugins/screenshot/screenshot.c:1525 ../plugins/subtitle/main.c:55 #: ../plugins/teletext/main.c:212 msgid "Plugins" msgstr "Plugins" #: ../plugins/deinterlace/main.c:523 msgid "Deinterlace plugin" msgstr "Deinterlace plugin" #: ../plugins/deinterlace/preferences.c:48 ../src/plugin_properties.c:120 msgid "Low" msgstr "Laag" #: ../plugins/deinterlace/preferences.c:49 msgid "Medium" msgstr "Medium" #: ../plugins/deinterlace/preferences.c:50 ../src/plugin_properties.c:128 msgid "High" msgstr "Hoog" #: ../plugins/deinterlace/preferences.c:287 msgid "_Resolution:" msgstr "_Resolutie:" # src/frequencies.c:827 #. TRANSLATORS: Relative display duration of the first and #. second field in deinterlace mode. #: ../plugins/deinterlace/preferences.c:296 msgid "_Field Balance:" msgstr "_Field Balans:" #: ../plugins/deinterlace/preferences.c:708 ../src/eggcellrendererkeys.c:222 msgid "Disabled" msgstr "Uitgeschakeld" #: ../plugins/mpeg/mpeg.c:846 #, c-format msgid "Format %s is incomplete, please configure the video or audio codec." msgstr "Formaat %s is incompleet. De video of audio codec graag configureren." #: ../plugins/mpeg/mpeg.c:1156 #, c-format msgid "Cannot create file %s: %s\n" msgstr "Kan bestand '%s' niet aanmaken: %s\n" #: ../plugins/mpeg/mpeg.c:1726 ../plugins/mpeg/options.c:407 #: ../plugins/teletext/export.c:128 msgid "Options" msgstr "Opties" #: ../plugins/mpeg/mpeg.c:2150 msgid "New format" msgstr "Nieuw formaat" #: ../plugins/mpeg/mpeg.c:2151 msgid "Format name:" msgstr "Formaatnaam:" #: ../plugins/mpeg/mpeg.c:2336 ../plugins/mpeg/mpeg.c:2809 #: ../plugins/mpeg/mpeg.c:2837 ../plugins/mpeg/mpeg.c:2945 #: ../plugins/mpeg/mpeg_properties.glade2.h:7 msgid "Record" msgstr "Opnemen" #: ../plugins/mpeg/mpeg.c:2625 msgid "Not implemented yet" msgstr "Nog niet geimplementeerd" #: ../plugins/mpeg/mpeg.c:2802 msgid "Record a video stream" msgstr "Opnemen video stream" #: ../plugins/mpeg/mpeg.c:2887 msgid "Audio/Video Recorder" msgstr "Audio/Video recorder" #: ../plugins/mpeg/mpeg.c:2890 msgid "This plugin records video and audio into a file" msgstr "Deze plugin neemt beeld en geluid op als MPEG bestand" #: ../plugins/mpeg/mpeg.c:2893 msgid "Record video and audio." msgstr "Opnemen van beeld en geluid" #: ../plugins/mpeg/mpeg_properties.glade2.h:1 msgid "-" msgstr "-" #: ../plugins/mpeg/mpeg_properties.glade2.h:2 msgid "Capture _height:" msgstr "Opname _hoogte:" #: ../plugins/mpeg/mpeg_properties.glade2.h:3 msgid "Capture _width:" msgstr "Opname _breedte:" #: ../plugins/mpeg/mpeg_properties.glade2.h:4 msgid "Co_dec:" msgstr "Co_dec:" #: ../plugins/mpeg/mpeg_properties.glade2.h:5 #: ../plugins/screenshot/screenshot.glade2.h:3 msgid "Destination file" msgstr "Doelbestand" #: ../plugins/mpeg/mpeg_properties.glade2.h:6 msgid "Fil_e format" msgstr "_Bestandsformaat" #: ../plugins/mpeg/mpeg_properties.glade2.h:8 msgid "Record _all subtitles" msgstr "Opnemen van _alle subtitels" #: ../plugins/mpeg/mpeg_properties.glade2.h:9 msgid "Record this channel or _page:" msgstr "Neem deze _pagina of kanaal op" #: ../plugins/mpeg/mpeg_properties.glade2.h:10 msgid "Save _as:" msgstr "Opslaan _als:" #: ../plugins/mpeg/mpeg_properties.glade2.h:11 msgid "_Audio" msgstr "_Audio" #: ../plugins/mpeg/mpeg_properties.glade2.h:12 msgid "_Caption and Subtitles" msgstr "_Titels en ontertitels" #: ../plugins/mpeg/mpeg_properties.glade2.h:13 msgid "_Codec:" msgstr "_Codec:" #: ../plugins/mpeg/mpeg_properties.glade2.h:14 msgid "_Configure..." msgstr "_Configureren...." #: ../plugins/mpeg/mpeg_properties.glade2.h:15 msgid "_Delete" msgstr "_Verwijder" #: ../plugins/mpeg/mpeg_properties.glade2.h:16 msgid "_Embedded in the video file:" msgstr "_Ingebed in het video bestand:" #: ../plugins/mpeg/mpeg_properties.glade2.h:17 #: ../plugins/screenshot/screenshot.glade2.h:13 msgid "_Format:" msgstr "_Formaat: " #: ../plugins/mpeg/mpeg_properties.glade2.h:18 msgid "_New" msgstr "_Nieuw" #: ../plugins/mpeg/mpeg_properties.glade2.h:19 msgid "_No caption or subtitle recording" msgstr "_Geen opname van titel of ondertitel" #: ../plugins/mpeg/mpeg_properties.glade2.h:20 msgid "_Pause" msgstr "_Pause" #: ../plugins/mpeg/mpeg_properties.glade2.h:21 msgid "_Record" msgstr "_Opnemen" #: ../plugins/mpeg/mpeg_properties.glade2.h:22 msgid "_Record the displayed caption or subtitles" msgstr "_Opnemen van de getoonde (sub)titel" #: ../plugins/mpeg/mpeg_properties.glade2.h:23 msgid "_Stop" msgstr "_Stop" #: ../plugins/mpeg/mpeg_properties.glade2.h:24 msgid "_Subtitle file:" msgstr "Ondertitelingsbestand" #: ../plugins/mpeg/mpeg_properties.glade2.h:25 msgid "_Superimposed onto the picture" msgstr "_over het plaatje heen gelegd" #: ../plugins/mpeg/mpeg_properties.glade2.h:26 msgid "_Update live caption at line breaks" msgstr "_update live caption bij regeleinden" # src/v4l2interface.c:344 #: ../plugins/mpeg/mpeg_properties.glade2.h:27 ../src/zapping.c:500 msgid "_Video" msgstr "_Videobeeld" #: ../plugins/mpeg/options.c:741 msgid "No codec" msgstr "Geen codec" #: ../plugins/screenshot/screenshot.c:45 msgid "Screenshot saver" msgstr "Opslaan van screenshots" #: ../plugins/screenshot/screenshot.c:47 msgid "" "With this plugin you can take screen shots of the program you are watching " "and save them in various formats." msgstr "" "Met deze plugin kunt u screenshots maken van het huidige beeld in deverse " "formaten." #: ../plugins/screenshot/screenshot.c:50 msgid "This plugin takes screenshots of the video capture." msgstr "Deze plugin maakt screenshots van het videobeeld." #: ../plugins/screenshot/screenshot.c:517 #: ../plugins/screenshot/screenshot.c:542 #: ../plugins/screenshot/screenshot.c:1525 msgid "Screenshot" msgstr "Screenshot" #: ../plugins/screenshot/screenshot.c:547 msgid "Take a screenshot" msgstr "Maak een screenshot" #: ../plugins/screenshot/screenshot.c:684 #: ../plugins/screenshot/screenshot.c:842 msgid "Error while writing screenshot\n" msgstr "Fout bij het schrijven van een screenshot\n" #: ../plugins/screenshot/screenshot.c:892 msgid "Saving..." msgstr "Bezig met opslaan..." # src/tveng.c:70 #: ../plugins/screenshot/screenshot.c:919 #, c-format msgid "" "Sorry, but I cannot write %s\n" "%s" msgstr "" "Er is een fout opgetreden tijdens het wegschrijven. %s\n" "%s" #: ../plugins/screenshot/screenshot.c:953 msgid "Sorry, not enough resources to create a new thread" msgstr "Onvoldoende systeembronnen voor het starten van een nieuwe taak" #: ../plugins/screenshot/screenshot.c:958 msgid "There are too many threads" msgstr "Er zijn te veel actieve taken" #: ../plugins/screenshot/screenshot.c:1147 #, c-format msgid "appx %u KB" msgstr "ca %u KB" #: ../plugins/screenshot/screenshot.c:1150 #, c-format msgid "appx %.2f MB" msgstr "ca %.2f MB" #: ../plugins/screenshot/screenshot.c:1225 #: ../plugins/screenshot/screenshot.c:1369 msgid "This format has no quality option" msgstr "Dit formaat kent geen kwaliteitsoptie" #: ../plugins/screenshot/screenshot.c:1405 msgid "Only useful with full size, unscaled picture (480 or 576 lines)" msgstr "" "Alleen bruikbaar in volledig formaat, \\\"unscaled\\\" beeld (480 of 576 " "lijnen)" #: ../plugins/screenshot/screenshot.glade2.h:1 msgid "Backward" msgstr "Teruggaand" #: ../plugins/screenshot/screenshot.glade2.h:2 msgid "Command to execute after the image has been saved" msgstr "Uit te voeren command zodra het image gesaved is." #: ../plugins/screenshot/screenshot.glade2.h:4 msgid "Forward" msgstr "Voorwaarts" #: ../plugins/screenshot/screenshot.glade2.h:5 msgid "Grab full size image" msgstr "Pak volledig image formaat" #: ../plugins/screenshot/screenshot.glade2.h:6 msgid "Off" msgstr "Uit" #: ../plugins/screenshot/screenshot.glade2.h:7 msgid "Preview" msgstr "Preview" #: ../plugins/screenshot/screenshot.glade2.h:8 ../plugins/teletext/view.c:2767 msgid "S_ubtitles" msgstr "S_ubtitels" #: ../plugins/screenshot/screenshot.glade2.h:9 msgid "Save Screenshot" msgstr "Bewaar screenshot" #: ../plugins/screenshot/screenshot.glade2.h:10 msgid "_Add toolbar button" msgstr "Voeg knop toe _aan knoppenbalk" #: ../plugins/screenshot/screenshot.glade2.h:11 msgid "_Completion command:" msgstr "Afmaaak _Commando:" #: ../plugins/screenshot/screenshot.glade2.h:12 msgid "_Deinterlace:" msgstr "_Deinterlacen" #: ../plugins/screenshot/screenshot.glade2.h:14 msgid "_Grab on clicking OK" msgstr "Bewaar beeld (_Grab) bij kiezen van OK" #: ../plugins/screenshot/screenshot.glade2.h:15 msgid "_Quality:" msgstr "_Kwaliteit: " #: ../plugins/screenshot/screenshot.glade2.h:16 msgid "_Save as:" msgstr "Opslaan _als:" #: ../plugins/screenshot/screenshot.glade2.h:17 msgid "_Skip" msgstr "_Overslaan" #: ../plugins/screenshot/screenshot.glade2.h:18 msgid "pictures before grabbing" msgstr "beelden voor grabben" #: ../plugins/subtitle/main.c:47 ../src/main.c:199 msgid "Subtitles" msgstr "Ondertiteling" #: ../plugins/subtitle/main.c:89 msgid "Subtitle plugin" msgstr "Ondertitel plugin" #: ../plugins/subtitle/preferences.c:55 ../plugins/teletext/preferences.c:57 msgid "Western and Central Europe" msgstr "West- en Midden-Europa" # src/frequencies.c:821 #: ../plugins/subtitle/preferences.c:56 ../plugins/teletext/preferences.c:58 msgid "Eastern Europe" msgstr "Oost-Europa" #: ../plugins/subtitle/preferences.c:57 ../plugins/teletext/preferences.c:59 msgid "Western Europe and Turkey" msgstr "West-Europa en Turkije" #: ../plugins/subtitle/preferences.c:58 ../plugins/teletext/preferences.c:60 msgid "Central and Southeast Europe" msgstr "Midden- en Zuid Europa" #: ../plugins/subtitle/preferences.c:59 ../plugins/teletext/preferences.c:61 msgid "Cyrillic" msgstr "Cyrillisch" #: ../plugins/subtitle/preferences.c:60 ../plugins/teletext/preferences.c:62 msgid "Greek and Turkish" msgstr "Grieks en Turks" #: ../plugins/subtitle/preferences.c:61 ../plugins/teletext/preferences.c:63 msgid "Arabic" msgstr "Arabisch" #: ../plugins/subtitle/preferences.c:62 ../plugins/teletext/preferences.c:64 msgid "Hebrew and Arabic" msgstr "Hebreeuws en Arabisch" #: ../plugins/subtitle/preferences.c:77 ../plugins/teletext/preferences.c:97 msgid "Nearest (fast, low quality)" msgstr "Nearest (snel, lage kwaliteit)" #: ../plugins/subtitle/preferences.c:78 ../plugins/teletext/preferences.c:98 msgid "Tiles" msgstr "Overlappend" #: ../plugins/subtitle/preferences.c:79 ../plugins/teletext/preferences.c:99 msgid "Bilinear" msgstr "Bilineair" #: ../plugins/subtitle/preferences.c:80 ../plugins/teletext/preferences.c:100 msgid "Hyper (slow, high quality)" msgstr "Hyper (slow, hoge kwaliteit)" #: ../plugins/subtitle/preferences.c:345 msgid "<b>Teletext</b>" msgstr "<b>Teletekst</b>" #: ../plugins/subtitle/preferences.c:347 ../plugins/teletext/preferences.c:303 msgid "_Default encoding:" msgstr "Default codering:" #: ../plugins/subtitle/preferences.c:351 msgid "" "Some stations fail to transmit a complete language identifier, so the " "Subtitle viewer may not display the correct font or national characters. You " "can select your geographical region here as an additional hint." msgstr "" "Sommige zenders geven geen volledige taalcode mee, waardoor het mogelijk is " "dat teletekst niet de juiste lettertypen of vreemde tekens toont. Voer hier " "de geografische regio in om te gebruiken als extra hint." #: ../plugins/subtitle/preferences.c:358 msgid "_Show double height characters" msgstr "_Toon dubbele hoogte karakters" #. TRANSLATORS: #. Closed Caption is a captioning system used mainly in the USA, #. and on VHS/LD/DVD in other countries. Europe uses Teletext for #. caption and subtitle transmissions. #: ../plugins/subtitle/preferences.c:365 msgid "<b>Closed Caption</b>" msgstr "<b>Closed Caption</b>" #: ../plugins/subtitle/preferences.c:367 msgid "_Foreground:" msgstr "_Voorgrond" #: ../plugins/subtitle/preferences.c:369 msgid "Closed Caption foreground color" msgstr "Closed Caption voorgrondkleur" #: ../plugins/subtitle/preferences.c:372 msgid "_Background:" msgstr "_Achtergrond:" #: ../plugins/subtitle/preferences.c:374 msgid "Closed Caption background color" msgstr "Closed Caption achtergrondkleur" #: ../plugins/subtitle/preferences.c:383 msgid "_Roll live caption" msgstr "_Rol live (sub)titels" #: ../plugins/subtitle/preferences.c:386 ../plugins/teletext/preferences.c:368 msgid "<b>Display</b>" msgstr "<b>Weergave</b>" #: ../plugins/subtitle/preferences.c:388 ../plugins/teletext/preferences.c:370 msgid "_Brightness:" msgstr "_Brightness" # src/interface.c:247 #: ../plugins/subtitle/preferences.c:410 ../plugins/teletext/preferences.c:392 msgid "_Contrast:" msgstr "_Contrast:" #: ../plugins/subtitle/preferences.c:432 ../plugins/teletext/preferences.c:414 msgid "S_caling:" msgstr "S-chaling:" #: ../plugins/subtitle/preferences.c:436 ../plugins/teletext/preferences.c:418 msgid "Quality/speed trade-off when scaling and anti-aliasing the page." msgstr "" "Kwaliteit/snelheid afweging bij het schalen en gebruik van anti-aliasing op " "de pagina." #: ../plugins/subtitle/view.c:1660 ../src/subtitle.c:321 msgid "_Disable" msgstr "Uitschakelen" #: ../plugins/subtitle/view.c:1662 msgid "_Reset position" msgstr "_Reset positie" #: ../plugins/subtitle/view.c:1664 ../plugins/teletext/window.c:810 msgid "_Encoding" msgstr "_Encodering" #: ../plugins/teletext/bookmark.c:283 #, c-format msgid "Added page %x.%02x to bookmarks" msgstr "Toegevoegd %x, %02x aan bookmarks" #: ../plugins/teletext/bookmark.c:287 #, c-format msgid "Added page %x to bookmarks" msgstr "Pagina %x toegevoegd aan bookmarks" #: ../plugins/teletext/bookmark.c:348 msgid "_Add Bookmark" msgstr "_Toevoegen Bladwijzers" #: ../plugins/teletext/bookmark.c:354 msgid "_Edit Bookmarks..." msgstr "_Bladwijzers bewerken..." #: ../plugins/teletext/bookmark.c:595 msgid "Bookmarks" msgstr "Bladwijzers" # src/interface.c:362 # glade/glade_strings.c:148, glade/glade_strings.c:153 #: ../plugins/teletext/bookmark.c:634 msgid "Channel" msgstr "Kanaal" #: ../plugins/teletext/bookmark.c:640 msgid "Page" msgstr "Pagina" #: ../plugins/teletext/bookmark.c:645 msgid "Description" msgstr "Beschrijving" #: ../plugins/teletext/export.c:168 ../plugins/teletext/export.c:194 msgid "Could not save page" msgstr "Kon pagina niet saven" #: ../plugins/teletext/export.c:239 msgid "Save as" msgstr "Opslaan als:" #: ../plugins/teletext/export.c:257 msgid "Format:" msgstr "Formaat: " #: ../plugins/teletext/main.c:176 msgid "_Preferences" msgstr "_Preferenties" #: ../plugins/teletext/main.c:178 msgid "_Colors" msgstr "_Kleuren" #: ../plugins/teletext/main.c:204 ../src/main.c:198 msgid "Teletext" msgstr "Teletekst" #: ../plugins/teletext/main.c:277 msgid "Teletext plugin" msgstr "Teletekst plugin" #: ../plugins/teletext/preferences.c:79 msgid "Level 1" msgstr "Level 1" #: ../plugins/teletext/preferences.c:80 msgid "Level 1.5 (additional national characters)" msgstr "Level 1.5 (extra vreemde tekens)" #: ../plugins/teletext/preferences.c:81 msgid "Level 2.5 (more colors, font styles and graphics)" msgstr "Level 2.5 (meer kleur, lettertypen en figuren)" #: ../plugins/teletext/preferences.c:82 msgid "Level 3.5 (proportional spacing, multicolor graphics)" msgstr "Level 3.5 (proportionele letters, meerkleurige figuren)" #: ../plugins/teletext/preferences.c:295 msgid "<b>General</b>" msgstr "<b>Algemeen</b>" #: ../plugins/teletext/preferences.c:297 msgid "_Teletext implementation:" msgstr "_Teletekstprotocol:" #: ../plugins/teletext/preferences.c:307 msgid "" "Some stations fail to transmit a complete language identifier, so the " "Teletext viewer may not display the correct font or national characters. You " "can select your geographical region here as an additional hint." msgstr "" "Sommige zenders geven geen volledige taalcode mee, waardoor het mogelijk is " "dat teletekst niet de juiste lettertypen of vreemde tekens toont. Voer hier " "de geografische regio in om te gebruiken als extra hint." #: ../plugins/teletext/preferences.c:313 msgid "<b>Page memory</b>" msgstr "<b>Page geheugen</b>" #: ../plugins/teletext/preferences.c:315 msgid "_Size:" msgstr "_Grootte:" #. expand #. fill #. pad #. TRANSLATORS: Kilobyte (2^10) #: ../plugins/teletext/preferences.c:341 msgid "KiB" msgstr "KiB" # src/interface.c:362 #: ../plugins/teletext/preferences.c:348 msgid "_Channels:" msgstr "_Kanalen" #: ../plugins/teletext/search.c:131 ../plugins/teletext/search.c:349 msgid "Search text:" msgstr "Zoek tekst:" #: ../plugins/teletext/search.c:153 #, c-format msgid "Found text on page %x.%02x:" msgstr "Text gevonden op pagina %x. %02x:" #: ../plugins/teletext/search.c:160 msgid "Not found:" msgstr "Niet gevonden" #: ../plugins/teletext/search.c:171 msgid "Page memory is empty" msgstr "Geheugen pagina is leeg" #: ../plugins/teletext/search.c:342 ../plugins/teletext/view.c:3260 msgid "Search page memory" msgstr "Zoek page geheugen:" #: ../plugins/teletext/search.c:358 msgid "_Regular expression" msgstr "Reguliere expressie" #: ../plugins/teletext/search.c:363 msgid "Search case _insensitive" msgstr "Hoofdletterongevoelig" # src/v4l2interface.c:146 #. Future stuff. #: ../plugins/teletext/search.c:369 msgid "_All channels" msgstr "_Alle kanalen" #: ../plugins/teletext/toolbar.c:122 msgid "Next page" msgstr "Volgende pagina" #: ../plugins/teletext/toolbar.c:125 msgid "Previous page" msgstr "Vorige pagina" #: ../plugins/teletext/toolbar.c:128 msgid "Previous subpage" msgstr "Vorige subpagina" #: ../plugins/teletext/toolbar.c:131 msgid "Next subpage" msgstr "Volgende subpagina" #: ../plugins/teletext/toolbar.c:188 msgid "Open new Teletext window" msgstr "Open in nieuw venster" #: ../plugins/teletext/toolbar.c:210 msgid "Hold the current subpage" msgstr "Huidige subpagina vastzetten" #: ../plugins/teletext/toolbar.c:240 msgid "Reveal" msgstr "Onthullen" #: ../plugins/teletext/toolbar.c:241 msgid "Reveal concealed text" msgstr "Toon verborgen text" #: ../plugins/teletext/view.c:846 #, c-format msgid " Page %x" msgstr "Pagina %x" #: ../plugins/teletext/view.c:850 #, c-format msgid " Subpage %x" msgstr " Subpagina %x" #: ../plugins/teletext/view.c:1459 #, c-format msgid "Loading page %X..." msgstr "Laden van pagina %X..." #: ../plugins/teletext/view.c:1461 #, c-format msgid "Loading page %X.%02X..." msgstr "Laden pagina %X. %02X..." #: ../plugins/teletext/view.c:2372 msgid "Selection copied to clipboard" msgstr "Selectie gekopiëerd naar klembord" #: ../plugins/teletext/view.c:2454 msgid "No page loaded" msgstr "Geen pagina geladen" #: ../plugins/teletext/view.c:2467 msgid "Selecting - press Shift key for table mode" msgstr "Selecteren - voor table mode shift ingedrukt houden" #: ../plugins/teletext/view.c:2627 msgid "Subtitle index" msgstr "Ondertitelingsindex" #: ../plugins/teletext/view.c:2634 msgid "Now and Next" msgstr "Nu en straks" #: ../plugins/teletext/view.c:2640 msgid "Current program" msgstr "Huidige programma" #: ../plugins/teletext/view.c:2646 msgid "Program Index" msgstr "Programma-index" #: ../plugins/teletext/view.c:2652 msgid "Program Schedule" msgstr "Programma-overzicht" #. TRANSLATORS: Schedule changes and the like. #: ../plugins/teletext/view.c:2660 msgid "Program Warning" msgstr "Waarschuwing" #: ../plugins/teletext/view.c:2721 msgid "_Open" msgstr "_Open" #: ../plugins/teletext/view.c:2727 msgid "Open in _New Window" msgstr "Open in _nieuwe venster" #: ../plugins/teletext/view.c:2738 msgid "_Open Link" msgstr "_Open link" #: ../plugins/teletext/view.c:2749 ../plugins/teletext/window.c:805 msgid "_New Window" msgstr "_Nieuwe window" #: ../plugins/teletext/view.c:2755 msgid "_Save as..." msgstr "Op_slaan als ..." #: ../plugins/teletext/view.c:2761 msgid "S_earch..." msgstr "_Zoeken..." #: ../plugins/teletext/view.c:2773 ../plugins/teletext/window.c:812 #: ../src/zapping.c:497 msgid "_Bookmarks" msgstr "_Bladwijzers" #: ../plugins/teletext/view.c:3252 msgid "_Go" msgstr "_Ga naar" #: ../plugins/teletext/view.c:3254 msgid "Previous page in history" msgstr "Terug" #: ../plugins/teletext/view.c:3256 msgid "Next page in history" msgstr "Vooruit" #: ../plugins/teletext/view.c:3257 msgid "Index" msgstr "Inhoud" #: ../plugins/teletext/view.c:3258 msgid "Go to the index page" msgstr "Ga naar de indexpagina" #: ../plugins/teletext/view.c:3262 msgid "Save this page to a file" msgstr "Sla deze pagina op als bestand" #. TRANSLATORS: Choose from the Teletext page cache the currently #. received channel. #: ../plugins/teletext/window.c:317 msgid "_Received" msgstr "_Ontvangen" #: ../plugins/teletext/window.c:349 ../src/v4linterface.c:1317 #: ../src/v4linterface.c:2520 msgid "Unnamed" msgstr "Unbenoemd" #: ../plugins/teletext/window.c:571 ../src/zvbi.c:221 msgid " (Latin)" msgstr " (Latin)" #: ../plugins/teletext/window.c:573 ../src/zvbi.c:223 msgid " (Cyrillic)" msgstr " (Cyrillisch)" #: ../plugins/teletext/window.c:616 ../src/zvbi.c:238 msgid "_Automatic" msgstr "_Automatisch" #: ../plugins/teletext/window.c:804 ../src/zapping.c:428 msgid "_File" msgstr "_Bestand" #: ../plugins/teletext/window.c:808 ../src/zapping.c:436 msgid "_Edit" msgstr "Be_werken" # src/v4l2interface.c:344 #: ../plugins/teletext/window.c:809 ../src/zapping.c:443 msgid "_View" msgstr "Beel_d" # src/interface.c:362 #. 2.6 GTK_STOCK_EDIT #: ../plugins/teletext/window.c:811 ../src/zapping.c:441 ../src/zapping.c:454 msgid "_Channels" msgstr "_Kanalen" # src/v4l2interface.c:344 #: ../plugins/teletext/window.c:871 ../src/zapping.c:476 msgid "_Toolbar" msgstr "_Toetsenbalk" #: ../plugins/teletext/window.c:873 msgid "_Statusbar" msgstr "_Statusbalk" #. TRANSLATORS: Soundcard mixer line. #: ../src/audio.c:807 msgid "Input:" msgstr "Input:" #: ../src/audio.c:840 ../src/keyboard.c:1154 ../src/osd.c:1080 #: ../src/properties.c:991 ../src/properties-handler.c:1353 msgid "General Options" msgstr "Algemene opties" #: ../src/audio.c:939 msgid "<span foreground=\"blue\">Audio off</span>" msgstr "<span foreground=\"blue\">geluid uit</span>" #: ../src/audio.c:940 msgid "<span foreground=\"yellow\">Audio on</span>" msgstr "<span foreground=\"yellow\">geluid aan</span>" #: ../src/capture.c:866 msgid "Cannot stop capturing while recording." msgstr "Kan niet stoppen met capture tijdens de opname." #: ../src/capture.c:1052 #, c-format msgid "Cannot start capturing: %s" msgstr "Kan opnemen niet beginnen: %s" #: ../src/channel_editor.c:592 #, c-format msgid "Channel: %s Found: %u" msgstr "Kanaal: %s Gevonden: %u" #: ../src/channel_editor.c:715 msgid "Searching..." msgstr "Bezig met zoeken..." # src/interface.c:336 #: ../src/channel_editor.c:1452 msgid "Select the frequency table used in your country" msgstr "Kies de frequentietabel die gebruikt wordt in uw regio" #: ../src/channel_editor.c:1596 msgid "Ch. Name" msgstr "Kanaalnaam" # src/interface.c:369 # glade/glade_strings.c:149, glade/glade_strings.c:155 #: ../src/channel_editor.c:1601 msgid "Freq (MHz)" msgstr "Freq (MHz)" # src/interface.c:362 #. append #: ../src/channel_editor.c:1654 msgid "Channel name" msgstr "Kanaalnaam:" #. append #: ../src/channel_editor.c:1658 msgid "Video input" msgstr "Video ingang" # src/interface.c:362 # glade/glade_strings.c:148, glade/glade_strings.c:153 #. append #: ../src/channel_editor.c:1662 msgid "RF Channel" msgstr "RF Kanaal" # src/v4l2interface.c:344ï #. append #: ../src/channel_editor.c:1666 msgid "Video standard" msgstr "Video standaard" #. append #: ../src/channel_editor.c:1670 ../src/keyboard.c:444 msgid "Accelerator" msgstr "Sneltoets" #: ../src/channel_editor.c:1685 msgid "Do not change input" msgstr "Ingang niet veranderen" #: ../src/channel_editor.c:1709 msgid "Do not change standard" msgstr "Standaard niet veranderen" # src/interface.c:362 #: ../src/channel_editor.c:1748 msgid "Channel editor" msgstr "Kanaal editor" #: ../src/channel_editor.c:1772 msgid "Region" msgstr "Regio" #: ../src/channel_editor.c:1808 msgid "Automatic station _search" msgstr "Automatisch _zenderzoeken" #: ../src/channel_editor.c:1814 msgid "" "Select a suitable frequency table, then click here to search through all " "channels in the table and add the received stations to the channel list." msgstr "" "Gelieve een passende frequentietabel te selecteren en daarna hier te klikken " "om alle kanalen in de tabel af te zoeken en de gevonden stations toe te " "voegen aan het kanaal-overzicht." # src/v4l2interface.c:146 #: ../src/channel_editor.c:1820 msgid "Add all _channels" msgstr "_Alle kanalen toevoegen" #: ../src/channel_editor.c:1827 msgid "Add all channels in the frequency table to the channel list." msgstr "Alle kanalen uit de tabel als voorkeuzekanalen opslaan." #: ../src/channel_editor.c:1831 msgid "_Import XawTV configuration" msgstr "_importeer XawTV configuratie" # src/interface.c:362 #: ../src/channel_editor.c:1858 msgid "Channel List" msgstr "Kanaal lijst" # src/interface.c:362 #: ../src/channel_editor.c:1893 msgid "Edit channel" msgstr "Kies kanaal" #: ../src/channel_editor.c:1910 msgid "Name:" msgstr "Naam:" #: ../src/channel_editor.c:1919 msgid "Video input:" msgstr "Video ingang:" #: ../src/channel_editor.c:1930 msgid "Fine tuning:" msgstr "Fijn afstelling: " #: ../src/channel_editor.c:1936 msgid "MHz" msgstr "MHz" # src/v4l2interface.c:344ï #: ../src/channel_editor.c:1947 msgid "Video standard:" msgstr "Video standaard:" #: ../src/channel_editor.c:1958 msgid "Accelerator:" msgstr "Sneltoets:" #: ../src/eggcellrendererkeys.c:163 ../src/eggcellrendererkeys.c:164 msgid "Accelerator key" msgstr "Sneltoets" #: ../src/eggcellrendererkeys.c:173 ../src/eggcellrendererkeys.c:174 msgid "Accelerator modifiers" msgstr "Sneltoets modifiers" #: ../src/eggcellrendererkeys.c:183 msgid "Accelerator Mode" msgstr "Versneller mode" #: ../src/eggcellrendererkeys.c:184 msgid "The type of accelerator." msgstr "Het type versneller (accelerator)" #: ../src/eggcellrendererkeys.c:333 ../src/eggcellrendererkeys.c:567 msgid "Type a new accelerator, or press Backspace to clear" msgstr "" "Voer een nieuwe versneller (accelerator) in,\n" "of druk op backspace om weg te halen" #: ../src/eggcellrendererkeys.c:570 msgid "Type a new accelerator" msgstr "Type een nieuwe Sneltoets" #: ../src/frequencies.c:94 ../src/frequencies.c:160 msgid "broadcast" msgstr "omroepen" #: ../src/frequencies.c:107 msgid "cable IRC" msgstr "IRC kabel" #: ../src/frequencies.c:126 msgid "cable HRC" msgstr "HRC kabel" # src/frequencies.c:817 #: ../src/frequencies.c:144 ../src/frequencies.c:172 msgid "cable" msgstr "kabel" #. TRANSLATORS: Leave "Autocom" untranslated. #: ../src/frequencies.c:275 msgid "Autocom cable" msgstr "Autocom kabel" #: ../src/keyboard.c:89 ../src/keyboard.c:112 msgid "Ctrl+" msgstr "Ctrl+" #: ../src/keyboard.c:90 ../src/keyboard.c:113 msgid "Alt+" msgstr "Alt+" #: ../src/keyboard.c:91 ../src/keyboard.c:114 msgid "Shift+" msgstr "Shift+" #: ../src/keyboard.c:525 msgid "Key table..." msgstr "Toetsen tabel ..." #: ../src/keyboard.c:1106 msgid "Command" msgstr "Commando" #: ../src/keyboard.c:1120 ../src/properties-handler.c:801 msgid "Shortcut" msgstr "Sneltoets" #: ../src/main.c:197 ../src/tveng1.c:1358 ../src/tveng25.c:566 #: ../src/tvengbktr.c:414 ../src/tveng.c:2340 ../src/tvengxv.c:878 msgid "Mute" msgstr "Geluid uit" #. warnings #: ../src/main.c:273 ../src/main.c:308 #, c-format msgid "" "Capture mode couldn't be started:\n" "%s" msgstr "" "Opnamemodus kon niet gestart worden:\n" "%s" #: ../src/main.c:291 #, c-format msgid "" "Cannot restore previous mode, will try capture mode:\n" "%s" msgstr "" "Herstellen van vorige modus mislukt, ga opname mode proberen:\n" "%s" #: ../src/main.c:299 #, c-format msgid "" "Capture mode couldn't be started either:\n" "%s" msgstr "" "Opnamemodus kon ook niet gestart worden:\n" "%s" #: ../src/main.c:302 #, c-format msgid "" "Cannot restore previous mode:\n" "%s" msgstr "" "Herstellen van vorige modus mislukt:\n" "%s" #: ../src/main.c:376 msgid "Kernel video device" msgstr "Kernel video device" #: ../src/main.c:377 msgid "FILENAME" msgstr "bestandsnaam" #: ../src/main.c:388 ../src/main.c:406 msgid "XVideo video input port" msgstr "XVideo video input poort" #: ../src/main.c:397 msgid "XVideo image overlay port" msgstr "XVideo beeld overlay port" #: ../src/main.c:415 msgid "Disable XVideo video input support" msgstr "XVideo input support uitschakelen" #: ../src/main.c:424 msgid "Disable XVideo image overlay support" msgstr "XVideo image overlay support uitschakelen" #: ../src/main.c:433 msgid "Disable XVideo extension support" msgstr "XVideo-extensies uitschakelen" #: ../src/main.c:445 msgid "Disable video overlay" msgstr "Schakel video overlay uit" #: ../src/main.c:454 msgid "X display is remote, disable video overlay" msgstr "X display is remote, disable video overlay" #: ../src/main.c:463 msgid "Disable VBI support" msgstr "VBI-ondersteuning uitschakelen" #: ../src/main.c:472 msgid "Disable plugins" msgstr "Plugins uitschakelen" #. TRANSLATORS: --no-zsfb command line option. #. TRANSLATORS: --yuv-format command line option. #. TRANSLATORS: --tunerless-norm command line option. #: ../src/main.c:486 ../src/main.c:550 ../src/main.c:560 msgid "Obsolete" msgstr "Verouderd" #: ../src/main.c:504 msgid "Color depth of the X display" msgstr "Kleurendiepte beeld" #: ../src/main.c:505 msgid "BPP" msgstr "BPP" #: ../src/main.c:513 msgid "Print debug messages" msgstr "activeren debugberichten" #: ../src/main.c:531 msgid "Force dword alignment of the overlay window" msgstr "Forceer dword layout van overlayvenster" #: ../src/main.c:540 msgid "Execute the given command and exit" msgstr "Voer commando uit en verlaat programma" #: ../src/main.c:541 msgid "CMD" msgstr "CMD" #: ../src/main.c:569 msgid "Override CPU detection" msgstr "Overschrijf CPU detectie" #: ../src/main.c:658 msgid "Sorry, but there is no module support in GLib" msgstr "Sorry, GLib heeft geen modulesupport" # src/callbacks.c:320 src/v4l2interface.c:89 #: ../src/main.c:782 msgid "Cannot get device info struct" msgstr "Kan device struct info niet opvragen" #: ../src/main.c:791 msgid "Zapping couldn't be started" msgstr "Zapping starten lukt niet" #: ../src/main.c:845 #, c-format msgid "Couldn't open %s, try other devices?" msgstr "Kon %s niet openen - andere devices proberen?" #: ../src/main.c:872 #, c-format msgid "%s suceeded, setting it as the new default" msgstr "%s succesvol, opgeslagen als nieuwe standaardwaarde" #: ../src/main.c:882 #, c-format msgid "" "Sorry, but \"%s\" could not be opened:\n" "%s" msgstr "" "Sorry, \"%s\" kon niet worden geopend:\n" "%s" #: ../src/main.c:1242 #, c-format msgid "" "ZConf could not be closed properly , your\n" "configuration will be lost.\n" "Possible causes for this are:\n" " - There is not enough free memory\n" " - You do not have permissions to write to $HOME/.zapping\n" " - libxml is non-functional (?)\n" " - or, more probably, you have found a bug in\n" " %s. Please contact the author.\n" msgstr "" "ZConf kon niet worden opgeslagen, de huidige\n" "configuratie zal verloren gaan.\n" "Mogelijke oorzaken:\n" " - Onvoldoende geheugen\n" " - $HOME/.zapping is niet schrijfbaar\n" " - libxml functioneert niet (?)\n" " - of, waarschijnlijker, je hebt een fout in\n" " %s gevonden. Neem contact op met de auteur.\n" #: ../src/main.c:1268 msgid "Sorry, Zapping is unable to create the config tree" msgstr "Zapping kon het configuratiebestand niet aanmaken" #: ../src/mixer.c:103 msgid "The soundcard mixer is not configured." msgstr "De soundcard mixer is niet ingesteld." #: ../src/osd.c:601 msgid "Please choose a font for OSD in preferences." msgstr "Kies aub een font voor OSD in voorkeuren" #: ../src/osd.c:604 #, c-format msgid "" "The configured font \"%s\" cannot be loaded, please select another one in " "preferences\n" msgstr "" "De gekozen font \"%s\" kan niet geladen worden, selecteer s.v.p.een andere \n" "in voorkeuren\n" #: ../src/osd.c:614 msgid "" "No font could be loaded, please make sure\n" "your system is properly configured." msgstr "" "Er kon geen enkel font geladen worden. \n" "Controleer s.v.p. of het systeem correct geconfigureerd is." # src/frequencies.c:827 #: ../src/oss.c:186 msgid "Audio device:" msgstr "Geluid-apparaat:" #: ../src/oss.c:189 msgid "Select the audio device" msgstr "Selecteer gewenste audio-apparaat" #: ../src/oss.c:216 #, c-format msgid "The given audio device \"%s\" doesn't exist" msgstr "Het gegeven apparaat (device) \"%s\" bestaat niet" #. TRANSLATORS: Name of mixer line, mono as #. opposed to stereo. #: ../src/oss.c:920 #, c-format msgid "%s (Mono)" msgstr "%s Mono" #: ../src/plugin_properties.c:118 msgid "Very low" msgstr "Zeer laag" #: ../src/plugin_properties.c:122 msgid "Lower" msgstr "Lager" #: ../src/plugin_properties.c:124 msgid "Normal" msgstr "Normaal" #: ../src/plugin_properties.c:126 msgid "Very high" msgstr "Zeer hoog" #: ../src/plugin_properties.c:130 msgid "Higher" msgstr "Hoger" #: ../src/plugin_properties.c:152 msgid "This plugin has no public symbols" msgstr "Deze plugin heeft geen public symbols" #: ../src/plugin_properties.c:171 msgid "List of symbols exported by the plugin" msgstr "Lijst met door de plugin geëxporteerde symbolen" #: ../src/plugin_properties.c:213 msgid "Sorry, the plugin couldn't be started" msgstr "Sorry, de plugin wilde niet starten" #: ../src/plugin_properties.c:273 msgid "Sorry, but no plugins have been loaded" msgstr "Er zijn nog geen plugins geladen" #: ../src/plugin_properties.c:308 msgid "Plugin name" msgstr "Pluginnaam" #: ../src/plugin_properties.c:335 msgid "Symbol" msgstr "Symbool" #: ../src/plugin_properties.c:340 msgid "Hash" msgstr "Checksum" #: ../src/plugins.c:190 #, c-format msgid "\"%s\" doesn't provide a version" msgstr "\"%s\" heeft geen versienummer" #: ../src/plugins.c:227 msgid "Insufficient memory" msgstr "Onvoldoende geheugen" #: ../src/plugins.c:236 msgid "No description available" msgstr "[Omschrijving ontbreekt]" #. Warn #: ../src/plugins.c:350 #, c-format msgid "" "Check error: \"%s\" in plugin %s was supposed to be \"%s\" but it is:\"%s\". " "Hashes are 0x%x vs. 0x%x" msgstr "" "Controlefout: \"%s\" in plugin %s moet \"%s\" zijn maar is: \"%s\". " "Controlegetallen zijn 0x%x vs. 0x%x" #: ../src/properties.c:622 msgid "Zapping Properties" msgstr "Zapping eigenschappen" #: ../src/properties-handler.c:86 msgid "Can capture to memory.\n" msgstr "Kan beelden opslaan in geheugen.\n" #: ../src/properties-handler.c:88 msgid "Has some tuner.\n" msgstr "Heeft een tuner.\n" #: ../src/properties-handler.c:90 msgid "Supports the teletext service.\n" msgstr "Teletekstondersteuning.\n" #: ../src/properties-handler.c:92 msgid "Can overlay the image.\n" msgstr "Overlayondersteuning.\n" #: ../src/properties-handler.c:94 msgid "Can chromakey the image.\n" msgstr "Chromakey-ondersteuning.\n" #: ../src/properties-handler.c:96 msgid "Clipping rectangles are supported.\n" msgstr "Ondersteunt clipping.\n" #: ../src/properties-handler.c:98 msgid "Framebuffer memory is overwritten.\n" msgstr "Framebuffergegeugen is overschreven.\n" #: ../src/properties-handler.c:100 msgid "The capture can be scaled.\n" msgstr "Ondersteunt schaling.\n" #: ../src/properties-handler.c:102 msgid "Only monochrome is available\n" msgstr "Alleen monochroom\n" #: ../src/properties-handler.c:104 msgid "The capture can be zoomed\n" msgstr "Zoomen is mogelijk\n" # src/v4l2interface.c:344 #: ../src/properties-handler.c:115 msgid "No available inputs" msgstr "Geen input beschikbaar" #: ../src/properties-handler.c:117 msgid "Your video device has no inputs" msgstr "video-apparaat heeft geen input" #: ../src/properties-handler.c:132 msgid "TV input" msgstr "TV ingang" #: ../src/properties-handler.c:134 msgid "Camera" msgstr "Camera" #: ../src/properties-handler.c:413 #, c-format msgid "Resize to %ux%u" msgstr "Schalen naar %ux%u" #. append #: ../src/properties-handler.c:778 msgid "Width" msgstr "Breedte" #: ../src/properties-handler.c:778 msgid "Height" msgstr "Hoogte" #: ../src/properties-handler.c:892 msgid "Text Below Icons" msgstr "Tekst onder pictogrammen" #: ../src/properties-handler.c:893 msgid "Priority Text Beside Icons" msgstr "Prioriteitstekst naast pictogrammen" #: ../src/properties-handler.c:894 msgid "Icons Only" msgstr "Alleen pictogrammen" #: ../src/properties-handler.c:895 msgid "Text Only" msgstr "Aleen tekst" #: ../src/properties-handler.c:960 #, c-format msgid "Use desktop default (%s)" msgstr "Bureaubladstandaard (%s) gebruiken" #. TRANSLATORS: Fullscreen video mode #: ../src/properties-handler.c:1160 msgid "Do not change" msgstr "Niet aanpassen" #: ../src/properties-handler.c:1164 ../src/tveng.c:4841 msgid "Automatic" msgstr "Automatisch" #. TRANSLATORS: Fullscreen video mode #: ../src/properties-handler.c:1179 #, c-format msgid "%u x %u @ %u Hz" msgstr "%u x %u @ %u Hz" #: ../src/properties-handler.c:1344 msgid "Main Window" msgstr "Hoofdvenster" #: ../src/subtitle.c:258 #, c-format msgid "Page %x" msgstr "Pagina %x" #: ../src/tveng1.c:1419 msgid "Frame Rate" msgstr "Frame snelheid (rate)" #: ../src/tveng1.c:1434 msgid "Snapshot Mode" msgstr "Snapshot mode" #: ../src/tveng1.c:2571 ../src/tveng25.c:1490 #, c-format msgid "Driver %s returned an unknown or invalid frame buffer format." msgstr "" #: ../src/tveng25.c:547 ../src/tvengbktr.c:383 ../src/tvengbktr.c:400 #: ../src/tvengxv.c:872 msgid "Brightness" msgstr "Helderheid" # src/interface.c:247 #: ../src/tveng25.c:548 ../src/tvengbktr.c:385 ../src/tvengbktr.c:402 #: ../src/tvengxv.c:873 msgid "Contrast" msgstr "Contrast" #: ../src/tveng25.c:549 ../src/tvengbktr.c:387 ../src/tvengbktr.c:404 #: ../src/tvengxv.c:874 msgid "Saturation" msgstr "Verzadiging" #: ../src/tveng25.c:550 ../src/tvengbktr.c:393 ../src/tvengbktr.c:412 #: ../src/tvengxv.c:875 msgid "Hue" msgstr "Kleur" #: ../src/tveng25.c:551 msgid "Whiteness" msgstr "Witniveau" #: ../src/tveng25.c:552 msgid "Black level" msgstr "Zwartniveau" # src/frequencies.c:827 #: ../src/tveng25.c:553 ../src/tveng25.c:554 msgid "White balance" msgstr "Witbalans" # src/frequencies.c:827 #: ../src/tveng25.c:555 msgid "Red balance" msgstr "Roodbalans" # src/frequencies.c:827 #: ../src/tveng25.c:556 msgid "Blue balance" msgstr "Blauwbalans" #: ../src/tveng25.c:557 msgid "Gamma" msgstr "Gamma" #: ../src/tveng25.c:558 msgid "Exposure" msgstr "Belichting" #: ../src/tveng25.c:559 msgid "Auto gain" msgstr "Auto gain" #: ../src/tveng25.c:560 msgid "Gain" msgstr "Versterking" #: ../src/tveng25.c:561 msgid "HCenter" msgstr "Horizontaal centreren" #: ../src/tveng25.c:562 msgid "VCenter" msgstr "Verticaal centreren" #: ../src/tveng25.c:563 msgid "Hor. flipping" msgstr "Hor. spiegelbeeld" #: ../src/tveng25.c:564 msgid "Vert. flipping" msgstr "Vert. spiegelbeeld" #: ../src/tveng25.c:565 ../src/tveng.c:2327 ../src/tvengxv.c:879 msgid "Volume" msgstr "Volume" #: ../src/tveng25.c:567 msgid "Audio Mute" msgstr "Geluid uit" # src/frequencies.c:827 #: ../src/tveng25.c:568 msgid "Balance" msgstr "Balance" # src/frequencies.c:827 #: ../src/tveng25.c:569 msgid "Audio Balance" msgstr "Audio balans" #: ../src/tveng25.c:570 msgid "Treble" msgstr "Treble" #: ../src/tveng25.c:571 msgid "Loudness" msgstr "Geluidsniveau" #: ../src/tveng25.c:572 msgid "Bass" msgstr "Bass" #: ../src/tveng25.c:2745 #, c-format msgid "%s doesn't look like a valid capture device" msgstr "%s lijkt geen video-apparaat te zijn" # src/tveng.c:70 #: ../src/tveng25.c:2764 #, c-format msgid "Sorry, but \"%s\" cannot do streaming" msgstr "\"%s\" ondersteunt geen streaming" #: ../src/tvengbktr.c:390 msgid "U/V Gain" msgstr "U/V Versterking" #: ../src/tvengbktr.c:407 msgid "U Saturation" msgstr "U Verzadiging" #: ../src/tvengbktr.c:409 msgid "V Saturation" msgstr "V Verzadiging" #: ../src/tveng.c:3214 #, fuzzy, c-format msgid "Cannot execute %s. Pipe error." msgstr "" "Kan '%s' niet uitvoeren. \n" "%s." #: ../src/tveng.c:3221 ../src/tveng.c:3253 #, fuzzy, c-format msgid "Cannot execute %s. %s." msgstr "" "Kan '%s' niet uitvoeren. \n" "%s." #. TRANSLATORS: Program name, error message. #: ../src/tveng.c:3231 #, c-format msgid "" "%s failed.\n" "%s" msgstr "" "%s mislukt. \n" "%s" #. Something executed, but it wasn't #. zapping_setup_fb. Perhaps consolehelper #. couldn't authenticate the user? #: ../src/tveng.c:3243 #, fuzzy, c-format msgid "Cannot execute %s. No permission?" msgstr "" "Kan '%s' niet uitvoeren. \n" "%s." #: ../src/tveng.c:3352 #, fuzzy, c-format msgid "Cannot determine current overlay parameters. %s" msgstr "Kan de huidige videostandaard van %s (%s) niet uitlezen ofactiveren.\n" #. TRANSLATORS: Program name. #: ../src/tveng.c:3361 #, fuzzy, c-format msgid "%s did not work as expected." msgstr "%s is geen device (apparaat)." #: ../src/tveng.c:3466 #, c-format msgid "%s not found in %s or the executable search path." msgstr "%s niet gevonden in %s of in executable search path." #: ../src/tveng.c:4848 msgid "Mono" msgstr "Mono" #: ../src/tveng.c:4855 msgid "Stereo" msgstr "Stereo" #: ../src/tveng.c:4863 msgid "Language 2" msgstr "Taal 2" #: ../src/tvengxv.c:876 msgid "Color" msgstr "Kleur" #: ../src/tvengxv.c:877 msgid "Interlace" msgstr "Interlacen" # src/v4l2interface.c:139 #: ../src/tvengxv.c:918 msgid "No" msgstr "Nee" #: ../src/tvengxv.c:919 msgid "Yes" msgstr "Ja" #: ../src/tvengxv.c:920 msgid "Doublescan" msgstr "Dubbelscan" #. TRANSLATORS: In controls box, color picker control, #. something like "Adjust Chroma-Key" for overlay. #: ../src/v4linterface.c:452 #, c-format msgid "Adjust %s" msgstr "%s bijregelen" #: ../src/v4linterface.c:621 ../src/zapping.c:466 msgid "Controls" msgstr "Regelpanelen" #: ../src/v4linterface.c:1308 ../src/zmisc.c:1811 msgid "Unknown" msgstr "Onbekend" #: ../src/v4linterface.c:1326 msgid "No input" msgstr "Geen input" # src/v4l2interface.c:344ï #: ../src/v4linterface.c:1337 msgid "No standard" msgstr "Geen standaard" # src/v4l2interface.c:344ï #: ../src/v4linterface.c:2410 msgid "Video standards" msgstr "Video standaards" #: ../src/v4linterface.c:2430 msgid "Audio inputs" msgstr "Audio inputs" #: ../src/v4linterface.c:2450 msgid "Video inputs" msgstr "Video invoer" # src/v4l2interface.c:146 #. TRANSLATORS: This is displayed in the channel menu when #. the channel list is empty. #: ../src/v4linterface.c:2548 msgid "No channels" msgstr "Geen kanalen" #: ../src/zapping.c:439 msgid "P_lugins" msgstr "P_lugins" #: ../src/zapping.c:444 ../src/zapping.c:485 msgid "_Window" msgstr "_Venster" #: ../src/zapping.c:446 ../src/zapping.c:487 msgid "_Fullscreen" msgstr "_Beeldvullend" #: ../src/zapping.c:448 ../src/zapping.c:489 msgid "_Background" msgstr "_Achtergrond" #: ../src/zapping.c:450 msgid "_Overlay mode" msgstr "Overlappende modus" #: ../src/zapping.c:452 msgid "_Capture mode" msgstr "_Capture mode" #: ../src/zapping.c:455 msgid "_Help" msgstr "_Hulp" #: ../src/zapping.c:456 msgid "_Contents" msgstr "_Inhoud" #: ../src/zapping.c:458 msgid "_About" msgstr "In_fo" #: ../src/zapping.c:461 msgid "Appearance" msgstr "Beeld" #: ../src/zapping.c:462 msgid "Ch. Up" msgstr "kanaal hoger" # src/interface.c:362 #: ../src/zapping.c:463 msgid "Switch to higher channel" msgstr "Ga naar hoger kanaal" #: ../src/zapping.c:464 msgid "Ch. Down" msgstr "Kanaal lager" #: ../src/zapping.c:465 msgid "Switch to lower channel" msgstr "Ga naar lager kanaal" #: ../src/zapping.c:467 msgid "Change picture controls" msgstr "Wijzig beeldinstellingen" #: ../src/zapping.c:472 msgid "_Mute" msgstr "_Zonder geluid" #: ../src/zapping.c:473 msgid "Switch audio on or off" msgstr "Aan- en uitschakelen van geluid" #: ../src/zapping.c:474 msgid "Menu" msgstr "Menu" #: ../src/zapping.c:478 ../src/zapping.c:1092 msgid "Keep window on top" msgstr "Houdt venster bovenop andere vensters" #: ../src/zapping.c:496 ../src/zapping.c:498 msgid "_Teletext" msgstr "_Teletekst" #: ../src/zapping.c:499 msgid "Activate Teletext mode" msgstr "Activeer teletekstvenster" #: ../src/zapping.c:501 msgid "Return to video mode" msgstr "Terug naar video mode" #: ../src/zapping.c:502 msgid "_New Teletext View" msgstr "_Nieuw teletekstvenster" #: ../src/zapping.c:508 ../src/zapping.c:513 msgid "_Subtitles" msgstr "_Ontertitels" #: ../src/zapping.c:514 msgid "Switch subtitles on or off" msgstr "Aan- en uitschakelen subtitels" #: ../src/zapping.c:1090 msgid "Show menu and toolbar" msgstr "Toon menu en knoppenbalk" #: ../src/zmisc.c:662 msgid "Could not switch to capture mode" msgstr "Overgang naar capture formaat lukte niet." #: ../src/zmisc.c:684 ../src/zmisc.c:702 msgid "Could not switch to overlay mode" msgstr "Overgang naar overlay mode mislukt" #: ../src/zmisc.c:685 ../src/zmisc.c:737 msgid "Video overlay has been disabled." msgstr "Video overlay is uitgeschakeld" #: ../src/zmisc.c:718 msgid "Could not switch to Teletext mode" msgstr "Kon niet naar teletekst mode overschakelen" #: ../src/zmisc.c:719 msgid "VBI has been disabled, or it doesn't work." msgstr "VBI is uitgeschakeld of functioneert niet correct." #: ../src/zmisc.c:736 ../src/zmisc.c:765 msgid "Could not switch to fullscreen mode" msgstr "Kon niet naar fullscreen mode overschakelen" #: ../src/zmisc.c:1031 msgid "Hide the statusbar" msgstr "Verberg de statusbalk" #: ../src/zmisc.c:1243 #, c-format msgid "%s is not a directory." msgstr "%s is geen directory" #: ../src/zmisc.c:1285 msgid "Could not create directory" msgstr "Kon directory niet aanmaken" #: ../src/zmisc.c:1286 #, c-format msgid "" "Could not create %s.\n" "%s" msgstr "" "Kon '%s' niet aanmaken: \n" "%s" #: ../src/zmisc.c:2006 msgid "Device:" msgstr "Device:" #: ../src/zmisc.c:2007 msgid "Driver:" msgstr "Driver" #: ../src/zmisc.c:2008 msgid "Device file:" msgstr "Apparaatbestand:" #: ../src/zmisc.c:2354 #, c-format msgid "Overwrite %s?" msgstr "%s overschrijven?" #: ../src/zmisc.c:2359 msgid "_Overwrite" msgstr "_Overschrijven" #: ../src/zmisc.c:2367 #, c-format msgid "%s is a directory." msgstr "%s is een directory" #: ../src/zmisc.c:2382 #, c-format msgid "%s is a special file" msgstr "%s is een speciale file" #: ../src/zmisc.c:2386 msgid "Continue" msgstr "Continueer" #: ../src/zmisc.c:2664 msgid "Could not open help file" msgstr "Kon help file niet openen" #: ../src/zmisc.c:2697 msgid "Could not open URL" msgstr "Kon URL niet openen" #: ../src/zspinslider.c:306 ../src/zspinslider.c:310 msgid "Reset" msgstr "Resetten" #: ../src/zvbi.c:1044 #, c-format msgid " %s: Teletext Page %x" msgstr " %s: Teletekst pagina %x" #: ../src/zvbi.c:1047 #, c-format msgid " Teletext Page %x" msgstr " Teletekst pagina %x" #: ../src/zvbi.c:1048 msgid "Open this page with Zapzilla" msgstr "Open deze pagina met Zapzilla" #: ../src/zvbi.c:1434 msgid "PES file read error" msgstr "PES bestand leesfout" #: ../src/zvbi.c:1653 msgid "VBI interface timeout" msgstr "VBI-interface timeout" #: ../src/zvbi.c:1685 msgid "VBI interface: Failed to read from the device" msgstr "VBI-interface: Leesfout" #: ../src/zvbi.c:1763 ../src/zvbi.c:2006 ../src/zvbi.c:2114 msgid "VBI initialization failed" msgstr "initialisatie van VBI mislukt" #: ../src/zvbi.c:2060 msgid "Cannot open PES file" msgstr "Kon PES file niet openen" #: ../src/zvbi.c:2115 #, c-format msgid "%s is no VBI device." msgstr "%s is geen VBI-apparaat." #: ../zapping.desktop.in.h:1 msgid "Lets you watch TV in a window" msgstr "Laat je TV kijken in een window" #: ../zapping.desktop.in.h:2 msgid "Zapping TV Viewer" msgstr "Zapping TV Tuner" #: ../zapping.schemas.in.h:1 msgid "Adds spaces around words in Closed Caption text to improve legibility." msgstr "" "Voegt spaties toe rond woorden in Closed Caption om de leesbaarheid te " "vergroten." #: ../zapping.schemas.in.h:2 msgid "Caption/subtitle scaling quality." msgstr "(Sub)titel schaal kwaliteit." #: ../zapping.schemas.in.h:3 msgid "Closed Caption default background color." msgstr "Closed Caption achtergrondkleur." #: ../zapping.schemas.in.h:4 msgid "Closed Caption default foreground color." msgstr "Closed Caption voorgrondkleur." #: ../zapping.schemas.in.h:5 msgid "Color for chroma-key overlay (#RRGGBB), default #FFCCCC." msgstr "" #: ../zapping.schemas.in.h:6 msgid "Default Teletext character set." msgstr "standaard teletekst karakterset." #: ../zapping.schemas.in.h:7 msgid "" "Default Teletext home page, usually 100. Valid values range from 100 to 899." msgstr "Teletext home page, normaliter 100. Pagina's mogelijk van 100 tot 899." #: ../zapping.schemas.in.h:8 msgid "Default Teletext home page." msgstr "Standaard teletekst home page" #: ../zapping.schemas.in.h:9 msgid "" "Default background color of Closed Caption text (#RRGGBB), default #000000." msgstr "" "Default achtergrond kleur van Closed Caption tekst (#RRGGBB), default " "#000000." #: ../zapping.schemas.in.h:10 msgid "" "Default foreground color of Closed Caption text (#RRGGBB), default #FFFFFF." msgstr "" "Default voorgrond kleur van Closed Caption text (#RRGGBB), default #FFFFFF." #: ../zapping.schemas.in.h:11 msgid "Deinterlace option." msgstr "Deinterlace optie" #: ../zapping.schemas.in.h:12 msgid "Display delay of second field (0.0 to 1.0 of one frame period)." msgstr "Toon de vertraging van het 2e veld (0.0 - 1.0 van één frame periode)." #: ../zapping.schemas.in.h:13 msgid "" "Enable navigation elements in the bottom row of the Teletext page. Valid " "values: disabled, flof_top1 (FLOF or TOP style 1), flof_top2 (TOP style 2)." msgstr "" "Maak navigatie elementen in de laatste rij van de TT pagina. Toegestane " "waarden: disabled, flof_top1 (FLOF of TOP style 1), flof_top2 (TOP style 2)." #: ../zapping.schemas.in.h:14 msgid "Enable navigation elements." msgstr "Inschakelen navigatie elementen." #: ../zapping.schemas.in.h:15 msgid "Enable smooth rolling of real time Closed Caption." msgstr "Inschakelen soepel scrollen van real time Closed Caption." #: ../zapping.schemas.in.h:16 msgid "Enables slow MMX and 3DNow! optimized functions for tests." msgstr "Enable vertraagt MMX en 3DNow! geoptimaliseerde functies voor tests." #: ../zapping.schemas.in.h:17 msgid "Greedy (high motion) deinterlace test mode." msgstr "Gretige deinterlace (veel beweging) test mode" #: ../zapping.schemas.in.h:18 msgid "Horizontal image resolution in deinterlace mode." msgstr "Horizontale beeldresulutie in deinterlace mode." #: ../zapping.schemas.in.h:19 msgid "Interpret the Teletext search text as regular expression." msgstr "Interpreteer de teletekst zoektekst als een reguliere expressie." #: ../zapping.schemas.in.h:20 msgid "Keep the main window above other windows." msgstr "Houdt het hoofdvenster bovenaan." #: ../zapping.schemas.in.h:21 msgid "Maximum number of networks in the Teletext page cache." msgstr "Maximaal aantal netwerken in de teletext pagina cache." #: ../zapping.schemas.in.h:22 msgid "Maximum size of the Teletext page cache in bytes." msgstr "Maximale grootte van de teletext pagina cache in bytes." #: ../zapping.schemas.in.h:23 msgid "Pad Closed Caption text with spaces." msgstr "Verleng Closed Caption tekst met spaties." #: ../zapping.schemas.in.h:24 msgid "" "Quality/speed trade-off when scaling and anti-aliasing Teletext pages. Valid " "values: nearest, tiles, bilinear, hyper." msgstr "" "Kwaliteit/snelheid afweging bij het schalen en gebruik van anti-aliasing op " "de pagina. Valide waarden: nearest, tiles, bilinear, hyper." #: ../zapping.schemas.in.h:25 msgid "" "Quality/speed trade-off when scaling and anti-aliasing caption/subtitles. " "Valid values: nearest, tiles, bilinear, hyper." msgstr "" "Kwaliteit/snelheid afweging bij het schalen en gebruik van anti-aliasing op " "de (sub)titels. Valide waarden: nearest, tiles, bilinear, hyper." #: ../zapping.schemas.in.h:26 msgid "Reverse the temporal field order." msgstr "Omgekeerde tijdvolgorde van de velden." #: ../zapping.schemas.in.h:27 msgid "Roll Teletext page numbers." msgstr "Scrollen teletekst pagina nrs" #: ../zapping.schemas.in.h:28 msgid "" "Roll the Teletext page number in the page header until the requested page " "has arrived." msgstr "" "Scroll de tt pagina nummer in de pagina header tot de gevraagde pagina " "verschijnt." #: ../zapping.schemas.in.h:29 msgid "Search all channels in the Teletext page memory." msgstr "Onderzoek alle kanalen in het tt pagina geheugen." #: ../zapping.schemas.in.h:30 msgid "Show a menu bar in the main window." msgstr "Toon menu in het hoofdvenster." #: ../zapping.schemas.in.h:31 msgid "Show a status bar in Teletext windows." msgstr "Toon statusbalk in teletext vensters." #: ../zapping.schemas.in.h:32 msgid "Show a toolbar in Teletext windows." msgstr "Toon een toolbar in teletext venster." #: ../zapping.schemas.in.h:33 msgid "Show a toolbar in the main window." msgstr "Toon een toolbar in het hoofdvenster." #: ../zapping.schemas.in.h:34 msgid "Show double height characters in Teletext subtitles." msgstr "Toon dubbele hoogte karakters in Teletekst subtitels." #: ../zapping.schemas.in.h:35 msgid "" "Some stations fail to transmit a complete language identifier, so the " "Teletext viewer may not display the correct font or national characters. You " "can select your geographical region here as an additional hint. Valid " "values: western_and_central_europe, eastern_europe, " "western_europe_and_turkey, central_and_southeast_europe, cyrillic, " "greek_and_turkish, arabic, hebrew_and_arabic." msgstr "" "Sommige zenders geven geen volledige taalcode mee, waardoor het mogelijk is " "dat teletekst niet de juiste lettertypen of vreemde tekens toont. Voer hier " "de geografische regio in om te gebruiken als extra hint. Toegestane waarden " "zijn: western_and_central_europe, eastern_europe, western_europe_and_turkey, " "central_and_southeast_europe, cyrillic, greek_and_turkish, arabic, " "hebrew_and_arabic." #: ../zapping.schemas.in.h:36 msgid "Switch to full capture size for screenshot." msgstr "Schakel om naar volledige capture formaat voor schermafdruk." #: ../zapping.schemas.in.h:37 msgid "Teletext implementation level." msgstr "Teletekst implementatie level." #: ../zapping.schemas.in.h:38 msgid "Teletext implementation level. Valid values: 1, 1.5, 2.5, 3.5." msgstr "Teletekst implementatie level. Toegestane waarden: 1, 1.5, 2.5, 3.5." #: ../zapping.schemas.in.h:39 msgid "Teletext page scaling quality." msgstr "Teletekst pagina schaalverander kwaliteit." #: ../zapping.schemas.in.h:40 msgid "Text brightness, valid values range from 0 to 255." msgstr "Tekst helderheid. waarden van 0 tot 255." #: ../zapping.schemas.in.h:41 msgid "Text contrast, valid values range from -128 to 127." msgstr "Tekst contrast, waarden van -128 tot 127." #: ../zapping.schemas.in.h:42 msgid "The Teletext search is case insensitive." msgstr "De teletekst zoekfunctie is hoofdletterongevoelig." #: ../zapping.schemas.in.h:43 msgid "" "This is the time in milliseconds Zapping will wait between pointer movements " "and blanking the pointer when over the video. A value of zero disables this " "feature." msgstr "" "Dit is de tijd in milliseconden, die Zapping wacht tussen muis bewegingen " "and uitvegen van de muispointer over het videogebied. Een waarde van nul " "schakelt de functie uit." #: ../zapping.schemas.in.h:44 msgid "Time to wait until blanking the pointer." msgstr "Tijdsduur om te wachten tot het wegvegen van de muispointer." #: ../zapping.schemas.in.h:45 msgid "Update the clock in the Teletext page header." msgstr "Bijwerken van de klok in de teletekst header." #: ../zapping.schemas.in.h:46 msgid "" "When your CPU is too slow to use the desired deinterlace mode you can reduce " "the horizontal resolution. Valid values: low, medium, high." msgstr "" "Als uw CPU te traag is om de gewenste de-interlace mode te gebruiken, dan " "kunt u de horizontale resolutie verminderen. Waarden: low, medium, high." #: ../zapping_setup_fb/zapping_setup_fb.c:136 #, c-format msgid "Device name %s is unsafe, contains dots." msgstr "Apparaat naam %s is niet veilig: het bevat puntjes." #: ../zapping_setup_fb/zapping_setup_fb.c:144 #, c-format msgid "Device name %s is unsafe, does not begin with /dev/." msgstr "Apparaat naam %s is niet veilig, het begint niet met /dev/." #. TRANSLATORS: File name, error message. #: ../zapping_setup_fb/zapping_setup_fb.c:163 #, c-format msgid "Cannot open device %s. %s." msgstr "Kan apparaat '%s' niet openen: %s." #. TRANSLATORS: File name, error message. #: ../zapping_setup_fb/zapping_setup_fb.c:178 #, c-format msgid "Cannot identify %s. %s." msgstr "Kan '%s' niet vinden: %s." #: ../zapping_setup_fb/zapping_setup_fb.c:190 #, c-format msgid "%s is not a device." msgstr "%s is geen device (apparaat)." #: ../zapping_setup_fb/zapping_setup_fb.c:204 #, c-format msgid "%s is not a video device." msgstr "%s is geen video-apparaat." #: ../zapping_setup_fb/zapping_setup_fb.c:218 #, c-format msgid "Cannot identify file descriptor %d. %s." msgstr "Kan bestands descriptor %d niet identificeren: %s." #: ../zapping_setup_fb/zapping_setup_fb.c:229 #, c-format msgid "File descriptor %d is not a device." msgstr "Bestands descriptor %d is geen apparaat." #: ../zapping_setup_fb/zapping_setup_fb.c:239 #, c-format msgid "File descriptor %d is not a video device." msgstr "Bestands descriptor %d is geen video apparaat." #: ../zapping_setup_fb/zapping_setup_fb.c:254 #, c-format msgid "Internal error at %s:%u." msgstr "" #: ../zapping_setup_fb/zapping_setup_fb.c:273 #, c-format msgid "Cannot drop root privileges despite running with UID %d, EUID %d." msgstr "" "Kan root privileges niet droppen, ondanks dat we UID %d gebruiken en EUID %d." #: ../zapping_setup_fb/zapping_setup_fb.c:303 #, c-format msgid "Cannot restore root privileges despite running with UID %d, EUID %d." msgstr "" "Kan root privileges niet herstellen, ondanks dat we UID %d en EUID %d " "gebruiken." #: ../zapping_setup_fb/zapping_setup_fb.c:396 msgid "No standard input, output or error file." msgstr "" #: ../zapping_setup_fb/zapping_setup_fb.c:449 #, c-format msgid "Invalid bpp argument %d. Expected 24 or 32." msgstr "Ongeldig bpp argument %d. Verwachtte 24 of 32." #: ../zapping_setup_fb/zapping_setup_fb.c:482 #, c-format msgid "Invalid device file descriptor %d." msgstr "Ongeldig apparaat bestands descriptor %d." #: ../zapping_setup_fb/zapping_setup_fb.c:539 msgid "No screens found." msgstr "Geen schermen gevonden." #: ../zapping_setup_fb/zapping_setup_fb.c:573 #, c-format msgid "Cannot open display %s." msgstr "Kan display %s niet openen." #: ../zapping_setup_fb/zapping_setup_fb.c:590 #, c-format msgid "Screen %d not found." msgstr "Scherm %d niet gevonden." #: ../zapping_setup_fb/zapping_setup_fb.c:598 #, c-format msgid "DMA is not possible on screen %d." msgstr "DMA niet mogelijk op scherm %d." #: ../zapping_setup_fb/zapping_setup_fb.c:614 #, c-format msgid "%s is not a V4L or V4L2 device." msgstr "%s is geen V4L of V4L2 apparaat." #: ../zapping_setup_fb/zapping_setup_fb.c:617 #, c-format msgid "File descriptor %d is not a V4L or V4L2 device." msgstr "bestands descriptor %d is geen valide V4L of V4L2 apparaat." #: ../zapping_setup_fb/zapping_setup_fb.c:620 #, fuzzy msgid "Cannot identify the video capture device." msgstr "Kan bestands descriptor %d niet identificeren: %s." #: ../zapping_setup_fb/zapping_setup_fb.h:56 #, fuzzy, c-format msgid "Ioctl %s failed: %s." msgstr "Exporteren mislukt: %s" #: ../zapping_setup_fb/v4l.c:89 ../zapping_setup_fb/v4l25.c:91 msgid "The device does not support video overlay." msgstr "Het apparaat ondersteunt geen video overlay." #~ msgid "Adaptive" #~ msgstr "Aanpassend" #~ msgid "Blended Clip" #~ msgstr "Blended chip" #~ msgid "Maximum motion" #~ msgstr "maximale beweging" #~ msgid "Composite mode" #~ msgstr "Composite mode" #~ msgid "Old Game" #~ msgstr "Oud spel" #~ msgid "Unknown error in %s." #~ msgstr "Onbekende fout in %s." #~ msgid "%s failed." #~ msgstr "%s is niet geslaagd." #~ msgid "VBI device to use" #~ msgstr "Naam van het VBI-apparaat" #~ msgid "DEVICE" #~ msgstr "DEVICE" #~ msgid "Zapzilla couldn't be started" #~ msgstr "Zapzilla kon niet worden gestart" #~ msgid "Sorry, Zapzilla is unable to create the config tree" #~ msgstr "Zapzilla kon het configuratiebestand niet aanmaken" #~ msgid "Save window _geometry (some WM's don't like it)" #~ msgstr "" #~ "Venstergrootte _geometry onthouden (sommige window managers hebben hier " #~ "problemen mee)" #~ msgid "Select the VBI device" #~ msgstr "Selecteer het VBI-apparaat" #~ msgid "VBI options" #~ msgstr "VBI opties" #~ msgid "_Enable VBI decoding" #~ msgstr "Activeren _VBI-decodering" #~ msgid "*" #~ msgstr "*" #~ msgid "VBI Options" #~ msgstr "VBI opties" #~ msgid "Interactive TV" #~ msgstr "Interactieve TV" #~ msgid "General" #~ msgstr "Algemene opties" #~ msgid "Cannot execute zapping_setup_fb." #~ msgstr "Kan zapping_setup_fb niet uitvoeren." #~ msgid "zapping_setup_fb failed." #~ msgstr "zapping__setup__fb mislukt:" #~ msgid "Unknown error in zapping_setup_fb." #~ msgstr "Onbekende fout in zapping_setup_fb." #~ msgid "Ran out of memory." #~ msgstr "Geheugentekort." #~ msgid "" #~ "This probably means that the required driver isn't loaded. Add to your /" #~ "etc/modules.conf the line:\n" #~ "alias char-major-81-224 bttv (replace bttv by the name of your video " #~ "driver)\n" #~ "and with mknod create /dev/vbi0 appropriately. If this doesn't work, you " #~ "can disable VBI in Settings/Preferences/VBI options/Enable VBI decoding." #~ msgstr "" #~ "Dit betekent hoogstwaarschijnlijk dat de benodigde driver niet geladen " #~ "is. Voeg de volende regel toe aan /etc/modules.conf:\n" #~ "alias char-major-81-224 bttv(vervang 'bttv' door de naam van de driver, " #~ "daarna kan /dev/vbi0aangemaakt worden met het mknod commando. Als ook dat " #~ "niet functioneert, schakel dan VBI ondersteuning uit onder Voorkeuzen/" #~ "Instellingen/VBI ondersteuning inschakelen" #~ msgid "Out of resources to start a new thread." #~ msgstr "Onvoldoende systeembronnen voor het starten van een nieuwe taak" #~ msgid "Filter" #~ msgstr "Filter" #~ msgid "Colorkey" #~ msgstr "Chromakey" #~ msgid "Greedy 2 Frame Chroma Threshold" #~ msgstr "Greedy 2 frame chroma grenswaarde" #, fuzzy #~ msgid "Teletext Page %x.%x" #~ msgstr "Teletekst pagina %3x.%x" #, fuzzy #~ msgid "Teletext Page %x" #~ msgstr "Teletekst pagina %3x" #, fuzzy #~ msgid "No control codes" #~ msgstr "Regelpanelen" #~ msgid "Below normal" #~ msgstr "Benedengemiddeld" #~ msgid "Above normal" #~ msgstr "Bovengemiddeld" # src/v4l2interface.c:344 #~ msgid "Toolbar" #~ msgstr "Toetsenbalk" #~ msgid "" #~ "Cannot create destination directory:\n" #~ "%s\n" #~ "%s" #~ msgstr "" #~ "Kan de doelfolder niet aanmaken:\n" #~ "%s\n" #~ "%s" #~ msgid "" #~ "Cannot create directory:\n" #~ "%s\n" #~ "%s" #~ msgstr "Kan directory '%s' niet aanmaken: %s" #~ msgid "Text Color" #~ msgstr "Tekstkleur" #~ msgid "Tiles (slightly slower, somewhat better)" #~ msgstr "Tiles (langzamer maar beter)" #~ msgid "Bilinear (good quality but slow)" #~ msgstr "Bi-linear (goede kwaliteit maar langzaam)" #~ msgid "Hyper (best quality but CPU intensive)" #~ msgstr "Hyper (beste kwaliteit, zware processorbelasting)" #~ msgid "_Interpolation type:" #~ msgstr "_Interpolatie type:" #~ msgid "Text export failed" #~ msgstr "Tekst-export mislukt: %s" #~ msgid "_Colors..." #~ msgstr "_Kleuren" #~ msgid "Alternate 1" #~ msgstr "Spraak 1" #~ msgid "Alternate 2" #~ msgstr "Spraak 2" #~ msgid "Sorry, but \"%s\" cannot do select() on file descriptors" #~ msgstr "\"%s\" ondersteunt geen select() systeemoproep" #~ msgid "The path must start with /" #~ msgstr "Padnaam moet met een / beginnen" #~ msgid "No Audio" #~ msgstr "Geen geluid" #~ msgid "Stereo Surround" #~ msgstr "Stereo surround" #~ msgid "Simulated Stereo" #~ msgstr "Gesimuleerde stereo" #~ msgid "Video Descriptions" #~ msgstr "Videobeschrijvingen" #~ msgid "Non-program Audio" #~ msgstr "Geluid van buiten het programma" #~ msgid "Special Effects" #~ msgstr "Speciale effecten" #~ msgid "Data Service" #~ msgstr "Data service" #~ msgid "_Search" #~ msgstr "_Zoeken" # src/frequencies.c:827 #~ msgid "_Back" #~ msgstr "_Terug" #~ msgid "_Forward" #~ msgstr "_Voorwaarts" #~ msgid "_Home" #~ msgstr "_Home" #~ msgid "Show menu" #~ msgstr "Toon menu" # src/interface.c:247 #~ msgid "Show toolbar" #~ msgstr "Toon knoppenbalk" #~ msgid "Show Menu and Toolbar" #~ msgstr "Toon Menu- en knoppenbalk" #~ msgid "Keep Window on Top" #~ msgstr "Houdt venster bovenop andere vensters" #~ msgid "No XFree86 DGA extension.\n" #~ msgstr "Geen XFree86 DGA extentie.\n" #~ msgid "Preview will not work: %s" #~ msgstr "Preview functioneert niet: %s" #~ msgid "" #~ "Open this link with the predetermined Web browser.\n" #~ "You can configure this in the GNOME Control Center, under Handlers/Url " #~ "Navigator" #~ msgstr "" #~ "Open deze link met met de standaardbrowser.\n" #~ "Deze kan ingesteld worden in het GNOME Configuratie Centrum" #~ msgid "LIRC plugin" #~ msgstr "LIRC plugin" #~ msgid "" #~ "This plugin enables the usage of LIRC, the Linux Infrared Remote Control." #~ msgstr "" #~ "Deze plugin maakt het mogelijk om een infra-rood afstandsbediening via " #~ "LIRC te gebruiken." #~ msgid "This plugin enables the usage of LIRC." #~ msgstr "Deze plugin biedt ondersteuning van LIRC" #~ msgid "LIRC" #~ msgstr "LIRC" #~ msgid "Button" #~ msgstr "Toets" #~ msgid "Action" #~ msgstr "Aktie" #~ msgid "Button:" #~ msgstr "Toets:" #~ msgid "Action:" #~ msgstr "Aktie:" # src/interface.c:362 #~ msgid "channel up" #~ msgstr "Volgende kanaal " # src/interface.c:405 #~ msgid "channel down" #~ msgstr "Vorige kanaal" # src/interface.c:362 #~ msgid "set channel" #~ msgstr "Kies kanaal" #~ msgid "power off" #~ msgstr "Uit" #~ msgid "1" #~ msgstr "1" #~ msgid "Add" #~ msgstr "Toevoegen" #~ msgid "Delete" #~ msgstr "Verwijderen" #~ msgid "" #~ "The first option lets you specify where screenshots are to be\n" #~ "saved. The file name will be: dir/shot[1,2,3,...].ext\n" #~ "\n" #~ "The command will be executed after saving the screenshot,\n" #~ "with the environmental variables $SCREENSHOT_PATH, $CHANNEL_ALIAS,\n" #~ "$CHANNEL_ID, $CURRENT_STANDARD, $CURRENT_INPUT set to their\n" #~ "correct value.\n" #~ "\n" #~ msgstr "" #~ "De eerste optie geeft aan waar de bestanden worden opgeslagen. De " #~ "bestandsnamen worden als volgt genummerd:\n" #~ "opslag_map/shot[1,2,3,...].ext\n" #~ "\n" #~ "Het commando zal worden uitgevoerd nadat het bestand is opgeslagen\n" #~ "met de omgevingsvariablen $SCREENSHOT_PATH, $CHANNEL_ALIAS,\n" #~ "$CHANNEL_ID, $CURRENT_STANDARD, $CURRENT_INPUT geïnitialiseerd met\n" #~ "de juiste waarden.\n" #~ "\n" #~ msgid "Recording dialog" #~ msgstr "Opnemen dialog" #~ msgid "" #~ "\n" #~ "The image won't be saved.\n" #~ msgstr "" #~ "\n" #~ "Screenshot zal niet worden opgeslagen.\n" # src/interface.c:104 #~ msgid "Zapping" #~ msgstr "Zapping" #~ msgid "Set debug messages on" #~ msgstr "activeren debugberichten" #, fuzzy #~ msgid "" #~ "Cannot show %s:\n" #~ "%s" #~ msgstr "Kan '%s' niet aanmaken: %s" #~ msgid "Click me" #~ msgstr "Klik hier" #, fuzzy #~ msgid "zapping_setup_fb exited abnormally." #~ msgstr "zapping__setup__fb informatie:" #~ msgid "There wasn't enough mem for allocating symbol %d in %s" #~ msgstr "Niet genoeg geheugen voor symbool %d in %s" #, fuzzy #~ msgid "Input" #~ msgstr "Input:" # src/v4l2interface.c:344ï #~ msgid "Standard" #~ msgstr "Standaard" #~ msgid "Key" #~ msgstr "Toets" #~ msgid "Couldn't open %s, should I try some common options?" #~ msgstr "Kan %s niet openen, andere gebruikelijke opties proberen?" #~ msgid ", I will try starting capture mode" #~ msgstr ", ik zal proberen om op te starten in opnamemodus" #, fuzzy #~ msgid "Menu and toolbar" #~ msgstr "Verberg Menu- en knoppenbalk" #~ msgid "No id" #~ msgstr "Geen naam" #, fuzzy #~ msgid "<span foreground=\"yellow\">%s</span>" #~ msgstr "Kanaal <yellow>%s</yellow>" #, fuzzy #~ msgid "<span foreground=\"blue\">%s %d %%</span>" #~ msgstr "Kanaal <yellow>%s</yellow>" #~ msgid "%s with %d tuner" #~ msgid_plural "%s with %d tuners" #~ msgstr[0] "%s met %d tuner" #~ msgstr[1] "%s met %d tuners" #, fuzzy #~ msgid "_Overlay subtitle pages automatically" #~ msgstr "Ondertiteling automatisch doorschijnend" #, fuzzy #~ msgid "_Use VBI for getting station names" #~ msgstr "Zendernamen via VBI" #~ msgid "What to do with the compressed stream" #~ msgstr "Wat te doen met de gecomprimeerde data" #~ msgid "/dev/null" #~ msgstr "/dev/null" #~ msgid "Write the encoded stream to:" #~ msgstr "Opslaan in MPEG-formaat als:" #~ msgid "MPEG file destination" #~ msgstr "MPEG doelbestand" #~ msgid "Sets the dir where the encoded clips will be written to" #~ msgstr "De map waar de MPEG data in opgeslagen moet worden" #~ msgid "Engine verbosity (output goes to stderr):" #~ msgstr "Niveau van debugmeldingen (op stderr, 0 = geen)" #~ msgid "Input / output" #~ msgstr "Input / output" #~ msgid "Saving MPEG" #~ msgstr "Bezig met opslaan van MPEG data" # src/interface.c:448 #~ msgid "Press this when you are done" #~ msgstr "Klik hier indien gereed" #~ msgid "RTE id (for debugging)" #~ msgstr "RTE ID (voor debuggen)" #~ msgid "Destination" #~ msgstr "Doel" #~ msgid "Mux mode" #~ msgstr "Multiplexermodus" #~ msgid "Some more info: bit rates" #~ msgstr "Overige informatie: bitrates" #~ msgid "Dynamic stats (dropped, output M's, etc)" #~ msgstr "Dynamische statistieken (dropped, output M's etc)" #~ msgid "Save mpeg" #~ msgstr "Bewaar mpeg" #~ msgid "Configure the properties for this plugin" #~ msgstr "Configureer de opties voor deze plugin" #~ msgid "Destination file:" #~ msgstr "Doelbestand" #~ msgid "%P %%" #~ msgstr "%P %%" #~ msgid "New Format" #~ msgstr "Nieuw formaat" #~ msgid "Video device to use" #~ msgstr "Video-apparaat" #~ msgid "Pixformat for XVideo capture mode [YUYV | YVU420]" #~ msgstr "Pixformaat voor XVideo-capturemodus [YUYV | YVU420]" #~ msgid "PIXFORMAT" #~ msgstr "PIXFORMAAT" #~ msgid "Enter here the device associated with the VBI input" #~ msgstr "Voer het apparaat in dat verbonden is met de VBI-ingang" #~ msgid "" #~ "Extra information, such as notifying of channel changes, can be reported " #~ "in many different ways. Select here the variant you like most." #~ msgstr "" #~ "Extra informatie zoals kanaalwijzigingen kunnen op verscheidene manieren " #~ "gemeld worden. Selecteer hier de gewenste variant." #~ msgid "" #~ "If this option is on, the brightness, contrast, etc. info is saved with " #~ "the channel, and restored when you select it again" #~ msgstr "" #~ "Als deze optie ingeschakeld is worden helderheid, contrast enz. voor " #~ "iedere voorkeuze appart opgeslagen" #~ msgid "" #~ "If you select this option, TTX pages marked as subtitles and opened in " #~ "the main window will automagically switch to TV mode and overlay " #~ "themselves." #~ msgstr "" #~ "Indien voor deze optie gekozen wordt en teletekstpaginas met " #~ "ondertiteling voorhanden zijn, zal het hoofdvenster automagisch TV met " #~ "doorschijnend teletekst tonen" #~ msgid "Page to take subtitles from:" #~ msgstr "Pagina met ondertiteling:" #~ msgid "" #~ "Thanks to the XVideo extension, if present, the capture buffer can be " #~ "scaled to arbitrary sizes using HW acceleration. Select here the capture " #~ "size to use in this case." #~ msgstr "" #~ "Indien de XVideo uitbreiding beschikbaar is, kan de opnamebuffer " #~ "hardwarematig geschaald worden. Selecteer in dat geval hier de grootte " #~ msgid "Where will subtitles be taken from" #~ msgstr "Waar de ondertiteling vandaan komt" #~ msgid "" #~ "Zapping supports several levels of Teletext extensions, you can disable " #~ "higher levels if you dislike the appearance." #~ msgstr "" #~ "Zapping ondersteunt verscheidene teletekstextensies die hier " #~ "gedeactiveerd kunnen worden als deze u niet bevallen." #, fuzzy #~ msgid "Quits Zapzilla" #~ msgstr "Zapzilla" # src/interface.c:29 #~ msgid "_TV Channels" #~ msgstr "_TV kanalen" # src/interface.c:432 #, fuzzy #~ msgid "Switches to the next channel" #~ msgstr "Toevoegen als nieuwe zender" #, fuzzy #~ msgid "Switches to the previous channel" #~ msgstr "Ga naar Vorige pagina" #, fuzzy #~ msgid "Increment control value" #~ msgstr "Huidige controller:" #~ msgid "Couldn't locate zapping_setup_fb, check your install" #~ msgstr "" #~ "Kan zapping_setup_fb niet vinden, controleer of Zapping goed " #~ "geïnstalleerd is" #~ msgid "Device Info" #~ msgstr "Apparaatinfo" #, fuzzy #~ msgid "Cycle through favourite picture sizes" #~ msgstr "Maximale opnamegrootte:" # src/interface.c:362 #, fuzzy #~ msgid "Opens the channel editor" #~ msgstr "Kanaal editor" #, fuzzy #~ msgid "Opens the plugin properties dialog" #~ msgstr "Plugin-eigenschappen" #, fuzzy #~ msgid "Advance subpage number" #~ msgstr "Willekeurige subpagina" #, fuzzy #~ msgid "Go to index page" #~ msgstr "Ga naar de indexpagina" #, fuzzy #~ msgid "Open search dialog" #~ msgstr "Opnemen dialog" #~ msgid "Audio recording interface:" #~ msgstr "Geluid opname-interface" #~ msgid "Device info" #~ msgstr "Apparaatinfo" #~ msgid "Do not show" #~ msgstr "Niet tonen" #~ msgid "Font used for OSD:" #~ msgstr "Lettertype voor OSD:" #~ msgid "How to show extra info:" #~ msgstr "Extra informatie tonen:" #~ msgid "Key:" #~ msgstr "Toets:" #~ msgid "OSD timeout in seconds:" #~ msgstr "OSD timeout in seconden" #~ msgid "The bigger this value is, the more verbose zapping_setup_fb will be" #~ msgstr "Hoe groter de waarde, hoe informatiever zapping_setup_fb zal zijn" #~ msgid "_Add" #~ msgstr "_Toevoegen" #, fuzzy #~ msgid "Takes a screenshot" #~ msgstr "Maak een screenshot" #~ msgid "After saving the screenshot, run the command:" #~ msgstr "Na het opslaan het volgende commando uitvoeren:" #~ msgid "Entering file name closes dialog" #~ msgstr "Invullen van filenaam, sluit de dialoog" #~ msgid "" #~ "If this entry isn't empty, Zapping will try to run the given command each " #~ "time you save a screenshot." #~ msgstr "" #~ "Indien ingevuld zal Zapping na het opslaan van een screenshot steeds dit " #~ "commando uitvoeren." #~ msgid "Select directory to save screenshots" #~ msgstr "Kies de map voor screenshots" #~ msgid "Select here the directory where screenshots will be saved" #~ msgstr "Kies de map voor het opslaan van screenshots" #, fuzzy #~ msgid "Opens the record dialog" #~ msgstr "Opnemen dialog" #, fuzzy #~ msgid "Starts recording" #~ msgstr "Start opnemen" #, fuzzy #~ msgid "Pauses the current recording" #~ msgstr "Zoeken afbreken" #, fuzzy #~ msgid "Stops the current recording" #~ msgstr "Start opnemen" #~ msgid "Overlay this page" #~ msgstr "Maak doorschijnend" #~ msgid "Return to windowed mode and use the current page as subtitles" #~ msgstr "" #~ "Terug naar venstermodus en huidige pagina als ondertiteling gebruiken" #~ msgid "Inputs" #~ msgstr "Inputs" #~ msgid "n/a" #~ msgstr "nvt" #~ msgid "%d h %d m" #~ msgstr "%d h %d m" #~ msgid "%d %b %I:%M %p " #~ msgstr "%d %b %I:%M %p " #~ msgid "" #~ "\n" #~ "Length: %uh%02u (%uh%02u remaining)" #~ msgstr "" #~ "\n" #~ "Lengte: %uh%02u (%uh%02u resterend)" #~ msgid "Length: %uh%02u" #~ msgstr "Lengte: %uh%02u" #~ msgid "Elapsed: %uh%02u" #~ msgstr "Verstreken tijd: %uh%02u" #~ msgid "unknown language" #~ msgstr "onbekende taal" #~ msgid "" #~ "Channel 1: %s (%s)\n" #~ "Channel 2: %s (%s)" #~ msgstr "" #~ "Kanaal 1: %s (%s)\n" #~ "Kanaal 2: %s (%s)" #~ msgid "" #~ "Channel 1: %s\n" #~ "Channel 2: %s" #~ msgstr "" #~ "Kanaal 1: %s\n" #~ "Kanaal 2: %s" #~ msgid "Audio: %s (%s)" #~ msgstr "Geluid: %s (%s)" #~ msgid "Audio: %s" #~ msgstr "Audio: %s" #~ msgid "Captioned %s" #~ msgstr "Betiteld %s" #~ msgid "Captioned" #~ msgstr "Betiteld %x" #~ msgid "Not rated" #~ msgstr "Niet gewaardeerd" #, fuzzy #~ msgid "Shows some info about the current program" #~ msgstr "Geeft informatie over dit televisieprogramma" #, fuzzy #~ msgid "Shows some info about the current network" #~ msgstr "Zenderinformatie huidig netwerk" #~ msgid "TV" #~ msgstr "TV" #~ msgid "There are no tuners for the active input" #~ msgstr "De actieve ingang heeft geen tuner" #~ msgid "Use Zapping as a Teletext navigator" #~ msgstr "Zapping als teletextnavigator gebruiken" #~ msgid "Loading subpage %x..." #~ msgstr "Laden van subpagina %x..." #~ msgid "Warning: Page not valid" #~ msgstr "Let op: pagina ongeldig" #~ msgid " Page %d" #~ msgstr " Pagina %d" #~ msgid "The cache has been cleared" #~ msgstr "De cache is geleegd" #~ msgid "No other subpage in the cache" #~ msgstr "Geen subpaginas in de cache" #~ msgid "Found" #~ msgstr "Gevonden" #~ msgid "Empty cache" #~ msgstr "Cache legen" #~ msgid "Scanning %x.%02x" #~ msgstr "Scannen van %x.%02x" #~ msgid "<%s> added to the bookmarks" #~ msgstr "<%s> aan de bookmarks toegevoegd" #~ msgid "Subpage" #~ msgstr "Subpagina" #~ msgid "Export %s" #~ msgstr "Export %s" #~ msgid "Select file you'll be exporting to" #~ msgstr "Selecteer het doelbestand voor exporteren" #~ msgid "" #~ "Cannot create destination dir for Zapzilla export:\n" #~ "%s\n" #~ "%s" #~ msgstr "" #~ "Kan de doelmap voor exporteren naar Zapzilla niet aanmaken:\n" #~ "%s\n" #~ "%s" #~ msgid "Caption %x - %s" #~ msgstr "Titel %x - %s" #~ msgid "Text %x - %s" #~ msgstr "Tekst %x - %s" #~ msgid "Caption %x" #~ msgstr "Titel %x" #~ msgid "Text %x" #~ msgstr "Tekst %x" #~ msgid "%x: Unknown language" #~ msgstr "%x: onbekende taal" #~ msgid "%s in %s" #~ msgstr "%s in %s" #~ msgid "100" #~ msgstr "100" #~ msgid "16:9" #~ msgstr "Breedbeeld 16:9" #~ msgid "4:3" #~ msgstr "Klassiek 4:3" #~ msgid "All messages" #~ msgstr "Alle berichten" #~ msgid "Autodetect" #~ msgstr "Automatisch" #~ msgid "" #~ "Avoid some flicker in preview mode (leaves artifacts in the main window)" #~ msgstr "" #~ "Onderdruk flikkeren in previewmodus (kan storing in hoofdvenster niet " #~ "verhinderen)" #~ msgid "Cancel the current search" #~ msgstr "Zoeken afbreken" # src/interface.c:432 #~ msgid "" #~ "Click this button if you want to leave the dialog discarding the changes" #~ msgstr "Klik hier om wijzigigen te annuleren en dialoog te sluiten" #~ msgid "Create a new channel with these settings" #~ msgstr "Creeer een nieuw kanaal met deze settings" #~ msgid "Description:" #~ msgstr "Beschrijving:" #~ msgid "Edit Bookmarks" #~ msgstr "Bladwijzers bewerken" #~ msgid "Filter Level:" #~ msgstr "Filterniveau:" #~ msgid "Filtering" #~ msgstr "Filters" #~ msgid "Go to the next page" #~ msgstr "Ga naar Volgende pagina" #~ msgid "Go to the previous page" #~ msgstr "Ga naar Vorige pagina" #~ msgid "Hide menu and toolbar" #~ msgstr "Verberg Menu- en knoppenbalk" #~ msgid "High priority only" #~ msgstr "Alleen hoge prioriteit" #~ msgid "Ignore" #~ msgstr "Negeer" #~ msgid "Keyboard shortcut:" #~ msgstr "Sneltoets: " #~ msgid "Leave Teletext mode" #~ msgstr "_Verlaat teletekstmode" #~ msgid "Medium and High priority" #~ msgstr "Middel- en hoge prioriteit" #~ msgid "Network Info" #~ msgstr "Netwerkinformatie" #~ msgid "Network call letters:" #~ msgstr "Afkorting:" #~ msgid "Network related links:" #~ msgstr "Zendergerelateerde links:" #~ msgid "New bookmark:" #~ msgstr "Nieuwe bladwijzer:" #~ msgid "Next" #~ msgstr "Volgende" #~ msgid "No fixed ratio" #~ msgstr "Vrije beeldverhouding" #~ msgid "Open automatically" #~ msgstr "Automatisch openen" #~ msgid "Operator messages:" #~ msgstr "Operatorinformatie:" #~ msgid "Previous" #~ msgstr "Vorige" #~ msgid "Program Info" #~ msgstr "Programma informatie" #~ msgid "Program related links:" #~ msgstr "Programmagerelateerde links:" #~ msgid "Ratio mode:" #~ msgstr "Beeldverhouding" #~ msgid "Remove Bookmark" #~ msgstr "Verwijder bladwijzer" #~ msgid "Remove the currently selected bookmark" #~ msgstr "Verwijder de geselecteerde bladwijzer" #~ msgid "Reveal hidden characters" #~ msgstr "Toon verborgen tekst" #~ msgid "Save the changes and leave the dialog" #~ msgstr "Wijzigen opslaan en dialoog sluiten" #~ msgid "Search backwards" #~ msgstr "Achteruit zoeken" #~ msgid "Search backwards for the previous match" #~ msgstr "Vorige overeenkomst" #~ msgid "Search forwards for the next match" #~ msgstr "Volgende overeenkomst" #~ msgid "Search in progress..." #~ msgstr "Bezig met zoeken..." #~ msgid "Search the page cache" #~ msgstr "Zoeken in de cache" # src/interface.c:336 #~ msgid "Select here the frequency table used in your country" #~ msgstr "Kies de frequentietabel die gebruikt wordt in uw regio" # src/interface.c:382 #~ msgid "Select here the input to be attached to this channel" #~ msgstr "Selecteer de input voor dit kanaal" #~ msgid "Select here the video standard used on this channel" #~ msgstr "Selecteer de gebruikte videostandaard voor dit kanaal" #~ msgid "Select the next station in the channel list" #~ msgstr "Selecteer het volgend station op de kanaallijst" #~ msgid "Select the previous station in the channel list" #~ msgstr "Selecteer het volgend station op de kanaallijst" #~ msgid "Show in the status bar" #~ msgstr "In de statusbalk tonen" #~ msgid "" #~ "Sometimes a priority level is transmitted with the trigger, it can be " #~ "used to filter the messages you want to receive" #~ msgstr "" #~ "Soms wordt een prioriteit meegezonden die gebruikt kan worden om de " #~ "berichten te filteren die worden ontvangen" #~ msgid "Sponsor messages:" #~ msgstr "Reclameboodschappen:" #~ msgid "Start a new search" #~ msgstr "Opnieuw zoeken" #~ msgid "Station related links:" #~ msgstr "Stationsgerelateerde links:" #~ msgid "Switch to the current channel when the bookmark is selected" #~ msgstr "" #~ "Schakel naar het huidige kanaal na het selecteren van deze bladwijzer" #~ msgid "Synopsis" #~ msgstr "Samenvatting" #~ msgid "Tape delay:" #~ msgstr "Tape delay" #~ msgid "This shows some help about this dialog" #~ msgstr "Hulptekst over dit venster" # src/v4l2interface.c:146 #~ msgid "Tuned channels" #~ msgstr "Bijgestelde kanalen" #~ msgid "What to do with received trigger if no identifier is transmitted" #~ msgstr "Wat moet gebeuren met links zonder naam" #~ msgid "What to do with this kind of links" #~ msgstr "Wat moet met dit type link gebeuren" # src/interface.c:316 #~ msgid "" #~ "When your country or the required table is not present please notify the " #~ "author,\n" #~ "adding the table if possible, for inclusion in the next release of this " #~ "program." #~ msgstr "" #~ "Als uw land of benodigde tabel niet aanwezig is, neemt u dan contact op\n" #~ "met de auteur, met zo mogelijk de frequentietabel erbij, opdat dit in\n" #~ "een volgende editie kan worden opgenomen.\n" #~ "Frequenties van kabelproviders in Nederland kunnen worden opgevraagd \n" #~ "op http://www.guru4hire.nl/rtvdb." #~ msgid "Zapzilla" #~ msgstr "Zapzilla" #~ msgid "_Add current page..." #~ msgstr "Huidige pagina _toevoegen..." #~ msgid "_Export this page" #~ msgstr "_Exporteer deze pagina" #~ msgid "_Main help" #~ msgstr "_Hulp" # src/interface.c:362 #~ msgid "By channel list entry" #~ msgstr "In volgorde van de kanaallijst" #~ msgid "Mixer settings for recording" #~ msgstr "Settings van de geluidsmixer voor opname" #~ msgid "Numeric keypad channel switching:" #~ msgstr "Kanaal wisselen via numerieke toetsengroep" #~ msgid "Recording source:" #~ msgstr "Opname bron" #~ msgid "Recording volume:" #~ msgstr "Opname volume: " #~ msgid "Use system settings" #~ msgstr "Gebruik systeemsettings" #~ msgid "MPEG encoder" #~ msgstr "MPEG compressor" #~ msgid "This plugin encodes the image and audio stream into a MPEG file" #~ msgstr "Deze plugin neemd beeld en geluid op als MPEG bestand" #~ msgid "Encode the stream as MPEG." #~ msgstr "Data opslaan in MPEG formaat." #~ msgid "%d frame dropped" #~ msgid_plural "%d frames dropped" #~ msgstr[0] "%d frame verloren" #~ msgstr[1] "%d frames verloren" #~ msgid "%d frame processed" #~ msgid_plural "%d frames processed" #~ msgstr[0] "%d frame verwerkt" #~ msgstr[1] "%d frames verwerkt" #~ msgid "%s : %s" #~ msgstr "%s : %s" #~ msgid "Synchronization under V4L1" #~ msgstr "Synchronisatie met V4L1" #~ msgid "Do not show this again" #~ msgstr "Deze mededelingen niet meer tonen" #~ msgid "V4L2 page" #~ msgstr "V4L2 Homepage" #~ msgid "" #~ "You are using a V4L1 driver, so synchronization\n" #~ "between audio and video will not be very good.\n" #~ "V4L2 drivers provide a much better sync,\n" #~ "you might want to try those if you aren't\n" #~ "satisfied with the results." #~ msgstr "" #~ "Er wordt gebruik gemaakt van de V4L1 driver\n" #~ "waardoor synchronisatie van beeld en geluid te wensen\n" #~ "over laat. Er wordt aangeraden V4L2 drivers te \n" #~ "gebruiken indien het resultaat niet tevreden stelt." #~ msgid "" #~ "Cannot create destination dir for clips:\n" #~ "%s\n" #~ "%s" #~ msgstr "" #~ "Kan de doelfolder voor clips niet aanmaken:\n" #~ "%s\n" #~ "%s" #~ msgid "RTE ID: %s" #~ msgstr "RTE ID: %s" #~ msgid "Destination: %s" #~ msgstr "Doel: %s" #~ msgid "Audio only" #~ msgstr "Alleen audio" # src/v4l2interface.c:344 #~ msgid "Video only" #~ msgstr "Alleen video" # src/frequencies.c:827 #~ msgid "Audio and Video" #~ msgstr "Audio en video" #~ msgid "Output audio kbits per second:" #~ msgstr "Output audio bandbreedte (kbits/s):" #~ msgid "Output video Mbits per second:" #~ msgstr "Video bandbreedte (Mbits/s):" #~ msgid "Waiting for frames..." #~ msgstr "Wachten op frames..." #~ msgid "MPEG" #~ msgstr "MPEG" #~ msgid "" #~ "This is the first time you run the plugin,\n" #~ "please take a moment to configure it to your tastes.\n" #~ msgstr "" #~ "Dit is de eerste keer dat u de plugin gebruikt.\n" #~ "Neem even de tijd om de plugin aan uw smaak aan te passen " #~ "(configureren).\n" #~ msgid "Start recording" #~ msgstr "Start opnemen" #~ msgid "Record as MPEG" #~ msgstr "Opslaan in MPEG-formaat" # src/interface.c:247 #~ msgid "Show controls" #~ msgstr "Regelpaneel" #, fuzzy #~ msgid "terrestrial" #~ msgstr "Amerikaan" #~ msgid "V4L/V4L2 VBI interface: Failed to read from the device" #~ msgstr "V4L/V4L2 VBI-interface: Leesfout" #~ msgid "Do not change mode" #~ msgstr "Resolutie niet aanpassen" #~ msgid "AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz" #~ msgstr "AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz" #~ msgid "Resize to 768x576" #~ msgstr "Schalen naar 768x576 pixels" #~ msgid "Resize to 720x576" #~ msgstr "Schalen naar 720x576 pixels" #~ msgid "Resize to 640x480" #~ msgstr "Schalen naar 640x480 pixels" #~ msgid "Resize to 384x288" #~ msgstr "Schalen naar 384x288 pixels" #~ msgid "Resize to 352x288" #~ msgstr "Schalen naar 352x288 pixels" #~ msgid "Resize to 320x240" #~ msgstr "Schalen naar 320x240 pixels" # src/frequencies.c:818 #~ msgid "US cable-hrc" #~ msgstr "VS kabel HRC" # src/frequencies.c:820 #~ msgid "Canada cable" #~ msgstr "Canadese kabel" #~ msgid "Japan terrestrial" #~ msgstr "Japanner" # src/frequencies.c:820 #~ msgid "Japan cable" #~ msgstr "Japanese kabel" # src/frequencies.c:821 #~ msgid "Europe" #~ msgstr "Europa" # src/frequencies.c:823 #~ msgid "Italy" #~ msgstr "Italie" # src/frequencies.c:824 #~ msgid "New Zealand" #~ msgstr "Nieuw Zeeland" # src/frequencies.c:825 #~ msgid "Australia" #~ msgstr "Australië" # src/frequencies.c:826 #~ msgid "Ireland" #~ msgstr "Ierland" # src/frequencies.c:827 #~ msgid "France" #~ msgstr "Frankrijk" #~ msgid "Russia" #~ msgstr "Rusland" #~ msgid "South Africa" #~ msgstr "Zuid Afrika" #~ msgid "China" #~ msgstr "China" # src/frequencies.c:820 #~ msgid "Pakistan cable" #~ msgstr "Pakistan kabel" # src/v4l2interface.c:146 #~ msgid "(Unnamed channel)" #~ msgstr "(naamloos kanaal)" # src/interface.c:412 #~ msgid "(Unknown real channel)" #~ msgstr "(onbekend kanaal)" #~ msgid "(Unknown country)" #~ msgstr "(onbekend land)" # src/interface.c:412 #~ msgid "(Unknown RF channel)" #~ msgstr "(onbekend RF kanaal)" # src/v4l2interface.c:344 #~ msgid "Available controls" #~ msgstr "Regelpanelen" #~ msgid "<green>%s</green>" #~ msgstr "<green>%s</green>" #~ msgid "Do white balance" #~ msgstr "Automatische witbalans" # src/interface.c:362 #~ msgid "Add Channel" #~ msgstr "Kanaal toevoegen" #~ msgid "" #~ "Channel autosearching won't work with XVideo.\n" #~ "Please switch to another controller by starting\n" #~ "Capture mode (\"View/Go Capturing\" menu entry).\n" #~ "Reported error:\n" #~ "%s" #~ msgstr "" #~ "Automatisch scannen wordt niet ondersteund met XVideo.\n" #~ "Activeer een andere opnamemodus in het Beeld-menu!\n" #~ "Foutmelding:\n" #~ "%s" #~ msgid "Your current V4L/V4L2 driver cannot do channel autosearching, sorry" #~ msgstr "De huidige Video4Linux-driver heeft geen ondersteuning voor scannen" #~ msgid "Ctrl" #~ msgstr "Ctrl" #~ msgid "Alt" #~ msgstr "Alt" #~ msgid "Shift" #~ msgstr "Shift" #~ msgid "No tables" #~ msgstr "Tabellen ontbreken" #~ msgid "Move selected channels one row up" #~ msgstr "Verplaats selectie naar boven" #~ msgid "Move selected channels one row down" #~ msgstr "Verplaats selectie naar onder" # src/interface.c:440 #~ msgid "Delete selected channels" #~ msgstr "Verwijder selectie" # src/v4l2interface.c:146 #~ msgid "_Add as a new channel" #~ msgstr "_Toevoegen als een nieuw kanaal" # src/interface.c:440 #~ msgid "Apply the current settings to the marked channels above" #~ msgstr "Huidige instellingen toepassen op geselecteerde kanalen" # src/interface.c:440 #~ msgid "_Modify selected channels" #~ msgstr "_Wijzig geselecteerde kanalen" #~ msgid "Converts a row in RGB565 format to RGB24. Returns the destination." #~ msgstr "" #~ "Converteert lijnen van RGB565 naar RGV24 formaat, geeft bestemming terug." #~ msgid "Converts a row in RGB555 format to RGB24. Returns the destination." #~ msgstr "" #~ "Converteerd lijnen van RGB555 naar RGV24 formaat, geeft bestemming terug." #~ msgid "Converts a row in RGBA format to RGB24. Returns the destination." #~ msgstr "" #~ "Converteerd lijnen van RGBA naar RGV24 formaat, geeft bestemming terug." #, fuzzy #~ msgid "" #~ "Another plugin to control zapping through lirc\n" #~ "\n" #~ "See the lirc documentation for information about the .lircrc file. The " #~ "plugin will register itself under the name 'zapping_lirc' and you can use " #~ "the following commands:\n" #~ " CHANUP: One Channel up\n" #~ " CHANDOWN: One Channel down\n" #~ " ZOOM: switch between full screen and windowed mode\n" #~ " SETCHANNEL <int>: set the channel to <int> (the first channel is 0!!)\n" #~ " QUIT: Quit zapping\n" #~ " \n" #~ "Note: when using SETCHANNEL two times within 1500 ms, it will react the " #~ "same\n" #~ "as you would expect from a television set. e.g SETCHANNEL 1, SETCHANNEL 3 " #~ "will set the channel to 13\n" #~ "The README.alirc file has some more information about the plugin." #~ msgstr "" #~ "Een andere plugin om Zapping met LIRC aan te sturen\n" #~ "\n" #~ "Het .lircrc wordt uitvoerig in de LIRC documentatie beschreven.. De " #~ "plugin meldt zich als zapping_lirc en kent de volgende commandos:\n" #~ " CHANUP: Volgende kanaal\n" #~ " CHANDOWN: Vorig kanaal\n" #~ " ZOOM: Omschakelen tussen venster- en fullscreenmodus\n" #~ " SETCHANNEL <nummer>: Kanaal <nummer> kiezen (telt vanaf 0)\n" #~ " QUIT: Zapping afsluiten\n" #~ "\n" #~ "N.B.: Als het SETCHANNEL commando tweemaal binnen anderhalve seconde " #~ "gezonden wordt, dan zal Zapping reageren zoals je gewend bent van een " #~ "echte televisie. SETCHANNEL 1 gevolgd door SETCHANNEL 3 zal kanaal\n" #~ "13 selectren. Meer informatie over deze plugin staat in README.alirc." #~ msgid "Redirect the error messages to the console" #~ msgstr "Foutmeldingen omleiden naar console" #~ msgid "" #~ "%s:\n" #~ "Try running as root \"zapping_fix_overlay\" in a console" #~ msgstr "" #~ "%s:\n" #~ "Probeer als root \"zapping_fix_overlay\" in een console uit te voeren" # src/v4l2interface.c:344 #~ msgid "Hide controls" #~ msgstr "Regelpanelen verbergen" #~ msgid "Hide the menu and the toolbar" #~ msgstr "Menu en knoppenbalk verbergen" #~ msgid "_Quit" #~ msgstr "_Quit" # src/interface.c:362 #~ msgid "Edit the channel list" #~ msgstr "Pas de kanaal lijst aan" #~ msgid "Switch to fullscreen mode. Press ESC to return to windowed mode" #~ msgstr "" #~ "Ga naar beeldvullend (fullscreen). Kies ESC om terug te keren naar " #~ "venstermodus" #~ msgid "Switch to windowed capture mode" #~ msgstr "Ga naar videovenster in opnamemodus" #~ msgid "Up" #~ msgstr "Op" #~ msgid "Icons and text" #~ msgstr "Icoons en tekst" #~ msgid "_Start Plugin" #~ msgstr "Plugin _starten" #~ msgid "S_top Plugin" #~ msgstr "Plugin s_toppen" #~ msgid "Plugin description" #~ msgstr "Plugin omschrijving" #~ msgid "This is the file where the plugin is located" #~ msgstr "Bestandslokatie van deze plugin" #~ msgid "Description of the symbol" #~ msgstr "Beschrijving van dit symbool" #~ msgid "Keys" #~ msgstr "Toetsen" #~ msgid "Select here the channel you want to tune" #~ msgstr "Selecteer het kanaal dat u wilt bijstellen" #~ msgid "Station" #~ msgstr "Station" # src/interface.c:247 #~ msgid "Country" #~ msgstr "Land" #~ msgid "Manages the installed plug-ins" #~ msgstr "Beheert de geïnstalleerde plugins" # src/interface.c:336 #~ msgid "Edit here the channels you have tuned" #~ msgstr "Wijzig hier de voorkeuzekanelen" #~ msgid "Go _Previewing" #~ msgstr "_Preview" #~ msgid "Go _Capturing" #~ msgstr "_Opname" #~ msgid "Starts the Teletext decoder in a new window" #~ msgstr "Opent een nieuw teletekstvenster" #~ msgid "Toggle Subtitles Display (if transmitted)" #~ msgstr "Ondertiteling aan/uit (indien beschikbaar)" #~ msgid "Use this for starting the fullscreen mode" #~ msgstr "Hiermee wordt de beeldvullend-modus gestart" #~ msgid "Use Zapping as a teletext navigator" #~ msgstr "Zapping als teletekst-navigator gebruiken" #~ msgid "Open this link in a new window" #~ msgstr "Open link in niew venster" #~ msgid "Search for a given pattern in the cache" #~ msgstr "Zoeken in de cache" #~ msgid "Export the current page to different formats" #~ msgstr "Exporteer huidige pagina" #~ msgid "_Export" #~ msgstr "_Exporteren" #~ msgid "Manage your bookmarks" #~ msgstr "Bladwijzers beheren" #~ msgid "Use this dialog to delete any bookmarks you wish to remove" #~ msgstr "Gebruik dit venster om bladwijzers te verwijderen" #, fuzzy #~ msgid "(C) Iaki Garca Etxebarria" #~ msgstr "(C) Iñaki García Etxebarria" #~ msgid "%s" #~ msgstr "%s" #~ msgid "%s with a tuner" #~ msgstr "%s met een tuner" #, fuzzy #~ msgid "Repeat" #~ msgstr "Resetten" #, fuzzy #~ msgid "Station:" #~ msgstr "Verzadiging" # src/frequencies.c:823 #, fuzzy #~ msgid "Daily" #~ msgstr "Italie" #, fuzzy #~ msgid "Repeat:" #~ msgstr "Resetten" #, fuzzy #~ msgid "Code:" #~ msgstr "Codec:" # src/v4l2interface.c:344 #, fuzzy #~ msgid "VideoPlus" #~ msgstr "Alleen beeld" #, fuzzy #~ msgid "Default" #~ msgstr "Standaardactie:" #, fuzzy #~ msgid "Modify" #~ msgstr "_Wijzigen" #, fuzzy #~ msgid "Info" #~ msgstr "VBI-informatie" #~ msgid "Use Zapping as a Teletext navigator [Ctrl+Alt+T]" #~ msgstr "Zapping als Teletekstnavigator gebruiken [Ctrl+Alt+T]" #~ msgid "Configure capture [Ctrl+C]" #~ msgstr "Opname-instellingen [Ctrl+C]" #~ msgid "Exit TTX mode [Esc]" #~ msgstr "Teletekst verlaten [Esc]" # src/interface.c:382 #~ msgid "Enter here the key you want to attach to this channel" #~ msgstr "Sneltoets voor dit station hier invoeren" #, fuzzy #~ msgid "List of known keys" #~ msgstr "Lijst met toetsen" #, fuzzy #~ msgid "Take a screenshot [s, Ctrl+s]" #~ msgstr "JPEG Screenshot nemen[Ctrl-S]" #~ msgid "Set the default standard/norm for tunerless inputs" #~ msgstr "Videonorm voor apparaten zonder tuner" #~ msgid "NORM" #~ msgstr "NORM" # src/frequencies.c:816 #~ msgid "us-bcast" #~ msgstr "VS ether" # src/frequencies.c:819 #~ msgid "japan-bcast" #~ msgstr "Japan ether" # src/frequencies.c:822 #~ msgid "europe-east" #~ msgstr "Oost Europa" #~ msgid "" #~ "Sorry, but %s couldn't be opened:\n" #~ "%s (%d)" #~ msgstr "" #~ "\"%s\" kon niet worden geopend:\n" #~ "%s (%d)" #~ msgid "" #~ "Failed to access vbi device:\n" #~ "%s\n" #~ "%s" #~ msgstr "" #~ "Toegangsfout op het VBI-apparaat:\n" #~ "%s\n" #~ "%s" #~ msgid "Failed to access vbi device %s, cause unknown.\n" #~ msgstr "Geen toegang op het VBI-apparaat, oorzaak onbekend.\n" #~ msgid "" #~ "While loading %s\n" #~ "The plugin uses the protocol %d, and the current one is %d, it cannot be " #~ "loaded." #~ msgstr "" #~ "Beim Laden von %s\n" #~ "De plugin gebruikt protocol %d, het huidige protocol is %d, de plugin kan " #~ "niet worden geladen." #~ msgid "Sorry, plugin_get_info was not found in %s" #~ msgstr "plugin_get_info kon niet worden gevonden in %s" #~ msgid "" #~ "\"%s\" seems to be a valid plugin, but it doesn't provide a canonical " #~ "name." #~ msgstr "Plugin \"%s\" lijkt in orde, maar levert geen éénduidige naam." #~ msgid "" #~ "Sorry, the version of the plugin cannot be parsed.\n" #~ "The version must be something like %%d[.%%d[%%d[other things]]]\n" #~ "The given version is %s.\n" #~ "Error loading \"%s\" (%s)" #~ msgstr "" #~ "Het versienummer van de plugin kon niet worden geïnterpreteerd.\n" #~ "Het nummer zou er zo uit moeten zien: %%d[.%%d[%%d[enz.]]]\n" #~ "De vermelde versie is %s.\n" #~ "Fout tijdens het laden van \"%s\" (%s)" #~ msgid "No plugin accepts this page." #~ msgstr "Deze pagina wordt door geen enkele plugin geaccepteerd." #~ msgid "" #~ "The plugin that created the active page doesn't provide help for it. " #~ "Sorry." #~ msgstr "De plugin die deze pagina creëerde heeft geen hulptekst." #~ msgid "Sorry, the plugin doesn't provide help for this" #~ msgstr "De plugin heeft geen hulptekst hiervoor" #~ msgid "Selection failed: %s" #~ msgstr "Selectie mislukt: %s" #~ msgid "Toggle muted" #~ msgstr "Stilte aan/uit" #~ msgid "_VBI info" #~ msgstr "VBI _info" #~ msgid "Elija un color" #~ msgstr "Kies een kleur" # src/interface.c:307 #~ msgid "Channel choosing" #~ msgstr "Kanaalkeuze" #~ msgid "Station name" #~ msgstr "Zendernaam" # src/v4l2interface.c:344 # wat is de juiste vertaling hiervan? #~ msgid "Magical input" #~ msgstr "Onbekende input" # src/v4l2interface.c:344 #~ msgid "Magical Standard" #~ msgstr "Onbekende standaard" #~ msgid "Frequency:" #~ msgstr "Frequentie:" # src/interface.c:382 #~ msgid "Station name:" #~ msgstr "Zendernaam:" #~ msgid "My curiosity has been fullfilled" #~ msgstr "Mijn nieuwsgierigheid is bevredigd" #~ msgid "" #~ "Cannot create destination dir for screenshots:\n" #~ "%s\n" #~ "%s" #~ msgstr "" #~ "Kan de map voor screenshots niet aanmaken:\n" #~ "%s\n" #~ "%s" #~ msgid "Quality of the compressed image:" #~ msgstr "Kwaliteit van gecomprimeerd beeld:" #~ msgid "%.1f MB : %s : %s" #~ msgstr "%.1f MB : %s : %s" #~ msgid "Whether to encode audio and/or video" #~ msgstr "Of audio en/of video opgenomen moeten worden" #~ msgid "Use motion compensation" #~ msgstr "Bewegingscompensatie gebruiken" #~ msgid "Compression parameters" #~ msgstr "Compressieparamaters" #~ msgid "Select the audio input type you would like to use" #~ msgstr "Selecteer de gewenste audio-input" # src/frequencies.c:827 #, fuzzy #~ msgid "Audio device" #~ msgstr "Audio-apparaat" #~ msgid "Parrot buffer plugin" #~ msgstr "Papegaai buffer plugin" #~ msgid "" #~ "This plugin stores the last frames of video and repeats them upon " #~ "request, so you can see again and again and again that sequence you liked " #~ "so much." #~ msgstr "" #~ "Deze plugin onthoudt de laatste videobeelden en herhaalt de scene die je " #~ "leukvindt over en over en nog een keer." #~ msgid "Superb parrot landing observatory." #~ msgstr "Uitstekend observatiepunt voor neerstrijkende papegaaien." #~ msgid "%.3g Gb" #~ msgstr "%.3g GB" #~ msgid "%.3g Mb" #~ msgstr "%.3g MB" #~ msgid "%.3g Kb" #~ msgstr "%.3g kB" #~ msgid "n/a (capture mode not active)" #~ msgstr "-- (Capturemodus niet actief)" #~ msgid "Estimated parrot buffer size" #~ msgstr "Geschatte buffergrootte" #~ msgid "Parrot" #~ msgstr "Papegaai" #~ msgid "parrot help todo" #~ msgstr "Papegaai hulptekst nog te doen" #~ msgid "Number of saved frames:" #~ msgstr "Aantal opgeslagen frames:" #~ msgid "" #~ "This value is computed using the current capture parameters, and should " #~ "only be taken as an estimation. Any change in the capture properties " #~ "(window size, screen depth, etc) can make this number change " #~ "significantly." #~ msgstr "" #~ "Deze waarde wordt afgeleid van de huidige captureparameters en dient " #~ "alleen als schatting. Veranderingen in de parameters (venstergrootte, " #~ "aantal kleuren enz.) heeft grote invloed op deze cijfers." #~ msgid "Unable to allocate %d KB image buffer" #~ msgstr "Onvoldoende geheugen voor een %d kB buffer" #~ msgid "Character conversion Unicode -> %s not supported" #~ msgstr "Geen ondersteuning voor tekenconversie van unicode naar %s" #~ msgid "Green" #~ msgstr "Groen" #~ msgid "Yellow" #~ msgstr "Geel" #~ msgid "Blue" #~ msgstr "Blauw" #~ msgid "Magenta" #~ msgstr "Magenta" #~ msgid "Cyan" #~ msgstr "Cyaan" #~ msgid "Any" #~ msgstr "Maakt niet uit" #~ msgid "ANSI colors" #~ msgstr "ANSI-kleurcodes" #~ msgid "Insert ANSI color escape codes" #~ msgstr "ANSI-kleurcodes invoegen" #~ msgid "Export this page as ASCII text" #~ msgstr "Exporteren in ASCII-tekst" #~ msgid "ANSI" #~ msgstr "ANS_I" #~ msgid "Please contact the Zapzilla maintainers at <http://zapping.sf.net>." #~ msgstr "" #~ "Neem a.u.b. contact op met de Zapzilla maintainers via <http://zapping.sf." #~ "net>." #~ msgid "driver unknown" #~ msgstr "Onbekende driver" #~ msgid "Virtual memory exhausted.\n" #~ msgstr "Geen virtueel geheugen beschikbaar.\n" #~ msgid "Cannot open '%s': %d, %s." #~ msgstr "Kan apparaat '%s' niet openen: %d, %s." #~ msgid "Sorry, %s (%s) cannot capture the requested data services.\n" #~ msgstr "%s (%s) kan de gewenste datadienst niet ontvangen.\n" #~ msgid "%s (%s) is already in use.\n" #~ msgstr "%s (%s) is al in gebruik.\n" #~ msgid "" #~ "Could not set the vbi capture parameters for %s (%s), possibly a driver " #~ "bug. %s\n" #~ msgstr "" #~ "Kan de VBI-parameters voor %s (%s) niet activeren, mogelijk een bug in de " #~ "drivers. %s\n" #~ msgid "%s (%s) offers unknown vbi sampling format #%d. %s" #~ msgstr "%s (%s) biedt een onbekend VBI-formaat #%d aan. %s" #~ msgid "Cannot capture with %s (%s), has no standard vbi interface.\n" #~ msgstr "" #~ "Kan geen gebruik maken van %s (%s) omdat standaard VBI-interface " #~ "ontbreekt.\n" #~ msgid "%s (%s) reports improbable vbi frame size. %s\n" #~ msgstr "%s (%s) geeft een onmogelijke VBI-framegrootte aan. %s\n" #~ msgid "Sorry, %s (%s) cannot capture any of the requested data services.\n" #~ msgstr "%s (%s) kan de gewenste datadienst helaas niet ontvangen.\n" #~ msgid "" #~ "Cannot capture the requested data services with %s (%s), the sampling " #~ "frequency is too low.\n" #~ msgstr "" #~ "Kan de gewenste datadienst niet ontvangen met %s (%s), de " #~ "samplingfrequentie is te laag.\n" #~ msgid "Not enough memory to allocate vbi data buffers (%d KB).\n" #~ msgstr "" #~ "Niet genoeg geheuggen voor het reserveren van VBI-databuffers (%d kB).\n" #~ msgid "Not enough memory to allocate vbi capture buffer (%d KB).\n" #~ msgstr "Niet genoeg geheugen om VBI-capturebuffer (%d kB) te reserveren.\n" #~ msgid "V4L2 VBI interface: Capture stalled, no station tuned in?" #~ msgstr "V4L2 VBI-interface: Ontvangst onderbroken, geen zender ingestelt?" #~ msgid "" #~ "V4L2 VBI interface: Cannot dequeue buffer, driver or application bug?" #~ msgstr "" #~ "V4L2 VBI-interface: Kan de capturebuffer niet uitlezen, bug in driver of " #~ "applicatie?" #~ msgid "" #~ "V4L2 VBI interface: Cannot enqueue buffer, driver or application bug?" #~ msgstr "" #~ "V4L2 VBI-interface: Kan niet schrijven naar de capturebuffer, bug in " #~ "driver of applicatie?" #~ msgid "" #~ "Cannot query current videostandard of %s (%s): %d, %s. Probably a driver " #~ "bug.\n" #~ msgstr "" #~ "Kan de huidige videostandaard van %s (%s) niet uitlezen: %d, %s. " #~ "Waarschijnlijk een driverbug.\n" #~ msgid "Cannot query current vbi parameters of %s (%s): %d, %s.\n" #~ msgstr "Kan de huidige VBI-parameters van %s (%s) niet uitlezen: %d, %s.\n" #~ msgid "" #~ "Cannot request streaming i/o buffers from %s (%s): %d, %s. Driver bug?\n" #~ msgstr "" #~ "Fout bij opvragen van de streaming I/O-buffers van %s (%s): %d, %s. " #~ "Driverbug?\n" #~ msgid "" #~ "%s (%s) granted no streaming i/o buffers, physical memory exhausted?\n" #~ msgstr "" #~ "%s (%s) stelde geen streaming I/O-buffers ter beschikking, geen fysiek " #~ "geheugenmeer?\n" #~ msgid "Querying streaming i/o buffer #%d from %s (%s) failed: %d, %s.\n" #~ msgstr "" #~ "Fout bij opvragen van streaming I/O-buffer #%d van %s (%s): %d, %s.\n" #~ msgid "" #~ "Memory mapping streaming i/o buffer #%d from %s (%s) failed: %d, %s.\n" #~ msgstr "mmap() van streaming I/O buffer #%d van %s (%s) mislukt: %d, %s.\n" #~ msgid "" #~ "Cannot enqueue streaming i/o buffer #%d to %s (%s): %d, %s. Driver bug?\n" #~ msgstr "" #~ "Kan streaming I/O buffer #%d van %s (%s) niet in de wachtrij plaatsen: %" #~ "d, %s. Driver bug?\n" #~ msgid "" #~ "%s (%s) lacks a vbi read interface, possibly an output only device or a " #~ "driver bug. %s\n" #~ msgstr "" #~ "%s (%s) ontbeert een VBI-leesinterface, driver bug of apparaat is " #~ "mogelijkalleen geschikt voor output. %s\n" #~ msgid "Verbosity value given to zapping__setup__fb:" #~ msgstr "Graad van debugberichten van zapping__setup__fb:" #~ msgid "%d %s" #~ msgstr "%d %s" #~ msgid "minutes" #~ msgstr "minuten" #~ msgid "%.1f MB : %d %s dropped : %d %s processed" #~ msgstr "%.1f MB : %d %s verloren : %d %s verwerkt" # src/frequencies.c:827 #~ msgid "frame" #~ msgstr "frame" # src/frequencies.c:827 #~ msgid "frames" #~ msgstr "frames" # glade/glade_strings.c:178 #~ msgid "Leave the dialog" #~ msgstr "Dialog sluiten" #~ msgid "<" #~ msgstr "<" #~ msgid "S0" #~ msgstr "S0" #~ msgid ">" #~ msgstr ">" #~ msgid "R" #~ msgstr "?" #~ msgid "" #~ "If checked, the current channel will be automatically selected when the " #~ "bookmark is selected" #~ msgstr "" #~ "Wenn aktiviert wird bei Anwahl dieses Lesezeichens automatisch zu diesem " #~ "Sender gewechselt" # src/interface.c:382 #~ msgid "Enter here the name you want to give to this channel" #~ msgstr "Geben Sie hier den Sendernamen ein" #~ msgid "Check error: \"%s\" in plugin %shas hash 0x%x vs. 0x%x" #~ msgstr "Warnung: \"%s\" im Plugin %shat Hash 0x%x ggü. 0x%x" #~ msgid "Previous subpage in the cache [Left]" #~ msgstr "Vorhergehende Unterseite im Speicher [Links]" #~ msgid "<<" #~ msgstr "<<" #~ msgid "Next subpage in the cache [Right]" #~ msgstr "Nächste Unterseite im Speicher [Rechts]" #~ msgid ">>" #~ msgstr ">>" #~ msgid "Export Teletext pages to:" #~ msgstr "Teletext-Seiten ausgeben nach:" #~ msgid "Select directory we will export pages to" #~ msgstr "Wählen Sie ein Verzeichnis in dem Seiten gespeichert werden" #~ msgid "Enter here the directory we will be exporting TTX pages to" #~ msgstr "" #~ "Geben Sie hier das Verzeichnis an, in dem Teletext-Seiten gespeichert " #~ "werden sollen" #~ msgid "The list of channels you have configured in the Channel Editor" #~ msgstr "Die von ihnen editierte Senderliste" #~ msgid "You must first set the destination dir in the properties dialog" #~ msgstr "" #~ "Sie müssen erst das Zielverzeichnis im Eigenschaften-Dialog einstellen" #~ msgid "Sorry, not enough mem" #~ msgstr "Nicht genug Speicher" #~ msgid "Driver bug: %s (%s) lacks a valid i/o interface.\n" #~ msgstr "Treiber Bug: %s (%s)" #, fuzzy #~ msgid "" #~ "ZConf could not be closed properly , your\n" #~ "configuration will be lost.\n" #~ "Possible causes for this are:\n" #~ " - There is not enough free memory\n" #~ " - You do not have permissions to write to $HOME/.zapping\n" #~ " - libxml is non-functional (?)\n" #~ " - or, more probably, you have found a bug in\n" #~ " Zapzilla. Please contact the author.\n" #~ msgstr "" #~ "ZConf konnte nicht gespeichert werden, die\n" #~ "aktuellen Einstellungen sind verloren.\n" #~ "Mögliche Ursachen:\n" #~ " - Nicht genug Speicher\n" #~ " - Sie haben keinen Schreibrechte auf $HOME/.zapping\n" #~ " - libxml funktioniert nicht (?)\n" #~ " - oder, wahrscheinlicher, Sie haben einen Fehler in\n" #~ " Zapping gefunden. Bitte kontaktieren Sie den Autor.\n" #~ msgid "Show Input, Standards and subtitle selection" #~ msgstr "Zeige Eingang, Videostandards und Untertitelauswahl" #~ msgid "Hide extra controls" #~ msgstr "Zusätzliche Einstellungen verbergen" #~ msgid "Hide Input, Standards and subtitle selection" #~ msgstr "Menüs für Videostandard, Eingänge und Untertitelauswahl verbergen" #~ msgid "Go _Zapping" #~ msgstr "_Zapping" # src/interface.c:362 #~ msgid "Channel up" #~ msgstr "Höherer Kanal" # src/interface.c:405 #~ msgid "Channel down" #~ msgstr "Niedrigerer Kanal" #~ msgid "%s: TTX Page %x" #~ msgstr "%s: Seite %x" #~ msgid "Message: %s" #~ msgstr "Info: %s" #~ msgid "VBI: %s couldn't be opened: %d, %s" #~ msgstr "\"%s\" konnte nicht geöffnet werden: %d, %s" #~ msgid "" #~ "Where will the subtitles be taken from. Use 1...8 for Closed Caption and " #~ "100...899 for Teletext." #~ msgstr "" #~ "Quelle der Untertitel. Geben Sie 1...8 für Closed Caption \n" #~ "und 100...899 für Teletext Seiten an." #~ msgid "Page %x.%x" #~ msgstr "Seite %x.%x" #~ msgid "Delete some bookmarks" #~ msgstr "Einige Lesezeichen löschen" #~ msgid "_Delete Bookmarks..." #~ msgstr "Lesezeichen _löschen..." # src/callbacks.c:320 src/v4l2interface.c:89 #~ msgid "Cannot set input" #~ msgstr "Kann Eingang nicht einstellen" # src/callbacks.c:355 #~ msgid "Cannot tune input" #~ msgstr "Kann den Tuner nicht einstellen" #~ msgid "Show the Inputs and Standards menu" #~ msgstr "Die Menüs für Videostandard und Eingang zeigen" # src/v4l2interface.c:160 #~ msgid "Cannot tune the device" #~ msgstr "Kann den Tuner nicht einstellen" #~ msgid "Sorry, but the current input has no tuners" #~ msgstr "Der gewählte Eingang hat keinen Tuner" #~ msgid "Resize the window to some standard sizes" #~ msgstr "Einige übliche Fenstergrößen einstellen" #~ msgid "768x576" #~ msgstr "768x576" #~ msgid "640x480" #~ msgstr "640x480" #~ msgid "384x288" #~ msgstr "384x288" #~ msgid "Export the current page as HTML page" #~ msgstr "Diese Seite als HTML Seite ausgeben" #~ msgid "_HTML" #~ msgstr "_HTML" #~ msgid "Export the current page as PPM image" #~ msgstr "Diese Seite als PPM Grafik ausgeben" #~ msgid "P_PM" #~ msgstr "P_PM" #~ msgid "Export the current page as PNG image" #~ msgstr "Diese Seite als PNG Grafik ausgeben" #~ msgid "P_NG" #~ msgstr "P_NG" #~ msgid "Export the current page as ASCII text" #~ msgstr "Als ASCII Text ausgeben" #~ msgid "_ASCII" #~ msgstr "_ASCII" #~ msgid "Export the current page as ANSI text" #~ msgstr "Als ANSI Text ausgeben" #~ msgid "ANS_I" #~ msgstr "ANS_I" #~ msgid "Export the current page as VTX file" #~ msgstr "Diese Seite als VTX Datei ausgeben" #~ msgid "_VTX" #~ msgstr "_VTX" #~ msgid "" #~ "The teletext decoder needs GdkPixbuf, and\n" #~ "configure didn't find it." #~ msgstr "" #~ "Der Teletext-Dekoder braucht GdkPixbuf,\n" #~ "und configure konnte es nicht finden." #~ msgid "Selecting" #~ msgstr "Markieren" #~ msgid "error while writing file '%s': %s" #~ msgstr "Fehler beim Schreiben von '%s': %s" #~ msgid "error while writing file '%s'" #~ msgstr "Fehler beim Schreiben von '%s'" #~ msgid "error while writing '%s': %s" #~ msgstr "Fehler beim Schreiben von '%s': %s" #~ msgid "There's no GdkPixbuf support, VBI has been disabled" #~ msgstr "GdkPixbuf wird nicht unterstützt, VBI deaktiviert" #~ msgid "" #~ "The specified device isn't \"/dev/video0\".\n" #~ "Should I try it?" #~ msgstr "" #~ "Das angegebene Gerät ist nicht \"/dev/video0\".\n" #~ "Versuchen?" #~ msgid "" #~ "Global options: %s\n" #~ "Options for %s filter: %s" #~ msgstr "" #~ "Allgemeine Optionen: %s\n" #~ "Optionen für %s Filter: %s" #~ msgid "Export options" #~ msgstr "Ausgabeoptionen" #~ msgid "Cannot find an appropiate visual" #~ msgstr "Kann kein passendes Visual finden" #~ msgid "Cannot figure out X depth" #~ msgstr "Kann X Window Farbtiefe nicht feststellen" # src/tveng.c:140 #~ msgid "No inputs for this device" #~ msgstr "Gerät hat keine Eingänge" #~ msgid "Cannot find appropiate palette for current display" #~ msgstr "Kann keine passende Palette für das Display finden" #~ msgid "Cannot understand the actual palette" #~ msgstr "Verstehe aktuelle Palette nicht" #~ msgid "Cannot understand the given palette" #~ msgstr "Verstehe gegebene Palette nicht" #~ msgid "Unknown audio control: %s (%d)" #~ msgstr "Unbekannter Audioregler: %s (%d)" #~ msgid "Unknown video control: %s (%d)" #~ msgstr "Unbekannter Videoregler: %s (%d)" #~ msgid "Warning: trying to stop capture with no capture active\n" #~ msgstr "Warnung: Capturing soll gestoppt werden obwohl nicht aktiv\n" #~ msgid "Cannot understand actual palette" #~ msgstr "Verstehe aktuelle Palette nicht" #~ msgid "Grabber chip can't sync (no station tuned in?)" #~ msgstr "" #~ "Die Videohardware kann nicht synchronisieren (kein Sender auf diesem " #~ "Kanal?)" #~ msgid "The capability field says that there is no overlay" #~ msgstr "Overlay wird nicht unterstützt" #~ msgid "Warning: trying to stop preview with no capture active\n" #~ msgstr "Warnung: Preview soll gestoppt werden obwohl nicht aktiv\n" # src/tveng.c:70 #~ msgid "" #~ "Sorry, but cannot go fullscreen:\n" #~ "%s" #~ msgstr "" #~ "Kann Vollbildmodus leider nicht aktivieren:\n" #~ "%s" #~ msgid "" #~ "The properties dialog could not be opened\n" #~ "Check the location of zapping.glade" #~ msgstr "" #~ "Der Eigenschaften Dialog konnte nicht geöffnet werden\n" #~ "Prüfen Sie ob zapping.glade vorhanden ist" #~ msgid "Try to correct errors when decoding" #~ msgstr "Versuche Fehler beim Dekodieren zu korrigieren" #~ msgid "" #~ "Western and Central Europe\n" #~ "Eastern Europe\n" #~ "Western Europe and Turkey\n" #~ "Central and Southeast Europe\n" #~ "Cyrillic\n" #~ "Greek and Turkish\n" #~ "Arabic\n" #~ "Hebrew and Arabic\n" #~ msgstr "" #~ "West- und Mitteleuropa\n" #~ "Osteuropa\n" #~ "Westeuropa und die Türkei\n" #~ "Mittel- und Südosteuropa\n" #~ "Kyrillisch\n" #~ "Griechisch und Türkisch\n" #~ "Arabisch\n" #~ "Hebräisch und Arabisch\n" #~ msgid "Tveng critical error, zapping will exit NOW." #~ msgstr "Kritischer Fehler, Zapping beendet sich JETZT." #~ msgid "Type %d of control %s is not supported" #~ msgstr "Typ %d des Reglers %s wird nicht unterstützt" #~ msgid "<Broken menu entry>" #~ msgstr "<Fehlerhafter Menüpunkt>" #~ msgid "V4L2: Unknown control type 0x%x (%s)\n" #~ msgstr "V4L2: Unbekannter Reglertyp 0x%x (%s)\n" #~ msgid "VBI support for old (<0.5.2) bttv drivers" #~ msgstr "VBI Unterstützung für alte (<0.5.2) BTTV Treiber" # src/callbacks.c:338 #~ msgid "Cannot tune given channel %d (no such channel)\n" #~ msgstr "Kann nicht zu Kanal %d wechseln (existiert nicht)\n" #~ msgid "Not enough buffers" #~ msgstr "Nicht genug Puffer" #~ msgid "The specified frequence cannot be parsed" #~ msgstr "Die Frequenzangabe konnte nicht verarbeitet werden" #~ msgid "Channel: <yellow>%s</yellow>" #~ msgstr "Kanaal <yellow>%s</yellow>" #~ msgid "_Search page cache..." #~ msgstr "Zoeken in de cache...." ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������zapping-0.10cvs6/po/POTFILES.in��������������������������������������������������������������������� 644 � 764 � 144 � 4023 10402760772 11204� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# List of source files containing translatable strings. glade/zapping.glade2 libvbi/exp-gfx.c libvbi/exp-html.c libvbi/export.c libvbi/exp-sub.c libvbi/exp-txt.c libvbi/exp-vtx.c libvbi/teletext.c plugins/alirc/alirc.c plugins/deinterlace/DI_GreedyH/DI_GreedyH.c #plugins/deinterlace/DI_Misc/DI_Adaptive.c #plugins/deinterlace/DI_Misc/DI_BlendedClip.c plugins/deinterlace/DI_Misc/DI_Bob.c plugins/deinterlace/DI_Misc/DI_EvenOnly.c plugins/deinterlace/DI_Misc/DI_Greedy2Frame.c plugins/deinterlace/DI_Misc/DI_Greedy.c plugins/deinterlace/DI_Misc/DI_MoComp2.c plugins/deinterlace/DI_Misc/DI_OddOnly.c #plugins/deinterlace/DI_Misc/DI_OldGame.c plugins/deinterlace/DI_Misc/DI_ScalerBob.c plugins/deinterlace/DI_Misc/DI_TomsMoComp.c plugins/deinterlace/DI_Misc/DI_TwoFrame.c plugins/deinterlace/DI_Misc/DI_VideoBob.c plugins/deinterlace/DI_Misc/DI_VideoWeave.c plugins/deinterlace/DI_Misc/DI_Weave.c plugins/deinterlace/main.c plugins/deinterlace/preferences.c plugins/mpeg/mpeg.c plugins/mpeg/mpeg_properties.glade2 plugins/mpeg/options.c plugins/screenshot/screenshot.c plugins/screenshot/screenshot.glade2 plugins/subtitle/main.c plugins/subtitle/preferences.c plugins/subtitle/view.c plugins/teletext/bookmark.c plugins/teletext/export.c plugins/teletext/main.c plugins/teletext/preferences.c plugins/teletext/search.c plugins/teletext/toolbar.c plugins/teletext/view.c plugins/teletext/window.c #plugins/template/template.c src/audio.c src/capture.c src/channel_editor.c src/eggcellrendererkeys.c src/frequencies.c src/keyboard.c src/main.c src/mixer.c src/osd.c src/oss.c src/plugin_properties.c src/plugins.c src/properties.c src/properties-handler.c src/subtitle.c src/tveng1.c src/tveng25.c src/tvengbktr.c src/tveng.c #src/tvengemu.c src/tvengxv.c src/v4linterface.c #src/video_xv.c src/zapping.c #src/zapzilla.c src/zconf.c src/zgconf.c src/zmisc.c src/zspinslider.c src/zvbi.c zapping.desktop.in zapping.schemas.in zapping_setup_fb/zapping_setup_fb.c zapping_setup_fb/zapping_setup_fb.h zapping_setup_fb/v4l.c zapping_setup_fb/v4l2.c zapping_setup_fb/v4l25.c �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������zapping-0.10cvs6/po/ChangeLog����������������������������������������������������������������������� 644 � 764 � 144 � 704 7762173333 11151� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������2003-08-24 gettextize <bug-gnu-gettext@gnu.org> * Makefile.in.in: New file, from gettext-0.12.1. * boldquot.sed: New file, from gettext-0.12.1. * en@boldquot.header: New file, from gettext-0.12.1. * en@quot.header: New file, from gettext-0.12.1. * insert-header.sin: New file, from gettext-0.12.1. * quot.sed: New file, from gettext-0.12.1. * remove-potcdate.sin: New file, from gettext-0.12.1. * Rules-quot: New file, from gettext-0.12.1. ������������������������������������������������������������zapping-0.10cvs6/po/Makefile.in.in������������������������������������������������������������������ 644 � 764 � 144 � 16603 10324352654 12127� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# Makefile for program source directory in GNU NLS utilities package. # Copyright (C) 1995, 1996, 1997 by Ulrich Drepper <drepper@gnu.ai.mit.edu> # # This file file be copied and used freely without restrictions. It can # be used in projects which are not available under the GNU Public License # but which still want to provide support for the GNU gettext functionality. # Please note that the actual code is *not* freely available. # # - Modified by Owen Taylor <otaylor@redhat.com> to use GETTEXT_PACKAGE # instead of PACKAGE and to look for po2tbl in ./ not in intl/ # # - Modified by jacob berkman <jacob@ximian.com> to install # Makefile.in.in and po2tbl.sed.in for use with glib-gettextize # # - Modified by Rodney Dawes <dobey@novell.com> for use with intltool # # We have the following line for use by intltoolize: # INTLTOOL_MAKEFILE GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ PACKAGE = @PACKAGE@ VERSION = @VERSION@ SHELL = /bin/sh @SET_MAKE@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ top_builddir = .. VPATH = @srcdir@ prefix = @prefix@ exec_prefix = @exec_prefix@ datadir = @datadir@ datarootdir = @datarootdir@ libdir = @libdir@ localedir = $(libdir)/locale gnulocaledir = $(datadir)/locale gettextsrcdir = $(datadir)/glib-2.0/gettext/po subdir = po install_sh = @install_sh@ mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ CC = @CC@ GMSGFMT = @GMSGFMT@ MSGFMT = @MSGFMT@ XGETTEXT = @XGETTEXT@ INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ MSGMERGE = INTLTOOL_EXTRACT=$(INTLTOOL_EXTRACT) srcdir=$(srcdir) $(INTLTOOL_UPDATE) --gettext-package $(GETTEXT_PACKAGE) --dist GENPOT = INTLTOOL_EXTRACT=$(INTLTOOL_EXTRACT) srcdir=$(srcdir) $(INTLTOOL_UPDATE) --gettext-package $(GETTEXT_PACKAGE) --pot DEFS = @DEFS@ CFLAGS = @CFLAGS@ CPPFLAGS = @CPPFLAGS@ INCLUDES = -I.. -I$(top_srcdir)/intl COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS) SOURCES = POFILES = @POFILES@ GMOFILES = @GMOFILES@ DISTFILES = ChangeLog Makefile.in.in POTFILES.in \ $(POFILES) $(SOURCES) EXTRA_DISTFILES = POTFILES.skip Makevars LINGUAS POTFILES = \ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ .SUFFIXES: .SUFFIXES: .c .o .po .pox .gmo .mo .msg .cat .c.o: $(COMPILE) $< .po.pox: $(MAKE) $(GETTEXT_PACKAGE).pot $(MSGMERGE) $< $(GETTEXT_PACKAGE).pot -o $*.pox .po.mo: $(MSGFMT) -o $@ $< .po.gmo: file=`echo $* | sed 's,.*/,,'`.gmo \ && rm -f $$file && $(GMSGFMT) -o $$file $< .po.cat: sed -f ../intl/po2msg.sed < $< > $*.msg \ && rm -f $@ && gencat $@ $*.msg all: all-@USE_NLS@ all-yes: $(CATALOGS) all-no: $(GETTEXT_PACKAGE).pot: $(POTFILES) $(GENPOT) install: install-exec install-data install-exec: install-data: install-data-@USE_NLS@ install-data-no: all install-data-yes: all if test -n "$(MKINSTALLDIRS)"; then \ $(MKINSTALLDIRS) $(DESTDIR)$(datadir); \ else \ $(SHELL) $(top_srcdir)/mkinstalldirs $(DESTDIR)$(datadir); \ fi @catalogs='$(CATALOGS)'; \ for cat in $$catalogs; do \ cat=`basename $$cat`; \ case "$$cat" in \ *.gmo) destdir=$(gnulocaledir);; \ *) destdir=$(localedir);; \ esac; \ lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \ dir=$(DESTDIR)$$destdir/$$lang/LC_MESSAGES; \ if test -n "$(MKINSTALLDIRS)"; then \ $(MKINSTALLDIRS) $$dir; \ else \ $(SHELL) $(top_srcdir)/mkinstalldirs $$dir; \ fi; \ if test -r $$cat; then \ $(INSTALL_DATA) $$cat $$dir/$(GETTEXT_PACKAGE).mo; \ echo "installing $$cat as $$dir/$(GETTEXT_PACKAGE).mo"; \ else \ $(INSTALL_DATA) $(srcdir)/$$cat $$dir/$(GETTEXT_PACKAGE).mo; \ echo "installing $(srcdir)/$$cat as" \ "$$dir/$(GETTEXT_PACKAGE).mo"; \ fi; \ if test -r $$cat.m; then \ $(INSTALL_DATA) $$cat.m $$dir/$(GETTEXT_PACKAGE).mo.m; \ echo "installing $$cat.m as $$dir/$(GETTEXT_PACKAGE).mo.m"; \ else \ if test -r $(srcdir)/$$cat.m ; then \ $(INSTALL_DATA) $(srcdir)/$$cat.m \ $$dir/$(GETTEXT_PACKAGE).mo.m; \ echo "installing $(srcdir)/$$cat as" \ "$$dir/$(GETTEXT_PACKAGE).mo.m"; \ else \ true; \ fi; \ fi; \ done if test "$(PACKAGE)" = "glib"; then \ if test -n "$(MKINSTALLDIRS)"; then \ $(MKINSTALLDIRS) $(DESTDIR)$(gettextsrcdir); \ else \ $(SHELL) $(top_srcdir)/mkinstalldirs $(DESTDIR)$(gettextsrcdir); \ fi; \ $(INSTALL_DATA) $(srcdir)/Makefile.in.in \ $(DESTDIR)$(gettextsrcdir)/Makefile.in.in; \ else \ : ; \ fi # Define this as empty until I found a useful application. installcheck: uninstall: catalogs='$(CATALOGS)'; \ for cat in $$catalogs; do \ cat=`basename $$cat`; \ lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \ rm -f $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE).mo; \ rm -f $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE).mo.m; \ rm -f $(DESTDIR)$(gnulocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE).mo; \ rm -f $(DESTDIR)$(gnulocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE).mo.m; \ done if test "$(PACKAGE)" = "glib"; then \ rm -f $(DESTDIR)$(gettextsrcdir)/Makefile.in.in; \ fi check: all $(GETTEXT_PACKAGE).pot dvi info tags TAGS ID: mostlyclean: rm -f core core.* *.pox $(GETTEXT_PACKAGE).pot *.old.po cat-id-tbl.tmp rm -fr *.o rm -f .intltool-merge-cache clean: mostlyclean distclean: clean rm -f Makefile Makefile.in POTFILES rm -f *.mo *.msg *.cat *.cat.m $(GMOFILES) maintainer-clean: distclean @echo "This command is intended for maintainers to use;" @echo "it deletes files that may require special tools to rebuild." rm -f Makefile.in.in distdir = ../$(GETTEXT_PACKAGE)-$(VERSION)/$(subdir) dist distdir: $(DISTFILES) dists="$(DISTFILES)"; \ extra_dists="$(EXTRA_DISTFILES)"; \ for file in $$extra_dists; do \ test -f $$file && dists="$$dists $$file"; \ done; \ for file in $$dists; do \ ln $(srcdir)/$$file $(distdir) 2> /dev/null \ || cp -p $(srcdir)/$$file $(distdir); \ done update-po: Makefile $(MAKE) $(GETTEXT_PACKAGE).pot tmpdir=`pwd`; \ catalogs='$(CATALOGS)'; \ for cat in $$catalogs; do \ cat=`basename $$cat`; \ lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \ echo "$$lang:"; \ result="`$(MSGMERGE) -o $$tmpdir/$$lang.new.po $$lang`"; \ if $$result; then \ if cmp $(srcdir)/$$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \ rm -f $$tmpdir/$$lang.new.po; \ else \ if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \ :; \ else \ echo "msgmerge for $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \ rm -f $$tmpdir/$$lang.new.po; \ exit 1; \ fi; \ fi; \ else \ echo "msgmerge for $$cat failed!"; \ rm -f $$tmpdir/$$lang.new.po; \ fi; \ done # POTFILES is created from POTFILES.in by stripping comments, empty lines # and Intltool tags (enclosed in square brackets), and appending a full # relative path to them POTFILES: POTFILES.in ( posrcprefix='$(top_srcdir)/'; \ rm -f $@-t $@ \ && (sed -e '/^#/d' \ -e 's/^[[].*] *//' \ -e '/^[ ]*$$/d' \ -e "s@^@ $$posrcprefix@" $(srcdir)/$@.in \ | sed -e '$$!s/$$/ \\/') > $@-t \ && chmod a-w $@-t \ && mv $@-t $@ ) Makefile: Makefile.in.in ../config.status POTFILES cd .. \ && CONFIG_FILES=$(subdir)/$@.in CONFIG_HEADERS= \ $(SHELL) ./config.status # Tell versions [3.59,3.63) of GNU make not to export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: �����������������������������������������������������������������������������������������������������������������������������zapping-0.10cvs6/src/������������������������������������������������������������������������������� 777 � 764 � 144 � 0 10443536410 7600� 5�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������zapping-0.10cvs6/src/zgconf.c����������������������������������������������������������������������� 644 � 764 � 144 � 50534 10371710575 11263� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Zapping TV viewer * * Copyright (C) 2004 Michael H. Schimek * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* $Id: zgconf.c,v 1.6 2006/02/06 18:12:13 mschimek Exp $ */ #ifdef HAVE_CONFIG_H # include "config.h" #endif #include <math.h> /* fabs() */ #include "common/intl-priv.h" /* _() */ #include "globals.h" /* gconf_client */ #include "zspinslider.h" #include "zgconf.h" const gchar * z_gconf_value_type_name (GConfValueType type) { switch (type) { #undef CASE #define CASE(s) case GCONF_VALUE_##s : return #s CASE (INVALID); CASE (STRING); CASE (INT); CASE (FLOAT); CASE (BOOL); CASE (SCHEMA); CASE (LIST); CASE (PAIR); default: break; } return NULL; } static gboolean z_gconf_value_get (gpointer result, GConfValue * value, const gchar * key, GConfValueType type) { if (type == value->type) { switch (type) { case GCONF_VALUE_STRING: *(const gchar **) result = gconf_value_get_string (value); break; case GCONF_VALUE_INT: *(gint *) result = gconf_value_get_int (value); break; case GCONF_VALUE_FLOAT: *(gdouble *) result = gconf_value_get_float (value); break; case GCONF_VALUE_BOOL: *(gboolean *) result = gconf_value_get_bool (value); break; default: g_assert_not_reached (); break; } return TRUE; } else { g_warning ("GConf key '%s' has wrong type %s, expected %s.\n", key ? key : "<unknown>", z_gconf_value_type_name (value->type), z_gconf_value_type_name (type)); return FALSE; } } static void z_gconf_handle_get_error (const gchar * key, GError ** error) { static gboolean warned = FALSE; if (*error) { g_warning ("GConf get '%s' error:\n%s\n", key, (*error)->message); g_error_free (*error); *error = NULL; } else if (!warned) { g_warning ("GConf key '%s' is unset and has no default. " "Zapping schemas incomplete or not installed?\n", key); warned = TRUE; } } /* Like gconf_client_get(), but uses our default GConfClient and handles the GConfValue stuff. On success the function returns TRUE and stores the value at *result. On failure it returns FALSE and prints various diagnostic messages on stdout. You shouldn't call this directly but z_gconf_get_bool, -int, etc for proper type checking. If you don't test for success (this function isn't really supposed to fail) set *result to some default before calling. (Schemes should provide defaults but may fail too.) */ gboolean z_gconf_get (gpointer result, const gchar * key, GConfValueType type) { GError *error = NULL; GConfValue *value; if ((value = gconf_client_get (gconf_client, key, &error))) { gboolean success; g_assert (!error); success = z_gconf_value_get (result, value, key, type); if (GCONF_VALUE_STRING == type) { gchar **string = result; *string = g_strdup (*string); } gconf_value_free (value); return success; } else { z_gconf_handle_get_error (key, &error); return FALSE; } } /* Convenient contraction of z_gconf_get_string() and gconf_string_to_enum(). */ gboolean z_gconf_get_string_enum (gint * enum_value, const gchar * key, const GConfEnumStringPair *lookup_table) { gchar *s; gboolean r; r = FALSE; if (z_gconf_get_string (&s, key)) { r = gconf_string_to_enum (lookup_table, s, enum_value); g_free (s); } return r; } static void z_gconf_handle_set_error (const gchar * key, GError ** error) { if (*error) { g_warning ("GConf set '%s' error:\n%s\n", key, (*error)->message); g_error_free (*error); *error = NULL; } } /* Like gconf_client_set_<type>(), but uses our default GConfClient and prints diagnostic messages on failure (the function is not really supposed to fail). Returns success. */ #define Z_GCONF_SET(T1, T2) \ gboolean \ z_gconf_set_##T1 (const gchar * key, \ T2 value) \ { \ GError *error = NULL; \ gboolean success; \ \ success = gconf_client_set_##T1 (gconf_client, key, value, &error); \ z_gconf_handle_set_error (key, &error); \ \ return success; \ } Z_GCONF_SET (bool, gboolean) Z_GCONF_SET (int, gint) Z_GCONF_SET (float, gdouble) Z_GCONF_SET (string, const gchar *) void z_gconf_notify_remove (guint cnxn_id) { gconf_client_notify_remove (gconf_client, cnxn_id); } /* Like gconf_client_notify_add(), but uses our default GConfClient and prints diagnostic messages on failure (the function is not really supposed to fail). On success it calls func once with the current value of key for initialization, and returns TRUE. */ gboolean z_gconf_notify_add (const gchar * key, GConfClientNotifyFunc func, gpointer user_data) { GError *error = NULL; GConfEntry entry; guint cnxn_id; cnxn_id = gconf_client_notify_add (gconf_client, key, func, user_data, /* destroy */ NULL, &error); if (error) { g_warning ("GConf notification '%s' error:\n%s\n", key, error->message); g_error_free (error); error = NULL; return FALSE; } /* Initial value. */ entry.key = key; if ((entry.value = gconf_client_get (gconf_client, key, &error))) { func (gconf_client, cnxn_id, &entry, user_data); gconf_value_free (entry.value); return TRUE; } else { z_gconf_handle_get_error (key, &error); gconf_client_notify_remove (gconf_client, cnxn_id); return FALSE; } } #define Z_GCONF_AUTO(T1, type) \ static void \ auto_##T1 (GConfClient * client _unused_, \ guint cnxn_id _unused_, \ GConfEntry * entry, \ gpointer var) \ { \ if (entry->value) \ z_gconf_value_get (var, entry->value, NULL, GCONF_VALUE_##type); \ } Z_GCONF_AUTO (bool, BOOL) Z_GCONF_AUTO (int, INT) Z_GCONF_AUTO (float, FLOAT) /* This is a combination of z_gconf_get() and z_gconf_notify_add(). The function stores the current value of the key in var, and updates var on all future changes of the key. There is no way to turn this off until program termination, so var must be global. You shouldn't call this directly but z_gconf_auto_update_bool, -int, -float etc for proper type checking. */ gboolean z_gconf_auto_update (gpointer var, const gchar * key, GConfValueType type) { GConfClientNotifyFunc func; switch (type) { case GCONF_VALUE_BOOL: func = auto_bool; break; case GCONF_VALUE_INT: func = auto_int; break; case GCONF_VALUE_FLOAT: func = auto_float; break; default: g_assert_not_reached (); break; } return z_gconf_notify_add (key, func, var); } typedef struct { gchar * key; /* the key we monitor (copy) */ GConfValueType type; guint cnxn; /* GConf connection ID */ gpointer var; /* optional auto-update */ GObject * object; /* connected Widget */ } notify; static void notify_destroy (notify * n) { if (0 != n->cnxn) gconf_client_notify_remove (gconf_client, n->cnxn); g_free (n->key); g_free (n); } static void notify_add (notify * n, const char * key, GConfClientNotifyFunc func) { GError *error = NULL; n->key = g_strdup (key); n->cnxn = gconf_client_notify_add (gconf_client, key, func, n, /* destroy */ NULL, &error); if (error) { /* This is fatal, will not return. */ g_error ("GConf notification '%s' error:\n%s\n", key, error->message); } } static void toggle_action_notify (GConfClient * client _unused_, guint cnxn_id _unused_, GConfEntry * entry, notify * n) { GtkToggleAction *action; gboolean active; if (!entry->value) return; /* unset */ active = gconf_value_get_bool (entry->value); action = GTK_TOGGLE_ACTION (n->object); /* Breaks recursion. */ if (active == gtk_toggle_action_get_active (action)) return; gtk_toggle_action_set_active (action, active); if (n->var) *((gboolean *) n->var) = active; } static void toggle_action_toggled (GtkToggleAction * toggle_action, notify * n) { gboolean active; active = gtk_toggle_action_get_active (toggle_action); /* Error ignored. */ z_gconf_set_bool (n->key, active); if (n->var) *((gboolean *) n->var) = active; } /* Connects a GConf key to a GtkToggleAction. Sets the action state from the current value of the key, or keeps the current action state on failure. When the action state later changes, so will the key and vice versa (think gconf-editor). The connection remains until the action is destroyed. */ void z_toggle_action_connect_gconf_key (GtkToggleAction * toggle_action, const gchar * key) { GError *error = NULL; notify *n; GConfValue *value; if ((value = gconf_client_get (gconf_client, key, &error))) { gboolean active; /* No error and value is set. Synchronize action with gconf. */ active = gconf_value_get_bool (value); gconf_value_free (value); gtk_toggle_action_set_active (toggle_action, active); } else { /* Error ignored. */ z_gconf_handle_get_error (key, &error); } n = g_malloc0 (sizeof (*n)); n->var = NULL; n->object = G_OBJECT (toggle_action); notify_add (n, key, (GConfClientNotifyFunc) toggle_action_notify); g_signal_connect_data (G_OBJECT (toggle_action), "toggled", G_CALLBACK (toggle_action_toggled), n, (GClosureNotify) notify_destroy, /* connect_flags */ 0); } static void toggle_button_notify (GConfClient * client _unused_, guint cnxn_id _unused_, GConfEntry * entry, notify * n) { GtkToggleButton *button; gboolean active; if (!entry->value) return; /* unset */ active = gconf_value_get_bool (entry->value); button = GTK_TOGGLE_BUTTON (n->object); /* Breaks recursion. */ if (active == gtk_toggle_button_get_active (button)) return; gtk_toggle_button_set_active (button, active); if (n->var) *((gboolean *) n->var) = active; } static void toggle_button_toggled (GtkToggleButton * toggle_button, notify * n) { gboolean active; active = gtk_toggle_button_get_active (toggle_button); /* Error ignored. */ z_gconf_set_bool (n->key, active); if (n->var) *((gboolean *) n->var) = active; } /* Creates a new GtkCheckButton connected to a GConf key. Sets the button state from the current value of the key, or if that fails, from active. When the button state later changes, so will the key and vice versa (think gconf-editor). Additionally when var is not NULL the value of the key will be stored here as with z_gconf_auto_update_bool(). */ GtkWidget * z_gconf_check_button_new (const gchar * label, const gchar * key, gboolean * var, gboolean active) { notify *n; n = g_malloc0 (sizeof (*n)); n->var = var; n->object = G_OBJECT (gtk_check_button_new_with_mnemonic (label)); if (!var) var = &active; /* Error ignored. */ z_gconf_get_bool (var, key); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (n->object), *var); notify_add (n, key, (GConfClientNotifyFunc) toggle_button_notify); g_signal_connect_data (n->object, "toggled", G_CALLBACK (toggle_button_toggled), n, (GClosureNotify) notify_destroy, /* connect_flags */ 0); return GTK_WIDGET (n->object); } static void int_slider_notify (GConfClient * client _unused_, guint cnxn_id _unused_, GConfEntry * entry, notify * n) { ZSpinSlider *spinslider; gint gvalue; gint svalue; if (!entry->value) return; /* unset */ gvalue = gconf_value_get_int (entry->value); spinslider = Z_SPINSLIDER (n->object); svalue = z_spinslider_get_int_value (spinslider); /* Breaks recursion. */ if (gvalue == svalue) return; z_spinslider_set_int_value (spinslider, gvalue); if (n->var) *((gint *) n->var) = gvalue; } static void int_slider_changed (GtkObject * adj _unused_, notify * n) { ZSpinSlider *spinslider; gint value; spinslider = Z_SPINSLIDER (n->object); value = z_spinslider_get_int_value (spinslider); /* Error ignored. */ z_gconf_set_int (n->key, value); if (n->var) *((gint *) n->var) = value; } /* Creates a new integer SpinSlider connected to a GConf key. Sets the value from the current value of the key, or if that fails, from def_value. When the slider value later changes, so will the key and vice versa (think gconf-editor). Additionally when var is not NULL the value of the key will be stored here as with z_gconf_auto_update_int(). */ GtkWidget * z_gconf_int_spinslider_new (gint def_value, gint min_value, gint max_value, gint step_incr, gint page_incr, gint page_size, const gchar * key, gint * var) { notify *n; GtkObject *adj; GtkWidget *spinslider; n = g_malloc0 (sizeof (*n)); n->var = var; if (!var) var = &def_value; /* Error ignored. */ z_gconf_get_int (var, key); adj = gtk_adjustment_new ((gdouble) *var, (gdouble) min_value, (gdouble) max_value, (gdouble) step_incr, (gdouble) page_incr, (gdouble) page_size); spinslider = z_spinslider_new (GTK_ADJUSTMENT (adj), NULL, NULL, *var, 0); n->object = G_OBJECT (spinslider); notify_add (n, key, (GConfClientNotifyFunc) int_slider_notify); g_signal_connect_data (G_OBJECT (adj), "value-changed", G_CALLBACK (int_slider_changed), n, (GClosureNotify) notify_destroy, /* connect_flags */ 0); return spinslider; } static void float_slider_notify (GConfClient * client _unused_, guint cnxn_id _unused_, GConfEntry * entry, notify * n) { ZSpinSlider *spinslider; gdouble gvalue; gdouble svalue; if (!entry->value) return; /* unset */ gvalue = gconf_value_get_float (entry->value); spinslider = Z_SPINSLIDER (n->object); svalue = z_spinslider_get_value (spinslider); /* Breaks recursion. */ if (fabs (gvalue - svalue) < 0.0001) return; z_spinslider_set_value (spinslider, gvalue); if (n->var) *((gdouble *) n->var) = gvalue; } static void float_slider_changed (GtkObject * adj _unused_, notify * n) { ZSpinSlider *spinslider; gdouble value; spinslider = Z_SPINSLIDER (n->object); value = z_spinslider_get_value (spinslider); /* Error ignored. */ z_gconf_set_float (n->key, value); if (n->var) *((gdouble *) n->var) = value; } GtkWidget * z_gconf_float_spinslider_new (gdouble def_value, gdouble min_value, gdouble max_value, gdouble step_incr, gdouble page_incr, gdouble page_size, gint digits, const gchar * key, gdouble * var) { notify *n; GtkObject *adj; GtkWidget *spinslider; n = g_malloc0 (sizeof (*n)); n->var = var; if (!var) var = &def_value; /* Error ignored. */ z_gconf_get_float (var, key); adj = gtk_adjustment_new (*var, min_value, max_value, step_incr, page_incr, page_size); spinslider = z_spinslider_new (GTK_ADJUSTMENT (adj), NULL, NULL, *var, digits); n->object = G_OBJECT (spinslider); notify_add (n, key, (GConfClientNotifyFunc) float_slider_notify); g_signal_connect_data (G_OBJECT (adj), "value-changed", G_CALLBACK (float_slider_changed), n, (GClosureNotify) notify_destroy, /* connect_flags */ 0); return spinslider; } typedef struct { notify n; const GConfEnumStringPair *lookup_table; } notify_combo_box; static void combo_box_notify (GConfClient * client _unused_, guint cnxn_id _unused_, GConfEntry * entry, notify_combo_box * n) { GtkComboBox *combo_box; combo_box = GTK_COMBO_BOX (n->n.object); if (entry->value) { const gchar *s; if ((s = gconf_value_get_string (entry->value))) { guint i; if (n->n.var) *((const gchar **) n->n.var) = s; for (i = 0; n->lookup_table[i].str; ++i) { if (0 == strcmp (s, n->lookup_table[i].str)) { gint index; index = gtk_combo_box_get_active (combo_box); if ((gint) i != index) gtk_combo_box_set_active (combo_box, (gint) i); return; } } } } gtk_combo_box_set_active (combo_box, -1 /* unset */); } static void combo_box_changed (GtkComboBox * combo_box, notify_combo_box * n) { gint index; index = gtk_combo_box_get_active (combo_box); /* Error ignored. */ z_gconf_set_string (n->n.key, n->lookup_table[index].str); if (n->n.var) *((const gchar **) n->n.var) = n->lookup_table[index].str; } /* Creates a new GtkComboBox connected to a GConf string key. The combo box is built from NULL terminated, _N localized string vector menu, the GConf lookup_table is used to convert item indices to GConf string values and vice versa. The function sets the active item from the current value of the key, or if that fails, to "unset". When the active item later changes, so will the key and vice versa. NOTE the lookup_table will be used until the combo box is destroyed, should be statically allocated. */ GtkWidget * z_gconf_combo_box_new (const gchar ** menu, const gchar * key, const GConfEnumStringPair *lookup_table) { GError *error = NULL; notify_combo_box *n; GtkComboBox *combo_box; guint i; gchar *s; n = g_malloc0 (sizeof (*n)); n->n.var = NULL; n->n.object = G_OBJECT (gtk_combo_box_new_text ()); combo_box = GTK_COMBO_BOX (n->n.object); for (i = 0; menu[i]; ++i) gtk_combo_box_append_text (combo_box, _(menu[i])); if ((s = gconf_client_get_string (gconf_client, key, &error))) { for (i = 0; lookup_table[i].str; ++i) { if (0 == strcmp (s, lookup_table[i].str)) { gtk_combo_box_set_active (combo_box, (int) i); break; } } } else { gtk_combo_box_set_active (combo_box, 0); z_gconf_handle_get_error (key, &error); } n->lookup_table = lookup_table; /* NOTE */ notify_add (&n->n, key, (GConfClientNotifyFunc) combo_box_notify); g_signal_connect (n->n.object, "changed", G_CALLBACK (combo_box_changed), n); g_signal_connect_swapped (n->n.object, "destroy", G_CALLBACK (notify_destroy), n); return GTK_WIDGET (n->n.object); } gboolean string_to_color (GdkColor * color, const gchar * string) { gchar *s; gboolean r; guint value; guint i; g_return_val_if_fail (NULL != color, FALSE); g_return_val_if_fail (NULL != string, FALSE); s = string; r = FALSE; while (g_ascii_isspace (*s)) ++s; if ('#' != *s++) goto failure; while (g_ascii_isspace (*s)) ++s; value = 0; for (i = 0; i < 6; ++i) { if (g_ascii_isdigit (*s)) value = value * 16 + (*s - '0'); else if (g_ascii_isxdigit (*s)) value = value * 16 + ((*s - ('A' - 0xA)) & 0xF); else goto failure; ++s; } while (g_ascii_isspace (*s)) ++s; if (0 != *s) goto failure; r = TRUE; color->pixel = 0; color->red = (value & 0xFF0000) >> 8; color->red |= color->red >> 8; color->green = value & 0xFF00; color->green |= color->green >> 8; color->blue = value & 0xFF; color->blue |= color->blue << 8; failure: return r; } extern gboolean z_gconf_set_color (const gchar * key, const GdkColor * color) { gchar *str; gboolean success; g_return_val_if_fail (key != NULL, FALSE); g_return_val_if_fail (color != NULL, FALSE); str = g_strdup_printf ("#%02X%02X%02X", color->red >> 8, color->green >> 8, color->blue >> 8); success = z_gconf_set_string (key, str); g_free (str); return success; } extern gboolean z_gconf_get_color (GdkColor * color, const gchar * key) { gchar *str; gboolean success; if (!z_gconf_get_string (&str, key)) return FALSE; success = string_to_color (color, str); g_free (str); return success; } ��������������������������������������������������������������������������������������������������������������������������������������������������������������������zapping-0.10cvs6/src/zgconf.h����������������������������������������������������������������������� 644 � 764 � 144 � 6665 10371710541 11247� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Zapping TV viewer * * Copyright (C) 2004 Michael H. Schimek * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* $Id: zgconf.h,v 1.5 2006/02/06 18:11:45 mschimek Exp $ */ #ifndef Z_GCONF_H #define Z_GCONF_H #include <gtk/gtk.h> #include <gconf/gconf-client.h> #include "zmisc.h" /* _unused_ */ extern const gchar * z_gconf_value_type_name (GConfValueType type); extern gboolean z_gconf_get (gpointer result, const gchar * key, GConfValueType type); extern gboolean z_gconf_auto_update (gpointer var, const gchar * key, GConfValueType type); #define Z_GCONF_SET_GET_NOTIFY(T1, T2, type) \ extern gboolean \ z_gconf_set_##T1 (const gchar *key, T2 value); \ static __inline__ gboolean \ z_gconf_get_##T1 (T2 *result, const gchar *key) \ { return z_gconf_get (result, key, GCONF_VALUE_##type); } \ static __inline__ gboolean \ z_gconf_auto_update_##T1 (T2 *var, const gchar *key) \ { return z_gconf_auto_update (var, key, GCONF_VALUE_##type); } Z_GCONF_SET_GET_NOTIFY (bool, gboolean, BOOL) Z_GCONF_SET_GET_NOTIFY (int, gint, INT) Z_GCONF_SET_GET_NOTIFY (float, gdouble, FLOAT) extern gboolean z_gconf_set_string (const gchar * key, const gchar * string); static __inline__ gboolean z_gconf_get_string (gchar ** result, const gchar * key) { return z_gconf_get (result, key, GCONF_VALUE_STRING); } extern gboolean z_gconf_get_string_enum (gint * enum_value, const gchar * gconf_key, const GConfEnumStringPair *lookup_table); extern void z_gconf_notify_remove (guint cnxn_id); extern gboolean z_gconf_notify_add (const gchar * key, GConfClientNotifyFunc func, gpointer user_data); extern void z_toggle_action_connect_gconf_key (GtkToggleAction * toggle_action, const gchar * key); extern GtkWidget * z_gconf_check_button_new (const gchar * label, const gchar * key, gboolean * var, gboolean active); extern GtkWidget * z_gconf_int_spinslider_new (gint def_value, gint min_value, gint max_value, gint step_incr, gint page_incr, gint page_size, const gchar * key, gint * var); GtkWidget * z_gconf_float_spinslider_new (gdouble def_value, gdouble min_value, gdouble max_value, gdouble step_incr, gdouble page_incr, gdouble page_size, gint digits, const gchar * key, gdouble * var); extern GtkWidget * z_gconf_combo_box_new (const gchar ** menu, const gchar * key, const GConfEnumStringPair *lookup_table); extern gboolean string_to_color (GdkColor * color, const gchar * string); extern gboolean z_gconf_set_color (const gchar * key, const GdkColor * color); extern gboolean z_gconf_get_color (GdkColor * color, const gchar * string); #endif /* Z_GCONF_H */ ���������������������������������������������������������������������������zapping-0.10cvs6/src/zmodel.c����������������������������������������������������������������������� 644 � 764 � 144 � 5233 10173357431 11241� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* GDK - The GIMP Drawing Kit * Copyright (C) 2000 Red Hat, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ /* * Modified by the GTK+ Team and others 1997-2000. See the AUTHORS * file for a list of people on the GTK+ Team. See the ChangeLog * files for a list of changes. These files are distributed with * GTK+ at ftp://ftp.gtk.org/pub/gtk/. */ #ifdef HAVE_CONFIG_H # include "config.h" #endif #include "zmisc.h" #include "zmodel.h" #include "zmarshalers.h" enum { CHANGED, LAST_SIGNAL }; static void zmodel_init (ZModel *zmodel); static void zmodel_class_init (ZModelClass *klass); static gpointer parent_class = NULL; static guint signals[LAST_SIGNAL] = { 0 }; GType zmodel_get_type (void) { static GType object_type = 0; if (!object_type) { static const GTypeInfo object_info = { sizeof (ZModelClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) zmodel_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (ZModel), 0, /* n_preallocs */ (GInstanceInitFunc) zmodel_init, }; object_type = g_type_register_static (G_TYPE_OBJECT, "ZModel", &object_info, 0); } return object_type; } static void zmodel_init (ZModel *zmodel _unused_) { } static void zmodel_class_init (ZModelClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); parent_class = g_type_class_peek_parent (klass); signals[CHANGED] = g_signal_new ("changed", G_OBJECT_CLASS_TYPE (object_class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (ZModelClass, changed), NULL, NULL, z_marshal_VOID__VOID, G_TYPE_NONE, 0); } ZModel * zmodel_new (void) { return (ZMODEL(g_object_new (ZMODEL_TYPE, NULL))); } void zmodel_changed (ZModel *zmodel) { g_signal_emit (zmodel, signals[CHANGED], 0); } ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������zapping-0.10cvs6/src/zmodel.h����������������������������������������������������������������������� 644 � 764 � 144 � 4207 7762173334 11236� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Adapted from gdkkeys.[ch] in the gdk sources. Original copyright follows */ /* GDK - The GIMP Drawing Kit * Copyright (C) 2000 Red Hat, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ /* * Modified by the GTK+ Team and others 1997-2000. See the AUTHORS * file for a list of people on the GTK+ Team. See the ChangeLog * files for a list of changes. These files are distributed with * GTK+ at ftp://ftp.gtk.org/pub/gtk/. */ #ifndef __Z_MODEL_H__ #define __Z_MODEL_H__ #include <glib-object.h> #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ typedef struct _ZModel ZModel; typedef struct _ZModelClass ZModelClass; #define ZMODEL_TYPE (zmodel_get_type ()) #define ZMODEL(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), ZMODEL_TYPE, ZModel)) #define ZMODEL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), ZMODEL_TYPE, ZModelClass)) #define Z_IS_MODEL(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), ZMODEL_TYPE)) #define Z_IS_MODEL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), ZMODEL_TYPE)) #define ZMODEL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), ZMODEL_TYPE, ZModelClass)) struct _ZModel { GObject parent_instance; }; struct _ZModelClass { GObjectClass parent_class; void (*changed) (ZModel *zmodel); }; GType zmodel_get_type (void) G_GNUC_CONST; ZModel* zmodel_new (void); void zmodel_changed (ZModel *zmodel); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* __Z_MODEL_H__ */ �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������zapping-0.10cvs6/src/interface.c�������������������������������������������������������������������� 644 � 764 � 144 � 11041 10203402632 11705� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Zapping (TV viewer for the Gnome Desktop) * * Copyright (C) 2001 Iaki Garca Etxebarria * Copyright (C) 2003 Michael H. Schimek * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* $Id: interface.c,v 1.34 2005/02/12 13:33:14 mschimek Exp $ */ /* XXX gtk+ 2.3 toolbar changes */ #undef GTK_DISABLE_DEPRECATED #ifdef HAVE_CONFIG_H # include "config.h" #endif #include <gnome.h> #include <glade/glade.h> #include "interface.h" #include "zmisc.h" #include "globals.h" #include "zconf.h" #include "properties-handler.h" #include "zvideo.h" #include "v4linterface.h" #include "plugins.h" #include "remote.h" extern gboolean have_wm_hints; /* Finds the named widget in the tree parent belongs to. Returns a pointer to it or NULL if not found. */ GtkWidget * find_widget (GtkWidget * parent, const gchar * name) { GtkWidget *widget; GtkWidget *result; GladeXML *tree; gchar *buf; widget = parent; result = NULL; buf = g_strconcat ("registered-widget-", name, NULL); while (widget) { if ((result = (GtkWidget*) g_object_get_data (G_OBJECT (widget), buf))) break; /* found registered widget with that name */ if ((tree = glade_get_widget_tree (widget))) if ((result = glade_xml_get_widget (tree, name))) break; /* found glade widget with that name */ if (0) fprintf (stderr, "found '%s'\n", glade_get_widget_name (widget)); if (GTK_IS_MENU (widget)) widget = gtk_menu_get_attach_widget (GTK_MENU (widget)); else widget = widget->parent; } g_free (buf); return result; } /* Tries to find a widget that is accesible though parent, named name. IMHO this should be called glade_lookup_widget and go into libglade, but anyway... If the widget isn't found, a message is printed and the program quits, it always returns a valid widget. */ GtkWidget * lookup_widget (GtkWidget * parent, const gchar * name) { GtkWidget *widget = find_widget (parent, name); if (!widget) { RunBox ("Widget %s not found, please contact the maintainer", GTK_MESSAGE_ERROR, name); exit (EXIT_FAILURE); } return widget; } /* Register a widget to be found with find_widget() or lookup_widget(). The information is attached to the toplevel ancestor of parent, or when NULL of the widget. */ void register_widget (GtkWidget * parent, GtkWidget * widget, const char * name) { if (!parent) parent = widget; for (;;) { if (!GTK_IS_MENU (parent) && !parent->parent) { gchar * buf; buf = g_strconcat ("registered-widget-", name, NULL); g_object_set_data (G_OBJECT (parent), buf, widget); g_free (buf); return; } if (GTK_IS_MENU (parent)) parent = gtk_menu_get_attach_widget (GTK_MENU (parent)); else parent = parent->parent; if (!parent) return; /* toplevel not found */ } } /** * build_widget: * @name: Name of the widget. * @file: Name of the Glade file. * * Loads a GtkWidget from a Glade file, when @file is %NULL from * zapping.glade2. All the memory is freed when the object (widget) * is destroyed. If name is %NULL, all widgets are loaded, but this * is not recommended. * * Return value: * Widget pointer, cannot fail. **/ GtkWidget * build_widget (const gchar * name, const gchar * file) { GladeXML *xml; GtkWidget *widget; gchar *path; if (!file) file = "zapping.glade2"; path = g_strconcat (PACKAGE_DATA_DIR "/" PACKAGE "/", file, NULL); xml = glade_xml_new (path, name, NULL); if (!xml) { RunBox ("File %s [%s] not found, please contact the maintainer", GTK_MESSAGE_ERROR, path, name); exit (EXIT_FAILURE); } g_free (path); widget = glade_xml_get_widget (xml, name); if (!widget) { RunBox ("Widget %s not found in %s, please contact the maintainer", GTK_MESSAGE_ERROR, name, path); exit (EXIT_FAILURE); } glade_xml_signal_autoconnect (xml); return widget; } �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������zapping-0.10cvs6/src/interface.h�������������������������������������������������������������������� 644 � 764 � 144 � 2510 10167772044 11713� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Zapping (TV viewer for the Gnome Desktop) * * Copyright (C) 2001 Iaki Garca Etxebarria * Copyright (C) 2003 Michael H. Schimek * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* $Id: interface.h,v 1.19 2005/01/08 14:54:28 mschimek Exp $ */ #ifndef INTERFACE_H #define INTERFACE_H #include <gtk/gtk.h> extern GtkWidget * find_widget (GtkWidget * parent, const gchar * name); extern GtkWidget * lookup_widget (GtkWidget * parent, const gchar * name); extern void register_widget (GtkWidget * parent, GtkWidget * widget, const char * name); extern GtkWidget * build_widget (const gchar * name, const gchar * file); #endif /* INTERFACE_H */ ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������zapping-0.10cvs6/src/zapping_remote.c��������������������������������������������������������������� 644 � 764 � 144 � 13600 10431700713 12777� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Zapping (TV viewer for the Gnome Desktop) * Copyright (C) 2003 Michael H. Schimek * * Shameless copy of xawtv-remote.c (C) Gerd Knorr * based on code shamelessly stolen from Netscape * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* $Id: zapping_remote.c,v 1.4 2006/05/14 19:15:23 mschimek Exp $ */ #include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <string.h> #include <X11/Xlib.h> #include <X11/Xatom.h> #include <X11/Xmu/WinUtil.h> /* for XmuClientWindow() */ #include "zmisc.h" static unsigned int debug = 0; static int x11_error_dev_null(Display * dpy _unused_, XErrorEvent * event _unused_) { fprintf(stderr,"x11-error\n"); return 0; } static Window find_window(Display * dpy, Atom atom) { int n; unsigned int i; Window root = RootWindowOfScreen(DefaultScreenOfDisplay(dpy)); Window root2, parent, *kids; unsigned int nkids; Window result = 0; if (!XQueryTree(dpy, root, &root2, &parent, &kids, &nkids)) { fprintf(stderr, "XQueryTree failed on display %s\n", DisplayString(dpy)); exit(2); } if (!(kids && nkids)) { fprintf(stderr, "root window has no children on display %s\n", DisplayString(dpy)); exit(2); } for (n = nkids - 1; n >= 0; n--) { Atom type; int format; unsigned long nitems, bytesafter; unsigned char *args = NULL; Window w = XmuClientWindow(dpy, kids[n]); XGetWindowProperty(dpy, w, atom, 0, (65536 / sizeof(long)), False, XA_STRING, &type, &format, &nitems, &bytesafter, &args); if (!args) continue; if (debug) { printf("query 0x%08lx: ",w); for (i = 0; i < nitems; i += strlen ((char *)(args + i)) + 1) printf("%s ", args + i); printf("\n"); } XFree(args); result = w; #if 0 /* there might be more than window */ break; #endif } return result; } static void pass_cmd (Display * dpy, Atom atom, Window win, int argc, char ** argv) { int i, len; char *pass; if (debug) printf("ctrl 0x%08lx: ",win); for (len = 0, i = 0; i < argc; i++) { if (debug) printf("%s ",argv[i]); len += strlen(argv[i]) + 1; } if (debug) printf("\n"); pass = malloc((unsigned int) len); pass[0] = 0; for (len = 0, i = 0; i < argc; i++) strcpy(pass + len, argv[i]), len += strlen(argv[i]) + 1; XChangeProperty(dpy, win, atom, XA_STRING, 8, PropModeReplace, (void *) pass, len); free(pass); } static void usage (const char * argv0) { const char *prog; if (NULL != (prog = strrchr (argv0, '/'))) ++prog; else prog = argv0; fprintf (stderr, "Usage: %s [ options ] [ command ]\n" "\n" "Available options:\n" " -d display\n" " select X11 display.\n" " -i window ID\n" " select XawTV or Zapping window.\n" " -v n\n" " Set debug level to n, default 0.\n" " -x\n" " xawtv-remote compatible.\n" "\n" "By default this tool sends Python commands to Zapping. You\n" "will have to put commands in \'single\' or \"double\" quotes\n" "to prevent shell expansion. When the -x option is given you\n" "can send XawTV commands, see the xawtv-remote manual page for\n" "details. Zapping also responds to xawtv-remote.\n" "\n" "Usage example:\n" "%s \'zapping.mute()\'\n" , prog, prog); } int main (int argc, char ** argv) { char *display_name; Window window; int xawtv_mode; Display *display; Atom _XA_XAWTV_STATION; Atom _XA_XAWTV_REMOTE; Atom _XA_ZAPPING_REMOTE; display_name = NULL; window = 0; xawtv_mode = 0; for (;;) { int c; c = getopt (argc, argv, "hd:i:v:x"); if (-1 == c) break; switch (c) { case 'd': display_name = optarg; break; case 'i': window = strtol (optarg, NULL, 0); break; case 'v': debug = strtol (optarg, NULL, 0); break; case 'x': xawtv_mode ^= 1; break; case 'h': usage (argv[0]); exit (0); default: usage (argv[0]); exit (1); } } display = XOpenDisplay (display_name); if (!display) { fprintf (stderr, "Can't open display %s\n", display_name ? display_name : ""); exit (1); } XSetErrorHandler (x11_error_dev_null); _XA_XAWTV_STATION = XInternAtom (display, "_XAWTV_STATION", False); _XA_XAWTV_REMOTE = XInternAtom (display, "_XAWTV_REMOTE", False); _XA_ZAPPING_REMOTE = XInternAtom (display, "_ZAPPING_REMOTE", False); if (0 == window) { window = find_window (display, _XA_XAWTV_STATION); if (0 == window) { fprintf (stderr, "Zapping not running\n"); exit (2); } } if (argc > optind) { if (xawtv_mode) { pass_cmd (display, _XA_XAWTV_REMOTE, window, argc - optind, argv + optind); } else { pass_cmd (display, _XA_ZAPPING_REMOTE, window, argc - optind, argv + optind); } } else { /* interactive mode? zapping_remote <file.py? */ } XCloseDisplay (display); return 0; } ��������������������������������������������������������������������������������������������������������������������������������zapping-0.10cvs6/src/tveng25.c���������������������������������������������������������������������� 644 � 764 � 144 � 252605 10441474263 11311� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Zapping (TV viewer for the Gnome Desktop) * Copyright (C) 2000 Iaki Garca Etxebarria * Copyright (C) 2003 Michael H. Schimek * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include "site_def.h" /* This is the library in charge of simplifying Video Access API (I don't want to use thirteen lines of code with ioctl's every time I want to change tuning freq). the name is TV Engine, since it is intended mainly for TV viewing. This file is separated so zapping doesn't need to know about V4L[2] */ #ifdef HAVE_CONFIG_H # include "config.h" #endif #ifdef ENABLE_V4L #include <stdio.h> #include <sys/ioctl.h> #include <sys/time.h> #include <sys/types.h> #include <sys/stat.h> #include <sys/ioctl.h> #include <fcntl.h> #include <signal.h> #include <unistd.h> #include <stdlib.h> #include <stdio.h> #include <sys/mman.h> #include <errno.h> #include <linux/kernel.h> #include <ctype.h> #include "tveng.h" #define TVENG25_PROTOTYPES 1 #include "tveng25.h" #include "tvengxv.h" #include "zmisc.h" /* Kernel interface */ #include <linux/types.h> /* __u32 etc */ #include "common/videodev.h" #include "common/_videodev.h" #include "common/videodev25.h" #include "common/_videodev25.h" /* This is not a V4L2 pixfmt, and it's not returned by any driver. The mplayer folks made it up for the ivtv YUV interface. */ #define FOURCC_HM12 v4l2_fourcc ('H', 'M', '1', '2') static void fprint_ioctl_arg (FILE * fp, unsigned int cmd, int rw, void * arg) { if (0 == ((cmd ^ VIDIOC_QUERYCAP) & (_IOC_TYPEMASK << _IOC_TYPESHIFT))) fprint_v4l25_ioctl_arg (fp, cmd, rw, arg); else fprint_v4l_ioctl_arg (fp, cmd, rw, arg); } /* This macro checks at compile time if the arg type is correct, device_ioctl() repeats the ioctl if interrupted (EINTR) and logs the args and result if log_fp is non-zero. When the ioctl failed ioctl_failure() stores the cmd, caller and errno in info. */ #define xioctl(info, cmd, arg) \ (IOCTL_ARG_TYPE_CHECK_ ## cmd (arg), \ ((0 == device_ioctl ((info)->log_fp, fprint_ioctl_arg, \ (info)->fd, cmd, (void *)(arg))) ? \ 0 : (ioctl_failure (info, __FILE__, __FUNCTION__, \ __LINE__, # cmd), -1))) #define xioctl_may_fail(info, cmd, arg) \ (IOCTL_ARG_TYPE_CHECK_ ## cmd (arg), \ device_ioctl ((info)->log_fp, fprint_ioctl_arg, \ (info)->fd, cmd, (void *)(arg))) /** @internal */ struct xcontrol { tv_control pub; /** V4L2_CID_. */ unsigned int id; }; #define C(l) PARENT (l, struct xcontrol, pub) struct video_input { tv_video_line pub; int index; /* struct v4l2_input */ unsigned int tuner; /* struct v4l2_tuner */ unsigned int step_shift; /* Only applicable if tuner. */ tv_audio_capability audio_capability; }; #define VI(l) PARENT (l, struct video_input, pub) #define CVI(l) CONST_PARENT (l, struct video_input, pub) struct audio_input { tv_audio_line pub; unsigned int index; /* struct v4l2_audio */ }; #define AI(l) PARENT (l, struct audio_input, pub) #define CAI(l) CONST_PARENT (l, struct audio_input, pub) /** @internal */ struct xbuffer { tv_capture_buffer cb; /** Data from VIDIOC_REQBUFS, updated after VIDIOC_QBUF, VIDIOC_DQBUF. */ struct v4l2_buffer vb; /** Client got a cb pointer with dequeue_buffer(). */ tv_bool dequeued; /** Clear this buffer before next VIDIOC_QBUF. */ tv_bool clear; }; #ifndef TVENG25_BAYER_TEST # define TVENG25_BAYER_TEST 0 #endif #ifndef TVENG25_HM12_TEST # define TVENG25_HM12_TEST 0 #endif #ifndef TVENG25_XV_TEST # define TVENG25_XV_TEST 0 #endif #ifndef TVENG25_NOVERLAY_TEST # define TVENG25_NOVERLAY_TEST 0 #endif struct private_tveng25_device_info { tveng_device_info info; /* Info field, inherited */ struct timeval last_timestamp; /* The timestamp of the last captured buffer */ uint32_t killme_chroma; int audio_mode; /* 0 mono */ char * reopen_name; int reopen_flags; struct v4l2_capability caps; struct xbuffer * buffers; tv_control * mute; unsigned int bttv_driver; unsigned int ivtv_driver; tv_bool read_back_controls; tv_bool use_v4l_audio; tv_bool use_s_ctrl_old; #if defined (HAVE_XV_EXTENSION) && TVENG25_XV_TEST /* Grabbed the info->overlay.xv_port_id for overlay. */ tv_bool grabbed_xv_port; Window xwindow; GC xgc; Atom xa_xv_brightness; #endif /* Capturing has been started (STREAMON). */ tv_bool capturing; /* Capturing has been started and we called read(). */ tv_bool reading; }; #define P_INFO(p) PARENT (p, struct private_tveng25_device_info, info) static tv_bool queue_xbuffers (tveng_device_info * info); static tv_bool unmap_xbuffers (tveng_device_info * info, tv_bool ignore_errors); static __inline__ char * xstrndup (const __u8 * s, size_t size) { /* strndup is a GNU extension. */ return _tv_strndup ((const char *) s, size); } /* xstrndup a __u8 array. */ #undef XSTRADUP #define XSTRADUP(s) xstrndup ((s), N_ELEMENTS (s)) static __inline__ int xstrncmp (const __u8 * s1, const char * s2, size_t size) { return strncmp ((const char *) s1, s2, size); } /* xstrncmp a __u8 array. */ #undef XSTRACMP #define XSTRACMP(s1, s2) xstrncmp ((s1), (s2), N_ELEMENTS (s1)) /* Audio matrix */ static unsigned int tv_audio_mode_to_audmode (tv_audio_mode mode) { switch (mode) { case TV_AUDIO_MODE_AUTO: case TV_AUDIO_MODE_LANG1_MONO: return V4L2_TUNER_MODE_MONO; case TV_AUDIO_MODE_LANG1_STEREO: return V4L2_TUNER_MODE_STEREO; case TV_AUDIO_MODE_LANG2_MONO: return V4L2_TUNER_MODE_LANG2; } assert (!"reached"); return 0; } static unsigned int tv_audio_mode_to_v4l_mode (tv_audio_mode mode) { switch (mode) { case TV_AUDIO_MODE_AUTO: return 0; case TV_AUDIO_MODE_LANG1_MONO: return VIDEO_SOUND_MONO; case TV_AUDIO_MODE_LANG1_STEREO: return VIDEO_SOUND_STEREO; case TV_AUDIO_MODE_LANG2_MONO: return VIDEO_SOUND_LANG2; } assert (!"reached"); return 0; } #if 0 /* Not used yet. */ static tv_audio_mode tv_audio_mode_from_audmode (unsigned int mode) { switch (mode) { case V4L2_TUNER_MODE_MONO: case V4L2_TUNER_MODE_LANG1: default: return TV_AUDIO_MODE_LANG1_MONO; case V4L2_TUNER_MODE_STEREO: return TV_AUDIO_MODE_LANG1_STEREO; case V4L2_TUNER_MODE_LANG2: return TV_AUDIO_MODE_LANG2_MONO; } } #endif static void store_audio_capability (tveng_device_info * info) { static const tv_audio_capability lang2 = TV_AUDIO_CAPABILITY_SAP | TV_AUDIO_CAPABILITY_BILINGUAL; tv_audio_capability cap; cap = TV_AUDIO_CAPABILITY_EMPTY; if (info->panel.cur_video_input && IS_TUNER_LINE (info->panel.cur_video_input)) { cap = VI(info->panel.cur_video_input)->audio_capability; if (cap & lang2) { const tv_video_standard *s; cap &= ~lang2; s = info->panel.cur_video_standard; if (s && (s->videostd_set & TV_VIDEOSTD_SET (TV_VIDEOSTD_NTSC_M))) { cap |= TV_AUDIO_CAPABILITY_SAP; } else { cap |= TV_AUDIO_CAPABILITY_BILINGUAL; } } } if (info->panel.audio_capability != cap) { info->panel.audio_capability = cap; tv_callback_notify (info, info, info->panel.audio_callback); } } static void store_audio_reception (tveng_device_info * info, unsigned int rxsubchans) { unsigned int rec[2]; rec[0] = 0; rec[1] = 0; if (rxsubchans & V4L2_TUNER_SUB_STEREO) rec[0] = 2; else if (rxsubchans & V4L2_TUNER_SUB_MONO) rec[0] = 1; if (rxsubchans & V4L2_TUNER_SUB_LANG2) rec[1] = 1; if (info->panel.audio_reception[0] != rec[0] || info->panel.audio_reception[1] != rec[1]) { info->panel.audio_reception[0] = rec[0]; info->panel.audio_reception[1] = rec[1]; tv_callback_notify (info, info, info->panel.audio_callback); } } static tv_bool set_audio_mode (tveng_device_info * info, tv_audio_mode mode) { struct private_tveng25_device_info *p_info = P_INFO (info); if (info->panel.cur_video_input && IS_TUNER_LINE (info->panel.cur_video_input)) { if (p_info->use_v4l_audio) { struct video_audio audio; if (-1 == xioctl (info, VIDIOCGAUDIO, &audio)) { return FALSE; } if (p_info->mute && p_info->mute->value) audio.flags |= VIDEO_AUDIO_MUTE; else audio.flags &= ~VIDEO_AUDIO_MUTE; audio.mode = tv_audio_mode_to_v4l_mode (mode); if (-1 == xioctl (info, VIDIOCSAUDIO, &audio)) { return FALSE; } } else { struct v4l2_tuner tuner; unsigned int audmode; CLEAR (tuner); tuner.index = VI(info->panel.cur_video_input)->tuner; if (-1 == xioctl (info, VIDIOC_G_TUNER, &tuner)) return FALSE; store_audio_reception (info, tuner.rxsubchans); audmode = tv_audio_mode_to_audmode (mode); if (tuner.audmode != audmode) { tuner.audmode = audmode; if (-1 == xioctl (info, VIDIOC_S_TUNER, &tuner)) { return FALSE; } } } } if (info->panel.audio_mode != mode) { info->panel.audio_mode = mode; tv_callback_notify (info, info, info->panel.audio_callback); } return TRUE; } /* Controls */ static tv_bool get_xcontrol (tveng_device_info * info, struct xcontrol * c) { struct private_tveng25_device_info *p_info = P_INFO (info); struct v4l2_control ctrl; if (c->pub.id == TV_CONTROL_ID_AUDIO_MODE) return TRUE; /* XXX */ if (c->id == V4L2_CID_AUDIO_MUTE) { /* Doesn't seem to work with bttv. FIXME we should check at runtime. */ return TRUE; } CLEAR (ctrl); ctrl.id = c->id; if (-1 == xioctl (&p_info->info, VIDIOC_G_CTRL, &ctrl)) return FALSE; if (c->pub.value != ctrl.value) { c->pub.value = ctrl.value; tv_callback_notify (&p_info->info, &c->pub, c->pub._callback); } return TRUE; } static tv_bool get_control (tveng_device_info * info, tv_control * c) { struct private_tveng25_device_info *p_info = P_INFO (info); if (c) return get_xcontrol (info, C(c)); for_all (c, p_info->info.panel.controls) if (c->_parent == info) if (!get_xcontrol (info, C(c))) return FALSE; return TRUE; } static tv_bool s_ctrl (tveng_device_info * info, const struct v4l2_control *c) { struct private_tveng25_device_info *p_info = P_INFO (info); struct v4l2_control ctrl; ctrl = *c; if (p_info->use_s_ctrl_old) { /* Incorrectly defined as _IOW. */ if (-1 == xioctl (info, VIDIOC_S_CTRL_OLD, &ctrl)) { return FALSE; } } else if (-1 == xioctl_may_fail (info, VIDIOC_S_CTRL, &ctrl)) { if (EINVAL != errno) { ioctl_failure (info, __FILE__, __PRETTY_FUNCTION__, __LINE__, "VIDIOC_S_CTRL"); return FALSE; } ctrl = *c; if (-1 == xioctl (info, VIDIOC_S_CTRL_OLD, &ctrl)) { return FALSE; } /* We call this function quite often, next time take a shortcut. */ p_info->use_s_ctrl_old = TRUE; } return TRUE; } static tv_bool set_control (tveng_device_info * info, tv_control * c, int value) { struct private_tveng25_device_info *p_info = P_INFO (info); struct v4l2_control ctrl; if (c->id == TV_CONTROL_ID_AUDIO_MODE) return set_audio_mode_control (info, c, value); CLEAR (ctrl); ctrl.id = C(c)->id; ctrl.value = value; if (!s_ctrl (info, &ctrl)) { return FALSE; } if (p_info->read_back_controls) { /* Doesn't seem to work with bttv. FIXME we should check at runtime. */ if (ctrl.id == V4L2_CID_AUDIO_MUTE) { if (c->value != value) { c->value = value; tv_callback_notify (info, c, c->_callback); } return TRUE; } return get_xcontrol (info, C(c)); } else { if (c->value != value) { c->value = value; tv_callback_notify (info, c, c->_callback); } return TRUE; } } static const struct { unsigned int cid; const char * label; tv_control_id id; } controls [] = { { V4L2_CID_BRIGHTNESS, N_("Brightness"), TV_CONTROL_ID_BRIGHTNESS }, { V4L2_CID_CONTRAST, N_("Contrast"), TV_CONTROL_ID_CONTRAST }, { V4L2_CID_SATURATION, N_("Saturation"), TV_CONTROL_ID_SATURATION }, { V4L2_CID_HUE, N_("Hue"), TV_CONTROL_ID_HUE }, { V4L2_CID_WHITENESS, N_("Whiteness"), TV_CONTROL_ID_UNKNOWN }, { V4L2_CID_BLACK_LEVEL, N_("Black level"), TV_CONTROL_ID_UNKNOWN }, { V4L2_CID_AUTO_WHITE_BALANCE, N_("White balance"), TV_CONTROL_ID_UNKNOWN }, { V4L2_CID_DO_WHITE_BALANCE, N_("White balance"), TV_CONTROL_ID_UNKNOWN }, { V4L2_CID_RED_BALANCE, N_("Red balance"), TV_CONTROL_ID_UNKNOWN }, { V4L2_CID_BLUE_BALANCE, N_("Blue balance"), TV_CONTROL_ID_UNKNOWN }, { V4L2_CID_GAMMA, N_("Gamma"), TV_CONTROL_ID_UNKNOWN }, { V4L2_CID_EXPOSURE, N_("Exposure"), TV_CONTROL_ID_UNKNOWN }, { V4L2_CID_AUTOGAIN, N_("Auto gain"), TV_CONTROL_ID_UNKNOWN }, { V4L2_CID_GAIN, N_("Gain"), TV_CONTROL_ID_UNKNOWN }, { V4L2_CID_HCENTER, N_("HCenter"), TV_CONTROL_ID_UNKNOWN }, { V4L2_CID_VCENTER, N_("VCenter"), TV_CONTROL_ID_UNKNOWN }, { V4L2_CID_HFLIP, N_("Hor. flipping"), TV_CONTROL_ID_UNKNOWN }, { V4L2_CID_VFLIP, N_("Vert. flipping"), TV_CONTROL_ID_UNKNOWN }, { V4L2_CID_AUDIO_VOLUME, N_("Volume"), TV_CONTROL_ID_VOLUME }, { V4L2_CID_AUDIO_MUTE, N_("Mute"), TV_CONTROL_ID_MUTE }, { V4L2_CID_AUDIO_MUTE, N_("Audio Mute"), TV_CONTROL_ID_UNKNOWN }, { V4L2_CID_AUDIO_BALANCE, N_("Balance"), TV_CONTROL_ID_UNKNOWN }, { V4L2_CID_AUDIO_BALANCE, N_("Audio Balance"), TV_CONTROL_ID_UNKNOWN }, { V4L2_CID_AUDIO_TREBLE, N_("Treble"), TV_CONTROL_ID_TREBLE }, { V4L2_CID_AUDIO_LOUDNESS, N_("Loudness"), TV_CONTROL_ID_UNKNOWN }, { V4L2_CID_AUDIO_BASS, N_("Bass"), TV_CONTROL_ID_BASS }, }; static tv_bool add_control (tveng_device_info * info, unsigned int id) { struct private_tveng25_device_info *p_info = P_INFO (info); struct v4l2_queryctrl qc; struct xcontrol *xc; tv_control *tc; unsigned int i; CLEAR (qc); qc.id = id; /* XXX */ if (-1 == xioctl_may_fail (info, VIDIOC_QUERYCTRL, &qc)) { if (EINVAL != errno) ioctl_failure (info, __FILE__, __PRETTY_FUNCTION__, __LINE__, "VIDIOC_QUERYCTRL"); return FALSE; } if (qc.flags & (V4L2_CTRL_FLAG_DISABLED | V4L2_CTRL_FLAG_GRABBED)) return TRUE; if (!(xc = calloc (1, sizeof (*xc)))) return TRUE; for (i = 0; i < N_ELEMENTS (controls); ++i) if (qc.id == controls[i].cid) break; if (i < N_ELEMENTS (controls)) { xc->pub.label = strdup (_(controls[i].label)); xc->pub.id = controls[i].id; } else { xc->pub.label = XSTRADUP (qc.name); xc->pub.id = TV_CONTROL_ID_UNKNOWN; } if (!xc->pub.label) goto failure; xc->pub.minimum = qc.minimum; xc->pub.maximum = qc.maximum; xc->pub.step = qc.step; xc->pub.reset = qc.default_value; xc->id = qc.id; switch (qc.type) { case V4L2_CTRL_TYPE_INTEGER: xc->pub.type = TV_CONTROL_TYPE_INTEGER; break; case V4L2_CTRL_TYPE_BOOLEAN: xc->pub.type = TV_CONTROL_TYPE_BOOLEAN; /* Some drivers do not properly initialize these. */ xc->pub.minimum = 0; xc->pub.maximum = 1; xc->pub.step = 1; /* Just in case. */ xc->pub.reset = !!xc->pub.reset; break; case V4L2_CTRL_TYPE_BUTTON: xc->pub.type = TV_CONTROL_TYPE_ACTION; xc->pub.minimum = INT_MIN; xc->pub.maximum = INT_MAX; xc->pub.step = 0; xc->pub.reset = 0; break; case V4L2_CTRL_TYPE_MENU: { unsigned int n_items; unsigned int i; xc->pub.type = TV_CONTROL_TYPE_CHOICE; n_items = (unsigned int) qc.maximum; if (!(xc->pub.menu = calloc (n_items + 2, sizeof (char *)))) goto failure; for (i = 0; i <= n_items; ++i) { struct v4l2_querymenu qm; CLEAR (qm); qm.id = qc.id; qm.index = i; if (0 == xioctl (info, VIDIOC_QUERYMENU, &qm)) { xc->pub.menu[i] = XSTRADUP (qm.name); if (NULL == xc->pub.menu[i]) goto failure; } else { goto failure; } } break; } default: fprintf (stderr, "V4L2: Unknown control type 0x%x (%s)\n", qc.type, qc.name); goto failure; } if (!(tc = append_panel_control (info, &xc->pub, /* allocate size */ 0))) goto failure; get_xcontrol (info, C(tc)); if (qc.id == V4L2_CID_AUDIO_MUTE) { p_info->mute = tc; } return TRUE; failure: tv_control_delete (&xc->pub); return TRUE; /* no control, but not end of enum */ } static tv_bool get_control_list (tveng_device_info * info) { unsigned int cid; free_panel_controls (info); for (cid = V4L2_CID_BASE; cid < V4L2_CID_LASTP1; ++cid) { /* EINVAL ignored */ add_control (info, cid); } /* Artificial control (preliminary) */ /* XXX don't add if device has no audio. */ append_audio_mode_control (info, (TV_AUDIO_CAPABILITY_AUTO | TV_AUDIO_CAPABILITY_MONO | TV_AUDIO_CAPABILITY_STEREO | TV_AUDIO_CAPABILITY_SAP | TV_AUDIO_CAPABILITY_BILINGUAL)); for (cid = V4L2_CID_PRIVATE_BASE; cid < V4L2_CID_PRIVATE_BASE + 100; ++cid) { if (!add_control (info, cid)) break; /* end of enumeration */ } return TRUE; } /* * Video standards */ static tv_bool get_video_standard (tveng_device_info * info) { v4l2_std_id std_id; tv_video_standard *s; if (!info->panel.video_standards) return TRUE; std_id = 0; if (-1 == xioctl (info, VIDIOC_G_STD, &std_id)) return FALSE; for_all (s, info->panel.video_standards) if (s->videostd_set == std_id) break; /* s = NULL = unknown. */ store_cur_video_standard (info, s); store_audio_capability (info); return TRUE; } static tv_bool set_video_standard (tveng_device_info * info, tv_video_standard * s) { v4l2_std_id std_id; tv_videostd_set videostd_set; int r; std_id = 0; if (!TVENG25_BAYER_TEST && 0 == xioctl_may_fail (info, VIDIOC_G_STD, &std_id)) { const tv_video_standard *t; for_all (t, info->panel.video_standards) if (t->videostd_set == std_id) break; if (t == s) return TRUE; } if (P_INFO (info)->capturing) return FALSE; videostd_set = s->videostd_set; r = -1; if (!TVENG25_BAYER_TEST) r = xioctl (info, VIDIOC_S_STD, &videostd_set); if (0 == r) { store_cur_video_standard (info, s); store_audio_capability (info); } return (0 == r); } static tv_bool get_video_standard_list (tveng_device_info * info) { unsigned int i; free_video_standards (info); if (!info->panel.cur_video_input) return TRUE; if (TVENG25_BAYER_TEST) goto failure; /* FIXME limit number of iterations in case the driver is broken. */ for (i = 0;; ++i) { struct v4l2_standard standard; tv_video_standard *s; /* bttv 0.9.5 bug: Always returns standard.index = 0. */ CLEAR (standard); standard.index = i; if (-1 == xioctl_may_fail (info, VIDIOC_ENUMSTD, &standard)) { if (EINVAL == errno) break; /* end of enumeration */ ioctl_failure (info, __FILE__, __PRETTY_FUNCTION__, __LINE__, "VIDIOC_ENUMSTD"); goto failure; } /* FIXME check if the standard is supported by the current input */ if (!(s = append_video_standard (&info->panel.video_standards, standard.id, (const char *) standard.name, (const char *) standard.name, sizeof (*s)))) goto failure; s->frame_rate = standard.frameperiod.denominator / (double) standard.frameperiod.numerator; s->frame_ticks = 90000 * standard.frameperiod.numerator / standard.frameperiod.denominator; } if (get_video_standard (info)) return TRUE; failure: free_video_standard_list (&info->panel.video_standards); return FALSE; } /* * Video inputs */ #define SCALE_FREQUENCY(vi, freq) \ ((((freq) & ~ (unsigned long) vi->step_shift) \ * vi->pub.u.tuner.step) >> vi->step_shift) static void store_frequency (tveng_device_info * info, struct video_input * vi, unsigned long freq) { unsigned int frequency = SCALE_FREQUENCY (vi, freq); if (vi->pub.u.tuner.frequency != frequency) { vi->pub.u.tuner.frequency = frequency; tv_callback_notify (info, &vi->pub, vi->pub._callback); } } static tv_bool get_tuner_frequency (tveng_device_info * info, tv_video_line * l) { struct v4l2_frequency vfreq; CLEAR (vfreq); vfreq.tuner = VI (l)->tuner; vfreq.type = V4L2_TUNER_ANALOG_TV; if (-1 == xioctl (info, VIDIOC_G_FREQUENCY, &vfreq)) return FALSE; store_frequency (info, VI (l), vfreq.frequency); return TRUE; } static tv_bool set_tuner_frequency (tveng_device_info * info, tv_video_line * l, unsigned int frequency) { struct private_tveng25_device_info * p_info = P_INFO (info); struct video_input *vi = VI (l); struct v4l2_frequency vfreq; unsigned long new_freq; tv_bool restart; int buf_type; tv_bool r; CLEAR (vfreq); vfreq.tuner = vi->tuner; vfreq.type = V4L2_TUNER_ANALOG_TV; new_freq = (frequency << vi->step_shift) / vi->pub.u.tuner.step; buf_type = V4L2_BUF_TYPE_VIDEO_CAPTURE; restart = (info->freq_change_restart && p_info->capturing && info->panel.cur_video_input == l); if (restart) { if (0 == xioctl (info, VIDIOC_G_FREQUENCY, &vfreq)) { if (new_freq == vfreq.frequency) { store_frequency (info, vi, new_freq); return TRUE; } } if (p_info->caps.capabilities & V4L2_CAP_STREAMING) { if (-1 == xioctl (info, VIDIOC_STREAMOFF, &buf_type)) return FALSE; } else if (p_info->reading) { /* Error ignored. */ xioctl_may_fail (info, VIDIOC_STREAMOFF, &buf_type); p_info->reading = FALSE; } p_info->capturing = FALSE; } vfreq.frequency = new_freq; r = TRUE; if (0 == xioctl (info, VIDIOC_S_FREQUENCY, &vfreq)) store_frequency (info, vi, vfreq.frequency); else r = FALSE; if (restart && (p_info->caps.capabilities & V4L2_CAP_STREAMING)) { unsigned int i; /* Some drivers do not completely fill buffers when tuning to an empty channel. */ for (i = 0; i < info->capture.n_buffers; ++i) p_info->buffers[i].clear = TRUE; if (!queue_xbuffers (info)) { /* XXX what now? */ return FALSE; } if (0 == xioctl (info, VIDIOC_STREAMON, &buf_type)) { p_info->capturing = TRUE; } else { /* XXX what now? */ r = FALSE; } } return r; } static tv_bool get_signal_strength (tveng_device_info * info, int * strength, int * afc) { struct v4l2_tuner tuner; CLEAR (tuner); tuner.index = VI(info->panel.cur_video_input)->tuner; /* XXX bttv 0.9.14 returns invalid .name? */ if (-1 == xioctl (info, VIDIOC_G_TUNER, &tuner)) return FALSE; if (strength) { /* Properly we should only return the signal field, but it doesn't always work :-/ This has the advantage that it will find most stations (with a good reception) and the disadvantage that it will find too many stations... but better too many than too few :-) */ #if 0 /* update: bttv2 does use the signal field, so lets use it instead */ if (tuner.signal) *strength = tuner.signal; else if (tuner.afc == 0) *strength = 65535; else *strength = 0; #else /* This is the correct method, but it doesn't always work */ *strength = tuner.signal; #endif } if (afc) *afc = tuner.afc; return TRUE; } static tv_bool get_video_input (tveng_device_info * info) { tv_video_line *l; if (info->panel.video_inputs) { int index; /* sn9c102 bug: */ index = 0; if (TVENG25_BAYER_TEST) return FALSE; if (-1 == xioctl (info, VIDIOC_G_INPUT, &index)) return FALSE; if (info->panel.cur_video_input) if (VI (info->panel.cur_video_input)->index == index) return TRUE; for_all (l, info->panel.video_inputs) if (VI (l)->index == index) break; } else { l = NULL; if (info->panel.cur_video_input == NULL) return TRUE; } info->panel.cur_video_input = l; tv_callback_notify (info, info, info->panel.video_input_callback); if (l) { /* Implies get_video_standard() and store_audio_capability(). */ get_video_standard_list (info); } else { free_video_standards (info); } return TRUE; } static tv_bool set_video_input (tveng_device_info * info, tv_video_line * l) { int index; index = 0; if (info->panel.cur_video_input) { if (0 == xioctl (info, VIDIOC_G_INPUT, &index)) if (CVI (l)->index == index) return TRUE; } if (P_INFO (info)->capturing) return FALSE; index = CVI (l)->index; if (-1 == xioctl (info, VIDIOC_S_INPUT, &index)) return FALSE; store_cur_video_input (info, l); /* Implies get_video_standard() and store_audio_capability(). */ /* XXX error? */ get_video_standard_list (info); if (IS_TUNER_LINE (l)) { /* Set tuner audmode. */ set_audio_mode (info, info->panel.audio_mode); } return TRUE; } static tv_bool tuner_bounds_audio_capability (tveng_device_info * info, struct video_input * vi) { struct v4l2_tuner tuner; CLEAR (tuner); tuner.index = vi->tuner; /* XXX bttv 0.9.14 returns invalid .name? */ if (-1 == xioctl (info, VIDIOC_G_TUNER, &tuner)) return FALSE; assert (tuner.rangelow <= tuner.rangehigh); if (tuner.capability & V4L2_TUNER_CAP_LOW) { /* Actually step is 62.5 Hz, but why unecessarily complicate things. */ vi->pub.u.tuner.step = 125; vi->step_shift = 1; /* A check won't do, some drivers report (0, INT_MAX). */ tuner.rangelow = MIN (tuner.rangelow, UINT_MAX / 125); tuner.rangehigh = MIN (tuner.rangehigh, UINT_MAX / 125); } else { vi->pub.u.tuner.step = 62500; vi->step_shift = 0; tuner.rangelow = MIN (tuner.rangelow, UINT_MAX / 62500); tuner.rangehigh = MIN (tuner.rangehigh, UINT_MAX / 62500); } vi->pub.u.tuner.minimum = SCALE_FREQUENCY (vi, tuner.rangelow); vi->pub.u.tuner.maximum = SCALE_FREQUENCY (vi, tuner.rangehigh); vi->audio_capability = TV_AUDIO_CAPABILITY_MONO; if (tuner.capability & V4L2_TUNER_CAP_STEREO) { vi->audio_capability |= TV_AUDIO_CAPABILITY_STEREO; } if (tuner.capability & V4L2_TUNER_CAP_LANG2) { vi->audio_capability |= TV_AUDIO_CAPABILITY_SAP | TV_AUDIO_CAPABILITY_BILINGUAL; } return get_tuner_frequency (info, &vi->pub); } static tv_bool get_video_input_list (tveng_device_info * info) { unsigned int i; free_video_inputs (info); for (i = 0;; ++i) { struct v4l2_input input; char buf[sizeof (input.name) + 1]; struct video_input *vi; tv_video_line_type type; CLEAR (input); input.index = i; if (-1 == xioctl_may_fail (info, VIDIOC_ENUMINPUT, &input)) { /* i > 0 because video devices cannot have zero video inputs. */ if (EINVAL == errno && i > 0) break; /* end of enumeration */ ioctl_failure (info, __FILE__, __PRETTY_FUNCTION__, __LINE__, "VIDIOC_ENUMINPUT"); free_video_line_list (&info->panel.video_inputs); return FALSE; } /* Sometimes NUL is missing. */ z_strlcpy (buf, (const char *) input.name, MIN (sizeof (buf), sizeof (input.name))); if (input.type & V4L2_INPUT_TYPE_TUNER) type = TV_VIDEO_LINE_TYPE_TUNER; else type = TV_VIDEO_LINE_TYPE_BASEBAND; if (!(vi = VI(append_video_line (&info->panel.video_inputs, type, buf, buf, sizeof (*vi))))) goto failure; vi->pub._parent = info; vi->index = input.index; vi->tuner = input.tuner; if (input.type & V4L2_INPUT_TYPE_TUNER) if (!tuner_bounds_audio_capability (info, vi)) goto failure; } get_video_input (info); return TRUE; failure: free_video_line_list (&info->panel.video_inputs); return FALSE; } /* * Audio inputs */ static tv_bool get_audio_input (tveng_device_info * info) { tv_audio_line *l; if (info->panel.audio_inputs) { struct v4l2_audio audio; CLEAR (audio); if (-1 == xioctl (info, VIDIOC_G_AUDIO, &audio)) return FALSE; if (info->panel.cur_audio_input) if (CAI (info->panel.cur_audio_input)->index == audio.index) return TRUE; for_all (l, info->panel.audio_inputs) if (CAI (l)->index == audio.index) break; } else { l = NULL; } store_cur_audio_input (info, l); return TRUE; } static tv_bool set_audio_input (tveng_device_info * info, tv_audio_line * l) { struct v4l2_audio audio; CLEAR (audio); audio.index = CAI (l)->index; if (-1 == xioctl (info, VIDIOC_S_AUDIO, &audio)) return FALSE; store_cur_audio_input (info, l); return TRUE; } static tv_bool get_audio_input_list (tveng_device_info * info) { unsigned int i; free_audio_inputs (info); for (i = 0;; ++i) { struct v4l2_audio audio; char buf[sizeof (audio.name) + 1]; struct audio_input *ai; CLEAR (audio); audio.index = i; if (-1 == xioctl_may_fail (info, VIDIOC_ENUMAUDIO, &audio)) { if (EINVAL == errno) break; /* end of enumeration */ ioctl_failure (info, __FILE__, __PRETTY_FUNCTION__, __LINE__, "VIDIOC_ENUMAUDIO"); free_audio_line_list (&info->panel.audio_inputs); return FALSE; } /* Sometimes NUL is missing. */ z_strlcpy (buf, (const char *) audio.name, MIN (sizeof (buf), sizeof (audio.name))); if (!(ai = AI(append_audio_line (&info->panel.audio_inputs, TV_AUDIO_LINE_TYPE_NONE, buf, buf, /* minimum */ 0, /* maximum */ 0, /* step */ 0, /* reset */ 0, sizeof (*ai))))) goto failure; ai->pub._parent = info; ai->index = audio.index; } get_audio_input (info); return TRUE; failure: free_audio_line_list (&info->panel.audio_inputs); return FALSE; } static tv_pixfmt pixelformat_to_pixfmt (unsigned int pixelformat) { switch (pixelformat) { /* Note defines and Spec (0.4) are wrong: r <-> b */ case V4L2_PIX_FMT_RGB332: return TV_PIXFMT_BGR8; case V4L2_PIX_FMT_RGB555: return TV_PIXFMT_BGRA16_LE; case V4L2_PIX_FMT_RGB565: return TV_PIXFMT_BGR16_LE; case V4L2_PIX_FMT_RGB555X: return TV_PIXFMT_BGRA16_BE; case V4L2_PIX_FMT_RGB565X: return TV_PIXFMT_BGR16_BE; /* Note Spec (0.4) is wrong: r <-> b. */ /* bttv 0.9 bug: RGB32 is wrong. */ case V4L2_PIX_FMT_BGR24: return TV_PIXFMT_BGR24_LE; case V4L2_PIX_FMT_RGB24: return TV_PIXFMT_BGR24_BE; case V4L2_PIX_FMT_BGR32: return TV_PIXFMT_BGRA32_LE; case V4L2_PIX_FMT_RGB32: return TV_PIXFMT_BGRA32_BE; case V4L2_PIX_FMT_GREY: return TV_PIXFMT_Y8; case V4L2_PIX_FMT_YUYV: return TV_PIXFMT_YUYV; case V4L2_PIX_FMT_UYVY: return TV_PIXFMT_UYVY; case V4L2_PIX_FMT_YVU420: return TV_PIXFMT_YVU420; case V4L2_PIX_FMT_YUV420: return TV_PIXFMT_YUV420; case V4L2_PIX_FMT_YVU410: return TV_PIXFMT_YVU410; case V4L2_PIX_FMT_YUV410: return TV_PIXFMT_YUV410; case V4L2_PIX_FMT_YUV422P: return TV_PIXFMT_YUV422; case V4L2_PIX_FMT_YUV411P: return TV_PIXFMT_YUV411; case V4L2_PIX_FMT_SBGGR8: return TV_PIXFMT_SBGGR; case V4L2_PIX_FMT_NV12: return TV_PIXFMT_NV12; case FOURCC_HM12: return TV_PIXFMT_HM12; default: return TV_PIXFMT_UNKNOWN; } } static unsigned int pixfmt_to_pixelformat (tv_pixfmt pixfmt) { switch (pixfmt) { case TV_PIXFMT_BGR8: return V4L2_PIX_FMT_RGB332; case TV_PIXFMT_BGRA16_LE: return V4L2_PIX_FMT_RGB555; case TV_PIXFMT_BGR16_LE: return V4L2_PIX_FMT_RGB565; case TV_PIXFMT_BGRA16_BE: return V4L2_PIX_FMT_RGB555X; case TV_PIXFMT_BGR16_BE: return V4L2_PIX_FMT_RGB565X; case TV_PIXFMT_BGR24_LE: return V4L2_PIX_FMT_BGR24; case TV_PIXFMT_BGR24_BE: return V4L2_PIX_FMT_RGB24; case TV_PIXFMT_BGRA32_LE: return V4L2_PIX_FMT_BGR32; case TV_PIXFMT_BGRA32_BE: return V4L2_PIX_FMT_RGB32; case TV_PIXFMT_Y8: return V4L2_PIX_FMT_GREY; case TV_PIXFMT_YUYV: return V4L2_PIX_FMT_YUYV; case TV_PIXFMT_UYVY: return V4L2_PIX_FMT_UYVY; case TV_PIXFMT_YVU420: return V4L2_PIX_FMT_YVU420; case TV_PIXFMT_YUV420: return V4L2_PIX_FMT_YUV420; case TV_PIXFMT_YVU410: return V4L2_PIX_FMT_YVU410; case TV_PIXFMT_YUV410: return V4L2_PIX_FMT_YUV410; case TV_PIXFMT_YUV422: return V4L2_PIX_FMT_YUV422P; case TV_PIXFMT_YUV411: return V4L2_PIX_FMT_YUV411P; case TV_PIXFMT_SBGGR: return V4L2_PIX_FMT_SBGGR8; case TV_PIXFMT_NV12: return V4L2_PIX_FMT_NV12; case TV_PIXFMT_HM12: return FOURCC_HM12; default: return 0; } } /* Overlay */ static unsigned int tv_to_v4l2_chromakey (unsigned int chromakey) { switch (Z_BYTE_ORDER) { case Z_LITTLE_ENDIAN: /* XXX correct? 0xAARRGGBB */ return chromakey & 0xFFFFFF; case Z_BIG_ENDIAN: /* XXX correct? 0xBBGGRRAA */ return (((chromakey & 0xFF) << 24) | ((chromakey & 0xFF00) << 8) | ((chromakey & 0xFF0000) >> 8)); default: assert (0); } return 0; } static unsigned int v4l2_to_tv_chromakey (unsigned int chromakey) { switch (Z_BYTE_ORDER) { case Z_LITTLE_ENDIAN: /* XXX correct? 0xAARRGGBB */ return chromakey & 0xFFFFFF; case Z_BIG_ENDIAN: /* XXX correct? 0xBBGGRRAA */ return (((chromakey & 0xFF00) << 8) | ((chromakey & 0xFF0000) >> 8) | ((chromakey & 0xFF000000) >> 24)); default: assert (0); } return 0; } static tv_bool get_overlay_buffer (tveng_device_info * info) { struct v4l2_framebuffer fb; CLEAR (info->overlay.buffer); CLEAR (fb); if (-1 == xioctl (info, VIDIOC_G_FBUF, &fb)) return FALSE; info->caps.flags &= ~(TVENG_CAPS_CHROMAKEY | TVENG_CAPS_CLIPPING | TVENG_CAPS_FRAMERAM); if (fb.capability & V4L2_FBUF_CAP_CHROMAKEY) info->caps.flags |= TVENG_CAPS_CHROMAKEY; /* XXX */ if (fb.capability & (V4L2_FBUF_CAP_LIST_CLIPPING | V4L2_FBUF_CAP_BITMAP_CLIPPING)) info->caps.flags |= TVENG_CAPS_CLIPPING; /* XXX */ if (!(fb.capability & V4L2_FBUF_CAP_EXTERNOVERLAY)) info->caps.flags |= TVENG_CAPS_FRAMERAM; /* XXX get elsewhere if ((fb.flags & V4L2_FBUF_CAP_SCALEUP) || (fb.flags & V4L2_FBUF_CAP_SCALEDOWN)) info->caps.flags |= TVENG_CAPS_SCALES; */ info->overlay.buffer.base = (unsigned long) fb.base; if (!tv_image_format_init (&info->overlay.buffer.format, fb.fmt.width, fb.fmt.height, fb.fmt.bytesperline, pixelformat_to_pixfmt (fb.fmt.pixelformat), TV_COLSPC_UNKNOWN)) { tv_error_msg (info, _("Driver %s returned an unknown or " "invalid frame buffer format."), info->node.label); info->tveng_errno = EINVAL; } return TRUE; } /* XXX we should support set_overlay_buffer with an EPERM check in tveng.c, so we don't have to run zapping_setup_fb when the user is privileged. */ static tv_bool get_overlay_window (tveng_device_info * info) { struct private_tveng25_device_info * p_info = P_INFO (info); struct v4l2_format format; CLEAR (format); format.type = V4L2_BUF_TYPE_VIDEO_OVERLAY; if (p_info->buffers) unmap_xbuffers (info, /* ignore_errors */ TRUE); if (-1 == xioctl (info, VIDIOC_G_FMT, &format)) return FALSE; info->overlay.window.x = format.fmt.win.w.left; info->overlay.window.y = format.fmt.win.w.top; info->overlay.window.width = format.fmt.win.w.width; info->overlay.window.height = format.fmt.win.w.height; /* Clips cannot be read back, we assume no change. tveng.c takes care of info->overlay.clip_vector. */ info->overlay.chromakey = v4l2_to_tv_chromakey (format.fmt.win.chromakey); return TRUE; } static tv_bool set_overlay_window (tveng_device_info * info, const tv_window * w, const tv_clip_vector * v, unsigned int chromakey) { struct private_tveng25_device_info * p_info = P_INFO (info); struct v4l2_format format; struct v4l2_clip *clips; if (v->size > 0) { struct v4l2_clip *vc; const tv_clip *tc; unsigned int i; clips = malloc (v->size * sizeof (*clips)); if (NULL == clips) { info->tveng_errno = ENOMEM; t_error("malloc", info); return FALSE; } vc = clips; tc = v->vector; for (i = 0; i < v->size; ++i) { vc->next = vc + 1; /* just in case */ vc->c.left = tc->x1; vc->c.top = tc->y1; vc->c.width = tc->x2 - tc->x1; vc->c.height = tc->y2 - tc->y1; ++vc; ++tc; } vc[-1].next = NULL; } else { clips = NULL; } CLEAR (format); format.type = V4L2_BUF_TYPE_VIDEO_OVERLAY; format.fmt.win.w.left = w->x - info->overlay.buffer.x; format.fmt.win.w.top = w->y - info->overlay.buffer.y; format.fmt.win.w.width = w->width; format.fmt.win.w.height = w->height; format.fmt.win.clips = clips; format.fmt.win.clipcount = v->size; format.fmt.win.chromakey = tv_to_v4l2_chromakey (chromakey); if (p_info->buffers) unmap_xbuffers (info, /* ignore_errors */ TRUE); if (-1 == xioctl (info, VIDIOC_S_FMT, &format)) { free (clips); return FALSE; } free (clips); /* Actual window size. */ info->overlay.window.x = format.fmt.win.w.left; info->overlay.window.y = format.fmt.win.w.top; info->overlay.window.width = format.fmt.win.w.width; info->overlay.window.height = format.fmt.win.w.height; info->overlay.chromakey = v4l2_to_tv_chromakey (format.fmt.win.chromakey); return TRUE; } #if defined (HAVE_XV_EXTENSION) && TVENG25_XV_TEST static tv_bool set_overlay_xwindow (tveng_device_info * info, Window window, GC gc, unsigned int chromakey) { struct private_tveng25_device_info * p_info = P_INFO (info); /* The XVideo V4L wrapper supports only clip-list overlay. */ /* XXX tell the caller. */ chromakey = chromakey; if (!p_info->grabbed_xv_port) { /* XXX shouldn't attach_device report this? */ info->tveng_errno = EBUSY; t_error("XvGrabPort", info); return FALSE; } p_info->xwindow = window; p_info->xgc = gc; return TRUE; } #endif static tv_bool enable_overlay (tveng_device_info * info, tv_bool on) { struct private_tveng25_device_info * p_info = P_INFO (info); int value = on; if (on && p_info->buffers) unmap_xbuffers (info, /* ignore_errors */ TRUE); #if defined (HAVE_XV_EXTENSION) && TVENG25_XV_TEST if (p_info->grabbed_xv_port && 0 != p_info->xwindow && 0 != p_info->xgc) { if (on) { const tv_video_standard *s; unsigned int src_width, src_height; src_width = 640; src_height = 480; s = p_info->info.panel.cur_video_standard; if (NULL != s) { src_width = s->frame_width; src_height = s->frame_height; } return _tv_xv_put_video (info, p_info->xwindow, p_info->xgc, /* src_x, y */ 0, 0, src_width, src_height); } else { return _tv_xv_stop_video (info, p_info->xwindow); } } else #endif { if (0 == xioctl (info, VIDIOC_OVERLAY, &value)) { /* Caller shall use a timer instead. */ /* usleep (50000); */ return TRUE; } else { return FALSE; } } } /* Capture */ static tv_bool image_format_from_format (tveng_device_info * info _unused_, tv_image_format * f, const struct v4l2_format *vfmt) { struct private_tveng25_device_info * p_info = P_INFO (info); unsigned long bytes_per_line; tv_pixfmt pixfmt; CLEAR (*f); pixfmt = pixelformat_to_pixfmt (vfmt->fmt.pix.pixelformat); if (TV_PIXFMT_UNKNOWN == pixfmt) return FALSE; bytes_per_line = vfmt->fmt.pix.bytesperline; /* bttv 0.9.12 bug: returns bpl = width * bpp, w/ bpp > 1 if planar YUV. */ if (p_info->bttv_driver > 0) { bytes_per_line = vfmt->fmt.pix.width * tv_pixfmt_bytes_per_pixel (pixfmt); } /* FIXME check if width, height and bpl were rounded up. */ tv_image_format_init (f, vfmt->fmt.pix.width, vfmt->fmt.pix.height, bytes_per_line, pixfmt, TV_COLSPC_UNKNOWN); /* bttv 0.9.5 bug: assert (f->fmt.pix.sizeimage >= info->capture.format.size); */ if (vfmt->fmt.pix.sizeimage > f->size) f->size = vfmt->fmt.pix.sizeimage; return TRUE; } static void ivtv_v4l2_format_fix (tveng_device_info * info, struct v4l2_format * format) { format->fmt.pix.pixelformat = FOURCC_HM12; format->fmt.pix.bytesperline = format->fmt.pix.width; format->fmt.pix.sizeimage = format->fmt.pix.width * format->fmt.pix.height * 2 / 3; /* XXX not verified, may be _BOTTOM or _INTERLACED. */ if (info->panel.cur_video_standard && (format->fmt.pix.height <= info->panel.cur_video_standard->frame_height / 2)) { format->fmt.pix.field = V4L2_FIELD_TOP; } } static tv_bool get_capture_format (tveng_device_info * info) { struct v4l2_format format; CLEAR (format); format.type = V4L2_BUF_TYPE_VIDEO_CAPTURE; if (-1 == xioctl (info, VIDIOC_G_FMT, &format)) return FALSE; if (TVENG25_BAYER_TEST) { if (V4L2_PIX_FMT_GREY != format.fmt.pix.pixelformat) { format.fmt.pix.pixelformat = V4L2_PIX_FMT_GREY; format.fmt.pix.bytesperline = 0; /* minimum please */ format.fmt.pix.sizeimage = 0; /* ditto */ if (-1 == xioctl (info, VIDIOC_S_FMT, &format)) return FALSE; } format.fmt.pix.pixelformat = V4L2_PIX_FMT_SBGGR8; } else if (TVENG25_HM12_TEST) { if (1) { format.fmt.pix.pixelformat = V4L2_PIX_FMT_YVU420; format.fmt.pix.width = 720; format.fmt.pix.height = 480; format.fmt.pix.bytesperline = 0; /* minimum please */ format.fmt.pix.sizeimage = 0; /* ditto */ if (-1 == xioctl (info, VIDIOC_S_FMT, &format)) return FALSE; } else if (V4L2_PIX_FMT_YVU420 != format.fmt.pix.pixelformat) { format.fmt.pix.pixelformat = V4L2_PIX_FMT_YVU420; format.fmt.pix.bytesperline = 0; /* minimum please */ format.fmt.pix.sizeimage = 0; /* ditto */ if (-1 == xioctl (info, VIDIOC_S_FMT, &format)) return FALSE; } ivtv_v4l2_format_fix (info, &format); } else if (P_INFO (info)->ivtv_driver > 0) { /* Did we open the YUV capture device? */ assert (V4L2_PIX_FMT_MPEG != format.fmt.pix.pixelformat); /* ivtv 0.2.0-rc1a bug: returns pixelformat = 0, bytes_per_line = 0, sizeimage = 720 * 720, colorspace = SMPTE170M regardless of video standard, field = INTERLACED regardless of image size. ivtv 0.3.6o, 0.3.7 bug: returns pixelformat = V4L2_PIX_FMT_UYVY, bytes_per_line = 0, sizeimage = width * height * 1.5, colorspace and field as above. */ ivtv_v4l2_format_fix (info, &format); } return image_format_from_format (info, &info->capture.format, &format); } static tv_bool set_capture_format (tveng_device_info * info, const tv_image_format *fmt) { struct private_tveng25_device_info *p_info = P_INFO (info); struct v4l2_format format; unsigned int pixelformat; tv_bool r; if (p_info->capturing) return FALSE; CLEAR (format); format.type = V4L2_BUF_TYPE_VIDEO_CAPTURE; /* bttv 0.9.14 bug: with YUV 4:2:0 activation of VBI can cause a SCERR & driver reset, DQBUF -> EIO. */ pixelformat = pixfmt_to_pixelformat (fmt->pixel_format->pixfmt); if (0 == pixelformat) { info->tveng_errno = -1; /* unknown */ tv_error_msg (info, "Bad pixfmt %u %s", fmt->pixel_format->pixfmt, fmt->pixel_format->name); return FALSE; } if (TVENG25_BAYER_TEST) { format.fmt.pix.pixelformat = V4L2_PIX_FMT_GREY; pixelformat = V4L2_PIX_FMT_GREY; format.fmt.pix.width = 352; format.fmt.pix.height = 288; } else if (TVENG25_HM12_TEST) { format.fmt.pix.pixelformat = V4L2_PIX_FMT_YVU420; pixelformat = V4L2_PIX_FMT_YVU420; if (1 && (fmt->width != 720 || fmt->height != 480)) { fprintf (stderr, "S_FMT EBUSY\n"); errno = EBUSY; /* return FALSE; */ format.fmt.pix.width = 720; format.fmt.pix.height = 480; } else { format.fmt.pix.width = fmt->width; format.fmt.pix.height = fmt->height; } } else { format.fmt.pix.pixelformat = pixelformat; format.fmt.pix.width = fmt->width; format.fmt.pix.height = fmt->height; } format.fmt.pix.bytesperline = 0; /* minimum please */ format.fmt.pix.sizeimage = 0; /* ditto */ format.fmt.pix.field = V4L2_FIELD_INTERLACED; if (info->panel.cur_video_standard && (format.fmt.pix.height <= info->panel.cur_video_standard->frame_height / 2)) { format.fmt.pix.field = V4L2_FIELD_BOTTOM; } if (p_info->buffers) unmap_xbuffers (info, /* ignore_errors */ TRUE); if (-1 == xioctl_may_fail (info, VIDIOC_S_FMT, &format)) { /* ivtv feature: The image size cannot change when any capturing is in progress (including VBI), but the driver returns EBUSY instead of the current (closest possible) size. */ if (EBUSY == errno && p_info->ivtv_driver > 0) { return get_capture_format (info); } ioctl_failure (info, __FILE__, __FUNCTION__, __LINE__, "VIDIOC_S_FMT"); return FALSE; } r = (format.fmt.pix.pixelformat == pixelformat); if (TVENG25_BAYER_TEST) { format.fmt.pix.pixelformat = V4L2_PIX_FMT_SBGGR8; } else if (TVENG25_HM12_TEST) { format.fmt.pix.pixelformat = FOURCC_HM12; } else if (P_INFO (info)->ivtv_driver > 0) { /* ivtv 0.2.0-rc1a, 0.3.6o, 0.3.7 bug: Ignores (does not read or write) pixelformat, bytes_per_line, sizeimage, field. */ ivtv_v4l2_format_fix (info, &format); } /* Actual image size (and pixfmt?). */ /* Error ignored. */ image_format_from_format (info, &info->capture.format, &format); return r; } static void init_format_generic (struct v4l2_format * format, unsigned int pixelformat) { CLEAR (*format); format->type = V4L2_BUF_TYPE_VIDEO_CAPTURE; format->fmt.pix.width = 352; format->fmt.pix.height = 288; format->fmt.pix.field = V4L2_FIELD_BOTTOM; format->fmt.pix.bytesperline = 0; /* minimum please */ format->fmt.pix.sizeimage = 0; /* ditto */ format->fmt.pix.colorspace = 0; format->fmt.pix.pixelformat = pixelformat; } static tv_pixfmt_set get_supported_pixfmt_set (tveng_device_info * info) { struct private_tveng25_device_info *p_info = P_INFO (info); tv_pixfmt_set pixfmt_set; tv_pixfmt pixfmt; unsigned int i; if (TVENG25_BAYER_TEST) { return TV_PIXFMT_SET (TV_PIXFMT_SBGGR); } /* ivtv 0.2.0-rc1a, 0.3.6o, 0.3.7 bug: VIDIOC_ENUMFMT is not supported and VIDIOC_TRY_FMT returns pixelformat = UYVY. */ if (p_info->ivtv_driver > 0 || TVENG25_HM12_TEST) { return TV_PIXFMT_SET (TV_PIXFMT_HM12); } pixfmt_set = TV_PIXFMT_SET_EMPTY; for (i = 0;; ++i) { struct v4l2_fmtdesc fmtdesc; CLEAR (fmtdesc); fmtdesc.index = i; if (-1 == xioctl_may_fail (info, VIDIOC_ENUM_FMT, &fmtdesc)) break; pixfmt = pixelformat_to_pixfmt (fmtdesc.pixelformat); if (TV_PIXFMT_UNKNOWN != pixfmt) pixfmt_set |= TV_PIXFMT_SET (pixfmt); } if (0 != pixfmt_set) return pixfmt_set; /* Gross! Let's see if TRY_FMT gives more information. */ /* sn9c102 1.0.8 bug: TRY_FMT doesn't copy format back to user. */ if (0 == XSTRACMP (p_info->caps.driver, "sn9c102")) { return TV_PIXFMT_SET (TV_PIXFMT_SBGGR); /* is an USB camera */ } for (pixfmt = 0; pixfmt < TV_MAX_PIXFMTS; ++pixfmt) { struct v4l2_format format; unsigned int pixelformat; /* bttv 0.9.14 bug: with YUV 4:2:0 activation of VBI can cause a SCERR & driver reset, DQBUF -> EIO. */ pixelformat = pixfmt_to_pixelformat (pixfmt); if (0 == pixelformat) continue; init_format_generic (&format, pixelformat); if (-1 == xioctl_may_fail (info, VIDIOC_TRY_FMT, &format)) continue; /* sn9c102 1.0.1 feature: changes pixelformat to SBGGR. Though unexpected this is not prohibited by the spec. */ if (format.fmt.pix.pixelformat == pixelformat) pixfmt_set |= TV_PIXFMT_SET (pixfmt); } if (0 != pixfmt_set) return pixfmt_set; /* TRY_FMT is optional, let's see if S_FMT works. */ for (pixfmt = 0; pixfmt < TV_MAX_PIXFMTS; ++pixfmt) { struct v4l2_format format; unsigned int pixelformat; /* bttv 0.9.14 bug: with YUV 4:2:0 activation of VBI can cause a SCERR & driver reset, DQBUF -> EIO. */ pixelformat = pixfmt_to_pixelformat (pixfmt); if (0 == pixelformat) continue; init_format_generic (&format, pixelformat); if (-1 == xioctl_may_fail (info, VIDIOC_S_FMT, &format)) continue; /* Error ignored. */ image_format_from_format (info, &info->capture.format, &format); if (format.fmt.pix.pixelformat == pixelformat) pixfmt_set |= TV_PIXFMT_SET (pixfmt); } return pixfmt_set; } static tv_bool queue_xbuffer (tveng_device_info * info, struct xbuffer * b) { struct v4l2_buffer buffer; if (b->clear) { if (!tv_clear_image (b->cb.data, &info->capture.format)) return FALSE; b->clear = FALSE; } CLEAR (buffer); buffer.type = b->vb.type; buffer.memory = V4L2_MEMORY_MMAP; buffer.index = b->vb.index; if (-1 == xioctl (info, VIDIOC_QBUF, &buffer)) { return FALSE; } b->vb.flags = buffer.flags; return TRUE; } static tv_bool queue_xbuffers (tveng_device_info * info) { struct private_tveng25_device_info *p_info = P_INFO (info); unsigned int i; for (i = 0; i < info->capture.n_buffers; ++i) { if (p_info->buffers[i].dequeued) continue; if (!queue_xbuffer (info, &p_info->buffers[i])) return FALSE; } return TRUE; } static tv_bool queue_buffer (tveng_device_info * info, tv_capture_buffer * buffer) { struct private_tveng25_device_info *p_info = P_INFO (info); struct xbuffer *b; int index; b = PARENT (buffer, struct xbuffer, cb); index = b - p_info->buffers; assert ((unsigned int) index < info->capture.n_buffers); assert (b == &p_info->buffers[index]); assert (b->dequeued); if (!queue_xbuffer (info, b)) return FALSE; b->dequeued = FALSE; return TRUE; } /* bttv returns EIO on internal timeout and dequeues the buffer it was about to write, does not dequeue on subsequent timeouts. On bt8x8 SCERR it also resets. To be safe we restart now, although really the caller should do that. */ static tv_bool restart (tveng_device_info * info) { struct private_tveng25_device_info * p_info = P_INFO (info); int saved_errno; int buf_type; saved_errno = errno; buf_type = V4L2_BUF_TYPE_VIDEO_CAPTURE; if (-1 == xioctl (info, VIDIOC_STREAMOFF, &buf_type)) return FALSE; p_info->capturing = FALSE; if (!queue_xbuffers (info)) return FALSE; if (-1 == xioctl (info, VIDIOC_STREAMON, &buf_type)) return FALSE; p_info->capturing = TRUE; errno = saved_errno; return TRUE; } static int dequeue_buffer (tveng_device_info * info, tv_capture_buffer ** buffer, const struct timeval * timeout) { struct private_tveng25_device_info *p_info = P_INFO (info); struct v4l2_buffer vbuf; struct xbuffer *b; struct timeval start; struct timeval now; struct timeval tv; *buffer = NULL; if (CAPTURE_MODE_READ != info->capture_mode) { info->tveng_errno = -1; tv_error_msg(info, "Current capture mode is not READ (%d)", info->capture_mode); return -1; } start.tv_sec = 0; start.tv_usec = 0; /* When timeout is zero elapsed time doesn't matter. */ if (timeout && (timeout->tv_sec | timeout->tv_usec) > 0) gettimeofday (&start, /* timezone */ NULL); now = start; select_again: timeout_subtract_elapsed (&tv, timeout, &now, &start); if ((tv.tv_sec | tv.tv_usec) > 0) { fd_set set; int r; select_again_with_timeout: FD_ZERO (&set); FD_SET (info->fd, &set); r = select (info->fd + 1, /* readable */ &set, /* writeable */ NULL, /* in exception */ NULL, timeout ? &tv : NULL); switch (r) { case -1: /* error */ switch (errno) { case EINTR: if (!timeout) /* infinite */ goto select_again_with_timeout; gettimeofday (&now, /* timezone */ NULL); goto select_again; default: restart (info); info->tveng_errno = errno; t_error("select()", info); return -1; } case 0: /* timeout */ return 0; default: break; } } /* read_again: */ CLEAR (vbuf); vbuf.type = p_info->buffers[0].vb.type; vbuf.memory = V4L2_MEMORY_MMAP; if (-1 == xioctl (info, VIDIOC_DQBUF, &vbuf)) { switch (errno) { case EAGAIN: case EBUSY: if (!timeout) /* infinite */ goto select_again_with_timeout; if ((timeout->tv_sec | timeout->tv_usec) <= 0) return 0; /* timeout */ gettimeofday (&now, /* timezone */ NULL); timeout_subtract_elapsed (&tv, timeout, &now, &start); if ((tv.tv_sec | tv.tv_usec) <= 0) return 0; /* timeout */ goto select_again_with_timeout; /* xioctl/device_ioctl() handles EINTR. */ /* case EINTR: goto read_again; */ default: restart (info); info->tveng_errno = errno; t_error("VIDIOC_DQBUF", info); return -1; } } assert (vbuf.index < info->capture.n_buffers); b = p_info->buffers + vbuf.index; b->cb.sample_time = vbuf.timestamp; if (info->panel.cur_video_standard) { b->cb.stream_time = vbuf.sequence * info->panel.cur_video_standard->frame_ticks; } else { b->cb.stream_time = 0; } p_info->last_timestamp = b->cb.sample_time; b->vb.flags = vbuf.flags; b->vb.field = vbuf.field; b->vb.timestamp = vbuf.timestamp; b->vb.timecode = vbuf.timecode; b->vb.sequence = vbuf.sequence; b->dequeued = TRUE; *buffer = &b->cb; return 1; } static tv_bool flush_buffers (tveng_device_info * info) { struct private_tveng25_device_info *p_info = P_INFO (info); unsigned int count; if (!p_info->capturing) { return FALSE; } for (count = info->capture.n_buffers; count-- > 0;) { struct v4l2_buffer buffer; CLEAR (buffer); buffer.type = p_info->buffers[0].vb.type; buffer.memory = V4L2_MEMORY_MMAP; if (-1 == xioctl (info, VIDIOC_DQBUF, &buffer)) { switch (errno) { case EAGAIN: case EBUSY: return TRUE; default: restart (info); info->tveng_errno = errno; t_error ("VIDIOC_DQBUF", info); return FALSE; } } if (-1 == xioctl (&p_info->info, VIDIOC_QBUF, &buffer)) { /* XXX what now? */ return FALSE; } } return TRUE; } static int read_buffer (tveng_device_info * info, tv_capture_buffer * buffer, const struct timeval * timeout) { struct private_tveng25_device_info *p_info = P_INFO (info); struct timeval start; struct timeval now; struct timeval tv; ssize_t actual; if (CAPTURE_MODE_READ != info->capture_mode) { info->tveng_errno = -1; tv_error_msg(info, "Current capture mode is not READ (%d)", info->capture_mode); return -1; } /* TODO buffer->size assert (buffer->size >= info->capture.format.size); */ start.tv_sec = 0; start.tv_usec = 0; /* When timeout is zero elapsed time doesn't matter. */ if (timeout && (timeout->tv_sec | timeout->tv_usec) > 0) gettimeofday (&start, /* timezone */ NULL); now = start; select_again: timeout_subtract_elapsed (&tv, timeout, &now, &start); if ((tv.tv_sec | tv.tv_usec) > 0) { fd_set set; int r; select_again_with_timeout: FD_ZERO (&set); FD_SET (info->fd, &set); r = select (info->fd + 1, /* readable */ &set, /* writeable */ NULL, /* in exception */ NULL, timeout ? &tv : NULL); switch (r) { case -1: /* error */ switch (errno) { case EINTR: if (!timeout) /* infinite */ goto select_again_with_timeout; gettimeofday (&now, /* timezone */ NULL); goto select_again; default: restart (info); info->tveng_errno = errno; t_error("select()", info); return -1; } case 0: /* timeout */ return 0; default: break; } } read_again: if (0 && p_info->ivtv_driver > 0 && 0x7e900 == info->capture.format.size) { /* Work-around for bug http://www.poptix.net/ivtv/Nov-2004/msg00551.html which has been fixed in newer versions. */ actual = device_read (info->log_fp, info->fd, buffer->data, 0x7c600); } else { actual = device_read (info->log_fp, info->fd, buffer->data, info->capture.format.size); } if ((ssize_t) 0 == actual) { /* EOF? */ info->tveng_errno = 0; t_error ("read", info); return -1; } if ((ssize_t) -1 == actual) { switch (errno) { case EAGAIN: case EBUSY: if (!timeout) /* infinite */ goto select_again_with_timeout; if ((timeout->tv_sec | timeout->tv_usec) <= 0) return 0; /* timeout */ gettimeofday (&now, /* timezone */ NULL); timeout_subtract_elapsed (&tv, timeout, &now, &start); if ((tv.tv_sec | tv.tv_usec) <= 0) return 0; /* timeout */ goto select_again_with_timeout; case EINTR: goto read_again; default: info->tveng_errno = errno; t_error("read", info); return -1; } } gettimeofday (&buffer->sample_time, /* timezone */ NULL); p_info->reading = TRUE; buffer->stream_time = 0; p_info->last_timestamp = buffer->sample_time; return 1; } static int read_frame (tveng_device_info * info, tv_capture_buffer * buffer, const struct timeval * timeout) { int r; if (P_INFO (info)->caps.capabilities & V4L2_CAP_STREAMING) { tv_capture_buffer *qbuffer; r = dequeue_buffer (info, &qbuffer, timeout); if (r <= 0) /* error or timeout */ return r; assert (NULL != qbuffer); if (buffer) { const tv_image_format *dst_format; tv_bool success; dst_format = buffer->format; if (!dst_format) dst_format = &info->capture.format; success = tv_copy_image (buffer->data, dst_format, qbuffer->data, &info->capture.format); assert (success); buffer->sample_time = qbuffer->sample_time; buffer->stream_time = qbuffer->stream_time; } /* Queue the buffer again for processing */ if (!queue_buffer (info, qbuffer)) return -1; /* error */ } else { if (buffer) { r = read_buffer (info, buffer, timeout); if (r <= 0) /* error or timeout */ return r; } else { /* XXX read & discard. */ } } return 1; /* success */ } static tv_bool unmap_xbuffers (tveng_device_info * info, tv_bool ignore_errors) { struct private_tveng25_device_info *p_info = P_INFO (info); unsigned int i; tv_bool success; if (NULL == p_info->buffers) return TRUE; success = TRUE; for (i = info->capture.n_buffers; i-- > 0;) { if (-1 == device_munmap (info->log_fp, p_info->buffers[i].cb.data, p_info->buffers[i].vb.length)) { if (!ignore_errors) { info->tveng_errno = errno; t_error("munmap()", info); ignore_errors = TRUE; } success = FALSE; } } memset (p_info->buffers, 0, info->capture.n_buffers * sizeof (p_info->buffers[0])); free (p_info->buffers); p_info->buffers = NULL; info->capture.n_buffers = 0; return success; } static tv_bool map_xbuffers (tveng_device_info * info, enum v4l2_buf_type buf_type, unsigned int n_buffers) { struct private_tveng25_device_info *p_info = P_INFO (info); struct v4l2_requestbuffers rb; unsigned int i; p_info->buffers = NULL; info->capture.n_buffers = 0; CLEAR (rb); rb.type = buf_type; rb.memory = V4L2_MEMORY_MMAP; rb.count = n_buffers; if (-1 == xioctl (info, VIDIOC_REQBUFS, &rb)) return FALSE; if (rb.count <= 0) return FALSE; p_info->buffers = calloc (rb.count, sizeof (* p_info->buffers)); info->capture.n_buffers = 0; for (i = 0; i < rb.count; ++i) { struct xbuffer *b; void *data; b = p_info->buffers + i; b->vb.index = i; b->vb.type = buf_type; b->vb.memory = V4L2_MEMORY_MMAP; if (-1 == xioctl (info, VIDIOC_QUERYBUF, &b->vb)) goto failure; data = device_mmap (info->log_fp, /* start: any */ NULL, b->vb.length, PROT_READ | PROT_WRITE, MAP_SHARED, info->fd, (off_t) b->vb.m.offset); if (MAP_FAILED == data) goto failure; b->cb.data = data; b->cb.size = b->vb.length; b->cb.sample_time.tv_sec = 0; b->cb.sample_time.tv_usec = 0; b->cb.stream_time = 0; b->cb.format = &info->capture.format; b->dequeued = FALSE; b->clear = TRUE; ++info->capture.n_buffers; } if (queue_xbuffers (info)) return TRUE; failure: info->tveng_errno = errno; t_error("mmap()", info); if (info->capture.n_buffers > 0) { /* Driver bug, out of memory? May still work. */ if (queue_xbuffers (info)) return TRUE; } unmap_xbuffers (info, /* ignore_errors */ TRUE); return FALSE; } static tv_bool set_capture_buffers (tveng_device_info * info, tv_capture_buffer * buffers, unsigned int n_buffers) { struct private_tveng25_device_info *p_info = P_INFO (info); assert (NULL == buffers); if (p_info->capturing || !(p_info->caps.capabilities & V4L2_CAP_STREAMING) || CAPTURE_MODE_NONE != info->capture_mode) { info->tveng_errno = -1; tv_error_msg (info, "Internal error (%s:%d)", __FUNCTION__, __LINE__); return FALSE; } if (p_info->buffers) unmap_xbuffers (info, /* ignore_errors */ TRUE); if (0 == n_buffers) { /* Mission accomplished. */ return TRUE; } assert (0 == info->capture.n_buffers); assert (NULL == p_info->buffers); /* sn9c102 1.0.8 bug: mmap fails for > 1 buffers, apparently because m.offset isn't page aligned. */ if (0 == XSTRACMP (p_info->caps.driver, "sn9c102")) n_buffers = 1; if (!map_xbuffers (info, V4L2_BUF_TYPE_VIDEO_CAPTURE, n_buffers)) return FALSE; if (info->capture.n_buffers < 1) { unmap_xbuffers (info, /* ignore_errors */ TRUE); info->tveng_errno = -1; tv_error_msg(info, "Not enough buffers"); return FALSE; } return TRUE; } static tv_bool streamoff_or_reopen (tveng_device_info * info) { struct private_tveng25_device_info *p_info = P_INFO (info); int buf_type; int fd; buf_type = V4L2_BUF_TYPE_VIDEO_CAPTURE; /* The ivtv driver supports only read()ing, not streaming, but it recognizes this ioctl to stop capturing before we attempt to change the capture format. */ if (0 == xioctl_may_fail (info, VIDIOC_STREAMOFF, &buf_type)) return TRUE; /* Reopening the device should also work. */ /* XXX According to the V4L2 spec this shouldn't reset any parameters, but it may be wiser to check that. */ fd = device_open (info->log_fp, p_info->reopen_name, p_info->reopen_flags, /* mode */ 0); if (-1 == fd) { return FALSE; } device_close (info->log_fp, info->fd); info->fd = fd; return TRUE; } static tv_bool enable_capture (tveng_device_info * info, tv_bool enable) { struct private_tveng25_device_info *p_info = P_INFO (info); if (enable == p_info->capturing) return TRUE; if (enable) { gboolean dummy; int buf_type; p_tveng_stop_everything(info,&dummy); if (p_info->caps.capabilities & V4L2_CAP_STREAMING) { if (!p_info->buffers) { if (!set_capture_buffers (info, NULL, 8)) return FALSE; } buf_type = V4L2_BUF_TYPE_VIDEO_CAPTURE; if (-1 == xioctl (info, VIDIOC_STREAMON, &buf_type)) { unmap_xbuffers (info, /* ignore_errors */ TRUE); return FALSE; } } p_info->capturing = TRUE; info->capture_mode = CAPTURE_MODE_READ; CLEAR (p_info->last_timestamp); return TRUE; } else { assert (CAPTURE_MODE_READ == info->capture_mode); if (p_info->caps.capabilities & V4L2_CAP_STREAMING) { int buf_type; buf_type = V4L2_BUF_TYPE_VIDEO_CAPTURE; if (-1 == xioctl (info, VIDIOC_STREAMOFF, &buf_type)) return FALSE; } else if (p_info->reading) { /* Error ignored. */ streamoff_or_reopen (info); p_info->reading = FALSE; } p_info->capturing = FALSE; info->capture_mode = CAPTURE_MODE_NONE; if (!unmap_xbuffers (info, /* ignore_errors */ FALSE)) { return FALSE; } return TRUE; } } static void grab_xv_port (tveng_device_info * info) { #if defined (HAVE_XV_EXTENSION) && TVENG25_XV_TEST struct private_tveng25_device_info *p_info = P_INFO (info); if (NO_PORT == info->overlay.xv_port_id) return; if (_tv_xv_grab_port (info)) { p_info->grabbed_xv_port = TRUE; p_info->xwindow = 0; p_info->xgc = 0; #if 0 /* XXX XVideo-V4L does not support chroma-keying by the V4L driver, but the graphics chip may have a XV_COLORKEY attribute. Implications? XXX we still caps.flags the V4L chroma-keying support although it has no effect here. */ p_info->xa_colorkey = XInternAtom (p_info->info.display, "XV_COLORKEY", /* only_if_exists */ False); #endif } #endif } static tv_bool get_capabilities (tveng_device_info * info) { struct private_tveng25_device_info *p_info = P_INFO (info); CLEAR (p_info->caps); if (-1 == xioctl_may_fail (info, VIDIOC_QUERYCAP, &p_info->caps)) goto failure; if (TVENG25_NOVERLAY_TEST) { p_info->caps.capabilities &= ~V4L2_CAP_VIDEO_OVERLAY; } p_info->bttv_driver = 0; if (0 == XSTRACMP (p_info->caps.driver, "bttv")) { p_info->bttv_driver = p_info->caps.version; } p_info->ivtv_driver = 0; if (0 == XSTRACMP (p_info->caps.driver, "ivtv")) { p_info->ivtv_driver = p_info->caps.version; } if (TVENG25_HM12_TEST) { p_info->caps.capabilities &= ~V4L2_CAP_STREAMING; p_info->bttv_driver = 0; p_info->ivtv_driver = 1; } /* bttv 0.9.14 bug: S_TUNER ignores v4l2_tuner.audmode. */ p_info->use_v4l_audio = p_info->bttv_driver; info->caps.flags = 0; if (!(p_info->caps.capabilities & V4L2_CAP_VIDEO_CAPTURE)) { info->tveng_errno = -1; snprintf(info->error, 256, _("%s doesn't look like a valid capture device"), info -> file_name); goto failure; } info->caps.flags |= TVENG_CAPS_CAPTURE; if (p_info->caps.capabilities & V4L2_CAP_STREAMING) { /* XXX REQBUFS must be checked too */ info->caps.flags |= TVENG_CAPS_QUEUE; } else if (p_info->caps.capabilities & V4L2_CAP_READWRITE) { /* Nothing. */ } else { info -> tveng_errno = -1; snprintf(info->error, 256, _("Sorry, but \"%s\" cannot do streaming"), info -> file_name); goto failure; } /* We copy in case the string array lacks a NUL. */ /* XXX localize (encoding). */ if (!(info->node.label = XSTRADUP (p_info->caps.card))) goto failure; if (!(info->node.bus = XSTRADUP (p_info->caps.bus_info))) goto failure; if (!(info->node.driver = XSTRADUP (p_info->caps.driver))) goto failure; if (_tv_asprintf (&info->node.version, "%u.%u.%u", (p_info->caps.version >> 16) & 0xFF, (p_info->caps.version >> 8) & 0xFF, (p_info->caps.version >> 0) & 0xFF) < 0) goto failure; _tv_strlcpy (info->caps.name, (const char *) p_info->caps.card, MIN (sizeof (info->caps.name), sizeof (p_info->caps.card))); /* FIXME determine actual number of video inputs. */ info->caps.channels = 0; info->caps.audios = 0; /* FIXME determine actual limits. Attention: may be different for capture and overlay. Attention: all conversion routines cannot handle arbitrary widths yet. */ info->caps.maxwidth = 768; info->caps.minwidth = 16; info->caps.maxheight = 576; info->caps.minheight = 16; if (p_info->caps.capabilities & V4L2_CAP_TUNER) info->caps.flags |= TVENG_CAPS_TUNER; if (p_info->caps.capabilities & V4L2_CAP_VBI_CAPTURE) info->caps.flags |= TVENG_CAPS_TELETEXT; /* XXX get elsewhere */ if (p_info->caps.capabilities & 0) info->caps.flags |= TVENG_CAPS_MONOCHROME; return TRUE; failure: free (info->node.label); info->node.label = NULL; free (info->node.bus); info->node.bus = NULL; free (info->node.driver); info->node.driver = NULL; free (info->node.version); info->node.version = NULL; return FALSE; } /* ivtv 0.2.0-rc1a, 0.3.6o, 0.3.7 feature: /dev/video0+N (N = 0 ... 7) returns MPEG data, S_FMT will not switch the device to HM12. To get HM12 images one has to read from /dev/video32+N instead. */ static tv_bool reopen_ivtv_capture_device (tveng_device_info * info, int flags) { struct private_tveng25_device_info *p_info = P_INFO (info); char *name; unsigned int i; unsigned long num; int fd; struct v4l2_capability caps; name = NULL; fd = -1; /* XXX use fstat minor numbers instead? */ for (i = strlen (info->file_name); i > 0; --i) if (!isdigit (info->file_name[i - 1])) break; num = strtoul (info->file_name + i, NULL, 0); if (num >= 0x20 && num < 0x24) return TRUE; if (num >= 8) num = 0; _tv_asprintf (&name, "%.*s%lu", i, info->file_name, num + 32); if (NULL == name) { goto failure; } /* XXX see zapping_setup_fb for a safer version. */ fd = device_open (info->log_fp, name, flags, 0); if (-1 == fd) { info->tveng_errno = errno; snprintf (info->error, 256, "Cannot open ivtv capture device %s", name); goto failure; } CLEAR (caps); if (-1 == device_ioctl (info->log_fp, fprint_ioctl_arg, fd, VIDIOC_QUERYCAP, &caps) || 0 != XSTRACMP (caps.driver, "ivtv")) { info->tveng_errno = -1; snprintf (info->error, 256, "%s is no ivtv capture device", name); goto failure; } /* Error ignored. */ device_close (info->log_fp, info->fd); info->fd = fd; free (p_info->reopen_name); p_info->reopen_name = name; p_info->reopen_flags = flags; return TRUE; failure: free (name); name = NULL; if (-1 != fd) { /* Error ignored. */ device_close (info->log_fp, fd); fd = -1; } return FALSE; } #if TVENG25_XV_TEST #ifdef HAVE_XV_EXTENSION static tv_bool test_xv_port (tveng_device_info * info, tv_bool * restore_brightness) { static const unsigned int magic = 0x16; /* 010110 */ struct private_tveng25_device_info *p_info = P_INFO (info); unsigned int sensed; unsigned int i; int last; if (!_tv_xv_grab_port (info)) { return FALSE; } sensed = 0; last = 0; for (i = 0; i < 6; ++i) { unsigned int bit = magic & (1 << i); struct v4l2_control ctrl; *restore_brightness = TRUE; if (!_tv_xv_set_port_attribute (info, p_info->xa_xv_brightness, bit ? +1000 : -1000, /* sync */ TRUE)) { sensed = 0; goto failure; } CLEAR (ctrl); ctrl.id = V4L2_CID_BRIGHTNESS; if (-1 == xioctl (info, VIDIOC_G_CTRL, &ctrl)) { sensed = 0; goto failure; } sensed |= (ctrl.value >= last) << i; last = ctrl.value; } failure: /* Error ignored. */ _tv_xv_ungrab_port (info); return (0 == ((sensed ^ magic) & ~1)); } static tv_bool xvideo_probe (tveng_device_info * info) { struct private_tveng25_device_info *p_info = P_INFO (info); XErrorHandler old_error_handler; unsigned int version; unsigned int revision; unsigned int major_opcode; unsigned int event_base; unsigned int error_base; Window root_window; XvAdaptorInfo *adaptors; unsigned int n_adaptors; struct v4l2_control brightness; tv_bool restore_brightness; unsigned int i; adaptors = NULL; p_info->info.overlay.xv_port_id = NO_PORT; old_error_handler = XSetErrorHandler (x11_error_handler); p_info->xa_xv_brightness = XInternAtom (p_info->info.display, "XV_BRIGHTNESS", /* only_if_exists */ False); if (None == p_info->xa_xv_brightness) { goto failure; } if (Success != XvQueryExtension (p_info->info.display, &version, &revision, &major_opcode, &event_base, &error_base)) { goto failure; } if (version < 2 || (version == 2 && revision < 2)) { goto failure; } root_window = DefaultRootWindow (p_info->info.display); if (Success != XvQueryAdaptors (p_info->info.display, root_window, &n_adaptors, &adaptors)) { goto failure; } if (0 == n_adaptors) { goto failure; } CLEAR (brightness); brightness.id = V4L2_CID_BRIGHTNESS; /* XXX this is probably redundant. Can't we just take the value from info->panel.controls? */ if (-1 == xioctl (&p_info->info, VIDIOC_G_CTRL, &brightness)) { goto failure; } restore_brightness = FALSE; for (i = 0; i < n_adaptors; ++i) { unsigned int j; if (0 != strcmp (adaptors[i].name, "video4linux")) { continue; } for (j = 0; j < adaptors[i].num_ports; ++j) { p_info->info.overlay.xv_port_id = (XvPortID)(adaptors[i].base_id + j); if (test_xv_port (info, &restore_brightness)) { goto found; } } } p_info->info.overlay.xv_port_id = NO_PORT; found: if (restore_brightness) { /* Error ignored. */ s_ctrl (info, &brightness); } if (io_debug_msg > 0) { fprintf (stderr, "Found Xv port %d.\n", (int) p_info->info.overlay.xv_port_id); } failure: if (NULL != adaptors) { XvFreeAdaptorInfo (adaptors); adaptors = NULL; n_adaptors = 0; } XSetErrorHandler (old_error_handler); } #else /* !HAVE_XV_EXTENSION */ static void xvideo_probe (tveng_device_info * info) { /* Nothing to do. */ } #endif /* !HAVE_XV_EXTENSION */ #endif /* 0 */ static int do_open (int flags, tveng_device_info * info) { struct private_tveng25_device_info *p_info = P_INFO (info); free (info->node.device); info->node.device = strdup (info->file_name); if (NULL == info->node.device) return -1; free (p_info->reopen_name); p_info->reopen_name = strdup (info->file_name); if (NULL == p_info->reopen_name) { free (info->node.device); info->node.device = NULL; return -1; } /* sn9c102 1.0.8 bug: NONBLOCK open fails with EAGAIN if the device has users, and it seems the counter is never decremented when the USB device is disconnected at close time. Besides, non-blocking i/o is what we want because we use select() with a timeout. */ if (0 != strcmp ((char *) p_info->caps.driver, "sn9c102")) flags |= O_NONBLOCK; p_info->reopen_flags = flags; /* XXX see zapping_setup_fb for a safer version. */ info -> fd = device_open(info->log_fp, info -> file_name, flags, 0); if (-1 == info -> fd) { info->tveng_errno = errno; t_error("open()", info); free (p_info->reopen_name); p_info->reopen_name = NULL; free (info->node.device); info->node.device = NULL; return -1; } return 0; } /* Return fd for the device file opened. Checks if the device is a valid video device. -1 on error. Flags will be used for open()'ing the file */ extern int disable_overlay; static int p_tveng25_open_device_file(int flags, tveng_device_info * info) { struct private_tveng25_device_info *p_info = P_INFO (info); struct v4l2_framebuffer fb; assert (info != NULL); assert (info->file_name != NULL); if (-1 == do_open (flags, info)) return -1; if (!get_capabilities (info)) { /* Error ignored. */ device_close(info->log_fp, info->fd); free (p_info->reopen_name); p_info->reopen_name = NULL; free (info->node.device); info->node.device = NULL; return -1; } if (p_info->ivtv_driver > 0 && !TVENG25_HM12_TEST) { if (!reopen_ivtv_capture_device (info, flags)) { /* Error ignored. */ device_close(info->log_fp, info->fd); free (p_info->reopen_name); p_info->reopen_name = NULL; free (info->node.device); info->node.device = NULL; return -1; } } if (TVENG25_BAYER_TEST || TVENG25_HM12_TEST) p_info->caps.capabilities &= ~V4L2_CAP_VIDEO_OVERLAY; CLEAR (fb); if (!disable_overlay && (p_info->caps.capabilities & V4L2_CAP_VIDEO_OVERLAY)) { info->caps.flags |= TVENG_CAPS_OVERLAY; /* More capabilities determined later when we call xvideo_probe() and get_overlay_buffer(). */ } info -> current_controller = TVENG_CONTROLLER_V4L2; /* Everything seems to be OK with this device */ return (info -> fd); } static void stop (tveng_device_info * info) { struct private_tveng25_device_info *p_info = P_INFO (info); gboolean dummy; p_tveng_stop_everything(info,&dummy); if (p_info->buffers) unmap_xbuffers (info, /* ignore_errors */ TRUE); #if defined (HAVE_XV_EXTENSION) && TVENG25_XV_TEST if (p_info->grabbed_xv_port) { if (!_tv_xv_ungrab_port (info)) { p_info->info.overlay.xv_port_id = NO_PORT; p_info->info.caps.flags &= ~TVENG_CAPS_XVIDEO; } p_info->grabbed_xv_port = FALSE; } #endif if (-1 != info->fd) { /* Error ignored. */ device_close (info->log_fp, info->fd); info -> fd = -1; } } static void free_all(tveng_device_info * info) { struct private_tveng25_device_info *p_info = P_INFO (info); if (info -> file_name) { free(info -> file_name); info->file_name = NULL; } free_panel_controls (info); free_video_standards (info); free_video_inputs (info); free_audio_inputs (info); free (p_info->reopen_name); p_info->reopen_name = NULL; free (info->node.label); free (info->node.bus); free (info->node.driver); free (info->node.version); free (info->node.device); CLEAR (info->node); } /* Closes a device opened with tveng_init_device */ static void tveng25_close_device(tveng_device_info * info) { stop (info); info -> current_controller = TVENG_CONTROLLER_NONE; free_all (info); } static void reset_crop_rect (tveng_device_info * info) { struct v4l2_cropcap cropcap; struct v4l2_crop crop; CLEAR (cropcap); cropcap.type = V4L2_BUF_TYPE_VIDEO_CAPTURE; if (-1 == xioctl_may_fail (info, VIDIOC_CROPCAP, &cropcap)) { if (EINVAL != errno) { /* Error ignored. */ return; } /* Incorrectly defined as _IOR. */ if (-1 == xioctl_may_fail (info, VIDIOC_CROPCAP_OLD, &cropcap)) { /* Error ignored. */ return; } } CLEAR (crop); crop.type = V4L2_BUF_TYPE_VIDEO_CAPTURE; crop.c = cropcap.defrect; if (-1 == xioctl_may_fail (info, VIDIOC_S_CROP, &crop)) { switch (errno) { case EINVAL: /* Cropping not supported. */ return; default: /* Errors ignored. */ return; } } } static tv_bool init_panel (tveng_device_info * info) { CLEAR (info->panel); info->panel.set_video_input = set_video_input; info->panel.get_video_input = get_video_input; info->panel.set_tuner_frequency = set_tuner_frequency; info->panel.get_tuner_frequency = get_tuner_frequency; info->panel.get_signal_strength = get_signal_strength; info->panel.set_video_standard = set_video_standard; info->panel.get_video_standard = get_video_standard; info->panel.set_audio_input = set_audio_input; info->panel.get_audio_input = get_audio_input; info->panel.set_control = set_control; info->panel.get_control = get_control; info->panel.set_audio_mode = set_audio_mode; /* Video inputs & standards */ info->panel.video_inputs = NULL; info->panel.cur_video_input = NULL; info->panel.video_standards = NULL; info->panel.cur_video_standard = NULL; if (!get_video_input_list (info)) return FALSE; /* Audio inputs */ info->panel.audio_inputs = NULL; info->panel.cur_audio_input = NULL; if (!get_audio_input_list (info)) return FALSE; /* Controls */ info->panel.controls = NULL; if (!get_control_list (info)) return FALSE; return TRUE; } static tv_bool init_overlay (tveng_device_info * info) { CLEAR (info->overlay); if (0 == (info->caps.flags & TVENG_CAPS_OVERLAY)) return TRUE; /* TODO: set_buffer. */ info->overlay.get_buffer = get_overlay_buffer; info->overlay.set_window = set_overlay_window; info->overlay.get_window = get_overlay_window; info->overlay.enable = enable_overlay; /* Current parameters and additional capability flags. */ if (!get_overlay_buffer (info)) { if (EINVAL == errno) { /* cx88 0.0.5 sets the overlay capability flag but doesn't really support overlay. */ CLEAR (info->overlay); info->caps.flags &= ~(TVENG_CAPS_OVERLAY | TVENG_CAPS_XVIDEO); return TRUE; } return FALSE; } if (!get_overlay_window (info)) return FALSE; #if defined (HAVE_XV_EXTENSION) && TVENG25_XV_TEST /* The XVideo V4L wrapper supports only clip-list overlay. */ if (info->caps.flags & TVENG_CAPS_CLIPPING) { xvideo_probe (info); if (NO_PORT != info->overlay.xv_port_id) { p_info->info.caps.flags |= TVENG_CAPS_XVIDEO; info->overlay.set_xwindow = set_overlay_xwindow; } } #endif return TRUE; } static tv_bool init_capture (tveng_device_info * info) { struct private_tveng25_device_info *p_info = P_INFO (info); CLEAR (info->capture); p_info->buffers = NULL; if (0 == (info->caps.flags & TVENG_CAPS_CAPTURE)) return TRUE; info->capture.get_format = get_capture_format; info->capture.set_format = set_capture_format; info->capture.read_frame = read_frame; info->capture.enable = enable_capture; if (info->caps.flags & TVENG_CAPS_QUEUE) { info->capture.set_buffers = set_capture_buffers; info->capture.queue_buffer = queue_buffer; info->capture.dequeue_buffer = dequeue_buffer; info->capture.flush_buffers = flush_buffers; } if (!get_capture_format (info)) { if (EINVAL == errno) { CLEAR (info->capture); info->caps.flags &= ~(TVENG_CAPS_CAPTURE | TVENG_CAPS_QUEUE); return TRUE; } return FALSE; } info->capture.supported_pixfmt_set = get_supported_pixfmt_set (info); return TRUE; } static int tveng25_change_attach_mode (tveng_device_info * info, Window window, enum tveng_attach_mode attach_mode) { window = window; /* unused */ stop (info); switch (attach_mode) { case TVENG_ATTACH_CONTROL: case TVENG_ATTACH_VBI: attach_mode = TVENG_ATTACH_CONTROL; if (-1 == (info -> fd = do_open (0, info))) { free_all (info); return -1; } break; case TVENG_ATTACH_XV: /* FIXME this is overlay, not read. */ case TVENG_ATTACH_READ: /* NB must be RDWR since client may write mmapped buffers. */ if (-1 == (info -> fd = do_open (O_RDWR, info))) { free_all (info); return -1; } if (TVENG_ATTACH_XV == attach_mode) grab_xv_port (info); attach_mode = TVENG_ATTACH_READ; break; default: tv_error_msg(info, "Unknown attach mode for the device"); return -1; }; info -> attach_mode = attach_mode; /* Current capture mode is no capture at all */ info -> capture_mode = CAPTURE_MODE_NONE; return 0; /* ok */ } /* Associates the given tveng_device_info with the given video device. On error it returns -1 and sets info->tveng_errno, info->error to the correct values. device_file: The file used to access the video device (usually /dev/video) attach_mode: Specifies the mode to open the device file depth: The color depth the capture will be in, -1 means let tveng decide based on the current display depth. info: The structure to be associated with the device */ static int tveng25_attach_device(const char* device_file, Window window _unused_, enum tveng_attach_mode attach_mode, tveng_device_info * info) { struct private_tveng25_device_info * p_info = (struct private_tveng25_device_info*) info; assert (device_file != NULL); assert (info != NULL); memset ((char *) p_info + sizeof (p_info->info), 0, sizeof (*p_info) - sizeof (*info)); if (-1 != info -> fd) /* If the device is already attached, detach it */ tveng_close_device(info); info->audio_mutable = 0; info -> file_name = strdup(device_file); if (!(info -> file_name)) { info -> tveng_errno = errno; t_error("strdup()", info); return -1; } switch (attach_mode) { case TVENG_ATTACH_CONTROL: case TVENG_ATTACH_VBI: attach_mode = TVENG_ATTACH_CONTROL; info -> fd = p_tveng25_open_device_file(0, info); break; case TVENG_ATTACH_XV: /* FIXME this is overlay, not read. */ case TVENG_ATTACH_READ: /* NB must be RDWR since client may write mmapped buffers. It's required by some drivers and the V4L2 spec too. */ info -> fd = p_tveng25_open_device_file(O_RDWR, info); if (TVENG_ATTACH_XV == attach_mode) grab_xv_port (info); attach_mode = TVENG_ATTACH_READ; break; default: tv_error_msg(info, "Unknown attach mode for the device"); free(info->file_name); info->file_name = NULL; return -1; }; /* Errors (if any) are already aknowledged when we reach this point, so we don't show them again */ if (-1 == info -> fd) { free(info->file_name); info->file_name = NULL; return -1; } info -> attach_mode = attach_mode; /* Current capture mode is no capture at all */ info -> capture_mode = CAPTURE_MODE_NONE; if (!init_panel (info)) goto failure; if (info->caps.flags & (TVENG_CAPS_OVERLAY | TVENG_CAPS_CAPTURE)) { reset_crop_rect (info); } if (!init_overlay (info)) goto failure; if (!init_capture (info)) goto failure; return info -> fd; failure: tveng25_close_device (info); return -1; } static void destroy_devnode (tv_device_node * n, tv_bool restore) { restore = restore; if (NULL == n) return; free (n->device); free (n->version); free (n->driver); free (n->bus); free (n->label); CLEAR (*n); free (n); } static tv_bool append_devnode (tv_device_node ** list, const char * api, const __u8 * label, size_t label_size, const __u8 * bus, size_t bus_size, const __u8 * driver, size_t driver_size, unsigned int version, const char * device) { tv_device_node *n; n = calloc (1, sizeof (*n)); if (NULL == n) { return FALSE; } n->label = xstrndup (label, label_size); if (NULL == n->label) goto failure; if (NULL != bus) { n->bus = xstrndup (bus, bus_size); if (NULL == n->bus) goto failure; } if (driver) { char *s; s = xstrndup (driver, driver_size); if (NULL != s) { _tv_asprintf (&n->driver, "%s (%s)", s, api); free (s); s = NULL; } } else { n->driver = strdup (api); } if (NULL == n->label) goto failure; if (0 != version) { _tv_asprintf (&n->version, "%u.%u.%u", (version >> 16) & 0xFF, (version >> 8) & 0xFF, (version >> 0) & 0xFF); if (NULL == n->version) goto failure; } n->device = strdup (device); if (NULL == n->device) goto failure; n->destroy = destroy_devnode; tv_device_node_add (list, n); return TRUE; failure: destroy_devnode (n, /* restore */ TRUE); return FALSE; } tv_device_node * tveng25_device_scan (FILE * log) { static const char *video_devices [] = { "/dev/video", "/dev/video0", "/dev/v4l/video0", "/dev/v4l/video", "/dev/video1", "/dev/video2", "/dev/video3", "/dev/v4l/video1", "/dev/v4l/video2", "/dev/v4l/video3" }; tv_device_node *list; unsigned int i; list = NULL; if (NULL != log) { fprintf (log, "V4L2 device scan\n"); } for (i = 0; i < N_ELEMENTS (video_devices); ++i) { struct video_capability v4l_cap; struct v4l2_capability v4l2_cap; tv_bool success; int fd; /* XXX see zapping_setup_fb for a safer version. */ fd = device_open (log, video_devices[i], /* flags */ O_RDWR, /* mode */ 0); if (-1 == fd) { continue; } success = TRUE; if (0 == device_ioctl (log, fprint_ioctl_arg, fd, VIDIOC_QUERYCAP, &v4l2_cap)) { success = append_devnode (&list, "V4L2", v4l2_cap.card, sizeof (v4l2_cap.card), v4l2_cap.bus_info, sizeof (v4l2_cap.bus_info), v4l2_cap.driver, sizeof (v4l2_cap.driver), v4l2_cap.version, video_devices[i]); } else if (0 == device_ioctl (log, fprint_ioctl_arg, fd, VIDIOCGCAP, &v4l_cap)) { success = append_devnode (&list, "V4L", (const __u8 *) v4l_cap.name, sizeof (v4l_cap.name), /* bus */ NULL, 0, /* driver */ NULL, 0, /* version */ 0, video_devices[i]); } /* Error ignored. */ device_close (log, fd); fd = -1; if (!success) break; } return list; } static struct tveng_module_info tveng25_module_info = { .attach_device = tveng25_attach_device, .close_device = tveng25_close_device, .change_mode = tveng25_change_attach_mode, .interface_label = "Video4Linux 2", .private_size = sizeof(struct private_tveng25_device_info) }; /* Inits the V4L2 module, and fills in the given table. */ void tveng25_init_module(struct tveng_module_info *module_info) { assert (module_info != NULL); memcpy(module_info, &tveng25_module_info, sizeof(struct tveng_module_info)); } #else /* !ENABLE_V4L */ #include "tveng25.h" void tveng25_init_module(struct tveng_module_info *module_info) { assert (module_info != NULL); CLEAR (module_info); } #endif /* ENABLE_V4L */ ���������������������������������������������������������������������������������������������������������������������������zapping-0.10cvs6/src/tveng25.h���������������������������������������������������������������������� 644 � 764 � 144 � 4067 10406535310 11243� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Zapping (TV viewer for the Gnome Desktop) * Copyright (C) 2000 Iaki Garca Etxebarria * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifndef __TVENG25_H__ #define __TVENG25_H__ #include "tveng_private.h" /* Inits the V4L2 module, and fills in the given table. */ void tveng25_init_module(struct tveng_module_info *module_info); /* Prototypes for forward declaration, used only in tveng25.c */ #ifdef TVENG25_PROTOTYPES /* Associates the given tveng_device_info with the given video device. On error it returns -1 and sets info->errno, info->error to the correct values. device_file: The file used to access the video device (usually /dev/video) attach_mode: Specifies the mode to open the device file depth: The color depth the capture will be in, -1 means let tveng decide based on the current display depth. info: The structure to be associated with the device */ static int tveng25_attach_device(const char* device_file, Window window, enum tveng_attach_mode attach_mode, tveng_device_info * info); /* Closes the video device asocciated to the device info object. Should be called before reattaching a video device to the same object, but there is no need to call this before calling tveng_device_info_destroy. */ static void tveng25_close_device(tveng_device_info* info); extern tv_device_node * tveng25_device_scan (FILE * log); #endif /* TVENG25_PROTOTYPES */ #endif /* TVENG25.H */ �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������zapping-0.10cvs6/src/tvengxv.c���������������������������������������������������������������������� 644 � 764 � 144 � 122746 10432662577 11531� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Zapping (TV viewer for the Gnome Desktop) * Copyright (C) 2000-2001 Iaki Garca Etxebarria * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* This is the library in charge of simplyfying Video Access API (I don't want to use thirteen lines of code with ioctl's every time I want to change tuning freq). the name is TV Engine, since it is intended mainly for TV viewing. This file is separated so zapping doesn't need to know about V4L[2] */ #ifdef HAVE_CONFIG_H # include "config.h" #endif #include <stdio.h> #include <ctype.h> #include <errno.h> #include <tveng.h> #ifdef USE_XV #define TVENGXV_PROTOTYPES 1 #include "tvengxv.h" #include "globals.h" /* xv_video_port, disable_overlay */ #include "zmisc.h" struct video_input { tv_video_line pub; char name[64]; unsigned int num; /* random standard */ }; #define VI(l) PARENT (l, struct video_input, pub) #define CVI(l) CONST_PARENT (l, struct video_input, pub) struct standard { tv_video_standard pub; char name[64]; unsigned int num; }; #define S(l) PARENT (l, struct standard, pub) #define CS(l) CONST_PARENT (l, struct standard, pub) struct control { tv_control pub; Atom atom; }; #define C(l) PARENT (l, struct control, pub) struct private_tvengxv_device_info { tveng_device_info info; /* Info field, inherited */ /** List of encodings, i.e. standards and inputs. */ XvEncodingInfo * ei; unsigned int n_encodings; unsigned int cur_encoding; /* This atoms define the controls */ Atom xa_encoding; int encoding_max, encoding_min, encoding_gettable; Atom xa_freq; int freq_max, freq_min; Atom xa_mute; Atom xa_volume; Atom xa_colorkey; int colorkey_max, colorkey_min; Atom xa_signal_strength; tv_bool active; Window window; GC gc; Window last_win; GC last_gc; int last_w, last_h; }; #define P_INFO(p) PARENT (p, struct private_tvengxv_device_info, info) static int find_encoding (tveng_device_info * info, const char * input, const char * standard) { struct private_tvengxv_device_info * p_info = P_INFO (info); char encoding[200]; unsigned int i; snprintf (encoding, 199, "%s-%s", standard, input); encoding[199] = 0; for (i = 0; i < p_info->n_encodings; ++i) if (0 == strcasecmp (encoding, p_info->ei[i].name)) return i; return -1; } /* Splits "standard-input" storing "standard" in buffer d of size (can be 0), returning pointer to "input". Returns NULL on error. */ static const char * split_encoding (char * d, size_t d_size, const char * s1) { const char *s; /* We must parse the string backwards because some clown wrote standards in the v4l Xv driver as "PAL-M", "PAL-Nc" etc not realizing "-" is a separator. */ s = s1 + strlen (s1); for (; s > s1 && s[-1] != '-'; --s) ; if (s <= s1) return NULL; if (d_size > 0) { size_t std_len; std_len = s - s1; _tv_strlcpy (d, s1, MIN (std_len, d_size)); } return s; } static tv_bool xv_error (tveng_device_info * info, const char * function, int status) { if (Success != x11_error_code) { /* XXX better error message */ /* XvBadPort, XvBadEncoding, XvBadControl + error_base. XvNumErrors = 3 */ info->tveng_errno = 1500 + x11_error_code; t_error(function, info); return FALSE; } switch (status) { case Success: return TRUE; case XvBadExtension: case XvAlreadyGrabbed: case XvInvalidTime: case XvBadReply: case XvBadAlloc: default: info->tveng_errno = 160 + status; t_error(function, info); return FALSE; } } tv_bool _tv_xv_stop_video (tveng_device_info * info, Window window) { XErrorHandler old_error_handler; tv_bool success; int status; success = FALSE; old_error_handler = XSetErrorHandler (x11_error_handler); x11_error_code = Success; status = XvStopVideo (info->display, info->overlay.xv_port_id, window); if (io_debug_msg > 0) { unsigned long saved_error_code = x11_error_code; fprintf (stderr, "%d = XvStopVideo (display=\"%s\" " "port=%d window=%d)\n", status, XDisplayString (info->display), (int) info->overlay.xv_port_id, (int) window); x11_error_code = saved_error_code; } if (Success == (status | x11_error_code)) XSync (info->display, /* discard events */ False); success = xv_error (info, "XvStopVideo", status); XSetErrorHandler (old_error_handler); return success; } tv_bool _tv_xv_put_video (tveng_device_info * info, Window window, GC gc, int src_x, int src_y, unsigned int src_width, unsigned int src_height) { XErrorHandler old_error_handler; Window root_window; int x, y; unsigned int width, height; unsigned int border_width; unsigned int depth; tv_bool success; int status; success = FALSE; old_error_handler = XSetErrorHandler (x11_error_handler); x11_error_code = Success; if (!XGetGeometry (info->display, window, &root_window, &x, &y, &width, &height, &border_width, &depth)) { /* XXX better error message */ info->tveng_errno = -1; t_error("XGetGeomentry", info); if (io_debug_msg > 0) { fprintf (stderr, "%s: XGetGeometry() failed\n", __FUNCTION__); } goto failure; } /* 1x1 freezes the X server (Xorg 6.8.0, bttv 0.9.5) */ if (width < 32 || height < 24) { /* XXX better error message */ info->tveng_errno = -1; t_error("", info); if (io_debug_msg > 0) { fprintf (stderr, "%s: window size %ux%u too small\n", __FUNCTION__, width, height); } goto failure; } status = XvPutVideo (info->display, info->overlay.xv_port_id, window, gc, src_x, src_y, src_width, src_height, /* dst_x, y */ 0, 0, /* dst */ width, height); if (io_debug_msg > 0) { unsigned long saved_error_code = x11_error_code; fprintf (stderr, "%d = XvPutVideo (display=\"%s\" " "port=%d window=%d gc=%d " "src=%ux%u%+d%+d dst=%ux%u%+d%+d)\n", status, XDisplayString (info->display), (int) info->overlay.xv_port_id, (int) window, (int) gc, src_width, src_height, src_x, src_y, width, height, 0, 0); x11_error_code = saved_error_code; } if (Success == (status | x11_error_code)) XSync (info->display, /* discard events */ False); success = xv_error (info, "XvPutVideo", status); failure: XSetErrorHandler (old_error_handler); return success; } tv_bool _tv_xv_get_port_attribute (tveng_device_info * info, Atom atom, int * value) { XErrorHandler old_error_handler; tv_bool success; int status; success = FALSE; old_error_handler = XSetErrorHandler (x11_error_handler); x11_error_code = Success; status = XvGetPortAttribute (info->display, info->overlay.xv_port_id, atom, value); if (io_debug_msg > 0) { unsigned long saved_error_code = x11_error_code; char *atom_name; atom_name = XGetAtomName (info->display, atom); fprintf (stderr, "%d = XvGetPortAttribute (display=\"%s\" " "port=%d atom=\"%s\") -> (value=%d=0x%x)\n", status, XDisplayString (info->display), (int) info->overlay.xv_port_id, atom_name, *value, *value); if (NULL != atom_name) XFree (atom_name); x11_error_code = saved_error_code; } success = xv_error (info, "XvGetPortAttribute", status); XSetErrorHandler (old_error_handler); return success; } tv_bool _tv_xv_set_port_attribute (tveng_device_info * info, Atom atom, int value, tv_bool sync) { XErrorHandler old_error_handler; tv_bool success; int status; success = FALSE; old_error_handler = XSetErrorHandler (x11_error_handler); x11_error_code = Success; status = XvSetPortAttribute (info->display, info->overlay.xv_port_id, atom, value); if (io_debug_msg > 0) { unsigned long saved_error_code = x11_error_code; char *atom_name; atom_name = XGetAtomName (info->display, atom); fprintf (stderr, "%d = XvSetPortAttribute (display=\"%s\" " "port=%d atom=\"%s\" value=%d=0x%x)\n", status, XDisplayString (info->display), (int) info->overlay.xv_port_id, atom_name, value, value); if (NULL != atom_name) XFree (atom_name); x11_error_code = saved_error_code; } if (Success == (status | x11_error_code) && sync) XSync (info->display, /* discard events */ False); success = xv_error (info, "XvSetPortAttribute", status); XSetErrorHandler (old_error_handler); return success; } tv_bool _tv_xv_ungrab_port (tveng_device_info * info) { XErrorHandler old_error_handler; tv_bool success; Time time; int status; success = FALSE; old_error_handler = XSetErrorHandler (x11_error_handler); x11_error_code = Success; time = CurrentTime; status = XvUngrabPort (info->display, info->overlay.xv_port_id, time); if (io_debug_msg > 0) { unsigned long saved_error_code = x11_error_code; fprintf (stderr, "%d = XvUngrabPort (display=\"%s\" " "port=%d time=%d)\n", status, XDisplayString (info->display), (int) info->overlay.xv_port_id, (int) time); x11_error_code = saved_error_code; } if (Success == (status | x11_error_code)) XSync (info->display, /* discard events */ False); success = xv_error (info, "XvUngrabPort", status); XSetErrorHandler (old_error_handler); return success; } tv_bool _tv_xv_grab_port (tveng_device_info * info) { XErrorHandler old_error_handler; tv_bool success; Time time; int status; if (NO_PORT == info->overlay.xv_port_id) { return FALSE; } success = FALSE; old_error_handler = XSetErrorHandler (x11_error_handler); x11_error_code = Success; time = CurrentTime; status = XvGrabPort (info->display, info->overlay.xv_port_id, time); if (io_debug_msg > 0) { fprintf (stderr, "%d = XvGrabPort (display=\"%s\" " "port=%d time=%d)\n", status, XDisplayString (info->display), (int) info->overlay.xv_port_id, (int) time); } success = xv_error (info, "XvGrabPort", status); XSetErrorHandler (old_error_handler); return success; } static unsigned int adaptor_type (const XvAdaptorInfo * adaptor) { unsigned int type = adaptor->type; if (0 == strcmp (adaptor->name, "NVIDIA Video Interface Port") && type == (XvInputMask | XvVideoMask)) { /* Bug. This is TV out. */ type = XvOutputMask | XvVideoMask; } return type; } static tv_bool grab_port (tveng_device_info * info, const XvAdaptorInfo * pAdaptors, int nAdaptors, XvPortID port_id) { int i; for (i = 0; i < nAdaptors; ++i) { const XvAdaptorInfo *pAdaptor; unsigned int type; pAdaptor = pAdaptors + i; type = adaptor_type (pAdaptor); if ((XvInputMask | XvVideoMask) == (type & (XvInputMask | XvVideoMask))) { if (ANY_PORT == port_id) { unsigned int i; for (i = 0; i < pAdaptor->num_ports; ++i) { info->overlay.xv_port_id = (XvPortID)(pAdaptor->base_id + i); if (_tv_xv_grab_port (info)) return TRUE; info->overlay.xv_port_id = NO_PORT; } } else { if (port_id >= pAdaptor->base_id && port_id < (pAdaptor->base_id + pAdaptor->num_ports)) { info->overlay.xv_port_id = port_id; if (_tv_xv_grab_port (info)) return TRUE; info->overlay.xv_port_id = NO_PORT; return FALSE; } } } } return FALSE; } static int p_tvengxv_open_device(tveng_device_info *info, Window window) { struct private_tvengxv_device_info *p_info = P_INFO (info); unsigned int version; unsigned int revision; unsigned int major_opcode; unsigned int event_base; unsigned int error_base; XvAdaptorInfo *adaptor_info; unsigned int num_adaptors; XvAttribute *attribute; int num_attributes; printv ("xv_video_port 0x%x\n", xv_video_port); adaptor_info = NULL; num_adaptors = 0; attribute = NULL; num_attributes = 0; p_info->info.overlay.xv_port_id = NO_PORT; p_info->ei = NULL; p_info->n_encodings = 0; if (Success != XvQueryExtension (info->display, &version, &revision, &major_opcode, &event_base, &error_base)) { printv ("XVideo extension not available\n"); goto failure; } printv ("XVideo opcode %d, base %d, %d, version %d.%d\n", major_opcode, event_base, error_base, version, revision); if (version < 2 || (version == 2 && revision < 2)) { printv ("XVideo extension not usable\n"); goto failure; } /* We query adaptors which can render into this window. */ if (None == window) window = DefaultRootWindow (info->display); if (Success != XvQueryAdaptors (info->display, window, &num_adaptors, &adaptor_info)) { printv ("XvQueryAdaptors failed\n"); goto failure; } if (0 == num_adaptors) { printv ("No XVideo adaptors\n"); goto failure; } p_info->info.overlay.xv_port_id = NO_PORT; if (!grab_port (info, adaptor_info, num_adaptors, (XvPortID) xv_video_port) && ANY_PORT != xv_video_port) { printv ("XVideo video input port 0x%x not found\n", (unsigned int) xv_video_port); grab_port (info, adaptor_info, num_adaptors, ANY_PORT); } if (NO_PORT == p_info->info.overlay.xv_port_id) { printv ("No XVideo input port found\n"); goto failure; } printv ("Using XVideo video input port 0x%x\n", (unsigned int) p_info->info.overlay.xv_port_id); /* Check that it supports querying controls and encodings */ if (Success != XvQueryEncodings (info->display, info->overlay.xv_port_id, &p_info->n_encodings, &p_info->ei)) goto failure; if (0 == p_info->n_encodings) { info->tveng_errno = -1; tv_error_msg(info, "You have no encodings available"); goto failure; } /* Create the atom that handles the encoding. */ if (!(attribute = XvQueryPortAttributes (info->display, info->overlay.xv_port_id, &num_attributes))) goto failure; if (num_attributes <= 0) goto failure; XFree (attribute); attribute = NULL; /* XXX error ignored. */ _tv_xv_ungrab_port (info); XvFreeAdaptorInfo (adaptor_info); adaptor_info = NULL; return 0xbeaf; /* the port seems to work ok, success */ failure: if (attribute) XFree (attribute); if (p_info->ei) { XvFreeEncodingInfo (p_info->ei); p_info->ei = NULL; p_info->n_encodings = 0; } if (NO_PORT != p_info->info.overlay.xv_port_id) { /* Error ignored. */ _tv_xv_ungrab_port (info); p_info->info.overlay.xv_port_id = NO_PORT; } if (adaptor_info) XvFreeAdaptorInfo (adaptor_info); return -1; /* failure */ } /* * Overlay */ static tv_bool set_overlay_xwindow (tveng_device_info * info, Window window, GC gc, unsigned int chromakey) { struct private_tvengxv_device_info *p_info = P_INFO (info); assert (!p_info->active); if (p_info->xa_colorkey != None) { if (!_tv_xv_set_port_attribute (info, p_info->xa_colorkey, (int) chromakey, /* sync */ TRUE)) { return FALSE; } } p_info->window = window; p_info->gc = gc; return TRUE; } static tv_bool enable_overlay (tveng_device_info * info, tv_bool on) { struct private_tvengxv_device_info *p_info = P_INFO (info); tv_bool success; success = FALSE; if (p_info->window == 0 || p_info->gc == 0) { info->tveng_errno = -1; tv_error_msg(info, "The window value hasn't been set"); return FALSE; } if (on) { int num; num = 0; if (p_info->xa_encoding != None && p_info->encoding_gettable) { /* Error ignored. */ _tv_xv_get_port_attribute (info, p_info->xa_encoding, &num); } success = _tv_xv_put_video (info, p_info->window, p_info->gc, /* src_x, y */ 0, 0, /* src */ p_info->ei[num].width, /* src */ p_info->ei[num].height); } else { success = _tv_xv_stop_video (info, p_info->window); } if (success) p_info->active = on; return success; } static tv_bool get_overlay_window (tveng_device_info *info) { struct private_tvengxv_device_info *p_info = P_INFO (info); int result; if (p_info->xa_colorkey == None) return FALSE; if (!_tv_xv_get_port_attribute (info, p_info->xa_colorkey, &result)) return FALSE; info->overlay.chromakey = result; return TRUE; } /* * Controls */ static tv_bool do_get_control (struct private_tvengxv_device_info *p_info, struct control * c) { int value; /* XXX check at runtime */ if (c->atom == p_info->xa_mute) return TRUE; /* no read-back (bttv bug) */ if (!_tv_xv_get_port_attribute (&p_info->info, c->atom, &value)) return FALSE; if (c->pub.value != value) { c->pub.value = value; tv_callback_notify (&p_info->info, &c->pub, c->pub._callback); } return TRUE; } static tv_bool get_control (tveng_device_info * info, tv_control * c) { struct private_tvengxv_device_info *p_info = P_INFO (info); if (c) return do_get_control (p_info, C(c)); for_all (c, p_info->info.panel.controls) if (c->_parent == info) if (!do_get_control (p_info, C(c))) return FALSE; return TRUE; } static int set_control (tveng_device_info * info, tv_control * c, int value) { struct private_tvengxv_device_info *p_info = P_INFO (info); if (!_tv_xv_set_port_attribute (info, C(c)->atom, value, /* sync */ FALSE)) return FALSE; if (C(c)->atom == p_info->xa_mute) { if (c->value != value) { c->value = value; tv_callback_notify (info, c, c->_callback); } return TRUE; } return do_get_control (p_info, C(c)); } static const struct { const char * atom; const char * label; tv_control_id id; tv_control_type type; } xv_attr_meta [] = { { "XV_BRIGHTNESS", N_("Brightness"), TV_CONTROL_ID_BRIGHTNESS, TV_CONTROL_TYPE_INTEGER }, { "XV_CONTRAST", N_("Contrast"), TV_CONTROL_ID_CONTRAST, TV_CONTROL_TYPE_INTEGER }, { "XV_SATURATION", N_("Saturation"), TV_CONTROL_ID_SATURATION, TV_CONTROL_TYPE_INTEGER }, { "XV_HUE", N_("Hue"), TV_CONTROL_ID_HUE, TV_CONTROL_TYPE_INTEGER }, { "XV_COLOR", N_("Color"), TV_CONTROL_ID_UNKNOWN, TV_CONTROL_TYPE_INTEGER }, { "XV_INTERLACE", N_("Interlace"), TV_CONTROL_ID_UNKNOWN, TV_CONTROL_TYPE_CHOICE }, { "XV_MUTE", N_("Mute"), TV_CONTROL_ID_MUTE, TV_CONTROL_TYPE_BOOLEAN }, { "XV_VOLUME", N_("Volume"), TV_CONTROL_ID_VOLUME, TV_CONTROL_TYPE_INTEGER }, }; static tv_bool add_control (struct private_tvengxv_device_info *p_info, const char * atom, const char * label, tv_control_id id, tv_control_type type, int minimum, int maximum, int step) { struct control c; Atom xatom; CLEAR (c); xatom = XInternAtom (p_info->info.display, atom, False); if (xatom == None) return TRUE; c.pub.type = type; c.pub.id = id; if (!(c.pub.label = strdup (_(label)))) goto failure; c.pub.minimum = minimum; c.pub.maximum = maximum; c.pub.step = step; c.atom = xatom; if (0 == strcmp (atom, "XV_INTERLACE")) { if (!(c.pub.menu = calloc (4, sizeof (char *)))) goto failure; if (!(c.pub.menu[0] = strdup (_("No"))) || !(c.pub.menu[1] = strdup (_("Yes"))) || !(c.pub.menu[2] = strdup (_("Doublescan")))) goto failure; } if (append_panel_control (&p_info->info, &c.pub, sizeof (c))) return TRUE; failure: if (c.pub.menu) { free (c.pub.menu[0]); free (c.pub.menu[1]); free (c.pub.menu[2]); free (c.pub.menu); } free (c.pub.label); return FALSE; } /* * Video standards */ static tv_bool set_video_standard (tveng_device_info * info, tv_video_standard * s) { struct private_tvengxv_device_info *p_info = P_INFO (info); int num; num = CS(s)->num; if (!_tv_xv_set_port_attribute (info, p_info->xa_encoding, num, /* sync */ TRUE)) return FALSE; p_info->cur_encoding = num; store_cur_video_standard (info, s); return TRUE; } /* Encodings we can translate to tv_video_standard_id. Other encodings will be flagged as custom standard. */ static const struct { const char * name; const char * label; tv_videostd_set set; } standards [] = { { "pal", "PAL", TV_VIDEOSTD_SET_PAL }, { "ntsc", "NTSC", TV_VIDEOSTD_SET (TV_VIDEOSTD_NTSC_M) }, { "secam", "SECAM", TV_VIDEOSTD_SET_SECAM }, { "palnc", "PAL-NC", TV_VIDEOSTD_SET (TV_VIDEOSTD_PAL_NC) }, { "palm", "PAL-M", TV_VIDEOSTD_SET (TV_VIDEOSTD_PAL_M) }, { "paln", "PAL-N", TV_VIDEOSTD_SET (TV_VIDEOSTD_PAL_N) }, { "ntscjp", "NTSC-JP", TV_VIDEOSTD_SET (TV_VIDEOSTD_NTSC_M_JP) }, }; static int stdcmp (const char * s1, const char * s2) { for (;;) { int c = *s1; if (0 == c) return 0 - *s2; if (!isalnum (c)) { ++s1; continue; } if (tolower (c) != *s2) return -1; ++s1; ++s2; } return -1; } static tv_bool get_video_standard_list (tveng_device_info * info) { struct private_tvengxv_device_info *p_info = P_INFO (info); const XvEncodingInfo *cur_ei; const char *cur_input; unsigned int custom; unsigned int i; free_video_standards (info); if (p_info->xa_encoding == None) return TRUE; cur_ei = &p_info->ei[p_info->cur_encoding]; cur_input = split_encoding (NULL, 0, cur_ei->name); if (!cur_input) return TRUE; custom = 32; for (i = 0; i < p_info->n_encodings; ++i) { struct standard *s; char buf[sizeof (s->name)]; const char *input; unsigned int j; if (!(input = split_encoding (buf, sizeof (buf), p_info->ei[i].name))) continue; if (0 != strcmp (input, cur_input)) continue; if (buf[0] == 0) continue; for (j = 0; j < N_ELEMENTS (standards); ++j) if (0 == stdcmp (buf, standards[j].name)) break; if (j < N_ELEMENTS (standards)) { s = S(append_video_standard (&info->panel.video_standards, standards[j].set, standards[j].label, standards[j].name, sizeof (*s))); } else { char up[sizeof (buf)]; if (custom >= TV_MAX_VIDEOSTDS) continue; for (j = 0; buf[j]; ++j) up[j] = toupper (buf[j]); up[j] = 0; s = S(append_video_standard (&info->panel.video_standards, TV_VIDEOSTD_SET (1) << (custom++), up, buf, sizeof (*s))); } if (s == NULL) goto failure; z_strlcpy (s->name, buf, sizeof (s->name)); s->num = i; } return TRUE; failure: free_video_standard_list (&info->panel.video_standards); return FALSE; } /* * Video inputs */ static tv_bool get_video_input (tveng_device_info * info); static void store_frequency (tveng_device_info * info, struct video_input * vi, int freq) { unsigned int frequency = freq * 62500; if (vi->pub.u.tuner.frequency != frequency) { vi->pub.u.tuner.frequency = frequency; tv_callback_notify (info, &vi->pub, vi->pub._callback); } } static tv_bool get_tuner_frequency (tveng_device_info * info, tv_video_line * l) { struct private_tvengxv_device_info * p_info = P_INFO (info); int freq; if (None == p_info->xa_freq) return FALSE; if (!get_video_input (info)) return FALSE; if (info->panel.cur_video_input == l) { if (!_tv_xv_get_port_attribute (info, p_info->xa_freq, &freq)) return FALSE; store_frequency (info, VI (l), freq); } return TRUE; } static tv_bool set_tuner_frequency (tveng_device_info * info, tv_video_line * l, unsigned int frequency) { struct private_tvengxv_device_info *p_info = P_INFO (info); int freq; if (p_info->xa_freq == None) return FALSE; if (!get_video_input (info)) return FALSE; freq = frequency / 62500; if (info->panel.cur_video_input != l) goto store; if (!_tv_xv_set_port_attribute (info, p_info->xa_freq, freq, /* sync */ TRUE)) return FALSE; store: store_frequency (info, VI (l), freq); return TRUE; } static tv_bool get_signal_strength (tveng_device_info * info, int * strength, int * afc _unused_) { struct private_tvengxv_device_info * p_info = P_INFO (info); if (NULL == strength) return TRUE; if (None == p_info->xa_signal_strength) return TRUE; return _tv_xv_get_port_attribute (info, p_info->xa_signal_strength, strength); } static struct video_input * find_video_input (tv_video_line * list, const char * input) { for_all (list, list) { struct video_input *vi = VI(list); if (0 == strcmp (vi->name, input)) return vi; } return NULL; } /* Cannot use the generic helper functions, we must set video standard and input at the same time. */ static void set_source (tveng_device_info * info, tv_video_line * input, tv_video_standard * standard) { tv_video_line *old_input; tv_video_standard *old_standard; old_input = info->panel.cur_video_input; info->panel.cur_video_input = input; old_standard = info->panel.cur_video_standard; info->panel.cur_video_standard = standard; if (old_input != input) tv_callback_notify (info, info, info->panel.video_input_callback); if (old_standard != standard) tv_callback_notify (info, info, info->panel.video_standard_callback); } static tv_bool get_video_input (tveng_device_info * info) { struct private_tvengxv_device_info *p_info = P_INFO (info); struct video_input *vi; const char *input; tv_video_standard *ts; int enc; if (p_info->xa_encoding == None || !p_info->encoding_gettable) { set_source (info, NULL, NULL); return TRUE; } if (!_tv_xv_get_port_attribute (info, p_info->xa_encoding, &enc)) return FALSE; /* XXX Xv/v4l BUG? */ if (enc < 0 || enc > 10 /*XXX*/) p_info->cur_encoding = 0; else p_info->cur_encoding = enc; input = split_encoding (NULL, 0, p_info->ei[p_info->cur_encoding].name); vi = find_video_input (info->panel.video_inputs, input); assert (NULL != vi); get_video_standard_list (info); for_all (ts, info->panel.video_standards) if (S(ts)->num == p_info->cur_encoding) break; set_source (info, &vi->pub, ts); return TRUE; } static tv_bool set_video_input (tveng_device_info * info, tv_video_line * tl) { struct private_tvengxv_device_info *p_info = P_INFO (info); struct video_input *vi; tv_video_standard *ts; int num; vi = VI(tl); num = -1; if (info->panel.cur_video_standard) { struct standard *s; /* Keep standard if possible. */ s = S(info->panel.cur_video_standard); num = find_encoding (info, vi->name, s->name); } if (-1 == num) { num = vi->num; /* random standard */ /* XXX error ignored */ _tv_xv_set_port_attribute (info, p_info->xa_encoding, num, /* sync */ TRUE); get_video_standard_list (info); } else { /* XXX error ignored */ _tv_xv_set_port_attribute (info, p_info->xa_encoding, num, /* sync */ TRUE); } p_info->cur_encoding = num; for_all (ts, info->panel.video_standards) if (CS(ts)->num == p_info->cur_encoding) break; set_source (info, tl, ts); /* Xv does not promise per-tuner frequency setting as we do. XXX ignores the possibility that a third party changed the frequency from the value we know. */ if (IS_TUNER_LINE (tl)) set_tuner_frequency (info, info->panel.cur_video_input, info->panel.cur_video_input ->u.tuner.frequency); return TRUE; } static tv_bool get_video_input_list (tveng_device_info * info) { struct private_tvengxv_device_info *p_info = P_INFO (info); unsigned int i; free_video_inputs (info); if (p_info->xa_encoding == None) return TRUE; for (i = 0; i < p_info->n_encodings; ++i) { struct video_input *vi; char buf[100]; const char *input; tv_video_line_type type; int freq; if (info->debug_level > 0) fprintf (stderr, " TVeng Xv input #%d: %s\n", i, p_info->ei[i].name); if (!(input = split_encoding (NULL, 0, p_info->ei[i].name))) continue; if (find_video_input (info->panel.video_inputs, input)) continue; /* FIXME */ if (p_info->xa_freq != None) type = TV_VIDEO_LINE_TYPE_TUNER; else type = TV_VIDEO_LINE_TYPE_BASEBAND; z_strlcpy (buf, input, sizeof (buf)); buf[0] = toupper (buf[0]); if (!(vi = VI(append_video_line (&info->panel.video_inputs, type, buf, input, sizeof (*vi))))) goto failure; vi->pub._parent = info; z_strlcpy (vi->name, input, sizeof (vi->name)); vi->num = i; if (TV_VIDEO_LINE_TYPE_TUNER == vi->pub.type) { /* FIXME */ #if 0 /* Xv/v4l reports bogus maximum */ vi->pub.u.tuner.minimum = p_info->freq_min * 1000; vi->pub.u.tuner.maximum = p_info->freq_max * 1000; #else vi->pub.u.tuner.minimum = 0; vi->pub.u.tuner.maximum = INT_MAX - (INT_MAX % 62500); /* NB freq attr is int */ #endif vi->pub.u.tuner.step = 62500; /* FIXME gets frequency of current input. */ /* XXX error ignored. */ _tv_xv_get_port_attribute (info, p_info->xa_freq, &freq); store_frequency (info, vi, freq); } } if (!get_video_input (info)) goto failure; return TRUE; failure: free_video_line_list (&info->panel.video_inputs); return FALSE; } #if 0 /* The XVideo extension provides very little info about encodings, we must just make something up */ if (p_info->freq != None) { /* this encoding may refer to a baseband input though */ info->inputs[info->num_inputs].tuners = 1; info->inputs[info->num_inputs].flags |= TVENG_INPUT_TUNER; info->inputs[info->num_inputs].type = TVENG_INPUT_TYPE_TV; } else { info->inputs[info->num_inputs].tuners = 0; info->inputs[info->num_inputs].type = TVENG_INPUT_TYPE_CAMERA; } if (p_info->volume != None || p_info->mute != None) info->inputs[info->num_inputs].flags |= TVENG_INPUT_AUDIO; snprintf(info->inputs[info->num_inputs].name, 32, input); info->inputs[info->num_inputs].name[31] = 0; info->inputs[info->num_inputs].hash = tveng_build_hash(info->inputs[info->num_inputs].name); #endif /* Associates the given tveng_device_info with the given video device. On error it returns -1 and sets info->tveng_errno, info->error to the correct values. device_file: The file used to access the video device (usually /dev/video) attach_mode: Specifies the mode to open the device file depth: The color depth the capture will be in, -1 means let tveng decide based on the current display depth. info: The structure to be associated with the device */ static int tvengxv_attach_device(const char* device_file _unused_, Window window, enum tveng_attach_mode attach_mode, tveng_device_info * info) { struct private_tvengxv_device_info * p_info = (struct private_tvengxv_device_info *)info; Display *dpy; XvAttribute *at; int num_attributes; XvPortID port_id; int i; unsigned int j; assert (NULL != info); memset ((char *) p_info + sizeof (p_info->info), 0, sizeof (*p_info) - sizeof (*info)); if (info->disable_xv_video || disable_overlay) { info->tveng_errno = -1; tv_error_msg(info, "XVideo support has been disabled"); return -1; } dpy = info->display; if (-1 != info -> fd) /* If the device is already attached, detach it */ tveng_close_device(info); /* clear the atoms */ p_info->xa_encoding = None; p_info->xa_freq = None; p_info->xa_mute = None; p_info->xa_volume = None; p_info->xa_colorkey = None; p_info->xa_signal_strength = None; p_info->ei = NULL; p_info->cur_encoding = 0; p_info->active = FALSE; p_info->window = 0; p_info->gc = 0; p_info->last_win = 0; p_info->last_gc = 0; p_info->last_w = 0; p_info->last_h = 0; /* In this module, the given device file doesn't matter */ info -> file_name = strdup("XVideo"); if (!(info -> file_name)) { perror("strdup"); info->tveng_errno = errno; snprintf(info->error, 256, "Cannot duplicate device name"); goto error1; } switch (attach_mode) { /* In V4L there is no control-only mode */ case TVENG_ATTACH_XV: info -> fd = p_tvengxv_open_device(info,window); break; default: tv_error_msg(info, "This module only supports TVENG_ATTACH_XV"); goto error1; }; if (-1 == info -> fd) goto error1; info -> attach_mode = attach_mode; /* Current capture mode is no capture at all */ info -> capture_mode = CAPTURE_MODE_NONE; info->caps.flags = (TVENG_CAPS_OVERLAY | TVENG_CAPS_CLIPPING | TVENG_CAPS_XVIDEO); info->caps.audios = 0; /* Atoms & controls */ info->panel.controls = NULL; at = XvQueryPortAttributes (dpy, p_info->info.overlay.xv_port_id, &num_attributes); for (i = 0; i < num_attributes; i++) { if (info->debug_level > 0) fprintf(stderr, " TVeng Xv atom: %s %c/%c (%i -> %i)\n", at[i].name, (at[i].flags & XvGettable) ? 'r' : '-', (at[i].flags & XvSettable) ? 'w' : '-', at[i].min_value, at[i].max_value); if (!strcmp("XV_ENCODING", at[i].name)) { if (!(at[i].flags & XvSettable)) continue; p_info->xa_encoding = XInternAtom (dpy, "XV_ENCODING", False); p_info->encoding_max = at[i].max_value; p_info->encoding_min = at[i].min_value; p_info->encoding_gettable = at[i].flags & XvGettable; continue; } else if (!strcmp("XV_SIGNAL_STRENGTH", at[i].name)) { if (!(at[i].flags & XvGettable)) continue; p_info->xa_signal_strength = XInternAtom (dpy, "XV_SIGNAL_STRENGTH", False); continue; } if ((at[i].flags & (XvGettable | XvSettable)) != (XvGettable | XvSettable)) continue; if (!strcmp("XV_FREQ", at[i].name)) { info->caps.flags |= TVENG_CAPS_TUNER; p_info->xa_freq = XInternAtom (dpy, "XV_FREQ", False); p_info->freq_max = at[i].max_value; p_info->freq_min = at[i].min_value; continue; } else if (!strcmp("XV_COLORKEY", at[i].name)) { info->caps.flags |= TVENG_CAPS_CHROMAKEY; p_info->xa_colorkey = XInternAtom (dpy, "XV_COLORKEY", False); p_info->colorkey_max = at[i].max_value; p_info->colorkey_min = at[i].min_value; continue; } if (0 == strcmp ("XV_MUTE", at[i].name)) { p_info->xa_mute = XInternAtom (dpy, "XV_MUTE", False); } else if (0 == strcmp ("XV_VOLUME", at[i].name)) { p_info->xa_volume = XInternAtom (dpy, "XV_VOLUME", False); } for (j = 0; j < N_ELEMENTS (xv_attr_meta); j++) { if (0 == strcmp (xv_attr_meta[j].atom, at[i].name)) { int step; /* Not reported, let's make something up. */ step = (at[i].max_value - at[i].min_value) / 100; /* Error ignored */ add_control (p_info, xv_attr_meta[j].atom, xv_attr_meta[j].label, xv_attr_meta[j].id, xv_attr_meta[j].type, at[i].min_value, at[i].max_value, step); } } } /* Glint bug - XV_ENCODING not listed */ if (p_info->n_encodings > 0 && None == p_info->xa_encoding) { if (info->debug_level > 0) fprintf(stderr, " TVeng Xv atom: XV_ENCODING (hidden) (%i -> %i)\n", 0, p_info->n_encodings - 1); p_info->xa_encoding = XInternAtom (dpy, "XV_ENCODING", False); p_info->encoding_max = p_info->n_encodings - 1; p_info->encoding_min = 0; p_info->encoding_gettable = TRUE; } info->panel.set_video_input = set_video_input; info->panel.get_video_input = get_video_input; info->panel.get_tuner_frequency = get_tuner_frequency; info->panel.set_tuner_frequency = set_tuner_frequency; info->panel.get_signal_strength = get_signal_strength; /* Video input and standard combine as "encoding", get_video_input also determines the current standard, hence no get_video_standard. */ info->panel.set_video_standard = set_video_standard; info->panel.set_control = set_control; info->panel.get_control = get_control; /* Set the mute control to OFF (workaround for BTTV bug) */ /* tveng_set_control(&control, 0, info); */ /* fill in with the proper values */ get_control (info, NULL /* all */); /* We have a valid device, get some info about it */ info->current_controller = TVENG_CONTROLLER_XV; /* Video inputs & standards */ info->panel.video_inputs = NULL; info->panel.cur_video_input = NULL; info->panel.video_standards = NULL; info->panel.cur_video_standard = NULL; if (!get_video_input_list (info)) goto error1; /* XXX*/ port_id = info->overlay.xv_port_id; CLEAR (info->overlay); info->overlay.xv_port_id = port_id; info->overlay.set_xwindow = set_overlay_xwindow; info->overlay.get_window = get_overlay_window; info->overlay.enable = enable_overlay; CLEAR (info->capture); /* fill in capabilities info */ info->caps.channels = 0; /* FIXME info->num_inputs;*/ /* Let's go creative! */ snprintf(info->caps.name, 32, "XVideo device"); #if 0 info->caps.minwidth = 1; info->caps.minheight = 1; info->caps.maxwidth = 32768; info->caps.maxheight = 32768; #else /* XXX conservative limits. */ info->caps.minwidth = 16; info->caps.minheight = 16; info->caps.maxwidth = 768; info->caps.maxheight = 576; #endif return info->fd; error1: if (info->file_name) free(info->file_name); info->file_name = NULL; return -1; } /* Closes a device opened with tveng_init_device */ static void tvengxv_close_device(tveng_device_info * info) { struct private_tvengxv_device_info *p_info= (struct private_tvengxv_device_info*) info; gboolean dummy; assert (NULL != info); p_tveng_stop_everything(info, &dummy); if (p_info->ei) XvFreeEncodingInfo(p_info->ei); p_info->ei = NULL; info -> fd = -1; info -> current_controller = TVENG_CONTROLLER_NONE; if (info -> file_name) free(info -> file_name); free_video_standards (info); free_video_inputs (info); free_panel_controls (info); /* clear the atoms */ info -> file_name = NULL; } static void destroy_devnode (tv_device_node * n, tv_bool restore) { restore = restore; if (NULL == n) return; free (n->device); free (n->version); free (n->driver); free (n->bus); free (n->label); CLEAR (*n); free (n); } static tv_bool append_devnodes (tv_device_node ** list, const XvAdaptorInfo * adaptor, const char * display_name, const char * version_str) { unsigned int i; for (i = 0; i < adaptor->num_ports; ++i) { tv_device_node *n; n = calloc (1, sizeof (*n)); if (NULL == n) { return FALSE; } if (1 == adaptor->num_ports) { n->label = strdup (adaptor->name); } else { _tv_asprintf (&n->label, "%s port %u", adaptor->name, i); } n->bus = strdup (display_name); n->driver = strdup ("XVideo"); n->version = strdup (version_str); /* XvPortID */ _tv_asprintf (&n->device, "%lu", adaptor->base_id + i); if (NULL == n->label || NULL == n->bus || NULL == n->driver || NULL == n->version || NULL == n->device) { destroy_devnode (n, /* restore */ TRUE); return FALSE; } n->destroy = destroy_devnode; tv_device_node_add (list, n); } return TRUE; } tv_device_node * tvengxv_port_scan (Display * display, FILE * log) { char version_str[32]; XErrorHandler old_error_handler; tv_device_node *list; XvAdaptorInfo *adaptors; unsigned int n_adaptors; const char *display_name; unsigned int version; unsigned int revision; unsigned int major_opcode; unsigned int event_base; unsigned int error_base; Window root_window; unsigned int i; int status; assert (NULL != display); list = NULL; adaptors = NULL; old_error_handler = XSetErrorHandler (x11_error_handler); display_name = XDisplayString (display); if (NULL != log) { fprintf (log, "XVideo video port scan on display %s\n", display_name); } if (Success != XvQueryExtension (display, &version, &revision, &major_opcode, &event_base, &error_base)) { if (NULL != log) { fprintf (log, "XVideo extension not available\n"); } goto done; } if (NULL != log) { fprintf (log, "XVideo opcode=%u event_base=%u " "error_base=%u version=%u.%u\n", major_opcode, event_base, error_base, version, revision); } if (version < 2 || (version == 2 && revision < 2)) { if (NULL != log) { fprintf (log, "XVideo extension not usable\n"); } goto done; } snprintf (version_str, sizeof (version_str), "%u.%u", version, revision); root_window = DefaultRootWindow (display); x11_error_code = Success; status = XvQueryAdaptors (display, root_window, &n_adaptors, &adaptors); if (Success != status) { if (log) { fprintf (log, "XvQueryAdaptors failed, " "status=%d error=%lu\n", status, x11_error_code); } goto done; } for (i = 0; i < n_adaptors; ++i) { unsigned int type; type = adaptor_type (&adaptors[i]); if ((XvInputMask | XvVideoMask) != (type & (XvInputMask | XvVideoMask))) continue; if (!append_devnodes (&list, &adaptors[i], display_name, version_str)) { goto done; } } done: if (NULL != adaptors) { XvFreeAdaptorInfo (adaptors); adaptors = NULL; n_adaptors = 0; } XSetErrorHandler (old_error_handler); return list; } static struct tveng_module_info tvengxv_module_info = { .attach_device = tvengxv_attach_device, .close_device = tvengxv_close_device, .interface_label = "XVideo extension", .private_size = sizeof(struct private_tvengxv_device_info) }; /* Inits the XV module, and fills in the given table. */ void tvengxv_init_module(struct tveng_module_info *module_info) { assert (NULL != module_info); memcpy(module_info, &tvengxv_module_info, sizeof(struct tveng_module_info)); } #else /* do not use the XVideo extension */ #include "tvengxv.h" void tvengxv_init_module(struct tveng_module_info *module_info) { assert (NULL != module_info); CLEAR (*module_info); } #endif ��������������������������zapping-0.10cvs6/src/tvengxv.h���������������������������������������������������������������������� 644 � 764 � 144 � 5420 10406535242 11450� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Zapping (TV viewer for the Gnome Desktop) * Copyright (C) 2000 Iaki Garca Etxebarria * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifndef __TVENGXV_H__ #define __TVENGXV_H__ #include "tveng_private.h" #define NO_PORT ((XvPortID) None) #define ANY_PORT ((XvPortID) None) extern tv_bool _tv_xv_stop_video (tveng_device_info * info, Window window); extern tv_bool _tv_xv_put_video (tveng_device_info * info, Window window, GC gc, int src_x, int src_y, unsigned int src_width, unsigned int src_height); extern tv_bool _tv_xv_get_port_attribute (tveng_device_info * info, Atom atom, int * value); extern tv_bool _tv_xv_set_port_attribute (tveng_device_info * info, Atom atom, int value, tv_bool sync); extern tv_bool _tv_xv_ungrab_port (tveng_device_info * info); extern tv_bool _tv_xv_grab_port (tveng_device_info * info); extern tv_device_node * tvengxv_port_scan (Display * display, FILE * log); /* Inits the XVideo module, and fills in the given table. */ void tvengxv_init_module(struct tveng_module_info *module_info); /* Prototypes for forward declaration, used only in tvengxv.c */ #ifdef TVENGXV_PROTOTYPES /* Associates the given tveng_device_info with the given video device. On error it returns -1 and sets info->errno, info->error to the correct values. device_file: The file used to access the video device (usually /dev/video) attach_mode: Specifies the mode to open the device file depth: The color depth the capture will be in, -1 means let tveng decide based on the current display depth. info: The structure to be associated with the device */ static int tvengxv_attach_device(const char* device_file, Window window, enum tveng_attach_mode attach_mode, tveng_device_info * info); /* Closes the video device asocciated to the device info object. Should be called before reattaching a video device to the same object, but there is no need to call this before calling tveng_device_info_destroy. */ static void tvengxv_close_device(tveng_device_info* info); #endif /* TVENGXV_PROTOTYPES */ #endif /* TVENGXV.H */ ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������zapping-0.10cvs6/src/remote.c����������������������������������������������������������������������� 644 � 764 � 144 � 20254 10222615625 11257� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Zapping (TV viewer for the Gnome Desktop) * Copyright (C) 2002 Iñaki García Etxebarria * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include "site_def.h" #ifdef HAVE_CONFIG_H # include "config.h" #endif #include <assert.h> #include <glib.h> /* g_strdup_vprintf() */ #include <stdarg.h> #include "remote.h" #include "zmisc.h" #ifndef REMOTE_COMMAND_LOG #define REMOTE_COMMAND_LOG 0 #endif PyObject * dict; static GList * c_list; /* Hm. Let's see what develops in Gtk+. typedef struct _action { struct _action * next; gchar * descr; gchar * cmd; } action; static action * action_list; */ static GtkWidget * c_widget; int ParseTuple (PyObject * args, const char * format, ...) { int retval; va_list va; va_start (va, format); retval = PyArg_VaParse (args, /* const cast */ format, va); va_end (va); return retval; } /* Callback glue for Gtk signals. */ void on_python_command1 (GtkWidget * widget, const gchar * cmd) { char *buf; unsigned int len; if (REMOTE_COMMAND_LOG) fprintf (stderr, "python command: '%s'\n", cmd); c_widget = widget; len = strlen (cmd); buf = malloc (len + 2); assert (buf != NULL); memcpy (buf, cmd, len); buf[len + 0] = '\n'; buf[len + 1] = 0; PyRun_SimpleString (buf); free (buf); } void on_python_command2 (GtkWidget * widget, gpointer unused _unused_, const gchar * cmd) { on_python_command1 (widget, cmd); } void on_python_command3 (GtkWidget * widget, gpointer unused1 _unused_, gpointer unused2 _unused_, const gchar * cmd) { on_python_command1 (widget, cmd); } void python_command_printf (GtkWidget * widget, const gchar * fmt, ...) { va_list ap; char *buf; va_start (ap, fmt); buf = g_strdup_vprintf (fmt, ap); va_end (ap); if (!buf) { perror ("g_strdup_vprintf"); return; } python_command (widget, buf); g_free (buf); } GList * cmd_list (void) { return g_list_copy (c_list); } #if 0 const gchar * cmd_action_from_cmd (const gchar * cmd) { action *a; for (a = action_list; a; a = a->next) if (0 == strcmp (a->cmd, cmd)) return a->descr; return NULL; } GtkMenu * cmd_action_menu (void) { GtkMenu *menu; GtkWidget *menu_item; action *a; menu = GTK_MENU (gtk_menu_new ()); for (a = action_list; a; a = a->next) { menu_item = gtk_menu_item_new_with_label (a->descr); gtk_widget_show (menu_item); gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_item); } return menu; } #endif /* Widget sending the last command, or NULL. */ GtkWidget * python_command_widget (void) { return c_widget; } #define OPTIONAL (1 << 0) #define INTEGER (1 << 1) #define STRING (1 << 2) #define TOGGLE (1 << 3) /* 0 = off, 1 = on, <nothing> = toggle */ struct cmd_txl { const gchar * name; guint num_args; guint flags; }; static const struct cmd_txl cmd_txl_table [] = { { "mute", 1, OPTIONAL | TOGGLE }, { "volume_incr", 1, OPTIONAL | INTEGER }, /* incr (+1) */ { "ttx_open_new", 2, OPTIONAL | INTEGER }, /* page (100), sub (any) */ { "ttx_history_next", 0, 0 }, { "ttx_history_prev", 0, 0 }, { "ttx_page_incr", 1, OPTIONAL | INTEGER }, /* incr (+1) */ { "ttx_subpage_incr", 1, OPTIONAL | INTEGER }, /* incr (+1) */ { "ttx_reveal", 1, OPTIONAL | TOGGLE }, { "ttx_home", 0, 0 }, { "ttx_hold", 1, OPTIONAL | TOGGLE }, { "stoprec", 0, 0 }, /* { "pauserec", 0, 0 }, */ /* never implemented */ { "quickrec", 1, OPTIONAL | STRING }, /* (last) */ { "record", 1, OPTIONAL | STRING }, /* (last) */ { "quickshot", 1, OPTIONAL | STRING }, /* (last) */ { "screenshot", 1, OPTIONAL | STRING }, /* (last) */ { "lookup_channel", 1, STRING }, { "set_channel", 1, STRING }, { "channel_down", 0, 0 }, { "channel_up", 0, 0 }, { "quit", 0, 0 }, { "subtitle_overlay", 1, OPTIONAL | TOGGLE }, { "restore_mode", 1, OPTIONAL | STRING }, /* (toggle) */ { "toggle_mode", 1, OPTIONAL | STRING }, /* (toggle) */ { "switch_mode", 1, STRING }, }; /* Translate pre-0.7 command to new Python command. You must g_free() the returned string. */ gchar * cmd_compatibility (const gchar * cmd) { gchar *s = /* const_cast */ cmd; gchar *d = NULL, *d1; guint i, j, args = 0; if (!s || *s == 0) return g_strdup (""); while (g_unichar_isspace (g_utf8_get_char_validated (s, -1))) s = g_utf8_next_char (s); if (0 == strncmp (s, "zapping.", 8)) return g_strdup (cmd); for (i = 0; i < G_N_ELEMENTS (cmd_txl_table); i++) { guint n = strlen (cmd_txl_table[i].name); if (0 == strncmp (s, cmd_txl_table[i].name, n)) { s += n; break; } } if (i >= G_N_ELEMENTS (cmd_txl_table)) { if (0 == strncmp (s, "zapping.volume_incr", 19)) goto volume_incr; else goto bad_cmd; } if (0 == strcmp (cmd_txl_table[i].name, "volume_incr")) { volume_incr: d = g_strdup ("zapping.control_incr('volume'"); args = 1; } else { d = g_strconcat ("zapping.", cmd_txl_table[i].name, "(", NULL); } if (*s) { if (!g_unichar_isspace (g_utf8_get_char_validated (s, -1))) goto bad_cmd; s = g_utf8_next_char (s); } for (j = 0; j < cmd_txl_table[i].num_args; j++) { const gchar *s1 = s; gchar *arg; if (*s == 0) { if (cmd_txl_table[i].flags & OPTIONAL) break; else goto bad_cmd; } while (*s != 0 && !g_unichar_isspace (g_utf8_get_char_validated (s, -1))) s = g_utf8_next_char (s); arg = g_strndup (s1, (guint)(s - s1)); if (cmd_txl_table[i].flags & STRING) d1 = g_strconcat (d, (args > 0) ? ", " : "", "'", arg, "'", NULL); else d1 = g_strconcat (d, (args > 0) ? ", " : "", arg, NULL); args++; g_free (d); d = d1; g_free (arg); while (*s && g_unichar_isspace (g_utf8_get_char_validated (s, -1))) s = g_utf8_next_char (s); } if (*s) goto bad_cmd; d1 = g_strconcat (d, ")", NULL); g_free (d); return d1; bad_cmd: g_free (d); return g_strconcat ("/* ", cmd, " */", NULL); } /* We leak happily here. Not a bug really because Python requires the passed method def to be around all of its lifetime, and we will be registering every command just once during the program's lifetime. */ void _cmd_register (const gchar * name, PyCFunction cfunc, int flags, ...) { PyMethodDef *def; PyObject *func; va_list ap; gchar *descr; gchar *cmd; def = (PyMethodDef *) malloc (sizeof (*def)); assert (def != NULL); def->ml_name = strdup(name); def->ml_meth = cfunc; def->ml_flags = flags; /* def->ml_doc = strdup(doc); */ func = PyCFunction_New (def, NULL); PyDict_SetItemString (dict, /* const cast */ name, func); Py_DECREF (func); va_start (ap, flags); while ((descr = va_arg (ap, gchar *)) && (cmd = va_arg (ap, gchar *))) { #if 1 c_list = g_list_append (c_list, g_strdup (cmd)); #else action *a; if (!(a = g_malloc (sizeof (*a)))) break; a->next = action_list; action_list = a; a->descr = descr; a->cmd = cmd; #endif } va_end (ap); } void shutdown_remote (void) { /* Unload the Python interpreter */ Py_Finalize (); } void startup_remote (void) { PyMethodDef empty [] = { { 0, 0, 0, 0 } }; PyObject *module; /* Initialize the Python interpreter. */ Py_SetProgramName (PACKAGE); Py_Initialize (); /* Create the zapping class. */ module = Py_InitModule ("zapping", empty); dict = PyModule_GetDict (module); /* Load the zapping module. */ PyRun_SimpleString ("import zapping\n"); } ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������zapping-0.10cvs6/src/remote.h����������������������������������������������������������������������� 644 � 764 � 144 � 3665 10120231161 11235� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#ifndef __REMOTE_H__ #define __REMOTE_H__ /** * This provides a Python interface to the internal Zapping routines. */ #ifdef _POSIX_C_SOURCE /* python 2.3 redefines. ugh. */ # undef _POSIX_C_SOURCE # include <Python.h> # ifndef _POSIX_C_SOURCE # define _POSIX_C_SOURCE 199506L # endif #else # include <Python.h> #endif #include <gtk/gtk.h> extern int ParseTuple (PyObject * args, const char * format, ...); /* The zapping dictionary in case you want to add things manually. To register functions use cmd_register() instead. */ extern PyObject * dict; extern void on_python_command1 (GtkWidget * widget, const gchar * cmd); extern void on_python_command2 (GtkWidget * widget, gpointer unused, const gchar * cmd); extern void on_python_command3 (GtkWidget * widget, gpointer unused1, gpointer unused2, const gchar * cmd); #define python_command(widget, cmd) on_python_command1 (widget, cmd) extern void python_command_printf (GtkWidget * widget, const gchar * fmt, ...); extern GtkWidget * python_command_widget (void); extern GList * cmd_list (void); extern const gchar * cmd_action_from_cmd (const gchar * cmd); extern const gchar * cmd_action_to_cmd (const gchar * action); extern GtkMenu * cmd_action_menu (void); extern gchar * cmd_compatibility (const gchar * cmd); extern void _cmd_register (const gchar * name, PyCFunction cfunc, int flags, ...); #define cmd_register(name, cfunc, flags, args...) \ _cmd_register (name, cfunc, flags ,##args , 0) extern void shutdown_remote (void); extern void startup_remote (void); /* The following macros simplify writing the python wrappers. */ #define py_return_none \ do { \ Py_INCREF(Py_None); \ return Py_None; \ } while (0) #define py_return_true return PyInt_FromLong (TRUE) #define py_return_false return PyInt_FromLong (FALSE) #endif /* __REMOTE_H__ */ ���������������������������������������������������������������������������zapping-0.10cvs6/src/video_gdkrgb.c����������������������������������������������������������������� 644 � 764 � 144 � 12005 10177353625 12415� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Zapping (TV viewer for the Gnome Desktop) * Copyright (C) 2002 Iaki Garca Etxebarria * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /** * GdkRGB backend. GdkRGB is a nice set of routines inside Gdk that * provide very fast blitters for rgb data. It's wrapped by GdkPixbuf, * which makes it behave similar to a GdkImage, but we will use it * directly in here. */ #ifdef HAVE_CONFIG_H # include "config.h" #endif #include <gdk/gdkx.h> #include <gtk/gtk.h> #include <stdlib.h> #include "../common/math.h" #define ZCONF_DOMAIN "/zapping/options/main/" #include "zconf.h" #include "globals.h" #include "zimage.h" #include "zmisc.h" #include "capture.h" #include "x11stuff.h" static GdkWindow *window = NULL; static GdkGC *gc = NULL, *black_gc = NULL; struct _zimage_private { guchar *data; }; static zimage* image_new (tv_pixfmt pixfmt, guint w, guint h) { zimage *image = zimage_create_object (); zimage_private *pimage = image->priv = g_malloc0 (sizeof (zimage_private)); const tv_pixel_format *pf; pf = tv_pixel_format_from_pixfmt (pixfmt); assert (NULL != pf); image->fmt.width = w; image->fmt.height = h; image->fmt.pixel_format = tv_pixel_format_from_pixfmt (pixfmt); image->fmt.offset[0] = 0; image->fmt.bytes_per_line[0] = (w * pf->bits_per_pixel) >> 3; image->fmt.size = image->fmt.bytes_per_line[0] * h; pimage->data = g_malloc (image->fmt.size); image->img = pimage->data; return image; } /* Clear canvas minus the image */ static void clear_canvas (GdkWindow *canvas, guint w, guint h, gint iw, int ih) { gint y = (h - ih) >> 1; gint h2 = (h + ih) >> 1; gint x = (w - iw) >> 1; gint w2 = (w + iw) >> 1; if (y > 0) gdk_draw_rectangle (canvas, black_gc, TRUE, 0, 0, (gint) w, y); if (h2 > 0) gdk_draw_rectangle (canvas, black_gc, TRUE, 0, y + ih, (gint) w, h2); if (x > 0) gdk_draw_rectangle (canvas, black_gc, TRUE, 0, y, x, ih); if (w2 > 0) gdk_draw_rectangle (canvas, black_gc, TRUE, x + iw, y, w2, ih); } static void image_put (zimage *image, guint w, guint h) { zimage_private *pimage = image->priv; gint iw = image->fmt.width, ih = image->fmt.height; g_assert (window != NULL); clear_canvas (window, w, h, iw, ih); switch (image->fmt.pixel_format->pixfmt) { case TV_PIXFMT_RGB24_LE: gdk_draw_rgb_image (window, gc, (gint) (w - iw)/2, (gint) (h - ih)/2, iw, ih, GDK_RGB_DITHER_NORMAL, pimage->data, (gint) image->fmt.bytes_per_line[0]); gdk_display_flush (gdk_display_get_default ()); break; case TV_PIXFMT_RGBA32_LE: gdk_draw_rgb_32_image (window, gc, (gint) (w - iw)/2, (gint) (h - ih)/2, iw, ih, GDK_RGB_DITHER_NORMAL, pimage->data, (gint) image->fmt.bytes_per_line[0]); gdk_display_flush (gdk_display_get_default ()); break; default: g_assert_not_reached (); break; } } static void image_destroy (zimage *image) { zimage_private *pimage = image->priv; g_free (pimage->data); g_free (pimage); } static void set_destination (GdkWindow *_w, GdkGC *_gc, tveng_device_info *info _unused_) { GdkColor black = {0, 0, 0, 0}; /* set_ and _unset will be called multiple times */ if ((window == _w) && (gc == _gc)) return; window = _w; gc = _gc; if (black_gc) g_object_unref (G_OBJECT (black_gc)); black_gc = gdk_gc_new (window); gdk_gc_copy (black_gc, gc); gdk_gc_set_fill (black_gc, GDK_SOLID); gdk_gc_set_rgb_fg_color (gc, &black); gdk_gc_set_rgb_bg_color (gc, &black); } static void unset_destination(tveng_device_info *info _unused_) { /* see comment in set_destination */ if ((!window) && (!gc)) return; window = NULL; gc = NULL; g_object_unref (G_OBJECT (black_gc)); black_gc = NULL; } static tv_pixfmt pixfmts[] = { TV_PIXFMT_RGB24_LE, TV_PIXFMT_RGBA32_LE }; static tv_pixfmt_set supported_formats (void) { return (TV_PIXFMT_SET (TV_PIXFMT_RGB24_LE) | TV_PIXFMT_SET (TV_PIXFMT_RGBA32_LE)); } static video_backend gdkrgb = { .name = "GdkRGB", .set_destination = set_destination, .unset_destination = unset_destination, .image_new = image_new, .image_destroy = image_destroy, .image_put = image_put, .supported_formats = supported_formats, }; void add_backend_gdkrgb (void); void add_backend_gdkrgb (void) { unsigned int i; for (i=0; i<G_N_ELEMENTS (pixfmts); i++) register_video_backend (pixfmts[i], &gdkrgb); } ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������zapping-0.10cvs6/src/cmd.c�������������������������������������������������������������������������� 644 � 764 � 144 � 22260 10324040423 10515� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Zapping (TV viewer for the Gnome Desktop) * Copyright (C) 2002 Iaki Garca Etxebarria * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* $Id: cmd.c,v 1.18 2005/10/14 23:36:51 mschimek Exp $ */ /** * Provides the functionality in the Python interface of Zapping. */ #ifdef HAVE_CONFIG_H # include "config.h" #endif #include <gnome.h> #include "cmd.h" #include "interface.h" #include "plugins.h" #include "zmisc.h" #include "zconf.h" #include "globals.h" #include "audio.h" #include "remote.h" static PyObject* py_quit (PyObject *self _unused_, PyObject *args _unused_) { GList *p; int x, y, w, h; gboolean quit_muted; gint mode; if (!zapping) py_return_false; quit_muted = TRUE; /* Error ignored */ zconf_get_boolean (&quit_muted, "/zapping/options/main/quit_muted"); if (quit_muted) { /* Error ignored */ tv_quiet_set (zapping->info, TRUE); } /* Save the currently tuned channel */ zconf_set_int (cur_tuned_channel, "/zapping/options/main/cur_tuned_channel"); flag_exit_program = TRUE; gdk_window_get_origin(GTK_WIDGET (zapping)->window, &x, &y); gdk_window_get_geometry(GTK_WIDGET (zapping)->window, NULL, NULL, &w, &h, NULL); zconf_set_int (x, "/zapping/internal/callbacks/x"); zconf_set_int (y, "/zapping/internal/callbacks/y"); zconf_set_int (w, "/zapping/internal/callbacks/w"); zconf_set_int (h, "/zapping/internal/callbacks/h"); mode = to_old_tveng_capture_mode (zapping->display_mode, tv_get_capture_mode (zapping->info)); zconf_set_int (mode, "/zapping/options/main/capture_mode"); zmisc_switch_mode (DISPLAY_MODE_WINDOW, CAPTURE_MODE_NONE, zapping->info, /* warnings */ TRUE); /* Tell the widget that the GUI is going to be closed */ p = g_list_first(plugin_list); while (p) { plugin_remove_gui (&zapping->app, (struct plugin_info *) p->data); p = p->next; } gtk_object_destroy (GTK_OBJECT (zapping)); gtk_main_quit (); py_return_true; } static gboolean switch_mode (display_mode dmode, capture_mode cmode) { if (0) fprintf (stderr, "switch_mode: %d %d\n", dmode, cmode); if (-1 == zmisc_switch_mode (dmode, cmode, zapping->info, /* warnings */ TRUE)) { if (0) /* already done by zmisc_switch_mode() ? */ ShowBox ("%s", GTK_MESSAGE_ERROR, tv_get_errstr(zapping->info)); return FALSE; } return TRUE; } static gboolean parse_modes (display_mode * dmode, capture_mode * cmode, const gchar * s) { *dmode = (display_mode) -1; *cmode = (capture_mode) -1; while (*s) { while (*s && !g_ascii_isalnum (*s)) ++s; if (0 == *s) { break; } /* Historic. */ else if (0 == g_ascii_strncasecmp (s, "preview", 7)) { *cmode = CAPTURE_MODE_OVERLAY; s += 7; } else if (0 == g_ascii_strncasecmp (s, "overlay", 7)) { *cmode = CAPTURE_MODE_OVERLAY; s += 7; } else if (0 == g_ascii_strncasecmp (s, "window", 6)) { *dmode = DISPLAY_MODE_WINDOW; s += 6; } else if (0 == g_ascii_strncasecmp (s, "fullscreen", 10)) { *dmode = DISPLAY_MODE_FULLSCREEN; s += 10; } else if (0 == g_ascii_strncasecmp (s, "background", 10)) { *dmode = DISPLAY_MODE_BACKGROUND; s += 10; } else if (0 == g_ascii_strncasecmp (s, "capture", 7)) { *cmode = CAPTURE_MODE_READ; s += 7; } else if (0 == g_ascii_strncasecmp (s, "teletext", 8)) { *cmode = CAPTURE_MODE_TELETEXT; s += 8; } else { goto failure; } if (g_ascii_isalnum (*s)) goto failure; } return TRUE; failure: *dmode = (display_mode) -1; *cmode = (capture_mode) -1; return FALSE; } static PyObject * py_switch_mode (PyObject * self _unused_, PyObject * args) { display_mode cur_dmode; capture_mode cur_cmode; display_mode new_dmode; capture_mode new_cmode; char *mode_str; if (!zapping) py_return_false; if (!ParseTuple (args, "s", &mode_str)) g_error ("zapping.switch_mode(s)"); cur_dmode = zapping->display_mode; cur_cmode = tv_get_capture_mode (zapping->info); if (!parse_modes (&new_dmode, &new_cmode, mode_str)) { /* XXX */ ShowBox ("Unknown display mode \"%s\", possible choices are:\n" "window, fullscreen, background, capture, overlay, " "preview, teletext and combinations separate by spaces.", GTK_MESSAGE_ERROR, mode_str); } if ((display_mode) -1 == new_dmode) new_dmode = cur_dmode; if ((capture_mode) -1 == new_cmode) new_cmode = cur_cmode; if (0) fprintf (stderr, "switch: cur=%d,%d new=%d,%d last=%d,%d\n", cur_dmode, cur_cmode, new_dmode, new_cmode, last_dmode, last_cmode); if (!switch_mode (new_dmode, new_cmode)) py_return_false; py_return_none; } static PyObject * py_toggle_mode (PyObject * self _unused_, PyObject * args) { capture_mode cur_cmode; display_mode cur_dmode; capture_mode new_cmode; display_mode new_dmode; char *mode_str; if (!zapping) py_return_false; mode_str = NULL; if (!ParseTuple (args, "|s", &mode_str)) g_error ("zapping.toggle_mode(|s)"); cur_dmode = zapping->display_mode; cur_cmode = tv_get_capture_mode (zapping->info); if (mode_str) { if (!parse_modes (&new_dmode, &new_cmode, mode_str)) { /* XXX */ ShowBox ("Unknown display mode \"%s\", possible choices are:\n" "window, fullscreen, background, capture, overlay, " "preview, teletext and combinations separated by spaces.", GTK_MESSAGE_ERROR, mode_str); py_return_false; } } else { new_dmode = cur_dmode; new_cmode = cur_cmode; } if (0) fprintf (stderr, "toggle: cur=%d,%d new=%d,%d last=%d,%d\n", cur_dmode, cur_cmode, new_dmode, new_cmode, last_dmode, last_cmode); if ((display_mode) -1 != new_dmode) { if (new_dmode == cur_dmode) new_dmode = last_dmode; } else { new_dmode = cur_dmode; } if ((capture_mode) -1 != new_cmode) { if (new_cmode == cur_cmode) new_cmode = last_cmode; } else { new_cmode = cur_cmode; } if (!switch_mode (new_dmode, new_cmode)) py_return_false; py_return_true; } static PyObject * py_about (PyObject * self _unused_, PyObject * args _unused_) { GtkWidget *about; about = build_widget ("about", NULL); g_object_set (G_OBJECT (about), "name", "Zapping", "version", VERSION, NULL); gtk_widget_show (about); Py_INCREF (Py_None); return Py_None; } static PyObject* py_resize_screen (PyObject *self _unused_, PyObject *args) { GdkWindow *subwindow; GdkWindow *mw; gint sw_w, sw_h, mw_w, mw_h; int w, h; int ok; if (!zapping) py_return_false; subwindow = GTK_WIDGET (zapping->video)->window; mw = gdk_window_get_toplevel(subwindow); ok = ParseTuple (args, "ii", &w, &h); if (!ok) g_error ("zapping.resize_screen(ii)"); gdk_window_get_geometry (mw, NULL, NULL, &mw_w, &mw_h, NULL); gdk_window_get_geometry (subwindow, NULL, NULL, &sw_w, &sw_h, NULL); w += (mw_w - sw_w); h += (mw_h - sw_h); gdk_window_resize(mw, w, h); py_return_true; } static PyObject * py_help (PyObject * self _unused_, PyObject * args _unused_) { z_help_display (NULL, "zapping", NULL); py_return_none; } void startup_cmd (void) { cmd_register ("quit", py_quit, METH_VARARGS, ("Quit"), "zapping.quit()"); cmd_register ("switch_mode", py_switch_mode, METH_VARARGS, ("Switch to Fullscreen mode"), "zapping.switch_mode('fullscreen')", ("Switch to Capture mode"), "zapping.switch_mode('capture')", ("Switch to Overlay mode"), "zapping.switch_mode('preview')", ("Switch to Teletext mode"), "zapping.switch_mode('teletext')"); /* FIXME: This isn't the place for this, create a mode.c containing the mode switching logic, it's getting a bit too complex */ cmd_register ("toggle_mode", py_toggle_mode, METH_VARARGS, ("Switch to Fullscreen mode or previous mode"), "zapping.toggle_mode('fullscreen')", ("Switch to Capture mode or previous mode"), "zapping.toggle_mode('capture')", ("Switch to Overlay mode or previous mode"), "zapping.toggle_mode('preview')", ("Switch to Teletext mode or previous mode"), "zapping.toggle_mode('teletext')"); /* Compatibility (FIXME: Does it really make sense to keep this?) */ cmd_register ("restore_mode", py_toggle_mode, METH_VARARGS); cmd_register ("about", py_about, METH_VARARGS, ("About Zapping"), "zapping.about()"); cmd_register ("resize_screen", py_resize_screen, METH_VARARGS); cmd_register ("help", py_help, METH_VARARGS, ("Zapping help"), "zapping.help()"); } void shutdown_cmd (void) { } ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������zapping-0.10cvs6/src/cmd.h�������������������������������������������������������������������������� 644 � 764 � 144 � 154 7762173334 10464� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#ifndef __CMD_H__ #define __CMD_H__ void startup_cmd (void); void shutdown_cmd (void); #endif /* cmd.h */ ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������zapping-0.10cvs6/src/esd.c�������������������������������������������������������������������������� 644 � 764 � 144 � 12075 10402712105 10530� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Zapping (TV viewer for the Gnome Desktop) * Copyright (C) 2000-2001 Iaki Garca Etxebarria * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifdef HAVE_CONFIG_H # include "config.h" #endif #ifdef HAVE_ESD #include <gnome.h> #include <math.h> #include <unistd.h> #include "audio.h" #define ZCONF_DOMAIN "/zapping/options/audio/" #include "zconf.h" #include "interface.h" #include "zmisc.h" #include <esd.h> typedef struct { int socket; int stereo; int sampling_rate; double time; double buffer_period_near; double buffer_period_far; gboolean write; } esd_handle; /** ESD backend ***/ static gpointer _open (gboolean stereo, guint sampling_rate, enum audio_format format, gboolean write) { esd_format_t fmt; esd_handle *h; /* FIXME: Improve error reporting */ if (format != AUDIO_FORMAT_S16_LE) { g_warning("Requested audio format won't work"); return NULL; } h = (esd_handle *) g_malloc0(sizeof(esd_handle)); if (write) { GnomeProgram *program; GValue espeaker; fmt = ESD_STREAM | ESD_PLAY | ESD_BITS16 | (stereo ? ESD_STEREO : ESD_MONO); /* Use --espeaker parameter or NULL for default host ($DISPLAY, localhost). */ program = gnome_program_get (); CLEAR (espeaker); g_value_init (&espeaker, G_TYPE_STRING); g_object_get_property (G_OBJECT (program), GNOME_PARAM_ESPEAKER, &espeaker); h->socket = esd_play_stream_fallback (fmt, (int) sampling_rate, g_value_get_string (&espeaker), /* name */ NULL); g_value_unset (&espeaker); } else { fmt = ESD_STREAM | ESD_RECORD | ESD_BITS16 | (stereo ? ESD_STEREO : ESD_MONO); h->socket = esd_record_stream_fallback (fmt, (int) sampling_rate, /* host: default */ NULL, /* name */ NULL); } if (h->socket < 0) { g_warning("Cannot open ESD play/record socket"); g_free(h); return NULL; } h->sampling_rate = sampling_rate; h->stereo = stereo; h->write = write; h->time = 0.0; return h; } static void _close (gpointer handle) { esd_handle *h = (esd_handle *) handle; close(h->socket); g_free(handle); } static gboolean _read (gpointer handle, gpointer dest, guint num_bytes, double *timestamp) { esd_handle *h = (esd_handle *) handle; struct timeval tv; unsigned char *p; ssize_t r, n; double now; g_assert (!h->write); for (p = (unsigned char *) dest, n = num_bytes; n > 0;) { fd_set rdset; FD_ZERO(&rdset); FD_SET(h->socket, &rdset); tv.tv_sec = 2; tv.tv_usec = 0; r = select(h->socket+1, &rdset, NULL, NULL, &tv); /* FIXME */ if (r == 0) g_error("ESD read timeout"); else if (r < 0) g_error("ESD select error %d (%s)", errno, strerror(errno)); r = read(h->socket, p, (size_t) n); if (r < 0) { g_assert(errno == EINTR); continue; } p += r; n -= r; } gettimeofday(&tv, NULL); now = tv.tv_sec + tv.tv_usec * (1 / 1e6); if (h->time > 0.0) { double dt = now - h->time; double ddt = h->buffer_period_far - dt; if (fabs(h->buffer_period_near) < h->buffer_period_far * 1.5) { h->buffer_period_near = (h->buffer_period_near - dt) * 0.8 + dt; h->buffer_period_far = ddt * 0.9999 + dt; *timestamp = h->time += h->buffer_period_far; } else { h->buffer_period_near = h->buffer_period_far; *timestamp = h->time = now; } } else { *timestamp = h->time = now; /* XXX assuming num_bytes won't change */ h->buffer_period_near = h->buffer_period_far = num_bytes / (double)(h->sampling_rate * 2 << h->stereo); } return TRUE; } static gboolean _write (gpointer handle, gpointer src, guint num_bytes, double timestamp) { esd_handle *h = (esd_handle *) handle; unsigned char *p; ssize_t r, n; timestamp = timestamp; g_assert (h->write); p = src; n = num_bytes; while (n > 0) { r = write (h->socket, p, (size_t) n); if (r < 0) { int saved_errno = errno; if (EINTR == saved_errno) continue; g_error("ESD write error %d (%s)", saved_errno, strerror (saved_errno)); return FALSE; } p += r; n -= r; } return TRUE; } const audio_backend_info esd_backend = { name: "Enlightened Sound Daemon", open: _open, close: _close, read: _read, write: _write, }; #endif /* HAVE_ESD */ �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������zapping-0.10cvs6/src/osd.c�������������������������������������������������������������������������� 644 � 764 � 144 � 61437 10305456046 10563� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Zapping (TV viewer for the Gnome Desktop) * Copyright (C) 2001 Iaki Garca Etxebarria * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* * OSD routines. */ /* XXX gtk+ 2.3 GtkOptionMenu, Gnome font picker, color picker */ /* gdk_input_add/remove */ #undef GTK_DISABLE_DEPRECATED #undef GNOME_DISABLE_DEPRECATED #undef GDK_DISABLE_DEPRECATED #include "site_def.h" #ifdef HAVE_CONFIG_H # include "config.h" #endif #include <gnome.h> #define ZCONF_DOMAIN "/zapping/options/osd/" #include "zconf.h" #include "zmisc.h" #include "osd.h" #include "remote.h" #include "common/math.h" #include "properties.h" #include "interface.h" #include "globals.h" #ifndef OSD_TEST #define OSD_TEST 0 #endif #define MAX_COLUMNS 48 /* TTX */ #define MAX_ROWS 26 /* 25 for TTX plus one for OSD */ typedef struct _piece { /* The drawing area */ GtkWidget *da; /* The rendered text */ GdkPixbuf *unscaled; GdkPixbuf *scaled; /* geometry in the osd matrix, interesting for TTX and CC location */ int column, row, width, max_rows, max_columns; /* relative geometry in the OSD window (0...1) */ float x, y, w, h; /* sw is the width we scale p->unscaled to. Then the columns in "double_columns" are duplicated to build scaled */ float sw; /* Columns to duplicate, ignored if sw = w */ int *double_columns; int num_double_columns; /* called before the piece geometry is set to allow changing of x, y, w, h */ void (*position)(struct _piece *p); } piece; typedef struct { piece pieces[MAX_COLUMNS]; /* Set of pieces to show */ int n_pieces; /* Pieces in this row */ } row; static row *matrix[MAX_ROWS]; static GtkWidget *osd_window = NULL; /* Subrectangle in the osd_window we are drawing to */ static gint cx, cy, cw, ch; /** * Handling of OSD. */ static void paint_piece (piece *p, gint x, gint y, gint w, gint h) { z_pixbuf_render_to_drawable(p->scaled, p->da->window, p->da->style->white_gc, x, y, w, h); } static gboolean expose (GtkWidget *da _unused_, GdkEventExpose *event, piece *p) { paint_piece(p, event->area.x, event->area.y, event->area.width, event->area.height); return TRUE; } /** * A temporary place to keep child windows without a parent, created * by the non-profit routine startup_osd. * cf. Futurama */ static GtkWidget *orphanarium = NULL; static void set_piece_geometry (piece *p) { gint dest_x, dest_y, dest_w, dest_h, dest_sw; if (p->double_columns) g_free(p->double_columns); p->double_columns = NULL; p->num_double_columns = 0; if (p->position) { p->position(p); dest_x = (gint) p->x; dest_y = (gint) p->y; dest_w = (gint) p->w; dest_h = (gint) p->h; dest_sw = (gint) p->sw; } else { dest_x = (gint)(cx + p->x * cw); dest_y = (gint)(cy + p->y * ch); dest_w = (gint)(p->w * cw); dest_h = (gint)(p->h * ch); dest_sw = dest_w; } if (osd_window && ((!p->scaled) || (gdk_pixbuf_get_width(p->scaled) != dest_w) || (gdk_pixbuf_get_height(p->scaled) != dest_h))) { if (p->scaled) { g_object_unref (G_OBJECT (p->scaled)); p->scaled = NULL; } if (dest_h > 0) { if (dest_w == dest_sw) p->scaled = z_pixbuf_scale_simple(p->unscaled, dest_w, dest_h, GDK_INTERP_BILINEAR); else { GdkPixbuf * canvas = z_pixbuf_scale_simple(p->unscaled, dest_sw, dest_h, GDK_INTERP_BILINEAR); /* Scaling with line duplication */ if (canvas) { int i, last_column = 0, scaled_x=0; p->scaled = gdk_pixbuf_new(GDK_COLORSPACE_RGB, TRUE, 8, dest_w, dest_h); /* do the line duplication */ for (i=0; i<p->num_double_columns; i++) { int width; width = p->double_columns[i] - last_column; if (width) { z_pixbuf_copy_area(canvas, last_column, 0, width, dest_h, p->scaled, scaled_x, 0); scaled_x += width; } z_pixbuf_copy_area(canvas, p->double_columns[i], 0, 1, dest_h, p->scaled, scaled_x, 0); scaled_x ++; last_column = p->double_columns[i]; } /* Copy the remaining */ if (p->num_double_columns) { int width = dest_sw - last_column; if (width > 0) { z_pixbuf_copy_area(canvas, last_column, 0, width, dest_h, p->scaled, scaled_x, 0); scaled_x += width; /* for checking */ } } /* We should always draw the whole p->scaled, no more, no less. Otherwise sth is severely b0rken. */ g_assert(scaled_x == dest_w); g_object_unref (G_OBJECT (canvas)); } } } } if (!osd_window) { if (gdk_window_get_parent(p->da->window) != orphanarium->window) gdk_window_reparent(p->da->window, orphanarium->window, 0, 0); return; } else if (osd_window->window != gdk_window_get_parent(p->da->window)) { gdk_window_reparent(p->da->window, osd_window->window, dest_x, dest_y); gdk_window_show(p->da->window); } gdk_window_move_resize(p->da->window, dest_x, dest_y, dest_w, dest_h); if (p->scaled) paint_piece(p, 0, 0, dest_w, dest_h); } /** * Call this when: * a) The osd_window parent is changed * b) There's a resize of the osd_window */ static void geometry_update (void) { int i, j; for (i = 0; i < MAX_ROWS; i++) if (matrix[i]) for (j = 0; j < matrix[i]->n_pieces; j++) set_piece_geometry(&(matrix[i]->pieces[j])); } /** * Widget creation/destruction with caching (for reducing flicker) */ /* List of destroyed windows for reuse */ static GList *window_stack = NULL; static GtkWidget * get_window(void) { GtkWidget *da; da = gtk_drawing_area_new(); gtk_widget_add_events(da, GDK_EXPOSURE_MASK); gtk_fixed_put(GTK_FIXED(orphanarium), da, 0, 0); gtk_widget_realize(da); gdk_window_set_back_pixmap(da->window, NULL, FALSE); return da; } static void unget_window(GtkWidget *window) { if (gdk_window_get_parent(window->window) != orphanarium->window) gdk_window_reparent(window->window, orphanarium->window, 0, 0); gtk_widget_destroy(window); } static void push_window(GtkWidget *window) { window_stack = g_list_append(window_stack, window); } /* Unget all windows in the stack */ static void clear_stack (void) __attribute__ ((unused)); static void clear_stack(void) { GtkWidget *window; while (window_stack) { window = GTK_WIDGET(g_list_last(window_stack)->data); unget_window(window); window_stack = g_list_remove(window_stack, window); } } static GtkWidget * pop_window(void) { GtkWidget *window = NULL; if (window_stack) { window = GTK_WIDGET(g_list_last(window_stack)->data); window_stack = g_list_remove(window_stack, window); } if (!window) window = get_window(); return window; } /** * Add/delete pieces. */ static void add_piece (GdkPixbuf *unscaled, GtkWidget *da, unsigned int col, unsigned int row, unsigned int width, unsigned int max_rows, unsigned int max_columns, float x, float y, float w, float h, void (*position)(piece *p)) { piece *p; g_assert(col < MAX_COLUMNS); g_assert(row < MAX_ROWS); p = matrix[row]->pieces + matrix[row]->n_pieces; matrix[row]->n_pieces++; CLEAR (*p); p->da = da; g_signal_connect(G_OBJECT(p->da), "expose-event", G_CALLBACK(expose), p); p->x = x; p->y = y; p->w = w; p->h = h; p->row = row; p->column = col; p->width = width; p->max_rows = max_rows; p->max_columns = max_columns; p->position = position; p->unscaled = unscaled; set_piece_geometry(p); } static void remove_piece (guint row, int p_index, gboolean just_push) { piece *p = &(matrix[row]->pieces[p_index]); if (p->scaled) g_object_unref (G_OBJECT (p->scaled)); g_object_unref (G_OBJECT (p->unscaled)); g_signal_handlers_disconnect_matched (G_OBJECT(p->da), G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, 0, 0, NULL, G_CALLBACK (expose), p); if (!just_push) unget_window(p->da); else push_window(p->da); if (p->double_columns) g_free(p->double_columns); if (p_index != (matrix[row]->n_pieces - 1)) memcpy(p, p+1, sizeof(piece)*((matrix[row]->n_pieces-p_index)-1)); matrix[row]->n_pieces--; } static void clear_row (guint row, gboolean just_push) { while (matrix[row]->n_pieces) remove_piece(row, matrix[row]->n_pieces-1, just_push); } void osd_clear (void) { guint i; for (i = 0; i < (MAX_ROWS - 1); ++i) if (NULL != matrix[i]) clear_row (i, FALSE); zmodel_changed (osd_model); } /** * OSD sources. */ #include <libxml/parser.h> static guint osd_clear_timeout_id = NO_SOURCE_ID; static void (* osd_clear_timeout_cb)(gboolean); #define OSD_ROW (MAX_ROWS - 1) static gint osd_clear_timeout (void *ignored _unused_) { clear_row(OSD_ROW, FALSE); osd_clear_timeout_id = NO_SOURCE_ID; zmodel_changed(osd_model); if (osd_clear_timeout_cb) osd_clear_timeout_cb(TRUE); return FALSE; } /** * Given the rgb and the colormap creates a suitable color that should * be unref by unref_color */ static GdkColor *create_color (float r, float g, float b, GdkColormap *cmap) { GdkColor *ret = g_malloc0(sizeof(GdkColor)); ret->red = r*65535; ret->green = g*65535; ret->blue = b*65535; gdk_colormap_alloc_color(cmap, ret, FALSE, TRUE); return ret; } /** * Decreases the reference count of the given color, allocated with * create_color. */ static void unref_color (GdkColor *color, GdkColormap *cmap) { gdk_colormap_free_colors(cmap, color, 1); g_free(color); } static gchar * remove_markup (const gchar * s) { GError *error = NULL; gchar *d; pango_parse_markup (s, -1, 0, NULL, &d, NULL, &error); if (!d || error) { g_assert (!d); if (error) { if (OSD_TEST) fprintf (stderr, "%s:%u: Bad markup in \"%s\": %s\n", __FILE__, __LINE__, s, error->message); g_error_free (error); error = NULL; } return NULL; } return d; } static void render_console (const gchar * s, gboolean markup) { GError *error = NULL; gchar *plain_buf; gchar *locale_buf; gsize length; guint i; if (markup) { plain_buf = remove_markup (s); if (!plain_buf) return; } else { plain_buf = g_strdup (s); } for (i = 0; 0 != plain_buf[i]; ++i) if ('\n' == plain_buf[i] || '\r' == plain_buf[i]) plain_buf[i] = ' '; locale_buf = g_locale_from_utf8 (plain_buf, (gint) i, NULL, &length, &error); if (!locale_buf || error) { g_assert (!locale_buf); if (error) { if (OSD_TEST) fprintf (stderr, "%s:%u: Bad UTF-8 in \"%s\": %s\n", __FILE__, __LINE__, plain_buf, error->message); g_error_free (error); error = NULL; } } else { if (length > 0) { fputs (locale_buf, stdout); if (locale_buf[length - 1] != '\n') fputc ('\n', stdout); } g_free (locale_buf); } g_free (plain_buf); } /* Render in OSD mode. Put markup to TRUE if the text contains pango markup to be interpreted. */ static void osd_render_osd (void (*timeout_cb)(gboolean), const gchar *src, gboolean markup) { GdkDrawable *canvas; GtkWidget *patch = pop_window (); PangoContext *context = gtk_widget_get_pango_context (patch); PangoLayout *layout = pango_layout_new (context); PangoFontDescription *pfd = NULL; GdkGC *gc = gdk_gc_new (patch->window); GdkColormap *cmap = gdk_drawable_get_colormap (patch->window); const gchar *fname = zcg_char (NULL, "font"); PangoRectangle logical, ink; GdkColor *bg; gint w, h; gfloat rx, ry, rw, rh; gchar *buf = g_strdup_printf ("<span foreground=\"#%02x%02x%02x\">%s</span>", (int)(zcg_float(NULL, "fg_r")*255), (int)(zcg_float(NULL, "fg_g")*255), (int)(zcg_float(NULL, "fg_b")*255), src); /* First check that the selected font is valid */ if (!fname || !*fname || !(pfd = pango_font_description_from_string (fname))) { if (!fname || !*fname) ShowBox(_("Please choose a font for OSD in preferences."), GTK_MESSAGE_ERROR); else ShowBox(_("The configured font \"%s\" cannot be loaded, please" " select another one in preferences\n"), GTK_MESSAGE_ERROR, fname); /* Some common fonts */ pfd = pango_font_description_from_string ("Arial 36"); if (!pfd) pfd = pango_font_description_from_string ("Sans 36"); if (!pfd) { ShowBox(_("No font could be loaded, please make sure\n" "your system is properly configured."), GTK_MESSAGE_ERROR); unget_window (patch); g_object_unref (G_OBJECT (layout)); g_object_unref (G_OBJECT (gc)); g_free (buf); return; } } pango_layout_set_font_description (layout, pfd); if (markup) pango_layout_set_markup (layout, buf, -1); else pango_layout_set_text (layout, buf, -1); /* Get the text extents, compute the geometry and build the canvas */ pango_layout_get_pixel_extents (layout, &ink, &logical); w = logical.width; h = logical.height; canvas = gdk_pixmap_new (patch->window, w, h, -1); /* Draw the canvas contents */ bg = create_color(zcg_float(NULL, "bg_r"), zcg_float(NULL, "bg_g"), zcg_float(NULL, "bg_b"), cmap); gdk_gc_set_foreground(gc, bg); gdk_draw_rectangle(canvas, gc, TRUE, 0, 0, w, h); unref_color(bg, cmap); gdk_draw_layout (canvas, gc, 0, 0, layout); /* Compute the resulting patch geometry */ rh = 0.1; rw = (rh*w)/h; if (rw >= 0.9) { rw = 0.9; rh = (rw*h)/w; } rx = 1 - rw; ry = 1 - rh; /* Create the patch */ add_piece(gdk_pixbuf_get_from_drawable (NULL, canvas, cmap, 0, 0, 0, 0, w, h), patch, 0, OSD_ROW, 0, 0, 0, rx, ry, rw, rh, NULL); zmodel_changed(osd_model); /* Schedule the destruction of the patch */ if (osd_clear_timeout_id > 0) { if (osd_clear_timeout_cb) osd_clear_timeout_cb(FALSE); g_source_remove (osd_clear_timeout_id); } osd_clear_timeout_id = g_timeout_add ((guint)(zcg_float (NULL, "timeout") * 1000), (GSourceFunc) osd_clear_timeout, NULL); osd_clear_timeout_cb = timeout_cb; /* Cleanup */ pango_font_description_free (pfd); g_object_unref (G_OBJECT (layout)); g_object_unref (G_OBJECT (canvas)); g_object_unref (G_OBJECT (gc)); g_free (buf); } /* If given, timeout_cb(TRUE) is called when osd timed out, timeout_cb(FALSE) when error, replaced. */ void osd_render_markup (osd_timeout_fn * timeout_cb, osd_type type, const char * buf) { if (!buf || !buf[0]) goto failed; if (OSD_TYPE_CONFIG == type) type = zcg_int (NULL, "osd_type"); /* The different ways of drawing */ switch (type) { case 0: /* OSD */ clear_row (OSD_ROW, TRUE); osd_render_osd (timeout_cb, buf, TRUE); break; case 1: /* Statusbar */ { gchar *plain_buf; /* Color looks funny in status bar. */ if (!(plain_buf = remove_markup (buf))) break; z_status_print (plain_buf, /* markup */ FALSE, (guint)(zcg_float (NULL, "timeout") * 1000), /* hide */ FALSE); g_free (plain_buf); break; } case 2: /* Console */ render_console (buf, /* markup */ TRUE); break; case 3: break; /* Ignore */ default: g_assert_not_reached (); break; } return; failed: if (timeout_cb) timeout_cb (FALSE); } /* If given, timeout_cb(TRUE) is called when osd timed out, timeout_cb(FALSE) when error, replaced. */ void osd_render_markup_printf (osd_timeout_fn * timeout_cb, const char * template, ...) { gchar *buf; va_list args; buf = NULL; if (!template || !template[0]) return; va_start (args, template); buf = g_strdup_vprintf (template, args); va_end (args); osd_render_markup (timeout_cb, OSD_TYPE_CONFIG, buf); g_free (buf); } void osd_render (osd_timeout_fn * timeout_cb, const char * template, ...) { gchar *buf; va_list args; buf = NULL; if (!template || !template[0]) goto failed; va_start (args, template); buf = g_strdup_vprintf (template, args); va_end (args); if (!buf || !buf[0]) goto failed; /* The different ways of drawing */ switch (zcg_int (NULL, "osd_type")) { case 0: /* OSD */ clear_row (OSD_ROW, TRUE); osd_render_osd (timeout_cb, buf, FALSE); break; case 1: /* Statusbar */ z_status_print (buf, /* markup */ FALSE, (guint)(zcg_float (NULL, "timeout") * 1000), /* hide */ FALSE); break; case 2: /* Console */ render_console (buf, /* markup */ FALSE); break; case 3: break; /* Ignore */ default: g_assert_not_reached (); break; } g_free (buf); return; failed: g_free (buf); if (timeout_cb) timeout_cb (FALSE); } /** * Interaction with the OSD window. */ gboolean coords_mode = FALSE; static void on_osd_screen_size_allocate (GtkWidget *widget _unused_, GtkAllocation *allocation, gpointer ignored _unused_) { if (cw == allocation->width && ch == allocation->height) return; cw = allocation->width; ch = allocation->height; geometry_update(); } static void set_window(GtkWidget *dest_window, gboolean _coords_mode) { if (osd_window && !coords_mode) g_signal_handlers_disconnect_matched (G_OBJECT(osd_window), G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, 0, 0, NULL, G_CALLBACK (on_osd_screen_size_allocate), NULL); osd_window = dest_window; coords_mode = _coords_mode; if (!coords_mode) g_signal_connect(G_OBJECT(dest_window), "size-allocate", G_CALLBACK(on_osd_screen_size_allocate), NULL); geometry_update(); } void osd_set_window(GtkWidget *dest_window) { gtk_widget_realize(dest_window); cx = cy = 0; gdk_drawable_get_size(dest_window->window, &cw, &ch); set_window(dest_window, FALSE); } void osd_set_coords(GtkWidget *dest_window, gint x, gint y, gint w, gint h) { cx = x; cy = y; cw = w; ch = h; set_window(dest_window, TRUE); } void osd_unset_window(void) { if (!osd_window) return; if (!coords_mode) g_signal_handlers_disconnect_matched (G_OBJECT(osd_window), G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, 0, 0, NULL, G_CALLBACK (on_osd_screen_size_allocate), NULL); osd_window = NULL; geometry_update(); /* Reparent to the orphanarium */ } /* Python wrappers for the OSD renderer */ static PyObject* py_osd_render (PyObject *self _unused_, PyObject *args) { char *string; int ok = ParseTuple (args, "s", &string); if (!ok) g_error ("zapping.osd_render(s)"); osd_render (NULL, "%s", string); Py_INCREF(Py_None); return Py_None; } static PyObject* py_osd_render_markup (PyObject *self _unused_, PyObject *args) { char *string; int ok = ParseTuple (args, "s", &string); if (!ok) g_error ("zapping.osd_render_markup(s)"); osd_render_markup (NULL, OSD_TYPE_CONFIG, string); Py_INCREF(Py_None); return Py_None; } static void on_osd_type_changed (GtkWidget *widget, GtkWidget *page _unused_) { GtkWidget *w; gboolean sensitive1 = FALSE; gboolean sensitive2 = FALSE; widget = lookup_widget(widget, "optionmenu22"); switch (z_option_menu_get_active (widget)) { case 0: sensitive1 = TRUE; case 1: sensitive2 = TRUE; break; default: break; } /* XXX Ugh. */ w = lookup_widget (widget, "general-osd-font-label"); gtk_widget_set_sensitive (w, sensitive1); w = lookup_widget (widget, "general-osd-font-selector"); gtk_widget_set_sensitive (w, sensitive1); w = lookup_widget (widget, "general-osd-foreground-label"); gtk_widget_set_sensitive (w, sensitive1); w = lookup_widget (widget, "general-osd-foreground-selector"); gtk_widget_set_sensitive (w, sensitive1); w = lookup_widget (widget, "general-osd-background-label"); gtk_widget_set_sensitive (w, sensitive1); w = lookup_widget (widget, "general-osd-background-selector"); gtk_widget_set_sensitive (w, sensitive1); w = lookup_widget (widget, "general-osd-timeout-label"); gtk_widget_set_sensitive (w, sensitive2); w = lookup_widget (widget, "general-osd-timeout-selector"); gtk_widget_set_sensitive (w, sensitive2); } /* OSD properties */ static void osd_setup (GtkWidget *page) { GtkWidget *widget; /* OSD type */ widget = lookup_widget(page, "optionmenu22"); gtk_option_menu_set_history(GTK_OPTION_MENU(widget), (guint) zcg_int(NULL, "osd_type")); on_osd_type_changed (page, page); g_signal_connect(G_OBJECT (widget), "changed", G_CALLBACK(on_osd_type_changed), page); /* OSD font */ widget = lookup_widget(page, "general-osd-font-selector"); if (zcg_char(NULL, "font")) gnome_font_picker_set_font_name(GNOME_FONT_PICKER(widget), zcg_char(NULL, "font")); /* OSD foreground color */ widget = lookup_widget(page, "general-osd-foreground-selector"); gnome_color_picker_set_d(GNOME_COLOR_PICKER(widget), zcg_float(NULL, "fg_r"), zcg_float(NULL, "fg_g"), zcg_float(NULL, "fg_b"), 0.0); /* OSD background color */ widget = lookup_widget(page, "general-osd-background-selector"); gnome_color_picker_set_d(GNOME_COLOR_PICKER(widget), zcg_float(NULL, "bg_r"), zcg_float(NULL, "bg_g"), zcg_float(NULL, "bg_b"), 0.0); /* OSD timeout in seconds */ widget = lookup_widget(page, "spinbutton2"); gtk_spin_button_set_value(GTK_SPIN_BUTTON(widget), zcg_float(NULL, "timeout")); } static void osd_apply (GtkWidget *page) { GtkWidget *widget; gdouble r, g, b, a; widget = lookup_widget(page, "optionmenu22"); /* osd type */ zcs_int(z_option_menu_get_active(widget), "osd_type"); widget = lookup_widget(page, "general-osd-font-selector"); zcs_char(gnome_font_picker_get_font_name(GNOME_FONT_PICKER(widget)), "font"); widget = lookup_widget(page, "general-osd-foreground-selector"); gnome_color_picker_get_d(GNOME_COLOR_PICKER(widget), &r, &g, &b, &a); zcs_float(r, "fg_r"); zcs_float(g, "fg_g"); zcs_float(b, "fg_b"); widget = lookup_widget(page, "general-osd-background-selector"); gnome_color_picker_get_d(GNOME_COLOR_PICKER(widget), &r, &g, &b, &a); zcs_float(r, "bg_r"); zcs_float(g, "bg_g"); zcs_float(b, "bg_b"); widget = lookup_widget(page, "spinbutton2"); /* osd timeout */ zcs_float(gtk_spin_button_get_value(GTK_SPIN_BUTTON(widget)), "timeout"); } static void add (GtkDialog * dialog) { SidebarEntry general_options[] = { { N_("OSD"), "gnome-oscilloscope.png", "general-osd-table", osd_setup, osd_apply, .help_link_id = "zapping-settings-osd" } }; SidebarGroup groups[] = { { N_("General Options"), general_options, G_N_ELEMENTS (general_options) } }; standard_properties_add (dialog, groups, G_N_ELEMENTS (groups), "zapping.glade2"); } /** * Shutdown/startup of the OSD engine */ ZModel *osd_model = NULL; void startup_osd(void) { int i; GtkWidget *toplevel; property_handler osd_handler = { add: add }; for (i = 0; i<MAX_ROWS; i++) matrix[i] = g_malloc0(sizeof(row)); osd_model = ZMODEL(zmodel_new()); zcc_int(0, "Which kind of OSD should be used", "osd_type"); zcc_char("times new roman Bold 36", "Default font", "font"); zcc_float(1.0, "Default fg r component", "fg_r"); zcc_float(1.0, "Default fg g component", "fg_g"); zcc_float(1.0, "Default fg b component", "fg_b"); zcc_float(0.0, "Default bg r component", "bg_r"); zcc_float(0.0, "Default bg g component", "bg_g"); zcc_float(0.0, "Default bg b component", "bg_b"); zcc_float(1.5, "Seconds the OSD text stays on screen", "timeout"); orphanarium = gtk_fixed_new(); gtk_widget_set_size_request (orphanarium, 828, 271); toplevel = gtk_window_new(GTK_WINDOW_TOPLEVEL); gtk_container_add(GTK_CONTAINER(toplevel), orphanarium); gtk_widget_show(orphanarium); gtk_widget_realize(orphanarium); /* toplevel will never be shown */ /* Add Python interface to our routines */ cmd_register ("osd_render_markup", py_osd_render_markup, METH_VARARGS); cmd_register ("osd_render", py_osd_render, METH_VARARGS); /* Register our properties handler */ prepend_property_handler (&osd_handler); } void shutdown_osd(void) { int i; osd_clear(); clear_row(OSD_ROW, FALSE); for (i = 0; i<MAX_ROWS; i++) g_free(matrix[i]); g_object_unref (G_OBJECT (osd_model)); osd_model = NULL; } ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������zapping-0.10cvs6/src/osd.h�������������������������������������������������������������������������� 644 � 764 � 144 � 4571 10167772044 10551� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Zapping (TV viewer for the Gnome Desktop) * Copyright (C) 2001 Iaki Garca Etxebarria * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* $Id: osd.h,v 1.21 2005/01/08 14:54:28 mschimek Exp $ */ #ifndef __OSD_H__ #define __OSD_H__ #include "zmodel.h" void startup_osd(void); void shutdown_osd(void); /* Sets the given window as the destination */ void osd_set_window(GtkWidget *dest_window); /** * Like set_window, but lets you specify a subrectangle to use */ void osd_set_coords(GtkWidget *dest_window, gint x, gint y, gint w, gint h); /** * Call this when the osd window you've set is going to be destroyed. */ void osd_unset_window(void); /* Clears any OSD text in the window */ void osd_clear(void); typedef void osd_timeout_fn (gboolean); /** * Formats and renders the given string that might contain pango * markup. * @timeout_cb: When given and osd timed out, called with TRUE, when * when given and error or replaced, called with FALSE. * @string: Chars to draw. */ void osd_render_markup_printf (osd_timeout_fn * timeout_cb, const char * string, ...) #ifdef __GNUC__ __attribute__ ((format (printf, 2, 3))) #endif ; typedef enum { OSD_TYPE_CONFIG = -1, OSD_TYPE_SCREEN, OSD_TYPE_STATUS_BAR, OSD_TYPE_CONSOLE, OSD_TYPE_IGNORE } osd_type; extern void osd_render_markup (osd_timeout_fn * timeout_cb, osd_type type, const char * buf); /** * Like osd_render_pango_markup but no markup parsing is done, the * string is printed as is. */ void osd_render (osd_timeout_fn * timeout_cb, const char * string, ...) #ifdef __GNUC__ __attribute__ ((format (printf, 2, 3))) #endif ; extern ZModel *osd_model; /* used for notification of changes */ #endif /* osd.h */ ���������������������������������������������������������������������������������������������������������������������������������������zapping-0.10cvs6/src/oss.c�������������������������������������������������������������������������� 644 � 764 � 144 � 55671 10402711715 10600� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Zapping (TV viewer for the Gnome Desktop) * Copyright (C) 2000-2001 Iaki Garca Etxebarria * * New OSS mixer Copyright (C) 2003 Michael H. Schimek * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include "libtv/misc.h" /** OSS backend **/ #ifdef HAVE_OSS #include <gnome.h> #include <math.h> #include <unistd.h> #include "common/fifo.h" /* current_time() */ #include "audio.h" #define ZCONF_DOMAIN "/zapping/options/audio/" #include "zconf.h" #include "interface.h" #include "globals.h" #include <sys/ioctl.h> #include <sys/soundcard.h> #include "tveng_private.h" #include "common/device.h" typedef struct { int fd; int stereo; int sampling_rate; double time, buffer_period; } oss_handle; #define IOCTL(fd, cmd, data) \ ({ int __result; do __result = ioctl(fd, cmd, data); \ while (__result == -1L && errno == EINTR); __result; }) static gpointer _open (gboolean stereo, guint sampling_rate, enum audio_format format, gboolean write) { int Format = AFMT_S16_LE; int Stereo = !!stereo; int Speed = sampling_rate; int oss_fd; oss_handle *h; g_assert (!write); if (format != AUDIO_FORMAT_S16_LE) { g_warning("Requested audio format won't work"); return NULL; } if ((oss_fd = open(zcg_char(NULL, "pcm_device"), O_RDONLY)) == -1) return NULL; if ((IOCTL(oss_fd, SNDCTL_DSP_SETFMT, &Format) == -1)) goto failed; if ((IOCTL(oss_fd, SNDCTL_DSP_STEREO, &Stereo) == -1)) goto failed; if ((IOCTL(oss_fd, SNDCTL_DSP_SPEED, &Speed) == -1)) goto failed; h = (oss_handle *) g_malloc0(sizeof(*h)); h->fd = oss_fd; h->stereo = stereo; h->sampling_rate = sampling_rate; h->time = 0.0; return h; failed: close(oss_fd); return NULL; } static void _close (gpointer handle) { oss_handle *h = (oss_handle*)handle; close(h->fd); g_free(h); } static gboolean _read (gpointer handle, gpointer dest, guint num_bytes, double *timestamp) { oss_handle *h = (oss_handle *) handle; ssize_t r, n = num_bytes; struct audio_buf_info info; char *data = (char *) dest; struct timeval tv1, tv2; double now; while (n > 0) { r = read(h->fd, data, (size_t) n); if (r == 0 || (r < 0 && errno == EINTR)) continue; g_assert(r > 0 && "OSS read failed"); data = (char *) data + r; n -= r; } /* XXX asks for improvements */ r = 5; do { gettimeofday(&tv1, NULL); if (ioctl(h->fd, SNDCTL_DSP_GETISPACE, &info) != 0) { g_assert(errno != EINTR && !"SNDCTL_DSP_GETISPACE failed"); continue; } gettimeofday(&tv2, NULL); tv2.tv_sec -= tv1.tv_sec; tv2.tv_usec -= tv1.tv_usec + (tv2.tv_sec ? 1000000 : 0); } while ((tv2.tv_sec > 1 || tv2.tv_usec > 100) && r--); now = tv1.tv_sec + tv1.tv_usec * (1 / 1e6); if ((n -= info.bytes) == 0) /* usually */ now -= h->buffer_period; else now -= (num_bytes - n) * h->buffer_period / (double) num_bytes; if (h->time > 0) { double dt = now - h->time; double ddt = h->buffer_period - dt; double q = 128 * fabs(ddt) / h->buffer_period; h->buffer_period = ddt * MIN(q, 0.9999) + dt; *timestamp = h->time; h->time += h->buffer_period; } else { *timestamp = h->time = now; /* XXX assuming num_bytes won't change */ h->buffer_period = num_bytes / (double)(h->sampling_rate * 2 << h->stereo); } return TRUE; } static void _add_props (GtkBox *vbox) { GtkWidget *label = gtk_label_new(_("Audio device:")); GtkWidget *hbox = gtk_hbox_new(TRUE, 3); GtkWidget *fentry = gnome_file_entry_new("audio_device_history", _("Select the audio device")); GtkEntry *entry; gtk_label_set_justify(GTK_LABEL(label), GTK_JUSTIFY_RIGHT); gtk_box_pack_start_defaults(GTK_BOX(hbox), label); entry = GTK_ENTRY(gnome_file_entry_gtk_entry(GNOME_FILE_ENTRY(fentry))); gtk_entry_set_text(entry, zcg_char(NULL, "pcm_device")); gtk_box_pack_start_defaults(GTK_BOX(hbox), fentry); g_object_set_data(G_OBJECT(vbox), "fentry", fentry); gtk_widget_show_all(hbox); gtk_box_pack_start_defaults(vbox, hbox); } static void _apply_props (GtkBox *vbox) { GnomeFileEntry *fentry = GNOME_FILE_ENTRY(g_object_get_data(G_OBJECT(vbox), "fentry")); gchar *result = gnome_file_entry_get_full_path(fentry, TRUE); if (!result) { const gchar *real_text = gtk_entry_get_text(GTK_ENTRY(gnome_file_entry_gtk_entry(fentry))); ShowBox(_("The given audio device \"%s\" doesn't exist"), GTK_MESSAGE_WARNING, real_text); } else { zcs_char(result, "pcm_device"); g_free(result); } } static void _init (void) { zcc_char("/dev/dsp", "Kernel audio device", "pcm_device"); } const audio_backend_info oss_backend = { name: "Open Sound System", open: _open, close: _close, read: _read, init: _init, add_props: _add_props, apply_props: _apply_props }; /* Preliminary */ struct pcm { tv_device_node node; int fd; FILE * _log; }; static void destroy_pcm (tv_device_node * n, tv_bool restore) { struct pcm *p; int saved_errno; if (!n) return; p = PARENT (n, struct pcm, node); saved_errno = errno; if (restore) { /* Blah. */ } free ((char *) p->node.device); free ((char *) p->node.version); free ((char *) p->node.driver); free ((char *) p->node.label); if (p->fd >= 0) device_close (p->_log, p->fd); CLEAR (*p); free (p); errno = saved_errno; } static struct pcm * open_pcm (void * unused _unused_, FILE * log, const char * device) { struct stat st; struct pcm *p; /* if (OSS_LOG_FP) log = OSS_LOG_FP; */ if (-1 == stat (device, &st)) return NULL; /* Don't accidentally overwrite a regular file. */ if (!S_ISCHR (st.st_mode)) { errno = EINVAL; return NULL; } /* Check minor number here? */ if (!(p = calloc (1, sizeof (*p)))) goto error; p->node.destroy = destroy_pcm; p->_log = log; p->fd = device_open (p->_log, device, O_RDWR, 0); if (-1 == p->fd) goto error; if (!(p->node.device = strdup (device))) goto error; #ifdef OSS_GETVERSION { int version; /* Introduced in OSS 3.6, error ignored */ /* XXX use ioctl wrapper */ ioctl (p->fd, OSS_GETVERSION, &version); if (version > 0) { if (_tv_asprintf (&p->node.version, "OSS %u.%u.%u", (version >> 16) & 0xFF, (version >> 8) & 0xFF, (version >> 0) & 0xFF) < 0) goto error; } } #endif /* That's it. No other information available. Maybe if we could somehow link mixer and pcm device? */ return p; error: destroy_pcm (&p->node, FALSE); return NULL; } tv_device_node * oss_pcm_open (void * unused _unused_, FILE * log, const char * dev_name) { struct pcm *p; if ((p = open_pcm (NULL, log, dev_name))) return &p->node; return NULL; } tv_device_node * oss_pcm_scan (void * unused _unused_, FILE * log) { static const char *pcm_devices [] = { "/dev/dsp", "/dev/dsp0", "/dev/dsp1", "/dev/dsp2", "/dev/dsp3", }; tv_device_node *list = NULL; const char **sp; for (sp = pcm_devices; *sp; ++sp) { if (!tv_device_node_find (list, *sp)) { struct pcm *p; if ((p = open_pcm (NULL, log, *sp))) { tv_device_node_add (&list, &p->node); } } } return list; } /* XXX check for freebsd quirks */ #ifndef OSS_LOG_FP #define OSS_LOG_FP 0 /* stderr */ #endif #define VOL_MIN 1 /* 0 = muted */ #define VOL_MAX 100 #ifndef SOUND_MASK_PHONEIN #define SOUND_MASK_PHONEIN 0 #endif #ifndef SOUND_MIXER_READ_OUTMASK #define SOUND_MIXER_READ_OUTMASK MIXER_READ (SOUND_MIXER_OUTMASK) #endif #ifndef SOUND_MIXER_READ_OUTSRC #define SOUND_MIXER_READ_OUTSRC MIXER_READ (SOUND_MIXER_OUTSRC) #endif #ifndef SOUND_MIXER_WRITE_OUTSRC #define SOUND_MIXER_WRITE_OUTSRC MIXER_WRITE (SOUND_MIXER_OUTSRC) #endif static const char *dev_names [] = SOUND_DEVICE_LABELS; static const unsigned int INPUTS = SOUND_MASK_LINE | SOUND_MASK_MIC | SOUND_MASK_CD | SOUND_MASK_PHONEIN | SOUND_MASK_VIDEO | SOUND_MASK_RADIO | /* * soundcard.h suggests inputs, but some drivers * use them for outputs. :-( */ SOUND_MASK_LINE1 | SOUND_MASK_LINE2 | SOUND_MASK_LINE3 | SOUND_MASK_DIGITAL1 | SOUND_MASK_DIGITAL2 | SOUND_MASK_DIGITAL3; #define CASE(x) case x: if (!arg) { fputs (# x, fp); return; } static void fprintf_ioctl_arg (FILE * fp, unsigned int cmd, int rw _unused_, void * arg) { switch (cmd) { #ifdef SOUND_MIXER_INFO CASE (SOUND_MIXER_INFO) { struct mixer_info *info = arg; fprintf (fp, "id=\"%.*s\" name=\"%.*s\" modify_counter=%d", N_ELEMENTS (info->id), info->id, N_ELEMENTS (info->name), info->name, info->modify_counter); break; } #endif #ifdef OSS_GETVERSION CASE (OSS_GETVERSION) #endif #ifdef SOUND_MIXER_OUTSRC CASE (SOUND_MIXER_WRITE_OUTSRC) CASE (SOUND_MIXER_READ_OUTSRC) #endif #ifdef SOUND_MIXER_OUTMASK CASE (SOUND_MIXER_READ_OUTMASK) #endif CASE (SOUND_MIXER_WRITE_RECSRC) CASE (SOUND_MIXER_READ_RECSRC) CASE (SOUND_MIXER_READ_DEVMASK) CASE (SOUND_MIXER_READ_RECMASK) CASE (SOUND_MIXER_READ_CAPS) CASE (SOUND_MIXER_READ_STEREODEVS) fprintf (fp, "0x%08x", * (unsigned int *) arg); break; default: { const char *rw = "?"; unsigned int line; /* * Note: MIXER_WRITE() is really write-read, but it * just returns the argument, not the actual volume. */ if (IOCTL_READ_WRITE (cmd)) rw = "WRITE"; else if (IOCTL_READ (cmd)) rw = "READ"; line = IOCTL_NUMBER (cmd); if (line >= SOUND_MIXER_NRDEVICES) { fprint_unknown_ioctl (fp, cmd, arg); break; } if (arg) fprintf (fp, "L%03u R%03u", (* (int *) arg) & 0xFF, ((* (int *) arg) >> 8) & 0xFF); else fprintf (fp, "SOUND_MIXER_%s<%u %s>", rw, line, dev_names[line]); } } } #define mixer_ioctl(fd, cmd, arg) \ (0 == device_ioctl (m->pub._log, fprintf_ioctl_arg, fd, cmd, arg)) struct line { tv_audio_line pub; int id; int old_volume; /* restore */ }; #define L(l) PARENT (l, struct line, pub) #define NOTIFY(l) tv_callback_notify (NULL, &l->pub, l->pub._callback) struct mixer { tv_mixer pub; int fd; /* * .id, .name = mixer name, driver name, device brand * name or any combination, in any order. :-( * .modify_count = incremented on each write ioctl. * version = driver of OSS version 3.6.0 (0x030600) * or higher, 0 older version. */ #ifdef SOUND_MIXER_INFO struct mixer_info mixer_info; #endif int version; int dev_mask; int rec_mask; int out_mask; int stereo_mask; unsigned has_recsrc : 1; unsigned has_outsrc : 1; unsigned rec_single : 1; /* * recsrc: inputs to ADC (rec_single: one line, else mask) * outsrc: inputs to sum & output (mute function) */ int old_recsrc; /* restore */ int old_outsrc; }; #define M(m) PARENT (m, struct mixer, pub) #define HARD_MUTABLE(m, l) ((m)->has_outsrc && ((m)->out_mask & (1 << (l)->id))) static tv_bool update_line (struct mixer * m, struct line * l, int * volume) { int left, right; tv_bool muted; *volume = 0; if (!mixer_ioctl (m->fd, MIXER_READ (l->id), volume)) return FALSE; #ifdef SOUND_MIXER_OUTSRC if (HARD_MUTABLE (m, l)) { int outsrc; /* sic */ if (!mixer_ioctl (m->fd, SOUND_MIXER_READ_OUTSRC, &outsrc)) return FALSE; muted = (0 == (outsrc & (1 << l->id))); } else #endif { if ((muted = (*volume == 0))) { if (l->pub.muted != muted) { l->pub.muted = muted; NOTIFY(l); } return TRUE; } } left = *volume & 0xFF; /* left = left ? MIN (left + 1, (unsigned int) VOL_MAX) : 0; */ if (!l->pub.stereo) { right = (*volume >> 8) & 0xFF; /* higher bits are undefined */ /* right = right ? MIN (right + 1, (unsigned int) VOL_MAX) : 0; */ } else { right = left; } if (l->pub.volume[0] != left || l->pub.volume[1] != right || l->pub.muted != muted) { l->pub.volume[0] = left; l->pub.volume[1] = right; l->pub.muted = muted; NOTIFY(l); } return TRUE; } static tv_bool oss_mixer_update_line (tv_audio_line * line) { int volume; /* auxiliary result ignored */ return update_line (M ((tv_mixer *) line->_parent), L (line), &volume); } static tv_bool oss_mixer_set_volume (tv_audio_line * line, int left, int right) { struct mixer *m = M ((tv_mixer *) line->_parent); struct line *l = L (line); if (!l->pub.muted || HARD_MUTABLE (m, l)) { int volume; /* sic */ volume = left | (right << 8); /* We don't know the current volume, so let's switch anyway. */ if (!mixer_ioctl (m->fd, MIXER_WRITE (l->id), &volume)) return FALSE; /* * OSS scales volume to hardware resolution and back. * The actual volume returned by MIXER_WRITE is likely not * what was requested. It's desirable the UI reflects this. */ return update_line (m, l, &volume); } else { if (l->pub.volume[0] != left || l->pub.volume[1] != right) { l->pub.volume[0] = left; l->pub.volume[1] = right; NOTIFY(l); } return TRUE; } } static tv_bool oss_mixer_set_mute (tv_audio_line * line, tv_bool mute) { struct line *l = L (line); struct mixer *m = M ((tv_mixer *) line->_parent); /* * Hopefully using the hardware mute switch will prevent an * ugly clicking noise, and really mute whereas volume zero * may be just very low. */ #ifdef SOUND_MIXER_OUTSRC if (HARD_MUTABLE (m, l)) { int outsrc; /* sic */ /* We don't know the current outsrc, so let's switch anyway. */ if (!mixer_ioctl (m->fd, SOUND_MIXER_READ_OUTSRC, &outsrc)) return FALSE; if (mute) outsrc &= ~(1 << l->id); else outsrc |= 1 << l->id; if (!mixer_ioctl (m->fd, SOUND_MIXER_WRITE_OUTSRC, &outsrc)) return FALSE; if (l->pub.muted != mute) { l->pub.muted = mute; NOTIFY(l); } } else #endif { int volume; /* sic */ if (mute) volume = 0; else volume = l->pub.volume[0] | (l->pub.volume[1] << 8); /* We don't know the current volume, so let's switch anyway. */ if (!mixer_ioctl (m->fd, MIXER_WRITE (l->id), &volume)) return FALSE; if (l->pub.muted != mute) { l->pub.muted = mute; NOTIFY(l); } } return TRUE; } static tv_audio_line * find_rec_line (tv_mixer * m, int set) { struct line * l; for (l = L (m->inputs); l; l = L (l->pub._next)) { if (set & (1 << l->id)) return &l->pub; } fprintf (stderr, "%s: Unknown recording source 0x%08x reported\n", __FILE__, set); return NULL; } static tv_bool rec_source_changed (struct mixer * m, int set) { if (NULL != m->pub.rec_line) { int mask = 1 << L (m->pub.rec_line)->id; if (0 == set) { m->pub.rec_line = NULL; return TRUE; } else if (0 == (set & mask)) { m->pub.rec_line = find_rec_line (&m->pub, set); return TRUE; } } else { if (0 != set) { m->pub.rec_line = find_rec_line (&m->pub, set); return (NULL != m->pub.rec_line); } } return FALSE; } static tv_bool oss_mixer_update_mixer (tv_mixer * mixer) { struct mixer *m = M (mixer); int set; /* sic */ if (m->has_recsrc) { if (!mixer_ioctl (m->fd, SOUND_MIXER_READ_RECSRC, &set)) return FALSE; if (rec_source_changed (m, set)) tv_callback_notify (NULL, &m->pub, m->pub._callback); } return TRUE; } static tv_bool oss_mixer_set_rec_line (tv_mixer * mixer, tv_audio_line * line, tv_bool exclusive) { struct mixer *m = M (mixer); int set; /* sic */ if (!m->has_recsrc) return FALSE; set = 0; if (!(exclusive | m->rec_single)) { if (!mixer_ioctl (m->fd, SOUND_MIXER_READ_RECSRC, &set)) return FALSE; if (m->pub.rec_line) set &= ~(1 << L (m->pub.rec_line)->id); } if (line) set |= 1 << L (line)->id; /* We don't know the current rec source, so let's switch anyway. */ if (!mixer_ioctl (m->fd, SOUND_MIXER_WRITE_RECSRC, &set)) return FALSE; /* NB the driver will never return set = 0, it defaults to Mic. */ if (rec_source_changed (m, set)) tv_callback_notify (NULL, &m->pub, m->pub._callback); return TRUE; } static void free_mixer_lines (struct mixer * m, tv_audio_line * line, tv_bool restore) { while (line) { struct line *l; l = L (line); line = l->pub._next; tv_callback_delete_all (l->pub._callback, 0, 0, 0, &l->pub); if (restore) { /* Error ignored */ mixer_ioctl (m->fd, MIXER_WRITE (l->id), &l->old_volume); } free ((char *) l->pub.label); free (l); } } static void destroy_mixer (tv_device_node * n, tv_bool restore) { struct mixer *m; int saved_errno; if (!n) return; m = PARENT (n, struct mixer, pub.node); saved_errno = errno; tv_callback_delete_all (m->pub._callback, 0, 0, 0, &m->pub); if (restore) { /* Error ignored */ mixer_ioctl (m->fd, SOUND_MIXER_WRITE_RECSRC, &m->old_recsrc); #ifdef SOUND_MIXER_OUTSRC /* Error ignored */ mixer_ioctl (m->fd, SOUND_MIXER_WRITE_OUTSRC, &m->old_outsrc); #endif } free ((char *) m->pub.node.device); free ((char *) m->pub.node.version); free ((char *) m->pub.node.driver); free ((char *) m->pub.node.label); free_mixer_lines (m, m->pub.inputs, restore); free_mixer_lines (m, m->pub.rec_gain, restore); free_mixer_lines (m, m->pub.play_gain, restore); if (m->fd >= 0) device_close (m->pub._log, m->fd); CLEAR (*m); free (m); errno = saved_errno; } static tv_bool add_mixer_line (struct mixer * m, tv_audio_line ** linepp, unsigned int oss_id) { struct line *l; if (!(l = calloc (1, sizeof (*l)))) return FALSE; while (*linepp) linepp = &(*linepp)->_next; *linepp = &l->pub; l->id = oss_id; l->pub._parent = &m->pub; l->pub.id = TV_AUDIO_LINE_ID_UNKNOWN; l->pub.hash = oss_id; l->pub.stereo = ((m->stereo_mask & (1 << oss_id)) != 0); l->pub.recordable = ((m->rec_mask & (1 << oss_id)) != 0); if (m->stereo_mask && !l->pub.stereo) { char buf[80]; snprintf (buf, sizeof (buf) - 1, /* TRANSLATORS: Name of mixer line, mono as opposed to stereo. */ _("%s (Mono)"), dev_names[oss_id]); if (!(l->pub.label = strdup (buf))) return FALSE; } else { if (!(l->pub.label = strdup (dev_names[oss_id]))) return FALSE; } l->pub.minimum = VOL_MIN; l->pub.maximum = VOL_MAX; l->pub.step = 4; /* or so, could be probed */ l->pub.reset = 80; /* or so */ update_line (m, l, &l->old_volume); return TRUE; } static struct mixer * open_mixer (const tv_mixer_interface *mi, FILE * log, const char * device) { struct stat st; struct mixer *m; int capabilities; /* sic */ unsigned int i; if (OSS_LOG_FP) log = OSS_LOG_FP; if (-1 == stat (device, &st)) return NULL; /* Don't accidentally overwrite a regular file. */ if (!S_ISCHR (st.st_mode)) { errno = EINVAL; return NULL; } /* Mixers have minor n*16, major on Linux 14, FreeBSD 30. Check? */ if (!(m = calloc (1, sizeof (*m)))) goto error; m->pub.node.destroy = destroy_mixer; m->pub._log = log; m->pub._interface = mi; m->fd = device_open (m->pub._log, device, O_RDWR, 0); if (-1 == m->fd) goto error; if (!(m->pub.node.device = strdup (device))) goto error; #ifdef SOUND_MIXER_INFO if (mixer_ioctl (m->fd, SOUND_MIXER_INFO, &m->mixer_info)) { if (m->mixer_info.name[0]) { m->pub.node.label = _tv_strndup (m->mixer_info.name, N_ELEMENTS (m->mixer_info.name)); if (!m->pub.node.label) goto error; } if (m->mixer_info.id[0]) { m->pub.node.driver = _tv_strndup (m->mixer_info.id, N_ELEMENTS (m->mixer_info.id)); if (!m->pub.node.driver) goto error; } /* Will you please stick to C conventions. */ m->mixer_info.id [N_ELEMENTS (m->mixer_info.id) - 1] = 0; m->mixer_info.name [N_ELEMENTS (m->mixer_info.name) - 1] = 0; } else { if (errno == EINVAL) { /* Probably not Open Sound System device, or something ancient. DEVMASK below should be conclusive.*/ } else if (errno == ENXIO) { /* OSS installed but no hardware. */ } else { /* ? */ goto error; } } #endif #ifdef OSS_GETVERSION /* Introduced in OSS 3.6, error ignored */ mixer_ioctl (m->fd, OSS_GETVERSION, &m->version); if (m->version > 0) { if (_tv_asprintf (&m->pub.node.version, "OSS %u.%u.%u", (m->version >> 16) & 0xFF, (m->version >> 8) & 0xFF, (m->version >> 0) & 0xFF) < 0) goto error; } #endif if (!mixer_ioctl (m->fd, SOUND_MIXER_READ_DEVMASK, &m->dev_mask)) goto error; /* Error ignored */ mixer_ioctl (m->fd, SOUND_MIXER_READ_STEREODEVS, &m->stereo_mask); if (!mixer_ioctl (m->fd, SOUND_MIXER_READ_CAPS, &capabilities) || (capabilities & SOUND_CAP_EXCL_INPUT)) m->rec_single = TRUE; if (mixer_ioctl (m->fd, SOUND_MIXER_READ_RECMASK, &m->rec_mask) && mixer_ioctl (m->fd, SOUND_MIXER_READ_RECSRC, &m->old_recsrc)) m->has_recsrc = TRUE; #if defined (SOUND_MIXER_OUTMASK) && defined (SOUND_MIXER_OUTSRC) #if 0 /* XXX test me with SB16. */ if (mixer_ioctl (m->fd, SOUND_MIXER_READ_OUTMASK, &m->out_mask) && mixer_ioctl (m->fd, SOUND_MIXER_READ_OUTSRC, &m->old_outsrc)) m->has_outsrc = TRUE; #endif #endif for (i = 0; i < SOUND_MIXER_NRDEVICES; i++) { if (0 == (m->dev_mask & (1 << i))) continue; if (SOUND_MIXER_IGAIN == i) { if (!add_mixer_line (m, &m->pub.rec_gain, i)) goto error; continue; } if (SOUND_MIXER_PCM == i) { if (!add_mixer_line (m, &m->pub.play_gain, i)) goto error; continue; } if (INPUTS & (1 << i)) { if (!add_mixer_line (m, &m->pub.inputs, i)) goto error; } } if (m->has_recsrc && 0 != m->old_recsrc) m->pub.rec_line = find_rec_line (&m->pub, m->old_recsrc); return m; error: if (m) destroy_mixer (&m->pub.node, FALSE); return NULL; } static tv_mixer * oss_mixer_open (const tv_mixer_interface *mi, FILE * log, const char * dev_name) { struct mixer *m; if ((m = open_mixer (mi, log, dev_name))) return &m->pub; return NULL; } static tv_mixer * oss_mixer_scan (const tv_mixer_interface *mi, FILE * log) { static const char *mixer_devices [] = { "/dev/mixer", "/dev/mixer0", "/dev/mixer1", "/dev/mixer2", "/dev/mixer3", }; tv_device_node *list = NULL; const char **sp; for (sp = mixer_devices; *sp; sp++) { if (!tv_device_node_find (list, *sp)) { struct mixer *m; if ((m = open_mixer (mi, log, *sp))) { tv_device_node_add (&list, &m->pub.node); } } } return list ? PARENT (list, tv_mixer, node) : NULL; } const tv_mixer_interface oss_mixer_interface = { .name = "Open Sound System", .open = oss_mixer_open, .scan = oss_mixer_scan, .update_line = oss_mixer_update_line, .set_volume = oss_mixer_set_volume, .set_mute = oss_mixer_set_mute, .set_rec_line = oss_mixer_set_rec_line, .update_mixer = oss_mixer_update_mixer, }; #endif /* OSS backend */ �����������������������������������������������������������������������zapping-0.10cvs6/src/vdr.c�������������������������������������������������������������������������� 644 � 764 � 144 � 10074 10173357430 10560� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Zapping (TV viewer for the Gnome Desktop) * VDR Interface * Copyright (C) 2003 Slobodan Tomic, based on XawTV patch. * Python command modifications by mhs. * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* * Interface to VideoDiskRecorder */ #ifdef HAVE_CONFIG_H # include "config.h" #endif #include <gnome.h> #include <errno.h> #include <string.h> #include <fcntl.h> #include <signal.h> #include <sys/stat.h> #include <sys/types.h> #include <sys/socket.h> #include <netinet/in.h> #include <arpa/inet.h> #include <netdb.h> #include "vdr.h" #include "zmisc.h" #include "remote.h" static int vdr_sock = -1; static struct sockaddr_in vdr_sockaddr; static void vdr_close (int signum); static gboolean vdr_open (void) { int opt=1; struct protoent *proto_ent; char c; signal(SIGPIPE, vdr_close); if (!(proto_ent=getprotobyname("TCP"))) { printv("vdr: getprotobyname failed\n"); return FALSE; } if ((vdr_sock=socket(PF_INET, SOCK_STREAM, proto_ent->p_proto)) < 0) { printv("vdr: socket failed\n"); return FALSE; } vdr_sockaddr.sin_family = PF_INET; /* FIXME do not hardwire the port */ vdr_sockaddr.sin_port = htons( 2001 ); /* FIXME handle both loopback and normal ip */ vdr_sockaddr.sin_addr.s_addr = htonl( INADDR_LOOPBACK ); setsockopt(vdr_sock,SOL_SOCKET,SO_REUSEADDR,&opt,sizeof(opt)); if (connect (vdr_sock, (struct sockaddr *) &vdr_sockaddr, sizeof(vdr_sockaddr))) { printv("vdr: connect failed\n"); close(vdr_sock); vdr_sock = -1; return FALSE; } fcntl(vdr_sock,F_SETFL,O_NONBLOCK); fcntl(vdr_sock,F_SETFD,FD_CLOEXEC); /* skip the greeting message */ do { c = '\0'; if (read(vdr_sock, &c, 1) < 0) { if( errno == EAGAIN ) continue; printv("vdr: initial read failed"); close(vdr_sock); vdr_sock = -1; break; } } while (c != '\n'); return TRUE; } static void vdr_close (int signum _unused_) { if (vdr_sock != -1) { write(vdr_sock, "QUIT\r\n", 6); close(vdr_sock); vdr_sock = -1; } } static PyObject * py_vdr (PyObject * self _unused_, PyObject * args) { char *s; gchar *t; t = NULL; if (!ParseTuple (args, "s", &s)) g_error ("zapping.vdr(s)"); if (strlen (s) > 0) { guint l; ssize_t r; char c; if (vdr_sock < 0) vdr_open(); if (vdr_sock < 0) goto failure; t = g_strconcat (s, "\r\n", NULL); l = strlen (t); do r = write (vdr_sock, t, l); while (-1 == r && EINTR == errno); if (r != (ssize_t) l) { printv ("vdr write failed: %u %s (%d/%u)", errno, strerror (errno), r, l); close(vdr_sock); vdr_sock = -1; goto failure; } /* skip the answer */ do { c = '\0'; if (read(vdr_sock, &c, 1) < 0) { if (EAGAIN == errno || EINTR == errno) continue; printv ("vdr read failed: %u %s", errno, strerror (errno)); close(vdr_sock); vdr_sock = -1; break; } } while (c != '\n'); } Py_INCREF(Py_None); return Py_None; failure: g_free (t); py_return_false; } gboolean startup_vdr (void) { if (vdr_open ()) { cmd_register ("vdr", py_vdr, METH_VARARGS, ("Send commands to VDR daemon at localhost:2001"), "zapping.vdr('command')"); return FALSE; } else { return TRUE; } } void shutdown_vdr (void) { vdr_close (0); } ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������zapping-0.10cvs6/src/vdr.h�������������������������������������������������������������������������� 644 � 764 � 144 � 1700 10173357430 10541� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Zapping (TV viewer for the Gnome Desktop) * Copyright (C) 2000 Iaki Garca Etxebarria * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifndef __VDR_H__ #define __VDR_H__ #ifdef HAVE_CONFIG_H # include "config.h" #endif gboolean startup_vdr(void); void shutdown_vdr(void); #endif /* __VDR_H__ */ ����������������������������������������������������������������zapping-0.10cvs6/src/overlay.c���������������������������������������������������������������������� 644 � 764 � 144 � 76400 10417056140 11446� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Zapping (TV viewer for the Gnome Desktop) * * Copyright (C) 2000-2001 Iaki Garca Etxebarria * Copyright (C) 2003 Michael H. Schimek * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include "site_def.h" #ifdef HAVE_CONFIG_H # include "config.h" #endif #include <gtk/gtk.h> #include <gdk/gdkx.h> #include <tveng.h> #define ZCONF_DOMAIN "/zapping/options/main/" #include "zconf.h" #include "x11stuff.h" #include "zmisc.h" #include "overlay.h" #include "osd.h" #include "globals.h" #include "zvideo.h" #include "v4linterface.h" #include "zgconf.h" /* This code implements video overlay. It supports three methods: We can ask a kernel device to continuously store video images in some arbitrary memory area, i.e. video memory, with clipping rectangles. Of course the device won't know about windows "obscuring" the overlay, so we can either disable X11 completely, or ask the X server to send events before opening or moving windows, and after closing windows. Alas, there are no "before" events, we have to disable the overlay after the fact, redraw the areas we shouldn't have overlaid, and restart the overlay at the new coordinates and with new clipping rectangles. Second we can ask a kernel device which can somehow overlay a VGA signal to replace all pixels of a specific color by video image pixels. Here we only have to reprogram the device when the size or position of the target window which shall display the video changes. An XVideo driver handles clipping or chromakeying automatically, we only have to pick a target window and adjust the overlay size and position relative to the window. */ /* TODO: + Special mode for devices without clipping. Attn: disable OSD and subtitles. + Matte option (clip out WSS, GCR). + Source rectangle, if supported by hardware (e.g. zoom function). + Perhaps integrate this code into zvideo.c. */ #ifndef OVERLAY_LOG_FP # define OVERLAY_LOG_FP 0 #endif #ifndef OVERLAY_EVENT_LOG_FP # define OVERLAY_EVENT_LOG_FP 0 #endif #ifndef OVERLAY_DUMP_CLIPS # define OVERLAY_DUMP_CLIPS 0 #endif #ifndef OVERLAY_CHROMA_TEST # define OVERLAY_CHROMA_TEST 0 #endif #ifndef OVERLAY_METHOD_FAILURE_TEST # define OVERLAY_METHOD_FAILURE_TEST 0 #endif #ifndef OVERLAY_COLORMAP_FAILURE_TEST # define OVERLAY_COLORMAP_FAILURE_TEST 0 #endif #define CLEAR_TIMEOUT 50 /* ms for the clear window timeout */ enum overlay_mode { XVIDEO_OVERLAY = 1, CHROMA_KEY_OVERLAY, CLIP_OVERLAY, }; struct context { /** XVideo or kernel device. */ tveng_device_info * info; /** The screen containing video_window (Xinerama). */ const tv_screen * screen; /** The root window on the current display. */ GdkWindow * root_window; /** The Zapping main window, top level parent of video_window. */ GtkWidget * main_window; /** The child window which actually displays the overlay. */ GtkWidget * video_window; /** Last known position of the main_window, relative to root_window. */ gint mw_x; gint mw_y; /** Last known position of the video_window, relative to main_window. */ gint vw_x; gint vw_y; /** Last known size of the video_window. */ guint vw_width; guint vw_height; /** The overlay rectangle, relative to root_window. */ tv_window overlay_rect; GdkColormap * colormap; GdkColor chroma_key_color; guint chroma_key_color_cnxn_id; GdkEventMask old_root_events; GdkEventMask old_main_events; GdkEventMask old_video_events; /** See above. */ enum overlay_mode overlay_mode; /** Additional data for overlay_mode CLIP_OVERLAY. */ /** Last known visibility of the video_window. */ GdkVisibilityState visibility; /** * Regions obscuring the overlay_rect, * relative to overlay_rect position. */ tv_clip_vector cur_vector; tv_clip_vector tmp_vector; gboolean clean_screen; gboolean geometry_changed; guint timeout_id; }; static struct context tv_info; #define DEVICE_USES_XVIDEO(c) \ (!OVERLAY_METHOD_FAILURE_TEST \ && (0 != (tv_get_caps ((c)->info)->flags & TVENG_CAPS_XVIDEO))) #define DEVICE_SUPPORTS_CHROMA_KEYING(c) \ (!OVERLAY_METHOD_FAILURE_TEST \ && (OVERLAY_CHROMA_TEST \ || (0 != (tv_get_caps ((c)->info)->flags & TVENG_CAPS_CHROMAKEY)))) #define DEVICE_SUPPORTS_CLIPPING(c) \ (!OVERLAY_METHOD_FAILURE_TEST \ && (0 != (tv_get_caps ((c)->info)->flags & TVENG_CAPS_CLIPPING))) static __inline__ tv_bool tv_window_equal (const tv_window * window1, const tv_window * window2) { return (0 == ((window1->x ^ window2->x) | (window1->y ^ window2->y) | (window1->width ^ window2->width) | (window1->height ^ window2->height))); } static void get_clips (const struct context * c, tv_clip_vector * vector) { if (!x11_window_clip_vector (vector, GDK_WINDOW_XDISPLAY (c->video_window->window), GDK_WINDOW_XID (c->video_window->window), c->overlay_rect.x, c->overlay_rect.y, c->overlay_rect.width, c->overlay_rect.height)) g_assert_not_reached (); /* XXX */ if (OVERLAY_DUMP_CLIPS) { tv_clip *clip; unsigned int i; clip = vector->vector; fprintf (stderr, "get_clips %u:\n", vector->size); for (i = 0; i < vector->size; ++i, ++clip) fprintf (stderr, "%3u: %3u, %3u - %3u, %3u\n", i, clip->x1, clip->y1, clip->x2, clip->y2); } } static void expose_window_clip_vector (const tv_window * window, const tv_clip_vector * clip_vector) { tv_clip *clip; guint count; clip = clip_vector->vector; count = clip_vector->size; while (count-- > 0) { x11_force_expose (window->x + clip->x1, window->y + clip->y1, (guint)(clip->x2 - clip->x1), (guint)(clip->y2 - clip->y1)); ++clip; } } static void expose_screen (struct context * c) { const tv_screen *s; c->clean_screen = FALSE; s = c->screen; x11_force_expose ((gint) s->x, (gint) s->y, s->width, s->height); } static gboolean select_screen (struct context * c) { const tv_screen *s; s = tv_screen_list_find (screens, c->mw_x + c->vw_x, c->mw_y + c->vw_y, (guint) c->vw_width, (guint) c->vw_height); if (NULL == s) { /* No pixel of the video_window on any screen. */ c->screen = NULL; c->visibility = GDK_VISIBILITY_FULLY_OBSCURED; return TRUE; } if (c->screen == s) return TRUE; /* Moved to another Xinerama screen. */ c->screen = s; return tv_set_overlay_buffer (c->info, x11_display_name (), s->screen_number, &s->target); } static gboolean obscured_timeout (gpointer user_data) { struct context *c = user_data; const tv_window *window; /* The window changed from fully or partially visible to fully obscured. */ g_assert (CLIP_OVERLAY == c->overlay_mode); if (OVERLAY_LOG_FP) fprintf (OVERLAY_LOG_FP, "obscured_timeout\n"); window = tv_cur_overlay_window (c->info); if (c->clean_screen) { expose_screen (c); } else { x11_force_expose (window->x, window->y, window->width, window->height); } tv_clip_vector_clear (&c->cur_vector); /* XXX error ignored */ tv_clip_vector_add_clip_xy (&c->cur_vector, /* x, y */ 0, 0, window->width, window->height); c->geometry_changed = TRUE; c->timeout_id = NO_SOURCE_ID; return FALSE; /* remove timeout */ } static gboolean visible_timeout (gpointer user_data) { struct context *c = user_data; /* The Window changed from fully or partially obscured to unobscured (cleaning the clip vector is not enough, we must still clip against the video_window bounds). Or from fully obscured or unobscured to partially obscured. Or the clip vector may have changed while the window is partially obscured. */ g_assert (CLIP_OVERLAY == c->overlay_mode); if (OVERLAY_LOG_FP) fprintf (OVERLAY_LOG_FP, "visible_timeout\n"); /* XXX error ignored */ get_clips (c, &c->tmp_vector); if (!tv_clip_vector_equal (&c->cur_vector, &c->tmp_vector)) { /* Delay until the situation stabilizes. */ if (OVERLAY_LOG_FP) fprintf (OVERLAY_LOG_FP, "visible_timeout: delay\n"); SWAP (c->cur_vector, c->tmp_vector); c->geometry_changed = TRUE; return TRUE; /* call again */ } SWAP (c->cur_vector, c->tmp_vector); /* Resume overlay. */ if (c->geometry_changed) { guint retry_count; c->geometry_changed = FALSE; if (OVERLAY_LOG_FP) fprintf (OVERLAY_LOG_FP, "visible_timeout: geometry change\n"); /* Other windows may have received expose events before we were able to turn off the overlay. Resend expose events for those regions which should be clean now. */ if (c->clean_screen) expose_screen (c); else expose_window_clip_vector (tv_cur_overlay_window (c->info), tv_cur_overlay_clipvec (c->info)); if (!select_screen (c)) goto finish; /* XXX */ /* Desired overlay bounds */ c->overlay_rect.x = c->mw_x + c->vw_x; c->overlay_rect.y = c->mw_y + c->vw_y; c->overlay_rect.width = c->vw_width; c->overlay_rect.height = c->vw_height; if (NULL == c->screen) { /* video_window is outside all screens. */ goto finish; } retry_count = 5; for (;;) { tv_window swin; const tv_screen *s; const tv_window *w; unsigned int old_size; if (0 == retry_count--) goto finish; /* XXX */ s = c->screen; swin = c->overlay_rect; swin.x -= s->x; swin.y -= s->y; w = tv_set_overlay_window_clipvec (c->info, &swin, &c->cur_vector); if (NULL == w) goto finish; /* XXX */ if (tv_window_equal (&swin, w)) break; /* The driver modified the overlay bounds (alignment, limits), we must update the clips. */ old_size = c->cur_vector.size; c->overlay_rect = *w; c->overlay_rect.x += s->x; c->overlay_rect.y += s->y; /* XXX error ignored */ get_clips (c, &c->cur_vector); if (0 == (old_size | c->cur_vector.size)) break; } } else if (c->clean_screen) { expose_screen (c); } /* XXX error ignored */ tv_enable_overlay (c->info, TRUE); finish: c->timeout_id = NO_SOURCE_ID; return FALSE; /* remove timeout */ } static void stop_timeout (struct context * c) { if (c->timeout_id > 0) g_source_remove (c->timeout_id); c->timeout_id = NO_SOURCE_ID; } static void restart_timeout (struct context * c) { g_assert (CLIP_OVERLAY == c->overlay_mode); if (OVERLAY_LOG_FP) fprintf (OVERLAY_LOG_FP, "restart_timeout\n"); tv_enable_overlay (c->info, FALSE); stop_timeout (c); if (GDK_VISIBILITY_FULLY_OBSCURED == c->visibility) { c->timeout_id = g_timeout_add (CLEAR_TIMEOUT, (GSourceFunc) obscured_timeout, c); } else { c->timeout_id = g_timeout_add (CLEAR_TIMEOUT, (GSourceFunc) visible_timeout, c); } } static unsigned int chroma_key_rgb (GdkColor * color) { return ((color->red >> 8) | (color->green & 0xFF00) | ((color->blue & 0xFF00) << 8)); } static gboolean reconfigure (struct context * c) { switch (c->overlay_mode) { unsigned int rgb; tv_window swin; case CLIP_OVERLAY: c->geometry_changed = TRUE; c->clean_screen = TRUE; /* see root_filter() */ if (GDK_VISIBILITY_FULLY_OBSCURED != c->visibility) restart_timeout (c); break; case CHROMA_KEY_OVERLAY: /* Implied by tv_set_overlay_window_chromakey(): tv_enable_overlay (c->info, FALSE); */ /* Restore background color (chroma key). XXX the X server should do this automatically, did we we disabled that somewhere to avoid flicker in capture overlay_mode? */ gdk_window_clear_area (c->video_window->window, /* x, y */ 0, 0, c->vw_width, c->vw_height); if (!select_screen (c)) return FALSE; c->overlay_rect.x = c->mw_x + c->vw_x; c->overlay_rect.y = c->mw_y + c->vw_y; c->overlay_rect.width = c->vw_width; c->overlay_rect.height = c->vw_height; if (0) fprintf (stderr, "reconfigure overlay_rect: %ux%u%+d%+d\n", c->overlay_rect.width, c->overlay_rect.height, c->overlay_rect.x, c->overlay_rect.y); if (NULL == c->screen) { /* video_window is outside all screens. */ tv_enable_overlay (c->info, FALSE); return TRUE; } c->visibility = GDK_VISIBILITY_PARTIAL; /* or full */ if (OVERLAY_CHROMA_TEST) { /* Show me the chroma key color. */ c->overlay_rect.width /= 2; } swin = c->overlay_rect; swin.x -= c->screen->x; swin.y -= c->screen->y; rgb = chroma_key_rgb (&c->chroma_key_color); if (NULL == tv_set_overlay_window_chromakey (c->info, &swin, rgb)) return FALSE; if (!tv_enable_overlay (c->info, TRUE)) return FALSE; break; case XVIDEO_OVERLAY: /* XVideo overlay is automatically positioned relative to the video_window origin, we only have to adjust the overlay size. */ tv_enable_overlay (c->info, FALSE); if (c->colormap) { /* Restore background color (chroma key). */ gdk_window_clear_area (c->video_window->window, /* x, y */ 0, 0, c->vw_width, c->vw_height); } /* XXX set overlay rectangle here, currently the XVideo interface fills the entire window when overlay is enabled. */ /* XXX off/on is inefficient, XVideo drivers do that automatically. */ if (!tv_enable_overlay (c->info, TRUE)) return FALSE; break; } return TRUE; } static gboolean on_video_window_event (GtkWidget * widget, GdkEvent * event, gpointer user_data) { struct context *c = user_data; g_assert (widget == c->video_window); if (OVERLAY_EVENT_LOG_FP) fprintf (OVERLAY_EVENT_LOG_FP, "on_video_window_event: GDK_%s\n", z_gdk_event_name (event)); switch (event->type) { case GDK_CONFIGURE: /* Size, position, stacking order changed. Note position is relative to the parent window. */ if (c->vw_width != (guint) event->configure.width || c->vw_height != (guint) event->configure.height || c->vw_x != (gint) event->configure.x || c->vw_y != (gint) event->configure.y) { /* XXX really mw relative? */ c->vw_x = event->configure.x; c->vw_y = event->configure.y; c->vw_width = event->configure.width; c->vw_height = event->configure.height; /* XXX error ignored. */ reconfigure (c); } break; case GDK_VISIBILITY_NOTIFY: /* Visibility state changed: obscured, partially or fully visible. */ if (CLIP_OVERLAY == c->overlay_mode) { c->visibility = event->visibility.state; restart_timeout (c); } break; case GDK_EXPOSE: /* Parts of the video window have been exposed, e.g. menu window has been closed. Remove those clips. */ if (OVERLAY_EVENT_LOG_FP) fprintf (OVERLAY_EVENT_LOG_FP, "Expose rect %d,%d - %d,%d\n", event->expose.area.x, event->expose.area.y, event->expose.area.x + event->expose.area.width - 1, event->expose.area.y + event->expose.area.height - 1); if (CLIP_OVERLAY == c->overlay_mode) { c->geometry_changed = TRUE; restart_timeout (c); } break; default: break; } return FALSE; /* pass on */ } static gboolean on_main_window_event (GtkWidget * widget, GdkEvent * event, gpointer user_data) { struct context *c = user_data; g_assert (widget == c->main_window); if (OVERLAY_EVENT_LOG_FP) fprintf (OVERLAY_EVENT_LOG_FP, "on_main_window_event: GDK_%s\n", z_gdk_event_name (event)); switch (event->type) { case GDK_CONFIGURE: /* Size, position, stacking order changed. Note position is relative to the parent window. */ switch (c->overlay_mode) { case CLIP_OVERLAY: case CHROMA_KEY_OVERLAY: if (c->mw_x != event->configure.x || c->mw_y != event->configure.y) { /* XXX really root relative? */ c->mw_x = event->configure.x; c->mw_y = event->configure.y; /* XXX error ignored. */ reconfigure (c); } break; case XVIDEO_OVERLAY: g_assert_not_reached (); } break; case GDK_UNMAP: /* Window was rolled up or minimized. No visibility events are sent in this case. */ if (CLIP_OVERLAY == c->overlay_mode) { c->visibility = GDK_VISIBILITY_FULLY_OBSCURED; restart_timeout (c); } break; default: break; } return FALSE; /* pass on */ } static GdkFilterReturn root_filter (GdkXEvent * gdkxevent, GdkEvent * gdkevent, gpointer user_data) { struct context *c = user_data; XEvent *event = (XEvent *) gdkxevent; gdkevent = gdkevent; if (OVERLAY_EVENT_LOG_FP) { const gchar *s; switch (event->type) { #define CASE(event) case event: s = #event; break; CASE (KeyPress) CASE (KeyRelease) CASE (ButtonPress) CASE (ButtonRelease) CASE (MotionNotify) CASE (EnterNotify) CASE (LeaveNotify) CASE (FocusIn) CASE (FocusOut) CASE (KeymapNotify) CASE (Expose) CASE (GraphicsExpose) CASE (NoExpose) CASE (VisibilityNotify) CASE (CreateNotify) CASE (DestroyNotify) CASE (UnmapNotify) CASE (MapNotify) CASE (MapRequest) CASE (ReparentNotify) CASE (ConfigureNotify) CASE (ConfigureRequest) CASE (GravityNotify) CASE (ResizeRequest) CASE (CirculateNotify) CASE (CirculateRequest) CASE (PropertyNotify) CASE (SelectionClear) CASE (SelectionRequest) CASE (SelectionNotify) CASE (ColormapNotify) CASE (ClientMessage) CASE (MappingNotify) #undef CASE default: s = "Unknown"; break; } fprintf (OVERLAY_EVENT_LOG_FP, "root_filter: %s\n", s); } if (c->visibility != GDK_VISIBILITY_PARTIAL) return GDK_FILTER_CONTINUE; switch (event->type) { case ConfigureNotify: { /* We could just refresh regions we previously DMAed, but unfortunately it's possible to move a destroyed window away before we did. What's worse, imperfect refresh or unconditionally refreshing the entire screen? */ if (TRUE) { c->clean_screen = TRUE; } else { XConfigureEvent *ev; const tv_window *win; int evx2, evy2; int wx2, wy2; ev = &event->xconfigure; win = tv_cur_overlay_window (c->info); evx2 = ev->x + ev->width; evy2 = ev->y + ev->height; wx2 = win->x + win->width; wy2 = win->y + win->height; if ((int)(ev->x - ev->border_width) >= wx2 || (int)(evx2 + ev->border_width) <= (int) win->x || (int)(ev->y - ev->border_width) >= wy2 || (int)(evy2 + ev->border_width) <= (int) win->y) { /* Windows do not overlap. */ break; } } restart_timeout (c); break; } default: break; } return GDK_FILTER_CONTINUE; } /* The osd pieces have changed, avoid flicker if not needed. */ static void on_osd_model_changed (ZModel * osd_model, gpointer user_data) { struct context *c = user_data; osd_model = osd_model; if (CLIP_OVERLAY == c->overlay_mode && GDK_VISIBILITY_FULLY_OBSCURED != c->visibility) { c->visibility = GDK_VISIBILITY_PARTIAL; restart_timeout (c); } } static void terminate (struct context * c) { stop_timeout (c); tv_enable_overlay (c->info, FALSE); if (CLIP_OVERLAY == c->overlay_mode) { usleep (CLEAR_TIMEOUT * 1000); if (c->clean_screen) expose_screen (c); else expose_window_clip_vector (tv_cur_overlay_window (c->info), tv_cur_overlay_clipvec (c->info)); } } static gboolean on_main_window_delete_event (GtkWidget * widget, GdkEvent * event, gpointer user_data) { struct context *c = user_data; widget = widget; event = event; terminate (c); return FALSE; /* pass on */ } typedef gboolean event_function (GtkWidget * widget, GdkEvent * event, gpointer user_data); static void event_signal_disconnect (struct context * c, GtkWidget * widget, event_function * callback, GdkEventMask old_events) { if (NULL != callback) g_signal_handlers_disconnect_matched (G_OBJECT (widget), (G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA), /* signal_id */ 0, /* detail */ 0, /* closure */ NULL, G_CALLBACK (callback), /* user_data */ c); gdk_window_set_events (widget->window, old_events); } void stop_overlay (void) { struct context *c = &tv_info; g_assert (c->main_window != NULL); g_signal_handlers_disconnect_matched (G_OBJECT (zapping), (G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA), /* signal_id */ 0, /* detail */ 0, /* closure */ NULL, G_CALLBACK (on_main_window_delete_event), /* user_data */ c); switch (c->overlay_mode) { case CLIP_OVERLAY: gdk_window_set_events (c->root_window, c->old_root_events); gdk_window_remove_filter (c->root_window, root_filter, /* user_data */ c); g_signal_handlers_disconnect_matched (G_OBJECT (osd_model), (G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA), /* signal_id */ 0, /* detail */ 0, /* closure */ NULL, G_CALLBACK (on_osd_model_changed), /* user_data */ c); event_signal_disconnect (c, c->main_window, on_main_window_event, c->old_main_events); event_signal_disconnect (c, c->video_window, on_video_window_event, c->old_video_events); break; case CHROMA_KEY_OVERLAY: event_signal_disconnect (c, c->main_window, on_main_window_event, c->old_main_events); /* fall through */ case XVIDEO_OVERLAY: event_signal_disconnect (c, c->video_window, on_video_window_event, c->old_video_events); if (0 != c->chroma_key_color_cnxn_id) z_gconf_notify_remove (c->chroma_key_color_cnxn_id); break; } terminate (c); if (c->colormap) { gdk_colormap_free_colors (c->colormap, &c->chroma_key_color, 1); g_object_unref (G_OBJECT (c->colormap)); c->colormap = NULL; z_set_window_bg_black (c->video_window); } tv_clip_vector_destroy (&c->tmp_vector); tv_clip_vector_destroy (&c->cur_vector); tv_set_capture_mode (c->info, CAPTURE_MODE_NONE); /* XXX no const limit please */ z_video_set_max_size (Z_VIDEO (c->video_window), 16384, 16384); CLEAR (*c); } static gboolean chroma_key_color_from_config (GdkColor * color) { /* Factory default if the config is inaccessible or the string is malformed. */ color->pixel = 0; color->red = 0xFFFF; color->green = 0xCCCC; color->blue = 0xCCCC; /* XXX error message please. */ return z_gconf_get_color (color, "/apps/zapping/window/chroma_key_color"); } static GdkColor * set_window_bg_black (struct context * c) { z_set_window_bg_black (c->video_window); CLEAR (c->chroma_key_color); return &c->chroma_key_color; } static GdkColor * set_window_bg_from_config (struct context * c) { GdkColor color; if (!DEVICE_SUPPORTS_CHROMA_KEYING (c)) return set_window_bg_black (c); if (c->colormap) { gdk_colormap_free_colors (c->colormap, &c->chroma_key_color, 1); } else { c->colormap = gdk_colormap_get_system (); } /* Error ignored, will continue with default. */ chroma_key_color_from_config (&color); c->chroma_key_color = color; if (!OVERLAY_COLORMAP_FAILURE_TEST && gdk_colormap_alloc_color (c->colormap, &c->chroma_key_color, /* writable */ FALSE, /* or_best_match */ TRUE)) { /* Note gdk_colormap_alloc_color() may change c->chroma_key_color. */ z_set_window_bg (c->video_window, &c->chroma_key_color); return &c->chroma_key_color; } else { g_object_unref (G_OBJECT (c->colormap)); c->colormap = NULL; z_show_non_modal_message_dialog (GTK_WINDOW (zapping), GTK_MESSAGE_ERROR, _("No chroma-key color"), _("Color #%2X%2X%2X is not available for chroma-keying. " "Try another color.\n"), color.red >> 8, color.green >> 8, color.blue >> 8); return set_window_bg_black (c); } } static void chroma_key_color_changed (GConfClient * client, guint cnxn_id, GConfEntry * entry, gpointer user_data) { struct context *c = user_data; client = client; entry = entry; c->chroma_key_color_cnxn_id = cnxn_id; set_window_bg_from_config (c); } static GdkColor * watch_config_chroma_key_color (struct context * c) { if (!DEVICE_SUPPORTS_CHROMA_KEYING (c)) return set_window_bg_black (c); /* Calls chroma_key_color_notify on success. */ if (z_gconf_notify_add ("/apps/zapping/window/chroma_key_color", chroma_key_color_changed, /* user_data */ c)) return &c->chroma_key_color; /* Too bad. Let's the window background once and continue. */ return set_window_bg_from_config (c); } static GdkEventMask event_signal_connect (struct context * c, GtkWidget * widget, event_function * callback, GdkEventMask new_events) { GdkEventMask old_events; if (NULL != callback) g_signal_connect (G_OBJECT (widget), "event", G_CALLBACK (callback), /* user_data */ c); old_events = gdk_window_get_events (widget->window); gdk_window_set_events (widget->window, old_events | new_events); return old_events; } gboolean start_overlay (GtkWidget * main_window, GtkWidget * video_window) { struct context *c = &tv_info; const struct tveng_caps *caps; Window xwindow; gint width; gint height; CLEAR (*c); c->info = zapping->info; c->root_window = gdk_get_default_root_window (); c->main_window = main_window; c->video_window = video_window; gdk_window_get_origin (c->main_window->window, &c->mw_x, &c->mw_y); gdk_window_get_geometry (c->video_window->window, &c->vw_x, &c->vw_y, &width, &height, /* depth */ NULL); c->vw_width = width; c->vw_height = height; c->visibility = GDK_VISIBILITY_PARTIAL; /* assume worst */ c->geometry_changed = TRUE; /* restart overlay */ c->timeout_id = NO_SOURCE_ID; /* Make sure we use an XVideo adaptor which can render into da->window. (Doesn't matter with X.org but it's the right thing to do.) */ xwindow = GDK_WINDOW_XWINDOW (c->video_window->window); /* Switch to overlay mode, XVideo or other. */ if (-1 == tveng_attach_device (zcg_char (NULL, "video_device"), xwindow, TVENG_ATTACH_XV, c->info)) { z_show_non_modal_message_dialog (GTK_WINDOW (zapping), GTK_MESSAGE_ERROR, _("Cannot switch to overlay mode"), "%s", tv_get_errstr (c->info)); goto failure; } /* Switch to selected video input, RF channel on new device. */ zconf_get_sources (c->info, /* mute */ FALSE); if (OVERLAY_CHROMA_TEST) { c->overlay_mode = CHROMA_KEY_OVERLAY; } else if (DEVICE_USES_XVIDEO (c)) { c->overlay_mode = XVIDEO_OVERLAY; } else if (DEVICE_SUPPORTS_CHROMA_KEYING (c)) { c->overlay_mode = CHROMA_KEY_OVERLAY; } else if (DEVICE_SUPPORTS_CLIPPING (c)) { c->overlay_mode = CLIP_OVERLAY; } else { z_show_non_modal_message_dialog (GTK_WINDOW (zapping), GTK_MESSAGE_ERROR, _("Cannot overlay with this device"), "Device does not support clipping or chroma-keying."); /* XXX Perhaps the driver supports another kind of overlay? */ goto failure; } switch (c->overlay_mode) { GC xgc; GdkColor *color; unsigned int rgb; case XVIDEO_OVERLAY: /* XXX no const limit please, ask the driver instead. */ z_video_set_max_size (Z_VIDEO (video_window), 768, 576); xwindow = GDK_WINDOW_XWINDOW (c->video_window->window); xgc = GDK_GC_XGC (c->video_window->style->white_gc); color = watch_config_chroma_key_color (c); rgb = chroma_key_rgb (color); if (!tv_set_overlay_xwindow (c->info, xwindow, xgc, rgb)) goto failure; /* Disable double buffering just in case, will help when a XV driver doesn't provide XV_COLORKEY but requires the colorkey not to be overwritten */ gtk_widget_set_double_buffered (c->video_window, FALSE); /* Update on video_window size change. */ c->old_video_events = event_signal_connect (c, c->video_window, on_video_window_event, GDK_CONFIGURE); /* Start overlay, XXX error ignored. */ reconfigure (c); break; case CHROMA_KEY_OVERLAY: if (!select_screen (c)) goto failure; /* After select_screen() because the limits may depend on the overlay buffer size. FIXME they may also depend on the (then) current video standard. */ caps = tv_get_caps (c->info); z_video_set_max_size (Z_VIDEO (video_window), caps->maxwidth, caps->maxheight); watch_config_chroma_key_color (c); /* Update overlay on video_window size and position change. We must connect to main_window as well because the video_window GDK_CONFIGURE event notifies only about main_window, not root_window relative position changes. */ c->old_video_events = event_signal_connect (c, c->video_window, on_video_window_event, GDK_CONFIGURE); c->old_main_events = event_signal_connect (c, c->main_window, on_main_window_event, GDK_CONFIGURE); /* Start overlay, XXX error ignored. */ reconfigure (c); break; case CLIP_OVERLAY: if (!select_screen (c)) goto failure; caps = tv_get_caps (c->info); z_video_set_max_size (Z_VIDEO (video_window), caps->maxwidth, caps->maxheight); g_signal_connect (G_OBJECT (osd_model), "changed", G_CALLBACK (on_osd_model_changed), /* user_data */ c); c->old_video_events = event_signal_connect (c, c->video_window, on_video_window_event, (GDK_VISIBILITY_NOTIFY_MASK | GDK_CONFIGURE | GDK_EXPOSE)); /* We must connect to main_window as well because the video_window GDK_CONFIGURE event notifies only about main_window, not root_window relative position changes. GDK_UNMAP, but no visibility event, is sent after the window was rolled up or minimized. */ c->old_main_events = event_signal_connect (c, c->main_window, on_main_window_event, (GDK_UNMAP | GDK_CONFIGURE)); /* There is no GDK_OBSCURED event, we must monitor all child windows of the root window. E.g. drop-down menus. */ gdk_window_add_filter (c->root_window, root_filter, /* user_data */ c); c->old_root_events = gdk_window_get_events (c->root_window); gdk_window_set_events (c->root_window, (c->old_root_events | GDK_STRUCTURE_MASK | GDK_SUBSTRUCTURE_MASK)); /* Start overlay. */ restart_timeout (c); break; } g_signal_connect (G_OBJECT (zapping), "delete-event", G_CALLBACK (on_main_window_delete_event), /* user_data */ c); zapping->display_mode = DISPLAY_MODE_WINDOW; zapping->display_window = video_window; tv_set_capture_mode (c->info, CAPTURE_MODE_OVERLAY); return TRUE; failure: return FALSE; } ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������zapping-0.10cvs6/src/overlay.h���������������������������������������������������������������������� 644 � 764 � 144 � 1745 10371711036 11434� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Zapping (TV viewer for the Gnome Desktop) * Copyright (C) 2000-2001 Iaki Garca Etxebarria * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifndef __OVERLAY_H__ #define __OVERLAY_H__ extern void stop_overlay (void); extern gboolean start_overlay (GtkWidget * main_window, GtkWidget * video_window); #endif /* overlay.h */ ���������������������������zapping-0.10cvs6/src/tvengbktr.c�������������������������������������������������������������������� 644 � 764 � 144 � 145653 10441130140 12010� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Zapping (TV viewer for the Gnome Desktop) * Copyright (C) 2000 Iaki Garca Etxebarria * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include "site_def.h" #ifdef HAVE_CONFIG_H # include "config.h" #endif #ifdef ENABLE_BKTR #include <sys/time.h> /* struct timeval, gettimeofday() */ #include <signal.h> #include <math.h> #include <assert.h> #include "tvengbktr.h" #include "zmisc.h" #include "tveng_private.h" #include "common/fifo.h" #include "common/ioctl_meteor.h" #include "common/ioctl_bt848.h" #include "common/_bktr.h" struct private_tvengbktr_device_info { tveng_device_info info; /* Info field, inherited */ tv_bool bktr_driver; int tuner_fd; tv_control * mute_control; tv_video_standard * pal_standard; /* Maps tv_pixfmt to METEORSACTPIXFMT index, -1 if none. */ int pixfmt_lut[TV_MAX_PIXFMTS]; unsigned int overlay_bits_per_pixel; tv_bool overlay_ready; tv_bool overlay_active; tv_bool capture_ready; tv_bool capture_active; /* mmap()ed image buffer. */ char * mmapped_data; double capture_time; double frame_period_near; double frame_period_far; double last_timestamp; }; #define P_INFO(p) PARENT (p, struct private_tvengbktr_device_info, info) /* This macro checks at compile time if the arg type is correct, device_ioctl() repeats the ioctl if interrupted (EINTR) and logs the args and result if log_fp is non-zero. When the ioctl failed ioctl_failure() stores the cmd, caller and errno in info. */ #define bktr_ioctl(info, cmd, arg) \ (IOCTL_ARG_TYPE_CHECK_ ## cmd (arg), \ ((0 == device_ioctl ((info)->log_fp, fprint_ioctl_arg, \ (info)->fd, cmd, (void *)(arg))) ? \ 0 : (ioctl_failure (info, __FILE__, __PRETTY_FUNCTION__, \ __LINE__, # cmd), -1))) #define bktr_ioctl_may_fail(info, cmd, arg) \ (IOCTL_ARG_TYPE_CHECK_ ## cmd (arg), \ device_ioctl ((info)->log_fp, fprint_ioctl_arg, \ (info)->fd, cmd, (void *)(arg))) #define tuner_ioctl(info, cmd, arg) \ (IOCTL_ARG_TYPE_CHECK_ ## cmd (arg), \ ((0 == device_ioctl ((info)->log_fp, fprint_ioctl_arg, \ P_INFO (info)->tuner_fd, cmd, \ (void *)(arg))) ? \ 0 : (ioctl_failure (info, __FILE__, __PRETTY_FUNCTION__, \ __LINE__, # cmd), -1))) /* Private control IDs. */ typedef enum { CONTROL_BRIGHTNESS = (1 << 0), CONTROL_CONTRAST = (1 << 1), CONTROL_UV_SATURATION = (1 << 2), CONTROL_U_SATURATION = (1 << 3), CONTROL_V_SATURATION = (1 << 4), CONTROL_UV_GAIN = (1 << 5), CONTROL_HUE = (1 << 6), CONTROL_MUTE = (1 << 7), } control_id; struct control { tv_control pub; control_id id; }; #define C(l) PARENT (l, struct control, pub) struct standard { tv_video_standard pub; unsigned long fmt; }; #define S(l) PARENT (l, struct standard, pub) struct video_input { tv_video_line pub; unsigned long dev; }; #define VI(l) PARENT (l, struct video_input, pub) struct audio_input { tv_audio_line pub; int dev; }; #define AI(l) PARENT (l, struct audio_input, pub) static const struct meteor_video no_video; static const struct _bktr_clip no_clips; static const int cap_stop_cont = METEOR_CAP_STOP_CONT; static const int cap_continuous = METEOR_CAP_CONTINOUS; /* NB METEOR_SIG_MODE_MASK must be < 0 but is defined as uint32. */ static const int signal_usr1 = SIGUSR1; static const int signal_none = ~0xFFFF; /* METEOR_SIG_MODE_MASK */ static tv_bool set_capture_format (tveng_device_info * info, const tv_image_format *fmt); /* Controls */ static tv_bool do_get_control (struct private_tvengbktr_device_info * p_info, struct control * c) { signed char sc; unsigned char uc; int value; int cmd; int r; cmd = 0; if (p_info->bktr_driver) { switch (c->id) { case CONTROL_BRIGHTNESS: r = tuner_ioctl (&p_info->info, BT848_GBRIG, &value); break; case CONTROL_CONTRAST: r = tuner_ioctl (&p_info->info, BT848_GCONT, &value); break; case CONTROL_UV_SATURATION: r = tuner_ioctl (&p_info->info, BT848_GCSAT, &value); break; case CONTROL_U_SATURATION: r = tuner_ioctl (&p_info->info, BT848_GUSAT, &value); break; case CONTROL_V_SATURATION: r = tuner_ioctl (&p_info->info, BT848_GVSAT, &value); break; case CONTROL_HUE: r = tuner_ioctl (&p_info->info, BT848_GHUE, &value); break; case CONTROL_MUTE: r = tuner_ioctl (&p_info->info, BT848_GAUDIO, &value); value = !!(value & 0x80 /* mute flag */); break; default: t_warn ("Invalid c->id 0x%x\n", c->id); p_info->info.tveng_errno = -1; /* unknown */ return FALSE; } } else { switch (c->id) { case CONTROL_BRIGHTNESS: r = bktr_ioctl (&p_info->info, METEORGBRIG, &uc); value = uc; break; case CONTROL_CONTRAST: r = bktr_ioctl (&p_info->info, METEORGCONT, &uc); value = uc; break; case CONTROL_UV_SATURATION: r = bktr_ioctl (&p_info->info, METEORGCSAT, &uc); value = uc; break; case CONTROL_UV_GAIN: r = bktr_ioctl (&p_info->info, METEORGCHCV, &uc); value = uc; break; case CONTROL_HUE: r = bktr_ioctl (&p_info->info, METEORGHUE, &sc); value = sc; break; default: t_warn ("Invalid c->id 0x%x\n", c->id); p_info->info.tveng_errno = -1; /* unknown */ return FALSE; } } if (-1 == r) return FALSE; if (c->pub.value != value) { c->pub.value = value; tv_callback_notify (NULL, &c->pub, c->pub._callback); } return TRUE; } static tv_bool get_control (tveng_device_info * info, tv_control * c) { struct private_tvengbktr_device_info *p_info = P_INFO (info); if (c) return do_get_control (p_info, C(c)); for_all (c, p_info->info.panel.controls) if (c->_parent == info) if (!do_get_control (p_info, C(c))) return FALSE; return TRUE; } static int set_mute (struct private_tvengbktr_device_info *p_info, int value) { value = value ? AUDIO_MUTE : AUDIO_UNMUTE; return tuner_ioctl (&p_info->info, BT848_SAUDIO, &value); } static tv_bool set_control (tveng_device_info * info, tv_control * c, int value) { struct private_tvengbktr_device_info *p_info = P_INFO (info); signed char sc; unsigned char uc; int r; if (p_info->bktr_driver) { /* Range of the bt848 controls is defined by BT848_.*(MIN|MAX|CENTER|RANGE) floats in some technical units and BT848_.*(REGMIN|REGMAX|STEPS) ints for the hardware. The ioctls naturally take the latter values. Only /dev/tuner understands these ioctls, not /dev/bktr. */ switch (C(c)->id) { case CONTROL_BRIGHTNESS: r = tuner_ioctl (&p_info->info, BT848_SBRIG, &value); break; case CONTROL_CONTRAST: r = tuner_ioctl (&p_info->info, BT848_SCONT, &value); break; case CONTROL_UV_SATURATION: r = tuner_ioctl (&p_info->info, BT848_SCSAT, &value); break; case CONTROL_U_SATURATION: r = tuner_ioctl (&p_info->info, BT848_SUSAT, &value); break; case CONTROL_V_SATURATION: r = tuner_ioctl (&p_info->info, BT848_SVSAT, &value); break; case CONTROL_HUE: r = tuner_ioctl (&p_info->info, BT848_SHUE, &value); break; case CONTROL_MUTE: r = set_mute (p_info, value); break; default: t_warn ("Invalid c->id 0x%x\n", C(c)->id); p_info->info.tveng_errno = -1; /* unknown */ return FALSE; } } else { switch (C(c)->id) { case CONTROL_BRIGHTNESS: uc = value; /* range 0 ... 255 */ r = bktr_ioctl (&p_info->info, METEORSBRIG, &uc); break; case CONTROL_CONTRAST: uc = value; r = bktr_ioctl (&p_info->info, METEORSCONT, &uc); break; case CONTROL_UV_SATURATION: uc = value; r = bktr_ioctl (&p_info->info, METEORSCSAT, &uc); break; case CONTROL_UV_GAIN: uc = value; r = bktr_ioctl (&p_info->info, METEORSCHCV, &uc); break; case CONTROL_HUE: sc = value; /* range -128 ... +127 */ r = bktr_ioctl (&p_info->info, METEORSHUE, &sc); break; default: t_warn ("Invalid c->id 0x%x\n", C(c)->id); p_info->info.tveng_errno = -1; /* unknown */ return FALSE; } } if (-1 == r) return FALSE; if (c->value != value) { c->value = value; tv_callback_notify (NULL, &c, c->_callback); } return TRUE; } struct control_map { control_id priv_id; const char * label; tv_control_id tc_id; tv_control_type type; int minimum; int maximum; int reset; }; #define CONTROL_MAP_END { 0, NULL, 0, 0, 0, 0 } static const struct control_map meteor_controls [] = { { CONTROL_BRIGHTNESS, N_("Brightness"), TV_CONTROL_ID_BRIGHTNESS, TV_CONTROL_TYPE_INTEGER, 0, 255, 128 }, { CONTROL_CONTRAST, N_("Contrast"), TV_CONTROL_ID_CONTRAST, TV_CONTROL_TYPE_INTEGER, 0, 255, 128 }, { CONTROL_UV_SATURATION, N_("Saturation"), TV_CONTROL_ID_SATURATION, TV_CONTROL_TYPE_INTEGER, 0, 255, 128 }, #if 0 { CONTROL_UV_GAIN, N_("U/V Gain"), TV_CONTROL_ID_UNKNOWN, TV_CONTROL_TYPE_INTEGER, 0, 255, 128 }, #endif { CONTROL_HUE, N_("Hue"), TV_CONTROL_ID_HUE, TV_CONTROL_TYPE_INTEGER, -128, 127, 0 }, CONTROL_MAP_END }; static const struct control_map bktr_controls [] = { { CONTROL_BRIGHTNESS, N_("Brightness"), TV_CONTROL_ID_BRIGHTNESS, TV_CONTROL_TYPE_INTEGER, -128, 127, 0 }, { CONTROL_CONTRAST, N_("Contrast"), TV_CONTROL_ID_CONTRAST, TV_CONTROL_TYPE_INTEGER, 0, 511, 216 }, { CONTROL_UV_SATURATION, N_("Saturation"), TV_CONTROL_ID_SATURATION, TV_CONTROL_TYPE_INTEGER, 0, 511, 216 }, #if 0 { CONTROL_U_SATURATION, N_("U Saturation"), TV_CONTROL_ID_UNKNOWN, TV_CONTROL_TYPE_INTEGER, 0, 511, 256 }, { CONTROL_V_SATURATION, N_("V Saturation"), TV_CONTROL_ID_UNKNOWN, TV_CONTROL_TYPE_INTEGER, 0, 511, 180 }, #endif { CONTROL_HUE, N_("Hue"), TV_CONTROL_ID_HUE, TV_CONTROL_TYPE_INTEGER, -128, 127, 0 }, { CONTROL_MUTE, N_("Mute"), TV_CONTROL_ID_MUTE, TV_CONTROL_TYPE_BOOLEAN, 0, 1, 1 }, CONTROL_MAP_END }; static tv_bool get_control_list (tveng_device_info * info) { struct private_tvengbktr_device_info *p_info = P_INFO (info); const struct control_map *table; struct control *c; tv_control *tc; if (p_info->bktr_driver) table = bktr_controls; else table = meteor_controls; for (; 0 != table->priv_id; ++table) { if (!(c = calloc (1, sizeof (*c)))) return FALSE; c->id = table->priv_id; c->pub.type = table->type; c->pub.id = table->tc_id; if (!(c->pub.label = strdup (_(table->label)))) goto failure; c->pub.minimum = table->minimum; c->pub.maximum = table->maximum; c->pub.step = 1; c->pub.reset = table->reset; if (!(tc = append_panel_control (info, &c->pub, 0))) { failure: tv_control_delete (&c->pub); return FALSE; } do_get_control (p_info, C(tc)); if (CONTROL_MUTE == table->priv_id) p_info->mute_control = &c->pub; } return TRUE; } /* Video standards */ static tv_bool get_video_standard (tveng_device_info * info) { tv_video_standard *s; s = NULL; /* unknown */ if (info->panel.video_standards) { unsigned long fmt; if (P_INFO (info)->bktr_driver) { if (-1 == bktr_ioctl (info, BT848GFMT, &fmt)) return FALSE; } else { if (-1 == bktr_ioctl (info, METEORGFMT, &fmt)) return FALSE; } for (s = info->panel.video_standards; s; s = s->_next) if (S(s)->fmt == fmt) break; } store_cur_video_standard (info, s); return TRUE; } static tv_bool set_video_standard (tveng_device_info * info, tv_video_standard * s) { struct private_tvengbktr_device_info *p_info = P_INFO (info); int r; if (CAPTURE_MODE_TELETEXT != info->capture_mode) if (p_info->overlay_active | p_info->capture_active) return FALSE; if (p_info->bktr_driver) { r = bktr_ioctl (info, BT848SFMT, &S(s)->fmt); } else { r = bktr_ioctl (info, METEORSFMT, &S(s)->fmt); } if (0 == r) { store_cur_video_standard (info, s); return TRUE; } else { return FALSE; } } struct standard_map { unsigned int fmt; const char * label; tv_videostd_set videostd_set; }; #define STANDARD_MAP_END { 0, NULL, 0 } static const struct standard_map meteor_standards [] = { /* XXX should investigate what exactly these videostandards are. */ { METEOR_FMT_PAL, "PAL", TV_VIDEOSTD_SET_PAL }, { METEOR_FMT_NTSC, "NTSC", TV_VIDEOSTD_SET_NTSC }, { METEOR_FMT_SECAM, "SECAM", TV_VIDEOSTD_SET_SECAM }, STANDARD_MAP_END }; static const struct standard_map bktr_standards [] = { { BT848_IFORM_F_PALBDGHI, "PAL", TV_VIDEOSTD_SET_PAL }, { BT848_IFORM_F_NTSCM, "NTSC", TV_VIDEOSTD_SET (TV_VIDEOSTD_NTSC_M) }, { BT848_IFORM_F_SECAM, "SECAM", TV_VIDEOSTD_SET_SECAM }, { BT848_IFORM_F_PALM, "PAL-M", TV_VIDEOSTD_SET (TV_VIDEOSTD_PAL_M) }, { BT848_IFORM_F_PALN, "PAL-N", TV_VIDEOSTD_SET (TV_VIDEOSTD_PAL_N) }, { BT848_IFORM_F_NTSCJ, "NTSC-JP", TV_VIDEOSTD_SET (TV_VIDEOSTD_NTSC_M_JP) }, #if 0 { BT848_IFORM_F_AUTO, "AUTO", TV_VIDEOSTD_SET_UNKNOWN }, { BT848_IFORM_F_RSVD, "RSVD", TV_VIDEOSTD_SET_UNKNOWN }, #endif STANDARD_MAP_END }; static tv_bool get_standard_list (tveng_device_info * info) { const struct standard_map *table; if (info->panel.video_standards) return TRUE; /* invariable */ if (P_INFO (info)->bktr_driver) table = bktr_standards; else table = meteor_standards; for (; table->label; ++table) { struct standard *s; if (!(s = S(append_video_standard (&info->panel.video_standards, table->videostd_set, table->label, table->label, sizeof (*s))))) { free_video_standard_list (&info->panel.video_standards); P_INFO (info)->pal_standard = NULL; return FALSE; } s->fmt = table->fmt; if (TV_VIDEOSTD_SET_PAL == table->videostd_set) P_INFO (info)->pal_standard = &s->pub; } return get_video_standard (info); } /* Video inputs */ /* Note the bktr interface has the ioctls TVTUNER_(GET|SET)TYPE (unsigned int) to select a frequency table from the CHNLSET_.* enum, and TVTUNER_(GET|SET)CHNL (unsigned int) to select a channel number. We have our own tables, so we don't use them. */ #define FREQ_UNIT 62500 /* Hz */ static tv_bool get_video_input (tveng_device_info * info); static void store_frequency (struct video_input * vi, unsigned int freq) { unsigned int frequency = freq * FREQ_UNIT; if (vi->pub.u.tuner.frequency != frequency) { vi->pub.u.tuner.frequency = frequency; tv_callback_notify (NULL, &vi->pub, vi->pub._callback); } } static tv_bool get_tuner_frequency (tveng_device_info * info, tv_video_line * l) { unsigned int freq; if (!get_video_input (info)) return FALSE; /* XXX should we look up the only tuner input instead? */ if (info->panel.cur_video_input == l) { if (-1 == tuner_ioctl (info, TVTUNER_GETFREQ, &freq)) return FALSE; store_frequency (VI(l), freq); } return TRUE; } static tv_bool set_tuner_frequency (tveng_device_info * info, tv_video_line * l, unsigned int frequency) { struct private_tvengbktr_device_info *p_info = P_INFO (info); struct video_input *vi = VI(l); unsigned int freq; freq = (frequency + (FREQ_UNIT >> 1)) / FREQ_UNIT; if (-1 == tuner_ioctl (&p_info->info, TVTUNER_SETFREQ, &freq)) return FALSE; /* Bug: driver mutes on frequency change (according to fxtv). */ if (p_info->mute_control && 0 == p_info->mute_control->value) { /* Error ignored. */ set_mute (p_info, 0); } store_frequency (vi, freq); return TRUE; } static int get_signal_strength (tveng_device_info * info, int * strength, int * afc) { /* unsigned int status; */ /* unsigned short status2; */ unsigned int status3; if (afc) *afc = 0; if (!strength) return TRUE; *strength = 0; /* if (-1 == tuner_ioctl (info, TVTUNER_GETSTATUS, &status)) return -1; if (-1 == bktr_ioctl (info, METEORSTATUS, &status2)) return -1; */ if (-1 == bktr_ioctl (info, BT848_GSTATUS, &status3)) return FALSE; /* Presumably we should query the tuner, but what do we know about the tuner? */ *strength = (status3 & 0x00005000) ? 0 : 65535; return TRUE; /* Success */ } static tv_bool get_video_input (tveng_device_info * info) { const tv_video_line *l = NULL; if (info->panel.video_inputs) { unsigned long dev; if (-1 == bktr_ioctl (info, METEORGINPUT, &dev)) return FALSE; for_all (l, info->panel.video_inputs) if (VI(l)->dev == dev) break; } store_cur_video_input (info, l); if (l) { get_standard_list (info); } else { free_video_standards (info); P_INFO (info)->pal_standard = NULL; } return TRUE; } static tv_bool set_video_input (tveng_device_info * info, tv_video_line * l) { struct private_tvengbktr_device_info *p_info = P_INFO (info); if (p_info->info.panel.cur_video_input) { unsigned long dev; if (0 == bktr_ioctl (&p_info->info, METEORGINPUT, &dev)) if (VI(l)->dev == dev) return TRUE; } if (CAPTURE_MODE_TELETEXT != info->capture_mode) if (p_info->overlay_active | p_info->capture_active) return FALSE; if (-1 == bktr_ioctl (&p_info->info, METEORSINPUT, &VI(l)->dev)) return FALSE; /* Bug: driver mutes on input change (according to fxtv). */ if (p_info->mute_control && 0 == p_info->mute_control->value) { /* Error ignored. */ set_mute (p_info, 0); } store_cur_video_input (&p_info->info, l); /* Standards are invariable. */ if (0) get_standard_list (&p_info->info); /* There is only one tuner, if any. XXX ignores the possibility (?) that a third party changed the frequency from the value we know. */ if (0 && IS_TUNER_LINE (l)) set_tuner_frequency (&p_info->info, p_info->info.panel.cur_video_input, p_info->info.panel.cur_video_input ->u.tuner.frequency); return TRUE; } struct video_input_map { unsigned int dev; const char * label; tv_video_line_type type; }; #define VIDEO_INPUT_MAP_END { 0, NULL, 0 } static const struct video_input_map meteor_video_inputs [] = { { METEOR_INPUT_DEV_RCA, "Composite", TV_VIDEO_LINE_TYPE_BASEBAND }, { METEOR_INPUT_DEV_SVIDEO, "S-Video", TV_VIDEO_LINE_TYPE_BASEBAND }, { METEOR_INPUT_DEV1, "Dev1", TV_VIDEO_LINE_TYPE_BASEBAND }, { METEOR_INPUT_DEV2, "Dev2", TV_VIDEO_LINE_TYPE_BASEBAND }, { METEOR_INPUT_DEV3, "Dev3", TV_VIDEO_LINE_TYPE_BASEBAND }, VIDEO_INPUT_MAP_END }; static const struct video_input_map bktr_video_inputs [] = { { METEOR_INPUT_DEV1, "Television", TV_VIDEO_LINE_TYPE_TUNER }, { METEOR_INPUT_DEV_RCA, "Composite", TV_VIDEO_LINE_TYPE_BASEBAND }, { METEOR_INPUT_DEV_SVIDEO, "S-Video", TV_VIDEO_LINE_TYPE_BASEBAND }, { METEOR_INPUT_DEV2, "Composite (S-Video)", TV_VIDEO_LINE_TYPE_BASEBAND }, { METEOR_INPUT_DEV3, "Composite 3", TV_VIDEO_LINE_TYPE_BASEBAND }, VIDEO_INPUT_MAP_END }; static tv_bool get_video_input_list (tveng_device_info * info) { const struct video_input_map *table; if (info->panel.video_inputs) return TRUE; /* invariable */ if (P_INFO (info)->bktr_driver) table = bktr_video_inputs; else table = meteor_video_inputs; for (; table->label; ++table) { struct video_input *vi; if (!(vi = VI (append_video_line (&info->panel.video_inputs, table->type, table->label, table->label, sizeof (*vi))))) goto failure; vi->pub._parent = info; vi->dev = table->dev; if (TV_VIDEO_LINE_TYPE_TUNER == table->type) { unsigned int freq; /* No ioctl to query bounds, we guess. */ vi->pub.u.tuner.minimum = 100000000; vi->pub.u.tuner.maximum = 900000000; vi->pub.u.tuner.step = FREQ_UNIT; if (-1 == tuner_ioctl (info, TVTUNER_GETFREQ, &freq)) goto failure; store_frequency (vi, freq); } } if (info->panel.video_inputs) { get_video_input (info); } return TRUE; failure: free_video_line_list (&info->panel.video_inputs); return FALSE; } /* Audio inputs */ static tv_bool get_audio_input (tveng_device_info * info) { const tv_audio_line *l = NULL; if (info->panel.audio_inputs) { int dev; if (-1 == tuner_ioctl (info, BT848_GAUDIO, &dev)) return FALSE; dev &= 0x7F; /* without mute flag */ for_all (l, info->panel.audio_inputs) if (AI(l)->dev == dev) break; } store_cur_audio_input (info, l); return TRUE; } static tv_bool set_audio_input (tveng_device_info * info, tv_audio_line * l) { struct private_tvengbktr_device_info *p_info = P_INFO (info); if (-1 == tuner_ioctl (&p_info->info, BT848_SAUDIO, &AI(l)->dev)) return FALSE; store_cur_audio_input (&p_info->info, l); return TRUE; } struct audio_input_map { int dev; const char * label; }; #define AUDIO_INPUT_MAP_END { 0, NULL } static const struct audio_input_map bktr_audio_inputs [] = { { AUDIO_TUNER, "Television" }, { AUDIO_INTERN, "Intern" }, { AUDIO_EXTERN, "Extern" }, AUDIO_INPUT_MAP_END }; static tv_bool get_audio_input_list (tveng_device_info * info) { const struct audio_input_map *table; if (info->panel.audio_inputs) return TRUE; /* invariable */ for (table = bktr_audio_inputs; table->label; ++table) { struct audio_input *ai; if (!(ai = AI (append_audio_line (&info->panel.audio_inputs, TV_AUDIO_LINE_TYPE_NONE, table->label, table->label, /* minimum */ 0, /* maximum */ 0, /* step */ 0, /* reset */ 0, sizeof (*ai))))) goto failure; ai->pub._parent = info; ai->dev = table->dev; } if (info->panel.audio_inputs) { get_audio_input (info); } return TRUE; failure: free_audio_line_list (&info->panel.audio_inputs); return FALSE; } /* Pixel formats */ static unsigned int swap816 (unsigned int x, tv_bool swap_8, tv_bool swap_16) { if (swap_8) x = ((x >> 8) & 0x00FF00FF) | ((x & 0x00FF00FF) << 8); if (swap_16) x = (x >> 16) | ((x & 0xFFFF) << 16); return x; } static tv_bool init_pixfmt_lut (tveng_device_info * info) { struct private_tvengbktr_device_info *p_info = P_INFO (info); tv_pixfmt_set pixfmt_set; unsigned int i; memset (&p_info->pixfmt_lut, -1, sizeof (p_info->pixfmt_lut)); pixfmt_set = 0; i = 0; for (;;) { struct meteor_pixfmt pixfmt; tv_pixel_format pf; if (i > 300) { /* Bug? */ return FALSE; } pixfmt.index = i; if (-1 == bktr_ioctl_may_fail (info, METEORGSUPPIXFMT, &pixfmt)) { if (EINVAL == errno) break; ioctl_failure (info, __FILE__, __FUNCTION__, __LINE__, "METEORGSUPPIXFMT"); return FALSE; } if (0) fprintf (stderr, "pixfmt index=%u type=%u Bpp=%u " "mask[]=%08x,%08x,%08x " "swap_bytes=%u swap_shorts=%u\n", pixfmt.index, pixfmt.type, pixfmt.Bpp, (unsigned int) pixfmt.masks[0], (unsigned int) pixfmt.masks[1], (unsigned int) pixfmt.masks[2], pixfmt.swap_bytes, pixfmt.swap_shorts); switch (pixfmt.type) { case METEOR_PIXTYPE_RGB: CLEAR (pf); pf.bits_per_pixel = pixfmt.Bpp * 8; pf.mask.rgb.r = pixfmt.masks[0]; pf.mask.rgb.g = pixfmt.masks[1]; pf.mask.rgb.b = pixfmt.masks[2]; /* XXX Why is this necessary? */ pixfmt.swap_bytes ^= 1; pixfmt.swap_shorts ^= 1; if (2 == pixfmt.Bpp) { pf.big_endian = pixfmt.swap_bytes; } else if (4 == pixfmt.Bpp) { pf.mask.rgb.r = swap816 (pixfmt.masks[0], pixfmt.swap_bytes, pixfmt.swap_shorts); pf.mask.rgb.g = swap816 (pixfmt.masks[1], pixfmt.swap_bytes, pixfmt.swap_shorts); pf.mask.rgb.b = swap816 (pixfmt.masks[2], pixfmt.swap_bytes, pixfmt.swap_shorts); } pf.pixfmt = tv_pixel_format_to_pixfmt (&pf); if (TV_PIXFMT_UNKNOWN != pf.pixfmt) { p_info->pixfmt_lut[pf.pixfmt] = i; pixfmt_set |= TV_PIXFMT_SET (pf.pixfmt); } break; case METEOR_PIXTYPE_YUV: /* YUV 4:2:2 planar */ p_info->pixfmt_lut[TV_PIXFMT_YUV422] = i; pixfmt_set |= TV_PIXFMT_SET (TV_PIXFMT_YUV422); break; case METEOR_PIXTYPE_YUV_PACKED: /* YUV 4:2:2 packed (UYVY) */ p_info->pixfmt_lut[TV_PIXFMT_YUYV] = i; pixfmt_set |= TV_PIXFMT_SET (TV_PIXFMT_YUYV); break; case METEOR_PIXTYPE_YUV_12: /* YUV 4:2:0 planar */ p_info->pixfmt_lut[TV_PIXFMT_YUV420] = i; pixfmt_set |= TV_PIXFMT_SET (TV_PIXFMT_YUV420); break; default: break; } ++i; } info->capture.supported_pixfmt_set = pixfmt_set; return TRUE; } static void signal_handler (int unused _unused_) { if (0) { fprintf (stderr, ","); fflush (stderr); } } static void init_signal (void (*handler)(int)) { struct sigaction new_action; struct sigaction old_action; CLEAR (new_action); sigemptyset (&new_action.sa_mask); new_action.sa_handler = handler; sigaction (SIGUSR1, &new_action, &old_action); /* See read_frame(). */ sigaction (SIGALRM, &new_action, &old_action); } static tv_bool set_format (struct private_tvengbktr_device_info *p_info, tv_image_format * fmt, const tv_video_standard *std) { unsigned int frame_width; unsigned int frame_height; struct meteor_geomet geom; int bktr_pixfmt; if (p_info->bktr_driver && TV_PIXFMT_IS_YUV (fmt->pixel_format->pixfmt)) { const tv_pixel_format *oldfmt; /* Bug: the driver initializes BKTR_E|O_VTC for RGB capture but not for YUV. When we switch from RGB width <= 385 (sic) to YUV >= 384 the selected VFILT overflows the FIFO and we get a distorted image. At higher resolutions the driver crashes. May not happen when we read VBI at the same time. */ oldfmt = fmt->pixel_format; fmt->pixel_format = tv_pixel_format_from_pixfmt (TV_PIXFMT_BGR16_LE); if (!set_format (p_info, fmt, std)) { fmt->pixel_format = oldfmt; return FALSE; } fmt->pixel_format = oldfmt; if (-1 == bktr_ioctl (&p_info->info, METEORSVIDEO, &no_video)) { return FALSE; } if (-1 == bktr_ioctl (&p_info->info, METEORSSIGNAL, &signal_none)) { return FALSE; } if (-1 == bktr_ioctl (&p_info->info, METEORCAPTUR, &cap_continuous)) { return FALSE; } /* Now initialized. */ if (-1 == bktr_ioctl (&p_info->info, METEORCAPTUR, &cap_stop_cont)) { return FALSE; } } if (std) { frame_width = std->frame_width; frame_height = std->frame_height; assert (frame_width <= 768); assert (frame_height <= 576); } else { frame_width = 640; frame_height = 480; } /* bktr SETGEO limits. */ fmt->width = (SATURATE (fmt->width, 32, frame_width) + 1) & ~1; fmt->height = (SATURATE (fmt->height, 24, frame_height) + 1) & ~1; geom.rows = fmt->height; geom.columns = fmt->width; geom.frames = 1; if (p_info->bktr_driver) { const tv_pixel_format *pf; unsigned int avg_bpp; pf = fmt->pixel_format; bktr_pixfmt = p_info->pixfmt_lut[pf->pixfmt]; if (-1 == bktr_pixfmt) return FALSE; /* No padding possible. */ fmt->bytes_per_line[0] = fmt->width * pf->bits_per_pixel / 8; fmt->bytes_per_line[1] = fmt->bytes_per_line[0] >> pf->uv_hshift; fmt->bytes_per_line[2] = fmt->bytes_per_line[1]; avg_bpp = pf->bits_per_pixel; if (TV_PIXFMT_IS_PLANAR (pf->pixfmt)) avg_bpp += 16 >> (pf->uv_hshift + pf->uv_vshift); if (avg_bpp > 16) { /* Bug: the driver allocates a buffer with two or four bytes per pixel depending on this flag, not the SACTPIXFMT value. */ geom.oformat = METEOR_GEO_RGB24; } else { /* METEORSACTPIXFMT overrides geom.oformat except for the METEOR_ONLY_ODD|EVEN_FIELDS flags. */ geom.oformat = 0; } } else { /* Correct? */ switch (fmt->pixel_format->pixfmt) { case TV_PIXFMT_BGR16_LE: geom.oformat = METEOR_GEO_RGB16; fmt->bytes_per_line[0] = fmt->width * 2; break; case TV_PIXFMT_BGRA32_LE: geom.oformat = METEOR_GEO_RGB24; fmt->bytes_per_line[0] = fmt->width * 4; break; case TV_PIXFMT_YUYV: geom.oformat = METEOR_GEO_YUV_PACKED; fmt->bytes_per_line[0] = fmt->width * 2; break; case TV_PIXFMT_YUV422: geom.oformat = METEOR_GEO_YUV_PLANAR; fmt->bytes_per_line[0] = fmt->width * 2; break; default: return FALSE; } } if (fmt->height <= (frame_height >> 1)) { /* EVEN, ODD, interlaced (0) */ geom.oformat |= METEOR_GEO_ODD_ONLY; } if (p_info->bktr_driver) { /* Must call this first to override geom.oformat. */ if (-1 == bktr_ioctl (&p_info->info, METEORSACTPIXFMT, &bktr_pixfmt)) { return FALSE; } } if (-1 == bktr_ioctl (&p_info->info, METEORSETGEO, &geom)) { return FALSE; } return TRUE; } /* Overlay Be VERY careful here. The bktr driver lets any application which has access permission DMA video data to any memory address, and barely checks the parameters. */ static tv_bool set_overlay_buffer (tveng_device_info * info, const tv_overlay_buffer *t) { struct private_tvengbktr_device_info *p_info = P_INFO (info); if (-1 == p_info->pixfmt_lut[t->format.pixel_format->pixfmt]) { return FALSE; } p_info->info.overlay.buffer = *t; p_info->overlay_bits_per_pixel = t->format.pixel_format->bits_per_pixel; return TRUE; } static tv_bool get_overlay_buffer (tveng_device_info * info _unused_) { /* Nothing to do. */ return TRUE; } static tv_bool set_clips (struct private_tvengbktr_device_info *p_info, const tv_window * w, const tv_clip_vector * v, unsigned int scale) { tv_clip_vector vec; const tv_clip *clip; struct _bktr_clip clips; unsigned int band; unsigned int vec_size; unsigned int i; if (scale) { const tv_clip *end; if (!tv_clip_vector_copy (&vec, v)) return FALSE; end = v->vector + v->size; /* Apparently the same vector is used on both fields. We scale by 1/2 and merge clips which overlap now. */ for (clip = v->vector; clip < end; ++clip) { if (!tv_clip_vector_add_clip_xy (&vec, clip->x1, clip->y1 >> 1, clip->x2, (clip->y2 + 1) >> 1)) goto failure; } clip = vec.vector; vec_size = vec.size; } else { clip = v->vector; vec_size = v->size; } assert (N_ELEMENTS (clips.x) >= 2); band = 0; for (i = 0; i < vec_size; ++i) { if (i < N_ELEMENTS (clips.x) - 1) { /* Bug: naming is backwards. */ /* Bug: bktr clipping is broken in at least two ways. When a clip reaches the right window boundary the driver extends it to full window width. At high resolution it clips where we didn't ask for it, perhaps scaling vertical coordinates differently for first and second field? */ clips.x[i].y_min = clip->x1; clips.x[i].x_min = clip->y1; clips.x[i].y_max = clip->x2; clips.x[i].x_max = clip->y2; if (0) fprintf(stderr, "%u: %u,%u - %u,%u\n", i, clip->x1, clip->y1, clip->x2, clip->y2); ++clip; } else { /* When the rest of the rectangles won't fit we clip away the current band and everything below. */ clips.x[band].y_min = 0; /* x1 */ clips.x[band].y_max = w->width; clips.x[band].x_max = w->height; i = band + 1; break; } } CLEAR (clips.x[i]); /* end */ if (scale) tv_clip_vector_destroy (&vec); if (-1 == bktr_ioctl (&p_info->info, BT848SCLIP, &clips)) { return FALSE; } return TRUE; failure: if (scale) tv_clip_vector_destroy (&vec); return FALSE; } static tv_bool enable_overlay (tveng_device_info * info, tv_bool on); static tv_bool set_overlay_window (tveng_device_info * info, const tv_window * w, const tv_clip_vector * v, unsigned int chromakey) { struct private_tvengbktr_device_info *p_info = P_INFO (info); const tv_image_format *bf; tv_image_format fmt; struct meteor_video video; int start_line; int start_byte; unsigned int size; int wx1; int wy1; int wx2; int wy2; if (p_info->capture_active) return FALSE; /* Disable overlay if active. */ if (!enable_overlay (info, FALSE)) return FALSE; wx1 = w->x - p_info->info.overlay.buffer.x; wy1 = w->y - p_info->info.overlay.buffer.y; wx2 = wx1 + w->width; wy2 = wy1 + w->height; bf = &p_info->info.overlay.buffer.format; if (!p_info->bktr_driver && v->size > 0) { /* Clipping not supported. */ return FALSE; } /* XXX addr must be dword aligned? Presently tveng.c enforces this. */ start_line = wy1 * (int) bf->bytes_per_line[0]; start_byte = (wx1 * (int) p_info->overlay_bits_per_pixel) / 8; video.addr = p_info->info.overlay.buffer.base + start_line + start_byte; video.width = bf->bytes_per_line[0]; size = (bf->size - ((char *) video.addr - (char *) p_info->info.overlay.buffer.base)); video.banksize = size; video.ramsize = (size + 1023) >> 10; p_info->capture_ready = FALSE; p_info->overlay_ready = FALSE; if (-1 == bktr_ioctl (info, METEORSVIDEO, &video)) return FALSE; fmt = *bf; fmt.width = w->width; fmt.height = w->height; if (!set_format (p_info, &fmt, info->panel.cur_video_standard)) return FALSE; if (p_info->bktr_driver) { unsigned int frame_height; unsigned int scale; frame_height = 480; if (info->panel.cur_video_standard) { frame_height = info->panel.cur_video_standard ->frame_height; } scale = (w->height > (frame_height >> 1)); if (!set_clips (p_info, w, v, scale)) { return FALSE; } } info->overlay.window.x = w->x; info->overlay.window.y = w->y; info->overlay.window.width = w->width; info->overlay.window.height = w->height; p_info->overlay_ready = TRUE; return TRUE; } static tv_bool get_overlay_window (tveng_device_info * info _unused_) { /* TODO */ return FALSE; } static tv_bool enable_overlay (tveng_device_info * info, tv_bool enable) { struct private_tvengbktr_device_info *p_info = P_INFO (info); if (p_info->capture_active) return FALSE; if (p_info->overlay_active == enable) return TRUE; if (enable) { if (!p_info->overlay_ready) return FALSE; if (-1 == bktr_ioctl (info, METEORCAPTUR, &cap_continuous)) { return FALSE; } } else { if (-1 == bktr_ioctl (info, METEORCAPTUR, &cap_stop_cont)) { return FALSE; } } usleep (50000); p_info->overlay_active = enable; return TRUE; } static tv_bool get_capture_format (tveng_device_info * info) { struct private_tvengbktr_device_info *p_info = P_INFO (info); struct meteor_geomet geom; tv_pixfmt pixfmt; CLEAR (geom); if (p_info->bktr_driver) { int bktr_pixfmt; /* Oddly bktr supports SETGEO but not GETGEO. */ geom.columns = info->capture.format.width; geom.rows = info->capture.format.height; bktr_pixfmt = -1; if (-1 == bktr_ioctl (info, METEORGACTPIXFMT, &bktr_pixfmt)) return FALSE; pixfmt = 0; while (pixfmt < N_ELEMENTS (p_info->pixfmt_lut)) { if (bktr_pixfmt == p_info->pixfmt_lut[pixfmt]) break; ++pixfmt; } if (pixfmt >= N_ELEMENTS (p_info->pixfmt_lut)) { return FALSE; } } else { if (-1 == bktr_ioctl (info, METEORGETGEO, &geom)) return FALSE; switch (geom.oformat) { case METEOR_GEO_RGB16: pixfmt = TV_PIXFMT_BGR16_LE; break; case METEOR_GEO_RGB24: pixfmt = TV_PIXFMT_BGRA32_LE; break; case METEOR_GEO_YUV_PACKED: pixfmt = TV_PIXFMT_YUYV; break; default: return FALSE; } } if (0 == geom.columns || 0 == geom.rows) { CLEAR (info->capture.format); info->capture.format.pixel_format = tv_pixel_format_from_pixfmt (pixfmt); } else { if (!tv_image_format_init (&info->capture.format, geom.columns, geom.rows, /* bytes_per_line: minimum */ 0, pixfmt, /* reserved */ 0)) { return FALSE; } } if (0) _tv_image_format_dump (&info->capture.format, stderr); return TRUE; } static tv_bool set_capture_format (tveng_device_info * info, const tv_image_format *fmt) { struct private_tvengbktr_device_info *p_info = P_INFO (info); if (p_info->overlay_active | p_info->capture_active) return FALSE; p_info->capture_ready = FALSE; p_info->overlay_ready = FALSE; if (-1 == bktr_ioctl (info, METEORSVIDEO, &no_video)) { return FALSE; } if (p_info->bktr_driver) { if (-1 == bktr_ioctl (info, BT848SCLIP, &no_clips)) { return FALSE; } } info->capture.format = *fmt; if (!set_format (p_info, &info->capture.format, info->panel.cur_video_standard)) { return FALSE; } usleep (50000); p_info->capture_ready = TRUE; return TRUE; } static void timestamp_init(tveng_device_info *info) { struct private_tvengbktr_device_info *p_info = P_INFO (info); double rate = info->panel.cur_video_standard ? info->panel.cur_video_standard->frame_rate : 25; /* XXX*/ p_info->capture_time = 0.0; p_info->frame_period_near = p_info->frame_period_far = 1.0 / rate; } static tv_bool start_capturing (tveng_device_info * info) { struct private_tvengbktr_device_info *p_info = P_INFO (info); gboolean dummy; p_info->capture_active = FALSE; if (!p_info->capture_ready) { if (!set_capture_format (info, &info->capture.format)) return FALSE; assert (p_info->capture_ready); } p_tveng_stop_everything(info, &dummy); assert (CAPTURE_MODE_NONE == info ->capture_mode); timestamp_init(info); p_info->mmapped_data = device_mmap (info->log_fp, /* start: any */ NULL, /* length */ 768 * 576 * 8, PROT_READ, MAP_SHARED, info->fd, /* offset */ 0); if (MAP_FAILED == p_info->mmapped_data) { return FALSE; } if (-1 == bktr_ioctl (info, METEORSVIDEO, &no_video)) { return FALSE; } if (-1 == bktr_ioctl (info, BT848SCLIP, &no_clips)) { return FALSE; } init_signal (signal_handler); if (-1 == bktr_ioctl (info, METEORSSIGNAL, &signal_usr1)) { return FALSE; } if (-1 == bktr_ioctl (info, METEORCAPTUR, &cap_continuous)) { return FALSE; } info->capture_mode = CAPTURE_MODE_READ; p_info->capture_active = TRUE; return TRUE; } static tv_bool stop_capturing (tveng_device_info * info) { struct private_tvengbktr_device_info *p_info = P_INFO (info); p_info->capture_active = FALSE; if (CAPTURE_MODE_NONE == info->capture_mode) { fprintf(stderr, "Warning: trying to stop capture with " "no capture active\n"); return TRUE; /* Nothing to be done */ } assert (CAPTURE_MODE_READ == info->capture_mode || CAPTURE_MODE_TELETEXT == info->capture_mode); if (-1 == bktr_ioctl (info, METEORCAPTUR, &cap_stop_cont)) { return FALSE; } if (-1 == bktr_ioctl (info, METEORSSIGNAL, &signal_none)) { return FALSE; } if ((char *) -1 != p_info->mmapped_data && (char *) 0 != p_info->mmapped_data) if (-1 == device_munmap (info->log_fp, p_info->mmapped_data, /* length */ 768 * 576 * 8)) { info -> tveng_errno = errno; t_error("munmap()", info); } p_info->mmapped_data = 0; info->capture_mode = CAPTURE_MODE_NONE; return TRUE; } static tv_bool enable_capture (tveng_device_info * info, tv_bool enable) { struct private_tvengbktr_device_info *p_info = P_INFO (info); if (p_info->overlay_active) return FALSE; if (p_info->capture_active == enable) return TRUE; if (enable) { return start_capturing (info); } else { return stop_capturing (info); } } static inline double timestamp(struct private_tvengbktr_device_info *p_info) { double now = zf_current_time(); double stamp; if (p_info->capture_time > 0) { double dt = now - p_info->capture_time; double ddt = p_info->frame_period_far - dt; if (fabs(p_info->frame_period_near) < p_info->frame_period_far * 1.5) { p_info->frame_period_near = (p_info->frame_period_near - dt) * 0.8 + dt; p_info->frame_period_far = ddt * 0.9999 + dt; stamp = p_info->capture_time += p_info->frame_period_far; } else { /* Frame dropping detected & confirmed */ p_info->frame_period_near = p_info->frame_period_far; stamp = p_info->capture_time = now; } } else { /* First iteration */ stamp = p_info->capture_time = now; } return stamp; } static void meteor_mem_dump (const struct meteor_mem *mm, FILE * fp) { fprintf (fp, "frame_size=%d num_bufs=%d lowat=%d hiwat=%d " "active=%08x num_active_bufs=%d buf=%p\n", mm->frame_size, mm->num_bufs, mm->lowat, mm->hiwat, mm->active, mm->num_active_bufs, (void *) mm->buf); } static int read_frame (tveng_device_info * info, tv_capture_buffer * buffer, const struct timeval * timeout) { struct private_tvengbktr_device_info *p_info = P_INFO (info); sigset_t sa_mask; struct timeval timestamp; int r; if (!p_info->capture_active) { return -1; /* error */ } /* Partially stolen from xawtv. Blocks all signals except USR1 (new frame) and ALRM (timeout), then waits for any signal. */ if (timeout) { struct itimerval nvalue; struct itimerval ovalue; CLEAR (nvalue); if ((timeout->tv_sec | timeout->tv_usec) > 0) { nvalue.it_value = *timeout; } else { /* XXX non-blocking impossible. */ nvalue.it_value.tv_sec = 0; nvalue.it_value.tv_usec = 1000; } setitimer (ITIMER_REAL, &nvalue, &ovalue); sigfillset (&sa_mask); sigdelset (&sa_mask, SIGUSR1); sigdelset (&sa_mask, SIGALRM); } else { /* Infinite timeout. */ sigfillset (&sa_mask); sigdelset (&sa_mask, SIGUSR1); } sigsuspend (&sa_mask); /* XXX did we get USR1 (success) or ALRM (timeout, return 0) ? */ /* XXX this is inaccurate. */ r = gettimeofday (×tamp, /* timezone */ NULL); assert (0 == r); if (timeout) { struct itimerval nvalue; struct itimerval ovalue; CLEAR (nvalue); /* Cancel alarm. */ setitimer (ITIMER_REAL, &nvalue, &ovalue); } if (0) { /* Double buffering not supported by bktr. :-( */ meteor_mem_dump ((struct meteor_mem *) p_info->mmapped_data, stderr); } if (buffer) { const tv_image_format *dst_format; dst_format = buffer->format; if (!dst_format) dst_format = &info->capture.format; tv_copy_image (buffer->data, dst_format, p_info->mmapped_data, &info->capture.format); buffer->sample_time = timestamp; buffer->stream_time = 0; /* FIXME */ } return 1; /* success */ } #if 0 /* Doesn't work right, we use the default 0,0,768,576 or 0,0,640,480. */ { struct bktr_capture_area ca; bktr_ioctl (info, BT848_GCAPAREA, &ca); bktr_ioctl (info, BT848_SCAPAREA, &ca); } #endif /* Closes a device opened with tveng_init_device */ static void tvengbktr_close_device (tveng_device_info * info) { gboolean was_active; if (CAPTURE_MODE_TELETEXT == info->capture_mode) stop_capturing (info); else p_tveng_stop_everything (info, &was_active); if (-1 != P_INFO (info)->tuner_fd) { device_close (info->log_fp, P_INFO (info)->tuner_fd); P_INFO (info)->tuner_fd = -1; } device_close (info->log_fp, info->fd); info->fd = -1; info->current_controller = TVENG_CONTROLLER_NONE; if (info->file_name) { free (info->file_name); info->file_name = NULL; } free_panel_controls (info); P_INFO (info)->mute_control = NULL; free_video_standards (info); P_INFO (info)->pal_standard = NULL; free_video_inputs (info); } /* */ static int p_tvengbktr_open_device_file(int flags, tveng_device_info * info) { unsigned int gstatus; /* unsigned short mstatus; */ assert (NULL != info); assert (NULL != info->file_name); info->fd = device_open (info->log_fp, info->file_name, flags, 0); if (-1 == info->fd) { info->tveng_errno = errno; t_error("open()", info); return -1; } if (0 == bktr_ioctl (info, BT848_GSTATUS, &gstatus)) { z_strlcpy (info->caps.name, "Brooktree", N_ELEMENTS (info->caps.name)); info->caps.flags = TVENG_CAPS_TUNER | TVENG_CAPS_TELETEXT | TVENG_CAPS_OVERLAY | TVENG_CAPS_CLIPPING; info->caps.channels = 5; info->caps.audios = 0; info->caps.minwidth = 32; /* XXX */ info->caps.minheight = 32; /* XXX */ info->caps.maxwidth = 768; /* XXX */ info->caps.maxheight = 576; /* XXX */ /* FIXME /dev/bktrN -> /dev/tunerN */ P_INFO (info)->tuner_fd = device_open (info->log_fp, "/dev/tuner", flags, 0); if (-1 == P_INFO (info)->tuner_fd) { info->tveng_errno = errno; t_error("Bad device", info); device_close(info->log_fp, info->fd); return -1; } P_INFO (info)->bktr_driver = TRUE; } #if 0 /* NEEDS TESTING */ else if (0 == bktr_ioctl (info, METEORSTATUS, &mstatus)) { z_strlcpy (info->caps.name, "Meteor", N_ELEMENTS (info->caps.name)); info->caps.flags = 0; info->caps.channels = 5; info->caps.audios = 0; info->caps.minwidth = 32; /* XXX */ info->caps.minheight = 32; /* XXX */ info->caps.maxwidth = 768; /* XXX */ info->caps.maxheight = 576; /* XXX */ P_INFO (info)->bktr_driver = FALSE; } #endif else { info->tveng_errno = errno; t_error("Bad device", info); device_close(info->log_fp, info->fd); return -1; } info->current_controller = TVENG_CONTROLLER_V4L2; return (info->fd); } /* Associates the given tveng_device_info with the given video device. On error it returns -1 and sets info->tveng_errno, info->error to the correct values. device_file: The file used to access the video device (usually /dev/video) attach_mode: Specifies the mode to open the device file depth: The color depth the capture will be in, -1 means let tveng decide based on the current display depth. info: The structure to be associated with the device */ static int tvengbktr_attach_device (const char* device_file, Window window, enum tveng_attach_mode attach_mode, tveng_device_info * info) { struct private_tvengbktr_device_info * p_info = (struct private_tvengbktr_device_info *) info; assert (device_file != NULL); assert (info != NULL); memset ((char *) p_info + sizeof (p_info->info), 0, sizeof (*p_info) - sizeof (*info)); if (-1 != info->fd) tveng_close_device (info); if (!(info->file_name = strdup (device_file))) { info->tveng_errno = errno; t_error ("strdup()", info); return -1; } /* FIXME */ if (attach_mode == TVENG_ATTACH_XV) attach_mode = TVENG_ATTACH_READ; switch (attach_mode) { case TVENG_ATTACH_CONTROL: case TVENG_ATTACH_READ: case TVENG_ATTACH_VBI: info->fd = p_tvengbktr_open_device_file(O_RDONLY, info); break; default: tv_error_msg (info, "Unknown attach mode for the device"); free(info->file_name); info->file_name = NULL; return -1; } if (-1 == info->fd) { free(info->file_name); info->file_name = NULL; return -1; } info->attach_mode = attach_mode; info->capture_mode = CAPTURE_MODE_NONE; CLEAR (info->panel); info->panel.set_video_input = set_video_input; info->panel.get_video_input = get_video_input; info->panel.set_tuner_frequency = set_tuner_frequency; info->panel.get_tuner_frequency = get_tuner_frequency; info->panel.get_signal_strength = get_signal_strength; if (!get_video_input_list (info)) goto failure; info->panel.set_audio_input = set_audio_input; info->panel.get_audio_input = get_audio_input; if (P_INFO (info)->bktr_driver) { if (!get_audio_input_list (info)) goto failure; } info->panel.set_video_standard = set_video_standard; info->panel.get_video_standard = get_video_standard; if (!get_standard_list (info)) goto failure; info->panel.set_control = set_control; info->panel.get_control = get_control; if (!get_control_list (info)) goto failure; CLEAR (info->overlay); info->overlay.set_buffer = set_overlay_buffer; info->overlay.get_buffer = get_overlay_buffer; info->overlay.set_window = set_overlay_window; info->overlay.get_window = get_overlay_window; info->overlay.enable = enable_overlay; CLEAR (info->capture); info->capture.get_format = get_capture_format; info->capture.set_format = set_capture_format; info->capture.read_frame = read_frame; info->capture.enable = enable_capture; if (P_INFO (info)->bktr_driver) { init_pixfmt_lut (info); } else { /* Correct? */ info->capture.supported_pixfmt_set = (TV_PIXFMT_SET (TV_PIXFMT_BGR16_LE) | TV_PIXFMT_SET (TV_PIXFMT_BGRA32_LE) | TV_PIXFMT_SET (TV_PIXFMT_YUYV) | TV_PIXFMT_SET (TV_PIXFMT_YUV422)); } tv_image_format_init (&info->capture.format, 160, 120, 0, TV_PIXFMT_BGR16_LE, 0); /* Bug: VBI capturing works only if we capture video at the same time. Additionally the video capture format must be RGB. */ if (TVENG_ATTACH_VBI == attach_mode) { unsigned long ul; /* We need this only for Teletext, which implies PAL. */ if (!info->panel.cur_video_standard || !(info->panel.cur_video_standard->videostd_set & TV_VIDEOSTD_SET_PAL)) { assert (NULL != P_INFO (info)->pal_standard); if (!set_video_standard (info, P_INFO (info)->pal_standard)) goto failure; } if (!set_capture_format (info, &info->capture.format)) goto failure; if (!start_capturing (info)) goto failure; info->capture_mode = CAPTURE_MODE_TELETEXT; } return info->fd; failure: tvengbktr_close_device (info); return -1; } static void destroy_devnode (tv_device_node * n, tv_bool restore) { restore = restore; if (NULL == n) return; free (n->device); free (n->version); free (n->driver); free (n->bus); free (n->label); CLEAR (*n); free (n); } static tv_bool append_devnode (tv_device_node ** list, const char * label, const char * driver, const char * device) { tv_device_node *n; n = calloc (1, sizeof (*n)); if (NULL == n) { return FALSE; } n->label = strdup (label); n->bus = NULL; /* unknown */ n->driver = strdup (driver); n->version = NULL; /* unknown */ n->device = strdup (device); if (NULL == n->label || NULL == n->driver || NULL == n->device) goto failure; n->destroy = destroy_devnode; tv_device_node_add (list, n); return TRUE; failure: destroy_devnode (n, /* restore */ TRUE); return FALSE; } tv_device_node * tvengbktr_device_scan (FILE * log) { static const char *video_devices [] = { "/dev/bktr", }; tv_device_node *list; unsigned int i; list = NULL; if (NULL != log) { fprintf (log, "BKTR/Meteor device scan\n"); } for (i = 0; i < N_ELEMENTS (video_devices); ++i) { unsigned int gstatus; /* unsigned short mstatus; */ tv_bool success; int fd; /* XXX see zapping_setup_fb for a safer version. */ fd = device_open (log, video_devices[i], /* flags */ O_RDONLY, /* mode */ 0); if (-1 == fd) { continue; } success = TRUE; if (0 == device_ioctl (log, fprint_ioctl_arg, fd, BT848_GSTATUS, &gstatus)) { success = append_devnode (&list, "bt8x8", "bktr", video_devices[i]); #if 0 /* NEEDS TESTING */ } else if (0 == device_ioctl (log, fprintf_ioctl_arg, fd, METEORSTATUS, &mstatus)) { success = append_devnode (&list, "Meteor", "meteor", video_devices[i]); #endif } /* Error ignored. */ device_close (log, fd); fd = -1; if (!success) break; } return list; } static struct tveng_module_info tvengbktr_module_info = { .attach_device = tvengbktr_attach_device, .close_device = tvengbktr_close_device, .interface_label = "BKTR/Meteor", .private_size = sizeof (struct private_tvengbktr_device_info) }; void tvengbktr_init_module(struct tveng_module_info *module_info) { assert (NULL != module_info); *module_info = tvengbktr_module_info; } #else /* !ENABLE_BKTR */ #include "tvengbktr.h" void tvengbktr_init_module(struct tveng_module_info *module_info) { assert (NULL != module_info); CLEAR (*module_info); } #endif /* ENABLE_BKTR */ �������������������������������������������������������������������������������������zapping-0.10cvs6/src/tvengbktr.h�������������������������������������������������������������������� 644 � 764 � 144 � 4066 10406535264 11766� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Zapping (TV viewer for the Gnome Desktop) * Copyright (C) 2000 Iaki Garca Etxebarria * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifndef __TVENGBKTR_H__ #define __TVENGBKTR_H__ #include "tveng_private.h" /* Inits the V4L2 module, and fills in the given table. */ void tvengbktr_init_module(struct tveng_module_info *module_info); /* Prototypes for forward declaration, used only in tvengbktr.c */ #ifdef TVENGBKTR_PROTOTYPES /* Associates the given tveng_device_info with the given video device. On error it returns -1 and sets info->errno, info->error to the correct values. device_file: The file used to access the video device (usually /dev/video) attach_mode: Specifies the mode to open the device file depth: The color depth the capture will be in, -1 means let tveng decide based on the current display depth. info: The structure to be associated with the device */ static int tvengbktr_attach_device(const char* device_file, enum tveng_attach_mode attach_mode, tveng_device_info * info); /* Closes the video device asocciated to the device info object. Should be called before reattaching a video device to the same object, but there is no need to call this before calling tveng_device_info_destroy. */ static void tvengbktr_close_device(tveng_device_info* info); extern tv_device_node * tvengbktr_device_scan (FILE * log); #endif /* TVENGBKTR_PROTOTYPES */ #endif /* TVENGBKTR.H */ ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������zapping-0.10cvs6/src/eggaccelerators.c�������������������������������������������������������������� 644 � 764 � 144 � 44214 7762173334 13113� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* eggaccelerators.c * Copyright (C) 2002 Red Hat, Inc.; Copyright 1998, 2001 Tim Janik * Developed by Havoc Pennington, Tim Janik * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #include "eggaccelerators.h" #include <string.h> #include <gdk/gdkx.h> #include <gdk/gdkkeysyms.h> enum { EGG_MODMAP_ENTRY_SHIFT = 0, EGG_MODMAP_ENTRY_LOCK = 1, EGG_MODMAP_ENTRY_CONTROL = 2, EGG_MODMAP_ENTRY_MOD1 = 3, EGG_MODMAP_ENTRY_MOD2 = 4, EGG_MODMAP_ENTRY_MOD3 = 5, EGG_MODMAP_ENTRY_MOD4 = 6, EGG_MODMAP_ENTRY_MOD5 = 7, EGG_MODMAP_ENTRY_LAST = 8 }; #define MODMAP_ENTRY_TO_MODIFIER(x) (1 << (x)) typedef struct { EggVirtualModifierType mapping[EGG_MODMAP_ENTRY_LAST]; } EggModmap; const EggModmap* egg_keymap_get_modmap (GdkKeymap *keymap); static inline gboolean is_alt (const gchar *string) { return ((string[0] == '<') && (string[1] == 'a' || string[1] == 'A') && (string[2] == 'l' || string[2] == 'L') && (string[3] == 't' || string[3] == 'T') && (string[4] == '>')); } static inline gboolean is_ctl (const gchar *string) { return ((string[0] == '<') && (string[1] == 'c' || string[1] == 'C') && (string[2] == 't' || string[2] == 'T') && (string[3] == 'l' || string[3] == 'L') && (string[4] == '>')); } static inline gboolean is_modx (const gchar *string) { return ((string[0] == '<') && (string[1] == 'm' || string[1] == 'M') && (string[2] == 'o' || string[2] == 'O') && (string[3] == 'd' || string[3] == 'D') && (string[4] >= '1' && string[4] <= '5') && (string[5] == '>')); } static inline gboolean is_ctrl (const gchar *string) { return ((string[0] == '<') && (string[1] == 'c' || string[1] == 'C') && (string[2] == 't' || string[2] == 'T') && (string[3] == 'r' || string[3] == 'R') && (string[4] == 'l' || string[4] == 'L') && (string[5] == '>')); } static inline gboolean is_shft (const gchar *string) { return ((string[0] == '<') && (string[1] == 's' || string[1] == 'S') && (string[2] == 'h' || string[2] == 'H') && (string[3] == 'f' || string[3] == 'F') && (string[4] == 't' || string[4] == 'T') && (string[5] == '>')); } static inline gboolean is_shift (const gchar *string) { return ((string[0] == '<') && (string[1] == 's' || string[1] == 'S') && (string[2] == 'h' || string[2] == 'H') && (string[3] == 'i' || string[3] == 'I') && (string[4] == 'f' || string[4] == 'F') && (string[5] == 't' || string[5] == 'T') && (string[6] == '>')); } static inline gboolean is_control (const gchar *string) { return ((string[0] == '<') && (string[1] == 'c' || string[1] == 'C') && (string[2] == 'o' || string[2] == 'O') && (string[3] == 'n' || string[3] == 'N') && (string[4] == 't' || string[4] == 'T') && (string[5] == 'r' || string[5] == 'R') && (string[6] == 'o' || string[6] == 'O') && (string[7] == 'l' || string[7] == 'L') && (string[8] == '>')); } static inline gboolean is_release (const gchar *string) { return ((string[0] == '<') && (string[1] == 'r' || string[1] == 'R') && (string[2] == 'e' || string[2] == 'E') && (string[3] == 'l' || string[3] == 'L') && (string[4] == 'e' || string[4] == 'E') && (string[5] == 'a' || string[5] == 'A') && (string[6] == 's' || string[6] == 'S') && (string[7] == 'e' || string[7] == 'E') && (string[8] == '>')); } static inline gboolean is_meta (const gchar *string) { return ((string[0] == '<') && (string[1] == 'm' || string[1] == 'M') && (string[2] == 'e' || string[2] == 'E') && (string[3] == 't' || string[3] == 'T') && (string[4] == 'a' || string[4] == 'A') && (string[5] == '>')); } static inline gboolean is_super (const gchar *string) { return ((string[0] == '<') && (string[1] == 's' || string[1] == 'S') && (string[2] == 'u' || string[2] == 'U') && (string[3] == 'p' || string[3] == 'P') && (string[4] == 'e' || string[4] == 'E') && (string[5] == 'r' || string[5] == 'R') && (string[6] == '>')); } static inline gboolean is_hyper (const gchar *string) { return ((string[0] == '<') && (string[1] == 'h' || string[1] == 'H') && (string[2] == 'y' || string[2] == 'Y') && (string[3] == 'p' || string[3] == 'P') && (string[4] == 'e' || string[4] == 'E') && (string[5] == 'r' || string[5] == 'R') && (string[6] == '>')); } /** * egg_accelerator_parse_virtual: * @accelerator: string representing an accelerator * @accelerator_key: return location for accelerator keyval * @accelerator_mods: return location for accelerator modifier mask * * Parses a string representing a virtual accelerator. The format * looks like "<Control>a" or "<Shift><Alt>F1" or * "<Release>z" (the last one is for key release). The parser * is fairly liberal and allows lower or upper case, and also * abbreviations such as "<Ctl>" and "<Ctrl>". * * If the parse fails, @accelerator_key and @accelerator_mods will * be set to 0 (zero) and %FALSE will be returned. If the string contains * only modifiers, @accelerator_key will be set to 0 but %TRUE will be * returned. * * The virtual vs. concrete accelerator distinction is a relic of * how the X Window System works; there are modifiers Mod2-Mod5 that * can represent various keyboard keys (numlock, meta, hyper, etc.), * the virtual modifier represents the keyboard key, the concrete * modifier the actual Mod2-Mod5 bits in the key press event. * * Returns: %TRUE on success. */ gboolean egg_accelerator_parse_virtual (const gchar *accelerator, guint *accelerator_key, EggVirtualModifierType *accelerator_mods) { guint keyval; GdkModifierType mods; gint len; gboolean bad_keyval; if (accelerator_key) *accelerator_key = 0; if (accelerator_mods) *accelerator_mods = 0; g_return_val_if_fail (accelerator != NULL, FALSE); bad_keyval = FALSE; keyval = 0; mods = 0; len = strlen (accelerator); while (len) { if (*accelerator == '<') { if (len >= 9 && is_release (accelerator)) { accelerator += 9; len -= 9; mods |= EGG_VIRTUAL_RELEASE_MASK; } else if (len >= 9 && is_control (accelerator)) { accelerator += 9; len -= 9; mods |= EGG_VIRTUAL_CONTROL_MASK; } else if (len >= 7 && is_shift (accelerator)) { accelerator += 7; len -= 7; mods |= EGG_VIRTUAL_SHIFT_MASK; } else if (len >= 6 && is_shft (accelerator)) { accelerator += 6; len -= 6; mods |= EGG_VIRTUAL_SHIFT_MASK; } else if (len >= 6 && is_ctrl (accelerator)) { accelerator += 6; len -= 6; mods |= EGG_VIRTUAL_CONTROL_MASK; } else if (len >= 6 && is_modx (accelerator)) { static const guint mod_vals[] = { EGG_VIRTUAL_ALT_MASK, EGG_VIRTUAL_MOD2_MASK, EGG_VIRTUAL_MOD3_MASK, EGG_VIRTUAL_MOD4_MASK, EGG_VIRTUAL_MOD5_MASK }; len -= 6; accelerator += 4; mods |= mod_vals[*accelerator - '1']; accelerator += 2; } else if (len >= 5 && is_ctl (accelerator)) { accelerator += 5; len -= 5; mods |= EGG_VIRTUAL_CONTROL_MASK; } else if (len >= 5 && is_alt (accelerator)) { accelerator += 5; len -= 5; mods |= EGG_VIRTUAL_ALT_MASK; } else if (len >= 6 && is_meta (accelerator)) { accelerator += 6; len -= 6; mods |= EGG_VIRTUAL_META_MASK; } else if (len >= 7 && is_hyper (accelerator)) { accelerator += 7; len -= 7; mods |= EGG_VIRTUAL_HYPER_MASK; } else if (len >= 7 && is_super (accelerator)) { accelerator += 7; len -= 7; mods |= EGG_VIRTUAL_SUPER_MASK; } else { gchar last_ch; last_ch = *accelerator; while (last_ch && last_ch != '>') { last_ch = *accelerator; accelerator += 1; len -= 1; } } } else { keyval = gdk_keyval_from_name (accelerator); if (keyval == 0) bad_keyval = TRUE; accelerator += len; len -= len; } } if (accelerator_key) *accelerator_key = gdk_keyval_to_lower (keyval); if (accelerator_mods) *accelerator_mods = mods; return !bad_keyval; } /** * egg_virtual_accelerator_name: * @accelerator_key: accelerator keyval * @accelerator_mods: accelerator modifier mask * @returns: a newly-allocated accelerator name * * Converts an accelerator keyval and modifier mask * into a string parseable by egg_accelerator_parse_virtual(). * For example, if you pass in #GDK_q and #EGG_VIRTUAL_CONTROL_MASK, * this function returns "<Control>q". * * The caller of this function must free the returned string. */ gchar* egg_virtual_accelerator_name (guint accelerator_key, EggVirtualModifierType accelerator_mods) { static const gchar text_release[] = "<Release>"; static const gchar text_shift[] = "<Shift>"; static const gchar text_control[] = "<Control>"; static const gchar text_mod1[] = "<Alt>"; static const gchar text_mod2[] = "<Mod2>"; static const gchar text_mod3[] = "<Mod3>"; static const gchar text_mod4[] = "<Mod4>"; static const gchar text_mod5[] = "<Mod5>"; static const gchar text_meta[] = "<Meta>"; static const gchar text_super[] = "<Super>"; static const gchar text_hyper[] = "<Hyper>"; guint l; gchar *keyval_name; gchar *accelerator; accelerator_mods &= EGG_VIRTUAL_MODIFIER_MASK; keyval_name = gdk_keyval_name (gdk_keyval_to_lower (accelerator_key)); if (!keyval_name) keyval_name = ""; l = 0; if (accelerator_mods & EGG_VIRTUAL_RELEASE_MASK) l += sizeof (text_release) - 1; if (accelerator_mods & EGG_VIRTUAL_SHIFT_MASK) l += sizeof (text_shift) - 1; if (accelerator_mods & EGG_VIRTUAL_CONTROL_MASK) l += sizeof (text_control) - 1; if (accelerator_mods & EGG_VIRTUAL_ALT_MASK) l += sizeof (text_mod1) - 1; if (accelerator_mods & EGG_VIRTUAL_MOD2_MASK) l += sizeof (text_mod2) - 1; if (accelerator_mods & EGG_VIRTUAL_MOD3_MASK) l += sizeof (text_mod3) - 1; if (accelerator_mods & EGG_VIRTUAL_MOD4_MASK) l += sizeof (text_mod4) - 1; if (accelerator_mods & EGG_VIRTUAL_MOD5_MASK) l += sizeof (text_mod5) - 1; if (accelerator_mods & EGG_VIRTUAL_META_MASK) l += sizeof (text_meta) - 1; if (accelerator_mods & EGG_VIRTUAL_HYPER_MASK) l += sizeof (text_hyper) - 1; if (accelerator_mods & EGG_VIRTUAL_SUPER_MASK) l += sizeof (text_super) - 1; l += strlen (keyval_name); accelerator = g_new (gchar, l + 1); l = 0; accelerator[l] = 0; if (accelerator_mods & EGG_VIRTUAL_RELEASE_MASK) { strcpy (accelerator + l, text_release); l += sizeof (text_release) - 1; } if (accelerator_mods & EGG_VIRTUAL_SHIFT_MASK) { strcpy (accelerator + l, text_shift); l += sizeof (text_shift) - 1; } if (accelerator_mods & EGG_VIRTUAL_CONTROL_MASK) { strcpy (accelerator + l, text_control); l += sizeof (text_control) - 1; } if (accelerator_mods & EGG_VIRTUAL_ALT_MASK) { strcpy (accelerator + l, text_mod1); l += sizeof (text_mod1) - 1; } if (accelerator_mods & EGG_VIRTUAL_MOD2_MASK) { strcpy (accelerator + l, text_mod2); l += sizeof (text_mod2) - 1; } if (accelerator_mods & EGG_VIRTUAL_MOD3_MASK) { strcpy (accelerator + l, text_mod3); l += sizeof (text_mod3) - 1; } if (accelerator_mods & EGG_VIRTUAL_MOD4_MASK) { strcpy (accelerator + l, text_mod4); l += sizeof (text_mod4) - 1; } if (accelerator_mods & EGG_VIRTUAL_MOD5_MASK) { strcpy (accelerator + l, text_mod5); l += sizeof (text_mod5) - 1; } if (accelerator_mods & EGG_VIRTUAL_META_MASK) { strcpy (accelerator + l, text_meta); l += sizeof (text_meta) - 1; } if (accelerator_mods & EGG_VIRTUAL_HYPER_MASK) { strcpy (accelerator + l, text_hyper); l += sizeof (text_hyper) - 1; } if (accelerator_mods & EGG_VIRTUAL_SUPER_MASK) { strcpy (accelerator + l, text_super); l += sizeof (text_super) - 1; } strcpy (accelerator + l, keyval_name); return accelerator; } void egg_keymap_resolve_virtual_modifiers (GdkKeymap *keymap, EggVirtualModifierType virtual_mods, GdkModifierType *concrete_mods) { GdkModifierType concrete; int i; const EggModmap *modmap; g_return_if_fail (GDK_IS_KEYMAP (keymap)); g_return_if_fail (concrete_mods != NULL); modmap = egg_keymap_get_modmap (keymap); /* Not so sure about this algorithm. */ concrete = 0; i = 0; while (i < EGG_MODMAP_ENTRY_LAST) { if (modmap->mapping[i] & virtual_mods) concrete |= (1 << i); ++i; } *concrete_mods = concrete; } void egg_keymap_virtualize_modifiers (GdkKeymap *keymap, GdkModifierType concrete_mods, EggVirtualModifierType *virtual_mods) { GdkModifierType virtual; int i; const EggModmap *modmap; g_return_if_fail (GDK_IS_KEYMAP (keymap)); g_return_if_fail (virtual_mods != NULL); modmap = egg_keymap_get_modmap (keymap); /* Not so sure about this algorithm. */ virtual = 0; i = 0; while (i < EGG_MODMAP_ENTRY_LAST) { if ((1 << i) & concrete_mods) { EggVirtualModifierType cleaned; cleaned = modmap->mapping[i] & ~(EGG_VIRTUAL_MOD2_MASK | EGG_VIRTUAL_MOD3_MASK | EGG_VIRTUAL_MOD4_MASK | EGG_VIRTUAL_MOD5_MASK); if (cleaned != 0) { virtual |= cleaned; } else { /* Rather than dropping mod2->mod5 if not bound, * go ahead and use the concrete names */ virtual |= modmap->mapping[i]; } } ++i; } *virtual_mods = virtual; } static void reload_modmap (GdkKeymap *keymap, EggModmap *modmap) { XModifierKeymap *xmodmap; int map_size; int i; /* FIXME multihead */ xmodmap = XGetModifierMapping (gdk_x11_get_default_xdisplay ()); memset (modmap->mapping, 0, sizeof (modmap->mapping)); /* there are 8 modifiers, and the first 3 are shift, shift lock, * and control */ map_size = 8 * xmodmap->max_keypermod; i = 3 * xmodmap->max_keypermod; while (i < map_size) { /* get the key code at this point in the map, * see if its keysym is one we're interested in */ int keycode = xmodmap->modifiermap[i]; GdkKeymapKey *keys; guint *keyvals; int n_entries; int j; EggVirtualModifierType mask; keys = NULL; keyvals = NULL; n_entries = 0; gdk_keymap_get_entries_for_keycode (keymap, keycode, &keys, &keyvals, &n_entries); mask = 0; j = 0; while (j < n_entries) { if (keyvals[j] == GDK_Num_Lock) mask |= EGG_VIRTUAL_NUM_LOCK_MASK; else if (keyvals[j] == GDK_Scroll_Lock) mask |= EGG_VIRTUAL_SCROLL_LOCK_MASK; else if (keyvals[j] == GDK_Meta_L || keyvals[j] == GDK_Meta_R) mask |= EGG_VIRTUAL_META_MASK; else if (keyvals[j] == GDK_Hyper_L || keyvals[j] == GDK_Hyper_R) mask |= EGG_VIRTUAL_HYPER_MASK; else if (keyvals[j] == GDK_Super_L || keyvals[j] == GDK_Super_R) mask |= EGG_VIRTUAL_SUPER_MASK; else if (keyvals[j] == GDK_Mode_switch) mask |= EGG_VIRTUAL_MODE_SWITCH_MASK; ++j; } /* Mod1Mask is 1 << 3 for example, i.e. the * fourth modifier, i / keyspermod is the modifier * index */ modmap->mapping[i/xmodmap->max_keypermod] |= mask; g_free (keyvals); g_free (keys); ++i; } /* Add in the not-really-virtual fixed entries */ modmap->mapping[EGG_MODMAP_ENTRY_SHIFT] |= EGG_VIRTUAL_SHIFT_MASK; modmap->mapping[EGG_MODMAP_ENTRY_CONTROL] |= EGG_VIRTUAL_CONTROL_MASK; modmap->mapping[EGG_MODMAP_ENTRY_LOCK] |= EGG_VIRTUAL_LOCK_MASK; modmap->mapping[EGG_MODMAP_ENTRY_MOD1] |= EGG_VIRTUAL_ALT_MASK; modmap->mapping[EGG_MODMAP_ENTRY_MOD2] |= EGG_VIRTUAL_MOD2_MASK; modmap->mapping[EGG_MODMAP_ENTRY_MOD3] |= EGG_VIRTUAL_MOD3_MASK; modmap->mapping[EGG_MODMAP_ENTRY_MOD4] |= EGG_VIRTUAL_MOD4_MASK; modmap->mapping[EGG_MODMAP_ENTRY_MOD5] |= EGG_VIRTUAL_MOD5_MASK; XFreeModifiermap (xmodmap); } const EggModmap* egg_keymap_get_modmap (GdkKeymap *keymap) { EggModmap *modmap; /* This is all a hack, much simpler when we can just * modify GDK directly. */ modmap = g_object_get_data (G_OBJECT (keymap), "egg-modmap"); if (modmap == NULL) { modmap = g_new0 (EggModmap, 1); /* FIXME modify keymap change events with an event filter * and force a reload if we get one */ reload_modmap (keymap, modmap); g_object_set_data_full (G_OBJECT (keymap), "egg-modmap", modmap, g_free); } g_assert (modmap != NULL); return modmap; } ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������zapping-0.10cvs6/src/eggaccelerators.h�������������������������������������������������������������� 644 � 764 � 144 � 6016 7762173334 13076� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* eggaccelerators.h * Copyright (C) 2002 Red Hat, Inc. * Developed by Havoc Pennington * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #ifndef __EGG_ACCELERATORS_H__ #define __EGG_ACCELERATORS_H__ #include <gtk/gtkaccelgroup.h> #include <gdk/gdk.h> G_BEGIN_DECLS /* Where a value is also in GdkModifierType we coincide, * otherwise we don't overlap. */ typedef enum { EGG_VIRTUAL_SHIFT_MASK = 1 << 0, EGG_VIRTUAL_LOCK_MASK = 1 << 1, EGG_VIRTUAL_CONTROL_MASK = 1 << 2, EGG_VIRTUAL_ALT_MASK = 1 << 3, /* fixed as Mod1 */ EGG_VIRTUAL_MOD2_MASK = 1 << 4, EGG_VIRTUAL_MOD3_MASK = 1 << 5, EGG_VIRTUAL_MOD4_MASK = 1 << 6, EGG_VIRTUAL_MOD5_MASK = 1 << 7, #if 0 GDK_BUTTON1_MASK = 1 << 8, GDK_BUTTON2_MASK = 1 << 9, GDK_BUTTON3_MASK = 1 << 10, GDK_BUTTON4_MASK = 1 << 11, GDK_BUTTON5_MASK = 1 << 12, /* 13, 14 are used by Xkb for the keyboard group */ #endif EGG_VIRTUAL_META_MASK = 1 << 24, EGG_VIRTUAL_SUPER_MASK = 1 << 25, EGG_VIRTUAL_HYPER_MASK = 1 << 26, EGG_VIRTUAL_MODE_SWITCH_MASK = 1 << 27, EGG_VIRTUAL_NUM_LOCK_MASK = 1 << 28, EGG_VIRTUAL_SCROLL_LOCK_MASK = 1 << 29, /* Also in GdkModifierType */ EGG_VIRTUAL_RELEASE_MASK = 1 << 30, /* 28-31 24-27 20-23 16-19 12-15 8-11 4-7 0-3 * 7 f 0 0 0 0 f f */ EGG_VIRTUAL_MODIFIER_MASK = 0x7f0000ff } EggVirtualModifierType; gboolean egg_accelerator_parse_virtual (const gchar *accelerator, guint *accelerator_key, EggVirtualModifierType *accelerator_mods); void egg_keymap_resolve_virtual_modifiers (GdkKeymap *keymap, EggVirtualModifierType virtual_mods, GdkModifierType *concrete_mods); void egg_keymap_virtualize_modifiers (GdkKeymap *keymap, GdkModifierType concrete_mods, EggVirtualModifierType *virtual_mods); gchar* egg_virtual_accelerator_name (guint accelerator_key, EggVirtualModifierType accelerator_mods); G_END_DECLS #endif /* __EGG_ACCELERATORS_H__ */ ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������zapping-0.10cvs6/src/plugin_common.h���������������������������������������������������������������� 644 � 764 � 144 � 11210 10305456046 12631� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Zapping (TV viewer for the Gnome Desktop) * Copyright (C) 2000 Iaki Garca Etxebarria * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* Structures shared by Zapping and the plugins */ #ifndef __PLUGINS_COMMON_H__ #define __PLUGINS_COMMON_H__ #ifdef HAVE_CONFIG_H # include "config.h" /* VERSION */ #endif #include <gnome.h> #ifdef HAVE_LIBZVBI # include <libzvbi.h> #endif #include "tveng.h" #include "zmisc.h" #include "zconf.h" #include "interface.h" #include "remote.h" #include "x11stuff.h" #include "common/fifo.h" #include "capture.h" #include "frequencies.h" #include "globals.h" /* The plugin protocol we are able to understand */ #define PLUGIN_PROTOCOL 0xA00 /* The definition of a PluginBrigde */ typedef gboolean (*PluginBridge) ( gpointer * ptr, gchar * plugin, gchar * symbol, gchar * type, gint hash ); /* This structure holds info about one of the exported symbols of the plugin */ struct plugin_exported_symbol { gpointer ptr; /* The resolved symbol */ const gchar * symbol; /* The name of the symbol */ const gchar * description; /* A brief description for the symbol */ const gchar * type; /* Symbol type */ gint hash; /* Symbol hash */ }; /* Use this flags to describe your plugin. OR any convenient flags. */ #define PLUGIN_CATEGORY_AUDIO_OUT (1<<0) /* Sends audio to other device */ #define PLUGIN_CATEGORY_AUDIO_PROCESS (1<<1) /* Processes audio */ #define PLUGIN_CATEGORY_VIDEO_OUT (1<<2) /* Sends video to other device */ #define PLUGIN_CATEGORY_VIDEO_PROCESS (1<<3) /* Processes the video stream */ #define PLUGIN_CATEGORY_DEVICE_CONTROL (1<<4) /* Controls the video device */ #define PLUGIN_CATEGORY_FILTER (1<<5) /* Provides filters */ #define PLUGIN_CATEGORY_GUI (1<<6) /* Modifies the GUI */ /* This struct holds some misc info about the plugin. If it exists, all fields must be set correctly upon return. */ struct plugin_misc_info { guint size; /* Size of this structure */ gint plugin_priority; /* Priority the plugin requests */ gint plugin_category; /* Categories the plugin falls under */ }; extern void plugin_add_key (const gchar * canonical_name, z_key key, void (* func)(void)); #ifndef ZAPPING_SRC /* If this is being included from a plugin, give them the correct prototypes for public symbols ( so compiling will give an error if defined differently) */ gint plugin_get_protocol (void); gboolean plugin_get_symbol(const gchar * name, gint hash, gpointer * ptr); #if 0 #define UNUSED __attribute__ ((unused)) static gboolean plugin_running ( void ) UNUSED; static void plugin_get_info ( const gchar ** canonical_name, const gchar ** descriptive_name, const gchar ** description, const gchar ** short_description, const gchar ** author, const gchar ** version ) UNUSED ; static gboolean plugin_init ( PluginBridge bridge, tveng_device_info * info ) UNUSED ; static void plugin_close( void ) UNUSED ; static gboolean plugin_start ( void ) UNUSED ; static void plugin_stop( void ) UNUSED ; static void plugin_load_config ( gchar * root_key ) UNUSED ; static void plugin_save_config ( gchar * root_key ) UNUSED ; static void plugin_read_frame ( capture_frame * frame ) UNUSED ; static void plugin_capture_start( void ) UNUSED ; static void plugin_capture_stop( void ) UNUSED ; static gboolean plugin_get_public_info (gint index, gpointer * ptr, gchar ** symbol, gchar ** description, gchar ** type, gint * hash) UNUSED ; static void plugin_add_gui ( GnomeApp * app ) UNUSED ; static void plugin_remove_gui ( GnomeApp * app ) UNUSED ; static struct plugin_misc_info * plugin_get_misc_info ( void ) UNUSED ; static void plugin_process_popup_menu ( GtkWidget *window, GdkEventButton *button, GtkMenu *popup) UNUSED; #endif /* This macro if for your convenience, it symplifies adding symbols */ #define SYMBOL(symbol, hash) \ {(void *) symbol, #symbol, NULL, NULL, hash} #define SYMBOL2(prefix, symbol) \ {(void *) prefix##_##symbol, #symbol, NULL, NULL, 0x1234 } #endif #endif /* PLUGINS_COMMON */ ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������zapping-0.10cvs6/src/channel_editor.c��������������������������������������������������������������� 644 � 764 � 144 � 147514 10400112413 12754� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Zapping (TV viewer for the Gnome Desktop) * Copyright (C) 2002 Iaki Garca Etxebarria * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* $Id: channel_editor.c,v 1.51 2006/02/25 17:34:03 mschimek Exp $ */ /* TODO: * input type icon * dnd * write lock channel list * notify other modules (ttx bookmarks, schedule etc) about changes * device column * wizard * channel merging e.g. 12 FooBar + key + dev1 tuner E5 fine key + dev2 tuner E5 fine key */ /* XXX gtk+ 2.3 GtkOptionMenu */ #undef GTK_DISABLE_DEPRECATED #ifdef HAVE_CONFIG_H # include "config.h" #endif #include <gnome.h> #define ZCONF_DOMAIN "/zapping/internal/properties/" #include "zconf.h" #include "zmisc.h" #include "zspinslider.h" #include "remote.h" #include "frequencies.h" #include "globals.h" #include "zvbi.h" #include "v4linterface.h" #include "i18n.h" #include "xawtv.h" #include "channel_editor.h" typedef struct station_search station_search; struct station_search { GtkDialog * station_search; GtkLabel * label; GtkProgressBar * progressbar; guint timeout_handle; tv_rf_channel ch; guint channel; guint found; guint iteration; guint frequ; gint strength; gint afc; }; struct country { gchar * table_name; gchar * gui_name; }; enum { FL_NAME, FL_FREQ, FL_NUM_COLUMNS }; typedef struct channel_editor channel_editor; struct channel_editor { GtkDialog * channel_editor; GtkBox * vbox; GtkOptionMenu * country_menu; GArray * country_table; GtkButton * channel_search; GtkButton * add_all_channels; GtkButton * import_xawtv; GtkTreeView * freq_treeview; GtkListStore * freq_model; GtkTreeSelection * freq_selection; GtkTreeView * channel_treeview; GtkListStore * channel_model; GtkTreeSelection * channel_selection; GtkWidget * channel_up; GtkWidget * channel_down; GtkWidget * channel_add; GtkWidget * channel_remove; GtkTable * entry_table; GtkEntry * entry_name; ZSpinSlider * entry_fine_tuning; GtkOptionMenu * entry_standard; GtkOptionMenu * entry_input; GtkWidget * entry_accel; /* z_key_entry */ GtkTooltips * tooltips; tveng_tuned_channel * old_channel_list; station_search * search; gboolean have_tuners; }; #define DONT_CHANGE 0 #define BLOCK(object, signal, statement) \ SIGNAL_HANDLER_BLOCK(ce->object, \ (gpointer) on_ ## object ## _ ## signal, statement) static GtkMenu * create_standard_menu (channel_editor * ce); static GtkListStore * create_freq_list_model (const tv_rf_channel * table); static void on_channel_selection_changed (GtkTreeSelection * selection, channel_editor * ce); static channel_editor * dialog_running; /* * Misc helpers */ static gboolean tunable_input (channel_editor * ce, const tveng_device_info *info, const tveng_tuned_channel *tc) { const tv_video_line *l; if (!ce->have_tuners) return FALSE; if (tc->input == DONT_CHANGE) return TRUE; l = tv_video_input_by_hash ((tveng_device_info *) info, tc->input); return (l && l->type == TV_VIDEO_LINE_TYPE_TUNER); } #define VALID_ITER(iter, list_store) \ ((iter) != NULL \ && (iter)->user_data != NULL \ && ((GTK_LIST_STORE (list_store))->stamp == (iter)->stamp)) static inline guint tree_model_index (GtkTreeModel * model, GtkTreeIter * iter) { GtkTreePath *path; guint row; path = gtk_tree_model_get_path (model, iter); row = gtk_tree_path_get_indices (path)[0]; gtk_tree_path_free (path); return row; } static inline tveng_tuned_channel * tree_model_tuned_channel (GtkTreeModel * model, GtkTreeIter * iter) { return tveng_tuned_channel_nth (global_channel_list, tree_model_index (model, iter)); } /* function where are thou? */ static gboolean tree_model_get_iter_last (GtkTreeModel * model, GtkTreeIter * iter) { GtkTreeIter iter2; if (!gtk_tree_model_get_iter_first (model, iter)) return FALSE; iter2 = *iter; do *iter = iter2; while (gtk_tree_model_iter_next (model, &iter2)); return TRUE; } static gboolean tree_model_iter_prev (GtkTreeModel * model, GtkTreeIter * iter) { GtkTreePath *path; gboolean r; path = gtk_tree_model_get_path (model, iter); if ((r = gtk_tree_path_prev (path))) gtk_tree_model_get_iter (model, iter, path); gtk_tree_path_free (path); return r; } /* * Channel list helpers */ static inline guint channel_list_index (const channel_editor * ce, GtkTreeIter * iter) { return tree_model_index (GTK_TREE_MODEL (ce->channel_model), iter); } static void channel_list_scroll_to_cell (const channel_editor * ce, GtkTreeIter * iter, gfloat row_align) { GtkTreePath *path; if ((path = gtk_tree_model_get_path (GTK_TREE_MODEL (ce->channel_model), iter))) { gtk_tree_view_scroll_to_cell (ce->channel_treeview, path, NULL, /* use_align */ TRUE, row_align, 0.0); gtk_tree_path_free (path); } } static void channel_list_rows_changed (channel_editor * ce, GtkTreeIter * first_iter, GtkTreeIter * last_iter) { GtkTreeModel *model = GTK_TREE_MODEL (ce->channel_model); GtkTreeIter iter; GtkTreePath *path, *last_path; if (!last_iter) last_iter = first_iter; iter = *first_iter; path = gtk_tree_model_get_path (model, first_iter); last_path = gtk_tree_model_get_path (model, last_iter); do { gtk_tree_model_row_changed (model, path, &iter); if (!gtk_tree_model_iter_next (model, &iter)) break; gtk_tree_path_next (path); } while (gtk_tree_path_compare (path, last_path) <= 0); gtk_tree_path_free (last_path); gtk_tree_path_free (path); } static tveng_tuned_channel * channel_list_get_tuned_channel (const channel_editor * ce, GtkTreeIter * iter) { tveng_tuned_channel *tc; guint index; index = channel_list_index (ce, iter); tc = tveng_tuned_channel_nth (global_channel_list, index); g_assert (tc != NULL); return tc; } static gboolean channel_list_get_selection (const channel_editor * ce, GtkTreeIter * iter_first, GtkTreeIter * iter_last, tveng_tuned_channel ** tc_first, tveng_tuned_channel ** tc_last) { GtkTreeIter iter, last; if (!z_tree_selection_iter_first (ce->channel_selection, GTK_TREE_MODEL (ce->channel_model), &iter)) return FALSE; /* nothing selected */ if (iter_first) *iter_first = iter; if (tc_first) *tc_first = channel_list_get_tuned_channel (ce, &iter); if (iter_last || tc_last) { if (!iter_last) iter_last = &last; do { *iter_last = iter; if (!gtk_tree_model_iter_next (GTK_TREE_MODEL (ce->channel_model), &iter)) break; } while (gtk_tree_selection_iter_is_selected (ce->channel_selection, &iter)); if (tc_last) *tc_last = channel_list_get_tuned_channel (ce, iter_last); } return TRUE; } static gchar * rf_channel_string (const tveng_tuned_channel *tc) { return g_strdup_printf ("%s %.2f MHz", tc->rf_name, tc->frequ / 1e6); } static void channel_list_add_tuned_channel (channel_editor * ce, tveng_tuned_channel ** list, const tveng_tuned_channel *tc) { GtkTreeModel *model = GTK_TREE_MODEL (ce->channel_model); GtkTreeIter iter; GtkTreePath *path; tveng_tuned_channel *tci; guint i; /* * Don't add when this channel (by tuner freq) is already * listed. Eventually update the station name. */ for (i = 0; (tci = tveng_tuned_channel_nth (*list, i)); i++) { if (tci->input != tc->input) continue; if (tunable_input (ce, zapping->info, tc) && abs ((int)(tci->frequ - tc->frequ)) > 3000000) continue; gtk_tree_model_iter_nth_child (model, &iter, NULL, (gint) i); path = gtk_tree_model_get_path (model, &iter); gtk_tree_view_scroll_to_cell (ce->channel_treeview, path, NULL, /* use_align */ TRUE, 0.5, 0.0); gtk_tree_path_free (path); if (0 != strcmp (tci->name, tci->rf_name)) return; /* user changed station name */ if (0 == strcmp (tc->name, tci->rf_name)) return; /* we have no station name */ /* gtk_list_store_set (ce->channel_model, &iter, CL_NAME, tc->name, -1); */ g_free (tci->name); tci->name = g_strdup (tc->name); return; } tveng_tuned_channel_insert (list, tveng_tuned_channel_new (tc), G_MAXINT); gtk_list_store_append (ce->channel_model, &iter); channel_list_scroll_to_cell (ce, &iter, 0.5); } /* * Dialog helpers */ static void entry_fine_tuning_set (channel_editor * ce, const tveng_device_info *info, guint frequency) { GtkAdjustment *spin_adj; GtkAdjustment *hscale_adj; const tv_video_line *vi; spin_adj = ce->entry_fine_tuning->spin_adj; hscale_adj = ce->entry_fine_tuning->hscale_adj; if (frequency > 0) { double dfreq; frequency += 500; frequency -= frequency % 1000; dfreq = frequency * 1e-6; /* MHz */ spin_adj->value = dfreq; spin_adj->lower = 5; spin_adj->upper = 1999; spin_adj->step_increment = 0.05; spin_adj->page_increment = 1; spin_adj->page_size = 0; hscale_adj->value = dfreq; hscale_adj->lower = dfreq - 4; hscale_adj->upper = dfreq + 4; hscale_adj->step_increment = 0.05; /* XXX use tv_video_line.u.tuner.step ? */ hscale_adj->page_increment = 1; hscale_adj->page_size = 0; gtk_adjustment_changed (spin_adj); gtk_adjustment_value_changed (spin_adj); gtk_adjustment_changed (hscale_adj); gtk_adjustment_value_changed (hscale_adj); z_spinslider_set_reset_value (ce->entry_fine_tuning, dfreq); } vi = tv_cur_video_input (info); if (0 == frequency || NULL == vi || vi->type != TV_VIDEO_LINE_TYPE_TUNER) gtk_widget_set_sensitive (GTK_WIDGET (ce->entry_fine_tuning), FALSE); else gtk_widget_set_sensitive (GTK_WIDGET (ce->entry_fine_tuning), TRUE); } static void no_channel_selected (channel_editor * ce) { gtk_widget_set_sensitive (ce->channel_up, FALSE); gtk_widget_set_sensitive (ce->channel_down, FALSE); gtk_widget_set_sensitive (ce->channel_remove, FALSE); gtk_entry_set_text (ce->entry_name, ""); z_option_menu_set_active (GTK_WIDGET (ce->entry_standard), 0); z_option_menu_set_active (GTK_WIDGET (ce->entry_input), 0); z_key_entry_set_key (ce->entry_accel, Z_KEY_NONE); gtk_widget_set_sensitive (GTK_WIDGET (ce->entry_table), FALSE); } static void channel_buttons_set_sensitive (channel_editor * ce, gboolean any_selected) { GtkTreeIter iter; if (!gtk_tree_model_get_iter_first (GTK_TREE_MODEL (ce->channel_model), &iter)) { no_channel_selected (ce); return; } gtk_widget_set_sensitive (ce->channel_up, !gtk_tree_selection_iter_is_selected (ce->channel_selection, &iter)); tree_model_get_iter_last (GTK_TREE_MODEL (ce->channel_model), &iter); gtk_widget_set_sensitive (ce->channel_down, !gtk_tree_selection_iter_is_selected (ce->channel_selection, &iter)); gtk_widget_set_sensitive (ce->channel_remove, any_selected); } /* * Signals */ static void current_rf_channel_table (channel_editor * ce, tv_rf_channel * ch, const gchar ** rf_table) { struct country *c; guint i; i = z_option_menu_get_active (GTK_WIDGET (ce->country_menu)); c = &g_array_index (ce->country_table, struct country, i); if (rf_table) *rf_table = c->table_name; if (!tv_rf_channel_table_by_name (ch, c->table_name)) g_assert_not_reached (); } static void on_country_menu_changed (GtkOptionMenu * country_menu _unused_, channel_editor * ce) { tv_rf_channel ch; const gchar *rf_table; current_rf_channel_table (ce, &ch, &rf_table); zconf_set_string (rf_table, "/zapping/options/main/current_country"); zconf_set_int (tv_rf_channel_align (&ch) ? 1 : 0, "/zapping/options/main/channel_txl"); ce->freq_model = create_freq_list_model (&ch); gtk_tree_view_set_model (ce->freq_treeview, GTK_TREE_MODEL (ce->freq_model)); } static void on_station_search_cancel_clicked (GtkButton * cancel _unused_, channel_editor * ce) { if (ce->search) gtk_widget_destroy (GTK_WIDGET (ce->search->station_search)); } static void on_station_search_destroy (GtkObject * unused _unused_, channel_editor * ce) { if (ce->search) { gtk_timeout_remove (ce->search->timeout_handle); g_free (ce->search); ce->search = NULL; } gtk_widget_set_sensitive (GTK_WIDGET (ce->vbox), TRUE); } static gboolean station_search_timeout (gpointer p) { channel_editor *ce = p; station_search *cs = ce->search; tveng_tuned_channel tc; gchar *station_name; if (!(cs = ce->search)) return FALSE; if (cs->iteration == 0) { guint size; gdouble progress; /* New channel */ size = tv_rf_channel_table_size (&cs->ch); progress = cs->channel / (gdouble) size; gtk_progress_bar_set_fraction (cs->progressbar, progress); z_label_set_text_printf (cs->label, _("Channel: %s Found: %u"), cs->ch.channel_name, cs->found); cs->frequ = cs->ch.frequency; cs->strength = 0; if (!tv_set_tuner_frequency (zapping->info, cs->frequ)) goto next_channel; } else { gint strength, afc; /* Probe */ if (!tv_get_signal_strength (zapping->info, &strength, &afc)) goto next_channel; if (strength > 0) { cs->strength = strength; } else if (cs->iteration >= 5 && cs->strength == 0) { goto next_channel; /* no signal after 0.5 sec */ } if (afc && (afc != -cs->afc)) { cs->afc = afc; cs->frequ += afc * 25000; /* should be afc*50000, but won't harm */ /* error ignored */ tv_set_tuner_frequency (zapping->info, cs->frequ); } #ifdef HAVE_LIBZVBI if (cs->iteration >= 3) { if (cs->iteration == 3) { /* zvbi should store the station name if known from now */ zvbi_name_unknown(); } else { if ((station_name = zvbi_get_name ())) { goto add_station; } /* How long for XDS? */ if (cs->iteration >= 30) goto add_default; /* no name after 3.0 sec */ } } #else if (cs->iteration >= 10) goto add_default; /* after 1 sec afc */ #endif } ++cs->iteration; return TRUE; /* continue */ add_default: station_name = g_strdup (cs->ch.channel_name); add_station: CLEAR (tc); tc.name = station_name; tc.rf_name = (gchar *) cs->ch.channel_name; tc.rf_table = (gchar *) cs->ch.table_name; tc.frequ = cs->frequ; channel_list_add_tuned_channel (ce, &global_channel_list, &tc); g_free (station_name); cs->found++; next_channel: cs->channel++; cs->iteration = 0; if (!tv_rf_channel_next (&cs->ch)) { gtk_widget_destroy (GTK_WIDGET (cs->station_search)); return FALSE; /* remove timer */ } return TRUE; /* continue */ } static void on_channel_search_clicked (GtkButton * search _unused_, channel_editor * ce) { station_search *cs; GtkWidget *dialog_vbox; GtkWidget *vbox; GtkWidget *dialog_action_area; GtkWidget *cancel; tv_video_line *l; if (ce->search) return; /* XXX we cannot search in Xv mode because there's no signal strength. Or is there? tveng should also tell in advance if this call will fail, so we can disable the option. */ if (-1 == zmisc_switch_mode (DISPLAY_MODE_WINDOW, CAPTURE_MODE_READ, zapping->info, /* warnings */ TRUE)) return; cs = g_malloc (sizeof (station_search)); ce->search = cs; cs->found = 0; cs->station_search = GTK_DIALOG (gtk_dialog_new ()); gtk_window_set_title (GTK_WINDOW (cs->station_search), _("Searching...")); g_signal_connect (G_OBJECT (cs->station_search), "destroy", G_CALLBACK (on_station_search_destroy), ce); dialog_vbox = cs->station_search->vbox; gtk_widget_show (dialog_vbox); vbox = gtk_vbox_new (FALSE, 3); gtk_widget_show (vbox); gtk_box_pack_start (GTK_BOX (dialog_vbox), vbox, TRUE, TRUE, 0); cs->label = GTK_LABEL (gtk_label_new ("")); gtk_widget_show (GTK_WIDGET (cs->label)); gtk_box_pack_start (GTK_BOX (vbox), GTK_WIDGET (cs->label), FALSE, FALSE, 0); cs->progressbar = GTK_PROGRESS_BAR (gtk_progress_bar_new ()); gtk_widget_show (GTK_WIDGET (cs->progressbar)); gtk_progress_bar_set_fraction (cs->progressbar, 0.0); gtk_box_pack_start (GTK_BOX (vbox), GTK_WIDGET (cs->progressbar), FALSE, FALSE, 0); dialog_action_area = cs->station_search->action_area; gtk_widget_show (dialog_action_area); gtk_button_box_set_layout (GTK_BUTTON_BOX (dialog_action_area), GTK_BUTTONBOX_END); cancel = gtk_button_new_from_stock (GTK_STOCK_STOP); gtk_widget_show (cancel); gtk_dialog_add_action_widget (cs->station_search, cancel, 0); g_signal_connect (G_OBJECT (cancel), "clicked", G_CALLBACK (on_station_search_cancel_clicked), ce); gtk_widget_show (GTK_WIDGET (cs->station_search)); gtk_widget_set_sensitive (GTK_WIDGET (ce->vbox), FALSE); current_rf_channel_table (ce, &cs->ch, NULL); cs->channel = 0; cs->iteration = 0; for (l = tv_next_video_input (zapping->info, NULL); l; l = tv_next_video_input (zapping->info, l)) if (l->type == TV_VIDEO_LINE_TYPE_TUNER) break; g_assert (l != NULL); tv_set_video_input (zapping->info, l); /* XXX consider multiple tuners */ cs->timeout_handle = gtk_timeout_add (100 /* ms */, station_search_timeout, ce); } static void on_add_all_channels_clicked (GtkButton * add_all_channels _unused_, channel_editor * ce) { tv_rf_channel ch; tveng_tuned_channel tc; gboolean align; CLEAR (tc); current_rf_channel_table (ce, &ch, NULL); align = tv_rf_channel_align (&ch); if (align) { GtkTreeIter iter; gint added; added = tveng_tuned_channel_num (global_channel_list); do if (g_ascii_isdigit (ch.channel_name[0])) { tc.name = (gchar *) ch.channel_name; tc.rf_name = (gchar *) ch.channel_name; tc.rf_table = (gchar *) ch.table_name; tc.frequ = ch.frequency; tveng_tuned_channel_replace (&global_channel_list, tveng_tuned_channel_new (&tc), strtoul (ch.channel_name, NULL, 0)); } while (tv_rf_channel_next (&ch)); added = tveng_tuned_channel_num (global_channel_list) - added; while (added-- > 0) gtk_list_store_append (ce->channel_model, &iter); tv_rf_channel_first (&ch); } do if (!align || !g_ascii_isdigit (ch.channel_name[0])) { tc.name = (gchar *) ch.channel_name; tc.rf_name = (gchar *) ch.channel_name; tc.rf_table = (gchar *) ch.table_name; tc.frequ = ch.frequency; channel_list_add_tuned_channel (ce, &global_channel_list, &tc); } while (tv_rf_channel_next (&ch)); } static void on_import_xawtv_clicked (GtkButton * add_all_channels _unused_, channel_editor * ce) { GtkTreeIter iter; guint i; /* XXX error ignored */ xawtv_import_config (zapping->info, &global_channel_list); gtk_list_store_clear (ce->channel_model); for (i = tveng_tuned_channel_num (global_channel_list); i > 0; --i) gtk_list_store_append (ce->channel_model, &iter); } static void on_freq_selection_changed (GtkTreeSelection * selection, channel_editor * ce) { GtkTreeIter first, last; GtkTreeIter freq_iter; tveng_tuned_channel *tc, *tc_first, *tc_last; tv_rf_channel ch; gchar *name; gboolean success; if (!gtk_tree_selection_get_selected (selection, NULL, &freq_iter)) return; if (!channel_list_get_selection (ce, &first, &last, &tc_first, &tc_last)) return; gtk_tree_model_get (GTK_TREE_MODEL (ce->freq_model), &freq_iter, FL_NAME, &name, -1); current_rf_channel_table (ce, &ch, NULL); success = tv_rf_channel_by_name (&ch, name); g_free (name); if (!success) return; for (tc = tc_first;; tc = tc->next) { if (0 != strcmp (tc->rf_table, ch.table_name)) { g_free (tc->rf_table); tc->rf_table = g_strdup (ch.table_name); } if (0 != strcmp (tc->rf_name, ch.channel_name)) { g_free (tc->rf_name); tc->rf_name = g_strdup (ch.channel_name); } tc->frequ = ch.frequency; if (tc == tc_last) break; } if (tunable_input (ce, zapping->info, tc_first)) { entry_fine_tuning_set (ce, zapping->info, ch.frequency); tv_set_tuner_frequency (zapping->info, ch.frequency); } channel_list_rows_changed (ce, &first, &last); } static void on_channel_up_clicked (GtkButton * channel_up _unused_, channel_editor * ce) { GtkTreeIter dummy, first, last, first_prev; tveng_tuned_channel *tc; guint index; if (!channel_list_get_selection (ce, &first, &last, NULL, NULL)) return; if (!tree_model_iter_prev (GTK_TREE_MODEL (ce->channel_model), &first)) return; /* nothing above */ tc = channel_list_get_tuned_channel (ce, &first); index = channel_list_index (ce, &last) + 1; tveng_tuned_channel_move (&global_channel_list, tc, index); gtk_list_store_insert_after (ce->channel_model, &dummy, &last); gtk_list_store_remove (ce->channel_model, &first); channel_list_get_selection (ce, &first, NULL, NULL, NULL); first_prev = first; if (!tree_model_iter_prev (GTK_TREE_MODEL (ce->channel_model), &first_prev)) first_prev = first; channel_list_scroll_to_cell (ce, &first_prev, 0.01); channel_buttons_set_sensitive (ce, TRUE); } static void on_channel_down_clicked (GtkButton * channel_down _unused_, channel_editor * ce) { GtkTreeIter dummy, first, last, last_next; tveng_tuned_channel *tc; guint index; if (!channel_list_get_selection (ce, &first, &last, NULL, NULL)) return; if (!gtk_tree_model_iter_next (GTK_TREE_MODEL (ce->channel_model), &last)) return; /* nothing below */ tc = channel_list_get_tuned_channel (ce, &last); index = channel_list_index (ce, &first); tveng_tuned_channel_move (&global_channel_list, tc, index); gtk_list_store_remove (ce->channel_model, &last); gtk_list_store_insert_before (ce->channel_model, &dummy, &first); channel_list_get_selection (ce, NULL, &last, NULL, NULL); last_next = last; if (!gtk_tree_model_iter_next (GTK_TREE_MODEL (ce->channel_model), &last_next)) last_next = last; channel_list_scroll_to_cell (ce, &last_next, 0.99); channel_buttons_set_sensitive (ce, TRUE); } static void on_channel_add_clicked (GtkButton * channel_add _unused_, channel_editor * ce) { GtkTreeIter iter; if (channel_list_get_selection (ce, &iter, NULL, NULL, NULL)) { tveng_tuned_channel_insert (&global_channel_list, tveng_tuned_channel_new (NULL), channel_list_index (ce, &iter)); gtk_list_store_insert_before (ce->channel_model, &iter, &iter); } else { tveng_tuned_channel_insert (&global_channel_list, tveng_tuned_channel_new (NULL), G_MAXINT); gtk_list_store_append (ce->channel_model, &iter); } gtk_tree_selection_unselect_all (ce->channel_selection); gtk_tree_selection_select_iter (ce->channel_selection, &iter); channel_list_scroll_to_cell (ce, &iter, 0.5); channel_buttons_set_sensitive (ce, TRUE); } static void on_channel_remove_clicked (GtkButton * channel_remove _unused_, channel_editor * ce) { tveng_tuned_channel *tc, *tc_next; GtkTreeIter iter; if (!channel_list_get_selection (ce, &iter, NULL, &tc, NULL)) return; BLOCK (channel_selection, changed, while (VALID_ITER (&iter, ce->channel_model)) { if (!gtk_tree_selection_iter_is_selected (ce->channel_selection, &iter)) break; gtk_list_store_remove (ce->channel_model, &iter); tc_next = tc->next; tveng_tuned_channel_remove (&global_channel_list, tc); tveng_tuned_channel_delete (tc); tc = tc_next; } ); if (VALID_ITER (&iter, ce->channel_model)) { gtk_tree_selection_select_iter (ce->channel_selection, &iter); channel_list_scroll_to_cell (ce, &iter, 0.5); } else { no_channel_selected (ce); } } static void on_entry_name_changed (GtkEditable * channel_name, channel_editor * ce) { tveng_tuned_channel *tc, *tc_last; GtkTreeIter first, last; gchar *name; if (!channel_list_get_selection (ce, &first, &last, &tc, &tc_last)) return; name = gtk_editable_get_chars (channel_name, 0, -1); g_free (tc->name); tc->name = name; while (tc != tc_last) { tc = tc->next; g_free (tc->name); tc->name = g_strdup (name); } channel_list_rows_changed (ce, &first, &last); } static void on_entry_input_changed (GtkOptionMenu * entry_input, channel_editor * ce) { tveng_tuned_channel *tc, *tc_last; GtkTreeIter first, last; guint id; if (!channel_list_get_selection (ce, &first, &last, &tc, &tc_last)) return; id = z_option_menu_get_active (GTK_WIDGET (entry_input)); if (id == DONT_CHANGE) { tc->input = 0; } else { tv_video_line *l; l = tv_nth_video_input (zapping->info, id - 1); tc->input = l->hash; tv_set_video_input (zapping->info, l); } for (; tc_last != tc; tc_last = tc_last->prev) tc_last->input = tc->input; channel_list_rows_changed (ce, &first, &last); } static void on_entry_fine_tuning_value_changed (GtkAdjustment * spin_adj, channel_editor * ce) { tveng_tuned_channel *tc, *tc_last; GtkTreeIter first, last; if (!channel_list_get_selection (ce, &first, &last, &tc, &tc_last)) return; tc->frequ = (guint)(spin_adj->value * 1000000); tv_set_tuner_frequency (zapping->info, tc->frequ); for (; tc_last != tc; tc_last = tc_last->prev) { if (0 != strcmp (tc->rf_name, tc_last->rf_name)) { g_free (tc_last->rf_name); tc_last->rf_name = g_strdup (tc->rf_name); } tc_last->frequ = tc->frequ; } channel_list_rows_changed (ce, &first, &last); } static void on_entry_standard_changed (GtkOptionMenu * entry_standard, channel_editor * ce) { tveng_tuned_channel *tc, *tc_last; GtkTreeIter first, last; guint id; if (!channel_list_get_selection (ce, &first, &last, &tc, &tc_last)) return; id = z_option_menu_get_active (GTK_WIDGET (entry_standard)); if (id == DONT_CHANGE) { tc->standard = 0; } else { tv_video_standard *s; s = tv_nth_video_standard (zapping->info, id - 1); tc->standard = s->hash; tv_set_video_standard (zapping->info, s); } for (; tc_last != tc; tc_last = tc_last->prev) tc_last->standard = tc->standard; channel_list_rows_changed (ce, &first, &last); } static void on_entry_accel_changed (GtkEditable * editable _unused_, channel_editor * ce) { tveng_tuned_channel *tc, *tc_last; GtkTreeIter first, last; z_key key; if (!channel_list_get_selection (ce, &first, &last, &tc, &tc_last)) return; key = z_key_entry_get_key (ce->entry_accel); for (;;) { tc->accel = key; if (tc == tc_last) break; tc = tc->next; } channel_list_rows_changed (ce, &first, &last); } static void on_channel_selection_changed (GtkTreeSelection * selection _unused_, channel_editor * ce) { GtkTreeIter iter; tveng_tuned_channel *tc; if (!channel_list_get_selection (ce, &iter, NULL, &tc, NULL)) { no_channel_selected (ce); return; } z_switch_channel (tc, zapping->info); BLOCK (entry_name, changed, gtk_entry_set_text (ce->entry_name, tc->name)); BLOCK (entry_input, changed, { const tv_video_line *l; guint index; l = NULL; index = 0; if (tc->input != DONT_CHANGE) for (l = tv_next_video_input (zapping->info, NULL); l; l = tv_next_video_input (zapping->info, l), ++index) if (l->hash == tc->input) break; if (l) z_option_menu_set_active (GTK_WIDGET (ce->entry_input), index + 1); } ); SIGNAL_HANDLER_BLOCK (ce->entry_fine_tuning->spin_adj, (gpointer) on_entry_fine_tuning_value_changed, entry_fine_tuning_set (ce, zapping->info, tc->frequ)); BLOCK (entry_standard, changed, { const tv_video_standard *s; guint index; /* Standards depend on current input */ gtk_widget_destroy (gtk_option_menu_get_menu (ce->entry_standard)); gtk_option_menu_set_menu (ce->entry_standard, GTK_WIDGET (create_standard_menu (ce))); s = NULL; index = 0; if (tc->standard != DONT_CHANGE) for (s = tv_next_video_standard (zapping->info, NULL); s; s = tv_next_video_standard (zapping->info, s), ++index) if (s->hash == tc->standard) break; if (s) z_option_menu_set_active (GTK_WIDGET (ce->entry_standard), index + 1); } ); SIGNAL_HANDLER_BLOCK (z_key_entry_entry (ce->entry_accel), (gpointer) on_entry_accel_changed, z_key_entry_set_key (ce->entry_accel, tc->accel)); gtk_widget_set_sensitive (GTK_WIDGET (ce->entry_table), TRUE); channel_buttons_set_sensitive (ce, TRUE); } static void on_ok_clicked (GtkButton * ok _unused_, channel_editor * ce) { tveng_tuned_channel_list_delete (&ce->old_channel_list); gtk_widget_destroy (GTK_WIDGET (ce->channel_editor)); } static void on_help_clicked (GtkButton * button _unused_, channel_editor * ce) { z_help_display (GTK_WINDOW (ce->channel_editor), "zapping", "zapping-channel-editor"); } static void on_cancel_clicked (GtkButton * cancel _unused_, channel_editor * ce) { gtk_widget_destroy (GTK_WIDGET (ce->channel_editor)); } static void on_channel_editor_destroy (GtkObject * unused _unused_, channel_editor * ce) { if (ce->search) gtk_widget_destroy (GTK_WIDGET (ce->search->station_search)); if (ce->old_channel_list) { tveng_tuned_channel_list_delete (&global_channel_list); global_channel_list = ce->old_channel_list; ce->old_channel_list = NULL; } { struct country *c; for (c = &g_array_index (ce->country_table, struct country, 0); c->table_name; c++) { g_free (c->table_name); g_free (c->gui_name); } g_array_free (ce->country_table, /* elements */ FALSE); } g_free (ce); /* Update menus. XXX should rebuild automatically when opened after any change. */ zmodel_changed (z_input_model); dialog_running = NULL; } /* * channel_list GtkTreeCellDataFuncs */ static void set_func_index (GtkTreeViewColumn * column _unused_, GtkCellRenderer * cell, GtkTreeModel * model, GtkTreeIter * iter, gpointer data _unused_) { tveng_tuned_channel *tc = tree_model_tuned_channel (model, iter); gchar buf[32]; g_snprintf (buf, sizeof (buf) - 1, "%u", tc->index); g_object_set (GTK_CELL_RENDERER (cell), "text", buf, NULL); } static void set_func_name (GtkTreeViewColumn * column _unused_, GtkCellRenderer * cell, GtkTreeModel * model, GtkTreeIter * iter, gpointer data _unused_) { tveng_tuned_channel *tc = tree_model_tuned_channel (model, iter); g_object_set (GTK_CELL_RENDERER (cell), "text", tc->name, NULL); } static void set_func_input (GtkTreeViewColumn * column _unused_, GtkCellRenderer * cell, GtkTreeModel * model, GtkTreeIter * iter, gpointer data _unused_) { tveng_tuned_channel *tc = tree_model_tuned_channel (model, iter); const tv_video_line *l; const gchar *input_name = NULL; if (tc->input != DONT_CHANGE) if ((l = tv_video_input_by_hash (zapping->info, (guint) tc->input))) input_name = l->label; g_object_set (GTK_CELL_RENDERER (cell), "text", input_name, NULL); } static void set_func_channel (GtkTreeViewColumn * column _unused_, GtkCellRenderer * cell, GtkTreeModel * model, GtkTreeIter * iter, gpointer data) { channel_editor *ce = data; tveng_tuned_channel *tc = tree_model_tuned_channel (model, iter); if (tunable_input (ce, zapping->info, tc) && tc->frequ != 0) { gchar *rf_name; rf_name = rf_channel_string (tc); g_object_set (GTK_CELL_RENDERER (cell), "text", rf_name, NULL); g_free (rf_name); } else { g_object_set (GTK_CELL_RENDERER (cell), "text", NULL, NULL); } } static void set_func_standard (GtkTreeViewColumn * column _unused_, GtkCellRenderer * cell, GtkTreeModel * model, GtkTreeIter * iter, gpointer data _unused_) { tveng_tuned_channel *tc = tree_model_tuned_channel (model, iter); const tv_video_standard *s; const gchar *standard_name = NULL; if (tc->standard != DONT_CHANGE) if ((s = tv_video_standard_by_hash (zapping->info, (guint) tc->standard))) standard_name = s->label; g_object_set (GTK_CELL_RENDERER (cell), "text", standard_name, NULL); } static void set_func_key (GtkTreeViewColumn * column _unused_, GtkCellRenderer * cell, GtkTreeModel * model, GtkTreeIter * iter, gpointer data _unused_) { tveng_tuned_channel *tc = tree_model_tuned_channel (model, iter); gchar *key_name; key_name = z_key_name (tc->accel); g_object_set (GTK_CELL_RENDERER (cell), "text", key_name, NULL); g_free (key_name); } #define LABEL(name, x, y) \ label = gtk_label_new (_(name)); \ gtk_widget_show (label); \ gtk_table_attach (ce->entry_table, label, x, x + 1, y, y + 1, \ (GtkAttachOptions) (GTK_FILL), \ (GtkAttachOptions) (0), 0, 0); \ gtk_misc_set_alignment (GTK_MISC (label), 1.0, 0.5); \ gtk_misc_set_padding (GTK_MISC (label), 3, 0); #define BUTTON(name, stock, sensitive) \ ce->name = gtk_button_new_from_stock (stock); \ gtk_widget_show (ce->name); \ gtk_widget_set_sensitive (ce->name, sensitive); \ gtk_box_pack_start (GTK_BOX (vbox), ce->name, FALSE, FALSE, 0); \ CONNECT (name, clicked); #define CONNECT(object, signal) \ g_signal_connect (G_OBJECT (ce->object), #signal, \ G_CALLBACK (on_ ## object ## _ ## signal), ce) static gint country_compare (struct country * c1, struct country * c2) { return g_utf8_collate (c1->gui_name, c2->gui_name); } static GtkWidget * create_country_menu (channel_editor * ce) { GtkWidget *country_menu; GtkWidget *menu; tv_rf_channel ch; const gchar *table_name; const gchar *country_code; gchar buf[4]; gint hist, i; struct country *c; country_menu = gtk_option_menu_new (); gtk_widget_show (country_menu); gtk_tooltips_set_tip (ce->tooltips, country_menu, _("Select the frequency table " "used in your country"), NULL); menu = gtk_menu_new (); gtk_option_menu_set_menu (GTK_OPTION_MENU (country_menu), menu); tv_rf_channel_first_table (&ch); ce->country_table = g_array_new (/* zero_term */ TRUE, /* clear */ FALSE, sizeof (struct country)); do { do { const char *country_name; if ((country_name = iso3166_to_country_name (ch.country_code))) { struct country c; c.table_name = g_strconcat (ch.country_code, "@", ch.table_name, NULL); if (ch.domain) c.gui_name = g_strdup_printf ("%s (%s)", country_name, ch.domain); else c.gui_name = g_strdup (country_name); g_array_append_val (ce->country_table, c); } } while (tv_rf_channel_next_country (&ch)); } while (tv_rf_channel_next_table (&ch)); g_array_sort (ce->country_table, (GCompareFunc) country_compare); /* * Default country, table or both * from e.g. "", "FR", "FR@ccir", "ccir", "Europe" (old current_country) */ table_name = zconf_get_string (NULL, "/zapping/options/main/current_country"); country_code = locale_country (); if (table_name && g_ascii_isalpha (table_name[0]) && g_ascii_isalpha (table_name[1]) && '@' == table_name[2]) { buf[0] = table_name[0]; buf[1] = table_name[1]; buf[2] = 0; country_code = buf; table_name += 3; } if (table_name && 0 == table_name[0]) table_name = NULL; hist = -1; i = 0; for (c = &g_array_index (ce->country_table, struct country, 0); c->table_name; c++) { GtkWidget *item; item = gtk_menu_item_new_with_label (c->gui_name); gtk_menu_shell_append (GTK_MENU_SHELL (menu), item); gtk_widget_show (item); if (hist < 0) if (!table_name || 0 == strcmp (c->table_name + 3, table_name)) if (!country_code || 0 == strncmp (c->table_name, country_code, 2)) hist = i; i++; } if (hist < 0) hist = 0; /* any */ else if (!table_name) zconf_set_string (g_array_index (ce->country_table, struct country, hist).table_name, "/zapping/options/main/current_country"); gtk_option_menu_set_history (GTK_OPTION_MENU (country_menu), (guint) hist); return country_menu; } static GtkListStore * create_freq_list_model (const tv_rf_channel * table) { GtkListStore *model; tv_rf_channel ch; model = gtk_list_store_new (FL_NUM_COLUMNS, G_TYPE_STRING, /* name */ G_TYPE_STRING); /* freq */ ch = *table; do { gchar freq[256]; GtkTreeIter iter; g_snprintf (freq, sizeof (freq) - 1, "%.2f", ch.frequency / 1e6); gtk_list_store_append (model, &iter); gtk_list_store_set (model, &iter, FL_NAME, ch.channel_name, FL_FREQ, freq, -1); } while (tv_rf_channel_next (&ch)); return model; } static GtkWidget * create_freq_treeview (channel_editor * ce) { GtkWidget *scrolledwindow; GtkCellRenderer *renderer; GtkTreeViewColumn *column; tv_rf_channel ch; scrolledwindow = gtk_scrolled_window_new (NULL, NULL); gtk_widget_show (scrolledwindow); gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow), GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC); ce->freq_treeview = GTK_TREE_VIEW (gtk_tree_view_new ()); gtk_widget_show (GTK_WIDGET (ce->freq_treeview)); gtk_container_add (GTK_CONTAINER (scrolledwindow), GTK_WIDGET (ce->freq_treeview)); gtk_tree_view_set_rules_hint (ce->freq_treeview, TRUE); ce->freq_selection = gtk_tree_view_get_selection (ce->freq_treeview); gtk_tree_selection_set_mode (ce->freq_selection, GTK_SELECTION_SINGLE); /* Don't connect here, see below. */ current_rf_channel_table (ce, &ch, NULL); ce->freq_model = create_freq_list_model (&ch); gtk_tree_view_set_model (ce->freq_treeview, GTK_TREE_MODEL (ce->freq_model)); renderer = gtk_cell_renderer_text_new (); /* TRANSLATORS: RF channel name in frequency table. */ column = gtk_tree_view_column_new_with_attributes (_("Ch. Name"), renderer, "text", FL_NAME, NULL); gtk_tree_view_append_column (ce->freq_treeview, column); renderer = gtk_cell_renderer_text_new (); column = gtk_tree_view_column_new_with_attributes (_("Freq (MHz)"), renderer, "text", FL_FREQ, NULL); gtk_tree_view_append_column (ce->freq_treeview, column); return scrolledwindow; } static GtkListStore * create_channel_list_model (const tveng_tuned_channel *list _unused_) { GtkListStore *model; GtkTreeIter iter; guint i; model = gtk_list_store_new (1, G_TYPE_UINT); for (i = tveng_tuned_channel_num (global_channel_list); i; i--) gtk_list_store_append (model, &iter); return model; } static GtkWidget * create_channel_treeview (channel_editor * ce) { GtkWidget *scrolledwindow; scrolledwindow = gtk_scrolled_window_new (NULL, NULL); gtk_widget_show (scrolledwindow); gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow), GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC); ce->channel_treeview = GTK_TREE_VIEW (gtk_tree_view_new ()); gtk_widget_show (GTK_WIDGET (ce->channel_treeview)); gtk_container_add (GTK_CONTAINER (scrolledwindow), GTK_WIDGET (ce->channel_treeview)); gtk_tree_view_set_rules_hint (ce->channel_treeview, TRUE); /* gtk_tree_view_set_search_column (ce->channel_treeview, CL_NAME); */ ce->channel_selection = gtk_tree_view_get_selection (ce->channel_treeview); gtk_tree_selection_set_mode (ce->channel_selection, GTK_SELECTION_MULTIPLE); /* Don't connect "changed" signal here, see below. */ ce->channel_model = create_channel_list_model (global_channel_list); /* XXX */ gtk_tree_view_set_model (ce->channel_treeview, GTK_TREE_MODEL (ce->channel_model)); gtk_tree_view_insert_column_with_data_func (ce->channel_treeview, -1 /* append */, "", gtk_cell_renderer_text_new (), set_func_index, ce, NULL); gtk_tree_view_insert_column_with_data_func (ce->channel_treeview, -1 /* append */, _("Channel name"), gtk_cell_renderer_text_new (), set_func_name, ce, NULL); gtk_tree_view_insert_column_with_data_func (ce->channel_treeview, -1 /* append */, _("Video input"), gtk_cell_renderer_text_new (), set_func_input, ce, NULL); gtk_tree_view_insert_column_with_data_func (ce->channel_treeview, -1 /* append */, _("RF Channel"), gtk_cell_renderer_text_new (), set_func_channel, ce, NULL); gtk_tree_view_insert_column_with_data_func (ce->channel_treeview, -1 /* append */, _("Video standard"), gtk_cell_renderer_text_new (), set_func_standard, ce, NULL); gtk_tree_view_insert_column_with_data_func (ce->channel_treeview, -1 /* append */, _("Accelerator"), gtk_cell_renderer_text_new (), set_func_key, ce, NULL); return scrolledwindow; } static GtkMenu * create_input_menu (channel_editor * ce _unused_) { GtkMenu *menu; GtkWidget *menu_item; const tv_video_line *l; menu = GTK_MENU (gtk_menu_new ()); menu_item = gtk_menu_item_new_with_label (_("Do not change input")); gtk_widget_show (menu_item); gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_item); for (l = tv_next_video_input (zapping->info, NULL); l; l = tv_next_video_input (zapping->info, l)) { menu_item = gtk_menu_item_new_with_label (l->label); gtk_widget_show (menu_item); gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_item); } return menu; } static GtkMenu * create_standard_menu (channel_editor * ce _unused_) { GtkMenu *menu; GtkWidget *menu_item; const tv_video_standard *s; menu = GTK_MENU (gtk_menu_new ()); menu_item = gtk_menu_item_new_with_label (_("Do not change standard")); gtk_widget_show (menu_item); gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_item); for (s = tv_next_video_standard (zapping->info, NULL); s; s = tv_next_video_standard (zapping->info, s)) { menu_item = gtk_menu_item_new_with_label (s->label); gtk_widget_show (menu_item); gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_item); } return menu; } static GtkWidget * create_channel_editor (void) { struct channel_editor *ce; const tv_video_line *l; ce = g_malloc0 (sizeof (*ce)); ce->old_channel_list = tveng_tuned_channel_list_new (global_channel_list); ce->search = NULL; for (l = tv_next_video_input (zapping->info, NULL); l; l = tv_next_video_input (zapping->info, l)) if (l->type == TV_VIDEO_LINE_TYPE_TUNER) break; ce->have_tuners = (l != NULL); /* Build dialog */ ce->tooltips = gtk_tooltips_new (); ce->channel_editor = GTK_DIALOG (gtk_dialog_new ()); gtk_window_set_title (GTK_WINDOW (ce->channel_editor), _("Channel editor")); CONNECT (channel_editor, destroy); { GtkWidget *dialog_vbox; dialog_vbox = GTK_DIALOG (ce->channel_editor)->vbox; gtk_widget_show (dialog_vbox); ce->vbox = GTK_BOX (gtk_vbox_new (FALSE, 3)); gtk_widget_show (GTK_WIDGET (ce->vbox)); gtk_box_pack_start (GTK_BOX (dialog_vbox), GTK_WIDGET (ce->vbox), TRUE, TRUE, 0); { GtkWidget *vpaned; vpaned = gtk_vpaned_new (); gtk_widget_show (vpaned); gtk_box_pack_start (ce->vbox, vpaned, TRUE, TRUE, 0); { GtkWidget *frame; frame = gtk_frame_new (_("Region")); gtk_widget_show (frame); gtk_container_add (GTK_CONTAINER (vpaned), frame); gtk_container_set_border_width (GTK_CONTAINER (frame), 3); gtk_widget_set_sensitive (frame, ce->have_tuners); { GtkWidget *hbox; GtkWidget *scrolledwindow; hbox = gtk_hbox_new (FALSE, 0); gtk_widget_show (hbox); gtk_container_add (GTK_CONTAINER (frame), hbox); { GtkWidget *vbox; #if 0 GtkWidget *label; #endif vbox = gtk_vbox_new (FALSE, 3); gtk_widget_show (vbox); gtk_box_pack_start (GTK_BOX (hbox), vbox, TRUE, TRUE, 0); ce->country_menu = GTK_OPTION_MENU (create_country_menu (ce)); gtk_box_pack_start (GTK_BOX (vbox), GTK_WIDGET (ce->country_menu), FALSE, FALSE, 0); CONNECT (country_menu, changed); { GtkWidget *hbox; hbox = gtk_vbox_new (TRUE, 3); gtk_widget_show (hbox); gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0); ce->channel_search = GTK_BUTTON (gtk_button_new_with_mnemonic (_("Automatic station _search"))); gtk_widget_show (GTK_WIDGET (ce->channel_search)); gtk_box_pack_start (GTK_BOX (hbox), GTK_WIDGET (ce->channel_search), TRUE, TRUE, 0); CONNECT (channel_search, clicked); gtk_tooltips_set_tip (ce->tooltips, GTK_WIDGET (ce->channel_search), _("Select a suitable frequency table, then " "click here to search through all channels " "in the table and add the received stations " "to the channel list."), NULL); ce->add_all_channels = GTK_BUTTON (gtk_button_new_with_mnemonic (_("Add all _channels"))); gtk_widget_show (GTK_WIDGET (ce->add_all_channels)); gtk_box_pack_start (GTK_BOX (hbox), GTK_WIDGET (ce->add_all_channels), TRUE, TRUE, 0); CONNECT (add_all_channels, clicked); gtk_tooltips_set_tip (ce->tooltips, GTK_WIDGET (ce->add_all_channels), _("Add all channels in the frequency " "table to the channel list."), NULL); ce->import_xawtv = GTK_BUTTON (gtk_button_new_with_mnemonic (_("_Import XawTV configuration"))); gtk_widget_show (GTK_WIDGET (ce->import_xawtv)); gtk_widget_set_sensitive (GTK_WIDGET (ce->import_xawtv), xawtv_config_present ()); gtk_box_pack_start (GTK_BOX (hbox), GTK_WIDGET (ce->import_xawtv), TRUE, TRUE, 0); CONNECT (import_xawtv, clicked); } #if 0 label = gtk_label_new (("When your country is not listed or " "misrepresented please send an e-mail,\n" "if possible including the correct " "frequency table, to zapping-misc@lists.sf.net.")); gtk_widget_show (label); gtk_box_pack_start (GTK_BOX (vbox), label, TRUE, TRUE, 0); #endif } scrolledwindow = create_freq_treeview (ce); gtk_box_pack_start (GTK_BOX (hbox), scrolledwindow, TRUE, TRUE, 0); } } { GtkWidget *frame; frame = gtk_frame_new (_("Channel List")); gtk_widget_show (frame); gtk_container_add (GTK_CONTAINER (vpaned), frame); gtk_container_set_border_width (GTK_CONTAINER (frame), 3); { GtkWidget *hbox; GtkWidget *scrolledwindow; hbox = gtk_hbox_new (FALSE, 3); gtk_widget_show (hbox); gtk_container_add (GTK_CONTAINER (frame), hbox); scrolledwindow = create_channel_treeview (ce); gtk_box_pack_start (GTK_BOX (hbox), scrolledwindow, TRUE, TRUE, 0); { GtkWidget *vbox; vbox = gtk_vbox_new (FALSE, 3); gtk_widget_show (vbox); gtk_box_pack_start (GTK_BOX (hbox), vbox, FALSE, FALSE, 0); BUTTON (channel_up, GTK_STOCK_GO_UP, FALSE); BUTTON (channel_down, GTK_STOCK_GO_DOWN, FALSE); BUTTON (channel_add, GTK_STOCK_ADD, TRUE); BUTTON (channel_remove, GTK_STOCK_REMOVE, FALSE); } } } } { GtkWidget *frame; frame = gtk_frame_new (_("Edit channel")); gtk_widget_show (frame); gtk_box_pack_start (ce->vbox, frame, FALSE, FALSE, 0); gtk_container_set_border_width (GTK_CONTAINER (frame), 3); { GtkWidget *label; GtkWidget *menu; GtkAdjustment *adj; ce->entry_table = GTK_TABLE (gtk_table_new (5, 2, FALSE)); gtk_widget_show (GTK_WIDGET (ce->entry_table)); gtk_widget_set_sensitive (GTK_WIDGET (ce->entry_table), FALSE); gtk_container_add (GTK_CONTAINER (frame), GTK_WIDGET (ce->entry_table)); gtk_table_set_row_spacings (ce->entry_table, 3); gtk_table_set_col_spacings (ce->entry_table, 3); LABEL (_("Name:"), 0, 0); ce->entry_name = GTK_ENTRY (gtk_entry_new ()); gtk_widget_show (GTK_WIDGET (ce->entry_name)); CONNECT (entry_name, changed); gtk_table_attach (ce->entry_table, GTK_WIDGET (ce->entry_name), 1, 2, 0, 1, (GtkAttachOptions)(GTK_EXPAND | GTK_FILL), (GtkAttachOptions)(0), 0, 0); LABEL (_("Video input:"), 0, 1); ce->entry_input = GTK_OPTION_MENU (gtk_option_menu_new ()); gtk_widget_show (GTK_WIDGET (ce->entry_input)); CONNECT (entry_input, changed); gtk_table_attach (ce->entry_table, GTK_WIDGET (ce->entry_input), 1, 2, 1, 2, (GtkAttachOptions)(GTK_FILL), (GtkAttachOptions)(0), 0, 0); gtk_option_menu_set_menu (ce->entry_input, GTK_WIDGET (create_input_menu (ce))); LABEL (_("Fine tuning:"), 0, 2); adj = GTK_ADJUSTMENT (gtk_adjustment_new (0.0, 0.0, 0.0, 0.0, 0.0, 0.0)); ce->entry_fine_tuning = Z_SPINSLIDER (z_spinslider_new (adj, NULL, _("MHz"), 0.0, 2)); gtk_widget_show (GTK_WIDGET (ce->entry_fine_tuning)); gtk_widget_set_sensitive (GTK_WIDGET (ce->entry_fine_tuning), FALSE); gtk_table_attach (ce->entry_table, GTK_WIDGET (ce->entry_fine_tuning), 1, 2, 2, 3, (GtkAttachOptions)(GTK_FILL), (GtkAttachOptions)(GTK_FILL), 0, 0); g_signal_connect (G_OBJECT (adj), "value-changed", G_CALLBACK (on_entry_fine_tuning_value_changed), ce); LABEL (_("Video standard:"), 0, 3); ce->entry_standard = GTK_OPTION_MENU (gtk_option_menu_new ()); gtk_widget_show (GTK_WIDGET (ce->entry_standard)); CONNECT (entry_standard, changed); gtk_table_attach (ce->entry_table, GTK_WIDGET (ce->entry_standard), 1, 2, 3, 4, (GtkAttachOptions)(GTK_FILL), (GtkAttachOptions)(0), 0, 0); menu = gtk_menu_new (); gtk_option_menu_set_menu (ce->entry_standard, menu); LABEL (_("Accelerator:"), 0, 4); ce->entry_accel = z_key_entry_new (); gtk_widget_show (ce->entry_accel); gtk_table_attach (ce->entry_table, ce->entry_accel, 1, 2, 4, 5, (GtkAttachOptions)(GTK_FILL), (GtkAttachOptions)(GTK_FILL), 0, 0); g_signal_connect (G_OBJECT (z_key_entry_entry (ce->entry_accel)), "changed", G_CALLBACK (on_entry_accel_changed), ce); } } } { GtkWidget *dialog_action_area; dialog_action_area = GTK_DIALOG (ce->channel_editor)->action_area; gtk_widget_show (dialog_action_area); gtk_button_box_set_layout (GTK_BUTTON_BOX (dialog_action_area), GTK_BUTTONBOX_END); { GtkWidget *hbox; GtkWidget *ok; GtkWidget *cancel; hbox = gtk_hbox_new (TRUE, 15); gtk_widget_show (hbox); gtk_container_add (GTK_CONTAINER (dialog_action_area), hbox); cancel = gtk_button_new_from_stock (GTK_STOCK_HELP); gtk_widget_show (cancel); gtk_box_pack_start (GTK_BOX (hbox), cancel, FALSE, TRUE, 0); g_signal_connect (G_OBJECT (cancel), "clicked", G_CALLBACK (on_help_clicked), ce); cancel = gtk_button_new_from_stock (GTK_STOCK_CANCEL); gtk_widget_show (cancel); gtk_box_pack_start (GTK_BOX (hbox), cancel, FALSE, TRUE, 0); g_signal_connect (G_OBJECT (cancel), "clicked", G_CALLBACK (on_cancel_clicked), ce); ok = gtk_button_new_from_stock (GTK_STOCK_OK); gtk_widget_show (ok); gtk_box_pack_start (GTK_BOX (hbox), ok, FALSE, TRUE, 0); g_signal_connect (G_OBJECT (ok), "clicked", G_CALLBACK (on_ok_clicked), ce); } } /* Must not fire until the dialog is ready. */ CONNECT (channel_selection, changed); CONNECT (freq_selection, changed); return GTK_WIDGET (ce->channel_editor); } static PyObject * py_channel_editor (PyObject * self _unused_, PyObject * args _unused_) { if (!dialog_running) gtk_widget_show (create_channel_editor ()); else gtk_window_present (GTK_WINDOW (dialog_running->channel_editor)); py_return_true; } void startup_channel_editor (void) { cmd_register ("channel_editor", py_channel_editor, METH_VARARGS, ("Channel editor"), "zapping.channel_editor()"); } void shutdown_channel_editor (void) { } ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������zapping-0.10cvs6/src/channel_editor.h��������������������������������������������������������������� 644 � 764 � 144 � 1662 7762173334 12724� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Zapping (TV viewer for the Gnome Desktop) * Copyright (C) 2002 Iaki Garca Etxebarria * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifndef CHANNEL_EDITOR_H #define CHANNEL_EDITOR_H extern void startup_channel_editor (void); extern void shutdown_channel_editor (void); #endif ������������������������������������������������������������������������������zapping-0.10cvs6/src/zconf.c������������������������������������������������������������������������ 644 � 764 � 144 � 122236 10305455544 11132� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Zapping (TV viewer for the Gnome Desktop) * Copyright (C) 2000 Iaki Garca Etxebarria * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* Rationale: Here are the routines to deal with configuration. It may seem a bit strange defining a new module for this, the usual thing is to manage the config directly. The thing is that i would like to port Zapping to use the new gconf engine, but it is not finished yet, so a compatibility layer must be created. This way the code looks much cleaner, and is easier to maintain, since i get rid of globals, and don't need hacks to update the config if needed */ #ifdef HAVE_CONFIG_H # include "config.h" #endif #include <gnome.h> #include <libxml/tree.h> #include <libxml/parser.h> #include <libxml/xmlmemory.h> #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> #include <unistd.h> #include <dirent.h> #include <string.h> #include <locale.h> #include "zconf.h" #include "zmisc.h" /* Misc common stuff */ #include "zmodel.h" #include "globals.h" /* This defines a key in the configuration tree. */ struct zconf_key { enum zconf_type type; gchar * name; /* The name of the key */ gchar * full_path; /* Full path to this key */ gchar * description; /* description for the key */ union { gint integer; gchar * string; gfloat floating; gboolean boolean; } contents; /* Its contents */ struct zconf_key * parent; /* A pointer to the parent node */ GList * tree; /* A list to the children of the key */ ZModel * model; /* for hooks */ GList * hooked; /* struct zconf_hook */ }; /* Connected to the key */ struct zconf_hook { ZConfHook callback; gchar *key; /* Key this hook is attached to */ gpointer data; }; /* Global values that control the library */ static struct zconf_key * zconf_root = NULL; /* The root of the config tree */ static gboolean zconf_started = FALSE; /* indicates whether zconf has been successfully started */ static gchar * zconf_file = NULL; static gboolean zconf_we = FALSE; /* TRUE if the last call failed */ static gchar * zconf_buffer = NULL; /* A global buffer some functions share */ /* We should use namespaces, but the code in this file is for transitional purpouses only, gconf will be used when gconf comes. Don't relay on it too much, i don't plan to maintain it... */ /* List of functions that need to be implemented (privately) */ /* Translates a xml doc to a zconf_key value, creating subtrees as necessary. Allocates memory for key and modifies its value too. */ static void p_zconf_parse(xmlNodePtr node, xmlDocPtr doc, struct zconf_key ** key, struct zconf_key * parent); /* Translates a zconf_key value with its children to a xml doc. */ static void p_zconf_write(xmlNodePtr node, xmlDocPtr doc, struct zconf_key * key); /* "Cuts a branch" of the zconf tree. Frees all the mem from the given key and all the mem of its children. NOTE: Not very fast, if I have spare time (:DDDDDDDDDD) i should speed this up a bit. Always returns NULL */ static gpointer p_zconf_cut_branch(struct zconf_key * key); /* Resolves the given path, returning the key associated to the (relative) path. It will return NULL if the key is not found */ static struct zconf_key* p_zconf_resolve(const gchar * key, struct zconf_key * starting_dir); /* Given a path, creates all the needed nodes that don't exist to make the path a valid (relative to starting_dir) one. Never fails, and returns the last node (if path is xxx/yyy/zzz, returns a pointer to zzz). */ static struct zconf_key* p_zconf_create(const gchar * key, struct zconf_key * starting_dir); /** * Sets the env vars describing the locale to "C", saves the results for * a env_restore later on. Workaround for a bug in glib: * printf uses the locale info to print float numbers (z.b., M_PI * printed under a spanish locale is 3,14159... not 3.14159...). atof * assumes the current locale is "C" when scanning floats. */ static gchar *old_locale = NULL; static void env_C(void) { old_locale = g_strdup(setlocale(LC_ALL, NULL)); setlocale(LC_ALL, "C"); } static void env_restore(void) { if (!old_locale) return; setlocale(LC_ALL, old_locale); g_free(old_locale); old_locale = NULL; } /* Configuration saving/loading functions. */ /* Inits the config saving module. Returns FALSE on error (probably because ENOMEM). Error here is critical (the calling program should exit) */ gboolean zconf_init(const gchar * domain) { /* Hold here the home dir */ const gchar * home_dir = g_get_home_dir(); gchar * buffer = NULL; /* temporal storage */ DIR * config_dir; xmlDocPtr doc; xmlNodePtr root_node; /* The root node of the tree */ xmlNodePtr new_node; /* The "General" node */ zconf_we = TRUE; /* We don't want to init zconf twice */ if (zconf_started) return TRUE; if (home_dir == NULL) { buffer = g_strconcat(domain, " cannot determine your home dir", NULL); RunBox("%s", GTK_MESSAGE_ERROR, buffer); g_free(buffer); return FALSE; } /* OK, test if the config dir (.domain) exists */ buffer = g_strconcat(home_dir, "/.", domain, NULL); config_dir = opendir(buffer); if (!config_dir) /* No config dir, try to create one */ { if (mkdir(buffer, S_IRUSR | S_IWUSR | S_IXUSR | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH) == -1) { RunBox("Cannot create config home dir, check your permissions", GTK_MESSAGE_ERROR); g_free(buffer); return FALSE; } config_dir = opendir(buffer); if (!config_dir) { RunBox("Cannot open config home dir, this is weird", GTK_MESSAGE_ERROR); g_free(buffer); return FALSE; } } /* Open the config doc, .domain/domain.conf */ closedir(config_dir); /* Close the directory first */ g_free(buffer); buffer = g_strconcat(home_dir, "/.", domain, "/", domain, ".conf", NULL); if (!buffer) return FALSE; /* This is blocking, and will freeze the GUI, but shouldn't take long */ zconf_file = g_strdup(buffer); doc = NULL; if (g_file_test (zconf_file, G_FILE_TEST_EXISTS)) { /* Spits out an error message if the file does not exist, hence. */ doc = xmlParseFile(zconf_file); } if (!doc) /* There isn't any doc to parse */ { /* We couldn't open the doc, create a new one */ doc = xmlNewDoc("1.0"); if (!doc) { g_warning("ZConf: xmlNewDoc failed"); return FALSE; } /* Add the main node to the tree, so the parser has something to parse */ root_node = xmlNewDocNode(doc, NULL, "Configuration", NULL); /* This will be the root node */ xmlDocSetRootElement(doc, root_node); /* Add the "General entry" */ new_node = xmlNewChild(root_node, NULL, "subtree", NULL); xmlSetProp(new_node, "label", domain); xmlSetProp(new_node, "type", "directory"); xmlSetProp(new_node, "description", "Root Node"); } /* Build the config tree from this entry */ /* Examine the childs until we have a valid zconf_ root node */ new_node = xmlDocGetRootElement(doc)-> children; env_C(); while ((new_node) && (!zconf_root)) { p_zconf_parse(new_node, doc, &zconf_root, NULL); new_node = new_node -> next; } env_restore(); /* No root node found, return error */ if (zconf_root == NULL) { g_warning("ZConf: No root node found!"); return FALSE; } if (doc) xmlFreeDoc(doc); /* Free the memory, we don't need it any more */ g_free(buffer); zconf_buffer = NULL; zconf_started = TRUE; /* Yes, we have started */ zconf_we = FALSE; return TRUE; } /* Closes ZConf, returns FALSE if zconf could not be closed properly (usually because it couldn't write the config to disk) */ gboolean zconf_close(void) { xmlDocPtr doc; xmlNodePtr root_node; zconf_we = TRUE; doc = xmlNewDoc("1.0"); if (!doc) return FALSE; root_node = xmlNewDocNode(doc, NULL, "Configuration", NULL); xmlDocSetRootElement(doc, root_node); /* We build the doc now */ env_C(); p_zconf_write(xmlDocGetRootElement(doc), doc, zconf_root); env_restore(); /* and we destroy the zconf tree */ zconf_root = p_zconf_cut_branch(zconf_root); if (xmlSaveFormatFile(zconf_file, doc, TRUE) == -1) { ShowBox("Zapping cannot save configuration to disk\n" "You should have write permissions to your home dir...", GTK_MESSAGE_ERROR); return FALSE; /* Error */ } xmlFreeDoc(doc); /* Free memory */ g_free(zconf_file); if (zconf_buffer) /* free this mem too */ g_free(zconf_buffer); zconf_started = FALSE; /* We are ended now */ zconf_we = FALSE; return TRUE; } /* Returns the last error zconf generated, 0 means the last operation was ok. It is useful for checking ambiguous return values: if ((!zconf_get_int(...)) && zconf_error()) Show_Error_Message(); else Show_Success_Message(); */ gint zconf_error(void) { /* currently there is only two error states, 0 and 1 */ return (zconf_we); } static gboolean p_zconf_copy (const gchar * dst_path, struct zconf_key * src_key) { struct zconf_key *dst_key; gchar *new_path; new_path = g_strconcat (dst_path, "/", src_key->name, NULL); dst_key = p_zconf_resolve (new_path, zconf_root); if (NULL == dst_key) { /* The value doesn't exist yet, create it */ dst_key = p_zconf_create (new_path, zconf_root); dst_key->type = src_key->type; } else { g_assert (dst_key->type == src_key->type); } switch (src_key->type) { GList *p; case ZCONF_TYPE_DIR: for (p = src_key->tree; p; p = p->next) { struct zconf_key *child_key = (struct zconf_key *) p->data; if (!p_zconf_copy (new_path, child_key)) goto failure; } break; case ZCONF_TYPE_INTEGER: if (dst_key->contents.integer != src_key->contents.integer) { dst_key->contents.integer = src_key->contents.integer; if (dst_key->model) zmodel_changed (dst_key->model); } break; case ZCONF_TYPE_STRING: if (NULL == dst_key->contents.string) { /* Is a new key. */ dst_key->contents.string = g_strdup (src_key->contents.string); } else if (0 != strcmp (dst_key->contents.string, src_key->contents.string)) { g_free (dst_key->contents.string); dst_key->contents.string = g_strdup (src_key->contents.string); if (dst_key->model) zmodel_changed (dst_key->model); } break; case ZCONF_TYPE_FLOAT: if (dst_key->contents.floating != src_key->contents.floating) { dst_key->contents.floating = src_key->contents.floating; if (dst_key->model) zmodel_changed (dst_key->model); } break; case ZCONF_TYPE_BOOLEAN: if (dst_key->contents.boolean != src_key->contents.boolean) { dst_key->contents.boolean = src_key->contents.boolean; if (dst_key->model) zmodel_changed (dst_key->model); } break; default: g_assert_not_reached (); break; } g_free (new_path); new_path = NULL; return TRUE; failure: g_free (new_path); new_path = NULL; return FALSE; } /* Copies the key src into dir dst. Copies recursively if src is a dir. dst must be a dir, if it exists. */ gboolean zconf_copy (const gchar * dst_path, const gchar * src_path) { struct zconf_key *dst_key; struct zconf_key *src_key; g_assert (NULL != dst_path); g_assert (NULL != src_path); dst_key = p_zconf_resolve (dst_path, zconf_root); if (NULL == dst_key) { /* The value doesn't exist yet, create it */ dst_key = p_zconf_create (dst_path, zconf_root); dst_key->type = ZCONF_TYPE_DIR; } else { g_assert (ZCONF_TYPE_DIR == dst_key->type); } src_key = p_zconf_resolve (src_path, zconf_root); if (NULL == src_key) { /* Doesn't exist. */ zconf_we = FALSE; } else { zconf_we = !p_zconf_copy (dst_path, src_key); } return !zconf_we; } #define GET_VALUE(_type, _field, _nothing) \ struct zconf_key *key; \ zconf_we = TRUE; /* start with an error */ \ g_assert (NULL != path); \ g_assert (zconf_started); \ g_assert (NULL != zconf_root); \ key = p_zconf_resolve (path, zconf_root); \ if (where) \ *where = _nothing; \ if (!key) \ return _nothing; \ if (_type != key->type) \ return _nothing; \ if (where) \ *where = key->contents._field; \ zconf_we = FALSE; \ return key->contents._field; #define SET_VALUE(_type, _field) \ struct zconf_key *key; \ zconf_we = TRUE; /* start with an error */ \ g_assert (NULL != path); \ g_assert (zconf_started); \ g_assert (NULL != zconf_root); \ if (!(key = p_zconf_resolve (path, zconf_root))) \ { \ key = p_zconf_create (path, zconf_root); \ key->type = _type; \ } \ else if (_type != key->type) \ { \ if (ZCONF_TYPE_DIR != key->type) \ g_warning ("Changing the type of %s from %s to %s.", \ path, zconf_type_string (key->type), \ zconf_type_string (_type)); \ if (ZCONF_TYPE_STRING == key->type) \ { \ g_free (key->contents.string); \ key->contents.string = NULL; \ } \ key->type = _type; \ } \ if (ZCONF_TYPE_STRING != _type \ && new_value != key->contents._field) \ { \ key->contents._field = new_value; \ if (key->model) \ zmodel_changed (key->model); \ } \ zconf_we = FALSE; #define CREATE_VALUE(_type, _field) \ struct zconf_key *key; \ zconf_we = TRUE; /* start with an error */ \ g_assert (NULL != path); \ g_assert (zconf_started); \ g_assert (NULL != zconf_root); \ if (!(key = p_zconf_resolve (path, zconf_root))) \ { \ key = p_zconf_create (path, zconf_root); \ key->type = _type; \ key->contents._field = new_value; \ } \ else if (_type != key->type) \ { \ if (ZCONF_TYPE_DIR != key->type) \ g_warning ("Changing the type of %s from %s to %s.", \ path, zconf_type_string (key->type), \ zconf_type_string (_type)); \ if (ZCONF_TYPE_STRING == key->type) \ g_free (key->contents.string); \ key->type = _type; \ key->contents._field = new_value; \ } \ if (desc && !key->description) \ key->description = g_strdup (desc); \ zconf_we = FALSE; /* Gets an integer value, returns 0 on error (ambiguous). If where is not NULL, the value is also stored in the location pointed to by where. */ gint zconf_get_int (gint * where, const gchar * path) { GET_VALUE (ZCONF_TYPE_INTEGER, integer, 0); } /* Sets an integer value, creating the path to it if needed. */ void zconf_set_int (gint new_value, const gchar * path) { SET_VALUE (ZCONF_TYPE_INTEGER, integer); } /* Sets a default integer value. desc is the description for the value. Set it to NULL for leaving it undocumented (a empty string is considered as a documented value) */ void zconf_create_int(gint new_value, const gchar * desc, const gchar * path) { CREATE_VALUE (ZCONF_TYPE_INTEGER, integer); } guint zconf_get_uint(guint * where, const gchar * path) { return (guint) zconf_get_int ((gint *) where, path); } void zconf_set_uint(guint new_value, const gchar * path) { zconf_set_int ((gint) new_value, path); } void zconf_create_uint(guint new_value, const gchar * desc, const gchar * path) { zconf_create_int ((gint) new_value, desc, path); } /* Gets a string value. The returned string is statically allocated, will only be valid until the next call to zconf, so use g_strdup() to duplicate it if needed. Returns NULL on error (not ambiguous, NULL is always an error). if where is not NULL, zconf will g_strdup the string itself, and place a pointer to it in where, that should be freed later with g_free. */ const gchar * zconf_get_string (gchar ** where, const gchar * path) { struct zconf_key *key; zconf_we = TRUE; /* start with an error */ g_assert (NULL != path); g_assert (zconf_started); g_assert (NULL != zconf_root); key = p_zconf_resolve (path, zconf_root); if (where) *where = NULL; if (!key) return NULL; if (ZCONF_TYPE_STRING != key->type) return NULL; if (where) *where = g_strdup (key->contents.string); zconf_we = FALSE; return key->contents.string; } /* Sets an string value to the given string. */ void zconf_set_string (const gchar * new_value, const gchar * path) { struct zconf_key *key; zconf_we = TRUE; /* start with an error */ g_assert (NULL != path); g_assert (zconf_started); g_assert (NULL != zconf_root); if (!(key = p_zconf_resolve (path, zconf_root))) { key = p_zconf_create (path, zconf_root); key->type = ZCONF_TYPE_STRING; } else if (ZCONF_TYPE_STRING != key->type) { if (ZCONF_TYPE_DIR != key->type) g_warning ("Changing the type of %s from %s to %s.", path, zconf_type_string (key->type), zconf_type_string (ZCONF_TYPE_STRING)); key->type = ZCONF_TYPE_STRING; key->contents.string = NULL; } if (NULL == key->contents.string /* type changed to string */ || 0 != strcmp (key->contents.string, new_value)) { g_free (key->contents.string); key->contents.string = g_strdup (new_value ? new_value : ""); if (key->model) zmodel_changed (key->model); } zconf_we = FALSE; } /* Creates an string value. Sets desc to NULL to leave it undocumented. Can fail if the given string is too large. FALSE on error. */ void zconf_create_string (const gchar * new_value, const gchar * desc, const gchar * path) { struct zconf_key *key; zconf_we = TRUE; /* start with an error */ g_assert (NULL != path); g_assert (zconf_started); g_assert (NULL != zconf_root); if (!(key = p_zconf_resolve (path, zconf_root))) { key = p_zconf_create (path, zconf_root); key->type = ZCONF_TYPE_STRING; key->contents.string = g_strdup (new_value); } else if (ZCONF_TYPE_STRING != key->type) { if (ZCONF_TYPE_DIR != key->type) g_warning ("Changing the type of %s from %s to %s.", path, zconf_type_string (key->type), zconf_type_string (ZCONF_TYPE_STRING)); key->type = ZCONF_TYPE_STRING; key->contents.string = g_strdup (new_value); } if (desc && !key->description) key->description = g_strdup (desc); zconf_we = FALSE; } /* Gets a boolean value. If where is not NULL, the value is also stored there. Returns FALSE on error (ambiguous, use zconf_error to check). */ gboolean zconf_get_boolean (gboolean * where, const gchar * path) { GET_VALUE (ZCONF_TYPE_BOOLEAN, boolean, FALSE); } /* Sets a boolean value. */ void zconf_set_boolean (gboolean new_value, const gchar * path) { SET_VALUE (ZCONF_TYPE_BOOLEAN, boolean); } /* Creates a boolean key. Cannot fail. */ void zconf_create_boolean(gboolean new_value, const gchar * desc, const gchar * path) { CREATE_VALUE (ZCONF_TYPE_BOOLEAN, boolean); } /* Gets a float value. If where is not NULL, the value is also stored there. Returns 0.0 on error (ambiguous, use zconf_error to check). */ gfloat zconf_get_float (gfloat * where, const gchar * path) { GET_VALUE (ZCONF_TYPE_FLOAT, floating, 0.0); } /* Sets a floating point number. Cannot fail. */ void zconf_set_float(gfloat new_value, const gchar * path) { SET_VALUE (ZCONF_TYPE_FLOAT, floating); } /* Creates a float key. Cannot fail. */ void zconf_create_float(gfloat new_value, const gchar * desc, const gchar * path) { CREATE_VALUE (ZCONF_TYPE_FLOAT, floating); } /* Documentation functions. */ /* Returns the string that describes the given key, NULL if the key is undocumented (ambiguous, in case of the key not being found, NULL is returned, and zconf_error will return non-zero). If where is not NULL, the string will also be stored there (after g_strdup()'ing it) */ const gchar * zconf_get_description (gchar ** where, const gchar * path) { struct zconf_key * key; zconf_we = TRUE; /* Start with an error */ g_assert(path != NULL); g_assert(zconf_started == TRUE); g_assert(zconf_root != NULL); key = p_zconf_resolve(path, zconf_root); if (!key) return NULL; if (where) { *where = NULL; if (NULL != key->description) *where = g_strdup (key->description); } zconf_we = FALSE; return key->description; } /* Sets the string that describes a key. Returns FALSE if the key could not be found. */ gboolean zconf_set_description(const gchar * desc, const gchar * path) { struct zconf_key * key; zconf_we = TRUE; /* Start with an error */ g_assert(path != NULL); g_assert(zconf_started == TRUE); g_assert(zconf_root != NULL); g_assert(desc != NULL); key = p_zconf_resolve(path, zconf_root); if (!key) return FALSE; /* If there was any previous description erase it */ if (key -> description) g_free(key->description); key->description = g_strdup(desc); if (key->description == NULL) return FALSE; zconf_we = FALSE; return TRUE; } /* Value and type querying and erasing functions. */ /* Gets the name of the nth entry in the subdirectory. Call it starting from 0 and incrementing one by one until it gives an error (returns NULL) to query the contents of a key (a key is a directory AND a file). The returned pointer is a pointer to a statically allocated string, and it will only be valid until the next zconf call. if where is not NULL, a new copy will be g_strdup()'ed there. */ const gchar * zconf_get_nth (guint index, gchar ** where, const gchar * path) { struct zconf_key * key; struct zconf_key * subkey; /* The found key */ zconf_we = TRUE; /* Start with an error */ g_assert(path != NULL); g_assert(*path != 0); g_assert(zconf_started == TRUE); g_assert(zconf_root != NULL); key = p_zconf_resolve(path, zconf_root); if (!key) return NULL; if (zconf_buffer) { g_free(zconf_buffer); zconf_buffer = NULL; } subkey = (struct zconf_key *) g_list_nth_data(key->tree, index); /* Check that we have something to access */ if (!subkey) return NULL; if (path[strlen(path)-1] != '/') zconf_buffer = g_strconcat(path, "/", subkey->name, NULL); else zconf_buffer = g_strconcat(path, subkey->name, NULL); if (!zconf_buffer) return NULL; if (where != NULL) *where = g_strdup(zconf_buffer); zconf_we = FALSE; return zconf_buffer; } /* Removes a key from the database. All the keys descendant from this one will be erased too. Fails if it cannot find the given key. */ gboolean zconf_delete(const gchar * path) { struct zconf_key * key; zconf_we = TRUE; /* Start with an error */ g_assert(path != NULL); g_assert(zconf_started == TRUE); g_assert(zconf_root != NULL); key = p_zconf_resolve(path, zconf_root); if (!key) return FALSE; /* Cut the brach */ p_zconf_cut_branch(key); zconf_we = FALSE; return TRUE; } /* Returns the type of the given key. It fails if the key doesn't exist. Failure is indicated by a return value of ZCONF_TYPE_NONE. */ enum zconf_type zconf_get_type(const gchar * path) { struct zconf_key * key; zconf_we = TRUE; /* Start with an error */ g_assert(path != NULL); g_assert(zconf_started == TRUE); g_assert(zconf_root != NULL); key = p_zconf_resolve(path, zconf_root); if (!key) return ZCONF_TYPE_NONE; zconf_we = FALSE; return key->type; } /* Translates the given key type to a string. This string is statically allocated, it may be overwritten the next time you call any zconf function. Always succeeds (returns [Unknown] if the type is unknown :-) */ const gchar * zconf_type_string(enum zconf_type type) { switch (type) { case ZCONF_TYPE_INTEGER: return "Integer"; case ZCONF_TYPE_STRING: return "String"; case ZCONF_TYPE_FLOAT: return "Float"; case ZCONF_TYPE_BOOLEAN: return "Boolean"; case ZCONF_TYPE_DIR: return "Directory"; case ZCONF_TYPE_NONE: return "Undefined"; default: return "Unknown"; } } /* zconf_set_type doesn't exist, if you wish to change the type of a key, you must zconf_set_[type] it, assigning thus a valid value to it. The old key, whatever its type and content was, is erased. Its description is kept untouched. */ /* PRIVATE FUNCTIONS, JUST FOR THIS IMPLEMENTATION. */ /* Translates a xml doc to a zconf_key value, creating subtrees as necessary. Allocates memory for key and modifies its value too. */ static void p_zconf_parse(xmlNodePtr node, xmlDocPtr doc, struct zconf_key ** skey, struct zconf_key * parent) { struct zconf_key * new_key; /* The new key we are creating */ xmlNodePtr p; /* For iterating */ xmlChar * name; /* The name of this node */ xmlChar * type; /* The type of the key */ xmlChar * description; /* The description for the key */ xmlChar * node_string; /* The string content of this node */ gchar * full_name; enum zconf_type key_type; g_assert(node != NULL); g_assert(doc != NULL); /* Get the (string) contents of the node */ node_string = xmlNodeListGetString(doc, node->children, 1); name = xmlGetProp(node, "label"); if (!name) { xmlFree(node_string); return; /* Doesn't have a name, it is not valid */ } /* Create the full path to this key */ if (parent) full_name=g_strconcat(parent->full_path, "/", name, NULL); else full_name=g_strconcat("/", name, NULL); description = xmlGetProp(node, "description"); type = xmlGetProp(node, "type"); if (!type) { xmlFree(name); xmlFree(node_string); xmlFree(description); g_free(full_name); return; } key_type = ZCONF_TYPE_NONE; if (!strcasecmp(type, "Directory")) key_type = ZCONF_TYPE_DIR; else if (!strcasecmp(type, "Integer")) key_type = ZCONF_TYPE_INTEGER; else if (!strcasecmp(type, "Float")) key_type = ZCONF_TYPE_FLOAT; else if (!strcasecmp(type, "Boolean")) key_type = ZCONF_TYPE_BOOLEAN; else if (!strcasecmp(type, "String")) key_type = ZCONF_TYPE_STRING; else /* Error */ { xmlFree(type); g_free(full_name); xmlFree(name); xmlFree(node_string); xmlFree(description); g_warning("The specified type \"%s\" is unknown", type); return; } xmlFree(type); /* Check if that node already exists */ if (p_zconf_resolve(full_name, zconf_root)) { /* It already exists, warn */ g_warning("Duplicated node in the config tree: %s", full_name); xmlFree(name); g_free(full_name); xmlFree(node_string); xmlFree(description); return; } /* Create and clear the struct */ new_key = g_malloc0(sizeof(*new_key)); new_key -> parent = parent; new_key -> full_path = full_name; new_key -> name = g_strdup(name); xmlFree(name); new_key -> type = key_type; if (description) { new_key -> description = g_strdup(description); xmlFree(description); } if ((!node_string) && (key_type != ZCONF_TYPE_DIR)) { g_free(new_key->description); g_free(new_key->full_path); g_free(new_key->name); g_free(new_key); return; } switch (key_type) /* Get the value */ { case ZCONF_TYPE_BOOLEAN: new_key->contents.boolean = atoi(node_string); break; case ZCONF_TYPE_INTEGER: new_key->contents.integer = atoi(node_string); break; case ZCONF_TYPE_FLOAT: new_key->contents.floating = atof(node_string); break; case ZCONF_TYPE_STRING: new_key->contents.string = g_strdup(node_string); break; case ZCONF_TYPE_DIR: /* Nothing to be done here */ break; default: g_assert_not_reached(); break; } /* Lets attach the new node to the parent */ if (parent) parent -> tree = g_list_append(parent->tree, new_key); /* We leave the rest of the fields empty (NULL) */ p = node->children; while (p) /* Iterate through all the nodes, creating subtrees */ { if (!strcasecmp(p->name, "subtree")) p_zconf_parse(p, doc, NULL, new_key); /* Parse this one */ p = p->next; } if (skey) /* store the created key */ *skey = new_key; /* Free the used mem */ xmlFree(node_string); } /* Translates a zconf_key value with its children to a xml doc. */ static void p_zconf_write(xmlNodePtr node, xmlDocPtr doc, struct zconf_key * key) { GList * sub_key; xmlNodePtr new_node; /* The node we are about to add */ gchar * str_value = NULL; /* Value in plain text */ const gchar * str_type = NULL; /* String describing the type */ g_assert(key != NULL); g_assert(doc != NULL); g_assert(node != NULL); g_assert(key -> name != NULL); switch (key -> type) { case ZCONF_TYPE_DIR: str_type = "directory"; break; case ZCONF_TYPE_INTEGER: str_type = "integer"; str_value = g_strdup_printf("%d", key->contents.integer); break; case ZCONF_TYPE_BOOLEAN: str_type = "boolean"; str_value = g_strdup_printf("%d", (gint) key->contents.boolean); break; case ZCONF_TYPE_FLOAT: str_type = "float"; str_value = g_strdup_printf("%g", key->contents.floating); break; case ZCONF_TYPE_STRING: str_type = "string"; str_value = g_strdup(key->contents.string); break; default: g_assert_not_reached(); break; } /* Write this node to the XML tree and go recursive */ new_node = xmlNewChild(node, NULL, "subtree", str_value); xmlSetProp(new_node, "label", key -> name); xmlSetProp(new_node, "type", str_type); if (key -> description) xmlSetProp(new_node, "description", key -> description); sub_key = g_list_first(key -> tree); /* Now go recursive for the rest of the children */ while (sub_key) { p_zconf_write(new_node, doc, (struct zconf_key*) sub_key -> data); sub_key = sub_key -> next; } /* Free the mem */ g_free(str_value); } /* "Cuts a branch" of the zconf tree. Frees all the mem from the given key and all the mem of its children. NOTE: Not very fast, if I have spare time (:DDDDDDDDDD) i should speed this up a bit. Always returns NULL */ static gpointer p_zconf_cut_branch(struct zconf_key * key) { GList * p; g_assert(key != NULL); g_assert(key -> name != NULL); g_assert(key -> full_path != NULL); g_free (key->name); g_free (key->full_path); if (ZCONF_TYPE_STRING == key->type) g_free (key->contents.string); g_free (key->description); if (key->model) g_object_unref(G_OBJECT(key->model)); for (p = g_list_first(key->hooked); p; p = p->next) { struct zconf_hook *hook = p->data; g_free(hook->key); g_free(hook); } g_list_free(key->hooked); /* Call this recursively for our children */ do { p = g_list_first(key -> tree ); if (p) p_zconf_cut_branch((struct zconf_key*) p->data); } while (p); /* Remove ourselves from our parent */ if (key->parent) key->parent->tree = g_list_remove(key->parent->tree, key); g_list_free(key -> tree); /* Free the key itself */ g_free(key); return NULL; /* This simplifies a bit programming */ } /* Resolves the given path, returning the key associated to the (relative) path. It will return NULL if the key is not found */ static struct zconf_key* p_zconf_resolve(const gchar * key, struct zconf_key * starting_dir) { gchar key_name[256]; /* The key name */ GList * p; /* For getting the name */ struct zconf_key * sub_key; /* For traversing */ gint i = 0; gboolean last_item=FALSE; /* We have got the last item in the path */ g_assert(key != NULL); /* We cannot walk on the ether */ if (starting_dir == NULL) return NULL; key_name[255] = 0; /* Remove starting slashes, but warn */ while (key[0] == '/') { if (i > 0) g_warning("Removing %d consecutive slashes, this shouldn't happen", i+1); i++; key++; } i = 0; /* Get the name */ while ((key[i] != '/') && (key[i] != 0) && (i < 255)) { key_name[i] = key[i]; i++; } if (i == 255) { g_warning("Path item too long: %s", key); return NULL; } /* Finish the string */ key_name[i] = 0; /* Check whether this is the last item in the list */ if (((key[i] == '/') && (key[i+1] == 0)) || (key[i] == 0)) last_item = TRUE; /* Check that the current item has the correct name */ if (strcasecmp(starting_dir -> name, key_name)) return NULL; /* This is not the correct way */ /* We found it */ if (last_item) return starting_dir; /* It is not the last one, check the childs */ p = g_list_first(starting_dir -> tree); g_assert(key[i] == '/'); while (p) { sub_key = p_zconf_resolve(&(key[i+1]), (struct zconf_key *) p->data); if (sub_key) /* We got it */ return sub_key; /* Continue searching */ p = p->next; } return NULL; } /* Given a path, creates all the needed nodes that don't exist to make the path a valid (relative to starting_dir) one. Never fails, and returns the last node (if path is xxx/yyy/zzz, returns a pointer to zzz). */ static struct zconf_key * p_zconf_create(const gchar * key, struct zconf_key * starting_dir) { gchar key_name[256], key_name_2[256]; /* The key name */ struct zconf_key * sub_key; /* For traversing */ GList * p; /* For traversing */ gint i = 0, j; gboolean last_item=FALSE; /* We have got the last item in the path */ gchar * ptr; /* A pointer to some text, it isn't really neccessary */ g_assert(key != NULL); g_assert(starting_dir != NULL); key_name[255] = key_name_2[255] = 0; /* Remove starting slashes, but warn */ while (key[0] == '/') { if (i > 0) g_warning("Removing %d consecutive slashes, this shouldn't happen", i+1); i++; key++; } i = 0; /* Start again */ /* Get the name */ while ((key[i] != '/') && (key[i] != 0) && (i < 255)) { key_name[i] = key[i]; i++; } if (i == 255) { g_warning("Path item too long: %s", key); return NULL; } /* Finish the string */ key_name[i] = 0; /* Remove the slash if it is present */ if (((key[i] == '/') && (key[i+1] == 0)) || (key[i] == 0)) last_item = TRUE; /* The name of the starting dir should match the given one */ if (strcasecmp(starting_dir->name, key_name)) { g_warning("%s isn't your domain name, zconf will exit now", key_name); g_assert_not_reached(); } if (last_item) return starting_dir; /* We are done */ /* Get the next item in the path */ i++; j = i; /* Save a copy of i */ while (key[j] == '/') j++; i = 0; /* Get the name */ while ((key[i+j] != '/') && (key[i+j] != 0) && (i < 255)) { key_name_2[i] = key[i+j]; i++; } if (i == 255) { g_warning("Path item too long: %s", key); return NULL; } /* Finish the string */ key_name_2[i] = 0; /* Search in the childs of this node for the next item in the path */ p = starting_dir -> tree; while (p) { sub_key = (struct zconf_key*) p->data; if (!strcasecmp(sub_key->name, key_name_2)) { /* OK, we don't need to create this one */ return p_zconf_create(&(key[j]), sub_key); } p = p->next; } /* The child didn't exist, create it */ sub_key = g_malloc0(sizeof(*sub_key)); sub_key -> name = g_strdup(key_name_2); ptr = starting_dir -> full_path; g_assert(ptr != NULL); if (strlen(ptr) == 0) sub_key -> full_path = g_strconcat("/", key_name_2, NULL); else if (ptr[strlen(ptr)-1] == '/') sub_key -> full_path = g_strconcat(ptr, key_name_2, NULL); else sub_key -> full_path = g_strconcat(ptr, "/", key_name_2, NULL); sub_key -> type = ZCONF_TYPE_DIR; /* Set the parent <-> child relation */ sub_key -> parent = starting_dir; starting_dir -> tree = g_list_append(starting_dir -> tree, sub_key); /* Go on with the recursion */ return p_zconf_create(&(key[j]), sub_key); } /* HOOKS HANDLING */ static void on_key_model_changed (GObject *model, struct zconf_hook *hook) { struct zconf_key *key = g_object_get_data(model, "key"); g_assert(key != NULL); g_assert(hook != NULL); g_assert(hook->callback != NULL); if (ZCONF_TYPE_STRING == key->type) hook->callback (key->full_path, key->contents.string, hook->data); else hook->callback (key->full_path, &key->contents, hook->data); } static struct zconf_hook* real_add_hook(const gchar * key_name, ZConfHook callback, gpointer data, gboolean wakeup) { struct zconf_key *key; struct zconf_hook *hook; g_assert(key_name != NULL); g_assert(callback != NULL); key = p_zconf_resolve(key_name, zconf_root); if (!key) { g_warning("\"%s\" not found while trying to add hook for it", key_name); return NULL; } if (!key->model) { key->model = ZMODEL(zmodel_new()); g_object_set_data(G_OBJECT(key->model), "key", key); } hook = g_malloc(sizeof(struct zconf_hook)); hook->callback = callback; hook->data = data; hook->key = g_strdup(key_name); key->hooked = g_list_append(key->hooked, hook); g_signal_connect(G_OBJECT(key->model), "changed", G_CALLBACK(on_key_model_changed), hook); if (wakeup) { if (ZCONF_TYPE_STRING == key->type) callback (key->full_path, key->contents.string, data); else callback (key->full_path, &key->contents, data); } return hook; } void zconf_add_hook(const gchar * key_name, ZConfHook callback, gpointer data) { real_add_hook(key_name, callback, data, FALSE); } static void on_object_hook_destroyed (GObject *object, struct zconf_hook *hook) { struct zconf_key *key; key = p_zconf_resolve(hook->key, zconf_root); if (!key) { g_warning("Destroying %p: Cannot find key for hook %p: [%s]", object, hook, hook->key); return; } zconf_remove_hook(hook->key, hook->callback, hook->data); } void zconf_add_hook_while_alive(GObject *object, const gchar * key_name, ZConfHook callback, gpointer data, gboolean wakeup) { struct zconf_hook *hook = real_add_hook(key_name, callback, data, wakeup); if (!hook) return; g_signal_connect(object, "destroy", G_CALLBACK(on_object_hook_destroyed), hook); } void zconf_remove_hook(const gchar * key_name, ZConfHook callback, gpointer data) { struct zconf_key *key; struct zconf_hook *hook = NULL; GList *p; g_assert(key_name != NULL); g_assert(callback != NULL); key = p_zconf_resolve(key_name, zconf_root); if (!key) { g_warning("\"%s\" not found while trying to remove hook from it", key_name); return; } if (!key->model) { g_warning("While removing \"%s\": no hooks for that", key_name); return; } for (p = g_list_first(key->hooked); p; p = p->next) { if ((((struct zconf_hook*)p->data)->callback == callback) && (((struct zconf_hook*)p->data)->data == data)) hook = p->data; } if (!hook) { g_warning("Cannot find hook for %p in %s", callback, key_name); return; } g_free(hook->key); key->hooked = g_list_remove(key->hooked, hook); g_signal_handlers_disconnect_matched (key->model, G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, 0, 0, NULL, on_key_model_changed, hook); g_free(hook); } void zconf_touch(const gchar * key_name) { struct zconf_key *key; g_assert(key_name != NULL); key = p_zconf_resolve(key_name, zconf_root); if (!key) { g_warning("\"%s\" not found while trying to touch it", key_name); return; } if (!key->model) return; zmodel_changed(key->model); } /* * Generic hooks */ void zconf_hook_widget_show (const gchar * key _unused_, gpointer new_value_ptr, gpointer user_data) { gboolean show = * (gboolean *) new_value_ptr; GtkWidget *widget = user_data; if (show) gtk_widget_show (widget); else gtk_widget_hide (widget); } void zconf_hook_toggle_button (const gchar * key _unused_, gpointer new_value_ptr, gpointer user_data) { gboolean active = * (gboolean *) new_value_ptr; GtkToggleButton *toggle_button = user_data; if (active != gtk_toggle_button_get_active (toggle_button)) gtk_toggle_button_set_active (toggle_button, active); } void zconf_hook_check_menu (const gchar * key _unused_, gpointer new_value_ptr, gpointer user_data) { gboolean active = * (gboolean *) new_value_ptr; GtkCheckMenuItem *item = user_data; if (active != item->active) gtk_check_menu_item_set_active (item, active); } ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������zapping-0.10cvs6/src/zconf.h������������������������������������������������������������������������ 644 � 764 � 144 � 23526 10305455527 11122� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Zapping (TV viewer for the Gnome Desktop) * Copyright (C) 2000-2001 Iaki Garca Etxebarria * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifndef __ZCONF_H__ #define __ZCONF_H__ #include <gnome.h> /* This file depends on Gnome and glib */ #include <stdio.h> G_BEGIN_DECLS /* Possible key types */ enum zconf_type { ZCONF_TYPE_NONE, /* Indicates failure, a key should never have this type */ ZCONF_TYPE_DIR, /* This key holds no actual value, just subdirs */ ZCONF_TYPE_INTEGER, ZCONF_TYPE_STRING, ZCONF_TYPE_FLOAT, ZCONF_TYPE_BOOLEAN }; /* ZConf initing and closing */ /* Starts zconf, and returns FALSE on error. domain: Specifies the domain where the config will be saved under (usually it's equal to the program name). */ gboolean zconf_init(const gchar * domain); /* Closes ZConf, returns FALSE if zconf could not be closed properly (usually because it couldn't write the config to disk) */ gboolean zconf_close(void); /* Returns the last error zconf generated, 0 means the last operation was ok. It is useful for checking ambiguous return values: if ((!zconf_get_int(...)) && zconf_error()) Show_Error_Message(); else Show_Success_Message(); */ gint zconf_error(void); /* In zconf there are three operations you can perform for each value: get: Gets the key value and fails if it doesn't exist. set: Sets a key value, and creates it (undocumented) if doesn't exist. Never fails. create: If a key doesn't exist, it creates it with this value, if it already exists, it does nothing. Never fails. The paths are standard Unix filenames, relative to the domain or root dir: If the domain is "zapping", paths should be like plugins/png_save/interlaced */ /* Gets an integer value, returns 0 on error (ambiguous). If where is not NULL, the value is also stored in the location pointed to by where. */ gint zconf_get_int(gint * where, const gchar * path); /* Sets an integer value */ void zconf_set_int(gint new_value, const gchar * path); /* Sets a default integer value. desc is the description for the value. Set it to NULL for leaving it undocumented (a empty string is considered as a documented value) */ void zconf_create_int(gint new_value, const gchar * desc, const gchar * path); guint zconf_get_uint(guint * where, const gchar * path); void zconf_set_uint(guint new_value, const gchar * path); void zconf_create_uint(guint new_value, const gchar * desc, const gchar * path); /* Gets a string value. The returned string is statically allocated, will only be valid until the next call to zconf, so use g_strdup() to duplicate it if needed. Returns NULL on error (not ambiguous, NULL is always an error). if where is not NULL, zconf will g_strdup the string itself, and place a pointer to it in where, that should be freed later with g_free. */ const gchar * zconf_get_string(gchar ** where, const gchar * path); /* Sets an string value to the given string. */ void zconf_set_string(const gchar * new_value, const gchar * path); /* Creates an string value. Sets desc to NULL to leave it undocumented. */ void zconf_create_string(const gchar * value, const gchar * desc, const gchar * path); /* Gets a boolean value. If where is not NULL, the value is also stored there. Returns FALSE on error (ambiguous, use zconf_error to check). */ gboolean zconf_get_boolean(gboolean * where, const gchar * path); /* Sets a boolean value. */ void zconf_set_boolean(gboolean new_value, const gchar * path); /* Creates a boolean key. Cannot fail. */ void zconf_create_boolean(gboolean new_value, const gchar * desc, const gchar * path); /* Gets a float value. If where is not NULL, the value is also stored there. Returns 0.0 on error (ambiguous, use zconf_error to check). */ gfloat zconf_get_float(gfloat * where, const gchar * path); /* Sets a floating point number. Cannot fail. */ void zconf_set_float(gfloat new_value, const gchar * path); /* Creates a float key. Cannot fail. */ void zconf_create_float(gfloat new_value, const gchar * desc, const gchar * path); gboolean zconf_copy (const gchar * dst, const gchar * src); /* Documentation functions. */ /* Returns the string that describes the given key, NULL if the key is undocumented (ambiguous, in case of the key not being found, NULL is returned, and zconf_error will return non-zero). If where is not NULL, the string will also be stored there (after g_strdup()'ing it) */ const gchar * zconf_get_description(gchar ** where, const gchar * path); /* Sets the string that describes a key. Returns FALSE if the key could not be found. */ gboolean zconf_set_description(const gchar * desc, const gchar * path); /* Value and type querying and erasing functions. */ /* Gets the name of the nth entry in the subdirectory. Call it starting from 0 and incrementing one by one until it gives an error (returns NULL) to query the contents of a key (a key is a directory AND a file). The returned pointer is a pointer to a statically allocated string, and it will only be valid until the next zconf call. if where is not NULL, a new copy will be g_strdup()'ed there. */ const gchar * zconf_get_nth(guint nth, gchar ** where, const gchar * path); /* Removes a key from the database. All the keys descendant from this one will be erased too. Fails if it cannot find the given key. */ gboolean zconf_delete(const gchar * path); /* Returns the type of the given key. It fails if the key doesn't exist. Failure is indicated by a return value of ZCONF_TYPE_NONE. */ enum zconf_type zconf_get_type(const gchar * key); /* Translates the given key type to a string. This string is statically allocated, it may be overwritten the next time you call any zconf function. Always succeeds (returns [Unknown] if the type is unknown :-) */ const gchar * zconf_type_string(enum zconf_type type); /* zconf_set_type doesn't exist, if you wish to change the type of a key, you must zconf_set_[type] it, assigning thus a valid value to it. The old key, whatever its type and content was, is erased. Its description is kept untouched. */ /* Hooks handling. Any client can put a hook into a given key, it will be called when the value of the key is changed. new_value is a *pointer* to the contents. That is, if you are monitoring an int, you get the actual value by doing *((gint*)new_value_ptr), for a string (gchar*)new_value_ptr, etc. The pointer will only be valid during the callback. */ typedef void (*ZConfHook) ( const gchar * key, gpointer new_value_ptr, gpointer data ); /* key: The key we hook to. hook: The routine to be called. data: data to be passed to the hook. */ void zconf_add_hook(const gchar * key, ZConfHook hook, gpointer data); /* Add a hook that will be automatically removed when object is destroyed. object: Object to connect to. key: The key we hook to. hook: The routine to be called. data: data to be passed to the hook. wakeup: call routine once in advance. */ void zconf_add_hook_while_alive(GObject *object, const gchar * key, ZConfHook hook, gpointer data, gboolean wakeup); /* Removes the given hook from the key. key: the key to remove the hook from. hook: The hook function to remove data: the data passed to that function */ void zconf_remove_hook(const gchar * key, ZConfHook hook, gpointer data); /* Touches the key, triggering any callbacks without modifying the key */ void zconf_touch(const gchar * key); #ifdef ZCONF_DOMAIN #define zcs_int(var, key) \ zconf_set_int(var, ZCONF_DOMAIN key) #define zcg_int(where, key) \ zconf_get_int(where, ZCONF_DOMAIN key) #define zcc_int(value, desc, key) \ zconf_create_int(value, desc, ZCONF_DOMAIN key) #define zcs_uint(var, key) \ zconf_set_uint(var, ZCONF_DOMAIN key) #define zcg_uint(where, key) \ zconf_get_uint(where, ZCONF_DOMAIN key) #define zcc_uint(value, desc, key) \ zconf_create_uint(value, desc, ZCONF_DOMAIN key) #define zcs_float(var, key) \ zconf_set_float(var, ZCONF_DOMAIN key) #define zcg_float(where, key) \ zconf_get_float(where, ZCONF_DOMAIN key) #define zcc_float(value, desc, key) \ zconf_create_float(value, desc, ZCONF_DOMAIN key) #define zcs_char(var, key) \ zconf_set_string(var, ZCONF_DOMAIN key) #define zcg_char(where, key) \ zconf_get_string(where, ZCONF_DOMAIN key) #define zcc_char(value, desc, key) \ zconf_create_string(value, desc, ZCONF_DOMAIN key) #define zcs_bool(var, key) \ zconf_set_boolean(var, ZCONF_DOMAIN key) #define zcg_bool(where, key) \ zconf_get_boolean(where, ZCONF_DOMAIN key) #define zcc_bool(value, desc, key) \ zconf_create_boolean(value, desc, ZCONF_DOMAIN key) #define zcs_z_key(var, key) \ zconf_set_z_key(var, ZCONF_DOMAIN key) #define zcg_z_key(where, key) \ zconf_get_z_key(where, ZCONF_DOMAIN key) #define zcc_z_key(value, desc, key) \ zconf_create_z_key(value, desc, ZCONF_DOMAIN key) #endif /* ZCONF_DOMAIN */ /* Generic hooks */ extern void zconf_hook_widget_show (const gchar * key, gpointer new_value_ptr, gpointer user_data); extern void zconf_hook_toggle_button (const gchar * key, gpointer new_value_ptr, gpointer user_data); extern void zconf_hook_check_menu (const gchar * key, gpointer new_value_ptr, gpointer user_data); G_END_DECLS #endif /* ZCONF.H */ ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������zapping-0.10cvs6/src/zvideo.c����������������������������������������������������������������������� 644 � 764 � 144 � 52306 10371552540 11270� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Zapping (TV viewer for the Gnome Desktop) * Video Widget * Copyright (C) 2003 Michael H. Schimek * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* $Id: zvideo.c,v 1.8 2006/02/06 04:49:36 mschimek Exp $ */ #include "site_def.h" #ifndef ZVIDEO_EXPOSE_TEST #define ZVIDEO_EXPOSE_TEST 0 #endif #include "zmisc.h" #include "zvideo.h" #include "zmarshalers.h" #define MAX_SIZE 16384U enum { CURSOR_BLANKED, NUM_SIGNALS }; static GtkDrawingAreaClass * parent_class = NULL; static guint signals[NUM_SIGNALS]; /* Cursor blanking routines */ static void cursor_blanked (ZVideo * video) { gdk_window_set_cursor (GTK_WIDGET (video)->window, Z_VIDEO_GET_CLASS (video)->blank_cursor); } static gboolean blank_cursor_timeout (gpointer p) { ZVideo *video = (ZVideo *) p; GtkWidget *widget; GdkEventMask mask; g_assert (video->blank_cursor_timeout > 0); g_signal_emit (video, signals[CURSOR_BLANKED], 0); video->blank_cursor_timeout_id = NO_SOURCE_ID; widget = GTK_WIDGET (video); mask = gdk_window_get_events (widget->window); mask |= GDK_POINTER_MOTION_MASK; /* Something outside Zapping seems to request motion hint, suppressing motion events. */ mask &= ~GDK_POINTER_MOTION_HINT_MASK; gdk_window_set_events (widget->window, mask); return FALSE; /* don't call again */ } /** * z_video_set_cursor: * @video: a #ZVideo object * @cursor_type:: * * Changes the cursor appearance. When pointer hiding is enabled, * makes the cursor visible and resets the blank timer. */ gboolean z_video_set_cursor (ZVideo * video, GdkCursorType cursor_type) { GdkCursor *cursor; cursor_type = MIN (cursor_type, GDK_LAST_CURSOR - 2) & ~1; if ((cursor = gdk_cursor_new (cursor_type))) { gdk_window_set_cursor (GTK_WIDGET (video)->window, cursor); gdk_cursor_unref (cursor); video->blanked_cursor_type = cursor_type; if (video->blank_cursor_timeout_id > 0) g_source_remove (video->blank_cursor_timeout_id); if (video->blank_cursor_timeout > 0) video->blank_cursor_timeout_id = g_timeout_add (video->blank_cursor_timeout, (GSourceFunc) blank_cursor_timeout, video); else video->blank_cursor_timeout_id = NO_SOURCE_ID; return TRUE; } return FALSE; } /** * z_video_blank_cursor: * @video: a #ZVideo object * @timeout: time in milliseconds after which the pointer should * disappear. 0 to disable pointer hiding. * * Enable or disable pointer hiding. */ void z_video_blank_cursor (ZVideo * video, guint timeout) { g_return_if_fail (Z_IS_VIDEO (video)); /* Let's get real. */ timeout = MIN (timeout, (guint) 60 * 60 * 1000); if (video->blank_cursor_timeout == timeout) return; video->blank_cursor_timeout = timeout; if (timeout > 0) { video->blank_cursor_timeout_id = g_timeout_add (video->blank_cursor_timeout, (GSourceFunc) blank_cursor_timeout, video); } else { GtkWidget *widget; GdkEventMask mask; z_video_set_cursor (video, video->blanked_cursor_type); widget = GTK_WIDGET (video); mask = gdk_window_get_events (widget->window); mask &= ~GDK_POINTER_MOTION_MASK; gdk_window_set_events (widget->window, mask); } } #undef FLOOR #define FLOOR(val, base) ({ \ guint _val = val; \ _val -= _val % (base); \ }) #undef CEIL #define CEIL(val, base) FLOOR((val) + (base) - 1, base) static __inline__ GtkWidget * get_toplevel_window (ZVideo * video) { GtkWidget *toplevel; if ((toplevel = gtk_widget_get_toplevel (GTK_WIDGET (video)))) if (!GTK_WIDGET_TOPLEVEL (toplevel) || !GTK_IS_WINDOW (toplevel)) return NULL; return toplevel; } static void size_allocate (GtkWidget * widget, GtkAllocation * allocation) { ZVideo *video = (ZVideo *) widget; GtkWidget *toplevel; GtkAllocation darea_alloc; g_return_if_fail (Z_IS_VIDEO (widget)); g_return_if_fail (allocation != NULL); if (!video->size_magic) { GTK_WIDGET_CLASS (parent_class)->size_allocate (widget, allocation); return; } /* FIXME: fails after gdk_window_resize(main_window->window, 0, 0); How's that possible despite proper minimum size_requisition and geometry hints? */ /* g_assert (allocation->width >= video->min_width);*/ /* g_assert (allocation->height >= video->min_height);*/ toplevel = get_toplevel_window (video); /* Our objective is to automatically resize the drawing area as the user resizes the window, and to keep the size fixed otherwise. The problem is gtk has no concept of a fixed size widget. A size_request() determines the desired (minimum) size of the widget, and in turn of the toplevel window. When other widgets such as a toolbar are dynamically added gtk expands the window if the required size exceeds toplevel window->requisition. Removing shrinks the window (by setting window manager geometry hint max size to requisition) provided resizing is disabled for this window. Obviously we can't use these mechanisms. GTK_WIDGET (video)-> requisition is our minimum size as usual and we compute geometry hints ourselves. The lines below check for the adding/removing case and resize the window instead of adjusting the widget. */ if (toplevel && video->window_alloc.width == toplevel->allocation.width && video->window_alloc.height == toplevel->allocation.height && (allocation->width != widget->allocation.width || allocation->height != widget->allocation.height)) { gdk_window_resize (toplevel->window, toplevel->allocation.width - allocation->width + widget->allocation.width, toplevel->allocation.height - allocation->height + widget->allocation.height); return; } /* The drawing area size shall be constrained by minimum size, maximum size, size increment and aspect ratio parameters. We cannot expect gtk to allocate a suitable size, so here we compute the largest possible size and center the drawing area within the allocated space. Roughly the effect GtkAlignment & GtkAspectFrame & GtkDrawingArea would give. Actually I'm afraid this is the only feature we can count on. The code tinkering with the toplevel window probably works only by chance. Of course the padding space is not painted. Set the background attribute or whatever, of the parent widget if you care. */ darea_alloc = *allocation; if (video->ratio > 0.0) { if (video->ratio * allocation->height > allocation->width) darea_alloc.height = allocation->width / video->ratio + 0.5; else darea_alloc.width = video->ratio * allocation->height + 0.5; } darea_alloc.width = FLOOR (darea_alloc.width, video->mod_x); darea_alloc.height = FLOOR (darea_alloc.height, video->mod_y); darea_alloc.width = CLAMP ((guint) darea_alloc.width, video->min_width, video->max_width); darea_alloc.height = CLAMP ((guint) darea_alloc.height, video->min_height, video->max_height); darea_alloc.x = allocation->x + ((allocation->width - darea_alloc.width) >> 1); darea_alloc.y = allocation->y + ((allocation->height - darea_alloc.height) >> 1); GTK_WIDGET_CLASS (parent_class)->size_allocate (widget, &darea_alloc); /* Supposedly geometry hints tell the WM about our constraints, such that the user can only resize to a suitable size in the first place, avoiding ugly padding. There are a number of problems though. According to the ICCCM the hints.base*, hints.*aspect and hints.*inc define a preferred window size of: window_w = base_w + i * w_inc, window_h = base_h + j * h_inc with i and j >= 0 such that min_aspect <= (i * w_inc) / (j * h_inc) <= max_aspect and min_w <= window_w <= max_w, min_h <= window_h <= max_h. The intention seems clear, but I still couldn't find a single WM working this way. Even xf86's own twm and gdk follow the bad practice of min_aspect <= window_w / window_h <= max_aspect, and limits are inconsistently applied. We can work around the wrong limits, and when video->ratio == 0.0 or base_width == base_height == 0 the geometry hints should work just fine. Adjusting the aspect while or after the user resizes is not permitted by the ICCCM and would indeed require plenty of WM specific work-arounds, so I opted against it. Alternatively we can ignore video->ratio or accept a wrong aspect value including or excluding base or something in between. This will nearly always cause padding, so I guess not forcing a window ratio is still the most user friendly option. Actually I believe the WM should just call with a pointer position and let the client calculate a suitable size. Then we could also snap to the capture sizes really supported by the hardware. Sigh. */ if (toplevel) { GdkWindowHints hints_mask; GdkGeometry hints; GtkRequisition min; GtkRequisition curr; guint changed; hints.base_width = toplevel->allocation.width - allocation->width; hints.base_height = toplevel->allocation.height - allocation->height; changed = hints.base_width ^ video->old_hints.base_width; changed |= hints.base_height ^ video->old_hints.base_height; curr = widget->requisition; widget->requisition.width = video->min_width; widget->requisition.height = video->min_height; /* Probably there's a better way but I'm tired of this crap. */ gtk_widget_size_request (toplevel, &min); hints.min_width = hints.base_width + CEIL (min.width - hints.base_width, video->mod_x); hints.min_height = hints.base_height + CEIL (min.height - hints.base_height, video->mod_y); widget->requisition = curr; gtk_widget_size_request (toplevel, &min); /* video->min* should have the correct aspect, but to fit all widgets the minimum window size can be larger than this, so we have to re-aspect. */ if (video->ratio > 0.0) { if (video->ratio * hints.min_height > hints.min_width) hints.min_width = hints.min_height * video->ratio + 0.5; else hints.min_height = hints.min_width / video->ratio + 0.5; } changed |= hints.min_width ^ video->old_hints.min_width; changed |= hints.min_height ^ video->old_hints.min_height; hints.max_width = hints.base_width + FLOOR (video->max_width, video->mod_x); hints.max_width = MAX (hints.max_width, hints.min_width); changed |= hints.max_width ^ video->old_hints.max_width; hints.max_height = hints.base_height + FLOOR (video->max_height, video->mod_y); hints.max_height = MAX (hints.max_height, hints.min_height); changed |= hints.max_height ^ video->old_hints.max_height; if (changed) { video->old_hints = hints; hints_mask = 0 | GDK_HINT_BASE_SIZE | GDK_HINT_MIN_SIZE | GDK_HINT_MAX_SIZE; if (video->mod_x | video->mod_y) { hints.width_inc = video->mod_x; hints.height_inc = video->mod_y; hints_mask |= GDK_HINT_RESIZE_INC; } /* As of GTK+ 2.2 the geometry hints are broken, requesting the inverse of the desired aspect. Has been fixed. */ /* Sawfish 1.2 doesn't seem to support the aspect hint and behaves strangely when we call gtk_window_set_geometry_- hints() with aspect while the user resizes. Needs further examination. */ if ((gtk_major_version > 2 || (gtk_major_version == 2 && (gtk_minor_version > 2))) && 0 && video->ratio > 0.0 && (hints.base_width | hints.base_height) == 0) { hints.min_aspect = video->ratio; hints.max_aspect = video->ratio; hints_mask |= GDK_HINT_ASPECT; } if (0) fprintf (stderr, "set_geometry_hints: min=%d,%d max=%d,%d " "inc=%d,%d aspect=%f\n", hints.min_width, hints.min_height, hints.max_width, hints.max_height, hints.width_inc, hints.height_inc, hints.min_aspect); /* I guess geometry_widget should be video, not toplevel. But somehow the function doesn't initialize hints.base* as we do. Well, after computing base* ourselves we had to initialize minimum and maximum too, so we have to call this anyway. */ gtk_window_set_geometry_hints (GTK_WINDOW (toplevel), /* geometry_widget */ toplevel, &hints, hints_mask); } } } static void size_request (GtkWidget * widget, GtkRequisition * requisition) { ZVideo *video = (ZVideo *) widget; GTK_WIDGET_CLASS (parent_class)->size_request (widget, requisition); if (video->size_magic) { requisition->width = CLAMP ((guint) requisition->width, video->min_width, video->max_width); requisition->height = CLAMP ((guint) requisition->height, video->min_height, video->max_height); } } static void window_size_allocate (GtkWidget * widget _unused_, GtkAllocation * allocation, gpointer user_data) { ZVideo *video = (ZVideo *) user_data; video->window_alloc = *allocation; } /** * z_video_set_min_size: * @video: a #ZVideo object * @width: * @height: * * Set the desired minimum size of the drawing area. Width * and height will be rounded up to the desired size increment, * so you may want to set that first. */ void z_video_set_min_size (ZVideo * video, guint width, guint height) { video->min_width = CEIL (MIN (width, MAX_SIZE), video->mod_x); video->min_height = CEIL (MIN (height, MAX_SIZE), video->mod_y); video->max_width = MAX (video->max_width, video->min_width); video->max_height = MAX (video->max_height, video->min_height); video->old_hints.base_width = ~0; /* force update */ gtk_widget_queue_resize (GTK_WIDGET (video)); } /** * z_video_set_max_size: * @video: a #ZVideo object * @width: * @height: * * Set the desired maximum size of the drawing area. Width * and height will be rounded down to the desired size increment, * so you may want to set that first. */ void z_video_set_max_size (ZVideo * video, guint width, guint height) { video->max_width = FLOOR (MIN (width, MAX_SIZE), video->mod_x); video->max_height = FLOOR (MIN (height, MAX_SIZE), video->mod_y); video->min_width = MIN (video->min_width, video->max_width); video->min_height = MIN (video->min_height, video->max_height); video->old_hints.base_width = ~0; /* force update */ gtk_widget_queue_resize (GTK_WIDGET (video)); } /** * z_video_set_size_inc: * @video: a #ZVideo object * @width: * @height: * * Set the desired size increment of the drawing area. Minimum * and maximum size will be rounded up and down accordingly, so you * may want to set those first. * * You should choose a size increment matching the desired aspect * ratio, for example 32/24 or 32/18. * * The default size increment is 1/1. */ void z_video_set_size_inc (ZVideo * video, guint width, guint height) { video->mod_x = width; video->mod_y = height; video->min_width = CEIL (video->min_width, video->mod_x); video->min_height = CEIL (video->min_height, video->mod_y); video->max_width = FLOOR (video->max_width, video->mod_x); video->max_height = FLOOR (video->max_height, video->mod_y); video->max_width = MAX (video->max_width, video->min_width); video->max_height = MAX (video->max_height, video->min_height); video->old_hints.base_width = ~0; /* force update */ gtk_widget_queue_resize (GTK_WIDGET (video)); } /** * z_video_set_aspect: * @video: a #ZVideo object * @ratio: x/y, 0.0 to accept any ratio. * * Set the desired aspect ratio of the drawing area. You should * choose a ratio matching the desired size increment, minimum * and maximum size. * * The default aspect ratio is 0.0. */ void z_video_set_aspect (ZVideo * video, gfloat ratio) { video->ratio = ratio; video->old_hints.base_width = ~0; /* force update */ gtk_widget_queue_resize (GTK_WIDGET (video)); } /* Miscellaneous */ static gint events (GtkWidget * widget, GdkEvent * event, gpointer unused _unused_) { ZVideo *video = (ZVideo *) widget; if (0) fprintf (stderr, "on_events: GDK_%s\n", z_gdk_event_name (event)); switch (event->type) { case GDK_EXPOSE: if (ZVIDEO_EXPOSE_TEST) { fprintf (stderr, "z_video expose\n"); gdk_draw_arc (widget->window, widget->style->fg_gc[GTK_WIDGET_STATE (widget)], TRUE, 0, 0, widget->allocation.width, widget->allocation.height, 0, 64 * 360); } break; case GDK_MOTION_NOTIFY: /* Note there is a VidMode event, but we already get this event when the VidMode changed, by Ctrl-Alt-nk+/- anyway. Why this happens I can only speculate. Well, it is a desired side effect in fullscreen mode, connecting to the cursor-blanked signal to recenter the video. */ /* fall through */ case GDK_BUTTON_PRESS: if (video->blank_cursor_timeout > 0) z_video_set_cursor (video, video->blanked_cursor_type); break; /* This prevents a flicker when the pointer reenters the drawing area window and the cursor is still blanked. */ case GDK_LEAVE_NOTIFY: if (video->blank_cursor_timeout > 0) { guint timeout = video->blank_cursor_timeout; /* Don't restart timer */ video->blank_cursor_timeout = 0; z_video_set_cursor (video, video->blanked_cursor_type); video->blank_cursor_timeout = timeout; } break; default: break; } return 0; /* propagate the event */ } static void destroy (GtkObject * object) { ZVideo *video = (ZVideo *) object; GtkWidget *toplevel; if (video->blank_cursor_timeout_id > 0) g_source_remove (video->blank_cursor_timeout_id); if ((toplevel = get_toplevel_window (video))) g_signal_handlers_disconnect_by_func (toplevel, window_size_allocate, video); GTK_OBJECT_CLASS (parent_class)->destroy (object); } static void realize (GtkWidget * widget) { ZVideo *video = (ZVideo *) widget; GtkWidget *toplevel; GTK_WIDGET_CLASS (parent_class)->realize (widget); toplevel = get_toplevel_window (video); g_assert (toplevel != NULL); g_signal_connect (toplevel, "size-allocate", G_CALLBACK (window_size_allocate), video); } static void instance_init (GTypeInstance * instance, gpointer g_class _unused_) { ZVideo *video = (ZVideo *) instance; video->size_magic = TRUE; video->mod_x = 1; video->mod_y = 1; video->ratio = 0.0; /* any */ video->min_width = video->mod_x; video->min_height = video->mod_y; video->max_width = FLOOR (MAX_SIZE, video->mod_x); video->max_height = FLOOR (MAX_SIZE, video->mod_y); video->blank_cursor_timeout = 0; video->blanked_cursor_type = GDK_LEFT_PTR; gtk_widget_add_events (GTK_WIDGET (video), 0 | GDK_POINTER_MOTION_MASK | GDK_BUTTON_PRESS_MASK | GDK_LEAVE_NOTIFY_MASK); g_signal_connect (video, "event", G_CALLBACK (events), NULL); video->window_alloc.width = ~0; video->old_hints.base_width = ~0; } GtkWidget * z_video_new (void) { D(); return GTK_WIDGET (g_object_new (Z_TYPE_VIDEO, NULL)); } static void class_init (gpointer g_class, gpointer class_data _unused_) { ZVideoClass *class = g_class; GtkObjectClass *object_class; GtkWidgetClass *widget_class; object_class = GTK_OBJECT_CLASS (g_class); widget_class = GTK_WIDGET_CLASS (g_class); parent_class = g_type_class_peek_parent (g_class); object_class->destroy = destroy; widget_class->realize = realize; widget_class->size_allocate = size_allocate; widget_class->size_request = size_request; { char empty_cursor [16 * 16 / 8]; GdkColor fg = { 0, 0, 0, 0 }; GdkPixmap *pixmap; CLEAR (empty_cursor); pixmap = gdk_bitmap_create_from_data (NULL, empty_cursor, 16, 16); /* XXX unref? */ class->blank_cursor = gdk_cursor_new_from_pixmap (/* source */ pixmap, /* mask */ pixmap, &fg, &fg, 8, 8); g_object_unref (G_OBJECT (pixmap)); } class->cursor_blanked = cursor_blanked; signals[CURSOR_BLANKED] = g_signal_new ("cursor-blanked", G_OBJECT_CLASS_TYPE (object_class), G_SIGNAL_RUN_FIRST, G_STRUCT_OFFSET (ZVideoClass, cursor_blanked), NULL, NULL, z_marshal_VOID__VOID, G_TYPE_NONE, 0); } GType z_video_get_type (void) { static GType video_type = 0; if (!video_type) { static const GTypeInfo video_info = { .class_size = sizeof (ZVideoClass), .class_init = class_init, .instance_size = sizeof (ZVideo), .instance_init = instance_init, }; video_type = g_type_register_static (GTK_TYPE_DRAWING_AREA, "ZVideo", &video_info, 0); } return video_type; } ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������zapping-0.10cvs6/src/zvideo.h����������������������������������������������������������������������� 644 � 764 � 144 � 5175 10125542430 11251� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Zapping (TV viewer for the Gnome Desktop) * Video Widget * Copyright (C) 2003 Michael H. Schimek * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifndef Z_VIDEO_H #define Z_VIDEO_H #include <gtk/gtk.h> #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ #define Z_TYPE_VIDEO (z_video_get_type ()) #define Z_VIDEO(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), Z_TYPE_VIDEO, ZVideo)) #define Z_VIDEO_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), Z_TYPE_VIDEO, ZVideoClass)) #define Z_IS_VIDEO(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), Z_TYPE_VIDEO)) #define Z_IS_VIDEO_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), Z_TYPE_VIDEO)) #define Z_VIDEO_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), Z_TYPE_VIDEO, ZVideoClass)) typedef struct _ZVideo ZVideo; typedef struct _ZVideoClass ZVideoClass; struct _ZVideo { GtkDrawingArea drawing_area; /*< private >*/ gboolean size_magic; guint min_width; guint min_height; guint max_width; guint max_height; guint mod_x; guint mod_y; gfloat ratio; guint blank_cursor_timeout; guint blank_cursor_timeout_id; GdkCursorType blanked_cursor_type; GtkAllocation window_alloc; GdkGeometry old_hints; }; struct _ZVideoClass { GtkDrawingAreaClass parent_class; void (* cursor_blanked) (ZVideo *); GdkCursor * blank_cursor; }; extern GType z_video_get_type (void) G_GNUC_CONST; extern GtkWidget * z_video_new (void); extern gboolean z_video_set_cursor (ZVideo * video, GdkCursorType cursor_type); extern void z_video_blank_cursor (ZVideo * video, guint timeout); extern void z_video_set_min_size (ZVideo * video, guint width, guint height); extern void z_video_set_max_size (ZVideo * video, guint width, guint height); extern void z_video_set_size_inc (ZVideo * video, guint width, guint height); extern void z_video_set_aspect (ZVideo * video, gfloat ratio); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* Z_VIDEO_H */ ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������zapping-0.10cvs6/src/fullscreen.c������������������������������������������������������������������� 644 � 764 � 144 � 43001 10404546201 12114� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Zapping (TV viewer for the Gnome Desktop) * Copyright (C) 2000-2001 Iaki Garca Etxebarria * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* $Id: fullscreen.c,v 1.53 2006/03/11 13:11:29 mschimek Exp $ */ /** * Fullscreen mode handling * * I wonder if we shouldn't simply switch the main window to * fullscreen... */ #ifdef HAVE_CONFIG_H # include "config.h" #endif #include <gtk/gtk.h> #include <gdk/gdkx.h> #define ZCONF_DOMAIN "/zapping/options/main/" #include "zconf.h" #include "zgconf.h" #include "osd.h" #include "x11stuff.h" #include "interface.h" #include "v4linterface.h" #include "fullscreen.h" #include "audio.h" #include "plugins.h" #include "zvideo.h" #include "globals.h" #include "zvbi.h" #include "zstack.h" #include "plugins/subtitle/view.h" #include "subtitle.h" #include "overlay.h" extern gboolean was_fullscreen; static x11_vidmode_info * svidmodes; static GtkWidget * drawing_area; static GtkWidget * black_window; /* The black window when you go fullscreen */ static GtkWidget * full_stack; static SubtitleView * subtitles; static x11_vidmode_state old_vidmode; static const tv_screen * screen; static gint old_mw_x; static gint old_mw_y; static gboolean on_key_press (GtkWidget * widget, GdkEventKey * event) { if (GDK_q == event->keyval && (event->state & GDK_CONTROL_MASK)) { was_fullscreen = TRUE; python_command (widget, "zapping.switch_mode('window'); zapping.quit()"); return TRUE; } else if (GDK_Escape == event->keyval) { python_command (widget, "zapping.switch_mode('window')"); return TRUE; } #ifdef HAVE_LIBZVBI if (CAPTURE_MODE_TELETEXT == tv_get_capture_mode (zapping->info)) { TeletextView *view; view = (TeletextView *) drawing_area; if (view->key_press (view, event)) return TRUE; } #endif return on_channel_enter (widget, event, NULL) || on_user_key_press (widget, event, NULL) || on_channel_key_press (widget, event, NULL); } static gboolean on_button_press (GtkWidget * widget, GdkEventButton * event) { switch (event->button) { case 2: /* Middle button */ python_command (widget, "zapping.switch_mode('window')"); return TRUE; /* handled */ case 3: /* Right button */ zapping_create_popup (zapping, event); return TRUE; /* handled */ default: break; } return FALSE; /* pass on */ } static gboolean on_scroll_event (GtkWidget * widget, GdkEventScroll * event) { switch (event->direction) { case GDK_SCROLL_UP: case GDK_SCROLL_LEFT: python_command (widget, "zapping.channel_up()"); return TRUE; /* handled */ case GDK_SCROLL_DOWN: case GDK_SCROLL_RIGHT: python_command (widget, "zapping.channel_down()"); return TRUE; /* handled */ default: break; } return FALSE; /* pass on */ } static void on_cursor_blanked (ZVideo * video _unused_, gpointer user_data _unused_) { GtkWindow *window; if (0) { gint x; gint y; gint width; gint height; const tv_screen *s; /* Root window relative position. */ gdk_window_get_origin (black_window->window, &x, &y); gdk_window_get_geometry (black_window->window, /* x */ NULL, /* y */ NULL, &width, &height, /* depth */ NULL); s = tv_screen_list_find (screens, x, y, (guint) width, (guint) height); if (NULL != s && screen != s) { /* Moved to a different screen. */ /* TO DO: - restore vidmode on old screen. - find suitable vidmode on new screen. */ } } /* Recenter the window. */ window = GTK_WINDOW (black_window); gtk_window_move (window, (gint) screen->x, (gint) screen->y); /* Recenter the viewport. */ x11_vidmode_switch (svidmodes, screens, NULL, NULL); } static void set_blank_timeout (ZVideo * video) { gint timeout; timeout = 0; /* disabled */ z_gconf_get_int (&timeout, "/apps/zapping/blank_cursor_timeout"); z_video_blank_cursor (video, timeout); } static const x11_vidmode_info * find_vidmode (const x11_vidmode_info *vidmodes, guint width, guint height) { const x11_vidmode_info *v; const x11_vidmode_info *vmin; gint64 amin; vmin = vidmodes; amin = ((gint64) 1) << 62; for (v = vidmodes; v; v = v->next) { gint64 a; gint64 dw, dh; if (0) fprintf (stderr, "width=%d height=%d cur %ux%u@%u best %ux%u@%u\n", width, height, v->width, v->height, (guint)(v->vfreq + 0.5), vmin->width, vmin->height, (guint)(vmin->vfreq + 0.5)); /* XXX ok? */ dw = (gint64) v->width - width; dh = (gint64) v->height - height; a = dw * dw + dh * dh; if (a < amin || (a == amin && v->vfreq > vmin->vfreq)) { vmin = v; amin = a; } } v = vmin; if (0) fprintf (stderr, "Using mode %ux%u@%u for video %ux%u\n", v->width, v->height, (guint)(v->vfreq + 0.5), width, height); return v; } static const tv_screen * find_screen (void) { gint x; gint y; gint width; gint height; GdkWindow *window; const tv_screen *xs; window = GTK_WIDGET (zapping)->window; /* Root window relative position. */ gdk_window_get_origin (window, &x, &y); gdk_window_get_geometry (window, /* x */ NULL, /* y */ NULL, &width, &height, /* depth */ NULL); xs = tv_screen_list_find (screens, x, y, (guint) width, (guint) height); if (!xs) xs = screens; return xs; } GdkPixbuf * fullscreen_get_subtitle_image (GdkRectangle * expose, guint width, guint height) { if (subtitles) return subtitles->get_image (subtitles, expose, width, height); else return NULL; } static const gchar * subfull_key = "/zapping/internal/subtitle/fullscreen"; gboolean fullscreen_activate_subtitles (gboolean active) { g_assert (NULL != full_stack); if (active) { #ifdef HAVE_LIBZVBI if (_subtitle_view_new) { if (!subtitles) { subtitles = (SubtitleView *) _subtitle_view_new (); subt_set_position_from_config (subtitles, subfull_key); gtk_widget_show (GTK_WIDGET (subtitles)); z_signal_connect_const (G_OBJECT (subtitles), "z-position-changed", G_CALLBACK (subt_store_position_in_config), subfull_key); g_signal_connect (G_OBJECT (subtitles), "destroy", G_CALLBACK (gtk_widget_destroyed), &subtitles); z_stack_put (Z_STACK (full_stack), GTK_WIDGET (subtitles), ZSTACK_SUBTITLES); } subtitles->monitor_page (subtitles, zvbi_caption_pgno); if (CAPTURE_MODE_OVERLAY == tv_get_capture_mode (zapping->info)) { const tv_window *w; w = tv_cur_overlay_window (zapping->info); subtitles->set_rolling (subtitles, FALSE); subtitles->set_video_bounds (subtitles, w->x, w->y, w->width, w->height); } } #endif /* HAVE_LIBZVBI */ } else { if (subtitles) { gtk_widget_destroy (GTK_WIDGET (subtitles)); subtitles = NULL; } } return TRUE; } gboolean stop_fullscreen (void) { g_assert (DISPLAY_MODE_FULLSCREEN == zapping->display_mode || DISPLAY_MODE_BACKGROUND == zapping->display_mode); if (subtitles) { gtk_widget_destroy (GTK_WIDGET (subtitles)); subtitles = NULL; } switch (tv_get_capture_mode (zapping->info)) { case CAPTURE_MODE_OVERLAY: stop_overlay (); break; case CAPTURE_MODE_READ: if (!capture_stop ()) return FALSE; break; case CAPTURE_MODE_TELETEXT: /* Nothing to do. */ break; default: g_assert_not_reached (); } zapping->display_mode = DISPLAY_MODE_WINDOW; zapping->display_window = GTK_WIDGET (zapping->video); tv_set_capture_mode (zapping->info, CAPTURE_MODE_NONE); x11_vidmode_restore (svidmodes, &old_vidmode); osd_unset_window (); /* Remove the black window */ gtk_widget_destroy (black_window); black_window = NULL; x11_force_expose ((gint) screen->x, (gint) screen->y, screen->width, screen->height); x11_vidmode_list_delete (svidmodes); svidmodes = NULL; gtk_widget_show (GTK_WIDGET (zapping)); /* Undo "smart" placement by the WM. */ gtk_window_move (GTK_WINDOW (zapping), old_mw_x, old_mw_y); return TRUE; } gboolean start_fullscreen (display_mode dmode, capture_mode cmode) { const tv_screen *xs; GtkWindow *window; GdkColor chroma; const gchar *vm_name; const x11_vidmode_info *vm; gint vx; gint vy; guint vwidth; guint vheight; GtkWidget *fixed; #ifdef HAVE_LIBZVBI if (CAPTURE_MODE_TELETEXT == cmode) if (!_teletext_view_new || !zvbi_get_object ()) return FALSE; #else if (CAPTURE_MODE_TELETEXT == cmode) return FALSE; #endif xs = find_screen (); screen = xs; /* VidModes available on this screen. */ svidmodes = x11_vidmode_list_new (NULL, xs->screen_number); CLEAR (chroma); black_window = gtk_window_new (GTK_WINDOW_TOPLEVEL); window = GTK_WINDOW (black_window); gtk_widget_realize (black_window); gdk_window_set_decorations (black_window->window, 0); gtk_widget_set_size_request (black_window, (gint) xs->width, (gint) xs->height); gtk_widget_modify_bg (black_window, GTK_STATE_NORMAL, &chroma); gtk_window_add_accel_group (window, gtk_ui_manager_get_accel_group (zapping->ui_manager)); full_stack = z_stack_new (); gtk_widget_show (full_stack); gtk_container_add (GTK_CONTAINER (black_window), full_stack); fixed = gtk_fixed_new (); gtk_widget_show (fixed); z_stack_put (Z_STACK (full_stack), fixed, ZSTACK_VIDEO); if (CAPTURE_MODE_TELETEXT == cmode) { #ifdef HAVE_LIBZVBI /* Welcome to the magic world of encapsulation. */ drawing_area = _teletext_view_new (); #endif /* Gdk scaling routines hang if we start with the default 1, 1. */ gtk_widget_set_size_request (drawing_area, 400, 300); /* For Python bindings. */ g_object_set_data (G_OBJECT (black_window), "TeletextView", drawing_area); } else { drawing_area = z_video_new (); Z_VIDEO (drawing_area)->size_magic = FALSE; set_blank_timeout (Z_VIDEO (drawing_area)); g_signal_connect (G_OBJECT (drawing_area), "cursor-blanked", G_CALLBACK (on_cursor_blanked), zapping->info); } gtk_widget_show (drawing_area); gtk_fixed_put (GTK_FIXED (fixed), drawing_area, 0, 0); gtk_widget_add_events (drawing_area, GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_SCROLL_MASK | GDK_KEY_PRESS_MASK); gtk_widget_modify_bg (drawing_area, GTK_STATE_NORMAL, &chroma); gtk_widget_show (black_window); if (CAPTURE_MODE_TELETEXT == cmode) { /* XXX TeletextView should already do this on realize, doesn't work??? */ gdk_window_set_back_pixmap (drawing_area->window, NULL, FALSE); } /* Make sure we're on the right screen. */ if (1) gtk_window_move (window, (gint) xs->x, (gint) xs->y); else /* debug */ gtk_window_move (window, 700, 600); if (DISPLAY_MODE_BACKGROUND == dmode) { x11_window_below (window, TRUE); } else { /* This should span only one screen, with or without Xinerama, if the WM has proper Xinerama support. */ x11_window_fullscreen (window, TRUE); } gtk_window_present (window); switch (cmode) { case CAPTURE_MODE_OVERLAY: /* Nothing to do. */ break; case CAPTURE_MODE_READ: if (-1 == tveng_attach_device (zcg_char (NULL, "video_device"), GDK_WINDOW_XWINDOW (drawing_area->window), TVENG_ATTACH_READ, zapping->info)) { ShowBox("Capture mode not available:\n%s", GTK_MESSAGE_ERROR, tv_get_errstr (zapping->info)); goto failure; } zconf_get_sources (zapping->info, /* mute */ FALSE); break; case CAPTURE_MODE_TELETEXT: /* Bktr driver needs special programming for VBI-only mode. */ if (-1 == tveng_attach_device (zcg_char (NULL, "video_device"), GDK_WINDOW_XWINDOW (drawing_area->window), TVENG_ATTACH_VBI, zapping->info)) { ShowBox ("Teletext mode not available.", GTK_MESSAGE_ERROR); goto failure; } break; default: goto failure; } /* Determine video size. XXX improve me. */ if (CAPTURE_MODE_TELETEXT == cmode) { if ((vm_name = zcg_char (NULL, "fullscreen/vidmode")) && 0 != strcmp (vm_name, "auto")) { vm = x11_vidmode_by_name (svidmodes, vm_name); } else { vm = NULL; } if (vm && x11_vidmode_switch (svidmodes, screens, vm, &old_vidmode)) { /* xs->width, height >= vm->width, height */ vwidth = vm->width; vheight = vm->height; } else { x11_vidmode_clear_state (&old_vidmode); vwidth = xs->width; vheight = xs->height; } } else { const tv_video_standard *vs; const struct tveng_caps *caps; if ((vs = tv_cur_video_standard (zapping->info))) { vwidth = vs->frame_width; vheight = vs->frame_height; } else { vwidth = 640; vheight = 480; } /* Driver limit. */ /* FIXME the capture (after ATTACH_READ) and overlay limits (after ATTACH_XV or tv_set_overlay_buffer()) may be different. */ caps = tv_get_caps (zapping->info); vwidth = MIN ((guint) caps->maxwidth, vwidth); vheight = MIN ((guint) caps->maxheight, vheight); /* Screen limit. XXX should try to scale captured images down. */ vwidth = MIN (xs->width, vwidth); vheight = MIN (xs->height, vheight); if ((vm_name = zcg_char (NULL, "fullscreen/vidmode"))) { if (0 == strcmp (vm_name, "auto")) { vm = find_vidmode (svidmodes, vwidth, vheight); } else { vm = x11_vidmode_by_name (svidmodes, vm_name); } } else { vm = NULL; } if (vm && x11_vidmode_switch (svidmodes, screens, vm, &old_vidmode)) { /* xs->width, height >= vm->width, height <=> vwidth, vheight */ } else { x11_vidmode_clear_state (&old_vidmode); if (CAPTURE_MODE_READ == cmode) { /* XXX should check scaling abilities. */ vwidth = xs->width; vheight = xs->height; } else { /* xs->width, height >= vwidth, vheight */ } } } vx = (xs->width - vwidth) >> 1; vy = (xs->height - vheight) >> 1; if (0) fprintf (stderr, "vx=%u,%u vwidth=%u,%u xswidth=%u,%u\n", vx, vy, vwidth, vheight, xs->width, xs->height); gtk_widget_set_size_request (drawing_area, (gint) vwidth, (gint) vheight); gtk_fixed_move (GTK_FIXED (fixed), drawing_area, vx, vy); switch (cmode) { case CAPTURE_MODE_OVERLAY: if (!start_overlay (black_window, drawing_area)) goto failure; break; case CAPTURE_MODE_READ: { tv_image_format format; guint awidth; format = *tv_cur_capture_format (zapping->info); format.width = vwidth; format.height = vheight; /* XXX error? */ tv_set_capture_format (zapping->info, &format); /* We asked for screen size images, which is likely impossible. In case the driver has strange limits and XvImage is unavailable to scale images let's try to get closer to the desired aspect ratio. */ format = *tv_cur_capture_format (zapping->info); awidth = format.height * 4 / 3; if (format.width != awidth) { format.width = awidth; /* Error ignored. */ tv_set_capture_format (zapping->info, &format); } if (!capture_start (zapping->info, GTK_WIDGET (drawing_area))) goto failure; break; } case CAPTURE_MODE_TELETEXT: /* Nothing to do. */ break; default: goto failure; } gdk_window_get_root_origin (GTK_WIDGET (zapping)->window, &old_mw_x, &old_mw_y); gtk_widget_hide (GTK_WIDGET (zapping)); zapping->display_mode = DISPLAY_MODE_FULLSCREEN; zapping->display_window = GTK_WIDGET (drawing_area); tv_set_capture_mode (zapping->info, cmode); gtk_widget_grab_focus (black_window); g_signal_connect (G_OBJECT (black_window), "key_press_event", G_CALLBACK (on_key_press), GTK_WIDGET (zapping)); g_signal_connect (G_OBJECT (black_window), "button_press_event", G_CALLBACK (on_button_press), GTK_WIDGET (zapping)); g_signal_connect (G_OBJECT (drawing_area), "button_press_event", G_CALLBACK (on_button_press), GTK_WIDGET (zapping)); g_signal_connect (G_OBJECT (drawing_area), "scroll_event", G_CALLBACK (on_scroll_event), GTK_WIDGET (zapping)); switch (cmode) { case CAPTURE_MODE_OVERLAY: /* XXX wrong because XvPutImage may pad to this size (DMA hw limit) */ osd_set_coords (drawing_area, /* x, y */ 0, 0, vwidth, vheight); break; case CAPTURE_MODE_READ: osd_set_window (GTK_WIDGET (drawing_area)); break; case CAPTURE_MODE_TELETEXT: /* Nothing to do. */ break; default: break; } return TRUE; failure: x11_vidmode_list_delete (svidmodes); gtk_widget_destroy (black_window); return FALSE; } �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������zapping-0.10cvs6/src/fullscreen.h������������������������������������������������������������������� 644 � 764 � 144 � 2232 10305456046 12111� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Zapping (TV viewer for the Gnome Desktop) * Copyright (C) 2000-2001 Iaki Garca Etxebarria * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifndef FULLSCREEN_H #define FULLSCREEN_H extern GdkPixbuf * fullscreen_get_subtitle_image (GdkRectangle * expose, guint width, guint height); extern gboolean fullscreen_activate_subtitles (gboolean active); extern gboolean start_fullscreen (display_mode dmode, capture_mode cmode); extern gboolean stop_fullscreen (void); #endif /* FULLSCREEN_H */ ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������zapping-0.10cvs6/src/zmisc.c������������������������������������������������������������������������ 644 � 764 � 144 � 200772 10404546170 11136� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Zapping (TV viewer for the Gnome Desktop) * Copyright (C) 2000-2001 Iaki Garca Etxebarria * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* XXX gtk+ 2.3 GtkOptionMenu, GtkCombo, toolbar changes */ #undef GTK_DISABLE_DEPRECATED #undef GDK_DISABLE_DEPRECATED #ifdef HAVE_CONFIG_H # include "config.h" #endif #include "site_def.h" #include <gdk/gdkx.h> #include <stdarg.h> #include <sys/types.h> #include <sys/stat.h> #include <unistd.h> #include <math.h> #include <ctype.h> #define ZCONF_DOMAIN "/zapping/options/main/" #include "zmisc.h" #include "zconf.h" #include "zgconf.h" #include "tveng.h" #include "interface.h" #include "x11stuff.h" #include "overlay.h" #include "capture.h" #include "fullscreen.h" #include "v4linterface.h" #include "zvbi.h" #include "osd.h" #include "remote.h" #include "keyboard.h" #include "properties-handler.h" #include "globals.h" #include "audio.h" #include "mixer.h" #include "zvideo.h" extern tveng_device_info * main_info; extern volatile gboolean flag_exit_program; extern gboolean xv_present; GQuark z_misc_error_quark (void) { static GQuark quark; if (!quark) quark = g_quark_from_static_string ("Z_MISC_ERROR"); return quark; } gchar* Prompt (GtkWidget *main_window, const gchar *title, const gchar *prompt, const gchar *default_text) { GtkWidget * dialog; GtkBox *vbox; GtkWidget *label, *entry; gchar *buffer = NULL; dialog = gtk_dialog_new_with_buttons (title, GTK_WINDOW (main_window), GTK_DIALOG_DESTROY_WITH_PARENT | GTK_DIALOG_MODAL, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, GTK_STOCK_OK, GTK_RESPONSE_OK, NULL); gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_OK); vbox = GTK_BOX (GTK_DIALOG (dialog) -> vbox); if (prompt) { label = gtk_label_new (prompt); gtk_box_pack_start_defaults (vbox, label); gtk_widget_show(label); } entry = gtk_entry_new(); gtk_box_pack_start_defaults(GTK_BOX(vbox), entry); gtk_widget_show(entry); gtk_widget_grab_focus(entry); if (default_text) { gtk_entry_set_text (GTK_ENTRY(entry), default_text); gtk_editable_select_region (GTK_EDITABLE (entry), 0, -1); } z_entry_emits_response (entry, GTK_DIALOG (dialog), GTK_RESPONSE_OK); if (gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_OK) buffer = g_strdup(gtk_entry_get_text(GTK_ENTRY(entry))); gtk_widget_destroy(dialog); return buffer; } GtkWidget * z_gtk_pixmap_menu_item_new(const gchar * mnemonic, const gchar * icon) { GtkWidget * imi; GtkWidget * image; imi = gtk_image_menu_item_new_with_mnemonic (mnemonic); if (icon) { image = gtk_image_new_from_stock (icon, GTK_ICON_SIZE_MENU); gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (imi), image); /* not sure whether this is necessary, but won't harm */ gtk_widget_show (image); } return (imi); } /* * Zapping Global Tooltips */ static GList * tooltips_list = NULL; static GtkTooltips * tooltips_default = NULL; static gboolean tooltips_enabled = TRUE; static void tooltips_destroy_notify (gpointer data, GObject *where_the_object_was _unused_) { g_list_remove (tooltips_list, data); } GtkTooltips * z_tooltips_add (GtkTooltips * tips) { if (!tips) tips = gtk_tooltips_new (); /* XXX destroy at exit */ tooltips_list = g_list_append (tooltips_list, (gpointer) tips); g_object_weak_ref (G_OBJECT (tips), tooltips_destroy_notify, (gpointer) tips); if (tooltips_enabled) gtk_tooltips_enable (tips); else gtk_tooltips_disable (tips); return tips; } void z_tooltips_active (gboolean enable) { GList *list; tooltips_enabled = enable; for (list = tooltips_list; list; list = list->next) { if (enable) gtk_tooltips_enable (GTK_TOOLTIPS (list->data)); else gtk_tooltips_disable (GTK_TOOLTIPS (list->data)); } } void z_tooltip_set (GtkWidget * widget, const gchar * tip_text) { if (!tooltips_default) tooltips_default = z_tooltips_add (NULL); #ifndef ZMISC_TOOLTIP_WARNING #define ZMISC_TOOLTIP_WARNING 0 #endif if (ZMISC_TOOLTIP_WARNING && GTK_WIDGET_NO_WINDOW(widget)) fprintf(stderr, "Warning: tooltip <%s> for " "widget without window\n", tip_text); gtk_tooltips_set_tip (tooltips_default, widget, tip_text, "private tip"); } GtkWidget * z_tooltip_set_wrap (GtkWidget * widget, const gchar * tip_text) { if (!tooltips_default) tooltips_default = z_tooltips_add (NULL); if (GTK_WIDGET_NO_WINDOW(widget)) { GtkWidget *event_box = gtk_event_box_new (); gtk_widget_show (widget); gtk_container_add (GTK_CONTAINER (event_box), widget); widget = event_box; } gtk_tooltips_set_tip (tooltips_default, widget, tip_text, "private tip"); return widget; } void z_set_sensitive_with_tooltip (GtkWidget * widget, gboolean sensitive, const gchar * on_tip, const gchar * off_tip) { const gchar *new_tip; if (!tooltips_default) tooltips_default = z_tooltips_add (NULL); gtk_widget_set_sensitive (widget, sensitive); new_tip = sensitive ? on_tip : off_tip; /* can be NULL */ gtk_tooltips_set_tip (tooltips_default, widget, new_tip, NULL); } /**************************************************************************/ /* main.c */ extern gboolean on_zapping_key_press (GtkWidget * widget, GdkEventKey * event, gpointer * user_data); #ifdef HAVE_LIBZVBI static gboolean on_key_press (GtkWidget * widget, GdkEventKey * event, TeletextView * view) { return (view->key_press (view, event) || on_user_key_press (widget, event, NULL) || on_picture_size_key_press (widget, event, NULL)); } #endif static gboolean on_button_press (GtkWidget * widget _unused_, GdkEventButton * event, Zapping * z) { switch (event->button) { case 3: /* Right button */ zapping_create_popup (z, event); return TRUE; /* handled */ default: /* TeletextView handles. */ break; } return FALSE; /* pass on */ } static void show_teletext_buttons (gboolean on) { #ifdef HAVE_LIBZVBI GtkAction *teletext_action; GtkAction *restore_action; teletext_action = gtk_action_group_get_action (zapping->teletext_action_group, "Teletext"); restore_action = gtk_action_group_get_action (zapping->teletext_action_group, "RestoreVideo"); if (on) { z_action_set_visible (teletext_action, FALSE); z_action_set_visible (restore_action, TRUE); } else { z_action_set_visible (restore_action, FALSE); z_action_set_visible (teletext_action, TRUE); zapping_view_appbar (zapping, FALSE); } #endif } static void stop_teletext (void) { #ifdef HAVE_LIBZVBI TeletextView *view; BonoboDockItem *dock_item; /* Teletext in main window */ view = _teletext_view_from_widget (GTK_WIDGET (zapping)); /* Unredirect key-press-event */ g_signal_handlers_disconnect_matched (G_OBJECT (zapping), G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, 0, 0, NULL, G_CALLBACK (on_key_press), view); g_signal_handlers_unblock_matched (G_OBJECT (zapping), G_SIGNAL_MATCH_FUNC, 0, 0, NULL, G_CALLBACK (on_zapping_key_press), NULL); dock_item = gnome_app_get_dock_item_by_name (&zapping->app, "teletext-toolbar"); gtk_widget_destroy (GTK_WIDGET (dock_item)); gtk_widget_destroy (GTK_WIDGET (view)); g_object_set_data (G_OBJECT (zapping), "TeletextView", NULL); gtk_widget_show (GTK_WIDGET (zapping->video)); #endif } static gboolean start_teletext (void) { #ifdef HAVE_LIBZVBI TeletextView *view; GtkWidget *widget; gint width; gint height; BonoboDockItemBehavior behaviour; if (!_teletext_view_new || !zvbi_get_object ()) return FALSE; if (tv_get_controller (zapping->info) != TVENG_CONTROLLER_NONE) tveng_close_device (zapping->info); /* bttv 0.8.x bug: Screws up VBI field order unless we restart VBI capturing after stopping video capturing. */ zvbi_stop (/* destroy_decoder */ FALSE); /* Bktr driver needs special programming for VBI-only mode. */ if (-1 == tveng_attach_device (zcg_char (NULL, "video_device"), GDK_WINDOW_XWINDOW (GTK_WIDGET (zapping->video)->window), TVENG_ATTACH_VBI, zapping->info)) { ShowBox ("Teletext mode not available.", GTK_MESSAGE_ERROR); return FALSE; } if (!zvbi_start ()) { ShowBox ("Teletext mode not available.", GTK_MESSAGE_ERROR); return FALSE; } view = (TeletextView *) _teletext_view_new (); gtk_widget_show (GTK_WIDGET (view)); g_object_set_data (G_OBJECT (zapping), "TeletextView", view); gtk_widget_add_events (GTK_WIDGET (zapping), GDK_KEY_PRESS_MASK); /* Redirect key-press-event */ g_signal_handlers_block_matched (G_OBJECT (zapping), G_SIGNAL_MATCH_FUNC, 0, 0, NULL, G_CALLBACK (on_zapping_key_press), NULL); g_signal_connect (G_OBJECT (zapping), "key_press_event", G_CALLBACK (on_key_press), view); g_signal_connect (G_OBJECT (zapping), "button_press_event", G_CALLBACK (on_button_press), zapping); widget = _teletext_toolbar_new (view->action_group); gtk_widget_show (widget); view->toolbar = (TeletextToolbar *) widget; behaviour = BONOBO_DOCK_ITEM_BEH_EXCLUSIVE; if (!gconf_client_get_bool (gconf_client, "/desktop/gnome/interface/toolbar_detachable", NULL)) behaviour |= BONOBO_DOCK_ITEM_BEH_LOCKED; gnome_app_add_toolbar (&zapping->app, GTK_TOOLBAR (widget), "teletext-toolbar", behaviour, BONOBO_DOCK_TOP, /* band_num */ 2, /* band_position */ 0, /* offset */ 0); zapping_view_appbar (zapping, TRUE); view->appbar = zapping->appbar; gtk_widget_hide (GTK_WIDGET (zapping->video)); gtk_widget_queue_resize (GTK_WIDGET (zapping)); gtk_container_add (GTK_CONTAINER (zapping->contents), GTK_WIDGET (view)); gdk_window_get_geometry (GTK_WIDGET (view)->window, /* x */ NULL, /* y */ NULL, &width, &height, /* depth */ NULL); if (width > 10 && height > 10) view->client_redraw (view, width, height); return TRUE; #else return FALSE; #endif } void z_set_window_bg (GtkWidget * widget, GdkColor * color) { GdkRectangle rect; gtk_widget_modify_bg (widget, GTK_STATE_NORMAL, color); rect.x = 0; rect.y = 0; rect.width = widget->allocation.width; rect.height = widget->allocation.height; gdk_window_invalidate_rect (widget->window, &rect, /* children */ FALSE); gdk_window_process_updates (widget->window, /* children */ FALSE); } void z_set_window_bg_black (GtkWidget * widget) { GdkColor color; CLEAR (color); z_set_window_bg (widget, &color); } int zmisc_restore_previous_mode(tveng_device_info * info) { display_mode dmode; capture_mode cmode; from_old_tveng_capture_mode (&dmode, &cmode, zcg_int(NULL, "previous_mode")); return zmisc_switch_mode(dmode, cmode, info, /* warnings */ TRUE); } gboolean zmisc_stop (tveng_device_info *info) { if (CAPTURE_MODE_NONE == tv_get_capture_mode (info)) return TRUE; /* Stop current capture mode */ switch (zapping->display_mode) { case DISPLAY_MODE_FULLSCREEN: case DISPLAY_MODE_BACKGROUND: if (!stop_fullscreen ()) return FALSE; break; case DISPLAY_MODE_WINDOW: switch (tv_get_capture_mode (info)) { case CAPTURE_MODE_READ: if (!capture_stop ()) return FALSE; break; case CAPTURE_MODE_OVERLAY: stop_overlay (); break; case CAPTURE_MODE_TELETEXT: stop_teletext (); tveng_close_device (info); break; default: break; } default: break; } z_set_window_bg_black (GTK_WIDGET (zapping->video)); return TRUE; } /* does the mode switching. Since this requires more than just using tveng, a new routine is needed. Returns whatever tveng returns (0 == success), but we print the message ourselves too, so no need to aknowledge it to the user. */ extern int disable_overlay; int zmisc_switch_mode(display_mode new_dmode, capture_mode new_cmode, tveng_device_info * info, gboolean warnings) { int return_value = 0; gint x, y, w, h; display_mode old_dmode; capture_mode old_cmode; gboolean old_caption; gint muted; gint timeout; g_assert(info != NULL); g_assert(zapping->video != NULL); if (0) fprintf (stderr, "%s: %d %d -> %d %d\n", __FUNCTION__, zapping->display_mode, tv_get_capture_mode (info), new_dmode, new_cmode); timeout = 0; /* disabled */ z_gconf_get_int (&timeout, "/apps/zapping/blank_cursor_timeout"); if (zapping->display_mode == new_dmode && tv_get_capture_mode (info) == new_cmode) switch (new_cmode) { case CAPTURE_MODE_NONE: case CAPTURE_MODE_TELETEXT: break; default: x11_screensaver_set (X11_SCREENSAVER_DISPLAY_ACTIVE); z_video_blank_cursor (zapping->video, timeout); return 0; /* success */ } /* On capture <-> overlay change, carry video and audio input, video standard over to the new device. FIXME also control values. */ zconf_set_sources (info); { GdkWindow *window; window = GTK_WIDGET (zapping->video)->window; gdk_window_get_geometry(window, NULL, NULL, &w, &h, NULL); gdk_window_get_origin(window, &x, &y); } #if 0 /* XXX should use quiet_set, but that can't handle yet how the controls are rebuilt when switching btw v4l <-> xv. */ /* Always: if ((avoid_noise = zcg_bool (NULL, "avoid_noise"))) */ tv_quiet_set (main_info, TRUE); #else muted = tv_mute_get (zapping->info, FALSE); #endif old_dmode = zapping->display_mode; old_cmode = tv_get_capture_mode (info); if (!zmisc_stop (info)) goto failure; #ifdef HAVE_LIBZVBI old_caption = zconf_get_boolean (NULL, "/zapping/internal/callbacks/closed_caption"); python_command_printf (GTK_WIDGET (zapping), "zapping.closed_caption(0)"); #endif if (CAPTURE_MODE_NONE == new_cmode || CAPTURE_MODE_TELETEXT == new_cmode) { osd_clear(); osd_unset_window(); } else if (DISPLAY_MODE_WINDOW == new_dmode) { osd_set_window(GTK_WIDGET (zapping->video)); } switch (((int) new_dmode) | (int) new_cmode) { case DISPLAY_MODE_WINDOW | CAPTURE_MODE_READ: if (tv_get_attach_mode (info) == TVENG_ATTACH_VBI || tv_get_attach_mode (info) == TVENG_ATTACH_CONTROL || tv_get_controller (info) == TVENG_CONTROLLER_XV || tv_get_controller (info) == TVENG_CONTROLLER_NONE) { if (-1 == tveng_attach_device (zcg_char(NULL, "video_device"), GDK_WINDOW_XID (GTK_WIDGET (zapping->video)->window), TVENG_ATTACH_READ, info)) { /* Try restoring as XVideo, error ignored. */ tveng_attach_device (zcg_char(NULL, "video_device"), GDK_WINDOW_XID (GTK_WIDGET (zapping->video)->window), TVENG_ATTACH_XV, info); if (warnings) z_show_non_modal_message_dialog (GTK_WINDOW (zapping), GTK_MESSAGE_ERROR, _("Could not switch to capture mode"), "%s", tv_get_errstr (info)); goto failure; } zconf_get_sources (info, /* mute */ FALSE); } zapping->display_window = GTK_WIDGET (zapping->video); return_value = capture_start (info, GTK_WIDGET (zapping->video)) ? 0 : -1; x11_screensaver_set (X11_SCREENSAVER_DISPLAY_ACTIVE | X11_SCREENSAVER_CPU_ACTIVE); z_video_blank_cursor (zapping->video, timeout); break; case DISPLAY_MODE_WINDOW | CAPTURE_MODE_OVERLAY: if (disable_overlay) { if (warnings) z_show_non_modal_message_dialog (GTK_WINDOW (zapping), GTK_MESSAGE_ERROR, _("Could not switch to overlay mode"), _("Video overlay has been disabled.")); goto failure; } if (start_overlay (GTK_WIDGET (zapping), GTK_WIDGET (zapping->video))) { zconf_get_sources (info, /* mute */ FALSE); x11_screensaver_set (X11_SCREENSAVER_DISPLAY_ACTIVE); z_video_blank_cursor (zapping->video, timeout); } else { if (warnings) z_show_non_modal_message_dialog (GTK_WINDOW (zapping), GTK_MESSAGE_ERROR, _("Could not switch to overlay mode"), "%s", tv_get_errstr (info)); zmisc_stop (info); goto failure; } break; case DISPLAY_MODE_WINDOW | CAPTURE_MODE_TELETEXT: x11_screensaver_set (X11_SCREENSAVER_ON); z_video_blank_cursor (zapping->video, 0); if (!start_teletext ()) { if (warnings) z_show_non_modal_message_dialog (GTK_WINDOW (zapping), GTK_MESSAGE_ERROR, _("Could not switch to Teletext mode"), _("VBI has been disabled, or it doesn't work.")); zmisc_stop (info); goto failure; } zconf_get_sources (info, /* mute */ FALSE); tv_set_capture_mode (zapping->info, CAPTURE_MODE_TELETEXT); /* ugh */ break; case DISPLAY_MODE_FULLSCREEN | CAPTURE_MODE_OVERLAY: case DISPLAY_MODE_BACKGROUND | CAPTURE_MODE_OVERLAY: if (disable_overlay) { if (warnings) z_show_non_modal_message_dialog (GTK_WINDOW (zapping), GTK_MESSAGE_ERROR, _("Could not switch to fullscreen mode"), _("Video overlay has been disabled.")); goto failure; } /* fall through */ case DISPLAY_MODE_FULLSCREEN | CAPTURE_MODE_READ: case DISPLAY_MODE_FULLSCREEN | CAPTURE_MODE_TELETEXT: case DISPLAY_MODE_BACKGROUND | CAPTURE_MODE_READ: case DISPLAY_MODE_BACKGROUND | CAPTURE_MODE_TELETEXT: if (start_fullscreen (new_dmode, new_cmode)) { zconf_get_sources (info, /* mute */ FALSE); if (CAPTURE_MODE_TELETEXT != new_cmode) { if (CAPTURE_MODE_OVERLAY == new_cmode) x11_screensaver_set (X11_SCREENSAVER_DISPLAY_ACTIVE); else x11_screensaver_set (X11_SCREENSAVER_DISPLAY_ACTIVE | X11_SCREENSAVER_CPU_ACTIVE); } } else { if (warnings) z_show_non_modal_message_dialog (GTK_WINDOW (zapping), GTK_MESSAGE_ERROR, _("Could not switch to fullscreen mode"), "%s", tv_get_errstr (info)); zmisc_stop (info); goto failure; } break; default: /* TVENG_NO_CAPTURE */ x11_screensaver_set (X11_SCREENSAVER_ON); z_video_blank_cursor (zapping->video, 0); break; } if (old_cmode != new_cmode || old_dmode != new_dmode) { enum old_tveng_capture_mode otcmode; zapping->display_mode = new_dmode; otcmode = to_old_tveng_capture_mode (old_dmode, old_cmode); zcs_int ((int) otcmode, "previous_mode"); if (old_cmode != new_cmode) last_cmode = old_cmode; show_teletext_buttons (DISPLAY_MODE_WINDOW == new_dmode && CAPTURE_MODE_TELETEXT == new_cmode); } #ifdef HAVE_LIBZVBI if (old_caption && CAPTURE_MODE_TELETEXT != new_cmode) python_command_printf (GTK_WIDGET (zapping), "zapping.closed_caption(1)"); #endif /* Update the standards, channels, etc */ zmodel_changed(z_input_model); /* Updating the properties is not so useful, and it isn't so easy, since there might be multiple properties dialogs open */ #if 0 /* XXX don't reset when we're in shutdown, see cmd.c/py_quit(). */ if (avoid_noise && !flag_exit_program) reset_quiet (zapping->info, /* delay ms */ 300); #else if (muted != -1) tv_mute_set (zapping->info, muted); #endif /* Update the controls window if it's open */ update_control_box(info); /* Find optimum size for widgets */ gtk_widget_queue_resize(GTK_WIDGET (zapping)); return return_value; failure: x11_screensaver_set (X11_SCREENSAVER_ON); z_video_blank_cursor (zapping->video, 0); return -1; } void set_stock_pixmap (GtkWidget *button, const gchar *new_pix) { gtk_button_set_use_stock (GTK_BUTTON (button), TRUE); gtk_button_set_label (GTK_BUTTON (button), new_pix); } /** * Just like gdk_pixbuf_copy_area but does clipping. */ void z_pixbuf_copy_area (GdkPixbuf *src_pixbuf, gint src_x, gint src_y, gint width, gint height, GdkPixbuf *dest_pixbuf, gint dest_x, gint dest_y) { gint src_w = gdk_pixbuf_get_width(src_pixbuf); gint src_h = gdk_pixbuf_get_height(src_pixbuf); gint dest_w = gdk_pixbuf_get_width(dest_pixbuf); gint dest_h = gdk_pixbuf_get_height(dest_pixbuf); if (src_x < 0) { width += src_x; dest_x -= src_x; src_x = 0; } if (src_y < 0) { height += src_y; dest_y -= src_y; src_y = 0; } if (src_x + width > src_w) width = src_w - src_x; if (src_y + height > src_h) height = src_h - src_y; if (dest_x < 0) { src_x -= dest_x; width += dest_x; dest_x = 0; } if (dest_y < 0) { src_y -= dest_y; height += dest_y; dest_y = 0; } if (dest_x + width > dest_w) width = dest_w - dest_x; if (dest_y + height > dest_h) height = dest_h - dest_y; if ((width <= 0) || (height <= 0)) return; gdk_pixbuf_copy_area(src_pixbuf, src_x, src_y, width, height, dest_pixbuf, dest_x, dest_y); } void z_pixbuf_render_to_drawable (GdkPixbuf *pixbuf, GdkWindow *window, GdkGC *gc, gint x, gint y, gint width, gint height) { gint w, h; if (!pixbuf) return; w = gdk_pixbuf_get_width(pixbuf); h = gdk_pixbuf_get_height(pixbuf); if (x < 0) { width += x; x = 0; } if (y < 0) { height += 0; y = 0; } if (x + width > w) width = w - x; if (y + height > h) height = h - y; if (width < 0 || height < 0) return; gdk_draw_pixbuf (window, gc, pixbuf, x, y, x, y, width, height, GDK_RGB_DITHER_NORMAL, x, y); } gint z_menu_get_index (GtkWidget *menu, GtkWidget *item) { gint return_value = g_list_index(GTK_MENU_SHELL(menu)->children, item); return return_value ? return_value : -1; } GtkWidget * z_menu_shell_nth_item (GtkMenuShell * menu_shell, guint n) { GList *list; list = g_list_nth (menu_shell->children, n); assert (list != NULL); return GTK_WIDGET (list->data); } gint z_option_menu_get_active (GtkWidget *option_menu) { return gtk_option_menu_get_history (GTK_OPTION_MENU (option_menu)); } void z_option_menu_set_active (GtkWidget *option_menu, guint index) { gtk_option_menu_set_history(GTK_OPTION_MENU(option_menu), index); } static GtkAccelGroup *accel_group = NULL; static void change_pixmenuitem_label (GtkWidget *menuitem, const gchar *new_label) { GtkWidget *widget = GTK_BIN(menuitem)->child; gtk_label_set_text(GTK_LABEL(widget), new_label); } void z_change_menuitem (GtkWidget *widget, const gchar *new_pixmap, const gchar *new_label, const gchar *new_tooltip) { GtkWidget *image; if (new_label) change_pixmenuitem_label(widget, new_label); if (new_tooltip) z_tooltip_set(widget, new_tooltip); if (new_pixmap) { image = gtk_image_new_from_stock (new_pixmap, GTK_ICON_SIZE_MENU); gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (widget), image); /* not sure whether this is necessary, but won't harm */ gtk_widget_show (image); } } static void appbar_hide(GtkWidget *appbar _unused_) { zapping_view_appbar (zapping, FALSE); } static void add_hide (void) { GtkWidget *old = g_object_get_data(G_OBJECT(zapping->appbar), "hide_button"); GtkWidget *widget; if (old) return; widget = gtk_button_new_from_stock (GTK_STOCK_CLOSE); z_tooltip_set(widget, _("Hide the statusbar")); if (widget) gtk_box_pack_end(GTK_BOX(zapping->appbar), widget, FALSE, FALSE, 0); gtk_widget_show(widget); g_signal_connect_swapped(G_OBJECT(widget), "clicked", G_CALLBACK(appbar_hide), NULL); g_object_set_data(G_OBJECT(zapping->appbar), "hide_button", widget); } static guint status_hide_timeout_id = 0; static gboolean status_hide = FALSE; static gint status_hide_timeout (void * ignored _unused_) { if (!zapping->appbar) return FALSE; /* don't call again */ if (status_hide) { zapping_view_appbar (zapping, FALSE); } else /* just clean */ { GtkWidget *status; status = gnome_appbar_get_status (zapping->appbar); gtk_label_set_text (GTK_LABEL (status), ""); } status_hide_timeout_id = NO_SOURCE_ID; return FALSE; /* don't call again */ } void z_status_print (const gchar * message, gboolean markup, guint timeout, gboolean hide) { GtkWidget *status; zapping_view_appbar (zapping, TRUE); status = gnome_appbar_get_status (zapping->appbar); add_hide (); if (markup) gtk_label_set_markup (GTK_LABEL (status), message); else gtk_label_set_text (GTK_LABEL (status), message); if (status_hide_timeout_id > 0) g_source_remove (status_hide_timeout_id); status_hide = hide; if (timeout > 0) status_hide_timeout_id = g_timeout_add (timeout, (GSourceFunc) status_hide_timeout, NULL); else status_hide_timeout_id = NO_SOURCE_ID; } /* FIXME: [Hide] button */ void z_status_set_widget(GtkWidget * widget) { GtkWidget *old; zapping_view_appbar (zapping, TRUE); old = g_object_get_data(G_OBJECT(zapping->appbar), "old_widget"); if (old) gtk_container_remove(GTK_CONTAINER(zapping->appbar), old); if (widget) gtk_box_pack_end(GTK_BOX(zapping->appbar), widget, FALSE, FALSE, 0); add_hide(); g_object_set_data(G_OBJECT(zapping->appbar), "old_widget", widget); } static GtkWidget * z_message_dialog_new_va_list (GtkWindow * parent, GtkDialogFlags flags, GtkMessageType type, GtkButtonsType buttons, const gchar * primary, const gchar * secondary, va_list args) { GtkWidget *dialog; gchar *template; gchar *markup; g_assert (NULL != primary); template = g_strconcat ("<span weight=\"bold\" size=\"larger\">", primary, "</span>\n\n", secondary, NULL); markup = g_strdup_vprintf (template, args); g_free (template); dialog = gtk_message_dialog_new_with_markup (parent, flags, type, buttons, NULL); gtk_message_dialog_set_markup (GTK_MESSAGE_DIALOG (dialog), markup); g_free (markup); return dialog; } static GtkWidget * z_message_dialog_new (GtkWindow * parent, GtkDialogFlags flags, GtkMessageType type, GtkButtonsType buttons, const gchar * primary, const gchar * secondary, ...) { GtkWidget *dialog; va_list args; va_start (args, secondary); dialog = z_message_dialog_new_va_list (parent, flags, type, buttons, primary, secondary, args); va_end (args); return dialog; } void z_show_non_modal_message_dialog (GtkWindow * parent, GtkMessageType type, const gchar * primary, const gchar * secondary, ...) { GtkWidget *dialog; va_list args; va_start (args, secondary); dialog = z_message_dialog_new_va_list (parent, GTK_DIALOG_DESTROY_WITH_PARENT, type, GTK_BUTTONS_OK, primary, secondary, args); va_end (args); /* Destroy the dialog when the user responds to it (e.g. clicks a button) */ g_signal_connect_swapped (G_OBJECT (dialog), "response", G_CALLBACK (gtk_widget_destroy), dialog); gtk_widget_show (dialog); } gboolean z_build_path (const gchar * path, GError ** error) { int saved_errno; struct stat sb; gchar *b; guint i; g_assert (NULL != path); g_assert ('/' == path[0]); b = NULL; i = 1; do { if ('/' == path[i] || 0 == path[i]) { b = g_strndup (path, i); /* XXX doesn't detect broken symlinks. */ if (-1 == stat (b, &sb)) { if (ENOENT != errno && ENOTDIR != errno) goto failure; if (-1 == mkdir (b, S_IRUSR | S_IWUSR | S_IXUSR)) goto failure; } else { if (!S_ISDIR (sb.st_mode)) { g_set_error (error, Z_MISC_ERROR, Z_MISC_ERROR_MKDIR, _("%s is not a directory."), b); g_free (b); errno = ENOTDIR; return FALSE; } } g_free (b); b = NULL; } } while (0 != path[i++]); return TRUE; failure: saved_errno = errno; g_set_error (error, Z_MISC_ERROR, Z_MISC_ERROR_MKDIR, "%s.", g_strerror (saved_errno)); g_free (b); errno = saved_errno; return FALSE; } gboolean z_build_path_with_alert (GtkWindow * parent, const gchar * path) { GError *error = NULL; if (!z_build_path (path, &error)) { z_show_non_modal_message_dialog (parent, GTK_MESSAGE_ERROR, _("Could not create directory"), _("Could not create %s.\n%s"), path, error->message); g_error_free (error); error = NULL; return FALSE; } return TRUE; } static gchar * strnmerge (const gchar * s1, guint len1, const gchar * s2, guint len2) { gchar *d; d = g_malloc (len1 + len2 + 1); memcpy (d, s1, len1); memcpy (d + len1, s2, len2); d[len1 + len2] = 0; return d; } gchar * z_replace_filename_extension (const gchar * filename, const gchar * new_ext) { const gchar *ext; guint len; if (!filename) return NULL; len = strlen (filename); /* Last '.' in basename. UTF-8 safe because we scan for ASCII only. */ for (ext = filename + len - 1; ext > filename && *ext != '.' && *ext != '/'; ext--); if (len == 0 || *ext != '.') { if (!new_ext) return g_strdup (filename); else return g_strconcat (filename, ".", new_ext, NULL); } len = ext - filename; if (new_ext) return strnmerge (filename, len + 1, new_ext, strlen (new_ext)); else return g_strndup (filename, len); } static void append_text (GtkEditable * e, const gchar * text) { const gint end_pos = -1; gint old_pos, new_pos; gtk_editable_set_position (e, end_pos); old_pos = gtk_editable_get_position (e); new_pos = old_pos; gtk_editable_insert_text (e, text, /* bytes */ (gint) strlen (text), &new_pos); /* Move cursor before appended text */ gtk_editable_set_position (e, old_pos); } void z_electric_set_basename (GtkWidget * w, const gchar * basename) { g_assert (NULL != w); g_assert (NULL != basename); g_object_set_data_full (G_OBJECT (w), "basename", g_strdup (basename), (GtkDestroyNotify) g_free); } /* See ttx export or screenshot for a demo */ void z_on_electric_filename (GtkWidget * w, gpointer user_data) { const gchar *name; /* editable: "/foo/bar.baz" */ const gchar *ext; /* editable: "baz" */ gchar *basename; /* proposed: "far.faz" */ gchar *baseext; /* proposed: "faz" */ gchar **bpp; /* copy entered name here */ gint len; gint baselen; gint baseextlen; name = gtk_entry_get_text (GTK_ENTRY (w)); len = strlen (name); ext = name; if (len > 0) { /* Last '/' in name. */ for (ext = name + len - 1; ext > name && *ext != '/'; ext--) ; /* First '.' in last part of name. */ for (; *ext && *ext != '.'; ext++) ; } basename = (gchar *) g_object_get_data (G_OBJECT (w), "basename"); g_assert (basename != NULL); baselen = strlen (basename); /* Last '.' in basename. UTF-8 safe because we scan for ASCII only. */ for (baseext = basename + baselen - 1; baseext > basename && *baseext != '.'; baseext--); baseextlen = (*baseext == '.') ? baselen - (baseext - basename) : 0; bpp = (gchar **) user_data; /* This function is usually a callback handler for the "changed" signal in a GtkEditable. Since we will change the editable too, block the signal emission while we are editing */ g_signal_handlers_block_by_func (G_OBJECT (w), z_on_electric_filename, user_data); /* Tack basename on if no name or ends with '/' */ if (len == 0 || name[len - 1] == '/') { append_text (GTK_EDITABLE (w), basename); } /* Cut off basename if not prepended by '/' */ else if (len > baselen && 0 == strcmp (&name[len - baselen], basename) && name[len - baselen - 1] != '/') { const gint end_pos = -1; gchar *buf = g_strndup (name, (guint)(len - baselen)); gtk_entry_set_text (GTK_ENTRY (w), buf); /* Attach baseext if none already */ if (baseextlen > 0 && ext < (name + len - baselen)) append_text (GTK_EDITABLE (w), baseext); else gtk_editable_set_position (GTK_EDITABLE (w), end_pos); g_free (buf); } #if 0 /* Tack baseext on if name ends with '.' */ else if (baseextlen > 0 && name[len - 1] == '.') { append_text (GTK_EDITABLE (w), baseext + 1); } #endif /* Cut off baseext when duplicate */ else if (baseextlen > 0 && len > baseextlen && 0 == strcmp (&name[len - baseextlen], baseext) && ext < (name + len - baseextlen)) { gchar *buf = g_strndup (name, (guint)(len - baseextlen)); gtk_entry_set_text (GTK_ENTRY (w), buf); g_free (buf); } if (bpp) { g_free (*bpp); *bpp = g_strdup (gtk_entry_get_text (GTK_ENTRY (w))); } g_signal_handlers_unblock_by_func (G_OBJECT (w), z_on_electric_filename, user_data); } void z_electric_replace_extension (GtkWidget * w, const gchar * ext) { const gchar *old_name; gchar *old_base; gchar *new_name; old_base = (gchar *) g_object_get_data (G_OBJECT (w), "basename"); if (NULL == old_base) return; /* has no extension */ new_name = z_replace_filename_extension (old_base, ext); z_electric_set_basename (w, new_name); old_name = gtk_entry_get_text (GTK_ENTRY (w)); new_name = z_replace_filename_extension (old_name, ext); g_signal_handlers_block_matched (G_OBJECT (w), G_SIGNAL_MATCH_FUNC, 0, 0, 0, z_on_electric_filename, 0); gtk_entry_set_text (GTK_ENTRY (w), new_name); g_signal_handlers_unblock_matched (G_OBJECT (w), G_SIGNAL_MATCH_FUNC, 0, 0, 0, z_on_electric_filename, 0); g_free (new_name); } static void set_orientation_recursive (GtkToolbar *toolbar, GtkOrientation orientation) { GList *p = toolbar->children; GtkToolbarChild *child; while (p) { child = (GtkToolbarChild*)p->data; if (child->type == GTK_TOOLBAR_CHILD_WIDGET && GTK_IS_TOOLBAR(child->widget)) set_orientation_recursive(GTK_TOOLBAR(child->widget), orientation); p = p->next; } gtk_toolbar_set_orientation(toolbar, orientation); } #if 0 static void on_orientation_changed (GtkToolbar *toolbar, GtkOrientation orientation, gpointer data) { GList *p; GtkToolbarChild *child; if (!toolbar) return; p = toolbar->children; while (p) { child = (GtkToolbarChild*)p->data; if (child->type == GTK_TOOLBAR_CHILD_WIDGET && GTK_IS_TOOLBAR(child->widget)) set_orientation_recursive(GTK_TOOLBAR(child->widget), orientation); p = p->next; } } #endif void z_toolbar_set_style_recursive (GtkToolbar * toolbar, GtkToolbarStyle style) { GList *p; for (p = toolbar->children; p; p = p->next) { GtkToolbarChild *child = (GtkToolbarChild *) p->data; if (child->type == GTK_TOOLBAR_CHILD_WIDGET && GTK_IS_TOOLBAR (child->widget)) z_toolbar_set_style_recursive (GTK_TOOLBAR (child->widget), style); } switch (style) { case GTK_TOOLBAR_ICONS: case GTK_TOOLBAR_TEXT: case GTK_TOOLBAR_BOTH: case GTK_TOOLBAR_BOTH_HORIZ: gtk_toolbar_set_style (toolbar, style); break; default: gtk_toolbar_unset_style (toolbar); break; } } /* static void on_style_changed (GtkToolbar *toolbar, GtkToolbarStyle style, gpointer data) { GList *p; GtkToolbarChild *child; if (!toolbar) return; p = toolbar->children; while (p) { child = (GtkToolbarChild*)p->data; if (child->type == GTK_TOOLBAR_CHILD_WIDGET && GTK_IS_TOOLBAR(child->widget)) z_toolbar_set_style_recursive(GTK_TOOLBAR(child->widget), style); p = p->next; } } */ GtkWidget * z_load_pixmap (const gchar * name) { GtkWidget *image; gchar *path; path = g_strconcat (PACKAGE_PIXMAPS_DIR "/", name, NULL); image = gtk_image_new_from_file (path); g_free (path); gtk_widget_show (image); return image; } GtkWindow * z_main_window (void) { return GTK_WINDOW(zapping); } gchar * find_unused_name (const gchar * dir, const gchar * file, const gchar * ext) { gchar *buf = NULL; gchar *name; const gchar *slash = ""; const gchar *dot = ""; gint index = 0; const gchar *s; gint n; struct stat sb; if (!dir) dir = ""; else if (dir[0] && dir[strlen (dir) - 1] != '/') slash = "/"; if (!file || !file[0]) return g_strconcat (dir, slash, NULL); n = strlen (file); /* cut off existing extension from @file */ for (s = file + n; s > file;) if (*--s == '.') { if (s == file || s[-1] == '/') return g_strconcat (dir, slash, NULL); else break; } if (s == file) /* has no extension */ s = file + n; else if (!ext) /* no new ext, keep old */ ext = s; /* parse off existing numeral suffix */ for (n = 1; s > file && n < 10000000; n *= 10) if (isdigit(s[-1])) index += (*--s & 15) * n; else break; name = g_strndup (file, (guint)(s - file)); if (!ext) ext = ""; else if (ext[0] && ext[0] != '.') dot = "."; if (index == 0 && n == 1) /* had no suffix */ { /* Try first without numeral suffix */ buf = g_strdup_printf ("%s%s%s%s%s", dir, slash, name, dot, ext); index = 2; /* foo, foo2, foo3, ... */ } /* else fooN, fooN+1, fooN+2 */ for (n = 10000; n > 0; n--) /* eventually abort */ { if (!buf) buf = g_strdup_printf("%s%s%s%d%s%s", dir, slash, name, index++, dot, ext); /* Try to query file availability */ /* * Note: This is easy to break, but since there's no good(tm) * way to predict an available file name, just do the simple thing. */ if (stat (buf, &sb) == -1) { switch (errno) { case ENOENT: case ENOTDIR: /* take this */ break; default: /* give up */ g_free (buf); buf = NULL; break; } break; } else { /* exists, try other */ g_free (buf); buf = NULL; } } g_free (name); return buf ? buf : g_strconcat (dir, slash, NULL); } /* * "Device entry" * * Device: Foo Inc. Mk II * Driver: Foo 0.0.1 * Device file: [/dev/foo__________][v] */ typedef struct _z_device_entry z_device_entry; struct _z_device_entry { GtkWidget * table; GtkWidget * device; GtkWidget * driver; GtkWidget * combo; guint timeout; tv_device_node * list; tv_device_node * selected; z_device_entry_open_fn *open_fn; z_device_entry_select_fn *select_fn; gpointer user_data; }; static void z_device_entry_destroy (gpointer data) { z_device_entry *de = data; if (de->timeout != NO_SOURCE_ID) gtk_timeout_remove (de->timeout); tv_device_node_delete_list (&de->list); g_free (de); } tv_device_node * z_device_entry_selected (GtkWidget * table) { z_device_entry *de = g_object_get_data (G_OBJECT (table), "z_device_entry"); g_assert (de != NULL); return de->selected; } void z_device_entry_grab_focus (GtkWidget * table) { z_device_entry *de = g_object_get_data (G_OBJECT (table), "z_device_entry"); g_assert (de != NULL); gtk_widget_grab_focus (de->combo); } static void z_device_entry_select (z_device_entry * de, tv_device_node * n) { const gchar *device; const gchar *driver; gchar *s = NULL; de->selected = n; if (de->select_fn) de->select_fn (de->table, n, de->user_data); device = _("Unknown"); driver = device; if (n) { if (n->label) device = n->label; if (n->driver && n->version) driver = s = g_strdup_printf ("%s %s", n->driver, n->version); else if (n->driver) driver = n->driver; else if (n->version) driver = n->version; } gtk_label_set_text (GTK_LABEL (de->device), device); gtk_label_set_text (GTK_LABEL (de->driver), driver); g_free (s); } static GtkWidget * z_device_entry_label_new (const char * text, gint padding) { GtkWidget *label; label = gtk_label_new (text); gtk_widget_show (label); gtk_label_set_justify (GTK_LABEL (label), GTK_JUSTIFY_LEFT); gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); gtk_misc_set_padding (GTK_MISC (label), padding, padding); return label; } static void on_z_device_entry_changed (GtkEntry * entry, gpointer user_data); /* XXX deprecated, although the GtkCombo description elaborates: "The drop-down list is a GtkList widget and can be accessed using the list member of the GtkCombo. List elements can contain arbitrary widgets, [by appending GtkListItems to the list]" */ extern GtkWidget *gtk_list_item_new (void); static void z_device_entry_relist (z_device_entry * de) { tv_device_node *n; if (de->combo) gtk_widget_destroy (de->combo); de->combo = gtk_combo_new (); gtk_widget_show (de->combo); for (n = de->list; n; n = n->next) { GtkWidget *item; GtkWidget *label; gchar *s; item = gtk_list_item_new (); gtk_widget_show (item); /* XXX Perhaps add an icon indicating if the device is present but busy (v4l...), or the user has no access permission. */ if (n->driver && n->label) s = g_strdup_printf ("%s (%s %s)", n->device, n->driver, n->label); else if (n->driver || n->label) s = g_strdup_printf ("%s (%s)", n->device, n->driver ? n->driver : n->label); else s = g_strdup (n->device); label = z_device_entry_label_new (s, 0); g_free (s); gtk_container_add (GTK_CONTAINER (item), label); gtk_combo_set_item_string (GTK_COMBO (de->combo), GTK_ITEM (item), n->device); gtk_container_add (GTK_CONTAINER (GTK_COMBO (de->combo)->list), item); } gtk_table_attach (GTK_TABLE (de->table), de->combo, 1, 2, 2, 2 + 1, GTK_FILL | GTK_EXPAND, 0, 0, 0); g_signal_connect (G_OBJECT (GTK_COMBO (de->combo)->entry), "changed", G_CALLBACK (on_z_device_entry_changed), de); } static gboolean on_z_device_entry_timeout (gpointer user_data) { z_device_entry *de = user_data; tv_device_node *n; const gchar *s; s = gtk_entry_get_text (GTK_ENTRY (GTK_COMBO (de->combo)->entry)); if (s && s[0]) if ((n = de->open_fn (de->table, de->list, s, de->user_data))) { tv_device_node_add (&de->list, n); z_device_entry_relist (de); z_device_entry_select (de, n); return FALSE; } z_device_entry_select (de, NULL); return FALSE; /* don't call again */ } static void on_z_device_entry_changed (GtkEntry * entry, gpointer user_data) { z_device_entry *de = user_data; tv_device_node *n; const gchar *s; if (de->timeout != NO_SOURCE_ID) { gtk_timeout_remove (de->timeout); de->timeout = NO_SOURCE_ID; } s = gtk_entry_get_text (entry); if (s && s[0]) { for (n = de->list; n; n = n->next) if (0 == strcmp (s, n->device)) { z_device_entry_select (de, n); return; } z_device_entry_select (de, NULL); de->timeout = gtk_timeout_add (1000 /* ms */, on_z_device_entry_timeout, de); } else { z_device_entry_select (de, NULL); } } static void z_device_entry_table_pair (z_device_entry * de, guint row, const char * label, GtkWidget * crank) { gtk_table_attach (GTK_TABLE (de->table), z_device_entry_label_new (label, 3), 0, 1, row, row + 1, GTK_FILL, 0, 0, 0); if (crank) { gtk_widget_show (crank); gtk_table_attach (GTK_TABLE (de->table), crank, 1, 2, row, row + 1, GTK_FILL | GTK_EXPAND, 0, 0, 0); } } GtkWidget * z_device_entry_new (const gchar * prompt, tv_device_node * list, const gchar * current_device, z_device_entry_open_fn *open_fn, z_device_entry_select_fn *select_fn, gpointer user_data) { z_device_entry *de; g_assert (open_fn != NULL); de = g_malloc0 (sizeof (*de)); de->open_fn = open_fn; de->select_fn = select_fn; de->user_data = user_data; de->timeout = NO_SOURCE_ID; de->table = gtk_table_new (3, 2, FALSE); gtk_widget_show (de->table); g_object_set_data_full (G_OBJECT (de->table), "z_device_entry", de, (GDestroyNotify) z_device_entry_destroy); de->device = z_device_entry_label_new ("", 3); de->driver = z_device_entry_label_new ("", 3); z_device_entry_table_pair (de, 0, _("Device:"), de->device); z_device_entry_table_pair (de, 1, _("Driver:"), de->driver); z_device_entry_table_pair (de, 2, prompt ? prompt : _("Device file:"), NULL); de->list = list; z_device_entry_relist (de); gtk_entry_set_text (GTK_ENTRY (GTK_COMBO (de->combo)->entry), ""); if (current_device && current_device[0]) gtk_entry_set_text (GTK_ENTRY (GTK_COMBO (de->combo)->entry), current_device); else if (list) gtk_entry_set_text (GTK_ENTRY (GTK_COMBO (de->combo)->entry), list->device); return de->table; } /** * z_widget_add_accelerator: * @widget: * @accel_signal: * @accel_key: * @accel_mods: * * Like gtk_widget_add_accelerator() but takes care of creating the * accel group. **/ void z_widget_add_accelerator (GtkWidget *widget, const gchar *accel_signal, guint accel_key, guint accel_mods) { if (!accel_group) { accel_group = gtk_accel_group_new(); gtk_window_add_accel_group(GTK_WINDOW(zapping), accel_group); } gtk_widget_add_accelerator(widget, accel_signal, accel_group, accel_key, accel_mods, GTK_ACCEL_VISIBLE); } static void on_entry_activate (GObject *entry, GtkDialog *dialog) { gint response; response = z_object_get_int_data (entry, "zmisc-response"); gtk_dialog_response (dialog, response); } void z_entry_emits_response (GtkWidget *entry, GtkDialog *dialog, GtkResponseType response) { g_signal_connect (G_OBJECT (entry), "activate", G_CALLBACK (on_entry_activate), dialog); g_object_set_data (G_OBJECT (entry), "zmisc-response", GINT_TO_POINTER (response)); } /* * Application stock icons */ GtkWidget * z_gtk_image_new_from_pixdata (const GdkPixdata * pixdata) { GdkPixbuf *pixbuf; GtkWidget *image; pixbuf = gdk_pixbuf_from_pixdata (pixdata, FALSE, NULL); g_assert (pixbuf != NULL); image = gtk_image_new_from_pixbuf (pixbuf); g_object_unref (G_OBJECT (pixbuf)); return image; } static GtkIconFactory * icon_factory (void) { static GtkIconFactory *factory = NULL; if (!factory) { factory = gtk_icon_factory_new (); gtk_icon_factory_add_default (factory); /* g_object_unref (factory); */ } return factory; } gboolean z_icon_factory_add_file (const gchar * stock_id, const gchar * filename) { GError *error = NULL; GtkIconSet *icon_set; GdkPixbuf *pixbuf; gchar *path; path = g_strconcat (PACKAGE_PIXMAPS_DIR "/", filename, NULL); pixbuf = gdk_pixbuf_new_from_file (path, &error); g_free (path); if (!pixbuf || error) { g_assert (!pixbuf); if (error) { #ifdef ZMISC_DEBUG_STOCK /* FIXME */ fprintf (stderr, "Cannot read image file '%s':\n%s\n", error->message); #endif g_error_free (error); error = NULL; } return FALSE; } icon_set = gtk_icon_set_new_from_pixbuf (pixbuf); g_object_unref (G_OBJECT (pixbuf)); gtk_icon_factory_add (icon_factory (), stock_id, icon_set); gtk_icon_set_unref (icon_set); return TRUE; } gboolean z_icon_factory_add_pixdata (const gchar * stock_id, const GdkPixdata * pixdata) { GError *error = NULL; GtkIconSet *icon_set; GdkPixbuf *pixbuf; pixbuf = gdk_pixbuf_from_pixdata (pixdata, /* copy_pixels */ FALSE, &error); if (!pixbuf || error) { g_assert (!pixbuf); if (error) { #ifdef ZMISC_DEBUG_STOCK /* FIXME */ fprintf (stderr, "Cannot read pixdata:\n%s\n", error->message); #endif g_error_free (error); error = NULL; } return FALSE; } icon_set = gtk_icon_set_new_from_pixbuf (pixbuf); g_object_unref (G_OBJECT (pixbuf)); gtk_icon_factory_add (icon_factory (), stock_id, icon_set); gtk_icon_set_unref (icon_set); return TRUE; } /* This is for tveng, which will eventually spin off. Elsewhere use g_strlcpy. */ size_t z_strlcpy (char * dst, const char * src, size_t size) { register const char *s; register char c, *d, *e; if (size < 1) return strlen (src); s = src; d = dst; e = d + size - 1; while ((c = *s++) && d < e) *d++ = c; *d = 0; while (c) c = *s++; return s - src; } /* Debugging. */ const gchar * z_gdk_event_name (GdkEvent * event) { static const gchar *event_name[] = { "NOTHING", "DELETE", "DESTROY", "EXPOSE", "MOTION_NOTIFY", "BUTTON_PRESS", "2BUTTON_PRESS", "3BUTTON_PRESS", "BUTTON_RELEASE", "KEY_PRESS", "KEY_RELEASE", "ENTER_NOTIFY", "LEAVE_NOTIFY", "FOCUS_CHANGE", "CONFIGURE", "MAP", "UNMAP", "PROPERTY_NOTIFY", "SELECTION_CLEAR", "SELECTION_REQUEST", "SELECTION_NOTIFY", "PROXIMITY_IN", "PROXIMITY_OUT", "DRAG_ENTER", "DRAG_LEAVE", "DRAG_MOTION", "DRAG_STATUS", "DROP_START", "DROP_FINISHED", "CLIENT_EVENT", "VISIBILITY_NOTIFY", "NO_EXPOSE" }; if (event->type >= GDK_NOTHING && event->type <= GDK_NO_EXPOSE) return event_name[event->type - GDK_NOTHING]; else return "unknown"; } void z_label_set_text_printf (GtkLabel * label, const gchar * format, ...) { gchar *buffer; va_list args; va_start (args, format); buffer = g_strdup_vprintf (format, args); va_end (args); gtk_label_set_text (label, buffer); g_free (buffer); } #define VALID_ITER(iter, list_store) \ ((iter) != NULL \ && (iter)->user_data != NULL \ && ((GTK_LIST_STORE (list_store))->stamp == (iter)->stamp)) gboolean z_tree_selection_iter_first (GtkTreeSelection * selection, GtkTreeModel * model, GtkTreeIter * iter) { if (!gtk_tree_model_get_iter_first (model, iter)) return FALSE; /* empty list */ while (!gtk_tree_selection_iter_is_selected (selection, iter)) if (!gtk_tree_model_iter_next (model, iter)) return FALSE; /* nothing selected */ return TRUE; } gboolean z_tree_selection_iter_last (GtkTreeSelection * selection, GtkTreeModel * model, GtkTreeIter * iter) { GtkTreeIter last; if (!z_tree_selection_iter_first (selection, model, iter)) return FALSE; /* nothing */ last = *iter; while (gtk_tree_model_iter_next (model, &last) && gtk_tree_selection_iter_is_selected (selection, &last)) *iter = last; return TRUE; } /* In a GTK_SELECTION_MULTIPLE tree view, remove all selected rows of the model. */ void z_tree_view_remove_selected (GtkTreeView * tree_view, GtkTreeSelection * selection, GtkTreeModel * model) { GtkTreeIter iter; if (!z_tree_selection_iter_first (selection, model, &iter)) return; /* nothing */ while (VALID_ITER (&iter, model)) { if (!gtk_tree_selection_iter_is_selected (selection, &iter)) break; gtk_list_store_remove (GTK_LIST_STORE (model), &iter); } if (VALID_ITER (&iter, model)) { GtkTreePath *path; gtk_tree_selection_select_iter (selection, &iter); if ((path = gtk_tree_model_get_path (model, &iter))) { gtk_tree_view_scroll_to_cell (tree_view, path, NULL, /* use_align */ TRUE, 0.5, 0.0); gtk_tree_path_free (path); } } } gboolean z_overwrite_file_dialog (GtkWindow * parent, const gchar * primary, const gchar * filename) { struct stat st; GtkWidget *dialog; gchar *name; gint result; if (-1 == stat (filename, &st)) { /* Also symlink to non-existing file. */ return TRUE; } name = g_filename_to_utf8 (filename, NUL_TERMINATED, NULL, NULL, NULL); if (!name) return FALSE; if (S_ISREG (st.st_mode) || S_ISLNK (st.st_mode)) { dialog = z_message_dialog_new (parent, (GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT), GTK_MESSAGE_WARNING, GTK_BUTTONS_NONE, _("Overwrite %s?"), NULL, name); gtk_dialog_add_buttons (GTK_DIALOG (dialog), GTK_STOCK_CANCEL, GTK_RESPONSE_REJECT, _("_Overwrite"), GTK_RESPONSE_ACCEPT, NULL); } else if (S_ISDIR (st.st_mode)) { z_show_non_modal_message_dialog (parent, GTK_MESSAGE_ERROR, primary, _("%s is a directory."), name); g_free (name); return FALSE; } else { dialog = z_message_dialog_new (parent, (GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT), GTK_MESSAGE_WARNING, GTK_BUTTONS_NONE, _("%s is a special file"), NULL, name); gtk_dialog_add_buttons (GTK_DIALOG (dialog), _("Continue"), GTK_RESPONSE_ACCEPT, GTK_STOCK_CANCEL, GTK_RESPONSE_REJECT, NULL); } g_free (name); result = gtk_dialog_run (GTK_DIALOG (dialog)); gtk_widget_destroy (dialog); return (GTK_RESPONSE_ACCEPT == result); } void from_old_tveng_capture_mode (display_mode * dmode, capture_mode * cmode, enum old_tveng_capture_mode mode) { switch (mode) { case OLD_TVENG_NO_CAPTURE: break; case OLD_TVENG_CAPTURE_READ: *dmode = DISPLAY_MODE_WINDOW; *cmode = CAPTURE_MODE_READ; return; case OLD_TVENG_CAPTURE_PREVIEW: *dmode = DISPLAY_MODE_FULLSCREEN; *cmode = CAPTURE_MODE_OVERLAY; return; case OLD_TVENG_CAPTURE_WINDOW: *dmode = DISPLAY_MODE_WINDOW; *cmode = CAPTURE_MODE_OVERLAY; return; case OLD_TVENG_TELETEXT: *dmode = DISPLAY_MODE_WINDOW; *cmode = CAPTURE_MODE_TELETEXT; return; case OLD_TVENG_FULLSCREEN_READ: *dmode = DISPLAY_MODE_FULLSCREEN; *cmode = CAPTURE_MODE_READ; return; case OLD_TVENG_FULLSCREEN_TELETEXT: *dmode = DISPLAY_MODE_FULLSCREEN; *cmode = CAPTURE_MODE_TELETEXT; return; case OLD_TVENG_BACKGROUND_READ: *dmode = DISPLAY_MODE_BACKGROUND; *cmode = CAPTURE_MODE_READ; return; case OLD_TVENG_BACKGROUND_PREVIEW: *dmode = DISPLAY_MODE_BACKGROUND; *cmode = CAPTURE_MODE_OVERLAY; return; case OLD_TVENG_BACKGROUND_TELETEXT: *dmode = DISPLAY_MODE_BACKGROUND; *cmode = CAPTURE_MODE_TELETEXT; return; } *dmode = DISPLAY_MODE_WINDOW; *cmode = CAPTURE_MODE_NONE; } enum old_tveng_capture_mode to_old_tveng_capture_mode (display_mode dmode, capture_mode cmode) { enum old_tveng_capture_mode mode; mode = OLD_TVENG_NO_CAPTURE; switch (dmode) { case DISPLAY_MODE_WINDOW: switch (cmode) { case CAPTURE_MODE_NONE: mode = OLD_TVENG_NO_CAPTURE; break; case CAPTURE_MODE_READ: mode = OLD_TVENG_CAPTURE_READ; break; case CAPTURE_MODE_OVERLAY: mode = OLD_TVENG_CAPTURE_WINDOW; break; case CAPTURE_MODE_TELETEXT: mode = OLD_TVENG_TELETEXT; break; } break; case DISPLAY_MODE_FULLSCREEN: switch (cmode) { case CAPTURE_MODE_NONE: mode = OLD_TVENG_NO_CAPTURE; break; case CAPTURE_MODE_READ: mode = OLD_TVENG_FULLSCREEN_READ; break; case CAPTURE_MODE_TELETEXT: mode = OLD_TVENG_FULLSCREEN_TELETEXT; break; case CAPTURE_MODE_OVERLAY: mode = OLD_TVENG_CAPTURE_PREVIEW; break; } break; case DISPLAY_MODE_BACKGROUND: switch (cmode) { case CAPTURE_MODE_NONE: mode = OLD_TVENG_NO_CAPTURE; break; case CAPTURE_MODE_READ: mode = OLD_TVENG_BACKGROUND_READ; break; case CAPTURE_MODE_TELETEXT: mode = OLD_TVENG_BACKGROUND_TELETEXT; break; case CAPTURE_MODE_OVERLAY: mode = OLD_TVENG_BACKGROUND_PREVIEW; break; } break; } return mode; } gboolean z_set_overlay_buffer (tveng_device_info * info, const tv_screen * screen, const GdkWindow * window _unused_) { #if 0 /* Gtk 2.2 */ GdkDisplay *display; const gchar *display_name; display = gdk_drawable_get_display (window); display_name = gdk_display_get_name (display); #endif return tv_set_overlay_buffer (info, x11_display_name (), screen->screen_number, &screen->target); } /* Not available until Gtk+ 2.6 */ void z_action_set_sensitive (GtkAction * action, gboolean sensitive) { g_object_set (G_OBJECT (action), "sensitive", sensitive, NULL); } /* Not available until Gtk+ 2.6 */ void z_action_set_visible (GtkAction * action, gboolean visible) { g_object_set (G_OBJECT (action), "visible", visible, NULL); } void z_show_empty_submenu (GtkActionGroup * action_group, const gchar * action_name) { GtkAction *action; action = gtk_action_group_get_action (action_group, action_name); if (!action) return; /* assume menus have been edited */ g_object_set (G_OBJECT (action), "hide-if-empty", FALSE, NULL); } void z_menu_shell_chop_off (GtkMenuShell * menu_shell, GtkMenuItem * menu_item) { GtkContainer *container; GList *list; g_assert (GTK_IS_MENU_SHELL (menu_shell)); if (menu_item) g_assert (GTK_IS_MENU_ITEM (menu_item)); container = GTK_CONTAINER (menu_shell); for (;;) { list = gtk_container_get_children (container); if (menu_item) for (; list; list = list->next) if (list->data == menu_item) break; if (!list || !list->next) break; gtk_container_remove (container, GTK_WIDGET (list->next->data)); } if (list) gtk_container_remove (container, GTK_WIDGET (list->data)); } gchar * z_strappend (gchar * string1, const gchar * string2, ...) { gsize l; va_list args; gchar *s; gchar *concat; gchar *ptr; g_return_val_if_fail (string1 != NULL, NULL); if (!string2) return string1; l = 1 + strlen (string1) + strlen (string2); va_start (args, string2); while ((s = va_arg (args, gchar *))) l += strlen (s); va_end (args); ptr = concat = g_new (gchar, l); ptr = g_stpcpy (ptr, string1); ptr = g_stpcpy (ptr, string2); va_start (args, string2); while ((s = va_arg (args, gchar *))) ptr = g_stpcpy (ptr, s); va_end (args); g_free (string1); return concat; } void z_help_display (GtkWindow * parent, const gchar * filename, const gchar * link_id) { GError *error = NULL; if (DISPLAY_MODE_FULLSCREEN == zapping->display_mode) { /* Error ignored. */ zmisc_switch_mode (DISPLAY_MODE_WINDOW, tv_get_capture_mode (zapping->info), zapping->info, /* warnings */ FALSE); } if (!gnome_help_display (filename, link_id, &error)) { if (error) { if (NULL == parent) parent = GTK_WINDOW (zapping); z_show_non_modal_message_dialog (parent, GTK_MESSAGE_ERROR, _("Could not open help file"), "%s", error->message); g_error_free (error); error = NULL; } } } void z_url_show (GtkWindow * parent, const gchar * url) { GError *error = NULL; if (DISPLAY_MODE_FULLSCREEN == zapping->display_mode) { /* Error ignored. */ zmisc_switch_mode (DISPLAY_MODE_WINDOW, tv_get_capture_mode (zapping->info), zapping->info, /* warnings */ TRUE); } if (!gnome_url_show (url, &error)) { if (error) { if (NULL == parent) parent = GTK_WINDOW (zapping); z_show_non_modal_message_dialog (parent, GTK_MESSAGE_ERROR, _("Could not open URL"), "%s", error->message); g_error_free (error); error = NULL; } } } /* Just to get rid of annoying warnings. */ void z_object_set_const_data (GObject * object, const gchar * key, const void * data) { g_object_set_data (object, key, /* const cast */ data); } void z_object_set_int_data (GObject * object, const gchar * key, gint data) { g_object_set_data (object, key, GINT_TO_POINTER (data)); } gint z_object_get_int_data (GObject * object, const gchar * key) { gpointer p; p = g_object_get_data (object, key); return GPOINTER_TO_INT (p); } gulong z_signal_connect_const (gpointer instance, const gchar * detailed_signal, GCallback c_handler, const void * data) { return g_signal_connect (instance, detailed_signal, c_handler, /* const cast */ data); } gulong z_signal_connect_python (gpointer instance, const gchar * detailed_signal, const gchar * command) { return g_signal_connect (instance, detailed_signal, G_CALLBACK (on_python_command1), /* const cast */ command); } /* ZTimeout -- like GTimeout, except the callback is called once at a future time, not at intervals. The callback must return the time (GTimeVal) when it wants to be called again, or "null" to remove the timeout. */ typedef struct _ZTimeoutSource ZTimeoutSource; struct _ZTimeoutSource { GSource source; GTimeVal expiration; }; static gboolean z_timeout_prepare (GSource * source, gint * timeout) { ZTimeoutSource *timeout_source = (ZTimeoutSource *) source; glong sec; glong msec; GTimeVal current_time; g_source_get_current_time (source, ¤t_time); sec = timeout_source->expiration.tv_sec - current_time.tv_sec; msec = (timeout_source->expiration.tv_usec - current_time.tv_usec) / 1000; if (sec < 0 || (0 == sec && msec < 0)) { msec = 0; } else { if (msec < 0) { msec += 1000; sec -= 1; } msec = MIN ((guint) G_MAXINT, (guint) msec + 1000 * (guint) sec); } *timeout = (gint) msec; return (0 == msec); } static gboolean z_timeout_check (GSource * source) { ZTimeoutSource *timeout_source = (ZTimeoutSource *) source; GTimeVal current_time; g_source_get_current_time (source, ¤t_time); return ((timeout_source->expiration.tv_sec < current_time.tv_sec) || ((timeout_source->expiration.tv_sec == current_time.tv_sec) && (timeout_source->expiration.tv_usec <= current_time.tv_usec))); } static gboolean z_timeout_dispatch (GSource * source, GSourceFunc callback, gpointer user_data) { ZTimeoutSource *timeout_source = (ZTimeoutSource *) source; ZTimeoutFunc cb = (ZTimeoutFunc) callback; if (!cb) { g_warning ("Timeout source dispatched without callback\n" "You must call g_source_set_callback()."); return FALSE; } timeout_source->expiration = cb (user_data); return (0 != timeout_source->expiration.tv_sec || 0 != timeout_source->expiration.tv_usec); } static GSourceFuncs z_timeout_funcs = { .prepare = z_timeout_prepare, .check = z_timeout_check, .dispatch = z_timeout_dispatch, }; /** * z_timeout_source_new: * @wakeup: call once at this time. * * Return value: the newly-created timeout source **/ static GSource * z_timeout_source_new (GTimeVal wakeup) { GSource *source; ZTimeoutSource *timeout_source; source = g_source_new (&z_timeout_funcs, sizeof (ZTimeoutSource)); timeout_source = (ZTimeoutSource *) source; timeout_source->expiration = wakeup; return source; } /** * z_timeout_add_full: * @priority: the priority of the idle source. Typically this will be in the * range between #G_PRIORITY_DEFAULT_IDLE and #G_PRIORITY_HIGH_IDLE. * @wakeup: first time to call * @function: function to call * @data: data to pass to @function * @notify: function to call when the idle is removed, or %NULL * * Sets a function to be called once at a later time. * * Return value: the id of event source. **/ static guint z_timeout_add_full (gint priority, GTimeVal wakeup, ZTimeoutFunc function, gpointer data, GDestroyNotify notify) { GSource *source; guint id; g_return_val_if_fail (function != NULL, 0); source = z_timeout_source_new (wakeup); if (priority != G_PRIORITY_DEFAULT) g_source_set_priority (source, priority); g_source_set_callback (source, (GSourceFunc) function, data, notify); id = g_source_attach (source, NULL); g_source_unref (source); return id; } /** * z_timeout_add: * @wakeup: first time to call * @function: function to call * @data: data to pass to @function * * Return value: the id of event source. **/ guint z_timeout_add (GTimeVal wakeup, ZTimeoutFunc function, gpointer data) { return z_timeout_add_full (G_PRIORITY_DEFAULT, wakeup, function, data, NULL); } gint z_join_thread_with_timeout (const char * who, pthread_t id, volatile gboolean * quit_flag, volatile gboolean * ack_flag, gint timeout) { *ack_flag = FALSE; *quit_flag = TRUE; /* XXX use pthread_timedjoin_np() where available. */ for (; timeout > 0; --timeout) { if (*ack_flag) break; usleep (100000); } /* Ok, you asked for it */ if (0 == timeout) { int r; printv ("Unfriendly termination of %s\n", who); r = pthread_cancel (id); if (r != 0) { printv("Cancellation of %s failed: %d\n", who, r); return 0; } } pthread_join (id, NULL); return timeout; } ������zapping-0.10cvs6/src/zmisc.h������������������������������������������������������������������������ 644 � 764 � 144 � 44302 10402712024 11105� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Zapping (TV viewer for the Gnome Desktop) * Copyright (C) 2000-2001 Iaki Garca Etxebarria * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* Misc stuff for zapping that didn't fit properly in any other place, but was commonly used. */ #ifndef __ZMISC_H__ #define __ZMISC_H__ #ifdef HAVE_CONFIG_H # include "config.h" #endif #include <stddef.h> #include <string.h> #include <pthread.h> #include <assert.h> #include "globals.h" #include "x11stuff.h" /* Progress mark, GNU coding style (www.gnu.org) error message, compatible with emacs M-x next-error. */ #if 1 #define PR fprintf (stderr, "%s:%u:", __FILE__, __LINE__) #define PRF(templ, ...) \ fprintf (stderr, "%s:%u: " templ, __FILE__, __LINE__ \ , ## __VA_ARGS__) #else #define PR 0 #define PRF(templ, ...) 0 #endif #define N_ELEMENTS(array) (sizeof (array) / sizeof (*(array))) #ifdef __GNUC__ #undef likely #undef unlikely #if __GNUC__ < 3 # define likely(expr) (expr) # define unlikely(expr) (expr) #else # define likely(expr) __builtin_expect(expr, 1) # define unlikely(expr) __builtin_expect(expr, 0) #endif #undef PARENT #define PARENT(_ptr, _type, _member) ({ \ __typeof__ (&((_type *) 0)->_member) _p = (_ptr); \ (_p != 0) ? (_type *)(((char *) _p) - offsetof (_type, \ _member)) : (_type *) 0; \ }) #undef CONST_PARENT #define CONST_PARENT(_ptr, _type, _member) ({ \ __typeof__ (&((const _type *) 0)->_member) _p = (_ptr); \ (_p != 0) ? (const _type *)(((const char *) _p) - offsetof \ (const _type, _member)) : (const _type *) 0; \ }) #undef ABS #define ABS(n) ({ \ register int _n = n, _t = _n; \ _t >>= sizeof (_t) * 8 - 1; \ _n ^= _t; \ _n -= _t; \ }) #undef MIN #define MIN(x, y) ({ \ __typeof__ (x) _x = x; \ __typeof__ (y) _y = y; \ (void)(&_x == &_y); /* alert when type mismatch */ \ (_x < _y) ? _x : _y; \ }) #undef MAX #define MAX(x, y) ({ \ __typeof__ (x) _x = x; \ __typeof__ (y) _y = y; \ (void)(&_x == &_y); /* alert when type mismatch */ \ (_x > _y) ? _x : _y; \ }) #define SWAP(x, y) \ do { \ __typeof__ (x) _x = x; \ x = y; \ y = _x; \ } while (0) #undef SATURATE #ifdef __i686__ /* conditional move */ #define SATURATE(n, min, max) ({ \ __typeof__ (n) _n = n; \ __typeof__ (n) _min = min; \ __typeof__ (n) _max = max; \ if (_n < _min) \ _n = _min; \ if (_n > _max) \ _n = _max; \ _n; \ }) #else #define SATURATE(n, min, max) ({ \ __typeof__ (n) _n = n; \ __typeof__ (n) _min = min; \ __typeof__ (n) _max = max; \ if (_n < _min) \ _n = _min; \ else if (_n > _max) \ _n = _max; \ _n; \ }) #endif #define _unused_ __attribute__ ((unused)) /* TRUE if exactly one bit is set in signed or unsigned n. */ #define SINGLE_BIT(n) ({ \ __typeof__ (n) _n = n; \ (_n > 0 && 0 == (_n & (_n - 1))); \ }) #else /* !__GNUC__ */ #define __inline__ #define likely(expr) (expr) #define unlikely(expr) (expr) #define _unused_ static char * PARENT_HELPER (char *p, unsigned int offset) { return (p == 0) ? 0 : p - offset; } static const char * CONST_PARENT_HELPER (const char *p, unsigned int offset) { return (p == 0) ? 0 : p - offset; } #undef PARENT #define PARENT(_ptr, _type, _member) \ ((offsetof (_type, _member) == 0) ? (_type *)(_ptr) \ : (_type *) PARENT_HELPER ((char *)(_ptr), offsetof (_type, _member))) #undef CONST_PARENT #define CONST_PARENT(_ptr, _type, _member) \ ((offsetof (const _type, _member) == 0) ? (const _type *)(_ptr) \ : (const _type *) CONST_PARENT_HELPER ((const char *)(_ptr), \ offsetof (const _type, _member))) #undef ABS #define ABS(n) (((n) < 0) ? -(n) : (n)) #undef MIN #define MIN(x, y) (((x) < (y)) ? (x) : (y)) #undef MAX #define MAX(x, y) (((x) > (y)) ? (x) : (y)) #define SWAP(x, y) \ do { \ long _x = x; \ x = y; \ y = _x; \ } while (0) #undef SATURATE #define SATURATE(n, min, max) MIN (MAX (n, min), max) #define SINGLE_BIT(n) ((n) > 0 && 0 == ((n) & ((n) - 1))) #endif /* !__GNUC__ */ #define SET(var) memset (&(var), ~0, sizeof (var)) #define CLEAR(var) memset (&(var), 0, sizeof (var)) #define MOVE(d, s) memmove (d, s, sizeof (d)) #include <gnome.h> #include <gdk-pixbuf/gdk-pixbuf.h> #include <gdk-pixbuf/gdk-pixdata.h> #include "tveng.h" /* With precompiler aid we can print much more useful info */ /* This shows a non-modal, non-blocking message box */ #define ShowBox(MSG, MSGTYPE, args...) \ do { \ GtkWidget * dialog = \ gtk_message_dialog_new (zapping ? GTK_WINDOW (zapping) : 0, \ GTK_DIALOG_DESTROY_WITH_PARENT, \ MSGTYPE, \ GTK_BUTTONS_CLOSE, \ MSG,##args); \ \ /* Destroy the dialog when the user responds to it */ \ /* (e.g. clicks a button) */ \ g_signal_connect_swapped (G_OBJECT (dialog), "response", \ G_CALLBACK (gtk_widget_destroy), \ GTK_OBJECT (dialog)); \ \ gtk_widget_show (dialog); \ } while (FALSE) /* This one shows a modal, non-blocking message box */ #define ShowBoxModal(MSG, MSGTYPE, args...) \ do { \ GtkWidget * dialog = \ gtk_message_dialog_new (zapping ? GTK_WINDOW (zapping) : 0, \ GTK_DIALOG_DESTROY_WITH_PARENT | \ GTK_DIALOG_MODAL, \ MSGTYPE, \ GTK_BUTTONS_CLOSE, \ MSG,##args); \ \ g_signal_connect_swapped (G_OBJECT (dialog), "response", \ G_CALLBACK (gtk_widget_destroy), \ GTK_OBJECT (dialog)); \ \ gtk_widget_show (dialog); \ } while (FALSE) /* This one shows a modal, blocking message box */ #define RunBox(MSG, MSGTYPE, args...) \ do { \ GtkWidget * dialog = \ gtk_message_dialog_new (zapping ? GTK_WINDOW (zapping) : 0, \ (GtkDialogFlags) \ (GTK_DIALOG_DESTROY_WITH_PARENT | \ GTK_DIALOG_MODAL), \ MSGTYPE, \ GTK_BUTTONS_CLOSE, \ MSG,##args); \ \ gtk_dialog_run (GTK_DIALOG (dialog)); \ gtk_widget_destroy (dialog); \ } while (FALSE) extern int debug_msg; #define D() \ do { \ if (debug_msg) \ fprintf(stderr, "%s:%s:%u\n", __FILE__, __PRETTY_FUNCTION__, __LINE__); \ } while (FALSE) #undef printv #define printv(format, args...) \ do { \ if (debug_msg) { \ fprintf(stderr, format ,##args); \ fflush(stderr); } \ } while (FALSE) #define z_update_gui() \ do { \ gint z_num_events_pending = gtk_events_pending(); \ for (; z_num_events_pending >= 0; z_num_events_pending--) \ gtk_main_iteration(); \ } while (FALSE) extern GQuark z_misc_error_quark (void); #define Z_MISC_ERROR z_misc_error_quark () typedef enum { Z_MISC_ERROR_MKDIR = 1, } ZMiscError; extern void z_show_non_modal_message_dialog (GtkWindow * parent, GtkMessageType type, const gchar * primary, const gchar * secondary, ...); /** * Asks for a string, returning it, or NULL if it the operation was * cancelled * main_window: Parent of the Dialog to be created, or NULL * title: Title of the dialog * prompt: Prompt, or NULL if it shouldn't be shown * default_text: Default text to appear, or NULL * Returns: The returned string should be g_free'd */ gchar* Prompt (GtkWidget *main_window, const gchar *title, const gchar *prompt, const gchar *default_text); /** * Creates a GtkImageMenuItem with the desired pixmap and the * desired mnemonic. The icon must be a valid Gtk stock icon name. */ GtkWidget * z_gtk_pixmap_menu_item_new(const gchar * label, const gchar * icon); GtkTooltips * z_tooltips_add (GtkTooltips * tips); extern void z_tooltips_active (gboolean enable); #define z_tooltips_enable() z_tooltips_active (TRUE) #define z_tooltips_disable() z_tooltips_active (FALSE) extern void z_tooltip_set (GtkWidget * widget, const gchar * tip_text); GtkWidget * z_tooltip_set_wrap (GtkWidget * widget, const gchar * tip_text); extern void z_set_sensitive_with_tooltip (GtkWidget * widget, gboolean sensitive, const gchar * on_tip, const gchar * off_tip); /** * Widget: a GTK_PIXMAP_MENU_ITEM that you want to change. * Any of the attributes can be NULL, means don't change. */ void z_change_menuitem (GtkWidget *widget, const gchar *new_pixmap, const gchar *new_label, const gchar *new_tooltip); extern void z_set_window_bg (GtkWidget * widget, GdkColor * color); extern void z_set_window_bg_black (GtkWidget * widget); /** * Restores the mode before the last switch_mode. * Returns whatever switch_mode returns. */ int zmisc_restore_previous_mode(tveng_device_info *info); /* * Stops the current tveng mode and shutdowns appropiate subsistems. */ gboolean zmisc_stop (tveng_device_info *info); /* does the mode switching. Since this requires more than just using tveng, a new routine is needed. Returns whatever tveng returns, but we print the message ourselves too, so no need to aknowledge it to the user. Side efects: Stops whatever mode was being used before. */ int zmisc_switch_mode(display_mode new_dmode, capture_mode new_cmode, tveng_device_info * info, gboolean warnings); /** * Like tveng_restart_everything, but updates overlay clips as necessary. */ int z_restart_everything(display_mode new_dmode, capture_mode new_cmode, tveng_device_info * info); /** * Prints the message in the status bar, optional with pango markup. * If the status bar is hidden, it's shown. Timeout is the time in ms to * wait before the status bar is cleaned or hidden again. Can be * 0 to keep the message. */ void z_status_print (const gchar * message, gboolean markup, guint timeout, gboolean hide); /** * Adds the given widget to the status bar, it replaces any widgets * present before. * If the appbar is hidden, it's shown. * Pass NULL to remove the current widget, if any. */ void z_status_set_widget(GtkWidget *widget); /** * Changes the pixmap of a pixbutton (buttons in the toolbar, for example) */ void set_stock_pixmap (GtkWidget *button, const gchar *new_pix); /** * Just like gdk_pixbuf_copy_area but does clipping. */ void z_pixbuf_copy_area (GdkPixbuf *src_pixbuf, gint src_x, gint src_y, gint width, gint height, GdkPixbuf *dest_pixbuf, gint dest_x, gint dest_y); /** * Just like gdk_pixbuf_render_to_drawable but does clipping */ void z_pixbuf_render_to_drawable (GdkPixbuf *pixbuf, GdkWindow *window, GdkGC *gc, gint x, gint y, gint width, gint height); /** * Returns the index of the given widget in the menu, or -1 */ gint z_menu_get_index (GtkWidget *menu, GtkWidget *item); extern GtkWidget * z_menu_shell_nth_item (GtkMenuShell * menu_shell, guint n); /** * Returns the index of the selected entry in a GtkOptionMenu. */ gint z_option_menu_get_active (GtkWidget *option_menu); /** * Sets (visually too) a given item as active. */ void z_option_menu_set_active (GtkWidget *option_menu, guint nth); /** * Error checking scale_simple. */ static inline GdkPixbuf* z_pixbuf_scale_simple (GdkPixbuf *source, gint destw, gint desth, GdkInterpType interp) { if (desth < 5 || destw < 5) return NULL; return gdk_pixbuf_scale_simple(source, destw, desth, interp); } extern gboolean z_build_path (const gchar * path, GError ** error); extern gboolean z_build_path_with_alert (GtkWindow * parent, const gchar * path); void z_electric_set_basename (GtkWidget * w, const gchar * basenm); void z_on_electric_filename (GtkWidget * w, gpointer user_data); void z_electric_replace_extension (GtkWidget * w, const gchar * ext); extern gchar * z_replace_filename_extension (const gchar * filename, const gchar * new_ext); /* Same as z_pixmap_new_from_file(), but prepends PACKAGE_PIXMAP_DIR to name and gtk_shows the pixmap on success */ GtkWidget * z_load_pixmap (const gchar * name); /* Pointer to the main window */ GtkWindow * z_main_window (void); /** * Scans @dir sequentially looking for files named prefix%dsuffix * (clip17.mpeg, for example) and returns the name of the first * file that made stat() fail. * NULL on error. */ gchar* find_unused_name (const gchar * dir, const gchar * prefix, const gchar * suffix); typedef tv_device_node * z_device_entry_open_fn (GtkWidget * table, tv_device_node * list, const gchar * entered, gpointer user_data); typedef void z_device_entry_select_fn (GtkWidget * table, tv_device_node * n, gpointer user_data); /* ATTN maintains & deletes list */ extern GtkWidget * z_device_entry_new (const gchar * prompt, tv_device_node * list, const gchar * current_device, z_device_entry_open_fn *open_fn, z_device_entry_select_fn *select_fn, gpointer user_data); extern tv_device_node * z_device_entry_selected (GtkWidget * table); extern void z_device_entry_grab_focus (GtkWidget * table); /* Makes the given entry emit the response to the dialog when activated */ void z_entry_emits_response (GtkWidget *entry, GtkDialog *dialog, GtkResponseType response); #define SIGNAL_BLOCK(object, signal, statement) \ do { guint id_; \ id_ = g_signal_lookup (signal, G_OBJECT_TYPE (button)); \ g_assert (0 != id_); \ g_signal_handlers_block_matched (object, G_SIGNAL_MATCH_ID, \ id_, 0, 0, 0, 0); \ statement; \ g_signal_handlers_unblock_matched (object, G_SIGNAL_MATCH_ID, \ id_, 0, 0, 0, 0); \ } while (0) #define SIGNAL_HANDLER_BLOCK(object, func, statement) \ do { gulong handler_id_; \ handler_id_ = g_signal_handler_find (G_OBJECT (object), \ G_SIGNAL_MATCH_FUNC, 0, 0, 0, (gpointer) func, 0); \ g_assert (0 != handler_id_); \ g_signal_handler_block (G_OBJECT (object), handler_id_); \ statement; \ g_signal_handler_unblock (G_OBJECT (object), handler_id_); \ } while (0) extern GtkWidget * z_gtk_image_new_from_pixdata (const GdkPixdata * pixdata); extern gboolean z_icon_factory_add_file (const gchar * stock_id, const gchar * filename); extern gboolean z_icon_factory_add_pixdata (const gchar * stock_id, const GdkPixdata * pixdata); extern size_t z_strlcpy (char * dst1, const char * src, size_t size); extern const gchar * z_gdk_event_name (GdkEvent * event); extern void z_toolbar_set_style_recursive (GtkToolbar * toolbar, GtkToolbarStyle style); void z_label_set_text_printf (GtkLabel * label, const gchar * format, ...); extern gboolean z_tree_selection_iter_first (GtkTreeSelection * selection, GtkTreeModel * model, GtkTreeIter * iter); extern gboolean z_tree_selection_iter_last (GtkTreeSelection * selection, GtkTreeModel * model, GtkTreeIter * iter); extern void z_tree_view_remove_selected (GtkTreeView * tree_view, GtkTreeSelection * selection, GtkTreeModel * model); extern gboolean z_overwrite_file_dialog (GtkWindow * parent, const gchar * primary, const gchar * filename); extern void z_help_display (GtkWindow * parent, const gchar * filename, const gchar * link_id); extern void z_url_show (GtkWindow * parent, const gchar * url); enum old_tveng_capture_mode { /* We keep this for config compatibility. */ OLD_TVENG_NO_CAPTURE, /* Capture isn't active */ OLD_TVENG_CAPTURE_READ, /* Capture is through windowed read() call */ OLD_TVENG_CAPTURE_PREVIEW, /* Capture is through fullscreen overlays */ OLD_TVENG_CAPTURE_WINDOW, /* Capture is through windowed overlays */ OLD_TVENG_TELETEXT, /* Teletext in window */ OLD_TVENG_FULLSCREEN_READ, OLD_TVENG_FULLSCREEN_TELETEXT, OLD_TVENG_BACKGROUND_READ, OLD_TVENG_BACKGROUND_PREVIEW, OLD_TVENG_BACKGROUND_TELETEXT, }; void from_old_tveng_capture_mode (display_mode * dmode, capture_mode * cmode, enum old_tveng_capture_mode mode); enum old_tveng_capture_mode to_old_tveng_capture_mode (display_mode dmode, capture_mode cmode); extern gboolean z_set_overlay_buffer (tveng_device_info * info, const tv_screen * screen, const GdkWindow * window); extern void z_action_set_sensitive (GtkAction * action, gboolean sensitive); extern void z_action_set_visible (GtkAction * action, gboolean visible); extern void z_show_empty_submenu (GtkActionGroup * action_group, const gchar * action_name); extern void z_menu_shell_chop_off (GtkMenuShell * menu_shell, GtkMenuItem * menu_item); extern gchar * z_strappend (gchar * string1, const gchar * string2, ...); extern void z_object_set_const_data (GObject * object, const gchar * key, const void * data); extern void z_object_set_int_data (GObject * object, const gchar * key, gint data); extern gint z_object_get_int_data (GObject * object, const gchar * key); extern gulong z_signal_connect_const (gpointer instance, const gchar * detailed_signal, GCallback c_handler, const void * data); extern gulong z_signal_connect_python (gpointer instance, const gchar * detailed_signal, const gchar * command); typedef GTimeVal (* ZTimeoutFunc)(gpointer user_data); extern guint z_timeout_add (GTimeVal wakeup, ZTimeoutFunc function, gpointer data); extern gint z_join_thread_with_timeout (const char * who, pthread_t id, volatile gboolean * quit_flag, volatile gboolean * ack_flag, gint timeout); /* Common constants for item position in Gtk insert functions. */ #define PREPEND 0 #define APPEND -1 /* Common constant for string length in Gtk and Glib functions. */ #define NUL_TERMINATED -1 /* GSource ID */ #define NO_SOURCE_ID ((guint) -1) #endif /* __ZMISC_H__ */ ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������zapping-0.10cvs6/src/capture.c���������������������������������������������������������������������� 644 � 764 � 144 � 102321 10436734620 11447� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Zapping (TV viewer for the Gnome Desktop) * Copyright (C) 2002 Iaki Garca Etxebarria * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /** * Capture management code. The logic is somewhat complex since we * have to support many combinations of request, available and * displayable formats, and try to find an optimum combination. */ #ifdef HAVE_CONFIG_H # include "config.h" #endif #include <gtk/gtk.h> #define ZCONF_DOMAIN "/zapping/options/capture/" #include "zconf.h" #include "zgconf.h" #include <pthread.h> #include <tveng.h> #include "common/fifo.h" #include "zmisc.h" #include "plugins.h" #include "capture.h" #include "csconvert.h" #include "globals.h" #include <sched.h> #define _pthread_rwlock_rdlock(l) pthread_rwlock_rdlock (l) #define _pthread_rwlock_wrlock(l) pthread_rwlock_wrlock (l) #define _pthread_rwlock_unlock(l) pthread_rwlock_unlock (l) /* The capture fifo FIXME must not exceed number of buffers in tveng queue. */ #define N_BUNDLES 8 /* in capture_fifo */ typedef struct { /* What everyone else sees */ capture_frame frame; /* Source image in driver buffer. Pointer will change with each iteration, can be NULL too. */ const tv_capture_buffer * src_buffer; /* Pixfmt converted copies of the source image. */ zimage * images[TV_MAX_PIXFMTS]; /* Copied source image in images[] (if we have no src_buffer or a copy from mmapped to shared memory is necessary). */ zimage * src_image; /* See retrieve_frame(). */ zimage src_direct; /* We convert images on demand. */ tv_pixfmt_set converted; /* When this tag is different from request_id the buffer needs rebuilding (i.e. images must be reallocated). */ gint tag; } producer_buffer; static volatile gint request_id; typedef struct { gint id; /* Requested image size. */ guint width; guint height; /* Requested pixel formats. */ tv_pixfmt_set pixfmt_set; /* Granted pixel format. */ tv_pixfmt pixfmt; req_flags flags; } req_format; static pthread_rwlock_t fmt_rwlock; /* List of requested capture formats. */ static req_format * formats; static guint n_formats; zf_fifo capture_fifo; static GtkWidget * dest_window; /* Called when a full capture buffer goes back to the empty queue. Note this may be executed by a different thread and the fifo is locked. */ static void buffer_done (zf_fifo * f _unused_, zf_buffer * b) { producer_buffer *pb = PARENT (b, producer_buffer, frame.b); if (pb->src_buffer) { if (0) fprintf (stderr, "/%p\n", pb->src_buffer); /* Don't requeue after capturing stopped, the pointers are no longer valid (and tveng25.c complains - triumph of paranoia). */ if (CAPTURE_MODE_READ == tv_get_capture_mode (zapping->info)) tv_queue_capture_buffer (zapping->info, pb->src_buffer); pb->src_buffer = NULL; } } static void free_bundle (zf_buffer * b) { producer_buffer *pb = PARENT (b, producer_buffer, frame.b); guint i; for (i = 0; i < G_N_ELEMENTS (pb->images); ++i) if (pb->images[i]) zimage_unref (pb->images[i]); CLEAR (*b); g_free (b); } /* Note fmt_rwlock must be wlocked. */ static void flush_buffers (tveng_device_info * info) { node *n; if (tv_get_caps (info)->flags & TVENG_CAPS_QUEUE) { for (n = capture_fifo.buffers.head; n->succ; n = n->succ) { producer_buffer *pb; pb = PARENT (n, producer_buffer, frame.b.added); if (pb->src_buffer) { pb->src_buffer = NULL; } } } } /* returns: -1 error, 0 timeout, 1 ok */ static int fill_bundle_tveng (producer_buffer * pb, tveng_device_info * info, guint time) { struct timeval timeout; int r; timeout.tv_sec = 0; timeout.tv_usec = time * 1000; if (tv_get_caps (info)->flags & TVENG_CAPS_QUEUE) { if (pb->src_buffer) { tv_queue_capture_buffer (zapping->info, pb->src_buffer); pb->src_buffer = NULL; } pb->converted = 0; r = tv_dequeue_capture_buffer_with_timeout (info, &pb->src_buffer, &timeout); if (r <= 0) return r; pb->frame.timestamp = pb->src_buffer->sample_time.tv_sec + pb->src_buffer->sample_time.tv_usec * (1 / 1e6); if (pb->src_image) { pb->frame.b.data = pb->src_buffer->data; pb->frame.b.used = pb->src_buffer->size; pb->frame.b.time = pb->frame.timestamp; } else { /* Discard. */ tv_queue_capture_buffer (zapping->info, pb->src_buffer); pb->src_buffer = NULL; pb->frame.b.data = NULL; pb->frame.b.used = 1; } } else { if (pb->src_image) { tv_capture_buffer buffer; buffer.data = pb->src_image->img; buffer.size = 0; /* XXX */ buffer.format = &pb->src_image->fmt; r = tv_read_frame (info, &buffer, &timeout); if (r <= 0) return r; pb->frame.timestamp = (buffer.sample_time.tv_sec + buffer.sample_time.tv_usec * (1 / 1e6)); if (pb->frame.timestamp > 0) { pb->frame.b.data = pb->src_image->img; pb->frame.b.used = pb->src_image->fmt.size; pb->frame.b.time = pb->frame.timestamp; } else { pb->frame.b.data = NULL; pb->frame.b.used = 1; } pb->converted = TV_PIXFMT_SET (pb->src_image->fmt.pixel_format->pixfmt); } else { /* Read & discard. */ r = tv_read_frame (info, NULL, &timeout); if (r <= 0) return r; pb->frame.timestamp = 0; pb->frame.b.data = NULL; pb->frame.b.used = 1; pb->converted = 0; } } return 1; } /* Check whether the given buffer can hold the current request. */ static gboolean compatible (producer_buffer * pb, tveng_device_info * info) { const tv_image_format *fmt; guint i; guint j; for (i = 0; i < G_N_ELEMENTS (pb->images); ++i) if (pb->images[i]) break; if (i >= G_N_ELEMENTS (pb->images)) return FALSE; /* First check whether the size is right. */ fmt = tv_cur_capture_format (info); for (i = 0; i < G_N_ELEMENTS (pb->images); ++i) if (pb->images[i]) if (fmt->width != pb->images[i]->fmt.width || fmt->height != pb->images[i]->fmt.height) return FALSE; /* Size is ok, check pixformat. */ for (i = 0; i < G_N_ELEMENTS (pb->images); ++i) if (pb->images[i]) { tv_pixfmt pixfmt; pixfmt = pb->images[i]->fmt.pixel_format->pixfmt; for (j = 0; j < n_formats; ++j) if (pixfmt == formats[j].pixfmt) break; if (j >= n_formats) return FALSE; } return TRUE; } static void rebuild_buffer (producer_buffer * pb, tveng_device_info * info) { const tv_image_format *fmt; guint i; fmt = tv_cur_capture_format (info); if (!fmt || !fmt->pixel_format) return; pb->src_image = NULL; for (i = 1; i < G_N_ELEMENTS (pb->images); ++i) { guint j; for (j = 0; j < n_formats; ++j) if (formats[j].pixfmt == (tv_pixfmt) i) break; if (j >= n_formats) { if (pb->images[i]) { /* This pixfmt is no longer needed. */ zimage_unref (pb->images[i]); pb->images[i] = NULL; } } else { if (pb->images[i]) { if (pb->images[i]->fmt.width == fmt->width && pb->images[i]->fmt.height == fmt->height) goto done; /* Has right pixfmt but wrong size. */ zimage_unref (pb->images[i]); pb->images[i] = NULL; } pb->images[i] = zimage_new ((tv_pixfmt) i, fmt->width, fmt->height); /* At least the memory backend should "display" this. */ g_assert (NULL != pb->images[i]); done: if (0) fprintf (stderr, "rebuilt %p %s, capture %s\n", pb, tv_pixfmt_name ((tv_pixfmt) i), fmt->pixel_format->name); if (fmt->pixel_format->pixfmt == (tv_pixfmt) i) pb->src_image = pb->images[i]; } } /* Possible if none of the capture formats supported by the driver are directly displayable or have been requested for other purposes. */ if (NULL == pb->src_image) { i = (guint) fmt->pixel_format->pixfmt; pb->images[i] = zimage_new ((tv_pixfmt) i, fmt->width, fmt->height); g_assert (NULL != pb->images[i]); pb->src_image = pb->images[i]; } pb->tag = request_id; /* Done */ } static void pass_frame_to_plugins (producer_buffer * pb) { GList *p; for (p = plugin_list; p != NULL; p = p->next) { struct plugin_info *pi; pi = (struct plugin_info *) p->data; plugin_read_frame (&pb->frame, pi); } } /* Capture source. */ typedef struct { GSource source; GPollFD poll_fd; tveng_device_info * info; zf_producer prod; } capture_source; static GSource * source; static gboolean field2; static gdouble filter_time; static gdouble f2time; static gdouble field_balance = .45; static producer_buffer display_buffers[2]; static display_filter_fn * display_filter; static gboolean capture_source_prepare (GSource * source _unused_, gint * timeout) { if (field2) { double now; now = zf_current_time (); if (now > f2time) { /* Too late. */ return TRUE; } else { *timeout = (f2time - now) * 1e3; } } else { *timeout = -1; /* infinite */ } return FALSE; /* go poll */ } static gboolean capture_source_check (GSource * source) { capture_source *cs = PARENT (source, capture_source, source); return !!(cs->poll_fd.revents & G_IO_IN); } static gboolean capture_source_dispatch (GSource * source, GSourceFunc callback _unused_, gpointer user_data _unused_) { capture_source *cs = PARENT (source, capture_source, source); struct timeval tv; struct timespec ts; zf_buffer *b2; producer_buffer *pb; double start; if (field2) { video_blit_frame (&display_buffers[1].frame); field2 = FALSE; return TRUE; } gettimeofday (&tv, /* tz */ NULL); ts.tv_sec = tv.tv_sec; ts.tv_nsec = (tv.tv_usec + 50000) * 1000; if (ts.tv_nsec >= 1000000000) { ts.tv_nsec -= 1000000000; ++ts.tv_sec; } b2 = zf_wait_empty_buffer_timeout (&cs->prod, &ts); if (!b2) { assert (tv_get_caps (cs->info)->flags & TVENG_CAPS_QUEUE); /* Clear cs->poll_fd.revents, we cannot dequeue any buffers now. */ tv_flush_capture_buffers (cs->info); return TRUE; } pb = PARENT (b2, producer_buffer, frame.b); if (pb->tag != request_id) { rebuild_buffer (pb, cs->info); } if (1 != fill_bundle_tveng (pb, cs->info, /* timeout */ 0)) { zf_unget_empty_buffer (&cs->prod, b2); return TRUE; } start = tv.tv_sec + tv.tv_usec * (1 / 1e6); if (0) fputc ("-+"[start >= filter_time], stderr); if (start >= filter_time) { double end; if (display_filter) { guint n_frames; n_frames = display_filter (display_buffers[0].src_image, display_buffers[1].src_image); if (n_frames > 0) { video_blit_frame (&display_buffers[0].frame); pass_frame_to_plugins (pb); end = zf_current_time (); if (n_frames > 1) { const tv_video_standard *s; field2 = TRUE; if ((s = tv_cur_video_standard (cs->info))) f2time = end + 1 / s->frame_rate * field_balance; else f2time = end + 1 / 25.0 * field_balance; } } else { pass_frame_to_plugins (pb); end = zf_current_time (); } } else { video_blit_frame (&pb->frame); pass_frame_to_plugins (pb); end = zf_current_time (); } /* The average time spent in this function must not exceed one frame period or unprocessed frames accumulate and the main context calls us over and over again while the GUI starves to death. */ filter_time = end + end - start - 1/25.0 * .7; } zf_send_full_buffer (&cs->prod, b2); return TRUE; } static GSourceFuncs capture_source_funcs = { capture_source_prepare, capture_source_check, capture_source_dispatch, /* finalize */ NULL, /* closure_callback */ NULL, /* closure_marshal */ NULL, }; /* Capture thread / idle handler. */ static pthread_t capture_thread_id; static volatile gboolean capture_quit; static volatile gboolean capture_quit_ack; static void * capture_thread (void * data) { tveng_device_info *info = (tveng_device_info *) data; zf_producer prod; D(); zf_add_producer (&capture_fifo, &prod); while (!capture_quit) { producer_buffer *p = (producer_buffer *) zf_wait_empty_buffer (&prod); /* check whether this buffer needs rebuilding. We don't do it here but defer it to the main thread, since rebuilding buffers typically requires X calls, and those don't work across multiple threads (actually they do, but relaying on that is just asking for trouble, it's too complex to get right). Just seeing that the buffer is old doesn't mean that it's unusable, if compatible is TRUE then we fill it normally. */ /* No size change now. */ _pthread_rwlock_rdlock (&fmt_rwlock); { retry: if (capture_quit) { D(); _pthread_rwlock_unlock (&fmt_rwlock); zf_unget_empty_buffer (&prod, &p->frame.b); break; } #warning remove this, too much noise D(); if (p->tag != request_id && !compatible (p, info)) { /* schedule for rebuilding in the main thread */ p->frame.b.used = 1; /* note used == 0 indicates eof */ zf_send_full_buffer (&prod, &p->frame.b); _pthread_rwlock_unlock (&fmt_rwlock); continue; } /* We cannot handle timeouts or errors. Note timeouts are frequent when capturing an empty */ if (1 != fill_bundle_tveng(p, info, 50)) { /* Avoid busy loop. FIXME there must be a better way. */ _pthread_rwlock_unlock (&fmt_rwlock); D(); usleep (10000); _pthread_rwlock_rdlock (&fmt_rwlock); goto retry; } } _pthread_rwlock_unlock (&fmt_rwlock); zf_send_full_buffer(&prod, &p->frame.b); } D(); zf_rem_producer(&prod); capture_quit_ack = TRUE; return NULL; } /* * This is an special consumer. It could have been splitted into these * three different consumers, each one with a very specific job: * a) Rebuild: * The producers and the main (GTK) loop are in different * threads. Producers defer the job of rebuilding the bundles to * this consumer. * b) Display: * The consumer that blits the data into the tvscreen. * c) Plugins: * Passes the data to the serial_read plugins. */ static zf_consumer idle_consumer; static guint idle_id; static gint idle_handler (gpointer data) { tveng_device_info *info = (tveng_device_info *) data; zf_buffer *b; struct timespec t; struct timeval now; producer_buffer *pb; gettimeofday (&now, NULL); t.tv_sec = now.tv_sec; t.tv_nsec = (now.tv_usec + 50000)* 1000; if (t.tv_nsec >= 1e9) { t.tv_nsec -= 1e9; t.tv_sec ++; } b = zf_wait_full_buffer_timeout (&idle_consumer, &t); if (!b) return TRUE; /* keep calling me */ pb = (producer_buffer*)b; if (pb->tag == request_id) { video_blit_frame (&pb->frame); pass_frame_to_plugins (pb); } else { rebuild_buffer (pb, info); } zf_send_empty_buffer (&idle_consumer, b); return TRUE; /* keep calling me */ } zimage * retrieve_frame (capture_frame * frame, tv_pixfmt pixfmt, gboolean copy) { producer_buffer *pb = PARENT (frame, producer_buffer, frame); void *dst; const void *src; const tv_image_format *dst_format; const tv_image_format *src_format; guint i; if (0) fprintf (stderr, "%s: %p %s\n", __FUNCTION__, frame, tv_pixfmt_name (pixfmt)); i = (guint) pixfmt; assert (i < G_N_ELEMENTS (pb->images)); if (NULL == pb->images[i]) return NULL; assert (pb->images[i]->fmt.pixel_format->pixfmt == pixfmt); if (pb->converted & TV_PIXFMT_SET (pixfmt)) return pb->images[i]; if (1 && !copy && pb->src_buffer && pb->src_buffer->format->pixel_format->pixfmt == pixfmt) { /* Just return a pointer to src_buffer. */ pb->src_direct = *pb->images[i]; pb->src_direct.img = pb->src_buffer->data; return &pb->src_direct; } if (pb->src_buffer) { /* Convert from driver buffer. */ src = pb->src_buffer->data; src_format = pb->src_buffer->format; } else { /* Convert from first copy in pb->images[]. */ src = pb->src_image->img; src_format = &pb->src_image->fmt; } dst = pb->images[i]->img; dst_format = &pb->images[i]->fmt; assert (src != dst); if (!csconvert (dst, dst_format, src, src_format)) return NULL; pb->converted |= TV_PIXFMT_SET (pixfmt); return pb->images[i]; } static void on_capture_canvas_allocate (GtkWidget *widget _unused_, GtkAllocation *allocation, tveng_device_info *info) { /* Suggest widget size as capture size. */ /* XXX error? */ request_capture_format (info, allocation->width, allocation->height, TV_PIXFMT_SET_EMPTY, /* flags */ 0); } gboolean remove_display_filter (display_filter_fn * filter) { guint i; if (display_filter != filter) return FALSE; display_filter = NULL; for (i = 0; i < N_ELEMENTS (display_buffers); ++i) { producer_buffer *pb = &display_buffers[i]; guint j; for (j = 0; j < G_N_ELEMENTS (pb->images); ++j) if (pb->images[j]) { zimage_unref (pb->images[j]); pb->images[j] = NULL; } pb->src_image = NULL; } return TRUE; } gboolean add_display_filter (display_filter_fn * filter, tv_pixfmt pixfmt, guint width, guint height) { guint i; g_assert (pixfmt < TV_MAX_PIXFMTS); if (display_filter) return FALSE; display_filter = filter; for (i = 0; i < N_ELEMENTS (display_buffers); ++i) { producer_buffer *pb = &display_buffers[i]; CLEAR (*pb); pb->images[pixfmt] = zimage_new (pixfmt, width, height); g_assert (NULL != pb->images[pixfmt]); pb->converted = TV_PIXFMT_SET (pixfmt); pb->src_image = pb->images[pixfmt]; tv_clear_image (pb->src_image->img, &pb->src_image->fmt); } return TRUE; } gboolean capture_stop (void) { GList *p; zf_buffer *b; guint i; D(); /* Don't stop when recording. */ for (i = 0; i < n_formats; ++i) if (formats[i].flags & REQ_CONTINUOUS) { tv_error_msg (zapping->info, _("Cannot stop capturing while recording.")); return FALSE; } tv_enable_capturing (zapping->info, FALSE); /* XXX */ g_signal_handlers_disconnect_by_func (G_OBJECT (dest_window), GTK_SIGNAL_FUNC (on_capture_canvas_allocate), zapping->info); dest_window = NULL; /* First tell all well-behaved consumers to stop. */ for (p = g_list_first (plugin_list); p; p = p->next) plugin_capture_stop ((struct plugin_info *) p->data); if (source) { capture_source *cs; cs = PARENT (source, capture_source, source); zf_rem_producer (&cs->prod); g_source_destroy (source); g_source_unref (source); source = NULL; } else { /* Stop our marvellous consumer */ if (NO_SOURCE_ID != idle_id) g_source_remove (idle_id); idle_id = NO_SOURCE_ID; /* Let the capture thread go to a better place. */ capture_quit = TRUE; /* empty full queue and remove timeout consumer. */ while ((b = zf_recv_full_buffer (&idle_consumer))) zf_send_empty_buffer (&idle_consumer, b); zf_rem_consumer (&idle_consumer); z_join_thread_with_timeout ("videocap", capture_thread_id, &capture_quit, &capture_quit_ack, /* timeout */ 15); } g_free (formats); formats = NULL; n_formats = 0; zf_destroy_fifo (&capture_fifo); video_uninit (); D(); return TRUE; } gboolean capture_start (tveng_device_info * info, GtkWidget * window) { GList *p; gboolean use_queue; unsigned int n_buffers; unsigned int i; D(); use_queue = !!(tv_get_caps (info)->flags & TVENG_CAPS_QUEUE); for (i = 0; i < n_formats; ++i) if (formats[i].flags & REQ_CONTINUOUS) { /* Recording doesn't work with a queue, see plugins/mpeg/mpeg.c for details. */ use_queue = FALSE; break; } if (use_queue) { if (-1 == tv_set_num_capture_buffers (info, N_BUNDLES)) goto failure; if (-1 == tv_get_num_capture_buffers (info, &n_buffers)) goto failure; /* zapping-misc 2005-04-24 preliminary fix. XXX check for number of buffers actually needed by the deinterlace plugin. */ if (n_buffers < 4) use_queue = FALSE; } else { n_buffers = N_BUNDLES; } if (!tv_enable_capturing (info, TRUE)) goto failure; /* XXX */ dest_window = window; zf_init_buffered_fifo (&capture_fifo, "zapping-capture", 0, 0); /* Immediately requeue capture buffers when all consumers are done. */ capture_fifo.buffer_done = buffer_done; for (i = 0; i < n_buffers; ++i) { producer_buffer *pb; pb = g_malloc0 (sizeof (*pb)); pb->frame.b.destroy = free_bundle; zf_add_buffer (&capture_fifo, &pb->frame.b); } if (use_queue) { capture_source *cs; /* Attn: source_funcs must be static. */ source = g_source_new (&capture_source_funcs, sizeof (*cs)); cs = PARENT (source, capture_source, source); cs->poll_fd.fd = tv_get_fd (info); cs->poll_fd.events = G_IO_IN; cs->poll_fd.revents = 0; cs->info = info; zf_add_producer (&capture_fifo, &cs->prod); g_source_add_poll (source, &cs->poll_fd); g_source_attach (source, /* context: default */ NULL); /* Needs higher priority than VBI or video stumbles. */ g_source_set_priority (source, -10); filter_time = 0.0; } else { gint r; zf_add_consumer (&capture_fifo, &idle_consumer); capture_quit = FALSE; capture_quit_ack = FALSE; r = pthread_create (&capture_thread_id, NULL, capture_thread, zapping->info); g_assert (0 == r); idle_id = g_idle_add ((GSourceFunc) idle_handler, info); } /* XXX */ g_signal_connect (G_OBJECT (window), "size-allocate", GTK_SIGNAL_FUNC (on_capture_canvas_allocate), zapping->info); for (p = g_list_first (plugin_list); p; p = p->next) plugin_capture_start ((struct plugin_info *) p->data); video_init (window, window->style->black_gc); /* Trigger initial on_capture_canvas_allocate call. */ gtk_widget_queue_resize (window); D(); return TRUE; failure: /* Unmap buffers early. Error ignored. */ tv_set_num_capture_buffers (info, 0); ShowBox (_("Cannot start capturing: %s"), GTK_MESSAGE_ERROR, tv_get_errstr (info)); return FALSE; } static tv_pixfmt convertible_to_pixfmt_set (tv_pixfmt_set dst_pixfmt_set, tv_pixfmt src_pixfmt) { tv_pixfmt dst_pixfmt; if (dst_pixfmt_set & TV_PIXFMT_SET (src_pixfmt)) return src_pixfmt; for (dst_pixfmt = 0; dst_pixfmt < TV_MAX_PIXFMTS; ++dst_pixfmt) { if (!(dst_pixfmt_set & TV_PIXFMT_SET (dst_pixfmt))) continue; if (-1 != lookup_csconvert (src_pixfmt, dst_pixfmt)) return dst_pixfmt; } return TV_PIXFMT_NONE; } static tv_pixfmt convertible_to_format (req_format * format, tv_pixfmt src_pixfmt) { if (format->flags & REQ_PIXFMT) { /* We're stuck with format->pixfmt. */ if (format->pixfmt == src_pixfmt) return format->pixfmt; if (-1 != lookup_csconvert (src_pixfmt, format->pixfmt)) return format->pixfmt; } else { return convertible_to_pixfmt_set (format->pixfmt_set, src_pixfmt); } return TV_PIXFMT_NONE; } /* This searches for a capture pixfmt which can be converted to all requested pixfmts. If more than one qualifies, we pick that which needs the fewest conversions. FIXME this is too simple. See TODO. */ static gboolean find_capture_pixfmt (tveng_device_info * info, tv_pixfmt * capture_pixfmt, tv_pixfmt * target_pixfmt, tv_pixfmt_set pixfmt_set) { tv_pixfmt_set supported_pixfmts; tv_pixfmt src_pixfmt; guint min_conversions; supported_pixfmts = tv_supported_pixfmts (info); if (TV_PIXFMT_SET_EMPTY == supported_pixfmts) return FALSE; *capture_pixfmt = TV_PIXFMT_NONE; *target_pixfmt = TV_PIXFMT_NONE; min_conversions = 999; for (src_pixfmt = 0; src_pixfmt < TV_MAX_PIXFMTS; ++src_pixfmt) { tv_pixfmt dst_pixfmt; guint n_conversions; guint i; /* What if we would capture using src_pixfmt? */ if (!(supported_pixfmts & TV_PIXFMT_SET (src_pixfmt))) continue; n_conversions = 0; dst_pixfmt = convertible_to_pixfmt_set (pixfmt_set, src_pixfmt); if (TV_PIXFMT_NONE == dst_pixfmt) { /* Cannot convert to any of the requested pixfmts. */ continue; } else if (src_pixfmt != dst_pixfmt) { n_conversions = 1; } for (i = 0; i < n_formats; ++i) { tv_pixfmt dst_pixfmt_n; dst_pixfmt_n = convertible_to_format (&formats[i], src_pixfmt); if (TV_PIXFMT_NONE == dst_pixfmt_n) { n_conversions = 999; break; } else if (src_pixfmt != dst_pixfmt_n) { ++n_conversions; } } if (n_conversions < min_conversions) { *capture_pixfmt = src_pixfmt; *target_pixfmt = dst_pixfmt; min_conversions = n_conversions; } } return (min_conversions < 999); } static const tv_image_format * change_capture_format (tveng_device_info * info, guint width, guint height, tv_pixfmt pixfmt, req_flags flags) { const tv_image_format *fmt; tv_image_format new_format; tv_image_format old_format; capture_mode old_mode; fmt = tv_cur_capture_format (info); if (!fmt || !fmt->pixel_format) { return NULL; } if (0 == (width | height)) flags &= ~REQ_SIZE; if (0 == width) width = fmt->width; if (0 == height) height = fmt->height; if (TV_PIXFMT_NONE == pixfmt) pixfmt = fmt->pixel_format->pixfmt; if (fmt->pixel_format->pixfmt == pixfmt && fmt->width == width && fmt->height == height) return fmt; if (!tv_image_format_init (&new_format, width, height, /* bytes_per_line: minimum */ 0, pixfmt, TV_COLSPC_UNKNOWN)) { /* Huh? */ return NULL; } old_format = *fmt; printv ("Setting capture format %s %ux%u flags=%x\n", new_format.pixel_format->name, new_format.width, new_format.height, flags); old_mode = tv_get_capture_mode (info); if (CAPTURE_MODE_READ == old_mode) tv_enable_capturing (zapping->info, FALSE); flush_buffers (info); /* XXX TRY_FMT would be nice. */ fmt = tv_set_capture_format (info, &new_format); /* Size may change due to driver limits. */ if ((flags & REQ_SIZE) && fmt->width != width && fmt->height != height) { fmt = NULL; /* failed */ } else if (DISPLAY_MODE_FULLSCREEN == zapping->display_mode) { guint awidth = fmt->height * 4 / 3; /* In case XvImage is unavailable to scale the images to screen size. XXX this is ugly. */ if (fmt->width != awidth) { new_format.width = awidth; fmt = tv_set_capture_format (info, &new_format); } } if (!fmt) { fmt = tv_set_capture_format (info, &old_format); if (!fmt) { /* XXX Cannot restore old format. What now? */ /* XXX Who restores capture mode? */ return NULL; } fmt = NULL; /* failed */ } /* XXX caller doesn't properly handle a stop? */ if (CAPTURE_MODE_READ == old_mode) { /* XXX error? */ tv_enable_capturing (info, TRUE); } return fmt; } /* Releases the given requests, call this when you won't longer need the format. The id returned by request_capture_format must be passed. */ void release_capture_format (gint id) { guint i; _pthread_rwlock_wrlock (&fmt_rwlock); { for (i = 0; i < n_formats; ++i) if (formats[i].id == id) break; if (i >= n_formats) { _pthread_rwlock_unlock (&fmt_rwlock); return; } --n_formats; if (i != n_formats) memmove (&formats[i], &formats[i + 1], (n_formats - i) * sizeof (formats[0])); } /* XXX maybe we can save a conversion now? But I don't really want to interrupt capturing without good reason. */ /* Flag that buffers may need rebuilding. */ ++request_id; _pthread_rwlock_unlock (&fmt_rwlock); } gboolean get_capture_format (gint id, guint * width, guint * height, tv_pixfmt * pixfmt) { guint i; for (i = 0; i < n_formats; ++i) if (formats[i].id == id) break; if (i >= n_formats) return FALSE; if (width) *width = formats[i].width; if (height) *height = formats[i].height; if (pixfmt) *pixfmt = formats[i].pixfmt; return TRUE; } /* Basically this is a tv_set_capture_format() wrapper. If modules need different image sizes and pixel formats it will find a good capture format and determine if conversion will be possible. width and height - the desired image size, can be zero to get the current capture size. pixfmt_set - set of acceptable pixel formats. flags - REQ_SIZE if the image size must not change until release_capture_format(). REQ_PIXFMT ditto for the pixel format. REQ_CONTINUOUS if capturing shall not be interrupted. Returns a capture_format ID on success, -1 otherwise. */ gint request_capture_format (tveng_device_info * info, guint width, guint height, tv_pixfmt_set pixfmt_set, req_flags flags) { static gint format_id = 0; tv_pixfmt capture_pixfmt; tv_pixfmt target_pixfmt; guint i; gint id; g_assert (NULL != info); id = -1; if (debug_msg) { tv_pixfmt pixfmt; int c = ' '; printv ("Format"); for (pixfmt = 0; pixfmt < TV_MAX_PIXFMTS; ++pixfmt) if (pixfmt_set & TV_PIXFMT_SET (pixfmt)) { printv ("%c%s", c, tv_pixfmt_name (pixfmt)); c = '|'; } printv (" %ux%u%s%s requested\n", width, height, (flags & REQ_SIZE) ? " (size locked)" : "", (flags & REQ_CONTINUOUS) ? " (continuous)" : ""); } _pthread_rwlock_wrlock (&fmt_rwlock); { if (0 == (width | height)) { flags &= ~REQ_SIZE; } else { /* Check if the requested size is available. */ for (i = 0; i < n_formats; ++i) { if ((formats[i].flags & REQ_SIZE) && (formats[i].width != width || formats[i].height != height)) { if (flags & REQ_SIZE) { printv ("Format rejected, size locked at %ux%u\n", formats[i].width, formats[i].height); goto failure; } /* Keep current size. */ width = 0; height = 0; break; } } } capture_pixfmt = TV_PIXFMT_NONE; target_pixfmt = TV_PIXFMT_NONE; if (TV_PIXFMT_SET_EMPTY != pixfmt_set) { /* Check if we already convert to one of the requested pixfmts. */ for (i = 0; i < n_formats; ++i) if (pixfmt_set & TV_PIXFMT_SET (formats[i].pixfmt)) { /* Keep the current capture pixfmt. */ target_pixfmt = formats[i].pixfmt; break; } /* Or find a capture pixfmt that can be converted to all requested pixfmts. */ if (i >= n_formats) { if (!find_capture_pixfmt (info, &capture_pixfmt, &target_pixfmt, pixfmt_set)) { printv ("Format rejected, not convertible\n"); goto failure; } } } if (TV_PIXFMT_NONE != capture_pixfmt || 0 != (width | height)) { const tv_image_format *fmt; fmt = change_capture_format (info, width, height, capture_pixfmt, flags); if (!fmt) { printv ("Format rejected, cannot capture %s %ux%u\n", tv_pixfmt_name (capture_pixfmt), width, height); /* XXX maybe another pixfmt works? */ goto failure; } /* Another target pixfmt may be more efficient now. */ if (TV_PIXFMT_NONE != capture_pixfmt) for (i = 0; i < n_formats; ++i) if (!(formats[i].flags & REQ_PIXFMT)) formats[i].pixfmt = convertible_to_pixfmt_set (formats[i].pixfmt_set, capture_pixfmt); } if (TV_PIXFMT_SET_EMPTY != pixfmt_set) { /* Add new format. */ formats = g_realloc (formats, sizeof (*formats) * (n_formats + 1)); id = ++format_id; formats[n_formats].id = id; formats[n_formats].width = width; formats[n_formats].height = height; formats[n_formats].pixfmt_set = pixfmt_set; formats[n_formats].pixfmt = target_pixfmt; formats[n_formats].flags = flags; ++n_formats; } /* Flag that buffers may need rebuilding. */ ++request_id; } _pthread_rwlock_unlock (&fmt_rwlock); printv ("Format accepted, converting %s to %s %ux%u\n", tv_pixfmt_name (capture_pixfmt), tv_pixfmt_name (target_pixfmt), width, height); return id; failure: _pthread_rwlock_unlock (&fmt_rwlock); return -1; } void shutdown_capture (void) { pthread_rwlock_destroy (&fmt_rwlock); } void startup_capture (void) { pthread_rwlock_init (&fmt_rwlock, NULL); z_gconf_auto_update_float (&field_balance, "/apps/zapping/plugins/deinterlace/field_balance"); } ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������zapping-0.10cvs6/src/capture.h���������������������������������������������������������������������� 644 � 764 � 144 � 4056 10207664656 11431� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Zapping (TV viewer for the Gnome Desktop) * Copyright (C) 2000-2001 Iaki Garca Etxebarria * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifndef __CAPTURE_H__ #define __CAPTURE_H__ #include "common/fifo.h" #include "tveng.h" #include "x11stuff.h" #include "zimage.h" typedef enum { /* Must not change image size. */ REQ_SIZE = (1 << 0), /* Must not change pixel format. */ REQ_PIXFMT = (1 << 1), /* Must not interrupt capturing. */ REQ_CONTINUOUS = (1 << 2), } req_flags; typedef guint display_filter_fn (zimage * dst0, zimage * dst1); extern zf_fifo capture_fifo; extern zimage * retrieve_frame (capture_frame * frame, tv_pixfmt pixfmt, gboolean copy); extern gboolean remove_display_filter (display_filter_fn * filter); extern gboolean add_display_filter (display_filter_fn * filter, tv_pixfmt fmt, guint width, guint height); extern gboolean capture_stop (void); extern gboolean capture_start (tveng_device_info * info, GtkWidget * window); extern void release_capture_format (gint id); extern gboolean get_capture_format (gint id, guint * width, guint * height, tv_pixfmt * pixfmt); extern gint request_capture_format (tveng_device_info * info, guint width, guint height, tv_pixfmt_set pixfmt_set, req_flags flags); extern void shutdown_capture (void); extern void startup_capture (void); #endif ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������zapping-0.10cvs6/src/zimage.c����������������������������������������������������������������������� 644 � 764 � 144 � 11242 10360121113 11220� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Zapping (TV viewer for the Gnome Desktop) * Copyright (C) 2002 Iaki Garca Etxebarria * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /** * Video output. */ #ifdef HAVE_CONFIG_H # include "config.h" #endif #include <gtk/gtk.h> #include "zimage.h" #include "globals.h" #include "capture.h" #include "zmisc.h" static struct { video_backend backend; tv_pixfmt pixfmt; } * backends; static guint n_backends; /* Bookkeeping stuff */ typedef struct { zimage image; int refcount; /* Image refcount */ int backend; /* Backend that created this image */ } private_zimage; static GtkWidget *dest_window = NULL; gint capture_format_id = -1; gboolean register_video_backend (tv_pixfmt pixfmt, video_backend *backend) { /* We always let backends be registered, so zimage_new always succeeds for all pixformats (video_mem doesn't fail). */ backends = g_realloc (backends, (n_backends+1)*sizeof(*backends)); backends[n_backends].pixfmt = pixfmt; memcpy (&backends[n_backends].backend, backend, sizeof(*backend)); n_backends ++; return TRUE; } zimage *zimage_create_object (void) { return (g_malloc0 (sizeof (private_zimage))); } zimage *zimage_new (tv_pixfmt pixfmt, guint w, guint h) { guint i; for (i=0; i<n_backends; i++) { if (backends[i].pixfmt == pixfmt) { zimage *zimage; zimage = backends[i].backend.image_new (pixfmt, w, h); if (zimage) { private_zimage *pz = (private_zimage*)zimage; printv ("zimage_new %p using video backend %s\n", zimage, backends[i].backend.name); pz->refcount = 1; pz->backend = i; return zimage; } } } /* The video_mem backend should always succeed. */ g_assert_not_reached (); return NULL; } void zimage_ref (zimage *image) { private_zimage *pz = (private_zimage*)image; pz->refcount ++; } void zimage_unref (zimage *image) { private_zimage *pz = (private_zimage*)image; if (! (-- pz->refcount)) { printv ("zimage_destroy %p\n", image); backends[pz->backend].backend.image_destroy (image); g_free (pz); } } void zimage_blit (zimage *image) { private_zimage *pz = (private_zimage*)image; g_assert (dest_window != NULL); if (backends[pz->backend].backend.image_put) backends[pz->backend].backend.image_put (image, (guint) dest_window->allocation.width, (guint) dest_window->allocation.height); } void video_init (GtkWidget * window, GdkGC * gc) { tv_pixfmt_set pixfmt_set; guint i; g_assert (window->window); dest_window = window; pixfmt_set = TV_PIXFMT_SET_EMPTY; for (i = 0; i < n_backends; ++i) { pixfmt_set |= backends[i].backend.supported_formats (); if (backends[i].backend.set_destination) backends[i].backend.set_destination (window->window, gc, zapping->info); } capture_format_id = request_capture_format (zapping->info, /* width: any */ 0, /* height: any */ 0, pixfmt_set, /* flags */ 0); } void video_uninit (void) { guint i; release_capture_format (capture_format_id); capture_format_id = -1; for (i = 0; i < n_backends; ++i) if (backends[i].backend.unset_destination) backends[i].backend.unset_destination (zapping->info); dest_window = NULL; } void video_blit_frame (capture_frame *frame) { guint i; zimage *img; for (i=0; i<n_backends; i++) { /* NOTE copy: we want the original zimage allocated by the backend. */ if ((img = retrieve_frame (frame, backends[i].pixfmt, /* copy */ TRUE))) { zimage_blit (img); return; } } } extern void add_backend_xv (void); extern void add_backend_x11 (void); extern void add_backend_gdkrgb (void); extern void add_backend_mem (void); void startup_zimage (void) { /* The order is important, fast backends should be added first */ add_backend_xv (); add_backend_x11 (); add_backend_gdkrgb (); add_backend_mem (); } void shutdown_zimage (void) { video_uninit (); g_free (backends); backends = NULL; n_backends = 0; } ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������zapping-0.10cvs6/src/zimage.h����������������������������������������������������������������������� 644 � 764 � 144 � 5501 10167767066 11242� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#ifndef __ZIMAGE_H__ #define __ZIMAGE_H__ #include <gtk/gtk.h> #include "tveng.h" #include "common/fifo.h" #include "csconvert.h" /* Startup/shutdown */ void startup_zimage (void); void shutdown_zimage (void); typedef struct _zimage_private zimage_private; typedef struct { tv_image_format fmt; void *img; // tveng_image_data data; /* Video backend dependant */ zimage_private *priv; } zimage; /* * The buffers in the capture fifo are these kind of objects. */ typedef struct { /* the parent struct */ zf_buffer b; /* time this frame was captured (same as b.time) */ double timestamp; } capture_frame; /** * Struct for video backends */ typedef struct { /* A descriptive name for the backend */ const char *name; /* Set blit destination. Grabbing, if necessary, should only happen when creating new images */ void (*set_destination)(GdkWindow *window, GdkGC *gc, tveng_device_info *info); /* Unsets a previously set blit destination */ void (*unset_destination)(tveng_device_info *info); /* Create a suitable image, will always be called with the port grabbed */ zimage* (*image_new)(tv_pixfmt pixfmt, guint width, guint height); /* Destroy any data associated with the image, do _not_ call g_free (image) */ void (*image_destroy)(zimage *image); /* Put the image in the drawable, do scaling as necessary. Width and height are the current dimensions of the destination, can be ignored if not appropiate. */ void (*image_put)(zimage *image, guint width, guint height); /* Return supported image formats. */ tv_pixfmt_set (*supported_formats)(void); } video_backend; /* Registers a zimage backend. Returns FALSE if already registered. */ gboolean register_video_backend (tv_pixfmt pixfmt, video_backend *backend); /* Creates a zimage with the given pixformat. The resulting image might not be blittable. NULL will be returned if the requested image cannot be allocated. The refcount of the resulting image will be 1. */ zimage *zimage_new (tv_pixfmt pixfmt, guint w, guint h); /* Increments the refcount of the image. */ void zimage_ref (zimage *image); /* Decrements the refcount of the given image. In case it reaches 0 it will be destroyed. */ void zimage_unref (zimage *image); /* Blits the image into the configured drawable for its video format. video_init must be called before calling this function, otherwise it won't work */ void zimage_blit (zimage *image); /* Sets the given widget as the blit destination */ void video_init (GtkWidget *widget, GdkGC *gc); /* Unsets any previously set destination window */ void video_uninit (void); /* Tries to blit some image contained in the frame */ void video_blit_frame (capture_frame* f); /* Creates a zimage object, only used by backends. */ zimage *zimage_create_object (void); #endif �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������zapping-0.10cvs6/src/mixer.c������������������������������������������������������������������������ 644 � 764 � 144 � 12224 10442152250 11100� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Zapping (TV viewer for the Gnome Desktop) * Soundcard mixer interface * * Copyright (C) 2002, 2003 Michael H. Schimek * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* $Id: mixer.c,v 1.17 2006/06/09 01:53:44 mschimek Exp $ */ /* * These functions encapsulate the OS and driver specific * soundcard mixer functions. */ #ifdef HAVE_CONFIG_H # include "config.h" #endif /* * Preliminary until the mixer becomes part of the * virtual tv device. */ #include <assert.h> #include "tveng_private.h" #include "mixer.h" #include "zconf.h" #include "globals.h" #include "audio.h" /* preliminary */ void shutdown_mixer(tveng_device_info *info) { if (mixer) { mixer_line = NULL; tveng_attach_mixer_line (info, NULL, NULL); tv_mixer_close (mixer); mixer = NULL; } } /* preliminary */ void startup_mixer(tveng_device_info *info) { const gchar *dev_name; shutdown_mixer(info); if (zconf_get_boolean (NULL, "/zapping/options/audio/force_mixer")) { if ((dev_name = zconf_get_string (NULL, "/zapping/options/audio/mixer_device"))) { /* FIXME report errors */ if ((mixer = tv_mixer_open ((io_debug_msg > 0) ? stderr : NULL, dev_name))) { tv_audio_line *line; guint hash; if (!mixer->inputs) { shutdown_mixer (info); return; } hash = zconf_get_int (NULL, "/zapping/options/audio/mixer_input"); mixer_line = mixer->inputs; for (line = mixer->inputs; line; line = line->_next) if (line->hash == hash) { mixer_line = line; break; } if (esd_output || ivtv_audio) tveng_attach_mixer_line (info, &audio_loopback_mixer, &audio_loopback_mixer_line); else tveng_attach_mixer_line (info, mixer, mixer_line); } } else { ShowBox (_("The soundcard mixer is not configured."), GTK_MESSAGE_WARNING); } } } /* * Mixer client interface */ /* XXX document me */ tv_bool tv_mixer_line_update (tv_audio_line * line) { assert (NULL != line); return ((tv_mixer *) line->_parent)->_interface->update_line (line); } tv_bool tv_mixer_line_get_volume (tv_audio_line * line, int * left, int * right) { assert (NULL != line); if (!((tv_mixer *) line->_parent)->_interface->update_line (line)) return FALSE; *left = line->volume[0]; *right = line->volume[1]; return TRUE; } tv_bool tv_mixer_line_set_volume (tv_audio_line * line, int left, int right) { assert (NULL != line); left = SATURATE (left, line->minimum, line->maximum); right = SATURATE (right, line->minimum, line->maximum); return ((tv_mixer *) line->_parent) ->_interface->set_volume (line, left, right); } tv_bool tv_mixer_line_get_mute (tv_audio_line * line, tv_bool * mute) { assert (NULL != line); if (!((tv_mixer *) line->_parent)->_interface->update_line (line)) return FALSE; *mute = line->muted; return TRUE; } extern tv_bool tv_mixer_line_set_mute (tv_audio_line * line, tv_bool mute) { assert (NULL != line); assert (NULL != line->_parent); assert (NULL != ((tv_mixer *) line->_parent)->_interface); assert (NULL != ((tv_mixer *) line->_parent)->_interface->set_mute); return ((tv_mixer *) line->_parent)->_interface->set_mute (line, !!mute); } tv_bool tv_mixer_line_record (tv_audio_line * line, tv_bool exclusive) { tv_audio_line *l; assert (NULL != line); assert (NULL != line->_parent); for (l = ((tv_mixer *) line->_parent)->inputs; l; l = l->_next) if (line == l) break; if (!l || !l->recordable) { fprintf (stderr, "%s: Invalid recording line requested\n", __FILE__); abort (); } return ((tv_mixer *) line->_parent)->_interface->set_rec_line (((tv_mixer *) line->_parent), line, !!exclusive); } tv_bool tv_mixer_update (tv_mixer * mixer) { assert (NULL != mixer); return mixer->_interface->update_mixer (mixer); } extern const tv_mixer_interface oss_mixer_interface; static const tv_mixer_interface * mixer_interfaces [] = { #ifdef HAVE_OSS &oss_mixer_interface, #endif NULL }; /* XXX document me */ tv_mixer * tv_mixer_open (FILE * log, const char * dev_name) { const tv_mixer_interface **mip; tv_mixer *m; if (!dev_name || !dev_name[0]) return NULL; for (mip = mixer_interfaces; *mip; mip++) if ((m = (*mip)->open (*mip, log, dev_name))) return m; return NULL; } tv_mixer * tv_mixer_scan (FILE * log) { const tv_mixer_interface **mip; tv_mixer *m; for (mip = mixer_interfaces; *mip; mip++) if ((m = (*mip)->scan (*mip, log))) return m; return NULL; } ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������zapping-0.10cvs6/src/mixer.h������������������������������������������������������������������������ 644 � 764 � 144 � 257 10224566260 11060� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#ifndef __MIXER_H__ #define __MIXER_H__ /* Startup/shutdown, as usual */ void startup_mixer(tveng_device_info *info); void shutdown_mixer(tveng_device_info *info); #endif �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������zapping-0.10cvs6/src/arts.c������������������������������������������������������������������������� 644 � 764 � 144 � 7307 10402712114 10710� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Zapping (TV viewer for the Gnome Desktop) * Copyright (C) 2000-2001 Iaki Garca Etxebarria * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifdef HAVE_CONFIG_H # include "config.h" #endif #if HAVE_ARTS /** aRts (KDE sound server) backend **/ #include <gnome.h> #include <math.h> #include <unistd.h> #include "audio.h" #define ZCONF_DOMAIN "/zapping/options/audio/" #include "zconf.h" #include "zmisc.h" /** artsc, aka "porting to arts for dummies" :-) **/ #include <artsc.h> typedef struct { arts_stream_t stream; int stereo; int sampling_rate; double time; double buffer_period_near; double buffer_period_far; } arts_handle; static gpointer _open (gboolean stereo, guint sampling_rate, enum audio_format format, gboolean write) { arts_handle *h; arts_stream_t stream; gint errcode; /* FIXME: Improve error reporting */ g_assert (!write); if (format != AUDIO_FORMAT_S16_LE) { g_warning("Requested audio format won't work"); return NULL; } if ((errcode = arts_init())) { /* FIXME: memleak? */ g_warning("arts_init: %s", arts_error_text(errcode)); return NULL; } stream = arts_record_stream ((int) sampling_rate, 16, (!!stereo)+1, "Zapping"); /* FIXME: can this really fail? */ if (!stream) { g_warning("Cannot open recording stream"); goto fail; } h = g_malloc0(sizeof(arts_handle)); h->stream = stream; h->stereo = !!stereo; h->sampling_rate = sampling_rate; h->time = 0.0; return h; fail: arts_free(); return NULL; } static void _close (gpointer handle) { arts_handle *h = handle; arts_close_stream(h->stream); arts_free(); g_free(handle); } static gboolean _read (gpointer handle, gpointer dest, guint num_bytes, double *timestamp) { arts_handle *h = handle; unsigned char *p; ssize_t r, n; struct timeval tv; double now; for (p = dest, n = num_bytes; n > 0;) { r = arts_read(h->stream, p, n); if (r < 0) { g_warning("ARTS: READ ERROR, quitting: %s", arts_error_text(r)); memset(p, 0, (unsigned int) n); break; } p += r; n -= r; } gettimeofday(&tv, NULL); now = tv.tv_sec + tv.tv_usec * (1 / 1e6); if (h->time > 0.0) { double dt = now - h->time; double ddt = h->buffer_period_far - dt; if (fabs(h->buffer_period_near) < h->buffer_period_far * 1.5) { h->buffer_period_near = (h->buffer_period_near - dt) * 0.8 + dt; h->buffer_period_far = ddt * 0.9999 + dt; *timestamp = h->time += h->buffer_period_far; } else { h->buffer_period_near = h->buffer_period_far; *timestamp = h->time = now; } } else { *timestamp = h->time = now; /* XXX assuming num_bytes won't change */ h->buffer_period_near = h->buffer_period_far = num_bytes / (double)(h->sampling_rate * 2 << h->stereo); } return TRUE; } const audio_backend_info arts_backend = { name: "KDE Sound Server (aRts)", open: _open, close: _close, read: _read, }; #endif /* HAVE_ARTS */ �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������zapping-0.10cvs6/src/i18n.c������������������������������������������������������������������������� 644 � 764 � 144 � 10373 10167772044 10553� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Zapping (TV viewer for the Gnome Desktop) * * Copyright (C) 2001 Iaki Garca Etxebarria * Copyright (C) 2003, 2004 Michael H. Schimek * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* $Id: i18n.c,v 1.4 2005/01/08 14:54:28 mschimek Exp $ */ /* Shouldn't we have a library for these kinds of functions? */ #include <string.h> #include <ctype.h> #include <locale.h> #include "i18n.h" static const struct { const char code[4]; const char * name; } country_table [] = { { "AL", "Albania" }, { "AT", "Austria" }, { "AU", "Australia" }, { "BA", "Bosnia and Herzegovina" }, { "BE", "Belgium" }, { "BG", "Bulgaria" }, { "BJ", "Benin" }, { "CA", "Canada" }, { "CH", "Switzerland" }, { "CN", "China" }, { "CZ", "Czech Republic" }, { "DE", "Germany" }, { "DK", "Denmark" }, { "ES", "Spain" }, { "FI", "Finland" }, { "FR", "France" }, { "GR", "Greece" }, { "HR", "Croatia" }, { "HU", "Hungary" }, { "ID", "Indonesia" }, { "IE", "Ireland" }, { "IN", "India" }, { "IS", "Iceland" }, { "IT", "Italy" }, { "JP", "Japan" }, { "KH", "Cambodia" }, { "MK", "Macedonia" }, { "MY", "Malaysia" }, { "NL", "Netherlands" }, { "NO", "Norway" }, { "NZ", "New Zealand" }, { "PK", "Pakistan" }, { "PL", "Poland" }, { "PT", "Portugal" }, { "RO", "Romania" }, { "RU", "Russia" }, { "SE", "Sweden" }, { "SG", "Singapore" }, { "SK", "Slovakia" }, { "TH", "Thailand" }, { "UK", "United Kingdom" }, { "US", "United States" }, { "YU", "Yugoslavia" }, { "ZA", "South Africa" }, { "", NULL } }; const char * iso3166_to_country_name (const char * code) { unsigned int i; if (code[0] == 0 || code[1] == 0) return NULL; for (i = 0; country_table[i].name; i++) if (country_table[i].code[0] == code[0] && country_table[i].code[1] == code[1]) return country_table[i].name; return NULL; } const char * country_name_to_iso3166 (const char * name) { unsigned int i; for (i = 0; country_table[i].name; i++) if (0 == strcmp (country_table[i].name, name)) return country_table[i].code; return NULL; } const char * locale_country (void) { char *s; unsigned int i; /* language[_territory][.codeset][@modifier] [+special][,[sponsor][_revision]] */ s = setlocale (LC_CTYPE, NULL); if (!s) return NULL; while (*s && isalnum (*s)) s++; if (*s++ != '_') return NULL; if (s[0] == 0 || s[1] == 0 || isalnum (s[2])) return NULL; for (i = 0; country_table[i].name; i++) if (country_table[i].code[0] == s[0] && country_table[i].code[1] == s[1]) return country_table[i].code; /* Other possible source: /etc/localtime -> /usr/share/zoneinfo/foo /usr/share/zoneinfo/zone.tab */ return NULL; } static const struct { const char code[4]; const char * name; } language_table [] = { { "ar", "Arabic" }, { "bg", "Bulgarian" }, { "cs", "Czech" }, { "de", "German" }, { "el", "Greek" }, { "en", "English" }, { "es", "Spanish" }, { "et", "Estonian" }, { "fi", "Finnish" }, { "fr", "French" }, { "sv", "Swedish" }, { "he", "Hebrew" }, { "hr", "Croatian" }, { "hu", "Hungarian" }, { "it", "Italian" }, { "lt", "Lithuanian" }, { "lv", "Lettish" }, { "pl", "Polish" }, { "pt", "Portuguese" }, { "ro", "Rumanian" }, { "ru", "Russian" }, { "sk", "Slovak" }, { "sl", "Slovenian" }, { "sr", "Serbian" }, { "tr", "Turkish" }, { "uk", "Ukranian" }, { "", NULL } }; const char * iso639_to_language_name (const char * code) { unsigned int i; if (code[0] == 0 || code[1] == 0) return NULL; for (i = 0; language_table[i].name; i++) if (language_table[i].code[0] == code[0] && language_table[i].code[1] == code[1]) return language_table[i].name; return NULL; } ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������zapping-0.10cvs6/src/i18n.h������������������������������������������������������������������������� 644 � 764 � 144 � 2253 10167772044 10536� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Zapping (TV viewer for the Gnome Desktop) * * Copyright (C) 2001 Iaki Garca Etxebarria * Copyright (C) 2003, 2004 Michael H. Schimek * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* $Id: i18n.h,v 1.4 2005/01/08 14:54:28 mschimek Exp $ */ #ifndef I18N_H #define I18N_H extern const char * iso3166_to_country_name (const char * code); extern const char * country_name_to_iso3166 (const char * name); extern const char * locale_country (void); extern const char * iso639_to_language_name (const char * code); #endif �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������zapping-0.10cvs6/src/zapping.c���������������������������������������������������������������������� 644 � 764 � 144 � 71243 10402712300 11424� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Zapping (TV viewer for the Gnome Desktop) * * Copyright (C) 2004 Michael H. Schimek * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* $Id: zapping.c,v 1.16 2006/03/06 01:47:44 mschimek Exp $ */ #include "site_def.h" #ifdef HAVE_CONFIG_H # include "config.h" #endif #include "audio.h" #include "interface.h" #include "v4linterface.h" #include "plugins.h" #include "properties-handler.h" #include "subtitle.h" #include "zconf.h" #include "zmisc.h" #include "zgconf.h" #include "zvideo.h" #include "zapping.h" #include "zvbi.h" #include "remote.h" static GObjectClass * parent_class; static void quit_action (GtkAction * action _unused_, Zapping * z) { on_python_command1 (GTK_WIDGET (z), "zapping.quit()"); } static void preferences_action (GtkAction * action _unused_, Zapping * z) { on_python_command1 (GTK_WIDGET (z), "zapping.properties()"); } static void plugins_action (GtkAction * action _unused_, Zapping * z) { on_python_command1 (GTK_WIDGET (z), "zapping.plugin_properties()"); } static void channel_editor_action (GtkAction * action _unused_, Zapping * z) { on_python_command1 (GTK_WIDGET (z), "zapping.channel_editor()"); } static void window_action (GtkAction * action _unused_, Zapping * z) { on_python_command1 (GTK_WIDGET (z), "zapping.switch_mode('window')"); } static void fullscreen_action (GtkAction * action _unused_, Zapping * z) { on_python_command1 (GTK_WIDGET (z), "zapping.switch_mode('fullscreen')"); } static void background_action (GtkAction * action _unused_, Zapping * z) { on_python_command1 (GTK_WIDGET (z), "zapping.switch_mode('background')"); } static void crash_action (GtkAction * action, Zapping * z) { /* Testing bug-buddy interaction. */ action = action; z = z; *((int *) 1) = 0; } static void assert_action (GtkAction * action, Zapping * z) { /* Testing bug-buddy interaction. */ action = action; z = z; assert (0); } #if 0 /* Ok that's nice, but how can we SET current? gtk_toggle_action active? */ static void display_mode_action (GtkRadioAction * action, GtkRadioAction * current _unused_, Zapping * z) { gint value; value = gtk_radio_action_get_current_value (action); switch ((display_mode) value) { case DISPLAY_MODE_WINDOW: on_python_command1 (GTK_WIDGET (z), "zapping.switch_mode('window')"); break; case DISPLAY_MODE_FULLSCREEN: on_python_command1 (GTK_WIDGET (z), "zapping.switch_mode('fullscreen')"); break; case DISPLAY_MODE_BACKGROUND: on_python_command1 (GTK_WIDGET (z), "zapping.switch_mode('background')"); break; default: break; } } #endif static void overlay_action (GtkAction * action _unused_, Zapping * z) { on_python_command1 (GTK_WIDGET (z), "zapping.switch_mode('preview')"); } static void capture_action (GtkAction * action _unused_, Zapping * z) { on_python_command1 (GTK_WIDGET (z), "zapping.switch_mode('capture')"); } static void teletext_action (GtkAction * action _unused_, Zapping * z) { on_python_command1 (GTK_WIDGET (z), "zapping.switch_mode('teletext')"); } static void restore_video_action (GtkAction * action _unused_, Zapping * z) { on_python_command1 (GTK_WIDGET (z), "zapping.toggle_mode()"); } static void new_teletext_action (GtkAction * action _unused_, Zapping * z) { on_python_command1 (GTK_WIDGET (z), "zapping.ttx_open_new()"); } static void mute_action (GtkToggleAction * toggle_action, Zapping * z _unused_) { gboolean mute; mute = gtk_toggle_action_get_active (toggle_action); set_mute (mute, TRUE, TRUE); } static void subtitles_action (GtkToggleAction * toggle_action, Zapping * z _unused_) { python_command_printf (NULL, "zapping.closed_caption(%u)", gtk_toggle_action_get_active (toggle_action)); } static void zconf_hook_subtitles (const gchar * key _unused_, gpointer new_value_ptr, gpointer user_data) { gboolean active = * (gboolean *) new_value_ptr; GtkToggleAction *toggle_action = user_data; if (active != gtk_toggle_action_get_active (toggle_action)) gtk_toggle_action_set_active (toggle_action, active); } static void view_menu (Zapping * z, gboolean view) { BonoboDockItem *dock_item; if (view && z->decorated) { /* Adding a hidden menu is impossible, we have to add when the menu becomes first visible. */ if (!z->menubar_added) { z->menubar_added = TRUE; gnome_app_set_menus (&z->app, z->menubar); } dock_item = gnome_app_get_dock_item_by_name (&z->app, GNOME_APP_MENUBAR_NAME); gtk_widget_show (GTK_WIDGET (dock_item)); } else if (z->menubar_added) { dock_item = gnome_app_get_dock_item_by_name (&z->app, GNOME_APP_MENUBAR_NAME); gtk_widget_hide (GTK_WIDGET (dock_item)); } gtk_widget_queue_resize (GTK_WIDGET (z)); } static void view_toolbar (Zapping * z, gboolean view) { BonoboDockItem *dock_item; if (view && z->decorated) { /* Same as above. */ if (!z->toolbar_added) { z->toolbar_added = TRUE; gnome_app_set_toolbar (&z->app, z->toolbar); } dock_item = gnome_app_get_dock_item_by_name (&z->app, GNOME_APP_TOOLBAR_NAME); gtk_widget_show (GTK_WIDGET (dock_item)); } else if (z->toolbar_added) { dock_item = gnome_app_get_dock_item_by_name (&z->app, GNOME_APP_TOOLBAR_NAME); gtk_widget_hide (GTK_WIDGET (dock_item)); } gtk_widget_queue_resize (GTK_WIDGET (z)); } void zapping_view_appbar (Zapping * z, gboolean view) { if (view && z->decorated) { /* Same as above. */ if (!z->appbar_added) { z->appbar_added = TRUE; gnome_app_set_statusbar (&z->app, GTK_WIDGET (z->appbar)); } else { gtk_widget_show (GTK_WIDGET (z->appbar)); } } else if (z->appbar_added) { gtk_widget_hide (GTK_WIDGET (z->appbar)); } gtk_widget_queue_resize (GTK_WIDGET (z)); } static void view_menu_action (GtkToggleAction * toggle_action, Zapping * z) { view_menu (z, gtk_toggle_action_get_active (toggle_action)); } static void view_toolbar_action (GtkToggleAction * toggle_action, Zapping * z) { view_toolbar (z, gtk_toggle_action_get_active (toggle_action)); } static PyObject * py_hide_controls (PyObject * self _unused_, PyObject * args) { int hide; GtkToggleAction *toggle_action; if (!zapping) py_return_false; hide = 2; /* toggle */ if (!ParseTuple (args, "|i", &hide)) g_error ("zapping.hide_controls(|i)"); toggle_action = GTK_TOGGLE_ACTION (gtk_action_group_get_action (zapping->generic_action_group, "ViewMenu")); if (hide > 1) hide = !!gtk_toggle_action_get_active (toggle_action); gtk_toggle_action_set_active (toggle_action, !hide); toggle_action = GTK_TOGGLE_ACTION (gtk_action_group_get_action (zapping->generic_action_group, "ViewToolbar")); gtk_toggle_action_set_active (toggle_action, !hide); py_return_none; } static void keep_window_on_top_action (GtkToggleAction * toggle_action, Zapping * z) { gboolean keep; keep = gtk_toggle_action_get_active (toggle_action); x11_window_on_top (GTK_WINDOW (z), keep); } static PyObject * py_keep_on_top (PyObject * self _unused_, PyObject * args) { int keep; if (!zapping) py_return_false; keep = 2; /* toggle */ if (!ParseTuple (args, "|i", &keep)) g_error ("zapping.keep_on_top(|i)"); if (have_wm_hints) { GtkToggleAction *action; action = GTK_TOGGLE_ACTION (gtk_action_group_get_action (zapping->generic_action_group, "KeepWindowOnTop")); if (keep > 1) keep = !gtk_toggle_action_get_active (action); gtk_toggle_action_set_active (action, keep); } py_return_none; } static void help_contents_action (GtkAction * action _unused_, Zapping * z _unused_) { z_help_display (NULL, "zapping", NULL); } static void about_action (GtkAction * action _unused_, Zapping * z) { on_python_command1 (GTK_WIDGET (z), "zapping.about()"); } static void channel_up_action (GtkAction * action _unused_, Zapping * z) { on_python_command1 (GTK_WIDGET (z), "zapping.channel_up()"); } static void channel_down_action (GtkAction * action _unused_, Zapping * z) { on_python_command1 (GTK_WIDGET (z), "zapping.channel_down()"); } static void controls_action (GtkAction * action _unused_, Zapping * z) { on_python_command1 (GTK_WIDGET (z), "zapping.control_box()"); } static GtkActionEntry generic_actions [] = { { "FileSubmenu", NULL, N_("_File"), NULL, NULL, NULL }, #ifdef ZAPPING_CRASH_TEST { "Crash", GTK_STOCK_DISCONNECT, "_Crash", NULL, NULL, G_CALLBACK (crash_action) }, { "Assert", GTK_STOCK_DISCONNECT, "_Assert", NULL, NULL, G_CALLBACK (assert_action) }, #endif { "Quit", GTK_STOCK_QUIT, NULL, NULL, NULL, G_CALLBACK (quit_action) }, { "EditSubmenu", NULL, N_("_Edit"), NULL, NULL, NULL }, { "Preferences", GTK_STOCK_PREFERENCES, NULL, NULL, NULL, G_CALLBACK (preferences_action) }, { "Plugins", NULL, N_("P_lugins"), NULL, NULL, G_CALLBACK (plugins_action) }, { "ChannelEditor", NULL /* 2.6 GTK_STOCK_EDIT */, N_("_Channels"), NULL, NULL, G_CALLBACK (channel_editor_action) }, { "ViewSubmenu", NULL, N_("_View"), NULL, NULL, NULL }, { "Window", GTK_STOCK_EXECUTE, N_("_Window"), "<Control>w", NULL, G_CALLBACK (window_action) }, { "Fullscreen", GTK_STOCK_EXECUTE, N_("_Fullscreen"), "<Control>f", NULL, G_CALLBACK (fullscreen_action) }, { "Background", GTK_STOCK_EXECUTE, N_("_Background"), "<Control>b", NULL, G_CALLBACK (background_action) }, { "Overlay", GTK_STOCK_EXECUTE, N_("_Overlay mode"), "<Control>o", NULL, G_CALLBACK (overlay_action) }, { "Capture", GTK_STOCK_EXECUTE, N_("_Capture mode"), "<Control>c", NULL, G_CALLBACK (capture_action) }, { "ChannelsSubmenu", NULL, N_("_Channels"), NULL, NULL, NULL }, { "HelpSubmenu", NULL, N_("_Help"), NULL, NULL, NULL }, { "HelpContents", GTK_STOCK_HELP, N_("_Contents"), "F1", NULL, G_CALLBACK (help_contents_action) }, { "About", GNOME_STOCK_ABOUT, N_("_About"), NULL, NULL, G_CALLBACK (about_action) }, { "PopupSubmenu", NULL, "Dummy", NULL, NULL, NULL }, { "Appearance", NULL, N_("Appearance"), NULL, NULL, NULL }, { "ChannelUp", GTK_STOCK_GO_UP, N_("Ch. Up"), NULL, N_("Switch to higher channel"), G_CALLBACK (channel_up_action) }, { "ChannelDown", GTK_STOCK_GO_DOWN, N_("Ch. Down"), NULL, N_("Switch to lower channel"), G_CALLBACK (channel_down_action) }, { "Controls", GTK_STOCK_EXECUTE, N_("Controls"), NULL, N_("Change picture controls"), G_CALLBACK (controls_action) }, }; static GtkToggleActionEntry generic_toggle_actions [] = { { "Mute", "zapping-mute", N_("_Mute"), "<Control>a", N_("Switch audio on or off"), G_CALLBACK (mute_action), FALSE }, { "ViewMenu", NULL, N_("Menu"), NULL, NULL, G_CALLBACK (view_menu_action), TRUE }, { "ViewToolbar", NULL, N_("_Toolbar"), NULL, NULL, G_CALLBACK (view_toolbar_action), TRUE }, { "KeepWindowOnTop", NULL, N_("Keep window on top"), NULL, NULL, G_CALLBACK (keep_window_on_top_action), FALSE }, }; #if 0 /* TODO */ static GtkRadioActionEntry display_mode_radio_actions [] = { { "Window", NULL, N_("_Window"), "<Control>w", NULL, (gint) DISPLAY_MODE_WINDOW }, { "Fullscreen", NULL, N_("_Fullscreen"), "<Control>f", NULL, (gint) DISPLAY_MODE_FULLSCREEN }, { "Background", NULL, N_("_Background"), "<Control>b", NULL, (gint) DISPLAY_MODE_BACKGROUND }, }; #endif static GtkActionEntry teletext_actions [] = { { "TeletextSubmenu", NULL, N_("_Teletext"), NULL, NULL, NULL }, { "BookmarksSubmenu", NULL, N_("_Bookmarks"), NULL, NULL, NULL }, { "Teletext", "zapping-teletext", N_("_Teletext"), "<Control>t", N_("Activate Teletext mode"), G_CALLBACK (teletext_action) }, { "RestoreVideo", "zapping-video", N_("_Video"), "<Control>v", N_("Return to video mode"), G_CALLBACK (restore_video_action) }, { "NewTeletext", NULL, N_("_New Teletext View"), "<Control>n", NULL, G_CALLBACK (new_teletext_action) }, }; static GtkActionEntry subtitle_actions [] = { { "SubtitlesSubmenu", NULL, N_("_Subtitles"), NULL, NULL, NULL }, }; static GtkToggleActionEntry subtitle_toggle_actions [] = { { "Subtitles", "zapping-subtitle", N_("_Subtitles"), "<Control>u", N_("Switch subtitles on or off"), G_CALLBACK (subtitles_action), FALSE }, }; static const char * ui_description = "<ui>" " <menubar name='MainMenu'>" " <menu action='FileSubmenu'>" #ifdef ZAPPING_CRASH_TEST " <menuitem action='Crash'/>" " <menuitem action='Assert'/>" #endif " <menuitem action='Quit'/>" " </menu>" " <menu action='EditSubmenu'>" " <menuitem action='Preferences'/>" " <menuitem action='Plugins'/>" " <menuitem action='ChannelEditor'/>" " </menu>" " <menu action='ViewSubmenu'>" " <menuitem action='Window'/>" " <menuitem action='Fullscreen'/>" " <menuitem action='Background'/>" " <separator/>" " <menuitem action='Overlay'/>" " <menuitem action='Capture'/>" " <separator/>" " <menuitem action='Teletext'/>" " <menuitem action='RestoreVideo'/>" " <menuitem action='NewTeletext'/>" " <separator/>" " <menuitem action='Mute'/>" " <menuitem action='Subtitles'/>" " <separator/>" " <menuitem action='ViewMenu'/>" " <menuitem action='ViewToolbar'/>" " <menuitem action='KeepWindowOnTop'/>" " </menu>" " <menu action='ChannelsSubmenu'>" " </menu>" " <menu action='HelpSubmenu'>" " <menuitem action='HelpContents'/>" " <separator/>" " <menuitem action='About'/>" " </menu>" " </menubar>" " <toolbar name='Toolbar'>" " <toolitem action='ChannelUp'/>" " <toolitem action='ChannelDown'/>" " <separator/>" " <toolitem action='Controls'/>" " <toolitem action='Mute'/>" " <toolitem action='Teletext'/>" " <toolitem action='RestoreVideo'/>" " <toolitem action='Subtitles'/>" " </toolbar>" "</ui>"; static const char * popup_menu_description = "<ui>" " <menubar name='Popup'>" " <menu action='PopupSubmenu'>" " <menuitem action='Window'/>" " <menuitem action='Fullscreen'/>" " <menuitem action='Background'/>" " <separator/>" " <menuitem action='Overlay'/>" " <menuitem action='Capture'/>" " <separator/>" " <menuitem action='Teletext'/>" " <menu action='TeletextSubmenu'>" " </menu>" " <menu action='SubtitlesSubmenu'>" " </menu>" " <menu action='BookmarksSubmenu'>" " </menu>" " <separator/>" " <menu action='Appearance'>" " <menuitem action='ViewMenu'/>" " <menuitem action='ViewToolbar'/>" " <menuitem action='KeepWindowOnTop'/>" " </menu>" " <separator/>" " </menu>" " </menubar>" "</ui>"; void zapping_create_popup (Zapping * z, GdkEventButton * event) { GError *error = NULL; GtkUIManager *ui_manager; GtkWidget *widget; GtkWidget *popup_menu; GtkWidget *menu; gboolean success; ui_manager = gtk_ui_manager_new (); gtk_ui_manager_insert_action_group (ui_manager, z->generic_action_group, APPEND); gtk_ui_manager_insert_action_group (ui_manager, z->teletext_action_group, APPEND); gtk_ui_manager_insert_action_group (ui_manager, z->subtitle_action_group, APPEND); success = gtk_ui_manager_add_ui_from_string (ui_manager, popup_menu_description, NUL_TERMINATED, &error); if (!success || error) { if (error) { g_message ("Cannot build popup menu:\n%s", error->message); g_error_free (error); error = NULL; } exit (EXIT_FAILURE); } widget = gtk_ui_manager_get_widget (ui_manager, "/Popup/PopupSubmenu"); popup_menu = gtk_menu_item_get_submenu (GTK_MENU_ITEM (widget)); widget = gtk_separator_menu_item_new (); gtk_widget_show (widget); gtk_menu_shell_prepend (GTK_MENU_SHELL (popup_menu), widget); add_channel_entries (GTK_MENU_SHELL (popup_menu), 0, 10, z->info); #ifdef HAVE_LIBZVBI if (zvbi_get_object ()) { if (CAPTURE_MODE_TELETEXT == tv_get_capture_mode (z->info)) { widget = gtk_ui_manager_get_widget (ui_manager, "/Popup/PopupSubmenu/TeletextSubmenu"); if (widget) { menu = NULL; if (_ttxview_popup_menu_new) menu = _ttxview_popup_menu_new (GTK_WIDGET (zapping), event); if (menu) gtk_menu_item_set_submenu (GTK_MENU_ITEM (widget), menu); else gtk_widget_hide (widget); } widget = gtk_ui_manager_get_widget (ui_manager, "/Popup/PopupSubmenu/BookmarksSubmenu"); if (widget) { if (_ttxview_bookmarks_menu_new) { menu = _ttxview_bookmarks_menu_new (GTK_WIDGET (z)); gtk_menu_item_set_submenu (GTK_MENU_ITEM (widget), menu); } else { gtk_widget_hide (widget); } } } else { widget = gtk_ui_manager_get_widget (ui_manager, "/Popup/PopupSubmenu/TeletextSubmenu"); if (widget) gtk_widget_hide (widget); widget = gtk_ui_manager_get_widget (ui_manager, "/Popup/PopupSubmenu/BookmarksSubmenu"); if (widget) gtk_widget_hide (widget); } widget = gtk_ui_manager_get_widget (ui_manager, "/Popup/PopupSubmenu/SubtitlesSubmenu"); if (widget) { gint pgno = 0; #ifdef HAVE_LIBZVBI const gchar *key = "/zapping/internal/callbacks/closed_caption"; if (zconf_get_boolean (NULL, key)) pgno = zvbi_caption_pgno; #endif if ((menu = zvbi_subtitle_menu_new (pgno))) gtk_menu_item_set_submenu (GTK_MENU_ITEM (widget), menu); else gtk_widget_hide (widget); } widget = gtk_ui_manager_get_widget (ui_manager, "/Popup/PopupSubmenu/BookmarksSubmenu"); if (widget) { gint index; index = g_list_index (GTK_MENU_SHELL (popup_menu)->children, widget); if (index >= 0) { if (_ttxview_hotlist_menu_insert) _ttxview_hotlist_menu_insert (GTK_MENU_SHELL (popup_menu), /* separator */ FALSE, index + 1); } } } else #endif { /* separator */ /* teletext */ /* subtitles */ /* bookmarks */ } widget = gtk_ui_manager_get_widget (ui_manager, "/Popup/PopupSubmenu/Appearance"); menu = gtk_menu_item_get_submenu (GTK_MENU_ITEM (widget)); picture_sizes_append_menu (GTK_MENU_SHELL (menu)); { GList *glist; /* Let plugins add their GUI to this context menu */ for (glist = plugin_list; glist; glist = glist->next) plugin_process_popup_menu (GTK_WIDGET (z), event, GTK_MENU (popup_menu), (struct plugin_info *) glist->data); } gtk_menu_popup (GTK_MENU (popup_menu), /* parent_menu_shell */ NULL, /* parent_menu_item */ NULL, /* menu position func */ NULL, /* menu position data */ NULL, event->button, event->time); } void zapping_rebuild_channel_menu (Zapping * z) { if (z->info && z->channels_menu) { GtkMenuShell *menu; GtkWidget *menu_item; GtkWidget *widget; widget = gtk_menu_new (); gtk_widget_show (widget); menu = GTK_MENU_SHELL (widget); menu_item = gtk_tearoff_menu_item_new(); gtk_widget_show (menu_item); gtk_menu_shell_append (menu, menu_item); gtk_menu_item_remove_submenu (z->channels_menu); gtk_menu_item_set_submenu (z->channels_menu, widget); add_channel_entries (menu, 1, 16, z->info); } } static gboolean scroll_event (GtkWidget * widget, GdkEventScroll * event) { switch (event->direction) { case GDK_SCROLL_UP: case GDK_SCROLL_LEFT: python_command (widget, "zapping.channel_up()"); return TRUE; /* handled */ case GDK_SCROLL_DOWN: case GDK_SCROLL_RIGHT: python_command (widget, "zapping.channel_down()"); return TRUE; /* handled */ default: break; } return FALSE; /* pass on */ } static gboolean on_button_press_event (GtkWidget * widget, GdkEventButton * event, gpointer user_data) { Zapping *z = ZAPPING (user_data); switch (event->button) { case 2: /* Middle button */ python_command (widget, "zapping.switch_mode('fullscreen')"); return TRUE; /* handled */ case 3: /* Right button */ zapping_create_popup (z, event); return TRUE; /* handled */ default: break; } return FALSE; /* pass on */ } static gboolean delete_event (GtkWidget * widget, GdkEventAny * event _unused_) { python_command (widget, "zapping.quit()"); return TRUE; /* handled */ } static void map (GtkWidget * widget) { Zapping *z = ZAPPING (widget); GtkAction *action; GTK_WIDGET_CLASS (parent_class)->map (widget); action = gtk_action_group_get_action (z->generic_action_group, "KeepWindowOnTop"); if (have_wm_hints) { GtkToggleAction *toggle_action; toggle_action = GTK_TOGGLE_ACTION (action); z_toggle_action_connect_gconf_key (toggle_action, "/apps/zapping/window/keep_on_top"); /* Window is mapped now, set the initial state. */ keep_window_on_top_action (toggle_action, z); } else { z_action_set_sensitive (action, FALSE); } } extern void shutdown_zapping(void); /* main.c */ static void instance_finalize (GObject * object) { Zapping *z = ZAPPING (object); if (NULL != z->subtitles) { gtk_widget_destroy (GTK_WIDGET (z->subtitles)); z->subtitles = NULL; } /* preliminary */ shutdown_zapping (); parent_class->finalize (object); } static void instance_init (GTypeInstance * instance, gpointer g_class _unused_) { Zapping *z = (Zapping *) instance; GError *error = NULL; GtkAction *action; GtkToggleAction *toggle_action; GtkWidget *stack; GtkWidget *widget; gboolean success; z->generic_action_group = gtk_action_group_new ("ZappingGenericActions"); #ifdef ENABLE_NLS gtk_action_group_set_translation_domain (z->generic_action_group, GETTEXT_PACKAGE); #endif gtk_action_group_add_actions (z->generic_action_group, generic_actions, G_N_ELEMENTS (generic_actions), /* user_data */ z); gtk_action_group_add_toggle_actions (z->generic_action_group, generic_toggle_actions, G_N_ELEMENTS (generic_toggle_actions), /* user_data */ z); #if 0 /* TODO */ gtk_action_group_add_radio_actions (z->generic_action_group, display_mode_radio_actions, G_N_ELEMENTS (display_mode_radio_actions), (gint) DISPLAY_MODE_WINDOW, G_CALLBACK (display_mode_action), /* user_data */ z); #endif /* We add the submenu ourselves. Make sure the menu item is visible despite initially without menu. */ z_show_empty_submenu (z->generic_action_group, "ChannelsSubmenu"); z->teletext_action_group = gtk_action_group_new ("ZappingTeletextActions"); z->subtitle_action_group = gtk_action_group_new ("ZappingSubtitleActions"); #ifdef ENABLE_NLS gtk_action_group_set_translation_domain (z->teletext_action_group, GETTEXT_PACKAGE); gtk_action_group_set_translation_domain (z->subtitle_action_group, GETTEXT_PACKAGE); #endif gtk_action_group_add_actions (z->teletext_action_group, teletext_actions, G_N_ELEMENTS (teletext_actions), /* user_data */ z); gtk_action_group_add_actions (z->subtitle_action_group, subtitle_actions, G_N_ELEMENTS (subtitle_actions), /* user_data */ z); gtk_action_group_add_toggle_actions (z->subtitle_action_group, subtitle_toggle_actions, G_N_ELEMENTS (subtitle_toggle_actions), /* user_data */ z); /* Mutual exclusive with "Teletext". */ action = gtk_action_group_get_action (z->teletext_action_group, "RestoreVideo"); z_action_set_visible (action, FALSE); #ifdef HAVE_LIBZVBI action = gtk_action_group_get_action (z->subtitle_action_group, "Subtitles"); zconf_add_hook ("/zapping/internal/callbacks/closed_caption", (ZConfHook) zconf_hook_subtitles, GTK_TOGGLE_ACTION (action)); #endif /* We add the submenu ourselves. Make sure the menu item is visible despite initially without menu. */ z_show_empty_submenu (z->teletext_action_group, "TeletextSubmenu"); z_show_empty_submenu (z->subtitle_action_group, "SubtitlesSubmenu"); z_show_empty_submenu (z->teletext_action_group, "BookmarksSubmenu"); gnome_app_construct (&z->app, "Zapping", "Zapping"); z->ui_manager = gtk_ui_manager_new (); gtk_ui_manager_insert_action_group (z->ui_manager, z->generic_action_group, APPEND); gtk_ui_manager_insert_action_group (z->ui_manager, z->teletext_action_group, APPEND); gtk_ui_manager_insert_action_group (z->ui_manager, z->subtitle_action_group, APPEND); success = gtk_ui_manager_add_ui_from_string (z->ui_manager, ui_description, NUL_TERMINATED, &error); if (!success || error) { if (error) { g_message ("Cannot build main menu:\n%s", error->message); g_error_free (error); error = NULL; } exit (EXIT_FAILURE); } gtk_window_add_accel_group (GTK_WINDOW (z), gtk_ui_manager_get_accel_group (z->ui_manager)); z->decorated = TRUE; { widget = gtk_ui_manager_get_widget (z->ui_manager, "/MainMenu"); z->menubar = GTK_MENU_BAR (widget); widget = gtk_ui_manager_get_widget (z->ui_manager, "/MainMenu/ChannelsSubmenu"); z->channels_menu = GTK_MENU_ITEM (widget); zapping_rebuild_channel_menu (z); toggle_action = GTK_TOGGLE_ACTION (gtk_action_group_get_action (z->generic_action_group, "ViewMenu")); z_toggle_action_connect_gconf_key (toggle_action, "/apps/zapping/window/view_menu"); /* Adds the menu if necessary. */ view_menu_action (toggle_action, z); } { widget = gtk_ui_manager_get_widget (z->ui_manager, "/Toolbar"); z->toolbar = GTK_TOOLBAR (widget); toggle_action = GTK_TOGGLE_ACTION (gtk_action_group_get_action (z->generic_action_group, "ViewToolbar")); z_toggle_action_connect_gconf_key (toggle_action, "/apps/zapping/window/view_toolbar"); /* Adds the toolbar if necessary. */ view_toolbar_action (toggle_action, z); } { widget = gnome_appbar_new (/* progress */ FALSE, /* status */ TRUE, /* interactive */ GNOME_PREFERENCES_NEVER); z->appbar = GNOME_APPBAR (widget); /* Cannot hide the appbar at this point, so we add (and show) when the Teletext plugin needs it. */ } stack = z_stack_new (); z->contents = Z_STACK (stack); gtk_widget_show (stack); gnome_app_set_contents (&z->app, stack); widget = z_video_new (); z->video = Z_VIDEO (widget); gtk_widget_show (widget); z_stack_put (Z_STACK (stack), widget, ZSTACK_VIDEO); { GdkColor black = { 0, 0, 0, 0 }; gtk_widget_modify_bg (widget, GTK_STATE_NORMAL, &black); } z_video_set_min_size (z->video, 64, 64 * 3 / 4); /* XXX free, 4:3, 16:9 */ if (zconf_get_boolean (NULL, "/zapping/options/main/fixed_increments")) z_video_set_size_inc (z->video, 64, 64 * 3 / 4); /* NOTE video only, not the entire window. */ g_signal_connect (G_OBJECT (widget), "button-press-event", G_CALLBACK (on_button_press_event), z); gtk_widget_add_events (widget, GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_SCROLL_MASK | GDK_EXPOSURE_MASK | GDK_POINTER_MOTION_MASK | GDK_VISIBILITY_NOTIFY_MASK | GDK_KEY_PRESS_MASK); } GtkWidget * zapping_new (void) { return GTK_WIDGET (g_object_new (TYPE_ZAPPING, NULL)); } static void class_init (gpointer g_class, gpointer class_data _unused_) { GObjectClass *object_class; GtkWidgetClass *widget_class; object_class = G_OBJECT_CLASS (g_class); widget_class = GTK_WIDGET_CLASS (g_class); parent_class = g_type_class_peek_parent (g_class); object_class->finalize = instance_finalize; widget_class->map = map; widget_class->delete_event = delete_event; widget_class->scroll_event = scroll_event; cmd_register ("hide_controls", py_hide_controls, METH_VARARGS, N_("Show menu and toolbar"), "zapping.hide_controls()"); cmd_register ("keep_on_top", py_keep_on_top, METH_VARARGS, N_("Keep window on top"), "zapping.keep_on_top()"); } GType zapping_get_type (void) { static GType type = 0; if (!type) { GTypeInfo info; CLEAR (info); info.class_size = sizeof (ZappingClass); info.class_init = class_init; info.instance_size = sizeof (Zapping); info.instance_init = instance_init; type = g_type_register_static (GNOME_TYPE_APP, "Zapping", &info, (GTypeFlags) 0); } return type; } �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������zapping-0.10cvs6/src/zapping.h���������������������������������������������������������������������� 644 � 764 � 144 � 6022 10305455147 11421� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Zapping (TV viewer for the Gnome Desktop) * * Copyright (C) 2001 Iaki Garca Etxebarria * Copyright (C) 2003 Michael H. Schimek * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* $Id: zapping.h,v 1.8 2005/09/01 01:33:27 mschimek Exp $ */ #ifndef ZAPPING_H #define ZAPPING_H #include <gnome.h> #include "plugins/subtitle/view.h" #include "tveng.h" #include "zstack.h" #include "zvideo.h" G_BEGIN_DECLS #define TYPE_ZAPPING (zapping_get_type ()) #define ZAPPING(obj) \ (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_ZAPPING, Zapping)) #define ZAPPING_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), \ TYPE_ZAPPING, ZappingClass)) #define IS_ZAPPING(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_ZAPPING)) #define IS_ZAPPING_CLASS(klass) \ (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_ZAPPING)) #define ZAPPING_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), \ TYPE_ZAPPING, ZappingClass)) typedef enum { DISPLAY_MODE_WINDOW = 0x00, DISPLAY_MODE_BACKGROUND = 0x10, DISPLAY_MODE_FULLSCREEN = 0x20, } display_mode; typedef enum { DISPLAY_CONTENT_NONE = 0x000, DISPLAY_CONTENT_VIDEO_CAPTURE = 0x100, DISPLAY_CONTENT_VIDEO_OVERLAY = 0x200, DISPLAY_CONTENT_TELETEXT = 0x300, } display_content; typedef struct _Zapping Zapping; typedef struct _ZappingClass ZappingClass; struct _Zapping { GnomeApp app; /*< private >*/ tveng_device_info * info; display_mode display_mode; /* XXX hack to remember the display window (main/fullscreen/background) for capture_stop/start() at e.g. a video standard change. */ GtkWidget * display_window; GtkActionGroup * generic_action_group; GtkActionGroup * teletext_action_group; GtkActionGroup * subtitle_action_group; GtkUIManager * ui_manager; GtkMenuBar * menubar; gboolean menubar_added; GtkMenuItem * channels_menu; GtkToolbar * toolbar; gboolean toolbar_added; GnomeAppBar * appbar; gboolean appbar_added; ZStack * contents; ZVideo * video; SubtitleView * subtitles; gboolean decorated; }; struct _ZappingClass { GnomeAppClass parent_class; }; extern GType zapping_get_type (void) G_GNUC_CONST; extern GtkWidget * zapping_new (void); extern void zapping_view_appbar (Zapping * z, gboolean view); extern void zapping_rebuild_channel_menu (Zapping * z); extern void zapping_create_popup (Zapping * z, GdkEventButton * event); G_END_DECLS #endif /* ZAPPING_H */ ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������zapping-0.10cvs6/src/Makefile.am�������������������������������������������������������������������� 644 � 764 � 144 � 6203 10423155243 11630� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������## Process this file with automake to produce Makefile.in bin_PROGRAMS = zapping if HAVE_XMU bin_PROGRAMS += zapping_remote endif BUILT_SOURCES = \ zmarshalers.c \ zmarshalers.h EXTRA_DIST = \ gen_conv.s \ zmarshalers.list # Adding -g here is bad but I need better BugBuddy backtraces. AM_CFLAGS = \ -D_GNU_SOURCE \ @DEFAULT_CFLAGS@ \ $(ZVBI_CFLAGS) \ $(LIBXML_CFLAGS) \ -DZAPPING8 \ -DPACKAGE_VERSION_ID=@PACKAGE_VERSION_ID@ \ -g INCLUDES = \ -I$(top_srcdir) \ @COMMON_INCLUDES@ # Need gcc and as support for SSE to build this module. # Cannot build for host x86_64, code is 32 bit. if HAVE_X86 if CAN_COMPILE_SSE gen_conv_lib = libgen_conv.a else gen_conv_lib = endif else gen_conv_lib = endif noinst_LIBRARIES = $(gen_conv_lib) libgen_conv_a_SOURCES = gen_conv.s zmarshalers.c: zmarshalers.list @GLIB_GENMARSHAL@ --prefix=z_marshal $< --body > $@ zmarshalers.h: zmarshalers.list @GLIB_GENMARSHAL@ --prefix=z_marshal $< --header > $@ zapping_SOURCES = \ arts.c esd.c oss.c \ audio.c audio.h \ capture.c capture.h \ channel_editor.c channel_editor.h \ cmd.c cmd.h \ csconvert.c csconvert.h \ eggcellrendererkeys.c eggcellrendererkeys.h \ eggaccelerators.c eggaccelerators.h \ frequencies.c frequencies.h \ fullscreen.c fullscreen.h \ globals.c globals.h \ i18n.c i18n.h \ interface.c interface.h \ keyboard.c keyboard.h keysyms.h \ main.c \ mixer.c mixer.h \ osd.c osd.h \ overlay.c overlay.h \ plugin_properties.c plugin_properties.h \ plugins.c plugins.h plugin_common.h \ properties.c properties.h \ properties-handler.c properties-handler.h \ remote.c remote.h \ subtitle.c subtitle.h \ tveng.c tveng.h tveng_private.h \ tveng1.c tveng1.h \ tveng25.c tveng25.h \ tvengbktr.c tvengbktr.h \ tvengemu.c tvengemu.h \ tvengxv.c tvengxv.h \ v4linterface.c v4linterface.h \ vdr.c vdr.h \ video_xv.c video_x11.c video_gdkrgb.c video_mem.c \ x11stuff.c x11stuff.h \ xawtv.c xawtv.h \ yuv2rgb.c yuv2rgb.h gen_conv.h \ zapping.c zapping.h \ zconf.c zconf.h \ zgconf.c zgconf.h \ zimage.c zimage.h \ zmarshalers.c zmarshalers.h \ zmisc.c zmisc.h \ zmodel.c zmodel.h \ zspinslider.c zspinslider.h \ zstack.c zstack.h \ zvbi.c zvbi.h \ zvideo.c zvideo.h zapping_LDADD = \ $(top_builddir)/common/libcommon.a \ $(top_builddir)/libtv/libtv.la \ $(top_builddir)/libvbi/libvbi.la \ $(gen_conv_lib) \ @PACKAGE_LIBS@ \ @PYTHON_LIBS@ \ @X_LIBS@ \ -lX11 \ @X_DPMS_LIBS@ \ @X_XINERAMA_LIBS@ \ @X_XF86DGA_LIBS@ \ @X_XF86VMODE_LIBS@ \ @X_XV_LIBS@ \ @ZVBI_LIBS@ \ @PNG_LIBS@ \ @ARTS_LIBS@ \ @ESD_LIBS@ \ @LIBXML_LIBS@ zapping_LDFLAGS = -export-dynamic zapping_remote_SOURCES = \ zapping_remote.c zapping_remote_LDADD = \ @X_LIBS@ \ -lX11 \ @X_XMU_LIBS@ # No zapzilla in this version. When it returns this rule should be # replaced by install-exec-local instead of overriding install-bin. # install-binPROGRAMS: $(bin_PROGRAMS) # $(mkinstalldirs) $(DESTDIR)$(bindir) # $(INSTALL_PROGRAM) zapping $(DESTDIR)$(bindir) # ln -sf $(DESTDIR)$(bindir)/zapping $(DESTDIR)$(bindir)/zapzilla # # uninstall-binPROGRAMS: # rm -f $(DESTDIR)$(bindir)/zapping # rm -f $(DESTDIR)$(bindir)/zremote # rm -f $(DESTDIR)$(bindir)/zapzilla ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������zapping-0.10cvs6/src/Makefile.in�������������������������������������������������������������������� 644 � 764 � 144 � 67063 10442575615 11706� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = .. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = zapping$(EXEEXT) $(am__EXEEXT_1) @HAVE_XMU_TRUE@am__append_1 = zapping_remote subdir = src DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = LIBRARIES = $(noinst_LIBRARIES) ARFLAGS = cru libgen_conv_a_AR = $(AR) $(ARFLAGS) libgen_conv_a_LIBADD = am_libgen_conv_a_OBJECTS = gen_conv.$(OBJEXT) libgen_conv_a_OBJECTS = $(am_libgen_conv_a_OBJECTS) @HAVE_XMU_TRUE@am__EXEEXT_1 = zapping_remote$(EXEEXT) am__installdirs = "$(DESTDIR)$(bindir)" binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) PROGRAMS = $(bin_PROGRAMS) am_zapping_OBJECTS = arts.$(OBJEXT) esd.$(OBJEXT) oss.$(OBJEXT) \ audio.$(OBJEXT) capture.$(OBJEXT) channel_editor.$(OBJEXT) \ cmd.$(OBJEXT) csconvert.$(OBJEXT) \ eggcellrendererkeys.$(OBJEXT) eggaccelerators.$(OBJEXT) \ frequencies.$(OBJEXT) fullscreen.$(OBJEXT) globals.$(OBJEXT) \ i18n.$(OBJEXT) interface.$(OBJEXT) keyboard.$(OBJEXT) \ main.$(OBJEXT) mixer.$(OBJEXT) osd.$(OBJEXT) overlay.$(OBJEXT) \ plugin_properties.$(OBJEXT) plugins.$(OBJEXT) \ properties.$(OBJEXT) properties-handler.$(OBJEXT) \ remote.$(OBJEXT) subtitle.$(OBJEXT) tveng.$(OBJEXT) \ tveng1.$(OBJEXT) tveng25.$(OBJEXT) tvengbktr.$(OBJEXT) \ tvengemu.$(OBJEXT) tvengxv.$(OBJEXT) v4linterface.$(OBJEXT) \ vdr.$(OBJEXT) video_xv.$(OBJEXT) video_x11.$(OBJEXT) \ video_gdkrgb.$(OBJEXT) video_mem.$(OBJEXT) x11stuff.$(OBJEXT) \ xawtv.$(OBJEXT) yuv2rgb.$(OBJEXT) zapping.$(OBJEXT) \ zconf.$(OBJEXT) zgconf.$(OBJEXT) zimage.$(OBJEXT) \ zmarshalers.$(OBJEXT) zmisc.$(OBJEXT) zmodel.$(OBJEXT) \ zspinslider.$(OBJEXT) zstack.$(OBJEXT) zvbi.$(OBJEXT) \ zvideo.$(OBJEXT) zapping_OBJECTS = $(am_zapping_OBJECTS) @CAN_COMPILE_SSE_TRUE@@HAVE_X86_TRUE@am__DEPENDENCIES_1 = \ @CAN_COMPILE_SSE_TRUE@@HAVE_X86_TRUE@ libgen_conv.a zapping_DEPENDENCIES = $(top_builddir)/common/libcommon.a \ $(top_builddir)/libtv/libtv.la \ $(top_builddir)/libvbi/libvbi.la $(am__DEPENDENCIES_1) am_zapping_remote_OBJECTS = zapping_remote.$(OBJEXT) zapping_remote_OBJECTS = $(am_zapping_remote_OBJECTS) zapping_remote_DEPENDENCIES = DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ CCASCOMPILE = $(CCAS) $(AM_CCASFLAGS) $(CCASFLAGS) LTCCASCOMPILE = $(LIBTOOL) --mode=compile $(CCAS) $(AM_CCASFLAGS) \ $(CCASFLAGS) SOURCES = $(libgen_conv_a_SOURCES) $(zapping_SOURCES) \ $(zapping_remote_SOURCES) DIST_SOURCES = $(libgen_conv_a_SOURCES) $(zapping_SOURCES) \ $(zapping_remote_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ ARTS_CFLAGS = @ARTS_CFLAGS@ ARTS_LIBS = @ARTS_LIBS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BUILD_DEINTERLACE_PLUGIN_FALSE = @BUILD_DEINTERLACE_PLUGIN_FALSE@ BUILD_DEINTERLACE_PLUGIN_TRUE = @BUILD_DEINTERLACE_PLUGIN_TRUE@ BUILD_MAN_FALSE = @BUILD_MAN_FALSE@ BUILD_MAN_TRUE = @BUILD_MAN_TRUE@ CAN_COMPILE_3DNOW_FALSE = @CAN_COMPILE_3DNOW_FALSE@ CAN_COMPILE_3DNOW_TRUE = @CAN_COMPILE_3DNOW_TRUE@ CAN_COMPILE_ALTIVEC_FALSE = @CAN_COMPILE_ALTIVEC_FALSE@ CAN_COMPILE_ALTIVEC_TRUE = @CAN_COMPILE_ALTIVEC_TRUE@ CAN_COMPILE_MMX_FALSE = @CAN_COMPILE_MMX_FALSE@ CAN_COMPILE_MMX_TRUE = @CAN_COMPILE_MMX_TRUE@ CAN_COMPILE_SSE2_FALSE = @CAN_COMPILE_SSE2_FALSE@ CAN_COMPILE_SSE2_TRUE = @CAN_COMPILE_SSE2_TRUE@ CAN_COMPILE_SSE3_FALSE = @CAN_COMPILE_SSE3_FALSE@ CAN_COMPILE_SSE3_TRUE = @CAN_COMPILE_SSE3_TRUE@ CAN_COMPILE_SSE_FALSE = @CAN_COMPILE_SSE_FALSE@ CAN_COMPILE_SSE_TRUE = @CAN_COMPILE_SSE_TRUE@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCAS = @CCAS@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ COMMON_INCLUDES = @COMMON_INCLUDES@ CONSOLEHELPER_LOCATION = @CONSOLEHELPER_LOCATION@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFAULT_CFLAGS = @DEFAULT_CFLAGS@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ESD_LIBS = @ESD_LIBS@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ GCONF_SCHEMAS_INSTALL_FALSE = @GCONF_SCHEMAS_INSTALL_FALSE@ GCONF_SCHEMAS_INSTALL_TRUE = @GCONF_SCHEMAS_INSTALL_TRUE@ GCONF_SCHEMA_CONFIG_SOURCE = @GCONF_SCHEMA_CONFIG_SOURCE@ GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@ GDK_PIXBUF_CSOURCE = @GDK_PIXBUF_CSOURCE@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ HAVE_GCC_LIMITS_FALSE = @HAVE_GCC_LIMITS_FALSE@ HAVE_GCC_LIMITS_TRUE = @HAVE_GCC_LIMITS_TRUE@ HAVE_LIBZVBI_FALSE = @HAVE_LIBZVBI_FALSE@ HAVE_LIBZVBI_TRUE = @HAVE_LIBZVBI_TRUE@ HAVE_X86_FALSE = @HAVE_X86_FALSE@ HAVE_X86_TRUE = @HAVE_X86_TRUE@ HAVE_XMU_FALSE = @HAVE_XMU_FALSE@ HAVE_XMU_TRUE = @HAVE_XMU_TRUE@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ INTLTOOL_CAVES_RULE = @INTLTOOL_CAVES_RULE@ INTLTOOL_DESKTOP_RULE = @INTLTOOL_DESKTOP_RULE@ INTLTOOL_DIRECTORY_RULE = @INTLTOOL_DIRECTORY_RULE@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ INTLTOOL_ICONV = @INTLTOOL_ICONV@ INTLTOOL_KBD_RULE = @INTLTOOL_KBD_RULE@ INTLTOOL_KEYS_RULE = @INTLTOOL_KEYS_RULE@ INTLTOOL_MERGE = @INTLTOOL_MERGE@ INTLTOOL_MSGFMT = @INTLTOOL_MSGFMT@ INTLTOOL_MSGMERGE = @INTLTOOL_MSGMERGE@ INTLTOOL_OAF_RULE = @INTLTOOL_OAF_RULE@ INTLTOOL_PERL = @INTLTOOL_PERL@ INTLTOOL_PONG_RULE = @INTLTOOL_PONG_RULE@ INTLTOOL_PROP_RULE = @INTLTOOL_PROP_RULE@ INTLTOOL_SCHEMAS_RULE = @INTLTOOL_SCHEMAS_RULE@ INTLTOOL_SERVER_RULE = @INTLTOOL_SERVER_RULE@ INTLTOOL_SHEET_RULE = @INTLTOOL_SHEET_RULE@ INTLTOOL_SOUNDLIST_RULE = @INTLTOOL_SOUNDLIST_RULE@ INTLTOOL_THEME_RULE = @INTLTOOL_THEME_RULE@ INTLTOOL_UI_RULE = @INTLTOOL_UI_RULE@ INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ INTLTOOL_XAM_RULE = @INTLTOOL_XAM_RULE@ INTLTOOL_XGETTEXT = @INTLTOOL_XGETTEXT@ INTLTOOL_XML_NOMERGE_RULE = @INTLTOOL_XML_NOMERGE_RULE@ INTLTOOL_XML_RULE = @INTLTOOL_XML_RULE@ JPEG_LIB = @JPEG_LIB@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBXML_CFLAGS = @LIBXML_CFLAGS@ LIBXML_LIBS = @LIBXML_LIBS@ LIRC_LIB = @LIRC_LIB@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAKEINFO = @MAKEINFO@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ NEED_ZSFB_FALSE = @NEED_ZSFB_FALSE@ NEED_ZSFB_TRUE = @NEED_ZSFB_TRUE@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_CFLAGS = @PACKAGE_CFLAGS@ PACKAGE_LIBS = @PACKAGE_LIBS@ PACKAGE_LIB_DIR = @PACKAGE_LIB_DIR@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_PIXMAPS_DIR = @PACKAGE_PIXMAPS_DIR@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PACKAGE_VERSION_ID = @PACKAGE_VERSION_ID@ PATH_SEPARATOR = @PATH_SEPARATOR@ PG_CFLAGS = @PG_CFLAGS@ PKG_CONFIG = @PKG_CONFIG@ PLUGIN_DEFAULT_DIR = @PLUGIN_DEFAULT_DIR@ PLUGIN_DEFAULT_FLAGS = @PLUGIN_DEFAULT_FLAGS@ PNG_LIBS = @PNG_LIBS@ POFILES = @POFILES@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ PYTHON_LIBS = @PYTHON_LIBS@ PY_CFLAGS = @PY_CFLAGS@ PY_EXTRA_LIBS = @PY_EXTRA_LIBS@ PY_LIBS = @PY_LIBS@ PY_LIB_LOC = @PY_LIB_LOC@ RANLIB = @RANLIB@ RTE_LIBS = @RTE_LIBS@ SCROLLKEEPER_BUILD_REQUIRED = @SCROLLKEEPER_BUILD_REQUIRED@ SCROLLKEEPER_CONFIG = @SCROLLKEEPER_CONFIG@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ SUID_ZSFB_FALSE = @SUID_ZSFB_FALSE@ SUID_ZSFB_TRUE = @SUID_ZSFB_TRUE@ UNICODE_CFLAGS = @UNICODE_CFLAGS@ UNICODE_LIBS = @UNICODE_LIBS@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ WARN_CFLAGS = @WARN_CFLAGS@ XGETTEXT = @XGETTEXT@ XMLCATALOG = @XMLCATALOG@ XML_CATALOG_FILE = @XML_CATALOG_FILE@ XSLTPROC = @XSLTPROC@ X_CFLAGS = @X_CFLAGS@ X_DPMS_LIBS = @X_DPMS_LIBS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ X_XF86DGA_LIBS = @X_XF86DGA_LIBS@ X_XF86VMODE_LIBS = @X_XF86VMODE_LIBS@ X_XINERAMA_LIBS = @X_XINERAMA_LIBS@ X_XMU_LIBS = @X_XMU_LIBS@ X_XV_LIBS = @X_XV_LIBS@ ZSFB_GROUP = @ZSFB_GROUP@ ZSFB_OWNER = @ZSFB_OWNER@ ZVBI_CFLAGS = @ZVBI_CFLAGS@ ZVBI_LIBS = @ZVBI_LIBS@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_STRIP = @ac_ct_STRIP@ ac_pt_PKG_CONFIG = @ac_pt_PKG_CONFIG@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ datadir = @datadir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ python_val = @python_val@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ BUILT_SOURCES = \ zmarshalers.c \ zmarshalers.h EXTRA_DIST = \ gen_conv.s \ zmarshalers.list # Adding -g here is bad but I need better BugBuddy backtraces. AM_CFLAGS = \ -D_GNU_SOURCE \ @DEFAULT_CFLAGS@ \ $(ZVBI_CFLAGS) \ $(LIBXML_CFLAGS) \ -DZAPPING8 \ -DPACKAGE_VERSION_ID=@PACKAGE_VERSION_ID@ \ -g INCLUDES = \ -I$(top_srcdir) \ @COMMON_INCLUDES@ @CAN_COMPILE_SSE_FALSE@@HAVE_X86_TRUE@gen_conv_lib = # Need gcc and as support for SSE to build this module. # Cannot build for host x86_64, code is 32 bit. @CAN_COMPILE_SSE_TRUE@@HAVE_X86_TRUE@gen_conv_lib = libgen_conv.a @HAVE_X86_FALSE@gen_conv_lib = noinst_LIBRARIES = $(gen_conv_lib) libgen_conv_a_SOURCES = gen_conv.s zapping_SOURCES = \ arts.c esd.c oss.c \ audio.c audio.h \ capture.c capture.h \ channel_editor.c channel_editor.h \ cmd.c cmd.h \ csconvert.c csconvert.h \ eggcellrendererkeys.c eggcellrendererkeys.h \ eggaccelerators.c eggaccelerators.h \ frequencies.c frequencies.h \ fullscreen.c fullscreen.h \ globals.c globals.h \ i18n.c i18n.h \ interface.c interface.h \ keyboard.c keyboard.h keysyms.h \ main.c \ mixer.c mixer.h \ osd.c osd.h \ overlay.c overlay.h \ plugin_properties.c plugin_properties.h \ plugins.c plugins.h plugin_common.h \ properties.c properties.h \ properties-handler.c properties-handler.h \ remote.c remote.h \ subtitle.c subtitle.h \ tveng.c tveng.h tveng_private.h \ tveng1.c tveng1.h \ tveng25.c tveng25.h \ tvengbktr.c tvengbktr.h \ tvengemu.c tvengemu.h \ tvengxv.c tvengxv.h \ v4linterface.c v4linterface.h \ vdr.c vdr.h \ video_xv.c video_x11.c video_gdkrgb.c video_mem.c \ x11stuff.c x11stuff.h \ xawtv.c xawtv.h \ yuv2rgb.c yuv2rgb.h gen_conv.h \ zapping.c zapping.h \ zconf.c zconf.h \ zgconf.c zgconf.h \ zimage.c zimage.h \ zmarshalers.c zmarshalers.h \ zmisc.c zmisc.h \ zmodel.c zmodel.h \ zspinslider.c zspinslider.h \ zstack.c zstack.h \ zvbi.c zvbi.h \ zvideo.c zvideo.h zapping_LDADD = \ $(top_builddir)/common/libcommon.a \ $(top_builddir)/libtv/libtv.la \ $(top_builddir)/libvbi/libvbi.la \ $(gen_conv_lib) \ @PACKAGE_LIBS@ \ @PYTHON_LIBS@ \ @X_LIBS@ \ -lX11 \ @X_DPMS_LIBS@ \ @X_XINERAMA_LIBS@ \ @X_XF86DGA_LIBS@ \ @X_XF86VMODE_LIBS@ \ @X_XV_LIBS@ \ @ZVBI_LIBS@ \ @PNG_LIBS@ \ @ARTS_LIBS@ \ @ESD_LIBS@ \ @LIBXML_LIBS@ zapping_LDFLAGS = -export-dynamic zapping_remote_SOURCES = \ zapping_remote.c zapping_remote_LDADD = \ @X_LIBS@ \ -lX11 \ @X_XMU_LIBS@ all: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj .s $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu src/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh clean-noinstLIBRARIES: -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) libgen_conv.a: $(libgen_conv_a_OBJECTS) $(libgen_conv_a_DEPENDENCIES) -rm -f libgen_conv.a $(libgen_conv_a_AR) libgen_conv.a $(libgen_conv_a_OBJECTS) $(libgen_conv_a_LIBADD) $(RANLIB) libgen_conv.a install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)" @list='$(bin_PROGRAMS)'; for p in $$list; do \ p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ if test -f $$p \ || test -f $$p1 \ ; then \ f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \ else :; fi; \ done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; for p in $$list; do \ f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \ rm -f "$(DESTDIR)$(bindir)/$$f"; \ done clean-binPROGRAMS: @list='$(bin_PROGRAMS)'; for p in $$list; do \ f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ echo " rm -f $$p $$f"; \ rm -f $$p $$f ; \ done zapping$(EXEEXT): $(zapping_OBJECTS) $(zapping_DEPENDENCIES) @rm -f zapping$(EXEEXT) $(LINK) $(zapping_LDFLAGS) $(zapping_OBJECTS) $(zapping_LDADD) $(LIBS) zapping_remote$(EXEEXT): $(zapping_remote_OBJECTS) $(zapping_remote_DEPENDENCIES) @rm -f zapping_remote$(EXEEXT) $(LINK) $(zapping_remote_LDFLAGS) $(zapping_remote_OBJECTS) $(zapping_remote_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/arts.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/audio.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/capture.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/channel_editor.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cmd.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/csconvert.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eggaccelerators.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eggcellrendererkeys.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/esd.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/frequencies.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fullscreen.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/globals.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/i18n.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/interface.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/keyboard.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/main.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mixer.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/osd.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/oss.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/overlay.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/plugin_properties.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/plugins.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/properties-handler.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/properties.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/remote.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/subtitle.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tveng.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tveng1.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tveng25.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tvengbktr.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tvengemu.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tvengxv.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/v4linterface.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vdr.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/video_gdkrgb.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/video_mem.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/video_x11.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/video_xv.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/x11stuff.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xawtv.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/yuv2rgb.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zapping.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zapping_remote.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zconf.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zgconf.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zimage.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zmarshalers.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zmisc.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zmodel.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zspinslider.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zstack.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zvbi.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zvideo.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< .s.o: $(CCASCOMPILE) -c $< .s.obj: $(CCASCOMPILE) -c `$(CYGPATH_W) '$<'` .s.lo: $(LTCCASCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool uninstall-info-am: ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) check-am all-am: Makefile $(LIBRARIES) $(PROGRAMS) installdirs: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(mkdir_p) "$$dir"; \ done install: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) clean: clean-am clean-am: clean-binPROGRAMS clean-generic clean-libtool \ clean-noinstLIBRARIES mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-libtool distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-exec-am: install-binPROGRAMS install-info: install-info-am install-man: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS uninstall-info-am .PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ clean-generic clean-libtool clean-noinstLIBRARIES ctags \ distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-binPROGRAMS \ install-data install-data-am install-exec install-exec-am \ install-info install-info-am install-man install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags uninstall uninstall-am uninstall-binPROGRAMS \ uninstall-info-am zmarshalers.c: zmarshalers.list @GLIB_GENMARSHAL@ --prefix=z_marshal $< --body > $@ zmarshalers.h: zmarshalers.list @GLIB_GENMARSHAL@ --prefix=z_marshal $< --header > $@ # No zapzilla in this version. When it returns this rule should be # replaced by install-exec-local instead of overriding install-bin. # install-binPROGRAMS: $(bin_PROGRAMS) # $(mkinstalldirs) $(DESTDIR)$(bindir) # $(INSTALL_PROGRAM) zapping $(DESTDIR)$(bindir) # ln -sf $(DESTDIR)$(bindir)/zapping $(DESTDIR)$(bindir)/zapzilla # # uninstall-binPROGRAMS: # rm -f $(DESTDIR)$(bindir)/zapping # rm -f $(DESTDIR)$(bindir)/zremote # rm -f $(DESTDIR)$(bindir)/zapzilla # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������zapping-0.10cvs6/src/video_mem.c�������������������������������������������������������������������� 644 � 764 � 144 � 7310 10417055776 11721� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Zapping (TV viewer for the Gnome Desktop) * Copyright (C) 2002 Iaki Garca Etxebarria * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /** * Mem backend. This doesn't provide blitting capabilities, just the * necessary memory allocation/deallocation. Used when it isn't * possible to display a given format but we need it anyway (recording * YUV data without Xv displays, for example). */ #ifdef HAVE_CONFIG_H # include "config.h" #endif #include <gdk/gdkx.h> #include <gtk/gtk.h> #include <stdlib.h> #include "common/math.h" #define ZCONF_DOMAIN "/zapping/options/main/" #include "zconf.h" #include "globals.h" #include "zimage.h" #include "zmisc.h" #include "capture.h" #include "x11stuff.h" struct _zimage_private { guchar *data; }; static zimage* planar_image_new (const tv_pixel_format *pf, guint w, guint h) { guchar *data; zimage *image; zimage_private *pimage; unsigned int y_size; unsigned int uv_size; if (0 != ((w & pf->hmask) | (h & pf->vmask))) { g_warning ("YUV420 formats require even dimensions"); return NULL; } y_size = w * h; uv_size = y_size >> (pf->uv_hshift + pf->uv_vshift); data = g_malloc (y_size + uv_size * 2); image = zimage_create_object (); pimage = image->priv = g_malloc0 (sizeof (*pimage)); pimage->data = data; image->fmt.width = w; image->fmt.height = h; image->fmt.pixel_format = tv_pixel_format_from_pixfmt (pf->pixfmt); image->fmt.bytes_per_line[0] = w; image->fmt.size = y_size + uv_size * 2; image->img = data; image->fmt.offset[1] = y_size + pf->vu_order * uv_size; image->fmt.offset[2] = y_size + (pf->vu_order ^ 1) * uv_size; image->fmt.bytes_per_line[1] = w >> pf->uv_hshift; image->fmt.bytes_per_line[2] = w >> pf->uv_hshift; return image; } static zimage* image_new (tv_pixfmt pixfmt, guint w, guint h) { guchar *data; zimage *image; zimage_private *pimage; const tv_pixel_format *pf; guint bpl, size; pf = tv_pixel_format_from_pixfmt (pixfmt); assert (NULL != pf); if (pf->n_planes > 1) return planar_image_new (pf, w, h); bpl = (w * pf->bits_per_pixel) >> 3; size = h * bpl; data = g_malloc (size); image = zimage_create_object (); pimage = image->priv = g_malloc0 (sizeof (*pimage)); pimage->data = data; image->fmt.width = w; image->fmt.height = h; image->fmt.pixel_format = tv_pixel_format_from_pixfmt (pixfmt); image->fmt.bytes_per_line[0] = bpl; image->fmt.size = size; image->img = data; return image; } static void image_destroy (zimage *image) { zimage_private *pimage = image->priv; g_free (pimage->data); g_free (pimage); } static tv_pixfmt_set supported_formats (void) { /* No formats displayable. */ return 0; } static video_backend mem = { .name = "Memory backend", .image_new = image_new, .image_destroy = image_destroy, .supported_formats = supported_formats, }; void add_backend_mem (void); void add_backend_mem (void) { tv_pixfmt pixfmt; for (pixfmt = 0; pixfmt < TV_MAX_PIXFMTS; ++pixfmt) if (TV_PIXFMT_SET_ALL & TV_PIXFMT_SET (pixfmt)) register_video_backend (pixfmt, &mem); } ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������zapping-0.10cvs6/src/video_x11.c�������������������������������������������������������������������� 644 � 764 � 144 � 11334 10173357430 11564� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Zapping (TV viewer for the Gnome Desktop) * Copyright (C) 2002 Iaki Garca Etxebarria * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /** * X11 backend. Actually this should be named video_gdkimage, but since * video_gdkimage is a bit too long and this kind of blitter is * typically dubbed x11, just go with that name. No X specific code * in here, though. */ #ifdef HAVE_CONFIG_H # include "config.h" #endif #include <gdk/gdkx.h> #include <gtk/gtk.h> #include <stdlib.h> #define ZCONF_DOMAIN "/zapping/options/main/" #include "zconf.h" #include "globals.h" #include "zimage.h" #include "zmisc.h" #include "capture.h" #include "x11stuff.h" static GdkWindow *window = NULL; static GdkGC *gc = NULL, *black_gc = NULL; static tv_pixfmt x11_pixfmt; struct _zimage_private { GdkImage *image; }; static zimage* image_new (tv_pixfmt pixfmt, guint w, guint h) { zimage *new_image; zimage_private *pimage; GdkImage *image; g_assert (pixfmt == x11_pixfmt); image = gdk_image_new (GDK_IMAGE_FASTEST, gdk_visual_get_system (), (gint) w, (gint) h); if (!image) return NULL; if ((guint) image->width != w || (guint) image->height != h) { g_object_unref (G_OBJECT (image)); return NULL; } pimage = g_malloc0 (sizeof (*pimage)); new_image = zimage_create_object (); new_image->priv = pimage; pimage->image = image; new_image->fmt.width = w; new_image->fmt.height = h; new_image->fmt.pixel_format = tv_pixel_format_from_pixfmt (pixfmt); new_image->fmt.offset[0] = 0; new_image->fmt.bytes_per_line[0] = image->bpl; new_image->fmt.size = image->bpl * image->height; new_image->img = image->mem; return new_image; } /* Clear canvas minus the image */ static void clear_canvas (GdkWindow *canvas, gint w, gint h, gint iw, int ih) { gint y = (h - ih) >> 1; gint h2 = (h + ih) >> 1; gint x = (w - iw) >> 1; gint w2 = (w + iw) >> 1; if (y > 0) gdk_draw_rectangle (canvas, black_gc, TRUE, 0, 0, w, y); if (h2 > 0) gdk_draw_rectangle (canvas, black_gc, TRUE, 0, y + ih, w, h2); if (x > 0) gdk_draw_rectangle (canvas, black_gc, TRUE, 0, y, x, ih); if (w2 > 0) gdk_draw_rectangle (canvas, black_gc, TRUE, x + iw, y, w2, ih); } static void image_put (zimage *image, guint w, guint h) { zimage_private *pimage = image->priv; gint iw = pimage->image->width, ih = pimage->image->height; g_assert (window != NULL); clear_canvas (window, w, h, iw, ih); gdk_draw_image (window, gc, pimage->image, 0, 0, (w - iw)/2, (h - ih)/2, iw, ih); gdk_display_flush (gdk_display_get_default ()); } static void image_destroy (zimage *image) { zimage_private *pimage = image->priv; g_object_unref (G_OBJECT (pimage->image)); g_free (pimage); } static void set_destination (GdkWindow *_w, GdkGC *_gc, tveng_device_info *info _unused_) { GdkColor black = {0, 0, 0, 0}; /* set_ and _unset will be called multiple times */ if ((window == _w) && (gc == _gc)) return; window = _w; gc = _gc; if (black_gc) g_object_unref (G_OBJECT (black_gc)); black_gc = gdk_gc_new (window); gdk_gc_copy (black_gc, gc); gdk_gc_set_fill (black_gc, GDK_SOLID); gdk_gc_set_rgb_fg_color (gc, &black); gdk_gc_set_rgb_bg_color (gc, &black); } static void unset_destination(tveng_device_info *info _unused_) { /* see comment in set_destination */ if ((!window) && (!gc)) return; window = NULL; gc = NULL; g_object_unref (G_OBJECT (black_gc)); black_gc = NULL; } static tv_pixfmt_set supported_formats (void) { return TV_PIXFMT_SET (x11_pixfmt); } static video_backend x11 = { .name = "X11 PutImage", .set_destination = set_destination, .unset_destination = unset_destination, .image_new = image_new, .image_destroy = image_destroy, .image_put = image_put, .supported_formats = supported_formats, }; void add_backend_x11 (void); void add_backend_x11 (void) { /* Same for all screens. */ x11_pixfmt = screens->target.format.pixel_format->pixfmt; g_assert (TV_PIXFMT_UNKNOWN != x11_pixfmt); g_assert (TV_PIXFMT_IS_PACKED (x11_pixfmt)); register_video_backend (x11_pixfmt, &x11); } ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������zapping-0.10cvs6/src/properties.c������������������������������������������������������������������� 644 � 764 � 144 � 65270 10371711036 12165� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Zapping (TV viewer for the Gnome Desktop) * Copyright (C) 2000-2001 Iaki Garca Etxebarria * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /** * This is just the properties "shell" code, that is, the code that * manages the dialog. * To see the code that manages the properties themselves, look at * properties-handler.c * * The overall scheme of things is as follows: * - Each module interested in adding something to the properties * dialog registers itself as a property_handler. * - When the dialog is being built, the 'add' method of the * handler is called, the handler should add groups and items as * necessary. The shell code takes care of detecting changes and * modifying the 'Apply' status as necessary, so * gnome_property_box_changed is gone to a better place. * - When apply is hit, the apply method of the handlers owning * the 'dirty' pages is called, passing the dirty page. * - Similarly for help and cancel. * - The rest of the housekeeping is left to the handlers. */ /* XXX gtk+ 2.3 GtkOptionMenu, Gnome entry, font picker, color picker */ #undef GTK_DISABLE_DEPRECATED #undef GNOME_DISABLE_DEPRECATED #ifdef HAVE_CONFIG_H # include "config.h" #endif #include <gnome.h> #define ZCONF_DOMAIN "/zapping/internal/properties/" #include "zconf.h" #include "interface.h" #include "properties.h" #include "zmisc.h" #include "remote.h" #include "globals.h" static GtkDialog *PropertiesDialog = NULL; /* Only you.. */ static property_handler *handlers = NULL; static gint num_handlers = 0; /** * Signals that the given page has been modified, mark the page as * dirty and set Apply sensitive. */ static void page_modified (GtkDialog *dialog, gint page_id) { GtkNotebook *notebook = GTK_NOTEBOOK (lookup_widget(GTK_WIDGET(dialog), "properties-notebook")); GtkWidget *page = gtk_notebook_get_nth_page(notebook, page_id); g_object_set_data(G_OBJECT(page), "properties-dirty", GINT_TO_POINTER(TRUE)); gtk_dialog_set_response_sensitive(dialog, GTK_RESPONSE_APPLY, TRUE); } static void modify_page (GtkWidget *widget, gpointer page_id_ptr) { GtkDialog *dialog = GTK_DIALOG (g_object_get_data(G_OBJECT(widget), "modify_page_dialog")); gint page_id = GPOINTER_TO_INT(page_id_ptr); page_modified(dialog, page_id); } void z_property_item_modified (GtkWidget *widget) { GtkWidget *notebook = lookup_widget(widget, "properties-notebook"); /* Walk till our parent is the notebook */ while (widget && widget->parent != notebook && widget->parent) { if (GTK_IS_MENU(widget)) widget = gtk_menu_get_attach_widget (GTK_MENU (widget) ); else widget = widget -> parent; } if (!widget || !widget->parent) { g_warning("Property item ancestor not found!!"); return; } page_modified(GTK_DIALOG(gtk_widget_get_toplevel(notebook)), gtk_notebook_page_num(GTK_NOTEBOOK(notebook), widget)); } static void font_set_bridge (GtkWidget *widget, const gchar *new_font _unused_, gpointer page_id_ptr) { GtkDialog *dialog = GTK_DIALOG (g_object_get_data(G_OBJECT(widget), "modify_page_dialog")); gint page_id = GPOINTER_TO_INT(page_id_ptr); page_modified(dialog, page_id); } static void color_set_bridge (GtkWidget *widget, guint r _unused_, guint g _unused_, guint b _unused_, guint a _unused_, gpointer page_id_ptr) { GtkDialog *dialog = GTK_DIALOG (g_object_get_data(G_OBJECT(widget), "modify_page_dialog")); gint page_id = GPOINTER_TO_INT(page_id_ptr); page_modified(dialog, page_id); } static void color_set_bridge2 (GtkWidget *widget, gpointer page_id_ptr) { GtkDialog *dialog = GTK_DIALOG (g_object_get_data(G_OBJECT(widget), "modify_page_dialog")); gint page_id = GPOINTER_TO_INT(page_id_ptr); page_modified(dialog, page_id); } /** * Makes modifications on the widgets descending from widget trigger a * page_modifed call. */ static void autoconnect_modify (GtkDialog *dialog, GtkWidget *widget, gint page_id) { if (GTK_IS_CONTAINER(widget)) { GList *children = gtk_container_get_children(GTK_CONTAINER(widget)); while (children) { autoconnect_modify(dialog, GTK_WIDGET(children->data), page_id); children = children->next; } } if (GNOME_IS_FILE_ENTRY(widget)) { widget = gnome_file_entry_gtk_entry(GNOME_FILE_ENTRY(widget)); autoconnect_modify(dialog, widget, page_id); } else if (GNOME_IS_ENTRY(widget)) { widget = gnome_entry_gtk_entry(GNOME_ENTRY(widget)); autoconnect_modify(dialog, widget, page_id); } else if (GTK_IS_TOGGLE_BUTTON(widget)) { g_signal_connect(G_OBJECT(widget), "toggled", G_CALLBACK(modify_page), GINT_TO_POINTER(page_id)); } else if (GTK_IS_ENTRY(widget)) { g_signal_connect(G_OBJECT(widget), "changed", G_CALLBACK(modify_page), GINT_TO_POINTER(page_id)); } else if (GTK_IS_COMBO_BOX(widget)) { g_signal_connect(G_OBJECT(widget), "changed", G_CALLBACK(modify_page), GINT_TO_POINTER(page_id)); } else if (GTK_IS_OPTION_MENU(widget)) { g_signal_connect(G_OBJECT(widget), "changed", G_CALLBACK(modify_page), GINT_TO_POINTER(page_id)); } else if (GNOME_IS_FONT_PICKER(widget)) { g_signal_connect(G_OBJECT(widget), "font-set", G_CALLBACK(font_set_bridge), GINT_TO_POINTER(page_id)); } else if (GNOME_IS_COLOR_PICKER(widget)) { g_signal_connect(G_OBJECT(widget), "color-set", G_CALLBACK(color_set_bridge), GINT_TO_POINTER(page_id)); } else if (GTK_IS_RANGE(widget)) { /* Weird cast to spare some useless code */ widget = (GtkWidget*)gtk_range_get_adjustment(GTK_RANGE(widget)); g_signal_connect(G_OBJECT(widget), "value-changed", G_CALLBACK(modify_page), GINT_TO_POINTER(page_id)); } else if (GTK_IS_COLOR_BUTTON(widget)) { g_signal_connect(G_OBJECT(widget), "color-set", G_CALLBACK(color_set_bridge2), GINT_TO_POINTER(page_id)); } g_object_set_data(G_OBJECT(widget), "modify_page_dialog", dialog); } /** * Note that the structure is * + nsbutton (type = gtk_radio_button, descendant of gtk_button) * + group button (type gtk_button) * + group contents (packed in a vbox) * This explains the -1, +2 etc magic. */ static void find_selected_group (GtkWidget *widget, gint *group) { GtkContainer *group_container = GTK_CONTAINER(lookup_widget(widget, "group-container")); if (GTK_IS_BUTTON(widget)) return; /* Nothing to be done for buttons */ if (GTK_WIDGET_VISIBLE(widget)) *group = (g_list_index(gtk_container_get_children(group_container), widget)-1)/2; } /** * Returns the vbox associated with the nth group. */ static GtkWidget* nth_group_contents (gpointer dialog, guint n) { GtkContainer *group_container = GTK_CONTAINER (lookup_widget(GTK_WIDGET(dialog), "group-container")); return GTK_WIDGET((g_list_nth_data (gtk_container_get_children(group_container), 2*n + 2))); } /* Gets the currently selected group and item, or sets to -1 both group and item if nothing is selected yet */ static void get_cur_sel (GtkWidget *dialog, gint *group, gint *item) { GtkContainer *group_container = GTK_CONTAINER(lookup_widget(GTK_WIDGET(dialog), "group-container")); GtkWidget *group_widget; GSList *group_list; gint count = 0; *group = *item = -1; gtk_container_foreach(group_container, (GtkCallback)find_selected_group, group); if (*group == -1) return; /* Nothing shown yet */ group_widget = nth_group_contents(dialog, (guint) *group); group_list = g_object_get_data(G_OBJECT(group_widget), "group_list"); while (group_list) { if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(group_list->data))) *item = count; count ++; group_list = group_list->next; } /* For some weird reason the group list is reversed ?!?!?! */ *item = count - *item; } GtkWidget * get_properties_page (GtkWidget *sth, const gchar *group, const gchar *item) { gchar *buf = g_strdup_printf("group-%s-item-%s", group, item); GtkWidget *widget = find_widget(sth, buf); g_free(buf); return widget; } static void generic_apply (GtkDialog *dialog) { gint i = 0; GtkWidget *page; GtkNotebook *notebook = GTK_NOTEBOOK(lookup_widget(GTK_WIDGET(dialog), "properties-notebook")); while ((page = gtk_notebook_get_nth_page(notebook, i++))) if (g_object_get_data(G_OBJECT(page), "properties-dirty")) { property_handler *handler = (property_handler*) g_object_get_data(G_OBJECT(page), "property-handler"); handler->apply(dialog, page); g_object_set_data(G_OBJECT(page), "properties-dirty", NULL); } } static void generic_cancel (GtkDialog *dialog) { gint i = 0; GtkWidget *page; GtkNotebook *notebook = GTK_NOTEBOOK(lookup_widget(GTK_WIDGET(dialog), "properties-notebook")); while ((page = gtk_notebook_get_nth_page(notebook, i++))) { property_handler *handler = (property_handler*) g_object_get_data(G_OBJECT(page), "property-handler"); g_object_set_data(G_OBJECT(page), "properties-dirty", NULL); /* Be warned this may destroy page. */ if (handler && handler->cancel) handler->cancel(dialog, page); } } static void generic_help (GtkDialog *dialog) { GtkNotebook *notebook = GTK_NOTEBOOK(lookup_widget(GTK_WIDGET (dialog), "properties-notebook")); gint cur_page = gtk_notebook_get_current_page(notebook); GtkWidget *page = gtk_notebook_get_nth_page(notebook, cur_page); property_handler *handler = (property_handler*) g_object_get_data(G_OBJECT(page), "property-handler"); if (!handler) { /* All pages must have a handler except the first (Z logo) */ g_assert(cur_page == 0); return; } handler->help(dialog, page); } static void generic_close (GtkWidget *dialog) { gint cur_group, cur_item; gchar *group_name = NULL; /* Remember last open group */ get_cur_sel(dialog, &cur_group, &cur_item); if (cur_group != -1 && (group_name = g_object_get_data(G_OBJECT (nth_group_contents(dialog, (guint) cur_group)), "group-name"))) zcs_char(group_name, "last_group"); PropertiesDialog = NULL; } static void on_properties_response (GtkDialog *dialog, gint response, gpointer unused _unused_) { switch (response) { case GTK_RESPONSE_APPLY: generic_apply (dialog); gtk_dialog_set_response_sensitive (dialog, GTK_RESPONSE_APPLY, FALSE); return; /* Do not destroy */ case GTK_RESPONSE_HELP: generic_help (dialog); return; /* Do not destroy */ case GTK_RESPONSE_OK: generic_apply (dialog); break; case GTK_RESPONSE_CANCEL: generic_cancel (dialog); break; default: /* Some sort of delete event or similar */ break; } /* Remember settings and close */ generic_close (GTK_WIDGET (dialog)); gtk_widget_destroy (GTK_WIDGET (dialog)); } /** * Makes sure that parent is at least as wide as widget. */ static void ensure_width (GtkWidget *widget, GtkWidget *parent) { GtkRequisition request; gint req_max_width; req_max_width = z_object_get_int_data (G_OBJECT (parent), "req_max_width"); gtk_widget_size_request(widget, &request); if (request.width > req_max_width) { req_max_width = request.width; g_object_set_data(G_OBJECT(parent), "req_max_width", GINT_TO_POINTER(req_max_width)); gtk_widget_set_size_request(parent, req_max_width, -1); } } /** * Connected to containers in the sidebar. Makes sure that there's * enough room for displaying everything without resizes. * @container: The container being populated. * @widget: The widget being added. * @sidebar: Pointer to the sidebar we are managing. */ static void on_container_add (GtkWidget *container, GtkWidget *widget, GtkWidget *sidebar) { GtkRequisition request; gint req_button_height; gint req_max_height; /* Sum of all the buttons height up to now */ req_button_height = z_object_get_int_data (G_OBJECT (sidebar), "req_button_height"); /* Biggest subgroup allocated */ req_max_height = z_object_get_int_data (G_OBJECT (sidebar), "req_max_height"); /* Adding a new group */ if (container == sidebar && GTK_IS_BUTTON(widget)) { gtk_widget_size_request(widget, &request); req_button_height += request.height; g_object_set_data(G_OBJECT(sidebar), "req_button_height", GINT_TO_POINTER(req_button_height)); gtk_widget_set_size_request(sidebar, -1, req_button_height + req_max_height); } /* Adding a new item to a group */ else if (GTK_IS_BUTTON(widget)) { /* Get size request for the parent container */ gtk_widget_size_request(container, &request); if (req_max_height < request.height) { req_max_height = request.height; g_object_set_data(G_OBJECT(sidebar), "req_max_height", GINT_TO_POINTER(req_max_height)); gtk_widget_set_size_request(sidebar, -1, req_button_height + req_max_height); } } ensure_width(widget, sidebar); } static void on_radio_toggled (GtkWidget *selector, gpointer page_id_ptr) { GtkNotebook * notebook = GTK_NOTEBOOK(lookup_widget(selector, "properties-notebook")); gint page_id = GPOINTER_TO_INT(page_id_ptr); gtk_notebook_set_current_page(notebook, page_id); } static void build_properties_contents (GtkDialog *dialog) { GtkWidget *hbox; GtkWidget *frame; GtkNotebook *notebook; GtkWidget *vbox; GtkWidget *logo; GtkWidget *nsbutton; gint i, page_count = 0; hbox = gtk_hbox_new(FALSE, 3); gtk_box_pack_start_defaults(GTK_BOX(dialog->vbox), hbox); frame = gtk_frame_new(NULL); gtk_frame_set_shadow_type(GTK_FRAME(frame), GTK_SHADOW_IN); gtk_box_pack_start(GTK_BOX(hbox), frame, FALSE, FALSE, 0); vbox = gtk_vbox_new(FALSE, 0); gtk_widget_show(vbox); gtk_container_add(GTK_CONTAINER(frame), vbox); register_widget(NULL, vbox, "group-container"); /* Create a notebook for holding the pages. Note that we don't rely on any of the notebook's features, we select the active page programatically */ /* Some eye candy first */ frame = gtk_frame_new(NULL); gtk_frame_set_shadow_type(GTK_FRAME(frame), GTK_SHADOW_IN); gtk_box_pack_start_defaults(GTK_BOX(hbox), frame); /* Notebook */ notebook = GTK_NOTEBOOK(gtk_notebook_new()); gtk_notebook_set_show_tabs(notebook, FALSE); gtk_notebook_set_show_border(notebook, FALSE); gtk_notebook_set_scrollable(notebook, FALSE); gtk_notebook_popup_disable(notebook); gtk_container_add(GTK_CONTAINER(frame), GTK_WIDGET(notebook)); register_widget(NULL, GTK_WIDGET(notebook), "properties-notebook"); /* Put our logo when nothing is selected yet */ if ((logo = z_load_pixmap ("logo.png"))) { GtkWidget *box; /* GdkColor color; */ box = gtk_frame_new (NULL); /* all i wanted was white bg and all i got was this lousy comment */ /* gdk_color_parse ("#FFFFFF", &color); */ /* gtk_widget_modify_bg (box, GTK_STATE_NORMAL, &color); */ gtk_container_add (GTK_CONTAINER (box), logo); gtk_misc_set_alignment (GTK_MISC (logo), 1.0, 1.0); gtk_notebook_append_page(notebook, box, gtk_label_new("")); page_count ++; /* No handler for this page */ } gtk_widget_show_all(hbox); /* Add the nothing selected button */ nsbutton = gtk_radio_button_new(NULL); gtk_box_pack_start(GTK_BOX(vbox), nsbutton, FALSE, TRUE, 0); g_object_set_data(G_OBJECT(vbox), "group_list", gtk_radio_button_get_group(GTK_RADIO_BUTTON(nsbutton))); /* Make property handlers build their pages */ for (i = 0; i<num_handlers; i++) { GtkWidget *page; handlers[i].add(dialog); while ((page = gtk_notebook_get_nth_page(notebook, page_count++))) { g_object_set_data(G_OBJECT(page), "property-handler", handlers + i); /* Connect widgets in these pages to modify events */ autoconnect_modify(dialog, page, page_count-1); } page_count--; } } static void on_properties_destroy (GtkObject * object _unused_, gpointer user_data _unused_) { GtkAction *action; action = gtk_action_group_get_action (zapping->generic_action_group, "Preferences"); z_action_set_sensitive (action, TRUE); PropertiesDialog = NULL; } GtkWidget* build_properties_dialog (void) { GtkDialog *dialog; if (PropertiesDialog) { gtk_window_present (GTK_WINDOW (PropertiesDialog)); return GTK_WIDGET(PropertiesDialog); } dialog = GTK_DIALOG(gtk_dialog_new_with_buttons (_("Zapping Properties"), GTK_WINDOW (zapping), GTK_DIALOG_DESTROY_WITH_PARENT, GTK_STOCK_OK, GTK_RESPONSE_OK, GTK_STOCK_APPLY, GTK_RESPONSE_APPLY, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, GTK_STOCK_HELP, GTK_RESPONSE_HELP, NULL)); if (zapping) { GtkAction *action; action = gtk_action_group_get_action (zapping->generic_action_group, "Preferences"); z_action_set_sensitive (action, FALSE); g_signal_connect (G_OBJECT (dialog), "destroy", G_CALLBACK (on_properties_destroy), NULL); } gtk_dialog_set_response_sensitive(dialog, GTK_RESPONSE_APPLY, FALSE); gtk_dialog_set_default_response (dialog, GTK_RESPONSE_OK); /* Connect the appropiate callbacks */ g_signal_connect (G_OBJECT (dialog), "response", G_CALLBACK (on_properties_response), NULL); PropertiesDialog = dialog; /* Build the rest of the dialog */ build_properties_contents(dialog); /* Open the last selected group */ open_properties_group(GTK_WIDGET(dialog), zcg_char(NULL, "last_group")); return GTK_WIDGET(dialog); } void append_properties_group (GtkDialog *dialog, const gchar *group, const gchar * group_i18n) { GtkWidget *button; GtkWidget *vbox = lookup_widget(GTK_WIDGET(dialog), "group-container"); GtkWidget *contents; gchar *buf; buf = g_strdup_printf("group-button-%s", group); if (find_widget(GTK_WIDGET(dialog), buf)) return; /* The given group already exists */ button = gtk_button_new_with_label(group_i18n); gtk_box_pack_start(GTK_BOX(vbox), button, FALSE, TRUE, 0); on_container_add(vbox, button, vbox); gtk_widget_show(button); register_widget(NULL, button, buf); z_signal_connect_const (G_OBJECT(button), "clicked", G_CALLBACK(open_properties_group), group); g_free(buf); buf = g_strdup_printf("group-contents-%s", group); contents = gtk_vbox_new(FALSE, 0); gtk_box_pack_start_defaults(GTK_BOX(vbox), contents); g_object_set_data_full(G_OBJECT(contents), "group-name", g_strdup(group), g_free); /* Note that we don't show() contents */ register_widget(NULL, contents, buf); g_free(buf); } void append_properties_page (GtkDialog *dialog, const gchar *group, const gchar *label, GtkWidget *pixmap, GtkWidget *page) { gchar *buf = g_strdup_printf("group-contents-%s", group); GtkWidget *contents = lookup_widget(GTK_WIDGET(dialog), buf); GtkWidget *radio; GtkWidget *container = lookup_widget(contents, "group-container"); GSList *group_list = g_object_get_data(G_OBJECT(container), "group_list"); GtkWidget *notebook = lookup_widget(GTK_WIDGET(dialog), "properties-notebook"); GtkWidget *vbox; GtkWidget *label_widget; guint page_id; radio = gtk_radio_button_new(group_list); gtk_toggle_button_set_mode(GTK_TOGGLE_BUTTON(radio), FALSE); gtk_box_pack_start(GTK_BOX(contents), radio, FALSE, TRUE, 0); gtk_widget_show(page); gtk_notebook_append_page(GTK_NOTEBOOK(notebook), page, gtk_label_new("")); page_id = gtk_notebook_page_num(GTK_NOTEBOOK(notebook), page); g_signal_connect(G_OBJECT(radio), "toggled", G_CALLBACK(on_radio_toggled), GINT_TO_POINTER(page_id)); group_list = gtk_radio_button_get_group(GTK_RADIO_BUTTON(radio)); g_object_set_data(G_OBJECT(container), "group_list", group_list); vbox = gtk_vbox_new(FALSE, 0); gtk_container_add(GTK_CONTAINER(radio), vbox); if (pixmap) gtk_box_pack_start_defaults(GTK_BOX(vbox), pixmap); label_widget = gtk_label_new(label); gtk_box_pack_start_defaults(GTK_BOX(vbox), label_widget); gtk_button_set_relief(GTK_BUTTON(radio), GTK_RELIEF_NONE); gtk_widget_show_all(radio); on_container_add(contents, radio, container); g_free(buf); buf = g_strdup_printf("group-%s-item-%s", group, label); register_widget(NULL, page, buf); g_free(buf); buf = g_strdup_printf("group-%s-item-%s-radio", group, label); register_widget(NULL, radio, buf); g_free(buf); } static void show_hide_foreach (GtkWidget *widget, GtkWidget *show) { if (GTK_IS_BUTTON(widget)) return; /* Nothing to be done for buttons */ if (widget == show) gtk_widget_show(widget); else gtk_widget_hide(widget); } void open_properties_group (GtkWidget *dialog, const gchar *group) { gchar *buf = g_strdup_printf("group-contents-%s", group); GtkWidget *contents = find_widget(dialog, buf); GtkContainer *group_container = GTK_CONTAINER (lookup_widget(dialog, "group-container")); gint cur_group, cur_item; if (!contents) { g_warning("Group %s not found in the properties", group); return; /* Not found */ } /* If the current selection is in a different group, switch to it */ get_cur_sel(dialog, &cur_group, &cur_item); if (cur_group == -1 || nth_group_contents(dialog, (guint) cur_group) != contents) gtk_container_foreach(GTK_CONTAINER(group_container), (GtkCallback)show_hide_foreach, contents); g_free(buf); } void open_properties_page (GtkWidget *dialog, const gchar *group, const gchar *item) { gchar *buf = g_strdup_printf("group-%s-item-%s-radio", group, item); GtkWidget *toggle = lookup_widget(GTK_WIDGET(dialog), buf); g_free(buf); if (!toggle) { g_warning("{%s, %s} not found in the properties", group, item); return; } open_properties_group(dialog, group); gtk_button_clicked(GTK_BUTTON(toggle)); } void standard_properties_add (GtkDialog *dialog, const SidebarGroup * groups, gint num_groups, const gchar *glade_file) { gint i, j; for (i = 0; i<num_groups; i++) { append_properties_group(dialog, groups[i].label, _(groups[i].label)); for (j = 0; j < groups[i].num_items; j++) { GtkWidget *pixmap; GtkWidget *page; pixmap = z_load_pixmap (groups[i].items[j].icon_name); if (groups[i].items[j].create) page = groups[i].items[j].create (); else page = build_widget(groups[i].items[j].widget, glade_file); g_object_set_data(G_OBJECT(page), "apply", groups[i].items[j].apply); g_object_set_data(G_OBJECT(page), "help", groups[i].items[j].help); z_object_set_const_data(G_OBJECT(page), "help_link_id", groups[i].items[j].help_link_id); g_object_set_data(G_OBJECT(page), "cancel", groups[i].items[j].cancel); append_properties_page(dialog, /* no i18n */ groups[i].label, _(groups[i].items[j].label), pixmap, page); if (groups[i].items[j].setup) groups[i].items[j].setup(page); } } } static void apply (GtkDialog *dialog _unused_, GtkWidget *page) { void (*page_apply)(GtkWidget *page) = g_object_get_data(G_OBJECT(page), "apply"); if (page_apply) page_apply(page); } static void help (GtkDialog *dialog _unused_, GtkWidget *page) { const gchar *link_id = g_object_get_data (G_OBJECT (page), "help_link_id"); void (*page_help)(GtkWidget *page) = g_object_get_data (G_OBJECT (page), "help"); if (link_id) { z_help_display (NULL, "zapping", link_id); } else if (page_help) { page_help (page); } else { /* XXX disable help button instead. */ ShowBox ("No help available", GTK_MESSAGE_WARNING); } } static void cancel (GtkDialog *dialog _unused_, GtkWidget *page) { void (*page_cancel)(GtkWidget *page) = g_object_get_data(G_OBJECT(page), "cancel"); if (page_cancel) page_cancel(page); } void prepend_property_handler (const property_handler *p) { gint i; if (!p->add) g_error("broken handler"); handlers = g_realloc(handlers, (num_handlers+1)*sizeof(handlers[0])); /* Move the existing handlers forward */ for (i=num_handlers; i>0; i--) memcpy(&handlers[i], &handlers[i-1], sizeof(*p)); memcpy(&handlers[0], p, sizeof(*p)); /* When not given, the default handlers are used (valid only when the page is built with standard_properties_add) */ if (!handlers[0].apply) handlers[0].apply = apply; if (!handlers[0].help) handlers[0].help = help; if (!handlers[0].cancel) handlers[0].cancel = cancel; num_handlers++; } void append_property_handler (const property_handler *p) { if (!p->add) g_error("passing in a broken handler"); handlers = g_realloc(handlers, (num_handlers+1)*sizeof(handlers[0])); memcpy(&handlers[num_handlers], p, sizeof(*p)); /* When not given, the default handlers are used (valid only when the page is built with standard_properties_add) */ if (!handlers[num_handlers].apply) handlers[num_handlers].apply = apply; if (!handlers[num_handlers].help) handlers[num_handlers].help = help; if (!handlers[num_handlers].cancel) handlers[num_handlers].cancel = cancel; num_handlers++; } static PyObject * py_properties(PyObject *self _unused_, PyObject *args, PyObject *keywds) { char *group = NULL; char *item = NULL; const char *kwlist[] = {"group", "item", NULL}; GtkWidget *dialog; if (!PyArg_ParseTupleAndKeywords(args, keywds, "|ss", kwlist, &group, &item)) g_error ("zapping.properties(|ss)"); if (item && !group) g_error ("Cannot open an item without knowing the group"); dialog = build_properties_dialog (); if (group) { if (item) open_properties_page (dialog, group, item); else open_properties_group (dialog, group); } gtk_widget_show (dialog); Py_INCREF(Py_None); return Py_None; } void startup_properties(void) { zcc_char(_("General Options"), "Selected properties group", "last_group"); cmd_register ("properties", (PyCFunction) py_properties, METH_VARARGS | METH_KEYWORDS); } void shutdown_properties(void) { g_free(handlers); handlers = NULL; num_handlers = 0; } ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������zapping-0.10cvs6/src/properties.h������������������������������������������������������������������� 644 � 764 � 144 � 10537 10127747500 12172� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#ifndef __PROPERTIES_H__ #define __PROPERTIES_H__ #include <gtk/gtk.h> /* A module handling a toplevel property page (new version) */ typedef struct { /* Add a property page to the properties dialog */ void (*add) ( GtkDialog *dialog ); /* Called when the OK or Apply buttons are pressed for a modified page. @page is the modified page */ void (*apply) ( GtkDialog *dialog, GtkWidget *page ); /* Called when the help button is pressed */ void (*help) ( GtkDialog *dialog, GtkWidget *page ); /* Called when the Cancel button is pressed for a modified page. @page is the modified page */ void (*cancel) ( GtkDialog *dialog, GtkWidget *page ); } property_handler; /* Register a set of callbacks to manage the properties */ /* prepend/append refer to the order in which the handlers are called to build the properties */ void prepend_property_handler (const property_handler *p); void append_property_handler (const property_handler *p); /** * Create a group with the given name. * @group: Name for the group. */ void append_properties_group (GtkDialog *dialog, const gchar *group, const gchar * group_i18n); /** * Sets up a properties dialog. */ GtkWidget * build_properties_dialog (void); /** * Opens a created group. * @group: Name you gave the group when creating it (not localized). */ void open_properties_group (GtkWidget *dialog, const gchar *group); /** * Opens the given property page. */ void open_properties_page (GtkWidget *dialog, const gchar *group, const gchar *item); /** * Appends to the dialog group the given page. * @group: Name of the group this page belongs to (not localized). * @label: Name you wish to give to this group. * @pixmap: Pixmap to show with the label, can be %NULL. * @page: The page contents. */ void append_properties_page (GtkDialog *dialog, const gchar *group, const gchar *label, GtkWidget *pixmap, GtkWidget *page); /** * @widget: Any widget in the dialog that contains the requested page. * @group: Group containing the desired item. * @item: name of the item to look for. * Returns the page associated with the given @group and @item, or %NULL * on error. */ GtkWidget * get_properties_page (GtkWidget *widget, const gchar *group, const gchar *item); /** * Call this when some widget in the property box is changed. * Usually you don't need to do this, since widgets are autoconnected * when you add the page. This is only needed when you add widgets to your * property page after adding it to the dialog (dynamic dialogs, for * example). * @widget: The modified widget. */ void z_property_item_modified (GtkWidget *widget); /** * Startup/shutdown */ void startup_properties(void); void shutdown_properties(void); /** * Useful structures and definitions for property handlers. * This isn't required (you can always add pages by hand), but using * these routines/structs helps a big deal. */ typedef struct { /* Label for the entry */ const gchar *label; const gchar *icon_name; /* relative to the pixmaps installation dir */ const gchar *widget; /* Notebook page to use (must be in zapping.glade) */ /* Apply the current config to the dialog */ void (*setup)(GtkWidget *widget); /* Apply the dialog settings to the config, if NULL, a default handler will be used (only valid when created with standard_properties_add) */ void (*apply)(GtkWidget *widget); /* Help about this page (or NULL) */ void (*help)(GtkWidget *widget); /* See apply */ void (*cancel)(GtkWidget *widget); /* Link id in zapping.xml, instead of help handler. */ const gchar *help_link_id; /* Function to create preferences instead of glade file name in standard_properties_add(), .widget and .setup above. */ GtkWidget * (*create)(void); } SidebarEntry; typedef struct { /* Label */ const gchar *label; /* Contents of the group */ SidebarEntry *items; /* Number of entries in the group */ gint num_items; } SidebarGroup; /** * Add the groups/items that groups contains. * @dialog: The properties dialog. * @groups: List of groups/items to add. * @num_groups: Groups to add from group, typically acount(groups) * @glade_file: glade file containing the widgets. */ void standard_properties_add (GtkDialog *dialog, const SidebarGroup * groups, gint num_groups, const gchar *glade_file); #endif /* properties.h */ �����������������������������������������������������������������������������������������������������������������������������������������������������������������zapping-0.10cvs6/src/properties-handler.c����������������������������������������������������������� 644 � 764 � 144 � 104052 10400112356 13601� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Zapping (TV viewer for the Gnome Desktop) * Copyright (C) 2001 Iaki Garca Etxebarria * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /** * Properties handler for Z. Uses the shell code from properties.h, * you can think of this code as the "model" for the properties * structure, while properties.c is the "view". Buzzwords, ya know :-) */ /* XXX gtk+ 2.3 GtkOptionMenu, Gnome entry */ #undef GTK_DISABLE_DEPRECATED #undef GNOME_DISABLE_DEPRECATED #ifdef HAVE_CONFIG_H # include "config.h" #endif #include <gnome.h> #include "interface.h" #include "properties.h" #include "properties-handler.h" #include "zmisc.h" #define ZCONF_DOMAIN "/zapping/internal/callbacks/" #include "zconf.h" #include "osd.h" #include "x11stuff.h" #include "keyboard.h" #include "remote.h" #include "globals.h" #include "zvideo.h" #include "eggcellrendererkeys.h" #include "zgconf.h" /* Property handlers for the different pages */ /* Device info */ static void di_setup (GtkWidget *page) { GtkWidget *widget; gchar *buffer; GtkNotebook *nb; GtkWidget * nb_label; GtkWidget * nb_body; const tv_video_line *l; const struct tveng_caps *caps; caps = tv_get_caps (zapping->info); /* The device name */ widget = lookup_widget(page, "label27"); gtk_label_set_text(GTK_LABEL(widget), caps->name); /* Minimum capture dimensions */ widget = lookup_widget(page, "label28"); z_label_set_text_printf (GTK_LABEL(widget), "%d x %d", caps->minwidth, caps->minheight); /* Maximum capture dimensions */ widget = lookup_widget(page, "label29"); z_label_set_text_printf (GTK_LABEL(widget), "%d x %d", caps->maxwidth, caps->maxheight); /* Reported device capabilities */ widget = lookup_widget(page, "label30"); buffer = g_strdup_printf("%s%s%s%s%s%s%s%s%s%s", caps->flags & TVENG_CAPS_CAPTURE ? _("Can capture to memory.\n") : "", caps->flags & TVENG_CAPS_TUNER ? _("Has some tuner.\n") : "", caps->flags & TVENG_CAPS_TELETEXT ? _("Supports the teletext service.\n") : "", caps->flags & TVENG_CAPS_OVERLAY ? _("Can overlay the image.\n") : "", caps->flags & TVENG_CAPS_CHROMAKEY ? _("Can chromakey the image.\n") : "", caps->flags & TVENG_CAPS_CLIPPING ? _("Clipping rectangles are supported.\n") : "", caps->flags & TVENG_CAPS_FRAMERAM ? _("Framebuffer memory is overwritten.\n") : "", caps->flags & TVENG_CAPS_SCALES ? _("The capture can be scaled.\n") : "", caps->flags & TVENG_CAPS_MONOCHROME ? _("Only monochrome is available\n") : "", caps->flags & TVENG_CAPS_SUBCAPTURE ? _("The capture can be zoomed\n") : ""); /* Delete the last '\n' to save some space */ if ((strlen(buffer) > 0) && (buffer[strlen(buffer)-1] == '\n')) buffer[strlen(buffer)-1] = 0; gtk_label_set_text(GTK_LABEL(widget), buffer); g_free(buffer); nb = GTK_NOTEBOOK (lookup_widget(page, "notebook2")); if (!tv_video_inputs (zapping->info)) { nb_label = gtk_label_new(_("No available inputs")); gtk_widget_show (nb_label); nb_body = gtk_label_new(_("Your video device has no inputs")); gtk_widget_show(nb_body); gtk_notebook_append_page(nb, nb_body, nb_label); gtk_widget_set_sensitive(GTK_WIDGET(nb), FALSE); } else for (l = tv_next_video_input (zapping->info, NULL); l; l = tv_next_video_input (zapping->info, l)) { char *type_str; nb_label = gtk_label_new(l->label); gtk_widget_show (nb_label); if (l->type == TV_VIDEO_LINE_TYPE_TUNER) type_str = _("TV input"); else type_str = _("Camera"); buffer = g_strdup_printf ("%s", type_str); nb_body = gtk_label_new (buffer); g_free (buffer); gtk_widget_show (nb_body); gtk_notebook_append_page(nb, nb_body, nb_label); } /* Selected video device */ widget = lookup_widget(page, "fileentry1"); widget = gnome_file_entry_gtk_entry(GNOME_FILE_ENTRY(widget)); gtk_entry_set_text(GTK_ENTRY(widget), zconf_get_string(NULL, "/zapping/options/main/video_device")); /* Current controller */ { const char *buffer; widget = lookup_widget(page, "label31"); tveng_describe_controller(NULL, &buffer, zapping->info); gtk_label_set_text(GTK_LABEL(widget), buffer); } } static void di_apply (GtkWidget *page) { GtkWidget *widget; gchar *text; widget = lookup_widget(page, "fileentry1"); /* Video device entry */ text = gnome_file_entry_get_full_path (GNOME_FILE_ENTRY(widget), TRUE); if (text) zconf_set_string(text, "/zapping/options/main/video_device"); g_free(text); /* In the docs it says this should be freed */ } /* * Favorite picture sizes */ #define ZCONF_PICTURE_SIZES "/zapping/options/main/picture_sizes" typedef struct picture_size { struct picture_size * next; guint width; guint height; z_key key; } picture_size; static picture_size * favorite_picture_sizes; static inline void picture_size_delete (picture_size * ps) { g_free (ps); } static inline picture_size * picture_size_new (guint width, guint height, z_key key) { picture_size *ps; ps = g_malloc0 (sizeof (*ps)); ps->width = width; ps->height = height; ps->key = key; return ps; } static void picture_sizes_delete (void) { picture_size *ps; while ((ps = favorite_picture_sizes)) { favorite_picture_sizes = ps->next; picture_size_delete (ps); } } gboolean on_picture_size_key_press (GtkWidget * widget, GdkEventKey * event, gpointer user_data _unused_) { picture_size *ps; z_key key; key.key = gdk_keyval_to_lower (event->keyval); key.mask = event->state; /* fprintf(stderr, "key %x %x\n", key.key, key.mask); */ for (ps = favorite_picture_sizes; ps; ps = ps->next) if (z_key_equal (ps->key, key)) { python_command_printf (widget, "zapping.resize_screen(%u, %u)", ps->width, ps->height); return TRUE; /* handled */ } return FALSE; /* not for us, pass on */ } static void picture_sizes_load_default (void) { static const guint sizes[][2] = { { 1024, 576 }, /* PAL/SECAM 16:9 */ { 768, 576 }, /* PAL/SECAM 4:3 */ { 720, 576 }, /* ITU-R 601 */ { 864, 480 }, /* NTSC 16:9 (rounded) */ { 640, 480 }, /* NTSC 4:3 */ { 384, 288 }, /* PAL/SECAM 1/4 */ { 352, 288 }, /* CIF */ { 320, 240 } /* NTSC 1/4 */ }; picture_size **pps; guint i; picture_sizes_delete (); pps = &favorite_picture_sizes; for (i = 0; i < G_N_ELEMENTS (sizes); ++i) { *pps = picture_size_new (sizes[i][0], sizes[i][1], Z_KEY_NONE); pps = &(*pps)->next; } } #define ZCONF_PICTURE_SIZES "/zapping/options/main/picture_sizes" static inline void picture_sizes_reset_index (void) { zconf_set_int (0, ZCONF_PICTURE_SIZES "/index"); } static gboolean picture_sizes_load (void) { picture_size **pps; guint i; picture_sizes_delete (); pps = &favorite_picture_sizes; for (i = 0;; ++i) { gchar buffer[256], *s; guint width, height; z_key key = Z_KEY_NONE; s = buffer + snprintf (buffer, sizeof (buffer) - 10, ZCONF_PICTURE_SIZES "/%u/", i); strcpy (s, "width"); width = zconf_get_int (NULL, buffer); if (zconf_error ()) { if (0 == i) return FALSE; else break; } strcpy (s, "height"); height = zconf_get_int (NULL, buffer); if (zconf_error ()) break; *s = 0; zconf_get_z_key (&key, buffer); *pps = picture_size_new (width, height, key); pps = &(*pps)->next; } return TRUE; } static void picture_sizes_save (void) { picture_size *ps; guint i = 0; zconf_delete (ZCONF_PICTURE_SIZES); for (ps = favorite_picture_sizes; ps; ps = ps->next) { gchar buffer[256], *s; s = buffer + snprintf (buffer, sizeof (buffer) - 10, ZCONF_PICTURE_SIZES "/%u/", i); strcpy (s, "width"); zconf_set_uint (ps->width, buffer); strcpy (s, "height"); zconf_set_uint (ps->height, buffer); *s = 0; zconf_create_z_key (ps->key, "", buffer); ++i; } } /* Popup menu */ static GtkAccelGroup * accel_group; static void picture_sizes_on_menu_activate (GtkMenuItem * menu_item, gpointer user_data) { picture_size *ps; guint count = GPOINTER_TO_INT (user_data); g_object_unref (accel_group); accel_group = NULL; for (ps = favorite_picture_sizes; ps; ps = ps->next) if (0 == count--) { zconf_set_int (GPOINTER_TO_INT (user_data), ZCONF_PICTURE_SIZES "/index"); python_command_printf (GTK_WIDGET (menu_item), "zapping.resize_screen(%u, %u)", ps->width, ps->height); return; } } guint picture_sizes_append_menu (GtkMenuShell * menu) { picture_size *ps; GtkWidget *menu_item; guint count = 0; if (!favorite_picture_sizes) { if (!picture_sizes_load ()) picture_sizes_load_default (); picture_sizes_reset_index (); } if (favorite_picture_sizes) { if (!accel_group) accel_group = gtk_accel_group_new (); menu_item = gtk_separator_menu_item_new (); gtk_widget_show (menu_item); gtk_menu_shell_append (menu, menu_item); } for (ps = favorite_picture_sizes; ps; ps = ps->next) { gchar *buffer; buffer = g_strdup_printf (_("Resize to %ux%u"), ps->width, ps->height); menu_item = gtk_menu_item_new_with_label (buffer); g_free (buffer); if (ps->key.key) gtk_widget_add_accelerator (menu_item, "activate", accel_group, ps->key.key, ps->key.mask, GTK_ACCEL_VISIBLE); g_signal_connect (G_OBJECT (menu_item), "activate", G_CALLBACK (picture_sizes_on_menu_activate), GINT_TO_POINTER (count)); gtk_widget_show (menu_item); gtk_menu_shell_append (menu, menu_item); ++count; } return count; } static PyObject * py_picture_size_cycle (PyObject * self _unused_, PyObject * args) { picture_size *ps; int value; gint index; gint count; value = +1; count = 0; for (ps = favorite_picture_sizes; ps; ps = ps->next) ++count; if (!ParseTuple (args, "|i", &value)) g_error ("zapping.picture_size_cycle(|i)"); zconf_get_int (&index, ZCONF_PICTURE_SIZES "/index"); index += value; if (index < 0) index = count - 1; else if (index >= count) index = 0; zconf_set_int (index, ZCONF_PICTURE_SIZES "/index"); for (ps = favorite_picture_sizes; ps; ps = ps->next) if (--index == 0) { python_command_printf (python_command_widget (), "zapping.resize_screen(%u, %u)", ps->width, ps->height); break; } py_return_true; } /* Picture sizes editing dialog */ enum { C_WIDTH, C_HEIGHT, C_KEY, C_KEY_MASK, C_EDITABLE, C_NUM }; static GtkListStore * picture_sizes_create_model (void) { GtkListStore *model; picture_size *ps; if (!favorite_picture_sizes) { if (!picture_sizes_load ()) picture_sizes_load_default (); picture_sizes_reset_index (); } model = gtk_list_store_new (C_NUM, G_TYPE_UINT, G_TYPE_UINT, G_TYPE_UINT, G_TYPE_UINT, G_TYPE_BOOLEAN); for (ps = favorite_picture_sizes; ps; ps = ps->next) { GtkTreeIter iter; gtk_list_store_append (model, &iter); gtk_list_store_set (model, &iter, C_WIDTH, ps->width, C_HEIGHT, ps->height, C_KEY, ps->key.key, C_KEY_MASK, ps->key.mask, C_EDITABLE, TRUE, -1); } return model; } static void picture_sizes_model_iter (GtkTreeView * tree_view, const gchar * path_string, GtkTreeModel ** model, GtkTreeIter * iter) { GtkTreePath *path; *model = gtk_tree_view_get_model (tree_view); path = gtk_tree_path_new_from_string (path_string); gtk_tree_model_get_iter (*model, iter, path); gtk_tree_path_free (path); } static void picture_sizes_on_cell_edited (GtkCellRendererText * cell, const gchar * path_string, const gchar * new_text, GtkTreeView * tree_view) { GtkTreeModel *model; GtkTreeIter iter; guint column; guint value; picture_sizes_model_iter (tree_view, path_string, &model, &iter); column = z_object_get_int_data (G_OBJECT (cell), "column"); value = strtoul (new_text, NULL, 0); if (value > 0) value = SATURATE (value, 64, 16383); gtk_list_store_set (GTK_LIST_STORE (model), &iter, column, value, -1); z_property_item_modified (GTK_WIDGET (tree_view)); } static gboolean unique (GtkTreeModel * model, GtkTreePath * path _unused_, GtkTreeIter * iter, gpointer user_data) { z_key *new_key = user_data; z_key key; gtk_tree_model_get (model, iter, C_KEY, &key.key, C_KEY_MASK, &key.mask, -1); if (key.key == new_key->key && key.mask == new_key->mask) gtk_list_store_set (GTK_LIST_STORE (model), iter, C_KEY, 0, C_KEY_MASK, 0, -1); return FALSE; /* continue */ } static void picture_sizes_on_accel_edited (GtkCellRendererText * cell _unused_, const char * path_string, guint keyval, EggVirtualModifierType mask, guint keycode _unused_, GtkTreeView * tree_view) { GtkTreeModel *model; GtkTreeIter iter; z_key key; key.key = keyval; key.mask = mask; picture_sizes_model_iter (tree_view, path_string, &model, &iter); if (keyval != 0) gtk_tree_model_foreach (model, unique, &key); gtk_list_store_set (GTK_LIST_STORE (model), &iter, C_KEY, key.key, C_KEY_MASK, key.mask, -1); z_property_item_modified (GTK_WIDGET (tree_view)); } static void picture_sizes_accel_set_func (GtkTreeViewColumn * tree_column _unused_, GtkCellRenderer * cell, GtkTreeModel * model, GtkTreeIter * iter, GtkTreeView * tree_view _unused_) { z_key key; gtk_tree_model_get (model, iter, C_KEY, &key.key, C_KEY_MASK, &key.mask, -1); g_object_set (G_OBJECT (cell), "visible", TRUE, "editable", TRUE, "accel_key", key.key, "accel_mask", key.mask, "style", PANGO_STYLE_NORMAL, NULL); } static void picture_sizes_on_selection_changed (GtkTreeSelection * selection, GtkTreeView * tree_view) { GtkTreeIter iter; GtkTreeModel *model; GtkWidget *remove; gboolean selected; model = gtk_tree_view_get_model (tree_view); remove = lookup_widget (GTK_WIDGET (tree_view), "picture-sizes-remove"); selected = z_tree_selection_iter_first (selection, model, &iter); gtk_widget_set_sensitive (remove, selected); } static void picture_sizes_on_add_clicked (GtkButton * add _unused_, GtkTreeView * tree_view) { GtkTreeSelection *selection; GtkTreeModel *model; GtkTreeIter iter; GtkTreePath *path; selection = gtk_tree_view_get_selection (tree_view); model = gtk_tree_view_get_model (tree_view); if (z_tree_selection_iter_first (selection, model, &iter)) gtk_list_store_insert_before (GTK_LIST_STORE (model), &iter, &iter); else gtk_list_store_append (GTK_LIST_STORE (model), &iter); gtk_list_store_set (GTK_LIST_STORE (model), &iter, C_WIDTH, 0, C_HEIGHT, 0, C_KEY, 0, C_KEY_MASK, 0, C_EDITABLE, TRUE, -1); gtk_tree_selection_unselect_all (selection); gtk_tree_selection_select_iter (selection, &iter); if ((path = gtk_tree_model_get_path (model, &iter))) { gtk_tree_view_set_cursor (tree_view, path, gtk_tree_view_get_column (tree_view, 0), /* start_editing */ TRUE); gtk_widget_grab_focus (GTK_WIDGET (tree_view)); gtk_tree_path_free (path); } } static void picture_sizes_on_remove_clicked (GtkButton * remove _unused_, GtkTreeView * tree_view) { z_tree_view_remove_selected (tree_view, gtk_tree_view_get_selection (tree_view), gtk_tree_view_get_model (tree_view)); } static void picture_sizes_apply (GtkTreeView * tree_view) { GtkTreeModel *model; GtkTreeIter iter; picture_size **pps; model = gtk_tree_view_get_model (tree_view); picture_sizes_delete (); pps = &favorite_picture_sizes; if (!gtk_tree_model_get_iter_first (model, &iter)) return; do { guint width; guint height; z_key key; gtk_tree_model_get (model, &iter, C_WIDTH, &width, C_HEIGHT, &height, C_KEY, &key.key, C_KEY_MASK, &key.mask, -1); if (width > 0 && height > 0) { *pps = picture_size_new (width, height, key); pps = &(*pps)->next; } } while (gtk_tree_model_iter_next (model, &iter)); picture_sizes_save (); } static void picture_sizes_setup (GtkWidget * page) { GtkTreeView *tree_view; GtkTreeSelection *selection; GtkListStore *list_store; GtkCellRenderer *renderer; GtkTreeViewColumn *column; GtkWidget *widget; guint col; widget = lookup_widget (page, "picture-sizes-treeview"); tree_view = GTK_TREE_VIEW (widget); gtk_tree_view_set_rules_hint (tree_view, TRUE); gtk_tree_view_set_reorderable (tree_view, TRUE); selection = gtk_tree_view_get_selection (tree_view); gtk_tree_selection_set_mode (selection, GTK_SELECTION_MULTIPLE); /* Don't connect "changed" signal here, see below. */ list_store = picture_sizes_create_model (); gtk_tree_view_set_model (tree_view, GTK_TREE_MODEL (list_store)); for (col = C_WIDTH; col <= C_HEIGHT; ++col) { renderer = gtk_cell_renderer_text_new (); gtk_tree_view_insert_column_with_attributes (tree_view, -1 /* append */, (col == C_WIDTH) ? _("Width") : _("Height"), renderer, "text", col, "editable", C_EDITABLE, NULL); g_signal_connect (G_OBJECT (renderer), "edited", G_CALLBACK (picture_sizes_on_cell_edited), tree_view); g_object_set_data (G_OBJECT (renderer), "column", (gpointer) col); } renderer = (GtkCellRenderer *) g_object_new (EGG_TYPE_CELL_RENDERER_KEYS, "editable", TRUE, "accel_mode", EGG_CELL_RENDERER_KEYS_MODE_X, NULL); g_signal_connect (G_OBJECT (renderer), "keys_edited", G_CALLBACK (picture_sizes_on_accel_edited), tree_view); column = gtk_tree_view_column_new_with_attributes (_("Shortcut"), renderer, NULL); gtk_tree_view_column_set_cell_data_func (column, renderer, (GtkTreeCellDataFunc) picture_sizes_accel_set_func, NULL, NULL); gtk_tree_view_append_column (tree_view, column); widget = lookup_widget (page, "picture-sizes-add"); g_signal_connect (G_OBJECT (widget), "clicked", G_CALLBACK (picture_sizes_on_add_clicked), tree_view); widget = lookup_widget (page, "picture-sizes-remove"); /* First select, then remove. */ gtk_widget_set_sensitive (widget, FALSE); g_signal_connect (G_OBJECT (widget), "clicked", G_CALLBACK (picture_sizes_on_remove_clicked), tree_view); /* Must not fire until the dialog is ready. */ g_signal_connect (G_OBJECT (selection), "changed", G_CALLBACK (picture_sizes_on_selection_changed), tree_view); } /* Toolbar style option menu mostly copied from libgnomeui, for compatibility with libgnomeui's toolbar context menu. */ #include <gconf/gconf-client.h> static GConfEnumStringPair toolbar_styles [] = { { GTK_TOOLBAR_TEXT, "text" }, { GTK_TOOLBAR_ICONS, "icons" }, { GTK_TOOLBAR_BOTH, "both" }, { GTK_TOOLBAR_BOTH_HORIZ, "both_horiz" }, { -1, NULL } }; static void style_menu_item_activated (GtkWidget * item _unused_, GtkToolbarStyle style) { char *key; guint i; key = gnome_gconf_get_gnome_libs_settings_relative ("toolbar_style"); /* Set our per-app toolbar setting */ for (i = 0; i < G_N_ELEMENTS (toolbar_styles); i++) { if (toolbar_styles[i].enum_value == (int) style) { gconf_client_set_string (gconf_client, key, toolbar_styles[i].str, NULL); break; } } g_free (key); } static void global_menu_item_activated (GtkWidget * item _unused_) { char *key; key = gnome_gconf_get_gnome_libs_settings_relative ("toolbar_style"); /* Unset the per-app toolbar setting */ gconf_client_unset (gconf_client, key, NULL); g_free (key); } static GtkWidget * create_toolbar_style_menu (void) { GtkWidget *menu; GtkWidget *item; GtkWidget *both_item, *both_horiz_item; GtkWidget *icons_item, *text_item, *global_item; GSList *group; char *both, *both_horiz, *icons, *text, *global; char *str, *key; GtkToolbarStyle toolbar_style; group = NULL; toolbar_style = GTK_TOOLBAR_BOTH; menu = gtk_menu_new (); both = _("Text Below Icons"); both_horiz = _("Priority Text Beside Icons"); icons = _("Icons Only"); text = _("Text Only"); both_item = gtk_radio_menu_item_new_with_label (group, both); g_signal_connect (both_item, "activate", G_CALLBACK (style_menu_item_activated), GINT_TO_POINTER (GTK_TOOLBAR_BOTH)); group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (both_item)); gtk_menu_shell_append (GTK_MENU_SHELL (menu), both_item); both_horiz_item = gtk_radio_menu_item_new_with_label (group, both_horiz); g_signal_connect (both_horiz_item, "activate", G_CALLBACK (style_menu_item_activated), GINT_TO_POINTER (GTK_TOOLBAR_BOTH_HORIZ)); group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (both_horiz_item)); gtk_menu_shell_append (GTK_MENU_SHELL (menu), both_horiz_item); icons_item = gtk_radio_menu_item_new_with_label (group, icons); g_signal_connect (icons_item, "activate", G_CALLBACK (style_menu_item_activated), GINT_TO_POINTER (GTK_TOOLBAR_ICONS)); group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (icons_item)); gtk_menu_shell_append (GTK_MENU_SHELL (menu), icons_item); text_item = gtk_radio_menu_item_new_with_label (group, text); g_signal_connect (text_item, "activate", G_CALLBACK (style_menu_item_activated), GINT_TO_POINTER (GTK_TOOLBAR_TEXT)); group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (text_item)); gtk_menu_shell_append (GTK_MENU_SHELL (menu), text_item); item = gtk_separator_menu_item_new (); gtk_menu_shell_append (GTK_MENU_SHELL (menu), item); /* Get global setting */ str = gconf_client_get_string (gconf_client, "/desktop/gnome/interface/toolbar_style", NULL); if (str != NULL) { if (!gconf_string_to_enum (toolbar_styles, str, (gint *) &toolbar_style)) toolbar_style = GTK_TOOLBAR_BOTH; g_free (str); } switch (toolbar_style) { case GTK_TOOLBAR_BOTH: str = both; break; case GTK_TOOLBAR_BOTH_HORIZ: str = both_horiz; break; case GTK_TOOLBAR_ICONS: str = icons; break; case GTK_TOOLBAR_TEXT: str = text; break; default: g_assert_not_reached (); } global = g_strdup_printf (_("Use desktop default (%s)"), str); global_item = gtk_radio_menu_item_new_with_label (group, global); g_signal_connect (global_item, "activate", G_CALLBACK (global_menu_item_activated), NULL); group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (global_item)); g_free (global); gtk_menu_shell_append (GTK_MENU_SHELL (menu), global_item); gtk_widget_show_all (menu); /* Now select the correct menu according to our preferences */ key = gnome_gconf_get_gnome_libs_settings_relative ("toolbar_style"); str = gconf_client_get_string (gconf_client, key, NULL); if (str == NULL) { /* We have no per-app setting, so the global one must be right. */ gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (global_item), TRUE); } else { if (!gconf_string_to_enum (toolbar_styles, str, (gint *) &toolbar_style)) toolbar_style = GTK_TOOLBAR_BOTH; /* We have a per-app setting, find out which one it is */ switch (toolbar_style) { case GTK_TOOLBAR_BOTH: gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (both_item), TRUE); break; case GTK_TOOLBAR_BOTH_HORIZ: gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (both_horiz_item), TRUE); break; case GTK_TOOLBAR_ICONS: gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (icons_item), TRUE); break; case GTK_TOOLBAR_TEXT: gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (text_item), TRUE); break; default: g_assert_not_reached (); } g_free (str); } g_free (key); return menu; } /* Main window */ static void mw_setup (GtkWidget *page) { GtkWidget *widget; GtkWidget *w; gboolean active; /* Show tooltips */ w = lookup_widget (page, "checkbutton14"); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(w), zconf_get_boolean (NULL, "/zapping/options/main/show_tooltips")); /* Disable screensaver */ w = lookup_widget (page, "disable_screensaver"); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(w), zconf_get_boolean (NULL, "/zapping/options/main/disable_screensaver")); /* Toolbar style */ w = lookup_widget(page, "toolbar_style"); gtk_option_menu_set_menu (GTK_OPTION_MENU (w), create_toolbar_style_menu ()); /* Swap Page Up/Down */ /* w = lookup_widget(page, "checkbutton13"); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(w), zconf_get_boolean(NULL, "/zapping/options/main/swap_up_down")); */ /* Title format Z will use */ w = lookup_widget(page, "title_format"); w = gnome_entry_gtk_entry(GNOME_ENTRY(w)); gtk_entry_set_text(GTK_ENTRY(w), zconf_get_string(NULL, "/zapping/options/main/title_format")); #if 0 /* FIXME combine with size inc, move into menu */ /* ratio mode to use */ w = lookup_widget(page, "optionmenu1"); gtk_option_menu_set_history(GTK_OPTION_MENU(w), zconf_get_int(NULL, "/zapping/options/main/ratio")); #endif active = zconf_get_boolean (NULL, "/zapping/options/main/save_controls"); widget = lookup_widget (page, "general-main-controls-per-channel"); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (widget), active); { gint n; /* entered channel numbers refer to */ w = lookup_widget (page, "channel_number_translation"); n = zconf_get_int (NULL, "/zapping/options/main/channel_txl"); if (n < 0) n = 0; /* historical: -1 disabled keypad channel number entering */ gtk_option_menu_set_history (GTK_OPTION_MENU (w), (guint) n); } } static void mw_apply (GtkWidget *page) { GtkWidget *widget; gboolean top; gboolean active; widget = lookup_widget(page, "checkbutton14"); /* show tooltips */ top = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget)); zconf_set_boolean (top, "/zapping/options/main/show_tooltips"); z_tooltips_active (top); widget = lookup_widget(page, "disable_screensaver"); top = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget)); zconf_set_boolean (top, "/zapping/options/main/disable_screensaver"); x11_screensaver_control (top); widget = lookup_widget(page, "title_format"); /* title format */ widget = gnome_entry_gtk_entry(GNOME_ENTRY(widget)); zconf_set_string(gtk_entry_get_text(GTK_ENTRY(widget)), "/zapping/options/main/title_format"); #if 0 /* FIXME */ widget = lookup_widget(page, "optionmenu1"); /* ratio mode */ zconf_set_int(z_option_menu_get_active(widget), "/zapping/options/main/ratio"); #endif widget = lookup_widget (page, "general-main-controls-per-channel"); active = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget)); zconf_set_boolean (active, "/zapping/options/main/save_controls"); /* entered channel numbers refer to */ widget = lookup_widget (page, "channel_number_translation"); zconf_set_int (z_option_menu_get_active (widget), "/zapping/options/main/channel_txl"); } /* Video */ static void video_setup (GtkWidget *page) { GtkWidget *widget; gboolean active; #if 0 /* Verbosity value passed to zapping_setup_fb */ widget = lookup_widget(page, "spinbutton1"); gtk_spin_button_set_value(GTK_SPIN_BUTTON(widget), zconf_get_int(NULL, "/zapping/options/main/zapping_setup_fb_verbosity")); #endif #ifdef HAVE_VIDMODE_EXTENSION { GtkWidget *menu; GtkWidget *menuitem; const x11_vidmode_info *info; const x11_vidmode_info *hist; const gchar *mode; guint i, h; /* fullscreen video mode */ mode = zconf_get_string (NULL, "/zapping/options/main/fullscreen/vidmode"); menu = gtk_menu_new (); /* TRANSLATORS: Fullscreen video mode */ menuitem = gtk_menu_item_new_with_label (_("Do not change")); gtk_widget_show (menuitem); gtk_menu_shell_append (GTK_MENU_SHELL (menu), menuitem); menuitem = gtk_menu_item_new_with_label (_("Automatic")); gtk_widget_show (menuitem); gtk_menu_shell_append (GTK_MENU_SHELL (menu), menuitem); h = (mode && 0 == strcmp (mode, "auto")); hist = x11_vidmode_by_name (vidmodes, mode); for (info = vidmodes, i = 2; info; info = info->next, i++) { gchar *s; if (info == hist) h = i; /* TRANSLATORS: Fullscreen video mode */ s = g_strdup_printf (_("%u x %u @ %u Hz"), info->width, info->height, (unsigned int)(info->vfreq + 0.5)); menuitem = gtk_menu_item_new_with_label (s); gtk_widget_show (menuitem); gtk_menu_shell_append (GTK_MENU_SHELL (menu), menuitem); g_free (s); } widget = lookup_widget(page, "optionmenu2"); gtk_option_menu_set_menu (GTK_OPTION_MENU (widget), menu); gtk_option_menu_set_history (GTK_OPTION_MENU(widget), h); } #else /* !HAVE_VIDMODE_EXTENSION */ widget = lookup_widget (page, "label90"); gtk_widget_set_sensitive (widget, FALSE); widget = lookup_widget (page, "optionmenu2"); gtk_widget_set_sensitive (widget, FALSE); #endif #ifdef HAVE_XV_EXTENSION { guint hist; /* capture size under XVideo */ widget = lookup_widget(page, "optionmenu20"); hist = zconf_get_uint (NULL, "/zapping/options/capture/xvsize"); gtk_option_menu_set_history (GTK_OPTION_MENU (widget), hist); } #else widget = lookup_widget (page, "label220"); gtk_widget_set_sensitive (widget, FALSE); widget = lookup_widget (page, "optionmenu20"); gtk_widget_set_sensitive (widget, FALSE); #endif { gchar *str; if (z_gconf_get_string (&str, "/apps/zapping/window/chroma_key_color")) { GdkColor color; if (string_to_color (&color, str)) { widget = lookup_widget(page, "colorbutton1"); gtk_color_button_set_color (GTK_COLOR_BUTTON (widget), &color); } g_free (str); } } widget = lookup_widget (page, "general-video-fixed-inc"); active = zconf_get_boolean (NULL, "/zapping/options/main/fixed_increments"); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (widget), active); picture_sizes_setup (page); } static void video_apply (GtkWidget *page) { GtkWidget *widget; gboolean active; #if 0 widget = lookup_widget(page, "spinbutton1"); /* zapping_setup_fb verbosity */ zconf_set_int( gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(widget)), "/zapping/options/main/zapping_setup_fb_verbosity"); #endif #ifdef HAVE_VIDMODE_EXTENSION { guint i; const gchar *opt = "/zapping/options/main/fullscreen/vidmode"; widget = lookup_widget(page, "optionmenu2"); /* change mode */ i = z_option_menu_get_active (widget); if (i == 1) { zconf_set_string ("auto", opt); } else { x11_vidmode_info *info; info = NULL; if (i >= 2) for (info = vidmodes; info; info = info->next) if (i-- == 2) break; if (info) { gchar *s = g_strdup_printf ("%ux%u@%u", info->width, info->height, (unsigned int)(info->vfreq + 0.5)); zconf_set_string (s, opt); g_free (s); } else { zconf_set_string ("", opt); } } } #endif /* HAVE_VIDMODE_EXTENSION */ #ifdef HAVE_XV_EXTENSION widget = lookup_widget(page, "optionmenu20"); /* xv capture size */ zconf_set_int (z_option_menu_get_active(widget), "/zapping/options/capture/xvsize"); #endif { GdkColor color; widget = lookup_widget (page, "colorbutton1"); gtk_color_button_get_color (GTK_COLOR_BUTTON (widget), &color); /* XXX error ignored. */ z_gconf_set_color ("/apps/zapping/window/chroma_key_color", &color); } widget = lookup_widget (page, "general-video-fixed-inc"); active = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget)); zconf_set_boolean (active, "/zapping/options/main/fixed_increments"); if (active) /* XXX free, 4:3, 16:9 */ z_video_set_size_inc (zapping->video, 64, 64 * 3 / 4); else z_video_set_size_inc (zapping->video, 1, 1); widget = lookup_widget (page, "picture-sizes-treeview"); picture_sizes_apply (GTK_TREE_VIEW (widget)); } static void add (GtkDialog *dialog) { SidebarEntry devices [] = { { N_("Video"), "gnome-info.png", "vbox9", di_setup, di_apply, .help_link_id = "zapping-settings-video-device" } }; SidebarEntry general [] = { { N_("Main Window"), "gnome-session.png", "vbox35", mw_setup, mw_apply, .help_link_id = "zapping-settings-main" }, { N_("Video"), "gnome-television.png", "general-video-table", video_setup, video_apply, .help_link_id = "zapping-settings-video-options" } }; SidebarGroup groups [] = { { N_("Devices"), devices, G_N_ELEMENTS (devices) }, { N_("General Options"), general, G_N_ELEMENTS (general) }, }; standard_properties_add (dialog, groups, G_N_ELEMENTS (groups), "zapping.glade2"); } void startup_properties_handler(void) { property_handler handler = { add: add }; prepend_property_handler(&handler); if (!favorite_picture_sizes) { if (!picture_sizes_load ()) picture_sizes_load_default (); picture_sizes_reset_index (); } cmd_register ("picture_size_cycle", py_picture_size_cycle, METH_VARARGS, ("Next favorite picture size"), "zapping.picture_size_cycle(+1)", ("Previous favorite picture size"), "zapping.picture_size_cycle(-1)"); } void shutdown_properties_handler(void) { /* Nothing */ } ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������zapping-0.10cvs6/src/properties-handler.h����������������������������������������������������������� 644 � 764 � 144 � 521 10120232214 13515� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#ifndef __PROPERTIES_HANDLER_H__ #define __PROPERTIES_HANDLER_H__ guint picture_sizes_append_menu (GtkMenuShell * menu); gboolean on_picture_size_key_press (GtkWidget * widget, GdkEventKey * event, gpointer user_data); extern void startup_properties_handler(void); extern void shutdown_properties_handler(void); #endif �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������zapping-0.10cvs6/src/x11stuff.c��������������������������������������������������������������������� 644 � 764 � 144 � 151133 10404545760 11472� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Zapping (TV viewer for the Gnome Desktop) * * Copyright (C) 2000-2001 Iaki Garca Etxebarria * Copyright (C) 2002-2003 Michael H. Schimek * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * * Some of this code is based on the xscreensaver source code: * Copyright (c) 1991-1998 by Jamie Zawinski <jwz@jwz.org> * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that * the above copyright notice appear in all copies and that both that * copyright notice and this permission notice appear in supporting * documentation. No representations are made about the suitability of this * software for any purpose. It is provided "as is" without express or * implied warranty. */ /* * the routines contained here are all the X-specific stuff in Zapping */ #include "site_def.h" #ifdef HAVE_CONFIG_H # include "config.h" #endif #include <gdk/gdkx.h> #include <gtk/gtk.h> #include <stdlib.h> #include <math.h> #include <ctype.h> #define ZCONF_DOMAIN "/zapping/options/main/" #include "zconf.h" #include "x11stuff.h" #include "zmisc.h" #include "globals.h" #include <X11/X.h> #include <X11/Xlib.h> #include <X11/Xatom.h> #define INTERN_ATOM(name) \ _XA ## name = XInternAtom (display, #name, /* only_if_exists */ False) /* * Returns a pointer to the data contained in the given GdkImage */ gpointer x11_get_data(GdkImage * image) { return (image -> mem); } /* * Returns the byte order of the X server */ GdkByteOrder x11_get_byte_order(void) { if (ImageByteOrder(GDK_DISPLAY()) == LSBFirst) return GDK_LSB_FIRST; return GDK_MSB_FIRST; } /* * Returns the bits per pixel needed for a GdkImage. -1 on error. */ gint x11_get_bpp(void) { GdkImage * tmp_image; static gint depth = -1; if (depth > 0) return depth; tmp_image = gdk_image_new(GDK_IMAGE_FASTEST, gdk_visual_get_system(), 16, 16); if (!tmp_image) return -1; depth = tmp_image->depth; if (depth == 24 && tmp_image->bpp == 4) depth = 32; g_object_unref (G_OBJECT (tmp_image)); return depth; } /* to be replaced by 2.2 gdk_display_get_name() */ const gchar * x11_display_name (void) { return (const gchar *) DisplayString (GDK_DISPLAY()); } /* Reflect all errors back to the program through the procedural interface. The default error handler would just terminate the program. Note some Xlib functions return nothing, or Bool success, or a Status code (which is *usually* False == 0 on failure). Don't confuse status codes with error codes, which are Success == 0 on success. Note error codes of protocol extensions such as XVideo are offset by its error_base. */ /* XXX this code is not reentrant. */ unsigned long x11_error_code; int x11_error_handler (Display * display, XErrorEvent * error) { display = display; x11_error_code = error->error_code; printv ("X Error: serial=%lu error=%lu request=%lu minor=%lu\n", (unsigned long) error->serial, (unsigned long) error->error_code, (unsigned long) error->request_code, (unsigned long) error->minor_code); return 0; /* ignored */ } /* * Maps and unmaps a window of the given (screen) geometry, thus * forcing an expose event in that area */ void x11_force_expose(gint x, gint y, guint w, guint h) { XErrorHandler old_error_handler; Display *dpy = GDK_DISPLAY(); XSetWindowAttributes xswa; Window win; unsigned long mask; old_error_handler = XSetErrorHandler (x11_error_handler); xswa.override_redirect = TRUE; xswa.backing_store = NotUseful; xswa.save_under = FALSE; mask = ( CWSaveUnder | CWBackingStore | CWOverrideRedirect ); win = XCreateWindow(dpy, GDK_ROOT_WINDOW(), x, y, w, h, 0, CopyFromParent, InputOutput, CopyFromParent, mask, &xswa); if (0 != win) { XMapWindow(dpy, win); XUnmapWindow(dpy, win); XDestroyWindow(dpy, win); } XSetErrorHandler (old_error_handler); } #if 0 static void _x11_force_expose(gint x, gint y, gint w, gint h) { Display *dpy = GDK_DISPLAY(); XWindowAttributes wts; Window root, rroot, parent, *children; uint nchildren, i; XErrorHandler olderror; XExposeEvent event; event.type = Expose; event.count = 0; root=GDK_ROOT_WINDOW(); XQueryTree(dpy, root, &rroot, &parent, &children, &nchildren); /* enter error-ignore mode */ olderror = XSetErrorHandler(xerror); for (i=0; i<nchildren; i++) { // XXX 0==failure XGetWindowAttributes(dpy, children[i], &wts); if (!(wts.map_state & IsViewable)) continue; if (wts.class != InputOutput) continue; if ((wts.x >= x+w) || (wts.y >= x+h) || (wts.x+wts.width < x) || (wts.y+wts.height < y)) continue; event.window = children[i]; event.x = 0; event.y = 0; event.width = wts.width; event.height = wts.height; XSendEvent(GDK_DISPLAY(), children[i], False, ExposureMask, (XEvent*)&event); } XSync (GDK_DISPLAY(), /* discard events */ False); XSetErrorHandler(olderror); /* leave error-ignore mode */ if (children) XFree((char *) children); } #endif /* * Returns TRUE if the window is viewable */ gboolean x11_window_viewable(GdkWindow *window) { XErrorHandler old_error_handler; XWindowAttributes wts; wts.map_state = 0; old_error_handler = XSetErrorHandler (x11_error_handler); XGetWindowAttributes (GDK_DISPLAY (), GDK_WINDOW_XWINDOW (window), &wts); XSetErrorHandler (old_error_handler); /* Viewable or XGetWindowAttributes() failed. */ return !!(wts.map_state & IsViewable); } /* Window property & event helpers */ /* Call with x11_error_handler, otherwise XGetWindowProperty() may abort(). */ static int get_window_property (Display * display, Window window, Atom property, Atom req_type, unsigned long * nitems_return, void ** prop_return) { Atom type; int format; unsigned long bytes_after; x11_error_code = Success; XGetWindowProperty (display, window, property, 0, (65536 / sizeof (long)), False, req_type, &type, &format, nitems_return, &bytes_after, (unsigned char **) prop_return); return x11_error_code; } static void send_event (Display * display, Window window, Atom message_type, long l0, long l1) { XEvent xev; int status; CLEAR (xev); xev.type = ClientMessage; xev.xclient.display = display; xev.xclient.window = window; xev.xclient.send_event = TRUE; xev.xclient.message_type = message_type; xev.xclient.format = 32; xev.xclient.data.l[0] = l0; xev.xclient.data.l[1] = l1; status = XSendEvent (display, DefaultRootWindow (display), False, SubstructureNotifyMask | SubstructureRedirectMask, &xev); if (0) fprintf (stderr, "%d = XSendEvent(message_type=%u l0=%ld l1=%ld)\n", status, (unsigned int) message_type, l0, l1); XSync (display, /* discard events */ False); } static void gtk_window_send_x11_event (GtkWindow * window, Atom message_type, long l0, long l1) { GdkWindow *toplevel; if (window->frame) toplevel = window->frame; else toplevel = GTK_WIDGET (window)->window; g_assert (toplevel != NULL); g_assert (GTK_WIDGET_MAPPED (window)); send_event (GDK_WINDOW_XDISPLAY (toplevel), GDK_WINDOW_XWINDOW (toplevel), message_type, l0, l1); } /* WindowManager hints for stay-on-top option */ /* A function not directly supported by Gnome/Gtk+ 2.4: Tell the window manager to keep our (video) window above all other windows. */ #ifndef X11STUFF_WM_HINTS_DEBUG #define X11STUFF_WM_HINTS_DEBUG 1 #endif /* Tested: proto IceWM 1.2.2 Gnome Sawfish 1.2 NetWM Metacity 2.6.3 NetWM */ static void dummy_window_something (GtkWindow * window _unused_, gboolean on _unused_) { } /** * window_on_top: * @window: * @on: * * Tell the WM to keep the window on top of other windows. * You must call wm_hints_detect () and gtk_widget_show (window) first. */ void (* x11_window_on_top) (GtkWindow * window, gboolean on) = dummy_window_something; /** * window_fullscreen: * @window: * @on: * * Tell the WM to display the window on top of other windows, * maximized, without decoration. * You must call wm_hints_detect () and gtk_widget_show (window) first. */ void (* x11_window_fullscreen) (GtkWindow * window, gboolean on) = dummy_window_something; /** * window_background: * @window: * @on: * * Tell the WM to keep the window below most other windows. * You must call wm_hints_detect () and gtk_widget_show (window) first. */ void (* x11_window_below) (GtkWindow * window, gboolean on) = dummy_window_something; static GdkFilterReturn wm_event_handler (GdkXEvent * xevent _unused_, GdkEvent * event _unused_, gpointer data _unused_) { return GDK_FILTER_REMOVE; /* ignore */ } /* www.freedesktop.org/standards */ enum { _NET_WM_STATE_REMOVE, _NET_WM_STATE_ADD, _NET_WM_STATE_TOGGLE }; static Atom _XA_NET_SUPPORTED; static Atom _XA_NET_WM_STATE; static Atom _XA_NET_WM_STATE_ABOVE; static Atom _XA_NET_WM_STATE_BELOW; static Atom _XA_NET_WM_STATE_FULLSCREEN; static void net_wm_window_on_top (GtkWindow * window, gboolean on) { gtk_window_send_x11_event (window, _XA_NET_WM_STATE, on ? _NET_WM_STATE_ADD : _NET_WM_STATE_REMOVE, _XA_NET_WM_STATE_ABOVE); } static void net_wm_fullscreen (GtkWindow * window, gboolean on) { gtk_window_send_x11_event (window, _XA_NET_WM_STATE, on ? _NET_WM_STATE_ADD : _NET_WM_STATE_REMOVE, _XA_NET_WM_STATE_FULLSCREEN); } static void net_wm_below (GtkWindow * window, gboolean on) { gtk_window_send_x11_event (window, _XA_NET_WM_STATE, on ? _NET_WM_STATE_ADD : _NET_WM_STATE_REMOVE, _XA_NET_WM_STATE_BELOW); } enum { WIN_LAYER_BELOW = 2, WIN_LAYER_NORMAL = 4, WIN_LAYER_ONTOP = 6, WIN_LAYER_DOCK = 8, WIN_LAYER_ABOVE_DOCK = 10 }; static Atom _XA_WIN_SUPPORTING_WM_CHECK; static Atom _XA_WIN_LAYER; static void gnome_window_on_top (GtkWindow * window, gboolean on) { gtk_window_send_x11_event (window, _XA_WIN_LAYER, on ? WIN_LAYER_ONTOP : WIN_LAYER_NORMAL, 0); } static void gnome_fullscreen (GtkWindow * window, gboolean on) { gtk_window_set_decorated (window, FALSE); gtk_window_send_x11_event (window, _XA_WIN_LAYER, on ? WIN_LAYER_ABOVE_DOCK : WIN_LAYER_NORMAL, 0); } static void gnome_below (GtkWindow * window, gboolean on) { gtk_window_send_x11_event (window, _XA_WIN_LAYER, on ? WIN_LAYER_BELOW : WIN_LAYER_NORMAL, 0); } /** * wm_hints_detect: * Check if we can tell the WM to keep a window on top of other windows. * This must be called before window_on_top(). * * @returns: * TRUE if possible. */ gboolean wm_hints_detect (void) { XErrorHandler old_error_handler; Display *display; Window root; display = gdk_x11_get_default_xdisplay (); g_assert (display != 0); old_error_handler = XSetErrorHandler (x11_error_handler); root = DefaultRootWindow (display); INTERN_ATOM (_NET_SUPPORTED); INTERN_ATOM (_NET_WM_STATE); INTERN_ATOM (_NET_WM_STATE_FULLSCREEN); INTERN_ATOM (_NET_WM_STATE_ABOVE); INTERN_ATOM (_NET_WM_STATE_BELOW); /* Netwm compliant */ { Atom *atoms; unsigned long nitems; atoms = NULL; if (Success == get_window_property (display, root, _XA_NET_SUPPORTED, AnyPropertyType, &nitems, (void **) &atoms)) { unsigned int i; printv ("WM supports _NET_SUPPORTED (%lu)\n", nitems); for (i = 0; i < nitems; i++) { /* atoms[i] != _XA_... */ char *atom_name = XGetAtomName (display, atoms[i]); if (X11STUFF_WM_HINTS_DEBUG) printv (" atom %s\n", atom_name); /* E.g. IceWM 1.2.2 _NET yes, _ABOVE no, but _LAYER */ if (0 == strcmp (atom_name, "_NET_WM_STATE_ABOVE")) { XFree (atom_name); XFree (atoms); x11_window_on_top = net_wm_window_on_top; x11_window_fullscreen = net_wm_fullscreen; x11_window_below = net_wm_below; XSetErrorHandler (old_error_handler); gdk_add_client_message_filter (gdk_x11_xatom_to_atom (_XA_NET_WM_STATE), wm_event_handler, 0); return TRUE; } XFree (atom_name); } XFree (atoms); printv (" ... nothing useful\n"); } INTERN_ATOM (_WIN_SUPPORTING_WM_CHECK); INTERN_ATOM (_WIN_LAYER); } /* Gnome compliant */ { void *args; unsigned long nitems; args = NULL; if (Success == get_window_property (display, root, _XA_WIN_SUPPORTING_WM_CHECK, AnyPropertyType, &nitems, &args)) { if (nitems > 0) { printv ("WM supports _WIN_SUPPORTING_WM_CHECK\n"); /* FIXME: check capabilities */ XFree (args); x11_window_on_top = gnome_window_on_top; x11_window_fullscreen = gnome_fullscreen; x11_window_below = gnome_below; XSetErrorHandler (old_error_handler); gdk_add_client_message_filter (gdk_x11_xatom_to_atom (_XA_WIN_LAYER), wm_event_handler, 0); return TRUE; } } } printv ("No WM hints\n"); XSetErrorHandler (old_error_handler); return FALSE; } /* XFree86VidMode helpers */ /* This is used to select a suitable screen resolution for fullscreen video display. I.e. instead of scaling the video we can switch to TV-like monitor frequencies ("Modeline" in XF86Config). */ #ifndef X11STUFF_VIDMODE_DEBUG #define X11STUFF_VIDMODE_DEBUG 0 #endif /** * x11_vidmode_clear_state: * @vs: */ void x11_vidmode_clear_state (x11_vidmode_state * vs) { if (!vs) return; vs->_old.vm = NULL; vs->_new.vm = NULL; /* don't restore */ vs->_new.pt.x = 1 << 20; /* implausible, don't restore */ vs->_new.vp.x = 1 << 20; } #ifdef HAVE_VIDMODE_EXTENSION #include <X11/extensions/xf86vmode.h> struct vidmode { x11_vidmode_info pub; Display * display; int screen_number; XF86VidModeModeInfo info; }; #define VIDMODE(p) PARENT (p, struct vidmode, pub) #define CVIDMODE(p) CONST_PARENT (p, struct vidmode, pub) static Bool vidmode_switch_to_mode (Display * display, int screen, XF86VidModeModeInfo * modeline) { x11_error_code = Success; if (!XF86VidModeSwitchToMode (display, screen, modeline)) return False; XSync (display, /* discard events */ False); return (Success == x11_error_code); } static Bool vidmode_set_view_port (Display * display, int screen, int x, int y) { x11_error_code = Success; if (!XF86VidModeSetViewPort (display, screen, x, y)) return False; XSync (display, /* discard events */ False); return (Success == x11_error_code); } static Bool warp_pointer (Display * display, Window src_win, Window dest_win, int src_x, int src_y, unsigned int src_width, unsigned int src_height, int dest_x, int dest_y) { x11_error_code = Success; if (!XWarpPointer (display, src_win, dest_win, src_x, src_y, src_width, src_height, dest_x, dest_y)) return False; XSync (display, /* discard events */ False); return (Success == x11_error_code); } /** * x11_vidmode_list_delete: * @list: * * Deletes a list of struct x11_vidmode_info as returned * by x11_vidmode_list_new(). **/ void x11_vidmode_list_delete (x11_vidmode_info * list) { struct vidmode *v; while (list) { v = VIDMODE (list); list = v->pub.next; free (v); } } /** * x11_vidmode_list_new: * Creates a sorted list of selectable VidModes, i.e. all valid * Modelines in XF86Config including those switchable with kp+ * and kp-. The list must be freed with x11_vidmode_list_delete(). * Result can be NULL for various reasons. */ x11_vidmode_info * x11_vidmode_list_new (const char * display_name, int screen_number) { XErrorHandler old_error_handler; Display *display; int event_base; int error_base; int major_version; int minor_version; XF86VidModeModeInfo **mode_info; int mode_count; x11_vidmode_info *list; int i; display = GDK_DISPLAY (); list = NULL; mode_info = NULL; old_error_handler = XSetErrorHandler (x11_error_handler); if (NULL != display_name) { display = XOpenDisplay (display_name); if (NULL == display) { printv ("%s: Cannot open display '%s'\n", __FUNCTION__, display_name); goto failure; } } if (-1 == screen_number) screen_number = XDefaultScreen (display); if (!XF86VidModeQueryExtension (display, &event_base, &error_base)) { printv ("XF86VidMode extension not available\n"); goto failure; } if (!XF86VidModeQueryVersion (display, &major_version, &minor_version)) { printv ("XF86VidMode extension not usable\n"); goto failure; } printv ("XF86VidMode base %d, %d, version %d.%d\n", event_base, error_base, major_version, minor_version); if (2 != major_version) { printv ("Unknown XF86VidMode version\n"); goto failure; } /* This lists all ModeLines in XF86Config and all default modes, except those exceeding monitor limits and the virtual screen size, as logged in /var/log/X[Org|Free86]*.log */ if (!XF86VidModeGetAllModeLines (display, screen_number, &mode_count, &mode_info)) { if (X11STUFF_VIDMODE_DEBUG) printv ("No mode lines\n"); goto failure; } for (i = 0; i < mode_count; i++) { XF86VidModeModeInfo *m = mode_info[i]; struct vidmode *v; Status valid; if (m->privsize > 0) { XFree (m->private); m->private = NULL; m->privsize = 0; } valid = XF86VidModeValidateModeLine (display, screen_number, m); /* For some reason this flags modes as invalid which actually have been accepted at X server startup and can be selected with Ctrl-Alt-nk+/-. x11_vidmode_switch() needs all selectable modes listed, so we ignore this. */ if (1) { /* XXX flags: see xvidtune.c; special treatment of V_INTERLACE/V_DBLSCAN necessary? */ if (X11STUFF_VIDMODE_DEBUG) printv ("Valid mode dot=%u flags=%08x " "hd=%u hss=%u hse=%u ht=%u " "vd=%u vss=%u vse=%u vt=%u valid=%d\n", m->dotclock, m->flags, m->hdisplay, m->hsyncstart, m->hsyncend, m->htotal, m->vdisplay, m->vsyncstart, m->vsyncend, m->vtotal, valid); if ((v = calloc (1, sizeof (*v)))) { unsigned int dothz = m->dotclock * 1000; x11_vidmode_info *vv, **vvv; v->pub.width = m->hdisplay; v->pub.height = m->vdisplay; v->pub.hfreq = dothz / (double) m->htotal; v->pub.vfreq = dothz / (double)(m->htotal * m->vtotal); v->pub.aspect = 1.0; /* Sigh. */ v->display = display; v->screen_number = screen_number; v->info = *m; for (vvv = &list; (vv = *vvv); vvv = &vv->next) if (v->pub.width == vv->width) { if (v->pub.height == vv->height) { if (v->pub.vfreq > vv->vfreq) break; } else if (v->pub.height > vv->height) break; } else if (v->pub.width > vv->width) break; if (v) { v->pub.next = vv; *vvv = &v->pub; } } } else { if (X11STUFF_VIDMODE_DEBUG) printv ("Ignore bad mode dot=%u hd=%u vd=%u\n", m->dotclock, m->hdisplay, m->vdisplay); } } failure: if (NULL != mode_info) XFree (mode_info); XSetErrorHandler (old_error_handler); return list; } /** * x11_vidmode_by_name: * @list: List of VidModes as returned by x11_vidmode_list_new(). * @name: VidMode name "width [sep height [sep vfreq [sep]]]". * All whitespace is ignored, sep can be any sequence of non-digits, * characters following the last sep are ignored. Numbers strtoul. * * Returns a pointer to the first VidMode matching the name, NULL * when the mode is not in the list. (This is intended to select * a mode from config file.) */ const x11_vidmode_info * x11_vidmode_by_name (const x11_vidmode_info *list, const gchar * name) { unsigned int val[3] = { 0, 0, 0 }; const x11_vidmode_info *info; double fmin; unsigned int i; if (!name) return NULL; for (i = 0; i < 3; i++) { char *cont; while (isspace (*name)) ++name; if (0 == *name || !isdigit (*name)) break; val[i] = strtoul (name, &cont, 0); name = cont; while (isspace (*name)) ++name; while (*name && !isdigit (*name)) ++name; } if (val[0] == 0) return NULL; info = NULL; fmin = 1e20; for (; list; list = list->next) if ( (list->width == val[0]) && (val[1] == 0 || list->height == val[1])) { double d; if (val[2] == 0) { info = list; break; } d = fabs (list->vfreq - val[2]); if (d < fmin) { info = list; fmin = d; } } return info; } /** * x11_vidmode_current: * @list: List of VidModes as returned by x11_vidmode_list_new(). * * Returns a pointer to the current VidMode, NULL when the mode * is not in the list or some other problem occurred. */ const x11_vidmode_info * x11_vidmode_current (const x11_vidmode_info *list) { XErrorHandler old_error_handler; XF86VidModeModeLine mode_line; int dot_clock; const struct vidmode *vl; const struct vidmode *vm; if (!list) return NULL; old_error_handler = XSetErrorHandler (x11_error_handler); vl = CONST_PARENT (list, struct vidmode, pub); if (!XF86VidModeGetModeLine (vl->display, vl->screen_number, &dot_clock, &mode_line)) { if (X11STUFF_VIDMODE_DEBUG) printv ("XF86VidModeGetModeLine() failed\n"); goto failure; } if (mode_line.privsize > 0) { XFree (mode_line.private); mode_line.private = NULL; mode_line.privsize = 0; } for (vm = vl; vm; vm = CONST_PARENT (vm->pub.next, struct vidmode, pub)) if ( vm->info.dotclock == (unsigned int) dot_clock && vm->info.hdisplay == mode_line.hdisplay && vm->info.hsyncstart == mode_line.hsyncstart && vm->info.hsyncend == mode_line.hsyncend && vm->info.htotal == mode_line.htotal && vm->info.vdisplay == mode_line.vdisplay && vm->info.vsyncstart == mode_line.vsyncstart && vm->info.vsyncend == mode_line.vsyncend && vm->info.vtotal == mode_line.vtotal) break; if (!vm) { if (X11STUFF_VIDMODE_DEBUG) printv ("Current VidMode dot=%u hd=%u vd=%u not in list\n", dot_clock, mode_line.hdisplay, mode_line.vdisplay); goto failure; } XSetErrorHandler (old_error_handler); return &vm->pub; failure: XSetErrorHandler (old_error_handler); return NULL; } /** * x11_vidmode_current: * @vlist: List of VidModes as returned by x11_vidmode_list_new(). * @slist: List of Xinerama screens, used to determine actual screen * sizes when Xinerama is enabled. * @vm: VidMode to switch to, must be member of @list. * @vs: If given save settings for x11_vidmode_restore() here. * * Switches to VidMode @vm, can be NULL to keep the current mode. * Then centers the viewport over the root window, and if * necessary moves the pointer into sight. */ gboolean x11_vidmode_switch (const x11_vidmode_info *vlist, const tv_screen * slist, const x11_vidmode_info *vm, x11_vidmode_state * vs) { XErrorHandler old_error_handler; const struct vidmode *vl; x11_vidmode_state state; Window root; Window dummy1; int x; int y; int dummy2; unsigned int w; unsigned int h; unsigned int dummy3; int px; int py; int warp; int vpx; int vpy; if (!vlist) return FALSE; old_error_handler = XSetErrorHandler (x11_error_handler); vl = CONST_PARENT (vlist, struct vidmode, pub); if (!vs) vs = &state; x11_vidmode_clear_state (vs); root = DefaultRootWindow (vl->display); if (slist) { /* Get geometry of vl->screen. */ for (; slist; slist = slist->next) if (slist->screen_number == vl->screen_number) break; if (!slist) goto failure; x = slist->x; y = slist->y; w = slist->width; h = slist->height; } else { if (!XGetGeometry (vl->display, /* drawable */ root, /* root */ &dummy1, &x, &y, &w, &h, /* border_width */ &dummy3, /* depth */ &dummy3)) goto failure; } if (!XF86VidModeGetViewPort (vl->display, vl->screen_number, &vpx, &vpy)) goto failure; if (!XQueryPointer (vl->display, /* window */ root, /* root */ &dummy1, /* child */ &dummy1, /* root_x */ &vs->_old.pt.x, /* root_y */ &vs->_old.pt.y, /* win_x */ &dummy2, /* win_y */ &dummy2, /* mask */ &dummy3)) goto failure; vs->_old.vp.x = vpx; vs->_old.vp.y = vpy; /* Switch to requested mode, if any */ { const x11_vidmode_info *cur_vm; cur_vm = x11_vidmode_current (vlist); vs->_old.vm = cur_vm; if (vm) { if (cur_vm != vm) { XF86VidModeModeInfo info; info = CVIDMODE (vm)->info; if (vidmode_switch_to_mode (vl->display, vl->screen_number, &info)) { /* Might not be exactly what we asked for, or even anything we know. */ if (!(vm = x11_vidmode_current (vlist))) return FALSE; vs->_new.vm = vm; } else { if (X11STUFF_VIDMODE_DEBUG) printv ("XF86VidModeSwitchToMode() failed\n"); vm = cur_vm; } } } else if (cur_vm) { vm = cur_vm; } else { goto failure; } } /* Center ViewPort */ px = (w - vm->width) >> 1; /* screen relative */ py = (h - vm->height) >> 1; assert (px >= 0 && py >= 0); if (vidmode_set_view_port (CVIDMODE (vm)->display, CVIDMODE (vm)->screen_number, px, py)) { vs->_new.vp.x = px; vs->_new.vp.y = py; } else { if (X11STUFF_VIDMODE_DEBUG) printv ("XF86VidModeSetViewPort() failed\n"); px = vs->_old.vp.x; py = vs->_old.vp.y; } /* Make pointer visible. */ warp = 0; px += x; /* root relative */ py += y; if (vs->_old.pt.x < px) { warp = 1; } else if (vs->_old.pt.x > px + (int) vm->width - 16) { px += vm->width - 16; warp = 1; } else { px = vs->_old.pt.x; } if (vs->_old.pt.y < py) { warp = 1; } else if (vs->_old.pt.y > py + (int) vm->height - 16) { py += vm->height - 16; warp = 1; } else { py = vs->_old.pt.y; } if (warp) { if (!warp_pointer (CVIDMODE (vm)->display, /* src_window */ None, /* dst_window */ root, /* src_x, y, width, height */ 0, 0, 0, 0, /* dst_x, y */ px, py)) goto failure; vs->_new.pt.x = px; vs->_new.pt.y = py; } XSetErrorHandler (old_error_handler); return TRUE; failure: XSetErrorHandler (old_error_handler); return FALSE; } /** * x11_vidmode_current: * @list: List of VidModes as returned by x11_vidmode_list_new(), * must be the same as given to the corresponding * x11_vidmode_switch(). * @vs: Settings saved with x11_vidmode_switch(), can be NULL. * * Restores from a x11_vidmode_switch(), except a third party * (i.e. the user) changed the settings since x11_vidmode_switch(). * Calls x11_vidmode_clear_state() to prevent restore twice. */ void x11_vidmode_restore (const x11_vidmode_info *list, x11_vidmode_state * vs) { XErrorHandler old_error_handler; Window root; Window dummy1; int vpx; int vpy; int ptx; int pty; int dummy2; unsigned int dummy3; if (!list) return; if (!vs) return; old_error_handler = XSetErrorHandler (x11_error_handler); root = DefaultRootWindow (CVIDMODE (list)->display); if (!XF86VidModeGetViewPort (CVIDMODE (list)->display, CVIDMODE (list)->screen_number, &vpx, &vpy)) goto done; if (!XQueryPointer (CVIDMODE (list)->display, /* window */ root, /* root */ &dummy1, /* child */ &dummy1, /* root_x */ &ptx, /* root_y */ &pty, /* win_x */ &dummy2, /* win_y */ &dummy2, /* mask */ &dummy3)) { ptx = 16384; pty = 16384; } if (vs->_old.vm && vs->_new.vm) { const x11_vidmode_info *cur_vm; cur_vm = x11_vidmode_current (list); if (vs->_new.vm != cur_vm) goto done; /* user changed vidmode, keep that */ if (vs->_old.vm != cur_vm) { XF86VidModeModeInfo info; info = CVIDMODE (vs->_old.vm)->info; if (!vidmode_switch_to_mode (CVIDMODE (list)->display, CVIDMODE (list)->screen_number, &info)) { if (X11STUFF_VIDMODE_DEBUG) printv ("Cannot restore old mode, " "XF86VidModeSwitchToMode() failed\n"); } } } if (vs->_new.vp.x != vpx || vs->_new.vp.y != vpy) goto done; /* user moved viewport, keep that */ if (vidmode_set_view_port (CVIDMODE (list)->display, CVIDMODE (list)->screen_number, vs->_old.vp.x, vs->_old.vp.y)) goto done; if (abs (vs->_new.pt.x - ptx) >= 10 || abs (vs->_new.pt.y - pty) >= 10) goto done; /* user moved pointer, keep that */ /* Error ignored. */ warp_pointer (CVIDMODE (list)->display, /* src_window */ None, /* dst_window */ root, /* src_x, y, width, height */ 0, 0, 0, 0, /* dst_x, y */ vs->_old.pt.x, vs->_old.pt.y); done: XSetErrorHandler (old_error_handler); x11_vidmode_clear_state (vs); } #else /* !HAVE_VIDMODE_EXTENSION */ void x11_vidmode_list_delete (x11_vidmode_info * list) { } x11_vidmode_info * x11_vidmode_list_new (const char * display_name, int screen) { printv ("VidMode extension support not compiled in\n"); return NULL; } const x11_vidmode_info * x11_vidmode_by_name (const x11_vidmode_info *list, const gchar * name) { return NULL; } const x11_vidmode_info * x11_vidmode_current (const x11_vidmode_info *list) { return NULL; } gboolean x11_vidmode_switch (const x11_vidmode_info *vlist, const tv_screen * slist, const x11_vidmode_info *vm, x11_vidmode_state * vs) { return FALSE; } void x11_vidmode_restore (const x11_vidmode_info *list, x11_vidmode_state * vs) { } #endif /* !HAVE_VIDMODE_EXTENSION */ /* * Screensaver */ /* This is used to temporarily disable any screensaver functions (blanking, animation, monitor power down) while watching TV. */ #ifndef X11STUFF_SCREENSAVER_DEBUG #define X11STUFF_SCREENSAVER_DEBUG 0 #endif #ifdef HAVE_DPMS_EXTENSION /* xc/doc/hardcopy/Xext/DPMSLib.PS.gz */ #include <X11/Xproto.h> /* CARD16 */ #include <X11/extensions/dpms.h> #endif /* Tested: on check-test (TTX mode) xset s 7 (blank/noblank) blocked blanks sleep 1; xset s active deactivates no action xset dpms 7 blocked blanks sleep 1; xset dpms force off forces on+ no action xscreensaver 4.06: detect start & kill ok transition from / to xset s 7 blocked blank after 1m blocked blanks dpms blank 1m blocked+ blanks ++ xautolock 2.1 (w/MIT saver)+++ blocked blanks UNTESTED: KScreensaver + after work-around ++ Various methods to detect inactivity (XIdle, monitoring kernel device etc) UNTESTED or NOT BLOCKED. +++ XIdle UNTESTED. Without MIT or XIdle xautolock scans all windows for KeyPress events, that is NOT BLOCKED. */ static Atom _XA_SCREENSAVER_VERSION; static Atom _XASCREENSAVER; static Atom _XADEACTIVATE; static gboolean screensaver_enabled; static unsigned int screensaver_level; static gboolean kscreensaver; static gboolean dpms_usable; static guint screensaver_timeout_id; static gboolean find_xscreensaver_window (Display * display, Window * window_return) { XErrorHandler old_error_handler; Window root = RootWindowOfScreen (DefaultScreenOfDisplay (display)); Window root2, parent, *kids; unsigned int nkids; unsigned int i; gboolean r; r = FALSE; /* We're walking the list of root-level windows, trying to find the one that has a particular property on it. We need to trap BadWindow errors while doing this, because it's possible that a window might get deleted in the meantime. (That window won't have been the one we're looking for.) */ old_error_handler = XSetErrorHandler (x11_error_handler); if (!XQueryTree (display, root, &root2, &parent, &kids, &nkids) || root != root2 || parent || !kids || nkids == 0) goto failure; for (i = 0; i < nkids; i++) { void *vec; unsigned long nitems; XSync (display, /* discard events */ False); if (Success == get_window_property (display, kids[i], _XA_SCREENSAVER_VERSION, XA_STRING, &nitems, &vec)) { /* FIXME not true; anything to free here? assert (0 == nitems); */ *window_return = kids[i]; r = TRUE; break; } } failure: XSetErrorHandler (old_error_handler); if (NULL != kids) { XFree (kids); } return r; } /* Here we reset the idle counter at regular intervals, an inconvenience outweight by a number of advantages: No need to remember and restore saver states. It works nicely with other apps because no synchronization is neccessary. When we unexpectedly bite the dust, the screensaver kicks in as usual, no cleanup necessary. */ static gboolean screensaver_timeout (gpointer unused _unused_) { Display *display = GDK_DISPLAY (); Window window; gboolean have_xss; /* xscreensaver is a client, it may come and go at will. */ have_xss = find_xscreensaver_window (display, &window); if (X11STUFF_SCREENSAVER_DEBUG) { printv ("screensaver_timeout() have_xss=%d dpms=%d\n", have_xss, dpms_usable); } if (!have_xss) { /* xscreensaver overrides the X savers, so it takes priority here. This call unblanks the display and/or restarts the idle counter. Error ignored, response ignored. */ send_event (display, window, _XASCREENSAVER, (long) _XADEACTIVATE, 0); } /* xscreensaver 4.06 appears to call XForceScreenSaver() on _XADEACTIVATE when DPMS was enabled only when the MIT or SGI screensaver extensions are used, so we always call it ourselves. */ /* else */ { /* Restart the idle counter, this affects the internal saver, MIT-SCREEN-SAVER extension and DPMS extension idle counter (in XFree86 4.2). Curiously it forces the monitor back on after blanking by the internal saver, but not after DPMS blanking. */ XForceScreenSaver (display, ScreenSaverReset); #ifdef HAVE_DPMS_EXTENSION if (dpms_usable) { CARD16 power_level; BOOL state; if (DPMSInfo (display, &power_level, &state)) { if (X11STUFF_SCREENSAVER_DEBUG) printv ("DPMSInfo(level=%d enabled=%d)\n", (int) power_level, (int) state); if (power_level != DPMSModeOn) { /* Error ignored */ DPMSForceLevel (display, DPMSModeOn); } } } #endif } return TRUE; /* call again */ } /** * x11_screensaver_set: * @level: * * Switch the screensaver on or off. @level can be one of * X11_SCREENSAVER_ON or X11_SCREENSAVER_DISPLAY_ACTIVE. * When the function is disabled it does nothing. */ void x11_screensaver_set (unsigned int level) { Display *display = GDK_DISPLAY (); if (X11STUFF_SCREENSAVER_DEBUG) printv ("x11_screensaver_set (level=%d) enabled=%d dpms=%d\n", (int) level, screensaver_enabled, dpms_usable); if (screensaver_enabled) { if (level == X11_SCREENSAVER_ON) { if (NO_SOURCE_ID != screensaver_timeout_id) { g_source_remove (screensaver_timeout_id); screensaver_timeout_id = NO_SOURCE_ID; } /* Stolen from xawtvdecode, untested. */ #ifndef __NetBSD__ if (kscreensaver) { /* Error ignored. */ system ("dcop kdesktop KScreensaverIface " "enable true >/dev/null 2>&1"); } #endif } else { if (level & X11_SCREENSAVER_CPU_ACTIVE) { /* to do - this should block APM */ } if (level & X11_SCREENSAVER_DISPLAY_ACTIVE) { if (NO_SOURCE_ID == screensaver_timeout_id) { /* Make sure the display is on now. */ screensaver_timeout (NULL); XSync (display, /* discard events */ False); screensaver_timeout_id = g_timeout_add (5432 /* ms */, (GSourceFunc) screensaver_timeout, NULL); } } /* Stolen from xawtvdecode, untested. */ #ifndef __NetBSD__ if (kscreensaver) { /* Error ignored. */ system ("dcop kdesktop KScreensaverIface " "enable false >/dev/null 2>&1"); } #endif } } screensaver_level = level; } /** * x11_screensaver_control: * @enable: * * Enable or disable the x11_screensaver_set() function. */ void x11_screensaver_control (gboolean enable) { if (enable) { screensaver_enabled = TRUE; x11_screensaver_set (screensaver_level); } else if (screensaver_level != X11_SCREENSAVER_ON) { unsigned int level = screensaver_level; x11_screensaver_set (X11_SCREENSAVER_ON); screensaver_enabled = FALSE; screensaver_level = level; } } void x11_screensaver_init (void) { Display *display = GDK_DISPLAY (); #ifdef HAVE_DPMS_EXTENSION int event_base, error_base; int major_version, minor_version; #endif INTERN_ATOM (_SCREENSAVER_VERSION); INTERN_ATOM (SCREENSAVER); INTERN_ATOM (DEACTIVATE); screensaver_enabled = FALSE; screensaver_level = X11_SCREENSAVER_ON; dpms_usable = FALSE; screensaver_timeout_id = NO_SOURCE_ID; #ifdef HAVE_DPMS_EXTENSION if (!DPMSQueryExtension (display, &event_base, &error_base)) { printv ("DPMS extension not available\n"); return; } if (!DPMSGetVersion (display, &major_version, &minor_version)) { printv ("DPMS extension not usable\n"); return; } printv ("DPMS base %d, %d, version %d.%d\n", event_base, error_base, major_version, minor_version); if (1 != major_version) { printv ("Unknown DPMS version\n"); return; } if (!DPMSCapable (display)) { printv ("Display does not support DPMS\n"); return; } dpms_usable = TRUE; #else /* !HAVE_DPMS_EXTENSION */ printv ("DPMS extension support not compiled in\n"); #endif /* !HAVE_DPMS_EXTENSION */ #ifndef __NetBSD__ /* Stolen from xawdecode, untested. */ /* Original syntax: dcop kdesktop KScreensaverIface isEnabled \ 2>/dev/null | grep true &>/dev/null Csh cannot redirect two streams. Sh cannot >& file or &> file. Going with POSIX.2 syntax (bash, sh, not csh). */ kscreensaver = (0 == system ("( dcop kdesktop KScreensaverIface isEnabled 2>/dev/null" "| grep true ) >/dev/null 2>&1")); printv ("KScreensaver %spresent\n", kscreensaver ? "" : "not "); #endif } /* * XVideo helpers */ #ifdef HAVE_XV_EXTENSION #include <X11/extensions/Xvlib.h> #define FOURCC(a, b, c, d) \ (+ ((unsigned int)(a) << 0) \ + ((unsigned int)(b) << 8) \ + ((unsigned int)(c) << 16) \ + ((unsigned int)(d) << 24)) tv_pixfmt x11_xv_image_format_to_pixfmt (const XvImageFormatValues *format) { static struct { unsigned int fourcc; tv_pixfmt pixfmt; } fourcc_mapping [] = { /* These are Windows FOURCCs. Note the APM driver supports Y211 which is just a half width YUY2, hence not listed. */ { FOURCC ('Y','U','V','A'), TV_PIXFMT_YUVA32_LE }, /* Glint */ { FOURCC ('U','Y','V','Y'), TV_PIXFMT_UYVY }, { FOURCC ('U','Y','N','V'), TV_PIXFMT_UYVY }, { FOURCC ('Y','U','Y','2'), TV_PIXFMT_YUYV }, { FOURCC ('Y','U','N','V'), TV_PIXFMT_YUYV }, { FOURCC ('V','4','2','2'), TV_PIXFMT_YUYV }, { FOURCC ('Y','V','Y','U'), TV_PIXFMT_YVYU }, { FOURCC ('Y','2','Y','0'), TV_PIXFMT_YVYU }, /* NSC */ { FOURCC ('V','Y','U','Y'), TV_PIXFMT_VYUY }, /* APM */ { FOURCC ('I','4','2','0'), TV_PIXFMT_YUV420 }, { FOURCC ('I','Y','U','V'), TV_PIXFMT_YUV420 }, { FOURCC ('Y','V','1','2'), TV_PIXFMT_YVU420 }, { FOURCC ('Y','V','U','9'), TV_PIXFMT_YVU410 }, { FOURCC ('Y','8','0','0'), TV_PIXFMT_Y8 }, /* NSC */ { FOURCC ('Y','Y','Y','Y'), TV_PIXFMT_Y8 }, /* APM */ }; if (XvYUV == format->type) { unsigned int fourcc; unsigned int i; fourcc = FOURCC (format->guid[0], format->guid[1], format->guid[2], format->guid[3]); for (i = 0; i < N_ELEMENTS (fourcc_mapping); ++i) { if (fourcc_mapping[i].fourcc == fourcc) { return fourcc_mapping[i].pixfmt; } } } else if (XvRGB == format->type) { tv_pixel_format pixel_format; if (XvPlanar == format->format) return TV_PIXFMT_UNKNOWN; CLEAR (pixel_format); pixel_format.bits_per_pixel = format->bits_per_pixel; pixel_format.color_depth = format->depth; pixel_format.big_endian = (MSBFirst == format->byte_order); pixel_format.mask.rgb.r = format->red_mask; pixel_format.mask.rgb.g = format->green_mask; pixel_format.mask.rgb.b = format->blue_mask; pixel_format.pixfmt = tv_pixel_format_to_pixfmt (&pixel_format); if (TV_PIXFMT_UNKNOWN != pixel_format.pixfmt) return pixel_format.pixfmt; } return TV_PIXFMT_UNKNOWN; } static __inline__ char printable (char c) { return (c < 0x20 || c >= 0x7F) ? '.' : c; } static void xv_image_format_dump (const XvImageFormatValues *format, unsigned int index) { unsigned int i; tv_pixfmt pixfmt; fprintf (stderr, " XvImageFormat [%u]:\n" " id 0x%x ('%c%c%c%c')\n" " guid ", index, (unsigned int) format->id, printable (((unsigned int) format->id) >> 0), printable (((unsigned int) format->id) >> 8), printable (((unsigned int) format->id) >> 16), printable (((unsigned int) format->id) >> 24)); for (i = 0; i < 16; ++i) { fprintf (stderr, "%02x%s", format->guid[i] & 0xFF, (0x2A8 & (1 << i)) ? "-" : ""); } fprintf (stderr, "\n" " type %s\n" " format %s\n" " num_planes %u\n" " byte_order %s\n" " bits_per_pixel %u\n", (format->type == XvRGB) ? "RGB" : (format->type == XvYUV) ? "YUV" : "?", (format->format == XvPacked) ? "Packed" : (format->format == XvPlanar) ? "Planar" : "?", (unsigned int) format->num_planes, (format->byte_order == LSBFirst) ? "LSBFirst/NoOrder" : (format->byte_order == MSBFirst) ? "MSBFirst" : "?", (unsigned int) format->bits_per_pixel); switch (format->type) { case XvRGB: fprintf (stderr, " rgb mask 0x%08x 0x%08x 0x%08x\n" " depth %u\n", (unsigned int) format->red_mask, (unsigned int) format->green_mask, (unsigned int) format->blue_mask, (unsigned int) format->depth); break; case XvYUV: fprintf (stderr, " yuv bits %u %u %u\n" " yuv hor. period %u %u %u\n" " yuv vert. period %u %u %u\n", (unsigned int) format->y_sample_bits, (unsigned int) format->u_sample_bits, (unsigned int) format->v_sample_bits, (unsigned int) format->horz_y_period, (unsigned int) format->horz_u_period, (unsigned int) format->horz_v_period, (unsigned int) format->vert_y_period, (unsigned int) format->vert_u_period, (unsigned int) format->vert_v_period); break; default: break; } fprintf (stderr, " component_order "); for (i = 0; i < sizeof (format->component_order); ++i) { fputc (printable (format->component_order[i]), stderr); } fprintf (stderr, "\n" " scanline_order %s\n", (format->scanline_order == XvTopToBottom) ? "TopToBottom" : (format->scanline_order == XvBottomToTop) ? "BottomToTop" : ""); pixfmt = x11_xv_image_format_to_pixfmt (format); fprintf (stderr, " pixfmt equiv %s\n", tv_pixfmt_name (pixfmt)); } static void xv_adaptor_info_dump (const XvAdaptorInfo * adaptor, unsigned int index) { static struct { unsigned int mask; const char * name; } adaptor_types [] = { { XvInputMask, "Input" }, { XvOutputMask, "Output" }, { XvVideoMask, "Video" }, { XvStillMask, "Still" }, { XvImageMask, "Image" }, }; unsigned int type; unsigned int count; unsigned int i; fprintf (stderr, "XvAdaptorInfo [%u]:\n" " name \"%s\"\n" " base_id 0x%x\n" " num_ports %u\n" " type ", index, adaptor->name, (unsigned int) adaptor->base_id, (unsigned int) adaptor->num_ports); type = adaptor->type; count = 0; for (i = 0; i < N_ELEMENTS (adaptor_types); ++i) { if (type & adaptor_types[i].mask) { fprintf (stderr, "%s%s", count ? "|" : "", adaptor_types[i].name); type &= ~adaptor_types[i].mask; ++count; } } if (type != 0) { fprintf (stderr, "%s0x%x", count ? "|" : "", type); } fprintf (stderr, "\n" " num_formats %u\n", (unsigned int) adaptor->num_formats); } static void xv_adaptor_dump (Display * display, const XvAdaptorInfo * adaptor, unsigned int index) { XvImageFormatValues *pImageFormats[2]; int nImageFormats[2]; unsigned int i; xv_adaptor_info_dump (adaptor, index); if (0 == adaptor->num_ports) { fprintf (stderr, " No ports\n"); return; } CLEAR (pImageFormats); CLEAR (nImageFormats); for (i = 0; i < adaptor->num_ports; ++i) { XvPortID xvport; unsigned int size; fprintf (stderr, " Port [%u]\n", i); xvport = adaptor->base_id + i; pImageFormats[1] = XvListImageFormats (display, xvport, &nImageFormats[1]); if (NULL == pImageFormats[1] || 0 == nImageFormats[1]) continue; size = sizeof (*pImageFormats[0]) * nImageFormats[0]; if (nImageFormats[0] == nImageFormats[1] && 0 == memcmp (pImageFormats[0], pImageFormats[1], size)) { fprintf (stderr, " %u formats as above\n", nImageFormats[1]); } else { int i; if (0 == nImageFormats[1]) fprintf (stderr, " No image formats\n"); else for (i = 0; i < nImageFormats[1]; ++i) xv_image_format_dump (pImageFormats[1] + i, i); } if (nImageFormats[0] > 0) XFree (pImageFormats[0]); pImageFormats[0] = pImageFormats[1]; nImageFormats[0] = nImageFormats[1]; } if (nImageFormats[0] > 0) XFree (pImageFormats[0]); } gboolean x11_xvideo_dump (void) { XErrorHandler old_error_handler; Display *display; unsigned int version; unsigned int revision; unsigned int major_opcode; unsigned int event_base; unsigned int error_base; Window root; XvAdaptorInfo *pAdaptors; unsigned int nAdaptors; unsigned int i; gboolean r; r = FALSE; display = GDK_DISPLAY (); old_error_handler = XSetErrorHandler (x11_error_handler); if (Success != XvQueryExtension (display, &version, &revision, &major_opcode, &event_base, &error_base)) { printv ("XVideo extension not available\n"); goto failure; } printv ("XVideo opcode %d, base %d, %d, version %d.%d\n", major_opcode, event_base, error_base, version, revision); if (version < 2 || (version == 2 && revision < 2)) { printv ("XVideo extension not usable\n"); goto failure; } root = DefaultRootWindow (display); if (Success != XvQueryAdaptors (display, root, &nAdaptors, &pAdaptors)) { printv ("XvQueryAdaptors failed\n"); goto failure; } if (nAdaptors > 0) { for (i = 0; i < nAdaptors; ++i) xv_adaptor_dump (display, pAdaptors + i, i); XvFreeAdaptorInfo (pAdaptors); } else { printv ("No XVideo adaptors\n"); } r = TRUE; failure: XSetErrorHandler (old_error_handler); return r; } #else /* !HAVE_XV_EXTENSION */ gboolean x11_xvideo_dump (void) { fprintf (stderr, "XVideo extension support not compiled in\n"); return FALSE; } #endif /* !HAVE_XV_EXTENSION */ /* * Clipping helpers */ static tv_bool children_clips (tv_clip_vector * vector, Display * display, Window window, Window stack_level, int x, int y, unsigned int width, unsigned int height, int parent_x, int parent_y) { XErrorHandler old_error_handler; Window root; Window parent; Window *children; unsigned int n_children; unsigned int i; tv_bool r; children = NULL; r = FALSE; /* We need to trap BadWindow errors while traversing the list of windows because they might get deleted in the meantime. */ old_error_handler = XSetErrorHandler (x11_error_handler); if (!XQueryTree (display, window, &root, &parent, &children, &n_children)) goto failure; if (0 == n_children) goto success; for (i = 0; i < n_children; ++i) if (children[i] == stack_level) break; if (i == n_children) i = 0; else ++i; for (; i < n_children; ++i) { XWindowAttributes wts; int x1, y1; int x2, y2; x11_error_code = Success; XGetWindowAttributes (display, children[i], &wts); if (BadWindow == x11_error_code) { /* May have disappeared in the meantime. */ continue; } else if (Success != x11_error_code) { goto failure; } if (!(wts.map_state & IsViewable)) continue; x1 = (wts.x + parent_x - wts.border_width) - x; y1 = (wts.y + parent_y - wts.border_width) - y; x2 = x1 + wts.width + wts.border_width * 2; y2 = y1 + wts.height + wts.border_width * 2; if (x2 < 0 || x1 > (int) width || y2 < 0 || y1 > (int) height) continue; if (!tv_clip_vector_add_clip_xy (vector, MAX (x1, 0), MAX (y1, 0), MIN (x2, (int) width), MIN (y2, (int) height))) goto failure; } success: r = TRUE; failure: if (NULL != children) { XFree (children); } XSetErrorHandler (old_error_handler); return r; } /* * x11_window_clip_vector: * @vector: Initialized tv_clip_vector, clipping rectangles are stored here. * @display: * @window: Window "displaying" the overlaid video. Regions of the overlay * outside this window add to the clip vector. It also determines the * video layer, which other windows are visible "above" the video. * @x, y, width, height: Top, left coordinates and size of the overlay. * Coordinates are relative to the target base address, i.e. the * root window. The overlay can lie partially or completely outside the * @window and @display. * * Returns a clip vector describing areas obscuring the @x, @y, @width, * @height overlay rectangle. Clip coordinates in the vector will be * relative to @x, @y. * * It should be obvious, but just in case: We cannot lock the X server, * so the resulting clip vector is only a snapshot. It may be already * outdated when returned. * * Returns FALSE if unsuccessful, with random vector contents. */ tv_bool x11_window_clip_vector (tv_clip_vector * vector, Display * display, Window window, int x, int y, unsigned int width, unsigned int height) { Window root; int wx1, wy1; /* window inner bounds, root relative */ int wx2, wy2; int x2, y2; /* x + width, y + height */ tv_clip_vector_clear (vector); if (0) fprintf (stderr, "%s overl: %d, %d - %d, %d (%u x %u)\n", __FUNCTION__, x, y, x+width, y+height, width, height); { unsigned int width; unsigned int height; unsigned int dummy; Window child; if (!XGetGeometry (display, window, &root, &wx1, &wy1, &width, &height, /* border_width */ &dummy, /* depth */ &dummy)) return FALSE; if (!XTranslateCoordinates (display, window, root, 0, 0, &wx1, &wy1, &child)) return FALSE; wx2 = wx1 + width; wy2 = wy1 + height; if (0) fprintf (stderr, "%s window: %d, %d - %d, %d (%u x %u)\n", __FUNCTION__, wx1, wy1, wx2, wy2, width, height); } x2 = x + width; y2 = y + height; if (x >= wx2 || x2 <= wx1 || y >= wy2 || y2 <= wy1) return tv_clip_vector_add_clip_xy (vector, 0, 0, width, height); if (x < wx1) { if (!tv_clip_vector_add_clip_xy (vector, 0, 0, wx1 - x, height)) return FALSE; } if (y < wy1) { if (!tv_clip_vector_add_clip_xy (vector, 0, 0, width, wy1 - y)) return FALSE; } if (x2 > wx2) { if (!tv_clip_vector_add_clip_xy (vector, wx2 - x, 0, x2 - wx2, height)) return FALSE; } if (y2 > wy2) { if (!tv_clip_vector_add_clip_xy (vector, 0, wy2 - y, width, y2 - wy2)) return FALSE; } if (!children_clips (vector, display, window, None, x, y, width, height, wx1, wy1)) return FALSE; for (;;) { Window parent; Window *children; unsigned int nchildren; if (!XQueryTree (display, window, &root, &parent, &children, &nchildren)) return FALSE; if (children) XFree ((char *) children); if (root == parent) break; window = parent; } return children_clips (vector, display, root, window, x, y, width, height, 0, 0); } �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������zapping-0.10cvs6/src/x11stuff.h��������������������������������������������������������������������� 644 � 764 � 144 � 7772 10404545744 11452� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Zapping (TV viewer for the Gnome Desktop) * Copyright (C) 2000-2001 Iaki Garca Etxebarria * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifndef __X11STUFF_H__ #define __X11STUFF_H__ /* * the routines contained here are all the X-specific stuff in Zapping */ #ifdef HAVE_CONFIG_H # include "config.h" #endif #include <gtk/gtk.h> #include "tveng.h" /* tv_overlay_target, tv_pixfmt */ #include "libtv/screen.h" /* * Returns a pointer to the data contained in the given GdkImage */ gpointer x11_get_data(GdkImage * image); /* * Returns the byte order of the X server */ GdkByteOrder x11_get_byte_order(void); /* * Returns the bits per pixel needed for a GdkImage. -1 on error. */ gint x11_get_bpp(void); const gchar * x11_display_name (void); extern unsigned long x11_error_code; extern int x11_error_handler (Display * display, XErrorEvent * error); /* * Maps and unmaps a window of the given (screen) geometry, thus * forcing an expose event in that area */ void x11_force_expose(gint x, gint y, guint w, guint h); /* * Returns TRUE if the window is viewable */ gboolean x11_window_viewable(GdkWindow *window); /* Keep-window-on-top routines */ extern void (* x11_window_on_top) (GtkWindow *window, gboolean on); extern void (* x11_window_fullscreen) (GtkWindow *window, gboolean on); extern void (* x11_window_below) (GtkWindow *window, gboolean on); extern gboolean wm_hints_detect (void); /* VidMode routines */ typedef struct _x11_vidmode_info x11_vidmode_info; struct _x11_vidmode_info { x11_vidmode_info * next; unsigned int width; unsigned int height; double hfreq; /* Hz */ double vfreq; /* Hz */ double aspect; /* pixel y/x */ }; typedef struct _x11_vidmode_state x11_vidmode_state; struct _x11_vidmode_state { /* <Private> */ struct { const x11_vidmode_info *vm; struct { int x; int y; } pt, vp; } _old, _new; }; extern void x11_vidmode_list_delete (x11_vidmode_info * list); extern x11_vidmode_info * x11_vidmode_list_new (const char * display_name, int screen_number); extern const x11_vidmode_info * x11_vidmode_by_name (const x11_vidmode_info *list, const gchar * name); extern const x11_vidmode_info * x11_vidmode_current (const x11_vidmode_info *list); extern void x11_vidmode_clear_state (x11_vidmode_state * vs); extern gboolean x11_vidmode_switch (const x11_vidmode_info *vlist, const tv_screen * slist, const x11_vidmode_info *vm, x11_vidmode_state * vs); extern void x11_vidmode_restore (const x11_vidmode_info *list, x11_vidmode_state * vs); /* Screensaver routines */ #define X11_SCREENSAVER_ON 0 #define X11_SCREENSAVER_DISPLAY_ACTIVE (1 << 0) /* for overlay modes */ #define X11_SCREENSAVER_CPU_ACTIVE (1 << 1) /* for capture modes */ extern void x11_screensaver_set (unsigned int level); extern void x11_screensaver_control (gboolean enable); extern void x11_screensaver_init (void); /* XVideo routines */ #ifdef HAVE_XV_EXTENSION #include <X11/extensions/Xvlib.h> extern tv_pixfmt x11_xv_image_format_to_pixfmt (const XvImageFormatValues *format); #endif extern gboolean x11_xvideo_dump (void); /* Clipping */ extern tv_bool x11_window_clip_vector (tv_clip_vector * vector, Display * display, Window window, int x, int y, unsigned int width, unsigned int height); #endif /* x11stuff.h */ ������zapping-0.10cvs6/src/tvengemu.c��������������������������������������������������������������������� 644 � 764 � 144 � 27242 10373211641 11617� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Zapping (TV viewer for the Gnome Desktop) * Copyright (C) 2002 Iaki Garca Etxebarria * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* This module is somewhat different, this time we are generating a virtual device without actual hw underneath. To enable it use the device name "emulator". You can also this module as a template when you want to support other apis in tveng. */ #include "site_def.h" #ifdef HAVE_CONFIG_H # include "config.h" #endif #include <stdio.h> #include <errno.h> #include "common/fifo.h" #include "common/device.h" #include <tveng.h> #define TVENGEMU_PROTOTYPES #include "tvengemu.h" struct private_tvengemu_device_info { tveng_device_info info; /* Inherited */ tv_overlay_buffer overlay_buffer; uint32_t freq; /* Current freq */ uint32_t freq_min, freq_max; /* tuner bounds */ uint32_t chromakey; /* overlay chroma */ struct timeval sample_time; int64_t stream_time; }; #define P_INFO(p) PARENT (p, struct private_tvengemu_device_info, info) static tv_bool set_control (tveng_device_info * info _unused_, tv_control * tc, int value) { fprintf (stderr, "emu::set_control '%s' value=%d=0x%x\n", tc->label, value, value); tc->value = value; return TRUE; } static tv_control * add_control (tveng_device_info * info, const char * label, tv_control_id id, tv_control_type type, int current, int reset, int minimum, int maximum, int step) { tv_control c; tv_control *tc; CLEAR (c); c.type = type; c.id = id; if (!(c.label = strdup (_(label)))) return NULL; c.minimum = minimum; c.maximum = maximum; c.step = step; c.reset = reset; c.value = current; tc = append_panel_control (info, &c, sizeof (c)); return tc; } static void add_controls (tveng_device_info * info) { tv_control *tc; add_control (info, "Integer", TV_CONTROL_ID_UNKNOWN, TV_CONTROL_TYPE_INTEGER, 0, 13, -20, 72, 3); tc = add_control (info, "Meaning of Life", TV_CONTROL_ID_UNKNOWN, TV_CONTROL_TYPE_CHOICE, 0, 0, 0, 2, 1); tc->menu = calloc (3 + 1, sizeof (const char *)); tc->menu[0] = strdup ("42"); tc->menu[1] = strdup ("9:4:1"); tc->menu[2] = strdup ("Monty Python"); add_control (info, "Self Destruct", TV_CONTROL_ID_UNKNOWN, TV_CONTROL_TYPE_ACTION, 0, 0, INT_MIN, INT_MAX, 0); add_control (info, "Mute", TV_CONTROL_ID_MUTE, TV_CONTROL_TYPE_BOOLEAN, 0, 1, 0, 1, 1); add_control (info, "Red Alert Color", TV_CONTROL_ID_UNKNOWN, TV_CONTROL_TYPE_COLOR, 0x00FF00, 0xFF0000, 0x000000, 0xFFFFFF, 0); } static tv_bool set_video_standard (tveng_device_info * info, tv_video_standard * ts) { fprintf (stderr, "emu::set_standard '%s'\n", ts->label); store_cur_video_standard (info, ts); return TRUE; } static void add_standards (tveng_device_info * info) { append_video_standard (&info->panel.video_standards, TV_VIDEOSTD_SET_PAL, "PAL", "PAL", sizeof (tv_video_standard)); append_video_standard (&info->panel.video_standards, TV_VIDEOSTD_SET_NTSC, "NTSC", "NTSC", sizeof (tv_video_standard)); info->panel.cur_video_standard = info->panel.video_standards; } static tv_bool set_tuner_frequency (tveng_device_info * info, tv_video_line * l, unsigned int frequency) { if (l->u.tuner.frequency != frequency) { l->u.tuner.frequency = frequency; tv_callback_notify (info, l, l->_callback); } return TRUE; } static tv_bool get_signal_strength (tveng_device_info * info _unused_, int * strength _unused_, int * afc _unused_) { return TRUE; } static tv_bool set_video_input (tveng_device_info * info, tv_video_line * tl) { fprintf (stderr, "emu::set_video_input '%s'\n", tl->label); store_cur_video_input (info, tl); return TRUE; } static void add_video_inputs (tveng_device_info * info) { tv_video_line *l; l = append_video_line (&info->panel.video_inputs, TV_VIDEO_LINE_TYPE_TUNER, "Tuner", "Tuner", sizeof (tv_video_line)); l->_parent = info; l = append_video_line (&info->panel.video_inputs, TV_VIDEO_LINE_TYPE_BASEBAND, "Composite", "Composite", sizeof (tv_video_line)); l->_parent = info; info->panel.cur_video_input = info->panel.video_inputs; } /* Closes a device opened with tveng_init_device */ static void tvengemu_close_device(tveng_device_info * info) { gboolean dummy; p_tveng_stop_everything (info, &dummy); info->fd = -1; info->current_controller = TVENG_CONTROLLER_NONE; if (info -> file_name) { free(info -> file_name); info->file_name = NULL; } free_panel_controls (info); free_video_standards (info); free_video_inputs (info); free (info->node.device); info->node.device = NULL; /* Don't free other info->node strings, these are static. */ CLEAR (info->node); } static tv_bool get_capture_format (tveng_device_info * info _unused_) { return TRUE; } static tv_bool set_capture_format (tveng_device_info * info, const tv_image_format *fmt) { info->capture.format = *fmt; return TRUE; } static tv_bool capture_enable (tveng_device_info * info, tv_bool enable) { struct private_tvengemu_device_info *p_info = P_INFO (info); if (enable) { gboolean dummy; p_tveng_stop_everything (info, &dummy); info->capture_mode = CAPTURE_MODE_READ; gettimeofday (&p_info->sample_time, /* tz */ NULL); p_info->stream_time = 0; } else { info->capture_mode = CAPTURE_MODE_NONE; } return TRUE; } static int read_frame (tveng_device_info * info, tv_capture_buffer * buffer _unused_, const struct timeval * timeout _unused_) { struct private_tvengemu_device_info *p_info = P_INFO (info); struct timeval adv; assert (NULL != info); if (info -> capture_mode != CAPTURE_MODE_READ) { info -> tveng_errno = -1; tv_error_msg(info, "Current capture mode is not READ (%d)", info->capture_mode); return -1; } usleep ((unsigned int)(1e6 / 40)); if (buffer) { buffer->sample_time = p_info->sample_time; buffer->stream_time = p_info->stream_time; } adv.tv_sec = 0; adv.tv_usec = info->panel.cur_video_standard->frame_ticks * 1000 / 90; timeval_add (&p_info->sample_time, &p_info->sample_time, &adv); p_info->stream_time += info->panel.cur_video_standard->frame_ticks; return 1; /* success */ } static tv_bool set_overlay_buffer (tveng_device_info * info, const tv_overlay_buffer *t) { P_INFO (info)->overlay_buffer = *t; return TRUE; } static tv_bool get_overlay_buffer (tveng_device_info * info _unused_) { info->overlay.buffer = P_INFO (info)->overlay_buffer; return TRUE; } static tv_bool set_overlay_window (tveng_device_info * info, const tv_window * w, const tv_clip_vector * v, unsigned int chromakey) { v = v; /* Set & get. tveng.c takes care of info->overlay.clip_vector. */ info->overlay.window = *w; info->overlay.chromakey = chromakey; return TRUE; } static tv_bool get_overlay_window (tveng_device_info * info _unused_) { return TRUE; } static tv_bool enable_overlay (tveng_device_info * info _unused_, tv_bool on _unused_) { return TRUE; } /* Associates the given tveng_device_info with the given video device. On error it returns -1 and sets info->tveng_errno, info->error to the correct values. device_file: The file used to access the video device (usually /dev/video) attach_mode: Specifies the mode to open the device file depth: The color depth the capture will be in, -1 means let tveng decide based on the current display depth. info: The structure to be associated with the device */ static int tvengemu_attach_device(const char* device_file, Window window _unused_, enum tveng_attach_mode attach_mode, tveng_device_info * info) { static const tv_device_node node = { .label = "Emulated device", .bus = NULL, .driver = "Emulator", .version = "0.1", }; static const struct tveng_caps caps = { .name = "Emulated device", .flags = (TVENG_CAPS_CAPTURE | TVENG_CAPS_TUNER | TVENG_CAPS_TELETEXT | TVENG_CAPS_OVERLAY | TVENG_CAPS_CLIPPING), .channels = 2, .audios = 1, .maxwidth = 768, .maxheight = 576, .minwidth = 32, .minheight = 32 }; struct private_tvengemu_device_info * p_info = P_INFO (info); assert (NULL != device_file); assert (NULL != info); memset ((char *) p_info + sizeof (p_info->info), 0, sizeof (*p_info) - sizeof (*info)); if (-1 != info->fd) tveng_close_device (info); info->node = node; /* XXX error */ info->node.device = strdup (device_file); info -> file_name = strdup (device_file); info->caps = caps; info -> attach_mode = attach_mode; info -> capture_mode = CAPTURE_MODE_NONE; info -> fd = 0xdeadbeef; info->panel.set_video_input = set_video_input; info->panel.set_tuner_frequency = set_tuner_frequency; info->panel.get_signal_strength = get_signal_strength; info->panel.set_video_standard = set_video_standard; info->panel.set_control = set_control; add_video_inputs (info); add_standards (info); add_controls (info); CLEAR (p_info->overlay_buffer); CLEAR (info->overlay); info->overlay.set_buffer = set_overlay_buffer; info->overlay.get_buffer = get_overlay_buffer; info->overlay.set_window = set_overlay_window; info->overlay.get_window = get_overlay_window; info->overlay.enable = enable_overlay; CLEAR (info->capture); info->capture.get_format = get_capture_format; info->capture.set_format = set_capture_format; info->capture.enable = capture_enable; info->capture.read_frame = read_frame; /* Set up some capture parameters */ info->capture.supported_pixfmt_set = TV_PIXFMT_SET_ALL; info->capture.format.width = info->panel.cur_video_standard->frame_width / 2; info->capture.format.height = info->panel.cur_video_standard->frame_height / 2; info->capture.format.pixel_format = tv_pixel_format_from_pixfmt (TV_PIXFMT_YVU420); get_capture_format (info); /* Overlay window setup */ info->overlay.window.x = 0; info->overlay.window.y = 0; info->overlay.window.width = info->capture.format.width; info->overlay.window.height = info->capture.format.height; /* Framebuffer */ info->overlay.buffer.base = 0; info->overlay.buffer.format.width = info->caps.maxwidth; info->overlay.buffer.format.height = info->caps.maxheight; /* info->overlay.buffer.depth = 17; info->overlay.buffer.bytes_per_line[0] = (info->overlay.buffer.depth+7)/8 * info->overlay.buffer.width; */ /* Tuner bounds */ p_info -> freq_min = 1000; p_info -> freq_max = 1000000; p_info -> freq = 815250; info -> current_controller = TVENG_CONTROLLER_EMU; return 0; } static struct tveng_module_info tvengemu_module_info = { attach_device: tvengemu_attach_device, close_device: tvengemu_close_device, .interface_label = "Emulation", private_size: sizeof(struct private_tvengemu_device_info) }; void tvengemu_init_module(struct tveng_module_info *module_info) { assert (NULL != module_info); memcpy (module_info, &tvengemu_module_info, sizeof (struct tveng_module_info)); } ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������zapping-0.10cvs6/src/tvengemu.h��������������������������������������������������������������������� 644 � 764 � 144 � 4005 10167772045 11607� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Zapping (TV viewer for the Gnome Desktop) * Copyright (C) 2002 Iaki Garca Etxebarria * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifndef __TVENGEMU_H__ #define __TVENGEMU_H__ #include "tveng_private.h" /* Inits the EMU module, and fills in the given table. */ void tvengemu_init_module(struct tveng_module_info *module_info); /* Prototypes for forward declaration, used only in tvengemu.c */ #ifdef TVENGEMU_PROTOTYPES /* Associates the given tveng_device_info with the given video device. On error it returns -1 and sets info->errno, info->error to the correct values. device_file: The file used to access the video device (usually /dev/video) attach_mode: Specifies the mode to open the device file depth: The color depth the capture will be in, -1 means let tveng decide based on the current display depth. info: The structure to be associated with the device */ static int tvengemu_attach_device(const char* device_file, Window window, enum tveng_attach_mode attach_mode, tveng_device_info * info); /* Closes the video device asocciated to the device info object. Should be called before reattaching a video device to the same object, but there is no need to call this before calling tveng_device_info_destroy. */ static void tvengemu_close_device(tveng_device_info* info); #endif /* TVENGEMU_PROTOTYPES */ #endif /* TVENGEMU.H */ ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������zapping-0.10cvs6/src/main.c������������������������������������������������������������������������� 644 � 764 � 144 � 105357 10442152004 10727� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Zapping (TV viewer for the Gnome Desktop) * Copyright (C) 2000-2001 Iaki Garca Etxebarria * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifdef HAVE_CONFIG_H # include "config.h" #endif #include <gnome.h> #include <gdk/gdkx.h> #include <glade/glade.h> #include <signal.h> #define ZCONF_DOMAIN "/zapping/options/main/" #include "zconf.h" #include "zmisc.h" #include "interface.h" #include "tveng.h" #include "v4linterface.h" #include "plugins.h" #include "frequencies.h" #include "zvbi.h" #include "libtv/cpu.h" #include "overlay.h" #include "capture.h" #include "x11stuff.h" #include "zimage.h" #include "osd.h" #include "remote.h" #include "cmd.h" #include "audio.h" #include "csconvert.h" #include "properties-handler.h" #include "properties.h" #include "mixer.h" #include "keyboard.h" #include "globals.h" #include "plugin_properties.h" #include "channel_editor.h" #include "i18n.h" #include "vdr.h" #include "xawtv.h" #include "subtitle.h" #ifndef HAVE_PROGRAM_INVOCATION_NAME char *program_invocation_name; char *program_invocation_short_name; #endif Zapping * zapping; static GnomeClient * session; /*** END OF GLOBAL STUFF ***/ void shutdown_zapping(void); static gboolean startup_zapping(gboolean load_plugins, tveng_device_info *info); gboolean on_zapping_key_press (GtkWidget *widget, GdkEventKey *event, gpointer *user_data); gboolean on_zapping_key_press (GtkWidget *widget, GdkEventKey *event, gpointer *user_data) { return on_channel_enter (widget, event, user_data) || on_user_key_press (widget, event, user_data) || on_picture_size_key_press (widget, event, user_data) || on_channel_key_press (widget, event, user_data); } /* Start VBI services, and warn if we cannot */ static void startup_teletext(void) { #ifdef HAVE_LIBZVBI if (NULL == _teletext_view_new /* have Teletext plugin */) gtk_action_group_set_visible (zapping->teletext_action_group, FALSE); if (NULL == _subtitle_view_new /* have Subtitle plugin */) gtk_action_group_set_visible (zapping->subtitle_action_group, FALSE); D(); /* XXX still useful for channel names et al. */ if (_teletext_view_new || _subtitle_view_new) { /* Error ignored. */ zvbi_start (); D(); } #else disable_vbi = TRUE; gtk_action_group_set_visible (zapping->teletext_action_group, FALSE); gtk_action_group_set_visible (zapping->subtitle_action_group, FALSE); printv ("VBI disabled, removing GUI items\n"); /* Set the capture mode to a default value and disable VBI */ if (zcg_int (NULL, "capture_mode") == OLD_TVENG_TELETEXT) zcs_int (OLD_TVENG_CAPTURE_READ, "capture_mode"); #endif } static gboolean session_save (GnomeClient * client, gint phase, GnomeSaveStyle save_style, gboolean shutting_down, GnomeInteractStyle interact_style, gboolean fast, gpointer user_data) { GList *p; gchar **argv; guint argc; gboolean success; phase = phase; save_style = save_style; shutting_down = shutting_down; interact_style = interact_style; fast = fast; argv = g_malloc0 (4 * sizeof (gchar *)); argc = 0; argv[argc++] = user_data; /* main() argv[0] */ gnome_client_set_clone_command (client, argc, argv); gnome_client_set_restart_command (client, argc, argv); success = TRUE; for (p = g_list_first (plugin_list); p; p = p->next) { struct plugin_info *pi; /* Shutdown while recording etc no good. */ pi = (struct plugin_info *) p->data; success &= plugin_running (pi); } /* libgnomeui 2.8 bug: ignores return value. */ client->save_successfull = success; return success; } static void session_die (GnomeClient * client, gpointer user_data) { client = client; user_data = user_data; on_python_command1 (GTK_WIDGET (zapping), "zapping.quit()"); } #include "pixmaps/brightness.h" #include "pixmaps/contrast.h" #include "pixmaps/saturation.h" #include "pixmaps/hue.h" #include "pixmaps/recordtb.h" #include "pixmaps/mute.h" #include "pixmaps/teletext.h" #include "pixmaps/subtitle.h" #include "pixmaps/video.h" #include "pixmaps/screenshot.h" #define ADD_STOCK(name) \ item.stock_id = "zapping-" #name; \ gtk_stock_add (&item, 1); \ z_icon_factory_add_pixdata (item.stock_id, & name ## _png); static void init_zapping_stock (void) { static const GtkStockItem items [] = { { "zapping-mute", N_("Mute"), 0, 0, NULL }, { "zapping-teletext", N_("Teletext"), 0, 0, NULL }, { "zapping-subtitle", N_("Subtitles"), 0, 0, NULL }, { "zapping-video", N_("Video"), 0, 0, NULL }, }; GtkStockItem item; CLEAR (item); ADD_STOCK (brightness); ADD_STOCK (contrast); ADD_STOCK (saturation); ADD_STOCK (hue); ADD_STOCK (recordtb); ADD_STOCK (screenshot); gtk_stock_add (items, G_N_ELEMENTS (items)); z_icon_factory_add_pixdata ("zapping-mute", &mute_png); z_icon_factory_add_pixdata ("zapping-teletext", &teletext_png); z_icon_factory_add_pixdata ("zapping-subtitle", &subtitle_png); z_icon_factory_add_pixdata ("zapping-video", &video_png); } static void restore_controls (void) { tveng_tuned_channel *tc; gboolean start_muted; D(); tc = tveng_tuned_channel_new (/* copy of */ NULL); /* Error ignored. */ zconf_get_controls (tc, "/zapping/options/main"); start_muted = zcg_bool (NULL, "start_muted"); if (start_muted) { tveng_tc_control *mute; if ((mute = tveng_tc_control_by_id (zapping->info, tc->controls, tc->num_controls, TV_CONTROL_ID_MUTE))) mute->value = 1; } load_control_values (zapping->info, tc->controls, tc->num_controls); tveng_tuned_channel_delete (tc); tc = NULL; set_mute (3 /* update */, /* controls */ TRUE, /* osd */ FALSE); D(); /* Restore the input and the standard */ /* XXX make this optional */ if (1) zconf_get_sources (zapping->info, start_muted); } #define DEVICE_SUPPORTS_CAPTURE(info) \ (0 != (tv_get_caps (info)->flags & TVENG_CAPS_CAPTURE)) #define DEVICE_SUPPORTS_OVERLAY(info) \ (0 != (tv_get_caps (info)->flags & TVENG_CAPS_OVERLAY)) static void restore_last_capture_mode (void) { gint cap_mode; display_mode dmode; capture_mode cmode; gchar *errstr; cap_mode = zcg_int (NULL, "capture_mode"); from_old_tveng_capture_mode (&dmode, &cmode, (enum old_tveng_capture_mode) cap_mode); errstr = NULL; if (CAPTURE_MODE_NONE == cmode) cmode = CAPTURE_MODE_OVERLAY; if (!DEVICE_SUPPORTS_CAPTURE (zapping->info)) { GtkAction *action; printv("Device not capture capable, removing GUI items\n"); action = gtk_action_group_get_action (zapping->generic_action_group, "Capture"); z_action_set_sensitive (action, FALSE); if (CAPTURE_MODE_READ == cmode) cmode = CAPTURE_MODE_OVERLAY; } if (disable_overlay || !DEVICE_SUPPORTS_OVERLAY (zapping->info)) { GtkAction *action; printv("Device not overlay capable, removing GUI items\n"); action = gtk_action_group_get_action (zapping->generic_action_group, "Overlay"); z_action_set_sensitive (action, FALSE); if (CAPTURE_MODE_OVERLAY == cmode) { if (!DEVICE_SUPPORTS_CAPTURE (zapping->info)) goto failed2; cmode = CAPTURE_MODE_READ; } } if (0 == zmisc_switch_mode (dmode, cmode, zapping->info, /* warnings */ FALSE)) goto success; errstr = g_strdup (tv_get_errstr (zapping->info)); dmode = DISPLAY_MODE_WINDOW; if (CAPTURE_MODE_READ == cmode) { if (disable_overlay || !DEVICE_SUPPORTS_OVERLAY (zapping->info)) goto failed; cmode = CAPTURE_MODE_OVERLAY; } else if (CAPTURE_MODE_OVERLAY == cmode) { if (!DEVICE_SUPPORTS_CAPTURE (zapping->info)) goto failed; cmode = CAPTURE_MODE_READ; if (0) ShowBox(_("Cannot restore previous mode, will try capture mode:\n%s"), GTK_MESSAGE_ERROR, tv_get_errstr (zapping->info)); } if (0 == zmisc_switch_mode (dmode, cmode, zapping->info, /* warnings */ FALSE)) goto success; if (0) ShowBox(_("Capture mode couldn't be started either:\n%s"), GTK_MESSAGE_ERROR, tv_get_errstr (zapping->info)); failed: ShowBox(_("Cannot restore previous mode:\n%s"), GTK_MESSAGE_ERROR, errstr); failed2: last_dmode = DISPLAY_MODE_WINDOW; last_cmode = CAPTURE_MODE_OVERLAY; g_free (errstr); errstr = NULL; return; success: last_dmode = dmode; last_cmode = cmode; g_free (errstr); errstr = NULL; } extern int zapzilla_main(int argc, char * argv[]); /* Make sure the version appears in backtraces. */ #define _MAIN(version) main_ ## version #define MAIN(version) _MAIN (version) int MAIN (PACKAGE_VERSION_ID) (int argc, char ** argv); int MAIN (PACKAGE_VERSION_ID) (int argc, char ** argv) { GList * p; gint x_bpp = -1; gint dword_align = FALSE; gint disable_plugins = FALSE; gint dummy; char *video_device = NULL; char *command = NULL; char *yuv_format = NULL; char *norm = NULL; char *cpu_feature_str = NULL; gboolean mutable = TRUE; const gchar *display_name; tveng_device_info *info; /* Some other common options in case the standard one fails */ const gchar *fallback_devices[] = { #ifdef ENABLE_V4L "/dev/video", "/dev/video0", "/dev/v4l/video0", "/dev/v4l/video", "/dev/video1", "/dev/video2", "/dev/video3", "/dev/v4l/video1", "/dev/v4l/video2", "/dev/v4l/video3", #endif #ifdef ENABLE_BKTR "/dev/bktr", #endif }; gint num_fallbacks = sizeof(fallback_devices)/sizeof(char*); const struct poptOption options[] = { { "device", 0, POPT_ARG_STRING, &video_device, 0, N_("Kernel video device"), N_("FILENAME") }, #ifdef HAVE_XV_EXTENSION { "xv-video-port", 0, POPT_ARG_INT, &xv_video_port, 0, N_("XVideo video input port"), NULL }, { "xv-image-port", 0, POPT_ARG_INT, &xv_image_port, 0, N_("XVideo image overlay port"), NULL }, { "xv-port", /* for compatibility with Zapping 0.6 */ 0, POPT_ARG_INT, &xv_video_port, 0, N_("XVideo video input port"), NULL }, { "no-xv-video", 0, POPT_ARG_NONE, &disable_xv_video, 0, N_("Disable XVideo video input support"), NULL }, { "no-xv-image", 0, POPT_ARG_NONE, &disable_xv_image, 0, N_("Disable XVideo image overlay support"), NULL }, { "no-xv", /* for compatibility with Zapping 0.6 */ 'v', POPT_ARG_NONE, &disable_xv, 0, N_("Disable XVideo extension support"), NULL }, #endif /* !HAVE_XV_EXTENSION */ { "no-overlay", 0, POPT_ARG_NONE, &disable_overlay, 0, N_("Disable video overlay"), NULL }, { "remote", 0, POPT_ARG_NONE, &disable_overlay, 0, N_("X display is remote, disable video overlay"), NULL }, { "no-vbi", 'i', POPT_ARG_NONE, &disable_vbi, 0, N_("Disable VBI support"), NULL }, { "no-plugins", 'p', POPT_ARG_NONE, &disable_plugins, 0, N_("Disable plugins"), NULL }, { /* We used to call zapping_setup_fb on startup unless this option was given. Now it is only called if necessary before enabling V4L overlay. So the option is no longer used, but kept for compatibility. */ "no-zsfb", 'z', POPT_ARG_NONE, &dummy, 0, /* TRANSLATORS: --no-zsfb command line option. */ N_("Obsolete"), NULL }, { "esd-out", 0, POPT_ARG_NONE, &esd_output, 0, "Copy recorded sound to sound daemon", NULL }, { "ivtv-audio", 0, POPT_ARG_NONE, &ivtv_audio, 0, "Use ivtv audio device", NULL }, { "bpp", 'b', POPT_ARG_INT, &x_bpp, 0, N_("Color depth of the X display"), N_("BPP") }, { "debug", 'd', POPT_ARG_NONE, &debug_msg, 0, N_("Print debug messages"), NULL }, { "io-debug", 0, POPT_ARG_NONE, &io_debug_msg, 0, 0, /* N_("Log driver accesses"), */ NULL }, { "dword-align", 0, POPT_ARG_NONE, &dword_align, 0, N_("Force dword alignment of the overlay window"), NULL }, { "command", 'c', POPT_ARG_STRING, &command, 0, N_("Execute the given command and exit"), N_("CMD") }, { "yuv-format", 'y', POPT_ARG_STRING, &yuv_format, 0, /* TRANSLATORS: --yuv-format command line option. */ N_("Obsolete"), NULL }, { "tunerless-norm", 'n', POPT_ARG_STRING, &norm, 0, /* TRANSLATORS: --tunerless-norm command line option. */ N_("Obsolete"), NULL }, { "cpu-features", 0, POPT_ARG_STRING, &cpu_feature_str, 0, N_("Override CPU detection"), NULL }, { NULL, 0, 0, NULL, 0, NULL, NULL } /* end the list */ }; #if 0 /* L8ER */ if (strlen(argv[0]) >= strlen("zapzilla") && !(strcmp(&argv[0][strlen(argv[0])-strlen("zapzilla")], "zapzilla"))) #ifdef HAVE_LIBZVBI return zapzilla_main(argc, argv); #else return EXIT_FAILURE; #endif #endif #ifdef ENABLE_NLS bindtextdomain (GETTEXT_PACKAGE, PACKAGE_LOCALE_DIR); bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); textdomain (GETTEXT_PACKAGE); #endif gnome_program_init (PACKAGE, VERSION, LIBGNOMEUI_MODULE, argc, argv, GNOME_PARAM_APP_DATADIR, PACKAGE_DATA_DIR, GNOME_PARAM_POPT_TABLE, options, GNOME_CLIENT_PARAM_SM_CONNECT, TRUE, NULL); #ifndef HAVE_PROGRAM_INVOCATION_NAME program_invocation_name = argv[0]; program_invocation_short_name = g_get_prgname(); #endif session = gnome_master_client (); g_assert (NULL != session); gconf_client = gconf_client_get_default (); g_assert (NULL != gconf_client); gconf_client_add_dir (gconf_client, "/apps/zapping", GCONF_CLIENT_PRELOAD_NONE, NULL); if (x11_get_bpp() < 15) { RunBox("The current depth (%i bpp) isn't supported by Zapping", GTK_MESSAGE_ERROR, x11_get_bpp()); return 0; } printv("%s\n%s %s, build date: %s\n", "$Id: main.c,v 1.213 2006/06/09 01:51:00 mschimek Exp $", "Zapping", VERSION, __DATE__); cpu_detection (); if (cpu_feature_str) { cpu_feature_set actual_features; actual_features = cpu_features; cpu_features &= cpu_feature_set_from_string (cpu_feature_str); printv ("CPU features 0x%x (actual 0x%x)\n", cpu_features, actual_features); } else { printv ("CPU features 0x%x\n", cpu_features); } D(); glade_gnome_init(); D(); gnome_window_icon_set_default_from_file (PACKAGE_PIXMAPS_DIR "/gnome-television.png"); D(); init_zapping_stock (); D(); if (!g_module_supported ()) { RunBox(_("Sorry, but there is no module support in GLib"), GTK_MESSAGE_ERROR); return 0; } D(); if (0 && debug_msg) { fprintf (stderr, "X -version\n"); system ("X -version 1>&2"); fprintf (stderr, "metacity --version\n"); system ("metacity --version 1>&2"); } have_wm_hints = wm_hints_detect (); switch (x_bpp) { case -1: case 24: case 32: break; default: if (debug_msg) fprintf (stderr, "Invalid bpp option %d (ignored). Expected " "24 or 32.\n", x_bpp); x_bpp = -1; break; } #if 0 /* Gtk 2.2 */ display_name = gdk_display_get_name (gdk_display_get_default ()); #else display_name = x11_display_name (); #endif screens = tv_screen_list_new (display_name, x_bpp); /* We should have at least on screen, even without Xinerama and DGA. The information is needed by fullscreen and overlay code. */ if (!screens) { /* XXX localize */ RunBox(("Cannot find X11 screens"), GTK_MESSAGE_ERROR); return 0; } /* We need the display pixfmt to optimize the capture format. This info should be avaialable even without Xinerama and DGA. */ if (TV_PIXFMT_NONE == screens->target.format.pixel_format->pixfmt) { /* XXX could use XVideo without. */ /* XXX localize */ RunBox(("Cannot determine display pixel format"), GTK_MESSAGE_ERROR); return 0; } D(); if (debug_msg) { const tv_screen *xs; for (xs = screens; xs; xs = xs->next) { fprintf (stderr, "Screen %d:\n" " position %u, %u - %u, %u\n" " frame buffer address 0x%lx\n" " frame buffer size %ux%u pixels, 0x%lx bytes\n" " bytes per line %lu bytes\n" " pixfmt %s\n", xs->screen_number, xs->x, xs->y, xs->x + xs->width, xs->y + xs->height, xs->target.base, xs->target.format.width, xs->target.format.height, xs->target.format.size, xs->target.format.bytes_per_line[0], xs->target.format.pixel_format->name); } } /* XXX we need a list for preferences but actually each x11 screen may have its own set of vidmodes?? */ vidmodes = x11_vidmode_list_new (NULL, -1); if (debug_msg) { x11_vidmode_info *v; unsigned int i = 0; fprintf (stderr, "VidModes:"); for (v = vidmodes; v; v = v->next) { fprintf (stderr, "%s%ux%u@%u", (0 == i) ? "\n " : " ", v->width, v->height, (unsigned int)(v->vfreq + 0.5)); i = (i + 1) % 5; } fputc ('\n', stderr); } /* Determine size and pixfmt of the Display. */ if (debug_msg) { /* If we have the XVideo extension, list adaptors, ports and image formats. */ x11_xvideo_dump (); } x11_screensaver_init (); info = tveng_device_info_new(GDK_DISPLAY (), x_bpp); if (!info) { g_error(_("Cannot get device info struct")); return -1; } tveng_set_debug_level(debug_msg, info); tveng_set_xv_support(disable_xv || disable_xv_video, info); tveng_set_dword_align(dword_align, info); D(); if (!startup_zapping(!disable_plugins, info)) { RunBox(_("Zapping couldn't be started"), GTK_MESSAGE_ERROR); tveng_device_info_destroy(info); return 0; } D(); if (yuv_format) { static const unsigned int TVENG_PIX_YVU420 = 6; /* obsolete */ static const unsigned int TVENG_PIX_YUYV = 8; if (0 == strcasecmp (yuv_format, "YUYV")) zcs_int ((int) TVENG_PIX_YUYV, "yuv_format"); else if (0 == strcasecmp (yuv_format, "YVU420")) zcs_int ((int) TVENG_PIX_YVU420, "yuv_format"); else g_warning ("Unknown pixformat %s, must be YUYV or YVU420.\n" "The current format is %s.", yuv_format, (zcg_int (NULL, "yuv_format") == (int) TVENG_PIX_YUYV) ? "YUYV" : "YVU420"); } D(); if (video_device) zcs_char(video_device, "video_device"); if (!debug_msg) #if 1 tveng_set_zapping_setup_fb_verbosity(0, info); #else tveng_set_zapping_setup_fb_verbosity(zcg_int(NULL, "zapping_setup_fb_verbosity"), info); #endif else tveng_set_zapping_setup_fb_verbosity(3, info); tv_set_filename (info, zcg_char(NULL, "video_device")); D(); if (tveng_attach_device(zcg_char(NULL, "video_device"), /* window */ None, TVENG_ATTACH_XV, info) == -1) { GtkWidget * question_box; gint i; question_box = gtk_message_dialog_new(NULL, GTK_DIALOG_DESTROY_WITH_PARENT | GTK_DIALOG_MODAL, GTK_MESSAGE_QUESTION, GTK_BUTTONS_YES_NO, _("Couldn't open %s, try other devices?"), zcg_char(NULL, "video_device")); #if 0 /* Destroy the dialog when the user responds to it */ /* (e.g. clicks a button) */ g_signal_connect_swapped (G_OBJECT (question_box), "response", G_CALLBACK (gtk_widget_destroy), question_box); #endif gtk_dialog_set_default_response (GTK_DIALOG (question_box), GTK_RESPONSE_YES); if (gtk_dialog_run(GTK_DIALOG(question_box)) == GTK_RESPONSE_YES) { /* retry */ for (i = 0; i<num_fallbacks; i++) { printf("trying device: %s\n", fallback_devices[i]); tv_set_filename (info, fallback_devices[i]); if (tveng_attach_device(fallback_devices[i], /* window */ None, TVENG_ATTACH_XV, info) != -1) { zcs_char(fallback_devices[i], "video_device"); ShowBox(_("%s suceeded, setting it as the new default"), GTK_MESSAGE_INFO, fallback_devices[i]); goto device_ok; } tv_set_filename (info, NULL); } } RunBox(_("Sorry, but \"%s\" could not be opened:\n%s"), GTK_MESSAGE_ERROR, zcg_char(NULL, "video_device"), tv_get_errstr (info)); return -1; } device_ok: if (tv_get_controller (info) == TVENG_CONTROLLER_XV) { xv_present = TRUE; } D(); /* mute the device while we are starting up */ /* FIXME */ if (-1 == tv_mute_set (info, TRUE)) mutable = FALSE; D(); z_tooltips_active (zconf_get_boolean (NULL, "/zapping/options/main/show_tooltips")); D(); zconf_create_boolean (TRUE, NULL, "/zapping/options/main/disable_screensaver"); x11_screensaver_control (zconf_get_boolean (NULL, "/zapping/options/main/disable_screensaver")); D(); startup_zvbi(); D(); startup_subtitle(); D(); zapping = ZAPPING (zapping_new ()); { GnomeClientFlags flags; flags = gnome_client_get_flags (session); /* When started by the session manager we automatically get our previous size and position. */ if (!(flags & GNOME_CLIENT_RESTARTED)) { gint width; gint height; zconf_get_int (&width, "/zapping/internal/callbacks/w"); zconf_get_int (&height, "/zapping/internal/callbacks/h"); gtk_window_set_default_size (GTK_WINDOW (zapping), width, height); D(); } } gtk_widget_show(GTK_WIDGET (zapping)); zapping->info = info; D(); g_signal_connect(G_OBJECT(zapping), "key-press-event", G_CALLBACK(on_zapping_key_press), NULL); /* ensure that the main window is realized */ gtk_widget_realize(GTK_WIDGET (zapping)); while (!GTK_WIDGET (zapping->video)->window) z_update_gui(); D(); if (0 && !mutable) { GtkAction *action; /* FIXME the device we open initially might not be mutable, but could be later when we switch btw capture and overlay. */ /* FIXME this can change at runtime, the mute button should update just like the controls box. */ /* has no mute function */ action = gtk_action_group_get_action (zapping->generic_action_group, "Mute"); z_action_set_visible (action, FALSE); D(); } D(); startup_capture(); D(); /* Add the plugins to the GUI */ p = g_list_first(plugin_list); while (p) { plugin_add_gui(&zapping->app, (struct plugin_info*)p->data); p = p->next; } /* Disable preview if needed */ if (disable_overlay) { GtkAction *action; printv("Preview disabled, removing GUI items\n"); action = gtk_action_group_get_action (zapping->generic_action_group, "Overlay"); z_action_set_sensitive (action, FALSE); } D(); startup_teletext(); D(); startup_vdr(); D(); startup_osd(); D(); startup_audio(); D(); startup_keyboard(); D(); startup_csconvert(); D(); startup_properties_handler (); D(); startup_plugin_properties (); D(); startup_channel_editor (); D(); osd_set_window(GTK_WIDGET (zapping->video)); D(); xawtv_ipc_init (GTK_WIDGET (zapping)); D(); mixer_setup (); D(); restore_controls (); D(); if (!command) { D(); printv("switching to mode %d (%d)\n", zcg_int (NULL, "capture_mode"), OLD_TVENG_CAPTURE_READ); D(); restore_last_capture_mode (); D(); printv("session manager\n"); g_signal_connect (session, "save-yourself", G_CALLBACK (session_save), argv[0]); g_signal_connect (session, "die", G_CALLBACK (session_die), NULL); printv("going into main loop...\n"); gtk_main(); } else { printv("running command \"%s\"\n", command); python_command (NULL, command); } /* Closes all fd's, writes the config to HD, and that kind of things shutdown_zapping(); moved to zapping.c */ /* Python. */ shutdown_remote(); return 0; } int main(int argc, char * argv[]) { return MAIN (PACKAGE_VERSION_ID) (argc, argv); } void shutdown_zapping(void) { guint i = 0; gchar * buffer = NULL; tveng_tuned_channel * channel; printv("Shutting down the beast:\n"); if (was_fullscreen) zcs_int(OLD_TVENG_CAPTURE_PREVIEW, "capture_mode"); /* Unloads all plugins, this tells them to save their config too */ printv("plugins"); plugin_unload_plugins(plugin_list); plugin_list = NULL; /* Shut down vbi */ printv(" subtitles\n"); shutdown_subtitle(); printv(" vbi\n"); shutdown_zvbi(); { tveng_tc_control *controls; guint n_controls; /* Global controls (preliminary) */ printv(" controls"); store_control_values (zapping->info, &controls, &n_controls); zconf_delete (ZCONF_DOMAIN "num_controls"); zconf_delete ("/zapping/options/main/controls"); zconf_set_uint (n_controls, ZCONF_DOMAIN "num_controls"); zconf_set_description ("Saved controls", ZCONF_DOMAIN "num_controls"); zconf_create_controls (controls, n_controls, "/zapping/options/main"); } /* Write the currently tuned channels */ printv(" channels"); zconf_delete (ZCONF_DOMAIN "tuned_channels"); i = 0; while ((channel = tveng_tuned_channel_nth (global_channel_list, i)) != NULL) { if ((i == (guint) cur_tuned_channel) && !ChannelWindow) /* Having the channel editor open screws this logic up, do not save controls in this case */ { g_free (channel->controls); store_control_values (zapping->info, &channel->controls, &channel->num_controls); } #define SAVE_CONFIG(_type, _name, _cname, _descr) \ buffer = g_strdup_printf (ZCONF_DOMAIN "tuned_channels/%d/" #_cname, i); \ zconf_set_##_type (channel->_name, buffer); \ zconf_set_description (_descr, buffer); \ g_free (buffer); SAVE_CONFIG (string, name, name, "Station name"); buffer = g_strdup_printf (ZCONF_DOMAIN "tuned_channels/%d/freq", i); zconf_set_uint (channel->frequ / 1000, buffer); zconf_set_description ("Tuning frequency", buffer); g_free (buffer); SAVE_CONFIG (z_key, accel, accel, "Accelerator key"); /* historic "real_name", changed to less confusing rf_name */ SAVE_CONFIG (string, rf_name, real_name, "RF channel name"); SAVE_CONFIG (string, rf_table, country, "RF channel table"); SAVE_CONFIG (uint, input, input, "Attached input"); SAVE_CONFIG (uint, standard, standard, "Attached standard"); SAVE_CONFIG (uint, num_controls, num_controls, "Saved controls"); if (channel->num_controls > 0) { buffer = g_strdup_printf (ZCONF_DOMAIN "tuned_channels/%d", i); zconf_create_controls (channel->controls, channel->num_controls, buffer); g_free (buffer); } SAVE_CONFIG (int, caption_pgno, caption_pgno, "Default subtitle page"); #ifdef HAVE_LIBZVBI SAVE_CONFIG (uint, num_ttx_encodings, num_ttx_encodings, "Saved Teletext page encodings"); if (channel->num_ttx_encodings > 0) { buffer = g_strdup_printf (ZCONF_DOMAIN "tuned_channels/%d", i); zconf_create_ttx_encodings (channel->ttx_encodings, channel->num_ttx_encodings, buffer); g_free (buffer); } #endif i++; } zconf_set_sources (zapping->info); tveng_tuned_channel_list_delete (&global_channel_list); /* inputs, standards handling */ printv("\n v4linterface"); shutdown_v4linterface(); /* * Tell the overlay engine to shut down and to do a cleanup if necessary */ printv(" overlay"); /* zilch. */ /* * Shuts down the OSD info */ printv(" osd"); shutdown_osd(); /* * Shuts down the capture engine */ printv(" capture"); shutdown_capture(); /* * Keyboard */ printv(" kbd"); shutdown_keyboard(); /* * VDR */ printv(" vdr"); shutdown_vdr(); /* * The audio config */ printv(" audio"); shutdown_audio(); /* * The video output backends. */ printv(" zimage"); shutdown_zimage(); /* * The colorspace conversions. */ printv(" csconvert"); shutdown_csconvert(); /* * The mixer code. */ printv(" mixer"); shutdown_mixer(zapping->info); /* * The plugin properties dialog. */ printv(" pp"); shutdown_plugin_properties(); /* * The channel editor. */ printv (" ce"); shutdown_channel_editor (); /* * The properties handler. */ printv(" ph"); shutdown_properties_handler(); shutdown_properties(); /* Close */ printv(" video device"); tveng_device_info_destroy(zapping->info); /* Save the config and show an error if something failed */ printv(" config"); if (!zconf_close()) ShowBox(_("ZConf could not be closed properly , your\n" "configuration will be lost.\n" "Possible causes for this are:\n" " - There is not enough free memory\n" " - You do not have permissions to write to $HOME/.zapping\n" " - libxml is non-functional (?)\n" " - or, more probably, you have found a bug in\n" " %s. Please contact the author.\n" ), GTK_MESSAGE_ERROR, "Zapping"); printv(" cmd"); shutdown_cmd (); printv(".\nShutdown complete, goodbye.\n"); } static gboolean startup_zapping(gboolean load_plugins, tveng_device_info *info) { guint i = 0; gchar * buffer = NULL; GList * p; D(); /* Starts the configuration engine */ if (!zconf_init("zapping")) { g_error(_("Sorry, Zapping is unable to create the config tree")); return FALSE; } D(); startup_remote (); startup_cmd (); startup_properties(); D(); zcc_bool(TRUE, "Show tooltips", "show_tooltips"); zcc_bool(TRUE, "Resize by fixed increments", "fixed_increments"); #if 0 zcc_char(tveng_get_country_tune_by_id(0)->name, "The country you are currently in", "current_country"); current_country = tveng_get_country_tune_by_name(zcg_char(NULL, "current_country")); if (!current_country) current_country = tveng_get_country_tune_by_id(0); #else /* last selected frequency table */ zcc_char ("", "The country you are currently in", "current_country"); #endif #if defined(ENABLE_V4L) zcc_char("/dev/video0", "The device file to open on startup", "video_device"); #elif defined(ENABLE_BKTR) zcc_char("/dev/bktr", "The device file to open on startup", "video_device"); #else zcc_char("", "The device file to open on startup", "video_device"); #endif zcc_bool(FALSE, "TRUE if the controls info should be saved with each " "channel", "save_controls"); zcc_int(0, "Verbosity value given to zapping_setup_fb", "zapping_setup_fb_verbosity"); zcc_int(0, "Ratio mode", "ratio"); zcc_int(0, "Change the video mode when going fullscreen", "change_mode"); zcc_int(0, "Current standard", "current_standard"); zcc_int(0, "Current video input", "current_input"); zcc_int(0, "Current audio input", "current_audio_input"); zcc_int(OLD_TVENG_CAPTURE_WINDOW, "Current capture mode", "capture_mode"); zcc_int(OLD_TVENG_CAPTURE_WINDOW, "Previous capture mode", "previous_mode"); zcc_int(8 /* TVENG_PIX_YUYV */, "Pixformat used with XVideo capture", "yuv_format"); zcc_bool(FALSE, "In videotext mode", "videotext_mode"); zcc_bool(FALSE, "Keep main window above other windows", "keep_on_top"); zcc_int(-1, "Icons, text, text below, text beside", "toolbar_style"); D(); /* Loads all the tuned channels */ global_channel_list = NULL; i = 0; while (zconf_get_nth (i, &buffer, ZCONF_DOMAIN "tuned_channels") != NULL) { tveng_tuned_channel *tc; gchar *buffer2; guint len; tc = tveng_tuned_channel_new (/* copy of */ NULL); len = strlen (buffer); while (len > 0 && '/' == buffer[len - 1]) buffer[--len] = 0; /* Get all the items from here */ #define LOAD_CONFIG(_type, _name, _cname) \ buffer2 = g_strconcat (buffer, "/" #_cname, NULL); \ zconf_get_##_type (&tc->_name, buffer2); \ g_free (buffer2); LOAD_CONFIG (string, name, name); LOAD_CONFIG (string, rf_name, real_name); LOAD_CONFIG (uint, frequ, freq); tc->frequ *= 1000 /* Hz */; LOAD_CONFIG (z_key, accel, accel); LOAD_CONFIG (string, rf_table, country); LOAD_CONFIG (uint, input, input); LOAD_CONFIG (uint, standard, standard); LOAD_CONFIG (int, caption_pgno, caption_pgno); /* Error ignored. */ zconf_get_controls (tc, buffer); #ifdef HAVE_LIBZVBI /* Error ignored. */ zconf_get_ttx_encodings (tc, buffer); #endif tveng_tuned_channel_insert (&global_channel_list, tc, /* position */ G_MAXINT); g_free (buffer); i++; } D(); /* Starts all modules */ startup_v4linterface(info); D(); startup_mixer(info); D(); startup_zimage(); D(); /* Loads the plugins */ if (load_plugins) plugin_list = plugin_load_plugins(); /* init them, and remove the ones that couldn't be inited */ restart_loop: D(); p = g_list_first(plugin_list); while (p) { D(); plugin_load_config((struct plugin_info*)p->data); D(); if (!plugin_init(info, (struct plugin_info*)p->data)) { D(); plugin_unload((struct plugin_info*)p->data); plugin_list = g_list_remove_link(plugin_list, p); g_list_free_1(p); goto restart_loop; } p = p->next; } D(); #ifdef HAVE_LIBZVBI { struct plugin_info *info; if ((info = plugin_by_name ("teletext"))) { _teletext_view_new = plugin_symbol (info, "view_new"); _teletext_view_from_widget = plugin_symbol (info, "view_from_widget"); _teletext_toolbar_new = plugin_symbol (info, "toolbar_new"); } if ((info = plugin_by_name ("subtitle"))) { _subtitle_view_new = plugin_symbol (info, "view_new"); } } #endif return TRUE; } ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������zapping-0.10cvs6/src/keysyms.h���������������������������������������������������������������������� 644 � 764 � 144 � 50304 10120232214 11456� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Created with a sed script from gdkkeysyms.h, sorted */ static const char *keysyms[] = { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "F1", "F2", "F3", "F4", "F5", "F6", "F7", "F8", "F9", "F10", "F11", "F12", "F13", "F14", "F15", "F16", "F17", "F18", "F19", "F20", "F21", "F22", "F23", "F24", "F25", "F26", "F27", "F28", "F29", "F30", "F31", "F32", "F33", "F34", "F35", "BackSpace", "Tab", "Return", "Escape", "Delete", "Insert", "space", "Home", "Left", "Up", "Right", "Down", "Page_Up", "Page_Down", "End", "KP_Space", "KP_Tab", "KP_Enter", "KP_F1", "KP_F2", "KP_F3", "KP_F4", "KP_Home", "KP_Left", "KP_Up", "KP_Right", "KP_Down", "KP_Prior", "KP_Page_Up", "KP_Next", "KP_Page_Down", "KP_End", "KP_Begin", "KP_Insert", "KP_Delete", "KP_Equal", "KP_Multiply", "KP_Add", "KP_Separator", "KP_Subtract", "KP_Decimal", "KP_Divide", "KP_0", "KP_1", "KP_2", "KP_3", "KP_4", "KP_5", "KP_6", "KP_7", "KP_8", "KP_9", "VoidSymbol", "Linefeed", "Clear", "Pause", "Scroll_Lock", "Sys_Req", "Multi_key", "Kanji", "Muhenkan", "Henkan_Mode", "Henkan", "Romaji", "Hiragana", "Katakana", "Hiragana_Katakana", "Zenkaku", "Hankaku", "Zenkaku_Hankaku", "Touroku", "Massyo", "Kana_Lock", "Kana_Shift", "Eisu_Shift", "Eisu_toggle", "Prior", "Next", "Begin", "Select", "Print", "Execute", "Undo", "Redo", "Menu", "Find", "Cancel", "Help", "Break", "Mode_switch", "script_switch", "Num_Lock", "L1", "L2", "L3", "L4", "L5", "L6", "L7", "L8", "L9", "L10", "R1", "R2", "R3", "R4", "R5", "R6", "R7", "R8", "R9", "R10", "R11", "R12", "R13", "R14", "R15", "Shift_L", "Shift_R", "Control_L", "Control_R", "Caps_Lock", "Shift_Lock", "Meta_L", "Meta_R", "Alt_L", "Alt_R", "Super_L", "Super_R", "Hyper_L", "Hyper_R", "ISO_Lock", "ISO_Level2_Latch", "ISO_Level3_Shift", "ISO_Level3_Latch", "ISO_Level3_Lock", "ISO_Group_Shift", "ISO_Group_Latch", "ISO_Group_Lock", "ISO_Next_Group", "ISO_Next_Group_Lock", "ISO_Prev_Group", "ISO_Prev_Group_Lock", "ISO_First_Group", "ISO_First_Group_Lock", "ISO_Last_Group", "ISO_Last_Group_Lock", "ISO_Left_Tab", "ISO_Move_Line_Up", "ISO_Move_Line_Down", "ISO_Partial_Line_Up", "ISO_Partial_Line_Down", "ISO_Partial_Space_Left", "ISO_Partial_Space_Right", "ISO_Set_Margin_Left", "ISO_Set_Margin_Right", "ISO_Release_Margin_Left", "ISO_Release_Margin_Right", "ISO_Release_Both_Margins", "ISO_Fast_Cursor_Left", "ISO_Fast_Cursor_Right", "ISO_Fast_Cursor_Up", "ISO_Fast_Cursor_Down", "ISO_Continuous_Underline", "ISO_Discontinuous_Underline", "ISO_Emphasize", "ISO_Center_Object", "ISO_Enter", "dead_grave", "dead_acute", "dead_circumflex", "dead_tilde", "dead_macron", "dead_breve", "dead_abovedot", "dead_diaeresis", "dead_abovering", "dead_doubleacute", "dead_caron", "dead_cedilla", "dead_ogonek", "dead_iota", "dead_voiced_sound", "dead_semivoiced_sound", "First_Virtual_Screen", "Prev_Virtual_Screen", "Next_Virtual_Screen", "Last_Virtual_Screen", "Terminate_Server", "Pointer_Left", "Pointer_Right", "Pointer_Up", "Pointer_Down", "Pointer_UpLeft", "Pointer_UpRight", "Pointer_DownLeft", "Pointer_DownRight", "Pointer_Button_Dflt", "Pointer_Button1", "Pointer_Button2", "Pointer_Button3", "Pointer_Button4", "Pointer_Button5", "Pointer_DblClick_Dflt", "Pointer_DblClick1", "Pointer_DblClick2", "Pointer_DblClick3", "Pointer_DblClick4", "Pointer_DblClick5", "Pointer_Drag_Dflt", "Pointer_Drag1", "Pointer_Drag2", "Pointer_Drag3", "Pointer_Drag4", "Pointer_EnableKeys", "Pointer_Accelerate", "Pointer_DfltBtnNext", "Pointer_DfltBtnPrev", "3270_Duplicate", "3270_FieldMark", "3270_Right2", "3270_Left2", "3270_BackTab", "3270_EraseEOF", "3270_EraseInput", "3270_Reset", "3270_Quit", "3270_PA1", "3270_PA2", "3270_PA3", "3270_Test", "3270_Attn", "3270_CursorBlink", "3270_AltCursor", "3270_KeyClick", "3270_Jump", "3270_Ident", "3270_Rule", "3270_Copy", "3270_Play", "3270_Setup", "3270_Record", "3270_ChangeScreen", "3270_DeleteWord", "3270_ExSelect", "3270_CursorSelect", "3270_PrintScreen", "3270_Enter", "exclam", "quotedbl", "numbersign", "dollar", "percent", "ampersand", "apostrophe", "quoteright", "parenleft", "parenright", "asterisk", "plus", "comma", "minus", "period", "slash", "colon", "semicolon", "less", "equal", "greater", "question", "at", "bracketleft", "backslash", "bracketright", "asciicircum", "underscore", "grave", "quoteleft", "braceleft", "bar", "braceright", "asciitilde", "nobreakspace", "exclamdown", "cent", "sterling", "currency", "yen", "brokenbar", "section", "diaeresis", "copyright", "ordfeminine", "guillemotleft", "notsign", "hyphen", "registered", "macron", "degree", "plusminus", "twosuperior", "threesuperior", "acute", "mu", "paragraph", "periodcentered", "cedilla", "onesuperior", "masculine", "guillemotright", "onequarter", "onehalf", "threequarters", "questiondown", "Agrave", "Aacute", "Acircumflex", "Atilde", "Adiaeresis", "Aring", "AE", "Ccedilla", "Egrave", "Eacute", "Ecircumflex", "Ediaeresis", "Igrave", "Iacute", "Icircumflex", "Idiaeresis", "ETH", "Eth", "Ntilde", "Ograve", "Oacute", "Ocircumflex", "Otilde", "Odiaeresis", "multiply", "Ooblique", "Ugrave", "Uacute", "Ucircumflex", "Udiaeresis", "Yacute", "THORN", "Thorn", "ssharp", "agrave", "aacute", "acircumflex", "atilde", "adiaeresis", "aring", "ae", "ccedilla", "egrave", "eacute", "ecircumflex", "ediaeresis", "igrave", "iacute", "icircumflex", "idiaeresis", "eth", "ntilde", "ograve", "oacute", "ocircumflex", "otilde", "odiaeresis", "division", "oslash", "ugrave", "uacute", "ucircumflex", "udiaeresis", "yacute", "thorn", "ydiaeresis", "Aogonek", "breve", "Lstroke", "Lcaron", "Sacute", "Scaron", "Scedilla", "Tcaron", "Zacute", "Zcaron", "Zabovedot", "aogonek", "ogonek", "lstroke", "lcaron", "sacute", "caron", "scaron", "scedilla", "tcaron", "zacute", "doubleacute", "zcaron", "zabovedot", "Racute", "Abreve", "Lacute", "Cacute", "Ccaron", "Eogonek", "Ecaron", "Dcaron", "Dstroke", "Nacute", "Ncaron", "Odoubleacute", "Rcaron", "Uring", "Udoubleacute", "Tcedilla", "racute", "abreve", "lacute", "cacute", "ccaron", "eogonek", "ecaron", "dcaron", "dstroke", "nacute", "ncaron", "odoubleacute", "udoubleacute", "rcaron", "uring", "tcedilla", "abovedot", "Hstroke", "Hcircumflex", "Iabovedot", "Gbreve", "Jcircumflex", "hstroke", "hcircumflex", "idotless", "gbreve", "jcircumflex", "Cabovedot", "Ccircumflex", "Gabovedot", "Gcircumflex", "Ubreve", "Scircumflex", "cabovedot", "ccircumflex", "gabovedot", "gcircumflex", "ubreve", "scircumflex", "kra", "kappa", "Rcedilla", "Itilde", "Lcedilla", "Emacron", "Gcedilla", "Tslash", "rcedilla", "itilde", "lcedilla", "emacron", "gcedilla", "tslash", "ENG", "eng", "Amacron", "Iogonek", "Eabovedot", "Imacron", "Ncedilla", "Omacron", "Kcedilla", "Uogonek", "Utilde", "Umacron", "amacron", "iogonek", "eabovedot", "imacron", "ncedilla", "omacron", "kcedilla", "uogonek", "utilde", "umacron", "overline", "kana_fullstop", "kana_openingbracket", "kana_closingbracket", "kana_comma", "kana_conjunctive", "kana_middledot", "kana_WO", "kana_a", "kana_i", "kana_u", "kana_e", "kana_o", "kana_ya", "kana_yu", "kana_yo", "kana_tsu", "kana_tu", "prolongedsound", "kana_A", "kana_I", "kana_U", "kana_E", "kana_O", "kana_KA", "kana_KI", "kana_KU", "kana_KE", "kana_KO", "kana_SA", "kana_SHI", "kana_SU", "kana_SE", "kana_SO", "kana_TA", "kana_CHI", "kana_TI", "kana_TSU", "kana_TU", "kana_TE", "kana_TO", "kana_NA", "kana_NI", "kana_NU", "kana_NE", "kana_NO", "kana_HA", "kana_HI", "kana_FU", "kana_HU", "kana_HE", "kana_HO", "kana_MA", "kana_MI", "kana_MU", "kana_ME", "kana_MO", "kana_YA", "kana_YU", "kana_YO", "kana_RA", "kana_RI", "kana_RU", "kana_RE", "kana_RO", "kana_WA", "kana_N", "voicedsound", "semivoicedsound", "kana_switch", "Arabic_comma", "Arabic_semicolon", "Arabic_question_mark", "Arabic_hamza", "Arabic_maddaonalef", "Arabic_hamzaonalef", "Arabic_hamzaonwaw", "Arabic_hamzaunderalef", "Arabic_hamzaonyeh", "Arabic_alef", "Arabic_beh", "Arabic_tehmarbuta", "Arabic_teh", "Arabic_theh", "Arabic_jeem", "Arabic_hah", "Arabic_khah", "Arabic_dal", "Arabic_thal", "Arabic_ra", "Arabic_zain", "Arabic_seen", "Arabic_sheen", "Arabic_sad", "Arabic_dad", "Arabic_tah", "Arabic_zah", "Arabic_ain", "Arabic_ghain", "Arabic_tatweel", "Arabic_feh", "Arabic_qaf", "Arabic_kaf", "Arabic_lam", "Arabic_meem", "Arabic_noon", "Arabic_ha", "Arabic_heh", "Arabic_waw", "Arabic_alefmaksura", "Arabic_yeh", "Arabic_fathatan", "Arabic_dammatan", "Arabic_kasratan", "Arabic_fatha", "Arabic_damma", "Arabic_kasra", "Arabic_shadda", "Arabic_sukun", "Arabic_switch", "Serbian_dje", "Macedonia_gje", "Cyrillic_io", "Ukrainian_ie", "Ukranian_je", "Macedonia_dse", "Ukrainian_i", "Ukranian_i", "Ukrainian_yi", "Ukranian_yi", "Cyrillic_je", "Serbian_je", "Cyrillic_lje", "Serbian_lje", "Cyrillic_nje", "Serbian_nje", "Serbian_tshe", "Macedonia_kje", "Byelorussian_shortu", "Cyrillic_dzhe", "Serbian_dze", "numerosign", "Serbian_DJE", "Macedonia_GJE", "Cyrillic_IO", "Ukrainian_IE", "Ukranian_JE", "Macedonia_DSE", "Ukrainian_I", "Ukranian_I", "Ukrainian_YI", "Ukranian_YI", "Cyrillic_JE", "Serbian_JE", "Cyrillic_LJE", "Serbian_LJE", "Cyrillic_NJE", "Serbian_NJE", "Serbian_TSHE", "Macedonia_KJE", "Byelorussian_SHORTU", "Cyrillic_DZHE", "Serbian_DZE", "Cyrillic_yu", "Cyrillic_a", "Cyrillic_be", "Cyrillic_tse", "Cyrillic_de", "Cyrillic_ie", "Cyrillic_ef", "Cyrillic_ghe", "Cyrillic_ha", "Cyrillic_i", "Cyrillic_shorti", "Cyrillic_ka", "Cyrillic_el", "Cyrillic_em", "Cyrillic_en", "Cyrillic_o", "Cyrillic_pe", "Cyrillic_ya", "Cyrillic_er", "Cyrillic_es", "Cyrillic_te", "Cyrillic_u", "Cyrillic_zhe", "Cyrillic_ve", "Cyrillic_softsign", "Cyrillic_yeru", "Cyrillic_ze", "Cyrillic_sha", "Cyrillic_e", "Cyrillic_shcha", "Cyrillic_che", "Cyrillic_hardsign", "Cyrillic_YU", "Cyrillic_A", "Cyrillic_BE", "Cyrillic_TSE", "Cyrillic_DE", "Cyrillic_IE", "Cyrillic_EF", "Cyrillic_GHE", "Cyrillic_HA", "Cyrillic_I", "Cyrillic_SHORTI", "Cyrillic_KA", "Cyrillic_EL", "Cyrillic_EM", "Cyrillic_EN", "Cyrillic_O", "Cyrillic_PE", "Cyrillic_YA", "Cyrillic_ER", "Cyrillic_ES", "Cyrillic_TE", "Cyrillic_U", "Cyrillic_ZHE", "Cyrillic_VE", "Cyrillic_SOFTSIGN", "Cyrillic_YERU", "Cyrillic_ZE", "Cyrillic_SHA", "Cyrillic_E", "Cyrillic_SHCHA", "Cyrillic_CHE", "Cyrillic_HARDSIGN", "Greek_ALPHAaccent", "Greek_EPSILONaccent", "Greek_ETAaccent", "Greek_IOTAaccent", "Greek_IOTAdiaeresis", "Greek_OMICRONaccent", "Greek_UPSILONaccent", "Greek_UPSILONdieresis", "Greek_OMEGAaccent", "Greek_accentdieresis", "Greek_horizbar", "Greek_alphaaccent", "Greek_epsilonaccent", "Greek_etaaccent", "Greek_iotaaccent", "Greek_iotadieresis", "Greek_iotaaccentdieresis", "Greek_omicronaccent", "Greek_upsilonaccent", "Greek_upsilondieresis", "Greek_upsilonaccentdieresis", "Greek_omegaaccent", "Greek_ALPHA", "Greek_BETA", "Greek_GAMMA", "Greek_DELTA", "Greek_EPSILON", "Greek_ZETA", "Greek_ETA", "Greek_THETA", "Greek_IOTA", "Greek_KAPPA", "Greek_LAMDA", "Greek_LAMBDA", "Greek_MU", "Greek_NU", "Greek_XI", "Greek_OMICRON", "Greek_PI", "Greek_RHO", "Greek_SIGMA", "Greek_TAU", "Greek_UPSILON", "Greek_PHI", "Greek_CHI", "Greek_PSI", "Greek_OMEGA", "Greek_alpha", "Greek_beta", "Greek_gamma", "Greek_delta", "Greek_epsilon", "Greek_zeta", "Greek_eta", "Greek_theta", "Greek_iota", "Greek_kappa", "Greek_lamda", "Greek_lambda", "Greek_mu", "Greek_nu", "Greek_xi", "Greek_omicron", "Greek_pi", "Greek_rho", "Greek_sigma", "Greek_finalsmallsigma", "Greek_tau", "Greek_upsilon", "Greek_phi", "Greek_chi", "Greek_psi", "Greek_omega", "Greek_switch", "leftradical", "topleftradical", "horizconnector", "topintegral", "botintegral", "vertconnector", "topleftsqbracket", "botleftsqbracket", "toprightsqbracket", "botrightsqbracket", "topleftparens", "botleftparens", "toprightparens", "botrightparens", "leftmiddlecurlybrace", "rightmiddlecurlybrace", "topleftsummation", "botleftsummation", "topvertsummationconnector", "botvertsummationconnector", "toprightsummation", "botrightsummation", "rightmiddlesummation", "lessthanequal", "notequal", "greaterthanequal", "integral", "therefore", "variation", "infinity", "nabla", "approximate", "similarequal", "ifonlyif", "implies", "identical", "radical", "includedin", "includes", "intersection", "union", "logicaland", "logicalor", "partialderivative", "function", "leftarrow", "uparrow", "rightarrow", "downarrow", "blank", "soliddiamond", "checkerboard", "ht", "ff", "cr", "lf", "nl", "vt", "lowrightcorner", "uprightcorner", "upleftcorner", "lowleftcorner", "crossinglines", "horizlinescan1", "horizlinescan3", "horizlinescan5", "horizlinescan7", "horizlinescan9", "leftt", "rightt", "bott", "topt", "vertbar", "emspace", "enspace", "em3space", "em4space", "digitspace", "punctspace", "thinspace", "hairspace", "emdash", "endash", "signifblank", "ellipsis", "doubbaselinedot", "onethird", "twothirds", "onefifth", "twofifths", "threefifths", "fourfifths", "onesixth", "fivesixths", "careof", "figdash", "leftanglebracket", "decimalpoint", "rightanglebracket", "marker", "oneeighth", "threeeighths", "fiveeighths", "seveneighths", "trademark", "signaturemark", "trademarkincircle", "leftopentriangle", "rightopentriangle", "emopencircle", "emopenrectangle", "leftsinglequotemark", "rightsinglequotemark", "leftdoublequotemark", "rightdoublequotemark", "prescription", "minutes", "seconds", "latincross", "hexagram", "filledrectbullet", "filledlefttribullet", "filledrighttribullet", "emfilledcircle", "emfilledrect", "enopencircbullet", "enopensquarebullet", "openrectbullet", "opentribulletup", "opentribulletdown", "openstar", "enfilledcircbullet", "enfilledsqbullet", "filledtribulletup", "filledtribulletdown", "leftpointer", "rightpointer", "club", "diamond", "heart", "maltesecross", "dagger", "doubledagger", "checkmark", "ballotcross", "musicalsharp", "musicalflat", "malesymbol", "femalesymbol", "telephone", "telephonerecorder", "phonographcopyright", "caret", "singlelowquotemark", "doublelowquotemark", "cursor", "leftcaret", "rightcaret", "downcaret", "upcaret", "overbar", "downtack", "upshoe", "downstile", "underbar", "jot", "quad", "uptack", "circle", "upstile", "downshoe", "rightshoe", "leftshoe", "lefttack", "righttack", "hebrew_doublelowline", "hebrew_aleph", "hebrew_bet", "hebrew_beth", "hebrew_gimel", "hebrew_gimmel", "hebrew_dalet", "hebrew_daleth", "hebrew_he", "hebrew_waw", "hebrew_zain", "hebrew_zayin", "hebrew_chet", "hebrew_het", "hebrew_tet", "hebrew_teth", "hebrew_yod", "hebrew_finalkaph", "hebrew_kaph", "hebrew_lamed", "hebrew_finalmem", "hebrew_mem", "hebrew_finalnun", "hebrew_nun", "hebrew_samech", "hebrew_samekh", "hebrew_ayin", "hebrew_finalpe", "hebrew_pe", "hebrew_finalzade", "hebrew_finalzadi", "hebrew_zade", "hebrew_zadi", "hebrew_qoph", "hebrew_kuf", "hebrew_resh", "hebrew_shin", "hebrew_taw", "hebrew_taf", "Hebrew_switch", "Thai_kokai", "Thai_khokhai", "Thai_khokhuat", "Thai_khokhwai", "Thai_khokhon", "Thai_khorakhang", "Thai_ngongu", "Thai_chochan", "Thai_choching", "Thai_chochang", "Thai_soso", "Thai_chochoe", "Thai_yoying", "Thai_dochada", "Thai_topatak", "Thai_thothan", "Thai_thonangmontho", "Thai_thophuthao", "Thai_nonen", "Thai_dodek", "Thai_totao", "Thai_thothung", "Thai_thothahan", "Thai_thothong", "Thai_nonu", "Thai_bobaimai", "Thai_popla", "Thai_phophung", "Thai_fofa", "Thai_phophan", "Thai_fofan", "Thai_phosamphao", "Thai_moma", "Thai_yoyak", "Thai_rorua", "Thai_ru", "Thai_loling", "Thai_lu", "Thai_wowaen", "Thai_sosala", "Thai_sorusi", "Thai_sosua", "Thai_hohip", "Thai_lochula", "Thai_oang", "Thai_honokhuk", "Thai_paiyannoi", "Thai_saraa", "Thai_maihanakat", "Thai_saraaa", "Thai_saraam", "Thai_sarai", "Thai_saraii", "Thai_saraue", "Thai_sarauee", "Thai_sarau", "Thai_sarauu", "Thai_phinthu", "Thai_maihanakat_maitho", "Thai_baht", "Thai_sarae", "Thai_saraae", "Thai_sarao", "Thai_saraaimaimuan", "Thai_saraaimaimalai", "Thai_lakkhangyao", "Thai_maiyamok", "Thai_maitaikhu", "Thai_maiek", "Thai_maitho", "Thai_maitri", "Thai_maichattawa", "Thai_thanthakhat", "Thai_nikhahit", "Thai_leksun", "Thai_leknung", "Thai_leksong", "Thai_leksam", "Thai_leksi", "Thai_lekha", "Thai_lekhok", "Thai_lekchet", "Thai_lekpaet", "Thai_lekkao", "Hangul", "Hangul_Start", "Hangul_End", "Hangul_Hanja", "Hangul_Jamo", "Hangul_Romaja", "Hangul_Codeinput", "Hangul_Jeonja", "Hangul_Banja", "Hangul_PreHanja", "Hangul_PostHanja", "Hangul_SingleCandidate", "Hangul_MultipleCandidate", "Hangul_PreviousCandidate", "Hangul_Special", "Hangul_switch", "Hangul_Kiyeog", "Hangul_SsangKiyeog", "Hangul_KiyeogSios", "Hangul_Nieun", "Hangul_NieunJieuj", "Hangul_NieunHieuh", "Hangul_Dikeud", "Hangul_SsangDikeud", "Hangul_Rieul", "Hangul_RieulKiyeog", "Hangul_RieulMieum", "Hangul_RieulPieub", "Hangul_RieulSios", "Hangul_RieulTieut", "Hangul_RieulPhieuf", "Hangul_RieulHieuh", "Hangul_Mieum", "Hangul_Pieub", "Hangul_SsangPieub", "Hangul_PieubSios", "Hangul_Sios", "Hangul_SsangSios", "Hangul_Ieung", "Hangul_Jieuj", "Hangul_SsangJieuj", "Hangul_Cieuc", "Hangul_Khieuq", "Hangul_Tieut", "Hangul_Phieuf", "Hangul_Hieuh", "Hangul_A", "Hangul_AE", "Hangul_YA", "Hangul_YAE", "Hangul_EO", "Hangul_E", "Hangul_YEO", "Hangul_YE", "Hangul_O", "Hangul_WA", "Hangul_WAE", "Hangul_OE", "Hangul_YO", "Hangul_U", "Hangul_WEO", "Hangul_WE", "Hangul_WI", "Hangul_YU", "Hangul_EU", "Hangul_YI", "Hangul_I", "Hangul_J_Kiyeog", "Hangul_J_SsangKiyeog", "Hangul_J_KiyeogSios", "Hangul_J_Nieun", "Hangul_J_NieunJieuj", "Hangul_J_NieunHieuh", "Hangul_J_Dikeud", "Hangul_J_Rieul", "Hangul_J_RieulKiyeog", "Hangul_J_RieulMieum", "Hangul_J_RieulPieub", "Hangul_J_RieulSios", "Hangul_J_RieulTieut", "Hangul_J_RieulPhieuf", "Hangul_J_RieulHieuh", "Hangul_J_Mieum", "Hangul_J_Pieub", "Hangul_J_PieubSios", "Hangul_J_Sios", "Hangul_J_SsangSios", "Hangul_J_Ieung", "Hangul_J_Jieuj", "Hangul_J_Cieuc", "Hangul_J_Khieuq", "Hangul_J_Tieut", "Hangul_J_Phieuf", "Hangul_J_Hieuh", "Hangul_RieulYeorinHieuh", "Hangul_SunkyeongeumMieum", "Hangul_SunkyeongeumPieub", "Hangul_PanSios", "Hangul_KkogjiDalrinIeung", "Hangul_SunkyeongeumPhieuf", "Hangul_YeorinHieuh", "Hangul_AraeA", "Hangul_AraeAE", "Hangul_J_PanSios", "Hangul_J_KkogjiDalrinIeung", "Hangul_J_YeorinHieuh", "Korean_Won", }; #define num_keysyms (sizeof(keysyms)/sizeof(*keysyms)) ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������zapping-0.10cvs6/src/tveng.c������������������������������������������������������������������������ 644 � 764 � 144 � 322136 10443021306 11123� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Zapping (TV viewer for the Gnome Desktop) * Copyright (C) 2000 Iaki Garca Etxebarria * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* This is the library in charge of simplyfying Video Access API (I don't want to use thirteen lines of code with ioctl's every time I want to change tuning freq). the name is TV Engine, since it is intended mainly for TV viewing. This file is separated so zapping doesn't need to know about V4L[2] */ #include "site_def.h" #ifdef HAVE_CONFIG_H # include "config.h" #endif #include <sys/types.h> #include <sys/wait.h> #include <signal.h> #include <X11/Xlib.h> /* We use some X calls */ #include <X11/Xutil.h> #include <ctype.h> #include <assert.h> #include <dirent.h> #include <inttypes.h> /* This undef's are to avoid a couple of header warnings */ #undef WNOHANG #undef WUNTRACED #include "tveng.h" #include "tveng1.h" /* V4L specific headers */ #include "tveng25.h" /* V4L2 2.5 specific headers */ #include "tvengxv.h" /* XVideo specific headers */ #include "tvengemu.h" /* Emulation device */ #include "tvengbktr.h" /* Emulation device */ #include "tveng_private.h" /* private definitions */ #include "globals.h" /* XXX for vidmodes, dga_param */ #include "audio.h" #include "zmisc.h" #include "../common/device.h" #ifndef PRId64 # define PRId64 "lld" #endif #ifndef PRIu64 # define PRIu64 "llu" #endif #ifndef PRIx64 # define PRIx64 "llx" #endif #ifndef TVENG1_RIVATV_TEST # define TVENG1_RIVATV_TEST 0 #endif #ifndef TVENG25_XV_TEST # define TVENG25_XV_TEST 0 #endif #ifndef TVENG1_XV_TEST # define TVENG1_XV_TEST 0 #endif /* int rc = 0; */ /* XXX recursive callbacks not good, think again. */ #define TVLOCK \ ({ \ if (0 == info->callback_recursion) { \ /* fprintf (stderr, "TVLOCK %d %d in %s\n", (int) pthread_self(), rc++, __FUNCTION__);*/ \ pthread_mutex_lock(&(info->mutex)); \ } \ }) #define UNTVLOCK \ ({ \ if (0 == info->callback_recursion) { \ /* fprintf (stderr, "UNTVLOCK %d %d in %s\n", (int) pthread_self(), --rc, __FUNCTION__);*/ \ pthread_mutex_unlock(&(info->mutex)); \ } \ }) #define RETURN_UNTVLOCK(X) \ do { \ __typeof__(X) _unlocked_result = X; \ UNTVLOCK; \ return _unlocked_result; \ } while (0) #define TVUNSUPPORTED do { \ /* function not supported by the module */ \ info->tveng_errno = -1; \ tv_error_msg (info, "Function not supported by the module"); \ } while (0) typedef struct { tv_control pub; tv_control ** prev_next; tveng_device_info * info; /* TV card control. */ tv_control * video_control; /* Graphics card control (not used yet). */ tv_control * display_control; /* Soundcard control. */ tv_audio_line * mixer_line; } virtual_control; #define VC(l) PARENT (l, virtual_control, pub) static tv_control * control_by_id (tveng_device_info * info, tv_control_id id); static void virtual_control_notify_cb (tv_control * tc, void * user_data); static void virtual_control_destroy_cb (tv_control * tc, void * user_data); static void vc_mixer_line_notify_cb (tv_audio_line * line, void * user_data); static void vc_mixer_line_destroy_cb (tv_audio_line * line, void * user_data); static void destroy_virtual_control (virtual_control * vc) { tv_control *next; assert (NULL != vc); tv_callback_delete_all (vc->pub._callback, /* notify: any */ NULL, /* destroy: any */ NULL, /* user_data: any */ NULL, /* object */ &vc->pub); if (vc->video_control) { tv_callback_remove_all (vc->video_control->_callback, (tv_callback_fn *) virtual_control_notify_cb, (tv_callback_fn *) virtual_control_destroy_cb, /* user_data */ vc); vc->video_control = NULL; } if (vc->mixer_line) { tv_callback_remove_all (vc->mixer_line->_callback, (tv_callback_fn *) vc_mixer_line_notify_cb, (tv_callback_fn *) vc_mixer_line_destroy_cb, /* user_data */ vc); vc->mixer_line = NULL; } next = vc->pub._next; assert (NULL != vc->prev_next); *vc->prev_next = next; if (next) VC(next)->prev_next = vc->prev_next; tv_control_delete (&vc->pub); } static void destroy_cloned_controls (tveng_device_info * info) { while (info->cloned_controls) { virtual_control *vc = VC (info->cloned_controls); destroy_virtual_control (vc); } } /* Called after vc->video changed. */ static void virtual_control_notify_cb (tv_control * tc, void * user_data) { virtual_control *vc = (virtual_control *) user_data; vc->pub.value = tc->value; tv_callback_notify (NULL, &vc->pub, vc->pub._callback); } /* Called before vc->video disappears. */ static void virtual_control_destroy_cb (tv_control * tc _unused_, void * user_data) { virtual_control *vc = (virtual_control *) user_data; assert (tc == vc->video_control); vc->video_control = NULL; if (vc->mixer_line) { /* Keep going as a mixer control. */ } else { destroy_virtual_control (vc); } } static virtual_control * virtual_control_copy (tv_control * tc) { virtual_control *vc; if (!(vc = malloc (sizeof (*vc)))) { return NULL; } CLEAR (*vc); if (!tv_control_copy (&vc->pub, tc)) { free (vc); return NULL; } vc->video_control = tc; /* Redirect callbacks. */ assert (NULL == tc->_callback); if (!tv_control_add_callback (tc, virtual_control_notify_cb, virtual_control_destroy_cb, /* user_data */ vc)) { tv_control_delete (&vc->pub); return NULL; } return vc; } static void insert_virtual_control (tv_control ** list, virtual_control * vc) { while (NULL != *list) list = &(*list)->_next; vc->prev_next = list; vc->pub._next = *list; *list = &vc->pub; } static tv_bool clone_controls (tv_control ** list, tv_control * tc) { tv_control **prev_next; assert (NULL != list); *list = NULL; prev_next = list; while (NULL != tc) { virtual_control *vc; if (!(vc = virtual_control_copy (tc))) { goto failure; } vc->prev_next = prev_next; *prev_next = &vc->pub; prev_next = &vc->pub._next; tc = tc->_next; } return TRUE; failure: free_control_list (list); return FALSE; } typedef void (*tveng_controller)(struct tveng_module_info *info); static tveng_controller tveng_controllers[] = { #if TVENG1_RIVATV_TEST || TVENG1_XV_TEST tveng1_init_module, #elif TVENG25_XV_TEST tveng25_init_module, #else tvengxv_init_module, tveng25_init_module, tveng1_init_module, tvengbktr_init_module, #endif }; /* static void deref_callback (void * object, void * user_data) { *((void **) user_data) = NULL; } */ void p_tveng_close_device(tveng_device_info * info); int p_tveng_update_controls(tveng_device_info * info); int p_tveng_get_display_depth(tveng_device_info * info); tv_bool p_tv_enable_overlay (tveng_device_info * info, tv_bool enable); /* Initializes a tveng_device_info object */ tveng_device_info * tveng_device_info_new(Display * display, int bpp) { size_t needed_mem = 0; tveng_device_info * new_object; struct tveng_module_info module_info; pthread_mutexattr_t attr; unsigned int i; /* Get the needed mem for the controllers */ for (i = 0; i < N_ELEMENTS (tveng_controllers); ++i) { tveng_controllers[i](&module_info); needed_mem = MAX(needed_mem, (size_t) module_info.private_size); } assert (needed_mem > 0); if (!(new_object = calloc (1, needed_mem))) return NULL; if (!(new_object->error = malloc (256))) { free (new_object); perror ("malloc"); return NULL; } new_object->display = display; new_object->bpp = bpp; new_object->zapping_setup_fb_verbosity = 0; /* No output by default */ x11_vidmode_clear_state (&new_object->old_mode); pthread_mutexattr_init(&attr); /* pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE); */ pthread_mutex_init(&(new_object->mutex), &attr); pthread_mutexattr_destroy(&attr); new_object->current_controller = TVENG_CONTROLLER_NONE; if (io_debug_msg > 0) new_object->log_fp = stderr; /* return the allocated memory */ return (new_object); } /* destroys a tveng_device_info object (and closes it if neccesary) */ void tveng_device_info_destroy(tveng_device_info * info) { assert (NULL != info); destroy_cloned_controls (info); if (-1 != info -> fd) p_tveng_close_device(info); if (info -> error) free(info -> error); pthread_mutex_destroy(&(info->mutex)); tv_callback_delete_all (info->panel.video_input_callback, 0, 0, 0, info); tv_callback_delete_all (info->panel.audio_input_callback, 0, 0, 0, info); tv_callback_delete_all (info->panel.video_standard_callback, 0, 0, 0, info); tv_callback_delete_all (info->panel.audio_callback, 0, 0, 0, info); tv_clip_vector_destroy (&info->overlay.clip_vector); free(info); } const char * tv_get_errstr (tveng_device_info * info) { return info->error; } int tv_set_errstr (tveng_device_info * info, const char * template, ...) { va_list ap; int n; va_start (ap, template); n = vsnprintf (info->error, 256, template, ap); va_end (ap); return n; } int tv_get_debug_level (tveng_device_info * info) { return info->debug_level; } int tv_get_errno (tveng_device_info * info) { return info->tveng_errno; } capture_mode tv_get_capture_mode (tveng_device_info * info) { return info->capture_mode; } void tv_set_capture_mode (tveng_device_info * info, capture_mode mode) { info->capture_mode = mode; } extern enum tveng_controller tv_get_controller (tveng_device_info * info) { return info->current_controller; } const struct tveng_caps * tv_get_caps (tveng_device_info * info) { return &info->caps; } enum tveng_attach_mode tv_get_attach_mode (tveng_device_info * info) { return info->attach_mode; } int tv_get_fd (tveng_device_info * info) { return info->fd; } void tv_clear_error (tveng_device_info * info) { info->error[0] = 0; } void tv_overlay_hack (tveng_device_info * info, int x, int y, int w, int h) { info->overlay.window.x = x; info->overlay.window.y = y; info->overlay.window.width = w; info->overlay.window.height = h; } void tv_set_filename (tveng_device_info * info, const char * s) { free (info->file_name); if (s) info->file_name = strdup (s); else info->file_name = NULL; } /* Associates the given tveng_device_info with the given video device. On error it returns -1 and sets info->tveng_errno, info->error to the correct values. device_file: The file used to access the video device (usually /dev/video) window: Find a device capable of rendering into this window (XVideo, Xinerama). Can be None. attach_mode: Specifies the mode to open the device file depth: The color depth the capture will be in, -1 means let tveng decide based on the current private->display depth. info: The structure to be associated with the device */ int tveng_attach_device(const char* device_file, Window window, enum tveng_attach_mode attach_mode, tveng_device_info * info) { const char *long_str, *short_str; char *sign = NULL; tv_control *tc; int num_controls; tv_video_line *tl; int num_inputs; assert (NULL != device_file); assert (NULL != info); TVLOCK; tv_clear_error (info); if (0 && (TVENG1_XV_TEST | TVENG25_XV_TEST) && -1 != info->fd && NULL != info->module.change_mode) { if (-1 != info->module.change_mode (info, window, attach_mode)) goto done; info->tveng_errno = -1; tv_error_msg (info, "Cannot change to the requested capture mode"); UNTVLOCK; return -1; } destroy_cloned_controls (info); if (-1 != info -> fd) /* If the device is already attached, detach it */ p_tveng_close_device(info); info -> current_controller = TVENG_CONTROLLER_NONE; /* Check that the current private->display depth is one of the supported ones. XXX this is inaccurate. It depends on the formats supported by the video HW and our conversion capabilities. */ info->current_bpp = p_tveng_get_display_depth(info); switch (info->current_bpp) { case 15: case 16: case 24: case 32: break; default: info -> tveng_errno = -1; tv_error_msg (info, "Display depth %u is not supported", info->current_bpp); UNTVLOCK; return -1; } if (0 == strcmp (device_file, "emulator")) { info->fd = -1; tvengemu_init_module (&info->module); info->module.attach_device (device_file, window, attach_mode, info); goto success; } else { unsigned int i; for (i = 0; i < N_ELEMENTS (tveng_controllers); ++i) { info->fd = -1; /* XXX */ if (TVENG_ATTACH_VBI == attach_mode && tvengxv_init_module == tveng_controllers[i]) continue; tveng_controllers[i](&(info->module)); if (!info->module.attach_device) continue; if (-1 != info->module.attach_device (device_file, window, attach_mode, info)) goto success; } } /* Error */ info->tveng_errno = -1; tv_error_msg (info, "The device cannot be attached to any controller"); CLEAR (info->module); UNTVLOCK; return -1; success: info->using_xvideo = FALSE; /* See p_tveng_set_capture_format() */ #ifdef ENABLE_BKTR /* FIXME bktr VBI capturing does not work if video capture format is YUV. */ #define YUVHACK TV_PIXFMT_SET_RGB #else #define YUVHACK (TV_PIXFMT_SET (TV_PIXFMT_YUV420) | \ TV_PIXFMT_SET (TV_PIXFMT_YVU420) | \ TV_PIXFMT_SET (TV_PIXFMT_NV12) | \ TV_PIXFMT_SET (TV_PIXFMT_HM12) | \ TV_PIXFMT_SET (TV_PIXFMT_YUYV) | \ TV_PIXFMT_SET (TV_PIXFMT_UYVY)) #endif #ifdef YUVHACK if (info->capture.supported_pixfmt_set & TV_PIXFMT_SET_YUV) info->capture.supported_pixfmt_set &= YUVHACK; #endif info->freq_change_restart = TRUE; { info->cloned_controls = NULL; if (!clone_controls (&info->cloned_controls, info->panel.controls)) { p_tveng_close_device (info); CLEAR (info->module); UNTVLOCK; return -1; } } { info->control_mute = NULL; info->audio_mutable = 0; /* Add mixer controls */ /* XXX the mixer_line should be property of a virtual device, but until we're there... */ if (esd_output || ivtv_audio) tveng_attach_mixer_line (info, &audio_loopback_mixer, &audio_loopback_mixer_line); else if (mixer && mixer_line) tveng_attach_mixer_line (info, mixer, mixer_line); if ((tc = control_by_id (info, TV_CONTROL_ID_MUTE))) { info->control_mute = tc; info->audio_mutable = 1; /* preliminary */ } num_controls = 0; for_all (tc, info->cloned_controls) num_controls++; num_inputs = 0; for_all (tl, info->panel.video_inputs) num_inputs++; } if (_tv_asprintf (&sign, "%s - %d %d - %d %d %d", info->caps.name, num_inputs, num_controls, info->caps.flags, info->caps.maxwidth, info->caps.maxheight) < 0) { t_error("asprintf", info); destroy_cloned_controls (info); p_tveng_close_device (info); CLEAR (info->module); UNTVLOCK; return -1; } info->signature = tveng_build_hash (sign); free (sign); if (info->debug_level>0) { static const struct { const gchar *name; guint value; } caps [] = { #undef CAP #define CAP(name) { #name, TVENG_CAPS_##name } CAP (CAPTURE), CAP (TUNER), CAP (TELETEXT), CAP (OVERLAY), CAP (CHROMAKEY), CAP (CLIPPING), CAP (FRAMERAM), CAP (SCALES), CAP (MONOCHROME), CAP (SUBCAPTURE), CAP (SUBCAPTURE), CAP (QUEUE), CAP (XVIDEO), }; guint i; short_str = "?"; long_str = "?"; fprintf(stderr, "[TVeng] - Info about the video device\n"); fprintf(stderr, "-------------------------------------\n"); fprintf(stderr, "Device: %s [%s]\n", info->file_name, info->module.interface_label); fprintf(stderr, "Device signature: %x\n", info->signature); fprintf(stderr, "Detected framebuffer depth: %d\n", p_tveng_get_display_depth(info)); fprintf (stderr, "Capabilities:\n 0x%x=", (unsigned int) info->caps.flags); for (i = 0; i < N_ELEMENTS (caps); ++i) { if (info->caps.flags & caps[i].value) fprintf (stderr, "%s%s", caps[i].name, (info->caps.flags > (int) caps[i].value * 2 - 1) ? "|" : ""); } fprintf (stderr, "\n channels=%u audios=%u\n" " min=%ux%u max=%ux%u\n", info->caps.channels, info->caps.audios, info->caps.minwidth, info->caps.minheight, info->caps.maxwidth, info->caps.maxheight); fprintf (stderr, "Capture format:\n" " buffer size %ux%u pixels, 0x%lx bytes\n" " bytes per line %lu, %lu bytes\n" " offset %lu, %lu, %lu bytes\n" " pixfmt %s\n", info->capture.format.width, info->capture.format.height, info->capture.format.size, info->capture.format.bytes_per_line[0], info->capture.format.bytes_per_line[1], info->capture.format.offset[0], info->capture.format.offset[1], info->capture.format.offset[2], info->capture.format.pixel_format ? info->capture.format.pixel_format->name : "<none>"); fprintf(stderr, "Current overlay window struct:\n"); fprintf(stderr, " Coords: %dx%d-%dx%d\n", info->overlay.window.x, info->overlay.window.y, info->overlay.window.width, info->overlay.window.height); #ifdef HAVE_XV_EXTENSION fprintf(stderr, "Overlay Xv Port: %d\n", (int) info->overlay.xv_port_id); #else fprintf(stderr, "Overlay Xv Port: Xv not compiled.\n"); #endif { tv_video_standard *s; unsigned int i; fprintf (stderr, "Video standards:\n"); for (s = info->panel.video_standards, i = 0; s; s = s->_next, ++i) fprintf (stderr, " %d) '%s' 0x%" PRIx64 " %dx%d %.2f %u hash: %x\n", i, s->label, s->videostd_set, s->frame_width, s->frame_height, s->frame_rate, s->frame_ticks, s->hash); fprintf (stderr, " Current: %s\n", info->panel.cur_video_standard ? info->panel.cur_video_standard->label : "unset"); } { tv_video_line *l; unsigned int i; fprintf (stderr, "Video inputs:\n"); for (l = info->panel.video_inputs, i = 0; l; l = l->_next, ++i) { fprintf (stderr, " %d) '%s' id: %u hash: %x %s\n", i, l->label, l->id, l->hash, IS_TUNER_LINE (l) ? "tuner" : "composite"); if (IS_TUNER_LINE (l)) fprintf (stderr, " freq.range: %u...%u %+d Hz, " "current: %u Hz\n", l->u.tuner.minimum, l->u.tuner.maximum, l->u.tuner.step, l->u.tuner.frequency); } fprintf (stderr, " Current: %s\n", info->panel.cur_video_input ? info->panel.cur_video_input->label : "unset"); } { tv_audio_line *l; unsigned int i; fprintf (stderr, "Audio inputs:\n"); for (l = info->panel.audio_inputs, i = 0; l; l = l->_next, ++i) { fprintf (stderr, " %d) '%s' id: %u hash: %x\n" " range: %d...%d step: %d reset: %d volume: %d,%d\n" " %srecordable %s %smuted\n", i, l->label, l->id, l->hash, l->minimum, l->maximum, l->step, l->reset, l->volume[0], l->volume[1], l->recordable ? "" : "not ", l->stereo ? "stereo" : "mono/unknown", l->muted ? "" : "un"); } fprintf (stderr, " Current: %s\n", info->panel.cur_audio_input ? info->panel.cur_audio_input->label : "unset"); } { tv_control *c; unsigned int i; fprintf (stderr, "Controls:\n"); for (c = info->cloned_controls, i = 0; c; c = c->_next, ++i) { fprintf (stderr, " %u) '%s' id: %u %d...%d" " %+d cur: %d reset: %d ", i, c->label, c->id, c->minimum, c->maximum, c->step, c->value, c->reset); switch (c->type) { case TV_CONTROL_TYPE_INTEGER: fprintf (stderr, "integer\n"); break; case TV_CONTROL_TYPE_BOOLEAN: fprintf (stderr, "boolean\n"); break; case TV_CONTROL_TYPE_CHOICE: { unsigned int i; fprintf (stderr, "choice\n"); for (i = 0; c->menu[i]; ++i) fprintf (stderr, " %u) '%s'\n", i, c->menu[i]); break; } case TV_CONTROL_TYPE_ACTION: fprintf (stderr, "action\n"); break; case TV_CONTROL_TYPE_COLOR: fprintf(stderr, "color\n"); break; default: fprintf(stderr, "unknown type\n"); break; } } } } done: UNTVLOCK; return info->fd; /* XXX not all devices have fd, fake fd (tvengxv) is dangerous. */ } /* Stores in short_str and long_str (if they are non-null) the description of the current controller. The enum value can be found in info->current_controller. For example, V4L2 controller would say: short_str: 'V4L2' long_str: 'Video4Linux 2' info->current_controller: TVENG_CONTROLLER_V4L2 This function always succeeds. */ void tveng_describe_controller(const char ** short_str, const char ** long_str, tveng_device_info * info) { assert (NULL != info); assert (TVENG_CONTROLLER_NONE != info->current_controller); TVLOCK; tv_clear_error (info); if (short_str) *short_str = ""; if (long_str) *long_str = info->module.interface_label; UNTVLOCK; } /* Closes a device opened with tveng_init_device */ void p_tveng_close_device(tveng_device_info * info) { gboolean dummy; if (info->current_controller == TVENG_CONTROLLER_NONE) return; /* nothing to be done */ p_tveng_stop_everything(info, &dummy); /* remove mixer controls */ tveng_attach_mixer_line (info, NULL, NULL); if (info->module.close_device) info->module.close_device(info); info->control_mute = NULL; } /* Closes a device opened with tveng_init_device */ void tveng_close_device(tveng_device_info * info) { assert (NULL != info); if (info->current_controller == TVENG_CONTROLLER_NONE) return; /* nothing to be done */ TVLOCK; tv_clear_error (info); p_tveng_close_device (info); UNTVLOCK; } /* Functions for controlling the video capture. All of them return -1 in case of error, so any value != -1 should be considered valid (unless explicitly stated in the description of the function) */ /* Returns a newly allocated copy of the string, normalized */ static char* normalize(const char *string) { int i = 0; const char *strptr=string; char *result; assert (NULL != string); result = strdup(string); assert (NULL != result); while (*strptr != 0) { if (*strptr == '_' || *strptr == '-' || *strptr == ' ') { strptr++; continue; } result[i] = tolower(*strptr); strptr++; i++; } result[i] = 0; return result; } /* nomalize and compare */ static int tveng_normstrcmp (const char * in1, const char * in2) { char *s1 = normalize(in1); char *s2 = normalize(in2); assert (NULL != in1); assert (NULL != in2); /* Compare the strings */ if (!strcmp(s1, s2)) { free(s1); free(s2); return 1; } else { free(s1); free(s2); return 0; } } /* build hash for the given string, normalized */ int tveng_build_hash(const char *string) { char *norm = normalize(string); unsigned int i; int result=0; for (i = 0; i<strlen(norm); i++) result += ((result+171)*((int)norm[i]) & ~(norm[i]>>4)); free(norm); return result; } void ioctl_failure (tveng_device_info * info, const char * video_file_name, const char * function_name, unsigned int video_file_line, const char * ioctl_name) { info->tveng_errno = errno; snprintf (info->error, 255, "%s:%s:%u: ioctl %s failed: %d, %s", video_file_name, function_name, video_file_line, ioctl_name, info->tveng_errno, strerror (info->tveng_errno)); if (info->debug_level > 0) { fputs (info->error, stderr); fputc ('\n', stderr); } errno = info->tveng_errno; } static void panel_failure (tveng_device_info * info, const char * function_name) { info->tveng_errno = -1; /* unknown */ snprintf (info->error, 255, "%s:%s: function not supported in control mode\n", __FILE__, function_name); if (info->debug_level) { fputs (info->error, stderr); fputc ('\n', stderr); } } #define REQUIRE_IO_MODE(_result) \ do { \ if (TVENG_ATTACH_CONTROL == info->attach_mode \ || TVENG_ATTACH_VBI == info->attach_mode) { \ panel_failure (info, __PRETTY_FUNCTION__); \ return _result; \ } \ } while (0) static void support_failure (tveng_device_info * info, const char * function_name) { info->tveng_errno = -1; snprintf (info->error, 255, "%s not supported by driver\n", function_name); if (info->debug_level) fprintf (stderr, "tveng:%s\n", info->error); } #define REQUIRE_SUPPORT(_func, _result) \ do { \ if ((_func) == NULL) { \ support_failure (info, __PRETTY_FUNCTION__); \ return _result; \ } \ } while (0) #define CUR_NODE_FUNC(item, kind) \ const tv_##kind * \ tv_cur_##item (const tveng_device_info *info) \ { \ assert (NULL != info); \ return info->panel.cur_##item; \ } #define HEAD_NODE_FUNC(item, kind) \ tv_##kind * \ tv_##item##s (const tveng_device_info *info) \ { \ assert (NULL != info); \ return info->panel.item##s; \ } #define NEXT_NODE_FUNC(item, kind) \ tv_##kind * \ tv_next_##item (const tveng_device_info *info, \ const tv_##kind * p) \ { \ if (p) \ return p->_next; \ if (info) \ return info->panel.item##s; \ return NULL; \ } #define NTH_NODE_FUNC(item, kind) \ tv_##kind * \ tv_nth_##item (tveng_device_info * info, \ unsigned int index) \ { \ tv_##kind *p; \ \ assert (NULL != info); \ \ TVLOCK; \ \ for_all (p, info->panel.item##s) \ if (index-- == 0) \ break; \ \ RETURN_UNTVLOCK (p); \ } #define NODE_POSITION_FUNC(item, kind) \ unsigned int \ tv_##item##_position (tveng_device_info * info, \ const tv_##kind * p) \ { \ tv_##kind *list; \ unsigned int index; \ \ assert (NULL != info); \ \ index = 0; \ \ TVLOCK; \ \ for_all (list, info->panel.item##s) \ if (p != list) \ ++index; \ else \ break; \ \ RETURN_UNTVLOCK (index); \ } #define NODE_BY_HASH_FUNC(item, kind) \ tv_##kind * \ tv_##item##_by_hash (tveng_device_info * info, \ unsigned int hash) \ { \ tv_##kind *p; \ \ assert (NULL != info); \ \ TVLOCK; \ \ for_all (p, info->panel.item##s) \ if (p->hash == hash) \ break; \ \ RETURN_UNTVLOCK (p); \ } CUR_NODE_FUNC (video_input, video_line); HEAD_NODE_FUNC (video_input, video_line); NEXT_NODE_FUNC (video_input, video_line); NTH_NODE_FUNC (video_input, video_line); NODE_POSITION_FUNC (video_input, video_line); NODE_BY_HASH_FUNC (video_input, video_line); tv_bool tv_get_tuner_frequency (tveng_device_info * info, unsigned int * frequency) { tv_video_line *line; assert (NULL != info); assert (NULL != frequency); TVLOCK; tv_clear_error (info); line = info->panel.cur_video_input; if (!IS_TUNER_LINE (line)) RETURN_UNTVLOCK (FALSE); if (info->panel.get_tuner_frequency) { if (!info->panel.get_tuner_frequency (info, line)) RETURN_UNTVLOCK (FALSE); assert (line->u.tuner.frequency >= line->u.tuner.minimum); assert (line->u.tuner.frequency <= line->u.tuner.maximum); } *frequency = line->u.tuner.frequency; RETURN_UNTVLOCK (TRUE); } /* Note the tuner frequency is a property of the tuner. When you switch the tuner it will not assume the current frequency. Likewise you will get the frequency previously set for *this* tuner. Granted the function parameters are misleading, should change. */ tv_bool tv_set_tuner_frequency (tveng_device_info * info, unsigned int frequency) { tv_video_line *line; assert (NULL != info); REQUIRE_SUPPORT (info->panel.set_tuner_frequency, FALSE); TVLOCK; tv_clear_error (info); line = info->panel.cur_video_input; if (!IS_TUNER_LINE (line)) RETURN_UNTVLOCK (FALSE); frequency = SATURATE (frequency, line->u.tuner.minimum, line->u.tuner.maximum); RETURN_UNTVLOCK (info->panel.set_tuner_frequency (info, line, frequency)); } const tv_video_line * tv_get_video_input (tveng_device_info * info) { const tv_video_line *tl; assert (NULL != info); TVLOCK; tv_clear_error (info); if (!info->panel.get_video_input) tl = info->panel.cur_video_input; else if (info->panel.get_video_input (info)) tl = info->panel.cur_video_input; else tl = NULL; RETURN_UNTVLOCK (tl); } tv_bool tv_set_video_input (tveng_device_info * info, tv_video_line * line) { tv_video_line *list; assert (NULL != info); assert (NULL != line); REQUIRE_SUPPORT (info->panel.set_video_input, FALSE); TVLOCK; tv_clear_error (info); for_all (list, info->panel.video_inputs) if (list == line) break; if (list == NULL) { UNTVLOCK; return FALSE; } RETURN_UNTVLOCK (info->panel.set_video_input (info, line)); } /* Sets the input named name as the active input. -1 on error. */ int tveng_set_input_by_name(const char * input_name, tveng_device_info * info) { tv_video_line *tl; assert (NULL != input_name); assert (NULL != info); TVLOCK; tv_clear_error (info); for_all (tl, info->panel.video_inputs) if (tveng_normstrcmp(tl->label, input_name)) { /*XXX*/ UNTVLOCK; return tv_set_video_input (info, tl); } info->tveng_errno = -1; tv_error_msg (info, "Input %s doesn't appear to exist", input_name); UNTVLOCK; return -1; /* String not found */ } /* * Audio inputs */ CUR_NODE_FUNC (audio_input, audio_line); HEAD_NODE_FUNC (audio_input, audio_line); NEXT_NODE_FUNC (audio_input, audio_line); NTH_NODE_FUNC (audio_input, audio_line); NODE_POSITION_FUNC (audio_input, audio_line); NODE_BY_HASH_FUNC (audio_input, audio_line); const tv_audio_line * tv_get_audio_input (tveng_device_info * info) { const tv_audio_line *tl; assert (NULL != info); TVLOCK; tv_clear_error (info); if (!info->panel.get_audio_input) tl = info->panel.cur_audio_input; else if (info->panel.get_audio_input (info)) tl = info->panel.cur_audio_input; else tl = NULL; RETURN_UNTVLOCK (tl); } tv_bool tv_set_audio_input (tveng_device_info * info, tv_audio_line * line) { tv_audio_line *list; assert (NULL != info); assert (NULL != line); REQUIRE_SUPPORT (info->panel.set_audio_input, FALSE); TVLOCK; tv_clear_error (info); for_all (list, info->panel.audio_inputs) if (list == line) break; if (list == NULL) { UNTVLOCK; return FALSE; } RETURN_UNTVLOCK (info->panel.set_audio_input (info, line)); } /* * Video standards */ CUR_NODE_FUNC (video_standard, video_standard); HEAD_NODE_FUNC (video_standard, video_standard); NEXT_NODE_FUNC (video_standard, video_standard); NTH_NODE_FUNC (video_standard, video_standard); NODE_POSITION_FUNC (video_standard, video_standard); NODE_BY_HASH_FUNC (video_standard, video_standard); const tv_video_standard * tv_get_video_standard (tveng_device_info * info) { const tv_video_standard *ts; assert (NULL != info); TVLOCK; tv_clear_error (info); if (!info->panel.get_video_standard) ts = info->panel.cur_video_standard; else if (info->panel.get_video_standard (info)) ts = info->panel.cur_video_standard; else ts = NULL; RETURN_UNTVLOCK (ts); } tv_bool tv_set_video_standard (tveng_device_info * info, tv_video_standard * standard) { tv_video_standard *list; assert (NULL != info); assert (NULL != standard); REQUIRE_SUPPORT (info->panel.set_video_standard, FALSE); TVLOCK; tv_clear_error (info); for_all (list, info->panel.video_standards) if (list == standard) break; if (list == NULL) { UNTVLOCK; return FALSE; } RETURN_UNTVLOCK (info->panel.set_video_standard (info, standard)); } tv_bool tv_set_video_standard_by_id (tveng_device_info * info, tv_videostd_set videostd_set) { tv_video_standard *ts, *list; assert (NULL != info); REQUIRE_SUPPORT (info->panel.set_video_standard, FALSE); TVLOCK; tv_clear_error (info); ts = NULL; for_all (list, info->panel.video_standards) if (ts->videostd_set & videostd_set) { if (ts) { info->tveng_errno = -1; tv_error_msg (info, "Ambiguous id %" PRIx64, videostd_set); RETURN_UNTVLOCK (FALSE); } ts = list; } RETURN_UNTVLOCK (info->panel.set_video_standard (info, ts)); } /* Sets the standard by name. -1 on error */ int tveng_set_standard_by_name(const char * name, tveng_device_info * info) { tv_video_standard *ts; assert (NULL != info); TVLOCK; tv_clear_error (info); for_all (ts, info->panel.video_standards) if (tveng_normstrcmp(name, ts->label)) { if (info->panel.set_video_standard) RETURN_UNTVLOCK(info->panel.set_video_standard(info, ts) ? 0 : -1); TVUNSUPPORTED; UNTVLOCK; return -1; } info->tveng_errno = -1; tv_error_msg (info, "Standard %s doesn't appear to exist", name); UNTVLOCK; return -1; /* String not found */ } /* * Controls */ tv_control * tv_next_control (tveng_device_info * info, tv_control * p) { if (p) return p->_next; if (info) return info->cloned_controls; return NULL; } tv_control * tv_nth_control (tveng_device_info * info, unsigned int index) { tv_control *c; assert (NULL != info); TVLOCK; tv_clear_error (info); for (c = info->cloned_controls; c; c = c->_next) if (0 == index--) break; RETURN_UNTVLOCK (c); } unsigned int tv_control_position (tveng_device_info * info, const tv_control * control) { tv_control *list; unsigned int index; assert (NULL != info); index = 0; TVLOCK; tv_clear_error (info); for (list = info->cloned_controls; list; list = list->_next) if (control != list) ++index; else break; RETURN_UNTVLOCK (index); } tv_control * tv_control_by_hash (tveng_device_info * info, unsigned int hash) { tv_control *c; assert (NULL != info); TVLOCK; tv_clear_error (info); for (c = info->cloned_controls; c; c = c->_next) if (c->hash == hash) break; RETURN_UNTVLOCK (c); } static tv_control * control_by_id (tveng_device_info * info, tv_control_id id) { tv_control *c; assert (NULL != info); for (c = info->cloned_controls; c; c = c->_next) if (c->id == id) break; return c; } tv_control * tv_control_by_id (tveng_device_info * info, tv_control_id id) { tv_control *control; assert (NULL != info); TVLOCK; tv_clear_error (info); control = control_by_id (info, id); RETURN_UNTVLOCK (control); } static void round_boundary_4 (int * x1, unsigned int * width, tv_pixfmt pixfmt, unsigned int max_width) { int x; unsigned int w; if (!x1) { x = 0; x1 = &x; } switch (pixfmt) { case TV_PIXFMT_RGBA32_LE: case TV_PIXFMT_RGBA32_BE: case TV_PIXFMT_BGRA32_LE: case TV_PIXFMT_BGRA32_BE: x = *x1; w = *width; break; case TV_PIXFMT_RGB24_LE: case TV_PIXFMT_BGR24_LE: /* Round to multiple of 12. */ x = (*x1 + 2) & (unsigned int) -4; w = (*width + 2) & (unsigned int) -4; break; case TV_PIXFMT_RGB16_LE: case TV_PIXFMT_RGB16_BE: case TV_PIXFMT_BGR16_LE: case TV_PIXFMT_BGR16_BE: case TV_PIXFMT_RGBA16_LE: case TV_PIXFMT_RGBA16_BE: case TV_PIXFMT_BGRA16_LE: case TV_PIXFMT_BGRA16_BE: case TV_PIXFMT_ARGB16_LE: case TV_PIXFMT_ARGB16_BE: case TV_PIXFMT_ABGR16_LE: case TV_PIXFMT_ABGR16_BE: case TV_PIXFMT_RGBA12_LE: case TV_PIXFMT_RGBA12_BE: case TV_PIXFMT_BGRA12_LE: case TV_PIXFMT_BGRA12_BE: case TV_PIXFMT_ARGB12_LE: case TV_PIXFMT_ARGB12_BE: case TV_PIXFMT_ABGR12_LE: case TV_PIXFMT_ABGR12_BE: x = (((*x1 << 1) + 2) & (unsigned int) -4) >> 1; w = (((*width << 1) + 2) & (unsigned int) -4) >> 1; break; case TV_PIXFMT_RGB8: case TV_PIXFMT_BGR8: case TV_PIXFMT_RGBA8: case TV_PIXFMT_BGRA8: case TV_PIXFMT_ARGB8: case TV_PIXFMT_ABGR8: x = (*x1 + 2) & (unsigned int) -4; w = (*width + 2) & (unsigned int) -4; break; default: assert (!"reached"); } w = MIN (w, max_width); if ((x + w) >= max_width) x = max_width - w; if (0) fprintf (stderr, "dword align: x=%u->%u w=%u->%u\n", *x1, x, *width, w); *x1 = x; *width = w; } tv_pixfmt_set tv_supported_pixfmts (tveng_device_info * info) { assert (NULL != info); return info->capture.supported_pixfmt_set; } const tv_image_format * tv_cur_capture_format (tveng_device_info * info) { assert (NULL != info); return &info->capture.format; } const tv_image_format * tv_get_capture_format (tveng_device_info * info) { assert(NULL != info); if (TVENG_CONTROLLER_NONE == info->current_controller) return NULL; REQUIRE_IO_MODE (NULL); REQUIRE_SUPPORT (info->capture.get_format, NULL); TVLOCK; tv_clear_error (info); if (info->capture.get_format (info)) RETURN_UNTVLOCK (&info->capture.format); else RETURN_UNTVLOCK (NULL); } const tv_image_format * p_tv_set_capture_format (tveng_device_info * info, const tv_image_format *fmt) { tv_image_format format; tv_bool result; if (TVENG_CONTROLLER_NONE == info->current_controller) return NULL; if (CAPTURE_MODE_READ == info->capture_mode) { #ifdef TVENG_FORCE_FORMAT if (0 == (TV_PIXFMT_SET (fmt->pixfmt) & TV_PIXFMT_SET (TVENG_FORCE_FORMAT))) { return NULL; } #else /* FIXME the format selection (capture.c) has problems with RGB & YUV, so for now we permit only YUV. */ #ifdef YUVHACK if (info->capture.supported_pixfmt_set & TV_PIXFMT_SET_YUV) if (0 == (TV_PIXFMT_SET (fmt->pixel_format->pixfmt) & YUVHACK)) { return NULL; } #endif #endif } REQUIRE_IO_MODE (NULL); REQUIRE_SUPPORT (info->capture.set_format, NULL); format = *fmt; format.width = SATURATE (format.width, info->caps.minwidth, info->caps.maxwidth); format.height = SATURATE (format.height, info->caps.minheight, info->caps.maxheight); if (info->dword_align) round_boundary_4 (NULL, &format.width, format.pixel_format->pixfmt, info->caps.maxwidth); result = info->capture.set_format (info, &format); if (result) { return &info->capture.format; } return NULL; } /* XXX this is called from scan_devices to determine supported formats, which is overkill. Maybe we should have a dedicated function to query formats a la try_fmt. FIXME request_capture_format_real needs a rewrite, see TODO. In the meantime we will allow only YUV formats a la Zapping 0.0 - 0.6. */ const tv_image_format * tv_set_capture_format (tveng_device_info * info, const tv_image_format *fmt) { assert (NULL != info); TVLOCK; tv_clear_error (info); RETURN_UNTVLOCK (p_tv_set_capture_format (info, fmt)); } /* * Controls */ static int update_xv_control (tveng_device_info * info, virtual_control *vc) { int value; switch (vc->pub.id) { case TV_CONTROL_ID_VOLUME: case TV_CONTROL_ID_MUTE: { tv_audio_line *line; if (info->quiet) return 0; line = vc->mixer_line; assert (NULL != line); if (!tv_mixer_line_update (line)) return -1; if (vc->pub.id == TV_CONTROL_ID_VOLUME) value = (line->volume[0] + line->volume[1] + 1) >> 1; else value = !!(line->muted); } break; default: return 0; } if (vc->pub.value != value) { vc->pub.value = value; tv_callback_notify (info, &vc->pub, vc->pub._callback); } return 0; } int tveng_update_control(tv_control *control, tveng_device_info * info) { assert (NULL != info); if (TVENG_CONTROLLER_NONE == info->current_controller) return -1; assert (NULL != control); TVLOCK; tv_clear_error (info); if (VC(control)->mixer_line) RETURN_UNTVLOCK (update_xv_control (info, VC(control))); control = VC(control)->video_control; assert (NULL != control); if (!info->panel.get_control) RETURN_UNTVLOCK(0); RETURN_UNTVLOCK(info->panel.get_control (info, control) ? 0 : -1); } int p_tveng_update_controls(tveng_device_info * info) { tv_control *tc; if (TVENG_CONTROLLER_NONE == info->current_controller) return -1; /* Update the controls we maintain */ for (tc = info->cloned_controls; tc; tc = tc->_next) { if (VC(tc)->mixer_line) update_xv_control (info, VC(tc)); } if (!info->panel.get_control) return 0; return (info->panel.get_control (info, NULL) ? 0 : -1); } int tveng_update_controls(tveng_device_info * info) { assert (NULL != info); TVLOCK; tv_clear_error (info); RETURN_UNTVLOCK (p_tveng_update_controls (info)); } /* When setting the mixer volume we must ensure the video device is unmuted and volume at maximum. */ static void reset_video_volume (tveng_device_info * info, tv_bool mute) { tv_control *tc; if (!info->panel.set_control) return; for (tc = info->panel.controls; tc; tc = tc->_next) { switch (tc->id) { case TV_CONTROL_ID_VOLUME: /* Error ignored */ info->panel.set_control (info, tc, tc->maximum * 9 / 10); break; case TV_CONTROL_ID_MUTE: /* Error ignored */ info->panel.set_control (info, tc, (int) mute); break; default: break; } } } static int set_control_audio (tveng_device_info * info, virtual_control * vc, int value, tv_bool quiet, tv_bool reset) { tv_bool success = FALSE; if (vc->mixer_line) { tv_callback *cb; cb = vc->mixer_line->_callback; if (quiet) vc->mixer_line->_callback = NULL; switch (vc->pub.id) { case TV_CONTROL_ID_MUTE: success = tv_mixer_line_set_mute (vc->mixer_line, value); value = vc->mixer_line->muted; if (value) reset = FALSE; break; case TV_CONTROL_ID_VOLUME: success = tv_mixer_line_set_volume (vc->mixer_line, value, value); value = (vc->mixer_line->volume[0] + vc->mixer_line->volume[1] + 1) >> 1; break; default: assert (0); } if (quiet) { vc->mixer_line->_callback = cb; } else if (success && vc->pub.value != value) { vc->pub.value = value; tv_callback_notify (info, &vc->pub, vc->pub._callback); } if (success && reset) reset_video_volume (info, /* mute */ FALSE); } else if (info->panel.set_control) { assert (NULL != vc->video_control); if (quiet) { tv_callback *cb; int old_value; cb = vc->pub._callback; old_value = vc->pub.value; vc->pub._callback = NULL; success = info->panel.set_control (info, vc->video_control, value); vc->pub.value = old_value; vc->pub._callback = cb; } else { success = info->panel.set_control (info, vc->video_control, value); } } return success ? 0 : -1; } static int set_panel_control (tveng_device_info * info, tv_control * tc, int value) { if (info->panel.set_control) return info->panel.set_control (info, tc, value) ? 0 : -1; TVUNSUPPORTED; return -1; } static int set_control (virtual_control * vc, int value, tv_bool reset, tveng_device_info * info) { int r = 0; value = SATURATE (value, vc->pub.minimum, vc->pub.maximum); /* If the quiet switch is set we remember the requested value but don't change driver state. */ if (info->quiet) if (vc->pub.id == TV_CONTROL_ID_VOLUME || vc->pub.id == TV_CONTROL_ID_MUTE) goto set_and_notify; if (vc->mixer_line) { if (vc->pub.id == TV_CONTROL_ID_VOLUME || vc->pub.id == TV_CONTROL_ID_MUTE) { return set_control_audio (info, vc, value, /* quiet */ FALSE, reset); } else { return 0; } set_and_notify: if (vc->pub.value != value) { vc->pub.value = value; tv_callback_notify (info, &vc->pub, vc->pub._callback); } return r; } else { assert (NULL != vc->video_control); return set_panel_control (info, vc->video_control, value); } } /* Sets the value for a specific control. The given value will be clipped between min and max values. Returns -1 on error XXX another function tveng_set_controls would be nice. Would save v4l ioctls on channel switches. */ int tveng_set_control(tv_control * control, int value, tveng_device_info * info) { assert (NULL != info); if (TVENG_CONTROLLER_NONE == info->current_controller) return -1; assert (NULL != control); TVLOCK; tv_clear_error (info); RETURN_UNTVLOCK (set_control (VC(control), value, TRUE, info)); } /* Gets the value of a control, given its name. Returns -1 on error. The comparison is performed disregarding the case. The value read is stored in cur_value. */ int tveng_get_control_by_name(const char * control_name, int * cur_value, tveng_device_info * info) { tv_control *tc; assert (NULL != info); assert (NULL != info->cloned_controls); assert (NULL != control_name); TVLOCK; tv_clear_error (info); /* Update the controls (their values) */ if (info->quiet) { /* not now */ /* FIXME volume and mute only */ } else { if (tveng_update_controls(info) == -1) RETURN_UNTVLOCK(-1); } /* iterate through the info struct to find the control */ for (tc = info->cloned_controls; tc; tc = tc->_next) if (!strcasecmp(tc->label,control_name)) /* we found it */ { int value; value = tc->value; if (cur_value) *cur_value = value; UNTVLOCK; return 0; /* Success */ } /* if we reach this, we haven't found the control */ info->tveng_errno = -1; tv_error_msg(info, "Cannot find control \"%s\" in the list of controls", control_name); UNTVLOCK; return -1; } /* Sets the value of a control, given its name. Returns -1 on error. The comparison is performed disregarding the case. new_value holds the new value given to the control, and it is clipped as neccessary. */ int tveng_set_control_by_name(const char * control_name, int new_value, tveng_device_info * info) { tv_control *tc; assert (NULL != info); assert (NULL != info->cloned_controls); TVLOCK; tv_clear_error (info); for (tc = info->cloned_controls; tc; tc = tc->_next) if (0 == strcasecmp(tc->label,control_name)) /* we found it */ RETURN_UNTVLOCK (set_control (VC(tc), new_value, TRUE, info)); /* if we reach this, we haven't found the control */ info->tveng_errno = -1; tv_error_msg(info, "Cannot find control \"%s\" in the list of controls", control_name); UNTVLOCK; return -1; } /* * AUDIO ROUTINES */ #ifndef TVENG_MIXER_VOLUME_DEBUG #define TVENG_MIXER_VOLUME_DEBUG 0 #endif /* This is a virtual control. Notify when the underlying mixer line changes. */ static void vc_mixer_line_notify_cb (tv_audio_line * line, void * user_data) { virtual_control *vc = (virtual_control *) user_data; int value; assert (line == vc->mixer_line); switch (vc->pub.id) { case TV_CONTROL_ID_VOLUME: vc->pub.minimum = line->minimum; vc->pub.maximum = line->maximum; vc->pub.step = line->step; vc->pub.reset = line->reset; value = (line->volume[0] + line->volume[1] + 1) >> 1; break; case TV_CONTROL_ID_MUTE: vc->pub.reset = 0; vc->pub.minimum = 0; vc->pub.maximum = 1; vc->pub.step = 1; value = line->muted; break; default: assert (0); } if (vc->info && !vc->info->quiet) { vc->pub.value = value; tv_callback_notify (vc->info, &vc->pub, vc->pub._callback); } } /* This is a virtual control. When the underlying mixer line disappears, remove the control and make the corresponding video device control, if any, visible again. */ static void vc_mixer_line_destroy_cb (tv_audio_line * line, void * user_data) { virtual_control *vc = (virtual_control *) user_data; assert (line == vc->mixer_line); vc->mixer_line = NULL; if (vc->video_control) { /* Restore overridden video device control. */ vc->pub.minimum = vc->video_control->minimum; vc->pub.maximum = vc->video_control->maximum; vc->pub.step = vc->video_control->step; vc->pub.reset = vc->video_control->reset; /* XXX which value when info->quiet? */ vc->pub.value = vc->video_control->value; /* Notify about value and limits change. */ tv_callback_notify (vc->info, &vc->pub, vc->pub._callback); } else { if (TV_CONTROL_ID_MUTE == vc->pub.id) { vc->info->control_mute = NULL; vc->info->audio_mutable = 0; /* preliminary */ } destroy_virtual_control (vc); } } static virtual_control * new_virtual_mixer_control (tveng_device_info * info, tv_audio_line * line, tv_control_id id) { virtual_control *vc; tv_callback *cb; int value; info = info; vc = calloc (1, sizeof (*vc)); assert (NULL != vc); /* XXX */ vc->pub.id = id; switch (id) { case TV_CONTROL_ID_VOLUME: vc->pub.type = TV_CONTROL_TYPE_INTEGER; /* XXX which value when info->quiet? */ value = (line->volume[0] + line->volume[1] + 1) >> 1; if (TVENG_MIXER_VOLUME_DEBUG) vc->pub.label = strdup ("Mixer volume"); else vc->pub.label = strdup (_("Volume")); break; case TV_CONTROL_ID_MUTE: vc->pub.type = TV_CONTROL_TYPE_BOOLEAN; /* XXX which value when info->quiet? */ value = line->muted; if (TVENG_MIXER_VOLUME_DEBUG) vc->pub.label = strdup ("Mixer mute"); else vc->pub.label = strdup (_("Mute")); break; default: assert (0); } assert (NULL != vc->pub.label); /* XXX */ vc->pub.minimum = line->minimum; vc->pub.maximum = line->maximum; vc->pub.step = line->step; vc->pub.reset = line->reset; vc->pub.value = value; vc->mixer_line = line; cb = tv_mixer_line_add_callback (line, vc_mixer_line_notify_cb, vc_mixer_line_destroy_cb, vc); assert (NULL != cb); /* XXX */ return vc; } /* When line != NULL this adds a mixer control, hiding the corresponding video device (volume or mute) control if any. When line == NULL the old state is restored. */ static void mixer_replace (tveng_device_info * info, tv_audio_line * line, tv_control_id id) { tv_control *tc; virtual_control *vc; tv_callback *cb; tc = control_by_id (info, id); if (!tc) { if (line) { vc = new_virtual_mixer_control (info, line, id); vc->info = info; insert_virtual_control (&info->cloned_controls, vc); } return; } vc = PARENT (tc, virtual_control, pub); if (!line) { if (vc->mixer_line) { tv_callback_remove_all (vc->mixer_line->_callback, (tv_callback_fn *) vc_mixer_line_notify_cb, (tv_callback_fn *) vc_mixer_line_destroy_cb, /* user_data */ vc); /* Pretend the mixer_line will be deleted. */ vc_mixer_line_destroy_cb (vc->mixer_line, vc); } return; } /* Set new mixer line. */ if (vc->mixer_line) tv_callback_remove_all (vc->mixer_line->_callback, (tv_callback_fn *) vc_mixer_line_notify_cb, (tv_callback_fn *) vc_mixer_line_destroy_cb, /* user_data */ vc); vc->mixer_line = line; cb = tv_mixer_line_add_callback (line, vc_mixer_line_notify_cb, vc_mixer_line_destroy_cb, vc); assert (NULL != cb); /* XXX */ /* Notify about value and limits change. */ vc_mixer_line_notify_cb (line, vc); } /* * This provisional function logically attaches a * soundcard audio input to a video device. * * Two configurations use this: TV cards with an audio * loopback to a soundcard, and TV cards without audio, * where the audio source (e.g. VCR, microphone) * connects directly to a soundcard. * * The function adds an audio mixer volume and mute control, * overriding any video device volume and * mute controls. Tveng will also care to set the video device * controls when mixer controls are changed. * * To get rid of the mixer controls, call with line NULL or * just delete the mixer struct. * * NB control values are not copied when replacing controls. */ void tveng_attach_mixer_line (tveng_device_info * info, tv_mixer * mixer, tv_audio_line * line) { tv_control *tc; info->control_mute = NULL; info->audio_mutable = 0; if (mixer && line) printv ("Attaching mixer %s (%s %s), line %s\n", mixer->node.device, mixer->node.label, mixer->node.driver, line->label); else printv ("Removing mixer\n"); mixer_replace (info, line, TV_CONTROL_ID_VOLUME); mixer_replace (info, line, TV_CONTROL_ID_MUTE); info->control_mute = NULL; info->audio_mutable = FALSE; /* preliminary */ for (tc = info->cloned_controls; tc; tc = tc->_next) if (tc->id == TV_CONTROL_ID_MUTE) { info->control_mute = tc; info->audio_mutable = 1; /* preliminary */ break; } } /* * This function implements a second mute switch closer * to the hardware. The 'quiet' state is not visible to the * mute or volume controls or their callbacks, takes priority * and can only be changed with this function. * * Intention is that only the user changes audio controls, while * this switch is flipped under program control, such as when * switching channels. */ void tv_quiet_set (tveng_device_info * info, tv_bool quiet) { assert (NULL != info); TVLOCK; tv_clear_error (info); if (info->quiet == quiet) { UNTVLOCK; return; } info->quiet = quiet; if (quiet) { tv_control *tc; if ((tc = control_by_id (info, TV_CONTROL_ID_MUTE))) { /* Error ignored */ set_control_audio (info, VC (tc), /* value */ TRUE, /* quiet */ TRUE, /* reset */ FALSE); } else if ((tc = control_by_id (info, TV_CONTROL_ID_VOLUME))) { /* Error ignored */ set_control_audio (info, VC (tc), /* value */ 0, /* quiet */ TRUE, /* reset */ FALSE); } } else { tv_control *tc; tv_bool reset; reset = FALSE; if ((tc = control_by_id (info, TV_CONTROL_ID_MUTE)) || (tc = control_by_id (info, TV_CONTROL_ID_VOLUME))) { /* Error ignored */ set_control_audio (info, VC (tc), tc->value, /* quiet */ FALSE, /* reset */ FALSE); if (VC(tc)->mixer_line) /* uses soundcard mixer */ reset_video_volume (info, /* mute */ FALSE); } } UNTVLOCK; } /* * This is a shortcut to get the mute control state. When @update * is TRUE the control is updated from the driver, otherwise * it returns the last known state. * 1 = muted (no sound), 0 = unmuted, -1 = error */ int tv_mute_get (tveng_device_info * info, tv_bool update) { tv_control *tc; assert (NULL != info); if (TVENG_CONTROLLER_NONE == info->current_controller) return -1; /* XXX TVLOCK;*/ tv_clear_error (info); if ((tc = info->control_mute)) { if (!info->quiet) if (update) if (-1 == tveng_update_control (tc, info)) return -1; return tc->value; } TVLOCK; TVUNSUPPORTED; RETURN_UNTVLOCK (-1); } /* * This is a shortcut to set the mute control state. * 0 = ok, -1 = error. */ int tv_mute_set (tveng_device_info * info, tv_bool mute) { tv_control *tc; int r = -1; assert (NULL != info); if (TVENG_CONTROLLER_NONE == info->current_controller) return -1; TVLOCK; tv_clear_error (info); if ((tc = info->control_mute)) r = set_control (VC(tc), mute, TRUE, info); else TVUNSUPPORTED; RETURN_UNTVLOCK(r); } /* * This is a shortcut to add a callback to the mute control. */ tv_callback * tv_mute_add_callback (tveng_device_info * info, void (* notify)(tveng_device_info *, void *), void (* destroy)(tveng_device_info *, void *), void * user_data) { tv_control *tc; assert (NULL != info); tv_clear_error (info); if (!(tc = info->control_mute)) return NULL; return tv_callback_add (&tc->_callback, (tv_callback_fn *) notify, (tv_callback_fn *) destroy, user_data); } /* * Audio mode */ tv_bool tv_set_audio_mode (tveng_device_info * info, tv_audio_mode mode) { assert (NULL != info); REQUIRE_SUPPORT (info->panel.set_audio_mode, FALSE); tv_clear_error (info); /* XXX check mode within capabilities. */ /* XXX audio mode control TVLOCK; RETURN_UNTVLOCK (info->module.set_audio_mode (info, mode)); */ return info->panel.set_audio_mode (info, mode); } tv_bool tv_audio_update (tveng_device_info * info _unused_) { return FALSE; /* XXX todo*/ } /* capability or reception changes */ tv_callback * tv_add_audio_callback (tveng_device_info * info, void (* notify)(tveng_device_info *, void *), void (* destroy)(tveng_device_info *, void *), void * user_data) { assert (NULL != info); tv_clear_error (info); return tv_callback_add (&info->panel.audio_callback, (tv_callback_fn *) notify, (tv_callback_fn *) destroy, user_data); } /* ----------------------------------------------------------- */ /* Gets the signal strength and the afc code. The afc code indicates how to get a better signal, if negative, tune higher, if negative, tune lower. 0 means no idea or feature not present in the current controller (i.e. V4L1). Strength and/or afc can be NULL pointers, that would mean ignore that parameter. */ tv_bool tv_get_signal_strength (tveng_device_info * info, int * strength, int * afc) { assert (NULL != info); if (TVENG_CONTROLLER_NONE == info->current_controller) return FALSE; if (strength) { /* Default. */ *strength = 0; } else if (!afc) { /* Neither requested, we're done. */ return TRUE; } if (afc) { *afc = 0; } TVLOCK; tv_clear_error (info); if (!info->panel.cur_video_input) RETURN_UNTVLOCK(TRUE); /* Check that there are tuners in the current input */ if (!IS_TUNER_LINE (info->panel.cur_video_input)) RETURN_UNTVLOCK(FALSE); if (info->panel.get_signal_strength) RETURN_UNTVLOCK(info->panel.get_signal_strength(info, strength, afc)); TVUNSUPPORTED; UNTVLOCK; return FALSE; } tv_bool tv_enable_capturing (tveng_device_info * info, tv_bool enable) { assert (NULL != info); if (TVENG_CONTROLLER_NONE == info->current_controller) return FALSE; REQUIRE_IO_MODE (FALSE); TVLOCK; if (!enable && info->capture_mode == CAPTURE_MODE_NONE) { fprintf(stderr, "Warning: trying to stop capture " "with no capture active\n"); RETURN_UNTVLOCK(-1); } tv_clear_error (info); if (info->capture.enable) RETURN_UNTVLOCK(info->capture.enable (info, enable)); TVUNSUPPORTED; UNTVLOCK; return FALSE; } tv_bool tv_set_num_capture_buffers (tveng_device_info * info, unsigned int n_buffers) { assert (NULL != info); if (TVENG_CONTROLLER_NONE == info->current_controller) return FALSE; REQUIRE_IO_MODE (FALSE); TVLOCK; if (info->capture.set_buffers) RETURN_UNTVLOCK(info->capture.set_buffers (info, NULL, n_buffers)); TVUNSUPPORTED; UNTVLOCK; return FALSE; } tv_bool tv_get_num_capture_buffers (tveng_device_info * info, unsigned int * n_buffers) { *n_buffers = info->capture.n_buffers; return TRUE; } int tv_read_frame (tveng_device_info * info, tv_capture_buffer * buffer, const struct timeval * timeout) { assert (NULL != info); if (TVENG_CONTROLLER_NONE == info->current_controller) return -1; REQUIRE_IO_MODE (-1); /* XXX if buffer != NULL check buffer size. */ TVLOCK; tv_clear_error (info); if (info->capture.read_frame) { int r; r = info->capture.read_frame (info, buffer, timeout); RETURN_UNTVLOCK(r); } TVUNSUPPORTED; UNTVLOCK; return -1; } tv_bool tv_queue_capture_buffer (tveng_device_info * info, const tv_capture_buffer *buffer) { tv_capture_buffer *b = /* const_cast */ buffer; assert (NULL != info); if (TVENG_CONTROLLER_NONE == info->current_controller) return FALSE; REQUIRE_IO_MODE (FALSE); TVLOCK; tv_clear_error (info); if (info->capture.queue_buffer) RETURN_UNTVLOCK(info->capture.queue_buffer (info, b)); TVUNSUPPORTED; UNTVLOCK; return FALSE; } const tv_capture_buffer * tv_dequeue_capture_buffer (tveng_device_info * info) { tv_capture_buffer *buffer; struct timeval timeout; int r; assert (NULL != info); if (TVENG_CONTROLLER_NONE == info->current_controller) return NULL; REQUIRE_IO_MODE (NULL); TVLOCK; tv_clear_error (info); if (!info->capture.dequeue_buffer) { TVUNSUPPORTED; UNTVLOCK; return NULL; } timeout.tv_sec = 0; timeout.tv_usec = 0; r = info->capture.dequeue_buffer (info, &buffer, &timeout); RETURN_UNTVLOCK ((1 == r) ? buffer : NULL); } int tv_dequeue_capture_buffer_with_timeout (tveng_device_info * info, const tv_capture_buffer **buffer, struct timeval * timeout) { tv_capture_buffer **b = /* const_cast */ buffer; assert (NULL != info); if (TVENG_CONTROLLER_NONE == info->current_controller) return -1; REQUIRE_IO_MODE (-1); TVLOCK; tv_clear_error (info); if (info->capture.dequeue_buffer) RETURN_UNTVLOCK(info->capture.dequeue_buffer (info, b, timeout)); TVUNSUPPORTED; UNTVLOCK; return -1; } /* Empties all filled but not yet dequeued buffers. */ tv_bool tv_flush_capture_buffers (tveng_device_info * info) { assert (NULL != info); if (TVENG_CONTROLLER_NONE == info->current_controller) return FALSE; REQUIRE_IO_MODE (FALSE); TVLOCK; tv_clear_error (info); if (info->capture.flush_buffers) RETURN_UNTVLOCK(info->capture.flush_buffers (info)); TVUNSUPPORTED; UNTVLOCK; return FALSE; } /* * Overlay */ /* DMA overlay is dangerous, it bypasses kernel memory protection. This function checks if the programmed (dma) and required (dga) overlay targets match. */ static tv_bool verify_overlay_buffer (const tv_overlay_buffer *dga, const tv_overlay_buffer *dma) { unsigned long dga_end; unsigned long dma_end; if (0 == dga->base || dga->format.width < 32 || dga->format.height < 32 /* XXX width * bytes_per_pixel */ || dga->format.bytes_per_line[0] < dga->format.width || dga->format.size < (dga->format.bytes_per_line[0] * dga->format.height)) return FALSE; if (0 == dma->base || dma->format.width < 32 || dma->format.height < 32 /* XXX width * bytes_per_pixel */ || dma->format.bytes_per_line[0] < dma->format.width || dma->format.size < (dma->format.bytes_per_line[0] * dma->format.height)) return FALSE; dga_end = dga->base + dga->format.size; dma_end = dma->base + dma->format.size; if (dma_end < dga->base || dma->base >= dga_end) return FALSE; if (!dga->format.pixel_format || TV_PIXFMT_NONE == dga->format.pixel_format->pixfmt) return FALSE; if (dga->format.bytes_per_line[0] != dma->format.bytes_per_line[0] || dga->format.pixel_format != dma->format.pixel_format) return FALSE; /* Adjust? */ if (dga->base != dma->base || dga->format.width != dma->format.width || dga->format.height != dma->format.height) return FALSE; return TRUE; } const tv_overlay_buffer * tv_cur_overlay_buffer (tveng_device_info * info) { assert (NULL != info); return &info->overlay.buffer; } const tv_overlay_buffer * tv_get_overlay_buffer (tveng_device_info * info) { assert (NULL != info); if (TVENG_CONTROLLER_NONE == info->current_controller) return FALSE; CLEAR (info->overlay.buffer); /* unusable */ REQUIRE_IO_MODE (FALSE); REQUIRE_SUPPORT (info->overlay.get_buffer, FALSE); if (!(info->caps.flags & TVENG_CAPS_OVERLAY)) return FALSE; TVLOCK; tv_clear_error (info); if (info->overlay.get_buffer (info)) RETURN_UNTVLOCK (&info->overlay.buffer); else RETURN_UNTVLOCK (NULL); } static int read_file_from_fd (char * buffer, ssize_t size, int fd) { ssize_t done, actual; assert (size > 1); --size; /* space for NUL */ done = 0; /* Read until EOF. */ /* XXX may block forever. */ while (0 != (actual = read (fd, buffer + done, size - done))) { if (-1 == actual) { if (EINTR != errno) return -1; /* failed */ /* XXX EAGAIN possible? */ } else { done += actual; } } /* Make sure we have a NUL terminated string if this is a text file. */ buffer[done] = 0; return 0; /* success */ } #define ZSFB_NAME "zapping_setup_fb" /* Keep this in sync with zapping_setup_fb.h. */ typedef enum { ZSFB_SUCCESS = EXIT_SUCCESS, ZSFB_FAILURE = EXIT_FAILURE, /* zapping errors. */ ZSFB_FORK_ERROR = 40, ZSFB_EXEC_ENOENT, ZSFB_EXEC_ERROR, ZSFB_IO_ERROR, ZSFB_BAD_BUFFER, /* zapping_setup_fb errors. */ ZSFB_BUG = 60, ZSFB_NO_PERMISSION, ZSFB_NO_SCREEN, ZSFB_INVALID_BPP, ZSFB_BAD_DEVICE_NAME, ZSFB_BAD_DEVICE_FD, ZSFB_UNKNOWN_DEVICE, ZSFB_OPEN_ERROR, ZSFB_IOCTL_ERROR, ZSFB_OVERLAY_IMPOSSIBLE, } zsfb_status; static zsfb_status exec_zapping_setup_fb_argv (tveng_device_info * info, const char ** argv) { int stderr_pipe[2]; pid_t pid; char errmsg[256]; int status; int r; stderr_pipe[0] = -1; stderr_pipe[1] = -1; if (-1 == pipe (stderr_pipe)) { info->tveng_errno = errno; printv ("pipe() error: %s\n", strerror (info->tveng_errno)); goto fork_error; } fflush (stderr); pid = fork (); switch (pid) { case -1: /* error */ info->tveng_errno = errno; printv ("fork() error: %s\n", strerror (info->tveng_errno)); /* Error ignored. */ close (stderr_pipe[1]); close (stderr_pipe[0]); goto fork_error; case 0: /* in child */ { int saved_errno; printv ("Forked.\n"); /* Pipe input is unused in child. Error ignored. */ close (stderr_pipe[0]); stderr_pipe[0] = -1; /* Redirect error message to pipe. */ if (-1 == dup2 (stderr_pipe[1], STDERR_FILENO)) { printv ("dup2() error: %s\n", strerror (errno)); _exit (ZSFB_FORK_ERROR); /* tell parent */ } /* Try in $PATH. Note this might be a consolehelper symlink. Exit status 0 on success, something else on error. */ execvp (argv[0], (char **) argv); /* When execvp returns it failed. */ saved_errno = errno; fputs (strerror (saved_errno), stderr); switch (saved_errno) { case ENOENT: _exit (ZSFB_EXEC_ENOENT); default: _exit (ZSFB_EXEC_ERROR); } assert (0); } default: /* in parent */ break; } /* Pipe output is unused in parent. Error ignored. */ close (stderr_pipe[1]); stderr_pipe[1] = -1; r = read_file_from_fd (errmsg, sizeof (errmsg), stderr_pipe[0]); info->tveng_errno = errno; /* Error ignored. */ close (stderr_pipe[0]); stderr_pipe[0] = -1; if (-1 == r) { printv ("Stderr pipe read error %s\n", strerror (info->tveng_errno)); while (-1 == waitpid (pid, &status, 0) && EINTR == errno) ; goto fork_error; } while (-1 == (r = waitpid (pid, &status, 0)) && EINTR == errno) ; info->tveng_errno = errno; if (-1 == r) { printv ("waitpid() error %s, errmsg %s\n", strerror (info->tveng_errno), errmsg); goto fork_error; } if (!WIFEXITED (status)) { printv ("WIFEXITED() error %s, errmsg %s\n", strerror (info->tveng_errno), errmsg); goto fork_error; } info->tveng_errno = 0; switch ((zsfb_status) WEXITSTATUS (status)) { case ZSFB_SUCCESS: /* zapping_setup_fb success */ break; case ZSFB_FORK_ERROR: tv_error_msg (info, _("Cannot execute %s. Pipe error."), argv[0]); return ZSFB_FORK_ERROR; case ZSFB_EXEC_ERROR: case ZSFB_EXEC_ENOENT: tv_error_msg (info, _("Cannot execute %s. %s."), argv[0], errmsg); return (zsfb_status) WEXITSTATUS (status); case ZSFB_BUG ... ZSFB_OVERLAY_IMPOSSIBLE: printv ("zapping_setup_fb failed with exit status %d\n", (int) WEXITSTATUS (status)); /* TRANSLATORS: Program name, error message. */ tv_error_msg (info, _("%s failed.\n%s"), argv[0], errmsg); return (zsfb_status) WEXITSTATUS (status); default: printv ("zapping_setup_fb failed with exit status %d\n", (int) WEXITSTATUS (status)); /* Something executed, but it wasn't zapping_setup_fb. Perhaps consolehelper couldn't authenticate the user? */ tv_error_msg (info, _("Cannot execute %s. " "No permission?"), argv[0]); return (zsfb_status) WEXITSTATUS (status); } return ZSFB_SUCCESS; fork_error: tv_error_msg (info, _("Cannot execute %s. %s."), argv[0], strerror (info->tveng_errno)); return ZSFB_FORK_ERROR; } static zsfb_status exec_zapping_setup_fb (tveng_device_info * info, const char * executable_name, const char * display_name, int screen_number, const tv_overlay_buffer *target) { const char *argv[20]; char buf[3][16]; unsigned int argc; unsigned int i; int old_flags; zsfb_status status; argc = 0; argv[argc++] = executable_name; argv[argc++] = "-c"; /* enable UTF-8 error messages */ /* Just in case. XXX error ignored. */ old_flags = fcntl (info->fd, F_GETFD, 0); if (-1 != old_flags && (old_flags & FD_CLOEXEC)) { old_flags &= ~FD_CLOEXEC; /* XXX error ignored. */ fcntl (info->fd, F_SETFD, old_flags); } snprintf (buf[0], sizeof (buf[0]), "%d", info->fd); argv[argc++] = "-f"; argv[argc++] = buf[0]; if (NULL != display_name) { argv[argc++] = "-D"; argv[argc++] = display_name; } if (screen_number >= 0) { snprintf (buf[1], sizeof (buf[1]), "%d", screen_number); argv[argc++] = "-S"; argv[argc++] = buf[1]; } if (-1 != info->bpp) { snprintf (buf[2], sizeof (buf[2]), "%d", info->bpp); argv[argc++] = "-b"; argv[argc++] = buf[2]; } argv[argc] = NULL; assert (argc <= N_ELEMENTS (argv)); printv ("Running "); for (i = 0; i < argc; ++i) printv ("'%s' ", argv[i]); printv ("\n"); status = exec_zapping_setup_fb_argv (info, argv); if (ZSFB_BAD_DEVICE_FD == status) { gboolean dummy; if (NULL == info->file_name) return status; argv[2] = "-d"; argv[3] = info->file_name; /* XXX this is unnecessary with V4L2. We should just temporarily switch to a panel mode. */ p_tveng_stop_everything (info, &dummy); device_close (info->log_fp, info->fd); info->fd = -1; printv ("Running "); for (i = 0; i < argc; ++i) printv ("'%s' ", argv[i]); printv ("\n"); status = exec_zapping_setup_fb_argv (info, argv); /* XXX what if this doesn't succeed? */ info->fd = device_open (info->log_fp, info->file_name, O_RDWR, 0); assert (-1 != info->fd); } if (ZSFB_SUCCESS == status) { if (!info->overlay.get_buffer (info)) { tv_error_msg (info, _("Cannot determine current " "overlay parameters. %s"), strerror (info->tveng_errno)); return ZSFB_IO_ERROR; } if (!verify_overlay_buffer (target, &info->overlay.buffer)) { /* TRANSLATORS: Program name. */ tv_error_msg (info, _("%s did not work as expected."), argv[0]); return ZSFB_BAD_BUFFER; } } return status; } /** * This function sets the overlay buffer, where images will be stored. * When this operation is privileged we run the zapping_setup_fb * helper application and pass display_name and screen_number as * parameters. If display_name is NULL it will default * to the DISPLAY environment variable. screen_number is intended to * choose a Xinerama screen, can be -1 to get the default. */ tv_bool tv_set_overlay_buffer (tveng_device_info * info, const char * display_name, int screen_number, const tv_overlay_buffer *target) { zsfb_status status1; zsfb_status status2; assert (NULL != info); printv ("tv_set_overlay_buffer()\n"); if (TVENG_CONTROLLER_NONE == info->current_controller) return FALSE; assert (NULL != target); tv_clear_error (info); REQUIRE_IO_MODE (FALSE); REQUIRE_SUPPORT (info->overlay.get_buffer, FALSE); TVLOCK; tv_clear_error (info); info->using_xvideo = FALSE; /* We can save a lot of work if the driver is already initialized for this target. */ if (info->overlay.get_buffer (info) && verify_overlay_buffer (target, &info->overlay.buffer)) RETURN_UNTVLOCK (TRUE); /* We can still save a lot of work if the driver supports set_overlay directly and this app has the required privileges. */ if (info->overlay.set_buffer) { if (info->overlay.set_buffer (info, target)) { RETURN_UNTVLOCK (verify_overlay_buffer (target, &info->overlay.buffer)); } if (EPERM != errno) { RETURN_UNTVLOCK (FALSE); } } /* Delegate to suid root ZSFB_NAME helper program. */ status1 = exec_zapping_setup_fb (info, PACKAGE_ZSFB_DIR "/" ZSFB_NAME, display_name, screen_number, target); switch (status1) { case ZSFB_SUCCESS: break; case ZSFB_FORK_ERROR: case ZSFB_BUG: case ZSFB_NO_SCREEN: case ZSFB_INVALID_BPP: case ZSFB_UNKNOWN_DEVICE: case ZSFB_OPEN_ERROR: case ZSFB_IOCTL_ERROR: case ZSFB_OVERLAY_IMPOSSIBLE: /* Hopeless. */ goto failure; default: /* Let's try in $PATH. Note this may be a consolehelper symlink. */ status2 = exec_zapping_setup_fb (info, ZSFB_NAME, display_name, screen_number, target); switch (status2) { case ZSFB_SUCCESS: break; case ZSFB_EXEC_ENOENT: if (ZSFB_EXEC_ENOENT == status1) { tv_error_msg (info, _("%s not found in %s or the " "executable search path."), ZSFB_NAME, PACKAGE_ZSFB_DIR); } /* fall through */ default: goto failure; } } printv ("tv_set_overlay_buffer() ok\n"); RETURN_UNTVLOCK (TRUE); failure: printv ("tv_set_overlay_buffer() failed\n"); RETURN_UNTVLOCK (FALSE); } static tv_bool overlay_window_visible (const tveng_device_info *info, const tv_window * w) { if (unlikely (w->x > (int)(info->overlay.buffer.x + info->overlay.buffer.format.width))) return FALSE; if (unlikely ((int)(w->x + w->width) <= (int) info->overlay.buffer.x)) return FALSE; if (unlikely (w->y > (int)(info->overlay.buffer.y + info->overlay.buffer.format.height))) return FALSE; if (unlikely ((int)(w->y + w->height) <= (int) info->overlay.buffer.y)) return FALSE; return TRUE; } const tv_window * tv_cur_overlay_window (tveng_device_info * info) { assert (NULL != info); return &info->overlay.window; } const tv_window * tv_get_overlay_window (tveng_device_info * info) { assert (NULL != info); if (TVENG_CONTROLLER_NONE == info->current_controller) return NULL; REQUIRE_IO_MODE (NULL); TVLOCK; tv_clear_error (info); if (info->current_controller != TVENG_CONTROLLER_XV && !overlay_window_visible (info, &info->overlay.window)) RETURN_UNTVLOCK (&info->overlay.window); if (info->overlay.get_window) { if (info->overlay.get_window (info)) RETURN_UNTVLOCK (&info->overlay.window); else RETURN_UNTVLOCK (NULL); } TVUNSUPPORTED; UNTVLOCK; return NULL; } const tv_clip_vector * tv_cur_overlay_clipvec (tveng_device_info * info) { assert (NULL != info); return &info->overlay.clip_vector; } static void init_overlay_window (tveng_device_info * info, tv_window * w) { if (info->dword_align) { tv_pixfmt pixfmt; pixfmt = info->overlay.buffer.format.pixel_format->pixfmt; round_boundary_4 (&w->x, &w->width, pixfmt, info->caps.maxwidth); } w->width = SATURATE (w->width, info->caps.minwidth, info->caps.maxwidth); w->height = SATURATE (w->height, info->caps.minheight, info->caps.maxheight); if (0) { fprintf (stderr, "buffer %u, %u - %u, %u\n" "window %d, %d - %d, %d (%u x %u)\n", info->overlay.buffer.x, info->overlay.buffer.y, info->overlay.buffer.x + info->overlay.buffer.format.width, info->overlay.buffer.y + info->overlay.buffer.format.height, w->x, w->y, w->x + w->width, w->y + w->height, w->width, w->height); } } /* Be VERY careful here. The bktr driver lets any application which has access permission DMA video data to any memory address, and barely checks the parameters. */ static tv_bool add_boundary_clips (tveng_device_info * info, tv_clip_vector * vec, const tv_window * win) { int bx2; int by2; if (unlikely (win->x < (int) info->overlay.buffer.x)) { unsigned int obscured_width = info->overlay.buffer.x - win->x; if (!tv_clip_vector_add_clip_xy (vec, 0, 0, obscured_width, win->height)) return FALSE; } bx2 = info->overlay.buffer.x + info->overlay.buffer.format.width; if (unlikely ((win->x + (int) win->width) > bx2)) { unsigned int visible_width = bx2 - win->x; if (!tv_clip_vector_add_clip_xy (vec, visible_width, 0, win->width, win->height)) return FALSE; } if (unlikely (win->y < (int) info->overlay.buffer.y)) { unsigned int obscured_height = info->overlay.buffer.y - win->y; if (!tv_clip_vector_add_clip_xy (vec, 0, 0, win->width, obscured_height)) return FALSE; } by2 = info->overlay.buffer.y + info->overlay.buffer.format.height; if (unlikely ((win->y + (int) win->height) > by2)) { unsigned int visible_height = by2 - win->y; if (!tv_clip_vector_add_clip_xy (vec, 0, visible_height, win->width, win->height)) return FALSE; } return TRUE; } static void verify_clip_vector (tv_clip_vector * vec, tv_window * win) { const tv_clip *clip; const tv_clip *end; /* Make sure clips are within bounds and in proper order. */ if (0 == vec->size) return; clip = vec->vector; if (vec->size > 1) { end = vec->vector + vec->size - 1; for (; clip < end; ++clip) { assert (clip->x1 < clip->x2); assert (clip->y1 < clip->y2); assert (clip->x2 <= win->width); assert (clip->y2 <= win->height); if (clip->y1 == clip[1].y1) { assert (clip->y2 == clip[1].y2); assert (clip->x2 <= clip[1].x1); } else { assert (clip->y2 <= clip[1].y2); } } } assert (clip->x1 < clip->x2); assert (clip->y1 < clip->y2); assert (clip->x2 <= win->width); assert (clip->y2 <= win->height); } static const tv_window * p_tv_set_overlay_window (tveng_device_info * info, const tv_window * window, const tv_clip_vector * clip_vector) { tv_window win; tv_clip_vector new_vec; tv_clip_vector safe_vec; if (TVENG_CONTROLLER_NONE == info->current_controller) return NULL; REQUIRE_IO_MODE (NULL); REQUIRE_SUPPORT (info->overlay.set_window, NULL); info->using_xvideo = FALSE; win = *window; init_overlay_window (info, &win); if (!overlay_window_visible (info, &win)) { if (info->overlay.active) if (!p_tv_enable_overlay (info, FALSE)) goto failure; info->overlay.window = win; return &info->overlay.window; /* nothing to do */ } if (NULL != clip_vector) { if (!tv_clip_vector_copy (&new_vec, clip_vector)) return NULL; if (!tv_clip_vector_copy (&safe_vec, clip_vector)) { tv_clip_vector_destroy (&new_vec); return NULL; } } else { tv_clip_vector_init (&new_vec); tv_clip_vector_init (&safe_vec); } /* Make sure we clip against overlay buffer bounds. */ if (!add_boundary_clips (info, &safe_vec, &win)) goto failure; verify_clip_vector (&safe_vec, &win); if (0) _tv_clip_vector_dump (&safe_vec, stderr); if (info->overlay.active) if (!p_tv_enable_overlay (info, FALSE)) goto failure; if (!info->overlay.set_window (info, &win, &safe_vec, info->overlay.chromakey)) goto failure; tv_clip_vector_destroy (&safe_vec); tv_clip_vector_destroy (&info->overlay.clip_vector); info->overlay.clip_vector = new_vec; return &info->overlay.window; failure: tv_clip_vector_destroy (&safe_vec); tv_clip_vector_destroy (&new_vec); return NULL; } /** * info: Device we are controlling * window: The area you want to overlay, with coordinates relative to * the current overlay buffer. * clip_vector: Invisible regions of the window (where it is obscured by * other windows etc) with coordinates relative to window->x, y. No clips * are required for regions outside the overlay buffer. clip_vector can * be NULL. * * Sets the overlay window dimensions and clips. * * Returns NULL on error, a pointer to the actual overlay window on * success. It may differ from the requested dimensions due to hardware * limitations and other reasons. Should be verified before enabling * overlay. */ const tv_window * tv_set_overlay_window_clipvec (tveng_device_info * info, const tv_window * window, const tv_clip_vector * clip_vector) { assert (NULL != info); if (TVENG_CONTROLLER_NONE == info->current_controller) return NULL; REQUIRE_IO_MODE (NULL); TVLOCK; tv_clear_error (info); RETURN_UNTVLOCK (p_tv_set_overlay_window (info, window, clip_vector)); } tv_bool tv_cur_overlay_chromakey (tveng_device_info * info, unsigned int * chromakey) { assert (NULL != info); assert (NULL != chromakey); *chromakey = info->overlay.chromakey; return TRUE; } tv_bool tv_get_overlay_chromakey (tveng_device_info * info, unsigned int * chromakey) { assert (NULL != info); if (TVENG_CONTROLLER_NONE == info->current_controller) return FALSE; REQUIRE_IO_MODE (FALSE); REQUIRE_SUPPORT (info->overlay.get_window, FALSE); TVLOCK; tv_clear_error (info); if (!info->overlay.get_window (info)) RETURN_UNTVLOCK (FALSE); if (chromakey) *chromakey = info->overlay.chromakey; RETURN_UNTVLOCK (TRUE); } /** * info: Device we are controlling * window: The area you want to overlay, with coordinates relative to * the current overlay buffer. * chromakey: The device shall display video where overlay buffer pixels * have this color (0xRRGGBB). * * Sets the overlay window dimensions and chromakey. * * Returns NULL on error, a pointer to the actual overlay window on * success. It may differ from the requested dimensions due to hardware * limitations and other reasons. Should be verified before enabling * overlay. */ const tv_window * tv_set_overlay_window_chromakey (tveng_device_info * info, const tv_window * window, unsigned int chromakey) { tv_window win; tv_clip_vector safe_vec; assert (NULL != info); if (TVENG_CONTROLLER_NONE == info->current_controller) return NULL; REQUIRE_IO_MODE (NULL); REQUIRE_SUPPORT (info->overlay.set_window, NULL); TVLOCK; info->using_xvideo = FALSE; tv_clear_error (info); win = *window; init_overlay_window (info, &win); if (!overlay_window_visible (info, &win)) { if (info->overlay.active) if (!p_tv_enable_overlay (info, FALSE)) goto failure; info->overlay.window = win; RETURN_UNTVLOCK (&info->overlay.window); /* nothing to do */ } /* Calculate boundary clips in case the driver DMAs instead of chromakeys the image. */ tv_clip_vector_init (&safe_vec); if (!add_boundary_clips (info, &safe_vec, &win)) goto failure2; if (0) { fprintf (stderr, "win.x=%d y=%d width=%u height=%u\n", win.x, win.y, win.width, win.height); } verify_clip_vector (&safe_vec, &win); if (0) _tv_clip_vector_dump (&safe_vec, stderr); if (info->overlay.active) if (!p_tv_enable_overlay (info, FALSE)) goto failure2; if (!info->overlay.set_window (info, &win, &safe_vec, chromakey)) goto failure2; tv_clip_vector_destroy (&safe_vec); RETURN_UNTVLOCK (&info->overlay.window); failure2: tv_clip_vector_destroy (&safe_vec); failure: RETURN_UNTVLOCK (NULL); } /** * info: Device we are controlling (XVideo only). * window: Place the video in this window. * gc: Use this graphics context. * chromakey: The device, if it works that way, shall display video where * window pixels have this color (0xRRGGBB). * * Selects the window for XVideo PutVideo(). The video dimension will be * the same as the window dimensions. * * Returns FALSE on error. XXX hardware limitations? zoom? */ tv_bool tv_set_overlay_xwindow (tveng_device_info * info, Window window, GC gc, unsigned int chromakey) { tv_bool success; assert (NULL != info); assert (0 != window); assert (0 != gc); REQUIRE_IO_MODE (FALSE); REQUIRE_SUPPORT (info->overlay.set_xwindow, FALSE); TVLOCK; tv_clear_error (info); success = info->overlay.set_xwindow (info, window, gc, chromakey); info->using_xvideo = success; RETURN_UNTVLOCK (success); } tv_bool p_tv_enable_overlay (tveng_device_info * info, tv_bool enable) { assert (NULL != info); if (TVENG_CONTROLLER_NONE == info->current_controller) return FALSE; REQUIRE_IO_MODE (FALSE); REQUIRE_SUPPORT (info->overlay.enable, FALSE); enable = !!enable; if (!info->using_xvideo && !overlay_window_visible (info, &info->overlay.window)) { info->overlay.active = enable; return TRUE; } if (enable && !info->using_xvideo) { tv_screen *xs; if (!info->overlay.get_buffer) { support_failure (info, __PRETTY_FUNCTION__); return FALSE; } /* Safety: current target must match some screen. */ if (!info->overlay.get_buffer (info)) return FALSE; for (xs = screens; xs; xs = xs->next) if (verify_overlay_buffer (&xs->target, &info->overlay.buffer)) break; if (!xs) { fprintf (stderr, "** %s: Cannot start overlay, " "DMA target is not properly initialized.\n", __PRETTY_FUNCTION__); return FALSE; } /* XXX should also check if a previous tveng_set_preview_window () failed. */ } if (!info->overlay.enable (info, enable)) return FALSE; info->overlay.active = enable; return TRUE; } tv_bool tv_enable_overlay (tveng_device_info * info, tv_bool enable) { assert (NULL != info); TVLOCK; tv_clear_error (info); RETURN_UNTVLOCK (p_tv_enable_overlay (info, enable)); } int p_tveng_get_display_depth(tveng_device_info * info) { /* This routines are taken form xawtv, i don't understand them very well, but they seem to work OK */ XVisualInfo * visual_info, template; XPixmapFormatValues * pf; Display * dpy = info->display; int found, v, i, n; int bpp = 0; if (info->bpp != -1) return info->bpp; /* Use the first screen, should give no problems assuming this */ template.screen = 0; visual_info = XGetVisualInfo(dpy, VisualScreenMask, &template, &found); v = -1; for (i = 0; v == -1 && i < found; i++) if (visual_info[i].class == TrueColor && visual_info[i].depth >= 15) v = i; if (v == -1) { info -> tveng_errno = -1; tv_error_msg(info,"Cannot find an appropiate visual"); XFree(visual_info); return 0; } /* get depth + bpp (heuristic) */ pf = XListPixmapFormats(dpy, &n); for (i = 0; i < n; i++) { if (pf[i].depth == visual_info[v].depth) { if (visual_info[v].depth == 15) bpp = 15; /* here bits_per_pixel is 16, but the depth is 15 */ else bpp = pf[i].bits_per_pixel; break; } } if (bpp == 0) { info -> tveng_errno = -1; tv_error_msg(info, "Cannot figure out X depth"); XFree(visual_info); XFree(pf); return 0; } XFree(visual_info); XFree(pf); return bpp; } /* This is a convenience function, it returns the real screen depth in BPP (bits per pixel). This one is quite important for 24 and 32 bit modes, since the default X visual may be 24 bit and the real screen depth 32, thus an expensive RGB -> RGBA conversion must be performed for each frame. display: the display we want to know its real depth (can be accessed through gdk_private->display) */ int tveng_get_display_depth(tveng_device_info * info) { int bpp; TVLOCK; tv_clear_error (info); bpp = p_tveng_get_display_depth (info); UNTVLOCK; return bpp; } /* Adjusts the verbosity value passed to zapping_setup_fb, cannot fail */ void tveng_set_zapping_setup_fb_verbosity(int level, tveng_device_info * info) { assert (NULL != info); if (level > 2) level = 2; else if (level < 0) level = 0; info->zapping_setup_fb_verbosity = level; } /* Sets the dword align flag */ void tveng_set_dword_align(int dword_align, tveng_device_info *info) { info->dword_align = dword_align; } /* Returns the current verbosity value passed to zapping_setup_fb */ int tveng_get_zapping_setup_fb_verbosity(tveng_device_info * info) { return (info->zapping_setup_fb_verbosity); } capture_mode p_tveng_stop_everything (tveng_device_info * info, gboolean * overlay_was_active) { capture_mode returned_mode; returned_mode = info->capture_mode; switch (info->capture_mode) { case CAPTURE_MODE_READ: *overlay_was_active = FALSE; if (info->capture.enable) info->capture.enable (info, FALSE); assert (CAPTURE_MODE_NONE == info->capture_mode); break; case CAPTURE_MODE_OVERLAY: *overlay_was_active = info->overlay.active; /* No error checking */ if (info->overlay.active) p_tv_enable_overlay (info, FALSE); info -> capture_mode = CAPTURE_MODE_NONE; break; case CAPTURE_MODE_TELETEXT: /* nothing */ break; default: assert (CAPTURE_MODE_NONE == info->capture_mode); break; }; return returned_mode; } /* tveng INTERNAL function, stops the capture or the previewing. Returns the mode the device was before stopping. For stopping and restarting the device do: capture_mode cur_mode; cur_mode = tveng_stop_everything(info); ... do some stuff ... if (tveng_restart_everything(cur_mode, info) == -1) ... show error dialog ... */ capture_mode tveng_stop_everything (tveng_device_info * info, gboolean *overlay_was_active) { capture_mode returned_mode; assert (NULL != info); TVLOCK; tv_clear_error (info); returned_mode = p_tveng_stop_everything (info, overlay_was_active); UNTVLOCK; return returned_mode; } /* FIXME overlay_was_active = info->overlay_active because mode can be _PREVIEW or _WINDOW without overlay_active due to delay timer. Don't reactivate prematurely. */ int p_tveng_restart_everything (capture_mode mode, gboolean overlay_was_active, tveng_device_info * info) { switch (mode) { case CAPTURE_MODE_READ: /* XXX REQUIRE_IO_MODE (-1); */ if (info->capture.enable) if (!info->capture.enable (info, TRUE)) return -1; break; case CAPTURE_MODE_OVERLAY: if (info->capture_mode != mode) { gboolean dummy; p_tveng_stop_everything(info, &dummy); if (overlay_was_active) { p_tv_set_overlay_window (info, &info->overlay.window, &info->overlay.clip_vector); if (!p_tv_enable_overlay (info, TRUE)) return (-1); } info->capture_mode = mode; } break; case CAPTURE_MODE_TELETEXT: info->capture_mode = mode; break; default: break; } overlay_was_active = FALSE; return 0; /* Success */ } /* Restarts the given capture mode. See the comments on tveng_stop_everything. Returns -1 on error. */ int tveng_restart_everything (capture_mode mode, gboolean overlay_was_active, tveng_device_info * info) { assert (NULL != info); TVLOCK; tv_clear_error (info); RETURN_UNTVLOCK (p_tveng_restart_everything (mode, overlay_was_active, info)); } int tveng_get_debug_level(tveng_device_info * info) { assert (NULL != info); return (info->debug_level); } void tveng_set_debug_level(int level, tveng_device_info * info) { assert (NULL != info); info->debug_level = level; } void tveng_set_xv_support(int disabled, tveng_device_info * info) { assert (NULL != info); info->disable_xv_video = disabled; } int tveng_ov511_get_button_state (tveng_device_info *info) { if (!info) return -1; /* assert (NULL != info); */ if (info->current_controller == TVENG_CONTROLLER_NONE) return -1; TVLOCK; tv_clear_error (info); if (info->module.ov511_get_button_state) RETURN_UNTVLOCK(info->module.ov511_get_button_state(info)); TVUNSUPPORTED; UNTVLOCK; return -1; } void tveng_mutex_lock(tveng_device_info * info) { TVLOCK; } void tveng_mutex_unlock(tveng_device_info * info) { UNTVLOCK; } struct _tv_callback { tv_callback * next; tv_callback ** prev_next; tv_callback_fn * notify; tv_callback_fn * destroy; void * user_data; unsigned int blocked; }; /* * Traverse a callback list and call all notify functions, * usually on some event. Only tveng calls this. */ void tv_callback_notify (tveng_device_info * info, void * object, const tv_callback * list) { const tv_callback *cb; assert (NULL != object); if (info) ++info->callback_recursion; for (cb = list; cb; cb = cb->next) if (cb->notify && cb->blocked == 0) /* XXX needs ref counter? */ cb->notify (object, cb->user_data); if (info) --info->callback_recursion; } /* * Device nodes */ tv_device_node * tv_device_node_add (tv_device_node ** list, tv_device_node * node) { assert (NULL != list); if (!node) return NULL; while (*list) list = &(*list)->next; *list = node; node->next = NULL; return node; } tv_device_node * tv_device_node_remove (tv_device_node ** list, tv_device_node * node) { if (node) { while (*list && *list != node) list = &(*list)->next; *list = node->next; node->next = NULL; } return node; } void tv_device_node_delete (tv_device_node ** list, tv_device_node * node, tv_bool restore) { if (node) { if (list) { while (*list && *list != node) list = &(*list)->next; *list = node->next; } if (node->destroy) node->destroy (node, restore); } } static void destroy_device_node (tv_device_node * node, tv_bool restore _unused_) { if (!node) return; free ((char *) node->label); free ((char *) node->bus); free ((char *) node->driver); free ((char *) node->version); free ((char *) node->device); free (node); } tv_device_node * tv_device_node_new (const char * label, const char * bus, const char * driver, const char * version, const char * device, unsigned int size) { tv_device_node *node; if (!(node = calloc (1, MAX (size, sizeof (*node))))) return NULL; node->destroy = destroy_device_node; #define STR_COPY(s) if (s && !(node->s = strdup (s))) goto error; STR_COPY (label); STR_COPY (bus); STR_COPY (driver); STR_COPY (version); STR_COPY (device); return node; error: destroy_device_node (node, FALSE); return NULL; } tv_device_node * tv_device_node_find (tv_device_node * list, const char * name) { struct stat st; if (-1 == stat (name, &st)) return FALSE; for (; list; list = list->next) { struct stat lst; if (0 == strcmp (list->device, name)) return list; if (-1 == stat (list->device, &lst)) continue; if ((S_ISCHR (lst.st_mode) && S_ISCHR (st.st_mode)) || (S_ISBLK (lst.st_mode) && S_ISBLK (st.st_mode))) { /* Major and minor device number */ if (lst.st_rdev == st.st_rdev) return list; } } return NULL; } #if 0 tv_device_node *head = NULL; struct dirent dirent, *pdirent = &dirent; DIR *dir = NULL; t_assert (NULL != filter); if (!list) list = &head; for (; names && *names && names[0][0]; names++) { tv_device_node *node; if (find_node (*list, *names)) continue; if ((node = filter (*names))) tv_device_node_append (list, node); } if (path && (dir = opendir (path))) { while (0 == readdir_r (dir, &dirent, &pdirent) && pdirent) { tv_device_node *node; char *s; if (!(s = malloc (strlen (path) + strlen (dirent.d_name) + 2))) continue; strcpy (s, path); if (s[0]) strcat (s, "/"); strcat (s, dirent.d_name); if (find_node (*list, s)) continue; if ((node = filter (s))) tv_device_node_append (list, node); } closedir (dir); } return *list; #endif #define ADD_NODE_CALLBACK_FUNC(item) \ tv_callback * \ tv_add_##item##_callback (tveng_device_info * info, \ void (* notify) \ (tveng_device_info *, void *), \ void (* destroy) \ (tveng_device_info *, void *), \ void * user_data) \ { \ assert (NULL != info); \ \ return tv_callback_add (&info->panel.item##_callback, \ (tv_callback_fn *) notify, \ (tv_callback_fn *) destroy, \ user_data); \ } ADD_NODE_CALLBACK_FUNC (video_input); ADD_NODE_CALLBACK_FUNC (audio_input); ADD_NODE_CALLBACK_FUNC (video_standard); /* Helper function for backends. Yes, it's inadequate, but that's how some drivers work. Note the depth 32 exception. */ tv_pixfmt pig_depth_to_pixfmt (unsigned int depth) { switch (Z_BYTE_ORDER) { case Z_LITTLE_ENDIAN: switch (depth) { case 15: return TV_PIXFMT_BGRA16_LE; case 16: return TV_PIXFMT_BGR16_LE; case 24: return TV_PIXFMT_BGR24_LE; case 32: return TV_PIXFMT_BGRA32_LE; } break; case Z_BIG_ENDIAN: switch (depth) { case 15: return TV_PIXFMT_BGRA16_BE; case 16: return TV_PIXFMT_BGR16_BE; case 24: return TV_PIXFMT_BGR24_BE; case 32: return TV_PIXFMT_BGRA32_BE; } break; } return TV_PIXFMT_UNKNOWN; } const char * tv_videostd_name (tv_videostd videostd) { switch (videostd) { case TV_VIDEOSTD_PAL_B: return "PAL_B"; case TV_VIDEOSTD_PAL_B1: return "PAL_B1"; case TV_VIDEOSTD_PAL_G: return "PAL_G"; case TV_VIDEOSTD_PAL_H: return "PAL_H"; case TV_VIDEOSTD_PAL_I: return "PAL_I"; case TV_VIDEOSTD_PAL_D: return "PAL_D"; case TV_VIDEOSTD_PAL_D1: return "PAL_D1"; case TV_VIDEOSTD_PAL_K: return "PAL_K"; case TV_VIDEOSTD_PAL_M: return "PAL_M"; case TV_VIDEOSTD_PAL_N: return "PAL_N"; case TV_VIDEOSTD_PAL_NC: return "PAL_NC"; case TV_VIDEOSTD_NTSC_M: return "NTSC_M"; case TV_VIDEOSTD_NTSC_M_JP: return "NTSC_M_JP"; case TV_VIDEOSTD_SECAM_B: return "SECAM_B"; case TV_VIDEOSTD_SECAM_D: return "SECAM_D"; case TV_VIDEOSTD_SECAM_G: return "SECAM_G"; case TV_VIDEOSTD_SECAM_H: return "SECAM_H"; case TV_VIDEOSTD_SECAM_K: return "SECAM_K"; case TV_VIDEOSTD_SECAM_K1: return "SECAM_K1"; case TV_VIDEOSTD_SECAM_L: return "SECAM_L"; case TV_VIDEOSTD_CUSTOM_BEGIN: case TV_VIDEOSTD_CUSTOM_END: break; /* No default, gcc warns. */ } return NULL; } /* * Helper functions */ #define FREE_NODE(p) \ do { \ if (p->label) \ free (p->label); \ \ /* CLEAR (*p); */ \ \ free (p); \ } while (0) #define FREE_NODE_FUNC(kind) \ void \ free_##kind (tv_##kind * p) \ { \ tv_callback_delete_all (p->_callback, 0, 0, 0, p); \ \ FREE_NODE (p); \ } #define FREE_LIST(kind) \ do { \ tv_##kind *p; \ \ while ((p = *list)) { \ *list = p->_next; \ free_##kind (p); \ } \ } while (0) #define FREE_LIST_FUNC(kind) \ void \ free_##kind##_list (tv_##kind ** list) \ { \ FREE_LIST (kind); \ } #define STORE_CURRENT(item, kind, p) \ do { \ if (info->panel.cur_##item != p) { \ info->panel.cur_##item = (tv_##kind *) p; \ tv_callback_notify (info, info, \ info->panel.item##_callback); \ } \ } while (0) #define FREE_ITEM_FUNC(item, kind) \ void \ free_##item##s (tveng_device_info * info) \ { \ STORE_CURRENT (item, kind, NULL); /* unknown */ \ \ free_##kind##_list (&info->panel.item##s); \ } #define ALLOC_NODE(p, size, _label, _hash) \ do { \ assert (size >= sizeof (*p)); \ if (!(p = calloc (1, size))) \ return NULL; \ \ assert (_label != NULL); \ if (!(p->label = strdup (_label))) { \ free (p); \ return NULL; \ } \ \ p->hash = _hash; \ } while (0) static void hash_warning (const char * label1, const char * label2, unsigned int hash) { fprintf (stderr, "WARNING: TVENG: Hash collision between %s and %s (0x%x)\n" "please send a bug report the maintainer!\n", label1, label2, hash); } #define STORE_CURRENT_FUNC(item, kind) \ void \ store_cur_##item (tveng_device_info * info, \ tv_##kind * p) \ { \ \ assert (NULL != info); \ assert (NULL != p); \ \ STORE_CURRENT (item, kind, p); \ } #define APPEND_NODE(list, p) \ do { \ while (*list) { \ if ((*list)->hash == p->hash) \ hash_warning ((*list)->label, \ p->label, p->hash); \ list = &(*list)->_next; \ } \ \ *list = p; \ } while (0) void free_control_list (tv_control ** list) { tv_control *p; while ((p = *list)) { *list = p->_next; tv_control_delete (p); } } void free_panel_controls (tveng_device_info * info) { free_control_list (&info->panel.controls); } tv_control * append_panel_control (tveng_device_info * info, tv_control * tc, unsigned int size) { tv_control **list; for (list = &info->panel.controls; *list; list = &(*list)->_next) ; if (size > 0) { assert (size >= sizeof (**list)); *list = malloc (size); if (!*list) { info->tveng_errno = errno; t_error ("malloc", info); return NULL; } memcpy (*list, tc, size); tc = *list; } else { *list = tc; } tc->_next = NULL; tc->_parent = info; return tc; } static tv_bool add_menu_item (tv_control * tc, const char * item) { char **new_menu; char *s; if (!(s = strdup (item))) return FALSE; new_menu = realloc (tc->menu, sizeof (*tc->menu) * (tc->maximum + 3)); if (!new_menu) { free (s); return FALSE; } tc->menu = new_menu; new_menu[tc->maximum + 1] = s; new_menu[tc->maximum + 2] = NULL; ++tc->maximum; return TRUE; } struct amtc { tv_control pub; tv_audio_capability cap; }; /* Preliminary. */ tv_control * append_audio_mode_control (tveng_device_info * info, tv_audio_capability cap) { struct amtc *amtc; if (!(amtc = calloc (1, sizeof (*amtc)))) return NULL; amtc->pub.type = TV_CONTROL_TYPE_CHOICE; amtc->pub.id = TV_CONTROL_ID_AUDIO_MODE; if (!(amtc->pub.label = strdup (_("Audio")))) { tv_control_delete (&amtc->pub); return NULL; } amtc->cap = cap; amtc->pub.maximum = -1; amtc->pub.step = 1; if (cap & TV_AUDIO_CAPABILITY_AUTO) { if (!add_menu_item (&amtc->pub, N_("Automatic"))) { tv_control_delete (&amtc->pub); return NULL; } } if (cap & TV_AUDIO_CAPABILITY_MONO) { if (!add_menu_item (&amtc->pub, N_("Mono"))) { tv_control_delete (&amtc->pub); return NULL; } } if (cap & TV_AUDIO_CAPABILITY_STEREO) { if (!add_menu_item (&amtc->pub, N_("Stereo"))) { tv_control_delete (&amtc->pub); return NULL; } } if (cap & (TV_AUDIO_CAPABILITY_SAP | TV_AUDIO_CAPABILITY_BILINGUAL)) { if (!add_menu_item (&amtc->pub, N_("Language 2"))) { tv_control_delete (&amtc->pub); return NULL; } } append_panel_control (info, &amtc->pub, 0); return &amtc->pub; } tv_bool set_audio_mode_control (tveng_device_info * info, tv_control * control, int value) { struct amtc *amtc = PARENT (control, struct amtc, pub); assert (TV_CONTROL_TYPE_CHOICE == control->type && TV_CONTROL_ID_AUDIO_MODE == control->id); control->value = value; if (amtc->cap & TV_AUDIO_CAPABILITY_AUTO) { if (value-- <= 0) return tv_set_audio_mode (info, TV_AUDIO_MODE_AUTO); } if (amtc->cap & TV_AUDIO_CAPABILITY_MONO) { if (value-- <= 0) return tv_set_audio_mode (info, TV_AUDIO_MODE_LANG1_MONO); } if (amtc->cap & TV_AUDIO_CAPABILITY_STEREO) { if (value-- <= 0) return tv_set_audio_mode (info, TV_AUDIO_MODE_LANG1_STEREO); } if (amtc->cap & (TV_AUDIO_CAPABILITY_SAP | TV_AUDIO_CAPABILITY_BILINGUAL)) { if (value-- <= 0) return tv_set_audio_mode (info, TV_AUDIO_MODE_LANG2_MONO); } return FALSE; } FREE_NODE_FUNC (video_standard); FREE_LIST_FUNC (video_standard); FREE_ITEM_FUNC (video_standard, video_standard); void store_cur_video_standard (tveng_device_info * info, tv_video_standard * p) { assert (NULL != info); STORE_CURRENT (video_standard, video_standard, p); } tv_video_standard * append_video_standard (tv_video_standard ** list, tv_videostd_set videostd_set, const char * label, const char * hlabel, unsigned int size) { tv_video_standard *ts; tv_video_standard *l; assert (TV_VIDEOSTD_SET_EMPTY != videostd_set); assert (NULL != hlabel); ALLOC_NODE (ts, size, label, tveng_build_hash (hlabel)); ts->videostd_set = videostd_set; while ((l = *list)) { if (l->hash == ts->hash) hash_warning (l->label, ts->label, ts->hash); /* saa7134 driver: PAL 0xFF, PAL BG 0x7, PAL I 0x10, PAL DK 0xe0, no bug. if (l->videostd_set & ts->videostd_set) fprintf (stderr, "WARNING: TVENG: Video standard " "set collision between %s (0x%" PRIx64 ") " "and %s (0x%" PRIx64 ")\n", l->label, l->videostd_set, ts->label, videostd_set); */ list = &l->_next; } *list = ts; if (videostd_set & TV_VIDEOSTD_SET_525_60) { ts->frame_width = 640; ts->frame_height = 480; ts->frame_rate = 30000 / 1001.0; ts->frame_ticks = 90000 * 1001 / 30000; } else { ts->frame_width = 768; ts->frame_height = 576; ts->frame_rate = 25.0; ts->frame_ticks = 90000 * 1 / 25; } return ts; } FREE_NODE_FUNC (audio_line); FREE_LIST_FUNC (audio_line); FREE_ITEM_FUNC (audio_input, audio_line); void store_cur_audio_input (tveng_device_info * info, tv_audio_line * p) { assert (NULL != info); STORE_CURRENT (audio_input, audio_line, p); } tv_audio_line * append_audio_line (tv_audio_line ** list, tv_audio_line_type type, const char * label, const char * hlabel, int minimum, int maximum, int step, int reset, unsigned int size) { tv_audio_line *tl; /* err, there is no other type... assert (type != TV_AUDIO_LINE_TYPE_NONE); */ assert (hlabel != NULL); assert (maximum >= minimum); assert (step >= 0); assert (reset >= minimum && reset <= maximum); ALLOC_NODE (tl, size, label, tveng_build_hash (hlabel)); APPEND_NODE (list, tl); tl->type = type; tl->minimum = minimum; tl->maximum = maximum; tl->step = step; tl->reset = reset; return tl; } FREE_NODE_FUNC (video_line); FREE_LIST_FUNC (video_line); FREE_ITEM_FUNC (video_input, video_line); STORE_CURRENT_FUNC (video_input, video_line); tv_video_line * append_video_line (tv_video_line ** list, tv_video_line_type type, const char * label, const char * hlabel, unsigned int size) { tv_video_line *tl; assert (type != TV_VIDEO_LINE_TYPE_NONE); assert (hlabel != NULL); ALLOC_NODE (tl, size, label, tveng_build_hash (hlabel)); APPEND_NODE (list, tl); tl->type = type; return tl; } tv_bool tv_capture_buffer_clear (tv_capture_buffer * cb) { assert (NULL != cb); return tv_clear_image (cb->data, cb->format); } ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������zapping-0.10cvs6/src/tveng.h������������������������������������������������������������������������ 644 � 764 � 144 � 101215 10406535364 11136� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Zapping (TV viewer for the Gnome Desktop) * Copyright (C) 2000 Iaki Garca Etxebarria * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifndef __TVENG_H__ #define __TVENG_H__ #include <stdio.h> #include <sys/ioctl.h> #include <sys/time.h> #include <sys/types.h> #include <sys/stat.h> #include <sys/ioctl.h> #include <fcntl.h> #include <unistd.h> #include <stdlib.h> #include <string.h> #include <sys/mman.h> #include <errno.h> #include <inttypes.h> #include <assert.h> #ifndef DISABLE_X_EXTENSIONS #ifdef HAVE_XV_EXTENSION #ifndef USE_XV /* avoid redefinition */ #define USE_XV 1 #endif #endif #endif /* We need video extensions (DGA) */ #include <X11/X.h> #include <X11/Xlib.h> #include <X11/Xfuncs.h> #ifdef USE_XV #include <sys/ipc.h> #include <sys/shm.h> #include <X11/extensions/XShm.h> #include <X11/extensions/Xv.h> #include <X11/extensions/Xvlib.h> #endif #include "libtv/overlay_buffer.h" #include "libtv/clip_vector.h" #include "libtv/callback.h" #include "libtv/control.h" /* The video device capabilities flags */ #define TVENG_CAPS_CAPTURE (1 << 0) /* Can capture to memory */ #define TVENG_CAPS_TUNER (1 << 1) /* Has some tuner */ #define TVENG_CAPS_TELETEXT (1 << 2) /* Has teletext */ #define TVENG_CAPS_OVERLAY (1 << 3) /* Can overlay to the framebuffer */ #define TVENG_CAPS_CHROMAKEY (1 << 4) /* Overlay chromakeyed */ #define TVENG_CAPS_CLIPPING (1 << 5) /* Overlay clipping supported */ #define TVENG_CAPS_FRAMERAM (1 << 6) /* Overlay overwrites framebuffer mem */ #define TVENG_CAPS_SCALES (1 << 7) /* HW image scaling supported */ #define TVENG_CAPS_MONOCHROME (1 << 8) /* greyscale only */ #define TVENG_CAPS_SUBCAPTURE (1 << 9) /* Can capture only part of the image */ #define TVENG_CAPS_QUEUE (1 << 10) /* Has a buffer queue */ #define TVENG_CAPS_XVIDEO (1 << 11) /* Can overlay through XVideo */ /* The valid modes for opening the video device */ enum tveng_attach_mode { TVENG_ATTACH_UNKNOWN = 0, /* Attachs the device so you can only control it, not read frames. This way you can do more than one opens per device. This will only work if V4L2 is present, otherwise this call means the same as TVENG_ATTACH_READ */ TVENG_ATTACH_CONTROL, /* Attachs the device so you can read data from it and control it. You cannot attach the same device twice with this type of attachment. */ TVENG_ATTACH_READ, /* Attaches the device to a XVideo virtual device, use this mode if you would prefer the X server to take care of the video. This mode only supports preview mode, and falls back to DMA overlay. */ TVENG_ATTACH_XV, /* Special control mode to enable VBI capturing without video capturing, required for the bktr driver. Same as _CONTROL for other drivers. */ TVENG_ATTACH_VBI, }; /* The capture structure */ struct tveng_caps{ char name[32]; /* canonical name for this interface */ int flags; /* OR'ed flags, see the above #defines */ unsigned int channels; /* Number of radio/tv channels */ unsigned int audios; /* Number of audio devices */ unsigned int maxwidth, maxheight; /* Maximum capture dimensions */ unsigned int minwidth, minheight; /* minimum capture dimensions */ }; typedef struct _tveng_device_info tveng_device_info; /* * Devices */ typedef struct _tv_device_node tv_device_node; /* This is a model (in the MVC sense) for devices we encounter and want to present to the user to make a choice or whatever. */ struct _tv_device_node { tv_device_node * next; char * label; /* localized */ char * bus; /* localized */ char * driver; /* localized */ char * version; /* localized */ char * device; /* interface specific, usually "/dev/some" */ void * user_data; /* for tveng clients */ void (* destroy)(tv_device_node *, tv_bool restore); }; typedef tv_device_node * tv_device_node_filter_fn (const char * name); extern tv_device_node * tv_device_node_add (tv_device_node ** list, tv_device_node * node); extern tv_device_node * tv_device_node_remove (tv_device_node ** list, tv_device_node * node); extern tv_device_node * tv_device_node_find (tv_device_node * list, const char * device); extern void tv_device_node_delete (tv_device_node ** list, tv_device_node * node, tv_bool restore); static __inline__ void tv_device_node_delete_list (tv_device_node ** list) { assert (list != NULL); while (*list) tv_device_node_delete (list, *list, FALSE); } extern tv_device_node * tv_device_node_new (const char * label, const char * bus, const char * driver, const char * version, const char * device, unsigned int size); /* * Video lines (input or output) */ typedef enum { TV_VIDEO_LINE_TYPE_NONE, TV_VIDEO_LINE_TYPE_BASEBAND, /* CVBS, Y/C, RGB */ TV_VIDEO_LINE_TYPE_TUNER, TV_VIDEO_LINE_TYPE_SATELLITE } tv_video_line_type; typedef enum { TV_VIDEO_LINE_ID_NONE, TV_VIDEO_LINE_ID_UNKNOWN = TV_VIDEO_LINE_ID_NONE } tv_video_line_id; typedef struct _tv_video_line tv_video_line; struct _tv_video_line { tv_video_line * _next; void * _parent; tv_callback * _callback; char * label; unsigned int hash; tv_video_line_type type; tv_video_line_id id; /* tv_videostd_id ?*/ union { struct { unsigned int minimum; unsigned int maximum; unsigned int step; unsigned int frequency; } tuner; } u; }; static __inline__ tv_callback * tv_video_line_add_callback (tv_video_line * line, void (* notify)(tv_video_line *, void *), void (* destroy)(tv_video_line *, void *), void * user_data) { assert (line != NULL); return tv_callback_add (&line->_callback, (tv_callback_fn *) notify, (tv_callback_fn *) destroy, user_data); } /* * Audio lines (input or output) */ typedef enum { TV_AUDIO_LINE_TYPE_NONE } tv_audio_line_type; typedef enum { TV_AUDIO_LINE_ID_NONE, TV_AUDIO_LINE_ID_UNKNOWN = TV_AUDIO_LINE_ID_NONE } tv_audio_line_id; typedef struct _tv_audio_line tv_audio_line; struct _tv_audio_line { tv_audio_line * _next; void * _parent; tv_callback * _callback; char * label; unsigned int hash; tv_audio_line_type type; tv_audio_line_id id; int minimum; /* volume */ int maximum; int step; int reset; /* A mixer input which can be routed to the ADC. Only these are valid args for set_rec_line(). Meaningless for tv audio inputs. */ unsigned recordable : 1; unsigned stereo : 1; /* Each audio line has a built-in volume control. Or at least that's what we pretend, only mixers really do. Further we assume it has a mute switch, independent of volume, emulated when not. These values reflect the last known left (0) and right (1) volume and mute state. */ unsigned muted : 1; int volume[2]; }; extern tv_bool tv_audio_line_update (tv_audio_line * line); extern tv_bool tv_audio_line_get_volume (tv_audio_line * line, int * left, int * right); extern tv_bool tv_audio_line_set_volume (tv_audio_line * line, int left, int right); extern tv_bool tv_audio_line_get_mute (tv_audio_line * line, tv_bool * mute); extern tv_bool tv_audio_line_set_mute (tv_audio_line * line, tv_bool mute); static __inline__ tv_callback * tv_audio_line_add_callback (tv_audio_line * line, void (* notify)(tv_audio_line *, void *), void (* destroy)(tv_audio_line *, void *), void * user_data) { assert (line != NULL); return tv_callback_add (&line->_callback, (tv_callback_fn *) notify, (tv_callback_fn *) destroy, user_data); } /* * Video standards */ /* Copied from V4L2 2.5, keep order. */ typedef enum { TV_VIDEOSTD_PAL_B = 0, /* none, unknown? FIXME */ TV_VIDEOSTD_PAL_B1, TV_VIDEOSTD_PAL_G, TV_VIDEOSTD_PAL_H, TV_VIDEOSTD_PAL_I, TV_VIDEOSTD_PAL_D, TV_VIDEOSTD_PAL_D1, TV_VIDEOSTD_PAL_K, TV_VIDEOSTD_PAL_M = 8, TV_VIDEOSTD_PAL_N, TV_VIDEOSTD_PAL_NC, TV_VIDEOSTD_NTSC_M = 12, TV_VIDEOSTD_NTSC_M_JP, TV_VIDEOSTD_SECAM_B = 16, TV_VIDEOSTD_SECAM_D, TV_VIDEOSTD_SECAM_G, TV_VIDEOSTD_SECAM_H, TV_VIDEOSTD_SECAM_K, TV_VIDEOSTD_SECAM_K1, TV_VIDEOSTD_SECAM_L, TV_VIDEOSTD_CUSTOM_BEGIN = 32, TV_VIDEOSTD_CUSTOM_END = 64 } tv_videostd; #define TV_MAX_VIDEOSTDS 64 typedef uint64_t tv_videostd_set; #define TV_VIDEOSTD_SET(videostd) (((tv_videostd_set) 1) << (videostd)) #define TV_VIDEOSTD_SET_UNKNOWN 0 #define TV_VIDEOSTD_SET_EMPTY 0 #define TV_VIDEOSTD_SET_PAL_BG (+ TV_VIDEOSTD_SET (TV_VIDEOSTD_PAL_B) \ + TV_VIDEOSTD_SET (TV_VIDEOSTD_PAL_B1) \ + TV_VIDEOSTD_SET (TV_VIDEOSTD_PAL_G)) #define TV_VIDEOSTD_SET_PAL_DK (+ TV_VIDEOSTD_SET (TV_VIDEOSTD_PAL_D) \ + TV_VIDEOSTD_SET (TV_VIDEOSTD_PAL_D1) \ + TV_VIDEOSTD_SET (TV_VIDEOSTD_PAL_K)) #define TV_VIDEOSTD_SET_PAL (+ TV_VIDEOSTD_SET_PAL_BG \ + TV_VIDEOSTD_SET_PAL_DK \ + TV_VIDEOSTD_SET (TV_VIDEOSTD_PAL_H) \ + TV_VIDEOSTD_SET (TV_VIDEOSTD_PAL_I)) #define TV_VIDEOSTD_SET_NTSC (+ TV_VIDEOSTD_SET (TV_VIDEOSTD_NTSC_M) \ + TV_VIDEOSTD_SET (TV_VIDEOSTD_NTSC_M_JP)) #define TV_VIDEOSTD_SET_SECAM (+ TV_VIDEOSTD_SET (TV_VIDEOSTD_SECAM_B) \ + TV_VIDEOSTD_SET (TV_VIDEOSTD_SECAM_D) \ + TV_VIDEOSTD_SET (TV_VIDEOSTD_SECAM_G) \ + TV_VIDEOSTD_SET (TV_VIDEOSTD_SECAM_H) \ + TV_VIDEOSTD_SET (TV_VIDEOSTD_SECAM_K) \ + TV_VIDEOSTD_SET (TV_VIDEOSTD_SECAM_K1)\ + TV_VIDEOSTD_SET (TV_VIDEOSTD_SECAM_L)) #define TV_VIDEOSTD_SET_525_60 (+ TV_VIDEOSTD_SET (TV_VIDEOSTD_PAL_M) \ + TV_VIDEOSTD_SET_NTSC) #define TV_VIDEOSTD_SET_625_50 (+ TV_VIDEOSTD_SET_PAL \ + TV_VIDEOSTD_SET (TV_VIDEOSTD_PAL_N) \ + TV_VIDEOSTD_SET (TV_VIDEOSTD_PAL_NC) \ + TV_VIDEOSTD_SET_SECAM) #define TV_VIDEOSTD_SET_ALL (+ TV_VIDEOSTD_SET_525_60 \ + TV_VIDEOSTD_SET_625_50) #define TV_VIDEOSTD_SET_CUSTOM \ ((~TV_VIDEOSTD_SET_EMPTY) << TV_VIDEOSTD_CUSTOM_BEGIN) extern const char * tv_videostd_name (tv_videostd videostd); typedef struct _tv_video_standard tv_video_standard; struct _tv_video_standard { tv_video_standard * _next; void * _parent; tv_callback * _callback; char * label; /* localized */ unsigned int hash; /* Note multiple bits can be set if the driver doesn't know exactly, or doesn't care about the difference (hardware switches automatically, difference not applicable to baseband input, etc). */ tv_videostd_set videostd_set; /* Nominal frame size, e.g. 640 x 480, assuming square pixel sampling. */ unsigned int frame_width; unsigned int frame_height; /* Nominal frame rate, either 25 or 30000 / 1001 Hz. */ double frame_rate; /* Nominal frame period in 90 kHz ticks. */ unsigned int frame_ticks; }; static __inline__ tv_callback * tv_video_standard_add_callback (tv_video_standard * standard, void (* destroy)(tv_video_standard *, void *), void * user_data) { assert (standard != NULL); return tv_callback_add (&standard->_callback, NULL, /* video standards will not change */ (tv_callback_fn *) destroy, user_data); } extern tv_callback * tv_add_audio_callback (tveng_device_info * info, void (* notify)(tveng_device_info *, void *), void (* destroy)(tveng_device_info *, void *), void * user_data); /* * Controls */ /* XXX should not take info argument*/ int tveng_update_control(tv_control *control, tveng_device_info * info); int tveng_set_control(tv_control * control, int value, tveng_device_info * info); /* * Audio matrix */ typedef unsigned int tv_audio_capability; #define TV_AUDIO_CAPABILITY_EMPTY 0 #define TV_AUDIO_CAPABILITY_AUTO (1 << 0) /* Primary language MONO/STEREO. */ #define TV_AUDIO_CAPABILITY_MONO (1 << 1) #define TV_AUDIO_CAPABILITY_STEREO (1 << 2) /* Note SAP and BILINGUAL are mutually exclusive and depend on the current video standard. */ #define TV_AUDIO_CAPABILITY_SAP (1 << 3) #define TV_AUDIO_CAPABILITY_BILINGUAL (1 << 4) typedef enum { TV_AUDIO_MODE_UNKNOWN, TV_AUDIO_MODE_AUTO = TV_AUDIO_MODE_UNKNOWN, TV_AUDIO_MODE_LANG1_MONO, TV_AUDIO_MODE_LANG1_STEREO, TV_AUDIO_MODE_LANG2_MONO, } tv_audio_mode; extern tv_bool tv_set_audio_mode (tveng_device_info * info, tv_audio_mode mode); extern tv_bool tv_audio_update (tveng_device_info * info); /* * Video capture */ typedef struct { void * data; unsigned int size; struct timeval sample_time; int64_t stream_time; const tv_image_format * format; } tv_capture_buffer; extern tv_bool tv_capture_buffer_clear (tv_capture_buffer * cb); /* * Video overlay, see ROADMAP */ /* Overlay rectangle. This is what gets DMAed into the overlay buffer, minus clipping rectangles. Coordinates are relative to the overlay buffer origin. */ typedef struct _tv_window tv_window; struct _tv_window { int x; /* sic, can be negative*/ int y; unsigned int width; unsigned int height; }; /* Preliminary */ /* That ought to be none, read, mmap, userp, overlay, teletext (ATTACH_VBI pseudo capture mode) for tveng, none, capture (read,mmap,userp), overlay, teletext for zm. */ typedef enum { CAPTURE_MODE_NONE, CAPTURE_MODE_READ, CAPTURE_MODE_OVERLAY, CAPTURE_MODE_TELETEXT, } capture_mode; /* The controller we are using for this device */ enum tveng_controller { TVENG_CONTROLLER_NONE, /* No controller set */ TVENG_CONTROLLER_V4L1, /* V4L1 controller (old V4l spec) */ TVENG_CONTROLLER_V4L2, /* V4L2 controller (new v4l spec) */ TVENG_CONTROLLER_XV, /* XVideo controller */ TVENG_CONTROLLER_EMU, /* Emulation controller */ TVENG_CONTROLLER_MOTHER /* The wrapper controller (tveng.c) */ }; /* Video inputs */ extern tv_video_line * tv_next_video_input (const tveng_device_info *info, const tv_video_line * line); extern tv_video_line * tv_nth_video_input (tveng_device_info * info, unsigned int hash); extern unsigned int tv_video_input_position (tveng_device_info * info, const tv_video_line * line); extern tv_video_line * tv_video_input_by_hash (tveng_device_info * info, unsigned int hash); extern const tv_video_line * tv_cur_video_input (const tveng_device_info * info); extern tv_video_line * tv_video_inputs (const tveng_device_info * info); extern const tv_video_line * tv_get_video_input (tveng_device_info * info); extern tv_bool tv_set_video_input (tveng_device_info * info, tv_video_line * line); /* Current video input, frequencies in Hz */ extern tv_bool tv_get_tuner_frequency (tveng_device_info * info, unsigned int * frequency); extern tv_bool tv_set_tuner_frequency (tveng_device_info * info, unsigned int frequency); /* Note this refers to the cur_video_input pointer: notify is called after it changed, possibly to NULL. Since this pointer always points to a video input list member NULL implies the list has been destroyed. The pointer itself is never destroyed until info is. */ extern tv_callback * tv_add_video_input_callback (tveng_device_info * info, void (* notify)(tveng_device_info *, void *), void (* destroy)(tveng_device_info *, void *), void * user_data); /* Audio inputs */ extern tv_audio_line * tv_next_audio_input (const tveng_device_info *info, const tv_audio_line * line); extern tv_audio_line * tv_nth_audio_input (tveng_device_info * info, unsigned int hash); extern unsigned int tv_audio_input_position (tveng_device_info * info, const tv_audio_line * line); extern tv_audio_line * tv_audio_input_by_hash (tveng_device_info * info, unsigned int hash); extern const tv_audio_line * tv_cur_audio_input (const tveng_device_info * info); extern tv_audio_line * tv_audio_inputs (const tveng_device_info * info); extern const tv_audio_line * tv_get_audio_input (tveng_device_info * info); extern tv_bool tv_set_audio_input (tveng_device_info * info, tv_audio_line * line); extern tv_callback * tv_add_audio_input_callback (tveng_device_info * info, void (* notify)(tveng_device_info *, void *), void (* destroy)(tveng_device_info *, void *), void * user_data); /* Video standards */ extern tv_video_standard * tv_next_video_standard (const tveng_device_info *info, const tv_video_standard *standard); extern tv_video_standard * tv_nth_video_standard (tveng_device_info * info, unsigned int nth); extern unsigned int tv_video_standard_position (tveng_device_info * info, const tv_video_standard *standard); extern tv_video_standard * tv_video_standard_by_hash (tveng_device_info * info, unsigned int hash); extern const tv_video_standard * tv_cur_video_standard (const tveng_device_info * info); extern tv_video_standard * tv_video_standards (const tveng_device_info * info); extern const tv_video_standard * tv_get_video_standard (tveng_device_info * info); extern tv_bool tv_set_video_standard (tveng_device_info * info, tv_video_standard *standard); extern tv_bool tv_set_video_standard_by_id (tveng_device_info * info, tv_videostd_set videostd_set); /* See add_video_input_callback note. The standard list can change with a video input change. If so, the entire list will be rebuilt, calling notify at least once after the pointer changed to NULL. */ extern tv_callback * tv_add_video_standard_callback (tveng_device_info * info, void (* notify)(tveng_device_info *, void *), void (* destroy)(tveng_device_info *, void *), void * user_data); /* Controls */ extern tv_control * tv_next_control (tveng_device_info * info, tv_control * control); extern tv_control * tv_nth_control (tveng_device_info * info, unsigned int nth); extern unsigned int tv_control_position (tveng_device_info * info, const tv_control * control); extern tv_control * tv_control_by_hash (tveng_device_info * info, unsigned int hash); extern tv_control * tv_control_by_id (tveng_device_info * info, tv_control_id id); /* Gets the current value of the controls, fills in info->controls appropiately. After this (and if it succeeds) you can look in info->controls to get the values for each control. -1 on error */ int tveng_update_controls(tveng_device_info * info); /* Gets the value of a control, given its name. Returns -1 on error. The comparison is performed disregarding the case. The value read is stored in cur_value. */ int tveng_get_control_by_name(const char * control_name, int * cur_value, tveng_device_info * info); /* Sets the value of a control, given its name. Returns -1 on error. The comparison is performed disregarding the case. new_value holds the new value given to the control, and it is clipped as neccessary. */ int tveng_set_control_by_name(const char * control_name, int new_value, tveng_device_info * info); /* Starts a tveng_device_info object, returns a pointer to the object or NULL on error. Display is the display we are connected to, bpp is the current X display's depth in Bits Per Pixel, or -1 if TVeng should try to detect it. */ tveng_device_info * tveng_device_info_new(Display * display, int bpp); /* Destroys a tveng_device_info object */ void tveng_device_info_destroy(tveng_device_info * info); /* Associates the given tveng_device_info with the given video device. On error it returns -1 and sets info->errno, info->error to the correct values. device_file: The file used to access the video device (usually /dev/video) attach_mode: Specifies the mode to open the device file depth: The color depth the capture will be in, -1 means let tveng decide based on the current display depth. info: The structure to be associated with the device */ int tveng_attach_device(const char* device_file, Window window, enum tveng_attach_mode attach_mode, tveng_device_info * info); /* Stores in short_str and long_str (if they are non-null) the description of the current controller. The enum value can be found in info->current_controller. For example, V4L2 controller would say: short_str: 'V4L2' long_str: 'Video4Linux 2' info->current_controller: TVENG_CONTROLLER_V4L2 This function always succeeds. The returned pointer are statically allocated, i.e., they don't need to be freed. */ void tveng_describe_controller(const char ** short_str, const char ** long_str, tveng_device_info * info); /* Closes the video device associated to the device info object. Should be called before reattaching a video device to the same object, but there is no need to call this before calling tveng_device_info_destroy. */ void tveng_close_device(tveng_device_info* info); extern const char * tv_get_errstr (tveng_device_info * info); extern int tv_set_errstr (tveng_device_info * info, const char * template, ...) __attribute__ ((format (printf, 2, 3))); extern int tv_get_debug_level (tveng_device_info * info); extern int tv_get_errno (tveng_device_info * info); extern capture_mode tv_get_capture_mode (tveng_device_info * info); extern void tv_set_capture_mode (tveng_device_info * info, capture_mode mode); extern enum tveng_controller tv_get_controller (tveng_device_info * info); extern const struct tveng_caps * tv_get_caps (tveng_device_info * info); extern enum tveng_attach_mode tv_get_attach_mode (tveng_device_info * info); extern int tv_get_fd (tveng_device_info * info); extern void tv_overlay_hack (tveng_device_info * info, int x, int y, int w, int h); extern void tv_set_filename (tveng_device_info * info, const char * s); /* Functions for controlling the video capture. All of them return -1 in case of error, so any value != -1 should be considered valid (unless explicitly stated in the description of the function) */ extern tv_pixfmt_set tv_supported_pixfmts (tveng_device_info * info); extern const tv_image_format * tv_cur_capture_format (tveng_device_info * info); extern const tv_image_format * tv_get_capture_format (tveng_device_info * info); extern const tv_image_format * tv_set_capture_format (tveng_device_info * info, const tv_image_format *format); /* Audio interface */ extern void tv_quiet_set (tveng_device_info * info, tv_bool quiet); extern int tv_mute_get (tveng_device_info * info, tv_bool update); extern int tv_mute_set (tveng_device_info * info, tv_bool mute); extern tv_callback * tv_mute_add_callback (tveng_device_info * info, void (* notify)(tveng_device_info *, void *), void (* destroy)(tveng_device_info *, void *), void * user_data); int tveng_set_input_by_name(const char * input_name, tveng_device_info * info); int tveng_set_standard_by_name(const char * name, tveng_device_info * info); /* Gets the signal strength and the afc code. The afc code indicates how to get a better signal, if negative, tune higher, if negative, tune lower. 0 means no idea or feature not present in the current controller (i.e. V4L1). Strength and/or afc can be NULL pointers, that would mean ignore that parameter. */ extern tv_bool tv_get_signal_strength (tveng_device_info * info, int * strength, int * afc); extern tv_bool tv_queue_capture_buffer (tveng_device_info * info, const tv_capture_buffer *buffer); extern const tv_capture_buffer * tv_dequeue_capture_buffer (tveng_device_info * info); extern int tv_dequeue_capture_buffer_with_timeout (tveng_device_info * info, const tv_capture_buffer **buffer, struct timeval * timeout); tv_bool tv_set_num_capture_buffers (tveng_device_info * info, unsigned int n_buffers); tv_bool tv_get_num_capture_buffers (tveng_device_info * info, unsigned int * n_buffers); extern int tv_read_frame (tveng_device_info * info, tv_capture_buffer * buffer, const struct timeval * timeout); extern tv_bool tv_flush_capture_buffers (tveng_device_info * info); extern tv_bool tv_enable_capturing (tveng_device_info * info, tv_bool enable); /* XF86 Frame Buffer routines */ extern const tv_overlay_buffer * tv_cur_overlay_buffer (tveng_device_info * info); extern const tv_overlay_buffer * tv_get_overlay_buffer (tveng_device_info * info); extern tv_bool tv_set_overlay_buffer (tveng_device_info * info, const char * display_name, int screen_number, const tv_overlay_buffer *target); extern const tv_window * tv_cur_overlay_window (tveng_device_info * info); extern const tv_window * tv_get_overlay_window (tveng_device_info * info); extern const tv_clip_vector * tv_cur_overlay_clipvec (tveng_device_info * info); extern const tv_window * tv_set_overlay_window_clipvec (tveng_device_info * info, const tv_window * window, const tv_clip_vector * clip_vector); extern tv_bool tv_cur_overlay_chromakey (tveng_device_info * info, unsigned int * chroma_key); extern tv_bool tv_get_overlay_chromakey (tveng_device_info * info, unsigned int * chroma_key); extern const tv_window * tv_set_overlay_window_chromakey (tveng_device_info * info, const tv_window * window, unsigned int chroma_key); extern tv_bool tv_set_overlay_xwindow (tveng_device_info * info, Window window, GC gc, unsigned int chroma_key); extern tv_bool tv_enable_overlay (tveng_device_info * info, tv_bool enable); /* This is a convenience function, it returns the real screen depth in BPP (bits per pixel). This one is quite important for 24 and 32 bit modes, since the default X visual may be 24 bit and the real screen depth 32, thus an expensive RGB -> RGBA conversion must be performed for each frame. */ int tveng_get_display_depth(tveng_device_info * info); /* Sets the preview window dimensions to the given window. Returns -1 on error, something else on success. Success doesn't mean that the requested dimensions are used, maybe they are different, check the returned fields to see if they are suitable info : Device we are controlling The current chromakey value is used, the caller doesn't need to fill it in. */ /* * Adjusts the verbosity value passed to zapping_setup_fb, cannot fail */ void tveng_set_zapping_setup_fb_verbosity(int level, tveng_device_info * info); /* * A value of TRUE forces dword-aligning of X coords and widths in * preview mode (workaround for some buggy drivers). */ void tveng_set_dword_align(int dword_align, tveng_device_info *info); /* * Sets the chroma value to the given one, has only effect if the * driver supports it. */ void tveng_set_chromakey(uint32_t chroma, tveng_device_info *info); /* Returns the current verbosity value passed to zapping_setup_fb */ int tveng_get_zapping_setup_fb_verbosity(tveng_device_info * info); /* build hash for the given string, normalized */ int tveng_build_hash(const char *string); /* get the current debug level */ int tveng_get_debug_level(tveng_device_info * info); /* set the debug level. The value will be clipped to valid values */ void tveng_set_debug_level(int level, tveng_device_info * info); /* sets xv support on/off, 1 means off */ void tveng_set_xv_support(int disabled, tveng_device_info * info); #ifdef USE_XV /* Add special XV controls to the device */ void tveng_set_xv_port(XvPortID port, tveng_device_info * info); /* Tell that the given XV port isn't valid any more */ void tveng_unset_xv_port(tveng_device_info *info); #endif /* OV511 specific code: The camera has a clickable button, detect this button's state. Returns: * -1 on error (no OV51* or the appropiate /proc entry nonexistant) * 0, 1 on success. */ int tveng_ov511_get_button_state (tveng_device_info *info); /* Aquire the (recursive) mutex on the device, TVeng functions already locks it when called. */ void tveng_mutex_lock(tveng_device_info *info); /* Releases the mutex */ void tveng_mutex_unlock(tveng_device_info * info); /* * AUDIO MIXER INTERFACE */ typedef struct _tv_mixer tv_mixer; typedef struct _tv_mixer_interface tv_mixer_interface; /* * Assumptions, for now: * * A mixer has zero or more analog inputs listed in * tv_mixer.inputs. All inputs are summed and routed to one or * more outputs. The volume and mute control affect each input line * individually before summation and have no effect on recording. * * Sound devices can have one ADC. If so, of a subset of inputs one * (tv_mixer.rec_line) can be routed to the only ADC. Optional a * gain control (tv_mixer.rec_gain) exists on the internal line * between the input multiplexer and ADC. * * Sound devices can have one DAC, somehow routed to one or more * outputs. Optional a gain control (tv_mixer.play_gain) exists * on the internal line between the DAC and summation or a * multiplexer connecting to the outputs. * * Outputs may have volume controls associated with them, but we * leave them alone, to be changed with a mixer application. * Likewise we need not care about the routing of inputs and DAC to * outputs, at least until we have to deal with multichannel sound * or user complaints. :-) * * Some mixers can select more than one input for recording. * We don't need that, but won't interfere if the user insists. * Except to reset when muted at startup the playback gain should * be left alone, because hardware or software may sum PCM audio * before converted by the DAC. Output volume can be easily * implemented in our codecs. * * Major flaw remains the assumption of a single ADC and DAC. Some * devices have more, have digital inputs and outputs, and not all * of them routed through the mixer. */ struct _tv_mixer { tv_device_node node; /* * Routes from inputs to output sum/mux. Mute/volume * does not affect recording. */ tv_audio_line * inputs; /* * Last known recording source, this points to one of the * 'inputs' or NULL. * * Note the user can select multiple sources with a mixer * application, then this is only one of them, usually the * one requested with set_rec_line(). Point is this may * change asynchronously, use of callback recommended. */ tv_audio_line * rec_line; /* * Route from rec mux to ADC or NULL. */ tv_audio_line * rec_gain; /* * Route from DAC to output sum/mux or NULL. */ tv_audio_line * play_gain; /* private */ const tv_mixer_interface * _interface; FILE * _log; /* if non-zero log all driver i/o */ /* * Called by interface when tv_mixer.rec_line changed. */ tv_callback * _callback; }; extern tv_bool tv_mixer_line_update (tv_audio_line * line); extern tv_bool tv_mixer_line_get_volume (tv_audio_line * line, int * left, int * right); extern tv_bool tv_mixer_line_set_volume (tv_audio_line * line, int left, int right); extern tv_bool tv_mixer_line_get_mute (tv_audio_line * line, tv_bool * mute); extern tv_bool tv_mixer_line_set_mute (tv_audio_line * line, tv_bool mute); extern tv_bool tv_mixer_line_record (tv_audio_line * line, tv_bool exclusive); static __inline__ tv_callback * tv_mixer_line_add_callback (tv_audio_line * line, void (* notify)(tv_audio_line *, void *), void (* destroy)(tv_audio_line *, void *), void * user_data) { assert (line != NULL); return tv_callback_add (&line->_callback, (tv_callback_fn *) notify, (tv_callback_fn *) destroy, user_data); } extern tv_bool tv_mixer_update (tv_mixer * mixer); static __inline__ tv_callback * tv_mixer_add_callback (tv_mixer * mixer, void (* notify)(tv_mixer *, void *), void (* destroy)(tv_mixer *, void *), void * user_data) { assert (mixer != NULL); return tv_callback_add (&mixer->_callback, (tv_callback_fn *) notify, (tv_callback_fn *) destroy, user_data); } extern tv_mixer * tv_mixer_open (FILE * log, const char * device); static __inline__ void tv_mixer_close (tv_mixer * mixer) { tv_device_node_delete (NULL, &mixer->node, FALSE); } extern tv_mixer * tv_mixer_scan (FILE * log); /* open, scan? */ extern void tveng_attach_mixer_line (tveng_device_info * info, tv_mixer * mixer, tv_audio_line * line); extern void tv_clear_error (tveng_device_info * info); #define t_warn(templ, args...) \ fprintf (stderr, "%s:%u: " templ, __FILE__, __LINE__ ,##args ); #define tv_error_msg(info, template, args...) \ do { \ tv_set_errstr (info, template ,##args ); \ if (tv_get_debug_level (info) > 0) \ fprintf (stderr, "%s:%u:%s: %s\n", __FILE__, __LINE__, \ __FUNCTION__, tv_get_errstr (info)); \ } while (0) /* Builds an error message that lets me debug much better */ #define t_error(str_error, info) \ tv_error_msg ((info), "%s: %d, %s", (str_error), \ (info)->tveng_errno, strerror((info)->tveng_errno)) #endif /* TVENG.H */ �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������zapping-0.10cvs6/src/tveng1.c����������������������������������������������������������������������� 644 � 764 � 144 � 272343 10441474263 11224� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Zapping (TV viewer for the Gnome Desktop) * Copyright (C) 2000 Iaki Garca Etxebarria * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include "site_def.h" /* This is the library in charge of simplyfying Video Access API (I don't want to use thirteen lines of code with ioctl's every time I want to change tuning freq). the name is TV Engine, since it is intended mainly for TV viewing. This file is separated so zapping doesn't need to know about V4L[2] */ #include "zmisc.h" #ifdef ENABLE_V4L #include <stdio.h> #include <sys/time.h> #include <sys/types.h> #include <sys/stat.h> #include <sys/file.h> #include <fcntl.h> #include <unistd.h> #include <stdlib.h> #include <signal.h> #include <sys/mman.h> #undef WNOHANG #undef WUNTRACED #include <errno.h> #include <math.h> #include <endian.h> #include <limits.h> /* INT_MAX */ #include "common/fifo.h" /* current_time() */ #define MINOR(dev) ((dev) & 0xff) /* This works around a bug bttv appears to have with the mute property. Comment out the line if your V4L driver isn't buggy. */ #define TVENG1_BTTV_MUTE_BUG_WORKAROUND 1 #define TVENG1_PROTOTYPES 1 #include "tveng1.h" /* Kernel interface */ #include "common/videodev.h" #include "common/_videodev.h" /* This macro checks at compile time if the arg type is correct, device_ioctl() repeats the ioctl if interrupted (EINTR) and logs the args and result if log_fp is non-zero. When the ioctl failed ioctl_failure() stores the cmd, caller and errno in info. */ #define xioctl(p_info, cmd, arg) \ (IOCTL_ARG_TYPE_CHECK_ ## cmd (arg), \ ((0 == device_ioctl ((p_info)->info.log_fp, \ fprint_v4l_ioctl_arg, \ (p_info)->info.fd, cmd, (void *)(arg))) ? \ 0 : (ioctl_failure (&(p_info)->info, __FILE__, __FUNCTION__, \ __LINE__, # cmd), -1))) #define xioctl_may_fail(p_info, cmd, arg) \ (IOCTL_ARG_TYPE_CHECK_ ## cmd (arg), \ device_ioctl ((p_info)->info.log_fp, fprint_v4l_ioctl_arg, \ (p_info)->info.fd, cmd, (void *)(arg))) /* Bttv driver extensions. */ #define BTTV_VERSION _IOR ('v' , BASE_VIDIOCPRIVATE + 6, int) static __inline__ void IOCTL_ARG_TYPE_CHECK_BTTV_VERSION (int *arg __attribute__ ((unused))) {} static void fprint_bttv_ioctl_arg (FILE * fp, unsigned int cmd, int rw _unused_, void * arg) { switch (cmd) { case BTTV_VERSION: if (!arg) fputs ("BTTV_VERSION", fp); break; default: if (!arg) fprint_unknown_ioctl (fp, cmd, arg); break; } } #define bttv_xioctl_may_fail(p_info, cmd, arg) \ (IOCTL_ARG_TYPE_CHECK_ ## cmd (arg), \ device_ioctl ((p_info)->info.log_fp, \ fprint_bttv_ioctl_arg, \ (p_info)->info.fd, cmd, (void *)(arg))) /* PWC driver extensions. */ #include "common/pwc-ioctl.h" #include "common/_pwc-ioctl.h" #define pwc_xioctl(p_info, cmd, arg) \ (IOCTL_ARG_TYPE_CHECK_ ## cmd (arg), \ ((0 == device_ioctl ((p_info)->info.log_fp, \ fprint_pwc_ioctl_arg, \ (p_info)->info.fd, cmd, (void *)(arg))) ? \ 0 : (ioctl_failure (&(p_info)->info, __FILE__, __FUNCTION__, \ __LINE__, # cmd), -1))) #define pwc_xioctl_may_fail(p_info, cmd, arg) \ (IOCTL_ARG_TYPE_CHECK_ ## cmd (arg), \ device_ioctl ((p_info)->info.log_fp, fprint_pwc_ioctl_arg, \ (p_info)->info.fd, cmd, (void *)(arg))) /* PWC TODO: Pan & tilt, real image size (cropping), DNR, flickerless, backlight compensation, sharpness, LEDs, whitebalance speed, shutter speed, AGC, serial number, compression quality, factory reset, user settings, bayer format, decompression. */ #ifndef TVENG1_RIVATV_TEST # define TVENG1_RIVATV_TEST 0 #endif #ifndef TVENG1_XV_TEST # define TVENG1_XV_TEST 0 #endif /* Copy a NUL-(un)terminated string from a char array. */ #define XSTRADUP(s) _tv_strndup ((s), N_ELEMENTS (s)) /* These drivers need special attention. */ enum driver { DRIVER_BTTV = 1, DRIVER_PWC, DRIVER_RIVATV }; struct video_input { tv_video_line pub; int channel; /* struct video_channel */ int tuner; /* struct video_tuner */ unsigned int step_shift; }; #define VI(l) PARENT (l, struct video_input, pub) #define CVI(l) CONST_PARENT (l, struct video_input, pub) struct standard { tv_video_standard pub; unsigned int norm; /* struct video_channel */ }; #define S(l) PARENT (l, struct standard, pub) #define CS(l) CONST_PARENT (l, struct standard, pub) /* Private control IDs. In v4l the control concept doesn't exist. */ typedef enum { /* Generic video controls. */ CONTROL_BRIGHTNESS = (1 << 0), CONTROL_CONTRAST = (1 << 1), CONTROL_COLOUR = (1 << 2), CONTROL_HUE = (1 << 3), /* Generic audio controls. */ CONTROL_MUTE = (1 << 8), CONTROL_VOLUME = (1 << 9), CONTROL_BASS = (1 << 10), CONTROL_TREBLE = (1 << 11), CONTROL_BALANCE = (1 << 12), /* PWC driver. */ CONTROL_PWC_FPS = (1 << 16), CONTROL_PWC_SNAPSHOT = (1 << 17), } control_id; /* In struct video_pict. */ #define PICT_CONTROLS (CONTROL_BRIGHTNESS | \ CONTROL_CONTRAST | \ CONTROL_COLOUR | \ CONTROL_HUE) /* In struct video_window. */ #define WINDOW_CONTROLS (CONTROL_PWC_FPS | \ CONTROL_PWC_SNAPSHOT) /* In struct video_audio. */ #define AUDIO_CONTROLS (CONTROL_MUTE | \ CONTROL_VOLUME | \ CONTROL_BASS | \ CONTROL_TREBLE | \ CONTROL_BALANCE) #define ALL_CONTROLS (PICT_CONTROLS | WINDOW_CONTROLS | AUDIO_CONTROLS) /* Accessible through XVideo-V4L. */ #define XV_CONTROLS (CONTROL_BRIGHTNESS | \ CONTROL_CONTRAST | \ CONTROL_COLOUR | \ CONTROL_HUE | \ CONTROL_MUTE | \ CONTROL_VOLUME) struct control { tv_control pub; control_id id; Atom atom; }; #define C(l) PARENT (l, struct control, pub) /** @internal */ struct xbuffer { void * data; struct xbuffer * next_queued; int frame_number; struct timeval sample_time; int64_t stream_time; /** Queued with VIDIOCMCAPTURE. */ tv_bool queued; /** Client got a cb pointer with dequeue_buffer(). */ tv_bool dequeued; /** Clear this buffer before next VIDIOCMCAPTURE. */ tv_bool clear; }; /* If this is enabled, some specific features of the bttv driver are enabled, but they are non-standard */ #define TVENG1_BTTV_PRESENT 1 struct private_tveng1_device_info { tveng_device_info info; /* Info field, inherited */ #ifdef TVENG1_BTTV_MUTE_BUG_WORKAROUND #if 0 int muted; /* 0 if the device is muted, 1 otherwise. A workaround for a bttv problem. */ #endif #endif int audio_mode; /* auto, mono, stereo, ... */ /* OV511 camera */ int ogb_fd; tv_bool exclusive_open; unsigned int temp_open_count; #if defined (HAVE_XV_EXTENSION) && TVENG1_XV_TEST /* Grabbed the info->overlay.xv_port_id for overlay. */ tv_bool grabbed_xv_port; Window xwindow; GC xgc; Atom xa_xv_brightness; Atom xa_xv_freq; #endif tv_bool overlay_active; /* See set_overlay_buffer(). */ tv_image_format overlay_buffer_format; tv_bool use_overlay_limits; /* Info about mapped buffers. */ void * mapped_addr; struct video_mbuf mbuf; struct xbuffer * buffers; unsigned int n_buffers; struct xbuffer * first_queued; tv_bool capture_active; control_id all_controls; tv_control * control_mute; tv_control * control_audio_dec; tv_audio_capability tuner_audio_capability; tv_control * control_pwc_fps; tv_control * control_pwc_snapshot; /** * VIDEO_PALETTE_YUYV or VIDEO_PALETTE_YUV422. * These are synonyms, some drivers understand only one. */ unsigned int palette_yuyv; tv_bool read_back_controls; tv_bool mute_flag_readable; tv_bool audio_mode_reads_rx; tv_bool channel_norm_usable; tv_bool read_back_format; enum driver driver; }; #define P_INFO(p) PARENT (p, struct private_tveng1_device_info, info) static tv_bool get_capture_format (tveng_device_info * info); const struct { unsigned int width; unsigned int height; } common_sizes [] = { { 128, 96 }, { 160, 120 }, /* QSIF */ { 176, 144 }, /* QCIF */ { 320, 240 }, /* SIF */ { 352, 240 }, /* NTSC CIF */ { 352, 288 }, /* CIF */ { 640, 480 }, /* NTSC square, 4SIF */ { 704, 480 }, /* NTSC 4CIF */ { 704, 576 }, /* PAL SECAM 4CIF */ { 720, 480 }, /* NTSC 601 */ { 720, 576 }, /* PAL SECAM 601 */ { 768, 576 }, /* PAL SECAM square */ }; #if defined (HAVE_XV_EXTENSION) && TVENG1_XV_TEST static tv_bool put_video (struct private_tveng1_device_info *p_info) { unsigned int src_width, src_height; const tv_video_standard *s; src_width = 640; src_height = 480; s = p_info->info.panel.cur_video_standard; if (NULL != s) { src_width = s->frame_width; src_height = s->frame_height; } if (_tv_xv_put_video (&p_info->info, p_info->xwindow, p_info->xgc, /* src_x, y */ 0, 0, src_width, src_height)) return TRUE; if (-1 != p_info->info.fd) { /* Error ignored. */ device_close (p_info->info.log_fp, p_info->info.fd); p_info->info.fd = -1; } if (_tv_xv_put_video (&p_info->info, p_info->xwindow, p_info->xgc, /* src_x, y */ 0, 0, src_width, src_height)) { p_info->exclusive_open = TRUE; return TRUE; } return FALSE; } #endif /* V4L prohibits multiple opens. This code temporarily opens and closes the device. */ static tv_bool temp_close (struct private_tveng1_device_info *p_info, unsigned int old_open_count) { tv_bool success; /* Usually 0 == old_open_count. */ if (p_info->temp_open_count <= old_open_count) return TRUE; if (--p_info->temp_open_count > 0) return TRUE; assert (-1 != p_info->info.fd); success = TRUE; #if defined (HAVE_XV_EXTENSION) && TVENG1_XV_TEST if (p_info->overlay_active & p_info->grabbed_xv_port & p_info->exclusive_open) { /* Error ignored. */ device_close (p_info->info.log_fp, p_info->info.fd); p_info->info.fd = -1; success = put_video (p_info); p_info->overlay_active = success; } else #endif if (TVENG_ATTACH_CONTROL == p_info->info.attach_mode) { /* Error ignored. */ device_close (p_info->info.log_fp, p_info->info.fd); p_info->info.fd = -1; success = TRUE; } return success; } static tv_bool temp_open (struct private_tveng1_device_info *p_info) { tv_bool stop_overlay; if (-1 != p_info->info.fd) { ++p_info->temp_open_count; return TRUE; } assert (0 == p_info->temp_open_count); #if defined (HAVE_XV_EXTENSION) && TVENG1_XV_TEST stop_overlay = (p_info->overlay_active & p_info->grabbed_xv_port & p_info->exclusive_open); if (stop_overlay) { if (!_tv_xv_stop_video (&p_info->info, p_info->xwindow)) return FALSE; } #endif p_info->info.fd = device_open (p_info->info.log_fp, p_info->info.file_name, O_RDWR, /* mode */ 0); if (-1 != p_info->info.fd) { p_info->temp_open_count = 1; return TRUE; } #if defined (HAVE_XV_EXTENSION) && TVENG1_XV_TEST if (stop_overlay) { tv_bool success; /* Restore overlay if possible. */ success = put_video (p_info); p_info->overlay_active = success; } #endif return FALSE; } /* Audio matrix */ static unsigned int tv_audio_mode_to_v4l_mode (tv_audio_mode mode) { switch (mode) { case TV_AUDIO_MODE_AUTO: return 0; case TV_AUDIO_MODE_LANG1_MONO: return VIDEO_SOUND_MONO; case TV_AUDIO_MODE_LANG1_STEREO: return VIDEO_SOUND_STEREO; case TV_AUDIO_MODE_LANG2_MONO: return VIDEO_SOUND_LANG2; } assert (!"reached"); } static tv_audio_mode tv_audio_mode_from_v4l_mode (unsigned int mode) { switch (mode) { case VIDEO_SOUND_MONO: case VIDEO_SOUND_LANG1: return TV_AUDIO_MODE_LANG1_MONO; case VIDEO_SOUND_STEREO: return TV_AUDIO_MODE_LANG1_STEREO; case VIDEO_SOUND_LANG2: return TV_AUDIO_MODE_LANG2_MONO; default: break; } return TV_AUDIO_MODE_AUTO; } static void set_audio_capability (struct private_tveng1_device_info *p_info) { static const tv_audio_capability lang2 = TV_AUDIO_CAPABILITY_SAP | TV_AUDIO_CAPABILITY_BILINGUAL; tv_audio_capability cap; cap = TV_AUDIO_CAPABILITY_EMPTY; if (p_info->info.panel.cur_video_input && IS_TUNER_LINE (p_info->info.panel.cur_video_input)) { cap = p_info->tuner_audio_capability; if (cap & lang2) { const tv_video_standard *std; std = p_info->info.panel.cur_video_standard; if (std && (std->videostd_set & TV_VIDEOSTD_SET (TV_VIDEOSTD_NTSC_M))) { cap = (cap & ~lang2) | TV_AUDIO_CAPABILITY_SAP; } else { cap = (cap & ~lang2) | TV_AUDIO_CAPABILITY_BILINGUAL; } } } if (p_info->info.panel.audio_capability != cap) { p_info->info.panel.audio_capability = cap; tv_callback_notify (&p_info->info, &p_info->info, p_info->info.panel.audio_callback); } } static void set_audio_reception (struct private_tveng1_device_info *p_info, unsigned int mode) { unsigned int rec[2]; rec[0] = 0; rec[1] = 0; if (mode & VIDEO_SOUND_STEREO) rec[0] = 2; else if (mode & VIDEO_SOUND_MONO) rec[0] = 1; if (mode & VIDEO_SOUND_LANG2) rec[1] = 1; if (p_info->info.panel.audio_reception[0] != rec[0] || p_info->info.panel.audio_reception[1] != rec[1]) { p_info->info.panel.audio_reception[0] = rec[0]; p_info->info.panel.audio_reception[1] = rec[1]; tv_callback_notify (&p_info->info, &p_info->info, p_info->info.panel.audio_callback); } } static tv_bool init_audio (struct private_tveng1_device_info *p_info) { struct video_audio audio; unsigned int capability; unsigned int old_mode; unsigned int received; unsigned int fst_mode; unsigned int cur_mode; unsigned int mode; p_info->info.panel.audio_capability = TV_AUDIO_CAPABILITY_EMPTY; p_info->tuner_audio_capability = TV_AUDIO_CAPABILITY_EMPTY; p_info->info.panel.audio_mode = TV_AUDIO_MODE_UNKNOWN; p_info->info.panel.audio_reception[0] = 0; /* primary language */ p_info->info.panel.audio_reception[1] = 0; /* secondary language */ p_info->audio_mode_reads_rx = FALSE; /* According to /linux/Documentation/video4linux/API.html audio.mode is the "mode the audio input is in". The bttv driver returns the received audio on read, a set, not the selected mode and not capabilities. On write a single bit must be set, zero selects autodetection. NB VIDIOCSAUDIO is not w/r. */ if (TVENG1_RIVATV_TEST) return TRUE; assert (-1 != p_info->info.fd); CLEAR (audio); if (-1 == xioctl_may_fail (p_info, VIDIOCGAUDIO, &audio)) { switch (errno) { case EINVAL: case ENODEV: /* Tim: rivatv driver returns ENODEV when the card has no audio. */ return TRUE; /* success, no audio support */ default: ioctl_failure (&p_info->info, __FILE__, __PRETTY_FUNCTION__, __LINE__, "VIDIOCGAUDIO"); return FALSE; } } old_mode = audio.mode; received = audio.mode; fst_mode = (unsigned int) -1; cur_mode = (unsigned int) -1; capability = 0; p_info->audio_mode_reads_rx = (DRIVER_BTTV == p_info->driver || !SINGLE_BIT (audio.mode)); /* To determine capabilities let's see which modes we can select. */ for (mode = 1; mode <= (VIDEO_SOUND_LANG2 << 1); mode <<= 1) { audio.mode = mode >> 1; /* 0 == automatic */ audio.flags |= VIDEO_AUDIO_MUTE; if (0 == xioctl_may_fail (p_info, VIDIOCSAUDIO, &audio)) { capability |= mode; if ((unsigned int) -1 == fst_mode) fst_mode = audio.mode; cur_mode = audio.mode; if (!p_info->audio_mode_reads_rx) { if (-1 == xioctl (p_info, VIDIOCGAUDIO, &audio)) return FALSE; if (audio.mode != (mode >> 1)) p_info->audio_mode_reads_rx = TRUE; } } else { if (EINVAL != errno) { ioctl_failure (&p_info->info, __FILE__, __PRETTY_FUNCTION__, __LINE__, "VIDIOCSAUDIO"); return FALSE; } } } if (0 == capability || (unsigned int) -1 == fst_mode) return TRUE; if (p_info->audio_mode_reads_rx) { /* Don't know what old mode was, restore to first working one. */ old_mode = fst_mode; } else { /* Don't know received audio. */ received = 0; /* auto */ } if (old_mode != cur_mode) { audio.mode = old_mode; if (-1 == xioctl (p_info, VIDIOCSAUDIO, &audio)) return FALSE; } if (capability & 1) p_info->tuner_audio_capability |= TV_AUDIO_CAPABILITY_AUTO; capability >>= 1; if ((capability & VIDEO_SOUND_MONO) || (capability & VIDEO_SOUND_LANG1)) p_info->tuner_audio_capability |= TV_AUDIO_CAPABILITY_MONO; if (capability & VIDEO_SOUND_STEREO) p_info->tuner_audio_capability |= TV_AUDIO_CAPABILITY_STEREO; if (capability & VIDEO_SOUND_LANG2) { /* We assume both. */ p_info->tuner_audio_capability |= TV_AUDIO_CAPABILITY_SAP | TV_AUDIO_CAPABILITY_BILINGUAL; } p_info->info.panel.audio_mode = tv_audio_mode_from_v4l_mode (cur_mode); set_audio_capability (p_info); set_audio_reception (p_info, received); return TRUE; } static tv_bool set_audio_mode (tveng_device_info * info, tv_audio_mode mode) { struct private_tveng1_device_info *p_info = P_INFO (info); struct video_audio audio; if (TVENG1_RIVATV_TEST) return FALSE; if (!temp_open (p_info)) return FALSE; CLEAR (audio); if (-1 == xioctl (p_info, VIDIOCGAUDIO, &audio)) goto failure; if (!p_info->mute_flag_readable) { if (p_info->control_mute && p_info->control_mute->value) audio.flags |= VIDEO_AUDIO_MUTE; else audio.flags &= ~VIDEO_AUDIO_MUTE; } audio.mode = tv_audio_mode_to_v4l_mode (mode); if (-1 == xioctl (p_info, VIDIOCSAUDIO, &audio)) goto failure; if (p_info->info.panel.audio_mode != mode) { p_info->info.panel.audio_mode = mode; tv_callback_notify (&p_info->info, &p_info->info, p_info->info.panel.audio_callback); } return temp_close (p_info, 0); failure: /* Error ignored. */ temp_close (p_info, 0); return FALSE; } /* Controls */ static void update_control_set_v4l (struct private_tveng1_device_info *p_info, const struct video_picture *pict, const struct video_window *win, const struct video_audio *audio, control_id control_set) { tv_control *control; for_all (control, p_info->info.panel.controls) { struct control *c = C(control); int value; if (c->pub._parent != p_info) continue; if (TV_CONTROL_ID_AUDIO_MODE == c->pub.id) continue; if (0 == (control_set & c->id)) continue; switch (c->id) { /* Picture controls. */ case CONTROL_BRIGHTNESS: value = pict->brightness; break; case CONTROL_HUE: value = pict->hue; break; case CONTROL_COLOUR: value = pict->colour; break; case CONTROL_CONTRAST: value = pict->contrast; break; /* Window controls. */ case CONTROL_PWC_FPS: value = (win->flags & PWC_FPS_FRMASK) >> PWC_FPS_SHIFT; break; case CONTROL_PWC_SNAPSHOT: value = !!(win->flags & PWC_FPS_SNAPSHOT); break; /* Audio controls. */ case CONTROL_MUTE: if (!p_info->mute_flag_readable) continue; value = ((audio->flags & VIDEO_AUDIO_MUTE) != 0); break; case CONTROL_VOLUME: value = audio->volume; break; case CONTROL_BASS: value = audio->bass; break; case CONTROL_TREBLE: value = audio->treble; break; case CONTROL_BALANCE: value = audio->balance; break; default: t_warn ("Invalid c->id 0x%x\n", c->id); p_info->info.tveng_errno = -1; /* unknown */ return; } if (c->pub.value != value) { c->pub.value = value; tv_callback_notify (&p_info->info, &c->pub, c->pub._callback); } } } #if defined (HAVE_XV_EXTENSION) && TVENG1_XV_TEST static tv_bool get_control_set_xv (struct private_tveng1_device_info *p_info, control_id control_set) { tv_control *control; for_all (control, p_info->info.panel.controls) { struct control *c = C(control); int value; if (c->pub._parent != p_info) continue; if (TV_CONTROL_ID_AUDIO_MODE == c->pub.id) continue; if (0 == (control_set & c->id)) continue; if (None == c->atom) { t_warn ("No atom for control 0x%x\n", c->id); p_info->info.tveng_errno = -1; /* unknown */ return FALSE; } if (!_tv_xv_get_port_attribute (&p_info->info, c->atom, &value)) return FALSE; if (CONTROL_MUTE != c->id) value = value * 65536 / 2000 + 32768; if (c->pub.value != value) { c->pub.value = value; tv_callback_notify (&p_info->info, &c->pub, c->pub._callback); } } return TRUE; } #endif static tv_bool get_control (tveng_device_info * info, tv_control * tc) { struct private_tveng1_device_info *p_info = P_INFO (info); struct video_picture pict; struct video_window window; struct video_audio audio; control_id control_set; if (p_info->control_audio_dec == tc) return TRUE; /* XXX */ if (tc) control_set = C(tc)->id; else control_set = p_info->all_controls; #if defined (HAVE_XV_EXTENSION) && TVENG1_XV_TEST if ((-1 == p_info->info.fd) && (p_info->overlay_active & p_info->grabbed_xv_port & p_info->exclusive_open) && 0 == (control_set & ~XV_CONTROLS)) { /* Don't stop and restart overlay just to get a control we can also access through XVideo. */ return get_control_set_xv (p_info, control_set); } #endif if (!temp_open (p_info)) return FALSE; if (control_set & PICT_CONTROLS) { CLEAR (pict); if (-1 == xioctl (p_info, VIDIOCGPICT, &pict)) goto failure; control_set |= PICT_CONTROLS; } if (control_set & WINDOW_CONTROLS) { CLEAR (window); if (-1 == xioctl (p_info, VIDIOCGWIN, &window)) goto failure; control_set |= WINDOW_CONTROLS; } if (control_set & AUDIO_CONTROLS) { CLEAR (audio); if (-1 == xioctl (p_info, VIDIOCGAUDIO, &audio)) goto failure; if (p_info->audio_mode_reads_rx) { set_audio_reception (p_info, audio.mode); } control_set |= AUDIO_CONTROLS; } update_control_set_v4l (p_info, &pict, &window, &audio, control_set); return temp_close (p_info, 0); failure: /* Error ignored. */ temp_close (p_info, 0); return FALSE; } #if defined (HAVE_XV_EXTENSION) && TVENG1_XV_TEST static tv_bool set_control_xv (struct private_tveng1_device_info *p_info, tv_control * tc, int value) { struct control *c = C(tc); if (None == c->atom) { tveng_device_info *info = &p_info->info; t_warn ("No atom for control 0x%x\n", c->id); info->tveng_errno = -1; /* unknown */ return FALSE; } if (CONTROL_MUTE != c->id) value = value * 2000 / 65536 - 1000; if (!_tv_xv_set_port_attribute (&p_info->info, c->atom, value)) return FALSE; if (CONTROL_MUTE != c->id) value = value * 65536 / 2000 + 32768; if (c->pub.value != value) { c->pub.value = value; tv_callback_notify (&p_info->info, &c->pub, c->pub._callback); } return TRUE; } #endif static tv_bool set_control (tveng_device_info * info, tv_control * tc, int value) { struct private_tveng1_device_info *p_info = P_INFO (info); struct control *c = C(tc); if (p_info->control_audio_dec == tc) return set_audio_mode_control (&p_info->info, tc, value); #if defined (HAVE_XV_EXTENSION) && TVENG1_XV_TEST if ((-1 == p_info->info.fd) && (p_info->overlay_active & p_info->grabbed_xv_port & p_info->exclusive_open) && 0 == (c->id & ~XV_CONTROLS)) return set_control_xv (p_info, tc, value); #endif if (!temp_open (p_info)) return FALSE; if (c->id & PICT_CONTROLS) { struct video_picture pict; CLEAR (pict); if (-1 == xioctl (p_info, VIDIOCGPICT, &pict)) goto failure; switch (c->id) { case CONTROL_BRIGHTNESS: pict.brightness = value; break; case CONTROL_HUE: pict.hue = value; break; case CONTROL_COLOUR: pict.colour = value; break; case CONTROL_CONTRAST: pict.contrast = value; break; default: t_warn ("Invalid c->id 0x%x\n", c->id); info->tveng_errno = -1; /* unknown */ goto failure; } if (-1 == xioctl (p_info, VIDIOCSPICT, &pict)) goto failure; if (p_info->read_back_controls) { /* Error ignored */ xioctl (p_info, VIDIOCGPICT, &pict); } update_control_set_v4l (p_info, &pict, NULL, NULL, PICT_CONTROLS); } else if (c->id & WINDOW_CONTROLS) { struct video_window window; unsigned int new_flags; CLEAR (window); if (-1 == xioctl (p_info, VIDIOCGWIN, &window)) goto failure; new_flags = window.flags; switch (c->id) { case CONTROL_PWC_FPS: new_flags &= ~PWC_FPS_FRMASK; new_flags |= value << PWC_FPS_SHIFT; break; case CONTROL_PWC_SNAPSHOT: if (value) new_flags |= PWC_FPS_SNAPSHOT; else new_flags &= ~PWC_FPS_SNAPSHOT; break; default: t_warn ("Invalid c->id 0x%x\n", c->id); p_info->info.tveng_errno = -1; /* unknown */ goto failure; } if (window.flags != new_flags) { window.flags = new_flags; if (-1 == xioctl (p_info, VIDIOCSWIN, &window)) goto failure; if (p_info->read_back_controls) { /* Error ignored */ xioctl (p_info, VIDIOCGWIN, &window); } } update_control_set_v4l (p_info, NULL, &window, NULL, WINDOW_CONTROLS); } else if (c->id & AUDIO_CONTROLS) { struct video_audio audio; unsigned int rx_mode; tv_bool no_read; CLEAR (audio); if (-1 == xioctl (p_info, VIDIOCGAUDIO, &audio)) goto failure; no_read = FALSE; rx_mode = audio.mode; switch (c->id) { case CONTROL_VOLUME: audio.volume = value; break; case CONTROL_BASS: audio.bass = value; break; case CONTROL_TREBLE: audio.treble = value; break; case CONTROL_BALANCE: audio.balance = value; break; case CONTROL_MUTE: if (value) audio.flags |= VIDEO_AUDIO_MUTE; else audio.flags &= ~VIDEO_AUDIO_MUTE; no_read = !p_info->mute_flag_readable; break; default: t_warn ("Invalid c->id 0x%x\n", c->id); p_info->info.tveng_errno = -1; /* unknown */ goto failure; } if (CONTROL_MUTE != c->id && !p_info->mute_flag_readable) { if (p_info->control_mute && p_info->control_mute->value) audio.flags |= VIDEO_AUDIO_MUTE; else audio.flags &= ~VIDEO_AUDIO_MUTE; } if (p_info->audio_mode_reads_rx) { audio.mode = tv_audio_mode_to_v4l_mode (p_info->info.panel.audio_mode); } if (-1 == xioctl (p_info, VIDIOCSAUDIO, &audio)) goto failure; if (p_info->read_back_controls) { /* Error ignored */ xioctl (p_info, VIDIOCGAUDIO, &audio); } if (no_read && c->pub.value != value) { c->pub.value = value; tv_callback_notify (&p_info->info, &c->pub, c->pub._callback); } update_control_set_v4l (p_info, NULL, NULL, &audio, AUDIO_CONTROLS); } else { t_warn ("Invalid c->id 0x%x\n", c->id); p_info->info.tveng_errno = -1; /* unknown */ goto failure; } return temp_close (p_info, 0); failure: /* Error ignored. */ temp_close (p_info, 0); return FALSE; } static tv_control * add_control (struct private_tveng1_device_info *p_info, unsigned int id, const char * label, const char * atom, tv_control_id tcid, tv_control_type type, int cur, int def, int minimum, int maximum, int step) { struct control c; tv_control *tc; CLEAR (c); c.pub.type = type; c.pub.id = tcid; if (!(c.pub.label = strdup (_(label)))) return NULL; c.pub.minimum = minimum; c.pub.maximum = maximum; c.pub.step = step; c.pub.reset = def; c.pub.value = cur; c.id = id; if (atom) { /* Error handled in get/set functions. */ c.atom = XInternAtom (p_info->info.display, atom, /* only_if_exists */ False); } if ((tc = append_panel_control (&p_info->info, &c.pub, sizeof (c)))) { p_info->all_controls |= id; return tc; } else { free (c.pub.label); return NULL; } } /* The range 0 ... 65535 is mandated by the v4l spec. We add a reset value of 32768 and a step value of 256. V4L does not report the actual reset value and hardware resolution but for a UI these values should do. */ #define ADD_STD_CONTROL(name, label, id, atom, value) \ add_control (p_info, CONTROL_##name, _(label), atom, \ TV_CONTROL_ID_##id, TV_CONTROL_TYPE_INTEGER, \ value, 32768, 0, 65535, 256) static tv_bool get_video_control_list (struct private_tveng1_device_info *p_info) { struct video_picture pict; CLEAR (pict); if (-1 == xioctl (p_info, VIDIOCGPICT, &pict)) return FALSE; ADD_STD_CONTROL (BRIGHTNESS, "Brightness", BRIGHTNESS, "XV_BRIGHTNESS", pict.brightness); ADD_STD_CONTROL (CONTRAST, "Contrast", CONTRAST, "XV_CONTRAST", pict.contrast); ADD_STD_CONTROL (COLOUR, "Saturation", SATURATION, "XV_SATURATION", pict.colour); ADD_STD_CONTROL (HUE, "Hue", HUE, "XV_HUE", pict.hue); return TRUE; } static tv_bool get_audio_control_list (struct private_tveng1_device_info *p_info) { struct video_audio audio; tv_bool rewrite; assert (-1 != p_info->info.fd); CLEAR (audio); if (-1 == xioctl_may_fail (p_info, VIDIOCGAUDIO, &audio)) { switch (errno) { case EINVAL: case ENODEV: /* Tim: rivatv driver returns ENODEV when the card has no audio. */ return TRUE; /* success, no audio support */ default: ioctl_failure (&p_info->info, __FILE__, __PRETTY_FUNCTION__, __LINE__, "VIDIOCGAUDIO"); return FALSE; } } rewrite = FALSE; if (audio.flags & VIDEO_AUDIO_MUTABLE) { if (!p_info->mute_flag_readable) { audio.flags |= VIDEO_AUDIO_MUTE; rewrite = TRUE; } p_info->control_mute = add_control (p_info, CONTROL_MUTE, _("Mute"), "XV_MUTE", TV_CONTROL_ID_MUTE, TV_CONTROL_TYPE_BOOLEAN, (audio.flags & VIDEO_AUDIO_MUTE) != 0, /* default */ 0, /* minimum */ 0, /* maximum */ 1, /* step */ 1); } /* XXX drivers may not support them all, should probe. */ if (audio.flags & VIDEO_AUDIO_VOLUME) ADD_STD_CONTROL (VOLUME, "Volume", VOLUME, "XV_VOLUME", audio.volume); if (audio.flags & VIDEO_AUDIO_BASS) ADD_STD_CONTROL (BASS, "Bass", BASS, NULL, audio.bass); if (audio.flags & VIDEO_AUDIO_TREBLE) ADD_STD_CONTROL (TREBLE, "Treble", TREBLE, NULL, audio.treble); #ifdef VIDEO_AUDIO_BALANCE if (audio.flags & VIDEO_AUDIO_BALANCE) ADD_STD_CONTROL (BALANCE, "Balance", UNKNOWN, NULL, audio.balance); #endif p_info->control_audio_dec = NULL; if (0 != p_info->tuner_audio_capability && !SINGLE_BIT (p_info->tuner_audio_capability)) p_info->control_audio_dec = append_audio_mode_control (&p_info->info, p_info->tuner_audio_capability); if (rewrite) { /* Can't read values, we must write to synchronize. Error ignored. */ xioctl (p_info, VIDIOCSAUDIO, &audio); } return TRUE; } static tv_bool get_pwc_control_list (struct private_tveng1_device_info *p_info) { struct video_window window; assert (-1 != p_info->info.fd); CLEAR (window); if (-1 == xioctl (p_info, VIDIOCGWIN, &window)) return FALSE; p_info->control_pwc_fps = add_control (p_info, CONTROL_PWC_FPS, _("Frame Rate"), /* atom */ NULL, TV_CONTROL_ID_UNKNOWN, TV_CONTROL_TYPE_INTEGER, (window.flags & PWC_FPS_FRMASK) >> PWC_FPS_SHIFT, /* default */ 10, /* minimum */ 5, /* maximum */ 30, /* step */ 5); p_info->control_pwc_snapshot = /* TRANSLATORS: PWC driver control. In 'Snapshot' mode the camera freezes its automatic exposure and colour balance controls. */ add_control (p_info, CONTROL_PWC_SNAPSHOT, _("Snapshot Mode"), /* atom */ NULL, TV_CONTROL_ID_UNKNOWN, TV_CONTROL_TYPE_BOOLEAN, !!(window.flags & PWC_FPS_SNAPSHOT), /* default */ 0, /* minimum */ 0, /* maximum */ 1, /* step */ 1); return TRUE; } static tv_bool get_control_list (struct private_tveng1_device_info *p_info) { free_panel_controls (&p_info->info); p_info->all_controls = 0; if (!get_video_control_list (p_info)) return FALSE; if (!get_audio_control_list (p_info)) return FALSE; if (DRIVER_PWC == p_info->driver) { if (!get_pwc_control_list (p_info)) return FALSE; } return TRUE; } /* Video standards */ /* Test whether struct video_channel.norm can be used to get and set the current video standard. */ static tv_bool channel_norm_test (struct private_tveng1_device_info *p_info) { struct video_channel channel; tv_video_line *l; unsigned int old_norm; unsigned int new_norm; tv_bool success; if (DRIVER_BTTV == p_info->driver || DRIVER_RIVATV == p_info->driver) return TRUE; for_all (l, p_info->info.panel.video_inputs) if (l->type == TV_VIDEO_LINE_TYPE_BASEBAND) break; if (!l) return FALSE; assert (-1 != p_info->info.fd); CLEAR (channel); channel.channel = VI (l)->channel; if (-1 == xioctl (p_info, VIDIOCGCHAN, &channel)) return FALSE; old_norm = channel.norm; new_norm = (old_norm == 0); /* PAL -> NTSC, NTSC -> PAL */ channel.norm = new_norm; if (-1 == xioctl (p_info, VIDIOCSCHAN, &channel)) return FALSE; if (0 == xioctl (p_info, VIDIOCGCHAN, &channel)) { success = (channel.norm == new_norm); } else { success = FALSE; } channel.norm = old_norm; if (-1 == xioctl (p_info, VIDIOCSCHAN, &channel)) return FALSE; return success; } static tv_bool update_capture_limits (struct private_tveng1_device_info *p_info) { struct video_capability caps; if (p_info->use_overlay_limits) return TRUE; if (TVENG1_RIVATV_TEST) { tv_video_standard *s; s = p_info->info.panel.cur_video_standard; if (NULL != s) { p_info->info.caps.maxwidth = s->frame_width; p_info->info.caps.maxheight = s->frame_height; return TRUE; } } if (!temp_open (p_info)) return FALSE; if (0 == xioctl (p_info, VIDIOCGCAP, &caps)) { /* XXX all conversion routines cannot handle arbitrary widths yet. */ p_info->info.caps.minwidth = (caps.minwidth + 7) & ~7; p_info->info.caps.minheight = caps.minheight; p_info->info.caps.maxwidth = caps.maxwidth & ~7; p_info->info.caps.maxheight = caps.maxheight; } else { /* Let's hope this is ok. */ p_info->info.caps.minwidth = 352; p_info->info.caps.minheight = 240; p_info->info.caps.maxwidth = 640; p_info->info.caps.maxheight = 480; } return temp_close (p_info, 0); } static tv_bool get_video_standard (tveng_device_info * info) { struct private_tveng1_device_info *p_info = P_INFO (info); tv_video_standard *s; unsigned int old_open_count; unsigned int norm; old_open_count = p_info->temp_open_count; s = NULL; /* unknown */ if (!info->panel.video_standards) goto store_s; if (info->panel.cur_video_input && P_INFO (info)->channel_norm_usable) { struct video_channel channel; if (!temp_open (p_info)) goto failure; CLEAR (channel); channel.channel = VI(info->panel.cur_video_input)->channel; if (-1 == xioctl (p_info, VIDIOCGCHAN, &channel)) goto failure; norm = channel.norm; } else if (IS_TUNER_LINE (info->panel.cur_video_input)) { struct video_tuner tuner; if (!temp_open (p_info)) goto failure; CLEAR (tuner); tuner.tuner = VI (info->panel.cur_video_input)->tuner; if (-1 == xioctl (p_info, VIDIOCGTUNER, &tuner)) goto failure; norm = tuner.mode; } else { struct video_tuner tuner; tv_video_line *l; /* Apparently some V4L drivers (still?) do not report the video standard used by the current video input unless it has a tuner. We query the first video input with tuner, if any. */ for_all (l, info->panel.video_inputs) if (l->type == TV_VIDEO_LINE_TYPE_TUNER) break; if (NULL == l) goto store_s; if (!temp_open (p_info)) goto failure; CLEAR (tuner); tuner.tuner = VI (l)->tuner; if (-1 == xioctl (p_info, VIDIOCGTUNER, &tuner)) goto failure; norm = tuner.mode; } for_all (s, info->panel.video_standards) if (S(s)->norm == norm) break; store_s: store_cur_video_standard (info, s); set_audio_capability (P_INFO (info)); if (!update_capture_limits (p_info)) goto failure; /* Close if we opened. */ return temp_close (p_info, old_open_count); failure: /* Error ignored. */ temp_close (p_info, old_open_count); return FALSE; } static tv_bool set_video_standard (tveng_device_info * info, tv_video_standard * s) { struct private_tveng1_device_info *p_info = P_INFO (info); unsigned int old_open_count; unsigned int norm; int r; if (p_info->overlay_active | p_info->capture_active) return FALSE; old_open_count = p_info->temp_open_count; norm = CS(s)->norm; if (info->panel.cur_video_input && p_info->channel_norm_usable) { struct video_channel channel; if (!temp_open (p_info)) goto failure; CLEAR (channel); channel.channel = VI (info->panel.cur_video_input)->channel; if (-1 == xioctl (p_info, VIDIOCGCHAN, &channel)) goto failure; if (channel.norm == norm) goto success; channel.norm = norm; r = xioctl (p_info, VIDIOCSCHAN, &channel); if (0 == r) { store_cur_video_standard (info, s); set_audio_capability (P_INFO (info)); if (!update_capture_limits (p_info)) goto failure; } } else if (IS_TUNER_LINE (info->panel.cur_video_input)) { struct video_tuner tuner; if (!temp_open (p_info)) goto failure; CLEAR (tuner); tuner.tuner = VI (info->panel.cur_video_input)->tuner; if (-1 == xioctl (p_info, VIDIOCGTUNER, &tuner)) goto failure; if (tuner.mode == norm) goto success; if (!(tuner.flags & VIDEO_TUNER_NORM)) { errno = -1; /* FIXME */ goto failure; /* not setable */ } tuner.mode = norm; r = xioctl (p_info, VIDIOCSTUNER, &tuner); if (0 == r) { store_cur_video_standard (info, s); set_audio_capability (P_INFO (info)); if (!update_capture_limits (p_info)) goto failure; } } else { struct video_channel channel; struct video_tuner tuner; tv_video_line *l; tv_bool switched; /* Switch to an input with tuner, change video standard and then switch back. */ switched = FALSE; for_all (l, info->panel.video_inputs) if (l->type == TV_VIDEO_LINE_TYPE_TUNER) break; if (!l) { errno = -1; /* FIXME */ goto failure; } if (!temp_open (p_info)) goto failure; CLEAR (channel); channel.channel = VI (l)->channel; if (-1 == xioctl (p_info, VIDIOCGCHAN, &channel)) goto failure; if (channel.norm == norm) goto success; if (-1 == xioctl (p_info, VIDIOCSCHAN, &channel)) goto failure; CLEAR (tuner); tuner.tuner = VI (l)->tuner; r = xioctl (p_info, VIDIOCGTUNER, &tuner); if (-1 == r) goto restore; if (!(tuner.flags & VIDEO_TUNER_NORM)) { r = -1; goto restore; } tuner.mode = norm; r = xioctl (p_info, VIDIOCSTUNER, &tuner); switched = (0 == r); restore: channel.channel = VI (info->panel.cur_video_input)->channel; r = xioctl (p_info, VIDIOCSCHAN, &channel); if (-1 == r) { /* Notify about accidental video input change. */ store_cur_video_input (info, l); } if (switched) { if (get_video_standard (info)) { store_cur_video_standard (info, s); set_audio_capability (P_INFO (info)); if (!update_capture_limits (p_info)) goto failure; } else { r = -1; } } if (-1 == r) goto failure; } success: /* Close if we opened. */ return temp_close (p_info, old_open_count); failure: /* Error ignored. */ temp_close (p_info, old_open_count); return FALSE; } struct standard_map { const char * label; tv_videostd_set set; }; /* Standards defined by V4L, VIDEO_MODE_ order. */ static const struct standard_map v4l_standards [] = { /* We don't really know what exactly these videostandards are, it depends on the hardware and driver configuration. */ { "PAL", TV_VIDEOSTD_SET_PAL }, { "NTSC", TV_VIDEOSTD_SET_NTSC }, { "SECAM", TV_VIDEOSTD_SET_SECAM }, #if 0 /* We need video standard parameters (frame size, rate) and it's impossible (I think) to determine which standard has been detected, so this is pretty much useless. Also drivers supporting AUTO may not really detect standards but only distinguish between 525 and 625 systems. */ { "AUTO", TV_VIDEOSTD_SET_UNKNOWN }, #endif { NULL, 0 } }; /* Standards defined by bttv driver. */ static const struct standard_map bttv_standards [] = { { "PAL", TV_VIDEOSTD_SET_PAL }, { "NTSC", TV_VIDEOSTD_SET (TV_VIDEOSTD_NTSC_M) }, { "SECAM", TV_VIDEOSTD_SET_SECAM }, { "PAL-NC", TV_VIDEOSTD_SET (TV_VIDEOSTD_PAL_NC) }, { "PAL-M", TV_VIDEOSTD_SET (TV_VIDEOSTD_PAL_M) }, { "PAL-N", TV_VIDEOSTD_SET (TV_VIDEOSTD_PAL_N) }, { "NTSC-JP", TV_VIDEOSTD_SET (TV_VIDEOSTD_NTSC_M_JP) }, { NULL, 0 } }; static tv_bool get_video_standard_list (struct private_tveng1_device_info *p_info) { const struct standard_map *table; unsigned int flags; unsigned int i; if (!p_info->info.panel.cur_video_input) { free_video_standards (&p_info->info); return TRUE; } if (DRIVER_BTTV == p_info->driver) { if (p_info->info.panel.video_standards) goto get_current; /* invariable */ table = bttv_standards; } else { table = v4l_standards; } free_video_standards (&p_info->info); if (IS_TUNER_LINE (p_info->info.panel.cur_video_input)) { /* For API compatibility bttv's VIDICGTUNER reports only PAL, NTSC, SECAM. */ if (DRIVER_BTTV == p_info->driver) { /* XXX perhaps we can probe supported standards? */ flags = (unsigned int) ~0; } else { struct video_tuner tuner; tv_video_line *ci; assert (-1 != p_info->info.fd); CLEAR (tuner); ci = p_info->info.panel.cur_video_input; tuner.tuner = VI (ci)->tuner; if (-1 == xioctl (p_info, VIDIOCGTUNER, &tuner)) return FALSE; flags = tuner.flags; } } else { /* Supported video standards of baseband inputs are not reported. */ flags = (unsigned int) ~0; } for (i = 0; table[i].label; ++i) { struct standard *s; if (!(flags & (1 << i))) continue; /* unsupported standard */ if (!(s = S(append_video_standard (&p_info->info.panel.video_standards, table[i].set, table[i].label, table[i].label, sizeof (*s))))) goto failure; s->norm = i; } get_current: if (TVENG1_RIVATV_TEST) { struct video_channel channel; assert (-1 != p_info->info.fd); CLEAR (channel); if (0 == xioctl (p_info, VIDIOCGCHAN, &channel)) { channel.norm = VIDEO_MODE_AUTO; /* Error ignored. */ xioctl (p_info, VIDIOCSCHAN, &channel); } } if (get_video_standard (&p_info->info)) { if (NULL == p_info->info.panel.cur_video_standard) { tv_video_standard *s; /* AUTO not acceptable. */ s = p_info->info.panel.video_standards; /* first */ /* Error ignored. */ set_video_standard (&p_info->info, s); } return TRUE; } failure: free_video_standard_list (&p_info->info.panel.video_standards); return FALSE; } /* Video inputs */ #define SCALE_FREQUENCY(vi, freq) \ ((((freq) & ~ (unsigned long) vi->step_shift) \ * vi->pub.u.tuner.step) >> vi->step_shift) static void store_frequency (struct private_tveng1_device_info *p_info, struct video_input * vi, unsigned long freq) { unsigned int frequency = SCALE_FREQUENCY (vi, freq); if (vi->pub.u.tuner.frequency != frequency) { vi->pub.u.tuner.frequency = frequency; tv_callback_notify (&p_info->info, &vi->pub, vi->pub._callback); } } static tv_bool get_tuner_frequency (tveng_device_info * info, tv_video_line * l) { struct private_tveng1_device_info *p_info = P_INFO (info); unsigned long freq; int r; /* cur_video_input may not be up-to-date, but there is no ioctl to verify. */ if (info->panel.cur_video_input != l) return TRUE; freq = 0; #if defined (HAVE_XV_EXTENSION) && TVENG1_XV_TEST if ((-1 == p_info->info.fd) & p_info->overlay_active & p_info->grabbed_xv_port & p_info->exclusive_open) { int value; if (None == p_info->xa_xv_freq) { t_warn ("No freq atom\n"); info->tveng_errno = -1; /* unknown */ return FALSE; } r = !!_tv_xv_get_port_attribute (info, p_info->xa_xv_freq, &value) - 1; freq = value; } else #endif { if (!temp_open (p_info)) return FALSE; r = xioctl (p_info, VIDIOCGFREQ, &freq); if (!temp_close (p_info, 0)) return FALSE; } if (-1 == r) return FALSE; store_frequency (p_info, VI (l), freq); return TRUE; } static tv_bool set_tuner_frequency (tveng_device_info * info, tv_video_line * l, unsigned int frequency) { struct private_tveng1_device_info *p_info = P_INFO (info); struct video_input *vi = VI (l); unsigned int old_open_count; unsigned long old_freq; unsigned long new_freq; old_open_count = p_info->temp_open_count; new_freq = (frequency << vi->step_shift) / vi->pub.u.tuner.step; /* cur_video_input may not be up-to-date, but there is no ioctl to verify. */ if (info->panel.cur_video_input != l) goto store_new_freq; #if defined (HAVE_XV_EXTENSION) && TVENG1_XV_TEST if ((-1 == p_info->info.fd) & p_info->overlay_active & p_info->grabbed_xv_port & p_info->exclusive_open) { if (None == p_info->xa_xv_freq) { t_warn ("No freq atom\n"); info->tveng_errno = -1; /* unknown */ goto failure; } if (!_tv_xv_set_port_attribute (info, p_info->xa_xv_freq, new_freq)) goto failure; } else #endif { if (!temp_open (p_info)) goto failure; old_freq = 0; if (0 == xioctl (p_info, VIDIOCGFREQ, &old_freq)) if (old_freq == new_freq) goto store_new_freq; if (-1 == xioctl (p_info, VIDIOCSFREQ, &new_freq)) { store_frequency (p_info, vi, old_freq); goto failure; } } /* Bttv mutes the input if the signal strength is too low, we don't want that. However usually the quiet switch will be set anyway. */ if (p_info->control_mute && !info->quiet) set_control (info, p_info->control_mute, p_info->control_mute->value); if (CAPTURE_MODE_READ == info->capture_mode) { unsigned int i; /* XXX do it like v4l2 */ for (i = 0; i < p_info->n_buffers; ++i) { tv_clear_image (p_info->buffers[i].data, &info->capture.format); } } store_new_freq: store_frequency (p_info, vi, new_freq); /* Close if we opened. */ return temp_close (p_info, old_open_count); failure: /* Error ignored. */ temp_close (p_info, old_open_count); return FALSE; } static tv_bool get_signal_strength (tveng_device_info * info, int * strength, int * afc _unused_) { struct private_tveng1_device_info *p_info = P_INFO (info); struct video_tuner tuner; if (NULL == strength) return TRUE; if (!temp_open (p_info)) return FALSE; CLEAR (tuner); tuner.tuner = 0; /* XXX correct? */ if (-1 == xioctl (p_info, VIDIOCGTUNER, &tuner)) { /* Error ignored. */ temp_close (p_info, 0); return FALSE; } *strength = tuner.signal; return temp_close (p_info, 0); } static tv_bool set_video_input (tveng_device_info * info, tv_video_line * l) { struct private_tveng1_device_info *p_info = P_INFO (info); struct video_channel channel; if (p_info->overlay_active | p_info->capture_active) return FALSE; if (!temp_open (p_info)) return FALSE; CLEAR (channel); channel.channel = CVI (l)->channel; if (-1 == xioctl (p_info, VIDIOCGCHAN, &channel)) goto failure; /* There is no ioctl to query the current video input, so unfortunately we cannot take a shortcut. */ if (-1 == xioctl (p_info, VIDIOCSCHAN, &channel)) goto failure; store_cur_video_input (info, l); /* Implies get_video_standard() and set_audio_capability(). */ get_video_standard_list (p_info); /* V4L does not promise per-tuner frequency setting as we do. XXX in panel mode ignores the possibility that a third party changed the frequency from the value we know. */ if (IS_TUNER_LINE (l)) { tv_video_line *ci; ci = info->panel.cur_video_input; set_tuner_frequency (info, ci, ci->u.tuner.frequency); } return temp_close (p_info, 0); failure: /* Error ignored. */ temp_close (p_info, 0); return FALSE; } static tv_bool tuner_bounds (struct private_tveng1_device_info *p_info, struct video_input * vi) { struct video_tuner tuner; unsigned long freq; assert (-1 != p_info->info.fd); CLEAR (tuner); tuner.tuner = vi->tuner; if (-1 == xioctl (p_info, VIDIOCGTUNER, &tuner)) return FALSE; assert (tuner.rangelow <= tuner.rangehigh); if (tuner.flags & VIDEO_TUNER_LOW) { /* Actually step is 62.5 Hz, but why unnecessarily complicate things. */ vi->pub.u.tuner.step = 125; vi->step_shift = 1; tuner.rangelow = MIN ((unsigned int) tuner.rangelow, UINT_MAX / 125); tuner.rangehigh = MIN ((unsigned int) tuner.rangehigh, UINT_MAX / 125); } else { vi->pub.u.tuner.step = 62500; vi->step_shift = 0; tuner.rangelow = MIN ((unsigned int) tuner.rangelow, UINT_MAX / 62500); tuner.rangehigh = MIN ((unsigned int) tuner.rangehigh, UINT_MAX / 62500); } vi->pub.u.tuner.minimum = SCALE_FREQUENCY (vi, tuner.rangelow); vi->pub.u.tuner.maximum = SCALE_FREQUENCY (vi, tuner.rangehigh); if (-1 == xioctl (p_info, VIDIOCGFREQ, &freq)) return FALSE; store_frequency (p_info, vi, freq); return TRUE; } static tv_bool get_video_input_list (struct private_tveng1_device_info *p_info) { struct video_channel channel; unsigned int i; free_video_inputs (&p_info->info); for (i = 0; i < (unsigned int) p_info->info.caps.channels; ++i) { struct video_input *vi; char buf[sizeof (channel.name) + 1]; tv_video_line_type type; assert (-1 != p_info->info.fd); CLEAR (channel); channel.channel = i; if (-1 == xioctl (p_info, VIDIOCGCHAN, &channel)) continue; switch (channel.type) { case VIDEO_TYPE_TV: if (TVENG1_RIVATV_TEST) continue; type = TV_VIDEO_LINE_TYPE_TUNER; break; case VIDEO_TYPE_CAMERA: type = TV_VIDEO_LINE_TYPE_BASEBAND; break; default: /* ? */ continue; } /* Sometimes NUL is missing. */ z_strlcpy (buf, channel.name, sizeof (buf)); if (!(vi = VI (append_video_line (&p_info->info.panel.video_inputs, type, buf, buf, sizeof (*vi))))) goto failure; vi->pub._parent = p_info; vi->channel = i; /* FIXME allocate one video_line for each tuner. */ vi->tuner = 0; if (channel.type == VIDEO_TYPE_TV) { if (-1 == xioctl (p_info, VIDIOCSCHAN, &channel)) return FALSE; if (!tuner_bounds (p_info, vi)) goto failure; } } return TRUE; failure: free_video_line_list (&p_info->info.panel.video_inputs); return FALSE; } /* Capture and Overlay */ static tv_pixfmt palette_to_pixfmt (unsigned int palette) { switch (Z_BYTE_ORDER) { case Z_LITTLE_ENDIAN: switch (palette) { case VIDEO_PALETTE_GREY: return TV_PIXFMT_Y8; case VIDEO_PALETTE_HI240: return TV_PIXFMT_UNKNOWN; case VIDEO_PALETTE_RGB565: return TV_PIXFMT_BGR16_LE; case VIDEO_PALETTE_RGB24: return TV_PIXFMT_BGR24_LE; case VIDEO_PALETTE_RGB32: return TV_PIXFMT_BGRA32_LE; case VIDEO_PALETTE_RGB555: return TV_PIXFMT_BGRA16_LE; case VIDEO_PALETTE_YUV422: return TV_PIXFMT_YUYV; case VIDEO_PALETTE_YUYV: return TV_PIXFMT_YUYV; case VIDEO_PALETTE_UYVY: return TV_PIXFMT_UYVY; case VIDEO_PALETTE_YUV420: return TV_PIXFMT_UNKNOWN; case VIDEO_PALETTE_YUV411: return TV_PIXFMT_UNKNOWN; case VIDEO_PALETTE_RAW: return TV_PIXFMT_UNKNOWN; case VIDEO_PALETTE_YUV422P: return TV_PIXFMT_YUV422; case VIDEO_PALETTE_YUV411P: return TV_PIXFMT_YUV411; case VIDEO_PALETTE_YUV420P: return TV_PIXFMT_YUV420; case VIDEO_PALETTE_YUV410P: return TV_PIXFMT_YUV410; } break; case Z_BIG_ENDIAN: switch (palette) { case VIDEO_PALETTE_GREY: return TV_PIXFMT_Y8; case VIDEO_PALETTE_HI240: return TV_PIXFMT_UNKNOWN; case VIDEO_PALETTE_RGB565: return TV_PIXFMT_BGR16_BE; case VIDEO_PALETTE_RGB24: return TV_PIXFMT_BGR24_BE; case VIDEO_PALETTE_RGB32: return TV_PIXFMT_BGRA32_BE; case VIDEO_PALETTE_RGB555: return TV_PIXFMT_BGRA16_BE; case VIDEO_PALETTE_YUV422: return TV_PIXFMT_YUYV; case VIDEO_PALETTE_YUYV: return TV_PIXFMT_YUYV; case VIDEO_PALETTE_UYVY: return TV_PIXFMT_UYVY; case VIDEO_PALETTE_YUV420: return TV_PIXFMT_UNKNOWN; case VIDEO_PALETTE_YUV411: return TV_PIXFMT_UNKNOWN; case VIDEO_PALETTE_RAW: return TV_PIXFMT_UNKNOWN; case VIDEO_PALETTE_YUV422P: return TV_PIXFMT_YUV422; case VIDEO_PALETTE_YUV411P: return TV_PIXFMT_YUV411; case VIDEO_PALETTE_YUV420P: return TV_PIXFMT_YUV420; case VIDEO_PALETTE_YUV410P: return TV_PIXFMT_YUV410; } break; } return TV_PIXFMT_UNKNOWN; } static unsigned int pixfmt_to_palette (struct private_tveng1_device_info *p_info, tv_pixfmt pixfmt) { switch (pixfmt) { case TV_PIXFMT_Y8: return VIDEO_PALETTE_GREY; case TV_PIXFMT_BGR16_LE: return VIDEO_PALETTE_RGB565; case TV_PIXFMT_BGR24_LE: return VIDEO_PALETTE_RGB24; case TV_PIXFMT_BGRA32_LE: return VIDEO_PALETTE_RGB32; case TV_PIXFMT_BGRA16_LE: return VIDEO_PALETTE_RGB555; case TV_PIXFMT_YUYV: return p_info->palette_yuyv; case TV_PIXFMT_UYVY: return VIDEO_PALETTE_UYVY; case TV_PIXFMT_YUV422: return VIDEO_PALETTE_YUV422P; case TV_PIXFMT_YUV411: return VIDEO_PALETTE_YUV411P; case TV_PIXFMT_YUV420: return VIDEO_PALETTE_YUV420P; case TV_PIXFMT_YUV410: return VIDEO_PALETTE_YUV410P; default: return 0; } } static unsigned int tv_to_v4l_chromakey (unsigned int chromakey) { switch (Z_BYTE_ORDER) { case Z_LITTLE_ENDIAN: /* XXX correct? 0xAARRGGBB */ return chromakey & 0xFFFFFF; case Z_BIG_ENDIAN: /* XXX correct? 0xBBGGRRAA */ return (((chromakey & 0xFF) << 24) | ((chromakey & 0xFF00) << 8) | ((chromakey & 0xFF0000) >> 8)); default: assert (0); } return 0; } static unsigned int v4l_to_tv_chromakey (unsigned int chromakey) { switch (Z_BYTE_ORDER) { case Z_LITTLE_ENDIAN: /* XXX correct? 0xAARRGGBB */ return chromakey & 0xFFFFFF; case Z_BIG_ENDIAN: /* XXX correct? 0xBBGGRRAA */ return (((chromakey & 0xFF00) << 8) | ((chromakey & 0xFF0000) >> 8) | ((chromakey & 0xFF000000) >> 24)); default: assert (0); } return 0; } /* Struct video_picture and video_window determine parameters for capturing and overlay. */ static tv_bool get_capture_and_overlay_parameters (struct private_tveng1_device_info *p_info) { struct video_picture pict; struct video_window window; if (!temp_open (p_info)) return FALSE; CLEAR (pict); if (-1 == xioctl (p_info, VIDIOCGPICT, &pict)) goto failure; CLEAR (window); if (-1 == xioctl (p_info, VIDIOCGWIN, &window)) goto failure; /* Current capture format. */ if (!tv_image_format_init (&p_info->info.capture.format, window.width, window.height, /* bytes_per_line: minimum */ 0, palette_to_pixfmt (pict.palette), TV_COLSPC_UNKNOWN)) { p_info->info.tveng_errno = -1; /* unknown */ tv_error_msg(&p_info->info, "Cannot understand the palette"); goto failure; } /* Current overlay window. */ p_info->info.overlay.window.x = window.x; p_info->info.overlay.window.y = window.y; p_info->info.overlay.window.width = window.width; p_info->info.overlay.window.height = window.height; /* Overlay clips cannot be read back, we assume no change. tveng.c takes care of p_info->info.overlay.clip_vector. */ p_info->info.overlay.chromakey = v4l_to_tv_chromakey (window.chromakey); update_control_set_v4l (p_info, &pict, &window, NULL, PICT_CONTROLS | WINDOW_CONTROLS); return temp_close (p_info, 0); failure: /* Error ignored. */ temp_close (p_info, 0); return FALSE; } /* Overlay */ static tv_bool get_overlay_buffer (tveng_device_info * info) { struct private_tveng1_device_info *p_info = P_INFO (info); struct video_buffer buffer; tv_pixfmt pixfmt; CLEAR (p_info->info.overlay.buffer); if (!(p_info->info.caps.flags & TVENG_CAPS_OVERLAY)) return FALSE; if (!temp_open (p_info)) return FALSE; CLEAR (buffer); if (-1 == xioctl (p_info, VIDIOCGFBUF, &buffer)) goto failure; p_info->info.overlay.buffer.base = (unsigned long) buffer.base; if (0 && DRIVER_RIVATV == p_info->driver) { p_info->info.overlay.buffer.format = p_info->overlay_buffer_format; goto success; } pixfmt = pig_depth_to_pixfmt ((unsigned int) buffer.depth); if (tv_image_format_init (&info->overlay.buffer.format, (unsigned int) buffer.width, (unsigned int) buffer.height, (unsigned int) buffer.bytesperline, pixfmt, TV_COLSPC_UNKNOWN)) { if (TVENG1_RIVATV_TEST) { /* This is just a simulation, must not exceed the real limits. */ } else if (TVENG_ATTACH_XV == p_info->info.attach_mode && DRIVER_RIVATV == p_info->driver) { /* Overlay has no limits, but VIDIOCGCAP tells only when overlay is already enabled. */ p_info->info.caps.maxwidth = buffer.width; p_info->info.caps.maxheight = buffer.height; p_info->use_overlay_limits = TRUE; } } else { tv_error_msg (info, _("Driver %s returned an unknown or " "invalid frame buffer format."), p_info->info.node.label); p_info->info.tveng_errno = EINVAL; } success: return temp_close (p_info, 0); failure: /* Error ignored. */ temp_close (p_info, 0); return FALSE; } static tv_bool set_overlay_buffer (tveng_device_info * info, const tv_overlay_buffer *target) { struct private_tveng1_device_info *p_info = P_INFO (info); struct video_buffer buffer; const tv_pixel_format *pf; if (!(p_info->info.caps.flags & TVENG_CAPS_OVERLAY)) return FALSE; if (0 && DRIVER_RIVATV == p_info->driver) { P_INFO (info)->overlay_buffer_format = target->format; return get_overlay_buffer (info); } if (-1 == p_info->info.fd) { /* In attach_mode CONTROL or called XvPutVideo() before. */ p_info->info.tveng_errno = errno; t_error ("Wrong mode", info); return FALSE; } buffer.base = (void *) target->base; buffer.width = target->format.width; buffer.height = target->format.height; pf = target->format.pixel_format; if (32 == pf->bits_per_pixel) buffer.depth = 32; /* depth 24 bpp 32 */ else buffer.depth = pf->color_depth; /* 15, 16, 24 */ buffer.bytesperline = target->format.bytes_per_line[0]; if (-1 == xioctl (p_info, VIDIOCSFBUF, &buffer)) return FALSE; return get_overlay_buffer (info); } static tv_bool get_overlay_window (tveng_device_info * info) { return get_capture_and_overlay_parameters (P_INFO (info)); } /* Sets the preview window dimensions to the given window. Success doesn't mean that the requested dimensions are used, maybe they are different, check the returned fields to see if they are suitable info : Device we are controlling */ static tv_bool set_overlay_window (tveng_device_info * info, const tv_window * w, const tv_clip_vector * v, unsigned int chromakey) { struct private_tveng1_device_info * p_info = P_INFO (info); struct video_window window; struct video_clip *clips; if (-1 == p_info->info.fd) { /* In attach_mode CONTROL or called XvPutVideo() before. */ p_info->info.tveng_errno = errno; t_error ("Wrong mode", info); return FALSE; } if (v->size > 0) { struct video_clip *vc; const tv_clip *tc; unsigned int i; clips = malloc (v->size * sizeof (*clips)); if (NULL == clips) { p_info->info.tveng_errno = errno; t_error("malloc", info); return FALSE; } vc = clips; tc = v->vector; for (i = 0; i < v->size; ++i) { vc->next = vc + 1; /* just in case */ vc->x = tc->x1; vc->y = tc->y1; vc->width = tc->x2 - tc->x1; vc->height = tc->y2 - tc->y1; ++vc; ++tc; } vc[-1].next = NULL; } else { clips = NULL; } CLEAR (window); window.x = w->x - p_info->info.overlay.buffer.x; window.y = w->y - p_info->info.overlay.buffer.y; window.width = w->width; window.height = w->height; window.clips = clips; window.clipcount = v->size; window.chromakey = tv_to_v4l_chromakey (chromakey); if (-1 == xioctl (p_info, VIDIOCSWIN, &window)) { free (clips); return FALSE; } free (clips); /* Actual window size. */ if (-1 == xioctl (p_info, VIDIOCGWIN, &window)) return FALSE; p_info->info.overlay.window.x = window.x; p_info->info.overlay.window.y = window.y; p_info->info.overlay.window.width = window.width; p_info->info.overlay.window.height = window.height; /* Clips cannot be read back, we assume no change. tveng.c takes care of p_info->info.overlay.clip_vector. */ p_info->info.overlay.chromakey = v4l_to_tv_chromakey (window.chromakey); return TRUE; } #if defined (HAVE_XV_EXTENSION) && TVENG1_XV_TEST static tv_bool set_overlay_xwindow (tveng_device_info * info, Window window, GC gc, unsigned int chromakey) { struct private_tveng1_device_info * p_info = P_INFO (info); /* The XVideo V4L wrapper supports only clip-list overlay. (Or does it?) */ /* XXX tell the caller. */ chromakey = chromakey; if (!p_info->grabbed_xv_port) { /* XXX shouldn't attach_device report this? */ p_info->info.tveng_errno = EBUSY; t_error("XvGrabPort", info); return FALSE; } p_info->xwindow = window; p_info->xgc = gc; return TRUE; } #endif static tv_bool enable_overlay (tveng_device_info * info, tv_bool on) { struct private_tveng1_device_info * p_info = P_INFO (info); int value = !!on; #if defined (HAVE_XV_EXTENSION) && TVENG1_XV_TEST if (p_info->grabbed_xv_port && 0 != p_info->xwindow && 0 != p_info->xgc) { tv_bool success; if (p_info->overlay_active == on) return TRUE; if (on) { success = put_video (p_info); p_info->overlay_active = success; } else { success = _tv_xv_stop_video (info, p_info->xwindow); p_info->overlay_active = !success; } return success; } else #endif { if (0 == xioctl (p_info, VIDIOCCAPTURE, &value)) { /* Caller shall use a timer instead. */ /* usleep (50000); */ p_info->overlay_active = TRUE; return TRUE; } else { p_info->overlay_active = FALSE; return FALSE; } } } /* Capture */ static tv_bool get_capture_format (tveng_device_info * info) { return get_capture_and_overlay_parameters (P_INFO (info)); } static tv_bool set_capture_format (tveng_device_info * info, const tv_image_format *fmt) { struct private_tveng1_device_info *p_info = P_INFO (info); struct video_picture pict1; struct video_picture pict2; struct video_window window; int r; if (-1 == p_info->info.fd) { /* In attach_mode CONTROL or called XvPutVideo() before. */ p_info->info.tveng_errno = errno; t_error ("Wrong mode", info); return FALSE; } CLEAR (pict1); if (-1 == xioctl (p_info, VIDIOCGPICT, &pict1)) return FALSE; pict1.palette = pixfmt_to_palette (p_info, fmt->pixel_format->pixfmt); if (0 == pict1.palette) { p_info->info.tveng_errno = EINVAL; tv_error_msg (info, "%s not supported", fmt->pixel_format->name); return FALSE; } r = xioctl (p_info, VIDIOCSPICT, &pict1); if (-1 == r) return FALSE; if (p_info->read_back_format) { CLEAR (pict2); r = xioctl (p_info, VIDIOCGPICT, &pict2); if (-1 == r) return FALSE; /* v4l1-compat: Discards VIDIOC_S_FMT error. */ if (pict1.palette != pict2.palette) { errno = EINVAL; return FALSE; } } p_info->info.capture.format.width = (fmt->width + 3) & (unsigned int) -4; p_info->info.capture.format.height = (fmt->height + 3) & (unsigned int) -4; p_info->info.capture.format.width = SATURATE (p_info->info.capture.format.width, p_info->info.caps.minwidth, p_info->info.caps.maxwidth); p_info->info.capture.format.height = SATURATE (p_info->info.capture.format.height, p_info->info.caps.minheight, p_info->info.caps.maxheight); CLEAR (window); window.width = p_info->info.capture.format.width; window.height = p_info->info.capture.format.height; window.clips = NULL; window.clipcount = 0; if (p_info->control_pwc_fps) { unsigned int value; value = p_info->control_pwc_fps->value; window.flags |= value << PWC_FPS_SHIFT; } if (p_info->control_pwc_snapshot) { if (p_info->control_pwc_snapshot->value) window.flags |= PWC_FPS_SNAPSHOT; } if (-1 == xioctl_may_fail (p_info, VIDIOCSWIN, &window)) { unsigned int size; int smaller; int larger; if (EINVAL != errno) { ioctl_failure (info, __FILE__, __PRETTY_FUNCTION__, __LINE__, "VIDIOCSWIN"); return FALSE; } /* May fail due to unsupported capture size (e.g. pwc driver). Let's try some common values, closest first. */ size = window.width * window.height; for (smaller = -1; smaller < (int) N_ELEMENTS (common_sizes); ++smaller) { if (size <= (common_sizes[smaller + 1].width * common_sizes[smaller + 1].height)) break; } for (larger = N_ELEMENTS (common_sizes); larger >= 0; --larger) { if (size >= (common_sizes[larger - 1].width * common_sizes[larger - 1].height)) break; } for (;;) { if (smaller >= 0) { window.width = common_sizes[smaller].width; window.height = common_sizes[smaller].height; if (0 == xioctl_may_fail (p_info, VIDIOCSWIN, &window)) break; --smaller; } else if (larger >= (int) N_ELEMENTS (common_sizes)) { ioctl_failure (info, __FILE__, __PRETTY_FUNCTION__, __LINE__, "VIDIOCSWIN"); return FALSE; } if (larger < (int) N_ELEMENTS (common_sizes)) { window.width = common_sizes[larger].width; window.height = common_sizes[larger].height; if (0 == xioctl_may_fail (p_info, VIDIOCSWIN, &window)) break; ++larger; } } } /* Actual image size. */ if (!get_capture_format (info)) return FALSE; return TRUE; } static tv_bool supported_pixfmt (tveng_device_info * info, const struct video_picture *pict, tv_pixfmt pixfmt) { struct private_tveng1_device_info *p_info = P_INFO (info); struct video_picture pict1; struct video_picture pict2; pict1 = *pict; pict1.palette = pixfmt_to_palette (p_info, pixfmt); if (0 == pict1.palette) return FALSE; if (0 == xioctl_may_fail (p_info, VIDIOCSPICT, &pict1)) { if (!p_info->read_back_format) return TRUE; CLEAR (pict2); if (-1 == xioctl_may_fail (p_info, VIDIOCGPICT, &pict2)) return FALSE; /* v4l1-compat bug: Discards VIDIOC_S_FMT error. */ if (pict1.palette == pict2.palette) return TRUE; /* These are synonyms, some drivers understand only one. */ if (VIDEO_PALETTE_YUYV == pict1.palette && VIDEO_PALETTE_YUV422 == pict2.palette) { p_info->palette_yuyv = VIDEO_PALETTE_YUV422; return TRUE; } return FALSE; } if (VIDEO_PALETTE_YUYV != pict1.palette) return FALSE; pict1.palette = VIDEO_PALETTE_YUV422; if (0 == xioctl_may_fail (p_info, VIDIOCSPICT, &pict1)) { if (!p_info->read_back_format) { p_info->palette_yuyv = VIDEO_PALETTE_YUV422; return TRUE; } CLEAR (pict2); if (-1 == xioctl_may_fail (p_info, VIDIOCGPICT, &pict2)) return FALSE; if (pict1.palette == pict2.palette) { p_info->palette_yuyv = VIDEO_PALETTE_YUV422; return TRUE; } } return FALSE; } static tv_pixfmt_set get_supported_pixfmt_set (tveng_device_info * info) { struct private_tveng1_device_info *p_info = P_INFO (info); struct video_picture pict; tv_pixfmt_set pixfmt_set; tv_pixfmt pixfmt; p_info->palette_yuyv = VIDEO_PALETTE_YUYV; if (DRIVER_RIVATV == p_info->driver) { /* rivatv 0.8.6 feature: does not EINVAL if the palette is unsupported. UYVY is always supported. Other formats if software conversion or DMA is enabled? Another ioctl testing palette is VIDIOCMCAPTURE. */ return TV_PIXFMT_SET (TV_PIXFMT_UYVY); } assert (-1 != p_info->info.fd); CLEAR (pict); if (-1 == xioctl (p_info, VIDIOCGPICT, &pict)) return TV_PIXFMT_SET_EMPTY; pixfmt_set = TV_PIXFMT_SET_EMPTY; for (pixfmt = 0; pixfmt < TV_MAX_PIXFMTS; ++pixfmt) { if (supported_pixfmt (info, &pict, pixfmt)) pixfmt_set |= TV_PIXFMT_SET (pixfmt); } return pixfmt_set; } /* FIXME this is not reentrant and my conflict with other uses. */ static sig_atomic_t timeout_alarm; static void alarm_handler (int signum _unused_) { timeout_alarm = TRUE; } static int dequeue_xbuffer (struct private_tveng1_device_info *p_info, struct xbuffer ** buffer, const struct timeval * timeout) { struct xbuffer *b; int frame; int r; assert (-1 != p_info->info.fd); *buffer = NULL; if (!(b = p_info->first_queued)) return 0; /* all buffers dequeued, timeout */ timeout_alarm = FALSE; if (timeout) { struct itimerval iv; /* Sets the timer to expire (SIGALRM) if we do not receive a frame within timeout. */ /* XXX there's only ITIMER_REAL, may conflict with caller use of timer, isn't reentrant. */ iv.it_interval.tv_sec = 0; iv.it_interval.tv_usec = 0; if (0 == (timeout->tv_sec | timeout->tv_usec)) { /* XXX can we temporarily switch to nonblocking? */ iv.it_value.tv_sec = 0; iv.it_value.tv_usec = 1000; } else { iv.it_value = *timeout; } if (-1 == setitimer (ITIMER_REAL, &iv, NULL)) { p_info->info.tveng_errno = errno; t_error("setitimer()", &p_info->info); return -1; /* error */ } } else { /* Block forever. */ } frame = b->frame_number; /* XXX must bypass device_ioctl() to get EINTR. */ while (-1 == ioctl (p_info->info.fd, VIDIOCSYNC, &frame)) { switch (errno) { case EINTR: if (timeout_alarm) return 0; /* timeout */ continue; default: return -1; /* error */ } } r = gettimeofday (&b->sample_time, /* timezone */ NULL); assert (0 == r); b->stream_time = 0; /* FIXME */ if (timeout) { struct itimerval iv; CLEAR (iv); /* cancel alarm */ /* Error ignored. */ setitimer (ITIMER_REAL, &iv, NULL); } *buffer = b; p_info->first_queued = b->next_queued; b->next_queued = NULL; b->queued = FALSE; return 1; /* success */ } static tv_bool queue_xbuffer (struct private_tveng1_device_info *p_info, struct xbuffer * b) { struct video_mmap bm; struct xbuffer **xp; assert (!b->queued); if (b->clear) { if (!tv_clear_image (b->data, &p_info->info.capture.format)) return FALSE; b->clear = FALSE; } CLEAR (bm); bm.format = pixfmt_to_palette (p_info, p_info->info.capture.format .pixel_format->pixfmt); if (0 == bm.format) { p_info ->info. tveng_errno = -1; tv_error_msg(&p_info->info, "Cannot understand the palette"); return FALSE; } bm.frame = b->frame_number; bm.width = p_info ->info. capture.format.width; bm.height = p_info ->info. capture.format.height; if (-1 == xioctl (p_info, VIDIOCMCAPTURE, &bm)) { /* This comes from xawtv, it isn't in the V4L API */ if (errno == EAGAIN) tv_error_msg(&p_info->info, "VIDIOCMCAPTURE: " "Grabber chip can't sync " "(no station tuned in?)"); return FALSE; } for (xp = &p_info->first_queued; *xp; xp = &(*xp)->next_queued) ; *xp = b; b->next_queued = NULL; b->queued = TRUE; return TRUE; } static tv_bool queue_xbuffers (struct private_tveng1_device_info *p_info) { unsigned int i; for (i = 0; i < p_info->n_buffers; ++i) { if (p_info->buffers[i].queued) continue; if (p_info->buffers[i].dequeued) continue; if (!queue_xbuffer (p_info, &p_info->buffers[i])) return FALSE; } return TRUE; } static tv_bool unmap_xbuffers (struct private_tveng1_device_info *p_info, tv_bool ignore_errors) { tv_bool success; assert (-1 != p_info->info.fd); success = TRUE; if ((void *) -1 != p_info->mapped_addr) { if (-1 == device_munmap (p_info->info.log_fp, p_info->mapped_addr, p_info->mbuf.size)) { if (!ignore_errors) { p_info->info.tveng_errno = errno; t_error("munmap()", &p_info->info); success = FALSE; } } p_info->mapped_addr = (void *) -1; } if (p_info->buffers) { free (p_info->buffers); p_info->buffers = NULL; p_info->n_buffers = 0; } return success; } static tv_bool map_xbuffers (struct private_tveng1_device_info *p_info) { unsigned int i; assert (-1 != p_info->info.fd); assert ((void *) -1 == p_info->mapped_addr && NULL == p_info->buffers); CLEAR (p_info->mbuf); if (-1 == xioctl (p_info, VIDIOCGMBUF, &p_info->mbuf)) return FALSE; if (0 == p_info->mbuf.frames) { p_info->info.tveng_errno = ENOMEM; return FALSE; } /* Limited by the size of the mbuf.offset[] array. */ p_info->n_buffers = MIN (p_info->mbuf.frames, VIDEO_MAX_FRAME); p_info->buffers = calloc (p_info->n_buffers, sizeof (struct xbuffer)); if (NULL == p_info->buffers) { p_info->n_buffers = 0; p_info->info.tveng_errno = ENOMEM; return FALSE; } p_info->mapped_addr = device_mmap (p_info->info.log_fp, /* start: any */ NULL, (size_t) p_info->mbuf.size, PROT_READ | PROT_WRITE, MAP_SHARED, p_info->info.fd, (off_t) 0); if (MAP_FAILED == p_info->mapped_addr) { p_info->info.tveng_errno = errno; t_error("mmap()", &p_info->info); free (p_info->buffers); p_info->buffers = NULL; p_info->n_buffers = 0; return FALSE; } for (i = 0; i < p_info->n_buffers; ++i) { p_info->buffers[i].data = (char *) p_info->mapped_addr + p_info->mbuf.offsets[i]; p_info->buffers[i].frame_number = i; } return TRUE; } /* Sets up the capture device so any read() call after this one succeeds. Returns -1 on error. */ static int tveng1_start_capturing(struct private_tveng1_device_info *p_info) { gboolean dummy; p_tveng_stop_everything(&p_info->info, &dummy); assert (CAPTURE_MODE_NONE == p_info ->info. capture_mode); if (!map_xbuffers (p_info)) { return -1; } if (!queue_xbuffers (p_info)) { unmap_xbuffers (p_info, /* ignore_errors */ TRUE); return -1; } p_info->info.capture_mode = CAPTURE_MODE_READ; p_info->capture_active = TRUE; return 0; } /* Tries to stop capturing. -1 on error. */ static int tveng1_stop_capturing(struct private_tveng1_device_info *p_info) { struct timeval timeout; int r; if (p_info->info.capture_mode == CAPTURE_MODE_NONE) { fprintf(stderr, "Warning: trying to stop capture with no capture active\n"); return 0; /* Nothing to be done */ } r = 0; assert (CAPTURE_MODE_READ == p_info->info.capture_mode); /* Dequeue all buffers. */ timeout.tv_sec = 1; timeout.tv_usec = 0; while (p_info->first_queued) { struct xbuffer *b; if (dequeue_xbuffer (p_info, &b, &timeout) <= 0) { /* FIXME caller cannot properly handle stop error yet. */ r = -1; /* error or timeout */ } } if (!unmap_xbuffers (p_info, /* ignore_errors */ FALSE)) { /* FIXME caller cannot properly handle stop error yet. */ r = -1; } p_info->info.capture_mode = CAPTURE_MODE_NONE; p_info->capture_active = FALSE; return r; } static tv_bool capture_enable (tveng_device_info * info, tv_bool enable) { int r; if (enable) r = tveng1_start_capturing (P_INFO (info)); else r = tveng1_stop_capturing (P_INFO (info)); return (0 == r); } static int read_frame (tveng_device_info * info, tv_capture_buffer * buffer, const struct timeval * timeout) { struct private_tveng1_device_info *p_info = P_INFO (info); struct xbuffer *b; int r; assert (NULL != info); if (info -> capture_mode != CAPTURE_MODE_READ) { info -> tveng_errno = -1; tv_error_msg(info, "Current capture mode is not READ"); return -1; /* error */ } if ((r = dequeue_xbuffer (p_info, &b, timeout)) <= 0) return r; /* error or timeout */ if (buffer) { const tv_image_format *dst_format; tv_bool success; dst_format = buffer->format; if (!dst_format) dst_format = &p_info->info.capture.format; success = tv_copy_image (buffer->data, dst_format, b->data, &p_info->info.capture.format); assert (success); buffer->sample_time = b->sample_time; buffer->stream_time = b->stream_time; } if (!queue_xbuffer (p_info, b)) return -1; /* error */ return 1; /* success */ } static int tveng1_ioctl (tveng_device_info * info, unsigned int cmd, char * arg) { return device_ioctl (info->log_fp, fprint_v4l_ioctl_arg, info->fd, cmd, arg); } static int ov511_get_button_state (tveng_device_info * info) { struct private_tveng1_device_info *p_info = P_INFO (info); char button_state; if (p_info -> ogb_fd < 1) return -1; /* Unsupported feature */ lseek(p_info -> ogb_fd, 0, SEEK_SET); if (read(p_info -> ogb_fd, &button_state, 1) < 1) return -1; return (button_state - '0'); } static void free_capabilities (struct private_tveng1_device_info *p_info) { free (p_info->info.node.device); p_info->info.node.device = NULL; free (p_info->info.node.label); p_info->info.node.label = NULL; } static void shut_down (struct private_tveng1_device_info *p_info) { if (-1 != p_info->ogb_fd) { device_close (p_info->info.log_fp, p_info->ogb_fd); p_info->ogb_fd = -1; } #if defined (HAVE_XV_EXTENSION) && TVENG1_XV_TEST if (p_info->grabbed_xv_port) { if (!_tv_xv_ungrab_port (&p_info->info)) { p_info->info.overlay.xv_port_id = NO_PORT; p_info->info.caps.flags &= ~TVENG_CAPS_XVIDEO; } p_info->grabbed_xv_port = FALSE; } #endif signal (SIGALRM, SIG_DFL); free_panel_controls (&p_info->info); free_video_standards (&p_info->info); free_video_inputs (&p_info->info); p_info->info.current_controller = TVENG_CONTROLLER_NONE; free_capabilities (p_info); if (-1 != p_info->info.fd) { device_close (p_info->info.log_fp, p_info->info.fd); p_info->info.fd = -1; } free (p_info->info.file_name); p_info->info.file_name = NULL; p_info->info.attach_mode = TVENG_ATTACH_UNKNOWN; p_info->info.capture_mode = CAPTURE_MODE_NONE; } static void tveng1_close_device (tveng_device_info * info) { struct private_tveng1_device_info *p_info = P_INFO (info); gboolean dummy; p_tveng_stop_everything (info, &dummy); shut_down (p_info); if (info->debug_level > 0) fprintf (stderr, "\nTVeng: V4L1 controller unloaded\n"); } static tv_bool ov511_init (struct private_tveng1_device_info *p_info) { char filename[256]; struct stat st; int minor; p_info->ogb_fd = -1; if (NULL == strstr (p_info->info.caps.name, "OV51") || NULL == strstr (p_info->info.caps.name, "USB")) return FALSE; minor = -1; if (0 == fstat (p_info->info.fd, &st)) minor = MINOR (st.st_rdev); if (-1 == minor) return FALSE; snprintf (filename, sizeof (filename), "/proc/video/ov511/%d/button", minor); p_info->ogb_fd = device_open (p_info->info.log_fp, filename, O_RDONLY, /* mode */ 0); if (-1 == p_info->ogb_fd) return FALSE; if (-1 == flock (p_info->ogb_fd, LOCK_EX | LOCK_NB)) { device_close (p_info->info.log_fp, p_info->ogb_fd); p_info->ogb_fd = -1; return FALSE; } return TRUE; } static void grab_xv_port (struct private_tveng1_device_info *p_info) { #if defined (HAVE_XV_EXTENSION) && TVENG1_XV_TEST if (NO_PORT == p_info->info.overlay.xv_port_id) return; if (_tv_xv_grab_port (&p_info->info)) { p_info->grabbed_xv_port = TRUE; p_info->xwindow = 0; p_info->xgc = 0; #if 0 /* XXX see tveng25.c's grab_xv_port(). */ p_info->xa_colorkey = XInternAtom (p_info->info.display, "XV_COLORKEY", /* only_if_exists */ False); #endif } #endif } #if TVENG1_XV_TEST #ifdef HAVE_XV_EXTENSION static tv_bool test_xv_port (struct private_tveng1_device_info *p_info, tv_bool * restore_brightness) { static const unsigned int magic = 0x16; /* 010110 */ unsigned int sensed; unsigned int last; unsigned int i; if (!_tv_xv_grab_port (p_info)) { return FALSE; } sensed = 0; last = 0; for (i = 0; i < 6; ++i) { unsigned int bit = magic & (1 << i); struct video_picture pict; *restore_brightness = TRUE; if (!_tv_xv_set_port_attribute (&p_info->info, p_info->xa_xv_brightness, bit ? +1000 : -1000, /* sync */ TRUE)) { sensed = 0; goto failure; } if (-1 == xioctl (p_info, VIDIOCGPICT, &pict)) { sensed = 0; goto failure; } sensed |= (pict.brightness >= last) << i; last = pict.brightness; } failure: /* Error ignored. */ _tv_xv_ungrab_port (p_info); return (0 == ((sensed ^ magic) & ~1)); } static void xvideo_probe (struct private_tveng1_device_info *p_info) { XErrorHandler old_error_handler; unsigned int version; unsigned int revision; unsigned int major_opcode; unsigned int event_base; unsigned int error_base; Window root_window; XvAdaptorInfo *adaptors; unsigned int n_adaptors; struct video_picture pict; tv_bool restore_brightness; unsigned int i; adaptors = NULL; p_info->info.overlay.xv_port_id = NO_PORT; old_error_handler = XSetErrorHandler (x11_error_handler); /* Error ignored. */ p_info->xa_xv_freq = XInternAtom (p_info->info.display, "XV_FREQ", /* only_if_exists */ False); p_info->xa_xv_brightness = XInternAtom (p_info->info.display, "XV_BRIGHTNESS", /* only_if_exists */ True); if (None == p_info->xa_xv_brightness) { goto failure; } if (Success != XvQueryExtension (p_info->info.display, &version, &revision, &major_opcode, &event_base, &error_base)) { goto failure; } if (version < 2 || (version == 2 && revision < 2)) { goto failure; } root_window = DefaultRootWindow (p_info->info.display); if (Success != XvQueryAdaptors (p_info->info.display, root_window, &n_adaptors, &adaptors)) { goto failure; } if (0 == n_adaptors) { goto failure; } /* XXX this is probably redundant. */ if (-1 == xioctl (p_info, VIDIOCGPICT, &pict)) { goto failure; } restore_brightness = FALSE; for (i = 0; i < n_adaptors; ++i) { unsigned int j; if (0 != strcmp (adaptors[i].name, "video4linux")) { continue; } for (j = 0; j < adaptors[i].num_ports; ++j) { p_info->info.overlay.xv_port_id = (XvPortID)(adaptors[i].base_id + j); if (test_xv_port (p_info, &restore_brightness)) { goto found; } } } found: if (restore_brightness) { /* Error ignored. */ xioctl (p_info, VIDIOCSPICT, &pict); } if (io_debug_msg > 0) { fprintf (stderr, "Found Xv port %d.\n", (int) p_info->info.overlay.xv_port_id); } failure: if (NULL != adaptors) { XvFreeAdaptorInfo (adaptors); adaptors = NULL; n_adaptors = 0; } XSetErrorHandler (old_error_handler); } #else /* !HAVE_XV_EXTENSION */ static void xvideo_probe (struct private_tveng1_device_info *p_info) { /* Nothing to do. */ } #endif /* !HAVE_XV_EXTENSION */ #endif /* 0 */ static void identify_driver (struct private_tveng1_device_info *p_info) { struct pwc_probe probe; if (strstr (p_info->info.caps.name, "rivatv")) { p_info->driver = DRIVER_RIVATV; return; } CLEAR (probe); if (0 == pwc_xioctl_may_fail (p_info, VIDIOCPWCPROBE, &probe)) { if (0 == strncmp (p_info->info.caps.name, probe.name, MIN (sizeof (p_info->info.caps.name), sizeof (probe.name)))) { p_info->driver = DRIVER_PWC; return; } } /* Other drivers may accept the same private ioctl code. Check the caps.name for more confidence. */ if (strstr (p_info->info.caps.name, "bt") || strstr (p_info->info.caps.name, "BT")) { int version; int dummy; dummy = -1; version = bttv_xioctl_may_fail (p_info, BTTV_VERSION, &dummy); if (version > 0) { p_info->driver = DRIVER_BTTV; return; } } p_info->driver = 0; /* unknown */ } static tv_bool get_capabilities (struct private_tveng1_device_info *p_info) { struct video_capability caps; CLEAR (p_info->info.caps); p_info->info.node.label = NULL; /* unknown */ p_info->info.node.bus = NULL; p_info->info.node.driver = NULL; p_info->info.node.version = NULL; p_info->info.node.device = NULL; p_info->info.node.destroy = NULL; assert (-1 != p_info->info.fd); CLEAR (caps); if (-1 == xioctl (p_info, VIDIOCGCAP, &caps)) goto failure; if (0 == (caps.type & (VID_TYPE_CAPTURE | VID_TYPE_OVERLAY))) { p_info->info.tveng_errno = -1; snprintf(p_info->info.error, 256, "%s doesn't look like a valid capture device", p_info->info.file_name); goto failure; } /* XXX localize (encoding). */ p_info->info.node.label = XSTRADUP (caps.name); p_info->info.node.device = strdup (p_info->info.file_name); if (NULL == p_info->info.node.label || NULL == p_info->info.node.device) goto failure; z_strlcpy (p_info->info.caps.name, caps.name, MIN (sizeof (p_info->info.caps.name), sizeof (caps.name))); p_info->info.caps.name [N_ELEMENTS (p_info->info.caps.name) - 1] = 0; p_info->info.caps.channels = caps.channels; p_info->info.caps.audios = caps.audios; /* XXX all conversion routines cannot handle arbitrary widths yet. */ p_info->info.caps.maxwidth = caps.maxwidth & ~7; p_info->info.caps.minwidth = (caps.minwidth + 7) & ~7; p_info->info.caps.maxheight = caps.maxheight; p_info->info.caps.minheight = caps.minheight; /* BTTV doesn't return properly the maximum width */ #if 0 && defined (TVENG1_BTTV_PRESENT) /* or does it? */ if (p_info->info.caps.maxwidth > 768) p_info->info.caps.maxwidth = 768; #endif if (caps.type & VID_TYPE_CAPTURE) p_info->info.caps.flags |= TVENG_CAPS_CAPTURE; if (caps.type & VID_TYPE_TUNER) p_info->info.caps.flags |= TVENG_CAPS_TUNER; if (caps.type & VID_TYPE_TELETEXT) p_info->info.caps.flags |= TVENG_CAPS_TELETEXT; if (caps.type & VID_TYPE_OVERLAY) p_info->info.caps.flags |= TVENG_CAPS_OVERLAY; if (caps.type & VID_TYPE_CHROMAKEY) p_info->info.caps.flags |= TVENG_CAPS_CHROMAKEY; if (caps.type & VID_TYPE_CLIPPING) p_info->info.caps.flags |= TVENG_CAPS_CLIPPING; if (caps.type & VID_TYPE_FRAMERAM) p_info->info.caps.flags |= TVENG_CAPS_FRAMERAM; if (caps.type & VID_TYPE_SCALES) p_info->info.caps.flags |= TVENG_CAPS_SCALES; if (caps.type & VID_TYPE_MONOCHROME) p_info->info.caps.flags |= TVENG_CAPS_MONOCHROME; if (caps.type & VID_TYPE_SUBCAPTURE) p_info->info.caps.flags |= TVENG_CAPS_SUBCAPTURE; p_info->read_back_controls = FALSE; p_info->read_back_format = TRUE; p_info->audio_mode_reads_rx = TRUE; /* bttv TRUE, other devices? */ /* XXX should be autodetected */ #ifdef TVENG1_BTTV_MUTE_BUG_WORKAROUND p_info->mute_flag_readable = FALSE; #else p_info->mute_flag_readable = TRUE; #endif if (TVENG1_RIVATV_TEST) { p_info->info.caps.channels = 2; p_info->info.caps.audios = 0; p_info->info.caps.minwidth = 64; p_info->info.caps.minheight = 32; /* Will be adjusted later in get_video_standard(). */ p_info->info.caps.maxwidth = 704; p_info->info.caps.maxheight = 576; p_info->info.caps.flags = (TVENG_CAPS_CAPTURE | TVENG_CAPS_OVERLAY | TVENG_CAPS_CHROMAKEY); p_info->driver = DRIVER_RIVATV; } else { identify_driver (p_info); } return TRUE; failure: free_capabilities (p_info); return FALSE; } static tv_bool do_open (struct private_tveng1_device_info *p_info) { struct video_capability caps; p_info->info.fd = -1; /* XXX see zapping_setup_fb for a safer version. */ p_info->info.fd = device_open (p_info->info.log_fp, p_info->info.file_name, O_RDWR, /* mode */ 0); if (-1 == p_info->info.fd) { p_info->info.tveng_errno = errno; t_error("open()", &p_info->info); goto failure; } return TRUE; failure: if (-1 != p_info->info.fd) { device_close (p_info->info.log_fp, p_info->info.fd); p_info->info.fd = -1; } return FALSE; } static int tveng1_change_attach_mode (tveng_device_info * info, Window window, enum tveng_attach_mode attach_mode) { struct private_tveng1_device_info *p_info = P_INFO (info); gboolean dummy; window = window; p_tveng_stop_everything (info, &dummy); #if defined (HAVE_XV_EXTENSION) && TVENG1_XV_TEST if (p_info->grabbed_xv_port) { if (!_tv_xv_ungrab_port (info)) { info->overlay.xv_port_id = NO_PORT; info->caps.flags &= ~TVENG_CAPS_XVIDEO; } p_info->grabbed_xv_port = FALSE; } #endif if (-1 != info->fd) { /* Error ignored. */ device_close (info->log_fp, info->fd); info->fd = -1; } switch (attach_mode) { case TVENG_ATTACH_XV: /* i.e. overlay */ info->attach_mode = TVENG_ATTACH_XV; /* Attn: get_overlay_buffer() behaves differently in this mode. */ if (!do_open (p_info)) goto failure; grab_xv_port (p_info); break; case TVENG_ATTACH_CONTROL: case TVENG_ATTACH_VBI: /* In V4L there is no control-only mode (but we'll pretend in the future). VBI mode is unnecessary. */ /* fall through */ case TVENG_ATTACH_READ: info->attach_mode = TVENG_ATTACH_READ; if (!do_open (p_info)) goto failure; break; default: tv_error_msg(info, "Unknown attach mode for the device"); goto failure; } info->capture_mode = CAPTURE_MODE_NONE; return 0; /* ok */ failure: shut_down (p_info); return -1; } /* Associates the given tveng_device_info with the given video device. On error it returns -1 and sets info->tveng_errno, info->error to the correct values. device_file: The file used to access the video device (usually /dev/video) attach_mode: Specifies the mode to open the device file depth: The color depth the capture will be in, -1 means let tveng decide based on the current display depth. info: The structure to be associated with the device */ static int tveng1_attach_device(const char* device_file, Window window, enum tveng_attach_mode attach_mode, tveng_device_info * info) { struct private_tveng1_device_info *p_info = P_INFO (info); window = window; assert (NULL != device_file); assert (NULL != info); memset ((char *) p_info + sizeof (p_info->info), 0, sizeof (*p_info) - sizeof (*info)); if (-1 != info->fd) { tveng_close_device (info); info->fd = -1; } info->capture_mode = CAPTURE_MODE_NONE; info->file_name = strdup (device_file); if (NULL == info->file_name) { perror("strdup"); info->tveng_errno = ENOMEM; snprintf(info->error, 256, "Cannot duplicate device name"); return -1; } switch (attach_mode) { case TVENG_ATTACH_XV: /* i.e. overlay */ info->attach_mode = TVENG_ATTACH_XV; /* Attn: get_overlay_buffer() behaves differently in this mode. */ if (!do_open (p_info)) goto failure; if (!get_capabilities (p_info)) goto failure; grab_xv_port (p_info); break; case TVENG_ATTACH_CONTROL: case TVENG_ATTACH_VBI: /* In V4L there is no control-only mode (but we'll pretend in the future). VBI mode is unnecessary. */ /* fall through */ case TVENG_ATTACH_READ: info->attach_mode = TVENG_ATTACH_READ; if (!do_open (p_info)) goto failure; if (!get_capabilities (p_info)) goto failure; break; default: tv_error_msg(info, "Unknown attach mode for the device"); goto failure; } info->current_controller = TVENG_CONTROLLER_V4L1; info->panel.set_video_input = set_video_input; info->panel.set_tuner_frequency = set_tuner_frequency; info->panel.get_tuner_frequency = get_tuner_frequency; info->panel.get_signal_strength = get_signal_strength; info->panel.set_video_standard = set_video_standard; info->panel.get_video_standard = get_video_standard; info->panel.set_control = set_control; info->panel.get_control = get_control; info->panel.set_audio_mode = set_audio_mode; info->panel.video_inputs = NULL; info->panel.cur_video_input = NULL; info->panel.video_standards = NULL; info->panel.cur_video_standard = NULL; /* XXX error ignored */ if (get_video_input_list (p_info)) { p_info->channel_norm_usable = channel_norm_test (p_info); if (info->panel.video_inputs) { /* There is no ioctl to query the current video input, we can only reset to a known channel. */ /* XXX error ignored */ set_video_input (info, info->panel.video_inputs); } } if (!init_audio (p_info)) goto failure; info->panel.controls = NULL; if (!get_control_list (p_info)) goto failure; #ifdef TVENG1_BTTV_MUTE_BUG_WORKAROUND /* Mute the device, so we know for sure which is the mute value on startup */ /* tveng1_set_mute(0, info); */ #endif CLEAR (info->capture); if (info->caps.flags & TVENG_CAPS_CAPTURE) { struct sigaction sa; info->capture.get_format = get_capture_format; info->capture.set_format = set_capture_format; info->capture.enable = capture_enable; info->capture.read_frame = read_frame; p_info->mapped_addr = (void *) -1; p_info->buffers = NULL; p_info->first_queued = NULL; info->capture.supported_pixfmt_set = get_supported_pixfmt_set (info); /* Set up an alarm handler for read timeouts. */ CLEAR (sa); sa.sa_handler = alarm_handler; /* no sa_flags = SA_RESTART to cause EINTR. */ sigaction (SIGALRM, &sa, NULL); } CLEAR (info->overlay); if (info->caps.flags & TVENG_CAPS_OVERLAY) { info->overlay.set_buffer = set_overlay_buffer; info->overlay.get_buffer = get_overlay_buffer; info->overlay.set_window = set_overlay_window; info->overlay.get_window = get_overlay_window; info->overlay.enable = enable_overlay; /* XXX error ignored. */ /* FIXME cx88 0.0.5 sets the overlay capability flag although it doesn't really support overlay, returning EINVAL on VIDIOCGFBUF. (However a work-around is already in tveng25.c.) */ get_overlay_buffer (info); #if defined (HAVE_XV_EXTENSION) && TVENG1_XV_TEST /* The XVideo V4L wrapper supports only clip-list overlay. */ if (info->caps.flags & TVENG_CAPS_CLIPPING) { xvideo_probe (p_info); /* XXX if failed or not done, probe and set exclusive_open instead of assuming yes. */ if (NO_PORT != info->overlay.xv_port_id) { info->caps.flags |= TVENG_CAPS_XVIDEO; info->overlay.set_xwindow = set_overlay_xwindow; } } #endif } if (info->caps.flags & (TVENG_CAPS_CAPTURE | TVENG_CAPS_OVERLAY)) { /* XXX error ignored. */ get_capture_and_overlay_parameters (p_info); } ov511_init (p_info); if (info->debug_level > 0) fprintf(stderr, "TVeng: V4L1 controller loaded\n"); return info->fd; failure: shut_down (p_info); return -1; } static struct tveng_module_info tveng1_module_info = { .attach_device = tveng1_attach_device, .close_device = tveng1_close_device, .ioctl = tveng1_ioctl, .change_mode = tveng1_change_attach_mode, .ov511_get_button_state = ov511_get_button_state, .interface_label = "Video4Linux", .private_size = sizeof(struct private_tveng1_device_info) }; /* Inits the V4L1 module, and fills in the given table. */ void tveng1_init_module(struct tveng_module_info *module_info) { assert (NULL != module_info); memcpy(module_info, &tveng1_module_info, sizeof(struct tveng_module_info)); } #else /* !ENABLE_V4L */ #include "tveng1.h" void tveng1_init_module(struct tveng_module_info *module_info) { assert (NULL != module_info); CLEAR (*module_info); } #endif /* ENABLE_V4L */ ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������zapping-0.10cvs6/src/tveng1.h����������������������������������������������������������������������� 644 � 764 � 144 � 4277 10167772044 11173� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Zapping (TV viewer for the Gnome Desktop) * Copyright (C) 2000 Iaki Garca Etxebarria * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifndef __TVENG1_H__ #define __TVENG1_H__ #include "tveng_private.h" /* Inits the V4L1 module, and fills in the given table. */ void tveng1_init_module(struct tveng_module_info *module_info); /* Prototypes for forward declaration, used only in tveng1.c */ #ifdef TVENG1_PROTOTYPES /* Associates the given tveng_device_info with the given video device. On error it returns -1 and sets info->errno, info->error to the correct values. device_file: The file used to access the video device (usually /dev/video) attach_mode: Specifies the mode to open the device file depth: The color depth the capture will be in, -1 means let tveng decide based on the current display depth. info: The structure to be associated with the device */ static int tveng1_attach_device(const char* device_file, Window window, enum tveng_attach_mode attach_mode, tveng_device_info * info); /* Closes the video device asocciated to the device info object. Should be called before reattaching a video device to the same object, but there is no need to call this before calling tveng_device_info_destroy. */ static void tveng1_close_device(tveng_device_info* info); /* Functions for controlling the video capture. All of them return -1 in case of error, so any value != -1 should be considered valid (unless explicitly stated in the description of the function) */ #endif /* TVENG1_PROTOTYPES */ #endif /* TVENG1.H */ ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������zapping-0.10cvs6/src/gen_conv.h��������������������������������������������������������������������� 644 � 764 � 144 � 27134 7342137336 11562� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Zapping (TV viewer for the Gnome Desktop) * SWAR color conversion routines * * Copyright (C) 2001 Michael H. Schimek <mschimek@users.sf.net> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. * * 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 this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* Generated file - do not edit */ #ifndef _GEN_CONV_H__ #define _GEN_CONV_H__ #include <stdio.h> #include <stdlib.h> extern void mmx_yuyv_rgb32(unsigned char *d, unsigned char *s, int w, int h, int d_stride, int s_stride); extern void mmx_yuv420_rgb32(unsigned char *d, unsigned char *s, unsigned char *s_u, unsigned char *s_v, int w, int h, int d_stride, int s_stride, int s_uv_stride); extern void mmx_yuyv_bgr32(unsigned char *d, unsigned char *s, int w, int h, int d_stride, int s_stride); extern void mmx_yuv420_bgr32(unsigned char *d, unsigned char *s, unsigned char *s_u, unsigned char *s_v, int w, int h, int d_stride, int s_stride, int s_uv_stride); extern void mmx_yuyv_rgb24(unsigned char *d, unsigned char *s, int w, int h, int d_stride, int s_stride); extern void mmx_yuv420_rgb24(unsigned char *d, unsigned char *s, unsigned char *s_u, unsigned char *s_v, int w, int h, int d_stride, int s_stride, int s_uv_stride); extern void mmx_yuyv_bgr24(unsigned char *d, unsigned char *s, int w, int h, int d_stride, int s_stride); extern void mmx_yuv420_bgr24(unsigned char *d, unsigned char *s, unsigned char *s_u, unsigned char *s_v, int w, int h, int d_stride, int s_stride, int s_uv_stride); extern void mmx_yuyv_rgb565(unsigned char *d, unsigned char *s, int w, int h, int d_stride, int s_stride); extern void mmx_yuv420_rgb565(unsigned char *d, unsigned char *s, unsigned char *s_u, unsigned char *s_v, int w, int h, int d_stride, int s_stride, int s_uv_stride); extern void mmx_yuyv_bgr565(unsigned char *d, unsigned char *s, int w, int h, int d_stride, int s_stride); extern void mmx_yuv420_bgr565(unsigned char *d, unsigned char *s, unsigned char *s_u, unsigned char *s_v, int w, int h, int d_stride, int s_stride, int s_uv_stride); extern void mmx_yuyv_rgb5551(unsigned char *d, unsigned char *s, int w, int h, int d_stride, int s_stride); extern void mmx_yuv420_rgb5551(unsigned char *d, unsigned char *s, unsigned char *s_u, unsigned char *s_v, int w, int h, int d_stride, int s_stride, int s_uv_stride); extern void mmx_yuyv_bgr5551(unsigned char *d, unsigned char *s, int w, int h, int d_stride, int s_stride); extern void mmx_yuv420_bgr5551(unsigned char *d, unsigned char *s, unsigned char *s_u, unsigned char *s_v, int w, int h, int d_stride, int s_stride, int s_uv_stride); extern void mmx_rgb32_yuyv(unsigned char *d, unsigned char *s, int w, int h, int d_stride, int s_stride); extern void mmx_bgr32_yuyv(unsigned char *d, unsigned char *s, int w, int h, int d_stride, int s_stride); extern void mmx_rgb24_yuyv(unsigned char *d, unsigned char *s, int w, int h, int d_stride, int s_stride); extern void mmx_bgr24_yuyv(unsigned char *d, unsigned char *s, int w, int h, int d_stride, int s_stride); extern void mmx_rgb565_yuyv(unsigned char *d, unsigned char *s, int w, int h, int d_stride, int s_stride); extern void mmx_bgr565_yuyv(unsigned char *d, unsigned char *s, int w, int h, int d_stride, int s_stride); extern void mmx_rgb5551_yuyv(unsigned char *d, unsigned char *s, int w, int h, int d_stride, int s_stride); extern void mmx_bgr5551_yuyv(unsigned char *d, unsigned char *s, int w, int h, int d_stride, int s_stride); extern void mmx_rgb32_yuv420(unsigned char *d, unsigned char *d_u, unsigned char *d_v, unsigned char *s, int w, int h, int d_stride, int d_uv_stride, int s_stride); extern void mmx_bgr32_yuv420(unsigned char *d, unsigned char *d_u, unsigned char *d_v, unsigned char *s, int w, int h, int d_stride, int d_uv_stride, int s_stride); extern void mmx_rgb24_yuv420(unsigned char *d, unsigned char *d_u, unsigned char *d_v, unsigned char *s, int w, int h, int d_stride, int d_uv_stride, int s_stride); extern void mmx_bgr24_yuv420(unsigned char *d, unsigned char *d_u, unsigned char *d_v, unsigned char *s, int w, int h, int d_stride, int d_uv_stride, int s_stride); extern void mmx_rgb565_yuv420(unsigned char *d, unsigned char *d_u, unsigned char *d_v, unsigned char *s, int w, int h, int d_stride, int d_uv_stride, int s_stride); extern void mmx_bgr565_yuv420(unsigned char *d, unsigned char *d_u, unsigned char *d_v, unsigned char *s, int w, int h, int d_stride, int d_uv_stride, int s_stride); extern void mmx_rgb5551_yuv420(unsigned char *d, unsigned char *d_u, unsigned char *d_v, unsigned char *s, int w, int h, int d_stride, int d_uv_stride, int s_stride); extern void mmx_bgr5551_yuv420(unsigned char *d, unsigned char *d_u, unsigned char *d_v, unsigned char *s, int w, int h, int d_stride, int d_uv_stride, int s_stride); extern void sse_yuyv_rgb32(unsigned char *d, unsigned char *s, int w, int h, int d_stride, int s_stride); extern void sse_yuv420_rgb32(unsigned char *d, unsigned char *s, unsigned char *s_u, unsigned char *s_v, int w, int h, int d_stride, int s_stride, int s_uv_stride); extern void sse_yuyv_bgr32(unsigned char *d, unsigned char *s, int w, int h, int d_stride, int s_stride); extern void sse_yuv420_bgr32(unsigned char *d, unsigned char *s, unsigned char *s_u, unsigned char *s_v, int w, int h, int d_stride, int s_stride, int s_uv_stride); extern void sse_yuyv_rgb24(unsigned char *d, unsigned char *s, int w, int h, int d_stride, int s_stride); extern void sse_yuv420_rgb24(unsigned char *d, unsigned char *s, unsigned char *s_u, unsigned char *s_v, int w, int h, int d_stride, int s_stride, int s_uv_stride); extern void sse_yuyv_bgr24(unsigned char *d, unsigned char *s, int w, int h, int d_stride, int s_stride); extern void sse_yuv420_bgr24(unsigned char *d, unsigned char *s, unsigned char *s_u, unsigned char *s_v, int w, int h, int d_stride, int s_stride, int s_uv_stride); extern void sse_yuyv_rgb565(unsigned char *d, unsigned char *s, int w, int h, int d_stride, int s_stride); extern void sse_yuv420_rgb565(unsigned char *d, unsigned char *s, unsigned char *s_u, unsigned char *s_v, int w, int h, int d_stride, int s_stride, int s_uv_stride); extern void sse_yuyv_bgr565(unsigned char *d, unsigned char *s, int w, int h, int d_stride, int s_stride); extern void sse_yuv420_bgr565(unsigned char *d, unsigned char *s, unsigned char *s_u, unsigned char *s_v, int w, int h, int d_stride, int s_stride, int s_uv_stride); extern void sse_yuyv_rgb5551(unsigned char *d, unsigned char *s, int w, int h, int d_stride, int s_stride); extern void sse_yuv420_rgb5551(unsigned char *d, unsigned char *s, unsigned char *s_u, unsigned char *s_v, int w, int h, int d_stride, int s_stride, int s_uv_stride); extern void sse_yuyv_bgr5551(unsigned char *d, unsigned char *s, int w, int h, int d_stride, int s_stride); extern void sse_yuv420_bgr5551(unsigned char *d, unsigned char *s, unsigned char *s_u, unsigned char *s_v, int w, int h, int d_stride, int s_stride, int s_uv_stride); extern void _3dn_yuyv_rgb32(unsigned char *d, unsigned char *s, int w, int h, int d_stride, int s_stride); extern void _3dn_yuv420_rgb32(unsigned char *d, unsigned char *s, unsigned char *s_u, unsigned char *s_v, int w, int h, int d_stride, int s_stride, int s_uv_stride); extern void _3dn_yuyv_bgr32(unsigned char *d, unsigned char *s, int w, int h, int d_stride, int s_stride); extern void _3dn_yuv420_bgr32(unsigned char *d, unsigned char *s, unsigned char *s_u, unsigned char *s_v, int w, int h, int d_stride, int s_stride, int s_uv_stride); extern void _3dn_yuyv_rgb24(unsigned char *d, unsigned char *s, int w, int h, int d_stride, int s_stride); extern void _3dn_yuv420_rgb24(unsigned char *d, unsigned char *s, unsigned char *s_u, unsigned char *s_v, int w, int h, int d_stride, int s_stride, int s_uv_stride); extern void _3dn_yuyv_bgr24(unsigned char *d, unsigned char *s, int w, int h, int d_stride, int s_stride); extern void _3dn_yuv420_bgr24(unsigned char *d, unsigned char *s, unsigned char *s_u, unsigned char *s_v, int w, int h, int d_stride, int s_stride, int s_uv_stride); extern void _3dn_yuyv_rgb565(unsigned char *d, unsigned char *s, int w, int h, int d_stride, int s_stride); extern void _3dn_yuv420_rgb565(unsigned char *d, unsigned char *s, unsigned char *s_u, unsigned char *s_v, int w, int h, int d_stride, int s_stride, int s_uv_stride); extern void _3dn_yuyv_bgr565(unsigned char *d, unsigned char *s, int w, int h, int d_stride, int s_stride); extern void _3dn_yuv420_bgr565(unsigned char *d, unsigned char *s, unsigned char *s_u, unsigned char *s_v, int w, int h, int d_stride, int s_stride, int s_uv_stride); extern void _3dn_yuyv_rgb5551(unsigned char *d, unsigned char *s, int w, int h, int d_stride, int s_stride); extern void _3dn_yuv420_rgb5551(unsigned char *d, unsigned char *s, unsigned char *s_u, unsigned char *s_v, int w, int h, int d_stride, int s_stride, int s_uv_stride); extern void _3dn_yuyv_bgr5551(unsigned char *d, unsigned char *s, int w, int h, int d_stride, int s_stride); extern void _3dn_yuv420_bgr5551(unsigned char *d, unsigned char *s, unsigned char *s_u, unsigned char *s_v, int w, int h, int d_stride, int s_stride, int s_uv_stride); extern void amd_yuyv_rgb32(unsigned char *d, unsigned char *s, int w, int h, int d_stride, int s_stride); extern void amd_yuv420_rgb32(unsigned char *d, unsigned char *s, unsigned char *s_u, unsigned char *s_v, int w, int h, int d_stride, int s_stride, int s_uv_stride); extern void amd_yuyv_bgr32(unsigned char *d, unsigned char *s, int w, int h, int d_stride, int s_stride); extern void amd_yuv420_bgr32(unsigned char *d, unsigned char *s, unsigned char *s_u, unsigned char *s_v, int w, int h, int d_stride, int s_stride, int s_uv_stride); extern void amd_yuyv_rgb24(unsigned char *d, unsigned char *s, int w, int h, int d_stride, int s_stride); extern void amd_yuv420_rgb24(unsigned char *d, unsigned char *s, unsigned char *s_u, unsigned char *s_v, int w, int h, int d_stride, int s_stride, int s_uv_stride); extern void amd_yuyv_bgr24(unsigned char *d, unsigned char *s, int w, int h, int d_stride, int s_stride); extern void amd_yuv420_bgr24(unsigned char *d, unsigned char *s, unsigned char *s_u, unsigned char *s_v, int w, int h, int d_stride, int s_stride, int s_uv_stride); extern void amd_yuyv_rgb565(unsigned char *d, unsigned char *s, int w, int h, int d_stride, int s_stride); extern void amd_yuv420_rgb565(unsigned char *d, unsigned char *s, unsigned char *s_u, unsigned char *s_v, int w, int h, int d_stride, int s_stride, int s_uv_stride); extern void amd_yuyv_bgr565(unsigned char *d, unsigned char *s, int w, int h, int d_stride, int s_stride); extern void amd_yuv420_bgr565(unsigned char *d, unsigned char *s, unsigned char *s_u, unsigned char *s_v, int w, int h, int d_stride, int s_stride, int s_uv_stride); extern void amd_yuyv_rgb5551(unsigned char *d, unsigned char *s, int w, int h, int d_stride, int s_stride); extern void amd_yuv420_rgb5551(unsigned char *d, unsigned char *s, unsigned char *s_u, unsigned char *s_v, int w, int h, int d_stride, int s_stride, int s_uv_stride); extern void amd_yuyv_bgr5551(unsigned char *d, unsigned char *s, int w, int h, int d_stride, int s_stride); extern void amd_yuv420_bgr5551(unsigned char *d, unsigned char *s, unsigned char *s_u, unsigned char *s_v, int w, int h, int d_stride, int s_stride, int s_uv_stride); #endif /* _GEN_CONV_H__ */ ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������zapping-0.10cvs6/src/gen_conv.s��������������������������������������������������������������������� 644 � 764 � 144 � 661020 7762173334 11617� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# # Zapping (TV viewer for the Gnome Desktop) # SWAR color conversion routines # # Copyright (C) 2001 Michael H. Schimek <mschimek@users.sf.net> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2 as # published by the Free Software Foundation. # # 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 this program; if not, write to the Free Software # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. # Generated file - do not edit .data .align 32 .L3: .long 0x00ff00ff, 0x00ff00ff .L4: .long 0x00800080, 0x00800080 .L5: .long 0x4a854a85, 0x4a854a85 .L6: .long 0x0c880c88, 0x0c880c88 .L7: .long 0x408d408d, 0x408d408d .L8: .long 0x66256625, 0x66256625 .L9: .long 0x34053405, 0x34053405 .L12: .long 0x00100010, 0x00100010 .L27: .long 0xf8f8f8f8, 0xf8f8f8f8 .L28: .long 0xe0e0e0e0, 0xe0e0e0e0 .L45: .long 0x41bd41bd, 0x41bd41bd .L46: .long 0x40874087, 0x40874087 .L47: .long 0x19101910, 0x19101910 .L48: .long 0x6dee6dee, 0x6dee6dee .L49: .long 0x36f736f7, 0x36f736f7 .L50: .long 0x093c093c, 0x093c093c .L51: .long 0x0bac0bac, 0x0bac0bac .L52: .long 0x01080108, 0x01080108 .L53: .long 0x80808080, 0x80808080 .L62: .long 0x001f001f, 0x001f001f .text .align 16 .globl mmx_yuyv_rgb32 mmx_yuyv_rgb32: pushl %edi pushl %esi pushl %ebx movl 0+12+12(%esp),%ecx movl 0+12+24(%esp),%eax addl %ecx,%ecx movl 0+12+20(%esp),%ebx subl %ecx,%eax movl 0+12+12(%esp),%ecx shll $2,%ecx movl 0+12+16(%esp),%edx subl %ecx,%ebx movl 0+12+8(%esp),%esi movl 0+12+4(%esp),%edi .align 16 .L2: movl 0+12+12(%esp),%ecx .L1: pxor %mm7,%mm7 movq (%esi),%mm4 movq %mm4,%mm6 movq 8(%esi),%mm5 punpcklwd %mm5,%mm4 addl $16,%esi punpckhwd %mm5,%mm6 movq %mm4,%mm5 punpcklwd %mm6,%mm4 movq %mm4,%mm0 punpckhwd %mm6,%mm5 movq .L3,%mm1 movq %mm5,%mm2 movq .L4,%mm3 psrlw $8,%mm0 pand %mm1,%mm4 psubw %mm3,%mm0 psrlw $8,%mm2 pand %mm1,%mm5 psubw %mm3,%mm2 psrlw $3,%mm3 psubw %mm3,%mm4 psubw %mm3,%mm5 psllw $3,%mm0 movq %mm0,%mm6 pmulhw .L6,%mm6 psllw $2,%mm2 movq %mm2,%mm1 pmulhw .L9,%mm1 psllw $2,%mm4 pmulhw .L7,%mm0 psllw $2,%mm5 pmulhw .L8,%mm2 paddw %mm1,%mm6 pmulhw .L5,%mm4 movq %mm0,%mm1 pmulhw .L5,%mm5 paddw %mm4,%mm0 paddw %mm5,%mm1 packuswb %mm0,%mm0 movq %mm2,%mm3 packuswb %mm1,%mm1 paddw %mm4,%mm2 punpcklbw %mm1,%mm0 paddw %mm5,%mm3 psubw %mm6,%mm4 packuswb %mm2,%mm2 packuswb %mm3,%mm3 packuswb %mm4,%mm4 psubw %mm6,%mm5 punpcklbw %mm3,%mm2 packuswb %mm5,%mm5 punpcklbw %mm5,%mm4 movq %mm2,%mm1 punpcklbw %mm4,%mm2 movq %mm0,%mm3 punpcklbw %mm7,%mm0 movq %mm2,%mm5 punpcklwd %mm0,%mm2 punpckhwd %mm0,%mm5 movq %mm2,(%edi) punpckhbw %mm4,%mm1 movq %mm5,8(%edi) punpckhbw %mm7,%mm3 movq %mm1,%mm5 punpcklwd %mm3,%mm1 movq %mm1,16(%edi) punpckhwd %mm3,%mm5 movq %mm5,24(%edi) addl $32,%edi subl $8,%ecx jne .L1 addl %eax,%esi addl %ebx,%edi decl %edx jne .L2 emms popl %ebx popl %esi popl %edi ret .text .align 16 .globl mmx_yuv420_rgb32 mmx_yuv420_rgb32: pushl %ebx pushl %ebp pushl %esi pushl %edi movl %esp,%ecx leal -48(%esp),%esp andl $-8,%esp t6 = 0 t7 = 8 t8 = 16 t1 = 24 t2 = 28 t3 = 32 t4 = 36 t5 = 40 t9 = 44 movl 0+16+20(%ecx),%ebx movl %ebx,t4(%esp) shrl $1,%ebx movl 0+16+36(%ecx),%eax subl %ebx,%eax movl %eax,t3(%esp) movl 0+16+32(%ecx),%eax addl %ebx,%ebx movl 0+16+4(%ecx),%edi movl %eax,%ebp movl 0+16+28(%ecx),%esi subl %ebx,%eax movl %eax,t1(%esp) shll $2,%ebx movl %esi,%edx movl 0+16+24(%ecx),%eax subl %ebx,%esi movl 0+16+16(%ecx),%ebx movl %esi,t2(%esp) movl 0+16+8(%ecx),%esi movl %eax,t5(%esp) movl 0+16+12(%ecx),%eax movl %ecx,t9(%esp) .align 16 .L11: movl t4(%esp),%ecx .L10: pxor %mm7,%mm7 movq .L4,%mm3 pxor %mm1,%mm1 movd (%eax),%mm0 addl $4,%eax punpcklbw %mm1,%mm0 movd (%ebx),%mm2 addl $4,%ebx psubw %mm3,%mm0 punpcklbw %mm1,%mm2 movq (%esi),%mm4 psubw %mm3,%mm2 movq %mm4,%mm5 psrlw $3,%mm3 pand .L3,%mm4 psrlw $8,%mm5 psubw %mm3,%mm4 psubw %mm3,%mm5 psllw $3,%mm0 movq %mm0,%mm6 pmulhw .L6,%mm6 psllw $2,%mm2 movq %mm2,%mm1 pmulhw .L9,%mm1 psllw $2,%mm4 pmulhw .L7,%mm0 psllw $2,%mm5 pmulhw .L8,%mm2 paddw %mm1,%mm6 pmulhw .L5,%mm4 movq %mm0,t7(%esp) pmulhw .L5,%mm5 movq %mm2,t6(%esp) movq %mm0,%mm1 movq %mm6,t8(%esp) paddw %mm4,%mm0 paddw %mm5,%mm1 packuswb %mm0,%mm0 movq %mm2,%mm3 packuswb %mm1,%mm1 paddw %mm4,%mm2 punpcklbw %mm1,%mm0 paddw %mm5,%mm3 psubw %mm6,%mm4 packuswb %mm2,%mm2 packuswb %mm3,%mm3 packuswb %mm4,%mm4 psubw %mm6,%mm5 punpcklbw %mm3,%mm2 packuswb %mm5,%mm5 punpcklbw %mm5,%mm4 movq %mm2,%mm1 punpcklbw %mm4,%mm2 movq %mm0,%mm3 punpcklbw %mm7,%mm0 movq %mm2,%mm5 punpcklwd %mm0,%mm2 punpckhwd %mm0,%mm5 movq %mm2,(%edi) punpckhbw %mm4,%mm1 movq %mm5,8(%edi) punpckhbw %mm7,%mm3 movq %mm1,%mm5 punpcklwd %mm3,%mm1 movq %mm1,16(%edi) punpckhwd %mm3,%mm5 movq %mm5,24(%edi) movq (%esi,%ebp),%mm4 addl $8,%esi movq .L12,%mm3 movq %mm4,%mm5 pand .L3,%mm4 psrlw $8,%mm5 psubw %mm3,%mm4 psubw %mm3,%mm5 movq t7(%esp),%mm0 psllw $2,%mm4 movq t6(%esp),%mm2 psllw $2,%mm5 pmulhw .L5,%mm4 movq %mm0,%mm1 pmulhw .L5,%mm5 paddw %mm4,%mm0 paddw %mm5,%mm1 packuswb %mm0,%mm0 movq %mm2,%mm3 packuswb %mm1,%mm1 paddw %mm4,%mm2 punpcklbw %mm1,%mm0 paddw %mm5,%mm3 psubw t8(%esp),%mm4 packuswb %mm2,%mm2 packuswb %mm3,%mm3 packuswb %mm4,%mm4 psubw t8(%esp),%mm5 punpcklbw %mm3,%mm2 packuswb %mm5,%mm5 punpcklbw %mm5,%mm4 movq %mm2,%mm1 punpcklbw %mm4,%mm2 movq %mm0,%mm3 punpcklbw %mm7,%mm0 movq %mm2,%mm5 punpcklwd %mm0,%mm2 punpckhwd %mm0,%mm5 movq %mm2,(%edi,%edx) punpckhbw %mm4,%mm1 movq %mm5,8(%edi,%edx) punpckhbw %mm7,%mm3 movq %mm1,%mm5 punpcklwd %mm3,%mm1 movq %mm1,16(%edi,%edx) punpckhwd %mm3,%mm5 movq %mm5,24(%edi,%edx) addl $32,%edi subl $8,%ecx jne .L10 addl t1(%esp),%esi addl %ebp,%esi movl t3(%esp),%ecx addl %ecx,%eax addl t2(%esp),%edi addl %edx,%edi addl %ecx,%ebx subl $2,t5(%esp) jne .L11 movl t9(%esp),%esp emms popl %edi popl %esi popl %ebp popl %ebx ret .text .align 16 .globl mmx_yuyv_bgr32 mmx_yuyv_bgr32: pushl %edi pushl %esi pushl %ebx movl 0+12+12(%esp),%ecx movl 0+12+24(%esp),%eax addl %ecx,%ecx movl 0+12+20(%esp),%ebx subl %ecx,%eax movl 0+12+12(%esp),%ecx shll $2,%ecx movl 0+12+16(%esp),%edx subl %ecx,%ebx movl 0+12+8(%esp),%esi movl 0+12+4(%esp),%edi .align 16 .L14: movl 0+12+12(%esp),%ecx .L13: pxor %mm7,%mm7 movq (%esi),%mm4 movq %mm4,%mm6 movq 8(%esi),%mm5 punpcklwd %mm5,%mm4 addl $16,%esi punpckhwd %mm5,%mm6 movq %mm4,%mm5 punpcklwd %mm6,%mm4 movq %mm4,%mm0 punpckhwd %mm6,%mm5 movq .L3,%mm1 movq %mm5,%mm2 movq .L4,%mm3 psrlw $8,%mm0 pand %mm1,%mm4 psubw %mm3,%mm0 psrlw $8,%mm2 pand %mm1,%mm5 psubw %mm3,%mm2 psrlw $3,%mm3 psubw %mm3,%mm4 psubw %mm3,%mm5 psllw $3,%mm0 movq %mm0,%mm6 pmulhw .L6,%mm6 psllw $2,%mm2 movq %mm2,%mm1 pmulhw .L9,%mm1 psllw $2,%mm4 pmulhw .L7,%mm0 psllw $2,%mm5 pmulhw .L8,%mm2 paddw %mm1,%mm6 pmulhw .L5,%mm4 movq %mm0,%mm1 pmulhw .L5,%mm5 paddw %mm4,%mm0 paddw %mm5,%mm1 packuswb %mm0,%mm0 movq %mm2,%mm3 packuswb %mm1,%mm1 paddw %mm4,%mm2 punpcklbw %mm1,%mm0 paddw %mm5,%mm3 psubw %mm6,%mm4 packuswb %mm2,%mm2 packuswb %mm3,%mm3 packuswb %mm4,%mm4 psubw %mm6,%mm5 punpcklbw %mm3,%mm2 packuswb %mm5,%mm5 punpcklbw %mm5,%mm4 movq %mm0,%mm1 punpcklbw %mm4,%mm0 movq %mm2,%mm3 punpcklbw %mm7,%mm2 movq %mm0,%mm5 punpcklwd %mm2,%mm0 punpckhwd %mm2,%mm5 movq %mm0,(%edi) punpckhbw %mm4,%mm1 movq %mm5,8(%edi) punpckhbw %mm7,%mm3 movq %mm1,%mm5 punpcklwd %mm3,%mm1 movq %mm1,16(%edi) punpckhwd %mm3,%mm5 movq %mm5,24(%edi) addl $32,%edi subl $8,%ecx jne .L13 addl %eax,%esi addl %ebx,%edi decl %edx jne .L14 emms popl %ebx popl %esi popl %edi ret .text .align 16 .globl mmx_yuv420_bgr32 mmx_yuv420_bgr32: pushl %ebx pushl %ebp pushl %esi pushl %edi movl %esp,%ecx leal -48(%esp),%esp andl $-8,%esp t15 = 0 t16 = 8 t17 = 16 t10 = 24 t11 = 28 t12 = 32 t13 = 36 t14 = 40 t18 = 44 movl 0+16+20(%ecx),%ebx movl %ebx,t13(%esp) shrl $1,%ebx movl 0+16+36(%ecx),%eax subl %ebx,%eax movl %eax,t12(%esp) movl 0+16+32(%ecx),%eax addl %ebx,%ebx movl 0+16+4(%ecx),%edi movl %eax,%ebp movl 0+16+28(%ecx),%esi subl %ebx,%eax movl %eax,t10(%esp) shll $2,%ebx movl %esi,%edx movl 0+16+24(%ecx),%eax subl %ebx,%esi movl 0+16+16(%ecx),%ebx movl %esi,t11(%esp) movl 0+16+8(%ecx),%esi movl %eax,t14(%esp) movl 0+16+12(%ecx),%eax movl %ecx,t18(%esp) .align 16 .L16: movl t13(%esp),%ecx .L15: pxor %mm7,%mm7 movq .L4,%mm3 pxor %mm1,%mm1 movd (%eax),%mm0 addl $4,%eax punpcklbw %mm1,%mm0 movd (%ebx),%mm2 addl $4,%ebx psubw %mm3,%mm0 punpcklbw %mm1,%mm2 movq (%esi),%mm4 psubw %mm3,%mm2 movq %mm4,%mm5 psrlw $3,%mm3 pand .L3,%mm4 psrlw $8,%mm5 psubw %mm3,%mm4 psubw %mm3,%mm5 psllw $3,%mm0 movq %mm0,%mm6 pmulhw .L6,%mm6 psllw $2,%mm2 movq %mm2,%mm1 pmulhw .L9,%mm1 psllw $2,%mm4 pmulhw .L7,%mm0 psllw $2,%mm5 pmulhw .L8,%mm2 paddw %mm1,%mm6 pmulhw .L5,%mm4 movq %mm0,t16(%esp) pmulhw .L5,%mm5 movq %mm2,t15(%esp) movq %mm0,%mm1 movq %mm6,t17(%esp) paddw %mm4,%mm0 paddw %mm5,%mm1 packuswb %mm0,%mm0 movq %mm2,%mm3 packuswb %mm1,%mm1 paddw %mm4,%mm2 punpcklbw %mm1,%mm0 paddw %mm5,%mm3 psubw %mm6,%mm4 packuswb %mm2,%mm2 packuswb %mm3,%mm3 packuswb %mm4,%mm4 psubw %mm6,%mm5 punpcklbw %mm3,%mm2 packuswb %mm5,%mm5 punpcklbw %mm5,%mm4 movq %mm0,%mm1 punpcklbw %mm4,%mm0 movq %mm2,%mm3 punpcklbw %mm7,%mm2 movq %mm0,%mm5 punpcklwd %mm2,%mm0 punpckhwd %mm2,%mm5 movq %mm0,(%edi) punpckhbw %mm4,%mm1 movq %mm5,8(%edi) punpckhbw %mm7,%mm3 movq %mm1,%mm5 punpcklwd %mm3,%mm1 movq %mm1,16(%edi) punpckhwd %mm3,%mm5 movq %mm5,24(%edi) movq (%esi,%ebp),%mm4 addl $8,%esi movq .L12,%mm3 movq %mm4,%mm5 pand .L3,%mm4 psrlw $8,%mm5 psubw %mm3,%mm4 psubw %mm3,%mm5 movq t16(%esp),%mm0 psllw $2,%mm4 movq t15(%esp),%mm2 psllw $2,%mm5 pmulhw .L5,%mm4 movq %mm0,%mm1 pmulhw .L5,%mm5 paddw %mm4,%mm0 paddw %mm5,%mm1 packuswb %mm0,%mm0 movq %mm2,%mm3 packuswb %mm1,%mm1 paddw %mm4,%mm2 punpcklbw %mm1,%mm0 paddw %mm5,%mm3 psubw t17(%esp),%mm4 packuswb %mm2,%mm2 packuswb %mm3,%mm3 packuswb %mm4,%mm4 psubw t17(%esp),%mm5 punpcklbw %mm3,%mm2 packuswb %mm5,%mm5 punpcklbw %mm5,%mm4 movq %mm0,%mm1 punpcklbw %mm4,%mm0 movq %mm2,%mm3 punpcklbw %mm7,%mm2 movq %mm0,%mm5 punpcklwd %mm2,%mm0 punpckhwd %mm2,%mm5 movq %mm0,(%edi,%edx) punpckhbw %mm4,%mm1 movq %mm5,8(%edi,%edx) punpckhbw %mm7,%mm3 movq %mm1,%mm5 punpcklwd %mm3,%mm1 movq %mm1,16(%edi,%edx) punpckhwd %mm3,%mm5 movq %mm5,24(%edi,%edx) addl $32,%edi subl $8,%ecx jne .L15 addl t10(%esp),%esi addl %ebp,%esi movl t12(%esp),%ecx addl %ecx,%eax addl t11(%esp),%edi addl %edx,%edi addl %ecx,%ebx subl $2,t14(%esp) jne .L16 movl t18(%esp),%esp emms popl %edi popl %esi popl %ebp popl %ebx ret .text .align 16 .globl mmx_yuyv_rgb24 mmx_yuyv_rgb24: pushl %edi pushl %esi pushl %ebx movl 0+12+12(%esp),%ecx movl 0+12+24(%esp),%eax addl %ecx,%ecx movl 0+12+20(%esp),%ebx subl %ecx,%eax movl 0+12+12(%esp),%ecx leal (%ecx,%ecx,2),%ecx movl 0+12+16(%esp),%edx subl %ecx,%ebx movl 0+12+8(%esp),%esi movl 0+12+4(%esp),%edi .align 16 .L18: movl 0+12+12(%esp),%ecx .L17: movq (%esi),%mm4 movq %mm4,%mm6 movq 8(%esi),%mm5 punpcklwd %mm5,%mm4 addl $16,%esi punpckhwd %mm5,%mm6 movq %mm4,%mm5 punpcklwd %mm6,%mm4 movq %mm4,%mm0 punpckhwd %mm6,%mm5 movq .L3,%mm1 movq %mm5,%mm2 movq .L4,%mm3 psrlw $8,%mm0 pand %mm1,%mm4 psubw %mm3,%mm0 psrlw $8,%mm2 pand %mm1,%mm5 psubw %mm3,%mm2 psrlw $3,%mm3 psubw %mm3,%mm4 psubw %mm3,%mm5 psllw $3,%mm0 movq %mm0,%mm6 pmulhw .L6,%mm6 psllw $2,%mm2 movq %mm2,%mm1 pmulhw .L9,%mm1 psllw $2,%mm4 pmulhw .L7,%mm0 psllw $2,%mm5 pmulhw .L8,%mm2 paddw %mm1,%mm6 pmulhw .L5,%mm4 movq %mm0,%mm1 pmulhw .L5,%mm5 movq %mm2,%mm3 paddw %mm4,%mm0 paddw %mm5,%mm1 paddw %mm4,%mm2 packuswb %mm1,%mm0 paddw %mm5,%mm3 psubw %mm6,%mm4 packuswb %mm3,%mm2 psubw %mm6,%mm5 packuswb %mm5,%mm4 movq %mm2,%mm1 punpcklbw %mm4,%mm2 psrlq $32,%mm1 punpckhbw %mm0,%mm4 punpcklbw %mm1,%mm0 movq %mm2,%mm1 punpcklwd %mm0,%mm2 psrlq $32,%mm1 punpckhwd %mm4,%mm0 psllq $32,%mm4 movq %mm0,%mm3 punpcklwd %mm1,%mm0 movq %mm2,%mm5 punpckhwd %mm4,%mm2 movq %mm0,%mm4 psllq $32,%mm5 punpcklwd %mm2,%mm4 movq %mm4,%mm1 psrlq $32,%mm4 punpcklwd %mm1,%mm4 punpckhdq %mm4,%mm5 movq %mm5,(%edi) psllq $32,%mm4 punpckhdq %mm4,%mm2 movq %mm2,8(%edi) punpckhdq %mm3,%mm0 movq %mm0,16(%edi) addl $24,%edi subl $8,%ecx jne .L17 addl %eax,%esi addl %ebx,%edi decl %edx jne .L18 emms popl %ebx popl %esi popl %edi ret .text .align 16 .globl mmx_yuv420_rgb24 mmx_yuv420_rgb24: pushl %ebx pushl %ebp pushl %esi pushl %edi movl %esp,%ecx leal -40(%esp),%esp andl $-8,%esp t24 = 0 t25 = 8 t19 = 16 t20 = 20 t21 = 24 t22 = 28 t23 = 32 t26 = 36 movl 0+16+20(%ecx),%ebx movl %ebx,t22(%esp) shrl $1,%ebx movl 0+16+36(%ecx),%eax subl %ebx,%eax movl %eax,t21(%esp) movl 0+16+32(%ecx),%eax addl %ebx,%ebx movl 0+16+4(%ecx),%edi movl %eax,%ebp movl 0+16+28(%ecx),%esi subl %ebx,%eax movl %eax,t19(%esp) leal (%ebx,%ebx,2),%ebx movl %esi,%edx movl 0+16+24(%ecx),%eax subl %ebx,%esi movl 0+16+16(%ecx),%ebx movl %esi,t20(%esp) movl 0+16+8(%ecx),%esi movl %eax,t23(%esp) movl 0+16+12(%ecx),%eax movl %ecx,t26(%esp) .align 16 .L20: movl t22(%esp),%ecx .L19: movq .L4,%mm3 pxor %mm1,%mm1 movd (%eax),%mm0 addl $4,%eax punpcklbw %mm1,%mm0 movd (%ebx),%mm2 addl $4,%ebx psubw %mm3,%mm0 punpcklbw %mm1,%mm2 movq (%esi),%mm4 psubw %mm3,%mm2 movq %mm4,%mm5 psrlw $3,%mm3 pand .L3,%mm4 psrlw $8,%mm5 psubw %mm3,%mm4 psubw %mm3,%mm5 psllw $3,%mm0 movq %mm0,%mm6 pmulhw .L6,%mm6 psllw $2,%mm2 movq %mm2,%mm1 pmulhw .L9,%mm1 psllw $2,%mm4 pmulhw .L7,%mm0 psllw $2,%mm5 pmulhw .L8,%mm2 paddw %mm1,%mm6 pmulhw .L5,%mm4 movq %mm0,%mm7 pmulhw .L5,%mm5 movq %mm2,t24(%esp) movq %mm0,%mm1 movq %mm6,t25(%esp) movq %mm2,%mm3 paddw %mm4,%mm0 paddw %mm5,%mm1 paddw %mm4,%mm2 packuswb %mm1,%mm0 paddw %mm5,%mm3 psubw %mm6,%mm4 packuswb %mm3,%mm2 psubw %mm6,%mm5 packuswb %mm5,%mm4 movq %mm2,%mm1 punpcklbw %mm4,%mm2 psrlq $32,%mm1 punpckhbw %mm0,%mm4 punpcklbw %mm1,%mm0 movq %mm2,%mm1 punpcklwd %mm0,%mm2 psrlq $32,%mm1 punpckhwd %mm4,%mm0 psllq $32,%mm4 movq %mm0,%mm3 punpcklwd %mm1,%mm0 movq %mm2,%mm5 punpckhwd %mm4,%mm2 movq %mm0,%mm4 psllq $32,%mm5 punpcklwd %mm2,%mm4 movq %mm4,%mm1 psrlq $32,%mm4 punpcklwd %mm1,%mm4 punpckhdq %mm4,%mm5 movq %mm5,(%edi) psllq $32,%mm4 punpckhdq %mm4,%mm2 movq %mm2,8(%edi) punpckhdq %mm3,%mm0 movq %mm0,16(%edi) movq (%esi,%ebp),%mm4 addl $8,%esi movq .L12,%mm3 movq %mm4,%mm5 pand .L3,%mm4 psrlw $8,%mm5 psubw %mm3,%mm4 psubw %mm3,%mm5 movq %mm7,%mm0 psllw $2,%mm4 movq t24(%esp),%mm2 psllw $2,%mm5 pmulhw .L5,%mm4 movq %mm0,%mm1 pmulhw .L5,%mm5 movq %mm2,%mm3 paddw %mm4,%mm0 paddw %mm5,%mm1 paddw %mm4,%mm2 packuswb %mm1,%mm0 paddw %mm5,%mm3 psubw t25(%esp),%mm4 packuswb %mm3,%mm2 psubw t25(%esp),%mm5 packuswb %mm5,%mm4 movq %mm2,%mm1 punpcklbw %mm4,%mm2 psrlq $32,%mm1 punpckhbw %mm0,%mm4 punpcklbw %mm1,%mm0 movq %mm2,%mm1 punpcklwd %mm0,%mm2 psrlq $32,%mm1 punpckhwd %mm4,%mm0 psllq $32,%mm4 movq %mm0,%mm3 punpcklwd %mm1,%mm0 movq %mm2,%mm5 punpckhwd %mm4,%mm2 movq %mm0,%mm4 psllq $32,%mm5 punpcklwd %mm2,%mm4 movq %mm4,%mm1 psrlq $32,%mm4 punpcklwd %mm1,%mm4 punpckhdq %mm4,%mm5 movq %mm5,(%edi,%edx) psllq $32,%mm4 punpckhdq %mm4,%mm2 movq %mm2,8(%edi,%edx) punpckhdq %mm3,%mm0 movq %mm0,16(%edi,%edx) addl $24,%edi subl $8,%ecx jne .L19 addl t19(%esp),%esi addl %ebp,%esi movl t21(%esp),%ecx addl %ecx,%eax addl t20(%esp),%edi addl %edx,%edi addl %ecx,%ebx subl $2,t23(%esp) jne .L20 movl t26(%esp),%esp emms popl %edi popl %esi popl %ebp popl %ebx ret .text .align 16 .globl mmx_yuyv_bgr24 mmx_yuyv_bgr24: pushl %edi pushl %esi pushl %ebx movl 0+12+12(%esp),%ecx movl 0+12+24(%esp),%eax addl %ecx,%ecx movl 0+12+20(%esp),%ebx subl %ecx,%eax movl 0+12+12(%esp),%ecx leal (%ecx,%ecx,2),%ecx movl 0+12+16(%esp),%edx subl %ecx,%ebx movl 0+12+8(%esp),%esi movl 0+12+4(%esp),%edi .align 16 .L22: movl 0+12+12(%esp),%ecx .L21: movq (%esi),%mm4 movq %mm4,%mm6 movq 8(%esi),%mm5 punpcklwd %mm5,%mm4 addl $16,%esi punpckhwd %mm5,%mm6 movq %mm4,%mm5 punpcklwd %mm6,%mm4 movq %mm4,%mm0 punpckhwd %mm6,%mm5 movq .L3,%mm1 movq %mm5,%mm2 movq .L4,%mm3 psrlw $8,%mm0 pand %mm1,%mm4 psubw %mm3,%mm0 psrlw $8,%mm2 pand %mm1,%mm5 psubw %mm3,%mm2 psrlw $3,%mm3 psubw %mm3,%mm4 psubw %mm3,%mm5 psllw $3,%mm0 movq %mm0,%mm6 pmulhw .L6,%mm6 psllw $2,%mm2 movq %mm2,%mm1 pmulhw .L9,%mm1 psllw $2,%mm4 pmulhw .L7,%mm0 psllw $2,%mm5 pmulhw .L8,%mm2 paddw %mm1,%mm6 pmulhw .L5,%mm4 movq %mm0,%mm1 pmulhw .L5,%mm5 movq %mm2,%mm3 paddw %mm4,%mm0 paddw %mm5,%mm1 paddw %mm4,%mm2 packuswb %mm1,%mm0 paddw %mm5,%mm3 psubw %mm6,%mm4 packuswb %mm3,%mm2 psubw %mm6,%mm5 packuswb %mm5,%mm4 movq %mm0,%mm1 punpcklbw %mm4,%mm0 psrlq $32,%mm1 punpckhbw %mm2,%mm4 punpcklbw %mm1,%mm2 movq %mm0,%mm1 punpcklwd %mm2,%mm0 psrlq $32,%mm1 punpckhwd %mm4,%mm2 psllq $32,%mm4 movq %mm2,%mm3 punpcklwd %mm1,%mm2 movq %mm0,%mm5 punpckhwd %mm4,%mm0 movq %mm2,%mm4 psllq $32,%mm5 punpcklwd %mm0,%mm4 movq %mm4,%mm1 psrlq $32,%mm4 punpcklwd %mm1,%mm4 punpckhdq %mm4,%mm5 movq %mm5,(%edi) psllq $32,%mm4 punpckhdq %mm4,%mm0 movq %mm0,8(%edi) punpckhdq %mm3,%mm2 movq %mm2,16(%edi) addl $24,%edi subl $8,%ecx jne .L21 addl %eax,%esi addl %ebx,%edi decl %edx jne .L22 emms popl %ebx popl %esi popl %edi ret .text .align 16 .globl mmx_yuv420_bgr24 mmx_yuv420_bgr24: pushl %ebx pushl %ebp pushl %esi pushl %edi movl %esp,%ecx leal -40(%esp),%esp andl $-8,%esp t32 = 0 t33 = 8 t27 = 16 t28 = 20 t29 = 24 t30 = 28 t31 = 32 t34 = 36 movl 0+16+20(%ecx),%ebx movl %ebx,t30(%esp) shrl $1,%ebx movl 0+16+36(%ecx),%eax subl %ebx,%eax movl %eax,t29(%esp) movl 0+16+32(%ecx),%eax addl %ebx,%ebx movl 0+16+4(%ecx),%edi movl %eax,%ebp movl 0+16+28(%ecx),%esi subl %ebx,%eax movl %eax,t27(%esp) leal (%ebx,%ebx,2),%ebx movl %esi,%edx movl 0+16+24(%ecx),%eax subl %ebx,%esi movl 0+16+16(%ecx),%ebx movl %esi,t28(%esp) movl 0+16+8(%ecx),%esi movl %eax,t31(%esp) movl 0+16+12(%ecx),%eax movl %ecx,t34(%esp) .align 16 .L24: movl t30(%esp),%ecx .L23: movq .L4,%mm3 pxor %mm1,%mm1 movd (%eax),%mm0 addl $4,%eax punpcklbw %mm1,%mm0 movd (%ebx),%mm2 addl $4,%ebx psubw %mm3,%mm0 punpcklbw %mm1,%mm2 movq (%esi),%mm4 psubw %mm3,%mm2 movq %mm4,%mm5 psrlw $3,%mm3 pand .L3,%mm4 psrlw $8,%mm5 psubw %mm3,%mm4 psubw %mm3,%mm5 psllw $3,%mm0 movq %mm0,%mm6 pmulhw .L6,%mm6 psllw $2,%mm2 movq %mm2,%mm1 pmulhw .L9,%mm1 psllw $2,%mm4 pmulhw .L7,%mm0 psllw $2,%mm5 pmulhw .L8,%mm2 paddw %mm1,%mm6 pmulhw .L5,%mm4 movq %mm0,%mm7 pmulhw .L5,%mm5 movq %mm2,t32(%esp) movq %mm0,%mm1 movq %mm6,t33(%esp) movq %mm2,%mm3 paddw %mm4,%mm0 paddw %mm5,%mm1 paddw %mm4,%mm2 packuswb %mm1,%mm0 paddw %mm5,%mm3 psubw %mm6,%mm4 packuswb %mm3,%mm2 psubw %mm6,%mm5 packuswb %mm5,%mm4 movq %mm0,%mm1 punpcklbw %mm4,%mm0 psrlq $32,%mm1 punpckhbw %mm2,%mm4 punpcklbw %mm1,%mm2 movq %mm0,%mm1 punpcklwd %mm2,%mm0 psrlq $32,%mm1 punpckhwd %mm4,%mm2 psllq $32,%mm4 movq %mm2,%mm3 punpcklwd %mm1,%mm2 movq %mm0,%mm5 punpckhwd %mm4,%mm0 movq %mm2,%mm4 psllq $32,%mm5 punpcklwd %mm0,%mm4 movq %mm4,%mm1 psrlq $32,%mm4 punpcklwd %mm1,%mm4 punpckhdq %mm4,%mm5 movq %mm5,(%edi) psllq $32,%mm4 punpckhdq %mm4,%mm0 movq %mm0,8(%edi) punpckhdq %mm3,%mm2 movq %mm2,16(%edi) movq (%esi,%ebp),%mm4 addl $8,%esi movq .L12,%mm3 movq %mm4,%mm5 pand .L3,%mm4 psrlw $8,%mm5 psubw %mm3,%mm4 psubw %mm3,%mm5 movq %mm7,%mm0 psllw $2,%mm4 movq t32(%esp),%mm2 psllw $2,%mm5 pmulhw .L5,%mm4 movq %mm0,%mm1 pmulhw .L5,%mm5 movq %mm2,%mm3 paddw %mm4,%mm0 paddw %mm5,%mm1 paddw %mm4,%mm2 packuswb %mm1,%mm0 paddw %mm5,%mm3 psubw t33(%esp),%mm4 packuswb %mm3,%mm2 psubw t33(%esp),%mm5 packuswb %mm5,%mm4 movq %mm0,%mm1 punpcklbw %mm4,%mm0 psrlq $32,%mm1 punpckhbw %mm2,%mm4 punpcklbw %mm1,%mm2 movq %mm0,%mm1 punpcklwd %mm2,%mm0 psrlq $32,%mm1 punpckhwd %mm4,%mm2 psllq $32,%mm4 movq %mm2,%mm3 punpcklwd %mm1,%mm2 movq %mm0,%mm5 punpckhwd %mm4,%mm0 movq %mm2,%mm4 psllq $32,%mm5 punpcklwd %mm0,%mm4 movq %mm4,%mm1 psrlq $32,%mm4 punpcklwd %mm1,%mm4 punpckhdq %mm4,%mm5 movq %mm5,(%edi,%edx) psllq $32,%mm4 punpckhdq %mm4,%mm0 movq %mm0,8(%edi,%edx) punpckhdq %mm3,%mm2 movq %mm2,16(%edi,%edx) addl $24,%edi subl $8,%ecx jne .L23 addl t27(%esp),%esi addl %ebp,%esi movl t29(%esp),%ecx addl %ecx,%eax addl t28(%esp),%edi addl %edx,%edi addl %ecx,%ebx subl $2,t31(%esp) jne .L24 movl t34(%esp),%esp emms popl %edi popl %esi popl %ebp popl %ebx ret .text .align 16 .globl mmx_yuyv_rgb565 mmx_yuyv_rgb565: pushl %edi pushl %esi pushl %ebx movl 0+12+12(%esp),%ecx movl 0+12+24(%esp),%eax addl %ecx,%ecx movl 0+12+20(%esp),%ebx subl %ecx,%eax movl 0+12+12(%esp),%ecx addl %ecx,%ecx movl 0+12+16(%esp),%edx subl %ecx,%ebx movl 0+12+8(%esp),%esi movl 0+12+4(%esp),%edi .align 16 .L26: movl 0+12+12(%esp),%ecx .L25: movq .L27,%mm7 movq (%esi),%mm4 movq %mm4,%mm6 movq 8(%esi),%mm5 punpcklwd %mm5,%mm4 addl $16,%esi punpckhwd %mm5,%mm6 movq %mm4,%mm5 punpcklwd %mm6,%mm4 movq %mm4,%mm0 punpckhwd %mm6,%mm5 movq .L3,%mm1 movq %mm5,%mm2 movq .L4,%mm3 psrlw $8,%mm0 pand %mm1,%mm4 psubw %mm3,%mm0 psrlw $8,%mm2 pand %mm1,%mm5 psubw %mm3,%mm2 psrlw $3,%mm3 psubw %mm3,%mm4 psubw %mm3,%mm5 psllw $3,%mm0 movq %mm0,%mm6 pmulhw .L6,%mm6 psllw $2,%mm2 movq %mm2,%mm1 pmulhw .L9,%mm1 psllw $2,%mm4 pmulhw .L7,%mm0 psllw $2,%mm5 pmulhw .L8,%mm2 paddw %mm1,%mm6 pmulhw .L5,%mm4 movq %mm0,%mm1 pmulhw .L5,%mm5 movq %mm2,%mm3 paddw %mm4,%mm0 paddw %mm5,%mm1 paddw %mm4,%mm2 packuswb %mm1,%mm0 paddw %mm5,%mm3 psubw %mm6,%mm4 packuswb %mm3,%mm2 psubw %mm6,%mm5 packuswb %mm5,%mm4 pand %mm7,%mm2 movq %mm4,%mm5 movq .L28,%mm3 pand %mm7,%mm0 psllq $3,%mm4 pand %mm3,%mm5 psrlq $3,%mm2 pand %mm3,%mm4 por %mm4,%mm2 psrlq $5,%mm5 movq %mm2,%mm3 por %mm5,%mm0 punpcklbw %mm0,%mm2 punpckhbw %mm0,%mm3 movq %mm2,%mm5 punpcklwd %mm3,%mm2 movq %mm2,(%edi) punpckhwd %mm3,%mm5 movq %mm5,8(%edi) addl $16,%edi subl $8,%ecx jne .L25 addl %eax,%esi addl %ebx,%edi decl %edx jne .L26 emms popl %ebx popl %esi popl %edi ret .text .align 16 .globl mmx_yuv420_rgb565 mmx_yuv420_rgb565: pushl %ebx pushl %ebp pushl %esi pushl %edi movl %esp,%ecx leal -48(%esp),%esp andl $-8,%esp t40 = 0 t41 = 8 t42 = 16 t35 = 24 t36 = 28 t37 = 32 t38 = 36 t39 = 40 t43 = 44 movl 0+16+20(%ecx),%ebx movl %ebx,t38(%esp) shrl $1,%ebx movl 0+16+36(%ecx),%eax subl %ebx,%eax movl %eax,t37(%esp) movl 0+16+32(%ecx),%eax addl %ebx,%ebx movl 0+16+4(%ecx),%edi movl %eax,%ebp movl 0+16+28(%ecx),%esi subl %ebx,%eax movl %eax,t35(%esp) addl %ebx,%ebx movl %esi,%edx movl 0+16+24(%ecx),%eax subl %ebx,%esi movl 0+16+16(%ecx),%ebx movl %esi,t36(%esp) movl 0+16+8(%ecx),%esi movl %eax,t39(%esp) movl 0+16+12(%ecx),%eax movl %ecx,t43(%esp) .align 16 .L30: movl t38(%esp),%ecx .L29: movq .L27,%mm7 movq .L4,%mm3 pxor %mm1,%mm1 movd (%eax),%mm0 addl $4,%eax punpcklbw %mm1,%mm0 movd (%ebx),%mm2 addl $4,%ebx psubw %mm3,%mm0 punpcklbw %mm1,%mm2 movq (%esi),%mm4 psubw %mm3,%mm2 movq %mm4,%mm5 psrlw $3,%mm3 pand .L3,%mm4 psrlw $8,%mm5 psubw %mm3,%mm4 psubw %mm3,%mm5 psllw $3,%mm0 movq %mm0,%mm6 pmulhw .L6,%mm6 psllw $2,%mm2 movq %mm2,%mm1 pmulhw .L9,%mm1 psllw $2,%mm4 pmulhw .L7,%mm0 psllw $2,%mm5 pmulhw .L8,%mm2 paddw %mm1,%mm6 pmulhw .L5,%mm4 movq %mm0,t41(%esp) pmulhw .L5,%mm5 movq %mm2,t40(%esp) movq %mm0,%mm1 movq %mm6,t42(%esp) movq %mm2,%mm3 paddw %mm4,%mm0 paddw %mm5,%mm1 paddw %mm4,%mm2 packuswb %mm1,%mm0 paddw %mm5,%mm3 psubw %mm6,%mm4 packuswb %mm3,%mm2 psubw %mm6,%mm5 packuswb %mm5,%mm4 pand %mm7,%mm2 movq %mm4,%mm5 movq .L28,%mm3 pand %mm7,%mm0 psllq $3,%mm4 pand %mm3,%mm5 psrlq $3,%mm2 pand %mm3,%mm4 por %mm4,%mm2 psrlq $5,%mm5 movq %mm2,%mm3 por %mm5,%mm0 punpcklbw %mm0,%mm2 punpckhbw %mm0,%mm3 movq %mm2,%mm5 punpcklwd %mm3,%mm2 movq %mm2,(%edi) punpckhwd %mm3,%mm5 movq %mm5,8(%edi) movq (%esi,%ebp),%mm4 addl $8,%esi movq .L12,%mm3 movq %mm4,%mm5 pand .L3,%mm4 psrlw $8,%mm5 psubw %mm3,%mm4 psubw %mm3,%mm5 movq t41(%esp),%mm0 psllw $2,%mm4 movq t40(%esp),%mm2 psllw $2,%mm5 pmulhw .L5,%mm4 movq %mm0,%mm1 pmulhw .L5,%mm5 movq %mm2,%mm3 paddw %mm4,%mm0 paddw %mm5,%mm1 paddw %mm4,%mm2 packuswb %mm1,%mm0 paddw %mm5,%mm3 psubw t42(%esp),%mm4 packuswb %mm3,%mm2 psubw t42(%esp),%mm5 packuswb %mm5,%mm4 pand %mm7,%mm2 movq %mm4,%mm5 movq .L28,%mm3 pand %mm7,%mm0 psllq $3,%mm4 pand %mm3,%mm5 psrlq $3,%mm2 pand %mm3,%mm4 por %mm4,%mm2 psrlq $5,%mm5 movq %mm2,%mm3 por %mm5,%mm0 punpcklbw %mm0,%mm2 punpckhbw %mm0,%mm3 movq %mm2,%mm5 punpcklwd %mm3,%mm2 movq %mm2,(%edi,%edx) punpckhwd %mm3,%mm5 movq %mm5,8(%edi,%edx) addl $16,%edi subl $8,%ecx jne .L29 addl t35(%esp),%esi addl %ebp,%esi movl t37(%esp),%ecx addl %ecx,%eax addl t36(%esp),%edi addl %edx,%edi addl %ecx,%ebx subl $2,t39(%esp) jne .L30 movl t43(%esp),%esp emms popl %edi popl %esi popl %ebp popl %ebx ret .text .align 16 .globl mmx_yuyv_bgr565 mmx_yuyv_bgr565: pushl %edi pushl %esi pushl %ebx movl 0+12+12(%esp),%ecx movl 0+12+24(%esp),%eax addl %ecx,%ecx movl 0+12+20(%esp),%ebx subl %ecx,%eax movl 0+12+12(%esp),%ecx addl %ecx,%ecx movl 0+12+16(%esp),%edx subl %ecx,%ebx movl 0+12+8(%esp),%esi movl 0+12+4(%esp),%edi .align 16 .L32: movl 0+12+12(%esp),%ecx .L31: movq .L27,%mm7 movq (%esi),%mm4 movq %mm4,%mm6 movq 8(%esi),%mm5 punpcklwd %mm5,%mm4 addl $16,%esi punpckhwd %mm5,%mm6 movq %mm4,%mm5 punpcklwd %mm6,%mm4 movq %mm4,%mm0 punpckhwd %mm6,%mm5 movq .L3,%mm1 movq %mm5,%mm2 movq .L4,%mm3 psrlw $8,%mm0 pand %mm1,%mm4 psubw %mm3,%mm0 psrlw $8,%mm2 pand %mm1,%mm5 psubw %mm3,%mm2 psrlw $3,%mm3 psubw %mm3,%mm4 psubw %mm3,%mm5 psllw $3,%mm0 movq %mm0,%mm6 pmulhw .L6,%mm6 psllw $2,%mm2 movq %mm2,%mm1 pmulhw .L9,%mm1 psllw $2,%mm4 pmulhw .L7,%mm0 psllw $2,%mm5 pmulhw .L8,%mm2 paddw %mm1,%mm6 pmulhw .L5,%mm4 movq %mm0,%mm1 pmulhw .L5,%mm5 movq %mm2,%mm3 paddw %mm4,%mm0 paddw %mm5,%mm1 paddw %mm4,%mm2 packuswb %mm1,%mm0 paddw %mm5,%mm3 psubw %mm6,%mm4 packuswb %mm3,%mm2 psubw %mm6,%mm5 packuswb %mm5,%mm4 pand %mm7,%mm0 movq %mm4,%mm5 movq .L28,%mm3 pand %mm7,%mm2 psllq $3,%mm4 pand %mm3,%mm5 psrlq $3,%mm0 pand %mm3,%mm4 por %mm4,%mm0 psrlq $5,%mm5 movq %mm0,%mm3 por %mm5,%mm2 punpcklbw %mm2,%mm0 punpckhbw %mm2,%mm3 movq %mm0,%mm5 punpcklwd %mm3,%mm0 movq %mm0,(%edi) punpckhwd %mm3,%mm5 movq %mm5,8(%edi) addl $16,%edi subl $8,%ecx jne .L31 addl %eax,%esi addl %ebx,%edi decl %edx jne .L32 emms popl %ebx popl %esi popl %edi ret .text .align 16 .globl mmx_yuv420_bgr565 mmx_yuv420_bgr565: pushl %ebx pushl %ebp pushl %esi pushl %edi movl %esp,%ecx leal -48(%esp),%esp andl $-8,%esp t49 = 0 t50 = 8 t51 = 16 t44 = 24 t45 = 28 t46 = 32 t47 = 36 t48 = 40 t52 = 44 movl 0+16+20(%ecx),%ebx movl %ebx,t47(%esp) shrl $1,%ebx movl 0+16+36(%ecx),%eax subl %ebx,%eax movl %eax,t46(%esp) movl 0+16+32(%ecx),%eax addl %ebx,%ebx movl 0+16+4(%ecx),%edi movl %eax,%ebp movl 0+16+28(%ecx),%esi subl %ebx,%eax movl %eax,t44(%esp) addl %ebx,%ebx movl %esi,%edx movl 0+16+24(%ecx),%eax subl %ebx,%esi movl 0+16+16(%ecx),%ebx movl %esi,t45(%esp) movl 0+16+8(%ecx),%esi movl %eax,t48(%esp) movl 0+16+12(%ecx),%eax movl %ecx,t52(%esp) .align 16 .L34: movl t47(%esp),%ecx .L33: movq .L27,%mm7 movq .L4,%mm3 pxor %mm1,%mm1 movd (%eax),%mm0 addl $4,%eax punpcklbw %mm1,%mm0 movd (%ebx),%mm2 addl $4,%ebx psubw %mm3,%mm0 punpcklbw %mm1,%mm2 movq (%esi),%mm4 psubw %mm3,%mm2 movq %mm4,%mm5 psrlw $3,%mm3 pand .L3,%mm4 psrlw $8,%mm5 psubw %mm3,%mm4 psubw %mm3,%mm5 psllw $3,%mm0 movq %mm0,%mm6 pmulhw .L6,%mm6 psllw $2,%mm2 movq %mm2,%mm1 pmulhw .L9,%mm1 psllw $2,%mm4 pmulhw .L7,%mm0 psllw $2,%mm5 pmulhw .L8,%mm2 paddw %mm1,%mm6 pmulhw .L5,%mm4 movq %mm0,t50(%esp) pmulhw .L5,%mm5 movq %mm2,t49(%esp) movq %mm0,%mm1 movq %mm6,t51(%esp) movq %mm2,%mm3 paddw %mm4,%mm0 paddw %mm5,%mm1 paddw %mm4,%mm2 packuswb %mm1,%mm0 paddw %mm5,%mm3 psubw %mm6,%mm4 packuswb %mm3,%mm2 psubw %mm6,%mm5 packuswb %mm5,%mm4 pand %mm7,%mm0 movq %mm4,%mm5 movq .L28,%mm3 pand %mm7,%mm2 psllq $3,%mm4 pand %mm3,%mm5 psrlq $3,%mm0 pand %mm3,%mm4 por %mm4,%mm0 psrlq $5,%mm5 movq %mm0,%mm3 por %mm5,%mm2 punpcklbw %mm2,%mm0 punpckhbw %mm2,%mm3 movq %mm0,%mm5 punpcklwd %mm3,%mm0 movq %mm0,(%edi) punpckhwd %mm3,%mm5 movq %mm5,8(%edi) movq (%esi,%ebp),%mm4 addl $8,%esi movq .L12,%mm3 movq %mm4,%mm5 pand .L3,%mm4 psrlw $8,%mm5 psubw %mm3,%mm4 psubw %mm3,%mm5 movq t50(%esp),%mm0 psllw $2,%mm4 movq t49(%esp),%mm2 psllw $2,%mm5 pmulhw .L5,%mm4 movq %mm0,%mm1 pmulhw .L5,%mm5 movq %mm2,%mm3 paddw %mm4,%mm0 paddw %mm5,%mm1 paddw %mm4,%mm2 packuswb %mm1,%mm0 paddw %mm5,%mm3 psubw t51(%esp),%mm4 packuswb %mm3,%mm2 psubw t51(%esp),%mm5 packuswb %mm5,%mm4 pand %mm7,%mm0 movq %mm4,%mm5 movq .L28,%mm3 pand %mm7,%mm2 psllq $3,%mm4 pand %mm3,%mm5 psrlq $3,%mm0 pand %mm3,%mm4 por %mm4,%mm0 psrlq $5,%mm5 movq %mm0,%mm3 por %mm5,%mm2 punpcklbw %mm2,%mm0 punpckhbw %mm2,%mm3 movq %mm0,%mm5 punpcklwd %mm3,%mm0 movq %mm0,(%edi,%edx) punpckhwd %mm3,%mm5 movq %mm5,8(%edi,%edx) addl $16,%edi subl $8,%ecx jne .L33 addl t44(%esp),%esi addl %ebp,%esi movl t46(%esp),%ecx addl %ecx,%eax addl t45(%esp),%edi addl %edx,%edi addl %ecx,%ebx subl $2,t48(%esp) jne .L34 movl t52(%esp),%esp emms popl %edi popl %esi popl %ebp popl %ebx ret .text .align 16 .globl mmx_yuyv_rgb5551 mmx_yuyv_rgb5551: pushl %edi pushl %esi pushl %ebx movl 0+12+12(%esp),%ecx movl 0+12+24(%esp),%eax addl %ecx,%ecx movl 0+12+20(%esp),%ebx subl %ecx,%eax movl 0+12+12(%esp),%ecx addl %ecx,%ecx movl 0+12+16(%esp),%edx subl %ecx,%ebx movl 0+12+8(%esp),%esi movl 0+12+4(%esp),%edi .align 16 .L36: movl 0+12+12(%esp),%ecx .L35: movq .L27,%mm7 movq (%esi),%mm4 movq %mm4,%mm6 movq 8(%esi),%mm5 punpcklwd %mm5,%mm4 addl $16,%esi punpckhwd %mm5,%mm6 movq %mm4,%mm5 punpcklwd %mm6,%mm4 movq %mm4,%mm0 punpckhwd %mm6,%mm5 movq .L3,%mm1 movq %mm5,%mm2 movq .L4,%mm3 psrlw $8,%mm0 pand %mm1,%mm4 psubw %mm3,%mm0 psrlw $8,%mm2 pand %mm1,%mm5 psubw %mm3,%mm2 psrlw $3,%mm3 psubw %mm3,%mm4 psubw %mm3,%mm5 psllw $3,%mm0 movq %mm0,%mm6 pmulhw .L6,%mm6 psllw $2,%mm2 movq %mm2,%mm1 pmulhw .L9,%mm1 psllw $2,%mm4 pmulhw .L7,%mm0 psllw $2,%mm5 pmulhw .L8,%mm2 paddw %mm1,%mm6 pmulhw .L5,%mm4 movq %mm0,%mm1 pmulhw .L5,%mm5 movq %mm2,%mm3 paddw %mm4,%mm0 paddw %mm5,%mm1 paddw %mm4,%mm2 packuswb %mm1,%mm0 paddw %mm5,%mm3 psubw %mm6,%mm4 packuswb %mm3,%mm2 psubw %mm6,%mm5 packuswb %mm5,%mm4 pand %mm7,%mm2 pand %mm7,%mm0 psrlq $3,%mm2 pand %mm7,%mm4 pxor %mm3,%mm3 psrlq $1,%mm0 movq %mm4,%mm5 punpcklbw %mm3,%mm4 movq %mm2,%mm1 punpckhbw %mm3,%mm5 psllw $2,%mm4 punpcklbw %mm0,%mm2 psllw $2,%mm5 por %mm4,%mm2 punpckhbw %mm0,%mm1 movq %mm2,%mm3 por %mm5,%mm1 punpcklwd %mm1,%mm2 movq %mm2,(%edi) punpckhwd %mm1,%mm3 movq %mm3,8(%edi) addl $16,%edi subl $8,%ecx jne .L35 addl %eax,%esi addl %ebx,%edi decl %edx jne .L36 emms popl %ebx popl %esi popl %edi ret .text .align 16 .globl mmx_yuv420_rgb5551 mmx_yuv420_rgb5551: pushl %ebx pushl %ebp pushl %esi pushl %edi movl %esp,%ecx leal -48(%esp),%esp andl $-8,%esp t58 = 0 t59 = 8 t60 = 16 t53 = 24 t54 = 28 t55 = 32 t56 = 36 t57 = 40 t61 = 44 movl 0+16+20(%ecx),%ebx movl %ebx,t56(%esp) shrl $1,%ebx movl 0+16+36(%ecx),%eax subl %ebx,%eax movl %eax,t55(%esp) movl 0+16+32(%ecx),%eax addl %ebx,%ebx movl 0+16+4(%ecx),%edi movl %eax,%ebp movl 0+16+28(%ecx),%esi subl %ebx,%eax movl %eax,t53(%esp) addl %ebx,%ebx movl %esi,%edx movl 0+16+24(%ecx),%eax subl %ebx,%esi movl 0+16+16(%ecx),%ebx movl %esi,t54(%esp) movl 0+16+8(%ecx),%esi movl %eax,t57(%esp) movl 0+16+12(%ecx),%eax movl %ecx,t61(%esp) .align 16 .L38: movl t56(%esp),%ecx .L37: movq .L27,%mm7 movq .L4,%mm3 pxor %mm1,%mm1 movd (%eax),%mm0 addl $4,%eax punpcklbw %mm1,%mm0 movd (%ebx),%mm2 addl $4,%ebx psubw %mm3,%mm0 punpcklbw %mm1,%mm2 movq (%esi),%mm4 psubw %mm3,%mm2 movq %mm4,%mm5 psrlw $3,%mm3 pand .L3,%mm4 psrlw $8,%mm5 psubw %mm3,%mm4 psubw %mm3,%mm5 psllw $3,%mm0 movq %mm0,%mm6 pmulhw .L6,%mm6 psllw $2,%mm2 movq %mm2,%mm1 pmulhw .L9,%mm1 psllw $2,%mm4 pmulhw .L7,%mm0 psllw $2,%mm5 pmulhw .L8,%mm2 paddw %mm1,%mm6 pmulhw .L5,%mm4 movq %mm0,t59(%esp) pmulhw .L5,%mm5 movq %mm2,t58(%esp) movq %mm0,%mm1 movq %mm6,t60(%esp) movq %mm2,%mm3 paddw %mm4,%mm0 paddw %mm5,%mm1 paddw %mm4,%mm2 packuswb %mm1,%mm0 paddw %mm5,%mm3 psubw %mm6,%mm4 packuswb %mm3,%mm2 psubw %mm6,%mm5 packuswb %mm5,%mm4 pand %mm7,%mm2 pand %mm7,%mm0 psrlq $3,%mm2 pand %mm7,%mm4 pxor %mm3,%mm3 psrlq $1,%mm0 movq %mm4,%mm5 punpcklbw %mm3,%mm4 movq %mm2,%mm1 punpckhbw %mm3,%mm5 psllw $2,%mm4 punpcklbw %mm0,%mm2 psllw $2,%mm5 por %mm4,%mm2 punpckhbw %mm0,%mm1 movq %mm2,%mm3 por %mm5,%mm1 punpcklwd %mm1,%mm2 movq %mm2,(%edi) punpckhwd %mm1,%mm3 movq %mm3,8(%edi) movq (%esi,%ebp),%mm4 addl $8,%esi movq .L12,%mm3 movq %mm4,%mm5 pand .L3,%mm4 psrlw $8,%mm5 psubw %mm3,%mm4 psubw %mm3,%mm5 movq t59(%esp),%mm0 psllw $2,%mm4 movq t58(%esp),%mm2 psllw $2,%mm5 pmulhw .L5,%mm4 movq %mm0,%mm1 pmulhw .L5,%mm5 movq %mm2,%mm3 paddw %mm4,%mm0 paddw %mm5,%mm1 paddw %mm4,%mm2 packuswb %mm1,%mm0 paddw %mm5,%mm3 psubw t60(%esp),%mm4 packuswb %mm3,%mm2 psubw t60(%esp),%mm5 packuswb %mm5,%mm4 pand %mm7,%mm2 pand %mm7,%mm0 psrlq $3,%mm2 pand %mm7,%mm4 pxor %mm3,%mm3 psrlq $1,%mm0 movq %mm4,%mm5 punpcklbw %mm3,%mm4 movq %mm2,%mm1 punpckhbw %mm3,%mm5 psllw $2,%mm4 punpcklbw %mm0,%mm2 psllw $2,%mm5 por %mm4,%mm2 punpckhbw %mm0,%mm1 movq %mm2,%mm3 por %mm5,%mm1 punpcklwd %mm1,%mm2 movq %mm2,(%edi,%edx) punpckhwd %mm1,%mm3 movq %mm3,8(%edi,%edx) addl $16,%edi subl $8,%ecx jne .L37 addl t53(%esp),%esi addl %ebp,%esi movl t55(%esp),%ecx addl %ecx,%eax addl t54(%esp),%edi addl %edx,%edi addl %ecx,%ebx subl $2,t57(%esp) jne .L38 movl t61(%esp),%esp emms popl %edi popl %esi popl %ebp popl %ebx ret .text .align 16 .globl mmx_yuyv_bgr5551 mmx_yuyv_bgr5551: pushl %edi pushl %esi pushl %ebx movl 0+12+12(%esp),%ecx movl 0+12+24(%esp),%eax addl %ecx,%ecx movl 0+12+20(%esp),%ebx subl %ecx,%eax movl 0+12+12(%esp),%ecx addl %ecx,%ecx movl 0+12+16(%esp),%edx subl %ecx,%ebx movl 0+12+8(%esp),%esi movl 0+12+4(%esp),%edi .align 16 .L40: movl 0+12+12(%esp),%ecx .L39: movq .L27,%mm7 movq (%esi),%mm4 movq %mm4,%mm6 movq 8(%esi),%mm5 punpcklwd %mm5,%mm4 addl $16,%esi punpckhwd %mm5,%mm6 movq %mm4,%mm5 punpcklwd %mm6,%mm4 movq %mm4,%mm0 punpckhwd %mm6,%mm5 movq .L3,%mm1 movq %mm5,%mm2 movq .L4,%mm3 psrlw $8,%mm0 pand %mm1,%mm4 psubw %mm3,%mm0 psrlw $8,%mm2 pand %mm1,%mm5 psubw %mm3,%mm2 psrlw $3,%mm3 psubw %mm3,%mm4 psubw %mm3,%mm5 psllw $3,%mm0 movq %mm0,%mm6 pmulhw .L6,%mm6 psllw $2,%mm2 movq %mm2,%mm1 pmulhw .L9,%mm1 psllw $2,%mm4 pmulhw .L7,%mm0 psllw $2,%mm5 pmulhw .L8,%mm2 paddw %mm1,%mm6 pmulhw .L5,%mm4 movq %mm0,%mm1 pmulhw .L5,%mm5 movq %mm2,%mm3 paddw %mm4,%mm0 paddw %mm5,%mm1 paddw %mm4,%mm2 packuswb %mm1,%mm0 paddw %mm5,%mm3 psubw %mm6,%mm4 packuswb %mm3,%mm2 psubw %mm6,%mm5 packuswb %mm5,%mm4 pand %mm7,%mm0 pand %mm7,%mm2 psrlq $3,%mm0 pand %mm7,%mm4 pxor %mm3,%mm3 psrlq $1,%mm2 movq %mm4,%mm5 punpcklbw %mm3,%mm4 movq %mm0,%mm1 punpckhbw %mm3,%mm5 psllw $2,%mm4 punpcklbw %mm2,%mm0 psllw $2,%mm5 por %mm4,%mm0 punpckhbw %mm2,%mm1 movq %mm0,%mm3 por %mm5,%mm1 punpcklwd %mm1,%mm0 movq %mm0,(%edi) punpckhwd %mm1,%mm3 movq %mm3,8(%edi) addl $16,%edi subl $8,%ecx jne .L39 addl %eax,%esi addl %ebx,%edi decl %edx jne .L40 emms popl %ebx popl %esi popl %edi ret .text .align 16 .globl mmx_yuv420_bgr5551 mmx_yuv420_bgr5551: pushl %ebx pushl %ebp pushl %esi pushl %edi movl %esp,%ecx leal -48(%esp),%esp andl $-8,%esp t67 = 0 t68 = 8 t69 = 16 t62 = 24 t63 = 28 t64 = 32 t65 = 36 t66 = 40 t70 = 44 movl 0+16+20(%ecx),%ebx movl %ebx,t65(%esp) shrl $1,%ebx movl 0+16+36(%ecx),%eax subl %ebx,%eax movl %eax,t64(%esp) movl 0+16+32(%ecx),%eax addl %ebx,%ebx movl 0+16+4(%ecx),%edi movl %eax,%ebp movl 0+16+28(%ecx),%esi subl %ebx,%eax movl %eax,t62(%esp) addl %ebx,%ebx movl %esi,%edx movl 0+16+24(%ecx),%eax subl %ebx,%esi movl 0+16+16(%ecx),%ebx movl %esi,t63(%esp) movl 0+16+8(%ecx),%esi movl %eax,t66(%esp) movl 0+16+12(%ecx),%eax movl %ecx,t70(%esp) .align 16 .L42: movl t65(%esp),%ecx .L41: movq .L27,%mm7 movq .L4,%mm3 pxor %mm1,%mm1 movd (%eax),%mm0 addl $4,%eax punpcklbw %mm1,%mm0 movd (%ebx),%mm2 addl $4,%ebx psubw %mm3,%mm0 punpcklbw %mm1,%mm2 movq (%esi),%mm4 psubw %mm3,%mm2 movq %mm4,%mm5 psrlw $3,%mm3 pand .L3,%mm4 psrlw $8,%mm5 psubw %mm3,%mm4 psubw %mm3,%mm5 psllw $3,%mm0 movq %mm0,%mm6 pmulhw .L6,%mm6 psllw $2,%mm2 movq %mm2,%mm1 pmulhw .L9,%mm1 psllw $2,%mm4 pmulhw .L7,%mm0 psllw $2,%mm5 pmulhw .L8,%mm2 paddw %mm1,%mm6 pmulhw .L5,%mm4 movq %mm0,t68(%esp) pmulhw .L5,%mm5 movq %mm2,t67(%esp) movq %mm0,%mm1 movq %mm6,t69(%esp) movq %mm2,%mm3 paddw %mm4,%mm0 paddw %mm5,%mm1 paddw %mm4,%mm2 packuswb %mm1,%mm0 paddw %mm5,%mm3 psubw %mm6,%mm4 packuswb %mm3,%mm2 psubw %mm6,%mm5 packuswb %mm5,%mm4 pand %mm7,%mm0 pand %mm7,%mm2 psrlq $3,%mm0 pand %mm7,%mm4 pxor %mm3,%mm3 psrlq $1,%mm2 movq %mm4,%mm5 punpcklbw %mm3,%mm4 movq %mm0,%mm1 punpckhbw %mm3,%mm5 psllw $2,%mm4 punpcklbw %mm2,%mm0 psllw $2,%mm5 por %mm4,%mm0 punpckhbw %mm2,%mm1 movq %mm0,%mm3 por %mm5,%mm1 punpcklwd %mm1,%mm0 movq %mm0,(%edi) punpckhwd %mm1,%mm3 movq %mm3,8(%edi) movq (%esi,%ebp),%mm4 addl $8,%esi movq .L12,%mm3 movq %mm4,%mm5 pand .L3,%mm4 psrlw $8,%mm5 psubw %mm3,%mm4 psubw %mm3,%mm5 movq t68(%esp),%mm0 psllw $2,%mm4 movq t67(%esp),%mm2 psllw $2,%mm5 pmulhw .L5,%mm4 movq %mm0,%mm1 pmulhw .L5,%mm5 movq %mm2,%mm3 paddw %mm4,%mm0 paddw %mm5,%mm1 paddw %mm4,%mm2 packuswb %mm1,%mm0 paddw %mm5,%mm3 psubw t69(%esp),%mm4 packuswb %mm3,%mm2 psubw t69(%esp),%mm5 packuswb %mm5,%mm4 pand %mm7,%mm0 pand %mm7,%mm2 psrlq $3,%mm0 pand %mm7,%mm4 pxor %mm3,%mm3 psrlq $1,%mm2 movq %mm4,%mm5 punpcklbw %mm3,%mm4 movq %mm0,%mm1 punpckhbw %mm3,%mm5 psllw $2,%mm4 punpcklbw %mm2,%mm0 psllw $2,%mm5 por %mm4,%mm0 punpckhbw %mm2,%mm1 movq %mm0,%mm3 por %mm5,%mm1 punpcklwd %mm1,%mm0 movq %mm0,(%edi,%edx) punpckhwd %mm1,%mm3 movq %mm3,8(%edi,%edx) addl $16,%edi subl $8,%ecx jne .L41 addl t62(%esp),%esi addl %ebp,%esi movl t64(%esp),%ecx addl %ecx,%eax addl t63(%esp),%edi addl %edx,%edi addl %ecx,%ebx subl $2,t66(%esp) jne .L42 movl t70(%esp),%esp emms popl %edi popl %esi popl %ebp popl %ebx ret .text .align 16 .globl mmx_rgb32_yuyv mmx_rgb32_yuyv: pushl %edi pushl %esi pushl %ebx movl 0+12+12(%esp),%ecx movl 0+12+24(%esp),%eax shll $2,%ecx movl 0+12+20(%esp),%ebx subl %ecx,%eax movl 0+12+12(%esp),%ecx addl %ecx,%ecx movl 0+12+16(%esp),%edx subl %ecx,%ebx movl 0+12+8(%esp),%esi movl 0+12+4(%esp),%edi .align 16 .L44: movl 0+12+12(%esp),%ecx .L43: movq (%esi),%mm0 movq 8(%esi),%mm5 movq 16(%esi),%mm2 movq 24(%esi),%mm4 addl $32,%esi movq %mm0,%mm6 punpcklbw %mm5,%mm0 punpckhbw %mm5,%mm6 movq %mm2,%mm7 punpcklbw %mm4,%mm2 punpckhbw %mm4,%mm7 pxor %mm5,%mm5 movq %mm0,%mm4 punpcklwd %mm2,%mm0 punpckhwd %mm2,%mm4 punpcklbw %mm5,%mm4 movq %mm0,%mm2 punpcklbw %mm5,%mm0 punpckhbw %mm5,%mm2 psllw $4,%mm0 movq %mm0,%mm1 pmulhw .L45,%mm0 psllw $5,%mm2 pmulhw .L46,%mm2 psllw $4,%mm4 movq %mm4,%mm3 pmulhw .L47,%mm4 paddw %mm2,%mm0 paddw %mm4,%mm0 movq %mm6,%mm4 punpcklwd %mm7,%mm6 punpckhwd %mm7,%mm4 punpcklbw %mm5,%mm4 movq %mm6,%mm2 punpcklbw %mm5,%mm6 punpckhbw %mm5,%mm2 psllw $4,%mm6 paddw %mm6,%mm1 pmulhw .L45,%mm6 psllw $5,%mm2 pmulhw .L46,%mm2 psllw $4,%mm4 paddw %mm4,%mm3 pmulhw .L47,%mm4 movq .L48,%mm5 paddw %mm2,%mm6 paddw %mm4,%mm6 pmulhw %mm5,%mm1 movq %mm0,%mm2 pmulhw %mm5,%mm3 movq .L52,%mm4 paddw %mm6,%mm2 psrlw $1,%mm2 psubw %mm2,%mm1 pmulhw .L51,%mm1 psubw %mm2,%mm3 pmulhw .L50,%mm3 packsswb %mm1,%mm3 paddw %mm4,%mm0 psrlw $4,%mm0 pxor .L53,%mm3 paddw %mm4,%mm6 psrlw $4,%mm6 packuswb %mm6,%mm0 movq %mm0,%mm6 punpcklbw %mm3,%mm0 punpckhbw %mm3,%mm6 movq %mm0,%mm3 punpcklwd %mm6,%mm0 punpckhwd %mm6,%mm3 movq %mm0,(%edi) movq %mm3,8(%edi) addl $16,%edi subl $8,%ecx jne .L43 addl %eax,%esi addl %ebx,%edi decl %edx jne .L44 emms popl %ebx popl %esi popl %edi ret .text .align 16 .globl mmx_bgr32_yuyv mmx_bgr32_yuyv: pushl %edi pushl %esi pushl %ebx movl 0+12+12(%esp),%ecx movl 0+12+24(%esp),%eax shll $2,%ecx movl 0+12+20(%esp),%ebx subl %ecx,%eax movl 0+12+12(%esp),%ecx addl %ecx,%ecx movl 0+12+16(%esp),%edx subl %ecx,%ebx movl 0+12+8(%esp),%esi movl 0+12+4(%esp),%edi .align 16 .L55: movl 0+12+12(%esp),%ecx .L54: movq (%esi),%mm0 movq 8(%esi),%mm5 movq 16(%esi),%mm2 movq 24(%esi),%mm4 addl $32,%esi movq %mm0,%mm6 punpcklbw %mm5,%mm0 punpckhbw %mm5,%mm6 movq %mm2,%mm7 punpcklbw %mm4,%mm2 punpckhbw %mm4,%mm7 pxor %mm5,%mm5 movq %mm0,%mm4 punpcklwd %mm2,%mm0 punpckhwd %mm2,%mm4 punpcklbw %mm5,%mm4 movq %mm0,%mm2 punpcklbw %mm5,%mm0 punpckhbw %mm5,%mm2 psllw $4,%mm4 movq %mm4,%mm1 pmulhw .L45,%mm4 psllw $5,%mm2 pmulhw .L46,%mm2 psllw $4,%mm0 movq %mm0,%mm3 pmulhw .L47,%mm0 paddw %mm2,%mm4 paddw %mm0,%mm4 movq %mm6,%mm2 punpcklwd %mm7,%mm6 punpckhwd %mm7,%mm2 punpcklbw %mm5,%mm2 movq %mm6,%mm0 punpcklbw %mm5,%mm6 punpckhbw %mm5,%mm0 psllw $4,%mm2 paddw %mm2,%mm1 pmulhw .L45,%mm2 psllw $5,%mm0 pmulhw .L46,%mm0 psllw $4,%mm6 paddw %mm6,%mm3 pmulhw .L47,%mm6 movq .L48,%mm5 paddw %mm0,%mm2 paddw %mm6,%mm2 pmulhw %mm5,%mm1 movq %mm4,%mm0 pmulhw %mm5,%mm3 movq .L52,%mm5 paddw %mm2,%mm0 psrlw $1,%mm0 psubw %mm0,%mm1 pmulhw .L51,%mm1 psubw %mm0,%mm3 pmulhw .L50,%mm3 packsswb %mm1,%mm3 paddw %mm5,%mm4 psrlw $4,%mm4 pxor .L53,%mm3 paddw %mm5,%mm2 psrlw $4,%mm2 packuswb %mm2,%mm4 movq %mm4,%mm2 punpcklbw %mm3,%mm4 punpckhbw %mm3,%mm2 movq %mm4,%mm3 punpcklwd %mm2,%mm4 punpckhwd %mm2,%mm3 movq %mm4,(%edi) movq %mm3,8(%edi) addl $16,%edi subl $8,%ecx jne .L54 addl %eax,%esi addl %ebx,%edi decl %edx jne .L55 emms popl %ebx popl %esi popl %edi ret .text .align 16 .globl mmx_rgb24_yuyv mmx_rgb24_yuyv: pushl %edi pushl %esi pushl %ebx movl 0+12+12(%esp),%ecx movl 0+12+24(%esp),%eax leal (%ecx,%ecx,2),%ecx movl 0+12+20(%esp),%ebx subl %ecx,%eax movl 0+12+12(%esp),%ecx addl %ecx,%ecx movl 0+12+16(%esp),%edx subl %ecx,%ebx movl 0+12+8(%esp),%esi movl 0+12+4(%esp),%edi .align 16 .L57: movl 0+12+12(%esp),%ecx .L56: movq (%esi),%mm4 movq 8(%esi),%mm0 movq 16(%esi),%mm2 addl $24,%esi movq %mm4,%mm6 psllq $32,%mm4 punpckhbw %mm0,%mm4 psrlq $32,%mm6 punpcklbw %mm2,%mm6 psllq $32,%mm0 punpckhbw %mm2,%mm0 movq %mm4,%mm2 psllq $32,%mm2 punpckhbw %mm6,%mm2 psllq $32,%mm6 punpckhbw %mm0,%mm6 psllq $32,%mm0 punpckhbw %mm0,%mm4 pxor %mm5,%mm5 movq %mm2,%mm0 punpcklbw %mm5,%mm0 punpckhbw %mm5,%mm2 movq %mm4,%mm7 punpcklbw %mm5,%mm4 psllw $4,%mm0 movq %mm0,%mm1 pmulhw .L45,%mm0 psllw $5,%mm2 pmulhw .L46,%mm2 psllw $4,%mm4 movq %mm4,%mm3 pmulhw .L47,%mm4 paddw %mm2,%mm0 paddw %mm4,%mm0 movq %mm6,%mm2 punpcklbw %mm5,%mm6 punpckhbw %mm5,%mm2 punpckhbw %mm5,%mm7 psllw $4,%mm7 paddw %mm7,%mm1 pmulhw .L45,%mm7 psllw $5,%mm6 pmulhw .L46,%mm6 psllw $4,%mm2 paddw %mm2,%mm3 pmulhw .L47,%mm2 movq .L48,%mm4 paddw %mm6,%mm7 paddw %mm2,%mm7 pmulhw %mm4,%mm1 movq %mm0,%mm2 pmulhw %mm4,%mm3 movq .L52,%mm4 paddw %mm7,%mm2 psrlw $1,%mm2 psubw %mm2,%mm1 pmulhw .L51,%mm1 psubw %mm2,%mm3 pmulhw .L50,%mm3 packsswb %mm1,%mm3 paddw %mm4,%mm0 psrlw $4,%mm0 pxor .L53,%mm3 paddw %mm4,%mm7 psrlw $4,%mm7 packuswb %mm7,%mm0 movq %mm0,%mm7 punpcklbw %mm3,%mm0 punpckhbw %mm3,%mm7 movq %mm0,%mm3 punpcklwd %mm7,%mm0 punpckhwd %mm7,%mm3 movq %mm0,(%edi) movq %mm3,8(%edi) addl $16,%edi subl $8,%ecx jne .L56 addl %eax,%esi addl %ebx,%edi decl %edx jne .L57 emms popl %ebx popl %esi popl %edi ret .text .align 16 .globl mmx_bgr24_yuyv mmx_bgr24_yuyv: pushl %edi pushl %esi pushl %ebx movl 0+12+12(%esp),%ecx movl 0+12+24(%esp),%eax leal (%ecx,%ecx,2),%ecx movl 0+12+20(%esp),%ebx subl %ecx,%eax movl 0+12+12(%esp),%ecx addl %ecx,%ecx movl 0+12+16(%esp),%edx subl %ecx,%ebx movl 0+12+8(%esp),%esi movl 0+12+4(%esp),%edi .align 16 .L59: movl 0+12+12(%esp),%ecx .L58: movq (%esi),%mm4 movq 8(%esi),%mm0 movq 16(%esi),%mm2 addl $24,%esi movq %mm4,%mm6 psllq $32,%mm4 punpckhbw %mm0,%mm4 psrlq $32,%mm6 punpcklbw %mm2,%mm6 psllq $32,%mm0 punpckhbw %mm2,%mm0 movq %mm4,%mm2 psllq $32,%mm2 punpckhbw %mm6,%mm2 psllq $32,%mm6 punpckhbw %mm0,%mm6 psllq $32,%mm0 punpckhbw %mm0,%mm4 pxor %mm5,%mm5 movq %mm2,%mm0 punpcklbw %mm5,%mm0 punpckhbw %mm5,%mm2 movq %mm4,%mm7 punpcklbw %mm5,%mm4 psllw $4,%mm4 movq %mm4,%mm1 pmulhw .L45,%mm4 psllw $5,%mm2 pmulhw .L46,%mm2 psllw $4,%mm0 movq %mm0,%mm3 pmulhw .L47,%mm0 paddw %mm2,%mm4 paddw %mm0,%mm4 movq %mm6,%mm0 punpcklbw %mm5,%mm6 punpckhbw %mm5,%mm0 punpckhbw %mm5,%mm7 psllw $4,%mm0 paddw %mm0,%mm1 pmulhw .L45,%mm0 psllw $5,%mm6 pmulhw .L46,%mm6 psllw $4,%mm7 paddw %mm7,%mm3 pmulhw .L47,%mm7 movq .L48,%mm2 paddw %mm6,%mm0 paddw %mm7,%mm0 pmulhw %mm2,%mm1 movq %mm4,%mm5 pmulhw %mm2,%mm3 movq .L52,%mm2 paddw %mm0,%mm5 psrlw $1,%mm5 psubw %mm5,%mm1 pmulhw .L51,%mm1 psubw %mm5,%mm3 pmulhw .L50,%mm3 packsswb %mm1,%mm3 paddw %mm2,%mm4 psrlw $4,%mm4 pxor .L53,%mm3 paddw %mm2,%mm0 psrlw $4,%mm0 packuswb %mm0,%mm4 movq %mm4,%mm0 punpcklbw %mm3,%mm4 punpckhbw %mm3,%mm0 movq %mm4,%mm3 punpcklwd %mm0,%mm4 punpckhwd %mm0,%mm3 movq %mm4,(%edi) movq %mm3,8(%edi) addl $16,%edi subl $8,%ecx jne .L58 addl %eax,%esi addl %ebx,%edi decl %edx jne .L59 emms popl %ebx popl %esi popl %edi ret .text .align 16 .globl mmx_rgb565_yuyv mmx_rgb565_yuyv: pushl %edi pushl %esi pushl %ebx movl 0+12+12(%esp),%ecx movl 0+12+24(%esp),%eax addl %ecx,%ecx movl 0+12+20(%esp),%ebx subl %ecx,%eax movl 0+12+12(%esp),%ecx addl %ecx,%ecx movl 0+12+16(%esp),%edx subl %ecx,%ebx movl 0+12+8(%esp),%esi movl 0+12+4(%esp),%edi .align 16 .L61: movl 0+12+12(%esp),%ecx .L60: movq (%esi),%mm2 movq 8(%esi),%mm6 addl $16,%esi movq %mm2,%mm0 punpcklwd %mm6,%mm2 punpckhwd %mm6,%mm0 movq %mm2,%mm6 punpcklwd %mm0,%mm2 punpckhwd %mm0,%mm6 movq .L62,%mm4 movq %mm2,%mm0 pand %mm4,%mm0 pxor %mm0,%mm2 movq %mm0,%mm5 psllw $3,%mm5 psrlw $2,%mm0 por %mm5,%mm0 psllw $11,%mm4 pand %mm2,%mm4 pxor %mm4,%mm2 movq %mm4,%mm5 psrlw $8,%mm5 psrlw $13,%mm4 por %mm5,%mm4 movq %mm2,%mm5 psrlw $3,%mm5 psrlw $9,%mm2 por %mm5,%mm2 psllw $4,%mm0 movq %mm0,%mm1 pmulhw .L45,%mm0 psllw $5,%mm2 pmulhw .L46,%mm2 psllw $4,%mm4 movq %mm4,%mm3 pmulhw .L47,%mm4 paddw %mm2,%mm0 paddw %mm4,%mm0 movq .L62,%mm4 movq %mm6,%mm2 pand %mm4,%mm2 pxor %mm2,%mm6 movq %mm2,%mm5 psllw $3,%mm5 psrlw $2,%mm2 por %mm5,%mm2 psllw $11,%mm4 pand %mm6,%mm4 pxor %mm4,%mm6 movq %mm4,%mm5 psrlw $8,%mm5 psrlw $13,%mm4 por %mm5,%mm4 movq %mm6,%mm5 psrlw $3,%mm5 psrlw $9,%mm6 por %mm5,%mm6 psllw $4,%mm2 paddw %mm2,%mm1 pmulhw .L45,%mm2 psllw $5,%mm6 pmulhw .L46,%mm6 psllw $4,%mm4 paddw %mm4,%mm3 pmulhw .L47,%mm4 movq .L48,%mm5 paddw %mm6,%mm2 paddw %mm4,%mm2 pmulhw %mm5,%mm1 movq %mm0,%mm4 pmulhw %mm5,%mm3 movq .L52,%mm5 paddw %mm2,%mm4 psrlw $1,%mm4 psubw %mm4,%mm1 pmulhw .L51,%mm1 psubw %mm4,%mm3 pmulhw .L50,%mm3 packsswb %mm1,%mm3 paddw %mm5,%mm0 psrlw $4,%mm0 pxor .L53,%mm3 paddw %mm5,%mm2 psrlw $4,%mm2 packuswb %mm2,%mm0 movq %mm0,%mm2 punpcklbw %mm3,%mm0 punpckhbw %mm3,%mm2 movq %mm0,%mm3 punpcklwd %mm2,%mm0 punpckhwd %mm2,%mm3 movq %mm0,(%edi) movq %mm3,8(%edi) addl $16,%edi subl $8,%ecx jne .L60 addl %eax,%esi addl %ebx,%edi decl %edx jne .L61 emms popl %ebx popl %esi popl %edi ret .text .align 16 .globl mmx_bgr565_yuyv mmx_bgr565_yuyv: pushl %edi pushl %esi pushl %ebx movl 0+12+12(%esp),%ecx movl 0+12+24(%esp),%eax addl %ecx,%ecx movl 0+12+20(%esp),%ebx subl %ecx,%eax movl 0+12+12(%esp),%ecx addl %ecx,%ecx movl 0+12+16(%esp),%edx subl %ecx,%ebx movl 0+12+8(%esp),%esi movl 0+12+4(%esp),%edi .align 16 .L64: movl 0+12+12(%esp),%ecx .L63: movq (%esi),%mm2 movq 8(%esi),%mm6 addl $16,%esi movq %mm2,%mm0 punpcklwd %mm6,%mm2 punpckhwd %mm6,%mm0 movq %mm2,%mm6 punpcklwd %mm0,%mm2 punpckhwd %mm0,%mm6 movq .L62,%mm4 movq %mm2,%mm0 pand %mm4,%mm0 pxor %mm0,%mm2 movq %mm0,%mm5 psllw $3,%mm5 psrlw $2,%mm0 por %mm5,%mm0 psllw $11,%mm4 pand %mm2,%mm4 pxor %mm4,%mm2 movq %mm4,%mm5 psrlw $8,%mm5 psrlw $13,%mm4 por %mm5,%mm4 movq %mm2,%mm5 psrlw $3,%mm5 psrlw $9,%mm2 por %mm5,%mm2 psllw $4,%mm4 movq %mm4,%mm1 pmulhw .L45,%mm4 psllw $5,%mm2 pmulhw .L46,%mm2 psllw $4,%mm0 movq %mm0,%mm3 pmulhw .L47,%mm0 paddw %mm2,%mm4 paddw %mm0,%mm4 movq .L62,%mm2 movq %mm6,%mm0 pand %mm2,%mm0 pxor %mm0,%mm6 movq %mm0,%mm5 psllw $3,%mm5 psrlw $2,%mm0 por %mm5,%mm0 psllw $11,%mm2 pand %mm6,%mm2 pxor %mm2,%mm6 movq %mm2,%mm5 psrlw $8,%mm5 psrlw $13,%mm2 por %mm5,%mm2 movq %mm6,%mm5 psrlw $3,%mm5 psrlw $9,%mm6 por %mm5,%mm6 psllw $4,%mm2 paddw %mm2,%mm1 pmulhw .L45,%mm2 psllw $5,%mm6 pmulhw .L46,%mm6 psllw $4,%mm0 paddw %mm0,%mm3 pmulhw .L47,%mm0 movq .L48,%mm5 paddw %mm6,%mm2 paddw %mm0,%mm2 pmulhw %mm5,%mm1 movq %mm4,%mm0 pmulhw %mm5,%mm3 movq .L52,%mm5 paddw %mm2,%mm0 psrlw $1,%mm0 psubw %mm0,%mm1 pmulhw .L51,%mm1 psubw %mm0,%mm3 pmulhw .L50,%mm3 packsswb %mm1,%mm3 paddw %mm5,%mm4 psrlw $4,%mm4 pxor .L53,%mm3 paddw %mm5,%mm2 psrlw $4,%mm2 packuswb %mm2,%mm4 movq %mm4,%mm2 punpcklbw %mm3,%mm4 punpckhbw %mm3,%mm2 movq %mm4,%mm3 punpcklwd %mm2,%mm4 punpckhwd %mm2,%mm3 movq %mm4,(%edi) movq %mm3,8(%edi) addl $16,%edi subl $8,%ecx jne .L63 addl %eax,%esi addl %ebx,%edi decl %edx jne .L64 emms popl %ebx popl %esi popl %edi ret .text .align 16 .globl mmx_rgb5551_yuyv mmx_rgb5551_yuyv: pushl %edi pushl %esi pushl %ebx movl 0+12+12(%esp),%ecx movl 0+12+24(%esp),%eax addl %ecx,%ecx movl 0+12+20(%esp),%ebx subl %ecx,%eax movl 0+12+12(%esp),%ecx addl %ecx,%ecx movl 0+12+16(%esp),%edx subl %ecx,%ebx movl 0+12+8(%esp),%esi movl 0+12+4(%esp),%edi .align 16 .L66: movl 0+12+12(%esp),%ecx .L65: movq (%esi),%mm4 movq 8(%esi),%mm6 addl $16,%esi movq %mm4,%mm0 punpcklwd %mm6,%mm4 punpckhwd %mm6,%mm0 movq %mm4,%mm6 punpcklwd %mm0,%mm4 punpckhwd %mm0,%mm6 movq .L62,%mm5 movq %mm4,%mm0 pand %mm5,%mm0 movq %mm0,%mm7 psllw $3,%mm7 psrlw $2,%mm0 por %mm7,%mm0 movq %mm4,%mm2 psrlw $5,%mm2 pand %mm5,%mm2 movq %mm2,%mm7 psllw $3,%mm7 psrlw $2,%mm2 por %mm7,%mm2 psrlw $10,%mm4 pand %mm5,%mm4 movq %mm4,%mm7 psllw $3,%mm7 psrlw $2,%mm4 por %mm7,%mm4 psllw $4,%mm0 movq %mm0,%mm1 pmulhw .L45,%mm0 psllw $5,%mm2 pmulhw .L46,%mm2 psllw $4,%mm4 movq %mm4,%mm3 pmulhw .L47,%mm4 paddw %mm2,%mm0 paddw %mm4,%mm0 movq %mm6,%mm2 pand %mm5,%mm2 movq %mm2,%mm7 psllw $3,%mm7 psrlw $2,%mm2 por %mm7,%mm2 movq %mm6,%mm4 psrlw $5,%mm4 pand %mm5,%mm4 movq %mm4,%mm7 psllw $3,%mm7 psrlw $2,%mm4 por %mm7,%mm4 psrlw $10,%mm6 pand %mm5,%mm6 movq %mm6,%mm7 psllw $3,%mm7 psrlw $2,%mm6 por %mm7,%mm6 psllw $4,%mm2 paddw %mm2,%mm1 pmulhw .L45,%mm2 psllw $5,%mm4 pmulhw .L46,%mm4 psllw $4,%mm6 paddw %mm6,%mm3 pmulhw .L47,%mm6 movq .L48,%mm5 paddw %mm4,%mm2 paddw %mm6,%mm2 pmulhw %mm5,%mm1 movq %mm0,%mm4 pmulhw %mm5,%mm3 movq .L52,%mm5 paddw %mm2,%mm4 psrlw $1,%mm4 psubw %mm4,%mm1 pmulhw .L51,%mm1 psubw %mm4,%mm3 pmulhw .L50,%mm3 packsswb %mm1,%mm3 paddw %mm5,%mm0 psrlw $4,%mm0 pxor .L53,%mm3 paddw %mm5,%mm2 psrlw $4,%mm2 packuswb %mm2,%mm0 movq %mm0,%mm2 punpcklbw %mm3,%mm0 punpckhbw %mm3,%mm2 movq %mm0,%mm3 punpcklwd %mm2,%mm0 punpckhwd %mm2,%mm3 movq %mm0,(%edi) movq %mm3,8(%edi) addl $16,%edi subl $8,%ecx jne .L65 addl %eax,%esi addl %ebx,%edi decl %edx jne .L66 emms popl %ebx popl %esi popl %edi ret .text .align 16 .globl mmx_bgr5551_yuyv mmx_bgr5551_yuyv: pushl %edi pushl %esi pushl %ebx movl 0+12+12(%esp),%ecx movl 0+12+24(%esp),%eax addl %ecx,%ecx movl 0+12+20(%esp),%ebx subl %ecx,%eax movl 0+12+12(%esp),%ecx addl %ecx,%ecx movl 0+12+16(%esp),%edx subl %ecx,%ebx movl 0+12+8(%esp),%esi movl 0+12+4(%esp),%edi .align 16 .L68: movl 0+12+12(%esp),%ecx .L67: movq (%esi),%mm4 movq 8(%esi),%mm6 addl $16,%esi movq %mm4,%mm0 punpcklwd %mm6,%mm4 punpckhwd %mm6,%mm0 movq %mm4,%mm6 punpcklwd %mm0,%mm4 punpckhwd %mm0,%mm6 movq .L62,%mm5 movq %mm4,%mm0 pand %mm5,%mm0 movq %mm0,%mm7 psllw $3,%mm7 psrlw $2,%mm0 por %mm7,%mm0 movq %mm4,%mm2 psrlw $5,%mm2 pand %mm5,%mm2 movq %mm2,%mm7 psllw $3,%mm7 psrlw $2,%mm2 por %mm7,%mm2 psrlw $10,%mm4 pand %mm5,%mm4 movq %mm4,%mm7 psllw $3,%mm7 psrlw $2,%mm4 por %mm7,%mm4 psllw $4,%mm4 movq %mm4,%mm1 pmulhw .L45,%mm4 psllw $5,%mm2 pmulhw .L46,%mm2 psllw $4,%mm0 movq %mm0,%mm3 pmulhw .L47,%mm0 paddw %mm2,%mm4 paddw %mm0,%mm4 movq %mm6,%mm0 pand %mm5,%mm0 movq %mm0,%mm7 psllw $3,%mm7 psrlw $2,%mm0 por %mm7,%mm0 movq %mm6,%mm2 psrlw $5,%mm2 pand %mm5,%mm2 movq %mm2,%mm7 psllw $3,%mm7 psrlw $2,%mm2 por %mm7,%mm2 psrlw $10,%mm6 pand %mm5,%mm6 movq %mm6,%mm7 psllw $3,%mm7 psrlw $2,%mm6 por %mm7,%mm6 psllw $4,%mm6 paddw %mm6,%mm1 pmulhw .L45,%mm6 psllw $5,%mm2 pmulhw .L46,%mm2 psllw $4,%mm0 paddw %mm0,%mm3 pmulhw .L47,%mm0 movq .L48,%mm5 paddw %mm2,%mm6 paddw %mm0,%mm6 pmulhw %mm5,%mm1 movq %mm4,%mm0 pmulhw %mm5,%mm3 movq .L52,%mm2 paddw %mm6,%mm0 psrlw $1,%mm0 psubw %mm0,%mm1 pmulhw .L51,%mm1 psubw %mm0,%mm3 pmulhw .L50,%mm3 packsswb %mm1,%mm3 paddw %mm2,%mm4 psrlw $4,%mm4 pxor .L53,%mm3 paddw %mm2,%mm6 psrlw $4,%mm6 packuswb %mm6,%mm4 movq %mm4,%mm6 punpcklbw %mm3,%mm4 punpckhbw %mm3,%mm6 movq %mm4,%mm3 punpcklwd %mm6,%mm4 punpckhwd %mm6,%mm3 movq %mm4,(%edi) movq %mm3,8(%edi) addl $16,%edi subl $8,%ecx jne .L67 addl %eax,%esi addl %ebx,%edi decl %edx jne .L68 emms popl %ebx popl %esi popl %edi ret .text .align 16 .globl mmx_rgb32_yuv420 mmx_rgb32_yuv420: pushl %ebx pushl %ebp pushl %esi pushl %edi movl %esp,%ecx leal -32(%esp),%esp andl $-8,%esp t77 = 0 t71 = 8 t72 = 12 t73 = 16 t74 = 20 t75 = 24 t76 = 28 movl 0+16+20(%ecx),%ebx movl %ebx,t74(%esp) shrl $1,%ebx movl 0+16+32(%ecx),%eax subl %ebx,%eax movl %eax,t73(%esp) movl 0+16+28(%ecx),%eax addl %ebx,%ebx movl 0+16+4(%ecx),%edi movl %eax,%edx movl 0+16+36(%ecx),%esi subl %ebx,%eax movl %eax,t72(%esp) shll $2,%ebx movl %esi,%ebp movl 0+16+24(%ecx),%eax subl %ebx,%esi movl 0+16+12(%ecx),%ebx movl %esi,t71(%esp) movl 0+16+16(%ecx),%esi movl %eax,t75(%esp) movl 0+16+8(%ecx),%eax movl %ecx,t76(%esp) .align 16 .L70: movl t74(%esp),%ecx .L69: movq (%esi),%mm0 movq 8(%esi),%mm5 movq 16(%esi),%mm2 movq 24(%esi),%mm4 movq %mm0,%mm6 punpcklbw %mm5,%mm0 punpckhbw %mm5,%mm6 movq %mm2,%mm7 punpcklbw %mm4,%mm2 punpckhbw %mm4,%mm7 pxor %mm5,%mm5 movq %mm0,%mm4 punpcklwd %mm2,%mm0 punpckhwd %mm2,%mm4 punpcklbw %mm5,%mm4 movq %mm0,%mm2 punpcklbw %mm5,%mm0 punpckhbw %mm5,%mm2 psllw $4,%mm0 movq %mm0,%mm1 pmulhw .L45,%mm0 psllw $5,%mm2 pmulhw .L46,%mm2 psllw $4,%mm4 movq %mm4,%mm3 pmulhw .L47,%mm4 paddw %mm2,%mm0 paddw %mm4,%mm0 movq %mm6,%mm4 punpcklwd %mm7,%mm6 punpckhwd %mm7,%mm4 punpcklbw %mm5,%mm4 movq %mm6,%mm2 punpcklbw %mm5,%mm6 punpckhbw %mm5,%mm2 psllw $4,%mm6 paddw %mm6,%mm1 pmulhw .L45,%mm6 psllw $5,%mm2 pmulhw .L46,%mm2 psllw $4,%mm4 paddw %mm4,%mm3 pmulhw .L47,%mm4 paddw %mm2,%mm6 paddw %mm4,%mm6 movq .L52,%mm2 movq %mm0,%mm4 paddw %mm6,%mm4 movq %mm4,t77(%esp) paddw %mm2,%mm0 psrlw $4,%mm0 packuswb %mm0,%mm0 paddw %mm2,%mm6 psrlw $4,%mm6 packuswb %mm6,%mm6 punpcklbw %mm6,%mm0 movq %mm0,(%edi) movq (%esi,%ebp),%mm0 movq 8(%esi,%ebp),%mm5 movq 16(%esi,%ebp),%mm2 movq 24(%esi,%ebp),%mm4 addl $32,%esi movq %mm0,%mm6 punpcklbw %mm5,%mm0 punpckhbw %mm5,%mm6 movq %mm2,%mm7 punpcklbw %mm4,%mm2 punpckhbw %mm4,%mm7 pxor %mm5,%mm5 movq %mm0,%mm4 punpcklwd %mm2,%mm0 punpckhwd %mm2,%mm4 punpcklbw %mm5,%mm4 movq %mm0,%mm2 punpcklbw %mm5,%mm0 punpckhbw %mm5,%mm2 psllw $4,%mm0 paddw %mm0,%mm1 pmulhw .L45,%mm0 psllw $5,%mm2 pmulhw .L46,%mm2 psllw $4,%mm4 paddw %mm4,%mm3 pmulhw .L47,%mm4 paddw %mm2,%mm0 paddw %mm4,%mm0 movq %mm6,%mm4 punpcklwd %mm7,%mm6 punpckhwd %mm7,%mm4 punpcklbw %mm5,%mm4 movq %mm6,%mm2 punpcklbw %mm5,%mm6 punpckhbw %mm5,%mm2 psllw $4,%mm6 paddw %mm6,%mm1 pmulhw .L45,%mm6 psllw $5,%mm2 pmulhw .L46,%mm2 psllw $4,%mm4 paddw %mm4,%mm3 pmulhw .L47,%mm4 paddw %mm2,%mm6 paddw %mm4,%mm6 movq .L52,%mm2 movq %mm0,%mm4 paddw %mm6,%mm4 paddw t77(%esp),%mm4 paddw %mm2,%mm0 psrlw $4,%mm0 packuswb %mm0,%mm0 paddw %mm2,%mm6 psrlw $4,%mm6 packuswb %mm6,%mm6 movq .L49,%mm5 punpcklbw %mm6,%mm0 psrlw $2,%mm4 movq %mm0,(%edi,%edx) pmulhw %mm5,%mm1 pmulhw %mm5,%mm3 psubw %mm4,%mm1 pmulhw .L51,%mm1 psubw %mm4,%mm3 pmulhw .L50,%mm3 packsswb %mm1,%mm3 pxor .L53,%mm3 movd %mm3,(%eax) psrlq $32,%mm3 movd %mm3,(%ebx) addl $8,%edi addl $4,%eax addl $4,%ebx subl $8,%ecx jne .L69 addl t71(%esp),%esi addl %ebp,%esi movl t73(%esp),%ecx addl %ecx,%eax addl t72(%esp),%edi addl %edx,%edi addl %ecx,%ebx subl $2,t75(%esp) jne .L70 movl t76(%esp),%esp emms popl %edi popl %esi popl %ebp popl %ebx ret .text .align 16 .globl mmx_bgr32_yuv420 mmx_bgr32_yuv420: pushl %ebx pushl %ebp pushl %esi pushl %edi movl %esp,%ecx leal -32(%esp),%esp andl $-8,%esp t84 = 0 t78 = 8 t79 = 12 t80 = 16 t81 = 20 t82 = 24 t83 = 28 movl 0+16+20(%ecx),%ebx movl %ebx,t81(%esp) shrl $1,%ebx movl 0+16+32(%ecx),%eax subl %ebx,%eax movl %eax,t80(%esp) movl 0+16+28(%ecx),%eax addl %ebx,%ebx movl 0+16+4(%ecx),%edi movl %eax,%edx movl 0+16+36(%ecx),%esi subl %ebx,%eax movl %eax,t79(%esp) shll $2,%ebx movl %esi,%ebp movl 0+16+24(%ecx),%eax subl %ebx,%esi movl 0+16+12(%ecx),%ebx movl %esi,t78(%esp) movl 0+16+16(%ecx),%esi movl %eax,t82(%esp) movl 0+16+8(%ecx),%eax movl %ecx,t83(%esp) .align 16 .L72: movl t81(%esp),%ecx .L71: movq (%esi),%mm0 movq 8(%esi),%mm5 movq 16(%esi),%mm2 movq 24(%esi),%mm4 movq %mm0,%mm6 punpcklbw %mm5,%mm0 punpckhbw %mm5,%mm6 movq %mm2,%mm7 punpcklbw %mm4,%mm2 punpckhbw %mm4,%mm7 pxor %mm5,%mm5 movq %mm0,%mm4 punpcklwd %mm2,%mm0 punpckhwd %mm2,%mm4 punpcklbw %mm5,%mm4 movq %mm0,%mm2 punpcklbw %mm5,%mm0 punpckhbw %mm5,%mm2 psllw $4,%mm4 movq %mm4,%mm1 pmulhw .L45,%mm4 psllw $5,%mm2 pmulhw .L46,%mm2 psllw $4,%mm0 movq %mm0,%mm3 pmulhw .L47,%mm0 paddw %mm2,%mm4 paddw %mm0,%mm4 movq %mm6,%mm2 punpcklwd %mm7,%mm6 punpckhwd %mm7,%mm2 punpcklbw %mm5,%mm2 movq %mm6,%mm0 punpcklbw %mm5,%mm6 punpckhbw %mm5,%mm0 psllw $4,%mm2 paddw %mm2,%mm1 pmulhw .L45,%mm2 psllw $5,%mm0 pmulhw .L46,%mm0 psllw $4,%mm6 paddw %mm6,%mm3 pmulhw .L47,%mm6 paddw %mm0,%mm2 paddw %mm6,%mm2 movq .L52,%mm0 movq %mm4,%mm5 paddw %mm2,%mm5 movq %mm5,t84(%esp) paddw %mm0,%mm4 psrlw $4,%mm4 packuswb %mm4,%mm4 paddw %mm0,%mm2 psrlw $4,%mm2 packuswb %mm2,%mm2 punpcklbw %mm2,%mm4 movq %mm4,(%edi) movq (%esi,%ebp),%mm0 movq 8(%esi,%ebp),%mm5 movq 16(%esi,%ebp),%mm2 movq 24(%esi,%ebp),%mm4 addl $32,%esi movq %mm0,%mm6 punpcklbw %mm5,%mm0 punpckhbw %mm5,%mm6 movq %mm2,%mm7 punpcklbw %mm4,%mm2 punpckhbw %mm4,%mm7 pxor %mm5,%mm5 movq %mm0,%mm4 punpcklwd %mm2,%mm0 punpckhwd %mm2,%mm4 punpcklbw %mm5,%mm4 movq %mm0,%mm2 punpcklbw %mm5,%mm0 punpckhbw %mm5,%mm2 psllw $4,%mm4 paddw %mm4,%mm1 pmulhw .L45,%mm4 psllw $5,%mm2 pmulhw .L46,%mm2 psllw $4,%mm0 paddw %mm0,%mm3 pmulhw .L47,%mm0 paddw %mm2,%mm4 paddw %mm0,%mm4 movq %mm6,%mm2 punpcklwd %mm7,%mm6 punpckhwd %mm7,%mm2 punpcklbw %mm5,%mm2 movq %mm6,%mm0 punpcklbw %mm5,%mm6 punpckhbw %mm5,%mm0 psllw $4,%mm2 paddw %mm2,%mm1 pmulhw .L45,%mm2 psllw $5,%mm0 pmulhw .L46,%mm0 psllw $4,%mm6 paddw %mm6,%mm3 pmulhw .L47,%mm6 paddw %mm0,%mm2 paddw %mm6,%mm2 movq .L52,%mm0 movq %mm4,%mm5 paddw %mm2,%mm5 paddw t84(%esp),%mm5 paddw %mm0,%mm4 psrlw $4,%mm4 packuswb %mm4,%mm4 paddw %mm0,%mm2 psrlw $4,%mm2 packuswb %mm2,%mm2 movq .L49,%mm6 punpcklbw %mm2,%mm4 psrlw $2,%mm5 movq %mm4,(%edi,%edx) pmulhw %mm6,%mm1 pmulhw %mm6,%mm3 psubw %mm5,%mm1 pmulhw .L51,%mm1 psubw %mm5,%mm3 pmulhw .L50,%mm3 packsswb %mm1,%mm3 pxor .L53,%mm3 movd %mm3,(%eax) psrlq $32,%mm3 movd %mm3,(%ebx) addl $8,%edi addl $4,%eax addl $4,%ebx subl $8,%ecx jne .L71 addl t78(%esp),%esi addl %ebp,%esi movl t80(%esp),%ecx addl %ecx,%eax addl t79(%esp),%edi addl %edx,%edi addl %ecx,%ebx subl $2,t82(%esp) jne .L72 movl t83(%esp),%esp emms popl %edi popl %esi popl %ebp popl %ebx ret .text .align 16 .globl mmx_rgb24_yuv420 mmx_rgb24_yuv420: pushl %ebx pushl %ebp pushl %esi pushl %edi movl %esp,%ecx leal -32(%esp),%esp andl $-8,%esp t91 = 0 t85 = 8 t86 = 12 t87 = 16 t88 = 20 t89 = 24 t90 = 28 movl 0+16+20(%ecx),%ebx movl %ebx,t88(%esp) shrl $1,%ebx movl 0+16+32(%ecx),%eax subl %ebx,%eax movl %eax,t87(%esp) movl 0+16+28(%ecx),%eax addl %ebx,%ebx movl 0+16+4(%ecx),%edi movl %eax,%edx movl 0+16+36(%ecx),%esi subl %ebx,%eax movl %eax,t86(%esp) leal (%ebx,%ebx,2),%ebx movl %esi,%ebp movl 0+16+24(%ecx),%eax subl %ebx,%esi movl 0+16+12(%ecx),%ebx movl %esi,t85(%esp) movl 0+16+16(%ecx),%esi movl %eax,t89(%esp) movl 0+16+8(%ecx),%eax movl %ecx,t90(%esp) .align 16 .L74: movl t88(%esp),%ecx .L73: movq (%esi),%mm4 movq 8(%esi),%mm0 movq 16(%esi),%mm2 movq %mm4,%mm6 psllq $32,%mm4 punpckhbw %mm0,%mm4 psrlq $32,%mm6 punpcklbw %mm2,%mm6 psllq $32,%mm0 punpckhbw %mm2,%mm0 movq %mm4,%mm2 psllq $32,%mm2 punpckhbw %mm6,%mm2 psllq $32,%mm6 punpckhbw %mm0,%mm6 psllq $32,%mm0 punpckhbw %mm0,%mm4 pxor %mm5,%mm5 movq %mm2,%mm0 punpcklbw %mm5,%mm0 punpckhbw %mm5,%mm2 movq %mm4,%mm7 punpcklbw %mm5,%mm4 psllw $4,%mm0 movq %mm0,%mm1 pmulhw .L45,%mm0 psllw $5,%mm2 pmulhw .L46,%mm2 psllw $4,%mm4 movq %mm4,%mm3 pmulhw .L47,%mm4 paddw %mm2,%mm0 paddw %mm4,%mm0 movq %mm6,%mm2 punpcklbw %mm5,%mm6 punpckhbw %mm5,%mm2 punpckhbw %mm5,%mm7 psllw $4,%mm7 paddw %mm7,%mm1 pmulhw .L45,%mm7 psllw $5,%mm6 pmulhw .L46,%mm6 psllw $4,%mm2 paddw %mm2,%mm3 pmulhw .L47,%mm2 paddw %mm6,%mm7 paddw %mm2,%mm7 movq .L52,%mm2 movq %mm0,%mm4 paddw %mm7,%mm4 movq %mm4,t91(%esp) paddw %mm2,%mm0 psrlw $4,%mm0 packuswb %mm0,%mm0 paddw %mm2,%mm7 psrlw $4,%mm7 packuswb %mm7,%mm7 punpcklbw %mm7,%mm0 movq %mm0,(%edi) movq (%esi,%ebp),%mm4 movq 8(%esi,%ebp),%mm0 movq 16(%esi,%ebp),%mm2 addl $24,%esi movq %mm4,%mm6 psllq $32,%mm4 punpckhbw %mm0,%mm4 psrlq $32,%mm6 punpcklbw %mm2,%mm6 psllq $32,%mm0 punpckhbw %mm2,%mm0 movq %mm4,%mm2 psllq $32,%mm2 punpckhbw %mm6,%mm2 psllq $32,%mm6 punpckhbw %mm0,%mm6 psllq $32,%mm0 punpckhbw %mm0,%mm4 pxor %mm5,%mm5 movq %mm2,%mm0 punpcklbw %mm5,%mm0 punpckhbw %mm5,%mm2 movq %mm4,%mm7 punpcklbw %mm5,%mm4 psllw $4,%mm0 paddw %mm0,%mm1 pmulhw .L45,%mm0 psllw $5,%mm2 pmulhw .L46,%mm2 psllw $4,%mm4 paddw %mm4,%mm3 pmulhw .L47,%mm4 paddw %mm2,%mm0 paddw %mm4,%mm0 movq %mm6,%mm2 punpcklbw %mm5,%mm6 punpckhbw %mm5,%mm2 punpckhbw %mm5,%mm7 psllw $4,%mm7 paddw %mm7,%mm1 pmulhw .L45,%mm7 psllw $5,%mm6 pmulhw .L46,%mm6 psllw $4,%mm2 paddw %mm2,%mm3 pmulhw .L47,%mm2 paddw %mm6,%mm7 paddw %mm2,%mm7 movq .L52,%mm2 movq %mm0,%mm4 paddw %mm7,%mm4 paddw t91(%esp),%mm4 paddw %mm2,%mm0 psrlw $4,%mm0 packuswb %mm0,%mm0 paddw %mm2,%mm7 psrlw $4,%mm7 packuswb %mm7,%mm7 movq .L49,%mm5 punpcklbw %mm7,%mm0 psrlw $2,%mm4 movq %mm0,(%edi,%edx) pmulhw %mm5,%mm1 pmulhw %mm5,%mm3 psubw %mm4,%mm1 pmulhw .L51,%mm1 psubw %mm4,%mm3 pmulhw .L50,%mm3 packsswb %mm1,%mm3 pxor .L53,%mm3 movd %mm3,(%eax) psrlq $32,%mm3 movd %mm3,(%ebx) addl $8,%edi addl $4,%eax addl $4,%ebx subl $8,%ecx jne .L73 addl t85(%esp),%esi addl %ebp,%esi movl t87(%esp),%ecx addl %ecx,%eax addl t86(%esp),%edi addl %edx,%edi addl %ecx,%ebx subl $2,t89(%esp) jne .L74 movl t90(%esp),%esp emms popl %edi popl %esi popl %ebp popl %ebx ret .text .align 16 .globl mmx_bgr24_yuv420 mmx_bgr24_yuv420: pushl %ebx pushl %ebp pushl %esi pushl %edi movl %esp,%ecx leal -32(%esp),%esp andl $-8,%esp t98 = 0 t92 = 8 t93 = 12 t94 = 16 t95 = 20 t96 = 24 t97 = 28 movl 0+16+20(%ecx),%ebx movl %ebx,t95(%esp) shrl $1,%ebx movl 0+16+32(%ecx),%eax subl %ebx,%eax movl %eax,t94(%esp) movl 0+16+28(%ecx),%eax addl %ebx,%ebx movl 0+16+4(%ecx),%edi movl %eax,%edx movl 0+16+36(%ecx),%esi subl %ebx,%eax movl %eax,t93(%esp) leal (%ebx,%ebx,2),%ebx movl %esi,%ebp movl 0+16+24(%ecx),%eax subl %ebx,%esi movl 0+16+12(%ecx),%ebx movl %esi,t92(%esp) movl 0+16+16(%ecx),%esi movl %eax,t96(%esp) movl 0+16+8(%ecx),%eax movl %ecx,t97(%esp) .align 16 .L76: movl t95(%esp),%ecx .L75: movq (%esi),%mm4 movq 8(%esi),%mm0 movq 16(%esi),%mm2 movq %mm4,%mm6 psllq $32,%mm4 punpckhbw %mm0,%mm4 psrlq $32,%mm6 punpcklbw %mm2,%mm6 psllq $32,%mm0 punpckhbw %mm2,%mm0 movq %mm4,%mm2 psllq $32,%mm2 punpckhbw %mm6,%mm2 psllq $32,%mm6 punpckhbw %mm0,%mm6 psllq $32,%mm0 punpckhbw %mm0,%mm4 pxor %mm5,%mm5 movq %mm2,%mm0 punpcklbw %mm5,%mm0 punpckhbw %mm5,%mm2 movq %mm4,%mm7 punpcklbw %mm5,%mm4 psllw $4,%mm4 movq %mm4,%mm1 pmulhw .L45,%mm4 psllw $5,%mm2 pmulhw .L46,%mm2 psllw $4,%mm0 movq %mm0,%mm3 pmulhw .L47,%mm0 paddw %mm2,%mm4 paddw %mm0,%mm4 movq %mm6,%mm0 punpcklbw %mm5,%mm6 punpckhbw %mm5,%mm0 punpckhbw %mm5,%mm7 psllw $4,%mm0 paddw %mm0,%mm1 pmulhw .L45,%mm0 psllw $5,%mm6 pmulhw .L46,%mm6 psllw $4,%mm7 paddw %mm7,%mm3 pmulhw .L47,%mm7 paddw %mm6,%mm0 paddw %mm7,%mm0 movq .L52,%mm2 movq %mm4,%mm5 paddw %mm0,%mm5 movq %mm5,t98(%esp) paddw %mm2,%mm4 psrlw $4,%mm4 packuswb %mm4,%mm4 paddw %mm2,%mm0 psrlw $4,%mm0 packuswb %mm0,%mm0 punpcklbw %mm0,%mm4 movq %mm4,(%edi) movq (%esi,%ebp),%mm4 movq 8(%esi,%ebp),%mm0 movq 16(%esi,%ebp),%mm2 addl $24,%esi movq %mm4,%mm6 psllq $32,%mm4 punpckhbw %mm0,%mm4 psrlq $32,%mm6 punpcklbw %mm2,%mm6 psllq $32,%mm0 punpckhbw %mm2,%mm0 movq %mm4,%mm2 psllq $32,%mm2 punpckhbw %mm6,%mm2 psllq $32,%mm6 punpckhbw %mm0,%mm6 psllq $32,%mm0 punpckhbw %mm0,%mm4 pxor %mm5,%mm5 movq %mm2,%mm0 punpcklbw %mm5,%mm0 punpckhbw %mm5,%mm2 movq %mm4,%mm7 punpcklbw %mm5,%mm4 psllw $4,%mm4 paddw %mm4,%mm1 pmulhw .L45,%mm4 psllw $5,%mm2 pmulhw .L46,%mm2 psllw $4,%mm0 paddw %mm0,%mm3 pmulhw .L47,%mm0 paddw %mm2,%mm4 paddw %mm0,%mm4 movq %mm6,%mm0 punpcklbw %mm5,%mm6 punpckhbw %mm5,%mm0 punpckhbw %mm5,%mm7 psllw $4,%mm0 paddw %mm0,%mm1 pmulhw .L45,%mm0 psllw $5,%mm6 pmulhw .L46,%mm6 psllw $4,%mm7 paddw %mm7,%mm3 pmulhw .L47,%mm7 paddw %mm6,%mm0 paddw %mm7,%mm0 movq .L52,%mm2 movq %mm4,%mm5 paddw %mm0,%mm5 paddw t98(%esp),%mm5 paddw %mm2,%mm4 psrlw $4,%mm4 packuswb %mm4,%mm4 paddw %mm2,%mm0 psrlw $4,%mm0 packuswb %mm0,%mm0 movq .L49,%mm6 punpcklbw %mm0,%mm4 psrlw $2,%mm5 movq %mm4,(%edi,%edx) pmulhw %mm6,%mm1 pmulhw %mm6,%mm3 psubw %mm5,%mm1 pmulhw .L51,%mm1 psubw %mm5,%mm3 pmulhw .L50,%mm3 packsswb %mm1,%mm3 pxor .L53,%mm3 movd %mm3,(%eax) psrlq $32,%mm3 movd %mm3,(%ebx) addl $8,%edi addl $4,%eax addl $4,%ebx subl $8,%ecx jne .L75 addl t92(%esp),%esi addl %ebp,%esi movl t94(%esp),%ecx addl %ecx,%eax addl t93(%esp),%edi addl %edx,%edi addl %ecx,%ebx subl $2,t96(%esp) jne .L76 movl t97(%esp),%esp emms popl %edi popl %esi popl %ebp popl %ebx ret .text .align 16 .globl mmx_rgb565_yuv420 mmx_rgb565_yuv420: pushl %ebx pushl %ebp pushl %esi pushl %edi leal -24(%esp),%esp t99 = 0 t100 = 4 t101 = 8 t102 = 12 t103 = 16 t104 = 20 movl 24+16+20(%esp),%ebx movl %ebx,t102(%esp) shrl $1,%ebx movl 24+16+32(%esp),%eax subl %ebx,%eax movl %eax,t101(%esp) movl 24+16+28(%esp),%eax addl %ebx,%ebx movl 24+16+4(%esp),%edi movl %eax,%edx movl 24+16+36(%esp),%esi subl %ebx,%eax movl %eax,t100(%esp) addl %ebx,%ebx movl %esi,%ebp movl 24+16+24(%esp),%eax subl %ebx,%esi movl 24+16+12(%esp),%ebx movl %esi,t99(%esp) movl 24+16+16(%esp),%esi movl %eax,t103(%esp) movl 24+16+8(%esp),%eax .align 16 .L78: movl t102(%esp),%ecx .L77: movq (%esi),%mm2 movq 8(%esi),%mm6 movq %mm2,%mm0 punpcklwd %mm6,%mm2 punpckhwd %mm6,%mm0 movq %mm2,%mm6 punpcklwd %mm0,%mm2 punpckhwd %mm0,%mm6 movq .L62,%mm4 movq %mm2,%mm0 pand %mm4,%mm0 pxor %mm0,%mm2 movq %mm0,%mm5 psllw $3,%mm5 psrlw $2,%mm0 por %mm5,%mm0 psllw $11,%mm4 pand %mm2,%mm4 pxor %mm4,%mm2 movq %mm4,%mm5 psrlw $8,%mm5 psrlw $13,%mm4 por %mm5,%mm4 movq %mm2,%mm5 psrlw $3,%mm5 psrlw $9,%mm2 por %mm5,%mm2 psllw $4,%mm0 movq %mm0,%mm1 pmulhw .L45,%mm0 psllw $5,%mm2 pmulhw .L46,%mm2 psllw $4,%mm4 movq %mm4,%mm3 pmulhw .L47,%mm4 paddw %mm2,%mm0 paddw %mm4,%mm0 movq .L62,%mm4 movq %mm6,%mm2 pand %mm4,%mm2 pxor %mm2,%mm6 movq %mm2,%mm5 psllw $3,%mm5 psrlw $2,%mm2 por %mm5,%mm2 psllw $11,%mm4 pand %mm6,%mm4 pxor %mm4,%mm6 movq %mm4,%mm5 psrlw $8,%mm5 psrlw $13,%mm4 por %mm5,%mm4 movq %mm6,%mm5 psrlw $3,%mm5 psrlw $9,%mm6 por %mm5,%mm6 psllw $4,%mm2 paddw %mm2,%mm1 pmulhw .L45,%mm2 psllw $5,%mm6 pmulhw .L46,%mm6 psllw $4,%mm4 paddw %mm4,%mm3 pmulhw .L47,%mm4 paddw %mm6,%mm2 paddw %mm4,%mm2 movq .L52,%mm4 movq %mm0,%mm7 paddw %mm2,%mm7 paddw %mm4,%mm0 psrlw $4,%mm0 packuswb %mm0,%mm0 paddw %mm4,%mm2 psrlw $4,%mm2 packuswb %mm2,%mm2 punpcklbw %mm2,%mm0 movq %mm0,(%edi) movq (%esi,%ebp),%mm2 movq 8(%esi,%ebp),%mm6 addl $16,%esi movq %mm2,%mm0 punpcklwd %mm6,%mm2 punpckhwd %mm6,%mm0 movq %mm2,%mm6 punpcklwd %mm0,%mm2 punpckhwd %mm0,%mm6 movq .L62,%mm4 movq %mm2,%mm0 pand %mm4,%mm0 pxor %mm0,%mm2 movq %mm0,%mm5 psllw $3,%mm5 psrlw $2,%mm0 por %mm5,%mm0 psllw $11,%mm4 pand %mm2,%mm4 pxor %mm4,%mm2 movq %mm4,%mm5 psrlw $8,%mm5 psrlw $13,%mm4 por %mm5,%mm4 movq %mm2,%mm5 psrlw $3,%mm5 psrlw $9,%mm2 por %mm5,%mm2 psllw $4,%mm0 paddw %mm0,%mm1 pmulhw .L45,%mm0 psllw $5,%mm2 pmulhw .L46,%mm2 psllw $4,%mm4 paddw %mm4,%mm3 pmulhw .L47,%mm4 paddw %mm2,%mm0 paddw %mm4,%mm0 movq .L62,%mm4 movq %mm6,%mm2 pand %mm4,%mm2 pxor %mm2,%mm6 movq %mm2,%mm5 psllw $3,%mm5 psrlw $2,%mm2 por %mm5,%mm2 psllw $11,%mm4 pand %mm6,%mm4 pxor %mm4,%mm6 movq %mm4,%mm5 psrlw $8,%mm5 psrlw $13,%mm4 por %mm5,%mm4 movq %mm6,%mm5 psrlw $3,%mm5 psrlw $9,%mm6 por %mm5,%mm6 psllw $4,%mm2 paddw %mm2,%mm1 pmulhw .L45,%mm2 psllw $5,%mm6 pmulhw .L46,%mm6 psllw $4,%mm4 paddw %mm4,%mm3 pmulhw .L47,%mm4 paddw %mm6,%mm2 paddw %mm4,%mm2 movq .L52,%mm4 movq %mm0,%mm5 paddw %mm2,%mm5 paddw %mm7,%mm5 paddw %mm4,%mm0 psrlw $4,%mm0 packuswb %mm0,%mm0 paddw %mm4,%mm2 psrlw $4,%mm2 packuswb %mm2,%mm2 movq .L49,%mm6 punpcklbw %mm2,%mm0 psrlw $2,%mm5 movq %mm0,(%edi,%edx) pmulhw %mm6,%mm1 pmulhw %mm6,%mm3 psubw %mm5,%mm1 pmulhw .L51,%mm1 psubw %mm5,%mm3 pmulhw .L50,%mm3 packsswb %mm1,%mm3 pxor .L53,%mm3 movd %mm3,(%eax) psrlq $32,%mm3 movd %mm3,(%ebx) addl $8,%edi addl $4,%eax addl $4,%ebx subl $8,%ecx jne .L77 addl t99(%esp),%esi addl %ebp,%esi movl t101(%esp),%ecx addl %ecx,%eax addl t100(%esp),%edi addl %edx,%edi addl %ecx,%ebx subl $2,t103(%esp) jne .L78 leal 24(%esp),%esp emms popl %edi popl %esi popl %ebp popl %ebx ret .text .align 16 .globl mmx_bgr565_yuv420 mmx_bgr565_yuv420: pushl %ebx pushl %ebp pushl %esi pushl %edi leal -24(%esp),%esp t105 = 0 t106 = 4 t107 = 8 t108 = 12 t109 = 16 t110 = 20 movl 24+16+20(%esp),%ebx movl %ebx,t108(%esp) shrl $1,%ebx movl 24+16+32(%esp),%eax subl %ebx,%eax movl %eax,t107(%esp) movl 24+16+28(%esp),%eax addl %ebx,%ebx movl 24+16+4(%esp),%edi movl %eax,%edx movl 24+16+36(%esp),%esi subl %ebx,%eax movl %eax,t106(%esp) addl %ebx,%ebx movl %esi,%ebp movl 24+16+24(%esp),%eax subl %ebx,%esi movl 24+16+12(%esp),%ebx movl %esi,t105(%esp) movl 24+16+16(%esp),%esi movl %eax,t109(%esp) movl 24+16+8(%esp),%eax .align 16 .L80: movl t108(%esp),%ecx .L79: movq (%esi),%mm2 movq 8(%esi),%mm6 movq %mm2,%mm0 punpcklwd %mm6,%mm2 punpckhwd %mm6,%mm0 movq %mm2,%mm6 punpcklwd %mm0,%mm2 punpckhwd %mm0,%mm6 movq .L62,%mm4 movq %mm2,%mm0 pand %mm4,%mm0 pxor %mm0,%mm2 movq %mm0,%mm5 psllw $3,%mm5 psrlw $2,%mm0 por %mm5,%mm0 psllw $11,%mm4 pand %mm2,%mm4 pxor %mm4,%mm2 movq %mm4,%mm5 psrlw $8,%mm5 psrlw $13,%mm4 por %mm5,%mm4 movq %mm2,%mm5 psrlw $3,%mm5 psrlw $9,%mm2 por %mm5,%mm2 psllw $4,%mm4 movq %mm4,%mm1 pmulhw .L45,%mm4 psllw $5,%mm2 pmulhw .L46,%mm2 psllw $4,%mm0 movq %mm0,%mm3 pmulhw .L47,%mm0 paddw %mm2,%mm4 paddw %mm0,%mm4 movq .L62,%mm2 movq %mm6,%mm0 pand %mm2,%mm0 pxor %mm0,%mm6 movq %mm0,%mm5 psllw $3,%mm5 psrlw $2,%mm0 por %mm5,%mm0 psllw $11,%mm2 pand %mm6,%mm2 pxor %mm2,%mm6 movq %mm2,%mm5 psrlw $8,%mm5 psrlw $13,%mm2 por %mm5,%mm2 movq %mm6,%mm5 psrlw $3,%mm5 psrlw $9,%mm6 por %mm5,%mm6 psllw $4,%mm2 paddw %mm2,%mm1 pmulhw .L45,%mm2 psllw $5,%mm6 pmulhw .L46,%mm6 psllw $4,%mm0 paddw %mm0,%mm3 pmulhw .L47,%mm0 paddw %mm6,%mm2 paddw %mm0,%mm2 movq .L52,%mm0 movq %mm4,%mm7 paddw %mm2,%mm7 paddw %mm0,%mm4 psrlw $4,%mm4 packuswb %mm4,%mm4 paddw %mm0,%mm2 psrlw $4,%mm2 packuswb %mm2,%mm2 punpcklbw %mm2,%mm4 movq %mm4,(%edi) movq (%esi,%ebp),%mm2 movq 8(%esi,%ebp),%mm6 addl $16,%esi movq %mm2,%mm0 punpcklwd %mm6,%mm2 punpckhwd %mm6,%mm0 movq %mm2,%mm6 punpcklwd %mm0,%mm2 punpckhwd %mm0,%mm6 movq .L62,%mm4 movq %mm2,%mm0 pand %mm4,%mm0 pxor %mm0,%mm2 movq %mm0,%mm5 psllw $3,%mm5 psrlw $2,%mm0 por %mm5,%mm0 psllw $11,%mm4 pand %mm2,%mm4 pxor %mm4,%mm2 movq %mm4,%mm5 psrlw $8,%mm5 psrlw $13,%mm4 por %mm5,%mm4 movq %mm2,%mm5 psrlw $3,%mm5 psrlw $9,%mm2 por %mm5,%mm2 psllw $4,%mm4 paddw %mm4,%mm1 pmulhw .L45,%mm4 psllw $5,%mm2 pmulhw .L46,%mm2 psllw $4,%mm0 paddw %mm0,%mm3 pmulhw .L47,%mm0 paddw %mm2,%mm4 paddw %mm0,%mm4 movq .L62,%mm2 movq %mm6,%mm0 pand %mm2,%mm0 pxor %mm0,%mm6 movq %mm0,%mm5 psllw $3,%mm5 psrlw $2,%mm0 por %mm5,%mm0 psllw $11,%mm2 pand %mm6,%mm2 pxor %mm2,%mm6 movq %mm2,%mm5 psrlw $8,%mm5 psrlw $13,%mm2 por %mm5,%mm2 movq %mm6,%mm5 psrlw $3,%mm5 psrlw $9,%mm6 por %mm5,%mm6 psllw $4,%mm2 paddw %mm2,%mm1 pmulhw .L45,%mm2 psllw $5,%mm6 pmulhw .L46,%mm6 psllw $4,%mm0 paddw %mm0,%mm3 pmulhw .L47,%mm0 paddw %mm6,%mm2 paddw %mm0,%mm2 movq .L52,%mm0 movq %mm4,%mm5 paddw %mm2,%mm5 paddw %mm7,%mm5 paddw %mm0,%mm4 psrlw $4,%mm4 packuswb %mm4,%mm4 paddw %mm0,%mm2 psrlw $4,%mm2 packuswb %mm2,%mm2 movq .L49,%mm6 punpcklbw %mm2,%mm4 psrlw $2,%mm5 movq %mm4,(%edi,%edx) pmulhw %mm6,%mm1 pmulhw %mm6,%mm3 psubw %mm5,%mm1 pmulhw .L51,%mm1 psubw %mm5,%mm3 pmulhw .L50,%mm3 packsswb %mm1,%mm3 pxor .L53,%mm3 movd %mm3,(%eax) psrlq $32,%mm3 movd %mm3,(%ebx) addl $8,%edi addl $4,%eax addl $4,%ebx subl $8,%ecx jne .L79 addl t105(%esp),%esi addl %ebp,%esi movl t107(%esp),%ecx addl %ecx,%eax addl t106(%esp),%edi addl %edx,%edi addl %ecx,%ebx subl $2,t109(%esp) jne .L80 leal 24(%esp),%esp emms popl %edi popl %esi popl %ebp popl %ebx ret .text .align 16 .globl mmx_rgb5551_yuv420 mmx_rgb5551_yuv420: pushl %ebx pushl %ebp pushl %esi pushl %edi movl %esp,%ecx leal -32(%esp),%esp andl $-8,%esp t117 = 0 t111 = 8 t112 = 12 t113 = 16 t114 = 20 t115 = 24 t116 = 28 movl 0+16+20(%ecx),%ebx movl %ebx,t114(%esp) shrl $1,%ebx movl 0+16+32(%ecx),%eax subl %ebx,%eax movl %eax,t113(%esp) movl 0+16+28(%ecx),%eax addl %ebx,%ebx movl 0+16+4(%ecx),%edi movl %eax,%edx movl 0+16+36(%ecx),%esi subl %ebx,%eax movl %eax,t112(%esp) addl %ebx,%ebx movl %esi,%ebp movl 0+16+24(%ecx),%eax subl %ebx,%esi movl 0+16+12(%ecx),%ebx movl %esi,t111(%esp) movl 0+16+16(%ecx),%esi movl %eax,t115(%esp) movl 0+16+8(%ecx),%eax movl %ecx,t116(%esp) .align 16 .L82: movl t114(%esp),%ecx .L81: movq (%esi),%mm4 movq 8(%esi),%mm6 movq %mm4,%mm0 punpcklwd %mm6,%mm4 punpckhwd %mm6,%mm0 movq %mm4,%mm6 punpcklwd %mm0,%mm4 punpckhwd %mm0,%mm6 movq .L62,%mm5 movq %mm4,%mm0 pand %mm5,%mm0 movq %mm0,%mm7 psllw $3,%mm7 psrlw $2,%mm0 por %mm7,%mm0 movq %mm4,%mm2 psrlw $5,%mm2 pand %mm5,%mm2 movq %mm2,%mm7 psllw $3,%mm7 psrlw $2,%mm2 por %mm7,%mm2 psrlw $10,%mm4 pand %mm5,%mm4 movq %mm4,%mm7 psllw $3,%mm7 psrlw $2,%mm4 por %mm7,%mm4 psllw $4,%mm0 movq %mm0,%mm1 pmulhw .L45,%mm0 psllw $5,%mm2 pmulhw .L46,%mm2 psllw $4,%mm4 movq %mm4,%mm3 pmulhw .L47,%mm4 paddw %mm2,%mm0 paddw %mm4,%mm0 movq %mm6,%mm2 pand %mm5,%mm2 movq %mm2,%mm7 psllw $3,%mm7 psrlw $2,%mm2 por %mm7,%mm2 movq %mm6,%mm4 psrlw $5,%mm4 pand %mm5,%mm4 movq %mm4,%mm7 psllw $3,%mm7 psrlw $2,%mm4 por %mm7,%mm4 psrlw $10,%mm6 pand %mm5,%mm6 movq %mm6,%mm7 psllw $3,%mm7 psrlw $2,%mm6 por %mm7,%mm6 psllw $4,%mm2 paddw %mm2,%mm1 pmulhw .L45,%mm2 psllw $5,%mm4 pmulhw .L46,%mm4 psllw $4,%mm6 paddw %mm6,%mm3 pmulhw .L47,%mm6 paddw %mm4,%mm2 paddw %mm6,%mm2 movq .L52,%mm4 movq %mm0,%mm5 paddw %mm2,%mm5 movq %mm5,t117(%esp) paddw %mm4,%mm0 psrlw $4,%mm0 packuswb %mm0,%mm0 paddw %mm4,%mm2 psrlw $4,%mm2 packuswb %mm2,%mm2 punpcklbw %mm2,%mm0 movq %mm0,(%edi) movq (%esi,%ebp),%mm4 movq 8(%esi,%ebp),%mm6 addl $16,%esi movq %mm4,%mm0 punpcklwd %mm6,%mm4 punpckhwd %mm6,%mm0 movq %mm4,%mm6 punpcklwd %mm0,%mm4 punpckhwd %mm0,%mm6 movq .L62,%mm5 movq %mm4,%mm0 pand %mm5,%mm0 movq %mm0,%mm7 psllw $3,%mm7 psrlw $2,%mm0 por %mm7,%mm0 movq %mm4,%mm2 psrlw $5,%mm2 pand %mm5,%mm2 movq %mm2,%mm7 psllw $3,%mm7 psrlw $2,%mm2 por %mm7,%mm2 psrlw $10,%mm4 pand %mm5,%mm4 movq %mm4,%mm7 psllw $3,%mm7 psrlw $2,%mm4 por %mm7,%mm4 psllw $4,%mm0 paddw %mm0,%mm1 pmulhw .L45,%mm0 psllw $5,%mm2 pmulhw .L46,%mm2 psllw $4,%mm4 paddw %mm4,%mm3 pmulhw .L47,%mm4 paddw %mm2,%mm0 paddw %mm4,%mm0 movq %mm6,%mm2 pand %mm5,%mm2 movq %mm2,%mm7 psllw $3,%mm7 psrlw $2,%mm2 por %mm7,%mm2 movq %mm6,%mm4 psrlw $5,%mm4 pand %mm5,%mm4 movq %mm4,%mm7 psllw $3,%mm7 psrlw $2,%mm4 por %mm7,%mm4 psrlw $10,%mm6 pand %mm5,%mm6 movq %mm6,%mm7 psllw $3,%mm7 psrlw $2,%mm6 por %mm7,%mm6 psllw $4,%mm2 paddw %mm2,%mm1 pmulhw .L45,%mm2 psllw $5,%mm4 pmulhw .L46,%mm4 psllw $4,%mm6 paddw %mm6,%mm3 pmulhw .L47,%mm6 paddw %mm4,%mm2 paddw %mm6,%mm2 movq .L52,%mm4 movq %mm0,%mm5 paddw %mm2,%mm5 paddw t117(%esp),%mm5 paddw %mm4,%mm0 psrlw $4,%mm0 packuswb %mm0,%mm0 paddw %mm4,%mm2 psrlw $4,%mm2 packuswb %mm2,%mm2 movq .L49,%mm6 punpcklbw %mm2,%mm0 psrlw $2,%mm5 movq %mm0,(%edi,%edx) pmulhw %mm6,%mm1 pmulhw %mm6,%mm3 psubw %mm5,%mm1 pmulhw .L51,%mm1 psubw %mm5,%mm3 pmulhw .L50,%mm3 packsswb %mm1,%mm3 pxor .L53,%mm3 movd %mm3,(%eax) psrlq $32,%mm3 movd %mm3,(%ebx) addl $8,%edi addl $4,%eax addl $4,%ebx subl $8,%ecx jne .L81 addl t111(%esp),%esi addl %ebp,%esi movl t113(%esp),%ecx addl %ecx,%eax addl t112(%esp),%edi addl %edx,%edi addl %ecx,%ebx subl $2,t115(%esp) jne .L82 movl t116(%esp),%esp emms popl %edi popl %esi popl %ebp popl %ebx ret .text .align 16 .globl mmx_bgr5551_yuv420 mmx_bgr5551_yuv420: pushl %ebx pushl %ebp pushl %esi pushl %edi movl %esp,%ecx leal -32(%esp),%esp andl $-8,%esp t124 = 0 t118 = 8 t119 = 12 t120 = 16 t121 = 20 t122 = 24 t123 = 28 movl 0+16+20(%ecx),%ebx movl %ebx,t121(%esp) shrl $1,%ebx movl 0+16+32(%ecx),%eax subl %ebx,%eax movl %eax,t120(%esp) movl 0+16+28(%ecx),%eax addl %ebx,%ebx movl 0+16+4(%ecx),%edi movl %eax,%edx movl 0+16+36(%ecx),%esi subl %ebx,%eax movl %eax,t119(%esp) addl %ebx,%ebx movl %esi,%ebp movl 0+16+24(%ecx),%eax subl %ebx,%esi movl 0+16+12(%ecx),%ebx movl %esi,t118(%esp) movl 0+16+16(%ecx),%esi movl %eax,t122(%esp) movl 0+16+8(%ecx),%eax movl %ecx,t123(%esp) .align 16 .L84: movl t121(%esp),%ecx .L83: movq (%esi),%mm4 movq 8(%esi),%mm6 movq %mm4,%mm0 punpcklwd %mm6,%mm4 punpckhwd %mm6,%mm0 movq %mm4,%mm6 punpcklwd %mm0,%mm4 punpckhwd %mm0,%mm6 movq .L62,%mm5 movq %mm4,%mm0 pand %mm5,%mm0 movq %mm0,%mm7 psllw $3,%mm7 psrlw $2,%mm0 por %mm7,%mm0 movq %mm4,%mm2 psrlw $5,%mm2 pand %mm5,%mm2 movq %mm2,%mm7 psllw $3,%mm7 psrlw $2,%mm2 por %mm7,%mm2 psrlw $10,%mm4 pand %mm5,%mm4 movq %mm4,%mm7 psllw $3,%mm7 psrlw $2,%mm4 por %mm7,%mm4 psllw $4,%mm4 movq %mm4,%mm1 pmulhw .L45,%mm4 psllw $5,%mm2 pmulhw .L46,%mm2 psllw $4,%mm0 movq %mm0,%mm3 pmulhw .L47,%mm0 paddw %mm2,%mm4 paddw %mm0,%mm4 movq %mm6,%mm0 pand %mm5,%mm0 movq %mm0,%mm7 psllw $3,%mm7 psrlw $2,%mm0 por %mm7,%mm0 movq %mm6,%mm2 psrlw $5,%mm2 pand %mm5,%mm2 movq %mm2,%mm7 psllw $3,%mm7 psrlw $2,%mm2 por %mm7,%mm2 psrlw $10,%mm6 pand %mm5,%mm6 movq %mm6,%mm7 psllw $3,%mm7 psrlw $2,%mm6 por %mm7,%mm6 psllw $4,%mm6 paddw %mm6,%mm1 pmulhw .L45,%mm6 psllw $5,%mm2 pmulhw .L46,%mm2 psllw $4,%mm0 paddw %mm0,%mm3 pmulhw .L47,%mm0 paddw %mm2,%mm6 paddw %mm0,%mm6 movq .L52,%mm0 movq %mm4,%mm2 paddw %mm6,%mm2 movq %mm2,t124(%esp) paddw %mm0,%mm4 psrlw $4,%mm4 packuswb %mm4,%mm4 paddw %mm0,%mm6 psrlw $4,%mm6 packuswb %mm6,%mm6 punpcklbw %mm6,%mm4 movq %mm4,(%edi) movq (%esi,%ebp),%mm4 movq 8(%esi,%ebp),%mm6 addl $16,%esi movq %mm4,%mm0 punpcklwd %mm6,%mm4 punpckhwd %mm6,%mm0 movq %mm4,%mm6 punpcklwd %mm0,%mm4 punpckhwd %mm0,%mm6 movq .L62,%mm5 movq %mm4,%mm0 pand %mm5,%mm0 movq %mm0,%mm7 psllw $3,%mm7 psrlw $2,%mm0 por %mm7,%mm0 movq %mm4,%mm2 psrlw $5,%mm2 pand %mm5,%mm2 movq %mm2,%mm7 psllw $3,%mm7 psrlw $2,%mm2 por %mm7,%mm2 psrlw $10,%mm4 pand %mm5,%mm4 movq %mm4,%mm7 psllw $3,%mm7 psrlw $2,%mm4 por %mm7,%mm4 psllw $4,%mm4 paddw %mm4,%mm1 pmulhw .L45,%mm4 psllw $5,%mm2 pmulhw .L46,%mm2 psllw $4,%mm0 paddw %mm0,%mm3 pmulhw .L47,%mm0 paddw %mm2,%mm4 paddw %mm0,%mm4 movq %mm6,%mm0 pand %mm5,%mm0 movq %mm0,%mm7 psllw $3,%mm7 psrlw $2,%mm0 por %mm7,%mm0 movq %mm6,%mm2 psrlw $5,%mm2 pand %mm5,%mm2 movq %mm2,%mm7 psllw $3,%mm7 psrlw $2,%mm2 por %mm7,%mm2 psrlw $10,%mm6 pand %mm5,%mm6 movq %mm6,%mm7 psllw $3,%mm7 psrlw $2,%mm6 por %mm7,%mm6 psllw $4,%mm6 paddw %mm6,%mm1 pmulhw .L45,%mm6 psllw $5,%mm2 pmulhw .L46,%mm2 psllw $4,%mm0 paddw %mm0,%mm3 pmulhw .L47,%mm0 paddw %mm2,%mm6 paddw %mm0,%mm6 movq .L52,%mm0 movq %mm4,%mm2 paddw %mm6,%mm2 paddw t124(%esp),%mm2 paddw %mm0,%mm4 psrlw $4,%mm4 packuswb %mm4,%mm4 paddw %mm0,%mm6 psrlw $4,%mm6 packuswb %mm6,%mm6 movq .L49,%mm5 punpcklbw %mm6,%mm4 psrlw $2,%mm2 movq %mm4,(%edi,%edx) pmulhw %mm5,%mm1 pmulhw %mm5,%mm3 psubw %mm2,%mm1 pmulhw .L51,%mm1 psubw %mm2,%mm3 pmulhw .L50,%mm3 packsswb %mm1,%mm3 pxor .L53,%mm3 movd %mm3,(%eax) psrlq $32,%mm3 movd %mm3,(%ebx) addl $8,%edi addl $4,%eax addl $4,%ebx subl $8,%ecx jne .L83 addl t118(%esp),%esi addl %ebp,%esi movl t120(%esp),%ecx addl %ecx,%eax addl t119(%esp),%edi addl %edx,%edi addl %ecx,%ebx subl $2,t122(%esp) jne .L84 movl t123(%esp),%esp emms popl %edi popl %esi popl %ebp popl %ebx ret .text .align 16 .globl sse_yuyv_rgb32 sse_yuyv_rgb32: pushl %edi pushl %esi pushl %ebx movl 0+12+12(%esp),%ecx movl 0+12+24(%esp),%eax addl %ecx,%ecx movl 0+12+20(%esp),%ebx subl %ecx,%eax movl 0+12+12(%esp),%ecx shll $2,%ecx movl 0+12+16(%esp),%edx subl %ecx,%ebx movl 0+12+8(%esp),%esi movl 0+12+4(%esp),%edi .align 16 .L86: movl 0+12+12(%esp),%ecx .L85: pxor %mm7,%mm7 movq (%esi),%mm4 movq %mm4,%mm6 movq 8(%esi),%mm5 punpcklwd %mm5,%mm4 addl $16,%esi punpckhwd %mm5,%mm6 movq %mm4,%mm5 punpcklwd %mm6,%mm4 movq %mm4,%mm0 punpckhwd %mm6,%mm5 movq .L3,%mm1 movq %mm5,%mm2 movq .L4,%mm3 psrlw $8,%mm0 pand %mm1,%mm4 psubw %mm3,%mm0 psrlw $8,%mm2 pand %mm1,%mm5 psubw %mm3,%mm2 psrlw $3,%mm3 psubw %mm3,%mm4 psubw %mm3,%mm5 psllw $3,%mm0 movq %mm0,%mm6 pmulhw .L6,%mm6 psllw $2,%mm2 movq %mm2,%mm1 pmulhw .L9,%mm1 psllw $2,%mm4 pmulhw .L7,%mm0 psllw $2,%mm5 pmulhw .L8,%mm2 paddw %mm1,%mm6 pmulhw .L5,%mm4 movq %mm0,%mm1 pmulhw .L5,%mm5 prefetchnta (%esi) paddw %mm4,%mm0 paddw %mm5,%mm1 packuswb %mm0,%mm0 movq %mm2,%mm3 packuswb %mm1,%mm1 paddw %mm4,%mm2 punpcklbw %mm1,%mm0 paddw %mm5,%mm3 psubw %mm6,%mm4 packuswb %mm2,%mm2 packuswb %mm3,%mm3 packuswb %mm4,%mm4 psubw %mm6,%mm5 punpcklbw %mm3,%mm2 packuswb %mm5,%mm5 punpcklbw %mm5,%mm4 movq %mm2,%mm1 punpcklbw %mm4,%mm2 movq %mm0,%mm3 punpcklbw %mm7,%mm0 movq %mm2,%mm5 punpcklwd %mm0,%mm2 punpckhwd %mm0,%mm5 movntq %mm2,(%edi) punpckhbw %mm4,%mm1 movntq %mm5,8(%edi) punpckhbw %mm7,%mm3 movq %mm1,%mm5 punpcklwd %mm3,%mm1 movntq %mm1,16(%edi) punpckhwd %mm3,%mm5 movntq %mm5,24(%edi) addl $32,%edi subl $8,%ecx jne .L85 addl %eax,%esi addl %ebx,%edi decl %edx jne .L86 emms popl %ebx popl %esi popl %edi ret .text .align 16 .globl sse_yuv420_rgb32 sse_yuv420_rgb32: pushl %ebx pushl %ebp pushl %esi pushl %edi movl %esp,%ecx leal -48(%esp),%esp andl $-8,%esp t130 = 0 t131 = 8 t132 = 16 t125 = 24 t126 = 28 t127 = 32 t128 = 36 t129 = 40 t133 = 44 movl 0+16+20(%ecx),%ebx movl %ebx,t128(%esp) shrl $1,%ebx movl 0+16+36(%ecx),%eax subl %ebx,%eax movl %eax,t127(%esp) movl 0+16+32(%ecx),%eax addl %ebx,%ebx movl 0+16+4(%ecx),%edi movl %eax,%ebp movl 0+16+28(%ecx),%esi subl %ebx,%eax movl %eax,t125(%esp) shll $2,%ebx movl %esi,%edx movl 0+16+24(%ecx),%eax subl %ebx,%esi movl 0+16+16(%ecx),%ebx movl %esi,t126(%esp) movl 0+16+8(%ecx),%esi movl %eax,t129(%esp) movl 0+16+12(%ecx),%eax movl %ecx,t133(%esp) .align 16 .L88: movl t128(%esp),%ecx .L87: pxor %mm7,%mm7 movq .L4,%mm3 pxor %mm1,%mm1 movd (%eax),%mm0 addl $4,%eax punpcklbw %mm1,%mm0 movd (%ebx),%mm2 addl $4,%ebx psubw %mm3,%mm0 punpcklbw %mm1,%mm2 movq (%esi),%mm4 psubw %mm3,%mm2 movq %mm4,%mm5 psrlw $3,%mm3 pand .L3,%mm4 psrlw $8,%mm5 psubw %mm3,%mm4 psubw %mm3,%mm5 psllw $3,%mm0 movq %mm0,%mm6 pmulhw .L6,%mm6 psllw $2,%mm2 movq %mm2,%mm1 pmulhw .L9,%mm1 psllw $2,%mm4 pmulhw .L7,%mm0 psllw $2,%mm5 pmulhw .L8,%mm2 paddw %mm1,%mm6 pmulhw .L5,%mm4 movq %mm0,t131(%esp) pmulhw .L5,%mm5 movq %mm2,t130(%esp) movq %mm0,%mm1 movq %mm6,t132(%esp) prefetchnta (%esi) paddw %mm4,%mm0 paddw %mm5,%mm1 packuswb %mm0,%mm0 movq %mm2,%mm3 packuswb %mm1,%mm1 paddw %mm4,%mm2 punpcklbw %mm1,%mm0 paddw %mm5,%mm3 psubw %mm6,%mm4 packuswb %mm2,%mm2 packuswb %mm3,%mm3 packuswb %mm4,%mm4 psubw %mm6,%mm5 punpcklbw %mm3,%mm2 packuswb %mm5,%mm5 punpcklbw %mm5,%mm4 movq %mm2,%mm1 punpcklbw %mm4,%mm2 movq %mm0,%mm3 punpcklbw %mm7,%mm0 movq %mm2,%mm5 punpcklwd %mm0,%mm2 punpckhwd %mm0,%mm5 movntq %mm2,(%edi) punpckhbw %mm4,%mm1 movntq %mm5,8(%edi) punpckhbw %mm7,%mm3 movq %mm1,%mm5 punpcklwd %mm3,%mm1 movntq %mm1,16(%edi) punpckhwd %mm3,%mm5 movntq %mm5,24(%edi) movq (%esi,%ebp),%mm4 addl $8,%esi movq .L12,%mm3 movq %mm4,%mm5 pand .L3,%mm4 psrlw $8,%mm5 psubw %mm3,%mm4 psubw %mm3,%mm5 movq t131(%esp),%mm0 psllw $2,%mm4 movq t130(%esp),%mm2 psllw $2,%mm5 pmulhw .L5,%mm4 movq %mm0,%mm1 pmulhw .L5,%mm5 prefetchnta (%esi) paddw %mm4,%mm0 paddw %mm5,%mm1 packuswb %mm0,%mm0 movq %mm2,%mm3 packuswb %mm1,%mm1 paddw %mm4,%mm2 punpcklbw %mm1,%mm0 paddw %mm5,%mm3 psubw t132(%esp),%mm4 packuswb %mm2,%mm2 packuswb %mm3,%mm3 packuswb %mm4,%mm4 psubw t132(%esp),%mm5 punpcklbw %mm3,%mm2 packuswb %mm5,%mm5 punpcklbw %mm5,%mm4 movq %mm2,%mm1 punpcklbw %mm4,%mm2 movq %mm0,%mm3 punpcklbw %mm7,%mm0 movq %mm2,%mm5 punpcklwd %mm0,%mm2 punpckhwd %mm0,%mm5 movntq %mm2,(%edi,%edx) punpckhbw %mm4,%mm1 movntq %mm5,8(%edi,%edx) punpckhbw %mm7,%mm3 movq %mm1,%mm5 punpcklwd %mm3,%mm1 movntq %mm1,16(%edi,%edx) punpckhwd %mm3,%mm5 movntq %mm5,24(%edi,%edx) addl $32,%edi subl $8,%ecx jne .L87 addl t125(%esp),%esi addl %ebp,%esi movl t127(%esp),%ecx addl %ecx,%eax addl t126(%esp),%edi addl %edx,%edi addl %ecx,%ebx subl $2,t129(%esp) jne .L88 movl t133(%esp),%esp emms popl %edi popl %esi popl %ebp popl %ebx ret .text .align 16 .globl sse_yuyv_bgr32 sse_yuyv_bgr32: pushl %edi pushl %esi pushl %ebx movl 0+12+12(%esp),%ecx movl 0+12+24(%esp),%eax addl %ecx,%ecx movl 0+12+20(%esp),%ebx subl %ecx,%eax movl 0+12+12(%esp),%ecx shll $2,%ecx movl 0+12+16(%esp),%edx subl %ecx,%ebx movl 0+12+8(%esp),%esi movl 0+12+4(%esp),%edi .align 16 .L90: movl 0+12+12(%esp),%ecx .L89: pxor %mm7,%mm7 movq (%esi),%mm4 movq %mm4,%mm6 movq 8(%esi),%mm5 punpcklwd %mm5,%mm4 addl $16,%esi punpckhwd %mm5,%mm6 movq %mm4,%mm5 punpcklwd %mm6,%mm4 movq %mm4,%mm0 punpckhwd %mm6,%mm5 movq .L3,%mm1 movq %mm5,%mm2 movq .L4,%mm3 psrlw $8,%mm0 pand %mm1,%mm4 psubw %mm3,%mm0 psrlw $8,%mm2 pand %mm1,%mm5 psubw %mm3,%mm2 psrlw $3,%mm3 psubw %mm3,%mm4 psubw %mm3,%mm5 psllw $3,%mm0 movq %mm0,%mm6 pmulhw .L6,%mm6 psllw $2,%mm2 movq %mm2,%mm1 pmulhw .L9,%mm1 psllw $2,%mm4 pmulhw .L7,%mm0 psllw $2,%mm5 pmulhw .L8,%mm2 paddw %mm1,%mm6 pmulhw .L5,%mm4 movq %mm0,%mm1 pmulhw .L5,%mm5 prefetchnta (%esi) paddw %mm4,%mm0 paddw %mm5,%mm1 packuswb %mm0,%mm0 movq %mm2,%mm3 packuswb %mm1,%mm1 paddw %mm4,%mm2 punpcklbw %mm1,%mm0 paddw %mm5,%mm3 psubw %mm6,%mm4 packuswb %mm2,%mm2 packuswb %mm3,%mm3 packuswb %mm4,%mm4 psubw %mm6,%mm5 punpcklbw %mm3,%mm2 packuswb %mm5,%mm5 punpcklbw %mm5,%mm4 movq %mm0,%mm1 punpcklbw %mm4,%mm0 movq %mm2,%mm3 punpcklbw %mm7,%mm2 movq %mm0,%mm5 punpcklwd %mm2,%mm0 punpckhwd %mm2,%mm5 movntq %mm0,(%edi) punpckhbw %mm4,%mm1 movntq %mm5,8(%edi) punpckhbw %mm7,%mm3 movq %mm1,%mm5 punpcklwd %mm3,%mm1 movntq %mm1,16(%edi) punpckhwd %mm3,%mm5 movntq %mm5,24(%edi) addl $32,%edi subl $8,%ecx jne .L89 addl %eax,%esi addl %ebx,%edi decl %edx jne .L90 emms popl %ebx popl %esi popl %edi ret .text .align 16 .globl sse_yuv420_bgr32 sse_yuv420_bgr32: pushl %ebx pushl %ebp pushl %esi pushl %edi movl %esp,%ecx leal -48(%esp),%esp andl $-8,%esp t139 = 0 t140 = 8 t141 = 16 t134 = 24 t135 = 28 t136 = 32 t137 = 36 t138 = 40 t142 = 44 movl 0+16+20(%ecx),%ebx movl %ebx,t137(%esp) shrl $1,%ebx movl 0+16+36(%ecx),%eax subl %ebx,%eax movl %eax,t136(%esp) movl 0+16+32(%ecx),%eax addl %ebx,%ebx movl 0+16+4(%ecx),%edi movl %eax,%ebp movl 0+16+28(%ecx),%esi subl %ebx,%eax movl %eax,t134(%esp) shll $2,%ebx movl %esi,%edx movl 0+16+24(%ecx),%eax subl %ebx,%esi movl 0+16+16(%ecx),%ebx movl %esi,t135(%esp) movl 0+16+8(%ecx),%esi movl %eax,t138(%esp) movl 0+16+12(%ecx),%eax movl %ecx,t142(%esp) .align 16 .L92: movl t137(%esp),%ecx .L91: pxor %mm7,%mm7 movq .L4,%mm3 pxor %mm1,%mm1 movd (%eax),%mm0 addl $4,%eax punpcklbw %mm1,%mm0 movd (%ebx),%mm2 addl $4,%ebx psubw %mm3,%mm0 punpcklbw %mm1,%mm2 movq (%esi),%mm4 psubw %mm3,%mm2 movq %mm4,%mm5 psrlw $3,%mm3 pand .L3,%mm4 psrlw $8,%mm5 psubw %mm3,%mm4 psubw %mm3,%mm5 psllw $3,%mm0 movq %mm0,%mm6 pmulhw .L6,%mm6 psllw $2,%mm2 movq %mm2,%mm1 pmulhw .L9,%mm1 psllw $2,%mm4 pmulhw .L7,%mm0 psllw $2,%mm5 pmulhw .L8,%mm2 paddw %mm1,%mm6 pmulhw .L5,%mm4 movq %mm0,t140(%esp) pmulhw .L5,%mm5 movq %mm2,t139(%esp) movq %mm0,%mm1 movq %mm6,t141(%esp) prefetchnta (%esi) paddw %mm4,%mm0 paddw %mm5,%mm1 packuswb %mm0,%mm0 movq %mm2,%mm3 packuswb %mm1,%mm1 paddw %mm4,%mm2 punpcklbw %mm1,%mm0 paddw %mm5,%mm3 psubw %mm6,%mm4 packuswb %mm2,%mm2 packuswb %mm3,%mm3 packuswb %mm4,%mm4 psubw %mm6,%mm5 punpcklbw %mm3,%mm2 packuswb %mm5,%mm5 punpcklbw %mm5,%mm4 movq %mm0,%mm1 punpcklbw %mm4,%mm0 movq %mm2,%mm3 punpcklbw %mm7,%mm2 movq %mm0,%mm5 punpcklwd %mm2,%mm0 punpckhwd %mm2,%mm5 movntq %mm0,(%edi) punpckhbw %mm4,%mm1 movntq %mm5,8(%edi) punpckhbw %mm7,%mm3 movq %mm1,%mm5 punpcklwd %mm3,%mm1 movntq %mm1,16(%edi) punpckhwd %mm3,%mm5 movntq %mm5,24(%edi) movq (%esi,%ebp),%mm4 addl $8,%esi movq .L12,%mm3 movq %mm4,%mm5 pand .L3,%mm4 psrlw $8,%mm5 psubw %mm3,%mm4 psubw %mm3,%mm5 movq t140(%esp),%mm0 psllw $2,%mm4 movq t139(%esp),%mm2 psllw $2,%mm5 pmulhw .L5,%mm4 movq %mm0,%mm1 pmulhw .L5,%mm5 prefetchnta (%esi) paddw %mm4,%mm0 paddw %mm5,%mm1 packuswb %mm0,%mm0 movq %mm2,%mm3 packuswb %mm1,%mm1 paddw %mm4,%mm2 punpcklbw %mm1,%mm0 paddw %mm5,%mm3 psubw t141(%esp),%mm4 packuswb %mm2,%mm2 packuswb %mm3,%mm3 packuswb %mm4,%mm4 psubw t141(%esp),%mm5 punpcklbw %mm3,%mm2 packuswb %mm5,%mm5 punpcklbw %mm5,%mm4 movq %mm0,%mm1 punpcklbw %mm4,%mm0 movq %mm2,%mm3 punpcklbw %mm7,%mm2 movq %mm0,%mm5 punpcklwd %mm2,%mm0 punpckhwd %mm2,%mm5 movntq %mm0,(%edi,%edx) punpckhbw %mm4,%mm1 movntq %mm5,8(%edi,%edx) punpckhbw %mm7,%mm3 movq %mm1,%mm5 punpcklwd %mm3,%mm1 movntq %mm1,16(%edi,%edx) punpckhwd %mm3,%mm5 movntq %mm5,24(%edi,%edx) addl $32,%edi subl $8,%ecx jne .L91 addl t134(%esp),%esi addl %ebp,%esi movl t136(%esp),%ecx addl %ecx,%eax addl t135(%esp),%edi addl %edx,%edi addl %ecx,%ebx subl $2,t138(%esp) jne .L92 movl t142(%esp),%esp emms popl %edi popl %esi popl %ebp popl %ebx ret .text .align 16 .globl sse_yuyv_rgb24 sse_yuyv_rgb24: pushl %edi pushl %esi pushl %ebx movl 0+12+12(%esp),%ecx movl 0+12+24(%esp),%eax addl %ecx,%ecx movl 0+12+20(%esp),%ebx subl %ecx,%eax movl 0+12+12(%esp),%ecx leal (%ecx,%ecx,2),%ecx movl 0+12+16(%esp),%edx subl %ecx,%ebx movl 0+12+8(%esp),%esi movl 0+12+4(%esp),%edi .align 16 .L94: movl 0+12+12(%esp),%ecx .L93: movq (%esi),%mm4 movq %mm4,%mm6 movq 8(%esi),%mm5 punpcklwd %mm5,%mm4 addl $16,%esi punpckhwd %mm5,%mm6 movq %mm4,%mm5 punpcklwd %mm6,%mm4 movq %mm4,%mm0 punpckhwd %mm6,%mm5 movq .L3,%mm1 movq %mm5,%mm2 movq .L4,%mm3 psrlw $8,%mm0 pand %mm1,%mm4 psubw %mm3,%mm0 psrlw $8,%mm2 pand %mm1,%mm5 psubw %mm3,%mm2 psrlw $3,%mm3 psubw %mm3,%mm4 psubw %mm3,%mm5 psllw $3,%mm0 movq %mm0,%mm6 pmulhw .L6,%mm6 psllw $2,%mm2 movq %mm2,%mm1 pmulhw .L9,%mm1 psllw $2,%mm4 pmulhw .L7,%mm0 psllw $2,%mm5 pmulhw .L8,%mm2 paddw %mm1,%mm6 pmulhw .L5,%mm4 movq %mm0,%mm1 pmulhw .L5,%mm5 movq %mm2,%mm3 prefetchnta (%esi) paddw %mm4,%mm0 paddw %mm5,%mm1 paddw %mm4,%mm2 packuswb %mm1,%mm0 paddw %mm5,%mm3 psubw %mm6,%mm4 packuswb %mm3,%mm2 psubw %mm6,%mm5 packuswb %mm5,%mm4 movq %mm2,%mm1 punpcklbw %mm4,%mm2 psrlq $32,%mm1 punpckhbw %mm0,%mm4 punpcklbw %mm1,%mm0 movq %mm2,%mm1 punpcklwd %mm0,%mm2 punpckhwd %mm4,%mm0 psllq $32,%mm4 punpckhwd %mm2,%mm4 punpckldq %mm4,%mm2 pshufw $75,%mm4,%mm3 psrlq $32,%mm1 movntq %mm2,(%edi) punpcklwd %mm0,%mm1 pshufw $180,%mm1,%mm1 punpckldq %mm1,%mm3 punpckhdq %mm0,%mm1 movntq %mm3,8(%edi) movntq %mm1,16(%edi) addl $24,%edi subl $8,%ecx jne .L93 addl %eax,%esi addl %ebx,%edi decl %edx jne .L94 emms popl %ebx popl %esi popl %edi ret .text .align 16 .globl sse_yuv420_rgb24 sse_yuv420_rgb24: pushl %ebx pushl %ebp pushl %esi pushl %edi movl %esp,%ecx leal -40(%esp),%esp andl $-8,%esp t148 = 0 t149 = 8 t143 = 16 t144 = 20 t145 = 24 t146 = 28 t147 = 32 t150 = 36 movl 0+16+20(%ecx),%ebx movl %ebx,t146(%esp) shrl $1,%ebx movl 0+16+36(%ecx),%eax subl %ebx,%eax movl %eax,t145(%esp) movl 0+16+32(%ecx),%eax addl %ebx,%ebx movl 0+16+4(%ecx),%edi movl %eax,%ebp movl 0+16+28(%ecx),%esi subl %ebx,%eax movl %eax,t143(%esp) leal (%ebx,%ebx,2),%ebx movl %esi,%edx movl 0+16+24(%ecx),%eax subl %ebx,%esi movl 0+16+16(%ecx),%ebx movl %esi,t144(%esp) movl 0+16+8(%ecx),%esi movl %eax,t147(%esp) movl 0+16+12(%ecx),%eax movl %ecx,t150(%esp) .align 16 .L96: movl t146(%esp),%ecx .L95: movq .L4,%mm3 pxor %mm1,%mm1 movd (%eax),%mm0 addl $4,%eax punpcklbw %mm1,%mm0 movd (%ebx),%mm2 addl $4,%ebx psubw %mm3,%mm0 punpcklbw %mm1,%mm2 movq (%esi),%mm4 psubw %mm3,%mm2 movq %mm4,%mm5 psrlw $3,%mm3 pand .L3,%mm4 psrlw $8,%mm5 psubw %mm3,%mm4 psubw %mm3,%mm5 psllw $3,%mm0 movq %mm0,%mm6 pmulhw .L6,%mm6 psllw $2,%mm2 movq %mm2,%mm1 pmulhw .L9,%mm1 psllw $2,%mm4 pmulhw .L7,%mm0 psllw $2,%mm5 pmulhw .L8,%mm2 paddw %mm1,%mm6 pmulhw .L5,%mm4 movq %mm0,%mm7 pmulhw .L5,%mm5 movq %mm2,t148(%esp) movq %mm0,%mm1 movq %mm6,t149(%esp) movq %mm2,%mm3 prefetchnta (%esi) paddw %mm4,%mm0 paddw %mm5,%mm1 paddw %mm4,%mm2 packuswb %mm1,%mm0 paddw %mm5,%mm3 psubw %mm6,%mm4 packuswb %mm3,%mm2 psubw %mm6,%mm5 packuswb %mm5,%mm4 movq %mm2,%mm1 punpcklbw %mm4,%mm2 psrlq $32,%mm1 punpckhbw %mm0,%mm4 punpcklbw %mm1,%mm0 movq %mm2,%mm1 punpcklwd %mm0,%mm2 punpckhwd %mm4,%mm0 psllq $32,%mm4 punpckhwd %mm2,%mm4 punpckldq %mm4,%mm2 pshufw $75,%mm4,%mm3 psrlq $32,%mm1 movntq %mm2,(%edi) punpcklwd %mm0,%mm1 pshufw $180,%mm1,%mm1 punpckldq %mm1,%mm3 punpckhdq %mm0,%mm1 movntq %mm3,8(%edi) movntq %mm1,16(%edi) movq (%esi,%ebp),%mm4 addl $8,%esi movq .L12,%mm3 movq %mm4,%mm5 pand .L3,%mm4 psrlw $8,%mm5 psubw %mm3,%mm4 psubw %mm3,%mm5 movq %mm7,%mm0 psllw $2,%mm4 movq t148(%esp),%mm2 psllw $2,%mm5 pmulhw .L5,%mm4 movq %mm0,%mm1 pmulhw .L5,%mm5 movq %mm2,%mm3 prefetchnta (%esi) paddw %mm4,%mm0 paddw %mm5,%mm1 paddw %mm4,%mm2 packuswb %mm1,%mm0 paddw %mm5,%mm3 psubw t149(%esp),%mm4 packuswb %mm3,%mm2 psubw t149(%esp),%mm5 packuswb %mm5,%mm4 movq %mm2,%mm1 punpcklbw %mm4,%mm2 psrlq $32,%mm1 punpckhbw %mm0,%mm4 punpcklbw %mm1,%mm0 movq %mm2,%mm1 punpcklwd %mm0,%mm2 punpckhwd %mm4,%mm0 psllq $32,%mm4 punpckhwd %mm2,%mm4 punpckldq %mm4,%mm2 pshufw $75,%mm4,%mm3 psrlq $32,%mm1 movntq %mm2,(%edi,%edx) punpcklwd %mm0,%mm1 pshufw $180,%mm1,%mm1 punpckldq %mm1,%mm3 punpckhdq %mm0,%mm1 movntq %mm3,8(%edi,%edx) movntq %mm1,16(%edi,%edx) addl $24,%edi subl $8,%ecx jne .L95 addl t143(%esp),%esi addl %ebp,%esi movl t145(%esp),%ecx addl %ecx,%eax addl t144(%esp),%edi addl %edx,%edi addl %ecx,%ebx subl $2,t147(%esp) jne .L96 movl t150(%esp),%esp emms popl %edi popl %esi popl %ebp popl %ebx ret .text .align 16 .globl sse_yuyv_bgr24 sse_yuyv_bgr24: pushl %edi pushl %esi pushl %ebx movl 0+12+12(%esp),%ecx movl 0+12+24(%esp),%eax addl %ecx,%ecx movl 0+12+20(%esp),%ebx subl %ecx,%eax movl 0+12+12(%esp),%ecx leal (%ecx,%ecx,2),%ecx movl 0+12+16(%esp),%edx subl %ecx,%ebx movl 0+12+8(%esp),%esi movl 0+12+4(%esp),%edi .align 16 .L98: movl 0+12+12(%esp),%ecx .L97: movq (%esi),%mm4 movq %mm4,%mm6 movq 8(%esi),%mm5 punpcklwd %mm5,%mm4 addl $16,%esi punpckhwd %mm5,%mm6 movq %mm4,%mm5 punpcklwd %mm6,%mm4 movq %mm4,%mm0 punpckhwd %mm6,%mm5 movq .L3,%mm1 movq %mm5,%mm2 movq .L4,%mm3 psrlw $8,%mm0 pand %mm1,%mm4 psubw %mm3,%mm0 psrlw $8,%mm2 pand %mm1,%mm5 psubw %mm3,%mm2 psrlw $3,%mm3 psubw %mm3,%mm4 psubw %mm3,%mm5 psllw $3,%mm0 movq %mm0,%mm6 pmulhw .L6,%mm6 psllw $2,%mm2 movq %mm2,%mm1 pmulhw .L9,%mm1 psllw $2,%mm4 pmulhw .L7,%mm0 psllw $2,%mm5 pmulhw .L8,%mm2 paddw %mm1,%mm6 pmulhw .L5,%mm4 movq %mm0,%mm1 pmulhw .L5,%mm5 movq %mm2,%mm3 prefetchnta (%esi) paddw %mm4,%mm0 paddw %mm5,%mm1 paddw %mm4,%mm2 packuswb %mm1,%mm0 paddw %mm5,%mm3 psubw %mm6,%mm4 packuswb %mm3,%mm2 psubw %mm6,%mm5 packuswb %mm5,%mm4 movq %mm0,%mm1 punpcklbw %mm4,%mm0 psrlq $32,%mm1 punpckhbw %mm2,%mm4 punpcklbw %mm1,%mm2 movq %mm0,%mm1 punpcklwd %mm2,%mm0 punpckhwd %mm4,%mm2 psllq $32,%mm4 punpckhwd %mm0,%mm4 punpckldq %mm4,%mm0 pshufw $75,%mm4,%mm3 psrlq $32,%mm1 movntq %mm0,(%edi) punpcklwd %mm2,%mm1 pshufw $180,%mm1,%mm1 punpckldq %mm1,%mm3 punpckhdq %mm2,%mm1 movntq %mm3,8(%edi) movntq %mm1,16(%edi) addl $24,%edi subl $8,%ecx jne .L97 addl %eax,%esi addl %ebx,%edi decl %edx jne .L98 emms popl %ebx popl %esi popl %edi ret .text .align 16 .globl sse_yuv420_bgr24 sse_yuv420_bgr24: pushl %ebx pushl %ebp pushl %esi pushl %edi movl %esp,%ecx leal -40(%esp),%esp andl $-8,%esp t156 = 0 t157 = 8 t151 = 16 t152 = 20 t153 = 24 t154 = 28 t155 = 32 t158 = 36 movl 0+16+20(%ecx),%ebx movl %ebx,t154(%esp) shrl $1,%ebx movl 0+16+36(%ecx),%eax subl %ebx,%eax movl %eax,t153(%esp) movl 0+16+32(%ecx),%eax addl %ebx,%ebx movl 0+16+4(%ecx),%edi movl %eax,%ebp movl 0+16+28(%ecx),%esi subl %ebx,%eax movl %eax,t151(%esp) leal (%ebx,%ebx,2),%ebx movl %esi,%edx movl 0+16+24(%ecx),%eax subl %ebx,%esi movl 0+16+16(%ecx),%ebx movl %esi,t152(%esp) movl 0+16+8(%ecx),%esi movl %eax,t155(%esp) movl 0+16+12(%ecx),%eax movl %ecx,t158(%esp) .align 16 .L100: movl t154(%esp),%ecx .L99: movq .L4,%mm3 pxor %mm1,%mm1 movd (%eax),%mm0 addl $4,%eax punpcklbw %mm1,%mm0 movd (%ebx),%mm2 addl $4,%ebx psubw %mm3,%mm0 punpcklbw %mm1,%mm2 movq (%esi),%mm4 psubw %mm3,%mm2 movq %mm4,%mm5 psrlw $3,%mm3 pand .L3,%mm4 psrlw $8,%mm5 psubw %mm3,%mm4 psubw %mm3,%mm5 psllw $3,%mm0 movq %mm0,%mm6 pmulhw .L6,%mm6 psllw $2,%mm2 movq %mm2,%mm1 pmulhw .L9,%mm1 psllw $2,%mm4 pmulhw .L7,%mm0 psllw $2,%mm5 pmulhw .L8,%mm2 paddw %mm1,%mm6 pmulhw .L5,%mm4 movq %mm0,%mm7 pmulhw .L5,%mm5 movq %mm2,t156(%esp) movq %mm0,%mm1 movq %mm6,t157(%esp) movq %mm2,%mm3 prefetchnta (%esi) paddw %mm4,%mm0 paddw %mm5,%mm1 paddw %mm4,%mm2 packuswb %mm1,%mm0 paddw %mm5,%mm3 psubw %mm6,%mm4 packuswb %mm3,%mm2 psubw %mm6,%mm5 packuswb %mm5,%mm4 movq %mm0,%mm1 punpcklbw %mm4,%mm0 psrlq $32,%mm1 punpckhbw %mm2,%mm4 punpcklbw %mm1,%mm2 movq %mm0,%mm1 punpcklwd %mm2,%mm0 punpckhwd %mm4,%mm2 psllq $32,%mm4 punpckhwd %mm0,%mm4 punpckldq %mm4,%mm0 pshufw $75,%mm4,%mm3 psrlq $32,%mm1 movntq %mm0,(%edi) punpcklwd %mm2,%mm1 pshufw $180,%mm1,%mm1 punpckldq %mm1,%mm3 punpckhdq %mm2,%mm1 movntq %mm3,8(%edi) movntq %mm1,16(%edi) movq (%esi,%ebp),%mm4 addl $8,%esi movq .L12,%mm3 movq %mm4,%mm5 pand .L3,%mm4 psrlw $8,%mm5 psubw %mm3,%mm4 psubw %mm3,%mm5 movq %mm7,%mm0 psllw $2,%mm4 movq t156(%esp),%mm2 psllw $2,%mm5 pmulhw .L5,%mm4 movq %mm0,%mm1 pmulhw .L5,%mm5 movq %mm2,%mm3 prefetchnta (%esi) paddw %mm4,%mm0 paddw %mm5,%mm1 paddw %mm4,%mm2 packuswb %mm1,%mm0 paddw %mm5,%mm3 psubw t157(%esp),%mm4 packuswb %mm3,%mm2 psubw t157(%esp),%mm5 packuswb %mm5,%mm4 movq %mm0,%mm1 punpcklbw %mm4,%mm0 psrlq $32,%mm1 punpckhbw %mm2,%mm4 punpcklbw %mm1,%mm2 movq %mm0,%mm1 punpcklwd %mm2,%mm0 punpckhwd %mm4,%mm2 psllq $32,%mm4 punpckhwd %mm0,%mm4 punpckldq %mm4,%mm0 pshufw $75,%mm4,%mm3 psrlq $32,%mm1 movntq %mm0,(%edi,%edx) punpcklwd %mm2,%mm1 pshufw $180,%mm1,%mm1 punpckldq %mm1,%mm3 punpckhdq %mm2,%mm1 movntq %mm3,8(%edi,%edx) movntq %mm1,16(%edi,%edx) addl $24,%edi subl $8,%ecx jne .L99 addl t151(%esp),%esi addl %ebp,%esi movl t153(%esp),%ecx addl %ecx,%eax addl t152(%esp),%edi addl %edx,%edi addl %ecx,%ebx subl $2,t155(%esp) jne .L100 movl t158(%esp),%esp emms popl %edi popl %esi popl %ebp popl %ebx ret .text .align 16 .globl sse_yuyv_rgb565 sse_yuyv_rgb565: pushl %edi pushl %esi pushl %ebx movl 0+12+12(%esp),%ecx movl 0+12+24(%esp),%eax addl %ecx,%ecx movl 0+12+20(%esp),%ebx subl %ecx,%eax movl 0+12+12(%esp),%ecx addl %ecx,%ecx movl 0+12+16(%esp),%edx subl %ecx,%ebx movl 0+12+8(%esp),%esi movl 0+12+4(%esp),%edi .align 16 .L102: movl 0+12+12(%esp),%ecx .L101: movq .L27,%mm7 movq (%esi),%mm4 movq %mm4,%mm6 movq 8(%esi),%mm5 punpcklwd %mm5,%mm4 addl $16,%esi punpckhwd %mm5,%mm6 movq %mm4,%mm5 punpcklwd %mm6,%mm4 movq %mm4,%mm0 punpckhwd %mm6,%mm5 movq .L3,%mm1 movq %mm5,%mm2 movq .L4,%mm3 psrlw $8,%mm0 pand %mm1,%mm4 psubw %mm3,%mm0 psrlw $8,%mm2 pand %mm1,%mm5 psubw %mm3,%mm2 psrlw $3,%mm3 psubw %mm3,%mm4 psubw %mm3,%mm5 psllw $3,%mm0 movq %mm0,%mm6 pmulhw .L6,%mm6 psllw $2,%mm2 movq %mm2,%mm1 pmulhw .L9,%mm1 psllw $2,%mm4 pmulhw .L7,%mm0 psllw $2,%mm5 pmulhw .L8,%mm2 paddw %mm1,%mm6 pmulhw .L5,%mm4 movq %mm0,%mm1 pmulhw .L5,%mm5 movq %mm2,%mm3 prefetchnta (%esi) paddw %mm4,%mm0 paddw %mm5,%mm1 paddw %mm4,%mm2 packuswb %mm1,%mm0 paddw %mm5,%mm3 psubw %mm6,%mm4 packuswb %mm3,%mm2 psubw %mm6,%mm5 packuswb %mm5,%mm4 pand %mm7,%mm2 movq %mm4,%mm5 movq .L28,%mm3 pand %mm7,%mm0 psllq $3,%mm4 pand %mm3,%mm5 psrlq $3,%mm2 pand %mm3,%mm4 por %mm4,%mm2 psrlq $5,%mm5 movq %mm2,%mm3 por %mm5,%mm0 punpcklbw %mm0,%mm2 punpckhbw %mm0,%mm3 movq %mm2,%mm5 punpcklwd %mm3,%mm2 movntq %mm2,(%edi) punpckhwd %mm3,%mm5 movntq %mm5,8(%edi) addl $16,%edi subl $8,%ecx jne .L101 addl %eax,%esi addl %ebx,%edi decl %edx jne .L102 emms popl %ebx popl %esi popl %edi ret .text .align 16 .globl sse_yuv420_rgb565 sse_yuv420_rgb565: pushl %ebx pushl %ebp pushl %esi pushl %edi movl %esp,%ecx leal -48(%esp),%esp andl $-8,%esp t164 = 0 t165 = 8 t166 = 16 t159 = 24 t160 = 28 t161 = 32 t162 = 36 t163 = 40 t167 = 44 movl 0+16+20(%ecx),%ebx movl %ebx,t162(%esp) shrl $1,%ebx movl 0+16+36(%ecx),%eax subl %ebx,%eax movl %eax,t161(%esp) movl 0+16+32(%ecx),%eax addl %ebx,%ebx movl 0+16+4(%ecx),%edi movl %eax,%ebp movl 0+16+28(%ecx),%esi subl %ebx,%eax movl %eax,t159(%esp) addl %ebx,%ebx movl %esi,%edx movl 0+16+24(%ecx),%eax subl %ebx,%esi movl 0+16+16(%ecx),%ebx movl %esi,t160(%esp) movl 0+16+8(%ecx),%esi movl %eax,t163(%esp) movl 0+16+12(%ecx),%eax movl %ecx,t167(%esp) .align 16 .L104: movl t162(%esp),%ecx .L103: movq .L27,%mm7 movq .L4,%mm3 pxor %mm1,%mm1 movd (%eax),%mm0 addl $4,%eax punpcklbw %mm1,%mm0 movd (%ebx),%mm2 addl $4,%ebx psubw %mm3,%mm0 punpcklbw %mm1,%mm2 movq (%esi),%mm4 psubw %mm3,%mm2 movq %mm4,%mm5 psrlw $3,%mm3 pand .L3,%mm4 psrlw $8,%mm5 psubw %mm3,%mm4 psubw %mm3,%mm5 psllw $3,%mm0 movq %mm0,%mm6 pmulhw .L6,%mm6 psllw $2,%mm2 movq %mm2,%mm1 pmulhw .L9,%mm1 psllw $2,%mm4 pmulhw .L7,%mm0 psllw $2,%mm5 pmulhw .L8,%mm2 paddw %mm1,%mm6 pmulhw .L5,%mm4 movq %mm0,t165(%esp) pmulhw .L5,%mm5 movq %mm2,t164(%esp) movq %mm0,%mm1 movq %mm6,t166(%esp) movq %mm2,%mm3 prefetchnta (%esi) paddw %mm4,%mm0 paddw %mm5,%mm1 paddw %mm4,%mm2 packuswb %mm1,%mm0 paddw %mm5,%mm3 psubw %mm6,%mm4 packuswb %mm3,%mm2 psubw %mm6,%mm5 packuswb %mm5,%mm4 pand %mm7,%mm2 movq %mm4,%mm5 movq .L28,%mm3 pand %mm7,%mm0 psllq $3,%mm4 pand %mm3,%mm5 psrlq $3,%mm2 pand %mm3,%mm4 por %mm4,%mm2 psrlq $5,%mm5 movq %mm2,%mm3 por %mm5,%mm0 punpcklbw %mm0,%mm2 punpckhbw %mm0,%mm3 movq %mm2,%mm5 punpcklwd %mm3,%mm2 movntq %mm2,(%edi) punpckhwd %mm3,%mm5 movntq %mm5,8(%edi) movq (%esi,%ebp),%mm4 addl $8,%esi movq .L12,%mm3 movq %mm4,%mm5 pand .L3,%mm4 psrlw $8,%mm5 psubw %mm3,%mm4 psubw %mm3,%mm5 movq t165(%esp),%mm0 psllw $2,%mm4 movq t164(%esp),%mm2 psllw $2,%mm5 pmulhw .L5,%mm4 movq %mm0,%mm1 pmulhw .L5,%mm5 movq %mm2,%mm3 prefetchnta (%esi) paddw %mm4,%mm0 paddw %mm5,%mm1 paddw %mm4,%mm2 packuswb %mm1,%mm0 paddw %mm5,%mm3 psubw t166(%esp),%mm4 packuswb %mm3,%mm2 psubw t166(%esp),%mm5 packuswb %mm5,%mm4 pand %mm7,%mm2 movq %mm4,%mm5 movq .L28,%mm3 pand %mm7,%mm0 psllq $3,%mm4 pand %mm3,%mm5 psrlq $3,%mm2 pand %mm3,%mm4 por %mm4,%mm2 psrlq $5,%mm5 movq %mm2,%mm3 por %mm5,%mm0 punpcklbw %mm0,%mm2 punpckhbw %mm0,%mm3 movq %mm2,%mm5 punpcklwd %mm3,%mm2 movntq %mm2,(%edi,%edx) punpckhwd %mm3,%mm5 movntq %mm5,8(%edi,%edx) addl $16,%edi subl $8,%ecx jne .L103 addl t159(%esp),%esi addl %ebp,%esi movl t161(%esp),%ecx addl %ecx,%eax addl t160(%esp),%edi addl %edx,%edi addl %ecx,%ebx subl $2,t163(%esp) jne .L104 movl t167(%esp),%esp emms popl %edi popl %esi popl %ebp popl %ebx ret .text .align 16 .globl sse_yuyv_bgr565 sse_yuyv_bgr565: pushl %edi pushl %esi pushl %ebx movl 0+12+12(%esp),%ecx movl 0+12+24(%esp),%eax addl %ecx,%ecx movl 0+12+20(%esp),%ebx subl %ecx,%eax movl 0+12+12(%esp),%ecx addl %ecx,%ecx movl 0+12+16(%esp),%edx subl %ecx,%ebx movl 0+12+8(%esp),%esi movl 0+12+4(%esp),%edi .align 16 .L106: movl 0+12+12(%esp),%ecx .L105: movq .L27,%mm7 movq (%esi),%mm4 movq %mm4,%mm6 movq 8(%esi),%mm5 punpcklwd %mm5,%mm4 addl $16,%esi punpckhwd %mm5,%mm6 movq %mm4,%mm5 punpcklwd %mm6,%mm4 movq %mm4,%mm0 punpckhwd %mm6,%mm5 movq .L3,%mm1 movq %mm5,%mm2 movq .L4,%mm3 psrlw $8,%mm0 pand %mm1,%mm4 psubw %mm3,%mm0 psrlw $8,%mm2 pand %mm1,%mm5 psubw %mm3,%mm2 psrlw $3,%mm3 psubw %mm3,%mm4 psubw %mm3,%mm5 psllw $3,%mm0 movq %mm0,%mm6 pmulhw .L6,%mm6 psllw $2,%mm2 movq %mm2,%mm1 pmulhw .L9,%mm1 psllw $2,%mm4 pmulhw .L7,%mm0 psllw $2,%mm5 pmulhw .L8,%mm2 paddw %mm1,%mm6 pmulhw .L5,%mm4 movq %mm0,%mm1 pmulhw .L5,%mm5 movq %mm2,%mm3 prefetchnta (%esi) paddw %mm4,%mm0 paddw %mm5,%mm1 paddw %mm4,%mm2 packuswb %mm1,%mm0 paddw %mm5,%mm3 psubw %mm6,%mm4 packuswb %mm3,%mm2 psubw %mm6,%mm5 packuswb %mm5,%mm4 pand %mm7,%mm0 movq %mm4,%mm5 movq .L28,%mm3 pand %mm7,%mm2 psllq $3,%mm4 pand %mm3,%mm5 psrlq $3,%mm0 pand %mm3,%mm4 por %mm4,%mm0 psrlq $5,%mm5 movq %mm0,%mm3 por %mm5,%mm2 punpcklbw %mm2,%mm0 punpckhbw %mm2,%mm3 movq %mm0,%mm5 punpcklwd %mm3,%mm0 movntq %mm0,(%edi) punpckhwd %mm3,%mm5 movntq %mm5,8(%edi) addl $16,%edi subl $8,%ecx jne .L105 addl %eax,%esi addl %ebx,%edi decl %edx jne .L106 emms popl %ebx popl %esi popl %edi ret .text .align 16 .globl sse_yuv420_bgr565 sse_yuv420_bgr565: pushl %ebx pushl %ebp pushl %esi pushl %edi movl %esp,%ecx leal -48(%esp),%esp andl $-8,%esp t173 = 0 t174 = 8 t175 = 16 t168 = 24 t169 = 28 t170 = 32 t171 = 36 t172 = 40 t176 = 44 movl 0+16+20(%ecx),%ebx movl %ebx,t171(%esp) shrl $1,%ebx movl 0+16+36(%ecx),%eax subl %ebx,%eax movl %eax,t170(%esp) movl 0+16+32(%ecx),%eax addl %ebx,%ebx movl 0+16+4(%ecx),%edi movl %eax,%ebp movl 0+16+28(%ecx),%esi subl %ebx,%eax movl %eax,t168(%esp) addl %ebx,%ebx movl %esi,%edx movl 0+16+24(%ecx),%eax subl %ebx,%esi movl 0+16+16(%ecx),%ebx movl %esi,t169(%esp) movl 0+16+8(%ecx),%esi movl %eax,t172(%esp) movl 0+16+12(%ecx),%eax movl %ecx,t176(%esp) .align 16 .L108: movl t171(%esp),%ecx .L107: movq .L27,%mm7 movq .L4,%mm3 pxor %mm1,%mm1 movd (%eax),%mm0 addl $4,%eax punpcklbw %mm1,%mm0 movd (%ebx),%mm2 addl $4,%ebx psubw %mm3,%mm0 punpcklbw %mm1,%mm2 movq (%esi),%mm4 psubw %mm3,%mm2 movq %mm4,%mm5 psrlw $3,%mm3 pand .L3,%mm4 psrlw $8,%mm5 psubw %mm3,%mm4 psubw %mm3,%mm5 psllw $3,%mm0 movq %mm0,%mm6 pmulhw .L6,%mm6 psllw $2,%mm2 movq %mm2,%mm1 pmulhw .L9,%mm1 psllw $2,%mm4 pmulhw .L7,%mm0 psllw $2,%mm5 pmulhw .L8,%mm2 paddw %mm1,%mm6 pmulhw .L5,%mm4 movq %mm0,t174(%esp) pmulhw .L5,%mm5 movq %mm2,t173(%esp) movq %mm0,%mm1 movq %mm6,t175(%esp) movq %mm2,%mm3 prefetchnta (%esi) paddw %mm4,%mm0 paddw %mm5,%mm1 paddw %mm4,%mm2 packuswb %mm1,%mm0 paddw %mm5,%mm3 psubw %mm6,%mm4 packuswb %mm3,%mm2 psubw %mm6,%mm5 packuswb %mm5,%mm4 pand %mm7,%mm0 movq %mm4,%mm5 movq .L28,%mm3 pand %mm7,%mm2 psllq $3,%mm4 pand %mm3,%mm5 psrlq $3,%mm0 pand %mm3,%mm4 por %mm4,%mm0 psrlq $5,%mm5 movq %mm0,%mm3 por %mm5,%mm2 punpcklbw %mm2,%mm0 punpckhbw %mm2,%mm3 movq %mm0,%mm5 punpcklwd %mm3,%mm0 movntq %mm0,(%edi) punpckhwd %mm3,%mm5 movntq %mm5,8(%edi) movq (%esi,%ebp),%mm4 addl $8,%esi movq .L12,%mm3 movq %mm4,%mm5 pand .L3,%mm4 psrlw $8,%mm5 psubw %mm3,%mm4 psubw %mm3,%mm5 movq t174(%esp),%mm0 psllw $2,%mm4 movq t173(%esp),%mm2 psllw $2,%mm5 pmulhw .L5,%mm4 movq %mm0,%mm1 pmulhw .L5,%mm5 movq %mm2,%mm3 prefetchnta (%esi) paddw %mm4,%mm0 paddw %mm5,%mm1 paddw %mm4,%mm2 packuswb %mm1,%mm0 paddw %mm5,%mm3 psubw t175(%esp),%mm4 packuswb %mm3,%mm2 psubw t175(%esp),%mm5 packuswb %mm5,%mm4 pand %mm7,%mm0 movq %mm4,%mm5 movq .L28,%mm3 pand %mm7,%mm2 psllq $3,%mm4 pand %mm3,%mm5 psrlq $3,%mm0 pand %mm3,%mm4 por %mm4,%mm0 psrlq $5,%mm5 movq %mm0,%mm3 por %mm5,%mm2 punpcklbw %mm2,%mm0 punpckhbw %mm2,%mm3 movq %mm0,%mm5 punpcklwd %mm3,%mm0 movntq %mm0,(%edi,%edx) punpckhwd %mm3,%mm5 movntq %mm5,8(%edi,%edx) addl $16,%edi subl $8,%ecx jne .L107 addl t168(%esp),%esi addl %ebp,%esi movl t170(%esp),%ecx addl %ecx,%eax addl t169(%esp),%edi addl %edx,%edi addl %ecx,%ebx subl $2,t172(%esp) jne .L108 movl t176(%esp),%esp emms popl %edi popl %esi popl %ebp popl %ebx ret .text .align 16 .globl sse_yuyv_rgb5551 sse_yuyv_rgb5551: pushl %edi pushl %esi pushl %ebx movl 0+12+12(%esp),%ecx movl 0+12+24(%esp),%eax addl %ecx,%ecx movl 0+12+20(%esp),%ebx subl %ecx,%eax movl 0+12+12(%esp),%ecx addl %ecx,%ecx movl 0+12+16(%esp),%edx subl %ecx,%ebx movl 0+12+8(%esp),%esi movl 0+12+4(%esp),%edi .align 16 .L110: movl 0+12+12(%esp),%ecx .L109: movq .L27,%mm7 movq (%esi),%mm4 movq %mm4,%mm6 movq 8(%esi),%mm5 punpcklwd %mm5,%mm4 addl $16,%esi punpckhwd %mm5,%mm6 movq %mm4,%mm5 punpcklwd %mm6,%mm4 movq %mm4,%mm0 punpckhwd %mm6,%mm5 movq .L3,%mm1 movq %mm5,%mm2 movq .L4,%mm3 psrlw $8,%mm0 pand %mm1,%mm4 psubw %mm3,%mm0 psrlw $8,%mm2 pand %mm1,%mm5 psubw %mm3,%mm2 psrlw $3,%mm3 psubw %mm3,%mm4 psubw %mm3,%mm5 psllw $3,%mm0 movq %mm0,%mm6 pmulhw .L6,%mm6 psllw $2,%mm2 movq %mm2,%mm1 pmulhw .L9,%mm1 psllw $2,%mm4 pmulhw .L7,%mm0 psllw $2,%mm5 pmulhw .L8,%mm2 paddw %mm1,%mm6 pmulhw .L5,%mm4 movq %mm0,%mm1 pmulhw .L5,%mm5 movq %mm2,%mm3 prefetchnta (%esi) paddw %mm4,%mm0 paddw %mm5,%mm1 paddw %mm4,%mm2 packuswb %mm1,%mm0 paddw %mm5,%mm3 psubw %mm6,%mm4 packuswb %mm3,%mm2 psubw %mm6,%mm5 packuswb %mm5,%mm4 pand %mm7,%mm2 pand %mm7,%mm0 psrlq $3,%mm2 pand %mm7,%mm4 pxor %mm3,%mm3 psrlq $1,%mm0 movq %mm4,%mm5 punpcklbw %mm3,%mm4 movq %mm2,%mm1 punpckhbw %mm3,%mm5 psllw $2,%mm4 punpcklbw %mm0,%mm2 psllw $2,%mm5 por %mm4,%mm2 punpckhbw %mm0,%mm1 movq %mm2,%mm3 por %mm5,%mm1 punpcklwd %mm1,%mm2 movntq %mm2,(%edi) punpckhwd %mm1,%mm3 movntq %mm3,8(%edi) addl $16,%edi subl $8,%ecx jne .L109 addl %eax,%esi addl %ebx,%edi decl %edx jne .L110 emms popl %ebx popl %esi popl %edi ret .text .align 16 .globl sse_yuv420_rgb5551 sse_yuv420_rgb5551: pushl %ebx pushl %ebp pushl %esi pushl %edi movl %esp,%ecx leal -48(%esp),%esp andl $-8,%esp t182 = 0 t183 = 8 t184 = 16 t177 = 24 t178 = 28 t179 = 32 t180 = 36 t181 = 40 t185 = 44 movl 0+16+20(%ecx),%ebx movl %ebx,t180(%esp) shrl $1,%ebx movl 0+16+36(%ecx),%eax subl %ebx,%eax movl %eax,t179(%esp) movl 0+16+32(%ecx),%eax addl %ebx,%ebx movl 0+16+4(%ecx),%edi movl %eax,%ebp movl 0+16+28(%ecx),%esi subl %ebx,%eax movl %eax,t177(%esp) addl %ebx,%ebx movl %esi,%edx movl 0+16+24(%ecx),%eax subl %ebx,%esi movl 0+16+16(%ecx),%ebx movl %esi,t178(%esp) movl 0+16+8(%ecx),%esi movl %eax,t181(%esp) movl 0+16+12(%ecx),%eax movl %ecx,t185(%esp) .align 16 .L112: movl t180(%esp),%ecx .L111: movq .L27,%mm7 movq .L4,%mm3 pxor %mm1,%mm1 movd (%eax),%mm0 addl $4,%eax punpcklbw %mm1,%mm0 movd (%ebx),%mm2 addl $4,%ebx psubw %mm3,%mm0 punpcklbw %mm1,%mm2 movq (%esi),%mm4 psubw %mm3,%mm2 movq %mm4,%mm5 psrlw $3,%mm3 pand .L3,%mm4 psrlw $8,%mm5 psubw %mm3,%mm4 psubw %mm3,%mm5 psllw $3,%mm0 movq %mm0,%mm6 pmulhw .L6,%mm6 psllw $2,%mm2 movq %mm2,%mm1 pmulhw .L9,%mm1 psllw $2,%mm4 pmulhw .L7,%mm0 psllw $2,%mm5 pmulhw .L8,%mm2 paddw %mm1,%mm6 pmulhw .L5,%mm4 movq %mm0,t183(%esp) pmulhw .L5,%mm5 movq %mm2,t182(%esp) movq %mm0,%mm1 movq %mm6,t184(%esp) movq %mm2,%mm3 prefetchnta (%esi) paddw %mm4,%mm0 paddw %mm5,%mm1 paddw %mm4,%mm2 packuswb %mm1,%mm0 paddw %mm5,%mm3 psubw %mm6,%mm4 packuswb %mm3,%mm2 psubw %mm6,%mm5 packuswb %mm5,%mm4 pand %mm7,%mm2 pand %mm7,%mm0 psrlq $3,%mm2 pand %mm7,%mm4 pxor %mm3,%mm3 psrlq $1,%mm0 movq %mm4,%mm5 punpcklbw %mm3,%mm4 movq %mm2,%mm1 punpckhbw %mm3,%mm5 psllw $2,%mm4 punpcklbw %mm0,%mm2 psllw $2,%mm5 por %mm4,%mm2 punpckhbw %mm0,%mm1 movq %mm2,%mm3 por %mm5,%mm1 punpcklwd %mm1,%mm2 movntq %mm2,(%edi) punpckhwd %mm1,%mm3 movntq %mm3,8(%edi) movq (%esi,%ebp),%mm4 addl $8,%esi movq .L12,%mm3 movq %mm4,%mm5 pand .L3,%mm4 psrlw $8,%mm5 psubw %mm3,%mm4 psubw %mm3,%mm5 movq t183(%esp),%mm0 psllw $2,%mm4 movq t182(%esp),%mm2 psllw $2,%mm5 pmulhw .L5,%mm4 movq %mm0,%mm1 pmulhw .L5,%mm5 movq %mm2,%mm3 prefetchnta (%esi) paddw %mm4,%mm0 paddw %mm5,%mm1 paddw %mm4,%mm2 packuswb %mm1,%mm0 paddw %mm5,%mm3 psubw t184(%esp),%mm4 packuswb %mm3,%mm2 psubw t184(%esp),%mm5 packuswb %mm5,%mm4 pand %mm7,%mm2 pand %mm7,%mm0 psrlq $3,%mm2 pand %mm7,%mm4 pxor %mm3,%mm3 psrlq $1,%mm0 movq %mm4,%mm5 punpcklbw %mm3,%mm4 movq %mm2,%mm1 punpckhbw %mm3,%mm5 psllw $2,%mm4 punpcklbw %mm0,%mm2 psllw $2,%mm5 por %mm4,%mm2 punpckhbw %mm0,%mm1 movq %mm2,%mm3 por %mm5,%mm1 punpcklwd %mm1,%mm2 movntq %mm2,(%edi,%edx) punpckhwd %mm1,%mm3 movntq %mm3,8(%edi,%edx) addl $16,%edi subl $8,%ecx jne .L111 addl t177(%esp),%esi addl %ebp,%esi movl t179(%esp),%ecx addl %ecx,%eax addl t178(%esp),%edi addl %edx,%edi addl %ecx,%ebx subl $2,t181(%esp) jne .L112 movl t185(%esp),%esp emms popl %edi popl %esi popl %ebp popl %ebx ret .text .align 16 .globl sse_yuyv_bgr5551 sse_yuyv_bgr5551: pushl %edi pushl %esi pushl %ebx movl 0+12+12(%esp),%ecx movl 0+12+24(%esp),%eax addl %ecx,%ecx movl 0+12+20(%esp),%ebx subl %ecx,%eax movl 0+12+12(%esp),%ecx addl %ecx,%ecx movl 0+12+16(%esp),%edx subl %ecx,%ebx movl 0+12+8(%esp),%esi movl 0+12+4(%esp),%edi .align 16 .L114: movl 0+12+12(%esp),%ecx .L113: movq .L27,%mm7 movq (%esi),%mm4 movq %mm4,%mm6 movq 8(%esi),%mm5 punpcklwd %mm5,%mm4 addl $16,%esi punpckhwd %mm5,%mm6 movq %mm4,%mm5 punpcklwd %mm6,%mm4 movq %mm4,%mm0 punpckhwd %mm6,%mm5 movq .L3,%mm1 movq %mm5,%mm2 movq .L4,%mm3 psrlw $8,%mm0 pand %mm1,%mm4 psubw %mm3,%mm0 psrlw $8,%mm2 pand %mm1,%mm5 psubw %mm3,%mm2 psrlw $3,%mm3 psubw %mm3,%mm4 psubw %mm3,%mm5 psllw $3,%mm0 movq %mm0,%mm6 pmulhw .L6,%mm6 psllw $2,%mm2 movq %mm2,%mm1 pmulhw .L9,%mm1 psllw $2,%mm4 pmulhw .L7,%mm0 psllw $2,%mm5 pmulhw .L8,%mm2 paddw %mm1,%mm6 pmulhw .L5,%mm4 movq %mm0,%mm1 pmulhw .L5,%mm5 movq %mm2,%mm3 prefetchnta (%esi) paddw %mm4,%mm0 paddw %mm5,%mm1 paddw %mm4,%mm2 packuswb %mm1,%mm0 paddw %mm5,%mm3 psubw %mm6,%mm4 packuswb %mm3,%mm2 psubw %mm6,%mm5 packuswb %mm5,%mm4 pand %mm7,%mm0 pand %mm7,%mm2 psrlq $3,%mm0 pand %mm7,%mm4 pxor %mm3,%mm3 psrlq $1,%mm2 movq %mm4,%mm5 punpcklbw %mm3,%mm4 movq %mm0,%mm1 punpckhbw %mm3,%mm5 psllw $2,%mm4 punpcklbw %mm2,%mm0 psllw $2,%mm5 por %mm4,%mm0 punpckhbw %mm2,%mm1 movq %mm0,%mm3 por %mm5,%mm1 punpcklwd %mm1,%mm0 movntq %mm0,(%edi) punpckhwd %mm1,%mm3 movntq %mm3,8(%edi) addl $16,%edi subl $8,%ecx jne .L113 addl %eax,%esi addl %ebx,%edi decl %edx jne .L114 emms popl %ebx popl %esi popl %edi ret .text .align 16 .globl sse_yuv420_bgr5551 sse_yuv420_bgr5551: pushl %ebx pushl %ebp pushl %esi pushl %edi movl %esp,%ecx leal -48(%esp),%esp andl $-8,%esp t191 = 0 t192 = 8 t193 = 16 t186 = 24 t187 = 28 t188 = 32 t189 = 36 t190 = 40 t194 = 44 movl 0+16+20(%ecx),%ebx movl %ebx,t189(%esp) shrl $1,%ebx movl 0+16+36(%ecx),%eax subl %ebx,%eax movl %eax,t188(%esp) movl 0+16+32(%ecx),%eax addl %ebx,%ebx movl 0+16+4(%ecx),%edi movl %eax,%ebp movl 0+16+28(%ecx),%esi subl %ebx,%eax movl %eax,t186(%esp) addl %ebx,%ebx movl %esi,%edx movl 0+16+24(%ecx),%eax subl %ebx,%esi movl 0+16+16(%ecx),%ebx movl %esi,t187(%esp) movl 0+16+8(%ecx),%esi movl %eax,t190(%esp) movl 0+16+12(%ecx),%eax movl %ecx,t194(%esp) .align 16 .L116: movl t189(%esp),%ecx .L115: movq .L27,%mm7 movq .L4,%mm3 pxor %mm1,%mm1 movd (%eax),%mm0 addl $4,%eax punpcklbw %mm1,%mm0 movd (%ebx),%mm2 addl $4,%ebx psubw %mm3,%mm0 punpcklbw %mm1,%mm2 movq (%esi),%mm4 psubw %mm3,%mm2 movq %mm4,%mm5 psrlw $3,%mm3 pand .L3,%mm4 psrlw $8,%mm5 psubw %mm3,%mm4 psubw %mm3,%mm5 psllw $3,%mm0 movq %mm0,%mm6 pmulhw .L6,%mm6 psllw $2,%mm2 movq %mm2,%mm1 pmulhw .L9,%mm1 psllw $2,%mm4 pmulhw .L7,%mm0 psllw $2,%mm5 pmulhw .L8,%mm2 paddw %mm1,%mm6 pmulhw .L5,%mm4 movq %mm0,t192(%esp) pmulhw .L5,%mm5 movq %mm2,t191(%esp) movq %mm0,%mm1 movq %mm6,t193(%esp) movq %mm2,%mm3 prefetchnta (%esi) paddw %mm4,%mm0 paddw %mm5,%mm1 paddw %mm4,%mm2 packuswb %mm1,%mm0 paddw %mm5,%mm3 psubw %mm6,%mm4 packuswb %mm3,%mm2 psubw %mm6,%mm5 packuswb %mm5,%mm4 pand %mm7,%mm0 pand %mm7,%mm2 psrlq $3,%mm0 pand %mm7,%mm4 pxor %mm3,%mm3 psrlq $1,%mm2 movq %mm4,%mm5 punpcklbw %mm3,%mm4 movq %mm0,%mm1 punpckhbw %mm3,%mm5 psllw $2,%mm4 punpcklbw %mm2,%mm0 psllw $2,%mm5 por %mm4,%mm0 punpckhbw %mm2,%mm1 movq %mm0,%mm3 por %mm5,%mm1 punpcklwd %mm1,%mm0 movntq %mm0,(%edi) punpckhwd %mm1,%mm3 movntq %mm3,8(%edi) movq (%esi,%ebp),%mm4 addl $8,%esi movq .L12,%mm3 movq %mm4,%mm5 pand .L3,%mm4 psrlw $8,%mm5 psubw %mm3,%mm4 psubw %mm3,%mm5 movq t192(%esp),%mm0 psllw $2,%mm4 movq t191(%esp),%mm2 psllw $2,%mm5 pmulhw .L5,%mm4 movq %mm0,%mm1 pmulhw .L5,%mm5 movq %mm2,%mm3 prefetchnta (%esi) paddw %mm4,%mm0 paddw %mm5,%mm1 paddw %mm4,%mm2 packuswb %mm1,%mm0 paddw %mm5,%mm3 psubw t193(%esp),%mm4 packuswb %mm3,%mm2 psubw t193(%esp),%mm5 packuswb %mm5,%mm4 pand %mm7,%mm0 pand %mm7,%mm2 psrlq $3,%mm0 pand %mm7,%mm4 pxor %mm3,%mm3 psrlq $1,%mm2 movq %mm4,%mm5 punpcklbw %mm3,%mm4 movq %mm0,%mm1 punpckhbw %mm3,%mm5 psllw $2,%mm4 punpcklbw %mm2,%mm0 psllw $2,%mm5 por %mm4,%mm0 punpckhbw %mm2,%mm1 movq %mm0,%mm3 por %mm5,%mm1 punpcklwd %mm1,%mm0 movntq %mm0,(%edi,%edx) punpckhwd %mm1,%mm3 movntq %mm3,8(%edi,%edx) addl $16,%edi subl $8,%ecx jne .L115 addl t186(%esp),%esi addl %ebp,%esi movl t188(%esp),%ecx addl %ecx,%eax addl t187(%esp),%edi addl %edx,%edi addl %ecx,%ebx subl $2,t190(%esp) jne .L116 movl t194(%esp),%esp emms popl %edi popl %esi popl %ebp popl %ebx ret .text .align 16 .globl _3dn_yuyv_rgb32 _3dn_yuyv_rgb32: pushl %edi pushl %esi pushl %ebx movl 0+12+12(%esp),%ecx movl 0+12+24(%esp),%eax addl %ecx,%ecx movl 0+12+20(%esp),%ebx subl %ecx,%eax movl 0+12+12(%esp),%ecx shll $2,%ecx movl 0+12+16(%esp),%edx subl %ecx,%ebx movl 0+12+8(%esp),%esi movl 0+12+4(%esp),%edi .align 16 .L118: movl 0+12+12(%esp),%ecx .L117: pxor %mm7,%mm7 movq (%esi),%mm4 movq %mm4,%mm6 movq 8(%esi),%mm5 punpcklwd %mm5,%mm4 addl $16,%esi punpckhwd %mm5,%mm6 movq %mm4,%mm5 punpcklwd %mm6,%mm4 movq %mm4,%mm0 punpckhwd %mm6,%mm5 movq .L3,%mm1 movq %mm5,%mm2 movq .L4,%mm3 psrlw $8,%mm0 pand %mm1,%mm4 psubw %mm3,%mm0 psrlw $8,%mm2 pand %mm1,%mm5 prefetchw (%edi) psubw %mm3,%mm2 psrlw $3,%mm3 psubw %mm3,%mm4 psubw %mm3,%mm5 psllw $3,%mm0 movq %mm0,%mm6 pmulhrw .L6,%mm6 psllw $2,%mm2 movq %mm2,%mm1 pmulhrw .L9,%mm1 psllw $2,%mm4 pmulhrw .L7,%mm0 psllw $2,%mm5 pmulhrw .L8,%mm2 paddw %mm1,%mm6 pmulhrw .L5,%mm4 movq %mm0,%mm1 pmulhrw .L5,%mm5 prefetch (%esi) paddw %mm4,%mm0 paddw %mm5,%mm1 packuswb %mm0,%mm0 movq %mm2,%mm3 packuswb %mm1,%mm1 paddw %mm4,%mm2 punpcklbw %mm1,%mm0 paddw %mm5,%mm3 psubw %mm6,%mm4 packuswb %mm2,%mm2 packuswb %mm3,%mm3 packuswb %mm4,%mm4 psubw %mm6,%mm5 punpcklbw %mm3,%mm2 packuswb %mm5,%mm5 punpcklbw %mm5,%mm4 movq %mm2,%mm1 punpcklbw %mm4,%mm2 movq %mm0,%mm3 punpcklbw %mm7,%mm0 movq %mm2,%mm5 punpcklwd %mm0,%mm2 punpckhwd %mm0,%mm5 movq %mm2,(%edi) punpckhbw %mm4,%mm1 movq %mm5,8(%edi) punpckhbw %mm7,%mm3 movq %mm1,%mm5 punpcklwd %mm3,%mm1 movq %mm1,16(%edi) punpckhwd %mm3,%mm5 movq %mm5,24(%edi) addl $32,%edi subl $8,%ecx jne .L117 addl %eax,%esi addl %ebx,%edi decl %edx jne .L118 femms popl %ebx popl %esi popl %edi ret .text .align 16 .globl _3dn_yuv420_rgb32 _3dn_yuv420_rgb32: pushl %ebx pushl %ebp pushl %esi pushl %edi movl %esp,%ecx leal -48(%esp),%esp andl $-8,%esp t200 = 0 t201 = 8 t202 = 16 t195 = 24 t196 = 28 t197 = 32 t198 = 36 t199 = 40 t203 = 44 movl 0+16+20(%ecx),%ebx movl %ebx,t198(%esp) shrl $1,%ebx movl 0+16+36(%ecx),%eax subl %ebx,%eax movl %eax,t197(%esp) movl 0+16+32(%ecx),%eax addl %ebx,%ebx movl 0+16+4(%ecx),%edi movl %eax,%ebp movl 0+16+28(%ecx),%esi subl %ebx,%eax movl %eax,t195(%esp) shll $2,%ebx movl %esi,%edx movl 0+16+24(%ecx),%eax subl %ebx,%esi movl 0+16+16(%ecx),%ebx movl %esi,t196(%esp) movl 0+16+8(%ecx),%esi movl %eax,t199(%esp) movl 0+16+12(%ecx),%eax movl %ecx,t203(%esp) .align 16 .L120: movl t198(%esp),%ecx .L119: pxor %mm7,%mm7 movq .L4,%mm3 pxor %mm1,%mm1 movd (%eax),%mm0 addl $4,%eax punpcklbw %mm1,%mm0 movd (%ebx),%mm2 addl $4,%ebx psubw %mm3,%mm0 punpcklbw %mm1,%mm2 movq (%esi),%mm4 psubw %mm3,%mm2 movq %mm4,%mm5 psrlw $3,%mm3 pand .L3,%mm4 psrlw $8,%mm5 psubw %mm3,%mm4 psubw %mm3,%mm5 prefetchw (%edi) psllw $3,%mm0 movq %mm0,%mm6 pmulhrw .L6,%mm6 psllw $2,%mm2 movq %mm2,%mm1 pmulhrw .L9,%mm1 psllw $2,%mm4 pmulhrw .L7,%mm0 psllw $2,%mm5 pmulhrw .L8,%mm2 paddw %mm1,%mm6 pmulhrw .L5,%mm4 movq %mm0,t201(%esp) pmulhrw .L5,%mm5 movq %mm2,t200(%esp) movq %mm0,%mm1 movq %mm6,t202(%esp) prefetch (%esi) paddw %mm4,%mm0 paddw %mm5,%mm1 packuswb %mm0,%mm0 movq %mm2,%mm3 packuswb %mm1,%mm1 paddw %mm4,%mm2 punpcklbw %mm1,%mm0 paddw %mm5,%mm3 psubw %mm6,%mm4 packuswb %mm2,%mm2 packuswb %mm3,%mm3 packuswb %mm4,%mm4 psubw %mm6,%mm5 punpcklbw %mm3,%mm2 packuswb %mm5,%mm5 punpcklbw %mm5,%mm4 movq %mm2,%mm1 punpcklbw %mm4,%mm2 movq %mm0,%mm3 punpcklbw %mm7,%mm0 movq %mm2,%mm5 punpcklwd %mm0,%mm2 punpckhwd %mm0,%mm5 movq %mm2,(%edi) punpckhbw %mm4,%mm1 movq %mm5,8(%edi) punpckhbw %mm7,%mm3 movq %mm1,%mm5 punpcklwd %mm3,%mm1 movq %mm1,16(%edi) punpckhwd %mm3,%mm5 movq %mm5,24(%edi) movq (%esi,%ebp),%mm4 addl $8,%esi movq .L12,%mm3 movq %mm4,%mm5 pand .L3,%mm4 psrlw $8,%mm5 psubw %mm3,%mm4 psubw %mm3,%mm5 prefetchw (%edi) movq t201(%esp),%mm0 psllw $2,%mm4 movq t200(%esp),%mm2 psllw $2,%mm5 pmulhrw .L5,%mm4 movq %mm0,%mm1 pmulhrw .L5,%mm5 prefetch (%esi) paddw %mm4,%mm0 paddw %mm5,%mm1 packuswb %mm0,%mm0 movq %mm2,%mm3 packuswb %mm1,%mm1 paddw %mm4,%mm2 punpcklbw %mm1,%mm0 paddw %mm5,%mm3 psubw t202(%esp),%mm4 packuswb %mm2,%mm2 packuswb %mm3,%mm3 packuswb %mm4,%mm4 psubw t202(%esp),%mm5 punpcklbw %mm3,%mm2 packuswb %mm5,%mm5 punpcklbw %mm5,%mm4 movq %mm2,%mm1 punpcklbw %mm4,%mm2 movq %mm0,%mm3 punpcklbw %mm7,%mm0 movq %mm2,%mm5 punpcklwd %mm0,%mm2 punpckhwd %mm0,%mm5 movq %mm2,(%edi,%edx) punpckhbw %mm4,%mm1 movq %mm5,8(%edi,%edx) punpckhbw %mm7,%mm3 movq %mm1,%mm5 punpcklwd %mm3,%mm1 movq %mm1,16(%edi,%edx) punpckhwd %mm3,%mm5 movq %mm5,24(%edi,%edx) addl $32,%edi subl $8,%ecx jne .L119 addl t195(%esp),%esi addl %ebp,%esi movl t197(%esp),%ecx addl %ecx,%eax addl t196(%esp),%edi addl %edx,%edi addl %ecx,%ebx subl $2,t199(%esp) jne .L120 movl t203(%esp),%esp femms popl %edi popl %esi popl %ebp popl %ebx ret .text .align 16 .globl _3dn_yuyv_bgr32 _3dn_yuyv_bgr32: pushl %edi pushl %esi pushl %ebx movl 0+12+12(%esp),%ecx movl 0+12+24(%esp),%eax addl %ecx,%ecx movl 0+12+20(%esp),%ebx subl %ecx,%eax movl 0+12+12(%esp),%ecx shll $2,%ecx movl 0+12+16(%esp),%edx subl %ecx,%ebx movl 0+12+8(%esp),%esi movl 0+12+4(%esp),%edi .align 16 .L122: movl 0+12+12(%esp),%ecx .L121: pxor %mm7,%mm7 movq (%esi),%mm4 movq %mm4,%mm6 movq 8(%esi),%mm5 punpcklwd %mm5,%mm4 addl $16,%esi punpckhwd %mm5,%mm6 movq %mm4,%mm5 punpcklwd %mm6,%mm4 movq %mm4,%mm0 punpckhwd %mm6,%mm5 movq .L3,%mm1 movq %mm5,%mm2 movq .L4,%mm3 psrlw $8,%mm0 pand %mm1,%mm4 psubw %mm3,%mm0 psrlw $8,%mm2 pand %mm1,%mm5 prefetchw (%edi) psubw %mm3,%mm2 psrlw $3,%mm3 psubw %mm3,%mm4 psubw %mm3,%mm5 psllw $3,%mm0 movq %mm0,%mm6 pmulhrw .L6,%mm6 psllw $2,%mm2 movq %mm2,%mm1 pmulhrw .L9,%mm1 psllw $2,%mm4 pmulhrw .L7,%mm0 psllw $2,%mm5 pmulhrw .L8,%mm2 paddw %mm1,%mm6 pmulhrw .L5,%mm4 movq %mm0,%mm1 pmulhrw .L5,%mm5 prefetch (%esi) paddw %mm4,%mm0 paddw %mm5,%mm1 packuswb %mm0,%mm0 movq %mm2,%mm3 packuswb %mm1,%mm1 paddw %mm4,%mm2 punpcklbw %mm1,%mm0 paddw %mm5,%mm3 psubw %mm6,%mm4 packuswb %mm2,%mm2 packuswb %mm3,%mm3 packuswb %mm4,%mm4 psubw %mm6,%mm5 punpcklbw %mm3,%mm2 packuswb %mm5,%mm5 punpcklbw %mm5,%mm4 movq %mm0,%mm1 punpcklbw %mm4,%mm0 movq %mm2,%mm3 punpcklbw %mm7,%mm2 movq %mm0,%mm5 punpcklwd %mm2,%mm0 punpckhwd %mm2,%mm5 movq %mm0,(%edi) punpckhbw %mm4,%mm1 movq %mm5,8(%edi) punpckhbw %mm7,%mm3 movq %mm1,%mm5 punpcklwd %mm3,%mm1 movq %mm1,16(%edi) punpckhwd %mm3,%mm5 movq %mm5,24(%edi) addl $32,%edi subl $8,%ecx jne .L121 addl %eax,%esi addl %ebx,%edi decl %edx jne .L122 femms popl %ebx popl %esi popl %edi ret .text .align 16 .globl _3dn_yuv420_bgr32 _3dn_yuv420_bgr32: pushl %ebx pushl %ebp pushl %esi pushl %edi movl %esp,%ecx leal -48(%esp),%esp andl $-8,%esp t209 = 0 t210 = 8 t211 = 16 t204 = 24 t205 = 28 t206 = 32 t207 = 36 t208 = 40 t212 = 44 movl 0+16+20(%ecx),%ebx movl %ebx,t207(%esp) shrl $1,%ebx movl 0+16+36(%ecx),%eax subl %ebx,%eax movl %eax,t206(%esp) movl 0+16+32(%ecx),%eax addl %ebx,%ebx movl 0+16+4(%ecx),%edi movl %eax,%ebp movl 0+16+28(%ecx),%esi subl %ebx,%eax movl %eax,t204(%esp) shll $2,%ebx movl %esi,%edx movl 0+16+24(%ecx),%eax subl %ebx,%esi movl 0+16+16(%ecx),%ebx movl %esi,t205(%esp) movl 0+16+8(%ecx),%esi movl %eax,t208(%esp) movl 0+16+12(%ecx),%eax movl %ecx,t212(%esp) .align 16 .L124: movl t207(%esp),%ecx .L123: pxor %mm7,%mm7 movq .L4,%mm3 pxor %mm1,%mm1 movd (%eax),%mm0 addl $4,%eax punpcklbw %mm1,%mm0 movd (%ebx),%mm2 addl $4,%ebx psubw %mm3,%mm0 punpcklbw %mm1,%mm2 movq (%esi),%mm4 psubw %mm3,%mm2 movq %mm4,%mm5 psrlw $3,%mm3 pand .L3,%mm4 psrlw $8,%mm5 psubw %mm3,%mm4 psubw %mm3,%mm5 prefetchw (%edi) psllw $3,%mm0 movq %mm0,%mm6 pmulhrw .L6,%mm6 psllw $2,%mm2 movq %mm2,%mm1 pmulhrw .L9,%mm1 psllw $2,%mm4 pmulhrw .L7,%mm0 psllw $2,%mm5 pmulhrw .L8,%mm2 paddw %mm1,%mm6 pmulhrw .L5,%mm4 movq %mm0,t210(%esp) pmulhrw .L5,%mm5 movq %mm2,t209(%esp) movq %mm0,%mm1 movq %mm6,t211(%esp) prefetch (%esi) paddw %mm4,%mm0 paddw %mm5,%mm1 packuswb %mm0,%mm0 movq %mm2,%mm3 packuswb %mm1,%mm1 paddw %mm4,%mm2 punpcklbw %mm1,%mm0 paddw %mm5,%mm3 psubw %mm6,%mm4 packuswb %mm2,%mm2 packuswb %mm3,%mm3 packuswb %mm4,%mm4 psubw %mm6,%mm5 punpcklbw %mm3,%mm2 packuswb %mm5,%mm5 punpcklbw %mm5,%mm4 movq %mm0,%mm1 punpcklbw %mm4,%mm0 movq %mm2,%mm3 punpcklbw %mm7,%mm2 movq %mm0,%mm5 punpcklwd %mm2,%mm0 punpckhwd %mm2,%mm5 movq %mm0,(%edi) punpckhbw %mm4,%mm1 movq %mm5,8(%edi) punpckhbw %mm7,%mm3 movq %mm1,%mm5 punpcklwd %mm3,%mm1 movq %mm1,16(%edi) punpckhwd %mm3,%mm5 movq %mm5,24(%edi) movq (%esi,%ebp),%mm4 addl $8,%esi movq .L12,%mm3 movq %mm4,%mm5 pand .L3,%mm4 psrlw $8,%mm5 psubw %mm3,%mm4 psubw %mm3,%mm5 prefetchw (%edi) movq t210(%esp),%mm0 psllw $2,%mm4 movq t209(%esp),%mm2 psllw $2,%mm5 pmulhrw .L5,%mm4 movq %mm0,%mm1 pmulhrw .L5,%mm5 prefetch (%esi) paddw %mm4,%mm0 paddw %mm5,%mm1 packuswb %mm0,%mm0 movq %mm2,%mm3 packuswb %mm1,%mm1 paddw %mm4,%mm2 punpcklbw %mm1,%mm0 paddw %mm5,%mm3 psubw t211(%esp),%mm4 packuswb %mm2,%mm2 packuswb %mm3,%mm3 packuswb %mm4,%mm4 psubw t211(%esp),%mm5 punpcklbw %mm3,%mm2 packuswb %mm5,%mm5 punpcklbw %mm5,%mm4 movq %mm0,%mm1 punpcklbw %mm4,%mm0 movq %mm2,%mm3 punpcklbw %mm7,%mm2 movq %mm0,%mm5 punpcklwd %mm2,%mm0 punpckhwd %mm2,%mm5 movq %mm0,(%edi,%edx) punpckhbw %mm4,%mm1 movq %mm5,8(%edi,%edx) punpckhbw %mm7,%mm3 movq %mm1,%mm5 punpcklwd %mm3,%mm1 movq %mm1,16(%edi,%edx) punpckhwd %mm3,%mm5 movq %mm5,24(%edi,%edx) addl $32,%edi subl $8,%ecx jne .L123 addl t204(%esp),%esi addl %ebp,%esi movl t206(%esp),%ecx addl %ecx,%eax addl t205(%esp),%edi addl %edx,%edi addl %ecx,%ebx subl $2,t208(%esp) jne .L124 movl t212(%esp),%esp femms popl %edi popl %esi popl %ebp popl %ebx ret .text .align 16 .globl _3dn_yuyv_rgb24 _3dn_yuyv_rgb24: pushl %edi pushl %esi pushl %ebx movl 0+12+12(%esp),%ecx movl 0+12+24(%esp),%eax addl %ecx,%ecx movl 0+12+20(%esp),%ebx subl %ecx,%eax movl 0+12+12(%esp),%ecx leal (%ecx,%ecx,2),%ecx movl 0+12+16(%esp),%edx subl %ecx,%ebx movl 0+12+8(%esp),%esi movl 0+12+4(%esp),%edi .align 16 .L126: movl 0+12+12(%esp),%ecx .L125: movq (%esi),%mm4 movq %mm4,%mm6 movq 8(%esi),%mm5 punpcklwd %mm5,%mm4 addl $16,%esi punpckhwd %mm5,%mm6 movq %mm4,%mm5 punpcklwd %mm6,%mm4 movq %mm4,%mm0 punpckhwd %mm6,%mm5 movq .L3,%mm1 movq %mm5,%mm2 movq .L4,%mm3 psrlw $8,%mm0 pand %mm1,%mm4 psubw %mm3,%mm0 psrlw $8,%mm2 pand %mm1,%mm5 prefetchw (%edi) psubw %mm3,%mm2 psrlw $3,%mm3 psubw %mm3,%mm4 psubw %mm3,%mm5 psllw $3,%mm0 movq %mm0,%mm6 pmulhrw .L6,%mm6 psllw $2,%mm2 movq %mm2,%mm1 pmulhrw .L9,%mm1 psllw $2,%mm4 pmulhrw .L7,%mm0 psllw $2,%mm5 pmulhrw .L8,%mm2 paddw %mm1,%mm6 pmulhrw .L5,%mm4 movq %mm0,%mm1 pmulhrw .L5,%mm5 movq %mm2,%mm3 prefetch (%esi) paddw %mm4,%mm0 paddw %mm5,%mm1 paddw %mm4,%mm2 packuswb %mm1,%mm0 paddw %mm5,%mm3 psubw %mm6,%mm4 packuswb %mm3,%mm2 psubw %mm6,%mm5 packuswb %mm5,%mm4 movq %mm2,%mm1 punpcklbw %mm4,%mm2 psrlq $32,%mm1 punpckhbw %mm0,%mm4 punpcklbw %mm1,%mm0 movq %mm2,%mm1 punpcklwd %mm0,%mm2 psrlq $32,%mm1 punpckhwd %mm4,%mm0 psllq $32,%mm4 movq %mm0,%mm3 punpcklwd %mm1,%mm0 movq %mm2,%mm5 punpckhwd %mm4,%mm2 movq %mm0,%mm4 psllq $32,%mm5 punpcklwd %mm2,%mm4 movq %mm4,%mm1 psrlq $32,%mm4 punpcklwd %mm1,%mm4 punpckhdq %mm4,%mm5 movq %mm5,(%edi) psllq $32,%mm4 punpckhdq %mm4,%mm2 movq %mm2,8(%edi) punpckhdq %mm3,%mm0 movq %mm0,16(%edi) addl $24,%edi subl $8,%ecx jne .L125 addl %eax,%esi addl %ebx,%edi decl %edx jne .L126 femms popl %ebx popl %esi popl %edi ret .text .align 16 .globl _3dn_yuv420_rgb24 _3dn_yuv420_rgb24: pushl %ebx pushl %ebp pushl %esi pushl %edi movl %esp,%ecx leal -40(%esp),%esp andl $-8,%esp t218 = 0 t219 = 8 t213 = 16 t214 = 20 t215 = 24 t216 = 28 t217 = 32 t220 = 36 movl 0+16+20(%ecx),%ebx movl %ebx,t216(%esp) shrl $1,%ebx movl 0+16+36(%ecx),%eax subl %ebx,%eax movl %eax,t215(%esp) movl 0+16+32(%ecx),%eax addl %ebx,%ebx movl 0+16+4(%ecx),%edi movl %eax,%ebp movl 0+16+28(%ecx),%esi subl %ebx,%eax movl %eax,t213(%esp) leal (%ebx,%ebx,2),%ebx movl %esi,%edx movl 0+16+24(%ecx),%eax subl %ebx,%esi movl 0+16+16(%ecx),%ebx movl %esi,t214(%esp) movl 0+16+8(%ecx),%esi movl %eax,t217(%esp) movl 0+16+12(%ecx),%eax movl %ecx,t220(%esp) .align 16 .L128: movl t216(%esp),%ecx .L127: movq .L4,%mm3 pxor %mm1,%mm1 movd (%eax),%mm0 addl $4,%eax punpcklbw %mm1,%mm0 movd (%ebx),%mm2 addl $4,%ebx psubw %mm3,%mm0 punpcklbw %mm1,%mm2 movq (%esi),%mm4 psubw %mm3,%mm2 movq %mm4,%mm5 psrlw $3,%mm3 pand .L3,%mm4 psrlw $8,%mm5 psubw %mm3,%mm4 psubw %mm3,%mm5 prefetchw (%edi) psllw $3,%mm0 movq %mm0,%mm6 pmulhrw .L6,%mm6 psllw $2,%mm2 movq %mm2,%mm1 pmulhrw .L9,%mm1 psllw $2,%mm4 pmulhrw .L7,%mm0 psllw $2,%mm5 pmulhrw .L8,%mm2 paddw %mm1,%mm6 pmulhrw .L5,%mm4 movq %mm0,%mm7 pmulhrw .L5,%mm5 movq %mm2,t218(%esp) movq %mm0,%mm1 movq %mm6,t219(%esp) movq %mm2,%mm3 prefetch (%esi) paddw %mm4,%mm0 paddw %mm5,%mm1 paddw %mm4,%mm2 packuswb %mm1,%mm0 paddw %mm5,%mm3 psubw %mm6,%mm4 packuswb %mm3,%mm2 psubw %mm6,%mm5 packuswb %mm5,%mm4 movq %mm2,%mm1 punpcklbw %mm4,%mm2 psrlq $32,%mm1 punpckhbw %mm0,%mm4 punpcklbw %mm1,%mm0 movq %mm2,%mm1 punpcklwd %mm0,%mm2 psrlq $32,%mm1 punpckhwd %mm4,%mm0 psllq $32,%mm4 movq %mm0,%mm3 punpcklwd %mm1,%mm0 movq %mm2,%mm5 punpckhwd %mm4,%mm2 movq %mm0,%mm4 psllq $32,%mm5 punpcklwd %mm2,%mm4 movq %mm4,%mm1 psrlq $32,%mm4 punpcklwd %mm1,%mm4 punpckhdq %mm4,%mm5 movq %mm5,(%edi) psllq $32,%mm4 punpckhdq %mm4,%mm2 movq %mm2,8(%edi) punpckhdq %mm3,%mm0 movq %mm0,16(%edi) movq (%esi,%ebp),%mm4 addl $8,%esi movq .L12,%mm3 movq %mm4,%mm5 pand .L3,%mm4 psrlw $8,%mm5 psubw %mm3,%mm4 psubw %mm3,%mm5 prefetchw (%edi) movq %mm7,%mm0 psllw $2,%mm4 movq t218(%esp),%mm2 psllw $2,%mm5 pmulhrw .L5,%mm4 movq %mm0,%mm1 pmulhrw .L5,%mm5 movq %mm2,%mm3 prefetch (%esi) paddw %mm4,%mm0 paddw %mm5,%mm1 paddw %mm4,%mm2 packuswb %mm1,%mm0 paddw %mm5,%mm3 psubw t219(%esp),%mm4 packuswb %mm3,%mm2 psubw t219(%esp),%mm5 packuswb %mm5,%mm4 movq %mm2,%mm1 punpcklbw %mm4,%mm2 psrlq $32,%mm1 punpckhbw %mm0,%mm4 punpcklbw %mm1,%mm0 movq %mm2,%mm1 punpcklwd %mm0,%mm2 psrlq $32,%mm1 punpckhwd %mm4,%mm0 psllq $32,%mm4 movq %mm0,%mm3 punpcklwd %mm1,%mm0 movq %mm2,%mm5 punpckhwd %mm4,%mm2 movq %mm0,%mm4 psllq $32,%mm5 punpcklwd %mm2,%mm4 movq %mm4,%mm1 psrlq $32,%mm4 punpcklwd %mm1,%mm4 punpckhdq %mm4,%mm5 movq %mm5,(%edi,%edx) psllq $32,%mm4 punpckhdq %mm4,%mm2 movq %mm2,8(%edi,%edx) punpckhdq %mm3,%mm0 movq %mm0,16(%edi,%edx) addl $24,%edi subl $8,%ecx jne .L127 addl t213(%esp),%esi addl %ebp,%esi movl t215(%esp),%ecx addl %ecx,%eax addl t214(%esp),%edi addl %edx,%edi addl %ecx,%ebx subl $2,t217(%esp) jne .L128 movl t220(%esp),%esp femms popl %edi popl %esi popl %ebp popl %ebx ret .text .align 16 .globl _3dn_yuyv_bgr24 _3dn_yuyv_bgr24: pushl %edi pushl %esi pushl %ebx movl 0+12+12(%esp),%ecx movl 0+12+24(%esp),%eax addl %ecx,%ecx movl 0+12+20(%esp),%ebx subl %ecx,%eax movl 0+12+12(%esp),%ecx leal (%ecx,%ecx,2),%ecx movl 0+12+16(%esp),%edx subl %ecx,%ebx movl 0+12+8(%esp),%esi movl 0+12+4(%esp),%edi .align 16 .L130: movl 0+12+12(%esp),%ecx .L129: movq (%esi),%mm4 movq %mm4,%mm6 movq 8(%esi),%mm5 punpcklwd %mm5,%mm4 addl $16,%esi punpckhwd %mm5,%mm6 movq %mm4,%mm5 punpcklwd %mm6,%mm4 movq %mm4,%mm0 punpckhwd %mm6,%mm5 movq .L3,%mm1 movq %mm5,%mm2 movq .L4,%mm3 psrlw $8,%mm0 pand %mm1,%mm4 psubw %mm3,%mm0 psrlw $8,%mm2 pand %mm1,%mm5 prefetchw (%edi) psubw %mm3,%mm2 psrlw $3,%mm3 psubw %mm3,%mm4 psubw %mm3,%mm5 psllw $3,%mm0 movq %mm0,%mm6 pmulhrw .L6,%mm6 psllw $2,%mm2 movq %mm2,%mm1 pmulhrw .L9,%mm1 psllw $2,%mm4 pmulhrw .L7,%mm0 psllw $2,%mm5 pmulhrw .L8,%mm2 paddw %mm1,%mm6 pmulhrw .L5,%mm4 movq %mm0,%mm1 pmulhrw .L5,%mm5 movq %mm2,%mm3 prefetch (%esi) paddw %mm4,%mm0 paddw %mm5,%mm1 paddw %mm4,%mm2 packuswb %mm1,%mm0 paddw %mm5,%mm3 psubw %mm6,%mm4 packuswb %mm3,%mm2 psubw %mm6,%mm5 packuswb %mm5,%mm4 movq %mm0,%mm1 punpcklbw %mm4,%mm0 psrlq $32,%mm1 punpckhbw %mm2,%mm4 punpcklbw %mm1,%mm2 movq %mm0,%mm1 punpcklwd %mm2,%mm0 psrlq $32,%mm1 punpckhwd %mm4,%mm2 psllq $32,%mm4 movq %mm2,%mm3 punpcklwd %mm1,%mm2 movq %mm0,%mm5 punpckhwd %mm4,%mm0 movq %mm2,%mm4 psllq $32,%mm5 punpcklwd %mm0,%mm4 movq %mm4,%mm1 psrlq $32,%mm4 punpcklwd %mm1,%mm4 punpckhdq %mm4,%mm5 movq %mm5,(%edi) psllq $32,%mm4 punpckhdq %mm4,%mm0 movq %mm0,8(%edi) punpckhdq %mm3,%mm2 movq %mm2,16(%edi) addl $24,%edi subl $8,%ecx jne .L129 addl %eax,%esi addl %ebx,%edi decl %edx jne .L130 femms popl %ebx popl %esi popl %edi ret .text .align 16 .globl _3dn_yuv420_bgr24 _3dn_yuv420_bgr24: pushl %ebx pushl %ebp pushl %esi pushl %edi movl %esp,%ecx leal -40(%esp),%esp andl $-8,%esp t226 = 0 t227 = 8 t221 = 16 t222 = 20 t223 = 24 t224 = 28 t225 = 32 t228 = 36 movl 0+16+20(%ecx),%ebx movl %ebx,t224(%esp) shrl $1,%ebx movl 0+16+36(%ecx),%eax subl %ebx,%eax movl %eax,t223(%esp) movl 0+16+32(%ecx),%eax addl %ebx,%ebx movl 0+16+4(%ecx),%edi movl %eax,%ebp movl 0+16+28(%ecx),%esi subl %ebx,%eax movl %eax,t221(%esp) leal (%ebx,%ebx,2),%ebx movl %esi,%edx movl 0+16+24(%ecx),%eax subl %ebx,%esi movl 0+16+16(%ecx),%ebx movl %esi,t222(%esp) movl 0+16+8(%ecx),%esi movl %eax,t225(%esp) movl 0+16+12(%ecx),%eax movl %ecx,t228(%esp) .align 16 .L132: movl t224(%esp),%ecx .L131: movq .L4,%mm3 pxor %mm1,%mm1 movd (%eax),%mm0 addl $4,%eax punpcklbw %mm1,%mm0 movd (%ebx),%mm2 addl $4,%ebx psubw %mm3,%mm0 punpcklbw %mm1,%mm2 movq (%esi),%mm4 psubw %mm3,%mm2 movq %mm4,%mm5 psrlw $3,%mm3 pand .L3,%mm4 psrlw $8,%mm5 psubw %mm3,%mm4 psubw %mm3,%mm5 prefetchw (%edi) psllw $3,%mm0 movq %mm0,%mm6 pmulhrw .L6,%mm6 psllw $2,%mm2 movq %mm2,%mm1 pmulhrw .L9,%mm1 psllw $2,%mm4 pmulhrw .L7,%mm0 psllw $2,%mm5 pmulhrw .L8,%mm2 paddw %mm1,%mm6 pmulhrw .L5,%mm4 movq %mm0,%mm7 pmulhrw .L5,%mm5 movq %mm2,t226(%esp) movq %mm0,%mm1 movq %mm6,t227(%esp) movq %mm2,%mm3 prefetch (%esi) paddw %mm4,%mm0 paddw %mm5,%mm1 paddw %mm4,%mm2 packuswb %mm1,%mm0 paddw %mm5,%mm3 psubw %mm6,%mm4 packuswb %mm3,%mm2 psubw %mm6,%mm5 packuswb %mm5,%mm4 movq %mm0,%mm1 punpcklbw %mm4,%mm0 psrlq $32,%mm1 punpckhbw %mm2,%mm4 punpcklbw %mm1,%mm2 movq %mm0,%mm1 punpcklwd %mm2,%mm0 psrlq $32,%mm1 punpckhwd %mm4,%mm2 psllq $32,%mm4 movq %mm2,%mm3 punpcklwd %mm1,%mm2 movq %mm0,%mm5 punpckhwd %mm4,%mm0 movq %mm2,%mm4 psllq $32,%mm5 punpcklwd %mm0,%mm4 movq %mm4,%mm1 psrlq $32,%mm4 punpcklwd %mm1,%mm4 punpckhdq %mm4,%mm5 movq %mm5,(%edi) psllq $32,%mm4 punpckhdq %mm4,%mm0 movq %mm0,8(%edi) punpckhdq %mm3,%mm2 movq %mm2,16(%edi) movq (%esi,%ebp),%mm4 addl $8,%esi movq .L12,%mm3 movq %mm4,%mm5 pand .L3,%mm4 psrlw $8,%mm5 psubw %mm3,%mm4 psubw %mm3,%mm5 prefetchw (%edi) movq %mm7,%mm0 psllw $2,%mm4 movq t226(%esp),%mm2 psllw $2,%mm5 pmulhrw .L5,%mm4 movq %mm0,%mm1 pmulhrw .L5,%mm5 movq %mm2,%mm3 prefetch (%esi) paddw %mm4,%mm0 paddw %mm5,%mm1 paddw %mm4,%mm2 packuswb %mm1,%mm0 paddw %mm5,%mm3 psubw t227(%esp),%mm4 packuswb %mm3,%mm2 psubw t227(%esp),%mm5 packuswb %mm5,%mm4 movq %mm0,%mm1 punpcklbw %mm4,%mm0 psrlq $32,%mm1 punpckhbw %mm2,%mm4 punpcklbw %mm1,%mm2 movq %mm0,%mm1 punpcklwd %mm2,%mm0 psrlq $32,%mm1 punpckhwd %mm4,%mm2 psllq $32,%mm4 movq %mm2,%mm3 punpcklwd %mm1,%mm2 movq %mm0,%mm5 punpckhwd %mm4,%mm0 movq %mm2,%mm4 psllq $32,%mm5 punpcklwd %mm0,%mm4 movq %mm4,%mm1 psrlq $32,%mm4 punpcklwd %mm1,%mm4 punpckhdq %mm4,%mm5 movq %mm5,(%edi,%edx) psllq $32,%mm4 punpckhdq %mm4,%mm0 movq %mm0,8(%edi,%edx) punpckhdq %mm3,%mm2 movq %mm2,16(%edi,%edx) addl $24,%edi subl $8,%ecx jne .L131 addl t221(%esp),%esi addl %ebp,%esi movl t223(%esp),%ecx addl %ecx,%eax addl t222(%esp),%edi addl %edx,%edi addl %ecx,%ebx subl $2,t225(%esp) jne .L132 movl t228(%esp),%esp femms popl %edi popl %esi popl %ebp popl %ebx ret .text .align 16 .globl _3dn_yuyv_rgb565 _3dn_yuyv_rgb565: pushl %edi pushl %esi pushl %ebx movl 0+12+12(%esp),%ecx movl 0+12+24(%esp),%eax addl %ecx,%ecx movl 0+12+20(%esp),%ebx subl %ecx,%eax movl 0+12+12(%esp),%ecx addl %ecx,%ecx movl 0+12+16(%esp),%edx subl %ecx,%ebx movl 0+12+8(%esp),%esi movl 0+12+4(%esp),%edi .align 16 .L134: movl 0+12+12(%esp),%ecx .L133: movq .L27,%mm7 movq (%esi),%mm4 movq %mm4,%mm6 movq 8(%esi),%mm5 punpcklwd %mm5,%mm4 addl $16,%esi punpckhwd %mm5,%mm6 movq %mm4,%mm5 punpcklwd %mm6,%mm4 movq %mm4,%mm0 punpckhwd %mm6,%mm5 movq .L3,%mm1 movq %mm5,%mm2 movq .L4,%mm3 psrlw $8,%mm0 pand %mm1,%mm4 psubw %mm3,%mm0 psrlw $8,%mm2 pand %mm1,%mm5 prefetchw (%edi) psubw %mm3,%mm2 psrlw $3,%mm3 psubw %mm3,%mm4 psubw %mm3,%mm5 psllw $3,%mm0 movq %mm0,%mm6 pmulhrw .L6,%mm6 psllw $2,%mm2 movq %mm2,%mm1 pmulhrw .L9,%mm1 psllw $2,%mm4 pmulhrw .L7,%mm0 psllw $2,%mm5 pmulhrw .L8,%mm2 paddw %mm1,%mm6 pmulhrw .L5,%mm4 movq %mm0,%mm1 pmulhrw .L5,%mm5 movq %mm2,%mm3 prefetch (%esi) paddw %mm4,%mm0 paddw %mm5,%mm1 paddw %mm4,%mm2 packuswb %mm1,%mm0 paddw %mm5,%mm3 psubw %mm6,%mm4 packuswb %mm3,%mm2 psubw %mm6,%mm5 packuswb %mm5,%mm4 pand %mm7,%mm2 movq %mm4,%mm5 movq .L28,%mm3 pand %mm7,%mm0 psllq $3,%mm4 pand %mm3,%mm5 psrlq $3,%mm2 pand %mm3,%mm4 por %mm4,%mm2 psrlq $5,%mm5 movq %mm2,%mm3 por %mm5,%mm0 punpcklbw %mm0,%mm2 punpckhbw %mm0,%mm3 movq %mm2,%mm5 punpcklwd %mm3,%mm2 movq %mm2,(%edi) punpckhwd %mm3,%mm5 movq %mm5,8(%edi) addl $16,%edi subl $8,%ecx jne .L133 addl %eax,%esi addl %ebx,%edi decl %edx jne .L134 femms popl %ebx popl %esi popl %edi ret .text .align 16 .globl _3dn_yuv420_rgb565 _3dn_yuv420_rgb565: pushl %ebx pushl %ebp pushl %esi pushl %edi movl %esp,%ecx leal -48(%esp),%esp andl $-8,%esp t234 = 0 t235 = 8 t236 = 16 t229 = 24 t230 = 28 t231 = 32 t232 = 36 t233 = 40 t237 = 44 movl 0+16+20(%ecx),%ebx movl %ebx,t232(%esp) shrl $1,%ebx movl 0+16+36(%ecx),%eax subl %ebx,%eax movl %eax,t231(%esp) movl 0+16+32(%ecx),%eax addl %ebx,%ebx movl 0+16+4(%ecx),%edi movl %eax,%ebp movl 0+16+28(%ecx),%esi subl %ebx,%eax movl %eax,t229(%esp) addl %ebx,%ebx movl %esi,%edx movl 0+16+24(%ecx),%eax subl %ebx,%esi movl 0+16+16(%ecx),%ebx movl %esi,t230(%esp) movl 0+16+8(%ecx),%esi movl %eax,t233(%esp) movl 0+16+12(%ecx),%eax movl %ecx,t237(%esp) .align 16 .L136: movl t232(%esp),%ecx .L135: movq .L27,%mm7 movq .L4,%mm3 pxor %mm1,%mm1 movd (%eax),%mm0 addl $4,%eax punpcklbw %mm1,%mm0 movd (%ebx),%mm2 addl $4,%ebx psubw %mm3,%mm0 punpcklbw %mm1,%mm2 movq (%esi),%mm4 psubw %mm3,%mm2 movq %mm4,%mm5 psrlw $3,%mm3 pand .L3,%mm4 psrlw $8,%mm5 psubw %mm3,%mm4 psubw %mm3,%mm5 prefetchw (%edi) psllw $3,%mm0 movq %mm0,%mm6 pmulhrw .L6,%mm6 psllw $2,%mm2 movq %mm2,%mm1 pmulhrw .L9,%mm1 psllw $2,%mm4 pmulhrw .L7,%mm0 psllw $2,%mm5 pmulhrw .L8,%mm2 paddw %mm1,%mm6 pmulhrw .L5,%mm4 movq %mm0,t235(%esp) pmulhrw .L5,%mm5 movq %mm2,t234(%esp) movq %mm0,%mm1 movq %mm6,t236(%esp) movq %mm2,%mm3 prefetch (%esi) paddw %mm4,%mm0 paddw %mm5,%mm1 paddw %mm4,%mm2 packuswb %mm1,%mm0 paddw %mm5,%mm3 psubw %mm6,%mm4 packuswb %mm3,%mm2 psubw %mm6,%mm5 packuswb %mm5,%mm4 pand %mm7,%mm2 movq %mm4,%mm5 movq .L28,%mm3 pand %mm7,%mm0 psllq $3,%mm4 pand %mm3,%mm5 psrlq $3,%mm2 pand %mm3,%mm4 por %mm4,%mm2 psrlq $5,%mm5 movq %mm2,%mm3 por %mm5,%mm0 punpcklbw %mm0,%mm2 punpckhbw %mm0,%mm3 movq %mm2,%mm5 punpcklwd %mm3,%mm2 movq %mm2,(%edi) punpckhwd %mm3,%mm5 movq %mm5,8(%edi) movq (%esi,%ebp),%mm4 addl $8,%esi movq .L12,%mm3 movq %mm4,%mm5 pand .L3,%mm4 psrlw $8,%mm5 psubw %mm3,%mm4 psubw %mm3,%mm5 prefetchw (%edi) movq t235(%esp),%mm0 psllw $2,%mm4 movq t234(%esp),%mm2 psllw $2,%mm5 pmulhrw .L5,%mm4 movq %mm0,%mm1 pmulhrw .L5,%mm5 movq %mm2,%mm3 prefetch (%esi) paddw %mm4,%mm0 paddw %mm5,%mm1 paddw %mm4,%mm2 packuswb %mm1,%mm0 paddw %mm5,%mm3 psubw t236(%esp),%mm4 packuswb %mm3,%mm2 psubw t236(%esp),%mm5 packuswb %mm5,%mm4 pand %mm7,%mm2 movq %mm4,%mm5 movq .L28,%mm3 pand %mm7,%mm0 psllq $3,%mm4 pand %mm3,%mm5 psrlq $3,%mm2 pand %mm3,%mm4 por %mm4,%mm2 psrlq $5,%mm5 movq %mm2,%mm3 por %mm5,%mm0 punpcklbw %mm0,%mm2 punpckhbw %mm0,%mm3 movq %mm2,%mm5 punpcklwd %mm3,%mm2 movq %mm2,(%edi,%edx) punpckhwd %mm3,%mm5 movq %mm5,8(%edi,%edx) addl $16,%edi subl $8,%ecx jne .L135 addl t229(%esp),%esi addl %ebp,%esi movl t231(%esp),%ecx addl %ecx,%eax addl t230(%esp),%edi addl %edx,%edi addl %ecx,%ebx subl $2,t233(%esp) jne .L136 movl t237(%esp),%esp femms popl %edi popl %esi popl %ebp popl %ebx ret .text .align 16 .globl _3dn_yuyv_bgr565 _3dn_yuyv_bgr565: pushl %edi pushl %esi pushl %ebx movl 0+12+12(%esp),%ecx movl 0+12+24(%esp),%eax addl %ecx,%ecx movl 0+12+20(%esp),%ebx subl %ecx,%eax movl 0+12+12(%esp),%ecx addl %ecx,%ecx movl 0+12+16(%esp),%edx subl %ecx,%ebx movl 0+12+8(%esp),%esi movl 0+12+4(%esp),%edi .align 16 .L138: movl 0+12+12(%esp),%ecx .L137: movq .L27,%mm7 movq (%esi),%mm4 movq %mm4,%mm6 movq 8(%esi),%mm5 punpcklwd %mm5,%mm4 addl $16,%esi punpckhwd %mm5,%mm6 movq %mm4,%mm5 punpcklwd %mm6,%mm4 movq %mm4,%mm0 punpckhwd %mm6,%mm5 movq .L3,%mm1 movq %mm5,%mm2 movq .L4,%mm3 psrlw $8,%mm0 pand %mm1,%mm4 psubw %mm3,%mm0 psrlw $8,%mm2 pand %mm1,%mm5 prefetchw (%edi) psubw %mm3,%mm2 psrlw $3,%mm3 psubw %mm3,%mm4 psubw %mm3,%mm5 psllw $3,%mm0 movq %mm0,%mm6 pmulhrw .L6,%mm6 psllw $2,%mm2 movq %mm2,%mm1 pmulhrw .L9,%mm1 psllw $2,%mm4 pmulhrw .L7,%mm0 psllw $2,%mm5 pmulhrw .L8,%mm2 paddw %mm1,%mm6 pmulhrw .L5,%mm4 movq %mm0,%mm1 pmulhrw .L5,%mm5 movq %mm2,%mm3 prefetch (%esi) paddw %mm4,%mm0 paddw %mm5,%mm1 paddw %mm4,%mm2 packuswb %mm1,%mm0 paddw %mm5,%mm3 psubw %mm6,%mm4 packuswb %mm3,%mm2 psubw %mm6,%mm5 packuswb %mm5,%mm4 pand %mm7,%mm0 movq %mm4,%mm5 movq .L28,%mm3 pand %mm7,%mm2 psllq $3,%mm4 pand %mm3,%mm5 psrlq $3,%mm0 pand %mm3,%mm4 por %mm4,%mm0 psrlq $5,%mm5 movq %mm0,%mm3 por %mm5,%mm2 punpcklbw %mm2,%mm0 punpckhbw %mm2,%mm3 movq %mm0,%mm5 punpcklwd %mm3,%mm0 movq %mm0,(%edi) punpckhwd %mm3,%mm5 movq %mm5,8(%edi) addl $16,%edi subl $8,%ecx jne .L137 addl %eax,%esi addl %ebx,%edi decl %edx jne .L138 femms popl %ebx popl %esi popl %edi ret .text .align 16 .globl _3dn_yuv420_bgr565 _3dn_yuv420_bgr565: pushl %ebx pushl %ebp pushl %esi pushl %edi movl %esp,%ecx leal -48(%esp),%esp andl $-8,%esp t243 = 0 t244 = 8 t245 = 16 t238 = 24 t239 = 28 t240 = 32 t241 = 36 t242 = 40 t246 = 44 movl 0+16+20(%ecx),%ebx movl %ebx,t241(%esp) shrl $1,%ebx movl 0+16+36(%ecx),%eax subl %ebx,%eax movl %eax,t240(%esp) movl 0+16+32(%ecx),%eax addl %ebx,%ebx movl 0+16+4(%ecx),%edi movl %eax,%ebp movl 0+16+28(%ecx),%esi subl %ebx,%eax movl %eax,t238(%esp) addl %ebx,%ebx movl %esi,%edx movl 0+16+24(%ecx),%eax subl %ebx,%esi movl 0+16+16(%ecx),%ebx movl %esi,t239(%esp) movl 0+16+8(%ecx),%esi movl %eax,t242(%esp) movl 0+16+12(%ecx),%eax movl %ecx,t246(%esp) .align 16 .L140: movl t241(%esp),%ecx .L139: movq .L27,%mm7 movq .L4,%mm3 pxor %mm1,%mm1 movd (%eax),%mm0 addl $4,%eax punpcklbw %mm1,%mm0 movd (%ebx),%mm2 addl $4,%ebx psubw %mm3,%mm0 punpcklbw %mm1,%mm2 movq (%esi),%mm4 psubw %mm3,%mm2 movq %mm4,%mm5 psrlw $3,%mm3 pand .L3,%mm4 psrlw $8,%mm5 psubw %mm3,%mm4 psubw %mm3,%mm5 prefetchw (%edi) psllw $3,%mm0 movq %mm0,%mm6 pmulhrw .L6,%mm6 psllw $2,%mm2 movq %mm2,%mm1 pmulhrw .L9,%mm1 psllw $2,%mm4 pmulhrw .L7,%mm0 psllw $2,%mm5 pmulhrw .L8,%mm2 paddw %mm1,%mm6 pmulhrw .L5,%mm4 movq %mm0,t244(%esp) pmulhrw .L5,%mm5 movq %mm2,t243(%esp) movq %mm0,%mm1 movq %mm6,t245(%esp) movq %mm2,%mm3 prefetch (%esi) paddw %mm4,%mm0 paddw %mm5,%mm1 paddw %mm4,%mm2 packuswb %mm1,%mm0 paddw %mm5,%mm3 psubw %mm6,%mm4 packuswb %mm3,%mm2 psubw %mm6,%mm5 packuswb %mm5,%mm4 pand %mm7,%mm0 movq %mm4,%mm5 movq .L28,%mm3 pand %mm7,%mm2 psllq $3,%mm4 pand %mm3,%mm5 psrlq $3,%mm0 pand %mm3,%mm4 por %mm4,%mm0 psrlq $5,%mm5 movq %mm0,%mm3 por %mm5,%mm2 punpcklbw %mm2,%mm0 punpckhbw %mm2,%mm3 movq %mm0,%mm5 punpcklwd %mm3,%mm0 movq %mm0,(%edi) punpckhwd %mm3,%mm5 movq %mm5,8(%edi) movq (%esi,%ebp),%mm4 addl $8,%esi movq .L12,%mm3 movq %mm4,%mm5 pand .L3,%mm4 psrlw $8,%mm5 psubw %mm3,%mm4 psubw %mm3,%mm5 prefetchw (%edi) movq t244(%esp),%mm0 psllw $2,%mm4 movq t243(%esp),%mm2 psllw $2,%mm5 pmulhrw .L5,%mm4 movq %mm0,%mm1 pmulhrw .L5,%mm5 movq %mm2,%mm3 prefetch (%esi) paddw %mm4,%mm0 paddw %mm5,%mm1 paddw %mm4,%mm2 packuswb %mm1,%mm0 paddw %mm5,%mm3 psubw t245(%esp),%mm4 packuswb %mm3,%mm2 psubw t245(%esp),%mm5 packuswb %mm5,%mm4 pand %mm7,%mm0 movq %mm4,%mm5 movq .L28,%mm3 pand %mm7,%mm2 psllq $3,%mm4 pand %mm3,%mm5 psrlq $3,%mm0 pand %mm3,%mm4 por %mm4,%mm0 psrlq $5,%mm5 movq %mm0,%mm3 por %mm5,%mm2 punpcklbw %mm2,%mm0 punpckhbw %mm2,%mm3 movq %mm0,%mm5 punpcklwd %mm3,%mm0 movq %mm0,(%edi,%edx) punpckhwd %mm3,%mm5 movq %mm5,8(%edi,%edx) addl $16,%edi subl $8,%ecx jne .L139 addl t238(%esp),%esi addl %ebp,%esi movl t240(%esp),%ecx addl %ecx,%eax addl t239(%esp),%edi addl %edx,%edi addl %ecx,%ebx subl $2,t242(%esp) jne .L140 movl t246(%esp),%esp femms popl %edi popl %esi popl %ebp popl %ebx ret .text .align 16 .globl _3dn_yuyv_rgb5551 _3dn_yuyv_rgb5551: pushl %edi pushl %esi pushl %ebx movl 0+12+12(%esp),%ecx movl 0+12+24(%esp),%eax addl %ecx,%ecx movl 0+12+20(%esp),%ebx subl %ecx,%eax movl 0+12+12(%esp),%ecx addl %ecx,%ecx movl 0+12+16(%esp),%edx subl %ecx,%ebx movl 0+12+8(%esp),%esi movl 0+12+4(%esp),%edi .align 16 .L142: movl 0+12+12(%esp),%ecx .L141: movq .L27,%mm7 movq (%esi),%mm4 movq %mm4,%mm6 movq 8(%esi),%mm5 punpcklwd %mm5,%mm4 addl $16,%esi punpckhwd %mm5,%mm6 movq %mm4,%mm5 punpcklwd %mm6,%mm4 movq %mm4,%mm0 punpckhwd %mm6,%mm5 movq .L3,%mm1 movq %mm5,%mm2 movq .L4,%mm3 psrlw $8,%mm0 pand %mm1,%mm4 psubw %mm3,%mm0 psrlw $8,%mm2 pand %mm1,%mm5 prefetchw (%edi) psubw %mm3,%mm2 psrlw $3,%mm3 psubw %mm3,%mm4 psubw %mm3,%mm5 psllw $3,%mm0 movq %mm0,%mm6 pmulhrw .L6,%mm6 psllw $2,%mm2 movq %mm2,%mm1 pmulhrw .L9,%mm1 psllw $2,%mm4 pmulhrw .L7,%mm0 psllw $2,%mm5 pmulhrw .L8,%mm2 paddw %mm1,%mm6 pmulhrw .L5,%mm4 movq %mm0,%mm1 pmulhrw .L5,%mm5 movq %mm2,%mm3 prefetch (%esi) paddw %mm4,%mm0 paddw %mm5,%mm1 paddw %mm4,%mm2 packuswb %mm1,%mm0 paddw %mm5,%mm3 psubw %mm6,%mm4 packuswb %mm3,%mm2 psubw %mm6,%mm5 packuswb %mm5,%mm4 pand %mm7,%mm2 pand %mm7,%mm0 psrlq $3,%mm2 pand %mm7,%mm4 pxor %mm3,%mm3 psrlq $1,%mm0 movq %mm4,%mm5 punpcklbw %mm3,%mm4 movq %mm2,%mm1 punpckhbw %mm3,%mm5 psllw $2,%mm4 punpcklbw %mm0,%mm2 psllw $2,%mm5 por %mm4,%mm2 punpckhbw %mm0,%mm1 movq %mm2,%mm3 por %mm5,%mm1 punpcklwd %mm1,%mm2 movq %mm2,(%edi) punpckhwd %mm1,%mm3 movq %mm3,8(%edi) addl $16,%edi subl $8,%ecx jne .L141 addl %eax,%esi addl %ebx,%edi decl %edx jne .L142 femms popl %ebx popl %esi popl %edi ret .text .align 16 .globl _3dn_yuv420_rgb5551 _3dn_yuv420_rgb5551: pushl %ebx pushl %ebp pushl %esi pushl %edi movl %esp,%ecx leal -48(%esp),%esp andl $-8,%esp t252 = 0 t253 = 8 t254 = 16 t247 = 24 t248 = 28 t249 = 32 t250 = 36 t251 = 40 t255 = 44 movl 0+16+20(%ecx),%ebx movl %ebx,t250(%esp) shrl $1,%ebx movl 0+16+36(%ecx),%eax subl %ebx,%eax movl %eax,t249(%esp) movl 0+16+32(%ecx),%eax addl %ebx,%ebx movl 0+16+4(%ecx),%edi movl %eax,%ebp movl 0+16+28(%ecx),%esi subl %ebx,%eax movl %eax,t247(%esp) addl %ebx,%ebx movl %esi,%edx movl 0+16+24(%ecx),%eax subl %ebx,%esi movl 0+16+16(%ecx),%ebx movl %esi,t248(%esp) movl 0+16+8(%ecx),%esi movl %eax,t251(%esp) movl 0+16+12(%ecx),%eax movl %ecx,t255(%esp) .align 16 .L144: movl t250(%esp),%ecx .L143: movq .L27,%mm7 movq .L4,%mm3 pxor %mm1,%mm1 movd (%eax),%mm0 addl $4,%eax punpcklbw %mm1,%mm0 movd (%ebx),%mm2 addl $4,%ebx psubw %mm3,%mm0 punpcklbw %mm1,%mm2 movq (%esi),%mm4 psubw %mm3,%mm2 movq %mm4,%mm5 psrlw $3,%mm3 pand .L3,%mm4 psrlw $8,%mm5 psubw %mm3,%mm4 psubw %mm3,%mm5 prefetchw (%edi) psllw $3,%mm0 movq %mm0,%mm6 pmulhrw .L6,%mm6 psllw $2,%mm2 movq %mm2,%mm1 pmulhrw .L9,%mm1 psllw $2,%mm4 pmulhrw .L7,%mm0 psllw $2,%mm5 pmulhrw .L8,%mm2 paddw %mm1,%mm6 pmulhrw .L5,%mm4 movq %mm0,t253(%esp) pmulhrw .L5,%mm5 movq %mm2,t252(%esp) movq %mm0,%mm1 movq %mm6,t254(%esp) movq %mm2,%mm3 prefetch (%esi) paddw %mm4,%mm0 paddw %mm5,%mm1 paddw %mm4,%mm2 packuswb %mm1,%mm0 paddw %mm5,%mm3 psubw %mm6,%mm4 packuswb %mm3,%mm2 psubw %mm6,%mm5 packuswb %mm5,%mm4 pand %mm7,%mm2 pand %mm7,%mm0 psrlq $3,%mm2 pand %mm7,%mm4 pxor %mm3,%mm3 psrlq $1,%mm0 movq %mm4,%mm5 punpcklbw %mm3,%mm4 movq %mm2,%mm1 punpckhbw %mm3,%mm5 psllw $2,%mm4 punpcklbw %mm0,%mm2 psllw $2,%mm5 por %mm4,%mm2 punpckhbw %mm0,%mm1 movq %mm2,%mm3 por %mm5,%mm1 punpcklwd %mm1,%mm2 movq %mm2,(%edi) punpckhwd %mm1,%mm3 movq %mm3,8(%edi) movq (%esi,%ebp),%mm4 addl $8,%esi movq .L12,%mm3 movq %mm4,%mm5 pand .L3,%mm4 psrlw $8,%mm5 psubw %mm3,%mm4 psubw %mm3,%mm5 prefetchw (%edi) movq t253(%esp),%mm0 psllw $2,%mm4 movq t252(%esp),%mm2 psllw $2,%mm5 pmulhrw .L5,%mm4 movq %mm0,%mm1 pmulhrw .L5,%mm5 movq %mm2,%mm3 prefetch (%esi) paddw %mm4,%mm0 paddw %mm5,%mm1 paddw %mm4,%mm2 packuswb %mm1,%mm0 paddw %mm5,%mm3 psubw t254(%esp),%mm4 packuswb %mm3,%mm2 psubw t254(%esp),%mm5 packuswb %mm5,%mm4 pand %mm7,%mm2 pand %mm7,%mm0 psrlq $3,%mm2 pand %mm7,%mm4 pxor %mm3,%mm3 psrlq $1,%mm0 movq %mm4,%mm5 punpcklbw %mm3,%mm4 movq %mm2,%mm1 punpckhbw %mm3,%mm5 psllw $2,%mm4 punpcklbw %mm0,%mm2 psllw $2,%mm5 por %mm4,%mm2 punpckhbw %mm0,%mm1 movq %mm2,%mm3 por %mm5,%mm1 punpcklwd %mm1,%mm2 movq %mm2,(%edi,%edx) punpckhwd %mm1,%mm3 movq %mm3,8(%edi,%edx) addl $16,%edi subl $8,%ecx jne .L143 addl t247(%esp),%esi addl %ebp,%esi movl t249(%esp),%ecx addl %ecx,%eax addl t248(%esp),%edi addl %edx,%edi addl %ecx,%ebx subl $2,t251(%esp) jne .L144 movl t255(%esp),%esp femms popl %edi popl %esi popl %ebp popl %ebx ret .text .align 16 .globl _3dn_yuyv_bgr5551 _3dn_yuyv_bgr5551: pushl %edi pushl %esi pushl %ebx movl 0+12+12(%esp),%ecx movl 0+12+24(%esp),%eax addl %ecx,%ecx movl 0+12+20(%esp),%ebx subl %ecx,%eax movl 0+12+12(%esp),%ecx addl %ecx,%ecx movl 0+12+16(%esp),%edx subl %ecx,%ebx movl 0+12+8(%esp),%esi movl 0+12+4(%esp),%edi .align 16 .L146: movl 0+12+12(%esp),%ecx .L145: movq .L27,%mm7 movq (%esi),%mm4 movq %mm4,%mm6 movq 8(%esi),%mm5 punpcklwd %mm5,%mm4 addl $16,%esi punpckhwd %mm5,%mm6 movq %mm4,%mm5 punpcklwd %mm6,%mm4 movq %mm4,%mm0 punpckhwd %mm6,%mm5 movq .L3,%mm1 movq %mm5,%mm2 movq .L4,%mm3 psrlw $8,%mm0 pand %mm1,%mm4 psubw %mm3,%mm0 psrlw $8,%mm2 pand %mm1,%mm5 prefetchw (%edi) psubw %mm3,%mm2 psrlw $3,%mm3 psubw %mm3,%mm4 psubw %mm3,%mm5 psllw $3,%mm0 movq %mm0,%mm6 pmulhrw .L6,%mm6 psllw $2,%mm2 movq %mm2,%mm1 pmulhrw .L9,%mm1 psllw $2,%mm4 pmulhrw .L7,%mm0 psllw $2,%mm5 pmulhrw .L8,%mm2 paddw %mm1,%mm6 pmulhrw .L5,%mm4 movq %mm0,%mm1 pmulhrw .L5,%mm5 movq %mm2,%mm3 prefetch (%esi) paddw %mm4,%mm0 paddw %mm5,%mm1 paddw %mm4,%mm2 packuswb %mm1,%mm0 paddw %mm5,%mm3 psubw %mm6,%mm4 packuswb %mm3,%mm2 psubw %mm6,%mm5 packuswb %mm5,%mm4 pand %mm7,%mm0 pand %mm7,%mm2 psrlq $3,%mm0 pand %mm7,%mm4 pxor %mm3,%mm3 psrlq $1,%mm2 movq %mm4,%mm5 punpcklbw %mm3,%mm4 movq %mm0,%mm1 punpckhbw %mm3,%mm5 psllw $2,%mm4 punpcklbw %mm2,%mm0 psllw $2,%mm5 por %mm4,%mm0 punpckhbw %mm2,%mm1 movq %mm0,%mm3 por %mm5,%mm1 punpcklwd %mm1,%mm0 movq %mm0,(%edi) punpckhwd %mm1,%mm3 movq %mm3,8(%edi) addl $16,%edi subl $8,%ecx jne .L145 addl %eax,%esi addl %ebx,%edi decl %edx jne .L146 femms popl %ebx popl %esi popl %edi ret .text .align 16 .globl _3dn_yuv420_bgr5551 _3dn_yuv420_bgr5551: pushl %ebx pushl %ebp pushl %esi pushl %edi movl %esp,%ecx leal -48(%esp),%esp andl $-8,%esp t261 = 0 t262 = 8 t263 = 16 t256 = 24 t257 = 28 t258 = 32 t259 = 36 t260 = 40 t264 = 44 movl 0+16+20(%ecx),%ebx movl %ebx,t259(%esp) shrl $1,%ebx movl 0+16+36(%ecx),%eax subl %ebx,%eax movl %eax,t258(%esp) movl 0+16+32(%ecx),%eax addl %ebx,%ebx movl 0+16+4(%ecx),%edi movl %eax,%ebp movl 0+16+28(%ecx),%esi subl %ebx,%eax movl %eax,t256(%esp) addl %ebx,%ebx movl %esi,%edx movl 0+16+24(%ecx),%eax subl %ebx,%esi movl 0+16+16(%ecx),%ebx movl %esi,t257(%esp) movl 0+16+8(%ecx),%esi movl %eax,t260(%esp) movl 0+16+12(%ecx),%eax movl %ecx,t264(%esp) .align 16 .L148: movl t259(%esp),%ecx .L147: movq .L27,%mm7 movq .L4,%mm3 pxor %mm1,%mm1 movd (%eax),%mm0 addl $4,%eax punpcklbw %mm1,%mm0 movd (%ebx),%mm2 addl $4,%ebx psubw %mm3,%mm0 punpcklbw %mm1,%mm2 movq (%esi),%mm4 psubw %mm3,%mm2 movq %mm4,%mm5 psrlw $3,%mm3 pand .L3,%mm4 psrlw $8,%mm5 psubw %mm3,%mm4 psubw %mm3,%mm5 prefetchw (%edi) psllw $3,%mm0 movq %mm0,%mm6 pmulhrw .L6,%mm6 psllw $2,%mm2 movq %mm2,%mm1 pmulhrw .L9,%mm1 psllw $2,%mm4 pmulhrw .L7,%mm0 psllw $2,%mm5 pmulhrw .L8,%mm2 paddw %mm1,%mm6 pmulhrw .L5,%mm4 movq %mm0,t262(%esp) pmulhrw .L5,%mm5 movq %mm2,t261(%esp) movq %mm0,%mm1 movq %mm6,t263(%esp) movq %mm2,%mm3 prefetch (%esi) paddw %mm4,%mm0 paddw %mm5,%mm1 paddw %mm4,%mm2 packuswb %mm1,%mm0 paddw %mm5,%mm3 psubw %mm6,%mm4 packuswb %mm3,%mm2 psubw %mm6,%mm5 packuswb %mm5,%mm4 pand %mm7,%mm0 pand %mm7,%mm2 psrlq $3,%mm0 pand %mm7,%mm4 pxor %mm3,%mm3 psrlq $1,%mm2 movq %mm4,%mm5 punpcklbw %mm3,%mm4 movq %mm0,%mm1 punpckhbw %mm3,%mm5 psllw $2,%mm4 punpcklbw %mm2,%mm0 psllw $2,%mm5 por %mm4,%mm0 punpckhbw %mm2,%mm1 movq %mm0,%mm3 por %mm5,%mm1 punpcklwd %mm1,%mm0 movq %mm0,(%edi) punpckhwd %mm1,%mm3 movq %mm3,8(%edi) movq (%esi,%ebp),%mm4 addl $8,%esi movq .L12,%mm3 movq %mm4,%mm5 pand .L3,%mm4 psrlw $8,%mm5 psubw %mm3,%mm4 psubw %mm3,%mm5 prefetchw (%edi) movq t262(%esp),%mm0 psllw $2,%mm4 movq t261(%esp),%mm2 psllw $2,%mm5 pmulhrw .L5,%mm4 movq %mm0,%mm1 pmulhrw .L5,%mm5 movq %mm2,%mm3 prefetch (%esi) paddw %mm4,%mm0 paddw %mm5,%mm1 paddw %mm4,%mm2 packuswb %mm1,%mm0 paddw %mm5,%mm3 psubw t263(%esp),%mm4 packuswb %mm3,%mm2 psubw t263(%esp),%mm5 packuswb %mm5,%mm4 pand %mm7,%mm0 pand %mm7,%mm2 psrlq $3,%mm0 pand %mm7,%mm4 pxor %mm3,%mm3 psrlq $1,%mm2 movq %mm4,%mm5 punpcklbw %mm3,%mm4 movq %mm0,%mm1 punpckhbw %mm3,%mm5 psllw $2,%mm4 punpcklbw %mm2,%mm0 psllw $2,%mm5 por %mm4,%mm0 punpckhbw %mm2,%mm1 movq %mm0,%mm3 por %mm5,%mm1 punpcklwd %mm1,%mm0 movq %mm0,(%edi,%edx) punpckhwd %mm1,%mm3 movq %mm3,8(%edi,%edx) addl $16,%edi subl $8,%ecx jne .L147 addl t256(%esp),%esi addl %ebp,%esi movl t258(%esp),%ecx addl %ecx,%eax addl t257(%esp),%edi addl %edx,%edi addl %ecx,%ebx subl $2,t260(%esp) jne .L148 movl t264(%esp),%esp femms popl %edi popl %esi popl %ebp popl %ebx ret .text .align 16 .globl amd_yuyv_rgb32 amd_yuyv_rgb32: pushl %edi pushl %esi pushl %ebx movl 0+12+12(%esp),%ecx movl 0+12+24(%esp),%eax addl %ecx,%ecx movl 0+12+20(%esp),%ebx subl %ecx,%eax movl 0+12+12(%esp),%ecx shll $2,%ecx movl 0+12+16(%esp),%edx subl %ecx,%ebx movl 0+12+8(%esp),%esi movl 0+12+4(%esp),%edi .align 16 .L150: movl 0+12+12(%esp),%ecx .L149: pxor %mm7,%mm7 movq (%esi),%mm4 movq %mm4,%mm6 movq 8(%esi),%mm5 punpcklwd %mm5,%mm4 addl $16,%esi punpckhwd %mm5,%mm6 movq %mm4,%mm5 punpcklwd %mm6,%mm4 movq %mm4,%mm0 punpckhwd %mm6,%mm5 movq .L3,%mm1 movq %mm5,%mm2 movq .L4,%mm3 psrlw $8,%mm0 pand %mm1,%mm4 psubw %mm3,%mm0 psrlw $8,%mm2 pand %mm1,%mm5 psubw %mm3,%mm2 psrlw $3,%mm3 psubw %mm3,%mm4 psubw %mm3,%mm5 psllw $3,%mm0 movq %mm0,%mm6 pmulhrw .L6,%mm6 psllw $2,%mm2 movq %mm2,%mm1 pmulhrw .L9,%mm1 psllw $2,%mm4 pmulhrw .L7,%mm0 psllw $2,%mm5 pmulhrw .L8,%mm2 paddw %mm1,%mm6 pmulhrw .L5,%mm4 movq %mm0,%mm1 pmulhrw .L5,%mm5 prefetchnta (%esi) paddw %mm4,%mm0 paddw %mm5,%mm1 packuswb %mm0,%mm0 movq %mm2,%mm3 packuswb %mm1,%mm1 paddw %mm4,%mm2 punpcklbw %mm1,%mm0 paddw %mm5,%mm3 psubw %mm6,%mm4 packuswb %mm2,%mm2 packuswb %mm3,%mm3 packuswb %mm4,%mm4 psubw %mm6,%mm5 punpcklbw %mm3,%mm2 packuswb %mm5,%mm5 punpcklbw %mm5,%mm4 movq %mm2,%mm1 punpcklbw %mm4,%mm2 movq %mm0,%mm3 punpcklbw %mm7,%mm0 movq %mm2,%mm5 punpcklwd %mm0,%mm2 punpckhwd %mm0,%mm5 movntq %mm2,(%edi) punpckhbw %mm4,%mm1 movntq %mm5,8(%edi) punpckhbw %mm7,%mm3 movq %mm1,%mm5 punpcklwd %mm3,%mm1 movntq %mm1,16(%edi) punpckhwd %mm3,%mm5 movntq %mm5,24(%edi) addl $32,%edi subl $8,%ecx jne .L149 addl %eax,%esi addl %ebx,%edi decl %edx jne .L150 femms popl %ebx popl %esi popl %edi ret .text .align 16 .globl amd_yuv420_rgb32 amd_yuv420_rgb32: pushl %ebx pushl %ebp pushl %esi pushl %edi movl %esp,%ecx leal -48(%esp),%esp andl $-8,%esp t270 = 0 t271 = 8 t272 = 16 t265 = 24 t266 = 28 t267 = 32 t268 = 36 t269 = 40 t273 = 44 movl 0+16+20(%ecx),%ebx movl %ebx,t268(%esp) shrl $1,%ebx movl 0+16+36(%ecx),%eax subl %ebx,%eax movl %eax,t267(%esp) movl 0+16+32(%ecx),%eax addl %ebx,%ebx movl 0+16+4(%ecx),%edi movl %eax,%ebp movl 0+16+28(%ecx),%esi subl %ebx,%eax movl %eax,t265(%esp) shll $2,%ebx movl %esi,%edx movl 0+16+24(%ecx),%eax subl %ebx,%esi movl 0+16+16(%ecx),%ebx movl %esi,t266(%esp) movl 0+16+8(%ecx),%esi movl %eax,t269(%esp) movl 0+16+12(%ecx),%eax movl %ecx,t273(%esp) .align 16 .L152: movl t268(%esp),%ecx .L151: pxor %mm7,%mm7 movq .L4,%mm3 pxor %mm1,%mm1 movd (%eax),%mm0 addl $4,%eax punpcklbw %mm1,%mm0 movd (%ebx),%mm2 addl $4,%ebx psubw %mm3,%mm0 punpcklbw %mm1,%mm2 movq (%esi),%mm4 psubw %mm3,%mm2 movq %mm4,%mm5 psrlw $3,%mm3 pand .L3,%mm4 psrlw $8,%mm5 psubw %mm3,%mm4 psubw %mm3,%mm5 psllw $3,%mm0 movq %mm0,%mm6 pmulhrw .L6,%mm6 psllw $2,%mm2 movq %mm2,%mm1 pmulhrw .L9,%mm1 psllw $2,%mm4 pmulhrw .L7,%mm0 psllw $2,%mm5 pmulhrw .L8,%mm2 paddw %mm1,%mm6 pmulhrw .L5,%mm4 movq %mm0,t271(%esp) pmulhrw .L5,%mm5 movq %mm2,t270(%esp) movq %mm0,%mm1 movq %mm6,t272(%esp) prefetchnta (%esi) paddw %mm4,%mm0 paddw %mm5,%mm1 packuswb %mm0,%mm0 movq %mm2,%mm3 packuswb %mm1,%mm1 paddw %mm4,%mm2 punpcklbw %mm1,%mm0 paddw %mm5,%mm3 psubw %mm6,%mm4 packuswb %mm2,%mm2 packuswb %mm3,%mm3 packuswb %mm4,%mm4 psubw %mm6,%mm5 punpcklbw %mm3,%mm2 packuswb %mm5,%mm5 punpcklbw %mm5,%mm4 movq %mm2,%mm1 punpcklbw %mm4,%mm2 movq %mm0,%mm3 punpcklbw %mm7,%mm0 movq %mm2,%mm5 punpcklwd %mm0,%mm2 punpckhwd %mm0,%mm5 movntq %mm2,(%edi) punpckhbw %mm4,%mm1 movntq %mm5,8(%edi) punpckhbw %mm7,%mm3 movq %mm1,%mm5 punpcklwd %mm3,%mm1 movntq %mm1,16(%edi) punpckhwd %mm3,%mm5 movntq %mm5,24(%edi) movq (%esi,%ebp),%mm4 addl $8,%esi movq .L12,%mm3 movq %mm4,%mm5 pand .L3,%mm4 psrlw $8,%mm5 psubw %mm3,%mm4 psubw %mm3,%mm5 movq t271(%esp),%mm0 psllw $2,%mm4 movq t270(%esp),%mm2 psllw $2,%mm5 pmulhrw .L5,%mm4 movq %mm0,%mm1 pmulhrw .L5,%mm5 prefetchnta (%esi) paddw %mm4,%mm0 paddw %mm5,%mm1 packuswb %mm0,%mm0 movq %mm2,%mm3 packuswb %mm1,%mm1 paddw %mm4,%mm2 punpcklbw %mm1,%mm0 paddw %mm5,%mm3 psubw t272(%esp),%mm4 packuswb %mm2,%mm2 packuswb %mm3,%mm3 packuswb %mm4,%mm4 psubw t272(%esp),%mm5 punpcklbw %mm3,%mm2 packuswb %mm5,%mm5 punpcklbw %mm5,%mm4 movq %mm2,%mm1 punpcklbw %mm4,%mm2 movq %mm0,%mm3 punpcklbw %mm7,%mm0 movq %mm2,%mm5 punpcklwd %mm0,%mm2 punpckhwd %mm0,%mm5 movntq %mm2,(%edi,%edx) punpckhbw %mm4,%mm1 movntq %mm5,8(%edi,%edx) punpckhbw %mm7,%mm3 movq %mm1,%mm5 punpcklwd %mm3,%mm1 movntq %mm1,16(%edi,%edx) punpckhwd %mm3,%mm5 movntq %mm5,24(%edi,%edx) addl $32,%edi subl $8,%ecx jne .L151 addl t265(%esp),%esi addl %ebp,%esi movl t267(%esp),%ecx addl %ecx,%eax addl t266(%esp),%edi addl %edx,%edi addl %ecx,%ebx subl $2,t269(%esp) jne .L152 movl t273(%esp),%esp femms popl %edi popl %esi popl %ebp popl %ebx ret .text .align 16 .globl amd_yuyv_bgr32 amd_yuyv_bgr32: pushl %edi pushl %esi pushl %ebx movl 0+12+12(%esp),%ecx movl 0+12+24(%esp),%eax addl %ecx,%ecx movl 0+12+20(%esp),%ebx subl %ecx,%eax movl 0+12+12(%esp),%ecx shll $2,%ecx movl 0+12+16(%esp),%edx subl %ecx,%ebx movl 0+12+8(%esp),%esi movl 0+12+4(%esp),%edi .align 16 .L154: movl 0+12+12(%esp),%ecx .L153: pxor %mm7,%mm7 movq (%esi),%mm4 movq %mm4,%mm6 movq 8(%esi),%mm5 punpcklwd %mm5,%mm4 addl $16,%esi punpckhwd %mm5,%mm6 movq %mm4,%mm5 punpcklwd %mm6,%mm4 movq %mm4,%mm0 punpckhwd %mm6,%mm5 movq .L3,%mm1 movq %mm5,%mm2 movq .L4,%mm3 psrlw $8,%mm0 pand %mm1,%mm4 psubw %mm3,%mm0 psrlw $8,%mm2 pand %mm1,%mm5 psubw %mm3,%mm2 psrlw $3,%mm3 psubw %mm3,%mm4 psubw %mm3,%mm5 psllw $3,%mm0 movq %mm0,%mm6 pmulhrw .L6,%mm6 psllw $2,%mm2 movq %mm2,%mm1 pmulhrw .L9,%mm1 psllw $2,%mm4 pmulhrw .L7,%mm0 psllw $2,%mm5 pmulhrw .L8,%mm2 paddw %mm1,%mm6 pmulhrw .L5,%mm4 movq %mm0,%mm1 pmulhrw .L5,%mm5 prefetchnta (%esi) paddw %mm4,%mm0 paddw %mm5,%mm1 packuswb %mm0,%mm0 movq %mm2,%mm3 packuswb %mm1,%mm1 paddw %mm4,%mm2 punpcklbw %mm1,%mm0 paddw %mm5,%mm3 psubw %mm6,%mm4 packuswb %mm2,%mm2 packuswb %mm3,%mm3 packuswb %mm4,%mm4 psubw %mm6,%mm5 punpcklbw %mm3,%mm2 packuswb %mm5,%mm5 punpcklbw %mm5,%mm4 movq %mm0,%mm1 punpcklbw %mm4,%mm0 movq %mm2,%mm3 punpcklbw %mm7,%mm2 movq %mm0,%mm5 punpcklwd %mm2,%mm0 punpckhwd %mm2,%mm5 movntq %mm0,(%edi) punpckhbw %mm4,%mm1 movntq %mm5,8(%edi) punpckhbw %mm7,%mm3 movq %mm1,%mm5 punpcklwd %mm3,%mm1 movntq %mm1,16(%edi) punpckhwd %mm3,%mm5 movntq %mm5,24(%edi) addl $32,%edi subl $8,%ecx jne .L153 addl %eax,%esi addl %ebx,%edi decl %edx jne .L154 femms popl %ebx popl %esi popl %edi ret .text .align 16 .globl amd_yuv420_bgr32 amd_yuv420_bgr32: pushl %ebx pushl %ebp pushl %esi pushl %edi movl %esp,%ecx leal -48(%esp),%esp andl $-8,%esp t279 = 0 t280 = 8 t281 = 16 t274 = 24 t275 = 28 t276 = 32 t277 = 36 t278 = 40 t282 = 44 movl 0+16+20(%ecx),%ebx movl %ebx,t277(%esp) shrl $1,%ebx movl 0+16+36(%ecx),%eax subl %ebx,%eax movl %eax,t276(%esp) movl 0+16+32(%ecx),%eax addl %ebx,%ebx movl 0+16+4(%ecx),%edi movl %eax,%ebp movl 0+16+28(%ecx),%esi subl %ebx,%eax movl %eax,t274(%esp) shll $2,%ebx movl %esi,%edx movl 0+16+24(%ecx),%eax subl %ebx,%esi movl 0+16+16(%ecx),%ebx movl %esi,t275(%esp) movl 0+16+8(%ecx),%esi movl %eax,t278(%esp) movl 0+16+12(%ecx),%eax movl %ecx,t282(%esp) .align 16 .L156: movl t277(%esp),%ecx .L155: pxor %mm7,%mm7 movq .L4,%mm3 pxor %mm1,%mm1 movd (%eax),%mm0 addl $4,%eax punpcklbw %mm1,%mm0 movd (%ebx),%mm2 addl $4,%ebx psubw %mm3,%mm0 punpcklbw %mm1,%mm2 movq (%esi),%mm4 psubw %mm3,%mm2 movq %mm4,%mm5 psrlw $3,%mm3 pand .L3,%mm4 psrlw $8,%mm5 psubw %mm3,%mm4 psubw %mm3,%mm5 psllw $3,%mm0 movq %mm0,%mm6 pmulhrw .L6,%mm6 psllw $2,%mm2 movq %mm2,%mm1 pmulhrw .L9,%mm1 psllw $2,%mm4 pmulhrw .L7,%mm0 psllw $2,%mm5 pmulhrw .L8,%mm2 paddw %mm1,%mm6 pmulhrw .L5,%mm4 movq %mm0,t280(%esp) pmulhrw .L5,%mm5 movq %mm2,t279(%esp) movq %mm0,%mm1 movq %mm6,t281(%esp) prefetchnta (%esi) paddw %mm4,%mm0 paddw %mm5,%mm1 packuswb %mm0,%mm0 movq %mm2,%mm3 packuswb %mm1,%mm1 paddw %mm4,%mm2 punpcklbw %mm1,%mm0 paddw %mm5,%mm3 psubw %mm6,%mm4 packuswb %mm2,%mm2 packuswb %mm3,%mm3 packuswb %mm4,%mm4 psubw %mm6,%mm5 punpcklbw %mm3,%mm2 packuswb %mm5,%mm5 punpcklbw %mm5,%mm4 movq %mm0,%mm1 punpcklbw %mm4,%mm0 movq %mm2,%mm3 punpcklbw %mm7,%mm2 movq %mm0,%mm5 punpcklwd %mm2,%mm0 punpckhwd %mm2,%mm5 movntq %mm0,(%edi) punpckhbw %mm4,%mm1 movntq %mm5,8(%edi) punpckhbw %mm7,%mm3 movq %mm1,%mm5 punpcklwd %mm3,%mm1 movntq %mm1,16(%edi) punpckhwd %mm3,%mm5 movntq %mm5,24(%edi) movq (%esi,%ebp),%mm4 addl $8,%esi movq .L12,%mm3 movq %mm4,%mm5 pand .L3,%mm4 psrlw $8,%mm5 psubw %mm3,%mm4 psubw %mm3,%mm5 movq t280(%esp),%mm0 psllw $2,%mm4 movq t279(%esp),%mm2 psllw $2,%mm5 pmulhrw .L5,%mm4 movq %mm0,%mm1 pmulhrw .L5,%mm5 prefetchnta (%esi) paddw %mm4,%mm0 paddw %mm5,%mm1 packuswb %mm0,%mm0 movq %mm2,%mm3 packuswb %mm1,%mm1 paddw %mm4,%mm2 punpcklbw %mm1,%mm0 paddw %mm5,%mm3 psubw t281(%esp),%mm4 packuswb %mm2,%mm2 packuswb %mm3,%mm3 packuswb %mm4,%mm4 psubw t281(%esp),%mm5 punpcklbw %mm3,%mm2 packuswb %mm5,%mm5 punpcklbw %mm5,%mm4 movq %mm0,%mm1 punpcklbw %mm4,%mm0 movq %mm2,%mm3 punpcklbw %mm7,%mm2 movq %mm0,%mm5 punpcklwd %mm2,%mm0 punpckhwd %mm2,%mm5 movntq %mm0,(%edi,%edx) punpckhbw %mm4,%mm1 movntq %mm5,8(%edi,%edx) punpckhbw %mm7,%mm3 movq %mm1,%mm5 punpcklwd %mm3,%mm1 movntq %mm1,16(%edi,%edx) punpckhwd %mm3,%mm5 movntq %mm5,24(%edi,%edx) addl $32,%edi subl $8,%ecx jne .L155 addl t274(%esp),%esi addl %ebp,%esi movl t276(%esp),%ecx addl %ecx,%eax addl t275(%esp),%edi addl %edx,%edi addl %ecx,%ebx subl $2,t278(%esp) jne .L156 movl t282(%esp),%esp femms popl %edi popl %esi popl %ebp popl %ebx ret .text .align 16 .globl amd_yuyv_rgb24 amd_yuyv_rgb24: pushl %edi pushl %esi pushl %ebx movl 0+12+12(%esp),%ecx movl 0+12+24(%esp),%eax addl %ecx,%ecx movl 0+12+20(%esp),%ebx subl %ecx,%eax movl 0+12+12(%esp),%ecx leal (%ecx,%ecx,2),%ecx movl 0+12+16(%esp),%edx subl %ecx,%ebx movl 0+12+8(%esp),%esi movl 0+12+4(%esp),%edi .align 16 .L158: movl 0+12+12(%esp),%ecx .L157: movq (%esi),%mm4 movq %mm4,%mm6 movq 8(%esi),%mm5 punpcklwd %mm5,%mm4 addl $16,%esi punpckhwd %mm5,%mm6 movq %mm4,%mm5 punpcklwd %mm6,%mm4 movq %mm4,%mm0 punpckhwd %mm6,%mm5 movq .L3,%mm1 movq %mm5,%mm2 movq .L4,%mm3 psrlw $8,%mm0 pand %mm1,%mm4 psubw %mm3,%mm0 psrlw $8,%mm2 pand %mm1,%mm5 psubw %mm3,%mm2 psrlw $3,%mm3 psubw %mm3,%mm4 psubw %mm3,%mm5 psllw $3,%mm0 movq %mm0,%mm6 pmulhrw .L6,%mm6 psllw $2,%mm2 movq %mm2,%mm1 pmulhrw .L9,%mm1 psllw $2,%mm4 pmulhrw .L7,%mm0 psllw $2,%mm5 pmulhrw .L8,%mm2 paddw %mm1,%mm6 pmulhrw .L5,%mm4 movq %mm0,%mm1 pmulhrw .L5,%mm5 movq %mm2,%mm3 prefetchnta (%esi) paddw %mm4,%mm0 paddw %mm5,%mm1 paddw %mm4,%mm2 packuswb %mm1,%mm0 paddw %mm5,%mm3 psubw %mm6,%mm4 packuswb %mm3,%mm2 psubw %mm6,%mm5 packuswb %mm5,%mm4 movq %mm2,%mm1 punpcklbw %mm4,%mm2 psrlq $32,%mm1 punpckhbw %mm0,%mm4 punpcklbw %mm1,%mm0 movq %mm2,%mm1 punpcklwd %mm0,%mm2 punpckhwd %mm4,%mm0 psllq $32,%mm4 punpckhwd %mm2,%mm4 punpckldq %mm4,%mm2 pshufw $75,%mm4,%mm3 psrlq $32,%mm1 movntq %mm2,(%edi) punpcklwd %mm0,%mm1 pshufw $180,%mm1,%mm1 punpckldq %mm1,%mm3 punpckhdq %mm0,%mm1 movntq %mm3,8(%edi) movntq %mm1,16(%edi) addl $24,%edi subl $8,%ecx jne .L157 addl %eax,%esi addl %ebx,%edi decl %edx jne .L158 femms popl %ebx popl %esi popl %edi ret .text .align 16 .globl amd_yuv420_rgb24 amd_yuv420_rgb24: pushl %ebx pushl %ebp pushl %esi pushl %edi movl %esp,%ecx leal -40(%esp),%esp andl $-8,%esp t288 = 0 t289 = 8 t283 = 16 t284 = 20 t285 = 24 t286 = 28 t287 = 32 t290 = 36 movl 0+16+20(%ecx),%ebx movl %ebx,t286(%esp) shrl $1,%ebx movl 0+16+36(%ecx),%eax subl %ebx,%eax movl %eax,t285(%esp) movl 0+16+32(%ecx),%eax addl %ebx,%ebx movl 0+16+4(%ecx),%edi movl %eax,%ebp movl 0+16+28(%ecx),%esi subl %ebx,%eax movl %eax,t283(%esp) leal (%ebx,%ebx,2),%ebx movl %esi,%edx movl 0+16+24(%ecx),%eax subl %ebx,%esi movl 0+16+16(%ecx),%ebx movl %esi,t284(%esp) movl 0+16+8(%ecx),%esi movl %eax,t287(%esp) movl 0+16+12(%ecx),%eax movl %ecx,t290(%esp) .align 16 .L160: movl t286(%esp),%ecx .L159: movq .L4,%mm3 pxor %mm1,%mm1 movd (%eax),%mm0 addl $4,%eax punpcklbw %mm1,%mm0 movd (%ebx),%mm2 addl $4,%ebx psubw %mm3,%mm0 punpcklbw %mm1,%mm2 movq (%esi),%mm4 psubw %mm3,%mm2 movq %mm4,%mm5 psrlw $3,%mm3 pand .L3,%mm4 psrlw $8,%mm5 psubw %mm3,%mm4 psubw %mm3,%mm5 psllw $3,%mm0 movq %mm0,%mm6 pmulhrw .L6,%mm6 psllw $2,%mm2 movq %mm2,%mm1 pmulhrw .L9,%mm1 psllw $2,%mm4 pmulhrw .L7,%mm0 psllw $2,%mm5 pmulhrw .L8,%mm2 paddw %mm1,%mm6 pmulhrw .L5,%mm4 movq %mm0,%mm7 pmulhrw .L5,%mm5 movq %mm2,t288(%esp) movq %mm0,%mm1 movq %mm6,t289(%esp) movq %mm2,%mm3 prefetchnta (%esi) paddw %mm4,%mm0 paddw %mm5,%mm1 paddw %mm4,%mm2 packuswb %mm1,%mm0 paddw %mm5,%mm3 psubw %mm6,%mm4 packuswb %mm3,%mm2 psubw %mm6,%mm5 packuswb %mm5,%mm4 movq %mm2,%mm1 punpcklbw %mm4,%mm2 psrlq $32,%mm1 punpckhbw %mm0,%mm4 punpcklbw %mm1,%mm0 movq %mm2,%mm1 punpcklwd %mm0,%mm2 punpckhwd %mm4,%mm0 psllq $32,%mm4 punpckhwd %mm2,%mm4 punpckldq %mm4,%mm2 pshufw $75,%mm4,%mm3 psrlq $32,%mm1 movntq %mm2,(%edi) punpcklwd %mm0,%mm1 pshufw $180,%mm1,%mm1 punpckldq %mm1,%mm3 punpckhdq %mm0,%mm1 movntq %mm3,8(%edi) movntq %mm1,16(%edi) movq (%esi,%ebp),%mm4 addl $8,%esi movq .L12,%mm3 movq %mm4,%mm5 pand .L3,%mm4 psrlw $8,%mm5 psubw %mm3,%mm4 psubw %mm3,%mm5 movq %mm7,%mm0 psllw $2,%mm4 movq t288(%esp),%mm2 psllw $2,%mm5 pmulhrw .L5,%mm4 movq %mm0,%mm1 pmulhrw .L5,%mm5 movq %mm2,%mm3 prefetchnta (%esi) paddw %mm4,%mm0 paddw %mm5,%mm1 paddw %mm4,%mm2 packuswb %mm1,%mm0 paddw %mm5,%mm3 psubw t289(%esp),%mm4 packuswb %mm3,%mm2 psubw t289(%esp),%mm5 packuswb %mm5,%mm4 movq %mm2,%mm1 punpcklbw %mm4,%mm2 psrlq $32,%mm1 punpckhbw %mm0,%mm4 punpcklbw %mm1,%mm0 movq %mm2,%mm1 punpcklwd %mm0,%mm2 punpckhwd %mm4,%mm0 psllq $32,%mm4 punpckhwd %mm2,%mm4 punpckldq %mm4,%mm2 pshufw $75,%mm4,%mm3 psrlq $32,%mm1 movntq %mm2,(%edi,%edx) punpcklwd %mm0,%mm1 pshufw $180,%mm1,%mm1 punpckldq %mm1,%mm3 punpckhdq %mm0,%mm1 movntq %mm3,8(%edi,%edx) movntq %mm1,16(%edi,%edx) addl $24,%edi subl $8,%ecx jne .L159 addl t283(%esp),%esi addl %ebp,%esi movl t285(%esp),%ecx addl %ecx,%eax addl t284(%esp),%edi addl %edx,%edi addl %ecx,%ebx subl $2,t287(%esp) jne .L160 movl t290(%esp),%esp femms popl %edi popl %esi popl %ebp popl %ebx ret .text .align 16 .globl amd_yuyv_bgr24 amd_yuyv_bgr24: pushl %edi pushl %esi pushl %ebx movl 0+12+12(%esp),%ecx movl 0+12+24(%esp),%eax addl %ecx,%ecx movl 0+12+20(%esp),%ebx subl %ecx,%eax movl 0+12+12(%esp),%ecx leal (%ecx,%ecx,2),%ecx movl 0+12+16(%esp),%edx subl %ecx,%ebx movl 0+12+8(%esp),%esi movl 0+12+4(%esp),%edi .align 16 .L162: movl 0+12+12(%esp),%ecx .L161: movq (%esi),%mm4 movq %mm4,%mm6 movq 8(%esi),%mm5 punpcklwd %mm5,%mm4 addl $16,%esi punpckhwd %mm5,%mm6 movq %mm4,%mm5 punpcklwd %mm6,%mm4 movq %mm4,%mm0 punpckhwd %mm6,%mm5 movq .L3,%mm1 movq %mm5,%mm2 movq .L4,%mm3 psrlw $8,%mm0 pand %mm1,%mm4 psubw %mm3,%mm0 psrlw $8,%mm2 pand %mm1,%mm5 psubw %mm3,%mm2 psrlw $3,%mm3 psubw %mm3,%mm4 psubw %mm3,%mm5 psllw $3,%mm0 movq %mm0,%mm6 pmulhrw .L6,%mm6 psllw $2,%mm2 movq %mm2,%mm1 pmulhrw .L9,%mm1 psllw $2,%mm4 pmulhrw .L7,%mm0 psllw $2,%mm5 pmulhrw .L8,%mm2 paddw %mm1,%mm6 pmulhrw .L5,%mm4 movq %mm0,%mm1 pmulhrw .L5,%mm5 movq %mm2,%mm3 prefetchnta (%esi) paddw %mm4,%mm0 paddw %mm5,%mm1 paddw %mm4,%mm2 packuswb %mm1,%mm0 paddw %mm5,%mm3 psubw %mm6,%mm4 packuswb %mm3,%mm2 psubw %mm6,%mm5 packuswb %mm5,%mm4 movq %mm0,%mm1 punpcklbw %mm4,%mm0 psrlq $32,%mm1 punpckhbw %mm2,%mm4 punpcklbw %mm1,%mm2 movq %mm0,%mm1 punpcklwd %mm2,%mm0 punpckhwd %mm4,%mm2 psllq $32,%mm4 punpckhwd %mm0,%mm4 punpckldq %mm4,%mm0 pshufw $75,%mm4,%mm3 psrlq $32,%mm1 movntq %mm0,(%edi) punpcklwd %mm2,%mm1 pshufw $180,%mm1,%mm1 punpckldq %mm1,%mm3 punpckhdq %mm2,%mm1 movntq %mm3,8(%edi) movntq %mm1,16(%edi) addl $24,%edi subl $8,%ecx jne .L161 addl %eax,%esi addl %ebx,%edi decl %edx jne .L162 femms popl %ebx popl %esi popl %edi ret .text .align 16 .globl amd_yuv420_bgr24 amd_yuv420_bgr24: pushl %ebx pushl %ebp pushl %esi pushl %edi movl %esp,%ecx leal -40(%esp),%esp andl $-8,%esp t296 = 0 t297 = 8 t291 = 16 t292 = 20 t293 = 24 t294 = 28 t295 = 32 t298 = 36 movl 0+16+20(%ecx),%ebx movl %ebx,t294(%esp) shrl $1,%ebx movl 0+16+36(%ecx),%eax subl %ebx,%eax movl %eax,t293(%esp) movl 0+16+32(%ecx),%eax addl %ebx,%ebx movl 0+16+4(%ecx),%edi movl %eax,%ebp movl 0+16+28(%ecx),%esi subl %ebx,%eax movl %eax,t291(%esp) leal (%ebx,%ebx,2),%ebx movl %esi,%edx movl 0+16+24(%ecx),%eax subl %ebx,%esi movl 0+16+16(%ecx),%ebx movl %esi,t292(%esp) movl 0+16+8(%ecx),%esi movl %eax,t295(%esp) movl 0+16+12(%ecx),%eax movl %ecx,t298(%esp) .align 16 .L164: movl t294(%esp),%ecx .L163: movq .L4,%mm3 pxor %mm1,%mm1 movd (%eax),%mm0 addl $4,%eax punpcklbw %mm1,%mm0 movd (%ebx),%mm2 addl $4,%ebx psubw %mm3,%mm0 punpcklbw %mm1,%mm2 movq (%esi),%mm4 psubw %mm3,%mm2 movq %mm4,%mm5 psrlw $3,%mm3 pand .L3,%mm4 psrlw $8,%mm5 psubw %mm3,%mm4 psubw %mm3,%mm5 psllw $3,%mm0 movq %mm0,%mm6 pmulhrw .L6,%mm6 psllw $2,%mm2 movq %mm2,%mm1 pmulhrw .L9,%mm1 psllw $2,%mm4 pmulhrw .L7,%mm0 psllw $2,%mm5 pmulhrw .L8,%mm2 paddw %mm1,%mm6 pmulhrw .L5,%mm4 movq %mm0,%mm7 pmulhrw .L5,%mm5 movq %mm2,t296(%esp) movq %mm0,%mm1 movq %mm6,t297(%esp) movq %mm2,%mm3 prefetchnta (%esi) paddw %mm4,%mm0 paddw %mm5,%mm1 paddw %mm4,%mm2 packuswb %mm1,%mm0 paddw %mm5,%mm3 psubw %mm6,%mm4 packuswb %mm3,%mm2 psubw %mm6,%mm5 packuswb %mm5,%mm4 movq %mm0,%mm1 punpcklbw %mm4,%mm0 psrlq $32,%mm1 punpckhbw %mm2,%mm4 punpcklbw %mm1,%mm2 movq %mm0,%mm1 punpcklwd %mm2,%mm0 punpckhwd %mm4,%mm2 psllq $32,%mm4 punpckhwd %mm0,%mm4 punpckldq %mm4,%mm0 pshufw $75,%mm4,%mm3 psrlq $32,%mm1 movntq %mm0,(%edi) punpcklwd %mm2,%mm1 pshufw $180,%mm1,%mm1 punpckldq %mm1,%mm3 punpckhdq %mm2,%mm1 movntq %mm3,8(%edi) movntq %mm1,16(%edi) movq (%esi,%ebp),%mm4 addl $8,%esi movq .L12,%mm3 movq %mm4,%mm5 pand .L3,%mm4 psrlw $8,%mm5 psubw %mm3,%mm4 psubw %mm3,%mm5 movq %mm7,%mm0 psllw $2,%mm4 movq t296(%esp),%mm2 psllw $2,%mm5 pmulhrw .L5,%mm4 movq %mm0,%mm1 pmulhrw .L5,%mm5 movq %mm2,%mm3 prefetchnta (%esi) paddw %mm4,%mm0 paddw %mm5,%mm1 paddw %mm4,%mm2 packuswb %mm1,%mm0 paddw %mm5,%mm3 psubw t297(%esp),%mm4 packuswb %mm3,%mm2 psubw t297(%esp),%mm5 packuswb %mm5,%mm4 movq %mm0,%mm1 punpcklbw %mm4,%mm0 psrlq $32,%mm1 punpckhbw %mm2,%mm4 punpcklbw %mm1,%mm2 movq %mm0,%mm1 punpcklwd %mm2,%mm0 punpckhwd %mm4,%mm2 psllq $32,%mm4 punpckhwd %mm0,%mm4 punpckldq %mm4,%mm0 pshufw $75,%mm4,%mm3 psrlq $32,%mm1 movntq %mm0,(%edi,%edx) punpcklwd %mm2,%mm1 pshufw $180,%mm1,%mm1 punpckldq %mm1,%mm3 punpckhdq %mm2,%mm1 movntq %mm3,8(%edi,%edx) movntq %mm1,16(%edi,%edx) addl $24,%edi subl $8,%ecx jne .L163 addl t291(%esp),%esi addl %ebp,%esi movl t293(%esp),%ecx addl %ecx,%eax addl t292(%esp),%edi addl %edx,%edi addl %ecx,%ebx subl $2,t295(%esp) jne .L164 movl t298(%esp),%esp femms popl %edi popl %esi popl %ebp popl %ebx ret .text .align 16 .globl amd_yuyv_rgb565 amd_yuyv_rgb565: pushl %edi pushl %esi pushl %ebx movl 0+12+12(%esp),%ecx movl 0+12+24(%esp),%eax addl %ecx,%ecx movl 0+12+20(%esp),%ebx subl %ecx,%eax movl 0+12+12(%esp),%ecx addl %ecx,%ecx movl 0+12+16(%esp),%edx subl %ecx,%ebx movl 0+12+8(%esp),%esi movl 0+12+4(%esp),%edi .align 16 .L166: movl 0+12+12(%esp),%ecx .L165: movq .L27,%mm7 movq (%esi),%mm4 movq %mm4,%mm6 movq 8(%esi),%mm5 punpcklwd %mm5,%mm4 addl $16,%esi punpckhwd %mm5,%mm6 movq %mm4,%mm5 punpcklwd %mm6,%mm4 movq %mm4,%mm0 punpckhwd %mm6,%mm5 movq .L3,%mm1 movq %mm5,%mm2 movq .L4,%mm3 psrlw $8,%mm0 pand %mm1,%mm4 psubw %mm3,%mm0 psrlw $8,%mm2 pand %mm1,%mm5 psubw %mm3,%mm2 psrlw $3,%mm3 psubw %mm3,%mm4 psubw %mm3,%mm5 psllw $3,%mm0 movq %mm0,%mm6 pmulhrw .L6,%mm6 psllw $2,%mm2 movq %mm2,%mm1 pmulhrw .L9,%mm1 psllw $2,%mm4 pmulhrw .L7,%mm0 psllw $2,%mm5 pmulhrw .L8,%mm2 paddw %mm1,%mm6 pmulhrw .L5,%mm4 movq %mm0,%mm1 pmulhrw .L5,%mm5 movq %mm2,%mm3 prefetchnta (%esi) paddw %mm4,%mm0 paddw %mm5,%mm1 paddw %mm4,%mm2 packuswb %mm1,%mm0 paddw %mm5,%mm3 psubw %mm6,%mm4 packuswb %mm3,%mm2 psubw %mm6,%mm5 packuswb %mm5,%mm4 pand %mm7,%mm2 movq %mm4,%mm5 movq .L28,%mm3 pand %mm7,%mm0 psllq $3,%mm4 pand %mm3,%mm5 psrlq $3,%mm2 pand %mm3,%mm4 por %mm4,%mm2 psrlq $5,%mm5 movq %mm2,%mm3 por %mm5,%mm0 punpcklbw %mm0,%mm2 punpckhbw %mm0,%mm3 movq %mm2,%mm5 punpcklwd %mm3,%mm2 movntq %mm2,(%edi) punpckhwd %mm3,%mm5 movntq %mm5,8(%edi) addl $16,%edi subl $8,%ecx jne .L165 addl %eax,%esi addl %ebx,%edi decl %edx jne .L166 femms popl %ebx popl %esi popl %edi ret .text .align 16 .globl amd_yuv420_rgb565 amd_yuv420_rgb565: pushl %ebx pushl %ebp pushl %esi pushl %edi movl %esp,%ecx leal -48(%esp),%esp andl $-8,%esp t304 = 0 t305 = 8 t306 = 16 t299 = 24 t300 = 28 t301 = 32 t302 = 36 t303 = 40 t307 = 44 movl 0+16+20(%ecx),%ebx movl %ebx,t302(%esp) shrl $1,%ebx movl 0+16+36(%ecx),%eax subl %ebx,%eax movl %eax,t301(%esp) movl 0+16+32(%ecx),%eax addl %ebx,%ebx movl 0+16+4(%ecx),%edi movl %eax,%ebp movl 0+16+28(%ecx),%esi subl %ebx,%eax movl %eax,t299(%esp) addl %ebx,%ebx movl %esi,%edx movl 0+16+24(%ecx),%eax subl %ebx,%esi movl 0+16+16(%ecx),%ebx movl %esi,t300(%esp) movl 0+16+8(%ecx),%esi movl %eax,t303(%esp) movl 0+16+12(%ecx),%eax movl %ecx,t307(%esp) .align 16 .L168: movl t302(%esp),%ecx .L167: movq .L27,%mm7 movq .L4,%mm3 pxor %mm1,%mm1 movd (%eax),%mm0 addl $4,%eax punpcklbw %mm1,%mm0 movd (%ebx),%mm2 addl $4,%ebx psubw %mm3,%mm0 punpcklbw %mm1,%mm2 movq (%esi),%mm4 psubw %mm3,%mm2 movq %mm4,%mm5 psrlw $3,%mm3 pand .L3,%mm4 psrlw $8,%mm5 psubw %mm3,%mm4 psubw %mm3,%mm5 psllw $3,%mm0 movq %mm0,%mm6 pmulhrw .L6,%mm6 psllw $2,%mm2 movq %mm2,%mm1 pmulhrw .L9,%mm1 psllw $2,%mm4 pmulhrw .L7,%mm0 psllw $2,%mm5 pmulhrw .L8,%mm2 paddw %mm1,%mm6 pmulhrw .L5,%mm4 movq %mm0,t305(%esp) pmulhrw .L5,%mm5 movq %mm2,t304(%esp) movq %mm0,%mm1 movq %mm6,t306(%esp) movq %mm2,%mm3 prefetchnta (%esi) paddw %mm4,%mm0 paddw %mm5,%mm1 paddw %mm4,%mm2 packuswb %mm1,%mm0 paddw %mm5,%mm3 psubw %mm6,%mm4 packuswb %mm3,%mm2 psubw %mm6,%mm5 packuswb %mm5,%mm4 pand %mm7,%mm2 movq %mm4,%mm5 movq .L28,%mm3 pand %mm7,%mm0 psllq $3,%mm4 pand %mm3,%mm5 psrlq $3,%mm2 pand %mm3,%mm4 por %mm4,%mm2 psrlq $5,%mm5 movq %mm2,%mm3 por %mm5,%mm0 punpcklbw %mm0,%mm2 punpckhbw %mm0,%mm3 movq %mm2,%mm5 punpcklwd %mm3,%mm2 movntq %mm2,(%edi) punpckhwd %mm3,%mm5 movntq %mm5,8(%edi) movq (%esi,%ebp),%mm4 addl $8,%esi movq .L12,%mm3 movq %mm4,%mm5 pand .L3,%mm4 psrlw $8,%mm5 psubw %mm3,%mm4 psubw %mm3,%mm5 movq t305(%esp),%mm0 psllw $2,%mm4 movq t304(%esp),%mm2 psllw $2,%mm5 pmulhrw .L5,%mm4 movq %mm0,%mm1 pmulhrw .L5,%mm5 movq %mm2,%mm3 prefetchnta (%esi) paddw %mm4,%mm0 paddw %mm5,%mm1 paddw %mm4,%mm2 packuswb %mm1,%mm0 paddw %mm5,%mm3 psubw t306(%esp),%mm4 packuswb %mm3,%mm2 psubw t306(%esp),%mm5 packuswb %mm5,%mm4 pand %mm7,%mm2 movq %mm4,%mm5 movq .L28,%mm3 pand %mm7,%mm0 psllq $3,%mm4 pand %mm3,%mm5 psrlq $3,%mm2 pand %mm3,%mm4 por %mm4,%mm2 psrlq $5,%mm5 movq %mm2,%mm3 por %mm5,%mm0 punpcklbw %mm0,%mm2 punpckhbw %mm0,%mm3 movq %mm2,%mm5 punpcklwd %mm3,%mm2 movntq %mm2,(%edi,%edx) punpckhwd %mm3,%mm5 movntq %mm5,8(%edi,%edx) addl $16,%edi subl $8,%ecx jne .L167 addl t299(%esp),%esi addl %ebp,%esi movl t301(%esp),%ecx addl %ecx,%eax addl t300(%esp),%edi addl %edx,%edi addl %ecx,%ebx subl $2,t303(%esp) jne .L168 movl t307(%esp),%esp femms popl %edi popl %esi popl %ebp popl %ebx ret .text .align 16 .globl amd_yuyv_bgr565 amd_yuyv_bgr565: pushl %edi pushl %esi pushl %ebx movl 0+12+12(%esp),%ecx movl 0+12+24(%esp),%eax addl %ecx,%ecx movl 0+12+20(%esp),%ebx subl %ecx,%eax movl 0+12+12(%esp),%ecx addl %ecx,%ecx movl 0+12+16(%esp),%edx subl %ecx,%ebx movl 0+12+8(%esp),%esi movl 0+12+4(%esp),%edi .align 16 .L170: movl 0+12+12(%esp),%ecx .L169: movq .L27,%mm7 movq (%esi),%mm4 movq %mm4,%mm6 movq 8(%esi),%mm5 punpcklwd %mm5,%mm4 addl $16,%esi punpckhwd %mm5,%mm6 movq %mm4,%mm5 punpcklwd %mm6,%mm4 movq %mm4,%mm0 punpckhwd %mm6,%mm5 movq .L3,%mm1 movq %mm5,%mm2 movq .L4,%mm3 psrlw $8,%mm0 pand %mm1,%mm4 psubw %mm3,%mm0 psrlw $8,%mm2 pand %mm1,%mm5 psubw %mm3,%mm2 psrlw $3,%mm3 psubw %mm3,%mm4 psubw %mm3,%mm5 psllw $3,%mm0 movq %mm0,%mm6 pmulhrw .L6,%mm6 psllw $2,%mm2 movq %mm2,%mm1 pmulhrw .L9,%mm1 psllw $2,%mm4 pmulhrw .L7,%mm0 psllw $2,%mm5 pmulhrw .L8,%mm2 paddw %mm1,%mm6 pmulhrw .L5,%mm4 movq %mm0,%mm1 pmulhrw .L5,%mm5 movq %mm2,%mm3 prefetchnta (%esi) paddw %mm4,%mm0 paddw %mm5,%mm1 paddw %mm4,%mm2 packuswb %mm1,%mm0 paddw %mm5,%mm3 psubw %mm6,%mm4 packuswb %mm3,%mm2 psubw %mm6,%mm5 packuswb %mm5,%mm4 pand %mm7,%mm0 movq %mm4,%mm5 movq .L28,%mm3 pand %mm7,%mm2 psllq $3,%mm4 pand %mm3,%mm5 psrlq $3,%mm0 pand %mm3,%mm4 por %mm4,%mm0 psrlq $5,%mm5 movq %mm0,%mm3 por %mm5,%mm2 punpcklbw %mm2,%mm0 punpckhbw %mm2,%mm3 movq %mm0,%mm5 punpcklwd %mm3,%mm0 movntq %mm0,(%edi) punpckhwd %mm3,%mm5 movntq %mm5,8(%edi) addl $16,%edi subl $8,%ecx jne .L169 addl %eax,%esi addl %ebx,%edi decl %edx jne .L170 femms popl %ebx popl %esi popl %edi ret .text .align 16 .globl amd_yuv420_bgr565 amd_yuv420_bgr565: pushl %ebx pushl %ebp pushl %esi pushl %edi movl %esp,%ecx leal -48(%esp),%esp andl $-8,%esp t313 = 0 t314 = 8 t315 = 16 t308 = 24 t309 = 28 t310 = 32 t311 = 36 t312 = 40 t316 = 44 movl 0+16+20(%ecx),%ebx movl %ebx,t311(%esp) shrl $1,%ebx movl 0+16+36(%ecx),%eax subl %ebx,%eax movl %eax,t310(%esp) movl 0+16+32(%ecx),%eax addl %ebx,%ebx movl 0+16+4(%ecx),%edi movl %eax,%ebp movl 0+16+28(%ecx),%esi subl %ebx,%eax movl %eax,t308(%esp) addl %ebx,%ebx movl %esi,%edx movl 0+16+24(%ecx),%eax subl %ebx,%esi movl 0+16+16(%ecx),%ebx movl %esi,t309(%esp) movl 0+16+8(%ecx),%esi movl %eax,t312(%esp) movl 0+16+12(%ecx),%eax movl %ecx,t316(%esp) .align 16 .L172: movl t311(%esp),%ecx .L171: movq .L27,%mm7 movq .L4,%mm3 pxor %mm1,%mm1 movd (%eax),%mm0 addl $4,%eax punpcklbw %mm1,%mm0 movd (%ebx),%mm2 addl $4,%ebx psubw %mm3,%mm0 punpcklbw %mm1,%mm2 movq (%esi),%mm4 psubw %mm3,%mm2 movq %mm4,%mm5 psrlw $3,%mm3 pand .L3,%mm4 psrlw $8,%mm5 psubw %mm3,%mm4 psubw %mm3,%mm5 psllw $3,%mm0 movq %mm0,%mm6 pmulhrw .L6,%mm6 psllw $2,%mm2 movq %mm2,%mm1 pmulhrw .L9,%mm1 psllw $2,%mm4 pmulhrw .L7,%mm0 psllw $2,%mm5 pmulhrw .L8,%mm2 paddw %mm1,%mm6 pmulhrw .L5,%mm4 movq %mm0,t314(%esp) pmulhrw .L5,%mm5 movq %mm2,t313(%esp) movq %mm0,%mm1 movq %mm6,t315(%esp) movq %mm2,%mm3 prefetchnta (%esi) paddw %mm4,%mm0 paddw %mm5,%mm1 paddw %mm4,%mm2 packuswb %mm1,%mm0 paddw %mm5,%mm3 psubw %mm6,%mm4 packuswb %mm3,%mm2 psubw %mm6,%mm5 packuswb %mm5,%mm4 pand %mm7,%mm0 movq %mm4,%mm5 movq .L28,%mm3 pand %mm7,%mm2 psllq $3,%mm4 pand %mm3,%mm5 psrlq $3,%mm0 pand %mm3,%mm4 por %mm4,%mm0 psrlq $5,%mm5 movq %mm0,%mm3 por %mm5,%mm2 punpcklbw %mm2,%mm0 punpckhbw %mm2,%mm3 movq %mm0,%mm5 punpcklwd %mm3,%mm0 movntq %mm0,(%edi) punpckhwd %mm3,%mm5 movntq %mm5,8(%edi) movq (%esi,%ebp),%mm4 addl $8,%esi movq .L12,%mm3 movq %mm4,%mm5 pand .L3,%mm4 psrlw $8,%mm5 psubw %mm3,%mm4 psubw %mm3,%mm5 movq t314(%esp),%mm0 psllw $2,%mm4 movq t313(%esp),%mm2 psllw $2,%mm5 pmulhrw .L5,%mm4 movq %mm0,%mm1 pmulhrw .L5,%mm5 movq %mm2,%mm3 prefetchnta (%esi) paddw %mm4,%mm0 paddw %mm5,%mm1 paddw %mm4,%mm2 packuswb %mm1,%mm0 paddw %mm5,%mm3 psubw t315(%esp),%mm4 packuswb %mm3,%mm2 psubw t315(%esp),%mm5 packuswb %mm5,%mm4 pand %mm7,%mm0 movq %mm4,%mm5 movq .L28,%mm3 pand %mm7,%mm2 psllq $3,%mm4 pand %mm3,%mm5 psrlq $3,%mm0 pand %mm3,%mm4 por %mm4,%mm0 psrlq $5,%mm5 movq %mm0,%mm3 por %mm5,%mm2 punpcklbw %mm2,%mm0 punpckhbw %mm2,%mm3 movq %mm0,%mm5 punpcklwd %mm3,%mm0 movntq %mm0,(%edi,%edx) punpckhwd %mm3,%mm5 movntq %mm5,8(%edi,%edx) addl $16,%edi subl $8,%ecx jne .L171 addl t308(%esp),%esi addl %ebp,%esi movl t310(%esp),%ecx addl %ecx,%eax addl t309(%esp),%edi addl %edx,%edi addl %ecx,%ebx subl $2,t312(%esp) jne .L172 movl t316(%esp),%esp femms popl %edi popl %esi popl %ebp popl %ebx ret .text .align 16 .globl amd_yuyv_rgb5551 amd_yuyv_rgb5551: pushl %edi pushl %esi pushl %ebx movl 0+12+12(%esp),%ecx movl 0+12+24(%esp),%eax addl %ecx,%ecx movl 0+12+20(%esp),%ebx subl %ecx,%eax movl 0+12+12(%esp),%ecx addl %ecx,%ecx movl 0+12+16(%esp),%edx subl %ecx,%ebx movl 0+12+8(%esp),%esi movl 0+12+4(%esp),%edi .align 16 .L174: movl 0+12+12(%esp),%ecx .L173: movq .L27,%mm7 movq (%esi),%mm4 movq %mm4,%mm6 movq 8(%esi),%mm5 punpcklwd %mm5,%mm4 addl $16,%esi punpckhwd %mm5,%mm6 movq %mm4,%mm5 punpcklwd %mm6,%mm4 movq %mm4,%mm0 punpckhwd %mm6,%mm5 movq .L3,%mm1 movq %mm5,%mm2 movq .L4,%mm3 psrlw $8,%mm0 pand %mm1,%mm4 psubw %mm3,%mm0 psrlw $8,%mm2 pand %mm1,%mm5 psubw %mm3,%mm2 psrlw $3,%mm3 psubw %mm3,%mm4 psubw %mm3,%mm5 psllw $3,%mm0 movq %mm0,%mm6 pmulhrw .L6,%mm6 psllw $2,%mm2 movq %mm2,%mm1 pmulhrw .L9,%mm1 psllw $2,%mm4 pmulhrw .L7,%mm0 psllw $2,%mm5 pmulhrw .L8,%mm2 paddw %mm1,%mm6 pmulhrw .L5,%mm4 movq %mm0,%mm1 pmulhrw .L5,%mm5 movq %mm2,%mm3 prefetchnta (%esi) paddw %mm4,%mm0 paddw %mm5,%mm1 paddw %mm4,%mm2 packuswb %mm1,%mm0 paddw %mm5,%mm3 psubw %mm6,%mm4 packuswb %mm3,%mm2 psubw %mm6,%mm5 packuswb %mm5,%mm4 pand %mm7,%mm2 pand %mm7,%mm0 psrlq $3,%mm2 pand %mm7,%mm4 pxor %mm3,%mm3 psrlq $1,%mm0 movq %mm4,%mm5 punpcklbw %mm3,%mm4 movq %mm2,%mm1 punpckhbw %mm3,%mm5 psllw $2,%mm4 punpcklbw %mm0,%mm2 psllw $2,%mm5 por %mm4,%mm2 punpckhbw %mm0,%mm1 movq %mm2,%mm3 por %mm5,%mm1 punpcklwd %mm1,%mm2 movntq %mm2,(%edi) punpckhwd %mm1,%mm3 movntq %mm3,8(%edi) addl $16,%edi subl $8,%ecx jne .L173 addl %eax,%esi addl %ebx,%edi decl %edx jne .L174 femms popl %ebx popl %esi popl %edi ret .text .align 16 .globl amd_yuv420_rgb5551 amd_yuv420_rgb5551: pushl %ebx pushl %ebp pushl %esi pushl %edi movl %esp,%ecx leal -48(%esp),%esp andl $-8,%esp t322 = 0 t323 = 8 t324 = 16 t317 = 24 t318 = 28 t319 = 32 t320 = 36 t321 = 40 t325 = 44 movl 0+16+20(%ecx),%ebx movl %ebx,t320(%esp) shrl $1,%ebx movl 0+16+36(%ecx),%eax subl %ebx,%eax movl %eax,t319(%esp) movl 0+16+32(%ecx),%eax addl %ebx,%ebx movl 0+16+4(%ecx),%edi movl %eax,%ebp movl 0+16+28(%ecx),%esi subl %ebx,%eax movl %eax,t317(%esp) addl %ebx,%ebx movl %esi,%edx movl 0+16+24(%ecx),%eax subl %ebx,%esi movl 0+16+16(%ecx),%ebx movl %esi,t318(%esp) movl 0+16+8(%ecx),%esi movl %eax,t321(%esp) movl 0+16+12(%ecx),%eax movl %ecx,t325(%esp) .align 16 .L176: movl t320(%esp),%ecx .L175: movq .L27,%mm7 movq .L4,%mm3 pxor %mm1,%mm1 movd (%eax),%mm0 addl $4,%eax punpcklbw %mm1,%mm0 movd (%ebx),%mm2 addl $4,%ebx psubw %mm3,%mm0 punpcklbw %mm1,%mm2 movq (%esi),%mm4 psubw %mm3,%mm2 movq %mm4,%mm5 psrlw $3,%mm3 pand .L3,%mm4 psrlw $8,%mm5 psubw %mm3,%mm4 psubw %mm3,%mm5 psllw $3,%mm0 movq %mm0,%mm6 pmulhrw .L6,%mm6 psllw $2,%mm2 movq %mm2,%mm1 pmulhrw .L9,%mm1 psllw $2,%mm4 pmulhrw .L7,%mm0 psllw $2,%mm5 pmulhrw .L8,%mm2 paddw %mm1,%mm6 pmulhrw .L5,%mm4 movq %mm0,t323(%esp) pmulhrw .L5,%mm5 movq %mm2,t322(%esp) movq %mm0,%mm1 movq %mm6,t324(%esp) movq %mm2,%mm3 prefetchnta (%esi) paddw %mm4,%mm0 paddw %mm5,%mm1 paddw %mm4,%mm2 packuswb %mm1,%mm0 paddw %mm5,%mm3 psubw %mm6,%mm4 packuswb %mm3,%mm2 psubw %mm6,%mm5 packuswb %mm5,%mm4 pand %mm7,%mm2 pand %mm7,%mm0 psrlq $3,%mm2 pand %mm7,%mm4 pxor %mm3,%mm3 psrlq $1,%mm0 movq %mm4,%mm5 punpcklbw %mm3,%mm4 movq %mm2,%mm1 punpckhbw %mm3,%mm5 psllw $2,%mm4 punpcklbw %mm0,%mm2 psllw $2,%mm5 por %mm4,%mm2 punpckhbw %mm0,%mm1 movq %mm2,%mm3 por %mm5,%mm1 punpcklwd %mm1,%mm2 movntq %mm2,(%edi) punpckhwd %mm1,%mm3 movntq %mm3,8(%edi) movq (%esi,%ebp),%mm4 addl $8,%esi movq .L12,%mm3 movq %mm4,%mm5 pand .L3,%mm4 psrlw $8,%mm5 psubw %mm3,%mm4 psubw %mm3,%mm5 movq t323(%esp),%mm0 psllw $2,%mm4 movq t322(%esp),%mm2 psllw $2,%mm5 pmulhrw .L5,%mm4 movq %mm0,%mm1 pmulhrw .L5,%mm5 movq %mm2,%mm3 prefetchnta (%esi) paddw %mm4,%mm0 paddw %mm5,%mm1 paddw %mm4,%mm2 packuswb %mm1,%mm0 paddw %mm5,%mm3 psubw t324(%esp),%mm4 packuswb %mm3,%mm2 psubw t324(%esp),%mm5 packuswb %mm5,%mm4 pand %mm7,%mm2 pand %mm7,%mm0 psrlq $3,%mm2 pand %mm7,%mm4 pxor %mm3,%mm3 psrlq $1,%mm0 movq %mm4,%mm5 punpcklbw %mm3,%mm4 movq %mm2,%mm1 punpckhbw %mm3,%mm5 psllw $2,%mm4 punpcklbw %mm0,%mm2 psllw $2,%mm5 por %mm4,%mm2 punpckhbw %mm0,%mm1 movq %mm2,%mm3 por %mm5,%mm1 punpcklwd %mm1,%mm2 movntq %mm2,(%edi,%edx) punpckhwd %mm1,%mm3 movntq %mm3,8(%edi,%edx) addl $16,%edi subl $8,%ecx jne .L175 addl t317(%esp),%esi addl %ebp,%esi movl t319(%esp),%ecx addl %ecx,%eax addl t318(%esp),%edi addl %edx,%edi addl %ecx,%ebx subl $2,t321(%esp) jne .L176 movl t325(%esp),%esp femms popl %edi popl %esi popl %ebp popl %ebx ret .text .align 16 .globl amd_yuyv_bgr5551 amd_yuyv_bgr5551: pushl %edi pushl %esi pushl %ebx movl 0+12+12(%esp),%ecx movl 0+12+24(%esp),%eax addl %ecx,%ecx movl 0+12+20(%esp),%ebx subl %ecx,%eax movl 0+12+12(%esp),%ecx addl %ecx,%ecx movl 0+12+16(%esp),%edx subl %ecx,%ebx movl 0+12+8(%esp),%esi movl 0+12+4(%esp),%edi .align 16 .L178: movl 0+12+12(%esp),%ecx .L177: movq .L27,%mm7 movq (%esi),%mm4 movq %mm4,%mm6 movq 8(%esi),%mm5 punpcklwd %mm5,%mm4 addl $16,%esi punpckhwd %mm5,%mm6 movq %mm4,%mm5 punpcklwd %mm6,%mm4 movq %mm4,%mm0 punpckhwd %mm6,%mm5 movq .L3,%mm1 movq %mm5,%mm2 movq .L4,%mm3 psrlw $8,%mm0 pand %mm1,%mm4 psubw %mm3,%mm0 psrlw $8,%mm2 pand %mm1,%mm5 psubw %mm3,%mm2 psrlw $3,%mm3 psubw %mm3,%mm4 psubw %mm3,%mm5 psllw $3,%mm0 movq %mm0,%mm6 pmulhrw .L6,%mm6 psllw $2,%mm2 movq %mm2,%mm1 pmulhrw .L9,%mm1 psllw $2,%mm4 pmulhrw .L7,%mm0 psllw $2,%mm5 pmulhrw .L8,%mm2 paddw %mm1,%mm6 pmulhrw .L5,%mm4 movq %mm0,%mm1 pmulhrw .L5,%mm5 movq %mm2,%mm3 prefetchnta (%esi) paddw %mm4,%mm0 paddw %mm5,%mm1 paddw %mm4,%mm2 packuswb %mm1,%mm0 paddw %mm5,%mm3 psubw %mm6,%mm4 packuswb %mm3,%mm2 psubw %mm6,%mm5 packuswb %mm5,%mm4 pand %mm7,%mm0 pand %mm7,%mm2 psrlq $3,%mm0 pand %mm7,%mm4 pxor %mm3,%mm3 psrlq $1,%mm2 movq %mm4,%mm5 punpcklbw %mm3,%mm4 movq %mm0,%mm1 punpckhbw %mm3,%mm5 psllw $2,%mm4 punpcklbw %mm2,%mm0 psllw $2,%mm5 por %mm4,%mm0 punpckhbw %mm2,%mm1 movq %mm0,%mm3 por %mm5,%mm1 punpcklwd %mm1,%mm0 movntq %mm0,(%edi) punpckhwd %mm1,%mm3 movntq %mm3,8(%edi) addl $16,%edi subl $8,%ecx jne .L177 addl %eax,%esi addl %ebx,%edi decl %edx jne .L178 femms popl %ebx popl %esi popl %edi ret .text .align 16 .globl amd_yuv420_bgr5551 amd_yuv420_bgr5551: pushl %ebx pushl %ebp pushl %esi pushl %edi movl %esp,%ecx leal -48(%esp),%esp andl $-8,%esp t331 = 0 t332 = 8 t333 = 16 t326 = 24 t327 = 28 t328 = 32 t329 = 36 t330 = 40 t334 = 44 movl 0+16+20(%ecx),%ebx movl %ebx,t329(%esp) shrl $1,%ebx movl 0+16+36(%ecx),%eax subl %ebx,%eax movl %eax,t328(%esp) movl 0+16+32(%ecx),%eax addl %ebx,%ebx movl 0+16+4(%ecx),%edi movl %eax,%ebp movl 0+16+28(%ecx),%esi subl %ebx,%eax movl %eax,t326(%esp) addl %ebx,%ebx movl %esi,%edx movl 0+16+24(%ecx),%eax subl %ebx,%esi movl 0+16+16(%ecx),%ebx movl %esi,t327(%esp) movl 0+16+8(%ecx),%esi movl %eax,t330(%esp) movl 0+16+12(%ecx),%eax movl %ecx,t334(%esp) .align 16 .L180: movl t329(%esp),%ecx .L179: movq .L27,%mm7 movq .L4,%mm3 pxor %mm1,%mm1 movd (%eax),%mm0 addl $4,%eax punpcklbw %mm1,%mm0 movd (%ebx),%mm2 addl $4,%ebx psubw %mm3,%mm0 punpcklbw %mm1,%mm2 movq (%esi),%mm4 psubw %mm3,%mm2 movq %mm4,%mm5 psrlw $3,%mm3 pand .L3,%mm4 psrlw $8,%mm5 psubw %mm3,%mm4 psubw %mm3,%mm5 psllw $3,%mm0 movq %mm0,%mm6 pmulhrw .L6,%mm6 psllw $2,%mm2 movq %mm2,%mm1 pmulhrw .L9,%mm1 psllw $2,%mm4 pmulhrw .L7,%mm0 psllw $2,%mm5 pmulhrw .L8,%mm2 paddw %mm1,%mm6 pmulhrw .L5,%mm4 movq %mm0,t332(%esp) pmulhrw .L5,%mm5 movq %mm2,t331(%esp) movq %mm0,%mm1 movq %mm6,t333(%esp) movq %mm2,%mm3 prefetchnta (%esi) paddw %mm4,%mm0 paddw %mm5,%mm1 paddw %mm4,%mm2 packuswb %mm1,%mm0 paddw %mm5,%mm3 psubw %mm6,%mm4 packuswb %mm3,%mm2 psubw %mm6,%mm5 packuswb %mm5,%mm4 pand %mm7,%mm0 pand %mm7,%mm2 psrlq $3,%mm0 pand %mm7,%mm4 pxor %mm3,%mm3 psrlq $1,%mm2 movq %mm4,%mm5 punpcklbw %mm3,%mm4 movq %mm0,%mm1 punpckhbw %mm3,%mm5 psllw $2,%mm4 punpcklbw %mm2,%mm0 psllw $2,%mm5 por %mm4,%mm0 punpckhbw %mm2,%mm1 movq %mm0,%mm3 por %mm5,%mm1 punpcklwd %mm1,%mm0 movntq %mm0,(%edi) punpckhwd %mm1,%mm3 movntq %mm3,8(%edi) movq (%esi,%ebp),%mm4 addl $8,%esi movq .L12,%mm3 movq %mm4,%mm5 pand .L3,%mm4 psrlw $8,%mm5 psubw %mm3,%mm4 psubw %mm3,%mm5 movq t332(%esp),%mm0 psllw $2,%mm4 movq t331(%esp),%mm2 psllw $2,%mm5 pmulhrw .L5,%mm4 movq %mm0,%mm1 pmulhrw .L5,%mm5 movq %mm2,%mm3 prefetchnta (%esi) paddw %mm4,%mm0 paddw %mm5,%mm1 paddw %mm4,%mm2 packuswb %mm1,%mm0 paddw %mm5,%mm3 psubw t333(%esp),%mm4 packuswb %mm3,%mm2 psubw t333(%esp),%mm5 packuswb %mm5,%mm4 pand %mm7,%mm0 pand %mm7,%mm2 psrlq $3,%mm0 pand %mm7,%mm4 pxor %mm3,%mm3 psrlq $1,%mm2 movq %mm4,%mm5 punpcklbw %mm3,%mm4 movq %mm0,%mm1 punpckhbw %mm3,%mm5 psllw $2,%mm4 punpcklbw %mm2,%mm0 psllw $2,%mm5 por %mm4,%mm0 punpckhbw %mm2,%mm1 movq %mm0,%mm3 por %mm5,%mm1 punpcklwd %mm1,%mm0 movntq %mm0,(%edi,%edx) punpckhwd %mm1,%mm3 movntq %mm3,8(%edi,%edx) addl $16,%edi subl $8,%ecx jne .L179 addl t326(%esp),%esi addl %ebp,%esi movl t328(%esp),%ecx addl %ecx,%eax addl t327(%esp),%edi addl %edx,%edi addl %ecx,%ebx subl $2,t330(%esp) jne .L180 movl t334(%esp),%esp femms popl %edi popl %esi popl %ebp popl %ebx ret ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������zapping-0.10cvs6/src/frequencies.c������������������������������������������������������������������ 644 � 764 � 144 � 100201 10423150701 12274� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Zapping (TV viewer for the Gnome Desktop) * Copyright (C) 2000-2001 Iaki Garca Etxebarria * Copyright (C) 2002-2003 Michael H. Schimek * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /** * The frequency table is taken from xawtv with donations around the globe. */ #ifdef HAVE_CONFIG_H # include "config.h" #endif #include <stddef.h> #include <ctype.h> #include "common/math.h" #include <gnome.h> #include "frequencies.h" #include "zmisc.h" /* FIXME video standards need a review. */ #define ALPHA (1 << 0) /* first ... last is alphabetic (ASCII) */ #define UPSTREAM (1 << 1) /* Upstream channel (eg. cable modem) */ #define ALIGN (1 << 2) /* See tv_rf_channel_align() */ struct range { /* Note the prefixes must match the XawTV tables to properly parse the .xawtv config file. */ const char prefix[3]; unsigned flags : 8; /* ALPHA | ... */ unsigned first : 8; /* first channel number */ unsigned last : 8; /* last, inclusive */ unsigned bandwidth : 16; /* kHz */ unsigned frequency : 32; /* of first channel, kHz */ }; #define RANGE_END { "", 0, 0, 0, 0, 0 } #define IS_RANGE_END(r) ((r)->frequency == 0) /* Some common ranges. */ #define RANGE_EIA_2_4 { "", ALIGN, 2, 4, 6000, 55250 } #define RANGE_EIA_5_6 { "", ALIGN, 5, 6, 6000, 77250 } #define RANGE_EIA_VHF { "", ALIGN, 7, 13, 6000, 175250 } #define RANGE_EIA_UHF { "", ALIGN, 14, 83, 6000, 471250 } /* "E"? "S0"? "SE"? Anyway, have to keep that for XawTV compatibility. */ #define RANGE_CCIR_BAND_I { "E", 0, 2, 4, 7000, 48250 } #define RANGE_CCIR_SUBBAND { "S0", 0, 1, 3, 7000, 69250 } /* CCIR Band II FM 88-108 MHz here */ #define RANGE_CCIR_USB { "SE", 0, 1, 10, 7000, 105250 } /* Lower Hyperband */ #define RANGE_CCIR_BAND_III { "E", 0, 5, 12, 7000, 175250 } #define RANGE_CCIR_OSB { "SE", 0, 11, 20, 7000, 231250 } /* Upper Hyperband */ #define RANGE_CCIR_ESB { "S", 0, 21, 41, 8000, 303250 } /* Extended Hyperband */ #define RANGE_CCIR_UHF { "", 0, 21, 69, 8000, 471250 } /* Band IV (21-37), Band V (38-69) */ struct table { const char * name; /* Canonical table name for config */ const char * name_zapping; /* Old Zapping table name */ const char * name_xawtv; /* XawTV table name */ const char * countries; /* ISO 3166 2-char */ const char * domain; /* e.g. "cable" */ unsigned int video_standards; /* set of TV_VIDEOSTD_XXX */ struct range freq_ranges [40]; /* XXX see "ie" table */ }; #define TABLE_END { NULL, NULL, NULL, NULL, NULL, 0, { RANGE_END } } #define IS_TABLE_END(t) ((t)->name == NULL) static const struct table frequency_tables [] = { { /* http://www.eia.org/ */ "eia", "US terrestrial", "us-bcast", "US" "CA", N_("broadcast"), TV_VIDEOSTD_NTSC_M, { RANGE_EIA_2_4, RANGE_EIA_5_6, RANGE_EIA_VHF, RANGE_EIA_UHF, RANGE_END } }, { /* IRC: Incrementally Related Carriers */ "eia-irc", "US cable", "us-cable", "US" "CA", N_("cable IRC"), TV_VIDEOSTD_NTSC_M, { { "", ALIGN, 1, 1, 6000, 73250 }, RANGE_EIA_2_4, RANGE_EIA_5_6, RANGE_EIA_VHF, { "", ALIGN, 14, 22, 6000, 121250 }, /* EIA Midband */ { "", ALIGN, 23, 94, 6000, 217250 }, /* EIA Superband (23-36), Hyperband (37-53) */ { "", ALIGN, 95, 96, 6000, 91250 }, { "", ALIGN, 97, 99, 6000, 103250 }, { "", ALIGN, 100, 125, 6000, 649250 }, { "T", ALIGN | UPSTREAM, 7, 14, 6000, 8250 }, RANGE_END } }, { /* HRC: Harmonically Related Carriers */ "eia-hrc", "US cable-hrc", "us-cable-hrc", "US" "CA", N_("cable HRC"), TV_VIDEOSTD_NTSC_M, { { "", ALIGN, 1, 1, 6000, 72000 }, { "", ALIGN, 2, 4, 6000, 54000 }, { "", ALIGN, 5, 6, 6000, 78000 }, { "", ALIGN, 7, 13, 6000, 174000 }, { "", ALIGN, 14, 22, 6000, 120000 }, { "", ALIGN, 23, 94, 6000, 216000 }, { "", ALIGN, 95, 96, 6000, 90000 }, { "", ALIGN, 97, 99, 6000, 102000 }, { "", ALIGN, 100, 125, 6000, 648000 }, { "T", ALIGN | UPSTREAM, 7, 14, 6000, 7000 }, RANGE_END } #if 0 /* XXX apparently not, check this */ }, { "ca-cable", "Canada cable", "canada-cable", "CA", N_("cable"), TV_VIDEOSTD_NTSC_M, { { "", ALIGN, 2, 4, 6000, 61750 }, { "", ALIGN, 5, 6, 6000, 83750 }, { "", ALIGN, 7, 13, 6000, 181750 }, { "", ALIGN, 14, 22, 6000, 127750 }, { "", ALIGN, 23, 94, 6000, 223750 }, { "", ALIGN, 95, 95, 6000, 97750 }, { "", ALIGN, 96, 99, 6000, 103750 }, { "", ALIGN, 100, 125, 6000, 655750 }, RANGE_END } #endif }, { "jp", "Japan terrestrial", "japan-bcast", "JP", N_("broadcast"), TV_VIDEOSTD_NTSC_M_JP, { { "", ALIGN, 1, 3, 6000, 91250 }, { "", ALIGN, 4, 7, 6000, 171250 }, /* NB #7 is 189250 */ { "", ALIGN, 8, 12, 6000, 193250 }, { "", ALIGN, 13, 62, 6000, 471250 }, RANGE_END } }, { /* ALIGN? */ "jp-cable", "Japan cable", "japan-cable", "JP", N_("cable"), TV_VIDEOSTD_NTSC_M_JP, { { "", ALIGN, 13, 22, 6000, 109250 }, { "", ALIGN, 23, 23, 6000, 223250 }, { "", ALIGN, 24, 27, 6000, 231250 }, /* NB #27 is 249250 */ { "", ALIGN, 28, 63, 6000, 253250 }, RANGE_END } }, { /* CCIR is now ITU-R. http://www.itu.int/ */ /* Not all countries use all bands, maybe we should split this table accordingly. */ "ccir", "Europe", "europe-west", "AT" "BE" "CH" "DE" "DK" "ES" "FI" "GR" "IN" "KH" "MY" "NL" "NO" "PT" "SE" "SG" "TH" "UK", NULL, TV_VIDEOSTD_PAL_B | TV_VIDEOSTD_PAL_G, /* I in UK? */ { RANGE_CCIR_BAND_I, RANGE_CCIR_SUBBAND, RANGE_CCIR_USB, RANGE_CCIR_BAND_III, RANGE_CCIR_OSB, RANGE_CCIR_ESB, RANGE_CCIR_UHF, RANGE_END } }, { "au", "Australia", "australia", "AU", NULL, TV_VIDEOSTD_PAL_B, /* I? */ { { "", 0, 0, 0, 7000, 46250 }, { "", 0, 1, 2, 7000, 57250 }, { "", 0, 3, 3, 7000, 86250 }, { "", 0, 4, 5, 7000, 95250 }, { "", 0, 6, 9, 7000, 175250 }, { "", 0, 10, 11, 7000, 209250 }, { "", 0, 28, 69, 7000, 527250 }, /* Band IV-V */ RANGE_END } }, { "au-optus", "Australia Optus", "australia-optus", "AU", "Optus", TV_VIDEOSTD_PAL_B, /* I? */ { { "", 0, 1, 1, 7000, 138250 }, { "", 0, 2, 9, 7000, 147250 }, { "", 0, 10, 11, 7000, 209250 }, { "", 0, 12, 22, 7000, 224250 }, { "", 0, 23, 26, 7000, 303250 }, { "", 0, 27, 48, 7000, 338250 }, RANGE_END } }, { "it", "Italy", "italy", "IT", NULL, TV_VIDEOSTD_PAL_B, { { "", ALPHA, 'A', 'A', 7000, 53750 }, /* Band I (A-B) */ { "", ALPHA, 'B', 'B', 7000, 62250 }, { "", ALPHA, 'C', 'C', 7000, 82250 }, /* Band II (C) */ { "", ALPHA, 'D', 'D', 7000, 175250 }, /* Band III (D-H) */ { "", ALPHA, 'E', 'E', 7000, 183250 }, { "", ALPHA, 'F', 'F', 7000, 192250 }, { "", ALPHA, 'G', 'G', 7000, 201250 }, { "", ALPHA, 'H', 'H', 7000, 210250 }, { "H", 0, 1, 2, 7000, 217250 }, /* Band III (H1-H2) */ RANGE_CCIR_UHF, RANGE_END } }, { /* OIRT unexists, merged with EBU in 1993. */ "oirt", "Eastern Europe", "europe-east", "AL" "BA" "BG" "CZ" "HR" "HU" "MK" "PL" "RO" "SK" "YU", NULL, 0, /* STD? */ { { "R", 0, 1, 1, 7000, 49750 }, /* Band I (R1-R3) ... */ { "R", 0, 2, 2, 7000, 59250 }, { "R", 0, 3, 4, 7000, 77250 }, /* Band II (R4-R5) ... */ { "R", 0, 5, 5, 7000, 93250 }, RANGE_CCIR_USB, { "SR", 0, 1, 8, 8000, 111250 }, { "R", 0, 6, 12, 8000, 175250 }, /* Band III ... */ { "SR", 0, 11, 18, 8000, 231250 }, /* XXX which one is right? */ #if 1 /* XawTV */ { "S", 0, 19, 40, 8000, 295250 }, #else /* ? */ { "S", 0, 11, 19, 8000, 231250 }, { "S", 0, 21, 41, 8000, 303250 }, #endif RANGE_CCIR_UHF, RANGE_END } }, { "pl-atk", "Poland Autocom cable", NULL, /* TRANSLATORS: Leave "Autocom" untranslated. */ "PL", N_("Autocom cable"), 0, /* STD? */ { { "S", 0, 1, 12, 8000, 111250 }, { "S", 0, 13, 42, 8000, 215250 }, { "S", 0, 43, 50, 8000, 471250 }, { "S", 0, 51, 64, 8000, 551250 }, { "S", 0, 65, 66, 8000, 711250 }, { "S", 0, 67, 67, 8000, 743250 }, RANGE_END } }, { /* OIRT Russia (?) */ "ru", "Russia", "russia", "RU", NULL, 0, /* STD? */ { /* XXX which one is right? */ #if 1 /* XawTV */ { "R", 0, 1, 1, 7000, 49750 }, /* Band I (R1-R3) ... */ { "R", 0, 2, 2, 7000, 59250 }, { "R", 0, 3, 4, 7000, 77250 }, /* Band II (R4-R5) ... */ { "R", 0, 5, 5, 7000, 93250 }, { "SR", 0, 1, 8, 8000, 111250 }, { "R", 0, 6, 12, 8000, 175250 }, /* Band III ... */ { "SR", 0, 11, 18, 8000, 231250 }, { "S", 0, 19, 40, 8000, 295250 }, #else /* ? */ { "", 0, 1, 1, 8000, 48500 }, { "", 0, 2, 2, 8000, 58000 }, { "", 0, 3, 5, 8000, 76000 }, { "", 0, 6, 12, 8000, 174000 }, { "", 0, 21, 60, 8000, 470000 }, #endif RANGE_CCIR_UHF, RANGE_END } }, { "ie", "Ireland", "ireland", "IE", NULL, TV_VIDEOSTD_PAL_I, { /* XXX which one is right? And WTF? */ #if 1 /* XawTV */ { "A", 0, 0, 0, 8000, 45750 }, { "A", 0, 1, 1, 8000, 48000 }, { "A", 0, 2, 2, 8000, 53570 }, { "A", 0, 3, 3, 8000, 56000 }, { "A", 0, 4, 4, 8000, 61750 }, { "A", 0, 5, 5, 8000, 64000 }, { "A", 0, 6, 6, 8000, 175250 }, { "A", 0, 7, 7, 8000, 176000 }, { "A", 0, 8, 8, 8000, 183250 }, { "A", 0, 9, 9, 8000, 184000 }, { "A", 0, 10, 10, 8000, 191250 }, { "A", 0, 11, 11, 8000, 192000 }, { "A", 0, 12, 12, 8000, 199250 }, { "A", 0, 13, 13, 8000, 200000 }, { "A", 0, 14, 14, 8000, 207250 }, { "A", 0, 15, 15, 8000, 208000 }, { "A", 0, 16, 16, 8000, 215250 }, { "A", 0, 17, 17, 8000, 216000 }, { "A", 0, 18, 19, 8000, 224000 }, { "A", 0, 20, 29, 8000, 248000 }, { "A", 0, 30, 31, 8000, 344000 }, { "A", 0, 32, 33, 8000, 408000 }, { "A", 0, 34, 34, 8000, 448000 }, { "A", 0, 35, 35, 8000, 480000 }, { "A", 0, 36, 36, 8000, 520000 }, #else { "", 0, 0, 2, 8000, 45750 }, /* Band I (A-C) */ { "", 0, 3, 8, 8000, 175750 }, /* Band III (D-J) */ #endif RANGE_CCIR_UHF, RANGE_END } }, { "fr", "France", "france", "FR", NULL, TV_VIDEOSTD_SECAM_L, { { "K0", 0, 1, 1, 7000, 47750 }, { "K0", 0, 2, 2, 7000, 55750 }, { "K0", 0, 3, 3, 7000, 60500 }, { "K0", 0, 4, 4, 7000, 63750 }, { "K0", 0, 5, 9, 8000, 176000 }, /* Band III (K5-K10) */ { "K", 0, 10, 10, 8000, 216000 }, { "K", ALPHA, 'B', 'Q', 12000, 116750 }, /* former System E (1984) (KB-KQ) */ { "H0", 0, 1, 9, 8000, 303250 }, { "H", 0, 10, 19, 8000, 375250 }, RANGE_CCIR_UHF, RANGE_END } }, { "nz", "New Zealand", "newzealand", "NZ", NULL, 0, /* STD? */ { { "", 0, 1, 1, 7000, 45250 }, { "", 0, 2, 3, 7000, 55250 }, { "", 0, 4, 5, 7000, 175250 }, { "5", ALPHA, 'A', 'A', 7000, 138250 }, { "", 0, 6, 7, 7000, 189250 }, /* NB #7 is 196250 */ { "", 0, 8, 10, 7000, 203250 }, RANGE_CCIR_UHF, RANGE_END } }, { "za", "South Africa", "southafrica", "ZA", NULL, 0, /* STD? */ { /* XXX which one is right? */ #if 1 /* XawTV */ { "", 0, 1, 13, 8000, 175250 }, /* Band III */ #else /* ? */ { "", 0, 4, 11, 8000, 175250 }, /* Band III (4-11) */ { "", 0, 13, 13, 8000, 247430 }, /* Band III (247,43 sic) */ #endif RANGE_CCIR_UHF, RANGE_END } }, { "cn", "China", "china-bcast", "CN", NULL, 0, /* STD? */ { { "", 0, 1, 3, 8000, 49750 }, { "", 0, 4, 5, 8000, 77250 }, { "", 0, 6, 49, 8000, 112250 }, { "", 0, 50, 94, 8000, 463250 }, RANGE_END } }, { "ar", "Argentina", "argentina", "AR", NULL, TV_VIDEOSTD_PAL_NC, { /* Prefix "0" from XawTV. */ { "0", 0, 1, 3, 6000, 56250 }, { "0", 0, 4, 4, 6000, 78250 }, { "0", 0, 5, 5, 6000, 84250 }, { "0", 0, 6, 12, 6000, 176250 }, { "0", 0, 13, 21, 6000, 122250 }, { "0", 0, 22, 93, 6000, 218250 }, RANGE_END } }, { /* Like CCIR, except Band I & III differently numbered */ "id", NULL, NULL, "ID", NULL, TV_VIDEOSTD_PAL_B | TV_VIDEOSTD_PAL_G, { { "", 0, 1, 3, 7000, 48250 }, { "", 0, 4, 11, 7000, 175250 }, RANGE_CCIR_UHF, RANGE_END } }, { /* http://www.kweeconsult.nl/index.html/UPC_channel_table_for_Video4Linux_xawtv */ "nl", NULL, NULL, "NL", N_("UPC cable"), TV_VIDEOSTD_PAL_B | TV_VIDEOSTD_PAL_G | TV_VIDEOSTD_PAL_H | TV_VIDEOSTD_PAL_I, { { "", 0, 5, 12, 8000, 176000 }, /* Band III */ { "S", 0, 11, 19, 8000, 232000 }, /* Upper Hyperband */ { "", 0, 26, 64, 8000, 512000 }, /* Band IV/V */ RANGE_END } }, TABLE_END }; static void get_channel (tv_rf_channel * ch, const struct range * r, unsigned int i) { snprintf (ch->channel_name, sizeof (ch->channel_name), (r->flags & ALPHA) ? "%s%c" : "%s%u", r->prefix, r->first + i); ch->frequency = (r->frequency + r->bandwidth * i) * 1000; ch->_range = r; ch->_channel = i; } static tv_bool first_channel (tv_rf_channel * ch, const struct table * t) { const struct range *r; ch->_table = t; ch->table_name = t->name; ch->country_code[0] = t->countries[0]; ch->country_code[1] = t->countries[1]; ch->country_code[2] = 0; ch->domain = t->domain; ch->video_standards = t->video_standards; r = t->freq_ranges; get_channel (ch, r, 0); ch->bandwidth = r->bandwidth * 1000; return TRUE; } /* * Enumerate channel name prefixes ("S", "E", "R" etc.) used * in the frequency table this RF channel is in, by incrementing * index from 0 up until this function returns NULL. */ const char * tv_rf_channel_table_prefix (tv_rf_channel * ch, unsigned int index) { const struct table *t; const struct range *r; t = ch->_table; for (r = t->freq_ranges; !IS_RANGE_END (r); r++) { const struct range *s; if (r->prefix[0] == 0) continue; for (s = t->freq_ranges; s != r; s++) if (0 == memcmp (s->prefix, r->prefix, sizeof (s->prefix))) break; if (s == r /* unique */ && 0 == index--) return r->prefix; } return NULL; } static tv_bool first_table_by_country (tv_rf_channel * ch, const struct table ** tp, const char * country) { const struct table *t = *tp; const char *s; if (country[0] == 0 || country[1] == 0) return FALSE; for (; !IS_TABLE_END (t); t++) for (s = t->countries; *s; s += 2) if (s[0] == country[0] && s[1] == country[1]) return first_channel (ch, *tp = t); return FALSE; } /* * Return the first RF channel of the first frequency table * with this name, either country code or table name or both * separated by an at-sign (e.g. "DE@ccir"). * * The older Zapping frequency table name or a XawTV table * name will match too. */ tv_bool tv_rf_channel_table_by_name (tv_rf_channel * ch, const char * name) { const struct table *t; if (!name) return first_channel (ch, frequency_tables); /* Table name match */ for (t = frequency_tables; !IS_TABLE_END (t); t++) if (0 == strcmp (t->name, name) || (t->name_zapping && 0 == strcmp (t->name_zapping, name)) || (t->name_xawtv && 0 == strcmp (t->name_xawtv, name))) return first_channel (ch, t); /* Country code "US" or with modifier "US@eia-terr" */ if (name[0] && name[1]) { tv_rf_channel ch2; const char *modifier; t = frequency_tables; if (name[2] == 0) return first_table_by_country (ch, &t, name); else if (name[2] != '@') return FALSE; modifier = name + 3; for (; first_table_by_country (&ch2, &t, name); t++) { if (0 == strcmp (t->name, modifier) || (t->name_zapping && 0 == strcmp (t->name_zapping, modifier)) || (t->name_xawtv && 0 == strcmp (t->name_xawtv, modifier))) { *ch = ch2; return TRUE; } } } return FALSE; } /* * Take the frequency table this channel is in and * return the first RF channel of the next frequency table. * * tv_rf_channel_first_table (&ch); * do ... while (tv_rf_channel_next_table (&ch)); */ tv_bool tv_rf_channel_next_table (tv_rf_channel * ch) { const struct table *t; t = ch->_table; ++t; if (!IS_TABLE_END (t)) return first_channel (ch, t); return FALSE; } /* * Return the first RF channel of the nth (0++) frequency table. */ tv_bool tv_rf_channel_nth_table (tv_rf_channel * ch, unsigned int index) { if (index >= N_ELEMENTS (frequency_tables)) return FALSE; return first_channel (ch, frequency_tables + index); } /* * Return the number of RF channels in the frequency table this * channel is in. */ unsigned int tv_rf_channel_table_size (tv_rf_channel * ch) { const struct table *t; const struct range *r; unsigned int count = 0; t = ch->_table; for (r = t->freq_ranges; !IS_RANGE_END (r); r++) count += r->last - r->first + 1; return count; } /* * Whether channels names should align with channel numbers, * US style. */ extern tv_bool tv_rf_channel_align (tv_rf_channel * ch) { const struct table *t; t = ch->_table; return !!(t->freq_ranges[0].flags & ALIGN); } /* * Given an ISO 3166 country code (e.g. "US"), take the frequency * table this RF channel is in and return the first * RF channel of the next frequency table used in this country. * * tv_rf_channel_first_table_by_country (&ch, "US"); * do { * do ... while (tv_rf_channel_next (&ch)); * } while (tv_rf_channel_next_table_by_country (&ch, "US")); */ tv_bool tv_rf_channel_next_table_by_country (tv_rf_channel * ch, const char * country) { const struct table *t; t = ch->_table; if (NULL == t) t = frequency_tables; return first_table_by_country (ch, &t, country); } /* * Return the RF channel with this name (e.g. "S3") in the * same frequency table as the given channel. * * tv_rf_channel_first_table_by_country (&ch, "US"); * tv_rf_channel_by_name (&ch, "7"); * tv_rf_channel_by_name (&ch, "13"); * tv_rf_channel_by_name (&ch, "S21"); * * XXX accept "S21_DE@ccir"? */ tv_bool tv_rf_channel_by_name (tv_rf_channel * ch, const char * name) { const struct table *t; const struct range *r; tv_rf_channel ch1; unsigned int i; t = ch->_table; for (r = t->freq_ranges; !IS_RANGE_END (r); r++) { for (i = r->first; i <= r->last; i++) { get_channel (&ch1, r, i - r->first); if (0 == strcmp (ch1.channel_name, name)) { strcpy (ch->channel_name, ch1.channel_name); ch->frequency = ch1.frequency; return TRUE; } } ch->_range = 1 + (const struct range *) ch->_range; } return FALSE; } tv_bool tv_rf_channel_first (tv_rf_channel * ch) { const struct table *t; t = ch->_table; get_channel (ch, t->freq_ranges, 0); return TRUE; } /* * Return the next RF channel in the same frequency table. */ tv_bool tv_rf_channel_next (tv_rf_channel * ch) { const struct range *r; r = ch->_range; if ((r->first + ch->_channel + 1) > (r->last)) { ++r; if (IS_RANGE_END (r)) return FALSE; ch->_range = 1 + (const struct range *) ch->_range; ch->_channel = 0; } else { ch->_channel += 1; } get_channel (ch, r, ch->_channel); return TRUE; } /* * Return the RF channel in the same frequency table, with this frequency. * On success ch will change such that frequency lies between * ch->frequency and ch->frequency + ch->bandwidth. Note frequency refers * to the video carrier, not RF channel boundaries. */ tv_bool tv_rf_channel_by_frequency (tv_rf_channel * ch, unsigned int frequency) { const struct table *t; const struct range *r; unsigned int i; t = ch->_table; frequency /= 1000; for (r = t->freq_ranges; !IS_RANGE_END (r); r++) { if (frequency < r->frequency) continue; i = (frequency - r->frequency) / r->bandwidth; if (i + r->first > r->last) continue; get_channel (ch, r, i); return TRUE; } return FALSE; } /* * Return the next country (in ch->country_code) using the * frequency table this RF channel is in. The country * is reset to the first one when switching tables, e.g. with * tv_rf_channel_next_table (). * * Note a country may use more than one table. To traverse * tables by countries use tv_rf_channel_first|next_table_by_country(). */ tv_bool tv_rf_channel_next_country (tv_rf_channel * ch) { const struct table *t; const char *s = ""; t = ch->_table; for (s = t->countries; *s; s += 2) if (s[0] == ch->country_code[0] && s[1] == ch->country_code[1]) break; if (s[0] && s[2]) { ch->country_code[0] = s[2]; ch->country_code[1] = s[3]; ch->country_code[2] = 0; return TRUE; } return FALSE; } /* * Tuned channels */ gboolean tveng_tuned_channel_set_control (tveng_tuned_channel * tc, const gchar * name, gfloat value) { tveng_tc_control *tcc; guint i; for (i = 0; i < tc->num_controls; ++i) if (0 == strncmp (tc->controls[i].name, name, sizeof (tc->controls[i].name) - 1)) { tc->controls[i].value = value; return TRUE; } tcc = g_realloc (tc->controls, (i + 1) * sizeof (*tc->controls)); if (NULL == tcc) return FALSE; tc->controls = tcc; tc->num_controls = i + 1; g_strlcpy (tcc[i].name, name, sizeof (tcc[i].name)); tcc[i].value = value; return TRUE; } #ifdef HAVE_LIBZVBI void tveng_tuned_channel_remove_ttx_encoding (tveng_tuned_channel * tc, vbi3_pgno pgno) { guint i; g_return_if_fail (NULL != tc); for (i = 0; i < tc->num_ttx_encodings; ++i) if (pgno == tc->ttx_encodings[i].pgno) { memmove (&tc->ttx_encodings[i], &tc->ttx_encodings[i + 1], (tc->num_ttx_encodings - i - 1) * sizeof (tc->ttx_encodings[0])); --tc->num_ttx_encodings; break; } } gboolean tveng_tuned_channel_set_ttx_encoding (tveng_tuned_channel * tc, vbi3_pgno pgno, vbi3_charset_code charset_code) { tveng_ttx_encoding *te; guint i; g_return_val_if_fail (NULL != tc, FALSE); if (0 == pgno) return TRUE; if ((vbi3_charset_code) -1 == charset_code) { tveng_tuned_channel_remove_ttx_encoding (tc, pgno); return TRUE; } for (i = 0; i < tc->num_ttx_encodings; ++i) if (pgno == tc->ttx_encodings[i].pgno) { /* XXX notify teletext & subtitle view */ tc->ttx_encodings[i].charset_code = charset_code; return TRUE; } te = g_realloc (tc->ttx_encodings, (i + 1) * sizeof (tc->ttx_encodings[0])); if (NULL == te) return FALSE; tc->ttx_encodings = te; tc->num_ttx_encodings = i + 1; te[i].pgno = pgno; te[i].charset_code = charset_code; return TRUE; } gboolean tveng_tuned_channel_get_ttx_encoding (tveng_tuned_channel * tc, vbi3_charset_code * charset_code, vbi3_pgno pgno) { guint i; g_return_val_if_fail (NULL != tc, FALSE); g_return_val_if_fail (NULL != charset_code, FALSE); for (i = 0; i < tc->num_ttx_encodings; ++i) if (pgno == tc->ttx_encodings[i].pgno) { *charset_code = tc->ttx_encodings[i].charset_code; return TRUE; } return FALSE; } #endif tveng_tuned_channel * tveng_tuned_channel_first (tveng_tuned_channel *list) { if (!list) return NULL; while (list->prev) list = list->prev; return list; } tveng_tuned_channel * tveng_tuned_channel_nth (tveng_tuned_channel *list, guint index) { if (!list) return NULL; if (list->index > index) list = tveng_tuned_channel_first (list); while (list && list->index != index) list = list->next; return list; } static int loose_strcmp (const char * s1, const char * s2) { while (*s1 && *s2) { while (*s1 >= 32 && !isalnum (*s1)) ++s1; while (*s2 >= 32 && !isalnum (*s2)) ++s2; if (*s1 != *s2) return *s1 - *s2; ++s1; ++s2; } return 0; } static tveng_tuned_channel * tveng_tuned_channel_by_string (tveng_tuned_channel * list, const gchar * name, guint offset) { tveng_tuned_channel *tc; tveng_tuned_channel *tc_loose; gchar *s, *t; if (!name || !list) return NULL; g_assert (list->prev == NULL); t = g_utf8_casefold (name, -1); s = g_utf8_normalize (t, -1, G_NORMALIZE_DEFAULT); g_free (t); tc_loose = NULL; for (tc = list; tc; tc = tc->next) { if (0) fprintf(stderr, "TC%p <%s><%s>\n", tc, tc->name, tc->rf_name); t = g_utf8_casefold (* (const gchar **)(((char *) tc) + offset), -1); if (0 == strcmp (s, t)) { g_free (t); g_free (s); return tc; } if (!tc_loose) if (0 == loose_strcmp (s, t)) tc_loose = tc; g_free (t); } g_free (s); return tc_loose; } tveng_tuned_channel * tveng_tuned_channel_by_name (tveng_tuned_channel * list, const gchar * name) { return tveng_tuned_channel_by_string (list, name, offsetof (tveng_tuned_channel, name)); } tveng_tuned_channel * tveng_tuned_channel_by_rf_name (tveng_tuned_channel * list, const gchar * rf_name) { return tveng_tuned_channel_by_string (list, rf_name, offsetof (tveng_tuned_channel, rf_name)); } void tveng_tuned_channel_insert_replace (tveng_tuned_channel ** list, tveng_tuned_channel * tc, guint index, gboolean replace) { tveng_tuned_channel *tci; g_assert (list != NULL); g_assert (tc != NULL); if (*list == NULL) { if (replace && index > 0) { *list = tveng_tuned_channel_new (NULL); } else { tc->next = NULL; tc->prev = NULL; tc->index = 0; *list = tc; return; } } for (tci = tveng_tuned_channel_first (*list); tci->index < index; tci = tci->next) if (!tci->next) { if (replace && (tci->index + 1) < index) { tveng_tuned_channel *ntc; ntc = tveng_tuned_channel_new (NULL); ntc->prev = tci; ntc->index = tci->index + 1; tci->next = ntc; } else { tc->next = NULL; tc->prev = tci; tc->index = tci->index + 1; tci->next = tc; return; } } if (replace && tci->index == index) { tc->prev = tci->prev; tc->next = tci->next; tc->index = tci->index; tc->prev->next = tc; tc->next->prev = tc; tveng_tuned_channel_delete (tci); } else /* insert before tci */ { if (tci->prev) { index = tci->prev->index + 1; tci->prev->next = tc; } else { index = 0; *list = tc; } tc->prev = tci->prev; tc->next = tci; tci->prev = tc; for (; tc; tc = tc->next) tc->index = index++; } } void tveng_tuned_channel_remove (tveng_tuned_channel ** list, tveng_tuned_channel * tc) { guint index; if (!list || !tc) return; g_assert (*list != NULL); g_assert ((*list)->prev == NULL); if (*list == tc) *list = tc->next; if (tc->prev) { index = tc->prev->index + 1; tc->prev->next = tc->next; } else { index = 0; } if (tc->next) { tc->next->prev = tc->prev; for (tc = tc->next; tc; tc = tc->next) tc->index = index++; } } void tveng_tuned_channel_move (tveng_tuned_channel ** list, tveng_tuned_channel * tc, guint new_index) { if (!list || !*list || (!tc->next && !tc->prev)) return; g_assert ((*list)->prev == NULL); /* XXX should not change tc */ tveng_tuned_channel_insert (list, tveng_tuned_channel_new (tc), new_index); tveng_tuned_channel_remove (list, tc); } void tveng_tuned_channel_copy (tveng_tuned_channel * d, const tveng_tuned_channel *s) { g_assert (s != NULL); g_assert (d != NULL); g_free (d->name); g_free (d->rf_name); g_free (d->rf_table); g_free (d->controls); g_free (d->ttx_encodings); d->name = g_utf8_normalize (s->name ? s->name : "", -1, G_NORMALIZE_DEFAULT_COMPOSE); d->rf_name = g_utf8_normalize (s->rf_name ? s->rf_name : "", -1, G_NORMALIZE_DEFAULT_COMPOSE); d->rf_table = g_utf8_normalize (s->rf_table ? s->rf_table : "", -1, G_NORMALIZE_DEFAULT_COMPOSE); d->accel = s->accel; d->frequ = s->frequ; d->input = s->input; d->standard = s->standard; d->num_controls = s->num_controls; if (s->num_controls > 0) { d->controls = g_memdup (s->controls, s->num_controls * sizeof (s->controls[0])); d->num_controls = s->num_controls; } else { d->controls = NULL; d->num_controls = 0; } d->caption_pgno = s->caption_pgno; if (s->num_ttx_encodings > 0) { d->ttx_encodings = g_memdup (s->ttx_encodings, s->num_ttx_encodings * sizeof (s->ttx_encodings[0])); d->num_ttx_encodings = s->num_ttx_encodings; } else { d->ttx_encodings = NULL; d->num_ttx_encodings = 0; } } tveng_tuned_channel * tveng_tuned_channel_new (const tveng_tuned_channel *tc) { tveng_tuned_channel *new_tc; new_tc = g_malloc0 (sizeof (*new_tc)); if (NULL == tc) { new_tc->name = g_strdup (""); new_tc->rf_name = g_strdup (""); new_tc->rf_table = g_strdup (""); } else { tveng_tuned_channel_copy (new_tc, tc); } return new_tc; } void tveng_tuned_channel_delete (tveng_tuned_channel * tc) { if (!tc) return; g_free (tc->name); g_free (tc->rf_name); g_free (tc->rf_table); g_free (tc->controls); g_free (tc->ttx_encodings); CLEAR (*tc); g_free (tc); } tveng_tuned_channel * tveng_tuned_channel_list_new (tveng_tuned_channel * list) { tveng_tuned_channel *new_list; tveng_tuned_channel *tc_prev; tveng_tuned_channel *tc; guint index = 1; if (!list) return NULL; new_list = tveng_tuned_channel_new (list); new_list->index = 0; tc_prev = new_list; list = list->next; while (list) { tc = tveng_tuned_channel_new (list); tc->index = index++; tc_prev->next = tc; tc->prev = tc_prev; tc_prev = tc; list = list->next; } return new_list; } void tveng_tuned_channel_list_delete (tveng_tuned_channel ** list) { if (!list ||!*list) return; g_assert ((*list)->prev == NULL); while (*list) { tveng_tuned_channel *tc = (*list)->next; tveng_tuned_channel_delete (*list); *list = tc; } } gboolean tveng_tuned_channel_in_list (tveng_tuned_channel * list, tveng_tuned_channel * tc) { if (!list || !tc) return FALSE; g_assert (list->prev == NULL); return (list == tveng_tuned_channel_first (tc)); } /* Returns the number of items in the list */ unsigned int tveng_tuned_channel_num (tveng_tuned_channel * list) { unsigned int num_channels = 0; const tveng_tuned_channel *tc_ptr; tc_ptr = tveng_tuned_channel_first (list); while (tc_ptr) { num_channels++; tc_ptr = tc_ptr -> next; } return num_channels; } /* Removes an specific channel form the list. You must provide its the radio frequency name, e.g. "64" instead of "Tele5". Returns -1 if the channel could not be found. If rf_name is NULL, then id is interpreted as the index in the tuned_channel list. Then -1 means out of bounds. if rf_name is not NULL, then the first matching item from id is deleted. */ tveng_tuned_channel * tveng_remove_tuned_channel (gchar * rf_name, int id, tveng_tuned_channel * list) { tveng_tuned_channel *tc; if (!list) return NULL; tc = tveng_tuned_channel_nth (list, (unsigned int) id); if (rf_name) tc = tveng_tuned_channel_by_rf_name (tc, rf_name); /* sic, >= id */ if (tc) { tveng_tuned_channel_remove (&list, tc); tveng_tuned_channel_delete (tc); return tveng_tuned_channel_first (list); } return list; } �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������zapping-0.10cvs6/src/frequencies.h������������������������������������������������������������������ 644 � 764 � 144 � 15121 10305455406 12300� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Zapping (TV viewer for the Gnome Desktop) * * Copyright (C) 2000-2001 Iaki Garca Etxebarria * Copyright (C) 2002-2003 Michael H. Schimek * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* $Id: frequencies.h,v 1.15 2005/09/01 01:36:06 mschimek Exp $ */ #ifndef FREQUENCIES_H #define FREQUENCIES_H #include "tveng.h" #include "keyboard.h" #ifdef HAVE_LIBZVBI # include "libvbi/bcd.h" # include "libvbi/lang.h" #endif typedef struct _tveng_tc_control tveng_tc_control; struct _tveng_tc_control { gchar name [32]; gfloat value; /* [0;1] */ }; typedef struct _tveng_ttx_encoding tveng_ttx_encoding; struct _tveng_ttx_encoding { #ifdef HAVE_LIBZVBI vbi3_pgno pgno; vbi3_charset_code charset_code; #endif }; typedef struct _tveng_tuned_channel tveng_tuned_channel; struct _tveng_tuned_channel { gchar * name; /* Station (RTL, Eurosport, whatever) */ gchar * rf_table; gchar * rf_name; /* RF channel ("35", for example) */ unsigned int input, standard; /* Attached input, standard or 0 */ z_key accel; /* key to select this channel */ unsigned int index; /* Index in the tuned_channel list */ uint32_t frequ; /* Frequency of this RF channel in Hz (may differ from RF table due to fine tuning) */ guint num_controls; /* number of saved controls for this channel */ tveng_tc_control * controls; /* saved controls for this channel */ /* last used subtitle page on this channel */ int caption_pgno; guint num_ttx_encodings; tveng_ttx_encoding * ttx_encodings; /* Don't use this to navigate through the tuned_channel list, use the API instead */ tveng_tuned_channel *prev; tveng_tuned_channel *next; }; typedef struct _tv_rf_channel tv_rf_channel; /* * tv_rf_channel is a kind of iterator representing one element in * a three dimensional frequency table array. The country_code, table_name * and channel_name uniquely identify a channel, the country_code * and table_name a frequency table. The tv_rf_channel functions * move through the array. All strings are static. */ struct _tv_rf_channel { char country_code[4]; /* ASCII ISO 3166, e.g. "US" */ const char * table_name; /* ASCII identifier, e.g. "ccir" */ const char * domain; /* UTF8 localized, e.g. "cable" */ char channel_name[8]; /* UTF8 prefix & channel number, e.g. "S21" */ unsigned int frequency; /* Hz */ unsigned int bandwidth; /* Hz */ unsigned int video_standards; /* future stuff */ /* private */ const void * _table; const void * _range; unsigned int _channel; }; #define tv_rf_channel_first_table(ch) tv_rf_channel_nth_table (ch, 0) extern tv_bool tv_rf_channel_next_table (tv_rf_channel * ch); extern tv_bool tv_rf_channel_nth_table (tv_rf_channel * ch, unsigned int nth); extern unsigned int tv_rf_channel_table_size (tv_rf_channel * ch); extern tv_bool tv_rf_channel_table_by_name (tv_rf_channel * ch, const char * name); #define tv_rf_channel_first_table_by_country(ch, country_code) \ tv_rf_channel_table_by_name (ch, country_code) extern tv_bool tv_rf_channel_next_table_by_country (tv_rf_channel * ch, const char * country_code); extern const char * tv_rf_channel_table_prefix (tv_rf_channel * ch, unsigned int nth); extern tv_bool tv_rf_channel_align (tv_rf_channel * ch); extern tv_bool tv_rf_channel_first (tv_rf_channel * ch); extern tv_bool tv_rf_channel_next (tv_rf_channel * ch); extern tv_bool tv_rf_channel_nth (tv_rf_channel * ch, unsigned int nth); extern tv_bool tv_rf_channel_by_name (tv_rf_channel * ch, const char * name); extern tv_bool tv_rf_channel_by_frequency (tv_rf_channel * ch, unsigned int frequency); extern tv_bool tv_rf_channel_next_country (tv_rf_channel * ch); /* ------------------------------------------------------------------------- */ extern gboolean tveng_tuned_channel_set_control (tveng_tuned_channel * tc, const gchar * name, gfloat value); #ifdef HAVE_LIBZVBI extern gboolean tveng_tuned_channel_set_ttx_encoding (tveng_tuned_channel * tc, vbi3_pgno pgno, vbi3_charset_code charset_code); extern gboolean tveng_tuned_channel_get_ttx_encoding (tveng_tuned_channel * tc, vbi3_charset_code * charset_code, vbi3_pgno pgno); extern void tveng_tuned_channel_remove_ttx_encoding (tveng_tuned_channel * tc, vbi3_pgno pgno); #endif tveng_tuned_channel * tveng_tuned_channel_first (tveng_tuned_channel *list); tveng_tuned_channel * tveng_tuned_channel_nth (tveng_tuned_channel *list, guint nth); tveng_tuned_channel * tveng_tuned_channel_by_name (tveng_tuned_channel * list, const gchar * name); tveng_tuned_channel * tveng_tuned_channel_by_rf_name (tveng_tuned_channel * list, const gchar * rf_name); void tveng_tuned_channel_insert_replace (tveng_tuned_channel ** list, tveng_tuned_channel * tc, guint nth, gboolean replace); #define tveng_tuned_channel_insert(list, tc, index) \ tveng_tuned_channel_insert_replace (list, tc, index, FALSE) #define tveng_tuned_channel_replace(list, tc, index) \ tveng_tuned_channel_insert_replace (list, tc, index, TRUE) void tveng_tuned_channel_move (tveng_tuned_channel ** list, tveng_tuned_channel * tc, guint new_index); void tveng_tuned_channel_remove (tveng_tuned_channel ** list, tveng_tuned_channel * tc); void tveng_tuned_channel_copy (tveng_tuned_channel * dst, const tveng_tuned_channel *src); tveng_tuned_channel * tveng_tuned_channel_new (const tveng_tuned_channel *tc); void tveng_tuned_channel_delete (tveng_tuned_channel * tc); tveng_tuned_channel * tveng_tuned_channel_list_new (tveng_tuned_channel * list); void tveng_tuned_channel_list_delete (tveng_tuned_channel ** list); gboolean tveng_tuned_channel_in_list (tveng_tuned_channel * list, tveng_tuned_channel * tc); /* old stuff */ unsigned int tveng_tuned_channel_num (tveng_tuned_channel * list); tveng_tuned_channel * tveng_remove_tuned_channel (gchar * rf_name, int id, tveng_tuned_channel * list); #endif /* FREQUENCIES_H */ �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������zapping-0.10cvs6/src/v4linterface.c����������������������������������������������������������������� 644 � 764 � 144 � 171730 10402712127 12373� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Zapping (TV viewer for the Gnome Desktop) * Copyright (C) 2000-2001 Iaki Garca Etxebarria * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* XXX gtk+ 2.3 GtkOptionMenu, GnomeColorPicker */ #undef GTK_DISABLE_DEPRECATED #undef GNOME_DISABLE_DEPRECATED #include "site_def.h" #ifdef HAVE_CONFIG_H # include "config.h" #endif #include <gnome.h> #include <math.h> #include <ctype.h> /* Routines for building GUI elements dependant on the v4l device (such as the number of inputs and so on) */ #include "tveng.h" #include "v4linterface.h" #define ZCONF_DOMAIN "/zapping/options/main/" #include "zconf.h" #include "zmisc.h" #include "zspinslider.h" #include "interface.h" #include "zvbi.h" #include "osd.h" #include "globals.h" #include "audio.h" #include "mixer.h" #include "properties-handler.h" #include "xawtv.h" #include "subtitle.h" #include "capture.h" #include "remote.h" struct control_window; struct control_window *ToolBox = NULL; /* Pointer to the last control box */ ZModel *z_input_model = NULL; /* Minimize updates */ static gboolean freeze = FALSE, needs_refresh = FALSE; static gboolean rebuild_channel_menu = TRUE; static void update_bundle (ZModel *model _unused_, tveng_device_info *info _unused_) { if (freeze) { needs_refresh = TRUE; return; } if (rebuild_channel_menu) zapping_rebuild_channel_menu (zapping); } static void freeze_update (void) { freeze = TRUE; needs_refresh = FALSE; } static void thaw_update (void) { freeze = FALSE; if (needs_refresh) update_bundle(z_input_model, zapping->info); needs_refresh = FALSE; } /* * Control box */ struct control { struct control * next; tveng_device_info * info; tv_control * ctrl; tv_callback * tvcb; GtkWidget * widget; }; struct control_window { GtkWidget * window; GtkWidget * hbox; struct control * controls; /* This is only used for building */ GtkWidget * table; guint index; }; static void on_tv_control_destroy (tv_control * ctrl _unused_, void * user_data) { struct control *c = user_data; c->ctrl = NULL; c->tvcb = NULL; } static void free_control (struct control * c) { tv_callback_remove (c->tvcb); g_free (c); } static struct control * add_control (struct control_window *cb, tveng_device_info * info, tv_control * ctrl, GtkWidget * label, GtkWidget * crank, GObject * object, const gchar * signal, void * g_callback, void * tv_callback) { struct control *c, **cp; g_assert (cb != NULL); g_assert (info != NULL); g_assert (ctrl != NULL); g_assert (crank != NULL); for (cp = &cb->controls; (c = *cp); cp = &c->next) ; c = g_malloc0 (sizeof (*c)); c->info = info; c->ctrl = ctrl; c->widget = crank; gtk_table_resize (GTK_TABLE (cb->table), cb->index + 1, 2); if (label) { gtk_widget_show (label); gtk_table_attach (GTK_TABLE (cb->table), label, 0, 1, cb->index, cb->index + 1, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 3, 3); } gtk_widget_show (crank); gtk_table_attach (GTK_TABLE (cb->table), crank, 1, 2, cb->index, cb->index + 1, (GtkAttachOptions) (GTK_FILL | GTK_EXPAND), (GtkAttachOptions) (0), 3, 3); if (object && signal && g_callback) g_signal_connect (object, signal, G_CALLBACK (g_callback), c); if (tv_callback) { c->tvcb = tv_control_add_callback (ctrl, tv_callback, on_tv_control_destroy, c); } *cp = c; return c; } static GtkWidget * control_symbol (tv_control * ctrl) { static const struct { tv_control_id id; const char * stock_id; } pixmaps [] = { { TV_CONTROL_ID_BRIGHTNESS, "zapping-brightness" }, { TV_CONTROL_ID_CONTRAST, "zapping-contrast" }, { TV_CONTROL_ID_SATURATION, "zapping-saturation" }, { TV_CONTROL_ID_HUE, "zapping-hue" }, }; GtkWidget *symbol; guint i; symbol = NULL; for (i = 0; i < G_N_ELEMENTS (pixmaps); ++i) if (0 && ctrl->id == pixmaps[i].id) { symbol = gtk_image_new_from_stock (pixmaps[i].stock_id, GTK_ICON_SIZE_BUTTON); gtk_misc_set_alignment (GTK_MISC (symbol), 1.0, 0.5); symbol = z_tooltip_set_wrap (symbol, ctrl->label); break; } if (!symbol) { symbol = gtk_label_new (ctrl->label); gtk_widget_show (symbol); gtk_misc_set_alignment (GTK_MISC (symbol), 1.0, 0.5); } return symbol; } static void on_control_slider_changed (GtkAdjustment * adjust, gpointer user_data) { struct control *c = user_data; TV_CALLBACK_BLOCK (c->tvcb, tveng_set_control (c->ctrl, (int) adjust->value, c->info)); } static void on_tv_control_integer_changed (tv_control * ctrl, void * user_data) { struct control *c = user_data; ZSpinSlider *sp; sp = Z_SPINSLIDER (c->widget); SIGNAL_HANDLER_BLOCK (sp->spin_adj, on_control_slider_changed, z_spinslider_set_int_value (sp, ctrl->value)); } static void create_slider (struct control_window *cb, tveng_device_info * info, tv_control * ctrl) { GObject *adj; /* Adjustment object for the slider */ GtkWidget *spinslider; /* XXX use tv_control.step */ adj = G_OBJECT (gtk_adjustment_new ((gfloat) ctrl->value, (gfloat) ctrl->minimum, (gfloat) ctrl->maximum, (gfloat) 1, (gfloat) 10, (gfloat) 10)); spinslider = z_spinslider_new (GTK_ADJUSTMENT (adj), NULL, NULL, (gfloat) ctrl->reset, 0); z_spinslider_set_int_value (Z_SPINSLIDER (spinslider), ctrl->value); add_control (cb, info, ctrl, control_symbol (ctrl), spinslider, adj, "value-changed", on_control_slider_changed, on_tv_control_integer_changed); } static void on_control_checkbutton_toggled (GtkToggleButton * tb, gpointer user_data) { struct control *c = user_data; if (c->ctrl->id == TV_CONTROL_ID_MUTE) { TV_CALLBACK_BLOCK (c->tvcb, tv_mute_set (c->info, gtk_toggle_button_get_active (tb))); /* Update tool button & menu XXX switch to callback */ set_mute (3, /* controls */ FALSE, /* osd */ FALSE); } else { TV_CALLBACK_BLOCK (c->tvcb, tveng_set_control (c->ctrl, gtk_toggle_button_get_active (tb), c->info)); } } static void on_tv_control_boolean_changed (tv_control * ctrl, void * user_data) { struct control *c = user_data; SIGNAL_HANDLER_BLOCK (c->widget, on_control_checkbutton_toggled, gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (c->widget), ctrl->value)); } static void create_checkbutton (struct control_window *cb, tveng_device_info * info, tv_control * ctrl) { GtkWidget *check_button; check_button = gtk_check_button_new_with_label (ctrl->label); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (check_button), ctrl->value); add_control (cb, info, ctrl, /* label */ NULL, check_button, G_OBJECT (check_button), "toggled", on_control_checkbutton_toggled, on_tv_control_boolean_changed); } static void on_control_menuitem_activate (GtkMenuItem * menuitem, gpointer user_data) { struct control *c = user_data; gint value; value = z_object_get_int_data (G_OBJECT (menuitem), "value"); tveng_set_control (c->ctrl, value, c->info); } static void create_menu (struct control_window *cb, tveng_device_info * info, tv_control * ctrl) { GtkWidget *label; /* This shows what the menu is for */ GtkWidget *option_menu; /* The option menu */ GtkWidget *menu; /* The menu displayed */ GtkWidget *menu_item; /* Each of the menu items */ struct control *c; guint i; label = gtk_label_new (ctrl->label); gtk_misc_set_alignment (GTK_MISC (label), 1.0, 0.5); option_menu = gtk_option_menu_new (); menu = gtk_menu_new (); gtk_widget_show (menu); gtk_option_menu_set_menu (GTK_OPTION_MENU (option_menu), menu); c = add_control (cb, info, ctrl, label, option_menu, NULL, NULL, NULL, NULL); /* Start querying menu_items and building the menu */ for (i = 0; ctrl->menu[i] != NULL; i++) { menu_item = gtk_menu_item_new_with_label (_(ctrl->menu[i])); gtk_widget_show (menu_item); g_object_set_data (G_OBJECT (menu_item), "value", GINT_TO_POINTER (i)); g_signal_connect (G_OBJECT (menu_item), "activate", G_CALLBACK (on_control_menuitem_activate), c); gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_item); } gtk_option_menu_set_history (GTK_OPTION_MENU (option_menu), (guint) ctrl->value); } static void on_control_button_clicked (GtkButton * button _unused_, gpointer user_data) { struct control *c = user_data; tveng_set_control (c->ctrl, 1, c->info); } static void create_button (struct control_window *cb, tveng_device_info * info, tv_control * ctrl) { GtkWidget *button; button = gtk_button_new_with_label (ctrl->label); add_control (cb, info, ctrl, /* label */ NULL, button, G_OBJECT (button), "clicked", on_control_button_clicked, NULL); } static void on_color_set (GnomeColorPicker * colorpicker _unused_, guint arg1, guint arg2, guint arg3, guint arg4 _unused_, gpointer user_data) { struct control *c = user_data; guint color; color = (arg1 >> 8) << 16; /* red */ color += (arg2 >> 8) << 8; /* green */ color += (arg3 >> 8); /* blue */ /* arg4 alpha ignored */ tveng_set_control (c->ctrl, (int) color, c->info); } static void create_color_picker (struct control_window *cb, tveng_device_info * info, tv_control * ctrl) { GtkWidget *label; GnomeColorPicker *color_picker; gchar *buffer; label = gtk_label_new (ctrl->label); gtk_misc_set_alignment (GTK_MISC (label), 1.0, 0.5); color_picker = GNOME_COLOR_PICKER (gnome_color_picker_new ()); gnome_color_picker_set_use_alpha (color_picker, FALSE); gnome_color_picker_set_i8 (color_picker, (ctrl->value & 0xff0000) >> 16, (ctrl->value & 0xff00) >> 8, (ctrl->value & 0xff), 0); /* TRANSLATORS: In controls box, color picker control, something like "Adjust Chroma-Key" for overlay. */ buffer = g_strdup_printf (_("Adjust %s"), ctrl->label); gnome_color_picker_set_title (color_picker, buffer); g_free (buffer); add_control (cb, info, ctrl, label, GTK_WIDGET(color_picker), G_OBJECT (color_picker), "color-set", on_color_set, NULL); } static void add_controls (struct control_window *cb, tveng_device_info * info) { tv_control *ctrl; if (cb->hbox) { struct control *c; while ((c = cb->controls)) { cb->controls = c->next; free_control (c); } gtk_container_remove (GTK_CONTAINER (cb->window), cb->hbox); } cb->hbox = gtk_hbox_new (FALSE, 0); gtk_container_set_border_width (GTK_CONTAINER (cb->hbox), 6); gtk_container_add (GTK_CONTAINER (cb->window), cb->hbox); /* Update the values of all the controls */ if (-1 == tveng_update_controls (info)) { /* FIXME aborting is no proper way to handle this. ShowBox ("Tveng critical error, Zapping will exit NOW.", GTK_MESSAGE_ERROR); g_error ("tveng critical: %s", info->error); */ } cb->table = NULL; cb->index = 0; for (ctrl = tv_next_control (info, NULL); ctrl; ctrl = ctrl->_next) { const tv_video_standard *vs; if (ctrl->id == TV_CONTROL_ID_HUE) if ((vs = tv_cur_video_standard (info))) if (!(vs->videostd_set & TV_VIDEOSTD_SET_NTSC)) { /* Useless. XXX connect to standard change callback. */ tveng_set_control (ctrl, ctrl->reset, info); continue; } if ((cb->index % 20) == 0) { if (cb->table) { gtk_widget_show (cb->table); gtk_box_pack_start_defaults (GTK_BOX (cb->hbox), cb->table); } cb->table = gtk_table_new (1, 2, FALSE); } switch (ctrl->type) { case TV_CONTROL_TYPE_INTEGER: create_slider (cb, info, ctrl); break; case TV_CONTROL_TYPE_BOOLEAN: create_checkbutton (cb, info, ctrl); break; case TV_CONTROL_TYPE_CHOICE: create_menu (cb, info, ctrl); break; case TV_CONTROL_TYPE_ACTION: create_button (cb, info, ctrl); break; case TV_CONTROL_TYPE_COLOR: create_color_picker (cb, info, ctrl); break; default: g_warning ("Type %d of control %s is not supported", ctrl->type, ctrl->label); continue; } cb->index++; } if (cb->table) { gtk_widget_show (cb->table); gtk_box_pack_start_defaults (GTK_BOX (cb->hbox), cb->table); } gtk_widget_show (cb->hbox); } static gboolean on_control_window_key_press (GtkWidget * widget, GdkEventKey * event, gpointer user_data) { switch (event->keyval) { case GDK_Escape: gtk_widget_destroy (widget); return TRUE; /* handled */ case GDK_c: case GDK_C: if (event->state & GDK_CONTROL_MASK) { gtk_widget_destroy (widget); return TRUE; /* handled */ } default: break; } return on_channel_enter (widget, event, user_data) || on_user_key_press (widget, event, user_data) || on_picture_size_key_press (widget, event, user_data) || on_channel_key_press (widget, event, user_data); } static void on_control_window_destroy (GtkWidget * widget _unused_, gpointer user_data) { struct control_window *cb = user_data; struct control *c; ToolBox = NULL; while ((c = cb->controls)) { cb->controls = c->next; free_control (c); } g_free (cb); /* See below. gtk_widget_set_sensitive (lookup_widget (GTK_WIDGET (zapping), "toolbar-controls"), TRUE); */ } static void create_control_window (void) { struct control_window *cb; cb = g_malloc0 (sizeof (*cb)); cb->window = gtk_window_new (GTK_WINDOW_TOPLEVEL); gtk_window_set_title (GTK_WINDOW (cb->window), _("Controls")); g_signal_connect (G_OBJECT (cb->window), "destroy", G_CALLBACK (on_control_window_destroy), cb); g_signal_connect (G_OBJECT(cb->window), "key-press-event", G_CALLBACK (on_control_window_key_press), cb); add_controls (cb, zapping->info); gtk_widget_show (cb->window); /* Not good because it may just raise a hidden control window. gtk_widget_set_sensitive (lookup_widget (GTK_WIDGET (zapping), "toolbar-controls"), FALSE); */ ToolBox = cb; } static PyObject * py_control_box (PyObject * self _unused_, PyObject * args _unused_) { if (ToolBox == NULL) create_control_window (); else gtk_window_present (GTK_WINDOW (ToolBox->window)); py_return_none; } void update_control_box (tveng_device_info * info) { struct control *c; tv_control *ctrl; if (!ToolBox) return; c = ToolBox->controls; for (ctrl = tv_next_control (info, NULL); ctrl; ctrl = ctrl->_next) { /* XXX Is this safe? Unlikely. */ if (!c || c->ctrl != ctrl) goto rebuild; switch (ctrl->type) { case TV_CONTROL_TYPE_INTEGER: on_tv_control_integer_changed (ctrl, c); break; case TV_CONTROL_TYPE_BOOLEAN: on_tv_control_boolean_changed (ctrl, c); break; case TV_CONTROL_TYPE_CHOICE: gtk_option_menu_set_history (GTK_OPTION_MENU (c->widget), (guint) ctrl->value); break; case TV_CONTROL_TYPE_ACTION: break; case TV_CONTROL_TYPE_COLOR: gnome_color_picker_set_i8 (GNOME_COLOR_PICKER (c->widget), (ctrl->value & 0xff0000) >> 16, (ctrl->value & 0xff00) >> 8, (ctrl->value & 0xff), 0); break; default: g_warning ("Type %d of control %s is not supported", ctrl->type, ctrl->label); continue; } c = c->next; } return; rebuild: add_controls (ToolBox, info); } /* XXX these functions change an a/v source property but do not switch away from the current tveng_tuned_channel. Maybe there should be a -1 tuned channel intended to change on the fly, and a channel history to properly switch back (channel up, down etc). We also need a function to find a tuned channel already matching the new configuration. */ gboolean z_switch_video_input (guint hash, tveng_device_info *info) { tv_video_line *l; capture_mode old_mode; if (!(l = tv_video_input_by_hash (info, hash))) { #if 0 /* annoying */ ShowBox("Couldn't find input with hash %x", GTK_MESSAGE_ERROR, hash); #endif return FALSE; } if (l == tv_cur_video_input (info)) return TRUE; old_mode = tv_get_capture_mode (info); if (CAPTURE_MODE_READ == old_mode) { if (!capture_stop ()) { ShowBox ("%s", GTK_MESSAGE_ERROR, tv_get_errstr (info)); return FALSE; } } if (!tv_set_video_input (info, l)) { if (CAPTURE_MODE_READ == old_mode) { capture_start (info, zapping->display_window); } ShowBox("Couldn't switch to video input %s\n%s", GTK_MESSAGE_ERROR, l->label, tv_get_errstr(info)); return FALSE; } else { python_command_printf (NULL, "zapping.closed_caption(0)"); } if (CAPTURE_MODE_READ == old_mode) { capture_start (info, zapping->display_window); } zmodel_changed(z_input_model); return TRUE; } gboolean z_switch_audio_input (guint hash, tveng_device_info *info) { tv_audio_line *l; if (!(l = tv_audio_input_by_hash (info, hash))) { #if 0 /* annoying */ ShowBox("Couldn't find audio input with hash %x", GTK_MESSAGE_ERROR, hash); #endif return FALSE; } if (!tv_set_audio_input (info, l)) { ShowBox("Couldn't switch to audio input %s\n%s", GTK_MESSAGE_ERROR, l->label, tv_get_errstr(info)); return FALSE; } zmodel_changed(z_input_model); return TRUE; } gboolean z_switch_standard (guint hash, tveng_device_info *info) { tv_video_standard *s; capture_mode old_mode; tv_bool r; #ifdef HAVE_LIBZVBI vbi3_decoder *vbi; #endif for (s = tv_next_video_standard (info, NULL); s; s = tv_next_video_standard (info, s)) if (s->hash == hash) break; if (!s) { #if 0 /* annoying */ if (info->video_standards) ShowBox("Couldn't find standard with hash %x", GTK_MESSAGE_ERROR, hash); #endif return FALSE; } if (s == tv_cur_video_standard (info)) return TRUE; #ifdef HAVE_LIBZVBI if ((vbi = zvbi_get_object ())) zvbi_stop (/* destroy_decoder */ FALSE); #endif old_mode = tv_get_capture_mode (info); if (CAPTURE_MODE_READ == old_mode) { if (!capture_stop ()) { ShowBox ("%s", GTK_MESSAGE_ERROR, tv_get_errstr (info)); #ifdef HAVE_LIBZVBI if (NULL != vbi) { /* Error ignored. */ zvbi_start (); } #endif return FALSE; } } r = tv_set_video_standard (info, s); if (CAPTURE_MODE_READ == old_mode) { capture_start (info, zapping->display_window); } #ifdef HAVE_LIBZVBI if (NULL != vbi) { /* Error ignored. */ zvbi_start (); } #endif if (!r) { ShowBox("Couldn't switch to standard %s\n%s", GTK_MESSAGE_ERROR, s->label, tv_get_errstr (info)); return FALSE; } return TRUE; } /* Returns a newly allocated copy of the string, normalized */ static char* normalize(const char *string) { int i = 0; const char *strptr=string; char *result; g_assert(string != NULL); result = strdup(string); g_assert(result != NULL); while (*strptr != 0) { if (*strptr == '_' || *strptr == '-' || *strptr == ' ') { strptr++; continue; } result[i] = tolower(*strptr); strptr++; i++; } result[i] = 0; return result; } /* nomalize and compare */ static int normstrcmp (const char * in1, const char * in2) { char *s1 = normalize(in1); char *s2 = normalize(in2); g_assert(in1 != NULL); g_assert(in2 != NULL); /* Compare the strings */ if (!strcmp(s1, s2)) { free(s1); free(s2); return 1; } else { free(s1); free(s2); return 0; } } gboolean zconf_get_controls (tveng_tuned_channel * channel, const gchar * path) { gchar *zcname; guint n_controls; guint i; zcname = g_strconcat (path, "/num_controls", NULL); zconf_get_uint (&n_controls, zcname); g_free (zcname); if (0 == n_controls) return TRUE; zcname = g_strconcat (path, "/controls", NULL); for (i = 0; i < n_controls; ++i) { gchar *path_i; gchar *zcname_i; const gchar *name; if (!zconf_get_nth (i, &path_i, zcname)) { g_warning ("Saved control %u is malformed, skipping", i); continue; } zcname_i = g_strconcat (path_i, "/name", NULL); name = zconf_get_string (NULL, zcname_i); g_free (zcname_i); if (NULL != name) { gfloat value; zcname_i = g_strconcat (path_i, "/value", NULL); /* Error ignored. */ zconf_get_float (&value, zcname_i); g_free (zcname_i); /* Error ignored. */ tveng_tuned_channel_set_control (channel, name, value); } g_free (path_i); } g_free (zcname); return TRUE; } void zconf_create_controls (tveng_tc_control * tcc, guint num_controls, const gchar * path) { guint i; for (i = 0; i < num_controls; i++) { gchar *name; name = g_strdup_printf ("%s/controls/%d/name", path, i); zconf_set_string (tcc[i].name, name); zconf_set_description ("Control name", name); g_free (name); name = g_strdup_printf ("%s/controls/%d/value", path, i); zconf_set_float (tcc[i].value, name); zconf_set_description ("Control value", name); g_free (name); } } #ifdef HAVE_LIBZVBI gboolean zconf_get_ttx_encodings (tveng_tuned_channel * channel, const gchar * path) { gchar *zcname; guint n_encodings; guint i; zcname = g_strconcat (path, "/num_ttx_encodings", NULL); zconf_get_uint (&n_encodings, zcname); g_free (zcname); if (0 == n_encodings) return TRUE; zcname = g_strconcat (path, "/ttx_encodings", NULL); for (i = 0; i < n_encodings; ++i) { gchar *path_i; gchar *zcname_i; vbi3_pgno pgno; if (!zconf_get_nth (i, &path_i, zcname)) { g_warning ("Saved ttx_encoding %u is malformed, skipping", i); continue; } zcname_i = g_strconcat (path_i, "/pgno", NULL); pgno = zconf_get_int (NULL, zcname_i); g_free (zcname_i); if (0 != pgno) { vbi3_charset_code charset_code; zcname_i = g_strconcat (path_i, "/charset_code", NULL); /* Error ignored. */ charset_code = zconf_get_int (NULL, zcname_i); g_free (zcname_i); /* Error ignored. */ tveng_tuned_channel_set_ttx_encoding (channel, pgno, charset_code); } g_free (path_i); } g_free (zcname); return TRUE; } void zconf_create_ttx_encodings (tveng_ttx_encoding * tcc, guint n_ttx_encodings, const gchar * path) { guint i; for (i = 0; i < n_ttx_encodings; ++i) { if (0 != tcc[i].pgno && (vbi3_charset_code) -1 != tcc[i].charset_code) { gchar *name; name = g_strdup_printf ("%s/ttx_encodings/%d/pgno", path, i); zconf_set_int ((gint) tcc[i].pgno, name); zconf_set_description ("Page number", name); g_free (name); name = g_strdup_printf ("%s/ttx_encodings/%d/charset_code", path, i); zconf_set_int ((gint) tcc[i].charset_code, name); zconf_set_description ("Character set code", name); g_free (name); } } } #endif tveng_tc_control * tveng_tc_control_by_id (tveng_device_info * info, tveng_tc_control * tcc, guint num_controls, tv_control_id id) { const tv_control *c; guint i; c = tv_control_by_id (info, id); if (NULL != c) for (i = 0; i < num_controls; ++i) if (normstrcmp (c->label, tcc[i].name)) return tcc + i; return NULL; } gint load_control_values (tveng_device_info * info, tveng_tc_control * tcc, guint num_controls) { tv_control *ctrl; guint i; gint mute = 0; g_assert (info != NULL); if (!tcc || num_controls == 0) return 0; for (ctrl = tv_next_control (info, NULL); ctrl; ctrl = ctrl->_next) for (i = 0; i < num_controls; i++) if (normstrcmp (ctrl->label, tcc[i].name)) { gint value; value = (ctrl->minimum + (ctrl->maximum - ctrl->minimum) * tcc[i].value); #if 0 if (ctrl->id == TV_CONTROL_ID_MUTE) { if (skip_mute) mute = value; else set_mute (value, /* controls */ TRUE, /* osd */ FALSE); } else #endif { tveng_set_control (ctrl, value, info); } break; } return mute; } void store_control_values (tveng_device_info * info, tveng_tc_control ** tccp, guint * num_controls_p) { tveng_tc_control *tcc; guint num_controls; tv_control *ctrl; guint i; g_assert (info != NULL); g_assert (tccp != NULL); g_assert (num_controls_p != NULL); tcc = NULL; num_controls = 0; for (ctrl = tv_next_control (info, NULL); ctrl; ctrl = ctrl->_next) num_controls++; if (num_controls > 0) { tcc = g_malloc (sizeof (*tcc) * num_controls); ctrl = NULL; i = 0; while (i < num_controls && (ctrl = tv_next_control (info, ctrl))) { int value; value = ctrl->value; g_strlcpy (tcc[i].name, ctrl->label, 32); tcc[i].name[31] = 0; if (ctrl->maximum > ctrl->minimum) tcc[i].value = (((gfloat) value) - ctrl->minimum) / ((gfloat) ctrl->maximum - ctrl->minimum); else tcc[i].value = 0; i++; } } *tccp = tcc; *num_controls_p = num_controls; } void zconf_get_sources (tveng_device_info * info, gboolean mute) { gint video_input; gint audio_input; gint video_standard; tveng_tuned_channel *ch; video_input = zcg_int (NULL, "current_input"); if (video_input) z_switch_video_input (video_input, info); audio_input = zcg_int (NULL, "current_audio_input"); if (audio_input) z_switch_audio_input (audio_input, info); video_standard = zcg_int (NULL, "current_standard"); if (video_standard) z_switch_standard (video_standard, info); cur_tuned_channel = zcg_int (NULL, "cur_tuned_channel"); ch = tveng_tuned_channel_nth (global_channel_list, (guint) cur_tuned_channel); if (NULL != ch) { if (mute) { tveng_tc_control *mute; if ((mute = tveng_tc_control_by_id (info, ch->controls, ch->num_controls, TV_CONTROL_ID_MUTE))) mute->value = 1; /* XXX sub-optimal */ } z_switch_channel (ch, info); } } void zconf_set_sources (tveng_device_info * info) { const tv_video_line *vl; const tv_audio_line *al; const tv_video_standard *vs; vl = tv_cur_video_input (info); zcs_uint (vl ? vl->hash : 0, "current_input"); al = tv_cur_audio_input (info); zcs_uint (al ? al->hash : 0, "current_audio_input"); vs = tv_cur_video_standard (info); zcs_uint (vs ? vs->hash : 0, "current_standard"); zcs_int (cur_tuned_channel, "cur_tuned_channel"); } /* Substitute the special search keywords by the appropiate thing, returns a newly allocated string, and g_free's the given string. Valid search keywords: $(alias) -> tc->name $(index) -> tc->index $(id) -> tc->rf_name */ static gchar *substitute_keywords (gchar *string, tveng_tuned_channel *tc, const gchar *default_name) { gint i; gchar *found, *buffer = NULL, *p; const gchar *search_keys[] = { "$(alias)", "$(index)", "$(id)", "$(input)", "$(standard)", "$(freq)", "$(title)", "$(rating)" }; gint num_keys = sizeof(search_keys)/sizeof(*search_keys); if ((!string) || (!*string) || (!tc)) { g_free(string); return g_strdup(""); } for (i=0; i<num_keys; i++) while ((found = strstr(string, search_keys[i]))) { switch (i) { case 0: if (tc->name) buffer = g_strdup(tc->name); else if (default_name) buffer = g_strdup(default_name); else buffer = g_strdup(_("Unknown")); break; case 1: buffer = g_strdup_printf("%d", tc->index+1); break; case 2: if (tc->rf_name) buffer = g_strdup(tc->rf_name); else buffer = g_strdup(_("Unnamed")); break; case 3: { const tv_video_line *l; if ((l = tv_video_input_by_hash (zapping->info, tc->input))) buffer = g_strdup (l->label); else buffer = g_strdup (_("No input")); break; } case 4: { const tv_video_standard *s; if ((s = tv_video_standard_by_hash (zapping->info, tc->standard))) buffer = g_strdup (s->label); else buffer = g_strdup (_("No standard")); break; } case 5: buffer = g_strdup_printf("%d", tc->frequ / 1000); break; #if 0 /* Temporarily removed. ifdef HAVE_LIBZVBI */ case 6: /* title */ buffer = zvbi_current_title(); break; case 7: /* rating */ buffer = g_strdup(zvbi_current_rating()); break; #else case 6: /* title */ case 7: /* rating */ buffer = g_strdup(""); break; #endif default: g_assert_not_reached(); break; } *found = 0; p = g_strconcat(string, buffer, found+strlen(search_keys[i]), NULL); g_free(string); g_free(buffer); string = p; } return string; } void z_set_main_title (tveng_tuned_channel *channel, const gchar *default_name) { tveng_tuned_channel ch; gchar *buffer = NULL; CLEAR (ch); if (!channel) channel = &ch; if (channel != &ch || channel->name || default_name) buffer = substitute_keywords(g_strdup(zcg_char(NULL, "title_format")), channel, default_name); if (buffer && *buffer && zapping) gtk_window_set_title(GTK_WINDOW(zapping), buffer); else if (zapping) gtk_window_set_title(GTK_WINDOW(zapping), "Zapping"); g_free(buffer); if (channel != &ch) cur_tuned_channel = channel->index; } /* Do not save the control values in the first switch_channel */ static gboolean first_switch = TRUE; void z_switch_channel (tveng_tuned_channel * channel, tveng_device_info * info) { gboolean was_first_switch = first_switch; tveng_tuned_channel *tc; gboolean in_global_list; gboolean avoid_noise; const tv_video_line *vi; gboolean caption_enabled; if (!channel) return; in_global_list = tveng_tuned_channel_in_list (global_channel_list, channel); if (in_global_list && (tc = tveng_tuned_channel_nth (global_channel_list, (guint) cur_tuned_channel))) { if (!first_switch) { g_free(tc->controls); if (zcg_bool(NULL, "save_controls")) store_control_values(info, &tc->controls, &tc->num_controls); else { tc->num_controls = 0; tc->controls = NULL; } } else { first_switch = FALSE; } #ifdef HAVE_LIBZVBI tc->caption_pgno = zvbi_caption_pgno; #endif } if ((avoid_noise = zcg_bool (NULL, "avoid_noise"))) tv_quiet_set (zapping->info, TRUE); freeze_update(); /* force rebuild on startup */ if (was_first_switch) zmodel_changed(z_input_model); if (channel->input) { z_switch_video_input(channel->input, info); } /* if (channel->audio_input) { z_switch_audio_input(channel->audio_input, info); } */ if (channel->standard) z_switch_standard(channel->standard, info); if (avoid_noise) reset_quiet (zapping->info, /* delay ms */ 500); if ((vi = tv_cur_video_input (info)) && vi->type == TV_VIDEO_LINE_TYPE_TUNER) if (!tv_set_tuner_frequency (info, channel->frequ)) ShowBox("%s", GTK_MESSAGE_ERROR, tv_get_errstr (info)); if (in_global_list) z_set_main_title(channel, NULL); else gtk_window_set_title(GTK_WINDOW(zapping), "Zapping"); thaw_update(); if (channel->num_controls && zcg_bool(NULL, "save_controls")) /* XXX should we save mute state per-channel? */ load_control_values(info, channel->controls, channel->num_controls); update_control_box(info); #ifdef HAVE_LIBZVBI zvbi_caption_pgno = channel->caption_pgno; caption_enabled = zconf_get_boolean (NULL, "/zapping/internal/callbacks/closed_caption"); if (caption_enabled && zvbi_caption_pgno <= 0) { zvbi_caption_pgno = zvbi_find_subtitle_page (info); /* XXX shall we? It's a little inconvenient, but we don't know what to show on this channel, and deactivating the caption/subtitles button reflects that. TODO: some hint that subtitles are available when we receive a ttx page inventory or caption data. */ if (zvbi_caption_pgno <= 0) python_command_printf (NULL, "zapping.closed_caption(0)"); } zvbi_channel_switched(); if (DISPLAY_MODE_FULLSCREEN == zapping->display_mode || DISPLAY_MODE_BACKGROUND == zapping->display_mode) osd_render_markup_printf (NULL, ("<span foreground=\"yellow\">%s</span>"), channel->name); #endif xawtv_ipc_set_station (GTK_WIDGET (zapping), channel); } static void select_channel (guint num_channel) { tveng_tuned_channel * channel = tveng_tuned_channel_nth (global_channel_list, num_channel); if (!channel) { g_warning("Cannot tune given channel %d (no such channel)", num_channel); return; } z_switch_channel(channel, zapping->info); } static gchar kp_chsel_buf[8]; static gint kp_chsel_prefix; static gboolean kp_clear; static gboolean kp_lirc; /* XXX */ static guint kp_timeout_id = NO_SOURCE_ID; static gint channel_txl (void) { gint txl; /* 0 = channel list number, 1 = RF channel number */ txl = zconf_get_int (NULL, "/zapping/options/main/channel_txl"); if (txl < 0) txl = 0; /* historical: -1 disabled keypad channel number entering */ return txl; } static tveng_tuned_channel * entered_channel (gint txl) { tveng_tuned_channel *tc; tc = NULL; if (!isdigit (kp_chsel_buf[0]) || txl >= 1) tc = tveng_tuned_channel_by_rf_name (global_channel_list, kp_chsel_buf); if (NULL == tc) tc = tveng_tuned_channel_nth (global_channel_list, strtoul (kp_chsel_buf, NULL, 0)); return tc; } static guint cur_channel_num (void) { if (0 != kp_chsel_buf[0]) { tveng_tuned_channel *tc; if (kp_timeout_id > 0) g_source_remove (kp_timeout_id); kp_timeout_id = NO_SOURCE_ID; tc = entered_channel (channel_txl ()); kp_chsel_buf[0] = 0; kp_chsel_prefix = 0; if (NULL != tc) return tc->index; } return cur_tuned_channel; } static PyObject * py_channel_up (PyObject * self, PyObject * args) { guint n_channels; guint new_channel; self = self; args = args; n_channels = tveng_tuned_channel_num (global_channel_list); if (0 == n_channels) py_return_none; new_channel = cur_channel_num () + 1; if (new_channel >= n_channels) new_channel = 0; select_channel (new_channel); py_return_none; } static PyObject * py_channel_down (PyObject * self, PyObject * args) { guint n_channels; guint cur_channel; guint new_channel; self = self; args = args; n_channels = tveng_tuned_channel_num (global_channel_list); if (0 == n_channels) py_return_none; cur_channel = cur_channel_num (); if (cur_channel > 0) new_channel = cur_channel - 1; else new_channel = n_channels - 1; select_channel (new_channel); py_return_none; } /* Select a channel by index into the the channel list. */ static PyObject * py_set_channel (PyObject * self, PyObject * args) { gint n_channels; gint i; self = self; if (!ParseTuple (args, "i", &i)) py_return_false; n_channels = tveng_tuned_channel_num (global_channel_list); if (i >= 0 && i < n_channels) { select_channel ((guint) i); py_return_true; } py_return_false; } /* Select a channel by station name ("MSNBCBS", "Linux TV", ...), when not found by channel name ("5", "S7", ...) */ static PyObject * py_lookup_channel (PyObject * self, PyObject * args) { tveng_tuned_channel *tc; char *name; self = self; if (!ParseTuple (args, "s", &name)) py_return_false; tc = tveng_tuned_channel_by_name (global_channel_list, name); if (NULL == tc) tc = tveng_tuned_channel_by_rf_name (global_channel_list, name); if (NULL == tc) py_return_false; if (0 != kp_chsel_buf[0]) { if (kp_timeout_id > 0) g_source_remove (kp_timeout_id); kp_timeout_id = NO_SOURCE_ID; kp_chsel_buf[0] = 0; kp_chsel_prefix = 0; } z_switch_channel (tc, zapping->info); py_return_true; } static void kp_enter (gint txl) { tveng_tuned_channel *tc; tc = entered_channel (txl); if (NULL == tc) return; z_switch_channel (tc, zapping->info); } static void kp_timeout (gboolean timer) { if (timer && kp_chsel_buf[0] != 0) kp_enter (channel_txl ()); if (kp_clear) { kp_chsel_buf[0] = 0; kp_chsel_prefix = 0; } } #ifndef HAVE_LIBZVBI static gboolean kp_timeout2 (gpointer user_data) { kp_timeout (TRUE); kp_timeout_id = NO_SOURCE_ID; return FALSE; /* don't call again */ } #endif static gboolean kp_key_press (GdkEventKey * event, gint txl) { if (kp_timeout_id > 0) g_source_remove (kp_timeout_id); kp_timeout_id = NO_SOURCE_ID; switch (event->keyval) { case GDK_KP_0 ... GDK_KP_9: { tveng_tuned_channel *tc; guint len; len = strlen (kp_chsel_buf); if (len >= sizeof (kp_chsel_buf) - 1) memcpy (kp_chsel_buf, kp_chsel_buf + 1, len--); kp_chsel_buf[len] = event->keyval - GDK_KP_0 + '0'; kp_chsel_buf[len + 1] = 0; show: tc = NULL; if (txl == 1) { guint match = 0; /* RF channel name completion */ len = strlen (kp_chsel_buf); for (tc = tveng_tuned_channel_first (global_channel_list); tc; tc = tc->next) if (!tc->rf_name || tc->rf_name[0] == 0) { continue; } else if (0 == strncmp (tc->rf_name, kp_chsel_buf, len)) { if (strlen (tc->rf_name) == len) break; /* exact match */ if (match++ > 0) { tc = NULL; break; /* ambiguous */ } } if (tc) g_strlcpy (kp_chsel_buf, tc->rf_name, sizeof (kp_chsel_buf) - 1); } kp_clear = FALSE; #ifdef HAVE_LIBZVBI osd_render_markup_printf (kp_timeout, ("<span foreground=\"green\">%s</span>"), kp_chsel_buf); #else kp_timeout_id = g_timeout_add (1500, (GSourceFunc) kp_timeout2, NULL); #endif kp_clear = TRUE; if (txl == 0) { guint num = atoi (kp_chsel_buf); /* Switch to channel if the number is unambiguous */ if (num == 0 || (num * 10) >= tveng_tuned_channel_num (global_channel_list)) tc = tveng_tuned_channel_nth (global_channel_list, num); } if (!tc) return TRUE; /* unknown channel */ z_switch_channel (tc, zapping->info); kp_chsel_buf[0] = 0; kp_chsel_prefix = 0; return TRUE; } case GDK_KP_Decimal: if (txl >= 1) { const tveng_tuned_channel *tc; const gchar *rf_table; tv_rf_channel ch; const char *prefix; /* Run through all RF channel prefixes incl. nil (== clear) */ if (!(rf_table = zconf_get_string (NULL, "/zapping/options/main/current_country"))) { tc = tveng_tuned_channel_nth (global_channel_list, (guint) cur_tuned_channel); if (!tc || !(rf_table = tc->rf_table) || rf_table[0] == 0) return TRUE; /* dead key */ } if (!tv_rf_channel_table_by_name (&ch, rf_table)) return TRUE; /* dead key */ if ((prefix = tv_rf_channel_table_prefix (&ch, kp_chsel_prefix))) { g_strlcpy (kp_chsel_buf, prefix, sizeof (kp_chsel_buf) - 1); kp_chsel_buf[sizeof (kp_chsel_buf) - 1] = 0; kp_chsel_prefix++; goto show; } } kp_clear = TRUE; #ifdef HAVE_LIBZVBI /* FIXME should no rely on OSD clear time */ osd_render_markup_printf (kp_timeout, "<span foreground=\"black\">/</span>"); #else kp_timeout_id = g_timeout_add (1500, (GSourceFunc) kp_timeout2, NULL); #endif return TRUE; case GDK_KP_Enter: kp_enter (txl); kp_chsel_buf[0] = 0; kp_chsel_prefix = 0; return TRUE; default: break; } return FALSE; /* don't know, pass it on */ } gboolean on_channel_enter (GtkWidget * widget _unused_, GdkEventKey * event, gpointer user_data _unused_) { if (0 == kp_chsel_buf[0]) return FALSE; return kp_key_press (event, channel_txl ()); } /* * Called from alirc.c, preliminary. */ gboolean channel_key_press (GdkEventKey * event) { kp_lirc = TRUE; return kp_key_press (event, channel_txl ()); } gboolean on_channel_key_press (GtkWidget * widget _unused_, GdkEventKey * event, gpointer user_data _unused_) { tveng_tuned_channel *tc; z_key key; guint i; if (1) /* XXX !disabled */ if (kp_key_press (event, channel_txl ())) { kp_lirc = FALSE; return TRUE; } /* Channel accelerators */ key.key = gdk_keyval_to_lower (event->keyval); key.mask = event->state; for (i = 0; (tc = tveng_tuned_channel_nth(global_channel_list, i)); i++) if (z_key_equal (tc->accel, key)) { select_channel (tc->index); return TRUE; } return FALSE; /* don't know, pass it on */ } /* ------------------------------------------------------------------------- */ typedef struct { tveng_device_info * info; GtkMenuItem * menu_item; tv_callback * callback; } source_menu; static void on_menu_item_destroy (gpointer user_data) { source_menu *sm = user_data; tv_callback_remove (sm->callback); g_free (sm); } static void append_radio_menu_item (GtkMenuShell ** menu_shell, GSList ** group, const gchar * label, gboolean active _unused_, GCallback handler, const source_menu * sm) { GtkWidget *menu_item; menu_item = gtk_radio_menu_item_new_with_label (*group, label); gtk_widget_show (menu_item); *group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (menu_item)); gtk_menu_shell_append (*menu_shell, menu_item); z_signal_connect_const (G_OBJECT (menu_item), "toggled", handler, sm); } /* Video standards */ static void on_video_standard_activate (GtkMenuItem * menu_item, gpointer user_data); static GtkWidget * video_standard_menu (source_menu * sm); static void select_cur_video_standard_item (GtkMenuShell * menu_shell, tveng_device_info * info) { GtkWidget *menu_item; const tv_video_standard *vs; guint index; if (!(vs = tv_cur_video_standard (info))) return; index = tv_video_standard_position (info, vs); menu_item = z_menu_shell_nth_item (menu_shell, index + 1 /* tear-off */); g_assert (menu_item != NULL); SIGNAL_HANDLER_BLOCK (menu_item, on_video_standard_activate, gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (menu_item), TRUE)); } static void on_tv_video_standard_change (tveng_device_info * info _unused_, void * user_data) { source_menu *sm = user_data; if (!tv_cur_video_standard (sm->info)) { gtk_widget_set_sensitive (GTK_WIDGET (sm->menu_item), FALSE); gtk_menu_item_remove_submenu (sm->menu_item); } else { GtkWidget *w; if (!(w = gtk_menu_item_get_submenu (sm->menu_item))) { gtk_widget_set_sensitive (GTK_WIDGET (sm->menu_item), TRUE); gtk_menu_item_set_submenu (sm->menu_item, video_standard_menu (sm)); } else { GtkMenuShell *menu_shell; menu_shell = GTK_MENU_SHELL (w); select_cur_video_standard_item (menu_shell, sm->info); } } } static void on_video_standard_activate (GtkMenuItem * menu_item, gpointer user_data) { const source_menu *sm = user_data; GtkMenuShell *menu_shell; const tv_video_standard *s; gboolean success; gint index; if (!GTK_CHECK_MENU_ITEM (menu_item)->active) return; menu_shell = GTK_MENU_SHELL (gtk_menu_item_get_submenu (sm->menu_item)); if (!menu_shell) return; index = g_list_index (menu_shell->children, menu_item); success = FALSE; rebuild_channel_menu = FALSE; /* old stuff */ if (index >= 1 && (s = tv_nth_video_standard (sm->info, (guint) index - 1 /* tear-off */))) TV_CALLBACK_BLOCK (sm->callback, (success = z_switch_standard (s->hash, zapping->info))); rebuild_channel_menu = TRUE; if (success) { #ifdef HAVE_LIBZVBI zvbi_channel_switched (); #endif } else { select_cur_video_standard_item (menu_shell, sm->info); } } static GtkWidget * video_standard_menu (source_menu * sm) { const tv_video_standard *s; GtkMenuShell *menu_shell; GtkWidget *menu_item; GSList *group; if (!(s = tv_next_video_standard (sm->info, NULL))) return NULL; menu_shell = GTK_MENU_SHELL (gtk_menu_new ()); menu_item = gtk_tearoff_menu_item_new (); gtk_widget_show (menu_item); gtk_menu_shell_append (menu_shell, menu_item); group = NULL; for (; s; s = tv_next_video_standard (sm->info, s)) append_radio_menu_item (&menu_shell, &group, s->label, /* active */ s == tv_cur_video_standard (sm->info), G_CALLBACK (on_video_standard_activate), sm); select_cur_video_standard_item (menu_shell, sm->info); if (!sm->callback) sm->callback = tv_add_video_standard_callback (sm->info, on_tv_video_standard_change, NULL, sm); g_assert (sm->callback != NULL); return GTK_WIDGET (menu_shell); } /* Audio inputs */ static void on_audio_input_activate (GtkMenuItem * menu_item, gpointer user_data); static GtkWidget * audio_input_menu (source_menu * sm); static void select_cur_audio_input_item (GtkMenuShell * menu_shell, tveng_device_info * info) { GtkWidget *menu_item; const tv_audio_line *ai; guint index; if (!(ai = tv_cur_audio_input (info))) return; g_assert (ai != NULL); index = tv_audio_input_position (info, ai); menu_item = z_menu_shell_nth_item (menu_shell, index + 1 /* tear-off */); g_assert (menu_item != NULL); SIGNAL_HANDLER_BLOCK (menu_item, on_audio_input_activate, gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (menu_item), TRUE)); } static void on_tv_audio_input_change (tveng_device_info * info _unused_, void * user_data) { source_menu *sm = user_data; if (!tv_cur_audio_input (sm->info)) { gtk_widget_set_sensitive (GTK_WIDGET (sm->menu_item), FALSE); gtk_menu_item_remove_submenu (sm->menu_item); } else { GtkWidget *w; if (!(w = gtk_menu_item_get_submenu (sm->menu_item))) { gtk_widget_set_sensitive (GTK_WIDGET (sm->menu_item), TRUE); gtk_menu_item_set_submenu (sm->menu_item, audio_input_menu (sm)); } else { GtkMenuShell *menu_shell; menu_shell = GTK_MENU_SHELL (w); select_cur_audio_input_item (menu_shell, sm->info); } } } static void on_audio_input_activate (GtkMenuItem * menu_item, gpointer user_data) { const source_menu *sm = user_data; GtkMenuShell *menu_shell; const tv_audio_line *l; gboolean success; gint index; if (!GTK_CHECK_MENU_ITEM (menu_item)->active) return; menu_shell = GTK_MENU_SHELL (gtk_menu_item_get_submenu (sm->menu_item)); if (!menu_shell) return; index = g_list_index (menu_shell->children, menu_item); success = FALSE; rebuild_channel_menu = FALSE; /* old stuff */ if (index >= 1 && (l = tv_nth_audio_input (sm->info, (guint) index - 1 /* tear-off */))) TV_CALLBACK_BLOCK (sm->callback, (success = z_switch_audio_input (l->hash, zapping->info))); rebuild_channel_menu = TRUE; if (success) { #ifdef HAVE_LIBZVBI zvbi_channel_switched (); #endif } else { select_cur_audio_input_item (menu_shell, sm->info); } } static GtkWidget * audio_input_menu (source_menu * sm) { const tv_audio_line *l; GtkMenuShell *menu_shell; GtkWidget *menu_item; GSList *group; if (!(l = tv_next_audio_input (sm->info, NULL))) return NULL; menu_shell = GTK_MENU_SHELL (gtk_menu_new ()); menu_item = gtk_tearoff_menu_item_new (); gtk_widget_show (menu_item); gtk_menu_shell_append (menu_shell, menu_item); group = NULL; for (; l; l = tv_next_audio_input (sm->info, l)) append_radio_menu_item (&menu_shell, &group, l->label, /* active */ l == tv_cur_audio_input (sm->info), G_CALLBACK (on_audio_input_activate), sm); select_cur_audio_input_item (menu_shell, sm->info); if (!sm->callback) sm->callback = tv_add_audio_input_callback (sm->info, on_tv_audio_input_change, NULL, sm); g_assert (sm->callback != NULL); return GTK_WIDGET (menu_shell); } /* Video inputs */ static void on_video_input_activate (GtkMenuItem * menu_item, gpointer user_data); static GtkWidget * video_input_menu (source_menu * sm); static void select_cur_video_input_item (GtkMenuShell * menu_shell, tveng_device_info * info) { GtkWidget *menu_item; const tv_video_line *vi; guint index; if (!(vi = tv_cur_video_input(info))) return; index = tv_video_input_position (info, vi); menu_item = z_menu_shell_nth_item (menu_shell, index + 1 /* tear-off */); g_assert (menu_item != NULL); SIGNAL_HANDLER_BLOCK (menu_item, on_video_input_activate, gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (menu_item), TRUE)); } static void on_tv_video_input_change (tveng_device_info * info _unused_, void * user_data) { source_menu *sm = user_data; if (!tv_cur_video_input (sm->info)) { gtk_widget_set_sensitive (GTK_WIDGET (sm->menu_item), FALSE); gtk_menu_item_remove_submenu (sm->menu_item); } else { GtkWidget *w; if (!(w = gtk_menu_item_get_submenu (sm->menu_item))) { gtk_widget_set_sensitive (GTK_WIDGET (sm->menu_item), TRUE); gtk_menu_item_set_submenu (sm->menu_item, video_input_menu (sm)); } else { GtkMenuShell *menu_shell; menu_shell = GTK_MENU_SHELL (w); select_cur_video_input_item (menu_shell, sm->info); /* Usually standards depend on video input, but we don't rebuild the menu here. That happens automatically above in the video standard callbacks. */ } } } static void on_video_input_activate (GtkMenuItem * menu_item, gpointer user_data) { const source_menu *sm = user_data; GtkMenuShell *menu_shell; const tv_video_line *l; gboolean success; gint index; if (!GTK_CHECK_MENU_ITEM (menu_item)->active) return; menu_shell = GTK_MENU_SHELL (gtk_menu_item_get_submenu (sm->menu_item)); if (!menu_shell) return; index = g_list_index (menu_shell->children, menu_item); success = FALSE; rebuild_channel_menu = FALSE; /* old stuff */ if (index >= 1 && (l = tv_nth_video_input (sm->info, (guint) index - 1 /* tear-off */))) TV_CALLBACK_BLOCK (sm->callback, (success = z_switch_video_input (l->hash, zapping->info))); rebuild_channel_menu = TRUE; if (success) { #ifdef HAVE_LIBZVBI zvbi_channel_switched (); #endif } else { select_cur_video_input_item (menu_shell, sm->info); } } static GtkWidget * video_input_menu (source_menu * sm) { const tv_video_line *l; GtkMenuShell *menu_shell; GtkWidget *menu_item; GSList *group; if (!(l = tv_next_video_input (sm->info, NULL))) return NULL; menu_shell = GTK_MENU_SHELL (gtk_menu_new ()); menu_item = gtk_tearoff_menu_item_new (); gtk_widget_show (menu_item); gtk_menu_shell_append (menu_shell, menu_item); group = NULL; for (; l; l = tv_next_video_input (sm->info, l)) append_radio_menu_item (&menu_shell, &group, l->label, /* active */ l == tv_cur_video_input (sm->info), G_CALLBACK (on_video_input_activate), sm); select_cur_video_input_item (menu_shell, sm->info); if (!sm->callback) sm->callback = tv_add_video_input_callback (sm->info, on_tv_video_input_change, NULL, sm); g_assert (sm->callback != NULL); return GTK_WIDGET (menu_shell); } static void add_source_items (GtkMenuShell * menu, gint pos, tveng_device_info * info) { source_menu *sm; GtkWidget *item; { sm = g_malloc0 (sizeof (*sm)); sm->info = info; item = z_gtk_pixmap_menu_item_new (_("Video standards"), GTK_STOCK_SELECT_COLOR); gtk_widget_show (item); sm->menu_item = GTK_MENU_ITEM (item); g_object_set_data_full (G_OBJECT (item), "sm", sm, (GtkDestroyNotify) on_menu_item_destroy); gtk_menu_shell_insert (menu, item, pos); if ((item = video_standard_menu (sm))) gtk_menu_item_set_submenu (sm->menu_item, item); else gtk_widget_set_sensitive (GTK_WIDGET (sm->menu_item), FALSE); } { sm = g_malloc0 (sizeof (*sm)); sm->info = info; item = z_gtk_pixmap_menu_item_new (_("Audio inputs"), "gnome-stock-line-in"); gtk_widget_show (item); sm->menu_item = GTK_MENU_ITEM (item); g_object_set_data_full (G_OBJECT (item), "sm", sm, (GtkDestroyNotify) on_menu_item_destroy); gtk_menu_shell_insert (menu, item, pos); if ((item = audio_input_menu (sm))) gtk_menu_item_set_submenu (sm->menu_item, item); else gtk_widget_set_sensitive (GTK_WIDGET (sm->menu_item), FALSE); } { sm = g_malloc0 (sizeof (*sm)); sm->info = info; item = z_gtk_pixmap_menu_item_new (_("Video inputs"), "gnome-stock-line-in"); gtk_widget_show (item); sm->menu_item = GTK_MENU_ITEM (item); g_object_set_data_full (G_OBJECT (item), "sm", sm, (GtkDestroyNotify) on_menu_item_destroy); gtk_menu_shell_insert (menu, item, pos); if ((item = video_input_menu (sm))) gtk_menu_item_set_submenu (sm->menu_item, item); else gtk_widget_set_sensitive (GTK_WIDGET (sm->menu_item), FALSE); } } /* ------------------------------------------------------------------------- */ static inline tveng_tuned_channel * nth_channel (guint index) { tveng_tuned_channel *tc; guint i; for (tc = global_channel_list, i = 0; tc; tc = tc->next) if (tc->name && tc->name[0]) if (i++ == index) break; return tc; } static inline void insert_one_channel (GtkMenuShell * menu, guint index, gint pos) { tveng_tuned_channel *tc; GtkWidget *menu_item; gchar *tooltip; if (!(tc = nth_channel (index))) return; menu_item = z_gtk_pixmap_menu_item_new (tc->name, GTK_STOCK_PROPERTIES); g_signal_connect_swapped (G_OBJECT (menu_item), "activate", G_CALLBACK (select_channel), GINT_TO_POINTER (index)); if ((tooltip = z_key_name (tc->accel))) { z_tooltip_set (menu_item, tooltip); g_free (tooltip); } gtk_widget_show (menu_item); gtk_menu_shell_insert (menu, menu_item, pos); } static inline const gchar * tuned_channel_nth_name (guint index) { tveng_tuned_channel *tc; tc = nth_channel (index); /* huh? */ if (!tc || !tc->name) return _("Unnamed"); else return tc->name; } /* Returns whether something (useful) was added */ gboolean add_channel_entries (GtkMenuShell *menu, gint pos, guint menu_max_entries, tveng_device_info *info) { const guint ITEMS_PER_SUBMENU = 20; gboolean sth = FALSE; guint num_channels; add_source_items (menu, pos, info); num_channels = tveng_tuned_channel_num (global_channel_list); if (num_channels == 0) { /* This doesn't count as something added */ GtkWidget *menu_item; /* TRANSLATORS: This is displayed in the channel menu when the channel list is empty. */ menu_item = z_gtk_pixmap_menu_item_new (_("No channels"), GTK_STOCK_CLOSE); gtk_widget_set_sensitive (menu_item, FALSE); gtk_widget_show (menu_item); gtk_menu_shell_insert (menu, menu_item, pos); } else { { GtkWidget *menu_item; /* Separator */ menu_item = gtk_menu_item_new (); gtk_widget_show (menu_item); gtk_menu_shell_insert (menu, menu_item, pos); } sth = TRUE; if (num_channels <= ITEMS_PER_SUBMENU && num_channels <= menu_max_entries) { while (num_channels > 0) insert_one_channel (menu, --num_channels, pos); } else { while (num_channels > 0) { guint remainder = num_channels % ITEMS_PER_SUBMENU; if (remainder == 1) { insert_one_channel (menu, --num_channels, pos); } else { const gchar *first_name; const gchar *last_name; gchar *buf; GtkMenuShell *submenu; GtkWidget *menu_item; if (remainder == 0) remainder = ITEMS_PER_SUBMENU; first_name = tuned_channel_nth_name (num_channels - remainder); last_name = tuned_channel_nth_name (num_channels - 1); buf = g_strdup_printf ("%s/%s", first_name, last_name); menu_item = z_gtk_pixmap_menu_item_new (buf, "gnome-stock-line-in"); g_free (buf); gtk_widget_show (menu_item); gtk_menu_shell_insert (menu, menu_item, pos); submenu = GTK_MENU_SHELL (gtk_menu_new()); gtk_widget_show (GTK_WIDGET (submenu)); gtk_menu_item_set_submenu (GTK_MENU_ITEM (menu_item), GTK_WIDGET (submenu)); menu_item = gtk_tearoff_menu_item_new (); gtk_widget_show (menu_item); gtk_menu_shell_append (submenu, menu_item); while (remainder-- > 0) insert_one_channel (submenu, --num_channels, 1); } } } } return sth; } /* ------------------------------------------------------------------------- */ gdouble videostd_inquiry(void) { GtkWidget *dialog, *option, *check; gint std_hint; std_hint = zconf_get_int (NULL, "/zapping/options/main/std_hint"); if (std_hint >= 1) goto ok; dialog = build_widget ("videostd_inquiry", NULL); option = lookup_widget (dialog, "optionmenu24"); check = lookup_widget (dialog, "checkbutton15"); if (GTK_RESPONSE_ACCEPT != gtk_dialog_run (GTK_DIALOG (dialog))) { gtk_widget_destroy(dialog); return -1; } std_hint = 1 + z_option_menu_get_active (option); if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (check))) zconf_set_int (std_hint, "/zapping/options/main/std_hint"); ok: if (std_hint == 1) return 30000.0 / 1001; else if (std_hint >= 2) return 25.0; else return -1; } /* * Preliminary. This should create an object such that we can write: * zapping.control('volume').value += 1; * But for now I just copied py_volume_incr(). */ static PyObject* py_control_incr (PyObject *self _unused_, PyObject *args) { static const struct { tv_control_id id; const gchar * name; } controls[] = { { TV_CONTROL_ID_BRIGHTNESS, "brightness" }, { TV_CONTROL_ID_CONTRAST, "contrast" }, { TV_CONTROL_ID_SATURATION, "saturation" }, { TV_CONTROL_ID_HUE, "hue" }, { TV_CONTROL_ID_MUTE, "mute" }, { TV_CONTROL_ID_VOLUME, "volume" }, { TV_CONTROL_ID_BASS, "bass" }, { TV_CONTROL_ID_TREBLE, "treble" }, }; char *control_name; int increment, ok; tv_control *tc; guint i; increment = +1; ok = ParseTuple (args, "s|i", &control_name, &increment); if (!ok) g_error ("zapping.control_incr(s|i)"); for (i = 0; i < N_ELEMENTS (controls); i++) if (0 == strcmp (controls[i].name, control_name)) break; if (i >= N_ELEMENTS (controls)) goto done; tc = NULL; while ((tc = tv_next_control (zapping->info, tc))) if (tc->id == controls[i].id) break; if (!tc) goto done; switch (tc->type) { case TV_CONTROL_TYPE_INTEGER: case TV_CONTROL_TYPE_BOOLEAN: case TV_CONTROL_TYPE_CHOICE: break; default: goto done; } if (tc->id == TV_CONTROL_ID_MUTE) { set_mute ((increment > 0) ? TRUE : FALSE, TRUE, TRUE); } else { if (-1 == tveng_update_control ((tv_control *) tc, zapping->info)) goto done; tveng_set_control ((tv_control *) tc, tc->value + increment * tc->step, zapping->info); #ifdef HAVE_LIBZVBI osd_render_markup_printf (NULL, ("<span foreground=\"blue\">%s %d %%</span>"), tc->label, (tc->value - tc->minimum) * 100 / (tc->maximum - tc->minimum)); #endif } done: Py_INCREF(Py_None); return Py_None; } void startup_v4linterface(tveng_device_info *info) { z_input_model = ZMODEL(zmodel_new()); g_signal_connect(G_OBJECT(z_input_model), "changed", G_CALLBACK(update_bundle), info); cmd_register ("channel_up", py_channel_up, METH_VARARGS, ("Switch to higher channel"), "zapping.channel_up()"); cmd_register ("channel_down", py_channel_down, METH_VARARGS, ("Switch to lower channel"), "zapping.channel_down()"); cmd_register ("set_channel", py_set_channel, METH_VARARGS); cmd_register ("lookup_channel", py_lookup_channel, METH_VARARGS); cmd_register ("control_box", py_control_box, METH_VARARGS, ("Control window"), "zapping.control_box()"); cmd_register ("control_incr", py_control_incr, METH_VARARGS, ("Increase brightness"), "zapping.control_incr('brightness',+1)", ("Decrease brightness"), "zapping.control_incr('brightness',-1)", ("Increase hue"), "zapping.control_incr('hue',+1)", ("Decrease hue"), "zapping.control_incr('hue',-1)", ("Increase contrast"), "zapping.control_incr('contrast',+1)", ("Decrease contrast"), "zapping.control_incr('contrast',-1)", ("Increase saturation"), "zapping.control_incr('saturation',+1)", ("Decrease saturation"), "zapping.control_incr('saturation',-1)", ("Increase volume"), "zapping.control_incr('volume',+1)", ("Decrease volume"), "zapping.control_incr('volume',-1)"); zcc_char("$(alias) - Zapping", "Title format Z will use", "title_format"); zcc_bool(FALSE, "Swap the page Up/Down bindings", "swap_up_down"); /* zcc_zkey (zkey_from_name ("Page_Up"), "Channel up key", "acc_channel_up"); zcc_zkey (zkey_from_name ("Page_Down"), "Channel down key", "acc_channel_down"); */ } void shutdown_v4linterface(void) { g_object_unref(G_OBJECT(z_input_model)); } ����������������������������������������zapping-0.10cvs6/src/v4linterface.h����������������������������������������������������������������� 644 � 764 � 144 � 6343 10371552540 12343� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Zapping (TV viewer for the Gnome Desktop) * Copyright (C) 2000-2001 Iaki Garca Etxebarria * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifndef __V4LINTERFACE_H__ #define __V4LINTERFACE_H__ #include "frequencies.h" #include "zmodel.h" #include "zmisc.h" #include "tveng.h" /* Rebuilds the control box if it's open. Call whenever the device controls change. */ void update_control_box(tveng_device_info * info); /* Notification of standard/input changes */ extern ZModel *z_input_model; /** * Sets the given input, based on its hash. */ gboolean z_switch_video_input (guint hash, tveng_device_info *info); gboolean z_switch_audio_input (guint hash, tveng_device_info *info); /** * Sets the given standard, based on its hash. */ gboolean z_switch_standard (guint hash, tveng_device_info *info); /** * Sets the given channel. */ void z_switch_channel (tveng_tuned_channel *channel, tveng_device_info *info); gboolean on_channel_enter (GtkWidget * widget, GdkEventKey * event, gpointer user_data); gboolean channel_key_press (GdkEventKey * event); gboolean on_channel_key_press (GtkWidget * widget, GdkEventKey * event, gpointer user_data); /** * Sets the given channel. */ void z_set_main_title (tveng_tuned_channel *channel, const gchar *default_name); extern gboolean zconf_get_controls (tveng_tuned_channel * channel, const gchar * path); extern void zconf_create_controls (tveng_tc_control * tcc, guint num_controls, const gchar * path); #ifdef HAVE_LIBZVBI extern gboolean zconf_get_ttx_encodings (tveng_tuned_channel * channel, const gchar * path); extern void zconf_create_ttx_encodings (tveng_ttx_encoding * tcc, guint n_ttx_encodings, const gchar * path); #endif tveng_tc_control * tveng_tc_control_by_id (tveng_device_info * info, tveng_tc_control * tcc, guint num_controls, tv_control_id id); extern gint load_control_values (tveng_device_info * info, tveng_tc_control * tcc, guint num_controls); void store_control_values (tveng_device_info * info, tveng_tc_control ** tcc, guint * num_controls); void zconf_get_sources (tveng_device_info * info, gboolean mute); void zconf_set_sources (tveng_device_info * info); /* Returns whether something (useful) was added */ gboolean add_channel_entries (GtkMenuShell *menu, gint pos, guint menu_max_entries, tveng_device_info *info); /* Do the startup/shutdown */ void startup_v4linterface (tveng_device_info *info); void shutdown_v4linterface (void); extern gdouble videostd_inquiry(void); #endif ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������zapping-0.10cvs6/src/zmarshalers.list��������������������������������������������������������������� 644 � 764 � 144 � 2336 7762173334 13024� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# see glib-genmarshal(1) for a detailed description of the file format, # possible parameter types are: # VOID indicates no return type, or no extra # parameters. if VOID is used as the parameter # list, no additional parameters may be present. # BOOLEAN for boolean types (gboolean) # CHAR for signed char types (gchar) # UCHAR for unsigned char types (guchar) # INT for signed integer types (gint) # UINT for unsigned integer types (guint) # LONG for signed long integer types (glong) # ULONG for unsigned long integer types (gulong) # ENUM for enumeration types (gint) # FLAGS for flag enumeration types (guint) # FLOAT for single-precision float types (gfloat) # DOUBLE for double-precision float types (gdouble) # STRING for string types (gchar*) # PARAM for GParamSpec or derived types (GParamSpec*) # BOXED for boxed (anonymous but reference counted) types (GBoxed*) # POINTER for anonymous pointer types (gpointer) # OBJECT for GObject or derived types (GObject*) # NONE deprecated alias for VOID # BOOL deprecated alias for BOOLEAN VOID:VOID ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������zapping-0.10cvs6/src/zmarshalers.c������������������������������������������������������������������ 644 � 764 � 144 � 5051 10432662577 12310� �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������� #include <glib-object.h> #ifdef G_ENABLE_DEBUG #define g_marshal_value_peek_boolean(v) g_value_get_boolean (v) #define g_marshal_value_peek_char(v) g_value_get_char (v) #define g_marshal_value_peek_uchar(v) g_value_get_uchar (v) #define g_marshal_value_peek_int(v) g_value_get_int (v) #define g_marshal_value_peek_uint(v) g_value_get_uint (v) #define g_marshal_value_peek_long(v) g_value_get_long (v) #define g_marshal_value_peek_ulong(v) g_value_get_ulong (v) #define g_marshal_value_peek_int64(v) g_value_get_int64 (v) #define g_marshal_value_peek_uint64(v) g_value_get_uint64 (v) #define g_marshal_value_peek_enum(v) g_value_get_enum (v) #define g_marshal_value_peek_flags(v) g_value_get_flags (v) #define g_marshal_value_peek_float(v) g_value_get_float (v) #define g_marshal_value_peek_double(v) g_value_get_double (v) #define g_marshal_value_peek_string(v) (char*) g_value_get_string (v) #define g_marshal_value_peek_param(v) g_value_get_param (v) #define g_marshal_value_peek_boxed(v) g_value_get_boxed (v) #define g_marshal_value_peek_pointer(v) g_value_get_pointer (v) #define g_marshal_value_peek_object(v) g_value_get_object (v) #else /* !G_ENABLE_DEBUG */ /* WARNING: This code accesses GValues directly, which is UNSUPPORTED API. * Do not access GValues directly in your code. Instead, use the * g_value_get_*() functions */ #define g_marshal_value_peek_boolean(v) (v)->data[0].v_int #define g_marshal_value_peek_char(v) (v)->data[0].v_int #define g_marshal_value_peek_uchar(v) (v)->data[0].v_uint #define g_marshal_value_peek_int(v) (v)->data[0].v_int #define g_marshal_value_peek_uint(v) (v)->data[0].v_uint #define g_marshal_value_peek_long(v) (v)->data[0].v_long #define g_marshal_value_peek_ulong(v) (v)->data[0].v_ulong #define g_marshal_value_peek_int64(v) (v)->data[0].v_int64 #define g_marshal_value_peek_uint64(v) (v)->data[0].v_uint64 #define g_marshal_value_peek_enum(v) (v)->data[0].v_long #define g_marshal_value_peek_flags(v) (v)->data[0].v_ulong #define g_marshal_value_peek_float(v) (v)->data[0].v_float #define g_marshal_value_peek_double(v) (v)->data[0].v_double #define g_marshal_value_peek_string(v) (v)->data[0].v_pointer #define g_marshal_value_peek_param(v) (v)->data[0].v_pointer #define g_marshal_value_peek_boxed(v) (v)->data[0].v_pointer #define g_marshal_value_peek_pointer(v) (v)->data[0].v_pointer #define g_marshal_value_peek_object(v) (v)->data[0].v_pointer #endif /* !G_ENABLE_DEBUG */ /* VOID:VOID (zmarshalers.list:25) */ ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������zapping-0.10cvs6/src/zmarshalers.h������������������������������������������������������������������ 644 � 764 � 144 � 400 7762173334 12246� �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������� #ifndef __z_marshal_MARSHAL_H__ #define __z_marshal_MARSHAL_H__ #include <glib-object.h> G_BEGIN_DECLS /* VOID:VOID (zmarshalers.list:25) */ #define z_marshal_VOID__VOID g_cclosure_marshal_VOID__VOID G_END_DECLS #endif /* __z_marshal_MARSHAL_H__ */ ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������zapping-0.10cvs6/src/zspinslider.c������������������������������������������������������������������ 644 � 764 � 144 � 20502 10155364334 12331� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Zapping TV viewer * * Copyright (C) 2000, 2001, 2002 Iaki Garca Etxebarria * Copyright (C) 2000, 2001, 2002, 2003, 2004 Michael H. Schimek * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* $Id: zspinslider.c,v 1.1 2004/12/07 17:31:08 mschimek Exp $ */ /* SpinSlider widget: [12345___|<>] unit [--||--------][Reset] */ #include <math.h> #include "zmisc.h" #include "zspinslider.h" static GObjectClass * parent_class; gfloat z_spinslider_get_value (ZSpinSlider * sp) { g_return_val_if_fail (Z_IS_SPINSLIDER (sp), 0.0); return sp->spin_adj->value; } void z_spinslider_set_value (ZSpinSlider * sp, gfloat value) { g_return_if_fail (Z_IS_SPINSLIDER (sp)); gtk_adjustment_set_value (sp->spin_adj, value); gtk_adjustment_set_value (sp->hscale_adj, value); } gint z_spinslider_get_int_value (ZSpinSlider * sp) { gfloat value; g_return_val_if_fail (Z_IS_SPINSLIDER (sp), 0); value = sp->spin_adj->value; if (value < G_MININT || value > G_MAXINT) g_warning ("ZSpinSlider value %f not representable as gint.", (double) value); return (gint) value; } void z_spinslider_set_int_value (ZSpinSlider * sp, gint value) { g_return_if_fail (Z_IS_SPINSLIDER (sp)); gtk_adjustment_set_value (sp->spin_adj, value); gtk_adjustment_set_value (sp->hscale_adj, value); } void z_spinslider_set_reset_value (ZSpinSlider * sp, gfloat value) { g_return_if_fail (Z_IS_SPINSLIDER (sp)); sp->history[sp->reset_state] = value; gtk_adjustment_set_value (sp->spin_adj, value); gtk_adjustment_set_value (sp->hscale_adj, value); } void z_spinslider_adjustment_changed (ZSpinSlider * sp) { g_return_if_fail (Z_IS_SPINSLIDER (sp)); sp->hscale_adj->value = sp->spin_adj->value; sp->hscale_adj->lower = sp->spin_adj->lower; sp->hscale_adj->upper = sp->spin_adj->upper + sp->spin_adj->page_size; sp->hscale_adj->step_increment = sp->spin_adj->step_increment; sp->hscale_adj->page_increment = sp->spin_adj->page_increment; sp->hscale_adj->page_size = sp->spin_adj->page_size; gtk_adjustment_changed (sp->spin_adj); gtk_adjustment_changed (sp->hscale_adj); } static void on_hscale_changed (GtkWidget * widget _unused_, ZSpinSlider * sp) { if (sp->spin_adj->value != sp->hscale_adj->value) gtk_adjustment_set_value (sp->spin_adj, sp->hscale_adj->value); } static void on_spinbutton_changed (GtkWidget * widget _unused_, ZSpinSlider * sp) { if (!sp->in_reset) { if (sp->reset_state != 0) { sp->history[0] = sp->history[1]; sp->history[1] = sp->history[2]; sp->reset_state--; } sp->history[2] = sp->spin_adj->value; } if (sp->spin_adj->value != sp->hscale_adj->value) gtk_adjustment_set_value (sp->hscale_adj, sp->spin_adj->value); } static void on_reset (GtkWidget * widget _unused_, ZSpinSlider * sp) { gfloat current_value; current_value = sp->history[2]; sp->history[2] = sp->history[1]; sp->history[1] = sp->history[0]; sp->history[0] = current_value; sp->in_reset = TRUE; gtk_adjustment_set_value (sp->spin_adj, sp->history[2]); gtk_adjustment_set_value (sp->hscale_adj, sp->history[2]); sp->in_reset = FALSE; if (sp->reset_state == 0 && fabs (sp->history[0] - sp->history[1]) < 1e-6) sp->reset_state = 2; else sp->reset_state = (sp->reset_state + 1) % 3; } static void instance_finalize (GObject * object) { /* ZSpinSlider *sp = Z_SPINSLIDER (object); */ parent_class->finalize (object); } static void instance_init (GTypeInstance * instance _unused_, gpointer g_class _unused_) { /* ZSpinSlider *sp = (ZSpinSlider *) instance; */ } #include "pixmaps/reset.h" GtkWidget * z_spinslider_new (GtkAdjustment * spin_adj, GtkAdjustment * hscale_adj, const gchar * unit, gfloat reset, gint digits) { ZSpinSlider *sp; GtkBox *box; GtkWidget *widget; g_return_val_if_fail (GTK_IS_ADJUSTMENT (spin_adj), NULL); sp = Z_SPINSLIDER (g_object_new (Z_TYPE_SPINSLIDER, NULL)); sp->spin_adj = spin_adj; sp->hscale_adj = hscale_adj; if (0) fprintf (stderr, "zss_new %f %f...%f %f %f %f %d\n", spin_adj->value, spin_adj->lower, spin_adj->upper, spin_adj->step_increment, spin_adj->page_increment, spin_adj->page_size, digits); box = GTK_BOX (&sp->hbox); /* Spin button */ { GtkSpinButton *spin_button; widget = gtk_spin_button_new (spin_adj, spin_adj->step_increment, (guint) digits); gtk_widget_show (widget); /* I don't see how to set "as much as needed", so hacking this up */ gtk_widget_set_size_request (widget, 80, -1); spin_button = GTK_SPIN_BUTTON (widget); gtk_spin_button_set_update_policy (spin_button, GTK_UPDATE_IF_VALID); gtk_spin_button_set_numeric (spin_button, TRUE); gtk_spin_button_set_wrap (spin_button, TRUE); gtk_spin_button_set_snap_to_ticks (spin_button, TRUE); gtk_box_pack_start (box, widget, /* expand */ FALSE, /* fill */ FALSE, /* padding */ 0); g_signal_connect (G_OBJECT (spin_adj), "value-changed", G_CALLBACK (on_spinbutton_changed), sp); } /* Unit name */ if (unit) { GtkWidget *label; label = gtk_label_new (unit); gtk_widget_show (label); gtk_box_pack_start (box, label, FALSE, FALSE, 3); } /* Slider */ if (!hscale_adj) { GtkObject *adj; /* Necessary to reach spin_adj->upper with slider. */ adj = gtk_adjustment_new (spin_adj->value, spin_adj->lower, spin_adj->upper + spin_adj->page_size, spin_adj->step_increment, spin_adj->page_increment, spin_adj->page_size); hscale_adj = GTK_ADJUSTMENT (adj); sp->hscale_adj = hscale_adj; } { GtkScale *scale; widget = gtk_hscale_new (hscale_adj); gtk_widget_show (widget); /* Another hack */ gtk_widget_set_size_request (widget, 80, -1); scale = GTK_SCALE (widget); gtk_scale_set_draw_value (scale, FALSE); gtk_scale_set_digits (scale, -digits); gtk_box_pack_start (box, widget, /* expand */ TRUE, /* fill */ TRUE, /* padding */ 3); g_signal_connect (G_OBJECT (hscale_adj), "value-changed", G_CALLBACK (on_hscale_changed), sp); } /* Reset button */ { static GdkPixbuf *pixbuf = NULL; GtkWidget *button; GtkWidget *image; sp->history[0] = reset; sp->history[1] = reset; sp->history[2] = reset; sp->reset_state = 0; sp->in_reset = FALSE; if (!pixbuf) pixbuf = gdk_pixbuf_from_pixdata (&reset_png, FALSE, NULL); if (pixbuf && (image = gtk_image_new_from_pixbuf (pixbuf))) { gtk_widget_show (image); button = gtk_button_new (); gtk_container_add (GTK_CONTAINER (button), image); z_tooltip_set (button, _("Reset")); } else { button = gtk_button_new_with_label (_("Reset")); } gtk_widget_show (button); gtk_box_pack_start (box, button, /* expand */ FALSE, /* fill */ FALSE, /* padding */ 0); g_signal_connect (G_OBJECT (button), "pressed", G_CALLBACK (on_reset), sp); } return GTK_WIDGET (sp); } static void class_init (gpointer g_class, gpointer class_data _unused_) { GObjectClass *object_class; object_class = G_OBJECT_CLASS (g_class); parent_class = g_type_class_peek_parent (g_class); object_class->finalize = instance_finalize; } GType z_spinslider_get_type (void) { static GType type = 0; if (!type) { GTypeInfo info; CLEAR (info); info.class_size = sizeof (ZSpinSliderClass); info.class_init = class_init; info.instance_size = sizeof (ZSpinSlider); info.instance_init = instance_init; type = g_type_register_static (GTK_TYPE_HBOX, "ZSpinSlider", &info, (GTypeFlags) 0); } return type; } ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������zapping-0.10cvs6/src/zspinslider.h������������������������������������������������������������������ 644 � 764 � 144 � 5005 10155364334 12317� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Zapping TV viewer * * Copyright (C) 2000, 2001, 2002 Iaki Garca Etxebarria * Copyright (C) 2000, 2001, 2002, 2003, 2004 Michael H. Schimek * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* $Id: zspinslider.h,v 1.1 2004/12/07 17:31:08 mschimek Exp $ */ #ifndef Z_SPINSLIDER_H #define Z_SPINSLIDER_H #include <gtk/gtk.h> G_BEGIN_DECLS #define Z_TYPE_SPINSLIDER (z_spinslider_get_type ()) #define Z_SPINSLIDER(obj) \ (G_TYPE_CHECK_INSTANCE_CAST ((obj), Z_TYPE_SPINSLIDER, ZSpinSlider)) #define Z_SPINSLIDER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), \ Z_TYPE_SPINSLIDER, ZSpinSliderClass)) #define Z_IS_SPINSLIDER(obj) \ (G_TYPE_CHECK_INSTANCE_TYPE ((obj), Z_TYPE_SPINSLIDER)) #define Z_IS_SPINSLIDER_CLASS(klass) \ (G_TYPE_CHECK_CLASS_TYPE ((klass), Z_TYPE_SPINSLIDER)) #define Z_SPINSLIDER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), \ Z_TYPE_SPINSLIDER, ZSpinSliderClass)) typedef struct _ZSpinSlider ZSpinSlider; typedef struct _ZSpinSliderClass ZSpinSliderClass; struct _ZSpinSlider { GtkHBox hbox; GtkAdjustment * spin_adj; GtkAdjustment * hscale_adj; gfloat history[3]; guint reset_state; gboolean in_reset; }; struct _ZSpinSliderClass { GtkHBoxClass parent_class; }; extern GType z_spinslider_get_type (void) G_GNUC_CONST; GtkWidget * z_spinslider_new (GtkAdjustment * spin_adj, GtkAdjustment * hscale_adj, const gchar * unit, gfloat reset_value, gint digits); gfloat z_spinslider_get_value (ZSpinSlider * sp); void z_spinslider_set_value (ZSpinSlider * sp, gfloat value); gint z_spinslider_get_int_value (ZSpinSlider * sp); void z_spinslider_set_int_value (ZSpinSlider * sp, gint value); void z_spinslider_set_reset_value (ZSpinSlider * sp, gfloat value); void z_spinslider_adjustment_changed (ZSpinSlider * sp); G_END_DECLS #endif /* Z_SPINSLIDER_H */ ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������zapping-0.10cvs6/src/csconvert.c�������������������������������������������������������������������� 644 � 764 � 144 � 13512 10432662504 11772� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Zapping (TV viewer for the Gnome Desktop) * Copyright (C) 2000-2001 Iaki Garca Etxebarria * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /** * Color conversion routines. Here we have the RGB->RGB conversion * routines, the YUV <-> RGB routines are in yuv2rgb.c */ #ifdef HAVE_CONFIG_H # include "config.h" #endif #include <glib.h> #include "csconvert.h" #include "yuv2rgb.h" #include "zmisc.h" #include "libtv/rgb2rgb.h" #include "libtv/yuv2rgb.h" #include "libtv/yuv2yuv.h" #define TEST 0 static struct { CSConverter_fn * convert; const void * user_data; } filters[/* src */ TV_MAX_PIXFMTS][/* dst */ TV_MAX_PIXFMTS]; static int initialized = 0; void startup_csconvert(void) { #define HM12 TV_PIXFMT_SET (TV_PIXFMT_HM12) #define NV12 TV_PIXFMT_SET (TV_PIXFMT_NV12) #define SBGGR TV_PIXFMT_SET (TV_PIXFMT_SBGGR) #define YUV420 (TV_PIXFMT_SET (TV_PIXFMT_YUV420) | \ TV_PIXFMT_SET (TV_PIXFMT_YVU420)) #define YUYV (TV_PIXFMT_SET (TV_PIXFMT_YUYV) | \ TV_PIXFMT_SET (TV_PIXFMT_UYVY) | \ TV_PIXFMT_SET (TV_PIXFMT_YVYU) | \ TV_PIXFMT_SET (TV_PIXFMT_VYUY)) #define RGB32 (TV_PIXFMT_SET (TV_PIXFMT_RGBA32_LE) | \ TV_PIXFMT_SET (TV_PIXFMT_RGBA32_BE) | \ TV_PIXFMT_SET (TV_PIXFMT_BGRA32_LE) | \ TV_PIXFMT_SET (TV_PIXFMT_BGRA32_BE) | \ TV_PIXFMT_SET (TV_PIXFMT_RGB24_LE) | \ TV_PIXFMT_SET (TV_PIXFMT_RGB24_BE)) #define RGB16 (TV_PIXFMT_SET (TV_PIXFMT_BGR16_LE) | \ TV_PIXFMT_SET (TV_PIXFMT_BGR16_BE) | \ TV_PIXFMT_SET (TV_PIXFMT_BGRA16_LE) | \ TV_PIXFMT_SET (TV_PIXFMT_BGRA16_BE)) static const CSFilters table [] = { { HM12, YUV420, (CSConverter_fn *) _tv_hm12_to_yuv420, 0 }, { NV12, YUV420, (CSConverter_fn *) _tv_nv_to_yuv420, 0 }, { NV12, YUYV, (CSConverter_fn *) _tv_nv_to_yuyv, 0 }, { NV12, RGB16 | RGB32, (CSConverter_fn *) _tv_nv_to_rgb, 0 }, { YUV420, YUV420, (CSConverter_fn *) _tv_yuv420_to_yuv420, 0 }, { YUV420, YUYV, (CSConverter_fn *) _tv_yuv420_to_yuyv, 0 }, { YUV420, RGB16 | RGB32, (CSConverter_fn *) _tv_yuv420_to_rgb, 0 }, { YUYV, YUV420, (CSConverter_fn *) _tv_yuyv_to_yuv420, 0 }, { YUYV, YUYV, (CSConverter_fn *) _tv_yuyv_to_yuyv, 0 }, { YUYV, RGB16 | RGB32, (CSConverter_fn *) _tv_yuyv_to_rgb, 0 }, { RGB32, RGB32, (CSConverter_fn *) _tv_rgb32_to_rgb32, 0 }, { RGB32, RGB16, (CSConverter_fn *) _tv_rgb32_to_rgb16, 0 }, { SBGGR, RGB16 | RGB32, (CSConverter_fn *) _tv_sbggr_to_rgb, 0 }, }; unsigned int i, j, k; if (initialized) return; CLEAR (filters); for (i = 0; i < G_N_ELEMENTS (table); ++i) for (j = 0; j < TV_MAX_PIXFMTS; ++j) for (k = 0; k < TV_MAX_PIXFMTS; ++k) if (table[i].src_pixfmt_set & TV_PIXFMT_SET (j) && table[i].dst_pixfmt_set & TV_PIXFMT_SET (k)) { if (TEST) fprintf (stderr, "register %s -> %s\n", tv_pixfmt_name (j), tv_pixfmt_name (k)); filters[j][k].convert = table[i].convert; } /* Register the YUV <- RGB filters */ startup_yuv2rgb (); initialized = 1; } int lookup_csconvert(tv_pixfmt src_pixfmt, tv_pixfmt dst_pixfmt) { if (!initialized) startup_csconvert (); if (TEST) fprintf (stderr, "%p = %s %s -> %s\n", filters[src_pixfmt][dst_pixfmt].convert, __FUNCTION__, tv_pixfmt_name (src_pixfmt), tv_pixfmt_name (dst_pixfmt)); if (filters[src_pixfmt][dst_pixfmt].convert == NULL) return -1; return (((int)src_pixfmt)<<16) + dst_pixfmt; } gboolean csconvert (void * dst_image, const tv_image_format *dst_format, const void * src_image, const tv_image_format *src_format) { CSConverter_fn *convert; const void *user_data; if (!initialized) startup_csconvert (); if (TEST) fprintf (stderr, "%s %s -> %s\n", __FUNCTION__, tv_pixfmt_name (src_format->pixel_format->pixfmt), tv_pixfmt_name (dst_format->pixel_format->pixfmt)); if (dst_format->pixel_format == src_format->pixel_format) return tv_copy_image (dst_image, dst_format, src_image, src_format); convert = filters[src_format->pixel_format->pixfmt] [dst_format->pixel_format->pixfmt].convert; if (!convert) return FALSE; user_data = filters[src_format->pixel_format->pixfmt] [dst_format->pixel_format->pixfmt].user_data; convert (dst_image, dst_format, src_image, src_format, user_data); return TRUE; } int register_converter (const char * name _unused_, tv_pixfmt src_pixfmt, tv_pixfmt dst_pixfmt, CSConverter_fn * converter, const void * user_data) { if (filters[src_pixfmt][dst_pixfmt].convert) return -1; /* already registered */ filters[src_pixfmt][dst_pixfmt].convert = converter; filters[src_pixfmt][dst_pixfmt].user_data = user_data; return 0; } int register_converters (const char * name, CSFilter *converters, int num_converters) { int i, count=0; for (i = 0; i < num_converters; ++i) if (0 == register_converter (name, converters[i].src_pixfmt, converters[i].dst_pixfmt, converters[i].convert, converters[i].user_data)) ++count; return count; } /* ------------------------------------------------------------------------ */ void shutdown_csconvert(void) { shutdown_yuv2rgb (); CLEAR (filters); } ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������zapping-0.10cvs6/src/csconvert.h�������������������������������������������������������������������� 644 � 764 � 144 � 3300 10404546345 11754� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#ifndef __CSCONVERT_H__ #define __CSCONVERT_H__ /** * Colorspace conversions. */ #include "tveng.h" typedef void CSConverter_fn (void * dst_image, const tv_image_format *dst_format, const void * src_image, const tv_image_format *src_format, const void * user_data); typedef struct { tv_pixfmt src_pixfmt; tv_pixfmt dst_pixfmt; CSConverter_fn * convert; const void * user_data; } CSFilter; typedef struct { tv_pixfmt_set src_pixfmt_set; tv_pixfmt_set dst_pixfmt_set; CSConverter_fn * convert; const void * user_data; } CSFilters; /** * Try to find an available converter, returns -1 on error or the * converter id on success. */ int lookup_csconvert(tv_pixfmt src_pixfmt, tv_pixfmt dst_pixfmt); /** * Converts from src to dest. */ gboolean csconvert(void * dst_image, const tv_image_format *dst_format, const void * src_image, const tv_image_format *src_format); /** * Registers a converter. Returns -1 and does nothing when there * already a converter for the given pair, something else on success. * User data will be passed to the converter each time it's called. */ int register_converter (const char *name, tv_pixfmt src_pixfmt, tv_pixfmt dst_pixfmt, CSConverter_fn *converter, const void *user_data); /* * Registers a bunch of converters at once. Does the same thing as * registering them one by one, it's just convenience. Returns * the number of successfully registered converters. */ int register_converters (const char *name, CSFilter *converters, int num_converters); /* startup and shutdown of the conversions */ void startup_csconvert(void); void shutdown_csconvert(void); #endif /* csconvert.h */ ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������zapping-0.10cvs6/src/zvbi.c������������������������������������������������������������������������� 644 � 764 � 144 � 156605 10442412600 10760� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Zapping (TV viewer for the Gnome Desktop) * Copyright (C) 2000-2001 Iaki Garca Etxebarria * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include "site_def.h" #ifdef HAVE_CONFIG_H # include "config.h" #endif #include <gnome.h> #include <gdk-pixbuf/gdk-pixbuf.h> #include <libgnomevfs/gnome-vfs.h> #include <glib/gmessages.h> #include <pthread.h> #include <ctype.h> #include <time.h> #include <pthread.h> #include <math.h> #include "tveng.h" /* Manages config values for zconf (it saves me some typing) */ #define ZCONF_DOMAIN "/zapping/options/vbi/" #include "zconf.h" #include "properties.h" #include "zvbi.h" #include "zmisc.h" #include "interface.h" #include "v4linterface.h" #include "osd.h" #include "remote.h" #include "globals.h" #include "subtitle.h" #include "i18n.h" #undef TRUE #undef FALSE #include "common/fifo.h" #ifndef ZVBI_CAPTURE_THREAD_DEBUG # define ZVBI_CAPTURE_THREAD_DEBUG 0 #endif #ifndef ENABLE_BKTR # define ENABLE_BKTR 0 #endif #ifndef HAVE_LRINT static long lrint (double x) { if (x < 0) return (long)(x - 0.5); else return (long)(x + 0.5); } #endif #define IS_CAPTION_PGNO(pgno) ((pgno) <= 8) #ifdef HAVE_LIBZVBI static vbi3_decoder * vbi; static ZModel * vbi_model; /* notify clients about the open/closure of the device */ static gboolean station_name_known = FALSE; static gchar station_name[256]; static vbi3_network current_network; /* current network info */ vbi_program_info program_info[2]; /* current and next program */ /* Returns the global vbi object, or NULL if vbi isn't enabled or doesn't work. You can safely use this function to test if VBI works (it will return NULL if it doesn't). */ vbi3_decoder * zvbi_get_object (void) { return vbi; } ZModel * zvbi_get_model (void) { return vbi_model; } gchar * zvbi_get_name (void) { if (!vbi || !station_name_known || !station_name) return NULL; return g_strdup (station_name); } void zvbi_name_unknown (void) { const tv_video_standard *vs; guint scanning; station_name_known = FALSE; /* XXX */ scanning = 625; if ((vs = tv_cur_video_standard (zapping->info))) if (vs->videostd_set & TV_VIDEOSTD_SET_525_60) scanning = 525; /* FIXME nk */ if (vbi) vbi3_decoder_reset (vbi, /* nk */ NULL, (525 == scanning) ? VBI3_VIDEOSTD_SET_525_60 : VBI3_VIDEOSTD_SET_625_50); } gboolean zvbi_cur_channel_get_ttx_encoding (vbi3_charset_code * charset_code, vbi3_pgno pgno) { const tv_video_line *vi; if ((vi = tv_cur_video_input (zapping->info)) && TV_VIDEO_LINE_TYPE_TUNER == vi->type) { tveng_tuned_channel *channel; if ((channel = tveng_tuned_channel_nth (global_channel_list, cur_tuned_channel))) { return tveng_tuned_channel_get_ttx_encoding (channel, charset_code, pgno); } } return FALSE; } gboolean zvbi_cur_channel_set_ttx_encoding (vbi3_pgno pgno, vbi3_charset_code charset_code) { const tv_video_line *vi; if ((vi = tv_cur_video_input (zapping->info)) && TV_VIDEO_LINE_TYPE_TUNER == vi->type) { tveng_tuned_channel *channel; if ((channel = tveng_tuned_channel_nth (global_channel_list, cur_tuned_channel))) { return tveng_tuned_channel_set_ttx_encoding (channel, pgno, charset_code); } } return FALSE; } /* Teletext character encoding menu helper functions. */ static void zvbi_encoding_menu_list_delete (gpointer data) { zvbi_encoding_menu *em = data; while (em) { zvbi_encoding_menu *next; next = em->next; g_free (em->name); CLEAR (*em); g_free (em); em = next; } } gchar * zvbi_language_name (const vbi3_character_set *cs) { gchar *string; guint i; if (NULL == cs) return NULL; string = NULL; for (i = 0; i < G_N_ELEMENTS (cs->language_code) && NULL != cs->language_code[i]; ++i) { const char *language_name; language_name = iso639_to_language_name (cs->language_code[i]); if (NULL == language_name) continue; if (NULL == string) string = g_strdup (language_name); else string = z_strappend (string, " / ", language_name, NULL); } if (NULL != string) { /* sr/hr/sl */ if (29 == cs->code) string = z_strappend (string, _(" (Latin)"), NULL); else if (32 == cs->code) string = z_strappend (string, _(" (Cyrillic)"), NULL); } return string; } static zvbi_encoding_menu * zvbi_encoding_menu_list_new (gpointer user_data) { zvbi_encoding_menu *list; vbi3_charset_code code; list = g_malloc (sizeof (*list)); list->next = NULL; list->name = g_strdup (_("_Automatic")); list->code = -1; list->user_data = user_data; for (code = 0; code < 88; ++code) { const vbi3_character_set *cs; vbi3_charset_code code2; gchar *item_name; zvbi_encoding_menu *em; zvbi_encoding_menu **emp; if (!(cs = vbi3_character_set_from_code (code))) continue; for (code2 = 0; code2 < code; ++code2) { const vbi3_character_set *cs2; if (!(cs2 = vbi3_character_set_from_code (code2))) continue; if (cs->g0 == cs2->g0 && cs->g2 == cs2->g2 && cs->subset == cs2->subset) break; } if (code2 < code) continue; /* duplicate */ item_name = zvbi_language_name (cs); if (NULL == item_name) continue; em = g_malloc (sizeof (*em)); em->name = item_name; em->code = code; em->user_data = user_data; for (emp = &list->next; *emp; emp = &(*emp)->next) if (g_utf8_collate ((*emp)->name, item_name) >= 0) break; em->next = *emp; *emp = em; } return list; } void zvbi_encoding_menu_set_active (GtkMenu * menu, vbi3_charset_code code) { zvbi_encoding_menu *list; GtkCheckMenuItem *check; list = g_object_get_data (G_OBJECT (menu), "z-encoding-list"); g_assert (NULL != list); check = list->item; for (; list; list = list->next) if (code == list->code) { check = list->item; break; } if (!check->active) gtk_check_menu_item_set_active (check, TRUE); } GtkMenu * zvbi_create_encoding_menu (zvbi_encoding_menu_toggled_cb *callback, gpointer user_data) { GtkWidget *menu; GtkMenuShell *shell; zvbi_encoding_menu *list; zvbi_encoding_menu *em; GSList *group; menu = gtk_menu_new (); shell = GTK_MENU_SHELL (menu); list = zvbi_encoding_menu_list_new (user_data); g_object_set_data_full (G_OBJECT (menu), "z-encoding-list", list, zvbi_encoding_menu_list_delete); group = NULL; for (em = list; em; em = em->next) { GtkWidget *item; if ((vbi3_charset_code) -1 == em->code) item = gtk_radio_menu_item_new_with_mnemonic (group, em->name); else item = gtk_radio_menu_item_new_with_label (group, em->name); gtk_widget_show (item); em->item = GTK_CHECK_MENU_ITEM (item); group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (item)); g_signal_connect (G_OBJECT (item), "toggled", G_CALLBACK (callback), em); gtk_menu_shell_append (shell, item); if ((vbi3_charset_code) -1 == em->code) gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (item), TRUE); } return GTK_MENU (menu); } /* VBI export option menu table helper functions. */ typedef struct { vbi3_export * context; zvbi_xot_zcname_fn * zconf_name; gpointer user_data; } zvbi_xot_data; static GtkWidget * label_new (const vbi3_option_info *oi) { GtkWidget *label; GtkMisc *misc; gchar *s; s = g_strconcat (oi->label, ":", NULL); label = gtk_label_new (s); gtk_widget_show (label); g_free (s); misc = GTK_MISC (label); gtk_misc_set_alignment (misc, 0.0, 0.5); /* gtk_misc_set_padding (misc, 0, 0); */ return label; } static void on_control_changed (GtkWidget * widget, zvbi_xot_data * xot) { gchar *keyword; const vbi3_option_info *oi; vbi3_option_value val; gchar *zcname; g_assert (NULL != xot); keyword = (gchar *) g_object_get_data (G_OBJECT (widget), "key"); oi = vbi3_export_option_info_by_keyword (xot->context, keyword); g_assert (NULL != oi); zcname = xot->zconf_name (xot->context, oi, xot->user_data); if (oi->menu.str) { val.num = z_object_get_int_data (G_OBJECT (widget), "index"); if (vbi3_export_option_menu_set (xot->context, keyword, val.num)) zconf_set_int (val.num, zcname); } else { switch (oi->type) { case VBI3_OPTION_BOOL: val.num = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget)); if (vbi3_export_option_set (xot->context, keyword, val)) zconf_set_boolean (val.num, zcname); break; case VBI3_OPTION_INT: val.num = (int) GTK_ADJUSTMENT (widget)->value; if (vbi3_export_option_set (xot->context, keyword, val)) zconf_set_int (val.num, zcname); break; case VBI3_OPTION_REAL: val.dbl = GTK_ADJUSTMENT (widget)->value; if (vbi3_export_option_set (xot->context, keyword, val)) zconf_set_float (val.dbl, zcname); break; case VBI3_OPTION_STRING: val.str = (gchar * ) gtk_entry_get_text (GTK_ENTRY (widget)); if (vbi3_export_option_set (xot->context, keyword, val)) zconf_set_string (val.str, zcname); break; default: g_warning ("Unknown export option type %d in %s\n", oi->type, __PRETTY_FUNCTION__); break; } } g_free (zcname); } static void create_menu (GtkWidget * table, zvbi_xot_data * xot, const vbi3_option_info *oi, unsigned int index) { GtkWidget *option_menu; GtkWidget *menu; gchar *zcname; guint saved; unsigned int i; option_menu = gtk_option_menu_new (); menu = gtk_menu_new (); zcname = xot->zconf_name (xot->context, oi, xot->user_data); zconf_create_int (oi->def.num, oi->tooltip, zcname); saved = zconf_get_int (NULL, zcname); for (i = 0; i <= (unsigned int) oi->max.num; ++i) { gchar buf[32]; GtkWidget *menu_item; switch (oi->type) { case VBI3_OPTION_BOOL: case VBI3_OPTION_INT: g_snprintf (buf, sizeof (buf), "%d", oi->menu.num[i]); menu_item = gtk_menu_item_new_with_label (buf); break; case VBI3_OPTION_REAL: g_snprintf (buf, sizeof (buf), "%f", oi->menu.dbl[i]); menu_item = gtk_menu_item_new_with_label (buf); break; case VBI3_OPTION_STRING: menu_item = gtk_menu_item_new_with_label (oi->menu.str[i]); break; case VBI3_OPTION_MENU: menu_item = gtk_menu_item_new_with_label (oi->menu.str[i]); break; default: g_warning ("Unknown export option type %d in %s\n", oi->type, __PRETTY_FUNCTION__); continue; } z_object_set_const_data (G_OBJECT (menu_item), "key", oi->keyword); g_object_set_data (G_OBJECT (menu_item), "index", GINT_TO_POINTER (i)); g_signal_connect (G_OBJECT (menu_item), "activate", G_CALLBACK (on_control_changed), xot); gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_item); if (i == saved) { on_control_changed (menu_item, xot); } } gtk_option_menu_set_menu (GTK_OPTION_MENU (option_menu), menu); gtk_option_menu_set_history (GTK_OPTION_MENU (option_menu), saved); z_tooltip_set (option_menu, oi->tooltip); g_free (zcname); gtk_widget_show_all (option_menu); gtk_table_resize (GTK_TABLE (table), index + 1, 2); gtk_table_attach (GTK_TABLE (table), label_new (oi), 0, 1, index, index + 1, (GtkAttachOptions)(GTK_FILL), (GtkAttachOptions)(0), 0, 0); gtk_table_attach (GTK_TABLE (table), option_menu, 1, 2, index, index + 1, (GtkAttachOptions)(GTK_EXPAND | GTK_FILL), (GtkAttachOptions)(0), 0, 0); } static void create_checkbutton (GtkWidget * table, zvbi_xot_data * xot, const vbi3_option_info *oi, unsigned int index) { GtkWidget *check_button; gchar *zcname; zcname = xot->zconf_name (xot->context, oi, xot->user_data); zconf_create_boolean (oi->def.num, oi->tooltip, zcname); check_button = gtk_check_button_new_with_label (oi->label); gtk_widget_show (check_button); gtk_toggle_button_set_mode (GTK_TOGGLE_BUTTON (check_button), /* indicator */ FALSE); z_tooltip_set (check_button, oi->tooltip); z_object_set_const_data (G_OBJECT (check_button), "key", oi->keyword); g_signal_connect (G_OBJECT (check_button), "toggled", G_CALLBACK (on_control_changed), xot); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (check_button), zconf_get_boolean (NULL, zcname)); g_free (zcname); on_control_changed (check_button, xot); gtk_table_resize (GTK_TABLE (table), index + 1, 2); gtk_table_attach (GTK_TABLE (table), check_button, 1, 2, index, index + 1, (GtkAttachOptions)(GTK_EXPAND | GTK_FILL), (GtkAttachOptions)(0), 0, 0); } static void create_slider (GtkWidget * table, zvbi_xot_data * xot, const vbi3_option_info *oi, unsigned int index) { GtkObject *adj; GtkWidget *hscale; gchar *zcname; zcname = xot->zconf_name (xot->context, oi, xot->user_data); if (VBI3_OPTION_INT == oi->type) { adj = gtk_adjustment_new (oi->def.num, oi->min.num, oi->max.num, 1, 10, 10); zconf_create_int (oi->def.num, oi->tooltip, zcname); gtk_adjustment_set_value (GTK_ADJUSTMENT (adj), zconf_get_int (NULL, zcname)); } else { adj = gtk_adjustment_new (oi->def.dbl, oi->min.dbl, oi->max.dbl, 1, 10, 10); zconf_create_float (oi->def.dbl, oi->tooltip, zcname); gtk_adjustment_set_value (GTK_ADJUSTMENT (adj), zconf_get_float (NULL, zcname)); } g_free (zcname); z_object_set_const_data (G_OBJECT (adj), "key", oi->keyword); g_signal_connect (adj, "value-changed", G_CALLBACK (on_control_changed), xot); hscale = gtk_hscale_new (GTK_ADJUSTMENT (adj)); gtk_widget_show (hscale); gtk_scale_set_value_pos (GTK_SCALE (hscale), GTK_POS_LEFT); gtk_scale_set_digits (GTK_SCALE (hscale), 0); z_tooltip_set (hscale, oi->tooltip); on_control_changed ((GtkWidget *) adj, xot); gtk_table_resize (GTK_TABLE (table), index + 1, 2); gtk_table_attach (GTK_TABLE (table), label_new (oi), 0, 1, index, index + 1, (GtkAttachOptions)(GTK_FILL), (GtkAttachOptions)(0), 0, 0); gtk_table_attach (GTK_TABLE (table), hscale, 1, 2, index, index + 1, (GtkAttachOptions)(GTK_EXPAND | GTK_FILL), (GtkAttachOptions)(0), 0, 0); } static void create_entry (GtkWidget * table, zvbi_xot_data * xot, const vbi3_option_info *oi, unsigned int index) { GtkWidget *entry; gchar *zcname; zcname = xot->zconf_name (xot->context, oi, xot->user_data); zconf_create_string (oi->def.str, oi->tooltip, zcname); entry = gtk_entry_new (); gtk_widget_show (entry); z_tooltip_set (entry, oi->tooltip); z_object_set_const_data (G_OBJECT (entry), "key", oi->keyword); g_signal_connect (G_OBJECT (entry), "changed", G_CALLBACK (on_control_changed), xot); gtk_entry_set_text (GTK_ENTRY (entry), zconf_get_string (NULL, zcname)); g_free (zcname); on_control_changed (entry, xot); gtk_table_resize (GTK_TABLE (table), index + 1, 2); gtk_table_attach (GTK_TABLE (table), label_new (oi), 0, 1, index, index + 1, (GtkAttachOptions)(GTK_FILL), (GtkAttachOptions)(0), 0, 0); gtk_table_attach (GTK_TABLE (table), entry, 1, 2, index, index + 1, (GtkAttachOptions)(GTK_EXPAND | GTK_FILL), (GtkAttachOptions)(0), 0, 0); } GtkWidget * zvbi_export_option_table_new (vbi3_export * context, zvbi_xot_zcname_fn * zconf_name, gpointer user_data) { GtkWidget *table; zvbi_xot_data *xot; const vbi3_option_info *oi; guint count; guint i; g_return_val_if_fail (NULL != context, NULL); g_return_val_if_fail (NULL != zconf_name, NULL); count = 0; for (i = 0; (oi = vbi3_export_option_info_enum (context, (int) i)); ++i) { if (!oi->label) continue; /* not intended for user */ ++count; } if (0 == count) return NULL; table = gtk_table_new (1, 2, FALSE); gtk_table_set_col_spacings (GTK_TABLE (table), 3); gtk_table_set_row_spacings (GTK_TABLE (table), 3); xot = g_malloc (sizeof (*xot)); xot->context = context; xot->zconf_name = zconf_name; xot->user_data = user_data; g_object_set_data_full (G_OBJECT (table), "zvbi-xot-data", xot, g_free); for (i = 0; (oi = vbi3_export_option_info_enum (context, (int) i)); ++i) { if (!oi->label) continue; /* not intended for user */ if (oi->menu.str) { create_menu (table, xot, oi, i); } else { switch (oi->type) { case VBI3_OPTION_BOOL: create_checkbutton (table, xot, oi, i); break; case VBI3_OPTION_INT: case VBI3_OPTION_REAL: create_slider (table, xot, oi, i); break; case VBI3_OPTION_STRING: create_entry (table, xot, oi, i); break; default: g_warning ("Unknown export option type %d in %s", oi->type, __FUNCTION__); continue; } } } return table; } gboolean zvbi_export_load_zconf (vbi3_export * context, zvbi_xot_zcname_fn * zconf_name, gpointer user_data) { const vbi3_option_info *oi; guint i; for (i = 0; (oi = vbi3_export_option_info_enum (context, (int) i)); ++i) { vbi3_option_value val; gchar *zcname; if (!oi->label) continue; /* not intended for user */ zcname = zconf_name (context, oi, user_data); if (oi->menu.str) { zconf_create_int (oi->def.num, oi->tooltip, zcname); val.num = zconf_get_int (NULL, zcname); if (!vbi3_export_option_menu_set (context, oi->keyword, val.num)) { g_free (zcname); zcname = NULL; return FALSE; } } else { switch (oi->type) { case VBI3_OPTION_BOOL: zconf_create_boolean (oi->def.num, oi->tooltip, zcname); val.num = zconf_get_boolean (NULL, zcname); break; case VBI3_OPTION_INT: zconf_create_int (oi->def.num, oi->tooltip, zcname); val.num = zconf_get_int (NULL, zcname); break; case VBI3_OPTION_REAL: zconf_create_float (oi->def.dbl, oi->tooltip, zcname); val.dbl = zconf_get_float (NULL, zcname); break; case VBI3_OPTION_STRING: zconf_create_string (oi->def.str, oi->tooltip, zcname); val.str = (gchar *) zconf_get_string (NULL, zcname); break; default: g_warning ("Unknown export option type %d in %s", oi->type, __FUNCTION__); g_free (zcname); zcname = NULL; continue; } if (!vbi3_export_option_set (context, oi->keyword, val)) { g_free (zcname); zcname = NULL; return FALSE; } } g_free (zcname); zcname = NULL; } return TRUE; } /* Subtitle helper functions. */ vbi3_pgno zvbi_find_subtitle_page (tveng_device_info * info) { vbi3_caption_decoder *cd; vbi3_teletext_decoder *td; double now; vbi3_pgno pgno; const tv_video_standard *vs; if (NULL == vbi) return 0; cd = vbi3_decoder_cast_to_caption_decoder (vbi); now = zf_current_time () - 20.0 /* seconds */; for (pgno = VBI3_CAPTION_CC1; pgno <= VBI3_CAPTION_CC4; ++pgno) { vbi3_cc_channel_stat cs; if (!vbi3_caption_decoder_get_cc_channel_stat (cd, &cs, pgno)) continue; if (cs.last_received >= now) return pgno; } td = vbi3_decoder_cast_to_teletext_decoder (vbi); for (pgno = 0x100; pgno <= 0x899; pgno = vbi3_add_bcd (pgno, 0x001)) { vbi3_ttx_page_stat ps; if (!vbi3_teletext_decoder_get_ttx_page_stat (td, &ps, /* nk: current */ NULL, pgno)) continue; if (VBI3_SUBTITLE_PAGE == ps.page_type) return pgno; } vs = tv_cur_video_standard (info); if (NULL != vs && (vs->videostd_set & TV_VIDEOSTD_SET_NTSC)) { /* Wild guess. */ return VBI3_CAPTION_CC1; } return 0; } #if 0 /* temporarily disabled */ enum ttx_message { TTX_NONE=0, /* No messages */ TTX_PAGE_RECEIVED, /* The monitored page has been received */ TTX_NETWORK_CHANGE, /* New network info feeded into the decoder */ TTX_PROG_INFO_CHANGE, /* New program info feeded into the decoder */ TTX_TRIGGER, /* Trigger event, ttx_message_data.link filled */ TTX_CHANNEL_SWITCHED, /* zvbi_channel_switched was called, the cache has been cleared */ TTX_BROKEN_PIPE /* No longer connected to the TTX decoder */ }; typedef struct { enum ttx_message msg; union { vbi_link link; /* A trigger link */ } data; } ttx_message_data; /* Trigger handling */ static gint trigger_timeout_id = NO_SOURCE_ID; static gint trigger_client_id = -1; static vbi_link last_trigger; static void on_trigger_clicked (GtkWidget * widget, vbi_link * trigger) { switch (trigger->type) { case VBI_LINK_HTTP: case VBI_LINK_FTP: case VBI_LINK_EMAIL: z_url_show (NULL, trigger->url); break; case VBI_LINK_PAGE: case VBI_LINK_SUBPAGE: python_command_printf (widget, "zapping.ttx_open_new(%x, %d)", trigger->pgno, (trigger->subno <= 0 || trigger->subno > 0x99) ? vbi_bcd2dec (trigger->subno) : -1); break; case VBI_LINK_LID: case VBI_LINK_TELEWEB: case VBI_LINK_MESSAGE: /* ignore */ break; default: ShowBox("Unhandled trigger type %d, please contact the maintainer", GTK_MESSAGE_WARNING, trigger->type); break; } } static void acknowledge_trigger (vbi_link * link) { GtkWidget *button; gchar *buffer; GtkWidget *pix; gint filter_level = 9; gint action = zcg_int(NULL, "trigger_default"); switch (zcg_int(NULL, "filter_level")) { case 0: /* High priority */ filter_level = 2; break; case 1: /* Medium, high */ filter_level = 5; break; default: break; } if (link->priority > filter_level) return; switch (link->itv_type) { case VBI_WEBLINK_PROGRAM_RELATED: action = zcg_int(NULL, "pr_trigger"); break; case VBI_WEBLINK_NETWORK_RELATED: action = zcg_int(NULL, "nw_trigger"); break; case VBI_WEBLINK_STATION_RELATED: action = zcg_int(NULL, "st_trigger"); break; case VBI_WEBLINK_SPONSOR_MESSAGE: action = zcg_int(NULL, "sp_trigger"); break; case VBI_WEBLINK_OPERATOR: action = zcg_int(NULL, "op_trigger"); break; default: break; } if (link->autoload) action = 2; if (!action) /* ignore */ return; if (action == 2) /* open automagically */ { on_trigger_clicked(NULL, link); return; } #warning /* pix = gtk_image_new_from_stock (link->eacem ? "zapping-eacem-icon" : "zapping-atvef-icon", GTK_ICON_SIZE_BUTTON);*/ pix=0; if (pix) { gtk_widget_show (pix); button = gtk_button_new (); gtk_container_add (GTK_CONTAINER (button), pix); } else /* pixmaps not installed */ { /* click me, tsk tsk. */ /* button = gtk_button_new_with_label (_("Click me"));*/ button = gtk_button_new_with_label (" "); } /* FIXME: Show more fields (type, itv...) * {mhs}: * type is not for users. * nuid identifies the network (or 0), same code as vbi_network.nuid. * Only for PAGE/SUBPAGE links or triggers. * expires is the time (seconds and fractions since epoch (-> time_t/timeval)) * until the target is valid. * autoload requests to open the target without user * confirmation (ATVEF flag). * itv_type (ATVEF) and priority (EACEM) are intended for filtering * -> preferences, and display priority. EACEM priorities are: * emergency = 0 (never blocked) * high = 1 or 2 * medium = 3, 4 or 5 * low = 6, 7, 8 or 9 (default 9) */ memcpy(&last_trigger, link, sizeof(last_trigger)); g_signal_connect(G_OBJECT(button), "clicked", G_CALLBACK(on_trigger_clicked), &last_trigger); gtk_widget_show(button); switch (link->type) { case VBI_LINK_HTTP: case VBI_LINK_FTP: case VBI_LINK_EMAIL: if (link->name[0]) buffer = g_strdup_printf(" %s", link->name /* , link->url */); else buffer = g_strdup_printf(" %s", link->url); z_tooltip_set(button, ("Open this link with the predetermined Web browser.\n" /* FIXME wrong */ "You can configure this in the Gnome Control Center " "under Advanced/Preferred Applications/Web Browser")); break; case VBI_LINK_PAGE: case VBI_LINK_SUBPAGE: if (link->name[0]) buffer = g_strdup_printf(_(" %s: Teletext Page %x"), link->name, link->pgno); else buffer = g_strdup_printf(_(" Teletext Page %x"), link->pgno); z_tooltip_set(button, _("Open this page with Zapzilla")); break; case VBI_LINK_MESSAGE: buffer = g_strdup_printf(" %s", link->name); gtk_widget_set_sensitive(button, FALSE); break; default: ShowBox("Unhandled link type %d, please contact the maintainer", GTK_MESSAGE_WARNING, link->type); buffer = g_strdup_printf("%s", link->name); break; } z_status_set_widget(button); z_status_print(buffer, /* markup */ FALSE, -1); g_free(buffer); } #endif /* 0 */ static void update_main_title (void) { tveng_tuned_channel *channel; const gchar *name; /* Can be NULL. */ name = current_network.name; channel = tveng_tuned_channel_nth (global_channel_list, cur_tuned_channel); if (!channel) z_set_main_title (NULL, name); else if (!channel->name) z_set_main_title (channel, name); } #if 0 static gint trigger_timeout (gint client_id) { enum ttx_message msg; ttx_message_data data; while ((msg = ttx_client_next_message (client_id, &data))) switch(msg) { case TTX_PAGE_RECEIVED: case TTX_CHANNEL_SWITCHED: break; case TTX_NETWORK_CHANGE: case TTX_PROG_INFO_CHANGE: update_main_title(); break; case TTX_BROKEN_PIPE: g_warning("Broken TTX pipe"); trigger_timeout_id = NO_SOURCE_ID; return FALSE; case TTX_TRIGGER: acknowledge_trigger((vbi_link*)(&data.data)); break; default: g_warning("Unknown message: %d", msg); break; } return TRUE; } #endif /* 0 */ static pthread_mutex_t prog_info_mutex; double zvbi_ratio = 4.0 / 3.0; #if 0 static void scan_header (vbi_page * pg) { gint col, i=0; vbi_char *ac; ucs2_t ucs2[256]; char *buf; /* Station name usually goes here */ for (col = 7; col < 16; col++) { ac = pg->text + col; if (!ac->unicode || !vbi_is_print(ac->unicode)) /* prob. bad reception, abort */ return; if (ac->unicode == 0x0020 && i == 0) continue; ucs2[i++] = ac->unicode; } if (!i) return; /* remove spaces in the end */ for (col = i-1; col >= 0 && ucs2[col] == 0x0020; col--) i = col; if (!i) return; ucs2[i] = 0; buf = ucs22local(ucs2); if (!buf || !*buf) return; /* enhance */ if (station_name_known) { col = strlen(station_name); for (i=0; i<strlen(buf) && i<255; i++) if (col <= i || station_name[i] == ' ' || (!isalnum(station_name[i]) && isalnum(buf[i]))) station_name[i] = buf[i]; station_name[i] = 0; } /* just copy */ else { g_strlcpy(station_name, buf, 255); station_name[255] = 0; } free(buf); station_name_known = TRUE; } #endif /* 0 */ int ttx_pipe[2] = { -1, -1 }; /* This is called when we receive a page, header, etc. */ static vbi3_bool main_event_handler (const vbi3_event * ev, void * user_data) { ev = ev; user_data = user_data; switch (ev->type) { case VBI3_EVENT_NETWORK: vbi3_network_set (¤t_network, ev->network); if (NULL != current_network.name) { g_strlcpy(station_name, current_network.name, 255); station_name_known = TRUE; } else if (0 != current_network.call_sign[0]) { g_strlcpy(station_name, current_network.call_sign, 255); station_name_known = TRUE; } else { station_name_known = FALSE; } update_main_title (); break; /* VBI3_EVENT_PAGE_TYPE -- nothing to do here (yet). But we must request the event to enable CC/TTX decoding to collect subtitle information which will appear in pop-up menus et al. */ default: break; } return FALSE; /* pass on */ #if 0 /* later */ switch (ev->type) { #if 0 /* temporarily disabled */ case VBI3_EVENT_TRIGGER: notify_clients_trigger (ev->ev.trigger); break; #endif case VBI3_EVENT_ASPECT: if (zconf_get_int(NULL, "/zapping/options/main/ratio") == 3) zvbi_ratio = ev->ev.aspect.ratio; break; default: break; } #endif } /* ------------------------------------------------------------------------- */ static unsigned int flush; static pthread_t capturer_id; static gboolean have_capture_thread; static gboolean capturer_quit; static gboolean capturer_quit_ack; static zf_fifo sliced_fifo; static gboolean fifo_ready; static vbi_capture * capture; static vbi_proxy_client * proxy_client; static GSource * source; static GIOChannel * channel; static guint channel_id = NO_SOURCE_ID; static zf_consumer channel_consumer; static struct { guint timeout_id; GnomeVFSHandle * handle; uint8_t buffer[8192]; const uint8_t * bp; unsigned int left; vbi_dvb_demux * demux; int64_t last_pts; vbi_sliced sliced[50]; unsigned int n_lines; double time; } pes; void zvbi_channel_switched (void) { const tv_video_line *vi; const tv_video_standard *vs; tveng_tuned_channel *channel; guint scanning; vbi3_network nk; if (!vbi) return; channel = NULL; if ((vi = tv_cur_video_input (zapping->info)) && vi->type == TV_VIDEO_LINE_TYPE_TUNER) channel = tveng_tuned_channel_nth (global_channel_list, cur_tuned_channel); /* XXX */ scanning = 625; if ((vs = tv_cur_video_standard (zapping->info))) if (vs->videostd_set & TV_VIDEOSTD_SET_525_60) scanning = 525; if (channel) { CLEAR (nk); nk.name = channel->name; /* XXX this is weak, better use a hash or CNIs. */ nk.user_data = (void *)(channel->index + 1); } vbi3_decoder_reset (vbi, channel ? &nk : NULL, (525 == scanning) ? VBI3_VIDEOSTD_SET_525_60 : VBI3_VIDEOSTD_SET_625_50); osd_clear (); #if 0 /* Temporarily removed. */ zvbi_reset_network_info (); zvbi_reset_program_info (); #endif /* XXX better ask libzvbi to flush. */ flush = 2 * 25; } static gboolean decoder_giofunc (GIOChannel * source, GIOCondition condition, gpointer data) { char dummy[16]; zf_buffer *b; source = source; condition = condition; data = data; if (read (ttx_pipe[0], dummy, 16 /* flush */) <= 0) { /* Error or EOF, don't call again. */ return FALSE; } while ((b = zf_recv_full_buffer (&channel_consumer))) { unsigned int n_lines; if (b->used >= 0) { n_lines = b->used / sizeof (vbi_sliced); if (flush > 0) { --flush; } else { if (vbi) vbi3_decoder_feed (vbi, (vbi3_sliced *) b->data, (unsigned int) n_lines, b->time); } } zf_send_empty_buffer (&channel_consumer, b); } return TRUE; /* call again */ } static GTimeVal pes_source_timeout (gpointer user_data) { GTimeVal curr_time; gint panic = 0; user_data = user_data; while (panic++ < 20) { int64_t pts; double now; if (pes.n_lines > 0) { if (vbi) vbi3_decoder_feed (vbi, (vbi3_sliced *) pes.sliced, pes.n_lines, pes.time); pes.n_lines = 0; } while (0 == pes.left) { GnomeVFSFileSize actual; GnomeVFSResult res; /* XXX this blocks? Should use a g_source. */ res = gnome_vfs_read (pes.handle, pes.buffer, sizeof (pes.buffer), &actual); switch (res) { case GNOME_VFS_OK: pes.bp = pes.buffer; pes.left = actual; break; case GNOME_VFS_ERROR_EOF: /* Rewind. */ res = gnome_vfs_seek (pes.handle, GNOME_VFS_SEEK_START, /* offset */ 0); if (GNOME_VFS_OK == res) { pes.n_lines = 0; pes.last_pts = -1; vbi_dvb_demux_reset (pes.demux); break; } /* Fall through. */ default: z_show_non_modal_message_dialog (GTK_WINDOW (zapping), GTK_MESSAGE_ERROR, _("PES file read error"), "%s", gnome_vfs_result_to_string (res)); curr_time.tv_sec = 0; curr_time.tv_usec = 0; return curr_time; /* don't call again */ } } pes.n_lines = vbi_dvb_demux_cor (pes.demux, pes.sliced, G_N_ELEMENTS (pes.sliced), &pts, &pes.bp, &pes.left); if (0 == pes.n_lines) goto later; /* We must satisfy three needs here: a) preserve delta-pts so the vbi decoder won't assume frame dropping. b) pass system time for proper synchronisation (e.g. recording or activity detection). c) play back a PES file in real time. */ pts &= ((int64_t) 1 << 33) - 1; g_get_current_time (&curr_time); now = curr_time.tv_sec + curr_time.tv_usec * (1 / 1e6); if (pes.last_pts < 0) { pes.last_pts = pts; pes.time = now; } else { int64_t dpts; if (pts < pes.last_pts) { /* Wrapped around. */ dpts = ((int64_t) 1 << 33) - pes.last_pts + pts; } else { dpts = pts - pes.last_pts; } pes.last_pts = pts; pes.time += dpts / 90000.0; if (0) fprintf (stderr, "now=%f pes.time=%f dpts=%f\n", now, pes.time, dpts / 90000.0); if (pes.time > now) { double sec; curr_time.tv_usec = lrint (modf (pes.time, &sec) * 1e6); curr_time.tv_sec = lrint (sec); return curr_time; } } } later: g_get_current_time (&curr_time); curr_time.tv_usec += 33333; if (curr_time.tv_usec > 1000000) { curr_time.tv_sec += 1; curr_time.tv_usec -= 1000000; } return curr_time; } typedef struct { GSource source; GPollFD poll_fd; zf_producer producer; } proxy_source; static gboolean proxy_source_prepare (GSource * source, gint * timeout) { source = source; *timeout = -1; /* infinite */ return FALSE; /* go poll */ } static gboolean proxy_source_check (GSource * source) { proxy_source *ps = PARENT (source, proxy_source, source); return !!(ps->poll_fd.revents & G_IO_IN); } static gboolean proxy_source_dispatch (GSource * source, GSourceFunc callback, gpointer user_data) { struct timeval timeout; vbi_sliced sliced[50]; int n_lines; double time; source = source; callback = callback; user_data = user_data; timeout.tv_sec = 0; timeout.tv_usec = 0; switch (vbi_capture_read_sliced (capture, sliced, &n_lines, &time, &timeout)) { case 1: /* ok */ if (ZVBI_CAPTURE_THREAD_DEBUG) { fprintf (stdout, ","); fflush (stdout); } if (flush > 0) { --flush; break; } if (vbi) vbi3_decoder_feed (vbi, (vbi3_sliced *) sliced, n_lines, time); break; default: /* What now? */ break; } return TRUE; } static GSourceFuncs proxy_source_funcs = { .prepare = proxy_source_prepare, .check = proxy_source_check, .dispatch = proxy_source_dispatch, }; static void zvbi_close (void); static gboolean zvbi_open_device (const char * dev_name); /* Attn: must be pthread_cancel-safe */ static void * capturing_thread (void *x) { struct timeval timeout; zf_producer p; #if 0 list stack; int stacked; init_list(&stack); glitch_time = v4l->time_per_frame * 1.25; stacked_time = 0.0; last_time = 0.0; stacked = 0; #endif x = x; if (ZVBI_CAPTURE_THREAD_DEBUG) fprintf (stderr, "VBI capture thread started\n"); D(); timeout.tv_sec = 1; timeout.tv_usec = 0; assert (zf_add_producer (&sliced_fifo, &p)); while (!capturer_quit) { zf_buffer *b; int lines; b = zf_wait_empty_buffer (&p); retry: switch (vbi_capture_read_sliced (capture, (vbi_sliced *) b->data, &lines, &b->time, &timeout)) { case 1: /* ok */ if (ZVBI_CAPTURE_THREAD_DEBUG) { fprintf (stdout, "."); fflush (stdout); } break; case 0: /* timeout */ if (ZVBI_CAPTURE_THREAD_DEBUG) fprintf (stderr, "Timeout in VBI capture thread %d %d\n", (int) timeout.tv_sec, (int) timeout.tv_usec); #if 0 for (; stacked > 0; stacked--) send_full_buffer (&p, PARENT (rem_head(&stack), buffer, node)); #endif b->used = -1; b->error = errno; b->errorstr = _("VBI interface timeout"); zf_send_full_buffer (&p, b); if (-1 != ttx_pipe[1]) write (ttx_pipe[1], "x", 1); goto abort; default: /* error */ if (ZVBI_CAPTURE_THREAD_DEBUG) fprintf (stderr, "Error %d, %s in VBI capture thread\n", errno, strerror (errno)); if (EIO == errno) { if (NULL == proxy_client) { zvbi_close (); if (zvbi_open_device (zcg_char (NULL, "vbi_device"))) { usleep (100000); /* prevent busy loop */ goto retry; /* XXX */ } } } #if 0 for (; stacked > 0; stacked--) send_full_buffer (&p, PARENT (rem_head(&stack), buffer, node)); #endif b->used = -1; b->error = errno; b->errorstr = _("VBI interface: Failed to read from the device"); zf_send_full_buffer (&p, b); if (-1 != ttx_pipe[1]) write (ttx_pipe[1], "x", 1); goto abort; } if (lines == 0) { ((vbi_sliced *) b->data)->id = VBI_SLICED_NONE; b->used = sizeof(vbi_sliced); /* zero means EOF */ } else { b->used = lines * sizeof(vbi_sliced); } #if 0 /* L8R */ /* * This curious construct compensates temporary shifts * caused by an unusual delay between read() and * the execution of gettimeofday(). A complete loss * remains lost. */ if (last_time > 0 && (b->time - (last_time + stacked_time)) > glitch_time) { if (stacked >= (f->buffers.members >> 2)) { /* Not enough space &| hopeless desynced */ for (stacked_time = 0.0; stacked > 0; stacked--) { buffer *b = PARENT(rem_head(&stack), buffer, node); send_full_buffer(&p, b); } } else { add_tail(&stack, &b->node); stacked_time += v4l->time_per_frame; stacked++; continue; } } else { /* (back) on track */ for (stacked_time = 0.0; stacked > 0; stacked--) { buffer *b = PARENT(rem_head(&stack), buffer, node); b->time = last_time += v4l->time_per_frame; send_full_buffer(&p, b); } } last_time = b->time; #endif zf_send_full_buffer(&p, b); if (-1 != ttx_pipe[1]) write (ttx_pipe[1], "x", 1); } abort: if (ZVBI_CAPTURE_THREAD_DEBUG) fprintf (stderr, "VBI capture thread terminates\n"); if (-1 != ttx_pipe[1]) { /* Send EOF and close. */ close (ttx_pipe[1]); ttx_pipe[1] = -1; } zf_rem_producer (&p); capturer_quit_ack = TRUE; return NULL; } static void run_box_errno (int errnum) { z_show_non_modal_message_dialog (GTK_WINDOW (zapping), GTK_MESSAGE_ERROR, _("VBI initialization failed"), "%s", strerror (errnum)); } static void destroy_threads (void) { D(); if (NULL == vbi) return; D(); if (NO_SOURCE_ID != pes.timeout_id) { D(); g_source_remove (pes.timeout_id); pes.timeout_id = NO_SOURCE_ID; } if (NULL != source) { proxy_source *ps = PARENT (source, proxy_source, source); D(); zf_rem_producer (&ps->producer); g_source_destroy (source); g_source_unref (source); source = NULL; proxy_client = NULL; } if (have_capture_thread) { D(); z_join_thread_with_timeout ("vbicap", capturer_id, &capturer_quit, &capturer_quit_ack, /* timeout */ 15); have_capture_thread = FALSE; } D(); { if (NO_SOURCE_ID != channel_id) { /* Undo g_io_add_watch(). */ g_source_remove (channel_id); channel_id = NO_SOURCE_ID; } if (-1 != ttx_pipe[0]) { close (ttx_pipe[0]); ttx_pipe[0] = -1; } if (NULL != channel) { g_io_channel_unref (channel); channel = NULL; } } D(); if (fifo_ready) { zf_rem_consumer (&channel_consumer); zf_destroy_fifo (&sliced_fifo); fifo_ready = FALSE; } D(); } static gboolean init_threads (void) { int buffer_size; gboolean success; D(); /* XXX when we have WSS625, disable video sampling*/ if (NULL != pes.handle) { buffer_size = 50 * sizeof (vbi_sliced); } else { vbi_raw_decoder *raw; raw = vbi_capture_parameters (capture); buffer_size = (raw->count[0] + raw->count[1]) * sizeof (vbi_sliced); } if (!zf_init_buffered_fifo (&sliced_fifo, "vbi-sliced", 20, buffer_size)) { run_box_errno (ENOMEM); return FALSE; } fifo_ready = TRUE; D(); capturer_quit = FALSE; capturer_quit_ack = FALSE; success = (NULL != zf_add_consumer (&sliced_fifo, &channel_consumer)); g_assert (success); if (0 != pipe (ttx_pipe)) { /* FIXME */ g_warning ("Cannot create ttx pipe"); exit (EXIT_FAILURE); } channel = g_io_channel_unix_new (ttx_pipe[0]); channel_id = g_io_add_watch (channel, G_IO_IN, decoder_giofunc, /* user_data */ NULL); D(); if (NULL != pes.handle) { GTimeVal current_time; g_get_current_time (¤t_time); pes.timeout_id = z_timeout_add (current_time, pes_source_timeout, /* user_data */ NULL); pes.n_lines = 0; pes.last_pts = -1; } else if (NULL != proxy_client) { proxy_source *ps; /* We can avoid a thread because the proxy buffers for us. XXX should also work with mmapped reads, provided the read call does not block since we poll() already. */ /* Attn: source_funcs must be static. */ source = g_source_new (&proxy_source_funcs, sizeof (proxy_source)); ps = PARENT (source, proxy_source, source); ps->poll_fd.fd = vbi_capture_fd (capture); ps->poll_fd.events = G_IO_IN; ps->poll_fd.revents = 0; g_source_add_poll (source, &ps->poll_fd); success = (NULL != zf_add_producer (&sliced_fifo, &ps->producer)); g_assert (success); g_source_attach (source, /* context = default */ NULL); } else { if (pthread_create (&capturer_id, NULL, capturing_thread, NULL)) { run_box_errno (ENOMEM); zf_destroy_fifo (&sliced_fifo); fifo_ready = FALSE; return FALSE; } have_capture_thread = TRUE; } D(); zmodel_changed (vbi_model); return TRUE; } static void zvbi_close (void) { D(); if (NULL != capture) { vbi_capture_delete (capture); capture = NULL; } if (NULL != proxy_client) { vbi_proxy_client_destroy (proxy_client); proxy_client = NULL; } if (NULL != pes.demux) { vbi_dvb_demux_delete (pes.demux); pes.demux = NULL; } if (NULL != pes.handle) { /* Error ignored. */ gnome_vfs_close (pes.handle); pes.handle = NULL; } D(); } static void run_box_locale_errstr (const gchar * errstr) { gchar *s = NULL; if (errstr) { s = g_locale_to_utf8 (errstr, NUL_TERMINATED, NULL, NULL, NULL); g_assert (s != NULL); } z_show_non_modal_message_dialog (GTK_WINDOW (zapping), GTK_MESSAGE_ERROR, _("VBI initialization failed"), "%s", errstr ? s : ""); g_free (s); } static vbi3_decoder * allocate_vbi_decoder (void) { vbi3_decoder *vbi; D(); /* FIXME parameters */ if (!(vbi = vbi3_decoder_new (/* ca */ NULL, /* nk */ NULL, /* videostd_set */ 0))) goto failure; if (!vbi3_decoder_add_event_handler (vbi, (VBI3_EVENT_NETWORK | /* network name changed */ VBI3_EVENT_PAGE_TYPE), /* subtitle changes */ main_event_handler, /* user_data */ NULL)) goto failure; D(); return vbi; failure: if (NULL != vbi) { vbi3_decoder_delete (vbi); vbi = NULL; } run_box_errno (ENOMEM); return NULL; } static gboolean zvbi_open_pes_file (const char * dev_name) { GnomeVFSResult res; D(); res = gnome_vfs_open (&pes.handle, dev_name, GNOME_VFS_OPEN_READ); if (GNOME_VFS_OK != res) { z_show_non_modal_message_dialog (GTK_WINDOW (zapping), GTK_MESSAGE_ERROR, _("Cannot open PES file"), "Cannot open %s:\n%s.", dev_name, gnome_vfs_result_to_string (res)); goto failure; } pes.bp = pes.buffer; pes.left = 0; pes.demux = vbi_dvb_pes_demux_new (NULL, NULL); g_assert (NULL != pes.demux); pes.last_pts = -1; pes.n_lines = 0; D(); return TRUE; failure: D(); if (NULL != pes.demux) { vbi_dvb_demux_delete (pes.demux); pes.demux = NULL; } if (NULL != pes.handle) { /* Error ignored. */ gnome_vfs_close (pes.handle); pes.handle = NULL; } return FALSE; } static gboolean zvbi_open_device (const char * dev_name) { unsigned int requested_services; unsigned int services; unsigned int scanning; char *errstr; D(); if (g_file_test (dev_name, (G_FILE_TEST_IS_REGULAR | G_FILE_TEST_IS_DIR))) { z_show_non_modal_message_dialog (GTK_WINDOW (zapping), GTK_MESSAGE_ERROR, _("VBI initialization failed"), _("%s is no VBI device."), dev_name); goto failure; } D(); requested_services = (VBI_SLICED_TELETEXT_B | \ VBI_SLICED_VPS | \ VBI_SLICED_CAPTION_625 | \ VBI_SLICED_CAPTION_525 | \ VBI_SLICED_WSS_625 | \ VBI_SLICED_WSS_CPR1204); { const tv_video_standard *vs; /* XXX */ scanning = 625; if (zapping->info) if ((vs = tv_cur_video_standard (zapping->info))) if (vs->videostd_set & TV_VIDEOSTD_SET_525_60) scanning = 525; } errstr = NULL; if (ENABLE_BKTR) { services = requested_services; capture = vbi_capture_bktr_new (dev_name, scanning, &services, /* strict */ 0, &errstr, !!debug_msg); if (!capture || errstr) { g_assert (!capture); run_box_locale_errstr (errstr); free (errstr); errstr = NULL; goto failure; } } else /* Linux */ { if (1 /* use proxy */) { proxy_client = vbi_proxy_client_create (dev_name, PACKAGE, /* client flags */ 0, &errstr, !!debug_msg); if (!proxy_client || errstr) { g_assert (!proxy_client); if (errstr) { /* No message, will try V4L2. */ printv ("Cannot create proxy client: %s\n", errstr); free (errstr); errstr = NULL; } } else { services = requested_services; capture = vbi_capture_proxy_new (proxy_client, /* buffers */ 20, (int) scanning, &services, /* strict */ 0, &errstr); if (!capture || errstr) { g_assert (!capture); vbi_proxy_client_destroy (proxy_client); proxy_client = NULL; if (errstr) { /* No message, will try V4L2. */ printv ("Cannot create proxy device: %s\n", errstr); free (errstr); errstr = NULL; } } } } if (NULL == capture) { services = requested_services; capture = vbi_capture_v4l2_new (dev_name, /* buffers */ 20, &services, /* strict */ 0, &errstr, !!debug_msg); if (!capture || errstr) { g_assert (!capture); /* No message, will try V4L. */ printv ("vbi_capture_v4l2_new error: %s\n", errstr ? errstr : "unknown"); free (errstr); errstr = NULL; } } if (NULL == capture) { int video_fd; services = requested_services; video_fd = -1; if (zapping->info) { video_fd = tv_get_fd (zapping->info); if (video_fd < 0 || video_fd > 100) video_fd = -1; } capture = vbi_capture_v4l_sidecar_new (dev_name, video_fd, &services, /* strict */ -1, &errstr, !!debug_msg); if (!capture || errstr) { g_assert (!capture); run_box_locale_errstr (errstr); free (errstr); errstr = NULL; goto failure; } } } D(); return TRUE; failure: D(); if (NULL != capture) { vbi_capture_delete (capture); capture = NULL; } if (NULL != proxy_client) { vbi_proxy_client_destroy (proxy_client); proxy_client = NULL; } return FALSE; } void zvbi_stop (gboolean destroy_decoder) { destroy_threads (); if (destroy_decoder) { vbi3_decoder_delete (vbi); vbi = NULL; } zvbi_close (); zmodel_changed (vbi_model); gtk_action_group_set_visible (zapping->teletext_action_group, FALSE); gtk_action_group_set_visible (zapping->subtitle_action_group, FALSE); } gboolean zvbi_start (void) { const gchar *vbi_source; g_assert (NULL != vbi_model); vbi_source = NULL; if (!disable_vbi) vbi_source = zcg_char (NULL, "vbi_source"); if (NULL == vbi_source) vbi_source = "none"; D(); if (0 == strcmp (vbi_source, "pes")) { D(); destroy_threads (); zvbi_close (); if (!zvbi_open_pes_file (zcg_char (NULL, "vbi_pes_file"))) goto failure; if (NULL == vbi) if (!(vbi = allocate_vbi_decoder ())) goto failure; if (!init_threads ()) goto failure; if (_teletext_view_new /* have Teletext plugin */) gtk_action_group_set_visible (zapping->teletext_action_group, TRUE); if (_subtitle_view_new /* have Subtitle plugin */) gtk_action_group_set_visible (zapping->subtitle_action_group, TRUE); } else if (0 == strcmp (vbi_source, "kernel")) { D(); destroy_threads (); zvbi_close (); if (!zvbi_open_device (zcg_char (NULL, "vbi_device"))) goto failure; if (NULL == vbi) if (!(vbi = allocate_vbi_decoder ())) goto failure; if (!init_threads ()) goto failure; if (_teletext_view_new /* have Teletext plugin */) gtk_action_group_set_visible (zapping->teletext_action_group, TRUE); if (_subtitle_view_new /* have Subtitle plugin */) gtk_action_group_set_visible (zapping->subtitle_action_group, TRUE); } else /* "none" or something unknown */ { D(); if (CAPTURE_MODE_NONE == tv_get_capture_mode (zapping->info) || CAPTURE_MODE_TELETEXT == tv_get_capture_mode (zapping->info)) { /* XXX READ? */ zmisc_switch_mode (DISPLAY_MODE_WINDOW, CAPTURE_MODE_READ, zapping->info, /* warnings */ TRUE); } zvbi_stop (/* destroy_decoder */ TRUE); } D(); return TRUE; failure: zvbi_stop (/* destroy_decoder */ FALSE); return FALSE; } #endif /* HAVE_LIBZVBI */ /* VBI preferences */ static void devices_vbi_apply (GtkWidget * page) { GtkWidget *widget; const gchar *vbi_source; const gchar *s; gchar *path; gboolean restart; restart = FALSE; vbi_source = "none"; widget = lookup_widget (page, "devices-vbi-pes"); if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget))) { vbi_source = "pes"; widget = lookup_widget (page, "devices-vbi-pes-fileentry"); path = gnome_file_entry_get_full_path (GNOME_FILE_ENTRY (widget), /* file_must_exit */ FALSE); if (NULL != path) { s = zcg_char (NULL, "vbi_pes_file"); restart |= (NULL == s || 0 != strcmp (s, path)); zcs_char (path, "vbi_pes_file"); g_free (path); path = NULL; } } else { widget = lookup_widget (page, "devices-vbi-kernel"); if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget))) { vbi_source = "kernel"; widget = lookup_widget (page, "devices-vbi-kernel-fileentry"); path = gnome_file_entry_get_full_path (GNOME_FILE_ENTRY (widget), /* file_must_exit */ FALSE); if (NULL != path) { s = zcg_char (NULL, "vbi_device"); restart |= (NULL == s || 0 != strcmp (s, path)); zcs_char (path, "vbi_device"); g_free (path); path = NULL; } } } s = zcg_char (NULL, "vbi_source"); restart |= (NULL == s || 0 != strcmp (s, vbi_source)); zcs_char (vbi_source, "vbi_source"); #ifdef HAVE_LIBZVBI if (restart) { if (NULL != vbi || 0 != strcmp (vbi_source, "none")) zvbi_start (); } #endif } static void devices_vbi_setup (GtkWidget * page) { #ifdef HAVE_LIBZVBI GtkWidget *widget; const gchar *vbi_source; vbi_source = zcg_char (NULL, "vbi_source"); if (!vbi_source) vbi_source = ""; { widget = lookup_widget (page, "devices-vbi-none"); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (widget), TRUE); } { widget = lookup_widget (page, "devices-vbi-pes"); if (0 == strcmp (vbi_source, "pes")) gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (widget), TRUE); widget = lookup_widget (page, "devices-vbi-pes-fileentry"); widget = gnome_file_entry_gtk_entry (GNOME_FILE_ENTRY (widget)); gtk_entry_set_text (GTK_ENTRY (widget), zcg_char (NULL, "vbi_pes_file")); } { widget = lookup_widget (page, "devices-vbi-kernel"); if (0 == strcmp (vbi_source, "kernel")) gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (widget), TRUE); widget = lookup_widget (page, "devices-vbi-kernel-fileentry"); widget = gnome_file_entry_gtk_entry (GNOME_FILE_ENTRY (widget)); gtk_entry_set_text (GTK_ENTRY (widget), zcg_char (NULL, "vbi_device")); } #else /* !HAVE_LIBZVBI */ gtk_widget_set_sensitive (page, FALSE); #endif } static void properties_add (GtkDialog * dialog) { SidebarEntry devices [] = { { N_("VBI"), "gnome-monitor.png", "vbox59", devices_vbi_setup, devices_vbi_apply, .help_link_id = "zapping-settings-vbi" } }; SidebarGroup groups [] = { { N_("Devices"), devices, G_N_ELEMENTS (devices) }, }; standard_properties_add (dialog, groups, G_N_ELEMENTS (groups), "zapping.glade2"); } void shutdown_zvbi (void) { #ifdef HAVE_LIBZVBI zvbi_stop (/* destroy_decoder */ TRUE); vbi3_network_destroy (¤t_network); pthread_mutex_destroy (&prog_info_mutex); D(); if (vbi_model) g_object_unref (G_OBJECT (vbi_model)); D(); #endif /* HAVE_LIBZVBI */ } void startup_zvbi (void) { static const property_handler vbi_handler = { .add = properties_add, }; #ifdef HAVE_LIBZVBI // zcc_bool (TRUE, "Enable VBI decoding", "enable_vbi"); #else // zcc_bool (FALSE, "Enable VBI decoding", "enable_vbi"); #endif prepend_property_handler (&vbi_handler); zcc_char ("kernel", "VBI capturing source", "vbi_source"); zcc_char ("/dev/vbi0", "VBI kernel device", "vbi_device"); zcc_char ("", "VBI data from DVB PES file", "vbi_pes_file"); /* Currently unused. */ zcc_int (2, "ITV filter level", "filter_level"); zcc_int (1, "Default action for triggers", "trigger_default"); zcc_int (1, "Program related links", "pr_trigger"); zcc_int (1, "Network related links", "nw_trigger"); zcc_int (1, "Station related links", "st_trigger"); zcc_int (1, "Sponsor messages", "sp_trigger"); zcc_int (1, "Operator messages", "op_trigger"); #ifdef HAVE_LIBZVBI /* zconf_add_hook ("/zapping/options/vbi/enable_vbi", (ZConfHook) on_vbi_prefs_changed, (gpointer) 0xdeadbeef); zconf_add_hook ("/zapping/options/vbi/vbi_device", (ZConfHook) on_vbi_device_changed, (gpointer) 0xdeadbeef); */ vbi_model = ZMODEL (zmodel_new ()); #if 0 /* TODO */ vbi_reset_prog_info (&program_info[0]); vbi_reset_prog_info (&program_info[1]); #endif pthread_mutex_init (&prog_info_mutex, NULL); vbi3_network_init (¤t_network); pes.timeout_id = NO_SOURCE_ID; #endif /* HAVE_LIBZVBI */ } ���������������������������������������������������������������������������������������������������������������������������zapping-0.10cvs6/src/zvbi.h������������������������������������������������������������������������� 644 � 764 � 144 � 10342 10402712570 10735� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Zapping (TV viewer for the Gnome Desktop) * Copyright (C) 2001 Iaki Garca Etxebarria * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* * This code is used to communicate with the VBI device (usually * /dev/vbi), so multiple plugins can access to it simultaneously. */ #ifndef __ZVBI_H__ #define __ZVBI_H__ #ifdef HAVE_CONFIG_H # include "config.h" #endif #ifdef HAVE_LIBZVBI #include <gdk-pixbuf/gdk-pixbuf.h> #include <libzvbi.h> #include "tveng.h" #include "zmodel.h" #include "frequencies.h" #include "libvbi/vbi_decoder.h" #include "libvbi/export.h" extern void startup_zvbi (void); extern void shutdown_zvbi (void); extern void zvbi_stop (gboolean destroy_decoder); extern gboolean zvbi_start (void); /* Returns the global vbi object, or NULL if vbi isn't enabled or doesn't work. You can safely use this function to test if VBI works (it will return NULL if it doesn't). */ vbi3_decoder * zvbi_get_object (void); /* Returns the model for the vbi object. You can hook into this to know when the vbi object is created or destroyed. */ ZModel * zvbi_get_model (void); /* Returns the g_strdup'ed name of the current station, if known, or NULL. The returned value should be g_free'ed. */ gchar * zvbi_get_name (void); /* Clears the station_name_known flag. Useful when you are changing freqs fast and you want to know the current station */ void zvbi_name_unknown (void); /* Called when changing channels, inputs, etc, tells the decoding engine to flush the cache, triggers, etc. */ void zvbi_channel_switched (void); /* Reset our knowledge about network and program, update main title and info dialogs. */ void zvbi_reset_network_info (void); void zvbi_reset_program_info (void); /* Returns the current program title ("Foo", "Bar", "Unknown"), the returned string must be g_free'ed */ gchar * zvbi_current_title (void); /* Returns the current program rating ("TV-MA", "Not rated"), don't free, just a pointer. */ const gchar * zvbi_current_rating (void); /* Returns the currently selected Teletext implementation level (for vbi_fetch_*) */ vbi_wst_level zvbi_teletext_level (void); extern gchar * zvbi_language_name (const vbi3_character_set *cs); extern gboolean zvbi_cur_channel_get_ttx_encoding (vbi3_charset_code * charset_code, vbi3_pgno pgno); extern gboolean zvbi_cur_channel_set_ttx_encoding (vbi3_pgno pgno, vbi3_charset_code charset_code); typedef struct _zvbi_encoding_menu zvbi_encoding_menu; struct _zvbi_encoding_menu { zvbi_encoding_menu * next; GtkCheckMenuItem * item; gchar * name; vbi3_charset_code code; gpointer user_data; }; typedef void zvbi_encoding_menu_toggled_cb (GtkCheckMenuItem * menu_item, zvbi_encoding_menu * em); extern void zvbi_encoding_menu_set_active (GtkMenu * menu, vbi3_charset_code code); extern GtkMenu * zvbi_create_encoding_menu (zvbi_encoding_menu_toggled_cb *callback, gpointer user_data); typedef gchar * zvbi_xot_zcname_fn (const vbi3_export * e, const vbi3_option_info *oi, gpointer user_data); extern GtkWidget * zvbi_export_option_table_new (vbi3_export * context, zvbi_xot_zcname_fn * zconf_name, gpointer user_data); extern gboolean zvbi_export_load_zconf (vbi3_export * context, zvbi_xot_zcname_fn * zconf_name, gpointer user_data); vbi3_pgno zvbi_find_subtitle_page (tveng_device_info * info); #else /* !HAVE_LIBZVBI */ /* Startups the VBI engine (doesn't open devices) */ void startup_zvbi (void); /* Shuts down the VBI engine */ void shutdown_zvbi (void); typedef int vbi_pgno; #endif /* !HAVE_LIBZVBI */ #endif /* zvbi.h */ ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������zapping-0.10cvs6/src/video_xv.c��������������������������������������������������������������������� 644 � 764 � 144 � 57566 10404545775 11641� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Zapping (TV viewer for the Gnome Desktop) * Copyright (C) 2002 Iaki Garca Etxebarria * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /** * XVideo backend. * TODO: (?) Figure a way to re-enable the tveng_set_xv_port * stuff, was a nice hack. */ #ifdef HAVE_CONFIG_H # include "config.h" #endif #include <gdk/gdkx.h> #include <gtk/gtk.h> #include <stdlib.h> #define ZCONF_DOMAIN "/zapping/options/main/" #include "zconf.h" #include "globals.h" #include "zimage.h" #include "zmisc.h" #include "capture.h" #include "tveng_private.h" #ifdef USE_XV /* Real stuff */ static gboolean have_mitshm; /* Comment out if you have problems with the Shm extension (you keep getting a Gdk-error request_code:14x, minor_code:19) */ #define USE_XV_SHM 1 struct _zimage_private { gboolean uses_shm; XvImage *image; /* Port this image belongs to */ XvPortID xvport; #ifdef USE_XV_SHM XShmSegmentInfo shminfo; /* shared mem info for the xvimage */ #endif }; static GdkWindow *window = NULL; static GdkGC *gc = NULL; /* This curious construct assures that we only grab the minimum set of needed ports for all the pixformats we blit, whilst assuring that we try as hard as possible to grab anything grabable. We could also forget about grabbing and try to directly use the ports, but i suppose that isn't good practise (?) In any case, that's the trivial scenario if we decide to go that route. */ typedef struct { XvPortID xvport; int refcount; /* > 0 grabbed, 0 ungrabed */ } XvPortID_ref; static XvPortID_ref * xvports = NULL; static int num_xvports = 0; static struct { int format_id; /* XvImageFormat */ int swap_uv; /* Ports providing this format (index in xvports struct) */ int * ports; int num_ports; } formats [TV_MAX_PIXFMTS]; static XvPortID grab_port (tv_pixfmt pixfmt) { gint i; for (i=0; i<formats[pixfmt].num_ports; i++) { XvPortID_ref *ref = xvports + formats[pixfmt].ports[i]; if (ref->refcount > 0) { /* there's already a grabbed port with the right fmt supported */ ref->refcount ++; return ref->xvport; } if (Success == XvGrabPort (GDK_DISPLAY (), ref->xvport, CurrentTime)) { ref->refcount ++; return ref->xvport; } } return None; } /* Decrease the refcount of a given port, and ungrab it when it reaches 0 */ static void ungrab_port (XvPortID xvport) { int i; for (i = 0; i<num_xvports; i++) printv ("Port: %d, %d\n", (int)xvports[i].xvport, xvports[i].refcount); for (i = 0; i<num_xvports; i++) if (xvports[i].xvport == xvport) { if ((--xvports[i].refcount) < 1) { /* Check for screwed up stuff */ g_assert (xvports[i].refcount == 0); XvUngrabPort (GDK_DISPLAY (), xvports[i].xvport, CurrentTime); } return; } /* Port not found, meaning that we are ungrabbing a port we don't know about... bad */ g_assert_not_reached (); } /** * Create a new XV image with the given attributes, returns NULL on error. */ static zimage * image_new (tv_pixfmt pixfmt, guint width, guint height) { XErrorHandler old_error_handler; Display *display; struct _zimage_private *pimage; const tv_pixel_format *pf; zimage *new_image; void *image_data; XvPortID xvport; xvport = None; pimage = NULL; image_data = NULL; old_error_handler = XSetErrorHandler (x11_error_handler); display = GDK_DISPLAY (); xvport = grab_port (pixfmt); if (None == xvport) goto failure; /* Cannot grab a suitable port */ pimage = g_malloc0 (sizeof (*pimage)); #ifdef USE_XV_SHM pimage->shminfo.shmid = -1; pimage->shminfo.shmaddr = (void *) -1; #endif pf = tv_pixel_format_from_pixfmt (pixfmt); if (NULL == pf) goto failure; pimage->uses_shm = FALSE; #ifdef USE_XV_SHM if (have_mitshm) /* just in case */ { pimage->image = XvShmCreateImage (display, xvport, formats[pixfmt].format_id, /* data */ NULL, (int) width, (int) height, &pimage->shminfo); if (NULL != pimage->image) { Status status; pimage->shminfo.shmid = shmget (IPC_PRIVATE, (unsigned) pimage->image->data_size, IPC_CREAT | 0777); if (-1 == pimage->shminfo.shmid) goto shm_free; pimage->shminfo.shmaddr = shmat (pimage->shminfo.shmid, /* shmaddr: anywhere */ NULL, /* shmflg */ 0); pimage->image->data = pimage->shminfo.shmaddr; if ((void *) -1 == pimage->shminfo.shmaddr) goto shm_remove; pimage->shminfo.readOnly = False; x11_error_code = Success; status = XShmAttach (display, &pimage->shminfo); XSync (display, /* discard events */ False); if (0 != status && Success == x11_error_code) { /* Free the memory when the last attached process quits or aborts. Error ignored. */ shmctl (pimage->shminfo.shmid, IPC_RMID, 0); pimage->uses_shm = TRUE; } else { /* Error ignored. */ shmdt (pimage->shminfo.shmaddr); pimage->shminfo.shmaddr = (void *) -1; shm_remove: /* Error ignored. */ shmctl (pimage->shminfo.shmid, IPC_RMID, 0); pimage->shminfo.shmid = -1; shm_free: XFree (pimage->image); pimage->image = NULL; } } } #endif /* USE_XV_SHM */ if (NULL == pimage->image) { if (pf->n_planes > 1) image_data = malloc ((pf->color_depth * width * height) >> 3); else image_data = malloc ((pf->bits_per_pixel * width * height) >> 3); if (NULL == image_data) { g_warning ("XV image data allocation failed"); goto failure; } pimage->image = XvCreateImage (display, xvport, formats[pixfmt].format_id, image_data, (int) width, (int) height); if (NULL == pimage->image) goto failure; } /* Make sure we get an object with appropiate width and height. */ if ((guint) pimage->image->width != width || (guint) pimage->image->height != height) goto failure; /* FIXME to be sure we successfully allocated the required resources we may have to call Xv(Shm)PutImage() once. But first redesign capture.c to properly handle zimage_new() errors (it cannot switch the pixfmt if only video_mem.c supports it). */ new_image = zimage_create_object (); new_image->priv = pimage; pimage->xvport = xvport; new_image->fmt.width = width; new_image->fmt.height = height; new_image->fmt.pixel_format = tv_pixel_format_from_pixfmt (pixfmt); new_image->fmt.size = pimage->image->data_size; if (TV_PIXFMT_SET_YUV_PLANAR & TV_PIXFMT_SET (pixfmt)) { int swap_uv = formats[pixfmt].swap_uv; g_assert (3 == pimage->image->num_planes); g_assert (pimage->image->pitches[1] == pimage->image->pitches[2]); new_image->img = pimage->image->data; new_image->fmt.offset[0] = pimage->image->offsets[0]; new_image->fmt.offset[1] = pimage->image->offsets[1 + swap_uv]; new_image->fmt.offset[2] = pimage->image->offsets[2 - swap_uv]; new_image->fmt.bytes_per_line[0] = pimage->image->pitches[0]; new_image->fmt.bytes_per_line[1] = pimage->image->pitches[1]; new_image->fmt.bytes_per_line[2] = pimage->image->pitches[2]; } else if (TV_PIXFMT_SET_PACKED & TV_PIXFMT_SET (pixfmt)) { g_assert (1 == pimage->image->num_planes); new_image->img = pimage->image->data; new_image->fmt.bytes_per_line[0] = pimage->image->pitches[0]; } else { g_assert_not_reached (); } printv ("Created image: %s %ux%u, %lu, %lu shm=%u\n", new_image->fmt.pixel_format->name, new_image->fmt.width, new_image->fmt.height, new_image->fmt.bytes_per_line[0], new_image->fmt.bytes_per_line[1], pimage->uses_shm); XSetErrorHandler (old_error_handler); return new_image; failure: free (image_data); if (NULL != pimage) { #ifdef USE_XV_SHM if (pimage->uses_shm) XShmDetach (display, &pimage->shminfo); if ((void *) -1 != pimage->shminfo.shmaddr) { /* Error ignored. */ shmdt (pimage->shminfo.shmaddr); } if (-1 != pimage->shminfo.shmid) { /* Error ignored. */ shmctl (pimage->shminfo.shmid, IPC_RMID, 0); } #endif if (NULL != pimage->image) XFree (pimage->image); g_free (pimage); } if (None != xvport) ungrab_port (xvport); XSetErrorHandler (old_error_handler); return NULL; } /** * Puts the image in the given drawable, scales to the drawable's size. */ static void image_put(zimage *image, guint width, guint height) { zimage_private *pimage = image->priv; Display *display; if (!window || !gc) return; if (!pimage->image) { g_warning("Trying to put an empty XV image"); return; } display = GDK_DISPLAY (); /* FIXME these calls may allocate resources and fail (asynchronously). */ #ifdef USE_XV_SHM if (pimage->uses_shm) XvShmPutImage(display, pimage->xvport, GDK_WINDOW_XWINDOW(window), GDK_GC_XGC(gc), pimage->image, 0, 0, image->fmt.width, image->fmt.height, /* source */ 0, 0, width, height, /* dest */ True); #endif if (!pimage->uses_shm) XvPutImage(display, pimage->xvport, GDK_WINDOW_XWINDOW(window), GDK_GC_XGC(gc), pimage->image, 0, 0, image->fmt.width, image->fmt.height, /* source */ 0, 0, width, height /* dest */); XFlush (display); } /** * Frees the data associated with the image */ static void image_destroy(zimage *image) { zimage_private *pimage = image->priv; #ifdef USE_XV_SHM if (pimage->uses_shm) XShmDetach(GDK_DISPLAY(), &pimage->shminfo); #endif if (!pimage->uses_shm) free(pimage->image->data); XFree(pimage->image); #ifdef USE_XV_SHM if (pimage->uses_shm) g_assert(shmdt(pimage->shminfo.shmaddr) != -1); #endif printv ("ungrabing %d\n", (gint)pimage->xvport); ungrab_port (pimage->xvport); g_free(image->priv); } static void set_destination (GdkWindow *_w, GdkGC *_gc, tveng_device_info *info _unused_) { window = _w; gc = _gc; } static void unset_destination(tveng_device_info *info _unused_) { window = NULL; gc = NULL; } static tv_pixfmt_set supported_formats (void) { tv_pixfmt_set pixfmt_set; tv_pixfmt pixfmt; pixfmt_set = TV_PIXFMT_SET_EMPTY; for (pixfmt = 0; pixfmt < TV_MAX_PIXFMTS; ++pixfmt) if (formats[pixfmt].num_ports > 0) pixfmt_set |= TV_PIXFMT_SET (pixfmt); return pixfmt_set; } static video_backend xv = { .name = "XVideo Backend Scaler", .set_destination = set_destination, .unset_destination = unset_destination, .image_new = image_new, .image_destroy = image_destroy, .image_put = image_put, .supported_formats = supported_formats, }; /* XV_VIDEO XV_IMAGE XV_ENCODING XV_BRIGHTNESS XV_CONTRAST XV_SATURATION XV_HUE XV_COLORKEY 0x000000 ... 0xFFFFFF XV_INTERLACE Neomagic: 0 combine fields, 1 one field, 2 interlaced SMI: boolean PM2: boolean XV_CAPTURE_BRIGHTNESS SMI: SAA7111 brightness (vs. XV_BRIGHTNESS of overlay) XV_DOUBLE_BUFFER PM3: boolean MGA: boolean ATI: boolean NV: boolean XV_AUTOPAINT_COLORKEY PM3: boolean NV: boolean XV_FILTER PM3: 0 off, 1 full, 2 partial PM2: boolean XV_ALPHA: PM2: boolean (use alpha channel) XV_BKGCOLOR: PM2: 0x00RRGGBB for tv out XV_FILTER_QUALITY: TDFX: 0, 1 XV_SET_DEFAULTS: SIS: action NV: action XV_FREQ: v4l: n * 62500 Hz unit XV_MUTE: v4l: boolean XV_VOLUME: v4l: -1000, 1000 XV_COLORKEYMODE: NSC: ? XV_RED_INTENSITY: ati: -1000, 1000 XV_GREEN_INTENSITY: ati: -1000, 1000 XV_BLUE_INTENSITY: ati: -1000, 1000 XV_ITURBT_709: nv: boolean */ #if 0 /* TO DO */ static tv_bool set_control (tveng_device_info * info, tv_control * control, int value) { info = info; control = control; value = value; if ((c->atom == info->filter) && (info->port != None)) { XvSetPortAttribute(info->display, info->port, info->filter, value); } else if ((c->atom == info->double_buffer) && (info->port != None)) { XvSetPortAttribute(info->display, info->port, info->double_buffer, value); } else if ((c->atom == info->colorkey) && (info->port != None)) { int r, g, b; int rm=0xff, gm=0xff, bm=0xff, rs=16, gs=8, bs=0; /* masks, shifts */ /* Adjust colorkey to the current pixformat */ switch (info->current_bpp) { case 15: rm = gm = bm = 0xf8; rs = 7; gs = 2; bs = -3; break; case 16: rm = bm = 0xf8; gm = 0xfc; rs = 8; gs = 3; bs = -3; break; default: break; } r = (value>>16)&rm; if (rs > 0) r <<= rs; else r >>= -rs; g = (value>>8)&gm; if (gs > 0) g <<= gs; else g >>= -gs; b = value&bm; if (bs > 0) b <<= bs; else b >>= -bs; value = r+g+b; XvSetPortAttribute(info->display, info->port, info->colorkey, value); } return FALSE; } static tv_bool get_control (tveng_device_info * info, tv_control * control) { info = info; control = control; if ((c->atom == info->filter) && (info->port != None)) { XvGetPortAttribute(info->display, info->port, info->filter, &value); } else if ((c->atom == info->double_buffer) && (info->port != None)) { XvGetPortAttribute(info->display, info->port, info->double_buffer, &value); } else if ((c->atom == info->colorkey) && (info->port != None)) { int r,g,b, val; int rm=0xff, gm=0xff, bm=0xff, rs=16, gs=8, bs=0; /* masks, shifts */ XvGetPortAttribute(info->display, info->port, info->colorkey, &(val)); /* Adjust colorkey to the current pixformat */ switch (info->current_bpp) { case 15: rm = gm = bm = 0xf8; rs = 7; gs = 2; bs = -3; break; case 16: rm = bm = 0xf8; gm = 0xfc; rs = 8; gs = 3; bs = -3; break; default: break; } if (rs > 0) r = val >> rs; else r = val << -rs; r &= rm; if (gs > 0) g = val >> gs; else g = val << -gs; g &= gm; if (bs > 0) b = val >> bs; else b = val << -bs; b &= bm; value = (r<<16)+(g<<8)+b; } else { return 0; } if (c->pub.value != value) { c->pub.value = value; tv_callback_notify (info, &c->pub, c->pub._callback); } return FALSE; } static tv_bool get_control_list (tveng_device_info * info) { info = info; XvAttribute *at; int attributes, i; Display *dpy; /* ? REQUIRE_IO_MODE (-1); */ TVLOCK; tv_clear_error (info); info->port = port; dpy = info->display; info->filter = info->colorkey = info->double_buffer = None; /* Add the controls in this port to the struct of controls */ at = XvQueryPortAttributes(dpy, port, &attributes); for (i=0; i<attributes; i++) { ccontrol c; if (info->debug_level) fprintf(stderr, " TVeng.c Xv atom: %s%s%s (%i -> %i)\n", at[i].name, (at[i].flags & XvGettable) ? " gettable" : "", (at[i].flags & XvSettable) ? " settable" : "", at[i].min_value, at[i].max_value); /* Any attribute not settable and Gettable is of little value */ if ((!(at[i].flags & XvGettable)) || (!(at[i].flags & XvSettable))) continue; CLEAR (c); if (!strcmp("XV_FILTER", at[i].name)) { info->filter = XInternAtom(dpy, "XV_FILTER", False); c.atom = info->filter; if (!(c.pub.label = strdup (_("Filter")))) goto failure; c.pub.minimum = at[i].min_value; c.pub.maximum = at[i].max_value; c.pub.type = TV_CONTROL_TYPE_BOOLEAN; c.pub.menu = NULL; c.pub._parent = NULL; /* TVENG_CONTROLLER_MOTHER; */ /* XXX clone, not panel. */ if (!append_panel_control(info, &c.pub, sizeof (c))) { failure: XFree (at); UNTVLOCK; return; } } else if (!strcmp("XV_DOUBLE_BUFFER", at[i].name)) { info->double_buffer = XInternAtom(dpy, "XV_DOUBLE_BUFFER", False); c.atom = info->double_buffer; if (!(c.pub.label = strdup (_("Filter")))) goto failure2; c.pub.minimum = at[i].min_value; c.pub.maximum = at[i].max_value; c.pub.type = TV_CONTROL_TYPE_BOOLEAN; c.pub.menu = NULL; c.pub._parent = NULL; /* TVENG_CONTROLLER_MOTHER; */ if (!append_panel_control(info, &c.pub, sizeof (c))) { failure2: XFree (at); UNTVLOCK; return; } } else if (!strcmp("XV_COLORKEY", at[i].name)) { info->colorkey = XInternAtom(dpy, "XV_COLORKEY", False); c.atom = info->colorkey; /* TRANSLATORS: Color replaced by video in overlay mode. */ if (!(c.pub.label = strdup (_("Colorkey")))) goto failure3; c.pub.minimum = at[i].min_value; c.pub.maximum = at[i].max_value; c.pub.type = TV_CONTROL_TYPE_COLOR; c.pub.menu = NULL; c.pub._parent = NULL; /* TVENG_CONTROLLER_MOTHER; */ if (!append_panel_control(info, &c.pub, sizeof (c))) { failure3: XFree (at); UNTVLOCK; return; } } } XFree (at); p_tveng_update_controls(info); UNTVLOCK; return FALSE; } static void init_panel () { struct panel_device panel; CLEAR (panel); panel.set_control = set_control; panel.get_control = get_control; get_control_list (NULL); } #endif /* 0 */ static void register_port (XvPortID xvport, tv_pixfmt pixfmt, int format_id, int swap_uv, unsigned int adaptor_index) { int i, id = -1; /* First check whether there's an existing entry for this port. */ for (i=0; i<num_xvports; i++) if (xvports[i].xvport == xvport) id = i; /* Not yet registered, add a new entry for the port */ if (id == -1) { xvports = g_realloc (xvports, (num_xvports+1)*(sizeof(*xvports))); id = num_xvports ++; xvports[id].refcount = 0; xvports[id].xvport = xvport; } /* Now check whether we already knew this port for this format (we shouldn't, but checking won't harm). */ for (i=0; i<formats[pixfmt].num_ports; i++) if (formats[pixfmt].ports[i] == id) return; /* All done */ /* Check if this port uses the same format_id as other ports supporting the same format. */ if (formats[pixfmt].num_ports > 0 && formats[pixfmt].format_id != format_id) return; /* Bizarre. */ /* Add a new entry for the port in this format */ formats[pixfmt].ports = g_realloc (formats[pixfmt].ports, (formats[pixfmt].num_ports+1)*sizeof(formats[pixfmt].ports[0])); formats[pixfmt].ports[formats[pixfmt].num_ports++] = id; formats[pixfmt].format_id = format_id; formats[pixfmt].swap_uv = swap_uv; /* If this is the first port we add for the given format add ourselves to the backend list for the pixformat. */ if (formats[pixfmt].num_ports == 1) register_video_backend (pixfmt, &xv); printv ("Registered XVideo adaptor %u, image port 0x%x with pixfmt %s\n", adaptor_index, (unsigned int) xvport, tv_pixfmt_name (pixfmt)); } static void traverse_ports (Display * display, const XvAdaptorInfo * pAdaptor, unsigned int index) { unsigned int i; for (i = 0; i < pAdaptor->num_ports; ++i) { XvImageFormatValues *pImageFormats; int nImageFormats; XvPortID xvport; int j; tv_pixfmt pixfmt; xvport = pAdaptor->base_id + i; if ((XvPortID) xv_image_port != (XvPortID) -1 && xvport != (XvPortID) xv_image_port) continue; pImageFormats = XvListImageFormats (display, xvport, &nImageFormats); if (NULL == pImageFormats || 0 == nImageFormats) continue; for (j = 0; j < nImageFormats; ++j) { pixfmt = x11_xv_image_format_to_pixfmt (pImageFormats + j); switch (pixfmt) { case TV_PIXFMT_YUV420: register_port (xvport, TV_PIXFMT_YUV420, pImageFormats[j].id, FALSE, index); register_port (xvport, TV_PIXFMT_YVU420, pImageFormats[j].id, TRUE, index); break; case TV_PIXFMT_YVU420: register_port (xvport, TV_PIXFMT_YUV420, pImageFormats[j].id, TRUE, index); register_port (xvport, TV_PIXFMT_YVU420, pImageFormats[j].id, FALSE, index); break; case TV_PIXFMT_YUYV: case TV_PIXFMT_YVYU: case TV_PIXFMT_UYVY: case TV_PIXFMT_VYUY: register_port (xvport, pixfmt, pImageFormats[j].id, FALSE, index); break; case TV_PIXFMT_RGBA32_LE: case TV_PIXFMT_RGBA32_BE: case TV_PIXFMT_BGRA32_LE: case TV_PIXFMT_BGRA32_BE: case TV_PIXFMT_RGB24_LE: case TV_PIXFMT_BGR24_LE: case TV_PIXFMT_RGB16_LE: case TV_PIXFMT_RGB16_BE: case TV_PIXFMT_BGR16_LE: case TV_PIXFMT_BGR16_BE: case TV_PIXFMT_RGBA16_LE: case TV_PIXFMT_RGBA16_BE: case TV_PIXFMT_BGRA16_LE: case TV_PIXFMT_BGRA16_BE: case TV_PIXFMT_ARGB16_LE: case TV_PIXFMT_ARGB16_BE: case TV_PIXFMT_ABGR16_LE: case TV_PIXFMT_ABGR16_BE: case TV_PIXFMT_RGBA12_LE: case TV_PIXFMT_RGBA12_BE: case TV_PIXFMT_BGRA12_LE: case TV_PIXFMT_BGRA12_BE: case TV_PIXFMT_ARGB12_LE: case TV_PIXFMT_ARGB12_BE: case TV_PIXFMT_ABGR12_LE: case TV_PIXFMT_ABGR12_BE: case TV_PIXFMT_RGB8: case TV_PIXFMT_BGR8: case TV_PIXFMT_RGBA8: case TV_PIXFMT_BGRA8: case TV_PIXFMT_ARGB8: case TV_PIXFMT_ABGR8: register_port (xvport, pixfmt, pImageFormats[j].id, FALSE, index); break; default: break; } } if (nImageFormats > 0) XFree (pImageFormats); } } /** * Check whether XV is present and could work. */ void add_backend_xv (void); void add_backend_xv (void) { Display *display; unsigned int version; unsigned int revision; unsigned int major_opcode; unsigned int event_base; unsigned int error_base; Window root; XvAdaptorInfo *pAdaptors; unsigned int nAdaptors; unsigned int i; if (disable_xv || disable_xv_image) return; printv ("xv_image_port 0x%x\n", xv_image_port); display = GDK_DISPLAY (); if (Success != XvQueryExtension (display, &version, &revision, &major_opcode, &event_base, &error_base)) { printv ("XVideo extension not available\n"); return; } printv ("XVideo opcode %d, base %d, %d, version %d.%d\n", major_opcode, event_base, error_base, version, revision); if (version < 2 || (version == 2 && revision < 2)) { printv ("XVideo extension not usable\n"); return; } root = GDK_ROOT_WINDOW(); if (Success != XvQueryAdaptors (display, root, &nAdaptors, &pAdaptors)) { printv ("XvQueryAdaptors failed\n"); return; } if (nAdaptors <= 0) { printv ("No XVideo adaptors\n"); return; } for (i = 0; i < nAdaptors; ++i) { XvAdaptorInfo *pAdaptor; unsigned int type; pAdaptor = pAdaptors + i; type = pAdaptor->type; if (0 == strcmp (pAdaptor->name, "NVIDIA Video Interface Port") && type == (XvInputMask | XvVideoMask)) type = XvOutputMask | XvVideoMask; /* Bug. This is TV out. */ /* FIXME */ if (0 == strcmp (pAdaptor->name, "NV Video Overlay") || 0 == strcmp (pAdaptor->name, "NV10 Video Overlay")) continue; if ((XvInputMask | XvImageMask) == (type & (XvInputMask | XvImageMask))) traverse_ports (display, pAdaptor, (unsigned) i); } XvFreeAdaptorInfo (pAdaptors); #ifdef USE_XV_SHM have_mitshm = !!XShmQueryExtension (display); #endif } #else /* !USE_XV, do not add the backend */ void add_backend_xv (void); void add_backend_xv (void) { } #endif ������������������������������������������������������������������������������������������������������������������������������������������zapping-0.10cvs6/src/globals.c���������������������������������������������������������������������� 644 � 764 � 144 � 3511 10441746276 11376� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#include "globals.h" display_mode last_dmode; capture_mode last_cmode; GtkWidget *ChannelWindow; volatile gboolean flag_exit_program = FALSE; GList *plugin_list = NULL; /* Whether the device can be attached as XV */ gboolean xv_present = FALSE; GConfClient * gconf_client; /* Disable XVideo support */ gint disable_xv = FALSE; gint disable_xv_video = FALSE; gint disable_xv_image = FALSE; /* XXX actually XvPortID xv_port = None; */ gint xv_video_port = -1; gint xv_image_port = -1; /* Disable Xv and V4L overlay */ gint disable_overlay = FALSE; /* Disable VBI (current session) */ gint disable_vbi = FALSE; /* Will be TRUE if when quitting we were fullscreen */ gboolean was_fullscreen = FALSE; tveng_tuned_channel * global_channel_list = NULL; tv_screen * screens; x11_vidmode_info * vidmodes; /* TRUE if we can tell the WM to keep the video window on top */ gboolean have_wm_hints = FALSE; int debug_msg = 0; int io_debug_msg = 0; gint cur_tuned_channel = -1; /* XXX Move this into virtual device context when ready. */ tv_mixer * mixer = NULL; tv_audio_line * mixer_line = NULL; /* XXX move this into device preferences */ gint esd_output = FALSE; gint ivtv_audio = FALSE; #ifdef HAVE_LIBZVBI /* Preliminary Teletext plugin interface. */ GtkWidget * (*_teletext_view_new) (void); TeletextView * (*_teletext_view_from_widget) (GtkWidget * widget); GtkWidget * (*_teletext_toolbar_new) (GtkActionGroup * action_group); GtkWidget* (*_ttxview_popup_menu_new)(GtkWidget *widget, GdkEventButton *event); GtkWidget * (*_ttxview_bookmarks_menu_new)(GtkWidget * widget); guint (*_ttxview_hotlist_menu_insert)(GtkMenuShell * menu, gboolean separator, gint position); /* Preliminary subtitle plugin interface. */ GtkWidget * (*_subtitle_view_new) (void); #endif /* HAVE_LIBZVBI */ ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������zapping-0.10cvs6/src/globals.h���������������������������������������������������������������������� 644 � 764 � 144 � 4026 10441746276 11405� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#ifndef __GLOBALS_H__ #define __GLOBALS_H__ #ifdef HAVE_CONFIG_H # include "config.h" #endif #include <gconf/gconf-client.h> #include "tveng.h" #include "frequencies.h" #include "x11stuff.h" #include "mixer.h" #include "zapping.h" #ifdef HAVE_LIBZVBI #include "plugins/teletext/view.h" #endif extern Zapping * zapping; display_mode last_dmode; capture_mode last_cmode; extern GtkWidget *ChannelWindow; extern volatile gboolean flag_exit_program; extern GList *plugin_list; /* Whether the device can be attached as XV */ extern gboolean xv_present; extern GConfClient * gconf_client; /* XVideo should be disabled */ extern gint disable_xv; extern gint disable_xv_video; extern gint disable_xv_image; extern gint xv_video_port; extern gint xv_image_port; extern gint disable_overlay; extern gint disable_vbi; /* Will be TRUE if when quitting we were fullscreen */ extern gboolean was_fullscreen; extern tveng_tuned_channel * global_channel_list; extern tv_screen * screens; extern x11_vidmode_info * vidmodes; extern gboolean have_wm_hints; extern int debug_msg; extern int io_debug_msg; extern gint cur_tuned_channel; /* XXX Move this into virtual device context when ready. */ extern tv_mixer * mixer; extern tv_audio_line * mixer_line; #endif /* XXX move this into device preferences */ extern gint esd_output; extern gint ivtv_audio; #ifdef HAVE_LIBZVBI /* Preliminary Teletext plugin interface. */ extern GtkWidget * (*_teletext_view_new) (void); extern TeletextView * (*_teletext_view_from_widget) (GtkWidget * widget); extern GtkWidget * (*_teletext_toolbar_new) (GtkActionGroup * action_group); extern GtkWidget* (*_ttxview_popup_menu_new)(GtkWidget *widget, GdkEventButton *event); extern GtkWidget * (*_ttxview_bookmarks_menu_new)(GtkWidget *widget); extern guint (*_ttxview_hotlist_menu_insert)(GtkMenuShell *menu, gboolean separator, gint position); /* Preliminary subtitle plugin interface. */ extern GtkWidget * (*_subtitle_view_new) (void); #endif /* HAVE_LIBZVBI */ ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������zapping-0.10cvs6/src/audio.c������������������������������������������������������������������������ 644 � 764 � 144 � 62366 10442152027 11073� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Zapping (TV viewer for the Gnome Desktop) * Copyright (C) 2000-2001 Iaki Garca Etxebarria * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* $Id: audio.c,v 1.35 2006/06/09 01:51:19 mschimek Exp $ */ /* XXX gtk+ 2.3 GtkOptionMenu */ #undef GTK_DISABLE_DEPRECATED #include "site_def.h" #ifdef HAVE_CONFIG_H # include "config.h" #endif #include <gnome.h> #include "audio.h" #define ZCONF_DOMAIN "/zapping/options/audio/" #include "zconf.h" #include "properties.h" #include "interface.h" #include "zmisc.h" #include "mixer.h" #include "osd.h" #include "remote.h" #include "globals.h" #include "v4linterface.h" #include "tveng_private.h" #include "common/device.h" #ifdef HAVE_ESD extern audio_backend_info esd_backend; #endif #ifdef HAVE_ARTS extern audio_backend_info arts_backend; #endif #ifdef HAVE_OSS extern audio_backend_info oss_backend; #endif struct _mhandle { gpointer handle; /* for the backend */ audio_backend_info * backend; }; void mixer_setup ( void ) { /* FIXME */ if (mixer && mixer_line) { if (mixer->rec_gain) tv_mixer_line_set_volume (mixer->rec_gain, mixer->rec_gain->reset, mixer->rec_gain->reset); if (mixer_line->recordable) { tv_mixer_line_record (mixer_line, /* exclusive */ TRUE); if (esd_output || ivtv_audio) tv_mixer_line_set_mute (mixer_line, TRUE); } } } mhandle * open_audio_device (gboolean stereo, guint rate, enum audio_format format) { const gchar *audio_source; audio_backend_info *backend; gpointer handle; mhandle *mh; audio_source = zcg_char (NULL, "audio_source"); if (!audio_source) audio_source = ""; backend = NULL; if (0) backend = NULL; #ifdef HAVE_ESD else if (0 == strcmp (audio_source, "esd")) backend = &esd_backend; #endif #ifdef HAVE_ARTS else if (0 == strcmp (audio_source, "arts")) backend = &arts_backend; #endif #ifdef HAVE_OSS else if (0 == strcmp (audio_source, "kernel")) backend = &oss_backend; #endif handle = NULL; if (backend) handle = backend->open (stereo, rate, format, /* write */ FALSE); if (!handle) { ShowBox(("Cannot open the configured audio device.\n" "You might want to setup another kind of audio\n" "device in the Properties dialog."), GTK_MESSAGE_WARNING); return NULL; } mh = g_malloc0 (sizeof (*mh)); mh->handle = handle; mh->backend = backend; /* Make sure we record from the appropiate source. */ mixer_setup(); return mh; } typedef struct { int fd; } ivtv_handle; static gpointer ivtv_open (gboolean stereo, guint sampling_rate, enum audio_format format, gboolean write) { int fd; ivtv_handle *h; if (!stereo || 48000 != sampling_rate || format != AUDIO_FORMAT_S16_LE || write) { g_warning ("Requested audio format won't work with ivtv driver\n"); return NULL; } fd = device_open ((io_debug_msg > 0) ? stderr : NULL, "/dev/video24", O_RDONLY, /* mode */ 0); if (-1 == fd) return NULL; h = (ivtv_handle *) g_malloc0 (sizeof(*h)); h->fd = fd; return h; } static void ivtv_close (gpointer handle) { ivtv_handle *h = (ivtv_handle*)handle; device_close ((io_debug_msg > 0) ? stderr : NULL, h->fd); g_free(h); } static gboolean ivtv_read (gpointer handle, gpointer dest, guint num_bytes, double *timestamp) { ivtv_handle *h = (ivtv_handle *) handle; ssize_t r, n = num_bytes; char *data = (char *) dest; struct timeval tv1; while (n > 0) { r = read(h->fd, data, (size_t) n); if (r == 0 || (r < 0 && errno == EINTR)) continue; /* FIXME handle this properly. */ if (r <= 0) { fprintf (stderr, "IVTV read failed, r=%d errno=%d\n", r, errno); exit (EXIT_FAILURE); } data = (char *) data + r; n -= r; } if (timestamp) { gettimeofday(&tv1, NULL); *timestamp = tv1.tv_sec + tv1.tv_usec * (1 / 1e6); } return TRUE; } /* One awful hack to test if it works. */ static audio_backend_info ivtv_backend = { name: "IVTV Driver", open: ivtv_open, close: ivtv_close, read: ivtv_read, }; static mhandle * open_ivtv_input (void) { audio_backend_info *backend; gpointer handle; mhandle *mh; backend = &ivtv_backend; handle = backend->open (/* stereo */ TRUE, /* rate */ 48000, AUDIO_FORMAT_S16_LE, /* write */ FALSE); if (!handle) { ShowBox(("Cannot open ivtv audio device: %s.\n"), GTK_MESSAGE_WARNING, strerror (errno)); return NULL; } mh = g_malloc0 (sizeof (*mh)); mh->handle = handle; mh->backend = backend; return mh; } static mhandle * open_esd_output (gboolean stereo, guint rate, enum audio_format format) { audio_backend_info *backend; gpointer handle; mhandle *mh; backend = NULL; #ifdef HAVE_ESD backend = &esd_backend; #endif handle = NULL; if (backend) handle = backend->open (stereo, rate, format, /* write */ TRUE); if (!handle) { ShowBox(("Cannot open the Gnome sound daemon (ESD) for output.\n"), GTK_MESSAGE_WARNING); return NULL; } mh = g_malloc0 (sizeof (*mh)); mh->handle = handle; mh->backend = backend; return mh; } void close_audio_device (mhandle *mh) { g_assert (NULL != mh); mh->backend->close (mh->handle); g_free (mh); } gboolean read_audio_data (mhandle *mh, gpointer dest, guint num_bytes, double *timestamp) { g_assert (NULL != mh); return mh->backend->read (mh->handle, dest, num_bytes, timestamp); } gboolean write_audio_data (mhandle *mh, gpointer src, guint num_bytes, double timestamp) { g_assert (NULL != mh); return mh->backend->write (mh->handle, src, num_bytes, timestamp); } /* * Audio loop-back thread */ static pthread_t loopback_id; static gboolean have_loopback_thread; static volatile gboolean loopback_quit; static volatile gboolean loopback_quit_ack; static mhandle * loopback_src; static mhandle * loopback_dst; tv_audio_line audio_loopback_mixer_line = { ._parent = (void *) &audio_loopback_mixer, .label = "Audio Loopback", .hash = 38558, .minimum = 0, .maximum = 256, .step = 1, .reset = 204, .stereo = TRUE, .muted = TRUE, .volume = { 204, 204 } }; static tv_bool loopback_mixer_set_mute (tv_audio_line * l, tv_bool mute) { assert (l == &audio_loopback_mixer_line); if (l->muted != mute) { l->muted = mute; tv_callback_notify (NULL, l, l->_callback); } return TRUE; } static tv_bool loopback_mixer_set_volume (tv_audio_line * l, int left, int right) { assert (l == &audio_loopback_mixer_line); left = SATURATE (left, 0, 256); right = SATURATE (right, 0, 256); if (l->volume[0] != left || l->volume[1] != right) { l->volume[0] = left; l->volume[1] = right; tv_callback_notify (NULL, l, l->_callback); } return TRUE; } static tv_bool loopback_mixer_update_line (tv_audio_line * l) { assert (l == &audio_loopback_mixer_line); l = l; return TRUE; } static const tv_mixer_interface audio_loopback_mixer_interface = { .name = "Audio Loopback", .update_line = loopback_mixer_update_line, .set_volume = loopback_mixer_set_volume, .set_mute = loopback_mixer_set_mute, }; tv_mixer audio_loopback_mixer = { .inputs = &audio_loopback_mixer_line, ._interface = &audio_loopback_mixer_interface, }; static void * loopback_thread (void * x) { uint8_t *buffer; uint8_t *buffer_end; guint buffer_size; x = x; printv ("audio loopback thread\n"); buffer_size = 4096; buffer = malloc (buffer_size); g_assert (NULL != buffer); buffer_end = buffer + buffer_size; while (!loopback_quit) { double timestamp; if (!read_audio_data (loopback_src, buffer, buffer_size, ×tamp)) break; if (io_debug_msg) { fprintf (stderr, "audio loopback: %02x%02x%02x%02x\n", buffer[0], buffer[1], buffer[2], buffer[3]); } if (audio_loopback_mixer_line.muted) { /* XXX inefficient */ memset (buffer, 0, buffer_size); } else { /* Can't just change rec_gain because that may not exist and we don't want to affect recording (in the future). XXX SIMD me. */ #if Z_BYTE_ORDER == Z_LITTLE_ENDIAN { int16_t *p; for (p = (int16_t *) buffer; p < (int16_t *) buffer_end; p += 2) { p[0] = (p[0] * audio_loopback_mixer_line.volume[0]) >> 8; p[1] = (p[1] * audio_loopback_mixer_line.volume[1]) >> 8; } } #elif Z_BYTE_ORDER == Z_BIG_ENDIAN { uint8_t *p; for (p = buffer; p < buffer_end; p += 4) { gint n; n = ((p[0] + p[1] * 256) * audio_loopback_mixer_line.volume[0]) >> 8; p[0] = n; p[1] = n >> 8; n = ((p[2] + p[3] * 256) * audio_loopback_mixer_line.volume[1]) >> 8; p[2] = n; p[3] = n >> 8; } } #else # error unknown endianess #endif } if (!write_audio_data (loopback_dst, buffer, buffer_size, timestamp)) break; } free (buffer); buffer = NULL; printv ("audio loopback thread quits\n"); loopback_quit_ack = TRUE; return NULL; } static void loopback_stop (void) { printv ("stopping audio loopback\n"); if (have_loopback_thread) { z_join_thread_with_timeout ("audio loopback", loopback_id, &loopback_quit, &loopback_quit_ack, /* timeout */ 15); have_loopback_thread = FALSE; } if (loopback_dst) { close_audio_device (loopback_dst); loopback_dst = NULL; } if (loopback_src) { close_audio_device (loopback_src); loopback_src = NULL; } } static gboolean loopback_start (void) { gboolean stereo = TRUE; gboolean rate = 44100; gboolean format = AUDIO_FORMAT_S16_LE; if (have_loopback_thread) loopback_stop (); printv ("starting %saudio loopback\n", ivtv_audio ? "ivtv " : ""); if (ivtv_audio) { rate = 48000; loopback_src = open_ivtv_input (); } else { loopback_src = open_audio_device (stereo, rate, format); } if (NULL == loopback_src) return FALSE; loopback_dst = open_esd_output (stereo, rate, format); if (NULL == loopback_dst) { close_audio_device (loopback_src); loopback_src = NULL; return FALSE; } loopback_quit = FALSE; loopback_quit_ack = FALSE; if (pthread_create (&loopback_id, /* attr */ NULL, loopback_thread, /* arg */ NULL)) { close_audio_device (loopback_dst); loopback_dst = NULL; close_audio_device (loopback_src); loopback_src = NULL; return FALSE; } have_loopback_thread = TRUE; printv ("audio loopback started\n"); return TRUE; } /* * Audio preferences */ #ifndef AUDIO_MIXER_LOG_FP #define AUDIO_MIXER_LOG_FP 0 /* stderr */ #endif static void general_audio_apply (GtkWidget * page) { GtkWidget *widget; gboolean active; widget = lookup_widget (page, "general-audio-start-muted"); active = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget)); zconf_set_boolean (active, "/zapping/options/main/start_muted"); widget = lookup_widget (page, "general-audio-quit-muted"); active = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget)); zconf_set_boolean (active, "/zapping/options/main/quit_muted"); widget = lookup_widget (page, "general-audio-mute-chsw"); active = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget)); zconf_set_boolean (active, "/zapping/options/main/avoid_noise"); } static void general_audio_setup (GtkWidget * page) { GtkWidget *widget; gboolean active; zconf_get_boolean (&active, "/zapping/options/main/start_muted"); widget = lookup_widget (page, "general-audio-start-muted"); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (widget), active); zconf_get_boolean (&active, "/zapping/options/main/quit_muted"); widget = lookup_widget (page, "general-audio-quit-muted"); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (widget), active); zconf_get_boolean (&active, "/zapping/options/main/avoid_noise"); widget = lookup_widget (page, "general-audio-mute-chsw"); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (widget), active); } static void devices_audio_source_apply (GtkWidget * page) { GtkWidget *widget; const gchar *audio_source; tv_device_node *n; audio_source = "none"; widget = lookup_widget (page, "devices-audio-gnome"); if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget))) { audio_source = "esd"; } else { #ifdef HAVE_ARTS widget = lookup_widget (page, "devices-audio-kde"); if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget))) { audio_source = "arts"; } else #endif { #ifdef HAVE_OSS widget = lookup_widget (page, "devices-audio-kernel"); if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget))) audio_source = "kernel"; #endif } } zcs_char (audio_source, "audio_source"); widget = lookup_widget (page, "devices-audio-kernel-table"); if ((n = z_device_entry_selected (widget))) zcs_char (n->device, "pcm_device"); } static void devices_audio_mixer_apply (GtkWidget * page) { GtkWidget *widget; gboolean active; tv_device_node *n; widget = lookup_widget (page, "devices-audio-mixer"); active = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget)); zconf_set_boolean (active, "/zapping/options/audio/force_mixer"); widget = lookup_widget (page, "devices-audio-mixer-table"); if ((n = z_device_entry_selected (widget))) { tv_audio_line *l; gint index; zcs_char (n->device, "mixer_device"); widget = g_object_get_data (G_OBJECT (widget), "mixer_lines"); if (widget) { index = z_option_menu_get_active (widget); for (l = PARENT (n, tv_mixer, node)->inputs; l; l = l->_next) if (0 == index--) { zcs_int ((int) l->hash, "mixer_input"); break; } } } } static void devices_audio_apply (GtkWidget * page) { tveng_tc_control *tcc; guint num_controls; loopback_stop (); devices_audio_source_apply (page); devices_audio_mixer_apply (page); store_control_values (zapping->info, &tcc, &num_controls); startup_mixer (zapping->info); update_control_box (zapping->info); load_control_values (zapping->info, tcc, num_controls); if (esd_output || ivtv_audio) loopback_start (); } static void on_enable_device_entry_toggled (GtkToggleButton * toggle_button, GtkWidget * widget) { gboolean active; active = gtk_toggle_button_get_active (toggle_button); gtk_widget_set_sensitive (widget, active); if (active) z_device_entry_grab_focus (widget); } static tv_device_node * devices_audio_kernel_open (GtkWidget * table _unused_, tv_device_node * list, const char * name, gpointer user_data _unused_) { tv_device_node *n; if ((n = tv_device_node_find (list, name))) return n; /* FIXME report errors */ if ((n = oss_pcm_open (NULL, /* log_fp */ (io_debug_msg > 0) ? stderr : NULL, name))) return n; return NULL; } static void devices_audio_source_setup (GtkWidget * page) { GtkWidget *alignment; GtkWidget *table; GtkWidget *widget; tv_device_node *list; const gchar *audio_source; audio_source = zcg_char (NULL, "audio_source"); if (!audio_source) audio_source = ""; widget = lookup_widget (page, "devices-audio-none"); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (widget), TRUE); widget = lookup_widget (page, "devices-audio-gnome"); if (0 == strcmp (audio_source, "esd")) gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (widget), TRUE); widget = lookup_widget (page, "devices-audio-kde"); #ifdef HAVE_ARTS if (0 == strcmp (audio_source, "arts")) gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (widget), TRUE); #else gtk_widget_set_sensitive (widget, FALSE); #endif widget = lookup_widget (page, "devices-audio-kernel"); #ifdef HAVE_OSS if (0 == strcmp (audio_source, "kernel")) gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (widget), TRUE); /* XXX "oss_"? */ list = oss_pcm_scan (NULL, NULL); alignment = lookup_widget (page, "devices-audio-kernel-alignment"); table = z_device_entry_new (/* prompt */ NULL, list, zcg_char (NULL, "pcm_device"), devices_audio_kernel_open, NULL, /* user_data */ NULL); gtk_widget_show (table); gtk_container_add (GTK_CONTAINER (alignment), table); register_widget (NULL, table, "devices-audio-kernel-table"); g_signal_connect (G_OBJECT (widget), "toggled", G_CALLBACK (on_enable_device_entry_toggled), table); on_enable_device_entry_toggled (GTK_TOGGLE_BUTTON (widget), table); #else /* !HAVE_OSS */ gtk_widget_set_sensitive (widget, FALSE); #endif } static void devices_audio_mixer_select (GtkWidget * table, tv_device_node * n, gpointer user_data _unused_) { GtkWidget *menu; GtkWidget *optionmenu; if ((optionmenu = g_object_get_data (G_OBJECT (table), "mixer_lines"))) { gtk_widget_destroy (optionmenu); optionmenu = NULL; } if (n) { tv_mixer *mixer; tv_audio_line *line; guint hash = (guint) -1; guint index; mixer = PARENT (n, tv_mixer, node); g_assert (mixer->inputs != NULL); if (0 == strcmp (zcg_char (NULL, "mixer_device"), n->device)) hash = zcg_int (NULL, "mixer_input"); optionmenu = gtk_option_menu_new (); gtk_widget_show (optionmenu); menu = gtk_menu_new (); gtk_widget_show (menu); gtk_option_menu_set_menu (GTK_OPTION_MENU (optionmenu), menu); index = 0; for (line = mixer->inputs; line; line = line->_next) { GtkWidget *menu_item; menu_item = gtk_menu_item_new_with_label (line->label); gtk_widget_show (menu_item); gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_item); if (index == 0 || line->hash == hash) gtk_option_menu_set_history (GTK_OPTION_MENU (optionmenu), index); index++; } if (mixer->inputs->_next == NULL) gtk_widget_set_sensitive (GTK_WIDGET (optionmenu), FALSE); gtk_table_attach (GTK_TABLE (table), optionmenu, 1, 1 + 1, 3, 3 + 1, GTK_FILL | GTK_EXPAND, 0, 0, 0); } g_object_set_data (G_OBJECT (table), "mixer_lines", optionmenu); } static tv_device_node * devices_audio_mixer_open (GtkWidget * table _unused_, tv_device_node * list, const char * name, gpointer user_data _unused_) { tv_mixer *m; tv_device_node *n; if ((n = tv_device_node_find (list, name))) return n; /* FIXME report errors */ if ((m = tv_mixer_open ((io_debug_msg > 0) ? stderr : AUDIO_MIXER_LOG_FP, name))) { if (m->inputs != NULL) return &m->node; tv_mixer_close (m); } return NULL; } static void devices_audio_mixer_setup (GtkWidget * page) { tv_mixer *m; tv_device_node *list, *n; GtkWidget *checkbutton; GtkWidget *alignment; GtkWidget *table; GtkWidget *label; m = tv_mixer_scan (AUDIO_MIXER_LOG_FP); list = m ? &m->node : NULL; /* Remove tv card mixer interfaces, these are special and we fall back to them automatically. */ for (n = list; n;) { if (PARENT (n, tv_mixer, node)->inputs == NULL) { tv_device_node *next; next = n->next; tv_device_node_delete (&list, n, FALSE); n = next; } else { n = n->next; } } checkbutton = lookup_widget (page, "devices-audio-mixer"); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (checkbutton), zcg_bool (NULL, "force_mixer")); alignment = lookup_widget (page, "devices-audio-mixer-alignment"); table = z_device_entry_new (/* prompt */ NULL, list, zcg_char (NULL, "mixer_device"), devices_audio_mixer_open, devices_audio_mixer_select, /* user_data */ NULL); gtk_widget_show (table); gtk_container_add (GTK_CONTAINER (alignment), table); register_widget (NULL, table, "devices-audio-mixer-table"); g_signal_connect (G_OBJECT (checkbutton), "toggled", G_CALLBACK (on_enable_device_entry_toggled), table); on_enable_device_entry_toggled (GTK_TOGGLE_BUTTON (checkbutton), table); /* TRANSLATORS: Soundcard mixer line. */ label = gtk_label_new (_("Input:")); gtk_widget_show (label); gtk_label_set_justify (GTK_LABEL (label), GTK_JUSTIFY_LEFT); gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); gtk_misc_set_padding (GTK_MISC (label), 3, 3); gtk_table_attach (GTK_TABLE (table), label, 0, 0 + 1, 3, 3 + 1, GTK_FILL, 0, 0, 0); } static void devices_audio_setup (GtkWidget * page) { devices_audio_source_setup (page); devices_audio_mixer_setup (page); } static void properties_add (GtkDialog * dialog) { SidebarEntry devices [] = { { N_("Audio"), "gnome-grecord.png", "vbox53", devices_audio_setup, devices_audio_apply, .help_link_id = "zapping-settings-audio-device" } }; SidebarEntry general [] = { { N_("Audio"), "gnome-grecord.png", "vbox39", general_audio_setup, general_audio_apply, .help_link_id = "zapping-settings-audio-options" } }; SidebarGroup groups [] = { { N_("Devices"), devices, G_N_ELEMENTS (devices) }, { N_("General Options"), general, G_N_ELEMENTS (general) } }; standard_properties_add (dialog, groups, G_N_ELEMENTS (groups), "zapping.glade2"); } /* * Mute stuff */ static guint quiet_timeout_id = NO_SOURCE_ID; static gboolean quiet_timeout (gpointer user_data _unused_) { tv_quiet_set (zapping->info, FALSE); return FALSE; /* don't call again */ } void reset_quiet (tveng_device_info * info _unused_, guint delay) { if (quiet_timeout_id > 0) g_source_remove (quiet_timeout_id); if (delay > 0) { quiet_timeout_id = g_timeout_add (delay /* ms */, (GSourceFunc) quiet_timeout, NULL); } else { tv_quiet_set (zapping->info, FALSE); } } /* * Global mute function. XXX switch to callbacks. * mode: 0=sound, 1=mute, 2=toggle, 3=just update GUI * controls: update controls box * osd: show state on screen */ gboolean set_mute (gint mode, gboolean controls _unused_, gboolean osd) { static gboolean recursion = FALSE; gint mute; if (recursion) return TRUE; recursion = TRUE; /* Get current state */ if (mode >= 2) { mute = tv_mute_get (zapping->info, TRUE); if (mute == -1) goto failure; if (mode == 2) mute = !mute; } else mute = !!mode; /* Set new state */ if (mode <= 2) if (-1 == tv_mute_set (zapping->info, mute)) goto failure; /* Update GUI */ { GtkAction *action; action = gtk_action_group_get_action (zapping->generic_action_group, "Mute"); if (mute != gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action))) gtk_toggle_action_set_active (GTK_TOGGLE_ACTION (action), mute); if (osd) { BonoboDockItem *dock_item; dock_item = gnome_app_get_dock_item_by_name (&zapping->app, GNOME_APP_TOOLBAR_NAME); if (DISPLAY_MODE_BACKGROUND == zapping->display_mode || DISPLAY_MODE_FULLSCREEN == zapping->display_mode || dock_item == NULL || !GTK_WIDGET_VISIBLE (GTK_WIDGET (dock_item))) osd_render_markup_printf (NULL, mute ? _("<span foreground=\"blue\">Audio off</span>") : _("<span foreground=\"yellow\">Audio on</span>")); } } recursion = FALSE; return TRUE; failure: recursion = FALSE; return FALSE; } static PyObject * py_mute (PyObject * self _unused_, PyObject * args) { int value = 2; /* toggle by default */ if (!ParseTuple (args, "|i", &value)) { g_warning ("zapping.mute(|i)"); py_return_false; } set_mute (value, TRUE, TRUE); py_return_true; } void startup_audio ( void ) { static const property_handler audio_handler = { .add = properties_add, }; prepend_property_handler (&audio_handler); zcc_char ("kernel", "PCM recording source", "audio_source"); zcc_char ("/dev/dsp", "PCM recording kernel device", "pcm_device"); zcc_char ("", "Mixer device", "mixer_device"); zcc_int (-1, "Mixer input line (hash)", "mixer_input"); zconf_create_boolean (FALSE, "Mute when Zapping is started", "/zapping/options/main/start_muted"); zconf_create_boolean (TRUE, "Mute on exit", "/zapping/options/main/quit_muted"); zconf_create_boolean (TRUE, "Mute when changing channels", "/zapping/options/main/avoid_noise"); #ifdef HAVE_ESD if (esd_backend.init) esd_backend.init (); #endif #ifdef HAVE_ARTS if (arts_backend.init) arts_backend.init (); #endif #ifdef HAVE_OSS if (oss_backend.init) oss_backend.init (); #endif cmd_register ("mute", py_mute, METH_VARARGS, ("Mute/unmute"), "zapping.mute()", ("Mute"), "zapping.mute(1)", ("Unmute"), "zapping.mute(0)"); if (esd_output || ivtv_audio) loopback_start (); } void shutdown_audio ( void ) { loopback_stop (); #ifdef HAVE_ESD if (esd_backend.shutdown) esd_backend.shutdown (); #endif #ifdef HAVE_ARTS if (arts_backend.shutdown) arts_backend.shutdown (); #endif #ifdef HAVE_OSS if (oss_backend.shutdown) oss_backend.shutdown (); #endif } ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������zapping-0.10cvs6/src/audio.h������������������������������������������������������������������������ 644 � 764 � 144 � 4422 10402712063 11043� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#ifndef __AUDIO_H__ #define __AUDIO_H__ #include <gtk/gtk.h> #include "tveng.h" enum audio_format { /* More to come when we need more */ AUDIO_FORMAT_S16_LE }; typedef struct _mhandle mhandle; /** * Opens the configured audio device and returns an opaque handler to * it, or %NULL on error. * @stereo: %TRUE if the device should be opened in stereo mode. * @rate: Samples per second (typically 44100) * @format: Audio format to use. */ mhandle * open_audio_device (gboolean stereo, guint rate, enum audio_format format); /** * Closes @handle. */ void close_audio_device (mhandle *handle); /** * Reads @num_bytes bytes from the audio device. * @handle: The audio device. * @dest: Where to store the read data, should have enough room. * @num_bytes: Number of bytes to read. * @timestamp: A place to store the sample timestamp, or NULL. */ gboolean read_audio_data (mhandle *handle, gpointer dest, guint num_bytes, double *timestamp); gboolean write_audio_data (mhandle *handle, gpointer src, guint num_bytes, double timestamp); /* XXX eeew hack */ extern tv_audio_line audio_loopback_mixer_line; extern tv_mixer audio_loopback_mixer; void reset_quiet (tveng_device_info * info, guint delay); gboolean set_mute (gint mode, gboolean controls, gboolean osd); extern void mixer_setup ( void ); /** * Initialization/shutdown */ void startup_audio (void); void shutdown_audio (void); typedef struct { const char * name; /* Implementations */ gpointer (* open) (gboolean stereo, guint sampling_rate, enum audio_format format, gboolean write); void (*close)(gpointer handle); gboolean (*read)(gpointer handle, gpointer dest, guint num_bytes, double *timestamp); gboolean (*write)(gpointer handle, gpointer src, guint num_bytes, double timestamp); /* startup/shutdown, called just once */ void (*init)(void); void (*shutdown)(void); /* Backend properties handling */ /* Connect to "destroy" to free resources */ void (*add_props)(GtkBox *vbox); void (*apply_props)(GtkBox *vbox); } audio_backend_info; tv_device_node * oss_pcm_open (void * unused, FILE * log_fp, const char * dev_name); tv_device_node * oss_pcm_scan (void * unused, FILE * log_fp); #endif /* audio.h */ ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������zapping-0.10cvs6/src/tveng_private.h���������������������������������������������������������������� 644 � 764 � 144 � 36764 10404546026 12663� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Zapping (TV viewer for the Gnome Desktop) * Copyright (C) 2000 Iaki Garca Etxebarria * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* * Private stuff, we can play freely with this without losing binary * or source compatibility. */ #ifndef __TVENG_PRIVATE_H__ #define __TVENG_PRIVATE_H__ #include <tveng.h> #include <pthread.h> #include "common/intl-priv.h" #include "libtv/misc.h" #include "x11stuff.h" #include "zmisc.h" /* preliminary */ /* Function prototypes for modules, NULL means not implemented or not pertinent. For the descriptions, see tveng.h */ struct tveng_module_info { int (*attach_device)(const char* device_file, Window window, enum tveng_attach_mode attach_mode, tveng_device_info * info); void (*close_device)(tveng_device_info *info); int (*change_mode)(tveng_device_info * info, Window window, enum tveng_attach_mode attach_mode); /* */ int (* ioctl) (tveng_device_info *, unsigned int, char *); /* Device specific stuff */ int (*ov511_get_button_state)(tveng_device_info *info); const char * interface_label; /* size of the private data of the module */ int private_size; }; struct panel_device { tv_control * controls; /* Sets the value of a control, with all effects of get_control(). */ tv_bool (* set_control) (tveng_device_info * info, tv_control * control, int value); /* Reads the current control value and stores it in tv_control. If the control is NULL updates all controls. */ tv_bool (* get_control) (tveng_device_info * info, tv_control * control); /* Video inputs of the device, invariable. */ tv_video_line * video_inputs; /* Pointer into video_inputs list, can be NULL when no list exists. */ tv_video_line * cur_video_input; tv_callback * video_input_callback; /* Sets the current video input from one of video_inputs, with all effects of get_video_input(). */ tv_bool (* set_video_input) (tveng_device_info * info, tv_video_line * line); /* Reads the current video input from the device and stores it in cur_video_input. May update video_standards and cur_video_standards. */ tv_bool (* get_video_input) (tveng_device_info * info); tv_video_line * video_outputs; tv_video_line * cur_video_output; tv_callback * video_output_callback; tv_bool (* set_video_output) (tveng_device_info * info, tv_video_line * line); tv_bool (* get_video_output) (tveng_device_info * info); /* Sets the frequency of a video input if a tuner, with all effects of get_tuner_frequency(). */ tv_bool (* set_tuner_frequency) (tveng_device_info * info, tv_video_line * line, unsigned int frequency); /* Reads the current frequency of a video input and stores it in the tv_video_line struct. */ tv_bool (* get_tuner_frequency) (tveng_device_info * info, tv_video_line * line); /** * @param strength If not @c NULL stores the signal strenght here. * Higher values are better. Initially zero, unknown. * @param afc If not @c NULL stores an automatic frequency control * value here. If negative current frequency is too low, if * positive too high. Initially zero, unknown. * * Reads the signal strenght from the cur_video_input, which is * not @c NULL and IS_TUNER_LINE(). @a strenght and @a afc will * not be both @c NULL. * * @returns * @c FALSE on failure. */ tv_bool (* get_signal_strength) (tveng_device_info * info, int * strength, int * afc); /* Video standards supported by the current video input and output. Note videostd_ids are bitwise mutually exclusive, i.e. no two listed standards can have the same videostd_id bit set. */ tv_video_standard * video_standards; /* This can be NULL if we don't know. If it matters, and video_standards is not NULL, clients should ask the user. */ tv_video_standard * cur_video_standard; tv_callback * video_standard_callback; /* Sets the current video standard, with all effects of get_standard(). */ tv_bool (* set_video_standard) (tveng_device_info * info, tv_video_standard * std); /* Reads the current video standard from the device and updates cur_video_standard. To update video_standards call update_video_input. */ tv_bool (* get_video_standard) (tveng_device_info * info); /* Audio inputs of the device, invariable. Not supported yet. Need a function telling which video and audio inputs combine. */ tv_audio_line * audio_inputs; /* Pointer into audio_inputs list, can be NULL when no list exists. */ tv_audio_line * cur_audio_input; tv_callback * audio_input_callback; /* Sets the current audio input from one of audio_inputs, with all effects of get_audio_input(). */ tv_bool (* set_audio_input) (tveng_device_info * info, tv_audio_line * line); /* Reads the current audio input from the device and stores it in info->cur_audio_input. */ tv_bool (* get_audio_input) (tveng_device_info * info); tv_audio_line * audio_outputs; tv_audio_line * cur_audio_output; tv_callback * audio_output_callback; tv_bool (* set_audio_output) (tveng_device_info * info, tv_audio_line * line); tv_bool (* get_audio_output) (tveng_device_info * info); /* Audio mode */ tv_audio_capability audio_capability; /* lang1/2: 0-none/unknown 1-mono 2-stereo */ unsigned int audio_reception[2]; tv_audio_mode audio_mode; /* when audio capability or reception changes */ tv_callback * audio_callback; tv_bool (* set_audio_mode) (tveng_device_info * info, tv_audio_mode mode); }; struct capture_device { tv_image_format format; /* Preliminary. If zero try set_format. */ tv_pixfmt_set supported_pixfmt_set; unsigned int n_buffers; tv_bool (* set_format) (tveng_device_info * info, const tv_image_format *format); tv_bool (* get_format) (tveng_device_info * info); tv_bool (* set_buffers) (tveng_device_info * info, tv_capture_buffer * buffers, unsigned int n_buffers); /** * @param buffer The image will be stored here. Can be @c NULL * to read and discard the image. buffer->format crops the image * according to format->width, height, offset[] and bytes_per_line[]. * No conversion yet. If @c NULL capture_device.format applies. * @param timeout Time to wait for a new frame. If zero return * immediately when no frame is available. If @c NULL block * indefinitely. (as select(2)) * * Reads the next frame from the device. * * @returns * -1 on error, 0 on timeout, 1 on success (as select(2)). */ int (* read_frame) (tveng_device_info * info, tv_capture_buffer * buffer, const struct timeval * timeout); tv_bool (* queue_buffer) (tveng_device_info * info, tv_capture_buffer * buffer); int (* dequeue_buffer) (tveng_device_info * info, tv_capture_buffer ** buffer, const struct timeval * timeout); tv_bool (* flush_buffers) (tveng_device_info * info); tv_bool (* enable) (tveng_device_info * info, tv_bool enable); }; struct output_device { }; struct overlay_device { tv_overlay_buffer buffer; tv_window window; tv_clip_vector clip_vector; /* 2 b removed */ unsigned int chromakey; /* 0xAARRGGBB */ #ifdef HAVE_XV_EXTENSION # define NO_PORT ((XvPortID) None) XvPortID xv_port_id; #endif tv_bool active; /* XXX internal */ tv_bool (* set_buffer) (tveng_device_info * info, const tv_overlay_buffer *buffer); tv_bool (* get_buffer) (tveng_device_info * info); /* chromakey: 0xAARRGGBB. */ tv_bool (* set_window) (tveng_device_info * info, const tv_window * window, const tv_clip_vector * vector, unsigned int chromakey); /* Reads window and chromakey from the driver. */ tv_bool (* get_window) (tveng_device_info * info); /* XVideo drivers. */ tv_bool (* set_xwindow) (tveng_device_info * info, Window window, GC gc, unsigned int chromakey); /* Drivers may not stop immediately, you may want to usleep() for 1-2 frame periods after disabling the overlay. This function doesn't sleep so the caller can do useful work in the meantime. */ tv_bool (* enable) (tveng_device_info * info, tv_bool enable); }; /* The structure used to hold info about a video_device */ struct _tveng_device_info { /* XXX incomplete */ tv_device_node node; char * file_name; /* The name used to open() this fd */ int fd; /* Video device file descriptor */ capture_mode capture_mode; /* Current capture mode */ enum tveng_attach_mode attach_mode; /* Mode this was attached with */ enum tveng_controller current_controller; /* Controller used */ struct tveng_caps caps; /* Video system capabilities */ struct panel_device panel; struct capture_device capture; struct overlay_device overlay; /* All internal communication with the device is logged through this fp when non-NULL. */ FILE * log_fp; tv_bool freq_change_restart; unsigned audio_mutable : 1; /* Unique integer that indentifies this device */ int signature; /* Debugging/error reporting stuff */ int tveng_errno; /* Numerical id of the last error, 0 == success */ char * error; /* points to the last error message */ int debug_level; /* 0 for no errors, increase for greater verbosity */ Display *display; int bpp; int current_bpp; struct tveng_module_info module; x11_vidmode_state old_mode; int zapping_setup_fb_verbosity; gchar * mode; /* vidmode */ int disable_xv_video; /* 1 if XVideo should be disabled */ int dword_align; /* 1 if x and w should be dword aligned */ pthread_mutex_t mutex; /* Thread safety */ unsigned int callback_recursion; tv_control * control_mute; tv_bool quiet; tv_control * cloned_controls; tv_bool using_xvideo; }; /* Utility function, stops the capture or the previewing. Returns the mode the device was before stopping. For stopping and restarting the device do: enum tveng_capture_mode cur_mode; cur_mode = tveng_stop_everything(info); ... do some stuff ... if (tveng_restart_everything(cur_mode, info) == -1) ... show error dialog ... */ capture_mode tveng_stop_everything (tveng_device_info *info, gboolean *overlay_was_active); /* Restarts the given capture mode. See the comments on tveng_stop_everything. Returns -1 on error. */ int tveng_restart_everything (capture_mode mode, gboolean overlay_was_active, tveng_device_info * info); int p_tv_set_preview_window(tveng_device_info * info, const tv_window *window); tv_bool p_tv_enable_overlay (tveng_device_info * info, tv_bool enable); capture_mode p_tveng_stop_everything (tveng_device_info * info, gboolean * overlay_was_active); int p_tveng_restart_everything (capture_mode mode, gboolean overlay_was_active, tveng_device_info * info); const tv_image_format * p_tv_set_capture_format(tveng_device_info *info,const tv_image_format *format); extern void tv_callback_notify (tveng_device_info * info, void * object, const tv_callback * list); #define for_all(p, pslist) for (p = pslist; p; p = p->_next) #define IS_TUNER_LINE(l) ((l) && (l)->type == TV_VIDEO_LINE_TYPE_TUNER) #define NODE_HELPER_FUNCTIONS(item, kind) \ extern void \ free_##kind (tv_##kind * p); \ extern void \ free_##kind##_list (tv_##kind ** list); \ extern void \ store_cur_##item (tveng_device_info * info, \ tv_##kind * p); NODE_HELPER_FUNCTIONS (control, control); extern void free_panel_controls (tveng_device_info * info); extern tv_control * append_panel_control (tveng_device_info * info, tv_control * tc, unsigned int size); extern tv_control * append_audio_mode_control (tveng_device_info * info, tv_audio_capability cap); extern tv_bool set_audio_mode_control (tveng_device_info * info, tv_control * control, int value); extern tv_audio_capability select_audio_capability (tv_audio_capability cap, const tv_video_standard * std); NODE_HELPER_FUNCTIONS (video_standard, video_standard); extern void free_video_standards (tveng_device_info * info); extern tv_video_standard * append_video_standard (tv_video_standard ** list, tv_videostd_set videostd_set, const char * label, const char * hlabel, unsigned int size); NODE_HELPER_FUNCTIONS (audio_input, audio_line); extern void free_audio_inputs (tveng_device_info * info); extern tv_audio_line * append_audio_line (tv_audio_line ** list, tv_audio_line_type type, const char * label, const char * hlabel, int minimum, int maximum, int step, int reset, unsigned int size); NODE_HELPER_FUNCTIONS (video_input, video_line); extern void free_video_inputs (tveng_device_info * info); extern tv_video_line * append_video_line (tv_video_line ** list, tv_video_line_type type, const char * label, const char * hlabel, unsigned int size); extern void ioctl_failure (tveng_device_info * info, const char * source_file_name, const char * function_name, unsigned int source_file_line, const char * ioctl_name); extern tv_pixfmt pig_depth_to_pixfmt (unsigned int depth); struct _tv_mixer_interface { const char * name; /* * Open a soundcard mixer by its device file name. */ tv_mixer * (* open) (const tv_mixer_interface *, FILE *log, const char *device); /* * Scan for mixer devices present on the system. */ tv_mixer * (* scan) (const tv_mixer_interface *, FILE *log); /* * Update tv_audio_line.muted and .volume, e.g. to notice when * other applications change mixer properties asynchronously. * Regular polling recommended, may call tv_dev_audio_line.changed. */ tv_bool (* update_line) (tv_audio_line *); /* * Set mixer volume and update tv_audio_line.volume accordingly. * On mono lines left volume will be set. May call * tv_dev_audio_line.changed. Does not unmute. */ tv_bool (* set_volume) (tv_audio_line *, int left, int right); /* * Mute (TRUE) or unmute (FALSE) mixer line and update * tv_audio_line.muted accordingly. May call * tv_dev_audio_line.changed. */ tv_bool (* set_mute) (tv_audio_line *, tv_bool mute); /* * Select a recording line from tv_mixer.adc_lines. When * exclusive is TRUE disable all other recording sources (should * be the default, but we must not prohibit recording from * multiple sources if the user really insists). Line can be * NULL. May call tv_dev_mixer.changed. */ tv_bool (* set_rec_line) (tv_mixer *, tv_audio_line *, tv_bool exclusive); /* * Update tv_mixer.rec_line, e.g. to notice when other applications * change mixer properties asynchronously. Regular polling recommended, * may call tv_dev_mixer.changed. */ tv_bool (* update_mixer) (tv_mixer *); }; #endif /* tveng_private.h */ ������������zapping-0.10cvs6/src/subtitle.c��������������������������������������������������������������������� 644 � 764 � 144 � 27471 10402712157 11625� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Zapping (TV viewer for the Gnome Desktop) * * Copyright (C) 2001 Iaki Garca Etxebarria * Copyright (C) 2003 Michael H. Schimek * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* $Id: subtitle.c,v 1.5 2006/03/06 01:46:23 mschimek Exp $ */ #include "subtitle.h" #ifdef HAVE_LIBZVBI #include <gnome.h> #include "plugins/subtitle/view.h" #include "common/fifo.h" /* zf_current_time() */ #include "zmisc.h" #include "zconf.h" #include "zgconf.h" #include "zvbi.h" #include "osd.h" #include "i18n.h" #include "fullscreen.h" #include "remote.h" #ifndef ZVBI_CAPTION_DEBUG #define ZVBI_CAPTION_DEBUG 0 #endif static const gchar * caption_key = "/zapping/internal/callbacks/closed_caption"; static const gchar * subwin_key = "/zapping/internal/subtitle/window"; /* used by osd.c; use py_closed_caption to change this var. */ vbi3_pgno zvbi_caption_pgno = 0; #define IS_CAPTION_PGNO(pgno) ((pgno) <= 8) /* ATTN is used as signal callback, don't change definition. */ void subt_store_position_in_config (SubtitleView * view, const gchar * path) { gchar *zcname; zcname = g_strconcat (path, "/rel_x", NULL); zconf_set_float (view->rel_x, zcname); g_free (zcname); zcname = g_strconcat (path, "/rel_y", NULL); zconf_set_float (view->rel_y, zcname); g_free (zcname); zcname = g_strconcat (path, "/rel_size", NULL); zconf_set_float (view->rel_size, zcname); g_free (zcname); } void subt_set_position_from_config (SubtitleView * view, const gchar * path) { gchar *zcname; gfloat x; gfloat y; gfloat size; zcname = g_strconcat (path, "/rel_x", NULL); zconf_create_float (0.5, "Position of subtitles", zcname); zconf_get_float (&x, zcname); g_free (zcname); zcname = g_strconcat (path, "/rel_y", NULL); zconf_create_float (0.5, "Position of subtitles", zcname); zconf_get_float (&y, zcname); g_free (zcname); zcname = g_strconcat (path, "/rel_size", NULL); zconf_create_float (1.0, "Size of subtitles", zcname); zconf_get_float (&size, zcname); g_free (zcname); view->set_position (view, x, y); view->set_size (view, size); } static void on_subtitle_menu_activate (GtkWidget * menu_item, gpointer user_data) { if (GTK_IS_CHECK_MENU_ITEM (menu_item)) if (!GTK_CHECK_MENU_ITEM (menu_item)->active) return; zvbi_caption_pgno = (vbi3_pgno) GPOINTER_TO_INT (user_data); python_command_printf (menu_item, "zapping.closed_caption(1)"); } guint zvbi_menu_shell_insert_active_subtitle_pages (GtkMenuShell * menu, gint position, vbi3_pgno curr_pgno, gboolean separator_above, gboolean separator_below) { vbi3_decoder *vbi; vbi3_caption_decoder *cd; vbi3_teletext_decoder *td; const tv_video_line *vi; tveng_tuned_channel *channel; GSList *group; double now; vbi3_pgno pgno; unsigned int count; if (!(vbi = zvbi_get_object ())) return 0; group = NULL; count = 0; cd = vbi3_decoder_cast_to_caption_decoder (vbi); now = zf_current_time () - 20.0 /* seconds */; for (pgno = VBI3_CAPTION_CC1; pgno <= VBI3_CAPTION_T4; ++pgno) { vbi3_cc_channel_stat cs; const char *lang; gchar *buffer; GtkWidget *menu_item; if (!vbi3_caption_decoder_get_cc_channel_stat (cd, &cs, pgno)) continue; if (cs.last_received < now) continue; lang = NULL; if (NULL != cs.language_code) lang = iso639_to_language_name (cs.language_code); if (lang) { if (VBI3_SUBTITLE_PAGE == cs.page_type) buffer = g_strdup_printf ("Caption %x - %s", pgno, lang); else buffer = g_strdup_printf ("Text %x - %s", pgno - VBI3_CAPTION_T1, lang); } else { if (VBI3_SUBTITLE_PAGE == cs.page_type) buffer = g_strdup_printf ("Caption %x", pgno); else buffer = g_strdup_printf ("Text %x", pgno - VBI3_CAPTION_T1); } if (0 == curr_pgno) { menu_item = gtk_menu_item_new_with_label (buffer); } else { menu_item = gtk_radio_menu_item_new_with_label (group, buffer); group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (menu_item)); if (pgno == curr_pgno) gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (menu_item), TRUE); } g_free (buffer); gtk_widget_show (menu_item); g_signal_connect (G_OBJECT (menu_item), "activate", G_CALLBACK (on_subtitle_menu_activate), GINT_TO_POINTER (pgno)); if (0 == count && separator_above) { GtkWidget *item; item = gtk_separator_menu_item_new (); gtk_widget_show (item); gtk_menu_shell_insert (menu, item, position++); } gtk_menu_shell_insert (menu, menu_item, position++); ++count; } channel = NULL; if ((vi = tv_cur_video_input (zapping->info)) && TV_VIDEO_LINE_TYPE_TUNER == vi->type) { channel = tveng_tuned_channel_nth (global_channel_list, cur_tuned_channel); } td = vbi3_decoder_cast_to_teletext_decoder (vbi); for (pgno = 0x100; pgno <= 0x899; pgno = vbi3_add_bcd (pgno, 0x001)) { vbi3_ttx_page_stat ps; gchar *item_name; gchar *tooltip; GtkWidget *menu_item; if (!vbi3_teletext_decoder_get_ttx_page_stat (td, &ps, /* nk: current */ NULL, pgno)) continue; if (VBI3_SUBTITLE_PAGE != ps.page_type) continue; if (channel) { vbi3_charset_code charset_code; if (tveng_tuned_channel_get_ttx_encoding (channel, &charset_code, pgno)) { const vbi3_character_set *cs; if ((cs = vbi3_character_set_from_code (charset_code))) ps.character_set = cs; } } item_name = zvbi_language_name (ps.character_set); tooltip = NULL; if (NULL == item_name) item_name = g_strdup_printf (_("Page %x"), pgno); else tooltip = g_strdup_printf ("%x", pgno); if (0 == curr_pgno) { menu_item = gtk_menu_item_new_with_label (item_name); } else { menu_item = gtk_radio_menu_item_new_with_label (group, item_name); group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (menu_item)); if (pgno == curr_pgno) gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (menu_item), TRUE); } g_free (item_name); if (tooltip) { z_tooltip_set (menu_item, tooltip); g_free (tooltip); } gtk_widget_show (menu_item); g_signal_connect (G_OBJECT (menu_item), "activate", G_CALLBACK (on_subtitle_menu_activate), GINT_TO_POINTER (pgno)); if (0 == count && separator_above) { GtkWidget *item; item = gtk_separator_menu_item_new (); gtk_widget_show (item); gtk_menu_shell_insert (menu, item, position++); } gtk_menu_shell_insert (menu, menu_item, position++); ++count; } if (count > 0 && separator_below) { GtkWidget *item; item = gtk_separator_menu_item_new (); gtk_widget_show (item); gtk_menu_shell_insert (menu, item, position++); } return count; } static GnomeUIInfo subtitles_uiinfo [] = { { GNOME_APP_UI_ITEM, N_("_Disable"), NULL, G_CALLBACK (on_python_command1), "zapping.closed_caption(0)", NULL, GNOME_APP_PIXMAP_NONE, NULL, 0, (GdkModifierType) 0, NULL }, GNOMEUIINFO_END }; GtkWidget * zvbi_subtitle_menu_new (vbi3_pgno curr_pgno) { vbi3_decoder *vbi; GtkMenuShell *menu; if (!(vbi = zvbi_get_object ())) return NULL; menu = GTK_MENU_SHELL (gtk_menu_new ()); gnome_app_fill_menu (menu, subtitles_uiinfo, /* accel */ NULL, /* mnemo */ TRUE, /* position */ 0); zvbi_menu_shell_insert_active_subtitle_pages (menu, /* position */ 1, curr_pgno, /* separator_above */ TRUE, /* separator_below */ FALSE); return GTK_WIDGET (menu); } static void remember_caption_pgno (vbi3_pgno pgno) { const tv_video_line *vi; if ((vi = tv_cur_video_input (zapping->info)) && TV_VIDEO_LINE_TYPE_TUNER == vi->type) { tveng_tuned_channel *channel; if ((channel = tveng_tuned_channel_nth (global_channel_list, cur_tuned_channel))) { channel->caption_pgno = pgno; } } } static PyObject * py_closed_caption (PyObject * self _unused_, PyObject * args) { static int block = 0; int active; if (block) py_return_true; block = 1; /* XXX should be fixed elsewhere, toolbar button? */ active = -1; /* toggle */ if (!ParseTuple (args, "|i", &active)) g_error ("zapping.closed_caption(|i)"); if (-1 == active) active = !zconf_get_boolean (NULL, caption_key); if (ZVBI_CAPTION_DEBUG) fprintf (stderr, "CC active: %d\n", active); zconf_set_boolean (active, caption_key); if (active) { TeletextView *view; vbi_pgno pgno; /* In Teletext mode, overlay currently displayed page. */ if (/* have */ _teletext_view_from_widget && (view = _teletext_view_from_widget (GTK_WIDGET (zapping))) && 0 != (pgno = view->cur_pgno (view))) { zvbi_caption_pgno = pgno; remember_caption_pgno (zvbi_caption_pgno); if (ZVBI_CAPTION_DEBUG) fprintf (stderr, "CC Teletext pgno %x\n", zvbi_caption_pgno); zmisc_restore_previous_mode (zapping->info); } /* In video mode, use previous page or find subtitles. */ else if (zvbi_caption_pgno <= 0) { zvbi_caption_pgno = zvbi_find_subtitle_page (zapping->info); if (ZVBI_CAPTION_DEBUG) fprintf (stderr, "CC lookup pgno %x\n", zvbi_caption_pgno); if (zvbi_caption_pgno <= 0) { /* Bad luck. */ zconf_set_boolean (active = FALSE, caption_key); } else { remember_caption_pgno (zvbi_caption_pgno); } } else { if (ZVBI_CAPTION_DEBUG) fprintf (stderr, "CC previous pgno %x\n", zvbi_caption_pgno); } } if (DISPLAY_MODE_FULLSCREEN == zapping->display_mode) { fullscreen_activate_subtitles (active); } else { if (active) { if (_subtitle_view_new) { if (!zapping->subtitles) { zapping->subtitles = (SubtitleView *) _subtitle_view_new (); subt_set_position_from_config (zapping->subtitles, subwin_key); gtk_widget_show (GTK_WIDGET (zapping->subtitles)); z_signal_connect_const (G_OBJECT (zapping->subtitles), "z-position-changed", G_CALLBACK (subt_store_position_in_config), subwin_key); g_signal_connect (G_OBJECT (zapping->subtitles), "destroy", G_CALLBACK (gtk_widget_destroyed), &zapping->subtitles); z_stack_put (zapping->contents, GTK_WIDGET (zapping->subtitles), ZSTACK_SUBTITLES); } zapping->subtitles->monitor_page (zapping->subtitles, zvbi_caption_pgno); zapping->subtitles->set_rolling (zapping->subtitles, CAPTURE_MODE_OVERLAY != tv_get_capture_mode (zapping->info)); } } else { if (zapping->subtitles) { gtk_widget_destroy (GTK_WIDGET (zapping->subtitles)); zapping->subtitles = NULL; } } } block = 0; py_return_true; } void shutdown_subtitle (void) { /* Nothing to do. */ } void startup_subtitle (void) { zconf_create_boolean (FALSE, "Display subtitles", caption_key); cmd_register ("closed_caption", py_closed_caption, METH_VARARGS, ("Closed Caption on/off"), "zapping.closed_caption()"); } #else /* !HAVE_LIBZVBI */ GtkWidget * subtitle_menu_new (vbi3_pgno curr_pgno) { return NULL; } void shutdown_subtitle (void) { } void startup_subtitle (void) { } #endif �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������zapping-0.10cvs6/src/subtitle.h��������������������������������������������������������������������� 644 � 764 � 144 � 3272 10305454735 11612� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Zapping (TV viewer for the Gnome Desktop) * * Copyright (C) 2001 Iaki Garca Etxebarria * Copyright (C) 2003 Michael H. Schimek * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* $Id: subtitle.h,v 1.5 2005/09/01 01:31:09 mschimek Exp $ */ #ifndef SUBTITLE_H #define SUBTITLE_H #ifdef HAVE_CONFIG_H # include "config.h" #endif #include <gtk/gtk.h> #include "libvbi/exp-gfx.h" #include "plugins/subtitle/view.h" G_BEGIN_DECLS extern int zvbi_caption_pgno; /* page for subtitles */ extern void subt_store_position_in_config (SubtitleView * view, const gchar * path); extern void subt_set_position_from_config (SubtitleView * view, const gchar * path); extern guint zvbi_menu_shell_insert_active_subtitle_pages (GtkMenuShell * menu, gint position, vbi3_pgno curr_pgno, gboolean separator_above, gboolean separator_below); extern GtkWidget * zvbi_subtitle_menu_new (vbi3_pgno curr_pgno); extern void shutdown_subtitle (void); extern void startup_subtitle (void); G_END_DECLS #endif /* SUBTITLE_H */ ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������zapping-0.10cvs6/src/eggcellrendererkeys.c���������������������������������������������������������� 644 � 764 � 144 � 46016 10173357424 14022� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#ifdef HAVE_CONFIG_H # include "config.h" #endif #include "common/intl-priv.h" #include <gtk/gtk.h> #include <gdk/gdkx.h> #include <gdk/gdkkeysyms.h> #include "eggcellrendererkeys.h" #include "eggaccelerators.h" #ifndef EGG_COMPILATION #ifndef _ #define _(x) dgettext (GETTEXT_PACKAGE, x) #define N_(x) x #endif #else #define _(x) x #define N_(x) x #endif #define EGG_CELL_RENDERER_TEXT_PATH "egg-cell-renderer-text" static void egg_cell_renderer_keys_finalize (GObject *object); static void egg_cell_renderer_keys_init (EggCellRendererKeys *cell_keys); static void egg_cell_renderer_keys_class_init (EggCellRendererKeysClass *cell_keys_class); static GtkCellEditable *egg_cell_renderer_keys_start_editing (GtkCellRenderer *cell, GdkEvent *event, GtkWidget *widget, const gchar *path, GdkRectangle *background_area, GdkRectangle *cell_area, GtkCellRendererState flags); static void egg_cell_renderer_keys_get_property (GObject *object, guint param_id, GValue *value, GParamSpec *pspec); static void egg_cell_renderer_keys_set_property (GObject *object, guint param_id, const GValue *value, GParamSpec *pspec); static void egg_cell_renderer_keys_get_size (GtkCellRenderer *cell, GtkWidget *widget, GdkRectangle *cell_area, gint *x_offset, gint *y_offset, gint *width, gint *height); enum { PROP_0, PROP_ACCEL_KEY, PROP_ACCEL_MASK, PROP_ACCEL_MODE }; static GtkCellRendererTextClass *parent_class = NULL; GType egg_cell_renderer_keys_get_type (void) { static GType cell_keys_type = 0; if (!cell_keys_type) { static const GTypeInfo cell_keys_info = { sizeof (EggCellRendererKeysClass), NULL, /* base_init */ NULL, /* base_finalize */ (GClassInitFunc)egg_cell_renderer_keys_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (EggCellRendererKeys), 0, /* n_preallocs */ (GInstanceInitFunc) egg_cell_renderer_keys_init }; cell_keys_type = g_type_register_static (GTK_TYPE_CELL_RENDERER_TEXT, "EggCellRendererKeys", &cell_keys_info, 0); } return cell_keys_type; } static void egg_cell_renderer_keys_init (EggCellRendererKeys *cell_keys) { cell_keys->accel_mode = EGG_CELL_RENDERER_KEYS_MODE_GTK; } /* FIXME setup stuff to generate this */ /* VOID:STRING,UINT,FLAGS,UINT */ static void marshal_VOID__STRING_UINT_FLAGS_UINT (GClosure *closure, GValue *return_value, guint n_param_values, const GValue *param_values, gpointer invocation_hint, gpointer marshal_data) { typedef void (*GMarshalFunc_VOID__STRING_UINT_FLAGS_UINT) (gpointer data1, const char *arg_1, guint arg_2, int arg_3, guint arg_4, gpointer data2); register GMarshalFunc_VOID__STRING_UINT_FLAGS_UINT callback; register GCClosure *cc = (GCClosure*) closure; register gpointer data1, data2; g_return_if_fail (n_param_values == 5); if (G_CCLOSURE_SWAP_DATA (closure)) { data1 = closure->data; data2 = g_value_peek_pointer (param_values + 0); } else { data1 = g_value_peek_pointer (param_values + 0); data2 = closure->data; } callback = (GMarshalFunc_VOID__STRING_UINT_FLAGS_UINT) (marshal_data ? marshal_data : cc->callback); callback (data1, g_value_get_string (param_values + 1), g_value_get_uint (param_values + 2), g_value_get_flags (param_values + 3), g_value_get_uint (param_values + 4), data2); } static void egg_cell_renderer_keys_class_init (EggCellRendererKeysClass *cell_keys_class) { GObjectClass *object_class; GtkCellRendererClass *cell_renderer_class; object_class = G_OBJECT_CLASS (cell_keys_class); cell_renderer_class = GTK_CELL_RENDERER_CLASS (cell_keys_class); parent_class = g_type_class_peek_parent (object_class); GTK_CELL_RENDERER_CLASS (cell_keys_class)->start_editing = egg_cell_renderer_keys_start_editing; object_class->set_property = egg_cell_renderer_keys_set_property; object_class->get_property = egg_cell_renderer_keys_get_property; cell_renderer_class->get_size = egg_cell_renderer_keys_get_size; object_class->finalize = egg_cell_renderer_keys_finalize; /* FIXME if this gets moved to a real library, rename the properties * to match whatever the GTK convention is */ g_object_class_install_property (object_class, PROP_ACCEL_KEY, g_param_spec_uint ("accel_key", _("Accelerator key"), _("Accelerator key"), 0, G_MAXINT, 0, G_PARAM_READABLE | G_PARAM_WRITABLE)); g_object_class_install_property (object_class, PROP_ACCEL_MASK, g_param_spec_flags ("accel_mask", _("Accelerator modifiers"), _("Accelerator modifiers"), GDK_TYPE_MODIFIER_TYPE, 0, G_PARAM_READABLE | G_PARAM_WRITABLE)); /* FIXME: Register the enum when moving to GTK+ */ g_object_class_install_property (object_class, PROP_ACCEL_MODE, g_param_spec_int ("accel_mode", _("Accelerator Mode"), _("The type of accelerator."), 0, 2, 0, G_PARAM_READABLE | G_PARAM_WRITABLE)); g_signal_new ("keys_edited", EGG_TYPE_CELL_RENDERER_KEYS, G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (EggCellRendererKeysClass, keys_edited), NULL, NULL, marshal_VOID__STRING_UINT_FLAGS_UINT, G_TYPE_NONE, 4, G_TYPE_STRING, G_TYPE_UINT, GDK_TYPE_MODIFIER_TYPE, G_TYPE_UINT); } GtkCellRenderer * egg_cell_renderer_keys_new (void) { return GTK_CELL_RENDERER (g_object_new (EGG_TYPE_CELL_RENDERER_KEYS, NULL)); } static void egg_cell_renderer_keys_finalize (GObject *object) { (* G_OBJECT_CLASS (parent_class)->finalize) (object); } static gchar * convert_keysym_state_to_string (guint keysym, EggVirtualModifierType mask) { if (keysym == 0) return g_strdup (_("Disabled")); else return egg_virtual_accelerator_name (keysym, mask); } static void egg_cell_renderer_keys_get_property (GObject *object, guint param_id, GValue *value, GParamSpec *pspec) { EggCellRendererKeys *keys; g_return_if_fail (EGG_IS_CELL_RENDERER_KEYS (object)); keys = EGG_CELL_RENDERER_KEYS (object); switch (param_id) { case PROP_ACCEL_KEY: g_value_set_uint (value, keys->accel_key); break; case PROP_ACCEL_MASK: g_value_set_flags (value, keys->accel_mask); break; case PROP_ACCEL_MODE: g_value_set_int (value, keys->accel_mode); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, param_id, pspec); } } static void egg_cell_renderer_keys_set_property (GObject *object, guint param_id, const GValue *value, GParamSpec *pspec) { EggCellRendererKeys *keys; g_return_if_fail (EGG_IS_CELL_RENDERER_KEYS (object)); keys = EGG_CELL_RENDERER_KEYS (object); switch (param_id) { case PROP_ACCEL_KEY: egg_cell_renderer_keys_set_accelerator (keys, g_value_get_uint (value), keys->accel_mask); break; case PROP_ACCEL_MASK: egg_cell_renderer_keys_set_accelerator (keys, keys->accel_key, g_value_get_flags (value)); break; case PROP_ACCEL_MODE: egg_cell_renderer_keys_set_accel_mode (keys, g_value_get_int (value)); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, param_id, pspec); } } static gboolean is_modifier (guint keycode) { gint i; gint map_size; XModifierKeymap *mod_keymap; gboolean retval = FALSE; mod_keymap = XGetModifierMapping (gdk_display); map_size = 8 * mod_keymap->max_keypermod; i = 0; while (i < map_size) { if (keycode == mod_keymap->modifiermap[i]) { retval = TRUE; break; } ++i; } XFreeModifiermap (mod_keymap); return retval; } void egg_cell_renderer_keys_get_size (GtkCellRenderer *cell, GtkWidget *widget, GdkRectangle *cell_area, gint *x_offset, gint *y_offset, gint *width, gint *height) { EggCellRendererKeys *keys = (EggCellRendererKeys *) cell; GtkRequisition requisition; if (keys->sizing_label == NULL) keys->sizing_label = gtk_label_new (_("Type a new accelerator, or press Backspace to clear")); gtk_widget_size_request (keys->sizing_label, &requisition); (* GTK_CELL_RENDERER_CLASS (parent_class)->get_size) (cell, widget, cell_area, x_offset, y_offset, width, height); /* FIXME: need to take the cell_area et al. into account */ if (width) *width = MAX (*width, requisition.width); if (height) *height = MAX (*height, requisition.height); } /* FIXME: Currently we don't differentiate between a 'bogus' key (like tab in * GTK mode) and a removed key. */ static gboolean grab_key_callback (GtkWidget *widget, GdkEventKey *event, void *data) { GdkModifierType accel_mods; guint accel_keyval; EggCellRendererKeys *keys; char *path; gboolean edited; GdkModifierType consumed_modifiers; guint upper; GdkModifierType ignored_modifiers; keys = EGG_CELL_RENDERER_KEYS (data); accel_mods = 0; if (is_modifier (event->hardware_keycode)) return TRUE; edited = FALSE; consumed_modifiers = 0; gdk_keymap_translate_keyboard_state (gdk_keymap_get_default (), event->hardware_keycode, event->state, event->group, NULL, NULL, NULL, &consumed_modifiers); upper = event->keyval; accel_keyval = gdk_keyval_to_lower (upper); if (accel_keyval == GDK_ISO_Left_Tab) accel_keyval = GDK_Tab; /* Put shift back if it changed the case of the key, not otherwise. */ if (upper != accel_keyval && (consumed_modifiers & GDK_SHIFT_MASK)) { consumed_modifiers &= ~(GDK_SHIFT_MASK); } egg_keymap_resolve_virtual_modifiers (gdk_keymap_get_default (), EGG_VIRTUAL_NUM_LOCK_MASK | EGG_VIRTUAL_SCROLL_LOCK_MASK, &ignored_modifiers); /* filter consumed/ignored modifiers */ if (keys->accel_mode == EGG_CELL_RENDERER_KEYS_MODE_GTK) accel_mods = event->state & ~(consumed_modifiers | ignored_modifiers); else if (keys->accel_mode == EGG_CELL_RENDERER_KEYS_MODE_X) accel_mods = event->state & ~(ignored_modifiers); else g_assert_not_reached (); if (accel_mods == 0 && accel_keyval == GDK_Escape) goto out; /* cancel */ /* clear the accelerator on Backspace */ if (keys->edit_key != 0 && accel_mods == 0 && accel_keyval == GDK_BackSpace) accel_keyval = 0; if (keys->accel_mode == EGG_CELL_RENDERER_KEYS_MODE_GTK) { if (!gtk_accelerator_valid (accel_keyval, accel_mods)) { accel_keyval = 0; accel_mods = 0; } /* Remove modifiers like super and hyper, as GTK+ ignores them. */ accel_mods = accel_mods & GDK_MODIFIER_MASK; } edited = TRUE; out: path = g_strdup (g_object_get_data (G_OBJECT (keys->edit_widget), EGG_CELL_RENDERER_TEXT_PATH)); gdk_keyboard_ungrab (event->time); gdk_pointer_ungrab (event->time); gtk_cell_editable_editing_done (GTK_CELL_EDITABLE (keys->edit_widget)); gtk_cell_editable_remove_widget (GTK_CELL_EDITABLE (keys->edit_widget)); keys->edit_widget = NULL; keys->grab_widget = NULL; if (edited) g_signal_emit_by_name (G_OBJECT (keys), "keys_edited", path, accel_keyval, accel_mods, event->hardware_keycode); g_free (path); return TRUE; } static void ungrab_stuff (GtkWidget *widget, gpointer data) { EggCellRendererKeys *keys = EGG_CELL_RENDERER_KEYS (data); gdk_keyboard_ungrab (GDK_CURRENT_TIME); gdk_pointer_ungrab (GDK_CURRENT_TIME); g_signal_handlers_disconnect_by_func (G_OBJECT (keys->grab_widget), G_CALLBACK (grab_key_callback), data); } static void pointless_eventbox_start_editing (GtkCellEditable *cell_editable, GdkEvent *event) { /* do nothing, because we are pointless */ } static void pointless_eventbox_cell_editable_init (GtkCellEditableIface *iface) { iface->start_editing = pointless_eventbox_start_editing; } static GType pointless_eventbox_subclass_get_type (void) { static GType eventbox_type = 0; if (!eventbox_type) { static const GTypeInfo eventbox_info = { sizeof (GtkEventBoxClass), NULL, /* base_init */ NULL, /* base_finalize */ NULL, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (GtkEventBox), 0, /* n_preallocs */ (GInstanceInitFunc) NULL, }; static const GInterfaceInfo cell_editable_info = { (GInterfaceInitFunc) pointless_eventbox_cell_editable_init, NULL, NULL }; eventbox_type = g_type_register_static (GTK_TYPE_EVENT_BOX, "EggCellEditableEventBox", &eventbox_info, 0); g_type_add_interface_static (eventbox_type, GTK_TYPE_CELL_EDITABLE, &cell_editable_info); } return eventbox_type; } static GtkCellEditable * egg_cell_renderer_keys_start_editing (GtkCellRenderer *cell, GdkEvent *event, GtkWidget *widget, const gchar *path, GdkRectangle *background_area, GdkRectangle *cell_area, GtkCellRendererState flags) { GtkCellRendererText *celltext; EggCellRendererKeys *keys; GtkWidget *label; GtkWidget *eventbox; celltext = GTK_CELL_RENDERER_TEXT (cell); keys = EGG_CELL_RENDERER_KEYS (cell); /* If the cell isn't editable we return NULL. */ if (celltext->editable == FALSE) return NULL; g_return_val_if_fail (widget->window != NULL, NULL); if (gdk_keyboard_grab (widget->window, FALSE, gdk_event_get_time (event)) != GDK_GRAB_SUCCESS) return NULL; if (gdk_pointer_grab (widget->window, FALSE, GDK_BUTTON_PRESS_MASK, FALSE, NULL, gdk_event_get_time (event)) != GDK_GRAB_SUCCESS) { gdk_keyboard_ungrab (gdk_event_get_time (event)); return NULL; } keys->grab_widget = widget; g_signal_connect (G_OBJECT (widget), "key_press_event", G_CALLBACK (grab_key_callback), keys); eventbox = g_object_new (pointless_eventbox_subclass_get_type (), NULL); keys->edit_widget = eventbox; g_object_add_weak_pointer (G_OBJECT (keys->edit_widget), (void**) &keys->edit_widget); label = gtk_label_new (NULL); gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); gtk_widget_modify_bg (eventbox, GTK_STATE_NORMAL, &widget->style->bg[GTK_STATE_SELECTED]); gtk_widget_modify_fg (label, GTK_STATE_NORMAL, &widget->style->fg[GTK_STATE_SELECTED]); if (keys->accel_key != 0) gtk_label_set_text (GTK_LABEL (label), _("Type a new accelerator, or press Backspace to clear")); else gtk_label_set_text (GTK_LABEL (label), _("Type a new accelerator")); gtk_container_add (GTK_CONTAINER (eventbox), label); g_object_set_data_full (G_OBJECT (keys->edit_widget), EGG_CELL_RENDERER_TEXT_PATH, g_strdup (path), g_free); gtk_widget_show_all (keys->edit_widget); g_signal_connect (G_OBJECT (keys->edit_widget), "unrealize", G_CALLBACK (ungrab_stuff), keys); keys->edit_key = keys->accel_key; return GTK_CELL_EDITABLE (keys->edit_widget); } void egg_cell_renderer_keys_set_accelerator (EggCellRendererKeys *keys, guint keyval, EggVirtualModifierType mask) { char *text; gboolean changed; GtkCellRendererText *celltext; g_return_if_fail (EGG_IS_CELL_RENDERER_KEYS (keys)); g_object_freeze_notify (G_OBJECT (keys)); changed = FALSE; if (keyval != keys->accel_key) { keys->accel_key = keyval; g_object_notify (G_OBJECT (keys), "accel_key"); changed = TRUE; } if (mask != keys->accel_mask) { keys->accel_mask = mask; g_object_notify (G_OBJECT (keys), "accel_mask"); changed = TRUE; } g_object_thaw_notify (G_OBJECT (keys)); if (changed) { /* sync string to the key values */ celltext = GTK_CELL_RENDERER_TEXT (keys); text = convert_keysym_state_to_string (keys->accel_key, keys->accel_mask); g_object_set (keys, "text", text, NULL); g_free (text); } } void egg_cell_renderer_keys_get_accelerator (EggCellRendererKeys *keys, guint *keyval, EggVirtualModifierType *mask) { g_return_if_fail (EGG_IS_CELL_RENDERER_KEYS (keys)); if (keyval) *keyval = keys->accel_key; if (mask) *mask = keys->accel_mask; } void egg_cell_renderer_keys_set_accel_mode (EggCellRendererKeys *keys, EggCellRendererKeysMode accel_mode) { g_return_if_fail (EGG_IS_CELL_RENDERER_KEYS (keys)); keys->accel_mode = accel_mode; g_object_notify (G_OBJECT (keys), "accel_mode"); } ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������zapping-0.10cvs6/src/eggcellrendererkeys.h���������������������������������������������������������� 644 � 764 � 144 � 6147 7762173334 13776� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* gtkcellrendererkeybinding.h * Copyright (C) 2000 Red Hat, Inc., Jonathan Blandford <jrb@redhat.com> * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #ifndef __EGG_CELL_RENDERER_KEYS_H__ #define __EGG_CELL_RENDERER_KEYS_H__ #include <gtk/gtkcellrenderertext.h> #include "eggaccelerators.h" G_BEGIN_DECLS #define EGG_TYPE_CELL_RENDERER_KEYS (egg_cell_renderer_keys_get_type ()) #define EGG_CELL_RENDERER_KEYS(obj) (GTK_CHECK_CAST ((obj), EGG_TYPE_CELL_RENDERER_KEYS, EggCellRendererKeys)) #define EGG_CELL_RENDERER_KEYS_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), EGG_TYPE_CELL_RENDERER_KEYS, EggCellRendererKeysClass)) #define EGG_IS_CELL_RENDERER_KEYS(obj) (GTK_CHECK_TYPE ((obj), EGG_TYPE_CELL_RENDERER_KEYS)) #define EGG_IS_CELL_RENDERER_KEYS_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), EGG_TYPE_CELL_RENDERER_KEYS)) #define EGG_CELL_RENDERER_KEYS_GET_CLASS(obj) (GTK_CHECK_GET_CLASS ((obj), EGG_TYPE_CELL_RENDERER_KEYS, EggCellRendererKeysClass)) typedef struct _EggCellRendererKeys EggCellRendererKeys; typedef struct _EggCellRendererKeysClass EggCellRendererKeysClass; typedef enum { EGG_CELL_RENDERER_KEYS_MODE_GTK, EGG_CELL_RENDERER_KEYS_MODE_X, } EggCellRendererKeysMode; struct _EggCellRendererKeys { GtkCellRendererText parent; guint accel_key; EggVirtualModifierType accel_mask; GtkWidget *edit_widget; GtkWidget *grab_widget; guint edit_key; GtkWidget *sizing_label; EggCellRendererKeysMode accel_mode; }; struct _EggCellRendererKeysClass { GtkCellRendererTextClass parent_class; void (* keys_edited) (EggCellRendererKeys *keys, const char *path_string, guint keyval, EggVirtualModifierType mask, guint hardware_keycode); }; GType egg_cell_renderer_keys_get_type (void); GtkCellRenderer *egg_cell_renderer_keys_new (void); void egg_cell_renderer_keys_set_accelerator (EggCellRendererKeys *keys, guint keyval, EggVirtualModifierType mask); void egg_cell_renderer_keys_get_accelerator (EggCellRendererKeys *keys, guint *keyval, EggVirtualModifierType *mask); void egg_cell_renderer_keys_set_accel_mode (EggCellRendererKeys *keys, EggCellRendererKeysMode accel_mode); G_END_DECLS #endif /* __GTK_CELL_RENDERER_KEYS_H__ */ �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������zapping-0.10cvs6/src/keyboard.c��������������������������������������������������������������������� 644 � 764 � 144 � 71221 10400112370 11547� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Zapping (TV viewer for the Gnome Desktop) * * Copyright (C) 2000-2001 Iaki Garca Etxebarria * Copyright (C) 2002-2003 Michael H. Schimek * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* XXX gtk+ 2.3 GtkCombo -> GtkComboBox */ #undef GTK_DISABLE_DEPRECATED #include "site_def.h" #ifdef HAVE_CONFIG_H # include "config.h" #endif #include <gnome.h> #include "keyboard.h" #include "properties.h" #include "interface.h" #include "zconf.h" #include "eggcellrendererkeys.h" #include "zmisc.h" #include "remote.h" #ifndef KEYBOARD_KEY_LOG #define KEYBOARD_KEY_LOG 0 #endif static const gchar * z_keyval_name (guint keyval) { switch (keyval) { /* These are synonyms, let's favour the versions more readily understandable by the user. */ case GDK_Prior: return "Page_Up"; case GDK_Next: return "Page_Down"; case GDK_KP_Prior: return "KP_Page_Up"; case GDK_KP_Next: return "KP_Page_Down"; default: return gdk_keyval_name (keyval); } } /** * z_key_name: * @key: * * Similar to gdk_keyval_name(), including key modifiers. * * Return value: * %NULL if invalid key, otherwise a string you must * g_free(). **/ gchar * z_key_name (z_key key) { const gchar *name; name = z_keyval_name (gdk_keyval_to_lower (key.key)); if (!name) return NULL; return g_strconcat ((key.mask & GDK_CONTROL_MASK) ? _("Ctrl+") : "", (key.mask & GDK_MOD1_MASK) ? _("Alt+") : "", (key.mask & GDK_SHIFT_MASK) ? _("Shift+") : "", name, NULL); } /** * z_key_from_name: * @name: * * Similar to gdk_keyval_from_name(), including key modifiers. * * Return value: * A z_key, representing GDK_VoidSymbol if the name is invalid. **/ z_key z_key_from_name (const gchar * name) { struct { const gchar * str; guint mask; } modifiers[3] = { { N_("Ctrl+"), GDK_CONTROL_MASK }, { N_("Alt+"), GDK_MOD1_MASK }, { N_("Shift+"), GDK_SHIFT_MASK } }; z_key key; key.mask = 0; for (;;) { guint i, len; gchar *str; for (i = 0; i < G_N_ELEMENTS (modifiers); i++) { str = _(modifiers[i].str); len = strlen (str); /* XXX utf8 ? */ if (g_ascii_strncasecmp (name, str, len) == 0) break; } if (i >= G_N_ELEMENTS (modifiers)) break; key.mask |= modifiers[i].mask; name += len; } key.key = gdk_keyval_to_lower (gdk_keyval_from_name (name)); if (key.key == GDK_VoidSymbol) key.mask = 0; return key; } /* Configuration */ /** * zconf_create_z_key: * @key: * @desc: * @path: * * Similar to other zconf_create_.. functions for z_key types. * Give an absolute path like ZCONF_DOMAIN "/foo/bar/accel_". **/ void zconf_create_z_key (z_key key, const gchar * desc, const gchar * path) { gchar *s; g_assert(path != NULL); s = g_strjoin (NULL, path, "key", NULL); zconf_set_uint (key.key, s); if (desc) zconf_set_description (desc, s); g_free (s); if (zconf_error ()) return; s = g_strconcat (path, "mask", NULL); zconf_set_uint (key.mask, s); g_free (s); } /** * zconf_set_z_key: * @key: * @path: **/ void zconf_set_z_key (z_key key, const gchar * path) { gchar *s; g_assert(path != NULL); s = g_strconcat (path, "key", NULL); zconf_set_uint (key.key, s); g_free (s); if (zconf_error()) return; s = g_strconcat (path, "mask", NULL); zconf_set_uint (key.mask, s); g_free (s); } z_key zconf_get_z_key (z_key * keyp, const gchar * path) { z_key key; gchar *s; g_assert(path != NULL); s = g_strconcat (path, "key", NULL); zconf_get_uint (&key.key, s); g_free (s); if (!zconf_error()) { s = g_strconcat (path, "mask", NULL); zconf_get_uint (&key.mask, s); g_free (s); } if (zconf_error()) key = Z_KEY_NONE; else if (keyp) *keyp = key; return key; } /* * Generic key entry dialog */ typedef struct { GtkWidget * hbox; GtkWidget * ctrl; GtkWidget * alt; GtkWidget * shift; GtkWidget * entry; } z_key_entry; static inline z_key_entry * get_z_key_entry (GtkWidget * hbox) { z_key_entry *ke = g_object_get_data (G_OBJECT (hbox), "z_key_entry"); g_assert (ke != NULL); return ke; } /** * z_key_entry_entry: * @hbox: * * Returns a pointer to the text entry of the z_key_entry, to * connect to the "changed" signal. (We can't emit "changed" on * a hbox, or can we?) **/ GtkWidget * z_key_entry_entry (GtkWidget * hbox) { z_key_entry *ke = get_z_key_entry (hbox); return ke->entry; } static void on_modifier_toggled (GtkToggleButton * togglebutton _unused_, gpointer user_data) { z_key_entry *ke = user_data; gint pos = 0; /* Emit "changed" signal */ gtk_editable_insert_text (GTK_EDITABLE (ke->entry), "", 0, &pos); } /** * z_key_entry_set_key: * @hbox: * @key: * * Set z_key_entry @hbox to display @key. When @key is * GDK_VoidSymbol the key name will be blank and all modifiers off. **/ void z_key_entry_set_key (GtkWidget * hbox, z_key key) { z_key_entry *ke = get_z_key_entry (hbox); const gchar *name; name = z_keyval_name (gdk_keyval_to_lower (key.key)); gtk_entry_set_text (GTK_ENTRY (ke->entry), name ? name : ""); if (!name) key.mask = 0; gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (ke->ctrl), !!(key.mask & GDK_CONTROL_MASK)); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (ke->alt), !!(key.mask & GDK_MOD1_MASK)); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (ke->shift), !!(key.mask & GDK_SHIFT_MASK)); } /** * z_key_entry_get_key: * @hbox: * * Returns the key entered into the z_key_entry @hbox. When * the key is invalid (e. g. blank) the result will be * Z_KEY_VOID, that is key = GDK_VoidSymbol and mask = 0. * * Return value: * A z_key. **/ z_key z_key_entry_get_key (GtkWidget * hbox) { z_key_entry *ke = get_z_key_entry (hbox); const gchar *name; z_key key; name = gtk_entry_get_text (GTK_ENTRY (ke->entry)); key.key = gdk_keyval_from_name (name); key.mask = 0; if (key.key != GDK_VoidSymbol) { key.mask += gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (ke->ctrl)) ? GDK_CONTROL_MASK : 0; key.mask += gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (ke->alt)) ? GDK_MOD1_MASK : 0; key.mask += gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (ke->shift)) ? GDK_SHIFT_MASK : 0; } return key; } #include "keysyms.h" static gboolean on_key_press (GtkWidget * dialog, GdkEventKey * event, gpointer user_data) { const guint mask = GDK_CONTROL_MASK | GDK_MOD1_MASK | GDK_SHIFT_MASK; z_key_entry *ke = user_data; GtkWidget *widget; widget = lookup_widget (dialog, "togglebutton1"); if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget))) switch (event->keyval) { z_key key; case GDK_Shift_L: case GDK_Shift_R: case GDK_Control_L: case GDK_Control_R: case GDK_Caps_Lock: case GDK_Shift_Lock: case GDK_Meta_L: case GDK_Meta_R: case GDK_Alt_L: case GDK_Alt_R: case GDK_Super_L: case GDK_Super_R: case GDK_Hyper_L: case GDK_Hyper_R: case GDK_Mode_switch: case GDK_Multi_key: break; default: key.key = gdk_keyval_to_lower (event->keyval); key.mask = event->state & mask; z_key_entry_set_key (ke->hbox, key); /* OK means that we want to use the currently selected row, so emit accept instead */ gtk_dialog_response (GTK_DIALOG (dialog), GTK_RESPONSE_ACCEPT); return TRUE; /* handled */ } return FALSE; /* pass on */ } static void on_key_table_clicked (GtkWidget * w _unused_, gpointer user_data) { z_key_entry *ke = user_data; GtkWidget *dialog = build_widget("choose_key", NULL); GtkTreeView *key_view = GTK_TREE_VIEW(lookup_widget(dialog, "key_view")); const gchar *name; guint i; GtkListStore *store; GtkTreeIter iter; GtkTreeViewColumn *column; GtkCellRenderer *renderer; GtkTreePath *path; GtkTreeSelection *sel; name = gtk_entry_get_text (GTK_ENTRY (ke->entry)); store = gtk_list_store_new (1, G_TYPE_STRING); for (i = 0, path=NULL; i < num_keysyms; i++) { gtk_list_store_append (store, &iter); gtk_list_store_set (store, &iter, 0, keysyms[i], -1); if (name && !strcasecmp (name, keysyms[i])) path = gtk_tree_model_get_path (GTK_TREE_MODEL (store), &iter); } gtk_tree_view_set_model (key_view, GTK_TREE_MODEL (store)); /* Set browse mode for selection */ /* Borrowed reference, no need to unref. The docs could mention this, of course ... but that would be too easy :-) */ sel = gtk_tree_view_get_selection (key_view); gtk_tree_selection_set_mode (sel, GTK_SELECTION_BROWSE); /* Append our single column */ renderer = gtk_cell_renderer_text_new (); column = gtk_tree_view_column_new_with_attributes (_("Accelerator"), renderer, /* Render the 0th entry in the model */ "text", 0, NULL); gtk_tree_view_append_column (key_view, column); gtk_tree_view_set_search_column (key_view, 0); /* Select the previous option */ if (path) { gtk_tree_view_set_cursor (key_view, path, NULL, FALSE); /* FIXME: doesn't work, prolly a gtk bug */ gtk_tree_view_scroll_to_cell (key_view, path, NULL, TRUE, 0.0, 0.5); gtk_tree_path_free (path); } gtk_widget_grab_focus (GTK_WIDGET (key_view)); g_signal_connect (G_OBJECT (dialog), "key_press_event", G_CALLBACK (on_key_press), ke); while (gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_OK) { /* Returns the selected row in path */ gtk_tree_view_get_cursor (key_view, &path, NULL); if (path) { gchar *buf; g_assert(gtk_tree_model_get_iter (GTK_TREE_MODEL (store), &iter, path) == TRUE); gtk_tree_model_get (GTK_TREE_MODEL (store), &iter, 0, &buf, -1); gtk_entry_set_text (GTK_ENTRY (ke->entry), buf); g_free(buf); gtk_tree_path_free (path); } } /* We owned a reference */ g_object_unref (G_OBJECT (store)); gtk_widget_destroy(dialog); } #define MOD_TOGGLE(object, label) \ ke->object = gtk_check_button_new_with_label (_(label)); \ gtk_box_pack_start (GTK_BOX (ke->hbox), ke->object, FALSE, FALSE, 3); \ gtk_widget_show (ke->object); \ g_signal_connect (G_OBJECT (ke->object), "toggled", \ G_CALLBACK (on_modifier_toggled), ke); /** * z_key_entry_new: * * Creates a "key entry" widget. (Used as Glade custom * widget in zapping.glade.) The initial state is the same * as after z_key_entry_set_key (Z_KEY_VOID), i. e. blank. * * Return value: * GtkWidget pointer, gtk_destroy() as usual. **/ GtkWidget * z_key_entry_new (void) { GtkWidget *button; z_key_entry *ke; ke = g_malloc (sizeof (*ke)); ke->hbox = gtk_hbox_new (FALSE, 0); g_object_set_data_full (G_OBJECT (ke->hbox), "z_key_entry", ke, (GDestroyNotify) g_free); gtk_widget_show (ke->hbox); MOD_TOGGLE (ctrl, "Ctrl"); MOD_TOGGLE (alt, "Alt"); MOD_TOGGLE (shift, "Shift"); ke->entry = gtk_entry_new(); gtk_box_pack_start (GTK_BOX (ke->hbox), ke->entry, TRUE, TRUE, 3); gtk_widget_show (ke->entry); button = gtk_button_new_with_label (_("Key table...")); gtk_box_pack_start (GTK_BOX (ke->hbox), button, FALSE, FALSE, 3); g_signal_connect (G_OBJECT (button), "clicked", G_CALLBACK (on_key_table_clicked), ke); gtk_widget_show (button); return ke->hbox; } /* * Keyboard command bindings */ typedef struct key_binding { struct key_binding * next; z_key key; gchar * command; gchar * old_cmd; } key_binding; static key_binding * kb_list = NULL; static void kb_delete (key_binding * kb) { g_free (kb->old_cmd); g_free (kb->command); g_free (kb); } static void kb_flush (void) { key_binding *k; while ((k = kb_list)) { kb_list = k->next; kb_delete (k); } } static void kb_add (z_key key, const gchar * command, const gchar * old_cmd) { key_binding *kb, **kbpp; if (key.key == GDK_VoidSymbol || !command || !command[0]) return; for (kbpp = &kb_list; (kb = *kbpp); kbpp = &kb->next) if (z_key_equal (kb->key, key)) break; if (kb) { g_free (kb->command); kb->command = g_strdup (command); kb->old_cmd = old_cmd ? g_strdup (old_cmd) : NULL; } else { kb = g_malloc (sizeof (*kb)); kb->next = NULL; kb->key = key; kb->command = g_strdup (command); kb->old_cmd = old_cmd ? g_strdup (old_cmd) : NULL; *kbpp = kb; } } gboolean on_user_key_press (GtkWidget * widget, GdkEventKey * event, gpointer user_data _unused_) { key_binding *kb; z_key key; key.key = gdk_keyval_to_lower (event->keyval); key.mask = event->state; if (KEYBOARD_KEY_LOG) fprintf (stderr, "key %x %x\n", key.key, key.mask); for (kb = kb_list; kb; kb = kb->next) if (z_key_equal (kb->key, key)) { python_command (widget, kb->command); return TRUE; /* handled */ } return FALSE; /* not for us, pass on */ } #undef SHIFT #undef ALT #undef CTRL #define SHIFT GDK_SHIFT_MASK #define ALT GDK_MOD1_MASK #define CTRL GDK_CONTROL_MASK static struct { guint mask; guint key; const gchar * command; } default_key_bindings[] = { /* * Zapping default key bindings. * * 'Historic' entries were used in older versions. Eventually we * found Ctrl+Alt+ annoying, so new versions without qualifiers were * added. 'XawTV' entries are used by the ubiquitious XawTV viewer, * added for people switching to Zapping. * * Note Ctrl+, Alt+ are reserved for Gnome shortcuts (exception * Ctrl+S and +R), which are all defined in zapping.glade. */ { 0, GDK_a, "zapping.mute()" }, /* XawTV */ { CTRL + ALT, GDK_c, "zapping.toggle_mode('capture')" }, /* historic */ { 0, GDK_c, "zapping.toggle_mode('capture')" }, { SHIFT, GDK_c, "zapping.ttx_open_new()" }, { 0, GDK_e, "zapping.channel_editor()" }, /* XawTV */ { 0, GDK_f, "zapping.toggle_mode('fullscreen')" }, { 0, GDK_g, "zapping.quickshot('ppm')" }, /* XawTV */ { 0, GDK_h, "zapping.ttx_hold()" }, { SHIFT, GDK_h, "zapping.ttx_hold()" }, { 0, GDK_j, "zapping.quickshot('jpeg')" }, /* XawTV */ { CTRL + ALT, GDK_n, "zapping.ttx_open_new()" }, /* historic */ { 0, GDK_n, "zapping.ttx_open_new()" }, { CTRL + ALT, GDK_o, "zapping.toggle_mode('preview')" }, /* historic */ { 0, GDK_o, "zapping.toggle_mode('preview')" }, { CTRL + ALT, GDK_p, "zapping.toggle_mode('preview')" }, /* historic */ { CTRL, GDK_p, "zapping.toggle_mode('preview')" }, /* historic */ { 0, GDK_p, "zapping.toggle_mode('preview')" }, { 0, GDK_q, "zapping.quit()" }, /* XawTV */ { SHIFT, GDK_r, "zapping.ttx_reveal()" }, { 0, GDK_r, "zapping.record()" }, /* XawTV */ { CTRL, GDK_r, "zapping.quickrec()" }, { 0, GDK_s, "zapping.screenshot()" }, { CTRL, GDK_s, "zapping.quickshot()" }, { CTRL + ALT, GDK_t, "zapping.switch_mode('teletext')" }, /* historic */ { 0, GDK_t, "zapping.switch_mode('teletext')" }, { 0, GDK_space, "zapping.channel_up()" }, /* XawTV */ { 0, GDK_question, "zapping.ttx_reveal()" }, { 0, GDK_plus, "zapping.control_incr('volume',+1)" }, { 0, GDK_minus, "zapping.control_incr('volume',-1)" }, { 0, GDK_Page_Up, "zapping.channel_up()" }, { 0, GDK_KP_Page_Up, "zapping.channel_up()" }, { 0, GDK_Page_Down, "zapping.channel_down()" }, { 0, GDK_KP_Page_Down,"zapping.channel_down()" }, { 0, GDK_Home, "zapping.ttx_home()" }, { 0, GDK_KP_Home, "zapping.ttx_home()" }, { 0, GDK_Up, "zapping.ttx_page_incr(+1)" }, { 0, GDK_KP_Up, "zapping.ttx_page_incr(+1)" }, { 0, GDK_Down, "zapping.ttx_page_incr(-1)" }, { 0, GDK_KP_Down, "zapping.ttx_page_incr(-1)" }, { SHIFT, GDK_Up, "zapping.ttx_page_incr(+10)" }, { SHIFT, GDK_KP_Up, "zapping.ttx_page_incr(+10)" }, { SHIFT, GDK_Down, "zapping.ttx_page_incr(-10)" }, { SHIFT, GDK_KP_Down, "zapping.ttx_page_incr(-10)" }, { 0, GDK_Left, "zapping.ttx_subpage_incr(-1)" }, { 0, GDK_KP_Left, "zapping.ttx_subpage_incr(-1)" }, { 0, GDK_Right, "zapping.ttx_subpage_incr(+1)" }, { 0, GDK_KP_Right, "zapping.ttx_subpage_incr(+1)" }, { 0, GDK_KP_Add, "zapping.control_incr('volume',+1)" }, /* XawTV */ { SHIFT, GDK_KP_Add, "zapping.picture_size_cycle(+1)" }, { 0, GDK_KP_Subtract,"zapping.control_incr('volume',-1)" }, /* XawTV */ { SHIFT, GDK_KP_Subtract,"zapping.picture_size_cycle(-1)" }, { 0, GDK_KP_Enter, "zapping.mute()" }, /* XawTV */ /* conflict with keypad channel number entering { 0, GDK_Escape, "zapping.toggle_mode()" }, */ { 0, GDK_F5, "zapping.control_incr('brightness',-1)" }, /* XawTV */ { 0, GDK_F6, "zapping.control_incr('brightness',+1)" }, /* XawTV */ { 0, GDK_F7, "zapping.control_incr('hue',-1)" }, /* XawTV */ { 0, GDK_F8, "zapping.control_incr('hue',+1)" }, /* XawTV */ { 0, GDK_F9, "zapping.control_incr('contrast',-1)" }, /* XawTV */ { 0, GDK_F10, "zapping.control_incr('contrast',+1)" }, /* XawTV */ { 0, GDK_F11, "zapping.toggle_mode('fullscreen')" }, /* historic */ /* conflict { 0, GDK_F11, "zapping.control_incr('saturation',-1)" },*/ /* XawTV */ { 0, GDK_F12, "zapping.control_incr('saturation',+1)" }, /* XawTV */ }; static const gint num_default_key_bindings = G_N_ELEMENTS (default_key_bindings); static void load_default_key_bindings (void) { z_key key; gint i; for (i = 0; i < num_default_key_bindings; i++) { key.key = default_key_bindings[i].key; key.mask = default_key_bindings[i].mask; kb_add (key, default_key_bindings[i].command, NULL); } } static void load_key_bindings (void) { gchar *buffer; gchar *cmd_txl; const gchar *command; z_key key; gint i; kb_flush (); for (i = 0;; i++) { gboolean translated; buffer = g_strdup_printf ("/zapping/options/main/keys/%d_cmd", i); command = zconf_get_string (NULL, buffer); g_free (buffer); if (command == NULL) { if (i == 0) load_default_key_bindings (); break; } cmd_txl = cmd_compatibility (command); translated = (0 != strcmp (command, cmd_txl)); buffer = g_strdup_printf ("/zapping/options/main/keys/%d_", i); zconf_get_z_key (&key, buffer); g_free (buffer); kb_add (key, cmd_txl, translated ? command : NULL); g_free (cmd_txl); } } static void save_key_bindings (void) { key_binding *kb; int i; zconf_delete("/zapping/options/main/keys"); for (kb = kb_list, i = 0; kb; kb = kb->next, i++) { gchar *buffer; buffer = g_strdup_printf ("/zapping/options/main/keys/%d_cmd", i); /* Save old style command for easier switch back to pre-0.7 versions. */ if (kb->old_cmd) zconf_set_string (kb->old_cmd, buffer); else zconf_set_string (kb->command, buffer); g_free (buffer); buffer = g_strdup_printf ("/zapping/options/main/keys/%d_", i); zconf_create_z_key (kb->key, NULL, buffer); g_free (buffer); } } /* * Preferences */ enum { C_COMMAND, C_KEY, C_KEY_MASK, C_EDITABLE, C_NUM }; static GtkListStore * create_model (void) { GtkListStore *model; key_binding *kb; model = gtk_list_store_new (C_NUM, G_TYPE_STRING, G_TYPE_UINT, G_TYPE_UINT, G_TYPE_BOOLEAN); for (kb = kb_list; kb; kb = kb->next) { GtkTreeIter iter; gtk_list_store_append (model, &iter); gtk_list_store_set (model, &iter, C_COMMAND, kb->command, C_KEY, kb->key.key, C_KEY_MASK, kb->key.mask, C_EDITABLE, TRUE, -1); } return model; } static void on_command_edited (GtkCellRendererText * cell _unused_, const gchar * path_string, const gchar * new_text, GtkTreeView * tree_view) { GtkTreeModel *model; GtkTreePath *path; GtkTreeIter iter; GtkWidget *combo; model = gtk_tree_view_get_model (tree_view); path = gtk_tree_path_new_from_string (path_string); gtk_tree_model_get_iter (model, &iter, path); gtk_tree_path_free (path); gtk_list_store_set (GTK_LIST_STORE (model), &iter, C_COMMAND, new_text, -1); combo = lookup_widget (GTK_WIDGET (tree_view), "combo1"); gtk_entry_set_text (GTK_ENTRY (GTK_COMBO (combo)->entry), new_text); z_property_item_modified (GTK_WIDGET (tree_view)); } static gboolean unique (GtkTreeModel * model, GtkTreePath * path _unused_, GtkTreeIter * iter, gpointer user_data) { z_key *new_key = user_data; z_key key; gtk_tree_model_get (model, iter, C_KEY, &key.key, C_KEY_MASK, &key.mask, -1); if (key.key == new_key->key && key.mask == new_key->mask) gtk_list_store_set (GTK_LIST_STORE (model), iter, C_KEY, 0, C_KEY_MASK, 0, -1); return FALSE; /* continue */ } static void on_accel_edited (GtkCellRendererText * cell _unused_, const char * path_string, guint keyval, EggVirtualModifierType mask, guint keycode _unused_, GtkTreeView * tree_view) { GtkTreePath *path; GtkTreeModel *model; GtkTreeIter iter; z_key key; key.key = keyval; key.mask = mask; model = gtk_tree_view_get_model (tree_view); path = gtk_tree_path_new_from_string (path_string); gtk_tree_model_get_iter (model, &iter, path); gtk_tree_path_free (path); if (keyval != 0) gtk_tree_model_foreach (model, unique, &key); gtk_list_store_set (GTK_LIST_STORE (model), &iter, C_KEY, key.key, C_KEY_MASK, key.mask, -1); z_property_item_modified (GTK_WIDGET (tree_view)); } static void accel_set_func (GtkTreeViewColumn * tree_column _unused_, GtkCellRenderer * cell, GtkTreeModel * model, GtkTreeIter * iter, GtkTreeView * tree_view _unused_) { z_key key; gtk_tree_model_get (model, iter, C_KEY, &key.key, C_KEY_MASK, &key.mask, -1); g_object_set (G_OBJECT (cell), "visible", TRUE, "editable", TRUE, "accel_key", key.key, "accel_mask", key.mask, "style", PANGO_STYLE_NORMAL, NULL); } static void on_selection_changed (GtkTreeSelection * selection, GtkTreeView * tree_view) { GtkTreeModel *model; GtkWidget *remove; GtkWidget *combo; GtkTreeIter iter; gboolean selected; gchar *action; model = gtk_tree_view_get_model (tree_view); selected = z_tree_selection_iter_first (selection, model, &iter); remove = lookup_widget (GTK_WIDGET (tree_view), "general-keyboard-remove"); gtk_widget_set_sensitive (remove, selected); if (selected) { combo = lookup_widget (GTK_WIDGET (tree_view), "combo1"); gtk_tree_model_get (model, &iter, C_COMMAND, &action, -1); gtk_entry_set_text (GTK_ENTRY (GTK_COMBO (combo)->entry), action); g_free (action); } } static void on_combo_entry_changed (GtkEditable * editable, GtkTreeView * tree_view) { GtkTreeSelection *selection; GtkTreeModel *model; GtkTreeIter iter; gchar *text; selection = gtk_tree_view_get_selection (tree_view); model = gtk_tree_view_get_model (tree_view); if (!z_tree_selection_iter_first (selection, model, &iter)) return; text = gtk_editable_get_chars (editable, 0, -1); gtk_list_store_set (GTK_LIST_STORE (model), &iter, C_COMMAND, text, -1); g_free (text); } static void on_add_clicked (GtkWidget * button _unused_, GtkTreeView * tree_view) { GtkTreeSelection *selection; GtkTreeModel *model; GtkTreeIter iter; GtkTreePath *path; GtkWidget *combo; const gchar *cmd; selection = gtk_tree_view_get_selection (tree_view); model = gtk_tree_view_get_model (tree_view); if (z_tree_selection_iter_first (selection, model, &iter)) gtk_list_store_insert_before (GTK_LIST_STORE (model), &iter, &iter); else gtk_list_store_append (GTK_LIST_STORE (model), &iter); combo = lookup_widget (GTK_WIDGET (tree_view), "combo1"); cmd = gtk_entry_get_text (GTK_ENTRY (GTK_COMBO (combo)->entry)); if (NULL == cmd) cmd = ""; gtk_list_store_set (GTK_LIST_STORE (model), &iter, C_COMMAND, cmd, C_KEY, 0, C_KEY_MASK, 0, C_EDITABLE, TRUE, -1); gtk_tree_selection_unselect_all (selection); gtk_tree_selection_select_iter (selection, &iter); if ((path = gtk_tree_model_get_path (model, &iter))) { gtk_tree_view_set_cursor (tree_view, path, gtk_tree_view_get_column (tree_view, 0), /* start_editing */ TRUE); gtk_widget_grab_focus (GTK_WIDGET (tree_view)); gtk_tree_path_free (path); } } static void on_remove_clicked (GtkWidget * button _unused_, GtkTreeView * tree_view) { z_tree_view_remove_selected (tree_view, gtk_tree_view_get_selection (tree_view), gtk_tree_view_get_model (tree_view)); } static void apply (GtkWidget * page) { GtkTreeView *tree_view; GtkTreeModel *model; GtkTreeIter iter; gboolean valid; tree_view = GTK_TREE_VIEW (lookup_widget (page, "general-keyboard-treeview")); model = gtk_tree_view_get_model (tree_view); kb_flush (); valid = gtk_tree_model_get_iter_first (model, &iter); while (valid) { gchar *cmd; z_key key; gtk_tree_model_get (model, &iter, C_COMMAND, &cmd, C_KEY, &key.key, C_KEY_MASK, &key.mask, -1); kb_add (key, cmd, NULL); g_free (cmd); valid = gtk_tree_model_iter_next (model, &iter); } } static void setup (GtkWidget * page) { GtkTreeView *tree_view; GtkCellRenderer *renderer; GtkTreeViewColumn *column; GtkWidget *widget; GtkTreeSelection *selection; widget = lookup_widget (page, "general-keyboard-treeview"); tree_view = GTK_TREE_VIEW (widget); gtk_tree_view_set_rules_hint (tree_view, TRUE); gtk_tree_view_set_reorderable (tree_view, TRUE); selection = gtk_tree_view_get_selection (tree_view); gtk_tree_selection_set_mode (selection, GTK_SELECTION_BROWSE); /* Don't connect "changed" signal here, see below. */ { GtkListStore *model; model = create_model (); gtk_tree_view_set_model (tree_view, GTK_TREE_MODEL (model)); } renderer = gtk_cell_renderer_text_new (); column = gtk_tree_view_column_new_with_attributes (_("Command"), renderer, "text", C_COMMAND, "editable", C_EDITABLE, NULL); gtk_tree_view_append_column (tree_view, column); g_signal_connect (G_OBJECT (renderer), "edited", G_CALLBACK (on_command_edited), tree_view); renderer = (GtkCellRenderer *) g_object_new (EGG_TYPE_CELL_RENDERER_KEYS, "editable", TRUE, "accel_mode", EGG_CELL_RENDERER_KEYS_MODE_X, NULL); column = gtk_tree_view_column_new_with_attributes (_("Shortcut"), renderer, NULL); gtk_tree_view_column_set_cell_data_func (column, renderer, (GtkTreeCellDataFunc) accel_set_func, NULL, NULL); gtk_tree_view_append_column (tree_view, column); g_signal_connect (G_OBJECT (renderer), "keys_edited", G_CALLBACK (on_accel_edited), tree_view); widget = lookup_widget (GTK_WIDGET (tree_view), "combo1"); gtk_combo_set_popdown_strings (GTK_COMBO (widget), cmd_list ()); g_signal_connect (G_OBJECT (GTK_COMBO (widget)->entry), "changed", G_CALLBACK (on_combo_entry_changed), tree_view); widget = lookup_widget (page, "general-keyboard-add"); g_signal_connect (G_OBJECT (widget), "clicked", G_CALLBACK (on_add_clicked), tree_view); widget = lookup_widget (page, "general-keyboard-remove"); g_signal_connect (G_OBJECT (widget), "clicked", G_CALLBACK (on_remove_clicked), tree_view); /* Must not fire until the dialog is ready. */ g_signal_connect (G_OBJECT (selection), "changed", G_CALLBACK (on_selection_changed), tree_view); } static void add (GtkDialog * dialog) { SidebarEntry general_options[] = { { N_("Keyboard"), "gnome-keyboard.png", "general-keyboard-table", setup, apply, .help_link_id = "zapping-settings-keyboard" } }; SidebarGroup groups[] = { { N_("General Options"), general_options, G_N_ELEMENTS (general_options) } }; standard_properties_add (dialog, groups, G_N_ELEMENTS (groups), "zapping.glade2"); } void shutdown_keyboard (void) { save_key_bindings (); kb_flush (); } void startup_keyboard (void) { property_handler keyb_handler = { add: add }; load_key_bindings (); prepend_property_handler (&keyb_handler); } �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������zapping-0.10cvs6/src/keyboard.h��������������������������������������������������������������������� 644 � 764 � 144 � 4357 7762173334 11552� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Zapping (TV viewer for the Gnome Desktop) * * Copyright (C) 2000-2001 Iaki Garca Etxebarria * Copyright (C) 2002 Michael H. Schimek * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifndef KEYBOARD_H #define KEYBOARD_H #include <gdk/gdk.h> #include <gtk/gtk.h> extern void startup_keyboard (void); extern void shutdown_keyboard (void); typedef struct z_key { guint key; guint mask; } z_key; extern gchar * z_key_name (z_key key); extern z_key z_key_from_name (const gchar * name); #define Z_KEY_NONE ({ z_key none = { 0, 0 }; none; }) /* * Note: keyvals are supposed to be lower case. */ static inline gboolean z_key_equal (z_key key1, z_key key2) { const guint mask = GDK_CONTROL_MASK | GDK_MOD1_MASK | GDK_SHIFT_MASK; key1.key ^= key2.key; key1.mask ^= key2.mask; return ((key1.key | (key1.mask & mask)) == 0); } extern void zconf_create_z_key (z_key key, const gchar * desc, const gchar * path); extern void zconf_set_z_key (z_key key, const gchar * path); extern z_key zconf_get_z_key (z_key * keyp, const gchar * path); extern GtkWidget * z_key_entry_new (void); extern GtkWidget * z_key_entry_entry (GtkWidget * hbox); extern void z_key_entry_set_key (GtkWidget * hbox, z_key key); extern z_key z_key_entry_get_key (GtkWidget * hbox); extern void z_widget_add_accelerator (GtkWidget * widget, const gchar * accel_signal, guint accel_key, guint accel_mods); extern gboolean on_user_key_press (GtkWidget * widget, GdkEventKey * event, gpointer user_data); #endif /* KEYBOARD_H */ ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������zapping-0.10cvs6/src/xawtv.c������������������������������������������������������������������������ 644 � 764 � 144 � 55144 10400112340 11123� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Zapping (TV viewer for the Gnome Desktop) * Copyright (C) 2003 Michael H. Schimek * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* $Id: xawtv.c,v 1.15 2006/02/25 17:33:20 mschimek Exp $ */ /* XawTV compatibility functions: * Import XawTV configuration - currently channels only * XawTV IPC (w/nxtvepg etc) - more to do */ #include "site_def.h" #include <glib.h> #include <gnome.h> #include <fcntl.h> #include <string.h> #include <gdk/gdkx.h> #include <X11/Xatom.h> /* XA_STRING */ #include "xawtv.h" #include "zmisc.h" #include "remote.h" #include "osd.h" #include "globals.h" #include "v4linterface.h" #ifndef XAWTV_CONFIG_TEST #define XAWTV_CONFIG_TEST 0 #endif static gboolean get_value (FILE * fp, char buffer[300], char ** ident, char ** value) { int c; char *s; unsigned int len; do c = fgetc (fp); while (' ' == c || '\t' == c); if (EOF == c || ferror (fp)) return FALSE; ungetc (c, fp); if (c < 'a' || c > 'z') return FALSE; fgets (buffer, 300, fp); if (feof (fp) || ferror (fp)) return FALSE; s = buffer; while (' ' == *s || '\t' == *s) ++s; *ident = s; len = 0; while ('-' == (c = s[len]) || (c >= '0' && c <= '9') || (c >= 'a' && c <= 'z')) ++len; s += len; while (' ' == *s || '\t' == *s) ++s; if (0 == len || '=' != *s) return FALSE; (*ident)[len] = 0; ++s; while (' ' == *s || '\t' == *s) ++s; len = strlen (s); while (len > 0 && s[len - 1] <= ' ') --len; *value = s; s[len] = 0; if (XAWTV_CONFIG_TEST) fprintf (stderr, "<%s>=<%s>\n", *ident, *value); return TRUE; } static gboolean skip_section (FILE * fp) { gboolean newline; int c; newline = TRUE; while (EOF != (c = fgetc (fp))) { if (ferror (fp)) return FALSE; switch (c) { case '\n': newline = TRUE; break; case ' ': case '\t': break; case '[': if (newline) return (c == ungetc (c, fp)); break; default: newline = FALSE; break; } } return TRUE; } static gboolean global_section (FILE * fp, tv_rf_channel * rf_ch) { char buffer[300]; char *ident; char *value; gchar *freqtab; gboolean r; freqtab = NULL; r = FALSE; while (get_value (fp, buffer, &ident, &value)) { if (0 == value[0]) continue; /* mixer = <device_file>:<line_number> */ /* fullscreen = <width> x <height> */ /* pixsize = <width> x <height> */ /* pixcols = <int> */ /* wm-off-by = <xoff> <yoff> */ /* ratio = <grabx> <graby> */ /* jpeg-quality = <int> */ /* mjpeg-quality = <int> */ /* keypad-ntsc = <bool (0|1|yes|no)> */ /* keypad-partial = <bool> */ /* keypad-osd = <bool> */ /* mov-driver = <string> */ /* mov-video = <string> */ /* mov-fps = <string> */ /* mov-audio = <string> */ /* mov-rate = <string> */ /* osd = <bool> */ /* osd-position = <x> , <y> */ /* use-wm-fullscreen = <bool> */ if (0 == strcmp (ident, "freqtab")) { g_free (freqtab); freqtab = g_strdup (value); } else { if (XAWTV_CONFIG_TEST) fprintf (stderr, "Unknown %s\n", ident); } } if (rf_ch && freqtab) r = tv_rf_channel_table_by_name (rf_ch, freqtab); g_free (freqtab); return r; } static gboolean set_control (tveng_device_info * info, tveng_tuned_channel * ch, tv_control_id id, const gchar * value) { tv_control *c; gdouble d; d = strtod (value, NULL) / 100.0; d = SATURATE (d, 0.0, 1.0); c = tv_control_by_id (info, id); if (!c) return TRUE; /* not supported by device */ return tveng_tuned_channel_set_control (ch, c->label, d); } static gboolean channel_section (FILE * fp, tveng_device_info * info, tv_rf_channel * rf_ch, tveng_tuned_channel * tt_ch, gboolean * have_channel) { char buffer[300]; char *ident; char *value; gint fine_tuning; tt_ch->frequ = 0; /* Hz */ fine_tuning = 0; /* Hz */ *have_channel = FALSE; while (get_value (fp, buffer, &ident, &value)) { if (0 == value[0]) continue; /* capture = on | off | overlay | grabdisplay */ /* audio = <int> */ /* group = <string> -? */ if (0 == strcmp (ident, "input") || 0 == strcmp (ident, "source")) { const tv_video_line *l; for (l = NULL; (l = tv_next_video_input (info, l));) if (0 == g_ascii_strcasecmp (l->label, value)) break; if (l) { tt_ch->input = l->hash; if (TV_VIDEO_LINE_TYPE_BASEBAND == l->type) *have_channel = TRUE; } } else if (0 == strcmp (ident, "norm")) { const tv_video_standard *s; for (s = NULL; (s = tv_next_video_standard (info, s));) if (0 == g_ascii_strcasecmp (s->label, value)) break; if (s) tt_ch->standard = s->hash; } else if (0 == strcmp (ident, "channel")) { if (tv_rf_channel_by_name (rf_ch, value)) { if (0 == tt_ch->frequ) tt_ch->frequ = rf_ch->frequency; *have_channel = TRUE; } } else if (0 == strcmp (ident, "freq")) { double d; d = strtod (value, NULL); if (d > 100 && d < 1000) { guint frequ; frequ = (guint)(d * 1e6); /* -> Hz */ tt_ch->frequ = frequ; if (!*have_channel) if (!tv_rf_channel_by_frequency (rf_ch, frequ)) tv_rf_channel_first (rf_ch); *have_channel = TRUE; } } /* FIXME "freq" ? */ else if (0 == strcmp (ident, "freq")) { fine_tuning = strtol (value, NULL, 0); if (fine_tuning < -128 || fine_tuning > 127) fine_tuning = 0; else fine_tuning *= 62500; /* -> Hz */ } else if (0 == strcmp (ident, "key")) { /* XXX Xt application resource translation, like "qual<Key>key: command" (try apropos resource), stored here as "key" or "qual+key". How can we properly translate? */ } /* color = n % */ else if (0 == strcmp (ident, "color")) { set_control (info, tt_ch, TV_CONTROL_ID_SATURATION, value); } else if (0 == strcmp (ident, "bright")) { set_control (info, tt_ch, TV_CONTROL_ID_BRIGHTNESS, value); } else if (0 == strcmp (ident, "hue")) { set_control (info, tt_ch, TV_CONTROL_ID_HUE, value); } else if (0 == strcmp (ident, "contrast")) { set_control (info, tt_ch, TV_CONTROL_ID_CONTRAST, value); } else { if (XAWTV_CONFIG_TEST) fprintf (stderr, "Unknown %s\n", ident); } } tt_ch->frequ += fine_tuning; return TRUE; } static gboolean section (FILE * fp, const tveng_device_info *info, tveng_tuned_channel ** channel_list, guint * pass, tv_rf_channel * rf_channel, tveng_tuned_channel * default_channel, const gchar * identifier) { if (XAWTV_CONFIG_TEST) fprintf (stderr, "Section <%s>\n", identifier); if (0 == strcmp (identifier, "global")) { if (0 == *pass) { *pass = 1; /* rf_channel = frequency table */ if (!global_section (fp, rf_channel)) return FALSE; } else { skip_section (fp); } } else if (0 == strcmp (identifier, "launch")) { /* Key bindings */ skip_section (fp); } else if (0 == strcmp (identifier, "defaults")) { /* Default channel attributes */ if (1 == *pass) { gboolean dummy; *pass = 2; if (!channel_section (fp, info, rf_channel, default_channel, &dummy)) return FALSE; } else { skip_section (fp); } } else /* channel */ { gchar *t; if (!(t = g_locale_to_utf8 (identifier, -1, NULL, NULL, NULL))) return FALSE; if (2 == *pass) { tveng_tuned_channel channel; tveng_tuned_channel *ch; gboolean have_channel; channel = *default_channel; channel.controls = g_memdup (default_channel->controls, default_channel->num_controls * sizeof (*default_channel->controls)); if (!channel_section (fp, info, rf_channel, &channel, &have_channel) || !have_channel) { g_free (channel.controls); g_free (t); return FALSE; } channel.name = (gchar *) t; channel.rf_table = (gchar *) rf_channel->table_name; channel.rf_name = rf_channel->channel_name; if ((ch = tveng_tuned_channel_by_name (*channel_list, t))) { tveng_tuned_channel_copy (ch, &channel); } else { ch = tveng_tuned_channel_new (&channel); tveng_tuned_channel_insert (channel_list, ch, G_MAXINT); } g_free (channel.controls); } else { skip_section (fp); } g_free (t); } return TRUE; } gboolean xawtv_config_present (void) { gchar *filename; int fd; filename = g_strconcat (g_get_home_dir (), "/.xawtv", NULL); fd = open (filename, O_RDONLY); g_free (filename); if (-1 != fd) close (fd); return (-1 != fd); } gboolean xawtv_import_config (const tveng_device_info *info, tveng_tuned_channel ** channel_list) { guint pass; FILE *fp; tv_rf_channel rf_channel; tveng_tuned_channel default_channel; fp = NULL; CLEAR (default_channel); /* Usually the file will contain the information we need in proper order. If not we run a second and third pass. */ for (pass = 0; pass < 3; ++pass) { gchar *filename; int c; filename = g_strconcat (g_get_home_dir (), "/.xawtv", NULL); if (!(fp = fopen (filename, "r"))) { g_free (filename); return FALSE; /* XXX error message please */ } g_free (filename); while (EOF != (c = fgetc (fp))) { if (ferror (fp)) goto failure; switch (c) { char buffer[300]; unsigned int len; case ' ': case '\t': case '\n': continue; case '#': case '[': fgets (buffer, sizeof (buffer), fp); if (ferror (fp)) goto failure; if ('#' == c) continue; len = strlen (buffer); while (len > 0 && buffer[len - 1] <= ' ') --len; if (len < 2 || ']' != buffer[--len]) goto failure; buffer[len] = 0; if (!section (fp, info, channel_list, &pass, &rf_channel, &default_channel, buffer)) goto failure; break; } } } return TRUE; failure: if (fp) fclose (fp); return FALSE; } /* XawTV IPC */ #ifndef XAWTV_IPC_DEBUG #define XAWTV_IPC_DEBUG 0 #endif static GdkAtom _GA_XAWTV_STATION; static GdkAtom _GA_XAWTV_REMOTE; static GdkAtom _GA_ZAPPING_REMOTE; static GdkAtom _GA_STRING; static gboolean xawtv_command_setstation (int argc, char ** argv) { unsigned int nr; char *end; tveng_tuned_channel *ch; ch = NULL; if (1 == argc) return FALSE; if (0 == strcmp (argv[1], "next")) { python_command (NULL, "zapping.channel_up()"); return TRUE; } if (0 == strcmp (argv[1], "prev")) { python_command (NULL, "zapping.channel_down()"); return TRUE; } if (0 == strcmp (argv[1], "back")) { /* TODO */ return FALSE; } nr = strtoul (argv[1], &end, 0); if (0 == *end) { tveng_tuned_channel *ch; if (!(ch = tveng_tuned_channel_nth (global_channel_list, nr))) { fprintf (stderr, "Invalid channel number %u\n", nr); return FALSE; } } else { gchar *t; if (!(t = g_locale_to_utf8 (argv[1], -1, NULL, NULL, NULL))) return FALSE; if (!(ch = tveng_tuned_channel_by_name (global_channel_list, t))) { g_free (t); fprintf (stderr, "Cannot find channel '%s'\n", argv[1]); return FALSE; } g_free (t); } z_switch_channel (ch, zapping->info); return TRUE; } static gboolean xawtv_command_vtx (int argc, char ** argv) { GString *s; gboolean in_span; int i; if (1 == argc) { osd_clear (); return TRUE; } s = g_string_new (NULL); in_span = FALSE; for (i = 1; i < argc; ++i) { gchar *t; unsigned int j0; unsigned int j; if (!(t = g_locale_to_utf8 (argv[i], -1, NULL, NULL, NULL))) { g_string_free (s, /* cstring too */ TRUE); return FALSE; } j0 = 0; for (j = 0; t[j]; ++j) { if ('\033' == t[j]) { gint col[2]; g_string_append_len (s, t + j0, (gint)(j - j0)); col[0] = -1; col[1] = -1; if ('[' == t[j + 1]) { /* ANSI sequence. */ for (j += 2; t[j];) { switch (t[j]) { case '3': /* foreground */ case '4': /* background */ if (t[j + 1] >= '0' && t[j + 1] <= '7') { col[t[j] & 2] = t[j + 1] & 7; j += 2; } break; case '1': case ';': ++j; break; case 'm': ++j; default: goto done; } } } else { /* Color ESC */ if (t[j + 1] >= '0' && t[j + 1] <= '7' && t[j + 2] >= '0' && t[j + 2] <= '7') { col[1] = t[j + 1] & 7; col[0] = t[j + 2] & 7; j += 3; } else { ++j; } } done: j0 = j; if (col[0] >= 0 && col[1] >= 0) { static const gchar *colors[8] = { "000000", "FF0000", "00FF00", "FFFF00", "0000FF", "FF00FF", "00FFFF", "FFFFFF", }; g_string_append_printf (s, "%s<span foreground=\"#%s\" background=\"#%s\">", in_span ? "</span>" : "", colors[col[1]], colors[col[0]]); in_span = TRUE; } } } g_string_append_len (s, t + j0, (gint)(j - j0)); if (in_span) g_string_append (s, "</span>"); g_free (t); /* XXX presently we can render only one row */ break; } osd_render_markup (NULL, OSD_TYPE_SCREEN, s->str); g_string_free (s, /* cstring too */ TRUE); return TRUE; } static gboolean xawtv_command (int argc, char ** argv) { if (XAWTV_IPC_DEBUG) { int i; fprintf (stderr, "xawtv_command: "); for (i = 0; i < argc; ++i) fprintf (stderr, "<%s> ", argv[i]); fputc ('\n', stderr); } if (0 == argc) return TRUE; /* From xawtv-remote man page: setstation [ <name> | <nr> | next | prev | back ] Set the TV station. This selects on of the TV sta- tions which are configured in the .xawtv config file. The argument can be the station name or a number (the first one listed in the config file is 0, ...). next/prev jumps to the next/previous sta- tion in the list, back to the previously selected one. setchannel [ <name> | next | prev ] Tune in some channel. setfreqtab <table> Set the frequency table. See the menu in xawtv for a list of valid choices. setnorm <norm> Set the TV norm (NTSC/PAL/SECAM). setinput [ <input> | next ] Set the video input (Television/Composite1/...) capture [ on | off | overlay | grabdisplay ] Set capture mode. volume mute on | off mute / unmute audio. volume <arg> color <arg> hue <arg> bright <arg> contrast <arg> Set the parameter to the specified value. <arg> can be one of the following: A percent value ("70%" for example). Some absolute value ("32768"), the valid range is hardware specific. Relative values can be specified too by prefixing with "+=" or "-=" ("+=10%" or "-=2000"). The keywords "inc" and "dec" are accepted to and will increase and decrease the given value in small steps. setattr <name> <value> Set the value of some attribute (color, con- trast, ... can be set this way too). show [ <name> ] Show the value current of some attribute. list List all available attributes with all properties (default value, range, ...) snap [ jpeg | ppm ] [ full | win | widthxheight ] <file- name> Capture one image. webcam <filename> Capture one image. Does basically the same as "snap jpeg win <filename>". Works also while avi recording is active. It writes to a temporary file and renames it when done, so there is never a invalid file. movie driver [ files | raw | avi | qt ] movie video [ ppm | pgm | jpeg | rgb | gray | 422 | 422p | rgb15 | rgb24 | mjpeg | jpeg | raw | mjpa | png ] movie fps <frames per second> movie audio [ mono8 | mono16 | stereo ] movie rate <sample rate> movie fvideo <filename> movie faudio <filename> movie start movie stop control xawtv's movie recorder. fullscreen Toggle fullscreen mode. showtime Display time (same what the 'D' key does in xawtv). quit quit xawtv keypad n enter digit 'n'. That's the two-digit channel selection, entering two digits within 5 seconds switches to the selected station. Useful for lirc. vdr command send "command" to vdr (via connect on local- host:2001). */ if (0 == strcmp (argv[0], "message") || 0 == strcmp (argv[0], "msg")) { gchar *t; if (argc < 2) return FALSE; if (!(t = g_locale_to_utf8 (argv[1], -1, NULL, NULL, NULL))) return FALSE; gtk_window_set_title (GTK_WINDOW (zapping), t); g_free (t); return TRUE; } if (0 == strcmp (argv[0], "quit")) { python_command (NULL, "zapping.quit()"); return TRUE; } if (0 == strcmp (argv[0], "setstation")) return xawtv_command_setstation (argc, argv); if (0 == strcmp (argv[0], "vtx")) return xawtv_command_vtx (argc, argv); fprintf (stderr, "Command '%s' not implemented\n", argv[0]); return FALSE; } static GString * property_get_string (GdkWindow * window, GdkAtom atom) { /* GdkDisplay *display; */ Atom xatom; Atom actual_type; int actual_format; unsigned long nitems; unsigned long bytes_after; unsigned char *prop; GString *s; /* 2.6 stuff */ /* display = gdk_drawable_get_display (GDK_DRAWABLE (window));*/ /* xatom = gdk_x11_atom_to_xatom_for_display (display, atom);*/ xatom = gdk_x11_atom_to_xatom (atom); /* GDK 2.6 gdk_property_get() documentation advises use of XGetWindowProperty() because function is fubar. */ if (!XGetWindowProperty (GDK_WINDOW_XDISPLAY (window), GDK_WINDOW_XWINDOW (window), xatom, /* long_offset */ 0 / sizeof (long), /* long_length */ 65536 / sizeof (long), /* delete */ True, /* req_type */ XA_STRING, &actual_type, &actual_format, &nitems, &bytes_after, &prop)) return NULL; if (0 == nitems) return NULL; s = g_string_new (NULL); g_string_append_len (s, (gchar *) prop, (gint) nitems); /* Make sure we have a cstring. */ g_string_append_len (s, "", 1); XFree (prop); return s; } static gboolean on_event (GtkWidget * widget, GdkEvent * event, gpointer user_data _unused_) { if (GDK_PROPERTY_NOTIFY == event->type) { if (_GA_XAWTV_REMOTE == event->property.atom) { GString *s; gsize i; int argc; char *argv[32]; if (!(s = property_get_string (event->property.window, _GA_XAWTV_REMOTE))) return TRUE; argc = 0; /* Format: "command\0par\0par\0\0command\0..." */ for (i = 0; i <= s->len; i += strlen (&s->str[i]) + 1) { if (argc >= (gint) G_N_ELEMENTS (argv) - 1) break; /* die graceful */ if (i == s->len || 0 == s->str[i]) { argv[argc] = NULL; if (!xawtv_command (argc, argv)) break; argc = 0; } else { argv[argc++] = &s->str[i]; } } g_string_free (s, /* cstring too */ TRUE); return TRUE; /* handled */ } else if (_GA_ZAPPING_REMOTE == event->property.atom) { GString *s; if (!(s = property_get_string (event->property.window, _GA_ZAPPING_REMOTE))) return TRUE; python_command (widget, s->str); g_string_free (s, /* cstring too */ TRUE); return TRUE; /* handled */ } } return FALSE; /* pass on */ } static gchar * to_locale (const gchar * s) { if (NULL == s) return NULL; return g_locale_from_utf8 (s, -1, NULL, NULL, NULL); } gboolean xawtv_ipc_set_station (GtkWidget * window, tveng_tuned_channel * ch) { gchar *name; gchar *rf_name; gboolean r; r = FALSE; name = to_locale (ch->name); rf_name = to_locale (ch->rf_name); if (name && rf_name) { GString *s; /* Format: "freq\0channel_name\0network_name\0". RF %.3f MHz, channel name "21", "E2", "?", network name "foobar", "?", presumably locale encoding. */ s = g_string_new (NULL); g_string_printf (s, "%.3f%c%s%c%s", ch->frequ / 1e6, 0, ch->rf_name ? rf_name : "?", 0, ch->name ? name : "?"); gdk_property_change (window->window, _GA_XAWTV_STATION, _GA_STRING, /* bits */ 8, GDK_PROP_MODE_REPLACE, s->str, (gint) s->len + 1); g_string_free (s, /* cstring too */ TRUE); r = TRUE; } g_free (rf_name); g_free (name); return r; } gboolean xawtv_ipc_init (GtkWidget * window) { const gchar station[] = "0.000\0?\0?"; GdkEventMask mask; _GA_XAWTV_STATION = gdk_atom_intern ("_XAWTV_STATION", /* dont create */ FALSE); _GA_XAWTV_REMOTE = gdk_atom_intern ("_XAWTV_REMOTE", FALSE); _GA_ZAPPING_REMOTE = gdk_atom_intern ("_ZAPPING_REMOTE", FALSE); _GA_STRING = gdk_atom_intern ("STRING", FALSE); /* _XAWTV_STATION identifies us as XawTV clone which understands _XAWTV_REMOTE commands. Make sure the lights are on. */ gdk_property_change (window->window, _GA_XAWTV_STATION, _GA_STRING, /* bits */ 8, GDK_PROP_MODE_REPLACE, station, sizeof (station)); g_signal_connect (G_OBJECT (window), "event", G_CALLBACK (on_event), /* user_data */ NULL); mask = gdk_window_get_events (window->window); mask |= GDK_PROPERTY_CHANGE_MASK; gdk_window_set_events (window->window, mask); return TRUE; } ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������zapping-0.10cvs6/src/xawtv.h������������������������������������������������������������������������ 644 � 764 � 144 � 2334 10167772045 11131� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Zapping (TV viewer for the Gnome Desktop) * Copyright (C) 2003 Michael H. Schimek * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* $Id: xawtv.h,v 1.4 2005/01/08 14:54:29 mschimek Exp $ */ #ifndef XAWTV_H #define XAWTV_H #include "frequencies.h" extern gboolean xawtv_config_present (void); extern gboolean xawtv_import_config (const tveng_device_info *info, tveng_tuned_channel ** channel_list); extern gboolean xawtv_ipc_set_station (GtkWidget * window, tveng_tuned_channel * ch); extern gboolean xawtv_ipc_init (GtkWidget * window); #endif /* XAWTV_H */ ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������zapping-0.10cvs6/src/plugins.c���������������������������������������������������������������������� 644 � 764 � 144 � 46706 10231630156 11453� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Zapping (TV viewer for the Gnome Desktop) * Copyright (C) 2000-2001 Iaki Garca Etxebarria * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #define ZCONF_DOMAIN "/zapping/plugins/" #include "zconf.h" #include "plugins.h" #include "properties.h" #include "globals.h" /* This is the main plugin list, it is only used in plugin_bridge */ extern GList * plugin_list; /* This shouldn't be public */ static void plugin_foreach_free(struct plugin_info * info, void * user_data); /* Loads a plugin, returns TRUE if the plugin seems usable and FALSE in case of error. Shows an error box describing the error in case of error and the given structure is filled in on success. file_name: name of the plugin to load "/lib/plugin.so", "libm.so", z.b. info: Structure that holds all the info about the plugin, and will be passed to the rest of functions in this library. */ static gboolean plugin_load(gchar * file_name, struct plugin_info * info) { /* This variables are for querying the symbols */ gint i = 0; gchar *symbol, *type, *description; gpointer ptr; gint hash; /* This is used to get the canonical name */ gchar * canonical_name; gchar * version; gint (*plugin_get_protocol)(void) = NULL; g_assert(info != NULL); g_assert(file_name != NULL); CLEAR (*info); info -> handle = g_module_open (file_name, 0); if (!info -> handle) { g_warning("Failed to load plugin: %s", g_module_error()); return FALSE; } /* Check that the protocols we speak are the same */ if (!g_module_symbol(info -> handle, "plugin_get_protocol", (gpointer*)&(plugin_get_protocol))) { g_module_close(info->handle); return FALSE; } if (((*plugin_get_protocol)()) != PLUGIN_PROTOCOL) { g_warning("While loading %s\n" "The plugin uses the protocol %x, and the current" " one is %x, it cannot be loaded.", file_name, (*plugin_get_protocol)(), PLUGIN_PROTOCOL); g_module_close(info->handle); return FALSE; } /* Get the other symbol */ if (!g_module_symbol (info->handle, "plugin_get_symbol", (gpointer *) &info->get_symbol)) { g_warning("%s", g_module_error()); g_module_close(info->handle); return FALSE; } /* plugin_get_info is the only compulsory symbol that must be present in the plugin's table of symbols */ if (!info->get_symbol("plugin_get_info", 0x1234, (gpointer*)&(info->plugin_get_info))) { g_warning("plugin_get_info was not found in %s", file_name); g_module_close(info->handle); return FALSE; } /* Get the remaining symbols */ if (!info->get_symbol("plugin_init", 0x1234, (gpointer*)&(info->plugin_init))) info->plugin_init = NULL; if (!info->get_symbol("plugin_close", 0x1234, (gpointer*)&(info->plugin_close))) info->plugin_close = NULL; if (!info->get_symbol("plugin_start", 0x1234, (gpointer*)&(info->plugin_start))) info->plugin_start = NULL; if (!info->get_symbol("plugin_stop", 0x1234, (gpointer*)&(info->plugin_stop))) info->plugin_stop = NULL; if (!info->get_symbol("plugin_load_config", 0x1234, (gpointer*)&(info->plugin_load_config))) info->plugin_load_config = NULL; if (!info->get_symbol("plugin_save_config", 0x1234, (gpointer*)&(info->plugin_save_config))) info->plugin_save_config = NULL; if (!info->get_symbol("plugin_running", 0x1234, (gpointer*)&(info->plugin_running))) info->plugin_running = NULL; if (!info->get_symbol("plugin_read_frame", 0x1234, (gpointer*)&(info->plugin_read_frame))) info->plugin_read_frame = NULL; if (!info->get_symbol("plugin_capture_start", 0x1234, (gpointer*)&(info->plugin_capture_start))) info->plugin_capture_start = NULL; if (!info->get_symbol("plugin_capture_stop", 0x1234, (gpointer*)&(info->plugin_capture_stop))) info->plugin_capture_stop = NULL; if (!info->get_symbol("plugin_get_public_info", 0x1234, (gpointer*)&(info->plugin_get_public_info))) info->plugin_get_public_info = NULL; if (!info->get_symbol("plugin_add_gui", 0x1234, (gpointer*)&(info->plugin_add_gui))) info->plugin_add_gui = NULL; if (!info->get_symbol("plugin_remove_gui", 0x1234, (gpointer*)&(info->plugin_remove_gui))) info->plugin_remove_gui = NULL; /* Check that the two functions are present */ if ((!info->plugin_add_gui) || (!info->plugin_remove_gui)) info -> plugin_add_gui = info -> plugin_remove_gui = NULL; if (!info->get_symbol("plugin_process_popup_menu", 0x1234, (gpointer*)&(info->plugin_process_popup_menu))) info->plugin_process_popup_menu = NULL; if (!info->get_symbol("plugin_get_misc_info", 0x1234, (gpointer*)&(info->plugin_get_misc_info))) info->plugin_get_misc_info = NULL; CLEAR (info->misc_info); if (info -> plugin_get_misc_info) memcpy(&(info->misc_info), (*info->plugin_get_misc_info)(), ((*info->plugin_get_misc_info)())->size); plugin_get_info(&canonical_name, NULL, NULL, NULL, NULL, NULL, info); if ((!canonical_name) || (strlen(canonical_name) == 0)) { g_module_close(info->handle); g_warning("\"%s\" seems to be a valid plugin, but it doesn't " "provide a canonical name.", file_name); return FALSE; } /* Get the version of the plugin */ version = plugin_get_version(info); if (!version) { g_module_close(info->handle); g_warning(_("\"%s\" doesn't provide a version"), file_name); return FALSE; } info -> major = info->minor = info->micro = 0; if (sscanf(version, "%d.%d.%d", &(info->major), &(info->minor), &(info->micro)) == 0) { g_warning( "Sorry, the version of the plugin cannot be parsed.\n" "The version must be something like %%d[.%%d[%%d[other things]]]\n" "The given version is %s.\nError loading \"%s\" (%s)", version, file_name, canonical_name); g_module_close(info -> handle); return FALSE; } info -> canonical_name = g_strdup(canonical_name); info -> file_name = g_strdup(file_name); /* Get the exported symbols for the plugin */ info -> exported_symbols = NULL; info -> num_exported_symbols = 0; if (info->plugin_get_public_info) while ((*info->plugin_get_public_info)(i, &ptr, &symbol, &description, &type, &hash)) { if ((!symbol) || (!type) || (!ptr) || (hash == -1)) { i++; continue; } info->exported_symbols = (struct plugin_exported_symbol*) realloc(info->exported_symbols, sizeof(struct plugin_exported_symbol)*(i+1)); if (!info->exported_symbols) g_error(_("Insufficient memory")); info->exported_symbols[i].symbol = g_strdup(symbol); info->exported_symbols[i].type = g_strdup(type); if (description) info->exported_symbols[i].description = g_strdup(description); else info->exported_symbols[i].description = g_strdup(_("No description available")); info->exported_symbols[i].ptr = ptr; info->exported_symbols[i].hash = hash; info->num_exported_symbols++; i++; } return TRUE; } void plugin_unload(struct plugin_info * info) { g_assert(info != NULL); /* Tell the plugin to close itself */ plugin_close( info ); /* Free the memory of the exported symbols */ if (info -> num_exported_symbols > 0) { g_free(info -> exported_symbols); info -> exported_symbols = NULL; } g_free(info -> file_name); g_free(info -> canonical_name); g_module_close (info -> handle); } struct plugin_info * plugin_by_name (const gchar * name) { GList *glist; g_return_val_if_fail (NULL != name, NULL); for (glist = g_list_first (plugin_list); glist; glist = glist->next) { struct plugin_info *info; info = (struct plugin_info *) glist->data; if (0 == strcmp (info->canonical_name, name)) return info; } return NULL; } gpointer plugin_symbol (const struct plugin_info *info, const gchar * name) { gpointer ptr; g_return_val_if_fail (NULL != info, NULL); g_return_val_if_fail (NULL != name, NULL); if (!info->get_symbol (name, 0x1234, &ptr)) return NULL; return ptr; } /* FIXME: This is ancient, remote.h is much nicer */ /* This is the bridge given to the plugins. */ static gboolean plugin_bridge (gpointer * ptr, gchar * plugin, gchar * symbol, gchar * type, gint hash) { gint i; GList * list = g_list_first(plugin_list); /* From main.c */ struct plugin_info * info; struct plugin_exported_symbol * es = NULL; /* A pointer to the table of exported symbols */ gint num_exported_symbols=0; /* Number of exported symbols in the plugin */ if (!plugin) { if (ptr) *ptr = GINT_TO_POINTER(0x2); return FALSE; /* Zapping exports no symbols */ } else /* We have to query the list of plugins */ while (list) { info = (struct plugin_info*) list->data; if (!strcasecmp(info->canonical_name, plugin)) { es = info->exported_symbols; num_exported_symbols = info->num_exported_symbols; break; } list = list->next; } if (!es) { if (ptr) *ptr = GINT_TO_POINTER(0x1); /* Plugin not found */ return FALSE; } /* Now try to find the given symbol in the table of exported symbols of the plugin */ for (i=0; i<num_exported_symbols; i++) if (!strcmp(es[i].symbol, symbol)) { if (es[i].hash != hash) { if (ptr) *ptr = GINT_TO_POINTER(0x3); /* Warn */ g_warning(_("Check error: \"%s\" in plugin %s" " was supposed to be \"%s\" but it is:" "\"%s\". Hashes are 0x%x vs. 0x%x"), symbol, plugin ? plugin : "Zapping", type, es[i].type, hash, es[i].hash); return FALSE; } if (ptr) *ptr = es[i].ptr; return TRUE; /* Success */ } if (ptr) *ptr = GINT_TO_POINTER(0x2); /* Symbol not found in the plugin */ return FALSE; } /* This are wrappers to avoid the use of the pointers in the plugin_info struct just in case somewhen the plugin system changes */ gint plugin_protocol(struct plugin_info * info) { g_assert(info != NULL); return PLUGIN_PROTOCOL; } gboolean plugin_init ( tveng_device_info * device_info, struct plugin_info * info ) { g_assert(info != NULL); printv("Initialize plugin %s %d.%d.%d\n", info->file_name, info->major, info->minor, info->micro); if (!info->plugin_init) return TRUE; return (((*info->plugin_init)((PluginBridge)plugin_bridge, device_info))); } void plugin_close(struct plugin_info * info) { g_assert(info != NULL); if (!info->plugin_close) return; ((*info->plugin_close))(); } gboolean plugin_start (struct plugin_info * info) { g_assert(info != NULL); if (!info->plugin_start) return TRUE; return ((*info->plugin_start))(); } void plugin_stop (struct plugin_info * info) { g_assert(info != NULL); if (!info->plugin_stop) return; ((*info->plugin_stop))(); } void plugin_load_config(struct plugin_info * info) { gchar * key = NULL; gchar * buffer = NULL; g_assert(info != NULL); if (!info->plugin_load_config) return; plugin_get_info (&buffer, NULL, NULL, NULL, NULL, NULL, info); key = g_strconcat("/zapping/plugins/", buffer, "/", NULL); ((*info->plugin_load_config))(key); g_free ( key ); } void plugin_save_config(struct plugin_info * info) { gchar * key = NULL; gchar * buffer = NULL; g_assert(info != NULL); if (!info->plugin_save_config) return; plugin_get_info (&buffer, NULL, NULL, NULL, NULL, NULL, info); key = g_strconcat("/zapping/plugins/", buffer, "/", NULL); ((*info->plugin_save_config))(key); g_free ( key ); } void plugin_get_info(gchar ** canonical_name, gchar ** descriptive_name, gchar ** description, gchar ** short_description, gchar ** author, gchar ** version, struct plugin_info * info) { g_assert(info != NULL); ((*info->plugin_get_info))(canonical_name, descriptive_name, description, short_description, author, version); } /* These functions are more convenient when accessing some individual fields of the plugin's info */ gchar * plugin_get_canonical_name (struct plugin_info * info) { g_assert(info != NULL); return (info -> canonical_name); } gchar * plugin_get_name (struct plugin_info * info) { gchar * buffer; g_assert(info != NULL); plugin_get_info(NULL, &buffer, NULL, NULL, NULL, NULL, info); return buffer; } gchar * plugin_get_description (struct plugin_info * info) { gchar * buffer; g_assert(info != NULL); plugin_get_info(NULL, NULL, &buffer, NULL, NULL, NULL, info); return buffer; } gchar * plugin_get_short_description (struct plugin_info * info) { gchar * buffer; g_assert(info != NULL); plugin_get_info(NULL, NULL, NULL, &buffer, NULL, NULL, info); return buffer; } gchar * plugin_get_author (struct plugin_info * info) { gchar * buffer; g_assert(info != NULL); plugin_get_info(NULL, NULL, NULL, NULL, &buffer, NULL, info); return buffer; } gchar * plugin_get_version (struct plugin_info * info) { gchar * buffer; g_assert(info != NULL); plugin_get_info(NULL, NULL, NULL, NULL, NULL, &buffer, info); return buffer; } gboolean plugin_running ( struct plugin_info * info) { g_assert(info != NULL); if (!info->plugin_running) return FALSE; /* If the plugin doesn't care, we shouldn't either */ return (*(info->plugin_running))(); } void plugin_read_frame (capture_frame * frame, struct plugin_info * info) { g_assert(info != NULL); g_return_if_fail(frame != NULL); if (info -> plugin_read_frame) (*info->plugin_read_frame)(frame); } void plugin_capture_start (struct plugin_info * info) { g_assert(info != NULL); if (info -> plugin_capture_start) (*info->plugin_capture_start)(); } void plugin_capture_stop (struct plugin_info * info) { g_assert(info != NULL); if (info -> plugin_capture_stop) (*info->plugin_capture_stop)(); } void plugin_add_gui (GnomeApp * app, struct plugin_info * info) { g_assert(info != NULL); g_assert(app != NULL); if (info -> plugin_add_gui) ((*info->plugin_add_gui)(app)); } void plugin_remove_gui (GnomeApp * app, struct plugin_info * info) { g_assert(info != NULL); g_assert(app != NULL); if (info -> plugin_remove_gui) return ((*info->plugin_remove_gui)(app)); } gint plugin_get_priority (struct plugin_info * info) { g_assert(info != NULL); return info -> misc_info.plugin_priority; } void plugin_process_popup_menu (GtkWidget *widget, GdkEventButton *event, GtkMenu *popup, struct plugin_info *info) { g_assert(info != NULL); if (info->plugin_process_popup_menu) (*info->plugin_process_popup_menu)(widget, event, popup); } /* Loads all the valid plugins in the given directory, and appends them to the given GList. It returns the new GList. The plugins should contain exp in their filename (usually called with exp = .zapping.so) */ static GList * plugin_load_plugins_in_dir( const gchar * directory, const gchar * exp, GList * old ) { struct plugin_info plug; GError *error = NULL; GDir *dir; const gchar *name; g_assert(exp != NULL); g_assert(directory != NULL); g_assert(strlen(directory) > 0); printv("looking for plugins in %s\n", directory); dir = g_dir_open (directory, /* flags */ 0, &error); if (!dir || error) { g_assert (!dir); if (error) { printv ("Cannot open directory '%s': %s\n", directory, error->message); g_error_free (error); error = NULL; } return old; } while ((name = g_dir_read_name (dir))) { gchar *filename; GList *p; struct plugin_info *new_plugin; if (0 != strcmp (name + strlen (name) - strlen (exp), exp)) continue; filename = g_build_filename (directory, name, NULL); printv("loading plugin %s\n", filename); if (!plugin_load(filename, &plug)) { plugin_load_error: g_free(filename); continue; } /* Check whether there is no other other plugin with the same canonical name */ for (p = g_list_first (old); p; p = p->next) { new_plugin = (struct plugin_info *) p->data; if (0 == g_ascii_strcasecmp (new_plugin->canonical_name, plug.canonical_name)) { /* Collision, load the highest version number */ if (new_plugin->major > plug.major) { goto plugin_load_error; } else if (new_plugin->major == plug.major) { if (new_plugin->minor > plug.minor) { goto plugin_load_error; } else if (new_plugin->minor == plug.minor) { if (new_plugin->micro >= plug.micro) goto plugin_load_error; } } /* Replace the old one with the new one, just delete the old one */ old = g_list_remove (old, new_plugin); plugin_unload (new_plugin); free (new_plugin); break; /* There is no need to continue querying */ } } g_free (filename); /* This plugin is valid, copy it and add it to the GList */ new_plugin = malloc (sizeof (*new_plugin)); if (!new_plugin) { perror("malloc"); plugin_unload(&plug); continue; } *new_plugin = plug; old = g_list_append(old, new_plugin); } g_dir_close (dir); return old; } /* This is the function used to sort the plugins by priority */ static gint plugin_sorter (struct plugin_info * a, struct plugin_info * b) { g_assert(a != NULL); g_assert(b != NULL); return (b->misc_info.plugin_priority - a->misc_info.plugin_priority); } /* Loads all the plugins in the system */ GList * plugin_load_plugins ( void ) { gchar * plugin_path; /* Path to the plugins */ const gchar *dir; gchar **plugin_dirs; GList * list = NULL; gint i; /* First load plugins in the home dir */ dir = g_get_home_dir(); if (dir) { g_assert(strlen(dir) > 0); if (dir[strlen(dir)-1] == '/') plugin_path = g_strconcat(dir, ".zapping/plugins", NULL); else plugin_path = g_strconcat(dir, "/.zapping/plugins", NULL); list = plugin_load_plugins_in_dir (plugin_path, PLUGIN_STRID, list); g_free( plugin_path ); } /* Load plugins in other directories */ zcc_char ("", "Colon separated list of dirs to be searched for plugins", "plugin_dirs"); plugin_dirs = g_strsplit(zcg_char (NULL, "plugin_dirs"), ":", 0); if (plugin_dirs) { for (i=0; plugin_dirs[i]; i++) list = plugin_load_plugins_in_dir (plugin_dirs[i], PLUGIN_STRID, list); g_strfreev (plugin_dirs); } /* $(prefix)/lib/zapping/plugins */ dir = PACKAGE_LIB_DIR "/plugins"; list = plugin_load_plugins_in_dir (dir, PLUGIN_STRID, list); list = g_list_sort (list, (GCompareFunc) plugin_sorter); return list; } /* This function is called from g_list_foreach */ static void plugin_foreach_free(struct plugin_info * info, void * user_data _unused_) { plugin_save_config(info); plugin_unload(info); free(info); } /* Unloads all the plugins loaded in the GList */ void plugin_unload_plugins(GList * list) { g_list_foreach ( list, (GFunc) plugin_foreach_free, NULL ); g_list_free ( list ); } ����������������������������������������������������������zapping-0.10cvs6/src/plugins.h���������������������������������������������������������������������� 644 � 764 � 144 � 14645 10173357425 11467� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Zapping (TV viewer for the Gnome Desktop) * Copyright (C) 2000 Iaki Garca Etxebarria * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifndef __PLUGINS_H__ #define __PLUGINS_H__ #ifdef HAVE_CONFIG_H # include "config.h" /* VERSION */ #endif /* Mainly for glib.h */ #include <gnome.h> /* for scanning directories */ #include <dirent.h> /* for dlopen() and friends */ #include <gmodule.h> /* Mainly for ShowBox definition */ #include "zmisc.h" /* For lookup_widget */ #include "interface.h" /* Configuration saving and restoring */ #include "zconf.h" /* For the tveng structures */ #include "tveng.h" /* Some definitions common to the plugins and Zapping */ #define ZAPPING_SRC /* Tell this header that we are Zapping */ #include "plugin_common.h" /* Any plugin should have its filename ending in this string */ #define PLUGIN_STRID ".zapping.so" /* This structure holds the info needed for identifying and using a plugin */ struct plugin_info{ GModule * handle; /* The handle to the plugin */ /* This returns the protocol the plugin understands */ gint (*plugin_protocol) (void); gboolean (*get_symbol)(const gchar *name, gint hash, gpointer *ptr); /******* OPTATIVE FUNCTIONS *******/ /* Init the plugin using the current video device, FALSE on error */ gboolean (*plugin_init)(PluginBridge bridge, tveng_device_info * info); /* Close the plugin */ void (*plugin_close) (void); /* The plugin should start to work when this is called */ gboolean (*plugin_start)( void ); /* Stop the plugin if it is running */ void (*plugin_stop) ( void ); /* Tells the plugin that it can now load its config */ void (*plugin_load_config) ( gchar * root_key ); /* Tells the plugin to save its config */ void (*plugin_save_config) ( gchar * root_key); /* Gets some info about the plugin */ void (*plugin_get_info) ( gchar ** canonical_name, gchar ** descriptive_name, gchar ** description, gchar ** short_description, gchar ** author, gchar ** version); /* Returns TRUE if the plugin is working */ gboolean (*plugin_running) ( void ); /* Read only processing of the frame (gtk+ thread) */ void (*plugin_read_frame) ( capture_frame * frame ); void (*plugin_capture_start) ( void ); /* If the plugin is capturing using the provided fifo, it must stop when this call returns */ void (*plugin_capture_stop) ( void ); /* Used to query the public symbols from the plugin */ gboolean (*plugin_get_public_info) ( gint index, gpointer * ptr, gchar ** symbol, gchar ** description, gchar ** type, gint * hash ); /* Add the plugin to the GUI */ void (*plugin_add_gui) ( GnomeApp * app ); /* Remove the plugin from the GUI */ void (*plugin_remove_gui) ( GnomeApp * app ); /* Get some misc info about the plugin */ struct plugin_misc_info * (*plugin_get_misc_info) ( void ); /* Add the plugin actions to the context menu */ void (*plugin_process_popup_menu) ( GtkWidget *widget, GdkEventButton *event, GtkMenu *popup ); /******* Variables *********/ struct plugin_misc_info misc_info; /* Info about the plugin */ gchar * file_name; /* The name of the file that holds the plugin */ gchar * canonical_name; /* The canonical name of the plugin */ gint major, minor, micro; /* Plugin version number, used only internally */ /* The symbols that the plugin shares with other plugins */ gint num_exported_symbols; struct plugin_exported_symbol * exported_symbols; }; /* Wrappers to avoid having to access the struct's fields directly */ /* This are wrappers to avoid the use of the pointers in the plugin_info struct just in case somewhen the plugin system changes */ gint plugin_protocol(struct plugin_info * info); gboolean plugin_init ( tveng_device_info * device_info, struct plugin_info * info ); void plugin_close(struct plugin_info * info); void plugin_unload(struct plugin_info * info); gboolean plugin_start (struct plugin_info * info); void plugin_stop (struct plugin_info * info); void plugin_load_config(struct plugin_info * info); void plugin_save_config(struct plugin_info * info); void plugin_get_info(gchar ** canonical_name, gchar ** descriptive_name, gchar ** description, gchar ** short_description, gchar ** author, gchar ** version, struct plugin_info * info); /* These functions are more convenient when accessing some individual fields of the plugin's info */ gchar * plugin_get_canonical_name (struct plugin_info * info); gchar * plugin_get_name (struct plugin_info * info); gchar * plugin_get_description (struct plugin_info * info); gchar * plugin_get_short_description (struct plugin_info * info); gchar * plugin_get_author (struct plugin_info * info); gchar * plugin_get_version (struct plugin_info * info); gboolean plugin_running ( struct plugin_info * info); void plugin_read_frame (capture_frame * frame, struct plugin_info * info); void plugin_capture_start ( struct plugin_info * info); void plugin_capture_stop ( struct plugin_info * info); void plugin_add_gui (GnomeApp * app, struct plugin_info * info); void plugin_remove_gui (GnomeApp * app, struct plugin_info * info); gint plugin_get_priority (struct plugin_info * info); void plugin_process_popup_menu (GtkWidget *widget, GdkEventButton *event, GtkMenu *popup, struct plugin_info *info); extern gboolean plugin_key_press(GdkEventKey *event); /* Loads the plugins, returning a GList. The data item of each element in the GList points to a plugin_info structure. */ GList * plugin_load_plugins ( void ); /* Unloads all the plugins loaded in the GList */ void plugin_unload_plugins(GList * list); extern struct plugin_info * plugin_by_name (const gchar * name); extern gpointer plugin_symbol (const struct plugin_info *info, const gchar * name); #endif �������������������������������������������������������������������������������������������zapping-0.10cvs6/src/zstack.c����������������������������������������������������������������������� 644 � 764 � 144 � 26336 10305456046 11274� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Zapping (TV viewer for the Gnome Desktop) * ZStack Container Widget * * Copyright (C) 2005 Michael H. Schimek * * Based on GtkFixed widget from: * GTK - The GIMP Toolkit * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald * * Modified by the GTK+ Team and others 1997-2000. See the AUTHORS * file for a list of people on the GTK+ Team. See the ChangeLog * files for a list of changes. These files are distributed with * GTK+ at ftp://ftp.gtk.org/pub/gtk/. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ #include "zstack.h" static GtkContainerClass * parent_class; void z_stack_set_has_window (ZStack * stack, gboolean has_window) { g_return_if_fail (Z_IS_STACK (stack)); g_return_if_fail (!GTK_WIDGET_REALIZED (stack)); if (!has_window != GTK_WIDGET_NO_WINDOW (stack)) { if (has_window) GTK_WIDGET_UNSET_FLAGS (stack, GTK_NO_WINDOW); else GTK_WIDGET_SET_FLAGS (stack, GTK_NO_WINDOW); } } static ZStackChild * get_child (ZStack * stack, GtkWidget * widget) { GList *children; for (children = stack->children; children; children = children->next) { ZStackChild *child = children->data; if (widget == child->widget) return child; } return NULL; } static ZStackChild * get_child_below (ZStack * stack, ZStackChild * above) { GList *children; ZStackChild *below; below = NULL; for (children = stack->children; children; children = children->next) { ZStackChild *child = children->data; if (child->z >= above->z) continue; if (below && child->z < below->z) continue; below = child; } return below; } static ZStackChild * get_child_above (ZStack * stack, ZStackChild * below) { GList *children; ZStackChild *above; above = NULL; for (children = stack->children; children; children = children->next) { ZStackChild *child = children->data; if (child->z <= below->z) continue; if (above && child->z > above->z) continue; above = child; } return above; } static void child_realize (GtkWidget * widget, gpointer user_data) { ZStack *stack = Z_STACK (user_data); ZStackChild *child; ZStackChild *below; child = get_child (stack, widget); g_assert (NULL != child); if ((below = get_child_below (stack, child))) { g_assert (child != below); if (!GTK_WIDGET_REALIZED (below->widget)) { gtk_widget_realize (below->widget); } g_assert (NULL != below->widget->window); gtk_widget_set_parent_window (widget, below->widget->window); } /* Now realize it. */ } static void child_unrealize (GtkWidget * widget, gpointer user_data) { ZStack *stack = Z_STACK (user_data); ZStackChild *child; ZStackChild *above; child = get_child (stack, widget); g_assert (NULL != child); if ((above = get_child_above (stack, child))) { ZStackChild *below; GdkWindow *parent_window; GdkWindow *child_window; g_assert (child != above); child_window = above->widget->window; if ((below = get_child_below (stack, child))) { g_assert (child != below); g_assert (above != below); parent_window = below->widget->window; } else { GtkWidget *stack_widget = GTK_WIDGET (stack); if (GTK_WIDGET_NO_WINDOW (stack_widget)) parent_window = gtk_widget_get_parent_window (stack_widget); else parent_window = stack_widget->window; } g_assert (NULL != parent_window); g_assert (NULL != child_window); gtk_widget_set_parent_window (above->widget, parent_window); gdk_window_reparent (child_window, parent_window, /* x */ 0, /* y */ 0); /* gdk_window_reparent() unmaps the child_window. */ gdk_window_show_unraised (child_window); } /* Now unrealize it. */ } void z_stack_put (ZStack * stack, GtkWidget * widget, gint z) { GList *children; ZStackChild *child; GObject *object; g_return_if_fail (Z_IS_STACK (stack)); g_return_if_fail (GTK_IS_WIDGET (widget)); for (children = stack->children; children; children = children->next) { ZStackChild *child = children->data; g_assert (z != child->z); } child = g_new (ZStackChild, 1); child->widget = widget; child->z = z; stack->children = g_list_append (stack->children, child); object = G_OBJECT (widget); g_signal_connect (object, "realize", G_CALLBACK (child_realize), stack); g_signal_connect (object, "unrealize", G_CALLBACK (child_unrealize), stack); /* Set stack as parent and realize the widget if stack is realized. */ gtk_widget_set_parent (widget, GTK_WIDGET (stack)); } /* ------------------------------------------------------------------------- */ static GType z_stack_child_type (GtkContainer * container) { container = container; return GTK_TYPE_WIDGET; } static void z_stack_forall (GtkContainer * container, gboolean include_internals, GtkCallback callback, gpointer callback_data) { ZStack *stack = Z_STACK (container); GList *children; include_internals = include_internals; g_return_if_fail (callback != NULL); children = stack->children; while (children) { ZStackChild *child; child = children->data; children = children->next; callback (child->widget, callback_data); } } static void z_stack_remove (GtkContainer * container, GtkWidget * widget) { ZStack *stack = Z_STACK (container); GList *children; children = stack->children; while (children) { ZStackChild *child; child = children->data; if (child->widget == widget) { gboolean was_visible = GTK_WIDGET_VISIBLE (widget); gtk_widget_unparent (widget); stack->children = g_list_remove_link (stack->children, children); g_list_free (children); g_free (child); if (was_visible && GTK_WIDGET_VISIBLE (container)) gtk_widget_queue_resize (GTK_WIDGET (container)); break; } children = children->next; } } static void z_stack_add (GtkContainer * container, GtkWidget * widget) { z_stack_put (Z_STACK (container), widget, 0); } static void z_stack_size_allocate (GtkWidget * widget, GtkAllocation * allocation) { ZStack *stack = Z_STACK (widget); GList *children; guint border_width; widget->allocation = *allocation; if (!GTK_WIDGET_NO_WINDOW (widget)) { if (GTK_WIDGET_REALIZED (widget)) gdk_window_move_resize (widget->window, allocation->x, allocation->y, allocation->width, allocation->height); } border_width = GTK_CONTAINER (stack)->border_width; children = stack->children; while (children) { ZStackChild *child; child = children->data; children = children->next; if (GTK_WIDGET_VISIBLE (child->widget)) { GtkAllocation child_allocation; child_allocation.x = border_width; child_allocation.y = border_width; if (GTK_WIDGET_NO_WINDOW (widget)) { child_allocation.x += widget->allocation.x; child_allocation.y += widget->allocation.y; } child_allocation.width = widget->allocation.width - border_width * 2; child_allocation.height = widget->allocation.height - border_width * 2; gtk_widget_size_allocate (child->widget, &child_allocation); } } } static void z_stack_size_request (GtkWidget * widget, GtkRequisition * requisition) { ZStack *stack = Z_STACK (widget); GList *children; guint border_width; requisition->width = 0; requisition->height = 0; children = stack->children; while (children) { ZStackChild *child; child = children->data; children = children->next; if (GTK_WIDGET_VISIBLE (child->widget)) { GtkRequisition child_requisition; gtk_widget_size_request (child->widget, &child_requisition); requisition->height = MAX (requisition->height, child_requisition.height); requisition->width = MAX (requisition->width, child_requisition.width); } } border_width = GTK_CONTAINER (stack)->border_width; requisition->height += border_width * 2; requisition->width += border_width * 2; } static void z_stack_realize (GtkWidget * widget) { GdkWindowAttr attributes; gint attributes_mask; if (GTK_WIDGET_NO_WINDOW (widget)) GTK_WIDGET_CLASS (parent_class)->realize (widget); else { GTK_WIDGET_SET_FLAGS (widget, GTK_REALIZED); attributes.window_type = GDK_WINDOW_CHILD; attributes.x = widget->allocation.x; attributes.y = widget->allocation.y; attributes.width = widget->allocation.width; attributes.height = widget->allocation.height; attributes.wclass = GDK_INPUT_OUTPUT; attributes.visual = gtk_widget_get_visual (widget); attributes.colormap = gtk_widget_get_colormap (widget); attributes.event_mask = gtk_widget_get_events (widget); attributes.event_mask |= GDK_EXPOSURE_MASK | GDK_BUTTON_PRESS_MASK; attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL | GDK_WA_COLORMAP; widget->window = gdk_window_new (gtk_widget_get_parent_window (widget), &attributes, attributes_mask); gdk_window_set_user_data (widget->window, widget); widget->style = gtk_style_attach (widget->style, widget->window); gtk_style_set_background (widget->style, widget->window, GTK_STATE_NORMAL); } } static void z_stack_init (ZStack * stack) { GTK_WIDGET_SET_FLAGS (stack, GTK_NO_WINDOW); stack->children = NULL; } GtkWidget * z_stack_new (void) { return g_object_new (Z_TYPE_STACK, NULL); } static void z_stack_class_init (ZStackClass * class) { GtkWidgetClass *widget_class = (GtkWidgetClass *) class; GtkContainerClass *container_class = (GtkContainerClass *) class; parent_class = g_type_class_peek_parent (class); widget_class->realize = z_stack_realize; widget_class->size_request = z_stack_size_request; widget_class->size_allocate = z_stack_size_allocate; container_class->add = z_stack_add; container_class->remove = z_stack_remove; container_class->forall = z_stack_forall; container_class->child_type = z_stack_child_type; } GType z_stack_get_type (void) { static GType stack_type = 0; if (!stack_type) { static const GTypeInfo stack_info = { .class_size = sizeof (ZStackClass), .class_init = (GClassInitFunc) z_stack_class_init, .instance_size = sizeof (ZStack), .instance_init = (GInstanceInitFunc) z_stack_init, }; stack_type = g_type_register_static (GTK_TYPE_CONTAINER, "ZStack", &stack_info, 0); } return stack_type; } ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������zapping-0.10cvs6/src/zstack.h����������������������������������������������������������������������� 644 � 764 � 144 � 5430 10305456046 11251� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Zapping (TV viewer for the Gnome Desktop) * ZStack Container Widget * * Copyright (C) 2005 Michael H. Schimek * * Based on GtkFixed widget from: * GTK - The GIMP Toolkit * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald * * Modified by the GTK+ Team and others 1997-2000. See the AUTHORS * file for a list of people on the GTK+ Team. See the ChangeLog * files for a list of changes. These files are distributed with * GTK+ at ftp://ftp.gtk.org/pub/gtk/. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ /* * GtkFixed - * Modified by the GTK+ Team and others 1997-2000. See the AUTHORS * file for a list of people on the GTK+ Team. See the ChangeLog * files for a list of changes. These files are distributed with * GTK+ at ftp://ftp.gtk.org/pub/gtk/. */ #ifndef __Z_STACK_H__ #define __Z_STACK_H__ #include <gtk/gtkcontainer.h> G_BEGIN_DECLS #define Z_TYPE_STACK (z_stack_get_type ()) #define Z_STACK(obj) \ (G_TYPE_CHECK_INSTANCE_CAST ((obj), Z_TYPE_STACK, ZStack)) #define Z_STACK_CLASS(klass) \ (G_TYPE_CHECK_CLASS_CAST ((klass), Z_TYPE_STACK, ZStackClass)) #define Z_IS_STACK(obj) \ (G_TYPE_CHECK_INSTANCE_TYPE ((obj), Z_TYPE_STACK)) #define Z_IS_STACK_CLASS(klass) \ (G_TYPE_CHECK_CLASS_TYPE ((klass), Z_TYPE_STACK)) #define Z_STACK_GET_CLASS(obj) \ (G_TYPE_INSTANCE_GET_CLASS ((obj), Z_TYPE_STACK, ZStackClass)) typedef struct _ZStack ZStack; typedef struct _ZStackClass ZStackClass; typedef struct _ZStackChild ZStackChild; struct _ZStack { GtkContainer container; GList *children; }; struct _ZStackClass { GtkContainerClass parent_class; }; struct _ZStackChild { GtkWidget *widget; gint x; gint y; gint z; }; extern GType z_stack_get_type (void) G_GNUC_CONST; extern GtkWidget * z_stack_new (void); extern void z_stack_put (ZStack * stack, GtkWidget * widget, gint z); extern void z_stack_set_has_window (ZStack * stack, gboolean has_window); #define ZSTACK_CANVAS -500 #define ZSTACK_VIDEO -400 #define ZSTACK_SUBTITLES -300 #define ZSTACK_OSD -200 #define ZSTACK_GUI -100 G_END_DECLS #endif /* __Z_STACK_H__ */ ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������zapping-0.10cvs6/src/yuv2rgb.c���������������������������������������������������������������������� 644 � 764 � 144 � 10306 10404546334 11363� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * yuv2rgb.c, Software YUV <-> RGB coverter */ #ifdef HAVE_CONFIG_H # include "config.h" #endif #include <stdlib.h> #include <stdio.h> #include <glib.h> #include "common/math.h" #include "csconvert.h" #include "yuv2rgb.h" #include "gen_conv.h" #include "zmisc.h" #include "libtv/cpu.h" #include "globals.h" #define MODE_RGB 0x1 #define MODE_BGR 0x2 /* Won't run on x86-64. */ #if defined (HAVE_X86) && defined (CAN_COMPILE_SSE) typedef void packed2planar_fn (uint8_t *py, uint8_t *pu, uint8_t *pv, const uint8_t *image, int h_size, int v_size, unsigned int y_stride, unsigned int uv_stride, unsigned int rgb_stride); typedef void packed2packed_fn (uint8_t *dst, const uint8_t *src, int h_size, int v_size, unsigned int dest_stride, unsigned int src_stride); static void * rgb_to_yuv420_function (tv_pixfmt pixfmt) { if (cpu_features & CPU_FEATURE_MMX) switch (pixfmt) { case TV_PIXFMT_RGBA16_LE: return mmx_rgb5551_yuv420; case TV_PIXFMT_BGRA16_LE: return mmx_bgr5551_yuv420; case TV_PIXFMT_RGB16_LE: return mmx_rgb565_yuv420; case TV_PIXFMT_BGR16_LE: return mmx_bgr565_yuv420; case TV_PIXFMT_RGB24_LE: return mmx_rgb24_yuv420; case TV_PIXFMT_BGR24_LE: return mmx_bgr24_yuv420; case TV_PIXFMT_RGBA32_LE: return mmx_rgb32_yuv420; case TV_PIXFMT_BGRA32_LE: return mmx_bgr32_yuv420; default: break; } return NULL; } static void * rgb_to_yuyv_function (tv_pixfmt pixfmt) { if (cpu_features & CPU_FEATURE_MMX) switch (pixfmt) { case TV_PIXFMT_RGBA16_LE: return mmx_rgb5551_yuyv; case TV_PIXFMT_BGRA16_LE: return mmx_bgr5551_yuyv; case TV_PIXFMT_RGB16_LE: return mmx_rgb565_yuyv; case TV_PIXFMT_BGR16_LE: return mmx_bgr565_yuyv; case TV_PIXFMT_RGB24_LE: return mmx_rgb24_yuyv; case TV_PIXFMT_BGR24_LE: return mmx_bgr24_yuyv; case TV_PIXFMT_RGBA32_LE: return mmx_rgb32_yuyv; case TV_PIXFMT_BGRA32_LE: return mmx_bgr32_yuyv; default: break; } return NULL; } static void packed2planar_proxy (void * dst_image, const tv_image_format *dst_format, const void * src_image, const tv_image_format *src_format, const void * user_data) { packed2planar_fn *f = user_data; f ((uint8_t *) dst_image + dst_format->offset[0], (uint8_t *) dst_image + dst_format->offset[1], (uint8_t *) dst_image + dst_format->offset[2], (const uint8_t *) src_image + src_format->offset[0], MIN (dst_format->width, src_format->width), MIN (dst_format->height, src_format->height), dst_format->bytes_per_line[0], dst_format->bytes_per_line[1], src_format->bytes_per_line[0]); } static void packed2packed_proxy (void * dst_image, const tv_image_format *dst_format, const void * src_image, const tv_image_format *src_format, const void * user_data) { packed2packed_fn *f = user_data; f ((uint8_t *) dst_image + dst_format->offset[0], (const uint8_t *) src_image + src_format->offset[0], MIN (dst_format->width, src_format->width), MIN (dst_format->height, src_format->height), dst_format->bytes_per_line[0], src_format->bytes_per_line[0]); } static void mmx_register_converters (void) { static tv_pixfmt pixfmts [] = { TV_PIXFMT_RGBA16_LE, TV_PIXFMT_BGRA16_LE, TV_PIXFMT_RGB16_LE, TV_PIXFMT_BGR16_LE, TV_PIXFMT_RGB24_LE, TV_PIXFMT_BGR24_LE, TV_PIXFMT_RGBA32_LE, TV_PIXFMT_BGRA32_LE, }; unsigned int i; void *p; for (i = 0; i < N_ELEMENTS (pixfmts); ++i) { if ((p = rgb_to_yuv420_function (pixfmts[i]))) { register_converter ("-yuv420", pixfmts[i], TV_PIXFMT_YUV420, packed2planar_proxy, p); register_converter ("-yvu420", pixfmts[i], TV_PIXFMT_YVU420, packed2planar_proxy, p); } if ((p = rgb_to_yuyv_function (pixfmts[i]))) register_converter ("-yuyv", pixfmts[i], TV_PIXFMT_YUYV, packed2packed_proxy, p); } } #else /* !(HAVE_X86 && CAN_COMPILE_SSE) */ static void mmx_register_converters (void) { } #endif /* !(HAVE_X86 && CAN_COMPILE_SSE) */ void startup_yuv2rgb (void) { mmx_register_converters (); } void shutdown_yuv2rgb (void) { } ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������zapping-0.10cvs6/src/yuv2rgb.h���������������������������������������������������������������������� 644 � 764 � 144 � 246 10404546325 11332� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * yuv2rgb.h, Software YUV <-> RGB coverter */ #ifndef __YUV2RGB_H__ #define __YUV2RGB_H__ void startup_yuv2rgb (void); void shutdown_yuv2rgb (void); #endif ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������zapping-0.10cvs6/src/plugin_properties.c������������������������������������������������������������ 644 � 764 � 144 � 27324 10173357425 13551� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* Zapping (TV viewer for the Gnome Desktop) * Copyright (C) 2000 Iaki Garca Etxebarria * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* This modules takes care of the plugins properties dialog */ #ifdef HAVE_CONFIG_H # include "config.h" #endif #include <gnome.h> #include "interface.h" #include "zmisc.h" #include "plugins.h" #include "globals.h" #include "remote.h" #include "plugin_properties.h" static GtkWidget * PluginProperties = NULL; /* Pointer to the plugin properties dialog */ enum { CANONICAL_NAME, INFO_STRUCT /* Not visible */ }; enum { SYMBOL, SYMBOL_HASH, SYMBOL_INFO /* Not visible */ }; static void z_put_cursor_on_first_row (GtkTreeView *view) { GtkTreePath *path = gtk_tree_path_new_from_string ("0"); gtk_tree_view_set_cursor (view, path, NULL, FALSE); gtk_tree_path_free (path); } static void on_plugin_treeview_cursor_changed (GtkTreeView *v, gpointer user_data _unused_) { GtkWidget * plugin_properties = lookup_widget(GTK_WIDGET(v), "plugin_properties"); GtkTreeView * symbol_treeview; GtkLabel * label67; /* Plugin name */ GtkLabel * label68; /* Plugin short description */ GtkLabel * label69; /* Plugin canonical name */ GtkLabel * label946; /* File location */ GtkLabel * label71; /* Author */ GtkLabel * label72; /* Plugin version */ GtkLabel * label73; /* Plugin priority */ GtkLabel * label945; /* Plugin description */ GtkLabel * label947; /* Symbol type and description */ GtkLabel * label76; /* "Symbols exported by the plugin" label */ GtkWidget * vbox13; /* The vbox where the exported symbols are */ GtkWidget * plugin_start_w; /* Start it button */ GtkWidget * plugin_stop_w; /* Stop it button */ gchar * buffer; struct plugin_info * info; gint i; gint priority; /* The priority of the plugin */ GtkTreeIter iter; GtkTreeModel *model = gtk_tree_view_get_model (v); GtkTreePath *path; gboolean running; gtk_tree_view_get_cursor (v, &path, NULL); gtk_tree_model_get_iter (model, &iter, path); gtk_tree_path_free (path); gtk_tree_model_get (model, &iter, INFO_STRUCT, &info, -1); g_assert (info != NULL); symbol_treeview = GTK_TREE_VIEW (lookup_widget (plugin_properties, "symbol_treeview")); label945 = GTK_LABEL (lookup_widget (plugin_properties, "label945")); label67 = GTK_LABEL (lookup_widget (plugin_properties, "label67")); label68 = GTK_LABEL (lookup_widget (plugin_properties, "label68")); label69 = GTK_LABEL (lookup_widget (plugin_properties, "label69")); label946 = GTK_LABEL (lookup_widget (plugin_properties, "label946")); label71 = GTK_LABEL (lookup_widget (plugin_properties, "label71")); label72 = GTK_LABEL (lookup_widget (plugin_properties, "label72")); label73 = GTK_LABEL (lookup_widget (plugin_properties, "label73")); label947 = GTK_LABEL (lookup_widget (plugin_properties, "label947")); label76 = GTK_LABEL (lookup_widget (plugin_properties, "label76")); plugin_start_w = lookup_widget (plugin_properties, "plugin_start"); plugin_stop_w = lookup_widget (plugin_properties, "plugin_stop"); vbox13 = lookup_widget (plugin_properties, "vbox13"); gtk_label_set_text(label67, plugin_get_name(info)); gtk_label_set_text(label68, plugin_get_short_description(info)); gtk_label_set_text(label69, plugin_get_canonical_name(info)); gtk_label_set_text(label71, plugin_get_author(info)); gtk_label_set_text(label72, plugin_get_version(info)); priority = plugin_get_priority(info); if (priority < -9) buffer = _("Very low"); else if (priority < -4) buffer = _("Low"); else if (priority < 0) buffer = _("Lower"); else if (priority == 0) buffer = _("Normal"); else if (priority > 9) buffer = _("Very high"); else if (priority > 4) buffer = _("High"); else buffer = _("Higher"); z_label_set_text_printf (label73, "%d (%s)", priority, buffer); gtk_label_set_text (label945, plugin_get_description (info)); gtk_label_set_text (label946, info->file_name); running = plugin_running (info); gtk_widget_set_sensitive (plugin_start_w, !running); gtk_widget_set_sensitive (plugin_stop_w, running); g_object_set_data (G_OBJECT (plugin_start_w), "plugin_info", info); g_object_set_data (G_OBJECT (plugin_stop_w), "plugin_info", info); /* Add the items to the public symbols list if neccesary */ model = gtk_tree_view_get_model (symbol_treeview); gtk_list_store_clear (GTK_LIST_STORE (model)); if (info->num_exported_symbols == 0) { gtk_widget_set_sensitive(vbox13, FALSE); gtk_label_set_text (label947, ""); gtk_label_set_text(label76, _("This plugin has no public symbols")); } else { for (i = 0; i<info->num_exported_symbols;i++) { buffer = g_strdup_printf("0x%X", info->exported_symbols[i].hash); gtk_list_store_append (GTK_LIST_STORE (model), &iter); gtk_list_store_set (GTK_LIST_STORE (model), &iter, SYMBOL, info->exported_symbols[i].symbol, SYMBOL_HASH, buffer, SYMBOL_INFO, &(info->exported_symbols[i]), -1); g_free(buffer); } z_put_cursor_on_first_row (symbol_treeview); gtk_widget_set_sensitive(vbox13, TRUE); gtk_label_set_text(label76, _("List of symbols exported by the plugin")); } } static void on_symbol_treeview_cursor_changed (GtkTreeView *v, gpointer user_data _unused_) { struct plugin_exported_symbol * symbol; GtkWidget * label947; /* Symbol description and properties */ gchar * buffer; GtkTreeIter iter; GtkTreeModel *model = gtk_tree_view_get_model (v); GtkTreePath *path; gtk_tree_view_get_cursor (v, &path, NULL); gtk_tree_model_get_iter (model, &iter, path); gtk_tree_path_free (path); gtk_tree_model_get (model, &iter, SYMBOL_INFO, &symbol, -1); g_assert (symbol != NULL); buffer = g_strconcat(symbol->description, "\n\n", symbol->type, NULL); label947 = lookup_widget (GTK_WIDGET (v), "label947"); gtk_label_set_text (GTK_LABEL (label947), buffer); g_free(buffer); } static void on_plugin_start_clicked (GtkWidget *button, gpointer user_data _unused_) { struct plugin_info * info = g_object_get_data(G_OBJECT(button), "plugin_info"); GtkWidget * plugin_stop_w = lookup_widget(button, "plugin_stop"); GtkWidget * plugin_start_w = button; gboolean running; if (!plugin_start(info)) ShowBox(_("Sorry, the plugin couldn't be started"), GTK_MESSAGE_INFO); running = plugin_running (info); gtk_widget_set_sensitive (plugin_start_w, !running); gtk_widget_set_sensitive (plugin_stop_w, running); } static void on_plugin_stop_clicked (GtkWidget *button, gpointer user_data _unused_) { struct plugin_info * info = g_object_get_data (G_OBJECT (button), "plugin_info"); GtkWidget * plugin_stop_w = button; GtkWidget * plugin_start_w = lookup_widget(button, "plugin_start"); gboolean running; plugin_stop(info); running = plugin_running (info); gtk_widget_set_sensitive (plugin_start_w, !running); gtk_widget_set_sensitive (plugin_stop_w, running); } static void on_properties_destroy (GtkObject * object _unused_, gpointer user_data _unused_) { GtkAction *action; action = gtk_action_group_get_action (zapping->generic_action_group, "Plugins"); z_action_set_sensitive (action, TRUE); PluginProperties = NULL; } static PyObject * py_plugin_properties (PyObject *self _unused_, PyObject *args _unused_) { GtkWidget * plugin_properties; GtkTreeView * plugin_treeview, *symbol_treeview; GtkListStore *model; GtkTreeIter iter; GtkTreeSelection *sel; GList * p = g_list_first(plugin_list); struct plugin_info * info_plugin; GtkCellRenderer *renderer; GtkTreeViewColumn *column; GtkWidget *w; if (PluginProperties) { gtk_window_present (GTK_WINDOW (PluginProperties)); py_return_true; } if (!plugin_list) { ShowBox(_("Sorry, but no plugins have been loaded"), GTK_MESSAGE_INFO); py_return_true; } plugin_properties = build_widget("plugin_properties", NULL); { GtkAction *action; action = gtk_action_group_get_action (zapping->generic_action_group, "Plugins"); z_action_set_sensitive (action, FALSE); g_signal_connect (G_OBJECT (plugin_properties), "destroy", G_CALLBACK (on_properties_destroy), NULL); } PluginProperties = plugin_properties; /* Lookup all widgets in the box */ plugin_treeview = GTK_TREE_VIEW(lookup_widget(plugin_properties, "plugin_treeview")); model = gtk_list_store_new (2, G_TYPE_STRING, G_TYPE_POINTER); g_signal_connect (G_OBJECT (plugin_treeview), "cursor-changed", G_CALLBACK (on_plugin_treeview_cursor_changed), NULL); gtk_tree_view_set_model (plugin_treeview, GTK_TREE_MODEL (model)); sel = gtk_tree_view_get_selection (plugin_treeview); gtk_tree_selection_set_mode (sel, GTK_SELECTION_BROWSE); renderer = gtk_cell_renderer_text_new (); column = gtk_tree_view_column_new_with_attributes (_("Plugin name"), renderer, "text", CANONICAL_NAME, NULL); gtk_tree_view_append_column (plugin_treeview, column); while (p) { info_plugin = (struct plugin_info*) p->data; gtk_list_store_append (model, &iter); gtk_list_store_set (model, &iter, CANONICAL_NAME, info_plugin->canonical_name, INFO_STRUCT, info_plugin, -1); p = p->next; } /* Setup the plugin symbols treeview too */ symbol_treeview = GTK_TREE_VIEW (lookup_widget (plugin_properties, "symbol_treeview")); model = gtk_list_store_new (3, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_POINTER); gtk_tree_view_set_model (symbol_treeview, GTK_TREE_MODEL (model)); sel = gtk_tree_view_get_selection (symbol_treeview); gtk_tree_selection_set_mode (sel, GTK_SELECTION_BROWSE); renderer = gtk_cell_renderer_text_new (); column = gtk_tree_view_column_new_with_attributes (_("Symbol"), renderer, "text", SYMBOL, NULL); gtk_tree_view_append_column (symbol_treeview, column); renderer = gtk_cell_renderer_text_new (); column = gtk_tree_view_column_new_with_attributes (_("Hash"), renderer, "text", SYMBOL_HASH, NULL); gtk_tree_view_append_column (symbol_treeview, column); g_signal_connect (G_OBJECT (symbol_treeview), "cursor-changed", G_CALLBACK (on_symbol_treeview_cursor_changed), NULL); /* And lastly, connect the buttons */ w = lookup_widget (plugin_properties, "plugin_properties_done"); g_signal_connect_swapped (G_OBJECT (w), "clicked", G_CALLBACK (gtk_widget_destroy), plugin_properties); w = lookup_widget (plugin_properties, "plugin_start"); g_signal_connect (G_OBJECT (w), "clicked", G_CALLBACK (on_plugin_start_clicked), NULL); w = lookup_widget (plugin_properties, "plugin_stop"); g_signal_connect (G_OBJECT (w), "clicked", G_CALLBACK (on_plugin_stop_clicked), NULL); z_put_cursor_on_first_row (plugin_treeview); gtk_widget_show (plugin_properties); py_return_true; } void startup_plugin_properties (void) { cmd_register ("plugin_properties", py_plugin_properties, METH_VARARGS, ("Plugin properties"), "zapping.plugin_properties()"); } void shutdown_plugin_properties (void) { } ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������zapping-0.10cvs6/src/plugin_properties.h������������������������������������������������������������ 644 � 764 � 144 � 230 7762173334 13466� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#ifndef __PLUGIN_PROPERTIES_H__ #define __PLUGIN_PROPERTIES_H__ void startup_plugin_properties (void); void shutdown_plugin_properties (void); #endif ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������zapping-0.10cvs6/BUGS������������������������������������������������������������������������������� 644 � 764 � 144 � 25275 10436307307 7526� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������Known bugs in Zapping, don't report them ---------------------------------------- Zapping 0.10: * TTX does not work when XV overlay enabled? * Why 100% CPU in win/over w/VBI=1? * Cannot switch to capture mode when VIDIOC_G_FMT fails (e.g. after bttv PALETTE_RAW capturing). * When the system has different kernel and XVideo devices Zapping attempts to restore the last video input etc before switching the device (i.e. capture mode) and the hash doesn't match. * Capturing is restarted on a video input or standard change because size limits may change, but overlay is not. * Teletext bookmark editing window translation is incomplete. * Teletext TOP menu lists pages which aren't cached, and sometimes doesn't open the page (while typing the page number by hand works). * --device emulator, Screenshot toolbutton, PPM -> JPEG, deinterlace: forward, crash. * Doesn't save the video standard on exit? * On startup after a standard change V4L2 does not reset cropping parameters and the image format. * tveng25.c doesn't call VIDIOC_S_PRIORITY. * The black display on capturemode=0 is confusing. Show a JPEG instead. * Check what happens when tuner ioctls fail (e.g. wrong driver option card=n). * Can we prevent a problem similar to that reported by Tony 2005-12-29? * Check why attaching a device fails when tveng1.c/VIDIOCGAUDIO returns an unexpected errno. * Check if the video device fd passing to a zapping_setup_fb child process, and the stderr pipe work properly through consolehelper. Zapping 0.9: * src/tveng1.c/p_tveng1_dequeue/CSYNC hangs with bttv when changing video standard PAL NTSC PAL. Timeout SIGALRMs but doesn't EINTR. * Video input and standard changes are not allowed while recording but channel changing is. * The error box on video input and standard changes while recording appears more than once. * Recording hangs if the (v4l2) driver grants only one buffer, despite copying in the capture thread. Requires at least double buffering? * make check does not execute all code in GreedyH (pulldown stuff in particular). Zapping 0.7.2: * bktr: Closing and reopening /dev/bktr, /dev/tuner sometimes fails when /dev/vbi is open. Apparently close() does not call the driver close function before open(). Strange. Zapping 0.7 bugs, need more work later: * Video size isn't always right on startup. * Spinslider minimum sizes. * Select composite, quit, restart, back at "television". Problem: channels have a video input parameter, and selecting composite does not switch the channel, so on restart the channel's input is restored. We could have a "null" channel, but what about e.g. ttx bookmarks? * Prefs does not apply screenshot add toolbar option. Seems to be another gtk_widget_show/hide toolbar item problem. * When a/v recording is started under high system load the timestamps may differ too much, triggering the mp1e "cannot sync" check and aborting Zapping. * 2003-11-27 From windowed overlay to fullscreen w/automatic vidmode hang on RH at switch_mode (PREVIEW) -> z_set_window_bg -> calloc segv. Circumstances might be coincidental, it doesn't happen predictable. valgrind --skin=addrcheck was inconclusive: ==17270== Invalid memory access of size 4 at 0x40424ABB: gconf_engine_all_dirs (in /usr/lib/libgconf-2.so.4.1.0) by 0x4042A0E9: gconf_client_preload (in /usr/lib/libgconf-2.so.4.1.0) by 0x404292A3: gconf_client_add_dir (in /usr/lib/libgconf-2.so.4.1.0) by 0x40279941: (within /usr/lib/libgnomeui-2.so.0.200.0) Address 0x0 is not stack'd, malloc'd or free'd No recipient addresses found in header Program segv'ed before window opened. * 0.7 seems to run slower than 0.6, must profile. * Overlay needs a review. * Prefs toolbar style menu does not update when config changes (should it?) and selection cannot be canceled. * mpeg plugin doesn't link with libdivx-20030428. Undefined reference to __start_cp_handler, __eh_rtime_match. g++ doesn't help, no .a|.o|.so found. Where the fsck are they defined?? * Edited channels, clicked ok, tc==NULL in tuned_channel_nth_name(). Not recently observed, perhaps fixed. * Mute button is on after unmute, quit, restart. Seems to be a driver effect. * Doesn't always reset hue on startup? * drose: "Under mdk 9.1 the video capture stops for no reason. Start recording to a file -- come back in ten minutes, 1 - 3 minutes of video are stored and zapping wasn't running." Works for me. * Overlay doesn't work right with RANDR reduced resolution, apparently due to wrong frame buffer bpl. Zapping 0.6 bugs, need verification: * RPM creates incorrect zsfb.capps * zsfb.capps conflicts with RPM relocation. * Look for endianness problems. * vbi eats too much CPU, investigate. * Overlay (no XVideo) under E is broken, shading the window isn't correctly detected. * Do not assert on ESD timeout tvengxv.c * Need to handle BadAtom errors resulting from Xv out of video memory (or no v4l device?). Currently gdk traps errors and just aborts the App. * We must not rely on XvQueryPortAttributes(), this is a later (XFree86-only?) extension of the XVideo API. It already defines some attribute names and ranges, and XvGetPortAttribute() will tell if they are implemented by the driver. * configure.in must check for different versions of xv. Debian bugs * 126641 - zapping_remote, see also sf.net. Without X to do. * 198942 - Open. Kernel ------ bktr driver: * Incomplete and broken in many ways, not always possible to work around. For details search tvengbktr.c for "Bug". sn9c102 1.0.8 driver: * CROPCAP overwrites type (was _IOR, now _IOWR). * G_INPUT requires cleared index input. * TRY_FMT does not copy data back to user space. * ENUM_FMT overwrites type. * NONBLOCK open fails with EAGAIN if the device has users, and it seems the counter is never decremented when the USB device is disconnected at close time. * mmap fails for > 1 buffers, apparently because m.offset isn't page aligned. bttv driver: * 0.8.x: When video capturing is disabled while VBI capturing is active, the driver passes VBI frames at the end of the first field (i.e. F1-F0, F3-F2, ... instead of F1-F2, F3-F4, ...) * 0.9.14: with YUV 4:2:0 activation of VBI capturing can cause a SCERR & driver reset, DQBUF -> EIO. * bt8x8 has no PAL delay line, or is disabled in YUYV mode? * tveng2/bttv-0.8.x permits capture size exceeding hardware capability? * Audio mutes when switching from capture to fullscreen with bttv-0.8.x and Xv/v4l, although Zapping sends XvSetPortAttribute XV_MUTE 0. Works normal with bttv-0.7. * 0.9.5: Overlay seems to be broken. v4l1-compat: * VIDIOCSPICT: Discards VIDIOC_S_CTRL and VIDIOC_S_FMT(CAPTURE) errors (e.g. unsupported palette). Calls VIDIOC_G|S_FBUF without checking for overlay support and discards the resulting EINVAL. * VIDIOCGPICT: Discards VIDIOC_G_CTRL errors, possibly return invalid values. XFree86/Xorg ------------ * XvQueryAdaptors seems to report wrong num_formats value, maybe a DIX or DDX bug. * XvListImageFormats, XvQueryPortAttributes not documented. Result must be XFree()ed. * XvImageFormat: Some drivers define incorrect component_order. There are no Window FOURCCs for RGB formats, consequently drivers disagree about id and guid. * Xinerama & XvQueryAdaptors: Each Xinerama screen may be a different graphics card with its own set of Xvideo adaptors and attributes. As of X.org 6.7 we cannot query them because the window parameter resolves to the virtual screen, not physical screens. XvQueryAdaptors always returns the adaptors of the first physical screen and Xinerama appears to map these adaptors to physical ones, but that works only for XvPutImage and the v4l wrapper (or not). V4L XVideo driver (xc/programs/Xserver/hw/xfree86/drivers/v4l/v4l.c) * Success of ioctls is not checked. * Does not consider audio.mode changes semantics on read/write. V4lSetPortAttribute(): } else if (attribute == xvMute || attribute == xvVolume) { ioctl(V4L_FD,VIDIOCGAUDIO,&pPPriv->audio); if (attribute == xvMute) { if (value) pPPriv->audio.flags |= VIDEO_AUDIO_MUTE; else pPPriv->audio.flags &= ~VIDEO_AUDIO_MUTE; } else if (attribute == xvVolume) { if (pPPriv->audio.flags & VIDEO_AUDIO_VOLUME) pPPriv->audio.volume = xv_to_v4l(value); } else { ret = BadValue; } if (ret != BadValue) if (-1 == ioctl(V4L_FD,VIDIOCSAUDIO,&pPPriv->audio)) perror("ioctl VIDIOCSAUDIO"); * Encoding is not reset on open? Apparently cought when Zapping opens the v4l/2/5 interface too (try remove the modules in tveng.c, or start xv overlay while a radio app runs). * Reports wrong tuner frequency range: static const XF86AttributeRec FreqAttr = {XvSettable | XvGettable, 0, 16*1000, XV_FREQ}; * Ignores tuner frequency scale factor (62.5 Hz, 62.5 kHz). Supposedly the Hz scale was added for SW radio, but the V4L/2 spec nowhere says tv receivers must support kHz only. V4lSetPortAttribute(): } else if (attribute == xvFreq) { if (-1 == ioctl(V4L_FD,VIDIOCSFREQ,&value)) perror("ioctl VIDIOCSFREQ"); V4lGetPortAttribute(): } else if (attribute == xvFreq) { ioctl(V4L_FD,VIDIOCGFREQ,value); * XV_FREQ semantics not documented, e.g. scale 62.5 kHz. * XvEncodingInfo does not report if the input is a tuner and XV_FREQ access appears to succeed on all inputs. * According to XvQueryPortAttributes() this device has 2001 video standards and inputs (no, I didn't try them :-) {XvSettable | XvGettable, -1000, 1000, XV_ENCODING} NVidia driver (binary, not xf86) * Reports tv output port with type XvInputMask | XvVideoMask. Should be XvOutputMask. Workaround in place. * DGA and V4L conflict with XAA? NeoMagic driver (xc/programs/Xserver/hw/xfree86/drivers/neomagic) * The only port is of type XvInputMask | XvImageMask | XvWindowMask | XvOutputMask | XvVideoMask. It supports PutVideo (video in) and PutImage (image out), probably not both at once. XvQueryAdaptors man page does not state if such a combination of flags has to be expected. Actually it doesn't even mention the XvImage extension. Savage driver (xc/programs/Xserver/hw/xfree86/drivers/savage/savage_video.c) * Minor nit: comment says YV12, I420 == 4:1:1, actually 4:2:0. The alleged 2:1:1 is really a half width 4:2:2, there's no such thing as 2:1:1. Glint driver (xc/programs/Xserver/hw/xfree86/drivers/glint/pm2_video.c) * Does not list XV_ENCODING with other attributes for XvQueryPortAttributes(). Only two other drivers have XV_ENCODING, namely V4L and SMI (xc/programs/Xserver/hw/xfree86/drivers/ siliconmotion/smi_video.c), and both list it, but I wonder if it really belongs with attributes. This is no picture control and the info is redundant with XvQueryEncodings(). Workaround in place. ------------------------------------------------------------------------------- If it ain't broken... it is now. �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������zapping-0.10cvs6/NEWS������������������������������������������������������������������������������� 644 � 764 � 144 � 66505 10432663167 7550� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������New stuff, refer to the ChangeLog for a more detailed description of the changes. Zapping 0.10, 2006-03-11 ------------------------ This version of Zapping improves caption and subtitle support. - It has a new, more standards compliant Closed Caption decoder. - Subtitles are now implemented as a plugin with various preferences: Scaling/antialiasing mode, text brightness and contrast, Closed Caption padding and soft rolling, default foreground and background color, Teletext default character set, and an option to shrink double height Teletext characters. All options auto-apply. - Links and page numbers on Teletext (subtitle) pages are clickable as in Teletext windows. - Subtitles have a context menu to disable them, reset size and position, open the preferences, override the character encoding of Teletext pages, and to select another subtitle language. - Subtitles scale with the video, now with fixed character aspect unless the available space is too small. - Subtitles can be dragged to a different size and position. The position automatically adjusts to keep all text visible. Size and position are remembered in the configuration, separately for windowed and fullscreen mode. - Roll-up Closed Caption updates in real time and rolls smoothly. - The subtitle languages menu now uses radio menu items to indicate the current language. - Users can override the character encoding of individual Teletext pages, this is remembered in the configuration per-channel data and affects Teletext browsing, subtitle display and recording, screenshots, and the subtitle language menus. - In fullscreen mode subtitles no longer appear outside the video, if it is smaller than the screen for technical reasons, but can be dragged into the border by the user. - The screenshot plugin has an option to save the image with or without the displayed subtitles overlaid, with preview. - The recording plugin permits recording of Closed Caption and Teletext subtitles as MPSub, QTText, RealText, SAMI, SubRip or SubViewer file, preserving text styles, justification and color if supported by the format. Other improvements: - The VBI device UI moved into the device section. A new option has been added to select a DVB PES file as source (mainly for tests). Uses GnomeVFS to permit on-the-fly decompression. - The Xawtv config import routines now handle baseband inputs (Debian patch #302835). - Bug-buddy metadata and a comment string was added to the zapping.desktop file. - With GCC 4.0.1+ compiling of SSE2 optimized functions is enabled (earlier versions had a bug aborting the compilation). - New SSE3 optimized deinterlace routines were added. - The MMX YUV to YUV and RGB conversion routines have been replaced by vector intrinsics which compile on x86-64 as well. An MMX SBGGR to RGB routine has been added. More source and target formats are supported now. - This version has preliminary support for the ivtv 0.2 and 0.3 driver (untested). So far display and screenshots only. No video out, recording or playback. - Improved support for the rivatv driver (untested). - When zapping_setup_fb (preparing for DMA overlay) fails, the error messages are more verbose. - The "Save window geometry" option is gone. Zapping now unconditionally preserves the main window size or relies on the session manager to restore the window size and position. - Video overlay improved and support for chroma-key overlay was restored. (Overlay of captured images with XVideo is still disabled.) - Recording now works on FreeBSD with the bktr driver. Overlay has been restored on FreeBSD. Fixes: - A crash when clicking on the keyboard preferences "remove key" button. - A bug in the VBI code aborting the app with an invalid fifo error. - When the current video standard was selected from the standards menu Zapping closed the VBI device. - Capture mode error dialogs appeared twice. - Overlay didn't work with the built-in video device emulator. - A bug displaced the main window when leaving the fullscreen mode (Debian bug #304375). - Crashes in the Teletext cache code (prob. bug #1089853). - Abortion due to unhandled X errors when DGA is unsupported (esp. newer nVidia drivers), when using XVideo image scaling and in fullscreen mode (bug #1424470, #1447834; Gnome bug #331580, #332846). - Entering single-digit channel numbers on the numeric keypad did not work. - A crash in zapping_setup_fb when given an unknown option. - A crash when opening the channel editor or preferences (bug #1429083; Debian bug #344969; Gnome bug #332221, #328309). Dependencies: - Zapping now requires libzvbi >= 0.2.11 for better DVB PES support (the most recent version is 0.2.18). - Recording now works on FreeBSD, if librte is installed. Note librte works only on x86, not x86-64 or ppc systems. Zapping 0.9.6, 2005-07-14 ------------------------- This is a bugfix release. - Fullscreen-capture didn't work, giving a black screen. - Changing the volume with the soundcard mixer didn't work right when the tv card has no volume controls, possibly with a crash at exit. Zapping 0.9.5, 2005-07-07 ------------------------- Due to bugs in the original code major parts of the GreedyH deinterlace method were disabled. This code has been restored, all options work now. All deinterlace methods have been converted to vector intrinsics, with MMX, 3DNow!, SSE and SSE2 optimized implementations, if supported by the compiler. (GCC 4.0 or 4.1 recommended.) AltiVec and x86-64 SSE2 optimized implementations are available but have not been completely tested yet. The simpler deinterlace methods now have scalar implementations which do not require a CPU with SIMD support. An extensive make check has been added. Internal Changes: - The volume and mute control hack switching between tv card and soundcard mixer has been replaced by a simpler and hopefully less error prone virtual control layer. Bug Fixes: - Various fixes to compile with target x86-64. All make checks passed but if/how Zapping as a whole works on x86-64 has not been tested yet. - Various fixes to properly compile with older versions of GCC (tested 3.2.3, 3.3.5, 3.4.4, 4.0 and 4.1 x86, 3.4.1 and 4.1 x86-64, partially with 3.4.3 powerpc). - The VTX Teletext export function crashed. Fixed by Mako the Goldfish. - Teletext double width characters didn't display correctly. - The --no-vbi command line option disables VBI only during the current session, doesn't stick anymore. - Ioctl logging (--io-debug) didn't log the V4L2 ioctl VIDIOC_G/S_STD and OSS ioctls. - Capture mode required more image buffers than some driver were able to provide. This requirement has been relaxed, although it may disable some functions. Packaging Changes: - Users were confused when Zapping compiled successfully without libzvbi. ./configure now fails if libzvbi is not installed. To compile Zapping anyway the --without-zvbi option must be given. - Previous versions installed files /etc/pam.d/zapping_setup_fb and /etc/security/console.apps/zapping_setup_fb. Following GNU standards to permit non-root installs and make distcheck the /etc path has been replaced by $(sysconfdir) which defaults to $(prefix)/etc. Root installation now requires ./configure --sysconfdir=/etc. Zapping 0.9.4, 2005-04-21 ------------------------- This is a bugfix release. - PAL-Nc, PAL-M, PAL-N, NTSC-JP video standards were not offered when using v4l bttv driver. - The TomsMoComp search effort option had no effect. - The deinterlace plugin did not compile with gcc 3.3 or older (invalid parameter). Zapping 0.9.3, 2005-04-05 ------------------------- This is a bugfix release. - Two deinterlace modules segfaulted when compiled with -fomit-frame-pointer option. - The v4l driver interface did not timestamp images causing a synchronization failure in librte. - An assert (c->dequeued == 0) failed when recording with the mp1e codec stopped. This is a work-around for a bug also fixed in librte-0.5.6. - Using the bktr driver, video input and channel changes were blocked in Teletext mode. - Zapping did not properly restore the last video standard on startup. Apparent with the bktr driver, possibly others. - Zapping did not maintain the current video and audio input and video standard on capture mode changes. Apparent with the bktr driver, possibly others. Zapping 0.9.2, 2005-02-28 ------------------------- This is a bugfix release. - Zapping used to hang when recording was stopped. This is a preliminary fix, as a side effect Zapping cannot record and deinterlace at the same time. - Various bugs were fixed in librte, used by the recording plugin. - The zapping.schemas file was not localized and installed. (Christian) - With active deinterlacing no display mode, capture mode, video input or video standard changes were possible. (SF #1145094) - The error box appearing if capturing cannot be started did not contain a message. (SF #1145094) - src/cpu.c did not compile on target powerpc due to missing #includes and -maltivec flag. (Christian) - The manual pages did not install unless configure found xsltproc, the DocBook XML DTD and DocBook XSL Stylesheets. (Christian) Zapping 0.9.1, 2005-02-20 ------------------------- Added French translation. Documentation and build fixes: - help/C/settings.xml contained a stray & (&). (Christian) - The documentation contained &#nnn; entities not defined in xml.soc. Version numbers where outdated. - The manual pages Makefile failed if configure did not find xsltproc, the DocBook XML DTD and DocBook XSL Stylesheets. - zapping_setup_fb/v4l25.c did not compile on big endian targets. (Christian) Zapping 0.9, 2005-02-15 ----------------------- This version of Zapping has a new deinterlace plugin based on code from DScaler. Most of the changes since 0.8 went into related functions, for example faster capture routines. For now deinterlacing works only with V4L2 drivers on x86 CPUs with MMX. Zapping 0.9 should also work better with webcams (needs testing), specifically those supported by the sn9c102 and pwc drivers. The screenshot plugin can grab images at full size as opposed to video window size. The zapping_remote tool already present in earlier version installs now, with a manual page. zapping_remote can be used to send commands to a running Zapping process. User visible bug fixes: - Recognize Cyrix CPUs with MMX/SSE. - Various fixes in the Teletext decoder. - Correct XVideo (v4l) video input and standard names. - Initially in the video input, audio input and standard menu the wrong item was active. - Quitting by menu doesn't crash anymore. Zapping 0.8, 2004-11-11 ----------------------- Main focus in Zapping 0.8 was on Teletext and VBI features. Dependency changes: - Zapping now requires libzvbi 0.2.9 or higher. - The V4L2 0.20 API (predecessor of V4L2 in Linux 2.6) is no longer supported. User visible changes: - The page cache has been redesigned, it can now hold pages of multiple networks. No more delay to reload pages after a channel change. Offline browsing is possible, i.e. one can read pages of a different channel than the one currently received, a different channel in each Teletext window. - The Teletext window has a new radio menu to change between networks in the cache, or to show pages of the currently received network. - The Teletext decoding and formatting routines improved. The Teletext decoder will try hard to detect channel changes and identify channels, so multi-channel page caching also works properly on composite video input. - The page cache used to store all received pages. It now has a user defined size limit. When the limit is reached the last recently used pages of the last recently used network are replaced, with higher priority give to frequently visited pages and subpages which often take longer to reload. - TOP navigation has been redesigned. In addition to the navigation bar at the bottom of the page Teletext windows now have a TOP drop-down menu. - In addition to the default character set region in preferences users can now completely override the character encoding of a page by choosing from a radio menu in Teletext windows. - Zapzilla used to add a 41st black column to balance an often black first column. It now extends colors and graphics if the first column is not black. - Rendering of blinking characters and the real time clock improved. Clock updates can be disabled in gconf-editor. - When a requested page is not cached the page number in the header rolls to show the currently received pages. This can be disabled in gconf-editor. - Cut & paste now speaks UTF-8. - Teletext preferences have been redesigned along Gnome 2 human interface guidelines. Except for cache size all options apply immediately. - The Teletext color dialog was merged into Teletext preferences. - The page save dialog asks before overwriting an existing file. Error dialogs have been redesigned along Gnome 2 HIG. - Zapping automatically leaves fullscreen mode to display help or an URL on a Teletext page, and error handling improved. - Zapping now supports the new libzvbi proxy to share a VBI device with other applications such as the Nxtvepg EPG viewer. - For tests (this will become a regular feature in future versions) Zapping can read Teletext, subtitle and caption data from a DVB MPEG stream (skipping video and audio, if any). - The GConf interface improved to avoid problems we had in 0.7. Zapping 0.7.3, 2004-10-11 ------------------------- Bug fixes. Zapping 0.7.2, 2004-10-04 ------------------------- Zapping now supports fullscreen video capturing, including screenshots and recording while in fullscreen mode, and fullscreen Teletext. Since overlay limitations do not apply to captured video (if the graphics card supports XVideo image scaling) the entire screen can be covered by video. The context menu is now available in fullscreen mode. A new background display mode has been added. Teletext is now implemented as a plugin, slightly faster, with a few minor GUI improvements. In the main window the menu and toolbar can be disabled separately. Changing channels by mouse wheel should work better and Zapping now properly disables the KDE 3.0 screensaver (untested). Dependency changes: - This version of Zapping requires Gtk+ 2.4. Important bug fixes: - Zapping did not work with MSI TV-@nywhere (cx8800 based, using Linux 2.6 V4L2), this has been fixed and the driver interface generally improved. Zapping 0.7.1, 2004-09-13 ------------------------- This time we have three major improvements: Zapping now runs on FreeBSD using the bktr driver, missing only support for remote controls and recording. Again it also runs on Solaris using XVideo, fixes courtesy of Roger Fuji. Finally Xinerama is supported in all display modes. In the minor improvements category the Teletext mode now shows a second toolbar instead of squeezing more buttons into the primary toolbar. Important bug fixes: - Using V4L2 (Linux 2.6) there is now a working audio mode (mono, stereo, SAP) control. - Position of subtitles in fullscreen mode was wrong. - Alirc VOL_UP/DOWN did not work. Zapping 0.7, 2004-07-09 ----------------------- Main focus in Zapping 0.7 was porting the user interface to Gnome 2. Along with it numerous other improvements and fixes were made, including: * Video: - In the video preferences, apart of "no change" and "automatic selection", users can now select a particular fullscreen resolution. - Fullscreen mode automatically recenters and hides the pointer. - The picture size menu in the video context menu is now editable, including accelerators (keyboard shortcuts). - The view menu now has a "keep window on top" option. - In the channel menu, the video input and video standard submenu are have "radio buttons" which show the current selection. - XVideo support was improved. * Audio: - The entire audio code was rewritten from scratch to properly distinguish between sampling and mixer devices on the soundcard and tv card, and between recording and output volume. - Audio device preferences moved to a separate page in the preferences device section and are much clearer now. Usually users will not need to enter file names because available sampling and mixer devices are listed in menus by file name and device name. - Muting when Zapping terminates became optional. * Teletext: - In Teletext mode the main window toolbar has a new button to return to video mode, besides the button to overlay the current page as subtitles. - Teletext windows now have a menu. - The history buttons didn't work quite right, do now. - The search dialog is simpler now, no longer modal (blocking other windows). - The save format menu moved from the context menu into the dialog. - We have a new Gnome 2 style bookmark editing dialog. * Caption / Subtitles: - The toolbar now has a toggle button to enable caption / subtitles, connected to the subtitle check menu item in the View menu. Users can also enable and disable subtitles from the video context menu. - The subtitle page number entry was removed from VBI preferences. Zapping automatically determines the right CC stream or Teletext page if the network transmits this information, and remembers the last source selected by the user on each channel. - Subtitles can be selected by CC stream, Teletext page number or language from the video context menu, and by activating Teletext mode, choosing a page and clicking on the subtitle button. * Electronic Program Guide: - Zapping now interoperates with Nxtevpg. For details see http://zapping.sourceforge.net/cgi-bin/view/Main/ZappingHelp * Channel Editor: - Frequency tables are now sorted by country rather than geographical regions. Zapping attempts to preselect the country from system preferences. - Automatic station search improved. - Zapping can import the channel table, along with a few per-channel settings, from a XawTV configuration file ~/.xawtv. - The dialog now has a button to add a new channel and the GUI behaves more logical. * Screenshot Plugin: - Preview is now obligatory. - Pressing the enter key in the screenshot dialog filename entry saves the picture and closes the dialog. This is normal Gnome behaviour and no longer optional. - The directory for screenshots entry was removed from screenshot preferences. Zapping now remembers the last path entered in the dialog. - When pictures are saved without dialog Zapping automatically replaces the filename extension, appends an ascending number to the last used filename if such a file already exists, and automatically creates all non-existing directories in the path. * Command Line: - zapping_setup_fb is no longer called at startup but only if needed. For safety Zapping double verfies the overlay initialization. - The zapping_remote tool is available to send commands to a running Zapping process. Zapping and zapping_remote are partially compatible to Xawtv and xawtv-remote. - Zapping has new command line options: --xv-video-port, --xv-image-port, --no-xv-video, --no-xv-image, --no-overlay for fine grained XVideo and video overlay control (mostly for debugging, this stuff really belongs into device preferences). --io-debug enables logging of all driver programming. * Documentation: - Zapping now has proper online help available from the Help menu. - Help buttons in various dialogs now open the respective section of the Zapping documentation in the Gnome help browser. * Miscellaneous: - Zapping commands at the command line, for keyboard customization, for remote control programming with the ALIRC plugin and commands sent to a Zapping process with the new zapping_remote tool have been unified. We use a real scripting language now, Python. Legacy commands are still supported for compatibility. - All Zapping toolbars have a context menu to change their appearance. The same menu is available in the window preferences. - In keyboard preferences accelerators can be entered directly in the table by double-clicking on a key cell. - Zapping has an experimental VDR interface, will need more work in the future. - The LIRC plugin was removed from this release. Plan is to combine the best features of LIRC and ALIRC plugin in a future remote control plugin. - The program and network info dialogs were removed. If and how they will return is undetermined. - VBI triggers were removed from this release for a rewrite. For details see the ChangeLog file. This release was possible with the help of the following people: Guus Bonnema, Iaki Etxebarria, Henrik Isacsson, Christian Marillat, Morten Brix Pedersen, Pino Toscano. Many thanks to you and everyone submitting ideas, patches and bug reports. 0.6.8 ----- Overlay fix and an Italian translation update. 0.6.7 ----- Fixes a bug in the screenshot plugin, crashing Zapping on exit, and triggered by the nptl library on RedHat 9. In the RPM it was unavoidable to require newer versions of libc and libpng. 0.6.6 ----- Hi folks. Following the last Gnome 1 release of Zapping I'm proud to announce the actual last version. Let's hope 0.7 will be ready before we need some more last versions. This version fixes a number of bugs in the previous version, most notably recording and mute/volume problems. The V4L2 interface of Linux 2.5 is now supported, new commands were added to the alirc plugin: MUTE, VOL_UP, VOL_DOWN, and the SETCHANNEL function improved. The --remote command line option can be used to disable overlay. Pino Toscano kindly contributed an Italian translation. 0.6.5 ----- It's been a long time since 0.6.4, much too long, but finally the beast arrived. Main change this time is the switch from rte 0.4 to 0.5, our high speed audio/video recording library. The recording plugin will not work with rte 0.4 unless you compile Zapping yourself. rte 0.5 adds a lot more formats besides MPEG-1 using ffmpeg and divx4linux, possibly even more in the future. Along with the new codecs comes a new recording dialog which allows users to save recording configurations under different names. RPM changes: - Some earlier Zapping binaries installed in /usr/local, the default when building the application from source. The current binary zapping-0.6.5-1.i386.rpm installs in /usr which should integrate better in most Linux distributions, including RedHat and Mandrake. The rte and zvbi packages always installed in /usr. - Another binary zapping-0.6.5-1.suse.i386.rpm is provided which installs in /opt/gnome, otherwise identical. Other changes: - We have new GUI options to change the toolbar style and keep the video window on top (when supported by the window manager). - Zapping temporarily disables XScreensaver, the software screen blanker by J. Zawinski. Of course the X11 built-in savers are also disabled. - Teletext export options and the record plugin codec menus where not or not correctly localized in the past (i.e. remaining in English). For full satisfaction you may have to update zvbi as well. - Thanks to Guus Bonnema for taking over maintenance of the orphaned Dutch translation. - Matt without last name contributed a frequency table for Canadian cable. - Well, and the usual set of fixes, non-fixes and micro improvements. This is the last release of Zapping (gasp!) using Gnome 1 (phew!). The next version 0.7 will require Gnome 2, so please stop asking now. If you like to live on the bleeding edge, the tree is in CVS, branch zapping-gnome2. It will move to the HEAD trunk at the appropriate time. 0.6.4 ----- This is mostly a bugfix release, no new features. When you use this version you should also install zvbi 0.1.1 which adds more fixes. 0.6.3 ----- A new year, a new release, a new maintainer. Sadly this release does not include all improvements planned for 0.6.3, but it's over three months since the last release, without an end in sight. Future versions will be released at shorter intervals. The main difference to 0.6.2 is the extraction of the Zapping vbi decoder into a separate package "zvbi". Motivation was to clean up and re-use the component in other applications, encourage more frequent updates and to reduce the size of binaries. Zapping can be compiled without, but a lot of functionality depends on the zvbi library, so you should really get it. Using the binary packages makes it a requirement. Other changes: - Recording source and volume can be selected in preferences. Currently only the OSS /dev/mixer is supported. - For our US and Canadian users Zapping now looks for XDS program title, start and end times, rating etc. and can display this information in the title bar or a program info window. - Complete rewrite of the screenshot plugin. Better dialog, supports JPEG and PPM (possibly more, inquire within), has quality preview and on-the-fly deinterlacing. - Some channel editor improvements. - The "snapshot button" present on ov511 web cams is scanned and does what it's supposed to. - Pointer disappears and reappears screen-saver style. - Some Teletext export improvements. - New mute audio toolbar button. - Channel numbers can be entered on the numeric keypad, either by channel memory number (European style) or RF channel number (US style). - Preliminary volume up/down function. - Most of the keybord shortcuts are configurable now. - And the usual set of bug fixes and new bugs. 0.6.2 ----- - Dutch translation. - Redesigned channel editor and properties dialog. - SGML renderer for OSD. - In-window OSD, no more floating subtitle windows. - Support for the Logitech Quickcam Express (possibly other quickcams too, but this is untested). - Improved timestamping. - ARTS recording support. - Sync with rte 0.4 - Bugfixes and polishment, as usual. 0.6.1 ----- - Added Swedish translation. - Reported to build and work (using XVideo) under FreeBSD and Solaris. - Automatic overlaying of subtitle TTX pages. - Reverted to the old fb depth detection routine. - Some bugfixes in the mpeg plugin, adapted to use rte 0.3.1's new controls api. - Fixed some bugs with Arabic and Hebrew TTX glyph mapping. - Usability improvements, especially in the channel editor. - Updated de, es, fr and pl translations. 0.6.0 ----- - Rewrote inner capture code, should be more versatile now (me). - Better support for SuSE (me) - Aspect ratio autodetecting (Michael) - MPEG plugin faster, updated to latest rte (me) - RTE: motion estimation (Michael) - GUI improvements (Michael, me) - Verboser error reporting in libvbi (Michael) - Standalone Zapzilla executable (me) - Zapzilla autodetects channel switches, for tunerless devices and standalone Zapzilla (Michael) - Zapping works without V4L/V4L2 now [XVideo only], Solaris port (Roger Fujii, me) - 41st column in TTX (Michael) - Use afc, channel name autodetection in channel editor (me) - Aspect ratio fixes, now it's applied to the tvscreen, not the whole window (me) - Color conversion MMX autogenerator (Michael) - Man pages (Christian Marillat, me) - Fifo rewrite (Michael) - New alirc plugin (Sjoerd Simmons) - Added Polish translation (Pawe, Sakowski) - Updated de.po (Michael), es.po (me), fr.po (Christian) - Added Swedish translation (Henrik Isacsson) 0.5.9 ----- - Greatly improved VBI engine (Michael, me) - CC/TTX Subtitles support (Michael, me) - South African frequency table (Jeremy Maccelary) - LIRC support (Marco Pfattner) - Better XVideo support, XV Fullscreen (me) - PAMification of zapping_setup_fb (Tim Powers, me) - Some more GUI bloat for your exasperation (i'm the one to blame :-)) �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������zapping-0.10cvs6/TODO������������������������������������������������������������������������������� 644 � 764 � 144 � 65357 10432663167 7545� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������Outstanding issues for future releases -------------------------------------- * Option to mute if the video window is invisible? * http://www.geocities.com/beinges/index_nofla.htm * Recording won't work while the --esd-out audio loopback is active. Also bilingual recording (with monaural to speakers) isn't implemented yet. * Muting the audio loopback clicks. Try fade out the volume. * Integrate XvPutImage controls into the tveng.c virtual control layer. Like mixer volume, substitute tv card brightness and contrast control when available for XVPutImage. * Capture buffer negotiation (tv_set_buffers) is only implemented for interfaces with buffer queue (i.e. v4l2). * Disable overlay GUI if not possible (driver, DGA etc). * Take a look at ATI video in Xorg CVS. * Handle locked gconf. * Investigate gtkglext. * Middle mouse button shouldn't be hardwired but run a Python command. * Prefs > Video: "Fullscreen display resolution" might be a better name. * Fullscreen should always fill the visible screen, even if "no change" of resolution has been selected. Additionally Zapping should monitor the resolution and adjust dynamically, in case the user switches with NK+/- or randr (background display mode!). Holy Jebus all the work and few will ever notice... * With the new Teletext plugin interface it would be trivial to create a split display showing 2, 4, 9, ... pages at once and with a little more effort split video/teletext, usefull in fullscreen. Would be nice if we could combine that with multiple cards, channel mosaic and picture-in- picture. Even better with OpenGL animations. * keyboard: there are too many conflicts between the Zapping and Xawtv mapping, better add an option to prefs. * Xawtv import considers ~/.xawtv but not /etc/X11/xawtvrc, see man xawtvrc. * Examine interaction with change display from gtk-demo. * Widget indentation needs improvement, use gtk_alignment_set_padding() (gtk 2.4). * tv_set_overlay_buffer: Check DGA presence before calling zsfb. Test with Xnest. * Keyboard preferences: Python commands should not be visible, by default. Use GtkAction? * Examine interaction of Zapping (esp. overlay) with RANDR. http://keithp.com/~keithp/talks/randr/randr/ xc/doc/specs/Randr, xrandr et al * After "add all channels" in the channel editor Zapping should scan for station names. * UYVY in mpeg plugin. * Prefs building takes longer and longer, it's annoying. * Maybe Zapping should support all xawtv command line options? * We need an Xv overlay port menu. * http://developer.gnome.org/dotplan/porting/ checklist. * Are we using window fully visible, partially visible and fully obscured X11 events to optimize capture mode? Apparently not. See overlay.c. * preferences from context menu (zapping-misc 2003-01-05) * configure.in: esd, oss etc checks * Improve documentation. * vbi: add toggle button to disable CC/TTX decoding (independent of station name decoding, that is). Mind listing subtitles. Should also disable trigger decoding when all set to ignore. * zapzilla: channel selector, properties. * Get thumbnails of all tuned channels. * PIP? * Take TTX out of the context menus when Zapping doesn't receive TTX. (event timestamps?) * Better audio mode (mono/stereo etc) support. * Check tveng has frame rate for timestamping. (Unlike mpeg bug.) * Remove default overlay page? * More compression formats. * Trigger: Close should remember it had been clicked already when a trigger is merely repeated. * Recording schedule. * Screenshot plugin: subtitle overlay * Mpeg plugin/mp1e very low frame rate interrupts display, probably a scheduling issue. Investigate if/how this can be avoided. * Examine the possiblity of linking movie titles, VBI plugin API. * Deinterlace plugin. * VBI station name ignored when card w/tuner & composite selected * Compress config file (libxml). * Config toolbar using Iaki's dnd code. Update: libegg contains a new toolbar widget apparently supporting user toolbar configuration. Update: see gtk+ 2.4. * Clean up context menu. * Remove tveng_frame_format.bytesperline. (Um, why?) * Verify all Gnome etc URLs everywhere. * Proper error messages on xawtv import. * In overlay.c, possibly elsewhere, we request GDK events but never disable. Can we safely, without disabling events enabled before or between, by other zapping/gnome/gtk/gdk modules? * WM_ICON could display a network icon in titlebar? * Switching subtitles on/off needs improvement: On a channel change, make subtitle widgets insensitive if this channel has no default subtitle page remembered from an earlier activation and/or we do not currently receive subtitles (zvbi_find_subtitle_page ()). Listen to VBI3_EVENT_PAGE_TYPE to make the widgets sensitive when that changes. Always make the widget sensitive in Teletext mode. Add a subtitle menu to the video window main menu (currently only a context menu). * Open subtitles: This is mainly interesting for subtitle recording and alpha blending (although I would prefer window compositing or OpenGL textures for positioning flexibility). For a starting point see SubtitleView-> get_image, currently used for screenshots. YUV alpha blending formula: Y = Y2 * a + Y1 * (1 - a); Cb = Cb2 * a + Cb1 * (1 - a); Cr = Cr2 * a + Cr1 * (1 - a); Seems wrong but converting to RGB, alpha blending and converting back to YUV would give the same result. * Multilingual subtitle recording: With "closed" caption/subtitles this is easy, see also libzvbi/test/ttxfilter. To create multilingual subtitle files: a) open a file for each language, or b) store multiple languages in the same file (e.g. SAMI). It will probably suffice to call the zvbi export module with different vbi_page.pgnos and handle the details there. We may have to know all pgnos before creating the file header though. * Parrot plugin: Zapping stores the last few seconds of captured, uncompressed video in RAM. Needs much memory but no CPU. If something interesting happens one can reverse, take a screenshot or start recording. Some work has been done, but it's not that simple to integrate into the capture fifo. It's lower priority, the code needs a major update, if not a rewrite. * Capture pixel formats and conversion: Various functions in capture.c are intendend to find the best capture format and minimize the number of conversions required, for example by reference counting converted copies of image buffers in the capture fifo. One function in particular, request_capture_format_real, given a set of target formats tries to find a source format, where a) the format is supported by the driver, b) we have functions to convert to all target formats and c) we need the fewest conversions, eg. one target equals source. It fails to consider a few other important points: * Lossy YUV <-> RGB conversion. The native format of most video capture devices is YUV 4:2:2. Requesting RGB, with conversion in hardware, or worse in software by the driver, will incur rounding errors. This may be undesirable if one of the target formats uses YUV color space. Under strange circumstances the function may even attempt to convert from Y8 to RGB24, instead of choosing an RGB source format. * Lossy conversion of lower to higher color depth, eg. RGB15 to RGB32, which is undesirable eg. for screenshots. * Lossy conversion from lower to higher density planar formats, eg. YUV 4:1:0 to YUV 4:2:0. * Conversion costs, in CPU cycles and memory bandwidth, are not considered. For example RGB24 to RGB15, RGB24 and BGR24 is cheaper than RGB15 to RGB15, RGB24 and BGR24. It also depends if we have a C or MMX converter, and on the image size due to limited CPU cache. * XVideo display can convert on the fly without costs, except in a few cases byte reordering YUV 4:2:0 to 4:2:2. Memory bandwidth is still significant. * Planar YUV can be converted to YVU and vice versa by pointer swapping. * Transient format requests, eg. to take a screenshot, cause two source format switches and thereby frame loss. In some cases the driver may pass a broken image. Conversion of images already in the fifo may be impossible. It would be better to accept a suboptimal source, and/or to keep the source format instead of falling back to a slightly more efficient one immediately. * Better 16:9 support: WSS acquisition needs to be more robust. Usually video and VBI capturing cannot overlap and video capturing includes the WSS line. Hardware (sliced) VBI decoding would pick it up despite video capturing, but not every hardware has the capability and AFAIK no driver supports the API yet. We can still sample the signal off captured images or even overlaid images by reading from video ram. To get rid of the annoying WSS and CG patterns in the picture, in overlay mode V4L2 cropping could reduce the image height, then the driver could shift the VBI capture window down to cover the WSS. If that's not possible one could still clip the line out, but then Zapping won't see WSS changes either. In capture mode reducing the height may conflict with recording (height mod 16 et al). Blanking the line after extracting WSS should be no problem. The appearance menu is editable now, nevertheless it must be possible to switch between 4:3 and 16:9 regardless of the current window size. I'd also like two 16:9 modes, one properly scaling anamorphic 16:9 and another to get rid of letterbox bars. Would be useful for proud owners of 16:9 monitors and generally save screen space. Overlay is usually limited to 768. Xv could overlay with bounce buffers in video ram, but right now doesn't (or does it?). Zapping should automagically fall back to capture mode to achieve 1024x576. As a last resort it can scale to 768x432. Better yet it had a deinterlace plugin which can optionally scale 1024:768. We could use capture mode with field motion (50/60 Hz refresh rate) and compensate for filterless hw scaling. Just duplicating every third pixel already gives artefacts, not to mention dropping one of four field lines. Fullscreen mode currently implies overlay and the picture aspect is assumed 4:3. Actually the app should look up an XF86 Modeline with 16:9 aspect or use e.g. 1024x768, kind of a HDTV letterbox. * An external frequency table table would be nice. Would be easier to update, even remotely (libxml2 nanohttp). Possible file format: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE frequency_tables [ <!ELEMENT frequency_tables (table+)> <!ELEMENT table (name,domain?,country+,videostandard+,range+)> <!ELEMENT name (#PCDATA) -- table name for configuration file: (0-9|a-z|A-Z|_)+ --> <!ELEMENT domain (#PCDATA) -- distinguish tables used in same country, for user --> <!ELEMENT country (#PCDATA) -- country using this table: RFC 1766 / ISO 3166 alpha-2 --> <!ELEMENT videostandard (#PCDATA) -- video standard used with this table: PAL_B | PAL_B1 | PAL_G | PAL_H | PAL_I | PAL_D | PAL_D1 | PAL_K | PAL_M | PAL_N | PAL_NC | NTSC_M | NTSC_M_JP | SECAM_B | SECAM_D | SECAM_G | SECAM_H | SECAM_K | SECAM_K1 | SECAM_L --> <!ELEMENT range (prefix,first,last?,frequency,bandwidth)> <!ELEMENT first (#PCDATA) -- name of first channel in range, optional prefix and decimal or alphabetic index: (a-z|A-Z)*((0-9)+|a-z|A-Z) --> <!ELEMENT last (#PCDATA) -- name of last channel in range, same syntax as first, can be omitted if first and last are identical --> <!ELEMENT frequency (#PCDATA) -- video carrier frequency of first channel in range, Hz --> <!ELEMENT bandwidth (#PCDATA) -- channel distance in Hz --> <!ENTITY %context "context (qtvision|xawtv|zapping) #IMPLIED" -- element is specific to this application --> <!ATTLIST name %context;> <!ATTLIST range %context;> <!ATTLIST domain xml:lang NMTOKEN "en"> <!ENTITY ccir_uhf "<range...>"> ]> <frequency_tables> <table> <name>foobar</name> <name context="xawtv">foofoo</name> <domain xml:lang="fr">cable</domain> <country>US</country> <country>CA</country> <videostandard>NTSC_M</videostandard> <range> <first>SE1</first><last>SE10</last> <frequency>55250000</frequency> <bandwidth>6000000</bandwidth> </range> &ccir_uhf; </table> </frequency_tables> Some notes. Country identifies the country or countries using the table. The user is supposed to choose by country and domain, for example US and "Cable HRC" may be listed in the UI as "United States Cable HRC", or DE and no domain simply as "Deutschland". This will require a locale library to translate country names. If the application already knows the country the user is in it can easily pick a default. Likewise videostandard provides a default. Range is a continuous run of channels instead of listing channels separately to save space and typing. First and last are the channel names. Enumerating channels will require a moderately intelligent alphanumeric counting function: "9" -> "10", "99" -> "100", "S9" -> "S10", "S99" -> "S100", "S001" -> "S010", "S099" -> "S100", "A" -> "B", "Z" -> oops. Elements can have attributes to distinguish context, for example the table name as used in various imported config files, or ranges identified as incorrect but listed for compatibility. * Caption below picture: When the video is letterboxed and there are no open subtitles in the black bars (see WSS625) move the video up. Otherwise, in window mode add a black bar below the video and move the subtitle view down. In fullscreen mode make the video smaller than the screen (if it isn't already) and move it up, the subtitle view down. * Custom caption/subtitle fonts. * Support for Multiple Devices: Step 1: Write code to determine if the XVideo-V4L wrapper is available on the current display. One a second thought this seems unnecessary. Step 2: Write code which, given a V4L or V4L2 device file name, finds the corresponding XVideo-V4L port number. XVideo-V4L won't tell which kernel device it opened, but they will share properties such as the values of controls. V4L devices may permit only a single open, and XVideo-V4L may reset properties at open, complicating things. DONE. Step 2a: Add new tveng.c function to changed the "controller". Fall back to attach if necessary, or let tveng1/25.c do it. Replace attach calls. DONE. In tveng_attach_device(), not with a new function. Rethink this when we get a standard init()/destroy() interface. Step 3: The tveng1.c and tveng25.c modules or tveng.c shall forward overlay requests to XVideo-V4L if available, otherwise access the kernel driver directly, so layers above tveng.c need not know about XVideo-V4L and change devices when switching between capture and overlay mode. Also solve the complications noted above. DONE. Some drivers (e.g. graphic cards with on-board video) can V4L2-capture and XVideo-overlay at the same time, at full frame rate. How can we take advantage of this? XXX drivers with kernel and xvideo interface need testing. Step 4: Write code finding all kernel video devices and all XVideo video devices similar to tv_mixer_scan(). DONE. Step 5: Rewrite the video device preferences. Remove the pointless video input tabs, device capabilities and capture size displays. Add radio buttons: * No video display and recording, if that makes any sense. * Kernel video device (V4L, V4L2, BKTR, DVB) - Show a card and driver name as in the audio device prefs. - Ask for a video device file name as there. - Ask for a tuner device file name (BKTR) as there. Show this widget only on *BSD. - Option: use the XVideo-V4L wrapper or V4L/V4L2 DMA? - Option: use the V4L, V4L2 or BKTR API (for tests)? * XVideo device - Show a card and driver name? - Ask for a port number, from a menu if more than one is available. Note this is intended for genuine XVideo devices, not the V4L wrapper, although the user can select XVideo-V4L instead of the corresponding kernel device. To complicate things again, XVideo devices may work only on one screen in a Xinerama setup. * Emulator (for tests) Step 6a: Move the video, audio and VBI preferences into a separate dialog Preferences > Devices. The combined device preferences shall henceforth be known as a Virtual TV Device. Step 6b: Create a new configuration file ~/.zapping/devices.xml as outlined below and the respective code. Write code converting the zapping.conf device parameters to the new format and add one VTVD for each video input. Name them something like: <video-card-name> <video-input-name> Step 6c: Extend the Devices dialog to permit the creation of multiple named VTVDs. Similar to the audio mixer preferences, add a video input menu to the video device preferences. (XXX What about audio inputs as in BKTR?) This will allow VTVDs like: /dev/video0 tuner + /dev/pcm0 soundcard + /dev/mixer0 video-in /dev/video0 composite1 + /dev/pcm0 soundcard + /dev/mixer0 line-in /dev/video1 tuner + /dev/pcm1 tuner /dev/video2 tuner + /dev/pcm2 tuner Step 6d: Replace the channel list video input parameter by a VTVD ID. Replace "any" by the first video input (usually tuner). Replace "any" video standard by the video standard of the tuner, or if ambiguous of the country, or if undefined the first standard. That "any" stuff sucks. I want to know precisely where the images come from, and how. Write code to find the VTVD and channel from individual parameters. Useful when Zapping is configured to not save parameters across quit/restart and see below. Step 6e: Either get rid of the video input, audio input and video standard items in the channel menu, or add a "magic" channel which can be changed this way and does not appear in the channel editor. It's unacceptable to say, change to channel 5, then to composite but internally we still point to channel 5, with channel names in the GUI and all. Step 7a: Create a new configuration file ~/.zapping/channels.xml as outlined below and the respective code. Write code converting the zapping.conf channel parameters to the new format. Step 7b: Rewrite the channel editor along HIG-2. * A channel list row shall contain: 0: Channel number 0 ... n 1: User channel name 2: Virtual TV devices, a check-item menu. Purpose is to name all VTVDs which can tune in this channel. A VTVD set will permit a) Multi program recording when - each tv card has its own audio ADC - each tv card has a loopback to a different AC97 soundcard - mixed cases. b) Watch and record using the same configurations, except devices to watch video need no video or audio capturing capability (e.g. XVideo). With AC97 one can record from one audio input and route another to line out. c) Background VBI acquisition (VPS, PDC, XDS, TTX, EPG) from another channel, fast channel mosaic, live PIP which requires video/VBI capturing but no audio output. Write code to determine if VTVDs share required resources and thus cannot operate in parallel. 3: If VTVD video input is composite: - Nothing If terrestrial tuner: - RF channel name and frequency If satellite tuner: - Longitude, frequency, polarisation etc A symbol may be useful, e.g. plug, antenna, sat 4: If VTVD is digital: - PID (number field) If VTVD is analog: - video standard (combo box) XXX audio inputs? perhaps sat audio subcarriers left/right or DVB audio channel? 5: Accelerator * Use DnD instead of Up/Down. * Allow channel name editing in the table. * Remove Edit channel: Name, Video input, Video standard. * Replace Edit channel: Accelerator by "type a new" as in Preferences > General > Keyboard. * XXX What shall we do with the frequency stuff? * Remove the OK button, changes shall auto-apply. Expect references to channels, e.g. from a recording schedule. Obviously we don't want dangling channel references, or even worse, change the channel being referred to. * Use window menu instead of "all channels" etc buttons. Possible XML Device Table <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE device_table [ <!ELEMENT tv-device (video-capture,audio-capture,audio-mixer,audio-output,vbi-capture)> <!ATTLIST tv-device id ID #REQUIRED -- Unique ID. The channel table shall refer to devices by this ID. --> <!ELEMENT video-capture (video-device-file?,tuner-device-file?,xv-port?)> <!ATTLIST video-capture api (v4l|v4l2|xvideo|bktr) #REQUIRED> <!ELEMENT audio-capture (pcm-device-file?)> <!ATTLIST audio-capture api (none|arts|esd|oss|alsa) #REQUIRED> <!ELEMENT audio-mixer (mixer-device-file?,mixer-input?)> <!ATTLIST audio-mixer api (none|oss|alsa) #REQUIRED> <!ELEMENT audio-output (pcm-device-file?)> <!ATTLIST audio-output api (none|arts|esd|oss|alsa) #REQUIRED> <!ELEMENT vbi-capture (vbi-device-file?,vbi-pes-file?)> <!ATTLIST vbi-capture api (v4l|v4l2|bktr) #REQUIRED> ]> Possible XML Channel Table <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE channel_table [ <!ELEMENT channel (refcount?,position?,name?,device+, (terrestrial|satellite)?,pid?,video-standard?,accelerator?, network?,subtitle-pgno?,teletext-encoding*,control*) -- One (of multiple) channel(s). --> <!ATTLIST channel id ID #REQUIRED> -- Unique ID, preserved when renumbering or renaming channels. --> <!ATTLIST channel refcount #PCDATA "0" -- References to this channel, e.g. from recording schedule, a decimal number. XXX rethink. --> <!ELEMENT position (#PCDATA) -- Position 0 ... n in channel list, a decimal number. Gaps are allowed but duplicates are not. Order of channels in the XML file is undefined. Channels without position number are not listed in the UI. --> <!ELEMENT name (#PCDATA) -- User channel name, UTF-8. Can be omitted, then Zapping will dynamically determine a name (from the device, frequency or network table). --> <!ELEMENT device (#PCDATA) -- ID of a Virtual TV Device (*or devices*) which can tune in this channel. --> <!ELEMENT terrestrial (frequency-table,frequency) -- Terrestrial reception parameters, if VTVD video input is a tuner. --> <!ELEMENT frequency-table (#PCDATA) -- Frequency taken from this frequency-table (table id). --> <!ELEMENT frequency (#PCDATA) -- Tuner frequency in Hz, a decimal number between 0 ... 2^32-1. --> <!ELEMENT satellite (longitude,frequency,polarisation) -- Satellite reception parameters, if VTVD video input is a satellite tuner. More details TBD. --> <!ELEMENT longitude (#PCDATA) -- Real number of degrees longitude east (e.g. Astra 19.2). --> <!ELEMENT polarisation (#PCDATA) -- Satellite tuner polarisation. TBD. --> <!ELEMENT pid (#PCDATA) -- DVB receivers only. TBD. --> <!ELEMENT video-standard (#PCDATA) -- Analog receivers only. Valid values: PAL_B | PAL_B1 | PAL_G | PAL_H | PAL_I | PAL_D | PAL_D1 | PAL_K | PAL_M | PAL_N | PAL_NC | NTSC_M | NTSC_M_JP | SECAM_B | SECAM_D | SECAM_G | SECAM_H | SECAM_K | SECAM_K1 | SECAM_L TBD. See also XML frequency table. --> <!ELEMENT accelerator (key,qualifier?)> <!-- XXX see if there's a Gnome standard. --> <!ELEMENT key (#PCDATA)> <!ELEMENT qualifier (#PCDATA)> <!ELEMENT network (call-sign|cni-8301|cni-8302|cni-pdc-b|cni-vps)+ -- Network identifier, see also Libzvbi Networks Table DTD 1.0 --> <!ELEMENT call-sign (#PCDATA) -- ASCII. --> <!ELEMENT cni-8301 (#PCDATA) -- 4 digit Teletext packet 8/30 format 1 CNI: 0x([0-9]|[a-f]|[A-F])+, cccc cccc nnnn nnnn in binary. --> <!ELEMENT cni-8302 (#PCDATA) -- 4 digit Teletext packet 8/30 format 2 CNI: 0x([0-9]|[a-f]|[A-F])+, cccc cccc nnnn nnnn. --> <!ELEMENT cni-pdc-a (#PCDATA) -- 5 digit PDC Method A CNI: 0x([0-9]|[a-f]|[A-F])([0-9]|[a-f]|[A-F])[0-9][0-9][0-9], cccc cccc nnnn nnnn nnnn. (This is a hex/bcd number.) --> <!ELEMENT cni-pdc-b (#PCDATA) -- 4 digit PDC Method B CNI: 0x3([0-9]|[a-f]|[A-F])+, 0011 cccc nnnn nnnn. --> <!ELEMENT cni-vps (#PCDATA) -- 3 digit VPS CNI: 0x([0-9]|[a-f]|[A-F])+, cccc nnnn nnnn. --> <!ELEMENT subtitle-pgno (#PCDATA) -- Default subtitle page, either [1-8] (CC channels) or [1-8][0-9][0-9] (Teletext pages). --> <!ELEMENT ttx-encoding (pgno,charset-code)> <!ELEMENT pgno (#PCDATA) -- Teletext page: [1-8][0-9][0-9]. No duplicate ttx-encoding/pgnos. Order of channels in the XML file is undefined. --> <!ELEMENT charset-code (#PCDATA) -- A number 0 ... 127 or 0x0 ... 0x7F, see libzvbi/lang.h vbi_charset_code. --> <!ELEMENT controls (TBD) -- XXX what if multiple VTVDs can tune this channel but have different control ranges? XXX we may end up with three controls levels: global, per VTVD, per channel. Perhaps one with absolute values, two with offsets/scale factors? What about controls present on only some VTVDs? --> ]> * Audio device preferences idea: ( ) Use a software audio loop (recommended): Record audio from: ( ) TV card or soundcard PCM device (TV card device recommended if the TV card can record audio): [/dev/dsp] [ ] Select this input when recording from a soundcard: [/dev/mixer] [line|v] Play audio through: ( ) ESD (recommended) ( ) ARTS ( ) Soundcard PCM device [/dev/dsp] XXX or ( ) ESD (required because Zapping runs on a remote computer) ( ) ARTS -- unsensitive ( ) Soundcard PCM device -- unsensitive ( ) Use an audio cable from the TV card or an external source to the soundcard: Record audio from: ( ) TV card or soundcard PCM device (TV card device recommended if the TV card can record audio): [/dev/dsp] ( ) ESD ( ) ARTS ( ) No audio recording [ ] Control the playback volume with the soundcard mixer and select this input when recording from a soundcard (recommended): [/dev/mixer] [line|v] XXX or [ ] Select this input when recording from a soundcard, and mute it because Zapping runs on a remote computer (recommended): [/dev/mixer] [line|v] ( ) No audio ------------------------------------------------------------------------------ Please tell me about anything you think is worth adding: http://sourceforge.net/tracker/?func=add&group_id=2599&atid=352599 or mailto:zapping-misc@lists.sourceforge.net ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������zapping-0.10cvs6/help/������������������������������������������������������������������������������ 777 � 764 � 144 � 0 10443536370 7746� 5�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������zapping-0.10cvs6/help/C/���������������������������������������������������������������������������� 777 � 764 � 144 � 0 10443536371 10131� 5�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������zapping-0.10cvs6/help/C/commands.xml���������������������������������������������������������������� 644 � 764 � 144 � 41770 10206044375 12474� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������<sect1 id="zapping-commands"> <title>Commands Command Line Commands can be given on the command line when Zapping starts. This was intended to change video device properties, the program terminates after executing the command. zapping -c "command" A separate, lightweight tool is planned for this purpose, and to send commands to a running Zapping process. Up to version 0.6.x these commands are available: set_channel (name | number) Switch to the channel. By default the command tries to find the channel by its name (second column in the channel editor). When no such channel exists or the parameter is a number it selects the nth channel from the list, counted from zero up. Starting with version 0.7 these commands are superseded by the new Python command set, see below. Keyboard Customization Commands can be assigned to keyboard keys in the preferences. Starting with version 0.7 we use the new Python command set, see below. The old command set listed here is automatically converted for compatibility with older versions of Zapping. The commands are generally equivalent to their new Python counterparts. Parameters in [square brackets] are optional. channel_up channel_down set_channel nth lookup_channel name mute [toggle] volume_incr [n] ttx_open_new [page [subpage]] ttx_page_incr [n] ttx_subpage_incr [n] ttx_home ttx_hold [toggle] ttx_reveal [toggle] screenshot [format] quickshot [format] LIRC/ALIRC Plugin These commands are mostly superseded by the new Python command set, see below. They are still supported for compatibility with older versions of Zapping. QUIT Terminate the program. CHANUP Switch to the next channel in the list. CHANDOWN Switch to the previous channel in the list. SETCHANNEL n The function of this command is affected by the preferences setting for entering channel numbers on the numeric keypad. By the default it switches to the nth channel in the list, the count starts at zero. Alternatively the number is interpreted as the RF channel number of the requested channel. Single digits combine to numbers when the command is executed repeatedly within a short period. For example "SETCHANNEL 1", "SETCHANNEL 3" jumps to channel 13. ZOOM Switch between fullscreen and windowed mode. MUTE When audio is on, mute it, when muted switch it back on. VOL_UP Increase the audio volume. VOL_UP Decrease the audio volume. Python commands Parameters in [square brackets] are optional. Parameters in 'single quotes' are strings, otherwise they are numbers. A toggle parameter can be zero to switch the property off, non-zero to switch it on, or it can be omitted to invert the current setting. General zapping.quit() Terminate the program. zapping.switch_mode('mode') Switch the current display mode. You can switch display mode and capture mode at once, for example: zapping.switch_mode('fullscreen capture'). 'window' display video or Teletext in a window 'fullscreen' display video or Teletext fullscreen 'background' like fullscreen, but puts the display in the background (if supported by the window manager) 'capture' display video in capture mode (starting with version 0.7.2 this will not switch to window mode) 'overlay' display video in overlay mode 'preview' display video in overlay mode (starting with version 0.7.2 this will not switch to window mode) 'teletext' display Teletext (starting with version 0.7.2 this will not switch to window mode) zapping.toggle_mode('mode') Switch to this mode. When this is already the current mode, switch to the previous mode. You can switch display and capture mode at once, for example: zapping.switch_mode('fullscreen capture'). zapping.restore_mode('mode') Synonym for zapping.toggle_mode(), deprecated. zapping.channel_up() Switch to the next channel in the list. zapping.channel_down() Switch to the previous channel in the list. zapping.set_channel(nth) Switch to the nth channel in the list, the count starts at zero. zapping.lookup_channel('name') Switch to the channel with this name (second column in the channel editor). zapping.resize_screen(width, height) Resize the video window. zapping.picture_size_cycle([n]) Switch to the next entry in the list of favourite picture sizes (as displayed in the context menu), +1 forward, -1 back. zapping.hide_controls(toggle) Whether to hide the main menu and toolbar. zapping.keep_on_top(toggle) Whether to keep the main window on top of all other windows (if this is supported by the window manager). Dialogs zapping.control_box() Start the picture controls dialog. zapping.program_info() Start the program info dialog. zapping.channel_editor() Start the channel editing dialog. zapping.properties(['group' [, 'item']]) Start the properties dialog, optionally the given group and item. zapping.plugin_properties() Start the plugin properties dialog. zapping.about() Start the about dialog. zapping.help() Open the Zapping documentation. Teletext zapping.ttx_open_new([page [, subpage]]) Open a Teletext window. When a page number is given, go to this page. zapping.ttx_page_incr([n]) Advance the Teletext page number by n. This can be a positive or negative value, by default 1. zapping.ttx_subpage_incr([n]) Advance the Teletext subpage number by n. This can be a positive or negative value, by default 1. zapping.ttx_home() Go to the Teletext home page, usually page 100. zapping.ttx_history_prev() Go to the previously visited page in the browse history. zapping.ttx_history_next() Go to the next visited page in the browse history. zapping.ttx_hold(toggle) Toggle the hold state of the displayed page. When off, Zapzilla will rotate through all subpages of the page, if it has any. zapping.ttx_reveal(toggle) Whether to reveal concealed characters on the displayed Teletext page. Caption / Subtitles zapping.closed_caption(toggle) Whether to display closed caption superimposed onto the picture. zapping.osd_render_markup('Hello <i>World</i>!') Display text superimposed onto the picture, with Pango markup. zapping.osd_render('Hello World!') Display text superimposed onto the picture. Audio zapping.mute(toggle) Change the audio mute control. zapping.volume_incr([n]) This provisional command changed the audio recording volume, it is no longer supported. As a replacement use zapping.control_incr('volume'[, n]) to change the soundcard mixer or video device volume as configured in the preferences dialog. Note that changing the volume does not unmute. Controls zapping.control_incr('name'[, n]) Advance the control value by n units, usually +1 or -1, default is +1. The following names are presently recognized: 'brightness' picture brightness 'contrast' picture contrast 'saturation' picture color saturation 'hue' picture color hue 'volume' audio volume 'bass' audio bass 'treble' audio treble Plugins zapping.screenshot(['format']) Start the screenshot dialog and if given switch to the format. Currently valid formats are: 'jpeg' and 'ppm'. zapping.quickshot(['format']) Take a screenshot without starting the dialog. The last select file name will be used, with an incrementing number appended. When no format is given the last selected format will be used. zapping.record(['format']) Start the record dialog and if given switch to the format. Note this is the name the user gives a particular configuration, not the name of the file format. zapping.quickrec(['format']) Start recording without confirmation. The last select file name will be used, with an incrementing number appended. When no format is given the last selected format will be used. zapping.stoprec() Stop recording. zapping-0.10cvs6/help/C/zapping.xml 644 764 144 43252 10360121113 12323 ]>
Zapping &appversion; User Manual 2004 2005 Michael H. Schimek 2001 Emacs documentation team (Regexp introduction) Michael Schimek H
mschimek@users.sourceforge.net
This manual describes version &appversion; of Zapping. Feedback To report a bug or make a suggestion regarding this application or this manual, visit the Zapping bug tracker or mail us at zapping-misc@lists.sourceforge.net.
Zapping Introduction With the Zapping application you can watch TV, take screenshots and record video and audio. Zapping has a deinterlacer and a Teletext viewer built in and supports Closed Caption and Teletext subtitles. This document describes version &appversion; of Zapping. Getting Started Installation Which hardware is supported by Zapping? Zapping does not talk to hardware directly, it uses drivers already installed on your computer. Hardware thus supported includes analog TV cards, graphic cards with video capture capability, both with and without tuner, and some USB cameras. Video4Linux or Video4Linux2 kernel drivers Zapping can capture video, VBI (Teletext and Closed Caption) data and overlay video if this is supported by your driver. For installation and configuration of the driver please consult V4L or driver documentation. When the driver and your TV card supports video overlay the appearance can be improved by enabling the XFree86 V4L/XVideo interface driver. If it has not been done already, open the file /etc/X11/XF86Config and add Load "v4l" to the module section: Section "Module" … Load "v4l" EndSection Alternatively Zapping can use the XFree86 DGA extension. You may have to comment out this line: Section "Module" … # Option "omit xfree86-dga" EndSection Unfortunately on some graphics card the v4l module and DGA do not work very well or at all when 3D graphics support (OpenGL, DRI) is enabled. BKTR kernel driver (FreeBSD) Zapping can capture video, VBI (Teletext and Closed Caption) data and overlay video with this driver. For installation and configuration of the driver please consult the FreeBSD handbook. XVideo drivers XVideo is an extension of the X Window system supporting video capture and output devices. With it, Zapping can display live video in a window. Video and VBI capturing is not possible with XVideo. To Start Zapping You can start Zapping in the following ways: Applications menu Choose Sound and Video Zapping. Command line To start Zapping from a command line, type the following command, then press Return: zapping When You Start Zapping When you start Zapping, the following window is displayed.
Zapping window
The Zapping window contains a menu, toolbar and a context menu which opens when you click on the video with the right mouse button.
Zapping Context Menu Context menu.
Usage Video Modes Zapping can work in windowed, fullscreen or background mode. In each mode it can show Teletext, capture images or it can overlay video. What is the difference between capture and overlay mode? In capture mode Zapping programs your TV card to store images in main memory. This permits screenshots, deinterlacing and video recording. It is also quite CPU intensive because to display video Zapping must copy the images to the X server which programs the graphics processor to convert the images from YUV to RGB format, scale them, and copy them into screen memory. In overlay mode the TV card stores the images directly in screen memory. This is a more efficient display method, but now Zapping cannot access the images. When you try to take a screenshot, activate deinterlacing or recording in this mode it will switch back to capture mode, if supported by your TV card. The available PCI bus bandwidth limits the image size in overlay mode. When the window or screen is larger than 768×576 pixels you will see a black border around the image. To avoid this Zapping can automatically reduce the screen resolution in fullscreen mode, or you can switch to capture mode. Capture mode is not limited if your graphics card supports hardware image scaling. To switch between modes choose the mode from the View menu, or the context menu. To return from fullscreen or background mode to windowed press the Esc key. In windowed mode you can freely resize the video. You can either resize the window as usual by dragging its border, or choose a size from the context menu Appearance submenu. This menu is editable, see the preferences section for details. To Change Channels To change between TV channels you can choose from the Channels main menu or the context menu. The menu also lists video inputs on the device and supported video standards. Note you can add composite video inputs to the channel list as well, see the Channel Editor section for details. To change to the next or previous channel in the list click on the Ch. Up or Ch. Down button in the toolbar, or press the Pg Up or Pg Dn key. On the numeric keypad (if NumLock is activated) you can enter a channel number. Either the number of the RF channel, or a channel list number. This can be changed in the preferences. Picture controls To change the picture brightness, contrast and other controls click on the Controls button in the toolbar. Control levels can be changed by keyboard too, as configured in preferences. Volume and Mute Functions You can change the audio volume or mute audio in the controls dialog, opened when you click on the Controls button in the toolbar. Further you can click on the Mute button in the toolbar or choose View Mute . You can also press A or the Enter key on the numeric keypad to mute or unmute, + or - to change the volume level. Caption / Subtitles Caption is an aid for the hard of hearing while subtitles help viewers understand programs in foreign languages. Technically there is no difference, so we use these terms interchangeably in this document. Zapping supports Closed Caption and Teletext subtitles. Closed Caption is common in the USA and can also be found on DVDs and other media. Teletext subtitles are mainly broadcast in Europe. Zapping supports multiple languages. These are transmitted on different Closed Caption "channels" or on different Teletext pages. Whenever possible Zapping displays language names instead of channel or page numbers. To enable subtitles choose the desired channel, page or language from the context menu Subtitles submenu. To disable subtitles choose Subtitles Disable . You can also click on the Subtitles button in the toolbar to enable or disable subtitles. Closed Caption channels are always listed in the menu if transmitted, Teletext subtitles only if the station transmits subtitle links. To choose a Teletext subtitle page manually switch to Teletext mode, go to the desired page and click on the Subtitles button in the toolbar. When Zapping displays subtitles you can drag them to a different position with the left mouse button. To resize subtitles hold the Shift key down or drag with the middle mouse button. Clicking on subtitles with the right mouse button opens a context menu where you can disable the subtitles or choose another language. With the Encoding submenu you can override the character encoding of Teletext subtitles, which is sometimes incorrectly transmitted. Take a screenshot To take a screenshot click on the Screenshot button in the toolbar or press the S key. A dialog will open where you can choose a file name, image format and compression quality if applicable. The deinterlace option can remove interlace artefacts on the fly. It makes no sense to deinterlace scaled images, so the option is only available if the image height is 480 or 576 pixels. At your discretion screenshots may or may not contain the displayed subtitles. Screenshots are only possible if your TV card and its driver supports video capturing. Record video and audio To record video and/or audio click on the Record button in the toolbar or press the R key. A dialog will open where you can choose a file name and format. Click on the Record button in the dialog to start recording, on the Stop button to stop. File formats can be configured in preferences. You can create different configurations and name them as desired. Video recording is only possible if your TV card and its driver supports video capturing in realtime. Video compression hardware is not yet supported. Currently recording is not supported on FreeBSD. Using a Remote Control Zapping supports the LIRC (Linux Infrared Remote Control) infrastructure. Visit http://www.lirc.org for more information about LIRC. To use LIRC you must create a .lircrc file in your home directory. For each remote control button add an entry like these: begin prog = zapping_lirc button = VOL_UP config = zapping.volume_incr(+5) end begin prog = zapping_lirc button = 0 config = SETCHANNEL 0 end begin prog = zapping_lirc button = 1 config = SETCHANNEL 1 end begin prog = zapping_lirc button = 9 config = SETCHANNEL 9 end prog is the program interpreting the command and must be zapping_lirc button is the name of the remote control button. Presumably with LIRC you installed /etc/lircd.conf, this file lists all available buttons. config is a Zapping command. Valid commands are listed in the Commands section. Suppose your remote control has a TV/RADIO button and you want to switch between two layers of commands, much like Shift Lock switches between lower and upper case characters. This can be accomplished by embracing the entries above within a zapping_lirc section, and programming the TV/RADIO button to enable this section, "switch to this mode" in LIRC speak. begin zapping_lirc begin button = TV/RADIO mode = radio end Zapping entries … end zapping_lirc begin radio begin button = TV/RADIO mode = zapping_lirc end Other entries … end radio Mode-independend entries … Which mode will be initially selected? Well, none. But when you start Zapping it automatically switches to zapping_lirc mode, if such a section exists. For further instructions please see the LIRC documentation. &settings; &channel-editor; &zapzilla; &commands; About Zapping Zapping was written by Iñaki García Etxebarria, Michael H. Schimek and many contributors. Visit our web page at http://zapping.sourceforge.net. To report a bug or make a suggestion regarding this application or this manual, visit the Zapping bug tracker or mail us at zapping-misc@lists.sourceforge.net. This program is distributed under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. A copy of this license can be found in the file COPYING included with the source code of this program. &fdl-appendix;
zapping-0.10cvs6/help/C/figures/ 777 764 144 0 10443536371 11575 5zapping-0.10cvs6/help/C/figures/zapping.png 644 764 144 36506 10443536371 14001 PNG  IHDRJރbERT+1DDZTFXB@[굖D#Qzihuq0R.SDoP |wp9: Z*TI"}*UQIy Ǫ! iG^i?MAyzv\r0wj3+#uy{7_._-7 {muՠP,A ]"ZDX%zhHXbAGnzu4mqPhlRO4JoMxyrT;.ǘN&O yiN)eؖe}Q]wZCq9Z}ujY1Ah$J# ζ1Nhc~'ߚy{1#OZ->y4IM)|rqD$?dgr7s95b{ڝ:x.! V'u%X#vkNQk]ﰨԆ= t7–cu]O]j8}izë&ߚ4-"{!p?y/w}m$~2ly+h=Z]Dҧa󌣫MVm;VJʛ6"vwsӎ:V[ΫB>S*0bݱU-r^OPŽOw,ݽ֭,čN>ކ-ěM#[llt7'{e͉{7)6֭^ӴEDgBBD=Kߔg]P;K |[ o+ůgNh]4h /sqnեoK-n[KC8[Ԭz޶W;ܖט,T+}W s7o2 _nTcxYvSL?牍xnq /ccCqc6} KCZǵ[ ,*^i1oK;qK9CD w nbԑm%dؘv='ZxjN5ORplxt6cc(~ UmxUt㙻=q#2a$wav8e^nKRZz7/JD[j5cVc LJ%8ܚMZO{djww#"m[W5=@DD*ZIBWGJP86\tDn=6"*8&r7v{$iƶʫoccMҧm-Bͭ}_kܭ妁-C q-D$4&"0Ѯ&>~:EɊe9[svr5dT x{4~6_^{d{ҧxc1r7sG*=/4̵=fKח^v> O{,~ɳA{rϰ\WdwHn+F1F?G2dVAU1]5̼{y!L̲r9_,= s[wÿmX( dD*VJӧ'RM:;*"tq?9$~|i #;@KmڥO?lNDjUm;Gf޹NO>nrf/cnK"bć $pje}pHLdqD1#חl9šy犛H:nu]=d.џr'/UѱWJBInF n,o.|짙~?p}~ggVK/D$w3"*;'8/Edxhx .=}Ņ܍ʝ-^_J+4f/RK_{ba3vn'JLѳ'k'9yg^j>t-ipw_gY)D$w3ّ' (>ϊHrTIK؉?.֪:w+>gw7AEDVL9> eժqpVSn~ab1HJU*m=nue8p'd"1zv 瞇,"*d"i=閽וV߱~i8+cϲ#gBZ.Hܭ ˷W[ĴaY1euH=vӐgsOQ'Sn~aٙ>A;3ǭQiQ!UH̲DR~Av?⎣3Ѯ=ܤbH]$"`=ΎdYr)w#78U=ϸ1J_2W>9ߞOHf.;u~b'{wS//nZVgc ~{zRq7b,"N>VzT*O5ge5w)KZU RsĹ7'S'Su]?5wmntZDO>sѮn{=w.N%OF^?{srg!걖]DJDҿM>ML~< 8_;=NˉS'C/ nx@T9wdKmֵS>[0擞VQ/g_06xJyÏv5#6u'w3|jP(/C)ξn2W#;M}ޒȆۄ0 {3Qw 3{0cSÅC`"<ܵݾ<yylIeڌOqܱ$W[5z`"ƞyחo-״>r )n ~jsχ/ B2}5ëh:ТIAcsS1J?tx?)i\;{-SRri@0 ={+"b u?=rii]M]\.AD%BcԴUT+Z W"FS]*ݸ/ұ ?~^Dk޷ƕuiWK4s-#"SoNŷAMbRJA"_YW ٥)ĺ, l爈\`{%unKD.^הeYѮ.n(|2|edw4H] w%ֵzMD4^+lJ}`YV?5c[FUDZ/J[K#/ :a sO w sqet%H2:Aaq=];nGeyʙ٬qL hRJk]T'{josI8iҵ|~.|Z2ju=\ G#s"y"1€oXknjSWF^ /Nɥg̵ύ;??x^O_KDb/ FGFeJ]J>˱+6cuY[*}S*)a8K_.M]\&" e[3h۽GV~X[J&5%_岈ĺMHa:XZR"N>O?t29 NoJO55}q*qfxh83'VGΈ{g'R˟n=/uT07eu†Y7;V̲,6ayK-"/ 8O;K7r'txzs_n[c]^V䱾\їFdlib>H4qj0Xw.Vx.ZETbrd~ @奄|vxE.+Vt} ZBDTfNDҧ{MVKY"RZ_`&?BzŁ~g]: IZ;C陿] [7=wxl@]**UD)*bVlxǚ֞ fV<-1</s)Oi%J"i{,|NiV^{\gDEEĿ_y~9˞u|8~~u>lWªuy1T%.+H-躮S>3<KCgcR/+p!u"5/<˪TEERcۙzkX, nx1]עDI${8Ԧv~U-"V*)i,˻ywK3fyXzZkЛE$eH>TyPasZ>0CDl8:;L$KwJUO9U5?("ϝ_ge*:~yTؗ;فDĎۥΌ~,}*TGO{[W:FZ]۽rpۊID ťKӢE^LX֖rQ[E >LE$] Oҧӹ9[˵xuڮ8a<[Q6ҹTƤ~93t]0ߟ|aT}-}]Z8.:EwDэ!|eeƟ#ũKT'8Й}iԲ[9_g> s =4,fYS/ 04%Ŏve> ̝{̾76,hD%u3d~J1e_WTԎX $*^ŻJhn=JjuT*/Wˎ+aP̲[ִq& YD: z;}=|,[?0^+ _=ğƯ?+"ӗך;g>lpHvpl=*"c`ҧ1׶0϶ ~RVn2xzpylƚ$Z.VVR^y;3ɩArqf2㶮$Պ,%J+x֍K1{Q֚z'R*fŊwm1]w^eV]VxeY_-6ǟ硣%ݖ[ Z eXZ%X ^s躞sY(kl$tw>9buDd◹lZ<\pRN,"v42C&!3_>G$1U?WDb벜][N)}DTKu%]k7yHvÁ_MMDD:yh 0QchpPHhtyaRhق=cDB۽G]qbr_Rx/awx&Tm_zЋÎgqܾ3OP!+w|nե/q"5wo*2W?w3WY =b;GʟO5=0QU^m\߹ddyx#7pf90?F ˍkԢ葥I0xsޭ3^y_(: X\}i%O\)v-xOpW?Jw{$0x\.OoT::Kdۻy?(kÿ^)|o<(axb٦j,r޶7D;[@O W6{?&^u['>|fq7je}'H擹D=bi77tY>|9UY?q'{dϟj_e:;*"t97Zn 3\qIsܾpn \~xoc*Ł3n"8~e^mm_-\Ro~|_D DT0tGy랟>=훺8TF7WL;5֎NnS<7Qhsok7~+KӃ*mղԲv-Tn6o7Ϝ=])yjoO{}lqa>w#rwF2g2̎ˊH  M$ܭ>ADVJ+.}1VV}ZK#w^Xjzq\#cǙzvc[r춵}y$q̝^]xicObYq]ރ}ɑ'SyYxbsrS;צ-òM;bǙR)TIsI& 0b;|ҍq Zxwܨm틷mᷚfr7sgGSdϫ/[\ʥNR'ø6u~2u?}?DxjYYcϽq=b;}6< [oy9_./M,KD;o =ۏhzy,#EZo]isf15Mf}ɛeD/zc1 dͯi]ʫx<>Svy:,?(ʹ[Kos7c>,+}\b6oYm?!ud%ߞ}}Tܓf:30uqj)D'-;Gwg|bR5jmᷚ`FNWu9f3^ݻoR/骞84~+}j_0s  knTXP 'ViyT΍ZnFn翲.{\m}v]V=/smM;[S[>3|ëEK%fޞqw""=fP]їDdԉ~{W.~,;ҰSsOETz9ï6ߪ-)*?/Re9O;n.5tf`ዅM-~KJzӨT<|k2UV'JAm5}g߽tci˵C`Wf޽R(kU-"~<6jz_^ުQgʝRO=ZUoeߠSR >*mղe;_L[͜[jWߝ/Gܾyg'sd-/pᭉ#TPkQ/g`"N1w/R̲$"kٕK00ԛ":oӲ;iO[Vb4soN7n Zצ.N9oRLsy{zdyGd^?7M*G )hRie Vm1}fߛMH%O$΅LL5n7[!ysoN%v۶m-1>pfpsW߽,aj}k+cjui"jӬ%ٟK$gߟ7("vO|驋Sɓ|,Wrnr13gV*rf?\x caGv?:{r7s[W߻barOP%fܣѹcS_1tCu AB`Vkh??3?4ߗVnLDB`"D$4&"0 HhLDB`"D$4&"0 HhLDB`"D$4&"0 HhLDB`"D$4&"0 HhLDB`"D$4&"0 HhLDB`"D$4&"0 HhLDB`"D$4&"0 HhLDB`"D$4&"0 HhLDB`"D$4&"0 HhLDB`"D$4&"0 HhLDB`"D$4&"0 HhLDB`"D$4&"0 HhLDB`"D$4&"0 HhLDB`"D$4&"0 HhLDB`"D$4&"0 HhLDB`"D$4&"0 HhLDB`"D$4&"0 HhLDB`"D$4&"0 HhLDB`"D$4&"0 HhLDB`"D$4&"0 HhLDB`"D$4&"0 HhLDB`"D$4&"0 HhLDB`"D$4&"0 HhLDB`"D$4&"0 HhLDB`"D$4&"0 HhLDB`"D$4&"0 HhLDB`"D$4&"0 HhLDB`"D$4&"0 HhLDB`"D$4&"0 HhLDB`"D$4&"0 HhLDB`"D$4&"0 HhLDB`"D$4&"0 HhLDB`"D$4&"0 HhLDB`"D$4&"0 HhLDB`"D$4&"0 HhLDB`"D$4&"0 HhLDB`"D$4&"0 HhLDB`"D$4&"0 HhLDB`"D$4&"0 HhLDB`"D$4&"0 HhLDB`"D$4&"0 HhLDB`"D$4&"0 HhLDB`"D$4&"0 HhLDB`"D$4&"0 HhLDB`"D$4&"0 HhLDB`"D$4&"0 HhLDB`"D$4&"0 HhLDB`"D$4&"0 HhLDB`"D$4&"0 HhLDB`"D$4&"0 HhLDB`"D$4&"0 HhLDB`"D$4&"0 HhLDB`"D$4&"0 HhLDB`"D$4&"0 HhLDB`"D$4&"0 HhLDB`"D$4&"0 HhLDB`"D$4&"0 HhLDB`"D$4&"0 HhLDB`"D$4&"0 HhLDB`"D$4&"0QkRÄw?Cu1\cV,{->pMG6*UW˺AkPpT4=Y߂tINR PJ~5~D;.Qu5`A4/7&G-"IENDB`zapping-0.10cvs6/help/C/figures/channel-editor.png 644 764 144 113466 10443536371 15246 PNG  IHDRE'PgAMA a pHYs  ~ IDATxmhX0|A ؐ B#Xl>ĥ @l:Ln l}.&]]"&؅ q U>b_`/dZB4`,X>8c;GqΑ_9< B M;jq3i%L q5B#p7F<Mӎ2gAu]u *G!Ё1^ҏg^ҡPDlU[6BҖ͇zI7g+I(\}CYT(Ay & Ѯ,4йOT b|}yuMt]7uqfD)Z65k ^3ȴ_8_R0Ɔ%J _bO3iMӠ E%LGBxt&s8]&s%m/mo%(X X,hY]rϖvP l'[, @[W<<&Jg&=FTw+l1]׋D聄J<+r{W~bn72Y+;xGcCiI8HxuX,}!mY@p2U!m'~io,4ܮ) &dfJ1)|ƀ ䷲A6giQW J-WIje.1D%Ƚ)jg]dM0(-K6f*W+):( t]W`1^H*J6;Xɫ϶U=8B Kz~Ȉa hUOTWb^m4DJvEZeȯHv3f3\7l6gKz }f>cuX8ZFi&IR]S5X)D~+$ %!Ik_sEDf (ֵU\̫Z![L`d Lǂ 5!Jud Mdys-mc55k\bNS ]$[$s;Qk9Yv2kicXf~gw~4/Ѯ~_sųʕ]+ lU̽Q0Wҵcsg BR `xuwW?ˏ3 M۟kvCQY-~PUy(J\O +ɸ* P*B&< Aœ4isfZO^,6BYS^ ʺj4EQȍ؆Bʾƃth_9O?Kdn i_ה5u`Ǒl.0+N"y(*̊k5!9oyΑ;$zAw8YprYk%pZx&xo` 1sg}BOoT>Iϕo&3wӟj]y%(HW /ҕbBq\N/;/M_u!ΧÍgZA k2a"^ A!t(ZgdOwлm:/q`}!T'gl2TUn%ggZK!Zq>Pg-舍^ Bn#B!BBB\Bg4g!YusHx Euv%SI_Bg3uE|xWB0!_Ғ试Aب.|{cTgN&E~wQ]5-0p~Wy/tWM;ʏz+6«-)+.[f)+tJ7-,JݽQI.Ly ew0|wZvȝQUwz9',\e|aq5|UIW674| Ov+)bS-Jp۩[B<&-J\if ֤3l 9*SA|;p2I Uwq77\&->}v]碱"M)[7-f9}[EU5a*)ܵad IR+z\VeK,<0*{=C}!4鮗v߰xL$ q@AVŮ>էhj'e ˿m'^5f"x:1XzsZ-bAi8MvBIvV (Nu镌d;uۣgkfC&m=L2^l:ۣ`0Q>(`X*)t7m.Ί ,kj^(|TV6J?(4,Mx碱BAyGo7ĸn;"9`Gw#tY,VPTҨjW:v d+lT|.ݴVЫ3[̕歗 yD? :,hAI7ޞněʪ0J[d04ΊGi5ըiS\jr0074\,DtꗌJ5n??Z#trhQGCpb<(N:oD0JRd2Z0BҴ^Ïͻb>fm:Owhjw dv[0^ ?ǬUYYW`Wd:67 Y~~"l:(| =ł.& w5݉LDqMEQZb~zjxY$wˣKZ+[Xg/K̓Fona>cr-mw[B)G?߫' ,cmdgt&S,j,RdBti?N.}Tn|ך"J%a7kz=_<ngkqĮHpt3صzŚۈ\7mO? 7MSCu]u2J:Dg[,Wj+ceMubBUë|F0h͏M&Ռ{y|#t\\ݮ]cgI'u~Y:G!~!}~7/ \!tO3t3A+=g!ƳFKj=9xKBGG!t`(ţh6|ai$Sɑ[#T'U=OQd^K\>1VEg3 ku1_ M?}9']y- b?Ĩ;(V2qt[|*&SɅBr9ۘqQ~+5c(pW43y1:Zo$ώڕ Y5.#8} _2u칞{} Wҕ̯Mӌkוx6zg=f>?ѝ+JZxxW:2d+.Dѹh]c.1ZA Lo#7!OO~u6$I2 {ޟ%=2f.LUۣ~nQ.苴'fSs:NvKM~jpcgH2Ts… ?1+^ȓjiD4 `hb?V3EQzI7ZOmDX"ouɚ?13=azbtg'"{w$ ?lk޺v]q3{uݫIlި(EQl3Bg3Bg3Bg^?C!tivU@ :J Ήv0],7#7BX{=nٱ/:o<[XLP$ _ƋUӿR]Tw>x wcwOәS]\Lw٨bz4c[Xg[sq.6}972 Gwn gfl4cg5En_ ڲ0qݨ3 @:qxˊoQ~TM*B۝x7x߀ |Is!4yJ q6Wҫz4cd ӟ\LZL2l 9jPu0G镤&z0SSl.7}$2&L}Žդ-SBxLZ+P,ha2iUlIEcEi&@igϙ״ЃwmoS[ViMWkJcBE籿QZ̄Go#ҫl.n z^'}<C UfE5߶=R4 EɯkPb+\},A9j'Wj#VT5X-"]ZR~$@^ )kjsX/(JuR~1<XaXu4EQ+oKzAoT'EwӑE!jΤ>HnHx&XJ9G(tx&F[VN^ukbȭ@%;X 6/lN{lnUOplv۰v3vwK&"\8|_dь->~jj}-+`"sq;,m sl@YSaJ:0^?$%p_uVsBwGE~#'^Z+]Ś\N O]elJ{;?uUZ$Wq=O$6σy'3)ְZ?=7YG?/p@MCڶZ~˱N61&0jZz;o{sT*Ej}杵N1P(g8H L`6@eIQʚ|䇈1B:NV567r{H_l1RsU~=[A c.y>nu/5lݶGSV~RT\W\T'p:v{I[NBHWn".Mw>E :|j5pzt7|FP=B蠴z߈B$:j#tިv!: 0!: 0!: 0!: 0mNX%P]T풩EwU?ܮB=:8Y*ڵ|0.\Z^(0gj6Y'GnzlҒtcVl*J̟)L~a#k:0s"̊;gF^|o߹\.4Z% xJE↸&o LcX,z7 xUUҢ _Ԡ]*YtxvI&Wҳuce'V lK36T@~#sptU5!#M :59&3;M?aьMRs]6L@{mD1<4L716/l:$ zں{A0c|HݜVr7&@tV}^ 垓9W>iq!lXd[Oȹ?t?ދ9dC6Kz/cҢd6*|{ł|. ~sl.7}$2&LnKK|>5%V%ŧMEHgnzFԴ}|l|/SM:0헲WsA/ 'SZ4Mㆆ3M9K4iڎH ?Z~nFoϹ=1(Nu镌d;\obZS!˙ ڎS:佉{qc!ѫ >_X\^ĒPp2ht34 #b5`sUk:m-Z:?pUEZX,5nbmQHwZAoo@{: ߞs{1OR(=/C_VM=>/OF_DMgRti1* dWdzA7BZ7R^k ׼G2t `<۟s./Ɖh=j L8㩛XM~#&T 1έ9#k2}qe}Px5~4m շ}x3i!3PˌFBqveE4x?^I)=W<(8H$Pd9k4o;Iz(UG7$ s%+8,@|/;ٺMEQZb~>> TTXГ+F9Px5O?KdnuzsEU+(b/DrP/;ߔ^@]SsQr^np&麮NO JtqV4ZaXO)]已B篛Fon\6SU5$⾊hE֌4^ukb AG;+R7kz=_<ngkqԣb"E(cX]{)|sq;,m s>"]/'tfl1K%&[?^p3$I陕 `̟Dțf+elD IcAQ"Mu:Y'fqGs?uUZB$Wq=O$ _珻J4gsQ/]*:=x*8kL:>~vQR>; xvaB!^?C!t`Q`"XL)8hfa~&mOqztҢDuvI˩JJ2bez8r]1!Nx[C =&ҫX2:p:T ΤNWzAEU r^3|ē#JB ^`"`"6j@~=!>ʣdz#}3{S;uoje] #Ip[7|xg@Ix~eW7w_2Ã}i m]H LY<¡R'jͽ͍i$I/Dȭ@Ww(L(L <+q:N aꤌuT*:)aOFtbxFuvsq2mgrqЌmaOKx;Y{Y>!fl?e\:O0'o݅&ǩvj;?پUF\\W.Q(t~8cdznϢF7mm7\v-'CEwq7F >$Y.o8qήd*U9ʱJ.7;U`u-V /Bz%(J>ȑ'c<{ߪQɑ\N*9V'LJ>WEF|~44nf.S>(98b}9g >ħ?'Cp_uGo “7&ł%8M˫YUBZ\=*G\4\|& s!4yvg&BxNq]X;w0l 9u&Si$DH$dWsA4$BvTq6 ^/w#LJR~ =&z/cҢ]%_mL0qKs􎃊ceoox|Vs[;F'+n;t]~H;կq뺞ZI'WRP$9a<۪ <aN"y(*̊9*;fzt,t:}׼6BAHJ#>MEQZb~:苨 \1Yח_Glkmǒ zr% ɂ fGog2FW\5|gBoܑo#->c#{lA}ojwѱkg,| ^n{}4Iޛ W3Aof%.p9Y(Ag7|(?4\i. :,a"X'> L; k%p:p7(<G1JT~<65jxn%z'_y|%PSݺyu]qzҒwyXϓ,nR*Azxk#iI~yA(U8ӽ?+!:IK ޟ ?kZ:6V`8goՕ3 1B|xGuv,dzi9ʜ%ZA k2a"^M: <8l|=SYڥŅBmBB:fa6/\`ZiQ]׹al6NZVl%^rHUnȭ[͘ڐ%;f!>ݨ:F}!HKR] aLݓ˞<'a:OWVT Lo qLf2 & rp'hu9L ܃ x얂Yctڍiv!Юg=C! OB 8!Y !Y !Ys9bg&"1 6π;6>z{2n[%]׋ c[|>!P v9l! zҒc%BD!t6a!|;E36~RpruSd*Eu˔s>ʬTgEwz*/:.q6s97C#(`ʮ掻"Nqk'ɐ0/G'FS7M?3N/']rQoĶp\RYS3d{g`wwerߌ޴m~V>S>KEo?eqC5۞+{JR!oX"IwKkSq6 0p;hF36̸m`֭UOH.nER`eA~#sptqpMuvGRB-=zNbXd6{3/f"#m>8֤o;xL%50 4z_ǤE\-'\js{b9ˤŧB`" o6L{ ӟ\LZL##۝ox /Ƹ-GaOZ\Ȭ$ˉuUnѴ^%ŅУ]$ q@P$>+\YQh%=D 'ms͐f$^\6Ia+[&碱"0uQtV}^ ʑsɜ^Io3 M5mooז%#&ӱ`&3?N;>ta\KXHZb%)0I8xiyF~[4`VXi2RܞXt]:JFuL.7ct7O?Q$ZAp@ZN ` ҒiZMG\}%WRP$9-̺jĸI$n՜WsA/ rxH drgj Q MQ®{d5{v]u9/9y|~B }72vqO%iaQ9;TGU:7QTM8t7]==Dc0aqޭm?7m[ve&w'<8EX,5/N})[O)uٻlPwAI7=rrt3߀ц'ms@d88|~8ŃYVM6ZMjNںV=Q~/i㋒"O&6L7zZQd@VoD0JRd26.PiMWmuw ~hXQXxnaj J&ol@e]5>KlSU-_[meȣ0[-r6( l3kZA2[N[?ukuA ĹXRzMwWH^h4x5xJe" .]).}mfmb|Q/|9d*r{{ЗL%zzy>9bg&"1 6π;˶rzA]K:釡d_ۨF}@|!fs2cs]u{zc-T s4cK$`kȭ/wѱ@l#oyΑ;-r6h ^ N r[m`֭ՎoKSlԽw{խk 0"dmvGqd&6{wz4j' >H+h0'?BD4y"t%H4 M۟WUiI&-I~Av$ _q'P]Ś1uxocqɭ(˃306"IWַˮutPjN+hCÚ/cA@:U߫i4㰶3|!  L'p} .p+\c`aH\HI¢zX傺ykg9<8 L O:In僒^J*^N*Bt)hs'뺶17#Q%К>@;߮6!"$ncbi bw7Q1`?a9 <@xvAKlzK3!:c..^r_G:3Â*.\PO$JJnp/SLz+1*[2 y>/W[yp:苴{'$_ PJjdGd~ؿW6L.'c?z<ȤiZl.6rkr_u cn~O\QtbhQ[ע{u w /[w#0Iw۹qyYT^Z,t&}uHcXAuRM9zOT'%<+ʗp508iĚÂX,zy.|#" AomoΧ]3ej//#}D~QqVԴgXx&Π늋ҙA15Ms_uȭ %|2s)拹\|>   jD~/y *,B`,0<4LD|.~C$YAnVm[ {/]]]]3=S7 Ңd&;3$^%u_:MөIl'rp2h7xݫm s.\pႭǦk$A3a0AN 7"ЮY, 򅼑dM=>/D LmhX8' 2d@$H fcq.YMjB"ZSS7p[o>d^MЉ"&؅ q*^b_ HPk520st$;^ _ok3FoTkʫ9r[6F`YV׏hu]Ucѭǹs#k?@hvv^l6kljFGFK M  _fd~mMӆa@k?˓2ȕ"u]7ݕ''-hbܺSpu!0Z=!TFGNiVr@d4{ zl!Y79A*][/.(T"E"^D7f?GF .='l}|[N$'J0%X<յ˲F“F_3g6Ʋl> ) ᏡڼSbQ4.Up X欌fy/z#S=Ão ډK^3FbqOfZ4)FVh#2{E;m»ו%2yzλ>{Bdsv{L}+%z0 2GVKSs猼f/y81B} C}6BH %@L>BC>)eYa@ gObi!s_~ɭK[5Yd !> N9S< ;"^2/1( w|7kksT{i19[v}g g!䅄{o!TUsa{;Ѭ)(8"򼺶 S<Ȃ3jeEoJ:(ϓRv (st{yuyeY-_cs uߡoچ*U/SJøNq B2+Eth,|,DYe OJQD%ϐ`@oNir,v3ll MKϕe]Ἰ`+B5e(sI?ngV=9Vc/gXHp ԶϓAq p]9dCncyנrkŜa3k{|a75)]ydr?zpjam=Xca9 8נLl T,p'CX_~r1uq9p!p8B`~aTh+z/YtGYQ 5˄z/z ʪ5x2Lh,TX0 ˾̀JM'kUp t ( e|,)?*vV274yVSV*8%k񚪥VSJ HH>Oք E"^g4;N9?)Nl6}^jr19`Nz @TBXۭntؚnf4i_ eE/mn2/3t;t-XθJLoq49üP^8 ˳f_,`mOmP*ߺVkJN2ٌλF!MגIc,)U?r) ɻ]Hd*BӾ>?‘H~|'cf) s ǒQ: h/04[ ~ꖹVsI'3,?{ovפǒ8>Z`!2 F7m:ۧ{8ɚ.N !$􄩯U,_(“ёQ󰡉]5:q\!_>vRWV7Hu_&B(T>g/0Q,ZM5j;b&:[i!݃ʍV0K$pn md ?G35+1?Ϛliq)42p,:9)c׀ `^Hoss`;g`Wf2YW^&[ߟm^ 8(J$jOOn-e*#w$.?.?'7b9|2TS, ^+QGAE_]FѠ(=n~_h"w PjVL܍T :Ԩs#(+y]YQ"w7++뼋j6:fd9#odbp>bBABa1ԉ=vؾ !N}R{\!P+xB쨽fBGO7Bg!ZoDTeYQUJQ^i0i3H)J6'}(v8ԉlB'9gv.FdNgmmm>(+JYB4K%azzhR$HEJNkƺk"j N*\W$€`0UQJ.B"t;͏QQ']YQ6e&B3f2/3|}x;uums?z3j.n'+f1_-4{wv/ɽ?MF}>OS_k& ,:7KrɈy]|n 7W=*^^5i^>܏JB_yA;hi^>BخNR |Gs鿧 uq&y9T)u=<;3_t #/6y4ׅh|1SG{X3L u !t K"NXu+j>l\׷<_zgL=MDO|Uߨ}V}+QeN/S: B]\T74X.2NjZ~y ,m1klKɥ{˸ט7B@_SUyQ(SL(zLJ7a/EQƶ!QOY^ʾL5I5?t *ߕ&|NoяuQK?HчQ[(snM[f/!tP,O$WV-wr4 HMދ^\s4/ͭGӥLv hWAWs63&P%^Y!d#op|w%E}gyF5n˩bOcpef?n“;ßIOddHB}_zR& }OjT㺺nr%g!z?t"VsB4N`3;]NyB퓥Y3)Ҳ `o]ZV ;"^2#bxjr{ymt=BUUygIY (Bj54Z:9$>JE7*܍.zrv,#I~cy2<qd仙geF/yW⩬u%o^_仙Hpۛ0!P+(*5Bʥ&HѠ,@Z? on>H.+7RlZM&06%dnN vG6˴Ƃ`eGGD鱜ZQT:-8B;"6?na#T73{o:w=xB&gk;0!TmaBV !P+xB`9}~mi:\p]0s /U{`0\'=\T}^'V  AygoBf-aigB5sKI5:TGd$W!w~JE7*sٌH M̦xLٶ- ~me,=7!A8*ff&rn *9[Pʭd[BJݟI.&€RҤH6L=QÓaF旞J;Bjv{vXp Dy>&?(~Qvk幵d+PJAca__I$ʪ_N(? 6!V;Fiץܛ1r[X5Yu\!Z3@xb<'6:D8Nql*:Ȱ.Iݛs{@S#b&ʖ/gblFӴaP߬\gyR&*9_u3U PkkMj\%niFrq k-˲ۛK y+Nu kdtiR$o豅 gtm@.(T"E"^D7f?GF .=8?B#к gv$۽>ϰ9 ?/z?J.$H8vr,fײMw_3L[[ncY6 ɭ7Hj:LYLJ?B|j3>QbQ4.Up X欌fy/z Pj (;՛uu\;?Co[Qxjz72Lb1]?C!xB`{'`Ow^Ͻme={znVkiא&;"JOctOB$0wwU`G]z,URdNeײˢy/\{Pəfa䅄Q#"oi(pcr]KIDql}d%i> ^aOMچ~uez6V8Nd;xB-WbT$|\Ug(}_fbk\6#?B! eG^W֕Iey)roɩF7KTbHD14*;&eH;>ۮ^iv[)DzAnv!+TLx(3߰؂ jJAMߏ!V'&Bg^f !lZM^ =04#_79Xu~3fw~BHef'/ApZwב&aXR7&91#u-Ozy^ko5b+PJA EvAkp;f$v04~"gMRRa܃(=BJ@*gp\GFIeYl(P@ZLXN,-!M4ض[Z^ izkGFőR$3dG?Oc>r%!ޛ?-#u<_؃c!a@: w2=eCCCӅAY6z.24/.m;evfS$NeiOEy*٭[Fs쐵]" M@2*^u=B8v 38ū~R$L\';]$<v * Ep |Og؝˭zNz]Cnϐ'<6ےFE֛J+#Ɍg`v-m 8/$wY̮ewuZnl&5;4]'Վ10ޗdk7#\!ohz%C4}!Nc[7 ptVn|6oٸNVzcq|b(cVU]|[@MЭ@hK1 тc!mC#4tEn7}ndf*ygJ.$“aS2ptd*uSya(E=ByASޟy!2Njgww!:>wL!N~B5`vw(~6ö{d|'v1VYn۽ mb>ɥ8uug?M@_JR`?jLߍoqeYY_˕oT_o>4$eH;;?6'%7*zܮʋ\6Sc϶Kd3 vLia۽@쩤(>hQ$e(;Nw/E{3ANu=G#{}m=hp]s?MZ9èZ r{pl/FPea!3/v4vWּ5[Ք7FGĚ;j4T*+ mm:;@u7n=ͭsZ!zH jig;Iq_/uUil!t,zZH~8J3/Kɥ_"wجN ?u~Ne+PJa;z96'uM@ NbLia۽ƞ/|Y[uCu JT=Ͻ\P&43h5:.wx'$6.?B҃x#$ݏ~Ϛcyܽ h~4M) h:w˔c65SgvaVBj2o棒znCP픱A[Usб,tѬZ;m€~j Ϝjlv`PFm(^OS\.O*8z.6`@*6\s4M^4!D}O &24Տw~l@ۿQH2ٌenD 5ς7_*簧&J.$H8vr5YcBƿ LОtsH%ϗ5?X.ٵN =Xe0€ V&P7T7 7 N;߬2֥%߈P yG]m»וfp?e(>GjEA(ʊҒo5[ī4H%a@0P9,ս-^ޤTv{ j^{nx{0E{Z&< RyA;hi P+uXLQ# %B|K}L,Q͟fGRh"Q ں<,/EVj=>|Wsٌ{ y'Rd.-&z@d*Rwn$xÿ+ZnXş6^lд yLYZNr, '%J!t¹λbOʄʊ!EdPVV :!V'&Bg^f !lZM^ =0 p,;:"{1 I빜v NKEaaauKl>[e^}izv(a`a/EQIl`D]|w'=X]t́wBI?l6T::X3;yz/eOs~s85cu۶TMvgh^{ )_$s, چYɏ`}vV:y*gr˥?2* -=O*LUbh@j<,ϓ27cm*9.(-!M4V! 8΂aDF\6SU}&™tdS鴲pLRm{ݽco['d#op|F3!S{_؃c!a@r PYT$[!3s^`Y6t;dFB6tɟe K]q^f MgJ$(/fiZ!o$@׼T^w/Hӥ➺,Te)9TD{ !tzThIt,| OhB%HN suT^ϩ|_knjIDATƫEH)<zy[ob1)=l | \y}~3]Rm{,fײ{{RV+e{<_zў!i ( eE vhp]s|tuۧX^vǏkг##;ijY{}-w,gKYQ yKŤr]ݼ=3zq]e={~{C<Ն1,Ns]Hd2<A!:EYVlv瀧r LwҼ| go@z=י{o=CjJSI-+~/P mׯ]]g3KjE ST>{ryc9뻇БdD;4~R!--'9L%B*+U*=|OxUlfaDn庺H6#K€zmv;"x i(yi>?o,uan)jTjcj3a p,t9JB9[vkYe ^=v!:^.^G8lĭD|;lqj>)[{=|Oox2\SWCr ,6/}^I3DwT,˔j=rwabk\6#?B!M&b'n;׻Ts끯$eH;PqDyum]yT"fk?JmAQJ%T]I_\,nf R݆黑 R",+- ?7]HQ(#bx,|?<%{_Si+euplffD&#Iz[&4JgچY.z+~)"Nt]LE\71BN>2Ka;N&['{lV M9èm NLz`,hVFGB|KQcGfv⎎⁛" Q(&\7kl[P,Չu/!7)IGGF53<s{8ͯ҇GV1c`7*t8+xD]P@;Vf60|ok@K3kphM׹MY@GFKE\NFΤhn:#- B'Lh,0@GB[rK܃.YgS*W]|_Ƴ2 ټz/r,} ZȺ,ϓ27c PͪJ M3ɦie^-!M4vg$8brxbO]__ܱN.zI#Ѣ(X\WDy^R4$.y7s4 6^3N뵽:|HQYQrMϗy!ep l';aMKEz9/,*V՛|+hFrq EY6zʠ4/.cRAX6m }4rwZ}D}JOcfR#WP Yܛd;zwo&θܞn[/NEݓ=/ 20 тc^v 94h>=N8 zN B%a7KӮsU>)p{7s7:4Non|?_7w=++J͸/eELYQv֑tsKБq`;FīmN-j`?gL6XLI񰅸λN<'<' !(ی9]ZdFB;W*sCB}tzmg!Z3BBRp%:bOw}B2x[p]dzYBixB 8!P+xBoo>3B'S oA!t25~<[pB.B`׻51~%gh]Om@)P{r:A04ۧn!?T~eGǏ^J_`b=! BoϦSeI d%NRjRPԫh]eb \uu[QMSRBڱjGp<BF;hayӞڊe_sQ]%+qx"8EQ:MLP>;2ZuҠ&؜7Fg]7f sTy0I(mL@^ge"D+X{$ieUz ?8+Uuuj7B}ۻ6<࿅9<F ؐgÈ:b"!#,b{=JCC,V U F0=HiE*bf {DeOĊ73!7͛w67l%:6cƶ[$q9=4RS a%g5y]d_~CٕBC'==EkY:(+إ8U0UxX*NN +}<.a|Fnj*jmoqe 2Ymϧ~5 XٯWpտOG/嵢ŞW䡇N Nݜio\JLğnTnT^WiJezxhwABQ&pPB|,NDQ˧dH|7@TUi@B@ 74^RT񨢆s* g,aM eeE_tcY _Y}[7fגȃR|\*dd1*AE j- W + '>M0AGt$0h='ߛjS)_ޞ12}W&>5ż㺭m;Q2}g!4C]07n"rZ"! !@" u\ׅ&?JQwGZlϤnV@K~&s/HL5n鉫ߛWKE]*gU>lU>d>5WFyl"A_y6s߆5ZOxa_8Ґ׽?}\=VJZfmYMD]'i͵"4AE ?E ŵqĕTk.M|B:Dȧ$Y-&r :Cy8wcmγjӓӓo^X59 -W@ Hŵ=%37gBJhtiZw?y:fDW Op]@bXjUuRhܷ9t$Qya&ȃ<(j,([.U/>s] dqW[yMgjSwq3j H I*f&>UU}4 CtI)%Qʛ|B @F%yw}G/ |% dޜ6YlTbd~$f/ݯ7xfϬ~k;Nufo[{ "a (kVay ּx/ {jp ~P^LsP+x$8Gj&nWrn.T,G}=I4 ;;wv sߐ%o2qn`V+~!/MJ}>6YQsr37 Qs*x\D2o+dch;XϞv]jB_/wɪ݅EYCGhnxvjUe4MGx.۶˪X;tgG{dI #|J)fvhCWM9c=ceD5S9,N{DSK0oy▓^_4"`>1k/Z약jCNST*k%{KWqmt.N o 2>8>{1-ڠja}XH6-=3< mr+oKKrz1><oZbƙl(+ժ"@Rj.?}fPւ&9_=Լ>Z\%YV IM~n3յj+V],N i oMCxu18<7*}Hy}h~Qg36o_l()6|9,T+lL\Q/_a6+P[0 # m[7I: J˜3jO_晱b!-s5Ph q*} vuV㞗b!ك6WOv,u'YzV*{e!*B_)/ͯnkofq/8f(1 9?s/rmM(Sѱ~t&ƌ1EQNQvr}~,nȑirMMޫ0fztࡨȷ\ղ) Ϥg3wУyC6d^bs+:㣹.JG{FHGW8ݫ`|o+}+lixkkqyS{>zj^->--sӳ[}6AJN\yt:[|U2tGi([ cf= k1Si(v" mʪ<$]˵*}0OGrbs[}"m@{\`[̑I{_gSDYοU8#Z=BZKC KfMowQ/qҕHy ] JixFVZ,xib B Q/ZvUZ00̿p%o%qܮdgkHs@|&*}Ny}z,˝+nxjBgW~~p+rIG 2qO&q3Av9K_0l,LYƼXژ}EbeN2t!zʎ>8aC4֦ijY3\w1H%Vй6Z![Mk[k/Zs UĥSV8qEؓzfI(M^ }wA]8qě"8?K$c2n|p sG0'ciĉ5JY"O3!4O۷~wj#mW._ILL]1LڔsPb:n@|Ė3!(>MT$N}:Ȍo >@a`'(]Y yk<&H:<wns E!y;&OF-dZ( efč{)wYIjo" CgESEn(,ص ,MPU+q$A_*@iEӯ/!KuTؠ|.8GӾ{i}^l E9)6b>8ɂc?E9NAA&v v|oDxP6D܅ evrj6Pi,O5W>eeaBileRJK[Cs΂t\G/)"u+1}yHf'zΗ'%v^ {D R+ep6Vy(7u\`,0*y >o]Q7հPw~tI7ꊢ$I5 9~ʚPV ,KE $EIJYT:,` 9 4td_B qjkV,M6`t:ne@ tLMy!f܏:ѣTB0U(0h Wٰ9??}6phP3>'F.<+e~j3s;oy?-c-|'qf< -\?`T9Wz`O;<:EE:07BK~u=I})Q?*j=~Lt4y@}pA TN6e|ZO n& Kbic^|b +_|dW@{Kigvg],cMJ 5WbIG}U+'f_=1#—IÒ7٘!/R2$_ŗ"{%İmZ߬w$WzikIQh9<9/`W),b1ʋ/k  MgzT8l. JKb._(Ư 0ذv.$A>GHne9Tp:@ ޮ0Ӟ+W2@ڴ m$}?8ɩܓ\nc/`Wq:.Wn:1"D"D@sOr<8;. UqC$NM^S‹-;Yh{x~]@ѮWǸ$W;8]/<ſJu4lXQZnʓ+Xt_@ZQ ;Z#͇;0 | a >X~bLy1/6Ƽ6Li9mr'gPrBm}:`ĽI^XNS~pHW+fYޝ9n$Y^[aglB~2ߎƁ+seBA5c ҦL`ݲ4>mji?D!xp䏋9neG|;{T58~\v`q wOUPij_豳njцo=~U[X*Q> 6IM'n_q|M|6" !Q?8b};`Gp6֯XcƼXژKTl|µ,&}?csڱ^/ }->43ƈ`6 kpu^jmk/k[|p(4K{Ɨˡ>Gt]ZVQ^}qKI !#O8;nF<~G }e~gzY)H)ՄZfB\%Y+R^uv*_tE!O uhl4%W(gfNK(+;6/t.1b^ ǯߨUC_ Y1: zȣӦ9[u5P ԴqN ug|)f^B5 y3 gQXF^@6jUeb+L|.{¡|Fgcl)ݙ >މ :zRhv8I5 _ug #0wm%Jq,H'&0:Fi(!4&jVCё/zfk\ML~Z]*/El$>w@J6=*k DE X ꛝӲ녚?oR#IVdI h-_@ڐBgs[Mȍ=&Rwo"nN]Zdz&jFYhJ|㥡x#q=A z.$N/n:˫䖹ܣ 1L80;!|l.}K]?~ia"I!I-l8^YG;ntn3D KmO,K1J]D%@d'yn?O &==^lMKKyQժ#yڴ RdUa2j JLN ,㣻na(1Lвg̈́)Ou{nSw &Y7ImЄjk{5N# =bqw{+wzOm[y;ߨ~̆! E&1 :&D )uWz;Tb[!;h.r+jM+t837)v@X3 >_@eJ%O;Il810,t!/3Jh\ҝfmji>^Y/:Ū&7X~r`~kށ`0)_li[6=-mʌ3?YTXbic^,m̋y@%V MqSVWQbQEIRr}NMZ|i$ 1:gTV0収6[cJ\敺RK2NB_[j'3Ih).s1=7ϹNm2d)V%̧xA>,t>c*u/%SzgmgLr+v>0UCBzCy<'4u?Q ' ٍ^@}SV1][ZMYz,Iy!Uh}kvė"{%İj[7I'W%!:5A^ 1jQOr ) _c6P=M{Aڐcsq ôbmKk"b~_P5oMC<̈;MS,fWVye-qMp疹ښ/j% Z\F5;*gl0̆"}+>Ohj:^5Mej.P39zڿei)] 15V.,' NS313(JiYBt@ q;Ea'~nxr:NmWIcp% @ Ot&RQII&L9Dז2a=`f@[q;jc= BtWϱJr E|6~u\!h!aʦe⳱Ry}FfKSQmi!l {&mR_.s]}"nd JCQSDzqI>Fa詋okF\:n"lYܣnh@r>oP#5; K7S)=^5" O K}a{(Ok4P|..n G=هO ˟fR,1/c3>`ν!+xwTIENDB`zapping-0.10cvs6/help/C/figures/zapzilla.png 644 764 144 125402 10443536371 14171 PNG  IHDR  gAMA a8tEXtSoftwareXV Version 3.10a Rev: 12/29/94 (PNG patch 1.2).I IDATx/x}*"*"* b1@\@L &+WT\+W &+ bQxE:J-ϽrHBNrrrp8N :p8EJ).?^/ޝTѯ:Et2}}zb/.Jp8__)UIPJ<"L@5xoq8瘴()!${(Lu @: ڂNpw@3%9ize?ɲ^c^dH^bPYoPR::#@$r|$9vYw("))˿s8ǢMC@$qHTa:LC4СС :tJ(d"!҅$BqIpf:+t]7MbiɕwwX )7N"XT@R ˳OVUtJ)%8CȄ&I2MSOyN@%|$9YUټ(~y5#J) SȒ `BHe߻~߱rU_(s <\ 55#J/#| B[|(v) AĎ ޥRn5JgYF"ء~%YP! Bf0%b1 PJaս8LiI$ֲ/Ou z0 1¨PpAP"hZvG!Kb2` OzBKWb(2|!N2ǶlC `tm"BCD9CЩ6˗6 v;郛M(sJ "Kb"|$9 ҹu$]ҹhXrF]4Y$ `5BqJ".ߛҹr9;X2'aRC0#g5S %9棜LB@V4Aǀr&"/<s{딢.τe`ݧSA.w$>N9I _&ViTU#T9&gII Uuɘ`bE~h%*2.fFTZU=+w0Qg'.0dYf{YyzFXTwdB(ΜE-#c,< !(KBi1u/$COgʕR_hʧ& _ڊz$ z{XY &7O>rl![>8sH57dLvMӳ,2:ӗeERR3ZӬ2`iVi$8,4y6?f3ߟ nQjZi(_ؒ$"۶ PUMu(z(mYV ټxf$V`=ϳmކMAFq0'TUU!`yr(Wj/<_QTJsU*|]=8sv?qW) ߺ\ @'4|FƇR8 !1q^k $.!c>ϾA~fI(!'8?ykgM2o88Υr5vj)}?tJiQn˱99YwV7˝$IO'6>BH!.dE҅?(;^)4O(&I"_s*J4Zϖ`ێʕN|(T0n 2&굶q[2 ofi˱%9Iup8q60aK x' q~k۹ ֝ɒހ}?|JISm9<'ga k(üϏ۲5h~pNp8p%p8Vp8N+9 [p8(rp@W| *q1]aK8 SqhϥA|CDoj|"]`]޸p8L <|gM̑-8 i:(M-GésR o;T{AIRaeb"q`φ=+X|{3ʼ[̻xҠ$wS&em AEE|(X$x޾C,ƭT\(/20HL)!WGw@94K1F 6-km8w}B>2s8kq*M,E:( CB)+$p ™ a=ASZ[0y,+~F98 &I/C BOrI> (ykbEQ{2s"Zus?Ae$W><bH͡S駱8]羟|) t.+rv9Rz m'~F9$$HCqn67<8g?tEQy $A_kiEQT{[ADb˶m<{# @gN)c:wrE?lEb1ƺ 9e-Е,XOӻi!:A0:@)5\2&ׅA=e( 5}8=kw80_&]KY<ϥ 痓eTN SfoPUNh6;;MN>lNu@UUI TTiA˲|)U".wUXos#4ݟmwuj޲BbI7 //=A#4@)$sIG_EQǠ)jx7(gMYG(XL+D"uųpd;󖴼Nb6N>va``Sn# OU,T):Q_9>{S4%wu>IApNcnBN!1zXf,G_I:H( fijPUhh%\:sU3Yl6z=, C/ug {vZoH{xi:S$P2&dD,Od'ph[!}o wurX z[¡7|$I>.eq:t I53:Ŝ0b6(YY7Ė/$FyM'1]˔GA'ǃ 53Bhw7:u] K{$º+e4Wҹf㻺v/Lg1 ?T8긖LWA'.W ;yMúu֝r,XcM<GE3ׅ,hw_cB&K ?, aUU RJA{h/bUL$r:f/.*ڎ%at@`b'(˥BU|m NbgBO ςq!@4I^SUUm۶~Y@)BBƄ %4yNJ!g[&RQC@>qM?[YY 'dDdָG1|)ش #]D&y )ێzWMa>Қy0z$vS6?AV;%7ao;u}=e>S (,ؚ#/hYZ`&BW'Ij$%/I1767յ9Ifm=⹸`3$@L8r0('ul":x {Kה)3L(ٯInߺ7qc-Td@~wn;^n׽vU:ti)oG+WRɡv X }ۓT9A7Vl05Pe=C#ܶ0 CӴlsmlT9`MN"E>M.5FL4Msu*0-w:߻uܯot_;g>y1̻C^Nkgl_4;k9$JlݙǑ\Ƭw@l$ɲ,_>rSyض0/65!$r#GnB)J5S*{jEE[GJ XnB"ZmQy;ȬIP:a83\8\&ykdQn۲Hygg<㸿zLM-->@'488 b1O^ ~ytB>#!;8~p8,|wB?$9Uդ Y׍b? :ӗeER(~c؎3oi:+ΊqZ8?Px/yKsȲluG=QvY8E׫zBV4M_ hoQAI{B[JiӲ[#$s׻@VOaT|"^>Fq,Im;m˲ź JiZoWBYAȄ\EQPeE' P۶́rwq~kת!$08USuoRp~ڮgQ\w8{W$ɗ_(r8ѿ!SW\J={,IT%I]ד81ƒ$5ޢn!vc)eY BEQøm[,/ _zt8gv$媪 ɲL<ҷfލc2EY"Q\*i.Ft. 1ntR!L;doij?4d+6}ABYaOc_NqrŢ(q?cY$\Wvض~%OxNFElj:bO姵Jݘ5,|cUotf14tLhoQ9 ]|HouPH5 uCR֎{ȍb<蔊1|`0@1eBI>ç!Ϸ脊gb>|QU&!Tpmx&' KSD8OV<:V66t|(r)}Ji kR&?KގJݘye󫟾™Xu] ̾EQ߇wEݞnB7kmq[Rq wӔΥ%Q#>iy"U0(c1<e]'c'/1uHReYSJYV"oںAȲP(+KmEL#iR@B0L]7 cnKl!$bH2"BcPD IDATIOmZN[)p'(s#7l긋+5 * %ζlnjݏp (A=)J)h e:<çayZCw%RY Ȳ,}ˢ(V.X ™Ex.QJ3!"I{k')05"KSȢMk?4(!m[mAEqL1ntH_-;,sg>viTUD‚&W P ʕB'`;nC[)p3aA[Ug՛RW3Z%]Ȳ/ǩmb3 r2 AQ b™X7.zۂJ"c{+-;EygB=Ig?}c7U)2!PsK\֗.N:!Ybʡ\i CeL9)Nbg:騯u|INeg:oἛ88\&|:nBMt,v0=H9QAp8ǂXu'a9hp8Ip6ú/("_V]<3;4#)7EMF4; t$/^^;Gb9|ɖ)6]0.$zXfqg)LdQ0G IU-(@%]ׅ3r0}M1ʗ(rSa%i j#ɂ ٘ wm+c^CeͦC,Kvd]kʙ BѦW?d4&YG]-ޒ$\׭(˲U5{ GѬK=4Ы IFJͼDܼwu ,;Dt1 t!il&JIv~9,bqVZIJ ADI0*XV}-QڵP~_"˸۬$h0tJBi4 6HpEN%e"U%* vyۯq%JB?KK$NqlաkYQUUUw3el@:Amw%(rT*[W%RͫQb OA':Oy~a=\l&KΪ?KjF\e̺lۦ,H^cYV^eׄ핲q,66JhaQ8&cbX[#ܙ ,P=MOFFrg+AY J% =#DyX-v0UUKyI37]LHϛ|CbA2&坈yn`W hH8÷&+//Kv]b [<٬钩ZJop&7:ލVJ,YH=!eyē<$IZB MB/|˒1Y2h3UҼEVR˂)B$2ϐn$6EDBf)q ž IeYKrYJaۃ8nX9EBfpڕmҴCeHC3e+ CSPEd= S-`?٦> VDd<R171*d937 ~t^U'sPwWE)̲7ֽ8Nn,T&MSRv eF9&uύ ɽR÷mv&DsڙeIr~hʙDQ.pxcdx9$PK<-IR3L˲5}MI@qmQv #dR=Sw,$bUM$ x%INz=G5 aT?@G@0%.$[VDX$ު/!C F/;* Xj ;?0e\Gy}U{G`:`rażTQ*p ]M ^ؗ)H=HwekЭ:YFLb@AkZ0|K%UQ,V+=!Ѝ']8c\*O[V+m۶[9ϔ,qk,`%b:5pu-'bȨn_w7:<} WMM(gO"RS\?'0x&,aS^)`0/!@YU9yo4Ru 0ߵ`Wm9ܒkzslHSsXIObJbu?+F>Đw>kĦ Yoj)e!C[&S&"&JiM=\Hk1:knE ;tq$0UՓ)@B\|aGqyYF1*O$v@1F㼐^\v *Ʉ{K/o!1^I*ˡ2tᒗhEPgN,TKnn/)v RlӖvȲl`biw*p80yQ`9$[$p8ψ\Ƿ` ^u8"f_nI۝(sZly7=90b"QL}jp\I3xZtFC@jM=8* CE2oG+E@rA|F6PId(}GsJpNO$^Cx#(^|I7p8}ID vl\ZI`! ||>Hx=tf$ ~ - ϰ:m}"w[|y9'$F dq!0%0J B^pV\xat 8'щ|eNXI򐒏S'tB۶1oM颦Pw!tUFe":XIZ^.!399%$.t1h{k+&~S0oMmʥ1 ykVί;Y]♨^QV˱tk`R 0J51sj`q4Naa`jd yܴ[)@g4Ax.fYe!\B]($lBHSnbMsN)sOj> =c\x7eoY>DQGyIJαd m*ξ)6m*@)ϼ@ǚÈs ZH`nrH:ߙOt,SJ0D]dޙ(=]x0 榊wS>ʋD)~YW2!Q1&&Iq+yk榲wg$>/= kzֶM>vua5̹ ؟w_|[vڍzgM7TFak$gWEOF$bE;!otVVlM™PO\*4+Nm*2WMdž~Ajoc9g 8>ڂ uꆻץBWU=!vr/oHװn 7a-!\I4c9S砥Xpɗp8•t%Sf_2('{?|`+MMɩoYu;7E^8Ӊ'0$~JbhE2fwX%nq'a7{q>^I42t`RaBܭy+ #dѶP%:sM/;[n5! ~0D򓒆A5;;|(0=gulJ㖯YJE-GA//k΄z(h/t#P\#Wo,J\Vͼos9oHBb[-J"6sS5DkoB]i8U>Ngn;(i^\>DIHV0nBpg~w8m6B|TDB pVsSe]reϵXI(߼0l| ûC%0Ύ/ҨF1ؗEڰ)MT\:{@`s˓߲5^yoB!v3C[X|=G $6+]l^ئ$ut8`:JbsTm0! $G# ]q 3[Se]wӇ &J5K q$g)fߠg){!7^CR;M ;hBpJ8SGsAT[SuVctZK&lƫd\x4CY_;050J #WwPy߿1+z7-)Ă҄)A+M'$} 10לu[*QmTԻP"[O{PҎ]<µ1~*}P%L3-*2l\ՆSr( bF"]ݰVk7FqNd'55z)p9~ }< x6JQɄ͜Vܭoa!^u9$wÃ6J>؀lwup8G-"ڮ:8'$$m OMp8GĔ܆ν#8Η$ - *p8_I )&'\[p8ΩrJ瘜h 6p8_SUpeTpOmp8_Vl0qN4<4|rNr@ \QdG |QN[I]a2! & 0)&K8g`q)0 y {י̽8ηDl-u=lJѓ(I|?9IwS١@6^9D,6 96Pq vL)n#sJDQ%k+$I$YOF[9 Nx5p WieU)ppJpէ.8Mi+ •pZJp8p%p8Vp8N+\Ip8$8 Wi+ •pZ9%:GmntJUU]~|))|TK> %9RQ~79=vXj\y ?ˎ )5}^Em&ywi؊ȎY֫}Ǎw|t]T!dYxS0M0l6k"sG&./Fٶ"~B<]L~ˎyZuosa[زygNkmUUK9~۾ grF# h4Mt蔦i+m 5^̻d |;p>$PP|$GE3k͛`5pBdp &q3u?EI_p\)i/'eF6ʊO&(Dva4tRTUef7V&>sAEqO+gP?dY%ey! IDATpXOqv9WN΄s{C+'"+4M˩{Wχy{Q *kL,W)t!d~ c"_vyq<JA,V,-HӔӘ+6#j&Ld6b3l8 G67a-B]43(dL|w0<ϳ p ( €{X;#a.6MuQE(b<"0wa^C$}ML\UUUUQ^Vlj{;"fRqb$PC>[Z@պ d$Iq`ȗq L,m;Ӻм3B:/DR*Du]/p._IZĐ.$EQi0ֽU0 Ȳ+b&!_ ( Êq@RJqk ʍug"ƸR ,: U ia!dȗC:wXA0o--^m&EU3RX! \,b,0o0cK$I93Auf,WiFsѸ1` aP<<_$ ' J4I<}%%.O36CN&OY9Kǹl/l'VqeY(n+hqs`3L\3~qp3SC =TRcyXd nla`=kC˜!,17-aoAVBdWaU:\@V"k5m,.V*cuMhX˛w(|7V1ncn:k9^`͆]kEwmfg@rŲ,۶+0 ;k.Ҙg"nۓe,U$IBT!`ݽ +6~dL*m`CЊ?[upXQ:$%/I mբli*l^aTB]lp\ӴAx7[^aEȸ|\b[ 0};VFb!B'k爪҅$k rwi]zbiRZ9ߴ➝6+U(:*qH^C>8r_Fs 3h0T kwmJ,_K^gޙM&D)Ln9GyYcֺ)dLV &kq3^X32(1L^t֌T<{jE/eZ#cEQ`#NCILmWGʕ"Z-Q`yg9t~oQЮ5F\qW`V( a <^"ضmE3~%{%x 6ڲ,7F)CX38NeJ<;X'$v(ѿ(x >]ւ0TU|6b_ONiI?6\ᲜJ0p{<׾ul͌q)5 #~ޣbf= bYC7sq[`0S5F$ItBJLӤZ]$q$Iib+Ƣ%Zk&vJo"ˁVs4 =l.s~9elX76#ihYǫ֒4DQe:K}1c JҶ-x8} 0!TmT(*W",h)Xifl 1;$IZz0aluaK*,!{꾀OBHur jzB eaK9^)fn9-%XcT|߯L,CMƄLӴ^idBOpf&@%U |J(*MK䇶f&/5TJ{;qOs`vK8ƴwd伛84`_W'gg?,pN#+YĕC5]wBaÕYeM;B؟McΔY1 zSY(G:L1x>Jى-8X|H!?Q>Ea~,˖* XagQ4MӴ󹸞Y?9cY:~j'o=~Lls(:v@Ի,I$RtVƶmI("|hێ6*U0MmO:΅iB &*DmJ%Em󐲎U=yiJJRqm>(RjW#߱R885H0T2^ Lp]:* ݡ~SC(DjZ7{Su]ݧ̕-ZM-DloeI{W]cY(T88A Z>QBbYVgzbimpiډ8R#nHr#$i#K $^[n+ʵ'y#+MCXHhCmC;VF\P["sT?_R%CnRcnDm 7El*j 4E?+Wp8jxl6~hNi6-4]FHu|(x]H5H^fM$ =+Ắt.XtVύoMӬ^U0REhR[5M<1NXf9*)GH}faͣr^)[VK 9Tq+vn&ajcnO".%h h:Î=yXU۶=y?q;=5%oHr}j'Agh4}yN;Ƕc3C0&|!,%ȿzU5y:yd{Ưmڣ6r\VZM[\?7 n^F鴘װ}f=z>F o}o p?y< < h~kxmuV%tkZ\5:jڸiގ%RwNz{{ъK0<17嫜WrMMG84MVq'=˲!0F5umliǏp<)*T ~]"[Lףsc7_lZju0=bGL'nMjupf/z>7nE~#җ /MӜVmrL&{M3 X ~toݗ!"SMi3nD"`~|8+gώ(bĖ2TXTضTUm<jzT J}9*0$&q,݊&U$7ER:FZ[.mTCҹMFUmE :J8J3}2eɭb"9X `4ѻl=uy4?Da8}: *+u67C_̰,K\&EDW"]x<TH0OAc0Nz[M&+7oGSN` xϞT2{3MrI,=l(|x~CeD?BS$i(;M=o%;r>K 'KY__liZZji/밪{S?kVXMo$acx<އa0 q7O=!!ߒk=۲, @r.bvmNض\8~@fEX45ar^œ0h0^jP`[-0 qA <nCb= NLkW5dHxBIyi|zqo71Q̙/ɊD9>?Hc[Pr&Tx M1{ц%S]kbY%YyC`mDn>y3P1!6Cymyѿ`l88v۹X6z0' Kvwj)FMdKRC~c~]bU(N0Ja\ MHfB~bQ!d"IH԰EB缔 RfH%8 |_ۍPxGꖝZ=M/"'ɜv'wƗ$Sq0č8:!RPߑ_T{:Bqd go>;sC >#f۶ wlr RRT+iJgahX֩]JZl6#%Ƕmu@)L*DJ{预3Sӽt+gXvI_d/_98aDz弒ؖUT/9uX~l$ qi컗nXUTm% Q2*yyuCq (qiT!2ʆ뺕JEE΅^x%T/r^q/lFײ, OhR.`f@?>Ӵ4X_yT Omq w:FIN]$id  1_Bn"F H) ,hړ([]5DزI ,\mnDk'$KYdDi&T 6T6NXP`: OK*\jki DVcq P 63RD{5C)Ԋ Q9M; i?%&B:f/3)P*7pġÏ0#vVI)v[ ڰ9{\l)H39fj5,^ڟr uچu]$DOR~ThϘ#0H6:`0Fw$ RfYb6G` 0 ludUҾ*% OfXt8%躮Q2Mk^N?5 h6eH%{~pʴ#?\$Dڞlᜓ%JR^E uG &JVRkInζm[SDa -V!䥄C'gu#igeY!}2u]˲(,HKj,JeF!p- <7M]]~jW=~C:i@@9yÿC=!H+]i2PuqOZ-̦on͠⾒Zv2Tx^Mi~ov:!@d _v։BA(a@.Ƀf@Ngp8N,l6}zVAh4!雍VF٠(n]Isj-L3{0 @b?Nv4^Ffl4>Ѫjt蔛 1NPc15mGRc ov~ +Qω{v:*DR 1N$o3l6BT=f1Aԯ룇Jv*+hc?ev׻i6?jsg0Z?Z|a'͏*Bt~ !{\Q=ޓ} +M_PރDXEJfl6:X-lYAgN?Ͳ)̲ѱfٔJɛL&ibP!q2}%jOZ3!_ػabr'܄ S $J|nЧpr ¡aT>ے,ez8 ɭVÏO\tpwx! (Ƒ .]z:y@m_Ȣln؉{à ]J:SCZZ fO*!1";W')% ]Z Q6@o rV uwB (1 M8ʆ, MÉZ UY}uj>\pdeU4T7u1* ]JZM3}-j 2S ۅg?^Jf♍**NJ pX6Tpbkş=HĔ'!2?DM0e2Ce9P(痁,nJvhӁ窊,h[p1AqD[# X,ю Қ݈Eg6zIoB#Y61ށh6!c)&Ns\!D$S={vn`CȲ 킜UK 8BLV-جJlŚ*7!]yJ iib'S@1ØfwQ+JG?OK?@L܏K)^ rK.f:,sPhZ0M\"pJb3畕Frx32D`4I6 l&+ĄuW=o`n?'`~{^]OL[AR(,1B XNmalԊlDn,tg6! >aT=,BĪ"\?cJ9:!!/Έ!Ft A5ΰbWE^Uʄ-2JCCiXY/„Oyg IDATEic})ϳ ?q!%@[ %iE鬪X'@;"rvt1Pb жu8.S 9t7 sd=0#k21)n}'43Xi51y1Gj&38`x)tHYJ}{Vc,Rl\հzQpBwf!^^'FGaL{ #](Jf.=HR8Ar ŹlL٘ :H|ÀtR6Nծ,ڷ>Q'`QT-x^yjC檚~"6}sY<D9tjT|a'ox:5dm=]$ o9i+J(' Op,_X,w= $n?psetJ5i[>EbhD{8;pB\c B#77qP/J"'Z 7HڸXJp0Qpt]Pw Q_ vۇ"@0Gq ;]avWnbaXi¥En 4!n.$/6$6(ԏt;(Mg(Mws̐[}UJ5Ez-w=ˑ:h$svҐYJ&ȼN1pln ttp~@ipk/7_h-U`Lk^yў}\&^Lq]/;p:D ~W/ 962b$>g^zCf@r&+`?Mޓ}Yuk]>2]j\/ %e,Ԁ20Β3װKC@IH @?'xޓBeHMW^Ӥl)=#1"x\8O>onI1塔`.m_>Gp-!HƯtS+N ^I#e+t< ́-&@PߓX"G!7fsD";+C$S" [L*] v3wMX,mL cV7\t(gTGErGd,7IEP@0ҷӿ~RB̨*ȶRR2,XMܤN ) ߄ uT|[ɧ+X-%TL--<HUHW۔1w\;e, a.V 5b1Myke^rJBRl30=d}(+^ 8 mh'-k+'krqe֗gπwK)p8heSI  H2`P\ecׂ*u&Q<.A5ޮ#9 &EӻIl#ɻi!%%Hz5l!!䡺Ln5XfwBXzLwtnSRZTנnZ$ U˜0Mҧ˴N7jR+b#ՁMp_g*v1`Imm誧IJ)ȉ?M_ -2+؀ 74?;Ĝ<42K5Xf"iUtU"('M L%L wXu0MK8̔l2J0T @ +aTEiuu;{Q n`\EZf("^m%LBR&I>Aa/ĕΰX` q85 a .c0_cnba϶$:Exhm@(7bh7E:t_Tp ^>2|VŰJP+;BMNNDvU ?ӻ)5H Q+ uAURglR:5 1=TNg6Mk}"y$E:"Bϓ$'@9coG;Mvb"ǖS@s`WECH}!ft.>]p J~?f@3G0 P$I킄YW|5Ҿ({EsOw( O\@u]HQkC6L@ N\4C*lxOw]rG,VDWWTD;,xU!qPYBB[KU9B L}=.}jt"kҕbU+ut$nZy~4).f@ݰfS >c'hg^F%i}Xn>mɿ5D,IwXJ!jwtJEBQ}c&yڃn%Ei;"(c+\om!~!^U iSPZ.p poqޗGq 4A2.  -(Ue91 x.?rWm } w`)S4.nQ9O"q .5'N#y..p݊ t%ap#!$ex+i8@xY& fLGR d.FgQ cIj3x.MeC;svnq.~ee{ q1mZ~Un]3x+zx^2ST-/r s-f.+$'"M[Fvr B˶n+v3]\$O1&$Vx\gٻ0қPv\<W@fbt玩'qH,x|plZq^RN XAx!rxKb d*Q J$Hl@˴HĕJPR%lLNS(eZy]+CvGD<ӣ3Dh測σ0W&a&$aTx`aRAaI a&$aTx`aRAaI a&$aTx`aRAaI a&$aT /FJ0 w+awiC`q!> ?Y9S'@L s<Ј->u?;5_&RZ{_o6a:A s Qz @tnecIn"m/ThDj$7 }\^׸I~$zJ"HL-:hL@$JVhIn419H," (E 'e!ye5`._=ea,VB:?1yZ Iu4ڣKO JBV8)Kt~b$+f cV^>񂵫h0ʫvhd;/ϸ0˗Xv#Wzhg@rhĥO.kXHI'A_ʁE#}6Z&kBLGBG]בȳ(0QIta)I-7R}TbF=Y#Q`|xne'"aY'ON4#o$n&)DB MT) cF *U1e pT|u}ip4`#- U; q4;a a&$2v\w:EKRj|c>wӮ Ϝ\]c<h|ޞ Ä=k QtQ;dٴ}D;zœzX+>5 'h'u2)T8qlØQ0?'U'C,}e7¸'960&ClQx7%4'}i6SSm-m,KBh9BK8||%%{F PFnZ(HX9&0JT\6'lXܨVQn t1;L ڧQڌsG$ʄ5cf:5S|v&ò_JPR-拋@.A-č2 QLfp}!J5P GD ԽE' zB*7#ܴ)uM!*pQaŹ{j5Eb]`loh68>m~?0(^w_AEc$&u4c,FUT/=E}zI IDAT% #:J1RY@^ALe Ĩ`z79wBQ¹s*Ĝ}p+ޣBˑTBj !WKpF?Y򭜣R5Òoщ# MbFc֏Hua  ABm1^e)Yܴ$"pHB P MpiHsMCpq"O㖖S- _"g)Hڟ POzcV6FU.%0%  Т]5]M uMl 1njXt] -ǖKA59J)7T?cLsEy毚D*acvnպй4{tPZB~ybdY˶WX$VDkf{&'qăf`B\*7Jc)Nān0Gb Vs:MEa{7ĊedA400裁nD6W@d^$_xIn%iP'MDVk 68mk^}*7C]U4S]&o=Hqи;>TS9GCNjqw,4dZZ*z>'ڴB$Z?`Iĭ [txQ]mk1X5:0AtFbLPh 꺚ZX'h}_2m|i!@J%aG]GfM F'49=rt RSZ=(!x֩ɶ~zT#SwW0 L&h$K++Ck`D(* X䖣6C:s#}8:AM 䆁il(č8A߇Yhi9bAG0 Ao9BxP1yځU0$;EZ.U5et?=\e :0~=tOyģBLB?0kPʞL' w2Du迡։ᇜb@)'FiP/ I˄8e߉{g9z5j==i6UŚv+7樼ak{71 0 a&$aTx`aRAaI a&{0 lFn/JeD 0Ax9M 0L*V,~2-{`& ]9iPDŽ _^J6jWNy0M.j5^b' 3# Z^9m@ jWptmq`d^Tׇ4_m@0RT@FBcи`4J@5s܌*aF[sT*k&_F_~ZQleAK] "czpnw*ڟZ"_K"ﯾt>"\= O B]"\~<rv#Ԋ?_RWvԗҧ!H#B>F]` M4:0 .<lU? {N-Qrh6^4_N&ja,5?oh-llW* +x:?N?$yHʾ_Boi4Wd-ĵP% 4}V0-fS= dwfŒKP$P\zT3*K0 QBFS(;Mj0Mo> c[;,M67L:Quy̴(َR^ޠqߍ@U5HD#Jf'^ѸQH0z@;gL&pXרi {3݋~{%W"(~|%2R1K*KA0v$Z֮'Jhv ^% \X*6yR} >)*ϫT),e1-gfkh\so[>o*G?7me4~ŰN#4 c.ntp}xu;d4g'⿂1Nʞ+{4̴NvfnLi]7YV71~zMN3 ޏԻwDS`X$%R-EŖUd cnQӄ}wÐ&u]3A~_NYFZ[Z5NS3t~&TfV dym!9L&K2(6Zuh`Wn!{P!+?0htYl{[WVF^ۍ^f/1iib1D{L3A!DcS-p٤v]~)^0y*S|~Dl yeho<҈0sC6Ms?0}ִt*L^($5ᦛM٧D]ݽfƷ &~/#ͲZ2Ch6R&ҏZV 2h"R؈^ߠ\S)V?D!RRNQַ r''>CWm?P#'Qd0JBE Tg>ÀYY8`bY@ Α)l;kD90 ~`!n¼lM 50.01HP#"eg:s?7%F_jVaQ!V*0OPB-]{̰iVRB ݩu܋RۑZwSZȔڨ/bhިl#: ;;geB bMOӍlYnҚ1!-HY$׌0']kMu!׌0'v[4WV-!KS&99P+EJwwoA7o%og> lzQeR[Ѡ(JHPD Z%v@*4)i,N0Dϖ>o9֩%%("-q%&nijZڍ4h61gm=,}71HsXz__LvԮQET&A*9b\3}mr7f+}(ZEJNsFvfY~^\~GXN&R:͟BCWWN{2>TjMU!1 OZh"MX R-58`PZ_t~>EWsjݮj% w&#PBW*L odWJÿ{<^i%  'ʙWlQft>h@wd)v¯`6C;n 4Kbc Օn,׌P~tm2+-.3ÈNWj`X1wxE$,B"ъĈRKT#u笁@ԦWBT+@\a%/ .]V\P9chY?+aٞn"3rt&0 %A"gAC0 0g'a9^ Z f6Cg].-amc$YZdq" mBmE쳽v4碯HLq<\2'_ā  FM@B(@ A;YZ, 3'0h)6wx8G@XF;h^qݶS[(G$(mP1OP9|-Py*ډfa:@)ZFQW-vsE / ߿?_Yg|u`͆;Yү">l;H'rN2vZMWjZQ(CŹ@m$r¶'Wh|9ڍe"@- JGç~MXR<$2p2YY~((j%FNC[+HbM X D7 `>G7[c q58}trqHD (G+h[A|M%H[[?P%nD-8qC;w%~݉ZЁnĹ@'sQrI ^j}_L ^FJE^3HPz='@O|oYQ9GRm&'^ċXGsŜTlbhDyfA~?y+}Q{F["JP9Ge@"?A*' t`{R!V` zG6۞cBX* ueԑFm+E;?5Gg500H|D- W9 YVnw%Xa&CzlEj|HX4WF #z~0?b6ƙ&K4nVf'%ǁmGT> fxO8Mm^iufX+q+ ohwFF^Mk%䨹n^$.8q!n7Qb5qZPy~tjnaBRI(f@)Ư6uNe[dqh~-čBm扉*T 413 !LwvJz#(~8y^ϩu: mG;vz?CxE{|!P?qPZK 0C/ \>|7eA"x>s&O,?0MP sYykY2|3;q4BjhVea0xXZM )'Kx繂c8DJo x#b9<9L9"S noF#G?TvdInJtp~3Hc$ QF Hm$O-@J䡔ݤB{MGzԮr^bo3Vk+ߏ֨7P)qj' F]pP "Qc#*H:?nwIqJlCOxPi7ϣ_rVFp3M` jmR$DU[bנحe?6UGԮ+;E^0 ;t+ 1Hl4Β,*Mt0Tf/ E]D,*Dɱd-O4\MKryůbB  EqLŖl$ՒZZ߷(_؟ &IDAT$0 ?Q 0 äƒ0  0L*  KJ NރA^M?;Ht굻Fk]e۹+Vv3 g(}D0I^P=o;o  /  0 @p ( AP A`P A A\ڤۺ|?,IO wޱ'd%p5cc8r'*}ۆea8} +oQ$ZiF34MvL/WnYԗ1ĝr]g߰۴yO ] E./QQr,)B`4U?K݊"`_$^G}?n&ot]!NO~.o*xOe਼ZڐÅ dٌ0o`= ;AhB>wP4v8]@sߚj\`-Wo!l^;0'0}D"+o{ЯNou;k+FXqi13zq۝p'ZqZL!m0BHBUP B!D)\wVE!k,7*f76!$!Ԣ"A! B!HBEEBH-*BjQ R!ZT$!Ԣ"A! B!HBEEBH-*BjQ R$ZI;!C"a/$"QD!2[B!B8#jtIME ,ӆeIENDB`zapping-0.10cvs6/help/C/figures/zapzilla-search.png 644 764 144 24056 10443536371 15417 PNG  IHDRGgAMA a pHYs  ~ IDATxohX0g_t2 C $*Be6p-n>Cꐅt 13m2yt.; lIܰ\ 쁖2*4 A Vqdi'je֟sN:,n\q@ŲB ʄu:0 pXuAE{QJ)ԦG] tM0d-V g>qf8E_R:xIB[x0|D$e~lWY KQzV6>F V5l[a#(ş*Q Ç>vy% 2&ǛoclK(`Z6I6UHsbUn6R;ɵ_!j#sn^[l˲ Z^ @m|6/ n(>W A[߶2PGvA`7C!+*EӼxFɱ9_lūԭ1>lnv?[5;ntQJ+1*^;m>tFH6;ux)(J]:DmeVRU]KΝt 7PȶSuHcH^>tA}Ӣpj/5W|N.RJ?+OR^ku & LϊJQi`+b梾T>ԗ*}"0>5Vv;TЫX[ELNV}:l.kwlppb;Z[5kyl~a8C45r"_Gj:ܸ(Pͯndl_CƆ,|ڴSQӢ4KRsxZ<[%KGe>S'lȀ'uqBiQwJ%L}O:'@P`lCks6K"inK_i B`,*BTY2Nx@8^j{~UQ)>+VGF7aU`ـ0DytjIf*9]nvuv.m mne@v\1't Bp\gYVYJN7t4 !l'˲Z3M|@!:BH")aH.:I?Hm"\-ڽMINڔtw<Ɔafv/vÒ4=ic+55CaW_uU vbjc;٨gIBvRe !@cpNQF}A4MS#|NV+]ِs!iQ]DJ%p8AnG=l⭶f]Snˮ{&ʎWZW.#h{0|m`'8ըTM~;+˃5Sl̍7 ;V_i54:3|!쌔9+M}VC2!Dy2 7{;4*~s 3uvnQ.^H)uinV#kʼn}"0ՌvIlJ˔ uΔ&xOzw{gokǾ;(lLZ`YT{EGZ W;WOFw.a B^fw8Qy1ZMJg"v|gĀXWb u]w*0 r)ޞ1֍;W-7/0[j.%кtjֹ4uuj)缪{ NN{rvO}Wk8pQJjiAӢaT(u1B}Rb茾25ߘG%/ )kʚR(sQ<#Vaw[ͺZKo3& 0T}:K\i'j.qF{U{[ͮ?*KՉMRyQxR%emS_Nv)֎UC2a1>Umuce(4(C"#oђeeyZuZ6ڵچ&|>t][Bȭbfş EPxZ-ŠnԦmeG9Sw; ?*B`%ݹyh-z 4}jo:upQnZ }oL)PVZ|_h27ouZsaRPK?:P:|sQw*[Νxᰆ-){n&kmR(UvmG3Kn4e>%ele֮uPjS X``[ C;:Sp$nնC>t{8BJN-?GR:(BކQ !mBކQ !mBކQ !mBކQ !mBކQ !mBކQ !m{sQ0\+Jd$*^A D. ֎ (sz/a; 򧗣E׋]%XI\rl'Sw{FJu:0s\|8(IB4 g.; ߥAY.{E)[k/'1? bĪy%st, O/ct,OΣvy(dʪ"}v^i=0P$Ih1ӕ?B^:q-L+Ve5u}ⳉtť8:#$XOݚn0s+5y|eyIYU֟h@-t |cKĵd0;ŌtVZ}hZxP溸?%uèiIBP]-ܞϮfW~|Rƹ/O.b'^W)wGx1$pi0$ ᑈᏢ#Р,#GwȐ!RpᛅK2e|,rp@J\O:1n{/G1J$Mĕ i 层Q"ydGˀm1aCyF1aCyF1aCyF1aCy[Tn!8./>H-n_cB'!Q" B0! B0! B0! gA hNb6i%F1P;XBjֻ0(j?'xHb#qP! 0!B0! B0! B0! BZ}NڗdjkόLFJ#Q" B0! B0! B0! B1XieBYuc\n?vohQ(b|6: 4.wnzs|{>r|9Bhy/_ W&ږ%9R mGpP*SmX RP3:z)&}(JA׹wV[p,Q V{E)[۱L31 XYUL!ݢųu-WsĀ 2/6ZX|Z~sjѱSL5Gѱ/>cPQ̦bq^:6Jيb!s/^iJH8jXy&Rө凋K3ҀT]iq鴘P曾N]U/Nj]UYB|\T bAО+?fՕ9g̭%eUYe#j_2wB`K]U(|PxRr\n-嬒5>W`ϲ2޲kSL`YRPjSJqJiI6\>;) UGׅU'ymØ: 7>[zDx($=.}7)ߝDae-7ye7&aHτ JA RwZ~1s?# վtA:'*Wv{~s+q'Yפx[3>a亰^26s<%cuz@iV ,ܞ_ғ9A6=؎Y+J:a8#Dtè[ג|r]L`eUe*^He>Ӓ#4JJ -LJJ>B'P% ds[ ! B捙Y%'Ld; b :T]ef>Z}>UfZ[=]ͮHp]ӳkn'EϲB7ׅU@H̃ aD/Eߦr:ygFZO$x跡_NVl>\e B`x$NvwG'>dz.Ay@8:Qtx$sbh;Ӆ; ~ד Tt<&\^K7^ݒ1(K\֤uU"W#5Bo'LoLd(6U+̄t@,[߅wo~JNߙJVXX~  .By{ڷJ4(f&oQ0׎ 'LדچF"3wf~ j8>BՕ.Ŧh51OIDyF1aCyF1aCyF1aCyF1aCyF1!os=BצqU%2|w "&|NJYvD1}øGbA~=VWH8:?wmO./#)BGQLu:3b|: {NbĄ}=sY2̤k^{vo9[Oݫ9 I<9=S]%gœ“G#ɒ$GΩ\醽&ϊ1 OrڋԭMfҮP\nTFJ4[}Z@~vڄʣ͇M>~-b dX_*,~8wl n>wX0 #5rfnl2v>skw^x7*j#u%o\B(%ߣ@k+e]ͦn*f}h};˼Mfn\nTFJ4[ٽI VRlEGȻ}_^esk9ѷ m_s#(x7ufJwqx2s=Su\X)膱] {M.nOI0*e{҄{:kQ[wL@1KfaHNbm4G1Ԏ~JHA7|>fmn'f  )BKEw5/y݊zc{L-0R5G^ HuɻB!v:O;0B]Yu#BG/6b!o(6b!o(6b!o(6b!o(6b!o(6Q8 8BMx(=jFqbWB0! B0!'Vs]} Bk Zg-}ixղXKZj  8{BaCj+VaCXK]Zd–Z^Dc09a,K.cQ4՗eb( bV*Bwq]0Cn2[^ipnM@k7N?XW--U_ P,ԗ~=!-\z*[a(w; &XOm6|dl.'L?jUţ.B;–.W(mOyCbIS׋!LKVI-ӴLZ`S /Ѳ6RaZYUV<|w/뺼sw+e Q0 KK'S'-z P <TnjX^'u`Z&}o@D DwNh7ԷY|wq dǵ>goϑnЎJkWG 3NT ;(1͒55/U3hEudėSOѱXde"u@`yx|[c>Wy]w}̃E?dRjS 4+h6" Tq4\KEV6?#&S_kL{ŜHN8wMRuWʔzgsZs7_WKai@>J8U`Kޢ XЊie%JيfoGן~Xow?*ky.(@.huXytj:4,JJ%%] x,x6Px󳬶a@kyfoAn!)lo˴lm.i@7JCݕVtwT] pcn8#e܍SV6b^2FS$Mťҹ|!66}<z У(eGŸx֯8nP)S[J-MtCUM^RxvU]BIN.vgFe!tqZ}'.9{*5M'y39՜iNWJs|}icѴ7-5jjQNu2`ӝ!`g*凙ܓaL\PYOIDATx8QlT n L}11\L5%<$CsTସcֲz;(vNRa?KqMߙ#>I|Tta1ZUV;YuD 0$͆}P M-ιh n|k]|[0n跕}:F9(V-%(gJ?A|`YNAYSAVu8A6=[{5^2@ݫPX~<6\l %YK{%% yes]ϧ =ۍIMR3M8#2U;" G1pV!>_NVk8N%o,L~9q'vA0T{(rye[Nn}% ds;+hAn>?zy $p wS7SzH^~C/Kg$_[4=!lnS a+V:kSgsB82+"|NiGHhPΉI0d~l\fYg} :y2 ! Gx =ye^yC˲{ϖtS+NKQcNY aR+0yYW5l |!2|a8y/]^~JLK N˷g+(c%v %/ # a0%Tb>x *%'9n2RҀD)M]ObD][@U+{΋ZrBUm¼9<F-5aɫOGYsأg-VT0WHCM(9=3g*Yba2Y xG6b0 ˮ*>3-Sb_Ѩ8]j[%^W.ӯt]UW~;o煉)€ܤާCrll}lGơG1ÃaeM=Z62 dWj<(ז]uά/qz<;<N $uB*-yFi {j m1"BY#@Ai`SCS~K Ig6Bu= 4]YcYlVa0d2"BM=fl]|5m#Pp$aCyF1X:B⃣xWŰB[ GH[-E1V`-k 8CyF1aCyF1aCyF1i9r َb\'7qtAh_7ftNy?<Ȅχ[_N!<(34(ԦRgWjSphe9!лb`O{%A-U~h4˲!_+D^g.B=FTM29OIENDB`zapping-0.10cvs6/help/C/figures/zapping-context.png 644 764 144 27636 10443536371 15467 PNG  IHDR0gAMA a pHYs  ~ IDATxmhغ^|ar@ X@*3nMj3DLaƝԙi7 &8e)5;M#Aҫ@p&*, C-W…|NU^Jb Au"_LʿɅMCz,;&LĉA6uDy(/兢ogQTBgn0uըA 8{P~3Y} 2o\>Ҍf՝}&8Ќ7~ct-,5A 8~ #~E\.(C`9^i9\VfJElWx&J'gaq-&$*"s}>6S^)PnPYΈkĭwG?7?ȏHUSjiy^3";²#g,A7V B+Y'竮 apՅ5cLQgy-mdgYeK^6ZI2m,~̚w#D=:971ML8ILf( #<Ÿˑ/##ar;Z%zv֑vI/%z u[/k#R;? ꃔ^?̞$Pߺ?"dJ-A!\ı8p_Lr_t$OD2Y(\ƋΪɈ95W53NRHp'md/}u?0 CM6$mvS')MZ%)'o-yfjZ*8PSfja]Dݫ~ exJ, n;v-fM6-Q'K 7;)<əc6-[j>/lW֛.KyN_y/?? I2:5]"xL>wD|.a'?:PfeRx@ ' +Ԑ?Wg|!2'~?8q.?R}?ͩ 4C\' $]ܹ!eԃt]Giu>Qӓõ?RUm=Ď l` .8tơ LÉ'TMՑoVTU%zSjq'iO3a~x"/I?$5@RpaoބYo4[KY|Pwi [Ld*%d;<2mu! 71AML&|}/󕝤jXK£e(1I $Vs%x)CkN!AW Aڐ_n]WZa."6eP~XE?K,GtHLpS9o1Y=RwvG.9|#,sYִfm;lQ8tck{g IjK!;AP0 M{R` A uM7 ϫe|c]4irL\Z}J>+(ۚW?B]KwF}٘3n2@үM?HxNq] m?ܓ81>xI~.i 'F>g35`7$S)H̿Cp#pC-&HZd٩#Y<gbRz@[}$O]/{5S +O23SшeYlΙot3^NE0g=OPͼV=)u$^uyݛHH@Mdu @/=ZlTA`&F2jhnTpC7ܓܳwVb2_poABA߾Y"̧sdMs~24E;.HI=RVx1Mt/󗦦zFN_VVPZ\>u 㴜!'u]s|vZGٓv;H].RFr91.d8M{R.ex0[)I=Xf1i$7e!>7` +%KEjbSnlm72A*rbDXffg8{+ى" #mS\+0ww!:)+Fȱ$MI8cIjgTMs"o'n ӌ5*E,oqy tCϬ\ Jn5kn %+}K"SJEM~>E E N6Wj:ov =paUS+}ByGړrY6|D+88rx,:2œazoâ!>gϰuu:qyơni I*\FTMe|Ei%aE R(% S9(2a }e1n=Z 5MQW'o$/#aǭ (*xJ##-̫ziP먇ER]F$T%`YT>ȹ͜0Ȥj$W/8зUVKʖߌOWe$o]w91`+c6mclJm wt8?hIqcQ!e%) XYqҳ\fߢNƶm)ږBȂ\@= |~GCPw|.EW_yp0VRP e m̥nmPu;t'%G.Og^+> P&VU-=\=.0e xS|,+pG>&f9{ r@5;%oʥb =NH/^o(ݽ$.c궁N6 up`65KD Am9D/a:"EW 9+5}yJ*|>63e0WAP cLwUG.>HHi&|>p;ґaop<5d۰TۥϞt̰AjI=J`BBe mޑ 9YV^Hޤ'B>OĮDneA;HN/1/KҶwp' -2ULޣݲV5%|Q'I1.PP|>8 {wy+M)[Z_sS;_b6J.A84x)X`{$~=)v#!"|K\^'G>"zck<`\3e;C 0Kh00i94C' ER(UL,[-=zw'f#^=I74]u \K@"?"pD}®` [o|"_F`Cs!y{쟂)jw~kJjqNZՂ]8)qJ'LFw>k!C:H֞ PlU-j۪aro&S{)f%)犢qX\s)C),[p{2ƀ e`F}~]3Be2>`|y.TL:Od٪[ j?g^ƒK\ϕ-Ax$vwXd}, CW_(K+y ʠktGHeyٿͻPӓTMu:f*c:N[1Οt'uv'uv;H].`]h >,{MRy (lfdiuk5 ^Fz&0^'tg"e$5PMkw')\4o'CUI2M"}Q;`~ ^D!/VUc1+x:,Y ;L8},dEMSl^xrS.b徊C"TVȲbMyp9jC zo&Uo=BK]`ݓt]2(jQԃcaMQ0vD~.Ț5i$U10Mr!O"ي)~s}bGɛPaS>Yfܽ$WWhL$n&⳱gjzȵ%XŮKlꖖY i^KZ6+i0}=voYQg)9*RW`q/ rB8MTSčauC<]d5=Rf&б5o=X.Vi.x!z,"vST>+峒1cŠ\;5ZdҨX3ãl)`Ոf/&6v;MsԓycWyQmUV3,aX>̟㪦XjH fٳ,U ADwyi&m6 )qC[BZTb́V P0ޥYv9(45o̓KfSBwH'˲ؑxI].R` .4b+ P4rGi4~Y1k =)85}e 캈`8,Y&/7 /7 dҕţ{mu! 71AML&|}/apc gyh.F0% [F":ouDXYeGRѲIYŷt0IG3 AR-%8&{ <7$(C T,e6P(~6 aUHXӍN?ӔyY9-Gp\"2%t0څ?P$jM?m[ mͼ +)Nav3D~c\9Gd_ 5Hc n){,:7@;q zIP QwrO8H=I3CL猴.B!Qӏ9$Eі.9;t݆QHoǂ2:SH{[|`jx3 & K9?ES%-d :7@:HG%7낰Z*R 2 @FԹӏď̖F ̾i/G}~`30S?^c9Ph,eT~9u,FhxM{ud` 5Kt|p8Ru1qzpbCo/.ΟL{ӯ A uơ 8882.bԃStZ.cEkuaIxo䭅KWc܆*/512AhwkKf߁8D"^@Qfˌ'hHdiġHY ¡Ź"%nJE.R3L5Hu;5o1:Z"2Lt*1vlġqx A@4jMi*^^z>kV3Z8XT5X и6WM0, ]wiH;mt釥yR*b,rmN1* Ļ>DC|vfVR KYZ" Or푲p7t%5xw݁qh ?z,iw4!$ɞM#_`O:;R`ߓ;H].eX(~hc\ĸ\prR`XIfuQR!0Ƹ#w]-t_ܦ?(AN2E0 q]!/R6٫SRos~uK2FCDҧiOQ MVFwXW$m[7ƶc\;@-|K?,+At ݳ(q/ lFԽI @A@gQ^9AF Zg&ʖ(6>~s+?-o& u//j8 cMo̗ʥN3q#vىcXfG? _>j&Hȱ#!z蕨E`JR'ӳj5ժ/*,-Ɏ Op,=Q6Hal26 # i pwnXkgkV:I1g:P$e:BH]eLsFY** zfk".b %bO$0Yv=4ʠl)]=4WSQYmzh*箨,+D|.^r3jMNpKw)$IwcVTUU^(E%ʬ^ e {č[#;WtJxP4IDAT>?5V0kZ^ϙص8c]Q}Ծ^BwWXQblBAҧ)ZwDhf#vJ{ }8؛~].R` Aॢ!fsf^RͅuѾa0ӊ¦$#(˿҆D(eIS!]nSBp<("_G}ǜa36?|_S=uQ6pfRx\i]$L~>i9 nrb/U9/[ڥ./ Q- 1B]1ujavُ,;F^9QM$}ZXmTm,^b>nbruExYt6ojȏhц7ڇ{=>nwP gqZZk6'B+4}65xo]lTt.\MouWWʹouħFft@qDhJ;3upBD crAكTMKeҾ3;% Gyd͛sKBctkeAP'.9nϢ;"|>([j./g2[~h!.JST1Asĵd-D-N?{k\Ha֢9Ⱦ7"(2.b/CEKЧ);Bu,/yʖ ?X:l(6?HcOI]}O uv F*0h#B#J>O78Ud@mzmgwf^gb?v\>|vѨOmI\  efٝPph]J?gӑ2+Ku6[:4&==(8X.:kM&OVKU!ˌ'fLpRb[{Ej$I.\ Wd%8aχ?!Y~$DCL:,q\l6V*iDwmUy9+TpfqI$RS?Ru s~[ZnS"_Dofv0ѩ8,gYhE;SDi1R0ݍDĮٛ fd;3NL&B+9k{&5e6P^Ib.i}ma3AZS];U^pRb{So!jj<9g!;=0W(_*9ay9~Fnk@IBFAZ[]Uy=;w?ӥNuL@mX6k;Ӈ$G)+ J/Bg)۽ TR}O*s4.ރ.twIpI`e%c[wwuw]{R` Ԭ8kJoBBeP\>'ˊ\.ɻћt@ؕM q-Z~;HN/1/KҶhO*Zje\¶Yu# E x[\Bg%M#7F+L_&H,¦lmg%të>m3scO= 1`pQ_ "Pqm2wt 6k ^9{8DBtCW h74 VWv4>7ǺWARmI3>;Ĭ>HRVTe` eie:OAt͐I£L>//5.Ur:]#[.ں u城O@<{BIENDB`zapping-0.10cvs6/help/C/figures/zapzilla-export.png 644 764 144 33272 10443536371 15473 PNG  IHDRXgAMA a pHYs  ~ IDATx_hؾ/߾ 9 C$H TfC\6Mԝ­3{5}qav :U -Ja=p]8a^ lU j` ^pi4fiiimZ^Z:! nO>f,48,Re씍:!܊`6`io5B!(ƛF.eR'݌Gul^Po !B'F}SIJ:x=PC EQjP~ X?04b#b\zmK~)oz3L7fe}] ~)EyψN@]VYk)?B("_߹f$;e_^~ûu tT;~ƯfiB j&ۯlBG[4m'd!n7r{O[6 -PW Cq8^?~Q9{b#`[׍-k61rM7X׍{BHYC@ЈڿZ.ٺ2i꡴7z(R'Bj5c}.Mm( G~BG5Y3r+(4k}6hˎ 5c=C߭/mtאK,t8el.p8R'1+Zbwc6>;o_Klҽ?ƚzJcU\~u]7tf wauC]@K;f٬6}oZ PG@Q~h ZៅʻaJVF"q!:9cwbѻM')M47Uz7e,q8ÜbL3O~'B* u(R't/ Set/ 6JBQK4|i[U}4mK@W%Iy/xjiJj~ !WimO-?Z4M4Nqt/-՗Vgˆ:1,:hǝR@rӼi_KJv| 欙KaVZ-vUUUE9)F8#Kꎭo}/lM߯%uB>z6COئ9[x~-s-VP,iݰ,KNi4M#uyG1M(BH˙޶U CQ6j^֙S !jfnį5gm#mώ - Ёdxlx2lQ˯%,|>8)skR6;Y0֤RռxV?5G?~zV_ӹӜY^?BBe9OүU) b0z oZc: ڿjJV[u .E~%zZKQ !t1__o\qk)`MmM^-r1lf^dZKP( fevmWv%pƯYj>k^ikTOBKpY[_!fhڇZٍdks6ȯ?xԫmVz_5>JezY[Zmo: Nuuqm|6in[n[saqZM7n?Bu?\6a`۱^ߘ$:UkB){r)+L[>fTJZ$6BZ`R6 {泳Zh-ޭ:l=!tx{k,>;'!mw[CiBCяB]!F?Bu~:!u0BBˎggij»}!:nrp?oJc77?>׿O!BuX?Bu~:!u0B`#PGt!P{l@50Q_< !t4u 돭- ֪$"31ݻb(Љ]!=w '2//s?&q\ѻPsyU |7kmWwx';b/>^p gEe!F?Bٚ} #z' S ɧ Ҙ8mȨKY;R6JeZ(V''2?%RX{{V5RjT+TD{s(c#NOGDsJ.z' 6*<vՒf&',ÌIɅ+Y,oBjUT=#ȏbd(G/m#}\~@az>a#N&+ߏݍe_\Z?ofUzl/c-d?c!ukf/UqxXI>U%ܟ}ȹJwF?ȉKpѽ~Ax!tb39WٿFn_uacfӼ= g8;5쮘f^L, Ǒ:ߟPmqGFSUa[ֈg)&1:!?W gpxy{Fvup4w7"2 &Tʦf@V4vGmMܘ`Xn@9gf|n gJqCN/:?{ED!';S `2 )R%. :}R\.kg{>!EͫS\jAi) 1C5s8Ezkl#?~^:uڂяBmtҰ!8GяB]!n/!n±7^B!rWEpBt(rX?Bu~:~ !tɻ:x !> PGяB]!F?Bu~:!uN¼~:euU㗃i/ѿ3Ť=7bg* GmoBѩA!:3QՖߺd?FIW%T^Gmx&?m!tur_{$w+zw++2( )q7Tϫ/s/5Y$wڲ>ۙ/>^p gEk/ʳyweK8rꭻFO3&7nV֑.?t2 INVꋌݟ֤OcYy(M(z'\HKob.aO;ӋT }ݍ@S9v6$aO3kU30.KXLE7ty\LEkDDgֺk:17&IJN[3B`aǤB* ;x;E@h2 r"܋ # .jZ%akUqi[+=y,˯!L/}ٿϨj`LQw`{W3(khs=TKy rfadP6JaIl.E3Bh!tDtlr'lX:q%sYrҶ8R'3-JD8=!?ĮBho~;$P0JRjMt]b5(+Vl.W߈0LVbP)O܏g2pBi^(ϔbI㆜ ^_t#fxV_ FaQ8{/ Mhb2\H@KZ_;BT-rNߨT*&YuV܊Z]#!x:X?n**FPc7)]!.=1zw:>7fO-B]!F?Bu~:!u0BG? !tn+BBu~:!u0B`#PGO/f`h ٹV&ds9`?F!g{dD^-^-Jk7'wJrQBR666,{({%r{ɼ!W $w UFIW4&9yNQ>Bd|^th^*`{iTIzr6~:>$0ɧJO9_B1=nlI&; 6c6xux7^ui[awjA)gzpo-G!wҷ 6,jUR_o{Kȏq PU)WϺSLb.u C~.Q7JiG!s!KoK{$+wl@ ?,sܠSy>Y^Z?OdqXjPR@ޝjk=׌kW  y]{]V#agɈ4xZ|ZnN=L{{Ji*B>c2 DnE Mj1x2)O7=0gQ緽voh-]6~yJEOjC27ȹ ۵a;@np⢿Ҙ8mȨKYkMja>T <ǏB߄wbɅ^&VI3Jס+mtCg.-'tŌLb5(_JZ&]A'7蔮l,li(JKypVlT/>^p gEs@gxFUUp,46o[jUfHN/zwZy>7<~ԼV7 mwwܝLZ\}?XW#?.Q6{~%*4 K/Rתf`\ ^ yXy^[3thͣ~rc?c?xm`iP{/""bOЍ`:â8|. uK3ŭeV\V=40fS\62Ԫ %8e@f9gr֣u se+Tgm^AxFֿE5sa1׶Ӡ.iJeTBW NXio?q^q:E+?ȉxցγ46ZP^Ó!"]ԅ*9NiMzqV%֯fP=e`|LE/!$".5me1[K^i0п%`lf1<}__9q.Ϧ}lVǜe6hi0tr3U(% '~?.E7MiG t$ɝmg)&1݉eC~.}x\n:EQ4kPU)W2\N~]{'U[dR襥;Mgy k&b<*F@#kV,9v|Tj)(|7c-{i+m.I%R0Mjgm~4[4sNUijBS, Ǒ:ߟi `9 u3XҸ!wY2E 7Hr!/I/Z?/nL}FG/}poBV%*QOuw3yA!MYHH!;% a'σz6Z+94Ȼh 0_)@*9sooJ, C̋pfyG/Η 3,2}L/Q0jUbmtiESV%7#aȭu0M}jǩX8ƽ~kV)Iخp8nn{&fs}[߅,λXC{OLF5BӴ'v+jbăDd*Gsqh59@dTLE7UbOP%2A5imQJV)%E#6 9) \ D'`b;ؽ66*މ"ԁcwcl3|>tGQxqO~ UU.ŭeuONLwž%S=j$9,ҕkcQ(H?O)O}(B;tt|.n|!ZL AÚxr=Gl"a1A8:fZ ~uڃ0Ѯ8zi<Љ>!u0B`#P2I!t@0 ^:p!F?Bu~:!u0B ~_:y FBE8B]!F?Bu~:!uh\$!DJWC.Dz#57ds9u~bJDɈB/?ԥ.pF̈́!!:?̋ *!to7C,À 4:+L Y\ٗ9,j nr%4\I,7 ]BKZҤ+7ҕ3Tomjۭkg|0: ɏe*VE^ͫP?C| r^8h%PIDAT:@ݍIV,?Hd^h`^,v/WKj%א3uдf@T>}3wB m9mx#yEw)qJ%L$B!:k~P&<vvU DZi6p Bz[ɯ/xF<.A¹\0ݘcp rTSniCۭl{8^?0؍0aPkkvX/SͽrV(W6V}l=,`2L23?gw7:+|pv];oc]zM}V̊Kp~-J蝨o!>oMY?[(=o-"SQ91}fzi V|k[W'S Jq5>+H[n=s=~Kjwԛ/1Bh1oBޝhP!FZR7MuR63iu1<"DŽ V%ٕ膑])@4͝mNܐj[N',90 Y&wFjsrS~(oՊgEˀo3wL`\xg6*A٨SrN>Ԣwܐ㝩ŌPVmΆRauۃVfd?c@}7DЍP](sm;9$TD *?D겊GGѻY6|j1GF!G|n9!.!i~!'яB]Бuc'+BP`!F?Bu~:!u0B qI6L]51DM8B]!F?Bu~:!um!tlr,7Щl.שBؼbF~,~-*z(4נ.KwI!tv/;xPgz3gݜ]_fuuvI ^RQHW^:Ҟc!vo(nzl@feF pN \Lr1R_h/t;Ag\ۿm5B·;ͫgl@UM9׼$zgsR?&oE?f[ 3ᩨg\ZnLp\Cyչ㗃O:Б c߆׃^l1QK@{$b5F31?&t%;m?y}k[C[+M"qNn)]ۼX*/<}YyPx%pY^pqykaƈ,(t/-?WZ֤~JZX_3]2P,uuvYLWPl^6B7B\eފjEUsrDnE Mj1xy<)O[,?˃K,55K!v+}m@Az ԩ}=ߴ?TDW)Ϧ_d[jсڬ4&99N[-/2R:vC7}/6q=N%%ZJ=W@y*ܶ OA෫ED7]jƥu)]Xɮo^5RjT+TD{KZX,V" KacwR5BWy{"Si6/t^{6`sc\wf{ىoBPסWAqx}N<+X}oB;np~D OvMKe9OBVʏ׾㡫čgbLdrNQA/?U..:"<#gr&`.?t$Ml/uUv% +ǤBZxFs!Zڮ\0ݘck)7oYR !l_)B^&2p8cX*)qBv{uNb )lm܊6/A8#FY[3v%?g)x.Uu^iC9qeJ/nQ\ ԪD*8sol۪UocRZԪ9yRkWصj .^::4k^tT`?cz1ݹZU50ع[[ er%^eSX'˯t&G5#Z \ Nf2t!tFEq\Aꤵ-AN,~-x0fnkɨu0۩B.NLFjUr񽡭r35"0(j~AeNGMتR@{C*ip?{AP4:凎D%,la:v_ϨaVMkԸ1pa]8N-(ռ ]ߔ{+fd`ﳅ_ ։ O0r+j ӯ46ZP^Ó!"]ྴWZr!T֔lgi:uk=1 ԋN״u&ym=ȴ o4 \ O@yX53h#J}2LPD޴JUFͫ˪x͝bsqns%piۯEUʕ3,2}L/Q0jU])l-BR*8ZdM} #R:8h;5R$ܝ̪?7píϷN6'`=T?rsby`!k;QKN>,׵b~ΤW7 @<86_d%Ur<V׿Jyv>wС:NMNgދl.q`R,iܐsNNh}$7֬} 6*T:ܢSp%Ol9|މK晅[QoT$农L-fR#_>){)) ֙K6*>W7WK3gu #I?kPC9"Ә_)@jUZL^OVer inv. 8ylJ?ow!LLFaqWo8h?s?^#D{) }ct.mR cAdבy[kKWHcӼzUl#?~RR}޺{%wtoV4\C| p8}b2==ͧ[wD4M]L6jvVT9EnE1~}Ҕl|^P< }x') .=+܍! AAvIe{T)(g.D8xqO~ UU.-euONLmO)qɔ} -CJGNf{#:Sбя:qΎ4)VN!ީ? ~N> M=?>=*_?Zh|_{B:^'яPWZbT籣Pl.r?y]>]яɧ}[@o>)Y}b1N@6D7ψ@Ruab;`ҋ*IK*/5#M%~o~RgAmnN.x/:?w'? M>Ɉ4xZ|ZnN-Bh2F?B]O{IYk$Kn c߆׃^l1QK@~"";y,Mb?&܀tP{IW$n :+0_(xG}Ί͏&~ȩPz,W rYr_4Dz},ȤHz ͓MSYGx WI;|-40vcy rfu@z>n XfS eG]w߰O}]Z6jVIiW -sѽ,|FcD&C4&%O}|:O2ֈ̟;O"U+-2s;MB_<͆8R'3øp8=[}Ӹf_ɷ}EA&n^4_)ʮ< tY}K0:ɬokw8>!Ä %OMkZho4ټ Wff1 6="DŽ V%ٕFDa"" JnRZ-JBId}MJmm8Ye!UZ(:}ێ8*\1m;p_KrkO9ۉNgދl.qY2E o_J=U.\BT-rNߨT:r)KjEvk"kzikZ>-7B3gs`ȩ''n~IrtrA)O8֏I}m{I]FZ.m+p&s3ucy Zh5bM`{>jrBxG=rwWto9fY)d;GҟQ@}RMvE:n9l:"S#p!vRZ-fxxG8a!ԅ0B`#PG;B''?m;k8m #PGяB]!F?Bu~:;w!>2Cl :**3:hL~9EQ+I: 6CV;g R'4 TUv(~!J%^hiRU`#>?vB}R8!G?>IENDB`zapping-0.10cvs6/help/C/channel-editor.xml 644 764 144 12721 10206044375 13561 Channel Editor To open the channel editor, choose Edit Channels . In the channel editor you can edit the channel list. It can contain tuned channels (if your TV card has a tuner) as well as composite and S-Video inputs.
Channel Editor
The channel editor dialog shows three sections. At the top the frequency table and related options. In the middle the channel list. At the bottom you can edit individual channel list entries. Populating the Channel List First you must choose the frequency table used in your country. To do this, select a country from the drop-down menu in the top left corner of the dialog. Then you can: Click on Automatic station search If this is supported by your TV card Zapping will scan all RF channels in the frequency table and enter the found stations in the channel list. When VBI decoding has been enabled in the preferences it will also try to determine the station names. Click on Add all channels This will add all RF channels in the frequency table to the channel list. Click on Import XawTV configuration This will import the channel list from the XawTV configuration file, if you used the XawTV application before. Naturally you can also enter channels one by one yourself. Now you can edit channel names or reorder channels on the list. When you are satisfied click on OK to store your changes and leave the dialog. Editing the Channel List To select an entry in the channel list just click on the row. To select multiple rows click on the first row, then press-and-hold Shift and click on the last row. Adding and Removing Channels To add a new channel, click on the Add button. To insert a channel at a particular position, select the respective row first. New channels are empty and will not show in menus. You can leave it this way to create a gap in the list. That is useful when you switch channels by entering the number in the list. To remove one or more channels, select the rows and click on the Remove button. Reordering Channels Select one or more rows and click on the Up or Down button. Editing Channels It is not possible yet to edit the channel list directly. Instead select a row and edit in the box at the bottom of the dialog. Channels have the following properties: Name The name you want to give the channel. Video input Typically TV cards have a tuner, composite and S-Video inputs. Here you can select the input to be used when you switch to this channel. When you select Do not change input a switch to this channel will not change the input. Radio frequency To change the radio frequency (the RF channel) select a different row from the frequency table, in the top right corner of the dialog. If necessary you can select a different frequency table for each channel. Fine tuning Here you can adjust the radio frequency. As with the radio frequency this property is only applicable if the current video input is a tuner. Video standard Typically TV cards support more than one video standard. Here you can select the video standard to be used when you switch to this channel. When you select Do not change standard a switch to this channel will not change the video standard. Accelerator A keyboard shortcut to switch to this channel.
zapping-0.10cvs6/help/C/Makefile.am 644 764 144 711 10331032331 12117 figdir = figures docname = zapping lang = C omffile = zapping-C.omf entities = \ settings.xml \ channel-editor.xml \ zapzilla.xml \ commands.xml \ fdl-appendix.xml include $(top_srcdir)/help/xmldocs.make # Missing in xmldocs.make DISTCLEANFILES = $(omffile).out dist-hook: app-dist-hook # This finds errors missed by scrollkeeper-update (make install). xmlcheck: $(entities) SP_CHARSET_FIXED=YES \ SP_ENCODING=XML \ onsgmls -s -wxml zapping.xml zapping-0.10cvs6/help/C/Makefile.in 644 764 144 45546 10442575414 12230 # Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # # No modifications of this Makefile should be necessary. # # To use this template: # 1) Define: figdir, docname, lang, omffile, and entities in # your Makefile.am file for each document directory, # although figdir, omffile, and entities may be empty # 2) Make sure the Makefile in (1) also includes # "include $(top_srcdir)/xmldocs.make" and # "dist-hook: app-dist-hook". # 3) Optionally define 'entities' to hold xml entities which # you would also like installed # 4) Figures must go under $(figdir)/ and be in PNG format # 5) You should only have one document per directory # 6) Note that the figure directory, $(figdir)/, should not have its # own Makefile since this Makefile installs those figures. # # example Makefile.am: # figdir = figures # docname = scrollkeeper-manual # lang = C # omffile=scrollkeeper-manual-C.omf # entities = fdl.xml # include $(top_srcdir)/xmldocs.make # dist-hook: app-dist-hook # # About this file: # This file was taken from scrollkeeper_example2, a package illustrating # how to install documentation and OMF files for use with ScrollKeeper # 0.3.x and 0.4.x. For more information, see: # http://scrollkeeper.sourceforge.net/ # Version: 0.1.2 (last updated: March 20, 2002) # # # No modifications of this Makefile should be necessary. # # This file contains the build instructions for installing OMF files. It is # generally called from the makefiles for particular formats of documentation. # # Note that you must configure your package with --localstatedir=/var/lib # so that the scrollkeeper-update command below will update the database # in the standard scrollkeeper directory. # # If it is impossible to configure with --localstatedir=/var/lib, then # modify the definition of scrollkeeper_localstate_dir so that # it points to the correct location. Note that you must still use # $(localstatedir) in this or when people build RPMs it will update # the real database on their system instead of the one under RPM_BUILD_ROOT. # # Note: This make file is not incorporated into xmldocs.make because, in # general, there will be other documents install besides XML documents # and the makefiles for these formats should also include this file. # # About this file: # This file was taken from scrollkeeper_example2, a package illustrating # how to install documentation and OMF files for use with ScrollKeeper # 0.3.x and 0.4.x. For more information, see: # http://scrollkeeper.sourceforge.net/ # Version: 0.1.2 (last updated: March 20, 2002) # srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = ../.. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(top_srcdir)/help/omf.make $(top_srcdir)/help/xmldocs.make subdir = help/C ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = SOURCES = DIST_SOURCES = DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ ARTS_CFLAGS = @ARTS_CFLAGS@ ARTS_LIBS = @ARTS_LIBS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BUILD_DEINTERLACE_PLUGIN_FALSE = @BUILD_DEINTERLACE_PLUGIN_FALSE@ BUILD_DEINTERLACE_PLUGIN_TRUE = @BUILD_DEINTERLACE_PLUGIN_TRUE@ BUILD_MAN_FALSE = @BUILD_MAN_FALSE@ BUILD_MAN_TRUE = @BUILD_MAN_TRUE@ CAN_COMPILE_3DNOW_FALSE = @CAN_COMPILE_3DNOW_FALSE@ CAN_COMPILE_3DNOW_TRUE = @CAN_COMPILE_3DNOW_TRUE@ CAN_COMPILE_ALTIVEC_FALSE = @CAN_COMPILE_ALTIVEC_FALSE@ CAN_COMPILE_ALTIVEC_TRUE = @CAN_COMPILE_ALTIVEC_TRUE@ CAN_COMPILE_MMX_FALSE = @CAN_COMPILE_MMX_FALSE@ CAN_COMPILE_MMX_TRUE = @CAN_COMPILE_MMX_TRUE@ CAN_COMPILE_SSE2_FALSE = @CAN_COMPILE_SSE2_FALSE@ CAN_COMPILE_SSE2_TRUE = @CAN_COMPILE_SSE2_TRUE@ CAN_COMPILE_SSE3_FALSE = @CAN_COMPILE_SSE3_FALSE@ CAN_COMPILE_SSE3_TRUE = @CAN_COMPILE_SSE3_TRUE@ CAN_COMPILE_SSE_FALSE = @CAN_COMPILE_SSE_FALSE@ CAN_COMPILE_SSE_TRUE = @CAN_COMPILE_SSE_TRUE@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCAS = @CCAS@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ COMMON_INCLUDES = @COMMON_INCLUDES@ CONSOLEHELPER_LOCATION = @CONSOLEHELPER_LOCATION@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFAULT_CFLAGS = @DEFAULT_CFLAGS@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ESD_LIBS = @ESD_LIBS@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ GCONF_SCHEMAS_INSTALL_FALSE = @GCONF_SCHEMAS_INSTALL_FALSE@ GCONF_SCHEMAS_INSTALL_TRUE = @GCONF_SCHEMAS_INSTALL_TRUE@ GCONF_SCHEMA_CONFIG_SOURCE = @GCONF_SCHEMA_CONFIG_SOURCE@ GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@ GDK_PIXBUF_CSOURCE = @GDK_PIXBUF_CSOURCE@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ HAVE_GCC_LIMITS_FALSE = @HAVE_GCC_LIMITS_FALSE@ HAVE_GCC_LIMITS_TRUE = @HAVE_GCC_LIMITS_TRUE@ HAVE_LIBZVBI_FALSE = @HAVE_LIBZVBI_FALSE@ HAVE_LIBZVBI_TRUE = @HAVE_LIBZVBI_TRUE@ HAVE_X86_FALSE = @HAVE_X86_FALSE@ HAVE_X86_TRUE = @HAVE_X86_TRUE@ HAVE_XMU_FALSE = @HAVE_XMU_FALSE@ HAVE_XMU_TRUE = @HAVE_XMU_TRUE@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ INTLTOOL_CAVES_RULE = @INTLTOOL_CAVES_RULE@ INTLTOOL_DESKTOP_RULE = @INTLTOOL_DESKTOP_RULE@ INTLTOOL_DIRECTORY_RULE = @INTLTOOL_DIRECTORY_RULE@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ INTLTOOL_ICONV = @INTLTOOL_ICONV@ INTLTOOL_KBD_RULE = @INTLTOOL_KBD_RULE@ INTLTOOL_KEYS_RULE = @INTLTOOL_KEYS_RULE@ INTLTOOL_MERGE = @INTLTOOL_MERGE@ INTLTOOL_MSGFMT = @INTLTOOL_MSGFMT@ INTLTOOL_MSGMERGE = @INTLTOOL_MSGMERGE@ INTLTOOL_OAF_RULE = @INTLTOOL_OAF_RULE@ INTLTOOL_PERL = @INTLTOOL_PERL@ INTLTOOL_PONG_RULE = @INTLTOOL_PONG_RULE@ INTLTOOL_PROP_RULE = @INTLTOOL_PROP_RULE@ INTLTOOL_SCHEMAS_RULE = @INTLTOOL_SCHEMAS_RULE@ INTLTOOL_SERVER_RULE = @INTLTOOL_SERVER_RULE@ INTLTOOL_SHEET_RULE = @INTLTOOL_SHEET_RULE@ INTLTOOL_SOUNDLIST_RULE = @INTLTOOL_SOUNDLIST_RULE@ INTLTOOL_THEME_RULE = @INTLTOOL_THEME_RULE@ INTLTOOL_UI_RULE = @INTLTOOL_UI_RULE@ INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ INTLTOOL_XAM_RULE = @INTLTOOL_XAM_RULE@ INTLTOOL_XGETTEXT = @INTLTOOL_XGETTEXT@ INTLTOOL_XML_NOMERGE_RULE = @INTLTOOL_XML_NOMERGE_RULE@ INTLTOOL_XML_RULE = @INTLTOOL_XML_RULE@ JPEG_LIB = @JPEG_LIB@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBXML_CFLAGS = @LIBXML_CFLAGS@ LIBXML_LIBS = @LIBXML_LIBS@ LIRC_LIB = @LIRC_LIB@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAKEINFO = @MAKEINFO@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ NEED_ZSFB_FALSE = @NEED_ZSFB_FALSE@ NEED_ZSFB_TRUE = @NEED_ZSFB_TRUE@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_CFLAGS = @PACKAGE_CFLAGS@ PACKAGE_LIBS = @PACKAGE_LIBS@ PACKAGE_LIB_DIR = @PACKAGE_LIB_DIR@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_PIXMAPS_DIR = @PACKAGE_PIXMAPS_DIR@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PACKAGE_VERSION_ID = @PACKAGE_VERSION_ID@ PATH_SEPARATOR = @PATH_SEPARATOR@ PG_CFLAGS = @PG_CFLAGS@ PKG_CONFIG = @PKG_CONFIG@ PLUGIN_DEFAULT_DIR = @PLUGIN_DEFAULT_DIR@ PLUGIN_DEFAULT_FLAGS = @PLUGIN_DEFAULT_FLAGS@ PNG_LIBS = @PNG_LIBS@ POFILES = @POFILES@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ PYTHON_LIBS = @PYTHON_LIBS@ PY_CFLAGS = @PY_CFLAGS@ PY_EXTRA_LIBS = @PY_EXTRA_LIBS@ PY_LIBS = @PY_LIBS@ PY_LIB_LOC = @PY_LIB_LOC@ RANLIB = @RANLIB@ RTE_LIBS = @RTE_LIBS@ SCROLLKEEPER_BUILD_REQUIRED = @SCROLLKEEPER_BUILD_REQUIRED@ SCROLLKEEPER_CONFIG = @SCROLLKEEPER_CONFIG@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ SUID_ZSFB_FALSE = @SUID_ZSFB_FALSE@ SUID_ZSFB_TRUE = @SUID_ZSFB_TRUE@ UNICODE_CFLAGS = @UNICODE_CFLAGS@ UNICODE_LIBS = @UNICODE_LIBS@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ WARN_CFLAGS = @WARN_CFLAGS@ XGETTEXT = @XGETTEXT@ XMLCATALOG = @XMLCATALOG@ XML_CATALOG_FILE = @XML_CATALOG_FILE@ XSLTPROC = @XSLTPROC@ X_CFLAGS = @X_CFLAGS@ X_DPMS_LIBS = @X_DPMS_LIBS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ X_XF86DGA_LIBS = @X_XF86DGA_LIBS@ X_XF86VMODE_LIBS = @X_XF86VMODE_LIBS@ X_XINERAMA_LIBS = @X_XINERAMA_LIBS@ X_XMU_LIBS = @X_XMU_LIBS@ X_XV_LIBS = @X_XV_LIBS@ ZSFB_GROUP = @ZSFB_GROUP@ ZSFB_OWNER = @ZSFB_OWNER@ ZVBI_CFLAGS = @ZVBI_CFLAGS@ ZVBI_LIBS = @ZVBI_LIBS@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_STRIP = @ac_ct_STRIP@ ac_pt_PKG_CONFIG = @ac_pt_PKG_CONFIG@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ datadir = @datadir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ python_val = @python_val@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ figdir = figures docname = zapping lang = C omffile = zapping-C.omf entities = \ settings.xml \ channel-editor.xml \ zapzilla.xml \ commands.xml \ fdl-appendix.xml # ************* Begin of section some packagers may need to modify ************** # This variable (docdir) specifies where the documents should be installed. # This default value should work for most packages. # docdir = $(datadir)/@PACKAGE@/doc/$(docname)/$(lang) docdir = $(datadir)/gnome/help/$(docname)/$(lang) # ************** You should not have to edit below this line ******************* xml_files = $(entities) $(docname).xml EXTRA_DIST = $(xml_files) $(omffile) CLEANFILES = omf_timestamp omf_dest_dir = $(datadir)/omf/@PACKAGE@ scrollkeeper_localstate_dir = $(localstatedir)/scrollkeeper # Missing in xmldocs.make DISTCLEANFILES = $(omffile).out all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/help/xmldocs.make $(top_srcdir)/help/omf.make $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu help/C/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu help/C/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool uninstall-info-am: tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) $(mkdir_p) $(distdir)/../../help @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$(top_distdir)" distdir="$(distdir)" \ dist-hook check-am: all-am check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic distclean-libtool dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-data-local @$(NORMAL_INSTALL) $(MAKE) $(AM_MAKEFLAGS) install-data-hook install-exec-am: install-info: install-info-am install-man: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-info-am uninstall-local .PHONY: all all-am check check-am clean clean-generic clean-libtool \ dist-hook distclean distclean-generic distclean-libtool \ distdir dvi dvi-am html html-am info info-am install \ install-am install-data install-data-am install-data-hook \ install-data-local install-exec install-exec-am install-info \ install-info-am install-man install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \ uninstall-info-am uninstall-local omf: omf_timestamp omf_timestamp: $(omffile) -for file in $(omffile); do \ scrollkeeper-preinstall $(docdir)/$(docname).xml $(srcdir)/$$file $$file.out; \ done touch omf_timestamp install-data-hook-omf: $(mkinstalldirs) $(DESTDIR)$(omf_dest_dir) for file in $(omffile); do \ $(INSTALL_DATA) $$file.out $(DESTDIR)$(omf_dest_dir)/$$file; \ done -scrollkeeper-update -p $(scrollkeeper_localstate_dir) -o $(DESTDIR)$(omf_dest_dir) uninstall-local-omf: -for file in $(srcdir)/*.omf; do \ basefile=`basename $$file`; \ rm -f $(DESTDIR)$(omf_dest_dir)/$$basefile; \ done -rmdir $(DESTDIR)$(omf_dest_dir) -scrollkeeper-update -p $(scrollkeeper_localstate_dir) # If the following file is in a subdir (like help/) you need to add that to the path all: omf $(docname).xml: $(entities) -ourdir=`pwd`; \ cd $(srcdir); \ cp $(entities) $$ourdir app-dist-hook: if test "$(figdir)"; then \ $(mkinstalldirs) $(distdir)/$(figdir); \ for file in $(srcdir)/$(figdir)/*.png; do \ basefile=`echo $$file | sed -e 's,^.*/,,'`; \ $(INSTALL_DATA) $$file $(distdir)/$(figdir)/$$basefile; \ done \ fi install-data-local: omf $(mkinstalldirs) $(DESTDIR)$(docdir) for file in $(xml_files); do \ cp $(srcdir)/$$file $(DESTDIR)$(docdir); \ done if test "$(figdir)"; then \ $(mkinstalldirs) $(DESTDIR)$(docdir)/$(figdir); \ for file in $(srcdir)/$(figdir)/*.png; do \ basefile=`echo $$file | sed -e 's,^.*/,,'`; \ $(INSTALL_DATA) $$file $(DESTDIR)$(docdir)/$(figdir)/$$basefile; \ done \ fi install-data-hook: install-data-hook-omf uninstall-local: uninstall-local-doc uninstall-local-omf uninstall-local-doc: -if test "$(figdir)"; then \ for file in $(srcdir)/$(figdir)/*.png; do \ basefile=`echo $$file | sed -e 's,^.*/,,'`; \ rm -f $(DESTDIR)$(docdir)/$(figdir)/$$basefile; \ done; \ rmdir $(DESTDIR)$(docdir)/$(figdir); \ fi -for file in $(xml_files); do \ rm -f $(DESTDIR)$(docdir)/$$file; \ done -rmdir $(DESTDIR)$(docdir) dist-hook: app-dist-hook # This finds errors missed by scrollkeeper-update (make install). xmlcheck: $(entities) SP_CHARSET_FIXED=YES \ SP_ENCODING=XML \ onsgmls -s -wxml zapping.xml # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: zapping-0.10cvs6/help/C/zapping-C.omf 644 764 144 1243 10360121113 12436 Michael Schimek Zapping TV and Teletext Viewer 2005-11-21 User manual for the Zapping application manual zapping-0.10cvs6/help/C/settings.xml 644 764 144 113102 10360121113 12523 Settings To configure Zapping choose Edit Preferences . The Preferences dialog contains the following sections. Video Device In this section you can select the device file name of the kernel device to be used in capture mode. On Linux common names are: /dev/video /dev/video0 /dev/video1 /dev/video2 /dev/v4l/video /dev/v4l/video0 On FreeBSD: /dev/bktr /dev/bktr0 /dev/bktr1 /dev/bktr2 Changes will take place after you quit and restart Zapping. There is no dialog to select an XVideo device, Zapping uses the first device it finds. This will be corrected in a future version. Audio Device Here you can select an audio device to record sound. Usually a kernel device is the best choice. If your TV card has audio sampling hardware and the driver supports this, you can also select the TV card as recording device. This will free the soundcard to record from other sources. Common kernel device names are: /dev/dsp /dev/dsp0 /dev/dsp1 and so on. Click on the down arrow of the device file entry to see a list of devices found by Zapping. If the audio output of your TV card connects to an audio input of your soundcard, or when your TV card has no audio capabilities, you will want to select Control volume with soundcard mixer. This has two advantages: Zapping will properly set the volume control on the soundcard mixer and the TV card, you will not have to start a mixer application. When you change the volume or mute audio, recording is not affected. When you select a kernel device as audio recording device, you should also enable this option to determine the correct audio input line. Common mixer device names are: /dev/mixer /dev/mixer0 /dev/mixer1 and so on. Click on the down arrow of the device file entry to see a list of devices found by Zapping. VBI Device In this section you can select the source of Teletext and Closed Caption data. The DVB PES format is used for digital TV VBI transmissions in Europe. Zapping does not support digital TV yet, but it can read DVB files. For normal operation however you should choose a kernel device. Common device names are: /dev/vbi /dev/vbi0 /dev/vbi1 /dev/vbi2 And on Linux only: /dev/v4l/vbi /dev/v4l/vbi0 The VBI device name should match the video device name. When for example the video device is /dev/video2 or /dev/bktr2 the corresponding VBI device is usually /dev/vbi2. A VBI proxy allows two or more applications to read from the same VBI device, for example Zapping and Nextvepg. When this option is selected Zapping will access the chosen VBI device through the proxy, or directly if the proxy is not installed or is not running. The proxy is a service of the ZVBI library, currently it works only on Linux. Main Window You can set the following preferences: Save window geometry Zapping does not support session management yet. When this option is selected, it will save the window geometry on exit and restore on startup in a non-standard way. Show tooltips Whether to show tooltips. Disable screensaver In video mode (not it Teletext mode) disable the screensaver from blanking the screen. Save control values per channel When this option is selected Zapping saves and restores brightness, contrast, audio volume and other settings when you switch channels. Enter channels by When you enter channel numbers on the numeric keypad or with your remote control, Zapping can interpret the numbers differently. In the United States you will want to choose by RF channel number (1 to 125). You can also choose by the number of the channel in the channel list, the first channel has number 0. Title bar contents Here you can customize the appearance of the main window title bar. You can enter a string which is displayed literally, except for the following jokers: $(alias) Name of the current channel, e.g. BBC1 $(index) Number in the channel list $(id) RF channel name, e.g. S02 $(freq) Tuning frequency $(standard) Video standard (PAL, NTSC, SECAM, …) $(input) Current video input on the TV card Video Options You can set the following preferences: Fullscreen video resolution When switching to fullscreen or background mode, Zapping may not be able to enlarge the video to cover the whole screen, but it can change the display resolution to approximate the size of the video. Here you can select a particular resolution, automatic selection, or no change of display resolution. Capture size under XVideo With the XVideo extension the image scaling hardware of your graphics card can be used to display captured video at almost any size. Here you can select the size of the captured video when using XVideo: 320 × 240 Fixed size 320 × 240 pixels. Interlaced (window size) The largest size supported by the video capture hardware, or the window size if smaller. You may want to enable the deinterlacer (see below) to reduce interlace artefacts. Biggest noninterlaced Interlaced video looks strange when scaled. This mode is similar to Interlaced, except noninterlaced video will be captured. Favorite picture sizes Here you can customize the Appearance submenu of the video window context menu. To add new line, click on the Add button. To remove a line, click on the line and then the Remove button. To change values, click on a line and then the desired column. Resize using fixed increments When you select this option, the video window can only assume sizes which are a multiple of 32 pixels. Keyboard In this section you can customize accelerators. Note that built-in accelerators such as those associated with menus or channel number entering on the numeric keypad take precedence over user configured ones. To add new accelerator, click on the Add button. To remove an accelerator click on the line and then the Remove button. To change a command, click on the line and type a new command in the command entry. Click on the down arrow to see a list of commands. To change a keyboard shortcut, click on the line and column. Audio Options Here you can select whether Zapping should automatically mute audio when the application starts, or before it quits. OSD Options Some operations such as entering a channel number or changing the audio volume by keyboard can display a status message. Here you can customize this On Screen Display. Display mode Whether to display messages superimposed onto the video (OSD), in a status bar of the video window, in a separate console window, or not at all. Remove after How long the message remains visible in OSD mode. Font Font to be used in OSD mode. Foreground color Foreground (text) color to be used in OSD mode. Background color Background color to be used in OSD mode. VBI Options Enable VBI decoding When this option is selected, Zapping will capture and decode VBI data transmitted by the current TV station. This enables Teletext browsing, Teletext subtitles, Closed Caption, and Zapping can automatically name the station (if the information is transmitted, respectively). Device file A dedicated kernel device is necessary to capture VBI data. If this is supported by your TV card and its driver, you can select the VBI device here. Common names are: /dev/vbi /dev/vbi0 /dev/vbi1 /dev/vbi2 /dev/v4l/vbi /dev/v4l/vbi0 The device should correspond to the selected kernel video device. Zapping will try to find it automatically, but this may fail. Changes will take place after you quit and restart Zapping. XVideo does not support VBI data capturing. You will be able to use VBI services only if your device also has a kernel driver. Teletext plugin Teletext implementation The Teletext standard knows different implementation levels. The built-in Teletext browser supports them all, but you can choose to see pages as displayed by simpler decoders. Note most stations still only transmit at the basic levels 1.0 or 1.5. Default encoding Some stations fail to transmit a complete character set code, so the Teletext viewer may not display the correct font or national characters. You can select your geographical region as an additional hint. Page memory size With this option you can limit the size of the page cache in memory. A complete set of pages of one station will require around 1000 KiB. When the limit is reached, Zapzilla will remove the last recently used pages and you must wait for retransmission to see them. Frequently visited pages like page 100 or subpages which take longer to reload get priority. Number of channels in page memory The page memory can contain pages of more than one channel. When the limit is reached, Zapzilla will remove pages of the last recently used channel first. Brightness and contrast These values change the brightness and contrast of the text in Teletext windows or the main window. Scaling You can freely resize Teletext windows. There are different ways to scale the image, some give better visual results, others are faster. Recording plugin In this section you can create different named recording configurations. Caption and subtitle recording Zapping can record caption and subtitles as text files. To enable this select Subtitle file and the desired format and encoding. The name of the file will be the same as that of the audio/video file, with an appropriate extension (for example .sub for the MPSub format). The Update live caption at line breaks option applies to real time Closed Caption, which does not appear page by page on the screen but as typed by the captioner. Zapping records the caption accordingly. However when this option is selected caption will appear line by line when played back, which may look better. You can record the displayed subtitles or one channel or page of your choice. Closed Caption channels are numbered 1-8, Teletext pages 100-899. Multilingual recording is not supported yet. Subtitle plugin Teletext default encoding Some stations fail to transmit a complete character set code, so the Teletext subtitle viewer may not display the correct font or national characters. You can select your geographical region as an additional hint. Show double height characters Often Teletext subtitles are transmitted with double height characters. They may be more readable but also cover a larger area of the screen. When this option is selected Zapping shows Teletext subtitles as transmitted, otherwise it converts the subtitles to normal height. Closed Caption foreground and background color With these settings you can override the default white on black color of Closed Caption. They have no effect when the station transmits other colors. Roll live caption When this option is selected real time caption rolls smoothly, otherwise it rolls line by line. In overlay mode smooth rolling would flicker excessively, is therefore always disabled. Brightness and contrast These values change the brightness and contrast of caption and subtitles. Scaling You can freely resize subtitles. There are different ways to scale the image, some give better visual results, others are faster. Screenshot plugin In this section you can customize the screenshot plugin. Completion command A shell command to execute after the image has been saved. The following environment variables will be set: $SCREENSHOT_PATH The fully qualified filename of the saved image, e. g. /home/my/shots/image2.jpg $CHANNEL_ALIAS Name of the current channel, ⪚ BBC1 $CHANNEL_ID RF channel name, ⪚ S02 $CURRENT_STANDARD Video standard (PAL, NTSC, SECAM, …) $CURRENT_INPUT Current video input on the TV card Skip x pictures before grabbing Grab on clicking ok By default a screenshot is taken when you open the screenshot dialog. When this option is selected, it will be taken when you click the OK button of the dialog. Add toolbar button Add a button to the main window toolbar which opens the screenshot dialog. Deinterlace plugin Zapping has a deinterlace plugin based on code from the Windows TV application DScaler. Currently deinterlacing is only possible with Video4Linux2 drivers on x86 CPUs with MMX. In this section you can customize the plugin. To enable deinterlacing choose a method from the top menu list: Video Deinterlace (Bob) This method is based on Gunnar Thalin's VirtualDub filter. If it detects weaving artifacts in the current image it uses bob to get rid of them. This method has a tendency to bob rather too much and gives poor results on fine static images. It uses the most recent two frames for the calculations and is not as CPU intensive as the more recent Greedy methods. Options: Resolution Horizontal resolution of images. Choosing a lower resolution may help if your CPU is too slow. This option is available for all methods. Weave Edge Detect Weight used to help detect edges. Higher values makes edge detection stronger. Weave Jaggie Threshold Threshold used to determone if pixel should be bobed. Higher values mean fewer bobed pixels. Video Deinterlace (Weave) This was one of the earliest video deinterlace methods. It used three fields in the calculation and works well on slow moving material but tends to comb on fast moving material. Video Deinterlace (2-Frame) This method uses the current frame and the last two to determine whether to bob or weave a given pixel. This gives better results on both stationary and moving images than the above two methods however it uses more CPU. Simple Weave This method just combines the most recent even and odd fields. This causes motion artifacts and is provided for comparison. Simple Bob This uses only the most recent field and fills the lines in between with interpolated pixels. This method has in may ways been superceded by Scaler Bob. Scaler Bob Uses the current field and lets the video card scaler size the picture to fit the screen. Produces reasonable results for fast moving images. This method uses very little CPU and is recommended on lower spec machines. Even Scanlines Only This method displays only the even fields and uses hardware scaling. It reduces bob artifacts at the cost of loss of information. This method was originally intended to be used with game consoles. Odd Scanlines Only Like Even Scanlines Only, but displays only odd fields. Blended Clip This method is designed mostly for experimentation by those interested in what works for video deinterlacing. It is probably not the single best method for anything but it can be used to create custom deinterlace methods for special purposes. Somewhat CPU intensive Video (Greedy, Low Motion) The Greedy Low Motion deinterlace method is designed to give good results on low motion video source, using less CPU than some others. Good on slower machines but it will give awful results on high motion video material like sports. Quite by accident, it can also do a decent job on poorly mastered 3:2 or 2:2 pull down film source material like some anime movies, regardless of low or high motion. Video (Greedy, High Motion) This method works at two levels. By default, at the Basic Level, it is a normal deinterlace method, with the following features: A merge of Blended Clip, Greedy Low Motion, and some new stuff Greedy implied pulldown, like the Greedy Low Motion method Parm blending like the Blended Clip method, for less sizzling. Lookahead motion detection Diagonal Jaggie Reduction to smooth out the stair step effect in moving diagonal lines. This is accomplish by horizontally smoothing only the rapidly moving pixels, leaving the stationary ones alone. If a diagonal edge is not moving then it won't be jagged anyway under Greedy High Motion. Slider adjustments for Max Comb, Motion Threshold, and Motion Sensitivity. However the defaults should be okay for most cases. Basic Level is compatible with all MMX, Pentium II, AMD K6-II, K6-III, Celeron and above machines. Performance will probably be about that of the Greedy 2-Frame method. There is also an Advanced Level (experimental) which is invoked if you check any of the boxes in the panel. A machine supporting the Intel SSE instruction set is needed. The Advanced options should run on Athlons, Intel P-III, P4, and the faster Celerons. Using the Advanced Options is very sensitive to machine performance and dropped frames, so you may have to lower your Resolution if you get jerkiness. The new check box enabled features are: Built in 3:2, 2:2, and n:m Pulldown. This does pulldown matching, not removal, so all frames are displayed. I think this eventually will work better with video overlays and live TV viewing that is extensively edited, but it still needs improvement. In-Between Frames. This gives judder reduction for those of us with fixed 60 HZ RTPV's. In a 3:2 pulldown situation it will select an appropriate pair of fields to average once out of every 5 frames. This can effectively display every new input frame 2 1/ 2 times. It will cause a small amount of motion blur every fifth frame but I personally leave it turned on all the time now for a smoother film picture sequence. It will also work with 2:2 pulldown (I think) but there one half of the frames will be averaged and the motion blur may not be acceptable. Adjustable Edge Enhancement. This is due to an idea posted by this forum's MR. Wigggles. It enhances only a small amount, on the horizontal axis. When turned on you can use a slider to adjust it. Adjustable Median Filter. Also due to Mr. Wigggles, this can help filter noise. However if set over about 3-5 it will also cause motion artifacts on fast moving scenes. Also has a slider. Vertical Filter. This is a post-deinterlace software vertical filter that can remove both noise and some leftover deinterlace artifacts. It gives results similar to the hardware version available on the Advanced Video Flags screen, but not so extreme and without the jitter. Greedy 2 Frame This method tries to combine the best features of the 2-frame algorithm with the looking ahead ability of the greedy method. I find this methods works well on sports and other high motion material. With static images and low quality sources there may be unacceptable levels of bobbing. This method uses four fields and has a configuarable motion detect. Motion is detected on a two pixel basis. This is the current default method for faster processors as it gives the best all round performance. Options: Greedy 2 Frame Luma Threshold Luma differences above this will be interpreted as movement. Greedy 2 Frame Chroma Threshold Chroma differences above this will be interpreted as movement. Video (TomsMoComp) This method is the latest and greatest method from Tom Barry. This new method improves on some of the older methods in two important ways. Where there is motion, the bob pixels are generated by looking along a series of diagonals as well as simple the ones above and below. Also when there is motion the code will try and spot slowly moving objects and will try and maintain the detail on those objects. The combined effect of these two searches is a big jump in picture quality and also a big jump in CPU usage. A 1 GHz CPU is required to use this method. Options: Search Effort This setting controls how much CPU is used by the method by controlling how big an area the method will search looking for matches. A Search effort (SE) of 0 means that all pixels are smart bobbed and is not recommended. SE = 1 does no motion compensation, but doesn benefit from the diagonal bob interpolation. SE > 1 starts to do true MoComp with increasing CPU demands. You should use the highest value that allows you to run any other filters etc without dropped frames. Use Strange Bob This was some test code added by John Adcock to try and reduce the number of errors in the diagonal searches. It is not recommended. Video (MoComp2) This is a new method that should be considered a work in progress. At the moment it is a motion adaptive method with diagonal interpolation based on: T. Chen, H.R. Wu; & Z.H. Yu, "Efficient deinterlacing algorithm using edge-based line average interpolation" Optical Engineering, Volume 39, Issue 8, (2000). This method also incorporates built in chroma smoothing to help disguise MPEG chroma problems. The method should be a general use one but at the moment most consider TomsMoComp to give a better picture. As this method uses less CPU than TomsMoComp it may be well suited to those who run a lot of filters. Note the built in chroma smoother means that this method may give better results with digital sourced material such as DVD or DVB. zapping-0.10cvs6/help/C/zapzilla.xml 644 764 144 50117 10206044066 12511 Teletext Zapping has a built-in Teletext viewer called Zapzilla.
Zapzilla Zapzilla window. Contains titlebar, menubar, toolbar, display area showing a Teletext page, and statusbar. The menubar contains File, Edit, View, Go, Channels and Bookmarks menus.
The Zapzilla window contains a menu, toolbar and a context menu which opens when you click on the page with the right mouse button.
Zapzilla Context Menu Context menu with New window, Save as, Search, Colors, Subtitles, and Bookmarks entries.
To Start Teletext You can browse Teletext in the main video window or open new Teletext windows. To do the former, choose View Teletext from the main menu, Teletext from the context menu, or click on the Teletext button in the toolbar. Only a subset of the Teletext toolbar buttons and context menu items appears in this mode, along with video related items. It is not yet possible to browse Teletext in fullscreen mode. To leave the Teletext mode, choose one of the video display modes (fullscreen, capture or overlay mode) or click on the Video button in the toolbar. To Open a New Teletext Window In the video window, choose View New Teletext View from the main menu. In a Teletext window, choose File New Window from the main menu, New Window from the context menu, or click on the New button in the toolbar. To Open a Teletext Page Type the page number on the keyboard. You can also press the cursor keys or click on the small arrow buttons in the toolbar to go to the next or previous page or subpage. You can click on a page number in the page. With the first (left) mouse button the page opens in the same window, with the third (middle) button in a new window. When the page has subpages it often contains a subpage number like 2/5 (meaning this is subpage 2 of 5). As with page numbers you can click on this number to go to the next subpage. Two right angle brackets >%gt; on a page also link to the next subpage. If Zapzilla can identify web links or e-mail addresses you can click on them to open your web browser or e-mail application. Rotating Subpages When you open a page it will automatically rotate through its subpages, if it has any. This can be disabled by clicking on the page number in the toolbar. Links in the last row Some TV stations provide a basic navigation system called TOP or FLOF. Here the last row of the page shows links to important pages or sections. You can click on these links to browse the Teletext. A complete TOP index is available under the Go menu. Bookmarks When you choose Bookmarks Add Bookmark from the main or context menu the current page will be added to the Bookmarks menu. When you choose a bookmark Zapzilla will change to the respective channel and open the page. You can remove or edit the bookmarks by choosing Bookmarks Edit Bookmarks . Some TV stations provide additional information, for example links to a program schedule page or subtitle pages. Similar to bookmarks these pages are listed in the context menu, subtitle pages in the Subtitles submenu. History By clicking on the Back and Forward buttons in the toolbar, or by choosing from the Go menu you can browse through previously visited pages. The Index button brings you back to the main page, usually page 100. Concealed Text Teletext pages can contain concealed text, typically to hide quiz answers. You can see this text after clicking on the Reveal button in the toolbar. Character Encoding TV stations do not always transmit correct character set codes. By choosing from View Encoding you can override the default character encoding. Multi-Channel Page Memory The Zapzilla page memory can contain pages of more than one station. To switch between stations choose from the Channels menu. Note when the memory limit is reached, older pages are removed from page memory. You can change the limit in the Teletext preferences, by choosing Edit Preferences . When you choose the Received channel, Zapzilla shows only pages of the currently received channel and updates the display on channel changes. Exporting Pages Zapzilla supports the X Window clipboard. To mark a section of text, click on the page with the left mouse button and drag the mouse while pressing the button. When you press the Shift key at the same time you can mark a rectangular section of text. There is no cut or copy menu, to paste the text simply move the mouse pointer into another application window and press the third (middle) mouse button. You can save a Teletext page in various formats by choosing File Save As from the main menu, or Save As from the context menu.
Zapzilla Save As Dialog Save As dialog. Contains filename entry, format menu and format options.
You can enter a filename for the page and choose a file format. Options will appear depending on the chosen format: Graphics char Text based formats cannot represent graphics characters in Teletext pages. Here you can enter a replacement. Color (CSS) This is a HTML option. When enabled, page colors will be encoded as Cascading Style Sheets markup. HTML header This is another HTML option. When disabled the HTML header will be omitted, which is useful to integrate several pages in one HTML file. Correct aspect ratio This is a graphical format option. When enabled the image will be scaled to the correct aspect ratio. Control codes This is a text format option. You can choose if terminal control codes shall be inserted to preserve colors and some text styles. If the page uses more than the eight primary colors the actual color will be approximated.
Search the page memory You can search for text in the page memory by choosing Edit Search from the main menu, Search from the context menu, or by clicking on the Find button in the toolbar.
Zapzilla Search Dialog Search dialog. Contains text entry, regular expression and case insensitive option, cancel, forward and back button.
Enter a text and click on the Forward button to find the next occurence of the text. Accordingly Back will find the previous occurence. When the text has been found, the Zapzilla window will show the page with the search text highlighted. Regular Expressions Regular expressions are a powerful way to search certain patterns in a text. Apart of simply giving the text you want to find, you can build a set of rules to be matched, allowing for much more complex search patterns. Unicode is a way of encoding characters that aims to support all possible character sets in the world. Using Unicode we can assign a unique code to every character, disregarding whether it is Latin, Greek, Cyrillic, Hebrew or Arabic. Zapzilla uses a Unicode flavour called UCS-2, representing each character as a 16 bit number. Regular expressions have a syntax in which a few characters are special constructs and the rest are "ordinary". An ordinary character is a simple regular expression which matches that same character and nothing else. The special characters are $, ^, ., *, +, ?, [, ] and \. Any other character appearing in a regular expression is ordinary, unless a \ precedes it. For example, f is not a special character, so it is ordinary, and therefore f is a regular expression that matches the string "f" and no other string. (It does not match the string "ff".) Likewise, o is a regular expression that matches only "o". When searching case insensitive these regular expressions also match "F" and "O", but we consider this a generalization of "the same string," rather than an exception. Any two regular expressions A and B can be concatenated. The result is a regular expression which matches a string if A matches some amount of the beginning of that string and B matches the rest of the string. As a simple example, we can concatenate the regular expressions f and o to get the regular expression fo, which matches only the string "fo". Still trivial. To do something nontrivial, you need to use one of the special characters. Here is a list of them: . (Period) is a special character that matches any single character except a newline, that is an invisible character marking the end of the line. Using concatenation, we can make regular expressions like a.b, which matches any three-character string that begins with "a" and ends with "b". * is not a construct by itself; it is a postfix operator that means to match the preceding regular expression repetitively as many times as possible. Thus, o* matches any number of "o"s (including no "o"s). * always applies to the smallest possible preceding expression. Thus, fo* has a repeating o, not a repeating fo. It matches "f", "fo", "foo", and so on. The matcher processes a * construct by matching, immediately, as many repetitions as can be found. Then it continues with the rest of the pattern. If that fails, backtracking occurs, discarding some of the matches of the *-modified construct in case that makes it possible to match the rest of the pattern. For example, in matching ca*ar against the string "caaar", the a* first tries to match all three "a"s; but the rest of the pattern is ar and there is only "r" left to match, so this try fails. The next alternative is for a* to match only two "a"s. With this choice, the rest of the regular expression matches successfully. + is a postfix operator, similar to * except that it must match the preceding expression at least once. So, for example, ca+r matches the strings "car" and "caaaar" but not the string "cr", whereas ca*r matches all three strings. ? is a postfix operator, similar to * except that it can match the preceding expression either once or not at all. For example, ca?r matches "car" or "cr"; nothing else. [ ... ] is a "character set", which begins with [ and is terminated by ]. In the simplest case, the characters between the two brackets are what this set can match. Thus, [ad] matches either one "a" or one "d", and [ad]* matches any string composed of just "a"s and "d"s (including the empty string), from which it follows that c[ad]*r matches "cr", "car", "cdr", "caddaar", etc. You can also include character ranges in a character set, by writing the starting and ending characters with a - between them. Thus, [a-z] matches any lower-case ASCII letter. Ranges may be intermixed freely with individual characters, as in [a-z$%.], which matches any lower-case ASCII letter or "$", "%" or period. Note that the usual regexp special characters are not special inside a character set. A completely different set of special characters exists inside character sets: ], - and ^. To include a ] in a character set, you must make it the first character. For example, []a] matches "]" or "a". To include a -, write - as the first or last character of the set, or put it after a range. Thus, []-] matches both "]" and "-". To include ^ in a set, put it anywhere but at the beginning of the set. When you use a range in case-insensitive search, you should write both ends of the range in upper case, or both in lower case, or both should be non-letters. [^ ... ] [^ begins a "complemented character set", which matches any character except the ones specified. Thus, [^a-z0-9A-Z] matches all characters except letters and digits. ^ is not special in a character set unless it is the first character. The character following the ^ is treated as if it were first (in other words, - and ] are not special there). ^ is a special character that matches the empty string, but only at the beginning of a row. Otherwise it fails to match anything. Thus, ^foo matches a "foo" that occurs at the beginning of a row. $ is similar to ^ but matches only at the end of a row. Thus, x+$ matches a string of one "x" or more at the end of a line. \ has two functions: it quotes the special characters (including \ itself), and it introduces additional special constructs. Because \ quotes special characters, \$ is a regular expression that matches only "$", and "\[" is a regular expression that matches only "[", and so on. \x, \X, \u or \U followed by a hexadecimal number of up to 4 digits will match Unicode characters. \x00C9 for example matches "É" #url# and #email# are specific to Zapzilla. These regular expressions match any web or e-mail address, respectively. You can find a more comprehensive introduction to regular expressions in the regex manual page.
zapping-0.10cvs6/help/C/fdl-appendix.xml 644 764 144 65250 7762173332 13236 Version 1.1, March 2000 2000Free Software Foundation, Inc.
Free Software Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.
GNU Free Documentation License 0. PREAMBLE The purpose of this License is to make a manual, textbook, or other written document free in the sense of freedom: to assure everyone the effective freedom to copy and redistribute it, with or without modifying it, either commercially or noncommercially. Secondarily, this License preserves for the author and publisher a way to get credit for their work, while not being considered responsible for modifications made by others. This License is a kind of copyleft, which means that derivative works of the document must themselves be free in the same sense. It complements the GNU General Public License, which is a copyleft license designed for free software. We have designed this License in order to use it for manuals for free software, because free software needs free documentation: a free program should come with manuals providing the same freedoms that the software does. But this License is not limited to software manuals; it can be used for any textual work, regardless of subject matter or whether it is published as a printed book. We recommend this License principally for works whose purpose is instruction or reference. 1. APPLICABILITY AND DEFINITIONS This License applies to any manual or other work that contains a notice placed by the copyright holder saying it can be distributed under the terms of this License. The Document, below, refers to any such manual or work. Any member of the public is a licensee, and is addressed as you. A Modified Version of the Document means any work containing the Document or a portion of it, either copied verbatim, or with modifications and/or translated into another language. A Secondary Section is a named appendix or a front-matter section of the Document that deals exclusively with the relationship of the publishers or authors of the Document to the Document's overall subject (or to related matters) and contains nothing that could fall directly within that overall subject. (For example, if the Document is in part a textbook of mathematics, a Secondary Section may not explain any mathematics.) The relationship could be a matter of historical connection with the subject or with related matters, or of legal, commercial, philosophical, ethical or political position regarding them. The Invariant Sections are certain Secondary Sections whose titles are designated, as being those of Invariant Sections, in the notice that says that the Document is released under this License. The Cover Texts are certain short passages of text that are listed, as Front-Cover Texts or Back-Cover Texts, in the notice that says that the Document is released under this License. A Transparent copy of the Document means a machine-readable copy, represented in a format whose specification is available to the general public, whose contents can be viewed and edited directly and straightforwardly with generic text editors or (for images composed of pixels) generic paint programs or (for drawings) some widely available drawing editor, and that is suitable for input to text formatters or for automatic translation to a variety of formats suitable for input to text formatters. A copy made in an otherwise Transparent file format whose markup has been designed to thwart or discourage subsequent modification by readers is not Transparent. A copy that is not Transparent is called Opaque. Examples of suitable formats for Transparent copies include plain ASCII without markup, Texinfo input format, LaTeX input format, SGML or XML using a publicly available DTD, and standard-conforming simple HTML designed for human modification. Opaque formats include PostScript, PDF, proprietary formats that can be read and edited only by proprietary word processors, SGML or XML for which the DTD and/or processing tools are not generally available, and the machine-generated HTML produced by some word processors for output purposes only. The Title Page means, for a printed book, the title page itself, plus such following pages as are needed to hold, legibly, the material this License requires to appear in the title page. For works in formats which do not have any title page as such, Title Page means the text near the most prominent appearance of the work's title, preceding the beginning of the body of the text. 2. VERBATIM COPYING You may copy and distribute the Document in any medium, either commercially or noncommercially, provided that this License, the copyright notices, and the license notice saying this License applies to the Document are reproduced in all copies, and that you add no other conditions whatsoever to those of this License. You may not use technical measures to obstruct or control the reading or further copying of the copies you make or distribute. However, you may accept compensation in exchange for copies. If you distribute a large enough number of copies you must also follow the conditions in section 3. You may also lend copies, under the same conditions stated above, and you may publicly display copies. 3. COPYING IN QUANTITY If you publish printed copies of the Document numbering more than 100, and the Document's license notice requires Cover Texts, you must enclose the copies in covers that carry, clearly and legibly, all these Cover Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on the back cover. Both covers must also clearly and legibly identify you as the publisher of these copies. The front cover must present the full title with all words of the title equally prominent and visible. You may add other material on the covers in addition. Copying with changes limited to the covers, as long as they preserve the title of the Document and satisfy these conditions, can be treated as verbatim copying in other respects. If the required texts for either cover are too voluminous to fit legibly, you should put the first ones listed (as many as fit reasonably) on the actual cover, and continue the rest onto adjacent pages. If you publish or distribute Opaque copies of the Document numbering more than 100, you must either include a machine-readable Transparent copy along with each Opaque copy, or state in or with each Opaque copy a publicly-accessible computer-network location containing a complete Transparent copy of the Document, free of added material, which the general network-using public has access to download anonymously at no charge using public-standard network protocols. If you use the latter option, you must take reasonably prudent steps, when you begin distribution of Opaque copies in quantity, to ensure that this Transparent copy will remain thus accessible at the stated location until at least one year after the last time you distribute an Opaque copy (directly or through your agents or retailers) of that edition to the public. It is requested, but not required, that you contact the authors of the Document well before redistributing any large number of copies, to give them a chance to provide you with an updated version of the Document. 4. MODIFICATIONS You may copy and distribute a Modified Version of the Document under the conditions of sections 2 and 3 above, provided that you release the Modified Version under precisely this License, with the Modified Version filling the role of the Document, thus licensing distribution and modification of the Modified Version to whoever possesses a copy of it. In addition, you must do these things in the Modified Version: A Use in the Title Page (and on the covers, if any) a title distinct from that of the Document, and from those of previous versions (which should, if there were any, be listed in the History section of the Document). You may use the same title as a previous version if the original publisher of that version gives permission. B List on the Title Page, as authors, one or more persons or entities responsible for authorship of the modifications in the Modified Version, together with at least five of the principal authors of the Document (all of its principal authors, if it has less than five). C State on the Title Page the name of the publisher of the Modified Version, as the publisher. D Preserve all the copyright notices of the Document. E Add an appropriate copyright notice for your modifications adjacent to the other copyright notices. F Include, immediately after the copyright notices, a license notice giving the public permission to use the Modified Version under the terms of this License, in the form shown in the Addendum below. G Preserve in that license notice the full lists of Invariant Sections and required Cover Texts given in the Document's license notice. H Include an unaltered copy of this License. I Preserve the section entitled History, and its title, and add to it an item stating at least the title, year, new authors, and publisher of the Modified Version as given on the Title Page. If there is no section entitled History in the Document, create one stating the title, year, authors, and publisher of the Document as given on its Title Page, then add an item describing the Modified Version as stated in the previous sentence. J Preserve the network location, if any, given in the Document for public access to a Transparent copy of the Document, and likewise the network locations given in the Document for previous versions it was based on. These may be placed in the History section. You may omit a network location for a work that was published at least four years before the Document itself, or if the original publisher of the version it refers to gives permission. K In any section entitled Acknowledgements or Dedications, preserve the section's title, and preserve in the section all the substance and tone of each of the contributor acknowledgements and/or dedications given therein. L Preserve all the Invariant Sections of the Document, unaltered in their text and in their titles. Section numbers or the equivalent are not considered part of the section titles. M Delete any section entitled Endorsements. Such a section may not be included in the Modified Version. N Do not retitle any existing section as Endorsements or to conflict in title with any Invariant Section. If the Modified Version includes new front-matter sections or appendices that qualify as Secondary Sections and contain no material copied from the Document, you may at your option designate some or all of these sections as invariant. To do this, add their titles to the list of Invariant Sections in the Modified Version's license notice. These titles must be distinct from any other section titles. You may add a section entitled Endorsements, provided it contains nothing but endorsements of your Modified Version by various parties--for example, statements of peer review or that the text has been approved by an organization as the authoritative definition of a standard. You may add a passage of up to five words as a Front-Cover Text, and a passage of up to 25 words as a Back-Cover Text, to the end of the list of Cover Texts in the Modified Version. Only one passage of Front-Cover Text and one of Back-Cover Text may be added by (or through arrangements made by) any one entity. If the Document already includes a cover text for the same cover, previously added by you or by arrangement made by the same entity you are acting on behalf of, you may not add another; but you may replace the old one, on explicit permission from the previous publisher that added the old one. The author(s) and publisher(s) of the Document do not by this License give permission to use their names for publicity for or to assert or imply endorsement of any Modified Version . 5. COMBINING DOCUMENTS You may combine the Document with other documents released under this License, under the terms defined in section 4 above for modified versions, provided that you include in the combination all of the Invariant Sections of all of the original documents, unmodified, and list them all as Invariant Sections of your combined work in its license notice. The combined work need only contain one copy of this License, and multiple identical Invariant Sections may be replaced with a single copy. If there are multiple Invariant Sections with the same name but different contents, make the title of each such section unique by adding at the end of it, in parentheses, the name of the original author or publisher of that section if known, or else a unique number. Make the same adjustment to the section titles in the list of Invariant Sections in the license notice of the combined work. In the combination, you must combine any sections entitled History in the various original documents, forming one section entitled History; likewise combine any sections entitled Acknowledgements, and any sections entitled Dedications. You must delete all sections entitled Endorsements. 6. COLLECTIONS OF DOCUMENTS You may make a collection consisting of the Document and other documents released under this License, and replace the individual copies of this License in the various documents with a single copy that is included in the collection, provided that you follow the rules of this License for verbatim copying of each of the documents in all other respects. You may extract a single document from such a collection, and dispbibute it individually under this License, provided you insert a copy of this License into the extracted document, and follow this License in all other respects regarding verbatim copying of that document. 7. AGGREGATION WITH INDEPENDENT WORKS A compilation of the Document or its derivatives with other separate and independent documents or works, in or on a volume of a storage or distribution medium, does not as a whole count as a Modified Version of the Document, provided no compilation copyright is claimed for the compilation. Such a compilation is called an aggregate, and this License does not apply to the other self-contained works thus compiled with the Document , on account of their being thus compiled, if they are not themselves derivative works of the Document. If the Cover Text requirement of section 3 is applicable to these copies of the Document, then if the Document is less than one quarter of the entire aggregate, the Document's Cover Texts may be placed on covers that surround only the Document within the aggregate. Otherwise they must appear on covers around the whole aggregate. 8. TRANSLATION Translation is considered a kind of modification, so you may distribute translations of the Document under the terms of section 4. Replacing Invariant Sections with translations requires special permission from their copyright holders, but you may include translations of some or all Invariant Sections in addition to the original versions of these Invariant Sections. You may include a translation of this License provided that you also include the original English version of this License. In case of a disagreement between the translation and the original English version of this License, the original English version will prevail. 9. TERMINATION You may not copy, modify, sublicense, or distribute the Document except as expressly provided for under this License. Any other attempt to copy, modify, sublicense or distribute the Document is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 10. FUTURE REVISIONS OF THIS LICENSE The Free Software Foundation may publish new, revised versions of the GNU Free Documentation License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. See http://www.gnu.org/copyleft/. Each version of the License is given a distinguishing version number. If the Document specifies that a particular numbered version of this License or any later version applies to it, you have the option of following the terms and conditions either of that specified version or of any later version that has been published (not as a draft) by the Free Software Foundation. If the Document does not specify a version number of this License, you may choose any version ever published (not as a draft) by the Free Software Foundation. Addendum To use this License in a document you have written, include a copy of the License in the document and put the following copyright and license notices just after the title page:
Copyright YEAR YOUR NAME. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with the Invariant Sections being LIST THEIR TITLES, with the Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST. A copy of the license is included in the section entitled GNU Free Documentation License.
If you have no Invariant Sections, write with no Invariant Sections instead of saying which ones are invariant. If you have no Front-Cover Texts, write no Front-Cover Texts instead of Front-Cover Texts being LIST; likewise for Back-Cover Texts. If your document contains nontrivial examples of program code, we recommend releasing these examples in parallel under your choice of free software license, such as the GNU General Public License, to permit their use in free software.
zapping-0.10cvs6/help/man/ 777 764 144 0 10443536370 10521 5zapping-0.10cvs6/help/man/zapping_remote.1 644 764 144 3212 10327375017 13620 .\"Generated by db2man.xsl. Don't modify this, modify the source. .de Sh \" Subsection .br .if t .Sp .ne 5 .PP \fB\\$1\fR .PP .. .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Ip \" List item .br .ie \\n(.$>=3 .ne \\$3 .el .ne 3 .IP "\\$1" \\$2 .. .TH "ZAPPING_REMOTE" 1 "" "" "" .SH NAME zapping_remote \- sends commands to a running instance of Zapping .SH "SYNOPSIS" .nf \fBzapping_remote\fR [-h] [-d \fINAME\fR] [-i \fIID\fR] [-v] [-x] [command] .fi .SH "DESCRIPTION" .PP \fBzapping_remote\fR is a small program to send Python commands to a running instance of Zapping\&. See the Zapping documentation for a list of commands\&. .PP When the -x option is given \fBzapping_remote\fR can also send Xawtv commands, see the \fBxawtv-remote\fR(1) manual page for details\&. Zapping also responds to \fBxawtv-remote\fR\&. This manual page refers to \fBzapping_remote\fR version 0\&.10\&. .SH "OPTIONS" .TP \fB-h\fR Prints usage information on stdout, then terminates the program\&. .TP \fB-d \fINAME\fR\fR The X display to use\&. .TP \fB-i \fIID\fR\fR The ID of the Zapping or Xawtv main window\&. When omitted \fBzapping_remote\fR tries to find it automatically\&. .TP \fB-v \fINUMBER\fR\fR Debug level, default 0\&. .TP \fB-x\fR Switches to a \fBxawtv-remote\fR compatible mode, sending Xawtv instead of Python commands\&. .SH "BUGS" .PP None known\&. .SH "SEE ALSO" .PP \fBzapping\fR(1), \fBzapping_setup_fb\fR(1) .SH "AUTHORS" .PP Zapping was written by Iaki Garca Etxebarria, Michael H\&. Schimek (mschimek@users\&.sourceforge\&.net) and many contributors\&. .PP This manual page was written by Michael H\&. Schimek\&. zapping-0.10cvs6/help/man/zapping_setup_fb.xml 644 764 144 12762 10327374735 14634 Zapping"> zapping_setup_fb"> ]> zapping_setup_fb 1 zapping_setup_fb prepares V4L/V4L2 driver for overlay &cmd; -?, -h, --help, --usage -b, --bpp NUMBER -c, --child -d, --device FILENAME -D, --display NAME -f, --fd -q, --quiet -S, --screen SCREEN NUMBER -v, --verbose -V, --version Description &cmd; is a small program to prepare Video For Linux (V4L) or Video For Linux Two (V4L2) video capture drivers for video overlay. It must be executed by pam 8 with root privileges, or owned by root with the set-user-ID bit set (see chmod 1 ). This manual page refers to &cmd; version &version;. Background To enable video overlay V4L and V4L2 drivers need to know the screen memory address. For security reasons only the system administrator can program this address. zapping 1 delegates the task to this helper application. Options Prints usage information on stdout, then terminates the program. Color depth hint, the number of bits per pixel on the display in question, either 24 or 32. Usually &cmd; can determine this number automatically. &app; sets this flag when executing &cmd; as child process to enable the output of localized error messages in UTF-8 encoding on stderr. The video capture device to open, by default /dev/video0. The X display to use. Defaults to the name defined by the DISPLAY environment variable. &app; uses this option when executing &cmd; as child process to access the video capture driver by this shared file descriptor instead of opening the device file by name. Decrements the verbosity level. The X screen to use (Xinerama), defaults to 0. Increments the verbosity level. Prints the version of &cmd; on stdout, then terminates the program. Bugs None known. See also zapping 1 , zapping_remote 1 , pam 8 Authors &app; and &cmd; were written by Iñaki García Etxebarria, Michael H. Schimek (mschimek@users.sourceforge.net) and many contributors. This manual page was written by Michael H. Schimek based on work by Christian Marillat. zapping-0.10cvs6/help/man/zapping_setup_fb.1 644 764 144 5643 10327375017 14146 .\"Generated by db2man.xsl. Don't modify this, modify the source. .de Sh \" Subsection .br .if t .Sp .ne 5 .PP \fB\\$1\fR .PP .. .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Ip \" List item .br .ie \\n(.$>=3 .ne \\$3 .el .ne 3 .IP "\\$1" \\$2 .. .TH "ZAPPING_SETUP_FB" 1 "" "" "" .SH NAME zapping_setup_fb \- prepares V4L/V4L2 driver for overlay .SH "SYNOPSIS" .nf \fBzapping_setup_fb\fR [-?, -h, --help, --usage] [-b, --bpp \fINUMBER\fR] [-c, --child] [-d, --device \fIFILENAME\fR] [-D, --display \fINAME\fR] [-f, --fd] [-q, --quiet] [-S, --screen \fISCREEN NUMBER\fR] [-v, --verbose] [-V, --version] .fi .SH "DESCRIPTION" .PP \fBzapping_setup_fb\fR is a small program to prepare Video For Linux (V4L) or Video For Linux Two (V4L2) video capture drivers for video overlay\&. It must be executed by \fBpam\fR(8) with root privileges, or owned by root with the set-user-ID bit set (see \fBchmod\fR(1))\&. This manual page refers to \fBzapping_setup_fb\fR version 0\&.13\&. .SH "BACKGROUND" .PP To enable video overlay V4L and V4L2 drivers need to know the screen memory address\&. For security reasons only the system administrator can program this address\&. \fBzapping\fR(1) delegates the task to this helper application\&. .SH "OPTIONS" .TP \fB-?, -h, --help, --usage\fR Prints usage information on stdout, then terminates the program\&. .TP \fB-b, --bpp \fINUMBER\fR\fR Color depth hint, the number of bits per pixel on the display in question, either 24 or 32\&. Usually \fBzapping_setup_fb\fR can determine this number automatically\&. .TP \fB-c, --child\fR Zapping sets this flag when executing \fBzapping_setup_fb\fR as child process to enable the output of localized error messages in UTF-8 encoding on stderr\&. .TP \fB-d, --device \fIFILENAME\fR\fR The video capture device to open, by default \fI/dev/video0\fR\&. .TP \fB-D, --display \fINAME\fR\fR The X display to use\&. Defaults to the name defined by the \fBDISPLAY\fR environment variable\&. .TP \fB-f, --fd \fINUMBER\fR\fR Zapping uses this option when executing \fBzapping_setup_fb\fR as child process to access the video capture driver by this shared file descriptor instead of opening the device file by name\&. .TP \fB-q, --quiet\fR Decrements the verbosity level\&. .TP \fB-S, --screen \fINUMBER\fR\fR The X screen to use (Xinerama), defaults to 0\&. .TP \fB-v, --verbose\fR Increments the verbosity level\&. .TP \fB-V, --version\fR Prints the version of \fBzapping_setup_fb\fR on stdout, then terminates the program\&. .SH "BUGS" .PP None known\&. .SH "SEE ALSO" .PP \fBzapping\fR(1), \fBzapping_remote\fR(1), \fBpam\fR(8) .SH "AUTHORS" .PP Zapping and \fBzapping_setup_fb\fR were written by Iaki Garca Etxebarria, Michael H\&. Schimek (mschimek@users\&.sourceforge\&.net) and many contributors\&. .PP This manual page was written by Michael H\&. Schimek based on work by Christian Marillat\&. zapping-0.10cvs6/help/man/zapping.xml 644 764 144 21717 10327374710 12736 Zapping"> zapping"> ]> zapping 1 zapping a Gnome TV and Teletext viewer zapping -b, --bpp NUMBER -c, --command STRING --console-errors --cpu-features FEATURES -d, --debug --device FILENAME --dword-align -n, --tunerless-norm STRING --no-overlay, --remote --no-plugins --no-vbi --no-xv-image --no-xv-video -v, --no-xv --xv-image-port NUMBER --xv-port NUMBER, --xv-video-port NUMBER -y, --yuv-format STRING -z, --no-zsfb Description &app; is a program to watch TV on a computer, within the Gnome environment. You can take screenshots and record video and audio. &app; has a Teletext viewer built in and supports Closed Caption and Teletext subtitles. For more information open the Gnome help and choose Applications -> Multimedia -> Zapping. This manual page refers to &cmd; version &version;. Options Color depth of the X display. In TrueColor mode (24 or 32 bits per pixel) you might get a very distorted image that spreads all around the desktop. This usually means &app; could not correctly determine the color depth, which can be given here. Execute the given command and exit. This was intended to create a sort of batch mode, you may want to use zapping_remote 1 instead. Only one command is implemented. The command allows to change the channel by giving the channel name or RF channel number, for example: zapping -c "set_channel BBC" Redirect the error messages to the console, useful for bug reports. FEATURES Override the CPU detection for tests. Possible features are: none, mmx, 3dnow, sse, sse2, sse3, altivec. When your CPU does not support the given features &app; may crash. Print debug messages on standard output. You should include this information when submitting a bug report, as it can help to trace the problem. Kernel video device to use, usually /dev/video. You can specify emulator for tests. Forces doubleword alignment of the video in overlay mode. Can help when the image is distorted at certain sizes but looks fine at others. This option has no function but is recognized for compatibility with earlier versions of &app;. It determined the video standard to be used when your TV card has no tuner, one of NTSC, PAL or SECAM. Do not overlay video. The option refers to the X display. Overlay is only possible if the graphics card and TV card are plugged into the same computer. Capture mode is possible on a remote display (on another computer or in a nested display) but requires a high network bandwidth. Do not use any plugins, usually for testing purposes. Do not capture and decode VBI data, i.e. Teletext, Subtitles, Closed Caption and station names. This option is intended for tests and applies only to the current session. To override it or disable VBI support permanently see the Devices -> VBI section in the &app; preferences. Do not use the XVideo extension for video overlay. Do not use the XVideo extension for hardware image scaling. Do not use the XVideo extension for video overlay or hardware image scaling. Number of the XVideo port to use for hardware image scaling. Zapping lists the available ports with the option. Number of the XVideo port (similar to a device) to use for video overlay. Zapping lists the available ports with the option. This option has no function but is recognized for compatibility with earlier versions of &app;. It determined the pixel format in capture mode when XVideo hardware image scaling was available, either YUYV or YVU420. This option has no function but is recognized for compatibility with earlier versions of &app;. It used to prevent the execution of zapping_setup_fb 1 on startup. Now &app; calls the helper application only if necessary. See also zapping_remote 1 , zapping_setup_fb 1 Authors &app; was written by Iñaki García Etxebarria, Michael H. Schimek (mschimek@users.sourceforge.net) and many contributors. This manual page was written by Michael H. Schimek based on work by Christian Marillat. Contact &app; homepage: http://zapping.sourceforge.net Please report bugs with the &app; bug tracker http://sourceforge.net/tracker/?group_id=2599 or mail us at zapping-misc@lists.sourceforge.net zapping-0.10cvs6/help/man/zapping.1 644 764 144 12447 10327375017 12277 .\"Generated by db2man.xsl. Don't modify this, modify the source. .de Sh \" Subsection .br .if t .Sp .ne 5 .PP \fB\\$1\fR .PP .. .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Ip \" List item .br .ie \\n(.$>=3 .ne \\$3 .el .ne 3 .IP "\\$1" \\$2 .. .TH "ZAPPING" 1 "" "" "" .SH NAME zapping \- a Gnome TV and Teletext viewer .SH "SYNOPSIS" .nf \fBzapping\fR [-b, --bpp \fINUMBER\fR] [-c, --command \fISTRING\fR] [--console-errors] [--cpu-features \fIFEATURES\fR] [-d, --debug] [--device \fIFILENAME\fR] [--dword-align] [-n, --tunerless-norm \fISTRING\fR] [--no-overlay, --remote] [--no-plugins] [--no-vbi] [--no-xv-image] [--no-xv-video] [-v, --no-xv] [--xv-image-port \fINUMBER\fR] [--xv-port \fINUMBER\fR, --xv-video-port \fINUMBER\fR] [-y, --yuv-format \fISTRING\fR] [-z, --no-zsfb] .fi .SH "DESCRIPTION" .PP Zapping is a program to watch TV on a computer, within the Gnome environment\&. You can take screenshots and record video and audio\&. Zapping has a Teletext viewer built in and supports Closed Caption and Teletext subtitles\&. For more information open the Gnome help and choose Applications -> Multimedia -> Zapping\&. This manual page refers to \fBzapping\fR version 0\&.10\&. .SH "OPTIONS" .TP \fB-b, --bpp \fINUMBER\fR\fR Color depth of the X display\&. In TrueColor mode (24 or 32 bits per pixel) you might get a very distorted image that spreads all around the desktop\&. This usually means Zapping could not correctly determine the color depth, which can be given here\&. .TP \fB-c, --command \fICOMMAND\fR\fR Execute the given command and exit\&. This was intended to create a sort of batch mode, you may want to use \fBzapping_remote\fR(1) instead\&. Only one command is implemented\&. The \fBset_channel\fR command allows to change the channel by giving the channel name or RF channel number, for example: zapping -c "set_channel BBC" .TP \fB--console-errors\fR Redirect the error messages to the console, useful for bug reports\&. .TP \fB--cpu-features\fR \fIFEATURES\fR Override the CPU detection for tests\&. Possible features are: none, mmx, 3dnow, sse, sse2, sse3, altivec\&. When your CPU does not support the given features Zapping may crash\&. .TP \fB-d, --debug\fR Print debug messages on standard output\&. You should include this information when submitting a bug report, as it can help to trace the problem\&. .TP \fB--device \fIFILENAME\fR\fR Kernel video device to use, usually \fI/dev/video\fR\&. You can specify \fIemulator\fR for tests\&. .TP \fB--dword-align\fR Forces doubleword alignment of the video in overlay mode\&. Can help when the image is distorted at certain sizes but looks fine at others\&. .TP \fB-n, --tunerless-norm \fISTRING\fR\fR This option has no function but is recognized for compatibility with earlier versions of Zapping\&. It determined the video standard to be used when your TV card has no tuner, one of NTSC, PAL or SECAM\&. .TP \fB--no-overlay, --remote\fR Do not overlay video\&. The \fB--remote\fR option refers to the X display\&. Overlay is only possible if the graphics card and TV card are plugged into the same computer\&. Capture mode is possible on a remote display (on another computer or in a nested display) but requires a high network bandwidth\&. .TP \fB--no-plugins\fR Do not use any plugins, usually for testing purposes\&. .TP \fB--no-vbi\fR Do not capture and decode VBI data, i\&.e\&. Teletext, Subtitles, Closed Caption and station names\&. This option is intended for tests and applies only to the current session\&. To override it or disable VBI support permanently see the Devices -> VBI section in the Zapping preferences\&. .TP \fB--no-xv-video\fR Do not use the XVideo extension for video overlay\&. .TP \fB--no-xv-image\fR Do not use the XVideo extension for hardware image scaling\&. .TP \fB-v, --no-xv\fR Do not use the XVideo extension for video overlay or hardware image scaling\&. .TP \fB--xv-image-port \fINUMBER\fR\fR Number of the XVideo port to use for hardware image scaling\&. Zapping lists the available ports with the \fB-d\fR option\&. .TP \fB--xv-port \fINUMBER\fR, --xv-video-port \fINUMBER\fR\fR Number of the XVideo port (similar to a device) to use for video overlay\&. Zapping lists the available ports with the \fB-d\fR option\&. .TP \fB-y, --yuv-format \fISTRING\fR\fR This option has no function but is recognized for compatibility with earlier versions of Zapping\&. It determined the pixel format in capture mode when XVideo hardware image scaling was available, either YUYV or YVU420\&. .TP \fB-z, --no-zsfb\fR This option has no function but is recognized for compatibility with earlier versions of Zapping\&. It used to prevent the execution of \fBzapping_setup_fb\fR(1) on startup\&. Now Zapping calls the helper application only if necessary\&. .SH "SEE ALSO" .PP \fBzapping_remote\fR(1), \fBzapping_setup_fb\fR(1) .SH "AUTHORS" .PP Zapping was written by Iaki Garca Etxebarria, Michael H\&. Schimek (mschimek@users\&.sourceforge\&.net) and many contributors\&. .PP This manual page was written by Michael H\&. Schimek based on work by Christian Marillat\&. .SH "CONTACT" .PP Zapping homepage: http://zapping\&.sourceforge\&.net .PP Please report bugs with the Zapping bug tracker http://sourceforge\&.net/tracker/?group_id=2599 or mail us at zapping-misc@lists\&.sourceforge\&.net zapping-0.10cvs6/help/man/Makefile.am 644 764 144 1373 10327374640 12556 ## Process this file with automake to produce Makefile.in MANUALS = \ zapping.xml \ zapping_remote.xml \ zapping_setup_fb.xml man_MANS = $(MANUALS:.xml=.1) EXTRA_DIST = $(man_MANS) $(MANUALS) if MAINTAINER_MODE if BUILD_MAN %.1: %.xml Makefile.am @XSLTPROC@ -nonet "http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl" $< else # $(man_MANS) are in CVS and source tarball, so BUILD_MAN is necessary # only if $(MANUALS) changed. %.1: %.xml echo The xsltproc tool, DocBook XML DTD V4.1.2 or DocBook XSL echo stylesheets are missing. Rerun autogen.sh or configure echo when you have them. exit 1 endif endif xmlcheck: $(MANUALS) for file in $^; do \ SP_CHARSET_FIXED=YES \ SP_ENCODING=XML \ onsgmls -s -wxml $$file; \ done zapping-0.10cvs6/help/man/Makefile.in 644 764 144 37003 10442575426 12611 # Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = ../.. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = help/man DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = SOURCES = DIST_SOURCES = man1dir = $(mandir)/man1 am__installdirs = "$(DESTDIR)$(man1dir)" NROFF = nroff MANS = $(man_MANS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ ARTS_CFLAGS = @ARTS_CFLAGS@ ARTS_LIBS = @ARTS_LIBS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BUILD_DEINTERLACE_PLUGIN_FALSE = @BUILD_DEINTERLACE_PLUGIN_FALSE@ BUILD_DEINTERLACE_PLUGIN_TRUE = @BUILD_DEINTERLACE_PLUGIN_TRUE@ BUILD_MAN_FALSE = @BUILD_MAN_FALSE@ BUILD_MAN_TRUE = @BUILD_MAN_TRUE@ CAN_COMPILE_3DNOW_FALSE = @CAN_COMPILE_3DNOW_FALSE@ CAN_COMPILE_3DNOW_TRUE = @CAN_COMPILE_3DNOW_TRUE@ CAN_COMPILE_ALTIVEC_FALSE = @CAN_COMPILE_ALTIVEC_FALSE@ CAN_COMPILE_ALTIVEC_TRUE = @CAN_COMPILE_ALTIVEC_TRUE@ CAN_COMPILE_MMX_FALSE = @CAN_COMPILE_MMX_FALSE@ CAN_COMPILE_MMX_TRUE = @CAN_COMPILE_MMX_TRUE@ CAN_COMPILE_SSE2_FALSE = @CAN_COMPILE_SSE2_FALSE@ CAN_COMPILE_SSE2_TRUE = @CAN_COMPILE_SSE2_TRUE@ CAN_COMPILE_SSE3_FALSE = @CAN_COMPILE_SSE3_FALSE@ CAN_COMPILE_SSE3_TRUE = @CAN_COMPILE_SSE3_TRUE@ CAN_COMPILE_SSE_FALSE = @CAN_COMPILE_SSE_FALSE@ CAN_COMPILE_SSE_TRUE = @CAN_COMPILE_SSE_TRUE@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCAS = @CCAS@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ COMMON_INCLUDES = @COMMON_INCLUDES@ CONSOLEHELPER_LOCATION = @CONSOLEHELPER_LOCATION@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFAULT_CFLAGS = @DEFAULT_CFLAGS@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ESD_LIBS = @ESD_LIBS@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ GCONF_SCHEMAS_INSTALL_FALSE = @GCONF_SCHEMAS_INSTALL_FALSE@ GCONF_SCHEMAS_INSTALL_TRUE = @GCONF_SCHEMAS_INSTALL_TRUE@ GCONF_SCHEMA_CONFIG_SOURCE = @GCONF_SCHEMA_CONFIG_SOURCE@ GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@ GDK_PIXBUF_CSOURCE = @GDK_PIXBUF_CSOURCE@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ HAVE_GCC_LIMITS_FALSE = @HAVE_GCC_LIMITS_FALSE@ HAVE_GCC_LIMITS_TRUE = @HAVE_GCC_LIMITS_TRUE@ HAVE_LIBZVBI_FALSE = @HAVE_LIBZVBI_FALSE@ HAVE_LIBZVBI_TRUE = @HAVE_LIBZVBI_TRUE@ HAVE_X86_FALSE = @HAVE_X86_FALSE@ HAVE_X86_TRUE = @HAVE_X86_TRUE@ HAVE_XMU_FALSE = @HAVE_XMU_FALSE@ HAVE_XMU_TRUE = @HAVE_XMU_TRUE@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ INTLTOOL_CAVES_RULE = @INTLTOOL_CAVES_RULE@ INTLTOOL_DESKTOP_RULE = @INTLTOOL_DESKTOP_RULE@ INTLTOOL_DIRECTORY_RULE = @INTLTOOL_DIRECTORY_RULE@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ INTLTOOL_ICONV = @INTLTOOL_ICONV@ INTLTOOL_KBD_RULE = @INTLTOOL_KBD_RULE@ INTLTOOL_KEYS_RULE = @INTLTOOL_KEYS_RULE@ INTLTOOL_MERGE = @INTLTOOL_MERGE@ INTLTOOL_MSGFMT = @INTLTOOL_MSGFMT@ INTLTOOL_MSGMERGE = @INTLTOOL_MSGMERGE@ INTLTOOL_OAF_RULE = @INTLTOOL_OAF_RULE@ INTLTOOL_PERL = @INTLTOOL_PERL@ INTLTOOL_PONG_RULE = @INTLTOOL_PONG_RULE@ INTLTOOL_PROP_RULE = @INTLTOOL_PROP_RULE@ INTLTOOL_SCHEMAS_RULE = @INTLTOOL_SCHEMAS_RULE@ INTLTOOL_SERVER_RULE = @INTLTOOL_SERVER_RULE@ INTLTOOL_SHEET_RULE = @INTLTOOL_SHEET_RULE@ INTLTOOL_SOUNDLIST_RULE = @INTLTOOL_SOUNDLIST_RULE@ INTLTOOL_THEME_RULE = @INTLTOOL_THEME_RULE@ INTLTOOL_UI_RULE = @INTLTOOL_UI_RULE@ INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ INTLTOOL_XAM_RULE = @INTLTOOL_XAM_RULE@ INTLTOOL_XGETTEXT = @INTLTOOL_XGETTEXT@ INTLTOOL_XML_NOMERGE_RULE = @INTLTOOL_XML_NOMERGE_RULE@ INTLTOOL_XML_RULE = @INTLTOOL_XML_RULE@ JPEG_LIB = @JPEG_LIB@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBXML_CFLAGS = @LIBXML_CFLAGS@ LIBXML_LIBS = @LIBXML_LIBS@ LIRC_LIB = @LIRC_LIB@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAKEINFO = @MAKEINFO@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ NEED_ZSFB_FALSE = @NEED_ZSFB_FALSE@ NEED_ZSFB_TRUE = @NEED_ZSFB_TRUE@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_CFLAGS = @PACKAGE_CFLAGS@ PACKAGE_LIBS = @PACKAGE_LIBS@ PACKAGE_LIB_DIR = @PACKAGE_LIB_DIR@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_PIXMAPS_DIR = @PACKAGE_PIXMAPS_DIR@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PACKAGE_VERSION_ID = @PACKAGE_VERSION_ID@ PATH_SEPARATOR = @PATH_SEPARATOR@ PG_CFLAGS = @PG_CFLAGS@ PKG_CONFIG = @PKG_CONFIG@ PLUGIN_DEFAULT_DIR = @PLUGIN_DEFAULT_DIR@ PLUGIN_DEFAULT_FLAGS = @PLUGIN_DEFAULT_FLAGS@ PNG_LIBS = @PNG_LIBS@ POFILES = @POFILES@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ PYTHON_LIBS = @PYTHON_LIBS@ PY_CFLAGS = @PY_CFLAGS@ PY_EXTRA_LIBS = @PY_EXTRA_LIBS@ PY_LIBS = @PY_LIBS@ PY_LIB_LOC = @PY_LIB_LOC@ RANLIB = @RANLIB@ RTE_LIBS = @RTE_LIBS@ SCROLLKEEPER_BUILD_REQUIRED = @SCROLLKEEPER_BUILD_REQUIRED@ SCROLLKEEPER_CONFIG = @SCROLLKEEPER_CONFIG@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ SUID_ZSFB_FALSE = @SUID_ZSFB_FALSE@ SUID_ZSFB_TRUE = @SUID_ZSFB_TRUE@ UNICODE_CFLAGS = @UNICODE_CFLAGS@ UNICODE_LIBS = @UNICODE_LIBS@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ WARN_CFLAGS = @WARN_CFLAGS@ XGETTEXT = @XGETTEXT@ XMLCATALOG = @XMLCATALOG@ XML_CATALOG_FILE = @XML_CATALOG_FILE@ XSLTPROC = @XSLTPROC@ X_CFLAGS = @X_CFLAGS@ X_DPMS_LIBS = @X_DPMS_LIBS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ X_XF86DGA_LIBS = @X_XF86DGA_LIBS@ X_XF86VMODE_LIBS = @X_XF86VMODE_LIBS@ X_XINERAMA_LIBS = @X_XINERAMA_LIBS@ X_XMU_LIBS = @X_XMU_LIBS@ X_XV_LIBS = @X_XV_LIBS@ ZSFB_GROUP = @ZSFB_GROUP@ ZSFB_OWNER = @ZSFB_OWNER@ ZVBI_CFLAGS = @ZVBI_CFLAGS@ ZVBI_LIBS = @ZVBI_LIBS@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_STRIP = @ac_ct_STRIP@ ac_pt_PKG_CONFIG = @ac_pt_PKG_CONFIG@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ datadir = @datadir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ python_val = @python_val@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ MANUALS = \ zapping.xml \ zapping_remote.xml \ zapping_setup_fb.xml man_MANS = $(MANUALS:.xml=.1) EXTRA_DIST = $(man_MANS) $(MANUALS) all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu help/man/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu help/man/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool uninstall-info-am: install-man1: $(man1_MANS) $(man_MANS) @$(NORMAL_INSTALL) test -z "$(man1dir)" || $(mkdir_p) "$(DESTDIR)$(man1dir)" @list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \ l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \ for i in $$l2; do \ case "$$i" in \ *.1*) list="$$list $$i" ;; \ esac; \ done; \ for i in $$list; do \ if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \ else file=$$i; fi; \ ext=`echo $$i | sed -e 's/^.*\\.//'`; \ case "$$ext" in \ 1*) ;; \ *) ext='1' ;; \ esac; \ inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ inst=`echo $$inst | sed -e 's/^.*\///'`; \ inst=`echo $$inst | sed '$(transform)'`.$$ext; \ echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \ $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst"; \ done uninstall-man1: @$(NORMAL_UNINSTALL) @list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \ l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \ for i in $$l2; do \ case "$$i" in \ *.1*) list="$$list $$i" ;; \ esac; \ done; \ for i in $$list; do \ ext=`echo $$i | sed -e 's/^.*\\.//'`; \ case "$$ext" in \ 1*) ;; \ *) ext='1' ;; \ esac; \ inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ inst=`echo $$inst | sed -e 's/^.*\///'`; \ inst=`echo $$inst | sed '$(transform)'`.$$ext; \ echo " rm -f '$(DESTDIR)$(man1dir)/$$inst'"; \ rm -f "$(DESTDIR)$(man1dir)/$$inst"; \ done tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(MANS) installdirs: for dir in "$(DESTDIR)$(man1dir)"; do \ test -z "$$dir" || $(mkdir_p) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic distclean-libtool dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-man install-exec-am: install-info: install-info-am install-man: install-man1 installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-info-am uninstall-man uninstall-man: uninstall-man1 .PHONY: all all-am check check-am clean clean-generic clean-libtool \ distclean distclean-generic distclean-libtool distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-exec install-exec-am \ install-info install-info-am install-man install-man1 \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ uninstall uninstall-am uninstall-info-am uninstall-man \ uninstall-man1 @BUILD_MAN_TRUE@@MAINTAINER_MODE_TRUE@%.1: %.xml Makefile.am @BUILD_MAN_TRUE@@MAINTAINER_MODE_TRUE@ @XSLTPROC@ -nonet "http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl" $< # $(man_MANS) are in CVS and source tarball, so BUILD_MAN is necessary # only if $(MANUALS) changed. @BUILD_MAN_FALSE@@MAINTAINER_MODE_TRUE@%.1: %.xml @BUILD_MAN_FALSE@@MAINTAINER_MODE_TRUE@ echo The xsltproc tool, DocBook XML DTD V4.1.2 or DocBook XSL @BUILD_MAN_FALSE@@MAINTAINER_MODE_TRUE@ echo stylesheets are missing. Rerun autogen.sh or configure @BUILD_MAN_FALSE@@MAINTAINER_MODE_TRUE@ echo when you have them. @BUILD_MAN_FALSE@@MAINTAINER_MODE_TRUE@ exit 1 xmlcheck: $(MANUALS) for file in $^; do \ SP_CHARSET_FIXED=YES \ SP_ENCODING=XML \ onsgmls -s -wxml $$file; \ done # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: zapping-0.10cvs6/help/man/zapping_remote.xml 644 764 144 6372 10327374716 14277 Zapping"> zapping_remote"> ]> zapping_remote 1 zapping_remote sends commands to a running instance of &app; &cmd; -h -d NAME -i ID -v -x command Description &cmd; is a small program to send Python commands to a running instance of &app;. See the &app; documentation for a list of commands. When the -x option is given &cmd; can also send Xawtv commands, see the xawtv-remote 1 manual page for details. &app; also responds to xawtv-remote. This manual page refers to &cmd; version &version;. Options Prints usage information on stdout, then terminates the program. The X display to use. The ID of the &app; or Xawtv main window. When omitted &cmd; tries to find it automatically. Debug level, default 0. Switches to a xawtv-remote compatible mode, sending Xawtv instead of Python commands. Bugs None known. See also zapping 1 , zapping_setup_fb 1 Authors &app; was written by Iñaki García Etxebarria, Michael H. Schimek (mschimek@users.sourceforge.net) and many contributors. This manual page was written by Michael H. Schimek. zapping-0.10cvs6/help/omf.make 644 764 144 4017 10206044031 11345 # # No modifications of this Makefile should be necessary. # # This file contains the build instructions for installing OMF files. It is # generally called from the makefiles for particular formats of documentation. # # Note that you must configure your package with --localstatedir=/var/lib # so that the scrollkeeper-update command below will update the database # in the standard scrollkeeper directory. # # If it is impossible to configure with --localstatedir=/var/lib, then # modify the definition of scrollkeeper_localstate_dir so that # it points to the correct location. Note that you must still use # $(localstatedir) in this or when people build RPMs it will update # the real database on their system instead of the one under RPM_BUILD_ROOT. # # Note: This make file is not incorporated into xmldocs.make because, in # general, there will be other documents install besides XML documents # and the makefiles for these formats should also include this file. # # About this file: # This file was taken from scrollkeeper_example2, a package illustrating # how to install documentation and OMF files for use with ScrollKeeper # 0.3.x and 0.4.x. For more information, see: # http://scrollkeeper.sourceforge.net/ # Version: 0.1.2 (last updated: March 20, 2002) # omf_dest_dir=$(datadir)/omf/@PACKAGE@ scrollkeeper_localstate_dir = $(localstatedir)/scrollkeeper omf: omf_timestamp omf_timestamp: $(omffile) -for file in $(omffile); do \ scrollkeeper-preinstall $(docdir)/$(docname).xml $(srcdir)/$$file $$file.out; \ done touch omf_timestamp install-data-hook-omf: $(mkinstalldirs) $(DESTDIR)$(omf_dest_dir) for file in $(omffile); do \ $(INSTALL_DATA) $$file.out $(DESTDIR)$(omf_dest_dir)/$$file; \ done -scrollkeeper-update -p $(scrollkeeper_localstate_dir) -o $(DESTDIR)$(omf_dest_dir) uninstall-local-omf: -for file in $(srcdir)/*.omf; do \ basefile=`basename $$file`; \ rm -f $(DESTDIR)$(omf_dest_dir)/$$basefile; \ done -rmdir $(DESTDIR)$(omf_dest_dir) -scrollkeeper-update -p $(scrollkeeper_localstate_dir) zapping-0.10cvs6/help/Makefile.am 644 764 144 303 10327374545 11757 ## Process this file with automake to produce Makefile.in. SUBDIRS = man C EXTRA_DIST = \ omf.make \ xmldocs.make xmlcheck: for dir in $(SUBDIRS); do \ $(MAKE) -C $$dir xmlcheck; \ done zapping-0.10cvs6/help/Makefile.in 644 764 144 44437 10442575421 12042 # Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = .. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = help DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-exec-recursive install-info-recursive \ install-recursive installcheck-recursive installdirs-recursive \ pdf-recursive ps-recursive uninstall-info-recursive \ uninstall-recursive ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ ARTS_CFLAGS = @ARTS_CFLAGS@ ARTS_LIBS = @ARTS_LIBS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BUILD_DEINTERLACE_PLUGIN_FALSE = @BUILD_DEINTERLACE_PLUGIN_FALSE@ BUILD_DEINTERLACE_PLUGIN_TRUE = @BUILD_DEINTERLACE_PLUGIN_TRUE@ BUILD_MAN_FALSE = @BUILD_MAN_FALSE@ BUILD_MAN_TRUE = @BUILD_MAN_TRUE@ CAN_COMPILE_3DNOW_FALSE = @CAN_COMPILE_3DNOW_FALSE@ CAN_COMPILE_3DNOW_TRUE = @CAN_COMPILE_3DNOW_TRUE@ CAN_COMPILE_ALTIVEC_FALSE = @CAN_COMPILE_ALTIVEC_FALSE@ CAN_COMPILE_ALTIVEC_TRUE = @CAN_COMPILE_ALTIVEC_TRUE@ CAN_COMPILE_MMX_FALSE = @CAN_COMPILE_MMX_FALSE@ CAN_COMPILE_MMX_TRUE = @CAN_COMPILE_MMX_TRUE@ CAN_COMPILE_SSE2_FALSE = @CAN_COMPILE_SSE2_FALSE@ CAN_COMPILE_SSE2_TRUE = @CAN_COMPILE_SSE2_TRUE@ CAN_COMPILE_SSE3_FALSE = @CAN_COMPILE_SSE3_FALSE@ CAN_COMPILE_SSE3_TRUE = @CAN_COMPILE_SSE3_TRUE@ CAN_COMPILE_SSE_FALSE = @CAN_COMPILE_SSE_FALSE@ CAN_COMPILE_SSE_TRUE = @CAN_COMPILE_SSE_TRUE@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCAS = @CCAS@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ COMMON_INCLUDES = @COMMON_INCLUDES@ CONSOLEHELPER_LOCATION = @CONSOLEHELPER_LOCATION@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFAULT_CFLAGS = @DEFAULT_CFLAGS@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ESD_LIBS = @ESD_LIBS@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ GCONF_SCHEMAS_INSTALL_FALSE = @GCONF_SCHEMAS_INSTALL_FALSE@ GCONF_SCHEMAS_INSTALL_TRUE = @GCONF_SCHEMAS_INSTALL_TRUE@ GCONF_SCHEMA_CONFIG_SOURCE = @GCONF_SCHEMA_CONFIG_SOURCE@ GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@ GDK_PIXBUF_CSOURCE = @GDK_PIXBUF_CSOURCE@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ HAVE_GCC_LIMITS_FALSE = @HAVE_GCC_LIMITS_FALSE@ HAVE_GCC_LIMITS_TRUE = @HAVE_GCC_LIMITS_TRUE@ HAVE_LIBZVBI_FALSE = @HAVE_LIBZVBI_FALSE@ HAVE_LIBZVBI_TRUE = @HAVE_LIBZVBI_TRUE@ HAVE_X86_FALSE = @HAVE_X86_FALSE@ HAVE_X86_TRUE = @HAVE_X86_TRUE@ HAVE_XMU_FALSE = @HAVE_XMU_FALSE@ HAVE_XMU_TRUE = @HAVE_XMU_TRUE@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ INTLTOOL_CAVES_RULE = @INTLTOOL_CAVES_RULE@ INTLTOOL_DESKTOP_RULE = @INTLTOOL_DESKTOP_RULE@ INTLTOOL_DIRECTORY_RULE = @INTLTOOL_DIRECTORY_RULE@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ INTLTOOL_ICONV = @INTLTOOL_ICONV@ INTLTOOL_KBD_RULE = @INTLTOOL_KBD_RULE@ INTLTOOL_KEYS_RULE = @INTLTOOL_KEYS_RULE@ INTLTOOL_MERGE = @INTLTOOL_MERGE@ INTLTOOL_MSGFMT = @INTLTOOL_MSGFMT@ INTLTOOL_MSGMERGE = @INTLTOOL_MSGMERGE@ INTLTOOL_OAF_RULE = @INTLTOOL_OAF_RULE@ INTLTOOL_PERL = @INTLTOOL_PERL@ INTLTOOL_PONG_RULE = @INTLTOOL_PONG_RULE@ INTLTOOL_PROP_RULE = @INTLTOOL_PROP_RULE@ INTLTOOL_SCHEMAS_RULE = @INTLTOOL_SCHEMAS_RULE@ INTLTOOL_SERVER_RULE = @INTLTOOL_SERVER_RULE@ INTLTOOL_SHEET_RULE = @INTLTOOL_SHEET_RULE@ INTLTOOL_SOUNDLIST_RULE = @INTLTOOL_SOUNDLIST_RULE@ INTLTOOL_THEME_RULE = @INTLTOOL_THEME_RULE@ INTLTOOL_UI_RULE = @INTLTOOL_UI_RULE@ INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ INTLTOOL_XAM_RULE = @INTLTOOL_XAM_RULE@ INTLTOOL_XGETTEXT = @INTLTOOL_XGETTEXT@ INTLTOOL_XML_NOMERGE_RULE = @INTLTOOL_XML_NOMERGE_RULE@ INTLTOOL_XML_RULE = @INTLTOOL_XML_RULE@ JPEG_LIB = @JPEG_LIB@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBXML_CFLAGS = @LIBXML_CFLAGS@ LIBXML_LIBS = @LIBXML_LIBS@ LIRC_LIB = @LIRC_LIB@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAKEINFO = @MAKEINFO@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ NEED_ZSFB_FALSE = @NEED_ZSFB_FALSE@ NEED_ZSFB_TRUE = @NEED_ZSFB_TRUE@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_CFLAGS = @PACKAGE_CFLAGS@ PACKAGE_LIBS = @PACKAGE_LIBS@ PACKAGE_LIB_DIR = @PACKAGE_LIB_DIR@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_PIXMAPS_DIR = @PACKAGE_PIXMAPS_DIR@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PACKAGE_VERSION_ID = @PACKAGE_VERSION_ID@ PATH_SEPARATOR = @PATH_SEPARATOR@ PG_CFLAGS = @PG_CFLAGS@ PKG_CONFIG = @PKG_CONFIG@ PLUGIN_DEFAULT_DIR = @PLUGIN_DEFAULT_DIR@ PLUGIN_DEFAULT_FLAGS = @PLUGIN_DEFAULT_FLAGS@ PNG_LIBS = @PNG_LIBS@ POFILES = @POFILES@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ PYTHON_LIBS = @PYTHON_LIBS@ PY_CFLAGS = @PY_CFLAGS@ PY_EXTRA_LIBS = @PY_EXTRA_LIBS@ PY_LIBS = @PY_LIBS@ PY_LIB_LOC = @PY_LIB_LOC@ RANLIB = @RANLIB@ RTE_LIBS = @RTE_LIBS@ SCROLLKEEPER_BUILD_REQUIRED = @SCROLLKEEPER_BUILD_REQUIRED@ SCROLLKEEPER_CONFIG = @SCROLLKEEPER_CONFIG@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ SUID_ZSFB_FALSE = @SUID_ZSFB_FALSE@ SUID_ZSFB_TRUE = @SUID_ZSFB_TRUE@ UNICODE_CFLAGS = @UNICODE_CFLAGS@ UNICODE_LIBS = @UNICODE_LIBS@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ WARN_CFLAGS = @WARN_CFLAGS@ XGETTEXT = @XGETTEXT@ XMLCATALOG = @XMLCATALOG@ XML_CATALOG_FILE = @XML_CATALOG_FILE@ XSLTPROC = @XSLTPROC@ X_CFLAGS = @X_CFLAGS@ X_DPMS_LIBS = @X_DPMS_LIBS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ X_XF86DGA_LIBS = @X_XF86DGA_LIBS@ X_XF86VMODE_LIBS = @X_XF86VMODE_LIBS@ X_XINERAMA_LIBS = @X_XINERAMA_LIBS@ X_XMU_LIBS = @X_XMU_LIBS@ X_XV_LIBS = @X_XV_LIBS@ ZSFB_GROUP = @ZSFB_GROUP@ ZSFB_OWNER = @ZSFB_OWNER@ ZVBI_CFLAGS = @ZVBI_CFLAGS@ ZVBI_LIBS = @ZVBI_LIBS@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_STRIP = @ac_ct_STRIP@ ac_pt_PKG_CONFIG = @ac_pt_PKG_CONFIG@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ datadir = @datadir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ python_val = @python_val@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ SUBDIRS = man C EXTRA_DIST = \ omf.make \ xmldocs.make all: all-recursive .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu help/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu help/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool uninstall-info-am: # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" mostlyclean-recursive clean-recursive distclean-recursive \ maintainer-clean-recursive: @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(mkdir_p) "$(distdir)/$$subdir" \ || exit 1; \ distdir=`$(am__cd) $(distdir) && pwd`; \ top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ (cd $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$top_distdir" \ distdir="$$distdir/$$subdir" \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile installdirs: installdirs-recursive installdirs-am: install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-recursive -rm -f Makefile distclean-am: clean-am distclean-generic distclean-libtool \ distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive info: info-recursive info-am: install-data-am: install-exec-am: install-info: install-info-recursive install-man: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-info-am uninstall-info: uninstall-info-recursive .PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am \ clean clean-generic clean-libtool clean-recursive ctags \ ctags-recursive distclean distclean-generic distclean-libtool \ distclean-recursive distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-exec install-exec-am install-info \ install-info-am install-man install-strip installcheck \ installcheck-am installdirs installdirs-am maintainer-clean \ maintainer-clean-generic maintainer-clean-recursive \ mostlyclean mostlyclean-generic mostlyclean-libtool \ mostlyclean-recursive pdf pdf-am ps ps-am tags tags-recursive \ uninstall uninstall-am uninstall-info-am xmlcheck: for dir in $(SUBDIRS); do \ $(MAKE) -C $$dir xmlcheck; \ done # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: zapping-0.10cvs6/help/xmldocs.make 644 764 144 6140 10206044020 12232 # # No modifications of this Makefile should be necessary. # # To use this template: # 1) Define: figdir, docname, lang, omffile, and entities in # your Makefile.am file for each document directory, # although figdir, omffile, and entities may be empty # 2) Make sure the Makefile in (1) also includes # "include $(top_srcdir)/xmldocs.make" and # "dist-hook: app-dist-hook". # 3) Optionally define 'entities' to hold xml entities which # you would also like installed # 4) Figures must go under $(figdir)/ and be in PNG format # 5) You should only have one document per directory # 6) Note that the figure directory, $(figdir)/, should not have its # own Makefile since this Makefile installs those figures. # # example Makefile.am: # figdir = figures # docname = scrollkeeper-manual # lang = C # omffile=scrollkeeper-manual-C.omf # entities = fdl.xml # include $(top_srcdir)/xmldocs.make # dist-hook: app-dist-hook # # About this file: # This file was taken from scrollkeeper_example2, a package illustrating # how to install documentation and OMF files for use with ScrollKeeper # 0.3.x and 0.4.x. For more information, see: # http://scrollkeeper.sourceforge.net/ # Version: 0.1.2 (last updated: March 20, 2002) # # ************* Begin of section some packagers may need to modify ************** # This variable (docdir) specifies where the documents should be installed. # This default value should work for most packages. # docdir = $(datadir)/@PACKAGE@/doc/$(docname)/$(lang) docdir = $(datadir)/gnome/help/$(docname)/$(lang) # ************** You should not have to edit below this line ******************* xml_files = $(entities) $(docname).xml EXTRA_DIST = $(xml_files) $(omffile) CLEANFILES = omf_timestamp # If the following file is in a subdir (like help/) you need to add that to the path include $(top_srcdir)/help/omf.make all: omf $(docname).xml: $(entities) -ourdir=`pwd`; \ cd $(srcdir); \ cp $(entities) $$ourdir app-dist-hook: if test "$(figdir)"; then \ $(mkinstalldirs) $(distdir)/$(figdir); \ for file in $(srcdir)/$(figdir)/*.png; do \ basefile=`echo $$file | sed -e 's,^.*/,,'`; \ $(INSTALL_DATA) $$file $(distdir)/$(figdir)/$$basefile; \ done \ fi install-data-local: omf $(mkinstalldirs) $(DESTDIR)$(docdir) for file in $(xml_files); do \ cp $(srcdir)/$$file $(DESTDIR)$(docdir); \ done if test "$(figdir)"; then \ $(mkinstalldirs) $(DESTDIR)$(docdir)/$(figdir); \ for file in $(srcdir)/$(figdir)/*.png; do \ basefile=`echo $$file | sed -e 's,^.*/,,'`; \ $(INSTALL_DATA) $$file $(DESTDIR)$(docdir)/$(figdir)/$$basefile; \ done \ fi install-data-hook: install-data-hook-omf uninstall-local: uninstall-local-doc uninstall-local-omf uninstall-local-doc: -if test "$(figdir)"; then \ for file in $(srcdir)/$(figdir)/*.png; do \ basefile=`echo $$file | sed -e 's,^.*/,,'`; \ rm -f $(DESTDIR)$(docdir)/$(figdir)/$$basefile; \ done; \ rmdir $(DESTDIR)$(docdir)/$(figdir); \ fi -for file in $(xml_files); do \ rm -f $(DESTDIR)$(docdir)/$$file; \ done -rmdir $(DESTDIR)$(docdir) zapping-0.10cvs6/test/ 777 764 144 0 10443536412 7772 5zapping-0.10cvs6/test/copy_image-sse.sh 755 764 144 210 10417056140 13176 #!/bin/sh . `dirname $0`/simd-emu.sh if ! find_emulator sse; then exit 77 else LD_PRELOAD=$pre $emu ./copy_image sse exit $? fi zapping-0.10cvs6/test/cpudt.c 644 764 144 2517 10260121450 11243 /* * Zapping TV viewer * * Copyright (C) 2005 Michael H. Schimek * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* $Id: cpudt.c,v 1.2 2005/06/28 01:08:56 mschimek Exp $ */ #ifdef HAVE_CONFIG_H # include "config.h" #endif #include #include #include #include #include "libtv/cpu.h" int main (int argc, char ** argv) { cpu_feature_set required_features; cpu_feature_set actual_features; assert (2 == argc); required_features = cpu_feature_set_from_string (argv[1]); actual_features = cpu_detection (); if (required_features == (actual_features & required_features)) exit (EXIT_SUCCESS); else exit (EXIT_FAILURE); } zapping-0.10cvs6/test/simd-3dnow.sh 755 764 144 206 10263052660 12265 #!/bin/sh . `dirname $0`/simd-emu.sh if ! find_emulator 3dnow; then exit 77 else LD_PRELOAD=$pre $emu ./simd 3dnow exit $? fi zapping-0.10cvs6/test/README 644 764 144 2410 10260121461 10632 This directory contains tools and scripts to test libtv image manipulation routines. File overview ------------- clear_image/clear_image.c/pixel.h/clear_image-mmx|sse.sh Tests all implementations of the tv_clear_image() function. Run by make check for all compiled implementations. May use an emulator if we cross-compile or the CPU lacks the required feature. cpudt/cpudt.c CPU feature detection. Use like "if cpudt mmx; then ..." Possible features are mmx, 3dnow, sse, sse2, altivec and others. Used by simd-emu.sh. guard1.c/guard2.c/guard.h Miniature version of efence, to check for buffer overflows during tests, and two test for mini-efence itself. memcpy/memcpy.c/memcpy-mmx|sse.sh Tests all implementations of the tv_memcpy() function. Run by make check for all compiled implementations. May use an emulator if we cross-compile or the CPU lacks the required feature. simd-emu.sh Runs a test program using an emulator, currently qemu, if our CPU does not support the required feature. Used by various scripts. simd/simd.c/simd-mmx|3dnow|sse|sse2|altivec.sh Tests if the libtv/simd.h macros do what they are supposed to. Run by make check for all compilable implementations. May use an emulator if we cross-compile or the CPU lacks the required feature. zapping-0.10cvs6/test/clear_image-mmx.sh 755 764 144 211 10263052744 13327 #!/bin/sh . `dirname $0`/simd-emu.sh if ! find_emulator mmx; then exit 77 else LD_PRELOAD=$pre $emu ./clear_image mmx exit $? fi zapping-0.10cvs6/test/simd-sse2.sh 755 764 144 204 10263052577 12114 #!/bin/sh . `dirname $0`/simd-emu.sh if ! find_emulator sse2; then exit 77 else LD_PRELOAD=$pre $emu ./simd sse2 exit $? fi zapping-0.10cvs6/test/clear_image-sse.sh 755 764 144 211 10263052726 13320 #!/bin/sh . `dirname $0`/simd-emu.sh if ! find_emulator sse; then exit 77 else LD_PRELOAD=$pre $emu ./clear_image sse exit $? fi zapping-0.10cvs6/test/simd-emu.sh 755 764 144 1553 10260121437 12043 #!/bin/sh find_emulator () { local feature=$1 if ./cpudt $feature; then # Excellent! $feature is supported by our CPU. emu= pre= return 0 else case "$feature" in altivec) emu="qemu-ppc" ;; *) emu="qemu-i386" ;; esac if which $emu >/dev/null && $emu ./cpudt $feature; then # We have a CPU emulator and it supports $feature, so we can run # the test program on older CPUs and when cross-compiling. pre= return 0 else case "$feature" in altivec) pre=nosuchthing ;; *) pre=/usr/local/lib/libmmxemu.so ;; esac if test -e $pre; then # We can simulate unsupported mmx instructions on this CPU. emu= return 0 else echo "*** Cannot run $feature tests on this machine." emu=false pre= fi fi fi return 1 } zapping-0.10cvs6/test/simd-altivec.sh 755 764 144 212 10263052622 12655 #!/bin/sh . `dirname $0`/simd-emu.sh if ! find_emulator altivec; then exit 77 else LD_PRELOAD=$pre $emu ./simd altivec exit $? fi zapping-0.10cvs6/test/simd-mmx.sh 755 764 144 202 10263052610 12023 #!/bin/sh . `dirname $0`/simd-emu.sh if ! find_emulator mmx; then exit 77 else LD_PRELOAD=$pre $emu ./simd mmx exit $? fi zapping-0.10cvs6/test/simd-sse.sh 755 764 144 202 10263052560 12020 #!/bin/sh . `dirname $0`/simd-emu.sh if ! find_emulator sse; then exit 77 else LD_PRELOAD=$pre $emu ./simd sse exit $? fi zapping-0.10cvs6/test/Makefile.am 644 764 144 5222 10417055752 12027 ## Process this file with automake to produce Makefile.in TESTS = guard1 guard2 clear_image convert_image copy_image memcpy XFAIL_TESTS = guard1 guard2 EXTRA_DIST = \ clear_image-altivec.sh \ clear_image-mmx.sh \ clear_image-sse.sh \ convert_image-mmx.sh \ copy_image-altivec.sh \ copy_image-mmx.sh \ copy_image-sse.sh \ guard.h \ memcpy-mmx.sh \ memcpy-sse.sh \ pixel.h \ simd-3dnow.sh \ simd-altivec.sh \ simd-emu.sh \ simd-mmx.sh \ simd-sse.sh \ simd-sse2.sh INCLUDES = -I$(top_srcdir) SIMD_CFLAGS = -O3 -fomit-frame-pointer SIMD_SOURCES = simd.c SIMD_LIBS = # x86 and x86-64 if CAN_COMPILE_MMX TESTS += \ clear_image-mmx.sh \ convert_image-mmx.sh \ copy_image-mmx.sh \ memcpy-mmx.sh \ simd-mmx.sh SIMD_LIBS += libsimd_MMX.la libsimd_MMX_la_CFLAGS = $(SIMD_CFLAGS) -mmmx -DSIMD=CPU_FEATURE_MMX libsimd_MMX_la_SOURCES = $(SIMD_SOURCES) endif if CAN_COMPILE_3DNOW TESTS += simd-3dnow.sh SIMD_LIBS += libsimd_3DNOW.la libsimd_3DNOW_la_CFLAGS = $(SIMD_CFLAGS) -m3dnow -DSIMD=CPU_FEATURE_3DNOW libsimd_3DNOW_la_SOURCES = $(SIMD_SOURCES) endif if CAN_COMPILE_SSE TESTS += \ clear_image-sse.sh \ copy_image-sse.sh \ memcpy-sse.sh \ simd-sse.sh SIMD_LIBS += libsimd_SSE.la libsimd_SSE_la_CFLAGS = $(SIMD_CFLAGS) -msse -DSIMD=CPU_FEATURE_SSE_INT libsimd_SSE_la_SOURCES = $(SIMD_SOURCES) endif if CAN_COMPILE_SSE2 TESTS += simd-sse2.sh SIMD_LIBS += libsimd_SSE2.la libsimd_SSE2_la_CFLAGS = $(SIMD_CFLAGS) -msse2 -DSIMD=CPU_FEATURE_SSE2 libsimd_SSE2_la_SOURCES = $(SIMD_SOURCES) endif # powerpc if CAN_COMPILE_ALTIVEC TESTS += \ clear_image-altivec.sh \ copy_image-altivec.sh \ simd-altivec.sh SIMD_LIBS += libsimd_AVEC.la libsimd_AVEC_la_CFLAGS = $(SIMD_CFLAGS) \ -maltivec -mabi=altivec -DSIMD=CPU_FEATURE_ALTIVEC libsimd_AVEC_la_SOURCES = $(SIMD_SOURCES) endif noinst_LTLIBRARIES = $(SIMD_LIBS) check_PROGRAMS = \ cpudt \ clear_image \ convert_image \ copy_image \ guard1 \ guard2 \ memcpy \ simd convert_image_LDADD = \ -lm \ $(top_builddir)/libtv/libtv.la copy_image_LDADD = \ $(top_builddir)/libtv/libtv.la check_SCRIPTS = \ simd-emu.sh simd_LDADD = \ $(SIMD_LIBS) \ $(top_builddir)/libtv/libtv.la LDADD = \ $(top_builddir)/libtv/libtv.la simd-emu.sh: $(MAKE) cpudt memcpy-mmx.sh \ memcpy-sse.sh \ memcpy-altivec.sh: $(MAKE) memcpy clear_image-mmx.sh \ clear_image-sse.sh \ clear_image-altivec.sh: $(MAKE) clear_image convert_image-mmx.sh \ convert_image-3dnow.sh \ convert_image-sse.sh \ convert_image-sse2.sh \ convert_image-altivec.sh: $(MAKE) convert_image copy_image-mmx.sh \ copy_image-sse.sh \ copy_image-altivec.sh: $(MAKE) copy_image simd-mmx.sh \ simd-3dnow.sh \ simd-sse.sh \ simd-sse2.sh \ simd-altivec.sh: $(MAKE) simd zapping-0.10cvs6/test/Makefile.in 644 764 144 104137 10442575627 12113 # Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = .. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ # x86 and x86-64 @CAN_COMPILE_MMX_TRUE@am__append_1 = \ @CAN_COMPILE_MMX_TRUE@ clear_image-mmx.sh \ @CAN_COMPILE_MMX_TRUE@ convert_image-mmx.sh \ @CAN_COMPILE_MMX_TRUE@ copy_image-mmx.sh \ @CAN_COMPILE_MMX_TRUE@ memcpy-mmx.sh \ @CAN_COMPILE_MMX_TRUE@ simd-mmx.sh @CAN_COMPILE_MMX_TRUE@am__append_2 = libsimd_MMX.la @CAN_COMPILE_3DNOW_TRUE@am__append_3 = simd-3dnow.sh @CAN_COMPILE_3DNOW_TRUE@am__append_4 = libsimd_3DNOW.la @CAN_COMPILE_SSE_TRUE@am__append_5 = \ @CAN_COMPILE_SSE_TRUE@ clear_image-sse.sh \ @CAN_COMPILE_SSE_TRUE@ copy_image-sse.sh \ @CAN_COMPILE_SSE_TRUE@ memcpy-sse.sh \ @CAN_COMPILE_SSE_TRUE@ simd-sse.sh @CAN_COMPILE_SSE_TRUE@am__append_6 = libsimd_SSE.la @CAN_COMPILE_SSE2_TRUE@am__append_7 = simd-sse2.sh @CAN_COMPILE_SSE2_TRUE@am__append_8 = libsimd_SSE2.la # powerpc @CAN_COMPILE_ALTIVEC_TRUE@am__append_9 = \ @CAN_COMPILE_ALTIVEC_TRUE@ clear_image-altivec.sh \ @CAN_COMPILE_ALTIVEC_TRUE@ copy_image-altivec.sh \ @CAN_COMPILE_ALTIVEC_TRUE@ simd-altivec.sh @CAN_COMPILE_ALTIVEC_TRUE@am__append_10 = libsimd_AVEC.la check_PROGRAMS = cpudt$(EXEEXT) clear_image$(EXEEXT) \ convert_image$(EXEEXT) copy_image$(EXEEXT) guard1$(EXEEXT) \ guard2$(EXEEXT) memcpy$(EXEEXT) simd$(EXEEXT) subdir = test DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libsimd_3DNOW_la_LIBADD = am__libsimd_3DNOW_la_SOURCES_DIST = simd.c am__objects_1 = libsimd_3DNOW_la-simd.lo @CAN_COMPILE_3DNOW_TRUE@am_libsimd_3DNOW_la_OBJECTS = \ @CAN_COMPILE_3DNOW_TRUE@ $(am__objects_1) libsimd_3DNOW_la_OBJECTS = $(am_libsimd_3DNOW_la_OBJECTS) @CAN_COMPILE_3DNOW_TRUE@am_libsimd_3DNOW_la_rpath = libsimd_AVEC_la_LIBADD = am__libsimd_AVEC_la_SOURCES_DIST = simd.c am__objects_2 = libsimd_AVEC_la-simd.lo @CAN_COMPILE_ALTIVEC_TRUE@am_libsimd_AVEC_la_OBJECTS = \ @CAN_COMPILE_ALTIVEC_TRUE@ $(am__objects_2) libsimd_AVEC_la_OBJECTS = $(am_libsimd_AVEC_la_OBJECTS) @CAN_COMPILE_ALTIVEC_TRUE@am_libsimd_AVEC_la_rpath = libsimd_MMX_la_LIBADD = am__libsimd_MMX_la_SOURCES_DIST = simd.c am__objects_3 = libsimd_MMX_la-simd.lo @CAN_COMPILE_MMX_TRUE@am_libsimd_MMX_la_OBJECTS = $(am__objects_3) libsimd_MMX_la_OBJECTS = $(am_libsimd_MMX_la_OBJECTS) @CAN_COMPILE_MMX_TRUE@am_libsimd_MMX_la_rpath = libsimd_SSE_la_LIBADD = am__libsimd_SSE_la_SOURCES_DIST = simd.c am__objects_4 = libsimd_SSE_la-simd.lo @CAN_COMPILE_SSE_TRUE@am_libsimd_SSE_la_OBJECTS = $(am__objects_4) libsimd_SSE_la_OBJECTS = $(am_libsimd_SSE_la_OBJECTS) @CAN_COMPILE_SSE_TRUE@am_libsimd_SSE_la_rpath = libsimd_SSE2_la_LIBADD = am__libsimd_SSE2_la_SOURCES_DIST = simd.c am__objects_5 = libsimd_SSE2_la-simd.lo @CAN_COMPILE_SSE2_TRUE@am_libsimd_SSE2_la_OBJECTS = $(am__objects_5) libsimd_SSE2_la_OBJECTS = $(am_libsimd_SSE2_la_OBJECTS) @CAN_COMPILE_SSE2_TRUE@am_libsimd_SSE2_la_rpath = clear_image_SOURCES = clear_image.c clear_image_OBJECTS = clear_image.$(OBJEXT) clear_image_LDADD = $(LDADD) clear_image_DEPENDENCIES = $(top_builddir)/libtv/libtv.la convert_image_SOURCES = convert_image.c convert_image_OBJECTS = convert_image.$(OBJEXT) convert_image_DEPENDENCIES = $(top_builddir)/libtv/libtv.la copy_image_SOURCES = copy_image.c copy_image_OBJECTS = copy_image.$(OBJEXT) copy_image_DEPENDENCIES = $(top_builddir)/libtv/libtv.la cpudt_SOURCES = cpudt.c cpudt_OBJECTS = cpudt.$(OBJEXT) cpudt_LDADD = $(LDADD) cpudt_DEPENDENCIES = $(top_builddir)/libtv/libtv.la guard1_SOURCES = guard1.c guard1_OBJECTS = guard1.$(OBJEXT) guard1_LDADD = $(LDADD) guard1_DEPENDENCIES = $(top_builddir)/libtv/libtv.la guard2_SOURCES = guard2.c guard2_OBJECTS = guard2.$(OBJEXT) guard2_LDADD = $(LDADD) guard2_DEPENDENCIES = $(top_builddir)/libtv/libtv.la memcpy_SOURCES = memcpy.c memcpy_OBJECTS = memcpy.$(OBJEXT) memcpy_LDADD = $(LDADD) memcpy_DEPENDENCIES = $(top_builddir)/libtv/libtv.la simd_SOURCES = simd.c simd_OBJECTS = simd.$(OBJEXT) @CAN_COMPILE_MMX_TRUE@am__DEPENDENCIES_1 = libsimd_MMX.la @CAN_COMPILE_3DNOW_TRUE@am__DEPENDENCIES_2 = libsimd_3DNOW.la @CAN_COMPILE_SSE_TRUE@am__DEPENDENCIES_3 = libsimd_SSE.la @CAN_COMPILE_SSE2_TRUE@am__DEPENDENCIES_4 = libsimd_SSE2.la @CAN_COMPILE_ALTIVEC_TRUE@am__DEPENDENCIES_5 = libsimd_AVEC.la am__DEPENDENCIES_6 = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_2) \ $(am__DEPENDENCIES_3) $(am__DEPENDENCIES_4) \ $(am__DEPENDENCIES_5) simd_DEPENDENCIES = $(am__DEPENDENCIES_6) \ $(top_builddir)/libtv/libtv.la DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ SOURCES = $(libsimd_3DNOW_la_SOURCES) $(libsimd_AVEC_la_SOURCES) \ $(libsimd_MMX_la_SOURCES) $(libsimd_SSE_la_SOURCES) \ $(libsimd_SSE2_la_SOURCES) clear_image.c convert_image.c \ copy_image.c cpudt.c guard1.c guard2.c memcpy.c simd.c DIST_SOURCES = $(am__libsimd_3DNOW_la_SOURCES_DIST) \ $(am__libsimd_AVEC_la_SOURCES_DIST) \ $(am__libsimd_MMX_la_SOURCES_DIST) \ $(am__libsimd_SSE_la_SOURCES_DIST) \ $(am__libsimd_SSE2_la_SOURCES_DIST) clear_image.c \ convert_image.c copy_image.c cpudt.c guard1.c guard2.c \ memcpy.c simd.c ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ ARTS_CFLAGS = @ARTS_CFLAGS@ ARTS_LIBS = @ARTS_LIBS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BUILD_DEINTERLACE_PLUGIN_FALSE = @BUILD_DEINTERLACE_PLUGIN_FALSE@ BUILD_DEINTERLACE_PLUGIN_TRUE = @BUILD_DEINTERLACE_PLUGIN_TRUE@ BUILD_MAN_FALSE = @BUILD_MAN_FALSE@ BUILD_MAN_TRUE = @BUILD_MAN_TRUE@ CAN_COMPILE_3DNOW_FALSE = @CAN_COMPILE_3DNOW_FALSE@ CAN_COMPILE_3DNOW_TRUE = @CAN_COMPILE_3DNOW_TRUE@ CAN_COMPILE_ALTIVEC_FALSE = @CAN_COMPILE_ALTIVEC_FALSE@ CAN_COMPILE_ALTIVEC_TRUE = @CAN_COMPILE_ALTIVEC_TRUE@ CAN_COMPILE_MMX_FALSE = @CAN_COMPILE_MMX_FALSE@ CAN_COMPILE_MMX_TRUE = @CAN_COMPILE_MMX_TRUE@ CAN_COMPILE_SSE2_FALSE = @CAN_COMPILE_SSE2_FALSE@ CAN_COMPILE_SSE2_TRUE = @CAN_COMPILE_SSE2_TRUE@ CAN_COMPILE_SSE3_FALSE = @CAN_COMPILE_SSE3_FALSE@ CAN_COMPILE_SSE3_TRUE = @CAN_COMPILE_SSE3_TRUE@ CAN_COMPILE_SSE_FALSE = @CAN_COMPILE_SSE_FALSE@ CAN_COMPILE_SSE_TRUE = @CAN_COMPILE_SSE_TRUE@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCAS = @CCAS@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ COMMON_INCLUDES = @COMMON_INCLUDES@ CONSOLEHELPER_LOCATION = @CONSOLEHELPER_LOCATION@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFAULT_CFLAGS = @DEFAULT_CFLAGS@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ESD_LIBS = @ESD_LIBS@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ GCONF_SCHEMAS_INSTALL_FALSE = @GCONF_SCHEMAS_INSTALL_FALSE@ GCONF_SCHEMAS_INSTALL_TRUE = @GCONF_SCHEMAS_INSTALL_TRUE@ GCONF_SCHEMA_CONFIG_SOURCE = @GCONF_SCHEMA_CONFIG_SOURCE@ GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@ GDK_PIXBUF_CSOURCE = @GDK_PIXBUF_CSOURCE@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ HAVE_GCC_LIMITS_FALSE = @HAVE_GCC_LIMITS_FALSE@ HAVE_GCC_LIMITS_TRUE = @HAVE_GCC_LIMITS_TRUE@ HAVE_LIBZVBI_FALSE = @HAVE_LIBZVBI_FALSE@ HAVE_LIBZVBI_TRUE = @HAVE_LIBZVBI_TRUE@ HAVE_X86_FALSE = @HAVE_X86_FALSE@ HAVE_X86_TRUE = @HAVE_X86_TRUE@ HAVE_XMU_FALSE = @HAVE_XMU_FALSE@ HAVE_XMU_TRUE = @HAVE_XMU_TRUE@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ INTLTOOL_CAVES_RULE = @INTLTOOL_CAVES_RULE@ INTLTOOL_DESKTOP_RULE = @INTLTOOL_DESKTOP_RULE@ INTLTOOL_DIRECTORY_RULE = @INTLTOOL_DIRECTORY_RULE@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ INTLTOOL_ICONV = @INTLTOOL_ICONV@ INTLTOOL_KBD_RULE = @INTLTOOL_KBD_RULE@ INTLTOOL_KEYS_RULE = @INTLTOOL_KEYS_RULE@ INTLTOOL_MERGE = @INTLTOOL_MERGE@ INTLTOOL_MSGFMT = @INTLTOOL_MSGFMT@ INTLTOOL_MSGMERGE = @INTLTOOL_MSGMERGE@ INTLTOOL_OAF_RULE = @INTLTOOL_OAF_RULE@ INTLTOOL_PERL = @INTLTOOL_PERL@ INTLTOOL_PONG_RULE = @INTLTOOL_PONG_RULE@ INTLTOOL_PROP_RULE = @INTLTOOL_PROP_RULE@ INTLTOOL_SCHEMAS_RULE = @INTLTOOL_SCHEMAS_RULE@ INTLTOOL_SERVER_RULE = @INTLTOOL_SERVER_RULE@ INTLTOOL_SHEET_RULE = @INTLTOOL_SHEET_RULE@ INTLTOOL_SOUNDLIST_RULE = @INTLTOOL_SOUNDLIST_RULE@ INTLTOOL_THEME_RULE = @INTLTOOL_THEME_RULE@ INTLTOOL_UI_RULE = @INTLTOOL_UI_RULE@ INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ INTLTOOL_XAM_RULE = @INTLTOOL_XAM_RULE@ INTLTOOL_XGETTEXT = @INTLTOOL_XGETTEXT@ INTLTOOL_XML_NOMERGE_RULE = @INTLTOOL_XML_NOMERGE_RULE@ INTLTOOL_XML_RULE = @INTLTOOL_XML_RULE@ JPEG_LIB = @JPEG_LIB@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBXML_CFLAGS = @LIBXML_CFLAGS@ LIBXML_LIBS = @LIBXML_LIBS@ LIRC_LIB = @LIRC_LIB@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAKEINFO = @MAKEINFO@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ NEED_ZSFB_FALSE = @NEED_ZSFB_FALSE@ NEED_ZSFB_TRUE = @NEED_ZSFB_TRUE@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_CFLAGS = @PACKAGE_CFLAGS@ PACKAGE_LIBS = @PACKAGE_LIBS@ PACKAGE_LIB_DIR = @PACKAGE_LIB_DIR@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_PIXMAPS_DIR = @PACKAGE_PIXMAPS_DIR@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PACKAGE_VERSION_ID = @PACKAGE_VERSION_ID@ PATH_SEPARATOR = @PATH_SEPARATOR@ PG_CFLAGS = @PG_CFLAGS@ PKG_CONFIG = @PKG_CONFIG@ PLUGIN_DEFAULT_DIR = @PLUGIN_DEFAULT_DIR@ PLUGIN_DEFAULT_FLAGS = @PLUGIN_DEFAULT_FLAGS@ PNG_LIBS = @PNG_LIBS@ POFILES = @POFILES@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ PYTHON_LIBS = @PYTHON_LIBS@ PY_CFLAGS = @PY_CFLAGS@ PY_EXTRA_LIBS = @PY_EXTRA_LIBS@ PY_LIBS = @PY_LIBS@ PY_LIB_LOC = @PY_LIB_LOC@ RANLIB = @RANLIB@ RTE_LIBS = @RTE_LIBS@ SCROLLKEEPER_BUILD_REQUIRED = @SCROLLKEEPER_BUILD_REQUIRED@ SCROLLKEEPER_CONFIG = @SCROLLKEEPER_CONFIG@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ SUID_ZSFB_FALSE = @SUID_ZSFB_FALSE@ SUID_ZSFB_TRUE = @SUID_ZSFB_TRUE@ UNICODE_CFLAGS = @UNICODE_CFLAGS@ UNICODE_LIBS = @UNICODE_LIBS@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ WARN_CFLAGS = @WARN_CFLAGS@ XGETTEXT = @XGETTEXT@ XMLCATALOG = @XMLCATALOG@ XML_CATALOG_FILE = @XML_CATALOG_FILE@ XSLTPROC = @XSLTPROC@ X_CFLAGS = @X_CFLAGS@ X_DPMS_LIBS = @X_DPMS_LIBS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ X_XF86DGA_LIBS = @X_XF86DGA_LIBS@ X_XF86VMODE_LIBS = @X_XF86VMODE_LIBS@ X_XINERAMA_LIBS = @X_XINERAMA_LIBS@ X_XMU_LIBS = @X_XMU_LIBS@ X_XV_LIBS = @X_XV_LIBS@ ZSFB_GROUP = @ZSFB_GROUP@ ZSFB_OWNER = @ZSFB_OWNER@ ZVBI_CFLAGS = @ZVBI_CFLAGS@ ZVBI_LIBS = @ZVBI_LIBS@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_STRIP = @ac_ct_STRIP@ ac_pt_PKG_CONFIG = @ac_pt_PKG_CONFIG@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ datadir = @datadir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ python_val = @python_val@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ TESTS = guard1 guard2 clear_image convert_image copy_image memcpy \ $(am__append_1) $(am__append_3) $(am__append_5) \ $(am__append_7) $(am__append_9) XFAIL_TESTS = guard1 guard2 EXTRA_DIST = \ clear_image-altivec.sh \ clear_image-mmx.sh \ clear_image-sse.sh \ convert_image-mmx.sh \ copy_image-altivec.sh \ copy_image-mmx.sh \ copy_image-sse.sh \ guard.h \ memcpy-mmx.sh \ memcpy-sse.sh \ pixel.h \ simd-3dnow.sh \ simd-altivec.sh \ simd-emu.sh \ simd-mmx.sh \ simd-sse.sh \ simd-sse2.sh INCLUDES = -I$(top_srcdir) SIMD_CFLAGS = -O3 -fomit-frame-pointer SIMD_SOURCES = simd.c SIMD_LIBS = $(am__append_2) $(am__append_4) $(am__append_6) \ $(am__append_8) $(am__append_10) @CAN_COMPILE_MMX_TRUE@libsimd_MMX_la_CFLAGS = $(SIMD_CFLAGS) -mmmx -DSIMD=CPU_FEATURE_MMX @CAN_COMPILE_MMX_TRUE@libsimd_MMX_la_SOURCES = $(SIMD_SOURCES) @CAN_COMPILE_3DNOW_TRUE@libsimd_3DNOW_la_CFLAGS = $(SIMD_CFLAGS) -m3dnow -DSIMD=CPU_FEATURE_3DNOW @CAN_COMPILE_3DNOW_TRUE@libsimd_3DNOW_la_SOURCES = $(SIMD_SOURCES) @CAN_COMPILE_SSE_TRUE@libsimd_SSE_la_CFLAGS = $(SIMD_CFLAGS) -msse -DSIMD=CPU_FEATURE_SSE_INT @CAN_COMPILE_SSE_TRUE@libsimd_SSE_la_SOURCES = $(SIMD_SOURCES) @CAN_COMPILE_SSE2_TRUE@libsimd_SSE2_la_CFLAGS = $(SIMD_CFLAGS) -msse2 -DSIMD=CPU_FEATURE_SSE2 @CAN_COMPILE_SSE2_TRUE@libsimd_SSE2_la_SOURCES = $(SIMD_SOURCES) @CAN_COMPILE_ALTIVEC_TRUE@libsimd_AVEC_la_CFLAGS = $(SIMD_CFLAGS) \ @CAN_COMPILE_ALTIVEC_TRUE@ -maltivec -mabi=altivec -DSIMD=CPU_FEATURE_ALTIVEC @CAN_COMPILE_ALTIVEC_TRUE@libsimd_AVEC_la_SOURCES = $(SIMD_SOURCES) noinst_LTLIBRARIES = $(SIMD_LIBS) convert_image_LDADD = \ -lm \ $(top_builddir)/libtv/libtv.la copy_image_LDADD = \ $(top_builddir)/libtv/libtv.la check_SCRIPTS = \ simd-emu.sh simd_LDADD = \ $(SIMD_LIBS) \ $(top_builddir)/libtv/libtv.la LDADD = \ $(top_builddir)/libtv/libtv.la all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu test/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu test/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libsimd_3DNOW.la: $(libsimd_3DNOW_la_OBJECTS) $(libsimd_3DNOW_la_DEPENDENCIES) $(LINK) $(am_libsimd_3DNOW_la_rpath) $(libsimd_3DNOW_la_LDFLAGS) $(libsimd_3DNOW_la_OBJECTS) $(libsimd_3DNOW_la_LIBADD) $(LIBS) libsimd_AVEC.la: $(libsimd_AVEC_la_OBJECTS) $(libsimd_AVEC_la_DEPENDENCIES) $(LINK) $(am_libsimd_AVEC_la_rpath) $(libsimd_AVEC_la_LDFLAGS) $(libsimd_AVEC_la_OBJECTS) $(libsimd_AVEC_la_LIBADD) $(LIBS) libsimd_MMX.la: $(libsimd_MMX_la_OBJECTS) $(libsimd_MMX_la_DEPENDENCIES) $(LINK) $(am_libsimd_MMX_la_rpath) $(libsimd_MMX_la_LDFLAGS) $(libsimd_MMX_la_OBJECTS) $(libsimd_MMX_la_LIBADD) $(LIBS) libsimd_SSE.la: $(libsimd_SSE_la_OBJECTS) $(libsimd_SSE_la_DEPENDENCIES) $(LINK) $(am_libsimd_SSE_la_rpath) $(libsimd_SSE_la_LDFLAGS) $(libsimd_SSE_la_OBJECTS) $(libsimd_SSE_la_LIBADD) $(LIBS) libsimd_SSE2.la: $(libsimd_SSE2_la_OBJECTS) $(libsimd_SSE2_la_DEPENDENCIES) $(LINK) $(am_libsimd_SSE2_la_rpath) $(libsimd_SSE2_la_LDFLAGS) $(libsimd_SSE2_la_OBJECTS) $(libsimd_SSE2_la_LIBADD) $(LIBS) clean-checkPROGRAMS: @list='$(check_PROGRAMS)'; for p in $$list; do \ f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ echo " rm -f $$p $$f"; \ rm -f $$p $$f ; \ done clear_image$(EXEEXT): $(clear_image_OBJECTS) $(clear_image_DEPENDENCIES) @rm -f clear_image$(EXEEXT) $(LINK) $(clear_image_LDFLAGS) $(clear_image_OBJECTS) $(clear_image_LDADD) $(LIBS) convert_image$(EXEEXT): $(convert_image_OBJECTS) $(convert_image_DEPENDENCIES) @rm -f convert_image$(EXEEXT) $(LINK) $(convert_image_LDFLAGS) $(convert_image_OBJECTS) $(convert_image_LDADD) $(LIBS) copy_image$(EXEEXT): $(copy_image_OBJECTS) $(copy_image_DEPENDENCIES) @rm -f copy_image$(EXEEXT) $(LINK) $(copy_image_LDFLAGS) $(copy_image_OBJECTS) $(copy_image_LDADD) $(LIBS) cpudt$(EXEEXT): $(cpudt_OBJECTS) $(cpudt_DEPENDENCIES) @rm -f cpudt$(EXEEXT) $(LINK) $(cpudt_LDFLAGS) $(cpudt_OBJECTS) $(cpudt_LDADD) $(LIBS) guard1$(EXEEXT): $(guard1_OBJECTS) $(guard1_DEPENDENCIES) @rm -f guard1$(EXEEXT) $(LINK) $(guard1_LDFLAGS) $(guard1_OBJECTS) $(guard1_LDADD) $(LIBS) guard2$(EXEEXT): $(guard2_OBJECTS) $(guard2_DEPENDENCIES) @rm -f guard2$(EXEEXT) $(LINK) $(guard2_LDFLAGS) $(guard2_OBJECTS) $(guard2_LDADD) $(LIBS) memcpy$(EXEEXT): $(memcpy_OBJECTS) $(memcpy_DEPENDENCIES) @rm -f memcpy$(EXEEXT) $(LINK) $(memcpy_LDFLAGS) $(memcpy_OBJECTS) $(memcpy_LDADD) $(LIBS) simd$(EXEEXT): $(simd_OBJECTS) $(simd_DEPENDENCIES) @rm -f simd$(EXEEXT) $(LINK) $(simd_LDFLAGS) $(simd_OBJECTS) $(simd_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/clear_image.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/convert_image.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/copy_image.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpudt.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/guard1.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/guard2.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsimd_3DNOW_la-simd.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsimd_AVEC_la-simd.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsimd_MMX_la-simd.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsimd_SSE2_la-simd.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsimd_SSE_la-simd.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/memcpy.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/simd.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< libsimd_3DNOW_la-simd.lo: simd.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsimd_3DNOW_la_CFLAGS) $(CFLAGS) -MT libsimd_3DNOW_la-simd.lo -MD -MP -MF "$(DEPDIR)/libsimd_3DNOW_la-simd.Tpo" -c -o libsimd_3DNOW_la-simd.lo `test -f 'simd.c' || echo '$(srcdir)/'`simd.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libsimd_3DNOW_la-simd.Tpo" "$(DEPDIR)/libsimd_3DNOW_la-simd.Plo"; else rm -f "$(DEPDIR)/libsimd_3DNOW_la-simd.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='simd.c' object='libsimd_3DNOW_la-simd.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsimd_3DNOW_la_CFLAGS) $(CFLAGS) -c -o libsimd_3DNOW_la-simd.lo `test -f 'simd.c' || echo '$(srcdir)/'`simd.c libsimd_AVEC_la-simd.lo: simd.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsimd_AVEC_la_CFLAGS) $(CFLAGS) -MT libsimd_AVEC_la-simd.lo -MD -MP -MF "$(DEPDIR)/libsimd_AVEC_la-simd.Tpo" -c -o libsimd_AVEC_la-simd.lo `test -f 'simd.c' || echo '$(srcdir)/'`simd.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libsimd_AVEC_la-simd.Tpo" "$(DEPDIR)/libsimd_AVEC_la-simd.Plo"; else rm -f "$(DEPDIR)/libsimd_AVEC_la-simd.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='simd.c' object='libsimd_AVEC_la-simd.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsimd_AVEC_la_CFLAGS) $(CFLAGS) -c -o libsimd_AVEC_la-simd.lo `test -f 'simd.c' || echo '$(srcdir)/'`simd.c libsimd_MMX_la-simd.lo: simd.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsimd_MMX_la_CFLAGS) $(CFLAGS) -MT libsimd_MMX_la-simd.lo -MD -MP -MF "$(DEPDIR)/libsimd_MMX_la-simd.Tpo" -c -o libsimd_MMX_la-simd.lo `test -f 'simd.c' || echo '$(srcdir)/'`simd.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libsimd_MMX_la-simd.Tpo" "$(DEPDIR)/libsimd_MMX_la-simd.Plo"; else rm -f "$(DEPDIR)/libsimd_MMX_la-simd.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='simd.c' object='libsimd_MMX_la-simd.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsimd_MMX_la_CFLAGS) $(CFLAGS) -c -o libsimd_MMX_la-simd.lo `test -f 'simd.c' || echo '$(srcdir)/'`simd.c libsimd_SSE_la-simd.lo: simd.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsimd_SSE_la_CFLAGS) $(CFLAGS) -MT libsimd_SSE_la-simd.lo -MD -MP -MF "$(DEPDIR)/libsimd_SSE_la-simd.Tpo" -c -o libsimd_SSE_la-simd.lo `test -f 'simd.c' || echo '$(srcdir)/'`simd.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libsimd_SSE_la-simd.Tpo" "$(DEPDIR)/libsimd_SSE_la-simd.Plo"; else rm -f "$(DEPDIR)/libsimd_SSE_la-simd.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='simd.c' object='libsimd_SSE_la-simd.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsimd_SSE_la_CFLAGS) $(CFLAGS) -c -o libsimd_SSE_la-simd.lo `test -f 'simd.c' || echo '$(srcdir)/'`simd.c libsimd_SSE2_la-simd.lo: simd.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsimd_SSE2_la_CFLAGS) $(CFLAGS) -MT libsimd_SSE2_la-simd.lo -MD -MP -MF "$(DEPDIR)/libsimd_SSE2_la-simd.Tpo" -c -o libsimd_SSE2_la-simd.lo `test -f 'simd.c' || echo '$(srcdir)/'`simd.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libsimd_SSE2_la-simd.Tpo" "$(DEPDIR)/libsimd_SSE2_la-simd.Plo"; else rm -f "$(DEPDIR)/libsimd_SSE2_la-simd.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='simd.c' object='libsimd_SSE2_la-simd.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsimd_SSE2_la_CFLAGS) $(CFLAGS) -c -o libsimd_SSE2_la-simd.lo `test -f 'simd.c' || echo '$(srcdir)/'`simd.c mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool uninstall-info-am: ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags check-TESTS: $(TESTS) @failed=0; all=0; xfail=0; xpass=0; skip=0; \ srcdir=$(srcdir); export srcdir; \ list='$(TESTS)'; \ if test -n "$$list"; then \ for tst in $$list; do \ if test -f ./$$tst; then dir=./; \ elif test -f $$tst; then dir=; \ else dir="$(srcdir)/"; fi; \ if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ *" $$tst "*) \ xpass=`expr $$xpass + 1`; \ failed=`expr $$failed + 1`; \ echo "XPASS: $$tst"; \ ;; \ *) \ echo "PASS: $$tst"; \ ;; \ esac; \ elif test $$? -ne 77; then \ all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ *" $$tst "*) \ xfail=`expr $$xfail + 1`; \ echo "XFAIL: $$tst"; \ ;; \ *) \ failed=`expr $$failed + 1`; \ echo "FAIL: $$tst"; \ ;; \ esac; \ else \ skip=`expr $$skip + 1`; \ echo "SKIP: $$tst"; \ fi; \ done; \ if test "$$failed" -eq 0; then \ if test "$$xfail" -eq 0; then \ banner="All $$all tests passed"; \ else \ banner="All $$all tests behaved as expected ($$xfail expected failures)"; \ fi; \ else \ if test "$$xpass" -eq 0; then \ banner="$$failed of $$all tests failed"; \ else \ banner="$$failed of $$all tests did not behave as expected ($$xpass unexpected passes)"; \ fi; \ fi; \ dashes="$$banner"; \ skipped=""; \ if test "$$skip" -ne 0; then \ skipped="($$skip tests were not run)"; \ test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ dashes="$$skipped"; \ fi; \ report=""; \ if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ report="Please report to $(PACKAGE_BUGREPORT)"; \ test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ dashes="$$report"; \ fi; \ dashes=`echo "$$dashes" | sed s/./=/g`; \ echo "$$dashes"; \ echo "$$banner"; \ test -z "$$skipped" || echo "$$skipped"; \ test -z "$$report" || echo "$$report"; \ echo "$$dashes"; \ test "$$failed" -eq 0; \ else :; fi distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) $(check_SCRIPTS) $(MAKE) $(AM_MAKEFLAGS) check-TESTS check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ clean-noinstLTLIBRARIES mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-libtool distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-exec-am: install-info: install-info-am install-man: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-info-am .PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ clean-checkPROGRAMS clean-generic clean-libtool \ clean-noinstLTLIBRARIES ctags distclean distclean-compile \ distclean-generic distclean-libtool distclean-tags distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-exec install-exec-am \ install-info install-info-am install-man install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags uninstall uninstall-am uninstall-info-am simd-emu.sh: $(MAKE) cpudt memcpy-mmx.sh \ memcpy-sse.sh \ memcpy-altivec.sh: $(MAKE) memcpy clear_image-mmx.sh \ clear_image-sse.sh \ clear_image-altivec.sh: $(MAKE) clear_image convert_image-mmx.sh \ convert_image-3dnow.sh \ convert_image-sse.sh \ convert_image-sse2.sh \ convert_image-altivec.sh: $(MAKE) convert_image copy_image-mmx.sh \ copy_image-sse.sh \ copy_image-altivec.sh: $(MAKE) copy_image simd-mmx.sh \ simd-3dnow.sh \ simd-sse.sh \ simd-sse2.sh \ simd-altivec.sh: $(MAKE) simd # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: zapping-0.10cvs6/test/guard1.c 644 764 144 1761 10156557021 11322 /* * Copyright (C) 2004 Michael H. Schimek * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* $Id: guard1.c,v 1.1 2004/12/11 11:46:25 mschimek Exp $ */ #include "guard.h" int main (int argc, char ** argv) { char *buffer; (void) argc; (void) argv; buffer = guard_alloc (1 << 20); ++buffer[-1]; return EXIT_SUCCESS; } zapping-0.10cvs6/test/guard2.c 644 764 144 1765 10156557021 11327 /* * Copyright (C) 2004 Michael H. Schimek * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* $Id: guard2.c,v 1.1 2004/12/11 11:46:25 mschimek Exp $ */ #include "guard.h" int main (int argc, char ** argv) { char *buffer; (void) argc; (void) argv; buffer = guard_alloc (1 << 20); ++buffer[1 << 20]; return EXIT_SUCCESS; } zapping-0.10cvs6/test/clear_image-altivec.sh 755 764 144 221 10417056140 14151 #!/bin/sh . `dirname $0`/simd-emu.sh if ! find_emulator altivec; then exit 77 else LD_PRELOAD=$pre $emu ./clear_image altivec exit $? fi zapping-0.10cvs6/test/simd.c 644 764 144 20647 10417055361 11117 /* * Copyright (C) 2004 Michael H. Schimek * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* $Id: simd.c,v 1.4 2006/04/12 01:42:09 mschimek Exp $ */ #ifdef HAVE_CONFIG_H # include "config.h" #endif #undef NDEBUG #include #include #include #include "libtv/simd.h" typedef void test_fn (void); SIMD_FN_PROTOS (test_fn, test); #if SIMD union va { uint8_t a8[sizeof (vu8) / 1]; uint8_t au8[sizeof (vu8) / 1]; uint16_t a16[sizeof (vu8) / 2]; uint16_t au16[sizeof (vu8) / 2]; uint32_t a32[sizeof (vu8) / 4]; uint32_t au32[sizeof (vu8) / 4]; }; #define PASS(type, scalar, vector) \ do { \ union va x; \ v ## type y; \ unsigned int i; \ for (i = 0; i < sizeof (vu8) / sizeof (x.a ## type [0]); ++i) \ x.a ## type [i] = (scalar); \ y = (vector); \ assert (((void) #vector, \ 0 == memcmp (x.a ## type, &y, sizeof (y)))); \ } while (0) #define PASS3(scalar, vector) \ do { \ PASS (8, scalar, vector ## 8 (va8, vb8)); \ PASS (16, scalar, vector ## 16 (va16, vb16)); \ PASS (32, scalar, vector ## 32 (va32, vb32)); \ } while (0) #define FAIL(type, scalar, vector) \ do { \ union va x; \ v ## type y; \ unsigned int i; \ for (i = 0; i < sizeof (vu8) / sizeof (x.a ## type [0]); ++i) \ x.a ## type [i] = scalar; \ y = vector; \ assert (((void) #vector, \ 0 != memcmp (x.a ## type, &y, sizeof (y)))); \ } while (0) #define MIN(n, max) (((n) < (max)) ? (n) : (max)) #define MAX(n, min) (((n) > (min)) ? (n) : (min)) /* Note that we always clip against both bounds as SIMD does. An if-else-else yields different results when max < min. */ #define SATURATE(n, min, max) MIN (MAX (n, min), max) #define SAT8(n) SATURATE (n, -0x80, 0x7F) #define SATU8(n) SATURATE (n, 0, 0xFF) #define SAT16(n) SATURATE (n, -0x8000, 0x7FFF) #define SATU16(n) SATURATE (n, 0, 0xFFFF) #define SAT32(n) SATURATE (n, -0x8000000, 0x7FFFFFFF) #define SATU32(n) SATURATE (n, 0, 0xFFFFFFFFU) void SIMD_NAME (test) (void) { unsigned int i; for (i = 0; i < 1000; ++i) { unsigned int a, b, c; int8_t sa8, sb8, sc8; uint8_t sau8, sbu8, scu8; int16_t sa16, sb16, sc16; uint16_t sau16, sbu16, scu16; int32_t sa32, sb32, sc32; uint32_t sau32, sbu32, scu32; v8 va8, vb8, vc8; v16 va16, vb16, vc16; v32 va32, vb32, vc32; vu8 vau8, vbu8, vcu8; vu16 vau16, vbu16, vcu16; vu32 vau32, vbu32, vcu32; a = rand (); b = rand (); c = rand (); sa8 = (int8_t) a; sb8 = (int8_t) b; sc8 = (int8_t) c; sau8 = (uint8_t) a; sbu8 = (uint8_t) b; scu8 = (uint8_t) c; sa16 = (int16_t) a; sb16 = (int16_t) b; sc16 = (int16_t) c; sau16 = (uint16_t) a; sbu16 = (uint16_t) b; scu16 = (uint16_t) c; sa32 = (int32_t) a; sb32 = (int32_t) b; sc32 = (int32_t) c; sau32 = (uint32_t) a; sbu32 = (uint32_t) b; scu32 = (uint32_t) c; va8 = vsplat8 (a); vb8 = vsplat8 (b); vc8 = vsplat8 (c); vau8 = vsplatu8 (a); vbu8 = vsplatu8 (b); vcu8 = vsplatu8 (c); va16 = vsplat16 (a); vb16 = vsplat16 (b); vc16 = vsplat16 (c); vau16 = vsplatu16 (a); vbu16 = vsplatu16 (b); vcu16 = vsplatu16 (c); va32 = vsplat32 (a); vb32 = vsplat32 (b); vc32 = vsplat32 (c); vau32 = vsplatu32 (a); vbu32 = vsplatu32 (b); vcu32 = vsplatu32 (c); /* Make sure the simd macros do what I think they do. */ PASS (u8, a, vau8); FAIL (u8, ~a, vau8); PASS (8, 0, vzero8 ()); PASS (16, 0, vzero16 ()); PASS (32, 0, vzero32 ()); PASS (u8, 0, vzerou8 ()); PASS (u16, 0, vzerou16 ()); PASS (u32, 0, vzerou32 ()); #if 1 PASS (8, -1, vminus18 ()); PASS (16, -1, vminus116 ()); PASS (32, -1, vminus132 ()); PASS (8, 1, vsplat8_1); PASS (8, -1, vsplat8_m1); PASS (8, 15, vsplat8_15); PASS (8, 127, vsplat8_127); PASS (16, 255, vsplat16_255); PASS (16, 256, vsplat16_256); PASS (16, -256, vsplat16_m256); PASS (32, 1, vsplat32_1); PASS (32, 2, vsplat32_2); // vsplat8,16,32,u,i // vload,32,64,u,nt // vstore,u,nt PASS (u8, a & b, vand (vau8, vbu8)); PASS (u8, a & ~b, vandnot (vau8, vbu8)); PASS (u8, a | b, vor (vau8, vbu8)); PASS (u8, a ^ b, vxor (vau8, vbu8)); PASS (u8, ~a, vnot (vau8)); PASS (u8, ~(a & b), vnand (vau8, vbu8)); PASS (u8, ~(a | b), vnor (vau8, vbu8)); PASS (u8, (b & a) | (c & ~a), vsel (vau8, vbu8, vcu8)); // vsl, vsru PASS (8, sa8 << 1, vsl18 (va8)); PASS (8, sa8 >> 1, vsr18 (va8)); PASS (u8, sau8 >> 1, vsr1u8 (vau8)); PASS (16, sa16 << 7, vsl16 (va16, 7)); PASS (16, sa16 >> 7, vsr16 (va16, 7)); PASS (u16, sau16 >> 7, vsru16 (vau16, 7)); #if !(SIMD & CPU_FEATURE_ALTIVEC) PASS (16, sa16 << (sb8 & 15), vsl16 (va16, (sb8 & 15))); PASS (16, sa16 >> (sb8 & 15), vsr16 (va16, (sb8 & 15))); PASS (u16, sau16 >> (sb8 & 15), vsru16 (vau16, (sb8 & 15))); #endif // vlsr // vshiftu2x #if SIMD & (CPU_FEATURE_SSE_INT |CPU_FEATURE_SSE2 | CPU_FEATURE_SSE3) // unpack #endif PASS3 (a + b, vadd); PASS3 (a - b, vsub); PASS (16, SAT16 (sa16 + sb16), vadds16 (va16, vb16)); PASS (16, SAT16 (sa16 - sb16), vsubs16 (va16, vb16)); PASS (u8, SATU8 (sau8 + sbu8), vaddsu8 (vau8, vbu8)); PASS (u8, SATU8 (sau8 - sbu8), vsubsu8 (vau8, vbu8)); PASS (u16, SATU16 (sau16 + sbu16), vaddsu16 (vau16, vbu16)); PASS (u16, SATU16 (sau16 - sbu16), vsubsu16 (vau16, vbu16)); PASS (u8, SATURATE (sau8, sbu8, scu8), vsatu8 (vau8, vbu8, vcu8)); PASS (8, 0 - (sa8 == sb8), (v8) vcmpeq8 (va8, vb8)); PASS (16, 0 - (sa16 == sb16), (v16) vcmpeq16 (va16, vb16)); PASS (32, 0 - (sa32 == sb32), (v32) vcmpeq32 (va32, vb32)); PASS (8, 0 - (0 == sb8), (v8) vcmpz8 (vb8)); PASS (16, 0 - (0 == sb16), (v16) vcmpz16 (vb16)); PASS (32, 0 - (0 == sb32), (v32) vcmpz32 (vb32)); PASS (8, 0 - (0 != sb8), (v8) vcmpnz8 (vb8)); PASS (16, 0 - (0 != sb16), (v16) vcmpnz16 (vb16)); PASS (32, 0 - (0 != sb32), (v32) vcmpnz32 (vb32)); PASS (8, 0 - (sa8 > sb8), (v8) vcmpgt8 (va8, vb8)); PASS (16, 0 - (sa16 > sb16), (v16) vcmpgt16 (va16, vb16)); PASS (32, 0 - (sa32 > sb32), (v32) vcmpgt32 (va32, vb32)); PASS (8, 0 - (sa8 < sb8), (v8) vcmplt8 (va8, vb8)); PASS (16, 0 - (sa16 < sb16), (v16) vcmplt16 (va16, vb16)); PASS (32, 0 - (sa32 < sb32), (v32) vcmplt32 (va32, vb32)); PASS (8, 0 - (sau8 >= sbu8), (v8) vcmpgeu8 (vau8, vbu8)); PASS (8, 0 - (sau8 <= sbu8), (v8) vcmpleu8 (vau8, vbu8)); PASS (u16, (a * b) & 0xFFFF, vmullo16 (va16, vb16)); PASS (u8, abs (sau8 - sbu8), vabsdiffu8 (vau8, vbu8)); PASS (u8, (sau8 + sbu8 + 1) / 2, vavgu8 (vau8, vbu8)); #if SIMD == CPU_FEATURE_MMX PASS (u8, (sau8 / 2) + (sbu8 / 2), fast_vavgu8 (vau8, vbu8)); #else PASS (u8, (sau8 + sbu8 + 1) / 2, fast_vavgu8 (vau8, vbu8)); #endif #endif PASS (u8, (sau8 > sbu8) ? a : b, vmaxu8 (vau8, vbu8)); PASS (u8, (sau8 < sbu8) ? a : b, vminu8 (vau8, vbu8)); { vu8 min, max, x; unsigned int i; vminmaxu8 (&min, &max, vau8, vbu8); i = (sau8 < sbu8) ? a : b; x = vsplatu8 (i); assert (0 == memcmp (&x, &min, sizeof (x))); i = (sau8 > sbu8) ? a : b; x = vsplatu8 (i); assert (0 == memcmp (&x, &max, sizeof (x))); } #if SIMD & (CPU_FEATURE_MMX | CPU_FEATURE_3DNOW) PASS (u16, 0, vminu16i (va16, 0)); PASS (u16, (sau16 < 1234) ? a : 1234, vminu16i (va16, 1234)); PASS (u16, (sau16 < 65535) ? a : 65535, vminu16i (va16, 65535)); #else PASS (16, (sa16 > sb16) ? a : b, vmax16 (va16, vb16)); PASS (16, (sa16 < sb16) ? a : b, vmin16 (va16, vb16)); #endif vempty (); } } #else /* !SIMD */ int main (int argc, char ** argv) { test_fn *testp; assert (2 == argc); cpu_features = cpu_feature_set_from_string (argv[1]); testp = SIMD_FN_SELECT (test, CPU_FEATURE_MMX | CPU_FEATURE_3DNOW | CPU_FEATURE_SSE_INT | CPU_FEATURE_SSE2 | CPU_FEATURE_ALTIVEC); assert (NULL != testp); testp (); return EXIT_SUCCESS; } #endif /* !SIMD */ zapping-0.10cvs6/test/guard.h 644 764 144 5653 10400112750 11236 /* * Copyright (C) 2004 Michael H. Schimek * * Based on efence (C) Bruce Perens * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* $Id: guard.h,v 1.4 2006/02/25 17:37:44 mschimek Exp $ */ #undef NDEBUG #include #include #include #include #include #include #include #include #include #ifdef MAP_ANONYMOUS # define HAVE_MAP_ANONYMOUS 1 /* 386 BSD has MAP_ANON instead of MAP_ANONYMOUS. */ #elif defined (MAP_ANON) # define MAP_ANONYMOUS MAP_ANON # define HAVE_MAP_ANONYMOUS 1 #else # define HAVE_MAP_ANONYMOUS 0 #endif static int dev_zero (void) { static int fd = -1; if (-1 != fd) return fd; fd = open ("/dev/zero", O_RDWR); if (-1 == fd) { fprintf (stderr, "Could not open /dev/zero: %d, %s\n", errno, strerror (errno)); exit (EXIT_FAILURE); } return fd; } static void make_unwriteable (void * p, size_t n_bytes) { size_t page_size; int r; page_size = getpagesize (); assert (0 == (unsigned long) p % page_size); assert (0 == n_bytes % page_size); r = mprotect (p, n_bytes, PROT_READ); assert (-1 != r); } static void make_inaccessible (void * p, size_t n_bytes) { size_t page_size; int r; page_size = getpagesize (); assert (0 == (unsigned long) p % page_size); assert (0 == n_bytes % page_size); r = mprotect (p, n_bytes, PROT_NONE); assert (-1 != r); } /* Allocates a block of memory surrounded by an inaccessible guard area. n_bytes must be page aligned. */ static void * guard_alloc (size_t n_bytes) { size_t page_size; char *p; page_size = getpagesize (); assert (0 == n_bytes % page_size); if (HAVE_MAP_ANONYMOUS) { p = mmap (/* start: any */ NULL, n_bytes * 3, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS, /* fd: n/a */ -1, /* offset */ 0); } else { p = mmap (/* start: any */ NULL, n_bytes * 3, PROT_READ | PROT_WRITE, MAP_PRIVATE, dev_zero (), /* offset */ 0); } if (MAP_FAILED == p) { fprintf (stderr, "Guarded memory allocation failed: %d, %s\n", errno, strerror (errno)); exit (EXIT_FAILURE); } make_inaccessible (p, n_bytes); p += n_bytes; assert (0 == (unsigned long) p % 16); make_inaccessible (p + n_bytes, n_bytes); return p; } zapping-0.10cvs6/test/memcpy-mmx.sh 755 764 144 204 10263052714 12370 #!/bin/sh . `dirname $0`/simd-emu.sh if ! find_emulator mmx; then exit 77 else LD_PRELOAD=$pre $emu ./memcpy mmx exit $? fi zapping-0.10cvs6/test/clear_image.c 644 764 144 11163 10260121544 12375 /* * Copyright (C) 2004 Michael H. Schimek * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* $Id: clear_image.c,v 1.5 2005/06/28 01:09:56 mschimek Exp $ */ #undef NDEBUG #include "libtv/cpu.h" #include "pixel.h" #include "guard.h" static uint8_t * buffer; static uint8_t * buffer_end; static tv_image_format format; static unsigned int format_packed_size (void) { if (0 == format.width || 0 == format.height) return 0; return format.offset[0] + format.bytes_per_line[0] * (format.height - 1) + ((format.width * format.pixel_format->bits_per_pixel) >> 3); } static void test_packed (uint8_t * d, uint8_t * end) { unsigned int x; unsigned int y; unsigned int bpp; uint8_t *s; tv_bool r; if (0) { _tv_image_format_dump (&format, stderr); fputc ('\n', stderr); } s = d + format.offset[0]; if (end > s) memset (s, 0xAA, end - s); r = tv_clear_image (d, &format); if ((TV_PIXFMT_SET (format.pixel_format->pixfmt) & TV_PIXFMT_SET_YUV16) && (format.width & 1)) { /* Permutations of YUYV. */ assert (!r); return; } else { assert (r); } bpp = format.pixel_format->bits_per_pixel >> 3; for (y = 0; y < format.height; ++y) { if (TV_PIXFMT_YUYV == format.pixel_format->pixfmt || TV_PIXFMT_YVYU == format.pixel_format->pixfmt) { for (x = 0; x < format.width; ++x) { assert (0x00 == *s++); assert (0x80 == *s++); } } else if (TV_PIXFMT_UYVY == format.pixel_format->pixfmt || TV_PIXFMT_VYUY == format.pixel_format->pixfmt) { for (x = 0; x < format.width; ++x) { assert (0x80 == *s++); assert (0x00 == *s++); } } else if (TV_PIXFMT_IS_YUV (format.pixel_format->pixfmt)) { for (x = 0; x < format.width; ++x, s += bpp) assert (0x00808000 == get_packed_pixel (s, format.pixel_format->pixfmt)); } else { for (x = 0; x < format.width; ++x, s += bpp) assert (0x00000000 == get_packed_pixel (s, format.pixel_format->pixfmt)); } if (s < end) for (x = format.width * bpp; x < format.bytes_per_line[0]; ++x) assert (0xAA == *s++); } } static void test_planar (void) { } static void test_packed1 (void) { tv_pixfmt pixfmt; if (1) { fputc ('.', stderr); fflush (stderr); } for (pixfmt = 0; pixfmt < TV_MAX_PIXFMTS; ++pixfmt) { unsigned int bpp; if (!TV_PIXFMT_IS_PACKED (pixfmt)) continue; format.pixel_format = tv_pixel_format_from_pixfmt (pixfmt); if (0) fprintf (stderr, "%s\n", format.pixel_format->name); bpp = format.pixel_format->bits_per_pixel >> 3; format.bytes_per_line[0] = format.width * bpp; for (format.offset[0] = 0; format.offset[0] < 17; ++format.offset[0]) { format.size = format_packed_size (); test_packed (buffer - format.offset[0], buffer - format.offset[0] + format.size); } format.offset[0] = 0; for (format.bytes_per_line[0] = format.width * bpp; format.bytes_per_line[0] < (format.width + 33) * bpp; ++format.bytes_per_line[0]) { format.size = format_packed_size (); test_packed (buffer_end - format.size, buffer_end); } } } static void test_planar1 (void) { /* to do */ test_planar (); } static void test (void) { CLEAR (format); test_packed1 (); test_planar1 (); format.width = 160; format.height = 0; test_packed1 (); test_planar1 (); format.width = 0; format.height = 160; test_packed1 (); test_planar1 (); format.height = 12; for (format.width = 0; format.width < 17; ++format.width) { test_packed1 (); test_planar1 (); } for (format.width = 160; format.width < 177; ++format.width) { test_packed1 (); test_planar1 (); } fputc ('\n', stderr); } int main (int argc, char ** argv) { unsigned int buffer_size; buffer_size = 4 << 20; buffer = guard_alloc (buffer_size); buffer_end = buffer + buffer_size; /* Use generic version. */ cpu_features = (cpu_feature_set) 0; if (argc > 1) { /* Use optimized version, if available. */ cpu_features = cpu_feature_set_from_string (argv[1]); } test (); return EXIT_SUCCESS; } zapping-0.10cvs6/test/memcpy-sse.sh 755 764 144 204 10263052703 12357 #!/bin/sh . `dirname $0`/simd-emu.sh if ! find_emulator sse; then exit 77 else LD_PRELOAD=$pre $emu ./memcpy sse exit $? fi zapping-0.10cvs6/test/pixel.h 644 764 144 7434 10156557021 11270 /* * Copyright (C) 2004 Michael H. Schimek * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* $Id: pixel.h,v 1.1 2004/12/11 11:46:25 mschimek Exp $ */ #undef NDEBUG #include #include #include "libtv/image_format.h" #include "libtv/misc.h" /* FFS() */ static unsigned int get_packed_pixel (const uint8_t * s, tv_pixfmt pixfmt) { unsigned int t; #define RGB32(r, g, b, a) \ (+ (s[r] << 0) \ + (s[g] << 8) \ + (s[b] << 16) \ + (s[a] << 24)) #define RGB24(r, g, b) \ (+ (s[r] << 0) \ + (s[g] << 8) \ + (s[b] << 16)) /* v & m, then shift msb of m to bit n (1 == lsb). */ /* MAX() prevents a bogus warning. */ #define MSHIFT(v, m, n) \ ((FFS (m) > n) ? \ ((v & m) >> (FFS (m) - n)) : \ ((v & m) << MAX(n - FFS (m), 31))) #define RGB16(r, g, b, a, e) \ (t = s[0] + s[1] * 256, \ + MSHIFT (t, r, 8) \ + MSHIFT (t, g, 16) \ + MSHIFT (t, b, 24) \ + MSHIFT (t, a, 32)) #define RGB8(r, g, b, a) \ (+ MSHIFT (s[0], r, 8) \ + MSHIFT (s[0], g, 16) \ + MSHIFT (s[0], b, 24) \ + MSHIFT (s[0], a, 32)) switch (pixfmt) { case TV_PIXFMT_YUVA32_LE: return RGB32 (0, 1, 2, 3); case TV_PIXFMT_YUVA32_BE: return RGB32 (3, 2, 1, 0); case TV_PIXFMT_YVUA32_LE: return RGB32 (0, 2, 1, 3); case TV_PIXFMT_YVUA32_BE: return RGB32 (3, 1, 2, 0); case TV_PIXFMT_YUV24_LE: return RGB24 (0, 1, 2); case TV_PIXFMT_YUV24_BE: return RGB24 (2, 1, 0); case TV_PIXFMT_YVU24_LE: return RGB24 (0, 2, 1); case TV_PIXFMT_YVU24_BE: return RGB24 (2, 0, 1); case TV_PIXFMT_Y8: return s[0] | 0x808000; case TV_PIXFMT_RGBA32_LE: return RGB32 (0, 1, 2, 3); case TV_PIXFMT_RGBA32_BE: return RGB32 (3, 2, 1, 0); case TV_PIXFMT_BGRA32_LE: return RGB32 (2, 1, 0, 3); case TV_PIXFMT_BGRA32_BE: return RGB32 (1, 2, 3, 0); case TV_PIXFMT_RGB24_LE: return RGB24 (0, 1, 2); case TV_PIXFMT_BGR24_LE: return RGB24 (2, 1, 0); case TV_PIXFMT_RGB16_LE: return RGB16 (0x001F, 0x07E0, 0xF800, 0, 0); case TV_PIXFMT_RGB16_BE: return RGB16 (0x001F, 0x07E0, 0xF800, 0, 1); case TV_PIXFMT_BGR16_LE: return RGB16 (0xF800, 0x07E0, 0x001F, 0, 0); case TV_PIXFMT_BGR16_BE: return RGB16 (0xF800, 0x07E0, 0x001F, 0, 1); #define CASE_RGB16(fmt, r, g, b, a) \ case TV_PIXFMT_ ## fmt ## _LE: return RGB16 (r, g, b, a, 0); \ case TV_PIXFMT_ ## fmt ## _BE: return RGB16 (r, g, b, a, 1); CASE_RGB16 (RGBA16, 0x001F, 0x03E0, 0xEC00, 0x8000); CASE_RGB16 (BGRA16, 0xEC00, 0x03E0, 0x001F, 0x8000); CASE_RGB16 (ARGB16, 0x003E, 0x07C0, 0xF800, 0x0001); CASE_RGB16 (ABGR16, 0xF800, 0x07C0, 0x003E, 0x0001); CASE_RGB16 (RGBA12, 0x000F, 0x00F0, 0x0F00, 0xF000); CASE_RGB16 (BGRA12, 0x0F00, 0x00F0, 0x000F, 0xF000); CASE_RGB16 (ARGB12, 0x00F0, 0x0F00, 0xF000, 0x000F); CASE_RGB16 (ABGR12, 0xF000, 0x0F00, 0x00F0, 0x000F); case TV_PIXFMT_RGB8: return RGB8 (0x07, 0x38, 0xC0, 0); case TV_PIXFMT_BGR8: return RGB8 (0xE0, 0x1C, 0x03, 0); case TV_PIXFMT_RGBA8: return RGB8 (0x03, 0x1C, 0x60, 0x80); case TV_PIXFMT_BGRA8: return RGB8 (0x60, 0x1C, 0x03, 0x80); case TV_PIXFMT_ARGB8: return RGB8 (0x06, 0x38, 0xC0, 0x01); case TV_PIXFMT_ABGR8: return RGB8 (0xC0, 0x38, 0x06, 0x01); default: assert (!"reached"); return 0; } } zapping-0.10cvs6/test/copy_image.c 644 764 144 44420 10443534736 12301 /* * Copyright (C) 2006 Michael H. Schimek * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* $Id: copy_image.c,v 1.3 2006/06/13 13:13:02 mschimek Exp $ */ #define _GNU_SOURCE 1 #undef NDEBUG #include #include #include #include /* lrint() */ #include "libtv/cpu.h" #include "libtv/rgb2rgb.h" #include "libtv/yuv2rgb.h" #include "libtv/yuv2yuv.h" #include "libtv/misc.h" /* FFS() */ #include "guard.h" #define ERASE(var) memset (&(var), 0xAA, sizeof (var)) tv_bool fast_check = TRUE; unsigned int buffer_size; /* buffer_size bytes, where data before and after is inaccessible. */ uint8_t * src_buffer; uint8_t * src_buffer_end; /* Ditto. */ uint8_t * dst_buffer; uint8_t * dst_buffer_end; unsigned int scatter_width; unsigned int scatter_height; /* scatter_width * scatter_height bytes, where all odd rows and row -1 are inaccessible. */ uint8_t * src_scatter_buffer; uint8_t * src_scatter_buffer_end; uint8_t * dst_scatter_buffer; uint8_t * dst_scatter_buffer_end; tv_image_format src_format; tv_image_format dst_format; tv_bool erase_dst = 1; static unsigned int bytes_per_pixel (const tv_image_format *format) { return format->pixel_format->bits_per_pixel >> 3; } static void compare_images (const uint8_t * dst, const tv_image_format *dst_format, const uint8_t * src, const tv_image_format *src_format) { const tv_pixel_format *pf; const uint8_t *d; const uint8_t *s; unsigned int width; unsigned int height; unsigned int y; pf = dst_format->pixel_format; width = dst_format->width * bytes_per_pixel (dst_format); height = dst_format->height; d = dst + dst_format->offset[0]; s = src + src_format->offset[0]; for (y = 0; y < height; ++y) { assert (0 == memcmp (d, s, width)); d += dst_format->bytes_per_line[0]; s += src_format->bytes_per_line[0]; } if (1 == pf->n_planes) return; width >>= pf->uv_hshift; height >>= pf->uv_vshift; d = dst + dst_format->offset[1]; s = src + src_format->offset[1]; for (y = 0; y < height; ++y) { assert (0 == memcmp (d, s, width)); d += dst_format->bytes_per_line[1]; s += src_format->bytes_per_line[1]; } if (2 == pf->n_planes) return; d = dst + dst_format->offset[2]; s = src + src_format->offset[2]; for (y = 0; y < height; ++y) { assert (0 == memcmp (d, s, width)); d += dst_format->bytes_per_line[2]; s += src_format->bytes_per_line[2]; } } static void randomize (uint8_t * begin, uint8_t * end) { assert (NULL != begin); assert (end >= begin); for (; begin < end; ++begin) *begin = rand (); } static void assert_is_aa (const uint8_t * begin, const uint8_t * end) { assert (NULL != begin); assert (NULL != end); if (0 == (((unsigned long) begin | (unsigned long) end) & 3)) { /* Faster. */ for (; begin < end; begin += 4) assert (0xAAAAAAAA == * (const uint32_t *) begin); } else { for (; begin < end; ++begin) assert (0xAA == *begin); } } /* Must not write padding bytes before or after the image or between lines. */ static void check_padding (const tv_image_format *format) { const tv_pixel_format *pf; unsigned int order[3]; unsigned int bw[3]; const uint8_t *p; const uint8_t *end; unsigned int i; pf = format->pixel_format; bw[0] = (format->width * pf->bits_per_pixel) >> 3; bw[1] = format->width >> pf->uv_hshift; bw[2] = bw[1]; if (pf->n_planes > 2) { order[0] = (format->offset[1] < format->offset[0]); if (format->offset[2] < format->offset[order[0] ^ 1]) { order[2] = order[0] ^ 1; if (format->offset[2] < format->offset[order[0]]) { order[1] = order[0]; order[0] = 2; } else { order[1] = 2; } } else { order[1] = order[0] ^ 1; order[2] = 2; } } else if (pf->n_planes > 1) { order[0] = (format->offset[1] < format->offset[0]); order[1] = order[0] ^ 1; } else { order[0] = 0; } p = dst_buffer; for (i = 0; i < pf->n_planes; ++i) { unsigned int count; unsigned int j; j = order[i]; end = dst_buffer + format->offset[j]; assert_is_aa (p, end); p = end; for (count = format->height - 1; count > 0; --count) { end = p + format->bytes_per_line[j]; assert_is_aa (p + bw[j], end); p = end; } p += bw[j]; } assert_is_aa (p, dst_buffer_end); } static unsigned int min_size (tv_image_format * format) { const tv_pixel_format *pf; unsigned long end[3]; assert (NULL != format); if (0 == format->width || 0 == format->height) return 0; pf = format->pixel_format; end[0] = format->offset[0] + format->bytes_per_line[0] * (format->height - 1) + ((format->width * pf->bits_per_pixel) >> 3); if (pf->n_planes > 2) { unsigned int uv_width; unsigned int uv_height_m1; uv_width = format->width >> pf->uv_hshift; uv_height_m1 = (format->height >> pf->uv_vshift) - 1; end[1] = format->offset[1] + uv_width + format->bytes_per_line[1] * uv_height_m1; end[2] = format->offset[2] + uv_width + format->bytes_per_line[2] * uv_height_m1; return MAX (end[0], MAX (end[1], end[2])); } else if (pf->n_planes > 1) { unsigned int uv_width; unsigned int uv_height_m1; uv_width = format->width >> pf->uv_hshift; uv_height_m1 = (format->height >> pf->uv_vshift) - 1; end[1] = format->offset[1] + uv_width + format->bytes_per_line[1] * uv_height_m1; return MAX (end[0], end[1]); } else { return end[0]; } } static unsigned int byte_width (const tv_image_format *format, unsigned int plane) { const tv_pixel_format *pf; pf = format->pixel_format; if (0 == plane) return (format->width * pf->bits_per_pixel) >> 3; else return format->width >> pf->uv_hshift; } #define RES(sh) ((1U << (sh)) - 1) static void test (uint8_t * dst, const uint8_t * src) { const tv_pixel_format *dst_pf; const tv_pixel_format *src_pf; tv_image_format md_format; tv_image_format ms_format; unsigned int hshift; unsigned int vshift; tv_bool success; dst_pf = dst_format.pixel_format; src_pf = src_format.pixel_format; hshift = MAX (dst_pf->uv_hshift, src_pf->uv_hshift); vshift = MAX (dst_pf->uv_vshift, src_pf->uv_vshift); md_format = dst_format; md_format.width = MIN (dst_format.width, src_format.width); md_format.height = MIN (dst_format.height, src_format.height); if (0) fprintf (stderr, "%d %d %d %d\n", md_format.width, md_format.height, hshift, vshift); if (erase_dst) { memset (dst_buffer, 0xAA, dst_buffer_end - dst_buffer); erase_dst = 0; } switch (dst_format.pixel_format->pixfmt) { case TV_PIXFMT_SBGGR: hshift = 1; vshift = 1; break; case TV_PIXFMT_NV12: case TV_PIXFMT_YUYV: case TV_PIXFMT_UYVY: case TV_PIXFMT_YVYU: case TV_PIXFMT_VYUY: hshift = 1; break; default: break; } switch (src_format.pixel_format->pixfmt) { case TV_PIXFMT_SBGGR: hshift = 1; vshift = 1; break; case TV_PIXFMT_NV12: case TV_PIXFMT_YUYV: case TV_PIXFMT_UYVY: case TV_PIXFMT_YVYU: case TV_PIXFMT_VYUY: hshift = 1; break; default: break; } success = tv_copy_image (dst, &dst_format, src, &src_format); #define FAIL_IF(expr) \ if (expr) { \ assert (!success); \ assert_is_aa (dst_buffer, dst_buffer_end); \ return; \ } /* Not implemented yet. */ FAIL_IF (TV_PIXFMT_HM12 == md_format.pixel_format->pixfmt); FAIL_IF (0 == md_format.width); FAIL_IF (0 == md_format.height); FAIL_IF (md_format.width & RES (hshift)); FAIL_IF (md_format.height & RES (vshift)); FAIL_IF (byte_width (&dst_format, 0) > dst_format.bytes_per_line[0]); FAIL_IF (byte_width (&src_format, 0) > src_format.bytes_per_line[0]); if (dst_pf->n_planes > 2) FAIL_IF (byte_width (&dst_format, 2) > dst_format.bytes_per_line[2]); if (dst_pf->n_planes > 1) FAIL_IF (byte_width (&dst_format, 1) > dst_format.bytes_per_line[1]); if (src_pf->n_planes > 2) FAIL_IF (byte_width (&src_format, 2) > src_format.bytes_per_line[2]); if (src_pf->n_planes > 1) FAIL_IF (byte_width (&src_format, 1) > src_format.bytes_per_line[1]); assert (success); erase_dst = 1; check_padding (&md_format); ms_format = src_format; /* Required for proper SBGGR clipping. */ ms_format.width = md_format.width; ms_format.height = md_format.height; compare_images (dst, &md_format, src, &ms_format); } #if 1 # define overflow_packed() test (dst_buffer, src_buffer) # define overflow_planar() test (dst_buffer, src_buffer) #else static void overflow_packed (void) { test (dst_buffer, src_buffer); if (fast_check) return; if (src_format.size < buffer_size) test (dst_buffer, src_buffer_end - ((src_format.size + 15) & -16)); if (dst_format.size < buffer_size) test (dst_buffer_end - ((dst_format.size + 15) & -16), src_buffer); if (dst_format.size < buffer_size && src_format.size < buffer_size) test (dst_buffer_end - ((dst_format.size + 15) & -16), src_buffer_end - ((src_format.size + 15) & -16)); } #endif static void unaligned_packed (void) { static int unaligned[][2] = { { 0, 0 }, { 5, 0 }, { 0, 5 }, { 5, 5 }, { 8, 0 }, { 0, 8 }, { 16, 0 }, { 0, 16 }, }; unsigned int dst_bpp; unsigned int src_bpp; unsigned int i; unsigned int j; dst_bpp = bytes_per_pixel (&dst_format); src_bpp = bytes_per_pixel (&src_format); for (i = 0; i < N_ELEMENTS (unaligned); ++i) { for (j = 0; j < N_ELEMENTS (unaligned); ++j) { ERASE (dst_format.offset); ERASE (dst_format.bytes_per_line); dst_format.offset[0] = unaligned[j][0]; dst_format.bytes_per_line[0] = dst_format.width * dst_bpp + unaligned[j][1]; dst_format.size = min_size (&dst_format); ERASE (src_format.offset); ERASE (src_format.bytes_per_line); src_format.offset[0] = unaligned[i][0]; src_format.bytes_per_line[0] = src_format.width * src_bpp + unaligned[i][1]; src_format.size = min_size (&src_format); overflow_packed (); if (fast_check) return; } } dst_format.offset[0] = 0; dst_format.bytes_per_line[0] = dst_format.width * dst_bpp; dst_format.size = min_size (&dst_format); src_format.offset[0] = 0; src_format.bytes_per_line[0] = src_format.width * src_bpp; src_format.size = min_size (&src_format); if (dst_format.width >= 16) { dst_format.bytes_per_line[0] = (dst_format.width - 16) * dst_bpp; overflow_packed (); } if (src_format.width >= 16) { dst_format.bytes_per_line[0] = dst_format.width * dst_bpp; src_format.bytes_per_line[0] = (src_format.width - 16) * src_bpp; overflow_packed (); } /* TO DO: padding = inaccessible page. */ } static void unaligned_planar (void) { static int unaligned[][6] = { { 0, 0, 0, 0, 0, 0 }, { 5, 0, 0, 0, 0, 0 }, { 0, 5, 0, 0, 0, 0 }, { 5, 5, 0, 0, 0, 0 }, { 0, 0, 5, 0, 0, 0 }, { 0, 0, 0, 5, 0, 0 }, { 0, 0, 0, 0, 5, 0 }, { 0, 0, 0, 0, 0, 5 }, { 8, 0, 8, 0, 8, 0 }, { 0, 8, 0, 8, 0, 8 }, { 16, 0, 16, 0, 16, 0 }, { 0, 16, 0, 16, 0, 16 }, }; unsigned int dst_bpp; unsigned int src_bpp; unsigned int dst_y_bpl; unsigned int dst_uv_bpl; unsigned int src_y_bpl; unsigned int src_uv_bpl; unsigned int short_bpl; unsigned int i; unsigned int j; dst_bpp = bytes_per_pixel (&dst_format); dst_y_bpl = dst_format.width * dst_bpp; dst_uv_bpl = (dst_format.width * dst_bpp) >> dst_format.pixel_format->uv_hshift; src_bpp = bytes_per_pixel (&src_format); src_y_bpl = src_format.width * src_bpp; src_uv_bpl = (src_format.width * src_bpp) >> src_format.pixel_format->uv_hshift; for (i = 0; i < N_ELEMENTS (unaligned); ++i) { for (j = 0; j < N_ELEMENTS (unaligned); ++j) { ERASE (dst_format.offset); ERASE (dst_format.bytes_per_line); dst_format.offset[0] = unaligned[j][0]; dst_format.bytes_per_line[0] = dst_y_bpl + unaligned[j][1]; if (dst_format.pixel_format->n_planes > 1) { dst_format.offset[1] = (dst_y_bpl * 16) * (dst_format.height + 1) + unaligned[j][2]; dst_format.bytes_per_line[1] = dst_uv_bpl + unaligned[j][3]; dst_format.offset[2] = (dst_y_bpl * 16) * (dst_format.height + 1) * 2 + unaligned[j][4]; dst_format.bytes_per_line[2] = dst_uv_bpl + unaligned[j][5]; } dst_format.size = min_size (&dst_format); ERASE (src_format.offset); ERASE (src_format.bytes_per_line); src_format.offset[0] = unaligned[i][0]; src_format.bytes_per_line[0] = src_y_bpl + unaligned[i][1]; if (src_format.pixel_format->n_planes > 1) { src_format.offset[1] = unaligned[i][2]; src_format.bytes_per_line[1] = src_uv_bpl + unaligned[i][3]; src_format.offset[2] = unaligned[i][4]; src_format.bytes_per_line[2] = src_uv_bpl + unaligned[i][5]; } src_format.size = min_size (&src_format); overflow_planar (); if (fast_check) return; } } dst_format.offset[0] = 2 * dst_y_bpl * dst_format.height; dst_format.bytes_per_line[0] = dst_y_bpl; if (dst_format.pixel_format->n_planes > 1) { dst_format.offset[1] = 1 * dst_y_bpl * dst_format.height; dst_format.bytes_per_line[1] = dst_uv_bpl; dst_format.offset[2] = 0 * dst_y_bpl * dst_format.height; dst_format.bytes_per_line[2] = dst_uv_bpl; } dst_format.size = min_size (&dst_format); src_format.offset[0] = 0; src_format.bytes_per_line[0] = src_y_bpl; if (dst_format.pixel_format->n_planes > 1) { src_format.offset[1] = 0; src_format.bytes_per_line[1] = src_uv_bpl; src_format.offset[2] = 0; src_format.bytes_per_line[2] = src_uv_bpl; } src_format.size = min_size (&src_format); if (dst_format.width >= 16) { dst_format.bytes_per_line[0] = (dst_format.width - 16) * dst_bpp; overflow_planar (); dst_format.bytes_per_line[0] = dst_y_bpl; if (dst_format.pixel_format->n_planes > 1) { short_bpl = ((dst_format.width - 16) * dst_bpp) >> dst_format.pixel_format->uv_hshift; dst_format.bytes_per_line[1] = short_bpl; overflow_planar (); dst_format.bytes_per_line[1] = dst_uv_bpl; dst_format.bytes_per_line[2] = short_bpl; overflow_planar (); dst_format.bytes_per_line[2] = dst_uv_bpl; } } dst_format.bytes_per_line[0] = dst_format.width * dst_bpp; if (src_format.width >= 16) { src_format.bytes_per_line[0] = (src_format.width - 16) * src_bpp; overflow_planar (); src_format.bytes_per_line[0] = src_y_bpl; if (dst_format.pixel_format->n_planes > 1) { short_bpl = ((src_format.width - 16) * src_bpp) >> src_format.pixel_format->uv_hshift; src_format.bytes_per_line[1] = short_bpl; overflow_planar (); src_format.bytes_per_line[1] = src_uv_bpl; src_format.bytes_per_line[2] = short_bpl; overflow_planar (); src_format.bytes_per_line[2] = short_bpl; } } /* TO DO: padding = inaccessible page. */ } static void all_sizes (void) { static unsigned int heights[] = { 0, 1, 2, 11, 12 }; unsigned int i; tv_bool planar; planar = ((dst_format.pixel_format->n_planes | src_format.pixel_format->n_planes) > 1); for (i = 0; i < N_ELEMENTS (heights); ++i) { static unsigned int widths[] = { 0, 1, 3, 8, 13, 16, 21, 155, 160, 165 }; unsigned int j; if (fast_check) src_format.height = 12; else src_format.height = heights[i]; for (j = 0; j < N_ELEMENTS (widths); ++j) { fputc ('.', stderr); fflush (stderr); if (fast_check) src_format.width = 32; else src_format.width = widths[j]; dst_format.width = src_format.width; dst_format.height = src_format.height; if (planar) unaligned_planar (); else unaligned_packed (); if (fast_check) return; if (src_format.width > 5) { dst_format.width = src_format.width - 5; dst_format.height = src_format.height; if (planar) unaligned_planar (); else unaligned_packed (); } dst_format.width = src_format.width + 5; dst_format.height = src_format.height; if (planar) unaligned_planar (); else unaligned_packed (); if (src_format.height > 5) { dst_format.width = src_format.width; dst_format.height = src_format.height - 5; if (planar) unaligned_planar (); else unaligned_packed (); } dst_format.width = src_format.width; dst_format.height = src_format.height + 5; if (planar) unaligned_planar (); else unaligned_packed (); } } } static void all_formats (void) { unsigned int i; for (i = 0; i < TV_MAX_PIXFMTS; ++i) { if (0 == (TV_PIXFMT_SET (i) & TV_PIXFMT_SET_ALL)) continue; dst_format.pixel_format = tv_pixel_format_from_pixfmt (i); src_format = dst_format; if (!fast_check) { fprintf (stderr, "%s ", dst_format.pixel_format->name); } all_sizes (); if (!fast_check) fputc ('\n', stderr); } } int main (int argc, char ** argv) { unsigned int scatter_size; unsigned int i; buffer_size = 32 * 4096; src_buffer = guard_alloc (buffer_size); src_buffer_end = src_buffer + buffer_size; randomize (src_buffer, src_buffer_end); make_unwriteable (src_buffer, buffer_size); dst_buffer = guard_alloc (buffer_size); dst_buffer_end = dst_buffer + buffer_size; scatter_width = getpagesize (); scatter_height = 24; scatter_size = scatter_width * (scatter_height - 1); src_scatter_buffer = guard_alloc (scatter_size); src_scatter_buffer_end = src_scatter_buffer + scatter_size; for (i = 0; i < scatter_size; i += scatter_width * 2) { make_unwriteable (src_scatter_buffer + i, scatter_width); make_inaccessible (src_scatter_buffer + i + scatter_width, scatter_width); } dst_scatter_buffer = guard_alloc (scatter_size); dst_scatter_buffer_end = dst_scatter_buffer + scatter_size; for (i = 0; i < scatter_size; i += scatter_width * 2) { make_inaccessible (src_scatter_buffer + i + scatter_width, scatter_width); } /* Use generic version. */ cpu_features = (cpu_feature_set) 0; if (argc > 1) { /* Use optimized version, if available. */ cpu_features = cpu_feature_set_from_string (argv[1]); } all_formats (); if (fast_check) fputc ('\n', stderr); return EXIT_SUCCESS; } zapping-0.10cvs6/test/copy_image-altivec.sh 755 764 144 220 10417056140 14034 #!/bin/sh . `dirname $0`/simd-emu.sh if ! find_emulator altivec; then exit 77 else LD_PRELOAD=$pre $emu ./copy_image altivec exit $? fi zapping-0.10cvs6/test/copy_image-mmx.sh 755 764 144 210 10417056140 13205 #!/bin/sh . `dirname $0`/simd-emu.sh if ! find_emulator mmx; then exit 77 else LD_PRELOAD=$pre $emu ./copy_image mmx exit $? fi zapping-0.10cvs6/test/memcpy.c 644 764 144 4377 10260121530 11423 /* * Copyright (C) 2004 Michael H. Schimek * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* $Id: memcpy.c,v 1.5 2005/06/28 01:09:44 mschimek Exp $ */ #undef NDEBUG #include #include #include "libtv/image_format.h" #include "libtv/cpu.h" #include "guard.h" static uint8_t * sbuffer; static uint8_t * sbuffer_end; static uint8_t * dbuffer; static uint8_t * dbuffer_end; static void test1 (uint8_t * dst, uint8_t * src, unsigned int n_bytes) { unsigned int i; unsigned int size; uint8_t *p; memset (dbuffer, 0xAA, dbuffer_end - dbuffer); size = sbuffer_end - sbuffer; for (i = 0; i < size; ++i) sbuffer[i] = i; tv_memcpy (dst, src, n_bytes); for (p = dbuffer; p < dst;) assert (0xAA == *p++); for (i = 0; i < n_bytes; ++i) assert (*p++ == *src++); while (p < dbuffer_end) assert (0xAA == *p++); } int main (int argc, char ** argv) { unsigned int buffer_size; unsigned int i; buffer_size = 64 << 10; sbuffer = guard_alloc (buffer_size); sbuffer_end = sbuffer + buffer_size; dbuffer = guard_alloc (buffer_size); dbuffer_end = dbuffer + buffer_size; /* Use generic version. */ cpu_features = (cpu_feature_set) 0; if (argc > 1) { /* Use optimized version, if available. */ cpu_features = cpu_feature_set_from_string (argv[1]); } for (i = 0; i < 33; ++i) { test1 (dbuffer, sbuffer, i); test1 (dbuffer, sbuffer, i + 16384); test1 (dbuffer_end - i, sbuffer_end - i, i); test1 (dbuffer_end - i - 16384, sbuffer_end - i - 16384, i + 16384); test1 (dbuffer + i, sbuffer + (i ^ 31), i * 3); } return EXIT_SUCCESS; } zapping-0.10cvs6/test/convert_image-mmx.sh 755 764 144 213 10400132334 13706 #!/bin/sh . `dirname $0`/simd-emu.sh if ! find_emulator mmx; then exit 77 else LD_PRELOAD=$pre $emu ./convert_image mmx exit $? fi zapping-0.10cvs6/test/convert_image.c 644 764 144 77435 10443534736 13023 /* * Copyright (C) 2006 Michael H. Schimek * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* $Id: convert_image.c,v 1.8 2006/06/13 13:13:02 mschimek Exp $ */ #ifdef HAVE_CONFIG_H # include "config.h" #endif #define _GNU_SOURCE 1 #undef NDEBUG #include #include #include #include /* lrint() */ #include "libtv/cpu.h" #include "libtv/rgb2rgb.h" #include "libtv/yuv2rgb.h" #include "libtv/yuv2yuv.h" #include "libtv/misc.h" /* FFS() */ #include "guard.h" #ifndef HAVE_LRINT static long lrint (double x) { if (x < 0) return (long)(x - 0.5); else return (long)(x + 0.5); } #endif #define ERASE(var) memset (&(var), 0xAA, sizeof (var)) tv_bool fast_check = TRUE; unsigned int buffer_size; /* buffer_size bytes, where data before and after is inaccessible. */ uint8_t * src_buffer; uint8_t * src_buffer_end; /* Ditto. */ uint8_t * dst_buffer; uint8_t * dst_buffer_end; unsigned int scatter_width; unsigned int scatter_height; /* scatter_width * scatter_height bytes, where all odd rows and row -1 are inaccessible. */ uint8_t * src_scatter_buffer; uint8_t * src_scatter_buffer_end; uint8_t * dst_scatter_buffer; uint8_t * dst_scatter_buffer_end; tv_image_format src_format; tv_image_format dst_format; tv_bool erase_dst = 1; /* 0xAABBGGRR or 0xAAVVUUYY, lsbs filled up with zero bits. */ static unsigned int get_pixel (const uint8_t * src, const tv_image_format *format, unsigned int x, unsigned int y) { const tv_pixel_format *pf; const uint8_t *s0; const uint8_t *s1; const uint8_t *s2; unsigned int block; unsigned int byte; unsigned int x2; unsigned int y2; unsigned int t; pf = format->pixel_format; s0 = src + y * format->bytes_per_line[0] + format->offset[0]; byte = (x * pf->bits_per_pixel) >> 3; switch (format->pixel_format->pixfmt) { case TV_PIXFMT_NV12: x2 = x & ~1; y2 = y >> pf->uv_vshift; s1 = src + y2 * format->bytes_per_line[1] + format->offset[1]; return (+ s0[x] + (s1[x2 + 0] << 8) + (s1[x2 + 1] << 16) + 0xFF000000); case TV_PIXFMT_HM12: block = y / (format->bytes_per_line[0] * 16) + (x / 16); s0 = src + format->offset[0] + block * (16 * 16) + (y % 16) * 16; y2 = y >> 1; block = y2 / (format->bytes_per_line[0] * 16) + (x / 16); s1 = src + format->offset[1] + block * (16 * 16) + (y2 % 16) * 16; x2 = x & 14; return (+ s0[x % 16] + (s1[x2 + 0] << 8) + (s1[x2 + 1] << 16) + 0xFF000000); case TV_PIXFMT_YUV444: case TV_PIXFMT_YUV422: case TV_PIXFMT_YUV411: case TV_PIXFMT_YUV420: case TV_PIXFMT_YUV410: x2 = x >> pf->uv_hshift; y2 = y >> pf->uv_vshift; s1 = src + y2 * format->bytes_per_line[1] + format->offset[1]; s2 = src + y2 * format->bytes_per_line[2] + format->offset[2]; return s0[x] + (s1[x2] << 8) + (s2[x2] << 16) + 0xFF000000; case TV_PIXFMT_YVU444: case TV_PIXFMT_YVU422: case TV_PIXFMT_YVU411: case TV_PIXFMT_YVU420: case TV_PIXFMT_YVU410: x2 = x >> pf->uv_hshift; y2 = y >> pf->uv_vshift; s1 = src + y2 * format->bytes_per_line[1] + format->offset[1]; s2 = src + y2 * format->bytes_per_line[2] + format->offset[2]; return s0[x] + (s2[x2] << 8) + (s1[x2] << 16) + 0xFF000000; #define YUYV(y0, u) \ (x2 = (x & ~1) * 2, \ + (s0[x * 2 + y0] << 0) \ + (s0[x2 + u] << 8) \ + (s0[x2 + (u ^ 2)] << 16) \ + 0xFF000000) case TV_PIXFMT_YUYV: return YUYV (0, 1); case TV_PIXFMT_UYVY: return YUYV (1, 0); case TV_PIXFMT_YVYU: return YUYV (0, 3); case TV_PIXFMT_VYUY: return YUYV (1, 2); #define RGB32(r, g, b, a) \ (+ (s0[byte + r] << 0) \ + (s0[byte + g] << 8) \ + (s0[byte + b] << 16) \ + (s0[byte + a] << 24)) case TV_PIXFMT_RGBA32_LE: return RGB32 (0, 1, 2, 3); case TV_PIXFMT_RGBA32_BE: return RGB32 (3, 2, 1, 0); case TV_PIXFMT_BGRA32_LE: return RGB32 (2, 1, 0, 3); case TV_PIXFMT_BGRA32_BE: return RGB32 (1, 2, 3, 0); #define RGB24(r, g, b) \ (+ (s0[byte + r] << 0) \ + (s0[byte + g] << 8) \ + (s0[byte + b] << 16) \ + 0xFF000000) case TV_PIXFMT_RGB24_LE: return RGB24 (0, 1, 2); case TV_PIXFMT_BGR24_LE: return RGB24 (2, 1, 0); #define RGB16(r, g, b, e) \ (t = s0[byte + 0 + e] + s0[byte + 1 - e] * 256, \ + MASKED_SHIFT (t, r, 7) \ + MASKED_SHIFT (t, g, 15) \ + MASKED_SHIFT (t, b, 23) \ + 0xFF000000) case TV_PIXFMT_RGB16_LE: return RGB16 (0x001F, 0x07E0, 0xF800, 0); case TV_PIXFMT_RGB16_BE: return RGB16 (0x001F, 0x07E0, 0xF800, 1); case TV_PIXFMT_BGR16_LE: return RGB16 (0xF800, 0x07E0, 0x001F, 0); case TV_PIXFMT_BGR16_BE: return RGB16 (0xF800, 0x07E0, 0x001F, 1); #define RGBA16(r, g, b, a, e) \ (t = s0[byte + 0 + e] + s0[byte + 1 - e] * 256, \ + MASKED_SHIFT (t, r, 7) \ + MASKED_SHIFT (t, g, 15) \ + MASKED_SHIFT (t, b, 23) \ + MASKED_SHIFT (t, a, 31)) #define CASE_RGB16(fmt, r, g, b, a) \ case TV_PIXFMT_ ## fmt ## _LE: return RGBA16 (r, g, b, a, 0); \ case TV_PIXFMT_ ## fmt ## _BE: return RGBA16 (r, g, b, a, 1); CASE_RGB16 (RGBA16, 0x001F, 0x03E0, 0x7C00, 0x8000); CASE_RGB16 (BGRA16, 0x7C00, 0x03E0, 0x001F, 0x8000); CASE_RGB16 (ARGB16, 0x003E, 0x07C0, 0xF800, 0x0001); CASE_RGB16 (ABGR16, 0xF800, 0x07C0, 0x003E, 0x0001); CASE_RGB16 (RGBA12, 0x000F, 0x00F0, 0x0F00, 0xF000); CASE_RGB16 (BGRA12, 0x0F00, 0x00F0, 0x000F, 0xF000); CASE_RGB16 (ARGB12, 0x00F0, 0x0F00, 0xF000, 0x000F); CASE_RGB16 (ABGR12, 0xF000, 0x0F00, 0x00F0, 0x000F); #define RGB8(r, g, b) \ (+ MASKED_SHIFT (s0[byte], r, 7) \ + MASKED_SHIFT (s0[byte], g, 15) \ + MASKED_SHIFT (s0[byte], b, 23) \ + 0xFF000000) case TV_PIXFMT_RGB8: return RGB8 (0x07, 0x38, 0xC0); case TV_PIXFMT_BGR8: return RGB8 (0xE0, 0x1C, 0x03); #define RGBA8(r, g, b, a) \ (+ MASKED_SHIFT (s0[byte], r, 7) \ + MASKED_SHIFT (s0[byte], g, 15) \ + MASKED_SHIFT (s0[byte], b, 23) \ + MASKED_SHIFT (s0[byte], a, 31)) case TV_PIXFMT_RGBA8: return RGBA8 (0x03, 0x1C, 0x60, 0x80); case TV_PIXFMT_BGRA8: return RGBA8 (0x60, 0x1C, 0x03, 0x80); case TV_PIXFMT_ARGB8: return RGBA8 (0x06, 0x38, 0xC0, 0x01); case TV_PIXFMT_ABGR8: return RGBA8 (0xC0, 0x38, 0x06, 0x01); case TV_PIXFMT_SBGGR: { unsigned int bpl = format->bytes_per_line[0]; const uint8_t *u, *d; unsigned int l, r, h, v; t = s0[x]; --s0; l = (x <= 0) * 2; r = (x < format->width - 1) * 2; h = s0[x + l] + s0[x + r] + 1; u = (y <= 0) ? s0 + bpl : s0 - bpl; d = (y < format->height - 1) ? s0 + bpl : s0 - bpl; v = u[x + 1] + d[x + 1] + 1; if ((x ^ y) & 1) { h >>= 1; v >>= 1; if (y & 1) return h + (t << 8) + (v << 16) + 0xFF000000; else return v + (t << 8) + (h << 16) + 0xFF000000; } else { /* Should average three pixels in some border cases but this is easier and faster in SIMD. */ h = (h + v) >> 2; v = (u[x + l] + d[x + l] + u[x + r] + d[x + r] + 2) >> 2; if (x & 1) return t + (h << 8) + (v << 16) + 0xFF000000; else return v + (h << 8) + (t << 16) + 0xFF000000; } } default: assert (0); return 0; } } static unsigned int get_avg_pixel (const uint8_t * src, const tv_image_format *format, unsigned int x, unsigned int y, unsigned int hshift, unsigned int vshift) { unsigned int n; unsigned int sum0; unsigned int sum1; unsigned int mask; unsigned int i; unsigned int j; if (0 == (hshift | vshift)) return get_pixel (src, format, x, y); sum0 = 0; sum1 = 0; mask = 0xFF00FF; if (TV_PIXFMT_IS_YUV (format->pixel_format->pixfmt)) { n = get_pixel (src, format, x, y); sum0 = (n & 0xFF) << (hshift + vshift); mask = 0xFF0000; } x &= ~((1 << hshift) - 1); y &= ~((1 << vshift) - 1); for (j = 0; j < 1U << vshift; ++j) { for (i = 0; i < 1U << hshift; ++i) { n = get_pixel (src, format, x + i, y + j); sum0 += n & mask; sum1 += (n >> 8) & 0xFF00FF; } } n = (0x010001 << (hshift + vshift)) >> 1; sum0 = (sum0 + n) >> (hshift + vshift); sum1 = (sum1 + n) >> (hshift + vshift); return (sum0 & 0xFF00FF) | ((sum1 & 0xFF00FF) << 8); } static void compare_images_straight (const uint8_t * dst, const tv_image_format *dst_format, const uint8_t * src, const tv_image_format *src_format, unsigned int and_mask, unsigned int d_mask, unsigned int s_mask) { const tv_pixel_format *dst_pf; const tv_pixel_format *src_pf; unsigned int x; unsigned int y; dst_pf = dst_format->pixel_format; src_pf = src_format->pixel_format; for (y = 0; y < dst_format->height; ++y) { for (x = 0; x < dst_format->width; ++x) { unsigned int d, s; d = get_avg_pixel (dst, dst_format, x, y, src_pf->uv_hshift, src_pf->uv_vshift); s = get_avg_pixel (src, src_format, x, y, dst_pf->uv_hshift, dst_pf->uv_vshift); if ((d | d_mask) != ((s & and_mask) | s_mask)) { fprintf (stderr, "x=%u y=%u d=%08x s=%08x " "%08x %08x %08x\n", x, y, d, s, d_mask, s_mask, and_mask); assert (0); } } } } static void compare_images_yuv2rgb (const uint8_t * dst, const tv_image_format *dst_format, const uint8_t * src, const tv_image_format *src_format, unsigned int and_mask, unsigned int d_mask, unsigned int s_mask) { const tv_pixel_format *dst_pf; const tv_pixel_format *src_pf; unsigned int x; unsigned int y; dst_pf = dst_format->pixel_format; src_pf = src_format->pixel_format; for (y = 0; y < dst_format->height; ++y) { for (x = 0; x < dst_format->width; ++x) { unsigned int d, s; double Y, U, V; long int r, g, b; long int r_min, g_min, b_min; long int r_max, g_max, b_max; d = get_pixel (dst, dst_format, x, y); s = get_pixel (src, src_format, x, y); Y = ((int)((s >> 0) & 0xFF) - 16) * 255 / 219.0; U = ((int)((s >> 8) & 0xFF) - 128) * 255 / 224.0; V = ((int)((s >> 16) & 0xFF) - 128) * 255 / 224.0; r = lrint (Y + 1.402 * V); g = lrint (Y - 0.344 * U - 0.714 * V); b = lrint (Y + 1.772 * U); r_min = SATURATE (r - 2, 0L, 255L) & (and_mask >> 0); r_max = SATURATE (r + 2, 0L, 255L) & (and_mask >> 0); g_min = SATURATE (g - 3, 0L, 255L) & (and_mask >> 8); g_max = SATURATE (g + 3, 0L, 255L) & (and_mask >> 8); b_min = SATURATE (b - 2, 0L, 255L) & (and_mask >> 16); b_max = SATURATE (b + 2, 0L, 255L) & (and_mask >> 16); if (0 != (0xFF000000 & (d ^ and_mask)) || (long int)((d >> 0) & 0xFF) < r_min || (long int)((d >> 0) & 0xFF) > r_max || (long int)((d >> 8) & 0xFF) < g_min || (long int)((d >> 8) & 0xFF) > g_max || (long int)((d >> 16) & 0xFF) < b_min || (long int)((d >> 16) & 0xFF) > b_max) { fprintf (stderr, "x=%u y=%u d=%08x s=%08x " "%02lx-%02lx %02lx-%02lx %02lx-%02lx " "%08x %08x %08x\n", x, y, d, s, r_min, r_max, g_min, g_max, b_min, b_max, d_mask, s_mask, and_mask); assert (0); } } } } static void compare_images (const uint8_t * dst, const tv_image_format *dst_format, const uint8_t * src, const tv_image_format *src_format) { const tv_pixel_format *dst_pf; const tv_pixel_format *src_pf; tv_image_format format; unsigned int and_mask; unsigned int d_mask; unsigned int s_mask; dst_pf = dst_format->pixel_format; src_pf = src_format->pixel_format; and_mask = -1; CLEAR (format); format.pixel_format = dst_format->pixel_format; and_mask = get_pixel ((void *) &and_mask, &format, 0, 0); d_mask = 0; s_mask = 0; if ((0 == dst_pf->mask.rgb.a) != (0 == src_pf->mask.rgb.a)) { d_mask = 0xFF000000; s_mask = 0xFF000000; } if (TV_PIXFMT_IS_RGB (dst_pf->pixfmt) == TV_PIXFMT_IS_RGB (src_pf->pixfmt)) { compare_images_straight (dst, dst_format, src, src_format, and_mask, d_mask, s_mask); } else if (TV_PIXFMT_IS_RGB (dst_pf->pixfmt)) { compare_images_yuv2rgb (dst, dst_format, src, src_format, and_mask, d_mask, s_mask); } else { assert (0); } } static void randomize (uint8_t * begin, uint8_t * end) { assert (NULL != begin); assert (end >= begin); for (; begin < end; ++begin) *begin = rand (); } static void assert_is_aa (const uint8_t * begin, const uint8_t * end) { assert (NULL != begin); assert (NULL != end); if (0 == (((unsigned long) begin | (unsigned long) end) & 3)) { /* Faster. */ for (; begin < end; begin += 4) assert (0xAAAAAAAA == * (const uint32_t *) begin); } else { for (; begin < end; ++begin) assert (0xAA == *begin); } } /* Must not write padding bytes before or after the image or between lines. */ static void check_padding (const tv_image_format *format) { const tv_pixel_format *pf; unsigned int order[3]; unsigned int bw[3]; const uint8_t *p; const uint8_t *end; unsigned int i; pf = format->pixel_format; bw[0] = (format->width * pf->bits_per_pixel) >> 3; bw[1] = format->width >> pf->uv_hshift; bw[2] = bw[1]; if (pf->n_planes > 2) { order[0] = (format->offset[1] < format->offset[0]); if (format->offset[2] < format->offset[order[0] ^ 1]) { order[2] = order[0] ^ 1; if (format->offset[2] < format->offset[order[0]]) { order[1] = order[0]; order[0] = 2; } else { order[1] = 2; } } else { order[1] = order[0] ^ 1; order[2] = 2; } } else if (pf->n_planes > 1) { order[0] = (format->offset[1] < format->offset[0]); order[1] = order[0] ^ 1; } else { order[0] = 0; } p = dst_buffer; for (i = 0; i < pf->n_planes; ++i) { unsigned int count; unsigned int j; j = order[i]; end = dst_buffer + format->offset[j]; assert_is_aa (p, end); p = end; for (count = format->height - 1; count > 0; --count) { end = p + format->bytes_per_line[j]; assert_is_aa (p + bw[j], end); p = end; } p += bw[j]; } assert_is_aa (p, dst_buffer_end); } static unsigned int min_size (tv_image_format * format) { const tv_pixel_format *pf; unsigned long end[3]; assert (NULL != format); if (0 == format->width || 0 == format->height) return 0; pf = format->pixel_format; end[0] = format->offset[0] + format->bytes_per_line[0] * (format->height - 1) + ((format->width * pf->bits_per_pixel) >> 3); if (pf->n_planes > 2) { unsigned int uv_width; unsigned int uv_height_m1; uv_width = format->width >> pf->uv_hshift; uv_height_m1 = (format->height >> pf->uv_vshift) - 1; end[1] = format->offset[1] + uv_width + format->bytes_per_line[1] * uv_height_m1; end[2] = format->offset[2] + uv_width + format->bytes_per_line[2] * uv_height_m1; return MAX (end[0], MAX (end[1], end[2])); } else if (pf->n_planes > 1) { unsigned int uv_width; unsigned int uv_height_m1; uv_width = format->width >> pf->uv_hshift; uv_height_m1 = (format->height >> pf->uv_vshift) - 1; end[1] = format->offset[1] + uv_width + format->bytes_per_line[1] * uv_height_m1; return MAX (end[0], end[1]); } else { return end[0]; } } static unsigned int bytes_per_pixel (const tv_image_format *format) { return format->pixel_format->bits_per_pixel >> 3; } static unsigned int byte_width (const tv_image_format *format, unsigned int plane) { const tv_pixel_format *pf; pf = format->pixel_format; if (0 == plane) return (format->width * pf->bits_per_pixel) >> 3; else return format->width >> pf->uv_hshift; } #define RES(sh) ((1U << (sh)) - 1) static void test (uint8_t * dst, const uint8_t * src) { const tv_pixel_format *dst_pf; const tv_pixel_format *src_pf; tv_image_format md_format; tv_image_format ms_format; unsigned int hshift; unsigned int vshift; tv_bool success; dst_pf = dst_format.pixel_format; src_pf = src_format.pixel_format; hshift = MAX (dst_pf->uv_hshift, src_pf->uv_hshift); vshift = MAX (dst_pf->uv_vshift, src_pf->uv_vshift); md_format = dst_format; md_format.width = MIN (dst_format.width, src_format.width); md_format.height = MIN (dst_format.height, src_format.height); if (0) fprintf (stderr, "%d %d %d %d\n", md_format.width, md_format.height, hshift, vshift); memset (dst_buffer, 0xAA, dst_buffer_end - dst_buffer); switch (src_format.pixel_format->pixfmt) { case TV_PIXFMT_HM12: hshift = 4; vshift = 4; switch (dst_format.pixel_format->pixfmt) { case TV_PIXFMT_YUV420: case TV_PIXFMT_YVU420: success = _tv_hm12_to_yuv420 (dst, &dst_format, src, &src_format); break; default: assert (0); } break; case TV_PIXFMT_NV12: hshift = 1; switch (dst_format.pixel_format->pixfmt) { case TV_PIXFMT_YUV420: case TV_PIXFMT_YVU420: success = _tv_nv_to_yuv420 (dst, &dst_format, src, &src_format); break; case TV_PIXFMT_YUYV: case TV_PIXFMT_UYVY: case TV_PIXFMT_YVYU: case TV_PIXFMT_VYUY: hshift = 1; success = _tv_nv_to_yuyv (dst, &dst_format, src, &src_format); break; case TV_PIXFMT_RGBA32_LE: case TV_PIXFMT_RGBA32_BE: case TV_PIXFMT_BGRA32_LE: case TV_PIXFMT_BGRA32_BE: case TV_PIXFMT_RGB24_LE: case TV_PIXFMT_RGB24_BE: case TV_PIXFMT_BGR16_LE: case TV_PIXFMT_BGR16_BE: case TV_PIXFMT_BGRA16_LE: case TV_PIXFMT_BGRA16_BE: success = _tv_nv_to_rgb (dst, &dst_format, src, &src_format); break; default: assert (0); } break; case TV_PIXFMT_YUV420: case TV_PIXFMT_YVU420: switch (dst_format.pixel_format->pixfmt) { case TV_PIXFMT_YUV420: case TV_PIXFMT_YVU420: success = _tv_yuv420_to_yuv420 (dst, &dst_format, src, &src_format); break; case TV_PIXFMT_YUYV: case TV_PIXFMT_UYVY: case TV_PIXFMT_YVYU: case TV_PIXFMT_VYUY: hshift = 1; success = _tv_yuv420_to_yuyv (dst, &dst_format, src, &src_format); break; case TV_PIXFMT_RGBA32_LE: case TV_PIXFMT_RGBA32_BE: case TV_PIXFMT_BGRA32_LE: case TV_PIXFMT_BGRA32_BE: case TV_PIXFMT_RGB24_LE: case TV_PIXFMT_RGB24_BE: case TV_PIXFMT_BGR16_LE: case TV_PIXFMT_BGR16_BE: case TV_PIXFMT_BGRA16_LE: case TV_PIXFMT_BGRA16_BE: success = _tv_yuv420_to_rgb (dst, &dst_format, src, &src_format); break; default: assert (0); } break; case TV_PIXFMT_YUYV: case TV_PIXFMT_UYVY: case TV_PIXFMT_YVYU: case TV_PIXFMT_VYUY: hshift = 1; switch (dst_format.pixel_format->pixfmt) { case TV_PIXFMT_YUV420: case TV_PIXFMT_YVU420: success = _tv_yuyv_to_yuv420 (dst, &dst_format, src, &src_format); break; case TV_PIXFMT_YUYV: case TV_PIXFMT_UYVY: case TV_PIXFMT_YVYU: case TV_PIXFMT_VYUY: success = _tv_yuyv_to_yuyv (dst, &dst_format, src, &src_format); break; case TV_PIXFMT_RGBA32_LE: case TV_PIXFMT_RGBA32_BE: case TV_PIXFMT_BGRA32_LE: case TV_PIXFMT_BGRA32_BE: case TV_PIXFMT_RGB24_LE: case TV_PIXFMT_RGB24_BE: case TV_PIXFMT_BGR16_LE: case TV_PIXFMT_BGR16_BE: case TV_PIXFMT_BGRA16_LE: case TV_PIXFMT_BGRA16_BE: success = _tv_yuyv_to_rgb (dst, &dst_format, src, &src_format); break; default: assert (0); } break; case TV_PIXFMT_RGBA32_LE: case TV_PIXFMT_RGBA32_BE: case TV_PIXFMT_BGRA32_LE: case TV_PIXFMT_BGRA32_BE: case TV_PIXFMT_RGB24_LE: case TV_PIXFMT_RGB24_BE: switch (dst_format.pixel_format->pixfmt) { case TV_PIXFMT_RGBA32_LE: case TV_PIXFMT_RGBA32_BE: case TV_PIXFMT_BGRA32_LE: case TV_PIXFMT_BGRA32_BE: case TV_PIXFMT_RGB24_LE: case TV_PIXFMT_RGB24_BE: success = _tv_rgb32_to_rgb32 (dst, &dst_format, src, &src_format); break; case TV_PIXFMT_BGR16_LE: case TV_PIXFMT_BGR16_BE: case TV_PIXFMT_BGRA16_LE: case TV_PIXFMT_BGRA16_BE: success = _tv_rgb32_to_rgb16 (dst, &dst_format, src, &src_format); break; default: assert (0); } break; case TV_PIXFMT_SBGGR: hshift = 1; vshift = 1; success = _tv_sbggr_to_rgb (dst, &dst_format, src, &src_format); break; default: assert (0); } #define FAIL_IF(expr) \ if (expr) { \ assert (!success); \ assert_is_aa (dst_buffer, dst_buffer_end); \ return; \ } FAIL_IF (0 == md_format.width); FAIL_IF (0 == md_format.height); FAIL_IF (md_format.width & RES (hshift)); FAIL_IF (md_format.height & RES (vshift)); FAIL_IF (byte_width (&dst_format, 0) > dst_format.bytes_per_line[0]); FAIL_IF (byte_width (&src_format, 0) > src_format.bytes_per_line[0]); if (dst_pf->n_planes > 2) FAIL_IF (byte_width (&dst_format, 2) > dst_format.bytes_per_line[2]); if (dst_pf->n_planes > 1) FAIL_IF (byte_width (&dst_format, 1) > dst_format.bytes_per_line[1]); if (src_pf->n_planes > 2) FAIL_IF (byte_width (&src_format, 2) > src_format.bytes_per_line[2]); if (src_pf->n_planes > 1) FAIL_IF (byte_width (&src_format, 1) > src_format.bytes_per_line[1]); assert (success); check_padding (&md_format); ms_format = src_format; /* Required for proper SBGGR clipping. */ ms_format.width = md_format.width; ms_format.height = md_format.height; compare_images (dst, &md_format, src, &ms_format); } #if 1 # define overflow_packed() test (dst_buffer, src_buffer) # define overflow_planar() test (dst_buffer, src_buffer) #else static void overflow_packed (void) { test (dst_buffer, src_buffer); if (fast_check) return; if (src_format.size < buffer_size) test (dst_buffer, src_buffer_end - ((src_format.size + 15) & -16)); if (dst_format.size < buffer_size) test (dst_buffer_end - ((dst_format.size + 15) & -16), src_buffer); if (dst_format.size < buffer_size && src_format.size < buffer_size) test (dst_buffer_end - ((dst_format.size + 15) & -16), src_buffer_end - ((src_format.size + 15) & -16)); } #endif static void unaligned_packed (void) { static int unaligned[][2] = { { 0, 0 }, { 5, 0 }, { 0, 5 }, { 5, 5 }, { 8, 0 }, { 0, 8 }, { 16, 0 }, { 0, 16 }, }; unsigned int dst_bpp; unsigned int src_bpp; unsigned int i; unsigned int j; dst_bpp = bytes_per_pixel (&dst_format); src_bpp = bytes_per_pixel (&src_format); for (i = 0; i < N_ELEMENTS (unaligned); ++i) { for (j = 0; j < N_ELEMENTS (unaligned); ++j) { ERASE (dst_format.offset); ERASE (dst_format.bytes_per_line); dst_format.offset[0] = unaligned[j][0]; dst_format.bytes_per_line[0] = dst_format.width * dst_bpp + unaligned[j][1]; dst_format.size = min_size (&dst_format); ERASE (src_format.offset); ERASE (src_format.bytes_per_line); src_format.offset[0] = unaligned[i][0]; src_format.bytes_per_line[0] = src_format.width * src_bpp + unaligned[i][1]; src_format.size = min_size (&src_format); overflow_packed (); if (fast_check) return; } } dst_format.offset[0] = 0; dst_format.bytes_per_line[0] = dst_format.width * dst_bpp; dst_format.size = min_size (&dst_format); src_format.offset[0] = 0; src_format.bytes_per_line[0] = src_format.width * src_bpp; src_format.size = min_size (&src_format); if (dst_format.width >= 16) { dst_format.bytes_per_line[0] = (dst_format.width - 16) * dst_bpp; overflow_packed (); } if (src_format.width >= 16) { dst_format.bytes_per_line[0] = dst_format.width * dst_bpp; src_format.bytes_per_line[0] = (src_format.width - 16) * src_bpp; overflow_packed (); } /* TO DO: padding = inaccessible page. */ } static void unaligned_planar (void) { static int unaligned[][6] = { { 0, 0, 0, 0, 0, 0 }, { 5, 0, 0, 0, 0, 0 }, { 0, 5, 0, 0, 0, 0 }, { 5, 5, 0, 0, 0, 0 }, { 0, 0, 5, 0, 0, 0 }, { 0, 0, 0, 5, 0, 0 }, { 0, 0, 0, 0, 5, 0 }, { 0, 0, 0, 0, 0, 5 }, { 8, 0, 8, 0, 8, 0 }, { 0, 8, 0, 8, 0, 8 }, { 16, 0, 16, 0, 16, 0 }, { 0, 16, 0, 16, 0, 16 }, }; unsigned int dst_bpp; unsigned int src_bpp; unsigned int dst_y_bpl; unsigned int dst_uv_bpl; unsigned int src_y_bpl; unsigned int src_uv_bpl; unsigned int short_bpl; unsigned int i; unsigned int j; dst_bpp = bytes_per_pixel (&dst_format); dst_y_bpl = dst_format.width * dst_bpp; dst_uv_bpl = (dst_format.width * dst_bpp) >> dst_format.pixel_format->uv_hshift; src_bpp = bytes_per_pixel (&src_format); src_y_bpl = src_format.width * src_bpp; src_uv_bpl = (src_format.width * src_bpp) >> src_format.pixel_format->uv_hshift; for (i = 0; i < N_ELEMENTS (unaligned); ++i) { for (j = 0; j < N_ELEMENTS (unaligned); ++j) { ERASE (dst_format.offset); ERASE (dst_format.bytes_per_line); dst_format.offset[0] = unaligned[j][0]; dst_format.bytes_per_line[0] = dst_y_bpl + unaligned[j][1]; if (dst_format.pixel_format->n_planes > 1) { dst_format.offset[1] = (dst_y_bpl * 16) * (dst_format.height + 1) + unaligned[j][2]; dst_format.bytes_per_line[1] = dst_uv_bpl + unaligned[j][3]; dst_format.offset[2] = (dst_y_bpl * 16) * (dst_format.height + 1) * 2 + unaligned[j][4]; dst_format.bytes_per_line[2] = dst_uv_bpl + unaligned[j][5]; } dst_format.size = min_size (&dst_format); ERASE (src_format.offset); ERASE (src_format.bytes_per_line); src_format.offset[0] = unaligned[i][0]; src_format.bytes_per_line[0] = src_y_bpl + unaligned[i][1]; if (src_format.pixel_format->n_planes > 1) { src_format.offset[1] = unaligned[i][2]; src_format.bytes_per_line[1] = src_uv_bpl + unaligned[i][3]; src_format.offset[2] = unaligned[i][4]; src_format.bytes_per_line[2] = src_uv_bpl + unaligned[i][5]; } src_format.size = min_size (&src_format); overflow_planar (); if (fast_check) return; } } dst_format.offset[0] = 2 * dst_y_bpl * dst_format.height; dst_format.bytes_per_line[0] = dst_y_bpl; if (dst_format.pixel_format->n_planes > 1) { dst_format.offset[1] = 1 * dst_y_bpl * dst_format.height; dst_format.bytes_per_line[1] = dst_uv_bpl; dst_format.offset[2] = 0 * dst_y_bpl * dst_format.height; dst_format.bytes_per_line[2] = dst_uv_bpl; } dst_format.size = min_size (&dst_format); src_format.offset[0] = 0; src_format.bytes_per_line[0] = src_y_bpl; if (dst_format.pixel_format->n_planes > 1) { src_format.offset[1] = 0; src_format.bytes_per_line[1] = src_uv_bpl; src_format.offset[2] = 0; src_format.bytes_per_line[2] = src_uv_bpl; } src_format.size = min_size (&src_format); if (dst_format.width >= 16) { dst_format.bytes_per_line[0] = (dst_format.width - 16) * dst_bpp; overflow_planar (); dst_format.bytes_per_line[0] = dst_y_bpl; if (dst_format.pixel_format->n_planes > 1) { short_bpl = ((dst_format.width - 16) * dst_bpp) >> dst_format.pixel_format->uv_hshift; dst_format.bytes_per_line[1] = short_bpl; overflow_planar (); dst_format.bytes_per_line[1] = dst_uv_bpl; dst_format.bytes_per_line[2] = short_bpl; overflow_planar (); dst_format.bytes_per_line[2] = dst_uv_bpl; } } dst_format.bytes_per_line[0] = dst_format.width * dst_bpp; if (src_format.width >= 16) { src_format.bytes_per_line[0] = (src_format.width - 16) * src_bpp; overflow_planar (); src_format.bytes_per_line[0] = src_y_bpl; if (dst_format.pixel_format->n_planes > 1) { short_bpl = ((src_format.width - 16) * src_bpp) >> src_format.pixel_format->uv_hshift; src_format.bytes_per_line[1] = short_bpl; overflow_planar (); src_format.bytes_per_line[1] = src_uv_bpl; src_format.bytes_per_line[2] = short_bpl; overflow_planar (); src_format.bytes_per_line[2] = short_bpl; } } /* TO DO: padding = inaccessible page. */ } static void all_sizes (void) { static unsigned int heights[] = { 0, 1, 2, 11, 12 }; unsigned int i; tv_bool planar; planar = ((dst_format.pixel_format->n_planes | src_format.pixel_format->n_planes) > 1); for (i = 0; i < N_ELEMENTS (heights); ++i) { static unsigned int widths[] = { 0, 1, 3, 8, 13, 16, 21, 155, 160, 165 }; unsigned int j; if (fast_check) src_format.height = 12; else src_format.height = heights[i]; for (j = 0; j < N_ELEMENTS (widths); ++j) { fputc ('.', stderr); fflush (stderr); if (fast_check) src_format.width = 32; else src_format.width = widths[j]; dst_format.width = src_format.width; dst_format.height = src_format.height; if (planar) unaligned_planar (); else unaligned_packed (); if (fast_check) return; if (src_format.width > 5) { dst_format.width = src_format.width - 5; dst_format.height = src_format.height; if (planar) unaligned_planar (); else unaligned_packed (); } dst_format.width = src_format.width + 5; dst_format.height = src_format.height; if (planar) unaligned_planar (); else unaligned_packed (); if (src_format.height > 5) { dst_format.width = src_format.width; dst_format.height = src_format.height - 5; if (planar) unaligned_planar (); else unaligned_packed (); } dst_format.width = src_format.width; dst_format.height = src_format.height + 5; if (planar) unaligned_planar (); else unaligned_packed (); } } } static void all_formats (void) { static const tv_pixfmt src_formats[] = { TV_PIXFMT_HM12, TV_PIXFMT_NV12, TV_PIXFMT_YUV420, TV_PIXFMT_YVU420, TV_PIXFMT_YUYV, TV_PIXFMT_UYVY, TV_PIXFMT_YVYU, TV_PIXFMT_VYUY, TV_PIXFMT_RGBA32_LE, TV_PIXFMT_RGBA32_BE, TV_PIXFMT_BGRA32_LE, TV_PIXFMT_BGRA32_BE, TV_PIXFMT_RGB24_LE, TV_PIXFMT_RGB24_BE, TV_PIXFMT_SBGGR, }; static const tv_pixfmt dst_formats[] = { TV_PIXFMT_YUV420, TV_PIXFMT_YVU420, TV_PIXFMT_YUYV, TV_PIXFMT_UYVY, TV_PIXFMT_YVYU, TV_PIXFMT_VYUY, TV_PIXFMT_RGBA32_LE, TV_PIXFMT_RGBA32_BE, TV_PIXFMT_BGRA32_LE, TV_PIXFMT_BGRA32_BE, TV_PIXFMT_RGB24_LE, TV_PIXFMT_RGB24_BE, TV_PIXFMT_BGR16_LE, TV_PIXFMT_BGR16_BE, TV_PIXFMT_BGRA16_LE, TV_PIXFMT_BGRA16_BE, }; tv_image_format format; unsigned int i; unsigned int j; CLEAR (format); for (i = 0; i < N_ELEMENTS (src_formats); ++i) { for (j = 0; j < N_ELEMENTS (dst_formats); ++j) { if (TV_PIXFMT_IS_RGB (src_formats[i]) && !TV_PIXFMT_IS_RGB (dst_formats[j])) continue; /* later */ if (TV_PIXFMT_HM12 == src_formats[i] && TV_PIXFMT_YUV420 != dst_formats[j] && TV_PIXFMT_YVU420 != dst_formats[j]) continue; /* later */ dst_format.pixel_format = tv_pixel_format_from_pixfmt (dst_formats[j]); src_format.pixel_format = tv_pixel_format_from_pixfmt (src_formats[i]); if (!fast_check) { fprintf (stderr, "%s -> %s ", src_format.pixel_format->name, dst_format.pixel_format->name); } all_sizes (); if (!fast_check) fputc ('\n', stderr); } } } int main (int argc, char ** argv) { unsigned int scatter_size; unsigned int i; buffer_size = 32 * 4096; src_buffer = guard_alloc (buffer_size); src_buffer_end = src_buffer + buffer_size; randomize (src_buffer, src_buffer_end); make_unwriteable (src_buffer, buffer_size); dst_buffer = guard_alloc (buffer_size); dst_buffer_end = dst_buffer + buffer_size; scatter_width = getpagesize (); scatter_height = 24; scatter_size = scatter_width * (scatter_height - 1); src_scatter_buffer = guard_alloc (scatter_size); src_scatter_buffer_end = src_scatter_buffer + scatter_size; for (i = 0; i < scatter_size; i += scatter_width * 2) { make_unwriteable (src_scatter_buffer + i, scatter_width); make_inaccessible (src_scatter_buffer + i + scatter_width, scatter_width); } dst_scatter_buffer = guard_alloc (scatter_size); dst_scatter_buffer_end = dst_scatter_buffer + scatter_size; for (i = 0; i < scatter_size; i += scatter_width * 2) { make_inaccessible (src_scatter_buffer + i + scatter_width, scatter_width); } /* Use generic version. */ cpu_features = (cpu_feature_set) 0; if (argc > 1) { /* Use optimized version, if available. */ cpu_features = cpu_feature_set_from_string (argv[1]); } all_formats (); if (fast_check) fputc ('\n', stderr); return EXIT_SUCCESS; } zapping-0.10cvs6/compile 755 764 144 7173 10304524023 10364 #! /bin/sh # Wrapper for compilers which do not understand `-c -o'. scriptversion=2005-05-14.22 # Copyright (C) 1999, 2000, 2003, 2004, 2005 Free Software Foundation, Inc. # Written by Tom Tromey . # # 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 this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # This file is maintained in Automake, please report # bugs to or send patches to # . case $1 in '') echo "$0: No command. Try \`$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: compile [--help] [--version] PROGRAM [ARGS] Wrapper for compilers which do not understand `-c -o'. Remove `-o dest.o' from ARGS, run PROGRAM with the remaining arguments, and rename the output as expected. If you are trying to build a whole package this is not the right script to run: please start by reading the file `INSTALL'. Report bugs to . EOF exit $? ;; -v | --v*) echo "compile $scriptversion" exit $? ;; esac ofile= cfile= eat= for arg do if test -n "$eat"; then eat= else case $1 in -o) # configure might choose to run compile as `compile cc -o foo foo.c'. # So we strip `-o arg' only if arg is an object. eat=1 case $2 in *.o | *.obj) ofile=$2 ;; *) set x "$@" -o "$2" shift ;; esac ;; *.c) cfile=$1 set x "$@" "$1" shift ;; *) set x "$@" "$1" shift ;; esac fi shift done if test -z "$ofile" || test -z "$cfile"; then # If no `-o' option was seen then we might have been invoked from a # pattern rule where we don't need one. That is ok -- this is a # normal compilation that the losing compiler can handle. If no # `.c' file was seen then we are probably linking. That is also # ok. exec "$@" fi # Name of file we expect compiler to create. cofile=`echo "$cfile" | sed -e 's|^.*/||' -e 's/\.c$/.o/'` # Create the lock directory. # Note: use `[/.-]' here to ensure that we don't use the same name # that we are using for the .o file. Also, base the name on the expected # object file name, since that is what matters with a parallel build. lockdir=`echo "$cofile" | sed -e 's|[/.-]|_|g'`.d while true; do if mkdir "$lockdir" >/dev/null 2>&1; then break fi sleep 1 done # FIXME: race condition here if user kills between mkdir and trap. trap "rmdir '$lockdir'; exit 1" 1 2 15 # Run the compile. "$@" ret=$? if test -f "$cofile"; then mv "$cofile" "$ofile" elif test -f "${cofile}bj"; then mv "${cofile}bj" "$ofile" fi rmdir "$lockdir" exit $ret # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-end: "$" # End: zapping-0.10cvs6/depcomp 755 764 144 37100 10304524023 10374 #! /bin/sh # depcomp - compile a program generating dependencies as side-effects scriptversion=2005-07-09.11 # Copyright (C) 1999, 2000, 2003, 2004, 2005 Free Software Foundation, Inc. # 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 this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA # 02110-1301, USA. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Originally written by Alexandre Oliva . case $1 in '') echo "$0: No command. Try \`$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: depcomp [--help] [--version] PROGRAM [ARGS] Run PROGRAMS ARGS to compile a file, generating dependencies as side-effects. Environment variables: depmode Dependency tracking mode. source Source file read by `PROGRAMS ARGS'. object Object file output by `PROGRAMS ARGS'. DEPDIR directory where to store dependencies. depfile Dependency file to output. tmpdepfile Temporary file to use when outputing dependencies. libtool Whether libtool is used (yes/no). Report bugs to . EOF exit $? ;; -v | --v*) echo "depcomp $scriptversion" exit $? ;; esac if test -z "$depmode" || test -z "$source" || test -z "$object"; then echo "depcomp: Variables source, object and depmode must be set" 1>&2 exit 1 fi # Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. depfile=${depfile-`echo "$object" | sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} rm -f "$tmpdepfile" # Some modes work just like other modes, but use different flags. We # parameterize here, but still list the modes in the big case below, # to make depend.m4 easier to write. Note that we *cannot* use a case # here, because this file can only contain one case statement. if test "$depmode" = hp; then # HP compiler uses -M and no extra arg. gccflag=-M depmode=gcc fi if test "$depmode" = dashXmstdout; then # This is just like dashmstdout with a different argument. dashmflag=-xM depmode=dashmstdout fi case "$depmode" in gcc3) ## gcc 3 implements dependency tracking that does exactly what ## we want. Yay! Note: for some reason libtool 1.4 doesn't like ## it if -MD -MP comes after the -MF stuff. Hmm. "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi mv "$tmpdepfile" "$depfile" ;; gcc) ## There are various ways to get dependency output from gcc. Here's ## why we pick this rather obscure method: ## - Don't want to use -MD because we'd like the dependencies to end ## up in a subdir. Having to rename by hand is ugly. ## (We might end up doing this anyway to support other compilers.) ## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like ## -MM, not -M (despite what the docs say). ## - Using -M directly means running the compiler twice (even worse ## than renaming). if test -z "$gccflag"; then gccflag=-MD, fi "$@" -Wp,"$gccflag$tmpdepfile" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz ## The second -e expression handles DOS-style file names with drive letters. sed -e 's/^[^:]*: / /' \ -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" ## This next piece of magic avoids the `deleted header file' problem. ## The problem is that when a header file which appears in a .P file ## is deleted, the dependency causes make to die (because there is ## typically no way to rebuild the header). We avoid this by adding ## dummy dependencies for each header file. Too bad gcc doesn't do ## this for us directly. tr ' ' ' ' < "$tmpdepfile" | ## Some versions of gcc put a space before the `:'. On the theory ## that the space means something, we add a space to the output as ## well. ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; sgi) if test "$libtool" = yes; then "$@" "-Wp,-MDupdate,$tmpdepfile" else "$@" -MDupdate "$tmpdepfile" fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files echo "$object : \\" > "$depfile" # Clip off the initial element (the dependent). Don't try to be # clever and replace this with sed code, as IRIX sed won't handle # lines with more than a fixed number of characters (4096 in # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; # the IRIX cc adds comments like `#:fec' to the end of the # dependency line. tr ' ' ' ' < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \ tr ' ' ' ' >> $depfile echo >> $depfile # The second pass generates a dummy entry for each header file. tr ' ' ' ' < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ >> $depfile else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile # "include basename.Plo" scheme. echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; aix) # The C for AIX Compiler uses -M and outputs the dependencies # in a .u file. In older versions, this file always lives in the # current directory. Also, the AIX compiler puts `$object:' at the # start of each line; $object doesn't have directory information. # Version 6 uses the directory in both cases. stripped=`echo "$object" | sed 's/\(.*\)\..*$/\1/'` tmpdepfile="$stripped.u" if test "$libtool" = yes; then "$@" -Wc,-M else "$@" -M fi stat=$? if test -f "$tmpdepfile"; then : else stripped=`echo "$stripped" | sed 's,^.*/,,'` tmpdepfile="$stripped.u" fi if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi if test -f "$tmpdepfile"; then outname="$stripped.o" # Each line is of the form `foo.o: dependent.h'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile" sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile" else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile # "include basename.Plo" scheme. echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; icc) # Intel's C compiler understands `-MD -MF file'. However on # icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c # ICC 7.0 will fill foo.d with something like # foo.o: sub/foo.c # foo.o: sub/foo.h # which is wrong. We want: # sub/foo.o: sub/foo.c # sub/foo.o: sub/foo.h # sub/foo.c: # sub/foo.h: # ICC 7.1 will output # foo.o: sub/foo.c sub/foo.h # and will wrap long lines using \ : # foo.o: sub/foo.c ... \ # sub/foo.h ... \ # ... "$@" -MD -MF "$tmpdepfile" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" # Each line is of the form `foo.o: dependent.h', # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process this invocation # correctly. Breaking it into two sed invocations is a workaround. sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; tru64) # The Tru64 compiler uses -MD to generate dependencies as a side # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'. # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put # dependencies in `foo.d' instead, so we check for that too. # Subdirectories are respected. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` test "x$dir" = "x$object" && dir= base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` if test "$libtool" = yes; then # With Tru64 cc, shared objects can also be used to make a # static library. This mecanism is used in libtool 1.4 series to # handle both shared and static libraries in a single compilation. # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d. # # With libtool 1.5 this exception was removed, and libtool now # generates 2 separate objects for the 2 libraries. These two # compilations output dependencies in in $dir.libs/$base.o.d and # in $dir$base.o.d. We have to check for both files, because # one of the two compilations can be disabled. We should prefer # $dir$base.o.d over $dir.libs/$base.o.d because the latter is # automatically cleaned when .libs/ is deleted, while ignoring # the former would cause a distcleancheck panic. tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4 tmpdepfile2=$dir$base.o.d # libtool 1.5 tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5 tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504 "$@" -Wc,-MD else tmpdepfile1=$dir$base.o.d tmpdepfile2=$dir$base.d tmpdepfile3=$dir$base.d tmpdepfile4=$dir$base.d "$@" -MD fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" # That's a tab and a space in the []. sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" else echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; #nosideeffect) # This comment above is used by automake to tell side-effect # dependency tracking mechanisms from slower ones. dashmstdout) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout, regardless of -o. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test $1 != '--mode=compile'; do shift done shift fi # Remove `-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done test -z "$dashmflag" && dashmflag=-M # Require at least two characters before searching for `:' # in the target name. This is to cope with DOS-style filenames: # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise. "$@" $dashmflag | sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" tr ' ' ' ' < "$tmpdepfile" | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; dashXmstdout) # This case only exists to satisfy depend.m4. It is never actually # run, as this mode is specially recognized in the preamble. exit 1 ;; makedepend) "$@" || exit $? # Remove any Libtool call if test "$libtool" = yes; then while test $1 != '--mode=compile'; do shift done shift fi # X makedepend shift cleared=no for arg in "$@"; do case $cleared in no) set ""; shift cleared=yes ;; esac case "$arg" in -D*|-I*) set fnord "$@" "$arg"; shift ;; # Strip any option that makedepend may not understand. Remove # the object too, otherwise makedepend will parse it as a source file. -*|$object) ;; *) set fnord "$@" "$arg"; shift ;; esac done obj_suffix="`echo $object | sed 's/^.*\././'`" touch "$tmpdepfile" ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" sed '1,2d' "$tmpdepfile" | tr ' ' ' ' | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" "$tmpdepfile".bak ;; cpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test $1 != '--mode=compile'; do shift done shift fi # Remove `-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done "$@" -E | sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' | sed '$ s: \\$::' > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" cat < "$tmpdepfile" >> "$depfile" sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; msvisualcpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout, regardless of -o, # because we must use -o when running libtool. "$@" || exit $? IFS=" " for arg do case "$arg" in "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") set fnord "$@" shift shift ;; *) set fnord "$@" "$arg" shift shift ;; esac done "$@" -E | sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile" echo " " >> "$depfile" . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile" rm -f "$tmpdepfile" ;; none) exec "$@" ;; *) echo "Unknown depmode $depmode" 1>&2 exit 1 ;; esac exit 0 # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-end: "$" # End: zapping-0.10cvs6/zapping.desktop.in.in 644 764 144 620 10432663175 13047 [Desktop Entry] Version=0.9 Encoding=UTF-8 _Name=Zapping TV Viewer _Comment=Lets you watch TV in a window Type=Application Exec=zapping Icon=zapping/gnome-television.png Terminal=false StartupNotify=true Categories=GNOME;Application;Multimedia;AudioVideo;Video;TV; X-GNOME-Bugzilla-Bugzilla=GNOME X-GNOME-Bugzilla-Product=Zapping X-GNOME-Bugzilla-Version=@VERSION@ X-GNOME-Bugzilla-Component=general zapping-0.10cvs6/zapping.spec.in 644 764 144 5265 10432663202 11744 Name: zapping Summary: TV viewer for Gnome Version: @VERSION@ Release: 1 License: GPL Group: Applications/Multimedia URL: http://zapping.sourceforge.net/ Source: http://prdownloads.sourceforge.net/zapping/%{name}-%{version}.tar.bz2 Packager: Michael H. Schimek Buildroot: %{_tmppath}/%{name}-%{version}-root BuildPrereq: libglade-devel libxml-devel PreReq: /sbin/install-info %description Zapping is a TV viewer for the GNOME desktop. %prep %setup -q %build %configure make %install rm -rf %{buildroot} make DESTDIR=%{buildroot} install %find_lang %{name} %post pushd %{_bindir} >/dev/null 2>&1 ln -sf @CONSOLEHELPER_LOCATION@ zapping_setup_fb popd >/dev/null 2>&1 %preun rm -f %{_bindir}/zapping_setup_fb >/dev/null 2>&1 %clean rm -rf %{buildroot} %files %defattr (-, root, root) %doc AUTHORS BUGS ChangeLog COPYING NEWS README README.plugins THANKS TODO %doc plugins/alirc/README.alirc %config(noreplace) /etc/pam.d/zapping_setup_fb %config(noreplace) /etc/security/console.apps/zapping_setup_fb %{_bindir}/* %{_sbindir}/* %{_libdir}/* %{_prefix}/share/* %{_mandir}/* %changelog * Sat Jul 10 2004 Michael H. Schimek - Updated for 0.7. * Thu Nov 20 2003 Michael H. Schimek - s/GNOME_PREFIX/prefix. * Fri Oct 4 2002 Michael H. Schimek - Changed prefx to @GNOME_PREFIX@ - Added rte, zvbi dependencies. * Tue Jun 24 2002 Michael H. Schimek - Removed po/zapping.pot from docs list (purpose?) * Tue Jun 18 2002 Michael H. Schimek - Requires gettext 0.11.2 * Sun Mar 10 2002 Michael H. Schimek - Picked up incorrect dependency on librte-0.4cvs, corrected. * Sat Mar 9 2002 Michael H. Schimek - Packager changed * Sat Jul 28 2001 Iaki Garca Etxebarria - Added zapzilla as a soft link to zapping * Fri Feb 2 2001 Tim Powers - pamified zapping_setup_fb, now no need for suid root bits, and no crippling of the app :) * Thu Sep 12 2000 Iaki Garca Etxebarria - Removed the LibPng dependency, now libjpeg is used. * Mon Sep 11 2000 Iaki Garca Etxebarria - Added the dependency to GdkPixbuf and LibPng * Mon Jun 19 2000 Iaki Garca Etxebarria - Added the desktop entry and removed the specified --datadir * Mon Jun 12 2000 Iaki Garca Etxebarria - Fixed, it didn't include the translations properly. * Thu Jun 06 2000 Iaki Garca Etxebarria - Created, it works fine. zapping-0.10cvs6/intltool-extract.in 644 764 144 53630 10324352654 12704 #!@INTLTOOL_PERL@ -w # -*- Mode: perl; indent-tabs-mode: nil; c-basic-offset: 4 -*- # # The Intltool Message Extractor # # Copyright (C) 2000-2001, 2003 Free Software Foundation. # # Intltool 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 of the # License, or (at your option) any later version. # # Intltool 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 this program; if not, write to the Free Software # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # # Authors: Kenneth Christiansen # Darin Adler # ## Release information my $PROGRAM = "intltool-extract"; my $PACKAGE = "intltool"; my $VERSION = "0.34.1"; ## Loaded modules use strict; use File::Basename; use Getopt::Long; ## Scalars used by the option stuff my $TYPE_ARG = "0"; my $LOCAL_ARG = "0"; my $HELP_ARG = "0"; my $VERSION_ARG = "0"; my $UPDATE_ARG = "0"; my $QUIET_ARG = "0"; my $SRCDIR_ARG = "."; my $FILE; my $OUTFILE; my $gettext_type = ""; my $input; my %messages = (); my %loc = (); my %count = (); my %comments = (); my $strcount = 0; my $XMLCOMMENT = ""; ## Use this instead of \w for XML files to handle more possible characters. my $w = "[-A-Za-z0-9._:]"; ## Always print first $| = 1; ## Handle options GetOptions ( "type=s" => \$TYPE_ARG, "local|l" => \$LOCAL_ARG, "help|h" => \$HELP_ARG, "version|v" => \$VERSION_ARG, "update" => \$UPDATE_ARG, "quiet|q" => \$QUIET_ARG, "srcdir=s" => \$SRCDIR_ARG, ) or &error; &split_on_argument; ## Check for options. ## This section will check for the different options. sub split_on_argument { if ($VERSION_ARG) { &version; } elsif ($HELP_ARG) { &help; } elsif ($LOCAL_ARG) { &place_local; &extract; } elsif ($UPDATE_ARG) { &place_normal; &extract; } elsif (@ARGV > 0) { &place_normal; &message; &extract; } else { &help; } } sub place_normal { $FILE = $ARGV[0]; $OUTFILE = "$FILE.h"; } sub place_local { $FILE = $ARGV[0]; $OUTFILE = fileparse($FILE, ()); if (!-e "tmp/") { system("mkdir tmp/"); } $OUTFILE = "./tmp/$OUTFILE.h" } sub determine_type { if ($TYPE_ARG =~ /^gettext\/(.*)/) { $gettext_type=$1 } } ## Sub for printing release information sub version{ print <<_EOF_; ${PROGRAM} (${PACKAGE}) $VERSION Copyright (C) 2000, 2003 Free Software Foundation, Inc. Written by Kenneth Christiansen, 2000. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. _EOF_ exit; } ## Sub for printing usage information sub help { print <<_EOF_; Usage: ${PROGRAM} [OPTION]... [FILENAME] Generates a header file from an XML source file. It grabs all strings between <_translatable_node> and its end tag in XML files. Read manpage (man ${PROGRAM}) for more info. --type=TYPE Specify the file type of FILENAME. Currently supports: "gettext/glade", "gettext/ini", "gettext/keys" "gettext/rfc822deb", "gettext/schemas", "gettext/scheme", "gettext/xml" -l, --local Writes output into current working directory (conflicts with --update) --update Writes output into the same directory the source file reside (conflicts with --local) --srcdir Root of the source tree -v, --version Output version information and exit -h, --help Display this help and exit -q, --quiet Quiet mode Report bugs to http://bugzilla.gnome.org/ (product name "$PACKAGE") or send email to . _EOF_ exit; } ## Sub for printing error messages sub error{ print STDERR "Try `${PROGRAM} --help' for more information.\n"; exit; } sub message { print "Generating C format header file for translation.\n" unless $QUIET_ARG; } sub extract { &determine_type; &convert; open OUT, ">$OUTFILE"; binmode (OUT) if $^O eq 'MSWin32'; &msg_write; close OUT; print "Wrote $OUTFILE\n" unless $QUIET_ARG; } sub convert { ## Reading the file { local (*IN); local $/; #slurp mode open (IN, "<$SRCDIR_ARG/$FILE") || die "can't open $SRCDIR_ARG/$FILE: $!"; $input = ; } &type_ini if $gettext_type eq "ini"; &type_keys if $gettext_type eq "keys"; &type_xml if $gettext_type eq "xml"; &type_glade if $gettext_type eq "glade"; &type_scheme if $gettext_type eq "scheme"; &type_schemas if $gettext_type eq "schemas"; &type_rfc822deb if $gettext_type eq "rfc822deb"; } sub entity_decode_minimal { local ($_) = @_; s/'/'/g; # ' s/"/"/g; # " s/&/&/g; return $_; } sub entity_decode { local ($_) = @_; s/'/'/g; # ' s/"/"/g; # " s/&/&/g; s/<//g; return $_; } sub escape_char { return '\"' if $_ eq '"'; return '\n' if $_ eq "\n"; return '\\' if $_ eq '\\'; return $_; } sub escape { my ($string) = @_; return join "", map &escape_char, split //, $string; } sub type_ini { ### For generic translatable desktop files ### while ($input =~ /^_.*=(.*)$/mg) { $messages{$1} = []; } } sub type_keys { ### For generic translatable mime/keys files ### while ($input =~ /^\s*_\w+=(.*)$/mg) { $messages{$1} = []; } } sub type_xml { ### For generic translatable XML files ### my $tree = readXml($input); parseTree(0, $tree); } sub print_var { my $var = shift; my $vartype = ref $var; if ($vartype =~ /ARRAY/) { my @arr = @{$var}; print "[ "; foreach my $el (@arr) { print_var($el); print ", "; } print "] "; } elsif ($vartype =~ /HASH/) { my %hash = %{$var}; print "{ "; foreach my $key (keys %hash) { print "$key => "; print_var($hash{$key}); print ", "; } print "} "; } else { print $var; } } # Same syntax as getAttributeString in intltool-merge.in.in, similar logic (look for ## differences comment) sub getAttributeString { my $sub = shift; my $do_translate = shift || 1; my $language = shift || ""; my $translate = shift; my $result = ""; foreach my $e (reverse(sort(keys %{ $sub }))) { my $key = $e; my $string = $sub->{$e}; my $quote = '"'; $string =~ s/^[\s]+//; $string =~ s/[\s]+$//; if ($string =~ /^'.*'$/) { $quote = "'"; } $string =~ s/^['"]//g; $string =~ s/['"]$//g; ## differences from intltool-merge.in.in if ($key =~ /^_/) { $comments{entity_decode($string)} = $XMLCOMMENT if $XMLCOMMENT; $messages{entity_decode($string)} = []; $$translate = 2; } ## differences end here from intltool-merge.in.in $result .= " $key=$quote$string$quote"; } return $result; } # Verbatim copy from intltool-merge.in.in sub getXMLstring { my $ref = shift; my $spacepreserve = shift || 0; my @list = @{ $ref }; my $result = ""; my $count = scalar(@list); my $attrs = $list[0]; my $index = 1; $spacepreserve = 1 if ((exists $attrs->{"xml:space"}) && ($attrs->{"xml:space"} =~ /^["']?preserve["']?$/)); $spacepreserve = 0 if ((exists $attrs->{"xml:space"}) && ($attrs->{"xml:space"} =~ /^["']?default["']?$/)); while ($index < $count) { my $type = $list[$index]; my $content = $list[$index+1]; if (! $type ) { # We've got CDATA if ($content) { # lets strip the whitespace here, and *ONLY* here $content =~ s/\s+/ /gs if (!$spacepreserve); $result .= $content; } } elsif ( "$type" ne "1" ) { # We've got another element $result .= "<$type"; $result .= getAttributeString(@{$content}[0], 0); # no nested translatable elements if ($content) { my $subresult = getXMLstring($content, $spacepreserve); if ($subresult) { $result .= ">".$subresult . ""; } else { $result .= "/>"; } } else { $result .= "/>"; } } $index += 2; } return $result; } # Verbatim copy from intltool-merge.in.in, except for MULTIPLE_OUTPUT handling removed # Translate list of nodes if necessary sub translate_subnodes { my $fh = shift; my $content = shift; my $language = shift || ""; my $singlelang = shift || 0; my $spacepreserve = shift || 0; my @nodes = @{ $content }; my $count = scalar(@nodes); my $index = 0; while ($index < $count) { my $type = $nodes[$index]; my $rest = $nodes[$index+1]; traverse($fh, $type, $rest, $language, $spacepreserve); $index += 2; } } # Based on traverse() in intltool-merge.in.in sub traverse { my $fh = shift; # unused, to allow us to sync code between -merge and -extract my $nodename = shift; my $content = shift; my $language = shift || ""; my $spacepreserve = shift || 0; if ($nodename && "$nodename" eq "1") { $XMLCOMMENT = $content; } elsif ($nodename) { # element my @all = @{ $content }; my $attrs = shift @all; my $translate = 0; my $outattr = getAttributeString($attrs, 1, $language, \$translate); if ($nodename =~ /^_/) { $translate = 1; $nodename =~ s/^_//; } my $lookup = ''; $spacepreserve = 0 if ((exists $attrs->{"xml:space"}) && ($attrs->{"xml:space"} =~ /^["']?default["']?$/)); $spacepreserve = 1 if ((exists $attrs->{"xml:space"}) && ($attrs->{"xml:space"} =~ /^["']?preserve["']?$/)); if ($translate) { $lookup = getXMLstring($content, $spacepreserve); if (!$spacepreserve) { $lookup =~ s/^\s+//s; $lookup =~ s/\s+$//s; } if ($lookup && $translate != 2) { $comments{$lookup} = $XMLCOMMENT if $XMLCOMMENT; $messages{$lookup} = []; } elsif ($translate == 2) { translate_subnodes($fh, \@all, $language, 1, $spacepreserve); } } else { $XMLCOMMENT = ""; my $count = scalar(@all); if ($count > 0) { my $index = 0; while ($index < $count) { my $type = $all[$index]; my $rest = $all[$index+1]; traverse($fh, $type, $rest, $language, $spacepreserve); $index += 2; } } } $XMLCOMMENT = ""; } } # Verbatim copy from intltool-merge.in.in, $fh for compatibility sub parseTree { my $fh = shift; my $ref = shift; my $language = shift || ""; my $name = shift @{ $ref }; my $cont = shift @{ $ref }; while (!$name || "$name" eq "1") { $name = shift @{ $ref }; $cont = shift @{ $ref }; } my $spacepreserve = 0; my $attrs = @{$cont}[0]; $spacepreserve = 1 if ((exists $attrs->{"xml:space"}) && ($attrs->{"xml:space"} =~ /^["']?preserve["']?$/)); traverse($fh, $name, $cont, $language, $spacepreserve); } # Verbatim copy from intltool-merge.in.in sub intltool_tree_comment { my $expat = shift; my $data = shift; my $clist = $expat->{Curlist}; my $pos = $#$clist; push @$clist, 1 => $data; } # Verbatim copy from intltool-merge.in.in sub intltool_tree_cdatastart { my $expat = shift; my $clist = $expat->{Curlist}; my $pos = $#$clist; push @$clist, 0 => $expat->original_string(); } # Verbatim copy from intltool-merge.in.in sub intltool_tree_cdataend { my $expat = shift; my $clist = $expat->{Curlist}; my $pos = $#$clist; $clist->[$pos] .= $expat->original_string(); } # Verbatim copy from intltool-merge.in.in sub intltool_tree_char { my $expat = shift; my $text = shift; my $clist = $expat->{Curlist}; my $pos = $#$clist; # Use original_string so that we retain escaped entities # in CDATA sections. # if ($pos > 0 and $clist->[$pos - 1] eq '0') { $clist->[$pos] .= $expat->original_string(); } else { push @$clist, 0 => $expat->original_string(); } } # Verbatim copy from intltool-merge.in.in sub intltool_tree_start { my $expat = shift; my $tag = shift; my @origlist = (); # Use original_string so that we retain escaped entities # in attribute values. We must convert the string to an # @origlist array to conform to the structure of the Tree # Style. # my @original_array = split /\x/, $expat->original_string(); my $source = $expat->original_string(); # Remove leading tag. # $source =~ s|^\s*<\s*(\S+)||s; # Grab attribute key/value pairs and push onto @origlist array. # while ($source) { if ($source =~ /^\s*([\w:-]+)\s*[=]\s*["]/) { $source =~ s|^\s*([\w:-]+)\s*[=]\s*["]([^"]*)["]||s; push @origlist, $1; push @origlist, '"' . $2 . '"'; } elsif ($source =~ /^\s*([\w:-]+)\s*[=]\s*[']/) { $source =~ s|^\s*([\w:-]+)\s*[=]\s*[']([^']*)[']||s; push @origlist, $1; push @origlist, "'" . $2 . "'"; } else { last; } } my $ol = [ { @origlist } ]; push @{ $expat->{Lists} }, $expat->{Curlist}; push @{ $expat->{Curlist} }, $tag => $ol; $expat->{Curlist} = $ol; } # Copied from intltool-merge.in.in and added comment handler. sub readXml { my $xmldoc = shift || return; my $ret = eval 'require XML::Parser'; if(!$ret) { die "You must have XML::Parser installed to run $0\n\n"; } my $xp = new XML::Parser(Style => 'Tree'); $xp->setHandlers(Char => \&intltool_tree_char); $xp->setHandlers(Start => \&intltool_tree_start); $xp->setHandlers(CdataStart => \&intltool_tree_cdatastart); $xp->setHandlers(CdataEnd => \&intltool_tree_cdataend); ## differences from intltool-merge.in.in $xp->setHandlers(Comment => \&intltool_tree_comment); ## differences end here from intltool-merge.in.in my $tree = $xp->parse($xmldoc); #print_var($tree); # Hello thereHowdydo # would be: # [foo, [{}, 1, "comment", head, [{id => "a"}, 0, "Hello ", em, [{}, 0, "there"]], bar, # [{}, 0, "Howdy", ref, [{}]], 0, "do" ] ] return $tree; } sub type_schemas { ### For schemas XML files ### # FIXME: We should handle escaped < (less than) while ($input =~ / \s* (\s*(?:\s*)?(.*?)\s*<\/default>\s*)? (\s*(?:\s*)?(.*?)\s*<\/short>\s*)? (\s*(?:\s*)?(.*?)\s*<\/long>\s*)? <\/locale> /sgx) { my @totranslate = ($3,$6,$9); my @eachcomment = ($2,$5,$8); foreach (@totranslate) { my $currentcomment = shift @eachcomment; next if !$_; s/\s+/ /g; $messages{entity_decode_minimal($_)} = []; $comments{entity_decode_minimal($_)} = $currentcomment if (defined($currentcomment)); } } } sub type_rfc822deb { ### For rfc822-style Debian configuration files ### my $lineno = 1; my $type = ''; while ($input =~ /\G(.*?)(^|\n)(_+)([^:]+):[ \t]*(.*?)(?=\n\S|$)/sg) { my ($pre, $newline, $underscore, $tag, $text) = ($1, $2, $3, $4, $5); while ($pre =~ m/\n/g) { $lineno ++; } $lineno += length($newline); my @str_list = rfc822deb_split(length($underscore), $text); for my $str (@str_list) { $strcount++; $messages{$str} = []; $loc{$str} = $lineno; $count{$str} = $strcount; my $usercomment = ''; while($pre =~ s/(^|\n)#([^\n]*)$//s) { $usercomment = "\n" . $2 . $usercomment; } $comments{$str} = $tag . $usercomment; } $lineno += ($text =~ s/\n//g); } } sub rfc822deb_split { # Debian defines a special way to deal with rfc822-style files: # when a value contain newlines, it consists of # 1. a short form (first line) # 2. a long description, all lines begin with a space, # and paragraphs are separated by a single dot on a line # This routine returns an array of all paragraphs, and reformat # them. # When first argument is 2, the string is a comma separated list of # values. my $type = shift; my $text = shift; $text =~ s/^[ \t]//mg; return (split(/, */, $text, 0)) if $type ne 1; return ($text) if $text !~ /\n/; $text =~ s/([^\n]*)\n//; my @list = ($1); my $str = ''; for my $line (split (/\n/, $text)) { chomp $line; if ($line =~ /^\.\s*$/) { # New paragraph $str =~ s/\s*$//; push(@list, $str); $str = ''; } elsif ($line =~ /^\s/) { # Line which must not be reformatted $str .= "\n" if length ($str) && $str !~ /\n$/; $line =~ s/\s+$//; $str .= $line."\n"; } else { # Continuation line, remove newline $str .= " " if length ($str) && $str !~ /\n$/; $str .= $line; } } $str =~ s/\s*$//; push(@list, $str) if length ($str); return @list; } sub type_glade { ### For translatable Glade XML files ### my $tags = "label|title|text|format|copyright|comments|preview_text|tooltip|message"; while ($input =~ /<($tags)>([^<]+)<\/($tags)>/sg) { # Glade sometimes uses tags that normally mark translatable things for # little bits of non-translatable content. We work around this by not # translating strings that only includes something like label4 or window1. $messages{entity_decode($2)} = [] unless $2 =~ /^(window|label|dialog)[0-9]+$/; } while ($input =~ /(..[^<]*)<\/items>/sg) { for my $item (split (/\n/, $1)) { $messages{entity_decode($item)} = []; } } ## handle new glade files while ($input =~ /<(property|atkproperty)\s+[^>]*translatable\s*=\s*"yes"(?:\s+[^>]*comments\s*=\s*"([^"]*)")?[^>]*>([^<]+)<\/\1>/sg) { $messages{entity_decode($3)} = [] unless $3 =~ /^(window|label)[0-9]+$/; if (defined($2) and !($3 =~ /^(window|label)[0-9]+$/)) { $comments{entity_decode($3)} = entity_decode($2) ; } } while ($input =~ /]*)"\s+description="([^>]+)"\/>/sg) { $messages{entity_decode_minimal($2)} = []; } } sub type_scheme { my ($line, $i, $state, $str, $trcomment, $char); for $line (split(/\n/, $input)) { $i = 0; $state = 0; # 0 - nothing, 1 - string, 2 - translatable string while ($i < length($line)) { if (substr($line,$i,1) eq "\"") { if ($state == 2) { $comments{$str} = $trcomment if ($trcomment); $messages{$str} = []; $str = ''; $state = 0; $trcomment = ""; } elsif ($state == 1) { $str = ''; $state = 0; $trcomment = ""; } else { $state = 1; $str = ''; if ($i>0 && substr($line,$i-1,1) eq '_') { $state = 2; } } } elsif (!$state) { if (substr($line,$i,1) eq ";") { $trcomment = substr($line,$i+1); $trcomment =~ s/^;*\s*//; $i = length($line); } elsif ($trcomment && substr($line,$i,1) !~ /\s|\(|\)|_/) { $trcomment = ""; } } else { if (substr($line,$i,1) eq "\\") { $char = substr($line,$i+1,1); if ($char ne "\"" && $char ne "\\") { $str = $str . "\\"; } $i++; } $str = $str . substr($line,$i,1); } $i++; } } } sub msg_write { my @msgids; if (%count) { @msgids = sort { $count{$a} <=> $count{$b} } keys %count; } else { @msgids = sort keys %messages; } for my $message (@msgids) { my $offsetlines = 1; $offsetlines++ if $message =~ /%/; if (defined ($comments{$message})) { while ($comments{$message} =~ m/\n/g) { $offsetlines++; } } print OUT "# ".($loc{$message} - $offsetlines). " \"$FILE\"\n" if defined $loc{$message}; print OUT "/* ".$comments{$message}." */\n" if defined $comments{$message}; print OUT "/* xgettext:no-c-format */\n" if $message =~ /%/; my @lines = split (/\n/, $message, -1); for (my $n = 0; $n < @lines; $n++) { if ($n == 0) { print OUT "char *s = N_(\""; } else { print OUT " \""; } print OUT escape($lines[$n]); if ($n < @lines - 1) { print OUT "\\n\"\n"; } else { print OUT "\");\n"; } } } } zapping-0.10cvs6/aclocal.m4 644 764 144 1042137 10442575157 10747 # generated automatically by aclocal 1.9.6 -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, # 2005 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- # serial 47 AC_PROG_LIBTOOL # AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED) # ----------------------------------------------------------- # If this macro is not defined by Autoconf, define it here. m4_ifdef([AC_PROVIDE_IFELSE], [], [m4_define([AC_PROVIDE_IFELSE], [m4_ifdef([AC_PROVIDE_$1], [$2], [$3])])]) # AC_PROG_LIBTOOL # --------------- AC_DEFUN([AC_PROG_LIBTOOL], [AC_REQUIRE([_AC_PROG_LIBTOOL])dnl dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX. AC_PROVIDE_IFELSE([AC_PROG_CXX], [AC_LIBTOOL_CXX], [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX ])]) dnl And a similar setup for Fortran 77 support AC_PROVIDE_IFELSE([AC_PROG_F77], [AC_LIBTOOL_F77], [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77 ])]) dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly. dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both. AC_PROVIDE_IFELSE([AC_PROG_GCJ], [AC_LIBTOOL_GCJ], [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], [AC_LIBTOOL_GCJ], [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ], [AC_LIBTOOL_GCJ], [ifdef([AC_PROG_GCJ], [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])]) ifdef([A][M_PROG_GCJ], [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])]) ifdef([LT_AC_PROG_GCJ], [define([LT_AC_PROG_GCJ], defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])]) ])])# AC_PROG_LIBTOOL # _AC_PROG_LIBTOOL # ---------------- AC_DEFUN([_AC_PROG_LIBTOOL], [AC_REQUIRE([AC_LIBTOOL_SETUP])dnl AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl # This can be used to rebuild libtool when needed LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' AC_SUBST(LIBTOOL)dnl # Prevent multiple expansion define([AC_PROG_LIBTOOL], []) ])# _AC_PROG_LIBTOOL # AC_LIBTOOL_SETUP # ---------------- AC_DEFUN([AC_LIBTOOL_SETUP], [AC_PREREQ(2.50)dnl AC_REQUIRE([AC_ENABLE_SHARED])dnl AC_REQUIRE([AC_ENABLE_STATIC])dnl AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_PROG_LD])dnl AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl AC_REQUIRE([AC_PROG_NM])dnl AC_REQUIRE([AC_PROG_LN_S])dnl AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl # Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers! AC_REQUIRE([AC_OBJEXT])dnl AC_REQUIRE([AC_EXEEXT])dnl dnl AC_LIBTOOL_SYS_MAX_CMD_LEN AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE AC_LIBTOOL_OBJDIR AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl _LT_AC_PROG_ECHO_BACKSLASH case $host_os in aix3*) # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi ;; esac # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. Xsed='sed -e 1s/^X//' [sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'] # Same as above, but do not quote variable references. [double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'] # Sed substitution to delay expansion of an escaped shell variable in a # double_quote_subst'ed string. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' # Sed substitution to avoid accidental globbing in evaled expressions no_glob_subst='s/\*/\\\*/g' # Constants: rm="rm -f" # Global variables: default_ofile=libtool can_build_shared=yes # All known linkers require a `.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a ltmain="$ac_aux_dir/ltmain.sh" ofile="$default_ofile" with_gnu_ld="$lt_cv_prog_gnu_ld" AC_CHECK_TOOL(AR, ar, false) AC_CHECK_TOOL(RANLIB, ranlib, :) AC_CHECK_TOOL(STRIP, strip, :) old_CC="$CC" old_CFLAGS="$CFLAGS" # Set sane defaults for various variables test -z "$AR" && AR=ar test -z "$AR_FLAGS" && AR_FLAGS=cru test -z "$AS" && AS=as test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC test -z "$DLLTOOL" && DLLTOOL=dlltool test -z "$LD" && LD=ld test -z "$LN_S" && LN_S="ln -s" test -z "$MAGIC_CMD" && MAGIC_CMD=file test -z "$NM" && NM=nm test -z "$SED" && SED=sed test -z "$OBJDUMP" && OBJDUMP=objdump test -z "$RANLIB" && RANLIB=: test -z "$STRIP" && STRIP=: test -z "$ac_objext" && ac_objext=o # Determine commands to create old-style static archives. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in openbsd*) old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds" ;; *) old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" fi _LT_CC_BASENAME([$compiler]) # Only perform the check for file, if the check method requires it case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then AC_PATH_MAGIC fi ;; esac AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no) AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], enable_win32_dll=yes, enable_win32_dll=no) AC_ARG_ENABLE([libtool-lock], [AC_HELP_STRING([--disable-libtool-lock], [avoid locking (might break parallel builds)])]) test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes AC_ARG_WITH([pic], [AC_HELP_STRING([--with-pic], [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], [pic_mode="$withval"], [pic_mode=default]) test -z "$pic_mode" && pic_mode=default # Use C for the default configuration in the libtool script tagname= AC_LIBTOOL_LANG_C_CONFIG _LT_AC_TAGCONFIG ])# AC_LIBTOOL_SETUP # _LT_AC_SYS_COMPILER # ------------------- AC_DEFUN([_LT_AC_SYS_COMPILER], [AC_REQUIRE([AC_PROG_CC])dnl # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # Allow CC to be a program name with arguments. compiler=$CC ])# _LT_AC_SYS_COMPILER # _LT_CC_BASENAME(CC) # ------------------- # Calculate cc_basename. Skip known compiler wrappers and cross-prefix. AC_DEFUN([_LT_CC_BASENAME], [for cc_temp in $1""; do case $cc_temp in compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` ]) # _LT_COMPILER_BOILERPLATE # ------------------------ # Check for compiler boilerplate output or warnings with # the simple compiler test code. AC_DEFUN([_LT_COMPILER_BOILERPLATE], [ac_outfile=conftest.$ac_objext printf "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $rm conftest* ])# _LT_COMPILER_BOILERPLATE # _LT_LINKER_BOILERPLATE # ---------------------- # Check for linker boilerplate output or warnings with # the simple link test code. AC_DEFUN([_LT_LINKER_BOILERPLATE], [ac_outfile=conftest.$ac_objext printf "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $rm conftest* ])# _LT_LINKER_BOILERPLATE # _LT_AC_SYS_LIBPATH_AIX # ---------------------- # Links a minimal program and checks the executable # for the system default hardcoded library path. In most cases, # this is /usr/lib:/lib, but when the MPI compilers are used # the location of the communication and MPI libs are included too. # If we don't find anything, use the default library path according # to the aix ld manual. AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX], [AC_LINK_IFELSE(AC_LANG_PROGRAM,[ aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'`; fi],[]) if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ])# _LT_AC_SYS_LIBPATH_AIX # _LT_AC_SHELL_INIT(ARG) # ---------------------- AC_DEFUN([_LT_AC_SHELL_INIT], [ifdef([AC_DIVERSION_NOTICE], [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)], [AC_DIVERT_PUSH(NOTICE)]) $1 AC_DIVERT_POP ])# _LT_AC_SHELL_INIT # _LT_AC_PROG_ECHO_BACKSLASH # -------------------------- # Add some code to the start of the generated configure script which # will find an echo command which doesn't interpret backslashes. AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH], [_LT_AC_SHELL_INIT([ # Check that we are running under the correct shell. SHELL=${CONFIG_SHELL-/bin/sh} case X$ECHO in X*--fallback-echo) # Remove one level of quotation (which was required for Make). ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` ;; esac echo=${ECHO-echo} if test "X[$]1" = X--no-reexec; then # Discard the --no-reexec flag, and continue. shift elif test "X[$]1" = X--fallback-echo; then # Avoid inline document here, it may be left over : elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then # Yippee, $echo works! : else # Restart under the correct shell. exec $SHELL "[$]0" --no-reexec ${1+"[$]@"} fi if test "X[$]1" = X--fallback-echo; then # used as fallback echo shift cat </dev/null 2>&1 && unset CDPATH if test -z "$ECHO"; then if test "X${echo_test_string+set}" != Xset; then # find a string as large as possible, as long as the shell can cope with it for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... if (echo_test_string=`eval $cmd`) 2>/dev/null && echo_test_string=`eval $cmd` && (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null then break fi done fi if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then : else # The Solaris, AIX, and Digital Unix default echo programs unquote # backslashes. This makes it impossible to quote backslashes using # echo "$something" | sed 's/\\/\\\\/g' # # So, first we look for a working echo in the user's PATH. lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for dir in $PATH /usr/ucb; do IFS="$lt_save_ifs" if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then echo="$dir/echo" break fi done IFS="$lt_save_ifs" if test "X$echo" = Xecho; then # We didn't find a better echo, so look for alternatives. if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then # This shell has a builtin print -r that does the trick. echo='print -r' elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && test "X$CONFIG_SHELL" != X/bin/ksh; then # If we have ksh, try running configure again with it. ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} export ORIGINAL_CONFIG_SHELL CONFIG_SHELL=/bin/ksh export CONFIG_SHELL exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"} else # Try using printf. echo='printf %s\n' if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then # Cool, printf works : elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && test "X$echo_testing_string" = 'X\t' && echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL export CONFIG_SHELL SHELL="$CONFIG_SHELL" export SHELL echo="$CONFIG_SHELL [$]0 --fallback-echo" elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && test "X$echo_testing_string" = 'X\t' && echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then echo="$CONFIG_SHELL [$]0 --fallback-echo" else # maybe with a smaller string... prev=: for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null then break fi prev="$cmd" done if test "$prev" != 'sed 50q "[$]0"'; then echo_test_string=`eval $prev` export echo_test_string exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"} else # Oops. We lost completely, so just stick with echo. echo=echo fi fi fi fi fi fi # Copy echo and quote the copy suitably for passing to libtool from # the Makefile, instead of quoting the original, which is used later. ECHO=$echo if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo" fi AC_SUBST(ECHO) ])])# _LT_AC_PROG_ECHO_BACKSLASH # _LT_AC_LOCK # ----------- AC_DEFUN([_LT_AC_LOCK], [AC_ARG_ENABLE([libtool-lock], [AC_HELP_STRING([--disable-libtool-lock], [avoid locking (might break parallel builds)])]) test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. case $host in ia64-*-hpux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE="32" ;; *ELF-64*) HPUX_IA64_MODE="64" ;; esac fi rm -rf conftest* ;; *-*-irix6*) # Find out which ABI we are using. echo '[#]line __oline__ "configure"' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then if test "$lt_cv_prog_gnu_ld" = yes; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; *N32*) LD="${LD-ld} -melf32bmipn32" ;; *64-bit*) LD="${LD-ld} -melf64bmip" ;; esac else case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; *N32*) LD="${LD-ld} -n32" ;; *64-bit*) LD="${LD-ld} -64" ;; esac fi fi rm -rf conftest* ;; x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.o` in *32-bit*) case $host in x86_64-*linux*) LD="${LD-ld} -m elf_i386" ;; ppc64-*linux*|powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) LD="${LD-ld} -m elf_s390" ;; sparc64-*linux*) LD="${LD-ld} -m elf32_sparc" ;; esac ;; *64-bit*) case $host in x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; ppc*-*linux*|powerpc*-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*) LD="${LD-ld} -m elf64_s390" ;; sparc*-*linux*) LD="${LD-ld} -m elf64_sparc" ;; esac ;; esac fi rm -rf conftest* ;; *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, [AC_LANG_PUSH(C) AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) AC_LANG_POP]) if test x"$lt_cv_cc_needs_belf" != x"yes"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS="$SAVE_CFLAGS" fi ;; AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], [*-*-cygwin* | *-*-mingw* | *-*-pw32*) AC_CHECK_TOOL(DLLTOOL, dlltool, false) AC_CHECK_TOOL(AS, as, false) AC_CHECK_TOOL(OBJDUMP, objdump, false) ;; ]) esac need_locks="$enable_libtool_lock" ])# _LT_AC_LOCK # AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) # ---------------------------------------------------------------- # Check whether the given compiler option works AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [AC_REQUIRE([LT_AC_PROG_SED]) AC_CACHE_CHECK([$1], [$2], [$2=no ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) printf "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$3" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&AS_MESSAGE_LOG_FD echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $echo "X$_lt_compiler_boilerplate" | $Xsed >conftest.exp $SED '/^$/d' conftest.err >conftest.er2 if test ! -s conftest.err || diff conftest.exp conftest.er2 >/dev/null; then $2=yes fi fi $rm conftest* ]) if test x"[$]$2" = xyes; then ifelse([$5], , :, [$5]) else ifelse([$6], , :, [$6]) fi ])# AC_LIBTOOL_COMPILER_OPTION # AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, # [ACTION-SUCCESS], [ACTION-FAILURE]) # ------------------------------------------------------------ # Check whether the given compiler option works AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [AC_CACHE_CHECK([$1], [$2], [$2=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $3" printf "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&AS_MESSAGE_LOG_FD $echo "X$_lt_linker_boilerplate" | $Xsed > conftest.exp $SED '/^$/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then $2=yes fi else $2=yes fi fi $rm conftest* LDFLAGS="$save_LDFLAGS" ]) if test x"[$]$2" = xyes; then ifelse([$4], , :, [$4]) else ifelse([$5], , :, [$5]) fi ])# AC_LIBTOOL_LINKER_OPTION # AC_LIBTOOL_SYS_MAX_CMD_LEN # -------------------------- AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [# find the maximum length of command line arguments AC_MSG_CHECKING([the maximum length of command line arguments]) AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl i=0 teststring="ABCD" case $build_os in msdosdjgpp*) # On DJGPP, this test can blow up pretty badly due to problems in libc # (any single argument exceeding 2000 bytes causes a buffer overrun # during glob expansion). Even if it were fixed, the result of this # check would be larger than it should be. lt_cv_sys_max_cmd_len=12288; # 12K is about right ;; gnu*) # Under GNU Hurd, this test is not required because there is # no limit to the length of command line arguments. # Libtool will interpret -1 as no limit whatsoever lt_cv_sys_max_cmd_len=-1; ;; cygwin* | mingw*) # On Win9x/ME, this test blows up -- it succeeds, but takes # about 5 minutes as the teststring grows exponentially. # Worse, since 9x/ME are not pre-emptively multitasking, # you end up with a "frozen" computer, even though with patience # the test eventually succeeds (with a max line length of 256k). # Instead, let's just punt: use the minimum linelength reported by # all of the supported platforms: 8192 (on NT/2K/XP). lt_cv_sys_max_cmd_len=8192; ;; amigaos*) # On AmigaOS with pdksh, this test takes hours, literally. # So we just punt and use a minimum line length of 8192. lt_cv_sys_max_cmd_len=8192; ;; netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` elif test -x /usr/sbin/sysctl; then lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` else lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs fi # And add a safety zone lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` ;; osf*) # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not # nice to cause kernel panics so lets avoid the loop below. # First set a reasonable default. lt_cv_sys_max_cmd_len=16384 # if test -x /sbin/sysconfig; then case `/sbin/sysconfig -q proc exec_disable_arg_limit` in *1*) lt_cv_sys_max_cmd_len=-1 ;; esac fi ;; *) # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \ = "XX$teststring") >/dev/null 2>&1 && new_result=`expr "X$teststring" : ".*" 2>&1` && lt_cv_sys_max_cmd_len=$new_result && test $i != 17 # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring done teststring= # Add a significant safety factor because C++ compilers can tack on massive # amounts of additional arguments before passing them to the linker. # It appears as though 1/2 is a usable value. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` ;; esac ]) if test -n $lt_cv_sys_max_cmd_len ; then AC_MSG_RESULT($lt_cv_sys_max_cmd_len) else AC_MSG_RESULT(none) fi ])# AC_LIBTOOL_SYS_MAX_CMD_LEN # _LT_AC_CHECK_DLFCN # -------------------- AC_DEFUN([_LT_AC_CHECK_DLFCN], [AC_CHECK_HEADERS(dlfcn.h)dnl ])# _LT_AC_CHECK_DLFCN # _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) # ------------------------------------------------------------------ AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF], [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl if test "$cross_compiling" = yes; then : [$4] else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif #ifdef __cplusplus extern "C" void exit (int); #endif void fnord() { int i=42;} int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; /* dlclose (self); */ } exit (status); }] EOF if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) $1 ;; x$lt_dlneed_uscore) $2 ;; x$lt_unknown|x*) $3 ;; esac else : # compilation failed $3 fi fi rm -fr conftest* ])# _LT_AC_TRY_DLOPEN_SELF # AC_LIBTOOL_DLOPEN_SELF # ------------------- AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl if test "x$enable_dlopen" != xyes; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen="load_add_on" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32*) lt_cv_dlopen="LoadLibrary" lt_cv_dlopen_libs= ;; cygwin*) lt_cv_dlopen="dlopen" lt_cv_dlopen_libs= ;; darwin*) # if libdl is installed we need to link against it AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ lt_cv_dlopen="dyld" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ]) ;; *) AC_CHECK_FUNC([shl_load], [lt_cv_dlopen="shl_load"], [AC_CHECK_LIB([dld], [shl_load], [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"], [AC_CHECK_FUNC([dlopen], [lt_cv_dlopen="dlopen"], [AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], [AC_CHECK_LIB([svld], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], [AC_CHECK_LIB([dld], [dld_link], [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"]) ]) ]) ]) ]) ]) ;; esac if test "x$lt_cv_dlopen" != xno; then enable_dlopen=yes else enable_dlopen=no fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS="$CPPFLAGS" test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS="$LDFLAGS" eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS="$LIBS" LIBS="$lt_cv_dlopen_libs $LIBS" AC_CACHE_CHECK([whether a program can dlopen itself], lt_cv_dlopen_self, [dnl _LT_AC_TRY_DLOPEN_SELF( lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) ]) if test "x$lt_cv_dlopen_self" = xyes; then LDFLAGS="$LDFLAGS $link_static_flag" AC_CACHE_CHECK([whether a statically linked program can dlopen itself], lt_cv_dlopen_self_static, [dnl _LT_AC_TRY_DLOPEN_SELF( lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) ]) fi CPPFLAGS="$save_CPPFLAGS" LDFLAGS="$save_LDFLAGS" LIBS="$save_LIBS" ;; esac case $lt_cv_dlopen_self in yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; *) enable_dlopen_self=unknown ;; esac case $lt_cv_dlopen_self_static in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; *) enable_dlopen_self_static=unknown ;; esac fi ])# AC_LIBTOOL_DLOPEN_SELF # AC_LIBTOOL_PROG_CC_C_O([TAGNAME]) # --------------------------------- # Check to see if options -c and -o are simultaneously supported by compiler AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O], [AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)], [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no $rm -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out printf "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&AS_MESSAGE_LOG_FD echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $echo "X$_lt_compiler_boilerplate" | $Xsed > out/conftest.exp $SED '/^$/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.err || diff out/conftest.exp out/conftest.er2 >/dev/null; then _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes fi fi chmod u+w . 2>&AS_MESSAGE_LOG_FD $rm conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files $rm out/* && rmdir out cd .. rmdir conftest $rm conftest* ]) ])# AC_LIBTOOL_PROG_CC_C_O # AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME]) # ----------------------------------------- # Check to see if we can do hard links to lock some files if needed AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_REQUIRE([_LT_AC_LOCK])dnl hard_links="nottested" if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user AC_MSG_CHECKING([if we can lock with hard links]) hard_links=yes $rm conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no AC_MSG_RESULT([$hard_links]) if test "$hard_links" = no; then AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) need_locks=warn fi else need_locks=no fi ])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS # AC_LIBTOOL_OBJDIR # ----------------- AC_DEFUN([AC_LIBTOOL_OBJDIR], [AC_CACHE_CHECK([for objdir], [lt_cv_objdir], [rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then lt_cv_objdir=.libs else # MS-DOS does not allow filenames that begin with a dot. lt_cv_objdir=_libs fi rmdir .libs 2>/dev/null]) objdir=$lt_cv_objdir ])# AC_LIBTOOL_OBJDIR # AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME]) # ---------------------------------------------- # Check hardcoding attributes. AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_MSG_CHECKING([how to hardcode library paths into programs]) _LT_AC_TAGVAR(hardcode_action, $1)= if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \ test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \ test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then # We can hardcode non-existant directories. if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no && test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then # Linking always hardcodes the temporary library directory. _LT_AC_TAGVAR(hardcode_action, $1)=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. _LT_AC_TAGVAR(hardcode_action, $1)=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. _LT_AC_TAGVAR(hardcode_action, $1)=unsupported fi AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)]) if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi ])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH # AC_LIBTOOL_SYS_LIB_STRIP # ------------------------ AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP], [striplib= old_striplib= AC_MSG_CHECKING([whether stripping libraries is possible]) if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" AC_MSG_RESULT([yes]) else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) if test -n "$STRIP" ; then striplib="$STRIP -x" AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) fi ;; *) AC_MSG_RESULT([no]) ;; esac fi ])# AC_LIBTOOL_SYS_LIB_STRIP # AC_LIBTOOL_SYS_DYNAMIC_LINKER # ----------------------------- # PORTME Fill in your ld.so characteristics AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_MSG_CHECKING([dynamic linker characteristics]) library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" if test "$GCC" = yes; then sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix4* | aix5*) version_type=linux need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[[01]] | aix4.[[01]].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[[45]]*) version_type=linux need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$host_os in yes,cygwin* | yes,mingw* | yes,pw32*) library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $rm \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" ;; mingw*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then # It is most probably a Windows format PATH printed by # mingw gcc, but we are running on Cygwin. Gcc prints its search # path with ; separators, and with drive letters. We can handle the # drive letters (cygwin fileutils understands them), so leave them, # especially as we might pass files found there to a mingw objdump, # which wouldn't understand a cygwinified path. Ahh. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' ;; esac ;; *) library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' ;; esac dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. if test "$GCC" = yes; then sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` else sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' fi sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd1*) dynamic_linker=no ;; kfreebsd*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='GNU ld.so' ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[[123]]*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2*) shlibpath_overrides_runpath=yes ;; freebsd3.[[01]]* | freebsdelf3.[[01]]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; *) # from 3.2 on shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555. postinstall_cmds='chmod 555 $lib' ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be Linux ELF. linux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; knetbsd*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='GNU ld.so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; nto-qnx*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; openbsd*) version_type=sunos need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[[89]] | openbsd2.[[89]].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; sco3.2v5*) version_type=osf soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH ;; solaris*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no export_dynamic_flag_spec='${wl}-Blargedynsym' runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac AC_MSG_RESULT([$dynamic_linker]) test "$dynamic_linker" = no && can_build_shared=no ])# AC_LIBTOOL_SYS_DYNAMIC_LINKER # _LT_AC_TAGCONFIG # ---------------- AC_DEFUN([_LT_AC_TAGCONFIG], [AC_ARG_WITH([tags], [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@], [include additional configurations @<:@automatic@:>@])], [tagnames="$withval"]) if test -f "$ltmain" && test -n "$tagnames"; then if test ! -f "${ofile}"; then AC_MSG_WARN([output file `$ofile' does not exist]) fi if test -z "$LTCC"; then eval "`$SHELL ${ofile} --config | grep '^LTCC='`" if test -z "$LTCC"; then AC_MSG_WARN([output file `$ofile' does not look like a libtool script]) else AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile']) fi fi # Extract list of available tagged configurations in $ofile. # Note that this assumes the entire list is on one line. available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'` lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for tagname in $tagnames; do IFS="$lt_save_ifs" # Check whether tagname contains only valid characters case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in "") ;; *) AC_MSG_ERROR([invalid tag name: $tagname]) ;; esac if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null then AC_MSG_ERROR([tag name \"$tagname\" already exists]) fi # Update the list of available tags. if test -n "$tagname"; then echo appending configuration tag \"$tagname\" to $ofile case $tagname in CXX) if test -n "$CXX" && ( test "X$CXX" != "Xno" && ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || (test "X$CXX" != "Xg++"))) ; then AC_LIBTOOL_LANG_CXX_CONFIG else tagname="" fi ;; F77) if test -n "$F77" && test "X$F77" != "Xno"; then AC_LIBTOOL_LANG_F77_CONFIG else tagname="" fi ;; GCJ) if test -n "$GCJ" && test "X$GCJ" != "Xno"; then AC_LIBTOOL_LANG_GCJ_CONFIG else tagname="" fi ;; RC) AC_LIBTOOL_LANG_RC_CONFIG ;; *) AC_MSG_ERROR([Unsupported tag name: $tagname]) ;; esac # Append the new tag name to the list of available tags. if test -n "$tagname" ; then available_tags="$available_tags $tagname" fi fi done IFS="$lt_save_ifs" # Now substitute the updated list of available tags. if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then mv "${ofile}T" "$ofile" chmod +x "$ofile" else rm -f "${ofile}T" AC_MSG_ERROR([unable to update list of available tagged configurations.]) fi fi ])# _LT_AC_TAGCONFIG # AC_LIBTOOL_DLOPEN # ----------------- # enable checks for dlopen support AC_DEFUN([AC_LIBTOOL_DLOPEN], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP]) ])# AC_LIBTOOL_DLOPEN # AC_LIBTOOL_WIN32_DLL # -------------------- # declare package support for building win32 DLLs AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_BEFORE([$0], [AC_LIBTOOL_SETUP]) ])# AC_LIBTOOL_WIN32_DLL # AC_ENABLE_SHARED([DEFAULT]) # --------------------------- # implement the --enable-shared flag # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. AC_DEFUN([AC_ENABLE_SHARED], [define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl AC_ARG_ENABLE([shared], [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@], [build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; no) enable_shared=no ;; *) enable_shared=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_shared=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_shared=]AC_ENABLE_SHARED_DEFAULT) ])# AC_ENABLE_SHARED # AC_DISABLE_SHARED # ----------------- #- set the default shared flag to --disable-shared AC_DEFUN([AC_DISABLE_SHARED], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl AC_ENABLE_SHARED(no) ])# AC_DISABLE_SHARED # AC_ENABLE_STATIC([DEFAULT]) # --------------------------- # implement the --enable-static flag # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. AC_DEFUN([AC_ENABLE_STATIC], [define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl AC_ARG_ENABLE([static], [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@], [build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; no) enable_static=no ;; *) enable_static=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_static=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_static=]AC_ENABLE_STATIC_DEFAULT) ])# AC_ENABLE_STATIC # AC_DISABLE_STATIC # ----------------- # set the default static flag to --disable-static AC_DEFUN([AC_DISABLE_STATIC], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl AC_ENABLE_STATIC(no) ])# AC_DISABLE_STATIC # AC_ENABLE_FAST_INSTALL([DEFAULT]) # --------------------------------- # implement the --enable-fast-install flag # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. AC_DEFUN([AC_ENABLE_FAST_INSTALL], [define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl AC_ARG_ENABLE([fast-install], [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; no) enable_fast_install=no ;; *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT) ])# AC_ENABLE_FAST_INSTALL # AC_DISABLE_FAST_INSTALL # ----------------------- # set the default to --disable-fast-install AC_DEFUN([AC_DISABLE_FAST_INSTALL], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl AC_ENABLE_FAST_INSTALL(no) ])# AC_DISABLE_FAST_INSTALL # AC_LIBTOOL_PICMODE([MODE]) # -------------------------- # implement the --with-pic flag # MODE is either `yes' or `no'. If omitted, it defaults to `both'. AC_DEFUN([AC_LIBTOOL_PICMODE], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl pic_mode=ifelse($#,1,$1,default) ])# AC_LIBTOOL_PICMODE # AC_PROG_EGREP # ------------- # This is predefined starting with Autoconf 2.54, so this conditional # definition can be removed once we require Autoconf 2.54 or later. m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP], [AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep], [if echo a | (grep -E '(a|b)') >/dev/null 2>&1 then ac_cv_prog_egrep='grep -E' else ac_cv_prog_egrep='egrep' fi]) EGREP=$ac_cv_prog_egrep AC_SUBST([EGREP]) ])]) # AC_PATH_TOOL_PREFIX # ------------------- # find a file program which can recognise shared library AC_DEFUN([AC_PATH_TOOL_PREFIX], [AC_REQUIRE([AC_PROG_EGREP])dnl AC_MSG_CHECKING([for $1]) AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, [case $MAGIC_CMD in [[\\/*] | ?:[\\/]*]) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR dnl $ac_dummy forces splitting on constant user-supplied paths. dnl POSIX.2 word splitting is done only on the output of word expansions, dnl not every word. This closes a longstanding sh security hole. ac_dummy="ifelse([$2], , $PATH, [$2])" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$1; then lt_cv_path_MAGIC_CMD="$ac_dir/$1" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac]) MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then AC_MSG_RESULT($MAGIC_CMD) else AC_MSG_RESULT(no) fi ])# AC_PATH_TOOL_PREFIX # AC_PATH_MAGIC # ------------- # find a file program which can recognise a shared library AC_DEFUN([AC_PATH_MAGIC], [AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) else MAGIC_CMD=: fi fi ])# AC_PATH_MAGIC # AC_PROG_LD # ---------- # find the pathname to the GNU or non-GNU linker AC_DEFUN([AC_PROG_LD], [AC_ARG_WITH([gnu-ld], [AC_HELP_STRING([--with-gnu-ld], [assume the C compiler uses GNU ld @<:@default=no@:>@])], [test "$withval" = no || with_gnu_ld=yes], [with_gnu_ld=no]) AC_REQUIRE([LT_AC_PROG_SED])dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. AC_MSG_CHECKING([for ld used by $CC]) case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [[\\/]]* | ?:[[\\/]]*) re_direlt='/[[^/]][[^/]]*/\.\./' # Canonicalize the pathname of ld ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'` while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then AC_MSG_CHECKING([for GNU ld]) else AC_MSG_CHECKING([for non-GNU ld]) fi AC_CACHE_VAL(lt_cv_path_LD, [if test -z "$LD"; then lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &1 /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac else lt_cv_deplibs_check_method=pass_all fi ;; gnu*) lt_cv_deplibs_check_method=pass_all ;; hpux10.20* | hpux11*) lt_cv_file_magic_cmd=/usr/bin/file case $host_cpu in ia64*) lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so ;; hppa*64*) [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]'] lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl ;; *) lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library' lt_cv_file_magic_test_file=/usr/lib/libc.sl ;; esac ;; irix5* | irix6* | nonstopux*) case $LD in *-32|*"-32 ") libmagic=32-bit;; *-n32|*"-n32 ") libmagic=N32;; *-64|*"-64 ") libmagic=64-bit;; *) libmagic=never-match;; esac lt_cv_deplibs_check_method=pass_all ;; # This must be Linux ELF. linux*) lt_cv_deplibs_check_method=pass_all ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' fi ;; newos6*) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; nto-qnx*) lt_cv_deplibs_check_method=unknown ;; openbsd*) if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' fi ;; osf3* | osf4* | osf5*) lt_cv_deplibs_check_method=pass_all ;; sco3.2v5*) lt_cv_deplibs_check_method=pass_all ;; solaris*) lt_cv_deplibs_check_method=pass_all ;; sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) case $host_vendor in motorola) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]' lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` ;; ncr) lt_cv_deplibs_check_method=pass_all ;; sequent) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;; sni) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" lt_cv_file_magic_test_file=/lib/libc.so ;; siemens) lt_cv_deplibs_check_method=pass_all ;; esac ;; sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; esac ]) file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown ])# AC_DEPLIBS_CHECK_METHOD # AC_PROG_NM # ---------- # find the pathname to a BSD-compatible name lister AC_DEFUN([AC_PROG_NM], [AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM, [if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM="$NM" else lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. tmp_nm="$ac_dir/${ac_tool_prefix}nm" if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then # Check to see if the nm accepts a BSD-compat flag. # Adding the `sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in */dev/null* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags ;; esac esac fi done IFS="$lt_save_ifs" test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm fi]) NM="$lt_cv_path_NM" ])# AC_PROG_NM # AC_CHECK_LIBM # ------------- # check for math library AC_DEFUN([AC_CHECK_LIBM], [AC_REQUIRE([AC_CANONICAL_HOST])dnl LIBM= case $host in *-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*) # These system don't have libm, or don't need it ;; *-ncr-sysv4.3*) AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") ;; *) AC_CHECK_LIB(m, cos, LIBM="-lm") ;; esac ])# AC_CHECK_LIBM # AC_LIBLTDL_CONVENIENCE([DIRECTORY]) # ----------------------------------- # sets LIBLTDL to the link flags for the libltdl convenience library and # LTDLINCL to the include flags for the libltdl header and adds # --enable-ltdl-convenience to the configure arguments. Note that # AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided, # it is assumed to be `libltdl'. LIBLTDL will be prefixed with # '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/' # (note the single quotes!). If your package is not flat and you're not # using automake, define top_builddir and top_srcdir appropriately in # the Makefiles. AC_DEFUN([AC_LIBLTDL_CONVENIENCE], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl case $enable_ltdl_convenience in no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;; "") enable_ltdl_convenience=yes ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;; esac LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) # For backwards non-gettext consistent compatibility... INCLTDL="$LTDLINCL" ])# AC_LIBLTDL_CONVENIENCE # AC_LIBLTDL_INSTALLABLE([DIRECTORY]) # ----------------------------------- # sets LIBLTDL to the link flags for the libltdl installable library and # LTDLINCL to the include flags for the libltdl header and adds # --enable-ltdl-install to the configure arguments. Note that # AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided, # and an installed libltdl is not found, it is assumed to be `libltdl'. # LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with # '${top_srcdir}/' (note the single quotes!). If your package is not # flat and you're not using automake, define top_builddir and top_srcdir # appropriately in the Makefiles. # In the future, this macro may have to be called after AC_PROG_LIBTOOL. AC_DEFUN([AC_LIBLTDL_INSTALLABLE], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl AC_CHECK_LIB(ltdl, lt_dlinit, [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no], [if test x"$enable_ltdl_install" = xno; then AC_MSG_WARN([libltdl not installed, but installation disabled]) else enable_ltdl_install=yes fi ]) if test x"$enable_ltdl_install" = x"yes"; then ac_configure_args="$ac_configure_args --enable-ltdl-install" LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) else ac_configure_args="$ac_configure_args --enable-ltdl-install=no" LIBLTDL="-lltdl" LTDLINCL= fi # For backwards non-gettext consistent compatibility... INCLTDL="$LTDLINCL" ])# AC_LIBLTDL_INSTALLABLE # AC_LIBTOOL_CXX # -------------- # enable support for C++ libraries AC_DEFUN([AC_LIBTOOL_CXX], [AC_REQUIRE([_LT_AC_LANG_CXX]) ])# AC_LIBTOOL_CXX # _LT_AC_LANG_CXX # --------------- AC_DEFUN([_LT_AC_LANG_CXX], [AC_REQUIRE([AC_PROG_CXX]) AC_REQUIRE([_LT_AC_PROG_CXXCPP]) _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX]) ])# _LT_AC_LANG_CXX # _LT_AC_PROG_CXXCPP # --------------- AC_DEFUN([_LT_AC_PROG_CXXCPP], [ AC_REQUIRE([AC_PROG_CXX]) if test -n "$CXX" && ( test "X$CXX" != "Xno" && ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || (test "X$CXX" != "Xg++"))) ; then AC_PROG_CXXCPP fi ])# _LT_AC_PROG_CXXCPP # AC_LIBTOOL_F77 # -------------- # enable support for Fortran 77 libraries AC_DEFUN([AC_LIBTOOL_F77], [AC_REQUIRE([_LT_AC_LANG_F77]) ])# AC_LIBTOOL_F77 # _LT_AC_LANG_F77 # --------------- AC_DEFUN([_LT_AC_LANG_F77], [AC_REQUIRE([AC_PROG_F77]) _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77]) ])# _LT_AC_LANG_F77 # AC_LIBTOOL_GCJ # -------------- # enable support for GCJ libraries AC_DEFUN([AC_LIBTOOL_GCJ], [AC_REQUIRE([_LT_AC_LANG_GCJ]) ])# AC_LIBTOOL_GCJ # _LT_AC_LANG_GCJ # --------------- AC_DEFUN([_LT_AC_LANG_GCJ], [AC_PROVIDE_IFELSE([AC_PROG_GCJ],[], [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[], [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[], [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])], [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])], [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])]) _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ]) ])# _LT_AC_LANG_GCJ # AC_LIBTOOL_RC # -------------- # enable support for Windows resource files AC_DEFUN([AC_LIBTOOL_RC], [AC_REQUIRE([LT_AC_PROG_RC]) _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC]) ])# AC_LIBTOOL_RC # AC_LIBTOOL_LANG_C_CONFIG # ------------------------ # Ensure that the configuration vars for the C compiler are # suitably defined. Those variables are subsequently used by # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG]) AC_DEFUN([_LT_AC_LANG_C_CONFIG], [lt_save_CC="$CC" AC_LANG_PUSH(C) # Source file extension for C test sources. ac_ext=c # Object file extension for compiled C test sources. objext=o _LT_AC_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;\n" # Code to be used in simple link tests lt_simple_link_test_code='int main(){return(0);}\n' _LT_AC_SYS_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # # Check for any special shared library compilation flags. # _LT_AC_TAGVAR(lt_prog_cc_shlib, $1)= if test "$GCC" = no; then case $host_os in sco3.2v5*) _LT_AC_TAGVAR(lt_prog_cc_shlib, $1)='-belf' ;; esac fi if test -n "$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)"; then AC_MSG_WARN([`$CC' requires `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to build shared libraries]) if echo "$old_CC $old_CFLAGS " | grep "[[ ]]$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)[[ ]]" >/dev/null; then : else AC_MSG_WARN([add `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to the CC or CFLAGS env variable and reconfigure]) _LT_AC_TAGVAR(lt_cv_prog_cc_can_build_shared, $1)=no fi fi # # Check to make sure the static flag actually works. # AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $_LT_AC_TAGVAR(lt_prog_compiler_static, $1) works], _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1), $_LT_AC_TAGVAR(lt_prog_compiler_static, $1), [], [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=]) AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) AC_LIBTOOL_PROG_COMPILER_PIC($1) AC_LIBTOOL_PROG_CC_C_O($1) AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) AC_LIBTOOL_PROG_LD_SHLIBS($1) AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) AC_LIBTOOL_SYS_LIB_STRIP AC_LIBTOOL_DLOPEN_SELF($1) # Report which librarie types wil actually be built AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix4* | aix5*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes AC_MSG_RESULT([$enable_static]) AC_LIBTOOL_CONFIG($1) AC_LANG_POP CC="$lt_save_CC" ])# AC_LIBTOOL_LANG_C_CONFIG # AC_LIBTOOL_LANG_CXX_CONFIG # -------------------------- # Ensure that the configuration vars for the C compiler are # suitably defined. Those variables are subsequently used by # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)]) AC_DEFUN([_LT_AC_LANG_CXX_CONFIG], [AC_LANG_PUSH(C++) AC_REQUIRE([AC_PROG_CXX]) AC_REQUIRE([_LT_AC_PROG_CXXCPP]) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(allow_undefined_flag, $1)= _LT_AC_TAGVAR(always_export_symbols, $1)=no _LT_AC_TAGVAR(archive_expsym_cmds, $1)= _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= _LT_AC_TAGVAR(hardcode_minus_L, $1)=no _LT_AC_TAGVAR(hardcode_automatic, $1)=no _LT_AC_TAGVAR(module_cmds, $1)= _LT_AC_TAGVAR(module_expsym_cmds, $1)= _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_AC_TAGVAR(no_undefined_flag, $1)= _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Dependencies to place before and after the object being linked: _LT_AC_TAGVAR(predep_objects, $1)= _LT_AC_TAGVAR(postdep_objects, $1)= _LT_AC_TAGVAR(predeps, $1)= _LT_AC_TAGVAR(postdeps, $1)= _LT_AC_TAGVAR(compiler_lib_search_path, $1)= # Source file extension for C++ test sources. ac_ext=cpp # Object file extension for compiled C++ test sources. objext=o _LT_AC_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;\n" # Code to be used in simple link tests lt_simple_link_test_code='int main(int, char *[]) { return(0); }\n' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_AC_SYS_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_LD=$LD lt_save_GCC=$GCC GCC=$GXX lt_save_with_gnu_ld=$with_gnu_ld lt_save_path_LD=$lt_cv_path_LD if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx else unset lt_cv_prog_gnu_ld fi if test -n "${lt_cv_path_LDCXX+set}"; then lt_cv_path_LD=$lt_cv_path_LDCXX else unset lt_cv_path_LD fi test -z "${LDCXX+set}" || LD=$LDCXX CC=${CXX-"c++"} compiler=$CC _LT_AC_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) # We don't want -fno-exception wen compiling C++ code, so set the # no_builtin_flag separately if test "$GXX" = yes; then _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' else _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= fi if test "$GXX" = yes; then # Set up default GNU C++ configuration AC_PROG_LD # Check if GNU C++ uses GNU ld as the underlying linker, since the # archiving commands below assume that GNU ld is being used. if test "$with_gnu_ld" = yes; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # If archive_cmds runs LD, not CC, wlarc should be empty # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to # investigate it a little bit more. (MM) wlarc='${wl}' # ancient GNU ld didn't support --whole-archive et. al. if eval "`$CC -print-prog-name=ld` --help 2>&1" | \ grep 'no-whole-archive' > /dev/null; then _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= fi else with_gnu_ld=no wlarc= # A generic and very simple default shared library creation # command for GNU C++ for the case where it uses the native # linker, instead of GNU ld. If possible, this setting should # overridden to take advantage of the native linker features on # the platform it is being used on. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' fi # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' else GXX=no with_gnu_ld=no wlarc= fi # PORTME: fill in a description of your system's C++ link characteristics AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) _LT_AC_TAGVAR(ld_shlibs, $1)=yes case $host_os in aix3*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; aix4* | aix5*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*) for ld_flag in $LDFLAGS; do case $ld_flag in *-brtl*) aix_use_runtimelinking=yes break ;; esac done esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. _LT_AC_TAGVAR(archive_cmds, $1)='' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_AC_TAGVAR(link_all_deplibs, $1)=yes if test "$GXX" = yes; then case $host_os in aix4.[[012]]|aix4.[[012]].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && \ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 _LT_AC_TAGVAR(hardcode_direct, $1)=yes else # We have old collect2 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= fi esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. _LT_AC_TAGVAR(always_export_symbols, $1)=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' # Determine the default libpath from the value encoded in an empty executable. _LT_AC_SYS_LIBPATH_AIX _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an empty executable. _LT_AC_SYS_LIBPATH_AIX _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' # -bexpall does not export symbols beginning with underscore (_) _LT_AC_TAGVAR(always_export_symbols, $1)=yes # Exported symbols can be pulled into shared objects from archives _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' ' _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes # This is similar to how AIX traditionally builds its shared libraries. _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; chorus*) case $cc_basename in *) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac ;; cygwin* | mingw* | pw32*) # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_AC_TAGVAR(always_export_symbols, $1)=no _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; darwin* | rhapsody*) case $host_os in rhapsody* | darwin1.[[012]]) _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress' ;; *) # Darwin 1.3 on if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' else case ${MACOSX_DEPLOYMENT_TARGET} in 10.[[012]]) _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup' ;; esac fi ;; esac _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_automatic, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='' _LT_AC_TAGVAR(link_all_deplibs, $1)=yes if test "$GXX" = yes ; then lt_int_apple_cc_single_mod=no output_verbose_link_cmd='echo' if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then lt_int_apple_cc_single_mod=yes fi if test "X$lt_int_apple_cc_single_mod" = Xyes ; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' else _LT_AC_TAGVAR(archive_cmds, $1)='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring' fi _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds if test "X$lt_int_apple_cc_single_mod" = Xyes ; then _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' else _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' fi _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' else case $cc_basename in xlc*) output_verbose_link_cmd='echo' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ;; *) _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac fi ;; dgux*) case $cc_basename in ec++*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; ghcx*) # Green Hills C++ Compiler # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac ;; freebsd[[12]]*) # C++ shared libraries reported to be fairly broken before switch to ELF _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; freebsd-elf*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;; freebsd* | kfreebsd*-gnu | dragonfly*) # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF # conventions _LT_AC_TAGVAR(ld_shlibs, $1)=yes ;; gnu*) ;; hpux9*) _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default # location of the library. case $cc_basename in CC*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; aCC*) _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "[[-]]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes; then _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; hpux10*|hpux11*) if test $with_gnu_ld = no; then case $host_cpu in hppa*64*) _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: ;; ia64*) _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' ;; *) _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' ;; esac fi case $host_cpu in hppa*64*) _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; ia64*) _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default # location of the library. ;; *) _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default # location of the library. ;; esac case $cc_basename in CC*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; aCC*) case $host_cpu in hppa*64*|ia64*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs' ;; *) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes; then if test $with_gnu_ld = no; then case $host_cpu in ia64*|hppa*64*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs' ;; *) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac fi else # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; irix5* | irix6*) case $cc_basename in CC*) # SGI C++ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' # Archives containing C++ object files must be created using # "CC -ar", where "CC" is the IRIX C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' ;; *) if test "$GXX" = yes; then if test "$with_gnu_ld" = no; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib' fi fi _LT_AC_TAGVAR(link_all_deplibs, $1)=yes ;; esac _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: ;; linux*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | grep "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; icpc*) # Intel C++ with_gnu_ld=yes # version 8.0 and above of icpc choke on multiply defined symbols # if we add $predep_objects and $postdep_objects, however 7.1 and # earlier do not add the objects themselves. case `$CC -V 2>&1` in *"Version 7."*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; *) # Version 8.0 or newer tmp_idyn= case $host_cpu in ia64*) tmp_idyn=' -i_dynamic';; esac _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; esac _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' ;; pgCC*) # Portland Group C++ compiler _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' ;; cxx*) # Compaq C++ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' runpath_var=LD_RUN_PATH _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; esac ;; lynxos*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; m88k*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; mvs*) case $cc_basename in cxx*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' wlarc= _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no fi # Workaround some broken pre-1.5 toolchains output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' ;; openbsd2*) # C++ shared libraries are fairly broken _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; openbsd*) _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' fi output_verbose_link_cmd='echo' ;; osf3*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; cxx*) _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes && test "$with_gnu_ld" = no; then _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' else # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; osf4* | osf5*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: # Archives containing C++ object files must be created using # the KAI C++ compiler. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; cxx*) _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ echo "-hidden">> $lib.exp~ $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~ $rm $lib.exp' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes && test "$with_gnu_ld" = no; then _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' else # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; psos*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; sco*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no case $cc_basename in CC*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; lcc*) # Lucid # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac ;; solaris*) case $cc_basename in CC*) # Sun C++ 4.2, 5.x and Centerline C++ _LT_AC_TAGVAR(archive_cmds_need_lc,$1)=yes _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) # The C++ compiler is used as linker so we must use $wl # flag to pass the commands to the underlying system # linker. We must also pass each convience library through # to the system linker between allextract/defaultextract. # The C++ compiler will combine linker options so we # cannot just pass the convience library names through # without $wl. # Supported since Solaris 2.6 (maybe 2.5.1?) _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;; esac _LT_AC_TAGVAR(link_all_deplibs, $1)=yes output_verbose_link_cmd='echo' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' ;; gcx*) # Green Hills C++ Compiler _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' # The C++ compiler must be used to create the archive. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' ;; *) # GNU C++ compiler with Solaris linker if test "$GXX" = yes && test "$with_gnu_ld" = no; then _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' if $CC --version | grep -v '^2\.7' > /dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" else # g++ 2.7 appears to require `-G' NOT `-shared' on this # platform. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" fi _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' fi ;; esac ;; sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac ;; vxworks*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no _LT_AC_TAGVAR(GCC, $1)="$GXX" _LT_AC_TAGVAR(LD, $1)="$LD" AC_LIBTOOL_POSTDEP_PREDEP($1) AC_LIBTOOL_PROG_COMPILER_PIC($1) AC_LIBTOOL_PROG_CC_C_O($1) AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) AC_LIBTOOL_PROG_LD_SHLIBS($1) AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) AC_LIBTOOL_SYS_LIB_STRIP AC_LIBTOOL_DLOPEN_SELF($1) AC_LIBTOOL_CONFIG($1) AC_LANG_POP CC=$lt_save_CC LDCXX=$LD LD=$lt_save_LD GCC=$lt_save_GCC with_gnu_ldcxx=$with_gnu_ld with_gnu_ld=$lt_save_with_gnu_ld lt_cv_path_LDCXX=$lt_cv_path_LD lt_cv_path_LD=$lt_save_path_LD lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld ])# AC_LIBTOOL_LANG_CXX_CONFIG # AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME]) # ------------------------ # Figure out "hidden" library dependencies from verbose # compiler output when linking a shared library. # Parse the compiler output and extract the necessary # objects, libraries and library flags. AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[ dnl we can't use the lt_simple_compile_test_code here, dnl because it contains code intended for an executable, dnl not a library. It's possible we should let each dnl tag define a new lt_????_link_test_code variable, dnl but it's only used here... ifelse([$1],[],[cat > conftest.$ac_ext < conftest.$ac_ext < conftest.$ac_ext < conftest.$ac_ext <> "$cfgfile" ifelse([$1], [], [#! $SHELL # `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services. # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) # NOTE: Changes made to this file will be lost: look at ltmain.sh. # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001 # Free Software Foundation, Inc. # # This file is part of GNU Libtool: # Originally by Gordon Matzigkeit , 1996 # # 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 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # A sed program that does not truncate output. SED=$lt_SED # Sed that helps us avoid accidentally triggering echo(1) options like -n. Xsed="$SED -e 1s/^X//" # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # The names of the tagged configurations supported by this script. available_tags= # ### BEGIN LIBTOOL CONFIG], [# ### BEGIN LIBTOOL TAG CONFIG: $tagname]) # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1) # Whether or not to disallow shared libs when runtime libs are static allow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # The host system. host_alias=$host_alias host=$host host_os=$host_os # The build system. build_alias=$build_alias build=$build build_os=$build_os # An echo program that does not interpret backslashes. echo=$lt_echo # The archiver. AR=$lt_AR AR_FLAGS=$lt_AR_FLAGS # A C compiler. LTCC=$lt_LTCC # A language-specific compiler. CC=$lt_[]_LT_AC_TAGVAR(compiler, $1) # Is the compiler the GNU C compiler? with_gcc=$_LT_AC_TAGVAR(GCC, $1) # An ERE matcher. EGREP=$lt_EGREP # The linker used to build libraries. LD=$lt_[]_LT_AC_TAGVAR(LD, $1) # Whether we need hard or soft links. LN_S=$lt_LN_S # A BSD-compatible nm program. NM=$lt_NM # A symbol stripping program STRIP=$lt_STRIP # Used to examine libraries when file_magic_cmd begins "file" MAGIC_CMD=$MAGIC_CMD # Used on cygwin: DLL creation program. DLLTOOL="$DLLTOOL" # Used on cygwin: object dumper. OBJDUMP="$OBJDUMP" # Used on cygwin: assembler. AS="$AS" # The name of the directory that contains temporary libtool files. objdir=$objdir # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # How to pass a linker flag through the compiler. wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) # Object file suffix (normally "o"). objext="$ac_objext" # Old archive suffix (normally "a"). libext="$libext" # Shared library suffix (normally ".so"). shrext_cmds='$shrext_cmds' # Executable file suffix (normally ""). exeext="$exeext" # Additional compiler flags for building library objects. pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) pic_mode=$pic_mode # What is the maximum length of a command? max_cmd_len=$lt_cv_sys_max_cmd_len # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) # Must we lock files when doing compilation? need_locks=$lt_need_locks # Do we need the lib prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Compiler flag to prevent dynamic linking. link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1) # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1) # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1) # Compiler flag to generate thread-safe objects. thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1) # Library versioning type. version_type=$version_type # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME. library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Commands used to build and install an old-style archive. RANLIB=$lt_RANLIB old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1) old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1) # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) # Commands used to build and install a shared archive. archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1) archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1) postinstall_cmds=$lt_postinstall_cmds postuninstall_cmds=$lt_postuninstall_cmds # Commands used to build a loadable module (assumed same as above if empty) module_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1) module_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1) # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # Dependencies to place before the objects being linked to create a # shared library. predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1) # Dependencies to place after the objects being linked to create a # shared library. postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1) # Dependencies to place before the objects being linked to create a # shared library. predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1) # Dependencies to place after the objects being linked to create a # shared library. postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1) # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1) # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method == file_magic. file_magic_cmd=$lt_file_magic_cmd # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1) # Flag that forces no undefined symbols. no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1) # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # Same as above, but a single script fragment to be evaled but not shown. finish_eval=$lt_finish_eval # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # This is the shared library runtime path variable. runpath_var=$runpath_var # This is the shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # How to hardcode a shared library path into an executable. hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1) # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist. hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) # If ld is used when linking, flag to hardcode \$libdir into # a binary during linking. This must work even if \$libdir does # not exist. hardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) # Whether we need a single -rpath flag with a separated argument. hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1) # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the # resulting binary. hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1) # Set to yes if using the -LDIR flag during linking hardcodes DIR into the # resulting binary. hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1) # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into # the resulting binary. hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1) # Set to yes if building a shared library automatically hardcodes DIR into the library # and all subsequent libraries and executables linked against it. hardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1) # Variables whose values should be saved in libtool wrapper scripts and # restored at relink time. variables_saved_for_relink="$variables_saved_for_relink" # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1) # Compile-time system search path for libraries sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Fix the shell variable \$srcfile for the compiler. fix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)" # Set to yes if exported symbols are required. always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1) # The commands to list exported symbols. export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1) # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1) # Symbols that must always be exported. include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1) ifelse([$1],[], [# ### END LIBTOOL CONFIG], [# ### END LIBTOOL TAG CONFIG: $tagname]) __EOF__ ifelse([$1],[], [ case $host_os in aix3*) cat <<\EOF >> "$cfgfile" # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi EOF ;; esac # We use sed instead of cat because bash on DJGPP gets confused if # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1) mv -f "$cfgfile" "$ofile" || \ (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" ]) else # If there is no Makefile yet, we rely on a make rule to execute # `config.status --recheck' to rerun these tests and create the # libtool script then. ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` if test -f "$ltmain_in"; then test -f Makefile && make "$ltmain" fi fi ])# AC_LIBTOOL_CONFIG # AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME]) # ------------------------------------------- AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= if test "$GCC" = yes; then _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], lt_cv_prog_compiler_rtti_exceptions, [-fno-rtti -fno-exceptions], [], [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) fi ])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE # --------------------------------- AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_REQUIRE([AC_CANONICAL_HOST]) AC_REQUIRE([AC_PROG_NM]) AC_REQUIRE([AC_OBJEXT]) # Check for command to grab the raw symbol name followed by C symbol from nm. AC_MSG_CHECKING([command to parse $NM output from $compiler object]) AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], [ # These are sane defaults that work on at least a few old systems. # [They come from Ultrix. What could be older than Ultrix?!! ;)] # Character class describing NM global symbol codes. symcode='[[BCDEGRST]]' # Regexp to match symbols that can be accessed directly from C. sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' # Transform an extracted symbol line into a proper C declaration lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'" # Transform an extracted symbol line into symbol name and symbol address lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" # Define system-specific variables. case $host_os in aix*) symcode='[[BCDT]]' ;; cygwin* | mingw* | pw32*) symcode='[[ABCDGISTW]]' ;; hpux*) # Its linker distinguishes data from code symbols if test "$host_cpu" = ia64; then symcode='[[ABCDEGRST]]' fi lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" ;; linux*) if test "$host_cpu" = ia64; then symcode='[[ABCDGIRSTW]]' lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" fi ;; irix* | nonstopux*) symcode='[[BCDEGRST]]' ;; osf*) symcode='[[BCDEGQRST]]' ;; solaris* | sysv5*) symcode='[[BDRT]]' ;; sysv4) symcode='[[DFNSTU]]' ;; esac # Handle CRLF in mingw tool chain opt_cr= case $build_os in mingw*) opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp ;; esac # If we're using GNU nm, then use its standard symbol codes. case `$NM -V 2>&1` in *GNU* | *'with BFD'*) symcode='[[ABCDGIRSTW]]' ;; esac # Try without a prefix undercore, then with it. for ac_symprfx in "" "_"; do # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. symxfrm="\\1 $ac_symprfx\\2 \\2" # Write the raw and C identifiers. lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" # Check to see that the pipe works correctly. pipe_works=no rm -f conftest* cat > conftest.$ac_ext < $nlist) && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" else rm -f "$nlist"T fi # Make sure that we snagged all the symbols we need. if grep ' nm_test_var$' "$nlist" >/dev/null; then if grep ' nm_test_func$' "$nlist" >/dev/null; then cat < conftest.$ac_ext #ifdef __cplusplus extern "C" { #endif EOF # Now generate the symbol file. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext' cat <> conftest.$ac_ext #if defined (__STDC__) && __STDC__ # define lt_ptr_t void * #else # define lt_ptr_t char * # define const #endif /* The mapping between symbol names and symbols. */ const struct { const char *name; lt_ptr_t address; } lt_preloaded_symbols[[]] = { EOF $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext cat <<\EOF >> conftest.$ac_ext {0, (lt_ptr_t) 0} }; #ifdef __cplusplus } #endif EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext lt_save_LIBS="$LIBS" lt_save_CFLAGS="$CFLAGS" LIBS="conftstm.$ac_objext" CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then pipe_works=yes fi LIBS="$lt_save_LIBS" CFLAGS="$lt_save_CFLAGS" else echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD fi else echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD fi else echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD fi else echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD cat conftest.$ac_ext >&5 fi rm -f conftest* conftst* # Do not use the global_symbol_pipe unless it works. if test "$pipe_works" = yes; then break else lt_cv_sys_global_symbol_pipe= fi done ]) if test -z "$lt_cv_sys_global_symbol_pipe"; then lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then AC_MSG_RESULT(failed) else AC_MSG_RESULT(ok) fi ]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE # AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME]) # --------------------------------------- AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC], [_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)= _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= _LT_AC_TAGVAR(lt_prog_compiler_static, $1)= AC_MSG_CHECKING([for $compiler option to produce PIC]) ifelse([$1],[CXX],[ # C++ specific cases for pic, static, wl, etc. if test "$GXX" = yes; then _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; amigaos*) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | os2* | pw32*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; *djgpp*) # DJGPP does not support shared libraries at all _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= ;; sysv4*MP*) if test -d /usr/nec; then _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic fi ;; hpux*) # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac else case $host_os in aix4* | aix5*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' fi ;; chorus*) case $cc_basename in cxch68*) # Green Hills C++ Compiler # _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" ;; esac ;; darwin*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files case $cc_basename in xlc*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon' _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' ;; esac ;; dgux*) case $cc_basename in ec++*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; ghcx*) # Green Hills C++ Compiler _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; *) ;; esac ;; freebsd* | kfreebsd*-gnu | dragonfly*) # FreeBSD uses GNU C++ ;; hpux9* | hpux10* | hpux11*) case $cc_basename in CC*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive" if test "$host_cpu" != ia64; then _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' fi ;; aCC*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive" case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ;; esac ;; *) ;; esac ;; irix5* | irix6* | nonstopux*) case $cc_basename in CC*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' # CC pic flag -KPIC is the default. ;; *) ;; esac ;; linux*) case $cc_basename in KCC*) # KAI C++ Compiler _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; icpc* | ecpc*) # Intel C++ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; pgCC*) # Portland Group C++ compiler. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; cxx*) # Compaq C++ # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; *) ;; esac ;; lynxos*) ;; m88k*) ;; mvs*) case $cc_basename in cxx*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' ;; *) ;; esac ;; netbsd*) ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' ;; RCC*) # Rational C++ 2.4.1 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; cxx*) # Digital/Compaq C++ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; *) ;; esac ;; psos*) ;; sco*) case $cc_basename in CC*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; *) ;; esac ;; solaris*) case $cc_basename in CC*) # Sun C++ 4.2, 5.x and Centerline C++ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; gcx*) # Green Hills C++ Compiler _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' ;; *) ;; esac ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; lcc*) # Lucid _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; *) ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; *) ;; esac ;; unixware*) ;; vxworks*) ;; *) _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; esac fi ], [ if test "$GCC" = yes; then _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; amigaos*) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no enable_shared=no ;; sysv4*MP*) if test -d /usr/nec; then _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic fi ;; hpux*) # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' fi ;; darwin*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files case $cc_basename in xlc*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon' _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' ;; esac ;; mingw* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' ;; hpux9* | hpux10* | hpux11*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # PIC (with -KPIC) is the default. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; newsos6) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; linux*) case $cc_basename in icc* | ecc*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; pgcc* | pgf77* | pgf90* | pgf95*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; ccc*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # All Alpha code is PIC. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; esac ;; osf3* | osf4* | osf5*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # All OSF/1 code is PIC. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; sco3.2v5*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kpic' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-dn' ;; solaris*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' case $cc_basename in f77* | f90* | f95*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; *) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; esac ;; sunos4*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; unicos*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; uts4*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; *) _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; esac fi ]) AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)]) # # Check to make sure the PIC flag actually works. # if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works], _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1), [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [], [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in "" | " "*) ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;; esac], [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) fi case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])" ;; esac ]) # AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME]) # ------------------------------------ # See if the linker supports building shared libraries. AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) ifelse([$1],[CXX],[ _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' case $host_os in aix4* | aix5*) # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | grep 'GNU' > /dev/null; then _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' else _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' fi ;; pw32*) _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" ;; cygwin* | mingw*) _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]] /s/.* \([[^ ]]*\)/\1 DATA/;/^.* __nm__/s/^.* __nm__\([[^ ]]*\) [[^ ]]*/\1 DATA/;/^I /d;/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols' ;; *) _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ;; esac ],[ runpath_var= _LT_AC_TAGVAR(allow_undefined_flag, $1)= _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no _LT_AC_TAGVAR(archive_cmds, $1)= _LT_AC_TAGVAR(archive_expsym_cmds, $1)= _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)= _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)= _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= _LT_AC_TAGVAR(thread_safe_flag_spec, $1)= _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_minus_L, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown _LT_AC_TAGVAR(hardcode_automatic, $1)=no _LT_AC_TAGVAR(module_cmds, $1)= _LT_AC_TAGVAR(module_expsym_cmds, $1)= _LT_AC_TAGVAR(always_export_symbols, $1)=no _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list _LT_AC_TAGVAR(include_expsyms, $1)= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. _LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_" # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. extract_expsyms_cmds= # Just being paranoid about ensuring that cc_basename is set. _LT_CC_BASENAME([$compiler]) case $host_os in cygwin* | mingw* | pw32*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; openbsd*) with_gnu_ld=no ;; esac _LT_AC_TAGVAR(ld_shlibs, $1)=yes if test "$with_gnu_ld" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= fi supports_anon_versioning=no case `$LD -v 2>/dev/null` in *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix3* | aix4* | aix5*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then _LT_AC_TAGVAR(ld_shlibs, $1)=no cat <&2 *** Warning: the GNU linker, at least up to release 2.9.1, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to modify your PATH *** so that a non-GNU linker is found, and then restart. EOF fi ;; amigaos*) _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Samuel A. Falvo II reports # that the semantics of dynamic libraries on AmigaOS, at least up # to version 4, is to share data among multiple programs linked # with the same dynamic library. Since this doesn't match the # behavior of shared libraries on other platforms, we can't use # them. _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; beos*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; cygwin* | mingw* | pw32*) # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_AC_TAGVAR(always_export_symbols, $1)=no _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols' if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; linux*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then tmp_addflag= case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; esac _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test $supports_anon_versioning = yes; then _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ $echo "local: *; };" >> $output_objdir/$libname.ver~ $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris* | sysv5*) if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then _LT_AC_TAGVAR(ld_shlibs, $1)=no cat <&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. EOF elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; sunos4*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; esac if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then runpath_var= _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_AC_TAGVAR(always_export_symbols, $1)=yes _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes if test "$GCC" = yes && test -z "$link_static_flag"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported fi ;; aix4* | aix5*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | grep 'GNU' > /dev/null; then _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' else _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. _LT_AC_TAGVAR(archive_cmds, $1)='' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_AC_TAGVAR(link_all_deplibs, $1)=yes if test "$GCC" = yes; then case $host_os in aix4.[[012]]|aix4.[[012]].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && \ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 _LT_AC_TAGVAR(hardcode_direct, $1)=yes else # We have old collect2 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= fi esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. _LT_AC_TAGVAR(always_export_symbols, $1)=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' # Determine the default libpath from the value encoded in an empty executable. _LT_AC_SYS_LIBPATH_AIX _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an empty executable. _LT_AC_SYS_LIBPATH_AIX _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' # -bexpall does not export symbols beginning with underscore (_) _LT_AC_TAGVAR(always_export_symbols, $1)=yes # Exported symbols can be pulled into shared objects from archives _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' ' _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes # This is similar to how AIX traditionally builds its shared libraries. _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; amigaos*) _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # see comment about different semantics on the GNU ld section _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; bsdi[[45]]*) _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic ;; cygwin* | mingw* | pw32*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true' # FIXME: Should let the user specify the lib program. _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs' _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`' _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes ;; darwin* | rhapsody*) case $host_os in rhapsody* | darwin1.[[012]]) _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress' ;; *) # Darwin 1.3 on if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' else case ${MACOSX_DEPLOYMENT_TARGET} in 10.[[012]]) _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup' ;; esac fi ;; esac _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_automatic, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='' _LT_AC_TAGVAR(link_all_deplibs, $1)=yes if test "$GCC" = yes ; then output_verbose_link_cmd='echo' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' else case $cc_basename in xlc*) output_verbose_link_cmd='echo' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ;; *) _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac fi ;; dgux*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; freebsd1*) _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | kfreebsd*-gnu | dragonfly*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; hpux9*) if test "$GCC" = yes; then _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: _LT_AC_TAGVAR(hardcode_direct, $1)=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' ;; hpux10* | hpux11*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then case $host_cpu in hppa*64*|ia64*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*|ia64*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags' ;; *) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;; esac fi if test "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; ia64*) _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes ;; *) _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' fi _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: _LT_AC_TAGVAR(link_all_deplibs, $1)=yes ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; newsos6) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; openbsd*) _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' else case $host_os in openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' ;; *) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' ;; esac fi ;; os2*) _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_AC_TAGVAR(archive_cmds, $1)='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' fi _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' else _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp' # Both c and cxx compiler support -rpath directly _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' fi _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: ;; sco3.2v5*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' runpath_var=LD_RUN_PATH hardcode_runpath_var=yes ;; solaris*) _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text' if test "$GCC" = yes; then wlarc='${wl}' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' else wlarc='' _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' fi _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) # The compiler driver will combine linker options so we # cannot just pass the convience library names through # without $wl, iff we do not link with $LD. # Luckily, gcc supports the same syntax we need for Sun Studio. # Supported since Solaris 2.6 (maybe 2.5.1?) case $wlarc in '') _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;; *) _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;; esac ;; esac _LT_AC_TAGVAR(link_all_deplibs, $1)=yes ;; sunos4*) if test "x$host_vendor" = xsequent; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv4) case $host_vendor in sni) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' _LT_AC_TAGVAR(hardcode_direct, $1)=no ;; motorola) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv4.3*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes _LT_AC_TAGVAR(ld_shlibs, $1)=yes fi ;; sysv4.2uw2*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_minus_L, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no hardcode_runpath_var=yes runpath_var=LD_RUN_PATH ;; sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*) _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z ${wl}text' if test "$GCC" = yes; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' fi runpath_var='LD_RUN_PATH' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv5*) _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text' # $CC -shared without GNU ld will not create a library from C++ # object files and a static libstdc++, better avoid it by now _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var='LD_RUN_PATH' ;; uts4*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac fi ]) AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi # # Do we need to explicitly link libc? # case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in x|xyes) # Assume -lc should be added _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $_LT_AC_TAGVAR(archive_cmds, $1) in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. AC_MSG_CHECKING([whether -lc should be explicitly linked in]) $rm conftest* printf "$lt_simple_compile_test_code" > conftest.$ac_ext if AC_TRY_EVAL(ac_compile) 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1) _LT_AC_TAGVAR(allow_undefined_flag, $1)= if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) then _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no else _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes fi _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $rm conftest* AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)]) ;; esac fi ;; esac ])# AC_LIBTOOL_PROG_LD_SHLIBS # _LT_AC_FILE_LTDLL_C # ------------------- # Be careful that the start marker always follows a newline. AC_DEFUN([_LT_AC_FILE_LTDLL_C], [ # /* ltdll.c starts here */ # #define WIN32_LEAN_AND_MEAN # #include # #undef WIN32_LEAN_AND_MEAN # #include # # #ifndef __CYGWIN__ # # ifdef __CYGWIN32__ # # define __CYGWIN__ __CYGWIN32__ # # endif # #endif # # #ifdef __cplusplus # extern "C" { # #endif # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved); # #ifdef __cplusplus # } # #endif # # #ifdef __CYGWIN__ # #include # DECLARE_CYGWIN_DLL( DllMain ); # #endif # HINSTANCE __hDllInstance_base; # # BOOL APIENTRY # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved) # { # __hDllInstance_base = hInst; # return TRUE; # } # /* ltdll.c ends here */ ])# _LT_AC_FILE_LTDLL_C # _LT_AC_TAGVAR(VARNAME, [TAGNAME]) # --------------------------------- AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])]) # old names AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL]) AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) AC_DEFUN([AM_PROG_LD], [AC_PROG_LD]) AC_DEFUN([AM_PROG_NM], [AC_PROG_NM]) # This is just to silence aclocal about the macro not being used ifelse([AC_DISABLE_FAST_INSTALL]) AC_DEFUN([LT_AC_PROG_GCJ], [AC_CHECK_TOOL(GCJ, gcj, no) test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" AC_SUBST(GCJFLAGS) ]) AC_DEFUN([LT_AC_PROG_RC], [AC_CHECK_TOOL(RC, windres, no) ]) # NOTE: This macro has been submitted for inclusion into # # GNU Autoconf as AC_PROG_SED. When it is available in # # a released version of Autoconf we should remove this # # macro and use it instead. # # LT_AC_PROG_SED # -------------- # Check for a fully-functional sed program, that truncates # as few characters as possible. Prefer GNU sed if found. AC_DEFUN([LT_AC_PROG_SED], [AC_MSG_CHECKING([for a sed that does not truncate output]) AC_CACHE_VAL(lt_cv_path_SED, [# Loop through the user's path and test for sed and gsed. # Then use that list of sed's as ones to test for truncation. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for lt_ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" fi done done done lt_ac_max=0 lt_ac_count=0 # Add /usr/xpg4/bin/sed as it is typically found on Solaris # along with /bin/sed that truncates output. for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do test ! -f $lt_ac_sed && continue cat /dev/null > conftest.in lt_ac_count=0 echo $ECHO_N "0123456789$ECHO_C" >conftest.in # Check for GNU sed and select it if it is found. if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then lt_cv_path_SED=$lt_ac_sed break fi while true; do cat conftest.in conftest.in >conftest.tmp mv conftest.tmp conftest.in cp conftest.in conftest.nl echo >>conftest.nl $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break cmp -s conftest.out conftest.nl || break # 10000 chars as input seems more than enough test $lt_ac_count -gt 10 && break lt_ac_count=`expr $lt_ac_count + 1` if test $lt_ac_count -gt $lt_ac_max; then lt_ac_max=$lt_ac_count lt_cv_path_SED=$lt_ac_sed fi done done ]) SED=$lt_cv_path_SED AC_MSG_RESULT([$SED]) ]) # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- # # Copyright © 2004 Scott James Remnant . # # 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 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # PKG_PROG_PKG_CONFIG([MIN-VERSION]) # ---------------------------------- AC_DEFUN([PKG_PROG_PKG_CONFIG], [m4_pattern_forbid([^_?PKG_[A-Z_]+$]) m4_pattern_allow([^PKG_CONFIG(_PATH)?$]) AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) fi if test -n "$PKG_CONFIG"; then _pkg_min_version=m4_default([$1], [0.9.0]) AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) PKG_CONFIG="" fi fi[]dnl ])# PKG_PROG_PKG_CONFIG # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) # # Check to see whether a particular set of modules exists. Similar # to PKG_CHECK_MODULES(), but does not set variables or print errors. # # # Similar to PKG_CHECK_MODULES, make sure that the first instance of # this or PKG_CHECK_MODULES is called, or make sure to call # PKG_CHECK_EXISTS manually # -------------------------------------------------------------- AC_DEFUN([PKG_CHECK_EXISTS], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl if test -n "$PKG_CONFIG" && \ AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then m4_ifval([$2], [$2], [:]) m4_ifvaln([$3], [else $3])dnl fi]) # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) # --------------------------------------------- m4_define([_PKG_CONFIG], [if test -n "$PKG_CONFIG"; then if test -n "$$1"; then pkg_cv_[]$1="$$1" else PKG_CHECK_EXISTS([$3], [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], [pkg_failed=yes]) fi else pkg_failed=untried fi[]dnl ])# _PKG_CONFIG # _PKG_SHORT_ERRORS_SUPPORTED # ----------------------------- AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], [AC_REQUIRE([PKG_PROG_PKG_CONFIG]) if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi[]dnl ])# _PKG_SHORT_ERRORS_SUPPORTED # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], # [ACTION-IF-NOT-FOUND]) # # # Note that if there is a possibility the first call to # PKG_CHECK_MODULES might not happen, you should be sure to include an # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac # # # -------------------------------------------------------------- AC_DEFUN([PKG_CHECK_MODULES], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl pkg_failed=no AC_MSG_CHECKING([for $1]) _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) _PKG_CONFIG([$1][_LIBS], [libs], [$2]) m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS and $1[]_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details.]) if test $pkg_failed = yes; then _PKG_SHORT_ERRORS_SUPPORTED if test $_pkg_short_errors_supported = yes; then $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"` else $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"` fi # Put the nasty error message in config.log where it belongs echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD ifelse([$4], , [AC_MSG_ERROR(dnl [Package requirements ($2) were not met: $$1_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. _PKG_TEXT ])], [$4]) elif test $pkg_failed = untried; then ifelse([$4], , [AC_MSG_FAILURE(dnl [The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. _PKG_TEXT To get pkg-config, see .])], [$4]) else $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS $1[]_LIBS=$pkg_cv_[]$1[]_LIBS AC_MSG_RESULT([yes]) ifelse([$3], , :, [$3]) fi[]dnl ])# PKG_CHECK_MODULES # Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_AUTOMAKE_VERSION(VERSION) # ---------------------------- # Automake X.Y traces this macro to ensure aclocal.m4 has been # generated from the m4 files accompanying Automake X.Y. AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"]) # AM_SET_CURRENT_AUTOMAKE_VERSION # ------------------------------- # Call AM_AUTOMAKE_VERSION so it can be traced. # This function is AC_REQUIREd by AC_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], [AM_AUTOMAKE_VERSION([1.9.6])]) # Figure out how to run the assembler. -*- Autoconf -*- # Copyright (C) 2001, 2003, 2004, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 4 # AM_PROG_AS # ---------- AC_DEFUN([AM_PROG_AS], [# By default we simply use the C compiler to build assembly code. AC_REQUIRE([AC_PROG_CC]) test "${CCAS+set}" = set || CCAS=$CC test "${CCASFLAGS+set}" = set || CCASFLAGS=$CFLAGS AC_ARG_VAR([CCAS], [assembler compiler command (defaults to CC)]) AC_ARG_VAR([CCASFLAGS], [assembler compiler flags (defaults to CFLAGS)]) ]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to # `$srcdir', `$srcdir/..', or `$srcdir/../..'. # # Of course, Automake must honor this variable whenever it calls a # tool from the auxiliary directory. The problem is that $srcdir (and # therefore $ac_aux_dir as well) can be either absolute or relative, # depending on how configure is run. This is pretty annoying, since # it makes $ac_aux_dir quite unusable in subdirectories: in the top # source directory, any form will work fine, but in subdirectories a # relative path needs to be adjusted first. # # $ac_aux_dir/missing # fails when called from a subdirectory if $ac_aux_dir is relative # $top_srcdir/$ac_aux_dir/missing # fails if $ac_aux_dir is absolute, # fails when called from a subdirectory in a VPATH build with # a relative $ac_aux_dir # # The reason of the latter failure is that $top_srcdir and $ac_aux_dir # are both prefixed by $srcdir. In an in-source build this is usually # harmless because $srcdir is `.', but things will broke when you # start a VPATH build or use an absolute $srcdir. # # So we could use something similar to $top_srcdir/$ac_aux_dir/missing, # iff we strip the leading $srcdir from $ac_aux_dir. That would be: # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` # and then we would define $MISSING as # MISSING="\${SHELL} $am_aux_dir/missing" # This will work as long as MISSING is not called from configure, because # unfortunately $(top_srcdir) has no meaning in configure. # However there are other variables, like CC, which are often used in # configure, and could therefore not use this "fixed" $ac_aux_dir. # # Another solution, used here, is to always expand $ac_aux_dir to an # absolute PATH. The drawback is that using absolute paths prevent a # configured tree to be moved without reconfiguration. AC_DEFUN([AM_AUX_DIR_EXPAND], [dnl Rely on autoconf to set up CDPATH properly. AC_PREREQ([2.50])dnl # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` ]) # Copyright (C) 1996, 1997, 1999, 2000, 2001, 2002, 2003, 2005 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 4 # This was merged into AC_PROG_CC in Autoconf. AU_DEFUN([AM_PROG_CC_STDC], [AC_PROG_CC AC_DIAGNOSE([obsolete], [$0: your code should no longer depend upon `am_cv_prog_cc_stdc', but upon `ac_cv_prog_cc_stdc'. Remove this warning and the assignment when you adjust the code. You can also remove the above call to AC_PROG_CC if you already called it elsewhere.]) am_cv_prog_cc_stdc=$ac_cv_prog_cc_stdc ]) AU_DEFUN([fp_PROG_CC_STDC]) # AM_CONDITIONAL -*- Autoconf -*- # Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 7 # AM_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- # Define a conditional. AC_DEFUN([AM_CONDITIONAL], [AC_PREREQ(2.52)dnl ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl AC_SUBST([$1_TRUE]) AC_SUBST([$1_FALSE]) if $2; then $1_TRUE= $1_FALSE='#' else $1_TRUE='#' $1_FALSE= fi AC_CONFIG_COMMANDS_PRE( [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then AC_MSG_ERROR([[conditional "$1" was never defined. Usually this means the macro was only invoked conditionally.]]) fi])]) # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 8 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be # written in clear, in which case automake, when reading aclocal.m4, # will think it sees a *use*, and therefore will trigger all it's # C support machinery. Also note that it means that autoscan, seeing # CC etc. in the Makefile, will ask for an AC_PROG_CC use... # _AM_DEPENDENCIES(NAME) # ---------------------- # See how the compiler implements dependency checking. # NAME is "CC", "CXX", "GCJ", or "OBJC". # We try a few techniques and use that to set a single cache variable. # # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular # dependency, and given that the user is not expected to run this macro, # just rely on AC_PROG_CC. AC_DEFUN([_AM_DEPENDENCIES], [AC_REQUIRE([AM_SET_DEPDIR])dnl AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl AC_REQUIRE([AM_MAKE_INCLUDE])dnl AC_REQUIRE([AM_DEP_TRACK])dnl ifelse([$1], CC, [depcc="$CC" am_compiler_list=], [$1], CXX, [depcc="$CXX" am_compiler_list=], [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], [depcc="$$1" am_compiler_list=]) AC_CACHE_CHECK([dependency style of $depcc], [am_cv_$1_dependencies_compiler_type], [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_$1_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` fi for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf case $depmode in nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; none) break ;; esac # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. if depmode=$depmode \ source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_$1_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_$1_dependencies_compiler_type=none fi ]) AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) AM_CONDITIONAL([am__fastdep$1], [ test "x$enable_dependency_tracking" != xno \ && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) ]) # AM_SET_DEPDIR # ------------- # Choose a directory name for dependency files. # This macro is AC_REQUIREd in _AM_DEPENDENCIES AC_DEFUN([AM_SET_DEPDIR], [AC_REQUIRE([AM_SET_LEADING_DOT])dnl AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl ]) # AM_DEP_TRACK # ------------ AC_DEFUN([AM_DEP_TRACK], [AC_ARG_ENABLE(dependency-tracking, [ --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors]) if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' fi AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) AC_SUBST([AMDEPBACKSLASH]) ]) # Generate code to set up dependency tracking. -*- Autoconf -*- # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. #serial 3 # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [for mf in $CONFIG_FILES; do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named `Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # So let's grep whole file. if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then dirpart=`AS_DIRNAME("$mf")` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running `make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n 's/^U = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`AS_DIRNAME(["$file"])` AS_MKDIR_P([$dirpart/$fdir]) # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done ])# _AM_OUTPUT_DEPENDENCY_COMMANDS # AM_OUTPUT_DEPENDENCY_COMMANDS # ----------------------------- # This macro should only be invoked once -- use via AC_REQUIRE. # # This code is only required when automatic dependency tracking # is enabled. FIXME. This creates each `.P' file that we will # need in order to bootstrap the dependency handling code. AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AC_CONFIG_COMMANDS([depfiles], [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) ]) # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 8 # AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS. AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) # Do all the work for Automake. -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 12 # This macro actually does too much. Some checks are only needed if # your package does certain things. But this isn't really a big deal. # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) # AM_INIT_AUTOMAKE([OPTIONS]) # ----------------------------------------------- # The call with PACKAGE and VERSION arguments is the old style # call (pre autoconf-2.50), which is being phased out. PACKAGE # and VERSION should now be passed to AC_INIT and removed from # the call to AM_INIT_AUTOMAKE. # We support both call styles for the transition. After # the next Automake release, Autoconf can make the AC_INIT # arguments mandatory, and then we can depend on a new Autoconf # release and drop the old call support. AC_DEFUN([AM_INIT_AUTOMAKE], [AC_PREREQ([2.58])dnl dnl Autoconf wants to disallow AM_ names. We explicitly allow dnl the ones we care about. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl AC_REQUIRE([AC_PROG_INSTALL])dnl # test to see if srcdir already configured if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi AC_SUBST([CYGPATH_W]) # Define the identity of the package. dnl Distinguish between old-style and new-style calls. m4_ifval([$2], [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl AC_SUBST([PACKAGE], [$1])dnl AC_SUBST([VERSION], [$2])], [_AM_SET_OPTIONS([$1])dnl AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl _AM_IF_OPTION([no-define],, [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl # Some tools Automake needs. AC_REQUIRE([AM_SANITY_CHECK])dnl AC_REQUIRE([AC_ARG_PROGRAM])dnl AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) AM_MISSING_PROG(AUTOCONF, autoconf) AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) AM_MISSING_PROG(AUTOHEADER, autoheader) AM_MISSING_PROG(MAKEINFO, makeinfo) AM_PROG_INSTALL_SH AM_PROG_INSTALL_STRIP AC_REQUIRE([AM_PROG_MKDIR_P])dnl # We need awk for the "check" target. The system "awk" is bad on # some platforms. AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AM_SET_LEADING_DOT])dnl _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], [_AM_PROG_TAR([v7])])]) _AM_IF_OPTION([no-dependencies],, [AC_PROVIDE_IFELSE([AC_PROG_CC], [_AM_DEPENDENCIES(CC)], [define([AC_PROG_CC], defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl AC_PROVIDE_IFELSE([AC_PROG_CXX], [_AM_DEPENDENCIES(CXX)], [define([AC_PROG_CXX], defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl ]) ]) # When config.status generates a header, we must update the stamp-h file. # This file resides in the same directory as the config header # that is generated. The stamp files are numbered to have different names. # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the # loop where config.status creates the headers, so we can generate # our stamp files there. AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], [# Compute $1's index in $config_headers. _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $1 | $1:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count]) # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_SH # ------------------ # Define $install_sh. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl install_sh=${install_sh-"$am_aux_dir/install-sh"} AC_SUBST(install_sh)]) # Copyright (C) 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 2 # Check whether the underlying file-system supports filenames # with a leading dot. For instance MS-DOS doesn't. AC_DEFUN([AM_SET_LEADING_DOT], [rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null AC_SUBST([am__leading_dot])]) # Add --enable-maintainer-mode option to configure. -*- Autoconf -*- # From Jim Meyering # Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 4 AC_DEFUN([AM_MAINTAINER_MODE], [AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) dnl maintainer-mode is disabled by default AC_ARG_ENABLE(maintainer-mode, [ --enable-maintainer-mode enable make rules and dependencies not useful (and sometimes confusing) to the casual installer], USE_MAINTAINER_MODE=$enableval, USE_MAINTAINER_MODE=no) AC_MSG_RESULT([$USE_MAINTAINER_MODE]) AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes]) MAINT=$MAINTAINER_MODE_TRUE AC_SUBST(MAINT)dnl ] ) AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) # Check to see how 'make' treats includes. -*- Autoconf -*- # Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 3 # AM_MAKE_INCLUDE() # ----------------- # Check to see how make treats includes. AC_DEFUN([AM_MAKE_INCLUDE], [am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo done .PHONY: am__doit END # If we don't find an include directive, just comment out the code. AC_MSG_CHECKING([for style of include used by $am_make]) am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # We grep out `Entering directory' and `Leaving directory' # messages which can occur if `w' ends up in MAKEFLAGS. # In particular we don't look at `^make:' because GNU make might # be invoked under some other name (usually "gmake"), in which # case it prints its new name instead of `make'. if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then am__include=include am__quote= _am_result=GNU fi # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then am__include=.include am__quote="\"" _am_result=BSD fi fi AC_SUBST([am__include]) AC_SUBST([am__quote]) AC_MSG_RESULT([$_am_result]) rm -f confinc confmf ]) # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- # Copyright (C) 1997, 1999, 2000, 2001, 2003, 2005 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 4 # AM_MISSING_PROG(NAME, PROGRAM) # ------------------------------ AC_DEFUN([AM_MISSING_PROG], [AC_REQUIRE([AM_MISSING_HAS_RUN]) $1=${$1-"${am_missing_run}$2"} AC_SUBST($1)]) # AM_MISSING_HAS_RUN # ------------------ # Define MISSING if not defined so far and test if it supports --run. # If it does, set am_missing_run to use it, otherwise, to nothing. AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= AC_MSG_WARN([`missing' script is too old or missing]) fi ]) # Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_MKDIR_P # --------------- # Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise. # # Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories # created by `make install' are always world readable, even if the # installer happens to have an overly restrictive umask (e.g. 077). # This was a mistake. There are at least two reasons why we must not # use `-m 0755': # - it causes special bits like SGID to be ignored, # - it may be too restrictive (some setups expect 775 directories). # # Do not use -m 0755 and let people choose whatever they expect by # setting umask. # # We cannot accept any implementation of `mkdir' that recognizes `-p'. # Some implementations (such as Solaris 8's) are not thread-safe: if a # parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c' # concurrently, both version can detect that a/ is missing, but only # one can create it and the other will error out. Consequently we # restrict ourselves to GNU make (using the --version option ensures # this.) AC_DEFUN([AM_PROG_MKDIR_P], [if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then # We used to keeping the `.' as first argument, in order to # allow $(mkdir_p) to be used without argument. As in # $(mkdir_p) $(somedir) # where $(somedir) is conditionally defined. However this is wrong # for two reasons: # 1. if the package is installed by a user who cannot write `.' # make install will fail, # 2. the above comment should most certainly read # $(mkdir_p) $(DESTDIR)$(somedir) # so it does not work when $(somedir) is undefined and # $(DESTDIR) is not. # To support the latter case, we have to write # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir), # so the `.' trick is pointless. mkdir_p='mkdir -p --' else # On NextStep and OpenStep, the `mkdir' command does not # recognize any option. It will interpret all options as # directories to create, and then abort because `.' already # exists. for d in ./-p ./--version; do test -d $d && rmdir $d done # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists. if test -f "$ac_aux_dir/mkinstalldirs"; then mkdir_p='$(mkinstalldirs)' else mkdir_p='$(install_sh) -d' fi fi AC_SUBST([mkdir_p])]) # Helper functions for option handling. -*- Autoconf -*- # Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 3 # _AM_MANGLE_OPTION(NAME) # ----------------------- AC_DEFUN([_AM_MANGLE_OPTION], [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) # _AM_SET_OPTION(NAME) # ------------------------------ # Set option NAME. Presently that only means defining a flag for this option. AC_DEFUN([_AM_SET_OPTION], [m4_define(_AM_MANGLE_OPTION([$1]), 1)]) # _AM_SET_OPTIONS(OPTIONS) # ---------------------------------- # OPTIONS is a space-separated list of Automake options. AC_DEFUN([_AM_SET_OPTIONS], [AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) # ------------------------------------------- # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) # Check to make sure that the build environment is sane. -*- Autoconf -*- # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 4 # AM_SANITY_CHECK # --------------- AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) # Just in case sleep 1 echo timestamp > conftest.file # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` if test "$[*]" = "X"; then # -L didn't work. set X `ls -t $srcdir/configure conftest.file` fi rm -f conftest.file if test "$[*]" != "X $srcdir/configure conftest.file" \ && test "$[*]" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken alias in your environment]) fi test "$[2]" = conftest.file ) then # Ok. : else AC_MSG_ERROR([newly created file is older than distributed files! Check your system clock]) fi AC_MSG_RESULT(yes)]) # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_STRIP # --------------------- # One issue with vendor `install' (even GNU) is that you can't # specify the program used to strip binaries. This is especially # annoying in cross-compiling environments, where the build's strip # is unlikely to handle the host's binaries. # Fortunately install-sh will honor a STRIPPROG variable, so we # always use install-sh in `make install-strip', and initialize # STRIPPROG with the value of the STRIP variable (set by the user). AC_DEFUN([AM_PROG_INSTALL_STRIP], [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl # Installed binaries are usually stripped using `strip' when the user # run `make install-strip'. However `strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the `STRIP' environment variable to overrule this program. dnl Don't test for $cross_compiling = yes, because it might be `maybe'. if test "$cross_compiling" != no; then AC_CHECK_TOOL([STRIP], [strip], :) fi INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) # Check how to create a tarball. -*- Autoconf -*- # Copyright (C) 2004, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 2 # _AM_PROG_TAR(FORMAT) # -------------------- # Check how to create a tarball in format FORMAT. # FORMAT should be one of `v7', `ustar', or `pax'. # # Substitute a variable $(am__tar) that is a command # writing to stdout a FORMAT-tarball containing the directory # $tardir. # tardir=directory && $(am__tar) > result.tar # # Substitute a variable $(am__untar) that extract such # a tarball read from stdin. # $(am__untar) < result.tar AC_DEFUN([_AM_PROG_TAR], [# Always define AMTAR for backward compatibility. AM_MISSING_PROG([AMTAR], [tar]) m4_if([$1], [v7], [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], [m4_case([$1], [ustar],, [pax],, [m4_fatal([Unknown tar format])]) AC_MSG_CHECKING([how to create a $1 tar archive]) # Loop over all known methods to create a tar archive until one works. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' _am_tools=${am_cv_prog_tar_$1-$_am_tools} # Do not fold the above two line into one, because Tru64 sh and # Solaris sh will not grok spaces in the rhs of `-'. for _am_tool in $_am_tools do case $_am_tool in gnutar) for _am_tar in tar gnutar gtar; do AM_RUN_LOG([$_am_tar --version]) && break done am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' am__untar="$_am_tar -xf -" ;; plaintar) # Must skip GNU tar: if it does not support --format= it doesn't create # ustar tarball either. (tar --version) >/dev/null 2>&1 && continue am__tar='tar chf - "$$tardir"' am__tar_='tar chf - "$tardir"' am__untar='tar xf -' ;; pax) am__tar='pax -L -x $1 -w "$$tardir"' am__tar_='pax -L -x $1 -w "$tardir"' am__untar='pax -r' ;; cpio) am__tar='find "$$tardir" -print | cpio -o -H $1 -L' am__tar_='find "$tardir" -print | cpio -o -H $1 -L' am__untar='cpio -i -H $1 -d' ;; none) am__tar=false am__tar_=false am__untar=false ;; esac # If the value was cached, stop now. We just wanted to have am__tar # and am__untar set. test -n "${am_cv_prog_tar_$1}" && break # tar/untar a dummy directory, and stop if the command works rm -rf conftest.dir mkdir conftest.dir echo GrepMe > conftest.dir/file AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) rm -rf conftest.dir if test -s conftest.tar; then AM_RUN_LOG([$am__untar /dev/null 2>&1 && break fi done rm -rf conftest.dir AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) AC_MSG_RESULT([$am_cv_prog_tar_$1])]) AC_SUBST([am__tar]) AC_SUBST([am__untar]) ]) # _AM_PROG_TAR dnl AM_GCONF_SOURCE_2 dnl Defines GCONF_SCHEMA_CONFIG_SOURCE which is where you should install schemas dnl (i.e. pass to gconftool-2 dnl Defines GCONF_SCHEMA_FILE_DIR which is a filesystem directory where dnl you should install foo.schemas files dnl AC_DEFUN([AM_GCONF_SOURCE_2], [ if test "x$GCONF_SCHEMA_INSTALL_SOURCE" = "x"; then GCONF_SCHEMA_CONFIG_SOURCE=`gconftool-2 --get-default-source` else GCONF_SCHEMA_CONFIG_SOURCE=$GCONF_SCHEMA_INSTALL_SOURCE fi AC_ARG_WITH(gconf-source, [ --with-gconf-source=sourceaddress Config database for installing schema files.],GCONF_SCHEMA_CONFIG_SOURCE="$withval",) AC_SUBST(GCONF_SCHEMA_CONFIG_SOURCE) AC_MSG_RESULT([Using config source $GCONF_SCHEMA_CONFIG_SOURCE for schema installation]) if test "x$GCONF_SCHEMA_FILE_DIR" = "x"; then GCONF_SCHEMA_FILE_DIR='$(sysconfdir)/gconf/schemas' fi AC_ARG_WITH(gconf-schema-file-dir, [ --with-gconf-schema-file-dir=dir Directory for installing schema files.],GCONF_SCHEMA_FILE_DIR="$withval",) AC_SUBST(GCONF_SCHEMA_FILE_DIR) AC_MSG_RESULT([Using $GCONF_SCHEMA_FILE_DIR as install directory for schema files]) AC_ARG_ENABLE(schemas-install, [ --disable-schemas-install Disable the schemas installation], [case "${enableval}" in yes) schemas_install=true ;; no) schemas_install=false ;; *) AC_MSG_ERROR(bad value ${enableval} for --enable-schemas-install) ;; esac],[schemas_install=true]) AM_CONDITIONAL(GCONF_SCHEMAS_INSTALL, test x$schemas_install = xtrue) ]) # Copyright (C) 1995-2002 Free Software Foundation, Inc. # Copyright (C) 2001-2003,2004 Red Hat, Inc. # # This file is free software, distributed under the terms of the GNU # General Public License. As a special exception to the GNU General # Public License, this file may be distributed as part of a program # that contains a configuration script generated by Autoconf, under # the same distribution terms as the rest of that program. # # This file can be copied and used freely without restrictions. It can # be used in projects which are not available under the GNU Public License # but which still want to provide support for the GNU gettext functionality. # # Macro to add for using GNU gettext. # Ulrich Drepper , 1995, 1996 # # Modified to never use included libintl. # Owen Taylor , 12/15/1998 # # Major rework to remove unused code # Owen Taylor , 12/11/2002 # # Added better handling of ALL_LINGUAS from GNU gettext version # written by Bruno Haible, Owen Taylor 5/30/3002 # # Modified to require ngettext # Matthias Clasen 08/06/2004 # # We need this here as well, since someone might use autoconf-2.5x # to configure GLib then an older version to configure a package # using AM_GLIB_GNU_GETTEXT AC_PREREQ(2.53) dnl dnl We go to great lengths to make sure that aclocal won't dnl try to pull in the installed version of these macros dnl when running aclocal in the glib directory. dnl m4_copy([AC_DEFUN],[glib_DEFUN]) m4_copy([AC_REQUIRE],[glib_REQUIRE]) dnl dnl At the end, if we're not within glib, we'll define the public dnl definitions in terms of our private definitions. dnl # GLIB_LC_MESSAGES #-------------------- glib_DEFUN([GLIB_LC_MESSAGES], [AC_CHECK_HEADERS([locale.h]) if test $ac_cv_header_locale_h = yes; then AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES, [AC_TRY_LINK([#include ], [return LC_MESSAGES], am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)]) if test $am_cv_val_LC_MESSAGES = yes; then AC_DEFINE(HAVE_LC_MESSAGES, 1, [Define if your file defines LC_MESSAGES.]) fi fi]) # GLIB_PATH_PROG_WITH_TEST #---------------------------- dnl GLIB_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR, dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]]) glib_DEFUN([GLIB_PATH_PROG_WITH_TEST], [# Extract the first word of "$2", so it can be a program name with args. set dummy $2; ac_word=[$]2 AC_MSG_CHECKING([for $ac_word]) AC_CACHE_VAL(ac_cv_path_$1, [case "[$]$1" in /*) ac_cv_path_$1="[$]$1" # Let the user override the test with a path. ;; *) IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" for ac_dir in ifelse([$5], , $PATH, [$5]); do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then if [$3]; then ac_cv_path_$1="$ac_dir/$ac_word" break fi fi done IFS="$ac_save_ifs" dnl If no 4th arg is given, leave the cache variable unset, dnl so AC_PATH_PROGS will keep looking. ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4" ])dnl ;; esac])dnl $1="$ac_cv_path_$1" if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then AC_MSG_RESULT([$]$1) else AC_MSG_RESULT(no) fi AC_SUBST($1)dnl ]) # GLIB_WITH_NLS #----------------- glib_DEFUN([GLIB_WITH_NLS], dnl NLS is obligatory [USE_NLS=yes AC_SUBST(USE_NLS) gt_cv_have_gettext=no CATOBJEXT=NONE XGETTEXT=: INTLLIBS= AC_CHECK_HEADER(libintl.h, [gt_cv_func_dgettext_libintl="no" libintl_extra_libs="" # # First check in libc # AC_CACHE_CHECK([for ngettext in libc], gt_cv_func_ngettext_libc, [AC_TRY_LINK([ #include ], [return !ngettext ("","", 1)], gt_cv_func_ngettext_libc=yes, gt_cv_func_ngettext_libc=no) ]) if test "$gt_cv_func_ngettext_libc" = "yes" ; then AC_CACHE_CHECK([for dgettext in libc], gt_cv_func_dgettext_libc, [AC_TRY_LINK([ #include ], [return !dgettext ("","")], gt_cv_func_dgettext_libc=yes, gt_cv_func_dgettext_libc=no) ]) fi if test "$gt_cv_func_ngettext_libc" = "yes" ; then AC_CHECK_FUNCS(bind_textdomain_codeset) fi # # If we don't have everything we want, check in libintl # if test "$gt_cv_func_dgettext_libc" != "yes" \ || test "$gt_cv_func_ngettext_libc" != "yes" \ || test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then AC_CHECK_LIB(intl, bindtextdomain, [AC_CHECK_LIB(intl, ngettext, [AC_CHECK_LIB(intl, dgettext, gt_cv_func_dgettext_libintl=yes)])]) if test "$gt_cv_func_dgettext_libintl" != "yes" ; then AC_MSG_CHECKING([if -liconv is needed to use gettext]) AC_MSG_RESULT([]) AC_CHECK_LIB(intl, ngettext, [AC_CHECK_LIB(intl, dcgettext, [gt_cv_func_dgettext_libintl=yes libintl_extra_libs=-liconv], :,-liconv)], :,-liconv) fi # # If we found libintl, then check in it for bind_textdomain_codeset(); # we'll prefer libc if neither have bind_textdomain_codeset(), # and both have dgettext and ngettext # if test "$gt_cv_func_dgettext_libintl" = "yes" ; then glib_save_LIBS="$LIBS" LIBS="$LIBS -lintl $libintl_extra_libs" unset ac_cv_func_bind_textdomain_codeset AC_CHECK_FUNCS(bind_textdomain_codeset) LIBS="$glib_save_LIBS" if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then gt_cv_func_dgettext_libc=no else if test "$gt_cv_func_dgettext_libc" = "yes" \ && test "$gt_cv_func_ngettext_libc" = "yes"; then gt_cv_func_dgettext_libintl=no fi fi fi fi if test "$gt_cv_func_dgettext_libc" = "yes" \ || test "$gt_cv_func_dgettext_libintl" = "yes"; then gt_cv_have_gettext=yes fi if test "$gt_cv_func_dgettext_libintl" = "yes"; then INTLLIBS="-lintl $libintl_extra_libs" fi if test "$gt_cv_have_gettext" = "yes"; then AC_DEFINE(HAVE_GETTEXT,1, [Define if the GNU gettext() function is already present or preinstalled.]) GLIB_PATH_PROG_WITH_TEST(MSGFMT, msgfmt, [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl if test "$MSGFMT" != "no"; then glib_save_LIBS="$LIBS" LIBS="$LIBS $INTLLIBS" AC_CHECK_FUNCS(dcgettext) AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT) GLIB_PATH_PROG_WITH_TEST(XGETTEXT, xgettext, [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :) AC_TRY_LINK(, [extern int _nl_msg_cat_cntr; return _nl_msg_cat_cntr], [CATOBJEXT=.gmo DATADIRNAME=share], [case $host in *-*-solaris*) dnl On Solaris, if bind_textdomain_codeset is in libc, dnl GNU format message catalog is always supported, dnl since both are added to the libc all together. dnl Hence, we'd like to go with DATADIRNAME=share and dnl and CATOBJEXT=.gmo in this case. AC_CHECK_FUNC(bind_textdomain_codeset, [CATOBJEXT=.gmo DATADIRNAME=share], [CATOBJEXT=.mo DATADIRNAME=lib]) ;; *) CATOBJEXT=.mo DATADIRNAME=lib ;; esac]) LIBS="$glib_save_LIBS" INSTOBJEXT=.mo else gt_cv_have_gettext=no fi fi ]) if test "$gt_cv_have_gettext" = "yes" ; then AC_DEFINE(ENABLE_NLS, 1, [always defined to indicate that i18n is enabled]) fi dnl Test whether we really found GNU xgettext. if test "$XGETTEXT" != ":"; then dnl If it is not GNU xgettext we define it as : so that the dnl Makefiles still can work. if $XGETTEXT --omit-header /dev/null 2> /dev/null; then : ; else AC_MSG_RESULT( [found xgettext program is not GNU xgettext; ignore it]) XGETTEXT=":" fi fi # We need to process the po/ directory. POSUB=po AC_OUTPUT_COMMANDS( [case "$CONFIG_FILES" in *po/Makefile.in*) sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile esac]) dnl These rules are solely for the distribution goal. While doing this dnl we only have to keep exactly one list of the available catalogs dnl in configure.in. for lang in $ALL_LINGUAS; do GMOFILES="$GMOFILES $lang.gmo" POFILES="$POFILES $lang.po" done dnl Make all variables we use known to autoconf. AC_SUBST(CATALOGS) AC_SUBST(CATOBJEXT) AC_SUBST(DATADIRNAME) AC_SUBST(GMOFILES) AC_SUBST(INSTOBJEXT) AC_SUBST(INTLLIBS) AC_SUBST(PO_IN_DATADIR_TRUE) AC_SUBST(PO_IN_DATADIR_FALSE) AC_SUBST(POFILES) AC_SUBST(POSUB) ]) # AM_GLIB_GNU_GETTEXT # ------------------- # Do checks necessary for use of gettext. If a suitable implementation # of gettext is found in either in libintl or in the C library, # it will set INTLLIBS to the libraries needed for use of gettext # and AC_DEFINE() HAVE_GETTEXT and ENABLE_NLS. (The shell variable # gt_cv_have_gettext will be set to "yes".) It will also call AC_SUBST() # on various variables needed by the Makefile.in.in installed by # glib-gettextize. dnl glib_DEFUN([GLIB_GNU_GETTEXT], [AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_HEADER_STDC])dnl GLIB_LC_MESSAGES GLIB_WITH_NLS if test "$gt_cv_have_gettext" = "yes"; then if test "x$ALL_LINGUAS" = "x"; then LINGUAS= else AC_MSG_CHECKING(for catalogs to be installed) NEW_LINGUAS= for presentlang in $ALL_LINGUAS; do useit=no if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then desiredlanguages="$LINGUAS" else desiredlanguages="$ALL_LINGUAS" fi for desiredlang in $desiredlanguages; do # Use the presentlang catalog if desiredlang is # a. equal to presentlang, or # b. a variant of presentlang (because in this case, # presentlang can be used as a fallback for messages # which are not translated in the desiredlang catalog). case "$desiredlang" in "$presentlang"*) useit=yes;; esac done if test $useit = yes; then NEW_LINGUAS="$NEW_LINGUAS $presentlang" fi done LINGUAS=$NEW_LINGUAS AC_MSG_RESULT($LINGUAS) fi dnl Construct list of names of catalog files to be constructed. if test -n "$LINGUAS"; then for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done fi fi dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly dnl find the mkinstalldirs script in another subdir but ($top_srcdir). dnl Try to locate is. MKINSTALLDIRS= if test -n "$ac_aux_dir"; then MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs" fi if test -z "$MKINSTALLDIRS"; then MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs" fi AC_SUBST(MKINSTALLDIRS) dnl Generate list of files to be processed by xgettext which will dnl be included in po/Makefile. test -d po || mkdir po if test "x$srcdir" != "x."; then if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then posrcprefix="$srcdir/" else posrcprefix="../$srcdir/" fi else posrcprefix="../" fi rm -f po/POTFILES sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \ < $srcdir/po/POTFILES.in > po/POTFILES ]) # AM_GLIB_DEFINE_LOCALEDIR(VARIABLE) # ------------------------------- # Define VARIABLE to the location where catalog files will # be installed by po/Makefile. glib_DEFUN([GLIB_DEFINE_LOCALEDIR], [glib_REQUIRE([GLIB_GNU_GETTEXT])dnl glib_save_prefix="$prefix" glib_save_exec_prefix="$exec_prefix" test "x$prefix" = xNONE && prefix=$ac_default_prefix test "x$exec_prefix" = xNONE && exec_prefix=$prefix if test "x$CATOBJEXT" = "x.mo" ; then localedir=`eval echo "${libdir}/locale"` else localedir=`eval echo "${datadir}/locale"` fi prefix="$glib_save_prefix" exec_prefix="$glib_save_exec_prefix" AC_DEFINE_UNQUOTED($1, "$localedir", [Define the location where the catalogs will be installed]) ]) dnl dnl Now the definitions that aclocal will find dnl ifdef(glib_configure_in,[],[ AC_DEFUN([AM_GLIB_GNU_GETTEXT],[GLIB_GNU_GETTEXT($@)]) AC_DEFUN([AM_GLIB_DEFINE_LOCALEDIR],[GLIB_DEFINE_LOCALEDIR($@)]) ])dnl dnl IT_PROG_INTLTOOL([MINIMUM-VERSION], [no-xml]) # serial 2 IT_PROG_INTLTOOL AC_DEFUN([IT_PROG_INTLTOOL], [AC_PREREQ([2.50])dnl if test -n "$1"; then AC_MSG_CHECKING(for intltool >= $1) INTLTOOL_REQUIRED_VERSION_AS_INT=`echo $1 | awk -F. '{ print $ 1 * 100 + $ 2; }'` INTLTOOL_APPLIED_VERSION=`awk -F\" '/\\$VERSION / { print $ 2; }' ${ac_aux_dir}/intltool-update.in` [INTLTOOL_APPLIED_VERSION_AS_INT=`awk -F\" '/\\$VERSION / { split($ 2, VERSION, "."); print VERSION[1] * 100 + VERSION[2];}' ${ac_aux_dir}/intltool-update.in` ] AC_MSG_RESULT([$INTLTOOL_APPLIED_VERSION found]) test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT" || AC_MSG_ERROR([Your intltool is too old. You need intltool $1 or later.]) fi INTLTOOL_DESKTOP_RULE='%.desktop: %.desktop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' INTLTOOL_DIRECTORY_RULE='%.directory: %.directory.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' INTLTOOL_KEYS_RULE='%.keys: %.keys.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -k -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' INTLTOOL_PROP_RULE='%.prop: %.prop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' INTLTOOL_OAF_RULE='%.oaf: %.oaf.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -p $(top_srcdir)/po $< [$]@' INTLTOOL_PONG_RULE='%.pong: %.pong.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' INTLTOOL_SERVER_RULE='%.server: %.server.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' INTLTOOL_SHEET_RULE='%.sheet: %.sheet.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' INTLTOOL_SOUNDLIST_RULE='%.soundlist: %.soundlist.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' INTLTOOL_UI_RULE='%.ui: %.ui.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' INTLTOOL_XML_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' INTLTOOL_XML_NOMERGE_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u /tmp $< [$]@' INTLTOOL_XAM_RULE='%.xam: %.xml.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' INTLTOOL_KBD_RULE='%.kbd: %.kbd.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -m -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' INTLTOOL_CAVES_RULE='%.caves: %.caves.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' INTLTOOL_SCHEMAS_RULE='%.schemas: %.schemas.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -s -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' INTLTOOL_THEME_RULE='%.theme: %.theme.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' AC_SUBST(INTLTOOL_DESKTOP_RULE) AC_SUBST(INTLTOOL_DIRECTORY_RULE) AC_SUBST(INTLTOOL_KEYS_RULE) AC_SUBST(INTLTOOL_PROP_RULE) AC_SUBST(INTLTOOL_OAF_RULE) AC_SUBST(INTLTOOL_PONG_RULE) AC_SUBST(INTLTOOL_SERVER_RULE) AC_SUBST(INTLTOOL_SHEET_RULE) AC_SUBST(INTLTOOL_SOUNDLIST_RULE) AC_SUBST(INTLTOOL_UI_RULE) AC_SUBST(INTLTOOL_XAM_RULE) AC_SUBST(INTLTOOL_KBD_RULE) AC_SUBST(INTLTOOL_XML_RULE) AC_SUBST(INTLTOOL_XML_NOMERGE_RULE) AC_SUBST(INTLTOOL_CAVES_RULE) AC_SUBST(INTLTOOL_SCHEMAS_RULE) AC_SUBST(INTLTOOL_THEME_RULE) # Use the tools built into the package, not the ones that are installed. AC_SUBST(INTLTOOL_EXTRACT, '$(top_builddir)/intltool-extract') AC_SUBST(INTLTOOL_MERGE, '$(top_builddir)/intltool-merge') AC_SUBST(INTLTOOL_UPDATE, '$(top_builddir)/intltool-update') AC_PATH_PROG(INTLTOOL_PERL, perl) if test -z "$INTLTOOL_PERL"; then AC_MSG_ERROR([perl not found; required for intltool]) fi if test -z "`$INTLTOOL_PERL -v | fgrep '5.' 2> /dev/null`"; then AC_MSG_ERROR([perl 5.x required for intltool]) fi if test "x$2" != "xno-xml"; then AC_MSG_CHECKING([for XML::Parser]) if `$INTLTOOL_PERL -e "require XML::Parser" 2>/dev/null`; then AC_MSG_RESULT([ok]) else AC_MSG_ERROR([XML::Parser perl module is required for intltool]) fi fi AC_PATH_PROG(INTLTOOL_ICONV, iconv, iconv) AC_PATH_PROG(INTLTOOL_MSGFMT, msgfmt, msgfmt) AC_PATH_PROG(INTLTOOL_MSGMERGE, msgmerge, msgmerge) AC_PATH_PROG(INTLTOOL_XGETTEXT, xgettext, xgettext) # Remove file type tags (using []) from po/POTFILES. AC_CONFIG_COMMANDS_PRE([ [mv -f po/POTFILES po/POTFILES.tmp sed -e '/[[]encoding.*]/d' -e 's/[[].*] *//' < po/POTFILES.tmp > po/POTFILES rm -f po/POTFILES.tmp ]dnl ]) # Manually sed perl in so people don't have to put the intltool scripts in AC_OUTPUT. AC_CONFIG_COMMANDS([intltool], [ intltool_edit="-e 's#@INTLTOOL_EXTRACT@#`pwd`/intltool-extract#g' \ -e 's#@INTLTOOL_ICONV@#${INTLTOOL_ICONV}#g' \ -e 's#@INTLTOOL_MSGFMT@#${INTLTOOL_MSGFMT}#g' \ -e 's#@INTLTOOL_MSGMERGE@#${INTLTOOL_MSGMERGE}#g' \ -e 's#@INTLTOOL_XGETTEXT@#${INTLTOOL_XGETTEXT}#g' \ -e 's#@INTLTOOL_PERL@#${INTLTOOL_PERL}#g'" eval sed ${intltool_edit} < ${ac_aux_dir}/intltool-extract.in \ > intltool-extract.out if cmp -s intltool-extract intltool-extract.out 2>/dev/null; then rm -f intltool-extract.out else mv -f intltool-extract.out intltool-extract fi chmod ugo+x intltool-extract chmod u+w intltool-extract eval sed ${intltool_edit} < ${ac_aux_dir}/intltool-merge.in \ > intltool-merge.out if cmp -s intltool-merge intltool-merge.out 2>/dev/null; then rm -f intltool-merge.out else mv -f intltool-merge.out intltool-merge fi chmod ugo+x intltool-merge chmod u+w intltool-merge eval sed ${intltool_edit} < ${ac_aux_dir}/intltool-update.in \ > intltool-update.out if cmp -s intltool-update intltool-update.out 2>/dev/null; then rm -f intltool-update.out else mv -f intltool-update.out intltool-update fi chmod ugo+x intltool-update chmod u+w intltool-update ], INTLTOOL_PERL='${INTLTOOL_PERL}' ac_aux_dir=${ac_aux_dir} INTLTOOL_EXTRACT='${INTLTOOL_EXTRACT}' ICONV='${INTLTOOL_ICONV}' MSGFMT='${INTLTOOL_MSGFMT}' MSGMERGE='${INTLTOOL_MSGMERGE}' XGETTEXT='${INTLTOOL_XGETTEXT}') ]) # deprecated macros AU_ALIAS([AC_PROG_INTLTOOL], [IT_PROG_INTLTOOL]) # A hint is needed for aclocal from Automake <= 1.9.4: # AC_DEFUN([AC_PROG_INTLTOOL], ...) m4_include([acinclude.m4]) zapping-0.10cvs6/glade/ 777 764 144 0 10443536345 10074 5zapping-0.10cvs6/glade/zapping.glade2 644 764 144 347442 10427064104 12665 Zapping Preferences GTK_WIN_POS_NONE False True False True False False GDK_WINDOW_TYPE_HINT_NORMAL GDK_GRAVITY_NORTH_WEST True True True True GTK_POS_TOP False False True True True True GTK_POS_TOP False False 6 True False 12 True False 0 True True True True GTK_POS_TOP True False 0 True True True 0 0.5 GTK_SHADOW_ETCHED_IN True False False GTK_JUSTIFY_LEFT False False 0.5 0.5 0 0 True Video device capabilities False False GTK_JUSTIFY_LEFT False False 0.5 0.5 3 3 label_item 0 True True 0 True True True 5 2 False 3 0 True False False GTK_JUSTIFY_LEFT False False 0.5 0.5 0 0 1 2 0 1 True zapping_v4l_device 10 Select the V4L device False False True GTK_FILE_CHOOSER_ACTION_OPEN True True True True 0 True * False 1 2 2 3 True False False GTK_JUSTIFY_CENTER False False 0.5 0.5 0 0 1 2 1 2 True False False GTK_JUSTIFY_CENTER False False 0.5 0.5 0 0 1 2 3 4 True False False GTK_JUSTIFY_CENTER False False 0.5 0.5 0 0 1 2 4 5 True Device name: False False GTK_JUSTIFY_RIGHT False False 0 0.5 0 3 0 1 0 1 expand|shrink|fill True Current controller: False False GTK_JUSTIFY_CENTER False False 0 0.5 0 3 0 1 1 2 expand|shrink|fill True _Device file: True False GTK_JUSTIFY_RIGHT False False 0 0.5 0 3 combo-entry1 0 1 2 3 expand|shrink|fill True Minimum capture size: False False GTK_JUSTIFY_CENTER False False 0 0.5 0 3 0 1 3 4 expand|shrink|fill True Maximum capture size: False False GTK_JUSTIFY_CENTER False False 0 0.5 0 3 0 1 4 5 expand|shrink|fill 0 True True False True True Video False False GTK_JUSTIFY_LEFT False False 0.5 0.5 0 0 tab 3 True False 0 3 True True _No audio recording True GTK_RELIEF_NORMAL True False False True 0 False False 3 True True _Gnome sound daemon (ESD) True GTK_RELIEF_NORMAL True False False True devices-audio-none 0 False False 3 True True _KDE sound daemon (ARTS) True GTK_RELIEF_NORMAL True False False True devices-audio-none 0 False False 3 True True Kernel _device True GTK_RELIEF_NORMAL True False False True devices-audio-none 0 False False True 0 0 1 1 0 0 12 0 0 False False 6 True False 0 0 False False 3 True True _Control volume with soundcard mixer True GTK_RELIEF_NORMAL True False False True 0 False False True 0 0 1 1 0 0 12 0 0 False False False False True Audio False False GTK_JUSTIFY_LEFT False False 0.5 0.5 0 0 tab 3 True False 0 3 True True _No VBI services True GTK_RELIEF_NORMAL True False False True 0 False False 3 True True DVB _PES File True GTK_RELIEF_NORMAL True False False True devices-vbi-none 0 False False True 0 0 1 1 0 0 12 0 True devices-vbi-pes-fileentry 10 DVB PES File False False True GTK_FILE_CHOOSER_ACTION_OPEN True True True True 0 True * False 0 False False 3 True True Kernel _device True GTK_RELIEF_NORMAL True False False True devices-vbi-none 0 False False True 0 0 1 1 0 0 12 0 True devices-vbi-kernel-fileentry 10 Kernel VBI device False False True GTK_FILE_CHOOSER_ACTION_OPEN True True True True 0 True * False 0 False False True 0 0 1 1 0 0 12 0 True True _Use VBI Proxy if available True GTK_RELIEF_NORMAL True False False True 0 False False False True True VBI False False GTK_JUSTIFY_LEFT False False 0.5 0.5 0 0 tab False True True Devices False False GTK_JUSTIFY_CENTER False False 0.5 0.5 0 0 tab True True True True GTK_POS_TOP False False 6 True False 0 3 True True Show _tooltips True GTK_RELIEF_NORMAL True False False True 0 False False 3 True True Disable _screensaver True GTK_RELIEF_NORMAL True False False True 0 False False True 4 2 False 3 6 True _Enter channels by: True False GTK_JUSTIFY_CENTER False False 0 0.5 3 0 channel_number_translation 0 1 2 3 fill True Title _bar contents: True False GTK_JUSTIFY_CENTER False False 0 0.5 3 0 combo-entry5 0 1 3 4 fill True True 0 True True Channel list number True True RF channel number True 1 2 2 3 fill True title_format 10 True A format string describing the main window title when changing channels: $(alias), $(index), $(id), $(freq), $(standard) and $(input) are substituted by the respective values. True True True 0 True * False 1 2 3 4 3 True True Save _control values per channel True GTK_RELIEF_NORMAL True False False True 0 2 0 1 fill True S_how toolbar as: True False GTK_JUSTIFY_LEFT False False 0 0.5 3 0 toolbar_style 0 1 1 2 fill True True 0 True True Channel list number True True RF channel number True 1 2 1 2 fill 0 True True False True True Window False False GTK_JUSTIFY_CENTER False False 0.5 0.5 0 0 tab 6 True 5 2 False 3 12 True _Fullscreen video resolution: True False GTK_JUSTIFY_CENTER False False 0 0.5 0 0 optionmenu2 0 1 0 1 fill True _Capture size under XVideo: True False GTK_JUSTIFY_CENTER False False 0 0.5 0 0 optionmenu20 0 1 1 2 fill True Favorite _picture sizes: True False GTK_JUSTIFY_LEFT False False 0 0 0 0 0 1 3 4 6 fill True True -1 True 1 2 0 1 expand|shrink|fill True True 0 True True Biggest noninterlaced (autodetect) True True 320x240 True True Interlaced (window size) True 1 2 1 2 expand|shrink|fill True False 3 True True GTK_POLICY_AUTOMATIC GTK_POLICY_AUTOMATIC GTK_SHADOW_NONE GTK_CORNER_TOP_LEFT True True True False False True 0 True True True True 0 True True gtk-add True GTK_RELIEF_NORMAL True 0 False True True True gtk-remove True GTK_RELIEF_NORMAL True 0 False True 0 False False 1 2 3 4 expand|shrink|fill expand|shrink|fill True True _Resize using fixed increments True GTK_RELIEF_NORMAL True False False True 0 2 4 5 fill True Chroma _key: True False GTK_JUSTIFY_LEFT False False 0 0.5 0 0 colorbutton1 0 1 2 3 fill True True False True 1 2 2 3 fill False True True Video False False GTK_JUSTIFY_CENTER False False 0.5 0.5 0 0 tab 6 True False 3 3 True True _Start Zapping muted True GTK_RELIEF_NORMAL True False False True 0 False False 3 True True _Mute on exit True GTK_RELIEF_NORMAL True False False True 0 False False 3 True True Mute while ch_anging channels True GTK_RELIEF_NORMAL True False False True 0 False False False True True Audio False False GTK_JUSTIFY_CENTER False False 0.5 0.5 0 0 tab 6 True 7 2 False 3 12 True _Remove after: True False GTK_JUSTIFY_CENTER False False 0 0.5 0 0 0 1 2 3 fill True F_ont: True False GTK_JUSTIFY_CENTER False False 0 0.5 0 0 general-osd-font-selector 0 1 4 5 fill True _Foreground color: True False GTK_JUSTIFY_CENTER False False 0 0.5 0 0 general-osd-foreground-selector 0 1 5 6 fill True _Background color: True False GTK_JUSTIFY_CENTER False False 0 0.5 0 0 general-osd-background-selector 0 1 6 7 fill True False 6 True True 1 1 True GTK_UPDATE_IF_VALID False False 0 0 100 0.1 10 10 0 True True True seconds False False GTK_JUSTIFY_LEFT False False 0.5 0.5 0 0 0 False False 1 2 2 3 fill fill True True 0 True True On Screen Display (OSD) True True Status Bar True True Console True True No Display True 1 2 0 1 expand|shrink|fill True True Select OSD font GNOME_FONT_PICKER_MODE_FONT_INFO True False 14 True 1 2 4 5 expand|shrink|fill True True True False Choose a color True 1 2 5 6 expand|shrink|fill True True True False Choose a color True 1 2 6 7 expand|shrink|fill True _Display mode: True False GTK_JUSTIFY_CENTER False False 0 0.5 0 0 optionmenu22 0 1 0 1 fill 3 True False 0 0 1 1 2 fill fill 3 True False 0 0 1 3 4 fill fill False True True OSD False False GTK_JUSTIFY_CENTER False False 0.5 0.5 0 0 tab 6 True 3 2 False 6 12 True _Command: True False GTK_JUSTIFY_CENTER False False 1 0.5 0 3 combo-entry6 0 1 1 2 fill True False 0 True True gtk-add True GTK_RELIEF_NORMAL True 0 True True True True gtk-remove True GTK_RELIEF_NORMAL True 0 True True 0 2 2 3 True True GTK_POLICY_AUTOMATIC GTK_POLICY_AUTOMATIC GTK_SHADOW_ETCHED_IN GTK_CORNER_TOP_LEFT True True True False False True 0 2 0 1 fill True False True False True False True True True True 0 True * False True GTK_SELECTION_BROWSE 1 2 1 2 expand|shrink|fill False True True Keyboard False False GTK_JUSTIFY_CENTER False False 0.5 0.5 0 0 tab False True True General options False False GTK_JUSTIFY_CENTER False False 0.5 0.5 0 0 tab 0 True True True Plugin properties GTK_WINDOW_TOPLEVEL GTK_WIN_POS_NONE False True False True False False GDK_WINDOW_TYPE_HINT_NORMAL GDK_GRAVITY_NORTH_WEST True True False 0 True GTK_BUTTONBOX_END True Run the plugin True True gtk-execute True GTK_RELIEF_NORMAL True 0 True Stop this plugin True True gtk-stop True GTK_RELIEF_NORMAL True 0 True Click here when you are done True True gtk-ok True GTK_RELIEF_NORMAL True -5 0 False True GTK_PACK_END True True 1 True True True False False True False False True True True True GTK_POS_TOP False False True False 9 True False False GTK_JUSTIFY_CENTER False False 0.5 0.5 0 0 0 False False True False False GTK_JUSTIFY_CENTER False False 0.5 0.5 0 0 0 False False True True 8 True Canonical name: False False GTK_JUSTIFY_CENTER False False 1 0.5 0 0 0 True True True False False GTK_JUSTIFY_CENTER False False 0 0.5 0 0 0 False True 0 False False True True 8 True Author: False False GTK_JUSTIFY_CENTER False False 1 0.5 0 0 0 True True True False False GTK_JUSTIFY_CENTER False False 0 0.5 0 0 0 True True 0 False False True True 8 True Plugin version: False False GTK_JUSTIFY_CENTER False False 1 0.5 0 0 0 True True True False False GTK_JUSTIFY_CENTER False False 0 0.5 0 0 0 True True 0 False False True True 8 True Plugin priority: False False GTK_JUSTIFY_CENTER False False 1 0.5 0 0 0 True True True False False GTK_JUSTIFY_CENTER False False 0 0.5 0 0 0 True True 0 False False True label945 False False GTK_JUSTIFY_FILL True False 0.5 0.5 0 0 20 False False False True True Properties False False GTK_JUSTIFY_CENTER False False 0.5 0.5 0 0 tab True False 0 True Plugin location False False GTK_JUSTIFY_CENTER False False 0.5 0.5 0 0 0 False False True True label946 False False GTK_JUSTIFY_LEFT False True 0.5 0.5 0 0 0 False False True False 0 True False False GTK_JUSTIFY_CENTER False False 0.5 0.5 0 0 0 False False True GTK_POLICY_AUTOMATIC GTK_POLICY_AUTOMATIC GTK_SHADOW_IN GTK_CORNER_TOP_LEFT True True True False False True 0 True True True label947 False False GTK_JUSTIFY_FILL True False 0.5 0.5 0 0 0 False False 0 True True False True True Advanced False False GTK_JUSTIFY_CENTER False False 0.5 0.5 0 0 tab False False 0 True True True Zapping error console GTK_WINDOW_TOPLEVEL GTK_WIN_POS_NONE False True False True False False GDK_WINDOW_TYPE_HINT_NORMAL GDK_GRAVITY_NORTH_WEST True True False 8 True GTK_BUTTONBOX_END True OK, let's go on True True True gtk-ok True GTK_RELIEF_NORMAL True 0 True Remove all this mess True True Clean console True GTK_RELIEF_NORMAL True 0 0 False True GTK_PACK_END True GTK_POLICY_NEVER GTK_POLICY_AUTOMATIC GTK_SHADOW_IN GTK_CORNER_TOP_LEFT 0 True True Known key names GTK_WINDOW_TOPLEVEL GTK_WIN_POS_NONE True True False True False False GDK_WINDOW_TYPE_HINT_NORMAL GDK_GRAVITY_NORTH_WEST True True False 8 True GTK_BUTTONBOX_END True True True gtk-ok True GTK_RELIEF_NORMAL True -5 True True True gtk-cancel True GTK_RELIEF_NORMAL True -6 0 False True GTK_PACK_END True False 5 True GTK_POLICY_AUTOMATIC GTK_POLICY_AUTOMATIC GTK_SHADOW_IN GTK_CORNER_TOP_LEFT True True True False False True 0 True True True True Enter key True GTK_RELIEF_NORMAL True False False 0 False False 0 True True 5 True False True False False GDK_WINDOW_TYPE_HINT_NORMAL GDK_GRAVITY_NORTH_WEST Copyright (C) 2000-2005 the contributors TV viewer for the Gnome environment Michael H. Schimek Iñaki García Etxebarria Guus Bonnema Iñaki García Etxebarria Joseba García Etxebarria Hiroshi Hasebe Henrik Isacsson Arkadiusz Lipiec Christian Marillat Pavel Mlcoch Morten Brix Pedersen Paweł Sakowski Michael H. Schimek Reinout van Schouwen Ime Smits Pino Toscano 4 True Video Standard GTK_WINDOW_TOPLEVEL GTK_WIN_POS_NONE False True False True False False GDK_WINDOW_TYPE_HINT_NORMAL GDK_GRAVITY_NORTH_WEST True True False 0 True GTK_BUTTONBOX_END True True True gtk-cancel True GTK_RELIEF_NORMAL True -6 True True True gtk-ok True GTK_RELIEF_NORMAL True -5 0 False True GTK_PACK_END 3 True False 6 True The video capture device does not report the correct video standard, please select manually: False False GTK_JUSTIFY_LEFT True False 0.5 0.5 0 0 0 False False True True 0 True NTSC True True PAL True True SECAM True 0 False False True True Remember this video standard True GTK_RELIEF_NORMAL True True False True 0 False False 0 False False zapping-0.10cvs6/glade/Makefile.am 644 764 144 165 10327375017 12104 ## Process this file with automake to produce Makefile.in EXTRA_DIST = zapping.glade2 pkgdata_DATA = zapping.glade2 zapping-0.10cvs6/glade/Makefile.in 644 764 144 34037 10442575410 12157 # Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = .. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = glade DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = SOURCES = DIST_SOURCES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; am__installdirs = "$(DESTDIR)$(pkgdatadir)" pkgdataDATA_INSTALL = $(INSTALL_DATA) DATA = $(pkgdata_DATA) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ ARTS_CFLAGS = @ARTS_CFLAGS@ ARTS_LIBS = @ARTS_LIBS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BUILD_DEINTERLACE_PLUGIN_FALSE = @BUILD_DEINTERLACE_PLUGIN_FALSE@ BUILD_DEINTERLACE_PLUGIN_TRUE = @BUILD_DEINTERLACE_PLUGIN_TRUE@ BUILD_MAN_FALSE = @BUILD_MAN_FALSE@ BUILD_MAN_TRUE = @BUILD_MAN_TRUE@ CAN_COMPILE_3DNOW_FALSE = @CAN_COMPILE_3DNOW_FALSE@ CAN_COMPILE_3DNOW_TRUE = @CAN_COMPILE_3DNOW_TRUE@ CAN_COMPILE_ALTIVEC_FALSE = @CAN_COMPILE_ALTIVEC_FALSE@ CAN_COMPILE_ALTIVEC_TRUE = @CAN_COMPILE_ALTIVEC_TRUE@ CAN_COMPILE_MMX_FALSE = @CAN_COMPILE_MMX_FALSE@ CAN_COMPILE_MMX_TRUE = @CAN_COMPILE_MMX_TRUE@ CAN_COMPILE_SSE2_FALSE = @CAN_COMPILE_SSE2_FALSE@ CAN_COMPILE_SSE2_TRUE = @CAN_COMPILE_SSE2_TRUE@ CAN_COMPILE_SSE3_FALSE = @CAN_COMPILE_SSE3_FALSE@ CAN_COMPILE_SSE3_TRUE = @CAN_COMPILE_SSE3_TRUE@ CAN_COMPILE_SSE_FALSE = @CAN_COMPILE_SSE_FALSE@ CAN_COMPILE_SSE_TRUE = @CAN_COMPILE_SSE_TRUE@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCAS = @CCAS@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ COMMON_INCLUDES = @COMMON_INCLUDES@ CONSOLEHELPER_LOCATION = @CONSOLEHELPER_LOCATION@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFAULT_CFLAGS = @DEFAULT_CFLAGS@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ESD_LIBS = @ESD_LIBS@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ GCONF_SCHEMAS_INSTALL_FALSE = @GCONF_SCHEMAS_INSTALL_FALSE@ GCONF_SCHEMAS_INSTALL_TRUE = @GCONF_SCHEMAS_INSTALL_TRUE@ GCONF_SCHEMA_CONFIG_SOURCE = @GCONF_SCHEMA_CONFIG_SOURCE@ GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@ GDK_PIXBUF_CSOURCE = @GDK_PIXBUF_CSOURCE@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ HAVE_GCC_LIMITS_FALSE = @HAVE_GCC_LIMITS_FALSE@ HAVE_GCC_LIMITS_TRUE = @HAVE_GCC_LIMITS_TRUE@ HAVE_LIBZVBI_FALSE = @HAVE_LIBZVBI_FALSE@ HAVE_LIBZVBI_TRUE = @HAVE_LIBZVBI_TRUE@ HAVE_X86_FALSE = @HAVE_X86_FALSE@ HAVE_X86_TRUE = @HAVE_X86_TRUE@ HAVE_XMU_FALSE = @HAVE_XMU_FALSE@ HAVE_XMU_TRUE = @HAVE_XMU_TRUE@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ INTLTOOL_CAVES_RULE = @INTLTOOL_CAVES_RULE@ INTLTOOL_DESKTOP_RULE = @INTLTOOL_DESKTOP_RULE@ INTLTOOL_DIRECTORY_RULE = @INTLTOOL_DIRECTORY_RULE@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ INTLTOOL_ICONV = @INTLTOOL_ICONV@ INTLTOOL_KBD_RULE = @INTLTOOL_KBD_RULE@ INTLTOOL_KEYS_RULE = @INTLTOOL_KEYS_RULE@ INTLTOOL_MERGE = @INTLTOOL_MERGE@ INTLTOOL_MSGFMT = @INTLTOOL_MSGFMT@ INTLTOOL_MSGMERGE = @INTLTOOL_MSGMERGE@ INTLTOOL_OAF_RULE = @INTLTOOL_OAF_RULE@ INTLTOOL_PERL = @INTLTOOL_PERL@ INTLTOOL_PONG_RULE = @INTLTOOL_PONG_RULE@ INTLTOOL_PROP_RULE = @INTLTOOL_PROP_RULE@ INTLTOOL_SCHEMAS_RULE = @INTLTOOL_SCHEMAS_RULE@ INTLTOOL_SERVER_RULE = @INTLTOOL_SERVER_RULE@ INTLTOOL_SHEET_RULE = @INTLTOOL_SHEET_RULE@ INTLTOOL_SOUNDLIST_RULE = @INTLTOOL_SOUNDLIST_RULE@ INTLTOOL_THEME_RULE = @INTLTOOL_THEME_RULE@ INTLTOOL_UI_RULE = @INTLTOOL_UI_RULE@ INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ INTLTOOL_XAM_RULE = @INTLTOOL_XAM_RULE@ INTLTOOL_XGETTEXT = @INTLTOOL_XGETTEXT@ INTLTOOL_XML_NOMERGE_RULE = @INTLTOOL_XML_NOMERGE_RULE@ INTLTOOL_XML_RULE = @INTLTOOL_XML_RULE@ JPEG_LIB = @JPEG_LIB@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBXML_CFLAGS = @LIBXML_CFLAGS@ LIBXML_LIBS = @LIBXML_LIBS@ LIRC_LIB = @LIRC_LIB@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAKEINFO = @MAKEINFO@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ NEED_ZSFB_FALSE = @NEED_ZSFB_FALSE@ NEED_ZSFB_TRUE = @NEED_ZSFB_TRUE@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_CFLAGS = @PACKAGE_CFLAGS@ PACKAGE_LIBS = @PACKAGE_LIBS@ PACKAGE_LIB_DIR = @PACKAGE_LIB_DIR@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_PIXMAPS_DIR = @PACKAGE_PIXMAPS_DIR@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PACKAGE_VERSION_ID = @PACKAGE_VERSION_ID@ PATH_SEPARATOR = @PATH_SEPARATOR@ PG_CFLAGS = @PG_CFLAGS@ PKG_CONFIG = @PKG_CONFIG@ PLUGIN_DEFAULT_DIR = @PLUGIN_DEFAULT_DIR@ PLUGIN_DEFAULT_FLAGS = @PLUGIN_DEFAULT_FLAGS@ PNG_LIBS = @PNG_LIBS@ POFILES = @POFILES@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ PYTHON_LIBS = @PYTHON_LIBS@ PY_CFLAGS = @PY_CFLAGS@ PY_EXTRA_LIBS = @PY_EXTRA_LIBS@ PY_LIBS = @PY_LIBS@ PY_LIB_LOC = @PY_LIB_LOC@ RANLIB = @RANLIB@ RTE_LIBS = @RTE_LIBS@ SCROLLKEEPER_BUILD_REQUIRED = @SCROLLKEEPER_BUILD_REQUIRED@ SCROLLKEEPER_CONFIG = @SCROLLKEEPER_CONFIG@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ SUID_ZSFB_FALSE = @SUID_ZSFB_FALSE@ SUID_ZSFB_TRUE = @SUID_ZSFB_TRUE@ UNICODE_CFLAGS = @UNICODE_CFLAGS@ UNICODE_LIBS = @UNICODE_LIBS@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ WARN_CFLAGS = @WARN_CFLAGS@ XGETTEXT = @XGETTEXT@ XMLCATALOG = @XMLCATALOG@ XML_CATALOG_FILE = @XML_CATALOG_FILE@ XSLTPROC = @XSLTPROC@ X_CFLAGS = @X_CFLAGS@ X_DPMS_LIBS = @X_DPMS_LIBS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ X_XF86DGA_LIBS = @X_XF86DGA_LIBS@ X_XF86VMODE_LIBS = @X_XF86VMODE_LIBS@ X_XINERAMA_LIBS = @X_XINERAMA_LIBS@ X_XMU_LIBS = @X_XMU_LIBS@ X_XV_LIBS = @X_XV_LIBS@ ZSFB_GROUP = @ZSFB_GROUP@ ZSFB_OWNER = @ZSFB_OWNER@ ZVBI_CFLAGS = @ZVBI_CFLAGS@ ZVBI_LIBS = @ZVBI_LIBS@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_STRIP = @ac_ct_STRIP@ ac_pt_PKG_CONFIG = @ac_pt_PKG_CONFIG@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ datadir = @datadir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ python_val = @python_val@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ EXTRA_DIST = zapping.glade2 pkgdata_DATA = zapping.glade2 all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu glade/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu glade/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool uninstall-info-am: install-pkgdataDATA: $(pkgdata_DATA) @$(NORMAL_INSTALL) test -z "$(pkgdatadir)" || $(mkdir_p) "$(DESTDIR)$(pkgdatadir)" @list='$(pkgdata_DATA)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ f=$(am__strip_dir) \ echo " $(pkgdataDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(pkgdatadir)/$$f'"; \ $(pkgdataDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(pkgdatadir)/$$f"; \ done uninstall-pkgdataDATA: @$(NORMAL_UNINSTALL) @list='$(pkgdata_DATA)'; for p in $$list; do \ f=$(am__strip_dir) \ echo " rm -f '$(DESTDIR)$(pkgdatadir)/$$f'"; \ rm -f "$(DESTDIR)$(pkgdatadir)/$$f"; \ done tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(DATA) installdirs: for dir in "$(DESTDIR)$(pkgdatadir)"; do \ test -z "$$dir" || $(mkdir_p) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic distclean-libtool dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-pkgdataDATA install-exec-am: install-info: install-info-am install-man: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-info-am uninstall-pkgdataDATA .PHONY: all all-am check check-am clean clean-generic clean-libtool \ distclean distclean-generic distclean-libtool distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-exec install-exec-am \ install-info install-info-am install-man install-pkgdataDATA \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ uninstall uninstall-am uninstall-info-am uninstall-pkgdataDATA # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: zapping-0.10cvs6/libtv/ 777 764 144 0 10443536341 10134 5zapping-0.10cvs6/libtv/yuv2yuv.c 644 764 144 113627 10432662523 12017 /* * Copyright (C) 2006 Michael H. Schimek * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* $Id: yuv2yuv.c,v 1.4 2006/05/17 18:02:59 mschimek Exp $ */ /* YUV to YUV image format conversion functions: TV_PIXFMT_YUV420, TV_PIXFMT_YVU420, TV_PIXFMT_YUYV, TV_PIXFMT_YVYU, TV_PIXFMT_UYVY, TV_PIXFMT_VYUY, to TV_PIXFMT_YUV420, TV_PIXFMT_YVU420, TV_PIXFMT_YUYV, TV_PIXFMT_YVYU, TV_PIXFMT_UYVY, TV_PIXFMT_VYUY, Assumed color sample position: YUV420 progressive interlaced L L Lt Lt C L L Lb Ct Lb L L Lt Cb Lt C L L Lb Lb YUYV L C L L C L L C L L C L */ #include "copy_image-priv.h" #include "simd-conv.h" #include "yuv2yuv.h" SIMD_FN_ARRAY_PROTOS (copy_plane_fn *, yuyv_to_yuyv_loops, [4 * 4]) #if SIMD == CPU_FEATURE_ALTIVEC #warning untested #define SIMD_SHUFFLE(a, b, c, d) \ void \ _tv_shuffle_ ## a ## b ## c ## d ## _ALTIVEC \ (uint8_t * dst, \ const uint8_t * src, \ unsigned int width, \ unsigned int height, \ unsigned long dst_padding, \ unsigned long src_padding) \ { \ while (height-- > 0) { \ const uint8_t *end; \ \ for (end = s + width; s < end;) { \ static const vu8 sel = { \ a + 0, b + 0, c + 0, d + 0, \ a + 4, b + 4, c + 4, d + 4, \ a + 8, b + 8, c + 8, d + 8, \ a + 12, b + 12, c + 12, d + 12 }; \ vu8 s0, s1; \ \ s0 = vload (s, 0); \ s1 = vload (s, sizeof (vu8)); \ s += sizeof (vu8) * 2; \ vstorent (d, 0, vec_perm (s0, s0, sel)); \ vstorent (d, sizeof (vu8), \ vec_perm (s1, s1, sel)); \ d += sizeof (vu8) * 2; \ } \ \ s += src_padding; \ d += dst_padding; \ } \ \ sfence (); \ vempty (); \ } SIMD_SHUFFLE (0, 3, 2, 1) SIMD_SHUFFLE (1, 0, 3, 2) SIMD_SHUFFLE (1, 2, 3, 0) SIMD_SHUFFLE (2, 1, 0, 3) SIMD_SHUFFLE (2, 1, 3, 0) SIMD_SHUFFLE (3, 0, 1, 2) SIMD_SHUFFLE (3, 2, 1, 0) #elif SIMD & (CPU_FEATURE_MMX | CPU_FEATURE_SSE_INT | CPU_FEATURE_SSE2) #define ASM_SHUFFLE(name, op) \ void \ SIMD_NAME (_tv_shuffle_ ## name) (uint8_t * dst, \ const uint8_t * src, \ unsigned int width, \ unsigned int height, \ unsigned long dst_padding, \ unsigned long src_padding) \ { \ while (height-- > 0) { \ const uint8_t *end; \ \ for (end = src + width; src < end;) { \ uint32_t *d = (uint32_t *) dst; \ const uint32_t *s = (const uint32_t *) src; \ uint32_t t; \ \ __asm__ (op : "=r" (t) : "0" (s[0])); d[0] = t; \ __asm__ (op : "=r" (t) : "0" (s[1])); d[1] = t; \ __asm__ (op : "=r" (t) : "0" (s[2])); d[2] = t; \ __asm__ (op : "=r" (t) : "0" (s[3])); d[3] = t; \ \ src += 16; \ dst += 16; \ } \ \ src += src_padding; \ dst += dst_padding; \ } \ } #define SIMD_SHUFFLE(name, op) \ void \ SIMD_NAME (_tv_shuffle_ ## name) (uint8_t * dst, \ const uint8_t * src, \ unsigned int width, \ unsigned int height, \ unsigned long dst_padding, \ unsigned long src_padding) \ { \ while (height-- > 0) { \ const uint8_t *end; \ \ for (end = src + width; src < end;) { \ vu8 s0; \ \ s0 = vload (src, 0); \ vstorent (dst, 0, op); \ s0 = vload (src, sizeof (vu8)); \ src += sizeof (vu8) * 2; \ vstorent (dst, sizeof (vu8), op); \ dst += sizeof (vu8) * 2; \ } \ \ src += src_padding; \ dst += dst_padding; \ } \ \ sfence (); \ vempty (); \ } #if SIMD & (CPU_FEATURE_SSE_INT | CPU_FEATURE_SSE2) #warning untested SIMD_SHUFFLE (0321, vsel (vsplat16_255, s0, vwswap32 (s0))) SIMD_SHUFFLE (2103, vsel (vsplat16_255, vwswap32 (s0), s0)) void SIMD_NAME (_tv_shuffle_2130) (uint8_t * dst, const uint8_t * src, unsigned int width, unsigned int height, unsigned long dst_padding, unsigned long src_padding) { while (height-- > 0) { const uint8_t *end; for (end = src + width; src < end;) { vu8 s0, s1, t0, t1; s0 = vload (src, 0); s1 = vload (src, sizeof (vu8)); src += sizeof (vu8) * 2; t0 = vunpackhi8 (s0, vzero8 ()); s0 = vunpacklo8 (s0, vzero8 ()); t1 = vunpackhi8 (s1, vzero8 ()); s1 = vunpacklo8 (s1, vzero8 ()); #if SIMD & CPU_FEATURE_SSE_INT t0 = _mm_shuffle_pi16 (t0, _MM_SHUFFLE (2, 1, 3, 0)); s0 = _mm_shuffle_pi16 (s0, _MM_SHUFFLE (2, 1, 3, 0)); t1 = _mm_shuffle_pi16 (t1, _MM_SHUFFLE (2, 1, 3, 0)); s1 = _mm_shuffle_pi16 (s1, _MM_SHUFFLE (2, 1, 3, 0)); #else t0 = _mm_shuffle_epi16 (t0, _MM_SHUFFLE (2, 1, 3, 0)); s0 = _mm_shuffle_epi16 (s0, _MM_SHUFFLE (2, 1, 3, 0)); t1 = _mm_shuffle_epi16 (t1, _MM_SHUFFLE (2, 1, 3, 0)); s1 = _mm_shuffle_epi16 (s1, _MM_SHUFFLE (2, 1, 3, 0)); #endif vstorent (dst, 0, vpacksu16 (s0, t0)); vstorent (dst, sizeof (vu8), vpacksu16 (s1, t1)); dst += sizeof (vu8) * 2; } src += src_padding; dst += dst_padding; } sfence (); vempty (); } #else /* MMX */ void _tv_shuffle_0321_MMX (uint8_t * dst, const uint8_t * src, unsigned int width, unsigned int height, unsigned long dst_padding, unsigned long src_padding) { while (height-- > 0) { const uint8_t *end; for (end = src + width; src < end;) { vu8 s0, s1, t0, t1; s0 = vload (src, 0); s1 = vload (src, sizeof (vu8)); src += sizeof (vu8) * 2; t0 = vunpacklo8 (s0, s1); /* 2D0D2C0C 2B0B2A0A */ t1 = vunpackhi8 (s0, s1); /* 3D1D3C1C 3B1B3A1A */ s0 = vunpacklo8 (t0, t1); /* 3B2B1B0B 3A2A1A0A */ s1 = vunpackhi8 (t0, t1); /* 3D2D1D0D 3C2C1C0C */ t0 = vunpacklo8 (s0, s1); /* 3C3A2C2A 1C1A0C0A */ t1 = vunpackhi8 (s1, s0); /* 3B3D2B2D 1B1D0B0D */ s0 = vunpacklo8 (t0, t1); /* 0B0C0D0A */ s1 = vunpackhi8 (t0, t1); vstorent (dst, 0, s0); vstorent (dst, sizeof (vu8), s1); dst += sizeof (vu8) * 2; } src += src_padding; dst += dst_padding; } sfence (); vempty (); } void _tv_shuffle_2103_MMX (uint8_t * dst, const uint8_t * src, unsigned int width, unsigned int height, unsigned long dst_padding, unsigned long src_padding) { while (height-- > 0) { const uint8_t *end; for (end = src + width; src < end;) { vu8 s0, s1, t0, t1; s0 = vload (src, 0); s1 = vload (src, sizeof (vu8)); src += sizeof (vu8) * 2; t0 = vunpacklo8 (s0, s1); /* 1D0D1C0C 1B0B1A0A */ t1 = vunpackhi8 (s0, s1); /* 3D2D3C2C 3B2B3A2A */ s0 = vunpacklo8 (t0, t1); /* 3B2B1B0B 3A2A1A0A */ s1 = vunpackhi8 (t0, t1); /* 3D2D1D0D 3C2C1C0C */ t0 = vunpacklo8 (s1, s0); /* 3A3C2A2C 1A1C0A0C */ t1 = vunpackhi8 (s0, s1); /* 3D3B2D2B 1D1B0D0B */ s0 = vunpacklo8 (t0, t1); /* 0D0A0B0C */ s1 = vunpackhi8 (t0, t1); vstorent (dst, 0, s0); vstorent (dst, sizeof (vu8), s1); dst += sizeof (vu8) * 2; } src += src_padding; dst += dst_padding; } sfence (); vempty (); } void _tv_shuffle_2130_MMX (uint8_t * dst, const uint8_t * src, unsigned int width, unsigned int height, unsigned long dst_padding, unsigned long src_padding) { while (height-- > 0) { const uint8_t *end; for (end = src + width; src < end;) { vu8 s0, s1, t0, t1, c, d; s0 = vload (src, 0); s1 = vload (src, sizeof (vu8)); src += sizeof (vu8) * 2; t0 = vunpacklo8 (s0, s1); /* 1D0D1C0C 1B0B1A0A */ t1 = vunpackhi8 (s0, s1); /* 3D2D3C2C 3B2B3A2A */ s0 = vunpacklo8 (t0, t1); /* 3B2B1B0B 3A2A1A0A */ s1 = vunpackhi8 (t0, t1); /* 3D2D1D0D 3C2C1C0C */ d = vsru (s1, 32); /* 3D2D1D0D */ c = vsl (s1, 32); /* 3C2C1C0C */ t0 = vunpackhi8 (c, s0); /* 3B3C2B2C 1B1C0B0C */ t1 = vunpacklo8 (d, s0); /* 3A3D2A2D 1A1D0A0D */ s0 = vunpacklo8 (t0, t1); /* 0A0D0B0C */ s1 = vunpackhi8 (t0, t1); vstorent (dst, 0, s0); vstorent (dst, sizeof (vu8), s0); dst += sizeof (vu8) * 2; } src += src_padding; dst += dst_padding; } sfence (); vempty (); } #endif /* MMX */ /* XXX rol, ror faster? */ SIMD_SHUFFLE (1230, vor (vsl32 (s0, 24), vsru32 (s0, 8))) SIMD_SHUFFLE (3012, vor (vsl32 (s0, 8), vsru32 (s0, 24))) SIMD_SHUFFLE (1032, vbswap16 (s0)) ASM_SHUFFLE (3210, "bswap %0") #elif !SIMD #define SHUFFLE(a, b, c, d) \ void \ _tv_shuffle_ ## a ## b ## c ## d ## _SCALAR \ (uint8_t * dst, \ const uint8_t * src, \ unsigned int width, \ unsigned int height, \ unsigned long dst_padding, \ unsigned long src_padding) \ { \ while (height-- > 0) { \ const uint8_t *end; \ \ for (end = src + width; src < end;) { \ dst[0] = src[a]; \ dst[1] = src[b]; \ dst[2] = src[c]; \ dst[3] = src[d]; \ src += 4; \ dst += 4; \ } \ \ src += src_padding; \ dst += dst_padding; \ } \ } SHUFFLE (0, 3, 2, 1) SHUFFLE (1, 0, 3, 2) SHUFFLE (1, 2, 3, 0) SHUFFLE (2, 1, 0, 3) SHUFFLE (2, 1, 3, 0) SHUFFLE (3, 0, 1, 2) SHUFFLE (3, 2, 1, 0) #endif /* !SIMD */ copy_plane_fn * SIMD_NAME (yuyv_to_yuyv_loops) [4 * 4] = { SIMD_NAME (_tv_copy_plane), /* YUYV -> YUYV */ SIMD_NAME (_tv_shuffle_1032), /* YUYV -> UYVY */ SIMD_NAME (_tv_shuffle_0321), /* YUYV -> YVYU */ SIMD_NAME (_tv_shuffle_3012), /* YUYV -> VYUY */ SIMD_NAME (_tv_shuffle_1032), SIMD_NAME (_tv_copy_plane), SIMD_NAME (_tv_shuffle_1230), SIMD_NAME (_tv_shuffle_2103), SIMD_NAME (_tv_shuffle_0321), SIMD_NAME (_tv_shuffle_3012), SIMD_NAME (_tv_copy_plane), SIMD_NAME (_tv_shuffle_1032), SIMD_NAME (_tv_shuffle_1230), SIMD_NAME (_tv_shuffle_2103), SIMD_NAME (_tv_shuffle_1032), SIMD_NAME (_tv_copy_plane) }; #if !SIMD tv_bool _tv_yuyv_to_yuyv (void * dst_image, const tv_image_format *dst_format, const void * src_image, const tv_image_format *src_format) { copy_plane_fn *loop; uint8_t *dst; const uint8_t *src; unsigned int width; unsigned int height; unsigned long dst_bpl; unsigned long src_bpl; unsigned long dst_padding; unsigned long src_padding; unsigned long align; unsigned int to; unsigned int from; width = MIN (dst_format->width, src_format->width); height = MIN (dst_format->height, src_format->height); if (unlikely (0 == width || 0 == height || (width & 1))) return FALSE; dst = (uint8_t *) dst_image + dst_format->offset[0]; src = (const uint8_t *) src_image + src_format->offset[0]; /* SIMD: 8 / 16 byte aligned. */ align = (unsigned long) dst; align |= (unsigned long) src; dst_bpl = dst_format->bytes_per_line[0]; src_bpl = src_format->bytes_per_line[0]; dst_padding = dst_bpl - width * 2; src_padding = src_bpl - width * 2; if (likely (0 == (dst_padding | src_padding))) { width *= height; height = 1; } else if (unlikely ((long)(dst_padding | src_padding) < 0)) { return FALSE; } else { align |= dst_bpl | src_bpl; } /* SIMD: 8 / 16 pixels at once. */ align |= width; to = dst_format->pixel_format->pixfmt - TV_PIXFMT_YUYV; from = src_format->pixel_format->pixfmt - TV_PIXFMT_YUYV; loop = SIMD_FN_ALIGNED_SELECT (yuyv_to_yuyv_loops, align, (CPU_FEATURE_MMX | SCALAR))[from * 4 + to]; loop (dst, src, width * 2 /* bytes */, height, dst_padding, src_padding); return TRUE; } #endif /* !SIMD */ typedef void yuyv_to_yuv420_loop_fn (uint8_t * dst, uint8_t * udst, uint8_t * vdst, const uint8_t * src, unsigned int width, unsigned int uv_height, unsigned long dst_bpl, unsigned long src_bpl, unsigned long dst_padding, unsigned long udst_padding, unsigned long vdst_padding, unsigned long src_padding); SIMD_FN_ARRAY_PROTOS (yuyv_to_yuv420_loop_fn *, yuyv_to_yuv420_loops, [4]) #if SIMD & (CPU_FEATURE_MMX | CPU_FEATURE_3DNOW | \ CPU_FEATURE_SSE_INT | CPU_FEATURE_SSE2 | CPU_FEATURE_ALTIVEC) #define YUYV_YUV420(n, src_fmt) \ static void \ SIMD_NAME (yuyv_to_yuv420_loop_ ## n) \ (uint8_t * dst, \ uint8_t * udst, \ uint8_t * vdst, \ const uint8_t * src, \ unsigned int width, \ unsigned int uv_height, \ unsigned long dst_bpl, \ unsigned long src_bpl, \ unsigned long dst_padding, \ unsigned long udst_padding, \ unsigned long vdst_padding, \ unsigned long src_padding) \ { \ while (uv_height-- > 0) { \ const uint8_t *end; \ \ for (end = src + width * 2; src < end;) { \ vu8 y0, y1, ut, ub, vt, vb; \ \ load_yuyv8 (&y0, &y1, &ut, &vt, \ src, /* offset */ 0, \ TV_PIXFMT_ ## src_fmt); \ \ vstorent (dst, 0, y0); \ vstorent (dst, sizeof (vu8), y1); \ \ load_yuyv8 (&y0, &y1, &ub, &vb, \ src, /* offset */ src_bpl, \ TV_PIXFMT_ ## src_fmt); \ \ src += sizeof (vu8) * 4; \ \ vstorent (dst, dst_bpl, y0); \ vstorent (dst, sizeof (vu8) + dst_bpl, y1); \ \ dst += sizeof (vu8) * 2; \ \ vstorent (udst, 0, vavgu8 (ut, ub)); \ vstorent (vdst, 0, vavgu8 (vt, vb)); \ \ udst += sizeof (vu8); \ vdst += sizeof (vu8); \ } \ \ src += src_padding; \ dst += dst_padding; \ udst += udst_padding; \ vdst += vdst_padding; \ } \ \ sfence (); \ vempty (); \ } YUYV_YUV420 (0, YUYV) YUYV_YUV420 (1, UYVY) #elif !SIMD #define YUYV_YUV420(y0, u, y1, v) \ static void \ SIMD_NAME (yuyv_to_yuv420_loop_ ## y0) \ (uint8_t * dst, \ uint8_t * udst, \ uint8_t * vdst, \ const uint8_t * src, \ unsigned int width, \ unsigned int uv_height, \ unsigned long dst_bpl, \ unsigned long src_bpl, \ unsigned long dst_padding, \ unsigned long udst_padding, \ unsigned long vdst_padding, \ unsigned long src_padding) \ { \ while (uv_height-- > 0) { \ const uint8_t *end; \ \ for (end = src + width * 2; src < end;) { \ dst[0] = src[y0]; \ dst[1] = src[y1]; \ dst[0 + dst_bpl] = src[y0 + src_bpl]; \ dst[1 + dst_bpl] = src[y1 + src_bpl]; \ dst += 2; \ *udst++ = (src[u] + src[u + src_bpl] + 1) >> 1; \ *vdst++ = (src[v] + src[v + src_bpl] + 1) >> 1; \ src += 4; \ } \ \ dst += dst_padding; \ udst += udst_padding; \ vdst += vdst_padding; \ src += src_padding; \ } \ } YUYV_YUV420 (0, 1, 2, 3) YUYV_YUV420 (1, 0, 3, 2) #endif /* !SIMD */ yuyv_to_yuv420_loop_fn * SIMD_NAME (yuyv_to_yuv420_loops) [4] = { SIMD_NAME (yuyv_to_yuv420_loop_0), SIMD_NAME (yuyv_to_yuv420_loop_1), SIMD_NAME (yuyv_to_yuv420_loop_0), SIMD_NAME (yuyv_to_yuv420_loop_1) }; #if !SIMD tv_bool _tv_yuyv_to_yuv420 (void * dst_image, const tv_image_format *dst_format, const void * src_image, const tv_image_format *src_format) { yuyv_to_yuv420_loop_fn *loop; const tv_pixel_format *src_pf; uint8_t *dst; uint8_t *udst; uint8_t *vdst; const uint8_t *src; unsigned int width; unsigned int height; unsigned int uv_width; unsigned long dst_bpl; unsigned long src_bpl; unsigned long dst_padding; unsigned long udst_padding; unsigned long vdst_padding; unsigned long src_padding; unsigned long align; unsigned int from; if (TV_FIELD_INTERLACED == src_format->field) { tv_image_format d_format; tv_image_format s_format; /* Convert fields separately to make sure we average U, V of the same parity field. */ if (unlikely (0 != ((dst_format->height | src_format->height) & 3))) return FALSE; d_format = *dst_format; d_format.height /= 2; d_format.bytes_per_line[0] *= 2; d_format.bytes_per_line[1] *= 2; d_format.bytes_per_line[2] *= 2; s_format = *src_format; s_format.height /= 2; s_format.bytes_per_line[0] *= 2; s_format.field = TV_FIELD_PROGRESSIVE; /* Convert top field. */ if (!_tv_yuyv_to_yuv420 (dst_image, &d_format, src_image, &s_format)) return FALSE; /* Convert bottom field. */ d_format.offset[0] += dst_format->bytes_per_line[0]; d_format.offset[1] += dst_format->bytes_per_line[1]; d_format.offset[2] += dst_format->bytes_per_line[2]; s_format.offset[0] += src_format->bytes_per_line[0]; dst_format = &d_format; src_format = &s_format; } width = MIN (dst_format->width, src_format->width); height = MIN (dst_format->height, src_format->height); if (unlikely (0 == width || 0 == height || (width | height) & 1)) return FALSE; udst = (uint8_t *) dst_image + dst_format->offset[1]; vdst = (uint8_t *) dst_image + dst_format->offset[2]; /* SIMD: 8 / 16 byte aligned. */ align = (unsigned long) udst; align |= (unsigned long) vdst; uv_width = width >> 1; /* SIMD: 16 / 32 pixels at once. */ align |= uv_width; src_pf = src_format->pixel_format; if ((TV_PIXFMT_YVU420 == dst_format->pixel_format->pixfmt) != (TV_PIXFMT_YVYU == src_pf->pixfmt || TV_PIXFMT_VYUY == src_pf->pixfmt)) { SWAP (udst, vdst); vdst_padding = dst_format->bytes_per_line[1] - uv_width; udst_padding = dst_format->bytes_per_line[2] - uv_width; } else { udst_padding = dst_format->bytes_per_line[1] - uv_width; vdst_padding = dst_format->bytes_per_line[2] - uv_width; } dst_bpl = dst_format->bytes_per_line[0]; src_bpl = src_format->bytes_per_line[0]; align |= (dst_format->bytes_per_line[1] | dst_format->bytes_per_line[2] | dst_bpl | src_bpl); dst_padding = dst_bpl - width; src_padding = src_bpl - width * 2; /* 2 bytes/pixel */ if (unlikely ((long)(dst_padding | udst_padding | vdst_padding | src_padding) < 0)) return FALSE; dst = (uint8_t *) dst_image + dst_format->offset[0]; src = (const uint8_t *) src_image + src_format->offset[0]; align |= (unsigned long) dst; align |= (unsigned long) src; from = src_pf->pixfmt - TV_PIXFMT_YUYV; loop = SIMD_FN_ALIGNED_SELECT (yuyv_to_yuv420_loops, align, (CPU_FEATURE_MMX | SCALAR))[from]; dst_padding += dst_bpl; /* two rows at once */ src_padding += src_bpl; loop (dst, udst, vdst, src, width, height >> 1, dst_bpl, src_bpl, dst_padding, udst_padding, vdst_padding, src_padding); return TRUE; } #endif /* !SIMD */ typedef void yuv420_to_yuyv_loop_fn (uint8_t * dst, const uint8_t * src, const uint8_t * usrc, const uint8_t * vsrc, unsigned int width, unsigned int uv_height, unsigned long dst_bpl, unsigned long src_bpl, unsigned long dst_padding, unsigned long src_padding, unsigned long usrc_padding, unsigned long vsrc_padding); SIMD_FN_ARRAY_PROTOS (yuv420_to_yuyv_loop_fn *, yuv420_to_yuyv_loops, [4]) #if SIMD & (CPU_FEATURE_MMX | CPU_FEATURE_SSE_INT | CPU_FEATURE_SSE2) #define YUV420_YUYV_HALF(dst_offset, src_offset, swap_yc) \ do { \ y0 = vload (src, src_offset); \ y1 = vload (src, src_offset + sizeof (vu8)); \ \ if (swap_yc) { \ vstorent (dst, dst_offset, vunpacklo8 (uv0, y0)); \ vstorent (dst, dst_offset + sizeof (vu8), \ vunpackhi8 (uv0, y0)); \ vstorent (dst, dst_offset + 2 * sizeof (vu8), \ vunpacklo8 (uv1, y1)); \ vstorent (dst, dst_offset + 3 * sizeof (vu8), \ vunpackhi8 (uv1, y1)); \ } else { \ vstorent (dst, dst_offset, vunpacklo8 (y0, uv0)); \ vstorent (dst, dst_offset + sizeof (vu8), \ vunpackhi8 (y0, uv0)); \ vstorent (dst, dst_offset + 2 * sizeof (vu8), \ vunpacklo8 (y1, uv1)); \ vstorent (dst, dst_offset + 3 * sizeof (vu8), \ vunpackhi8 (y1, uv1)); \ } \ } while (0) #define YUV420_YUYV(swap_yc) \ static void \ SIMD_NAME (yuv420_to_yuyv_loop_ ## swap_yc) \ (uint8_t * dst, \ const uint8_t * src, \ const uint8_t * usrc, \ const uint8_t * vsrc, \ unsigned int width, \ unsigned int uv_height, \ unsigned long dst_bpl, \ unsigned long src_bpl, \ unsigned long dst_padding, \ unsigned long src_padding, \ unsigned long usrc_padding, \ unsigned long vsrc_padding) \ { \ while (uv_height-- > 0) { \ const uint8_t *end; \ \ for (end = src + width; src < end;) { \ vu8 y0, u, y1, v, uv0, uv1; \ \ u = vload (usrc, 0); \ v = vload (vsrc, 0); \ uv0 = vunpacklo8 (u, v); \ uv1 = vunpackhi8 (u, v); \ usrc += sizeof (vu8); \ vsrc += sizeof (vu8); \ \ YUV420_YUYV_HALF (0, 0, swap_yc); \ YUV420_YUYV_HALF (dst_bpl, src_bpl, swap_yc); \ src += sizeof (vu8) * 2; \ dst += sizeof (vu8) * 4; \ } \ \ usrc += usrc_padding; \ vsrc += vsrc_padding; \ src += src_padding; \ dst += dst_padding; \ } \ \ sfence (); \ vempty (); \ } YUV420_YUYV (0) YUV420_YUYV (1) #elif !SIMD #define YUV420_YUYV(y0, u, y1, v) \ static void \ SIMD_NAME (yuv420_to_yuyv_loop_ ## y0) \ (uint8_t * dst, \ const uint8_t * src, \ const uint8_t * usrc, \ const uint8_t * vsrc, \ unsigned int width, \ unsigned int uv_height, \ unsigned long dst_bpl, \ unsigned long src_bpl, \ unsigned long dst_padding, \ unsigned long src_padding, \ unsigned long usrc_padding, \ unsigned long vsrc_padding) \ { \ while (uv_height-- > 0) { \ const uint8_t *end; \ \ for (end = src + width; src < end;) { \ unsigned int U; \ unsigned int V; \ \ dst[y0] = src[0]; \ dst[y1] = src[1]; \ dst[u] = U = *usrc++; \ dst[v] = V = *vsrc++; \ dst[y0 + dst_bpl] = src[0 + src_bpl]; \ dst[y1 + dst_bpl] = src[1 + src_bpl]; \ src += 2; \ dst[u + dst_bpl] = U; \ dst[v + dst_bpl] = V; \ dst += 4; \ } \ \ src += src_padding; \ usrc += usrc_padding; \ vsrc += vsrc_padding; \ dst += dst_padding; \ } \ } YUV420_YUYV (0, 1, 2, 3) YUV420_YUYV (1, 0, 3, 2) #endif /* !SIMD */ yuv420_to_yuyv_loop_fn * SIMD_NAME (yuv420_to_yuyv_loops) [4] = { SIMD_NAME (yuv420_to_yuyv_loop_0), SIMD_NAME (yuv420_to_yuyv_loop_1), SIMD_NAME (yuv420_to_yuyv_loop_0), SIMD_NAME (yuv420_to_yuyv_loop_1) }; #if !SIMD tv_bool _tv_yuv420_to_yuyv (void * dst_image, const tv_image_format *dst_format, const void * src_image, const tv_image_format *src_format) { yuv420_to_yuyv_loop_fn *loop; const tv_pixel_format *dst_pf; uint8_t *dst; const uint8_t *src; const uint8_t *usrc; const uint8_t *vsrc; unsigned int width; unsigned int height; unsigned int uv_width; unsigned long dst_bpl; unsigned long src_bpl; unsigned long dst_padding; unsigned long src_padding; unsigned long usrc_padding; unsigned long vsrc_padding; unsigned long align; unsigned int to; if (TV_FIELD_INTERLACED == src_format->field) { tv_image_format d_format; tv_image_format s_format; /* Convert fields separately to make sure we average U, V of the same parity field. */ if ((dst_format->height | src_format->height) & 3) return FALSE; d_format = *dst_format; d_format.height /= 2; d_format.bytes_per_line[0] *= 2; s_format = *src_format; s_format.height /= 2; s_format.bytes_per_line[0] *= 2; s_format.bytes_per_line[1] *= 2; s_format.bytes_per_line[2] *= 2; s_format.field = TV_FIELD_PROGRESSIVE; /* Convert top field. */ if (!_tv_yuv420_to_yuyv (dst_image, &d_format, src_image, &s_format)) return FALSE; /* Convert bottom field. */ d_format.offset[0] += dst_format->bytes_per_line[0]; s_format.offset[0] += src_format->bytes_per_line[0]; s_format.offset[1] += src_format->bytes_per_line[1]; s_format.offset[2] += src_format->bytes_per_line[2]; dst_format = &d_format; src_format = &s_format; } width = MIN (dst_format->width, src_format->width); height = MIN (dst_format->height, src_format->height); if (unlikely (0 == width || 0 == height || (width | height) & 1)) return FALSE; uv_width = width >> 1; /* SIMD: 16 / 32 pixels at once. */ align = uv_width; usrc = (const uint8_t *) src_image + src_format->offset[1]; vsrc = (const uint8_t *) src_image + src_format->offset[2]; /* SIMD: 8 / 16 byte aligned. */ align |= (unsigned long) usrc; align |= (unsigned long) vsrc; align |= dst_bpl = dst_format->bytes_per_line[0]; align |= src_bpl = src_format->bytes_per_line[0]; dst_padding = dst_bpl - width * 2; /* 2 bytes/pixel */ src_padding = src_bpl - width; dst_pf = dst_format->pixel_format; if ((TV_PIXFMT_YVU420 == src_format->pixel_format->pixfmt) != (TV_PIXFMT_YVYU == dst_pf->pixfmt || TV_PIXFMT_VYUY == dst_pf->pixfmt)) { SWAP (usrc, vsrc); vsrc_padding = src_format->bytes_per_line[1] - uv_width; usrc_padding = src_format->bytes_per_line[2] - uv_width; } else { usrc_padding = src_format->bytes_per_line[1] - uv_width; vsrc_padding = src_format->bytes_per_line[2] - uv_width; } align |= (src_format->bytes_per_line[1] | src_format->bytes_per_line[2]); if (unlikely ((long)(dst_padding | src_padding | usrc_padding | vsrc_padding) < 0)) return FALSE; dst = (uint8_t *) dst_image + dst_format->offset[0]; src = (const uint8_t *) src_image + src_format->offset[0]; align |= (unsigned long) dst; align |= (unsigned long) src; to = dst_pf->pixfmt - TV_PIXFMT_YUYV; loop = SIMD_FN_ALIGNED_SELECT (yuv420_to_yuyv_loops, align, (CPU_FEATURE_MMX | SCALAR))[to]; dst_padding += dst_bpl; /* two rows at once */ src_padding += src_bpl; loop (dst, src, usrc, vsrc, width, height >> 1, dst_bpl, src_bpl, dst_padding, src_padding, usrc_padding, vsrc_padding); return TRUE; } #endif /* !SIMD */ #if !SIMD tv_bool _tv_yuv420_to_yuv420 (void * dst_image, const tv_image_format *dst_format, const void * src_image, const tv_image_format *src_format) { tv_image_format format; unsigned int width; unsigned int height; width = MIN (dst_format->width, src_format->width); height = MIN (dst_format->height, src_format->height); /* XXX check that in tv_copy_image(). */ if (unlikely (0 == width || 0 == height || ((width | height) & 1))) return FALSE; if (dst_format->pixel_format != src_format->pixel_format) { /* YUV <-> YVU 4:2:0. Seems pointless, but some producers / consumers may not support plane offsets and we clip too. */ format = *src_format; format.pixel_format = dst_format->pixel_format; SWAP (format.offset[1], format.offset[2]); SWAP (format.bytes_per_line[1], format.bytes_per_line[2]); src_format = &format; } return tv_copy_image (dst_image, dst_format, src_image, src_format); } #endif /* !SIMD */ typedef void nv_to_yuyv_loop_fn (uint8_t * dst, const uint8_t * src, const uint8_t * uvsrc, unsigned int width, unsigned int uv_height, unsigned long dst_bpl, unsigned long src_bpl, unsigned long dst_padding, unsigned long src_padding, unsigned long uvsrc_padding); SIMD_FN_ARRAY_PROTOS (nv_to_yuyv_loop_fn *, nv_to_yuyv_loops, [4]) #if SIMD & (CPU_FEATURE_MMX | CPU_FEATURE_SSE_INT | CPU_FEATURE_SSE2) #define NV_YUYV_HALF(dst_offset, src_offset, swap_yc) \ do { \ y = vload (src, src_offset); \ \ if (swap_yc) { \ vstorent (dst, dst_offset, vunpacklo8 (uv, y)); \ vstorent (dst, dst_offset + sizeof (vu8), \ vunpackhi8 (uv, y)); \ } else { \ vstorent (dst, dst_offset, vunpacklo8 (y, uv)); \ vstorent (dst, dst_offset + sizeof (vu8), \ vunpackhi8 (y, uv)); \ } \ } while (0) #define NV_YUYV(fmt, swap_yc, swap_uv) \ static void \ SIMD_NAME (NV12_to_ ## fmt ## _loop) \ (uint8_t * dst, \ const uint8_t * src, \ const uint8_t * uvsrc, \ unsigned int width, \ unsigned int uv_height, \ unsigned long dst_bpl, \ unsigned long src_bpl, \ unsigned long dst_padding, \ unsigned long src_padding, \ unsigned long uvsrc_padding) \ { \ while (uv_height-- > 0) { \ const uint8_t *end; \ \ for (end = src + width; src < end;) { \ vu8 y, uv; \ \ uv = vload (uvsrc, 0); \ uvsrc += sizeof (vu8); \ if (swap_uv) \ uv = vbswap16 (uv); \ NV_YUYV_HALF (0, 0, swap_yc); \ NV_YUYV_HALF (dst_bpl, src_bpl, swap_yc); \ src += sizeof (vu8); \ dst += sizeof (vu8) * 2; \ } \ \ uvsrc += uvsrc_padding; \ src += src_padding; \ dst += dst_padding; \ } \ \ sfence (); \ vempty (); \ } NV_YUYV (YUYV, 0, 0) NV_YUYV (UYVY, 1, 0) NV_YUYV (YVYU, 0, 1) NV_YUYV (VYUY, 1, 1) #elif !SIMD #define NV_YUYV(fmt, y0, u, y1, v) \ static void \ NV12_to_ ## fmt ## _loop_SCALAR \ (uint8_t * dst, \ const uint8_t * src, \ const uint8_t * uvsrc, \ unsigned int width, \ unsigned int uv_height, \ unsigned long dst_bpl, \ unsigned long src_bpl, \ unsigned long dst_padding, \ unsigned long src_padding, \ unsigned long uvsrc_padding) \ { \ while (uv_height-- > 0) { \ const uint8_t *end; \ \ for (end = src + width; src < end;) { \ unsigned int U; \ unsigned int V; \ \ dst[y0] = src[0]; \ dst[y1] = src[1]; \ dst[u] = U = uvsrc[0]; \ dst[v] = V = uvsrc[1]; \ uvsrc += 2; \ dst[y0 + dst_bpl] = src[0 + src_bpl]; \ dst[y1 + dst_bpl] = src[1 + src_bpl]; \ src += 2; \ dst[u + dst_bpl] = U; \ dst[v + dst_bpl] = V; \ dst += 4; \ } \ \ uvsrc += uvsrc_padding; \ src += src_padding; \ dst += dst_padding; \ } \ } NV_YUYV (YUYV, 0, 1, 2, 3) NV_YUYV (UYVY, 1, 0, 3, 2) NV_YUYV (YVYU, 0, 3, 2, 1) NV_YUYV (VYUY, 1, 2, 3, 0) #endif /* !SIMD */ nv_to_yuyv_loop_fn * SIMD_NAME (nv_to_yuyv_loops) [4] = { SIMD_NAME (NV12_to_YUYV_loop), SIMD_NAME (NV12_to_UYVY_loop), SIMD_NAME (NV12_to_YVYU_loop), SIMD_NAME (NV12_to_VYUY_loop), }; #if !SIMD tv_bool _tv_nv_to_yuyv (void * dst_image, const tv_image_format *dst_format, const void * src_image, const tv_image_format *src_format) { nv_to_yuyv_loop_fn *loop; uint8_t *dst; const uint8_t *src; const uint8_t *uvsrc; unsigned int width; unsigned int height; unsigned long dst_bpl; unsigned long src_bpl; unsigned long uvsrc_bpl; unsigned long dst_padding; unsigned long src_padding; unsigned long uvsrc_padding; unsigned long align; unsigned int to; if (TV_FIELD_INTERLACED == src_format->field) { tv_image_format d_format; tv_image_format s_format; /* Convert fields separately to make sure we average U, V of the same parity field. */ if ((dst_format->height | src_format->height) & 3) return FALSE; d_format = *dst_format; d_format.height /= 2; d_format.bytes_per_line[0] *= 2; s_format = *src_format; s_format.height /= 2; s_format.bytes_per_line[0] *= 2; s_format.bytes_per_line[1] *= 2; s_format.bytes_per_line[2] *= 2; s_format.field = TV_FIELD_PROGRESSIVE; /* Convert top field. */ if (!_tv_nv_to_yuyv (dst_image, &d_format, src_image, &s_format)) return FALSE; /* Convert bottom field. */ d_format.offset[0] += dst_format->bytes_per_line[0]; s_format.offset[0] += src_format->bytes_per_line[0]; s_format.offset[1] += src_format->bytes_per_line[1]; s_format.offset[2] += src_format->bytes_per_line[2]; dst_format = &d_format; src_format = &s_format; } width = MIN (dst_format->width, src_format->width); height = MIN (dst_format->height, src_format->height); if (unlikely (0 == width || 0 == height || (width | height) & 1)) return FALSE; /* SIMD: 8 / 16 pixels at once. */ align = width; /* SIMD: 8 / 16 byte aligned. */ align |= dst_bpl = dst_format->bytes_per_line[0]; align |= src_bpl = src_format->bytes_per_line[0]; align |= uvsrc_bpl = src_format->bytes_per_line[1]; dst_padding = dst_bpl - width * 2; /* 2 bytes/pixel */ src_padding = src_bpl - width; uvsrc_padding = uvsrc_bpl - width; if (unlikely ((long)(dst_padding | src_padding | uvsrc_padding) < 0)) return FALSE; dst = (uint8_t *) dst_image + dst_format->offset[0]; src = (const uint8_t *) src_image + src_format->offset[0]; uvsrc = (const uint8_t *) src_image + src_format->offset[1]; align |= (unsigned long) dst; align |= (unsigned long) src; align |= (unsigned long) uvsrc; to = dst_format->pixel_format->pixfmt - TV_PIXFMT_YUYV; loop = SIMD_FN_ALIGNED_SELECT (nv_to_yuyv_loops, align, (CPU_FEATURE_MMX | SCALAR))[to]; dst_padding += dst_bpl; /* two rows at once */ src_padding += src_bpl; loop (dst, src, uvsrc, width, height >> 1, dst_bpl, src_bpl, dst_padding, src_padding, uvsrc_padding); return TRUE; } tv_bool _tv_nv_to_yuv420 (void * dst_image, const tv_image_format *dst_format, const void * src_image, const tv_image_format *src_format) { uint8_t *dst; uint8_t *udst; uint8_t *vdst; const uint8_t *src; const uint8_t *uvsrc; unsigned int width; unsigned int height; unsigned int uv_width; unsigned long dst_padding; unsigned long udst_padding; unsigned long vdst_padding; unsigned long src_padding; unsigned long uvsrc_padding; width = MIN (dst_format->width, src_format->width); height = MIN (dst_format->height, src_format->height); if (unlikely (0 == width || 0 == height || (width | height) & 1)) return FALSE; dst_padding = dst_format->bytes_per_line[0] - width; src_padding = src_format->bytes_per_line[0] - width; uvsrc_padding = src_format->bytes_per_line[1] - width; uv_width = width >> 1; udst_padding = dst_format->bytes_per_line[1] - uv_width; vdst_padding = dst_format->bytes_per_line[2] - uv_width; if (unlikely ((long)(dst_padding | src_padding | uvsrc_padding | udst_padding | vdst_padding) < 0)) return FALSE; dst = (uint8_t *) dst_image + dst_format->offset[0]; src = (const uint8_t *) src_image + src_format->offset[0]; if (likely (0 == (dst_padding | src_padding))) { memcpy (dst, src, width * height); } else { _tv_copy_plane_SCALAR (dst, src, width, height, dst_padding, src_padding); } udst = (uint8_t *) dst_image + dst_format->offset[1]; vdst = (uint8_t *) dst_image + dst_format->offset[2]; if (TV_PIXFMT_YVU420 == dst_format->pixel_format->pixfmt) { SWAP (udst, vdst); SWAP (udst_padding, vdst_padding); } uvsrc = (const uint8_t *) src_image + src_format->offset[1]; for (height >>= 1; height > 0; --height) { const uint8_t *end; for (end = uvsrc + width; uvsrc < end; uvsrc += 2) { *udst++ = uvsrc[0]; *vdst++ = uvsrc[1]; } udst += udst_padding; vdst += vdst_padding; uvsrc += uvsrc_padding; } return TRUE; } tv_bool _tv_hm12_to_yuv420 (void * dst_image, const tv_image_format *dst_format, const void * src_image, const tv_image_format *src_format) { uint8_t *dst; uint8_t *udst; uint8_t *vdst; const uint8_t *src; const uint8_t *uvsrc; unsigned int width; unsigned int height; unsigned int uv_width; unsigned long dst_padding; unsigned long udst_padding; unsigned long vdst_padding; unsigned long src_padding; unsigned long uvsrc_padding; unsigned int bwidth; unsigned int bheight; unsigned int x; unsigned int y; width = MIN (dst_format->width, src_format->width); height = MIN (dst_format->height, src_format->height); if (unlikely (0 == width || 0 == height || (width | height) & 15)) return FALSE; dst_padding = dst_format->bytes_per_line[0] - width; src_padding = src_format->bytes_per_line[0] - width; uvsrc_padding = src_format->bytes_per_line[1] - width; uv_width = width >> 1; udst_padding = dst_format->bytes_per_line[1] - uv_width; vdst_padding = dst_format->bytes_per_line[2] - uv_width; if (unlikely ((long)(dst_padding | src_padding | uvsrc_padding | udst_padding | vdst_padding) < 0)) return FALSE; /* Y plane */ dst = (uint8_t *) dst_image + dst_format->offset[0]; src = (const uint8_t *) src_image + src_format->offset[0]; bwidth = 16; bheight = 16; for (y = 0; y < height; y += bheight) { for (x = 0; x < width; x += bwidth) { uint8_t *dst1; unsigned int row; dst1 = dst + y * dst_format->bytes_per_line[0] + x; for (row = 0; row < bheight; ++row) { memcpy (dst1, src, bwidth); dst1 += dst_format->bytes_per_line[0]; src += bwidth; } } } /* U, V plane */ udst = (uint8_t *) dst_image + dst_format->offset[1]; vdst = (uint8_t *) dst_image + dst_format->offset[2]; if (TV_PIXFMT_YVU420 == dst_format->pixel_format->pixfmt) { SWAP (udst, vdst); } uvsrc = (const uint8_t *) src_image + src_format->offset[1]; bwidth = 8; bheight = 16; /* why 16? */ for (y = 0; y < (height >> 1); y += bheight) { for (x = 0; x < (width >> 1); x += bwidth) { uint8_t *udst1; uint8_t *vdst1; unsigned int row; udst1 = udst + y * dst_format->bytes_per_line[0] + x; vdst1 = vdst + y * dst_format->bytes_per_line[1] + x; for (row = 0; row < bheight; ++row) { udst1[0] = uvsrc[0]; udst1[1] = uvsrc[2]; udst1[2] = uvsrc[4]; udst1[3] = uvsrc[6]; udst1[4] = uvsrc[8]; udst1[5] = uvsrc[10]; udst1[6] = uvsrc[12]; udst1[7] = uvsrc[14]; vdst1[0] = uvsrc[1]; vdst1[1] = uvsrc[3]; vdst1[2] = uvsrc[5]; vdst1[3] = uvsrc[7]; vdst1[4] = uvsrc[9]; vdst1[5] = uvsrc[11]; vdst1[6] = uvsrc[13]; vdst1[7] = uvsrc[15]; udst1 += dst_format->bytes_per_line[1]; vdst1 += dst_format->bytes_per_line[2]; uvsrc += bwidth * 2; } } } return TRUE; } #endif /* !SIMD */ zapping-0.10cvs6/libtv/yuv2yuv.h 644 764 144 4724 10432662513 11760 /* * Copyright (C) 2006 Michael H. Schimek * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* $Id: yuv2yuv.h,v 1.3 2006/05/17 18:02:51 mschimek Exp $ */ /* YUV to YUV image format conversion functions. */ #ifndef YUV2YUV_H #define YUV2YUV_H #include "image_format.h" #include "simd.h" #include "misc.h" SIMD_FN_PROTOS (copy_plane_fn, _tv_shuffle_0321); SIMD_FN_PROTOS (copy_plane_fn, _tv_shuffle_1032); SIMD_FN_PROTOS (copy_plane_fn, _tv_shuffle_1230); SIMD_FN_PROTOS (copy_plane_fn, _tv_shuffle_2103); SIMD_FN_PROTOS (copy_plane_fn, _tv_shuffle_2130); SIMD_FN_PROTOS (copy_plane_fn, _tv_shuffle_3012); SIMD_FN_PROTOS (copy_plane_fn, _tv_shuffle_3210); extern tv_bool _tv_yuyv_to_yuyv (void * dst_image, const tv_image_format *dst_format, const void * src_image, const tv_image_format *src_format); extern tv_bool _tv_yuyv_to_yuv420 (void * dst_image, const tv_image_format *dst_format, const void * src_image, const tv_image_format *src_format); extern tv_bool _tv_yuv420_to_yuyv (void * dst_image, const tv_image_format *dst_format, const void * src_image, const tv_image_format *src_format); extern tv_bool _tv_yuv420_to_yuv420 (void * dst_image, const tv_image_format *dst_format, const void * src_image, const tv_image_format *src_format); extern tv_bool _tv_nv_to_yuyv (void * dst_image, const tv_image_format *dst_format, const void * src_image, const tv_image_format *src_format); extern tv_bool _tv_nv_to_yuv420 (void * dst_image, const tv_image_format *dst_format, const void * src_image, const tv_image_format *src_format); extern tv_bool _tv_hm12_to_yuv420 (void * dst_image, const tv_image_format *dst_format, const void * src_image, const tv_image_format *src_format); #endif /* YUV2YUV_H */ zapping-0.10cvs6/libtv/copy_image-priv.h 644 764 144 2001 10431700712 13354 /* * Copyright (C) 2006 Michael H. Schimek * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* $Id: copy_image-priv.h,v 1.1 2006/05/14 19:15:22 mschimek Exp $ */ #ifndef COPY_IMAGE_PRIV_H #define COPY_IMAGE_PRIV_H #include "copy_image.h" #include "misc.h" #include "simd.h" SIMD_FN_PROTOS (copy_plane_fn, _tv_copy_plane) #endif /* COPY_IMAGE_PRIV_H */ zapping-0.10cvs6/libtv/callback.c 644 764 144 11617 10262330150 12043 /* * Copyright (C) 2001-2004 Michael H. Schimek * Copyright (C) 2000-2003 Iaki Garca Etxebarria * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* $Id: callback.c,v 1.4 2005/07/04 21:55:52 mschimek Exp $ */ #include #include #include "callback.h" struct _tv_callback { tv_callback * next; tv_callback ** prev_next; tv_callback_fn * notify; tv_callback_fn * destroy; void * user_data; unsigned int blocked; }; void tv_nullify_pointer (void * object, void * user_data) { assert (NULL != user_data); object = object; * ((void **) user_data) = NULL; } /** * Remove a callback function from its list. Argument is the result * of tv_callback_add(). * * Intended for tveng clients. Note the destroy handler is not called. */ void tv_callback_remove (tv_callback * cb) { tv_callback *next; if (!cb) return; if ((next = cb->next)) next->prev_next = cb->prev_next; if (cb->prev_next) *cb->prev_next = next; free (cb); } void tv_callback_delete (tv_callback * cb, void * object) { assert (object != NULL); if (!cb) return; if (cb->destroy) cb->destroy (object, cb->user_data); tv_callback_remove (cb); } /** * Removes all callbacks from the list with the given notify and destroy * functions and user_data. * * Intended for tveng clients. Note the destroy handler is not called. */ void tv_callback_remove_all (tv_callback * list, tv_callback_fn * notify, tv_callback_fn * destroy, void * user_data) { while (list) { if ((NULL == user_data || list->user_data == user_data) && (NULL == notify || list->notify == notify) && (NULL == destroy || list->destroy == destroy)) { tv_callback *next; if ((next = list->next)) next->prev_next = list->prev_next; if (list->prev_next) *list->prev_next = next; free (list); list = next; } else { list = list->next; } } } void tv_callback_delete_all (tv_callback * list, tv_callback_fn * notify, tv_callback_fn * destroy, void * user_data, void * object) { assert (object != NULL); while (list) { if ((NULL == user_data || list->user_data == user_data) && (NULL == notify || list->notify == notify) && (NULL == destroy || list->destroy == destroy)) { tv_callback *next; /* XXX needs ref counter? */ if (list->destroy) list->destroy (object, list->user_data); if ((next = list->next)) next->prev_next = list->prev_next; if (list->prev_next) *list->prev_next = next; free (list); list = next; } else { list = list->next; } } } /** * Add a function to a callback list. The notify function is called * on some event, the destroy function (if not NULL) before the list * is deleted. * * Not intended to be called directly by tveng clients. */ tv_callback * tv_callback_add (tv_callback ** list, tv_callback_fn * notify, tv_callback_fn * destroy, void * user_data) { tv_callback *cb; assert (NULL != list); assert (NULL != notify || NULL != destroy); for (; (cb = *list); list = &cb->next) ; if (!(cb = calloc (1, sizeof (*cb)))) return NULL; *list = cb; cb->prev_next = list; cb->notify = notify; cb->destroy = destroy; cb->user_data = user_data; return cb; } /** * Temporarily block calls to the notify handler. */ void tv_callback_block (tv_callback * cb) { if (cb) ++cb->blocked; } void tv_callback_block_all (tv_callback * list, tv_callback_fn * notify, tv_callback_fn * destroy, void * user_data) { for (; list; list = list->next) { if ((NULL == user_data || list->user_data == user_data) && (NULL == notify || list->notify == notify) && (NULL == destroy || list->destroy == destroy)) { ++list->blocked; } } } /** * Counterpart of tv_callback_block(). */ void tv_callback_unblock (tv_callback * cb) { if (cb && cb->blocked > 0) --cb->blocked; } void tv_callback_unblock_all (tv_callback * list, tv_callback_fn * notify, tv_callback_fn * destroy, void * user_data) { for (; list; list = list->next) { if ((NULL == user_data || list->user_data == user_data) && (NULL == notify || list->notify == notify) && (NULL == destroy || list->destroy == destroy)) { if (list->blocked > 0) --list->blocked; } } } zapping-0.10cvs6/libtv/callback.h 644 764 144 5072 10177355215 12044 /* * Copyright (C) 2001-2004 Michael H. Schimek * Copyright (C) 2000-2003 Iaki Garca Etxebarria * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* $Id: callback.h,v 1.2 2005/01/31 07:13:17 mschimek Exp $ */ #ifndef __ZTV_CALLBACK_H__ #define __ZTV_CALLBACK_H__ #include "macros.h" TV_BEGIN_DECLS typedef struct _tv_callback tv_callback; typedef void tv_callback_fn (void * object, void * user_data); extern void tv_nullify_pointer (void * object, void * user_data) __attribute__ ((_tv_nonnull (2))); extern tv_callback * tv_callback_add (tv_callback ** list, tv_callback_fn * notify, tv_callback_fn * destroy, void * user_data) __attribute__ ((_tv_nonnull (1))); extern void tv_callback_remove (tv_callback * cb); extern void tv_callback_delete (tv_callback * cb, void * object) __attribute__ ((_tv_nonnull (2))); extern void tv_callback_remove_all (tv_callback * list, tv_callback_fn * notify, tv_callback_fn * destroy, void * user_data); extern void tv_callback_delete_all (tv_callback * list, tv_callback_fn * notify, tv_callback_fn * destroy, void * user_data, void * object); extern void tv_callback_block (tv_callback * cb) __attribute__ ((_tv_nonnull (1))); extern void tv_callback_block_all (tv_callback * list, tv_callback_fn * notify, tv_callback_fn * destroy, void * user_data) __attribute__ ((_tv_nonnull (1))); extern void tv_callback_unblock (tv_callback * cb) __attribute__ ((_tv_nonnull (1))); extern void tv_callback_unblock_all (tv_callback * list, tv_callback_fn * notify, tv_callback_fn * destroy, void * user_data) __attribute__ ((_tv_nonnull (1))); #define TV_CALLBACK_BLOCK(cb, statement) \ do { \ tv_callback_block (cb); \ statement; \ tv_callback_unblock (cb); \ } while (0) TV_END_DECLS #endif /* __ZTV_CALLBACK_H__ */ zapping-0.10cvs6/libtv/cpu.c 644 764 144 21510 10417055744 11106 /* * Copyright (C) 2004, 2006 Michael H. Schimek * * AltiVec test based on code from Xine * Copyright (C) 1999-2001 Aaron Holtzman * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* $Id: cpu.c,v 1.5 2006/04/12 01:46:12 mschimek Exp $ */ #ifdef HAVE_CONFIG_H # include "config.h" #endif #include /* strtoul() */ #include /* strcmp() */ #include /* isspace() */ #include /* signal() */ #include /* sigsetjmp () */ #include #include "misc.h" #include "cpu.h" cpu_feature_set cpu_features; static sigjmp_buf jmpbuf; #ifdef CAN_COMPILE_MMX /* References "Intel Processor Identification and the CPUID Instruction", Application Note AP-485, February 2005, order no. 241618-028, http://developer.intel.com "AMD Processor Recognition Application Note", publication # 20734, Rev. R, June 2000. http://www.amd.com/products/cpg/athlon/techdocs/index.html "Cyrix CPU Detection Guide", Application Note 112, Rev. 1.9, July 21, 1998 formerly available from http://www.cyrix.com/html/developers/index.htm when Cyrix was part of National Semiconductor. VIA has no similar document available as of Jan 2001. */ typedef union { char s[16]; struct { unsigned int eax; unsigned int ebx; unsigned int edx; unsigned int ecx; } r; } cpuid_t; #ifdef HAVE_X86 static __inline__ int toggle_eflags_id (void) { int success; __asm__ __volatile__ ( " pushfl \n" " popl %%ecx\n" " movl %%ecx,%%eax\n" " xorl $0x200000,%%eax\n" " pushl %%eax\n" " popfl \n" " pushfl \n" " popl %%eax\n" " pushl %%ecx\n" " popfl \n" " xorl %%ecx,%%eax\n" " andl $0x200000,%%eax\n" " jz 1f\n" " movl $1,%%eax\n" "1:\n" : "=a" (success) :: "ecx", "cc"); return success; } static unsigned int cpuid (cpuid_t * buf, unsigned int level) { unsigned int eax; __asm__ __volatile__ ( " pushl %%ebx\n" " pushl %%ecx\n" " pushl %%edx\n" " cpuid \n" " movl %%eax,(%%edi)\n" " movl %%ebx,4(%%edi)\n" " movl %%edx,8(%%edi)\n" " movl %%ecx,12(%%edi)\n" " popl %%edx\n" " popl %%ecx\n" " popl %%ebx\n" : "=a" (eax) : "D" (buf), "a" (level) : "cc", "memory"); return eax; } #else /* x86-64 */ static __inline__ int toggle_eflags_id (void) { return 1; /* they all have cpuid */ } static unsigned long cpuid (cpuid_t * buf, unsigned long level) { unsigned long eax; __asm__ __volatile__ ( " pushq %%rbx\n" " pushq %%rcx\n" " pushq %%rdx\n" " cpuid \n" " movl %%eax,(%%rdi)\n" " movl %%ebx,4(%%rdi)\n" " movl %%edx,8(%%rdi)\n" " movl %%ecx,12(%%rdi)\n" " popq %%rdx\n" " popq %%rcx\n" " popq %%rbx\n" : "=a" (eax) : "D" (buf), "a" (level) : "cc", "memory"); return eax; } #endif /* x86-64 */ /* Function 0x1 */ #define INTEL_EDX_TSC (1 << 4) #define INTEL_EDX_CMOV (1 << 15) #define INTEL_EDX_MMX (1 << 23) #define INTEL_EDX_SSE (1 << 25) #define INTEL_EDX_SSE2 (1 << 26) #define INTEL_ECX_SSE3 (1 << 0) /* Function 0x80000001 */ #define AMD_MMX_EXT (1 << 22) #define AMD_MMX (1 << 23) #define AMD_SSE (1 << 25) #define AMD_LONG_MODE (1 << 29) #define AMD_3DNOW_EXT (1 << 30) #define AMD_3DNOW (1 << 31) /* Function 0x80000001 */ #define CYRIX_MMX (1 << 23) #define CYRIX_MMX_EXT (1 << 24) #define CYRIX_3DNOW (1 << 31) #endif /* CAN_COMPILE_MMX */ static void sigill_handler (int sig) { sig = sig; /* unused */ siglongjmp (jmpbuf, 1); } cpu_feature_set cpu_detection (void) { cpu_features = 0; #if defined (CAN_COMPILE_MMX) if (!toggle_eflags_id ()) { /* Has no CPUID. */ } else { cpuid_t c; cpuid (&c, 0); if (0 == strncmp (c.s + 4, "GenuineIntel", 12)) { cpuid (&c, 1); if (c.r.edx & INTEL_EDX_TSC) cpu_features |= CPU_FEATURE_TSC; if (c.r.edx & INTEL_EDX_CMOV) cpu_features |= CPU_FEATURE_CMOV; if (c.r.edx & INTEL_EDX_MMX) cpu_features |= CPU_FEATURE_MMX; if (c.r.edx & INTEL_EDX_SSE) cpu_features |= (CPU_FEATURE_SSE_INT | CPU_FEATURE_SSE_FLT); if (c.r.edx & INTEL_EDX_SSE2) cpu_features |= CPU_FEATURE_SSE2; if (c.r.ecx & INTEL_ECX_SSE3) cpu_features |= CPU_FEATURE_SSE3; } else if (0 == strncmp (c.s + 4, "AuthenticAMD", 12)) { cpuid (&c, 1); if (c.r.edx & INTEL_EDX_TSC) cpu_features |= CPU_FEATURE_TSC; if (c.r.edx & INTEL_EDX_CMOV) cpu_features |= CPU_FEATURE_CMOV; if (c.r.edx & INTEL_EDX_MMX) cpu_features |= CPU_FEATURE_MMX; if (c.r.edx & INTEL_EDX_SSE) cpu_features |= (CPU_FEATURE_SSE_INT | CPU_FEATURE_SSE_FLT); if (c.r.edx & INTEL_EDX_SSE2) cpu_features |= CPU_FEATURE_SSE2; if (c.r.ecx & INTEL_ECX_SSE3) cpu_features |= CPU_FEATURE_SSE3; if (cpuid (&c, 0x80000000) > 0x80000000) { cpuid (&c, 0x80000001); if (c.r.edx & AMD_MMX_EXT) cpu_features |= CPU_FEATURE_AMD_MMX; if (c.r.edx & AMD_MMX) cpu_features |= CPU_FEATURE_MMX; if (c.r.edx & AMD_SSE) cpu_features |= (CPU_FEATURE_SSE_INT | CPU_FEATURE_SSE_FLT); if (c.r.edx & AMD_3DNOW_EXT) cpu_features |= CPU_FEATURE_3DNOW_EXT; if (c.r.edx & AMD_3DNOW) cpu_features |= CPU_FEATURE_3DNOW; } } else if (0 == strncmp (c.s + 4, "CyrixInstead", 12)) { if (cpuid (&c, 0x80000000) > 0x80000000) { cpuid (&c, 0x80000001); if (c.r.edx & INTEL_EDX_TSC) cpu_features |= CPU_FEATURE_TSC; if (c.r.edx & CYRIX_MMX) cpu_features |= CPU_FEATURE_MMX; if (c.r.edx & CYRIX_MMX_EXT) cpu_features |= CPU_FEATURE_CYRIX_MMX; if (c.r.edx & CYRIX_3DNOW) cpu_features |= CPU_FEATURE_3DNOW; } else { cpuid (&c, 1); if (c.r.edx & INTEL_EDX_TSC) cpu_features |= CPU_FEATURE_TSC; if (c.r.edx & INTEL_EDX_MMX) cpu_features |= CPU_FEATURE_MMX; } } else if (0 == strncmp (c.s + 4, "CentaurHauls", 12)) { cpuid (&c, 1); if (c.r.edx & INTEL_EDX_TSC) cpu_features |= CPU_FEATURE_TSC; if (c.r.edx & INTEL_EDX_CMOV) cpu_features |= CPU_FEATURE_CMOV; if (c.r.edx & INTEL_EDX_MMX) cpu_features |= CPU_FEATURE_MMX; if (c.r.edx & INTEL_EDX_SSE) cpu_features |= (CPU_FEATURE_SSE_INT | CPU_FEATURE_SSE_FLT); } if (cpu_features & (CPU_FEATURE_SSE_INT | CPU_FEATURE_SSE_FLT | CPU_FEATURE_SSE2 | CPU_FEATURE_SSE3)) { /* Test if SSE is supported by the kernel. */ if (0 == sigsetjmp (jmpbuf, 1)) { signal (SIGILL, sigill_handler); /* Suggested by Intel AP-485 chapter 9. */ __asm__ __volatile__ (" orps %xmm2,%xmm1\n"); } else { cpu_features &= ~(CPU_FEATURE_SSE_INT | CPU_FEATURE_SSE_FLT | CPU_FEATURE_SSE2 | CPU_FEATURE_SSE3); } signal (SIGILL, SIG_DFL); } } #elif defined (CAN_COMPILE_ALTIVEC) if (0 == sigsetjmp (jmpbuf, 1)) { signal (SIGILL, sigill_handler); __asm__ __volatile__ (" mtspr 256, %0\n" " vand %%v0, %%v0, %%v0\n" :: "r" (-1)); cpu_features |= CPU_FEATURE_ALTIVEC; } signal (SIGILL, SIG_DFL); #endif return cpu_features; } static struct { const char * name; cpu_feature_set feature; } features [] = { { "none", 0 }, { "tsc", CPU_FEATURE_TSC }, { "cmov", CPU_FEATURE_CMOV }, { "mmx", CPU_FEATURE_MMX }, { "sse", (CPU_FEATURE_SSE_INT | CPU_FEATURE_SSE_FLT) }, { "sse2", CPU_FEATURE_SSE2 }, { "amd-mmx", CPU_FEATURE_AMD_MMX }, { "3dnow", CPU_FEATURE_3DNOW }, { "3dnow-ext", CPU_FEATURE_3DNOW_EXT }, { "cyrix-mmx", CPU_FEATURE_CYRIX_MMX }, { "altivec", CPU_FEATURE_ALTIVEC }, { "sse3", CPU_FEATURE_SSE3 }, }; cpu_feature_set cpu_feature_set_from_string (const char * s) { cpu_feature_set cpu_features; assert (NULL != s); cpu_features = 0; while (0 != *s) { unsigned int i; char *tail; if ('|' == *s || isspace (*s)) { ++s; continue; } for (i = 0; i < N_ELEMENTS (features); ++i) { if (0 == strcmp (features[i].name, s)) { unsigned int n; n = strlen (features[i].name); if (0 == s[n] || '|' == s[n] || isspace (s[n])) { s += n; break; } } } if (i < N_ELEMENTS (features)) { cpu_features |= features[i].feature; continue; } /* No keyword. */ cpu_features |= (cpu_feature_set) strtoul (s, &tail, 0); if (tail > s) { s = tail; continue; } /* No number. */ return (cpu_feature_set) 0; } return cpu_features; } zapping-0.10cvs6/libtv/cpu.h 644 764 144 3072 10417055734 11075 /* * Copyright (C) 2004 Michael H. Schimek * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* $Id: cpu.h,v 1.3 2006/04/12 01:46:04 mschimek Exp $ */ #ifndef CPU_H #define CPU_H /* x86 features */ #define CPU_FEATURE_TSC (1 << 0) #define CPU_FEATURE_CMOV (1 << 1) #define CPU_FEATURE_MMX (1 << 2) #define CPU_FEATURE_SSE_INT (1 << 3) #define CPU_FEATURE_SSE2 (1 << 4) #define CPU_FEATURE_AMD_MMX (1 << 5) #define CPU_FEATURE_3DNOW (1 << 6) #define CPU_FEATURE_3DNOW_EXT (1 << 7) #define CPU_FEATURE_CYRIX_MMX (1 << 8) #define CPU_FEATURE_SSE3 (1 << 10) /* SSE_INT vecs are 64 bit, SSE_FLT 128 bit wide. */ #define CPU_FEATURE_SSE_FLT (1 << 11) /* powerpc features */ #define CPU_FEATURE_ALTIVEC (1 << 9) typedef unsigned int cpu_feature_set; extern cpu_feature_set cpu_features; extern cpu_feature_set cpu_detection (void); extern cpu_feature_set cpu_feature_set_from_string (const char * s); #endif /* CPU_H */ zapping-0.10cvs6/libtv/lut_yuv2rgb.c 644 764 144 265163 10442576150 12636 /* Generated file, do not edit! */ #include "misc.h" #include "lut_yuv2rgb.h" const int16_t __attribute__ ((aligned (16))) _tv_vsplat16_yuv2rgb_cy [] = { 0x4a85, 0x4a85, 0x4a85, 0x4a85, 0x4a85, 0x4a85, 0x4a85, 0x4a85, }; const int16_t __attribute__ ((aligned (16))) _tv_vsplat16_yuv2rgb_gu [] = { 0x0c88, 0x0c88, 0x0c88, 0x0c88, 0x0c88, 0x0c88, 0x0c88, 0x0c88, }; const int16_t __attribute__ ((aligned (16))) _tv_vsplat16_yuv2rgb_bu [] = { 0x408d, 0x408d, 0x408d, 0x408d, 0x408d, 0x408d, 0x408d, 0x408d, }; const int16_t __attribute__ ((aligned (16))) _tv_vsplat16_yuv2rgb_rv [] = { 0x6625, 0x6625, 0x6625, 0x6625, 0x6625, 0x6625, 0x6625, 0x6625, }; const int16_t __attribute__ ((aligned (16))) _tv_vsplat16_yuv2rgb_gv [] = { 0x3405, 0x3405, 0x3405, 0x3405, 0x3405, 0x3405, 0x3405, 0x3405, }; const int16_t _tv_lut_yuv2rgb_gu [256] = { 0x012b, 0x012b, 0x012a, 0x012a, 0x012a, 0x0129, 0x0129, 0x0129, 0x0128, 0x0128, 0x0128, 0x0127, 0x0127, 0x0127, 0x0126, 0x0126, 0x0126, 0x0125, 0x0125, 0x0125, 0x0124, 0x0124, 0x0124, 0x0123, 0x0123, 0x0123, 0x0122, 0x0122, 0x0122, 0x0121, 0x0121, 0x0121, 0x0120, 0x0120, 0x0120, 0x011f, 0x011f, 0x011f, 0x011e, 0x011e, 0x011e, 0x011d, 0x011d, 0x011d, 0x011c, 0x011c, 0x011c, 0x011b, 0x011b, 0x011b, 0x011a, 0x011a, 0x011a, 0x0119, 0x0119, 0x0119, 0x0118, 0x0118, 0x0118, 0x0117, 0x0117, 0x0117, 0x0116, 0x0116, 0x0116, 0x0115, 0x0115, 0x0115, 0x0114, 0x0114, 0x0114, 0x0113, 0x0113, 0x0112, 0x0112, 0x0112, 0x0111, 0x0111, 0x0111, 0x0110, 0x0110, 0x0110, 0x010f, 0x010f, 0x010f, 0x010e, 0x010e, 0x010e, 0x010d, 0x010d, 0x010d, 0x010c, 0x010c, 0x010c, 0x010b, 0x010b, 0x010b, 0x010a, 0x010a, 0x010a, 0x0109, 0x0109, 0x0109, 0x0108, 0x0108, 0x0108, 0x0107, 0x0107, 0x0107, 0x0106, 0x0106, 0x0106, 0x0105, 0x0105, 0x0105, 0x0104, 0x0104, 0x0104, 0x0103, 0x0103, 0x0103, 0x0102, 0x0102, 0x0102, 0x0101, 0x0101, 0x0101, 0x0100, 0x0100, 0x0100, 0x00ff, 0x00ff, 0x00ff, 0x00fe, 0x00fe, 0x00fe, 0x00fd, 0x00fd, 0x00fd, 0x00fc, 0x00fc, 0x00fc, 0x00fb, 0x00fb, 0x00fb, 0x00fa, 0x00fa, 0x00fa, 0x00f9, 0x00f9, 0x00f9, 0x00f8, 0x00f8, 0x00f8, 0x00f7, 0x00f7, 0x00f7, 0x00f6, 0x00f6, 0x00f6, 0x00f5, 0x00f5, 0x00f5, 0x00f4, 0x00f4, 0x00f4, 0x00f3, 0x00f3, 0x00f3, 0x00f2, 0x00f2, 0x00f2, 0x00f1, 0x00f1, 0x00f1, 0x00f0, 0x00f0, 0x00f0, 0x00ef, 0x00ef, 0x00ef, 0x00ee, 0x00ee, 0x00ee, 0x00ed, 0x00ed, 0x00ec, 0x00ec, 0x00ec, 0x00eb, 0x00eb, 0x00eb, 0x00ea, 0x00ea, 0x00ea, 0x00e9, 0x00e9, 0x00e9, 0x00e8, 0x00e8, 0x00e8, 0x00e7, 0x00e7, 0x00e7, 0x00e6, 0x00e6, 0x00e6, 0x00e5, 0x00e5, 0x00e5, 0x00e4, 0x00e4, 0x00e4, 0x00e3, 0x00e3, 0x00e3, 0x00e2, 0x00e2, 0x00e2, 0x00e1, 0x00e1, 0x00e1, 0x00e0, 0x00e0, 0x00e0, 0x00df, 0x00df, 0x00df, 0x00de, 0x00de, 0x00de, 0x00dd, 0x00dd, 0x00dd, 0x00dc, 0x00dc, 0x00dc, 0x00db, 0x00db, 0x00db, 0x00da, 0x00da, 0x00da, 0x00d9, 0x00d9, 0x00d9, 0x00d8, 0x00d8, 0x00d8, 0x00d7, 0x00d7, 0x00d7, 0x00d6, 0x00d6, 0x00d6, 0x00d5, }; const int16_t _tv_lut_yuv2rgb_gv [256] = { 0x0059, 0x0059, 0x0058, 0x0057, 0x0057, 0x0056, 0x0055, 0x0054, 0x0054, 0x0053, 0x0052, 0x0052, 0x0051, 0x0050, 0x0050, 0x004f, 0x004e, 0x004d, 0x004d, 0x004c, 0x004b, 0x004b, 0x004a, 0x0049, 0x0049, 0x0048, 0x0047, 0x0047, 0x0046, 0x0045, 0x0044, 0x0044, 0x0043, 0x0042, 0x0042, 0x0041, 0x0040, 0x0040, 0x003f, 0x003e, 0x003d, 0x003d, 0x003c, 0x003b, 0x003b, 0x003a, 0x0039, 0x0039, 0x0038, 0x0037, 0x0036, 0x0036, 0x0035, 0x0034, 0x0034, 0x0033, 0x0032, 0x0032, 0x0031, 0x0030, 0x002f, 0x002f, 0x002e, 0x002d, 0x002d, 0x002c, 0x002b, 0x002b, 0x002a, 0x0029, 0x0028, 0x0028, 0x0027, 0x0026, 0x0026, 0x0025, 0x0024, 0x0024, 0x0023, 0x0022, 0x0022, 0x0021, 0x0020, 0x001f, 0x001f, 0x001e, 0x001d, 0x001d, 0x001c, 0x001b, 0x001b, 0x001a, 0x0019, 0x0018, 0x0018, 0x0017, 0x0016, 0x0016, 0x0015, 0x0014, 0x0014, 0x0013, 0x0012, 0x0011, 0x0011, 0x0010, 0x000f, 0x000f, 0x000e, 0x000d, 0x000d, 0x000c, 0x000b, 0x000a, 0x000a, 0x0009, 0x0008, 0x0008, 0x0007, 0x0006, 0x0006, 0x0005, 0x0004, 0x0003, 0x0003, 0x0002, 0x0001, 0x0001, 0x0000, 0xffff, 0xffff, 0xfffe, 0xfffd, 0xfffd, 0xfffc, 0xfffb, 0xfffa, 0xfffa, 0xfff9, 0xfff8, 0xfff8, 0xfff7, 0xfff6, 0xfff6, 0xfff5, 0xfff4, 0xfff3, 0xfff3, 0xfff2, 0xfff1, 0xfff1, 0xfff0, 0xffef, 0xffef, 0xffee, 0xffed, 0xffec, 0xffec, 0xffeb, 0xffea, 0xffea, 0xffe9, 0xffe8, 0xffe8, 0xffe7, 0xffe6, 0xffe5, 0xffe5, 0xffe4, 0xffe3, 0xffe3, 0xffe2, 0xffe1, 0xffe1, 0xffe0, 0xffdf, 0xffde, 0xffde, 0xffdd, 0xffdc, 0xffdc, 0xffdb, 0xffda, 0xffda, 0xffd9, 0xffd8, 0xffd8, 0xffd7, 0xffd6, 0xffd5, 0xffd5, 0xffd4, 0xffd3, 0xffd3, 0xffd2, 0xffd1, 0xffd1, 0xffd0, 0xffcf, 0xffce, 0xffce, 0xffcd, 0xffcc, 0xffcc, 0xffcb, 0xffca, 0xffca, 0xffc9, 0xffc8, 0xffc7, 0xffc7, 0xffc6, 0xffc5, 0xffc5, 0xffc4, 0xffc3, 0xffc3, 0xffc2, 0xffc1, 0xffc0, 0xffc0, 0xffbf, 0xffbe, 0xffbe, 0xffbd, 0xffbc, 0xffbc, 0xffbb, 0xffba, 0xffb9, 0xffb9, 0xffb8, 0xffb7, 0xffb7, 0xffb6, 0xffb5, 0xffb5, 0xffb4, 0xffb3, 0xffb3, 0xffb2, 0xffb1, 0xffb0, 0xffb0, 0xffaf, 0xffae, 0xffae, 0xffad, 0xffac, 0xffac, 0xffab, 0xffaa, 0xffa9, 0xffa9, 0xffa8, 0xffa7, }; const int16_t _tv_lut_yuv2rgb_rv [256] = { 0x0051, 0x0052, 0x0053, 0x0055, 0x0056, 0x0057, 0x0059, 0x005a, 0x005c, 0x005d, 0x005e, 0x0060, 0x0061, 0x0062, 0x0064, 0x0065, 0x0066, 0x0068, 0x0069, 0x006b, 0x006c, 0x006d, 0x006f, 0x0070, 0x0071, 0x0073, 0x0074, 0x0076, 0x0077, 0x0078, 0x007a, 0x007b, 0x007c, 0x007e, 0x007f, 0x0081, 0x0082, 0x0083, 0x0085, 0x0086, 0x0087, 0x0089, 0x008a, 0x008b, 0x008d, 0x008e, 0x0090, 0x0091, 0x0092, 0x0094, 0x0095, 0x0096, 0x0098, 0x0099, 0x009b, 0x009c, 0x009d, 0x009f, 0x00a0, 0x00a1, 0x00a3, 0x00a4, 0x00a6, 0x00a7, 0x00a8, 0x00aa, 0x00ab, 0x00ac, 0x00ae, 0x00af, 0x00b0, 0x00b2, 0x00b3, 0x00b5, 0x00b6, 0x00b7, 0x00b9, 0x00ba, 0x00bb, 0x00bd, 0x00be, 0x00c0, 0x00c1, 0x00c2, 0x00c4, 0x00c5, 0x00c6, 0x00c8, 0x00c9, 0x00cb, 0x00cc, 0x00cd, 0x00cf, 0x00d0, 0x00d1, 0x00d3, 0x00d4, 0x00d6, 0x00d7, 0x00d8, 0x00da, 0x00db, 0x00dc, 0x00de, 0x00df, 0x00e0, 0x00e2, 0x00e3, 0x00e5, 0x00e6, 0x00e7, 0x00e9, 0x00ea, 0x00eb, 0x00ed, 0x00ee, 0x00f0, 0x00f1, 0x00f2, 0x00f4, 0x00f5, 0x00f6, 0x00f8, 0x00f9, 0x00fb, 0x00fc, 0x00fd, 0x00ff, 0x0100, 0x0101, 0x0103, 0x0104, 0x0105, 0x0107, 0x0108, 0x010a, 0x010b, 0x010c, 0x010e, 0x010f, 0x0110, 0x0112, 0x0113, 0x0115, 0x0116, 0x0117, 0x0119, 0x011a, 0x011b, 0x011d, 0x011e, 0x0120, 0x0121, 0x0122, 0x0124, 0x0125, 0x0126, 0x0128, 0x0129, 0x012a, 0x012c, 0x012d, 0x012f, 0x0130, 0x0131, 0x0133, 0x0134, 0x0135, 0x0137, 0x0138, 0x013a, 0x013b, 0x013c, 0x013e, 0x013f, 0x0140, 0x0142, 0x0143, 0x0145, 0x0146, 0x0147, 0x0149, 0x014a, 0x014b, 0x014d, 0x014e, 0x0150, 0x0151, 0x0152, 0x0154, 0x0155, 0x0156, 0x0158, 0x0159, 0x015a, 0x015c, 0x015d, 0x015f, 0x0160, 0x0161, 0x0163, 0x0164, 0x0165, 0x0167, 0x0168, 0x016a, 0x016b, 0x016c, 0x016e, 0x016f, 0x0170, 0x0172, 0x0173, 0x0175, 0x0176, 0x0177, 0x0179, 0x017a, 0x017b, 0x017d, 0x017e, 0x017f, 0x0181, 0x0182, 0x0184, 0x0185, 0x0186, 0x0188, 0x0189, 0x018a, 0x018c, 0x018d, 0x018f, 0x0190, 0x0191, 0x0193, 0x0194, 0x0195, 0x0197, 0x0198, 0x019a, 0x019b, 0x019c, 0x019e, 0x019f, 0x01a0, 0x01a2, 0x01a3, 0x01a4, 0x01a6, 0x01a7, 0x01a9, 0x01aa, 0x01ab, 0x01ad, 0x01ae, }; const int16_t _tv_lut_yuv2rgb_bu [256] = { 0x0022, 0x0024, 0x0026, 0x0027, 0x0029, 0x002b, 0x002d, 0x002e, 0x0030, 0x0032, 0x0034, 0x0035, 0x0037, 0x0039, 0x003b, 0x003c, 0x003e, 0x0040, 0x0041, 0x0043, 0x0045, 0x0047, 0x0048, 0x004a, 0x004c, 0x004e, 0x004f, 0x0051, 0x0053, 0x0054, 0x0056, 0x0058, 0x005a, 0x005b, 0x005d, 0x005f, 0x0061, 0x0062, 0x0064, 0x0066, 0x0068, 0x0069, 0x006b, 0x006d, 0x006e, 0x0070, 0x0072, 0x0074, 0x0075, 0x0077, 0x0079, 0x007b, 0x007c, 0x007e, 0x0080, 0x0082, 0x0083, 0x0085, 0x0087, 0x0088, 0x008a, 0x008c, 0x008e, 0x008f, 0x0091, 0x0093, 0x0095, 0x0096, 0x0098, 0x009a, 0x009c, 0x009d, 0x009f, 0x00a1, 0x00a2, 0x00a4, 0x00a6, 0x00a8, 0x00a9, 0x00ab, 0x00ad, 0x00af, 0x00b0, 0x00b2, 0x00b4, 0x00b6, 0x00b7, 0x00b9, 0x00bb, 0x00bc, 0x00be, 0x00c0, 0x00c2, 0x00c3, 0x00c5, 0x00c7, 0x00c9, 0x00ca, 0x00cc, 0x00ce, 0x00cf, 0x00d1, 0x00d3, 0x00d5, 0x00d6, 0x00d8, 0x00da, 0x00dc, 0x00dd, 0x00df, 0x00e1, 0x00e3, 0x00e4, 0x00e6, 0x00e8, 0x00e9, 0x00eb, 0x00ed, 0x00ef, 0x00f0, 0x00f2, 0x00f4, 0x00f6, 0x00f7, 0x00f9, 0x00fb, 0x00fd, 0x00fe, 0x0100, 0x0102, 0x0103, 0x0105, 0x0107, 0x0109, 0x010a, 0x010c, 0x010e, 0x0110, 0x0111, 0x0113, 0x0115, 0x0117, 0x0118, 0x011a, 0x011c, 0x011d, 0x011f, 0x0121, 0x0123, 0x0124, 0x0126, 0x0128, 0x012a, 0x012b, 0x012d, 0x012f, 0x0131, 0x0132, 0x0134, 0x0136, 0x0137, 0x0139, 0x013b, 0x013d, 0x013e, 0x0140, 0x0142, 0x0144, 0x0145, 0x0147, 0x0149, 0x014a, 0x014c, 0x014e, 0x0150, 0x0151, 0x0153, 0x0155, 0x0157, 0x0158, 0x015a, 0x015c, 0x015e, 0x015f, 0x0161, 0x0163, 0x0164, 0x0166, 0x0168, 0x016a, 0x016b, 0x016d, 0x016f, 0x0171, 0x0172, 0x0174, 0x0176, 0x0178, 0x0179, 0x017b, 0x017d, 0x017e, 0x0180, 0x0182, 0x0184, 0x0185, 0x0187, 0x0189, 0x018b, 0x018c, 0x018e, 0x0190, 0x0192, 0x0193, 0x0195, 0x0197, 0x0198, 0x019a, 0x019c, 0x019e, 0x019f, 0x01a1, 0x01a3, 0x01a5, 0x01a6, 0x01a8, 0x01aa, 0x01ac, 0x01ad, 0x01af, 0x01b1, 0x01b2, 0x01b4, 0x01b6, 0x01b8, 0x01b9, 0x01bb, 0x01bd, 0x01bf, 0x01c0, 0x01c2, 0x01c4, 0x01c5, 0x01c7, 0x01c9, 0x01cb, 0x01cc, 0x01ce, 0x01d0, 0x01d2, 0x01d3, 0x01d5, 0x01d7, 0x01d9, 0x01da, 0x01dc, }; const uint8_t _tv_lut_yuv2rgb8 [256 + 512] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2f, 0x30, 0x31, 0x32, 0x33, 0x34, 0x36, 0x37, 0x38, 0x39, 0x3a, 0x3b, 0x3d, 0x3e, 0x3f, 0x40, 0x41, 0x42, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f, 0x50, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x5a, 0x5b, 0x5c, 0x5d, 0x5e, 0x5f, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6f, 0x70, 0x71, 0x72, 0x73, 0x74, 0x76, 0x77, 0x78, 0x79, 0x7a, 0x7b, 0x7d, 0x7e, 0x7f, 0x80, 0x81, 0x82, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, 0x90, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa7, 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xaf, 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb6, 0xb7, 0xb8, 0xb9, 0xba, 0xbb, 0xbd, 0xbe, 0xbf, 0xc0, 0xc1, 0xc2, 0xc4, 0xc5, 0xc6, 0xc7, 0xc8, 0xc9, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, 0xd0, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe7, 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xee, 0xef, 0xf0, 0xf1, 0xf2, 0xf3, 0xf5, 0xf6, 0xf7, 0xf8, 0xf9, 0xfa, 0xfc, 0xfd, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, }; const uint16_t _tv_lut_yuv2rgb16 [2][6][256 + 512] = { { { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1800, 0x1800, 0x1800, 0x1800, 0x1800, 0x1800, 0x1800, 0x2000, 0x2000, 0x2000, 0x2000, 0x2000, 0x2000, 0x2800, 0x2800, 0x2800, 0x2800, 0x2800, 0x2800, 0x2800, 0x3000, 0x3000, 0x3000, 0x3000, 0x3000, 0x3000, 0x3000, 0x3800, 0x3800, 0x3800, 0x3800, 0x3800, 0x3800, 0x3800, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4800, 0x4800, 0x4800, 0x4800, 0x4800, 0x4800, 0x4800, 0x5000, 0x5000, 0x5000, 0x5000, 0x5000, 0x5000, 0x5000, 0x5800, 0x5800, 0x5800, 0x5800, 0x5800, 0x5800, 0x5800, 0x6000, 0x6000, 0x6000, 0x6000, 0x6000, 0x6000, 0x6800, 0x6800, 0x6800, 0x6800, 0x6800, 0x6800, 0x6800, 0x7000, 0x7000, 0x7000, 0x7000, 0x7000, 0x7000, 0x7000, 0x7800, 0x7800, 0x7800, 0x7800, 0x7800, 0x7800, 0x7800, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8800, 0x8800, 0x8800, 0x8800, 0x8800, 0x8800, 0x8800, 0x9000, 0x9000, 0x9000, 0x9000, 0x9000, 0x9000, 0x9000, 0x9800, 0x9800, 0x9800, 0x9800, 0x9800, 0x9800, 0xa000, 0xa000, 0xa000, 0xa000, 0xa000, 0xa000, 0xa000, 0xa800, 0xa800, 0xa800, 0xa800, 0xa800, 0xa800, 0xa800, 0xb000, 0xb000, 0xb000, 0xb000, 0xb000, 0xb000, 0xb000, 0xb800, 0xb800, 0xb800, 0xb800, 0xb800, 0xb800, 0xb800, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc800, 0xc800, 0xc800, 0xc800, 0xc800, 0xc800, 0xc800, 0xd000, 0xd000, 0xd000, 0xd000, 0xd000, 0xd000, 0xd000, 0xd800, 0xd800, 0xd800, 0xd800, 0xd800, 0xd800, 0xe000, 0xe000, 0xe000, 0xe000, 0xe000, 0xe000, 0xe000, 0xe800, 0xe800, 0xe800, 0xe800, 0xe800, 0xe800, 0xe800, 0xf000, 0xf000, 0xf000, 0xf000, 0xf000, 0xf000, 0xf000, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0400, 0x0400, 0x0400, 0x0400, 0x0400, 0x0400, 0x0400, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0c00, 0x0c00, 0x0c00, 0x0c00, 0x0c00, 0x0c00, 0x0c00, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1400, 0x1400, 0x1400, 0x1400, 0x1400, 0x1400, 0x1400, 0x1800, 0x1800, 0x1800, 0x1800, 0x1800, 0x1800, 0x1800, 0x1c00, 0x1c00, 0x1c00, 0x1c00, 0x1c00, 0x1c00, 0x1c00, 0x2000, 0x2000, 0x2000, 0x2000, 0x2000, 0x2000, 0x2000, 0x2400, 0x2400, 0x2400, 0x2400, 0x2400, 0x2400, 0x2400, 0x2800, 0x2800, 0x2800, 0x2800, 0x2800, 0x2800, 0x2800, 0x2c00, 0x2c00, 0x2c00, 0x2c00, 0x2c00, 0x2c00, 0x2c00, 0x3000, 0x3000, 0x3000, 0x3000, 0x3000, 0x3000, 0x3400, 0x3400, 0x3400, 0x3400, 0x3400, 0x3400, 0x3400, 0x3800, 0x3800, 0x3800, 0x3800, 0x3800, 0x3800, 0x3800, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4400, 0x4400, 0x4400, 0x4400, 0x4400, 0x4400, 0x4400, 0x4800, 0x4800, 0x4800, 0x4800, 0x4800, 0x4800, 0x4800, 0x4c00, 0x4c00, 0x4c00, 0x4c00, 0x4c00, 0x4c00, 0x5000, 0x5000, 0x5000, 0x5000, 0x5000, 0x5000, 0x5000, 0x5400, 0x5400, 0x5400, 0x5400, 0x5400, 0x5400, 0x5400, 0x5800, 0x5800, 0x5800, 0x5800, 0x5800, 0x5800, 0x5800, 0x5c00, 0x5c00, 0x5c00, 0x5c00, 0x5c00, 0x5c00, 0x5c00, 0x6000, 0x6000, 0x6000, 0x6000, 0x6000, 0x6000, 0x6000, 0x6400, 0x6400, 0x6400, 0x6400, 0x6400, 0x6400, 0x6400, 0x6800, 0x6800, 0x6800, 0x6800, 0x6800, 0x6800, 0x6800, 0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x7000, 0x7000, 0x7000, 0x7000, 0x7000, 0x7000, 0x7000, 0x7400, 0x7400, 0x7400, 0x7400, 0x7400, 0x7400, 0x7400, 0x7800, 0x7800, 0x7800, 0x7800, 0x7800, 0x7800, 0x7800, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0020, 0x0020, 0x0020, 0x0040, 0x0040, 0x0040, 0x0060, 0x0060, 0x0060, 0x0060, 0x0080, 0x0080, 0x0080, 0x00a0, 0x00a0, 0x00a0, 0x00a0, 0x00c0, 0x00c0, 0x00c0, 0x00e0, 0x00e0, 0x00e0, 0x00e0, 0x0100, 0x0100, 0x0100, 0x0120, 0x0120, 0x0120, 0x0140, 0x0140, 0x0140, 0x0140, 0x0160, 0x0160, 0x0160, 0x0180, 0x0180, 0x0180, 0x0180, 0x01a0, 0x01a0, 0x01a0, 0x01c0, 0x01c0, 0x01c0, 0x01c0, 0x01e0, 0x01e0, 0x01e0, 0x0200, 0x0200, 0x0200, 0x0220, 0x0220, 0x0220, 0x0220, 0x0240, 0x0240, 0x0240, 0x0260, 0x0260, 0x0260, 0x0260, 0x0280, 0x0280, 0x0280, 0x02a0, 0x02a0, 0x02a0, 0x02a0, 0x02c0, 0x02c0, 0x02c0, 0x02e0, 0x02e0, 0x02e0, 0x02e0, 0x0300, 0x0300, 0x0300, 0x0320, 0x0320, 0x0320, 0x0340, 0x0340, 0x0340, 0x0340, 0x0360, 0x0360, 0x0360, 0x0380, 0x0380, 0x0380, 0x0380, 0x03a0, 0x03a0, 0x03a0, 0x03c0, 0x03c0, 0x03c0, 0x03c0, 0x03e0, 0x03e0, 0x03e0, 0x0400, 0x0400, 0x0400, 0x0420, 0x0420, 0x0420, 0x0420, 0x0440, 0x0440, 0x0440, 0x0460, 0x0460, 0x0460, 0x0460, 0x0480, 0x0480, 0x0480, 0x04a0, 0x04a0, 0x04a0, 0x04a0, 0x04c0, 0x04c0, 0x04c0, 0x04e0, 0x04e0, 0x04e0, 0x0500, 0x0500, 0x0500, 0x0500, 0x0520, 0x0520, 0x0520, 0x0540, 0x0540, 0x0540, 0x0540, 0x0560, 0x0560, 0x0560, 0x0580, 0x0580, 0x0580, 0x0580, 0x05a0, 0x05a0, 0x05a0, 0x05c0, 0x05c0, 0x05c0, 0x05c0, 0x05e0, 0x05e0, 0x05e0, 0x0600, 0x0600, 0x0600, 0x0620, 0x0620, 0x0620, 0x0620, 0x0640, 0x0640, 0x0640, 0x0660, 0x0660, 0x0660, 0x0660, 0x0680, 0x0680, 0x0680, 0x06a0, 0x06a0, 0x06a0, 0x06a0, 0x06c0, 0x06c0, 0x06c0, 0x06e0, 0x06e0, 0x06e0, 0x0700, 0x0700, 0x0700, 0x0700, 0x0720, 0x0720, 0x0720, 0x0740, 0x0740, 0x0740, 0x0740, 0x0760, 0x0760, 0x0760, 0x0780, 0x0780, 0x0780, 0x0780, 0x07a0, 0x07a0, 0x07a0, 0x07c0, 0x07c0, 0x07c0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0040, 0x0040, 0x0040, 0x0040, 0x0040, 0x0040, 0x0040, 0x0060, 0x0060, 0x0060, 0x0060, 0x0060, 0x0060, 0x0060, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x00a0, 0x00a0, 0x00a0, 0x00a0, 0x00a0, 0x00a0, 0x00a0, 0x00c0, 0x00c0, 0x00c0, 0x00c0, 0x00c0, 0x00c0, 0x00c0, 0x00e0, 0x00e0, 0x00e0, 0x00e0, 0x00e0, 0x00e0, 0x00e0, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0120, 0x0120, 0x0120, 0x0120, 0x0120, 0x0120, 0x0120, 0x0140, 0x0140, 0x0140, 0x0140, 0x0140, 0x0140, 0x0140, 0x0160, 0x0160, 0x0160, 0x0160, 0x0160, 0x0160, 0x0160, 0x0180, 0x0180, 0x0180, 0x0180, 0x0180, 0x0180, 0x01a0, 0x01a0, 0x01a0, 0x01a0, 0x01a0, 0x01a0, 0x01a0, 0x01c0, 0x01c0, 0x01c0, 0x01c0, 0x01c0, 0x01c0, 0x01c0, 0x01e0, 0x01e0, 0x01e0, 0x01e0, 0x01e0, 0x01e0, 0x01e0, 0x0200, 0x0200, 0x0200, 0x0200, 0x0200, 0x0200, 0x0200, 0x0220, 0x0220, 0x0220, 0x0220, 0x0220, 0x0220, 0x0220, 0x0240, 0x0240, 0x0240, 0x0240, 0x0240, 0x0240, 0x0240, 0x0260, 0x0260, 0x0260, 0x0260, 0x0260, 0x0260, 0x0280, 0x0280, 0x0280, 0x0280, 0x0280, 0x0280, 0x0280, 0x02a0, 0x02a0, 0x02a0, 0x02a0, 0x02a0, 0x02a0, 0x02a0, 0x02c0, 0x02c0, 0x02c0, 0x02c0, 0x02c0, 0x02c0, 0x02c0, 0x02e0, 0x02e0, 0x02e0, 0x02e0, 0x02e0, 0x02e0, 0x02e0, 0x0300, 0x0300, 0x0300, 0x0300, 0x0300, 0x0300, 0x0300, 0x0320, 0x0320, 0x0320, 0x0320, 0x0320, 0x0320, 0x0320, 0x0340, 0x0340, 0x0340, 0x0340, 0x0340, 0x0340, 0x0340, 0x0360, 0x0360, 0x0360, 0x0360, 0x0360, 0x0360, 0x0380, 0x0380, 0x0380, 0x0380, 0x0380, 0x0380, 0x0380, 0x03a0, 0x03a0, 0x03a0, 0x03a0, 0x03a0, 0x03a0, 0x03a0, 0x03c0, 0x03c0, 0x03c0, 0x03c0, 0x03c0, 0x03c0, 0x03c0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0005, 0x0005, 0x0005, 0x0005, 0x0005, 0x0005, 0x0005, 0x0006, 0x0006, 0x0006, 0x0006, 0x0006, 0x0006, 0x0006, 0x0007, 0x0007, 0x0007, 0x0007, 0x0007, 0x0007, 0x0007, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0009, 0x0009, 0x0009, 0x0009, 0x0009, 0x0009, 0x0009, 0x000a, 0x000a, 0x000a, 0x000a, 0x000a, 0x000a, 0x000a, 0x000b, 0x000b, 0x000b, 0x000b, 0x000b, 0x000b, 0x000b, 0x000c, 0x000c, 0x000c, 0x000c, 0x000c, 0x000c, 0x000d, 0x000d, 0x000d, 0x000d, 0x000d, 0x000d, 0x000d, 0x000e, 0x000e, 0x000e, 0x000e, 0x000e, 0x000e, 0x000e, 0x000f, 0x000f, 0x000f, 0x000f, 0x000f, 0x000f, 0x000f, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0011, 0x0011, 0x0011, 0x0011, 0x0011, 0x0011, 0x0011, 0x0012, 0x0012, 0x0012, 0x0012, 0x0012, 0x0012, 0x0012, 0x0013, 0x0013, 0x0013, 0x0013, 0x0013, 0x0013, 0x0014, 0x0014, 0x0014, 0x0014, 0x0014, 0x0014, 0x0014, 0x0015, 0x0015, 0x0015, 0x0015, 0x0015, 0x0015, 0x0015, 0x0016, 0x0016, 0x0016, 0x0016, 0x0016, 0x0016, 0x0016, 0x0017, 0x0017, 0x0017, 0x0017, 0x0017, 0x0017, 0x0017, 0x0018, 0x0018, 0x0018, 0x0018, 0x0018, 0x0018, 0x0018, 0x0019, 0x0019, 0x0019, 0x0019, 0x0019, 0x0019, 0x0019, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001b, 0x001b, 0x001b, 0x001b, 0x001b, 0x001b, 0x001c, 0x001c, 0x001c, 0x001c, 0x001c, 0x001c, 0x001c, 0x001d, 0x001d, 0x001d, 0x001d, 0x001d, 0x001d, 0x001d, 0x001e, 0x001e, 0x001e, 0x001e, 0x001e, 0x001e, 0x001e, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, }, }, { { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0018, 0x0018, 0x0018, 0x0018, 0x0018, 0x0018, 0x0018, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0028, 0x0028, 0x0028, 0x0028, 0x0028, 0x0028, 0x0028, 0x0030, 0x0030, 0x0030, 0x0030, 0x0030, 0x0030, 0x0030, 0x0038, 0x0038, 0x0038, 0x0038, 0x0038, 0x0038, 0x0038, 0x0040, 0x0040, 0x0040, 0x0040, 0x0040, 0x0040, 0x0040, 0x0048, 0x0048, 0x0048, 0x0048, 0x0048, 0x0048, 0x0048, 0x0050, 0x0050, 0x0050, 0x0050, 0x0050, 0x0050, 0x0050, 0x0058, 0x0058, 0x0058, 0x0058, 0x0058, 0x0058, 0x0058, 0x0060, 0x0060, 0x0060, 0x0060, 0x0060, 0x0060, 0x0068, 0x0068, 0x0068, 0x0068, 0x0068, 0x0068, 0x0068, 0x0070, 0x0070, 0x0070, 0x0070, 0x0070, 0x0070, 0x0070, 0x0078, 0x0078, 0x0078, 0x0078, 0x0078, 0x0078, 0x0078, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0088, 0x0088, 0x0088, 0x0088, 0x0088, 0x0088, 0x0088, 0x0090, 0x0090, 0x0090, 0x0090, 0x0090, 0x0090, 0x0090, 0x0098, 0x0098, 0x0098, 0x0098, 0x0098, 0x0098, 0x00a0, 0x00a0, 0x00a0, 0x00a0, 0x00a0, 0x00a0, 0x00a0, 0x00a8, 0x00a8, 0x00a8, 0x00a8, 0x00a8, 0x00a8, 0x00a8, 0x00b0, 0x00b0, 0x00b0, 0x00b0, 0x00b0, 0x00b0, 0x00b0, 0x00b8, 0x00b8, 0x00b8, 0x00b8, 0x00b8, 0x00b8, 0x00b8, 0x00c0, 0x00c0, 0x00c0, 0x00c0, 0x00c0, 0x00c0, 0x00c0, 0x00c8, 0x00c8, 0x00c8, 0x00c8, 0x00c8, 0x00c8, 0x00c8, 0x00d0, 0x00d0, 0x00d0, 0x00d0, 0x00d0, 0x00d0, 0x00d0, 0x00d8, 0x00d8, 0x00d8, 0x00d8, 0x00d8, 0x00d8, 0x00e0, 0x00e0, 0x00e0, 0x00e0, 0x00e0, 0x00e0, 0x00e0, 0x00e8, 0x00e8, 0x00e8, 0x00e8, 0x00e8, 0x00e8, 0x00e8, 0x00f0, 0x00f0, 0x00f0, 0x00f0, 0x00f0, 0x00f0, 0x00f0, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x000c, 0x000c, 0x000c, 0x000c, 0x000c, 0x000c, 0x000c, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0014, 0x0014, 0x0014, 0x0014, 0x0014, 0x0014, 0x0014, 0x0018, 0x0018, 0x0018, 0x0018, 0x0018, 0x0018, 0x0018, 0x001c, 0x001c, 0x001c, 0x001c, 0x001c, 0x001c, 0x001c, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0024, 0x0024, 0x0024, 0x0024, 0x0024, 0x0024, 0x0024, 0x0028, 0x0028, 0x0028, 0x0028, 0x0028, 0x0028, 0x0028, 0x002c, 0x002c, 0x002c, 0x002c, 0x002c, 0x002c, 0x002c, 0x0030, 0x0030, 0x0030, 0x0030, 0x0030, 0x0030, 0x0034, 0x0034, 0x0034, 0x0034, 0x0034, 0x0034, 0x0034, 0x0038, 0x0038, 0x0038, 0x0038, 0x0038, 0x0038, 0x0038, 0x003c, 0x003c, 0x003c, 0x003c, 0x003c, 0x003c, 0x003c, 0x0040, 0x0040, 0x0040, 0x0040, 0x0040, 0x0040, 0x0040, 0x0044, 0x0044, 0x0044, 0x0044, 0x0044, 0x0044, 0x0044, 0x0048, 0x0048, 0x0048, 0x0048, 0x0048, 0x0048, 0x0048, 0x004c, 0x004c, 0x004c, 0x004c, 0x004c, 0x004c, 0x0050, 0x0050, 0x0050, 0x0050, 0x0050, 0x0050, 0x0050, 0x0054, 0x0054, 0x0054, 0x0054, 0x0054, 0x0054, 0x0054, 0x0058, 0x0058, 0x0058, 0x0058, 0x0058, 0x0058, 0x0058, 0x005c, 0x005c, 0x005c, 0x005c, 0x005c, 0x005c, 0x005c, 0x0060, 0x0060, 0x0060, 0x0060, 0x0060, 0x0060, 0x0060, 0x0064, 0x0064, 0x0064, 0x0064, 0x0064, 0x0064, 0x0064, 0x0068, 0x0068, 0x0068, 0x0068, 0x0068, 0x0068, 0x0068, 0x006c, 0x006c, 0x006c, 0x006c, 0x006c, 0x006c, 0x0070, 0x0070, 0x0070, 0x0070, 0x0070, 0x0070, 0x0070, 0x0074, 0x0074, 0x0074, 0x0074, 0x0074, 0x0074, 0x0074, 0x0078, 0x0078, 0x0078, 0x0078, 0x0078, 0x0078, 0x0078, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x2000, 0x2000, 0x2000, 0x4000, 0x4000, 0x4000, 0x6000, 0x6000, 0x6000, 0x6000, 0x8000, 0x8000, 0x8000, 0xa000, 0xa000, 0xa000, 0xa000, 0xc000, 0xc000, 0xc000, 0xe000, 0xe000, 0xe000, 0xe000, 0x0001, 0x0001, 0x0001, 0x2001, 0x2001, 0x2001, 0x4001, 0x4001, 0x4001, 0x4001, 0x6001, 0x6001, 0x6001, 0x8001, 0x8001, 0x8001, 0x8001, 0xa001, 0xa001, 0xa001, 0xc001, 0xc001, 0xc001, 0xc001, 0xe001, 0xe001, 0xe001, 0x0002, 0x0002, 0x0002, 0x2002, 0x2002, 0x2002, 0x2002, 0x4002, 0x4002, 0x4002, 0x6002, 0x6002, 0x6002, 0x6002, 0x8002, 0x8002, 0x8002, 0xa002, 0xa002, 0xa002, 0xa002, 0xc002, 0xc002, 0xc002, 0xe002, 0xe002, 0xe002, 0xe002, 0x0003, 0x0003, 0x0003, 0x2003, 0x2003, 0x2003, 0x4003, 0x4003, 0x4003, 0x4003, 0x6003, 0x6003, 0x6003, 0x8003, 0x8003, 0x8003, 0x8003, 0xa003, 0xa003, 0xa003, 0xc003, 0xc003, 0xc003, 0xc003, 0xe003, 0xe003, 0xe003, 0x0004, 0x0004, 0x0004, 0x2004, 0x2004, 0x2004, 0x2004, 0x4004, 0x4004, 0x4004, 0x6004, 0x6004, 0x6004, 0x6004, 0x8004, 0x8004, 0x8004, 0xa004, 0xa004, 0xa004, 0xa004, 0xc004, 0xc004, 0xc004, 0xe004, 0xe004, 0xe004, 0x0005, 0x0005, 0x0005, 0x0005, 0x2005, 0x2005, 0x2005, 0x4005, 0x4005, 0x4005, 0x4005, 0x6005, 0x6005, 0x6005, 0x8005, 0x8005, 0x8005, 0x8005, 0xa005, 0xa005, 0xa005, 0xc005, 0xc005, 0xc005, 0xc005, 0xe005, 0xe005, 0xe005, 0x0006, 0x0006, 0x0006, 0x2006, 0x2006, 0x2006, 0x2006, 0x4006, 0x4006, 0x4006, 0x6006, 0x6006, 0x6006, 0x6006, 0x8006, 0x8006, 0x8006, 0xa006, 0xa006, 0xa006, 0xa006, 0xc006, 0xc006, 0xc006, 0xe006, 0xe006, 0xe006, 0x0007, 0x0007, 0x0007, 0x0007, 0x2007, 0x2007, 0x2007, 0x4007, 0x4007, 0x4007, 0x4007, 0x6007, 0x6007, 0x6007, 0x8007, 0x8007, 0x8007, 0x8007, 0xa007, 0xa007, 0xa007, 0xc007, 0xc007, 0xc007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, 0xe007, }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x2000, 0x2000, 0x2000, 0x2000, 0x2000, 0x2000, 0x2000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x6000, 0x6000, 0x6000, 0x6000, 0x6000, 0x6000, 0x6000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0xa000, 0xa000, 0xa000, 0xa000, 0xa000, 0xa000, 0xa000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xe000, 0xe000, 0xe000, 0xe000, 0xe000, 0xe000, 0xe000, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x2001, 0x2001, 0x2001, 0x2001, 0x2001, 0x2001, 0x2001, 0x4001, 0x4001, 0x4001, 0x4001, 0x4001, 0x4001, 0x4001, 0x6001, 0x6001, 0x6001, 0x6001, 0x6001, 0x6001, 0x6001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0xa001, 0xa001, 0xa001, 0xa001, 0xa001, 0xa001, 0xa001, 0xc001, 0xc001, 0xc001, 0xc001, 0xc001, 0xc001, 0xc001, 0xe001, 0xe001, 0xe001, 0xe001, 0xe001, 0xe001, 0xe001, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x2002, 0x2002, 0x2002, 0x2002, 0x2002, 0x2002, 0x2002, 0x4002, 0x4002, 0x4002, 0x4002, 0x4002, 0x4002, 0x4002, 0x6002, 0x6002, 0x6002, 0x6002, 0x6002, 0x6002, 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, 0xa002, 0xa002, 0xa002, 0xa002, 0xa002, 0xa002, 0xa002, 0xc002, 0xc002, 0xc002, 0xc002, 0xc002, 0xc002, 0xc002, 0xe002, 0xe002, 0xe002, 0xe002, 0xe002, 0xe002, 0xe002, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x2003, 0x2003, 0x2003, 0x2003, 0x2003, 0x2003, 0x2003, 0x4003, 0x4003, 0x4003, 0x4003, 0x4003, 0x4003, 0x4003, 0x6003, 0x6003, 0x6003, 0x6003, 0x6003, 0x6003, 0x8003, 0x8003, 0x8003, 0x8003, 0x8003, 0x8003, 0x8003, 0xa003, 0xa003, 0xa003, 0xa003, 0xa003, 0xa003, 0xa003, 0xc003, 0xc003, 0xc003, 0xc003, 0xc003, 0xc003, 0xc003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0200, 0x0200, 0x0200, 0x0200, 0x0200, 0x0200, 0x0200, 0x0300, 0x0300, 0x0300, 0x0300, 0x0300, 0x0300, 0x0300, 0x0400, 0x0400, 0x0400, 0x0400, 0x0400, 0x0400, 0x0500, 0x0500, 0x0500, 0x0500, 0x0500, 0x0500, 0x0500, 0x0600, 0x0600, 0x0600, 0x0600, 0x0600, 0x0600, 0x0600, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0900, 0x0900, 0x0900, 0x0900, 0x0900, 0x0900, 0x0900, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0c00, 0x0c00, 0x0c00, 0x0c00, 0x0c00, 0x0c00, 0x0d00, 0x0d00, 0x0d00, 0x0d00, 0x0d00, 0x0d00, 0x0d00, 0x0e00, 0x0e00, 0x0e00, 0x0e00, 0x0e00, 0x0e00, 0x0e00, 0x0f00, 0x0f00, 0x0f00, 0x0f00, 0x0f00, 0x0f00, 0x0f00, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1400, 0x1400, 0x1400, 0x1400, 0x1400, 0x1400, 0x1400, 0x1500, 0x1500, 0x1500, 0x1500, 0x1500, 0x1500, 0x1500, 0x1600, 0x1600, 0x1600, 0x1600, 0x1600, 0x1600, 0x1600, 0x1700, 0x1700, 0x1700, 0x1700, 0x1700, 0x1700, 0x1700, 0x1800, 0x1800, 0x1800, 0x1800, 0x1800, 0x1800, 0x1800, 0x1900, 0x1900, 0x1900, 0x1900, 0x1900, 0x1900, 0x1900, 0x1a00, 0x1a00, 0x1a00, 0x1a00, 0x1a00, 0x1a00, 0x1a00, 0x1b00, 0x1b00, 0x1b00, 0x1b00, 0x1b00, 0x1b00, 0x1c00, 0x1c00, 0x1c00, 0x1c00, 0x1c00, 0x1c00, 0x1c00, 0x1d00, 0x1d00, 0x1d00, 0x1d00, 0x1d00, 0x1d00, 0x1d00, 0x1e00, 0x1e00, 0x1e00, 0x1e00, 0x1e00, 0x1e00, 0x1e00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, }, }, }; zapping-0.10cvs6/libtv/lut_yuv2rgb.h 644 764 144 1352 10442576150 12567 /* Generated file, do not edit! */ #ifndef LUT_YUV2RGB_H #define LUT_YUV2RGB_H #include #include "simd.h" #define CY_SH 14 #define GU_BU_SH 13 #define RV_GV_SH 14 #if SIMD extern const v16 _tv_vsplat16_yuv2rgb_cy; extern const v16 _tv_vsplat16_yuv2rgb_gu; extern const v16 _tv_vsplat16_yuv2rgb_bu; extern const v16 _tv_vsplat16_yuv2rgb_rv; extern const v16 _tv_vsplat16_yuv2rgb_gv; #endif extern const int16_t _tv_lut_yuv2rgb_gu [256]; extern const int16_t _tv_lut_yuv2rgb_gv [256]; extern const int16_t _tv_lut_yuv2rgb_rv [256]; extern const int16_t _tv_lut_yuv2rgb_bu [256]; extern const uint8_t _tv_lut_yuv2rgb8 [256 + 512]; extern const uint16_t _tv_lut_yuv2rgb16 [2][6][256 + 512]; #endif /* LUT_YUV2RGB_H */ zapping-0.10cvs6/libtv/simd-conv.h 644 764 144 46556 10417055676 12250 /* * Copyright (C) 2005-2006 Michael H. Schimek * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* $Id: simd-conv.h,v 1.5 2006/04/12 01:45:34 mschimek Exp $ */ #include #include "pixel_format.h" #include "misc.h" #include "simd.h" #include "lut_yuv2rgb.h" #if SIMD #if SIMD == CPU_FEATURE_ALTIVEC /* TO DO */ #else #if SIMD & ~CPU_FEATURE_MMX # warning only MMX tested #endif /* out[i] = in[i * dist % sizeof (in) + i * dist / sizeof (in)], e.g. dist = 2: (30 28 26 24 22 20 18 16) 14 12 10 08 06 04 02 00, (31 29 27 25 23 21 19 17) 15 13 11 09 07 05 03 01 dist = 4: (29 25 21 17) 13 09 05 01 (28 24 20 16) 12 08 04 00, (31 27 23 19) 15 11 07 03 (30 26 22 18) 14 10 06 02 */ static always_inline void interleave (vu8 * o0, vu8 * o1, vu8 i0, vu8 i1, const unsigned int dist) { vu8 t; if (SIMD == CPU_FEATURE_SSE2) { /* Another round because the vector is twice as wide. */ t = i0; i0 = vunpacklo8 (t, i1); i1 = vunpackhi8 (t, i1); } switch (dist) { case 2: t = i0; i0 = vunpacklo8 (t, i1); i1 = vunpackhi8 (t, i1); /* fall through */ case 4: t = i0; i0 = vunpacklo8 (t, i1); i1 = vunpackhi8 (t, i1); /* fall through */ case 8: *o0 = vunpacklo8 (i0, i1); *o1 = vunpackhi8 (i0, i1); break; default: assert (0); } } /* Loads 4/8 unsigned bytes from src and zero-extends to 16 bit. */ static always_inline vu8 load_lo (const uint8_t * src) { #if SIMD == CPU_FEATURE_SSE2 /* movq to xmm */ return _mm_set_epi64 ((__m64) 0LL, * (const __m64 *) src); #else /* movd to mmx */ return _mm_cvtsi32_si64 (* (const uint32_t *) src); #endif } /* Loads 8/16 unsigned bytes from src + offset, separates them into even and odd bytes, and zero-extends to 16 bit. */ static always_inline void load_16 (v16 * even, v16 * odd, const uint8_t * src, unsigned long offset) { *even = vload (src, offset); *odd = vsru16 ((vu16) *even, 8); *even = vand (*even, vsplat16_255); } /* Loads 16/32 YUYV pixels from src + offset in the given pixfmt, and separates them into Y, U and V samples. */ static always_inline void load_yuyv8 (vu8 * y0, vu8 * y1, vu8 * u, vu8 * v, const uint8_t * src, unsigned long offset, const tv_pixfmt pixfmt) { vu8 yeu0, yov0, yeu1, yov1; interleave (&yeu0, &yov0, vload (src, offset), vload (src, offset + 1 * sizeof (vu8)), 4); interleave (&yeu1, &yov1, vload (src, offset + 2 * sizeof (vu8)), vload (src, offset + 3 * sizeof (vu8)), 4); switch (pixfmt) { case TV_PIXFMT_YVYU: SWAP (u, v); /* fall through */ case TV_PIXFMT_YUYV: *y0 = vunpacklo8 (yeu0, yov0); *y1 = vunpacklo8 (yeu1, yov1); *u = vunpackhi (yeu0, yeu1); *v = vunpackhi (yov0, yov1); break; case TV_PIXFMT_VYUY: SWAP (u, v); /* fall through */ case TV_PIXFMT_UYVY: *y0 = vunpackhi8 (yeu0, yov0); *y1 = vunpackhi8 (yeu1, yov1); *u = vunpacklo (yeu0, yeu1); *v = vunpacklo (yov0, yov1); break; default: assert (0); } } /* Loads 8/16 YUYV pixels from src + offset in the given pixfmt, separates them into even Y, odd Y, U and V samples, and zero-extends all samples to 16 bit. */ static always_inline void load_yuyv16 (v16 * ye, v16 * yo, v16 * u, v16 * v, const uint8_t * src, unsigned long offset, const tv_pixfmt pixfmt) { vu8 yeu, yov; interleave (&yeu, &yov, vload (src, offset), vload (src, offset + sizeof (vu8)), 4); switch (pixfmt) { case TV_PIXFMT_YVYU: SWAP (u, v); /* fall through */ case TV_PIXFMT_YUYV: *ye = (v16) vunpacklo8 (yeu, vzerou8 ()); *yo = (v16) vunpacklo8 (yov, vzerou8 ()); *u = (v16) vunpackhi8 (yeu, vzerou8 ()); *v = (v16) vunpackhi8 (yov, vzerou8 ()); break; case TV_PIXFMT_VYUY: SWAP (u, v); /* fall through */ case TV_PIXFMT_UYVY: *ye = (v16) vunpackhi8 (yeu, vzerou8 ()); *yo = (v16) vunpackhi8 (yov, vzerou8 ()); *u = (v16) vunpacklo8 (yeu, vzerou8 ()); *v = (v16) vunpacklo8 (yov, vzerou8 ()); break; default: assert (0); } } /* Loads 4/8 RGB pixels from src + offset in the given pixfmt, separates them into R, G and B component, scales to 0 ... 255, and zero-extends to 16 bit. */ static always_inline void load_rgb16 (v16 * r, v16 * g, v16 * b, const uint8_t * src, unsigned long offset, const tv_pixfmt pixfmt) { vu8 t0, t1; switch (pixfmt) { case TV_PIXFMT_BGRA32_LE: case TV_PIXFMT_BGRA32_BE: SWAP (r, b); /* fall through */ case TV_PIXFMT_RGBA32_LE: /* .. A0 B0 G0 R0 */ case TV_PIXFMT_RGBA32_BE: /* .. R0 G0 B0 A0 */ interleave (&t0, &t1, vload (src, offset), vload (src, offset + sizeof (vu8)), 4); if (TV_PIXFMT_RGBA32_BE == pixfmt) { *r = vunpacklo16 (t0, vzero8 ()); *g = vunpackhi16 (t0, vzero8 ()); *b = vunpacklo16 (t1, vzero8 ()); } else { *r = vunpackhi16 (t1, vzero8 ()); *g = vunpacklo16 (t1, vzero8 ()); *b = vunpackhi16 (t0, vzero8 ()); } break; case TV_PIXFMT_RGB24_LE: SWAP (r, b); /* fall through */ case TV_PIXFMT_RGB24_BE: /* .. R0 G0 B0 */ /* TODO */ case TV_PIXFMT_BGR16_LE: /* rrrrrggg gggbbbbb */ /* TODO */ case TV_PIXFMT_BGRA16_LE: /* arrrrrgg gggbbbbb */ /* TODO */ default: assert (0); } } /* Stores 8/16 RGB pixels at dst + offset, given rg = (GE-RE GC-RC GA-RA G8-R8) G6-R6 G4-R4 G2-R2 G0-R0 gb = (BF-GF BD-GD BB-GB B9-G9) B7-G7 B5-G5 B3-G3 B1-G1 br = (RF-BE RD-BC RB-BA R9-B8) R7-B6 R5-B4 R3-B2 R1-B0 */ static always_inline void store_rggbbr (uint8_t * dst, unsigned long offset, vu8 rg, vu8 gb, vu8 br) { #if SIMD == CPU_FEATURE_SSE2 vu8 t0; t0 = vunpacklo16 (rg, br); /* R7-B6 G6-R6 R5-B4-G4-R4 R3-B2 G2-R2 R1-B0-G0-R0 */ t0 = _mm_shufflelo_epi16 (t0, _MM_SHUFFLE (1, 0, 3, 2)); /* R7-B6 G6-R6 R5-B4-G4-R4 R1-B0-G0-R0 R3-B2 G2-R2 */ br = vunpackhi16 (br, gb); /* BF-GF-RF-BE BD-GD RD-BC BB-GB-RB-BA B9-G9 R9-B8 */ gb = vunpackhi32 (vsl (gb, 64), t0); /* R7-B6 G6-R6 B7-G7 B5-G5 R5-B4-G4-R4 B3-G3 B1-G1 */ gb = _mm_shufflehi_epi16 (gb, _MM_SHUFFLE (1, 3, 2, 0)); /* B7-G7-R7-B6-G6-R6-B5-G5 R5-B4-G4-R4 B3-G3 B1-G1 */ rg = vunpacklo32 (vsru (rg, 64), br); /* BB-GB-RB-BA GE-RE GC-RC B9-G9 R9-B8 GA-RA G8-R8 */ rg = _mm_shufflelo_epi16 (rg, _MM_SHUFFLE (1, 3, 2, 0)); /* BB-GB-RB-BA GE-RE GC-RC GA-RA-B9-G9-R9-B8-G8-R8 */ t0 = vunpacklo32 (t0, gb); /* R5-B4-G4-R4 R1-B0-G0-R0 B3-G3 B1-G1 R3-B2 G2-R2 */ t0 = _mm_shufflelo_epi16 (t0, _MM_SHUFFLE (3, 1, 0, 2)); /* R5-B4-G4-R4 R1-B0-G0-R0 B3-G3-R3-B2 G2-R2-B1-G1 */ vstorent (dst, offset, _mm_shuffle_epi32 (t0, _MM_SHUFFLE (3, 1, 0, 2))); /* R5-B4-G4-R4-B3-G3-R3-B2-G2-R2-B1-G1-R1-B0-G0-R0 */ vstorent (dst, offset + 16, vunpacklo32 (vsru (gb, 64), rg)); /* GA-RA-B9-G9-R9-B8-G8-R8-B7-G7-R7-B6-G6-R6-B5-G5 */ rg = vunpackhi32 (rg, br); /* BF-GF-RF-BE BB-GB-RB-BA BD-GD RD-BC GE-RE GC-RC */ rg = _mm_shufflelo_epi16 (rg, _MM_SHUFFLE (1, 3, 2, 0)); /* BF-GF-RF-BE BB-GB-RB-BA GE-RE-BD-GD RD-BC-GC-RC */ vstorent (dst, offset + 32, _mm_shuffle_epi32 (rg, _MM_SHUFFLE (3, 1, 0, 2))); /* BF-GF-RF-BE-GE-RE-BD-GD-RD-BC-GC-RC-BB-GB-RB-BA */ #elif SIMD == CPU_FEATURE_SSE_INT vu8 t0; /* Saves a shift and two moves. */ t0 = vsru (rg, 32); /* 00 00 00 00 G6-R6 G4-R4 */ rg = vunpacklo16 (rg, br); /* R3-B2 G2-R2 R1-B0-G0-R0 */ br = vunpackhi16 (br, gb); /* B7-G7-R7-B6 B5-G5 R5-B4 */ gb = vsl (gb, 32); /* B3-G3 B1-G1 00 00 00 00 */ gb = vunpackhi16 (gb, rg); /* R3-B2 B3-G3 G2-R2-B1-G1 */ vstorent (dst, offset, vunpacklo32 (rg, gb)); /* G2-R2-B1-G1-R1-B0-G0-R0 */ gb = _mm_shuffle_pi16 (gb, _MM_SHUFFLE (1, 0, 2, 3)); /* G2-R2-B1-G1 B3-G3-R3-B2 */ t0 = vunpacklo16 (t0, br); /* B5-G5 G6-R6 R5-B4-G4-R4 */ t0 = _mm_shuffle_pi16 (t0, _MM_SHUFFLE (2, 3, 1, 0)); /* G6-R6-B5-G5 R5-B4-G4-R4 */ vstorent (dst, offset + 8, vunpacklo32 (gb, t0)); /* R5-B4-G4-R4-B3-G3-R3-B2 */ vstorent (dst, offset + 16, vunpackhi32 (t0, br)); /* B7-G7-R7-B6-G6-R6-B5-G5 */ #elif SIMD & (CPU_FEATURE_MMX | CPU_FEATURE_3DNOW) vu8 t0, t1; t0 = vsru (rg, 32); /* 00 00 00 00 G6-R6 G4-R4 */ rg = vunpacklo16 (rg, br); /* R3-B2 G2-R2 R1-B0-G0-R0 */ br = vunpackhi16 (br, gb); /* B7-G7-R7-B6 B5-G5 R5-B4 */ gb = vsl (gb, 32); /* B3-G3 B1-G1 00 00 00 00 */ t1 = vunpackhi16 (gb, rg); /* R3-B2 B3-G3 G2-R2-B1-G1 */ vstorent (dst, offset, vunpacklo32 (rg, t1)); /* G2-R2-B1-G1-R1-B0-G0-R0 */ t1 = vunpacklo16 (br, t0); /* G6-R6-B5-G5 G4-R4 R5-B4 */ vstorent (dst, offset + 16, vunpackhi32 (t1, br)); /* B7-G7-R7-B6-G6-R6-B5-G5 */ rg = vunpackhi16 (rg, gb); /* B3-G3-R3-B2 B1-G1 G2-R2 */ t0 = vunpacklo16 (t0, br); /* B5-G5 G6-R6 R5-B4-G4-R4 */ t0 = vsl (t0, 32); /* R5-B4-G4-R4 00 00 00 00 */ vstorent (dst, offset + 8, vunpackhi32 (rg, t0)); /* R5-B4-G4-R4-B3-G3-R3-B2 */ #endif } /* Stores 8/16 RGB pixels at dst + offset in the given pixfmt. saturate: saturate values outside 0 ... 255, otherwise msb = 0 assumed. re: (RE RC RA R8) R6 R4 R2 R0 ro: (RF RD RB R9) R7 R5 R3 R1 etc */ static always_inline void store_rgb16 (void * dst, unsigned long offset, const tv_pixfmt pixfmt, const tv_bool saturate, v16 re, v16 ro, v16 ge, v16 go, v16 be, v16 bo) { switch (pixfmt) { case TV_PIXFMT_BGRA32_LE: case TV_PIXFMT_BGRA32_BE: SWAP (re, be); /* optimizes away */ SWAP (ro, bo); /* fall through */ case TV_PIXFMT_RGBA32_LE: case TV_PIXFMT_RGBA32_BE: if (saturate) { vu8 r, g, b, a; vu8 rge, rgo, bae, bao; vu8 rgl, rgh, bal, bah; r = vpacksu16 (re, ro); /* RF/R7 .. R1 RE/R6 .. R0 */ g = vpacksu16 (ge, go); b = vpacksu16 (be, bo); a = vsplat8_m1; if (TV_PIXFMT_BGRA32_BE == pixfmt || TV_PIXFMT_RGBA32_BE == pixfmt) { SWAP (r, a); SWAP (g, b); } rge = vunpacklo8 (r, g); /* .. G2 R2 G0 R0 */ rgo = vunpackhi8 (r, g); rgl = vunpacklo16 (rge, rgo); /* .. G1 R1 G0 R0 */ rgh = vunpackhi16 (rge, rgo); bae = vunpacklo8 (b, a); bao = vunpackhi8 (b, a); bal = vunpacklo16 (bae, bao); /* .. FF B1 FF B0 */ bah = vunpackhi16 (bae, bao); /* .. FF B0 G0 R0 */ vstorent (dst, offset + 0 * sizeof (vu8), vunpacklo16 (rgl, bal)); vstorent (dst, offset + 1 * sizeof (vu8), vunpackhi16 (rgl, bal)); vstorent (dst, offset + 2 * sizeof (vu8), vunpacklo16 (rgh, bah)); vstorent (dst, offset + 3 * sizeof (vu8), vunpackhi16 (rgh, bah)); } else { vu8 rge, rgo, bae, bao; vu8 rgl, rgh, bal, bah; vu8 a; /* Already saturated. */ if (TV_PIXFMT_BGRA32_BE == pixfmt || TV_PIXFMT_RGBA32_BE == pixfmt) { SWAP (re, ge); SWAP (ro, go); rge = vor (re, vsl16 (ge, 8)); /* .. G0 R0 */ rgo = vor (ro, vsl16 (go, 8)); a = vsplat16_255; bae = vor (vsl16 (be, 8), a); /* .. B0 FF */ bao = vor (vsl16 (bo, 8), a); SWAP (rge, bae); SWAP (rgo, bao); } else { rge = vor (re, vsl16 (ge, 8)); rgo = vor (ro, vsl16 (go, 8)); a = vsplat16_m256; bae = vor (be, a); bao = vor (bo, a); } rgl = vunpacklo16 (rge, rgo); /* .. G1 R1 G0 R0 */ rgh = vunpackhi16 (rge, rgo); bal = vunpacklo16 (bae, bao); /* .. FF B1 FF B0 */ bah = vunpackhi16 (bae, bao); /* .. FF B0 G0 R0 */ vstorent (dst, offset + 0 * sizeof (vu8), vunpacklo16 (rgl, bal)); vstorent (dst, offset + 1 * sizeof (vu8), vunpackhi16 (rgl, bal)); vstorent (dst, offset + 2 * sizeof (vu8), vunpacklo16 (rgh, bah)); vstorent (dst, offset + 3 * sizeof (vu8), vunpackhi16 (rgh, bah)); } break; case TV_PIXFMT_BGR24_LE: SWAP (re, be); SWAP (ro, bo); /* fall through */ case TV_PIXFMT_RGB24_LE: if (saturate) { vu8 r, g, b, t; r = vpacksu16 (re, ro); /* RF/R7 .. R1 RE/R6 .. R0 */ g = vpacksu16 (ge, go); b = vpacksu16 (be, bo); t = vsru (r, sizeof (vu8) * 4); /* 00 .. 00 (RF RD RB R9) R7 R5 R3 R1 */ r = vunpacklo8 (r, g); /* (GE-RE GC-RC GA-RA G8-R8) G6-R6 G4-R4 G2-R2 G0-R0 */ g = vunpackhi8 (g, b); /* (BF-GF BD-GD BB-GB B9-G9) B7-G7 B5-G5 B3-G3 B1-G1 */ b = vunpacklo8 (b, t); /* (RF-BE RD-BC RB-BA R9-B8) R7-B6 R5-B4 R3-B2 R1-B0 */ store_rggbbr (dst, offset, r, g, b); } else { re = vor (re, vsl16 (ge, 8)); /* (GE-RE GC-RC GA-RA G8-R8) G6-R6 G4-R4 G2-R2 G0-R0 */ go = vor (go, vsl16 (bo, 8)); /* (BF-GF BD-GD BB-GB B9-G9) B7-G7 B5-G5 B3-G3 B1-G1 */ be = vor (be, vsl16 (ro, 8)); /* (RF-BE RD-BC RB-BA R9-B8) R7-B6 R5-B4 R3-B2 R1-B0 */ store_rggbbr (dst, offset, re, go, be); } break; case TV_PIXFMT_RGB16_LE: SWAP (re, be); SWAP (ro, bo); /* fall through */ case TV_PIXFMT_BGR16_LE: /* rrrrrggg gggbbbbb */ if (saturate) { /* NB there's no vsru8(). */ re = vand (vpacksu16 (re, ro), vsplatu8_F8); be = vsru (vand (vpacksu16 (be, bo), vsplatu8_F8), 3); ge = vand (vpacksu16 (ge, go), vsplatu8_FC); bo = vunpackhi8 (be, re); /* rrrrr000 000bbbbb */ be = vunpacklo8 (be, re); go = vunpackhi8 (ge, vzerou8 ()); bo = vor (bo, vsl16 (go, 3)); /* 00000ggg ggg00000 */ ge = vunpacklo8 (ge, vzerou8 ()); be = vor (be, vsl16 (ge, 3)); } else { be = vsru16 (be, 3); be = vor (be, vsl16 (vand (re, vsplatu16_F8), 8)); be = vor (be, vsl16 (vsru16 (ge, 2), 3 + 2)); bo = vsru16 (bo, 3); bo = vor (bo, vsl16 (vand (ro, vsplatu16_F8), 8)); bo = vor (bo, vsl16 (vsru16 (go, 2), 3 + 2)); } vstorent (dst, offset, vunpacklo16 (be, bo)); vstorent (dst, offset + sizeof (vu8), vunpackhi16 (be, bo)); break; case TV_PIXFMT_RGB16_BE: SWAP (re, be); SWAP (ro, bo); /* fall through */ case TV_PIXFMT_BGR16_BE:/* gggbbbbb rrrrrggg */ if (saturate) { re = vand (vpacksu16 (re, ro), vsplatu8_F8); be = vsru (vand (vpacksu16 (be, bo), vsplatu8_F8), 3); ge = vand (vpacksu16 (ge, go), vsplatu8_FC); ro = vunpackhi8 (re, be); /* 000bbbbb rrrrr000 */ re = vunpacklo8 (re, be); go = vunpackhi8 (ge, vzerou8 ()); ro = vor (ro, vsru16 (go, 5)); ro = vor (ro, vsl16 (go, 16 - 5)); ge = vunpacklo8 (ge, vzerou8 ()); re = vor (re, vsru16 (ge, 5)); re = vor (re, vsl16 (ge, 16 - 5)); } else { re = vand (re, vsplatu16_F8); re = vor (re, vsl16 (vand (be, vsplatu16_F8), 5)); re = vor (re, vsru16 (ge, 5)); re = vor (re, vsl16 (vsru16 (ge, 2), 8 + 5)); ro = vand (ro, vsplatu16_F8); ro = vor (ro, vsl16 (vand (bo, vsplatu16_F8), 5)); ro = vor (ro, vsru16 (go, 5)); ro = vor (ro, vsl16 (vsru16 (go, 2), 8 + 5)); } vstorent (dst, offset, vunpacklo16 (re, ro)); vstorent (dst, offset + sizeof (vu8), vunpackhi16 (re, ro)); break; case TV_PIXFMT_RGBA16_LE: SWAP (re, be); SWAP (ro, bo); /* fall through */ case TV_PIXFMT_BGRA16_LE: /* arrrrrgg gggbbbbb */ if (saturate) { vu8 _20 = vsplatu8 (0x20); re = vsru (vand (vpacksu16 (re, ro), vsplatu8_F8), 1); be = vsru (vand (vpacksu16 (be, bo), vsplatu8_F8), 3); ge = vand (vpacksu16 (ge, go), vsplatu8_F8); bo = vunpackhi8 (be, re); /* 0rrrrr00 000bbbbb */ be = vunpacklo8 (be, re); bo = vor (bo, vsl16 (vunpackhi8 (ge, _20), 2)); be = vor (be, vsl16 (vunpacklo8 (ge, _20), 2)); } else { be = vsru16 (be, 3); re = vor (re, vsplatu16_256); be = vor (be, vsl16 (vsru16 (re, 3), 7 + 3)); be = vor (be, vsl (vand (ge, vsplatu16_F8), 2)); bo = vsru16 (bo, 3); ro = vor (ro, vsplatu16_256); bo = vor (bo, vsl16 (vsru16 (ro, 3), 7 + 3)); bo = vor (bo, vsl (vand (go, vsplatu16_F8), 2)); } vstorent (dst, offset, vunpacklo16 (be, bo)); vstorent (dst, offset + sizeof (vu8), vunpackhi16 (be, bo)); break; case TV_PIXFMT_RGBA16_BE: SWAP (re, be); SWAP (ro, bo); /* fall through */ case TV_PIXFMT_BGRA16_BE: /* gggbbbbb arrrrrgg */ if (saturate) { vu8 _20 = vsplatu8 (0x20); re = vsru (vand (vpacksu16 (re, ro), vsplatu8_F8), 1); be = vsru (vand (vpacksu16 (be, bo), vsplatu8_F8), 3); ge = vand (vpacksu16 (ge, go), vsplatu8_F8); ro = vunpackhi8 (re, be); /* 000bbbbb 0rrrrr00 */ re = vunpacklo8 (re, be); go = vunpackhi8 (ge, _20); /* 00100000 ggggg000 */ ro = vor (ro, vsru16 (go, 6)); ro = vor (ro, vsl16 (go, 16 - 6)); ge = vunpacklo8 (ge, _20); re = vor (re, vsru16 (ge, 6)); re = vor (re, vsl16 (ge, 16 - 6)); } else { re = vand (re, vsplatu16_F8); re = vsru16 (vor (re, vsplatu16_256), 1); re = vor (re, vsl16 (vand (be, vsplatu16_F8), 5)); re = vor (re, vsl16 (vand (ge, vsplatu16_F8), 8 + 2)); re = vor (re, vsru16 (ge, 6)); ro = vand (ro, vsplatu16_F8); ro = vsru16 (vor (ro, vsplatu16_256), 1); ro = vor (ro, vsl16 (vand (bo, vsplatu16_F8), 5)); ro = vor (ro, vsl16 (vand (go, vsplatu16_F8), 8 + 2)); ro = vor (ro, vsru16 (go, 6)); } vstorent (dst, offset, vunpacklo16 (re, ro)); vstorent (dst, offset + sizeof (vu8), vunpackhi16 (re, ro)); break; default: assert (0); } } /* Fast but inaccurate conversion of 8/16 YUV 4:2:2 pixels or if b.. != NULL 2 x 8/16 YUV 4:2:0 pixels to RGB. e/o: even/odd samples. t/b: top/bottom row. */ static always_inline void fast_yuv2rgb (v16 * tre, v16 * tro, v16 * tge, v16 * tgo, v16 * tbe, v16 * tbo, v16 * bre, v16 * bro, v16 * bge, v16 * bgo, v16 * bbe, v16 * bbo, v16 tye, v16 tyo, v16 bye, v16 byo, v16 u, v16 v) { v16 bias, cr, cg, cb; bias = vsplat16_128; u = vsl16 (vsub16 (u, bias), 16 - GU_BU_SH); v = vsl16 (vsub16 (v, bias), 16 - RV_GV_SH); cb = vmulhi16 (u, _tv_vsplat16_yuv2rgb_bu); cr = vmulhi16 (v, _tv_vsplat16_yuv2rgb_rv); cg = vadd16 (vmulhi16 (u, _tv_vsplat16_yuv2rgb_gu), vmulhi16 (v, _tv_vsplat16_yuv2rgb_gv)); bias = vsru16 (bias, 3); /* vsplat16 (16); */ tye = vmulhi16 (vsl16 (vsub16 (tye, bias), 16 - CY_SH), _tv_vsplat16_yuv2rgb_cy); tyo = vmulhi16 (vsl16 (vsub16 (tyo, bias), 16 - CY_SH), _tv_vsplat16_yuv2rgb_cy); *tre = vadd16 (tye, cr); *tro = vadd16 (tyo, cr); *tge = vsub16 (tye, cg); *tgo = vsub16 (tyo, cg); *tbe = vadd16 (tye, cb); *tbo = vadd16 (tyo, cb); if (NULL != bre) { bye = vmulhi16 (vsl16 (vsub16 (bye, bias), 16 - CY_SH), _tv_vsplat16_yuv2rgb_cy); byo = vmulhi16 (vsl16 (vsub16 (byo, bias), 16 - CY_SH), _tv_vsplat16_yuv2rgb_cy); *bre = vadd16 (bye, cr); *bro = vadd16 (byo, cr); *bge = vsub16 (bye, cg); *bgo = vsub16 (byo, cg); *bbe = vadd16 (bye, cb); *bbo = vadd16 (byo, cb); } } #endif /* SIMD != ALTIVEC */ #endif /* SIMD */ zapping-0.10cvs6/libtv/macros.h 644 764 144 3310 10410046602 11550 /* * Copyright (C) 2001-2004 Michael H. Schimek * Copyright (C) 2000-2003 Iaki Garca Etxebarria * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* $Id: macros.h,v 1.4 2006/03/21 19:01:22 mschimek Exp $ */ #ifndef __ZTV_MACROS_H__ #define __ZTV_MACROS_H__ #ifdef __cplusplus # define TV_BEGIN_DECLS extern "C" { # define TV_END_DECLS } #else # define TV_BEGIN_DECLS # define TV_END_DECLS #endif TV_BEGIN_DECLS #if __GNUC__ >= 4 # define _tv_sentinel sentinel(0) #else # define _tv_sentinel # define __restrict__ #endif #if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || __GNUC__ >= 4 # define _tv_nonnull(args...) nonnull(args) #else # define _tv_nonnull(args...) #endif #if __GNUC__ >= 2 # define tv_inline static __inline__ #else # define tv_inline static # define __attribute__(args...) #endif #ifndef TRUE # define TRUE 1 #endif #ifndef FALSE # define FALSE 0 #endif typedef int tv_bool; #ifndef NULL # ifdef __cplusplus # define NULL (0L) # else # define NULL ((void*)0) # endif #endif TV_END_DECLS #endif /* __ZTV_MACROS_H__ */ zapping-0.10cvs6/libtv/image_format.c 644 764 144 13745 10432662455 12764 /* * Copyright (C) 2001-2004 Michael H. Schimek * Copyright (C) 2000-2003 Iaki Garca Etxebarria * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* $Id: image_format.c,v 1.20 2006/05/17 18:02:21 mschimek Exp $ */ #include /* memset() */ #include #include "misc.h" #include "image_format.h" void _tv_image_format_dump (const tv_image_format *format, FILE * fp) { assert (NULL != format); fprintf (fp, "width=%u height=%u " "offset=%lu,%lu,%lu,%lu bpl=%lu,%lu,%lu,%lu " "size=%lu pixfmt=%s", format->width, format->height, format->offset[0], format->offset[1], format->offset[2], format->offset[3], format->bytes_per_line[0], format->bytes_per_line[1], format->bytes_per_line[2], format->bytes_per_line[3], format->size, format->pixel_format->name); } tv_bool tv_image_format_init (tv_image_format * format, unsigned int width, unsigned int height, unsigned long bytes_per_line, tv_pixfmt pixfmt, tv_colspc colspc) { const tv_pixel_format *pf; unsigned long min_bpl; assert (NULL != format); if (!(pf = tv_pixel_format_from_pixfmt (pixfmt))) return FALSE; if (0 == width || 0 == height) return FALSE; width = (width + pf->hmask) & ~pf->hmask; height = (height + pf->vmask) & ~pf->vmask; min_bpl = (width * pf->bits_per_pixel + 7) >> 3; if (0 == bytes_per_line) { bytes_per_line = min_bpl; } else if (bytes_per_line < min_bpl) { return FALSE; } format->width = width; format->height = height; format->bytes_per_line[0] = bytes_per_line; format->offset[0] = 0; if (pf->n_planes > 1) { unsigned long uv_bpl; unsigned long y_size; unsigned long uv_size; /* No padding. */ uv_bpl = format->bytes_per_line[0] >> pf->uv_hshift; y_size = format->bytes_per_line[0] * height; uv_size = y_size >> (pf->uv_hshift + pf->uv_vshift); switch (pixfmt) { case TV_PIXFMT_NV12: case TV_PIXFMT_HM12: format->bytes_per_line[1] = uv_bpl; format->bytes_per_line[2] = 0; format->bytes_per_line[3] = 0; format->offset[1] = y_size; format->offset[2] = 0; format->offset[3] = 0; format->size = y_size + uv_size; break; default: format->bytes_per_line[1] = uv_bpl; format->bytes_per_line[2] = uv_bpl; format->bytes_per_line[3] = 0; if (pf->vu_order) { format->offset[1] = y_size + uv_size; format->offset[2] = y_size; } else { format->offset[1] = y_size; format->offset[2] = y_size + uv_size; } format->offset[3] = 0; format->size = y_size + uv_size * 2; break; } } else { format->bytes_per_line[1] = 0; format->bytes_per_line[2] = 0; format->bytes_per_line[3] = 0; format->offset[1] = 0; format->offset[2] = 0; format->offset[3] = 0; format->size = format->bytes_per_line[0] * height; } format->pixel_format = tv_pixel_format_from_pixfmt (pixfmt); format->colspc = colspc; return TRUE; } tv_bool tv_image_format_is_valid (const tv_image_format *format) { const tv_pixel_format *pf; unsigned long min_size[3]; unsigned long min_bpl; assert (NULL != format); pf = format->pixel_format; if (0 == format->width || 0 == format->height) return FALSE; if (0 != ((format->width & pf->hmask) | (format->height & pf->vmask))) return FALSE; min_bpl = (format->width * pf->bits_per_pixel + 7) >> 3; if (format->bytes_per_line[0] < min_bpl) return FALSE; /* We don't enforce bytes_per_line padding on the last line, in case offset and bytes_per_line were adjusted for cropping. */ min_size[0] = format->bytes_per_line[0] * (format->height - 1) + min_bpl; if (pf->n_planes > 1) { unsigned int order[3]; unsigned long min_uv_bpl; /* U and V bits_per_pixel assumed 8. */ min_uv_bpl = format->width >> pf->uv_hshift; if (format->bytes_per_line[1] < min_uv_bpl) return FALSE; /* We don't enforce bytes_per_line padding on the last line. */ min_size[1] = format->bytes_per_line[1] * ((format->height >> pf->uv_vshift) - 1) + min_uv_bpl; order[0] = (format->offset[1] < format->offset[0]); order[1] = order[0] ^ 1; order[2] = 2; if (pf->n_planes > 2) { if (format->bytes_per_line[2] < min_uv_bpl) return FALSE; min_size[2] = format->bytes_per_line[2] * ((format->height >> pf->uv_vshift) - 1) + min_uv_bpl; if (format->offset[2] < format->offset[order[1]]) { order[2] = order[1]; if (format->offset[2] < format->offset[order[0]]) { order[1] = order[0]; order[0] = 2; } else { order[1] = 2; } } /* Enforce plane order, planes must not overlap and must fit in buffer. */ if (format->offset[order[2]] + min_size[order[2]] > format->size) return FALSE; } if (format->offset[order[1]] + min_size[order[1]] > format->offset[order[2]]) return FALSE; if (format->offset[order[0]] + min_size[order[0]] > format->offset[order[1]]) return FALSE; } else { if (format->offset[0] + min_size[0] > format->size) return FALSE; } return TRUE; } void * tv_new_image (const void * src_image, const tv_image_format *src_format) { void *dst_image; assert (NULL != src_format); assert (src_format->size > 0); dst_image = malloc (src_format->size); if (dst_image && src_image) { if (!tv_copy_image (dst_image, src_format, src_image, src_format)) { free (dst_image); dst_image = NULL; } } return dst_image; } zapping-0.10cvs6/libtv/image_format.h 644 764 144 6762 10402712415 12737 /* * Copyright (C) 2001-2004 Michael H. Schimek * Copyright (C) 2000-2003 Iaki Garca Etxebarria * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* $Id: image_format.h,v 1.10 2006/03/06 01:49:01 mschimek Exp $ */ #ifndef __ZTV_IMAGE_FORMAT_H__ #define __ZTV_IMAGE_FORMAT_H__ #include /* FILE */ #include /* free() */ #include "pixel_format.h" TV_BEGIN_DECLS typedef enum { TV_FIELD_UNKNOWN = 0, TV_FIELD_PROGRESSIVE, TV_FIELD_INTERLACED, TV_FIELD_SEQUENTIAL, TV_FIELD_TOP, TV_FIELD_BOTTOM, } tv_field; typedef struct { /* Image width in pixels. For planar formats this refers to the largest plane. For YUV formats this must be a multiple of 1 << tv_pixel_format.uv_hscale. */ unsigned int width; /* Image height in pixels. For planar formats this refers to the largest plane. For YUV formats this must be a multiple of 1 << tv_pixel_format.uv_vscale. */ unsigned int height; /* Offset in bytes from the buffer start to the top left pixel of the first, second, third and fourth plane. */ unsigned long offset[4]; /* Bytes per line of the first, second, third and fourth plane. Must be bytes_per_line[i] >= (plane width * bits per pixel + 7) / 8. */ unsigned long bytes_per_line[4]; /* Buffer size. All planes must fit within this size: offset[i] + (plane height - 1) * bytes_per_line[i] + (plane width * bits per pixel + 7) / 8 <= size. */ /* XXX does this really belong here? Or rather in a buffer structure. */ unsigned long size; const tv_pixel_format * pixel_format; tv_colspc colspc; tv_field field; } tv_image_format; extern tv_bool tv_image_format_init (tv_image_format * format, unsigned int width, unsigned int height, unsigned long bytes_per_line, tv_pixfmt pixfmt, tv_colspc colspc) __attribute__ ((_tv_nonnull (1))); extern tv_bool tv_image_format_is_valid (const tv_image_format *format) __attribute__ ((_tv_nonnull (1))); extern void _tv_image_format_dump (const tv_image_format *format, FILE * fp) __attribute__ ((_tv_nonnull (1, 2))); extern tv_bool tv_clear_image (void * image, const tv_image_format *format) __attribute__ ((_tv_nonnull (1, 2))); extern void tv_memcpy (void * dst, const void * src, size_t n_bytes) __attribute__ ((_tv_nonnull (1, 2))); extern tv_bool tv_copy_image (void * dst_image, const tv_image_format *dst_format, const void * src_image, const tv_image_format *src_format) __attribute__ ((_tv_nonnull (1, 2))); /* Replace free() by a more descriptive name for documentation purposes. */ static __inline__ void tv_delete_image (void * image) { free (image); } extern void * tv_new_image (const void * src_image, const tv_image_format *src_format) __attribute__ ((malloc, _tv_nonnull (2))); TV_END_DECLS #endif /* __ZTV_IMAGE_FORMAT_H__ */ zapping-0.10cvs6/libtv/lut_rgb16.c 644 764 144 63324 10442576140 12131 /* Generated file, do not edit! */ #include const uint16_t _tv_lut_rgb16 [2][6][256] = { { { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1800, 0x1800, 0x1800, 0x1800, 0x1800, 0x1800, 0x1800, 0x1800, 0x2000, 0x2000, 0x2000, 0x2000, 0x2000, 0x2000, 0x2000, 0x2000, 0x2800, 0x2800, 0x2800, 0x2800, 0x2800, 0x2800, 0x2800, 0x2800, 0x3000, 0x3000, 0x3000, 0x3000, 0x3000, 0x3000, 0x3000, 0x3000, 0x3800, 0x3800, 0x3800, 0x3800, 0x3800, 0x3800, 0x3800, 0x3800, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4800, 0x4800, 0x4800, 0x4800, 0x4800, 0x4800, 0x4800, 0x4800, 0x5000, 0x5000, 0x5000, 0x5000, 0x5000, 0x5000, 0x5000, 0x5000, 0x5800, 0x5800, 0x5800, 0x5800, 0x5800, 0x5800, 0x5800, 0x5800, 0x6000, 0x6000, 0x6000, 0x6000, 0x6000, 0x6000, 0x6000, 0x6000, 0x6800, 0x6800, 0x6800, 0x6800, 0x6800, 0x6800, 0x6800, 0x6800, 0x7000, 0x7000, 0x7000, 0x7000, 0x7000, 0x7000, 0x7000, 0x7000, 0x7800, 0x7800, 0x7800, 0x7800, 0x7800, 0x7800, 0x7800, 0x7800, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8800, 0x8800, 0x8800, 0x8800, 0x8800, 0x8800, 0x8800, 0x8800, 0x9000, 0x9000, 0x9000, 0x9000, 0x9000, 0x9000, 0x9000, 0x9000, 0x9800, 0x9800, 0x9800, 0x9800, 0x9800, 0x9800, 0x9800, 0x9800, 0xa000, 0xa000, 0xa000, 0xa000, 0xa000, 0xa000, 0xa000, 0xa000, 0xa800, 0xa800, 0xa800, 0xa800, 0xa800, 0xa800, 0xa800, 0xa800, 0xb000, 0xb000, 0xb000, 0xb000, 0xb000, 0xb000, 0xb000, 0xb000, 0xb800, 0xb800, 0xb800, 0xb800, 0xb800, 0xb800, 0xb800, 0xb800, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc800, 0xc800, 0xc800, 0xc800, 0xc800, 0xc800, 0xc800, 0xc800, 0xd000, 0xd000, 0xd000, 0xd000, 0xd000, 0xd000, 0xd000, 0xd000, 0xd800, 0xd800, 0xd800, 0xd800, 0xd800, 0xd800, 0xd800, 0xd800, 0xe000, 0xe000, 0xe000, 0xe000, 0xe000, 0xe000, 0xe000, 0xe000, 0xe800, 0xe800, 0xe800, 0xe800, 0xe800, 0xe800, 0xe800, 0xe800, 0xf000, 0xf000, 0xf000, 0xf000, 0xf000, 0xf000, 0xf000, 0xf000, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, 0xf800, }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0400, 0x0400, 0x0400, 0x0400, 0x0400, 0x0400, 0x0400, 0x0400, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0c00, 0x0c00, 0x0c00, 0x0c00, 0x0c00, 0x0c00, 0x0c00, 0x0c00, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1400, 0x1400, 0x1400, 0x1400, 0x1400, 0x1400, 0x1400, 0x1400, 0x1800, 0x1800, 0x1800, 0x1800, 0x1800, 0x1800, 0x1800, 0x1800, 0x1c00, 0x1c00, 0x1c00, 0x1c00, 0x1c00, 0x1c00, 0x1c00, 0x1c00, 0x2000, 0x2000, 0x2000, 0x2000, 0x2000, 0x2000, 0x2000, 0x2000, 0x2400, 0x2400, 0x2400, 0x2400, 0x2400, 0x2400, 0x2400, 0x2400, 0x2800, 0x2800, 0x2800, 0x2800, 0x2800, 0x2800, 0x2800, 0x2800, 0x2c00, 0x2c00, 0x2c00, 0x2c00, 0x2c00, 0x2c00, 0x2c00, 0x2c00, 0x3000, 0x3000, 0x3000, 0x3000, 0x3000, 0x3000, 0x3000, 0x3000, 0x3400, 0x3400, 0x3400, 0x3400, 0x3400, 0x3400, 0x3400, 0x3400, 0x3800, 0x3800, 0x3800, 0x3800, 0x3800, 0x3800, 0x3800, 0x3800, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4400, 0x4400, 0x4400, 0x4400, 0x4400, 0x4400, 0x4400, 0x4400, 0x4800, 0x4800, 0x4800, 0x4800, 0x4800, 0x4800, 0x4800, 0x4800, 0x4c00, 0x4c00, 0x4c00, 0x4c00, 0x4c00, 0x4c00, 0x4c00, 0x4c00, 0x5000, 0x5000, 0x5000, 0x5000, 0x5000, 0x5000, 0x5000, 0x5000, 0x5400, 0x5400, 0x5400, 0x5400, 0x5400, 0x5400, 0x5400, 0x5400, 0x5800, 0x5800, 0x5800, 0x5800, 0x5800, 0x5800, 0x5800, 0x5800, 0x5c00, 0x5c00, 0x5c00, 0x5c00, 0x5c00, 0x5c00, 0x5c00, 0x5c00, 0x6000, 0x6000, 0x6000, 0x6000, 0x6000, 0x6000, 0x6000, 0x6000, 0x6400, 0x6400, 0x6400, 0x6400, 0x6400, 0x6400, 0x6400, 0x6400, 0x6800, 0x6800, 0x6800, 0x6800, 0x6800, 0x6800, 0x6800, 0x6800, 0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x6c00, 0x7000, 0x7000, 0x7000, 0x7000, 0x7000, 0x7000, 0x7000, 0x7000, 0x7400, 0x7400, 0x7400, 0x7400, 0x7400, 0x7400, 0x7400, 0x7400, 0x7800, 0x7800, 0x7800, 0x7800, 0x7800, 0x7800, 0x7800, 0x7800, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, 0x7c00, }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0020, 0x0020, 0x0020, 0x0020, 0x0040, 0x0040, 0x0040, 0x0040, 0x0060, 0x0060, 0x0060, 0x0060, 0x0080, 0x0080, 0x0080, 0x0080, 0x00a0, 0x00a0, 0x00a0, 0x00a0, 0x00c0, 0x00c0, 0x00c0, 0x00c0, 0x00e0, 0x00e0, 0x00e0, 0x00e0, 0x0100, 0x0100, 0x0100, 0x0100, 0x0120, 0x0120, 0x0120, 0x0120, 0x0140, 0x0140, 0x0140, 0x0140, 0x0160, 0x0160, 0x0160, 0x0160, 0x0180, 0x0180, 0x0180, 0x0180, 0x01a0, 0x01a0, 0x01a0, 0x01a0, 0x01c0, 0x01c0, 0x01c0, 0x01c0, 0x01e0, 0x01e0, 0x01e0, 0x01e0, 0x0200, 0x0200, 0x0200, 0x0200, 0x0220, 0x0220, 0x0220, 0x0220, 0x0240, 0x0240, 0x0240, 0x0240, 0x0260, 0x0260, 0x0260, 0x0260, 0x0280, 0x0280, 0x0280, 0x0280, 0x02a0, 0x02a0, 0x02a0, 0x02a0, 0x02c0, 0x02c0, 0x02c0, 0x02c0, 0x02e0, 0x02e0, 0x02e0, 0x02e0, 0x0300, 0x0300, 0x0300, 0x0300, 0x0320, 0x0320, 0x0320, 0x0320, 0x0340, 0x0340, 0x0340, 0x0340, 0x0360, 0x0360, 0x0360, 0x0360, 0x0380, 0x0380, 0x0380, 0x0380, 0x03a0, 0x03a0, 0x03a0, 0x03a0, 0x03c0, 0x03c0, 0x03c0, 0x03c0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x0400, 0x0400, 0x0400, 0x0400, 0x0420, 0x0420, 0x0420, 0x0420, 0x0440, 0x0440, 0x0440, 0x0440, 0x0460, 0x0460, 0x0460, 0x0460, 0x0480, 0x0480, 0x0480, 0x0480, 0x04a0, 0x04a0, 0x04a0, 0x04a0, 0x04c0, 0x04c0, 0x04c0, 0x04c0, 0x04e0, 0x04e0, 0x04e0, 0x04e0, 0x0500, 0x0500, 0x0500, 0x0500, 0x0520, 0x0520, 0x0520, 0x0520, 0x0540, 0x0540, 0x0540, 0x0540, 0x0560, 0x0560, 0x0560, 0x0560, 0x0580, 0x0580, 0x0580, 0x0580, 0x05a0, 0x05a0, 0x05a0, 0x05a0, 0x05c0, 0x05c0, 0x05c0, 0x05c0, 0x05e0, 0x05e0, 0x05e0, 0x05e0, 0x0600, 0x0600, 0x0600, 0x0600, 0x0620, 0x0620, 0x0620, 0x0620, 0x0640, 0x0640, 0x0640, 0x0640, 0x0660, 0x0660, 0x0660, 0x0660, 0x0680, 0x0680, 0x0680, 0x0680, 0x06a0, 0x06a0, 0x06a0, 0x06a0, 0x06c0, 0x06c0, 0x06c0, 0x06c0, 0x06e0, 0x06e0, 0x06e0, 0x06e0, 0x0700, 0x0700, 0x0700, 0x0700, 0x0720, 0x0720, 0x0720, 0x0720, 0x0740, 0x0740, 0x0740, 0x0740, 0x0760, 0x0760, 0x0760, 0x0760, 0x0780, 0x0780, 0x0780, 0x0780, 0x07a0, 0x07a0, 0x07a0, 0x07a0, 0x07c0, 0x07c0, 0x07c0, 0x07c0, 0x07e0, 0x07e0, 0x07e0, 0x07e0, }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0040, 0x0040, 0x0040, 0x0040, 0x0040, 0x0040, 0x0040, 0x0040, 0x0060, 0x0060, 0x0060, 0x0060, 0x0060, 0x0060, 0x0060, 0x0060, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x00a0, 0x00a0, 0x00a0, 0x00a0, 0x00a0, 0x00a0, 0x00a0, 0x00a0, 0x00c0, 0x00c0, 0x00c0, 0x00c0, 0x00c0, 0x00c0, 0x00c0, 0x00c0, 0x00e0, 0x00e0, 0x00e0, 0x00e0, 0x00e0, 0x00e0, 0x00e0, 0x00e0, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0120, 0x0120, 0x0120, 0x0120, 0x0120, 0x0120, 0x0120, 0x0120, 0x0140, 0x0140, 0x0140, 0x0140, 0x0140, 0x0140, 0x0140, 0x0140, 0x0160, 0x0160, 0x0160, 0x0160, 0x0160, 0x0160, 0x0160, 0x0160, 0x0180, 0x0180, 0x0180, 0x0180, 0x0180, 0x0180, 0x0180, 0x0180, 0x01a0, 0x01a0, 0x01a0, 0x01a0, 0x01a0, 0x01a0, 0x01a0, 0x01a0, 0x01c0, 0x01c0, 0x01c0, 0x01c0, 0x01c0, 0x01c0, 0x01c0, 0x01c0, 0x01e0, 0x01e0, 0x01e0, 0x01e0, 0x01e0, 0x01e0, 0x01e0, 0x01e0, 0x0200, 0x0200, 0x0200, 0x0200, 0x0200, 0x0200, 0x0200, 0x0200, 0x0220, 0x0220, 0x0220, 0x0220, 0x0220, 0x0220, 0x0220, 0x0220, 0x0240, 0x0240, 0x0240, 0x0240, 0x0240, 0x0240, 0x0240, 0x0240, 0x0260, 0x0260, 0x0260, 0x0260, 0x0260, 0x0260, 0x0260, 0x0260, 0x0280, 0x0280, 0x0280, 0x0280, 0x0280, 0x0280, 0x0280, 0x0280, 0x02a0, 0x02a0, 0x02a0, 0x02a0, 0x02a0, 0x02a0, 0x02a0, 0x02a0, 0x02c0, 0x02c0, 0x02c0, 0x02c0, 0x02c0, 0x02c0, 0x02c0, 0x02c0, 0x02e0, 0x02e0, 0x02e0, 0x02e0, 0x02e0, 0x02e0, 0x02e0, 0x02e0, 0x0300, 0x0300, 0x0300, 0x0300, 0x0300, 0x0300, 0x0300, 0x0300, 0x0320, 0x0320, 0x0320, 0x0320, 0x0320, 0x0320, 0x0320, 0x0320, 0x0340, 0x0340, 0x0340, 0x0340, 0x0340, 0x0340, 0x0340, 0x0340, 0x0360, 0x0360, 0x0360, 0x0360, 0x0360, 0x0360, 0x0360, 0x0360, 0x0380, 0x0380, 0x0380, 0x0380, 0x0380, 0x0380, 0x0380, 0x0380, 0x03a0, 0x03a0, 0x03a0, 0x03a0, 0x03a0, 0x03a0, 0x03a0, 0x03a0, 0x03c0, 0x03c0, 0x03c0, 0x03c0, 0x03c0, 0x03c0, 0x03c0, 0x03c0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, 0x03e0, }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0005, 0x0005, 0x0005, 0x0005, 0x0005, 0x0005, 0x0005, 0x0005, 0x0006, 0x0006, 0x0006, 0x0006, 0x0006, 0x0006, 0x0006, 0x0006, 0x0007, 0x0007, 0x0007, 0x0007, 0x0007, 0x0007, 0x0007, 0x0007, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0009, 0x0009, 0x0009, 0x0009, 0x0009, 0x0009, 0x0009, 0x0009, 0x000a, 0x000a, 0x000a, 0x000a, 0x000a, 0x000a, 0x000a, 0x000a, 0x000b, 0x000b, 0x000b, 0x000b, 0x000b, 0x000b, 0x000b, 0x000b, 0x000c, 0x000c, 0x000c, 0x000c, 0x000c, 0x000c, 0x000c, 0x000c, 0x000d, 0x000d, 0x000d, 0x000d, 0x000d, 0x000d, 0x000d, 0x000d, 0x000e, 0x000e, 0x000e, 0x000e, 0x000e, 0x000e, 0x000e, 0x000e, 0x000f, 0x000f, 0x000f, 0x000f, 0x000f, 0x000f, 0x000f, 0x000f, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0011, 0x0011, 0x0011, 0x0011, 0x0011, 0x0011, 0x0011, 0x0011, 0x0012, 0x0012, 0x0012, 0x0012, 0x0012, 0x0012, 0x0012, 0x0012, 0x0013, 0x0013, 0x0013, 0x0013, 0x0013, 0x0013, 0x0013, 0x0013, 0x0014, 0x0014, 0x0014, 0x0014, 0x0014, 0x0014, 0x0014, 0x0014, 0x0015, 0x0015, 0x0015, 0x0015, 0x0015, 0x0015, 0x0015, 0x0015, 0x0016, 0x0016, 0x0016, 0x0016, 0x0016, 0x0016, 0x0016, 0x0016, 0x0017, 0x0017, 0x0017, 0x0017, 0x0017, 0x0017, 0x0017, 0x0017, 0x0018, 0x0018, 0x0018, 0x0018, 0x0018, 0x0018, 0x0018, 0x0018, 0x0019, 0x0019, 0x0019, 0x0019, 0x0019, 0x0019, 0x0019, 0x0019, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001b, 0x001b, 0x001b, 0x001b, 0x001b, 0x001b, 0x001b, 0x001b, 0x001c, 0x001c, 0x001c, 0x001c, 0x001c, 0x001c, 0x001c, 0x001c, 0x001d, 0x001d, 0x001d, 0x001d, 0x001d, 0x001d, 0x001d, 0x001d, 0x001e, 0x001e, 0x001e, 0x001e, 0x001e, 0x001e, 0x001e, 0x001e, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, 0x001f, }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, }, }, { { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0018, 0x0018, 0x0018, 0x0018, 0x0018, 0x0018, 0x0018, 0x0018, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0028, 0x0028, 0x0028, 0x0028, 0x0028, 0x0028, 0x0028, 0x0028, 0x0030, 0x0030, 0x0030, 0x0030, 0x0030, 0x0030, 0x0030, 0x0030, 0x0038, 0x0038, 0x0038, 0x0038, 0x0038, 0x0038, 0x0038, 0x0038, 0x0040, 0x0040, 0x0040, 0x0040, 0x0040, 0x0040, 0x0040, 0x0040, 0x0048, 0x0048, 0x0048, 0x0048, 0x0048, 0x0048, 0x0048, 0x0048, 0x0050, 0x0050, 0x0050, 0x0050, 0x0050, 0x0050, 0x0050, 0x0050, 0x0058, 0x0058, 0x0058, 0x0058, 0x0058, 0x0058, 0x0058, 0x0058, 0x0060, 0x0060, 0x0060, 0x0060, 0x0060, 0x0060, 0x0060, 0x0060, 0x0068, 0x0068, 0x0068, 0x0068, 0x0068, 0x0068, 0x0068, 0x0068, 0x0070, 0x0070, 0x0070, 0x0070, 0x0070, 0x0070, 0x0070, 0x0070, 0x0078, 0x0078, 0x0078, 0x0078, 0x0078, 0x0078, 0x0078, 0x0078, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0088, 0x0088, 0x0088, 0x0088, 0x0088, 0x0088, 0x0088, 0x0088, 0x0090, 0x0090, 0x0090, 0x0090, 0x0090, 0x0090, 0x0090, 0x0090, 0x0098, 0x0098, 0x0098, 0x0098, 0x0098, 0x0098, 0x0098, 0x0098, 0x00a0, 0x00a0, 0x00a0, 0x00a0, 0x00a0, 0x00a0, 0x00a0, 0x00a0, 0x00a8, 0x00a8, 0x00a8, 0x00a8, 0x00a8, 0x00a8, 0x00a8, 0x00a8, 0x00b0, 0x00b0, 0x00b0, 0x00b0, 0x00b0, 0x00b0, 0x00b0, 0x00b0, 0x00b8, 0x00b8, 0x00b8, 0x00b8, 0x00b8, 0x00b8, 0x00b8, 0x00b8, 0x00c0, 0x00c0, 0x00c0, 0x00c0, 0x00c0, 0x00c0, 0x00c0, 0x00c0, 0x00c8, 0x00c8, 0x00c8, 0x00c8, 0x00c8, 0x00c8, 0x00c8, 0x00c8, 0x00d0, 0x00d0, 0x00d0, 0x00d0, 0x00d0, 0x00d0, 0x00d0, 0x00d0, 0x00d8, 0x00d8, 0x00d8, 0x00d8, 0x00d8, 0x00d8, 0x00d8, 0x00d8, 0x00e0, 0x00e0, 0x00e0, 0x00e0, 0x00e0, 0x00e0, 0x00e0, 0x00e0, 0x00e8, 0x00e8, 0x00e8, 0x00e8, 0x00e8, 0x00e8, 0x00e8, 0x00e8, 0x00f0, 0x00f0, 0x00f0, 0x00f0, 0x00f0, 0x00f0, 0x00f0, 0x00f0, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, 0x00f8, }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x000c, 0x000c, 0x000c, 0x000c, 0x000c, 0x000c, 0x000c, 0x000c, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0014, 0x0014, 0x0014, 0x0014, 0x0014, 0x0014, 0x0014, 0x0014, 0x0018, 0x0018, 0x0018, 0x0018, 0x0018, 0x0018, 0x0018, 0x0018, 0x001c, 0x001c, 0x001c, 0x001c, 0x001c, 0x001c, 0x001c, 0x001c, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0024, 0x0024, 0x0024, 0x0024, 0x0024, 0x0024, 0x0024, 0x0024, 0x0028, 0x0028, 0x0028, 0x0028, 0x0028, 0x0028, 0x0028, 0x0028, 0x002c, 0x002c, 0x002c, 0x002c, 0x002c, 0x002c, 0x002c, 0x002c, 0x0030, 0x0030, 0x0030, 0x0030, 0x0030, 0x0030, 0x0030, 0x0030, 0x0034, 0x0034, 0x0034, 0x0034, 0x0034, 0x0034, 0x0034, 0x0034, 0x0038, 0x0038, 0x0038, 0x0038, 0x0038, 0x0038, 0x0038, 0x0038, 0x003c, 0x003c, 0x003c, 0x003c, 0x003c, 0x003c, 0x003c, 0x003c, 0x0040, 0x0040, 0x0040, 0x0040, 0x0040, 0x0040, 0x0040, 0x0040, 0x0044, 0x0044, 0x0044, 0x0044, 0x0044, 0x0044, 0x0044, 0x0044, 0x0048, 0x0048, 0x0048, 0x0048, 0x0048, 0x0048, 0x0048, 0x0048, 0x004c, 0x004c, 0x004c, 0x004c, 0x004c, 0x004c, 0x004c, 0x004c, 0x0050, 0x0050, 0x0050, 0x0050, 0x0050, 0x0050, 0x0050, 0x0050, 0x0054, 0x0054, 0x0054, 0x0054, 0x0054, 0x0054, 0x0054, 0x0054, 0x0058, 0x0058, 0x0058, 0x0058, 0x0058, 0x0058, 0x0058, 0x0058, 0x005c, 0x005c, 0x005c, 0x005c, 0x005c, 0x005c, 0x005c, 0x005c, 0x0060, 0x0060, 0x0060, 0x0060, 0x0060, 0x0060, 0x0060, 0x0060, 0x0064, 0x0064, 0x0064, 0x0064, 0x0064, 0x0064, 0x0064, 0x0064, 0x0068, 0x0068, 0x0068, 0x0068, 0x0068, 0x0068, 0x0068, 0x0068, 0x006c, 0x006c, 0x006c, 0x006c, 0x006c, 0x006c, 0x006c, 0x006c, 0x0070, 0x0070, 0x0070, 0x0070, 0x0070, 0x0070, 0x0070, 0x0070, 0x0074, 0x0074, 0x0074, 0x0074, 0x0074, 0x0074, 0x0074, 0x0074, 0x0078, 0x0078, 0x0078, 0x0078, 0x0078, 0x0078, 0x0078, 0x0078, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x2000, 0x2000, 0x2000, 0x2000, 0x4000, 0x4000, 0x4000, 0x4000, 0x6000, 0x6000, 0x6000, 0x6000, 0x8000, 0x8000, 0x8000, 0x8000, 0xa000, 0xa000, 0xa000, 0xa000, 0xc000, 0xc000, 0xc000, 0xc000, 0xe000, 0xe000, 0xe000, 0xe000, 0x0001, 0x0001, 0x0001, 0x0001, 0x2001, 0x2001, 0x2001, 0x2001, 0x4001, 0x4001, 0x4001, 0x4001, 0x6001, 0x6001, 0x6001, 0x6001, 0x8001, 0x8001, 0x8001, 0x8001, 0xa001, 0xa001, 0xa001, 0xa001, 0xc001, 0xc001, 0xc001, 0xc001, 0xe001, 0xe001, 0xe001, 0xe001, 0x0002, 0x0002, 0x0002, 0x0002, 0x2002, 0x2002, 0x2002, 0x2002, 0x4002, 0x4002, 0x4002, 0x4002, 0x6002, 0x6002, 0x6002, 0x6002, 0x8002, 0x8002, 0x8002, 0x8002, 0xa002, 0xa002, 0xa002, 0xa002, 0xc002, 0xc002, 0xc002, 0xc002, 0xe002, 0xe002, 0xe002, 0xe002, 0x0003, 0x0003, 0x0003, 0x0003, 0x2003, 0x2003, 0x2003, 0x2003, 0x4003, 0x4003, 0x4003, 0x4003, 0x6003, 0x6003, 0x6003, 0x6003, 0x8003, 0x8003, 0x8003, 0x8003, 0xa003, 0xa003, 0xa003, 0xa003, 0xc003, 0xc003, 0xc003, 0xc003, 0xe003, 0xe003, 0xe003, 0xe003, 0x0004, 0x0004, 0x0004, 0x0004, 0x2004, 0x2004, 0x2004, 0x2004, 0x4004, 0x4004, 0x4004, 0x4004, 0x6004, 0x6004, 0x6004, 0x6004, 0x8004, 0x8004, 0x8004, 0x8004, 0xa004, 0xa004, 0xa004, 0xa004, 0xc004, 0xc004, 0xc004, 0xc004, 0xe004, 0xe004, 0xe004, 0xe004, 0x0005, 0x0005, 0x0005, 0x0005, 0x2005, 0x2005, 0x2005, 0x2005, 0x4005, 0x4005, 0x4005, 0x4005, 0x6005, 0x6005, 0x6005, 0x6005, 0x8005, 0x8005, 0x8005, 0x8005, 0xa005, 0xa005, 0xa005, 0xa005, 0xc005, 0xc005, 0xc005, 0xc005, 0xe005, 0xe005, 0xe005, 0xe005, 0x0006, 0x0006, 0x0006, 0x0006, 0x2006, 0x2006, 0x2006, 0x2006, 0x4006, 0x4006, 0x4006, 0x4006, 0x6006, 0x6006, 0x6006, 0x6006, 0x8006, 0x8006, 0x8006, 0x8006, 0xa006, 0xa006, 0xa006, 0xa006, 0xc006, 0xc006, 0xc006, 0xc006, 0xe006, 0xe006, 0xe006, 0xe006, 0x0007, 0x0007, 0x0007, 0x0007, 0x2007, 0x2007, 0x2007, 0x2007, 0x4007, 0x4007, 0x4007, 0x4007, 0x6007, 0x6007, 0x6007, 0x6007, 0x8007, 0x8007, 0x8007, 0x8007, 0xa007, 0xa007, 0xa007, 0xa007, 0xc007, 0xc007, 0xc007, 0xc007, 0xe007, 0xe007, 0xe007, 0xe007, }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x2000, 0x2000, 0x2000, 0x2000, 0x2000, 0x2000, 0x2000, 0x2000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x4000, 0x6000, 0x6000, 0x6000, 0x6000, 0x6000, 0x6000, 0x6000, 0x6000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0xa000, 0xa000, 0xa000, 0xa000, 0xa000, 0xa000, 0xa000, 0xa000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xc000, 0xe000, 0xe000, 0xe000, 0xe000, 0xe000, 0xe000, 0xe000, 0xe000, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x2001, 0x2001, 0x2001, 0x2001, 0x2001, 0x2001, 0x2001, 0x2001, 0x4001, 0x4001, 0x4001, 0x4001, 0x4001, 0x4001, 0x4001, 0x4001, 0x6001, 0x6001, 0x6001, 0x6001, 0x6001, 0x6001, 0x6001, 0x6001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0xa001, 0xa001, 0xa001, 0xa001, 0xa001, 0xa001, 0xa001, 0xa001, 0xc001, 0xc001, 0xc001, 0xc001, 0xc001, 0xc001, 0xc001, 0xc001, 0xe001, 0xe001, 0xe001, 0xe001, 0xe001, 0xe001, 0xe001, 0xe001, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x2002, 0x2002, 0x2002, 0x2002, 0x2002, 0x2002, 0x2002, 0x2002, 0x4002, 0x4002, 0x4002, 0x4002, 0x4002, 0x4002, 0x4002, 0x4002, 0x6002, 0x6002, 0x6002, 0x6002, 0x6002, 0x6002, 0x6002, 0x6002, 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, 0x8002, 0xa002, 0xa002, 0xa002, 0xa002, 0xa002, 0xa002, 0xa002, 0xa002, 0xc002, 0xc002, 0xc002, 0xc002, 0xc002, 0xc002, 0xc002, 0xc002, 0xe002, 0xe002, 0xe002, 0xe002, 0xe002, 0xe002, 0xe002, 0xe002, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x2003, 0x2003, 0x2003, 0x2003, 0x2003, 0x2003, 0x2003, 0x2003, 0x4003, 0x4003, 0x4003, 0x4003, 0x4003, 0x4003, 0x4003, 0x4003, 0x6003, 0x6003, 0x6003, 0x6003, 0x6003, 0x6003, 0x6003, 0x6003, 0x8003, 0x8003, 0x8003, 0x8003, 0x8003, 0x8003, 0x8003, 0x8003, 0xa003, 0xa003, 0xa003, 0xa003, 0xa003, 0xa003, 0xa003, 0xa003, 0xc003, 0xc003, 0xc003, 0xc003, 0xc003, 0xc003, 0xc003, 0xc003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, 0xe003, }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0200, 0x0200, 0x0200, 0x0200, 0x0200, 0x0200, 0x0200, 0x0200, 0x0300, 0x0300, 0x0300, 0x0300, 0x0300, 0x0300, 0x0300, 0x0300, 0x0400, 0x0400, 0x0400, 0x0400, 0x0400, 0x0400, 0x0400, 0x0400, 0x0500, 0x0500, 0x0500, 0x0500, 0x0500, 0x0500, 0x0500, 0x0500, 0x0600, 0x0600, 0x0600, 0x0600, 0x0600, 0x0600, 0x0600, 0x0600, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0700, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0800, 0x0900, 0x0900, 0x0900, 0x0900, 0x0900, 0x0900, 0x0900, 0x0900, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0a00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0b00, 0x0c00, 0x0c00, 0x0c00, 0x0c00, 0x0c00, 0x0c00, 0x0c00, 0x0c00, 0x0d00, 0x0d00, 0x0d00, 0x0d00, 0x0d00, 0x0d00, 0x0d00, 0x0d00, 0x0e00, 0x0e00, 0x0e00, 0x0e00, 0x0e00, 0x0e00, 0x0e00, 0x0e00, 0x0f00, 0x0f00, 0x0f00, 0x0f00, 0x0f00, 0x0f00, 0x0f00, 0x0f00, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1400, 0x1400, 0x1400, 0x1400, 0x1400, 0x1400, 0x1400, 0x1400, 0x1500, 0x1500, 0x1500, 0x1500, 0x1500, 0x1500, 0x1500, 0x1500, 0x1600, 0x1600, 0x1600, 0x1600, 0x1600, 0x1600, 0x1600, 0x1600, 0x1700, 0x1700, 0x1700, 0x1700, 0x1700, 0x1700, 0x1700, 0x1700, 0x1800, 0x1800, 0x1800, 0x1800, 0x1800, 0x1800, 0x1800, 0x1800, 0x1900, 0x1900, 0x1900, 0x1900, 0x1900, 0x1900, 0x1900, 0x1900, 0x1a00, 0x1a00, 0x1a00, 0x1a00, 0x1a00, 0x1a00, 0x1a00, 0x1a00, 0x1b00, 0x1b00, 0x1b00, 0x1b00, 0x1b00, 0x1b00, 0x1b00, 0x1b00, 0x1c00, 0x1c00, 0x1c00, 0x1c00, 0x1c00, 0x1c00, 0x1c00, 0x1c00, 0x1d00, 0x1d00, 0x1d00, 0x1d00, 0x1d00, 0x1d00, 0x1d00, 0x1d00, 0x1e00, 0x1e00, 0x1e00, 0x1e00, 0x1e00, 0x1e00, 0x1e00, 0x1e00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, 0x1f00, }, { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, }, }, }; zapping-0.10cvs6/libtv/lut_rgb16.h 644 764 144 1771 10404546524 12115 /* * Copyright (C) 2006 Michael H. Schimek * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* $Id: lut_rgb16.h,v 1.2 2006/03/11 13:15:00 mschimek Exp $ */ /* Look-up tables for image format conversion. */ #ifndef LUT_RGB16_H #define LUT_RGB16_H #include extern const uint16_t _tv_lut_rgb16 [2][6][256]; #endif /* LUT_RGB16_H */ zapping-0.10cvs6/libtv/control.c 644 764 144 5030 10262330231 11737 /* * Copyright (C) 2001-2004 Michael H. Schimek * Copyright (C) 2000-2003 Iaki Garca Etxebarria * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* $Id: control.c,v 1.2 2005/07/04 21:56:41 mschimek Exp $ */ #include /* malloc() */ #include "misc.h" #include "control.h" tv_bool tv_control_copy (tv_control * dst, const tv_control * src) { assert (NULL != dst); if (dst == src) { return TRUE; } CLEAR (*dst); if (!src) { return TRUE; } if (!(dst->label = strdup (src->label))) { return FALSE; } dst->hash = src->hash; dst->type = src->type; dst->id = src->id; if (TV_CONTROL_TYPE_CHOICE == src->type) { unsigned int i; dst->menu = malloc ((src->maximum + 2) * sizeof (*dst->menu)); if (!dst->menu) { tv_control_destroy (dst); return FALSE; } for (i = 0; i <= (unsigned int) src->maximum; ++i) { assert (NULL != src->menu[i]); dst->menu[i] = strdup (src->menu[i]); if (!dst->menu[i]) { tv_control_destroy (dst); return FALSE; } } dst->menu[i] = NULL; } dst->minimum = src->minimum; dst->maximum = src->maximum; dst->step = src->step; dst->reset = src->reset; dst->value = src->value; return TRUE; } tv_control * tv_control_dup (const tv_control * c) { tv_control *nc; if (!(nc = malloc (sizeof (*nc)))) { return NULL; } CLEAR (*nc); if (!tv_control_copy (nc, c)) { free (nc); nc = NULL; } return nc; } void tv_control_destroy (tv_control * c) { assert (NULL != c); tv_callback_delete_all (c->_callback, /* notify: any */ NULL, /* destroy: any */ NULL, /* user_data: any */ NULL, /* object */ c); if (c->menu) { unsigned int i; for (i = 0; c->menu[i]; ++i) { free (c->menu[i]); } free (c->menu); } if (c->label) free (c->label); CLEAR (*c); } void tv_control_delete (tv_control * c) { if (c) { tv_control_destroy (c); free (c); } } zapping-0.10cvs6/libtv/control.h 644 764 144 5733 10410046602 11757 /* * Copyright (C) 2001-2004 Michael H. Schimek * Copyright (C) 2000-2003 Iaki Garca Etxebarria * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* $Id: control.h,v 1.3 2006/03/21 19:01:22 mschimek Exp $ */ #ifndef __ZTV_CONTROL_H__ #define __ZTV_CONTROL_H__ #include #include "macros.h" #include "callback.h" TV_BEGIN_DECLS /* Programmatically accessable controls. Other controls are anonymous, only the user knows what they do. Keep the list short. */ typedef enum { TV_CONTROL_ID_NONE, TV_CONTROL_ID_UNKNOWN = TV_CONTROL_ID_NONE, TV_CONTROL_ID_BRIGHTNESS, TV_CONTROL_ID_CONTRAST, TV_CONTROL_ID_SATURATION, TV_CONTROL_ID_HUE, TV_CONTROL_ID_MUTE, TV_CONTROL_ID_VOLUME, TV_CONTROL_ID_BASS, TV_CONTROL_ID_TREBLE, /* preliminary */ TV_CONTROL_ID_AUDIO_MODE, } tv_control_id; typedef enum { TV_CONTROL_TYPE_NONE, TV_CONTROL_TYPE_INTEGER, /* integer [min, max] */ TV_CONTROL_TYPE_BOOLEAN, /* integer [0, 1] */ TV_CONTROL_TYPE_CHOICE, /* multiple choice */ TV_CONTROL_TYPE_ACTION, /* setting has one-time effect */ TV_CONTROL_TYPE_COLOR /* RGB color entry */ } tv_control_type; typedef struct _tv_control tv_control; struct _tv_control { tv_control * _next; /* private, use tv_control_next() */ void * _parent; tv_callback * _callback; char * label; /* localized */ unsigned int hash; tv_control_type type; tv_control_id id; char ** menu; /* localized; last entry NULL */ #if 0 add? unsigned int selectable; /* menu item 1 << n */ control enabled/disabled flag? #endif int minimum; int maximum; int step; int reset; int value; /* last known, not current value */ }; tv_bool tv_control_copy (tv_control * dst, const tv_control * src); tv_control * tv_control_dup (const tv_control * control); void tv_control_destroy (tv_control * control); void tv_control_delete (tv_control * control); typedef void tv_control_callback_fn (tv_control * control, void * user_data); static __inline__ tv_callback * tv_control_add_callback (tv_control * control, tv_control_callback_fn *notify, tv_control_callback_fn *destroy, void * user_data) { assert (control != NULL); return tv_callback_add (&control->_callback, (tv_callback_fn *) notify, (tv_callback_fn *) destroy, user_data); } TV_END_DECLS #endif /* __ZTV_CONTROL_H__ */ zapping-0.10cvs6/libtv/screen.c 644 764 144 35226 10370717751 11610 /* * Copyright (C) 2000-2003 Iaki Garca Etxebarria * Copyright (C) 2001-2006 Michael H. Schimek * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* $Id: screen.c,v 1.9 2006/02/03 18:24:41 mschimek Exp $ */ #ifdef HAVE_CONFIG_H # include "config.h" #endif #include /* calloc(), free() */ #include #include /* XVisualInfo */ #include "misc.h" #include "screen.h" /** * Finds the screen containing a point (width, height are 1), or most * of the points in a rectangle. If screens overlap and more than one * matches, returns the first matching in the list. If no screens * match, returns NULL. */ const tv_screen * tv_screen_list_find (const tv_screen * list, int x, int y, unsigned int width, unsigned int height) { const tv_screen *xs; unsigned int max; int x2; int y2; xs = NULL; max = 0; x2 = x + width; y2 = y + height; for (; list; list = list->next) { int lx2; int ly2; unsigned int n; lx2 = list->x + list->width; ly2 = list->y + list->height; if (x2 <= (int) list->x || x >= lx2) { continue; } if (y2 <= (int) list->y || y >= ly2) { continue; } n = (MIN (x2, lx2) - MAX (x, (int) list->x)) * (MIN (y2, ly2) - MAX (y, (int) list->y)); if (n > max) { xs = list; max = n; } } return xs; } void tv_screen_list_delete (tv_screen * list) { while (list) { tv_screen *xs; xs = list; list = xs->next; free (xs); } } /* Reflect all errors back to the program through the procedural interface. The default error handler terminates the program. */ static int my_error_handler (Display * display, XErrorEvent * error) { display = display; printv ("X Error: serial=%lu error=%lu request=%lu minor=%lu\n", (unsigned long) error->serial, (unsigned long) error->error_code, (unsigned long) error->request_code, (unsigned long) error->minor_code); return 0; /* ignored */ } #ifdef HAVE_XINERAMA_EXTENSION /* Where is this documented? */ #include static tv_bool xinerama_query (tv_screen ** list, Display * display) { XErrorHandler old_error_handler; int event_base; int error_base; int major_version; int minor_version; XineramaScreenInfo *screen_info; int n_screens; tv_screen **next; int i; assert (NULL != list); assert (NULL != display); old_error_handler = XSetErrorHandler (my_error_handler); *list = NULL; if (!XineramaQueryExtension (display, &event_base, &error_base)) { printv ("Xinerama extension not available\n"); goto success; } if (!XineramaQueryVersion (display, &major_version, &minor_version)) { printv ("Xinerama extension not usable\n"); goto failure; } printv ("Xinerama base %d, %d, version %d.%d\n", event_base, error_base, major_version, minor_version); if (1 != major_version) { printv ("Unknown Xinerama version\n"); goto failure; } if (!XineramaIsActive (display)) { printv ("Xinerama inactive\n"); goto success; } screen_info = XineramaQueryScreens (display, &n_screens); if (NULL == screen_info) { printv ("XineramaQueryScreens() failed\n"); goto failure; } next = list; for (i = 0; i < n_screens; ++i) { tv_screen *xs; xs = calloc (1, sizeof (*xs)); if (NULL == xs) { tv_screen_list_delete (*list); *list = NULL; XFree (screen_info); goto failure; } xs->screen_number = screen_info[i].screen_number; xs->x = screen_info[i].x_org; xs->y = screen_info[i].y_org; xs->width = screen_info[i].width; xs->height = screen_info[i].height; *next = xs; next = &xs->next; } XFree (screen_info); success: XSetErrorHandler (old_error_handler); return TRUE; failure: XSetErrorHandler (old_error_handler); return FALSE; } #else /* !HAVE_XINERAMA_EXTENSION */ static tv_bool xinerama_query (tv_screen ** list, Display * display) { assert (NULL != list); assert (NULL != display); printv ("Xinerama extension support not compiled in\n"); *list = NULL; return TRUE; } #endif /* !HAVE_XINERAMA_EXTENSION */ #ifndef TV_SCREEN_DGA_DEBUG #define TV_SCREEN_DGA_DEBUG 0 #endif static tv_pixfmt pixfmt_from_visuals (Display * display, int screen_number, int bpp_hint) { tv_pixel_format format; XErrorHandler old_error_handler; Visual *default_visual; XVisualInfo *visuals; XVisualInfo *v; XVisualInfo templ; int n_items; int i; CLEAR (format); old_error_handler = XSetErrorHandler (my_error_handler); default_visual = XDefaultVisual (display, screen_number); if (TV_SCREEN_DGA_DEBUG) { printv ("PFD default visual id=%d\n", (int) default_visual->visualid); } templ.screen = screen_number; visuals = XGetVisualInfo (display, VisualScreenMask, &templ, &n_items); if (NULL == visuals) { printv ("PFD XGetVisualInfo() failed\n"); goto failure; } v = NULL; for (i = 0; i < n_items; ++i) { if (TV_SCREEN_DGA_DEBUG) { printv ("PFD visuals[%u]: id=%d class=%u depth=%u\n", i, (int) visuals[i].visualid, visuals[i].class, visuals[i].depth); } if (TrueColor != visuals[i].class) { continue; } if (visuals[i].visualid == default_visual->visualid) { if (NULL != v) /* huh? */ break; v = &visuals[i]; } } if (NULL == v || i < n_items) { XFree (visuals); printv ("PFD: No appropriate X visual available\n"); goto failure; } /* v->depth counts RGB bits, not alpha. */ format.color_depth = v->depth; /* v->bits_per_rgb is not bits_per_pixel, we have to find that separately. */ format.mask.rgb.r = v->red_mask; format.mask.rgb.g = v->green_mask; format.mask.rgb.b = v->blue_mask; XFree (visuals); switch (bpp_hint) { case 24: case 32: format.color_depth = 24; format.bits_per_pixel = bpp_hint; break; default: /* BPP heuristic */ if (format.color_depth <= 8) { format.bits_per_pixel = 8; } else if (format.color_depth <= 16) { format.bits_per_pixel = 16; } else { XPixmapFormatValues *formats; XPixmapFormatValues *f; formats = XListPixmapFormats (display, &n_items); f = NULL; for (i = 0; i < n_items; ++i) { if (TV_SCREEN_DGA_DEBUG) { printv ("PFD formats[%u]: " "depth=%u bpp=%u\n", i, formats[i].depth, formats[i].bits_per_pixel); } if ((unsigned int) formats[i].depth != format.color_depth) { continue; } if (formats[i].bits_per_pixel < 24) { break; } if (NULL != f && (f->bits_per_pixel != formats[i].bits_per_pixel)) { break; } f = &formats[i]; } if (NULL == f || i < n_items) { XFree (formats); printv ("PFD: Unknown frame buffer " "bits per pixel\n"); goto failure; } format.bits_per_pixel = f->bits_per_pixel; XFree (formats); } break; } format.big_endian = (MSBFirst == XImageByteOrder (display)); format.pixfmt = tv_pixel_format_to_pixfmt (&format); if (TV_PIXFMT_UNKNOWN == format.pixfmt) { goto failure; } XSetErrorHandler (old_error_handler); return format.pixfmt; failure: printv ("PFD: Unknown frame buffer format\n"); XSetErrorHandler (old_error_handler); return TV_PIXFMT_UNKNOWN; } static tv_bool get_display_pixfmt (tv_screen * list, Display * display, int bpp_hint) { int screen_number; tv_pixfmt pixfmt; /* Screen from XOpenDisplay() name. */ screen_number = XDefaultScreen (display); pixfmt = pixfmt_from_visuals (display, screen_number, bpp_hint); if (TV_PIXFMT_UNKNOWN == pixfmt) { return FALSE; } for (; list; list = list->next) { list->target.format.pixel_format = tv_pixel_format_from_pixfmt (pixfmt); } return TRUE; } #ifdef HAVE_DGA_EXTENSION /* man XF86DGA */ #include static tv_pixfmt pixfmt_from_dga_modes (Display * display, int screen_number) { XErrorHandler old_error_handler; XDGAMode *modes; XDGAMode *m; int n_items; int i; old_error_handler = XSetErrorHandler (my_error_handler); modes = XDGAQueryModes (display, screen_number, &n_items); if (NULL == modes) { printv ("XDGAQueryModes() failed\n"); goto failure; } m = NULL; for (i = 0; i < n_items; ++i) { if (TV_SCREEN_DGA_DEBUG) { printv ("DGA modes[%u]: class=%d depth=%d " "bpp=%d red=0x%lx green=0x%lx " "blue=0x%lx order=%d\n", i, (int) modes[i].visualClass, modes[i].depth, modes[i].bitsPerPixel, modes[i].redMask, modes[i].greenMask, modes[i].blueMask, (int) modes[i].byteOrder); } if (NULL == m && TrueColor == modes[i].visualClass) { m = &modes[i]; } if (modes[i].depth != modes[0].depth || modes[i].bitsPerPixel != modes[0].bitsPerPixel) { /* Will the real depth please stand up. */ break; } } if (NULL != m && i >= n_items) { tv_pixel_format format; CLEAR (format); format.color_depth = m->depth; format.bits_per_pixel = m->bitsPerPixel; format.mask.rgb.r = m->redMask; format.mask.rgb.g = m->greenMask; format.mask.rgb.b = m->blueMask; format.big_endian = (MSBFirst == m->byteOrder); format.pixfmt = tv_pixel_format_to_pixfmt (&format); if (TV_PIXFMT_UNKNOWN != format.pixfmt) { XFree (modes); XSetErrorHandler (old_error_handler); return format.pixfmt; } } XFree (modes); printv ("DGA: Ambiguous modes\n"); failure: XSetErrorHandler (old_error_handler); return TV_PIXFMT_UNKNOWN; } static tv_bool dga_query (tv_screen * list, Display * display, int bpp_hint) { XErrorHandler old_error_handler; int event_base; int error_base; int major_version; int minor_version; int screen_number; tv_pixfmt pixfmt; assert (NULL != list); assert (NULL != display); old_error_handler = XSetErrorHandler (my_error_handler); if (!XF86DGAQueryExtension (display, &event_base, &error_base)) { printv ("DGA extension not available\n"); goto return_pixfmts_from_visuals; } if (!XF86DGAQueryVersion (display, &major_version, &minor_version)) { printv ("DGA extension not usable\n"); goto return_pixfmts_from_visuals; } printv ("DGA base %d, %d, version %d.%d\n", event_base, error_base, major_version, minor_version); if (1 != major_version && 2 != major_version) { printv ("Unknown DGA version\n"); goto return_pixfmts_from_visuals; } /* Screen from XOpenDisplay() name. */ screen_number = XDefaultScreen (display); pixfmt = TV_PIXFMT_UNKNOWN; if (bpp_hint <= 0 && major_version >= 2) { pixfmt = pixfmt_from_dga_modes (display, screen_number); } if (TV_PIXFMT_UNKNOWN == pixfmt) { pixfmt = pixfmt_from_visuals (display, screen_number, bpp_hint); } if (TV_PIXFMT_UNKNOWN == pixfmt) { goto failure; } for (; list; list = list->next) { int flags; int start; /* physical address (?) */ int width; /* of root window in pixels */ int banksize; /* in bytes, usually video memory size */ int memsize; /* ? */ /* Must always be set. */ list->target.format.pixel_format = tv_pixel_format_from_pixfmt (pixfmt); /* Fortunately these functions refer to physical screens, not the virtual Xinerama screen. */ if (!XF86DGAQueryDirectVideo (display, list->screen_number, &flags)) { printv ("DGA DirectVideo not available on screen %d\n", list->screen_number); continue; } if (!(flags & XF86DGADirectPresent)) { printv ("DGA DirectVideo not supported on screen %d\n", list->screen_number); continue; } if (!XF86DGAGetVideoLL (display, list->screen_number, &start, &width, &banksize, &memsize)) { printv ("XF86DGAGetVideoLL() failed on screen %d\n", list->screen_number); continue; } if (TV_SCREEN_DGA_DEBUG) { printv ("DGA screen %d: " "start=%p width=%d " "banksize=%d (0x%x) " "memsize=%d (0x%x)\n", list->screen_number, (void *) start, width, banksize, banksize, memsize, memsize); } list->target.base = start; list->target.x = list->x; list->target.y = list->y; list->target.format.width = list->width; list->target.format.height = list->height; list->target.format.bytes_per_line[0] = list->width * tv_pixfmt_bytes_per_pixel (pixfmt); list->target.format.size = list->height * list->target.format.bytes_per_line[0]; } XSetErrorHandler (old_error_handler); return TRUE; return_pixfmts_from_visuals: XSetErrorHandler (old_error_handler); return get_display_pixfmt (list, display, bpp_hint); failure: XSetErrorHandler (old_error_handler); return FALSE; } #else /* !HAVE_DGA_EXTENSION */ static tv_bool dga_query (tv_screen * list, Display * display, int bpp_hint) { assert (NULL != list); assert (NULL != display); printv ("DGA extension support not compiled in\n"); /* We cannot overlay without DGA but we still want the pixel format of the screen(s) to choose an optimal capture or blit format. */ return get_display_pixfmt (list, display, bpp_hint); } #endif /* !HAVE_DGA_EXTENSION */ tv_screen * tv_screen_list_new (const char * display_name, int bpp_hint) { XErrorHandler old_error_handler; Display *display; tv_screen *list; assert (NULL != display_name); list = NULL; old_error_handler = XSetErrorHandler (my_error_handler); display = XOpenDisplay (display_name); if (NULL == display) { printv ("%s: Cannot open display '%s'\n", __FUNCTION__, display_name); goto failure; } if (!xinerama_query (&list, display)) { goto failure; } if (NULL == list) { Window root; XWindowAttributes wa; /* Have no Xinerama. */ list = calloc (1, sizeof (*list)); if (NULL == list) { printv ("%s: Out of memory\n", __FUNCTION__); goto failure; } /* Root window of XDefaultScreen (display). */ root = XDefaultRootWindow (display); if (!XGetWindowAttributes (display, root, &wa)) { printv ("%s: Cannot determine size of root window\n", __FUNCTION__); goto failure; } printv ("%s: root width=%u height=%u\n", __FUNCTION__, wa.width, wa.height); /* Screen from XOpenDisplay() name. */ list->screen_number = XDefaultScreen (display); list->x = 0; list->y = 0; list->width = wa.width; list->height = wa.height; } if (!dga_query (list, display, bpp_hint)) { failure: tv_screen_list_delete (list); list = NULL; } XCloseDisplay (display); XSetErrorHandler (old_error_handler); return list; } zapping-0.10cvs6/libtv/screen.h 644 764 144 3746 10177355117 11576 /* * Copyright (C) 2001-2004 Michael H. Schimek * Copyright (C) 2000-2003 Iaki Garca Etxebarria * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* $Id: screen.h,v 1.2 2005/01/31 07:12:15 mschimek Exp $ */ #ifndef __ZTV_SCREEN_H__ #define __ZTV_SCREEN_H__ #include "overlay_buffer.h" TV_BEGIN_DECLS /* Xinerama / DGA routines */ typedef struct _tv_screen tv_screen; struct _tv_screen { /** List of screens if Xinerama is enabled, single screen otherwise. */ tv_screen * next; /** X11 screen number. */ int screen_number; /** * Screen position in root window coordinates. Note a * Xinerama display can have gaps and screens can overlap. */ unsigned int x; unsigned int y; unsigned int width; unsigned int height; /** DMA target, if DGA is enabled. */ tv_overlay_buffer target; }; tv_inline tv_bool tv_screen_is_target (const tv_screen * xs) { /* assert (NULL != xs); */ return (0 != xs->target.base); } extern const tv_screen * tv_screen_list_find (const tv_screen * list, int x, int y, unsigned int width, unsigned int height); extern void tv_screen_list_delete (tv_screen * list); extern tv_screen * tv_screen_list_new (const char * display_name, int bpp_hint) __attribute__ ((malloc, _tv_nonnull (1))); TV_END_DECLS #endif /* __ZTV_SCREEN_H__ */ zapping-0.10cvs6/libtv/lut_yuv2rgb-gen.c 644 764 144 17665 10442152133 13356 /* * Copyright (C) 2006 Michael H. Schimek * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* $Id: lut_yuv2rgb-gen.c,v 1.2 2006/06/09 01:52:27 mschimek Exp $ */ /* Generates look-up tables for image format conversion. */ #ifdef HAVE_CONFIG_H # include "config.h" #endif #define _GNU_SOURCE 1 #undef NDEBUG #include #include #include /* uint16_t */ #include #include /* lrint() */ #include "misc.h" /* SWAB16() */ #ifndef HAVE_LRINT static long lrint (double x) { if (x < 0) return (long)(x - 0.5); else return (long)(x + 0.5); } #endif /* Convert positive float to fixed point integer. pr: 16 if we can multiply by vu16, 15 by v16. */ static unsigned int shift (double co, unsigned int pr) { return pr - 1 - lrint (floor (log (co) / log (2.0))); } static double fixed (double co, unsigned int sh) { return floor (co * (1 << sh) + .5); } static void simd_coeff (int header) { double cy, gu, bu, rv, gv; unsigned int cy_sh, gu_bu_sh, rv_gv_sh; unsigned int i; cy = 255.0 / 219.0; gu = 0.344 * 255.0 / 224.0; bu = 1.772 * 255.0 / 224.0; rv = 1.402 * 255.0 / 224.0; gv = 0.714 * 255.0 / 224.0; cy_sh = shift (cy, 15); cy = fixed (cy, cy_sh); gu_bu_sh = shift (MAX (gu, bu), 15); gu = fixed (gu, gu_bu_sh); bu = fixed (bu, gu_bu_sh); rv_gv_sh = shift (MAX (rv, gv), 15); rv = fixed (rv, rv_gv_sh); gv = fixed (gv, rv_gv_sh); #define print_v16(name) \ do { \ fputs ("const int16_t __attribute__ ((aligned (16)))\n" \ "_tv_vsplat16_yuv2rgb_" #name " [] =\n\t{ ", stdout); \ for (i = 0; i < 8; ++i) \ printf ("0x%04x, ", (unsigned int) name); \ puts ("};"); \ } while (0) if (header) { /* Exponents. */ printf ("#define CY_SH %u\n", cy_sh); printf ("#define GU_BU_SH %u\n", gu_bu_sh); printf ("#define RV_GV_SH %u\n\n", rv_gv_sh); puts ("#if SIMD\n" "extern const v16\t\t_tv_vsplat16_yuv2rgb_cy;\n" "extern const v16\t\t_tv_vsplat16_yuv2rgb_gu;\n" "extern const v16\t\t_tv_vsplat16_yuv2rgb_bu;\n" "extern const v16\t\t_tv_vsplat16_yuv2rgb_rv;\n" "extern const v16\t\t_tv_vsplat16_yuv2rgb_gv;\n" "#endif\n"); } else { print_v16 (cy); print_v16 (gu); print_v16 (bu); print_v16 (rv); print_v16 (gv); puts (""); } } /* Ok, here's the plan. This is what we need to do: y1 = (y - 16) * 255 / 219; u1 = (u - 128) * 255 / 224; v1 = (v - 128) * 255 / 224; r = sat (y1 + 1.402 * v1, 0, 255); g = sat (y1 - 0.344 * u1 - 0.714 * v1, 0, 255); b = sat (y1 + 1.772 * u1, 0, 255); This is what we actually do: r = sat ((y + 1.402 * (v - 128) * 255 / 224 / 255 * 219) * 255 / 219 - 16 * 255 / 219, 0, 255); -> ys[x] = sat ((x - 16) * 255 / 219, 0, 255); rv[x] = (x - 128) * 255 / 224 / 255 * 219 * 1.402; r = ys [y + rv[v]]; etc. */ static int16_t lut_gu[256]; static int16_t lut_gv[256]; static int16_t lut_rv[256]; static int16_t lut_bu[256]; #define BIAS 256 #define SUM 512 static void scalar_coeff (int header) { int gu_min, gv_min, rv_min, bu_min; int gu_max, gv_max, rv_max, bu_max; int i; if (header) { puts ("extern const int16_t\t\t_tv_lut_yuv2rgb_gu [256];\n" "extern const int16_t\t\t_tv_lut_yuv2rgb_gv [256];\n" "extern const int16_t\t\t_tv_lut_yuv2rgb_rv [256];\n" "extern const int16_t\t\t_tv_lut_yuv2rgb_bu [256];\n"); return; } gu_min = INT_MAX; gu_max = INT_MIN; gv_min = INT_MAX; gv_max = INT_MIN; rv_min = INT_MAX; rv_max = INT_MIN; bu_min = INT_MAX; bu_max = INT_MIN; for (i = 0; i < 256; ++i) { lut_gu[i] = lrint ((i - 128) * 219 / 224.0 * -0.344) + BIAS; lut_gv[i] = lrint ((i - 128) * 219 / 224.0 * -0.714); lut_rv[i] = lrint ((i - 128) * 219 / 224.0 * +1.402) + BIAS; lut_bu[i] = lrint ((i - 128) * 219 / 224.0 * +1.772) + BIAS; #define MIN_MAX(array) \ do { \ if (lut_ ## array[i] < array ## _min) \ array ## _min = lut_ ## array[i]; \ if (lut_ ## array[i] > array ## _max) \ array ## _max = lut_ ## array[i]; \ } while (0) MIN_MAX (gu); MIN_MAX (gv); MIN_MAX (rv); MIN_MAX (bu); } if (0) fprintf (stderr, "coeff min=%d,%d,%d,%d max=%d,%d,%d,%d\n", gu_min, gv_min, rv_min, bu_min, gu_max, gv_max, rv_max, bu_max); assert (0 + gu_min + gv_min >= 0); assert (0 + rv_min >= 0); assert (0 + bu_min >= 0); assert (255 + gu_max + gv_max < BIAS + SUM); assert (255 + rv_min < BIAS + SUM); assert (255 + bu_min < BIAS + SUM); #define dump(array) \ do { \ unsigned int i; \ \ fputs ("const int16_t\n" \ "_tv_lut_yuv2rgb_" #array " [256] = {", stdout); \ for (i = 0; i < 256; ++i) { \ printf ("%s0x%04x, ", \ (0 == (i % 8)) ? "\n\t" : "", \ 0xFFFF & lut_ ## array[i]); \ } \ puts ("\n};\n"); \ } while (0) dump (gu); dump (gv); dump (rv); dump (bu); } static uint8_t lut_8[BIAS + SUM]; static uint16_t lut_rgb16[2][6][BIAS + SUM]; static void color (int header) { int i; if (header) { printf ("extern const uint8_t\t\t" "_tv_lut_yuv2rgb8 [%d + %d];\n" "extern const uint16_t\t\t" "_tv_lut_yuv2rgb16 [2][6][%d + %d];\n\n", BIAS, SUM, BIAS, SUM); return; } for (i = -BIAS; i < SUM; ++i) { unsigned int m; unsigned int n; m = SATURATE (lrint ((i - 16) * 255 / 219.0), 0, 255); lut_8[i + BIAS] = m; n = (m << 8) & 0xF800; lut_rgb16[0][0][i + BIAS] = n; /* BGR red / RGB blue */ lut_rgb16[1][0][i + BIAS] = SWAB16 (n); n = (m << 7) & 0x7C00; lut_rgb16[0][1][i + BIAS] = n; /* BGRA red / ARGB blue */ lut_rgb16[1][1][i + BIAS] = SWAB16 (n); n = (m << 3) & 0x07E0; lut_rgb16[0][2][i + BIAS] = n; /* BGR / RGB green */ lut_rgb16[1][2][i + BIAS] = SWAB16 (n); n = (m << 2) & 0x03E0; lut_rgb16[0][3][i + BIAS] = n; /* BGRA / RGBA green */ lut_rgb16[1][3][i + BIAS] = SWAB16 (n); n = (m >> 3) & 0x001F; lut_rgb16[0][4][i + BIAS] = n; /* blue / red */ lut_rgb16[1][4][i + BIAS] = SWAB16 (n); n = (m << 8) & 0x8000; lut_rgb16[0][5][i + BIAS] = n; /* alpha */ lut_rgb16[1][5][i + BIAS] = SWAB16 (n); } printf ("const uint8_t\n" "_tv_lut_yuv2rgb8 [%d + %d] = {", BIAS, SUM); for (i = 0; i < BIAS + SUM; ++i) printf ("%s0x%02x, ", (0 == (i % 8)) ? "\n\t" : "", lut_8[i]); printf ("\n};\n\n" "const uint16_t\n" "_tv_lut_yuv2rgb16 [2][6][%d + %d] = {\n\t", BIAS, SUM); for (i = 0; i < 2; ++i) { unsigned int j; fputs ("{\n\t\t", stdout); for (j = 0; j < 6; ++j) { unsigned int k; fputs ("{", stdout); for (k = 0; k < BIAS + SUM; k += 8) { unsigned int l; fputs ("\n\t\t\t", stdout); for (l = 0; l < 8; ++l) { printf ("0x%04x, ", lut_rgb16[i][j][k + l]); } } fputs ("\n\t\t}, ", stdout); } fputs ("\n\t}, ", stdout); } puts ("\n};\n"); } int main (int argc, char ** argv) { int header; argv = argv; header = (argc > 1); puts ("/* Generated file, do not edit! */\n"); if (header) puts ("#ifndef LUT_YUV2RGB_H\n" "#define LUT_YUV2RGB_H\n\n" "#include \n" "#include \"simd.h\"\n"); else puts ("#include \"misc.h\"\n" "#include \"lut_yuv2rgb.h\"\n"); simd_coeff (header); scalar_coeff (header); color (header); if (header) puts ("#endif /* LUT_YUV2RGB_H */\n"); exit (EXIT_SUCCESS); } zapping-0.10cvs6/libtv/Makefile.am 644 764 144 4245 10441063204 12160 ## Process this file with automake to produce Makefile.in BUILT_SOURCES = \ lut_rgb16.c \ lut_yuv2rgb.c \ lut_yuv2rgb.h MAINTAINERCLEANFILES = \ lut_rgb16-gen \ lut_yuv2rgb-gen EXTRA_DIST = \ $(BUILT_SOURCES) \ lut_rgb16-gen.c \ lut_yuv2rgb-gen.c AM_CFLAGS = \ -D_GNU_SOURCE \ -D_REENTRANT \ -DUNTESTED_SIMD=1 \ @X_CFLAGS@ # Note these are defaults, user CFLAGS take precedence. SIMD_CFLAGS = \ -O3 -fomit-frame-pointer # We make extensive use of inline functions. The --param switches here # increase various inlining limits (gcc 3.4.x and later only). if HAVE_GCC_LIMITS SIMD_CFLAGS += \ --param max-inline-insns-single=50000 \ --param large-function-insns=150000 \ --param inline-unit-growth=30000 \ --param large-function-growth=300000 endif SIMD_SOURCES = \ clear_image.c clear_image.h \ copy_image.c copy_image.h \ rgb2rgb.c rgb2rgb.h \ simd-conv.h \ yuv2rgb.c yuv2rgb.h \ yuv2yuv.c yuv2yuv.h INCLUDES = -I$(top_srcdir) libtv_la_SOURCES = \ $(SIMD_SOURCES) \ callback.c callback.h \ clip_vector.c clip_vector.h \ control.c control.h \ copy_image-priv.h \ cpu.c cpu.h \ image_format.c image_format.h \ lut_rgb16.c lut_rgb16.h \ lut_yuv2rgb.c lut_yuv2rgb.h \ macros.h \ misc.c misc.h \ overlay_buffer.h \ pixel_format.c pixel_format.h \ screen.c screen.h \ simd.c simd.h SUBDIRS = SIMD_LIBS = libtv_la_LIBADD = if CAN_COMPILE_MMX SIMD_LIBS += libtv_MMX.la libtv_MMX_la_CFLAGS = $(SIMD_CFLAGS) -mmmx -DSIMD=CPU_FEATURE_MMX libtv_MMX_la_SOURCES = $(SIMD_SOURCES) endif if CAN_COMPILE_SSE SIMD_LIBS += libtv_SSE.la libtv_SSE_la_CFLAGS = $(SIMD_CFLAGS) -msse -DSIMD=CPU_FEATURE_SSE_INT libtv_SSE_la_SOURCES = \ clear_image.c clear_image.h \ copy_image.c copy_image.h endif libtv_la_LIBADD += $(SIMD_LIBS) noinst_LTLIBRARIES = \ $(SIMD_LIBS) \ libtv.la if MAINTAINER_MODE noinst_PROGRAMS = \ lut_rgb16-gen \ lut_yuv2rgb-gen lut_yuv2rgb_gen_LDADD = -lm lut_rgb16.c: lut_rgb16-gen Makefile.am $(top_builddir)/libtv/lut_rgb16-gen$(EXEEXT) > $@ lut_yuv2rgb.c: lut_yuv2rgb-gen Makefile.am $(top_builddir)/libtv/lut_yuv2rgb-gen$(EXEEXT) > $@ lut_yuv2rgb.h: lut_yuv2rgb-gen Makefile.am $(top_builddir)/libtv/lut_yuv2rgb-gen$(EXEEXT) header > $@ endif zapping-0.10cvs6/libtv/Makefile.in 644 764 144 106123 10442575437 12250 # Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = .. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ # We make extensive use of inline functions. The --param switches here # increase various inlining limits (gcc 3.4.x and later only). @HAVE_GCC_LIMITS_TRUE@am__append_1 = \ @HAVE_GCC_LIMITS_TRUE@ --param max-inline-insns-single=50000 \ @HAVE_GCC_LIMITS_TRUE@ --param large-function-insns=150000 \ @HAVE_GCC_LIMITS_TRUE@ --param inline-unit-growth=30000 \ @HAVE_GCC_LIMITS_TRUE@ --param large-function-growth=300000 @CAN_COMPILE_MMX_TRUE@am__append_2 = libtv_MMX.la @CAN_COMPILE_SSE_TRUE@am__append_3 = libtv_SSE.la @MAINTAINER_MODE_TRUE@noinst_PROGRAMS = lut_rgb16-gen$(EXEEXT) \ @MAINTAINER_MODE_TRUE@ lut_yuv2rgb-gen$(EXEEXT) subdir = libtv DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) @CAN_COMPILE_MMX_TRUE@am__DEPENDENCIES_1 = libtv_MMX.la @CAN_COMPILE_SSE_TRUE@am__DEPENDENCIES_2 = libtv_SSE.la am__DEPENDENCIES_3 = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_2) libtv_la_DEPENDENCIES = $(am__DEPENDENCIES_3) am__objects_1 = clear_image.lo copy_image.lo rgb2rgb.lo yuv2rgb.lo \ yuv2yuv.lo am_libtv_la_OBJECTS = $(am__objects_1) callback.lo clip_vector.lo \ control.lo cpu.lo image_format.lo lut_rgb16.lo lut_yuv2rgb.lo \ misc.lo pixel_format.lo screen.lo simd.lo libtv_la_OBJECTS = $(am_libtv_la_OBJECTS) libtv_MMX_la_LIBADD = am__libtv_MMX_la_SOURCES_DIST = clear_image.c clear_image.h \ copy_image.c copy_image.h rgb2rgb.c rgb2rgb.h simd-conv.h \ yuv2rgb.c yuv2rgb.h yuv2yuv.c yuv2yuv.h am__objects_2 = libtv_MMX_la-clear_image.lo libtv_MMX_la-copy_image.lo \ libtv_MMX_la-rgb2rgb.lo libtv_MMX_la-yuv2rgb.lo \ libtv_MMX_la-yuv2yuv.lo @CAN_COMPILE_MMX_TRUE@am_libtv_MMX_la_OBJECTS = $(am__objects_2) libtv_MMX_la_OBJECTS = $(am_libtv_MMX_la_OBJECTS) @CAN_COMPILE_MMX_TRUE@am_libtv_MMX_la_rpath = libtv_SSE_la_LIBADD = am__libtv_SSE_la_SOURCES_DIST = clear_image.c clear_image.h \ copy_image.c copy_image.h @CAN_COMPILE_SSE_TRUE@am_libtv_SSE_la_OBJECTS = \ @CAN_COMPILE_SSE_TRUE@ libtv_SSE_la-clear_image.lo \ @CAN_COMPILE_SSE_TRUE@ libtv_SSE_la-copy_image.lo libtv_SSE_la_OBJECTS = $(am_libtv_SSE_la_OBJECTS) @CAN_COMPILE_SSE_TRUE@am_libtv_SSE_la_rpath = PROGRAMS = $(noinst_PROGRAMS) lut_rgb16_gen_SOURCES = lut_rgb16-gen.c lut_rgb16_gen_OBJECTS = lut_rgb16-gen.$(OBJEXT) lut_rgb16_gen_LDADD = $(LDADD) lut_yuv2rgb_gen_SOURCES = lut_yuv2rgb-gen.c lut_yuv2rgb_gen_OBJECTS = lut_yuv2rgb-gen.$(OBJEXT) lut_yuv2rgb_gen_DEPENDENCIES = DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ SOURCES = $(libtv_la_SOURCES) $(libtv_MMX_la_SOURCES) \ $(libtv_SSE_la_SOURCES) lut_rgb16-gen.c lut_yuv2rgb-gen.c DIST_SOURCES = $(libtv_la_SOURCES) $(am__libtv_MMX_la_SOURCES_DIST) \ $(am__libtv_SSE_la_SOURCES_DIST) lut_rgb16-gen.c \ lut_yuv2rgb-gen.c RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-exec-recursive install-info-recursive \ install-recursive installcheck-recursive installdirs-recursive \ pdf-recursive ps-recursive uninstall-info-recursive \ uninstall-recursive ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ ARTS_CFLAGS = @ARTS_CFLAGS@ ARTS_LIBS = @ARTS_LIBS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BUILD_DEINTERLACE_PLUGIN_FALSE = @BUILD_DEINTERLACE_PLUGIN_FALSE@ BUILD_DEINTERLACE_PLUGIN_TRUE = @BUILD_DEINTERLACE_PLUGIN_TRUE@ BUILD_MAN_FALSE = @BUILD_MAN_FALSE@ BUILD_MAN_TRUE = @BUILD_MAN_TRUE@ CAN_COMPILE_3DNOW_FALSE = @CAN_COMPILE_3DNOW_FALSE@ CAN_COMPILE_3DNOW_TRUE = @CAN_COMPILE_3DNOW_TRUE@ CAN_COMPILE_ALTIVEC_FALSE = @CAN_COMPILE_ALTIVEC_FALSE@ CAN_COMPILE_ALTIVEC_TRUE = @CAN_COMPILE_ALTIVEC_TRUE@ CAN_COMPILE_MMX_FALSE = @CAN_COMPILE_MMX_FALSE@ CAN_COMPILE_MMX_TRUE = @CAN_COMPILE_MMX_TRUE@ CAN_COMPILE_SSE2_FALSE = @CAN_COMPILE_SSE2_FALSE@ CAN_COMPILE_SSE2_TRUE = @CAN_COMPILE_SSE2_TRUE@ CAN_COMPILE_SSE3_FALSE = @CAN_COMPILE_SSE3_FALSE@ CAN_COMPILE_SSE3_TRUE = @CAN_COMPILE_SSE3_TRUE@ CAN_COMPILE_SSE_FALSE = @CAN_COMPILE_SSE_FALSE@ CAN_COMPILE_SSE_TRUE = @CAN_COMPILE_SSE_TRUE@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCAS = @CCAS@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ COMMON_INCLUDES = @COMMON_INCLUDES@ CONSOLEHELPER_LOCATION = @CONSOLEHELPER_LOCATION@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFAULT_CFLAGS = @DEFAULT_CFLAGS@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ESD_LIBS = @ESD_LIBS@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ GCONF_SCHEMAS_INSTALL_FALSE = @GCONF_SCHEMAS_INSTALL_FALSE@ GCONF_SCHEMAS_INSTALL_TRUE = @GCONF_SCHEMAS_INSTALL_TRUE@ GCONF_SCHEMA_CONFIG_SOURCE = @GCONF_SCHEMA_CONFIG_SOURCE@ GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@ GDK_PIXBUF_CSOURCE = @GDK_PIXBUF_CSOURCE@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ HAVE_GCC_LIMITS_FALSE = @HAVE_GCC_LIMITS_FALSE@ HAVE_GCC_LIMITS_TRUE = @HAVE_GCC_LIMITS_TRUE@ HAVE_LIBZVBI_FALSE = @HAVE_LIBZVBI_FALSE@ HAVE_LIBZVBI_TRUE = @HAVE_LIBZVBI_TRUE@ HAVE_X86_FALSE = @HAVE_X86_FALSE@ HAVE_X86_TRUE = @HAVE_X86_TRUE@ HAVE_XMU_FALSE = @HAVE_XMU_FALSE@ HAVE_XMU_TRUE = @HAVE_XMU_TRUE@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ INTLTOOL_CAVES_RULE = @INTLTOOL_CAVES_RULE@ INTLTOOL_DESKTOP_RULE = @INTLTOOL_DESKTOP_RULE@ INTLTOOL_DIRECTORY_RULE = @INTLTOOL_DIRECTORY_RULE@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ INTLTOOL_ICONV = @INTLTOOL_ICONV@ INTLTOOL_KBD_RULE = @INTLTOOL_KBD_RULE@ INTLTOOL_KEYS_RULE = @INTLTOOL_KEYS_RULE@ INTLTOOL_MERGE = @INTLTOOL_MERGE@ INTLTOOL_MSGFMT = @INTLTOOL_MSGFMT@ INTLTOOL_MSGMERGE = @INTLTOOL_MSGMERGE@ INTLTOOL_OAF_RULE = @INTLTOOL_OAF_RULE@ INTLTOOL_PERL = @INTLTOOL_PERL@ INTLTOOL_PONG_RULE = @INTLTOOL_PONG_RULE@ INTLTOOL_PROP_RULE = @INTLTOOL_PROP_RULE@ INTLTOOL_SCHEMAS_RULE = @INTLTOOL_SCHEMAS_RULE@ INTLTOOL_SERVER_RULE = @INTLTOOL_SERVER_RULE@ INTLTOOL_SHEET_RULE = @INTLTOOL_SHEET_RULE@ INTLTOOL_SOUNDLIST_RULE = @INTLTOOL_SOUNDLIST_RULE@ INTLTOOL_THEME_RULE = @INTLTOOL_THEME_RULE@ INTLTOOL_UI_RULE = @INTLTOOL_UI_RULE@ INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ INTLTOOL_XAM_RULE = @INTLTOOL_XAM_RULE@ INTLTOOL_XGETTEXT = @INTLTOOL_XGETTEXT@ INTLTOOL_XML_NOMERGE_RULE = @INTLTOOL_XML_NOMERGE_RULE@ INTLTOOL_XML_RULE = @INTLTOOL_XML_RULE@ JPEG_LIB = @JPEG_LIB@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBXML_CFLAGS = @LIBXML_CFLAGS@ LIBXML_LIBS = @LIBXML_LIBS@ LIRC_LIB = @LIRC_LIB@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAKEINFO = @MAKEINFO@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ NEED_ZSFB_FALSE = @NEED_ZSFB_FALSE@ NEED_ZSFB_TRUE = @NEED_ZSFB_TRUE@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_CFLAGS = @PACKAGE_CFLAGS@ PACKAGE_LIBS = @PACKAGE_LIBS@ PACKAGE_LIB_DIR = @PACKAGE_LIB_DIR@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_PIXMAPS_DIR = @PACKAGE_PIXMAPS_DIR@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PACKAGE_VERSION_ID = @PACKAGE_VERSION_ID@ PATH_SEPARATOR = @PATH_SEPARATOR@ PG_CFLAGS = @PG_CFLAGS@ PKG_CONFIG = @PKG_CONFIG@ PLUGIN_DEFAULT_DIR = @PLUGIN_DEFAULT_DIR@ PLUGIN_DEFAULT_FLAGS = @PLUGIN_DEFAULT_FLAGS@ PNG_LIBS = @PNG_LIBS@ POFILES = @POFILES@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ PYTHON_LIBS = @PYTHON_LIBS@ PY_CFLAGS = @PY_CFLAGS@ PY_EXTRA_LIBS = @PY_EXTRA_LIBS@ PY_LIBS = @PY_LIBS@ PY_LIB_LOC = @PY_LIB_LOC@ RANLIB = @RANLIB@ RTE_LIBS = @RTE_LIBS@ SCROLLKEEPER_BUILD_REQUIRED = @SCROLLKEEPER_BUILD_REQUIRED@ SCROLLKEEPER_CONFIG = @SCROLLKEEPER_CONFIG@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ SUID_ZSFB_FALSE = @SUID_ZSFB_FALSE@ SUID_ZSFB_TRUE = @SUID_ZSFB_TRUE@ UNICODE_CFLAGS = @UNICODE_CFLAGS@ UNICODE_LIBS = @UNICODE_LIBS@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ WARN_CFLAGS = @WARN_CFLAGS@ XGETTEXT = @XGETTEXT@ XMLCATALOG = @XMLCATALOG@ XML_CATALOG_FILE = @XML_CATALOG_FILE@ XSLTPROC = @XSLTPROC@ X_CFLAGS = @X_CFLAGS@ X_DPMS_LIBS = @X_DPMS_LIBS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ X_XF86DGA_LIBS = @X_XF86DGA_LIBS@ X_XF86VMODE_LIBS = @X_XF86VMODE_LIBS@ X_XINERAMA_LIBS = @X_XINERAMA_LIBS@ X_XMU_LIBS = @X_XMU_LIBS@ X_XV_LIBS = @X_XV_LIBS@ ZSFB_GROUP = @ZSFB_GROUP@ ZSFB_OWNER = @ZSFB_OWNER@ ZVBI_CFLAGS = @ZVBI_CFLAGS@ ZVBI_LIBS = @ZVBI_LIBS@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_STRIP = @ac_ct_STRIP@ ac_pt_PKG_CONFIG = @ac_pt_PKG_CONFIG@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ datadir = @datadir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ python_val = @python_val@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ BUILT_SOURCES = \ lut_rgb16.c \ lut_yuv2rgb.c \ lut_yuv2rgb.h MAINTAINERCLEANFILES = \ lut_rgb16-gen \ lut_yuv2rgb-gen EXTRA_DIST = \ $(BUILT_SOURCES) \ lut_rgb16-gen.c \ lut_yuv2rgb-gen.c AM_CFLAGS = \ -D_GNU_SOURCE \ -D_REENTRANT \ -DUNTESTED_SIMD=1 \ @X_CFLAGS@ # Note these are defaults, user CFLAGS take precedence. SIMD_CFLAGS = -O3 -fomit-frame-pointer $(am__append_1) SIMD_SOURCES = \ clear_image.c clear_image.h \ copy_image.c copy_image.h \ rgb2rgb.c rgb2rgb.h \ simd-conv.h \ yuv2rgb.c yuv2rgb.h \ yuv2yuv.c yuv2yuv.h INCLUDES = -I$(top_srcdir) libtv_la_SOURCES = \ $(SIMD_SOURCES) \ callback.c callback.h \ clip_vector.c clip_vector.h \ control.c control.h \ copy_image-priv.h \ cpu.c cpu.h \ image_format.c image_format.h \ lut_rgb16.c lut_rgb16.h \ lut_yuv2rgb.c lut_yuv2rgb.h \ macros.h \ misc.c misc.h \ overlay_buffer.h \ pixel_format.c pixel_format.h \ screen.c screen.h \ simd.c simd.h SUBDIRS = SIMD_LIBS = $(am__append_2) $(am__append_3) libtv_la_LIBADD = $(SIMD_LIBS) @CAN_COMPILE_MMX_TRUE@libtv_MMX_la_CFLAGS = $(SIMD_CFLAGS) -mmmx -DSIMD=CPU_FEATURE_MMX @CAN_COMPILE_MMX_TRUE@libtv_MMX_la_SOURCES = $(SIMD_SOURCES) @CAN_COMPILE_SSE_TRUE@libtv_SSE_la_CFLAGS = $(SIMD_CFLAGS) -msse -DSIMD=CPU_FEATURE_SSE_INT @CAN_COMPILE_SSE_TRUE@libtv_SSE_la_SOURCES = \ @CAN_COMPILE_SSE_TRUE@ clear_image.c clear_image.h \ @CAN_COMPILE_SSE_TRUE@ copy_image.c copy_image.h noinst_LTLIBRARIES = \ $(SIMD_LIBS) \ libtv.la @MAINTAINER_MODE_TRUE@lut_yuv2rgb_gen_LDADD = -lm all: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) all-recursive .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu libtv/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu libtv/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libtv.la: $(libtv_la_OBJECTS) $(libtv_la_DEPENDENCIES) $(LINK) $(libtv_la_LDFLAGS) $(libtv_la_OBJECTS) $(libtv_la_LIBADD) $(LIBS) libtv_MMX.la: $(libtv_MMX_la_OBJECTS) $(libtv_MMX_la_DEPENDENCIES) $(LINK) $(am_libtv_MMX_la_rpath) $(libtv_MMX_la_LDFLAGS) $(libtv_MMX_la_OBJECTS) $(libtv_MMX_la_LIBADD) $(LIBS) libtv_SSE.la: $(libtv_SSE_la_OBJECTS) $(libtv_SSE_la_DEPENDENCIES) $(LINK) $(am_libtv_SSE_la_rpath) $(libtv_SSE_la_LDFLAGS) $(libtv_SSE_la_OBJECTS) $(libtv_SSE_la_LIBADD) $(LIBS) clean-noinstPROGRAMS: @list='$(noinst_PROGRAMS)'; for p in $$list; do \ f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ echo " rm -f $$p $$f"; \ rm -f $$p $$f ; \ done lut_rgb16-gen$(EXEEXT): $(lut_rgb16_gen_OBJECTS) $(lut_rgb16_gen_DEPENDENCIES) @rm -f lut_rgb16-gen$(EXEEXT) $(LINK) $(lut_rgb16_gen_LDFLAGS) $(lut_rgb16_gen_OBJECTS) $(lut_rgb16_gen_LDADD) $(LIBS) lut_yuv2rgb-gen$(EXEEXT): $(lut_yuv2rgb_gen_OBJECTS) $(lut_yuv2rgb_gen_DEPENDENCIES) @rm -f lut_yuv2rgb-gen$(EXEEXT) $(LINK) $(lut_yuv2rgb_gen_LDFLAGS) $(lut_yuv2rgb_gen_OBJECTS) $(lut_yuv2rgb_gen_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/callback.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/clear_image.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/clip_vector.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/control.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/copy_image.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpu.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/image_format.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libtv_MMX_la-clear_image.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libtv_MMX_la-copy_image.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libtv_MMX_la-rgb2rgb.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libtv_MMX_la-yuv2rgb.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libtv_MMX_la-yuv2yuv.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libtv_SSE_la-clear_image.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libtv_SSE_la-copy_image.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lut_rgb16-gen.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lut_rgb16.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lut_yuv2rgb-gen.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lut_yuv2rgb.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/misc.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pixel_format.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rgb2rgb.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/screen.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/simd.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/yuv2rgb.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/yuv2yuv.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< libtv_MMX_la-clear_image.lo: clear_image.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libtv_MMX_la_CFLAGS) $(CFLAGS) -MT libtv_MMX_la-clear_image.lo -MD -MP -MF "$(DEPDIR)/libtv_MMX_la-clear_image.Tpo" -c -o libtv_MMX_la-clear_image.lo `test -f 'clear_image.c' || echo '$(srcdir)/'`clear_image.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libtv_MMX_la-clear_image.Tpo" "$(DEPDIR)/libtv_MMX_la-clear_image.Plo"; else rm -f "$(DEPDIR)/libtv_MMX_la-clear_image.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='clear_image.c' object='libtv_MMX_la-clear_image.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libtv_MMX_la_CFLAGS) $(CFLAGS) -c -o libtv_MMX_la-clear_image.lo `test -f 'clear_image.c' || echo '$(srcdir)/'`clear_image.c libtv_MMX_la-copy_image.lo: copy_image.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libtv_MMX_la_CFLAGS) $(CFLAGS) -MT libtv_MMX_la-copy_image.lo -MD -MP -MF "$(DEPDIR)/libtv_MMX_la-copy_image.Tpo" -c -o libtv_MMX_la-copy_image.lo `test -f 'copy_image.c' || echo '$(srcdir)/'`copy_image.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libtv_MMX_la-copy_image.Tpo" "$(DEPDIR)/libtv_MMX_la-copy_image.Plo"; else rm -f "$(DEPDIR)/libtv_MMX_la-copy_image.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='copy_image.c' object='libtv_MMX_la-copy_image.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libtv_MMX_la_CFLAGS) $(CFLAGS) -c -o libtv_MMX_la-copy_image.lo `test -f 'copy_image.c' || echo '$(srcdir)/'`copy_image.c libtv_MMX_la-rgb2rgb.lo: rgb2rgb.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libtv_MMX_la_CFLAGS) $(CFLAGS) -MT libtv_MMX_la-rgb2rgb.lo -MD -MP -MF "$(DEPDIR)/libtv_MMX_la-rgb2rgb.Tpo" -c -o libtv_MMX_la-rgb2rgb.lo `test -f 'rgb2rgb.c' || echo '$(srcdir)/'`rgb2rgb.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libtv_MMX_la-rgb2rgb.Tpo" "$(DEPDIR)/libtv_MMX_la-rgb2rgb.Plo"; else rm -f "$(DEPDIR)/libtv_MMX_la-rgb2rgb.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='rgb2rgb.c' object='libtv_MMX_la-rgb2rgb.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libtv_MMX_la_CFLAGS) $(CFLAGS) -c -o libtv_MMX_la-rgb2rgb.lo `test -f 'rgb2rgb.c' || echo '$(srcdir)/'`rgb2rgb.c libtv_MMX_la-yuv2rgb.lo: yuv2rgb.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libtv_MMX_la_CFLAGS) $(CFLAGS) -MT libtv_MMX_la-yuv2rgb.lo -MD -MP -MF "$(DEPDIR)/libtv_MMX_la-yuv2rgb.Tpo" -c -o libtv_MMX_la-yuv2rgb.lo `test -f 'yuv2rgb.c' || echo '$(srcdir)/'`yuv2rgb.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libtv_MMX_la-yuv2rgb.Tpo" "$(DEPDIR)/libtv_MMX_la-yuv2rgb.Plo"; else rm -f "$(DEPDIR)/libtv_MMX_la-yuv2rgb.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='yuv2rgb.c' object='libtv_MMX_la-yuv2rgb.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libtv_MMX_la_CFLAGS) $(CFLAGS) -c -o libtv_MMX_la-yuv2rgb.lo `test -f 'yuv2rgb.c' || echo '$(srcdir)/'`yuv2rgb.c libtv_MMX_la-yuv2yuv.lo: yuv2yuv.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libtv_MMX_la_CFLAGS) $(CFLAGS) -MT libtv_MMX_la-yuv2yuv.lo -MD -MP -MF "$(DEPDIR)/libtv_MMX_la-yuv2yuv.Tpo" -c -o libtv_MMX_la-yuv2yuv.lo `test -f 'yuv2yuv.c' || echo '$(srcdir)/'`yuv2yuv.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libtv_MMX_la-yuv2yuv.Tpo" "$(DEPDIR)/libtv_MMX_la-yuv2yuv.Plo"; else rm -f "$(DEPDIR)/libtv_MMX_la-yuv2yuv.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='yuv2yuv.c' object='libtv_MMX_la-yuv2yuv.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libtv_MMX_la_CFLAGS) $(CFLAGS) -c -o libtv_MMX_la-yuv2yuv.lo `test -f 'yuv2yuv.c' || echo '$(srcdir)/'`yuv2yuv.c libtv_SSE_la-clear_image.lo: clear_image.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libtv_SSE_la_CFLAGS) $(CFLAGS) -MT libtv_SSE_la-clear_image.lo -MD -MP -MF "$(DEPDIR)/libtv_SSE_la-clear_image.Tpo" -c -o libtv_SSE_la-clear_image.lo `test -f 'clear_image.c' || echo '$(srcdir)/'`clear_image.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libtv_SSE_la-clear_image.Tpo" "$(DEPDIR)/libtv_SSE_la-clear_image.Plo"; else rm -f "$(DEPDIR)/libtv_SSE_la-clear_image.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='clear_image.c' object='libtv_SSE_la-clear_image.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libtv_SSE_la_CFLAGS) $(CFLAGS) -c -o libtv_SSE_la-clear_image.lo `test -f 'clear_image.c' || echo '$(srcdir)/'`clear_image.c libtv_SSE_la-copy_image.lo: copy_image.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libtv_SSE_la_CFLAGS) $(CFLAGS) -MT libtv_SSE_la-copy_image.lo -MD -MP -MF "$(DEPDIR)/libtv_SSE_la-copy_image.Tpo" -c -o libtv_SSE_la-copy_image.lo `test -f 'copy_image.c' || echo '$(srcdir)/'`copy_image.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libtv_SSE_la-copy_image.Tpo" "$(DEPDIR)/libtv_SSE_la-copy_image.Plo"; else rm -f "$(DEPDIR)/libtv_SSE_la-copy_image.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='copy_image.c' object='libtv_SSE_la-copy_image.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libtv_SSE_la_CFLAGS) $(CFLAGS) -c -o libtv_SSE_la-copy_image.lo `test -f 'copy_image.c' || echo '$(srcdir)/'`copy_image.c mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool uninstall-info-am: # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" mostlyclean-recursive clean-recursive distclean-recursive \ maintainer-clean-recursive: @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(mkdir_p) "$(distdir)/$$subdir" \ || exit 1; \ distdir=`$(am__cd) $(distdir) && pwd`; \ top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ (cd $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$top_distdir" \ distdir="$$distdir/$$subdir" \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) check-recursive all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) installdirs: installdirs-recursive installdirs-am: install: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-recursive clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ clean-noinstPROGRAMS mostlyclean-am distclean: distclean-recursive -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-libtool distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive info: info-recursive info-am: install-data-am: install-exec-am: install-info: install-info-recursive install-man: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-info-am uninstall-info: uninstall-info-recursive .PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am \ clean clean-generic clean-libtool clean-noinstLTLIBRARIES \ clean-noinstPROGRAMS clean-recursive ctags ctags-recursive \ distclean distclean-compile distclean-generic \ distclean-libtool distclean-recursive distclean-tags distdir \ dvi dvi-am html html-am info info-am install install-am \ install-data install-data-am install-exec install-exec-am \ install-info install-info-am install-man install-strip \ installcheck installcheck-am installdirs installdirs-am \ maintainer-clean maintainer-clean-generic \ maintainer-clean-recursive mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool mostlyclean-recursive \ pdf pdf-am ps ps-am tags tags-recursive uninstall uninstall-am \ uninstall-info-am @MAINTAINER_MODE_TRUE@lut_rgb16.c: lut_rgb16-gen Makefile.am @MAINTAINER_MODE_TRUE@ $(top_builddir)/libtv/lut_rgb16-gen$(EXEEXT) > $@ @MAINTAINER_MODE_TRUE@lut_yuv2rgb.c: lut_yuv2rgb-gen Makefile.am @MAINTAINER_MODE_TRUE@ $(top_builddir)/libtv/lut_yuv2rgb-gen$(EXEEXT) > $@ @MAINTAINER_MODE_TRUE@lut_yuv2rgb.h: lut_yuv2rgb-gen Makefile.am @MAINTAINER_MODE_TRUE@ $(top_builddir)/libtv/lut_yuv2rgb-gen$(EXEEXT) header > $@ # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: zapping-0.10cvs6/libtv/misc.c 644 764 144 4613 10176066003 11227 /* * Copyright (C) 2001-2004 Michael H. Schimek * Copyright (C) 2000-2003 Iaki Garca Etxebarria * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* $Id: misc.c,v 1.2 2005/01/27 04:20:19 mschimek Exp $ */ #include /* malloc() */ #include "misc.h" #ifndef HAVE_STRLCPY /** * @internal * strlcpy() is a BSD/GNU extension. */ size_t _tv_strlcpy (char * dst, const char * src, size_t len) { char *dst1; char *end; char c; assert (NULL != dst); assert (NULL != src); assert (len > 0); dst1 = dst; end = dst + len - 1; while (dst < end && (c = *src++)) *dst++ = c; *dst = 0; return dst - dst1; } #endif /* !HAVE_STRLCPY */ #ifndef HAVE_STRNDUP /** * @internal * strndup() is a BSD/GNU extension. */ char * _tv_strndup (const char * s, size_t len) { size_t n; char *r; if (NULL == s) return NULL; n = strlen (s); len = MIN (len, n); r = malloc (len + 1); if (r) { memcpy (r, s, len); r[len] = 0; } return r; } #endif /* !HAVE_STRNDUP */ #ifndef HAVE_ASPRINTF /** * @internal * asprintf() is a GNU extension. */ int _tv_asprintf (char ** dstp, const char * templ, ...) { char *buf; int size; int temp; assert (NULL != dstp); assert (NULL != templ); temp = errno; buf = NULL; size = 64; for (;;) { va_list ap; char *buf2; int len; if (!(buf2 = realloc (buf, size))) break; buf = buf2; va_start (ap, templ); len = vsnprintf (buf, size, templ, ap); va_end (ap); if (len < 0) { /* Not enough. */ size *= 2; } else if (len < size) { *dstp = buf; errno = temp; return len; } else { /* Size needed. */ size = len + 1; } } free (buf); *dstp = NULL; errno = temp; return -1; } #endif /* !HAVE_ASPRINTF */ zapping-0.10cvs6/libtv/misc.h 644 764 144 16560 10417056137 11265 /* * Copyright (C) 2001-2004 Michael H. Schimek * Copyright (C) 2000-2003 Iaki Garca Etxebarria * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* $Id: misc.h,v 1.12 2006/04/12 01:48:15 mschimek Exp $ */ #ifndef __ZTV_MISC_H__ #define __ZTV_MISC_H__ #ifdef HAVE_CONFIG_H # include "config.h" #endif #include #include #include #include #include "macros.h" #define N_ELEMENTS(array) (sizeof (array) / sizeof (*(array))) #ifdef __GNUC__ #undef likely #undef unlikely #if __GNUC__ < 3 /* Expect expression usually true/false, schedule accordingly. */ # define likely(expr) (expr) # define unlikely(expr) (expr) #else # define likely(expr) __builtin_expect(expr, 1) # define unlikely(expr) __builtin_expect(expr, 0) #endif #undef __i386__ #undef __i686__ #if #cpu (i386) # define __i386__ 1 #endif #if #cpu (i686) # define __i686__ 1 #endif /* &x == PARENT (&x.tm_min, struct tm, tm_min), safer than &x == (struct tm *) &x.tm_min. A NULL _ptr is safe and will return NULL, not -offsetof(_member). */ #undef PARENT #define PARENT(_ptr, _type, _member) ({ \ __typeof__ (&((_type *) 0)->_member) _p = (_ptr); \ (_p != 0) ? (_type *)(((char *) _p) - offsetof (_type, \ _member)) : (_type *) 0; \ }) /* Like PARENT(), to be used with const _ptr. */ #undef CONST_PARENT #define CONST_PARENT(_ptr, _type, _member) ({ \ __typeof__ (&((const _type *) 0)->_member) _p = (_ptr); \ (_p != 0) ? (const _type *)(((const char *) _p) - offsetof \ (const _type, _member)) : (const _type *) 0; \ }) /* Note the following macros have no side effects only when you compile with GCC, so don't expect this. */ /* Absolute value of int without a branch. Note ABS (INT_MIN) == INT_MAX + 1. */ #undef ABS #define ABS(n) ({ \ register int _n = (n), _t = _n; \ _t >>= sizeof (_t) * 8 - 1; /* assumes signed shift, safe? */ \ _n ^= _t; \ _n -= _t; \ }) #undef MIN #define MIN(x, y) ({ \ __typeof__ (x) _x = (x); \ __typeof__ (y) _y = (y); \ (void)(&_x == &_y); /* alert when type mismatch */ \ (_x < _y) ? _x : _y; \ }) #undef MAX #define MAX(x, y) ({ \ __typeof__ (x) _x = (x); \ __typeof__ (y) _y = (y); \ (void)(&_x == &_y); /* alert when type mismatch */ \ (_x > _y) ? _x : _y; \ }) #define SWAP(x, y) \ do { \ __typeof__ (x) _x = x; \ x = y; \ y = _x; \ } while (0) #undef SATURATE #ifdef __i686__ /* has conditional move. */ #define SATURATE(n, min, max) ({ \ __typeof__ (n) _n = (n); \ __typeof__ (n) _min = (min); \ __typeof__ (n) _max = (max); \ (void)(&_n == &_min); /* alert when type mismatch */ \ (void)(&_n == &_max); \ if (_n < _min) \ _n = _min; \ if (_n > _max) \ _n = _max; \ _n; \ }) #else #define SATURATE(n, min, max) ({ \ __typeof__ (n) _n = (n); \ __typeof__ (n) _min = (min); \ __typeof__ (n) _max = (max); \ (void)(&_n == &_min); /* alert when type mismatch */ \ (void)(&_n == &_max); \ if (_n < _min) \ _n = _min; \ else if (_n > _max) \ _n = _max; \ _n; \ }) #endif #define SWAB16(n) ({ \ __typeof__ (n) _n = (n); \ ((_n & 0xFF) << 8) | ((_n >> 8) & 0xFF); \ }) #else /* !__GNUC__ */ #define likely(expr) (expr) #define unlikely(expr) (expr) #undef __i386__ #undef __i686__ #define __attribute__(args...) static char * PARENT_HELPER (char *p, unsigned int offset) { return (p == 0) ? 0 : p - offset; } static const char * CONST_PARENT_HELPER (const char *p, unsigned int offset) { return (p == 0) ? 0 : p - offset; } #undef PARENT #define PARENT(_ptr, _type, _member) \ ((offsetof (_type, _member) == 0) ? (_type *)(_ptr) \ : (_type *) PARENT_HELPER ((char *)(_ptr), offsetof (_type, _member))) #undef CONST_PARENT #define CONST_PARENT(_ptr, _type, _member) \ ((offsetof (const _type, _member) == 0) ? (const _type *)(_ptr) \ : (const _type *) CONST_PARENT_HELPER ((const char *)(_ptr), \ offsetof (const _type, _member))) #undef ABS #define ABS(n) (((n) < 0) ? -(n) : (n)) #undef MIN #define MIN(x, y) (((x) < (y)) ? (x) : (y)) #undef MAX #define MAX(x, y) (((x) > (y)) ? (x) : (y)) #define SWAP(x, y) \ do { \ long _x = x; \ x = y; \ y = _x; \ } while (0) #undef SATURATE #define SATURATE(n, min, max) MIN (MAX (n, min), max) #define SWAB16(n) ((((n) & 0xFF) << 8) | (((n) >> 8) & 0xFF)) #endif /* !__GNUC__ */ /* Find first set bit in 32 bit constant, see man 3 ffs. */ #define FFS2(m) ((m) & 0x2 ? 2 : 1) #define FFS4(m) ((m) & 0xC ? 2 + FFS2 ((m) >> 2) : FFS2 (m)) #define FFS8(m) ((m) & 0xF0 ? 4 + FFS4 ((m) >> 4) : FFS4 (m)) #define FFS16(m) ((m) & 0xFF00 ? 8 + FFS8 ((m) >> 8) : FFS8 (m)) #define FFS32(m) ((m) & 0xFFFF0000 ? 16 + FFS16 ((m) >> 16) : FFS16 (m)) #define FFS(m) (0 == (m) ? 0 : FFS32 (m)) /* Masks m bits out of v, then shifts msb to position n (0 ... 31). E.g. v=0x1234, m=0x0FF0, n=7 -> 0x0023. */ #undef MASKED_SHIFT #define MASKED_SHIFT(v, m, n) \ ((FFS (m) > (int)(n) + 1) ? \ (((v) & (m)) >> (FFS (m) - (n) - 1)) : \ (((v) & (m)) << MIN ((int)(n) + 1 - FFS (m), 31))) /* E.g. v=0x1234, m=0x0FF0, n=7 -> 0x0340. */ #undef SHIFT_MASKED #define SHIFT_MASKED(v, m, n) \ ((FFS (m) > (int)(n) + 1) ? \ (((v) << (FFS (m) - (n) - 1)) & (m)) : \ (((v) >> MIN ((int)(n) + 1 - FFS32 (m), 31) & (m))) #undef CLAMP #define CLAMP(n, min, max) SATURATE (n, min, max) /* NB gcc inlines and optimizes when size is const. */ #define SET(var) memset (&(var), ~0, sizeof (var)) #define CLEAR(var) memset (&(var), 0, sizeof (var)) #define COPY(d, s) /* useful to copy arrays, otherwise use assignment */ \ (assert (sizeof (d) == sizeof (s)), memcpy (d, s, sizeof (d))) /* legacy, to be removed/replaced */ #ifndef printv #include extern int debug_msg; #define printv(format, args...) \ do { \ if (debug_msg) { \ fprintf(stderr, format ,##args); \ fflush(stderr); } \ } while (0) #endif #ifdef HAVE_STRLCPY # define _tv_strlcpy strlcpy #else extern size_t _tv_strlcpy (char * dst, const char * src, size_t len); #endif #ifdef HAVE_STRNDUP # define _tv_strndup strndup #else extern char * _tv_strndup (const char * s, size_t len); #endif #ifdef HAVE_ASPRINTF # define _tv_asprintf asprintf #else int _tv_asprintf (char ** dstp, const char * templ, ...); #endif typedef void clear_plane_fn (uint8_t * dst, unsigned int value, unsigned int width, unsigned int height, unsigned long padding); typedef void copy_plane_fn (uint8_t * dst, const uint8_t * src, unsigned int width, unsigned int height, unsigned long dst_padding, unsigned long src_padding); #endif /* MISC_H */ zapping-0.10cvs6/libtv/rgb2rgb.c 644 764 144 70332 10417055665 11656 /* * Copyright (C) 2006 Michael H. Schimek * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* $Id: rgb2rgb.c,v 1.5 2006/04/12 01:45:25 mschimek Exp $ */ /* RGB to RGB image format conversion functions: TV_PIXFMT_RGBA32_LE (= TV_PIXFMT_ABGR32_BE), TV_PIXFMT_RGBA32_BE (= TV_PIXFMT_ABGR32_LE), TV_PIXFMT_BGRA32_LE (= TV_PIXFMT_ARGB32_BE), TV_PIXFMT_BGRA32_BE (= TV_PIXFMT_ARGB32_LE), TV_PIXFMT_RGB24_LE (= TV_PIXFMT_BGR24_BE), TV_PIXFMT_RGB24_BE (= TV_PIXFMT_BGR24_LE), TV_PIXFMT_SBGGR, to TV_PIXFMT_RGBA32_LE (= TV_PIXFMT_ABGR32_BE), TV_PIXFMT_RGBA32_BE (= TV_PIXFMT_ABGR32_LE), TV_PIXFMT_BGRA32_LE (= TV_PIXFMT_ARGB32_BE), TV_PIXFMT_BGRA32_BE (= TV_PIXFMT_ARGB32_LE), TV_PIXFMT_RGB24_LE (= TV_PIXFMT_BGR24_BE), TV_PIXFMT_RGB24_BE (= TV_PIXFMT_BGR24_LE), TV_PIXFMT_BGR16_LE, TV_PIXFMT_BGR16_BE, TV_PIXFMT_BGRA16_LE, TV_PIXFMT_BGRA16_BE, */ #ifdef HAVE_CONFIG_H # include "config.h" #endif #include "lut_rgb16.h" #include "simd-conv.h" #include "rgb2rgb.h" #include "yuv2yuv.h" /* shuffle routines */ #define Z_LE Z_LITTLE_ENDIAN #define Z_BE Z_BIG_ENDIAN #if !SIMD tv_bool _tv_rgb32_to_rgb16 (void * dst_image, const tv_image_format *dst_format, const void * src_image, const tv_image_format *src_format) { uint16_t *dst; const uint8_t *src; unsigned int width; unsigned int height; unsigned long dst_padding; unsigned long src_padding; const uint16_t (* lp)[256]; uint16_t alpha1; width = MIN (dst_format->width, src_format->width); height = MIN (dst_format->height, src_format->height); if (0 == width || 0 == height) return FALSE; dst = (uint16_t *)((uint8_t *) dst_image + dst_format->offset[0]); src = (const uint8_t *) src_image + src_format->offset[0]; dst_padding = dst_format->bytes_per_line[0] - width * 2; switch (dst_format->pixel_format->pixfmt) { #undef DST_CASE #define DST_CASE(fmt, depth, en, lut, a1) \ case TV_PIXFMT_ ## fmt ## depth ## _ ## en: \ lp = lut[Z_BYTE_ORDER != Z_ ## en]; \ alpha1 = (Z_BYTE_ORDER == Z_ ## en) ? a1 : SWAB16 (a1); \ goto fmt; #if 0 DST_CASE (RGBA, 12, LE, _tv_lut_rgb12, 0xF000) DST_CASE (RGBA, 12, BE, _tv_lut_rgb12, 0xF000) DST_CASE (BGRA, 12, LE, _tv_lut_rgb12, 0xF000) DST_CASE (BGRA, 12, BE, _tv_lut_rgb12, 0xF000) DST_CASE (RGB, 16, LE, _tv_lut_rgb16, 0) DST_CASE (RGB, 16, BE, _tv_lut_rgb16, 0) DST_CASE (RGBA, 16, LE, _tv_lut_rgb16, 0x8000) DST_CASE (RGBA, 16, BE, _tv_lut_rgb16, 0x8000) #endif DST_CASE (BGR, 16, LE, _tv_lut_rgb16, 0) DST_CASE (BGR, 16, BE, _tv_lut_rgb16, 0) DST_CASE (BGRA, 16, LE, _tv_lut_rgb16, 0x8000) DST_CASE (BGRA, 16, BE, _tv_lut_rgb16, 0x8000) default: return FALSE; } #undef LOOP #define LOOP(c0, c1, c2, c3, src_bpp) \ do { \ src_padding = src_format->bytes_per_line[0] - width * src_bpp; \ \ if ((long)(src_padding | dst_padding) < 0) { \ return FALSE; \ } else if (0 == (src_padding | dst_padding)) { \ width *= height; \ height = 1; \ } \ \ while (height-- > 0) { \ const uint8_t *end; \ \ for (end = src + width * src_bpp; src < end;) { \ if (c0 < 0) { \ *dst++ = (lp[c1][src[1]] | \ lp[c2][src[2]] | \ lp[c3][src[3]] | \ alpha1); \ } else if (c3 < 0) { \ *dst++ = (lp[c0][src[0]] | \ lp[c1][src[1]] | \ lp[c2][src[2]] | \ alpha1); \ } else { \ *dst++ = (lp[c0][src[0]] | \ lp[c1][src[1]] | \ lp[c2][src[2]] | \ lp[c3][src[3]]); \ } \ \ src += src_bpp; \ } \ \ dst = (uint16_t *)((uint8_t *) dst + dst_padding); \ src += src_padding; \ } \ } while (0) #undef SRC_SWITCH #define SRC_SWITCH(r, g, b, a) \ do { \ switch (src_format->pixel_format->pixfmt) { \ case TV_PIXFMT_RGBA32_LE: \ LOOP (r, g, b, a, 4); \ break; \ \ case TV_PIXFMT_RGBA32_BE: \ LOOP (a, b, g, r, 4); \ break; \ \ case TV_PIXFMT_BGRA32_LE: \ LOOP (b, g, r, a, 4); \ break; \ \ case TV_PIXFMT_BGRA32_BE: \ LOOP (a, r, g, b, 4); \ break; \ \ case TV_PIXFMT_RGB24_LE: \ LOOP (r, g, b, -1, 3); \ break; \ \ case TV_PIXFMT_RGB24_BE: \ LOOP (b, g, r, -1, 3); \ break; \ \ default: \ return FALSE; \ } \ \ return TRUE; \ } while (0) #if 0 RGB: SRC_SWITCH (4, 2, 0, -1); RGBA: SRC_SWITCH (4, 3, 1, 5); #endif BGR: SRC_SWITCH (0, 2, 4, -1); BGRA: SRC_SWITCH (1, 3, 4, 5); } tv_bool _tv_rgb32_to_rgb32 (void * dst_image, const tv_image_format *dst_format, const void * src_image, const tv_image_format *src_format) { static const char matrix [6][6] = { { 0, 1, 2, 12, 8, 10 }, { 1, 0, 3, 13, 9, 11 }, { 2, 12, 0, 1, 10, 8 }, { 3, 13, 1, 0, 11, 9 }, { 4, 5, 6, 7, 0, 10 }, { 6, 7, 4, 5, 10, 0 } }; uint8_t *dst; const uint8_t *src; unsigned int width; unsigned int height; long dst_padding; long src_padding; unsigned int src_bpp; tv_pixfmt dst_pixfmt; tv_pixfmt src_pixfmt; width = MIN (dst_format->width, src_format->width); height = MIN (dst_format->height, src_format->height); if (0 == width || 0 == height) return FALSE; dst_padding = dst_format->bytes_per_line[0] - ((width * dst_format->pixel_format->bits_per_pixel) >> 3); src_padding = src_format->bytes_per_line[0] - ((width * src_format->pixel_format->bits_per_pixel) >> 3); if (likely (0 == (src_padding | dst_padding))) { width *= height; height = 1; } else if (unlikely ((long)(src_padding | dst_padding) < 0)) { return FALSE; } dst = (uint8_t *) dst_image + dst_format->offset[0]; src = (const uint8_t *) src_image + src_format->offset[0]; #undef LOOP #define LOOP(op, src_bpp, dst_bpp) \ do { \ while (height-- > 0) { \ const uint8_t *end; \ \ for (end = src + width * src_bpp; src < end;) { \ op; \ src += src_bpp; \ dst += dst_bpp; \ } \ \ src += src_padding; \ dst += dst_padding; \ } \ } while (0) dst_pixfmt = dst_format->pixel_format->pixfmt; src_pixfmt = src_format->pixel_format->pixfmt; switch (matrix[src_pixfmt - TV_PIXFMT_RGBA32_LE] [dst_pixfmt - TV_PIXFMT_RGBA32_LE]) { case 0: /* identity */ return tv_copy_image (dst_image, dst_format, src_image, src_format); case 1: /* ABGR -> RGBA, ARGB -> BGRA */ _tv_shuffle_3210_SCALAR (dst, src, width * 4, height, dst_padding, src_padding); break; case 2: /* BGRA -> RGBA, RGBA -> BGRA */ _tv_shuffle_2103_SCALAR (dst, src, width * 4, height, dst_padding, src_padding); break; case 3: /* ARGB -> RGBA, ABGR -> BGRA */ _tv_shuffle_1230_SCALAR (dst, src, width * 4, height, dst_padding, src_padding); break; case 12: /* BGRA -> ABGR, RGBA -> ARGB */ _tv_shuffle_3012_SCALAR (dst, src, width * 4, height, dst_padding, src_padding); break; case 13: /* ARGB -> ABGR, ABGR -> ARGB */ _tv_shuffle_0321_SCALAR (dst, src, width * 4, height, dst_padding, src_padding); break; case 4: /* RGB -> RGBA, BGR -> BGRA */ LOOP ({ dst[0] = src[0]; dst[1] = src[1]; dst[2] = src[2]; dst[3] = 0xFF; }, 3, 4); break; case 5: /* RGB -> ABGR, BGR -> ARGB */ LOOP ({ dst[0] = 0xFF; dst[1] = src[2]; dst[2] = src[1]; dst[3] = src[0]; }, 3, 4); break; case 6: /* RGB -> BGRA, BGR -> RGBA */ LOOP ({ dst[0] = src[2]; dst[1] = src[1]; dst[2] = src[0]; dst[3] = 0xFF; }, 3, 4); break; case 7: /* RGB -> ARGB, BGR -> ABGR */ LOOP ({ dst[0] = 0xFF; dst[1] = src[0]; dst[2] = src[1]; dst[3] = src[2]; }, 3, 4); break; case 11: /* ARGB -> RGB, ABGR -> BGR */ ++src; case 8: /* RGBA -> RGB, BGRA -> BGR */ LOOP ({ dst[0] = src[0]; dst[1] = src[1]; dst[2] = src[2]; }, 4, 3); break; case 9: /* ABGR -> RGB, ARGB -> BGR */ ++src; case 10: /* BGRA -> RGB, RGBA -> BGR, BGR <-> RGB */ src_bpp = src_format->pixel_format->bits_per_pixel >> 3; LOOP ({ dst[0] = src[2]; dst[1] = src[1]; dst[2] = src[0]; }, src_bpp, 3); break; default: return FALSE; } return TRUE; } #endif /* !SIMD */ typedef tv_bool sbggr_to_rgb_fn (void * dst_image, const tv_image_format *dst_format, const void * src_image, const tv_image_format *src_format); SIMD_FN_PROTOS (sbggr_to_rgb_fn, _tv_sbggr_to_rgb) #if SIMD /* Memory: 89abcdefghij (src + offset points at a) mm = 9bdf extended to 16 bits, bbdf in first column m0 = aceg extended to 16 bits m1 = bdfh extended to 16 bits m2 = cegi extended to 16 bits, cegg in last column We should really calculate the average of three pixels in first and last column, but this is easier. */ static always_inline void bggr_load (v16 * mm, v16 * m0, v16 * m1, v16 * m2, const uint8_t * src, long offset, tv_bool in_first_column, tv_bool in_last_column) { *m0 = vload (src, offset); #if SIMD & (CPU_FEATURE_MMX | CPU_FEATURE_3DNOW) *m1 = vsru16 ((vu16) *m0, 8); *m0 = vand (*m0, vsplat16_255); if (mm) { if (in_first_column) { *mm = vor (vsl (*m1, 16), vand (*m1, _mm_set_pi16 (0, 0, 0, -1))); } else { *mm = vsru16 (vload (src, offset - 2), 8); } } if (m2) { if (in_last_column) { *m2 = vor (vsru (*m0, 16), vand (*m0, _mm_set_pi16 (-1, 0, 0, 0))); } else { *m2 = vsru16 (vload (src, offset + 1), 8); } } #elif SIMD & CPU_FEATURE_SSE_INT *m1 = vsru16 ((vu16) *m0, 8); *m0 = vand (*m0, vsplat16_255); if (mm) { *mm = _mm_shuffle_pi16 (*m1, _MM_SHUFFLE (2, 1, 0, 0)); if (!in_first_column) { unsigned int t = src[offset - 1]; *mm = _mm_insert_pi16 (vsl (*mm, 16), t, 0); } } if (m2) { *m2 = _mm_shuffle_pi16 (*m0, _MM_SHUFFLE (3, 3, 2, 1)); if (!in_last_column) { unsigned int t = src[offset + sizeof (vu8)]; *m2 = _mm_insert_pi16 (vsru (*m2, 16), t, 3); } } #elif SIMD & CPU_FEATURE_SSE2 *m1 = vsru16 ((vu16) *m0, 8); *m0 = vand (*m0, vsplat16_255); if (mm) { *mm = _mm_slli_si128 (*m1, 2); if (in_first_column) { *mm = _mm_shufflelo_epi16 (*m1, _MM_SHUFFLE (2, 1, 0, 0)); } else { unsigned int t = src[offset - 1]; *mm = _mm_insert_epi16 (*mm, t, 0); } } if (m2) { *m2 = _mm_srli_si128 (*m0, 2); if (in_last_column) { *m2 = _mm_shufflehi_epi16 (*m0, _MM_SHUFFLE (3, 3, 2, 1)); } else { unsigned int t = src[offset + sizeof (vu8)]; *m2 = _mm_insert_epi16 (*m2, t, 7); } } #elif SIMD & CPU_FEATURE_ALTIVEC *m1 = vand (*m0, vsplat16_255); *m0 = vsru16 ((vu16) *m0, 8); if (mm} { if (in_first_column) { const vu8 sel = { 0x00, 0x01, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D }; *mm = vec_perm (*m1, *m1, sel); } else { *mm = vload (src, offset - sizeof (v16)); *mm = vand (*mm, vsplat16_255); *mm = vec_perm (*mm, *m1, vec_lvsl (-2, src)); } } if (m2) { if (in_last_column) { const vu8 sel = { 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x0E, 0x0F }; *m2 = vec_perm (*m0, *m0, sel); } else { *m2 = vload (src, offset + sizeof (v16)); *m2 = vsru16 ((vu16) *m2, 8); *m2 = vec_perm (*m0, *m2, vec_lvsl (+2, src)); } } #endif /* SIMD */ } #if SIMD & (CPU_FEATURE_MMX | CPU_FEATURE_3DNOW) /* Memory layout: xxx xxx xxx xxx xxx xxx ... xxx Gmm Bm0 Gm1 Bm2 Gm3 ... xxx R0m(G00 R01)G02 R03 ... xxx G1m(B10 G11)B12 G13 ... xxx R2m G20 R21 G22 R22 ... Converts four bytes of GRBG to RGB. src points at G00. */ static always_inline void sbggr_odd_kernel (uint8_t * dst, const uint8_t * src, unsigned long dst_bpl, unsigned long src_bpl, tv_pixfmt pixfmt, tv_bool in_first_column, tv_bool in_last_column) { v16 bm0, gm1, bm2; v16 g1m, b10, g11, b12; v16 r0m, g00, r01, g02; v16 gx; v16 r2m, g20, r21; dst_bpl = dst_bpl; bggr_load (&g1m, &b10, &g11, &b12, src, +1 * src_bpl, in_first_column, in_last_column); b12 = vadd16 (b12, vsplat16_1); bggr_load (NULL, &bm0, &gm1, &bm2, src, -1 * src_bpl, in_first_column, in_last_column); bm0 = vadd16 (vadd16 (bm0, b10), vsplat16_1); bm2 = vsr16 (vadd16 (vadd16 (bm2, bm0), b12), 2); bggr_load (&r0m, &g00, &r01, &g02, src, 0 * src_bpl, in_first_column, in_last_column); r0m = vadd16 (r0m, vsplat16_1); gx = vadd16 (vadd16 (g00, g11), vsplat16_2); gm1 = vsr16 (vadd16 (vadd16 (gm1, g02), gx), 2); g1m = vadd16 (g1m, gx); store_rgb16 (dst, /* offset */ 0, pixfmt, /* saturate */ FALSE, /* r */ vsr16 (vadd16 (r0m, r01), 1), r01, /* g */ g00, gm1, /* b */ vsr16 (bm0, 1), bm2); bggr_load (&r2m, &g20, &r21, NULL, src, +2 * src_bpl, in_first_column, in_last_column); r21 = vadd16 (vadd16 (r21, r01), vsplat16_1); r2m = vsr16 (vadd16 (vadd16 (r2m, r21), r0m), 2); g1m = vsr16 (vadd16 (g1m, g20), 2); store_rgb16 (dst, /* offset */ dst_bpl, pixfmt, /* saturate */ FALSE, /* r */ r2m, vsr16 (r21, 1), /* g */ g1m, g11, /* b */ b10, vsr16 (vadd16 (b12, b10), 1)); } #elif SIMD & (CPU_FEATURE_SSE_INT | CPU_FEATURE_SSE2 | CPU_FEATURE_ALTIVEC) /* Memory layout: xxx xxx xxx xxx xxx xxx ... xxx Gmm Bm0 Gm1 Bm2 Gm3 ... xxx R0m(G00 R01)G02 R03 ... xxx G1m(B10 G11)B12 G13 ... xxx R2m G20 R21 G22 R22 ... Converts four bytes of GRBG to RGB. src points at G00. */ static always_inline void sbggr_odd_kernel (uint8_t * dst, const uint8_t * src, unsigned long dst_bpl, unsigned long src_bpl, tv_pixfmt pixfmt, tv_bool in_first_column, tv_bool in_last_column) { v16 bm0, gm1, bm2; v16 g1m, b10, g11, b12; v16 r0m, g00, r01, g02; v16 gx; v16 r2m, g20, r21; dst_bpl = dst_bpl; bggr_load (NULL, &bm0, &gm1, &bm2, src, -1 * src_bpl, in_first_column, in_last_column); bggr_load (&g1m, &b10, &g11, &b12, src, +1 * src_bpl, in_first_column, in_last_column); bm2 = vadd16 (vadd16 (vadd16 (bm2, bm0), b12), b10); bm2 = vsr16 (vadd16 (bm2, vsplat16_2), 2); bggr_load (&r0m, &g00, &r01, &g02, src, 0 * src_bpl, in_first_column, in_last_column); gx = vadd16 (vadd16 (g00, g11), vsplat16_2); gm1 = vsr16 (vadd16 (vadd16 (gm1, g02), gx), 2); g1m = vadd16 (g1m, gx); store_rgb16 (dst, /* offset */ 0, pixfmt, /* saturate */ FALSE, /* r */ vavgu16 (r0m, r01), r01, /* g */ g00, gm1, /* b */ vavgu16 (bm0, b10), bm2); bggr_load (&r2m, &g20, &r21, NULL, src, +2 * src_bpl, in_first_column, in_last_column); r2m = vadd16 (vadd16 (vadd16 (r2m, r21), r0m), r01); r2m = vsr16 (vadd16 (r2m, vsplat16_2), 2); g1m = vsr16 (vadd16 (g1m, g20), 2); store_rgb16 (dst, /* offset */ dst_bpl, pixfmt, /* saturate */ FALSE, /* r */ r2m, vavgu16 (r01, r21), /* g */ g1m, g11, /* b */ b10, vavgu16 (b12, b10)); } #endif /* SIMD & (CPU_FEATURE_SSE_INT | CPU_FEATURE_SSE2 | CPU_FEATURE_ALTIVEC) */ static always_inline void sbggr_odd_top (uint8_t * dst, const uint8_t * src, unsigned long dst_bpl, unsigned long src_bpl, tv_pixfmt pixfmt, tv_bool in_first_column, tv_bool in_last_column) { v16 g1m, b10, g11, b12; v16 r2m, g20, r21; dst_bpl = dst_bpl; bggr_load (&g1m, &b10, &g11, &b12, src, 0 * src_bpl, in_first_column, in_last_column); g1m = vadd16 (vadd16 (g1m, g11), vsplat16_2); bggr_load (&r2m, &g20, &r21, NULL, src, 1 * src_bpl, in_first_column, in_last_column); /* Should be (G1m + G20 + G11 + 1) / 3, but this is easier. */ g1m = vsr16 (vadd16 (g1m, vadd16 (g20, g20)), 2); store_rgb16 (dst, /* offset */ 0, pixfmt, /* saturate */ FALSE, /* r */ small_vavgu16 (r2m, r21), r21, /* g */ g1m, g11, /* b */ b10, small_vavgu16 (b12, b10)); } static always_inline void sbggr_odd_bottom (uint8_t * dst, const uint8_t * src, unsigned long dst_bpl, unsigned long src_bpl, tv_pixfmt pixfmt, tv_bool in_first_column, tv_bool in_last_column) { v16 r0m, g00, r01, g02; v16 bm0, gm1, bm2; dst_bpl = dst_bpl; bggr_load (&r0m, &g00, &r01, &g02, src, /* offset */ 0, in_first_column, in_last_column); g02 = vadd16 (vadd16 (g02, g00), vsplat16_2); bggr_load (NULL, &bm0, &gm1, &bm2, src, -1 * src_bpl, in_first_column, in_last_column); /* Should be (Gm1 + G00 + G02 + 1) / 3, but this is easier. */ g02 = vsr16 (vadd16 (g02, vadd16 (gm1, gm1)), 2); store_rgb16 (dst, /* offset */ 0, pixfmt, /* saturate */ FALSE, /* r */ small_vavgu16 (r0m, r01), r01, /* g */ g00, g02, /* b */ bm0, small_vavgu16 (bm2, bm0)); } #define sbggr_row(kernel, fmt) \ do { \ unsigned int bpp; \ const uint8_t *end; \ \ bpp = TV_PIXFMT_BYTES_PER_PIXEL (TV_PIXFMT_ ## fmt); \ \ kernel (dst, src, dst_bpl, src_bpl, TV_PIXFMT_ ## fmt, \ /* in_first_column */ TRUE, \ /* in_last_column */ FALSE); \ dst += sizeof (vu8) * bpp; \ src += sizeof (vu8); \ \ for (end = src + width - sizeof (vu8) * 2; src < end;) { \ kernel (dst, src, dst_bpl, src_bpl, \ TV_PIXFMT_ ## fmt, \ /* in_first_column */ FALSE, \ /* in_last_column */ FALSE); \ dst += sizeof (vu8) * bpp; \ src += sizeof (vu8); \ } \ \ kernel (dst, src, dst_bpl, src_bpl, TV_PIXFMT_ ## fmt, \ /* in_first_column */ FALSE, \ /* in_last_column */ TRUE); \ } while (0) #define sbggr_to_rgb_loop(fmt) \ static tv_bool \ sbggr_to_ ## fmt ## _loop (uint8_t * dst, \ const uint8_t * src, \ unsigned int width, \ unsigned int height, \ unsigned long dst_bpl, \ unsigned long src_bpl) \ { \ unsigned long run; \ long dst_padding; \ long src_padding; \ \ sbggr_row (sbggr_odd_top, fmt); \ \ run = (width - sizeof (vu8)) \ * TV_PIXFMT_BYTES_PER_PIXEL (TV_PIXFMT_ ## fmt); \ \ dst += dst_bpl - run; \ src += src_bpl - width + sizeof (vu8); \ \ dst_padding = dst_bpl * 2 - run; \ src_padding = src_bpl * 2 - width + sizeof (vu8); \ \ for (height /= 2; --height > 0;) { \ sbggr_row (sbggr_odd_kernel, fmt); \ dst += dst_padding; \ src += src_padding; \ } \ \ sbggr_row (sbggr_odd_bottom, fmt); \ \ sfence (); \ vempty (); \ \ return TRUE; \ } sbggr_to_rgb_loop (RGBA32_LE) sbggr_to_rgb_loop (RGBA32_BE) sbggr_to_rgb_loop (BGRA32_LE) sbggr_to_rgb_loop (BGRA32_BE) sbggr_to_rgb_loop (RGB24_LE) sbggr_to_rgb_loop (RGB24_BE) sbggr_to_rgb_loop (BGR16_LE) sbggr_to_rgb_loop (BGR16_BE) sbggr_to_rgb_loop (BGRA16_LE) sbggr_to_rgb_loop (BGRA16_BE) tv_bool SIMD_NAME (_tv_sbggr_to_rgb) (void * dst_image, const tv_image_format *dst_format, const void * src_image, const tv_image_format *src_format) { uint8_t *dst; const uint8_t *src; unsigned int width; unsigned int height; unsigned long dst_bpl; unsigned long src_bpl; dst = (uint8_t *) dst_image + dst_format->offset[0]; src = (const uint8_t *) src_image + src_format->offset[0]; width = MIN (dst_format->width, src_format->width); height = MIN (dst_format->height, src_format->height); dst_bpl = dst_format->bytes_per_line[0]; src_bpl = src_format->bytes_per_line[0]; switch (dst_format->pixel_format->pixfmt) { #undef DST_CASE #define DST_CASE(fmt) \ case TV_PIXFMT_ ## fmt: \ return sbggr_to_ ## fmt ## _loop (dst, src, \ width, height, \ dst_bpl, src_bpl); \ break; DST_CASE (RGBA32_LE) DST_CASE (RGBA32_BE) DST_CASE (BGRA32_LE) DST_CASE (BGRA32_BE) DST_CASE (RGB24_LE) DST_CASE (RGB24_BE) DST_CASE (BGR16_LE) DST_CASE (BGR16_BE) DST_CASE (BGRA16_LE) DST_CASE (BGRA16_BE) default: return FALSE; } } #else /* !SIMD */ #define store(fmt, en, r, g, b) \ do { \ uint16_t *dst16 = (void *) dst; \ \ switch (TV_PIXFMT_ ## fmt ## _ ## en) { \ case TV_PIXFMT_RGBA32_LE: \ dst[0] = r; dst[1] = g; dst[2] = b; dst[3] = -1; \ break; \ \ case TV_PIXFMT_RGBA32_BE: \ dst[0] = -1; dst[1] = b; dst[2] = g; dst[3] = r; \ break; \ \ case TV_PIXFMT_BGRA32_LE: \ dst[0] = b; dst[1] = g; dst[2] = r; dst[3] = -1; \ break; \ \ case TV_PIXFMT_BGRA32_BE: \ dst[0] = -1; dst[1] = r; dst[2] = g; dst[3] = b; \ break; \ \ case TV_PIXFMT_RGB24_LE: \ dst[0] = r; dst[1] = g; dst[2] = b; \ break; \ \ case TV_PIXFMT_RGB24_BE: \ dst[0] = b; dst[1] = g; dst[2] = r; \ break; \ \ case TV_PIXFMT_BGR16_LE: \ case TV_PIXFMT_BGR16_BE: \ *dst16 = (lp[0][r] | \ lp[2][g] | \ lp[4][b]); \ break; \ \ case TV_PIXFMT_BGRA16_LE: \ case TV_PIXFMT_BGRA16_BE: \ *dst16 = (lp[1][r] | \ lp[3][g] | \ lp[4][b] | \ ((Z_BYTE_ORDER == Z_ ## en) ? 0x8000 : 0x80)); \ break; \ \ default: \ assert (0); \ } \ \ dst += TV_PIXFMT_BYTES_PER_PIXEL (TV_PIXFMT_ ## fmt ## _ ## en); \ } while (0) /* Memory layout: xxx xxx xxx xxx xxx xxx ... xxx Gmm Bm0 Gm1 Bm2 Gm3 ... xxx R0m(G00 R01)G02 R03 ... xxx G1m(B10 G11)B12 G13 ... xxx R2m G20 R21 G22 R22 ... */ #define sbggr_to_rgb_loop(fmt, en, a1) \ static tv_bool \ sbggr_to_ ## fmt ## _ ## en ## _loop \ (uint8_t * dst, \ const tv_image_format *dst_format, \ const uint8_t * src, \ const tv_image_format *src_format, \ unsigned int width, \ unsigned int height) \ { \ const uint16_t (* lp)[256]; \ unsigned long dst_bpl; \ unsigned long src_bpl; \ unsigned long dst_padding; \ unsigned long src_padding; \ unsigned int count; \ \ dst_bpl = dst_format->bytes_per_line[0]; \ src_bpl = src_format->bytes_per_line[0]; \ \ dst_padding = dst_bpl - width \ * TV_PIXFMT_BYTES_PER_PIXEL (TV_PIXFMT_ ## fmt ## _ ## en); \ src_padding = src_bpl - width + 2 /* left & right */; \ \ if ((long)(dst_padding | src_padding) < 0) \ return FALSE; \ \ lp = _tv_lut_rgb16[Z_BYTE_ORDER != Z_ ## en]; \ \ /* Top left pixel (Bm0). */ \ store (fmt, en, src[1 + src_bpl], \ (src[1] + src[src_bpl] + 1) >> 1, src[0]); \ \ /* First line (Gm1, Bm2). */ \ for (count = width / 2; --count > 0;) { \ store (fmt, en, src[1 + src_bpl], src[1], \ (src[0] + src[2] + 1) >> 1); \ /* Should be src[1] + src[3] + src[2+src_bpl] + 1) / 3, \ but this is easier. */ \ store (fmt, en, \ (src[1 + src_bpl] + src[3 + src_bpl] + 1) >> 1, \ (src[1] + src[3] + src[2 + src_bpl] * 2 + 2) \ >> 2, src[2]); \ src += 2; \ } \ \ /* Top right pixel (Gm3). */ \ store (fmt, en, src[1 + src_bpl], src[1], src[0]); \ \ src += src_padding; \ dst += dst_padding; \ \ for (height /= 2; --height > 0;) { \ unsigned int v0, v1; \ \ v0 = src[-src_bpl] + src[src_bpl] + 1; \ \ /* First column (G00). */ \ store (fmt, en, src[1], src[0], v0 >> 1); \ \ /* Odd line (R01, G02). */ \ for (count = width / 2; --count > 0;) { \ v1 = src[2 - src_bpl] + src[2 + src_bpl] + 1; \ store (fmt, en, src[1], (src[1 - src_bpl] \ + src[0] + src[2] + src[1 + src_bpl] \ + 2) >> 2, (v0 + v1) >> 2); \ store (fmt, en, (src[1] + src[3] + 1) >> 1, \ src[2], v1 >> 1); \ src += 2; \ v0 = v1; \ } \ \ /* Last column (R03). */ \ store (fmt, en, src[1], (src[1 - src_bpl] + src[0] * 2 \ + src[1 + src_bpl] + 2) >> 2, v0 >> 1); \ \ src += src_padding; \ dst += dst_padding; \ \ v0 = src[1 - src_bpl] + src[1 + src_bpl] + 1; \ \ /* First column (B10). */ \ store (fmt, en, v0 >> 1, (src[-src_bpl] + src[1] * 2 \ + src[src_bpl] + 2) >> 2, src[0]); \ \ /* Even line (G11, B12). */ \ for (count = width / 2; --count > 0;) { \ v1 = src[3 - src_bpl] + src[3 + src_bpl] + 1; \ store (fmt, en, v0 >> 1, src[1], \ (src[0] + src[2] + 1) >> 1); \ store (fmt, en, (v0 + v1) >> 2, \ (src[2 - src_bpl] + src[1] + src[3] \ + src[2 + src_bpl] + 2) >> 2, src[2]); \ src += 2; \ v0 = v1; \ } \ \ /* Last column (G13). */ \ store (fmt, en, v0 >> 1, src[1], src[0]); \ \ src += src_padding; \ dst += dst_padding; \ } \ \ /* Bottom left pixel (G20). */ \ store (fmt, en, src[1], src[0], src[-src_bpl]); \ \ /* Last line (R21, G22). */ \ for (count = width / 2; --count > 0;) { \ store (fmt, en, src[1], (src[1 - src_bpl] * 2 + src[0] \ + src[2] + 2) >> 2, \ (src[-src_bpl] + src[2 - src_bpl] + 1) >> 1); \ store (fmt, en, (src[1] + src[3] + 1) >> 1, src[2], \ src[2 - src_bpl]); \ src += 2; \ } \ \ /* Bottom right pixel (R23). */ \ store (fmt, en, src[1], (src[0] + src[1 - src_bpl] + 1) >> 1, \ src[-src_bpl]); \ \ return TRUE; \ } sbggr_to_rgb_loop (RGBA32, LE, 0) sbggr_to_rgb_loop (RGBA32, BE, 0) sbggr_to_rgb_loop (BGRA32, LE, 0) sbggr_to_rgb_loop (BGRA32, BE, 0) sbggr_to_rgb_loop (RGB24, LE, 0) sbggr_to_rgb_loop (RGB24, BE, 0) sbggr_to_rgb_loop (BGR16, LE, 0) sbggr_to_rgb_loop (BGR16, BE, 0) sbggr_to_rgb_loop (BGRA16, LE, 0x8000) sbggr_to_rgb_loop (BGRA16, BE, 0x8000) tv_bool _tv_sbggr_to_rgb (void * dst_image, const tv_image_format *dst_format, const void * src_image, const tv_image_format *src_format) { uint8_t *dst; const uint8_t *src; unsigned int width; unsigned int height; unsigned long align; width = MIN (dst_format->width, src_format->width); height = MIN (dst_format->height, src_format->height); if (0 == width || 0 == height || ((width | height) & 1) || width > src_format->bytes_per_line[0] || (((width * dst_format->pixel_format->bits_per_pixel) >> 3) > dst_format->bytes_per_line[0])) return FALSE; dst = (uint8_t *) dst_image + dst_format->offset[0]; src = (const uint8_t *) src_image + src_format->offset[0]; align = ((unsigned long) dst | (unsigned long) src | dst_format->bytes_per_line[0] | src_format->bytes_per_line[0] | width); if (likely (0 == (align % 16) && width >= 3 * 16)) { #if 0 /* defined CAN_COMPILE_ALTIVEC */ if (cpu_features & CPU_FEATURE_ALTIVEC) return _tv_sbggr_to_rgb_ALTIVEC (dst_image, dst_format, src_image, src_format); else #endif #if 0 /* defined CAN_COMPILE_SSE2 */ if (cpu_features & CPU_FEATURE_SSE2) return _tv_sbggr_to_rgb_SSE2 (dst_image, dst_format, src_image, src_format); else #endif (void) 0; } if (likely (0 == (align % 8) && width >= 3 * 8)) { #if 0 /* defined CAN_COMPILE_SSE */ if (cpu_features & CPU_FEATURE_SSE_INT) return _tv_sbggr_to_rgb_SSE (dst_image, dst_format, src_image, src_format); else #endif #ifdef CAN_COMPILE_MMX if (cpu_features & CPU_FEATURE_MMX) return _tv_sbggr_to_rgb_MMX (dst_image, dst_format, src_image, src_format); else #endif (void) 0; } /* Scalar implementation. */ switch (dst_format->pixel_format->pixfmt) { #undef DST_CASE #define DST_CASE(fmt) \ case TV_PIXFMT_ ## fmt: \ return sbggr_to_ ## fmt ## _loop (dst, dst_format, \ src, src_format, \ width, height); \ break; DST_CASE (RGBA32_LE) DST_CASE (RGBA32_BE) DST_CASE (BGRA32_LE) DST_CASE (BGRA32_BE) DST_CASE (RGB24_LE) DST_CASE (RGB24_BE) DST_CASE (BGR16_LE) DST_CASE (BGR16_BE) DST_CASE (BGRA16_LE) DST_CASE (BGRA16_BE) default: return FALSE; } } #endif /* !SIMD */ zapping-0.10cvs6/libtv/rgb2rgb.h 644 764 144 2670 10400347124 11625 /* * Copyright (C) 2006 Michael H. Schimek * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* $Id: rgb2rgb.h,v 1.2 2006/02/26 15:50:44 mschimek Exp $ */ /* RGB to RGB image format conversion functions. */ #ifndef RGB2RGB_H #define RGB2RGB_H #include "image_format.h" extern tv_bool _tv_rgb32_to_rgb16 (void * dst_image, const tv_image_format *dst_format, const void * src_image, const tv_image_format *src_format); extern tv_bool _tv_rgb32_to_rgb32 (void * dst_image, const tv_image_format *dst_format, const void * src_image, const tv_image_format *src_format); extern tv_bool _tv_sbggr_to_rgb (void * dst_image, const tv_image_format *dst_format, const void * src_image, const tv_image_format *src_format); #endif /* RGB2RGB_H */ zapping-0.10cvs6/libtv/simd.c 644 764 144 4164 10417056137 11236 /* * Copyright (C) 2006 Michael H. Schimek * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* $Id: simd.c,v 1.1 2006/04/12 01:48:15 mschimek Exp $ */ #include #include "misc.h" #define s8(n) { n * 0x0101010101010101ULL, n * 0x0101010101010101ULL } #define s16(n) { n * 0x0001000100010001ULL, n * 0x0001000100010001ULL } #define s32(n) { n * 0x0000000100000001ULL, n * 0x0000000100000001ULL } const int64_t __attribute__ ((aligned (16))) vsplat8_1[2] = s8 (1); const int64_t __attribute__ ((aligned (16))) vsplat8_m1[2] = s8 (0xFF); const int64_t __attribute__ ((aligned (16))) vsplat8_15[2] = s8 (15); const int64_t __attribute__ ((aligned (16))) vsplat8_127[2] = s8 (127); const int64_t __attribute__ ((aligned (16))) vsplatu8_F8[2] = s8 (0xF8); const int64_t __attribute__ ((aligned (16))) vsplatu8_FC[2] = s8 (0xFC); const int64_t __attribute__ ((aligned (16))) vsplat16_1[2] = s16 (1); const int64_t __attribute__ ((aligned (16))) vsplat16_2[2] = s16 (2); const int64_t __attribute__ ((aligned (16))) vsplat16_128[2] = s16 (128); const int64_t __attribute__ ((aligned (16))) vsplat16_255[2] = s16 (255); const int64_t __attribute__ ((aligned (16))) vsplat16_256[2] = s16 (256); const int64_t __attribute__ ((aligned (16))) vsplat16_m256[2] = s16 (0xFF00); const int64_t __attribute__ ((aligned (16))) vsplatu16_F8[2] = s16 (0x00F8); const int64_t __attribute__ ((aligned (16))) vsplat32_1[2] = s32 (1); const int64_t __attribute__ ((aligned (16))) vsplat32_2[2] = s32 (2); zapping-0.10cvs6/libtv/simd.h 644 764 144 110705 10417055711 11277 /* * Zapping TV viewer * * Copyright (C) 2005 Michael H. Schimek * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* $Id: simd.h,v 1.8 2006/04/12 01:45:45 mschimek Exp $ */ #ifndef SIMD_H #define SIMD_H #include #include #include "cpu.h" /* This is a simple vector intrinsics abstraction. The idea is to use the Intel/AMD/AltiVec intrinsics where you must and these macros where you can. Intrinsics are halfway portable and easier to maintain than asm code or inline asm. These macros can save typing if the SIMD routine is basically the same for MMX, SSE2 and AltiVec. To select an implementation #define SIMD x before including this header, where x is one of: CPU_FEATURE_MMX x86 and x86_64 MMX extension CPU_FEATURE_3DNOW x86 and x86_64 3DNow! extension CPU_FEATURE_SSE_INT x86 and x86_64 SSE extension CPU_FEATURE_SSE_FLT x86 and x86_64 SSE extension CPU_FEATURE_SSE2 x86 and x86_64 SSE2 extension CPU_FEATURE_SSE3 x86 and x86_64 SSE3 extension CPU_FEATURE_ALTIVEC powerpc AltiVec extension Keep a few subtle differences in mind: - SSE2 and AltiVec vectors are 128 bit wide, the rest 64 bit. Be careful when doing pointer math. sizeof() is your friend. - MMX loads and stores must be 8 byte aligned, SSE2 and AltiVec loads and stores must be 16 byte aligned. MMX will not segfault on unaligned accesses but they're slow when crossing a cache line boundary. SSE has instructions for unaligned accesses, they're slow too. AltiVec can shift across two registers in 1-2 instructions. - AltiVec is big endian, MMX/SSE little endian: BE: v bit 0 v bit n, MSB first in memory. 0x01020304050607 LE: ^ bit n ^ bit 0, LSB first in memory. Compiling: The configure script defines CAN_COMPILE_MMX, CAN_COMPILE_SSE, ... (both #defines and automake conditionals) if the compiler recognizes these intrinsics. To compile intrinsics GCC needs a target CPU switch, e. g. -mmmx, -msse or -march=pentium4. The resulting code will be unportable. Since we want to build different versions of a SIMD routine and choose an implementation at runtime, each version must go into another object file compiled with the appropriate flags. */ /* For gcc bug checks. */ #ifndef GCC_VERSION # define GCC_VERSION (__GNUC__ * 10000 \ + __GNUC_MINOR__ * 100 \ + __GNUC_PATCHLEVEL__) #endif #ifndef SIMD # define SIMD 0 #endif #define SCALAR (1 << 30) /* XXX GCC 4.1 doesn't support nested always_inline functions with -O0? */ #define always_inline __inline__ #define never_inline __attribute__ ((noinline)) /* ------------------------------------------------------------------------- */ #if SIMD /* Common macros. */ #define vzero16() ((v16) vzero8 ()) #define vzero32() ((v32) vzero8 ()) #define vzerou8() ((vu8) vzero8 ()) #define vzerou16() ((vu16) vzero8 ()) #define vzerou32() ((vu32) vzero8 ()) #define vminus116() ((v16) vminus18 ()) #define vminus132() ((v32) vminus18 ()) /* Common subexpression elimination doesn't seem to work in gcc 3.x with _mm_set1(), so use these constants instead. */ #define SIMD_CONST_PROTOS \ extern const v8 vsplat8_1; /* vsplat8(1) */ \ extern const v8 vsplat8_m1; /* vsplat8(-1) */ \ extern const v8 vsplat8_15; /* vsplat8(15) */ \ extern const v8 vsplat8_127; /* vsplat8(127 = 0x7F) */ \ extern const vu8 vsplatu8_F8; /* vsplatu8(0xF8) */ \ extern const vu8 vsplatu8_FC; /* vsplatu8(0xFC) */ \ extern const v16 vsplat16_1; /* vsplat16(1) */ \ extern const v16 vsplat16_2; /* vsplat16(2) */ \ extern const v16 vsplat16_128; /* vsplat16(128) */ \ extern const v16 vsplat16_255; /* vsplat16(255 = 0x00FF) */ \ extern const v16 vsplat16_256; /* vsplat16(256 = 0x0100) */ \ extern const v16 vsplat16_m256; /* vsplat16(-256 = 0xFF00) */ \ extern const vu16 vsplatu16_F8; /* vsplatu16(0x00F8) */ \ extern const v32 vsplat32_1; /* vsplat32(1) */ \ extern const v32 vsplat32_2; /* vsplat32(2) */ #define vsplatu8_1 ((vu8) vsplat8_1) #define vsplat16_m1 ((v16) vsplat8_m1) #define vsplat32_m1 ((v32) vsplat8_m1) #define vsplatu8_m1 ((vu8) vsplat8_m1) #define vsplatu16_m1 ((vu16) vsplat8_m1) #define vsplatu32_m1 ((vu32) vsplat8_m1) #define vsplatu8_15 ((vu8) vsplat8_15) #define vsplatu8_127 ((vu8) vsplat8_127) #define vsplatu16_1 ((vu16) vsplat16_1) #define vsplatu16_2 ((vu16) vsplat16_2) #define vsplatu16_128 ((vu16) vsplat16_128) #define vsplatu16_255 ((vu16) vsplat16_255) #define vsplatu16_256 ((vu16) vsplat16_256) #define vsplatu16_m256 ((vu16) vsplat16_m256) #define vsplatu32_1 ((vu32) vsplat32_1) #define vsplatu32_2 ((vu32) vsplat32_2) /* Neither MMX nor AltiVec have cmplt instructions. */ /* Compare signed (_a < _b) ? 0xFF : 0x00. */ #define vcmplt8(_a, _b) vcmpgt8 (_b, _a) #define vcmplt16(_a, _b) vcmpgt16 (_b, _a) #define vcmplt32(_a, _b) vcmpgt32 (_b, _a) /* Compare signed (_a <= _b) ? 0xFF : 0x00. */ #define vcmple8(_a, _b) vcmpge8 (_b, _a) #define vcmple16(_a, _b) vcmpge16 (_b, _a) #define vcmple32(_a, _b) vcmpge32 (_b, _a) /* Compare unsigned (_a < _b) ? 0xFF : 0x00. */ #define vcmpltu8(_a, _b) vcmpgtu8 (_b, _a) #define vcmpltu16(_a, _b) vcmpgtu16 (_b, _a) #define vcmpltu32(_a, _b) vcmpgtu32 (_b, _a) /* Compare unsigned (_a <= _b) ? 0xFF : 0x00. */ #define vcmpleu8(_a, _b) vcmpgeu8 (_b, _a) #define vcmpleu16(_a, _b) vcmpgeu16 (_b, _a) #define vcmpleu32(_a, _b) vcmpgeu32 (_b, _a) #define vdump(_a) \ { \ union { vu8 v; uint8_t s[sizeof (vu8)]; } _u; \ unsigned int _i; \ \ _u.v = (vu8)(_a); \ fprintf (stderr, "%s:%u: %s = ", __FILE__, __LINE__, #_a); \ for (_i = 0; _i < sizeof (_u.s); ++_i) \ fprintf (stderr, "%02x", _u.s[_i]); \ fputc ('\n', stderr); \ } #else /* !SIMD */ #define SUFFIX _SCALAR #define vempty() do {} while (0) #define sfence() do {} while (0) #endif /* !SIMD */ /* ------------------------------------------------------------------------- */ #if SIMD & (CPU_FEATURE_MMX | CPU_FEATURE_3DNOW | \ CPU_FEATURE_SSE_INT | CPU_FEATURE_SSE_FLT) #include /* AltiVec intrinsics automatically distinguish between element size and signedness by the vector type. Intel intrinsics use macro suffixes. For portability we define it both ways. */ typedef __m64 v8; /* vector of 8 or 16 int8_t */ typedef __m64 vu8; /* vector of 8 or 16 uint8_t */ typedef __m64 v16; /* vector of 4 or 8 int16_t */ typedef __m64 vu16; /* vector of 4 or 8 uint16_t */ typedef __m64 v32; /* vector of 2 or 4 int32_t */ typedef __m64 vu32; /* vector of 2 or 4 uint32_t */ /* Constant 0 (pxor or memory operand). */ #define vzero8() _mm_setzero_si64 () /* Constant -1 (should be pcmpeq or memory operand). */ #define vminus18() vsplat8_m1 SIMD_CONST_PROTOS /* gcc 3.2 bug: _mm_set1_pi16 (_i) produces { _i, _i, 0, 0 } */ /* gcc 4.0 / 4.1 (experimental) bug: uses SSE instruction pshufw without -msse. */ /* gcc 4.1 (experimental) bug: simd.c:290: error: unrecognizable insn: (insn 743 265 268 17 (set (reg:V2SI 0 ax) (const_vector:V2SI [ (const_int -1 [0xffffffffffffffff]) (const_int -1 [0xffffffffffffffff]) ])) -1 (nil) (nil)) simd.c:290: internal compiler error: in extract_insn, at recog.c:2082 (That's mmx vsplat8 (-1). Should be pcmpeq I guess, other values work.) */ #if (SIMD & (CPU_FEATURE_MMX | CPU_FEATURE_3DNOW)) \ && ((GCC_VERSION >= 30200 && GCC_VERSION < 30300) \ || (GCC_VERSION >= 40000 && GCC_VERSION < 40200)) static always_inline __m64 vsplatu32 (uint32_t _i) { return (__m64)(_i * 0x0000000100000001ULL); } static always_inline __m64 vsplat32 (int32_t _i) { return vsplatu32 ((uint32_t) _i); } static always_inline __m64 vsplatu16 (uint16_t _i) { return (__m64)(_i * 0x0001000100010001ULL); } static always_inline __m64 vsplat16 (int16_t _i) { return vsplatu16 ((uint16_t) _i); } static always_inline __m64 vsplatu8 (uint8_t _i) { return (__m64)(_i * 0x0101010101010101ULL); } static always_inline __m64 vsplat8 (int8_t _i) { return vsplatu8 ((uint8_t) _i); } #else /* Set each element to _i. */ # define vsplat8(_i) _mm_set1_pi8 (_i) # define vsplat16(_i) _mm_set1_pi16 (_i) # define vsplat32(_i) _mm_set1_pi32 (_i) # define vsplatu8(_i) _mm_set1_pi8 (_i) # define vsplatu16(_i) _mm_set1_pi16 (_i) # define vsplatu32(_i) _mm_set1_pi32 (_i) #endif #define vsplatu8i(_i) vsplatu8 (_i) #define vsplatu16i(_i) vsplatu16 (_i) #define vsplatu32i(_i) vsplatu32 (_i) /* Load and store from address + offset (in bytes). */ #define vload(_p, _o) (* (const __m64 *)((const uint8_t *)(_p) + (_o))) #define vstore(_p, _o, _a) (* (__m64 *)((uint8_t *)(_p) + (_o)) = (_a)) /* Slower unaligned load and store. */ #define vloadu(_p, _o) vload (_p, _o) #define vstoreu(_p, _o, _a) vstore (_p, _o, _a) /* Non-temporal load and store (SSE, SSE2, AltiVec), to be used if we do not access the same data / cache line soon. */ #define vloadnt(_p, _o) vload (_p, _o) #define vstorent(_p, _o, _a) vstore (_p, _o, _a) #define vand(_a, _b) _mm_and_si64 (_a, _b) /* NOTE: a & ~b as the name suggests. */ #define vandnot(_a, _b) _mm_andnot_si64 (_b, _a) #define vor(_a, _b) _mm_or_si64 (_a, _b) #define vxor(_a, _b) _mm_xor_si64 (_a, _b) /* AltiVec has a vnor (and by extension vnot) instruction. Note this is a bitwise not. Boolean not is cheaper with vcmpz if we already have 0 in a register. */ #define vnot(_a) vxor (_a, vminus18 ()) #define vnand(_a, _b) vnot (vand (_a, _b)) #define vnor(_a, _b) vnot (vor (_a, _b)) /* For each bit: (1 == _mask) ? _a : _b. One AltiVec instruction but expensive with MMX/SSE/SSE2. Note AltiVec's vec_sel() has the parameters reversed. */ static always_inline __m64 vsel (__m64 _mask, __m64 _a, __m64 _b) { return vor (vand (_a, _mask), vandnot (_b, _mask)); } #define vsl(_a, _i) _mm_slli_si64 (_a, _i) #define vsru(_a, _i) _mm_srli_si64 (_a, _i) /* Unsigned _a <<= 1 (MMX/3DNow/SSEx have no byte shift ops). */ #define vsl18(_a) _mm_slli_pi16 (vand (_a, vsplat8_127), 1) /* _a >>= 1. Somewhat expensive, better avoid it. */ #define vsr18(_a) vsel (vsplat8_127, _mm_srli_pi16 (_a, 1), _a) #define vsr1u8(_a) vand (_mm_srli_pi16 (_a, 1), vsplat8_127) /* Shift left by immediate. */ #define vsl16(_a, _i) _mm_slli_pi16 (_a, _i) #define vsl32(_a, _i) _mm_slli_pi32 (_a, _i) /* Shift right by immediate. */ #define vsr16(_a, _i) _mm_srai_pi16 (_a, _i) #define vsru16(_a, _i) _mm_srli_pi16 (_a, _i) #define vsr32(_a, _i) _mm_srai_pi32 (_a, _i) #define vsru32(_a, _i) _mm_srli_pi32 (_a, _i) static always_inline __m64 vbswap16 (__m64 _a) { return vor (vsl16 (_a, 8), vsru16 (_a, 8)); } static always_inline __m64 vwswap32 (__m64 _a) { return vor (vsl32 (_a, 16), vsru32 (_a, 16)); } /* Long shift right, e.g. (0x0123, 0x4567, 3) -> 0x1234 */ static always_inline __m64 vlsr (__m64 _h, __m64 _l, const unsigned int _i) { assert (_i <= 64); if (0 == _i) { return _l; } else if (32 == _i) { return _mm_unpackhi_pi32 (_l, vsl (_h, 32)); } else if (64 == _i) { return _h; } else { return vor (vsru (_l, _i), vsl (_h, 64 - _i)); } } /* Given am = * (const vu8 *) &src[-sizeof (vu8)], a0 = * (const vu8 *) src, a1 = * (const vu8 *) &src[+sizeof (vu8)], where src is uint8_t* and dist is given in bytes this emulates an unaligned load from src - dist and src + dist */ static always_inline void vshiftu2x (__m64 * _l, __m64 * _r, __m64 _am, __m64 _a0, __m64 _a1, const unsigned int _dist) { assert (_dist <= sizeof (vu8)); #if 0 if (4 == _dist) { _a0 = vwswap32 (_a0); *_l = _mm_unpackhi_pi32 (_am, _a0); *_r = _mm_unpacklo_pi32 (_a0, _a1); } else #endif { /* 7654 3210 -> 6543 */ *_l = vlsr (_a0, _am, (sizeof (vu8) - _dist) * 8); /* BA98 7654 -> 8765 */ *_r = vlsr (_a1, _a0, _dist * 8); } } #define vunpacklo8(_a, _b) _mm_unpacklo_pi8 (_a, _b) #define vunpackhi8(_a, _b) _mm_unpackhi_pi8 (_a, _b) #define vunpacklo16(_a, _b) _mm_unpacklo_pi16 (_a, _b) #define vunpackhi16(_a, _b) _mm_unpackhi_pi16 (_a, _b) #define vunpacklo32(_a, _b) _mm_unpacklo_pi32 (_a, _b) #define vunpackhi32(_a, _b) _mm_unpackhi_pi32 (_a, _b) #define vunpacklo(_a, _b) _mm_unpacklo_pi32 (_a, _b) #define vunpackhi(_a, _b) _mm_unpackhi_pi32 (_a, _b) #define vpacksu16(_a, _b) _mm_packs_pu16 (_a, _b) /* _a + _b, _a - _b with wrap-around. */ #define vadd8(_a, _b) _mm_add_pi8 (_a, _b) #define vadd16(_a, _b) _mm_add_pi16 (_a, _b) #define vadd32(_a, _b) _mm_add_pi32 (_a, _b) #define vsub8(_a, _b) _mm_sub_pi8 (_a, _b) #define vsub16(_a, _b) _mm_sub_pi16 (_a, _b) #define vsub32(_a, _b) _mm_sub_pi32 (_a, _b) /* Add or subtract with signed saturation. */ #define vadds16(_a, _b) _mm_adds_pi16 (_a, _b) #define vsubs16(_a, _b) _mm_subs_pi16 (_a, _b) /* Add or subtract with unsigned saturation. */ #define vaddsu8(_a, _b) _mm_adds_pu8 (_a, _b) #define vaddsu16(_a, _b) _mm_adds_pu16 (_a, _b) #define vsubsu8(_a, _b) _mm_subs_pu8 (_a, _b) #define vsubsu16(_a, _b) _mm_subs_pu16 (_a, _b) /* Saturate against variable bounds. Expensive! */ #define vsatu8(_a, _min, _max) vminu8 (vmaxu8 (_a, _min), _max) /* Compare (_a == _b) ? 0xFF : 0x00. */ #define vcmpeq8(_a, _b) _mm_cmpeq_pi8 (_a, _b) #define vcmpeq16(_a, _b) _mm_cmpeq_pi16 (_a, _b) #define vcmpeq32(_a, _b) _mm_cmpeq_pi32 (_a, _b) /* Compare (_a == 0) ? 0xFF : 0x00. */ #define vcmpz8(_a) vcmpeq8 (_a, vzero8 ()) #define vcmpz16(_a) vcmpeq16 (_a, vzero16 ()) #define vcmpz32(_a) vcmpeq32 (_a, vzero32 ()) /* Compare (_a != 0) ? 0xFF : 0x00. */ #define vcmpnz8(_a) vcmpz8 (vcmpz8 (_a)) #define vcmpnz16(_a) vcmpz16 (vcmpz16 (_a)) #define vcmpnz32(_a) vcmpz32 (vcmpz32 (_a)) /* Compare signed (_a > _b) ? 0xFF : 0x00. */ #define vcmpgt8(_a, _b) _mm_cmpgt_pi8 (_a, _b) #define vcmpgt16(_a, _b) _mm_cmpgt_pi16 (_a, _b) #define vcmpgt32(_a, _b) _mm_cmpgt_pi32 (_a, _b) /* Compare unsigned (_a >= _b) ? 0xFF : 0x00. */ #define vcmpgeu8(_a, _b) vcmpz8 (vsubsu8 (_b, _a)) /* Any ideas for cmpge and cmpgtu? :-) */ /* Multiply v16 giving low/high 16 bit of result (vu16). */ #define vmullo16(_a, _b) _mm_mullo_pi16 (_a, _b) #define vmulhi16(_a, _b) _mm_mulhi_pi16 (_a, _b) /* Clear MMX state (emms). */ #define vempty() _mm_empty () /* Store fence guarantees that every preceding store is globally visible before any subsequent store. */ #define sfence() do {} while (0) /* abs (_a - _b). */ static always_inline vu8 vabsdiffu8 (vu8 _a, vu8 _b) { return vor (vsubsu8 (_a, _b), vsubsu8 (_b, _a)); } /* (_a + _b + 1) / 2 (single instruction on all but MMX). */ static always_inline vu8 vavgu8 (vu8 _a, vu8 _b) { vu8 carry; /* ((_a & 1) + (_b & 1) + 1) >> 1 */ carry = vand (vor (_a, _b), vsplat8_1); /* "or 1" instead of "and 127" because we already have the const in a register. The MSBs cancel out when added. */ _a = vsru16 (vor (_a, vsplat8_1), 1); _b = vsru16 (vor (_b, vsplat8_1), 1); return vadd8 (vadd8 (_a, _b), carry); } static always_inline vu8 fast_vavgu8 (vu8 _a, vu8 _b) { /* Faster but inaccurate. */ return vadd8 (vsr1u8 (_a), vsr1u8 (_b)); } static always_inline vu16 small_vavgu16 (vu16 _a, vu16 _b) { /* For values < 16384. */ return vsru16 (vadd16 (vadd16 (_a, vsplat16_1), _b), 1); } /* min (_a, _b) (single instruction on all but MMX, 3DNow). */ static always_inline vu8 vminu8 (vu8 _a, vu8 _b) { vu8 t; /* a > b a <= b */ t = vsubsu8 (_a, _b); /* a - b 0 */ _a = vxor (_a, _b); /* a ^ b a ^ b */ t = vaddsu8 (t, _b); /* a b */ return vxor (t, _a); /* b a */ } /* max (_a, _b) (single instruction on all but MMX, 3DNow). */ static always_inline vu8 vmaxu8 (vu8 _a, vu8 _b) { /* a > b a <= b */ _a = vsubsu8 (_a, _b); /* a - b 0 */ return vaddsu8 (_a, _b); /* a b */ } /* min (_a, _b), max (_a, _b). With MMX this is faster than vmin(), vmax(). */ static always_inline void vminmaxu8 (vu8 * _min, vu8 * _max, vu8 _a, vu8 _b) { vu8 t; /* a > b a <= b */ t = vsubsu8 (_a, _b); /* a - b 0 */ _a = vxor (_a, _b); /* a ^ b a ^ b */ t = vaddsu8 (t, _b); /* a b */ *_max = t; *_min = vxor (_a, t); /* b a */ } static always_inline vu16 vminu16i (vu16 _a, const unsigned int _i) { vu16 t; assert (_i <= 65535); t = vsplatu16 (0xFFFF - _i); /* a > i a <= i */ _a = vaddsu16 (_a, t); /* 0xFFFF a + 0xFFFF - i */ return vsubsu16 (_a, t); /* i a */ } /* ------------------------------------------------------------------------- */ #if SIMD == CPU_FEATURE_MMX #define SUFFIX _MMX /* ------------------------------------------------------------------------- */ #elif SIMD == CPU_FEATURE_3DNOW #define SUFFIX _3DNOW #include #define vavgu8(_a, _b) _m_pavgusb (_a, _b) #define fast_vavgu8(_a, _b) vavgu8 (_a, _b) /* Fast emms. */ #undef vempty #define vempty() _m_femms () /* ------------------------------------------------------------------------- */ #elif (SIMD == CPU_FEATURE_SSE_INT || SIMD == CPU_FEATURE_SSE_FLT) #define SUFFIX _SSE #include typedef __m128 vf; #define vwswap32(_a) _mm_shuffle_pi16 (_a, _MM_SHUFFLE (1, 0, 3, 2)) #define vavgu8(_a, _b) _mm_avg_pu8 (_a, _b) #define fast_vavgu8(_a, _b) vavgu8 (_a, _b) #define vavgu16(_a, _b) _mm_avg_pu16 (_a, _b) #define small_vavgu16(_a, _b) vavgu16 (_a, _b) #define vminu8(_a, _b) _mm_min_pu8 (_a, _b) #define vmaxu8(_a, _b) _mm_max_pu8 (_a, _b) #define vmin16(_a, _b) _mm_min_pi16 (_a, _b) #define vmax16(_a, _b) _mm_max_pi16 (_a, _b) #undef sfence #define sfence() _mm_sfence () /* movntq - don't load cache line and don't store _a in cache. Might be useful to aggregate stores (write combining, burst writes). */ #undef vstorent #define vstorent(_p, _o, _a) \ _mm_stream_pi ((__m64 *)((uint8_t *)(_p) + (_o)), _a) #define vloadf(_p, _o) \ _mm_load_ps ((const float *)((const uint8_t *)(_p) + (_o))) #define vstoref(_p, _o, _a) \ _mm_store_ps ((float *)((uint8_t *)(_p) + (_o)), _a) #define vloadfnt(_p, _o) vloadf (_p, _o) #define vstorefnt(_p, _o, _a) \ _mm_stream_ps ((float *)((uint8_t *)(_p) + (_o)), _a) /* Override MMX inline function vminmaxu8. */ #define vminmaxu8(_minp, _maxp, _a, _b) sse_vminmaxu8 (_minp, _maxp, _a, _b) static always_inline void sse_vminmaxu8 (vu8 * _min, vu8 * _max, vu8 _a, vu8 _b) { *_min = _mm_min_pu8 (_a, _b); *_max = _mm_max_pu8 (_a, _b); } #endif /* SIMD == CPU_FEATURE_SSE_INT or _FLT */ /* ========================================================================= */ #elif SIMD & (CPU_FEATURE_SSE2 | CPU_FEATURE_SSE3) /* Basically the same as MMX/SSE except vectors are 128 bit. */ #include typedef __m128i v8; typedef __m128i vu8; typedef __m128i v16; typedef __m128i vu16; typedef __m128i v32; typedef __m128i vu32; #define vzero8() _mm_setzero_si128 () #define vminus18() vsplat8_m1 SIMD_CONST_PROTOS #define vsplat8(_i) _mm_set1_epi8 (_i) #define vsplat16(_i) _mm_set1_epi16 (_i) #define vsplat32(_i) _mm_set1_epi32 (_i) #define vsplatu8(_i) _mm_set1_epi8 (_i) #define vsplatu16(_i) _mm_set1_epi16 (_i) #define vsplatu32(_i) _mm_set1_epi32 (_i) #define vsplatu8i(_i) vsplatu8 (_i) #define vsplatu16i(_i) vsplatu16 (_i) #define vsplatu32i(_i) vsplatu32 (_i) /* movd to xmm */ #define vload32(_p, _o) \ _mm_cvtsi32_si128 (* (const uint32_t *) \ ((const uint8_t *)(_p) + (_o))) /* movq to xmm */ #define vload64(_p, _o) \ _mm_set_epi64 ((__m64) 0LL, \ * (const __m64 *)((const uint8_t *)(_p) + (_o))) /* Aligned load and store (movdqa). */ #define vload(_p, _o) \ _mm_load_si128 ((const __m128i *)((const uint8_t *)(_p) + (_o))) #define vstore(_p, _o, _a) \ _mm_store_si128 ((__m128i *)((uint8_t *)(_p) + (_o)), _a) /* Unaligned load and store (movdqu). */ #define vloadu(_p, _o) \ _mm_loadu_si128 ((const __m128i *)((const uint8_t *)(_p) + (_o))) #define vstoreu(_p, _o, _a) \ _mm_storeu_si128 ((__m128i *)((uint8_t *)(_p) + (_o)), _a) #define vloadnt(_p, _o) vload (_p, _o) /* movntdq - don't load cache line and don't store _a in cache. */ #define vstorent(_p, _o, _a) \ _mm_stream_si128 ((__m128i *)((uint8_t *)(_p) + (_o)), _a) #define vand(_a, _b) _mm_and_si128 (_a, _b) #define vandnot(_a, _b) _mm_andnot_si128 (_b, _a) #define vor(_a, _b) _mm_or_si128 (_a, _b) #define vxor(_a, _b) _mm_xor_si128 (_a, _b) #define vnot(_a) vxor (vminus18 (), _a) #define vnand(_a, _b) vnot (vand (_a, _b)) #define vnor(_a, _b) vnot (vor (_a, _b)) /* For each bit: (1 == _mask) ? _a : _b. One AltiVec instruction but expensive with MMX/SSE/SSE2. Note AltiVec's vec_sel() has the parameters reversed. */ static always_inline __m128i vsel (__m128i _mask, __m128i _a, __m128i _b) { return vor (vand (_a, _mask), vandnot (_b, _mask)); } #define vsl18(_a) _mm_slli_epi16 (vand (_a, vsplat8_127), 1) #define vsr18(_a) vsel (vsplat8_127, _mm_srli_epi16 (_a, 1), _a) #define vsr1u8(_a) vand (_mm_srli_epi16 (_a, 1), vsplat8_127) #define vsl16(_a, _i) _mm_slli_epi16 (_a, _i) #define vsl32(_a, _i) _mm_slli_epi32 (_a, _i) #define vsr16(_a, _i) _mm_srai_epi16 (_a, _i) #define vsru16(_a, _i) _mm_srli_epi16 (_a, _i) #define vsr32(_a, _i) _mm_srai_epi32 (_a, _i) #define vsru32(_a, _i) _mm_srli_epi32 (_a, _i) static always_inline __m128i vbswap16 (__m128i _a) { return vor (vsl16 (_a, 8), vsru16 (_a, 8)); } #define vwswap32(_a) _mm_shuffle_epi16 (_a, _MM_SHUFFLE (1, 0, 3, 2)) /* _mm_sxli_si128 is misdefined under gcc -O0. Arg 2 must be an immediate, not a variable which evaluates to one, not even a const variable. */ #if 0 static always_inline __m128i vsl (__m128i _a, const unsigned int _i) { assert (0 == (_i % 8)); return _mm_slli_si128 (_a, _i / 8); /* sic */ } static always_inline __m128i vsru (__m128i _a, const unsigned int _i) { assert (0 == (_i % 8)); return _mm_srli_si128 (_a, _i / 8); /* sic */ } /* Long shift right, e.g. (0x0123, 0x4567, 3) -> 0x1234 */ static always_inline __m128i vlsr (__m128i _h, __m128i _l, const unsigned int _i) { assert (_i <= 128); if (0 == _i) { return _l; } else if (64 == _i) { return _mm_unpackhi_epi64 (_l, vsl (_h, 64)); } else if (128 == _i) { return _h; } else { return vor (vsru (_l, _i), vsl (_h, 128 - _i)); } } static always_inline void vshiftu2x (__m128i * _l, __m128i * _r, __m128i _am, __m128i _a0, __m128i _a1, const unsigned int _dist) { assert (_dist <= sizeof (vu8)); if (8 == _dist) { _a0 = _mm_shuffle_epi32 (_a0, _MM_SHUFFLE (1, 0, 3, 2)); *_l = _mm_unpackhi_epi64 (_am, _a0); *_r = _mm_unpacklo_epi64 (_a0, _a1); } else { /* 7654 3210 -> 6543 */ *_l = vlsr (_a0, _am, (sizeof (vu8) - _dist) * 8); /* BA98 7654 -> 8765 */ *_r = vlsr (_a1, _a0, _dist * 8); } } #else # define vsl(_a, _i) \ (assert (0 == ((_i) % 8)), _mm_slli_si128 ((_a), (_i) / 8)) # define vsru(_a, _i) \ (assert (0 == ((_i) % 8)), _mm_srli_si128 ((_a), (_i) / 8)) #define vlsr(_h, _l, _i) \ ({ \ __m128i h = _h; \ __m128i l = _l; \ \ assert (_i <= 128); \ (0 == (_i)) ? l : \ (64 == (_i)) ? _mm_unpackhi_epi64 (l, vsl (h, 64)) : \ (128 == (_i)) ? h : \ vor (vsru (l, _i), vsl (h, 128 - (_i))); \ }) #define vshiftu2x(_l, _r, _am, _a0, _a1, _dist) \ ({ \ *_l = vlsr (_a0, _am, (sizeof (vu8) - _dist) * 8); \ *_r = vlsr (_a1, _a0, _dist * 8); \ }) #endif #define vunpacklo8(_a, _b) _mm_unpacklo_epi8 (_a, _b) #define vunpackhi8(_a, _b) _mm_unpackhi_epi8 (_a, _b) #define vunpacklo16(_a, _b) _mm_unpacklo_epi16 (_a, _b) #define vunpackhi16(_a, _b) _mm_unpackhi_epi16 (_a, _b) #define vunpacklo32(_a, _b) _mm_unpacklo_epi32 (_a, _b) #define vunpackhi32(_a, _b) _mm_unpackhi_epi32 (_a, _b) #define vunpacklo64(_a, _b) _mm_unpacklo_epi64 (_a, _b) #define vunpackhi64(_a, _b) _mm_unpackhi_epi64 (_a, _b) #define vunpacklo(_a, _b) _mm_unpacklo_epi64 (_a, _b) #define vunpackhi(_a, _b) _mm_unpackhi_epi64 (_a, _b) #define vpacksu16(_a, _b) _mm_packs_epu16 (_a, _b) #define vadd8(_a, _b) _mm_add_epi8 (_a, _b) #define vadd16(_a, _b) _mm_add_epi16 (_a, _b) #define vadd32(_a, _b) _mm_add_epi32 (_a, _b) #define vsub8(_a, _b) _mm_sub_epi8 (_a, _b) #define vsub16(_a, _b) _mm_sub_epi16 (_a, _b) #define vsub32(_a, _b) _mm_sub_epi32 (_a, _b) #define vadds16(_a, _b) _mm_adds_epi16 (_a, _b) #define vsubs16(_a, _b) _mm_subs_epi16 (_a, _b) #define vaddsu8(_a, _b) _mm_adds_epu8 (_a, _b) #define vaddsu16(_a, _b) _mm_adds_epu16 (_a, _b) #define vsubsu8(_a, _b) _mm_subs_epu8 (_a, _b) #define vsubsu16(_a, _b) _mm_subs_epu16 (_a, _b) #define vsatu8(_a, _min, _max) vminu8 (vmaxu8 (_a, _min), _max) #define vcmpeq8(_a, _b) _mm_cmpeq_epi8 (_a, _b) #define vcmpeq16(_a, _b) _mm_cmpeq_epi16 (_a, _b) #define vcmpeq32(_a, _b) _mm_cmpeq_epi32 (_a, _b) #define vcmpz8(_a) vcmpeq8 (_a, vzero8 ()) #define vcmpz16(_a) vcmpeq16 (_a, vzero8 ()) #define vcmpz32(_a) vcmpeq32 (_a, vzero8 ()) #define vcmpnz8(_a) vcmpz8 (vcmpz8 (_a)) #define vcmpnz16(_a) vcmpz16 (vcmpz16 (_a)) #define vcmpnz32(_a) vcmpz32 (vcmpz32 (_a)) #define vcmpgt8(_a, _b) _mm_cmpgt_epi8 (_a, _b) #define vcmpgt16(_a, _b) _mm_cmpgt_epi16 (_a, _b) #define vcmpgt32(_a, _b) _mm_cmpgt_epi32 (_a, _b) /* Compare unsigned (_a >= _b) ? 0xFF : 0x00. */ #define vcmpgeu8(_a, _b) vcmpz8 (vsubsu8 (_b, _a)) #define vmullo16(_a, _b) _mm_mullo_epi16 (_a, _b) #define vmulhi16(_a, _b) _mm_mulhi_epi16 (_a, _b) #define vempty() do {} while (0) #define sfence() _mm_sfence () #define vavgu8(_a, _b) _mm_avg_epu8 (_a, _b) #define fast_vavgu8(_a, _b) vavgu8 (_a, _b) #define vavgu16(_a, _b) _mm_avg_epu16 (_a, _b) #define small_vavgu16(_a, _b) vavgu16 (_a, _b) #define vminu8(_a, _b) _mm_min_epu8 (_a, _b) #define vmaxu8(_a, _b) _mm_max_epu8 (_a, _b) #define vmin16(_a, _b) _mm_min_epi16 (_a, _b) #define vmax16(_a, _b) _mm_max_epi16 (_a, _b) /* abs (_a - _b). */ static always_inline vu8 vabsdiffu8 (vu8 _a, vu8 _b) { return vor (vsubsu8 (_a, _b), vsubsu8 (_b, _a)); } /* min (_a, _b), max (_a, _b). */ static always_inline void vminmaxu8 (vu8 * _min, vu8 * _max, vu8 _a, vu8 _b) { *_min = _mm_min_epu8 (_a, _b); *_max = _mm_max_epu8 (_a, _b); } /* ------------------------------------------------------------------------- */ #if SIMD == CPU_FEATURE_SSE2 #define SUFFIX _SSE2 /* ------------------------------------------------------------------------- */ #elif SIMD == CPU_FEATURE_SSE3 #define SUFFIX _SSE3 #include #if 0 #undef vloadu /* lddqu - loads 2x128 bits and shifts, might be faster than movdqu if the data crosses a cache line boundary. */ #define vloadu(_p, _o) \ _mm_lddqu_si128 ((__m128i *)((uint8_t *)(_p) + (_o))) #endif #endif /* SIMD == CPU_FEATURE_SSE3 */ /* ========================================================================= */ #elif SIMD == CPU_FEATURE_ALTIVEC #define SUFFIX _ALTIVEC /* AltiVec equivalent of the MMX/SSE macros. */ /* Please avoid macro nesting, that compiles much slower. */ #include typedef vector signed char v8; typedef vector unsigned char vu8; typedef vector signed short v16; typedef vector unsigned short vu16; typedef vector signed int v32; typedef vector unsigned int vu32; /* vec_splat_s8() broken in gcc 3.4? */ #define vzero8() ((v8) vec_splat_s16 (0)) #define vminus18() vec_splat_s8 (-1) SIMD_CONST_PROTOS #define vsplatu8i(_i) vec_splat_u8 (_i) #define vsplatu16i(_i) vec_splat_u16 (_i) #define vsplatu32i(_i) vec_splat_u32 (_i) /* FIXME these macros load a scalar variable into each element of the vector. AltiVec has another instruction to load an immediate, but it's limited to -16 ... 15. */ #define vsplat8(_i) vec_splat ((v8) vec_lde (0, &(_i)), 0) #define vsplat16(_i) vec_splat ((v16) vec_lde (0, &(_i)), 0) #define vsplat32(_i) vec_splat ((v32) vec_lde (0, &(_i)), 0) #define vsplatu8(_i) vec_splat ((vu8) vec_lde (0, &(_i)), 0) #define vsplatu16(_i) vec_splat ((vu16) vec_lde (0, &(_i)), 0) #define vsplatu32(_i) vec_splat ((vu32) vec_lde (0, &(_i)), 0) #define vload(_p, _o) vec_ld (_o, _p) #define vstore(_p, _o, _a) vec_st (_a, _o, _p) #define vloadnt(_p, _o) vec_ldl (_o, _p) #define vstorent(_p, _o, _a) vec_stl (_a, _o, _p) #define vand(_a, _b) vec_and (_a, _b) #define vandnot(_a, _b) vec_andc (_a, _b) #define vor(_a, _b) vec_or (_a, _b) #define vxor(_a, _b) vec_xor (_a, _b) #define vnot(_a) ({ __typeof__ (_a) __a = (_a); vec_nor (__a, __a); }) #define vnand(_a, _b) vnot (vand (_a, _b)) #define vnor(_a, _b) vec_nor (_a, _b) /* NOTE I've reversed the parameters to be more like ?: */ #define vsel(_mask, _a, _b) vec_sel (_b, _a, _mask) #define vadd8(_a, _b) vec_add (_a, _b) #define vadd16(_a, _b) vec_add (_a, _b) #define vadd32(_a, _b) vec_add (_a, _b) #define vsub8(_a, _b) vec_sub (_a, _b) #define vsub16(_a, _b) vec_sub (_a, _b) #define vsub32(_a, _b) vec_sub (_a, _b) #define vadds16(_a, _b) vec_adds (_a, _b) #define vsubs16(_a, _b) vec_subs (_a, _b) #define vaddsu8(_a, _b) vec_adds (_a, _b) #define vaddsu16(_a, _b) vec_adds (_a, _b) #define vsubsu8(_a, _b) vec_subs (_a, _b) #define vsubsu16(_a, _b) vec_subs (_a, _b) static always_inline vu8 vsatu8 (vu8 _a, vu8 _min, vu8 _max) { vu8 m = vec_max (_a, _min); return vec_min (m, _max); } static always_inline v8 vsl18 (v8 _a) { vu8 one = vec_splat_u8 (1); return vec_sl (_a, one); } static always_inline v8 vsr18 (v8 _a) { vu8 one = vec_splat_u8 (1); return vec_sra (_a, one); } static always_inline vu8 vsr1u8 (vu8 _a) { vu8 one = vec_splat_u8 (1); return vec_sr (_a, one); } static always_inline v16 vsl16 (v16 _a, const unsigned int _i) { vu16 i = vec_splat_u16 (_i); return vec_sl (_a, i); } static always_inline v16 vsr16 (v16 _a, const unsigned int _i) { vu16 i = vec_splat_u16 (_i); return vec_sra (_a, i); } static always_inline vu16 vsru16 (vu16 _a, const unsigned int _i) { vu16 i = vec_splat_u16 (_i); return vec_sr (_a, i); } static always_inline v32 vsl32 (v32 _a, const unsigned int _i) { vu32 i = vec_splat_u32 (_i); return vec_sl (_a, i); } static always_inline v32 vsr32 (v32 _a, const unsigned int _i) { vu32 i = vec_splat_u32 (_i); return vec_sra (_a, i); } static always_inline vu32 vsru32 (vu32 _a, const unsigned int _i) { vu32 i = vec_splat_u32 (_i); return vec_sr (_a, i); } /* Long shift right, e.g. (0x0123, 0x4567, 3) -> 0x1234 */ static always_inline vu8 vlsr (vu8 _h, vu8 _l, const unsigned int _i) { assert (_i <= 128); if (0 == _i) { return _l; } else if (128 == _i) { return _h; } else { vu8 sel; assert (0 == (_i % 8)); /* 0x000102..1E1F >> _i */ sel = vec_lvsr (_i / 8, (const unsigned char *) 0); return vec_perm (_h, _l, sel); } } static always_inline void vshiftu2x (vu8 * _l, vu8 * _r, vu8 _am, vu8 _a0, vu8 _a1, const unsigned int _dist) { assert (_dist <= sizeof (vu8)); /* 0123 4567 -> 3456 */ *_l = vlsr (_am, _a0, _dist * 8); /* 4567 89AB -> 5678 */ *_r = vlsr (_a0, _a1, (sizeof (vu8) - _dist) * 8); } #define vcmpeq8(_a, _b) vec_cmpeq (_a, _b) #define vcmpeq16(_a, _b) vec_cmpeq (_a, _b) #define vcmpeq32(_a, _b) vec_cmpeq (_a, _b) static always_inline vector bool char vcmpz8 (v8 _a) { v8 z = vzero8 (); return vec_cmpeq (_a, z); } static always_inline vector bool short vcmpz16 (v16 _a) { v16 z = vzero16 (); return vec_cmpeq (_a, z); } static always_inline vector bool int vcmpz32 (v32 _a) { v32 z = vzero32 (); return vec_cmpeq (_a, z); } static always_inline vector bool char vcmpnz8 (v8 _a) { vector bool char b = vcmpz8 (_a); return vnot (b); } static always_inline vector bool short vcmpnz16 (v16 _a) { vector bool short b = vcmpz16 (_a); return vnot (b); } static always_inline vector bool int vcmpnz32 (v32 _a) { vector bool b = vcmpz32 (_a); return vnot (b); } #define vcmpgt8(_a, _b) vec_cmpgt (_a, _b) #define vcmpgt16(_a, _b) vec_cmpgt (_a, _b) #define vcmpgt32(_a, _b) vec_cmpgt (_a, _b) #define vcmpgtu8(_a, _b) vec_cmpgt (_a, _b) #define vcmpgtu16(_a, _b) vec_cmpgt (_a, _b) #define vcmpgtu32(_a, _b) vec_cmpgt (_a, _b) /* Has no integer cmpge. */ static always_inline vector bool char vcmpgeu8 (vu8 _a, vu8 _b) { v8 d = (v8) vsubsu8 (_b, _a); return vcmpz8 (d); } static always_inline vu16 vmullo16 (v16 _a, v16 _b) { v16 zero = vzero16 (); return (vu16) vec_mladd (_a, _b, zero); } #define vempty() do {} while (0) #define sfence() do {} while (0) #define vavgu8(_a, _b) vec_avg (_a, _b) #define fast_vavgu8(_a, _b) vavgu8 (_a, _b) #define vminu8(_a, _b) vec_min (_a, _b) #define vmaxu8(_a, _b) vec_max (_a, _b) #define vmin16(_a, _b) vec_min (_a, _b) #define vmax16(_a, _b) vec_max (_a, _b) static always_inline vu8 vabsdiffu8 (vu8 _a, vu8 _b) { /* Shorter than vec_abs (vec_sub (_a, _b)). */ return vec_sub (vec_max (_a, _b), vec_min (_a, _b)); } static always_inline void vminmaxu8 (vu8 * _min, vu8 * _max, vu8 _a, vu8 _b) { *_min = vec_min (_a, _b); *_max = vec_max (_a, _b); } #endif /* SIMD == CPU_FEATURE_ALTIVEC */ /* ========================================================================= */ #define SIMD_NAME2(name, suffix) name ## suffix #define SIMD_NAME1(name, suffix) SIMD_NAME2 (name, suffix) /* Depending on the definition of SIMD this turns SIMD_NAME (foobar) into foobar_MMX, foobar_SSE etc. */ #define SIMD_NAME(name) SIMD_NAME1 (name, SUFFIX) #define SIMD_FN_PROTOS(fn_type, name) \ extern fn_type name ## _SCALAR; \ extern fn_type name ## _MMX; \ extern fn_type name ## _3DNOW; \ extern fn_type name ## _SSE; \ extern fn_type name ## _SSE2; \ extern fn_type name ## _SSE3; \ extern fn_type name ## _ALTIVEC; #define SIMD_FN_ARRAY_PROTOS(fn_type, name, dimensions) \ extern fn_type name ## _SCALAR dimensions; \ extern fn_type name ## _MMX dimensions; \ extern fn_type name ## _3DNOW dimensions; \ extern fn_type name ## _SSE dimensions; \ extern fn_type name ## _SSE2 dimensions; \ extern fn_type name ## _SSE3 dimensions; \ extern fn_type name ## _ALTIVEC dimensions; #if defined (CAN_COMPILE_MMX) # define SIMD_FN_SELECT_MMX(name, avail) \ (((avail) & CPU_FEATURE_MMX) & cpu_features) ? name ## _MMX #else # define SIMD_FN_SELECT_MMX(name, avail) 0 ? NULL #endif #if defined (CAN_COMPILE_3DNOW) # define SIMD_FN_SELECT_3DNOW(name, avail) \ (((avail) & CPU_FEATURE_3DNOW) & cpu_features) ? name ## _3DNOW #else # define SIMD_FN_SELECT_3DNOW(name, avail) 0 ? NULL #endif #if defined (CAN_COMPILE_SSE) # define SIMD_FN_SELECT_SSE(name, avail) \ (((avail) & (CPU_FEATURE_SSE_INT | \ CPU_FEATURE_SSE_FLT)) & cpu_features) ? name ## _SSE #else # define SIMD_FN_SELECT_SSE(name, avail) 0 ? NULL #endif #if defined (CAN_COMPILE_SSE2) # define SIMD_FN_SELECT_SSE2(name, avail) \ (((avail) & CPU_FEATURE_SSE2) & cpu_features) ? name ## _SSE2 #else # define SIMD_FN_SELECT_SSE2(name, avail) 0 ? NULL #endif #if defined (CAN_COMPILE_SSE3) # define SIMD_FN_SELECT_SSE3(name, avail) \ (((avail) & CPU_FEATURE_SSE3) & cpu_features) ? name ## _SSE3 #else # define SIMD_FN_SELECT_SSE3(name, avail) 0 ? NULL #endif #if defined (CAN_COMPILE_ALTIVEC) # define SIMD_FN_SELECT_ALTIVEC(name, avail) \ (((avail) & CPU_FEATURE_ALTIVEC) & cpu_features) ? name ## _ALTIVEC #else # define SIMD_FN_SELECT_ALTIVEC(name, avail) 0 ? NULL #endif /* Selects a SIMD function depending on CPU features. */ /* TODO: function automagically learning which of the executable versions works fastest on this machine. */ #define SIMD_FN_SELECT(name, avail) \ (SIMD_FN_SELECT_ALTIVEC (name, avail) : \ SIMD_FN_SELECT_SSE3 (name, avail) : \ SIMD_FN_SELECT_SSE2 (name, avail) : \ SIMD_FN_SELECT_SSE (name, avail) : \ SIMD_FN_SELECT_3DNOW (name, avail) : \ SIMD_FN_SELECT_MMX (name, avail) : \ ((avail) & SCALAR) ? name ## _SCALAR : NULL) #define SIMD_FN_ALIGNED_SELECT(name, align, avail) \ (likely (0 == ((align) & 15)) ? \ SIMD_FN_SELECT (name, avail) : \ likely (0 == ((align) & 7)) ? \ SIMD_FN_SELECT (name, (avail) & (CPU_FEATURE_SSE_INT | \ CPU_FEATURE_3DNOW | \ CPU_FEATURE_MMX | \ SCALAR)) : \ SIMD_FN_SELECT (name, (avail) & SCALAR)) #endif /* SIMD_H */ zapping-0.10cvs6/libtv/pixel_format.c 644 764 144 25522 10432662534 13015 /* * Copyright (C) 2001-2004 Michael H. Schimek * Copyright (C) 2000-2003 Iaki Garca Etxebarria * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* $Id: pixel_format.c,v 1.8 2006/05/17 18:03:08 mschimek Exp $ */ #ifdef HAVE_CONFIG_H # include "config.h" /* Z_BYTE_ORDER */ #endif #include "misc.h" #include "pixel_format.h" const char * tv_pixfmt_name (tv_pixfmt pixfmt) { switch (pixfmt) { #undef CASE #define CASE(s) case TV_PIXFMT_##s : return #s ; CASE (NONE) CASE (NV12) CASE (YUV444) CASE (YVU444) CASE (YUV422) CASE (YVU422) CASE (YUV411) CASE (YVU411) CASE (YUV420) CASE (YVU420) CASE (YUV410) CASE (YVU410) CASE (YUVA32_LE) CASE (YUVA32_BE) CASE (YVUA32_LE) CASE (YVUA32_BE) /* AVUY32_BE synonyms */ /* AVUY32_LE */ /* AUVY32_BE */ /* AUVY32_LE */ CASE (YUV24_LE) CASE (YUV24_BE) CASE (YVU24_LE) CASE (YVU24_BE) /* VUY24_BE */ /* VUY24_LE */ /* UVY24_BE */ /* UVY24_LE */ CASE (YUYV) CASE (YVYU) CASE (UYVY) CASE (VYUY) CASE (Y8) CASE (HM12) CASE (RGBA32_LE) CASE (RGBA32_BE) CASE (BGRA32_LE) CASE (BGRA32_BE) /* ABGR32_BE synonyms */ /* ABGR32_LE */ /* ARGB32_BE */ /* ARGB32_LE */ CASE (RGB24_LE) CASE (BGR24_LE) /* BGR24_BE */ /* RGB24_BE */ CASE (RGB16_LE) CASE (RGB16_BE) CASE (BGR16_LE) CASE (BGR16_BE) CASE (RGBA16_LE) CASE (RGBA16_BE) CASE (BGRA16_LE) CASE (BGRA16_BE) CASE (ARGB16_LE) CASE (ARGB16_BE) CASE (ABGR16_LE) CASE (ABGR16_BE) CASE (RGBA12_LE) CASE (RGBA12_BE) CASE (BGRA12_LE) CASE (BGRA12_BE) CASE (ARGB12_LE) CASE (ARGB12_BE) CASE (ABGR12_LE) CASE (ABGR12_BE) CASE (RGB8) CASE (BGR8) CASE (RGBA8) CASE (BGRA8) CASE (ARGB8) CASE (ABGR8) CASE (SBGGR) case TV_PIXFMT_RESERVED1: case TV_PIXFMT_RESERVED3: break; } return NULL; } #define PIXEL_FORMAT(pixfmt, colspc, bits_per_pixel, color_depth, \ hmask, vmask, uv_hshift, uv_vshift, \ big_endian, n_planes, vu_order, r, g, b, a) \ { #pixfmt, \ TV_PIXFMT_##pixfmt, \ colspc, \ bits_per_pixel, \ color_depth, \ hmask, \ vmask, \ uv_hshift, \ uv_vshift, \ big_endian, \ n_planes, \ vu_order, \ .mask = { .rgb = { r, g, b, a } } } #if Z_BYTE_ORDER == Z_LITTLE_ENDIAN # define PACKED(fmt, colspc, bits_per_pixel, color_depth, big_endian, \ vu_order, x, y, z, a) \ [TV_PIXFMT_##fmt] = PIXEL_FORMAT (fmt, colspc, \ bits_per_pixel, color_depth, 0, 0, 0, 0, big_endian, \ 1, vu_order, x, y, z, a) #elif Z_BYTE_ORDER == Z_BIG_ENDIAN # define PACKED(fmt, colspc, bits_per_pixel, color_depth, big_endian, \ vu_order, x, y, z, a) \ [TV_PIXFMT_##fmt] = PIXEL_FORMAT (fmt, colspc, \ bits_per_pixel, color_depth, 0, 0, 0, 0, !(big_endian), \ 1, vu_order, x, y, z, a) #else # error unknown endianess #endif #define PLANAR(fmt, color_depth, uv_hshift, uv_vshift, vu_order) \ [TV_PIXFMT_##fmt] = PIXEL_FORMAT (fmt, TV_COLSPC_YUV, 8, \ color_depth, \ (1 << uv_hshift) - 1, (1 << uv_vshift) - 1, \ uv_hshift, uv_vshift, /* BE */ FALSE, /* n_planes */ 3, \ vu_order, 0xFF, 0xFF, 0xFF, 0) #define PACKED_YUV24(fmt, bpp, vu_order, x, y, z, a) \ PACKED(fmt##_LE, TV_COLSPC_YUV, \ bpp, 24, FALSE, vu_order, x, y, z, a), \ PACKED(fmt##_BE, TV_COLSPC_YUV, \ bpp, 24, TRUE, vu_order, x, y, z, a) #define YUYV(fmt, vu_order) \ [TV_PIXFMT_##fmt] = PIXEL_FORMAT (fmt, TV_COLSPC_YUV, 16, 16, \ /* mask */ 0x1, 0x0, /* shift */ 0, 0, \ /* BE */ FALSE, /* n_planes */ 1, vu_order, \ 0xFF, 0xFF, 0xFF, 0) #define PACKED_RGB24(fmt, bpp, x, y, z, a) \ PACKED(fmt##_LE, TV_COLSPC_RGB, \ bpp, 24, FALSE, FALSE, x, y, z, a), \ PACKED(fmt##_BE, TV_COLSPC_RGB, \ bpp, 24, TRUE, FALSE, x, y, z, a) #define PACKED16(fmt, x, y, z, a) \ PACKED(fmt##_LE, TV_COLSPC_RGB, \ 16, 16, FALSE, FALSE, x, y, z, a), \ PACKED(fmt##_BE, TV_COLSPC_RGB, \ 16, 16, TRUE, FALSE, x, y, z, a) #define PACKED8(fmt, x, y, z, a) \ [TV_PIXFMT_##fmt] = PIXEL_FORMAT (fmt, TV_COLSPC_RGB, 8, 8, \ 0, 0, 0, 0, FALSE, 1, FALSE, x, y, z, a) static const tv_pixel_format pixel_formats [] = { PLANAR (YUV444, 24, 0, 0, FALSE), PLANAR (YVU444, 24, 0, 0, TRUE), PLANAR (YUV422, 16, 1, 0, FALSE), PLANAR (YVU422, 16, 1, 0, TRUE), PLANAR (YUV411, 12, 2, 0, FALSE), PLANAR (YVU411, 12, 2, 0, TRUE), PLANAR (YUV420, 12, 1, 1, FALSE), PLANAR (YVU420, 12, 1, 1, TRUE), PLANAR (YUV410, 9, 2, 2, FALSE), PLANAR (YVU410, 9, 2, 2, TRUE), [TV_PIXFMT_NV12] = PIXEL_FORMAT (NV12, TV_COLSPC_YUV, 8, 12, /* mask */ 0x1, 0x1, /* shift */ 0, 1, /* BE */ FALSE, /* n_planes */ 2, /* vu */ FALSE, 0xFF, 0xFF, 0xFF, 0), PACKED_YUV24 (YUVA32, 32, FALSE, 0xFF, 0xFF00, 0xFF0000, 0xFF000000), PACKED_YUV24 (YVUA32, 32, TRUE, 0xFF, 0xFF0000, 0xFF00, 0xFF000000), PACKED_YUV24 (YUV24, 24, FALSE, 0xFF, 0xFF00, 0xFF0000, 0), PACKED_YUV24 (YVU24, 24, FALSE, 0xFF, 0xFF0000, 0xFF00, 0), YUYV (YUYV, FALSE), YUYV (YVYU, TRUE), YUYV (UYVY, FALSE), YUYV (VYUY, TRUE), [TV_PIXFMT_Y8] = PIXEL_FORMAT (Y8, TV_COLSPC_YUV, 8, 8, /* mask */ 0, 0, /* shift */ 0, 0, /* BE */ FALSE, /* n_planes */ 1, /* vu */ FALSE, 0xFF, 0, 0, 0), [TV_PIXFMT_HM12] = PIXEL_FORMAT (HM12, TV_COLSPC_YUV, 8, 12, /* mask */ 0xF, 0xF, /* shift */ 0, 1, /* BE */ FALSE, /* n_planes */ 2, /* vu */ FALSE, 0xFF, 0xFF, 0xFF, 0), PACKED_RGB24 (RGBA32, 32, 0xFF, 0xFF00, 0xFF0000, 0xFF000000), PACKED_RGB24 (BGRA32, 32, 0xFF0000, 0xFF00, 0xFF, 0xFF000000), PACKED (RGB24_LE, TV_COLSPC_RGB, 24, 24, FALSE, FALSE, 0xFF, 0xFF00, 0xFF0000, 0), PACKED (BGR24_LE, TV_COLSPC_RGB, 24, 24, FALSE, FALSE, 0xFF0000, 0xFF00, 0xFF, 0), PACKED16 (RGB16, 0x001F, 0x07E0, 0xF800, 0), PACKED16 (BGR16, 0xF800, 0x07E0, 0x001F, 0), PACKED16 (RGBA16, 0x001F, 0x03E0, 0x7C00, 0x8000), PACKED16 (BGRA16, 0x7C00, 0x03E0, 0x001F, 0x8000), PACKED16 (ARGB16, 0x003E, 0x07C0, 0xF800, 0x0001), PACKED16 (ABGR16, 0xF800, 0x07C0, 0x003E, 0x0001), PACKED16 (RGBA12, 0x000F, 0x00F0, 0x0F00, 0xF000), PACKED16 (BGRA12, 0x0F00, 0x00F0, 0x000F, 0xF000), PACKED16 (ARGB12, 0x00F0, 0x0F00, 0xF000, 0x000F), PACKED16 (ABGR12, 0xF000, 0x0F00, 0x00F0, 0x000F), PACKED8 (RGB8, 0x07, 0x38, 0xC0, 0), PACKED8 (BGR8, 0xE0, 0x1C, 0x03, 0), PACKED8 (RGBA8, 0x03, 0x1C, 0x60, 0x80), PACKED8 (BGRA8, 0x60, 0x1C, 0x03, 0x80), PACKED8 (ARGB8, 0x06, 0x38, 0xC0, 0x01), PACKED8 (ABGR8, 0xC0, 0x38, 0x06, 0x01), [TV_PIXFMT_SBGGR] = PIXEL_FORMAT (SBGGR, TV_COLSPC_RGB, 8, 24, /* mask */ 0x1, 0x1, /* shift */ 0, 0, /* BE */ FALSE, /* n_planes */ 1, /* vu */ FALSE, 0xFF, 0xFF, 0xFF, 0), }; unsigned int tv_pixfmt_bytes_per_pixel (tv_pixfmt pixfmt) { unsigned int index = (unsigned int) pixfmt; if (index > N_ELEMENTS (pixel_formats)) return 0; return pixel_formats[index].bits_per_pixel >> 3; } const tv_pixel_format * tv_pixel_format_from_pixfmt (tv_pixfmt pixfmt) { unsigned int index = (unsigned int) pixfmt; const tv_pixel_format *pf; if (index > N_ELEMENTS (pixel_formats)) return NULL; pf = &pixel_formats[index]; if (0 == pf->bits_per_pixel) return NULL; return pf; } #ifdef HAVE_BUILTIN_POPCOUNT # define popcnt(x) __builtin_popcount (x) #else /* Number of set bits. */ static unsigned int popcnt (unsigned int x) { x -= ((x >> 1) & 0x55555555); x = (x & 0x33333333) + ((x >> 2) & 0x33333333); x = (x + (x >> 4)) & 0x0F0F0F0F; return (x * 0x01010101) >> 24; } #endif /* Note this works only for RGB formats. */ tv_pixfmt tv_pixel_format_to_pixfmt (const tv_pixel_format *format) { unsigned int color_depth; unsigned int mask; unsigned int mask_a; unsigned int r_msb; unsigned int a_lsb; assert (NULL != format); if (format->bits_per_pixel < 7 || 0 == format->mask.rgb.r || 0 == format->mask.rgb.g || 0 == format->mask.rgb.b) return TV_PIXFMT_UNKNOWN; mask = format->mask.rgb.r | format->mask.rgb.g | format->mask.rgb.b; if (format->mask.rgb.g > format->mask.rgb.r) { if (format->mask.rgb.g > format->mask.rgb.b) return TV_PIXFMT_UNKNOWN; /* GRB, GBR */ } else { if (format->mask.rgb.b > format->mask.rgb.g) return TV_PIXFMT_UNKNOWN; /* RBG, BRG */ } color_depth = format->color_depth; if (0 == color_depth) color_depth = popcnt (mask); mask_a = format->mask.rgb.a; if (0 == mask_a) mask_a = mask ^ (0xFFFFFFFFUL >> (32 - format->bits_per_pixel)); if (mask > mask_a) { if (mask_a > format->mask.rgb.r || format->mask.rgb.a > format->mask.rgb.b) return TV_PIXFMT_UNKNOWN; /* XGAX, XAGX */ } a_lsb = (mask >= mask_a); r_msb = (format->mask.rgb.r >= format->mask.rgb.b); switch (color_depth) { case 24: if (32 == format->bits_per_pixel) { static tv_pixfmt mapping [] = { TV_PIXFMT_RGBA32_LE, TV_PIXFMT_RGBA32_BE, TV_PIXFMT_BGRA32_LE, TV_PIXFMT_BGRA32_BE, TV_PIXFMT_ARGB32_LE, TV_PIXFMT_ARGB32_BE, TV_PIXFMT_ABGR32_LE, TV_PIXFMT_ABGR32_BE, }; return mapping [a_lsb * 4 + r_msb * 2 + format->big_endian]; } else { static tv_pixfmt mapping [] = { TV_PIXFMT_RGB24_LE, TV_PIXFMT_BGR24_LE }; return mapping [r_msb]; } case 16: { static tv_pixfmt mapping [] = { TV_PIXFMT_RGB16_LE, TV_PIXFMT_RGB16_BE, TV_PIXFMT_BGR16_LE, TV_PIXFMT_BGR16_BE, }; return mapping [r_msb * 2 + format->big_endian]; } case 15: { static tv_pixfmt mapping [] = { TV_PIXFMT_RGBA16_LE, TV_PIXFMT_RGBA16_BE, TV_PIXFMT_BGRA16_LE, TV_PIXFMT_BGRA16_BE, TV_PIXFMT_ARGB16_LE, TV_PIXFMT_ARGB16_BE, TV_PIXFMT_ABGR16_LE, TV_PIXFMT_ABGR16_BE, }; return mapping [a_lsb * 4 + r_msb * 2 + format->big_endian]; } case 12: { static tv_pixfmt mapping [] = { TV_PIXFMT_RGBA12_LE, TV_PIXFMT_RGBA12_BE, TV_PIXFMT_BGRA12_LE, TV_PIXFMT_BGRA12_BE, TV_PIXFMT_ARGB12_LE, TV_PIXFMT_ARGB12_BE, TV_PIXFMT_ABGR12_LE, TV_PIXFMT_ABGR12_BE, }; return mapping [a_lsb * 4 + r_msb * 2 + format->big_endian]; } case 8: { static tv_pixfmt mapping [] = { TV_PIXFMT_RGB8, TV_PIXFMT_BGR8 }; return mapping [r_msb]; } case 7: { static tv_pixfmt mapping [] = { TV_PIXFMT_RGBA8, TV_PIXFMT_BGRA8, TV_PIXFMT_ARGB8, TV_PIXFMT_ABGR8, }; return mapping [a_lsb * 2 + r_msb]; break; } default: break; } return TV_PIXFMT_UNKNOWN; } zapping-0.10cvs6/libtv/pixel_format.h 644 764 144 25742 10432662544 13027 /* * Copyright (C) 2001-2004 Michael H. Schimek * Copyright (C) 2000-2003 Iaki Garca Etxebarria * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* $Id: pixel_format.h,v 1.11 2006/05/17 18:03:16 mschimek Exp $ */ #ifndef __ZTV_PIXEL_FORMAT_H__ #define __ZTV_PIXEL_FORMAT_H__ #include /* uint8_t, uint64_t */ #include "macros.h" TV_BEGIN_DECLS typedef enum { TV_PIXFMT_NONE, TV_PIXFMT_UNKNOWN = TV_PIXFMT_NONE, /* Planar YUV formats */ TV_PIXFMT_NV12, /* 4x4 1x1+1x1 */ TV_PIXFMT_YUV444, /* 4x4 4x4 4x4 */ TV_PIXFMT_YVU444, TV_PIXFMT_YUV422, /* 4x4 2x4 2x4 */ TV_PIXFMT_YVU422, TV_PIXFMT_YUV411, /* 4x4 1x4 1x4 */ TV_PIXFMT_YVU411, TV_PIXFMT_YUV420, /* 4x4 2x2 2x2 */ TV_PIXFMT_YVU420, TV_PIXFMT_YUV410, /* 4x4 1x1 1x1 */ TV_PIXFMT_YVU410, /* Packed YUV formats */ /* in register msb ... lsb */ TV_PIXFMT_YUVA32_LE, /* aaaaaaaavvvvvvvvuuuuuuuuyyyyyyyy */ TV_PIXFMT_YUVA32_BE, TV_PIXFMT_YVUA32_LE, /* aaaaaaaauuuuuuuuvvvvvvvvyyyyyyyy */ TV_PIXFMT_YVUA32_BE, TV_PIXFMT_AVUY32_BE = TV_PIXFMT_YUVA32_LE, TV_PIXFMT_AVUY32_LE, /* yyyyyyyyuuuuuuuuvvvvvvvvaaaaaaaa */ TV_PIXFMT_AUVY32_BE, TV_PIXFMT_AUVY32_LE, /* yyyyyyyyvvvvvvvvuuuuuuuuaaaaaaaa */ TV_PIXFMT_YUV24_LE, /* vvvvvvvvuuuuuuuuyyyyyyyy */ TV_PIXFMT_YUV24_BE, TV_PIXFMT_YVU24_LE, /* uuuuuuuuvvvvvvvvyyyyyyyy */ TV_PIXFMT_YVU24_BE, TV_PIXFMT_VUY24_BE = TV_PIXFMT_YUV24_LE, TV_PIXFMT_VUY24_LE, /* yyyyyyyyuuuuuuuuvvvvvvvv */ TV_PIXFMT_UVY24_BE, TV_PIXFMT_UVY24_LE, /* yyyyyyyyvvvvvvvvuuuuuuuu */ TV_PIXFMT_YUYV, /* Y0 U Y1 V in memory byte 0 ... 3 */ TV_PIXFMT_UYVY, /* U Y0 V Y1 */ TV_PIXFMT_YVYU, /* Y0 V Y1 U */ TV_PIXFMT_VYUY, /* V Y0 U Y1 */ TV_PIXFMT_RESERVED1, TV_PIXFMT_Y8, /* yyyyyyyy */ TV_PIXFMT_HM12, /* IVTV driver YUV format */ TV_PIXFMT_RESERVED3, /* Packed RGB formats */ TV_PIXFMT_RGBA32_LE, /* aaaaaaaabbbbbbbbggggggggrrrrrrrr */ TV_PIXFMT_RGBA32_BE, TV_PIXFMT_BGRA32_LE, /* aaaaaaaarrrrrrrrggggggggbbbbbbbb */ TV_PIXFMT_BGRA32_BE, TV_PIXFMT_ABGR32_BE = TV_PIXFMT_RGBA32_LE, TV_PIXFMT_ABGR32_LE, /* rrrrrrrrggggggggbbbbbbbbaaaaaaaa */ TV_PIXFMT_ARGB32_BE, TV_PIXFMT_ARGB32_LE, /* bbbbbbbbggggggggrrrrrrrraaaaaaaa */ TV_PIXFMT_RGB24_LE, /* bbbbbbbbggggggggrrrrrrrr */ TV_PIXFMT_BGR24_LE, /* rrrrrrrrggggggggbbbbbbbb */ TV_PIXFMT_BGR24_BE = TV_PIXFMT_RGB24_LE, TV_PIXFMT_RGB24_BE, TV_PIXFMT_RGB16_LE, /* bbbbbggggggrrrrr */ TV_PIXFMT_RGB16_BE, TV_PIXFMT_BGR16_LE, /* rrrrrggggggbbbbb */ TV_PIXFMT_BGR16_BE, TV_PIXFMT_RGBA16_LE, /* abbbbbgggggrrrrr */ TV_PIXFMT_RGBA16_BE, TV_PIXFMT_BGRA16_LE, /* arrrrrgggggbbbbb */ TV_PIXFMT_BGRA16_BE, TV_PIXFMT_ARGB16_LE, /* bbbbbgggggrrrrra */ TV_PIXFMT_ARGB16_BE, TV_PIXFMT_ABGR16_LE, /* rrrrrgggggbbbbba */ TV_PIXFMT_ABGR16_BE, TV_PIXFMT_RGBA12_LE, /* aaaabbbbggggrrrr */ TV_PIXFMT_RGBA12_BE, TV_PIXFMT_BGRA12_LE, /* aaaarrrrggggbbbb */ TV_PIXFMT_BGRA12_BE, TV_PIXFMT_ARGB12_LE, /* bbbbggggrrrraaaa */ TV_PIXFMT_ARGB12_BE, TV_PIXFMT_ABGR12_LE, /* rrrrggggbbbbaaaa */ TV_PIXFMT_ABGR12_BE, TV_PIXFMT_RGB8, /* bbgggrrr */ TV_PIXFMT_BGR8, /* rrrgggbb */ TV_PIXFMT_RGBA8, /* abbgggrr */ TV_PIXFMT_BGRA8, /* arrgggbb */ TV_PIXFMT_ARGB8, /* bbgggrra */ TV_PIXFMT_ABGR8, /* rrgggbba */ /* Preliminary */ TV_PIXFMT_SBGGR, } tv_pixfmt; #define TV_MAX_PIXFMTS 64 typedef uint64_t tv_pixfmt_set; #define TV_PIXFMT_SET(pixfmt) (((tv_pixfmt_set) 1) << (pixfmt)) #define TV_PIXFMT_SET_UNKNOWN 0 #define TV_PIXFMT_SET_EMPTY 0 #define TV_PIXFMT_SET_YUV_PLANAR (TV_PIXFMT_SET (TV_PIXFMT_YUV444) | \ TV_PIXFMT_SET (TV_PIXFMT_YVU444) | \ TV_PIXFMT_SET (TV_PIXFMT_YUV422) | \ TV_PIXFMT_SET (TV_PIXFMT_YVU422) | \ TV_PIXFMT_SET (TV_PIXFMT_YUV411) | \ TV_PIXFMT_SET (TV_PIXFMT_YVU411) | \ TV_PIXFMT_SET (TV_PIXFMT_YUV420) | \ TV_PIXFMT_SET (TV_PIXFMT_YVU420) | \ TV_PIXFMT_SET (TV_PIXFMT_YUV410) | \ TV_PIXFMT_SET (TV_PIXFMT_YVU410) | \ TV_PIXFMT_SET (TV_PIXFMT_NV12) | \ TV_PIXFMT_SET (TV_PIXFMT_HM12)) #define TV_PIXFMT_SET_YUVA32 (TV_PIXFMT_SET (TV_PIXFMT_YUVA32_LE) | \ TV_PIXFMT_SET (TV_PIXFMT_YUVA32_BE) | \ TV_PIXFMT_SET (TV_PIXFMT_YVUA32_LE) | \ TV_PIXFMT_SET (TV_PIXFMT_YVUA32_BE)) #define TV_PIXFMT_SET_YUV24 (TV_PIXFMT_SET (TV_PIXFMT_YUV24_LE) | \ TV_PIXFMT_SET (TV_PIXFMT_YUV24_BE) | \ TV_PIXFMT_SET (TV_PIXFMT_YVU24_LE) | \ TV_PIXFMT_SET (TV_PIXFMT_YVU24_BE)) #define TV_PIXFMT_SET_YUV16 (TV_PIXFMT_SET (TV_PIXFMT_YUYV) | \ TV_PIXFMT_SET (TV_PIXFMT_YVYU) | \ TV_PIXFMT_SET (TV_PIXFMT_UYVY) | \ TV_PIXFMT_SET (TV_PIXFMT_VYUY)) #define TV_PIXFMT_SET_YUV_PACKED (TV_PIXFMT_SET_YUVA32 | \ TV_PIXFMT_SET_YUV24 | \ TV_PIXFMT_SET_YUV16 | \ TV_PIXFMT_SET (TV_PIXFMT_Y8)) #define TV_PIXFMT_SET_YUV (TV_PIXFMT_SET_YUV_PLANAR | \ TV_PIXFMT_SET_YUV_PACKED) #define TV_PIXFMT_SET_RGBA32 (TV_PIXFMT_SET (TV_PIXFMT_RGBA32_LE) | \ TV_PIXFMT_SET (TV_PIXFMT_RGBA32_BE) | \ TV_PIXFMT_SET (TV_PIXFMT_BGRA32_LE) | \ TV_PIXFMT_SET (TV_PIXFMT_BGRA32_BE)) #define TV_PIXFMT_SET_RGB24 (TV_PIXFMT_SET (TV_PIXFMT_RGB24_LE) | \ TV_PIXFMT_SET (TV_PIXFMT_BGR24_LE)) #define TV_PIXFMT_SET_RGB16 (TV_PIXFMT_SET (TV_PIXFMT_RGB16_LE) | \ TV_PIXFMT_SET (TV_PIXFMT_RGB16_BE) | \ TV_PIXFMT_SET (TV_PIXFMT_BGR16_LE) | \ TV_PIXFMT_SET (TV_PIXFMT_BGR16_BE)) #define TV_PIXFMT_SET_RGBA16 (TV_PIXFMT_SET (TV_PIXFMT_RGBA16_LE) | \ TV_PIXFMT_SET (TV_PIXFMT_RGBA16_BE) | \ TV_PIXFMT_SET (TV_PIXFMT_BGRA16_LE) | \ TV_PIXFMT_SET (TV_PIXFMT_BGRA16_BE) | \ TV_PIXFMT_SET (TV_PIXFMT_ARGB16_LE) | \ TV_PIXFMT_SET (TV_PIXFMT_ARGB16_BE) | \ TV_PIXFMT_SET (TV_PIXFMT_ABGR16_LE) | \ TV_PIXFMT_SET (TV_PIXFMT_ABGR16_BE)) #define TV_PIXFMT_SET_RGBA12 (TV_PIXFMT_SET (TV_PIXFMT_RGBA12_LE) | \ TV_PIXFMT_SET (TV_PIXFMT_RGBA12_BE) | \ TV_PIXFMT_SET (TV_PIXFMT_BGRA12_LE) | \ TV_PIXFMT_SET (TV_PIXFMT_BGRA12_BE) | \ TV_PIXFMT_SET (TV_PIXFMT_ARGB12_LE) | \ TV_PIXFMT_SET (TV_PIXFMT_ARGB12_BE) | \ TV_PIXFMT_SET (TV_PIXFMT_ABGR12_LE) | \ TV_PIXFMT_SET (TV_PIXFMT_ABGR12_BE)) #define TV_PIXFMT_SET_RGB8 (TV_PIXFMT_SET (TV_PIXFMT_RGB8) | \ TV_PIXFMT_SET (TV_PIXFMT_BGR8)) #define TV_PIXFMT_SET_RGBA8 (TV_PIXFMT_SET (TV_PIXFMT_RGBA8) | \ TV_PIXFMT_SET (TV_PIXFMT_BGRA8) | \ TV_PIXFMT_SET (TV_PIXFMT_ARGB8) | \ TV_PIXFMT_SET (TV_PIXFMT_ABGR8)) #define TV_PIXFMT_SET_RGB_PACKED (TV_PIXFMT_SET_RGBA32 | \ TV_PIXFMT_SET_RGB24 | \ TV_PIXFMT_SET_RGB16 | \ TV_PIXFMT_SET_RGBA16 | \ TV_PIXFMT_SET_RGBA12 | \ TV_PIXFMT_SET_RGB8 | \ TV_PIXFMT_SET_RGBA8) #define TV_PIXFMT_SET_RGB (TV_PIXFMT_SET_RGB_PACKED | \ TV_PIXFMT_SET (TV_PIXFMT_SBGGR)) #define TV_PIXFMT_SET_PLANAR TV_PIXFMT_SET_YUV_PLANAR #define TV_PIXFMT_SET_PACKED (TV_PIXFMT_SET_YUV_PACKED | \ TV_PIXFMT_SET_RGB_PACKED) #define TV_PIXFMT_SET_ALL (TV_PIXFMT_SET_YUV | \ TV_PIXFMT_SET_RGB) #define TV_PIXFMT_IS_YUV(pixfmt) \ (0 != (TV_PIXFMT_SET (pixfmt) & TV_PIXFMT_SET_YUV)) #define TV_PIXFMT_IS_RGB(pixfmt) \ (0 != (TV_PIXFMT_SET (pixfmt) & TV_PIXFMT_SET_RGB)) #define TV_PIXFMT_IS_PLANAR(pixfmt) \ (0 != (TV_PIXFMT_SET (pixfmt) & TV_PIXFMT_SET_PLANAR)) #define TV_PIXFMT_IS_PACKED(pixfmt) \ (0 != (TV_PIXFMT_SET (pixfmt) & TV_PIXFMT_SET_PACKED)) #ifdef __GNUC__ #define TV_PIXFMT_BYTES_PER_PIXEL(pixfmt) \ (!__builtin_constant_p (pixfmt) ? \ tv_pixfmt_bytes_per_pixel (pixfmt) : \ ((TV_PIXFMT_SET (pixfmt) & TV_PIXFMT_SET_YUVA32) ? 4 : \ ((TV_PIXFMT_SET (pixfmt) & TV_PIXFMT_SET_RGBA32) ? 4 : \ ((TV_PIXFMT_SET (pixfmt) & TV_PIXFMT_SET_YUV24) ? 3 : \ ((TV_PIXFMT_SET (pixfmt) & TV_PIXFMT_SET_RGB24) ? 3 : \ ((TV_PIXFMT_SET (pixfmt) & TV_PIXFMT_SET_YUV16) ? 2 : \ ((TV_PIXFMT_SET (pixfmt) & TV_PIXFMT_SET_RGB16) ? 2 : \ ((TV_PIXFMT_SET (pixfmt) & TV_PIXFMT_SET_RGBA16) ? 2 : \ ((TV_PIXFMT_SET (pixfmt) & TV_PIXFMT_SET_RGBA12) ? 2 : \ ((TV_PIXFMT_SBGGR == (pixfmt)) ? 1 : \ 1)))))))))) #else #define TV_PIXFMT_BYTES_PER_PIXEL(pixfmt) \ (tv_pixfmt_bytes_per_pixel (pixfmt)) #endif /** Color space identifier. No values defined yet. */ typedef enum { TV_COLSPC_NONE, /**< */ TV_COLSPC_UNKNOWN = TV_COLSPC_NONE, /**< */ /** Unspecified RGB color space. */ TV_COLSPC_RGB, /** Unspecified YUV (YCbCr) color space. */ TV_COLSPC_YUV, } tv_colspc; extern const char * tv_pixfmt_name (tv_pixfmt pixfmt) __attribute__ ((const)); extern unsigned int tv_pixfmt_bytes_per_pixel (tv_pixfmt pixfmt) __attribute__ ((const)); /* Broken-down pixel format */ typedef struct { const char * name; tv_pixfmt pixfmt; tv_colspc colspc; /* Number of bits per pixel. For packed YUV 4:2:2 this is 16. For planar formats this refers to the Y plane only. */ unsigned int bits_per_pixel; /* Number of red, green and blue, or luma and chroma bits per pixel. Averaged if U and V plane are smaller than Y plane. */ unsigned int color_depth; uint8_t hmask; uint8_t vmask; /* Width and height of the U and V plane: uv_width = width >> uv_hshift, uv_height = height >> uv_vshift. */ uint8_t uv_hshift; uint8_t uv_vshift; /* Format is packed and pixels are stored in 16, 24 or 32 bit (bits_per_pixel) quantities with most significant byte first in memory. */ tv_bool big_endian; /* Y, U and V color components are stored in separate arrays, first Y, then U and V. */ unsigned int n_planes; /* For packed YUV 4:2:2, V pixel is stored before U pixel in memory. For planar YUV formats, V plane is stored before U plane in memory. */ tv_bool vu_order; tv_bool _reserved2[5]; /* Bit masks describing size and position of color components in a 8, 16, 24 or 32 bit (bits_per_pixel) quantity, as seen when reading a word from memory with proper endianess. For packed YUV 4:2:2 and planar formats y, u and v will be 0xFF. The a (alpha) component can be zero. */ union { struct { unsigned int r; unsigned int g; unsigned int b; unsigned int a; } rgb; struct { unsigned int y; unsigned int u; unsigned int v; unsigned int a; } yuv; } mask; } tv_pixel_format; extern const tv_pixel_format * tv_pixel_format_from_pixfmt (tv_pixfmt pixfmt) __attribute__ ((const)); extern tv_pixfmt tv_pixel_format_to_pixfmt (const tv_pixel_format *format); TV_END_DECLS #endif /* __ZTV_PIXEL_FORMAT_H__ */ zapping-0.10cvs6/libtv/clear_image.c 644 764 144 25422 10432662464 12555 /* * Copyright (C) 2001-2004, 2006 Michael H. Schimek * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* $Id: clear_image.c,v 1.2 2006/05/17 18:02:28 mschimek Exp $ */ #ifdef HAVE_CONFIG_H # include "config.h" #endif #include /* memset() */ #include "clear_image.h" #include "misc.h" #include "simd.h" typedef void clear_plane_3_fn (uint8_t * dst, const uint8_t * src, unsigned int width, unsigned int height, unsigned long padding); SIMD_FN_PROTOS (clear_plane_fn, _tv_clear_plane_1) SIMD_FN_PROTOS (clear_plane_fn, _tv_clear_plane_4) SIMD_FN_PROTOS (clear_plane_3_fn, _tv_clear_plane_3) #if SIMD # if SIMD == CPU_FEATURE_SSE_INT /* Use float (128 bit) instructions. */ # define vu8 vf # undef vloadnt # define vloadnt vloadfnt # undef vstorent # define vstorent vstorefnt # endif void SIMD_NAME (_tv_clear_plane_1) (uint8_t * dst, unsigned int value, unsigned int width, unsigned int height, unsigned long padding) { vu8 m0; #if SIMD == CPU_FEATURE_MMX m0 = vsplatu32 (value); #elif SIMD == CPU_FEATURE_SSE_INT { uint32_t __attribute__ ((aligned (16))) value4[4]; value4[0] = value; value4[1] = value; value4[2] = value; value4[3] = value; m0 = vloadnt (value4, 0); } #elif SIMD == CPU_FEATURE_ALTIVEC m0 = (vu8)((vector int){ value, value, value, value }); #endif while (height-- > 0) { uint8_t *end1; uint8_t *end2; end1 = dst + (width & (-8 * sizeof (vu8))); end2 = dst + width; for (; dst < end1; dst += 8 * sizeof (vu8)) { vstorent (dst, 0 * sizeof (vu8), m0); vstorent (dst, 1 * sizeof (vu8), m0); vstorent (dst, 2 * sizeof (vu8), m0); vstorent (dst, 3 * sizeof (vu8), m0); vstorent (dst, 4 * sizeof (vu8), m0); vstorent (dst, 5 * sizeof (vu8), m0); vstorent (dst, 6 * sizeof (vu8), m0); vstorent (dst, 7 * sizeof (vu8), m0); } for (; dst < end2; dst += sizeof (vu8)) vstorent (dst, 0, m0); dst += padding; } sfence (); vempty (); } void SIMD_NAME (_tv_clear_plane_3) (uint8_t * dst, const uint8_t * src, unsigned int width, unsigned int height, unsigned long padding) { vu8 m0, m1, m2; m0 = vloadnt (src, 0 * sizeof (vu8)); m1 = vloadnt (src, 1 * sizeof (vu8)); m2 = vloadnt (src, 2 * sizeof (vu8)); while (height-- > 0) { uint8_t *end; for (end = dst + width * 3; dst < end; dst += 3 * sizeof (vu8)) { vstorent (dst, 0 * sizeof (vu8), m0); vstorent (dst, 1 * sizeof (vu8), m1); vstorent (dst, 2 * sizeof (vu8), m2); } dst += padding; } sfence (); vempty (); } void SIMD_NAME (_tv_clear_plane_4) (uint8_t * dst, unsigned int value, unsigned int width, unsigned int height, unsigned long padding) { SIMD_NAME (_tv_clear_plane_1) (dst, value, width * 4, height, padding); } #else /* !SIMD */ #define IMPL (SCALAR | \ CPU_FEATURE_MMX | \ CPU_FEATURE_SSE_FLT | \ CPU_FEATURE_ALTIVEC) static const uint8_t __attribute__ ((aligned (16))) yuv3 [4 * 16] = { 0x00, 0x80, 0x80, 0x00, 0x80, 0x80, 0x00, 0x80, 0x80, 0x00, 0x80, 0x80, 0x00, 0x80, 0x80, 0x00, 0x80, 0x80, 0x00, 0x80, 0x80, 0x00, 0x80, 0x80, 0x00, 0x80, 0x80, 0x00, 0x80, 0x80, 0x00, 0x80, 0x80, 0x00, 0x80, 0x80, 0x00, 0x80, 0x80, 0x00, 0x80, 0x80, 0x00, 0x80, 0x80, 0x00, 0x80, 0x80, 0x00, 0x80, 0x80, 0x00, 0x80, 0x80, 0x00, 0x80, 0x80, 0x00, 0x80, 0x80, 0x00, 0x80, 0x80, 0x00, }; void _tv_clear_plane_1_SCALAR (uint8_t * dst, unsigned int value, unsigned int width, unsigned int height, unsigned long padding) { while (height-- > 0) { memset (dst, (int) value, width); dst += width + padding; } } void _tv_clear_plane_3_SCALAR (uint8_t * dst, const uint8_t * src, unsigned int width, unsigned int height, unsigned long padding) { int m0, m1, m2; m0 = src[0]; m1 = src[1]; m2 = src[2]; while (height-- > 0) { unsigned int count; for (count = width; count > 0; --count) { dst[0] = m0; dst[1] = m1; dst[2] = m2; dst += 3; } dst += padding; } } void _tv_clear_plane_4_SCALAR (uint8_t * dst, unsigned int value, unsigned int width, unsigned int height, unsigned long padding) { uint32_t *dst32 = (uint32_t *) dst; for (; height > 0; --height) { unsigned int count; for (count = width; count > 0; --count) *dst32++ = value; dst32 = (uint32_t *)((uint8_t *) dst32 + padding); } } tv_bool tv_clear_image (void * image, const tv_image_format *format) { clear_plane_fn *clear_plane; clear_plane_3_fn *clear_plane_3; const tv_pixel_format *pf; uint8_t *dst; const uint8_t *src; unsigned int width; unsigned int height; unsigned long padding; unsigned long align; unsigned int value; assert (NULL != image); assert (NULL != format); width = format->width; height = format->height; pf = format->pixel_format; switch (pf->pixfmt) { case TV_PIXFMT_NONE: case TV_PIXFMT_RESERVED1: case TV_PIXFMT_RESERVED3: break; case TV_PIXFMT_YUV24_LE: case TV_PIXFMT_YVU24_LE: switch (Z_BYTE_ORDER) { case Z_LITTLE_ENDIAN: src = yuv3; break; case Z_BIG_ENDIAN: src = &yuv3[16]; break; } goto clear3; case TV_PIXFMT_YUV24_BE: case TV_PIXFMT_YVU24_BE: switch (Z_BYTE_ORDER) { case Z_LITTLE_ENDIAN: src = &yuv3[16]; break; case Z_BIG_ENDIAN: src = yuv3; break; } clear3: dst = (uint8_t *) image + format->offset[0]; align = (unsigned long) dst; padding = format->bytes_per_line[0] - width * 3; if (likely (0 == padding)) { width *= height; height = 1; } else { align |= format->bytes_per_line[1]; } align |= width; clear_plane_3 = SIMD_FN_ALIGNED_SELECT (_tv_clear_plane_3, align, IMPL); clear_plane_3 (dst, src, width, height, padding); return TRUE; case TV_PIXFMT_YUVA32_LE: case TV_PIXFMT_YUVA32_BE: case TV_PIXFMT_YVUA32_LE: case TV_PIXFMT_YVUA32_BE: value = 0x00808000; goto clear4; case TV_PIXFMT_YUYV: case TV_PIXFMT_YVYU: if (unlikely (width & 1)) return FALSE; switch (Z_BYTE_ORDER) { case Z_LITTLE_ENDIAN: value = 0x80008000; break; case Z_BIG_ENDIAN: value = 0x00800080; break; } goto clear2; case TV_PIXFMT_UYVY: case TV_PIXFMT_VYUY: if (unlikely (width & 1)) return FALSE; switch (Z_BYTE_ORDER) { case Z_LITTLE_ENDIAN: value = 0x00800080; break; case Z_BIG_ENDIAN: value = 0x80008000; break; } clear2: width >>= 1; clear4: dst = (uint8_t *) image + format->offset[0]; align = (unsigned long) dst; padding = format->bytes_per_line[0] - width * 4; if (likely (0 == padding)) { width *= height; height = 1; } else { align |= format->bytes_per_line[0]; } align |= width; clear_plane = SIMD_FN_ALIGNED_SELECT (_tv_clear_plane_4, align, IMPL); clear_plane (dst, value, width, height, padding); return TRUE; case TV_PIXFMT_YUV422: case TV_PIXFMT_YVU422: if (unlikely (0 != (width & 1))) return FALSE; goto clear_yuv_planar; case TV_PIXFMT_YUV411: case TV_PIXFMT_YVU411: if (unlikely (0 != (width & 3))) return FALSE; goto clear_yuv_planar; case TV_PIXFMT_YUV420: case TV_PIXFMT_YVU420: case TV_PIXFMT_NV12: case TV_PIXFMT_HM12: if (unlikely (0 != ((width | height) & 1))) return FALSE; goto clear_yuv_planar; case TV_PIXFMT_YUV410: case TV_PIXFMT_YVU410: if (unlikely (0 != ((width | height) & 3))) return FALSE; goto clear_yuv_planar; case TV_PIXFMT_YUV444: case TV_PIXFMT_YVU444: clear_yuv_planar: width >>= pf->uv_hshift; height >>= pf->uv_vshift; if (3 == pf->n_planes) { if (likely ((format->bytes_per_line[1] == format->bytes_per_line[2]) && (format->offset[1] + height * format->bytes_per_line[1] == format->offset[2]))) { height *= 2; } else { unsigned int v_width; unsigned int v_height; v_width = width; v_height = height; dst = (uint8_t *) image + format->offset[2]; align = (unsigned long) dst; padding = format->bytes_per_line[2] - v_width; if (likely (0 == padding)) { v_width *= v_height; v_height = 1; } else { align |= format->bytes_per_line[2]; } align |= v_width; clear_plane = SIMD_FN_ALIGNED_SELECT (_tv_clear_plane_1, align, IMPL); clear_plane (dst, 0x80808080, v_width, v_height, padding); } } dst = (uint8_t *) image + format->offset[1]; align = (unsigned long) dst; padding = format->bytes_per_line[1] - width; if (likely (0 == padding)) { width *= height; height = 1; } else { align |= format->bytes_per_line[1]; } align |= width; clear_plane = SIMD_FN_ALIGNED_SELECT (_tv_clear_plane_1, align, IMPL); clear_plane (dst, 0x80808080, width, height, padding); width = format->width; height = format->height; goto clear1; case TV_PIXFMT_Y8: goto clear1; case TV_PIXFMT_RGBA32_LE: case TV_PIXFMT_RGBA32_BE: case TV_PIXFMT_BGRA32_LE: case TV_PIXFMT_BGRA32_BE: case TV_PIXFMT_RGB24_LE: case TV_PIXFMT_BGR24_LE: case TV_PIXFMT_RGB16_LE: case TV_PIXFMT_RGB16_BE: case TV_PIXFMT_BGR16_LE: case TV_PIXFMT_BGR16_BE: case TV_PIXFMT_RGBA16_LE: case TV_PIXFMT_RGBA16_BE: case TV_PIXFMT_BGRA16_LE: case TV_PIXFMT_BGRA16_BE: case TV_PIXFMT_ARGB16_LE: case TV_PIXFMT_ARGB16_BE: case TV_PIXFMT_ABGR16_LE: case TV_PIXFMT_ABGR16_BE: case TV_PIXFMT_RGBA12_LE: case TV_PIXFMT_RGBA12_BE: case TV_PIXFMT_BGRA12_LE: case TV_PIXFMT_BGRA12_BE: case TV_PIXFMT_ARGB12_LE: case TV_PIXFMT_ARGB12_BE: case TV_PIXFMT_ABGR12_LE: case TV_PIXFMT_ABGR12_BE: case TV_PIXFMT_RGB8: case TV_PIXFMT_BGR8: case TV_PIXFMT_RGBA8: case TV_PIXFMT_BGRA8: case TV_PIXFMT_ARGB8: case TV_PIXFMT_ABGR8: goto clear1; case TV_PIXFMT_SBGGR: if (unlikely ((width | height) & 1)) return FALSE; /* fall through */ clear1: width = (width * pf->bits_per_pixel) >> 3; dst = (uint8_t *) image + format->offset[0]; align = (unsigned long) dst; padding = format->bytes_per_line[0] - width; if (likely (0 == padding)) { width *= height; height = 1; } else { align |= format->bytes_per_line[0]; } align |= width; clear_plane = SIMD_FN_ALIGNED_SELECT (_tv_clear_plane_1, align, IMPL); clear_plane (dst, 0, width, height, padding); return TRUE; } return FALSE; } #endif /* !SIMD */ zapping-0.10cvs6/libtv/clear_image.h 644 764 144 2145 10417056137 12534 /* * Copyright (C) 2001-2004 Michael H. Schimek * Copyright (C) 2000-2003 Iaki Garca Etxebarria * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* $Id: clear_image.h,v 1.1 2006/04/12 01:48:15 mschimek Exp $ */ #ifndef __ZTV_CLEAR_IMAGE_H__ #define __ZTV_CLEAR_IMAGE_H__ #include "image_format.h" TV_BEGIN_DECLS extern tv_bool tv_clear_image (void * image, const tv_image_format *format); TV_END_DECLS #endif /* __ZTV_CLEAR_IMAGE_H__ */ zapping-0.10cvs6/libtv/clip_vector.c 644 764 144 20401 10326457521 12624 /* * Copyright (C) 2001-2004 Michael H. Schimek * Copyright (C) 2000-2003 Iaki Garca Etxebarria * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* $Id: clip_vector.c,v 1.3 2005/10/22 15:48:33 mschimek Exp $ */ #include /* malloc() */ #include "misc.h" #include "clip_vector.h" void _tv_clip_vector_dump (const tv_clip_vector * vector, FILE * fp) { unsigned int i; assert (NULL != vector); fprintf (fp, "clip vector %p size=%u:\n", vector, vector->size); for (i = 0; i < vector->size; ++i) { fprintf (fp, " %3u: %u, %u - %u, %u\n", i, vector->vector[i].x1, vector->vector[i].y1, vector->vector[i].x2, vector->vector[i].y2); } } tv_bool tv_clip_vector_equal (const tv_clip_vector * vector1, const tv_clip_vector * vector2) { unsigned int i; assert (NULL != vector1); assert (NULL != vector2); if (vector1 == vector2) return TRUE; if (vector1->size != vector2->size) return FALSE; for (i = 0; i < vector1->size; ++i) if (!tv_clip_equal (vector1->vector + i, vector2->vector + i)) return FALSE; return TRUE; } tv_bool tv_clip_vector_set (tv_clip_vector * dst, const tv_clip_vector * src) { assert (NULL != dst); if (dst == src) return TRUE; if (src) { if (src->size > dst->capacity) { tv_clip *clip_vector; unsigned long size; assert (src->capacity >= src->size); size = src->capacity * sizeof (*clip_vector); if (!(clip_vector = realloc (dst->vector, size))) return FALSE; dst->vector = clip_vector; dst->capacity = src->capacity; } memcpy (dst->vector, src->vector, sizeof (*src->vector) * src->size); dst->size = src->size; } else { dst->size = 0; } return TRUE; } tv_bool tv_clip_vector_copy (tv_clip_vector * dst, const tv_clip_vector * src) { assert (NULL != dst); if (dst == src) return TRUE; if (src) { tv_clip *clip_vector; unsigned long size; size = src->capacity * sizeof (*clip_vector); if (!(clip_vector = malloc (size))) return FALSE; dst->vector = clip_vector; dst->capacity = src->capacity; dst->size = src->size; memcpy (dst->vector, src->vector, sizeof (*src->vector) * src->size); } else { CLEAR (*dst); } return TRUE; } /* Note: width = x2 - x1, height = y2 - y1. */ tv_bool _tv_clip_vector_add_clip_xy (tv_clip_vector * vector, unsigned int x1, unsigned int y1, unsigned int x2, unsigned int y2) { tv_clip *clip; tv_clip *end; assert (NULL != vector); if (x1 >= x2 || y1 >= y2) return TRUE; restart: clip = vector->vector; end = vector->vector + vector->size; /* Clips are sorted in ascending order, first by x1, second y1. We split into horizontal bands, merging clips where possible. Vertically adjacent clips or bands are not merged. a # b ## c ##### d ###### e ## f clip g ##### h ## i ## j ## k # */ for (;;) { if (clip >= end /* k */ || y2 <= clip->y1 /* a */) goto insert; if (y1 < clip->y1 /* bcd */) { /* Insert bottom half (efg). */ if (!tv_clip_vector_add_clip_xy (vector, x1, clip->y1, x2, y2)) return FALSE; /* Top half (a). */ y2 = clip->y1; goto restart; } if (y1 < clip->y2 /* efghij */) { if (y2 > clip->y2 /* gj */) { /* Insert bottom half (k). */ if (!tv_clip_vector_add_clip_xy (vector, x1, clip->y2, x2, y2)) return FALSE; /* Top half (fi). */ y2 = clip->y2; goto restart; } break; } ++clip; } /* efhi */ if (y1 != clip->y1 || y2 != clip->y2) { unsigned int ys; unsigned int n; unsigned int i; /* Split band at ys. */ if (y1 > clip->y1 /* hi */) { ys = y1; } else { /* e */ ys = y2; } /* n = band size. */ for (n = 1; clip + n < end; ++n) if (clip[0].y1 != clip[n].y1) break; if (vector->size + n >= vector->capacity) { tv_clip *new_vector; unsigned int new_capacity; unsigned long size; /* 0 < n <= size <= capacity */ new_capacity = vector->capacity * 2; size = new_capacity * sizeof (*new_vector); if (!(new_vector = realloc (vector->vector, size))) return FALSE; clip = new_vector + (clip - vector->vector); end = new_vector + vector->size; vector->vector = new_vector; vector->capacity = new_capacity; } memmove (clip + n, clip, sizeof (tv_clip) * (end - clip)); vector->size += n; end += n; for (i = 0; i < n; ++i) { clip[i + 0].y2 = ys; clip[i + n].y1 = ys; } goto restart; /* ef */ } /* f */ do { if (x2 < clip->x1) break; /* insert before */ if (x1 < clip->x2) { unsigned int n; /* Merge clips. */ x1 = MIN (x1, (unsigned int) clip->x1); for (n = 1; clip + n < end; ++n) if (x2 < clip[n].x1 || y1 != clip[n].y1) break; --n; x2 = MAX (x2, (unsigned int) clip[n].x2); if (n > 0) { memmove (clip, clip + n, sizeof (tv_clip) * (end - (clip + n))); vector->size -= n; } goto store; } ++clip; } while (clip < end && y1 == clip->y1); insert: if (vector->size == vector->capacity) { tv_clip *new_vector; unsigned int new_capacity; unsigned long size; new_capacity = (vector->capacity < 16) ? 16 : vector->capacity * 2; size = new_capacity * sizeof (*new_vector); if (!(new_vector = realloc (vector->vector, size))) return FALSE; clip = new_vector + (clip - vector->vector); end = new_vector + vector->size; vector->vector = new_vector; vector->capacity = new_capacity; } if (clip < end) { memmove (clip + 1, clip, sizeof (tv_clip) * (end - clip)); } ++vector->size; store: assert (clip >= vector->vector && clip < vector->vector + vector->size); clip->x1 = x1; clip->y1 = y1; clip->x2 = x2; clip->y2 = y2; if (0) { unsigned int i; clip = vector->vector; for (i = 0; i < vector->size; ++i, ++clip) fprintf (stderr, "%3u: %3u,%3u - %3u,%3u\n", i, clip->x1, clip->y1, clip->x2, clip->y2); } return TRUE; } /* XXX untested. Should create another mask_to_vector to test if the clips are equivalent. */ uint8_t * tv_clip_vector_to_clip_mask (tv_clip_vector * vector, unsigned int width, unsigned int height) { uint8_t *mask; unsigned long bpl; tv_clip *clip; unsigned int count; assert (NULL != vector); bpl = (width + 7) & (unsigned long) -8; if (!(mask = calloc (1, height * bpl))) return NULL; clip = vector->vector; for (count = vector->size; count > 0; --count) { unsigned int x7; unsigned int xw; uint8_t *start; uint8_t lmask; uint8_t rmask; unsigned int length; unsigned int n; if (clip->x2 > width) goto failure; if (clip->y2 > height) goto failure; start = mask + clip->y1 * bpl + (clip->x1 >> 3); x7 = clip->x1 & 7; xw = x7 + clip->x2 - clip->x1; lmask = ~0 << x7; rmask = ~(~0 << (xw & 7)); length = (xw - 1) >> 3; if (0 == length) { lmask &= rmask; for (n = clip->y2 - clip->y1; n > 0; --n) { *start |= lmask; start += bpl; } } else { for (n = clip->y2 - clip->y1; n > 0; --n) { unsigned int i; start[0] |= lmask; for (i = 1; i < length; ++i) start[i] = 0xFF; start[length] |= rmask; start += bpl; } } ++clip; } return mask; failure: free (mask); return NULL; } void tv_clip_vector_destroy (tv_clip_vector * vector) { assert (NULL != vector); free (vector->vector); CLEAR (*vector); } void tv_clip_vector_init (tv_clip_vector * vector) { assert (NULL != vector); CLEAR (*vector); } zapping-0.10cvs6/libtv/clip_vector.h 644 764 144 6377 10326457521 12631 /* * Copyright (C) 2001-2004 Michael H. Schimek * Copyright (C) 2000-2003 Iaki Garca Etxebarria * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* $Id: clip_vector.h,v 1.3 2005/10/22 15:48:33 mschimek Exp $ */ #ifndef __ZTV_CLIP_VECTOR_H__ #define __ZTV_CLIP_VECTOR_H__ #include /* uintX_t */ #include "macros.h" TV_BEGIN_DECLS /* Overlay clipping rectangle. These are regions you don't want overlaid, with clipping coordinates relative to the top, left corner of the overlay window (not the overlay buffer). */ typedef struct { uint16_t x1; uint16_t y1; uint16_t x2; uint16_t y2; } tv_clip; tv_inline tv_bool tv_clip_equal (const tv_clip * clip1, const tv_clip * clip2) { if (8 == sizeof (tv_clip)) return ((* (const uint64_t *) clip1) == (* (const uint64_t *) clip2)); else return (0 == ((clip1->x1 ^ clip2->x1) | (clip1->y1 ^ clip2->y1) | (clip1->x2 ^ clip2->x2) | (clip1->y2 ^ clip2->y2))); } typedef struct { tv_clip * vector; unsigned int size; unsigned int capacity; } tv_clip_vector; extern void _tv_clip_vector_dump (const tv_clip_vector * vector, FILE * fp) __attribute__ ((_tv_nonnull (1, 2))); extern uint8_t * tv_clip_vector_to_clip_mask (tv_clip_vector * vector, unsigned int width, unsigned int height) __attribute__ ((_tv_nonnull (1))); extern tv_bool _tv_clip_vector_add_clip_xy (tv_clip_vector * vector, unsigned int x1, unsigned int y1, unsigned int x2, unsigned int y2) __attribute__ ((_tv_nonnull (1))); #define tv_clip_vector_add_clip_xy(v,x1,y1,x2,y2) \ _tv_clip_vector_add_clip_xy(v,x1,y1,x2,y2) tv_inline tv_bool tv_clip_vector_add_clip_wh (tv_clip_vector * vector, unsigned int x, unsigned int y, unsigned int width, unsigned int height) { return _tv_clip_vector_add_clip_xy (vector, x, y, x + width, y + height); } extern tv_bool tv_clip_vector_equal (const tv_clip_vector * vector1, const tv_clip_vector * vector2) __attribute__ ((_tv_nonnull (1, 2))); tv_inline void tv_clip_vector_clear (tv_clip_vector * vector) { vector->size = 0; } extern tv_bool tv_clip_vector_set (tv_clip_vector * dst, const tv_clip_vector * src) __attribute__ ((_tv_nonnull (1))); extern tv_bool tv_clip_vector_copy (tv_clip_vector * dst, const tv_clip_vector * src) __attribute__ ((_tv_nonnull (1))); extern void tv_clip_vector_destroy (tv_clip_vector * vector) __attribute__ ((_tv_nonnull (1))); extern void tv_clip_vector_init (tv_clip_vector * vector) __attribute__ ((_tv_nonnull (1))); TV_END_DECLS #endif /* __ZTV_CLIP_VECTOR_H__ */ zapping-0.10cvs6/libtv/copy_image.c 644 764 144 21643 10442152072 12430 /* * Copyright (C) 2006 Michael H. Schimek * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* $Id: copy_image.c,v 1.2 2006/06/09 01:51:54 mschimek Exp $ */ #include "copy_image-priv.h" extern void _tv_memcpy_MMX (void * dst, const void * src, size_t n_bytes); extern void _tv_memcpy_SSE (void * dst, const void * src, size_t n_bytes); #if SIMD == CPU_FEATURE_MMX void _tv_memcpy_MMX (void * dst, const void * src, size_t n_bytes) { __m64 *d = (__m64 *) dst; const __m64 *s = (const __m64 *) src; unsigned int count; for (count = n_bytes / 64; count > 0; --count) { __m64 m0, m1, m2, m3, m4, m5, m6, m7; m0 = s[0]; m1 = s[1]; m2 = s[2]; m3 = s[3]; m4 = s[4]; m5 = s[5]; m6 = s[6]; m7 = s[7]; s += 8; d[0] = m0; d[1] = m1; d[2] = m2; d[3] = m3; d[4] = m4; d[5] = m5; d[6] = m6; d[7] = m7; d += 8; } count = n_bytes % 64; __asm__ __volatile__ (" cld\n" " rep movsb\n" : "+D" (d), "+S" (s), "+c" (count) :: "cc", "memory"); } #elif SIMD == CPU_FEATURE_SSE_INT void _tv_memcpy_SSE (void * dst, const void * src, size_t n_bytes) { __m128 *d = (__m128 *) dst; const __m128 *s = (const __m128 *) src; unsigned int count; for (count = n_bytes / 128; count > 0; --count) { __m128 m0, m1, m2, m3, m4, m5, m6, m7; m0 = s[0]; m1 = s[1]; m2 = s[2]; m3 = s[3]; m4 = s[4]; m5 = s[5]; m6 = s[6]; m7 = s[7]; s += 8; _mm_stream_ps ((float *)(d + 0), m0); _mm_stream_ps ((float *)(d + 1), m1); _mm_stream_ps ((float *)(d + 2), m2); _mm_stream_ps ((float *)(d + 3), m3); _mm_stream_ps ((float *)(d + 4), m4); _mm_stream_ps ((float *)(d + 5), m5); _mm_stream_ps ((float *)(d + 6), m6); _mm_stream_ps ((float *)(d + 7), m7); d += 8; } _mm_sfence (); count = n_bytes % 128; __asm__ __volatile__ (" cld\n" " rep movsb\n" : "+D" (d), "+S" (s), "+c" (count) :: "cc", "memory"); } #elif SIMD == 0 /** * Copies @a n_bytes from @a src to @a dst using vector instructions and * cache bypassing loads and stores, if available. The function works faster * if @a src and @a dst are multiples of 8 or 16. * * XXX unchecked */ void tv_memcpy (void * dst, const void * src, size_t n_bytes) { if (unlikely (dst == src)) return; #if 0 #ifdef CAN_COMPILE_SSE if (UNTESTED_SIMD && (cpu_features & CPU_FEATURE_SSE_INT)) if (0 == (((unsigned long) dst | (unsigned long) src) & 15)) return _tv_memcpy_SSE (dst, src, n_bytes); #endif #endif #ifdef CAN_COMPILE_MMX /* Is this really faster? */ if (cpu_features & CPU_FEATURE_MMX) return _tv_memcpy_MMX (dst, src, n_bytes); #endif memcpy (dst, src, n_bytes); } #endif /* !SIMD */ #if SIMD # if SIMD == CPU_FEATURE_SSE_INT /* Use float (128 bit) instructions. */ # define vu8 vf # undef vloadnt # define vloadnt vloadfnt # undef vstorent # define vstorent vstorefnt # endif void SIMD_NAME (_tv_copy_plane) (uint8_t * dst, const uint8_t * src, unsigned int width, unsigned int height, unsigned long dst_padding, unsigned long src_padding) { for (; height > 0; --height) { vu8 m0, m1, m2, m3, m4, m5, m6, m7; const uint8_t *end1; const uint8_t *end2; end1 = src + (width & (-8 * sizeof (vu8))); end2 = src + width; while (src < end1) { m0 = vloadnt (src, 0 * sizeof (vu8)); m1 = vloadnt (src, 1 * sizeof (vu8)); m2 = vloadnt (src, 2 * sizeof (vu8)); m3 = vloadnt (src, 3 * sizeof (vu8)); m4 = vloadnt (src, 4 * sizeof (vu8)); m5 = vloadnt (src, 5 * sizeof (vu8)); m6 = vloadnt (src, 6 * sizeof (vu8)); m7 = vloadnt (src, 7 * sizeof (vu8)); src += 8 * sizeof (vu8); vstorent (dst, 0 * sizeof (vu8), m0); vstorent (dst, 1 * sizeof (vu8), m1); vstorent (dst, 2 * sizeof (vu8), m2); vstorent (dst, 3 * sizeof (vu8), m3); vstorent (dst, 4 * sizeof (vu8), m4); vstorent (dst, 5 * sizeof (vu8), m5); vstorent (dst, 6 * sizeof (vu8), m6); vstorent (dst, 7 * sizeof (vu8), m7); dst += 8 * sizeof (vu8); } while (src < end2) { m0 = vloadnt (src, 0); src += sizeof (vu8); vstorent (dst, 0, m0); dst += sizeof (vu8); } src += src_padding; dst += dst_padding; } sfence (); vempty (); } #else /* !SIMD */ #define IMPL (SCALAR | \ CPU_FEATURE_MMX | \ CPU_FEATURE_SSE_FLT | \ CPU_FEATURE_ALTIVEC) void _tv_copy_plane_SCALAR (uint8_t * dst, const uint8_t * src, unsigned int width, unsigned int height, unsigned long dst_padding, unsigned long src_padding) { for (; height > 0; --height) { memcpy (dst, src, width); dst += width + dst_padding; src += width + src_padding; } } /* * XXX unchecked */ tv_bool tv_copy_image (void * dst_image, const tv_image_format *dst_format, const void * src_image, const tv_image_format *src_format) { const tv_pixel_format *pf; copy_plane_fn *copy_plane; uint8_t *dst; const uint8_t *src; unsigned int width; unsigned int height; unsigned long dst_padding; unsigned long src_padding; unsigned long align; if (unlikely (NULL == src_image)) return tv_clear_image (dst_image, dst_format); assert (NULL != dst_image); if (unlikely (dst_image == src_image)) return TRUE; assert (NULL != dst_format); assert (NULL != src_format); if (unlikely (dst_format->pixel_format != src_format->pixel_format)) return FALSE; if (unlikely (TV_PIXFMT_HM12 == dst_format->pixel_format->pixfmt)) return FALSE; width = MIN (dst_format->width, src_format->width); height = MIN (dst_format->height, src_format->height); if (0 == width || 0 == height) return FALSE; pf = dst_format->pixel_format; if (0 != ((width & pf->hmask) | (height & pf->vmask))) return FALSE; width = (width * pf->bits_per_pixel) >> 3; dst_padding = dst_format->bytes_per_line[0] - width; src_padding = src_format->bytes_per_line[0] - width; if (unlikely ((long)(dst_padding | src_padding) < 0)) return FALSE; if (pf->n_planes > 1) { unsigned int uv_width; unsigned int uv_height; unsigned int block; unsigned long udst_padding; unsigned long usrc_padding; uv_width = width >> pf->uv_hshift; uv_height = height >> pf->uv_vshift; block = uv_width * uv_height; udst_padding = dst_format->bytes_per_line[1] - uv_width; usrc_padding = src_format->bytes_per_line[1] - uv_width; if (pf->n_planes > 2) { unsigned int v_width; unsigned int v_height; unsigned long vdst_padding; unsigned long vsrc_padding; vdst_padding = dst_format->bytes_per_line[2] - uv_width; vsrc_padding = src_format->bytes_per_line[2] - uv_width; align = vdst_padding | vsrc_padding; if (unlikely ((long)(udst_padding | usrc_padding | align) < 0)) return FALSE; if (likely (0 == align)) { v_width = block; v_height = 1; } else { v_width = uv_width; v_height = uv_height; } align |= v_width; dst = (uint8_t *) dst_image + dst_format->offset[2]; src = (const uint8_t *) src_image + src_format->offset[2]; align |= (unsigned long) dst; align |= (unsigned long) src; copy_plane = SIMD_FN_ALIGNED_SELECT (_tv_copy_plane, align, IMPL); copy_plane (dst, src, v_width, v_height, vdst_padding, vsrc_padding); } else { if (unlikely ((long)(udst_padding | usrc_padding) < 0)) return FALSE; } align = udst_padding | usrc_padding; if (likely (0 == align)) { uv_width = block; uv_height = 1; } align |= uv_width; dst = (uint8_t *) dst_image + dst_format->offset[1]; src = (const uint8_t *) src_image + src_format->offset[1]; align |= (unsigned long) dst; align |= (unsigned long) src; copy_plane = SIMD_FN_ALIGNED_SELECT (_tv_copy_plane, align, IMPL); copy_plane (dst, src, uv_width, uv_height, udst_padding, usrc_padding); } align = dst_padding | src_padding; if (likely (0 == align)) { width *= height; height = 1; } align |= width; dst = (uint8_t *) dst_image + dst_format->offset[0]; src = (const uint8_t *) src_image + src_format->offset[0]; align |= (unsigned long) dst; align |= (unsigned long) src; copy_plane = SIMD_FN_ALIGNED_SELECT (_tv_copy_plane, align, IMPL); copy_plane (dst, src, width, height, dst_padding, src_padding); return TRUE; } #endif /* !SIMD */ zapping-0.10cvs6/libtv/copy_image.h 644 764 144 2405 10417056137 12417 /* * Copyright (C) 2001-2004 Michael H. Schimek * Copyright (C) 2000-2003 Iaki Garca Etxebarria * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* $Id: copy_image.h,v 1.1 2006/04/12 01:48:15 mschimek Exp $ */ #ifndef __ZTV_COPY_IMAGE_H__ #define __ZTV_COPY_IMAGE_H__ #include "image_format.h" TV_BEGIN_DECLS extern void tv_memcpy (void * dst, const void * src, size_t n_bytes); extern tv_bool tv_copy_image (void * dst_image, const tv_image_format *dst_format, const void * src_image, const tv_image_format *src_format); TV_END_DECLS #endif /* __ZTV_COPY_IMAGE_H__ */ zapping-0.10cvs6/libtv/overlay_buffer.h 644 764 144 3320 10120231733 13276 /* * Copyright (C) 2001-2004 Michael H. Schimek * Copyright (C) 2000-2003 Iaki Garca Etxebarria * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* $Id: overlay_buffer.h,v 1.1 2004/09/10 04:55:55 mschimek Exp $ */ #ifndef __ZTV_OVERLAY_BUFFER_H__ #define __ZTV_OVERLAY_BUFFER_H__ #include "image_format.h" TV_BEGIN_DECLS /* This is the target of DMA overlay, a continuous chunk of physical memory. Usually it describes the visible portion of the graphics card's video memory. */ typedef struct { /* Memory address as seen by the video capture device, without virtual address translation by the CPU. Actually this assumes graphic card and capture device share an address space, which is not necessarily true if the devices connect to different busses, but I'm not aware of any driver APIs considering this either. */ unsigned long base; /* Base need not align with point 0, 0, e.g. Xinerama. */ unsigned int x; unsigned int y; tv_image_format format; } tv_overlay_buffer; TV_END_DECLS #endif /* __ZTV_OVERLAY_BUFFER_H__ */ zapping-0.10cvs6/libtv/lut_rgb16-gen.c 644 764 144 4612 10404546524 12654 /* * Copyright (C) 2006 Michael H. Schimek * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* $Id: lut_rgb16-gen.c,v 1.2 2006/03/11 13:15:00 mschimek Exp $ */ /* Generates look-up tables for image format conversion. */ #include #include #include /* uint16_t */ #include "misc.h" /* SWAB16() */ static uint16_t lut_rgb16[2][6][256]; int main (void) { unsigned int i; for (i = 0; i < 256; ++i) { unsigned int n; n = (i << 8) & 0xF800; lut_rgb16[0][0][i] = n; /* BGR red / RGB blue */ lut_rgb16[1][0][i] = SWAB16 (n); n = (i << 7) & 0x7C00; lut_rgb16[0][1][i] = n; /* BGRA red / ARGB blue */ lut_rgb16[1][1][i] = SWAB16 (n); n = (i << 3) & 0x07E0; lut_rgb16[0][2][i] = n; /* BGR / RGB green */ lut_rgb16[1][2][i] = SWAB16 (n); n = (i << 2) & 0x03E0; lut_rgb16[0][3][i] = n; /* BGRA / RGBA green */ lut_rgb16[1][3][i] = SWAB16 (n); n = (i >> 3) & 0x001F; lut_rgb16[0][4][i] = n; /* blue / red */ lut_rgb16[1][4][i] = SWAB16 (n); n = (i << 8) & 0x8000; lut_rgb16[0][5][i] = n; /* alpha */ lut_rgb16[1][5][i] = SWAB16 (n); } fputs ("/* Generated file, do not edit! */\n" "\n" "#include \n" "\n" "const uint16_t\n" "_tv_lut_rgb16 [2][6][256] = {\n\t", stdout); for (i = 0; i < 2; ++i) { unsigned int j; fputs ("{\n\t\t", stdout); for (j = 0; j < 6; ++j) { unsigned int k; fputs ("{", stdout); for (k = 0; k < 256; k += 8) { unsigned int l; fputs ("\n\t\t\t", stdout); for (l = 0; l < 8; ++l) { printf ("0x%04x, ", lut_rgb16[i][j][k + l]); } } fputs ("\n\t\t}, ", stdout); } fputs ("\n\t}, ", stdout); } fputs ("\n};\n\n", stdout); exit (EXIT_SUCCESS); return 0; } zapping-0.10cvs6/libtv/yuv2rgb.c 644 764 144 74777 10417056013 11734 /* * Copyright (C) 2006 Michael H. Schimek * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* $Id: yuv2rgb.c,v 1.2 2006/04/12 01:46:51 mschimek Exp $ */ /* YUV to RGB image format conversion functions: TV_PIXFMT_YUV420, TV_PIXFMT_YVU420, TV_PIXFMT_YUYV, TV_PIXFMT_YVYU, TV_PIXFMT_UYVY, TV_PIXFMT_VYUY, to TV_PIXFMT_RGBA32_LE (= TV_PIXFMT_ABGR32_BE), TV_PIXFMT_RGBA32_BE (= TV_PIXFMT_ABGR32_LE), TV_PIXFMT_BGRA32_LE (= TV_PIXFMT_ARGB32_BE), TV_PIXFMT_BGRA32_BE (= TV_PIXFMT_ARGB32_LE), TV_PIXFMT_RGB24_LE (= TV_PIXFMT_BGR24_BE), TV_PIXFMT_RGB24_BE (= TV_PIXFMT_BGR24_LE), TV_PIXFMT_BGR16_LE, TV_PIXFMT_BGR16_BE, TV_PIXFMT_BGRA16_LE, TV_PIXFMT_BGRA16_BE, Assumed color sample position: YUV420 progressive interlaced L L Lt Lt C L L Lb Ct Lb L L Lt Cb Lt C L L Lb Lb YUYV L C L L C L L C L L C L */ #ifdef HAVE_CONFIG_H # include "config.h" #endif #include "lut_yuv2rgb.h" #include "yuv2rgb.h" #include "simd-conv.h" #define Z_LE Z_LITTLE_ENDIAN #define Z_BE Z_BIG_ENDIAN SIMD_FN_ARRAY_PROTOS (copy_plane_fn *, yuyv_to_rgb_loops, [4 * 10]) #if SIMD & CPU_FEATURE_MMX #define YUYV_RGB(dst_fmt, src_fmt) \ static void \ SIMD_NAME (src_fmt ## _to_ ## dst_fmt ## _loop) \ (uint8_t * dst, \ const uint8_t * src, \ unsigned int width, \ unsigned int height, \ unsigned long dst_padding, \ unsigned long src_padding) \ { \ while (height-- > 0) { \ const uint8_t *end; \ \ for (end = src + width; src < end;) { \ v16 ye, yo, u, v; \ v16 re, ro, ge, go, be, bo; \ \ load_yuyv16 (&ye, &yo, &u, &v, \ src, /* offset */ 0, \ TV_PIXFMT_ ## src_fmt); \ \ src += sizeof (vu8) * 2; \ \ fast_yuv2rgb (&re, &ro, &ge, &go, &be, &bo, \ NULL, NULL, NULL, NULL, \ NULL, NULL, \ ye, yo, ye, yo, u, v); \ \ store_rgb16 (dst, /* offset */ 0, \ TV_PIXFMT_ ## dst_fmt, \ /* saturate */ TRUE, \ re, ro, ge, go, be, bo); \ \ dst += sizeof (vu8) \ * TV_PIXFMT_BYTES_PER_PIXEL \ (TV_PIXFMT_ ## dst_fmt); \ } \ \ src += src_padding; \ dst += dst_padding; \ } \ \ sfence (); \ vempty (); \ } #define YUYV_RGB_DST(src_fmt) \ YUYV_RGB (RGBA32_LE, src_fmt) \ YUYV_RGB (RGBA32_BE, src_fmt) \ YUYV_RGB (BGRA32_LE, src_fmt) \ YUYV_RGB (BGRA32_BE, src_fmt) \ YUYV_RGB (RGB24_LE, src_fmt) \ YUYV_RGB (RGB24_BE, src_fmt) \ YUYV_RGB (BGR16_LE, src_fmt) \ YUYV_RGB (BGR16_BE, src_fmt) \ YUYV_RGB (BGRA16_LE, src_fmt) \ YUYV_RGB (BGRA16_BE, src_fmt) #endif /* MMX */ #if !SIMD #define YUYV_RGB32(dst_fmt, src_fmt, r, g, b, a) \ static void \ src_fmt ## _to_ ## dst_fmt ## _loop_SCALAR \ (uint8_t * dst, \ const uint8_t * src, \ unsigned int width, \ unsigned int height, \ unsigned long dst_padding, \ unsigned long src_padding) \ { \ /* YUYV, UYVY, YVYU, VYUY */ \ const unsigned int n = 3 & TV_PIXFMT_ ## src_fmt; \ \ while (height-- > 0) { \ const uint8_t *end; \ \ for (end = src + width; src < end;) { \ const unsigned int dst_bpp = \ TV_PIXFMT_BYTES_PER_PIXEL \ (TV_PIXFMT_ ## dst_fmt); \ unsigned int Y, U, V; \ int rv, gugv, bu; \ \ U = src[n ^ 1]; \ V = src[n ^ 3]; \ gugv = _tv_lut_yuv2rgb_gu[U] \ + _tv_lut_yuv2rgb_gv[V]; \ rv = _tv_lut_yuv2rgb_rv[V]; \ bu = _tv_lut_yuv2rgb_bu[U]; \ \ Y = src[n & 1]; \ dst[r + 0] = _tv_lut_yuv2rgb8[Y + rv]; \ dst[g + 0] = _tv_lut_yuv2rgb8[Y + gugv]; \ dst[b + 0] = _tv_lut_yuv2rgb8[Y + bu]; \ if (a >= 0) dst[a + 0] = 0xFF; \ \ Y = src[n | 2]; \ src += 4; \ dst[r + dst_bpp] = _tv_lut_yuv2rgb8[Y + rv]; \ dst[g + dst_bpp] = _tv_lut_yuv2rgb8[Y + gugv]; \ dst[b + dst_bpp] = _tv_lut_yuv2rgb8[Y + bu]; \ if (a >= 0) dst[a + dst_bpp] = 0xFF; \ dst += dst_bpp * 2; \ } \ \ src += src_padding; \ dst += dst_padding; \ } \ } #define YUYV_RGB16(dst_fmt, src_fmt, lp, c0, c1, c2, alpha1) \ static void \ src_fmt ## _to_ ## dst_fmt ## _loop_SCALAR \ (uint8_t * dst, \ const uint8_t * src, \ unsigned int width, \ unsigned int height, \ unsigned long dst_padding, \ unsigned long src_padding) \ { \ /* YUYV, UYVY, YVYU, VYUY */ \ const unsigned int n = 3 & TV_PIXFMT_ ## src_fmt; \ \ while (height-- > 0) { \ const uint8_t *end; \ \ for (end = src + width; src < end;) { \ uint16_t *dst16 = (uint16_t *) dst; \ unsigned int Y, U, V; \ int rv, gugv, bu; \ \ U = src[n ^ 1]; \ V = src[n ^ 3]; \ gugv = _tv_lut_yuv2rgb_gu[U] \ + _tv_lut_yuv2rgb_gv[V]; \ rv = _tv_lut_yuv2rgb_rv[V]; \ bu = _tv_lut_yuv2rgb_bu[U]; \ \ Y = src[n & 1]; \ dst16[0] = (+ lp[c0][Y + rv] \ + lp[c1][Y + gugv] \ + lp[c2][Y + bu] \ + (alpha1)); \ \ Y = src[n | 2]; \ src += 4; \ dst16[1] = (+ lp[c0][Y + rv] \ + lp[c1][Y + gugv] \ + lp[c2][Y + bu] \ + (alpha1)); \ dst += 2 * 2; \ } \ \ src += src_padding; \ dst += dst_padding; \ } \ } #define YUYV_RGB_DST(src_fmt) \ YUYV_RGB32 (RGBA32_LE, src_fmt, 0, 1, 2, 3) \ YUYV_RGB32 (RGBA32_BE, src_fmt, 3, 2, 1, 0) \ YUYV_RGB32 (BGRA32_LE, src_fmt, 2, 1, 0, 3) \ YUYV_RGB32 (BGRA32_BE, src_fmt, 1, 2, 3, 0) \ YUYV_RGB32 (RGB24_LE, src_fmt, 0, 1, 2, -1) \ YUYV_RGB32 (RGB24_BE, src_fmt, 2, 1, 0, -1) \ YUYV_RGB16 (BGR16_LE, src_fmt, \ _tv_lut_yuv2rgb16[Z_BYTE_ORDER != Z_LITTLE_ENDIAN], \ 0, 2, 4, 0) \ YUYV_RGB16 (BGR16_BE, src_fmt, \ _tv_lut_yuv2rgb16[Z_BYTE_ORDER != Z_BIG_ENDIAN], \ 0, 2, 4, 0) \ YUYV_RGB16 (BGRA16_LE, src_fmt, \ _tv_lut_yuv2rgb16[Z_BYTE_ORDER != Z_LITTLE_ENDIAN], \ 1, 3, 4, \ (Z_BYTE_ORDER != Z_LITTLE_ENDIAN) ? 0x80 : 0x8000) \ YUYV_RGB16 (BGRA16_BE, src_fmt, \ _tv_lut_yuv2rgb16[Z_BYTE_ORDER != Z_BIG_ENDIAN], \ 1, 3, 4, \ (Z_BYTE_ORDER != Z_BIG_ENDIAN) ? 0x80 : 0x8000) #endif /* !SIMD */ YUYV_RGB_DST (YUYV) YUYV_RGB_DST (UYVY) YUYV_RGB_DST (YVYU) YUYV_RGB_DST (VYUY) #define YUYV_RGB_DST_NAME(src_fmt) \ SIMD_NAME (src_fmt ## _to_RGBA32_LE_loop), \ SIMD_NAME (src_fmt ## _to_RGBA32_BE_loop), \ SIMD_NAME (src_fmt ## _to_BGRA32_LE_loop), \ SIMD_NAME (src_fmt ## _to_BGRA32_BE_loop), \ SIMD_NAME (src_fmt ## _to_RGB24_LE_loop), \ SIMD_NAME (src_fmt ## _to_RGB24_BE_loop), \ SIMD_NAME (src_fmt ## _to_BGR16_LE_loop), \ SIMD_NAME (src_fmt ## _to_BGR16_BE_loop), \ SIMD_NAME (src_fmt ## _to_BGRA16_LE_loop), \ SIMD_NAME (src_fmt ## _to_BGRA16_BE_loop) copy_plane_fn * SIMD_NAME (yuyv_to_rgb_loops) [4 * 10] = { YUYV_RGB_DST_NAME (YUYV), YUYV_RGB_DST_NAME (UYVY), YUYV_RGB_DST_NAME (YVYU), YUYV_RGB_DST_NAME (VYUY), }; #if !SIMD static const char matrix [64] = { [TV_PIXFMT_RGBA32_LE] = 0, [TV_PIXFMT_RGBA32_BE] = 1, [TV_PIXFMT_BGRA32_LE] = 2, [TV_PIXFMT_BGRA32_BE] = 3, [TV_PIXFMT_RGB24_LE] = 4, [TV_PIXFMT_RGB24_BE] = 5, [TV_PIXFMT_BGR16_LE] = 6, [TV_PIXFMT_BGR16_BE] = 7, [TV_PIXFMT_BGRA16_LE] = 8, [TV_PIXFMT_BGRA16_BE] = 9 }; tv_bool _tv_yuyv_to_rgb (void * dst_image, const tv_image_format *dst_format, const void * src_image, const tv_image_format *src_format) { copy_plane_fn *loop; const tv_pixel_format *dst_pf; uint8_t *dst; const uint8_t *src; unsigned int width; unsigned int height; unsigned long dst_padding; unsigned long src_padding; unsigned long align; unsigned int from; unsigned int to; width = MIN (dst_format->width, src_format->width); height = MIN (dst_format->height, src_format->height); if (unlikely (0 == width || 0 == height || (width & 1))) return FALSE; dst = (uint8_t *) dst_image + dst_format->offset[0]; src = (const uint8_t *) src_image + src_format->offset[0]; /* SIMD: 8 / 16 byte aligned. */ align = (unsigned long) dst; align |= (unsigned long) src; dst_pf = dst_format->pixel_format; dst_padding = dst_format->bytes_per_line[0] - ((width * dst_pf->bits_per_pixel) >> 3); src_padding = src_format->bytes_per_line[0] - width * 2; if (likely (0 == (dst_padding | src_padding))) { width *= height; height = 1; } else if (unlikely ((long)(dst_padding | src_padding) < 0)) { return FALSE; } else { align |= (dst_format->bytes_per_line[0] | src_format->bytes_per_line[0]); } /* SIMD: 8 / 16 pixels at once. */ align |= width; to = matrix[dst_pf->pixfmt]; from = src_format->pixel_format->pixfmt - TV_PIXFMT_YUYV; loop = SIMD_FN_ALIGNED_SELECT (yuyv_to_rgb_loops, align, (CPU_FEATURE_MMX | SCALAR))[from * 10 + to]; loop (dst, src, width * 2 /* src bytes */, height, dst_padding, src_padding); return TRUE; } #endif /* !SIMD */ typedef void yuv420_to_rgb_loop_fn (uint8_t * dst, const uint8_t * src, const uint8_t * usrc, const uint8_t * vsrc, unsigned int width, unsigned int uv_height, unsigned long dst_bpl, unsigned long src_bpl, unsigned long dst_padding, unsigned long src_padding, unsigned long usrc_padding, unsigned long vsrc_padding); SIMD_FN_ARRAY_PROTOS (yuv420_to_rgb_loop_fn *, yuv420_to_rgb_loops, [10]) #if SIMD & CPU_FEATURE_MMX #define YUV420_RGB(dst_fmt) \ static void \ SIMD_NAME (YUV420_to_## dst_fmt ## _loop) \ (uint8_t * dst, \ const uint8_t * src, \ const uint8_t * usrc, \ const uint8_t * vsrc, \ unsigned int width, \ unsigned int uv_height, \ unsigned long dst_bpl, \ unsigned long src_bpl, \ unsigned long dst_padding, \ unsigned long src_padding, \ unsigned long usrc_padding, \ unsigned long vsrc_padding) \ { \ while (uv_height-- > 0) { \ const uint8_t *end; \ \ for (end = src + width; src < end;) { \ v16 ye0, yo0, ye1, yo1, u, v; \ v16 re0, ro0, ge0, go0, be0, bo0; \ v16 re1, ro1, ge1, go1, be1, bo1; \ \ u = vunpacklo8 (load_lo (usrc), vzerou8 ()); \ usrc += sizeof (vu8) / 2; \ v = vunpacklo8 (load_lo (vsrc), vzerou8 ()); \ vsrc += sizeof (vu8) / 2; \ \ load_16 (&ye0, &yo0, src, /* offset */ 0); \ load_16 (&ye1, &yo1, src, src_bpl); \ src += sizeof (vu8); \ \ fast_yuv2rgb (&re0, &ro0, &ge0, &go0, \ &be0, &bo0, \ &re1, &ro1, &ge1, &go1, \ &be1, &bo1, \ ye0, yo0, ye1, yo1, u, v); \ \ store_rgb16 (dst, /* offset */ 0, \ TV_PIXFMT_ ## dst_fmt, \ /* saturate */ TRUE, \ re0, ro0, ge0, go0, be0, bo0); \ \ store_rgb16 (dst, dst_bpl, \ TV_PIXFMT_ ## dst_fmt, \ /* saturate */ TRUE, \ re1, ro1, ge1, go1, be1, bo1); \ \ dst += sizeof (vu8) \ * TV_PIXFMT_BYTES_PER_PIXEL \ (TV_PIXFMT_ ## dst_fmt); \ } \ \ usrc += usrc_padding; \ vsrc += vsrc_padding; \ src += src_padding; \ dst += dst_padding; \ } \ \ sfence (); \ vempty (); \ } YUV420_RGB (RGBA32_LE) YUV420_RGB (RGBA32_BE) YUV420_RGB (BGRA32_LE) YUV420_RGB (BGRA32_BE) YUV420_RGB (RGB24_LE) YUV420_RGB (RGB24_BE) YUV420_RGB (BGR16_LE) YUV420_RGB (BGR16_BE) YUV420_RGB (BGRA16_LE) YUV420_RGB (BGRA16_BE) #endif /* MMX */ #if !SIMD #define YUV420_RGB32(dst_fmt, r, g, b, a) \ static void \ YUV420_to_ ## dst_fmt ## _loop_SCALAR \ (uint8_t * dst, \ const uint8_t * src, \ const uint8_t * usrc, \ const uint8_t * vsrc, \ unsigned int width, \ unsigned int uv_height, \ unsigned long dst_bpl, \ unsigned long src_bpl, \ unsigned long dst_padding, \ unsigned long src_padding, \ unsigned long usrc_padding, \ unsigned long vsrc_padding) \ { \ while (uv_height-- > 0) { \ const uint8_t *end; \ \ for (end = src + width; src < end;) { \ const unsigned int dst_bpp = \ TV_PIXFMT_BYTES_PER_PIXEL \ (TV_PIXFMT_ ## dst_fmt); \ unsigned int Y, U, V; \ int rv, gugv, bu; \ \ U = *usrc++; \ V = *vsrc++; \ gugv = _tv_lut_yuv2rgb_gu[U] \ + _tv_lut_yuv2rgb_gv[V]; \ rv = _tv_lut_yuv2rgb_rv[V]; \ bu = _tv_lut_yuv2rgb_bu[U]; \ \ Y = src[0]; \ dst[r + 0] = _tv_lut_yuv2rgb8[Y + rv]; \ dst[g + 0] = _tv_lut_yuv2rgb8[Y + gugv]; \ dst[b + 0] = _tv_lut_yuv2rgb8[Y + bu]; \ if (a >= 0) dst[a + 0] = 0xFF; \ \ Y = src[1]; \ dst[r + dst_bpp] = _tv_lut_yuv2rgb8[Y + rv]; \ dst[g + dst_bpp] = _tv_lut_yuv2rgb8[Y + gugv]; \ dst[b + dst_bpp] = _tv_lut_yuv2rgb8[Y + bu]; \ if (a >= 0) dst[a + dst_bpp] = 0xFF; \ \ Y = src[src_bpl]; \ dst[r + dst_bpl] = _tv_lut_yuv2rgb8[Y + rv]; \ dst[g + dst_bpl] = _tv_lut_yuv2rgb8[Y + gugv]; \ dst[b + dst_bpl] = _tv_lut_yuv2rgb8[Y + bu]; \ if (a >= 0) dst[a + dst_bpl] = 0xFF; \ \ Y = src[1 + src_bpl]; \ src += 2; \ dst[r + dst_bpp + dst_bpl] = \ _tv_lut_yuv2rgb8[Y + rv]; \ dst[g + dst_bpp + dst_bpl] = \ _tv_lut_yuv2rgb8[Y + gugv]; \ dst[b + dst_bpp + dst_bpl] = \ _tv_lut_yuv2rgb8[Y + bu]; \ if (a >= 0) dst[a + dst_bpp + dst_bpl] = 0xFF; \ dst += dst_bpp * 2; \ } \ \ usrc += usrc_padding; \ vsrc += vsrc_padding; \ src += src_padding; \ dst += dst_padding; \ } \ } #define YUV420_RGB16(dst_fmt, lp, c0, c1, c2, alpha1) \ static void \ YUV420_to_ ## dst_fmt ## _loop_SCALAR \ (uint8_t * dst, \ const uint8_t * src, \ const uint8_t * usrc, \ const uint8_t * vsrc, \ unsigned int width, \ unsigned int uv_height, \ unsigned long dst_bpl, \ unsigned long src_bpl, \ unsigned long dst_padding, \ unsigned long src_padding, \ unsigned long usrc_padding, \ unsigned long vsrc_padding) \ { \ while (uv_height-- > 0) { \ const uint8_t *end; \ \ for (end = src + width; src < end;) { \ uint16_t *dst16; \ unsigned int Y, U, V; \ int rv, gugv, bu; \ \ U = *usrc++; \ V = *vsrc++; \ gugv = _tv_lut_yuv2rgb_gu[U] \ + _tv_lut_yuv2rgb_gv[V]; \ rv = _tv_lut_yuv2rgb_rv[V]; \ bu = _tv_lut_yuv2rgb_bu[U]; \ \ Y = src[0]; \ dst16 = (uint16_t *) dst; \ dst16[0] = (+ lp[c0][Y + rv] \ + lp[c1][Y + gugv] \ + lp[c2][Y + bu] \ + (alpha1)); \ \ Y = src[1]; \ dst16[1] = (+ lp[c0][Y + rv] \ + lp[c1][Y + gugv] \ + lp[c2][Y + bu] \ + (alpha1)); \ \ Y = src[src_bpl]; \ dst16 = (uint16_t *) &dst[dst_bpl]; \ dst16[0] = (+ lp[c0][Y + rv] \ + lp[c1][Y + gugv] \ + lp[c2][Y + bu] \ + (alpha1)); \ \ Y = src[src_bpl + 1]; \ src += 2; \ dst16[1] = (+ lp[c0][Y + rv] \ + lp[c1][Y + gugv] \ + lp[c2][Y + bu] \ + (alpha1)); \ dst += 2 * 2; \ } \ \ usrc += usrc_padding; \ vsrc += vsrc_padding; \ src += src_padding; \ dst += dst_padding; \ } \ } YUV420_RGB32 (RGBA32_LE, 0, 1, 2, 3) YUV420_RGB32 (RGBA32_BE, 3, 2, 1, 0) YUV420_RGB32 (BGRA32_LE, 2, 1, 0, 3) YUV420_RGB32 (BGRA32_BE, 1, 2, 3, 0) YUV420_RGB32 (RGB24_LE, 0, 1, 2, -1) YUV420_RGB32 (RGB24_BE, 2, 1, 0, -1) YUV420_RGB16 (BGR16_LE, _tv_lut_yuv2rgb16[Z_BYTE_ORDER != Z_LITTLE_ENDIAN], 0, 2, 4, 0) YUV420_RGB16 (BGR16_BE, _tv_lut_yuv2rgb16[Z_BYTE_ORDER != Z_BIG_ENDIAN], 0, 2, 4, 0) YUV420_RGB16 (BGRA16_LE, _tv_lut_yuv2rgb16[Z_BYTE_ORDER != Z_LITTLE_ENDIAN], 1, 3, 4, (Z_BYTE_ORDER != Z_LITTLE_ENDIAN) ? 0x80 : 0x8000) YUV420_RGB16 (BGRA16_BE, _tv_lut_yuv2rgb16[Z_BYTE_ORDER != Z_BIG_ENDIAN], 1, 3, 4, (Z_BYTE_ORDER != Z_BIG_ENDIAN) ? 0x80 : 0x8000) #endif /* !SIMD */ yuv420_to_rgb_loop_fn * SIMD_NAME (yuv420_to_rgb_loops) [10] = { SIMD_NAME (YUV420_to_RGBA32_LE_loop), SIMD_NAME (YUV420_to_RGBA32_BE_loop), SIMD_NAME (YUV420_to_BGRA32_LE_loop), SIMD_NAME (YUV420_to_BGRA32_BE_loop), SIMD_NAME (YUV420_to_RGB24_LE_loop), SIMD_NAME (YUV420_to_RGB24_BE_loop), SIMD_NAME (YUV420_to_BGR16_LE_loop), SIMD_NAME (YUV420_to_BGR16_BE_loop), SIMD_NAME (YUV420_to_BGRA16_LE_loop), SIMD_NAME (YUV420_to_BGRA16_BE_loop) }; #if !SIMD tv_bool _tv_yuv420_to_rgb (void * dst_image, const tv_image_format *dst_format, const void * src_image, const tv_image_format *src_format) { yuv420_to_rgb_loop_fn *loop; const tv_pixel_format *dst_pf; uint8_t *dst; const uint8_t *src; const uint8_t *usrc; const uint8_t *vsrc; unsigned int width; unsigned int height; unsigned int uv_width; unsigned long dst_bpl; unsigned long src_bpl; unsigned long dst_padding; unsigned long src_padding; unsigned long usrc_padding; unsigned long vsrc_padding; unsigned long align; unsigned int to; if (TV_FIELD_INTERLACED == src_format->field) { tv_image_format d_format; tv_image_format s_format; /* Convert fields separately to make sure we average U, V of the same parity field. */ if (unlikely (0 != ((dst_format->height | src_format->height) & 3))) return FALSE; d_format = *dst_format; d_format.height /= 2; d_format.bytes_per_line[0] *= 2; s_format = *src_format; s_format.height /= 2; s_format.bytes_per_line[0] *= 2; s_format.bytes_per_line[1] *= 2; s_format.bytes_per_line[2] *= 2; s_format.field = TV_FIELD_PROGRESSIVE; /* Convert top field. */ if (!_tv_yuv420_to_rgb (dst_image, &d_format, src_image, &s_format)) return FALSE; /* Convert bottom field. */ d_format.offset[0] += dst_format->bytes_per_line[0]; s_format.offset[0] += src_format->bytes_per_line[0]; s_format.offset[1] += src_format->bytes_per_line[1]; s_format.offset[2] += src_format->bytes_per_line[2]; dst_format = &d_format; src_format = &s_format; } width = MIN (dst_format->width, src_format->width); height = MIN (dst_format->height, src_format->height); if (unlikely (0 == width || 0 == height || ((width | height) & 1))) return FALSE; /* SIMD: 8 / 16 pixels at once. */ align = width; /* SIMD: 8 / 16 byte aligned. */ align |= dst_bpl = dst_format->bytes_per_line[0]; align |= src_bpl = src_format->bytes_per_line[0]; dst_pf = dst_format->pixel_format; dst_padding = dst_bpl - ((width * dst_pf->bits_per_pixel) >> 3); src_padding = src_bpl - width; usrc = (const uint8_t *) src_image + src_format->offset[1]; vsrc = (const uint8_t *) src_image + src_format->offset[2]; align |= (unsigned long) usrc; align |= (unsigned long) vsrc; uv_width = width >> 1; switch (src_format->pixel_format->pixfmt) { case TV_PIXFMT_YUV420: usrc_padding = src_format->bytes_per_line[1] - uv_width; vsrc_padding = src_format->bytes_per_line[2] - uv_width; break; case TV_PIXFMT_YVU420: SWAP (usrc, vsrc); vsrc_padding = src_format->bytes_per_line[1] - uv_width; usrc_padding = src_format->bytes_per_line[2] - uv_width; break; default: return FALSE; } align |= src_format->bytes_per_line[1]; align |= src_format->bytes_per_line[2]; if (unlikely ((long)(dst_padding | src_padding | usrc_padding | vsrc_padding) < 0)) return FALSE; dst = (uint8_t *) dst_image + dst_format->offset[0]; src = (const uint8_t *) src_image + src_format->offset[0]; align |= (unsigned long) dst; align |= (unsigned long) src; to = matrix[dst_pf->pixfmt]; loop = SIMD_FN_ALIGNED_SELECT (yuv420_to_rgb_loops, align, (CPU_FEATURE_MMX | SCALAR))[to]; dst_padding += dst_bpl; /* two rows at once */ src_padding += src_bpl; loop (dst, src, usrc, vsrc, width, height >> 1, dst_bpl, src_bpl, dst_padding, src_padding, usrc_padding, vsrc_padding); return TRUE; } #endif /* !SIMD */ typedef void nv_to_rgb_loop_fn (uint8_t * dst, const uint8_t * src, const uint8_t * uvsrc, unsigned int width, unsigned int uv_height, unsigned long dst_bpl, unsigned long src_bpl, unsigned long dst_padding, unsigned long src_padding, unsigned long uvsrc_padding); SIMD_FN_ARRAY_PROTOS (nv_to_rgb_loop_fn *, nv_to_rgb_loops, [10]) #if SIMD & CPU_FEATURE_MMX #define NV_RGB(dst_fmt) \ static void \ SIMD_NAME (NV_to_## dst_fmt ## _loop) \ (uint8_t * dst, \ const uint8_t * src, \ const uint8_t * uvsrc, \ unsigned int width, \ unsigned int uv_height, \ unsigned long dst_bpl, \ unsigned long src_bpl, \ unsigned long dst_padding, \ unsigned long src_padding, \ unsigned long uvsrc_padding) \ { \ while (uv_height-- > 0) { \ const uint8_t *end; \ \ for (end = src + width; src < end;) { \ v16 ye0, yo0, ye1, yo1, u, v; \ v16 re0, ro0, ge0, go0, be0, bo0; \ v16 re1, ro1, ge1, go1, be1, bo1; \ \ load_16 (&u, &v, uvsrc, /* offset */ 0); \ uvsrc += sizeof (vu8); \ \ load_16 (&ye0, &yo0, src, /* offset */ 0); \ load_16 (&ye1, &yo1, src, src_bpl); \ src += sizeof (vu8); \ \ fast_yuv2rgb (&re0, &ro0, &ge0, &go0, \ &be0, &bo0, \ &re1, &ro1, &ge1, &go1, \ &be1, &bo1, \ ye0, yo0, ye1, yo1, u, v); \ \ store_rgb16 (dst, /* offset */ 0, \ TV_PIXFMT_ ## dst_fmt, \ /* saturate */ TRUE, \ re0, ro0, ge0, go0, be0, bo0); \ \ store_rgb16 (dst, dst_bpl, \ TV_PIXFMT_ ## dst_fmt, \ /* saturate */ TRUE, \ re1, ro1, ge1, go1, be1, bo1); \ \ dst += sizeof (vu8) \ * TV_PIXFMT_BYTES_PER_PIXEL \ (TV_PIXFMT_ ## dst_fmt); \ } \ \ uvsrc += uvsrc_padding; \ src += src_padding; \ dst += dst_padding; \ } \ \ sfence (); \ vempty (); \ } NV_RGB (RGBA32_LE) NV_RGB (RGBA32_BE) NV_RGB (BGRA32_LE) NV_RGB (BGRA32_BE) NV_RGB (RGB24_LE) NV_RGB (RGB24_BE) NV_RGB (BGR16_LE) NV_RGB (BGR16_BE) NV_RGB (BGRA16_LE) NV_RGB (BGRA16_BE) #endif /* MMX */ #if !SIMD #define NV_RGB32(dst_fmt, r, g, b, a) \ static void \ NV_to_ ## dst_fmt ## _loop_SCALAR \ (uint8_t * dst, \ const uint8_t * src, \ const uint8_t * uvsrc, \ unsigned int width, \ unsigned int uv_height, \ unsigned long dst_bpl, \ unsigned long src_bpl, \ unsigned long dst_padding, \ unsigned long src_padding, \ unsigned long uvsrc_padding) \ { \ while (uv_height-- > 0) { \ const uint8_t *end; \ \ for (end = src + width; src < end;) { \ const unsigned int dst_bpp = \ TV_PIXFMT_BYTES_PER_PIXEL \ (TV_PIXFMT_ ## dst_fmt); \ unsigned int Y, U, V; \ int rv, gugv, bu; \ \ U = uvsrc[0]; \ V = uvsrc[1]; \ uvsrc += 2; \ gugv = _tv_lut_yuv2rgb_gu[U] \ + _tv_lut_yuv2rgb_gv[V]; \ rv = _tv_lut_yuv2rgb_rv[V]; \ bu = _tv_lut_yuv2rgb_bu[U]; \ \ Y = src[0]; \ dst[r + 0] = _tv_lut_yuv2rgb8[Y + rv]; \ dst[g + 0] = _tv_lut_yuv2rgb8[Y + gugv]; \ dst[b + 0] = _tv_lut_yuv2rgb8[Y + bu]; \ if (a >= 0) dst[a + 0] = 0xFF; \ \ Y = src[1]; \ dst[r + dst_bpp] = _tv_lut_yuv2rgb8[Y + rv]; \ dst[g + dst_bpp] = _tv_lut_yuv2rgb8[Y + gugv]; \ dst[b + dst_bpp] = _tv_lut_yuv2rgb8[Y + bu]; \ if (a >= 0) dst[a + dst_bpp] = 0xFF; \ \ Y = src[src_bpl]; \ dst[r + dst_bpl] = _tv_lut_yuv2rgb8[Y + rv]; \ dst[g + dst_bpl] = _tv_lut_yuv2rgb8[Y + gugv]; \ dst[b + dst_bpl] = _tv_lut_yuv2rgb8[Y + bu]; \ if (a >= 0) dst[a + dst_bpl] = 0xFF; \ \ Y = src[1 + src_bpl]; \ src += 2; \ dst[r + dst_bpp + dst_bpl] = \ _tv_lut_yuv2rgb8[Y + rv]; \ dst[g + dst_bpp + dst_bpl] = \ _tv_lut_yuv2rgb8[Y + gugv]; \ dst[b + dst_bpp + dst_bpl] = \ _tv_lut_yuv2rgb8[Y + bu]; \ if (a >= 0) dst[a + dst_bpp + dst_bpl] = 0xFF; \ dst += dst_bpp * 2; \ } \ \ uvsrc += uvsrc_padding; \ src += src_padding; \ dst += dst_padding; \ } \ } #define NV_RGB16(dst_fmt, lp, c0, c1, c2, alpha1) \ static void \ NV_to_ ## dst_fmt ## _loop_SCALAR \ (uint8_t * dst, \ const uint8_t * src, \ const uint8_t * uvsrc, \ unsigned int width, \ unsigned int uv_height, \ unsigned long dst_bpl, \ unsigned long src_bpl, \ unsigned long dst_padding, \ unsigned long src_padding, \ unsigned long uvsrc_padding) \ { \ while (uv_height-- > 0) { \ const uint8_t *end; \ \ for (end = src + width; src < end;) { \ uint16_t *dst16; \ unsigned int Y, U, V; \ int rv, gugv, bu; \ \ U = uvsrc[0]; \ V = uvsrc[1]; \ uvsrc += 2; \ gugv = _tv_lut_yuv2rgb_gu[U] \ + _tv_lut_yuv2rgb_gv[V]; \ rv = _tv_lut_yuv2rgb_rv[V]; \ bu = _tv_lut_yuv2rgb_bu[U]; \ \ Y = src[0]; \ dst16 = (uint16_t *) dst; \ dst16[0] = (+ lp[c0][Y + rv] \ + lp[c1][Y + gugv] \ + lp[c2][Y + bu] \ + (alpha1)); \ \ Y = src[1]; \ dst16[1] = (+ lp[c0][Y + rv] \ + lp[c1][Y + gugv] \ + lp[c2][Y + bu] \ + (alpha1)); \ \ Y = src[src_bpl]; \ dst16 = (uint16_t *) &dst[dst_bpl]; \ dst16[0] = (+ lp[c0][Y + rv] \ + lp[c1][Y + gugv] \ + lp[c2][Y + bu] \ + (alpha1)); \ \ Y = src[src_bpl + 1]; \ src += 2; \ dst16[1] = (+ lp[c0][Y + rv] \ + lp[c1][Y + gugv] \ + lp[c2][Y + bu] \ + (alpha1)); \ dst += 2 * 2; \ } \ \ uvsrc += uvsrc_padding; \ src += src_padding; \ dst += dst_padding; \ } \ } NV_RGB32 (RGBA32_LE, 0, 1, 2, 3) NV_RGB32 (RGBA32_BE, 3, 2, 1, 0) NV_RGB32 (BGRA32_LE, 2, 1, 0, 3) NV_RGB32 (BGRA32_BE, 1, 2, 3, 0) NV_RGB32 (RGB24_LE, 0, 1, 2, -1) NV_RGB32 (RGB24_BE, 2, 1, 0, -1) NV_RGB16 (BGR16_LE, _tv_lut_yuv2rgb16[Z_BYTE_ORDER != Z_LITTLE_ENDIAN], 0, 2, 4, 0) NV_RGB16 (BGR16_BE, _tv_lut_yuv2rgb16[Z_BYTE_ORDER != Z_BIG_ENDIAN], 0, 2, 4, 0) NV_RGB16 (BGRA16_LE, _tv_lut_yuv2rgb16[Z_BYTE_ORDER != Z_LITTLE_ENDIAN], 1, 3, 4, (Z_BYTE_ORDER != Z_LITTLE_ENDIAN) ? 0x80 : 0x8000) NV_RGB16 (BGRA16_BE, _tv_lut_yuv2rgb16[Z_BYTE_ORDER != Z_BIG_ENDIAN], 1, 3, 4, (Z_BYTE_ORDER != Z_BIG_ENDIAN) ? 0x80 : 0x8000) #endif /* !SIMD */ nv_to_rgb_loop_fn * SIMD_NAME (nv_to_rgb_loops) [10] = { SIMD_NAME (NV_to_RGBA32_LE_loop), SIMD_NAME (NV_to_RGBA32_BE_loop), SIMD_NAME (NV_to_BGRA32_LE_loop), SIMD_NAME (NV_to_BGRA32_BE_loop), SIMD_NAME (NV_to_RGB24_LE_loop), SIMD_NAME (NV_to_RGB24_BE_loop), SIMD_NAME (NV_to_BGR16_LE_loop), SIMD_NAME (NV_to_BGR16_BE_loop), SIMD_NAME (NV_to_BGRA16_LE_loop), SIMD_NAME (NV_to_BGRA16_BE_loop) }; #if !SIMD tv_bool _tv_nv_to_rgb (void * dst_image, const tv_image_format *dst_format, const void * src_image, const tv_image_format *src_format) { nv_to_rgb_loop_fn *loop; const tv_pixel_format *dst_pf; uint8_t *dst; const uint8_t *src; const uint8_t *uvsrc; unsigned int width; unsigned int height; unsigned long dst_bpl; unsigned long src_bpl; unsigned long uvsrc_bpl; unsigned long dst_padding; unsigned long src_padding; unsigned long uvsrc_padding; unsigned long align; unsigned int to; if (TV_FIELD_INTERLACED == src_format->field) { tv_image_format d_format; tv_image_format s_format; /* Convert fields separately to make sure we average U, V of the same parity field. */ if (unlikely (0 != ((dst_format->height | src_format->height) & 3))) return FALSE; d_format = *dst_format; d_format.height /= 2; d_format.bytes_per_line[0] *= 2; s_format = *src_format; s_format.height /= 2; s_format.bytes_per_line[0] *= 2; s_format.bytes_per_line[1] *= 2; s_format.bytes_per_line[2] *= 2; s_format.field = TV_FIELD_PROGRESSIVE; /* Convert top field. */ if (!_tv_nv_to_rgb (dst_image, &d_format, src_image, &s_format)) return FALSE; /* Convert bottom field. */ d_format.offset[0] += dst_format->bytes_per_line[0]; s_format.offset[0] += src_format->bytes_per_line[0]; s_format.offset[1] += src_format->bytes_per_line[1]; s_format.offset[2] += src_format->bytes_per_line[2]; dst_format = &d_format; src_format = &s_format; } width = MIN (dst_format->width, src_format->width); height = MIN (dst_format->height, src_format->height); if (unlikely (0 == width || 0 == height || ((width | height) & 1))) return FALSE; /* SIMD: 8 / 16 pixels at once. */ align = width; /* SIMD: 8 / 16 byte aligned. */ align |= dst_bpl = dst_format->bytes_per_line[0]; align |= src_bpl = src_format->bytes_per_line[0]; align |= uvsrc_bpl = src_format->bytes_per_line[1]; dst_pf = dst_format->pixel_format; dst_padding = dst_bpl - ((width * dst_pf->bits_per_pixel) >> 3); src_padding = src_bpl - width; uvsrc_padding = uvsrc_bpl - width; if (unlikely ((long)(dst_padding | src_padding | uvsrc_padding) < 0)) return FALSE; dst = (uint8_t *) dst_image + dst_format->offset[0]; src = (const uint8_t *) src_image + src_format->offset[0]; uvsrc = (const uint8_t *) src_image + src_format->offset[1]; align |= (unsigned long) dst; align |= (unsigned long) src; align |= (unsigned long) uvsrc; to = matrix[dst_pf->pixfmt]; loop = SIMD_FN_ALIGNED_SELECT (nv_to_rgb_loops, align, (CPU_FEATURE_MMX | SCALAR))[to]; dst_padding += dst_bpl; /* two rows at once */ src_padding += src_bpl; loop (dst, src, uvsrc, width, height >> 1, dst_bpl, src_bpl, dst_padding, src_padding, uvsrc_padding); return TRUE; } #endif /* !SIMD */ zapping-0.10cvs6/libtv/yuv2rgb.h 644 764 144 2727 10404546445 11714 /* * Copyright (C) 2006 Michael H. Schimek * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* $Id: yuv2rgb.h,v 1.1 2006/03/11 13:14:13 mschimek Exp $ */ /* YUV to RGB image format conversion functions. */ #ifndef YUV2RGB_H #define YUV2RGB_H #include "image_format.h" #include "misc.h" #include "simd.h" extern tv_bool _tv_yuyv_to_rgb (void * dst_image, const tv_image_format *dst_format, const void * src_image, const tv_image_format *src_format); extern tv_bool _tv_yuv420_to_rgb (void * dst_image, const tv_image_format *dst_format, const void * src_image, const tv_image_format *src_format); extern tv_bool _tv_nv_to_rgb (void * dst_image, const tv_image_format *dst_format, const void * src_image, const tv_image_format *src_format); #endif /* YUV2RGB_H */ zapping-0.10cvs6/README 644 764 144 5325 10432663167 7702 Zapping - A Gnome TV viewer Copyright (C) 2000-2003 Iaki Garca Etxebarria Copyright (C) 2000-2006 Michael H. Schimek 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 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -------------------------------------------------------------------------- Introduction ============ Some time ago Iaki G. Etxebarria, the original author of this program, bought a TV card for his computer. In his Linux box there were only a few TV viewing programs, and none of them for Gnome. So he built a TV viewer following V4L2 spec (at that time not part of stable kernels), trying to make it as complete as possible. This is the latest version of that software. Requirements ============ Zapping requires an analog TV card, with a driver supporting the - V4L or V4L2 API on Linux, or the - BKTR API on FreeBSD, or the - XVideo API. Software: - Gnome 2.0, Gtk+ 2.4 libraries. - optional libzvbi for Teletext, subtitles and closed caption support, Linux and FreeBSD only. - optional librte for recording, Linux only. - optional liblirc for remote controls, Linux only. Download ======== Zapping, libzvbi and librte are available from http://zapping.sourceforge.net Installation ============ From CVS: ./autogen.sh (configure options) && make From tarball: ./configure (options) && make Type ./configure --help for a list of options. As root type: make install or make uninstall Usage ===== Please see the Zapping built-in documentation (help menu). Feedback ======== Let us know about your ideas, questions and bugs using the tracking system: https://sourceforge.net/tracker/?group_id=2599 Please leave an e-mail address for questions and progress information. Or send a message to the Zapping mailing list: zapping-misc@lists.sourceforge.net Subscribe at: http://lists.sourceforge.net/lists/listinfo/zapping-misc Subscription is not necessary, but the spam checker might delay your messages. Thanks and enjoy the TV (as difficult as that might seem), Iaki & Michael zapping-0.10cvs6/ltmain.sh 644 764 144 554610 10375433432 10704 # ltmain.sh - Provide generalized library-building support services. # NOTE: Changing this file will not affect anything until you rerun configure. # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005 # Free Software Foundation, Inc. # Originally by Gordon Matzigkeit , 1996 # # 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 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. basename="s,^.*/,,g" # Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh # is ksh but when the shell is invoked as "sh" and the current value of # the _XPG environment variable is not equal to 1 (one), the special # positional parameter $0, within a function call, is the name of the # function. progpath="$0" # The name of this program: progname=`echo "$progpath" | $SED $basename` modename="$progname" # Global variables: EXIT_SUCCESS=0 EXIT_FAILURE=1 PROGRAM=ltmain.sh PACKAGE=libtool VERSION=1.5.20 TIMESTAMP=" (1.1220.2.287 2005/08/31 18:54:15)" # See if we are running on zsh, and set the options which allow our # commands through without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi # Check that we have a working $echo. if test "X$1" = X--no-reexec; then # Discard the --no-reexec flag, and continue. shift elif test "X$1" = X--fallback-echo; then # Avoid inline document here, it may be left over : elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then # Yippee, $echo works! : else # Restart under the correct shell, and then maybe $echo will work. exec $SHELL "$progpath" --no-reexec ${1+"$@"} fi if test "X$1" = X--fallback-echo; then # used as fallback echo shift cat <&2 $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 exit $EXIT_FAILURE fi # Global variables. mode=$default_mode nonopt= prev= prevopt= run= show="$echo" show_help= execute_dlfiles= lo2o="s/\\.lo\$/.${objext}/" o2lo="s/\\.${objext}\$/.lo/" ##################################### # Shell function definitions: # This seems to be the best place for them # func_win32_libid arg # return the library type of file 'arg' # # Need a lot of goo to handle *both* DLLs and import libs # Has to be a shell function in order to 'eat' the argument # that is supplied when $file_magic_command is called. func_win32_libid () { win32_libid_type="unknown" win32_fileres=`file -L $1 2>/dev/null` case $win32_fileres in *ar\ archive\ import\ library*) # definitely import win32_libid_type="x86 archive import" ;; *ar\ archive*) # could be an import, or static if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | \ $EGREP -e 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then win32_nmres=`eval $NM -f posix -A $1 | \ sed -n -e '1,100{/ I /{x;/import/!{s/^/import/;h;p;};x;};}'` if test "X$win32_nmres" = "Ximport" ; then win32_libid_type="x86 archive import" else win32_libid_type="x86 archive static" fi fi ;; *DLL*) win32_libid_type="x86 DLL" ;; *executable*) # but shell scripts are "executable" too... case $win32_fileres in *MS\ Windows\ PE\ Intel*) win32_libid_type="x86 DLL" ;; esac ;; esac $echo $win32_libid_type } # func_infer_tag arg # Infer tagged configuration to use if any are available and # if one wasn't chosen via the "--tag" command line option. # Only attempt this if the compiler in the base compile # command doesn't match the default compiler. # arg is usually of the form 'gcc ...' func_infer_tag () { if test -n "$available_tags" && test -z "$tagname"; then CC_quoted= for arg in $CC; do case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac CC_quoted="$CC_quoted $arg" done case $@ in # Blanks in the command may have been stripped by the calling shell, # but not from the CC environment variable when configure was run. " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*) ;; # Blanks at the start of $base_compile will cause this to fail # if we don't check for them as well. *) for z in $available_tags; do if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then # Evaluate the configuration. eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`" CC_quoted= for arg in $CC; do # Double-quote args containing other shell metacharacters. case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac CC_quoted="$CC_quoted $arg" done case "$@ " in " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*) # The compiler in the base compile command matches # the one in the tagged configuration. # Assume this is the tagged configuration we want. tagname=$z break ;; esac fi done # If $tagname still isn't set, then no tagged configuration # was found and let the user know that the "--tag" command # line option must be used. if test -z "$tagname"; then $echo "$modename: unable to infer tagged configuration" $echo "$modename: specify a tag with \`--tag'" 1>&2 exit $EXIT_FAILURE # else # $echo "$modename: using $tagname tagged configuration" fi ;; esac fi } # func_extract_an_archive dir oldlib func_extract_an_archive () { f_ex_an_ar_dir="$1"; shift f_ex_an_ar_oldlib="$1" $show "(cd $f_ex_an_ar_dir && $AR x $f_ex_an_ar_oldlib)" $run eval "(cd \$f_ex_an_ar_dir && $AR x \$f_ex_an_ar_oldlib)" || exit $? if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then : else $echo "$modename: ERROR: object name conflicts: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" 1>&2 exit $EXIT_FAILURE fi } # func_extract_archives gentop oldlib ... func_extract_archives () { my_gentop="$1"; shift my_oldlibs=${1+"$@"} my_oldobjs="" my_xlib="" my_xabs="" my_xdir="" my_status="" $show "${rm}r $my_gentop" $run ${rm}r "$my_gentop" $show "$mkdir $my_gentop" $run $mkdir "$my_gentop" my_status=$? if test "$my_status" -ne 0 && test ! -d "$my_gentop"; then exit $my_status fi for my_xlib in $my_oldlibs; do # Extract the objects. case $my_xlib in [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;; *) my_xabs=`pwd`"/$my_xlib" ;; esac my_xlib=`$echo "X$my_xlib" | $Xsed -e 's%^.*/%%'` my_xdir="$my_gentop/$my_xlib" $show "${rm}r $my_xdir" $run ${rm}r "$my_xdir" $show "$mkdir $my_xdir" $run $mkdir "$my_xdir" status=$? if test "$status" -ne 0 && test ! -d "$my_xdir"; then exit $status fi case $host in *-darwin*) $show "Extracting $my_xabs" # Do not bother doing anything if just a dry run if test -z "$run"; then darwin_orig_dir=`pwd` cd $my_xdir || exit $? darwin_archive=$my_xabs darwin_curdir=`pwd` darwin_base_archive=`$echo "X$darwin_archive" | $Xsed -e 's%^.*/%%'` darwin_arches=`lipo -info "$darwin_archive" 2>/dev/null | $EGREP Architectures 2>/dev/null` if test -n "$darwin_arches"; then darwin_arches=`echo "$darwin_arches" | $SED -e 's/.*are://'` darwin_arch= $show "$darwin_base_archive has multiple architectures $darwin_arches" for darwin_arch in $darwin_arches ; do mkdir -p "unfat-$$/${darwin_base_archive}-${darwin_arch}" lipo -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}" cd "unfat-$$/${darwin_base_archive}-${darwin_arch}" func_extract_an_archive "`pwd`" "${darwin_base_archive}" cd "$darwin_curdir" $rm "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" done # $darwin_arches ## Okay now we have a bunch of thin objects, gotta fatten them up :) darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print| xargs basename | sort -u | $NL2SP` darwin_file= darwin_files= for darwin_file in $darwin_filelist; do darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP` lipo -create -output "$darwin_file" $darwin_files done # $darwin_filelist ${rm}r unfat-$$ cd "$darwin_orig_dir" else cd "$darwin_orig_dir" func_extract_an_archive "$my_xdir" "$my_xabs" fi # $darwin_arches fi # $run ;; *) func_extract_an_archive "$my_xdir" "$my_xabs" ;; esac my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP` done func_extract_archives_result="$my_oldobjs" } # End of Shell function definitions ##################################### # Darwin sucks eval std_shrext=\"$shrext_cmds\" # Parse our command line options once, thoroughly. while test "$#" -gt 0 do arg="$1" shift case $arg in -*=*) optarg=`$echo "X$arg" | $Xsed -e 's/[-_a-zA-Z0-9]*=//'` ;; *) optarg= ;; esac # If the previous option needs an argument, assign it. if test -n "$prev"; then case $prev in execute_dlfiles) execute_dlfiles="$execute_dlfiles $arg" ;; tag) tagname="$arg" preserve_args="${preserve_args}=$arg" # Check whether tagname contains only valid characters case $tagname in *[!-_A-Za-z0-9,/]*) $echo "$progname: invalid tag name: $tagname" 1>&2 exit $EXIT_FAILURE ;; esac case $tagname in CC) # Don't test for the "default" C tag, as we know, it's there, but # not specially marked. ;; *) if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "$progpath" > /dev/null; then taglist="$taglist $tagname" # Evaluate the configuration. eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$tagname'$/,/^# ### END LIBTOOL TAG CONFIG: '$tagname'$/p' < $progpath`" else $echo "$progname: ignoring unknown tag $tagname" 1>&2 fi ;; esac ;; *) eval "$prev=\$arg" ;; esac prev= prevopt= continue fi # Have we seen a non-optional argument yet? case $arg in --help) show_help=yes ;; --version) $echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP" $echo $echo "Copyright (C) 2005 Free Software Foundation, Inc." $echo "This is free software; see the source for copying conditions. There is NO" $echo "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." exit $? ;; --config) ${SED} -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $progpath # Now print the configurations for the tags. for tagname in $taglist; do ${SED} -n -e "/^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$/,/^# ### END LIBTOOL TAG CONFIG: $tagname$/p" < "$progpath" done exit $? ;; --debug) $echo "$progname: enabling shell trace mode" set -x preserve_args="$preserve_args $arg" ;; --dry-run | -n) run=: ;; --features) $echo "host: $host" if test "$build_libtool_libs" = yes; then $echo "enable shared libraries" else $echo "disable shared libraries" fi if test "$build_old_libs" = yes; then $echo "enable static libraries" else $echo "disable static libraries" fi exit $? ;; --finish) mode="finish" ;; --mode) prevopt="--mode" prev=mode ;; --mode=*) mode="$optarg" ;; --preserve-dup-deps) duplicate_deps="yes" ;; --quiet | --silent) show=: preserve_args="$preserve_args $arg" ;; --tag) prevopt="--tag" prev=tag ;; --tag=*) set tag "$optarg" ${1+"$@"} shift prev=tag preserve_args="$preserve_args --tag" ;; -dlopen) prevopt="-dlopen" prev=execute_dlfiles ;; -*) $echo "$modename: unrecognized option \`$arg'" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE ;; *) nonopt="$arg" break ;; esac done if test -n "$prevopt"; then $echo "$modename: option \`$prevopt' requires an argument" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi # If this variable is set in any of the actions, the command in it # will be execed at the end. This prevents here-documents from being # left over by shells. exec_cmd= if test -z "$show_help"; then # Infer the operation mode. if test -z "$mode"; then $echo "*** Warning: inferring the mode of operation is deprecated." 1>&2 $echo "*** Future versions of Libtool will require --mode=MODE be specified." 1>&2 case $nonopt in *cc | cc* | *++ | gcc* | *-gcc* | g++* | xlc*) mode=link for arg do case $arg in -c) mode=compile break ;; esac done ;; *db | *dbx | *strace | *truss) mode=execute ;; *install*|cp|mv) mode=install ;; *rm) mode=uninstall ;; *) # If we have no mode, but dlfiles were specified, then do execute mode. test -n "$execute_dlfiles" && mode=execute # Just use the default operation mode. if test -z "$mode"; then if test -n "$nonopt"; then $echo "$modename: warning: cannot infer operation mode from \`$nonopt'" 1>&2 else $echo "$modename: warning: cannot infer operation mode without MODE-ARGS" 1>&2 fi fi ;; esac fi # Only execute mode is allowed to have -dlopen flags. if test -n "$execute_dlfiles" && test "$mode" != execute; then $echo "$modename: unrecognized option \`-dlopen'" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi # Change the help message to a mode-specific one. generic_help="$help" help="Try \`$modename --help --mode=$mode' for more information." # These modes are in order of execution frequency so that they run quickly. case $mode in # libtool compile mode compile) modename="$modename: compile" # Get the compilation command and the source file. base_compile= srcfile="$nonopt" # always keep a non-empty value in "srcfile" suppress_opt=yes suppress_output= arg_mode=normal libobj= later= for arg do case $arg_mode in arg ) # do not "continue". Instead, add this to base_compile lastarg="$arg" arg_mode=normal ;; target ) libobj="$arg" arg_mode=normal continue ;; normal ) # Accept any command-line options. case $arg in -o) if test -n "$libobj" ; then $echo "$modename: you cannot specify \`-o' more than once" 1>&2 exit $EXIT_FAILURE fi arg_mode=target continue ;; -static | -prefer-pic | -prefer-non-pic) later="$later $arg" continue ;; -no-suppress) suppress_opt=no continue ;; -Xcompiler) arg_mode=arg # the next one goes into the "base_compile" arg list continue # The current "srcfile" will either be retained or ;; # replaced later. I would guess that would be a bug. -Wc,*) args=`$echo "X$arg" | $Xsed -e "s/^-Wc,//"` lastarg= save_ifs="$IFS"; IFS=',' for arg in $args; do IFS="$save_ifs" # Double-quote args containing other shell metacharacters. # Many Bourne shells cannot handle close brackets correctly # in scan sets, so we specify it separately. case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac lastarg="$lastarg $arg" done IFS="$save_ifs" lastarg=`$echo "X$lastarg" | $Xsed -e "s/^ //"` # Add the arguments to base_compile. base_compile="$base_compile $lastarg" continue ;; * ) # Accept the current argument as the source file. # The previous "srcfile" becomes the current argument. # lastarg="$srcfile" srcfile="$arg" ;; esac # case $arg ;; esac # case $arg_mode # Aesthetically quote the previous argument. lastarg=`$echo "X$lastarg" | $Xsed -e "$sed_quote_subst"` case $lastarg in # Double-quote args containing other shell metacharacters. # Many Bourne shells cannot handle close brackets correctly # in scan sets, and some SunOS ksh mistreat backslash-escaping # in scan sets (worked around with variable expansion), # and furthermore cannot handle '|' '&' '(' ')' in scan sets # at all, so we specify them separately. *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") lastarg="\"$lastarg\"" ;; esac base_compile="$base_compile $lastarg" done # for arg case $arg_mode in arg) $echo "$modename: you must specify an argument for -Xcompile" exit $EXIT_FAILURE ;; target) $echo "$modename: you must specify a target with \`-o'" 1>&2 exit $EXIT_FAILURE ;; *) # Get the name of the library object. [ -z "$libobj" ] && libobj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'` ;; esac # Recognize several different file suffixes. # If the user specifies -o file.o, it is replaced with file.lo xform='[cCFSifmso]' case $libobj in *.ada) xform=ada ;; *.adb) xform=adb ;; *.ads) xform=ads ;; *.asm) xform=asm ;; *.c++) xform=c++ ;; *.cc) xform=cc ;; *.ii) xform=ii ;; *.class) xform=class ;; *.cpp) xform=cpp ;; *.cxx) xform=cxx ;; *.f90) xform=f90 ;; *.for) xform=for ;; *.java) xform=java ;; esac libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"` case $libobj in *.lo) obj=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;; *) $echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2 exit $EXIT_FAILURE ;; esac func_infer_tag $base_compile for arg in $later; do case $arg in -static) build_old_libs=yes continue ;; -prefer-pic) pic_mode=yes continue ;; -prefer-non-pic) pic_mode=no continue ;; esac done qlibobj=`$echo "X$libobj" | $Xsed -e "$sed_quote_subst"` case $qlibobj in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") qlibobj="\"$qlibobj\"" ;; esac test "X$libobj" != "X$qlibobj" \ && $echo "X$libobj" | grep '[]~#^*{};<>?"'"'"' &()|`$[]' \ && $echo "$modename: libobj name \`$libobj' may not contain shell special characters." objname=`$echo "X$obj" | $Xsed -e 's%^.*/%%'` xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'` if test "X$xdir" = "X$obj"; then xdir= else xdir=$xdir/ fi lobj=${xdir}$objdir/$objname if test -z "$base_compile"; then $echo "$modename: you must specify a compilation command" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi # Delete any leftover library objects. if test "$build_old_libs" = yes; then removelist="$obj $lobj $libobj ${libobj}T" else removelist="$lobj $libobj ${libobj}T" fi $run $rm $removelist trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15 # On Cygwin there's no "real" PIC flag so we must build both object types case $host_os in cygwin* | mingw* | pw32* | os2*) pic_mode=default ;; esac if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then # non-PIC code in shared libraries is not supported pic_mode=default fi # Calculate the filename of the output object if compiler does # not support -o with -c if test "$compiler_c_o" = no; then output_obj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext} lockfile="$output_obj.lock" removelist="$removelist $output_obj $lockfile" trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15 else output_obj= need_locks=no lockfile= fi # Lock this critical section if it is needed # We use this script file to make the link, it avoids creating a new file if test "$need_locks" = yes; then until $run ln "$progpath" "$lockfile" 2>/dev/null; do $show "Waiting for $lockfile to be removed" sleep 2 done elif test "$need_locks" = warn; then if test -f "$lockfile"; then $echo "\ *** ERROR, $lockfile exists and contains: `cat $lockfile 2>/dev/null` This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $run $rm $removelist exit $EXIT_FAILURE fi $echo "$srcfile" > "$lockfile" fi if test -n "$fix_srcfile_path"; then eval srcfile=\"$fix_srcfile_path\" fi qsrcfile=`$echo "X$srcfile" | $Xsed -e "$sed_quote_subst"` case $qsrcfile in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") qsrcfile="\"$qsrcfile\"" ;; esac $run $rm "$libobj" "${libobj}T" # Create a libtool object file (analogous to a ".la" file), # but don't create it if we're doing a dry run. test -z "$run" && cat > ${libobj}T </dev/null`" != "X$srcfile"; then $echo "\ *** ERROR, $lockfile contains: `cat $lockfile 2>/dev/null` but it should contain: $srcfile This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $run $rm $removelist exit $EXIT_FAILURE fi # Just move the object if needed, then go on to compile the next one if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then $show "$mv $output_obj $lobj" if $run $mv $output_obj $lobj; then : else error=$? $run $rm $removelist exit $error fi fi # Append the name of the PIC object to the libtool object file. test -z "$run" && cat >> ${libobj}T <> ${libobj}T </dev/null`" != "X$srcfile"; then $echo "\ *** ERROR, $lockfile contains: `cat $lockfile 2>/dev/null` but it should contain: $srcfile This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $run $rm $removelist exit $EXIT_FAILURE fi # Just move the object if needed if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then $show "$mv $output_obj $obj" if $run $mv $output_obj $obj; then : else error=$? $run $rm $removelist exit $error fi fi # Append the name of the non-PIC object the libtool object file. # Only append if the libtool object file exists. test -z "$run" && cat >> ${libobj}T <> ${libobj}T <&2 fi if test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi else if test -z "$pic_flag" && test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi fi build_libtool_libs=no build_old_libs=yes prefer_static_libs=yes break ;; esac done # See if our shared archives depend on static archives. test -n "$old_archive_from_new_cmds" && build_old_libs=yes # Go through the arguments, transforming them on the way. while test "$#" -gt 0; do arg="$1" shift case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") qarg=\"`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`\" ### testsuite: skip nested quoting test ;; *) qarg=$arg ;; esac libtool_args="$libtool_args $qarg" # If the previous option needs an argument, assign it. if test -n "$prev"; then case $prev in output) compile_command="$compile_command @OUTPUT@" finalize_command="$finalize_command @OUTPUT@" ;; esac case $prev in dlfiles|dlprefiles) if test "$preload" = no; then # Add the symbol object into the linking commands. compile_command="$compile_command @SYMFILE@" finalize_command="$finalize_command @SYMFILE@" preload=yes fi case $arg in *.la | *.lo) ;; # We handle these cases below. force) if test "$dlself" = no; then dlself=needless export_dynamic=yes fi prev= continue ;; self) if test "$prev" = dlprefiles; then dlself=yes elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then dlself=yes else dlself=needless export_dynamic=yes fi prev= continue ;; *) if test "$prev" = dlfiles; then dlfiles="$dlfiles $arg" else dlprefiles="$dlprefiles $arg" fi prev= continue ;; esac ;; expsyms) export_symbols="$arg" if test ! -f "$arg"; then $echo "$modename: symbol file \`$arg' does not exist" exit $EXIT_FAILURE fi prev= continue ;; expsyms_regex) export_symbols_regex="$arg" prev= continue ;; inst_prefix) inst_prefix_dir="$arg" prev= continue ;; precious_regex) precious_files_regex="$arg" prev= continue ;; release) release="-$arg" prev= continue ;; objectlist) if test -f "$arg"; then save_arg=$arg moreargs= for fil in `cat $save_arg` do # moreargs="$moreargs $fil" arg=$fil # A libtool-controlled object. # Check to see that this really is a libtool object. if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then pic_object= non_pic_object= # Read the .lo file # If there is no directory component, then add one. case $arg in */* | *\\*) . $arg ;; *) . ./$arg ;; esac if test -z "$pic_object" || \ test -z "$non_pic_object" || test "$pic_object" = none && \ test "$non_pic_object" = none; then $echo "$modename: cannot find name of object for \`$arg'" 1>&2 exit $EXIT_FAILURE fi # Extract subdirectory from the argument. xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` if test "X$xdir" = "X$arg"; then xdir= else xdir="$xdir/" fi if test "$pic_object" != none; then # Prepend the subdirectory the object is found in. pic_object="$xdir$pic_object" if test "$prev" = dlfiles; then if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then dlfiles="$dlfiles $pic_object" prev= continue else # If libtool objects are unsupported, then we need to preload. prev=dlprefiles fi fi # CHECK ME: I think I busted this. -Ossama if test "$prev" = dlprefiles; then # Preload the old-style object. dlprefiles="$dlprefiles $pic_object" prev= fi # A PIC object. libobjs="$libobjs $pic_object" arg="$pic_object" fi # Non-PIC object. if test "$non_pic_object" != none; then # Prepend the subdirectory the object is found in. non_pic_object="$xdir$non_pic_object" # A standard non-PIC object non_pic_objects="$non_pic_objects $non_pic_object" if test -z "$pic_object" || test "$pic_object" = none ; then arg="$non_pic_object" fi fi else # Only an error if not doing a dry-run. if test -z "$run"; then $echo "$modename: \`$arg' is not a valid libtool object" 1>&2 exit $EXIT_FAILURE else # Dry-run case. # Extract subdirectory from the argument. xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` if test "X$xdir" = "X$arg"; then xdir= else xdir="$xdir/" fi pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"` non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"` libobjs="$libobjs $pic_object" non_pic_objects="$non_pic_objects $non_pic_object" fi fi done else $echo "$modename: link input file \`$save_arg' does not exist" exit $EXIT_FAILURE fi arg=$save_arg prev= continue ;; rpath | xrpath) # We need an absolute path. case $arg in [\\/]* | [A-Za-z]:[\\/]*) ;; *) $echo "$modename: only absolute run-paths are allowed" 1>&2 exit $EXIT_FAILURE ;; esac if test "$prev" = rpath; then case "$rpath " in *" $arg "*) ;; *) rpath="$rpath $arg" ;; esac else case "$xrpath " in *" $arg "*) ;; *) xrpath="$xrpath $arg" ;; esac fi prev= continue ;; xcompiler) compiler_flags="$compiler_flags $qarg" prev= compile_command="$compile_command $qarg" finalize_command="$finalize_command $qarg" continue ;; xlinker) linker_flags="$linker_flags $qarg" compiler_flags="$compiler_flags $wl$qarg" prev= compile_command="$compile_command $wl$qarg" finalize_command="$finalize_command $wl$qarg" continue ;; xcclinker) linker_flags="$linker_flags $qarg" compiler_flags="$compiler_flags $qarg" prev= compile_command="$compile_command $qarg" finalize_command="$finalize_command $qarg" continue ;; shrext) shrext_cmds="$arg" prev= continue ;; darwin_framework) compiler_flags="$compiler_flags $arg" compile_command="$compile_command $arg" finalize_command="$finalize_command $arg" prev= continue ;; *) eval "$prev=\"\$arg\"" prev= continue ;; esac fi # test -n "$prev" prevarg="$arg" case $arg in -all-static) if test -n "$link_static_flag"; then compile_command="$compile_command $link_static_flag" finalize_command="$finalize_command $link_static_flag" fi continue ;; -allow-undefined) # FIXME: remove this flag sometime in the future. $echo "$modename: \`-allow-undefined' is deprecated because it is the default" 1>&2 continue ;; -avoid-version) avoid_version=yes continue ;; -dlopen) prev=dlfiles continue ;; -dlpreopen) prev=dlprefiles continue ;; -export-dynamic) export_dynamic=yes continue ;; -export-symbols | -export-symbols-regex) if test -n "$export_symbols" || test -n "$export_symbols_regex"; then $echo "$modename: more than one -exported-symbols argument is not allowed" exit $EXIT_FAILURE fi if test "X$arg" = "X-export-symbols"; then prev=expsyms else prev=expsyms_regex fi continue ;; -framework|-arch) prev=darwin_framework compiler_flags="$compiler_flags $arg" compile_command="$compile_command $arg" finalize_command="$finalize_command $arg" continue ;; -inst-prefix-dir) prev=inst_prefix continue ;; # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:* # so, if we see these flags be careful not to treat them like -L -L[A-Z][A-Z]*:*) case $with_gcc/$host in no/*-*-irix* | /*-*-irix*) compile_command="$compile_command $arg" finalize_command="$finalize_command $arg" ;; esac continue ;; -L*) dir=`$echo "X$arg" | $Xsed -e 's/^-L//'` # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) absdir=`cd "$dir" && pwd` if test -z "$absdir"; then $echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2 exit $EXIT_FAILURE fi dir="$absdir" ;; esac case "$deplibs " in *" -L$dir "*) ;; *) deplibs="$deplibs -L$dir" lib_search_path="$lib_search_path $dir" ;; esac case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) case :$dllsearchpath: in *":$dir:"*) ;; *) dllsearchpath="$dllsearchpath:$dir";; esac ;; esac continue ;; -l*) if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then case $host in *-*-cygwin* | *-*-pw32* | *-*-beos*) # These systems don't actually have a C or math library (as such) continue ;; *-*-mingw* | *-*-os2*) # These systems don't actually have a C library (as such) test "X$arg" = "X-lc" && continue ;; *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # Do not include libc due to us having libc/libc_r. test "X$arg" = "X-lc" && continue ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C and math libraries are in the System framework deplibs="$deplibs -framework System" continue esac elif test "X$arg" = "X-lc_r"; then case $host in *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # Do not include libc_r directly, use -pthread flag. continue ;; esac fi deplibs="$deplibs $arg" continue ;; # Tru64 UNIX uses -model [arg] to determine the layout of C++ # classes, name mangling, and exception handling. -model) compile_command="$compile_command $arg" compiler_flags="$compiler_flags $arg" finalize_command="$finalize_command $arg" prev=xcompiler continue ;; -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe) compiler_flags="$compiler_flags $arg" compile_command="$compile_command $arg" finalize_command="$finalize_command $arg" continue ;; -module) module=yes continue ;; # -64, -mips[0-9] enable 64-bit mode on the SGI compiler # -r[0-9][0-9]* specifies the processor on the SGI compiler # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler # +DA*, +DD* enable 64-bit mode on the HP compiler # -q* pass through compiler args for the IBM compiler # -m* pass through architecture-specific compiler args for GCC -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*) # Unknown arguments in both finalize_command and compile_command need # to be aesthetically quoted because they are evaled later. arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac compile_command="$compile_command $arg" finalize_command="$finalize_command $arg" if test "$with_gcc" = "yes" ; then compiler_flags="$compiler_flags $arg" fi continue ;; -shrext) prev=shrext continue ;; -no-fast-install) fast_install=no continue ;; -no-install) case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) # The PATH hackery in wrapper scripts is required on Windows # in order for the loader to find any dlls it needs. $echo "$modename: warning: \`-no-install' is ignored for $host" 1>&2 $echo "$modename: warning: assuming \`-no-fast-install' instead" 1>&2 fast_install=no ;; *) no_install=yes ;; esac continue ;; -no-undefined) allow_undefined=no continue ;; -objectlist) prev=objectlist continue ;; -o) prev=output ;; -precious-files-regex) prev=precious_regex continue ;; -release) prev=release continue ;; -rpath) prev=rpath continue ;; -R) prev=xrpath continue ;; -R*) dir=`$echo "X$arg" | $Xsed -e 's/^-R//'` # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) $echo "$modename: only absolute run-paths are allowed" 1>&2 exit $EXIT_FAILURE ;; esac case "$xrpath " in *" $dir "*) ;; *) xrpath="$xrpath $dir" ;; esac continue ;; -static) # The effects of -static are defined in a previous loop. # We used to do the same as -all-static on platforms that # didn't have a PIC flag, but the assumption that the effects # would be equivalent was wrong. It would break on at least # Digital Unix and AIX. continue ;; -thread-safe) thread_safe=yes continue ;; -version-info) prev=vinfo continue ;; -version-number) prev=vinfo vinfo_number=yes continue ;; -Wc,*) args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wc,//'` arg= save_ifs="$IFS"; IFS=',' for flag in $args; do IFS="$save_ifs" case $flag in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") flag="\"$flag\"" ;; esac arg="$arg $wl$flag" compiler_flags="$compiler_flags $flag" done IFS="$save_ifs" arg=`$echo "X$arg" | $Xsed -e "s/^ //"` ;; -Wl,*) args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wl,//'` arg= save_ifs="$IFS"; IFS=',' for flag in $args; do IFS="$save_ifs" case $flag in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") flag="\"$flag\"" ;; esac arg="$arg $wl$flag" compiler_flags="$compiler_flags $wl$flag" linker_flags="$linker_flags $flag" done IFS="$save_ifs" arg=`$echo "X$arg" | $Xsed -e "s/^ //"` ;; -Xcompiler) prev=xcompiler continue ;; -Xlinker) prev=xlinker continue ;; -XCClinker) prev=xcclinker continue ;; # Some other compiler flag. -* | +*) # Unknown arguments in both finalize_command and compile_command need # to be aesthetically quoted because they are evaled later. arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac ;; *.$objext) # A standard object. objs="$objs $arg" ;; *.lo) # A libtool-controlled object. # Check to see that this really is a libtool object. if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then pic_object= non_pic_object= # Read the .lo file # If there is no directory component, then add one. case $arg in */* | *\\*) . $arg ;; *) . ./$arg ;; esac if test -z "$pic_object" || \ test -z "$non_pic_object" || test "$pic_object" = none && \ test "$non_pic_object" = none; then $echo "$modename: cannot find name of object for \`$arg'" 1>&2 exit $EXIT_FAILURE fi # Extract subdirectory from the argument. xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` if test "X$xdir" = "X$arg"; then xdir= else xdir="$xdir/" fi if test "$pic_object" != none; then # Prepend the subdirectory the object is found in. pic_object="$xdir$pic_object" if test "$prev" = dlfiles; then if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then dlfiles="$dlfiles $pic_object" prev= continue else # If libtool objects are unsupported, then we need to preload. prev=dlprefiles fi fi # CHECK ME: I think I busted this. -Ossama if test "$prev" = dlprefiles; then # Preload the old-style object. dlprefiles="$dlprefiles $pic_object" prev= fi # A PIC object. libobjs="$libobjs $pic_object" arg="$pic_object" fi # Non-PIC object. if test "$non_pic_object" != none; then # Prepend the subdirectory the object is found in. non_pic_object="$xdir$non_pic_object" # A standard non-PIC object non_pic_objects="$non_pic_objects $non_pic_object" if test -z "$pic_object" || test "$pic_object" = none ; then arg="$non_pic_object" fi fi else # Only an error if not doing a dry-run. if test -z "$run"; then $echo "$modename: \`$arg' is not a valid libtool object" 1>&2 exit $EXIT_FAILURE else # Dry-run case. # Extract subdirectory from the argument. xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` if test "X$xdir" = "X$arg"; then xdir= else xdir="$xdir/" fi pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"` non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"` libobjs="$libobjs $pic_object" non_pic_objects="$non_pic_objects $non_pic_object" fi fi ;; *.$libext) # An archive. deplibs="$deplibs $arg" old_deplibs="$old_deplibs $arg" continue ;; *.la) # A libtool-controlled library. if test "$prev" = dlfiles; then # This library was specified with -dlopen. dlfiles="$dlfiles $arg" prev= elif test "$prev" = dlprefiles; then # The library was specified with -dlpreopen. dlprefiles="$dlprefiles $arg" prev= else deplibs="$deplibs $arg" fi continue ;; # Some other compiler argument. *) # Unknown arguments in both finalize_command and compile_command need # to be aesthetically quoted because they are evaled later. arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac ;; esac # arg # Now actually substitute the argument into the commands. if test -n "$arg"; then compile_command="$compile_command $arg" finalize_command="$finalize_command $arg" fi done # argument parsing loop if test -n "$prev"; then $echo "$modename: the \`$prevarg' option requires an argument" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then eval arg=\"$export_dynamic_flag_spec\" compile_command="$compile_command $arg" finalize_command="$finalize_command $arg" fi oldlibs= # calculate the name of the file, without its directory outputname=`$echo "X$output" | $Xsed -e 's%^.*/%%'` libobjs_save="$libobjs" if test -n "$shlibpath_var"; then # get the directories listed in $shlibpath_var eval shlib_search_path=\`\$echo \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\` else shlib_search_path= fi eval sys_lib_search_path=\"$sys_lib_search_path_spec\" eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\" output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'` if test "X$output_objdir" = "X$output"; then output_objdir="$objdir" else output_objdir="$output_objdir/$objdir" fi # Create the object directory. if test ! -d "$output_objdir"; then $show "$mkdir $output_objdir" $run $mkdir $output_objdir status=$? if test "$status" -ne 0 && test ! -d "$output_objdir"; then exit $status fi fi # Determine the type of output case $output in "") $echo "$modename: you must specify an output file" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE ;; *.$libext) linkmode=oldlib ;; *.lo | *.$objext) linkmode=obj ;; *.la) linkmode=lib ;; *) linkmode=prog ;; # Anything else should be a program. esac case $host in *cygwin* | *mingw* | *pw32*) # don't eliminate duplications in $postdeps and $predeps duplicate_compiler_generated_deps=yes ;; *) duplicate_compiler_generated_deps=$duplicate_deps ;; esac specialdeplibs= libs= # Find all interdependent deplibs by searching for libraries # that are linked more than once (e.g. -la -lb -la) for deplib in $deplibs; do if test "X$duplicate_deps" = "Xyes" ; then case "$libs " in *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; esac fi libs="$libs $deplib" done if test "$linkmode" = lib; then libs="$predeps $libs $compiler_lib_search_path $postdeps" # Compute libraries that are listed more than once in $predeps # $postdeps and mark them as special (i.e., whose duplicates are # not to be eliminated). pre_post_deps= if test "X$duplicate_compiler_generated_deps" = "Xyes" ; then for pre_post_dep in $predeps $postdeps; do case "$pre_post_deps " in *" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;; esac pre_post_deps="$pre_post_deps $pre_post_dep" done fi pre_post_deps= fi deplibs= newdependency_libs= newlib_search_path= need_relink=no # whether we're linking any uninstalled libtool libraries notinst_deplibs= # not-installed libtool libraries notinst_path= # paths that contain not-installed libtool libraries case $linkmode in lib) passes="conv link" for file in $dlfiles $dlprefiles; do case $file in *.la) ;; *) $echo "$modename: libraries can \`-dlopen' only libtool libraries: $file" 1>&2 exit $EXIT_FAILURE ;; esac done ;; prog) compile_deplibs= finalize_deplibs= alldeplibs=no newdlfiles= newdlprefiles= passes="conv scan dlopen dlpreopen link" ;; *) passes="conv" ;; esac for pass in $passes; do if test "$linkmode,$pass" = "lib,link" || test "$linkmode,$pass" = "prog,scan"; then libs="$deplibs" deplibs= fi if test "$linkmode" = prog; then case $pass in dlopen) libs="$dlfiles" ;; dlpreopen) libs="$dlprefiles" ;; link) libs="$deplibs %DEPLIBS% $dependency_libs" ;; esac fi if test "$pass" = dlopen; then # Collect dlpreopened libraries save_deplibs="$deplibs" deplibs= fi for deplib in $libs; do lib= found=no case $deplib in -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe) if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else compiler_flags="$compiler_flags $deplib" fi continue ;; -l*) if test "$linkmode" != lib && test "$linkmode" != prog; then $echo "$modename: warning: \`-l' is ignored for archives/objects" 1>&2 continue fi name=`$echo "X$deplib" | $Xsed -e 's/^-l//'` for searchdir in $newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path; do for search_ext in .la $std_shrext .so .a; do # Search the libtool library lib="$searchdir/lib${name}${search_ext}" if test -f "$lib"; then if test "$search_ext" = ".la"; then found=yes else found=no fi break 2 fi done done if test "$found" != yes; then # deplib doesn't seem to be a libtool library if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" fi continue else # deplib is a libtool library # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib, # We need to do some special things here, and not later. if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then case " $predeps $postdeps " in *" $deplib "*) if (${SED} -e '2q' $lib | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then library_names= old_library= case $lib in */* | *\\*) . $lib ;; *) . ./$lib ;; esac for l in $old_library $library_names; do ll="$l" done if test "X$ll" = "X$old_library" ; then # only static version available found=no ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'` test "X$ladir" = "X$lib" && ladir="." lib=$ladir/$old_library if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" fi continue fi fi ;; *) ;; esac fi fi ;; # -l -L*) case $linkmode in lib) deplibs="$deplib $deplibs" test "$pass" = conv && continue newdependency_libs="$deplib $newdependency_libs" newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'` ;; prog) if test "$pass" = conv; then deplibs="$deplib $deplibs" continue fi if test "$pass" = scan; then deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" fi newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'` ;; *) $echo "$modename: warning: \`-L' is ignored for archives/objects" 1>&2 ;; esac # linkmode continue ;; # -L -R*) if test "$pass" = link; then dir=`$echo "X$deplib" | $Xsed -e 's/^-R//'` # Make sure the xrpath contains only unique directories. case "$xrpath " in *" $dir "*) ;; *) xrpath="$xrpath $dir" ;; esac fi deplibs="$deplib $deplibs" continue ;; *.la) lib="$deplib" ;; *.$libext) if test "$pass" = conv; then deplibs="$deplib $deplibs" continue fi case $linkmode in lib) valid_a_lib=no case $deplibs_check_method in match_pattern*) set dummy $deplibs_check_method match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"` if eval $echo \"$deplib\" 2>/dev/null \ | $SED 10q \ | $EGREP "$match_pattern_regex" > /dev/null; then valid_a_lib=yes fi ;; pass_all) valid_a_lib=yes ;; esac if test "$valid_a_lib" != yes; then $echo $echo "*** Warning: Trying to link with static lib archive $deplib." $echo "*** I have the capability to make that library automatically link in when" $echo "*** you link to this library. But I can only do this if you have a" $echo "*** shared version of the library, which you do not appear to have" $echo "*** because the file extensions .$libext of this argument makes me believe" $echo "*** that it is just a static archive that I should not used here." else $echo $echo "*** Warning: Linking the shared library $output against the" $echo "*** static library $deplib is not portable!" deplibs="$deplib $deplibs" fi continue ;; prog) if test "$pass" != link; then deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" fi continue ;; esac # linkmode ;; # *.$libext *.lo | *.$objext) if test "$pass" = conv; then deplibs="$deplib $deplibs" elif test "$linkmode" = prog; then if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then # If there is no dlopen support or we're linking statically, # we need to preload. newdlprefiles="$newdlprefiles $deplib" compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else newdlfiles="$newdlfiles $deplib" fi fi continue ;; %DEPLIBS%) alldeplibs=yes continue ;; esac # case $deplib if test "$found" = yes || test -f "$lib"; then : else $echo "$modename: cannot find the library \`$lib'" 1>&2 exit $EXIT_FAILURE fi # Check to see that this really is a libtool archive. if (${SED} -e '2q' $lib | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : else $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 exit $EXIT_FAILURE fi ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'` test "X$ladir" = "X$lib" && ladir="." dlname= dlopen= dlpreopen= libdir= library_names= old_library= # If the library was installed with an old release of libtool, # it will not redefine variables installed, or shouldnotlink installed=yes shouldnotlink=no avoidtemprpath= # Read the .la file case $lib in */* | *\\*) . $lib ;; *) . ./$lib ;; esac if test "$linkmode,$pass" = "lib,link" || test "$linkmode,$pass" = "prog,scan" || { test "$linkmode" != prog && test "$linkmode" != lib; }; then test -n "$dlopen" && dlfiles="$dlfiles $dlopen" test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen" fi if test "$pass" = conv; then # Only check for convenience libraries deplibs="$lib $deplibs" if test -z "$libdir"; then if test -z "$old_library"; then $echo "$modename: cannot find name of link library for \`$lib'" 1>&2 exit $EXIT_FAILURE fi # It is a libtool convenience library, so add in its objects. convenience="$convenience $ladir/$objdir/$old_library" old_convenience="$old_convenience $ladir/$objdir/$old_library" tmp_libs= for deplib in $dependency_libs; do deplibs="$deplib $deplibs" if test "X$duplicate_deps" = "Xyes" ; then case "$tmp_libs " in *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; esac fi tmp_libs="$tmp_libs $deplib" done elif test "$linkmode" != prog && test "$linkmode" != lib; then $echo "$modename: \`$lib' is not a convenience library" 1>&2 exit $EXIT_FAILURE fi continue fi # $pass = conv # Get the name of the library we link against. linklib= for l in $old_library $library_names; do linklib="$l" done if test -z "$linklib"; then $echo "$modename: cannot find name of link library for \`$lib'" 1>&2 exit $EXIT_FAILURE fi # This library was specified with -dlopen. if test "$pass" = dlopen; then if test -z "$libdir"; then $echo "$modename: cannot -dlopen a convenience library: \`$lib'" 1>&2 exit $EXIT_FAILURE fi if test -z "$dlname" || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then # If there is no dlname, no dlopen support or we're linking # statically, we need to preload. We also need to preload any # dependent libraries so libltdl's deplib preloader doesn't # bomb out in the load deplibs phase. dlprefiles="$dlprefiles $lib $dependency_libs" else newdlfiles="$newdlfiles $lib" fi continue fi # $pass = dlopen # We need an absolute path. case $ladir in [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;; *) abs_ladir=`cd "$ladir" && pwd` if test -z "$abs_ladir"; then $echo "$modename: warning: cannot determine absolute directory name of \`$ladir'" 1>&2 $echo "$modename: passing it literally to the linker, although it might fail" 1>&2 abs_ladir="$ladir" fi ;; esac laname=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` # Find the relevant object directory and library name. if test "X$installed" = Xyes; then if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then $echo "$modename: warning: library \`$lib' was moved." 1>&2 dir="$ladir" absdir="$abs_ladir" libdir="$abs_ladir" else dir="$libdir" absdir="$libdir" fi test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes else if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then dir="$ladir" absdir="$abs_ladir" # Remove this search path later notinst_path="$notinst_path $abs_ladir" else dir="$ladir/$objdir" absdir="$abs_ladir/$objdir" # Remove this search path later notinst_path="$notinst_path $abs_ladir" fi fi # $installed = yes name=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'` # This library was specified with -dlpreopen. if test "$pass" = dlpreopen; then if test -z "$libdir"; then $echo "$modename: cannot -dlpreopen a convenience library: \`$lib'" 1>&2 exit $EXIT_FAILURE fi # Prefer using a static library (so that no silly _DYNAMIC symbols # are required to link). if test -n "$old_library"; then newdlprefiles="$newdlprefiles $dir/$old_library" # Otherwise, use the dlname, so that lt_dlopen finds it. elif test -n "$dlname"; then newdlprefiles="$newdlprefiles $dir/$dlname" else newdlprefiles="$newdlprefiles $dir/$linklib" fi fi # $pass = dlpreopen if test -z "$libdir"; then # Link the convenience library if test "$linkmode" = lib; then deplibs="$dir/$old_library $deplibs" elif test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$dir/$old_library $compile_deplibs" finalize_deplibs="$dir/$old_library $finalize_deplibs" else deplibs="$lib $deplibs" # used for prog,scan pass fi continue fi if test "$linkmode" = prog && test "$pass" != link; then newlib_search_path="$newlib_search_path $ladir" deplibs="$lib $deplibs" linkalldeplibs=no if test "$link_all_deplibs" != no || test -z "$library_names" || test "$build_libtool_libs" = no; then linkalldeplibs=yes fi tmp_libs= for deplib in $dependency_libs; do case $deplib in -L*) newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`;; ### testsuite: skip nested quoting test esac # Need to link against all dependency_libs? if test "$linkalldeplibs" = yes; then deplibs="$deplib $deplibs" else # Need to hardcode shared library paths # or/and link against static libraries newdependency_libs="$deplib $newdependency_libs" fi if test "X$duplicate_deps" = "Xyes" ; then case "$tmp_libs " in *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; esac fi tmp_libs="$tmp_libs $deplib" done # for deplib continue fi # $linkmode = prog... if test "$linkmode,$pass" = "prog,link"; then if test -n "$library_names" && { test "$prefer_static_libs" = no || test -z "$old_library"; }; then # We need to hardcode the library path if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then # Make sure the rpath contains only unique directories. case "$temp_rpath " in *" $dir "*) ;; *" $absdir "*) ;; *) temp_rpath="$temp_rpath $absdir" ;; esac fi # Hardcode the library path. # Skip directories that are in the system default run-time # search path. case " $sys_lib_dlsearch_path " in *" $absdir "*) ;; *) case "$compile_rpath " in *" $absdir "*) ;; *) compile_rpath="$compile_rpath $absdir" esac ;; esac case " $sys_lib_dlsearch_path " in *" $libdir "*) ;; *) case "$finalize_rpath " in *" $libdir "*) ;; *) finalize_rpath="$finalize_rpath $libdir" esac ;; esac fi # $linkmode,$pass = prog,link... if test "$alldeplibs" = yes && { test "$deplibs_check_method" = pass_all || { test "$build_libtool_libs" = yes && test -n "$library_names"; }; }; then # We only need to search for static libraries continue fi fi link_static=no # Whether the deplib will be linked statically if test -n "$library_names" && { test "$prefer_static_libs" = no || test -z "$old_library"; }; then if test "$installed" = no; then notinst_deplibs="$notinst_deplibs $lib" need_relink=yes fi # This is a shared library # Warn about portability, can't link against -module's on # some systems (darwin) if test "$shouldnotlink" = yes && test "$pass" = link ; then $echo if test "$linkmode" = prog; then $echo "*** Warning: Linking the executable $output against the loadable module" else $echo "*** Warning: Linking the shared library $output against the loadable module" fi $echo "*** $linklib is not portable!" fi if test "$linkmode" = lib && test "$hardcode_into_libs" = yes; then # Hardcode the library path. # Skip directories that are in the system default run-time # search path. case " $sys_lib_dlsearch_path " in *" $absdir "*) ;; *) case "$compile_rpath " in *" $absdir "*) ;; *) compile_rpath="$compile_rpath $absdir" esac ;; esac case " $sys_lib_dlsearch_path " in *" $libdir "*) ;; *) case "$finalize_rpath " in *" $libdir "*) ;; *) finalize_rpath="$finalize_rpath $libdir" esac ;; esac fi if test -n "$old_archive_from_expsyms_cmds"; then # figure out the soname set dummy $library_names realname="$2" shift; shift libname=`eval \\$echo \"$libname_spec\"` # use dlname if we got it. it's perfectly good, no? if test -n "$dlname"; then soname="$dlname" elif test -n "$soname_spec"; then # bleh windows case $host in *cygwin* | mingw*) major=`expr $current - $age` versuffix="-$major" ;; esac eval soname=\"$soname_spec\" else soname="$realname" fi # Make a new name for the extract_expsyms_cmds to use soroot="$soname" soname=`$echo $soroot | ${SED} -e 's/^.*\///'` newlib="libimp-`$echo $soname | ${SED} 's/^lib//;s/\.dll$//'`.a" # If the library has no export list, then create one now if test -f "$output_objdir/$soname-def"; then : else $show "extracting exported symbol list from \`$soname'" save_ifs="$IFS"; IFS='~' cmds=$extract_expsyms_cmds for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" fi # Create $newlib if test -f "$output_objdir/$newlib"; then :; else $show "generating import library for \`$soname'" save_ifs="$IFS"; IFS='~' cmds=$old_archive_from_expsyms_cmds for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" fi # make sure the library variables are pointing to the new library dir=$output_objdir linklib=$newlib fi # test -n "$old_archive_from_expsyms_cmds" if test "$linkmode" = prog || test "$mode" != relink; then add_shlibpath= add_dir= add= lib_linked=yes case $hardcode_action in immediate | unsupported) if test "$hardcode_direct" = no; then add="$dir/$linklib" case $host in *-*-sco3.2v5* ) add_dir="-L$dir" ;; *-*-darwin* ) # if the lib is a module then we can not link against # it, someone is ignoring the new warnings I added if /usr/bin/file -L $add 2> /dev/null | $EGREP "bundle" >/dev/null ; then $echo "** Warning, lib $linklib is a module, not a shared library" if test -z "$old_library" ; then $echo $echo "** And there doesn't seem to be a static archive available" $echo "** The link will probably fail, sorry" else add="$dir/$old_library" fi fi esac elif test "$hardcode_minus_L" = no; then case $host in *-*-sunos*) add_shlibpath="$dir" ;; esac add_dir="-L$dir" add="-l$name" elif test "$hardcode_shlibpath_var" = no; then add_shlibpath="$dir" add="-l$name" else lib_linked=no fi ;; relink) if test "$hardcode_direct" = yes; then add="$dir/$linklib" elif test "$hardcode_minus_L" = yes; then add_dir="-L$dir" # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then case $libdir in [\\/]*) add_dir="$add_dir -L$inst_prefix_dir$libdir" ;; esac fi add="-l$name" elif test "$hardcode_shlibpath_var" = yes; then add_shlibpath="$dir" add="-l$name" else lib_linked=no fi ;; *) lib_linked=no ;; esac if test "$lib_linked" != yes; then $echo "$modename: configuration error: unsupported hardcode properties" exit $EXIT_FAILURE fi if test -n "$add_shlibpath"; then case :$compile_shlibpath: in *":$add_shlibpath:"*) ;; *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;; esac fi if test "$linkmode" = prog; then test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs" test -n "$add" && compile_deplibs="$add $compile_deplibs" else test -n "$add_dir" && deplibs="$add_dir $deplibs" test -n "$add" && deplibs="$add $deplibs" if test "$hardcode_direct" != yes && \ test "$hardcode_minus_L" != yes && \ test "$hardcode_shlibpath_var" = yes; then case :$finalize_shlibpath: in *":$libdir:"*) ;; *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; esac fi fi fi if test "$linkmode" = prog || test "$mode" = relink; then add_shlibpath= add_dir= add= # Finalize command for both is simple: just hardcode it. if test "$hardcode_direct" = yes; then add="$libdir/$linklib" elif test "$hardcode_minus_L" = yes; then add_dir="-L$libdir" add="-l$name" elif test "$hardcode_shlibpath_var" = yes; then case :$finalize_shlibpath: in *":$libdir:"*) ;; *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; esac add="-l$name" elif test "$hardcode_automatic" = yes; then if test -n "$inst_prefix_dir" && test -f "$inst_prefix_dir$libdir/$linklib" ; then add="$inst_prefix_dir$libdir/$linklib" else add="$libdir/$linklib" fi else # We cannot seem to hardcode it, guess we'll fake it. add_dir="-L$libdir" # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then case $libdir in [\\/]*) add_dir="$add_dir -L$inst_prefix_dir$libdir" ;; esac fi add="-l$name" fi if test "$linkmode" = prog; then test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs" test -n "$add" && finalize_deplibs="$add $finalize_deplibs" else test -n "$add_dir" && deplibs="$add_dir $deplibs" test -n "$add" && deplibs="$add $deplibs" fi fi elif test "$linkmode" = prog; then # Here we assume that one of hardcode_direct or hardcode_minus_L # is not unsupported. This is valid on all known static and # shared platforms. if test "$hardcode_direct" != unsupported; then test -n "$old_library" && linklib="$old_library" compile_deplibs="$dir/$linklib $compile_deplibs" finalize_deplibs="$dir/$linklib $finalize_deplibs" else compile_deplibs="-l$name -L$dir $compile_deplibs" finalize_deplibs="-l$name -L$dir $finalize_deplibs" fi elif test "$build_libtool_libs" = yes; then # Not a shared library if test "$deplibs_check_method" != pass_all; then # We're trying link a shared library against a static one # but the system doesn't support it. # Just print a warning and add the library to dependency_libs so # that the program can be linked against the static library. $echo $echo "*** Warning: This system can not link to static lib archive $lib." $echo "*** I have the capability to make that library automatically link in when" $echo "*** you link to this library. But I can only do this if you have a" $echo "*** shared version of the library, which you do not appear to have." if test "$module" = yes; then $echo "*** But as you try to build a module library, libtool will still create " $echo "*** a static module, that should work as long as the dlopening application" $echo "*** is linked with the -dlopen flag to resolve symbols at runtime." if test -z "$global_symbol_pipe"; then $echo $echo "*** However, this would only work if libtool was able to extract symbol" $echo "*** lists from a program, using \`nm' or equivalent, but libtool could" $echo "*** not find such a program. So, this module is probably useless." $echo "*** \`nm' from GNU binutils and a full rebuild may help." fi if test "$build_old_libs" = no; then build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi fi else deplibs="$dir/$old_library $deplibs" link_static=yes fi fi # link shared/static library? if test "$linkmode" = lib; then if test -n "$dependency_libs" && { test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes || test "$link_static" = yes; }; then # Extract -R from dependency_libs temp_deplibs= for libdir in $dependency_libs; do case $libdir in -R*) temp_xrpath=`$echo "X$libdir" | $Xsed -e 's/^-R//'` case " $xrpath " in *" $temp_xrpath "*) ;; *) xrpath="$xrpath $temp_xrpath";; esac;; *) temp_deplibs="$temp_deplibs $libdir";; esac done dependency_libs="$temp_deplibs" fi newlib_search_path="$newlib_search_path $absdir" # Link against this library test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs" # ... and its dependency_libs tmp_libs= for deplib in $dependency_libs; do newdependency_libs="$deplib $newdependency_libs" if test "X$duplicate_deps" = "Xyes" ; then case "$tmp_libs " in *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; esac fi tmp_libs="$tmp_libs $deplib" done if test "$link_all_deplibs" != no; then # Add the search paths of all dependency libraries for deplib in $dependency_libs; do case $deplib in -L*) path="$deplib" ;; *.la) dir=`$echo "X$deplib" | $Xsed -e 's%/[^/]*$%%'` test "X$dir" = "X$deplib" && dir="." # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;; *) absdir=`cd "$dir" && pwd` if test -z "$absdir"; then $echo "$modename: warning: cannot determine absolute directory name of \`$dir'" 1>&2 absdir="$dir" fi ;; esac if grep "^installed=no" $deplib > /dev/null; then path="$absdir/$objdir" else eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` if test -z "$libdir"; then $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2 exit $EXIT_FAILURE fi if test "$absdir" != "$libdir"; then $echo "$modename: warning: \`$deplib' seems to be moved" 1>&2 fi path="$absdir" fi depdepl= case $host in *-*-darwin*) # we do not want to link against static libs, # but need to link against shared eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` if test -n "$deplibrary_names" ; then for tmp in $deplibrary_names ; do depdepl=$tmp done if test -f "$path/$depdepl" ; then depdepl="$path/$depdepl" fi # do not add paths which are already there case " $newlib_search_path " in *" $path "*) ;; *) newlib_search_path="$newlib_search_path $path";; esac fi path="" ;; *) path="-L$path" ;; esac ;; -l*) case $host in *-*-darwin*) # Again, we only want to link against shared libraries eval tmp_libs=`$echo "X$deplib" | $Xsed -e "s,^\-l,,"` for tmp in $newlib_search_path ; do if test -f "$tmp/lib$tmp_libs.dylib" ; then eval depdepl="$tmp/lib$tmp_libs.dylib" break fi done path="" ;; *) continue ;; esac ;; *) continue ;; esac case " $deplibs " in *" $path "*) ;; *) deplibs="$path $deplibs" ;; esac case " $deplibs " in *" $depdepl "*) ;; *) deplibs="$depdepl $deplibs" ;; esac done fi # link_all_deplibs != no fi # linkmode = lib done # for deplib in $libs dependency_libs="$newdependency_libs" if test "$pass" = dlpreopen; then # Link the dlpreopened libraries before other libraries for deplib in $save_deplibs; do deplibs="$deplib $deplibs" done fi if test "$pass" != dlopen; then if test "$pass" != conv; then # Make sure lib_search_path contains only unique directories. lib_search_path= for dir in $newlib_search_path; do case "$lib_search_path " in *" $dir "*) ;; *) lib_search_path="$lib_search_path $dir" ;; esac done newlib_search_path= fi if test "$linkmode,$pass" != "prog,link"; then vars="deplibs" else vars="compile_deplibs finalize_deplibs" fi for var in $vars dependency_libs; do # Add libraries to $var in reverse order eval tmp_libs=\"\$$var\" new_libs= for deplib in $tmp_libs; do # FIXME: Pedantically, this is the right thing to do, so # that some nasty dependency loop isn't accidentally # broken: #new_libs="$deplib $new_libs" # Pragmatically, this seems to cause very few problems in # practice: case $deplib in -L*) new_libs="$deplib $new_libs" ;; -R*) ;; *) # And here is the reason: when a library appears more # than once as an explicit dependence of a library, or # is implicitly linked in more than once by the # compiler, it is considered special, and multiple # occurrences thereof are not removed. Compare this # with having the same library being listed as a # dependency of multiple other libraries: in this case, # we know (pedantically, we assume) the library does not # need to be listed more than once, so we keep only the # last copy. This is not always right, but it is rare # enough that we require users that really mean to play # such unportable linking tricks to link the library # using -Wl,-lname, so that libtool does not consider it # for duplicate removal. case " $specialdeplibs " in *" $deplib "*) new_libs="$deplib $new_libs" ;; *) case " $new_libs " in *" $deplib "*) ;; *) new_libs="$deplib $new_libs" ;; esac ;; esac ;; esac done tmp_libs= for deplib in $new_libs; do case $deplib in -L*) case " $tmp_libs " in *" $deplib "*) ;; *) tmp_libs="$tmp_libs $deplib" ;; esac ;; *) tmp_libs="$tmp_libs $deplib" ;; esac done eval $var=\"$tmp_libs\" done # for var fi # Last step: remove runtime libs from dependency_libs # (they stay in deplibs) tmp_libs= for i in $dependency_libs ; do case " $predeps $postdeps $compiler_lib_search_path " in *" $i "*) i="" ;; esac if test -n "$i" ; then tmp_libs="$tmp_libs $i" fi done dependency_libs=$tmp_libs done # for pass if test "$linkmode" = prog; then dlfiles="$newdlfiles" dlprefiles="$newdlprefiles" fi case $linkmode in oldlib) if test -n "$deplibs"; then $echo "$modename: warning: \`-l' and \`-L' are ignored for archives" 1>&2 fi if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then $echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2 fi if test -n "$rpath"; then $echo "$modename: warning: \`-rpath' is ignored for archives" 1>&2 fi if test -n "$xrpath"; then $echo "$modename: warning: \`-R' is ignored for archives" 1>&2 fi if test -n "$vinfo"; then $echo "$modename: warning: \`-version-info/-version-number' is ignored for archives" 1>&2 fi if test -n "$release"; then $echo "$modename: warning: \`-release' is ignored for archives" 1>&2 fi if test -n "$export_symbols" || test -n "$export_symbols_regex"; then $echo "$modename: warning: \`-export-symbols' is ignored for archives" 1>&2 fi # Now set the variables for building old libraries. build_libtool_libs=no oldlibs="$output" objs="$objs$old_deplibs" ;; lib) # Make sure we only generate libraries of the form `libNAME.la'. case $outputname in lib*) name=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'` eval shared_ext=\"$shrext_cmds\" eval libname=\"$libname_spec\" ;; *) if test "$module" = no; then $echo "$modename: libtool library \`$output' must begin with \`lib'" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi if test "$need_lib_prefix" != no; then # Add the "lib" prefix for modules if required name=`$echo "X$outputname" | $Xsed -e 's/\.la$//'` eval shared_ext=\"$shrext_cmds\" eval libname=\"$libname_spec\" else libname=`$echo "X$outputname" | $Xsed -e 's/\.la$//'` fi ;; esac if test -n "$objs"; then if test "$deplibs_check_method" != pass_all; then $echo "$modename: cannot build libtool library \`$output' from non-libtool objects on this host:$objs" 2>&1 exit $EXIT_FAILURE else $echo $echo "*** Warning: Linking the shared library $output against the non-libtool" $echo "*** objects $objs is not portable!" libobjs="$libobjs $objs" fi fi if test "$dlself" != no; then $echo "$modename: warning: \`-dlopen self' is ignored for libtool libraries" 1>&2 fi set dummy $rpath if test "$#" -gt 2; then $echo "$modename: warning: ignoring multiple \`-rpath's for a libtool library" 1>&2 fi install_libdir="$2" oldlibs= if test -z "$rpath"; then if test "$build_libtool_libs" = yes; then # Building a libtool convenience library. # Some compilers have problems with a `.al' extension so # convenience libraries should have the same extension an # archive normally would. oldlibs="$output_objdir/$libname.$libext $oldlibs" build_libtool_libs=convenience build_old_libs=yes fi if test -n "$vinfo"; then $echo "$modename: warning: \`-version-info/-version-number' is ignored for convenience libraries" 1>&2 fi if test -n "$release"; then $echo "$modename: warning: \`-release' is ignored for convenience libraries" 1>&2 fi else # Parse the version information argument. save_ifs="$IFS"; IFS=':' set dummy $vinfo 0 0 0 IFS="$save_ifs" if test -n "$8"; then $echo "$modename: too many parameters to \`-version-info'" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi # convert absolute version numbers to libtool ages # this retains compatibility with .la files and attempts # to make the code below a bit more comprehensible case $vinfo_number in yes) number_major="$2" number_minor="$3" number_revision="$4" # # There are really only two kinds -- those that # use the current revision as the major version # and those that subtract age and use age as # a minor version. But, then there is irix # which has an extra 1 added just for fun # case $version_type in darwin|linux|osf|windows) current=`expr $number_major + $number_minor` age="$number_minor" revision="$number_revision" ;; freebsd-aout|freebsd-elf|sunos) current="$number_major" revision="$number_minor" age="0" ;; irix|nonstopux) current=`expr $number_major + $number_minor - 1` age="$number_minor" revision="$number_minor" ;; esac ;; no) current="$2" revision="$3" age="$4" ;; esac # Check that each of the things are valid numbers. case $current in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) $echo "$modename: CURRENT \`$current' must be a nonnegative integer" 1>&2 $echo "$modename: \`$vinfo' is not valid version information" 1>&2 exit $EXIT_FAILURE ;; esac case $revision in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) $echo "$modename: REVISION \`$revision' must be a nonnegative integer" 1>&2 $echo "$modename: \`$vinfo' is not valid version information" 1>&2 exit $EXIT_FAILURE ;; esac case $age in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) $echo "$modename: AGE \`$age' must be a nonnegative integer" 1>&2 $echo "$modename: \`$vinfo' is not valid version information" 1>&2 exit $EXIT_FAILURE ;; esac if test "$age" -gt "$current"; then $echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2 $echo "$modename: \`$vinfo' is not valid version information" 1>&2 exit $EXIT_FAILURE fi # Calculate the version variables. major= versuffix= verstring= case $version_type in none) ;; darwin) # Like Linux, but with the current version available in # verstring for coding it into the library header major=.`expr $current - $age` versuffix="$major.$age.$revision" # Darwin ld doesn't like 0 for these options... minor_current=`expr $current + 1` verstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision" ;; freebsd-aout) major=".$current" versuffix=".$current.$revision"; ;; freebsd-elf) major=".$current" versuffix=".$current"; ;; irix | nonstopux) major=`expr $current - $age + 1` case $version_type in nonstopux) verstring_prefix=nonstopux ;; *) verstring_prefix=sgi ;; esac verstring="$verstring_prefix$major.$revision" # Add in all the interfaces that we are compatible with. loop=$revision while test "$loop" -ne 0; do iface=`expr $revision - $loop` loop=`expr $loop - 1` verstring="$verstring_prefix$major.$iface:$verstring" done # Before this point, $major must not contain `.'. major=.$major versuffix="$major.$revision" ;; linux) major=.`expr $current - $age` versuffix="$major.$age.$revision" ;; osf) major=.`expr $current - $age` versuffix=".$current.$age.$revision" verstring="$current.$age.$revision" # Add in all the interfaces that we are compatible with. loop=$age while test "$loop" -ne 0; do iface=`expr $current - $loop` loop=`expr $loop - 1` verstring="$verstring:${iface}.0" done # Make executables depend on our current version. verstring="$verstring:${current}.0" ;; sunos) major=".$current" versuffix=".$current.$revision" ;; windows) # Use '-' rather than '.', since we only want one # extension on DOS 8.3 filesystems. major=`expr $current - $age` versuffix="-$major" ;; *) $echo "$modename: unknown library version type \`$version_type'" 1>&2 $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 exit $EXIT_FAILURE ;; esac # Clear the version info if we defaulted, and they specified a release. if test -z "$vinfo" && test -n "$release"; then major= case $version_type in darwin) # we can't check for "0.0" in archive_cmds due to quoting # problems, so we reset it completely verstring= ;; *) verstring="0.0" ;; esac if test "$need_version" = no; then versuffix= else versuffix=".0.0" fi fi # Remove version info from name if versioning should be avoided if test "$avoid_version" = yes && test "$need_version" = no; then major= versuffix= verstring="" fi # Check to see if the archive will have undefined symbols. if test "$allow_undefined" = yes; then if test "$allow_undefined_flag" = unsupported; then $echo "$modename: warning: undefined symbols not allowed in $host shared libraries" 1>&2 build_libtool_libs=no build_old_libs=yes fi else # Don't allow undefined symbols. allow_undefined_flag="$no_undefined_flag" fi fi if test "$mode" != relink; then # Remove our outputs, but don't remove object files since they # may have been created when compiling PIC objects. removelist= tempremovelist=`$echo "$output_objdir/*"` for p in $tempremovelist; do case $p in *.$objext) ;; $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*) if test "X$precious_files_regex" != "X"; then if echo $p | $EGREP -e "$precious_files_regex" >/dev/null 2>&1 then continue fi fi removelist="$removelist $p" ;; *) ;; esac done if test -n "$removelist"; then $show "${rm}r $removelist" $run ${rm}r $removelist fi fi # Now set the variables for building old libraries. if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then oldlibs="$oldlibs $output_objdir/$libname.$libext" # Transform .lo files to .o files. oldobjs="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP` fi # Eliminate all temporary directories. for path in $notinst_path; do lib_search_path=`$echo "$lib_search_path " | ${SED} -e 's% $path % %g'` deplibs=`$echo "$deplibs " | ${SED} -e 's% -L$path % %g'` dependency_libs=`$echo "$dependency_libs " | ${SED} -e 's% -L$path % %g'` done if test -n "$xrpath"; then # If the user specified any rpath flags, then add them. temp_xrpath= for libdir in $xrpath; do temp_xrpath="$temp_xrpath -R$libdir" case "$finalize_rpath " in *" $libdir "*) ;; *) finalize_rpath="$finalize_rpath $libdir" ;; esac done if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then dependency_libs="$temp_xrpath $dependency_libs" fi fi # Make sure dlfiles contains only unique files that won't be dlpreopened old_dlfiles="$dlfiles" dlfiles= for lib in $old_dlfiles; do case " $dlprefiles $dlfiles " in *" $lib "*) ;; *) dlfiles="$dlfiles $lib" ;; esac done # Make sure dlprefiles contains only unique files old_dlprefiles="$dlprefiles" dlprefiles= for lib in $old_dlprefiles; do case "$dlprefiles " in *" $lib "*) ;; *) dlprefiles="$dlprefiles $lib" ;; esac done if test "$build_libtool_libs" = yes; then if test -n "$rpath"; then case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos*) # these systems don't actually have a c library (as such)! ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C library is in the System framework deplibs="$deplibs -framework System" ;; *-*-netbsd*) # Don't link with libc until the a.out ld.so is fixed. ;; *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # Do not include libc due to us having libc/libc_r. test "X$arg" = "X-lc" && continue ;; *) # Add libc to deplibs on all other systems if necessary. if test "$build_libtool_need_lc" = "yes"; then deplibs="$deplibs -lc" fi ;; esac fi # Transform deplibs into only deplibs that can be linked in shared. name_save=$name libname_save=$libname release_save=$release versuffix_save=$versuffix major_save=$major # I'm not sure if I'm treating the release correctly. I think # release should show up in the -l (ie -lgmp5) so we don't want to # add it in twice. Is that correct? release="" versuffix="" major="" newdeplibs= droppeddeps=no case $deplibs_check_method in pass_all) # Don't check for shared/static. Everything works. # This might be a little naive. We might want to check # whether the library exists or not. But this is on # osf3 & osf4 and I'm not really sure... Just # implementing what was already the behavior. newdeplibs=$deplibs ;; test_compile) # This code stresses the "libraries are programs" paradigm to its # limits. Maybe even breaks it. We compile a program, linking it # against the deplibs as a proxy for the library. Then we can check # whether they linked in statically or dynamically with ldd. $rm conftest.c cat > conftest.c </dev/null` for potent_lib in $potential_libs; do # Follow soft links. if ls -lLd "$potent_lib" 2>/dev/null \ | grep " -> " >/dev/null; then continue fi # The statement above tries to avoid entering an # endless loop below, in case of cyclic links. # We might still enter an endless loop, since a link # loop can be closed while we follow links, # but so what? potlib="$potent_lib" while test -h "$potlib" 2>/dev/null; do potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'` case $potliblink in [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";; *) potlib=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";; esac done if eval $file_magic_cmd \"\$potlib\" 2>/dev/null \ | ${SED} 10q \ | $EGREP "$file_magic_regex" > /dev/null; then newdeplibs="$newdeplibs $a_deplib" a_deplib="" break 2 fi done done fi if test -n "$a_deplib" ; then droppeddeps=yes $echo $echo "*** Warning: linker path does not have real file for library $a_deplib." $echo "*** I have the capability to make that library automatically link in when" $echo "*** you link to this library. But I can only do this if you have a" $echo "*** shared version of the library, which you do not appear to have" $echo "*** because I did check the linker path looking for a file starting" if test -z "$potlib" ; then $echo "*** with $libname but no candidates were found. (...for file magic test)" else $echo "*** with $libname and none of the candidates passed a file format test" $echo "*** using a file magic. Last file checked: $potlib" fi fi else # Add a -L argument. newdeplibs="$newdeplibs $a_deplib" fi done # Gone through all deplibs. ;; match_pattern*) set dummy $deplibs_check_method match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"` for a_deplib in $deplibs; do name=`expr $a_deplib : '-l\(.*\)'` # If $name is empty we are operating on a -L argument. if test -n "$name" && test "$name" != "0"; then if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then case " $predeps $postdeps " in *" $a_deplib "*) newdeplibs="$newdeplibs $a_deplib" a_deplib="" ;; esac fi if test -n "$a_deplib" ; then libname=`eval \\$echo \"$libname_spec\"` for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do potential_libs=`ls $i/$libname[.-]* 2>/dev/null` for potent_lib in $potential_libs; do potlib="$potent_lib" # see symlink-check above in file_magic test if eval $echo \"$potent_lib\" 2>/dev/null \ | ${SED} 10q \ | $EGREP "$match_pattern_regex" > /dev/null; then newdeplibs="$newdeplibs $a_deplib" a_deplib="" break 2 fi done done fi if test -n "$a_deplib" ; then droppeddeps=yes $echo $echo "*** Warning: linker path does not have real file for library $a_deplib." $echo "*** I have the capability to make that library automatically link in when" $echo "*** you link to this library. But I can only do this if you have a" $echo "*** shared version of the library, which you do not appear to have" $echo "*** because I did check the linker path looking for a file starting" if test -z "$potlib" ; then $echo "*** with $libname but no candidates were found. (...for regex pattern test)" else $echo "*** with $libname and none of the candidates passed a file format test" $echo "*** using a regex pattern. Last file checked: $potlib" fi fi else # Add a -L argument. newdeplibs="$newdeplibs $a_deplib" fi done # Gone through all deplibs. ;; none | unknown | *) newdeplibs="" tmp_deplibs=`$echo "X $deplibs" | $Xsed -e 's/ -lc$//' \ -e 's/ -[LR][^ ]*//g'` if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then for i in $predeps $postdeps ; do # can't use Xsed below, because $i might contain '/' tmp_deplibs=`$echo "X $tmp_deplibs" | ${SED} -e "1s,^X,," -e "s,$i,,"` done fi if $echo "X $tmp_deplibs" | $Xsed -e 's/[ ]//g' \ | grep . >/dev/null; then $echo if test "X$deplibs_check_method" = "Xnone"; then $echo "*** Warning: inter-library dependencies are not supported in this platform." else $echo "*** Warning: inter-library dependencies are not known to be supported." fi $echo "*** All declared inter-library dependencies are being dropped." droppeddeps=yes fi ;; esac versuffix=$versuffix_save major=$major_save release=$release_save libname=$libname_save name=$name_save case $host in *-*-rhapsody* | *-*-darwin1.[012]) # On Rhapsody replace the C library is the System framework newdeplibs=`$echo "X $newdeplibs" | $Xsed -e 's/ -lc / -framework System /'` ;; esac if test "$droppeddeps" = yes; then if test "$module" = yes; then $echo $echo "*** Warning: libtool could not satisfy all declared inter-library" $echo "*** dependencies of module $libname. Therefore, libtool will create" $echo "*** a static module, that should work as long as the dlopening" $echo "*** application is linked with the -dlopen flag." if test -z "$global_symbol_pipe"; then $echo $echo "*** However, this would only work if libtool was able to extract symbol" $echo "*** lists from a program, using \`nm' or equivalent, but libtool could" $echo "*** not find such a program. So, this module is probably useless." $echo "*** \`nm' from GNU binutils and a full rebuild may help." fi if test "$build_old_libs" = no; then oldlibs="$output_objdir/$libname.$libext" build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi else $echo "*** The inter-library dependencies that have been dropped here will be" $echo "*** automatically added whenever a program is linked with this library" $echo "*** or is declared to -dlopen it." if test "$allow_undefined" = no; then $echo $echo "*** Since this library must not contain undefined symbols," $echo "*** because either the platform does not support them or" $echo "*** it was explicitly requested with -no-undefined," $echo "*** libtool will only create a static version of it." if test "$build_old_libs" = no; then oldlibs="$output_objdir/$libname.$libext" build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi fi fi fi # Done checking deplibs! deplibs=$newdeplibs fi # All the library-specific variables (install_libdir is set above). library_names= old_library= dlname= # Test again, we may have decided not to build it any more if test "$build_libtool_libs" = yes; then if test "$hardcode_into_libs" = yes; then # Hardcode the library paths hardcode_libdirs= dep_rpath= rpath="$finalize_rpath" test "$mode" != relink && rpath="$compile_rpath$rpath" for libdir in $rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" dep_rpath="$dep_rpath $flag" fi elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; *) perm_rpath="$perm_rpath $libdir" ;; esac fi done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" if test -n "$hardcode_libdir_flag_spec_ld"; then eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\" else eval dep_rpath=\"$hardcode_libdir_flag_spec\" fi fi if test -n "$runpath_var" && test -n "$perm_rpath"; then # We should set the runpath_var. rpath= for dir in $perm_rpath; do rpath="$rpath$dir:" done eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var" fi test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs" fi shlibpath="$finalize_shlibpath" test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath" if test -n "$shlibpath"; then eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var" fi # Get the real and link names of the library. eval shared_ext=\"$shrext_cmds\" eval library_names=\"$library_names_spec\" set dummy $library_names realname="$2" shift; shift if test -n "$soname_spec"; then eval soname=\"$soname_spec\" else soname="$realname" fi if test -z "$dlname"; then dlname=$soname fi lib="$output_objdir/$realname" for link do linknames="$linknames $link" done # Use standard objects if they are pic test -z "$pic_flag" && libobjs=`$echo "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` # Prepare the list of exported symbols if test -z "$export_symbols"; then if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then $show "generating symbol list for \`$libname.la'" export_symbols="$output_objdir/$libname.exp" $run $rm $export_symbols cmds=$export_symbols_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" if len=`expr "X$cmd" : ".*"` && test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then $show "$cmd" $run eval "$cmd" || exit $? skipped_export=false else # The command line is too long to execute in one step. $show "using reloadable object file for export list..." skipped_export=: # Break out early, otherwise skipped_export may be # set to false by a later but shorter cmd. break fi done IFS="$save_ifs" if test -n "$export_symbols_regex"; then $show "$EGREP -e \"$export_symbols_regex\" \"$export_symbols\" > \"${export_symbols}T\"" $run eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' $show "$mv \"${export_symbols}T\" \"$export_symbols\"" $run eval '$mv "${export_symbols}T" "$export_symbols"' fi fi fi if test -n "$export_symbols" && test -n "$include_expsyms"; then $run eval '$echo "X$include_expsyms" | $SP2NL >> "$export_symbols"' fi tmp_deplibs= for test_deplib in $deplibs; do case " $convenience " in *" $test_deplib "*) ;; *) tmp_deplibs="$tmp_deplibs $test_deplib" ;; esac done deplibs="$tmp_deplibs" if test -n "$convenience"; then if test -n "$whole_archive_flag_spec"; then save_libobjs=$libobjs eval libobjs=\"\$libobjs $whole_archive_flag_spec\" else gentop="$output_objdir/${outputname}x" generated="$generated $gentop" func_extract_archives $gentop $convenience libobjs="$libobjs $func_extract_archives_result" fi fi if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then eval flag=\"$thread_safe_flag_spec\" linker_flags="$linker_flags $flag" fi # Make a backup of the uninstalled library when relinking if test "$mode" = relink; then $run eval '(cd $output_objdir && $rm ${realname}U && $mv $realname ${realname}U)' || exit $? fi # Do each of the archive commands. if test "$module" = yes && test -n "$module_cmds" ; then if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then eval test_cmds=\"$module_expsym_cmds\" cmds=$module_expsym_cmds else eval test_cmds=\"$module_cmds\" cmds=$module_cmds fi else if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then eval test_cmds=\"$archive_expsym_cmds\" cmds=$archive_expsym_cmds else eval test_cmds=\"$archive_cmds\" cmds=$archive_cmds fi fi if test "X$skipped_export" != "X:" && len=`expr "X$test_cmds" : ".*" 2>/dev/null` && test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then : else # The command line is too long to link in one step, link piecewise. $echo "creating reloadable object files..." # Save the value of $output and $libobjs because we want to # use them later. If we have whole_archive_flag_spec, we # want to use save_libobjs as it was before # whole_archive_flag_spec was expanded, because we can't # assume the linker understands whole_archive_flag_spec. # This may have to be revisited, in case too many # convenience libraries get linked in and end up exceeding # the spec. if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then save_libobjs=$libobjs fi save_output=$output output_la=`$echo "X$output" | $Xsed -e "$basename"` # Clear the reloadable object creation command queue and # initialize k to one. test_cmds= concat_cmds= objlist= delfiles= last_robj= k=1 output=$output_objdir/$output_la-${k}.$objext # Loop over the list of objects to be linked. for obj in $save_libobjs do eval test_cmds=\"$reload_cmds $objlist $last_robj\" if test "X$objlist" = X || { len=`expr "X$test_cmds" : ".*" 2>/dev/null` && test "$len" -le "$max_cmd_len"; }; then objlist="$objlist $obj" else # The command $test_cmds is almost too long, add a # command to the queue. if test "$k" -eq 1 ; then # The first file doesn't have a previous command to add. eval concat_cmds=\"$reload_cmds $objlist $last_robj\" else # All subsequent reloadable object files will link in # the last one created. eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj\" fi last_robj=$output_objdir/$output_la-${k}.$objext k=`expr $k + 1` output=$output_objdir/$output_la-${k}.$objext objlist=$obj len=1 fi done # Handle the remaining objects by creating one last # reloadable object file. All subsequent reloadable object # files will link in the last one created. test -z "$concat_cmds" || concat_cmds=$concat_cmds~ eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\" if ${skipped_export-false}; then $show "generating symbol list for \`$libname.la'" export_symbols="$output_objdir/$libname.exp" $run $rm $export_symbols libobjs=$output # Append the command to create the export file. eval concat_cmds=\"\$concat_cmds~$export_symbols_cmds\" fi # Set up a command to remove the reloadable object files # after they are used. i=0 while test "$i" -lt "$k" do i=`expr $i + 1` delfiles="$delfiles $output_objdir/$output_la-${i}.$objext" done $echo "creating a temporary reloadable object file: $output" # Loop through the commands generated above and execute them. save_ifs="$IFS"; IFS='~' for cmd in $concat_cmds; do IFS="$save_ifs" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" libobjs=$output # Restore the value of output. output=$save_output if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then eval libobjs=\"\$libobjs $whole_archive_flag_spec\" fi # Expand the library linking commands again to reset the # value of $libobjs for piecewise linking. # Do each of the archive commands. if test "$module" = yes && test -n "$module_cmds" ; then if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then cmds=$module_expsym_cmds else cmds=$module_cmds fi else if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then cmds=$archive_expsym_cmds else cmds=$archive_cmds fi fi # Append the command to remove the reloadable object files # to the just-reset $cmds. eval cmds=\"\$cmds~\$rm $delfiles\" fi save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || { lt_exit=$? # Restore the uninstalled library and exit if test "$mode" = relink; then $run eval '(cd $output_objdir && $rm ${realname}T && $mv ${realname}U $realname)' fi exit $lt_exit } done IFS="$save_ifs" # Restore the uninstalled library and exit if test "$mode" = relink; then $run eval '(cd $output_objdir && $rm ${realname}T && $mv $realname ${realname}T && $mv "$realname"U $realname)' || exit $? if test -n "$convenience"; then if test -z "$whole_archive_flag_spec"; then $show "${rm}r $gentop" $run ${rm}r "$gentop" fi fi exit $EXIT_SUCCESS fi # Create links to the real library. for linkname in $linknames; do if test "$realname" != "$linkname"; then $show "(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)" $run eval '(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)' || exit $? fi done # If -module or -export-dynamic was specified, set the dlname. if test "$module" = yes || test "$export_dynamic" = yes; then # On all known operating systems, these are identical. dlname="$soname" fi fi ;; obj) if test -n "$deplibs"; then $echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2 fi if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then $echo "$modename: warning: \`-dlopen' is ignored for objects" 1>&2 fi if test -n "$rpath"; then $echo "$modename: warning: \`-rpath' is ignored for objects" 1>&2 fi if test -n "$xrpath"; then $echo "$modename: warning: \`-R' is ignored for objects" 1>&2 fi if test -n "$vinfo"; then $echo "$modename: warning: \`-version-info' is ignored for objects" 1>&2 fi if test -n "$release"; then $echo "$modename: warning: \`-release' is ignored for objects" 1>&2 fi case $output in *.lo) if test -n "$objs$old_deplibs"; then $echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2 exit $EXIT_FAILURE fi libobj="$output" obj=`$echo "X$output" | $Xsed -e "$lo2o"` ;; *) libobj= obj="$output" ;; esac # Delete the old objects. $run $rm $obj $libobj # Objects from convenience libraries. This assumes # single-version convenience libraries. Whenever we create # different ones for PIC/non-PIC, this we'll have to duplicate # the extraction. reload_conv_objs= gentop= # reload_cmds runs $LD directly, so let us get rid of # -Wl from whole_archive_flag_spec wl= if test -n "$convenience"; then if test -n "$whole_archive_flag_spec"; then eval reload_conv_objs=\"\$reload_objs $whole_archive_flag_spec\" else gentop="$output_objdir/${obj}x" generated="$generated $gentop" func_extract_archives $gentop $convenience reload_conv_objs="$reload_objs $func_extract_archives_result" fi fi # Create the old-style object. reload_objs="$objs$old_deplibs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test output="$obj" cmds=$reload_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" # Exit if we aren't doing a library object file. if test -z "$libobj"; then if test -n "$gentop"; then $show "${rm}r $gentop" $run ${rm}r $gentop fi exit $EXIT_SUCCESS fi if test "$build_libtool_libs" != yes; then if test -n "$gentop"; then $show "${rm}r $gentop" $run ${rm}r $gentop fi # Create an invalid libtool object if no PIC, so that we don't # accidentally link it into a program. # $show "echo timestamp > $libobj" # $run eval "echo timestamp > $libobj" || exit $? exit $EXIT_SUCCESS fi if test -n "$pic_flag" || test "$pic_mode" != default; then # Only do commands if we really have different PIC objects. reload_objs="$libobjs $reload_conv_objs" output="$libobj" cmds=$reload_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" fi if test -n "$gentop"; then $show "${rm}r $gentop" $run ${rm}r $gentop fi exit $EXIT_SUCCESS ;; prog) case $host in *cygwin*) output=`$echo $output | ${SED} -e 's,.exe$,,;s,$,.exe,'` ;; esac if test -n "$vinfo"; then $echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2 fi if test -n "$release"; then $echo "$modename: warning: \`-release' is ignored for programs" 1>&2 fi if test "$preload" = yes; then if test "$dlopen_support" = unknown && test "$dlopen_self" = unknown && test "$dlopen_self_static" = unknown; then $echo "$modename: warning: \`AC_LIBTOOL_DLOPEN' not used. Assuming no dlopen support." fi fi case $host in *-*-rhapsody* | *-*-darwin1.[012]) # On Rhapsody replace the C library is the System framework compile_deplibs=`$echo "X $compile_deplibs" | $Xsed -e 's/ -lc / -framework System /'` finalize_deplibs=`$echo "X $finalize_deplibs" | $Xsed -e 's/ -lc / -framework System /'` ;; esac case $host in *darwin*) # Don't allow lazy linking, it breaks C++ global constructors if test "$tagname" = CXX ; then compile_command="$compile_command ${wl}-bind_at_load" finalize_command="$finalize_command ${wl}-bind_at_load" fi ;; esac compile_command="$compile_command $compile_deplibs" finalize_command="$finalize_command $finalize_deplibs" if test -n "$rpath$xrpath"; then # If the user specified any rpath flags, then add them. for libdir in $rpath $xrpath; do # This is the magic to use -rpath. case "$finalize_rpath " in *" $libdir "*) ;; *) finalize_rpath="$finalize_rpath $libdir" ;; esac done fi # Now hardcode the library paths rpath= hardcode_libdirs= for libdir in $compile_rpath $finalize_rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" rpath="$rpath $flag" fi elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; *) perm_rpath="$perm_rpath $libdir" ;; esac fi case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) case :$dllsearchpath: in *":$libdir:"*) ;; *) dllsearchpath="$dllsearchpath:$libdir";; esac ;; esac done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" eval rpath=\" $hardcode_libdir_flag_spec\" fi compile_rpath="$rpath" rpath= hardcode_libdirs= for libdir in $finalize_rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" rpath="$rpath $flag" fi elif test -n "$runpath_var"; then case "$finalize_perm_rpath " in *" $libdir "*) ;; *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;; esac fi done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" eval rpath=\" $hardcode_libdir_flag_spec\" fi finalize_rpath="$rpath" if test -n "$libobjs" && test "$build_old_libs" = yes; then # Transform all the library objects into standard objects. compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` fi dlsyms= if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then if test -n "$NM" && test -n "$global_symbol_pipe"; then dlsyms="${outputname}S.c" else $echo "$modename: not configured to extract global symbols from dlpreopened files" 1>&2 fi fi if test -n "$dlsyms"; then case $dlsyms in "") ;; *.c) # Discover the nlist of each of the dlfiles. nlist="$output_objdir/${outputname}.nm" $show "$rm $nlist ${nlist}S ${nlist}T" $run $rm "$nlist" "${nlist}S" "${nlist}T" # Parse the name list into a source file. $show "creating $output_objdir/$dlsyms" test -z "$run" && $echo > "$output_objdir/$dlsyms" "\ /* $dlsyms - symbol resolution table for \`$outputname' dlsym emulation. */ /* Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP */ #ifdef __cplusplus extern \"C\" { #endif /* Prevent the only kind of declaration conflicts we can make. */ #define lt_preloaded_symbols some_other_symbol /* External symbol declarations for the compiler. */\ " if test "$dlself" = yes; then $show "generating symbol list for \`$output'" test -z "$run" && $echo ': @PROGRAM@ ' > "$nlist" # Add our own program objects to the symbol list. progfiles=`$echo "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` for arg in $progfiles; do $show "extracting global C symbols from \`$arg'" $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'" done if test -n "$exclude_expsyms"; then $run eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' $run eval '$mv "$nlist"T "$nlist"' fi if test -n "$export_symbols_regex"; then $run eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T' $run eval '$mv "$nlist"T "$nlist"' fi # Prepare the list of exported symbols if test -z "$export_symbols"; then export_symbols="$output_objdir/$outputname.exp" $run $rm $export_symbols $run eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' else $run eval "${SED} -e 's/\([ ][.*^$]\)/\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' $run eval 'grep -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' $run eval 'mv "$nlist"T "$nlist"' fi fi for arg in $dlprefiles; do $show "extracting global C symbols from \`$arg'" name=`$echo "$arg" | ${SED} -e 's%^.*/%%'` $run eval '$echo ": $name " >> "$nlist"' $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'" done if test -z "$run"; then # Make sure we have at least an empty file. test -f "$nlist" || : > "$nlist" if test -n "$exclude_expsyms"; then $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T $mv "$nlist"T "$nlist" fi # Try sorting and uniquifying the output. if grep -v "^: " < "$nlist" | if sort -k 3 /dev/null 2>&1; then sort -k 3 else sort +2 fi | uniq > "$nlist"S; then : else grep -v "^: " < "$nlist" > "$nlist"S fi if test -f "$nlist"S; then eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$dlsyms"' else $echo '/* NONE */' >> "$output_objdir/$dlsyms" fi $echo >> "$output_objdir/$dlsyms" "\ #undef lt_preloaded_symbols #if defined (__STDC__) && __STDC__ # define lt_ptr void * #else # define lt_ptr char * # define const #endif /* The mapping between symbol names and symbols. */ " case $host in *cygwin* | *mingw* ) $echo >> "$output_objdir/$dlsyms" "\ /* DATA imports from DLLs on WIN32 can't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs */ struct { " ;; * ) $echo >> "$output_objdir/$dlsyms" "\ const struct { " ;; esac $echo >> "$output_objdir/$dlsyms" "\ const char *name; lt_ptr address; } lt_preloaded_symbols[] = {\ " eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$dlsyms" $echo >> "$output_objdir/$dlsyms" "\ {0, (lt_ptr) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt_preloaded_symbols; } #endif #ifdef __cplusplus } #endif\ " fi pic_flag_for_symtable= case $host in # compiling the symbol table file with pic_flag works around # a FreeBSD bug that causes programs to crash when -lm is # linked before any other PIC object. But we must not use # pic_flag when linking with -static. The problem exists in # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1. *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) case "$compile_command " in *" -static "*) ;; *) pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND";; esac;; *-*-hpux*) case "$compile_command " in *" -static "*) ;; *) pic_flag_for_symtable=" $pic_flag";; esac esac # Now compile the dynamic symbol file. $show "(cd $output_objdir && $LTCC -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")" $run eval '(cd $output_objdir && $LTCC -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $? # Clean up the generated files. $show "$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T" $run $rm "$output_objdir/$dlsyms" "$nlist" "${nlist}S" "${nlist}T" # Transform the symbol file into the correct name. compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"` finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"` ;; *) $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2 exit $EXIT_FAILURE ;; esac else # We keep going just in case the user didn't refer to # lt_preloaded_symbols. The linker will fail if global_symbol_pipe # really was required. # Nullify the symbol file. compile_command=`$echo "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"` finalize_command=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"` fi if test "$need_relink" = no || test "$build_libtool_libs" != yes; then # Replace the output file specification. compile_command=`$echo "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` link_command="$compile_command$compile_rpath" # We have no uninstalled library dependencies, so finalize right now. $show "$link_command" $run eval "$link_command" status=$? # Delete the generated files. if test -n "$dlsyms"; then $show "$rm $output_objdir/${outputname}S.${objext}" $run $rm "$output_objdir/${outputname}S.${objext}" fi exit $status fi if test -n "$shlibpath_var"; then # We should set the shlibpath_var rpath= for dir in $temp_rpath; do case $dir in [\\/]* | [A-Za-z]:[\\/]*) # Absolute path. rpath="$rpath$dir:" ;; *) # Relative path: add a thisdir entry. rpath="$rpath\$thisdir/$dir:" ;; esac done temp_rpath="$rpath" fi if test -n "$compile_shlibpath$finalize_shlibpath"; then compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command" fi if test -n "$finalize_shlibpath"; then finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command" fi compile_var= finalize_var= if test -n "$runpath_var"; then if test -n "$perm_rpath"; then # We should set the runpath_var. rpath= for dir in $perm_rpath; do rpath="$rpath$dir:" done compile_var="$runpath_var=\"$rpath\$$runpath_var\" " fi if test -n "$finalize_perm_rpath"; then # We should set the runpath_var. rpath= for dir in $finalize_perm_rpath; do rpath="$rpath$dir:" done finalize_var="$runpath_var=\"$rpath\$$runpath_var\" " fi fi if test "$no_install" = yes; then # We don't need to create a wrapper script. link_command="$compile_var$compile_command$compile_rpath" # Replace the output file specification. link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` # Delete the old output file. $run $rm $output # Link the executable and exit $show "$link_command" $run eval "$link_command" || exit $? exit $EXIT_SUCCESS fi if test "$hardcode_action" = relink; then # Fast installation is not supported link_command="$compile_var$compile_command$compile_rpath" relink_command="$finalize_var$finalize_command$finalize_rpath" $echo "$modename: warning: this platform does not like uninstalled shared libraries" 1>&2 $echo "$modename: \`$output' will be relinked during installation" 1>&2 else if test "$fast_install" != no; then link_command="$finalize_var$compile_command$finalize_rpath" if test "$fast_install" = yes; then relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'` else # fast_install is set to needless relink_command= fi else link_command="$compile_var$compile_command$compile_rpath" relink_command="$finalize_var$finalize_command$finalize_rpath" fi fi # Replace the output file specification. link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` # Delete the old output files. $run $rm $output $output_objdir/$outputname $output_objdir/lt-$outputname $show "$link_command" $run eval "$link_command" || exit $? # Now create the wrapper script. $show "creating $output" # Quote the relink command for shipping. if test -n "$relink_command"; then # Preserve any variables that may affect compiler behavior for var in $variables_saved_for_relink; do if eval test -z \"\${$var+set}\"; then relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command" elif eval var_value=\$$var; test -z "$var_value"; then relink_command="$var=; export $var; $relink_command" else var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"` relink_command="$var=\"$var_value\"; export $var; $relink_command" fi done relink_command="(cd `pwd`; $relink_command)" relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"` fi # Quote $echo for shipping. if test "X$echo" = "X$SHELL $progpath --fallback-echo"; then case $progpath in [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $progpath --fallback-echo";; *) qecho="$SHELL `pwd`/$progpath --fallback-echo";; esac qecho=`$echo "X$qecho" | $Xsed -e "$sed_quote_subst"` else qecho=`$echo "X$echo" | $Xsed -e "$sed_quote_subst"` fi # Only actually do things if our run command is non-null. if test -z "$run"; then # win32 will think the script is a binary if it has # a .exe suffix, so we strip it off here. case $output in *.exe) output=`$echo $output|${SED} 's,.exe$,,'` ;; esac # test for cygwin because mv fails w/o .exe extensions case $host in *cygwin*) exeext=.exe outputname=`$echo $outputname|${SED} 's,.exe$,,'` ;; *) exeext= ;; esac case $host in *cygwin* | *mingw* ) cwrappersource=`$echo ${objdir}/lt-${outputname}.c` cwrapper=`$echo ${output}.exe` $rm $cwrappersource $cwrapper trap "$rm $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15 cat > $cwrappersource <> $cwrappersource<<"EOF" #include #include #include #include #include #include #if defined(PATH_MAX) # define LT_PATHMAX PATH_MAX #elif defined(MAXPATHLEN) # define LT_PATHMAX MAXPATHLEN #else # define LT_PATHMAX 1024 #endif #ifndef DIR_SEPARATOR #define DIR_SEPARATOR '/' #endif #if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \ defined (__OS2__) #define HAVE_DOS_BASED_FILE_SYSTEM #ifndef DIR_SEPARATOR_2 #define DIR_SEPARATOR_2 '\\' #endif #endif #ifndef DIR_SEPARATOR_2 # define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR) #else /* DIR_SEPARATOR_2 */ # define IS_DIR_SEPARATOR(ch) \ (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2)) #endif /* DIR_SEPARATOR_2 */ #define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) #define XFREE(stale) do { \ if (stale) { free ((void *) stale); stale = 0; } \ } while (0) const char *program_name = NULL; void * xmalloc (size_t num); char * xstrdup (const char *string); char * basename (const char *name); char * fnqualify(const char *path); char * strendzap(char *str, const char *pat); void lt_fatal (const char *message, ...); int main (int argc, char *argv[]) { char **newargz; int i; program_name = (char *) xstrdup ((char *) basename (argv[0])); newargz = XMALLOC(char *, argc+2); EOF cat >> $cwrappersource <> $cwrappersource <<"EOF" newargz[1] = fnqualify(argv[0]); /* we know the script has the same name, without the .exe */ /* so make sure newargz[1] doesn't end in .exe */ strendzap(newargz[1],".exe"); for (i = 1; i < argc; i++) newargz[i+1] = xstrdup(argv[i]); newargz[argc+1] = NULL; EOF cat >> $cwrappersource <> $cwrappersource <<"EOF" return 127; } void * xmalloc (size_t num) { void * p = (void *) malloc (num); if (!p) lt_fatal ("Memory exhausted"); return p; } char * xstrdup (const char *string) { return string ? strcpy ((char *) xmalloc (strlen (string) + 1), string) : NULL ; } char * basename (const char *name) { const char *base; #if defined (HAVE_DOS_BASED_FILE_SYSTEM) /* Skip over the disk name in MSDOS pathnames. */ if (isalpha (name[0]) && name[1] == ':') name += 2; #endif for (base = name; *name; name++) if (IS_DIR_SEPARATOR (*name)) base = name + 1; return (char *) base; } char * fnqualify(const char *path) { size_t size; char *p; char tmp[LT_PATHMAX + 1]; assert(path != NULL); /* Is it qualified already? */ #if defined (HAVE_DOS_BASED_FILE_SYSTEM) if (isalpha (path[0]) && path[1] == ':') return xstrdup (path); #endif if (IS_DIR_SEPARATOR (path[0])) return xstrdup (path); /* prepend the current directory */ /* doesn't handle '~' */ if (getcwd (tmp, LT_PATHMAX) == NULL) lt_fatal ("getcwd failed"); size = strlen(tmp) + 1 + strlen(path) + 1; /* +2 for '/' and '\0' */ p = XMALLOC(char, size); sprintf(p, "%s%c%s", tmp, DIR_SEPARATOR, path); return p; } char * strendzap(char *str, const char *pat) { size_t len, patlen; assert(str != NULL); assert(pat != NULL); len = strlen(str); patlen = strlen(pat); if (patlen <= len) { str += len - patlen; if (strcmp(str, pat) == 0) *str = '\0'; } return str; } static void lt_error_core (int exit_status, const char * mode, const char * message, va_list ap) { fprintf (stderr, "%s: %s: ", program_name, mode); vfprintf (stderr, message, ap); fprintf (stderr, ".\n"); if (exit_status >= 0) exit (exit_status); } void lt_fatal (const char *message, ...) { va_list ap; va_start (ap, message); lt_error_core (EXIT_FAILURE, "FATAL", message, ap); va_end (ap); } EOF # we should really use a build-platform specific compiler # here, but OTOH, the wrappers (shell script and this C one) # are only useful if you want to execute the "real" binary. # Since the "real" binary is built for $host, then this # wrapper might as well be built for $host, too. $run $LTCC -s -o $cwrapper $cwrappersource ;; esac $rm $output trap "$rm $output; exit $EXIT_FAILURE" 1 2 15 $echo > $output "\ #! $SHELL # $output - temporary wrapper script for $objdir/$outputname # Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP # # The $output program cannot be directly executed until all the libtool # libraries that it depends on are installed. # # This wrapper script should never be moved out of the build directory. # If it is, it will not operate correctly. # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. Xsed='${SED} -e 1s/^X//' sed_quote_subst='$sed_quote_subst' # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH relink_command=\"$relink_command\" # This environment variable determines our operation mode. if test \"\$libtool_install_magic\" = \"$magic\"; then # install mode needs the following variable: notinst_deplibs='$notinst_deplibs' else # When we are sourced in execute mode, \$file and \$echo are already set. if test \"\$libtool_execute_magic\" != \"$magic\"; then echo=\"$qecho\" file=\"\$0\" # Make sure echo works. if test \"X\$1\" = X--no-reexec; then # Discard the --no-reexec flag, and continue. shift elif test \"X\`(\$echo '\t') 2>/dev/null\`\" = 'X\t'; then # Yippee, \$echo works! : else # Restart under the correct shell, and then maybe \$echo will work. exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"} fi fi\ " $echo >> $output "\ # Find the directory that this script lives in. thisdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\` test \"x\$thisdir\" = \"x\$file\" && thisdir=. # Follow symbolic links until we get to the real thisdir. file=\`ls -ld \"\$file\" | ${SED} -n 's/.*-> //p'\` while test -n \"\$file\"; do destdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\` # If there was a directory component, then change thisdir. if test \"x\$destdir\" != \"x\$file\"; then case \"\$destdir\" in [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;; *) thisdir=\"\$thisdir/\$destdir\" ;; esac fi file=\`\$echo \"X\$file\" | \$Xsed -e 's%^.*/%%'\` file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\` done # Try to get the absolute directory name. absdir=\`cd \"\$thisdir\" && pwd\` test -n \"\$absdir\" && thisdir=\"\$absdir\" " if test "$fast_install" = yes; then $echo >> $output "\ program=lt-'$outputname'$exeext progdir=\"\$thisdir/$objdir\" if test ! -f \"\$progdir/\$program\" || \\ { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\ test \"X\$file\" != \"X\$progdir/\$program\"; }; then file=\"\$\$-\$program\" if test ! -d \"\$progdir\"; then $mkdir \"\$progdir\" else $rm \"\$progdir/\$file\" fi" $echo >> $output "\ # relink executable if necessary if test -n \"\$relink_command\"; then if relink_command_output=\`eval \$relink_command 2>&1\`; then : else $echo \"\$relink_command_output\" >&2 $rm \"\$progdir/\$file\" exit $EXIT_FAILURE fi fi $mv \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null || { $rm \"\$progdir/\$program\"; $mv \"\$progdir/\$file\" \"\$progdir/\$program\"; } $rm \"\$progdir/\$file\" fi" else $echo >> $output "\ program='$outputname' progdir=\"\$thisdir/$objdir\" " fi $echo >> $output "\ if test -f \"\$progdir/\$program\"; then" # Export our shlibpath_var if we have one. if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then $echo >> $output "\ # Add our own library path to $shlibpath_var $shlibpath_var=\"$temp_rpath\$$shlibpath_var\" # Some systems cannot cope with colon-terminated $shlibpath_var # The second colon is a workaround for a bug in BeOS R4 sed $shlibpath_var=\`\$echo \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\` export $shlibpath_var " fi # fixup the dll searchpath if we need to. if test -n "$dllsearchpath"; then $echo >> $output "\ # Add the dll search path components to the executable PATH PATH=$dllsearchpath:\$PATH " fi $echo >> $output "\ if test \"\$libtool_execute_magic\" != \"$magic\"; then # Run the actual program with our arguments. " case $host in # Backslashes separate directories on plain windows *-*-mingw | *-*-os2*) $echo >> $output "\ exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} " ;; *) $echo >> $output "\ exec \"\$progdir/\$program\" \${1+\"\$@\"} " ;; esac $echo >> $output "\ \$echo \"\$0: cannot exec \$program \${1+\"\$@\"}\" exit $EXIT_FAILURE fi else # The program doesn't exist. \$echo \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2 \$echo \"This script is just a wrapper for \$program.\" 1>&2 $echo \"See the $PACKAGE documentation for more information.\" 1>&2 exit $EXIT_FAILURE fi fi\ " chmod +x $output fi exit $EXIT_SUCCESS ;; esac # See if we need to build an old-fashioned archive. for oldlib in $oldlibs; do if test "$build_libtool_libs" = convenience; then oldobjs="$libobjs_save" addlibs="$convenience" build_libtool_libs=no else if test "$build_libtool_libs" = module; then oldobjs="$libobjs_save" build_libtool_libs=no else oldobjs="$old_deplibs $non_pic_objects" fi addlibs="$old_convenience" fi if test -n "$addlibs"; then gentop="$output_objdir/${outputname}x" generated="$generated $gentop" func_extract_archives $gentop $addlibs oldobjs="$oldobjs $func_extract_archives_result" fi # Do each command in the archive commands. if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then cmds=$old_archive_from_new_cmds else # POSIX demands no paths to be encoded in archives. We have # to avoid creating archives with duplicate basenames if we # might have to extract them afterwards, e.g., when creating a # static archive out of a convenience library, or when linking # the entirety of a libtool archive into another (currently # not supported by libtool). if (for obj in $oldobjs do $echo "X$obj" | $Xsed -e 's%^.*/%%' done | sort | sort -uc >/dev/null 2>&1); then : else $echo "copying selected object files to avoid basename conflicts..." if test -z "$gentop"; then gentop="$output_objdir/${outputname}x" generated="$generated $gentop" $show "${rm}r $gentop" $run ${rm}r "$gentop" $show "$mkdir $gentop" $run $mkdir "$gentop" status=$? if test "$status" -ne 0 && test ! -d "$gentop"; then exit $status fi fi save_oldobjs=$oldobjs oldobjs= counter=1 for obj in $save_oldobjs do objbase=`$echo "X$obj" | $Xsed -e 's%^.*/%%'` case " $oldobjs " in " ") oldobjs=$obj ;; *[\ /]"$objbase "*) while :; do # Make sure we don't pick an alternate name that also # overlaps. newobj=lt$counter-$objbase counter=`expr $counter + 1` case " $oldobjs " in *[\ /]"$newobj "*) ;; *) if test ! -f "$gentop/$newobj"; then break; fi ;; esac done $show "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj" $run ln "$obj" "$gentop/$newobj" || $run cp "$obj" "$gentop/$newobj" oldobjs="$oldobjs $gentop/$newobj" ;; *) oldobjs="$oldobjs $obj" ;; esac done fi eval cmds=\"$old_archive_cmds\" if len=`expr "X$cmds" : ".*"` && test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then cmds=$old_archive_cmds else # the command line is too long to link in one step, link in parts $echo "using piecewise archive linking..." save_RANLIB=$RANLIB RANLIB=: objlist= concat_cmds= save_oldobjs=$oldobjs # Is there a better way of finding the last object in the list? for obj in $save_oldobjs do last_oldobj=$obj done for obj in $save_oldobjs do oldobjs="$objlist $obj" objlist="$objlist $obj" eval test_cmds=\"$old_archive_cmds\" if len=`expr "X$test_cmds" : ".*" 2>/dev/null` && test "$len" -le "$max_cmd_len"; then : else # the above command should be used before it gets too long oldobjs=$objlist if test "$obj" = "$last_oldobj" ; then RANLIB=$save_RANLIB fi test -z "$concat_cmds" || concat_cmds=$concat_cmds~ eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\" objlist= fi done RANLIB=$save_RANLIB oldobjs=$objlist if test "X$oldobjs" = "X" ; then eval cmds=\"\$concat_cmds\" else eval cmds=\"\$concat_cmds~\$old_archive_cmds\" fi fi fi save_ifs="$IFS"; IFS='~' for cmd in $cmds; do eval cmd=\"$cmd\" IFS="$save_ifs" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" done if test -n "$generated"; then $show "${rm}r$generated" $run ${rm}r$generated fi # Now create the libtool archive. case $output in *.la) old_library= test "$build_old_libs" = yes && old_library="$libname.$libext" $show "creating $output" # Preserve any variables that may affect compiler behavior for var in $variables_saved_for_relink; do if eval test -z \"\${$var+set}\"; then relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command" elif eval var_value=\$$var; test -z "$var_value"; then relink_command="$var=; export $var; $relink_command" else var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"` relink_command="$var=\"$var_value\"; export $var; $relink_command" fi done # Quote the link command for shipping. relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"` if test "$hardcode_automatic" = yes ; then relink_command= fi # Only create the output if not a dry run. if test -z "$run"; then for installed in no yes; do if test "$installed" = yes; then if test -z "$install_libdir"; then break fi output="$output_objdir/$outputname"i # Replace all uninstalled libtool libraries with the installed ones newdependency_libs= for deplib in $dependency_libs; do case $deplib in *.la) name=`$echo "X$deplib" | $Xsed -e 's%^.*/%%'` eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` if test -z "$libdir"; then $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2 exit $EXIT_FAILURE fi newdependency_libs="$newdependency_libs $libdir/$name" ;; *) newdependency_libs="$newdependency_libs $deplib" ;; esac done dependency_libs="$newdependency_libs" newdlfiles= for lib in $dlfiles; do name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` if test -z "$libdir"; then $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 exit $EXIT_FAILURE fi newdlfiles="$newdlfiles $libdir/$name" done dlfiles="$newdlfiles" newdlprefiles= for lib in $dlprefiles; do name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` if test -z "$libdir"; then $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 exit $EXIT_FAILURE fi newdlprefiles="$newdlprefiles $libdir/$name" done dlprefiles="$newdlprefiles" else newdlfiles= for lib in $dlfiles; do case $lib in [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; *) abs=`pwd`"/$lib" ;; esac newdlfiles="$newdlfiles $abs" done dlfiles="$newdlfiles" newdlprefiles= for lib in $dlprefiles; do case $lib in [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; *) abs=`pwd`"/$lib" ;; esac newdlprefiles="$newdlprefiles $abs" done dlprefiles="$newdlprefiles" fi $rm $output # place dlname in correct position for cygwin tdlname=$dlname case $host,$output,$installed,$module,$dlname in *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;; esac $echo > $output "\ # $outputname - a libtool library file # Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP # # Please DO NOT delete this file! # It is necessary for linking the library. # The name that we can dlopen(3). dlname='$tdlname' # Names of this library. library_names='$library_names' # The name of the static archive. old_library='$old_library' # Libraries that this one depends upon. dependency_libs='$dependency_libs' # Version information for $libname. current=$current age=$age revision=$revision # Is this an already installed library? installed=$installed # Should we warn about portability when linking against -modules? shouldnotlink=$module # Files to dlopen/dlpreopen dlopen='$dlfiles' dlpreopen='$dlprefiles' # Directory that this library needs to be installed in: libdir='$install_libdir'" if test "$installed" = no && test "$need_relink" = yes; then $echo >> $output "\ relink_command=\"$relink_command\"" fi done fi # Do a symbolic link so that the libtool archive can be found in # LD_LIBRARY_PATH before the program is installed. $show "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)" $run eval '(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)' || exit $? ;; esac exit $EXIT_SUCCESS ;; # libtool install mode install) modename="$modename: install" # There may be an optional sh(1) argument at the beginning of # install_prog (especially on Windows NT). if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh || # Allow the use of GNU shtool's install command. $echo "X$nonopt" | grep shtool > /dev/null; then # Aesthetically quote it. arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"` case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac install_prog="$arg " arg="$1" shift else install_prog= arg=$nonopt fi # The real first argument should be the name of the installation program. # Aesthetically quote it. arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac install_prog="$install_prog$arg" # We need to accept at least all the BSD install flags. dest= files= opts= prev= install_type= isdir=no stripme= for arg do if test -n "$dest"; then files="$files $dest" dest=$arg continue fi case $arg in -d) isdir=yes ;; -f) case " $install_prog " in *[\\\ /]cp\ *) ;; *) prev=$arg ;; esac ;; -g | -m | -o) prev=$arg ;; -s) stripme=" -s" continue ;; -*) ;; *) # If the previous option needed an argument, then skip it. if test -n "$prev"; then prev= else dest=$arg continue fi ;; esac # Aesthetically quote the argument. arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac install_prog="$install_prog $arg" done if test -z "$install_prog"; then $echo "$modename: you must specify an install program" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi if test -n "$prev"; then $echo "$modename: the \`$prev' option requires an argument" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi if test -z "$files"; then if test -z "$dest"; then $echo "$modename: no file or destination specified" 1>&2 else $echo "$modename: you must specify a destination" 1>&2 fi $echo "$help" 1>&2 exit $EXIT_FAILURE fi # Strip any trailing slash from the destination. dest=`$echo "X$dest" | $Xsed -e 's%/$%%'` # Check to see that the destination is a directory. test -d "$dest" && isdir=yes if test "$isdir" = yes; then destdir="$dest" destname= else destdir=`$echo "X$dest" | $Xsed -e 's%/[^/]*$%%'` test "X$destdir" = "X$dest" && destdir=. destname=`$echo "X$dest" | $Xsed -e 's%^.*/%%'` # Not a directory, so check to see that there is only one file specified. set dummy $files if test "$#" -gt 2; then $echo "$modename: \`$dest' is not a directory" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi fi case $destdir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) for file in $files; do case $file in *.lo) ;; *) $echo "$modename: \`$destdir' must be an absolute directory name" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE ;; esac done ;; esac # This variable tells wrapper scripts just to set variables rather # than running their programs. libtool_install_magic="$magic" staticlibs= future_libdirs= current_libdirs= for file in $files; do # Do each installation. case $file in *.$libext) # Do the static libraries later. staticlibs="$staticlibs $file" ;; *.la) # Check to see that this really is a libtool archive. if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : else $echo "$modename: \`$file' is not a valid libtool archive" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi library_names= old_library= relink_command= # If there is no directory component, then add one. case $file in */* | *\\*) . $file ;; *) . ./$file ;; esac # Add the libdir to current_libdirs if it is the destination. if test "X$destdir" = "X$libdir"; then case "$current_libdirs " in *" $libdir "*) ;; *) current_libdirs="$current_libdirs $libdir" ;; esac else # Note the libdir as a future libdir. case "$future_libdirs " in *" $libdir "*) ;; *) future_libdirs="$future_libdirs $libdir" ;; esac fi dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`/ test "X$dir" = "X$file/" && dir= dir="$dir$objdir" if test -n "$relink_command"; then # Determine the prefix the user has applied to our future dir. inst_prefix_dir=`$echo "$destdir" | $SED "s%$libdir\$%%"` # Don't allow the user to place us outside of our expected # location b/c this prevents finding dependent libraries that # are installed to the same prefix. # At present, this check doesn't affect windows .dll's that # are installed into $libdir/../bin (currently, that works fine) # but it's something to keep an eye on. if test "$inst_prefix_dir" = "$destdir"; then $echo "$modename: error: cannot install \`$file' to a directory not ending in $libdir" 1>&2 exit $EXIT_FAILURE fi if test -n "$inst_prefix_dir"; then # Stick the inst_prefix_dir data into the link command. relink_command=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"` else relink_command=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%%"` fi $echo "$modename: warning: relinking \`$file'" 1>&2 $show "$relink_command" if $run eval "$relink_command"; then : else $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2 exit $EXIT_FAILURE fi fi # See the names of the shared library. set dummy $library_names if test -n "$2"; then realname="$2" shift shift srcname="$realname" test -n "$relink_command" && srcname="$realname"T # Install the shared library and build the symlinks. $show "$install_prog $dir/$srcname $destdir/$realname" $run eval "$install_prog $dir/$srcname $destdir/$realname" || exit $? if test -n "$stripme" && test -n "$striplib"; then $show "$striplib $destdir/$realname" $run eval "$striplib $destdir/$realname" || exit $? fi if test "$#" -gt 0; then # Delete the old symlinks, and create new ones. # Try `ln -sf' first, because the `ln' binary might depend on # the symlink we replace! Solaris /bin/ln does not understand -f, # so we also need to try rm && ln -s. for linkname do if test "$linkname" != "$realname"; then $show "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })" $run eval "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })" fi done fi # Do each command in the postinstall commands. lib="$destdir/$realname" cmds=$postinstall_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || { lt_exit=$? # Restore the uninstalled library and exit if test "$mode" = relink; then $run eval '(cd $output_objdir && $rm ${realname}T && $mv ${realname}U $realname)' fi exit $lt_exit } done IFS="$save_ifs" fi # Install the pseudo-library for information purposes. name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` instname="$dir/$name"i $show "$install_prog $instname $destdir/$name" $run eval "$install_prog $instname $destdir/$name" || exit $? # Maybe install the static library, too. test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library" ;; *.lo) # Install (i.e. copy) a libtool object. # Figure out destination file name, if it wasn't already specified. if test -n "$destname"; then destfile="$destdir/$destname" else destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'` destfile="$destdir/$destfile" fi # Deduce the name of the destination old-style object file. case $destfile in *.lo) staticdest=`$echo "X$destfile" | $Xsed -e "$lo2o"` ;; *.$objext) staticdest="$destfile" destfile= ;; *) $echo "$modename: cannot copy a libtool object to \`$destfile'" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE ;; esac # Install the libtool object if requested. if test -n "$destfile"; then $show "$install_prog $file $destfile" $run eval "$install_prog $file $destfile" || exit $? fi # Install the old object if enabled. if test "$build_old_libs" = yes; then # Deduce the name of the old-style object file. staticobj=`$echo "X$file" | $Xsed -e "$lo2o"` $show "$install_prog $staticobj $staticdest" $run eval "$install_prog \$staticobj \$staticdest" || exit $? fi exit $EXIT_SUCCESS ;; *) # Figure out destination file name, if it wasn't already specified. if test -n "$destname"; then destfile="$destdir/$destname" else destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'` destfile="$destdir/$destfile" fi # If the file is missing, and there is a .exe on the end, strip it # because it is most likely a libtool script we actually want to # install stripped_ext="" case $file in *.exe) if test ! -f "$file"; then file=`$echo $file|${SED} 's,.exe$,,'` stripped_ext=".exe" fi ;; esac # Do a test to see if this is really a libtool program. case $host in *cygwin*|*mingw*) wrapper=`$echo $file | ${SED} -e 's,.exe$,,'` ;; *) wrapper=$file ;; esac if (${SED} -e '4q' $wrapper | grep "^# Generated by .*$PACKAGE")>/dev/null 2>&1; then notinst_deplibs= relink_command= # Note that it is not necessary on cygwin/mingw to append a dot to # foo even if both foo and FILE.exe exist: automatic-append-.exe # behavior happens only for exec(3), not for open(2)! Also, sourcing # `FILE.' does not work on cygwin managed mounts. # # If there is no directory component, then add one. case $wrapper in */* | *\\*) . ${wrapper} ;; *) . ./${wrapper} ;; esac # Check the variables that should have been set. if test -z "$notinst_deplibs"; then $echo "$modename: invalid libtool wrapper script \`$wrapper'" 1>&2 exit $EXIT_FAILURE fi finalize=yes for lib in $notinst_deplibs; do # Check to see that each library is installed. libdir= if test -f "$lib"; then # If there is no directory component, then add one. case $lib in */* | *\\*) . $lib ;; *) . ./$lib ;; esac fi libfile="$libdir/"`$echo "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test if test -n "$libdir" && test ! -f "$libfile"; then $echo "$modename: warning: \`$lib' has not been installed in \`$libdir'" 1>&2 finalize=no fi done relink_command= # Note that it is not necessary on cygwin/mingw to append a dot to # foo even if both foo and FILE.exe exist: automatic-append-.exe # behavior happens only for exec(3), not for open(2)! Also, sourcing # `FILE.' does not work on cygwin managed mounts. # # If there is no directory component, then add one. case $wrapper in */* | *\\*) . ${wrapper} ;; *) . ./${wrapper} ;; esac outputname= if test "$fast_install" = no && test -n "$relink_command"; then if test "$finalize" = yes && test -z "$run"; then tmpdir="/tmp" test -n "$TMPDIR" && tmpdir="$TMPDIR" tmpdir="$tmpdir/libtool-$$" save_umask=`umask` umask 0077 if $mkdir "$tmpdir"; then umask $save_umask else umask $save_umask $echo "$modename: error: cannot create temporary directory \`$tmpdir'" 1>&2 continue fi file=`$echo "X$file$stripped_ext" | $Xsed -e 's%^.*/%%'` outputname="$tmpdir/$file" # Replace the output file specification. relink_command=`$echo "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'` $show "$relink_command" if $run eval "$relink_command"; then : else $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2 ${rm}r "$tmpdir" continue fi file="$outputname" else $echo "$modename: warning: cannot relink \`$file'" 1>&2 fi else # Install the binary that we compiled earlier. file=`$echo "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"` fi fi # remove .exe since cygwin /usr/bin/install will append another # one anyway case $install_prog,$host in */usr/bin/install*,*cygwin*) case $file:$destfile in *.exe:*.exe) # this is ok ;; *.exe:*) destfile=$destfile.exe ;; *:*.exe) destfile=`$echo $destfile | ${SED} -e 's,.exe$,,'` ;; esac ;; esac $show "$install_prog$stripme $file $destfile" $run eval "$install_prog\$stripme \$file \$destfile" || exit $? test -n "$outputname" && ${rm}r "$tmpdir" ;; esac done for file in $staticlibs; do name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` # Set up the ranlib parameters. oldlib="$destdir/$name" $show "$install_prog $file $oldlib" $run eval "$install_prog \$file \$oldlib" || exit $? if test -n "$stripme" && test -n "$old_striplib"; then $show "$old_striplib $oldlib" $run eval "$old_striplib $oldlib" || exit $? fi # Do each command in the postinstall commands. cmds=$old_postinstall_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" done if test -n "$future_libdirs"; then $echo "$modename: warning: remember to run \`$progname --finish$future_libdirs'" 1>&2 fi if test -n "$current_libdirs"; then # Maybe just do a dry run. test -n "$run" && current_libdirs=" -n$current_libdirs" exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs' else exit $EXIT_SUCCESS fi ;; # libtool finish mode finish) modename="$modename: finish" libdirs="$nonopt" admincmds= if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then for dir do libdirs="$libdirs $dir" done for libdir in $libdirs; do if test -n "$finish_cmds"; then # Do each command in the finish commands. cmds=$finish_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || admincmds="$admincmds $cmd" done IFS="$save_ifs" fi if test -n "$finish_eval"; then # Do the single finish_eval. eval cmds=\"$finish_eval\" $run eval "$cmds" || admincmds="$admincmds $cmds" fi done fi # Exit here if they wanted silent mode. test "$show" = : && exit $EXIT_SUCCESS $echo "----------------------------------------------------------------------" $echo "Libraries have been installed in:" for libdir in $libdirs; do $echo " $libdir" done $echo $echo "If you ever happen to want to link against installed libraries" $echo "in a given directory, LIBDIR, you must either use libtool, and" $echo "specify the full pathname of the library, or use the \`-LLIBDIR'" $echo "flag during linking and do at least one of the following:" if test -n "$shlibpath_var"; then $echo " - add LIBDIR to the \`$shlibpath_var' environment variable" $echo " during execution" fi if test -n "$runpath_var"; then $echo " - add LIBDIR to the \`$runpath_var' environment variable" $echo " during linking" fi if test -n "$hardcode_libdir_flag_spec"; then libdir=LIBDIR eval flag=\"$hardcode_libdir_flag_spec\" $echo " - use the \`$flag' linker flag" fi if test -n "$admincmds"; then $echo " - have your system administrator run these commands:$admincmds" fi if test -f /etc/ld.so.conf; then $echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'" fi $echo $echo "See any operating system documentation about shared libraries for" $echo "more information, such as the ld(1) and ld.so(8) manual pages." $echo "----------------------------------------------------------------------" exit $EXIT_SUCCESS ;; # libtool execute mode execute) modename="$modename: execute" # The first argument is the command name. cmd="$nonopt" if test -z "$cmd"; then $echo "$modename: you must specify a COMMAND" 1>&2 $echo "$help" exit $EXIT_FAILURE fi # Handle -dlopen flags immediately. for file in $execute_dlfiles; do if test ! -f "$file"; then $echo "$modename: \`$file' is not a file" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi dir= case $file in *.la) # Check to see that this really is a libtool archive. if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : else $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi # Read the libtool library. dlname= library_names= # If there is no directory component, then add one. case $file in */* | *\\*) . $file ;; *) . ./$file ;; esac # Skip this library if it cannot be dlopened. if test -z "$dlname"; then # Warn if it was a shared library. test -n "$library_names" && $echo "$modename: warning: \`$file' was not linked with \`-export-dynamic'" continue fi dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` test "X$dir" = "X$file" && dir=. if test -f "$dir/$objdir/$dlname"; then dir="$dir/$objdir" else $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2 exit $EXIT_FAILURE fi ;; *.lo) # Just add the directory containing the .lo file. dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` test "X$dir" = "X$file" && dir=. ;; *) $echo "$modename: warning \`-dlopen' is ignored for non-libtool libraries and objects" 1>&2 continue ;; esac # Get the absolute pathname. absdir=`cd "$dir" && pwd` test -n "$absdir" && dir="$absdir" # Now add the directory to shlibpath_var. if eval "test -z \"\$$shlibpath_var\""; then eval "$shlibpath_var=\"\$dir\"" else eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\"" fi done # This variable tells wrapper scripts just to set shlibpath_var # rather than running their programs. libtool_execute_magic="$magic" # Check if any of the arguments is a wrapper script. args= for file do case $file in -*) ;; *) # Do a test to see if this is really a libtool program. if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then # If there is no directory component, then add one. case $file in */* | *\\*) . $file ;; *) . ./$file ;; esac # Transform arg to wrapped name. file="$progdir/$program" fi ;; esac # Quote arguments (to preserve shell metacharacters). file=`$echo "X$file" | $Xsed -e "$sed_quote_subst"` args="$args \"$file\"" done if test -z "$run"; then if test -n "$shlibpath_var"; then # Export the shlibpath_var. eval "export $shlibpath_var" fi # Restore saved environment variables if test "${save_LC_ALL+set}" = set; then LC_ALL="$save_LC_ALL"; export LC_ALL fi if test "${save_LANG+set}" = set; then LANG="$save_LANG"; export LANG fi # Now prepare to actually exec the command. exec_cmd="\$cmd$args" else # Display what would be done. if test -n "$shlibpath_var"; then eval "\$echo \"\$shlibpath_var=\$$shlibpath_var\"" $echo "export $shlibpath_var" fi $echo "$cmd$args" exit $EXIT_SUCCESS fi ;; # libtool clean and uninstall mode clean | uninstall) modename="$modename: $mode" rm="$nonopt" files= rmforce= exit_status=0 # This variable tells wrapper scripts just to set variables rather # than running their programs. libtool_install_magic="$magic" for arg do case $arg in -f) rm="$rm $arg"; rmforce=yes ;; -*) rm="$rm $arg" ;; *) files="$files $arg" ;; esac done if test -z "$rm"; then $echo "$modename: you must specify an RM program" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi rmdirs= origobjdir="$objdir" for file in $files; do dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` if test "X$dir" = "X$file"; then dir=. objdir="$origobjdir" else objdir="$dir/$origobjdir" fi name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` test "$mode" = uninstall && objdir="$dir" # Remember objdir for removal later, being careful to avoid duplicates if test "$mode" = clean; then case " $rmdirs " in *" $objdir "*) ;; *) rmdirs="$rmdirs $objdir" ;; esac fi # Don't error if the file doesn't exist and rm -f was used. if (test -L "$file") >/dev/null 2>&1 \ || (test -h "$file") >/dev/null 2>&1 \ || test -f "$file"; then : elif test -d "$file"; then exit_status=1 continue elif test "$rmforce" = yes; then continue fi rmfiles="$file" case $name in *.la) # Possibly a libtool archive, so verify it. if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then . $dir/$name # Delete the libtool libraries and symlinks. for n in $library_names; do rmfiles="$rmfiles $objdir/$n" done test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library" test "$mode" = clean && rmfiles="$rmfiles $objdir/$name $objdir/${name}i" if test "$mode" = uninstall; then if test -n "$library_names"; then # Do each command in the postuninstall commands. cmds=$postuninstall_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" if test "$?" -ne 0 && test "$rmforce" != yes; then exit_status=1 fi done IFS="$save_ifs" fi if test -n "$old_library"; then # Do each command in the old_postuninstall commands. cmds=$old_postuninstall_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" if test "$?" -ne 0 && test "$rmforce" != yes; then exit_status=1 fi done IFS="$save_ifs" fi # FIXME: should reinstall the best remaining shared library. fi fi ;; *.lo) # Possibly a libtool object, so verify it. if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then # Read the .lo file . $dir/$name # Add PIC object to the list of files to remove. if test -n "$pic_object" \ && test "$pic_object" != none; then rmfiles="$rmfiles $dir/$pic_object" fi # Add non-PIC object to the list of files to remove. if test -n "$non_pic_object" \ && test "$non_pic_object" != none; then rmfiles="$rmfiles $dir/$non_pic_object" fi fi ;; *) if test "$mode" = clean ; then noexename=$name case $file in *.exe) file=`$echo $file|${SED} 's,.exe$,,'` noexename=`$echo $name|${SED} 's,.exe$,,'` # $file with .exe has already been added to rmfiles, # add $file without .exe rmfiles="$rmfiles $file" ;; esac # Do a test to see if this is a libtool program. if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then relink_command= . $dir/$noexename # note $name still contains .exe if it was in $file originally # as does the version of $file that was added into $rmfiles rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}" if test "$fast_install" = yes && test -n "$relink_command"; then rmfiles="$rmfiles $objdir/lt-$name" fi if test "X$noexename" != "X$name" ; then rmfiles="$rmfiles $objdir/lt-${noexename}.c" fi fi fi ;; esac $show "$rm $rmfiles" $run $rm $rmfiles || exit_status=1 done objdir="$origobjdir" # Try to remove the ${objdir}s in the directories where we deleted files for dir in $rmdirs; do if test -d "$dir"; then $show "rmdir $dir" $run rmdir $dir >/dev/null 2>&1 fi done exit $exit_status ;; "") $echo "$modename: you must specify a MODE" 1>&2 $echo "$generic_help" 1>&2 exit $EXIT_FAILURE ;; esac if test -z "$exec_cmd"; then $echo "$modename: invalid operation mode \`$mode'" 1>&2 $echo "$generic_help" 1>&2 exit $EXIT_FAILURE fi fi # test -z "$show_help" if test -n "$exec_cmd"; then eval exec $exec_cmd exit $EXIT_FAILURE fi # We need to display help for each of the modes. case $mode in "") $echo \ "Usage: $modename [OPTION]... [MODE-ARG]... Provide generalized library-building support services. --config show all configuration variables --debug enable verbose shell tracing -n, --dry-run display commands without modifying any files --features display basic configuration information and exit --finish same as \`--mode=finish' --help display this help message and exit --mode=MODE use operation mode MODE [default=inferred from MODE-ARGS] --quiet same as \`--silent' --silent don't print informational messages --tag=TAG use configuration variables from tag TAG --version print version information MODE must be one of the following: clean remove files from the build directory compile compile a source file into a libtool object execute automatically set library path, then run a program finish complete the installation of libtool libraries install install libraries or executables link create a library or an executable uninstall remove libraries from an installed directory MODE-ARGS vary depending on the MODE. Try \`$modename --help --mode=MODE' for a more detailed description of MODE. Report bugs to ." exit $EXIT_SUCCESS ;; clean) $echo \ "Usage: $modename [OPTION]... --mode=clean RM [RM-OPTION]... FILE... Remove files from the build directory. RM is the name of the program to use to delete files associated with each FILE (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed to RM. If FILE is a libtool library, object or program, all the files associated with it are deleted. Otherwise, only FILE itself is deleted using RM." ;; compile) $echo \ "Usage: $modename [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE Compile a source file into a libtool library object. This mode accepts the following additional options: -o OUTPUT-FILE set the output file name to OUTPUT-FILE -prefer-pic try to building PIC objects only -prefer-non-pic try to building non-PIC objects only -static always build a \`.o' file suitable for static linking COMPILE-COMMAND is a command to be used in creating a \`standard' object file from the given SOURCEFILE. The output file name is determined by removing the directory component from SOURCEFILE, then substituting the C source code suffix \`.c' with the library object suffix, \`.lo'." ;; execute) $echo \ "Usage: $modename [OPTION]... --mode=execute COMMAND [ARGS]... Automatically set library path, then run a program. This mode accepts the following additional options: -dlopen FILE add the directory containing FILE to the library path This mode sets the library path environment variable according to \`-dlopen' flags. If any of the ARGS are libtool executable wrappers, then they are translated into their corresponding uninstalled binary, and any of their required library directories are added to the library path. Then, COMMAND is executed, with ARGS as arguments." ;; finish) $echo \ "Usage: $modename [OPTION]... --mode=finish [LIBDIR]... Complete the installation of libtool libraries. Each LIBDIR is a directory that contains libtool libraries. The commands that this mode executes may require superuser privileges. Use the \`--dry-run' option if you just want to see what would be executed." ;; install) $echo \ "Usage: $modename [OPTION]... --mode=install INSTALL-COMMAND... Install executables or libraries. INSTALL-COMMAND is the installation command. The first component should be either the \`install' or \`cp' program. The rest of the components are interpreted as arguments to that command (only BSD-compatible install options are recognized)." ;; link) $echo \ "Usage: $modename [OPTION]... --mode=link LINK-COMMAND... Link object files or libraries together to form another library, or to create an executable program. LINK-COMMAND is a command using the C compiler that you would use to create a program from several object files. The following components of LINK-COMMAND are treated specially: -all-static do not do any dynamic linking at all -avoid-version do not add a version suffix if possible -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) -export-symbols SYMFILE try to export only the symbols listed in SYMFILE -export-symbols-regex REGEX try to export only the symbols matching REGEX -LLIBDIR search LIBDIR for required installed libraries -lNAME OUTPUT-FILE requires the installed library libNAME -module build a library that can dlopened -no-fast-install disable the fast-install mode -no-install link a not-installable executable -no-undefined declare that a library does not refer to external symbols -o OUTPUT-FILE create OUTPUT-FILE from the specified objects -objectlist FILE Use a list of object files found in FILE to specify objects -precious-files-regex REGEX don't remove output files matching REGEX -release RELEASE specify package release information -rpath LIBDIR the created library will eventually be installed in LIBDIR -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries -static do not do any dynamic linking of libtool libraries -version-info CURRENT[:REVISION[:AGE]] specify library version info [each variable defaults to 0] All other options (arguments beginning with \`-') are ignored. Every other argument is treated as a filename. Files ending in \`.la' are treated as uninstalled libtool libraries, other files are standard or library object files. If the OUTPUT-FILE ends in \`.la', then a libtool library is created, only library objects (\`.lo' files) may be specified, and \`-rpath' is required, except when creating a convenience library. If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created using \`ar' and \`ranlib', or on Windows using \`lib'. If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file is created, otherwise an executable program is created." ;; uninstall) $echo \ "Usage: $modename [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE... Remove libraries from an installation directory. RM is the name of the program to use to delete files associated with each FILE (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed to RM. If FILE is a libtool library, all the files associated with it are deleted. Otherwise, only FILE itself is deleted using RM." ;; *) $echo "$modename: invalid operation mode \`$mode'" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE ;; esac $echo $echo "Try \`$modename --help' for more information about other modes." exit $? # The TAGs below are defined such that we never get into a situation # in which we disable both kinds of libraries. Given conflicting # choices, we go for a static library, that is the most portable, # since we can't tell whether shared libraries were disabled because # the user asked for that or because the platform doesn't support # them. This is particularly important on AIX, because we don't # support having both static and shared libraries enabled at the same # time on that platform, so we default to a shared-only configuration. # If a disable-shared tag is given, we'll fallback to a static-only # configuration. But we'll never go from static-only to shared-only. # ### BEGIN LIBTOOL TAG CONFIG: disable-shared build_libtool_libs=no build_old_libs=yes # ### END LIBTOOL TAG CONFIG: disable-shared # ### BEGIN LIBTOOL TAG CONFIG: disable-static build_old_libs=`case $build_libtool_libs in yes) $echo no;; *) $echo yes;; esac` # ### END LIBTOOL TAG CONFIG: disable-static # Local Variables: # mode:shell-script # sh-indentation:2 # End: zapping-0.10cvs6/THANKS 644 764 144 3503 10432663167 7731 Thanks are due to the following people for helping with the program (in chronological order): - Christian Marillat: French translation, Debian maintainer, man pages. - Edgar Toerning: AleVT, permission to use a derivative (libvbi) into Z. - Michael Schimek: mp1e, libvbi, de.po, miriad of other things. - Sergey Nikulin: Russian translation and cyrillic TTX glyphs. - Eugene Crosser: Russian freq table. - Jeremy Maccelari: South African freq table. - Magnus Sandin: Patch for keeping the input and the standard when changing capture modes. - Tim Powers: Patches to make it build and work under RH7 (for Fisher), fixes for the .spec.in file. - Marco Pfattner: LIRC plugin. - Carsten Menke: German translation of the main help file. - Christian Riedel: RH7 RPM. - Eduardo Díaz Comellas: Debian package. - James Green: Many useful comments and tips. - Michael Hunold: Lots of help with bug tracking and many suggestions for improving the program. - Sjoerd Simons: ALIRC plugin. - Roger Fujii: Fixes to build and work under Solaris. - Paweł Sakowski: Polish translation. - Henrik Isacsson: Swedish translation. - Mark Cooke: Lots of help with RPM build process under RH. - Ime Smits: Dutch translation. - Reinout van Schouwen: Dutch translation. - Sandino Flores Moreno: Creative WebCam (ov511) button flag polling in screenshot plugin. - David Fries: NFS related zapping_setup_fb patch. - Guus Bonnema: Dutch translation. - Pino Toscano: Italian translation. - Artur Flinta: Poland Autocom cable frequency table. - Morten Brix Pedersen: Danish translation. - Arkadiusz Lipiec: Polish translation. - Slobodan Tomic: VDR interface. - Pavel Mlcoch: Czech translation. - Hiroshi Hasebe: Japanese translation. And, of course, thanks to the people that sent bug reports and suggestions. Local Variables: coding: utf-8 End: zapping-0.10cvs6/configure 755 764 144 3547353 10442575352 11027 #! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.59 for zapping 0.10cvs6. # # Report bugs to . # # Copyright (C) 2003 Free Software Foundation, Inc. # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## # Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then set -o posix fi DUALCASE=1; export DUALCASE # for MKS sh # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then as_unset=unset else as_unset=false fi # Work around bugs in pre-3.0 UWIN ksh. $as_unset ENV MAIL MAILPATH PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. for as_var in \ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ LC_TELEPHONE LC_TIME do if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else $as_unset $as_var fi done # Required to use basename. if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi # Name of the executable. as_me=`$as_basename "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)$' \| \ . : '\(.\)' 2>/dev/null || echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } /^X\/\(\/\/\)$/{ s//\1/; q; } /^X\/\(\/\).*/{ s//\1/; q; } s/.*/./; q'` # PATH needs CR, and LINENO needs CR and PATH. # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then echo "#! /bin/sh" >conf$$.sh echo "exit 0" >>conf$$.sh chmod +x conf$$.sh if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then PATH_SEPARATOR=';' else PATH_SEPARATOR=: fi rm -f conf$$.sh fi as_lineno_1=$LINENO as_lineno_2=$LINENO as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && test "x$as_lineno_3" = "x$as_lineno_2" || { # Find who we are. Look in the path if we contain no path at all # relative or not. case $0 in *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2 { (exit 1); exit 1; }; } fi case $CONFIG_SHELL in '') as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for as_base in sh bash ksh sh5; do case $as_dir in /*) if ("$as_dir/$as_base" -c ' as_lineno_1=$LINENO as_lineno_2=$LINENO as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } CONFIG_SHELL=$as_dir/$as_base export CONFIG_SHELL exec "$CONFIG_SHELL" "$0" ${1+"$@"} fi;; esac done done ;; esac # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a # line-number line before each line; the second 'sed' does the real # work. The second script uses 'N' to pair each line-number line # with the numbered line, and appends trailing '-' during # substitution so that $LINENO is not a special case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) sed '=' <$as_myself | sed ' N s,$,-, : loop s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, t loop s,-$,, s,^['$as_cr_digits']*\n,, ' >$as_me.lineno && chmod +x $as_me.lineno || { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensible to this). . ./$as_me.lineno # Exit status is that of the last command. exit } case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in *c*,-n*) ECHO_N= ECHO_C=' ' ECHO_T=' ' ;; *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; *) ECHO_N= ECHO_C='\c' ECHO_T= ;; esac if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file echo >conf$$.file if ln -s conf$$.file conf$$ 2>/dev/null; then # We could just check for DJGPP; but this test a) works b) is more generic # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). if test -f conf$$.exe; then # Don't use ln at all; we don't have any links as_ln_s='cp -p' else as_ln_s='ln -s' fi elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.file if mkdir -p . 2>/dev/null; then as_mkdir_p=: else test -d ./-p && rmdir ./-p as_mkdir_p=false fi as_executable_p="test -f" # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" # IFS # We need space, tab and new line, in precisely that order. as_nl=' ' IFS=" $as_nl" # CDPATH. $as_unset CDPATH # Check that we are running under the correct shell. SHELL=${CONFIG_SHELL-/bin/sh} case X$ECHO in X*--fallback-echo) # Remove one level of quotation (which was required for Make). ECHO=`echo "$ECHO" | sed 's,\\\\\$\\$0,'$0','` ;; esac echo=${ECHO-echo} if test "X$1" = X--no-reexec; then # Discard the --no-reexec flag, and continue. shift elif test "X$1" = X--fallback-echo; then # Avoid inline document here, it may be left over : elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then # Yippee, $echo works! : else # Restart under the correct shell. exec $SHELL "$0" --no-reexec ${1+"$@"} fi if test "X$1" = X--fallback-echo; then # used as fallback echo shift cat </dev/null 2>&1 && unset CDPATH if test -z "$ECHO"; then if test "X${echo_test_string+set}" != Xset; then # find a string as large as possible, as long as the shell can cope with it for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... if (echo_test_string=`eval $cmd`) 2>/dev/null && echo_test_string=`eval $cmd` && (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null then break fi done fi if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then : else # The Solaris, AIX, and Digital Unix default echo programs unquote # backslashes. This makes it impossible to quote backslashes using # echo "$something" | sed 's/\\/\\\\/g' # # So, first we look for a working echo in the user's PATH. lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for dir in $PATH /usr/ucb; do IFS="$lt_save_ifs" if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then echo="$dir/echo" break fi done IFS="$lt_save_ifs" if test "X$echo" = Xecho; then # We didn't find a better echo, so look for alternatives. if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then # This shell has a builtin print -r that does the trick. echo='print -r' elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && test "X$CONFIG_SHELL" != X/bin/ksh; then # If we have ksh, try running configure again with it. ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} export ORIGINAL_CONFIG_SHELL CONFIG_SHELL=/bin/ksh export CONFIG_SHELL exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"} else # Try using printf. echo='printf %s\n' if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then # Cool, printf works : elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && test "X$echo_testing_string" = 'X\t' && echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL export CONFIG_SHELL SHELL="$CONFIG_SHELL" export SHELL echo="$CONFIG_SHELL $0 --fallback-echo" elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && test "X$echo_testing_string" = 'X\t' && echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then echo="$CONFIG_SHELL $0 --fallback-echo" else # maybe with a smaller string... prev=: for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null then break fi prev="$cmd" done if test "$prev" != 'sed 50q "$0"'; then echo_test_string=`eval $prev` export echo_test_string exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"} else # Oops. We lost completely, so just stick with echo. echo=echo fi fi fi fi fi fi # Copy echo and quote the copy suitably for passing to libtool from # the Makefile, instead of quoting the original, which is used later. ECHO=$echo if test "X$ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo" fi tagnames=${tagnames+${tagnames},}CXX tagnames=${tagnames+${tagnames},}F77 # Name of the host. # hostname on some systems (SVR3.2, Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` exec 6>&1 # # Initializations. # ac_default_prefix=/usr/local ac_config_libobj_dir=. cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= SHELL=${CONFIG_SHELL-/bin/sh} # Maximum number of lines to put in a shell here document. # This variable seems obsolete. It should probably be removed, and # only ac_max_sed_lines should be used. : ${ac_max_here_lines=38} # Identity of this package. PACKAGE_NAME='zapping' PACKAGE_TARNAME='zapping' PACKAGE_VERSION='0.10cvs6' PACKAGE_STRING='zapping 0.10cvs6' PACKAGE_BUGREPORT='http://sourceforge.net/tracker/?atid=102599&group_id=2599&func=browse' ac_unique_file="configure.in" # Factoring default headers for most tests. ac_includes_default="\ #include #if HAVE_SYS_TYPES_H # include #endif #if HAVE_SYS_STAT_H # include #endif #if STDC_HEADERS # include # include #else # if HAVE_STDLIB_H # include # endif #endif #if HAVE_STRING_H # if !STDC_HEADERS && HAVE_MEMORY_H # include # endif # include #endif #if HAVE_STRINGS_H # include #endif #if HAVE_INTTYPES_H # include #else # if HAVE_STDINT_H # include # endif #endif #if HAVE_UNISTD_H # include #endif" ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE CPP EGREP CCAS CCASFLAGS build build_cpu build_vendor build_os host host_cpu host_vendor host_os LN_S ECHO AR ac_ct_AR RANLIB ac_ct_RANLIB CXX CXXFLAGS ac_ct_CXX CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL INTLTOOL_DESKTOP_RULE INTLTOOL_DIRECTORY_RULE INTLTOOL_KEYS_RULE INTLTOOL_PROP_RULE INTLTOOL_OAF_RULE INTLTOOL_PONG_RULE INTLTOOL_SERVER_RULE INTLTOOL_SHEET_RULE INTLTOOL_SOUNDLIST_RULE INTLTOOL_UI_RULE INTLTOOL_XAM_RULE INTLTOOL_KBD_RULE INTLTOOL_XML_RULE INTLTOOL_XML_NOMERGE_RULE INTLTOOL_CAVES_RULE INTLTOOL_SCHEMAS_RULE INTLTOOL_THEME_RULE INTLTOOL_EXTRACT INTLTOOL_MERGE INTLTOOL_UPDATE INTLTOOL_PERL INTLTOOL_ICONV INTLTOOL_MSGFMT INTLTOOL_MSGMERGE INTLTOOL_XGETTEXT HAVE_X86_TRUE HAVE_X86_FALSE CAN_COMPILE_MMX_TRUE CAN_COMPILE_MMX_FALSE CAN_COMPILE_3DNOW_TRUE CAN_COMPILE_3DNOW_FALSE CAN_COMPILE_SSE_TRUE CAN_COMPILE_SSE_FALSE CAN_COMPILE_SSE2_TRUE CAN_COMPILE_SSE2_FALSE CAN_COMPILE_SSE3_TRUE CAN_COMPILE_SSE3_FALSE CAN_COMPILE_ALTIVEC_TRUE CAN_COMPILE_ALTIVEC_FALSE HAVE_GCC_LIMITS_TRUE HAVE_GCC_LIMITS_FALSE PG_CFLAGS BUILD_DEINTERLACE_PLUGIN_TRUE BUILD_DEINTERLACE_PLUGIN_FALSE CONSOLEHELPER_LOCATION NEED_ZSFB_TRUE NEED_ZSFB_FALSE SUID_ZSFB_TRUE SUID_ZSFB_FALSE ZSFB_OWNER ZSFB_GROUP ESD_LIBS ARTS_CFLAGS ARTS_LIBS X_CFLAGS X_PRE_LIBS X_LIBS X_EXTRA_LIBS X_DPMS_LIBS X_XF86DGA_LIBS X_XF86VMODE_LIBS X_XV_LIBS X_XINERAMA_LIBS X_XMU_LIBS HAVE_XMU_TRUE HAVE_XMU_FALSE WARN_CFLAGS GCONF_SCHEMA_CONFIG_SOURCE GCONF_SCHEMA_FILE_DIR GCONF_SCHEMAS_INSTALL_TRUE GCONF_SCHEMAS_INSTALL_FALSE PKG_CONFIG ac_pt_PKG_CONFIG PACKAGE_CFLAGS PACKAGE_LIBS GDK_PIXBUF_CSOURCE GLIB_GENMARSHAL ZVBI_CFLAGS ZVBI_LIBS HAVE_LIBZVBI_TRUE HAVE_LIBZVBI_FALSE UNICODE_CFLAGS UNICODE_LIBS JPEG_LIB PNG_LIBS RTE_LIBS LIRC_LIB python_val PY_LIBS PY_LIB_LOC PY_CFLAGS PY_EXTRA_LIBS PYTHON_LIBS LIBXML_CFLAGS LIBXML_LIBS GETTEXT_PACKAGE USE_NLS MSGFMT GMSGFMT XGETTEXT CATALOGS CATOBJEXT DATADIRNAME GMOFILES INSTOBJEXT INTLLIBS PO_IN_DATADIR_TRUE PO_IN_DATADIR_FALSE POFILES POSUB MKINSTALLDIRS SCROLLKEEPER_BUILD_REQUIRED SCROLLKEEPER_CONFIG XSLTPROC XML_CATALOG_FILE XMLCATALOG BUILD_MAN_TRUE BUILD_MAN_FALSE DEFAULT_CFLAGS PACKAGE_PIXMAPS_DIR PACKAGE_LIB_DIR PLUGIN_DEFAULT_DIR PLUGIN_DEFAULT_FLAGS COMMON_INCLUDES PACKAGE_VERSION_ID LIBOBJS LTLIBOBJS' ac_subst_files='' # Initialize some variables set by options. ac_init_help= ac_init_version=false # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE # Installation directory options. # These are left unexpanded so users can "make install exec_prefix=/foo" # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datadir='${prefix}/share' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' libdir='${exec_prefix}/lib' includedir='${prefix}/include' oldincludedir='/usr/include' infodir='${prefix}/info' mandir='${prefix}/man' ac_prev= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval "$ac_prev=\$ac_option" ac_prev= continue fi ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'` # Accept the important Cygnus configure options, so we can diagnose typos. case $ac_option in -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file=$ac_optarg ;; --config-cache | -C) cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad | --data | --dat | --da) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ | --da=*) datadir=$ac_optarg ;; -disable-* | --disable-*) ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } ac_feature=`echo $ac_feature | sed 's/-/_/g'` eval "enable_$ac_feature=no" ;; -enable-* | --enable-*) ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } ac_feature=`echo $ac_feature | sed 's/-/_/g'` case $ac_option in *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; *) ac_optarg=yes ;; esac eval "enable_$ac_feature='$ac_optarg'" ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst \ | --locals | --local | --loca | --loc | --lo) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* \ | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } ac_package=`echo $ac_package| sed 's/-/_/g'` case $ac_option in *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; *) ac_optarg=yes ;; esac eval "with_$ac_package='$ac_optarg'" ;; -without-* | --without-*) ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } ac_package=`echo $ac_package | sed 's/-/_/g'` eval "with_$ac_package=no" ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; -*) { echo "$as_me: error: unrecognized option: $ac_option Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; } ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 { (exit 1); exit 1; }; } ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` eval "$ac_envvar='$ac_optarg'" export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} ;; esac done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` { echo "$as_me: error: missing argument to $ac_option" >&2 { (exit 1); exit 1; }; } fi # Be sure to have absolute paths. for ac_var in exec_prefix prefix do eval ac_val=$`echo $ac_var` case $ac_val in [\\/$]* | ?:[\\/]* | NONE | '' ) ;; *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 { (exit 1); exit 1; }; };; esac done # Be sure to have absolute paths. for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \ localstatedir libdir includedir oldincludedir infodir mandir do eval ac_val=$`echo $ac_var` case $ac_val in [\\/$]* | ?:[\\/]* ) ;; *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 { (exit 1); exit 1; }; };; esac done # There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias # FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. If a cross compiler is detected then cross compile mode will be used." >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi fi ac_tool_prefix= test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then its parent. ac_confdir=`(dirname "$0") 2>/dev/null || $as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$0" : 'X\(//\)[^/]' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$0" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` srcdir=$ac_confdir if test ! -r $srcdir/$ac_unique_file; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r $srcdir/$ac_unique_file; then if test "$ac_srcdir_defaulted" = yes; then { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2 { (exit 1); exit 1; }; } else { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 { (exit 1); exit 1; }; } fi fi (cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null || { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2 { (exit 1); exit 1; }; } srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'` ac_env_build_alias_set=${build_alias+set} ac_env_build_alias_value=$build_alias ac_cv_env_build_alias_set=${build_alias+set} ac_cv_env_build_alias_value=$build_alias ac_env_host_alias_set=${host_alias+set} ac_env_host_alias_value=$host_alias ac_cv_env_host_alias_set=${host_alias+set} ac_cv_env_host_alias_value=$host_alias ac_env_target_alias_set=${target_alias+set} ac_env_target_alias_value=$target_alias ac_cv_env_target_alias_set=${target_alias+set} ac_cv_env_target_alias_value=$target_alias ac_env_CC_set=${CC+set} ac_env_CC_value=$CC ac_cv_env_CC_set=${CC+set} ac_cv_env_CC_value=$CC ac_env_CFLAGS_set=${CFLAGS+set} ac_env_CFLAGS_value=$CFLAGS ac_cv_env_CFLAGS_set=${CFLAGS+set} ac_cv_env_CFLAGS_value=$CFLAGS ac_env_LDFLAGS_set=${LDFLAGS+set} ac_env_LDFLAGS_value=$LDFLAGS ac_cv_env_LDFLAGS_set=${LDFLAGS+set} ac_cv_env_LDFLAGS_value=$LDFLAGS ac_env_CPPFLAGS_set=${CPPFLAGS+set} ac_env_CPPFLAGS_value=$CPPFLAGS ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set} ac_cv_env_CPPFLAGS_value=$CPPFLAGS ac_env_CPP_set=${CPP+set} ac_env_CPP_value=$CPP ac_cv_env_CPP_set=${CPP+set} ac_cv_env_CPP_value=$CPP ac_env_CCAS_set=${CCAS+set} ac_env_CCAS_value=$CCAS ac_cv_env_CCAS_set=${CCAS+set} ac_cv_env_CCAS_value=$CCAS ac_env_CCASFLAGS_set=${CCASFLAGS+set} ac_env_CCASFLAGS_value=$CCASFLAGS ac_cv_env_CCASFLAGS_set=${CCASFLAGS+set} ac_cv_env_CCASFLAGS_value=$CCASFLAGS ac_env_CXX_set=${CXX+set} ac_env_CXX_value=$CXX ac_cv_env_CXX_set=${CXX+set} ac_cv_env_CXX_value=$CXX ac_env_CXXFLAGS_set=${CXXFLAGS+set} ac_env_CXXFLAGS_value=$CXXFLAGS ac_cv_env_CXXFLAGS_set=${CXXFLAGS+set} ac_cv_env_CXXFLAGS_value=$CXXFLAGS ac_env_CXXCPP_set=${CXXCPP+set} ac_env_CXXCPP_value=$CXXCPP ac_cv_env_CXXCPP_set=${CXXCPP+set} ac_cv_env_CXXCPP_value=$CXXCPP ac_env_F77_set=${F77+set} ac_env_F77_value=$F77 ac_cv_env_F77_set=${F77+set} ac_cv_env_F77_value=$F77 ac_env_FFLAGS_set=${FFLAGS+set} ac_env_FFLAGS_value=$FFLAGS ac_cv_env_FFLAGS_set=${FFLAGS+set} ac_cv_env_FFLAGS_value=$FFLAGS ac_env_PKG_CONFIG_set=${PKG_CONFIG+set} ac_env_PKG_CONFIG_value=$PKG_CONFIG ac_cv_env_PKG_CONFIG_set=${PKG_CONFIG+set} ac_cv_env_PKG_CONFIG_value=$PKG_CONFIG ac_env_PACKAGE_CFLAGS_set=${PACKAGE_CFLAGS+set} ac_env_PACKAGE_CFLAGS_value=$PACKAGE_CFLAGS ac_cv_env_PACKAGE_CFLAGS_set=${PACKAGE_CFLAGS+set} ac_cv_env_PACKAGE_CFLAGS_value=$PACKAGE_CFLAGS ac_env_PACKAGE_LIBS_set=${PACKAGE_LIBS+set} ac_env_PACKAGE_LIBS_value=$PACKAGE_LIBS ac_cv_env_PACKAGE_LIBS_set=${PACKAGE_LIBS+set} ac_cv_env_PACKAGE_LIBS_value=$PACKAGE_LIBS ac_env_ZVBI_CFLAGS_set=${ZVBI_CFLAGS+set} ac_env_ZVBI_CFLAGS_value=$ZVBI_CFLAGS ac_cv_env_ZVBI_CFLAGS_set=${ZVBI_CFLAGS+set} ac_cv_env_ZVBI_CFLAGS_value=$ZVBI_CFLAGS ac_env_ZVBI_LIBS_set=${ZVBI_LIBS+set} ac_env_ZVBI_LIBS_value=$ZVBI_LIBS ac_cv_env_ZVBI_LIBS_set=${ZVBI_LIBS+set} ac_cv_env_ZVBI_LIBS_value=$ZVBI_LIBS # # Report the --help message. # if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF \`configure' configures zapping 0.10cvs6 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit -q, --quiet, --silent do not print \`checking...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] _ACEOF cat <<_ACEOF Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify an installation prefix other than \`$ac_default_prefix' using \`--prefix', for instance \`--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] --datadir=DIR read-only architecture-independent data [PREFIX/share] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] --infodir=DIR info documentation [PREFIX/info] --mandir=DIR man documentation [PREFIX/man] _ACEOF cat <<\_ACEOF Program names: --program-prefix=PREFIX prepend PREFIX to installed program names --program-suffix=SUFFIX append SUFFIX to installed program names --program-transform-name=PROGRAM run sed PROGRAM on installed program names X features: --x-includes=DIR X include files are in DIR --x-libraries=DIR X library files are in DIR System types: --build=BUILD configure for building on BUILD [guessed] --host=HOST cross-compile to build programs to run on HOST [BUILD] _ACEOF fi if test -n "$ac_init_help"; then case $ac_init_help in short | recursive ) echo "Configuration of zapping 0.10cvs6:";; esac cat <<\_ACEOF Optional Features: --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --enable-maintainer-mode enable make rules and dependencies not useful (and sometimes confusing) to the casual installer --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors --enable-static[=PKGS] build static libraries [default=no] --enable-shared[=PKGS] build shared libraries [default=yes] --enable-fast-install[=PKGS] optimize for fast installation [default=yes] --disable-libtool-lock avoid locking (might break parallel builds) --enable-v4l Include V4L and V4L2 driver interfaces (auto) --enable-bktr Include Bktr/Meteor driver interfaces (auto) --enable-pam Enable PAM support --enable-compile-warnings=no/minimum/yes/maximum/error Turn on compiler warnings. --enable-iso-c Try to warn if code is not ISO C --disable-schemas-install Disable the schemas installation --enable-rebuild-man Rebuild manual pages (auto). Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-gnu-ld assume the C compiler uses GNU ld [default=no] --with-pic try to use only PIC/non-PIC objects [default=use both] --with-tags[=TAGS] include additional configurations [automatic] --with-x use the X Window System --with-dpms-ext Include support for the DPMS extension (yes). --with-xf86dga-ext Include support for the DGA extension (yes). --with-xf86vmode-ext Include support for the VidMode extension (yes). --with-xv-ext Include support for the XVideo extension (yes). --with-xinerama-ext Include support for the Xinerama extension (yes). --with-zapping-remote Build the zapping_remote tool (yes). --with-gconf-source=sourceaddress Config database for installing schema files. --with-gconf-schema-file-dir=dir Directory for installing schema files. --with-zvbi Use libzvbi (yes). --with-xml-catalog=CATALOG path to xml catalog to use Some influential environment variables: CC C compiler command CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory CPPFLAGS C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory CPP C preprocessor CCAS assembler compiler command (defaults to CC) CCASFLAGS assembler compiler flags (defaults to CFLAGS) CXX C++ compiler command CXXFLAGS C++ compiler flags CXXCPP C++ preprocessor F77 Fortran 77 compiler command FFLAGS Fortran 77 compiler flags PKG_CONFIG path to pkg-config utility PACKAGE_CFLAGS C compiler flags for PACKAGE, overriding pkg-config PACKAGE_LIBS linker flags for PACKAGE, overriding pkg-config ZVBI_CFLAGS C compiler flags for ZVBI, overriding pkg-config ZVBI_LIBS linker flags for ZVBI, overriding pkg-config Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. Report bugs to . _ACEOF fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. ac_popdir=`pwd` for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d $ac_dir || continue ac_builddir=. if test "$ac_dir" != .; then ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` # A "../" for each directory in $ac_dir_suffix. ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` else ac_dir_suffix= ac_top_builddir= fi case $srcdir in .) # No --srcdir option. We are building in place. ac_srcdir=. if test -z "$ac_top_builddir"; then ac_top_srcdir=. else ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` fi ;; [\\/]* | ?:[\\/]* ) # Absolute path. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ;; *) # Relative path. ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_builddir$srcdir ;; esac # Do not use `cd foo && pwd` to compute absolute paths, because # the directories may not exist. case `pwd` in .) ac_abs_builddir="$ac_dir";; *) case "$ac_dir" in .) ac_abs_builddir=`pwd`;; [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; *) ac_abs_builddir=`pwd`/"$ac_dir";; esac;; esac case $ac_abs_builddir in .) ac_abs_top_builddir=${ac_top_builddir}.;; *) case ${ac_top_builddir}. in .) ac_abs_top_builddir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; esac;; esac case $ac_abs_builddir in .) ac_abs_srcdir=$ac_srcdir;; *) case $ac_srcdir in .) ac_abs_srcdir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; esac;; esac case $ac_abs_builddir in .) ac_abs_top_srcdir=$ac_top_srcdir;; *) case $ac_top_srcdir in .) ac_abs_top_srcdir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; esac;; esac cd $ac_dir # Check for guested configure; otherwise get Cygnus style configure. if test -f $ac_srcdir/configure.gnu; then echo $SHELL $ac_srcdir/configure.gnu --help=recursive elif test -f $ac_srcdir/configure; then echo $SHELL $ac_srcdir/configure --help=recursive elif test -f $ac_srcdir/configure.ac || test -f $ac_srcdir/configure.in; then echo $ac_configure --help else echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi cd $ac_popdir done fi test -n "$ac_init_help" && exit 0 if $ac_init_version; then cat <<\_ACEOF zapping configure 0.10cvs6 generated by GNU Autoconf 2.59 Copyright (C) 2003 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit 0 fi exec 5>config.log cat >&5 <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by zapping $as_me 0.10cvs6, which was generated by GNU Autoconf 2.59. Invocation command line was $ $0 $@ _ACEOF { cat <<_ASUNAME ## --------- ## ## Platform. ## ## --------- ## hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` hostinfo = `(hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` _ASUNAME as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. echo "PATH: $as_dir" done } >&5 cat >&5 <<_ACEOF ## ----------- ## ## Core tests. ## ## ----------- ## _ACEOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. # Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. # Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= ac_configure_args0= ac_configure_args1= ac_sep= ac_must_keep_next=false for ac_pass in 1 2 do for ac_arg do case $ac_arg in -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; 2) ac_configure_args1="$ac_configure_args1 '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else case $ac_arg in *=* | --config-cache | -C | -disable-* | --disable-* \ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | -with-* | --with-* | -without-* | --without-* | --x) case "$ac_configure_args0 " in "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; esac ;; -* ) ac_must_keep_next=true ;; esac fi ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'" # Get rid of the leading space. ac_sep=" " ;; esac done done $as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. # WARNING: Be sure not to use single quotes in there, as some shells, # such as our DU 5.0 friend, will then `close' the trap. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { echo cat <<\_ASBOX ## ---------------- ## ## Cache variables. ## ## ---------------- ## _ASBOX echo # The following way of writing the cache mishandles newlines in values, { (set) 2>&1 | case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in *ac_space=\ *) sed -n \ "s/'"'"'/'"'"'\\\\'"'"''"'"'/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p" ;; *) sed -n \ "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" ;; esac; } echo cat <<\_ASBOX ## ----------------- ## ## Output variables. ## ## ----------------- ## _ASBOX echo for ac_var in $ac_subst_vars do eval ac_val=$`echo $ac_var` echo "$ac_var='"'"'$ac_val'"'"'" done | sort echo if test -n "$ac_subst_files"; then cat <<\_ASBOX ## ------------- ## ## Output files. ## ## ------------- ## _ASBOX echo for ac_var in $ac_subst_files do eval ac_val=$`echo $ac_var` echo "$ac_var='"'"'$ac_val'"'"'" done | sort echo fi if test -s confdefs.h; then cat <<\_ASBOX ## ----------- ## ## confdefs.h. ## ## ----------- ## _ASBOX echo sed "/^$/d" confdefs.h | sort echo fi test "$ac_signal" != 0 && echo "$as_me: caught signal $ac_signal" echo "$as_me: exit $exit_status" } >&5 rm -f core *.core && rm -rf conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -rf conftest* confdefs.h # AIX cpp loses on an empty file, so make sure it contains at least a newline. echo >confdefs.h # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF #define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer explicitly selected file to automatically selected ones. if test -z "$CONFIG_SITE"; then if test "x$prefix" != xNONE; then CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" else CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" fi fi for ac_site_file in $CONFIG_SITE; do if test -r "$ac_site_file"; then { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" fi done if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special # files actually), so we avoid doing that. if test -f "$cache_file"; then { echo "$as_me:$LINENO: loading cache $cache_file" >&5 echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . $cache_file;; *) . ./$cache_file;; esac fi else { echo "$as_me:$LINENO: creating cache $cache_file" >&5 echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false for ac_var in `(set) 2>&1 | sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val="\$ac_cv_env_${ac_var}_value" eval ac_new_val="\$ac_env_${ac_var}_value" case $ac_old_set,$ac_new_set in set,) { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 echo "$as_me: former value: $ac_old_val" >&2;} { echo "$as_me:$LINENO: current value: $ac_new_val" >&5 echo "$as_me: current value: $ac_new_val" >&2;} ac_cache_corrupted=: fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 echo "$as_me: error: changes in the environment can compromise the build" >&2;} { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} { (exit 1); exit 1; }; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu am__api_version="1.9" ac_aux_dir= for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do if test -f $ac_dir/install-sh; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" break elif test -f $ac_dir/install.sh; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break elif test -f $ac_dir/shtool; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/shtool install -c" break fi done if test -z "$ac_aux_dir"; then { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;} { (exit 1); exit 1; }; } fi ac_config_guess="$SHELL $ac_aux_dir/config.guess" ac_config_sub="$SHELL $ac_aux_dir/config.sub" ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure. # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6 if test -z "$INSTALL"; then if test "${ac_cv_path_install+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in ./ | .// | /cC/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi done done ;; esac done fi if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. We don't cache a # path for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the path is relative. INSTALL=$ac_install_sh fi fi echo "$as_me:$LINENO: result: $INSTALL" >&5 echo "${ECHO_T}$INSTALL" >&6 # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' echo "$as_me:$LINENO: checking whether build environment is sane" >&5 echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6 # Just in case sleep 1 echo timestamp > conftest.file # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` if test "$*" = "X"; then # -L didn't work. set X `ls -t $srcdir/configure conftest.file` fi rm -f conftest.file if test "$*" != "X $srcdir/configure conftest.file" \ && test "$*" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". { { echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken alias in your environment" >&5 echo "$as_me: error: ls -t appears to fail. Make sure there is not a broken alias in your environment" >&2;} { (exit 1); exit 1; }; } fi test "$2" = conftest.file ) then # Ok. : else { { echo "$as_me:$LINENO: error: newly created file is older than distributed files! Check your system clock" >&5 echo "$as_me: error: newly created file is older than distributed files! Check your system clock" >&2;} { (exit 1); exit 1; }; } fi echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 test "$program_prefix" != NONE && program_transform_name="s,^,$program_prefix,;$program_transform_name" # Use a double $ so make ignores it. test "$program_suffix" != NONE && program_transform_name="s,\$,$program_suffix,;$program_transform_name" # Double any \ or $. echo might interpret backslashes. # By default was `s,x,x', remove it if useless. cat <<\_ACEOF >conftest.sed s/[\\$]/&&/g;s/;s,x,x,$// _ACEOF program_transform_name=`echo $program_transform_name | sed -f conftest.sed` rm conftest.sed # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= { echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5 echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} fi if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then # We used to keeping the `.' as first argument, in order to # allow $(mkdir_p) to be used without argument. As in # $(mkdir_p) $(somedir) # where $(somedir) is conditionally defined. However this is wrong # for two reasons: # 1. if the package is installed by a user who cannot write `.' # make install will fail, # 2. the above comment should most certainly read # $(mkdir_p) $(DESTDIR)$(somedir) # so it does not work when $(somedir) is undefined and # $(DESTDIR) is not. # To support the latter case, we have to write # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir), # so the `.' trick is pointless. mkdir_p='mkdir -p --' else # On NextStep and OpenStep, the `mkdir' command does not # recognize any option. It will interpret all options as # directories to create, and then abort because `.' already # exists. for d in ./-p ./--version; do test -d $d && rmdir $d done # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists. if test -f "$ac_aux_dir/mkinstalldirs"; then mkdir_p='$(mkinstalldirs)' else mkdir_p='$(install_sh) -d' fi fi for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_AWK+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AWK="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then echo "$as_me:$LINENO: result: $AWK" >&5 echo "${ECHO_T}$AWK" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$AWK" && break done echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'` if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.make <<\_ACEOF all: @echo 'ac_maketemp="$(MAKE)"' _ACEOF # GNU make sometimes prints "make[1]: Entering...", which would confuse us. eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=` if test -n "$ac_maketemp"; then eval ac_cv_prog_make_${ac_make}_set=yes else eval ac_cv_prog_make_${ac_make}_set=no fi rm -f conftest.make fi if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 SET_MAKE= else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 SET_MAKE="MAKE=${MAKE-make}" fi rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null # test to see if srcdir already configured if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5 echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;} { (exit 1); exit 1; }; } fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi # Define the identity of the package. PACKAGE=zapping VERSION=0.10cvs6 cat >>confdefs.h <<_ACEOF #define PACKAGE "$PACKAGE" _ACEOF cat >>confdefs.h <<_ACEOF #define VERSION "$VERSION" _ACEOF # Some tools Automake needs. ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} install_sh=${install_sh-"$am_aux_dir/install-sh"} # Installed binaries are usually stripped using `strip' when the user # run `make install-strip'. However `strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the `STRIP' environment variable to overrule this program. if test "$cross_compiling" != no; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_STRIP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then echo "$as_me:$LINENO: result: $STRIP" >&5 echo "${ECHO_T}$STRIP" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":" fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 echo "${ECHO_T}$ac_ct_STRIP" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi STRIP=$ac_ct_STRIP else STRIP="$ac_cv_prog_STRIP" fi fi INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" # We need awk for the "check" target. The system "awk" is bad on # some platforms. # Always define AMTAR for backward compatibility. AMTAR=${AMTAR-"${am_missing_run}tar"} am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' echo "$as_me:$LINENO: checking whether to enable maintainer-specific portions of Makefiles" >&5 echo $ECHO_N "checking whether to enable maintainer-specific portions of Makefiles... $ECHO_C" >&6 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given. if test "${enable_maintainer_mode+set}" = set; then enableval="$enable_maintainer_mode" USE_MAINTAINER_MODE=$enableval else USE_MAINTAINER_MODE=no fi; echo "$as_me:$LINENO: result: $USE_MAINTAINER_MODE" >&5 echo "${ECHO_T}$USE_MAINTAINER_MODE" >&6 if test $USE_MAINTAINER_MODE = yes; then MAINTAINER_MODE_TRUE= MAINTAINER_MODE_FALSE='#' else MAINTAINER_MODE_TRUE='#' MAINTAINER_MODE_FALSE= fi MAINT=$MAINTAINER_MODE_TRUE ac_config_headers="$ac_config_headers config.h" cat >>confdefs.h <<\_ACEOF #define _GNU_SOURCE 1 _ACEOF ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi CC=$ac_ct_CC else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi CC=$ac_ct_CC else CC="$ac_cv_prog_CC" fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$ac_ct_CC" && break done CC=$ac_ct_CC fi fi test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&5 echo "$as_me: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } # Provide some information about the compiler. echo "$as_me:$LINENO:" \ "checking for C compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` { (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 (eval $ac_compiler --version &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 (eval $ac_compiler -v &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 (eval $ac_compiler -V &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files a.out a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5 (eval $ac_link_default) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # Find the output, starting from the most likely. This scheme is # not robust to junk in `.', hence go to wildcards (a.*) only as a last # resort. # Be careful to initialize this variable, since it used to be cached. # Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile. ac_cv_exeext= # b.out is created by i960 compilers. for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;; conftest.$ac_ext ) # This is the source file. ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` # FIXME: I believe we export ac_cv_exeext for Libtool, # but it would be cool to find out if it's true. Does anybody # maintain Libtool? --akim. export ac_cv_exeext break;; * ) break;; esac done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { echo "$as_me:$LINENO: error: C compiler cannot create executables See \`config.log' for more details." >&5 echo "$as_me: error: C compiler cannot create executables See \`config.log' for more details." >&2;} { (exit 77); exit 77; }; } fi ac_exeext=$ac_cv_exeext echo "$as_me:$LINENO: result: $ac_file" >&5 echo "${ECHO_T}$ac_file" >&6 # Check the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. echo "$as_me:$LINENO: checking whether the C compiler works" >&5 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0 # If not cross compiling, check that we can run a simple program. if test "$cross_compiling" != yes; then if { ac_try='./$ac_file' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else { { echo "$as_me:$LINENO: error: cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details." >&5 echo "$as_me: error: cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi fi fi echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 rm -f a.out a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save # Check the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6 echo "$as_me:$LINENO: result: $cross_compiling" >&5 echo "${ECHO_T}$cross_compiling" >&6 echo "$as_me:$LINENO: checking for suffix of executables" >&5 echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with # `rm'. for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` export ac_cv_exeext break;; * ) break;; esac done else { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute suffix of executables: cannot compile and link See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi rm -f conftest$ac_cv_exeext echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 echo "${ECHO_T}$ac_cv_exeext" >&6 rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT echo "$as_me:$LINENO: checking for suffix of object files" >&5 echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6 if test "${ac_cv_objext+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.o conftest.obj if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute suffix of object files: cannot compile See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 echo "${ECHO_T}$ac_cv_objext" >&6 OBJEXT=$ac_cv_objext ac_objext=$OBJEXT echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6 if test "${ac_cv_c_compiler_gnu+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_compiler_gnu=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_compiler_gnu=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6 GCC=`test $ac_compiler_gnu = yes && echo yes` ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS CFLAGS="-g" echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6 if test "${ac_cv_prog_cc_g+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_prog_cc_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_prog_cc_g=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6 if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6 if test "${ac_cv_prog_cc_stdc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_prog_cc_stdc=no ac_save_CC=$CC cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std1 is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std1. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF # Don't try gcc -ansi; that turns off useful extensions and # breaks some systems' header files. # AIX -qlanglvl=ansi # Ultrix and OSF/1 -std1 # HP-UX 10.20 and later -Ae # HP-UX older versions -Aa -D_HPUX_SOURCE # SVR4 -Xc -D__EXTENSIONS__ for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_prog_cc_stdc=$ac_arg break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext done rm -f conftest.$ac_ext conftest.$ac_objext CC=$ac_save_CC fi case "x$ac_cv_prog_cc_stdc" in x|xno) echo "$as_me:$LINENO: result: none needed" >&5 echo "${ECHO_T}none needed" >&6 ;; *) echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6 CC="$CC $ac_cv_prog_cc_stdc" ;; esac # Some people use a C++ compiler to compile C. Since we use `exit', # in C++ we need to declare it. In case someone uses the same compiler # for both compiling C and C++ we need to have the C++ compiler decide # the declaration of exit, since it's the most demanding environment. cat >conftest.$ac_ext <<_ACEOF #ifndef __cplusplus choke me #endif _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then for ac_declaration in \ '' \ 'extern "C" void std::exit (int) throw (); using std::exit;' \ 'extern "C" void std::exit (int); using std::exit;' \ 'extern "C" void exit (int) throw ();' \ 'extern "C" void exit (int);' \ 'void exit (int);' do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_declaration #include int main () { exit (42); ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 continue fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_declaration int main () { exit (42); ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext done rm -f conftest* if test -n "$ac_declaration"; then echo '#ifdef __cplusplus' >>confdefs.h echo $ac_declaration >>confdefs.h echo '#endif' >>confdefs.h fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo done .PHONY: am__doit END # If we don't find an include directive, just comment out the code. echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5 echo $ECHO_N "checking for style of include used by $am_make... $ECHO_C" >&6 am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # We grep out `Entering directory' and `Leaving directory' # messages which can occur if `w' ends up in MAKEFLAGS. # In particular we don't look at `^make:' because GNU make might # be invoked under some other name (usually "gmake"), in which # case it prints its new name instead of `make'. if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then am__include=include am__quote= _am_result=GNU fi # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then am__include=.include am__quote="\"" _am_result=BSD fi fi echo "$as_me:$LINENO: result: $_am_result" >&5 echo "${ECHO_T}$_am_result" >&6 rm -f confinc confmf # Check whether --enable-dependency-tracking or --disable-dependency-tracking was given. if test "${enable_dependency_tracking+set}" = set; then enableval="$enable_dependency_tracking" fi; if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' fi if test "x$enable_dependency_tracking" != xno; then AMDEP_TRUE= AMDEP_FALSE='#' else AMDEP_TRUE='#' AMDEP_FALSE= fi depcc="$CC" am_compiler_list= echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6 if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf case $depmode in nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; none) break ;; esac # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. if depmode=$depmode \ source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6 CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi echo "$as_me:$LINENO: checking for library containing strerror" >&5 echo $ECHO_N "checking for library containing strerror... $ECHO_C" >&6 if test "${ac_cv_search_strerror+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_func_search_save_LIBS=$LIBS ac_cv_search_strerror=no cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char strerror (); int main () { strerror (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_search_strerror="none required" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test "$ac_cv_search_strerror" = no; then for ac_lib in cposix; do LIBS="-l$ac_lib $ac_func_search_save_LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char strerror (); int main () { strerror (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_search_strerror="-l$ac_lib" break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext done fi LIBS=$ac_func_search_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_search_strerror" >&5 echo "${ECHO_T}$ac_cv_search_strerror" >&6 if test "$ac_cv_search_strerror" != no; then test "$ac_cv_search_strerror" = "none required" || LIBS="$ac_cv_search_strerror $LIBS" fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi CC=$ac_ct_CC else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi CC=$ac_ct_CC else CC="$ac_cv_prog_CC" fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$ac_ct_CC" && break done CC=$ac_ct_CC fi fi test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&5 echo "$as_me: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } # Provide some information about the compiler. echo "$as_me:$LINENO:" \ "checking for C compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` { (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 (eval $ac_compiler --version &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 (eval $ac_compiler -v &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 (eval $ac_compiler -V &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6 if test "${ac_cv_c_compiler_gnu+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_compiler_gnu=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_compiler_gnu=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6 GCC=`test $ac_compiler_gnu = yes && echo yes` ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS CFLAGS="-g" echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6 if test "${ac_cv_prog_cc_g+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_prog_cc_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_prog_cc_g=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6 if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6 if test "${ac_cv_prog_cc_stdc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_prog_cc_stdc=no ac_save_CC=$CC cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std1 is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std1. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF # Don't try gcc -ansi; that turns off useful extensions and # breaks some systems' header files. # AIX -qlanglvl=ansi # Ultrix and OSF/1 -std1 # HP-UX 10.20 and later -Ae # HP-UX older versions -Aa -D_HPUX_SOURCE # SVR4 -Xc -D__EXTENSIONS__ for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_prog_cc_stdc=$ac_arg break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext done rm -f conftest.$ac_ext conftest.$ac_objext CC=$ac_save_CC fi case "x$ac_cv_prog_cc_stdc" in x|xno) echo "$as_me:$LINENO: result: none needed" >&5 echo "${ECHO_T}none needed" >&6 ;; *) echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6 CC="$CC $ac_cv_prog_cc_stdc" ;; esac # Some people use a C++ compiler to compile C. Since we use `exit', # in C++ we need to declare it. In case someone uses the same compiler # for both compiling C and C++ we need to have the C++ compiler decide # the declaration of exit, since it's the most demanding environment. cat >conftest.$ac_ext <<_ACEOF #ifndef __cplusplus choke me #endif _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then for ac_declaration in \ '' \ 'extern "C" void std::exit (int) throw (); using std::exit;' \ 'extern "C" void std::exit (int); using std::exit;' \ 'extern "C" void exit (int) throw ();' \ 'extern "C" void exit (int);' \ 'void exit (int);' do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_declaration #include int main () { exit (42); ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 continue fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_declaration int main () { exit (42); ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext done rm -f conftest* if test -n "$ac_declaration"; then echo '#ifdef __cplusplus' >>confdefs.h echo $ac_declaration >>confdefs.h echo '#endif' >>confdefs.h fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu depcc="$CC" am_compiler_list= echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6 if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf case $depmode in nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; none) break ;; esac # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. if depmode=$depmode \ source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6 CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi am_cv_prog_cc_stdc=$ac_cv_prog_cc_stdc ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if test "${ac_cv_prog_CPP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" do ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether non-existent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then # Broken: success on invalid input. continue else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then break fi done ac_cv_prog_CPP=$CPP fi CPP=$ac_cv_prog_CPP else ac_cv_prog_CPP=$CPP fi echo "$as_me:$LINENO: result: $CPP" >&5 echo "${ECHO_T}$CPP" >&6 ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether non-existent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then # Broken: success on invalid input. continue else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details." >&5 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu echo "$as_me:$LINENO: checking for egrep" >&5 echo $ECHO_N "checking for egrep... $ECHO_C" >&6 if test "${ac_cv_prog_egrep+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if echo a | (grep -E '(a|b)') >/dev/null 2>&1 then ac_cv_prog_egrep='grep -E' else ac_cv_prog_egrep='egrep' fi fi echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5 echo "${ECHO_T}$ac_cv_prog_egrep" >&6 EGREP=$ac_cv_prog_egrep echo "$as_me:$LINENO: checking for ANSI C header files" >&5 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 if test "${ac_cv_header_stdc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_header_stdc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_header_stdc=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } _ACEOF rm -f conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_header_stdc=no fi rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi fi echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 echo "${ECHO_T}$ac_cv_header_stdc" >&6 if test $ac_cv_header_stdc = yes; then cat >>confdefs.h <<\_ACEOF #define STDC_HEADERS 1 _ACEOF fi # By default we simply use the C compiler to build assembly code. test "${CCAS+set}" = set || CCAS=$CC test "${CCASFLAGS+set}" = set || CCASFLAGS=$CFLAGS # Check whether --enable-static or --disable-static was given. if test "${enable_static+set}" = set; then enableval="$enable_static" p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; no) enable_static=no ;; *) enable_static=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_static=yes fi done IFS="$lt_save_ifs" ;; esac else enable_static=no fi; # Check whether --enable-shared or --disable-shared was given. if test "${enable_shared+set}" = set; then enableval="$enable_shared" p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; no) enable_shared=no ;; *) enable_shared=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_shared=yes fi done IFS="$lt_save_ifs" ;; esac else enable_shared=yes fi; # Check whether --enable-fast-install or --disable-fast-install was given. if test "${enable_fast_install+set}" = set; then enableval="$enable_fast_install" p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; no) enable_fast_install=no ;; *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done IFS="$lt_save_ifs" ;; esac else enable_fast_install=yes fi; # Make sure we can run config.sub. $ac_config_sub sun4 >/dev/null 2>&1 || { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5 echo "$as_me: error: cannot run $ac_config_sub" >&2;} { (exit 1); exit 1; }; } echo "$as_me:$LINENO: checking build system type" >&5 echo $ECHO_N "checking build system type... $ECHO_C" >&6 if test "${ac_cv_build+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_build_alias=$build_alias test -z "$ac_cv_build_alias" && ac_cv_build_alias=`$ac_config_guess` test -z "$ac_cv_build_alias" && { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5 echo "$as_me: error: cannot guess build type; you must specify one" >&2;} { (exit 1); exit 1; }; } ac_cv_build=`$ac_config_sub $ac_cv_build_alias` || { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;} { (exit 1); exit 1; }; } fi echo "$as_me:$LINENO: result: $ac_cv_build" >&5 echo "${ECHO_T}$ac_cv_build" >&6 build=$ac_cv_build build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` echo "$as_me:$LINENO: checking host system type" >&5 echo $ECHO_N "checking host system type... $ECHO_C" >&6 if test "${ac_cv_host+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_host_alias=$host_alias test -z "$ac_cv_host_alias" && ac_cv_host_alias=$ac_cv_build_alias ac_cv_host=`$ac_config_sub $ac_cv_host_alias` || { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;} { (exit 1); exit 1; }; } fi echo "$as_me:$LINENO: result: $ac_cv_host" >&5 echo "${ECHO_T}$ac_cv_host" >&6 host=$ac_cv_host host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` echo "$as_me:$LINENO: checking for a sed that does not truncate output" >&5 echo $ECHO_N "checking for a sed that does not truncate output... $ECHO_C" >&6 if test "${lt_cv_path_SED+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # Loop through the user's path and test for sed and gsed. # Then use that list of sed's as ones to test for truncation. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for lt_ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" fi done done done lt_ac_max=0 lt_ac_count=0 # Add /usr/xpg4/bin/sed as it is typically found on Solaris # along with /bin/sed that truncates output. for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do test ! -f $lt_ac_sed && continue cat /dev/null > conftest.in lt_ac_count=0 echo $ECHO_N "0123456789$ECHO_C" >conftest.in # Check for GNU sed and select it if it is found. if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then lt_cv_path_SED=$lt_ac_sed break fi while true; do cat conftest.in conftest.in >conftest.tmp mv conftest.tmp conftest.in cp conftest.in conftest.nl echo >>conftest.nl $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break cmp -s conftest.out conftest.nl || break # 10000 chars as input seems more than enough test $lt_ac_count -gt 10 && break lt_ac_count=`expr $lt_ac_count + 1` if test $lt_ac_count -gt $lt_ac_max; then lt_ac_max=$lt_ac_count lt_cv_path_SED=$lt_ac_sed fi done done fi SED=$lt_cv_path_SED echo "$as_me:$LINENO: result: $SED" >&5 echo "${ECHO_T}$SED" >&6 # Check whether --with-gnu-ld or --without-gnu-ld was given. if test "${with_gnu_ld+set}" = set; then withval="$with_gnu_ld" test "$withval" = no || with_gnu_ld=yes else with_gnu_ld=no fi; ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. echo "$as_me:$LINENO: checking for ld used by $CC" >&5 echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6 case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [\\/]* | ?:[\\/]*) re_direlt='/[^/][^/]*/\.\./' # Canonicalize the pathname of ld ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'` while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then echo "$as_me:$LINENO: checking for GNU ld" >&5 echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6 else echo "$as_me:$LINENO: checking for non-GNU ld" >&5 echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6 fi if test "${lt_cv_path_LD+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -z "$LD"; then lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &5 echo "${ECHO_T}$LD" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} { (exit 1); exit 1; }; } echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6 if test "${lt_cv_prog_gnu_ld+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 &5 echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6 with_gnu_ld=$lt_cv_prog_gnu_ld echo "$as_me:$LINENO: checking for $LD option to reload object files" >&5 echo $ECHO_N "checking for $LD option to reload object files... $ECHO_C" >&6 if test "${lt_cv_ld_reload_flag+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_ld_reload_flag='-r' fi echo "$as_me:$LINENO: result: $lt_cv_ld_reload_flag" >&5 echo "${ECHO_T}$lt_cv_ld_reload_flag" >&6 reload_flag=$lt_cv_ld_reload_flag case $reload_flag in "" | " "*) ;; *) reload_flag=" $reload_flag" ;; esac reload_cmds='$LD$reload_flag -o $output$reload_objs' case $host_os in darwin*) if test "$GCC" = yes; then reload_cmds='$CC -nostdlib ${wl}-r -o $output$reload_objs' else reload_cmds='$LD$reload_flag -o $output$reload_objs' fi ;; esac echo "$as_me:$LINENO: checking for BSD-compatible nm" >&5 echo $ECHO_N "checking for BSD-compatible nm... $ECHO_C" >&6 if test "${lt_cv_path_NM+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM="$NM" else lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. tmp_nm="$ac_dir/${ac_tool_prefix}nm" if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then # Check to see if the nm accepts a BSD-compat flag. # Adding the `sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in */dev/null* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags ;; esac esac fi done IFS="$lt_save_ifs" test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm fi fi echo "$as_me:$LINENO: result: $lt_cv_path_NM" >&5 echo "${ECHO_T}$lt_cv_path_NM" >&6 NM="$lt_cv_path_NM" echo "$as_me:$LINENO: checking whether ln -s works" >&5 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6 LN_S=$as_ln_s if test "$LN_S" = "ln -s"; then echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 else echo "$as_me:$LINENO: result: no, using $LN_S" >&5 echo "${ECHO_T}no, using $LN_S" >&6 fi echo "$as_me:$LINENO: checking how to recognise dependent libraries" >&5 echo $ECHO_N "checking how to recognise dependent libraries... $ECHO_C" >&6 if test "${lt_cv_deplibs_check_method+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_file_magic_cmd='$MAGIC_CMD' lt_cv_file_magic_test_file= lt_cv_deplibs_check_method='unknown' # Need to set the preceding variable on all platforms that support # interlibrary dependencies. # 'none' -- dependencies not supported. # `unknown' -- same as none, but documents that we really don't know. # 'pass_all' -- all dependencies passed with no checks. # 'test_compile' -- check by making test program. # 'file_magic [[regex]]' -- check by looking for files in library path # which responds to the $file_magic_cmd with a given extended regex. # If you have `file' or equivalent on your system and you're not sure # whether `pass_all' will *always* work, you probably want this one. case $host_os in aix4* | aix5*) lt_cv_deplibs_check_method=pass_all ;; beos*) lt_cv_deplibs_check_method=pass_all ;; bsdi[45]*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' lt_cv_file_magic_cmd='/usr/bin/file -L' lt_cv_file_magic_test_file=/shlib/libc.so ;; cygwin*) # func_win32_libid is a shell function defined in ltmain.sh lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' ;; mingw* | pw32*) # Base MSYS/MinGW do not provide the 'file' command needed by # func_win32_libid shell function, so use a weaker test based on 'objdump'. lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' lt_cv_file_magic_cmd='$OBJDUMP -f' ;; darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; freebsd* | kfreebsd*-gnu | dragonfly*) if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac else lt_cv_deplibs_check_method=pass_all fi ;; gnu*) lt_cv_deplibs_check_method=pass_all ;; hpux10.20* | hpux11*) lt_cv_file_magic_cmd=/usr/bin/file case $host_cpu in ia64*) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so ;; hppa*64*) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]' lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl ;; *) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library' lt_cv_file_magic_test_file=/usr/lib/libc.sl ;; esac ;; irix5* | irix6* | nonstopux*) case $LD in *-32|*"-32 ") libmagic=32-bit;; *-n32|*"-n32 ") libmagic=N32;; *-64|*"-64 ") libmagic=64-bit;; *) libmagic=never-match;; esac lt_cv_deplibs_check_method=pass_all ;; # This must be Linux ELF. linux*) lt_cv_deplibs_check_method=pass_all ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$' fi ;; newos6*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; nto-qnx*) lt_cv_deplibs_check_method=unknown ;; openbsd*) if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' fi ;; osf3* | osf4* | osf5*) lt_cv_deplibs_check_method=pass_all ;; sco3.2v5*) lt_cv_deplibs_check_method=pass_all ;; solaris*) lt_cv_deplibs_check_method=pass_all ;; sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) case $host_vendor in motorola) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` ;; ncr) lt_cv_deplibs_check_method=pass_all ;; sequent) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;; sni) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib" lt_cv_file_magic_test_file=/lib/libc.so ;; siemens) lt_cv_deplibs_check_method=pass_all ;; esac ;; sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[78]* | unixware7* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; esac fi echo "$as_me:$LINENO: result: $lt_cv_deplibs_check_method" >&5 echo "${ECHO_T}$lt_cv_deplibs_check_method" >&6 file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # Allow CC to be a program name with arguments. compiler=$CC # Check whether --enable-libtool-lock or --disable-libtool-lock was given. if test "${enable_libtool_lock+set}" = set; then enableval="$enable_libtool_lock" fi; test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. case $host in ia64-*-hpux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE="32" ;; *ELF-64*) HPUX_IA64_MODE="64" ;; esac fi rm -rf conftest* ;; *-*-irix6*) # Find out which ABI we are using. echo '#line 5133 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then if test "$lt_cv_prog_gnu_ld" = yes; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; *N32*) LD="${LD-ld} -melf32bmipn32" ;; *64-bit*) LD="${LD-ld} -melf64bmip" ;; esac else case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; *N32*) LD="${LD-ld} -n32" ;; *64-bit*) LD="${LD-ld} -64" ;; esac fi fi rm -rf conftest* ;; x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then case `/usr/bin/file conftest.o` in *32-bit*) case $host in x86_64-*linux*) LD="${LD-ld} -m elf_i386" ;; ppc64-*linux*|powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) LD="${LD-ld} -m elf_s390" ;; sparc64-*linux*) LD="${LD-ld} -m elf32_sparc" ;; esac ;; *64-bit*) case $host in x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; ppc*-*linux*|powerpc*-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*) LD="${LD-ld} -m elf64_s390" ;; sparc*-*linux*) LD="${LD-ld} -m elf64_sparc" ;; esac ;; esac fi rm -rf conftest* ;; *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" echo "$as_me:$LINENO: checking whether the C compiler needs -belf" >&5 echo $ECHO_N "checking whether the C compiler needs -belf... $ECHO_C" >&6 if test "${lt_cv_cc_needs_belf+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then lt_cv_cc_needs_belf=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 lt_cv_cc_needs_belf=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu fi echo "$as_me:$LINENO: result: $lt_cv_cc_needs_belf" >&5 echo "${ECHO_T}$lt_cv_cc_needs_belf" >&6 if test x"$lt_cv_cc_needs_belf" != x"yes"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS="$SAVE_CFLAGS" fi ;; esac need_locks="$enable_libtool_lock" # On IRIX 5.3, sys/types and inttypes.h are conflicting. for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_Header=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_Header=no" fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_header in dlfcn.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if eval "test \"\${$as_ac_Header+set}\" = set"; then echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## ------------------------------------------------------------------------------------ ## ## Report this to http://sourceforge.net/tracker/?atid=102599&group_id=2599&func=browse ## ## ------------------------------------------------------------------------------------ ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done ac_ext=cc ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu if test -n "$ac_tool_prefix"; then for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CXX+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CXX"; then ac_cv_prog_CXX="$CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi CXX=$ac_cv_prog_CXX if test -n "$CXX"; then echo "$as_me:$LINENO: result: $CXX" >&5 echo "${ECHO_T}$CXX" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$CXX" && break done fi if test -z "$CXX"; then ac_ct_CXX=$CXX for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CXX"; then ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CXX="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi ac_ct_CXX=$ac_cv_prog_ac_ct_CXX if test -n "$ac_ct_CXX"; then echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5 echo "${ECHO_T}$ac_ct_CXX" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$ac_ct_CXX" && break done test -n "$ac_ct_CXX" || ac_ct_CXX="g++" CXX=$ac_ct_CXX fi # Provide some information about the compiler. echo "$as_me:$LINENO:" \ "checking for C++ compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` { (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 (eval $ac_compiler --version &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 (eval $ac_compiler -v &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 (eval $ac_compiler -V &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_compiler_gnu=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_compiler_gnu=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_cxx_compiler_gnu=$ac_compiler_gnu fi echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6 GXX=`test $ac_compiler_gnu = yes && echo yes` ac_test_CXXFLAGS=${CXXFLAGS+set} ac_save_CXXFLAGS=$CXXFLAGS CXXFLAGS="-g" echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6 if test "${ac_cv_prog_cxx_g+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_prog_cxx_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_prog_cxx_g=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6 if test "$ac_test_CXXFLAGS" = set; then CXXFLAGS=$ac_save_CXXFLAGS elif test $ac_cv_prog_cxx_g = yes; then if test "$GXX" = yes; then CXXFLAGS="-g -O2" else CXXFLAGS="-g" fi else if test "$GXX" = yes; then CXXFLAGS="-O2" else CXXFLAGS= fi fi for ac_declaration in \ '' \ 'extern "C" void std::exit (int) throw (); using std::exit;' \ 'extern "C" void std::exit (int); using std::exit;' \ 'extern "C" void exit (int) throw ();' \ 'extern "C" void exit (int);' \ 'void exit (int);' do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_declaration #include int main () { exit (42); ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 continue fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_declaration int main () { exit (42); ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext done rm -f conftest* if test -n "$ac_declaration"; then echo '#ifdef __cplusplus' >>confdefs.h echo $ac_declaration >>confdefs.h echo '#endif' >>confdefs.h fi ac_ext=cc ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu depcc="$CXX" am_compiler_list= echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6 if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CXX_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf case $depmode in nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; none) break ;; esac # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. if depmode=$depmode \ source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CXX_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CXX_dependencies_compiler_type=none fi fi echo "$as_me:$LINENO: result: $am_cv_CXX_dependencies_compiler_type" >&5 echo "${ECHO_T}$am_cv_CXX_dependencies_compiler_type" >&6 CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then am__fastdepCXX_TRUE= am__fastdepCXX_FALSE='#' else am__fastdepCXX_TRUE='#' am__fastdepCXX_FALSE= fi if test -n "$CXX" && ( test "X$CXX" != "Xno" && ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || (test "X$CXX" != "Xg++"))) ; then ac_ext=cc ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu echo "$as_me:$LINENO: checking how to run the C++ preprocessor" >&5 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6 if test -z "$CXXCPP"; then if test "${ac_cv_prog_CXXCPP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # Double quotes because CXXCPP needs to be expanded for CXXCPP in "$CXX -E" "/lib/cpp" do ac_preproc_ok=false for ac_cxx_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_cxx_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether non-existent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_cxx_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then # Broken: success on invalid input. continue else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then break fi done ac_cv_prog_CXXCPP=$CXXCPP fi CXXCPP=$ac_cv_prog_CXXCPP else ac_cv_prog_CXXCPP=$CXXCPP fi echo "$as_me:$LINENO: result: $CXXCPP" >&5 echo "${ECHO_T}$CXXCPP" >&6 ac_preproc_ok=false for ac_cxx_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_cxx_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether non-existent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_cxx_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then # Broken: success on invalid input. continue else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { echo "$as_me:$LINENO: error: C++ preprocessor \"$CXXCPP\" fails sanity check See \`config.log' for more details." >&5 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi ac_ext=cc ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu fi ac_ext=f ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_f77_compiler_gnu if test -n "$ac_tool_prefix"; then for ac_prog in g77 f77 xlf frt pgf77 fort77 fl32 af77 f90 xlf90 pgf90 epcf90 f95 fort xlf95 ifc efc pgf95 lf95 gfortran do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_F77+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$F77"; then ac_cv_prog_F77="$F77" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_F77="$ac_tool_prefix$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi F77=$ac_cv_prog_F77 if test -n "$F77"; then echo "$as_me:$LINENO: result: $F77" >&5 echo "${ECHO_T}$F77" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$F77" && break done fi if test -z "$F77"; then ac_ct_F77=$F77 for ac_prog in g77 f77 xlf frt pgf77 fort77 fl32 af77 f90 xlf90 pgf90 epcf90 f95 fort xlf95 ifc efc pgf95 lf95 gfortran do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_F77+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_F77"; then ac_cv_prog_ac_ct_F77="$ac_ct_F77" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_F77="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi ac_ct_F77=$ac_cv_prog_ac_ct_F77 if test -n "$ac_ct_F77"; then echo "$as_me:$LINENO: result: $ac_ct_F77" >&5 echo "${ECHO_T}$ac_ct_F77" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$ac_ct_F77" && break done F77=$ac_ct_F77 fi # Provide some information about the compiler. echo "$as_me:6311:" \ "checking for Fortran 77 compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` { (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 (eval $ac_compiler --version &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 (eval $ac_compiler -v &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 (eval $ac_compiler -V &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } rm -f a.out # If we don't use `.F' as extension, the preprocessor is not run on the # input file. (Note that this only needs to work for GNU compilers.) ac_save_ext=$ac_ext ac_ext=F echo "$as_me:$LINENO: checking whether we are using the GNU Fortran 77 compiler" >&5 echo $ECHO_N "checking whether we are using the GNU Fortran 77 compiler... $ECHO_C" >&6 if test "${ac_cv_f77_compiler_gnu+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF program main #ifndef __GNUC__ choke me #endif end _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_f77_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_compiler_gnu=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_compiler_gnu=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_f77_compiler_gnu=$ac_compiler_gnu fi echo "$as_me:$LINENO: result: $ac_cv_f77_compiler_gnu" >&5 echo "${ECHO_T}$ac_cv_f77_compiler_gnu" >&6 ac_ext=$ac_save_ext ac_test_FFLAGS=${FFLAGS+set} ac_save_FFLAGS=$FFLAGS FFLAGS= echo "$as_me:$LINENO: checking whether $F77 accepts -g" >&5 echo $ECHO_N "checking whether $F77 accepts -g... $ECHO_C" >&6 if test "${ac_cv_prog_f77_g+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else FFLAGS=-g cat >conftest.$ac_ext <<_ACEOF program main end _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_f77_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_prog_f77_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_prog_f77_g=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_prog_f77_g" >&5 echo "${ECHO_T}$ac_cv_prog_f77_g" >&6 if test "$ac_test_FFLAGS" = set; then FFLAGS=$ac_save_FFLAGS elif test $ac_cv_prog_f77_g = yes; then if test "x$ac_cv_f77_compiler_gnu" = xyes; then FFLAGS="-g -O2" else FFLAGS="-g" fi else if test "x$ac_cv_f77_compiler_gnu" = xyes; then FFLAGS="-O2" else FFLAGS= fi fi G77=`test $ac_compiler_gnu = yes && echo yes` ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu # Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers! # find the maximum length of command line arguments echo "$as_me:$LINENO: checking the maximum length of command line arguments" >&5 echo $ECHO_N "checking the maximum length of command line arguments... $ECHO_C" >&6 if test "${lt_cv_sys_max_cmd_len+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else i=0 teststring="ABCD" case $build_os in msdosdjgpp*) # On DJGPP, this test can blow up pretty badly due to problems in libc # (any single argument exceeding 2000 bytes causes a buffer overrun # during glob expansion). Even if it were fixed, the result of this # check would be larger than it should be. lt_cv_sys_max_cmd_len=12288; # 12K is about right ;; gnu*) # Under GNU Hurd, this test is not required because there is # no limit to the length of command line arguments. # Libtool will interpret -1 as no limit whatsoever lt_cv_sys_max_cmd_len=-1; ;; cygwin* | mingw*) # On Win9x/ME, this test blows up -- it succeeds, but takes # about 5 minutes as the teststring grows exponentially. # Worse, since 9x/ME are not pre-emptively multitasking, # you end up with a "frozen" computer, even though with patience # the test eventually succeeds (with a max line length of 256k). # Instead, let's just punt: use the minimum linelength reported by # all of the supported platforms: 8192 (on NT/2K/XP). lt_cv_sys_max_cmd_len=8192; ;; amigaos*) # On AmigaOS with pdksh, this test takes hours, literally. # So we just punt and use a minimum line length of 8192. lt_cv_sys_max_cmd_len=8192; ;; netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` elif test -x /usr/sbin/sysctl; then lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` else lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs fi # And add a safety zone lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` ;; osf*) # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not # nice to cause kernel panics so lets avoid the loop below. # First set a reasonable default. lt_cv_sys_max_cmd_len=16384 # if test -x /sbin/sysconfig; then case `/sbin/sysconfig -q proc exec_disable_arg_limit` in *1*) lt_cv_sys_max_cmd_len=-1 ;; esac fi ;; *) # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} while (test "X"`$SHELL $0 --fallback-echo "X$teststring" 2>/dev/null` \ = "XX$teststring") >/dev/null 2>&1 && new_result=`expr "X$teststring" : ".*" 2>&1` && lt_cv_sys_max_cmd_len=$new_result && test $i != 17 # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring done teststring= # Add a significant safety factor because C++ compilers can tack on massive # amounts of additional arguments before passing them to the linker. # It appears as though 1/2 is a usable value. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` ;; esac fi if test -n $lt_cv_sys_max_cmd_len ; then echo "$as_me:$LINENO: result: $lt_cv_sys_max_cmd_len" >&5 echo "${ECHO_T}$lt_cv_sys_max_cmd_len" >&6 else echo "$as_me:$LINENO: result: none" >&5 echo "${ECHO_T}none" >&6 fi # Check for command to grab the raw symbol name followed by C symbol from nm. echo "$as_me:$LINENO: checking command to parse $NM output from $compiler object" >&5 echo $ECHO_N "checking command to parse $NM output from $compiler object... $ECHO_C" >&6 if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # These are sane defaults that work on at least a few old systems. # [They come from Ultrix. What could be older than Ultrix?!! ;)] # Character class describing NM global symbol codes. symcode='[BCDEGRST]' # Regexp to match symbols that can be accessed directly from C. sympat='\([_A-Za-z][_A-Za-z0-9]*\)' # Transform an extracted symbol line into a proper C declaration lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'" # Transform an extracted symbol line into symbol name and symbol address lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" # Define system-specific variables. case $host_os in aix*) symcode='[BCDT]' ;; cygwin* | mingw* | pw32*) symcode='[ABCDGISTW]' ;; hpux*) # Its linker distinguishes data from code symbols if test "$host_cpu" = ia64; then symcode='[ABCDEGRST]' fi lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" ;; linux*) if test "$host_cpu" = ia64; then symcode='[ABCDGIRSTW]' lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" fi ;; irix* | nonstopux*) symcode='[BCDEGRST]' ;; osf*) symcode='[BCDEGQRST]' ;; solaris* | sysv5*) symcode='[BDRT]' ;; sysv4) symcode='[DFNSTU]' ;; esac # Handle CRLF in mingw tool chain opt_cr= case $build_os in mingw*) opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp ;; esac # If we're using GNU nm, then use its standard symbol codes. case `$NM -V 2>&1` in *GNU* | *'with BFD'*) symcode='[ABCDGIRSTW]' ;; esac # Try without a prefix undercore, then with it. for ac_symprfx in "" "_"; do # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. symxfrm="\\1 $ac_symprfx\\2 \\2" # Write the raw and C identifiers. lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" # Check to see that the pipe works correctly. pipe_works=no rm -f conftest* cat > conftest.$ac_ext <&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # Now try to grab the symbols. nlist=conftest.nm if { (eval echo "$as_me:$LINENO: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\"") >&5 (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" else rm -f "$nlist"T fi # Make sure that we snagged all the symbols we need. if grep ' nm_test_var$' "$nlist" >/dev/null; then if grep ' nm_test_func$' "$nlist" >/dev/null; then cat < conftest.$ac_ext #ifdef __cplusplus extern "C" { #endif EOF # Now generate the symbol file. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext' cat <> conftest.$ac_ext #if defined (__STDC__) && __STDC__ # define lt_ptr_t void * #else # define lt_ptr_t char * # define const #endif /* The mapping between symbol names and symbols. */ const struct { const char *name; lt_ptr_t address; } lt_preloaded_symbols[] = { EOF $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext cat <<\EOF >> conftest.$ac_ext {0, (lt_ptr_t) 0} }; #ifdef __cplusplus } #endif EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext lt_save_LIBS="$LIBS" lt_save_CFLAGS="$CFLAGS" LIBS="conftstm.$ac_objext" CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -s conftest${ac_exeext}; then pipe_works=yes fi LIBS="$lt_save_LIBS" CFLAGS="$lt_save_CFLAGS" else echo "cannot find nm_test_func in $nlist" >&5 fi else echo "cannot find nm_test_var in $nlist" >&5 fi else echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5 fi else echo "$progname: failed program was:" >&5 cat conftest.$ac_ext >&5 fi rm -f conftest* conftst* # Do not use the global_symbol_pipe unless it works. if test "$pipe_works" = yes; then break else lt_cv_sys_global_symbol_pipe= fi done fi if test -z "$lt_cv_sys_global_symbol_pipe"; then lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then echo "$as_me:$LINENO: result: failed" >&5 echo "${ECHO_T}failed" >&6 else echo "$as_me:$LINENO: result: ok" >&5 echo "${ECHO_T}ok" >&6 fi echo "$as_me:$LINENO: checking for objdir" >&5 echo $ECHO_N "checking for objdir... $ECHO_C" >&6 if test "${lt_cv_objdir+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then lt_cv_objdir=.libs else # MS-DOS does not allow filenames that begin with a dot. lt_cv_objdir=_libs fi rmdir .libs 2>/dev/null fi echo "$as_me:$LINENO: result: $lt_cv_objdir" >&5 echo "${ECHO_T}$lt_cv_objdir" >&6 objdir=$lt_cv_objdir case $host_os in aix3*) # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi ;; esac # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. Xsed='sed -e 1s/^X//' sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g' # Sed substitution to delay expansion of an escaped shell variable in a # double_quote_subst'ed string. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' # Sed substitution to avoid accidental globbing in evaled expressions no_glob_subst='s/\*/\\\*/g' # Constants: rm="rm -f" # Global variables: default_ofile=libtool can_build_shared=yes # All known linkers require a `.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a ltmain="$ac_aux_dir/ltmain.sh" ofile="$default_ofile" with_gnu_ld="$lt_cv_prog_gnu_ld" if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. set dummy ${ac_tool_prefix}ar; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_AR+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$AR"; then ac_cv_prog_AR="$AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AR="${ac_tool_prefix}ar" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi AR=$ac_cv_prog_AR if test -n "$AR"; then echo "$as_me:$LINENO: result: $AR" >&5 echo "${ECHO_T}$AR" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$ac_cv_prog_AR"; then ac_ct_AR=$AR # Extract the first word of "ar", so it can be a program name with args. set dummy ar; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_AR"; then ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_AR="ar" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="false" fi fi ac_ct_AR=$ac_cv_prog_ac_ct_AR if test -n "$ac_ct_AR"; then echo "$as_me:$LINENO: result: $ac_ct_AR" >&5 echo "${ECHO_T}$ac_ct_AR" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi AR=$ac_ct_AR else AR="$ac_cv_prog_AR" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_RANLIB+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then echo "$as_me:$LINENO: result: $RANLIB" >&5 echo "${ECHO_T}$RANLIB" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$ac_cv_prog_RANLIB"; then ac_ct_RANLIB=$RANLIB # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_RANLIB"; then ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_RANLIB="ranlib" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":" fi fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 echo "${ECHO_T}$ac_ct_RANLIB" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi RANLIB=$ac_ct_RANLIB else RANLIB="$ac_cv_prog_RANLIB" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_STRIP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then echo "$as_me:$LINENO: result: $STRIP" >&5 echo "${ECHO_T}$STRIP" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":" fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 echo "${ECHO_T}$ac_ct_STRIP" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi STRIP=$ac_ct_STRIP else STRIP="$ac_cv_prog_STRIP" fi old_CC="$CC" old_CFLAGS="$CFLAGS" # Set sane defaults for various variables test -z "$AR" && AR=ar test -z "$AR_FLAGS" && AR_FLAGS=cru test -z "$AS" && AS=as test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC test -z "$DLLTOOL" && DLLTOOL=dlltool test -z "$LD" && LD=ld test -z "$LN_S" && LN_S="ln -s" test -z "$MAGIC_CMD" && MAGIC_CMD=file test -z "$NM" && NM=nm test -z "$SED" && SED=sed test -z "$OBJDUMP" && OBJDUMP=objdump test -z "$RANLIB" && RANLIB=: test -z "$STRIP" && STRIP=: test -z "$ac_objext" && ac_objext=o # Determine commands to create old-style static archives. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in openbsd*) old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds" ;; *) old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" fi for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` # Only perform the check for file, if the check method requires it case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then echo "$as_me:$LINENO: checking for ${ac_tool_prefix}file" >&5 echo $ECHO_N "checking for ${ac_tool_prefix}file... $ECHO_C" >&6 if test "${lt_cv_path_MAGIC_CMD+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/${ac_tool_prefix}file; then lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac fi MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5 echo "${ECHO_T}$MAGIC_CMD" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then echo "$as_me:$LINENO: checking for file" >&5 echo $ECHO_N "checking for file... $ECHO_C" >&6 if test "${lt_cv_path_MAGIC_CMD+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/file; then lt_cv_path_MAGIC_CMD="$ac_dir/file" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac fi MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5 echo "${ECHO_T}$MAGIC_CMD" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi else MAGIC_CMD=: fi fi fi ;; esac enable_dlopen=no enable_win32_dll=no # Check whether --enable-libtool-lock or --disable-libtool-lock was given. if test "${enable_libtool_lock+set}" = set; then enableval="$enable_libtool_lock" fi; test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes # Check whether --with-pic or --without-pic was given. if test "${with_pic+set}" = set; then withval="$with_pic" pic_mode="$withval" else pic_mode=default fi; test -z "$pic_mode" && pic_mode=default # Use C for the default configuration in the libtool script tagname= lt_save_CC="$CC" ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu # Source file extension for C test sources. ac_ext=c # Object file extension for compiled C test sources. objext=o objext=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;\n" # Code to be used in simple link tests lt_simple_link_test_code='int main(){return(0);}\n' # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # Allow CC to be a program name with arguments. compiler=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext printf "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $rm conftest* ac_outfile=conftest.$ac_objext printf "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $rm conftest* # # Check for any special shared library compilation flags. # lt_prog_cc_shlib= if test "$GCC" = no; then case $host_os in sco3.2v5*) lt_prog_cc_shlib='-belf' ;; esac fi if test -n "$lt_prog_cc_shlib"; then { echo "$as_me:$LINENO: WARNING: \`$CC' requires \`$lt_prog_cc_shlib' to build shared libraries" >&5 echo "$as_me: WARNING: \`$CC' requires \`$lt_prog_cc_shlib' to build shared libraries" >&2;} if echo "$old_CC $old_CFLAGS " | grep "[ ]$lt_prog_cc_shlib[ ]" >/dev/null; then : else { echo "$as_me:$LINENO: WARNING: add \`$lt_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" >&5 echo "$as_me: WARNING: add \`$lt_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" >&2;} lt_cv_prog_cc_can_build_shared=no fi fi # # Check to make sure the static flag actually works. # echo "$as_me:$LINENO: checking if $compiler static flag $lt_prog_compiler_static works" >&5 echo $ECHO_N "checking if $compiler static flag $lt_prog_compiler_static works... $ECHO_C" >&6 if test "${lt_prog_compiler_static_works+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_prog_compiler_static_works=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $lt_prog_compiler_static" printf "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $echo "X$_lt_linker_boilerplate" | $Xsed > conftest.exp $SED '/^$/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_prog_compiler_static_works=yes fi else lt_prog_compiler_static_works=yes fi fi $rm conftest* LDFLAGS="$save_LDFLAGS" fi echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works" >&5 echo "${ECHO_T}$lt_prog_compiler_static_works" >&6 if test x"$lt_prog_compiler_static_works" = xyes; then : else lt_prog_compiler_static= fi lt_prog_compiler_no_builtin_flag= if test "$GCC" = yes; then lt_prog_compiler_no_builtin_flag=' -fno-builtin' echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6 if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_prog_compiler_rtti_exceptions=no ac_outfile=conftest.$ac_objext printf "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-fno-rtti -fno-exceptions" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:7409: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:7413: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $echo "X$_lt_compiler_boilerplate" | $Xsed >conftest.exp $SED '/^$/d' conftest.err >conftest.er2 if test ! -s conftest.err || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_rtti_exceptions=yes fi fi $rm conftest* fi echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 echo "${ECHO_T}$lt_cv_prog_compiler_rtti_exceptions" >&6 if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" else : fi fi lt_prog_compiler_wl= lt_prog_compiler_pic= lt_prog_compiler_static= echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 if test "$GCC" = yes; then lt_prog_compiler_wl='-Wl,' lt_prog_compiler_static='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' fi ;; amigaos*) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' ;; beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic='-DDLL_EXPORT' ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic='-fno-common' ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. lt_prog_compiler_can_build_shared=no enable_shared=no ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic=-Kconform_pic fi ;; hpux*) # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic='-fPIC' ;; esac ;; *) lt_prog_compiler_pic='-fPIC' ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) lt_prog_compiler_wl='-Wl,' if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' else lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' fi ;; darwin*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files case $cc_basename in xlc*) lt_prog_compiler_pic='-qnocommon' lt_prog_compiler_wl='-Wl,' ;; esac ;; mingw* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic='-DDLL_EXPORT' ;; hpux9* | hpux10* | hpux11*) lt_prog_compiler_wl='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? lt_prog_compiler_static='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) lt_prog_compiler_wl='-Wl,' # PIC (with -KPIC) is the default. lt_prog_compiler_static='-non_shared' ;; newsos6) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; linux*) case $cc_basename in icc* | ecc*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-static' ;; pgcc* | pgf77* | pgf90* | pgf95*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fpic' lt_prog_compiler_static='-Bstatic' ;; ccc*) lt_prog_compiler_wl='-Wl,' # All Alpha code is PIC. lt_prog_compiler_static='-non_shared' ;; esac ;; osf3* | osf4* | osf5*) lt_prog_compiler_wl='-Wl,' # All OSF/1 code is PIC. lt_prog_compiler_static='-non_shared' ;; sco3.2v5*) lt_prog_compiler_pic='-Kpic' lt_prog_compiler_static='-dn' ;; solaris*) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' case $cc_basename in f77* | f90* | f95*) lt_prog_compiler_wl='-Qoption ld ';; *) lt_prog_compiler_wl='-Wl,';; esac ;; sunos4*) lt_prog_compiler_wl='-Qoption ld ' lt_prog_compiler_pic='-PIC' lt_prog_compiler_static='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then lt_prog_compiler_pic='-Kconform_pic' lt_prog_compiler_static='-Bstatic' fi ;; unicos*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_can_build_shared=no ;; uts4*) lt_prog_compiler_pic='-pic' lt_prog_compiler_static='-Bstatic' ;; *) lt_prog_compiler_can_build_shared=no ;; esac fi echo "$as_me:$LINENO: result: $lt_prog_compiler_pic" >&5 echo "${ECHO_T}$lt_prog_compiler_pic" >&6 # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic"; then echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic works... $ECHO_C" >&6 if test "${lt_prog_compiler_pic_works+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_prog_compiler_pic_works=no ac_outfile=conftest.$ac_objext printf "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic -DPIC" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:7671: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:7675: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $echo "X$_lt_compiler_boilerplate" | $Xsed >conftest.exp $SED '/^$/d' conftest.err >conftest.er2 if test ! -s conftest.err || diff conftest.exp conftest.er2 >/dev/null; then lt_prog_compiler_pic_works=yes fi fi $rm conftest* fi echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works" >&5 echo "${ECHO_T}$lt_prog_compiler_pic_works" >&6 if test x"$lt_prog_compiler_pic_works" = xyes; then case $lt_prog_compiler_pic in "" | " "*) ;; *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;; esac else lt_prog_compiler_pic= lt_prog_compiler_can_build_shared=no fi fi case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic= ;; *) lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" ;; esac echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6 if test "${lt_cv_prog_compiler_c_o+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_prog_compiler_c_o=no $rm -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out printf "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:7733: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:7737: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $echo "X$_lt_compiler_boilerplate" | $Xsed > out/conftest.exp $SED '/^$/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.err || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o=yes fi fi chmod u+w . 2>&5 $rm conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files $rm out/* && rmdir out cd .. rmdir conftest $rm conftest* fi echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5 echo "${ECHO_T}$lt_cv_prog_compiler_c_o" >&6 hard_links="nottested" if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6 hard_links=yes $rm conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no echo "$as_me:$LINENO: result: $hard_links" >&5 echo "${ECHO_T}$hard_links" >&6 if test "$hard_links" = no; then { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} need_locks=warn fi else need_locks=no fi echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6 runpath_var= allow_undefined_flag= enable_shared_with_static_runtimes=no archive_cmds= archive_expsym_cmds= old_archive_From_new_cmds= old_archive_from_expsyms_cmds= export_dynamic_flag_spec= whole_archive_flag_spec= thread_safe_flag_spec= hardcode_libdir_flag_spec= hardcode_libdir_flag_spec_ld= hardcode_libdir_separator= hardcode_direct=no hardcode_minus_L=no hardcode_shlibpath_var=unsupported link_all_deplibs=unknown hardcode_automatic=no module_cmds= module_expsym_cmds= always_export_symbols=no export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list include_expsyms= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. exclude_expsyms="_GLOBAL_OFFSET_TABLE_" # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. extract_expsyms_cmds= # Just being paranoid about ensuring that cc_basename is set. for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` case $host_os in cygwin* | mingw* | pw32*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; openbsd*) with_gnu_ld=no ;; esac ld_shlibs=yes if test "$with_gnu_ld" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir' export_dynamic_flag_spec='${wl}--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else whole_archive_flag_spec= fi supports_anon_versioning=no case `$LD -v 2>/dev/null` in *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix3* | aix4* | aix5*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then ld_shlibs=no cat <&2 *** Warning: the GNU linker, at least up to release 2.9.1, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to modify your PATH *** so that a non-GNU linker is found, and then restart. EOF fi ;; amigaos*) archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes # Samuel A. Falvo II reports # that the semantics of dynamic libraries on AmigaOS, at least up # to version 4, is to share data among multiple programs linked # with the same dynamic library. Since this doesn't match the # behavior of shared libraries on other platforms, we can't use # them. ld_shlibs=no ;; beos*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then allow_undefined_flag=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else ld_shlibs=no fi ;; cygwin* | mingw* | pw32*) # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec='-L$libdir' allow_undefined_flag=unsupported always_export_symbols=no enable_shared_with_static_runtimes=yes export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols' if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' else ld_shlibs=no fi ;; linux*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then tmp_addflag= case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; esac archive_cmds='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test $supports_anon_versioning = yes; then archive_expsym_cmds='$echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ $echo "local: *; };" >> $output_objdir/$libname.ver~ $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi else ld_shlibs=no fi ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris* | sysv5*) if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then ld_shlibs=no cat <&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. EOF elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; sunos4*) archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= hardcode_direct=yes hardcode_shlibpath_var=no ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; esac if test "$ld_shlibs" = no; then runpath_var= hardcode_libdir_flag_spec= export_dynamic_flag_spec= whole_archive_flag_spec= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) allow_undefined_flag=unsupported always_export_symbols=yes archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. hardcode_minus_L=yes if test "$GCC" = yes && test -z "$link_static_flag"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct=unsupported fi ;; aix4* | aix5*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | grep 'GNU' > /dev/null; then export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' else export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[23]|aix4.[23].*|aix5*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds='' hardcode_direct=yes hardcode_libdir_separator=':' link_all_deplibs=yes if test "$GCC" = yes; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && \ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 hardcode_direct=yes else # We have old collect2 hardcode_direct=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking hardcode_minus_L=yes hardcode_libdir_flag_spec='-L$libdir' hardcode_libdir_separator= fi esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. always_export_symbols=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. allow_undefined_flag='-berok' # Determine the default libpath from the value encoded in an empty executable. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'`; fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' allow_undefined_flag="-z nodefs" archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an empty executable. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'`; fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag=' ${wl}-bernotok' allow_undefined_flag=' ${wl}-berok' # -bexpall does not export symbols beginning with underscore (_) always_export_symbols=yes # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec=' ' archive_cmds_need_lc=yes # This is similar to how AIX traditionally builds its shared libraries. archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; amigaos*) archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes # see comment about different semantics on the GNU ld section ld_shlibs=no ;; bsdi[45]*) export_dynamic_flag_spec=-rdynamic ;; cygwin* | mingw* | pw32*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. hardcode_libdir_flag_spec=' ' allow_undefined_flag=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. old_archive_From_new_cmds='true' # FIXME: Should let the user specify the lib program. old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs' fix_srcfile_path='`cygpath -w "$srcfile"`' enable_shared_with_static_runtimes=yes ;; darwin* | rhapsody*) case $host_os in rhapsody* | darwin1.[012]) allow_undefined_flag='${wl}-undefined ${wl}suppress' ;; *) # Darwin 1.3 on if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' else case ${MACOSX_DEPLOYMENT_TARGET} in 10.[012]) allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) allow_undefined_flag='${wl}-undefined ${wl}dynamic_lookup' ;; esac fi ;; esac archive_cmds_need_lc=no hardcode_direct=no hardcode_automatic=yes hardcode_shlibpath_var=unsupported whole_archive_flag_spec='' link_all_deplibs=yes if test "$GCC" = yes ; then output_verbose_link_cmd='echo' archive_cmds='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' module_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' else case $cc_basename in xlc*) output_verbose_link_cmd='echo' archive_cmds='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' module_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ;; *) ld_shlibs=no ;; esac fi ;; dgux*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-L$libdir' hardcode_shlibpath_var=no ;; freebsd1*) ld_shlibs=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | kfreebsd*-gnu | dragonfly*) archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; hpux9*) if test "$GCC" = yes; then archive_cmds='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else archive_cmds='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: hardcode_direct=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes export_dynamic_flag_spec='${wl}-E' ;; hpux10* | hpux11*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then case $host_cpu in hppa*64*|ia64*) archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*|ia64*) archive_cmds='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags' ;; *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;; esac fi if test "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_flag_spec_ld='+b $libdir' hardcode_libdir_separator=: hardcode_direct=no hardcode_shlibpath_var=no ;; ia64*) hardcode_libdir_flag_spec='-L$libdir' hardcode_direct=no hardcode_shlibpath_var=no # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes ;; *) hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: hardcode_direct=yes export_dynamic_flag_spec='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_ld='-rpath $libdir' fi hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: link_all_deplibs=yes ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; newsos6) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: hardcode_shlibpath_var=no ;; openbsd*) hardcode_direct=yes hardcode_shlibpath_var=no if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' hardcode_libdir_flag_spec='${wl}-rpath,$libdir' export_dynamic_flag_spec='${wl}-E' else case $host_os in openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-R$libdir' ;; *) archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='${wl}-rpath,$libdir' ;; esac fi ;; os2*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes allow_undefined_flag=unsupported archive_cmds='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' old_archive_From_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else allow_undefined_flag=' -expect_unresolved \*' archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' fi hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' else allow_undefined_flag=' -expect_unresolved \*' archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp' # Both c and cxx compiler support -rpath directly hardcode_libdir_flag_spec='-rpath $libdir' fi hardcode_libdir_separator=: ;; sco3.2v5*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var=no export_dynamic_flag_spec='${wl}-Bexport' runpath_var=LD_RUN_PATH hardcode_runpath_var=yes ;; solaris*) no_undefined_flag=' -z text' if test "$GCC" = yes; then wlarc='${wl}' archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' else wlarc='' archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' fi hardcode_libdir_flag_spec='-R$libdir' hardcode_shlibpath_var=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # The compiler driver will combine linker options so we # cannot just pass the convience library names through # without $wl, iff we do not link with $LD. # Luckily, gcc supports the same syntax we need for Sun Studio. # Supported since Solaris 2.6 (maybe 2.5.1?) case $wlarc in '') whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;; *) whole_archive_flag_spec='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;; esac ;; esac link_all_deplibs=yes ;; sunos4*) if test "x$host_vendor" = xsequent; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi hardcode_libdir_flag_spec='-L$libdir' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; sysv4) case $host_vendor in sni) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' reload_cmds='$CC -r -o $output$reload_objs' hardcode_direct=no ;; motorola) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' hardcode_shlibpath_var=no ;; sysv4.3*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var=no export_dynamic_flag_spec='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes ld_shlibs=yes fi ;; sysv4.2uw2*) archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_minus_L=no hardcode_shlibpath_var=no hardcode_runpath_var=yes runpath_var=LD_RUN_PATH ;; sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[78]* | unixware7*) no_undefined_flag='${wl}-z ${wl}text' if test "$GCC" = yes; then archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' fi runpath_var='LD_RUN_PATH' hardcode_shlibpath_var=no ;; sysv5*) no_undefined_flag=' -z text' # $CC -shared without GNU ld will not create a library from C++ # object files and a static libstdc++, better avoid it by now archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' hardcode_libdir_flag_spec= hardcode_shlibpath_var=no runpath_var='LD_RUN_PATH' ;; uts4*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-L$libdir' hardcode_shlibpath_var=no ;; *) ld_shlibs=no ;; esac fi echo "$as_me:$LINENO: result: $ld_shlibs" >&5 echo "${ECHO_T}$ld_shlibs" >&6 test "$ld_shlibs" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc" in x|xyes) # Assume -lc should be added archive_cmds_need_lc=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $archive_cmds in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6 $rm conftest* printf "$lt_simple_compile_test_code" > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag allow_undefined_flag= if { (eval echo "$as_me:$LINENO: \"$archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 (eval $archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } then archive_cmds_need_lc=no else archive_cmds_need_lc=yes fi allow_undefined_flag=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $rm conftest* echo "$as_me:$LINENO: result: $archive_cmds_need_lc" >&5 echo "${ECHO_T}$archive_cmds_need_lc" >&6 ;; esac fi ;; esac echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6 library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" if test "$GCC" = yes; then sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix4* | aix5*) version_type=linux need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[45]*) version_type=linux need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$host_os in yes,cygwin* | yes,mingw* | yes,pw32*) library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $rm \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" ;; mingw*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH printed by # mingw gcc, but we are running on Cygwin. Gcc prints its search # path with ; separators, and with drive letters. We can handle the # drive letters (cygwin fileutils understands them), so leave them, # especially as we might pass files found there to a mingw objdump, # which wouldn't understand a cygwinified path. Ahh. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac ;; *) library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' ;; esac dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. if test "$GCC" = yes; then sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` else sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' fi sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd1*) dynamic_linker=no ;; kfreebsd*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='GNU ld.so' ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[123]*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; *) # from 3.2 on shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555. postinstall_cmds='chmod 555 $lib' ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be Linux ELF. linux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; knetbsd*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='GNU ld.so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; nto-qnx*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; openbsd*) version_type=sunos need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[89] | openbsd2.[89].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; sco3.2v5*) version_type=osf soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH ;; solaris*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no export_dynamic_flag_spec='${wl}-Blargedynsym' runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac echo "$as_me:$LINENO: result: $dynamic_linker" >&5 echo "${ECHO_T}$dynamic_linker" >&6 test "$dynamic_linker" = no && can_build_shared=no echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6 hardcode_action= if test -n "$hardcode_libdir_flag_spec" || \ test -n "$runpath_var" || \ test "X$hardcode_automatic" = "Xyes" ; then # We can hardcode non-existant directories. if test "$hardcode_direct" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, )" != no && test "$hardcode_minus_L" != no; then # Linking always hardcodes the temporary library directory. hardcode_action=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action=unsupported fi echo "$as_me:$LINENO: result: $hardcode_action" >&5 echo "${ECHO_T}$hardcode_action" >&6 if test "$hardcode_action" = relink; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi striplib= old_striplib= echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5 echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&6 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) if test -n "$STRIP" ; then striplib="$STRIP -x" echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi ;; *) echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 ;; esac fi if test "x$enable_dlopen" != xyes; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen="load_add_on" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32*) lt_cv_dlopen="LoadLibrary" lt_cv_dlopen_libs= ;; cygwin*) lt_cv_dlopen="dlopen" lt_cv_dlopen_libs= ;; darwin*) # if libdl is installed we need to link against it echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6 if test "${ac_cv_lib_dl_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char dlopen (); int main () { dlopen (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_dl_dlopen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dl_dlopen=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6 if test $ac_cv_lib_dl_dlopen = yes; then lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else lt_cv_dlopen="dyld" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes fi ;; *) echo "$as_me:$LINENO: checking for shl_load" >&5 echo $ECHO_N "checking for shl_load... $ECHO_C" >&6 if test "${ac_cv_func_shl_load+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define shl_load to an innocuous variant, in case declares shl_load. For example, HP-UX 11i declares gettimeofday. */ #define shl_load innocuous_shl_load /* System header to define __stub macros and hopefully few prototypes, which can conflict with char shl_load (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef shl_load /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char shl_load (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_shl_load) || defined (__stub___shl_load) choke me #else char (*f) () = shl_load; #endif #ifdef __cplusplus } #endif int main () { return f != shl_load; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_shl_load=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_shl_load=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5 echo "${ECHO_T}$ac_cv_func_shl_load" >&6 if test $ac_cv_func_shl_load = yes; then lt_cv_dlopen="shl_load" else echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6 if test "${ac_cv_lib_dld_shl_load+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char shl_load (); int main () { shl_load (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_dld_shl_load=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dld_shl_load=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6 if test $ac_cv_lib_dld_shl_load = yes; then lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld" else echo "$as_me:$LINENO: checking for dlopen" >&5 echo $ECHO_N "checking for dlopen... $ECHO_C" >&6 if test "${ac_cv_func_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define dlopen to an innocuous variant, in case declares dlopen. For example, HP-UX 11i declares gettimeofday. */ #define dlopen innocuous_dlopen /* System header to define __stub macros and hopefully few prototypes, which can conflict with char dlopen (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef dlopen /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char dlopen (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_dlopen) || defined (__stub___dlopen) choke me #else char (*f) () = dlopen; #endif #ifdef __cplusplus } #endif int main () { return f != dlopen; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_dlopen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_dlopen=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5 echo "${ECHO_T}$ac_cv_func_dlopen" >&6 if test $ac_cv_func_dlopen = yes; then lt_cv_dlopen="dlopen" else echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6 if test "${ac_cv_lib_dl_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char dlopen (); int main () { dlopen (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_dl_dlopen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dl_dlopen=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6 if test $ac_cv_lib_dl_dlopen = yes; then lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5 echo $ECHO_N "checking for dlopen in -lsvld... $ECHO_C" >&6 if test "${ac_cv_lib_svld_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsvld $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char dlopen (); int main () { dlopen (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_svld_dlopen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_svld_dlopen=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5 echo "${ECHO_T}$ac_cv_lib_svld_dlopen" >&6 if test $ac_cv_lib_svld_dlopen = yes; then lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" else echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5 echo $ECHO_N "checking for dld_link in -ldld... $ECHO_C" >&6 if test "${ac_cv_lib_dld_dld_link+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char dld_link (); int main () { dld_link (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_dld_dld_link=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dld_dld_link=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5 echo "${ECHO_T}$ac_cv_lib_dld_dld_link" >&6 if test $ac_cv_lib_dld_dld_link = yes; then lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld" fi fi fi fi fi fi ;; esac if test "x$lt_cv_dlopen" != xno; then enable_dlopen=yes else enable_dlopen=no fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS="$CPPFLAGS" test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS="$LDFLAGS" eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS="$LIBS" LIBS="$lt_cv_dlopen_libs $LIBS" echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5 echo $ECHO_N "checking whether a program can dlopen itself... $ECHO_C" >&6 if test "${lt_cv_dlopen_self+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then : lt_cv_dlopen_self=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif #ifdef __cplusplus extern "C" void exit (int); #endif void fnord() { int i=42;} int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; /* dlclose (self); */ } exit (status); } EOF if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; x$lt_unknown|x*) lt_cv_dlopen_self=no ;; esac else : # compilation failed lt_cv_dlopen_self=no fi fi rm -fr conftest* fi echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5 echo "${ECHO_T}$lt_cv_dlopen_self" >&6 if test "x$lt_cv_dlopen_self" = xyes; then LDFLAGS="$LDFLAGS $link_static_flag" echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5 echo $ECHO_N "checking whether a statically linked program can dlopen itself... $ECHO_C" >&6 if test "${lt_cv_dlopen_self_static+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then : lt_cv_dlopen_self_static=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif #ifdef __cplusplus extern "C" void exit (int); #endif void fnord() { int i=42;} int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; /* dlclose (self); */ } exit (status); } EOF if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_unknown|x*) lt_cv_dlopen_self_static=no ;; esac else : # compilation failed lt_cv_dlopen_self_static=no fi fi rm -fr conftest* fi echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5 echo "${ECHO_T}$lt_cv_dlopen_self_static" >&6 fi CPPFLAGS="$save_CPPFLAGS" LDFLAGS="$save_LDFLAGS" LIBS="$save_LIBS" ;; esac case $lt_cv_dlopen_self in yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; *) enable_dlopen_self=unknown ;; esac case $lt_cv_dlopen_self_static in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; *) enable_dlopen_self_static=unknown ;; esac fi # Report which librarie types wil actually be built echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5 echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6 echo "$as_me:$LINENO: result: $can_build_shared" >&5 echo "${ECHO_T}$can_build_shared" >&6 echo "$as_me:$LINENO: checking whether to build shared libraries" >&5 echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&6 test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix4* | aix5*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac echo "$as_me:$LINENO: result: $enable_shared" >&5 echo "${ECHO_T}$enable_shared" >&6 echo "$as_me:$LINENO: checking whether to build static libraries" >&5 echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6 # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes echo "$as_me:$LINENO: result: $enable_static" >&5 echo "${ECHO_T}$enable_static" >&6 # The else clause should only fire when bootstrapping the # libtool distribution, otherwise you forgot to ship ltmain.sh # with your package, and you will get complaints that there are # no rules to generate ltmain.sh. if test -f "$ltmain"; then # See if we are running on zsh, and set the options which allow our commands through # without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi # Now quote all the things that may contain metacharacters while being # careful not to overquote the AC_SUBSTed values. We take copies of the # variables and quote the copies for generation of the libtool script. for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \ SED SHELL STRIP \ libname_spec library_names_spec soname_spec extract_expsyms_cmds \ old_striplib striplib file_magic_cmd finish_cmds finish_eval \ deplibs_check_method reload_flag reload_cmds need_locks \ lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ old_postinstall_cmds old_postuninstall_cmds \ compiler \ CC \ LD \ lt_prog_compiler_wl \ lt_prog_compiler_pic \ lt_prog_compiler_static \ lt_prog_compiler_no_builtin_flag \ export_dynamic_flag_spec \ thread_safe_flag_spec \ whole_archive_flag_spec \ enable_shared_with_static_runtimes \ old_archive_cmds \ old_archive_from_new_cmds \ predep_objects \ postdep_objects \ predeps \ postdeps \ compiler_lib_search_path \ archive_cmds \ archive_expsym_cmds \ postinstall_cmds \ postuninstall_cmds \ old_archive_from_expsyms_cmds \ allow_undefined_flag \ no_undefined_flag \ export_symbols_cmds \ hardcode_libdir_flag_spec \ hardcode_libdir_flag_spec_ld \ hardcode_libdir_separator \ hardcode_automatic \ module_cmds \ module_expsym_cmds \ lt_cv_prog_compiler_c_o \ exclude_expsyms \ include_expsyms; do case $var in old_archive_cmds | \ old_archive_from_new_cmds | \ archive_cmds | \ archive_expsym_cmds | \ module_cmds | \ module_expsym_cmds | \ old_archive_from_expsyms_cmds | \ export_symbols_cmds | \ extract_expsyms_cmds | reload_cmds | finish_cmds | \ postinstall_cmds | postuninstall_cmds | \ old_postinstall_cmds | old_postuninstall_cmds | \ sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) # Double-quote double-evaled strings. eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" ;; *) eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" ;; esac done case $lt_echo in *'\$0 --fallback-echo"') lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` ;; esac cfgfile="${ofile}T" trap "$rm \"$cfgfile\"; exit 1" 1 2 15 $rm -f "$cfgfile" { echo "$as_me:$LINENO: creating $ofile" >&5 echo "$as_me: creating $ofile" >&6;} cat <<__EOF__ >> "$cfgfile" #! $SHELL # `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services. # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) # NOTE: Changes made to this file will be lost: look at ltmain.sh. # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001 # Free Software Foundation, Inc. # # This file is part of GNU Libtool: # Originally by Gordon Matzigkeit , 1996 # # 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 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # A sed program that does not truncate output. SED=$lt_SED # Sed that helps us avoid accidentally triggering echo(1) options like -n. Xsed="$SED -e 1s/^X//" # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # The names of the tagged configurations supported by this script. available_tags= # ### BEGIN LIBTOOL CONFIG # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc # Whether or not to disallow shared libs when runtime libs are static allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # The host system. host_alias=$host_alias host=$host host_os=$host_os # The build system. build_alias=$build_alias build=$build build_os=$build_os # An echo program that does not interpret backslashes. echo=$lt_echo # The archiver. AR=$lt_AR AR_FLAGS=$lt_AR_FLAGS # A C compiler. LTCC=$lt_LTCC # A language-specific compiler. CC=$lt_compiler # Is the compiler the GNU C compiler? with_gcc=$GCC # An ERE matcher. EGREP=$lt_EGREP # The linker used to build libraries. LD=$lt_LD # Whether we need hard or soft links. LN_S=$lt_LN_S # A BSD-compatible nm program. NM=$lt_NM # A symbol stripping program STRIP=$lt_STRIP # Used to examine libraries when file_magic_cmd begins "file" MAGIC_CMD=$MAGIC_CMD # Used on cygwin: DLL creation program. DLLTOOL="$DLLTOOL" # Used on cygwin: object dumper. OBJDUMP="$OBJDUMP" # Used on cygwin: assembler. AS="$AS" # The name of the directory that contains temporary libtool files. objdir=$objdir # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl # Object file suffix (normally "o"). objext="$ac_objext" # Old archive suffix (normally "a"). libext="$libext" # Shared library suffix (normally ".so"). shrext_cmds='$shrext_cmds' # Executable file suffix (normally ""). exeext="$exeext" # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic pic_mode=$pic_mode # What is the maximum length of a command? max_cmd_len=$lt_cv_sys_max_cmd_len # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o # Must we lock files when doing compilation? need_locks=$lt_need_locks # Do we need the lib prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec # Compiler flag to generate thread-safe objects. thread_safe_flag_spec=$lt_thread_safe_flag_spec # Library versioning type. version_type=$version_type # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME. library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Commands used to build and install an old-style archive. RANLIB=$lt_RANLIB old_archive_cmds=$lt_old_archive_cmds old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds # Commands used to build and install a shared archive. archive_cmds=$lt_archive_cmds archive_expsym_cmds=$lt_archive_expsym_cmds postinstall_cmds=$lt_postinstall_cmds postuninstall_cmds=$lt_postuninstall_cmds # Commands used to build a loadable module (assumed same as above if empty) module_cmds=$lt_module_cmds module_expsym_cmds=$lt_module_expsym_cmds # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # Dependencies to place before the objects being linked to create a # shared library. predep_objects=$lt_predep_objects # Dependencies to place after the objects being linked to create a # shared library. postdep_objects=$lt_postdep_objects # Dependencies to place before the objects being linked to create a # shared library. predeps=$lt_predeps # Dependencies to place after the objects being linked to create a # shared library. postdeps=$lt_postdeps # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_compiler_lib_search_path # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method == file_magic. file_magic_cmd=$lt_file_magic_cmd # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag # Flag that forces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # Same as above, but a single script fragment to be evaled but not shown. finish_eval=$lt_finish_eval # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # This is the shared library runtime path variable. runpath_var=$runpath_var # This is the shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist. hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec # If ld is used when linking, flag to hardcode \$libdir into # a binary during linking. This must work even if \$libdir does # not exist. hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld # Whether we need a single -rpath flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the # resulting binary. hardcode_direct=$hardcode_direct # Set to yes if using the -LDIR flag during linking hardcodes DIR into the # resulting binary. hardcode_minus_L=$hardcode_minus_L # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into # the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var # Set to yes if building a shared library automatically hardcodes DIR into the library # and all subsequent libraries and executables linked against it. hardcode_automatic=$hardcode_automatic # Variables whose values should be saved in libtool wrapper scripts and # restored at relink time. variables_saved_for_relink="$variables_saved_for_relink" # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs # Compile-time system search path for libraries sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Fix the shell variable \$srcfile for the compiler. fix_srcfile_path="$fix_srcfile_path" # Set to yes if exported symbols are required. always_export_symbols=$always_export_symbols # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms # Symbols that must always be exported. include_expsyms=$lt_include_expsyms # ### END LIBTOOL CONFIG __EOF__ case $host_os in aix3*) cat <<\EOF >> "$cfgfile" # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi EOF ;; esac # We use sed instead of cat because bash on DJGPP gets confused if # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1) mv -f "$cfgfile" "$ofile" || \ (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" else # If there is no Makefile yet, we rely on a make rule to execute # `config.status --recheck' to rerun these tests and create the # libtool script then. ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` if test -f "$ltmain_in"; then test -f Makefile && make "$ltmain" fi fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu CC="$lt_save_CC" # Check whether --with-tags or --without-tags was given. if test "${with_tags+set}" = set; then withval="$with_tags" tagnames="$withval" fi; if test -f "$ltmain" && test -n "$tagnames"; then if test ! -f "${ofile}"; then { echo "$as_me:$LINENO: WARNING: output file \`$ofile' does not exist" >&5 echo "$as_me: WARNING: output file \`$ofile' does not exist" >&2;} fi if test -z "$LTCC"; then eval "`$SHELL ${ofile} --config | grep '^LTCC='`" if test -z "$LTCC"; then { echo "$as_me:$LINENO: WARNING: output file \`$ofile' does not look like a libtool script" >&5 echo "$as_me: WARNING: output file \`$ofile' does not look like a libtool script" >&2;} else { echo "$as_me:$LINENO: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&5 echo "$as_me: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&2;} fi fi # Extract list of available tagged configurations in $ofile. # Note that this assumes the entire list is on one line. available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'` lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for tagname in $tagnames; do IFS="$lt_save_ifs" # Check whether tagname contains only valid characters case `$echo "X$tagname" | $Xsed -e 's:[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]::g'` in "") ;; *) { { echo "$as_me:$LINENO: error: invalid tag name: $tagname" >&5 echo "$as_me: error: invalid tag name: $tagname" >&2;} { (exit 1); exit 1; }; } ;; esac if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null then { { echo "$as_me:$LINENO: error: tag name \"$tagname\" already exists" >&5 echo "$as_me: error: tag name \"$tagname\" already exists" >&2;} { (exit 1); exit 1; }; } fi # Update the list of available tags. if test -n "$tagname"; then echo appending configuration tag \"$tagname\" to $ofile case $tagname in CXX) if test -n "$CXX" && ( test "X$CXX" != "Xno" && ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || (test "X$CXX" != "Xg++"))) ; then ac_ext=cc ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu archive_cmds_need_lc_CXX=no allow_undefined_flag_CXX= always_export_symbols_CXX=no archive_expsym_cmds_CXX= export_dynamic_flag_spec_CXX= hardcode_direct_CXX=no hardcode_libdir_flag_spec_CXX= hardcode_libdir_flag_spec_ld_CXX= hardcode_libdir_separator_CXX= hardcode_minus_L_CXX=no hardcode_automatic_CXX=no module_cmds_CXX= module_expsym_cmds_CXX= link_all_deplibs_CXX=unknown old_archive_cmds_CXX=$old_archive_cmds no_undefined_flag_CXX= whole_archive_flag_spec_CXX= enable_shared_with_static_runtimes_CXX=no # Dependencies to place before and after the object being linked: predep_objects_CXX= postdep_objects_CXX= predeps_CXX= postdeps_CXX= compiler_lib_search_path_CXX= # Source file extension for C++ test sources. ac_ext=cpp # Object file extension for compiled C++ test sources. objext=o objext_CXX=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;\n" # Code to be used in simple link tests lt_simple_link_test_code='int main(int, char *) { return(0); }\n' # ltmain only uses $CC for tagged configurations so make sure $CC is set. # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # Allow CC to be a program name with arguments. compiler=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext printf "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $rm conftest* ac_outfile=conftest.$ac_objext printf "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $rm conftest* # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_LD=$LD lt_save_GCC=$GCC GCC=$GXX lt_save_with_gnu_ld=$with_gnu_ld lt_save_path_LD=$lt_cv_path_LD if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx else unset lt_cv_prog_gnu_ld fi if test -n "${lt_cv_path_LDCXX+set}"; then lt_cv_path_LD=$lt_cv_path_LDCXX else unset lt_cv_path_LD fi test -z "${LDCXX+set}" || LD=$LDCXX CC=${CXX-"c++"} compiler=$CC compiler_CXX=$CC for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` # We don't want -fno-exception wen compiling C++ code, so set the # no_builtin_flag separately if test "$GXX" = yes; then lt_prog_compiler_no_builtin_flag_CXX=' -fno-builtin' else lt_prog_compiler_no_builtin_flag_CXX= fi if test "$GXX" = yes; then # Set up default GNU C++ configuration # Check whether --with-gnu-ld or --without-gnu-ld was given. if test "${with_gnu_ld+set}" = set; then withval="$with_gnu_ld" test "$withval" = no || with_gnu_ld=yes else with_gnu_ld=no fi; ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. echo "$as_me:$LINENO: checking for ld used by $CC" >&5 echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6 case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [\\/]* | ?:[\\/]*) re_direlt='/[^/][^/]*/\.\./' # Canonicalize the pathname of ld ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'` while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then echo "$as_me:$LINENO: checking for GNU ld" >&5 echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6 else echo "$as_me:$LINENO: checking for non-GNU ld" >&5 echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6 fi if test "${lt_cv_path_LD+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -z "$LD"; then lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &5 echo "${ECHO_T}$LD" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} { (exit 1); exit 1; }; } echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6 if test "${lt_cv_prog_gnu_ld+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 &5 echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6 with_gnu_ld=$lt_cv_prog_gnu_ld # Check if GNU C++ uses GNU ld as the underlying linker, since the # archiving commands below assume that GNU ld is being used. if test "$with_gnu_ld" = yes; then archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' # If archive_cmds runs LD, not CC, wlarc should be empty # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to # investigate it a little bit more. (MM) wlarc='${wl}' # ancient GNU ld didn't support --whole-archive et. al. if eval "`$CC -print-prog-name=ld` --help 2>&1" | \ grep 'no-whole-archive' > /dev/null; then whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else whole_archive_flag_spec_CXX= fi else with_gnu_ld=no wlarc= # A generic and very simple default shared library creation # command for GNU C++ for the case where it uses the native # linker, instead of GNU ld. If possible, this setting should # overridden to take advantage of the native linker features on # the platform it is being used on. archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' fi # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' else GXX=no with_gnu_ld=no wlarc= fi # PORTME: fill in a description of your system's C++ link characteristics echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6 ld_shlibs_CXX=yes case $host_os in aix3*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; aix4* | aix5*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[23]|aix4.[23].*|aix5*) for ld_flag in $LDFLAGS; do case $ld_flag in *-brtl*) aix_use_runtimelinking=yes break ;; esac done esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds_CXX='' hardcode_direct_CXX=yes hardcode_libdir_separator_CXX=':' link_all_deplibs_CXX=yes if test "$GXX" = yes; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && \ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 hardcode_direct_CXX=yes else # We have old collect2 hardcode_direct_CXX=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking hardcode_minus_L_CXX=yes hardcode_libdir_flag_spec_CXX='-L$libdir' hardcode_libdir_separator_CXX= fi esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. always_export_symbols_CXX=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. allow_undefined_flag_CXX='-berok' # Determine the default libpath from the value encoded in an empty executable. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'`; fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds_CXX="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec_CXX='${wl}-R $libdir:/usr/lib:/lib' allow_undefined_flag_CXX="-z nodefs" archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an empty executable. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'`; fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag_CXX=' ${wl}-bernotok' allow_undefined_flag_CXX=' ${wl}-berok' # -bexpall does not export symbols beginning with underscore (_) always_export_symbols_CXX=yes # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec_CXX=' ' archive_cmds_need_lc_CXX=yes # This is similar to how AIX traditionally builds its shared libraries. archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; chorus*) case $cc_basename in *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; cygwin* | mingw* | pw32*) # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec_CXX='-L$libdir' allow_undefined_flag_CXX=unsupported always_export_symbols_CXX=no enable_shared_with_static_runtimes_CXX=yes if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' else ld_shlibs_CXX=no fi ;; darwin* | rhapsody*) case $host_os in rhapsody* | darwin1.[012]) allow_undefined_flag_CXX='${wl}-undefined ${wl}suppress' ;; *) # Darwin 1.3 on if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then allow_undefined_flag_CXX='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' else case ${MACOSX_DEPLOYMENT_TARGET} in 10.[012]) allow_undefined_flag_CXX='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) allow_undefined_flag_CXX='${wl}-undefined ${wl}dynamic_lookup' ;; esac fi ;; esac archive_cmds_need_lc_CXX=no hardcode_direct_CXX=no hardcode_automatic_CXX=yes hardcode_shlibpath_var_CXX=unsupported whole_archive_flag_spec_CXX='' link_all_deplibs_CXX=yes if test "$GXX" = yes ; then lt_int_apple_cc_single_mod=no output_verbose_link_cmd='echo' if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then lt_int_apple_cc_single_mod=yes fi if test "X$lt_int_apple_cc_single_mod" = Xyes ; then archive_cmds_CXX='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' else archive_cmds_CXX='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring' fi module_cmds_CXX='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds if test "X$lt_int_apple_cc_single_mod" = Xyes ; then archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' else archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' fi module_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' else case $cc_basename in xlc*) output_verbose_link_cmd='echo' archive_cmds_CXX='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' module_cmds_CXX='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' module_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ;; *) ld_shlibs_CXX=no ;; esac fi ;; dgux*) case $cc_basename in ec++*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; ghcx*) # Green Hills C++ Compiler # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; freebsd[12]*) # C++ shared libraries reported to be fairly broken before switch to ELF ld_shlibs_CXX=no ;; freebsd-elf*) archive_cmds_need_lc_CXX=no ;; freebsd* | kfreebsd*-gnu | dragonfly*) # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF # conventions ld_shlibs_CXX=yes ;; gnu*) ;; hpux9*) hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' hardcode_libdir_separator_CXX=: export_dynamic_flag_spec_CXX='${wl}-E' hardcode_direct_CXX=yes hardcode_minus_L_CXX=yes # Not in the search PATH, # but as the default # location of the library. case $cc_basename in CC*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; aCC*) archive_cmds_CXX='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "[-]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes; then archive_cmds_CXX='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else # FIXME: insert proper C++ library support ld_shlibs_CXX=no fi ;; esac ;; hpux10*|hpux11*) if test $with_gnu_ld = no; then case $host_cpu in hppa*64*) hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' hardcode_libdir_flag_spec_ld_CXX='+b $libdir' hardcode_libdir_separator_CXX=: ;; ia64*) hardcode_libdir_flag_spec_CXX='-L$libdir' ;; *) hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' hardcode_libdir_separator_CXX=: export_dynamic_flag_spec_CXX='${wl}-E' ;; esac fi case $host_cpu in hppa*64*) hardcode_direct_CXX=no hardcode_shlibpath_var_CXX=no ;; ia64*) hardcode_direct_CXX=no hardcode_shlibpath_var_CXX=no hardcode_minus_L_CXX=yes # Not in the search PATH, # but as the default # location of the library. ;; *) hardcode_direct_CXX=yes hardcode_minus_L_CXX=yes # Not in the search PATH, # but as the default # location of the library. ;; esac case $cc_basename in CC*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; aCC*) case $host_cpu in hppa*64*|ia64*) archive_cmds_CXX='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs' ;; *) archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes; then if test $with_gnu_ld = no; then case $host_cpu in ia64*|hppa*64*) archive_cmds_CXX='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs' ;; *) archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac fi else # FIXME: insert proper C++ library support ld_shlibs_CXX=no fi ;; esac ;; irix5* | irix6*) case $cc_basename in CC*) # SGI C++ archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' # Archives containing C++ object files must be created using # "CC -ar", where "CC" is the IRIX C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. old_archive_cmds_CXX='$CC -ar -WR,-u -o $oldlib $oldobjs' ;; *) if test "$GXX" = yes; then if test "$with_gnu_ld" = no; then archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib' fi fi link_all_deplibs_CXX=yes ;; esac hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_CXX=: ;; linux*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' archive_expsym_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | grep "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' hardcode_libdir_flag_spec_CXX='${wl}--rpath,$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' ;; icpc*) # Intel C++ with_gnu_ld=yes # version 8.0 and above of icpc choke on multiply defined symbols # if we add $predep_objects and $postdep_objects, however 7.1 and # earlier do not add the objects themselves. case `$CC -V 2>&1` in *"Version 7."*) archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; *) # Version 8.0 or newer tmp_idyn= case $host_cpu in ia64*) tmp_idyn=' -i_dynamic';; esac archive_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; esac archive_cmds_need_lc_CXX=no hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive' ;; pgCC*) # Portland Group C++ compiler archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' whole_archive_flag_spec_CXX='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' ;; cxx*) # Compaq C++ archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec_CXX='-rpath $libdir' hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; esac ;; lynxos*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; m88k*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; mvs*) case $cc_basename in cxx*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds_CXX='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' wlarc= hardcode_libdir_flag_spec_CXX='-R$libdir' hardcode_direct_CXX=yes hardcode_shlibpath_var_CXX=no fi # Workaround some broken pre-1.5 toolchains output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' ;; openbsd2*) # C++ shared libraries are fairly broken ld_shlibs_CXX=no ;; openbsd*) hardcode_direct_CXX=yes hardcode_shlibpath_var_CXX=no archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' export_dynamic_flag_spec_CXX='${wl}-E' whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' fi output_verbose_link_cmd='echo' ;; osf3*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' hardcode_libdir_separator_CXX=: # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' ;; RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; cxx*) allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes && test "$with_gnu_ld" = no; then allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' else # FIXME: insert proper C++ library support ld_shlibs_CXX=no fi ;; esac ;; osf4* | osf5*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' hardcode_libdir_separator_CXX=: # Archives containing C++ object files must be created using # the KAI C++ compiler. old_archive_cmds_CXX='$CC -o $oldlib $oldobjs' ;; RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; cxx*) allow_undefined_flag_CXX=' -expect_unresolved \*' archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds_CXX='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ echo "-hidden">> $lib.exp~ $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~ $rm $lib.exp' hardcode_libdir_flag_spec_CXX='-rpath $libdir' hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes && test "$with_gnu_ld" = no; then allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' else # FIXME: insert proper C++ library support ld_shlibs_CXX=no fi ;; esac ;; psos*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; sco*) archive_cmds_need_lc_CXX=no case $cc_basename in CC*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; lcc*) # Lucid # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; solaris*) case $cc_basename in CC*) # Sun C++ 4.2, 5.x and Centerline C++ archive_cmds_need_lc_CXX=yes no_undefined_flag_CXX=' -zdefs' archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' hardcode_libdir_flag_spec_CXX='-R$libdir' hardcode_shlibpath_var_CXX=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # The C++ compiler is used as linker so we must use $wl # flag to pass the commands to the underlying system # linker. We must also pass each convience library through # to the system linker between allextract/defaultextract. # The C++ compiler will combine linker options so we # cannot just pass the convience library names through # without $wl. # Supported since Solaris 2.6 (maybe 2.5.1?) whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;; esac link_all_deplibs_CXX=yes output_verbose_link_cmd='echo' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' ;; gcx*) # Green Hills C++ Compiler archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' # The C++ compiler must be used to create the archive. old_archive_cmds_CXX='$CC $LDFLAGS -archive -o $oldlib $oldobjs' ;; *) # GNU C++ compiler with Solaris linker if test "$GXX" = yes && test "$with_gnu_ld" = no; then no_undefined_flag_CXX=' ${wl}-z ${wl}defs' if $CC --version | grep -v '^2\.7' > /dev/null; then archive_cmds_CXX='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" else # g++ 2.7 appears to require `-G' NOT `-shared' on this # platform. archive_cmds_CXX='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" fi hardcode_libdir_flag_spec_CXX='${wl}-R $wl$libdir' fi ;; esac ;; sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[78]* | unixware7*) archive_cmds_need_lc_CXX=no ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; vxworks*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5 echo "${ECHO_T}$ld_shlibs_CXX" >&6 test "$ld_shlibs_CXX" = no && can_build_shared=no GCC_CXX="$GXX" LD_CXX="$LD" cat > conftest.$ac_ext <&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # Parse the compiler output and extract the necessary # objects, libraries and library flags. # Sentinel used to keep track of whether or not we are before # the conftest object file. pre_test_object_deps_done=no # The `*' in the case matches for architectures that use `case' in # $output_verbose_cmd can trigger glob expansion during the loop # eval without this substitution. output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"` for p in `eval $output_verbose_link_cmd`; do case $p in -L* | -R* | -l*) # Some compilers place space between "-{L,R}" and the path. # Remove the space. if test $p = "-L" \ || test $p = "-R"; then prev=$p continue else prev= fi if test "$pre_test_object_deps_done" = no; then case $p in -L* | -R*) # Internal compiler library paths should come after those # provided the user. The postdeps already come after the # user supplied libs so there is no need to process them. if test -z "$compiler_lib_search_path_CXX"; then compiler_lib_search_path_CXX="${prev}${p}" else compiler_lib_search_path_CXX="${compiler_lib_search_path_CXX} ${prev}${p}" fi ;; # The "-l" case would never come before the object being # linked, so don't bother handling this case. esac else if test -z "$postdeps_CXX"; then postdeps_CXX="${prev}${p}" else postdeps_CXX="${postdeps_CXX} ${prev}${p}" fi fi ;; *.$objext) # This assumes that the test object file only shows up # once in the compiler output. if test "$p" = "conftest.$objext"; then pre_test_object_deps_done=yes continue fi if test "$pre_test_object_deps_done" = no; then if test -z "$predep_objects_CXX"; then predep_objects_CXX="$p" else predep_objects_CXX="$predep_objects_CXX $p" fi else if test -z "$postdep_objects_CXX"; then postdep_objects_CXX="$p" else postdep_objects_CXX="$postdep_objects_CXX $p" fi fi ;; *) ;; # Ignore the rest. esac done # Clean up. rm -f a.out a.exe else echo "libtool.m4: error: problem compiling CXX test program" fi $rm -f confest.$objext # PORTME: override above test on systems where it is broken case $host_os in solaris*) case $cc_basename in CC*) # Adding this requires a known-good setup of shared libraries for # Sun compiler versions before 5.6, else PIC objects from an old # archive will be linked into the output, leading to subtle bugs. postdeps_CXX='-lCstd -lCrun' ;; esac esac case " $postdeps_CXX " in *" -lc "*) archive_cmds_need_lc_CXX=no ;; esac lt_prog_compiler_wl_CXX= lt_prog_compiler_pic_CXX= lt_prog_compiler_static_CXX= echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 # C++ specific cases for pic, static, wl, etc. if test "$GXX" = yes; then lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_CXX='-Bstatic' fi ;; amigaos*) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. lt_prog_compiler_pic_CXX='-m68020 -resident32 -malways-restore-a4' ;; beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | os2* | pw32*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic_CXX='-DDLL_EXPORT' ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic_CXX='-fno-common' ;; *djgpp*) # DJGPP does not support shared libraries at all lt_prog_compiler_pic_CXX= ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic_CXX=-Kconform_pic fi ;; hpux*) # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) ;; *) lt_prog_compiler_pic_CXX='-fPIC' ;; esac ;; *) lt_prog_compiler_pic_CXX='-fPIC' ;; esac else case $host_os in aix4* | aix5*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_CXX='-Bstatic' else lt_prog_compiler_static_CXX='-bnso -bI:/lib/syscalls.exp' fi ;; chorus*) case $cc_basename in cxch68*) # Green Hills C++ Compiler # _LT_AC_TAGVAR(lt_prog_compiler_static, CXX)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" ;; esac ;; darwin*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files case $cc_basename in xlc*) lt_prog_compiler_pic_CXX='-qnocommon' lt_prog_compiler_wl_CXX='-Wl,' ;; esac ;; dgux*) case $cc_basename in ec++*) lt_prog_compiler_pic_CXX='-KPIC' ;; ghcx*) # Green Hills C++ Compiler lt_prog_compiler_pic_CXX='-pic' ;; *) ;; esac ;; freebsd* | kfreebsd*-gnu | dragonfly*) # FreeBSD uses GNU C++ ;; hpux9* | hpux10* | hpux11*) case $cc_basename in CC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive" if test "$host_cpu" != ia64; then lt_prog_compiler_pic_CXX='+Z' fi ;; aCC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive" case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic_CXX='+Z' ;; esac ;; *) ;; esac ;; irix5* | irix6* | nonstopux*) case $cc_basename in CC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='-non_shared' # CC pic flag -KPIC is the default. ;; *) ;; esac ;; linux*) case $cc_basename in KCC*) # KAI C++ Compiler lt_prog_compiler_wl_CXX='--backend -Wl,' lt_prog_compiler_pic_CXX='-fPIC' ;; icpc* | ecpc*) # Intel C++ lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-static' ;; pgCC*) # Portland Group C++ compiler. lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-fpic' lt_prog_compiler_static_CXX='-Bstatic' ;; cxx*) # Compaq C++ # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. lt_prog_compiler_pic_CXX= lt_prog_compiler_static_CXX='-non_shared' ;; *) ;; esac ;; lynxos*) ;; m88k*) ;; mvs*) case $cc_basename in cxx*) lt_prog_compiler_pic_CXX='-W c,exportall' ;; *) ;; esac ;; netbsd*) ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) lt_prog_compiler_wl_CXX='--backend -Wl,' ;; RCC*) # Rational C++ 2.4.1 lt_prog_compiler_pic_CXX='-pic' ;; cxx*) # Digital/Compaq C++ lt_prog_compiler_wl_CXX='-Wl,' # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. lt_prog_compiler_pic_CXX= lt_prog_compiler_static_CXX='-non_shared' ;; *) ;; esac ;; psos*) ;; sco*) case $cc_basename in CC*) lt_prog_compiler_pic_CXX='-fPIC' ;; *) ;; esac ;; solaris*) case $cc_basename in CC*) # Sun C++ 4.2, 5.x and Centerline C++ lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-Bstatic' lt_prog_compiler_wl_CXX='-Qoption ld ' ;; gcx*) # Green Hills C++ Compiler lt_prog_compiler_pic_CXX='-PIC' ;; *) ;; esac ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x lt_prog_compiler_pic_CXX='-pic' lt_prog_compiler_static_CXX='-Bstatic' ;; lcc*) # Lucid lt_prog_compiler_pic_CXX='-pic' ;; *) ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 lt_prog_compiler_pic_CXX='-KPIC' ;; *) ;; esac ;; unixware*) ;; vxworks*) ;; *) lt_prog_compiler_can_build_shared_CXX=no ;; esac fi echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_CXX" >&5 echo "${ECHO_T}$lt_prog_compiler_pic_CXX" >&6 # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic_CXX"; then echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5 echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... $ECHO_C" >&6 if test "${lt_prog_compiler_pic_works_CXX+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_prog_compiler_pic_works_CXX=no ac_outfile=conftest.$ac_objext printf "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:12334: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:12338: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $echo "X$_lt_compiler_boilerplate" | $Xsed >conftest.exp $SED '/^$/d' conftest.err >conftest.er2 if test ! -s conftest.err || diff conftest.exp conftest.er2 >/dev/null; then lt_prog_compiler_pic_works_CXX=yes fi fi $rm conftest* fi echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_CXX" >&5 echo "${ECHO_T}$lt_prog_compiler_pic_works_CXX" >&6 if test x"$lt_prog_compiler_pic_works_CXX" = xyes; then case $lt_prog_compiler_pic_CXX in "" | " "*) ;; *) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;; esac else lt_prog_compiler_pic_CXX= lt_prog_compiler_can_build_shared_CXX=no fi fi case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic_CXX= ;; *) lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX -DPIC" ;; esac echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6 if test "${lt_cv_prog_compiler_c_o_CXX+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_prog_compiler_c_o_CXX=no $rm -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out printf "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:12396: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:12400: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $echo "X$_lt_compiler_boilerplate" | $Xsed > out/conftest.exp $SED '/^$/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.err || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o_CXX=yes fi fi chmod u+w . 2>&5 $rm conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files $rm out/* && rmdir out cd .. rmdir conftest $rm conftest* fi echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_CXX" >&5 echo "${ECHO_T}$lt_cv_prog_compiler_c_o_CXX" >&6 hard_links="nottested" if test "$lt_cv_prog_compiler_c_o_CXX" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6 hard_links=yes $rm conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no echo "$as_me:$LINENO: result: $hard_links" >&5 echo "${ECHO_T}$hard_links" >&6 if test "$hard_links" = no; then { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} need_locks=warn fi else need_locks=no fi echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6 export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' case $host_os in aix4* | aix5*) # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | grep 'GNU' > /dev/null; then export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' else export_symbols_cmds_CXX='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' fi ;; pw32*) export_symbols_cmds_CXX="$ltdll_cmds" ;; cygwin* | mingw*) export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS] /s/.* \([^ ]*\)/\1 DATA/;/^.* __nm__/s/^.* __nm__\([^ ]*\) [^ ]*/\1 DATA/;/^I /d;/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols' ;; *) export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ;; esac echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5 echo "${ECHO_T}$ld_shlibs_CXX" >&6 test "$ld_shlibs_CXX" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc_CXX" in x|xyes) # Assume -lc should be added archive_cmds_need_lc_CXX=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $archive_cmds_CXX in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6 $rm conftest* printf "$lt_simple_compile_test_code" > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl_CXX compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag_CXX allow_undefined_flag_CXX= if { (eval echo "$as_me:$LINENO: \"$archive_cmds_CXX 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 (eval $archive_cmds_CXX 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } then archive_cmds_need_lc_CXX=no else archive_cmds_need_lc_CXX=yes fi allow_undefined_flag_CXX=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $rm conftest* echo "$as_me:$LINENO: result: $archive_cmds_need_lc_CXX" >&5 echo "${ECHO_T}$archive_cmds_need_lc_CXX" >&6 ;; esac fi ;; esac echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6 library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" if test "$GCC" = yes; then sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix4* | aix5*) version_type=linux need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[45]*) version_type=linux need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$host_os in yes,cygwin* | yes,mingw* | yes,pw32*) library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $rm \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" ;; mingw*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH printed by # mingw gcc, but we are running on Cygwin. Gcc prints its search # path with ; separators, and with drive letters. We can handle the # drive letters (cygwin fileutils understands them), so leave them, # especially as we might pass files found there to a mingw objdump, # which wouldn't understand a cygwinified path. Ahh. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac ;; *) library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' ;; esac dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. if test "$GCC" = yes; then sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` else sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' fi sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd1*) dynamic_linker=no ;; kfreebsd*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='GNU ld.so' ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[123]*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; *) # from 3.2 on shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555. postinstall_cmds='chmod 555 $lib' ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be Linux ELF. linux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; knetbsd*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='GNU ld.so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; nto-qnx*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; openbsd*) version_type=sunos need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[89] | openbsd2.[89].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; sco3.2v5*) version_type=osf soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH ;; solaris*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no export_dynamic_flag_spec='${wl}-Blargedynsym' runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac echo "$as_me:$LINENO: result: $dynamic_linker" >&5 echo "${ECHO_T}$dynamic_linker" >&6 test "$dynamic_linker" = no && can_build_shared=no echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6 hardcode_action_CXX= if test -n "$hardcode_libdir_flag_spec_CXX" || \ test -n "$runpath_var_CXX" || \ test "X$hardcode_automatic_CXX" = "Xyes" ; then # We can hardcode non-existant directories. if test "$hardcode_direct_CXX" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, CXX)" != no && test "$hardcode_minus_L_CXX" != no; then # Linking always hardcodes the temporary library directory. hardcode_action_CXX=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action_CXX=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action_CXX=unsupported fi echo "$as_me:$LINENO: result: $hardcode_action_CXX" >&5 echo "${ECHO_T}$hardcode_action_CXX" >&6 if test "$hardcode_action_CXX" = relink; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi striplib= old_striplib= echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5 echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&6 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) if test -n "$STRIP" ; then striplib="$STRIP -x" echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi ;; *) echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 ;; esac fi if test "x$enable_dlopen" != xyes; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen="load_add_on" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32*) lt_cv_dlopen="LoadLibrary" lt_cv_dlopen_libs= ;; cygwin*) lt_cv_dlopen="dlopen" lt_cv_dlopen_libs= ;; darwin*) # if libdl is installed we need to link against it echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6 if test "${ac_cv_lib_dl_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char dlopen (); int main () { dlopen (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_dl_dlopen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dl_dlopen=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6 if test $ac_cv_lib_dl_dlopen = yes; then lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else lt_cv_dlopen="dyld" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes fi ;; *) echo "$as_me:$LINENO: checking for shl_load" >&5 echo $ECHO_N "checking for shl_load... $ECHO_C" >&6 if test "${ac_cv_func_shl_load+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define shl_load to an innocuous variant, in case declares shl_load. For example, HP-UX 11i declares gettimeofday. */ #define shl_load innocuous_shl_load /* System header to define __stub macros and hopefully few prototypes, which can conflict with char shl_load (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef shl_load /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char shl_load (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_shl_load) || defined (__stub___shl_load) choke me #else char (*f) () = shl_load; #endif #ifdef __cplusplus } #endif int main () { return f != shl_load; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_shl_load=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_shl_load=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5 echo "${ECHO_T}$ac_cv_func_shl_load" >&6 if test $ac_cv_func_shl_load = yes; then lt_cv_dlopen="shl_load" else echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6 if test "${ac_cv_lib_dld_shl_load+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char shl_load (); int main () { shl_load (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_dld_shl_load=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dld_shl_load=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6 if test $ac_cv_lib_dld_shl_load = yes; then lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld" else echo "$as_me:$LINENO: checking for dlopen" >&5 echo $ECHO_N "checking for dlopen... $ECHO_C" >&6 if test "${ac_cv_func_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define dlopen to an innocuous variant, in case declares dlopen. For example, HP-UX 11i declares gettimeofday. */ #define dlopen innocuous_dlopen /* System header to define __stub macros and hopefully few prototypes, which can conflict with char dlopen (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef dlopen /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char dlopen (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_dlopen) || defined (__stub___dlopen) choke me #else char (*f) () = dlopen; #endif #ifdef __cplusplus } #endif int main () { return f != dlopen; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_dlopen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_dlopen=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5 echo "${ECHO_T}$ac_cv_func_dlopen" >&6 if test $ac_cv_func_dlopen = yes; then lt_cv_dlopen="dlopen" else echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6 if test "${ac_cv_lib_dl_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char dlopen (); int main () { dlopen (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_dl_dlopen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dl_dlopen=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6 if test $ac_cv_lib_dl_dlopen = yes; then lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5 echo $ECHO_N "checking for dlopen in -lsvld... $ECHO_C" >&6 if test "${ac_cv_lib_svld_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsvld $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char dlopen (); int main () { dlopen (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_svld_dlopen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_svld_dlopen=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5 echo "${ECHO_T}$ac_cv_lib_svld_dlopen" >&6 if test $ac_cv_lib_svld_dlopen = yes; then lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" else echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5 echo $ECHO_N "checking for dld_link in -ldld... $ECHO_C" >&6 if test "${ac_cv_lib_dld_dld_link+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char dld_link (); int main () { dld_link (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_dld_dld_link=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dld_dld_link=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5 echo "${ECHO_T}$ac_cv_lib_dld_dld_link" >&6 if test $ac_cv_lib_dld_dld_link = yes; then lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld" fi fi fi fi fi fi ;; esac if test "x$lt_cv_dlopen" != xno; then enable_dlopen=yes else enable_dlopen=no fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS="$CPPFLAGS" test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS="$LDFLAGS" eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS="$LIBS" LIBS="$lt_cv_dlopen_libs $LIBS" echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5 echo $ECHO_N "checking whether a program can dlopen itself... $ECHO_C" >&6 if test "${lt_cv_dlopen_self+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then : lt_cv_dlopen_self=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif #ifdef __cplusplus extern "C" void exit (int); #endif void fnord() { int i=42;} int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; /* dlclose (self); */ } exit (status); } EOF if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; x$lt_unknown|x*) lt_cv_dlopen_self=no ;; esac else : # compilation failed lt_cv_dlopen_self=no fi fi rm -fr conftest* fi echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5 echo "${ECHO_T}$lt_cv_dlopen_self" >&6 if test "x$lt_cv_dlopen_self" = xyes; then LDFLAGS="$LDFLAGS $link_static_flag" echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5 echo $ECHO_N "checking whether a statically linked program can dlopen itself... $ECHO_C" >&6 if test "${lt_cv_dlopen_self_static+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then : lt_cv_dlopen_self_static=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif #ifdef __cplusplus extern "C" void exit (int); #endif void fnord() { int i=42;} int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; /* dlclose (self); */ } exit (status); } EOF if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_unknown|x*) lt_cv_dlopen_self_static=no ;; esac else : # compilation failed lt_cv_dlopen_self_static=no fi fi rm -fr conftest* fi echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5 echo "${ECHO_T}$lt_cv_dlopen_self_static" >&6 fi CPPFLAGS="$save_CPPFLAGS" LDFLAGS="$save_LDFLAGS" LIBS="$save_LIBS" ;; esac case $lt_cv_dlopen_self in yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; *) enable_dlopen_self=unknown ;; esac case $lt_cv_dlopen_self_static in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; *) enable_dlopen_self_static=unknown ;; esac fi # The else clause should only fire when bootstrapping the # libtool distribution, otherwise you forgot to ship ltmain.sh # with your package, and you will get complaints that there are # no rules to generate ltmain.sh. if test -f "$ltmain"; then # See if we are running on zsh, and set the options which allow our commands through # without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi # Now quote all the things that may contain metacharacters while being # careful not to overquote the AC_SUBSTed values. We take copies of the # variables and quote the copies for generation of the libtool script. for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \ SED SHELL STRIP \ libname_spec library_names_spec soname_spec extract_expsyms_cmds \ old_striplib striplib file_magic_cmd finish_cmds finish_eval \ deplibs_check_method reload_flag reload_cmds need_locks \ lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ old_postinstall_cmds old_postuninstall_cmds \ compiler_CXX \ CC_CXX \ LD_CXX \ lt_prog_compiler_wl_CXX \ lt_prog_compiler_pic_CXX \ lt_prog_compiler_static_CXX \ lt_prog_compiler_no_builtin_flag_CXX \ export_dynamic_flag_spec_CXX \ thread_safe_flag_spec_CXX \ whole_archive_flag_spec_CXX \ enable_shared_with_static_runtimes_CXX \ old_archive_cmds_CXX \ old_archive_from_new_cmds_CXX \ predep_objects_CXX \ postdep_objects_CXX \ predeps_CXX \ postdeps_CXX \ compiler_lib_search_path_CXX \ archive_cmds_CXX \ archive_expsym_cmds_CXX \ postinstall_cmds_CXX \ postuninstall_cmds_CXX \ old_archive_from_expsyms_cmds_CXX \ allow_undefined_flag_CXX \ no_undefined_flag_CXX \ export_symbols_cmds_CXX \ hardcode_libdir_flag_spec_CXX \ hardcode_libdir_flag_spec_ld_CXX \ hardcode_libdir_separator_CXX \ hardcode_automatic_CXX \ module_cmds_CXX \ module_expsym_cmds_CXX \ lt_cv_prog_compiler_c_o_CXX \ exclude_expsyms_CXX \ include_expsyms_CXX; do case $var in old_archive_cmds_CXX | \ old_archive_from_new_cmds_CXX | \ archive_cmds_CXX | \ archive_expsym_cmds_CXX | \ module_cmds_CXX | \ module_expsym_cmds_CXX | \ old_archive_from_expsyms_cmds_CXX | \ export_symbols_cmds_CXX | \ extract_expsyms_cmds | reload_cmds | finish_cmds | \ postinstall_cmds | postuninstall_cmds | \ old_postinstall_cmds | old_postuninstall_cmds | \ sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) # Double-quote double-evaled strings. eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" ;; *) eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" ;; esac done case $lt_echo in *'\$0 --fallback-echo"') lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` ;; esac cfgfile="$ofile" cat <<__EOF__ >> "$cfgfile" # ### BEGIN LIBTOOL TAG CONFIG: $tagname # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc_CXX # Whether or not to disallow shared libs when runtime libs are static allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_CXX # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # The host system. host_alias=$host_alias host=$host host_os=$host_os # The build system. build_alias=$build_alias build=$build build_os=$build_os # An echo program that does not interpret backslashes. echo=$lt_echo # The archiver. AR=$lt_AR AR_FLAGS=$lt_AR_FLAGS # A C compiler. LTCC=$lt_LTCC # A language-specific compiler. CC=$lt_compiler_CXX # Is the compiler the GNU C compiler? with_gcc=$GCC_CXX # An ERE matcher. EGREP=$lt_EGREP # The linker used to build libraries. LD=$lt_LD_CXX # Whether we need hard or soft links. LN_S=$lt_LN_S # A BSD-compatible nm program. NM=$lt_NM # A symbol stripping program STRIP=$lt_STRIP # Used to examine libraries when file_magic_cmd begins "file" MAGIC_CMD=$MAGIC_CMD # Used on cygwin: DLL creation program. DLLTOOL="$DLLTOOL" # Used on cygwin: object dumper. OBJDUMP="$OBJDUMP" # Used on cygwin: assembler. AS="$AS" # The name of the directory that contains temporary libtool files. objdir=$objdir # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl_CXX # Object file suffix (normally "o"). objext="$ac_objext" # Old archive suffix (normally "a"). libext="$libext" # Shared library suffix (normally ".so"). shrext_cmds='$shrext_cmds' # Executable file suffix (normally ""). exeext="$exeext" # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic_CXX pic_mode=$pic_mode # What is the maximum length of a command? max_cmd_len=$lt_cv_sys_max_cmd_len # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o_CXX # Must we lock files when doing compilation? need_locks=$lt_need_locks # Do we need the lib prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static_CXX # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_CXX # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec_CXX # Compiler flag to generate thread-safe objects. thread_safe_flag_spec=$lt_thread_safe_flag_spec_CXX # Library versioning type. version_type=$version_type # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME. library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Commands used to build and install an old-style archive. RANLIB=$lt_RANLIB old_archive_cmds=$lt_old_archive_cmds_CXX old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_CXX # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_CXX # Commands used to build and install a shared archive. archive_cmds=$lt_archive_cmds_CXX archive_expsym_cmds=$lt_archive_expsym_cmds_CXX postinstall_cmds=$lt_postinstall_cmds postuninstall_cmds=$lt_postuninstall_cmds # Commands used to build a loadable module (assumed same as above if empty) module_cmds=$lt_module_cmds_CXX module_expsym_cmds=$lt_module_expsym_cmds_CXX # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # Dependencies to place before the objects being linked to create a # shared library. predep_objects=$lt_predep_objects_CXX # Dependencies to place after the objects being linked to create a # shared library. postdep_objects=$lt_postdep_objects_CXX # Dependencies to place before the objects being linked to create a # shared library. predeps=$lt_predeps_CXX # Dependencies to place after the objects being linked to create a # shared library. postdeps=$lt_postdeps_CXX # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_compiler_lib_search_path_CXX # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method == file_magic. file_magic_cmd=$lt_file_magic_cmd # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag_CXX # Flag that forces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag_CXX # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # Same as above, but a single script fragment to be evaled but not shown. finish_eval=$lt_finish_eval # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # This is the shared library runtime path variable. runpath_var=$runpath_var # This is the shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action_CXX # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist. hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_CXX # If ld is used when linking, flag to hardcode \$libdir into # a binary during linking. This must work even if \$libdir does # not exist. hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_CXX # Whether we need a single -rpath flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the # resulting binary. hardcode_direct=$hardcode_direct_CXX # Set to yes if using the -LDIR flag during linking hardcodes DIR into the # resulting binary. hardcode_minus_L=$hardcode_minus_L_CXX # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into # the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var_CXX # Set to yes if building a shared library automatically hardcodes DIR into the library # and all subsequent libraries and executables linked against it. hardcode_automatic=$hardcode_automatic_CXX # Variables whose values should be saved in libtool wrapper scripts and # restored at relink time. variables_saved_for_relink="$variables_saved_for_relink" # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs_CXX # Compile-time system search path for libraries sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Fix the shell variable \$srcfile for the compiler. fix_srcfile_path="$fix_srcfile_path_CXX" # Set to yes if exported symbols are required. always_export_symbols=$always_export_symbols_CXX # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds_CXX # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms_CXX # Symbols that must always be exported. include_expsyms=$lt_include_expsyms_CXX # ### END LIBTOOL TAG CONFIG: $tagname __EOF__ else # If there is no Makefile yet, we rely on a make rule to execute # `config.status --recheck' to rerun these tests and create the # libtool script then. ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` if test -f "$ltmain_in"; then test -f Makefile && make "$ltmain" fi fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu CC=$lt_save_CC LDCXX=$LD LD=$lt_save_LD GCC=$lt_save_GCC with_gnu_ldcxx=$with_gnu_ld with_gnu_ld=$lt_save_with_gnu_ld lt_cv_path_LDCXX=$lt_cv_path_LD lt_cv_path_LD=$lt_save_path_LD lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld else tagname="" fi ;; F77) if test -n "$F77" && test "X$F77" != "Xno"; then ac_ext=f ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_f77_compiler_gnu archive_cmds_need_lc_F77=no allow_undefined_flag_F77= always_export_symbols_F77=no archive_expsym_cmds_F77= export_dynamic_flag_spec_F77= hardcode_direct_F77=no hardcode_libdir_flag_spec_F77= hardcode_libdir_flag_spec_ld_F77= hardcode_libdir_separator_F77= hardcode_minus_L_F77=no hardcode_automatic_F77=no module_cmds_F77= module_expsym_cmds_F77= link_all_deplibs_F77=unknown old_archive_cmds_F77=$old_archive_cmds no_undefined_flag_F77= whole_archive_flag_spec_F77= enable_shared_with_static_runtimes_F77=no # Source file extension for f77 test sources. ac_ext=f # Object file extension for compiled f77 test sources. objext=o objext_F77=$objext # Code to be used in simple compile tests lt_simple_compile_test_code=" subroutine t\n return\n end\n" # Code to be used in simple link tests lt_simple_link_test_code=" program t\n end\n" # ltmain only uses $CC for tagged configurations so make sure $CC is set. # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # Allow CC to be a program name with arguments. compiler=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext printf "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $rm conftest* ac_outfile=conftest.$ac_objext printf "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $rm conftest* # Allow CC to be a program name with arguments. lt_save_CC="$CC" CC=${F77-"f77"} compiler=$CC compiler_F77=$CC for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5 echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6 echo "$as_me:$LINENO: result: $can_build_shared" >&5 echo "${ECHO_T}$can_build_shared" >&6 echo "$as_me:$LINENO: checking whether to build shared libraries" >&5 echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&6 test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix4* | aix5*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac echo "$as_me:$LINENO: result: $enable_shared" >&5 echo "${ECHO_T}$enable_shared" >&6 echo "$as_me:$LINENO: checking whether to build static libraries" >&5 echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6 # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes echo "$as_me:$LINENO: result: $enable_static" >&5 echo "${ECHO_T}$enable_static" >&6 test "$ld_shlibs_F77" = no && can_build_shared=no GCC_F77="$G77" LD_F77="$LD" lt_prog_compiler_wl_F77= lt_prog_compiler_pic_F77= lt_prog_compiler_static_F77= echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 if test "$GCC" = yes; then lt_prog_compiler_wl_F77='-Wl,' lt_prog_compiler_static_F77='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_F77='-Bstatic' fi ;; amigaos*) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. lt_prog_compiler_pic_F77='-m68020 -resident32 -malways-restore-a4' ;; beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic_F77='-DDLL_EXPORT' ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic_F77='-fno-common' ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. lt_prog_compiler_can_build_shared_F77=no enable_shared=no ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic_F77=-Kconform_pic fi ;; hpux*) # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic_F77='-fPIC' ;; esac ;; *) lt_prog_compiler_pic_F77='-fPIC' ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) lt_prog_compiler_wl_F77='-Wl,' if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_F77='-Bstatic' else lt_prog_compiler_static_F77='-bnso -bI:/lib/syscalls.exp' fi ;; darwin*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files case $cc_basename in xlc*) lt_prog_compiler_pic_F77='-qnocommon' lt_prog_compiler_wl_F77='-Wl,' ;; esac ;; mingw* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic_F77='-DDLL_EXPORT' ;; hpux9* | hpux10* | hpux11*) lt_prog_compiler_wl_F77='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic_F77='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? lt_prog_compiler_static_F77='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) lt_prog_compiler_wl_F77='-Wl,' # PIC (with -KPIC) is the default. lt_prog_compiler_static_F77='-non_shared' ;; newsos6) lt_prog_compiler_pic_F77='-KPIC' lt_prog_compiler_static_F77='-Bstatic' ;; linux*) case $cc_basename in icc* | ecc*) lt_prog_compiler_wl_F77='-Wl,' lt_prog_compiler_pic_F77='-KPIC' lt_prog_compiler_static_F77='-static' ;; pgcc* | pgf77* | pgf90* | pgf95*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) lt_prog_compiler_wl_F77='-Wl,' lt_prog_compiler_pic_F77='-fpic' lt_prog_compiler_static_F77='-Bstatic' ;; ccc*) lt_prog_compiler_wl_F77='-Wl,' # All Alpha code is PIC. lt_prog_compiler_static_F77='-non_shared' ;; esac ;; osf3* | osf4* | osf5*) lt_prog_compiler_wl_F77='-Wl,' # All OSF/1 code is PIC. lt_prog_compiler_static_F77='-non_shared' ;; sco3.2v5*) lt_prog_compiler_pic_F77='-Kpic' lt_prog_compiler_static_F77='-dn' ;; solaris*) lt_prog_compiler_pic_F77='-KPIC' lt_prog_compiler_static_F77='-Bstatic' case $cc_basename in f77* | f90* | f95*) lt_prog_compiler_wl_F77='-Qoption ld ';; *) lt_prog_compiler_wl_F77='-Wl,';; esac ;; sunos4*) lt_prog_compiler_wl_F77='-Qoption ld ' lt_prog_compiler_pic_F77='-PIC' lt_prog_compiler_static_F77='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) lt_prog_compiler_wl_F77='-Wl,' lt_prog_compiler_pic_F77='-KPIC' lt_prog_compiler_static_F77='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then lt_prog_compiler_pic_F77='-Kconform_pic' lt_prog_compiler_static_F77='-Bstatic' fi ;; unicos*) lt_prog_compiler_wl_F77='-Wl,' lt_prog_compiler_can_build_shared_F77=no ;; uts4*) lt_prog_compiler_pic_F77='-pic' lt_prog_compiler_static_F77='-Bstatic' ;; *) lt_prog_compiler_can_build_shared_F77=no ;; esac fi echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_F77" >&5 echo "${ECHO_T}$lt_prog_compiler_pic_F77" >&6 # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic_F77"; then echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works" >&5 echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works... $ECHO_C" >&6 if test "${lt_prog_compiler_pic_works_F77+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_prog_compiler_pic_works_F77=no ac_outfile=conftest.$ac_objext printf "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic_F77" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:14756: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:14760: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $echo "X$_lt_compiler_boilerplate" | $Xsed >conftest.exp $SED '/^$/d' conftest.err >conftest.er2 if test ! -s conftest.err || diff conftest.exp conftest.er2 >/dev/null; then lt_prog_compiler_pic_works_F77=yes fi fi $rm conftest* fi echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_F77" >&5 echo "${ECHO_T}$lt_prog_compiler_pic_works_F77" >&6 if test x"$lt_prog_compiler_pic_works_F77" = xyes; then case $lt_prog_compiler_pic_F77 in "" | " "*) ;; *) lt_prog_compiler_pic_F77=" $lt_prog_compiler_pic_F77" ;; esac else lt_prog_compiler_pic_F77= lt_prog_compiler_can_build_shared_F77=no fi fi case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic_F77= ;; *) lt_prog_compiler_pic_F77="$lt_prog_compiler_pic_F77" ;; esac echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6 if test "${lt_cv_prog_compiler_c_o_F77+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_prog_compiler_c_o_F77=no $rm -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out printf "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:14818: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:14822: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $echo "X$_lt_compiler_boilerplate" | $Xsed > out/conftest.exp $SED '/^$/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.err || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o_F77=yes fi fi chmod u+w . 2>&5 $rm conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files $rm out/* && rmdir out cd .. rmdir conftest $rm conftest* fi echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_F77" >&5 echo "${ECHO_T}$lt_cv_prog_compiler_c_o_F77" >&6 hard_links="nottested" if test "$lt_cv_prog_compiler_c_o_F77" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6 hard_links=yes $rm conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no echo "$as_me:$LINENO: result: $hard_links" >&5 echo "${ECHO_T}$hard_links" >&6 if test "$hard_links" = no; then { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} need_locks=warn fi else need_locks=no fi echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6 runpath_var= allow_undefined_flag_F77= enable_shared_with_static_runtimes_F77=no archive_cmds_F77= archive_expsym_cmds_F77= old_archive_From_new_cmds_F77= old_archive_from_expsyms_cmds_F77= export_dynamic_flag_spec_F77= whole_archive_flag_spec_F77= thread_safe_flag_spec_F77= hardcode_libdir_flag_spec_F77= hardcode_libdir_flag_spec_ld_F77= hardcode_libdir_separator_F77= hardcode_direct_F77=no hardcode_minus_L_F77=no hardcode_shlibpath_var_F77=unsupported link_all_deplibs_F77=unknown hardcode_automatic_F77=no module_cmds_F77= module_expsym_cmds_F77= always_export_symbols_F77=no export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list include_expsyms_F77= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. exclude_expsyms_F77="_GLOBAL_OFFSET_TABLE_" # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. extract_expsyms_cmds= # Just being paranoid about ensuring that cc_basename is set. for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` case $host_os in cygwin* | mingw* | pw32*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; openbsd*) with_gnu_ld=no ;; esac ld_shlibs_F77=yes if test "$with_gnu_ld" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec_F77='${wl}--rpath ${wl}$libdir' export_dynamic_flag_spec_F77='${wl}--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then whole_archive_flag_spec_F77="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else whole_archive_flag_spec_F77= fi supports_anon_versioning=no case `$LD -v 2>/dev/null` in *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix3* | aix4* | aix5*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then ld_shlibs_F77=no cat <&2 *** Warning: the GNU linker, at least up to release 2.9.1, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to modify your PATH *** so that a non-GNU linker is found, and then restart. EOF fi ;; amigaos*) archive_cmds_F77='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_minus_L_F77=yes # Samuel A. Falvo II reports # that the semantics of dynamic libraries on AmigaOS, at least up # to version 4, is to share data among multiple programs linked # with the same dynamic library. Since this doesn't match the # behavior of shared libraries on other platforms, we can't use # them. ld_shlibs_F77=no ;; beos*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then allow_undefined_flag_F77=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds_F77='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else ld_shlibs_F77=no fi ;; cygwin* | mingw* | pw32*) # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, F77) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec_F77='-L$libdir' allow_undefined_flag_F77=unsupported always_export_symbols_F77=no enable_shared_with_static_runtimes_F77=yes export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols' if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... archive_expsym_cmds_F77='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' else ld_shlibs_F77=no fi ;; linux*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then tmp_addflag= case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler whole_archive_flag_spec_F77='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers whole_archive_flag_spec_F77='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; esac archive_cmds_F77='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test $supports_anon_versioning = yes; then archive_expsym_cmds_F77='$echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ $echo "local: *; };" >> $output_objdir/$libname.ver~ $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi else ld_shlibs_F77=no fi ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds_F77='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris* | sysv5*) if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then ld_shlibs_F77=no cat <&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. EOF elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs_F77=no fi ;; sunos4*) archive_cmds_F77='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= hardcode_direct_F77=yes hardcode_shlibpath_var_F77=no ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs_F77=no fi ;; esac if test "$ld_shlibs_F77" = no; then runpath_var= hardcode_libdir_flag_spec_F77= export_dynamic_flag_spec_F77= whole_archive_flag_spec_F77= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) allow_undefined_flag_F77=unsupported always_export_symbols_F77=yes archive_expsym_cmds_F77='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. hardcode_minus_L_F77=yes if test "$GCC" = yes && test -z "$link_static_flag"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct_F77=unsupported fi ;; aix4* | aix5*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | grep 'GNU' > /dev/null; then export_symbols_cmds_F77='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' else export_symbols_cmds_F77='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[23]|aix4.[23].*|aix5*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds_F77='' hardcode_direct_F77=yes hardcode_libdir_separator_F77=':' link_all_deplibs_F77=yes if test "$GCC" = yes; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && \ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 hardcode_direct_F77=yes else # We have old collect2 hardcode_direct_F77=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking hardcode_minus_L_F77=yes hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_libdir_separator_F77= fi esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. always_export_symbols_F77=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. allow_undefined_flag_F77='-berok' # Determine the default libpath from the value encoded in an empty executable. cat >conftest.$ac_ext <<_ACEOF program main end _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_f77_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'`; fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec_F77='${wl}-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds_F77="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec_F77='${wl}-R $libdir:/usr/lib:/lib' allow_undefined_flag_F77="-z nodefs" archive_expsym_cmds_F77="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an empty executable. cat >conftest.$ac_ext <<_ACEOF program main end _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_f77_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'`; fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec_F77='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag_F77=' ${wl}-bernotok' allow_undefined_flag_F77=' ${wl}-berok' # -bexpall does not export symbols beginning with underscore (_) always_export_symbols_F77=yes # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec_F77=' ' archive_cmds_need_lc_F77=yes # This is similar to how AIX traditionally builds its shared libraries. archive_expsym_cmds_F77="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; amigaos*) archive_cmds_F77='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_minus_L_F77=yes # see comment about different semantics on the GNU ld section ld_shlibs_F77=no ;; bsdi[45]*) export_dynamic_flag_spec_F77=-rdynamic ;; cygwin* | mingw* | pw32*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. hardcode_libdir_flag_spec_F77=' ' allow_undefined_flag_F77=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. archive_cmds_F77='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. old_archive_From_new_cmds_F77='true' # FIXME: Should let the user specify the lib program. old_archive_cmds_F77='lib /OUT:$oldlib$oldobjs$old_deplibs' fix_srcfile_path_F77='`cygpath -w "$srcfile"`' enable_shared_with_static_runtimes_F77=yes ;; darwin* | rhapsody*) case $host_os in rhapsody* | darwin1.[012]) allow_undefined_flag_F77='${wl}-undefined ${wl}suppress' ;; *) # Darwin 1.3 on if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then allow_undefined_flag_F77='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' else case ${MACOSX_DEPLOYMENT_TARGET} in 10.[012]) allow_undefined_flag_F77='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) allow_undefined_flag_F77='${wl}-undefined ${wl}dynamic_lookup' ;; esac fi ;; esac archive_cmds_need_lc_F77=no hardcode_direct_F77=no hardcode_automatic_F77=yes hardcode_shlibpath_var_F77=unsupported whole_archive_flag_spec_F77='' link_all_deplibs_F77=yes if test "$GCC" = yes ; then output_verbose_link_cmd='echo' archive_cmds_F77='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' module_cmds_F77='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' module_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' else case $cc_basename in xlc*) output_verbose_link_cmd='echo' archive_cmds_F77='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' module_cmds_F77='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' module_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ;; *) ld_shlibs_F77=no ;; esac fi ;; dgux*) archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_shlibpath_var_F77=no ;; freebsd1*) ld_shlibs_F77=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' hardcode_libdir_flag_spec_F77='-R$libdir' hardcode_direct_F77=yes hardcode_shlibpath_var_F77=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2*) archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_F77=yes hardcode_minus_L_F77=yes hardcode_shlibpath_var_F77=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | kfreebsd*-gnu | dragonfly*) archive_cmds_F77='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec_F77='-R$libdir' hardcode_direct_F77=yes hardcode_shlibpath_var_F77=no ;; hpux9*) if test "$GCC" = yes; then archive_cmds_F77='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else archive_cmds_F77='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir' hardcode_libdir_separator_F77=: hardcode_direct_F77=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L_F77=yes export_dynamic_flag_spec_F77='${wl}-E' ;; hpux10* | hpux11*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then case $host_cpu in hppa*64*|ia64*) archive_cmds_F77='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds_F77='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*|ia64*) archive_cmds_F77='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags' ;; *) archive_cmds_F77='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;; esac fi if test "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir' hardcode_libdir_flag_spec_ld_F77='+b $libdir' hardcode_libdir_separator_F77=: hardcode_direct_F77=no hardcode_shlibpath_var_F77=no ;; ia64*) hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_direct_F77=no hardcode_shlibpath_var_F77=no # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L_F77=yes ;; *) hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir' hardcode_libdir_separator_F77=: hardcode_direct_F77=yes export_dynamic_flag_spec_F77='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L_F77=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else archive_cmds_F77='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_ld_F77='-rpath $libdir' fi hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_F77=: link_all_deplibs_F77=yes ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else archive_cmds_F77='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi hardcode_libdir_flag_spec_F77='-R$libdir' hardcode_direct_F77=yes hardcode_shlibpath_var_F77=no ;; newsos6) archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_F77=yes hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_F77=: hardcode_shlibpath_var_F77=no ;; openbsd*) hardcode_direct_F77=yes hardcode_shlibpath_var_F77=no if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' export_dynamic_flag_spec_F77='${wl}-E' else case $host_os in openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec_F77='-R$libdir' ;; *) archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' ;; esac fi ;; os2*) hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_minus_L_F77=yes allow_undefined_flag_F77=unsupported archive_cmds_F77='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' old_archive_From_new_cmds_F77='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then allow_undefined_flag_F77=' ${wl}-expect_unresolved ${wl}\*' archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else allow_undefined_flag_F77=' -expect_unresolved \*' archive_cmds_F77='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' fi hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_F77=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then allow_undefined_flag_F77=' ${wl}-expect_unresolved ${wl}\*' archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' else allow_undefined_flag_F77=' -expect_unresolved \*' archive_cmds_F77='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds_F77='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp' # Both c and cxx compiler support -rpath directly hardcode_libdir_flag_spec_F77='-rpath $libdir' fi hardcode_libdir_separator_F77=: ;; sco3.2v5*) archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var_F77=no export_dynamic_flag_spec_F77='${wl}-Bexport' runpath_var=LD_RUN_PATH hardcode_runpath_var=yes ;; solaris*) no_undefined_flag_F77=' -z text' if test "$GCC" = yes; then wlarc='${wl}' archive_cmds_F77='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_F77='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' else wlarc='' archive_cmds_F77='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' archive_expsym_cmds_F77='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' fi hardcode_libdir_flag_spec_F77='-R$libdir' hardcode_shlibpath_var_F77=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # The compiler driver will combine linker options so we # cannot just pass the convience library names through # without $wl, iff we do not link with $LD. # Luckily, gcc supports the same syntax we need for Sun Studio. # Supported since Solaris 2.6 (maybe 2.5.1?) case $wlarc in '') whole_archive_flag_spec_F77='-z allextract$convenience -z defaultextract' ;; *) whole_archive_flag_spec_F77='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;; esac ;; esac link_all_deplibs_F77=yes ;; sunos4*) if test "x$host_vendor" = xsequent; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. archive_cmds_F77='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds_F77='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_direct_F77=yes hardcode_minus_L_F77=yes hardcode_shlibpath_var_F77=no ;; sysv4) case $host_vendor in sni) archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_F77=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. archive_cmds_F77='$LD -G -o $lib $libobjs $deplibs $linker_flags' reload_cmds_F77='$CC -r -o $output$reload_objs' hardcode_direct_F77=no ;; motorola) archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_F77=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' hardcode_shlibpath_var_F77=no ;; sysv4.3*) archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var_F77=no export_dynamic_flag_spec_F77='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var_F77=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes ld_shlibs_F77=yes fi ;; sysv4.2uw2*) archive_cmds_F77='$LD -G -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_F77=yes hardcode_minus_L_F77=no hardcode_shlibpath_var_F77=no hardcode_runpath_var=yes runpath_var=LD_RUN_PATH ;; sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[78]* | unixware7*) no_undefined_flag_F77='${wl}-z ${wl}text' if test "$GCC" = yes; then archive_cmds_F77='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds_F77='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' fi runpath_var='LD_RUN_PATH' hardcode_shlibpath_var_F77=no ;; sysv5*) no_undefined_flag_F77=' -z text' # $CC -shared without GNU ld will not create a library from C++ # object files and a static libstdc++, better avoid it by now archive_cmds_F77='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' archive_expsym_cmds_F77='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' hardcode_libdir_flag_spec_F77= hardcode_shlibpath_var_F77=no runpath_var='LD_RUN_PATH' ;; uts4*) archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_shlibpath_var_F77=no ;; *) ld_shlibs_F77=no ;; esac fi echo "$as_me:$LINENO: result: $ld_shlibs_F77" >&5 echo "${ECHO_T}$ld_shlibs_F77" >&6 test "$ld_shlibs_F77" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc_F77" in x|xyes) # Assume -lc should be added archive_cmds_need_lc_F77=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $archive_cmds_F77 in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6 $rm conftest* printf "$lt_simple_compile_test_code" > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl_F77 compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag_F77 allow_undefined_flag_F77= if { (eval echo "$as_me:$LINENO: \"$archive_cmds_F77 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 (eval $archive_cmds_F77 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } then archive_cmds_need_lc_F77=no else archive_cmds_need_lc_F77=yes fi allow_undefined_flag_F77=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $rm conftest* echo "$as_me:$LINENO: result: $archive_cmds_need_lc_F77" >&5 echo "${ECHO_T}$archive_cmds_need_lc_F77" >&6 ;; esac fi ;; esac echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6 library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" if test "$GCC" = yes; then sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix4* | aix5*) version_type=linux need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[45]*) version_type=linux need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$host_os in yes,cygwin* | yes,mingw* | yes,pw32*) library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $rm \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" ;; mingw*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH printed by # mingw gcc, but we are running on Cygwin. Gcc prints its search # path with ; separators, and with drive letters. We can handle the # drive letters (cygwin fileutils understands them), so leave them, # especially as we might pass files found there to a mingw objdump, # which wouldn't understand a cygwinified path. Ahh. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac ;; *) library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' ;; esac dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. if test "$GCC" = yes; then sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` else sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' fi sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd1*) dynamic_linker=no ;; kfreebsd*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='GNU ld.so' ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[123]*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; *) # from 3.2 on shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555. postinstall_cmds='chmod 555 $lib' ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be Linux ELF. linux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; knetbsd*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='GNU ld.so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; nto-qnx*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; openbsd*) version_type=sunos need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[89] | openbsd2.[89].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; sco3.2v5*) version_type=osf soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH ;; solaris*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no export_dynamic_flag_spec='${wl}-Blargedynsym' runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac echo "$as_me:$LINENO: result: $dynamic_linker" >&5 echo "${ECHO_T}$dynamic_linker" >&6 test "$dynamic_linker" = no && can_build_shared=no echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6 hardcode_action_F77= if test -n "$hardcode_libdir_flag_spec_F77" || \ test -n "$runpath_var_F77" || \ test "X$hardcode_automatic_F77" = "Xyes" ; then # We can hardcode non-existant directories. if test "$hardcode_direct_F77" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, F77)" != no && test "$hardcode_minus_L_F77" != no; then # Linking always hardcodes the temporary library directory. hardcode_action_F77=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action_F77=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action_F77=unsupported fi echo "$as_me:$LINENO: result: $hardcode_action_F77" >&5 echo "${ECHO_T}$hardcode_action_F77" >&6 if test "$hardcode_action_F77" = relink; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi striplib= old_striplib= echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5 echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&6 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) if test -n "$STRIP" ; then striplib="$STRIP -x" echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi ;; *) echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 ;; esac fi # The else clause should only fire when bootstrapping the # libtool distribution, otherwise you forgot to ship ltmain.sh # with your package, and you will get complaints that there are # no rules to generate ltmain.sh. if test -f "$ltmain"; then # See if we are running on zsh, and set the options which allow our commands through # without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi # Now quote all the things that may contain metacharacters while being # careful not to overquote the AC_SUBSTed values. We take copies of the # variables and quote the copies for generation of the libtool script. for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \ SED SHELL STRIP \ libname_spec library_names_spec soname_spec extract_expsyms_cmds \ old_striplib striplib file_magic_cmd finish_cmds finish_eval \ deplibs_check_method reload_flag reload_cmds need_locks \ lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ old_postinstall_cmds old_postuninstall_cmds \ compiler_F77 \ CC_F77 \ LD_F77 \ lt_prog_compiler_wl_F77 \ lt_prog_compiler_pic_F77 \ lt_prog_compiler_static_F77 \ lt_prog_compiler_no_builtin_flag_F77 \ export_dynamic_flag_spec_F77 \ thread_safe_flag_spec_F77 \ whole_archive_flag_spec_F77 \ enable_shared_with_static_runtimes_F77 \ old_archive_cmds_F77 \ old_archive_from_new_cmds_F77 \ predep_objects_F77 \ postdep_objects_F77 \ predeps_F77 \ postdeps_F77 \ compiler_lib_search_path_F77 \ archive_cmds_F77 \ archive_expsym_cmds_F77 \ postinstall_cmds_F77 \ postuninstall_cmds_F77 \ old_archive_from_expsyms_cmds_F77 \ allow_undefined_flag_F77 \ no_undefined_flag_F77 \ export_symbols_cmds_F77 \ hardcode_libdir_flag_spec_F77 \ hardcode_libdir_flag_spec_ld_F77 \ hardcode_libdir_separator_F77 \ hardcode_automatic_F77 \ module_cmds_F77 \ module_expsym_cmds_F77 \ lt_cv_prog_compiler_c_o_F77 \ exclude_expsyms_F77 \ include_expsyms_F77; do case $var in old_archive_cmds_F77 | \ old_archive_from_new_cmds_F77 | \ archive_cmds_F77 | \ archive_expsym_cmds_F77 | \ module_cmds_F77 | \ module_expsym_cmds_F77 | \ old_archive_from_expsyms_cmds_F77 | \ export_symbols_cmds_F77 | \ extract_expsyms_cmds | reload_cmds | finish_cmds | \ postinstall_cmds | postuninstall_cmds | \ old_postinstall_cmds | old_postuninstall_cmds | \ sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) # Double-quote double-evaled strings. eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" ;; *) eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" ;; esac done case $lt_echo in *'\$0 --fallback-echo"') lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` ;; esac cfgfile="$ofile" cat <<__EOF__ >> "$cfgfile" # ### BEGIN LIBTOOL TAG CONFIG: $tagname # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc_F77 # Whether or not to disallow shared libs when runtime libs are static allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_F77 # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # The host system. host_alias=$host_alias host=$host host_os=$host_os # The build system. build_alias=$build_alias build=$build build_os=$build_os # An echo program that does not interpret backslashes. echo=$lt_echo # The archiver. AR=$lt_AR AR_FLAGS=$lt_AR_FLAGS # A C compiler. LTCC=$lt_LTCC # A language-specific compiler. CC=$lt_compiler_F77 # Is the compiler the GNU C compiler? with_gcc=$GCC_F77 # An ERE matcher. EGREP=$lt_EGREP # The linker used to build libraries. LD=$lt_LD_F77 # Whether we need hard or soft links. LN_S=$lt_LN_S # A BSD-compatible nm program. NM=$lt_NM # A symbol stripping program STRIP=$lt_STRIP # Used to examine libraries when file_magic_cmd begins "file" MAGIC_CMD=$MAGIC_CMD # Used on cygwin: DLL creation program. DLLTOOL="$DLLTOOL" # Used on cygwin: object dumper. OBJDUMP="$OBJDUMP" # Used on cygwin: assembler. AS="$AS" # The name of the directory that contains temporary libtool files. objdir=$objdir # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl_F77 # Object file suffix (normally "o"). objext="$ac_objext" # Old archive suffix (normally "a"). libext="$libext" # Shared library suffix (normally ".so"). shrext_cmds='$shrext_cmds' # Executable file suffix (normally ""). exeext="$exeext" # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic_F77 pic_mode=$pic_mode # What is the maximum length of a command? max_cmd_len=$lt_cv_sys_max_cmd_len # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o_F77 # Must we lock files when doing compilation? need_locks=$lt_need_locks # Do we need the lib prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static_F77 # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_F77 # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_F77 # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec_F77 # Compiler flag to generate thread-safe objects. thread_safe_flag_spec=$lt_thread_safe_flag_spec_F77 # Library versioning type. version_type=$version_type # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME. library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Commands used to build and install an old-style archive. RANLIB=$lt_RANLIB old_archive_cmds=$lt_old_archive_cmds_F77 old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_F77 # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_F77 # Commands used to build and install a shared archive. archive_cmds=$lt_archive_cmds_F77 archive_expsym_cmds=$lt_archive_expsym_cmds_F77 postinstall_cmds=$lt_postinstall_cmds postuninstall_cmds=$lt_postuninstall_cmds # Commands used to build a loadable module (assumed same as above if empty) module_cmds=$lt_module_cmds_F77 module_expsym_cmds=$lt_module_expsym_cmds_F77 # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # Dependencies to place before the objects being linked to create a # shared library. predep_objects=$lt_predep_objects_F77 # Dependencies to place after the objects being linked to create a # shared library. postdep_objects=$lt_postdep_objects_F77 # Dependencies to place before the objects being linked to create a # shared library. predeps=$lt_predeps_F77 # Dependencies to place after the objects being linked to create a # shared library. postdeps=$lt_postdeps_F77 # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_compiler_lib_search_path_F77 # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method == file_magic. file_magic_cmd=$lt_file_magic_cmd # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag_F77 # Flag that forces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag_F77 # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # Same as above, but a single script fragment to be evaled but not shown. finish_eval=$lt_finish_eval # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # This is the shared library runtime path variable. runpath_var=$runpath_var # This is the shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action_F77 # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist. hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_F77 # If ld is used when linking, flag to hardcode \$libdir into # a binary during linking. This must work even if \$libdir does # not exist. hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_F77 # Whether we need a single -rpath flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator_F77 # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the # resulting binary. hardcode_direct=$hardcode_direct_F77 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the # resulting binary. hardcode_minus_L=$hardcode_minus_L_F77 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into # the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var_F77 # Set to yes if building a shared library automatically hardcodes DIR into the library # and all subsequent libraries and executables linked against it. hardcode_automatic=$hardcode_automatic_F77 # Variables whose values should be saved in libtool wrapper scripts and # restored at relink time. variables_saved_for_relink="$variables_saved_for_relink" # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs_F77 # Compile-time system search path for libraries sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Fix the shell variable \$srcfile for the compiler. fix_srcfile_path="$fix_srcfile_path_F77" # Set to yes if exported symbols are required. always_export_symbols=$always_export_symbols_F77 # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds_F77 # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms_F77 # Symbols that must always be exported. include_expsyms=$lt_include_expsyms_F77 # ### END LIBTOOL TAG CONFIG: $tagname __EOF__ else # If there is no Makefile yet, we rely on a make rule to execute # `config.status --recheck' to rerun these tests and create the # libtool script then. ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` if test -f "$ltmain_in"; then test -f Makefile && make "$ltmain" fi fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu CC="$lt_save_CC" else tagname="" fi ;; GCJ) if test -n "$GCJ" && test "X$GCJ" != "Xno"; then # Source file extension for Java test sources. ac_ext=java # Object file extension for compiled Java test sources. objext=o objext_GCJ=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="class foo {}\n" # Code to be used in simple link tests lt_simple_link_test_code='public class conftest { public static void main(String[] argv) {}; }\n' # ltmain only uses $CC for tagged configurations so make sure $CC is set. # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # Allow CC to be a program name with arguments. compiler=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext printf "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $rm conftest* ac_outfile=conftest.$ac_objext printf "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $rm conftest* # Allow CC to be a program name with arguments. lt_save_CC="$CC" CC=${GCJ-"gcj"} compiler=$CC compiler_GCJ=$CC for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` # GCJ did not exist at the time GCC didn't implicitly link libc in. archive_cmds_need_lc_GCJ=no old_archive_cmds_GCJ=$old_archive_cmds lt_prog_compiler_no_builtin_flag_GCJ= if test "$GCC" = yes; then lt_prog_compiler_no_builtin_flag_GCJ=' -fno-builtin' echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6 if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_prog_compiler_rtti_exceptions=no ac_outfile=conftest.$ac_objext printf "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-fno-rtti -fno-exceptions" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:16948: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:16952: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $echo "X$_lt_compiler_boilerplate" | $Xsed >conftest.exp $SED '/^$/d' conftest.err >conftest.er2 if test ! -s conftest.err || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_rtti_exceptions=yes fi fi $rm conftest* fi echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 echo "${ECHO_T}$lt_cv_prog_compiler_rtti_exceptions" >&6 if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then lt_prog_compiler_no_builtin_flag_GCJ="$lt_prog_compiler_no_builtin_flag_GCJ -fno-rtti -fno-exceptions" else : fi fi lt_prog_compiler_wl_GCJ= lt_prog_compiler_pic_GCJ= lt_prog_compiler_static_GCJ= echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 if test "$GCC" = yes; then lt_prog_compiler_wl_GCJ='-Wl,' lt_prog_compiler_static_GCJ='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_GCJ='-Bstatic' fi ;; amigaos*) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. lt_prog_compiler_pic_GCJ='-m68020 -resident32 -malways-restore-a4' ;; beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic_GCJ='-DDLL_EXPORT' ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic_GCJ='-fno-common' ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. lt_prog_compiler_can_build_shared_GCJ=no enable_shared=no ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic_GCJ=-Kconform_pic fi ;; hpux*) # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic_GCJ='-fPIC' ;; esac ;; *) lt_prog_compiler_pic_GCJ='-fPIC' ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) lt_prog_compiler_wl_GCJ='-Wl,' if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_GCJ='-Bstatic' else lt_prog_compiler_static_GCJ='-bnso -bI:/lib/syscalls.exp' fi ;; darwin*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files case $cc_basename in xlc*) lt_prog_compiler_pic_GCJ='-qnocommon' lt_prog_compiler_wl_GCJ='-Wl,' ;; esac ;; mingw* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic_GCJ='-DDLL_EXPORT' ;; hpux9* | hpux10* | hpux11*) lt_prog_compiler_wl_GCJ='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic_GCJ='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? lt_prog_compiler_static_GCJ='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) lt_prog_compiler_wl_GCJ='-Wl,' # PIC (with -KPIC) is the default. lt_prog_compiler_static_GCJ='-non_shared' ;; newsos6) lt_prog_compiler_pic_GCJ='-KPIC' lt_prog_compiler_static_GCJ='-Bstatic' ;; linux*) case $cc_basename in icc* | ecc*) lt_prog_compiler_wl_GCJ='-Wl,' lt_prog_compiler_pic_GCJ='-KPIC' lt_prog_compiler_static_GCJ='-static' ;; pgcc* | pgf77* | pgf90* | pgf95*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) lt_prog_compiler_wl_GCJ='-Wl,' lt_prog_compiler_pic_GCJ='-fpic' lt_prog_compiler_static_GCJ='-Bstatic' ;; ccc*) lt_prog_compiler_wl_GCJ='-Wl,' # All Alpha code is PIC. lt_prog_compiler_static_GCJ='-non_shared' ;; esac ;; osf3* | osf4* | osf5*) lt_prog_compiler_wl_GCJ='-Wl,' # All OSF/1 code is PIC. lt_prog_compiler_static_GCJ='-non_shared' ;; sco3.2v5*) lt_prog_compiler_pic_GCJ='-Kpic' lt_prog_compiler_static_GCJ='-dn' ;; solaris*) lt_prog_compiler_pic_GCJ='-KPIC' lt_prog_compiler_static_GCJ='-Bstatic' case $cc_basename in f77* | f90* | f95*) lt_prog_compiler_wl_GCJ='-Qoption ld ';; *) lt_prog_compiler_wl_GCJ='-Wl,';; esac ;; sunos4*) lt_prog_compiler_wl_GCJ='-Qoption ld ' lt_prog_compiler_pic_GCJ='-PIC' lt_prog_compiler_static_GCJ='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) lt_prog_compiler_wl_GCJ='-Wl,' lt_prog_compiler_pic_GCJ='-KPIC' lt_prog_compiler_static_GCJ='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then lt_prog_compiler_pic_GCJ='-Kconform_pic' lt_prog_compiler_static_GCJ='-Bstatic' fi ;; unicos*) lt_prog_compiler_wl_GCJ='-Wl,' lt_prog_compiler_can_build_shared_GCJ=no ;; uts4*) lt_prog_compiler_pic_GCJ='-pic' lt_prog_compiler_static_GCJ='-Bstatic' ;; *) lt_prog_compiler_can_build_shared_GCJ=no ;; esac fi echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_GCJ" >&5 echo "${ECHO_T}$lt_prog_compiler_pic_GCJ" >&6 # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic_GCJ"; then echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works" >&5 echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works... $ECHO_C" >&6 if test "${lt_prog_compiler_pic_works_GCJ+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_prog_compiler_pic_works_GCJ=no ac_outfile=conftest.$ac_objext printf "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic_GCJ" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:17210: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:17214: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $echo "X$_lt_compiler_boilerplate" | $Xsed >conftest.exp $SED '/^$/d' conftest.err >conftest.er2 if test ! -s conftest.err || diff conftest.exp conftest.er2 >/dev/null; then lt_prog_compiler_pic_works_GCJ=yes fi fi $rm conftest* fi echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_GCJ" >&5 echo "${ECHO_T}$lt_prog_compiler_pic_works_GCJ" >&6 if test x"$lt_prog_compiler_pic_works_GCJ" = xyes; then case $lt_prog_compiler_pic_GCJ in "" | " "*) ;; *) lt_prog_compiler_pic_GCJ=" $lt_prog_compiler_pic_GCJ" ;; esac else lt_prog_compiler_pic_GCJ= lt_prog_compiler_can_build_shared_GCJ=no fi fi case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic_GCJ= ;; *) lt_prog_compiler_pic_GCJ="$lt_prog_compiler_pic_GCJ" ;; esac echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6 if test "${lt_cv_prog_compiler_c_o_GCJ+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_prog_compiler_c_o_GCJ=no $rm -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out printf "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:17272: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:17276: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $echo "X$_lt_compiler_boilerplate" | $Xsed > out/conftest.exp $SED '/^$/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.err || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o_GCJ=yes fi fi chmod u+w . 2>&5 $rm conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files $rm out/* && rmdir out cd .. rmdir conftest $rm conftest* fi echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_GCJ" >&5 echo "${ECHO_T}$lt_cv_prog_compiler_c_o_GCJ" >&6 hard_links="nottested" if test "$lt_cv_prog_compiler_c_o_GCJ" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6 hard_links=yes $rm conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no echo "$as_me:$LINENO: result: $hard_links" >&5 echo "${ECHO_T}$hard_links" >&6 if test "$hard_links" = no; then { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} need_locks=warn fi else need_locks=no fi echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6 runpath_var= allow_undefined_flag_GCJ= enable_shared_with_static_runtimes_GCJ=no archive_cmds_GCJ= archive_expsym_cmds_GCJ= old_archive_From_new_cmds_GCJ= old_archive_from_expsyms_cmds_GCJ= export_dynamic_flag_spec_GCJ= whole_archive_flag_spec_GCJ= thread_safe_flag_spec_GCJ= hardcode_libdir_flag_spec_GCJ= hardcode_libdir_flag_spec_ld_GCJ= hardcode_libdir_separator_GCJ= hardcode_direct_GCJ=no hardcode_minus_L_GCJ=no hardcode_shlibpath_var_GCJ=unsupported link_all_deplibs_GCJ=unknown hardcode_automatic_GCJ=no module_cmds_GCJ= module_expsym_cmds_GCJ= always_export_symbols_GCJ=no export_symbols_cmds_GCJ='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list include_expsyms_GCJ= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. exclude_expsyms_GCJ="_GLOBAL_OFFSET_TABLE_" # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. extract_expsyms_cmds= # Just being paranoid about ensuring that cc_basename is set. for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` case $host_os in cygwin* | mingw* | pw32*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; openbsd*) with_gnu_ld=no ;; esac ld_shlibs_GCJ=yes if test "$with_gnu_ld" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec_GCJ='${wl}--rpath ${wl}$libdir' export_dynamic_flag_spec_GCJ='${wl}--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then whole_archive_flag_spec_GCJ="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else whole_archive_flag_spec_GCJ= fi supports_anon_versioning=no case `$LD -v 2>/dev/null` in *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix3* | aix4* | aix5*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then ld_shlibs_GCJ=no cat <&2 *** Warning: the GNU linker, at least up to release 2.9.1, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to modify your PATH *** so that a non-GNU linker is found, and then restart. EOF fi ;; amigaos*) archive_cmds_GCJ='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec_GCJ='-L$libdir' hardcode_minus_L_GCJ=yes # Samuel A. Falvo II reports # that the semantics of dynamic libraries on AmigaOS, at least up # to version 4, is to share data among multiple programs linked # with the same dynamic library. Since this doesn't match the # behavior of shared libraries on other platforms, we can't use # them. ld_shlibs_GCJ=no ;; beos*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then allow_undefined_flag_GCJ=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds_GCJ='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else ld_shlibs_GCJ=no fi ;; cygwin* | mingw* | pw32*) # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, GCJ) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec_GCJ='-L$libdir' allow_undefined_flag_GCJ=unsupported always_export_symbols_GCJ=no enable_shared_with_static_runtimes_GCJ=yes export_symbols_cmds_GCJ='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols' if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... archive_expsym_cmds_GCJ='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' else ld_shlibs_GCJ=no fi ;; linux*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then tmp_addflag= case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler whole_archive_flag_spec_GCJ='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers whole_archive_flag_spec_GCJ='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; esac archive_cmds_GCJ='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test $supports_anon_versioning = yes; then archive_expsym_cmds_GCJ='$echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ $echo "local: *; };" >> $output_objdir/$libname.ver~ $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi else ld_shlibs_GCJ=no fi ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds_GCJ='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris* | sysv5*) if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then ld_shlibs_GCJ=no cat <&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. EOF elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs_GCJ=no fi ;; sunos4*) archive_cmds_GCJ='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= hardcode_direct_GCJ=yes hardcode_shlibpath_var_GCJ=no ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs_GCJ=no fi ;; esac if test "$ld_shlibs_GCJ" = no; then runpath_var= hardcode_libdir_flag_spec_GCJ= export_dynamic_flag_spec_GCJ= whole_archive_flag_spec_GCJ= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) allow_undefined_flag_GCJ=unsupported always_export_symbols_GCJ=yes archive_expsym_cmds_GCJ='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. hardcode_minus_L_GCJ=yes if test "$GCC" = yes && test -z "$link_static_flag"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct_GCJ=unsupported fi ;; aix4* | aix5*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | grep 'GNU' > /dev/null; then export_symbols_cmds_GCJ='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' else export_symbols_cmds_GCJ='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[23]|aix4.[23].*|aix5*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds_GCJ='' hardcode_direct_GCJ=yes hardcode_libdir_separator_GCJ=':' link_all_deplibs_GCJ=yes if test "$GCC" = yes; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && \ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 hardcode_direct_GCJ=yes else # We have old collect2 hardcode_direct_GCJ=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking hardcode_minus_L_GCJ=yes hardcode_libdir_flag_spec_GCJ='-L$libdir' hardcode_libdir_separator_GCJ= fi esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. always_export_symbols_GCJ=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. allow_undefined_flag_GCJ='-berok' # Determine the default libpath from the value encoded in an empty executable. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'`; fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec_GCJ='${wl}-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds_GCJ="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec_GCJ='${wl}-R $libdir:/usr/lib:/lib' allow_undefined_flag_GCJ="-z nodefs" archive_expsym_cmds_GCJ="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an empty executable. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'`; fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec_GCJ='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag_GCJ=' ${wl}-bernotok' allow_undefined_flag_GCJ=' ${wl}-berok' # -bexpall does not export symbols beginning with underscore (_) always_export_symbols_GCJ=yes # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec_GCJ=' ' archive_cmds_need_lc_GCJ=yes # This is similar to how AIX traditionally builds its shared libraries. archive_expsym_cmds_GCJ="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; amigaos*) archive_cmds_GCJ='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec_GCJ='-L$libdir' hardcode_minus_L_GCJ=yes # see comment about different semantics on the GNU ld section ld_shlibs_GCJ=no ;; bsdi[45]*) export_dynamic_flag_spec_GCJ=-rdynamic ;; cygwin* | mingw* | pw32*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. hardcode_libdir_flag_spec_GCJ=' ' allow_undefined_flag_GCJ=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. archive_cmds_GCJ='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. old_archive_From_new_cmds_GCJ='true' # FIXME: Should let the user specify the lib program. old_archive_cmds_GCJ='lib /OUT:$oldlib$oldobjs$old_deplibs' fix_srcfile_path_GCJ='`cygpath -w "$srcfile"`' enable_shared_with_static_runtimes_GCJ=yes ;; darwin* | rhapsody*) case $host_os in rhapsody* | darwin1.[012]) allow_undefined_flag_GCJ='${wl}-undefined ${wl}suppress' ;; *) # Darwin 1.3 on if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then allow_undefined_flag_GCJ='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' else case ${MACOSX_DEPLOYMENT_TARGET} in 10.[012]) allow_undefined_flag_GCJ='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) allow_undefined_flag_GCJ='${wl}-undefined ${wl}dynamic_lookup' ;; esac fi ;; esac archive_cmds_need_lc_GCJ=no hardcode_direct_GCJ=no hardcode_automatic_GCJ=yes hardcode_shlibpath_var_GCJ=unsupported whole_archive_flag_spec_GCJ='' link_all_deplibs_GCJ=yes if test "$GCC" = yes ; then output_verbose_link_cmd='echo' archive_cmds_GCJ='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' module_cmds_GCJ='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' module_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' else case $cc_basename in xlc*) output_verbose_link_cmd='echo' archive_cmds_GCJ='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' module_cmds_GCJ='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' module_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ;; *) ld_shlibs_GCJ=no ;; esac fi ;; dgux*) archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec_GCJ='-L$libdir' hardcode_shlibpath_var_GCJ=no ;; freebsd1*) ld_shlibs_GCJ=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' hardcode_libdir_flag_spec_GCJ='-R$libdir' hardcode_direct_GCJ=yes hardcode_shlibpath_var_GCJ=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2*) archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_GCJ=yes hardcode_minus_L_GCJ=yes hardcode_shlibpath_var_GCJ=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | kfreebsd*-gnu | dragonfly*) archive_cmds_GCJ='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec_GCJ='-R$libdir' hardcode_direct_GCJ=yes hardcode_shlibpath_var_GCJ=no ;; hpux9*) if test "$GCC" = yes; then archive_cmds_GCJ='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else archive_cmds_GCJ='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir' hardcode_libdir_separator_GCJ=: hardcode_direct_GCJ=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L_GCJ=yes export_dynamic_flag_spec_GCJ='${wl}-E' ;; hpux10* | hpux11*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then case $host_cpu in hppa*64*|ia64*) archive_cmds_GCJ='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds_GCJ='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*|ia64*) archive_cmds_GCJ='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags' ;; *) archive_cmds_GCJ='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;; esac fi if test "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir' hardcode_libdir_flag_spec_ld_GCJ='+b $libdir' hardcode_libdir_separator_GCJ=: hardcode_direct_GCJ=no hardcode_shlibpath_var_GCJ=no ;; ia64*) hardcode_libdir_flag_spec_GCJ='-L$libdir' hardcode_direct_GCJ=no hardcode_shlibpath_var_GCJ=no # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L_GCJ=yes ;; *) hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir' hardcode_libdir_separator_GCJ=: hardcode_direct_GCJ=yes export_dynamic_flag_spec_GCJ='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L_GCJ=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else archive_cmds_GCJ='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_ld_GCJ='-rpath $libdir' fi hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_GCJ=: link_all_deplibs_GCJ=yes ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else archive_cmds_GCJ='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi hardcode_libdir_flag_spec_GCJ='-R$libdir' hardcode_direct_GCJ=yes hardcode_shlibpath_var_GCJ=no ;; newsos6) archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_GCJ=yes hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_GCJ=: hardcode_shlibpath_var_GCJ=no ;; openbsd*) hardcode_direct_GCJ=yes hardcode_shlibpath_var_GCJ=no if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir' export_dynamic_flag_spec_GCJ='${wl}-E' else case $host_os in openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec_GCJ='-R$libdir' ;; *) archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir' ;; esac fi ;; os2*) hardcode_libdir_flag_spec_GCJ='-L$libdir' hardcode_minus_L_GCJ=yes allow_undefined_flag_GCJ=unsupported archive_cmds_GCJ='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' old_archive_From_new_cmds_GCJ='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then allow_undefined_flag_GCJ=' ${wl}-expect_unresolved ${wl}\*' archive_cmds_GCJ='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else allow_undefined_flag_GCJ=' -expect_unresolved \*' archive_cmds_GCJ='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' fi hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_GCJ=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then allow_undefined_flag_GCJ=' ${wl}-expect_unresolved ${wl}\*' archive_cmds_GCJ='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' else allow_undefined_flag_GCJ=' -expect_unresolved \*' archive_cmds_GCJ='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds_GCJ='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp' # Both c and cxx compiler support -rpath directly hardcode_libdir_flag_spec_GCJ='-rpath $libdir' fi hardcode_libdir_separator_GCJ=: ;; sco3.2v5*) archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var_GCJ=no export_dynamic_flag_spec_GCJ='${wl}-Bexport' runpath_var=LD_RUN_PATH hardcode_runpath_var=yes ;; solaris*) no_undefined_flag_GCJ=' -z text' if test "$GCC" = yes; then wlarc='${wl}' archive_cmds_GCJ='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_GCJ='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' else wlarc='' archive_cmds_GCJ='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' archive_expsym_cmds_GCJ='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' fi hardcode_libdir_flag_spec_GCJ='-R$libdir' hardcode_shlibpath_var_GCJ=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # The compiler driver will combine linker options so we # cannot just pass the convience library names through # without $wl, iff we do not link with $LD. # Luckily, gcc supports the same syntax we need for Sun Studio. # Supported since Solaris 2.6 (maybe 2.5.1?) case $wlarc in '') whole_archive_flag_spec_GCJ='-z allextract$convenience -z defaultextract' ;; *) whole_archive_flag_spec_GCJ='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;; esac ;; esac link_all_deplibs_GCJ=yes ;; sunos4*) if test "x$host_vendor" = xsequent; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. archive_cmds_GCJ='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds_GCJ='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi hardcode_libdir_flag_spec_GCJ='-L$libdir' hardcode_direct_GCJ=yes hardcode_minus_L_GCJ=yes hardcode_shlibpath_var_GCJ=no ;; sysv4) case $host_vendor in sni) archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_GCJ=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. archive_cmds_GCJ='$LD -G -o $lib $libobjs $deplibs $linker_flags' reload_cmds_GCJ='$CC -r -o $output$reload_objs' hardcode_direct_GCJ=no ;; motorola) archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_GCJ=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' hardcode_shlibpath_var_GCJ=no ;; sysv4.3*) archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var_GCJ=no export_dynamic_flag_spec_GCJ='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var_GCJ=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes ld_shlibs_GCJ=yes fi ;; sysv4.2uw2*) archive_cmds_GCJ='$LD -G -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_GCJ=yes hardcode_minus_L_GCJ=no hardcode_shlibpath_var_GCJ=no hardcode_runpath_var=yes runpath_var=LD_RUN_PATH ;; sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[78]* | unixware7*) no_undefined_flag_GCJ='${wl}-z ${wl}text' if test "$GCC" = yes; then archive_cmds_GCJ='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds_GCJ='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' fi runpath_var='LD_RUN_PATH' hardcode_shlibpath_var_GCJ=no ;; sysv5*) no_undefined_flag_GCJ=' -z text' # $CC -shared without GNU ld will not create a library from C++ # object files and a static libstdc++, better avoid it by now archive_cmds_GCJ='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' archive_expsym_cmds_GCJ='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' hardcode_libdir_flag_spec_GCJ= hardcode_shlibpath_var_GCJ=no runpath_var='LD_RUN_PATH' ;; uts4*) archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec_GCJ='-L$libdir' hardcode_shlibpath_var_GCJ=no ;; *) ld_shlibs_GCJ=no ;; esac fi echo "$as_me:$LINENO: result: $ld_shlibs_GCJ" >&5 echo "${ECHO_T}$ld_shlibs_GCJ" >&6 test "$ld_shlibs_GCJ" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc_GCJ" in x|xyes) # Assume -lc should be added archive_cmds_need_lc_GCJ=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $archive_cmds_GCJ in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6 $rm conftest* printf "$lt_simple_compile_test_code" > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl_GCJ compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag_GCJ allow_undefined_flag_GCJ= if { (eval echo "$as_me:$LINENO: \"$archive_cmds_GCJ 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 (eval $archive_cmds_GCJ 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } then archive_cmds_need_lc_GCJ=no else archive_cmds_need_lc_GCJ=yes fi allow_undefined_flag_GCJ=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $rm conftest* echo "$as_me:$LINENO: result: $archive_cmds_need_lc_GCJ" >&5 echo "${ECHO_T}$archive_cmds_need_lc_GCJ" >&6 ;; esac fi ;; esac echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6 library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" if test "$GCC" = yes; then sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix4* | aix5*) version_type=linux need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[45]*) version_type=linux need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$host_os in yes,cygwin* | yes,mingw* | yes,pw32*) library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $rm \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" ;; mingw*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH printed by # mingw gcc, but we are running on Cygwin. Gcc prints its search # path with ; separators, and with drive letters. We can handle the # drive letters (cygwin fileutils understands them), so leave them, # especially as we might pass files found there to a mingw objdump, # which wouldn't understand a cygwinified path. Ahh. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac ;; *) library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' ;; esac dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. if test "$GCC" = yes; then sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` else sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' fi sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd1*) dynamic_linker=no ;; kfreebsd*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='GNU ld.so' ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[123]*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; *) # from 3.2 on shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555. postinstall_cmds='chmod 555 $lib' ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be Linux ELF. linux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; knetbsd*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='GNU ld.so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; nto-qnx*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; openbsd*) version_type=sunos need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[89] | openbsd2.[89].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; sco3.2v5*) version_type=osf soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH ;; solaris*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no export_dynamic_flag_spec='${wl}-Blargedynsym' runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac echo "$as_me:$LINENO: result: $dynamic_linker" >&5 echo "${ECHO_T}$dynamic_linker" >&6 test "$dynamic_linker" = no && can_build_shared=no echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6 hardcode_action_GCJ= if test -n "$hardcode_libdir_flag_spec_GCJ" || \ test -n "$runpath_var_GCJ" || \ test "X$hardcode_automatic_GCJ" = "Xyes" ; then # We can hardcode non-existant directories. if test "$hardcode_direct_GCJ" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, GCJ)" != no && test "$hardcode_minus_L_GCJ" != no; then # Linking always hardcodes the temporary library directory. hardcode_action_GCJ=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action_GCJ=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action_GCJ=unsupported fi echo "$as_me:$LINENO: result: $hardcode_action_GCJ" >&5 echo "${ECHO_T}$hardcode_action_GCJ" >&6 if test "$hardcode_action_GCJ" = relink; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi striplib= old_striplib= echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5 echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&6 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) if test -n "$STRIP" ; then striplib="$STRIP -x" echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi ;; *) echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 ;; esac fi if test "x$enable_dlopen" != xyes; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen="load_add_on" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32*) lt_cv_dlopen="LoadLibrary" lt_cv_dlopen_libs= ;; cygwin*) lt_cv_dlopen="dlopen" lt_cv_dlopen_libs= ;; darwin*) # if libdl is installed we need to link against it echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6 if test "${ac_cv_lib_dl_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char dlopen (); int main () { dlopen (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_dl_dlopen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dl_dlopen=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6 if test $ac_cv_lib_dl_dlopen = yes; then lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else lt_cv_dlopen="dyld" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes fi ;; *) echo "$as_me:$LINENO: checking for shl_load" >&5 echo $ECHO_N "checking for shl_load... $ECHO_C" >&6 if test "${ac_cv_func_shl_load+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define shl_load to an innocuous variant, in case declares shl_load. For example, HP-UX 11i declares gettimeofday. */ #define shl_load innocuous_shl_load /* System header to define __stub macros and hopefully few prototypes, which can conflict with char shl_load (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef shl_load /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char shl_load (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_shl_load) || defined (__stub___shl_load) choke me #else char (*f) () = shl_load; #endif #ifdef __cplusplus } #endif int main () { return f != shl_load; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_shl_load=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_shl_load=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5 echo "${ECHO_T}$ac_cv_func_shl_load" >&6 if test $ac_cv_func_shl_load = yes; then lt_cv_dlopen="shl_load" else echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6 if test "${ac_cv_lib_dld_shl_load+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char shl_load (); int main () { shl_load (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_dld_shl_load=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dld_shl_load=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6 if test $ac_cv_lib_dld_shl_load = yes; then lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld" else echo "$as_me:$LINENO: checking for dlopen" >&5 echo $ECHO_N "checking for dlopen... $ECHO_C" >&6 if test "${ac_cv_func_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define dlopen to an innocuous variant, in case declares dlopen. For example, HP-UX 11i declares gettimeofday. */ #define dlopen innocuous_dlopen /* System header to define __stub macros and hopefully few prototypes, which can conflict with char dlopen (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef dlopen /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char dlopen (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_dlopen) || defined (__stub___dlopen) choke me #else char (*f) () = dlopen; #endif #ifdef __cplusplus } #endif int main () { return f != dlopen; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_dlopen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_dlopen=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5 echo "${ECHO_T}$ac_cv_func_dlopen" >&6 if test $ac_cv_func_dlopen = yes; then lt_cv_dlopen="dlopen" else echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6 if test "${ac_cv_lib_dl_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char dlopen (); int main () { dlopen (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_dl_dlopen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dl_dlopen=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6 if test $ac_cv_lib_dl_dlopen = yes; then lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5 echo $ECHO_N "checking for dlopen in -lsvld... $ECHO_C" >&6 if test "${ac_cv_lib_svld_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsvld $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char dlopen (); int main () { dlopen (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_svld_dlopen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_svld_dlopen=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5 echo "${ECHO_T}$ac_cv_lib_svld_dlopen" >&6 if test $ac_cv_lib_svld_dlopen = yes; then lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" else echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5 echo $ECHO_N "checking for dld_link in -ldld... $ECHO_C" >&6 if test "${ac_cv_lib_dld_dld_link+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char dld_link (); int main () { dld_link (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_dld_dld_link=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dld_dld_link=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5 echo "${ECHO_T}$ac_cv_lib_dld_dld_link" >&6 if test $ac_cv_lib_dld_dld_link = yes; then lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld" fi fi fi fi fi fi ;; esac if test "x$lt_cv_dlopen" != xno; then enable_dlopen=yes else enable_dlopen=no fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS="$CPPFLAGS" test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS="$LDFLAGS" eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS="$LIBS" LIBS="$lt_cv_dlopen_libs $LIBS" echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5 echo $ECHO_N "checking whether a program can dlopen itself... $ECHO_C" >&6 if test "${lt_cv_dlopen_self+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then : lt_cv_dlopen_self=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif #ifdef __cplusplus extern "C" void exit (int); #endif void fnord() { int i=42;} int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; /* dlclose (self); */ } exit (status); } EOF if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; x$lt_unknown|x*) lt_cv_dlopen_self=no ;; esac else : # compilation failed lt_cv_dlopen_self=no fi fi rm -fr conftest* fi echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5 echo "${ECHO_T}$lt_cv_dlopen_self" >&6 if test "x$lt_cv_dlopen_self" = xyes; then LDFLAGS="$LDFLAGS $link_static_flag" echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5 echo $ECHO_N "checking whether a statically linked program can dlopen itself... $ECHO_C" >&6 if test "${lt_cv_dlopen_self_static+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then : lt_cv_dlopen_self_static=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif #ifdef __cplusplus extern "C" void exit (int); #endif void fnord() { int i=42;} int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; /* dlclose (self); */ } exit (status); } EOF if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_unknown|x*) lt_cv_dlopen_self_static=no ;; esac else : # compilation failed lt_cv_dlopen_self_static=no fi fi rm -fr conftest* fi echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5 echo "${ECHO_T}$lt_cv_dlopen_self_static" >&6 fi CPPFLAGS="$save_CPPFLAGS" LDFLAGS="$save_LDFLAGS" LIBS="$save_LIBS" ;; esac case $lt_cv_dlopen_self in yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; *) enable_dlopen_self=unknown ;; esac case $lt_cv_dlopen_self_static in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; *) enable_dlopen_self_static=unknown ;; esac fi # The else clause should only fire when bootstrapping the # libtool distribution, otherwise you forgot to ship ltmain.sh # with your package, and you will get complaints that there are # no rules to generate ltmain.sh. if test -f "$ltmain"; then # See if we are running on zsh, and set the options which allow our commands through # without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi # Now quote all the things that may contain metacharacters while being # careful not to overquote the AC_SUBSTed values. We take copies of the # variables and quote the copies for generation of the libtool script. for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \ SED SHELL STRIP \ libname_spec library_names_spec soname_spec extract_expsyms_cmds \ old_striplib striplib file_magic_cmd finish_cmds finish_eval \ deplibs_check_method reload_flag reload_cmds need_locks \ lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ old_postinstall_cmds old_postuninstall_cmds \ compiler_GCJ \ CC_GCJ \ LD_GCJ \ lt_prog_compiler_wl_GCJ \ lt_prog_compiler_pic_GCJ \ lt_prog_compiler_static_GCJ \ lt_prog_compiler_no_builtin_flag_GCJ \ export_dynamic_flag_spec_GCJ \ thread_safe_flag_spec_GCJ \ whole_archive_flag_spec_GCJ \ enable_shared_with_static_runtimes_GCJ \ old_archive_cmds_GCJ \ old_archive_from_new_cmds_GCJ \ predep_objects_GCJ \ postdep_objects_GCJ \ predeps_GCJ \ postdeps_GCJ \ compiler_lib_search_path_GCJ \ archive_cmds_GCJ \ archive_expsym_cmds_GCJ \ postinstall_cmds_GCJ \ postuninstall_cmds_GCJ \ old_archive_from_expsyms_cmds_GCJ \ allow_undefined_flag_GCJ \ no_undefined_flag_GCJ \ export_symbols_cmds_GCJ \ hardcode_libdir_flag_spec_GCJ \ hardcode_libdir_flag_spec_ld_GCJ \ hardcode_libdir_separator_GCJ \ hardcode_automatic_GCJ \ module_cmds_GCJ \ module_expsym_cmds_GCJ \ lt_cv_prog_compiler_c_o_GCJ \ exclude_expsyms_GCJ \ include_expsyms_GCJ; do case $var in old_archive_cmds_GCJ | \ old_archive_from_new_cmds_GCJ | \ archive_cmds_GCJ | \ archive_expsym_cmds_GCJ | \ module_cmds_GCJ | \ module_expsym_cmds_GCJ | \ old_archive_from_expsyms_cmds_GCJ | \ export_symbols_cmds_GCJ | \ extract_expsyms_cmds | reload_cmds | finish_cmds | \ postinstall_cmds | postuninstall_cmds | \ old_postinstall_cmds | old_postuninstall_cmds | \ sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) # Double-quote double-evaled strings. eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" ;; *) eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" ;; esac done case $lt_echo in *'\$0 --fallback-echo"') lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` ;; esac cfgfile="$ofile" cat <<__EOF__ >> "$cfgfile" # ### BEGIN LIBTOOL TAG CONFIG: $tagname # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc_GCJ # Whether or not to disallow shared libs when runtime libs are static allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_GCJ # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # The host system. host_alias=$host_alias host=$host host_os=$host_os # The build system. build_alias=$build_alias build=$build build_os=$build_os # An echo program that does not interpret backslashes. echo=$lt_echo # The archiver. AR=$lt_AR AR_FLAGS=$lt_AR_FLAGS # A C compiler. LTCC=$lt_LTCC # A language-specific compiler. CC=$lt_compiler_GCJ # Is the compiler the GNU C compiler? with_gcc=$GCC_GCJ # An ERE matcher. EGREP=$lt_EGREP # The linker used to build libraries. LD=$lt_LD_GCJ # Whether we need hard or soft links. LN_S=$lt_LN_S # A BSD-compatible nm program. NM=$lt_NM # A symbol stripping program STRIP=$lt_STRIP # Used to examine libraries when file_magic_cmd begins "file" MAGIC_CMD=$MAGIC_CMD # Used on cygwin: DLL creation program. DLLTOOL="$DLLTOOL" # Used on cygwin: object dumper. OBJDUMP="$OBJDUMP" # Used on cygwin: assembler. AS="$AS" # The name of the directory that contains temporary libtool files. objdir=$objdir # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl_GCJ # Object file suffix (normally "o"). objext="$ac_objext" # Old archive suffix (normally "a"). libext="$libext" # Shared library suffix (normally ".so"). shrext_cmds='$shrext_cmds' # Executable file suffix (normally ""). exeext="$exeext" # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic_GCJ pic_mode=$pic_mode # What is the maximum length of a command? max_cmd_len=$lt_cv_sys_max_cmd_len # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o_GCJ # Must we lock files when doing compilation? need_locks=$lt_need_locks # Do we need the lib prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static_GCJ # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_GCJ # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_GCJ # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec_GCJ # Compiler flag to generate thread-safe objects. thread_safe_flag_spec=$lt_thread_safe_flag_spec_GCJ # Library versioning type. version_type=$version_type # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME. library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Commands used to build and install an old-style archive. RANLIB=$lt_RANLIB old_archive_cmds=$lt_old_archive_cmds_GCJ old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_GCJ # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_GCJ # Commands used to build and install a shared archive. archive_cmds=$lt_archive_cmds_GCJ archive_expsym_cmds=$lt_archive_expsym_cmds_GCJ postinstall_cmds=$lt_postinstall_cmds postuninstall_cmds=$lt_postuninstall_cmds # Commands used to build a loadable module (assumed same as above if empty) module_cmds=$lt_module_cmds_GCJ module_expsym_cmds=$lt_module_expsym_cmds_GCJ # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # Dependencies to place before the objects being linked to create a # shared library. predep_objects=$lt_predep_objects_GCJ # Dependencies to place after the objects being linked to create a # shared library. postdep_objects=$lt_postdep_objects_GCJ # Dependencies to place before the objects being linked to create a # shared library. predeps=$lt_predeps_GCJ # Dependencies to place after the objects being linked to create a # shared library. postdeps=$lt_postdeps_GCJ # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_compiler_lib_search_path_GCJ # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method == file_magic. file_magic_cmd=$lt_file_magic_cmd # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag_GCJ # Flag that forces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag_GCJ # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # Same as above, but a single script fragment to be evaled but not shown. finish_eval=$lt_finish_eval # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # This is the shared library runtime path variable. runpath_var=$runpath_var # This is the shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action_GCJ # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist. hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_GCJ # If ld is used when linking, flag to hardcode \$libdir into # a binary during linking. This must work even if \$libdir does # not exist. hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_GCJ # Whether we need a single -rpath flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator_GCJ # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the # resulting binary. hardcode_direct=$hardcode_direct_GCJ # Set to yes if using the -LDIR flag during linking hardcodes DIR into the # resulting binary. hardcode_minus_L=$hardcode_minus_L_GCJ # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into # the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var_GCJ # Set to yes if building a shared library automatically hardcodes DIR into the library # and all subsequent libraries and executables linked against it. hardcode_automatic=$hardcode_automatic_GCJ # Variables whose values should be saved in libtool wrapper scripts and # restored at relink time. variables_saved_for_relink="$variables_saved_for_relink" # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs_GCJ # Compile-time system search path for libraries sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Fix the shell variable \$srcfile for the compiler. fix_srcfile_path="$fix_srcfile_path_GCJ" # Set to yes if exported symbols are required. always_export_symbols=$always_export_symbols_GCJ # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds_GCJ # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms_GCJ # Symbols that must always be exported. include_expsyms=$lt_include_expsyms_GCJ # ### END LIBTOOL TAG CONFIG: $tagname __EOF__ else # If there is no Makefile yet, we rely on a make rule to execute # `config.status --recheck' to rerun these tests and create the # libtool script then. ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` if test -f "$ltmain_in"; then test -f Makefile && make "$ltmain" fi fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu CC="$lt_save_CC" else tagname="" fi ;; RC) # Source file extension for RC test sources. ac_ext=rc # Object file extension for compiled RC test sources. objext=o objext_RC=$objext # Code to be used in simple compile tests lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n' # Code to be used in simple link tests lt_simple_link_test_code="$lt_simple_compile_test_code" # ltmain only uses $CC for tagged configurations so make sure $CC is set. # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # Allow CC to be a program name with arguments. compiler=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext printf "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $rm conftest* ac_outfile=conftest.$ac_objext printf "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $rm conftest* # Allow CC to be a program name with arguments. lt_save_CC="$CC" CC=${RC-"windres"} compiler=$CC compiler_RC=$CC for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` lt_cv_prog_compiler_c_o_RC=yes # The else clause should only fire when bootstrapping the # libtool distribution, otherwise you forgot to ship ltmain.sh # with your package, and you will get complaints that there are # no rules to generate ltmain.sh. if test -f "$ltmain"; then # See if we are running on zsh, and set the options which allow our commands through # without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi # Now quote all the things that may contain metacharacters while being # careful not to overquote the AC_SUBSTed values. We take copies of the # variables and quote the copies for generation of the libtool script. for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \ SED SHELL STRIP \ libname_spec library_names_spec soname_spec extract_expsyms_cmds \ old_striplib striplib file_magic_cmd finish_cmds finish_eval \ deplibs_check_method reload_flag reload_cmds need_locks \ lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ old_postinstall_cmds old_postuninstall_cmds \ compiler_RC \ CC_RC \ LD_RC \ lt_prog_compiler_wl_RC \ lt_prog_compiler_pic_RC \ lt_prog_compiler_static_RC \ lt_prog_compiler_no_builtin_flag_RC \ export_dynamic_flag_spec_RC \ thread_safe_flag_spec_RC \ whole_archive_flag_spec_RC \ enable_shared_with_static_runtimes_RC \ old_archive_cmds_RC \ old_archive_from_new_cmds_RC \ predep_objects_RC \ postdep_objects_RC \ predeps_RC \ postdeps_RC \ compiler_lib_search_path_RC \ archive_cmds_RC \ archive_expsym_cmds_RC \ postinstall_cmds_RC \ postuninstall_cmds_RC \ old_archive_from_expsyms_cmds_RC \ allow_undefined_flag_RC \ no_undefined_flag_RC \ export_symbols_cmds_RC \ hardcode_libdir_flag_spec_RC \ hardcode_libdir_flag_spec_ld_RC \ hardcode_libdir_separator_RC \ hardcode_automatic_RC \ module_cmds_RC \ module_expsym_cmds_RC \ lt_cv_prog_compiler_c_o_RC \ exclude_expsyms_RC \ include_expsyms_RC; do case $var in old_archive_cmds_RC | \ old_archive_from_new_cmds_RC | \ archive_cmds_RC | \ archive_expsym_cmds_RC | \ module_cmds_RC | \ module_expsym_cmds_RC | \ old_archive_from_expsyms_cmds_RC | \ export_symbols_cmds_RC | \ extract_expsyms_cmds | reload_cmds | finish_cmds | \ postinstall_cmds | postuninstall_cmds | \ old_postinstall_cmds | old_postuninstall_cmds | \ sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) # Double-quote double-evaled strings. eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" ;; *) eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" ;; esac done case $lt_echo in *'\$0 --fallback-echo"') lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` ;; esac cfgfile="$ofile" cat <<__EOF__ >> "$cfgfile" # ### BEGIN LIBTOOL TAG CONFIG: $tagname # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc_RC # Whether or not to disallow shared libs when runtime libs are static allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_RC # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # The host system. host_alias=$host_alias host=$host host_os=$host_os # The build system. build_alias=$build_alias build=$build build_os=$build_os # An echo program that does not interpret backslashes. echo=$lt_echo # The archiver. AR=$lt_AR AR_FLAGS=$lt_AR_FLAGS # A C compiler. LTCC=$lt_LTCC # A language-specific compiler. CC=$lt_compiler_RC # Is the compiler the GNU C compiler? with_gcc=$GCC_RC # An ERE matcher. EGREP=$lt_EGREP # The linker used to build libraries. LD=$lt_LD_RC # Whether we need hard or soft links. LN_S=$lt_LN_S # A BSD-compatible nm program. NM=$lt_NM # A symbol stripping program STRIP=$lt_STRIP # Used to examine libraries when file_magic_cmd begins "file" MAGIC_CMD=$MAGIC_CMD # Used on cygwin: DLL creation program. DLLTOOL="$DLLTOOL" # Used on cygwin: object dumper. OBJDUMP="$OBJDUMP" # Used on cygwin: assembler. AS="$AS" # The name of the directory that contains temporary libtool files. objdir=$objdir # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl_RC # Object file suffix (normally "o"). objext="$ac_objext" # Old archive suffix (normally "a"). libext="$libext" # Shared library suffix (normally ".so"). shrext_cmds='$shrext_cmds' # Executable file suffix (normally ""). exeext="$exeext" # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic_RC pic_mode=$pic_mode # What is the maximum length of a command? max_cmd_len=$lt_cv_sys_max_cmd_len # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o_RC # Must we lock files when doing compilation? need_locks=$lt_need_locks # Do we need the lib prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static_RC # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_RC # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_RC # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec_RC # Compiler flag to generate thread-safe objects. thread_safe_flag_spec=$lt_thread_safe_flag_spec_RC # Library versioning type. version_type=$version_type # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME. library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Commands used to build and install an old-style archive. RANLIB=$lt_RANLIB old_archive_cmds=$lt_old_archive_cmds_RC old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_RC # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_RC # Commands used to build and install a shared archive. archive_cmds=$lt_archive_cmds_RC archive_expsym_cmds=$lt_archive_expsym_cmds_RC postinstall_cmds=$lt_postinstall_cmds postuninstall_cmds=$lt_postuninstall_cmds # Commands used to build a loadable module (assumed same as above if empty) module_cmds=$lt_module_cmds_RC module_expsym_cmds=$lt_module_expsym_cmds_RC # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # Dependencies to place before the objects being linked to create a # shared library. predep_objects=$lt_predep_objects_RC # Dependencies to place after the objects being linked to create a # shared library. postdep_objects=$lt_postdep_objects_RC # Dependencies to place before the objects being linked to create a # shared library. predeps=$lt_predeps_RC # Dependencies to place after the objects being linked to create a # shared library. postdeps=$lt_postdeps_RC # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_compiler_lib_search_path_RC # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method == file_magic. file_magic_cmd=$lt_file_magic_cmd # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag_RC # Flag that forces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag_RC # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # Same as above, but a single script fragment to be evaled but not shown. finish_eval=$lt_finish_eval # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # This is the shared library runtime path variable. runpath_var=$runpath_var # This is the shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action_RC # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist. hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_RC # If ld is used when linking, flag to hardcode \$libdir into # a binary during linking. This must work even if \$libdir does # not exist. hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_RC # Whether we need a single -rpath flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator_RC # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the # resulting binary. hardcode_direct=$hardcode_direct_RC # Set to yes if using the -LDIR flag during linking hardcodes DIR into the # resulting binary. hardcode_minus_L=$hardcode_minus_L_RC # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into # the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var_RC # Set to yes if building a shared library automatically hardcodes DIR into the library # and all subsequent libraries and executables linked against it. hardcode_automatic=$hardcode_automatic_RC # Variables whose values should be saved in libtool wrapper scripts and # restored at relink time. variables_saved_for_relink="$variables_saved_for_relink" # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs_RC # Compile-time system search path for libraries sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Fix the shell variable \$srcfile for the compiler. fix_srcfile_path="$fix_srcfile_path_RC" # Set to yes if exported symbols are required. always_export_symbols=$always_export_symbols_RC # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds_RC # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms_RC # Symbols that must always be exported. include_expsyms=$lt_include_expsyms_RC # ### END LIBTOOL TAG CONFIG: $tagname __EOF__ else # If there is no Makefile yet, we rely on a make rule to execute # `config.status --recheck' to rerun these tests and create the # libtool script then. ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` if test -f "$ltmain_in"; then test -f Makefile && make "$ltmain" fi fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu CC="$lt_save_CC" ;; *) { { echo "$as_me:$LINENO: error: Unsupported tag name: $tagname" >&5 echo "$as_me: error: Unsupported tag name: $tagname" >&2;} { (exit 1); exit 1; }; } ;; esac # Append the new tag name to the list of available tags. if test -n "$tagname" ; then available_tags="$available_tags $tagname" fi fi done IFS="$lt_save_ifs" # Now substitute the updated list of available tags. if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then mv "${ofile}T" "$ofile" chmod +x "$ofile" else rm -f "${ofile}T" { { echo "$as_me:$LINENO: error: unable to update list of available tagged configurations." >&5 echo "$as_me: error: unable to update list of available tagged configurations." >&2;} { (exit 1); exit 1; }; } fi fi # This can be used to rebuild libtool when needed LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' # Prevent multiple expansion if test -n "0.22"; then echo "$as_me:$LINENO: checking for intltool >= 0.22" >&5 echo $ECHO_N "checking for intltool >= 0.22... $ECHO_C" >&6 INTLTOOL_REQUIRED_VERSION_AS_INT=`echo 0.22 | awk -F. '{ print $ 1 * 100 + $ 2; }'` INTLTOOL_APPLIED_VERSION=`awk -F\" '/\\$VERSION / { print $ 2; }' ${ac_aux_dir}/intltool-update.in` INTLTOOL_APPLIED_VERSION_AS_INT=`awk -F\" '/\\$VERSION / { split($ 2, VERSION, "."); print VERSION[1] * 100 + VERSION[2];}' ${ac_aux_dir}/intltool-update.in` echo "$as_me:$LINENO: result: $INTLTOOL_APPLIED_VERSION found" >&5 echo "${ECHO_T}$INTLTOOL_APPLIED_VERSION found" >&6 test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT" || { { echo "$as_me:$LINENO: error: Your intltool is too old. You need intltool 0.22 or later." >&5 echo "$as_me: error: Your intltool is too old. You need intltool 0.22 or later." >&2;} { (exit 1); exit 1; }; } fi INTLTOOL_DESKTOP_RULE='%.desktop: %.desktop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' INTLTOOL_DIRECTORY_RULE='%.directory: %.directory.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' INTLTOOL_KEYS_RULE='%.keys: %.keys.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -k -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' INTLTOOL_PROP_RULE='%.prop: %.prop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' INTLTOOL_OAF_RULE='%.oaf: %.oaf.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -p $(top_srcdir)/po $< $@' INTLTOOL_PONG_RULE='%.pong: %.pong.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' INTLTOOL_SERVER_RULE='%.server: %.server.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' INTLTOOL_SHEET_RULE='%.sheet: %.sheet.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' INTLTOOL_SOUNDLIST_RULE='%.soundlist: %.soundlist.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' INTLTOOL_UI_RULE='%.ui: %.ui.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' INTLTOOL_XML_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' INTLTOOL_XML_NOMERGE_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u /tmp $< $@' INTLTOOL_XAM_RULE='%.xam: %.xml.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' INTLTOOL_KBD_RULE='%.kbd: %.kbd.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -m -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' INTLTOOL_CAVES_RULE='%.caves: %.caves.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' INTLTOOL_SCHEMAS_RULE='%.schemas: %.schemas.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -s -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' INTLTOOL_THEME_RULE='%.theme: %.theme.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' # Use the tools built into the package, not the ones that are installed. INTLTOOL_EXTRACT='$(top_builddir)/intltool-extract' INTLTOOL_MERGE='$(top_builddir)/intltool-merge' INTLTOOL_UPDATE='$(top_builddir)/intltool-update' # Extract the first word of "perl", so it can be a program name with args. set dummy perl; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_INTLTOOL_PERL+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $INTLTOOL_PERL in [\\/]* | ?:[\\/]*) ac_cv_path_INTLTOOL_PERL="$INTLTOOL_PERL" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_INTLTOOL_PERL="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done ;; esac fi INTLTOOL_PERL=$ac_cv_path_INTLTOOL_PERL if test -n "$INTLTOOL_PERL"; then echo "$as_me:$LINENO: result: $INTLTOOL_PERL" >&5 echo "${ECHO_T}$INTLTOOL_PERL" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi if test -z "$INTLTOOL_PERL"; then { { echo "$as_me:$LINENO: error: perl not found; required for intltool" >&5 echo "$as_me: error: perl not found; required for intltool" >&2;} { (exit 1); exit 1; }; } fi if test -z "`$INTLTOOL_PERL -v | fgrep '5.' 2> /dev/null`"; then { { echo "$as_me:$LINENO: error: perl 5.x required for intltool" >&5 echo "$as_me: error: perl 5.x required for intltool" >&2;} { (exit 1); exit 1; }; } fi if test "x" != "xno-xml"; then echo "$as_me:$LINENO: checking for XML::Parser" >&5 echo $ECHO_N "checking for XML::Parser... $ECHO_C" >&6 if `$INTLTOOL_PERL -e "require XML::Parser" 2>/dev/null`; then echo "$as_me:$LINENO: result: ok" >&5 echo "${ECHO_T}ok" >&6 else { { echo "$as_me:$LINENO: error: XML::Parser perl module is required for intltool" >&5 echo "$as_me: error: XML::Parser perl module is required for intltool" >&2;} { (exit 1); exit 1; }; } fi fi # Extract the first word of "iconv", so it can be a program name with args. set dummy iconv; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_INTLTOOL_ICONV+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $INTLTOOL_ICONV in [\\/]* | ?:[\\/]*) ac_cv_path_INTLTOOL_ICONV="$INTLTOOL_ICONV" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_INTLTOOL_ICONV="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done test -z "$ac_cv_path_INTLTOOL_ICONV" && ac_cv_path_INTLTOOL_ICONV="iconv" ;; esac fi INTLTOOL_ICONV=$ac_cv_path_INTLTOOL_ICONV if test -n "$INTLTOOL_ICONV"; then echo "$as_me:$LINENO: result: $INTLTOOL_ICONV" >&5 echo "${ECHO_T}$INTLTOOL_ICONV" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi # Extract the first word of "msgfmt", so it can be a program name with args. set dummy msgfmt; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_INTLTOOL_MSGFMT+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $INTLTOOL_MSGFMT in [\\/]* | ?:[\\/]*) ac_cv_path_INTLTOOL_MSGFMT="$INTLTOOL_MSGFMT" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_INTLTOOL_MSGFMT="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done test -z "$ac_cv_path_INTLTOOL_MSGFMT" && ac_cv_path_INTLTOOL_MSGFMT="msgfmt" ;; esac fi INTLTOOL_MSGFMT=$ac_cv_path_INTLTOOL_MSGFMT if test -n "$INTLTOOL_MSGFMT"; then echo "$as_me:$LINENO: result: $INTLTOOL_MSGFMT" >&5 echo "${ECHO_T}$INTLTOOL_MSGFMT" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi # Extract the first word of "msgmerge", so it can be a program name with args. set dummy msgmerge; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_INTLTOOL_MSGMERGE+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $INTLTOOL_MSGMERGE in [\\/]* | ?:[\\/]*) ac_cv_path_INTLTOOL_MSGMERGE="$INTLTOOL_MSGMERGE" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_INTLTOOL_MSGMERGE="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done test -z "$ac_cv_path_INTLTOOL_MSGMERGE" && ac_cv_path_INTLTOOL_MSGMERGE="msgmerge" ;; esac fi INTLTOOL_MSGMERGE=$ac_cv_path_INTLTOOL_MSGMERGE if test -n "$INTLTOOL_MSGMERGE"; then echo "$as_me:$LINENO: result: $INTLTOOL_MSGMERGE" >&5 echo "${ECHO_T}$INTLTOOL_MSGMERGE" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi # Extract the first word of "xgettext", so it can be a program name with args. set dummy xgettext; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_INTLTOOL_XGETTEXT+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $INTLTOOL_XGETTEXT in [\\/]* | ?:[\\/]*) ac_cv_path_INTLTOOL_XGETTEXT="$INTLTOOL_XGETTEXT" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_INTLTOOL_XGETTEXT="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done test -z "$ac_cv_path_INTLTOOL_XGETTEXT" && ac_cv_path_INTLTOOL_XGETTEXT="xgettext" ;; esac fi INTLTOOL_XGETTEXT=$ac_cv_path_INTLTOOL_XGETTEXT if test -n "$INTLTOOL_XGETTEXT"; then echo "$as_me:$LINENO: result: $INTLTOOL_XGETTEXT" >&5 echo "${ECHO_T}$INTLTOOL_XGETTEXT" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi # Remove file type tags (using []) from po/POTFILES. # Manually sed perl in so people don't have to put the intltool scripts in AC_OUTPUT. ac_config_commands="$ac_config_commands intltool" for ac_func in strlcpy strndup asprintf getopt_long program_invocation_name do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else char (*f) () = $ac_func; #endif #ifdef __cplusplus } #endif int main () { return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done SAVE_LIBS=$LIBS LIBS="$LIBS -lm" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { return lrint(1.5); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cat >>confdefs.h <<\_ACEOF #define HAVE_LRINT 1 _ACEOF else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS="$SAVE_LIBS" test -e site_def.h || cat <site_def.h /* These defines enable various tests and other hacks we do not want in released packages. */ #ifndef SITE_DEF_H #define SITE_DEF_H /* #define AUDIO_MIXER_LOG_FP stderr */ /* #define CACHE_CONSISTENCY 1 */ /* #define CACHE_DEBUG 1 */ /* #define CACHE_STATUS 1 */ /* #define DI_GREEDYHM_V_ASSERT 1 */ /* #define DI_MAIN_HEIGHT_DIV 1 */ /* #define DLIST_CONSISTENCY 1 */ /* #define KEYBOARD_KEY_LOG 1 */ /* #define OSD_TEST 1 */ /* #define OSS_LOG_FP stderr */ /* #define OVERLAY_CHROMA_TEST 1 */ /* #define OVERLAY_COLORMAP_FAILURE_TEST 1 */ /* #define OVERLAY_DUMP_CLIPS 1 */ /* #define OVERLAY_EVENT_LOG_FP stderr */ /* #define OVERLAY_LOG_FP stderr */ /* #define REMOTE_COMMAND_LOG 1 */ /* #define TVENG1_RIVATV_TEST 1 */ /* #define TVENG1_XV_TEST 1 */ /* #define TVENG25_BAYER_TEST 1 */ /* #define TVENG25_NOVERLAY_TEST 1 */ /* #define TVENG25_NV12_TEST 1 */ /* #define TVENG25_XV_TEST 1 */ /* #define TVENGEMU_ENABLE 1 */ /* #define TVENG_FORCE_FORMAT 20 */ /* #define TVENG_MIXER_VOLUME_DEBUG 1 */ /* #define TV_SCREEN_DGA_DEBUG 1 */ /* #define X11STUFF_SCREENSAVER_DEBUG 1 */ /* #define X11STUFF_VIDMODE_DEBUG 1 */ /* #define X11STUFF_WM_HINTS_DEBUG 1 */ /* #define XAWTV_CONFIG_TEST 1 */ /* #define ZAPPING_CRASH_TEST 1 */ /* #define ZMISC_TOOLTIP_WARNING 1 */ /* #define ZVBI_CAPTION_DEBUG 1 */ /* #define ZVBI_CAPTURE_THREAD_DEBUG 1 */ /* #define ZVIDEO_EXPOSE_TEST 1 */ #endif EOF PLUGINS_TO_BUILD="screenshot" cat >>confdefs.h <<\_ACEOF #define Z_LITTLE_ENDIAN 1234 _ACEOF cat >>confdefs.h <<\_ACEOF #define Z_BIG_ENDIAN 4321 _ACEOF echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5 echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6 if test "${ac_cv_c_bigendian+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # See if sys/param.h defines the BYTE_ORDER macro. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include int main () { #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN bogus endian macros #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then # It does; now see whether it defined to BIG_ENDIAN or not. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include int main () { #if BYTE_ORDER != BIG_ENDIAN not big endian #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_c_bigendian=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_c_bigendian=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # It does not; compile a test program. if test "$cross_compiling" = yes; then # try to guess the endianness by grepping values into an object file ac_cv_c_bigendian=unknown cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; } short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; } int main () { _ascii (); _ebcdic (); ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then ac_cv_c_bigendian=yes fi if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then if test "$ac_cv_c_bigendian" = unknown; then ac_cv_c_bigendian=no else # finding both strings is unlikely to happen, but who knows? ac_cv_c_bigendian=unknown fi fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { /* Are we little or big endian? From Harbison&Steele. */ union { long l; char c[sizeof (long)]; } u; u.l = 1; exit (u.c[sizeof (long) - 1] == 1); } _ACEOF rm -f conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_c_bigendian=no else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_c_bigendian=yes fi rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5 echo "${ECHO_T}$ac_cv_c_bigendian" >&6 case $ac_cv_c_bigendian in yes) cat >>confdefs.h <<\_ACEOF #define Z_BYTE_ORDER 4321 _ACEOF ;; no) cat >>confdefs.h <<\_ACEOF #define Z_BYTE_ORDER 1234 _ACEOF ;; *) { { echo "$as_me:$LINENO: error: unknown endianness presetting ac_cv_c_bigendian=no (or yes) will help" >&5 echo "$as_me: error: unknown endianness presetting ac_cv_c_bigendian=no (or yes) will help" >&2;} { (exit 1); exit 1; }; } ;; esac SIMD_SUPPORT="" case "$host" in i?86-* | k?-*) cat >>confdefs.h <<\_ACEOF #define HAVE_X86 1 _ACEOF HAVE_X86=yes ;; *) HAVE_X86=no ;; esac if test "x$HAVE_X86" = "xyes"; then HAVE_X86_TRUE= HAVE_X86_FALSE='#' else HAVE_X86_TRUE='#' HAVE_X86_FALSE= fi echo "$as_me:$LINENO: checking if $CC supports MMX" >&5 echo $ECHO_N "checking if $CC supports MMX... $ECHO_C" >&6 SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -mmmx" CAN_COMPILE_MMX="yes" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { _mm_setzero_si64 () ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 CAN_COMPILE_MMX="no" fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext if test x$CAN_COMPILE_MMX = xyes; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __GNUC__ # define GCC_VERSION \ (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) # if 0 <= GCC_VERSION && GCC_VERSION < 30200 6177459036 # endif #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "6177459036" >/dev/null 2>&1; then CAN_COMPILE_MMX="disabled" fi rm -f conftest* fi if test x$CAN_COMPILE_MMX = xyes; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __GNUC__ # define GCC_VERSION \ (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) # if 30200 <= GCC_VERSION && GCC_VERSION < 30300 6177459036 # endif #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "6177459036" >/dev/null 2>&1; then CAN_COMPILE_MMX="broken" fi rm -f conftest* fi if test x$CAN_COMPILE_MMX = xyes; then if test $HAVE_X86 = no -o xMMX = xSSE2 -o xMMX = xSSE3; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __GNUC__ # define GCC_VERSION \ (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) # if 30300 <= GCC_VERSION && GCC_VERSION < 40001 6177459036 # endif #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "6177459036" >/dev/null 2>&1; then CAN_COMPILE_MMX="broken" fi rm -f conftest* fi fi if test x$CAN_COMPILE_MMX = xyes; then SIMD_SUPPORT="${SIMD_SUPPORT}MMX " cat >>confdefs.h <<\_ACEOF #define CAN_COMPILE_MMX 1 _ACEOF fi if test "x$CAN_COMPILE_MMX" = "xyes"; then CAN_COMPILE_MMX_TRUE= CAN_COMPILE_MMX_FALSE='#' else CAN_COMPILE_MMX_TRUE='#' CAN_COMPILE_MMX_FALSE= fi CFLAGS="$SAVE_CFLAGS" echo "$as_me:$LINENO: result: $CAN_COMPILE_MMX" >&5 echo "${ECHO_T}$CAN_COMPILE_MMX" >&6 echo "$as_me:$LINENO: checking if $CC supports 3DNOW" >&5 echo $ECHO_N "checking if $CC supports 3DNOW... $ECHO_C" >&6 SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -m3dnow" CAN_COMPILE_3DNOW="yes" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { _m_femms () ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 CAN_COMPILE_3DNOW="no" fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext if test x$CAN_COMPILE_3DNOW = xyes; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __GNUC__ # define GCC_VERSION \ (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) # if 0 <= GCC_VERSION && GCC_VERSION < 30200 6177459036 # endif #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "6177459036" >/dev/null 2>&1; then CAN_COMPILE_3DNOW="disabled" fi rm -f conftest* fi if test x$CAN_COMPILE_3DNOW = xyes; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __GNUC__ # define GCC_VERSION \ (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) # if 30200 <= GCC_VERSION && GCC_VERSION < 30300 6177459036 # endif #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "6177459036" >/dev/null 2>&1; then CAN_COMPILE_3DNOW="broken" fi rm -f conftest* fi if test x$CAN_COMPILE_3DNOW = xyes; then if test $HAVE_X86 = no -o x3DNOW = xSSE2 -o x3DNOW = xSSE3; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __GNUC__ # define GCC_VERSION \ (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) # if 30300 <= GCC_VERSION && GCC_VERSION < 40001 6177459036 # endif #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "6177459036" >/dev/null 2>&1; then CAN_COMPILE_3DNOW="broken" fi rm -f conftest* fi fi if test x$CAN_COMPILE_3DNOW = xyes; then SIMD_SUPPORT="${SIMD_SUPPORT}3DNOW " cat >>confdefs.h <<\_ACEOF #define CAN_COMPILE_3DNOW 1 _ACEOF fi if test "x$CAN_COMPILE_3DNOW" = "xyes"; then CAN_COMPILE_3DNOW_TRUE= CAN_COMPILE_3DNOW_FALSE='#' else CAN_COMPILE_3DNOW_TRUE='#' CAN_COMPILE_3DNOW_FALSE= fi CFLAGS="$SAVE_CFLAGS" echo "$as_me:$LINENO: result: $CAN_COMPILE_3DNOW" >&5 echo "${ECHO_T}$CAN_COMPILE_3DNOW" >&6 echo "$as_me:$LINENO: checking if $CC supports SSE" >&5 echo $ECHO_N "checking if $CC supports SSE... $ECHO_C" >&6 SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -msse" CAN_COMPILE_SSE="yes" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { _mm_setzero_ps () ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 CAN_COMPILE_SSE="no" fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext if test x$CAN_COMPILE_SSE = xyes; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __GNUC__ # define GCC_VERSION \ (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) # if 0 <= GCC_VERSION && GCC_VERSION < 30200 6177459036 # endif #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "6177459036" >/dev/null 2>&1; then CAN_COMPILE_SSE="disabled" fi rm -f conftest* fi if test x$CAN_COMPILE_SSE = xyes; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __GNUC__ # define GCC_VERSION \ (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) # if 30200 <= GCC_VERSION && GCC_VERSION < 30300 6177459036 # endif #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "6177459036" >/dev/null 2>&1; then CAN_COMPILE_SSE="broken" fi rm -f conftest* fi if test x$CAN_COMPILE_SSE = xyes; then if test $HAVE_X86 = no -o xSSE = xSSE2 -o xSSE = xSSE3; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __GNUC__ # define GCC_VERSION \ (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) # if 30300 <= GCC_VERSION && GCC_VERSION < 40001 6177459036 # endif #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "6177459036" >/dev/null 2>&1; then CAN_COMPILE_SSE="broken" fi rm -f conftest* fi fi if test x$CAN_COMPILE_SSE = xyes; then SIMD_SUPPORT="${SIMD_SUPPORT}SSE " cat >>confdefs.h <<\_ACEOF #define CAN_COMPILE_SSE 1 _ACEOF fi if test "x$CAN_COMPILE_SSE" = "xyes"; then CAN_COMPILE_SSE_TRUE= CAN_COMPILE_SSE_FALSE='#' else CAN_COMPILE_SSE_TRUE='#' CAN_COMPILE_SSE_FALSE= fi CFLAGS="$SAVE_CFLAGS" echo "$as_me:$LINENO: result: $CAN_COMPILE_SSE" >&5 echo "${ECHO_T}$CAN_COMPILE_SSE" >&6 echo "$as_me:$LINENO: checking if $CC supports SSE2" >&5 echo $ECHO_N "checking if $CC supports SSE2... $ECHO_C" >&6 SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -msse2" CAN_COMPILE_SSE2="yes" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { _mm_setzero_pd () ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 CAN_COMPILE_SSE2="no" fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext if test x$CAN_COMPILE_SSE2 = xyes; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __GNUC__ # define GCC_VERSION \ (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) # if 0 <= GCC_VERSION && GCC_VERSION < 30200 6177459036 # endif #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "6177459036" >/dev/null 2>&1; then CAN_COMPILE_SSE2="disabled" fi rm -f conftest* fi if test x$CAN_COMPILE_SSE2 = xyes; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __GNUC__ # define GCC_VERSION \ (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) # if 30200 <= GCC_VERSION && GCC_VERSION < 30300 6177459036 # endif #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "6177459036" >/dev/null 2>&1; then CAN_COMPILE_SSE2="broken" fi rm -f conftest* fi if test x$CAN_COMPILE_SSE2 = xyes; then if test $HAVE_X86 = no -o xSSE2 = xSSE2 -o xSSE2 = xSSE3; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __GNUC__ # define GCC_VERSION \ (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) # if 30300 <= GCC_VERSION && GCC_VERSION < 40001 6177459036 # endif #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "6177459036" >/dev/null 2>&1; then CAN_COMPILE_SSE2="broken" fi rm -f conftest* fi fi if test x$CAN_COMPILE_SSE2 = xyes; then SIMD_SUPPORT="${SIMD_SUPPORT}SSE2 " cat >>confdefs.h <<\_ACEOF #define CAN_COMPILE_SSE2 1 _ACEOF fi if test "x$CAN_COMPILE_SSE2" = "xyes"; then CAN_COMPILE_SSE2_TRUE= CAN_COMPILE_SSE2_FALSE='#' else CAN_COMPILE_SSE2_TRUE='#' CAN_COMPILE_SSE2_FALSE= fi CFLAGS="$SAVE_CFLAGS" echo "$as_me:$LINENO: result: $CAN_COMPILE_SSE2" >&5 echo "${ECHO_T}$CAN_COMPILE_SSE2" >&6 echo "$as_me:$LINENO: checking if $CC supports SSE3" >&5 echo $ECHO_N "checking if $CC supports SSE3... $ECHO_C" >&6 SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -msse3" CAN_COMPILE_SSE3="yes" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { _mm_lddqu_si128 (0x1000) ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 CAN_COMPILE_SSE3="no" fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext if test x$CAN_COMPILE_SSE3 = xyes; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __GNUC__ # define GCC_VERSION \ (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) # if 0 <= GCC_VERSION && GCC_VERSION < 30200 6177459036 # endif #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "6177459036" >/dev/null 2>&1; then CAN_COMPILE_SSE3="disabled" fi rm -f conftest* fi if test x$CAN_COMPILE_SSE3 = xyes; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __GNUC__ # define GCC_VERSION \ (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) # if 30200 <= GCC_VERSION && GCC_VERSION < 30300 6177459036 # endif #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "6177459036" >/dev/null 2>&1; then CAN_COMPILE_SSE3="broken" fi rm -f conftest* fi if test x$CAN_COMPILE_SSE3 = xyes; then if test $HAVE_X86 = no -o xSSE3 = xSSE2 -o xSSE3 = xSSE3; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __GNUC__ # define GCC_VERSION \ (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) # if 30300 <= GCC_VERSION && GCC_VERSION < 40001 6177459036 # endif #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "6177459036" >/dev/null 2>&1; then CAN_COMPILE_SSE3="broken" fi rm -f conftest* fi fi if test x$CAN_COMPILE_SSE3 = xyes; then SIMD_SUPPORT="${SIMD_SUPPORT}SSE3 " cat >>confdefs.h <<\_ACEOF #define CAN_COMPILE_SSE3 1 _ACEOF fi if test "x$CAN_COMPILE_SSE3" = "xyes"; then CAN_COMPILE_SSE3_TRUE= CAN_COMPILE_SSE3_FALSE='#' else CAN_COMPILE_SSE3_TRUE='#' CAN_COMPILE_SSE3_FALSE= fi CFLAGS="$SAVE_CFLAGS" echo "$as_me:$LINENO: result: $CAN_COMPILE_SSE3" >&5 echo "${ECHO_T}$CAN_COMPILE_SSE3" >&6 echo "$as_me:$LINENO: checking if $CC supports ALTIVEC" >&5 echo $ECHO_N "checking if $CC supports ALTIVEC... $ECHO_C" >&6 SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -maltivec -mabi=altivec" CAN_COMPILE_ALTIVEC="yes" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { vec_dssall () ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 CAN_COMPILE_ALTIVEC="no" fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext if test x$CAN_COMPILE_ALTIVEC = xyes; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __GNUC__ # define GCC_VERSION \ (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) # if 0 <= GCC_VERSION && GCC_VERSION < 30200 6177459036 # endif #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "6177459036" >/dev/null 2>&1; then CAN_COMPILE_ALTIVEC="disabled" fi rm -f conftest* fi if test x$CAN_COMPILE_ALTIVEC = xyes; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __GNUC__ # define GCC_VERSION \ (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) # if 30200 <= GCC_VERSION && GCC_VERSION < 30300 6177459036 # endif #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "6177459036" >/dev/null 2>&1; then CAN_COMPILE_ALTIVEC="broken" fi rm -f conftest* fi if test x$CAN_COMPILE_ALTIVEC = xyes; then if test $HAVE_X86 = no -o xALTIVEC = xSSE2 -o xALTIVEC = xSSE3; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __GNUC__ # define GCC_VERSION \ (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) # if 30300 <= GCC_VERSION && GCC_VERSION < 40001 6177459036 # endif #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "6177459036" >/dev/null 2>&1; then CAN_COMPILE_ALTIVEC="broken" fi rm -f conftest* fi fi if test x$CAN_COMPILE_ALTIVEC = xyes; then SIMD_SUPPORT="${SIMD_SUPPORT}ALTIVEC " cat >>confdefs.h <<\_ACEOF #define CAN_COMPILE_ALTIVEC 1 _ACEOF fi if test "x$CAN_COMPILE_ALTIVEC" = "xyes"; then CAN_COMPILE_ALTIVEC_TRUE= CAN_COMPILE_ALTIVEC_FALSE='#' else CAN_COMPILE_ALTIVEC_TRUE='#' CAN_COMPILE_ALTIVEC_FALSE= fi CFLAGS="$SAVE_CFLAGS" echo "$as_me:$LINENO: result: $CAN_COMPILE_ALTIVEC" >&5 echo "${ECHO_T}$CAN_COMPILE_ALTIVEC" >&6 echo "$as_me:$LINENO: checking if $CC supports --param inline-unit-growth" >&5 echo $ECHO_N "checking if $CC supports --param inline-unit-growth... $ECHO_C" >&6 SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS --param inline-unit-growth=3000" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then HAVE_GCC_LIMITS=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 HAVE_GCC_LIMITS=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: result: $HAVE_GCC_LIMITS" >&5 echo "${ECHO_T}$HAVE_GCC_LIMITS" >&6 if test "x$HAVE_GCC_LIMITS" = "xyes"; then HAVE_GCC_LIMITS_TRUE= HAVE_GCC_LIMITS_FALSE='#' else HAVE_GCC_LIMITS_TRUE='#' HAVE_GCC_LIMITS_FALSE= fi CFLAGS="$SAVE_CFLAGS" echo "$as_me:$LINENO: checking if $CC has __builtin_popcount" >&5 echo $ECHO_N "checking if $CC has __builtin_popcount... $ECHO_C" >&6 HAVE_BUILTIN_POPCOUNT="yes" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { __builtin_popcount(123) ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cat >>confdefs.h <<\_ACEOF #define HAVE_BUILTIN_POPCOUNT 1 _ACEOF else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 HAVE_BUILTIN_POPCOUNT="no" fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext echo "$as_me:$LINENO: result: $HAVE_BUILTIN_POPCOUNT" >&5 echo "${ECHO_T}$HAVE_BUILTIN_POPCOUNT" >&6 echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5 echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6 if test "${ac_cv_lib_pthread_pthread_create+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lpthread $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char pthread_create (); int main () { pthread_create (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_pthread_pthread_create=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_pthread_pthread_create=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_create" >&5 echo "${ECHO_T}$ac_cv_lib_pthread_pthread_create" >&6 if test $ac_cv_lib_pthread_pthread_create = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBPTHREAD 1 _ACEOF LIBS="-lpthread $LIBS" else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { pthread_create(); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 LDFLAGS="$LDFLAGS -pthread" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { pthread_create(); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { echo "$as_me:$LINENO: error: *** Unable to link pthread functions. Please report this bug. See \`config.log' for more details." >&5 echo "$as_me: error: *** Unable to link pthread functions. Please report this bug. See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi # Stolen from glib package. HAVE_ISO_C_VARIADIC_MACROS="no" echo "$as_me:$LINENO: checking for ISO C99 variadic macros" >&5 echo $ECHO_N "checking for ISO C99 variadic macros... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { int a (int p1, int p2, int p3); #define call_a(...) a(1,__VA_ARGS__) call_a(2,3); ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then HAVE_ISO_C_VARIADIC="yes" cat >>confdefs.h <<\_ACEOF #define HAVE_ISO_C_VARIADIC_MACROS 1 _ACEOF else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: result: $HAVE_ISO_C_VARIADIC_MACROS" >&5 echo "${ECHO_T}$HAVE_ISO_C_VARIADIC_MACROS" >&6 HAVE_GNU_C_VARIADIC_MACROS="no" echo "$as_me:$LINENO: checking for GNU C variadic macros" >&5 echo $ECHO_N "checking for GNU C variadic macros... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { int a (int p1, int p2, int p3); #define call_a(params...) a(1,params) call_a(2,3); ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then HAVE_GNU_C_VARIADIC_MACROS="yes" cat >>confdefs.h <<\_ACEOF #define HAVE_GNU_C_VARIADIC_MACROS 1 _ACEOF else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: result: $HAVE_GNU_C_VARIADIC_MACROS" >&5 echo "${ECHO_T}$HAVE_GNU_C_VARIADIC_MACROS" >&6 VIDEO_SUPPORT="" NEED_ZSFB="" echo "$as_me:$LINENO: checking whether to build the Video4Linux driver interfaces" >&5 echo $ECHO_N "checking whether to build the Video4Linux driver interfaces... $ECHO_C" >&6 # Check whether --enable-v4l or --disable-v4l was given. if test "${enable_v4l+set}" = set; then enableval="$enable_v4l" enable_v4l="$enableval" else enable_v4l="auto" fi; test "x$enable_v4l" = "xauto" && test "x`uname -s`" = "xLinux" && enable_v4l=yes test "x$enable_v4l" != "xyes" && enable_v4l=no echo "$as_me:$LINENO: result: $enable_v4l" >&5 echo "${ECHO_T}$enable_v4l" >&6 if test "x$enable_v4l" = "xyes"; then cat >>confdefs.h <<\_ACEOF #define ENABLE_V4L 1 _ACEOF VIDEO_SUPPORT="${VIDEO_SUPPORT}V4L V4L2 " NEED_ZSFB=yes PLUGINS_TO_BUILD="$PLUGINS_TO_BUILD deinterlace" fi if test "x$enable_v4l" = "xyes"; then BUILD_DEINTERLACE_PLUGIN_TRUE= BUILD_DEINTERLACE_PLUGIN_FALSE='#' else BUILD_DEINTERLACE_PLUGIN_TRUE='#' BUILD_DEINTERLACE_PLUGIN_FALSE= fi echo "$as_me:$LINENO: checking whether to build the Bktr/Meteor driver interfaces" >&5 echo $ECHO_N "checking whether to build the Bktr/Meteor driver interfaces... $ECHO_C" >&6 # Check whether --enable-bktr or --disable-bktr was given. if test "${enable_bktr+set}" = set; then enableval="$enable_bktr" enable_bktr="$enableval" else enable_bktr="auto" fi; test "x$enable_bktr" = "xauto" && case "`uname -s`" in OpenBSD | FreeBSD | NetBSD | BSDi) enable_bktr=yes ;; *) ;; esac test "x$enable_bktr" != "xyes" && enable_bktr=no echo "$as_me:$LINENO: result: $enable_bktr" >&5 echo "${ECHO_T}$enable_bktr" >&6 if test "x$enable_bktr" = "xyes"; then cat >>confdefs.h <<\_ACEOF #define ENABLE_BKTR 1 _ACEOF VIDEO_SUPPORT="${VIDEO_SUPPORT}BKTR " fi if test "x$NEED_ZSFB" != "x"; then HAVE_PAM="no - using setuid" echo "$as_me:$LINENO: checking whether to enable PAM support" >&5 echo $ECHO_N "checking whether to enable PAM support... $ECHO_C" >&6 # Check whether --enable-pam or --disable-pam was given. if test "${enable_pam+set}" = set; then enableval="$enable_pam" enable_pam="$enableval" else enable_pam="yes" fi; echo "$as_me:$LINENO: result: $enable_pam" >&5 echo "${ECHO_T}$enable_pam" >&6 if test "x$enable_pam" = "xyes"; then # Extract the first word of "consolehelper", so it can be a program name with args. set dummy consolehelper; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_CONSOLEHELPER_LOCATION+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $CONSOLEHELPER_LOCATION in [\\/]* | ?:[\\/]*) ac_cv_path_CONSOLEHELPER_LOCATION="$CONSOLEHELPER_LOCATION" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_CONSOLEHELPER_LOCATION="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done test -z "$ac_cv_path_CONSOLEHELPER_LOCATION" && ac_cv_path_CONSOLEHELPER_LOCATION="""" ;; esac fi CONSOLEHELPER_LOCATION=$ac_cv_path_CONSOLEHELPER_LOCATION if test -n "$CONSOLEHELPER_LOCATION"; then echo "$as_me:$LINENO: result: $CONSOLEHELPER_LOCATION" >&5 echo "${ECHO_T}$CONSOLEHELPER_LOCATION" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi if test "x$CONSOLEHELPER_LOCATION" = "x"; then echo "$as_me:$LINENO: result: consolehelper not found, using setuid binary" >&5 echo "${ECHO_T}consolehelper not found, using setuid binary" >&6 fi HAVE_PAM="yes" fi else HAVE_PAM="not needed" fi if test "x$NEED_ZSFB" != "x"; then NEED_ZSFB_TRUE= NEED_ZSFB_FALSE='#' else NEED_ZSFB_TRUE='#' NEED_ZSFB_FALSE= fi if test "x$CONSOLEHELPER_LOCATION" = "x"; then SUID_ZSFB_TRUE= SUID_ZSFB_FALSE='#' else SUID_ZSFB_TRUE='#' SUID_ZSFB_FALSE= fi ZSFB_OWNER="root" ZSFB_GROUP="root" test "x$VIDEO_SUPPORT" = "x" && VIDEO_SUPPORT="none" AUDIO_SUPPORT="" HAVE_OSS="no" for ac_header in sys/soundcard.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if eval "test \"\${$as_ac_Header+set}\" = set"; then echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## ------------------------------------------------------------------------------------ ## ## Report this to http://sourceforge.net/tracker/?atid=102599&group_id=2599&func=browse ## ## ------------------------------------------------------------------------------------ ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF HAVE_OSS=yes fi done for ac_header in machine/soundcard.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if eval "test \"\${$as_ac_Header+set}\" = set"; then echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## ------------------------------------------------------------------------------------ ## ## Report this to http://sourceforge.net/tracker/?atid=102599&group_id=2599&func=browse ## ## ------------------------------------------------------------------------------------ ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF HAVE_OSS=yes fi done echo "$as_me:$LINENO: checking for OSS" >&5 echo $ECHO_N "checking for OSS... $ECHO_C" >&6 echo "$as_me:$LINENO: result: $HAVE_OSS" >&5 echo "${ECHO_T}$HAVE_OSS" >&6 if test "x$HAVE_OSS" = "xyes"; then cat >>confdefs.h <<\_ACEOF #define HAVE_OSS 1 _ACEOF AUDIO_SUPPORT="${AUDIO_SUPPORT}OSS " fi HAVE_ESD="yes" ESD_LIBS="" echo "$as_me:$LINENO: checking for esd_record_stream_fallback in -lesd" >&5 echo $ECHO_N "checking for esd_record_stream_fallback in -lesd... $ECHO_C" >&6 if test "${ac_cv_lib_esd_esd_record_stream_fallback+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lesd $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char esd_record_stream_fallback (); int main () { esd_record_stream_fallback (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_esd_esd_record_stream_fallback=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_esd_esd_record_stream_fallback=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_esd_esd_record_stream_fallback" >&5 echo "${ECHO_T}$ac_cv_lib_esd_esd_record_stream_fallback" >&6 if test $ac_cv_lib_esd_esd_record_stream_fallback = yes; then ESD_LIBS="-lesd" else HAVE_ESD="no" fi if test "x$HAVE_ESD" = "xyes"; then cat >>confdefs.h <<\_ACEOF #define HAVE_ESD 1 _ACEOF AUDIO_SUPPORT="${AUDIO_SUPPORT}ESD " fi HAVE_ARTS="no" echo "$as_me:$LINENO: checking for ARTS" >&5 echo $ECHO_N "checking for ARTS... $ECHO_C" >&6 ARTS_VERSION=`artsc-config --version` if test $? -eq 0; then ARTS_CFLAGS=`artsc-config --cflags` ARTS_LIBS=`artsc-config --libs` SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS $ARTS_CFLAGS $ARTS_LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then HAVE_ARTS="yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext CFLAGS="$SAVE_CFLAGS" fi if test "x$HAVE_ARTS" = "xno"; then echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 else echo "$as_me:$LINENO: result: $ARTS_VERSION" >&5 echo "${ECHO_T}$ARTS_VERSION" >&6 cat >>confdefs.h <<\_ACEOF #define HAVE_ARTS 1 _ACEOF AUDIO_SUPPORT="${AUDIO_SUPPORT}ARTS " fi test "x$AUDIO_SUPPORT" = "x" && AUDIO_SUPPORT="none" echo "$as_me:$LINENO: checking for X" >&5 echo $ECHO_N "checking for X... $ECHO_C" >&6 # Check whether --with-x or --without-x was given. if test "${with_x+set}" = set; then withval="$with_x" fi; # $have_x is `yes', `no', `disabled', or empty when we do not yet know. if test "x$with_x" = xno; then # The user explicitly disabled X. have_x=disabled else if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then # Both variables are already set. have_x=yes else if test "${ac_cv_have_x+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # One or both of the vars are not set, and there is no cached value. ac_x_includes=no ac_x_libraries=no rm -fr conftest.dir if mkdir conftest.dir; then cd conftest.dir # Make sure to not put "make" in the Imakefile rules, since we grep it out. cat >Imakefile <<'_ACEOF' acfindx: @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"' _ACEOF if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then # GNU make sometimes prints "make[1]: Entering...", which would confuse us. eval `${MAKE-make} acfindx 2>/dev/null | grep -v make` # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR. for ac_extension in a so sl; do if test ! -f $ac_im_usrlibdir/libX11.$ac_extension && test -f $ac_im_libdir/libX11.$ac_extension; then ac_im_usrlibdir=$ac_im_libdir; break fi done # Screen out bogus values from the imake configuration. They are # bogus both because they are the default anyway, and because # using them would break gcc on systems where it needs fixed includes. case $ac_im_incroot in /usr/include) ;; *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;; esac case $ac_im_usrlibdir in /usr/lib | /lib) ;; *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;; esac fi cd .. rm -fr conftest.dir fi # Standard set of common directories for X headers. # Check X11 before X11Rn because it is often a symlink to the current release. ac_x_header_dirs=' /usr/X11/include /usr/X11R6/include /usr/X11R5/include /usr/X11R4/include /usr/include/X11 /usr/include/X11R6 /usr/include/X11R5 /usr/include/X11R4 /usr/local/X11/include /usr/local/X11R6/include /usr/local/X11R5/include /usr/local/X11R4/include /usr/local/include/X11 /usr/local/include/X11R6 /usr/local/include/X11R5 /usr/local/include/X11R4 /usr/X386/include /usr/x386/include /usr/XFree86/include/X11 /usr/include /usr/local/include /usr/unsupported/include /usr/athena/include /usr/local/x11r5/include /usr/lpp/Xamples/include /usr/openwin/include /usr/openwin/share/include' if test "$ac_x_includes" = no; then # Guess where to find include files, by looking for Intrinsic.h. # First, try using that file with no special directory specified. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then # We can compile using X headers with no special include directory. ac_x_includes= else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 for ac_dir in $ac_x_header_dirs; do if test -r "$ac_dir/X11/Intrinsic.h"; then ac_x_includes=$ac_dir break fi done fi rm -f conftest.err conftest.$ac_ext fi # $ac_x_includes = no if test "$ac_x_libraries" = no; then # Check for the libraries. # See if we find them without any special options. # Don't add to $LIBS permanently. ac_save_LIBS=$LIBS LIBS="-lXt $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { XtMalloc (0) ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then LIBS=$ac_save_LIBS # We can link X programs with no special library path. ac_x_libraries= else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 LIBS=$ac_save_LIBS for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g` do # Don't even attempt the hair of trying to link an X program! for ac_extension in a so sl; do if test -r $ac_dir/libXt.$ac_extension; then ac_x_libraries=$ac_dir break 2 fi done done fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi # $ac_x_libraries = no if test "$ac_x_includes" = no || test "$ac_x_libraries" = no; then # Didn't find X anywhere. Cache the known absence of X. ac_cv_have_x="have_x=no" else # Record where we found X for the cache. ac_cv_have_x="have_x=yes \ ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries" fi fi fi eval "$ac_cv_have_x" fi # $with_x != no if test "$have_x" != yes; then echo "$as_me:$LINENO: result: $have_x" >&5 echo "${ECHO_T}$have_x" >&6 no_x=yes else # If each of the values was on the command line, it overrides each guess. test "x$x_includes" = xNONE && x_includes=$ac_x_includes test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries # Update the cache value to reflect the command line values. ac_cv_have_x="have_x=yes \ ac_x_includes=$x_includes ac_x_libraries=$x_libraries" echo "$as_me:$LINENO: result: libraries $x_libraries, headers $x_includes" >&5 echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6 fi if test "$no_x" = yes; then # Not all programs may use this symbol, but it does not hurt to define it. cat >>confdefs.h <<\_ACEOF #define X_DISPLAY_MISSING 1 _ACEOF X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS= else if test -n "$x_includes"; then X_CFLAGS="$X_CFLAGS -I$x_includes" fi # It would also be nice to do this for all -L options, not just this one. if test -n "$x_libraries"; then X_LIBS="$X_LIBS -L$x_libraries" # For Solaris; some versions of Sun CC require a space after -R and # others require no space. Words are not sufficient . . . . case `(uname -sr) 2>/dev/null` in "SunOS 5"*) echo "$as_me:$LINENO: checking whether -R must be followed by a space" >&5 echo $ECHO_N "checking whether -R must be followed by a space... $ECHO_C" >&6 ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_R_nospace=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_R_nospace=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test $ac_R_nospace = yes; then echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 X_LIBS="$X_LIBS -R$x_libraries" else LIBS="$ac_xsave_LIBS -R $x_libraries" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_R_space=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_R_space=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test $ac_R_space = yes; then echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 X_LIBS="$X_LIBS -R $x_libraries" else echo "$as_me:$LINENO: result: neither works" >&5 echo "${ECHO_T}neither works" >&6 fi fi LIBS=$ac_xsave_LIBS esac fi # Check for system-dependent libraries X programs must link with. # Do this before checking for the system-independent R6 libraries # (-lICE), since we may need -lsocket or whatever for X linking. if test "$ISC" = yes; then X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet" else # Martyn Johnson says this is needed for Ultrix, if the X # libraries were built with DECnet support. And Karl Berry says # the Alpha needs dnet_stub (dnet does not exist). ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char XOpenDisplay (); int main () { XOpenDisplay (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet" >&5 echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6 if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldnet $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char dnet_ntoa (); int main () { dnet_ntoa (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_dnet_dnet_ntoa=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dnet_dnet_ntoa=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_dnet_ntoa" >&5 echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6 if test $ac_cv_lib_dnet_dnet_ntoa = yes; then X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet" fi if test $ac_cv_lib_dnet_dnet_ntoa = no; then echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet_stub" >&5 echo $ECHO_N "checking for dnet_ntoa in -ldnet_stub... $ECHO_C" >&6 if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldnet_stub $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char dnet_ntoa (); int main () { dnet_ntoa (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_dnet_stub_dnet_ntoa=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dnet_stub_dnet_ntoa=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5 echo "${ECHO_T}$ac_cv_lib_dnet_stub_dnet_ntoa" >&6 if test $ac_cv_lib_dnet_stub_dnet_ntoa = yes; then X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub" fi fi fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS="$ac_xsave_LIBS" # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT, # to get the SysV transport functions. # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4) # needs -lnsl. # The nsl library prevents programs from opening the X display # on Irix 5.2, according to T.E. Dickey. # The functions gethostbyname, getservbyname, and inet_addr are # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking. echo "$as_me:$LINENO: checking for gethostbyname" >&5 echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6 if test "${ac_cv_func_gethostbyname+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define gethostbyname to an innocuous variant, in case declares gethostbyname. For example, HP-UX 11i declares gettimeofday. */ #define gethostbyname innocuous_gethostbyname /* System header to define __stub macros and hopefully few prototypes, which can conflict with char gethostbyname (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef gethostbyname /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char gethostbyname (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname) choke me #else char (*f) () = gethostbyname; #endif #ifdef __cplusplus } #endif int main () { return f != gethostbyname; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_gethostbyname=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_gethostbyname=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname" >&5 echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6 if test $ac_cv_func_gethostbyname = no; then echo "$as_me:$LINENO: checking for gethostbyname in -lnsl" >&5 echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6 if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lnsl $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char gethostbyname (); int main () { gethostbyname (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_nsl_gethostbyname=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_nsl_gethostbyname=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostbyname" >&5 echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6 if test $ac_cv_lib_nsl_gethostbyname = yes; then X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl" fi if test $ac_cv_lib_nsl_gethostbyname = no; then echo "$as_me:$LINENO: checking for gethostbyname in -lbsd" >&5 echo $ECHO_N "checking for gethostbyname in -lbsd... $ECHO_C" >&6 if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lbsd $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char gethostbyname (); int main () { gethostbyname (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_bsd_gethostbyname=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_bsd_gethostbyname=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_gethostbyname" >&5 echo "${ECHO_T}$ac_cv_lib_bsd_gethostbyname" >&6 if test $ac_cv_lib_bsd_gethostbyname = yes; then X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd" fi fi fi # lieder@skyler.mavd.honeywell.com says without -lsocket, # socket/setsockopt and other routines are undefined under SCO ODT # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary # on later versions), says Simon Leinen: it contains gethostby* # variants that don't use the name server (or something). -lsocket # must be given before -lnsl if both are needed. We assume that # if connect needs -lnsl, so does gethostbyname. echo "$as_me:$LINENO: checking for connect" >&5 echo $ECHO_N "checking for connect... $ECHO_C" >&6 if test "${ac_cv_func_connect+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define connect to an innocuous variant, in case declares connect. For example, HP-UX 11i declares gettimeofday. */ #define connect innocuous_connect /* System header to define __stub macros and hopefully few prototypes, which can conflict with char connect (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef connect /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char connect (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_connect) || defined (__stub___connect) choke me #else char (*f) () = connect; #endif #ifdef __cplusplus } #endif int main () { return f != connect; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_connect=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_connect=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_func_connect" >&5 echo "${ECHO_T}$ac_cv_func_connect" >&6 if test $ac_cv_func_connect = no; then echo "$as_me:$LINENO: checking for connect in -lsocket" >&5 echo $ECHO_N "checking for connect in -lsocket... $ECHO_C" >&6 if test "${ac_cv_lib_socket_connect+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsocket $X_EXTRA_LIBS $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char connect (); int main () { connect (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_socket_connect=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_socket_connect=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_socket_connect" >&5 echo "${ECHO_T}$ac_cv_lib_socket_connect" >&6 if test $ac_cv_lib_socket_connect = yes; then X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS" fi fi # Guillermo Gomez says -lposix is necessary on A/UX. echo "$as_me:$LINENO: checking for remove" >&5 echo $ECHO_N "checking for remove... $ECHO_C" >&6 if test "${ac_cv_func_remove+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define remove to an innocuous variant, in case declares remove. For example, HP-UX 11i declares gettimeofday. */ #define remove innocuous_remove /* System header to define __stub macros and hopefully few prototypes, which can conflict with char remove (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef remove /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char remove (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_remove) || defined (__stub___remove) choke me #else char (*f) () = remove; #endif #ifdef __cplusplus } #endif int main () { return f != remove; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_remove=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_remove=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_func_remove" >&5 echo "${ECHO_T}$ac_cv_func_remove" >&6 if test $ac_cv_func_remove = no; then echo "$as_me:$LINENO: checking for remove in -lposix" >&5 echo $ECHO_N "checking for remove in -lposix... $ECHO_C" >&6 if test "${ac_cv_lib_posix_remove+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lposix $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char remove (); int main () { remove (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_posix_remove=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_posix_remove=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_posix_remove" >&5 echo "${ECHO_T}$ac_cv_lib_posix_remove" >&6 if test $ac_cv_lib_posix_remove = yes; then X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix" fi fi # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay. echo "$as_me:$LINENO: checking for shmat" >&5 echo $ECHO_N "checking for shmat... $ECHO_C" >&6 if test "${ac_cv_func_shmat+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define shmat to an innocuous variant, in case declares shmat. For example, HP-UX 11i declares gettimeofday. */ #define shmat innocuous_shmat /* System header to define __stub macros and hopefully few prototypes, which can conflict with char shmat (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef shmat /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char shmat (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_shmat) || defined (__stub___shmat) choke me #else char (*f) () = shmat; #endif #ifdef __cplusplus } #endif int main () { return f != shmat; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_shmat=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_shmat=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_func_shmat" >&5 echo "${ECHO_T}$ac_cv_func_shmat" >&6 if test $ac_cv_func_shmat = no; then echo "$as_me:$LINENO: checking for shmat in -lipc" >&5 echo $ECHO_N "checking for shmat in -lipc... $ECHO_C" >&6 if test "${ac_cv_lib_ipc_shmat+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lipc $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char shmat (); int main () { shmat (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_ipc_shmat=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_ipc_shmat=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_ipc_shmat" >&5 echo "${ECHO_T}$ac_cv_lib_ipc_shmat" >&6 if test $ac_cv_lib_ipc_shmat = yes; then X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc" fi fi fi # Check for libraries that X11R6 Xt/Xaw programs need. ac_save_LDFLAGS=$LDFLAGS test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries" # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to # check for ICE first), but we must link in the order -lSM -lICE or # we get undefined symbols. So assume we have SM if we have ICE. # These have to be linked with before -lX11, unlike the other # libraries we check for below, so use a different variable. # John Interrante, Karl Berry echo "$as_me:$LINENO: checking for IceConnectionNumber in -lICE" >&5 echo $ECHO_N "checking for IceConnectionNumber in -lICE... $ECHO_C" >&6 if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lICE $X_EXTRA_LIBS $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char IceConnectionNumber (); int main () { IceConnectionNumber (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_ICE_IceConnectionNumber=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_ICE_IceConnectionNumber=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5 echo "${ECHO_T}$ac_cv_lib_ICE_IceConnectionNumber" >&6 if test $ac_cv_lib_ICE_IceConnectionNumber = yes; then X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE" fi LDFLAGS=$ac_save_LDFLAGS fi if test "x$X_CFLAGS" = "x-DX_DISPLAY_MISSING"; then { { echo "$as_me:$LINENO: error: *** Cannot find X11. See \`config.log' for more details." >&5 echo "$as_me: error: *** Cannot find X11. See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi HAVE_DPMS=no # Check whether --with-dpms-ext or --without-dpms-ext was given. if test "${with_dpms_ext+set}" = set; then withval="$with_dpms_ext" with_dpms="$withval" else with_dpms=yes fi; if test "x$with_dpms" = "xyes"; then SAVE_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $X_CFLAGS" echo "$as_me:$LINENO: checking for X11/extensions/dpms.h" >&5 echo $ECHO_N "checking for X11/extensions/dpms.h... $ECHO_C" >&6 if test "${ac_cv_header_X11_extensions_dpms_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_header_X11_extensions_dpms_h=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_header_X11_extensions_dpms_h=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_dpms_h" >&5 echo "${ECHO_T}$ac_cv_header_X11_extensions_dpms_h" >&6 if test $ac_cv_header_X11_extensions_dpms_h = yes; then HAVE_DPMS=yes fi CPPFLAGS="$SAVE_CPPFLAGS" if test "x$HAVE_DPMS" = "xyes"; then # first look in -lXext (this is where it is in XFree86 4.0) SAVE_CPPFLAGS="$CPPFLAGS" SAVE_LDFLAGS="$LDFLAGS" CPPFLAGS="$CPPFLAGS $X_CFLAGS" LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS" echo "$as_me:$LINENO: checking for DPMSInfo in -lXext" >&5 echo $ECHO_N "checking for DPMSInfo in -lXext... $ECHO_C" >&6 if test "${ac_cv_lib_Xext_DPMSInfo+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lXext $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char DPMSInfo (); int main () { DPMSInfo (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_Xext_DPMSInfo=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_Xext_DPMSInfo=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_Xext_DPMSInfo" >&5 echo "${ECHO_T}$ac_cv_lib_Xext_DPMSInfo" >&6 if test $ac_cv_lib_Xext_DPMSInfo = yes; then X_XDPMS_LIBS="-lXext" else HAVE_DPMS=no fi CPPFLAGS="$SAVE_CPPFLAGS" LDFLAGS="$SAVE_LDFLAGS" # if that failed, look in -lXdpms (this is where it was in XFree86 3.x) if test "x$HAVE_DPMS" = "xno"; then SAVE_CPPFLAGS="$CPPFLAGS" SAVE_LDFLAGS="$LDFLAGS" CPPFLAGS="$CPPFLAGS $X_CFLAGS" LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS" echo "$as_me:$LINENO: checking for DPMSInfo in -lXdpms" >&5 echo $ECHO_N "checking for DPMSInfo in -lXdpms... $ECHO_C" >&6 if test "${ac_cv_lib_Xdpms_DPMSInfo+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lXdpms -lXext $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char DPMSInfo (); int main () { DPMSInfo (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_Xdpms_DPMSInfo=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_Xdpms_DPMSInfo=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_Xdpms_DPMSInfo" >&5 echo "${ECHO_T}$ac_cv_lib_Xdpms_DPMSInfo" >&6 if test $ac_cv_lib_Xdpms_DPMSInfo = yes; then HAVE_DPMS=yes; X_DPMS_LIBS="-lXdpms" else true fi CPPFLAGS="$SAVE_CPPFLAGS" LDFLAGS="$SAVE_LDFLAGS" fi fi if test "x$HAVE_DPMS" = "xyes"; then cat >>confdefs.h <<\_ACEOF #define HAVE_DPMS_EXTENSION 1 _ACEOF fi fi HAVE_DGA=no # Check whether --with-xf86dga-ext or --without-xf86dga-ext was given. if test "${with_xf86dga_ext+set}" = set; then withval="$with_xf86dga_ext" with_dga="$withval" else with_dga=yes fi; if test "x$with_dga" = "xyes"; then SAVE_CPPFLAGS="$CPPFLAGS" SAVE_LDFLAGS="$LDFLAGS" CPPFLAGS="$CPPFLAGS $X_CFLAGS" LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS" echo "$as_me:$LINENO: checking for X11/extensions/xf86dga.h" >&5 echo $ECHO_N "checking for X11/extensions/xf86dga.h... $ECHO_C" >&6 if test "${ac_cv_header_X11_extensions_xf86dga_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_header_X11_extensions_xf86dga_h=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_header_X11_extensions_xf86dga_h=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_xf86dga_h" >&5 echo "${ECHO_T}$ac_cv_header_X11_extensions_xf86dga_h" >&6 if test $ac_cv_header_X11_extensions_xf86dga_h = yes; then echo "$as_me:$LINENO: checking for XF86DGAQueryExtension in -lXxf86dga" >&5 echo $ECHO_N "checking for XF86DGAQueryExtension in -lXxf86dga... $ECHO_C" >&6 if test "${ac_cv_lib_Xxf86dga_XF86DGAQueryExtension+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lXxf86dga -lXext $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char XF86DGAQueryExtension (); int main () { XF86DGAQueryExtension (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_Xxf86dga_XF86DGAQueryExtension=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_Xxf86dga_XF86DGAQueryExtension=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_Xxf86dga_XF86DGAQueryExtension" >&5 echo "${ECHO_T}$ac_cv_lib_Xxf86dga_XF86DGAQueryExtension" >&6 if test $ac_cv_lib_Xxf86dga_XF86DGAQueryExtension = yes; then HAVE_DGA=yes cat >>confdefs.h <<\_ACEOF #define HAVE_DGA_EXTENSION 1 _ACEOF X_XF86DGA_LIBS="-lXxf86dga" fi fi CPPFLAGS="$SAVE_CPPFLAGS" LDFLAGS="$SAVE_LDFLAGS" fi HAVE_VIDMODE=no # Check whether --with-xf86vmode-ext or --without-xf86vmode-ext was given. if test "${with_xf86vmode_ext+set}" = set; then withval="$with_xf86vmode_ext" with_vidmode="$withval" else with_vidmode=yes fi; if test "x$with_vidmode" = "xyes"; then SAVE_CPPFLAGS="$CPPFLAGS" SAVE_LDFLAGS="$LDFLAGS" CPPFLAGS="$CPPFLAGS $X_CFLAGS" LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS" echo "$as_me:$LINENO: checking for X11/extensions/xf86vmode.h" >&5 echo $ECHO_N "checking for X11/extensions/xf86vmode.h... $ECHO_C" >&6 if test "${ac_cv_header_X11_extensions_xf86vmode_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_header_X11_extensions_xf86vmode_h=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_header_X11_extensions_xf86vmode_h=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_xf86vmode_h" >&5 echo "${ECHO_T}$ac_cv_header_X11_extensions_xf86vmode_h" >&6 if test $ac_cv_header_X11_extensions_xf86vmode_h = yes; then echo "$as_me:$LINENO: checking for XF86VidModeGetViewPort in -lXxf86vm" >&5 echo $ECHO_N "checking for XF86VidModeGetViewPort in -lXxf86vm... $ECHO_C" >&6 if test "${ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lXxf86vm -lXext $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char XF86VidModeGetViewPort (); int main () { XF86VidModeGetViewPort (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort" >&5 echo "${ECHO_T}$ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort" >&6 if test $ac_cv_lib_Xxf86vm_XF86VidModeGetViewPort = yes; then HAVE_VIDMODE=yes cat >>confdefs.h <<\_ACEOF #define HAVE_VIDMODE_EXTENSION 1 _ACEOF X_XF86VMODE_LIBS="-lXxf86vm" fi fi CPPFLAGS="$SAVE_CPPFLAGS" LDFLAGS="$SAVE_LDFLAGS" fi HAVE_XV=no # Check whether --with-xv-ext or --without-xv-ext was given. if test "${with_xv_ext+set}" = set; then withval="$with_xv_ext" with_xv="$withval" else with_xv=yes fi; if test "x$with_xv" = "xyes"; then SAVE_CPPFLAGS="$CPPFLAGS" SAVE_LDFLAGS="$LDFLAGS" CPPFLAGS="$CPPFLAGS $X_CFLAGS" LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS" echo "$as_me:$LINENO: checking for X11/extensions/Xv.h" >&5 echo $ECHO_N "checking for X11/extensions/Xv.h... $ECHO_C" >&6 if test "${ac_cv_header_X11_extensions_Xv_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_header_X11_extensions_Xv_h=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_header_X11_extensions_Xv_h=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_Xv_h" >&5 echo "${ECHO_T}$ac_cv_header_X11_extensions_Xv_h" >&6 if test $ac_cv_header_X11_extensions_Xv_h = yes; then echo "$as_me:$LINENO: checking for XvShmPutImage in -lXv" >&5 echo $ECHO_N "checking for XvShmPutImage in -lXv... $ECHO_C" >&6 if test "${ac_cv_lib_Xv_XvShmPutImage+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lXv -lXext $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char XvShmPutImage (); int main () { XvShmPutImage (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_Xv_XvShmPutImage=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_Xv_XvShmPutImage=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_Xv_XvShmPutImage" >&5 echo "${ECHO_T}$ac_cv_lib_Xv_XvShmPutImage" >&6 if test $ac_cv_lib_Xv_XvShmPutImage = yes; then HAVE_XV=yes cat >>confdefs.h <<\_ACEOF #define HAVE_XV_EXTENSION 1 _ACEOF X_XV_LIBS="-lXv" VIDEO_SUPPORT="${VIDEO_SUPPORT}XVideo " fi fi CPPFLAGS="$SAVE_CPPFLAGS" LDFLAGS="$SAVE_LDFLAGS" fi HAVE_XINERAMA=no # Check whether --with-xinerama-ext or --without-xinerama-ext was given. if test "${with_xinerama_ext+set}" = set; then withval="$with_xinerama_ext" with_xinerama="$withval" else with_xinerama=yes fi; if test "x$with_xinerama" = "xyes"; then # XFree86 implementation SAVE_CPPFLAGS="$CPPFLAGS" SAVE_LDFLAGS="$LDFLAGS" CPPFLAGS="$CPPFLAGS $X_CFLAGS" LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS" echo "$as_me:$LINENO: checking for X11/extensions/Xinerama.h" >&5 echo $ECHO_N "checking for X11/extensions/Xinerama.h... $ECHO_C" >&6 if test "${ac_cv_header_X11_extensions_Xinerama_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_header_X11_extensions_Xinerama_h=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_header_X11_extensions_Xinerama_h=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_Xinerama_h" >&5 echo "${ECHO_T}$ac_cv_header_X11_extensions_Xinerama_h" >&6 if test $ac_cv_header_X11_extensions_Xinerama_h = yes; then echo "$as_me:$LINENO: checking for XineramaQueryExtension in -lXinerama" >&5 echo $ECHO_N "checking for XineramaQueryExtension in -lXinerama... $ECHO_C" >&6 if test "${ac_cv_lib_Xinerama_XineramaQueryExtension+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lXinerama -lXext $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char XineramaQueryExtension (); int main () { XineramaQueryExtension (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_Xinerama_XineramaQueryExtension=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_Xinerama_XineramaQueryExtension=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_Xinerama_XineramaQueryExtension" >&5 echo "${ECHO_T}$ac_cv_lib_Xinerama_XineramaQueryExtension" >&6 if test $ac_cv_lib_Xinerama_XineramaQueryExtension = yes; then HAVE_XINERAMA="XFree86" cat >>confdefs.h <<\_ACEOF #define HAVE_XFREE86_XINERAMA_EXTENSION 1 _ACEOF X_XINERAMA_LIBS="-lXinerama" fi fi CPPFLAGS="$SAVE_CPPFLAGS" LDFLAGS="$SAVE_LDFLAGS" if test "x$HAVE_XINERAMA" = "xno"; then # Solaris implementation SAVE_CPPFLAGS="$CPPFLAGS" SAVE_LDFLAGS="$LDFLAGS" CPPFLAGS="$CPPFLAGS $X_CFLAGS" LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS" echo "$as_me:$LINENO: checking for X11/extensions/xinerama.h" >&5 echo $ECHO_N "checking for X11/extensions/xinerama.h... $ECHO_C" >&6 if test "${ac_cv_header_X11_extensions_xinerama_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_header_X11_extensions_xinerama_h=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_header_X11_extensions_xinerama_h=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_xinerama_h" >&5 echo "${ECHO_T}$ac_cv_header_X11_extensions_xinerama_h" >&6 if test $ac_cv_header_X11_extensions_xinerama_h = yes; then echo "$as_me:$LINENO: checking for XineramaGetInfo in -lXext" >&5 echo $ECHO_N "checking for XineramaGetInfo in -lXext... $ECHO_C" >&6 if test "${ac_cv_lib_Xext_XineramaGetInfo+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lXext -lXext $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char XineramaGetInfo (); int main () { XineramaGetInfo (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_Xext_XineramaGetInfo=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_Xext_XineramaGetInfo=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_Xext_XineramaGetInfo" >&5 echo "${ECHO_T}$ac_cv_lib_Xext_XineramaGetInfo" >&6 if test $ac_cv_lib_Xext_XineramaGetInfo = yes; then HAVE_XINERAMA="Solaris" cat >>confdefs.h <<\_ACEOF #define HAVE_SOLARIS_XINERAMA_EXTENSION 1 _ACEOF X_XINERAMA_LIBS="" fi fi CPPFLAGS="$SAVE_CPPFLAGS" LDFLAGS="$SAVE_LDFLAGS" fi if test "x$HAVE_XINERAMA" != "xno"; then cat >>confdefs.h <<\_ACEOF #define HAVE_XINERAMA_EXTENSION 1 _ACEOF fi fi HAVE_XMU=no # Check whether --with-zapping-remote or --without-zapping-remote was given. if test "${with_zapping_remote+set}" = set; then withval="$with_zapping_remote" with_zapping_remote="$withval" else with_zapping_remote=yes fi; if test "x$with_zapping_remote" = "xyes"; then SAVE_CPPFLAGS="$CPPFLAGS" SAVE_LDFLAGS="$LDFLAGS" CPPFLAGS="$CPPFLAGS $X_CFLAGS" LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS" echo "$as_me:$LINENO: checking for X11/Xmu/WinUtil.h" >&5 echo $ECHO_N "checking for X11/Xmu/WinUtil.h... $ECHO_C" >&6 if test "${ac_cv_header_X11_Xmu_WinUtil_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_header_X11_Xmu_WinUtil_h=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_header_X11_Xmu_WinUtil_h=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_header_X11_Xmu_WinUtil_h" >&5 echo "${ECHO_T}$ac_cv_header_X11_Xmu_WinUtil_h" >&6 if test $ac_cv_header_X11_Xmu_WinUtil_h = yes; then echo "$as_me:$LINENO: checking for XmuClientWindow in -lXmu" >&5 echo $ECHO_N "checking for XmuClientWindow in -lXmu... $ECHO_C" >&6 if test "${ac_cv_lib_Xmu_XmuClientWindow+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lXmu -lXext $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char XmuClientWindow (); int main () { XmuClientWindow (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_Xmu_XmuClientWindow=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_Xmu_XmuClientWindow=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_Xmu_XmuClientWindow" >&5 echo "${ECHO_T}$ac_cv_lib_Xmu_XmuClientWindow" >&6 if test $ac_cv_lib_Xmu_XmuClientWindow = yes; then HAVE_XMU="yes" X_XMU_LIBS="-lXmu" else { { echo "$as_me:$LINENO: error: *** To build zapping_remote (a command line tool to send a Zapping *** process Python commands), we need libXmu which should be part of *** the X11 (Xorg or XFree86) devel package. To compile Zapping *** without zapping_remote run ./configure --without-zapping-remote See \`config.log' for more details." >&5 echo "$as_me: error: *** To build zapping_remote (a command line tool to send a Zapping *** process Python commands), we need libXmu which should be part of *** the X11 (Xorg or XFree86) devel package. To compile Zapping *** without zapping_remote run ./configure --without-zapping-remote See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi else { { echo "$as_me:$LINENO: error: *** To build zapping_remote (a command line tool to send a Zapping *** process Python commands), we need libXmu which should be part of *** the X11 (Xorg or XFree86) devel package. To compile Zapping *** without zapping_remote run ./configure --without-zapping-remote See \`config.log' for more details." >&5 echo "$as_me: error: *** To build zapping_remote (a command line tool to send a Zapping *** process Python commands), we need libXmu which should be part of *** the X11 (Xorg or XFree86) devel package. To compile Zapping *** without zapping_remote run ./configure --without-zapping-remote See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi CPPFLAGS="$SAVE_CPPFLAGS" LDFLAGS="$SAVE_LDFLAGS" fi if test "x$HAVE_XMU" = "xyes"; then HAVE_XMU_TRUE= HAVE_XMU_FALSE='#' else HAVE_XMU_TRUE='#' HAVE_XMU_FALSE= fi if test -z "" ; then default_compile_warnings=yes else default_compile_warnings="" fi # Check whether --enable-compile-warnings or --disable-compile-warnings was given. if test "${enable_compile_warnings+set}" = set; then enableval="$enable_compile_warnings" else enable_compile_warnings="$default_compile_warnings" fi; warnCFLAGS= if test "x$GCC" != xyes; then enable_compile_warnings=no fi warning_flags= realsave_CFLAGS="$CFLAGS" case "$enable_compile_warnings" in no) warning_flags= ;; minimum) warning_flags="-Wall" ;; yes) warning_flags="-Wall -Wmissing-prototypes" ;; maximum|error) warning_flags="-Wall -Wmissing-prototypes -Wnested-externs -Wpointer-arith" CFLAGS="$warning_flags $CFLAGS" for option in -Wno-sign-compare; do SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS $option" echo "$as_me:$LINENO: checking whether gcc understands $option" >&5 echo $ECHO_N "checking whether gcc understands $option... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then has_option=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 has_option=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS="$SAVE_CFLAGS" echo "$as_me:$LINENO: result: $has_option" >&5 echo "${ECHO_T}$has_option" >&6 if test $has_option = yes; then warning_flags="$warning_flags $option" fi unset has_option unset SAVE_CFLAGS done unset option if test "$enable_compile_warnings" = "error" ; then warning_flags="$warning_flags -Werror" fi ;; *) { { echo "$as_me:$LINENO: error: Unknown argument '$enable_compile_warnings' to --enable-compile-warnings" >&5 echo "$as_me: error: Unknown argument '$enable_compile_warnings' to --enable-compile-warnings" >&2;} { (exit 1); exit 1; }; } ;; esac CFLAGS="$realsave_CFLAGS" echo "$as_me:$LINENO: checking what warning flags to pass to the C compiler" >&5 echo $ECHO_N "checking what warning flags to pass to the C compiler... $ECHO_C" >&6 echo "$as_me:$LINENO: result: $warning_flags" >&5 echo "${ECHO_T}$warning_flags" >&6 # Check whether --enable-iso-c or --disable-iso-c was given. if test "${enable_iso_c+set}" = set; then enableval="$enable_iso_c" else enable_iso_c=no fi; echo "$as_me:$LINENO: checking what language compliance flags to pass to the C compiler" >&5 echo $ECHO_N "checking what language compliance flags to pass to the C compiler... $ECHO_C" >&6 complCFLAGS= if test "x$enable_iso_c" != "xno"; then if test "x$GCC" = "xyes"; then case " $CFLAGS " in *\ \ -ansi\ \ *) ;; *) complCFLAGS="$complCFLAGS -ansi" ;; esac case " $CFLAGS " in *\ \ -pedantic\ \ *) ;; *) complCFLAGS="$complCFLAGS -pedantic" ;; esac fi fi echo "$as_me:$LINENO: result: $complCFLAGS" >&5 echo "${ECHO_T}$complCFLAGS" >&6 WARN_CFLAGS="$warning_flags $complCFLAGS" if test "x$GCONF_SCHEMA_INSTALL_SOURCE" = "x"; then GCONF_SCHEMA_CONFIG_SOURCE=`gconftool-2 --get-default-source` else GCONF_SCHEMA_CONFIG_SOURCE=$GCONF_SCHEMA_INSTALL_SOURCE fi # Check whether --with-gconf-source or --without-gconf-source was given. if test "${with_gconf_source+set}" = set; then withval="$with_gconf_source" GCONF_SCHEMA_CONFIG_SOURCE="$withval" fi; echo "$as_me:$LINENO: result: Using config source $GCONF_SCHEMA_CONFIG_SOURCE for schema installation" >&5 echo "${ECHO_T}Using config source $GCONF_SCHEMA_CONFIG_SOURCE for schema installation" >&6 if test "x$GCONF_SCHEMA_FILE_DIR" = "x"; then GCONF_SCHEMA_FILE_DIR='$(sysconfdir)/gconf/schemas' fi # Check whether --with-gconf-schema-file-dir or --without-gconf-schema-file-dir was given. if test "${with_gconf_schema_file_dir+set}" = set; then withval="$with_gconf_schema_file_dir" GCONF_SCHEMA_FILE_DIR="$withval" fi; echo "$as_me:$LINENO: result: Using $GCONF_SCHEMA_FILE_DIR as install directory for schema files" >&5 echo "${ECHO_T}Using $GCONF_SCHEMA_FILE_DIR as install directory for schema files" >&6 # Check whether --enable-schemas-install or --disable-schemas-install was given. if test "${enable_schemas_install+set}" = set; then enableval="$enable_schemas_install" case "${enableval}" in yes) schemas_install=true ;; no) schemas_install=false ;; *) { { echo "$as_me:$LINENO: error: bad value ${enableval} for --enable-schemas-install" >&5 echo "$as_me: error: bad value ${enableval} for --enable-schemas-install" >&2;} { (exit 1); exit 1; }; } ;; esac else schemas_install=true fi; if test x$schemas_install = xtrue; then GCONF_SCHEMAS_INSTALL_TRUE= GCONF_SCHEMAS_INSTALL_FALSE='#' else GCONF_SCHEMAS_INSTALL_TRUE='#' GCONF_SCHEMAS_INSTALL_FALSE= fi if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done ;; esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG if test -n "$PKG_CONFIG"; then echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 echo "${ECHO_T}$PKG_CONFIG" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$ac_cv_path_PKG_CONFIG"; then ac_pt_PKG_CONFIG=$PKG_CONFIG # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $ac_pt_PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done ;; esac fi ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG if test -n "$ac_pt_PKG_CONFIG"; then echo "$as_me:$LINENO: result: $ac_pt_PKG_CONFIG" >&5 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi PKG_CONFIG=$ac_pt_PKG_CONFIG else PKG_CONFIG="$ac_cv_path_PKG_CONFIG" fi fi if test -n "$PKG_CONFIG"; then _pkg_min_version=0.9.0 echo "$as_me:$LINENO: checking pkg-config is at least version $_pkg_min_version" >&5 echo $ECHO_N "checking pkg-config is at least version $_pkg_min_version... $ECHO_C" >&6 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 PKG_CONFIG="" fi fi pkg_failed=no echo "$as_me:$LINENO: checking for PACKAGE" >&5 echo $ECHO_N "checking for PACKAGE... $ECHO_C" >&6 if test -n "$PKG_CONFIG"; then if test -n "$PACKAGE_CFLAGS"; then pkg_cv_PACKAGE_CFLAGS="$PACKAGE_CFLAGS" else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \" gtk+-2.0 >= 2.4 libgnomeui-2.0 libglade-2.0 gconf-2.0\"") >&5 ($PKG_CONFIG --exists --print-errors " gtk+-2.0 >= 2.4 libgnomeui-2.0 libglade-2.0 gconf-2.0") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then pkg_cv_PACKAGE_CFLAGS=`$PKG_CONFIG --cflags " gtk+-2.0 >= 2.4 libgnomeui-2.0 libglade-2.0 gconf-2.0" 2>/dev/null` else pkg_failed=yes fi fi else pkg_failed=untried fi if test -n "$PKG_CONFIG"; then if test -n "$PACKAGE_LIBS"; then pkg_cv_PACKAGE_LIBS="$PACKAGE_LIBS" else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \" gtk+-2.0 >= 2.4 libgnomeui-2.0 libglade-2.0 gconf-2.0\"") >&5 ($PKG_CONFIG --exists --print-errors " gtk+-2.0 >= 2.4 libgnomeui-2.0 libglade-2.0 gconf-2.0") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then pkg_cv_PACKAGE_LIBS=`$PKG_CONFIG --libs " gtk+-2.0 >= 2.4 libgnomeui-2.0 libglade-2.0 gconf-2.0" 2>/dev/null` else pkg_failed=yes fi fi else pkg_failed=untried fi if test $pkg_failed = yes; then if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then PACKAGE_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors " gtk+-2.0 >= 2.4 libgnomeui-2.0 libglade-2.0 gconf-2.0"` else PACKAGE_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors " gtk+-2.0 >= 2.4 libgnomeui-2.0 libglade-2.0 gconf-2.0"` fi # Put the nasty error message in config.log where it belongs echo "$PACKAGE_PKG_ERRORS" >&5 { { echo "$as_me:$LINENO: error: Package requirements ( gtk+-2.0 >= 2.4 libgnomeui-2.0 libglade-2.0 gconf-2.0) were not met: $PACKAGE_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables PACKAGE_CFLAGS and PACKAGE_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. " >&5 echo "$as_me: error: Package requirements ( gtk+-2.0 >= 2.4 libgnomeui-2.0 libglade-2.0 gconf-2.0) were not met: $PACKAGE_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables PACKAGE_CFLAGS and PACKAGE_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. " >&2;} { (exit 1); exit 1; }; } elif test $pkg_failed = untried; then { { echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. Alternatively, you may set the environment variables PACKAGE_CFLAGS and PACKAGE_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . See \`config.log' for more details." >&5 echo "$as_me: error: The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. Alternatively, you may set the environment variables PACKAGE_CFLAGS and PACKAGE_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } else PACKAGE_CFLAGS=$pkg_cv_PACKAGE_CFLAGS PACKAGE_LIBS=$pkg_cv_PACKAGE_LIBS echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 : fi # Extract the first word of "gdk-pixbuf-csource", so it can be a program name with args. set dummy gdk-pixbuf-csource; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_GDK_PIXBUF_CSOURCE+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $GDK_PIXBUF_CSOURCE in [\\/]* | ?:[\\/]*) ac_cv_path_GDK_PIXBUF_CSOURCE="$GDK_PIXBUF_CSOURCE" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_GDK_PIXBUF_CSOURCE="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done ;; esac fi GDK_PIXBUF_CSOURCE=$ac_cv_path_GDK_PIXBUF_CSOURCE if test -n "$GDK_PIXBUF_CSOURCE"; then echo "$as_me:$LINENO: result: $GDK_PIXBUF_CSOURCE" >&5 echo "${ECHO_T}$GDK_PIXBUF_CSOURCE" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -z "$GDK_PIXBUF_CSOURCE" && { { echo "$as_me:$LINENO: error: *** To create icons we need the gdk-pixbuf-csource tool *** which is part of GTK+ 2.0's gdk-pixbuf package. See \`config.log' for more details." >&5 echo "$as_me: error: *** To create icons we need the gdk-pixbuf-csource tool *** which is part of GTK+ 2.0's gdk-pixbuf package. See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } # Extract the first word of "glib-genmarshal", so it can be a program name with args. set dummy glib-genmarshal; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_GLIB_GENMARSHAL+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $GLIB_GENMARSHAL in [\\/]* | ?:[\\/]*) ac_cv_path_GLIB_GENMARSHAL="$GLIB_GENMARSHAL" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_GLIB_GENMARSHAL="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done ;; esac fi GLIB_GENMARSHAL=$ac_cv_path_GLIB_GENMARSHAL if test -n "$GLIB_GENMARSHAL"; then echo "$as_me:$LINENO: result: $GLIB_GENMARSHAL" >&5 echo "${ECHO_T}$GLIB_GENMARSHAL" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -z "$GLIB_GENMARSHAL" && { { echo "$as_me:$LINENO: error: *** To compile Zapping we need the glib-genmarshal tool *** which is part of GTK+ 2.0's glib package. See \`config.log' for more details." >&5 echo "$as_me: error: *** To compile Zapping we need the glib-genmarshal tool *** which is part of GTK+ 2.0's glib package. See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } HAVE_ZVBI="no" REQUIRED_ZVBI_VERSION=0.2.11 # Check whether --with-zvbi or --without-zvbi was given. if test "${with_zvbi+set}" = set; then withval="$with_zvbi" with_zvbi="$withval" else with_zvbi=yes fi; if test "x$with_zvbi" = "xyes"; then pkg_failed=no echo "$as_me:$LINENO: checking for ZVBI" >&5 echo $ECHO_N "checking for ZVBI... $ECHO_C" >&6 if test -n "$PKG_CONFIG"; then if test -n "$ZVBI_CFLAGS"; then pkg_cv_ZVBI_CFLAGS="$ZVBI_CFLAGS" else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"zvbi-0.2 >= \$REQUIRED_ZVBI_VERSION\"") >&5 ($PKG_CONFIG --exists --print-errors "zvbi-0.2 >= $REQUIRED_ZVBI_VERSION") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then pkg_cv_ZVBI_CFLAGS=`$PKG_CONFIG --cflags "zvbi-0.2 >= $REQUIRED_ZVBI_VERSION" 2>/dev/null` else pkg_failed=yes fi fi else pkg_failed=untried fi if test -n "$PKG_CONFIG"; then if test -n "$ZVBI_LIBS"; then pkg_cv_ZVBI_LIBS="$ZVBI_LIBS" else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"zvbi-0.2 >= \$REQUIRED_ZVBI_VERSION\"") >&5 ($PKG_CONFIG --exists --print-errors "zvbi-0.2 >= $REQUIRED_ZVBI_VERSION") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then pkg_cv_ZVBI_LIBS=`$PKG_CONFIG --libs "zvbi-0.2 >= $REQUIRED_ZVBI_VERSION" 2>/dev/null` else pkg_failed=yes fi fi else pkg_failed=untried fi if test $pkg_failed = yes; then if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then ZVBI_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "zvbi-0.2 >= $REQUIRED_ZVBI_VERSION"` else ZVBI_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "zvbi-0.2 >= $REQUIRED_ZVBI_VERSION"` fi # Put the nasty error message in config.log where it belongs echo "$ZVBI_PKG_ERRORS" >&5 echo -n "*** Could not find libzvbi >= $REQUIRED_ZVBI_VERSION. " echo "The library is required" echo "*** for Teletext, caption/subtitles and OSD. If you are sure" echo "*** libzvbi $REQUIRED_ZVBI_VERSION or later is installed, try" echo "*** ./configure PKG_CONFIG_PATH=/usr/local/lib/pkgconfig ..." echo "*** The latest version of libzvbi is available from" echo "*** http://zapping.sourceforge.net. To compile Zapping without" echo "*** libzvbi run ./configure --without-zvbi" exit 1 elif test $pkg_failed = untried; then echo -n "*** Could not find libzvbi >= $REQUIRED_ZVBI_VERSION. " echo "The library is required" echo "*** for Teletext, caption/subtitles and OSD. If you are sure" echo "*** libzvbi $REQUIRED_ZVBI_VERSION or later is installed, try" echo "*** ./configure PKG_CONFIG_PATH=/usr/local/lib/pkgconfig ..." echo "*** The latest version of libzvbi is available from" echo "*** http://zapping.sourceforge.net. To compile Zapping without" echo "*** libzvbi run ./configure --without-zvbi" exit 1 else ZVBI_CFLAGS=$pkg_cv_ZVBI_CFLAGS ZVBI_LIBS=$pkg_cv_ZVBI_LIBS echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 cat >>confdefs.h <<\_ACEOF #define HAVE_LIBZVBI 1 _ACEOF HAVE_ZVBI="yes" fi fi if test "x$HAVE_ZVBI" = "xyes"; then HAVE_LIBZVBI_TRUE= HAVE_LIBZVBI_FALSE='#' else HAVE_LIBZVBI_TRUE='#' HAVE_LIBZVBI_FALSE= fi test "x$HAVE_ZVBI" = "xyes" && \ PLUGINS_TO_BUILD="$PLUGINS_TO_BUILD teletext subtitle" echo "$as_me:$LINENO: checking whether we are using the GNU C Library 2.1 or newer" >&5 echo $ECHO_N "checking whether we are using the GNU C Library 2.1 or newer... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #ifdef __GNU_LIBRARY__ #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2) GNU 98765876 #endif #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "GNU 98765876" >/dev/null 2>&1; then echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 cat >>confdefs.h <<\_ACEOF #define HAVE_GLIBC21 1 _ACEOF else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 echo "$as_me:$LINENO: checking for unicode library" >&5 echo $ECHO_N "checking for unicode library... $ECHO_C" >&6 UNICODE_VERSION=`unicode-config --version` if test $? -eq 0; then cat >>confdefs.h <<\_ACEOF #define HAVE_LIBUNICODE 1 _ACEOF echo "$as_me:$LINENO: result: $UNICODE_VERSION" >&5 echo "${ECHO_T}$UNICODE_VERSION" >&6 UNICODE_CFLAGS=`unicode-config --cflags` UNICODE_LIBS=`unicode-config --libs` else echo "$as_me:$LINENO: result: not present - Teletext search disabled" >&5 echo "${ECHO_T}not present - Teletext search disabled" >&6 fi fi rm -f conftest* HAVE_JPEG="yes" JPEG_LIB="" echo "$as_me:$LINENO: checking for jpeg_destroy_compress in -ljpeg" >&5 echo $ECHO_N "checking for jpeg_destroy_compress in -ljpeg... $ECHO_C" >&6 if test "${ac_cv_lib_jpeg_jpeg_destroy_compress+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ljpeg $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char jpeg_destroy_compress (); int main () { jpeg_destroy_compress (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_jpeg_jpeg_destroy_compress=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_jpeg_jpeg_destroy_compress=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_jpeg_jpeg_destroy_compress" >&5 echo "${ECHO_T}$ac_cv_lib_jpeg_jpeg_destroy_compress" >&6 if test $ac_cv_lib_jpeg_jpeg_destroy_compress = yes; then JPEG_LIB="-ljpeg" else HAVE_JPEG="no" fi if test "x$HAVE_JPEG" = "xyes"; then cat >>confdefs.h <<\_ACEOF #define HAVE_LIBJPEG 1 _ACEOF fi HAVE_PNG="yes" PNG_LIBS="" echo "$as_me:$LINENO: checking for png_destroy_write_struct in -lpng" >&5 echo $ECHO_N "checking for png_destroy_write_struct in -lpng... $ECHO_C" >&6 if test "${ac_cv_lib_png_png_destroy_write_struct+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lpng -lz -lm $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char png_destroy_write_struct (); int main () { png_destroy_write_struct (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_png_png_destroy_write_struct=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_png_png_destroy_write_struct=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_png_png_destroy_write_struct" >&5 echo "${ECHO_T}$ac_cv_lib_png_png_destroy_write_struct" >&6 if test $ac_cv_lib_png_png_destroy_write_struct = yes; then PNG_LIBS="-lpng -lz -lm" else HAVE_PNG="no" fi if test "x$HAVE_PNG" = "xyes"; then cat >>confdefs.h <<\_ACEOF #define HAVE_LIBPNG 1 _ACEOF fi SAVE_LIBS=$LIBS HAVE_RTE="yes" echo "$as_me:$LINENO: checking for rte_parameters_set in -lrte" >&5 echo $ECHO_N "checking for rte_parameters_set in -lrte... $ECHO_C" >&6 if test "${ac_cv_lib_rte_rte_parameters_set+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lrte $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char rte_parameters_set (); int main () { rte_parameters_set (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_rte_rte_parameters_set=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_rte_rte_parameters_set=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_rte_rte_parameters_set" >&5 echo "${ECHO_T}$ac_cv_lib_rte_rte_parameters_set" >&6 if test $ac_cv_lib_rte_rte_parameters_set = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBRTE 1 _ACEOF LIBS="-lrte $LIBS" else HAVE_RTE="no" fi cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "rte_parameters_set" >/dev/null 2>&1; then : else HAVE_RTE="no" fi rm -f conftest* if test "x$HAVE_RTE" != "xno"; then PLUGINS_TO_BUILD="$PLUGINS_TO_BUILD record" cat >>confdefs.h <<\_ACEOF #define HAVE_LIBRTE 1 _ACEOF RTE_LIBS="-lrte" fi LIBS="$SAVE_LIBS" if test "x$enable_bktr" = "xyes"; then HAVE_LIRC="not available" else HAVE_LIRC="yes" echo "$as_me:$LINENO: checking for lirc_init in -llirc_client" >&5 echo $ECHO_N "checking for lirc_init in -llirc_client... $ECHO_C" >&6 if test "${ac_cv_lib_lirc_client_lirc_init+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-llirc_client $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char lirc_init (); int main () { lirc_init (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_lirc_client_lirc_init=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_lirc_client_lirc_init=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_lirc_client_lirc_init" >&5 echo "${ECHO_T}$ac_cv_lib_lirc_client_lirc_init" >&6 if test $ac_cv_lib_lirc_client_lirc_init = yes; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "lirc_init" >/dev/null 2>&1; then true else HAVE_LIRC=no fi rm -f conftest* else HAVE_LIRC=no fi if test "x$HAVE_LIRC" = "xyes"; then PLUGINS_TO_BUILD="$PLUGINS_TO_BUILD alirc" cat >>confdefs.h <<\_ACEOF #define HAVE_LIRC 1 _ACEOF LIRC_LIB="-llirc_client" fi fi python_val="" python_prog="python" # Extract the first word of ""$python_prog"", so it can be a program name with args. set dummy "$python_prog"; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_python_val+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$python_val"; then ac_cv_prog_python_val="$python_val" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_python_val="true" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done test -z "$ac_cv_prog_python_val" && ac_cv_prog_python_val="false" fi fi python_val=$ac_cv_prog_python_val if test -n "$python_val"; then echo "$as_me:$LINENO: result: $python_val" >&5 echo "${ECHO_T}$python_val" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi if test ! $python_val; then { { echo "$as_me:$LINENO: error: Cannot find the python executable" >&5 echo "$as_me: error: Cannot find the python executable" >&2;} { (exit 1); exit 1; }; } fi PY_PREFIX=`$python_prog -c 'import sys ; print sys.prefix'` PY_EXEC_PREFIX=`$python_prog -c 'import sys ; print sys.exec_prefix'` PY_VERSION=`$python_prog -c 'import sys ; print sys.version[0:3]'` if test ! -f $PY_PREFIX/include/python$PY_VERSION/Python.h; then { { echo "$as_me:$LINENO: error: Python.h not found in its standard location" >&5 echo "$as_me: error: Python.h not found in its standard location" >&2;} { (exit 1); exit 1; }; } fi PY_LIBS="python$PY_VERSION" PY_LIB_LOC="-L$PY_EXEC_PREFIX/lib/python$PY_VERSION/config" PY_CFLAGS="-I$PY_PREFIX/include/python$PY_VERSION" PY_MAKEFILE="$PY_EXEC_PREFIX/lib/python$PY_VERSION/config/Makefile" PY_LOCALMODLIBS=`sed -n -e 's/^LOCALMODLIBS=\(.*\)/\1/p' $PY_MAKEFILE` PY_BASEMODLIBS=`sed -n -e 's/^BASEMODLIBS=\(.*\)/\1/p' $PY_MAKEFILE` PY_OTHER_LIBS=`sed -n -e 's/^LIBS=\(.*\)/\1/p' $PY_MAKEFILE` PY_EXTRA_LIBS="$PY_LOCALMODLIBS $PY_BASEMODLIBS $PY_OTHER_LIBS" PYTHON_LIBS="$PY_LIB_LOC -l$PY_LIBS $PY_EXTRA_LIBS" echo "$as_me:$LINENO: checking for libxml2" >&5 echo $ECHO_N "checking for libxml2... $ECHO_C" >&6 HAVE_LIBXML="no" LIBXML_VERSION=`xml2-config --version` if test $? -eq 0; then LIBXML_CFLAGS=`xml2-config --cflags` LIBXML_LIBS=`xml2-config --libs` XML_LIB="xml2" SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS $LIBXML_CFLAGS $LIBXML_LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then HAVE_LIBXML="yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext CFLAGS="$SAVE_CFLAGS" fi echo "$as_me:$LINENO: result: $LIBXML_VERSION" >&5 echo "${ECHO_T}$LIBXML_VERSION" >&6 if test "x$HAVE_LIBXML" = "xno"; then { { echo "$as_me:$LINENO: error: *** This version of Zapping requires libxml2. See \`config.log' for more details." >&5 echo "$as_me: error: *** This version of Zapping requires libxml2. See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi GETTEXT_PACKAGE=zapping cat >>confdefs.h <<_ACEOF #define GETTEXT_PACKAGE "$GETTEXT_PACKAGE" _ACEOF ALL_LINGUAS="cs de es fr it ja nl" for ac_header in locale.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if eval "test \"\${$as_ac_Header+set}\" = set"; then echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## ------------------------------------------------------------------------------------ ## ## Report this to http://sourceforge.net/tracker/?atid=102599&group_id=2599&func=browse ## ## ------------------------------------------------------------------------------------ ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done if test $ac_cv_header_locale_h = yes; then echo "$as_me:$LINENO: checking for LC_MESSAGES" >&5 echo $ECHO_N "checking for LC_MESSAGES... $ECHO_C" >&6 if test "${am_cv_val_LC_MESSAGES+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { return LC_MESSAGES ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then am_cv_val_LC_MESSAGES=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 am_cv_val_LC_MESSAGES=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $am_cv_val_LC_MESSAGES" >&5 echo "${ECHO_T}$am_cv_val_LC_MESSAGES" >&6 if test $am_cv_val_LC_MESSAGES = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_LC_MESSAGES 1 _ACEOF fi fi USE_NLS=yes gt_cv_have_gettext=no CATOBJEXT=NONE XGETTEXT=: INTLLIBS= if test "${ac_cv_header_libintl_h+set}" = set; then echo "$as_me:$LINENO: checking for libintl.h" >&5 echo $ECHO_N "checking for libintl.h... $ECHO_C" >&6 if test "${ac_cv_header_libintl_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi echo "$as_me:$LINENO: result: $ac_cv_header_libintl_h" >&5 echo "${ECHO_T}$ac_cv_header_libintl_h" >&6 else # Is the header compilable? echo "$as_me:$LINENO: checking libintl.h usability" >&5 echo $ECHO_N "checking libintl.h usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? echo "$as_me:$LINENO: checking libintl.h presence" >&5 echo $ECHO_N "checking libintl.h presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: libintl.h: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: libintl.h: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: libintl.h: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: libintl.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: libintl.h: present but cannot be compiled" >&5 echo "$as_me: WARNING: libintl.h: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: libintl.h: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: libintl.h: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: libintl.h: see the Autoconf documentation" >&5 echo "$as_me: WARNING: libintl.h: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: libintl.h: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: libintl.h: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: libintl.h: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: libintl.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: libintl.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: libintl.h: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## ------------------------------------------------------------------------------------ ## ## Report this to http://sourceforge.net/tracker/?atid=102599&group_id=2599&func=browse ## ## ------------------------------------------------------------------------------------ ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac echo "$as_me:$LINENO: checking for libintl.h" >&5 echo $ECHO_N "checking for libintl.h... $ECHO_C" >&6 if test "${ac_cv_header_libintl_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_libintl_h=$ac_header_preproc fi echo "$as_me:$LINENO: result: $ac_cv_header_libintl_h" >&5 echo "${ECHO_T}$ac_cv_header_libintl_h" >&6 fi if test $ac_cv_header_libintl_h = yes; then gt_cv_func_dgettext_libintl="no" libintl_extra_libs="" # # First check in libc # echo "$as_me:$LINENO: checking for ngettext in libc" >&5 echo $ECHO_N "checking for ngettext in libc... $ECHO_C" >&6 if test "${gt_cv_func_ngettext_libc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { return !ngettext ("","", 1) ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then gt_cv_func_ngettext_libc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 gt_cv_func_ngettext_libc=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $gt_cv_func_ngettext_libc" >&5 echo "${ECHO_T}$gt_cv_func_ngettext_libc" >&6 if test "$gt_cv_func_ngettext_libc" = "yes" ; then echo "$as_me:$LINENO: checking for dgettext in libc" >&5 echo $ECHO_N "checking for dgettext in libc... $ECHO_C" >&6 if test "${gt_cv_func_dgettext_libc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { return !dgettext ("","") ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then gt_cv_func_dgettext_libc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 gt_cv_func_dgettext_libc=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $gt_cv_func_dgettext_libc" >&5 echo "${ECHO_T}$gt_cv_func_dgettext_libc" >&6 fi if test "$gt_cv_func_ngettext_libc" = "yes" ; then for ac_func in bind_textdomain_codeset do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else char (*f) () = $ac_func; #endif #ifdef __cplusplus } #endif int main () { return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done fi # # If we don't have everything we want, check in libintl # if test "$gt_cv_func_dgettext_libc" != "yes" \ || test "$gt_cv_func_ngettext_libc" != "yes" \ || test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then echo "$as_me:$LINENO: checking for bindtextdomain in -lintl" >&5 echo $ECHO_N "checking for bindtextdomain in -lintl... $ECHO_C" >&6 if test "${ac_cv_lib_intl_bindtextdomain+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lintl $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char bindtextdomain (); int main () { bindtextdomain (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_intl_bindtextdomain=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_intl_bindtextdomain=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_intl_bindtextdomain" >&5 echo "${ECHO_T}$ac_cv_lib_intl_bindtextdomain" >&6 if test $ac_cv_lib_intl_bindtextdomain = yes; then echo "$as_me:$LINENO: checking for ngettext in -lintl" >&5 echo $ECHO_N "checking for ngettext in -lintl... $ECHO_C" >&6 if test "${ac_cv_lib_intl_ngettext+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lintl $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char ngettext (); int main () { ngettext (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_intl_ngettext=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_intl_ngettext=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_intl_ngettext" >&5 echo "${ECHO_T}$ac_cv_lib_intl_ngettext" >&6 if test $ac_cv_lib_intl_ngettext = yes; then echo "$as_me:$LINENO: checking for dgettext in -lintl" >&5 echo $ECHO_N "checking for dgettext in -lintl... $ECHO_C" >&6 if test "${ac_cv_lib_intl_dgettext+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lintl $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char dgettext (); int main () { dgettext (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_intl_dgettext=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_intl_dgettext=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_intl_dgettext" >&5 echo "${ECHO_T}$ac_cv_lib_intl_dgettext" >&6 if test $ac_cv_lib_intl_dgettext = yes; then gt_cv_func_dgettext_libintl=yes fi fi fi if test "$gt_cv_func_dgettext_libintl" != "yes" ; then echo "$as_me:$LINENO: checking if -liconv is needed to use gettext" >&5 echo $ECHO_N "checking if -liconv is needed to use gettext... $ECHO_C" >&6 echo "$as_me:$LINENO: result: " >&5 echo "${ECHO_T}" >&6 echo "$as_me:$LINENO: checking for ngettext in -lintl" >&5 echo $ECHO_N "checking for ngettext in -lintl... $ECHO_C" >&6 if test "${ac_cv_lib_intl_ngettext+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lintl -liconv $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char ngettext (); int main () { ngettext (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_intl_ngettext=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_intl_ngettext=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_intl_ngettext" >&5 echo "${ECHO_T}$ac_cv_lib_intl_ngettext" >&6 if test $ac_cv_lib_intl_ngettext = yes; then echo "$as_me:$LINENO: checking for dcgettext in -lintl" >&5 echo $ECHO_N "checking for dcgettext in -lintl... $ECHO_C" >&6 if test "${ac_cv_lib_intl_dcgettext+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lintl -liconv $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char dcgettext (); int main () { dcgettext (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_intl_dcgettext=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_intl_dcgettext=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_intl_dcgettext" >&5 echo "${ECHO_T}$ac_cv_lib_intl_dcgettext" >&6 if test $ac_cv_lib_intl_dcgettext = yes; then gt_cv_func_dgettext_libintl=yes libintl_extra_libs=-liconv else : fi else : fi fi # # If we found libintl, then check in it for bind_textdomain_codeset(); # we'll prefer libc if neither have bind_textdomain_codeset(), # and both have dgettext and ngettext # if test "$gt_cv_func_dgettext_libintl" = "yes" ; then glib_save_LIBS="$LIBS" LIBS="$LIBS -lintl $libintl_extra_libs" unset ac_cv_func_bind_textdomain_codeset for ac_func in bind_textdomain_codeset do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else char (*f) () = $ac_func; #endif #ifdef __cplusplus } #endif int main () { return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done LIBS="$glib_save_LIBS" if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then gt_cv_func_dgettext_libc=no else if test "$gt_cv_func_dgettext_libc" = "yes" \ && test "$gt_cv_func_ngettext_libc" = "yes"; then gt_cv_func_dgettext_libintl=no fi fi fi fi if test "$gt_cv_func_dgettext_libc" = "yes" \ || test "$gt_cv_func_dgettext_libintl" = "yes"; then gt_cv_have_gettext=yes fi if test "$gt_cv_func_dgettext_libintl" = "yes"; then INTLLIBS="-lintl $libintl_extra_libs" fi if test "$gt_cv_have_gettext" = "yes"; then cat >>confdefs.h <<\_ACEOF #define HAVE_GETTEXT 1 _ACEOF # Extract the first word of "msgfmt", so it can be a program name with args. set dummy msgfmt; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_MSGFMT+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case "$MSGFMT" in /*) ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path. ;; *) IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" for ac_dir in $PATH; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then ac_cv_path_MSGFMT="$ac_dir/$ac_word" break fi fi done IFS="$ac_save_ifs" test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no" ;; esac fi MSGFMT="$ac_cv_path_MSGFMT" if test "$MSGFMT" != "no"; then echo "$as_me:$LINENO: result: $MSGFMT" >&5 echo "${ECHO_T}$MSGFMT" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi if test "$MSGFMT" != "no"; then glib_save_LIBS="$LIBS" LIBS="$LIBS $INTLLIBS" for ac_func in dcgettext do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else char (*f) () = $ac_func; #endif #ifdef __cplusplus } #endif int main () { return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done # Extract the first word of "gmsgfmt", so it can be a program name with args. set dummy gmsgfmt; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_GMSGFMT+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $GMSGFMT in [\\/]* | ?:[\\/]*) ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT" ;; esac fi GMSGFMT=$ac_cv_path_GMSGFMT if test -n "$GMSGFMT"; then echo "$as_me:$LINENO: result: $GMSGFMT" >&5 echo "${ECHO_T}$GMSGFMT" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi # Extract the first word of "xgettext", so it can be a program name with args. set dummy xgettext; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_XGETTEXT+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case "$XGETTEXT" in /*) ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path. ;; *) IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" for ac_dir in $PATH; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then ac_cv_path_XGETTEXT="$ac_dir/$ac_word" break fi fi done IFS="$ac_save_ifs" test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":" ;; esac fi XGETTEXT="$ac_cv_path_XGETTEXT" if test "$XGETTEXT" != ":"; then echo "$as_me:$LINENO: result: $XGETTEXT" >&5 echo "${ECHO_T}$XGETTEXT" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { extern int _nl_msg_cat_cntr; return _nl_msg_cat_cntr ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then CATOBJEXT=.gmo DATADIRNAME=share else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 case $host in *-*-solaris*) echo "$as_me:$LINENO: checking for bind_textdomain_codeset" >&5 echo $ECHO_N "checking for bind_textdomain_codeset... $ECHO_C" >&6 if test "${ac_cv_func_bind_textdomain_codeset+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define bind_textdomain_codeset to an innocuous variant, in case declares bind_textdomain_codeset. For example, HP-UX 11i declares gettimeofday. */ #define bind_textdomain_codeset innocuous_bind_textdomain_codeset /* System header to define __stub macros and hopefully few prototypes, which can conflict with char bind_textdomain_codeset (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef bind_textdomain_codeset /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char bind_textdomain_codeset (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_bind_textdomain_codeset) || defined (__stub___bind_textdomain_codeset) choke me #else char (*f) () = bind_textdomain_codeset; #endif #ifdef __cplusplus } #endif int main () { return f != bind_textdomain_codeset; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_bind_textdomain_codeset=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_bind_textdomain_codeset=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_func_bind_textdomain_codeset" >&5 echo "${ECHO_T}$ac_cv_func_bind_textdomain_codeset" >&6 if test $ac_cv_func_bind_textdomain_codeset = yes; then CATOBJEXT=.gmo DATADIRNAME=share else CATOBJEXT=.mo DATADIRNAME=lib fi ;; *) CATOBJEXT=.mo DATADIRNAME=lib ;; esac fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS="$glib_save_LIBS" INSTOBJEXT=.mo else gt_cv_have_gettext=no fi fi fi if test "$gt_cv_have_gettext" = "yes" ; then cat >>confdefs.h <<\_ACEOF #define ENABLE_NLS 1 _ACEOF fi if test "$XGETTEXT" != ":"; then if $XGETTEXT --omit-header /dev/null 2> /dev/null; then : ; else echo "$as_me:$LINENO: result: found xgettext program is not GNU xgettext; ignore it" >&5 echo "${ECHO_T}found xgettext program is not GNU xgettext; ignore it" >&6 XGETTEXT=":" fi fi # We need to process the po/ directory. POSUB=po ac_config_commands="$ac_config_commands default-1" for lang in $ALL_LINGUAS; do GMOFILES="$GMOFILES $lang.gmo" POFILES="$POFILES $lang.po" done if test "$gt_cv_have_gettext" = "yes"; then if test "x$ALL_LINGUAS" = "x"; then LINGUAS= else echo "$as_me:$LINENO: checking for catalogs to be installed" >&5 echo $ECHO_N "checking for catalogs to be installed... $ECHO_C" >&6 NEW_LINGUAS= for presentlang in $ALL_LINGUAS; do useit=no if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then desiredlanguages="$LINGUAS" else desiredlanguages="$ALL_LINGUAS" fi for desiredlang in $desiredlanguages; do # Use the presentlang catalog if desiredlang is # a. equal to presentlang, or # b. a variant of presentlang (because in this case, # presentlang can be used as a fallback for messages # which are not translated in the desiredlang catalog). case "$desiredlang" in "$presentlang"*) useit=yes;; esac done if test $useit = yes; then NEW_LINGUAS="$NEW_LINGUAS $presentlang" fi done LINGUAS=$NEW_LINGUAS echo "$as_me:$LINENO: result: $LINGUAS" >&5 echo "${ECHO_T}$LINGUAS" >&6 fi if test -n "$LINGUAS"; then for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done fi fi MKINSTALLDIRS= if test -n "$ac_aux_dir"; then MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs" fi if test -z "$MKINSTALLDIRS"; then MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs" fi test -d po || mkdir po if test "x$srcdir" != "x."; then if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then posrcprefix="$srcdir/" else posrcprefix="../$srcdir/" fi else posrcprefix="../" fi rm -f po/POTFILES sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \ < $srcdir/po/POTFILES.in > po/POTFILES SCROLLKEEPER_BUILD_REQUIRED=0.3.5 # Extract the first word of "scrollkeeper-config", so it can be a program name with args. set dummy scrollkeeper-config; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_SCROLLKEEPER_CONFIG+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $SCROLLKEEPER_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_SCROLLKEEPER_CONFIG="$SCROLLKEEPER_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_SCROLLKEEPER_CONFIG="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done test -z "$ac_cv_path_SCROLLKEEPER_CONFIG" && ac_cv_path_SCROLLKEEPER_CONFIG="no" ;; esac fi SCROLLKEEPER_CONFIG=$ac_cv_path_SCROLLKEEPER_CONFIG if test -n "$SCROLLKEEPER_CONFIG"; then echo "$as_me:$LINENO: result: $SCROLLKEEPER_CONFIG" >&5 echo "${ECHO_T}$SCROLLKEEPER_CONFIG" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi if test "x$SCROLLKEEPER_CONFIG" = "xno"; then { { echo "$as_me:$LINENO: error: *** Couldn't find scrollkeeper-config. Scrollkeeper is required to *** install the Zapping documentation. Download the appropriate *** package for your distribution or get the source tarball from *** http://scrollkeeper.sourceforge.net See \`config.log' for more details." >&5 echo "$as_me: error: *** Couldn't find scrollkeeper-config. Scrollkeeper is required to *** install the Zapping documentation. Download the appropriate *** package for your distribution or get the source tarball from *** http://scrollkeeper.sourceforge.net See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi # Check whether --enable-rebuild-man or --disable-rebuild-man was given. if test "${enable_rebuild_man+set}" = set; then enableval="$enable_rebuild_man" else enableval=auto fi; BUILD_MAN=no if test "x$enableval" != "xno"; then # Extract the first word of "xsltproc", so it can be a program name with args. set dummy xsltproc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_XSLTPROC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $XSLTPROC in [\\/]* | ?:[\\/]*) ac_cv_path_XSLTPROC="$XSLTPROC" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_XSLTPROC="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done ;; esac fi XSLTPROC=$ac_cv_path_XSLTPROC if test -n "$XSLTPROC"; then echo "$as_me:$LINENO: result: $XSLTPROC" >&5 echo "${ECHO_T}$XSLTPROC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi if test ! -z "$XSLTPROC"; then # Check whether --with-xml-catalog or --without-xml-catalog was given. if test "${with_xml_catalog+set}" = set; then withval="$with_xml_catalog" else with_xml_catalog=/etc/xml/catalog fi; jh_found_xmlcatalog=true XML_CATALOG_FILE="$with_xml_catalog" echo "$as_me:$LINENO: checking for XML catalog ($XML_CATALOG_FILE)" >&5 echo $ECHO_N "checking for XML catalog ($XML_CATALOG_FILE)... $ECHO_C" >&6 if test -f "$XML_CATALOG_FILE"; then echo "$as_me:$LINENO: result: found" >&5 echo "${ECHO_T}found" >&6 else jh_found_xmlcatalog=false echo "$as_me:$LINENO: result: not found" >&5 echo "${ECHO_T}not found" >&6 fi # Extract the first word of "xmlcatalog", so it can be a program name with args. set dummy xmlcatalog; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_XMLCATALOG+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $XMLCATALOG in [\\/]* | ?:[\\/]*) ac_cv_path_XMLCATALOG="$XMLCATALOG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_XMLCATALOG="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done test -z "$ac_cv_path_XMLCATALOG" && ac_cv_path_XMLCATALOG="no" ;; esac fi XMLCATALOG=$ac_cv_path_XMLCATALOG if test -n "$XMLCATALOG"; then echo "$as_me:$LINENO: result: $XMLCATALOG" >&5 echo "${ECHO_T}$XMLCATALOG" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi if test "x$XMLCATALOG" = xno; then jh_found_xmlcatalog=false fi if $jh_found_xmlcatalog; then : else : fi echo "$as_me:$LINENO: checking for DocBook XML DTD V4.1.2 in XML catalog" >&5 echo $ECHO_N "checking for DocBook XML DTD V4.1.2 in XML catalog... $ECHO_C" >&6 if $jh_found_xmlcatalog && \ { (echo "$as_me:$LINENO: \$XMLCATALOG --noout \"\$XML_CATALOG_FILE\" \"-//OASIS//DTD DocBook XML V4.1.2//EN\" >&2") >&5 ($XMLCATALOG --noout "$XML_CATALOG_FILE" "-//OASIS//DTD DocBook XML V4.1.2//EN" >&2) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then echo "$as_me:$LINENO: result: found" >&5 echo "${ECHO_T}found" >&6 BUILD_MAN=yes else echo "$as_me:$LINENO: result: not found" >&5 echo "${ECHO_T}not found" >&6 { { echo "$as_me:$LINENO: error: could not find DocBook XML DTD V4.1.2 in XML catalog" >&5 echo "$as_me: error: could not find DocBook XML DTD V4.1.2 in XML catalog" >&2;} { (exit 1); exit 1; }; } fi echo "$as_me:$LINENO: checking for DocBook XSL Stylesheets in XML catalog" >&5 echo $ECHO_N "checking for DocBook XSL Stylesheets in XML catalog... $ECHO_C" >&6 if $jh_found_xmlcatalog && \ { (echo "$as_me:$LINENO: \$XMLCATALOG --noout \"\$XML_CATALOG_FILE\" \"http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl\" >&2") >&5 ($XMLCATALOG --noout "$XML_CATALOG_FILE" "http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl" >&2) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then echo "$as_me:$LINENO: result: found" >&5 echo "${ECHO_T}found" >&6 else echo "$as_me:$LINENO: result: not found" >&5 echo "${ECHO_T}not found" >&6 BUILD_MAN=no fi fi if test "x$enableval" = "xyes" -a "x$BUILD_MAN" = "xno"; then { { echo "$as_me:$LINENO: error: *** Cannot rebuild the Zapping manual pages because DocBook *** files are missing. See \`config.log' for more details." >&5 echo "$as_me: error: *** Cannot rebuild the Zapping manual pages because DocBook *** files are missing. See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; }; fi fi if test "x$BUILD_MAN" = "xyes"; then BUILD_MAN_TRUE= BUILD_MAN_FALSE='#' else BUILD_MAN_TRUE='#' BUILD_MAN_FALSE= fi DIR_CFLAGS="\ -DPACKAGE_DATA_DIR=\\\"\${datadir}\\\" \ -DPACKAGE_LOCALE_DIR=\\\"\${datadir}/locale\\\" \ -DPACKAGE_PIXMAPS_DIR=\\\"\${datadir}/pixmaps/\${PACKAGE}\\\"\ -DPACKAGE_LIB_DIR=\\\"\${prefix}/lib/\${PACKAGE}\\\" \ -DPACKAGE_ZSFB_DIR=\\\"\${sbindir}\\\" \ " DEFAULT_CFLAGS="-D_GNU_SOURCE $X_CFLAGS $DIR_CFLAGS" PACKAGE_PIXMAPS_DIR="\${prefix}/\${DATADIRNAME}/pixmaps/\${PACKAGE}" PACKAGE_LIB_DIR="\${prefix}/lib/\${PACKAGE}" PLUGIN_DEFAULT_DIR="\${PACKAGE_LIB_DIR}/plugins" PLUGIN_DEFAULT_FLAGS="$DEFAULT_CFLAGS $ZVBI_CFLAGS" COMMON_INCLUDES="$PY_CFLAGS $PACKAGE_CFLAGS $UNICODE_CFLAGS $ARTS_CFLAGS" PACKAGE_VERSION_ID=`echo $VERSION | sed s/[^a-z0-9]/_/g` ac_config_files="$ac_config_files Makefile zapping.desktop.in zapping.spec common/Makefile libtv/Makefile libvbi/Makefile src/Makefile po/Makefile.in glade/Makefile pixmaps/Makefile zapping_setup_fb/Makefile plugins/Makefile plugins/alirc/Makefile plugins/deinterlace/Makefile plugins/deinterlace/DI_GreedyH/Makefile plugins/deinterlace/DI_Misc/Makefile plugins/deinterlace/test/Makefile plugins/mpeg/Makefile plugins/screenshot/Makefile plugins/subtitle/Makefile plugins/teletext/Makefile help/Makefile help/man/Makefile help/C/Makefile test/Makefile" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs, see configure's option --config-cache. # It is not useful on other systems. If it contains results you don't # want to keep, you may remove or edit it. # # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # # `ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, don't put newlines in cache variables' values. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. { (set) 2>&1 | case `(ac_space=' '; set | grep ac_space) 2>&1` in *ac_space=\ *) # `set' does not quote correctly, so add quotes (double-quote # substitution turns \\\\ into \\, and sed turns \\ into \). sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n \ "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" ;; esac; } | sed ' t clear : clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ : end' >>confcache if diff $cache_file confcache >/dev/null 2>&1; then :; else if test -w $cache_file; then test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file" cat confcache >$cache_file else echo "not updating unwritable cache $cache_file" fi fi rm -f confcache test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' # VPATH may cause trouble with some makes, so we remove $(srcdir), # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=/{ s/:*\$(srcdir):*/:/; s/:*\${srcdir}:*/:/; s/:*@srcdir@:*/:/; s/^\([^=]*=[ ]*\):*/\1/; s/:*$//; s/^[^=]*=[ ]*$//; }' fi DEFS=-DHAVE_CONFIG_H ac_libobjs= ac_ltlibobjs= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_i=`echo "$ac_i" | sed 's/\$U\././;s/\.o$//;s/\.obj$//'` # 2. Add them. ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext" ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"MAINTAINER_MODE\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"MAINTAINER_MODE\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCXX\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"am__fastdepCXX\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi mv -f po/POTFILES po/POTFILES.tmp sed -e '/[[]encoding.*]/d' -e 's/[[].*] *//' < po/POTFILES.tmp > po/POTFILES rm -f po/POTFILES.tmp if test -z "${HAVE_X86_TRUE}" && test -z "${HAVE_X86_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"HAVE_X86\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"HAVE_X86\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${CAN_COMPILE_MMX_TRUE}" && test -z "${CAN_COMPILE_MMX_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"CAN_COMPILE_MMX\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"CAN_COMPILE_MMX\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${CAN_COMPILE_3DNOW_TRUE}" && test -z "${CAN_COMPILE_3DNOW_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"CAN_COMPILE_3DNOW\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"CAN_COMPILE_3DNOW\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${CAN_COMPILE_SSE_TRUE}" && test -z "${CAN_COMPILE_SSE_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"CAN_COMPILE_SSE\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"CAN_COMPILE_SSE\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${CAN_COMPILE_SSE2_TRUE}" && test -z "${CAN_COMPILE_SSE2_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"CAN_COMPILE_SSE2\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"CAN_COMPILE_SSE2\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${CAN_COMPILE_SSE3_TRUE}" && test -z "${CAN_COMPILE_SSE3_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"CAN_COMPILE_SSE3\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"CAN_COMPILE_SSE3\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${CAN_COMPILE_ALTIVEC_TRUE}" && test -z "${CAN_COMPILE_ALTIVEC_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"CAN_COMPILE_ALTIVEC\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"CAN_COMPILE_ALTIVEC\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${HAVE_GCC_LIMITS_TRUE}" && test -z "${HAVE_GCC_LIMITS_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"HAVE_GCC_LIMITS\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"HAVE_GCC_LIMITS\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${BUILD_DEINTERLACE_PLUGIN_TRUE}" && test -z "${BUILD_DEINTERLACE_PLUGIN_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"BUILD_DEINTERLACE_PLUGIN\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"BUILD_DEINTERLACE_PLUGIN\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${NEED_ZSFB_TRUE}" && test -z "${NEED_ZSFB_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"NEED_ZSFB\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"NEED_ZSFB\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${SUID_ZSFB_TRUE}" && test -z "${SUID_ZSFB_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"SUID_ZSFB\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"SUID_ZSFB\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${HAVE_XMU_TRUE}" && test -z "${HAVE_XMU_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"HAVE_XMU\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"HAVE_XMU\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${GCONF_SCHEMAS_INSTALL_TRUE}" && test -z "${GCONF_SCHEMAS_INSTALL_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"GCONF_SCHEMAS_INSTALL\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"GCONF_SCHEMAS_INSTALL\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${HAVE_LIBZVBI_TRUE}" && test -z "${HAVE_LIBZVBI_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"HAVE_LIBZVBI\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"HAVE_LIBZVBI\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${BUILD_MAN_TRUE}" && test -z "${BUILD_MAN_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"BUILD_MAN\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"BUILD_MAN\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi : ${CONFIG_STATUS=./config.status} ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 echo "$as_me: creating $CONFIG_STATUS" >&6;} cat >$CONFIG_STATUS <<_ACEOF #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## # Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then set -o posix fi DUALCASE=1; export DUALCASE # for MKS sh # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then as_unset=unset else as_unset=false fi # Work around bugs in pre-3.0 UWIN ksh. $as_unset ENV MAIL MAILPATH PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. for as_var in \ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ LC_TELEPHONE LC_TIME do if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else $as_unset $as_var fi done # Required to use basename. if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi # Name of the executable. as_me=`$as_basename "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)$' \| \ . : '\(.\)' 2>/dev/null || echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } /^X\/\(\/\/\)$/{ s//\1/; q; } /^X\/\(\/\).*/{ s//\1/; q; } s/.*/./; q'` # PATH needs CR, and LINENO needs CR and PATH. # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then echo "#! /bin/sh" >conf$$.sh echo "exit 0" >>conf$$.sh chmod +x conf$$.sh if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then PATH_SEPARATOR=';' else PATH_SEPARATOR=: fi rm -f conf$$.sh fi as_lineno_1=$LINENO as_lineno_2=$LINENO as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && test "x$as_lineno_3" = "x$as_lineno_2" || { # Find who we are. Look in the path if we contain no path at all # relative or not. case $0 in *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5 echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;} { (exit 1); exit 1; }; } fi case $CONFIG_SHELL in '') as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for as_base in sh bash ksh sh5; do case $as_dir in /*) if ("$as_dir/$as_base" -c ' as_lineno_1=$LINENO as_lineno_2=$LINENO as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } CONFIG_SHELL=$as_dir/$as_base export CONFIG_SHELL exec "$CONFIG_SHELL" "$0" ${1+"$@"} fi;; esac done done ;; esac # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a # line-number line before each line; the second 'sed' does the real # work. The second script uses 'N' to pair each line-number line # with the numbered line, and appends trailing '-' during # substitution so that $LINENO is not a special case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) sed '=' <$as_myself | sed ' N s,$,-, : loop s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, t loop s,-$,, s,^['$as_cr_digits']*\n,, ' >$as_me.lineno && chmod +x $as_me.lineno || { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5 echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;} { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensible to this). . ./$as_me.lineno # Exit status is that of the last command. exit } case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in *c*,-n*) ECHO_N= ECHO_C=' ' ECHO_T=' ' ;; *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; *) ECHO_N= ECHO_C='\c' ECHO_T= ;; esac if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file echo >conf$$.file if ln -s conf$$.file conf$$ 2>/dev/null; then # We could just check for DJGPP; but this test a) works b) is more generic # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). if test -f conf$$.exe; then # Don't use ln at all; we don't have any links as_ln_s='cp -p' else as_ln_s='ln -s' fi elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.file if mkdir -p . 2>/dev/null; then as_mkdir_p=: else test -d ./-p && rmdir ./-p as_mkdir_p=false fi as_executable_p="test -f" # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" # IFS # We need space, tab and new line, in precisely that order. as_nl=' ' IFS=" $as_nl" # CDPATH. $as_unset CDPATH exec 6>&1 # Open the log real soon, to keep \$[0] and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. Logging --version etc. is OK. exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX } >&5 cat >&5 <<_CSEOF This file was extended by zapping $as_me 0.10cvs6, which was generated by GNU Autoconf 2.59. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ _CSEOF echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5 echo >&5 _ACEOF # Files that config.status was made for. if test -n "$ac_config_files"; then echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS fi if test -n "$ac_config_headers"; then echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS fi if test -n "$ac_config_links"; then echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS fi if test -n "$ac_config_commands"; then echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS fi cat >>$CONFIG_STATUS <<\_ACEOF ac_cs_usage="\ \`$as_me' instantiates files from templates according to the current configuration. Usage: $0 [OPTIONS] [FILE]... -h, --help print this help, then exit -V, --version print version number, then exit -q, --quiet do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE --header=FILE[:TEMPLATE] instantiate the configuration header FILE Configuration files: $config_files Configuration headers: $config_headers Configuration commands: $config_commands Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ zapping config.status 0.10cvs6 configured by $0, generated by GNU Autoconf 2.59, with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" Copyright (C) 2003 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." srcdir=$srcdir INSTALL="$INSTALL" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # If no file are specified by the user, then we need to provide default # value. By we need to know if files were specified by the user. ac_need_defaults=: while test $# != 0 do case $1 in --*=*) ac_option=`expr "x$1" : 'x\([^=]*\)='` ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'` ac_shift=: ;; -*) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; *) # This is not an option, so the user has probably given explicit # arguments. ac_option=$1 ac_need_defaults=false;; esac case $ac_option in # Handling of the options. _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --vers* | -V ) echo "$ac_cs_version"; exit 0 ;; --he | --h) # Conflict between --help and --header { { echo "$as_me:$LINENO: error: ambiguous option: $1 Try \`$0 --help' for more information." >&5 echo "$as_me: error: ambiguous option: $1 Try \`$0 --help' for more information." >&2;} { (exit 1); exit 1; }; };; --help | --hel | -h ) echo "$ac_cs_usage"; exit 0 ;; --debug | --d* | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift CONFIG_FILES="$CONFIG_FILES $ac_optarg" ac_need_defaults=false;; --header | --heade | --head | --hea ) $ac_shift CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" ac_need_defaults=false;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1 Try \`$0 --help' for more information." >&5 echo "$as_me: error: unrecognized option: $1 Try \`$0 --help' for more information." >&2;} { (exit 1); exit 1; }; } ;; *) ac_config_targets="$ac_config_targets $1" ;; esac shift done ac_configure_extra_args= if $ac_cs_silent; then exec 6>/dev/null ac_configure_extra_args="$ac_configure_extra_args --silent" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF if \$ac_cs_recheck; then echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF # # INIT-COMMANDS section. # AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" INTLTOOL_PERL='${INTLTOOL_PERL}' ac_aux_dir=${ac_aux_dir} INTLTOOL_EXTRACT='${INTLTOOL_EXTRACT}' ICONV='${INTLTOOL_ICONV}' MSGFMT='${INTLTOOL_MSGFMT}' MSGMERGE='${INTLTOOL_MSGMERGE}' XGETTEXT='${INTLTOOL_XGETTEXT}' _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF for ac_config_target in $ac_config_targets do case "$ac_config_target" in # Handling of arguments. "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;; "zapping.desktop.in" ) CONFIG_FILES="$CONFIG_FILES zapping.desktop.in" ;; "zapping.spec" ) CONFIG_FILES="$CONFIG_FILES zapping.spec" ;; "common/Makefile" ) CONFIG_FILES="$CONFIG_FILES common/Makefile" ;; "libtv/Makefile" ) CONFIG_FILES="$CONFIG_FILES libtv/Makefile" ;; "libvbi/Makefile" ) CONFIG_FILES="$CONFIG_FILES libvbi/Makefile" ;; "src/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; "po/Makefile.in" ) CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;; "glade/Makefile" ) CONFIG_FILES="$CONFIG_FILES glade/Makefile" ;; "pixmaps/Makefile" ) CONFIG_FILES="$CONFIG_FILES pixmaps/Makefile" ;; "zapping_setup_fb/Makefile" ) CONFIG_FILES="$CONFIG_FILES zapping_setup_fb/Makefile" ;; "plugins/Makefile" ) CONFIG_FILES="$CONFIG_FILES plugins/Makefile" ;; "plugins/alirc/Makefile" ) CONFIG_FILES="$CONFIG_FILES plugins/alirc/Makefile" ;; "plugins/deinterlace/Makefile" ) CONFIG_FILES="$CONFIG_FILES plugins/deinterlace/Makefile" ;; "plugins/deinterlace/DI_GreedyH/Makefile" ) CONFIG_FILES="$CONFIG_FILES plugins/deinterlace/DI_GreedyH/Makefile" ;; "plugins/deinterlace/DI_Misc/Makefile" ) CONFIG_FILES="$CONFIG_FILES plugins/deinterlace/DI_Misc/Makefile" ;; "plugins/deinterlace/test/Makefile" ) CONFIG_FILES="$CONFIG_FILES plugins/deinterlace/test/Makefile" ;; "plugins/mpeg/Makefile" ) CONFIG_FILES="$CONFIG_FILES plugins/mpeg/Makefile" ;; "plugins/screenshot/Makefile" ) CONFIG_FILES="$CONFIG_FILES plugins/screenshot/Makefile" ;; "plugins/subtitle/Makefile" ) CONFIG_FILES="$CONFIG_FILES plugins/subtitle/Makefile" ;; "plugins/teletext/Makefile" ) CONFIG_FILES="$CONFIG_FILES plugins/teletext/Makefile" ;; "help/Makefile" ) CONFIG_FILES="$CONFIG_FILES help/Makefile" ;; "help/man/Makefile" ) CONFIG_FILES="$CONFIG_FILES help/man/Makefile" ;; "help/C/Makefile" ) CONFIG_FILES="$CONFIG_FILES help/C/Makefile" ;; "test/Makefile" ) CONFIG_FILES="$CONFIG_FILES test/Makefile" ;; "depfiles" ) CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "intltool" ) CONFIG_COMMANDS="$CONFIG_COMMANDS intltool" ;; "default-1" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;; "config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 echo "$as_me: error: invalid argument: $ac_config_target" >&2;} { (exit 1); exit 1; }; };; esac done # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands fi # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason to put it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Create a temporary directory, and hook for its removal unless debugging. $debug || { trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0 trap '{ (exit 1); exit 1; }' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" } || { tmp=./confstat$$-$RANDOM (umask 077 && mkdir $tmp) } || { echo "$me: cannot create a temporary directory in ." >&2 { (exit 1); exit 1; } } _ACEOF cat >>$CONFIG_STATUS <<_ACEOF # # CONFIG_FILES section. # # No need to generate the scripts if there are no CONFIG_FILES. # This happens for instance when ./config.status config.h if test -n "\$CONFIG_FILES"; then # Protect against being on the right side of a sed subst in config.status. sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g; s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF s,@SHELL@,$SHELL,;t t s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t s,@exec_prefix@,$exec_prefix,;t t s,@prefix@,$prefix,;t t s,@program_transform_name@,$program_transform_name,;t t s,@bindir@,$bindir,;t t s,@sbindir@,$sbindir,;t t s,@libexecdir@,$libexecdir,;t t s,@datadir@,$datadir,;t t s,@sysconfdir@,$sysconfdir,;t t s,@sharedstatedir@,$sharedstatedir,;t t s,@localstatedir@,$localstatedir,;t t s,@libdir@,$libdir,;t t s,@includedir@,$includedir,;t t s,@oldincludedir@,$oldincludedir,;t t s,@infodir@,$infodir,;t t s,@mandir@,$mandir,;t t s,@build_alias@,$build_alias,;t t s,@host_alias@,$host_alias,;t t s,@target_alias@,$target_alias,;t t s,@DEFS@,$DEFS,;t t s,@ECHO_C@,$ECHO_C,;t t s,@ECHO_N@,$ECHO_N,;t t s,@ECHO_T@,$ECHO_T,;t t s,@LIBS@,$LIBS,;t t s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t s,@INSTALL_DATA@,$INSTALL_DATA,;t t s,@CYGPATH_W@,$CYGPATH_W,;t t s,@PACKAGE@,$PACKAGE,;t t s,@VERSION@,$VERSION,;t t s,@ACLOCAL@,$ACLOCAL,;t t s,@AUTOCONF@,$AUTOCONF,;t t s,@AUTOMAKE@,$AUTOMAKE,;t t s,@AUTOHEADER@,$AUTOHEADER,;t t s,@MAKEINFO@,$MAKEINFO,;t t s,@install_sh@,$install_sh,;t t s,@STRIP@,$STRIP,;t t s,@ac_ct_STRIP@,$ac_ct_STRIP,;t t s,@INSTALL_STRIP_PROGRAM@,$INSTALL_STRIP_PROGRAM,;t t s,@mkdir_p@,$mkdir_p,;t t s,@AWK@,$AWK,;t t s,@SET_MAKE@,$SET_MAKE,;t t s,@am__leading_dot@,$am__leading_dot,;t t s,@AMTAR@,$AMTAR,;t t s,@am__tar@,$am__tar,;t t s,@am__untar@,$am__untar,;t t s,@MAINTAINER_MODE_TRUE@,$MAINTAINER_MODE_TRUE,;t t s,@MAINTAINER_MODE_FALSE@,$MAINTAINER_MODE_FALSE,;t t s,@MAINT@,$MAINT,;t t s,@CC@,$CC,;t t s,@CFLAGS@,$CFLAGS,;t t s,@LDFLAGS@,$LDFLAGS,;t t s,@CPPFLAGS@,$CPPFLAGS,;t t s,@ac_ct_CC@,$ac_ct_CC,;t t s,@EXEEXT@,$EXEEXT,;t t s,@OBJEXT@,$OBJEXT,;t t s,@DEPDIR@,$DEPDIR,;t t s,@am__include@,$am__include,;t t s,@am__quote@,$am__quote,;t t s,@AMDEP_TRUE@,$AMDEP_TRUE,;t t s,@AMDEP_FALSE@,$AMDEP_FALSE,;t t s,@AMDEPBACKSLASH@,$AMDEPBACKSLASH,;t t s,@CCDEPMODE@,$CCDEPMODE,;t t s,@am__fastdepCC_TRUE@,$am__fastdepCC_TRUE,;t t s,@am__fastdepCC_FALSE@,$am__fastdepCC_FALSE,;t t s,@CPP@,$CPP,;t t s,@EGREP@,$EGREP,;t t s,@CCAS@,$CCAS,;t t s,@CCASFLAGS@,$CCASFLAGS,;t t s,@build@,$build,;t t s,@build_cpu@,$build_cpu,;t t s,@build_vendor@,$build_vendor,;t t s,@build_os@,$build_os,;t t s,@host@,$host,;t t s,@host_cpu@,$host_cpu,;t t s,@host_vendor@,$host_vendor,;t t s,@host_os@,$host_os,;t t s,@LN_S@,$LN_S,;t t s,@ECHO@,$ECHO,;t t s,@AR@,$AR,;t t s,@ac_ct_AR@,$ac_ct_AR,;t t s,@RANLIB@,$RANLIB,;t t s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t s,@CXX@,$CXX,;t t s,@CXXFLAGS@,$CXXFLAGS,;t t s,@ac_ct_CXX@,$ac_ct_CXX,;t t s,@CXXDEPMODE@,$CXXDEPMODE,;t t s,@am__fastdepCXX_TRUE@,$am__fastdepCXX_TRUE,;t t s,@am__fastdepCXX_FALSE@,$am__fastdepCXX_FALSE,;t t s,@CXXCPP@,$CXXCPP,;t t s,@F77@,$F77,;t t s,@FFLAGS@,$FFLAGS,;t t s,@ac_ct_F77@,$ac_ct_F77,;t t s,@LIBTOOL@,$LIBTOOL,;t t s,@INTLTOOL_DESKTOP_RULE@,$INTLTOOL_DESKTOP_RULE,;t t s,@INTLTOOL_DIRECTORY_RULE@,$INTLTOOL_DIRECTORY_RULE,;t t s,@INTLTOOL_KEYS_RULE@,$INTLTOOL_KEYS_RULE,;t t s,@INTLTOOL_PROP_RULE@,$INTLTOOL_PROP_RULE,;t t s,@INTLTOOL_OAF_RULE@,$INTLTOOL_OAF_RULE,;t t s,@INTLTOOL_PONG_RULE@,$INTLTOOL_PONG_RULE,;t t s,@INTLTOOL_SERVER_RULE@,$INTLTOOL_SERVER_RULE,;t t s,@INTLTOOL_SHEET_RULE@,$INTLTOOL_SHEET_RULE,;t t s,@INTLTOOL_SOUNDLIST_RULE@,$INTLTOOL_SOUNDLIST_RULE,;t t s,@INTLTOOL_UI_RULE@,$INTLTOOL_UI_RULE,;t t s,@INTLTOOL_XAM_RULE@,$INTLTOOL_XAM_RULE,;t t s,@INTLTOOL_KBD_RULE@,$INTLTOOL_KBD_RULE,;t t s,@INTLTOOL_XML_RULE@,$INTLTOOL_XML_RULE,;t t s,@INTLTOOL_XML_NOMERGE_RULE@,$INTLTOOL_XML_NOMERGE_RULE,;t t s,@INTLTOOL_CAVES_RULE@,$INTLTOOL_CAVES_RULE,;t t s,@INTLTOOL_SCHEMAS_RULE@,$INTLTOOL_SCHEMAS_RULE,;t t s,@INTLTOOL_THEME_RULE@,$INTLTOOL_THEME_RULE,;t t s,@INTLTOOL_EXTRACT@,$INTLTOOL_EXTRACT,;t t s,@INTLTOOL_MERGE@,$INTLTOOL_MERGE,;t t s,@INTLTOOL_UPDATE@,$INTLTOOL_UPDATE,;t t s,@INTLTOOL_PERL@,$INTLTOOL_PERL,;t t s,@INTLTOOL_ICONV@,$INTLTOOL_ICONV,;t t s,@INTLTOOL_MSGFMT@,$INTLTOOL_MSGFMT,;t t s,@INTLTOOL_MSGMERGE@,$INTLTOOL_MSGMERGE,;t t s,@INTLTOOL_XGETTEXT@,$INTLTOOL_XGETTEXT,;t t s,@HAVE_X86_TRUE@,$HAVE_X86_TRUE,;t t s,@HAVE_X86_FALSE@,$HAVE_X86_FALSE,;t t s,@CAN_COMPILE_MMX_TRUE@,$CAN_COMPILE_MMX_TRUE,;t t s,@CAN_COMPILE_MMX_FALSE@,$CAN_COMPILE_MMX_FALSE,;t t s,@CAN_COMPILE_3DNOW_TRUE@,$CAN_COMPILE_3DNOW_TRUE,;t t s,@CAN_COMPILE_3DNOW_FALSE@,$CAN_COMPILE_3DNOW_FALSE,;t t s,@CAN_COMPILE_SSE_TRUE@,$CAN_COMPILE_SSE_TRUE,;t t s,@CAN_COMPILE_SSE_FALSE@,$CAN_COMPILE_SSE_FALSE,;t t s,@CAN_COMPILE_SSE2_TRUE@,$CAN_COMPILE_SSE2_TRUE,;t t s,@CAN_COMPILE_SSE2_FALSE@,$CAN_COMPILE_SSE2_FALSE,;t t s,@CAN_COMPILE_SSE3_TRUE@,$CAN_COMPILE_SSE3_TRUE,;t t s,@CAN_COMPILE_SSE3_FALSE@,$CAN_COMPILE_SSE3_FALSE,;t t s,@CAN_COMPILE_ALTIVEC_TRUE@,$CAN_COMPILE_ALTIVEC_TRUE,;t t s,@CAN_COMPILE_ALTIVEC_FALSE@,$CAN_COMPILE_ALTIVEC_FALSE,;t t s,@HAVE_GCC_LIMITS_TRUE@,$HAVE_GCC_LIMITS_TRUE,;t t s,@HAVE_GCC_LIMITS_FALSE@,$HAVE_GCC_LIMITS_FALSE,;t t s,@PG_CFLAGS@,$PG_CFLAGS,;t t s,@BUILD_DEINTERLACE_PLUGIN_TRUE@,$BUILD_DEINTERLACE_PLUGIN_TRUE,;t t s,@BUILD_DEINTERLACE_PLUGIN_FALSE@,$BUILD_DEINTERLACE_PLUGIN_FALSE,;t t s,@CONSOLEHELPER_LOCATION@,$CONSOLEHELPER_LOCATION,;t t s,@NEED_ZSFB_TRUE@,$NEED_ZSFB_TRUE,;t t s,@NEED_ZSFB_FALSE@,$NEED_ZSFB_FALSE,;t t s,@SUID_ZSFB_TRUE@,$SUID_ZSFB_TRUE,;t t s,@SUID_ZSFB_FALSE@,$SUID_ZSFB_FALSE,;t t s,@ZSFB_OWNER@,$ZSFB_OWNER,;t t s,@ZSFB_GROUP@,$ZSFB_GROUP,;t t s,@ESD_LIBS@,$ESD_LIBS,;t t s,@ARTS_CFLAGS@,$ARTS_CFLAGS,;t t s,@ARTS_LIBS@,$ARTS_LIBS,;t t s,@X_CFLAGS@,$X_CFLAGS,;t t s,@X_PRE_LIBS@,$X_PRE_LIBS,;t t s,@X_LIBS@,$X_LIBS,;t t s,@X_EXTRA_LIBS@,$X_EXTRA_LIBS,;t t s,@X_DPMS_LIBS@,$X_DPMS_LIBS,;t t s,@X_XF86DGA_LIBS@,$X_XF86DGA_LIBS,;t t s,@X_XF86VMODE_LIBS@,$X_XF86VMODE_LIBS,;t t s,@X_XV_LIBS@,$X_XV_LIBS,;t t s,@X_XINERAMA_LIBS@,$X_XINERAMA_LIBS,;t t s,@X_XMU_LIBS@,$X_XMU_LIBS,;t t s,@HAVE_XMU_TRUE@,$HAVE_XMU_TRUE,;t t s,@HAVE_XMU_FALSE@,$HAVE_XMU_FALSE,;t t s,@WARN_CFLAGS@,$WARN_CFLAGS,;t t s,@GCONF_SCHEMA_CONFIG_SOURCE@,$GCONF_SCHEMA_CONFIG_SOURCE,;t t s,@GCONF_SCHEMA_FILE_DIR@,$GCONF_SCHEMA_FILE_DIR,;t t s,@GCONF_SCHEMAS_INSTALL_TRUE@,$GCONF_SCHEMAS_INSTALL_TRUE,;t t s,@GCONF_SCHEMAS_INSTALL_FALSE@,$GCONF_SCHEMAS_INSTALL_FALSE,;t t s,@PKG_CONFIG@,$PKG_CONFIG,;t t s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t s,@PACKAGE_CFLAGS@,$PACKAGE_CFLAGS,;t t s,@PACKAGE_LIBS@,$PACKAGE_LIBS,;t t s,@GDK_PIXBUF_CSOURCE@,$GDK_PIXBUF_CSOURCE,;t t s,@GLIB_GENMARSHAL@,$GLIB_GENMARSHAL,;t t s,@ZVBI_CFLAGS@,$ZVBI_CFLAGS,;t t s,@ZVBI_LIBS@,$ZVBI_LIBS,;t t s,@HAVE_LIBZVBI_TRUE@,$HAVE_LIBZVBI_TRUE,;t t s,@HAVE_LIBZVBI_FALSE@,$HAVE_LIBZVBI_FALSE,;t t s,@UNICODE_CFLAGS@,$UNICODE_CFLAGS,;t t s,@UNICODE_LIBS@,$UNICODE_LIBS,;t t s,@JPEG_LIB@,$JPEG_LIB,;t t s,@PNG_LIBS@,$PNG_LIBS,;t t s,@RTE_LIBS@,$RTE_LIBS,;t t s,@LIRC_LIB@,$LIRC_LIB,;t t s,@python_val@,$python_val,;t t s,@PY_LIBS@,$PY_LIBS,;t t s,@PY_LIB_LOC@,$PY_LIB_LOC,;t t s,@PY_CFLAGS@,$PY_CFLAGS,;t t s,@PY_EXTRA_LIBS@,$PY_EXTRA_LIBS,;t t s,@PYTHON_LIBS@,$PYTHON_LIBS,;t t s,@LIBXML_CFLAGS@,$LIBXML_CFLAGS,;t t s,@LIBXML_LIBS@,$LIBXML_LIBS,;t t s,@GETTEXT_PACKAGE@,$GETTEXT_PACKAGE,;t t s,@USE_NLS@,$USE_NLS,;t t s,@MSGFMT@,$MSGFMT,;t t s,@GMSGFMT@,$GMSGFMT,;t t s,@XGETTEXT@,$XGETTEXT,;t t s,@CATALOGS@,$CATALOGS,;t t s,@CATOBJEXT@,$CATOBJEXT,;t t s,@DATADIRNAME@,$DATADIRNAME,;t t s,@GMOFILES@,$GMOFILES,;t t s,@INSTOBJEXT@,$INSTOBJEXT,;t t s,@INTLLIBS@,$INTLLIBS,;t t s,@PO_IN_DATADIR_TRUE@,$PO_IN_DATADIR_TRUE,;t t s,@PO_IN_DATADIR_FALSE@,$PO_IN_DATADIR_FALSE,;t t s,@POFILES@,$POFILES,;t t s,@POSUB@,$POSUB,;t t s,@MKINSTALLDIRS@,$MKINSTALLDIRS,;t t s,@SCROLLKEEPER_BUILD_REQUIRED@,$SCROLLKEEPER_BUILD_REQUIRED,;t t s,@SCROLLKEEPER_CONFIG@,$SCROLLKEEPER_CONFIG,;t t s,@XSLTPROC@,$XSLTPROC,;t t s,@XML_CATALOG_FILE@,$XML_CATALOG_FILE,;t t s,@XMLCATALOG@,$XMLCATALOG,;t t s,@BUILD_MAN_TRUE@,$BUILD_MAN_TRUE,;t t s,@BUILD_MAN_FALSE@,$BUILD_MAN_FALSE,;t t s,@DEFAULT_CFLAGS@,$DEFAULT_CFLAGS,;t t s,@PACKAGE_PIXMAPS_DIR@,$PACKAGE_PIXMAPS_DIR,;t t s,@PACKAGE_LIB_DIR@,$PACKAGE_LIB_DIR,;t t s,@PLUGIN_DEFAULT_DIR@,$PLUGIN_DEFAULT_DIR,;t t s,@PLUGIN_DEFAULT_FLAGS@,$PLUGIN_DEFAULT_FLAGS,;t t s,@COMMON_INCLUDES@,$COMMON_INCLUDES,;t t s,@PACKAGE_VERSION_ID@,$PACKAGE_VERSION_ID,;t t s,@LIBOBJS@,$LIBOBJS,;t t s,@LTLIBOBJS@,$LTLIBOBJS,;t t CEOF _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # Split the substitutions into bite-sized pieces for seds with # small command number limits, like on Digital OSF/1 and HP-UX. ac_max_sed_lines=48 ac_sed_frag=1 # Number of current file. ac_beg=1 # First line for current file. ac_end=$ac_max_sed_lines # Line after last line for current file. ac_more_lines=: ac_sed_cmds= while $ac_more_lines; do if test $ac_beg -gt 1; then sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag else sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag fi if test ! -s $tmp/subs.frag; then ac_more_lines=false else # The purpose of the label and of the branching condition is to # speed up the sed processing (if there are no `@' at all, there # is no need to browse any of the substitutions). # These are the two extra sed commands mentioned above. (echo ':t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed if test -z "$ac_sed_cmds"; then ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed" else ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed" fi ac_sed_frag=`expr $ac_sed_frag + 1` ac_beg=$ac_end ac_end=`expr $ac_end + $ac_max_sed_lines` fi done if test -z "$ac_sed_cmds"; then ac_sed_cmds=cat fi fi # test -n "$CONFIG_FILES" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". case $ac_file in - | *:- | *:-:* ) # input from stdin cat >$tmp/stdin ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; * ) ac_file_in=$ac_file.in ;; esac # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories. ac_dir=`(dirname "$ac_file") 2>/dev/null || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` { if $as_mkdir_p; then mkdir -p "$ac_dir" else as_dir="$ac_dir" as_dirs= while test ! -d "$as_dir"; do as_dirs="$as_dir $as_dirs" as_dir=`(dirname "$as_dir") 2>/dev/null || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` done test ! -n "$as_dirs" || mkdir $as_dirs fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} { (exit 1); exit 1; }; }; } ac_builddir=. if test "$ac_dir" != .; then ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` # A "../" for each directory in $ac_dir_suffix. ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` else ac_dir_suffix= ac_top_builddir= fi case $srcdir in .) # No --srcdir option. We are building in place. ac_srcdir=. if test -z "$ac_top_builddir"; then ac_top_srcdir=. else ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` fi ;; [\\/]* | ?:[\\/]* ) # Absolute path. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ;; *) # Relative path. ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_builddir$srcdir ;; esac # Do not use `cd foo && pwd` to compute absolute paths, because # the directories may not exist. case `pwd` in .) ac_abs_builddir="$ac_dir";; *) case "$ac_dir" in .) ac_abs_builddir=`pwd`;; [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; *) ac_abs_builddir=`pwd`/"$ac_dir";; esac;; esac case $ac_abs_builddir in .) ac_abs_top_builddir=${ac_top_builddir}.;; *) case ${ac_top_builddir}. in .) ac_abs_top_builddir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; esac;; esac case $ac_abs_builddir in .) ac_abs_srcdir=$ac_srcdir;; *) case $ac_srcdir in .) ac_abs_srcdir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; esac;; esac case $ac_abs_builddir in .) ac_abs_top_srcdir=$ac_top_srcdir;; *) case $ac_top_srcdir in .) ac_abs_top_srcdir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; esac;; esac case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_builddir$INSTALL ;; esac if test x"$ac_file" != x-; then { echo "$as_me:$LINENO: creating $ac_file" >&5 echo "$as_me: creating $ac_file" >&6;} rm -f "$ac_file" fi # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ if test x"$ac_file" = x-; then configure_input= else configure_input="$ac_file. " fi configure_input=$configure_input"Generated from `echo $ac_file_in | sed 's,.*/,,'` by configure." # First look for the input files in the build tree, otherwise in the # src tree. ac_file_inputs=`IFS=: for f in $ac_file_in; do case $f in -) echo $tmp/stdin ;; [\\/$]*) # Absolute (can't be DOS-style, as IFS=:) test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } echo "$f";; *) # Relative if test -f "$f"; then # Build tree echo "$f" elif test -f "$srcdir/$f"; then # Source tree echo "$srcdir/$f" else # /dev/null tree { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } fi;; esac done` || { (exit 1); exit 1; } _ACEOF cat >>$CONFIG_STATUS <<_ACEOF sed "$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s,@configure_input@,$configure_input,;t t s,@srcdir@,$ac_srcdir,;t t s,@abs_srcdir@,$ac_abs_srcdir,;t t s,@top_srcdir@,$ac_top_srcdir,;t t s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t s,@builddir@,$ac_builddir,;t t s,@abs_builddir@,$ac_abs_builddir,;t t s,@top_builddir@,$ac_top_builddir,;t t s,@abs_top_builddir@,$ac_abs_top_builddir,;t t s,@INSTALL@,$ac_INSTALL,;t t " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out rm -f $tmp/stdin if test x"$ac_file" != x-; then mv $tmp/out $ac_file else cat $tmp/out rm -f $tmp/out fi done _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # # CONFIG_HEADER section. # # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where # NAME is the cpp macro being defined and VALUE is the value it is being given. # # ac_d sets the value in "#define NAME VALUE" lines. ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)' ac_dB='[ ].*$,\1#\2' ac_dC=' ' ac_dD=',;t' # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE". ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' ac_uB='$,\1#\2define\3' ac_uC=' ' ac_uD=',;t' for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". case $ac_file in - | *:- | *:-:* ) # input from stdin cat >$tmp/stdin ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; * ) ac_file_in=$ac_file.in ;; esac test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5 echo "$as_me: creating $ac_file" >&6;} # First look for the input files in the build tree, otherwise in the # src tree. ac_file_inputs=`IFS=: for f in $ac_file_in; do case $f in -) echo $tmp/stdin ;; [\\/$]*) # Absolute (can't be DOS-style, as IFS=:) test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } # Do quote $f, to prevent DOS paths from being IFS'd. echo "$f";; *) # Relative if test -f "$f"; then # Build tree echo "$f" elif test -f "$srcdir/$f"; then # Source tree echo "$srcdir/$f" else # /dev/null tree { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } fi;; esac done` || { (exit 1); exit 1; } # Remove the trailing spaces. sed 's/[ ]*$//' $ac_file_inputs >$tmp/in _ACEOF # Transform confdefs.h into two sed scripts, `conftest.defines' and # `conftest.undefs', that substitutes the proper values into # config.h.in to produce config.h. The first handles `#define' # templates, and the second `#undef' templates. # And first: Protect against being on the right side of a sed subst in # config.status. Protect against being in an unquoted here document # in config.status. rm -f conftest.defines conftest.undefs # Using a here document instead of a string reduces the quoting nightmare. # Putting comments in sed scripts is not portable. # # `end' is used to avoid that the second main sed command (meant for # 0-ary CPP macros) applies to n-ary macro definitions. # See the Autoconf documentation for `clear'. cat >confdef2sed.sed <<\_ACEOF s/[\\&,]/\\&/g s,[\\$`],\\&,g t clear : clear s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp t end s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp : end _ACEOF # If some macros were called several times there might be several times # the same #defines, which is useless. Nevertheless, we may not want to # sort them, since we want the *last* AC-DEFINE to be honored. uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs rm -f confdef2sed.sed # This sed command replaces #undef with comments. This is necessary, for # example, in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. cat >>conftest.undefs <<\_ACEOF s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */, _ACEOF # Break up conftest.defines because some shells have a limit on the size # of here documents, and old seds have small limits too (100 cmds). echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS echo ' :' >>$CONFIG_STATUS rm -f conftest.tail while grep . conftest.defines >/dev/null do # Write a limited-size here document to $tmp/defines.sed. echo ' cat >$tmp/defines.sed <>$CONFIG_STATUS # Speed up: don't consider the non `#define' lines. echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS # Work around the forget-to-reset-the-flag bug. echo 't clr' >>$CONFIG_STATUS echo ': clr' >>$CONFIG_STATUS sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS echo 'CEOF sed -f $tmp/defines.sed $tmp/in >$tmp/out rm -f $tmp/in mv $tmp/out $tmp/in ' >>$CONFIG_STATUS sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail rm -f conftest.defines mv conftest.tail conftest.defines done rm -f conftest.defines echo ' fi # grep' >>$CONFIG_STATUS echo >>$CONFIG_STATUS # Break up conftest.undefs because some shells have a limit on the size # of here documents, and old seds have small limits too (100 cmds). echo ' # Handle all the #undef templates' >>$CONFIG_STATUS rm -f conftest.tail while grep . conftest.undefs >/dev/null do # Write a limited-size here document to $tmp/undefs.sed. echo ' cat >$tmp/undefs.sed <>$CONFIG_STATUS # Speed up: don't consider the non `#undef' echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS # Work around the forget-to-reset-the-flag bug. echo 't clr' >>$CONFIG_STATUS echo ': clr' >>$CONFIG_STATUS sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS echo 'CEOF sed -f $tmp/undefs.sed $tmp/in >$tmp/out rm -f $tmp/in mv $tmp/out $tmp/in ' >>$CONFIG_STATUS sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail rm -f conftest.undefs mv conftest.tail conftest.undefs done rm -f conftest.undefs cat >>$CONFIG_STATUS <<\_ACEOF # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ if test x"$ac_file" = x-; then echo "/* Generated by configure. */" >$tmp/config.h else echo "/* $ac_file. Generated by configure. */" >$tmp/config.h fi cat $tmp/in >>$tmp/config.h rm -f $tmp/in if test x"$ac_file" != x-; then if diff $ac_file $tmp/config.h >/dev/null 2>&1; then { echo "$as_me:$LINENO: $ac_file is unchanged" >&5 echo "$as_me: $ac_file is unchanged" >&6;} else ac_dir=`(dirname "$ac_file") 2>/dev/null || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` { if $as_mkdir_p; then mkdir -p "$ac_dir" else as_dir="$ac_dir" as_dirs= while test ! -d "$as_dir"; do as_dirs="$as_dir $as_dirs" as_dir=`(dirname "$as_dir") 2>/dev/null || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` done test ! -n "$as_dirs" || mkdir $as_dirs fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} { (exit 1); exit 1; }; }; } rm -f $ac_file mv $tmp/config.h $ac_file fi else cat $tmp/config.h rm -f $tmp/config.h fi # Compute $ac_file's index in $config_headers. _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $ac_file | $ac_file:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $ac_file" >`(dirname $ac_file) 2>/dev/null || $as_expr X$ac_file : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X$ac_file : 'X\(//\)[^/]' \| \ X$ac_file : 'X\(//\)$' \| \ X$ac_file : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X$ac_file | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'`/stamp-h$_am_stamp_count done _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # # CONFIG_COMMANDS section. # for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue ac_dest=`echo "$ac_file" | sed 's,:.*,,'` ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'` ac_dir=`(dirname "$ac_dest") 2>/dev/null || $as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_dest" : 'X\(//\)[^/]' \| \ X"$ac_dest" : 'X\(//\)$' \| \ X"$ac_dest" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$ac_dest" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` { if $as_mkdir_p; then mkdir -p "$ac_dir" else as_dir="$ac_dir" as_dirs= while test ! -d "$as_dir"; do as_dirs="$as_dir $as_dirs" as_dir=`(dirname "$as_dir") 2>/dev/null || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` done test ! -n "$as_dirs" || mkdir $as_dirs fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} { (exit 1); exit 1; }; }; } ac_builddir=. if test "$ac_dir" != .; then ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` # A "../" for each directory in $ac_dir_suffix. ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` else ac_dir_suffix= ac_top_builddir= fi case $srcdir in .) # No --srcdir option. We are building in place. ac_srcdir=. if test -z "$ac_top_builddir"; then ac_top_srcdir=. else ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` fi ;; [\\/]* | ?:[\\/]* ) # Absolute path. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ;; *) # Relative path. ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_builddir$srcdir ;; esac # Do not use `cd foo && pwd` to compute absolute paths, because # the directories may not exist. case `pwd` in .) ac_abs_builddir="$ac_dir";; *) case "$ac_dir" in .) ac_abs_builddir=`pwd`;; [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; *) ac_abs_builddir=`pwd`/"$ac_dir";; esac;; esac case $ac_abs_builddir in .) ac_abs_top_builddir=${ac_top_builddir}.;; *) case ${ac_top_builddir}. in .) ac_abs_top_builddir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; esac;; esac case $ac_abs_builddir in .) ac_abs_srcdir=$ac_srcdir;; *) case $ac_srcdir in .) ac_abs_srcdir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; esac;; esac case $ac_abs_builddir in .) ac_abs_top_srcdir=$ac_top_srcdir;; *) case $ac_top_srcdir in .) ac_abs_top_srcdir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; esac;; esac { echo "$as_me:$LINENO: executing $ac_dest commands" >&5 echo "$as_me: executing $ac_dest commands" >&6;} case $ac_dest in depfiles ) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named `Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # So let's grep whole file. if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then dirpart=`(dirname "$mf") 2>/dev/null || $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$mf" : 'X\(//\)[^/]' \| \ X"$mf" : 'X\(//\)$' \| \ X"$mf" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$mf" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running `make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n 's/^U = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`(dirname "$file") 2>/dev/null || $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$file" : 'X\(//\)[^/]' \| \ X"$file" : 'X\(//\)$' \| \ X"$file" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` { if $as_mkdir_p; then mkdir -p $dirpart/$fdir else as_dir=$dirpart/$fdir as_dirs= while test ! -d "$as_dir"; do as_dirs="$as_dir $as_dirs" as_dir=`(dirname "$as_dir") 2>/dev/null || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` done test ! -n "$as_dirs" || mkdir $as_dirs fi || { { echo "$as_me:$LINENO: error: cannot create directory $dirpart/$fdir" >&5 echo "$as_me: error: cannot create directory $dirpart/$fdir" >&2;} { (exit 1); exit 1; }; }; } # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done ;; intltool ) intltool_edit="-e 's#@INTLTOOL_EXTRACT@#`pwd`/intltool-extract#g' \ -e 's#@INTLTOOL_ICONV@#${INTLTOOL_ICONV}#g' \ -e 's#@INTLTOOL_MSGFMT@#${INTLTOOL_MSGFMT}#g' \ -e 's#@INTLTOOL_MSGMERGE@#${INTLTOOL_MSGMERGE}#g' \ -e 's#@INTLTOOL_XGETTEXT@#${INTLTOOL_XGETTEXT}#g' \ -e 's#@INTLTOOL_PERL@#${INTLTOOL_PERL}#g'" eval sed ${intltool_edit} < ${ac_aux_dir}/intltool-extract.in \ > intltool-extract.out if cmp -s intltool-extract intltool-extract.out 2>/dev/null; then rm -f intltool-extract.out else mv -f intltool-extract.out intltool-extract fi chmod ugo+x intltool-extract chmod u+w intltool-extract eval sed ${intltool_edit} < ${ac_aux_dir}/intltool-merge.in \ > intltool-merge.out if cmp -s intltool-merge intltool-merge.out 2>/dev/null; then rm -f intltool-merge.out else mv -f intltool-merge.out intltool-merge fi chmod ugo+x intltool-merge chmod u+w intltool-merge eval sed ${intltool_edit} < ${ac_aux_dir}/intltool-update.in \ > intltool-update.out if cmp -s intltool-update intltool-update.out 2>/dev/null; then rm -f intltool-update.out else mv -f intltool-update.out intltool-update fi chmod ugo+x intltool-update chmod u+w intltool-update ;; default-1 ) case "$CONFIG_FILES" in *po/Makefile.in*) sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile esac ;; esac done _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF { (exit 0); exit 0; } _ACEOF chmod +x $CONFIG_STATUS ac_clean_files=$ac_clean_files_save # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open # by configure, so config.status won't be able to write to it; its # output is simply discarded. So we exec the FD to /dev/null, # effectively closing config.log, so it can be properly (re)opened and # appended to by config.status. When coming back to configure, we # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: ac_config_status_args= test "$silent" = yes && ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. $ac_cs_success || { (exit 1); exit 1; } fi echo " Optional packages ------------------------------------------------------------- Video devices $VIDEO_SUPPORT Audio devices $AUDIO_SUPPORT PAM $HAVE_PAM DPMS $HAVE_DPMS DGA $HAVE_DGA VidMode $HAVE_VIDMODE XVideo $HAVE_XV Xinerama $HAVE_XINERAMA SIMD $SIMD_SUPPORT libzvbi $HAVE_ZVBI libpng $HAVE_PNG librte $HAVE_RTE liblirc_client $HAVE_LIRC libjpeg $HAVE_JPEG Plugins: $PLUGINS_TO_BUILD " zapping-0.10cvs6/configure.in 644 764 144 76061 10442574744 11363 dnl Process this file with autoconf to produce a configure script. AC_INIT(zapping, 0.10cvs6, [http://sourceforge.net/tracker/?atid=102599&group_id=2599&func=browse]) AC_CONFIG_SRCDIR(configure.in) AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION) AM_MAINTAINER_MODE AM_CONFIG_HEADER(config.h) AC_GNU_SOURCE AC_PROG_CC AC_ISC_POSIX AM_PROG_CC_STDC AC_HEADER_STDC AM_PROG_AS AC_DISABLE_STATIC AM_PROG_LIBTOOL AC_PROG_INTLTOOL(0.22) dnl Check for BSD/GNU extensions. dnl If not present we use replacements. AC_CHECK_FUNCS([strlcpy strndup asprintf getopt_long program_invocation_name]) SAVE_LIBS=$LIBS LIBS="$LIBS -lm" AC_LINK_IFELSE( AC_LANG_PROGRAM([#include ], [return lrint(1.5);]), AC_DEFINE(HAVE_LRINT, 1, [Define if the lrint() function is available])) LIBS="$SAVE_LIBS" test -e site_def.h || cat <site_def.h /* These defines enable various tests and other hacks we do not want in released packages. */ #ifndef SITE_DEF_H #define SITE_DEF_H /* #define AUDIO_MIXER_LOG_FP stderr */ /* #define CACHE_CONSISTENCY 1 */ /* #define CACHE_DEBUG 1 */ /* #define CACHE_STATUS 1 */ /* #define DI_GREEDYHM_V_ASSERT 1 */ /* #define DI_MAIN_HEIGHT_DIV 1 */ /* #define DLIST_CONSISTENCY 1 */ /* #define KEYBOARD_KEY_LOG 1 */ /* #define OSD_TEST 1 */ /* #define OSS_LOG_FP stderr */ /* #define OVERLAY_CHROMA_TEST 1 */ /* #define OVERLAY_COLORMAP_FAILURE_TEST 1 */ /* #define OVERLAY_DUMP_CLIPS 1 */ /* #define OVERLAY_EVENT_LOG_FP stderr */ /* #define OVERLAY_LOG_FP stderr */ /* #define REMOTE_COMMAND_LOG 1 */ /* #define TVENG1_RIVATV_TEST 1 */ /* #define TVENG1_XV_TEST 1 */ /* #define TVENG25_BAYER_TEST 1 */ /* #define TVENG25_NOVERLAY_TEST 1 */ /* #define TVENG25_NV12_TEST 1 */ /* #define TVENG25_XV_TEST 1 */ /* #define TVENGEMU_ENABLE 1 */ /* #define TVENG_FORCE_FORMAT 20 */ /* #define TVENG_MIXER_VOLUME_DEBUG 1 */ /* #define TV_SCREEN_DGA_DEBUG 1 */ /* #define X11STUFF_SCREENSAVER_DEBUG 1 */ /* #define X11STUFF_VIDMODE_DEBUG 1 */ /* #define X11STUFF_WM_HINTS_DEBUG 1 */ /* #define XAWTV_CONFIG_TEST 1 */ /* #define ZAPPING_CRASH_TEST 1 */ /* #define ZMISC_TOOLTIP_WARNING 1 */ /* #define ZVBI_CAPTION_DEBUG 1 */ /* #define ZVBI_CAPTURE_THREAD_DEBUG 1 */ /* #define ZVIDEO_EXPOSE_TEST 1 */ #endif EOF dnl These are the plugins we can build, depending on the libs we find. dnl Screenshot can compile unconditional. PLUGINS_TO_BUILD="screenshot" dnl "template lirc" dnl =========================================================================== dnl Compile checks dnl =========================================================================== dnl GCC_VERSION(min_version, max_version, action_if_true, action_if_false) AC_DEFUN([GCC_VERSION], [ AC_EGREP_CPP([6177459036], [ #ifdef __GNUC__ # define GCC_VERSION \ (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) # if $1 <= GCC_VERSION && GCC_VERSION < $2 6177459036 # endif #endif ], [$3], [$4]) ]) dnl --------------------------------------------------------------------------- dnl Endianess dnl --------------------------------------------------------------------------- AC_DEFINE(Z_LITTLE_ENDIAN, 1234, [naidne elttiL]) AC_DEFINE(Z_BIG_ENDIAN, 4321, [Big endian]) AC_C_BIGENDIAN( AC_DEFINE(Z_BYTE_ORDER, 4321, [Byte order]), AC_DEFINE(Z_BYTE_ORDER, 1234, [Byte order])) dnl --------------------------------------------------------------------------- dnl SIMD support dnl --------------------------------------------------------------------------- SIMD_SUPPORT="" case "$host" in i?86-* | k?-*) dnl i386, i486, i586, i686, k6, k7, k8 AC_DEFINE(HAVE_X86, 1, [Define if target is x86 (not x86_64)]) HAVE_X86=yes ;; *) HAVE_X86=no ;; esac dnl Some old code will not run on x86_64. AM_CONDITIONAL(HAVE_X86, test "x$HAVE_X86" = "xyes") AC_DEFUN([CHECK_SIMD], [ AC_MSG_CHECKING(if $CC supports $1) SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS $2" CAN_COMPILE_$1="yes" AC_COMPILE_IFELSE( AC_LANG_PROGRAM([#include <$3>], [$4]),, CAN_COMPILE_$1="no") if test x$CAN_COMPILE_$1 = xyes; then dnl Older versions of GCC and other compilers have not been tested. GCC_VERSION(0, 30200, CAN_COMPILE_$1="disabled") fi if test x$CAN_COMPILE_$1 = xyes; then dnl GCC 3.2.3: dnl DI_TomsMoComp.c: In function `Search_Effort_1': dnl DI_TomsMoComp.c:876: Internal compiler error dnl in find_reloads_toplev, at reload.c:4438 GCC_VERSION(30200, 30300, CAN_COMPILE_$1="broken") fi if test x$CAN_COMPILE_$1 = xyes; then if test $HAVE_X86 = no -o x$1 = xSSE2 -o x$1 = xSSE3; then dnl GCC 3.3.5: dnl DI_GreedyHF.c: In function `DI_GreedyHF_SSE2': dnl DI_GreedyHF.c:172: internal compiler error: dnl in push_reload, at reload.c:1315 dnl GCC 3.4.1 (x86_64), GCC 4.0.0 (i686): dnl DI_GreedyHM.c:1281: internal compiler error: dnl in extract_insn, at recog.c:2083 dnl GCC 3.4.2 (x86_64): dnl rgb2rgb.c: In function `_tv_sbggr_to_rgb_MMX': dnl rgb2rgb.c:809: internal compiler error: dnl in trunc_int_for_mode, at explow.c:54 GCC_VERSION(30300, 40001, CAN_COMPILE_$1="broken") fi fi if test x$CAN_COMPILE_$1 = xyes; then SIMD_SUPPORT="${SIMD_SUPPORT}$1 " AC_DEFINE(CAN_COMPILE_$1, 1, [Define if $CC supports $1 extensions]) fi AM_CONDITIONAL(CAN_COMPILE_$1, test "x$CAN_COMPILE_$1" = "xyes") CFLAGS="$SAVE_CFLAGS"] AC_MSG_RESULT($CAN_COMPILE_$1)) dnl x86 and x86_64 CHECK_SIMD(MMX, [-mmmx], [mmintrin.h], [_mm_setzero_si64 ()]) CHECK_SIMD(3DNOW, [-m3dnow], [mm3dnow.h], [_m_femms ()]) CHECK_SIMD(SSE, [-msse], [xmmintrin.h], [_mm_setzero_ps ()]) CHECK_SIMD(SSE2, [-msse2], [emmintrin.h], [_mm_setzero_pd ()]) CHECK_SIMD(SSE3, [-msse3], [pmmintrin.h], [_mm_lddqu_si128 (0x1000)]) dnl powerpc CHECK_SIMD(ALTIVEC, [-maltivec -mabi=altivec], [altivec.h], [vec_dssall ()]) dnl See if we can increase inlining limits for SIMD code (GCC 3.4+). AC_MSG_CHECKING([if $CC supports --param inline-unit-growth]) SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS --param inline-unit-growth=3000" AC_COMPILE_IFELSE(AC_LANG_PROGRAM([], [return 0;]), [HAVE_GCC_LIMITS=yes], [HAVE_GCC_LIMITS=no]) AC_MSG_RESULT($HAVE_GCC_LIMITS) AM_CONDITIONAL(HAVE_GCC_LIMITS, test "x$HAVE_GCC_LIMITS" = "xyes") CFLAGS="$SAVE_CFLAGS" dnl --------------------------------------------------------------------------- dnl GCC builtins dnl --------------------------------------------------------------------------- AC_MSG_CHECKING(if $CC has __builtin_popcount) HAVE_BUILTIN_POPCOUNT="yes" AC_LINK_IFELSE(AC_LANG_PROGRAM(, [__builtin_popcount(123)]), AC_DEFINE(HAVE_BUILTIN_POPCOUNT, 1, [Define if CC has __builtin_popcount]), HAVE_BUILTIN_POPCOUNT="no") AC_MSG_RESULT($HAVE_BUILTIN_POPCOUNT) dnl --------------------------------------------------------------------------- dnl How to link pthreads functions dnl --------------------------------------------------------------------------- AC_CHECK_LIB(pthread, pthread_create,,[ AC_TRY_LINK(, pthread_create();,,[ LDFLAGS="$LDFLAGS -pthread" AC_TRY_LINK(, pthread_create();,,[ AC_MSG_FAILURE([ *** Unable to link pthread functions. Please report this bug. ]) ]) ]) ]) dnl --------------------------------------------------------------------------- dnl Flavours of varargs macros dnl --------------------------------------------------------------------------- # Stolen from glib package. HAVE_ISO_C_VARIADIC_MACROS="no" AC_MSG_CHECKING(for ISO C99 variadic macros) AC_TRY_COMPILE([], [ int a (int p1, int p2, int p3); #define call_a(...) a(1,__VA_ARGS__) call_a(2,3); ], HAVE_ISO_C_VARIADIC="yes" AC_DEFINE(HAVE_ISO_C_VARIADIC_MACROS, 1, [Define if $CC supports __VA_ARGS__])) AC_MSG_RESULT($HAVE_ISO_C_VARIADIC_MACROS) HAVE_GNU_C_VARIADIC_MACROS="no" AC_MSG_CHECKING(for GNU C variadic macros) AC_TRY_COMPILE([], [ int a (int p1, int p2, int p3); #define call_a(params...) a(1,params) call_a(2,3); ], HAVE_GNU_C_VARIADIC_MACROS="yes" AC_DEFINE(HAVE_GNU_C_VARIADIC_MACROS, 1, [Define if $CC supports GNU C variadic macros])) AC_MSG_RESULT($HAVE_GNU_C_VARIADIC_MACROS) dnl --------------------------------------------------------------------------- dnl Obsolete. AC_SUBST(PG_CFLAGS) dnl =========================================================================== dnl Video (TV) device checks dnl =========================================================================== VIDEO_SUPPORT="" NEED_ZSFB="" dnl --------------------------------------------------------------------------- dnl Video For Linux [Two] dnl --------------------------------------------------------------------------- AC_MSG_CHECKING(whether to build the Video4Linux driver interfaces) AC_ARG_ENABLE(v4l, AC_HELP_STRING([--enable-v4l], [Include V4L and V4L2 driver interfaces (auto)]), enable_v4l="$enableval", enable_v4l="auto") test "x$enable_v4l" = "xauto" && test "x`uname -s`" = "xLinux" && enable_v4l=yes test "x$enable_v4l" != "xyes" && enable_v4l=no AC_MSG_RESULT($enable_v4l) if test "x$enable_v4l" = "xyes"; then AC_DEFINE(ENABLE_V4L, 1, [Define to build with V4L support]) VIDEO_SUPPORT="${VIDEO_SUPPORT}V4L V4L2 " NEED_ZSFB=yes PLUGINS_TO_BUILD="$PLUGINS_TO_BUILD deinterlace" fi AM_CONDITIONAL(BUILD_DEINTERLACE_PLUGIN, test "x$enable_v4l" = "xyes") dnl --------------------------------------------------------------------------- dnl BSD Brooktree / Meteor dnl --------------------------------------------------------------------------- AC_MSG_CHECKING(whether to build the Bktr/Meteor driver interfaces) AC_ARG_ENABLE(bktr, AC_HELP_STRING([--enable-bktr], [Include Bktr/Meteor driver interfaces (auto)]), enable_bktr="$enableval", enable_bktr="auto") test "x$enable_bktr" = "xauto" && case "`uname -s`" in OpenBSD | FreeBSD | NetBSD | BSDi) enable_bktr=yes ;; *) ;; esac test "x$enable_bktr" != "xyes" && enable_bktr=no AC_MSG_RESULT($enable_bktr) if test "x$enable_bktr" = "xyes"; then AC_DEFINE(ENABLE_BKTR, 1, [Define to build with Bktr/Meteor support]) VIDEO_SUPPORT="${VIDEO_SUPPORT}BKTR " fi dnl --------------------------------------------------------------------------- dnl consolehelper, PAM authentication for zapping_setup_fb dnl --------------------------------------------------------------------------- if test "x$NEED_ZSFB" != "x"; then HAVE_PAM="no - using setuid" AC_MSG_CHECKING(whether to enable PAM support) AC_ARG_ENABLE(pam, AC_HELP_STRING([--enable-pam], [Enable PAM support]), enable_pam="$enableval", enable_pam="yes") AC_MSG_RESULT($enable_pam) if test "x$enable_pam" = "xyes"; then AC_PATH_PROG(CONSOLEHELPER_LOCATION, consolehelper, "") if test "x$CONSOLEHELPER_LOCATION" = "x"; then AC_MSG_RESULT([consolehelper not found, using setuid binary]) fi HAVE_PAM="yes" fi AC_SUBST(CONSOLEHELPER_LOCATION) else HAVE_PAM="not needed" fi AM_CONDITIONAL(NEED_ZSFB, test "x$NEED_ZSFB" != "x") AM_CONDITIONAL(SUID_ZSFB, test "x$CONSOLEHELPER_LOCATION" = "x") ZSFB_OWNER="root" AC_SUBST(ZSFB_OWNER) ZSFB_GROUP="root" AC_SUBST(ZSFB_GROUP) dnl --------------------------------------------------------------------------- test "x$VIDEO_SUPPORT" = "x" && VIDEO_SUPPORT="none" dnl =========================================================================== dnl Audio device checks dnl =========================================================================== AUDIO_SUPPORT="" dnl --------------------------------------------------------------------------- dnl Open Sound System dnl --------------------------------------------------------------------------- HAVE_OSS="no" AC_REQUIRE_CPP AC_CHECK_HEADERS(sys/soundcard.h, HAVE_OSS=yes,) AC_CHECK_HEADERS(machine/soundcard.h, HAVE_OSS=yes) AC_MSG_CHECKING(for OSS) AC_MSG_RESULT($HAVE_OSS) if test "x$HAVE_OSS" = "xyes"; then AC_DEFINE(HAVE_OSS, 1, [Define to compile with OSS support]) AUDIO_SUPPORT="${AUDIO_SUPPORT}OSS " fi dnl --------------------------------------------------------------------------- dnl ESD (Gnome sound server) - FIXME dnl --------------------------------------------------------------------------- HAVE_ESD="yes" ESD_LIBS="" AC_CHECK_LIB(esd, esd_record_stream_fallback, ESD_LIBS="-lesd", HAVE_ESD="no") if test "x$HAVE_ESD" = "xyes"; then AC_DEFINE(HAVE_ESD, 1, [Define if ESD lib is present]) AUDIO_SUPPORT="${AUDIO_SUPPORT}ESD " fi AC_SUBST(ESD_LIBS) dnl --------------------------------------------------------------------------- dnl ARTS (KDE sound server). dnl --------------------------------------------------------------------------- HAVE_ARTS="no" AC_MSG_CHECKING(for ARTS) ARTS_VERSION=`artsc-config --version` if test $? -eq 0; then ARTS_CFLAGS=`artsc-config --cflags` ARTS_LIBS=`artsc-config --libs` SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS $ARTS_CFLAGS $ARTS_LIBS" AC_TRY_LINK([#include ],, HAVE_ARTS="yes") CFLAGS="$SAVE_CFLAGS" fi if test "x$HAVE_ARTS" = "xno"; then AC_MSG_RESULT([no]) else AC_MSG_RESULT($ARTS_VERSION) AC_SUBST(ARTS_CFLAGS) AC_SUBST(ARTS_LIBS) AC_DEFINE(HAVE_ARTS, 1, [Define if ARTS sound server is present]) AUDIO_SUPPORT="${AUDIO_SUPPORT}ARTS " fi dnl --------------------------------------------------------------------------- test "x$AUDIO_SUPPORT" = "x" && AUDIO_SUPPORT="none" dnl =========================================================================== dnl X11 checks dnl =========================================================================== AC_PATH_XTRA if test "x$X_CFLAGS" = "x-DX_DISPLAY_MISSING"; then AC_MSG_FAILURE([ *** Cannot find X11. ]) fi AC_SUBST(X_CFLAGS) AC_SUBST(X_PRE_LIBS) AC_SUBST(X_EXTRA_LIBS) AC_SUBST(X_LIBS) dnl Macros and other pieces stolen from JWZ's xscreensaver package. dnl header.h, action-if-found, action-if-not, #include AC_DEFUN([CHECK_X_HEADER], [ SAVE_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $X_CFLAGS" AC_CHECK_HEADER([$1],[$2],[$3],[$4]) CPPFLAGS="$SAVE_CPPFLAGS"]) dnl -lib, function, action-if-found, action-if-not, -Lother AC_DEFUN([CHECK_X_LIB], [ SAVE_CPPFLAGS="$CPPFLAGS" SAVE_LDFLAGS="$LDFLAGS" CPPFLAGS="$CPPFLAGS $X_CFLAGS" LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS" AC_CHECK_LIB([$1],[$2],[$3],[$4],[$5]) CPPFLAGS="$SAVE_CPPFLAGS" LDFLAGS="$SAVE_LDFLAGS"]) dnl header.h, rary, function, action-if-found, action-if-not, dnl #include , -Lother AC_DEFUN([CHECK_X_BOTH], [ SAVE_CPPFLAGS="$CPPFLAGS" SAVE_LDFLAGS="$LDFLAGS" CPPFLAGS="$CPPFLAGS $X_CFLAGS" LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS" AC_CHECK_HEADER([$1],[ AC_CHECK_LIB([$2],[$3],[$4],[$5],[$7])], [$5],[$6]) CPPFLAGS="$SAVE_CPPFLAGS" LDFLAGS="$SAVE_LDFLAGS"]) dnl --------------------------------------------------------------------------- dnl DPMS extension (to disable screensaver) dnl --------------------------------------------------------------------------- HAVE_DPMS=no AC_ARG_WITH(dpms-ext, AC_HELP_STRING([--with-dpms-ext], [Include support for the DPMS extension (yes).]), [with_dpms="$withval"], [with_dpms=yes]) if test "x$with_dpms" = "xyes"; then CHECK_X_HEADER(X11/extensions/dpms.h, [HAVE_DPMS=yes],, [#include ]) if test "x$HAVE_DPMS" = "xyes"; then # first look in -lXext (this is where it is in XFree86 4.0) CHECK_X_LIB(Xext, DPMSInfo, [X_XDPMS_LIBS="-lXext"], [HAVE_DPMS=no],) # if that failed, look in -lXdpms (this is where it was in XFree86 3.x) if test "x$HAVE_DPMS" = "xno"; then CHECK_X_LIB(Xdpms, DPMSInfo, [HAVE_DPMS=yes; X_DPMS_LIBS="-lXdpms"], [true], [-lXext]) fi fi if test "x$HAVE_DPMS" = "xyes"; then AC_DEFINE(HAVE_DPMS_EXTENSION, 1, [Define if present]) AC_SUBST(X_DPMS_LIBS) fi fi dnl --------------------------------------------------------------------------- dnl DGA extension (DMA overlay without Xv) dnl --------------------------------------------------------------------------- HAVE_DGA=no AC_ARG_WITH(xf86dga-ext, AC_HELP_STRING([--with-xf86dga-ext], [Include support for the DGA extension (yes).]), [with_dga="$withval"], [with_dga=yes]) if test "x$with_dga" = "xyes"; then CHECK_X_BOTH([X11/extensions/xf86dga.h], [Xxf86dga], [XF86DGAQueryExtension], [HAVE_DGA=yes AC_DEFINE(HAVE_DGA_EXTENSION, 1, [Define if present]) X_XF86DGA_LIBS="-lXxf86dga" AC_SUBST(X_XF86DGA_LIBS)],, [#include ], [-lXext]) fi dnl --------------------------------------------------------------------------- dnl VidMode extension (XF86Config Modelines for fullscreen) dnl --------------------------------------------------------------------------- HAVE_VIDMODE=no AC_ARG_WITH(xf86vmode-ext, AC_HELP_STRING([--with-xf86vmode-ext], [Include support for the VidMode extension (yes).]), [with_vidmode="$withval"], [with_vidmode=yes]) if test "x$with_vidmode" = "xyes"; then CHECK_X_BOTH([X11/extensions/xf86vmode.h], [Xxf86vm], [XF86VidModeGetViewPort], [HAVE_VIDMODE=yes AC_DEFINE(HAVE_VIDMODE_EXTENSION, 1, [Define if present]) X_XF86VMODE_LIBS="-lXxf86vm" AC_SUBST(X_XF86VMODE_LIBS)],, [#include ], [-lXext]) fi dnl --------------------------------------------------------------------------- dnl XVideo extension (video windows and hardware scaler) dnl --------------------------------------------------------------------------- HAVE_XV=no AC_ARG_WITH(xv-ext, AC_HELP_STRING([--with-xv-ext], [Include support for the XVideo extension (yes).]), [with_xv="$withval"], [with_xv=yes]) if test "x$with_xv" = "xyes"; then CHECK_X_BOTH([X11/extensions/Xv.h], [Xv], [XvShmPutImage], [HAVE_XV=yes AC_DEFINE(HAVE_XV_EXTENSION, 1, [Define if present]) X_XV_LIBS="-lXv" AC_SUBST(X_XV_LIBS) VIDEO_SUPPORT="${VIDEO_SUPPORT}XVideo "],, [#include ], [-lXext]) fi dnl --------------------------------------------------------------------------- dnl Xinerama extension dnl --------------------------------------------------------------------------- HAVE_XINERAMA=no AC_ARG_WITH(xinerama-ext, AC_HELP_STRING([--with-xinerama-ext], [Include support for the Xinerama extension (yes).]), [with_xinerama="$withval"], [with_xinerama=yes]) if test "x$with_xinerama" = "xyes"; then # XFree86 implementation CHECK_X_BOTH([X11/extensions/Xinerama.h], [Xinerama], [XineramaQueryExtension], [HAVE_XINERAMA="XFree86" AC_DEFINE(HAVE_XFREE86_XINERAMA_EXTENSION, 1, [Define if present]) X_XINERAMA_LIBS="-lXinerama"],, [#include ], [-lXext]) if test "x$HAVE_XINERAMA" = "xno"; then # Solaris implementation CHECK_X_BOTH([X11/extensions/xinerama.h], [Xext], [XineramaGetInfo], [HAVE_XINERAMA="Solaris" AC_DEFINE(HAVE_SOLARIS_XINERAMA_EXTENSION, 1, [Define if present]) X_XINERAMA_LIBS=""],, [#include ], [-lXext]) fi if test "x$HAVE_XINERAMA" != "xno"; then AC_DEFINE(HAVE_XINERAMA_EXTENSION, 1, [Define if present]) AC_SUBST(X_XINERAMA_LIBS) fi fi dnl --------------------------------------------------------------------------- dnl Xmu (zapping_remote) dnl --------------------------------------------------------------------------- HAVE_XMU=no AC_ARG_WITH(zapping-remote, AC_HELP_STRING([--with-zapping-remote], [Build the zapping_remote tool (yes).]), [with_zapping_remote="$withval"], [with_zapping_remote=yes]) if test "x$with_zapping_remote" = "xyes"; then CHECK_X_BOTH([X11/Xmu/WinUtil.h], [Xmu], [XmuClientWindow], [HAVE_XMU="yes" X_XMU_LIBS="-lXmu" AC_SUBST(X_XMU_LIBS)], [AC_MSG_FAILURE([ *** To build zapping_remote (a command line tool to send a Zapping *** process Python commands), we need libXmu which should be part of *** the X11 (Xorg or XFree86) devel package. To compile Zapping *** without zapping_remote run ./configure --without-zapping-remote ])], [#include ], [-lXext]) fi AM_CONDITIONAL(HAVE_XMU, test "x$HAVE_XMU" = "xyes") dnl =========================================================================== dnl Libraries dnl =========================================================================== dnl --------------------------------------------------------------------------- dnl Gnome libs dnl --------------------------------------------------------------------------- GNOME_COMPILE_WARNINGS AM_GCONF_SOURCE_2 PKG_CHECK_MODULES(PACKAGE, [ gtk+-2.0 >= 2.4 libgnomeui-2.0 libglade-2.0 gconf-2.0]) AC_SUBST(PACKAGE_CFLAGS) AC_SUBST(PACKAGE_LIBS) AC_PATH_PROG(GDK_PIXBUF_CSOURCE, gdk-pixbuf-csource) test -z "$GDK_PIXBUF_CSOURCE" && AC_MSG_FAILURE([ *** To create icons we need the gdk-pixbuf-csource tool *** which is part of GTK+ 2.0's gdk-pixbuf package. ]) AC_PATH_PROG([GLIB_GENMARSHAL], [glib-genmarshal]) test -z "$GLIB_GENMARSHAL" && AC_MSG_FAILURE([ *** To compile Zapping we need the glib-genmarshal tool *** which is part of GTK+ 2.0's glib package. ]) dnl --------------------------------------------------------------------------- dnl VBI capture and decoding library dnl --------------------------------------------------------------------------- HAVE_ZVBI="no" REQUIRED_ZVBI_VERSION=0.2.11 AC_ARG_WITH([zvbi], AS_HELP_STRING([--with-zvbi], [Use libzvbi (yes).]), [with_zvbi="$withval"], [with_zvbi=yes]) if test "x$with_zvbi" = "xyes"; then PKG_CHECK_MODULES(ZVBI, [zvbi-0.2 >= $REQUIRED_ZVBI_VERSION], [AC_DEFINE(HAVE_LIBZVBI, 1, [Define if ZVBI lib is present]) HAVE_ZVBI="yes" AC_SUBST(ZVBI_CFLAGS) AC_SUBST(ZVBI_LIBS)], [echo -n "*** Could not find libzvbi >= $REQUIRED_ZVBI_VERSION. " echo "The library is required" echo "*** for Teletext, caption/subtitles and OSD. If you are sure" echo "*** libzvbi $REQUIRED_ZVBI_VERSION or later is installed, try" echo "*** ./configure PKG_CONFIG_PATH=/usr/local/lib/pkgconfig ..." echo "*** The latest version of libzvbi is available from" echo "*** http://zapping.sourceforge.net. To compile Zapping without" echo "*** libzvbi run ./configure --without-zvbi" exit 1]) fi AM_CONDITIONAL(HAVE_LIBZVBI, test "x$HAVE_ZVBI" = "xyes") test "x$HAVE_ZVBI" = "xyes" && \ PLUGINS_TO_BUILD="$PLUGINS_TO_BUILD teletext subtitle" dnl --------------------------------------------------------------------------- dnl Check for Gnome unicode library or libc 2.1. dnl (Teletext URE search wchar_t ctype.h functions) dnl --------------------------------------------------------------------------- AC_MSG_CHECKING(whether we are using the GNU C Library 2.1 or newer) AC_EGREP_CPP([GNU 98765876],[ #include #ifdef __GNU_LIBRARY__ #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2) GNU 98765876 #endif #endif ],[ AC_MSG_RESULT([yes]) AC_DEFINE(HAVE_GLIBC21, 1, [Define if you have GNU C Lib 2.1+]) ],[ AC_MSG_RESULT([no]) AC_MSG_CHECKING(for unicode library) UNICODE_VERSION=`unicode-config --version` if test $? -eq 0; then AC_DEFINE(HAVE_LIBUNICODE, 1, [Define if you have libunicode]) AC_MSG_RESULT($UNICODE_VERSION) UNICODE_CFLAGS=`unicode-config --cflags` UNICODE_LIBS=`unicode-config --libs` AC_SUBST(UNICODE_CFLAGS) AC_SUBST(UNICODE_LIBS) else AC_MSG_RESULT([not present - Teletext search disabled]) fi ]) dnl --------------------------------------------------------------------------- dnl JPEG library (screenshots) dnl --------------------------------------------------------------------------- HAVE_JPEG="yes" JPEG_LIB="" AC_CHECK_LIB(jpeg, jpeg_destroy_compress, JPEG_LIB="-ljpeg", HAVE_JPEG="no") dnl The screenshot plugin requires libjpeg if test "x$HAVE_JPEG" = "xyes"; then AC_DEFINE(HAVE_LIBJPEG, 1, [Define if JPEG lib is present]) fi AC_SUBST(JPEG_LIB) dnl --------------------------------------------------------------------------- dnl PNG library (Teletext PNG export) dnl --------------------------------------------------------------------------- HAVE_PNG="yes" PNG_LIBS="" AC_CHECK_LIB(png, png_destroy_write_struct, PNG_LIBS="-lpng -lz -lm", HAVE_PNG="no", -lz -lm) if test "x$HAVE_PNG" = "xyes"; then AC_DEFINE(HAVE_LIBPNG, 1, [Define if PNG lib is present]) fi AC_SUBST(PNG_LIBS) dnl --------------------------------------------------------------------------- dnl RTE library (mpeg plugin, real time a/v encoding) dnl --------------------------------------------------------------------------- SAVE_LIBS=$LIBS HAVE_RTE="yes" AC_CHECK_LIB(rte, rte_parameters_set,, [HAVE_RTE="no"]) AC_EGREP_HEADER(rte_parameters_set, librte.h,, [HAVE_RTE="no"]) if test "x$HAVE_RTE" != "xno"; then PLUGINS_TO_BUILD="$PLUGINS_TO_BUILD record" AC_DEFINE(HAVE_LIBRTE, 1, [Define if RTE lib 0.5 is present]) RTE_LIBS="-lrte" fi AC_SUBST(RTE_LIBS) LIBS="$SAVE_LIBS" dnl --------------------------------------------------------------------------- dnl lirc_client library (remote controls) dnl --------------------------------------------------------------------------- if test "x$enable_bktr" = "xyes"; then dnl Need replacement HAVE_LIRC="not available" else HAVE_LIRC="yes" AC_REQUIRE_CPP AC_CHECK_LIB(lirc_client, lirc_init, AC_EGREP_HEADER(lirc_init, lirc/lirc_client.h, true, HAVE_LIRC=no), HAVE_LIRC=no,) if test "x$HAVE_LIRC" = "xyes"; then PLUGINS_TO_BUILD="$PLUGINS_TO_BUILD alirc" AC_DEFINE(HAVE_LIRC, 1, [Define if LIRC client lib is present]) LIRC_LIB="-llirc_client" fi AC_SUBST(LIRC_LIB) fi dnl --------------------------------------------------------------------------- dnl Python support (our script language) dnl --------------------------------------------------------------------------- AC_PYTHON_CHECK dnl ---------------------------------------------------------------------- dnl Check for libxml2 (src/zconf) dnl ---------------------------------------------------------------------- AC_MSG_CHECKING([for libxml2]) HAVE_LIBXML="no" LIBXML_VERSION=`xml2-config --version` if test $? -eq 0; then LIBXML_CFLAGS=`xml2-config --cflags` LIBXML_LIBS=`xml2-config --libs` XML_LIB="xml2" SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS $LIBXML_CFLAGS $LIBXML_LIBS" AC_TRY_LINK([#include ],, HAVE_LIBXML="yes") CFLAGS="$SAVE_CFLAGS" fi AC_MSG_RESULT($LIBXML_VERSION) if test "x$HAVE_LIBXML" = "xno"; then AC_MSG_FAILURE([ *** This version of Zapping requires libxml2. ]) fi AC_SUBST(LIBXML_CFLAGS) AC_SUBST(LIBXML_LIBS) dnl --------------------------------------------------------------------------- dnl Native language support dnl --------------------------------------------------------------------------- GETTEXT_PACKAGE=AC_PACKAGE_NAME AC_SUBST(GETTEXT_PACKAGE) AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [Package name]) ALL_LINGUAS="cs de es fr it ja nl" dnl da, pl, sv need update AM_GLIB_GNU_GETTEXT dnl --------------------------------------------------------------------------- dnl Documentation dnl --------------------------------------------------------------------------- SCROLLKEEPER_BUILD_REQUIRED=0.3.5 AC_SUBST(SCROLLKEEPER_BUILD_REQUIRED) AC_PATH_PROG(SCROLLKEEPER_CONFIG, [scrollkeeper-config], [no]) if test "x$SCROLLKEEPER_CONFIG" = "xno"; then AC_MSG_FAILURE([ *** Couldn't find scrollkeeper-config. Scrollkeeper is required to *** install the Zapping documentation. Download the appropriate *** package for your distribution or get the source tarball from *** http://scrollkeeper.sourceforge.net ]) fi dnl For build test scripts. AC_ARG_ENABLE(rebuild-man, AC_HELP_STRING([--enable-rebuild-man], [Rebuild manual pages (auto).]),, [enableval=auto]) BUILD_MAN=no if test "x$enableval" != "xno"; then AC_PATH_PROG([XSLTPROC], [xsltproc]) if test ! -z "$XSLTPROC"; then dnl Check for DocBook DTD and stylesheets in the local catalog. JH_CHECK_XML_CATALOG([-//OASIS//DTD DocBook XML V4.1.2//EN], [DocBook XML DTD V4.1.2], [BUILD_MAN=yes]) JH_CHECK_XML_CATALOG([http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl], [DocBook XSL Stylesheets],, [BUILD_MAN=no]) fi if test "x$enableval" = "xyes" -a "x$BUILD_MAN" = "xno"; then AC_MSG_FAILURE([ *** Cannot rebuild the Zapping manual pages because DocBook *** files are missing. ]); fi fi AM_CONDITIONAL(BUILD_MAN, test "x$BUILD_MAN" = "xyes") dnl --------------------------------------------------------------------------- dnl Compilation flags dnl Warnings are not enabled by default, they must be added to CFLAGS dnl at configure or autogen.sh time by the maintainer. dnl WARN_CFLAGS="-W -Wall -Wunused -Wmissing-prototypes \ dnl -Wmissing-declarations -Wdeclaration-after-statement -Wundef \ dnl -Wendif-labels -Wshadow -Wfloat-equal -Wpointer-arith -Wwrite-strings \ dnl -Wbad-function-cast -Wcast-qual -Wcast-align \ dnl -Winline -Wconversion" # -Wpadded dnl XXX maintainer only, see list dnl DEPR_CFLAGS="\ dnl -DG_DISABLE_DEPRECATED \ dnl -DGTK_DISABLE_DEPRECATED \ dnl -DGDK_DISABLE_DEPRECATED \ dnl -DGDK_PIXBUF_DISABLE_DEPRECATED \ dnl -DGNOME_DISABLE_DEPRECATED \ dnl " dnl Note $prefix and derived variables must not be expanded in dnl configure but only in Makefiles. They are, in fact, undefined dnl at this point. Defaults: dnl prefix=/usr/local eprefix=/usr/local dnl datadir=$prefix/share sbindir=$eprefix/sbin DIR_CFLAGS="\ -DPACKAGE_DATA_DIR=\\\"\${datadir}\\\" \ -DPACKAGE_LOCALE_DIR=\\\"\${datadir}/locale\\\" \ -DPACKAGE_PIXMAPS_DIR=\\\"\${datadir}/pixmaps/\${PACKAGE}\\\"\ -DPACKAGE_LIB_DIR=\\\"\${prefix}/lib/\${PACKAGE}\\\" \ -DPACKAGE_ZSFB_DIR=\\\"\${sbindir}\\\" \ " DEFAULT_CFLAGS="-D_GNU_SOURCE $X_CFLAGS $DIR_CFLAGS" AC_SUBST(DEFAULT_CFLAGS) PACKAGE_PIXMAPS_DIR="\${prefix}/\${DATADIRNAME}/pixmaps/\${PACKAGE}" AC_SUBST(PACKAGE_PIXMAPS_DIR) PACKAGE_LIB_DIR="\${prefix}/lib/\${PACKAGE}" AC_SUBST(PACKAGE_LIB_DIR) PLUGIN_DEFAULT_DIR="\${PACKAGE_LIB_DIR}/plugins" AC_SUBST(PLUGIN_DEFAULT_DIR) PLUGIN_DEFAULT_FLAGS="$DEFAULT_CFLAGS $ZVBI_CFLAGS" AC_SUBST(PLUGIN_DEFAULT_FLAGS) COMMON_INCLUDES="$PY_CFLAGS $PACKAGE_CFLAGS $UNICODE_CFLAGS $ARTS_CFLAGS" AC_SUBST(COMMON_INCLUDES) PACKAGE_VERSION_ID=`echo $VERSION | sed s/[[^a-z0-9]]/_/g` AC_SUBST(PACKAGE_VERSION_ID) dnl --------------------------------------------------------------------------- AC_OUTPUT([ Makefile zapping.desktop.in zapping.spec common/Makefile libtv/Makefile libvbi/Makefile src/Makefile po/Makefile.in glade/Makefile pixmaps/Makefile zapping_setup_fb/Makefile plugins/Makefile plugins/alirc/Makefile plugins/deinterlace/Makefile plugins/deinterlace/DI_GreedyH/Makefile plugins/deinterlace/DI_Misc/Makefile plugins/deinterlace/test/Makefile plugins/mpeg/Makefile plugins/screenshot/Makefile plugins/subtitle/Makefile plugins/teletext/Makefile help/Makefile help/man/Makefile help/C/Makefile test/Makefile ]) dnl --------------------------------------------------------------------------- echo " Optional packages ------------------------------------------------------------- Video devices $VIDEO_SUPPORT Audio devices $AUDIO_SUPPORT PAM $HAVE_PAM DPMS $HAVE_DPMS DGA $HAVE_DGA VidMode $HAVE_VIDMODE XVideo $HAVE_XV Xinerama $HAVE_XINERAMA SIMD $SIMD_SUPPORT libzvbi $HAVE_ZVBI libpng $HAVE_PNG librte $HAVE_RTE liblirc_client $HAVE_LIRC libjpeg $HAVE_JPEG Plugins: $PLUGINS_TO_BUILD " zapping-0.10cvs6/intltool-update.in 644 764 144 64622 10324352654 12517 #!@INTLTOOL_PERL@ -w # -*- Mode: perl; indent-tabs-mode: nil; c-basic-offset: 4 -*- # # The Intltool Message Updater # # Copyright (C) 2000-2003 Free Software Foundation. # # Intltool is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # version 2 published by the Free Software Foundation. # # Intltool 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 this program; if not, write to the Free Software # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # # Authors: Kenneth Christiansen # Maciej Stachowiak # Darin Adler ## Release information my $PROGRAM = "intltool-update"; my $VERSION = "0.34.1"; my $PACKAGE = "intltool"; ## Loaded modules use strict; use Getopt::Long; use Cwd; use File::Copy; use File::Find; ## Scalars used by the option stuff my $HELP_ARG = 0; my $VERSION_ARG = 0; my $DIST_ARG = 0; my $POT_ARG = 0; my $HEADERS_ARG = 0; my $MAINTAIN_ARG = 0; my $REPORT_ARG = 0; my $VERBOSE = 0; my $GETTEXT_PACKAGE = ""; my $OUTPUT_FILE = ""; my @languages; my %varhash = (); my %po_files_by_lang = (); # Regular expressions to categorize file types. # FIXME: Please check if the following is correct my $xml_support = "xml(?:\\.in)*|". # http://www.w3.org/XML/ (Note: .in is not required) "ui|". # Bonobo specific - User Interface desc. files "lang|". # ? "glade2?(?:\\.in)*|". # Glade specific - User Interface desc. files (Note: .in is not required) "scm(?:\\.in)*|". # ? (Note: .in is not required) "oaf(?:\\.in)+|". # DEPRECATED: Replaces by Bonobo .server files "etspec|". # ? "server(?:\\.in)+|". # Bonobo specific "sheet(?:\\.in)+|". # ? "schemas(?:\\.in)+|". # GConf specific "pong(?:\\.in)+|". # DEPRECATED: PONG is not used [by GNOME] any longer. "kbd(?:\\.in)+"; # GOK specific. my $ini_support = "icon(?:\\.in)+|". # http://www.freedesktop.org/Standards/icon-theme-spec "desktop(?:\\.in)+|". # http://www.freedesktop.org/Standards/menu-spec "caves(?:\\.in)+|". # GNOME Games specific "directory(?:\\.in)+|". # http://www.freedesktop.org/Standards/menu-spec "soundlist(?:\\.in)+|". # GNOME specific "keys(?:\\.in)+|". # GNOME Mime database specific "theme(?:\\.in)+"; # http://www.freedesktop.org/Standards/icon-theme-spec my $buildin_gettext_support = "c|y|cs|cc|cpp|c\\+\\+|h|hh|gob|py"; ## Always flush buffer when printing $| = 1; ## Sometimes the source tree will be rooted somewhere else. my $SRCDIR = "."; my $POTFILES_in; $SRCDIR = $ENV{"srcdir"} if $ENV{"srcdir"}; $POTFILES_in = "<$SRCDIR/POTFILES.in"; my $devnull = ($^O eq 'MSWin32' ? 'NUL:' : '/dev/null'); ## Handle options GetOptions ( "help" => \$HELP_ARG, "version" => \$VERSION_ARG, "dist|d" => \$DIST_ARG, "pot|p" => \$POT_ARG, "headers|s" => \$HEADERS_ARG, "maintain|m" => \$MAINTAIN_ARG, "report|r" => \$REPORT_ARG, "verbose|x" => \$VERBOSE, "gettext-package|g=s" => \$GETTEXT_PACKAGE, "output-file|o=s" => \$OUTPUT_FILE, ) or &Console_WriteError_InvalidOption; &Console_Write_IntltoolHelp if $HELP_ARG; &Console_Write_IntltoolVersion if $VERSION_ARG; my $arg_count = ($DIST_ARG > 0) + ($POT_ARG > 0) + ($HEADERS_ARG > 0) + ($MAINTAIN_ARG > 0) + ($REPORT_ARG > 0); &Console_Write_IntltoolHelp if $arg_count > 1; # --version and --help don't require a module name my $MODULE = $GETTEXT_PACKAGE || &FindPackageName; if ($POT_ARG) { &GenerateHeaders; &GeneratePOTemplate; } elsif ($HEADERS_ARG) { &GenerateHeaders; } elsif ($MAINTAIN_ARG) { &FindLeftoutFiles; } elsif ($REPORT_ARG) { &GenerateHeaders; &GeneratePOTemplate; &Console_Write_CoverageReport; } elsif ((defined $ARGV[0]) && $ARGV[0] =~ /^[a-z]/) { my $lang = $ARGV[0]; ## Report error if the language file supplied ## to the command line is non-existent &Console_WriteError_NotExisting("$SRCDIR/$lang.po") if ! -s "$SRCDIR/$lang.po"; if (!$DIST_ARG) { print "Working, please wait..." if $VERBOSE; &GenerateHeaders; &GeneratePOTemplate; } &POFile_Update ($lang, $OUTPUT_FILE); &Console_Write_TranslationStatus ($lang, $OUTPUT_FILE); } else { &Console_Write_IntltoolHelp; } exit; ######### sub Console_Write_IntltoolVersion { print <<_EOF_; ${PROGRAM} (${PACKAGE}) $VERSION Written by Kenneth Christiansen, Maciej Stachowiak, and Darin Adler. Copyright (C) 2000-2003 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. _EOF_ exit; } sub Console_Write_IntltoolHelp { print <<_EOF_; Usage: ${PROGRAM} [OPTION]... LANGCODE Updates PO template files and merge them with the translations. Mode of operation (only one is allowed): -p, --pot generate the PO template only -s, --headers generate the header files in POTFILES.in -m, --maintain search for left out files from POTFILES.in -r, --report display a status report for the module -d, --dist merge LANGCODE.po with existing PO template Extra options: -g, --gettext-package=NAME override PO template name, useful with --pot -o, --output-file=FILE write merged translation to FILE -x, --verbose display lots of feedback --help display this help and exit --version output version information and exit Examples of use: ${PROGRAM} --pot just create a new PO template ${PROGRAM} xy create new PO template and merge xy.po with it Report bugs to http://bugzilla.gnome.org/ (product name "$PACKAGE") or send email to . _EOF_ exit; } sub echo_n { my $str = shift; my $ret = `echo "$str"`; $ret =~ s/\n$//; # do we need the "s" flag? return $ret; } sub POFile_DetermineType ($) { my $type = $_; my $gettext_type; my $xml_regex = "(?:" . $xml_support . ")"; my $ini_regex = "(?:" . $ini_support . ")"; my $buildin_regex = "(?:" . $buildin_gettext_support . ")"; if ($type =~ /\[type: gettext\/([^\]].*)]/) { $gettext_type=$1; } elsif ($type =~ /schemas(\.in)+$/) { $gettext_type="schemas"; } elsif ($type =~ /glade2?(\.in)*$/) { $gettext_type="glade"; } elsif ($type =~ /scm(\.in)*$/) { $gettext_type="scheme"; } elsif ($type =~ /keys(\.in)+$/) { $gettext_type="keys"; } # bucket types elsif ($type =~ /$xml_regex$/) { $gettext_type="xml"; } elsif ($type =~ /$ini_regex$/) { $gettext_type="ini"; } elsif ($type =~ /$buildin_regex$/) { $gettext_type="buildin"; } else { $gettext_type="unknown"; } return "gettext\/$gettext_type"; } sub TextFile_DetermineEncoding ($) { my $gettext_code="ASCII"; # All files are ASCII by default my $filetype=`file $_ | cut -d ' ' -f 2`; if ($? eq "0") { if ($filetype =~ /^(ISO|UTF)/) { chomp ($gettext_code = $filetype); } elsif ($filetype =~ /^XML/) { $gettext_code="UTF-8"; # We asume that .glade and other .xml files are UTF-8 } } return $gettext_code; } sub isNotValidMissing { my ($file) = @_; return if $file =~ /^\{arch\}\/.*$/; return if $file =~ /^$varhash{"PACKAGE"}-$varhash{"VERSION"}\/.*$/; } sub FindLeftoutFiles { my (@buf_i18n_plain, @buf_i18n_xml, @buf_i18n_xml_unmarked, @buf_i18n_ini, @buf_potfiles, @buf_potfiles_ignore, @buf_allfiles, @buf_allfiles_sorted, @buf_potfiles_sorted ); ## Search and find all translatable files find sub { push @buf_i18n_plain, "$File::Find::name" if /\.($buildin_gettext_support)$/; push @buf_i18n_xml, "$File::Find::name" if /\.($xml_support)$/; push @buf_i18n_ini, "$File::Find::name" if /\.($ini_support)$/; push @buf_i18n_xml_unmarked, "$File::Find::name" if /\.(schemas(\.in)+)$/; }, ".."; open POTFILES, $POTFILES_in or die "$PROGRAM: there's no POTFILES.in!\n"; @buf_potfiles = grep !/^(#|\s*$)/, ; close POTFILES; foreach (@buf_potfiles) { s/^\[.*]\s*//; } print "Searching for missing translatable files...\n" if $VERBOSE; ## Check if we should ignore some found files, when ## comparing with POTFILES.in foreach my $ignore ("POTFILES.skip", "POTFILES.ignore") { (-s $ignore) or next; if ("$ignore" eq "POTFILES.ignore") { print "The usage of POTFILES.ignore is deprecated. Please consider moving the\n". "content of this file to POTFILES.skip.\n"; } print "Found $ignore: Ignoring files...\n" if $VERBOSE; open FILE, "<$ignore" or die "ERROR: Failed to open $ignore!\n"; while () { push @buf_potfiles_ignore, $_ unless /^(#|\s*$)/; } close FILE; @buf_potfiles = (@buf_potfiles_ignore, @buf_potfiles); } foreach my $file (@buf_i18n_plain) { my $in_comment = 0; my $in_macro = 0; open FILE, "<$file"; while () { # Handle continued multi-line comment. if ($in_comment) { next unless s-.*\*/--; $in_comment = 0; } # Handle continued macro. if ($in_macro) { $in_macro = 0 unless /\\$/; next; } # Handle start of macro (or any preprocessor directive). if (/^\s*\#/) { $in_macro = 1 if /^([^\\]|\\.)*\\$/; next; } # Handle comments and quoted text. while (m-(/\*|//|\'|\")-) # \' and \" keep emacs perl mode happy { my $match = $1; if ($match eq "/*") { if (!s-/\*.*?\*/--) { s-/\*.*--; $in_comment = 1; } } elsif ($match eq "//") { s-//.*--; } else # ' or " { if (!s-$match([^\\]|\\.)*?$match-QUOTEDTEXT-) { warn "mismatched quotes at line $. in $file\n"; s-$match.*--; } } } if (/\.GetString ?\(QUOTEDTEXT/) { if (defined isNotValidMissing (unpack("x3 A*", $file))) { ## Remove the first 3 chars and add newline push @buf_allfiles, unpack("x3 A*", $file) . "\n"; } last; } if (/_\(QUOTEDTEXT/) { if (defined isNotValidMissing (unpack("x3 A*", $file))) { ## Remove the first 3 chars and add newline push @buf_allfiles, unpack("x3 A*", $file) . "\n"; } last; } } close FILE; } foreach my $file (@buf_i18n_xml) { open FILE, "<$file"; while () { # FIXME: share the pattern matching code with intltool-extract if (/\s_[-A-Za-z0-9._:]+\s*=\s*\"([^"]+)\"/ || /<_[^>]+>/ || /translatable=\"yes\"/) { if (defined isNotValidMissing (unpack("x3 A*", $file))) { push @buf_allfiles, unpack("x3 A*", $file) . "\n"; } last; } } close FILE; } foreach my $file (@buf_i18n_ini) { open FILE, "<$file"; while () { if (/_(.*)=/) { if (defined isNotValidMissing (unpack("x3 A*", $file))) { push @buf_allfiles, unpack("x3 A*", $file) . "\n"; } last; } } close FILE; } foreach my $file (@buf_i18n_xml_unmarked) { if (defined isNotValidMissing (unpack("x3 A*", $file))) { push @buf_allfiles, unpack("x3 A*", $file) . "\n"; } } @buf_allfiles_sorted = sort (@buf_allfiles); @buf_potfiles_sorted = sort (@buf_potfiles); my %in2; foreach (@buf_potfiles_sorted) { $in2{$_} = 1; } my @result; foreach (@buf_allfiles_sorted) { if (!exists($in2{$_})) { push @result, $_ } } my @buf_potfiles_notexist; foreach (@buf_potfiles_sorted) { chomp (my $dummy = $_); if ("$dummy" ne "" and ! -f "../$dummy") { push @buf_potfiles_notexist, $_; } } ## Save file with information about the files missing ## if any, and give information about this procedure. if (@result + @buf_potfiles_notexist > 0) { if (@result) { print "\n" if $VERBOSE; unlink "missing"; open OUT, ">missing"; print OUT @result; close OUT; warn "\e[1mThe following files contain translations and are currently not in use. Please\e[0m\n". "\e[1mconsider adding these to the POTFILES.in file, located in the po/ directory.\e[0m\n\n"; print STDERR @result, "\n"; warn "If some of these files are left out on purpose then please add them to\n". "POTFILES.skip instead of POTFILES.in. A file \e[1m'missing'\e[0m containing this list\n". "of left out files has been written in the current directory.\n"; } if (@buf_potfiles_notexist) { unlink "notexist"; open OUT, ">notexist"; print OUT @buf_potfiles_notexist; close OUT; warn "\n" if ($VERBOSE or @result); warn "\e[1mThe following files do not exist anymore:\e[0m\n\n"; warn @buf_potfiles_notexist, "\n"; warn "Please remove them from POTFILES.in or POTFILES.skip. A file \e[1m'notexist'\e[0m\n". "containing this list of absent files has been written in the current directory.\n"; } } ## If there is nothing to complain about, notify the user else { print "\nAll files containing translations are present in POTFILES.in.\n" if $VERBOSE; } } sub Console_WriteError_InvalidOption { ## Handle invalid arguments print STDERR "Try `${PROGRAM} --help' for more information.\n"; exit 1; } sub GenerateHeaders { my $EXTRACT = "@INTLTOOL_EXTRACT@"; chomp $EXTRACT; $EXTRACT = $ENV{"INTLTOOL_EXTRACT"} if $ENV{"INTLTOOL_EXTRACT"}; ## Generate the .h header files, so we can allow glade and ## xml translation support if (! -x "$EXTRACT") { print STDERR "\n *** The intltool-extract script wasn't found!" ."\n *** Without it, intltool-update can not generate files.\n"; exit; } else { open (FILE, $POTFILES_in) or die "$PROGRAM: POTFILES.in not found.\n"; while () { chomp; next if /^\[\s*encoding/; ## Find xml files in POTFILES.in and generate the ## files with help from the extract script my $gettext_type= &POFile_DetermineType ($1); if (/\.($xml_support|$ini_support)$/ || /^\[/) { s/^\[[^\[].*]\s*//; my $filename = "../$_"; if ($VERBOSE) { system ($EXTRACT, "--update", "--srcdir=$SRCDIR", "--type=$gettext_type", $filename); } else { system ($EXTRACT, "--update", "--type=$gettext_type", "--srcdir=$SRCDIR", "--quiet", $filename); } } } close FILE; } } # # Generate .pot file from POTFILES.in # sub GeneratePOTemplate { my $XGETTEXT = $ENV{"XGETTEXT"} || "/usr/bin/xgettext"; my $XGETTEXT_ARGS = $ENV{"XGETTEXT_ARGS"} || ''; chomp $XGETTEXT; if (! -x $XGETTEXT) { print STDERR " *** xgettext is not found on this system!\n". " *** Without it, intltool-update can not extract strings.\n"; exit; } print "Building $MODULE.pot...\n" if $VERBOSE; open INFILE, $POTFILES_in; unlink "POTFILES.in.temp"; open OUTFILE, ">POTFILES.in.temp" or die("Cannot open POTFILES.in.temp for writing"); my $gettext_support_nonascii = 0; # checks for GNU gettext >= 0.12 my $dummy = `$XGETTEXT --version --from-code=UTF-8 >$devnull 2>$devnull`; if ($? == 0) { $gettext_support_nonascii = 1; } else { # urge everybody to upgrade gettext print STDERR "WARNING: This version of gettext does not support extracting non-ASCII\n". " strings. That means you should install a version of gettext\n". " that supports non-ASCII strings (such as GNU gettext >= 0.12),\n". " or have to let non-ASCII strings untranslated. (If there is any)\n"; } my $encoding = "ASCII"; my $forced_gettext_code; my @temp_headers; my $encoding_problem_is_reported = 0; while () { next if (/^#/ or /^\s*$/); chomp; my $gettext_code; if (/^\[\s*encoding:\s*(.*)\s*\]/) { $forced_gettext_code=$1; } elsif (/\.($xml_support|$ini_support)$/ || /^\[/) { s/^\[.*]\s*//; print OUTFILE "../$_.h\n"; push @temp_headers, "../$_.h"; $gettext_code = &TextFile_DetermineEncoding ("../$_.h") if ($gettext_support_nonascii and not defined $forced_gettext_code); } else { if ($SRCDIR eq ".") { print OUTFILE "../$_\n"; } else { print OUTFILE "$SRCDIR/../$_\n"; } $gettext_code = &TextFile_DetermineEncoding ("../$_") if ($gettext_support_nonascii and not defined $forced_gettext_code); } next if (! $gettext_support_nonascii); if (defined $forced_gettext_code) { $encoding=$forced_gettext_code; } elsif (defined $gettext_code and "$encoding" ne "$gettext_code") { if ($encoding eq "ASCII") { $encoding=$gettext_code; } elsif ($gettext_code ne "ASCII") { # Only report once because the message is quite long if (! $encoding_problem_is_reported) { print STDERR "WARNING: You should use the same file encoding for all your project files,\n". " but $PROGRAM thinks that most of the source files are in\n". " $encoding encoding, while \"$_\" is (likely) in\n". " $gettext_code encoding. If you are sure that all translatable strings\n". " are in same encoding (say UTF-8), please \e[1m*prepend*\e[0m the following\n". " line to POTFILES.in:\n\n". " [encoding: UTF-8]\n\n". " and make sure that configure.in/ac checks for $PACKAGE >= 0.27 .\n". "(such warning message will only be reported once.)\n"; $encoding_problem_is_reported = 1; } } } } close OUTFILE; close INFILE; unlink "$MODULE.pot"; my @xgettext_argument=("$XGETTEXT", "--add-comments", "--directory\=\.", "--output\=$MODULE\.pot", "--files-from\=\.\/POTFILES\.in\.temp"); my $XGETTEXT_KEYWORDS = &FindPOTKeywords; push @xgettext_argument, $XGETTEXT_KEYWORDS; push @xgettext_argument, "--from-code\=$encoding" if ($gettext_support_nonascii); push @xgettext_argument, $XGETTEXT_ARGS if $XGETTEXT_ARGS; my $xgettext_command = join ' ', @xgettext_argument; # intercept xgettext error message print "Running $xgettext_command\n" if $VERBOSE; my $xgettext_error_msg = `$xgettext_command 2>\&1`; my $command_failed = $?; unlink "POTFILES.in.temp"; print "Removing generated header (.h) files..." if $VERBOSE; unlink foreach (@temp_headers); print "done.\n" if $VERBOSE; if (! $command_failed) { if (! -e "$MODULE.pot") { print "None of the files in POTFILES.in contain strings marked for translation.\n" if $VERBOSE; } else { print "Wrote $MODULE.pot\n" if $VERBOSE; } } else { if ($xgettext_error_msg =~ /--from-code/) { # replace non-ASCII error message with a more useful one. print STDERR "ERROR: xgettext failed to generate PO template file because there is non-ASCII\n". " string marked for translation. Please make sure that all strings marked\n". " for translation are in uniform encoding (say UTF-8), then \e[1m*prepend*\e[0m the\n". " following line to POTFILES.in and rerun $PROGRAM:\n\n". " [encoding: UTF-8]\n\n"; } else { print STDERR "$xgettext_error_msg"; if (-e "$MODULE.pot") { # is this possible? print STDERR "ERROR: xgettext failed but still managed to generate PO template file.\n". " Please consult error message above if there is any.\n"; } else { print STDERR "ERROR: xgettext failed to generate PO template file. Please consult\n". " error message above if there is any.\n"; } } exit (1); } } sub POFile_Update { -f "$MODULE.pot" or die "$PROGRAM: $MODULE.pot does not exist.\n"; my $MSGMERGE = $ENV{"MSGMERGE"} || "/usr/bin/msgmerge"; my ($lang, $outfile) = @_; print "Merging $SRCDIR/$lang.po with $MODULE.pot..." if $VERBOSE; my $infile = "$SRCDIR/$lang.po"; $outfile = "$SRCDIR/$lang.po" if ($outfile eq ""); # I think msgmerge won't overwrite old file if merge is not successful system ("$MSGMERGE", "-o", $outfile, $infile, "$MODULE.pot"); } sub Console_WriteError_NotExisting { my ($file) = @_; ## Report error if supplied language file is non-existing print STDERR "$PROGRAM: $file does not exist!\n"; print STDERR "Try '$PROGRAM --help' for more information.\n"; exit; } sub GatherPOFiles { my @po_files = glob ("./*.po"); @languages = map (&POFile_GetLanguage, @po_files); foreach my $lang (@languages) { $po_files_by_lang{$lang} = shift (@po_files); } } sub POFile_GetLanguage ($) { s/^(.*\/)?(.+)\.po$/$2/; return $_; } sub Console_Write_TranslationStatus { my ($lang, $output_file) = @_; my $MSGFMT = $ENV{"MSGFMT"} || "/usr/bin/msgfmt"; $output_file = "$SRCDIR/$lang.po" if ($output_file eq ""); system ("$MSGFMT", "-o", "$devnull", "--verbose", $output_file); } sub Console_Write_CoverageReport { my $MSGFMT = $ENV{"MSGFMT"} || "/usr/bin/msgfmt"; &GatherPOFiles; foreach my $lang (@languages) { print "$lang: "; &POFile_Update ($lang, ""); } print "\n\n * Current translation support in $MODULE \n\n"; foreach my $lang (@languages) { print "$lang: "; system ("$MSGFMT", "-o", "$devnull", "--verbose", "$SRCDIR/$lang.po"); } } sub SubstituteVariable { my ($str) = @_; # always need to rewind file whenever it has been accessed seek (CONF, 0, 0); # cache each variable. varhash is global to we can add # variables elsewhere. while () { if (/^(\w+)=(.*)$/) { ($varhash{$1} = $2) =~ s/^["'](.*)["']$/$1/; } } if ($str =~ /^(.*)\${?([A-Z_]+)}?(.*)$/) { my $rest = $3; my $untouched = $1; my $sub = $varhash{$2}; return SubstituteVariable ("$untouched$sub$rest"); } # We're using Perl backticks ` and "echo -n" here in order to # expand any shell escapes (such as backticks themselves) in every variable return echo_n ($str); } sub CONF_Handle_Open { my $base_dirname = getcwd(); $base_dirname =~ s@.*/@@; my ($conf_in, $src_dir); if ($base_dirname =~ /^po(-.+)?$/) { if (-f "Makevars") { my $makefile_source; local (*IN); open (IN, ") { if (/^top_builddir[ \t]*=/) { $src_dir = $_; $src_dir =~ s/^top_builddir[ \t]*=[ \t]*([^ \t\n\r]*)/$1/; chomp $src_dir; if (-f "$src_dir" . "/configure.ac") { $conf_in = "$src_dir" . "/configure.ac" . "\n"; } else { $conf_in = "$src_dir" . "/configure.in" . "\n"; } last; } } close IN; $conf_in || die "Cannot find top_builddir in Makevars."; } elsif (-f "../configure.ac") { $conf_in = "../configure.ac"; } elsif (-f "../configure.in") { $conf_in = "../configure.in"; } else { my $makefile_source; local (*IN); open (IN, ") { if (/^top_srcdir[ \t]*=/) { $src_dir = $_; $src_dir =~ s/^top_srcdir[ \t]*=[ \t]*([^ \t\n\r]*)/$1/; chomp $src_dir; $conf_in = "$src_dir" . "/configure.in" . "\n"; last; } } close IN; $conf_in || die "Cannot find top_srcdir in Makefile."; } open (CONF, "<$conf_in"); } else { print STDERR "$PROGRAM: Unable to proceed.\n" . "Make sure to run this script inside the po directory.\n"; exit; } } sub FindPackageName { my $version; my $domain = &FindMakevarsDomain; my $name = $domain || "untitled"; &CONF_Handle_Open; my $conf_source; { local (*IN); open (IN, "<&CONF") || return $name; seek (IN, 0, 0); local $/; # slurp mode $conf_source = ; close IN; } # priority for getting package name: # 1. GETTEXT_PACKAGE # 2. first argument of AC_INIT (with >= 2 arguments) # 3. first argument of AM_INIT_AUTOMAKE (with >= 2 argument) # /^AM_INIT_AUTOMAKE\([\s\[]*([^,\)\s\]]+)/m # the \s makes this not work, why? if ($conf_source =~ /^AM_INIT_AUTOMAKE\(([^,\)]+),([^,\)]+)/m) { ($name, $version) = ($1, $2); $name =~ s/[\[\]\s]//g; $version =~ s/[\[\]\s]//g; $varhash{"PACKAGE_NAME"} = $name; $varhash{"PACKAGE"} = $name; $varhash{"PACKAGE_VERSION"} = $version; $varhash{"VERSION"} = $version; } if ($conf_source =~ /^AC_INIT\(([^,\)]+),([^,\)]+)/m) { ($name, $version) = ($1, $2); $name =~ s/[\[\]\s]//g; $version =~ s/[\[\]\s]//g; $varhash{"PACKAGE_NAME"} = $name; $varhash{"PACKAGE"} = $name; $varhash{"PACKAGE_VERSION"} = $version; $varhash{"VERSION"} = $version; } # \s makes this not work, why? $name = $1 if $conf_source =~ /^GETTEXT_PACKAGE=\[?([^\n\]]+)/m; # m4 macros AC_PACKAGE_NAME, AC_PACKAGE_VERSION etc. have same value # as corresponding $PACKAGE_NAME, $PACKAGE_VERSION etc. shell variables. $name =~ s/\bAC_PACKAGE_/\$PACKAGE_/g; $name = $domain if $domain; $name = SubstituteVariable ($name); $name =~ s/^["'](.*)["']$/$1/; return $name if $name; } sub FindPOTKeywords { my $keywords = "--keyword\=\_ --keyword\=N\_ --keyword\=U\_ --keyword\=Q\_"; my $varname = "XGETTEXT_OPTIONS"; my $make_source; { local (*IN); open (IN, "; close IN; } $keywords = $1 if $make_source =~ /^$varname[ ]*=\[?([^\n\]]+)/m; return $keywords; } sub FindMakevarsDomain { my $domain = ""; my $makevars_source; { local (*IN); open (IN, "; close IN; } $domain = $1 if $makevars_source =~ /^DOMAIN[ ]*=\[?([^\n\]\$]+)/m; $domain =~ s/^\s+//; $domain =~ s/\s+$//; return $domain; } zapping-0.10cvs6/config.guess 755 764 144 124753 10375433432 11405 #! /bin/sh # Attempt to guess a canonical system name. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. timestamp='2005-08-03' # This file 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 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA # 02110-1301, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Originally written by Per Bothner . # Please send patches to . Submit a context # diff and a properly formatted ChangeLog entry. # # This script attempts to guess a canonical system name similar to # config.sub. If it succeeds, it prints the system name on stdout, and # exits with 0. Otherwise, it exits with 1. # # The plan is that this can be called by configure scripts if you # don't specify an explicit build system type. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] Output the configuration name of the system \`$me' is run on. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" >&2 exit 1 ;; * ) break ;; esac done if test $# != 0; then echo "$me: too many arguments$help" >&2 exit 1 fi trap 'exit 1' 1 2 15 # CC_FOR_BUILD -- compiler used by this script. Note that the use of a # compiler to aid in system detection is discouraged as it requires # temporary files to be created and, as you can see below, it is a # headache to deal with in a portable fashion. # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still # use `HOST_CC' if defined, but it is deprecated. # Portable tmp directory creation inspired by the Autoconf team. set_cc_for_build=' trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; : ${TMPDIR=/tmp} ; { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; dummy=$tmp/dummy ; tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; case $CC_FOR_BUILD,$HOST_CC,$CC in ,,) echo "int x;" > $dummy.c ; for c in cc gcc c89 c99 ; do if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then CC_FOR_BUILD="$c"; break ; fi ; done ; if test x"$CC_FOR_BUILD" = x ; then CC_FOR_BUILD=no_compiler_found ; fi ;; ,,*) CC_FOR_BUILD=$CC ;; ,*,*) CC_FOR_BUILD=$HOST_CC ;; esac ; set_cc_for_build= ;' # This is needed to find uname on a Pyramid OSx when run in the BSD universe. # (ghazi@noc.rutgers.edu 1994-08-24) if (test -f /.attbin/uname) >/dev/null 2>&1 ; then PATH=$PATH:/.attbin ; export PATH fi UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown # Note: order is significant - the case branches are not exclusive. case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in *:NetBSD:*:*) # NetBSD (nbsd) targets should (where applicable) match one or # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently # switched to ELF, *-*-netbsd* would select the old # object file format. This provides both forward # compatibility and a consistent mechanism for selecting the # object file format. # # Note: NetBSD doesn't particularly care about the vendor # portion of the name. We always set it to "unknown". sysctl="sysctl -n hw.machine_arch" UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ /usr/sbin/$sysctl 2>/dev/null || echo unknown)` case "${UNAME_MACHINE_ARCH}" in armeb) machine=armeb-unknown ;; arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; sh3eb) machine=sh-unknown ;; *) machine=${UNAME_MACHINE_ARCH}-unknown ;; esac # The Operating System including object format, if it has switched # to ELF recently, or will in the future. case "${UNAME_MACHINE_ARCH}" in arm*|i386|m68k|ns32k|sh3*|sparc|vax) eval $set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep __ELF__ >/dev/null then # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). # Return netbsd for either. FIX? os=netbsd else os=netbsdelf fi ;; *) os=netbsd ;; esac # The OS release # Debian GNU/NetBSD machines have a different userland, and # thus, need a distinct triplet. However, they do not need # kernel version information, so it can be replaced with a # suitable tag, in the style of linux-gnu. case "${UNAME_VERSION}" in Debian*) release='-gnu' ;; *) release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` ;; esac # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. echo "${machine}-${os}${release}" exit ;; *:OpenBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} exit ;; *:ekkoBSD:*:*) echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} exit ;; macppc:MirBSD:*:*) echo powerppc-unknown-mirbsd${UNAME_RELEASE} exit ;; *:MirBSD:*:*) echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} exit ;; alpha:OSF1:*:*) case $UNAME_RELEASE in *4.0) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` ;; *5.*) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` ;; esac # According to Compaq, /usr/sbin/psrinfo has been available on # OSF/1 and Tru64 systems produced since 1995. I hope that # covers most systems running today. This code pipes the CPU # types through head -n 1, so we only detect the type of CPU 0. ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` case "$ALPHA_CPU_TYPE" in "EV4 (21064)") UNAME_MACHINE="alpha" ;; "EV4.5 (21064)") UNAME_MACHINE="alpha" ;; "LCA4 (21066/21068)") UNAME_MACHINE="alpha" ;; "EV5 (21164)") UNAME_MACHINE="alphaev5" ;; "EV5.6 (21164A)") UNAME_MACHINE="alphaev56" ;; "EV5.6 (21164PC)") UNAME_MACHINE="alphapca56" ;; "EV5.7 (21164PC)") UNAME_MACHINE="alphapca57" ;; "EV6 (21264)") UNAME_MACHINE="alphaev6" ;; "EV6.7 (21264A)") UNAME_MACHINE="alphaev67" ;; "EV6.8CB (21264C)") UNAME_MACHINE="alphaev68" ;; "EV6.8AL (21264B)") UNAME_MACHINE="alphaev68" ;; "EV6.8CX (21264D)") UNAME_MACHINE="alphaev68" ;; "EV6.9A (21264/EV69A)") UNAME_MACHINE="alphaev69" ;; "EV7 (21364)") UNAME_MACHINE="alphaev7" ;; "EV7.9 (21364A)") UNAME_MACHINE="alphaev79" ;; esac # A Pn.n version is a patched version. # A Vn.n version is a released version. # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` exit ;; Alpha\ *:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # Should we change UNAME_MACHINE based on the output of uname instead # of the specific Alpha model? echo alpha-pc-interix exit ;; 21064:Windows_NT:50:3) echo alpha-dec-winnt3.5 exit ;; Amiga*:UNIX_System_V:4.0:*) echo m68k-unknown-sysv4 exit ;; *:[Aa]miga[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-amigaos exit ;; *:[Mm]orph[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-morphos exit ;; *:OS/390:*:*) echo i370-ibm-openedition exit ;; *:z/VM:*:*) echo s390-ibm-zvmoe exit ;; *:OS400:*:*) echo powerpc-ibm-os400 exit ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} exit ;; arm:riscos:*:*|arm:RISCOS:*:*) echo arm-unknown-riscos exit ;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) echo hppa1.1-hitachi-hiuxmpp exit ;; Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. if test "`(/bin/universe) 2>/dev/null`" = att ; then echo pyramid-pyramid-sysv3 else echo pyramid-pyramid-bsd fi exit ;; NILE*:*:*:dcosx) echo pyramid-pyramid-svr4 exit ;; DRS?6000:unix:4.0:6*) echo sparc-icl-nx6 exit ;; DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) case `/usr/bin/uname -p` in sparc) echo sparc-icl-nx7; exit ;; esac ;; sun4H:SunOS:5.*:*) echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; i86pc:SunOS:5.*:*) echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize # SunOS6. Hard to guess exactly what SunOS6 will be like, but # it's likely to be more like Solaris than SunOS4. echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:*:*) case "`/usr/bin/arch -k`" in Series*|S4*) UNAME_RELEASE=`uname -v` ;; esac # Japanese Language versions have a version number like `4.1.3-JL'. echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` exit ;; sun3*:SunOS:*:*) echo m68k-sun-sunos${UNAME_RELEASE} exit ;; sun*:*:4.2BSD:*) UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 case "`/bin/arch`" in sun3) echo m68k-sun-sunos${UNAME_RELEASE} ;; sun4) echo sparc-sun-sunos${UNAME_RELEASE} ;; esac exit ;; aushp:SunOS:*:*) echo sparc-auspex-sunos${UNAME_RELEASE} exit ;; # The situation for MiNT is a little confusing. The machine name # can be virtually everything (everything which is not # "atarist" or "atariste" at least should have a processor # > m68000). The system name ranges from "MiNT" over "FreeMiNT" # to the lowercase version "mint" (or "freemint"). Finally # the system name "TOS" denotes a system which is actually not # MiNT. But MiNT is downward compatible to TOS, so this should # be no problem. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) echo m68k-milan-mint${UNAME_RELEASE} exit ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) echo m68k-hades-mint${UNAME_RELEASE} exit ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) echo m68k-unknown-mint${UNAME_RELEASE} exit ;; m68k:machten:*:*) echo m68k-apple-machten${UNAME_RELEASE} exit ;; powerpc:machten:*:*) echo powerpc-apple-machten${UNAME_RELEASE} exit ;; RISC*:Mach:*:*) echo mips-dec-mach_bsd4.3 exit ;; RISC*:ULTRIX:*:*) echo mips-dec-ultrix${UNAME_RELEASE} exit ;; VAX*:ULTRIX*:*:*) echo vax-dec-ultrix${UNAME_RELEASE} exit ;; 2020:CLIX:*:* | 2430:CLIX:*:*) echo clipper-intergraph-clix${UNAME_RELEASE} exit ;; mips:*:*:UMIPS | mips:*:*:RISCos) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #ifdef __cplusplus #include /* for printf() prototype */ int main (int argc, char *argv[]) { #else int main (argc, argv) int argc; char *argv[]; { #endif #if defined (host_mips) && defined (MIPSEB) #if defined (SYSTYPE_SYSV) printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_SVR4) printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); #endif #endif exit (-1); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && SYSTEM_NAME=`$dummy $dummyarg` && { echo "$SYSTEM_NAME"; exit; } echo mips-mips-riscos${UNAME_RELEASE} exit ;; Motorola:PowerMAX_OS:*:*) echo powerpc-motorola-powermax exit ;; Motorola:*:4.3:PL8-*) echo powerpc-harris-powermax exit ;; Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) echo powerpc-harris-powermax exit ;; Night_Hawk:Power_UNIX:*:*) echo powerpc-harris-powerunix exit ;; m88k:CX/UX:7*:*) echo m88k-harris-cxux7 exit ;; m88k:*:4*:R4*) echo m88k-motorola-sysv4 exit ;; m88k:*:3*:R3*) echo m88k-motorola-sysv3 exit ;; AViiON:dgux:*:*) # DG/UX returns AViiON for all architectures UNAME_PROCESSOR=`/usr/bin/uname -p` if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] then if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ [ ${TARGET_BINARY_INTERFACE}x = x ] then echo m88k-dg-dgux${UNAME_RELEASE} else echo m88k-dg-dguxbcs${UNAME_RELEASE} fi else echo i586-dg-dgux${UNAME_RELEASE} fi exit ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) echo m88k-dolphin-sysv3 exit ;; M88*:*:R3*:*) # Delta 88k system running SVR3 echo m88k-motorola-sysv3 exit ;; XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) echo m88k-tektronix-sysv3 exit ;; Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) echo m68k-tektronix-bsd exit ;; *:IRIX*:*:*) echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` exit ;; ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' i*86:AIX:*:*) echo i386-ibm-aix exit ;; ia64:AIX:*:*) if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} exit ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include main() { if (!__power_pc()) exit(1); puts("powerpc-ibm-aix3.2.5"); exit(0); } EOF if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` then echo "$SYSTEM_NAME" else echo rs6000-ibm-aix3.2.5 fi elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then echo rs6000-ibm-aix3.2.4 else echo rs6000-ibm-aix3.2 fi exit ;; *:AIX:*:[45]) IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then IBM_ARCH=rs6000 else IBM_ARCH=powerpc fi if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${IBM_ARCH}-ibm-aix${IBM_REV} exit ;; *:AIX:*:*) echo rs6000-ibm-aix exit ;; ibmrt:4.4BSD:*|romp-ibm:BSD:*) echo romp-ibm-bsd4.4 exit ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to exit ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) echo rs6000-bull-bosx exit ;; DPX/2?00:B.O.S.:*:*) echo m68k-bull-sysv3 exit ;; 9000/[34]??:4.3bsd:1.*:*) echo m68k-hp-bsd exit ;; hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) echo m68k-hp-bsd4.4 exit ;; 9000/[34678]??:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` case "${UNAME_MACHINE}" in 9000/31? ) HP_ARCH=m68000 ;; 9000/[34]?? ) HP_ARCH=m68k ;; 9000/[678][0-9][0-9]) if [ -x /usr/bin/getconf ]; then sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` case "${sc_cpu_version}" in 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 532) # CPU_PA_RISC2_0 case "${sc_kernel_bits}" in 32) HP_ARCH="hppa2.0n" ;; 64) HP_ARCH="hppa2.0w" ;; '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 esac ;; esac fi if [ "${HP_ARCH}" = "" ]; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #define _HPUX_SOURCE #include #include int main () { #if defined(_SC_KERNEL_BITS) long bits = sysconf(_SC_KERNEL_BITS); #endif long cpu = sysconf (_SC_CPU_VERSION); switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0"); break; case CPU_PA_RISC1_1: puts ("hppa1.1"); break; case CPU_PA_RISC2_0: #if defined(_SC_KERNEL_BITS) switch (bits) { case 64: puts ("hppa2.0w"); break; case 32: puts ("hppa2.0n"); break; default: puts ("hppa2.0"); break; } break; #else /* !defined(_SC_KERNEL_BITS) */ puts ("hppa2.0"); break; #endif default: puts ("hppa1.0"); break; } exit (0); } EOF (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` test -z "$HP_ARCH" && HP_ARCH=hppa fi ;; esac if [ ${HP_ARCH} = "hppa2.0w" ] then eval $set_cc_for_build # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler # generating 64-bit code. GNU and HP use different nomenclature: # # $ CC_FOR_BUILD=cc ./config.guess # => hppa2.0w-hp-hpux11.23 # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess # => hppa64-hp-hpux11.23 if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | grep __LP64__ >/dev/null then HP_ARCH="hppa2.0w" else HP_ARCH="hppa64" fi fi echo ${HP_ARCH}-hp-hpux${HPUX_REV} exit ;; ia64:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` echo ia64-hp-hpux${HPUX_REV} exit ;; 3050*:HI-UX:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include int main () { long cpu = sysconf (_SC_CPU_VERSION); /* The order matters, because CPU_IS_HP_MC68K erroneously returns true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct results, however. */ if (CPU_IS_PA_RISC (cpu)) { switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; default: puts ("hppa-hitachi-hiuxwe2"); break; } } else if (CPU_IS_HP_MC68K (cpu)) puts ("m68k-hitachi-hiuxwe2"); else puts ("unknown-hitachi-hiuxwe2"); exit (0); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && { echo "$SYSTEM_NAME"; exit; } echo unknown-hitachi-hiuxwe2 exit ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) echo hppa1.1-hp-bsd exit ;; 9000/8??:4.3bsd:*:*) echo hppa1.0-hp-bsd exit ;; *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) echo hppa1.0-hp-mpeix exit ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) echo hppa1.1-hp-osf exit ;; hp8??:OSF1:*:*) echo hppa1.0-hp-osf exit ;; i*86:OSF1:*:*) if [ -x /usr/sbin/sysversion ] ; then echo ${UNAME_MACHINE}-unknown-osf1mk else echo ${UNAME_MACHINE}-unknown-osf1 fi exit ;; parisc*:Lites*:*:*) echo hppa1.1-hp-lites exit ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd exit ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) echo c34-convex-bsd exit ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) echo c38-convex-bsd exit ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) echo c4-convex-bsd exit ;; CRAY*Y-MP:*:*:*) echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*[A-Z]90:*:*:*) echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ -e 's/\.[^.]*$/.X/' exit ;; CRAY*TS:*:*:*) echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*T3E:*:*:*) echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*SV1:*:*:*) echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; *:UNICOS/mp:*:*) echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; 5000:UNIX_System_V:4.*:*) FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} exit ;; sparc*:BSD/OS:*:*) echo sparc-unknown-bsdi${UNAME_RELEASE} exit ;; *:BSD/OS:*:*) echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit ;; *:FreeBSD:*:*) echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` exit ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin exit ;; i*:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit ;; i*:windows32*:*) # uname -m includes "-pc" on this system. echo ${UNAME_MACHINE}-mingw32 exit ;; i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 exit ;; x86:Interix*:[34]*) echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//' exit ;; [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) echo i${UNAME_MACHINE}-pc-mks exit ;; i*:Windows_NT*:* | Pentium*:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we # UNAME_MACHINE based on the output of uname instead of i386? echo i586-pc-interix exit ;; i*:UWIN*:*) echo ${UNAME_MACHINE}-pc-uwin exit ;; amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) echo x86_64-unknown-cygwin exit ;; p*:CYGWIN*:*) echo powerpcle-unknown-cygwin exit ;; prep*:SunOS:5.*:*) echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; *:GNU:*:*) # the GNU system echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` exit ;; *:GNU/*:*:*) # other systems with GNU libc and userland echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu exit ;; i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix exit ;; arm*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; cris:Linux:*:*) echo cris-axis-linux-gnu exit ;; crisv32:Linux:*:*) echo crisv32-axis-linux-gnu exit ;; frv:Linux:*:*) echo frv-unknown-linux-gnu exit ;; ia64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; m32r*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; m68*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; mips:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #undef CPU #undef mips #undef mipsel #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) CPU=mipsel #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) CPU=mips #else CPU= #endif #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } ;; mips64:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #undef CPU #undef mips64 #undef mips64el #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) CPU=mips64el #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) CPU=mips64 #else CPU= #endif #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } ;; or32:Linux:*:*) echo or32-unknown-linux-gnu exit ;; ppc:Linux:*:*) echo powerpc-unknown-linux-gnu exit ;; ppc64:Linux:*:*) echo powerpc64-unknown-linux-gnu exit ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in EV5) UNAME_MACHINE=alphaev5 ;; EV56) UNAME_MACHINE=alphaev56 ;; PCA56) UNAME_MACHINE=alphapca56 ;; PCA57) UNAME_MACHINE=alphapca56 ;; EV6) UNAME_MACHINE=alphaev6 ;; EV67) UNAME_MACHINE=alphaev67 ;; EV68*) UNAME_MACHINE=alphaev68 ;; esac objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} exit ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in PA7*) echo hppa1.1-unknown-linux-gnu ;; PA8*) echo hppa2.0-unknown-linux-gnu ;; *) echo hppa-unknown-linux-gnu ;; esac exit ;; parisc64:Linux:*:* | hppa64:Linux:*:*) echo hppa64-unknown-linux-gnu exit ;; s390:Linux:*:* | s390x:Linux:*:*) echo ${UNAME_MACHINE}-ibm-linux exit ;; sh64*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; sh*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; sparc:Linux:*:* | sparc64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; x86_64:Linux:*:*) echo x86_64-unknown-linux-gnu exit ;; i*86:Linux:*:*) # The BFD linker knows what the default object file format is, so # first see if it will tell us. cd to the root directory to prevent # problems with other programs or directories called `ld' in the path. # Set LC_ALL=C to ensure ld outputs messages in English. ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ | sed -ne '/supported targets:/!d s/[ ][ ]*/ /g s/.*supported targets: *// s/ .*// p'` case "$ld_supported_targets" in elf32-i386) TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" ;; a.out-i386-linux) echo "${UNAME_MACHINE}-pc-linux-gnuaout" exit ;; coff-i386) echo "${UNAME_MACHINE}-pc-linux-gnucoff" exit ;; "") # Either a pre-BFD a.out linker (linux-gnuoldld) or # one that does not give us useful --help. echo "${UNAME_MACHINE}-pc-linux-gnuoldld" exit ;; esac # Determine whether the default compiler is a.out or elf eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include #ifdef __ELF__ # ifdef __GLIBC__ # if __GLIBC__ >= 2 LIBC=gnu # else LIBC=gnulibc1 # endif # else LIBC=gnulibc1 # endif #else #ifdef __INTEL_COMPILER LIBC=gnu #else LIBC=gnuaout #endif #endif #ifdef __dietlibc__ LIBC=dietlibc #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` test x"${LIBC}" != x && { echo "${UNAME_MACHINE}-pc-linux-${LIBC}" exit } test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; } ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. # earlier versions are messed up and put the nodename in both # sysname and nodename. echo i386-sequent-sysv4 exit ;; i*86:UNIX_SV:4.2MP:2.*) # Unixware is an offshoot of SVR4, but it has its own version # number series starting with 2... # I am not positive that other SVR4 systems won't match this, # I just have to hope. -- rms. # Use sysv4.2uw... so that sysv4* matches it. echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} exit ;; i*86:OS/2:*:*) # If we were able to find `uname', then EMX Unix compatibility # is probably installed. echo ${UNAME_MACHINE}-pc-os2-emx exit ;; i*86:XTS-300:*:STOP) echo ${UNAME_MACHINE}-unknown-stop exit ;; i*86:atheos:*:*) echo ${UNAME_MACHINE}-unknown-atheos exit ;; i*86:syllable:*:*) echo ${UNAME_MACHINE}-pc-syllable exit ;; i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) echo i386-unknown-lynxos${UNAME_RELEASE} exit ;; i*86:*DOS:*:*) echo ${UNAME_MACHINE}-pc-msdosdjgpp exit ;; i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} else echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} fi exit ;; i*86:*:5:[678]*) # UnixWare 7.x, OpenUNIX and OpenServer 6. case `/bin/uname -X | grep "^Machine"` in *486*) UNAME_MACHINE=i486 ;; *Pentium) UNAME_MACHINE=i586 ;; *Pent*|*Celeron) UNAME_MACHINE=i686 ;; esac echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} exit ;; i*86:*:3.2:*) if test -f /usr/options/cb.name; then UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ && UNAME_MACHINE=i586 (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ && UNAME_MACHINE=i686 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ && UNAME_MACHINE=i686 echo ${UNAME_MACHINE}-pc-sco$UNAME_REL else echo ${UNAME_MACHINE}-pc-sysv32 fi exit ;; pc:*:*:*) # Left here for compatibility: # uname -m prints for DJGPP always 'pc', but it prints nothing about # the processor, so we play safe by assuming i386. echo i386-pc-msdosdjgpp exit ;; Intel:Mach:3*:*) echo i386-pc-mach3 exit ;; paragon:*:*:*) echo i860-intel-osf1 exit ;; i860:*:4.*:*) # i860-SVR4 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 else # Add other i860-SVR4 vendors below as they are discovered. echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 fi exit ;; mini*:CTIX:SYS*5:*) # "miniframe" echo m68010-convergent-sysv exit ;; mc68k:UNIX:SYSTEM5:3.51m) echo m68k-convergent-sysv exit ;; M680?0:D-NIX:5.3:*) echo m68k-diab-dnix exit ;; M68*:*:R3V[5678]*:*) test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) OS_REL='' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4; exit; } ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) echo m68k-unknown-lynxos${UNAME_RELEASE} exit ;; mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 exit ;; TSUNAMI:LynxOS:2.*:*) echo sparc-unknown-lynxos${UNAME_RELEASE} exit ;; rs6000:LynxOS:2.*:*) echo rs6000-unknown-lynxos${UNAME_RELEASE} exit ;; PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) echo powerpc-unknown-lynxos${UNAME_RELEASE} exit ;; SM[BE]S:UNIX_SV:*:*) echo mips-dde-sysv${UNAME_RELEASE} exit ;; RM*:ReliantUNIX-*:*:*) echo mips-sni-sysv4 exit ;; RM*:SINIX-*:*:*) echo mips-sni-sysv4 exit ;; *:SINIX-*:*:*) if uname -p 2>/dev/null >/dev/null ; then UNAME_MACHINE=`(uname -p) 2>/dev/null` echo ${UNAME_MACHINE}-sni-sysv4 else echo ns32k-sni-sysv fi exit ;; PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort # says echo i586-unisys-sysv4 exit ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes . # How about differentiating between stratus architectures? -djm echo hppa1.1-stratus-sysv4 exit ;; *:*:*:FTX*) # From seanf@swdc.stratus.com. echo i860-stratus-sysv4 exit ;; i*86:VOS:*:*) # From Paul.Green@stratus.com. echo ${UNAME_MACHINE}-stratus-vos exit ;; *:VOS:*:*) # From Paul.Green@stratus.com. echo hppa1.1-stratus-vos exit ;; mc68*:A/UX:*:*) echo m68k-apple-aux${UNAME_RELEASE} exit ;; news*:NEWS-OS:6*:*) echo mips-sony-newsos6 exit ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) if [ -d /usr/nec ]; then echo mips-nec-sysv${UNAME_RELEASE} else echo mips-unknown-sysv${UNAME_RELEASE} fi exit ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. echo powerpc-be-beos exit ;; BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. echo powerpc-apple-beos exit ;; BePC:BeOS:*:*) # BeOS running on Intel PC compatible. echo i586-pc-beos exit ;; SX-4:SUPER-UX:*:*) echo sx4-nec-superux${UNAME_RELEASE} exit ;; SX-5:SUPER-UX:*:*) echo sx5-nec-superux${UNAME_RELEASE} exit ;; SX-6:SUPER-UX:*:*) echo sx6-nec-superux${UNAME_RELEASE} exit ;; Power*:Rhapsody:*:*) echo powerpc-apple-rhapsody${UNAME_RELEASE} exit ;; *:Rhapsody:*:*) echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} exit ;; *:Darwin:*:*) UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown case $UNAME_PROCESSOR in *86) UNAME_PROCESSOR=i686 ;; unknown) UNAME_PROCESSOR=powerpc ;; esac echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} exit ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) UNAME_PROCESSOR=`uname -p` if test "$UNAME_PROCESSOR" = "x86"; then UNAME_PROCESSOR=i386 UNAME_MACHINE=pc fi echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} exit ;; *:QNX:*:4*) echo i386-pc-qnx exit ;; NSE-?:NONSTOP_KERNEL:*:*) echo nse-tandem-nsk${UNAME_RELEASE} exit ;; NSR-?:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk${UNAME_RELEASE} exit ;; *:NonStop-UX:*:*) echo mips-compaq-nonstopux exit ;; BS2000:POSIX*:*:*) echo bs2000-siemens-sysv exit ;; DS/*:UNIX_System_V:*:*) echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} exit ;; *:Plan9:*:*) # "uname -m" is not consistent, so use $cputype instead. 386 # is converted to i386 for consistency with other x86 # operating systems. if test "$cputype" = "386"; then UNAME_MACHINE=i386 else UNAME_MACHINE="$cputype" fi echo ${UNAME_MACHINE}-unknown-plan9 exit ;; *:TOPS-10:*:*) echo pdp10-unknown-tops10 exit ;; *:TENEX:*:*) echo pdp10-unknown-tenex exit ;; KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) echo pdp10-dec-tops20 exit ;; XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) echo pdp10-xkl-tops20 exit ;; *:TOPS-20:*:*) echo pdp10-unknown-tops20 exit ;; *:ITS:*:*) echo pdp10-unknown-its exit ;; SEI:*:*:SEIUX) echo mips-sei-seiux${UNAME_RELEASE} exit ;; *:DragonFly:*:*) echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` exit ;; *:*VMS:*:*) UNAME_MACHINE=`(uname -p) 2>/dev/null` case "${UNAME_MACHINE}" in A*) echo alpha-dec-vms ; exit ;; I*) echo ia64-dec-vms ; exit ;; V*) echo vax-dec-vms ; exit ;; esac ;; *:XENIX:*:SysV) echo i386-pc-xenix exit ;; i*86:skyos:*:*) echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' exit ;; esac #echo '(No uname command or uname output not recognized.)' 1>&2 #echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 eval $set_cc_for_build cat >$dummy.c < # include #endif main () { #if defined (sony) #if defined (MIPSEB) /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, I don't know.... */ printf ("mips-sony-bsd\n"); exit (0); #else #include printf ("m68k-sony-newsos%s\n", #ifdef NEWSOS4 "4" #else "" #endif ); exit (0); #endif #endif #if defined (__arm) && defined (__acorn) && defined (__unix) printf ("arm-acorn-riscix\n"); exit (0); #endif #if defined (hp300) && !defined (hpux) printf ("m68k-hp-bsd\n"); exit (0); #endif #if defined (NeXT) #if !defined (__ARCHITECTURE__) #define __ARCHITECTURE__ "m68k" #endif int version; version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; if (version < 4) printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); else printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); exit (0); #endif #if defined (MULTIMAX) || defined (n16) #if defined (UMAXV) printf ("ns32k-encore-sysv\n"); exit (0); #else #if defined (CMU) printf ("ns32k-encore-mach\n"); exit (0); #else printf ("ns32k-encore-bsd\n"); exit (0); #endif #endif #endif #if defined (__386BSD__) printf ("i386-pc-bsd\n"); exit (0); #endif #if defined (sequent) #if defined (i386) printf ("i386-sequent-dynix\n"); exit (0); #endif #if defined (ns32000) printf ("ns32k-sequent-dynix\n"); exit (0); #endif #endif #if defined (_SEQUENT_) struct utsname un; uname(&un); if (strncmp(un.version, "V2", 2) == 0) { printf ("i386-sequent-ptx2\n"); exit (0); } if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ printf ("i386-sequent-ptx1\n"); exit (0); } printf ("i386-sequent-ptx\n"); exit (0); #endif #if defined (vax) # if !defined (ultrix) # include # if defined (BSD) # if BSD == 43 printf ("vax-dec-bsd4.3\n"); exit (0); # else # if BSD == 199006 printf ("vax-dec-bsd4.3reno\n"); exit (0); # else printf ("vax-dec-bsd\n"); exit (0); # endif # endif # else printf ("vax-dec-bsd\n"); exit (0); # endif # else printf ("vax-dec-ultrix\n"); exit (0); # endif #endif #if defined (alliant) && defined (i860) printf ("i860-alliant-bsd\n"); exit (0); #endif exit (1); } EOF $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && { echo "$SYSTEM_NAME"; exit; } # Apollos put the system type in the environment. test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } # Convex versions that predate uname can use getsysinfo(1) if [ -x /usr/convex/getsysinfo ] then case `getsysinfo -f cpu_type` in c1*) echo c1-convex-bsd exit ;; c2*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit ;; c34*) echo c34-convex-bsd exit ;; c38*) echo c38-convex-bsd exit ;; c4*) echo c4-convex-bsd exit ;; esac fi cat >&2 < in order to provide the needed information to handle your system. config.guess timestamp = $timestamp uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` /bin/uname -X = `(/bin/uname -X) 2>/dev/null` hostinfo = `(hostinfo) 2>/dev/null` /bin/universe = `(/bin/universe) 2>/dev/null` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` /bin/arch = `(/bin/arch) 2>/dev/null` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` UNAME_MACHINE = ${UNAME_MACHINE} UNAME_RELEASE = ${UNAME_RELEASE} UNAME_SYSTEM = ${UNAME_SYSTEM} UNAME_VERSION = ${UNAME_VERSION} EOF exit 1 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: zapping-0.10cvs6/config.rpath 755 764 144 35217 10432663175 11354 #! /bin/sh # Output a system dependent set of variables, describing how to set the # run time search path of shared libraries in an executable. # # Copyright 1996-2003 Free Software Foundation, Inc. # Taken from GNU libtool, 2001 # Originally by Gordon Matzigkeit , 1996 # # 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 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # # The first argument passed to this file is the canonical host specification, # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM # or # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # The environment variables CC, GCC, LDFLAGS, LD, with_gnu_ld # should be set by the caller. # # The set of defined variables is at the end of this script. # Known limitations: # - On IRIX 6.5 with CC="cc", the run time search patch must not be longer # than 256 bytes, otherwise the compiler driver will dump core. The only # known workaround is to choose shorter directory names for the build # directory and/or the installation directory. # All known linkers require a `.a' archive for static linking (except M$VC, # which needs '.lib'). libext=a shrext=.so host="$1" host_cpu=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` host_vendor=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` host_os=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` # Code taken from libtool.m4's AC_LIBTOOL_PROG_COMPILER_PIC. wl= if test "$GCC" = yes; then wl='-Wl,' else case "$host_os" in aix*) wl='-Wl,' ;; mingw* | pw32* | os2*) ;; hpux9* | hpux10* | hpux11*) wl='-Wl,' ;; irix5* | irix6* | nonstopux*) wl='-Wl,' ;; newsos6) ;; linux*) case $CC in icc|ecc) wl='-Wl,' ;; ccc) wl='-Wl,' ;; esac ;; osf3* | osf4* | osf5*) wl='-Wl,' ;; sco3.2v5*) ;; solaris*) wl='-Wl,' ;; sunos4*) wl='-Qoption ld ' ;; sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) wl='-Wl,' ;; sysv4*MP*) ;; uts4*) ;; esac fi # Code taken from libtool.m4's AC_LIBTOOL_PROG_LD_SHLIBS. hardcode_libdir_flag_spec= hardcode_libdir_separator= hardcode_direct=no hardcode_minus_L=no case "$host_os" in cygwin* | mingw* | pw32*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; openbsd*) with_gnu_ld=no ;; esac ld_shlibs=yes if test "$with_gnu_ld" = yes; then case "$host_os" in aix3* | aix4* | aix5*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then ld_shlibs=no fi ;; amigaos*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes # Samuel A. Falvo II reports # that the semantics of dynamic libraries on AmigaOS, at least up # to version 4, is to share data among multiple programs linked # with the same dynamic library. Since this doesn't match the # behavior of shared libraries on other platforms, we can use # them. ld_shlibs=no ;; beos*) if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then : else ld_shlibs=no fi ;; cygwin* | mingw* | pw32*) # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. hardcode_libdir_flag_spec='-L$libdir' if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then : else ld_shlibs=no fi ;; netbsd*) ;; solaris* | sysv5*) if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then ld_shlibs=no elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then : else ld_shlibs=no fi ;; sunos4*) hardcode_direct=yes ;; *) if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then : else ld_shlibs=no fi ;; esac if test "$ld_shlibs" = yes; then # Unlike libtool, we use -rpath here, not --rpath, since the documented # option of GNU ld is called -rpath, not --rpath. hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' fi else case "$host_os" in aix3*) # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. hardcode_minus_L=yes if test "$GCC" = yes; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct=unsupported fi ;; aix4* | aix5*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no else aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[23]|aix4.[23].*|aix5*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done esac fi hardcode_direct=yes hardcode_libdir_separator=':' if test "$GCC" = yes; then case $host_os in aix4.[012]|aix4.[012].*) collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && \ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 hardcode_direct=yes else # We have old collect2 hardcode_direct=unsupported hardcode_minus_L=yes hardcode_libdir_flag_spec='-L$libdir' hardcode_libdir_separator= fi esac fi # Begin _LT_AC_SYS_LIBPATH_AIX. echo 'int main () { return 0; }' > conftest.c ${CC} ${LDFLAGS} conftest.c -o conftest aix_libpath=`dump -H conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'` if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'` fi if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib" fi rm -f conftest.c conftest # End _LT_AC_SYS_LIBPATH_AIX. if test "$aix_use_runtimelinking" = yes; then hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' else hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" fi fi ;; amigaos*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes # see comment about different semantics on the GNU ld section ld_shlibs=no ;; bsdi4*) ;; cygwin* | mingw* | pw32*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. hardcode_libdir_flag_spec=' ' libext=lib ;; darwin* | rhapsody*) if $CC -v 2>&1 | grep 'Apple' >/dev/null ; then hardcode_direct=no fi ;; dgux*) hardcode_libdir_flag_spec='-L$libdir' ;; freebsd1*) ld_shlibs=no ;; freebsd2.2*) hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes ;; freebsd2*) hardcode_direct=yes hardcode_minus_L=yes ;; freebsd*) hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes ;; hpux9*) hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: hardcode_direct=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes ;; hpux10* | hpux11*) if test "$with_gnu_ld" = no; then case "$host_cpu" in hppa*64*) hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: hardcode_direct=no ;; ia64*) hardcode_libdir_flag_spec='-L$libdir' hardcode_direct=no # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes ;; *) hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: hardcode_direct=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: ;; netbsd*) hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes ;; newsos6) hardcode_direct=yes hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: ;; openbsd*) hardcode_direct=yes if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then hardcode_libdir_flag_spec='${wl}-rpath,$libdir' else case "$host_os" in openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) hardcode_libdir_flag_spec='-R$libdir' ;; *) hardcode_libdir_flag_spec='${wl}-rpath,$libdir' ;; esac fi ;; os2*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes ;; osf3*) hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: ;; osf4* | osf5*) if test "$GCC" = yes; then hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' else # Both cc and cxx compiler support -rpath directly hardcode_libdir_flag_spec='-rpath $libdir' fi hardcode_libdir_separator=: ;; sco3.2v5*) ;; solaris*) hardcode_libdir_flag_spec='-R$libdir' ;; sunos4*) hardcode_libdir_flag_spec='-L$libdir' hardcode_direct=yes hardcode_minus_L=yes ;; sysv4) case $host_vendor in sni) hardcode_direct=yes # is this really true??? ;; siemens) hardcode_direct=no ;; motorola) hardcode_direct=no #Motorola manual says yes, but my tests say they lie ;; esac ;; sysv4.3*) ;; sysv4*MP*) if test -d /usr/nec; then ld_shlibs=yes fi ;; sysv4.2uw2*) hardcode_direct=yes hardcode_minus_L=no ;; sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[78]* | unixware7*) ;; sysv5*) hardcode_libdir_flag_spec= ;; uts4*) hardcode_libdir_flag_spec='-L$libdir' ;; *) ld_shlibs=no ;; esac fi # Check dynamic linker characteristics # Code taken from libtool.m4's AC_LIBTOOL_SYS_DYNAMIC_LINKER. libname_spec='lib$name' case "$host_os" in aix3*) ;; aix4* | aix5*) ;; amigaos*) ;; beos*) ;; bsdi4*) ;; cygwin* | mingw* | pw32*) shrext=.dll ;; darwin* | rhapsody*) shrext=.dylib ;; dgux*) ;; freebsd1*) ;; freebsd*) ;; gnu*) ;; hpux9* | hpux10* | hpux11*) case "$host_cpu" in ia64*) shrext=.so ;; hppa*64*) shrext=.sl ;; *) shrext=.sl ;; esac ;; irix5* | irix6* | nonstopux*) case "$host_os" in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= ;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 ;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 ;; *) libsuff= shlibsuff= ;; esac ;; esac ;; linux*oldld* | linux*aout* | linux*coff*) ;; linux*) ;; netbsd*) ;; newsos6) ;; nto-qnx) ;; openbsd*) ;; os2*) libname_spec='$name' shrext=.dll ;; osf3* | osf4* | osf5*) ;; sco3.2v5*) ;; solaris*) ;; sunos4*) ;; sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) ;; sysv4*MP*) ;; uts4*) ;; esac sed_quote_subst='s/\(["`$\\]\)/\\\1/g' escaped_wl=`echo "X$wl" | sed -e 's/^X//' -e "$sed_quote_subst"` shlibext=`echo "$shrext" | sed -e 's,^\.,,'` escaped_hardcode_libdir_flag_spec=`echo "X$hardcode_libdir_flag_spec" | sed -e 's/^X//' -e "$sed_quote_subst"` sed -e 's/^\([a-zA-Z0-9_]*\)=/acl_cv_\1=/' <&2 exit 1 fi # It's OK to call `install-sh -d' without argument. # This can happen when creating conditional directories. exit 0 fi for src do # Protect names starting with `-'. case $src in -*) src=./$src ;; esac if test -n "$dir_arg"; then dst=$src src= if test -d "$dst"; then mkdircmd=: chmodcmd= else mkdircmd=$mkdirprog fi else # Waiting for this to be detected by the "$cpprog $src $dsttmp" command # might cause directories to be created, which would be especially bad # if $src (and thus $dsttmp) contains '*'. if test ! -f "$src" && test ! -d "$src"; then echo "$0: $src does not exist." >&2 exit 1 fi if test -z "$dstarg"; then echo "$0: no destination specified." >&2 exit 1 fi dst=$dstarg # Protect names starting with `-'. case $dst in -*) dst=./$dst ;; esac # If destination is a directory, append the input filename; won't work # if double slashes aren't ignored. if test -d "$dst"; then if test -n "$no_target_directory"; then echo "$0: $dstarg: Is a directory" >&2 exit 1 fi dst=$dst/`basename "$src"` fi fi # This sed command emulates the dirname command. dstdir=`echo "$dst" | sed -e 's,/*$,,;s,[^/]*$,,;s,/*$,,;s,^$,.,'` # Make sure that the destination directory exists. # Skip lots of stat calls in the usual case. if test ! -d "$dstdir"; then defaultIFS=' ' IFS="${IFS-$defaultIFS}" oIFS=$IFS # Some sh's can't handle IFS=/ for some reason. IFS='%' set x `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'` shift IFS=$oIFS pathcomp= while test $# -ne 0 ; do pathcomp=$pathcomp$1 shift if test ! -d "$pathcomp"; then $mkdirprog "$pathcomp" # mkdir can fail with a `File exist' error in case several # install-sh are creating the directory concurrently. This # is OK. test -d "$pathcomp" || exit fi pathcomp=$pathcomp/ done fi if test -n "$dir_arg"; then $doit $mkdircmd "$dst" \ && { test -z "$chowncmd" || $doit $chowncmd "$dst"; } \ && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } \ && { test -z "$stripcmd" || $doit $stripcmd "$dst"; } \ && { test -z "$chmodcmd" || $doit $chmodcmd "$dst"; } else dstfile=`basename "$dst"` # Make a couple of temp file names in the proper directory. dsttmp=$dstdir/_inst.$$_ rmtmp=$dstdir/_rm.$$_ # Trap to clean up those temp files at exit. trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 trap '(exit $?); exit' 1 2 13 15 # Copy the file name to the temp name. $doit $cpprog "$src" "$dsttmp" && # and set any options; do chmod last to preserve setuid bits. # # If any of these fail, we abort the whole thing. If we want to # ignore errors from any of these, just make sure not to ignore # errors from the above "$doit $cpprog $src $dsttmp" command. # { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } \ && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } \ && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } \ && { test -z "$chmodcmd" || $doit $chmodcmd "$dsttmp"; } && # Now rename the file to the real destination. { $doit $mvcmd -f "$dsttmp" "$dstdir/$dstfile" 2>/dev/null \ || { # The rename failed, perhaps because mv can't rename something else # to itself, or perhaps because mv is so ancient that it does not # support -f. # Now remove or move aside any old file at destination location. # We try this two ways since rm can't unlink itself on some # systems and the destination file might be busy for other # reasons. In this case, the final cleanup might fail but the new # file should still install successfully. { if test -f "$dstdir/$dstfile"; then $doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null \ || $doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null \ || { echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2 (exit 1); exit 1 } else : fi } && # Now rename the file to the real destination. $doit $mvcmd "$dsttmp" "$dstdir/$dstfile" } } fi || { (exit 1); exit 1; } done # The final little trick to "correctly" pass the exit status to the exit trap. { (exit 0); exit 0 } # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-end: "$" # End: zapping-0.10cvs6/autogen.sh 755 764 144 34027 10432663171 11037 #!/bin/sh # Run this to generate all the initial makefiles, etc. REQUIRED_AUTOCONF_VERSION=${REQUIRED_AUTOCONF_VERSION:-2.58} REQUIRED_AUTOMAKE_VERSION=${REQUIRED_AUTOMAKE_VERSION:-1.7} srcdir=`dirname $0` test -z "$srcdir" && srcdir=. PKG_NAME="zapping" (test -f $srcdir/configure.in) || { echo -n "**Error**: Directory "\`$srcdir\'" does not look like the" echo " top-level $PKG_NAME directory" exit 1 } #if which gnome-autogen.sh >/dev/null 2>&1; then # USE_GNOME2_MACROS=1 . gnome-autogen.sh #else # Plan B. Copied from gnome-common to eliminate a Gnome CVS # dependency on distros without gnome-common package. # Version 2004-08-16. #!/bin/sh # Run this to generate all the initial makefiles, etc. #name of package PKG_NAME=${PKG_NAME:-Package} srcdir=${srcdir:-.} # default version requirements ... REQUIRED_AUTOCONF_VERSION=${REQUIRED_AUTOCONF_VERSION:-2.53} REQUIRED_AUTOMAKE_VERSION=${REQUIRED_AUTOMAKE_VERSION:-1.4} REQUIRED_LIBTOOL_VERSION=${REQUIRED_LIBTOOL_VERSION:-1.4.3} REQUIRED_GETTEXT_VERSION=${REQUIRED_GETTEXT_VERSION:-0.10.40} REQUIRED_GLIB_GETTEXT_VERSION=${REQUIRED_GLIB_GETTEXT_VERSION:-2.2.0} REQUIRED_INTLTOOL_VERSION=${REQUIRED_INTLTOOL_VERSION:-0.25} REQUIRED_PKG_CONFIG_VERSION=${REQUIRED_PKG_CONFIG_VERSION:-0.14.0} REQUIRED_GTK_DOC_VERSION=${REQUIRED_GTK_DOC_VERSION:-1.0} REQUIRED_DOC_COMMON_VERSION=${REQUIRED_DOC_COMMON_VERSION:-2.3.0} # a list of required m4 macros. Package can set an initial value REQUIRED_M4MACROS=${REQUIRED_M4MACROS:-} FORBIDDEN_M4MACROS=${FORBIDDEN_M4MACROS:-} # Not all echo versions allow -n, so we check what is possible. This test is # based on the one in autoconf. case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in *c*,-n*) ECHO_N= ;; *c*,* ) ECHO_N=-n ;; *) ECHO_N= ;; esac # if GNOME2_DIR or GNOME2_PATH is set, modify ACLOCAL_FLAGS ... # NOTE: GNOME2_DIR is deprecated (as of Jan 2004), but is left here for # backwards-compatibility. You should be using GNOME2_PATH, since that is also # understood by libraries such as libgnome. if [ -n "$GNOME2_DIR" ]; then echo "Using GNOME2_DIR is deprecated in gnome-common." echo "Please use GNOME2_PATH instead (for compatibility with other GNOME pieces)." ACLOCAL_FLAGS="-I $GNOME2_DIR/share/aclocal $ACLOCAL_FLAGS" LD_LIBRARY_PATH="$GNOME2_DIR/lib:$LD_LIBRARY_PATH" PATH="$GNOME2_DIR/bin:$PATH" export PATH export LD_LIBRARY_PATH else if [ -n "$GNOME2_PATH" ]; then ACLOCAL_FLAGS="-I $GNOME2_PATH/share/aclocal $ACLOCAL_FLAGS" LD_LIBRARY_PATH="$GNOME2_PATH/lib:$LD_LIBRARY_PATH" PATH="$GNOME2_PATH/bin:$PATH" export PATH export LD_LIBRARY_PATH fi fi # some terminal codes ... boldface="`tput bold 2>/dev/null`" normal="`tput sgr0 2>/dev/null`" printbold() { echo $ECHO_N "$boldface" echo "$@" echo $ECHO_N "$normal" } printerr() { echo "$@" >&2 } # Usage: # compare_versions MIN_VERSION ACTUAL_VERSION # returns true if ACTUAL_VERSION >= MIN_VERSION compare_versions() { ch_min_version=$1 ch_actual_version=$2 ch_status=0 IFS="${IFS= }"; ch_save_IFS="$IFS"; IFS="." set $ch_actual_version for ch_min in $ch_min_version; do ch_cur=`echo $1 | sed 's/[^0-9].*$//'`; shift # remove letter suffixes if [ -z "$ch_min" ]; then break; fi if [ -z "$ch_cur" ]; then ch_status=1; break; fi if [ $ch_cur -gt $ch_min ]; then break; fi if [ $ch_cur -lt $ch_min ]; then ch_status=1; break; fi done IFS="$ch_save_IFS" return $ch_status } # Usage: # version_check PACKAGE VARIABLE CHECKPROGS MIN_VERSION SOURCE # checks to see if the package is available version_check() { vc_package=$1 vc_variable=$2 vc_checkprogs=$3 vc_min_version=$4 vc_source=$5 vc_status=1 vc_checkprog=`eval echo "\\$$vc_variable"` if [ -n "$vc_checkprog" ]; then printbold "using $vc_checkprog for $vc_package" return 0 fi printbold "checking for $vc_package >= $vc_min_version..." for vc_checkprog in $vc_checkprogs; do echo $ECHO_N " testing $vc_checkprog... " if $vc_checkprog --version < /dev/null > /dev/null 2>&1; then vc_actual_version=`$vc_checkprog --version | head -n 1 | \ sed 's/^.*[ ]\([0-9.]*[a-z]*\).*$/\1/'` if compare_versions $vc_min_version $vc_actual_version; then echo "found $vc_actual_version" # set variable eval "$vc_variable=$vc_checkprog" vc_status=0 break else echo "too old (found version $vc_actual_version)" fi else echo "not found." fi done if [ "$vc_status" != 0 ]; then printerr "***Error***: You must have $vc_package >= $vc_min_version installed" printerr " to build $PKG_NAME. Download the appropriate package for" printerr " from your distribution or get the source tarball at" printerr " $vc_source" printerr fi return $vc_status } # Usage: # require_m4macro filename.m4 # adds filename.m4 to the list of required macros require_m4macro() { case "$REQUIRED_M4MACROS" in $1\ * | *\ $1\ * | *\ $1) ;; *) REQUIRED_M4MACROS="$REQUIRED_M4MACROS $1" ;; esac } forbid_m4macro() { case "$FORBIDDEN_M4MACROS" in $1\ * | *\ $1\ * | *\ $1) ;; *) FORBIDDEN_M4MACROS="$FORBIDDEN_M4MACROS $1" ;; esac } # Usage: # check_m4macros # Checks that all the requested macro files are in the aclocal macro path # Uses REQUIRED_M4MACROS and ACLOCAL variables. check_m4macros() { # construct list of macro directories cm_macrodirs="`$ACLOCAL --print-ac-dir`" set - $ACLOCAL_FLAGS while [ $# -gt 0 ]; do if [ "$1" = "-I" ]; then cm_macrodirs="$cm_macrodirs $2" shift fi shift done cm_status=0 if [ -n "$REQUIRED_M4MACROS" ]; then printbold "Checking for required M4 macros..." # check that each macro file is in one of the macro dirs for cm_macro in $REQUIRED_M4MACROS; do cm_macrofound=false for cm_dir in $cm_macrodirs; do if [ -f "$cm_dir/$cm_macro" ]; then cm_macrofound=true break fi # The macro dir in Cygwin environments may contain a file # called dirlist containing other directories to look in. if [ -f "$cm_dir/dirlist" ]; then for cm_otherdir in `cat $cm_dir/dirlist`; do if [ -f "$cm_otherdir/$cm_macro" ]; then cm_macrofound=true break fi done fi done if $cm_macrofound; then : else printerr " $cm_macro not found" cm_status=1 fi done fi if [ -n "$FORBIDDEN_M4MACROS" ]; then printbold "Checking for forbidden M4 macros..." # check that each macro file is in one of the macro dirs for cm_macro in $FORBIDDEN_M4MACROS; do cm_macrofound=false for cm_dir in $cm_macrodirs; do if [ -f "$cm_dir/$cm_macro" ]; then cm_macrofound=true break fi done if $cm_macrofound; then printerr " $cm_macro found (should be cleared from macros dir)" cm_status=1 fi done fi if [ "$cm_status" != 0 ]; then printerr "***Error***: some autoconf macros required to build $PKG_NAME" printerr " were not found in your aclocal path, or some forbidden" printerr " macros were found. Perhaps you need to adjust your" printerr " ACLOCAL_PATH?" printerr fi return $cm_status } # try to catch the case where the macros2/ directory hasn't been cleared out. forbid_m4macro gnome-cxx-check.m4 want_libtool=false want_gettext=false want_glib_gettext=false want_intltool=false want_pkg_config=false want_gtk_doc=false configure_files="`find $srcdir -name '{arch}' -prune -o -name configure.ac -print -o -name configure.in -print`" for configure_ac in $configure_files; do if grep "^A[CM]_PROG_LIBTOOL" $configure_ac >/dev/null; then want_libtool=true fi if grep "^AM_GNU_GETTEXT" $configure_ac >/dev/null; then want_gettext=true fi if grep "^AM_GLIB_GNU_GETTEXT" $configure_ac >/dev/null; then want_glib_gettext=true fi if grep "^AC_PROG_INTLTOOL" $configure_ac >/dev/null; then want_intltool=true fi if grep "^PKG_CHECK_MODULES" $configure_ac >/dev/null; then want_pkg_config=true fi if grep "^GTK_DOC_CHECK" $configure_ac >/dev/null; then want_gtk_doc=true fi done DIE=0 #tell Mandrake autoconf wrapper we want autoconf 2.5x, not 2.13 WANT_AUTOCONF_2_5=1 export WANT_AUTOCONF_2_5 version_check autoconf AUTOCONF 'autoconf2.50 autoconf autoconf-2.53' $REQUIRED_AUTOCONF_VERSION \ "http://ftp.gnu.org/pub/gnu/autoconf/autoconf-$REQUIRED_AUTOCONF_VERSION.tar.gz" || DIE=1 AUTOHEADER=`echo $AUTOCONF | sed s/autoconf/autoheader/` case $REQUIRED_AUTOMAKE_VERSION in 1.4*) automake_progs="automake-1.4" ;; 1.5*) automake_progs="automake-1.5 automake-1.6 automake-1.7 automake-1.8 automake-1.9" ;; 1.6*) automake_progs="automake-1.6 automake-1.7 automake-1.8 automake-1.9" ;; 1.7*) automake_progs="automake-1.7 automake-1.8 automake-1.9" ;; 1.8*) automake_progs="automake-1.8 automake-1.9" ;; 1.9*) automake_progs="automake-1.9" ;; esac version_check automake AUTOMAKE "$automake_progs" $REQUIRED_AUTOMAKE_VERSION \ "http://ftp.gnu.org/pub/gnu/automake/automake-$REQUIRED_AUTOMAKE_VERSION.tar.gz" || DIE=1 ACLOCAL=`echo $AUTOMAKE | sed s/automake/aclocal/` # We need to do this for the craaaaaaazy mkinstalldirs usage of glib-gettext AUTOMAKE_VERSION=`echo $AUTOMAKE | sed s/automake-//` ACLOCAL_DIR=`$ACLOCAL --print-ac-dir` AUTOMAKE_DIR=`echo $ACLOCAL_DIR | sed s/aclocal/automake-$AUTOMAKE_VERSION/` if $want_libtool; then version_check libtool LIBTOOLIZE libtoolize $REQUIRED_LIBTOOL_VERSION \ "http://ftp.gnu.org/pub/gnu/libtool/libtool-$REQUIRED_LIBTOOL_VERSION.tar.gz" || DIE=1 require_m4macro libtool.m4 fi if $want_gettext; then version_check gettext GETTEXTIZE gettextize $REQUIRED_GETTEXT_VERSION \ "http://ftp.gnu.org/pub/gnu/gettext/gettext-$REQUIRED_GETTEXT_VERSION.tar.gz" || DIE=1 require_m4macro gettext.m4 fi if $want_glib_gettext; then version_check glib-gettext GLIB_GETTEXTIZE glib-gettextize $REQUIRED_GLIB_GETTEXT_VERSION \ "ftp://ftp.gtk.org/pub/gtk/v2.2/glib-$REQUIRED_GLIB_GETTEXT_VERSION.tar.gz" || DIE=1 require_m4macro glib-gettext.m4 fi if $want_intltool; then version_check intltool INTLTOOLIZE intltoolize $REQUIRED_INTLTOOL_VERSION \ "http://ftp.gnome.org/pub/GNOME/sources/intltool/" || DIE=1 require_m4macro intltool.m4 fi if $want_pkg_config; then version_check pkg-config PKG_CONFIG pkg-config $REQUIRED_PKG_CONFIG_VERSION \ "'http://www.freedesktop.org/software/pkgconfig/releases/pkgconfig-$REQUIRED_PKG_CONFIG_VERSION.tar.gz" || DIE=1 require_m4macro pkg.m4 fi if $want_gtk_doc; then version_check gtk-doc GTKDOCIZE gtkdocize $REQUIRED_GTK_DOC_VERSION \ "http://ftp.gnome.org/pub/GNOME/sources/gtk-doc/" || DIE=1 require_m4macro gtk-doc.m4 fi if [ "x$USE_COMMON_DOC_BUILD" = "xyes" ]; then version_check gnome-common DOC_COMMON gnome-doc-common \ $REQUIRED_DOC_COMMON_VERSION " " || DIE=1 fi check_m4macros || DIE=1 if [ "$DIE" -eq 1 ]; then exit 1 fi if test -z "$*"; then printerr "**Warning**: I am going to run \`configure' with no arguments." printerr "If you wish to pass any to it, please specify them on the" printerr \`$0\'" command line." printerr fi topdir=`pwd` for configure_ac in $configure_files; do dirname=`dirname $configure_ac` basename=`basename $configure_ac` if test -f $dirname/NO-AUTO-GEN; then echo skipping $dirname -- flagged as no auto-gen else printbold "Processing $configure_ac" cd $dirname # Note that the order these tools are called should match what # autoconf's "autoupdate" package does. See bug 138584 for # details. # programs that might install new macros get run before aclocal if grep "^A[CM]_PROG_LIBTOOL" $basename >/dev/null; then printbold "Running $LIBTOOLIZE..." $LIBTOOLIZE --force || exit 1 fi if grep "^AM_GLIB_GNU_GETTEXT" $basename >/dev/null; then printbold "Running $GLIB_GETTEXTIZE... Ignore non-fatal messages." echo "no" | $GLIB_GETTEXTIZE --force --copy || exit 1 # This is to copy in mkinstalldirs for glib-gettext if [ -x $AUTOMAKE_DIR/mkinstalldirs ]; then echo " copying mkinstalldirs... " cp -f $AUTOMAKE_DIR/mkinstalldirs $dirname fi elif grep "^AM_GNU_GETTEXT" $basename >/dev/null; then if grep "^AM_GNU_GETTEXT_VERSION" $basename > /dev/null; then printbold "Running autopoint..." autopoint --force || exit 1 else printbold "Running $GETTEXTIZE... Ignore non-fatal messages." echo "no" | $GETTEXTIZE --force --copy || exit 1 fi fi if grep "^AC_PROG_INTLTOOL" $basename >/dev/null; then printbold "Running $INTLTOOLIZE..." $INTLTOOLIZE --force --automake || exit 1 fi if grep "^GTK_DOC_CHECK" $basename >/dev/null; then printbold "Running $GTKDOCIZE..." $GTKDOCIZE || exit 1 fi if [ "x$USE_COMMON_DOC_BUILD" = "xyes" ]; then printbold "Running gnome-doc-common..." gnome-doc-common --copy || exit 1 fi # Now run aclocal to pull in any additional macros needed aclocalinclude="$ACLOCAL_FLAGS" printbold "Running $ACLOCAL..." $ACLOCAL $aclocalinclude || exit 1 if grep "GNOME_AUTOGEN_OBSOLETE" aclocal.m4 >/dev/null; then printerr "*** obsolete gnome macros were used in $configure_ac" fi # Now that all the macros are sorted, run autoconf and autoheader ... printbold "Running $AUTOCONF..." $AUTOCONF || exit 1 if grep "^A[CM]_CONFIG_HEADER" $basename >/dev/null; then printbold "Running $AUTOHEADER..." $AUTOHEADER || exit 1 # this prevents automake from thinking config.h.in is out of # date, since autoheader doesn't touch the file if it doesn't # change. test -f config.h.in && touch config.h.in fi # Finally, run automake to create the makefiles ... printbold "Running $AUTOMAKE..." $AUTOMAKE --gnu --add-missing || exit 1 cd "$topdir" fi done conf_flags="" # "--enable-maintainer-mode" if test x$NOCONFIGURE = x; then printbold Running $srcdir/configure $conf_flags "$@" ... $srcdir/configure $conf_flags "$@" \ && echo Now type \`make\' to compile $PKG_NAME || exit 1 else echo Skipping configure process. fi # End of Plan B copied from gnome-common #fi zapping-0.10cvs6/config.sub 755 764 144 75777 10375433432 11043 #! /bin/sh # Configuration validation subroutine script. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. timestamp='2005-07-08' # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software # can handle that machine. It does not imply ALL GNU software can. # # This file 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 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA # 02110-1301, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Please send patches to . Submit a context # diff and a properly formatted ChangeLog entry. # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. # If it is invalid, we print an error message on stderr and exit with code 1. # Otherwise, we print the canonical config type on stdout and succeed. # This file is supposed to be the same for all GNU packages # and recognize all the CPU types, system types and aliases # that are meaningful with *any* GNU software. # Each package is responsible for reporting which valid configurations # it does not support. The user should be able to distinguish # a failure to support a valid configuration from a meaningless # configuration. # The goal of this file is to map all the various variations of a given # machine specification into a single specification in the form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM # or in some cases, the newer four-part form: # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # It is wrong to echo any other type of specification. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] CPU-MFR-OPSYS $0 [OPTION] ALIAS Canonicalize a configuration name. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.sub ($timestamp) Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" exit 1 ;; *local*) # First pass through any local machine types. echo $1 exit ;; * ) break ;; esac done case $# in 0) echo "$me: missing argument$help" >&2 exit 1;; 1) ;; *) echo "$me: too many arguments$help" >&2 exit 1;; esac # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). # Here we must recognize all the valid KERNEL-OS combinations. maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in nto-qnx* | linux-gnu* | linux-dietlibc | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | \ kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; *) basic_machine=`echo $1 | sed 's/-[^-]*$//'` if [ $basic_machine != $1 ] then os=`echo $1 | sed 's/.*-/-/'` else os=; fi ;; esac ### Let's recognize common machines as not being operating systems so ### that things like config.sub decstation-3100 work. We also ### recognize some manufacturers as not being operating systems, so we ### can provide default operating systems below. case $os in -sun*os*) # Prevent following clause from handling this invalid input. ;; -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ -apple | -axis | -knuth | -cray) os= basic_machine=$1 ;; -sim | -cisco | -oki | -wec | -winbond) os= basic_machine=$1 ;; -scout) ;; -wrs) os=-vxworks basic_machine=$1 ;; -chorusos*) os=-chorusos basic_machine=$1 ;; -chorusrdb) os=-chorusrdb basic_machine=$1 ;; -hiux*) os=-hiuxwe2 ;; -sco5) os=-sco3.2v5 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco4) os=-sco3.2v4 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2.[4-9]*) os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2v[4-9]*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco*) os=-sco3.2v2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -udk*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -isc) os=-isc2.2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -clix*) basic_machine=clipper-intergraph ;; -isc*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -lynx*) os=-lynxos ;; -ptx*) basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` ;; -windowsnt*) os=`echo $os | sed -e 's/windowsnt/winnt/'` ;; -psos*) os=-psos ;; -mint | -mint[0-9]*) basic_machine=m68k-atari os=-mint ;; esac # Decode aliases for certain CPU-COMPANY combinations. case $basic_machine in # Recognize the basic CPU types without company name. # Some are omitted here because they have special meanings below. 1750a | 580 \ | a29k \ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | am33_2.0 \ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \ | bfin \ | c4x | clipper \ | d10v | d30v | dlx | dsp16xx \ | fr30 | frv \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | i370 | i860 | i960 | ia64 \ | ip2k | iq2000 \ | m32r | m32rle | m68000 | m68k | m88k | maxq | mcore \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ | mips64vr | mips64vrel \ | mips64orion | mips64orionel \ | mips64vr4100 | mips64vr4100el \ | mips64vr4300 | mips64vr4300el \ | mips64vr5000 | mips64vr5000el \ | mips64vr5900 | mips64vr5900el \ | mipsisa32 | mipsisa32el \ | mipsisa32r2 | mipsisa32r2el \ | mipsisa64 | mipsisa64el \ | mipsisa64r2 | mipsisa64r2el \ | mipsisa64sb1 | mipsisa64sb1el \ | mipsisa64sr71k | mipsisa64sr71kel \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ | ms1 \ | msp430 \ | ns16k | ns32k \ | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ | pyramid \ | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ | sparc | sparc64 | sparc64b | sparc86x | sparclet | sparclite \ | sparcv8 | sparcv9 | sparcv9b \ | strongarm \ | tahoe | thumb | tic4x | tic80 | tron \ | v850 | v850e \ | we32k \ | x86 | xscale | xscalee[bl] | xstormy16 | xtensa \ | z8k) basic_machine=$basic_machine-unknown ;; m32c) basic_machine=$basic_machine-unknown ;; m6811 | m68hc11 | m6812 | m68hc12) # Motorola 68HC11/12. basic_machine=$basic_machine-unknown os=-none ;; m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) ;; # We use `pc' rather than `unknown' # because (1) that's what they normally are, and # (2) the word "unknown" tends to confuse beginning users. i*86 | x86_64) basic_machine=$basic_machine-pc ;; # Object if more than one company name word. *-*-*) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; # Recognize the basic CPU types with company name. 580-* \ | a29k-* \ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | avr-* \ | bfin-* | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ | elxsi-* \ | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | i*86-* | i860-* | i960-* | ia64-* \ | ip2k-* | iq2000-* \ | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ | m88110-* | m88k-* | maxq-* | mcore-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips16-* \ | mips64-* | mips64el-* \ | mips64vr-* | mips64vrel-* \ | mips64orion-* | mips64orionel-* \ | mips64vr4100-* | mips64vr4100el-* \ | mips64vr4300-* | mips64vr4300el-* \ | mips64vr5000-* | mips64vr5000el-* \ | mips64vr5900-* | mips64vr5900el-* \ | mipsisa32-* | mipsisa32el-* \ | mipsisa32r2-* | mipsisa32r2el-* \ | mipsisa64-* | mipsisa64el-* \ | mipsisa64r2-* | mipsisa64r2el-* \ | mipsisa64sb1-* | mipsisa64sb1el-* \ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ | mipstx39-* | mipstx39el-* \ | mmix-* \ | ms1-* \ | msp430-* \ | none-* | np1-* | ns16k-* | ns32k-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ | pyramid-* \ | romp-* | rs6000-* \ | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | sparc-* | sparc64-* | sparc64b-* | sparc86x-* | sparclet-* \ | sparclite-* \ | sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \ | tahoe-* | thumb-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ | tron-* \ | v850-* | v850e-* | vax-* \ | we32k-* \ | x86-* | x86_64-* | xps100-* | xscale-* | xscalee[bl]-* \ | xstormy16-* | xtensa-* \ | ymp-* \ | z8k-*) ;; m32c-*) ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. 386bsd) basic_machine=i386-unknown os=-bsd ;; 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) basic_machine=m68000-att ;; 3b*) basic_machine=we32k-att ;; a29khif) basic_machine=a29k-amd os=-udi ;; abacus) basic_machine=abacus-unknown ;; adobe68k) basic_machine=m68010-adobe os=-scout ;; alliant | fx80) basic_machine=fx80-alliant ;; altos | altos3068) basic_machine=m68k-altos ;; am29k) basic_machine=a29k-none os=-bsd ;; amd64) basic_machine=x86_64-pc ;; amd64-*) basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; amdahl) basic_machine=580-amdahl os=-sysv ;; amiga | amiga-*) basic_machine=m68k-unknown ;; amigaos | amigados) basic_machine=m68k-unknown os=-amigaos ;; amigaunix | amix) basic_machine=m68k-unknown os=-sysv4 ;; apollo68) basic_machine=m68k-apollo os=-sysv ;; apollo68bsd) basic_machine=m68k-apollo os=-bsd ;; aux) basic_machine=m68k-apple os=-aux ;; balance) basic_machine=ns32k-sequent os=-dynix ;; c90) basic_machine=c90-cray os=-unicos ;; convex-c1) basic_machine=c1-convex os=-bsd ;; convex-c2) basic_machine=c2-convex os=-bsd ;; convex-c32) basic_machine=c32-convex os=-bsd ;; convex-c34) basic_machine=c34-convex os=-bsd ;; convex-c38) basic_machine=c38-convex os=-bsd ;; cray | j90) basic_machine=j90-cray os=-unicos ;; craynv) basic_machine=craynv-cray os=-unicosmp ;; cr16c) basic_machine=cr16c-unknown os=-elf ;; crds | unos) basic_machine=m68k-crds ;; crisv32 | crisv32-* | etraxfs*) basic_machine=crisv32-axis ;; cris | cris-* | etrax*) basic_machine=cris-axis ;; crx) basic_machine=crx-unknown os=-elf ;; da30 | da30-*) basic_machine=m68k-da30 ;; decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) basic_machine=mips-dec ;; decsystem10* | dec10*) basic_machine=pdp10-dec os=-tops10 ;; decsystem20* | dec20*) basic_machine=pdp10-dec os=-tops20 ;; delta | 3300 | motorola-3300 | motorola-delta \ | 3300-motorola | delta-motorola) basic_machine=m68k-motorola ;; delta88) basic_machine=m88k-motorola os=-sysv3 ;; djgpp) basic_machine=i586-pc os=-msdosdjgpp ;; dpx20 | dpx20-*) basic_machine=rs6000-bull os=-bosx ;; dpx2* | dpx2*-bull) basic_machine=m68k-bull os=-sysv3 ;; ebmon29k) basic_machine=a29k-amd os=-ebmon ;; elxsi) basic_machine=elxsi-elxsi os=-bsd ;; encore | umax | mmax) basic_machine=ns32k-encore ;; es1800 | OSE68k | ose68k | ose | OSE) basic_machine=m68k-ericsson os=-ose ;; fx2800) basic_machine=i860-alliant ;; genix) basic_machine=ns32k-ns ;; gmicro) basic_machine=tron-gmicro os=-sysv ;; go32) basic_machine=i386-pc os=-go32 ;; h3050r* | hiux*) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; h8300hms) basic_machine=h8300-hitachi os=-hms ;; h8300xray) basic_machine=h8300-hitachi os=-xray ;; h8500hms) basic_machine=h8500-hitachi os=-hms ;; harris) basic_machine=m88k-harris os=-sysv3 ;; hp300-*) basic_machine=m68k-hp ;; hp300bsd) basic_machine=m68k-hp os=-bsd ;; hp300hpux) basic_machine=m68k-hp os=-hpux ;; hp3k9[0-9][0-9] | hp9[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k2[0-9][0-9] | hp9k31[0-9]) basic_machine=m68000-hp ;; hp9k3[2-9][0-9]) basic_machine=m68k-hp ;; hp9k6[0-9][0-9] | hp6[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k7[0-79][0-9] | hp7[0-79][0-9]) basic_machine=hppa1.1-hp ;; hp9k78[0-9] | hp78[0-9]) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[0-9][13679] | hp8[0-9][13679]) basic_machine=hppa1.1-hp ;; hp9k8[0-9][0-9] | hp8[0-9][0-9]) basic_machine=hppa1.0-hp ;; hppa-next) os=-nextstep3 ;; hppaosf) basic_machine=hppa1.1-hp os=-osf ;; hppro) basic_machine=hppa1.1-hp os=-proelf ;; i370-ibm* | ibm*) basic_machine=i370-ibm ;; # I'm not sure what "Sysv32" means. Should this be sysv3.2? i*86v32) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv32 ;; i*86v4*) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv4 ;; i*86v) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv ;; i*86sol2) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-solaris2 ;; i386mach) basic_machine=i386-mach os=-mach ;; i386-vsta | vsta) basic_machine=i386-unknown os=-vsta ;; iris | iris4d) basic_machine=mips-sgi case $os in -irix*) ;; *) os=-irix4 ;; esac ;; isi68 | isi) basic_machine=m68k-isi os=-sysv ;; m88k-omron*) basic_machine=m88k-omron ;; magnum | m3230) basic_machine=mips-mips os=-sysv ;; merlin) basic_machine=ns32k-utek os=-sysv ;; mingw32) basic_machine=i386-pc os=-mingw32 ;; miniframe) basic_machine=m68000-convergent ;; *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) basic_machine=m68k-atari os=-mint ;; mips3*-*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` ;; mips3*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown ;; monitor) basic_machine=m68k-rom68k os=-coff ;; morphos) basic_machine=powerpc-unknown os=-morphos ;; msdos) basic_machine=i386-pc os=-msdos ;; mvs) basic_machine=i370-ibm os=-mvs ;; ncr3000) basic_machine=i486-ncr os=-sysv4 ;; netbsd386) basic_machine=i386-unknown os=-netbsd ;; netwinder) basic_machine=armv4l-rebel os=-linux ;; news | news700 | news800 | news900) basic_machine=m68k-sony os=-newsos ;; news1000) basic_machine=m68030-sony os=-newsos ;; news-3600 | risc-news) basic_machine=mips-sony os=-newsos ;; necv70) basic_machine=v70-nec os=-sysv ;; next | m*-next ) basic_machine=m68k-next case $os in -nextstep* ) ;; -ns2*) os=-nextstep2 ;; *) os=-nextstep3 ;; esac ;; nh3000) basic_machine=m68k-harris os=-cxux ;; nh[45]000) basic_machine=m88k-harris os=-cxux ;; nindy960) basic_machine=i960-intel os=-nindy ;; mon960) basic_machine=i960-intel os=-mon960 ;; nonstopux) basic_machine=mips-compaq os=-nonstopux ;; np1) basic_machine=np1-gould ;; nsr-tandem) basic_machine=nsr-tandem ;; op50n-* | op60c-*) basic_machine=hppa1.1-oki os=-proelf ;; openrisc | openrisc-*) basic_machine=or32-unknown ;; os400) basic_machine=powerpc-ibm os=-os400 ;; OSE68000 | ose68000) basic_machine=m68000-ericsson os=-ose ;; os68k) basic_machine=m68k-none os=-os68k ;; pa-hitachi) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; paragon) basic_machine=i860-intel os=-osf ;; pbd) basic_machine=sparc-tti ;; pbb) basic_machine=m68k-tti ;; pc532 | pc532-*) basic_machine=ns32k-pc532 ;; pentium | p5 | k5 | k6 | nexgen | viac3) basic_machine=i586-pc ;; pentiumpro | p6 | 6x86 | athlon | athlon_*) basic_machine=i686-pc ;; pentiumii | pentium2 | pentiumiii | pentium3) basic_machine=i686-pc ;; pentium4) basic_machine=i786-pc ;; pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumpro-* | p6-* | 6x86-* | athlon-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium4-*) basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pn) basic_machine=pn-gould ;; power) basic_machine=power-ibm ;; ppc) basic_machine=powerpc-unknown ;; ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppcle | powerpclittle | ppc-le | powerpc-little) basic_machine=powerpcle-unknown ;; ppcle-* | powerpclittle-*) basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64) basic_machine=powerpc64-unknown ;; ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64le | powerpc64little | ppc64-le | powerpc64-little) basic_machine=powerpc64le-unknown ;; ppc64le-* | powerpc64little-*) basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ps2) basic_machine=i386-ibm ;; pw32) basic_machine=i586-unknown os=-pw32 ;; rom68k) basic_machine=m68k-rom68k os=-coff ;; rm[46]00) basic_machine=mips-siemens ;; rtpc | rtpc-*) basic_machine=romp-ibm ;; s390 | s390-*) basic_machine=s390-ibm ;; s390x | s390x-*) basic_machine=s390x-ibm ;; sa29200) basic_machine=a29k-amd os=-udi ;; sb1) basic_machine=mipsisa64sb1-unknown ;; sb1el) basic_machine=mipsisa64sb1el-unknown ;; sei) basic_machine=mips-sei os=-seiux ;; sequent) basic_machine=i386-sequent ;; sh) basic_machine=sh-hitachi os=-hms ;; sh64) basic_machine=sh64-unknown ;; sparclite-wrs | simso-wrs) basic_machine=sparclite-wrs os=-vxworks ;; sps7) basic_machine=m68k-bull os=-sysv2 ;; spur) basic_machine=spur-unknown ;; st2000) basic_machine=m68k-tandem ;; stratus) basic_machine=i860-stratus os=-sysv4 ;; sun2) basic_machine=m68000-sun ;; sun2os3) basic_machine=m68000-sun os=-sunos3 ;; sun2os4) basic_machine=m68000-sun os=-sunos4 ;; sun3os3) basic_machine=m68k-sun os=-sunos3 ;; sun3os4) basic_machine=m68k-sun os=-sunos4 ;; sun4os3) basic_machine=sparc-sun os=-sunos3 ;; sun4os4) basic_machine=sparc-sun os=-sunos4 ;; sun4sol2) basic_machine=sparc-sun os=-solaris2 ;; sun3 | sun3-*) basic_machine=m68k-sun ;; sun4) basic_machine=sparc-sun ;; sun386 | sun386i | roadrunner) basic_machine=i386-sun ;; sv1) basic_machine=sv1-cray os=-unicos ;; symmetry) basic_machine=i386-sequent os=-dynix ;; t3e) basic_machine=alphaev5-cray os=-unicos ;; t90) basic_machine=t90-cray os=-unicos ;; tic54x | c54x*) basic_machine=tic54x-unknown os=-coff ;; tic55x | c55x*) basic_machine=tic55x-unknown os=-coff ;; tic6x | c6x*) basic_machine=tic6x-unknown os=-coff ;; tx39) basic_machine=mipstx39-unknown ;; tx39el) basic_machine=mipstx39el-unknown ;; toad1) basic_machine=pdp10-xkl os=-tops20 ;; tower | tower-32) basic_machine=m68k-ncr ;; tpf) basic_machine=s390x-ibm os=-tpf ;; udi29k) basic_machine=a29k-amd os=-udi ;; ultra3) basic_machine=a29k-nyu os=-sym1 ;; v810 | necv810) basic_machine=v810-nec os=-none ;; vaxv) basic_machine=vax-dec os=-sysv ;; vms) basic_machine=vax-dec os=-vms ;; vpp*|vx|vx-*) basic_machine=f301-fujitsu ;; vxworks960) basic_machine=i960-wrs os=-vxworks ;; vxworks68) basic_machine=m68k-wrs os=-vxworks ;; vxworks29k) basic_machine=a29k-wrs os=-vxworks ;; w65*) basic_machine=w65-wdc os=-none ;; w89k-*) basic_machine=hppa1.1-winbond os=-proelf ;; xbox) basic_machine=i686-pc os=-mingw32 ;; xps | xps100) basic_machine=xps100-honeywell ;; ymp) basic_machine=ymp-cray os=-unicos ;; z8k-*-coff) basic_machine=z8k-unknown os=-sim ;; none) basic_machine=none-none os=-none ;; # Here we handle the default manufacturer of certain CPU types. It is in # some cases the only manufacturer, in others, it is the most popular. w89k) basic_machine=hppa1.1-winbond ;; op50n) basic_machine=hppa1.1-oki ;; op60c) basic_machine=hppa1.1-oki ;; romp) basic_machine=romp-ibm ;; mmix) basic_machine=mmix-knuth ;; rs6000) basic_machine=rs6000-ibm ;; vax) basic_machine=vax-dec ;; pdp10) # there are many clones, so DEC is not a safe bet basic_machine=pdp10-unknown ;; pdp11) basic_machine=pdp11-dec ;; we32k) basic_machine=we32k-att ;; sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele) basic_machine=sh-unknown ;; sparc | sparcv8 | sparcv9 | sparcv9b) basic_machine=sparc-sun ;; cydra) basic_machine=cydra-cydrome ;; orion) basic_machine=orion-highlevel ;; orion105) basic_machine=clipper-highlevel ;; mac | mpw | mac-mpw) basic_machine=m68k-apple ;; pmac | pmac-mpw) basic_machine=powerpc-apple ;; *-unknown) # Make sure to match an already-canonicalized machine name. ;; *) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; esac # Here we canonicalize certain aliases for manufacturers. case $basic_machine in *-digital*) basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` ;; *-commodore*) basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` ;; *) ;; esac # Decode manufacturer-specific aliases for certain operating systems. if [ x"$os" != x"" ] then case $os in # First match some system type aliases # that might get confused with valid system types. # -solaris* is a basic system type, with this one exception. -solaris1 | -solaris1.*) os=`echo $os | sed -e 's|solaris1|sunos4|'` ;; -solaris) os=-solaris2 ;; -svr4*) os=-sysv4 ;; -unixware*) os=-sysv4.2uw ;; -gnu/linux*) os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` ;; # First accept the basic system types. # The portable systems comes first. # Each alternative MUST END IN A *, to match a version number. # -sysv* is not here because it comes later, after sysvr4. -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ | -aos* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* | -openbsd* \ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -chorusos* | -chorusrdb* \ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -mingw32* | -linux-gnu* | -linux-uclibc* | -uxpv* | -beos* | -mpeix* | -udk* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ | -skyos* | -haiku*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) case $basic_machine in x86-* | i*86-*) ;; *) os=-nto$os ;; esac ;; -nto-qnx*) ;; -nto*) os=`echo $os | sed -e 's|nto|nto-qnx|'` ;; -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) ;; -mac*) os=`echo $os | sed -e 's|mac|macos|'` ;; -linux-dietlibc) os=-linux-dietlibc ;; -linux*) os=`echo $os | sed -e 's|linux|linux-gnu|'` ;; -sunos5*) os=`echo $os | sed -e 's|sunos5|solaris2|'` ;; -sunos6*) os=`echo $os | sed -e 's|sunos6|solaris3|'` ;; -opened*) os=-openedition ;; -os400*) os=-os400 ;; -wince*) os=-wince ;; -osfrose*) os=-osfrose ;; -osf*) os=-osf ;; -utek*) os=-bsd ;; -dynix*) os=-bsd ;; -acis*) os=-aos ;; -atheos*) os=-atheos ;; -syllable*) os=-syllable ;; -386bsd) os=-bsd ;; -ctix* | -uts*) os=-sysv ;; -nova*) os=-rtmk-nova ;; -ns2 ) os=-nextstep2 ;; -nsk*) os=-nsk ;; # Preserve the version number of sinix5. -sinix5.*) os=`echo $os | sed -e 's|sinix|sysv|'` ;; -sinix*) os=-sysv4 ;; -tpf*) os=-tpf ;; -triton*) os=-sysv3 ;; -oss*) os=-sysv3 ;; -svr4) os=-sysv4 ;; -svr3) os=-sysv3 ;; -sysvr4) os=-sysv4 ;; # This must come after -sysvr4. -sysv*) ;; -ose*) os=-ose ;; -es1800*) os=-ose ;; -xenix) os=-xenix ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) os=-mint ;; -aros*) os=-aros ;; -kaos*) os=-kaos ;; -zvmoe) os=-zvmoe ;; -none) ;; *) # Get rid of the `-' at the beginning of $os. os=`echo $os | sed 's/[^-]*-//'` echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 exit 1 ;; esac else # Here we handle the default operating systems that come with various machines. # The value should be what the vendor currently ships out the door with their # machine or put another way, the most popular os provided with the machine. # Note that if you're going to try to match "-MANUFACTURER" here (say, # "-sun"), then you have to tell the case statement up towards the top # that MANUFACTURER isn't an operating system. Otherwise, code above # will signal an error saying that MANUFACTURER isn't an operating # system, and we'll never get to this point. case $basic_machine in *-acorn) os=-riscix1.2 ;; arm*-rebel) os=-linux ;; arm*-semi) os=-aout ;; c4x-* | tic4x-*) os=-coff ;; # This must come before the *-dec entry. pdp10-*) os=-tops20 ;; pdp11-*) os=-none ;; *-dec | vax-*) os=-ultrix4.2 ;; m68*-apollo) os=-domain ;; i386-sun) os=-sunos4.0.2 ;; m68000-sun) os=-sunos3 # This also exists in the configure program, but was not the # default. # os=-sunos4 ;; m68*-cisco) os=-aout ;; mips*-cisco) os=-elf ;; mips*-*) os=-elf ;; or32-*) os=-coff ;; *-tti) # must be before sparc entry or we get the wrong os. os=-sysv3 ;; sparc-* | *-sun) os=-sunos4.1.1 ;; *-be) os=-beos ;; *-haiku) os=-haiku ;; *-ibm) os=-aix ;; *-knuth) os=-mmixware ;; *-wec) os=-proelf ;; *-winbond) os=-proelf ;; *-oki) os=-proelf ;; *-hp) os=-hpux ;; *-hitachi) os=-hiux ;; i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) os=-sysv ;; *-cbm) os=-amigaos ;; *-dg) os=-dgux ;; *-dolphin) os=-sysv3 ;; m68k-ccur) os=-rtu ;; m88k-omron*) os=-luna ;; *-next ) os=-nextstep ;; *-sequent) os=-ptx ;; *-crds) os=-unos ;; *-ns) os=-genix ;; i370-*) os=-mvs ;; *-next) os=-nextstep3 ;; *-gould) os=-sysv ;; *-highlevel) os=-bsd ;; *-encore) os=-bsd ;; *-sgi) os=-irix ;; *-siemens) os=-sysv4 ;; *-masscomp) os=-rtu ;; f30[01]-fujitsu | f700-fujitsu) os=-uxpv ;; *-rom68k) os=-coff ;; *-*bug) os=-coff ;; *-apple) os=-macos ;; *-atari*) os=-mint ;; *) os=-none ;; esac fi # Here we handle the case where we know the os, and the CPU type, but not the # manufacturer. We pick the logical manufacturer. vendor=unknown case $basic_machine in *-unknown) case $os in -riscix*) vendor=acorn ;; -sunos*) vendor=sun ;; -aix*) vendor=ibm ;; -beos*) vendor=be ;; -hpux*) vendor=hp ;; -mpeix*) vendor=hp ;; -hiux*) vendor=hitachi ;; -unos*) vendor=crds ;; -dgux*) vendor=dg ;; -luna*) vendor=omron ;; -genix*) vendor=ns ;; -mvs* | -opened*) vendor=ibm ;; -os400*) vendor=ibm ;; -ptx*) vendor=sequent ;; -tpf*) vendor=ibm ;; -vxsim* | -vxworks* | -windiss*) vendor=wrs ;; -aux*) vendor=apple ;; -hms*) vendor=hitachi ;; -mpw* | -macos*) vendor=apple ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) vendor=atari ;; -vos*) vendor=stratus ;; esac basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` ;; esac echo $basic_machine$os exit # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: zapping-0.10cvs6/missing 755 764 144 25406 10304524022 10423 #! /bin/sh # Common stub for a few missing GNU programs while installing. scriptversion=2005-06-08.21 # Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005 # Free Software Foundation, Inc. # Originally by Fran,cois Pinard , 1996. # 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 this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA # 02110-1301, USA. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. if test $# -eq 0; then echo 1>&2 "Try \`$0 --help' for more information" exit 1 fi run=: # In the cases where this matters, `missing' is being run in the # srcdir already. if test -f configure.ac; then configure_ac=configure.ac else configure_ac=configure.in fi msg="missing on your system" case "$1" in --run) # Try to run requested program, and just exit if it succeeds. run= shift "$@" && exit 0 # Exit code 63 means version mismatch. This often happens # when the user try to use an ancient version of a tool on # a file that requires a minimum version. In this case we # we should proceed has if the program had been absent, or # if --run hadn't been passed. if test $? = 63; then run=: msg="probably too old" fi ;; -h|--h|--he|--hel|--help) echo "\ $0 [OPTION]... PROGRAM [ARGUMENT]... Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an error status if there is no known handling for PROGRAM. Options: -h, --help display this help and exit -v, --version output version information and exit --run try to run the given command, and emulate it if it fails Supported PROGRAM values: aclocal touch file \`aclocal.m4' autoconf touch file \`configure' autoheader touch file \`config.h.in' automake touch all \`Makefile.in' files bison create \`y.tab.[ch]', if possible, from existing .[ch] flex create \`lex.yy.c', if possible, from existing .c help2man touch the output file lex create \`lex.yy.c', if possible, from existing .c makeinfo touch the output file tar try tar, gnutar, gtar, then tar without non-portable flags yacc create \`y.tab.[ch]', if possible, from existing .[ch] Send bug reports to ." exit $? ;; -v|--v|--ve|--ver|--vers|--versi|--versio|--version) echo "missing $scriptversion (GNU Automake)" exit $? ;; -*) echo 1>&2 "$0: Unknown \`$1' option" echo 1>&2 "Try \`$0 --help' for more information" exit 1 ;; esac # Now exit if we have it, but it failed. Also exit now if we # don't have it and --version was passed (most likely to detect # the program). case "$1" in lex|yacc) # Not GNU programs, they don't have --version. ;; tar) if test -n "$run"; then echo 1>&2 "ERROR: \`tar' requires --run" exit 1 elif test "x$2" = "x--version" || test "x$2" = "x--help"; then exit 1 fi ;; *) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 elif test "x$2" = "x--version" || test "x$2" = "x--help"; then # Could not run --version or --help. This is probably someone # running `$TOOL --version' or `$TOOL --help' to check whether # $TOOL exists and not knowing $TOOL uses missing. exit 1 fi ;; esac # If it does not exist, or fails to run (possibly an outdated version), # try to emulate it. case "$1" in aclocal*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." touch aclocal.m4 ;; autoconf) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." touch configure ;; autoheader) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`acconfig.h' or \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}` test -z "$files" && files="config.h" touch_files= for f in $files; do case "$f" in *:*) touch_files="$touch_files "`echo "$f" | sed -e 's/^[^:]*://' -e 's/:.*//'`;; *) touch_files="$touch_files $f.in";; esac done touch $touch_files ;; automake*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." find . -type f -name Makefile.am -print | sed 's/\.am$/.in/' | while read f; do touch "$f"; done ;; autom4te) echo 1>&2 "\ WARNING: \`$1' is needed, but is $msg. You might have modified some files without having the proper tools for further handling them. You can get \`$1' as part of \`Autoconf' from any GNU archive site." file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'` test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'` if test -f "$file"; then touch $file else test -z "$file" || exec >$file echo "#! /bin/sh" echo "# Created by GNU Automake missing as a replacement of" echo "# $ $@" echo "exit 0" chmod +x $file exit 1 fi ;; bison|yacc) echo 1>&2 "\ WARNING: \`$1' $msg. You should only need it if you modified a \`.y' file. You may need the \`Bison' package in order for those modifications to take effect. You can get \`Bison' from any GNU archive site." rm -f y.tab.c y.tab.h if [ $# -ne 1 ]; then eval LASTARG="\${$#}" case "$LASTARG" in *.y) SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` if [ -f "$SRCFILE" ]; then cp "$SRCFILE" y.tab.c fi SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` if [ -f "$SRCFILE" ]; then cp "$SRCFILE" y.tab.h fi ;; esac fi if [ ! -f y.tab.h ]; then echo >y.tab.h fi if [ ! -f y.tab.c ]; then echo 'main() { return 0; }' >y.tab.c fi ;; lex|flex) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a \`.l' file. You may need the \`Flex' package in order for those modifications to take effect. You can get \`Flex' from any GNU archive site." rm -f lex.yy.c if [ $# -ne 1 ]; then eval LASTARG="\${$#}" case "$LASTARG" in *.l) SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` if [ -f "$SRCFILE" ]; then cp "$SRCFILE" lex.yy.c fi ;; esac fi if [ ! -f lex.yy.c ]; then echo 'main() { return 0; }' >lex.yy.c fi ;; help2man) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a dependency of a manual page. You may need the \`Help2man' package in order for those modifications to take effect. You can get \`Help2man' from any GNU archive site." file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` if test -z "$file"; then file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'` fi if [ -f "$file" ]; then touch $file else test -z "$file" || exec >$file echo ".ab help2man is required to generate this page" exit 1 fi ;; makeinfo) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a \`.texi' or \`.texinfo' file, or any other file indirectly affecting the aspect of the manual. The spurious call might also be the consequence of using a buggy \`make' (AIX, DU, IRIX). You might want to install the \`Texinfo' package or the \`GNU make' package. Grab either from any GNU archive site." # The file to touch is that specified with -o ... file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` if test -z "$file"; then # ... or it is the one specified with @setfilename ... infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $infile` # ... or it is derived from the source name (dir/f.texi becomes f.info) test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info fi # If the file does not exist, the user really needs makeinfo; # let's fail without touching anything. test -f $file || exit 1 touch $file ;; tar) shift # We have already tried tar in the generic part. # Look for gnutar/gtar before invocation to avoid ugly error # messages. if (gnutar --version > /dev/null 2>&1); then gnutar "$@" && exit 0 fi if (gtar --version > /dev/null 2>&1); then gtar "$@" && exit 0 fi firstarg="$1" if shift; then case "$firstarg" in *o*) firstarg=`echo "$firstarg" | sed s/o//` tar "$firstarg" "$@" && exit 0 ;; esac case "$firstarg" in *h*) firstarg=`echo "$firstarg" | sed s/h//` tar "$firstarg" "$@" && exit 0 ;; esac fi echo 1>&2 "\ WARNING: I can't seem to be able to run \`tar' with the given arguments. You may want to install GNU tar or Free paxutils, or check the command line arguments." exit 1 ;; *) echo 1>&2 "\ WARNING: \`$1' is needed, and is $msg. You might have modified some files without having the proper tools for further handling them. Check the \`README' file, it often tells you about the needed prerequisites for installing this package. You may also peek at any GNU archive site, in case some other package would contain this missing \`$1' program." exit 1 ;; esac exit 0 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-end: "$" # End: zapping-0.10cvs6/common/ 777 764 144 0 10443536337 10311 5zapping-0.10cvs6/common/ioctl_meteor.h 644 764 144 21532 7762173331 13147 /* * Copyright (c) 1995 Mark Tinguely and Jim Lowe * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by Mark Tinguely and Jim Lowe * 4. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/i386/include/ioctl_meteor.h,v 1.11 1999/12/29 04:33:02 peter Exp $ */ /* * ioctl constants for Matrox Meteor Capture card. */ #ifndef _MACHINE_IOCTL_METEOR_H_ #define _MACHINE_IOCTL_METEOR_H_ #ifndef _KERNEL #include #endif #include struct meteor_capframe { short command; /* see below for valid METEORCAPFRM commands */ short lowat; /* start transfer if < this number */ short hiwat; /* stop transfer if > this number */ } ; /* structure for METEOR[GS]ETGEO - get/set geometry */ struct meteor_geomet { u_short rows; u_short columns; u_short frames; u_long oformat; } ; /* structure for METEORGCOUNT-get count of frames, fifo errors and dma errors */ struct meteor_counts { u_long fifo_errors; /* count of fifo errors since open */ u_long dma_errors; /* count of dma errors since open */ u_long frames_captured; /* count of frames captured since open */ u_long even_fields_captured; /* count of even fields captured */ u_long odd_fields_captured; /* count of odd fields captured */ } ; /* structure for getting and setting direct transfers to vram */ struct meteor_video { u_long addr; /* Address of location to dma to */ u_long width; /* Width of memory area */ u_long banksize; /* Size of Vram bank */ u_long ramsize; /* Size of Vram */ }; #define METEORCAPTUR _IOW('x', 1, int) /* capture a frame */ #define METEORCAPFRM _IOW('x', 2, struct meteor_capframe) /* sync capture */ #define METEORSETGEO _IOW('x', 3, struct meteor_geomet) /* set geometry */ #define METEORGETGEO _IOR('x', 4, struct meteor_geomet) /* get geometry */ #define METEORSTATUS _IOR('x', 5, unsigned short) /* get status */ #define METEORSHUE _IOW('x', 6, signed char) /* set hue */ #define METEORGHUE _IOR('x', 6, signed char) /* get hue */ #define METEORSFMT _IOW('x', 7, unsigned long) /* set format */ #define METEORGFMT _IOR('x', 7, unsigned long) /* get format */ #define METEORSINPUT _IOW('x', 8, unsigned long) /* set input dev */ #define METEORGINPUT _IOR('x', 8, unsigned long) /* get input dev */ #define METEORSCHCV _IOW('x', 9, unsigned char) /* set uv gain */ #define METEORGCHCV _IOR('x', 9, unsigned char) /* get uv gain */ #define METEORSCOUNT _IOW('x',10, struct meteor_counts) #define METEORGCOUNT _IOR('x',10, struct meteor_counts) #define METEORSFPS _IOW('x',11, unsigned short) /* set fps */ #define METEORGFPS _IOR('x',11, unsigned short) /* get fps */ #define METEORSSIGNAL _IOW('x', 12, unsigned int) /* set signal */ #define METEORGSIGNAL _IOR('x', 12, unsigned int) /* get signal */ #define METEORSVIDEO _IOW('x', 13, struct meteor_video) /* set video */ #define METEORGVIDEO _IOR('x', 13, struct meteor_video) /* get video */ #define METEORSBRIG _IOW('x', 14, unsigned char) /* set brightness */ #define METEORGBRIG _IOR('x', 14, unsigned char) /* get brightness */ #define METEORSCSAT _IOW('x', 15, unsigned char) /* set chroma sat */ #define METEORGCSAT _IOR('x', 15, unsigned char) /* get uv saturation */ #define METEORSCONT _IOW('x', 16, unsigned char) /* set contrast */ #define METEORGCONT _IOR('x', 16, unsigned char) /* get contrast */ #define METEORSBT254 _IOW('x', 17, unsigned short) /* set Bt254 reg */ #define METEORGBT254 _IOR('x', 17, unsigned short) /* get Bt254 reg */ #define METEORSHWS _IOW('x', 18, unsigned char) /* set hor start reg */ #define METEORGHWS _IOR('x', 18, unsigned char) /* get hor start reg */ #define METEORSVWS _IOW('x', 19, unsigned char) /* set vert start reg */ #define METEORGVWS _IOR('x', 19, unsigned char) /* get vert start reg */ #define METEORSTS _IOW('x', 20, unsigned char) /* set time stamp */ #define METEORGTS _IOR('x', 20, unsigned char) /* get time stamp */ #define METEOR_STATUS_ID_MASK 0xf000 /* ID of 7196 */ #define METEOR_STATUS_DIR 0x0800 /* Direction of Expansion port YUV */ #define METEOR_STATUS_OEF 0x0200 /* Field detected: Even/Odd */ #define METEOR_STATUS_SVP 0x0100 /* State of VRAM Port:inactive/active */ #define METEOR_STATUS_STTC 0x0080 /* Time Constant: TV/VCR */ #define METEOR_STATUS_HCLK 0x0040 /* Horiz PLL: locked/unlocked */ #define METEOR_STATUS_FIDT 0x0020 /* Field detect: 50/60hz */ #define METEOR_STATUS_ALTD 0x0002 /* Line alt: no line alt/line alt */ #define METEOR_STATUS_CODE 0x0001 /* Colour info: no colour/colour */ /* METEORCAPTUR capture options */ #define METEOR_CAP_SINGLE 0x0001 /* capture one frame */ #define METEOR_CAP_CONTINOUS 0x0002 /* continuously capture */ #define METEOR_CAP_STOP_CONT 0x0004 /* stop the continuous capture */ /* METEORCAPFRM capture commands */ #define METEOR_CAP_N_FRAMES 0x0001 /* capture N frames */ #define METEOR_CAP_STOP_FRAMES 0x0002 /* stop capture N frames */ #define METEOR_HALT_N_FRAMES 0x0003 /* halt of capture N frames */ #define METEOR_CONT_N_FRAMES 0x0004 /* continue after above halt */ /* valid video input formats: */ #define METEOR_FMT_NTSC 0x00100 /* NTSC -- initialized default */ #define METEOR_FMT_PAL 0x00200 /* PAL */ #define METEOR_FMT_SECAM 0x00400 /* SECAM */ #define METEOR_FMT_AUTOMODE 0x00800 /* auto-mode */ #define METEOR_INPUT_DEV0 0x01000 /* camera input 0 -- default */ #define METEOR_INPUT_DEV_RCA METEOR_INPUT_DEV0 #define METEOR_INPUT_DEV1 0x02000 /* camera input 1 */ #define METEOR_INPUT_DEV2 0x04000 /* camera input 2 */ #define METEOR_INPUT_DEV3 0x08000 /* camera input 3 */ #define METEOR_INPUT_DEV_RGB 0x0a000 /* for rgb version of meteor */ #define METEOR_INPUT_DEV_SVIDEO 0x06000 /* S-video input port */ /* valid video output formats: */ #define METEOR_GEO_RGB16 0x0010000 /* packed -- initialized default */ #define METEOR_GEO_RGB24 0x0020000 /* RBG 24 bits packed */ /* internally stored in 32 bits */ #define METEOR_GEO_YUV_PACKED 0x0040000 /* 4-2-2 YUV 16 bits packed */ #define METEOR_GEO_YUV_PLANAR 0x0080000 /* 4-2-2 YUV 16 bits planer */ #define METEOR_GEO_YUV_PLANER METEOR_GEO_YUV_PLANAR #define METEOR_GEO_UNSIGNED 0x0400000 /* unsigned uv outputs */ #define METEOR_GEO_EVEN_ONLY 0x1000000 /* set for even only field capture */ #define METEOR_GEO_ODD_ONLY 0x2000000 /* set for odd only field capture */ #define METEOR_GEO_FIELD_MASK 0x3000000 #define METEOR_GEO_YUV_422 0x4000000 /* 4-2-2 YUV in Y-U-V combined */ #define METEOR_GEO_OUTPUT_MASK 0x40f0000 #define METEOR_GEO_YUV_12 0x10000000 /* YUV 12 format */ #define METEOR_GEO_YUV_9 0x40000000 /* YUV 9 format */ #define METEOR_FIELD_MODE 0x80000000 /* Field cap or Frame cap */ #define METEOR_SIG_MODE_MASK 0xffff0000 #define METEOR_SIG_FRAME 0x00000000 /* signal every frame */ #define METEOR_SIG_FIELD 0x00010000 /* signal every field */ /* following structure is used to coordinate the synchronous */ struct meteor_mem { /* kernel write only */ int frame_size; /* row*columns*depth */ unsigned num_bufs; /* number of frames in buffer (1-32) */ /* user and kernel change these */ int lowat; /* kernel starts capture if < this number */ int hiwat; /* kernel stops capture if > this number. hiwat <= numbufs */ unsigned active; /* bit mask of active frame buffers kernel sets, user clears */ int num_active_bufs; /* count of active frame buffer kernel increments, user decrements */ /* reference to mmapped data */ caddr_t buf; /* The real space (virtual addr) */ } ; #endif /* !_MACHINE_IOCTL_METEOR_H_ */ zapping-0.10cvs6/common/_videodev.h 644 764 144 37723 10427306000 12436 /* Generated file, do not edit! */ #include #include "common/device.h" #ifndef __GNUC__ #undef __attribute__ #define __attribute__(x) #endif static void fprint_struct_video_play_mode (FILE *fp, int rw __attribute__ ((unused)), const struct video_play_mode *t) { fprintf (fp, "mode=%ld " "p1=%ld " "p2=%ld ", (long) t->mode, (long) t->p1, (long) t->p2); } static void fprint_struct_video_capture (FILE *fp, int rw __attribute__ ((unused)), const struct video_capture *t) { fprintf (fp, "x=%lu " "y=%lu " "width=%lu " "height=%lu " "decimation=%lu " "flags=", (unsigned long) t->x, (unsigned long) t->y, (unsigned long) t->width, (unsigned long) t->height, (unsigned long) t->decimation); fprint_symbolic (fp, 2, t->flags, "ODD", (unsigned long) VIDEO_CAPTURE_ODD, "EVEN", (unsigned long) VIDEO_CAPTURE_EVEN, (void *) 0); fputs (" ", fp); } static void fprint_struct_video_code (FILE *fp, int rw __attribute__ ((unused)), const struct video_code *t) { fprintf (fp, "loadwhat=\"%.*s\" " "datasize=%ld " "data=%p ", 16, (const char *) t->loadwhat, (long) t->datasize, (const void *) t->data); } static void fprint_struct_video_unit (FILE *fp, int rw __attribute__ ((unused)), const struct video_unit *t) { fprintf (fp, "video=%ld " "vbi=%ld " "radio=%ld " "audio=%ld " "teletext=%ld ", (long) t->video, (long) t->vbi, (long) t->radio, (long) t->audio, (long) t->teletext); } static void fprint_struct_video_window (FILE *fp, int rw __attribute__ ((unused)), const struct video_window *t) { fprintf (fp, "x=%lu " "y=%lu " "width=%lu " "height=%lu " "chromakey=%lu " "flags=", (unsigned long) t->x, (unsigned long) t->y, (unsigned long) t->width, (unsigned long) t->height, (unsigned long) t->chromakey); fprint_symbolic (fp, 2, t->flags, "INTERLACE", (unsigned long) VIDEO_WINDOW_INTERLACE, "CHROMAKEY", (unsigned long) VIDEO_WINDOW_CHROMAKEY, (void *) 0); fprintf (fp, " clips=%p " "clipcount=%ld ", (const void *) t->clips, (long) t->clipcount); } static void fprint_symbol_video_palette_ (FILE *fp, int rw __attribute__ ((unused)), unsigned long value) { fprint_symbolic (fp, 0, value, "GREY", (unsigned long) VIDEO_PALETTE_GREY, "HI240", (unsigned long) VIDEO_PALETTE_HI240, "RGB565", (unsigned long) VIDEO_PALETTE_RGB565, "RGB24", (unsigned long) VIDEO_PALETTE_RGB24, "RGB32", (unsigned long) VIDEO_PALETTE_RGB32, "RGB555", (unsigned long) VIDEO_PALETTE_RGB555, "YUV422", (unsigned long) VIDEO_PALETTE_YUV422, "YUYV", (unsigned long) VIDEO_PALETTE_YUYV, "UYVY", (unsigned long) VIDEO_PALETTE_UYVY, "YUV420", (unsigned long) VIDEO_PALETTE_YUV420, "YUV411", (unsigned long) VIDEO_PALETTE_YUV411, "RAW", (unsigned long) VIDEO_PALETTE_RAW, "YUV422P", (unsigned long) VIDEO_PALETTE_YUV422P, "YUV411P", (unsigned long) VIDEO_PALETTE_YUV411P, "YUV420P", (unsigned long) VIDEO_PALETTE_YUV420P, "YUV410P", (unsigned long) VIDEO_PALETTE_YUV410P, "PLANAR", (unsigned long) VIDEO_PALETTE_PLANAR, "COMPONENT", (unsigned long) VIDEO_PALETTE_COMPONENT, (void *) 0); } static void fprint_struct_video_picture (FILE *fp, int rw __attribute__ ((unused)), const struct video_picture *t) { fprintf (fp, "brightness=%lu " "hue=%lu " "colour=%lu " "contrast=%lu " "whiteness=%lu " "depth=%lu " "palette=", (unsigned long) t->brightness, (unsigned long) t->hue, (unsigned long) t->colour, (unsigned long) t->contrast, (unsigned long) t->whiteness, (unsigned long) t->depth); fprint_symbol_video_palette_ (fp, rw, t->palette); fputs (" ", fp); } static void fprint_struct_video_mmap (FILE *fp, int rw __attribute__ ((unused)), const struct video_mmap *t) { fprintf (fp, "frame=%lu " "height=%ld " "width=%ld " "format=%lu ", (unsigned long) t->frame, (long) t->height, (long) t->width, (unsigned long) t->format); } static void fprint_struct_video_buffer (FILE *fp, int rw __attribute__ ((unused)), const struct video_buffer *t) { fprintf (fp, "base=%p " "height=%ld " "width=%ld " "depth=%ld " "bytesperline=%ld ", (const void *) t->base, (long) t->height, (long) t->width, (long) t->depth, (long) t->bytesperline); } static void fprint_struct_video_mbuf (FILE *fp, int rw __attribute__ ((unused)), const struct video_mbuf *t) { fprintf (fp, "size=%ld " "frames=%ld " "offsets[]=? ", (long) t->size, (long) t->frames); } static void fprint_symbol_video_audio_ (FILE *fp, int rw __attribute__ ((unused)), unsigned long value) { fprint_symbolic (fp, 2, value, "MUTE", (unsigned long) VIDEO_AUDIO_MUTE, "MUTABLE", (unsigned long) VIDEO_AUDIO_MUTABLE, "VOLUME", (unsigned long) VIDEO_AUDIO_VOLUME, "BASS", (unsigned long) VIDEO_AUDIO_BASS, "TREBLE", (unsigned long) VIDEO_AUDIO_TREBLE, (void *) 0); } static void fprint_symbol_video_sound_ (FILE *fp, int rw __attribute__ ((unused)), unsigned long value) { fprint_symbolic (fp, 0, value, "MONO", (unsigned long) VIDEO_SOUND_MONO, "STEREO", (unsigned long) VIDEO_SOUND_STEREO, "LANG1", (unsigned long) VIDEO_SOUND_LANG1, "LANG2", (unsigned long) VIDEO_SOUND_LANG2, (void *) 0); } static void fprint_struct_video_audio (FILE *fp, int rw __attribute__ ((unused)), const struct video_audio *t) { fprintf (fp, "audio=%ld " "volume=%lu " "bass=%lu " "treble=%lu " "flags=", (long) t->audio, (unsigned long) t->volume, (unsigned long) t->bass, (unsigned long) t->treble); fprint_symbol_video_audio_ (fp, rw, t->flags); fprintf (fp, " name=\"%.*s\" " "mode=", 16, (const char *) t->name); fprint_symbol_video_sound_ (fp, rw, t->mode); fprintf (fp, " balance=%lu " "step=%lu ", (unsigned long) t->balance, (unsigned long) t->step); } static void fprint_struct_vbi_format (FILE *fp, int rw __attribute__ ((unused)), const struct vbi_format *t) { fprintf (fp, "sampling_rate=%lu " "samples_per_line=%lu " "sample_format=%lu " "start[]=? " "count[]=? " "flags=", (unsigned long) t->sampling_rate, (unsigned long) t->samples_per_line, (unsigned long) t->sample_format); fprint_symbolic (fp, 2, t->flags, "UNSYNC", (unsigned long) VBI_UNSYNC, "INTERLACED", (unsigned long) VBI_INTERLACED, (void *) 0); fputs (" ", fp); } static void fprint_struct_video_info (FILE *fp, int rw __attribute__ ((unused)), const struct video_info *t) { fprintf (fp, "frame_count=%lu " "h_size=%lu " "v_size=%lu " "smpte_timecode=%lu " "picture_type=%lu " "temporal_reference=%lu " "user_data[]=? ", (unsigned long) t->frame_count, (unsigned long) t->h_size, (unsigned long) t->v_size, (unsigned long) t->smpte_timecode, (unsigned long) t->picture_type, (unsigned long) t->temporal_reference); } static void fprint_struct_video_channel (FILE *fp, int rw __attribute__ ((unused)), const struct video_channel *t) { fprintf (fp, "channel=%ld ", (long) t->channel); if (1 == rw) { fprintf (fp, "name=\"%.*s\" " "tuners=%ld " "flags=", 32, (const char *) t->name, (long) t->tuners); fprint_symbolic (fp, 2, t->flags, "TUNER", (unsigned long) VIDEO_VC_TUNER, "AUDIO", (unsigned long) VIDEO_VC_AUDIO, (void *) 0); fputs (" type=", fp); fprint_symbolic (fp, 0, t->type, "TV", (unsigned long) VIDEO_TYPE_TV, "CAMERA", (unsigned long) VIDEO_TYPE_CAMERA, (void *) 0); fputs (" ", fp); } fprintf (fp, "norm=%lu ", (unsigned long) t->norm); } static void fprint_symbol_video_tuner_ (FILE *fp, int rw __attribute__ ((unused)), unsigned long value) { fprint_symbolic (fp, 2, value, "PAL", (unsigned long) VIDEO_TUNER_PAL, "NTSC", (unsigned long) VIDEO_TUNER_NTSC, "SECAM", (unsigned long) VIDEO_TUNER_SECAM, "LOW", (unsigned long) VIDEO_TUNER_LOW, "NORM", (unsigned long) VIDEO_TUNER_NORM, "STEREO_ON", (unsigned long) VIDEO_TUNER_STEREO_ON, "RDS_ON", (unsigned long) VIDEO_TUNER_RDS_ON, "MBS_ON", (unsigned long) VIDEO_TUNER_MBS_ON, (void *) 0); } static void fprint_symbol_video_mode_ (FILE *fp, int rw __attribute__ ((unused)), unsigned long value) { fprint_symbolic (fp, 0, value, "PAL", (unsigned long) VIDEO_MODE_PAL, "NTSC", (unsigned long) VIDEO_MODE_NTSC, "SECAM", (unsigned long) VIDEO_MODE_SECAM, "AUTO", (unsigned long) VIDEO_MODE_AUTO, (void *) 0); } static void fprint_struct_video_tuner (FILE *fp, int rw __attribute__ ((unused)), const struct video_tuner *t) { fprintf (fp, "tuner=%ld ", (long) t->tuner); if (1 == rw) { fprintf (fp, "name=\"%.*s\" " "rangelow=%lu " "rangehigh=%lu " "flags=", 32, (const char *) t->name, (unsigned long) t->rangelow, (unsigned long) t->rangehigh); fprint_symbol_video_tuner_ (fp, rw, t->flags); fputs (" ", fp); } fputs ("mode=", fp); fprint_symbol_video_mode_ (fp, rw, t->mode); fputs (" ", fp); if (1 == rw) { fprintf (fp, "signal=%lu ", (unsigned long) t->signal); } } static void fprint_struct_video_key (FILE *fp, int rw __attribute__ ((unused)), const struct video_key *t) { fprintf (fp, "key[]=? " "flags=0x%lx ", (unsigned long) t->flags); } static void fprint_symbol_vid_type_ (FILE *fp, int rw __attribute__ ((unused)), unsigned long value) { fprint_symbolic (fp, 0, value, "CAPTURE", (unsigned long) VID_TYPE_CAPTURE, "TUNER", (unsigned long) VID_TYPE_TUNER, "TELETEXT", (unsigned long) VID_TYPE_TELETEXT, "OVERLAY", (unsigned long) VID_TYPE_OVERLAY, "CHROMAKEY", (unsigned long) VID_TYPE_CHROMAKEY, "CLIPPING", (unsigned long) VID_TYPE_CLIPPING, "FRAMERAM", (unsigned long) VID_TYPE_FRAMERAM, "SCALES", (unsigned long) VID_TYPE_SCALES, "MONOCHROME", (unsigned long) VID_TYPE_MONOCHROME, "SUBCAPTURE", (unsigned long) VID_TYPE_SUBCAPTURE, "MPEG_DECODER", (unsigned long) VID_TYPE_MPEG_DECODER, "MPEG_ENCODER", (unsigned long) VID_TYPE_MPEG_ENCODER, "MJPEG_DECODER", (unsigned long) VID_TYPE_MJPEG_DECODER, "MJPEG_ENCODER", (unsigned long) VID_TYPE_MJPEG_ENCODER, (void *) 0); } static void fprint_struct_video_capability (FILE *fp, int rw __attribute__ ((unused)), const struct video_capability *t) { fprintf (fp, "name=\"%.*s\" " "type=", 32, (const char *) t->name); fprint_symbol_vid_type_ (fp, rw, t->type); fprintf (fp, " channels=%ld " "audios=%ld " "maxwidth=%ld " "maxheight=%ld " "minwidth=%ld " "minheight=%ld ", (long) t->channels, (long) t->audios, (long) t->maxwidth, (long) t->maxheight, (long) t->minwidth, (long) t->minheight); } static void fprint_v4l_ioctl_arg (FILE *fp, unsigned int cmd, int rw, void *arg) { switch (cmd) { case VIDIOCSPLAYMODE: if (!arg) { fputs ("VIDIOCSPLAYMODE", fp); return; } fprint_struct_video_play_mode (fp, rw, arg); break; case VIDIOCGCAPTURE: if (!arg) { fputs ("VIDIOCGCAPTURE", fp); return; } case VIDIOCSCAPTURE: if (!arg) { fputs ("VIDIOCSCAPTURE", fp); return; } fprint_struct_video_capture (fp, rw, arg); break; case VIDIOCCAPTURE: if (!arg) { fputs ("VIDIOCCAPTURE", fp); return; } case VIDIOCSYNC: if (!arg) { fputs ("VIDIOCSYNC", fp); return; } case VIDIOCSWRITEMODE: if (!arg) { fputs ("VIDIOCSWRITEMODE", fp); return; } fprintf (fp, "%ld", (long) * (int *) arg); break; case VIDIOCSMICROCODE: if (!arg) { fputs ("VIDIOCSMICROCODE", fp); return; } fprint_struct_video_code (fp, rw, arg); break; case VIDIOCGFREQ: if (!arg) { fputs ("VIDIOCGFREQ", fp); return; } case VIDIOCSFREQ: if (!arg) { fputs ("VIDIOCSFREQ", fp); return; } fprintf (fp, "%lu", (unsigned long) * (unsigned long *) arg); break; case VIDIOCGUNIT: if (!arg) { fputs ("VIDIOCGUNIT", fp); return; } fprint_struct_video_unit (fp, rw, arg); break; case VIDIOCGWIN: if (!arg) { fputs ("VIDIOCGWIN", fp); return; } case VIDIOCSWIN: if (!arg) { fputs ("VIDIOCSWIN", fp); return; } fprint_struct_video_window (fp, rw, arg); break; case VIDIOCGPICT: if (!arg) { fputs ("VIDIOCGPICT", fp); return; } case VIDIOCSPICT: if (!arg) { fputs ("VIDIOCSPICT", fp); return; } fprint_struct_video_picture (fp, rw, arg); break; case VIDIOCMCAPTURE: if (!arg) { fputs ("VIDIOCMCAPTURE", fp); return; } fprint_struct_video_mmap (fp, rw, arg); break; case VIDIOCGFBUF: if (!arg) { fputs ("VIDIOCGFBUF", fp); return; } case VIDIOCSFBUF: if (!arg) { fputs ("VIDIOCSFBUF", fp); return; } fprint_struct_video_buffer (fp, rw, arg); break; case VIDIOCGMBUF: if (!arg) { fputs ("VIDIOCGMBUF", fp); return; } fprint_struct_video_mbuf (fp, rw, arg); break; case VIDIOCGAUDIO: if (!arg) { fputs ("VIDIOCGAUDIO", fp); return; } case VIDIOCSAUDIO: if (!arg) { fputs ("VIDIOCSAUDIO", fp); return; } fprint_struct_video_audio (fp, rw, arg); break; case VIDIOCGVBIFMT: if (!arg) { fputs ("VIDIOCGVBIFMT", fp); return; } case VIDIOCSVBIFMT: if (!arg) { fputs ("VIDIOCSVBIFMT", fp); return; } fprint_struct_vbi_format (fp, rw, arg); break; case VIDIOCGPLAYINFO: if (!arg) { fputs ("VIDIOCGPLAYINFO", fp); return; } fprint_struct_video_info (fp, rw, arg); break; case VIDIOCGCHAN: if (!arg) { fputs ("VIDIOCGCHAN", fp); return; } case VIDIOCSCHAN: if (!arg) { fputs ("VIDIOCSCHAN", fp); return; } fprint_struct_video_channel (fp, rw, arg); break; case VIDIOCGTUNER: if (!arg) { fputs ("VIDIOCGTUNER", fp); return; } case VIDIOCSTUNER: if (!arg) { fputs ("VIDIOCSTUNER", fp); return; } fprint_struct_video_tuner (fp, rw, arg); break; case VIDIOCKEY: if (!arg) { fputs ("VIDIOCKEY", fp); return; } fprint_struct_video_key (fp, rw, arg); break; case VIDIOCGCAP: if (!arg) { fputs ("VIDIOCGCAP", fp); return; } fprint_struct_video_capability (fp, rw, arg); break; default: if (!arg) { fprint_unknown_ioctl (fp, cmd, arg); return; } break; } } static __inline__ void IOCTL_ARG_TYPE_CHECK_VIDIOCGCAP (struct video_capability *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_VIDIOCGCHAN (struct video_channel *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_VIDIOCSCHAN (const struct video_channel *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_VIDIOCGTUNER (struct video_tuner *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_VIDIOCSTUNER (const struct video_tuner *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_VIDIOCGPICT (struct video_picture *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_VIDIOCSPICT (const struct video_picture *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_VIDIOCCAPTURE (const int *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_VIDIOCGWIN (struct video_window *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_VIDIOCSWIN (const struct video_window *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_VIDIOCGFBUF (struct video_buffer *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_VIDIOCSFBUF (const struct video_buffer *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_VIDIOCKEY (struct video_key *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_VIDIOCGFREQ (unsigned long *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_VIDIOCSFREQ (const unsigned long *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_VIDIOCGAUDIO (struct video_audio *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_VIDIOCSAUDIO (const struct video_audio *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_VIDIOCSYNC (const int *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_VIDIOCMCAPTURE (const struct video_mmap *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_VIDIOCGMBUF (struct video_mbuf *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_VIDIOCGUNIT (struct video_unit *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_VIDIOCGCAPTURE (struct video_capture *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_VIDIOCSCAPTURE (const struct video_capture *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_VIDIOCSPLAYMODE (const struct video_play_mode *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_VIDIOCSWRITEMODE (const int *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_VIDIOCGPLAYINFO (struct video_info *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_VIDIOCSMICROCODE (const struct video_code *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_VIDIOCGVBIFMT (struct vbi_format *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_VIDIOCSVBIFMT (const struct vbi_format *arg __attribute__ ((unused))) {} zapping-0.10cvs6/common/_bktr.h 644 764 144 65601 10427306000 11567 /* Generated file, do not edit! */ #include #include "common/device.h" #ifndef __GNUC__ #undef __attribute__ #define __attribute__(x) #endif static void fprint_METEORSTATUS (FILE *fp, int rw __attribute__ ((unused)), unsigned short *arg) { fprint_symbolic (fp, 0, (unsigned long) *arg, "ID_MASK", (unsigned long) METEOR_STATUS_ID_MASK, "DIR", (unsigned long) METEOR_STATUS_DIR, "OEF", (unsigned long) METEOR_STATUS_OEF, "SVP", (unsigned long) METEOR_STATUS_SVP, "STTC", (unsigned long) METEOR_STATUS_STTC, "HCLK", (unsigned long) METEOR_STATUS_HCLK, "FIDT", (unsigned long) METEOR_STATUS_FIDT, "ALTD", (unsigned long) METEOR_STATUS_ALTD, "CODE", (unsigned long) METEOR_STATUS_CODE, 0); } static void fprint_struct_bktr_capture_area (FILE *fp, int rw __attribute__ ((unused)), const struct bktr_capture_area *t) { fprintf (fp, "x_offset=%ld " "y_offset=%ld " "x_size=%ld " "y_size=%ld ", (long) t->x_offset, (long) t->y_offset, (long) t->x_size, (long) t->y_size); } static void fprint_METEORGSIGNAL (FILE *fp, int rw __attribute__ ((unused)), unsigned int *arg) { fprint_symbolic (fp, 0, (unsigned long) *arg, "MODE_MASK", (unsigned long) METEOR_SIG_MODE_MASK, "FRAME", (unsigned long) METEOR_SIG_FRAME, "FIELD", (unsigned long) METEOR_SIG_FIELD, 0); } static void fprint_struct_bktr_chnlset (FILE *fp, int rw __attribute__ ((unused)), const struct bktr_chnlset *t) { fprintf (fp, "index=%ld " "max_channel=%ld " "name=\"%.*s\" ", (long) t->index, (long) t->max_channel, BT848_MAX_CHNLSET_NAME_LEN, (const char *) t->name); } static void fprint_struct_meteor_pixfmt (FILE *fp, int rw __attribute__ ((unused)), const struct meteor_pixfmt *t) { fprintf (fp, "index=%lu " "type=? " "Bpp=%lu " "masks[]=? ", (unsigned long) t->index, (unsigned long) t->Bpp); } static void fprint_METEORSSIGNAL (FILE *fp, int rw __attribute__ ((unused)), unsigned int *arg) { fprint_symbolic (fp, 0, (unsigned long) *arg, "MODE_MASK", (unsigned long) METEOR_SIG_MODE_MASK, "FRAME", (unsigned long) METEOR_SIG_FRAME, "FIELD", (unsigned long) METEOR_SIG_FIELD, 0); } static void fprint_TVTUNER_GETCHNL (FILE *fp, int rw __attribute__ ((unused)), unsigned int *arg) { fprint_symbolic (fp, 0, (unsigned long) *arg, "NABCST", (unsigned long) CHNLSET_NABCST, "CABLEIRC", (unsigned long) CHNLSET_CABLEIRC, "CABLEHRC", (unsigned long) CHNLSET_CABLEHRC, "WEUROPE", (unsigned long) CHNLSET_WEUROPE, "JPNBCST", (unsigned long) CHNLSET_JPNBCST, "JPNCABLE", (unsigned long) CHNLSET_JPNCABLE, "XUSSR", (unsigned long) CHNLSET_XUSSR, "AUSTRALIA", (unsigned long) CHNLSET_AUSTRALIA, "FRANCE", (unsigned long) CHNLSET_FRANCE, "MIN", (unsigned long) CHNLSET_MIN, "MAX", (unsigned long) CHNLSET_MAX, 0); } static void fprint_struct_meteor_capframe (FILE *fp, int rw __attribute__ ((unused)), const struct meteor_capframe *t) { fprintf (fp, "command=%ld " "lowat=%ld " "hiwat=%ld ", (long) t->command, (long) t->lowat, (long) t->hiwat); } static void fprint_TVTUNER_SETCHNL (FILE *fp, int rw __attribute__ ((unused)), unsigned int *arg) { fprint_symbolic (fp, 0, (unsigned long) *arg, "NABCST", (unsigned long) CHNLSET_NABCST, "CABLEIRC", (unsigned long) CHNLSET_CABLEIRC, "CABLEHRC", (unsigned long) CHNLSET_CABLEHRC, "WEUROPE", (unsigned long) CHNLSET_WEUROPE, "JPNBCST", (unsigned long) CHNLSET_JPNBCST, "JPNCABLE", (unsigned long) CHNLSET_JPNCABLE, "XUSSR", (unsigned long) CHNLSET_XUSSR, "AUSTRALIA", (unsigned long) CHNLSET_AUSTRALIA, "FRANCE", (unsigned long) CHNLSET_FRANCE, "MIN", (unsigned long) CHNLSET_MIN, "MAX", (unsigned long) CHNLSET_MAX, 0); } static void fprint_METEORGFMT (FILE *fp, int rw __attribute__ ((unused)), unsigned long *arg) { fprint_symbolic (fp, 0, (unsigned long) *arg, "NTSC", (unsigned long) METEOR_FMT_NTSC, "PAL", (unsigned long) METEOR_FMT_PAL, "SECAM", (unsigned long) METEOR_FMT_SECAM, "AUTOMODE", (unsigned long) METEOR_FMT_AUTOMODE, 0); } static void fprint_RADIO_GETMODE (FILE *fp, int rw __attribute__ ((unused)), unsigned char *arg) { fprint_symbolic (fp, 0, (unsigned long) *arg, "AFC", (unsigned long) RADIO_AFC, "MONO", (unsigned long) RADIO_MONO, "MUTE", (unsigned long) RADIO_MUTE, 0); } static void fprint_BT848_SAUDIO (FILE *fp, int rw __attribute__ ((unused)), int *arg) { fprint_symbolic (fp, 0, (unsigned long) *arg, "TUNER", (unsigned long) AUDIO_TUNER, "EXTERN", (unsigned long) AUDIO_EXTERN, "INTERN", (unsigned long) AUDIO_INTERN, "MUTE", (unsigned long) AUDIO_MUTE, "UNMUTE", (unsigned long) AUDIO_UNMUTE, 0); } static void fprint_struct_meteor_video (FILE *fp, int rw __attribute__ ((unused)), const struct meteor_video *t) { fprintf (fp, "addr=%lu " "width=%lu " "banksize=%lu " "ramsize=%lu ", (unsigned long) t->addr, (unsigned long) t->width, (unsigned long) t->banksize, (unsigned long) t->ramsize); } static void fprint_struct_eeProm (FILE *fp, int rw __attribute__ ((unused)), const struct eeProm *t) { fprintf (fp, "offset=%ld " "count=%ld ", (long) t->offset, (long) t->count); } static void fprint_struct_bktr_remote (FILE *fp, int rw __attribute__ ((unused)), const struct bktr_remote *t) { fputs ("data[]=? ", fp); } static void fprint_symbol_meteor_geo_ (FILE *fp, int rw __attribute__ ((unused)), unsigned long value) { fprint_symbolic (fp, 0, value, "RGB16", (unsigned long) METEOR_GEO_RGB16, "RGB24", (unsigned long) METEOR_GEO_RGB24, "YUV_PACKED", (unsigned long) METEOR_GEO_YUV_PACKED, "YUV_PLANAR", (unsigned long) METEOR_GEO_YUV_PLANAR, "YUV_PLANER", (unsigned long) METEOR_GEO_YUV_PLANER, "UNSIGNED", (unsigned long) METEOR_GEO_UNSIGNED, "EVEN_ONLY", (unsigned long) METEOR_GEO_EVEN_ONLY, "ODD_ONLY", (unsigned long) METEOR_GEO_ODD_ONLY, "FIELD_MASK", (unsigned long) METEOR_GEO_FIELD_MASK, "YUV_422", (unsigned long) METEOR_GEO_YUV_422, "OUTPUT_MASK", (unsigned long) METEOR_GEO_OUTPUT_MASK, "YUV_12", (unsigned long) METEOR_GEO_YUV_12, "YUV_9", (unsigned long) METEOR_GEO_YUV_9, (void *) 0); } static void fprint_struct_meteor_geomet (FILE *fp, int rw __attribute__ ((unused)), const struct meteor_geomet *t) { fprintf (fp, "rows=%lu " "columns=%lu " "frames=%lu " "oformat=", (unsigned long) t->rows, (unsigned long) t->columns, (unsigned long) t->frames); fprint_symbol_meteor_geo_ (fp, rw, t->oformat); fputs (" ", fp); } static void fprint_METEORCAPTUR (FILE *fp, int rw __attribute__ ((unused)), int *arg) { fprint_symbolic (fp, 0, (unsigned long) *arg, "SINGLE", (unsigned long) METEOR_CAP_SINGLE, "CONTINOUS", (unsigned long) METEOR_CAP_CONTINOUS, "STOP_CONT", (unsigned long) METEOR_CAP_STOP_CONT, "N_FRAMES", (unsigned long) METEOR_CAP_N_FRAMES, "STOP_FRAMES", (unsigned long) METEOR_CAP_STOP_FRAMES, 0); } static void fprint_BT848_GAUDIO (FILE *fp, int rw __attribute__ ((unused)), int *arg) { fprint_symbolic (fp, 0, (unsigned long) *arg, "TUNER", (unsigned long) AUDIO_TUNER, "EXTERN", (unsigned long) AUDIO_EXTERN, "INTERN", (unsigned long) AUDIO_INTERN, "MUTE", (unsigned long) AUDIO_MUTE, "UNMUTE", (unsigned long) AUDIO_UNMUTE, 0); } static void fprint_BT848SFMT (FILE *fp, int rw __attribute__ ((unused)), unsigned long *arg) { fprint_symbolic (fp, 0, (unsigned long) *arg, "RSVD", (unsigned long) BT848_IFORM_F_RSVD, "SECAM", (unsigned long) BT848_IFORM_F_SECAM, "PALN", (unsigned long) BT848_IFORM_F_PALN, "PALM", (unsigned long) BT848_IFORM_F_PALM, "PALBDGHI", (unsigned long) BT848_IFORM_F_PALBDGHI, "NTSCJ", (unsigned long) BT848_IFORM_F_NTSCJ, "NTSCM", (unsigned long) BT848_IFORM_F_NTSCM, "AUTO", (unsigned long) BT848_IFORM_F_AUTO, 0); } static void fprint_METEORGINPUT (FILE *fp, int rw __attribute__ ((unused)), unsigned long *arg) { fprint_symbolic (fp, 0, (unsigned long) *arg, "DEV0", (unsigned long) METEOR_INPUT_DEV0, "DEV_RCA", (unsigned long) METEOR_INPUT_DEV_RCA, "DEV1", (unsigned long) METEOR_INPUT_DEV1, "DEV2", (unsigned long) METEOR_INPUT_DEV2, "DEV3", (unsigned long) METEOR_INPUT_DEV3, "DEV_RGB", (unsigned long) METEOR_INPUT_DEV_RGB, "DEV_SVIDEO", (unsigned long) METEOR_INPUT_DEV_SVIDEO, 0); } static void fprint_METEORSINPUT (FILE *fp, int rw __attribute__ ((unused)), unsigned long *arg) { fprint_symbolic (fp, 0, (unsigned long) *arg, "DEV0", (unsigned long) METEOR_INPUT_DEV0, "DEV_RCA", (unsigned long) METEOR_INPUT_DEV_RCA, "DEV1", (unsigned long) METEOR_INPUT_DEV1, "DEV2", (unsigned long) METEOR_INPUT_DEV2, "DEV3", (unsigned long) METEOR_INPUT_DEV3, "DEV_RGB", (unsigned long) METEOR_INPUT_DEV_RGB, "DEV_SVIDEO", (unsigned long) METEOR_INPUT_DEV_SVIDEO, 0); } static void fprint_struct_bktr_msp_control (FILE *fp, int rw __attribute__ ((unused)), const struct bktr_msp_control *t) { fprintf (fp, "function=%lu " "address=%lu " "data=%lu ", (unsigned long) t->function, (unsigned long) t->address, (unsigned long) t->data); } static void fprint_METEORSFMT (FILE *fp, int rw __attribute__ ((unused)), unsigned long *arg) { fprint_symbolic (fp, 0, (unsigned long) *arg, "NTSC", (unsigned long) METEOR_FMT_NTSC, "PAL", (unsigned long) METEOR_FMT_PAL, "SECAM", (unsigned long) METEOR_FMT_SECAM, "AUTOMODE", (unsigned long) METEOR_FMT_AUTOMODE, 0); } static void fprint_RADIO_SETMODE (FILE *fp, int rw __attribute__ ((unused)), unsigned int *arg) { fprint_symbolic (fp, 0, (unsigned long) *arg, "AFC", (unsigned long) RADIO_AFC, "MONO", (unsigned long) RADIO_MONO, "MUTE", (unsigned long) RADIO_MUTE, 0); } static void fprint_struct__bktr_clip (FILE *fp, int rw __attribute__ ((unused)), const struct _bktr_clip *t) { fputs ("x[]=? ", fp); } static void fprint_struct_meteor_counts (FILE *fp, int rw __attribute__ ((unused)), const struct meteor_counts *t) { fprintf (fp, "fifo_errors=%lu " "dma_errors=%lu " "frames_captured=%lu " "even_fields_captured=%lu " "odd_fields_captured=%lu ", (unsigned long) t->fifo_errors, (unsigned long) t->dma_errors, (unsigned long) t->frames_captured, (unsigned long) t->even_fields_captured, (unsigned long) t->odd_fields_captured); } static void fprint_ioctl_arg (FILE *fp, unsigned int cmd, int rw, void *arg) { switch (cmd) { case METEORSTATUS: if (!arg) { fputs ("METEORSTATUS", fp); return; } fprint_METEORSTATUS (fp, rw, arg); break; case BT848_SCAPAREA: if (!arg) { fputs ("BT848_SCAPAREA", fp); return; } case BT848_GCAPAREA: if (!arg) { fputs ("BT848_GCAPAREA", fp); return; } fprint_struct_bktr_capture_area (fp, rw, arg); break; case BT848_I2CWR: if (!arg) { fputs ("BT848_I2CWR", fp); return; } fprintf (fp, "%lu", (unsigned long) * (u_long *) arg); break; case BT848_SHUE: if (!arg) { fputs ("BT848_SHUE", fp); return; } case BT848_GHUE: if (!arg) { fputs ("BT848_GHUE", fp); return; } case BT848_SBRIG: if (!arg) { fputs ("BT848_SBRIG", fp); return; } case BT848_GBRIG: if (!arg) { fputs ("BT848_GBRIG", fp); return; } case BT848_SCSAT: if (!arg) { fputs ("BT848_SCSAT", fp); return; } case BT848_GCSAT: if (!arg) { fputs ("BT848_GCSAT", fp); return; } case BT848_SCONT: if (!arg) { fputs ("BT848_SCONT", fp); return; } case BT848_GCONT: if (!arg) { fputs ("BT848_GCONT", fp); return; } case BT848_SVSAT: if (!arg) { fputs ("BT848_SVSAT", fp); return; } case BT848_GVSAT: if (!arg) { fputs ("BT848_GVSAT", fp); return; } case BT848_SUSAT: if (!arg) { fputs ("BT848_SUSAT", fp); return; } case BT848_GUSAT: if (!arg) { fputs ("BT848_GUSAT", fp); return; } case BT848_SCBARS: if (!arg) { fputs ("BT848_SCBARS", fp); return; } case BT848_CCBARS: if (!arg) { fputs ("BT848_CCBARS", fp); return; } case BT848_SBTSC: if (!arg) { fputs ("BT848_SBTSC", fp); return; } case TVTUNER_SETAFC: if (!arg) { fputs ("TVTUNER_SETAFC", fp); return; } case TVTUNER_GETAFC: if (!arg) { fputs ("TVTUNER_GETAFC", fp); return; } case BT848_SLNOTCH: if (!arg) { fputs ("BT848_SLNOTCH", fp); return; } case BT848_GLNOTCH: if (!arg) { fputs ("BT848_GLNOTCH", fp); return; } case METEORSACTPIXFMT: if (!arg) { fputs ("METEORSACTPIXFMT", fp); return; } case METEORGACTPIXFMT: if (!arg) { fputs ("METEORGACTPIXFMT", fp); return; } case BT848SCBUF: if (!arg) { fputs ("BT848SCBUF", fp); return; } case BT848GCBUF: if (!arg) { fputs ("BT848GCBUF", fp); return; } case BT848_GPIO_SET_EN: if (!arg) { fputs ("BT848_GPIO_SET_EN", fp); return; } case BT848_GPIO_GET_EN: if (!arg) { fputs ("BT848_GPIO_GET_EN", fp); return; } case BT848_GPIO_SET_DATA: if (!arg) { fputs ("BT848_GPIO_SET_DATA", fp); return; } case BT848_GPIO_GET_DATA: if (!arg) { fputs ("BT848_GPIO_GET_DATA", fp); return; } fprintf (fp, "%ld", (long) * (int *) arg); break; case METEORGSIGNAL: if (!arg) { fputs ("METEORGSIGNAL", fp); return; } fprint_METEORGSIGNAL (fp, rw, arg); break; case TVTUNER_GETCHNLSET: if (!arg) { fputs ("TVTUNER_GETCHNLSET", fp); return; } fprint_struct_bktr_chnlset (fp, rw, arg); break; case METEORGSUPPIXFMT: if (!arg) { fputs ("METEORGSUPPIXFMT", fp); return; } fprint_struct_meteor_pixfmt (fp, rw, arg); break; case METEORSCHCV: if (!arg) { fputs ("METEORSCHCV", fp); return; } case METEORGCHCV: if (!arg) { fputs ("METEORGCHCV", fp); return; } case METEORSBRIG: if (!arg) { fputs ("METEORSBRIG", fp); return; } case METEORGBRIG: if (!arg) { fputs ("METEORGBRIG", fp); return; } case METEORSCSAT: if (!arg) { fputs ("METEORSCSAT", fp); return; } case METEORGCSAT: if (!arg) { fputs ("METEORGCSAT", fp); return; } case METEORSCONT: if (!arg) { fputs ("METEORSCONT", fp); return; } case METEORGCONT: if (!arg) { fputs ("METEORGCONT", fp); return; } case METEORSHWS: if (!arg) { fputs ("METEORSHWS", fp); return; } case METEORGHWS: if (!arg) { fputs ("METEORGHWS", fp); return; } case METEORSVWS: if (!arg) { fputs ("METEORSVWS", fp); return; } case METEORGVWS: if (!arg) { fputs ("METEORGVWS", fp); return; } case METEORSTS: if (!arg) { fputs ("METEORSTS", fp); return; } case METEORGTS: if (!arg) { fputs ("METEORGTS", fp); return; } fprintf (fp, "%lu", (unsigned long) * (unsigned char *) arg); break; case METEORSSIGNAL: if (!arg) { fputs ("METEORSSIGNAL", fp); return; } fprint_METEORSSIGNAL (fp, rw, arg); break; case TVTUNER_GETCHNL: if (!arg) { fputs ("TVTUNER_GETCHNL", fp); return; } fprint_TVTUNER_GETCHNL (fp, rw, arg); break; case METEORCAPFRM: if (!arg) { fputs ("METEORCAPFRM", fp); return; } fprint_struct_meteor_capframe (fp, rw, arg); break; case TVTUNER_SETCHNL: if (!arg) { fputs ("TVTUNER_SETCHNL", fp); return; } fprint_TVTUNER_SETCHNL (fp, rw, arg); break; case METEORGFMT: if (!arg) { fputs ("METEORGFMT", fp); return; } fprint_METEORGFMT (fp, rw, arg); break; case RADIO_GETMODE: if (!arg) { fputs ("RADIO_GETMODE", fp); return; } fprint_RADIO_GETMODE (fp, rw, arg); break; case BT848_SAUDIO: if (!arg) { fputs ("BT848_SAUDIO", fp); return; } fprint_BT848_SAUDIO (fp, rw, arg); break; case METEORSVIDEO: if (!arg) { fputs ("METEORSVIDEO", fp); return; } case METEORGVIDEO: if (!arg) { fputs ("METEORGVIDEO", fp); return; } fprint_struct_meteor_video (fp, rw, arg); break; case BT848_WEEPROM: if (!arg) { fputs ("BT848_WEEPROM", fp); return; } case BT848_REEPROM: if (!arg) { fputs ("BT848_REEPROM", fp); return; } case BT848_SIGNATURE: if (!arg) { fputs ("BT848_SIGNATURE", fp); return; } fprint_struct_eeProm (fp, rw, arg); break; case REMOTE_GETKEY: if (!arg) { fputs ("REMOTE_GETKEY", fp); return; } fprint_struct_bktr_remote (fp, rw, arg); break; case METEORSFPS: if (!arg) { fputs ("METEORSFPS", fp); return; } case METEORGFPS: if (!arg) { fputs ("METEORGFPS", fp); return; } case METEORSBT254: if (!arg) { fputs ("METEORSBT254", fp); return; } case METEORGBT254: if (!arg) { fputs ("METEORGBT254", fp); return; } fprintf (fp, "%lu", (unsigned long) * (unsigned short *) arg); break; case BT848GFMT: if (!arg) { fputs ("BT848GFMT", fp); return; } fprintf (fp, "%lu", (unsigned long) * (unsigned long *) arg); break; case METEORSETGEO: if (!arg) { fputs ("METEORSETGEO", fp); return; } case METEORGETGEO: if (!arg) { fputs ("METEORGETGEO", fp); return; } fprint_struct_meteor_geomet (fp, rw, arg); break; case METEORCAPTUR: if (!arg) { fputs ("METEORCAPTUR", fp); return; } fprint_METEORCAPTUR (fp, rw, arg); break; case BT848_GAUDIO: if (!arg) { fputs ("BT848_GAUDIO", fp); return; } fprint_BT848_GAUDIO (fp, rw, arg); break; case BT848SFMT: if (!arg) { fputs ("BT848SFMT", fp); return; } fprint_BT848SFMT (fp, rw, arg); break; case METEORGINPUT: if (!arg) { fputs ("METEORGINPUT", fp); return; } fprint_METEORGINPUT (fp, rw, arg); break; case METEORSINPUT: if (!arg) { fputs ("METEORSINPUT", fp); return; } fprint_METEORSINPUT (fp, rw, arg); break; case TVTUNER_SETTYPE: if (!arg) { fputs ("TVTUNER_SETTYPE", fp); return; } case TVTUNER_GETTYPE: if (!arg) { fputs ("TVTUNER_GETTYPE", fp); return; } case TVTUNER_GETSTATUS: if (!arg) { fputs ("TVTUNER_GETSTATUS", fp); return; } case TVTUNER_SETFREQ: if (!arg) { fputs ("TVTUNER_SETFREQ", fp); return; } case TVTUNER_GETFREQ: if (!arg) { fputs ("TVTUNER_GETFREQ", fp); return; } case BT848_GSTATUS: if (!arg) { fputs ("BT848_GSTATUS", fp); return; } case RADIO_SETFREQ: if (!arg) { fputs ("RADIO_SETFREQ", fp); return; } case RADIO_GETFREQ: if (!arg) { fputs ("RADIO_GETFREQ", fp); return; } fprintf (fp, "%lu", (unsigned long) * (unsigned int *) arg); break; case BT848_MSP_READ: if (!arg) { fputs ("BT848_MSP_READ", fp); return; } case BT848_MSP_WRITE: if (!arg) { fputs ("BT848_MSP_WRITE", fp); return; } fprint_struct_bktr_msp_control (fp, rw, arg); break; case METEORSFMT: if (!arg) { fputs ("METEORSFMT", fp); return; } fprint_METEORSFMT (fp, rw, arg); break; case RADIO_SETMODE: if (!arg) { fputs ("RADIO_SETMODE", fp); return; } fprint_RADIO_SETMODE (fp, rw, arg); break; case BT848SCLIP: if (!arg) { fputs ("BT848SCLIP", fp); return; } case BT848GCLIP: if (!arg) { fputs ("BT848GCLIP", fp); return; } fprint_struct__bktr_clip (fp, rw, arg); break; case METEORSCOUNT: if (!arg) { fputs ("METEORSCOUNT", fp); return; } case METEORGCOUNT: if (!arg) { fputs ("METEORGCOUNT", fp); return; } fprint_struct_meteor_counts (fp, rw, arg); break; default: if (!arg) { fprint_unknown_ioctl (fp, cmd, arg); return; } break; } } static __inline__ void IOCTL_ARG_TYPE_CHECK_TVTUNER_SETCHNL (const unsigned int *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_TVTUNER_GETCHNL (unsigned int *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_TVTUNER_SETTYPE (const unsigned int *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_TVTUNER_GETTYPE (unsigned int *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_TVTUNER_GETSTATUS (unsigned int *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_TVTUNER_SETFREQ (const unsigned int *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_TVTUNER_GETFREQ (unsigned int *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_BT848_SHUE (const int *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_BT848_GHUE (int *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_BT848_SBRIG (const int *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_BT848_GBRIG (int *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_BT848_SCSAT (const int *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_BT848_GCSAT (int *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_BT848_SCONT (const int *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_BT848_GCONT (int *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_BT848_SVSAT (const int *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_BT848_GVSAT (int *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_BT848_SUSAT (const int *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_BT848_GUSAT (int *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_BT848_SCBARS (int *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_BT848_CCBARS (int *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_BT848_SAUDIO (const int *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_BT848_GAUDIO (int *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_BT848_SBTSC (const int *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_BT848_GSTATUS (unsigned int *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_BT848_WEEPROM (struct eeProm *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_BT848_REEPROM (struct eeProm *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_BT848_SIGNATURE (struct eeProm *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_TVTUNER_SETAFC (const int *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_TVTUNER_GETAFC (int *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_BT848_SLNOTCH (const int *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_BT848_GLNOTCH (int *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_BT848_I2CWR (u_long *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_BT848_MSP_READ (struct bktr_msp_control *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_BT848_MSP_WRITE (struct bktr_msp_control *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_RADIO_SETMODE (const unsigned int *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_RADIO_GETMODE (unsigned char *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_RADIO_SETFREQ (const unsigned int *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_RADIO_GETFREQ (unsigned int *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_METEORSACTPIXFMT (const int *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_METEORGACTPIXFMT (int *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_METEORGSUPPIXFMT (struct meteor_pixfmt *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_BT848SCLIP (const struct _bktr_clip *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_BT848GCLIP (struct _bktr_clip *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_BT848SFMT (const unsigned long *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_BT848GFMT (unsigned long *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_BT848SCBUF (const int *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_BT848GCBUF (int *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_BT848_SCAPAREA (const struct bktr_capture_area *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_BT848_GCAPAREA (struct bktr_capture_area *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_TVTUNER_GETCHNLSET (struct bktr_chnlset *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_REMOTE_GETKEY (struct bktr_remote *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_BT848_GPIO_SET_EN (const int *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_BT848_GPIO_GET_EN (int *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_BT848_GPIO_SET_DATA (const int *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_BT848_GPIO_GET_DATA (int *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_METEORCAPTUR (const int *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_METEORCAPFRM (const struct meteor_capframe *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_METEORSETGEO (const struct meteor_geomet *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_METEORGETGEO (struct meteor_geomet *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_METEORSTATUS (unsigned short *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_METEORSHUE (const signed char *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_METEORGHUE (signed char *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_METEORSFMT (const unsigned long *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_METEORGFMT (unsigned long *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_METEORSINPUT (const unsigned long *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_METEORGINPUT (unsigned long *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_METEORSCHCV (const unsigned char *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_METEORGCHCV (unsigned char *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_METEORSCOUNT (const struct meteor_counts *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_METEORGCOUNT (struct meteor_counts *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_METEORSFPS (const unsigned short *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_METEORGFPS (unsigned short *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_METEORSSIGNAL (const unsigned int *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_METEORGSIGNAL (unsigned int *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_METEORSVIDEO (const struct meteor_video *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_METEORGVIDEO (struct meteor_video *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_METEORSBRIG (const unsigned char *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_METEORGBRIG (unsigned char *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_METEORSCSAT (const unsigned char *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_METEORGCSAT (unsigned char *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_METEORSCONT (const unsigned char *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_METEORGCONT (unsigned char *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_METEORSBT254 (const unsigned short *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_METEORGBT254 (unsigned short *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_METEORSHWS (const unsigned char *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_METEORGHWS (unsigned char *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_METEORSVWS (const unsigned char *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_METEORGVWS (unsigned char *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_METEORSTS (const unsigned char *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_METEORGTS (unsigned char *arg __attribute__ ((unused))) {} zapping-0.10cvs6/common/intl-priv.h 644 764 144 3717 10324040735 12400 /* * Copyright (C) 2004 Michael H. Schimek * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* $Id: intl-priv.h,v 1.3 2005/10/14 23:40:13 mschimek Exp $ */ #ifndef INTL_PRIV_H #define INTL_PRIV_H #ifdef ENABLE_NLS # include # include # define _(String) gettext (String) # ifdef gettext_noop # define N_(String) gettext_noop (String) # else # define N_(String) (String) # endif #else /* Stubs that do something close enough. */ # define gettext(Msgid) ((const char *) (Msgid)) # define dgettext(Domainname, Msgid) ((const char *) (Msgid)) # define dcgettext(Domainname, Msgid, Category) ((const char *) (Msgid)) # define ngettext(Msgid1, Msgid2, N) \ ((N) == 1 ? (const char *) (Msgid1) : (const char *) (Msgid2)) # define dngettext(Domainname, Msgid1, Msgid2, N) \ ((N) == 1 ? (const char *) (Msgid1) : (const char *) (Msgid2)) # define dcngettext(Domainname, Msgid1, Msgid2, N, Category) \ ((N) == 1 ? (const char *) (Msgid1) : (const char *) (Msgid2)) # define textdomain(Domainname) ((const char *) (Domainname)) # define bindtextdomain(Domainname, Dirname) ((const char *) (Dirname)) # define bind_textdomain_codeset(Domainname, Codeset) \ ((const char *) (Codeset)) # define _(String) (String) # define N_(String) (String) #endif #endif /* INTL_PRIV_H */ zapping-0.10cvs6/common/structpr_gen.pl 755 764 144 43070 10427305324 13400 #!/usr/bin/perl # # Copyright (C) 2002-2004 Michael H. Schimek # inspired by a LXR script http://lxr.linux.no/ # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2 as # published by the Free Software Foundation. # # 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 this program; if not, write to the Free Software # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. # # -------------------------------------------------------------------------- # # This script turns a C header file into functions printing # and checking ioctl arguments. It's part of the debugging # routines of the Zapping tv viewer http://zapping.sf.net. # # Perl and C gurus cover your eyes. This is one of my first # attempts in this funny tongue and far from a proper C parser. # $Id: structpr_gen.pl,v 1.10 2006/05/07 05:51:16 mschimek Exp $ $number = '[0-9]+'; $ident = '\~?_*[a-zA-Z][a-zA-Z0-9_]*'; $signed = '((signed)?(char|short|int|long))|__s8|__s16|__s32|__s64|signed'; $unsigned = '(((unsigned\s*)|u|u_)(char|short|int|long))|__u8|__u16|__u32|__u64|unsigned'; $define = '^\s*\#\s*define\s+'; $printfn = 'fprint_ioctl_arg'; # # Syntax of arguments, in brief: # # "struct" is the name of a structure. "\.field" is the name of a field # of this structure, can be "(\.substruct)*\.field" too. # # struct.field=SYM_ # struct.field contains symbolic values starting with SYM_. Only needed # for flags, automatically determined if struct.field is an enum type. # FIXME we must permit more than one prefix. # struct.field=string|hex|fourcc # Print that field appropriately. If not given the script tries to # guess from the field name. # typedef=blah # As above, for simple typedef'ed types. # struct=mode # struct.substruct=mode # struct.field=mode # If ioctl is WR, this is an R (input) or W (output parameter) # or WR (both). If ioctl is R or W, all parameters are input or output # respectively. # struct.field=FOO:foo # Only when struct.field == FOO, print member foo. # struct.field=R,SYM_, SYM_FOO:foo # Combines the hints above. # struct={ fprintf(fp, "<$s>", t->foo); } # Print like this. # while (@ARGV) { $arg = shift (@ARGV); while ("," eq substr ($arg, -1) && @ARGV) { $arg .= shift (@ARGV); } if ($arg =~ m/printfn\=($ident)/) { $printfn = $1; } elsif ($arg =~ m/(($ident)(\.$ident)?)\={(.*)}/) { $print_func{$1} = $4; } elsif ($arg =~ m/(($ident)(\.($ident))?)\=(.*)/) { $item = $1; $container = $2; $member = $4; foreach (split (',', $5)) { if ($_ =~ m/($ident):(($ident)\.($ident))\s*/) { # print "$member == $1 -> $container.$2\n"; $selector{"$container.$2"} = { key => $member, symbol => $1 }; } elsif ($_ eq "WR" || $_ eq "R" || $_ eq "W") { $mode_hint{$item} = $_; } else { $symbolic{$item} = $_; } } } else { print "$arg ??\n"; exit 1; } } $_ = $/; undef($/); $contents = <>; $/ = $_; # # Step I - comb the source and filter out #defines # sub wash { my $t = $_[0]; $t =~ s/[^\n]+//gs; return ($t); } # Remove comments. $contents =~ s/\/\*(.*?)\*\//&wash($1)/ges; $contents =~ s/\/\/[^\n]*//g; # C++ # Unwrap continuation lines. $contents =~ s/\\\s*\n/$1\05/gs; while ($contents =~ s/\05([^\n\05]+)\05/$1\05\05/gs) {} $contents =~ s/(\05+)([^\n]*)/"$2"."\n" x length($1)/ges; sub add_ioctl_check { my ($name, $dir, $type) = @_; $ioctl_check .= "static __inline__ void IOCTL_ARG_TYPE_CHECK_$name "; if ($dir eq "W") { $ioctl_check .= "(const $type *arg __attribute__ ((unused))) {}\n"; } else { $ioctl_check .= "($type *arg __attribute__ ((unused))) {}\n"; } } sub add_ioctl { my ($name, $dir, $i_type, $real_type) = @_; $ioctl_cases{$i_type} .= "case $name:\n" . "if (!arg) { fputs (\"$name\", fp); return; }\n"; &add_ioctl_check ($name, $dir, $real_type); } # Find macro definitions, create ioctl & symbol table. $t = ""; $skip = 0; foreach ($contents =~ /^(.*)/gm) { if ($skip) { if (/^\s*#\s*endif/) { $skip = 0; } next; } # #if 0 if (/^\s*#\s*if\s+0/) { $skip = 1; # Ioctls } elsif (/$define($ident)\s+_IO(WR|R|W).*\(.*,\s*$number\s*,\s*(struct|union)\s*($ident)\s*\)\s*$/) { &add_ioctl ($1, $2, "$3 $4", "$3 $4"); } elsif (/$define($ident)\s+_IO(WR|R|W).*\(.*,\s*$number\s*,\s*(($signed)|($unsigned))\s*\)\s*$/) { if ($symbolic{$1}) { $int_ioctls{$1} = $3; &add_ioctl ($1, $2, $1, $3); } else { &add_ioctl ($1, $2, $3, $3); } } elsif (/$define($ident)\s+_IO(WR|R|W).*\(.*,\s*$number\s*,\s*($ident)\s*\)\s*$/) { &add_ioctl ($1, $2, $3, $3); } elsif (/$define($ident)\s+_IO(WR|R|W).*\(.*,\s*$number\s*,\s*([^*]+)\s*\)\s*$/) { &add_ioctl_check ($1, $2, $3); # Define } elsif (/$define($ident)/) { push @global_symbols, $1; # Other text } elsif (!/^\s*\#/) { $_ =~ s/\s+/ /g; $t="$t$_ "; } } # Split field lists: struct { ... } foo, bar; int x, y; $t =~ s/({|;)\s*((struct\s*{[^}]*})\s*($ident))\s*,/\1 \2; \3 /gm; $t =~ s/({|;)\s*(([^,;}]*)\s+($ident))\s*,/\1 \2; \3 /gm; # Function pointers are just pointers. $t =~ s/\(\s*\*\s*($ident)\s*\)\s*\([^)]*\)\s*;/void *\1;/gm; # Split after ,;{ $t =~ s/(,|;|{)/\1\n/gm; @contents = split ('\n', $t); # # Step II - parse structs, unions and enums # # fieldn = structname\.(field1\.)*fieldn sub field { my ($item) = @_; $item =~ s/^($ident\.)*//; return $item; } # (field1\.)*fieldn = structname\.(field1\.)*fieldn sub trail { my ($item) = @_; $item =~ s/^$ident\.//; return $item; } sub test_cond { my ($text, $item) = @_; my ($mode, $key, $sym, $sel, $i); $mode = "WR"; $i = "$item.dummy"; while ($i =~ s/\.$ident$//) { if ($mode_hint{$i}) { $mode = $mode_hint{$i}; last; } } $key = "0"; $sym = "0"; if ($selector{$item}) { $key = $selector{$item}->{key}; $sym = $selector{$item}->{symbol}; $sel = "$sym == t->$key"; } # print "test_cond $item: $mode $key $sym (was $last_cond)\n"; if ($last_cond ne "$mode $key $sym") { $$text .= &flush_args; if ($last_cond ne "WR 0 0") { $$text .= "}\n"; } if ("R" eq $mode) { if ($selector{$item}) { $$text .= "if (1 == rw && $sel) {\n"; } else { $$text .= "if (1 == rw) {\n"; } } elsif ("W" eq $mode) { if ($selector{$item}) { $$text .= "if (2 == rw && $sel) {\n"; } else { $$text .= "if (2 == rw) {\n"; } } elsif ($selector{$item}) { $$text .= "if ($sel) {\n"; } $last_cond = "$mode $key $sym"; } } # Build a fprintf() with $templ and $args. &flush_args finalizes # the function. # text .= "unsigned int", "structname.field1.flags", "%x" sub add_arg { my ($text, $type, $item, $template) = @_; my $flush = 0; $templ .= &field ($item) . "=$template "; $args .= "($type) t->" . &trail ($item) . ", "; } # text .= "unsigned int", "structname.field1.flags", "%x" sub add_ref_arg { my ($text, $type, $item, $template) = @_; my $flush = 0; $templ .= &field ($item) . "=$template "; $args .= "($type) & t->" . &trail ($item) . ", "; } # text .= functions this depends upon, "struct foo", "structname.field1.foo" sub add_arg_func { my ($text, $deps, $type, $item) = @_; my $flush = 0; if ($funcs{$type}) { my ($lp, $rp, $ref); if ($type =~ m/^(struct|union)/) { $lp = "{"; $rp = "}"; $ref = "&"; } else { $lp = ""; $rp = ""; $ref = ""; } push @$deps, $type; $type =~ s/ /_/g; $templ .= &field ($item) . "=$lp"; $$text .= &flush_args; &test_cond ($text, $item); $$text .= "fprint_$type (fp, rw, " . $ref . "t->" . &trail ($item) . ");\n"; $templ .= "$rp "; } else { &test_cond ($text, $item); $templ .= &field ($item) . "=? "; } } # text .= functions this depends upon, # enum mode (see fprint_symbolic()), # "FLAG_", "structname.field1.flags" sub add_symbolic { my ($text, $deps, $enum_mode, $prefix, $item) = @_; my ($sbody, $count); $count = 0; foreach (@global_symbols) { if (/^$prefix/) { $str = $_; $str =~ s/^$prefix//; $sbody .= "\"$str\", (unsigned long) $_,\n"; ++$count; } } $prefix = lc $prefix; if ($count > 3) { my $type = "symbol $prefix"; # No switch() such that fprint_symbolic() can determine if # these are flags or enum. $funcs{$type} = { text => "static void\n" . "fprint_symbol_$prefix (FILE *fp, " . "int rw __attribute__ ((unused)), unsigned long value)\n" . "{\nfprint_symbolic (fp, $enum_mode, value,\n" . $sbody . "(void *) 0);\n}\n\n", deps => [] }; &add_arg_func ($text, $deps, $type, $item); } else { # Inline symbolic $templ .= &field ($item) . "="; $$text .= &flush_args; &test_cond ($text, $item); $templ .= " "; $$text .= "fprint_symbolic (fp, $enum_mode, t->" . &trail ($item) . ",\n" . $sbody . "(void *) 0);\n"; } } sub flush_args { my $text; $templ =~ s/^ (\"\n\")/ /; $templ =~ s/(\"\n\")$//; $args =~ s/^(\s|\n)+//; $args =~ s/,?(\s|\n)+$//; $text = ""; if ($templ) { if ($args) { $text .= "fprintf (fp, \"$templ\",\n$args);\n"; } else { $text .= "fputs (\"$templ\", fp);\n"; } } $templ = ""; $args = ""; # print "flush >>$text<<\n"; return $text; } # text .= functions this depends upon, # "struct", "v4l_foo", "WR", 0 # (name can be structname(\.field)+ if nested inline struct or union) sub aggregate_body { my ($text, $deps, $kind, $name, $skip) = @_; if ($name ne "?" && $print_func{$name}) { $$text .= $print_func{$name} . "\n"; $skip = 1; } while (@contents) { $_ = shift (@contents); # print "<<$name<<$_<<\n"; # End of aggregate if (/^\s*}\s*;/) { $$text .= &flush_args; return ""; # End of substruct or union } if (/^\s*}\s*($ident)\s*;/) { $$text .= &flush_args; return $1; # Enum. } elsif (/^\s*enum\s+($ident)\s+($ident);/) { if (!$skip) { &test_cond ($text, "$name.$2"); &add_arg_func ($text, $deps, "enum $1", "$name.$2"); } # Substruct or union. } elsif (/^\s*(struct|union)\s+($ident)\s+($ident);/) { if (!$skip) { &test_cond ($text, "$name.$3"); &add_arg_func ($text, $deps, "$1 $2", "$name.$3"); } # Substruct or union inline definition w/o declaration # Why don't you just shoot me... } elsif (/^\s*(struct|union)\s+{/) { my $kind = $1; my ($field, $subtext, @temp); $$text .= &flush_args; $subtext = ""; @temp = @contents; # skip to determine field name $field = &aggregate_body (\$subtext, $deps, $kind, "?", 1); if ($skip) { next; } if ($field ne "") { $subtext = ""; @contents = @temp; &test_cond ($text, "$name.$field"); $templ .= "$field={"; &aggregate_body (\$subtext, $deps, $kind, "$name.$field", 0); $$text .= &flush_args . $subtext; &test_cond ($text, "$name.$field"); $templ .= "} "; } else { $templ .= "? "; } # Other stuff, simplified } elsif (/^\s*($ident(\s+$ident)*)(\*|\s)+($ident)\s*(\[([a-zA-Z0-9_]+)\]*\s*)?;/) { my $type = $1; my $ptr = $3; my $field = $4; my $size = $6; my $hint = ""; my $item = "$name.$field"; if ($typedefs{$type}) { $hint = $symbolic{$type}; $type = $typedefs{$type}; } elsif ($symbolic{$item}) { $hint = $symbolic{$item}; } # print "$type $ptr $name.$field [$size] $hint\n"; if ($skip) { next; } &test_cond ($text, $item); if (0) { # Wisdom: a reserved fieldcontains nothing useful. } elsif ($field =~ "^reserved.*") { if ($size ne "") { $templ .= "$field\[\] "; } else { $templ .= "$field "; } # Pointer } elsif ($ptr eq "*") { # Array of pointers? if ($size ne "") { # Not smart enough, ignore $templ .= "$field\[\]=? "; # Wisdom: char pointer is probably a string. } elsif ($type eq "char" || $field eq "name" || $hint eq "string") { &add_arg ($text, "const char *", $item, "\\\"%s\\\""); # Other pointer } else { &add_arg ($text, "const void *", $item, "%p"); } # Array of something } elsif ($size ne "") { # Wisdom: a char array contains a string. # "Names" are also commonly strings. if ($type eq "char" || $field eq "name" || $hint eq "string") { $args .= "$size, "; &add_arg ($text, "const char *", $item, "\\\"%.*s\\\""); # So this is some other kind of array, what now? } else { # ignore $templ .= "$field\[\]=? "; } # Wisdom: a field named flags typically contains flags. } elsif ($field eq "flags") { if ($hint ne "") { &add_symbolic ($text, $deps, 2, $hint, $item); } else { # flags in hex &add_arg ($text, "unsigned long", $item, "0x%lx"); } # Hint: something funny } elsif ($hint eq "hex") { &add_arg ($text, "unsigned long", $item, "0x%lx"); } elsif ($hint eq "fourcc") { &add_ref_arg ($text, "const char *", $item, "\\\"%.4s\\\"=0x%lx"); $args .= "(unsigned long) t->$field, "; # Field contains symbols, could be flags or enum or both } elsif ($hint ne "") { &add_symbolic ($text, $deps, 0, $hint, $item); # Miscellaneous integers. Suffice to distinguish signed and # unsigned, compiler will convert to long automatically } elsif ($type =~ m/$unsigned/) { &add_arg ($text, "unsigned long", $item, "%lu"); } elsif ($type =~ m/$signed/) { &add_arg ($text, "long", $item, "%ld"); # The Spanish Inquisition. } else { $templ .= "$field=? "; } $templ .= "\"\n\""; $args .= "\n"; } } } sub aggregate { my ($kind, $name) = @_; my ($text, @deps); my $type = "$kind $name"; $funcs{$type} = { text => "static void\nfprint_$kind\_$name " . "(FILE *fp, int rw __attribute__ ((unused)), const $type *t)\n{\n", deps => [] }; $last_cond = "WR 0 0"; aggregate_body (\$funcs{$type}->{text}, $funcs{$type}->{deps}, $kind, $name, 0); if ($last_cond ne "WR 0 0") { $funcs{$type}->{text} .= "}\n"; } $funcs{$type}->{text} .= "}\n\n"; } sub common_prefix { my $prefix = @_[0]; my $symbol; foreach $symbol (@_) { while (length ($prefix) > 0) { if (index ($symbol, $prefix) == 0) { last; } else { $prefix = substr ($prefix, 0, -1); } } } return ($prefix); } sub enumeration { my $name = @_[0]; my $type = "enum $name"; my @symbols; $funcs{$type} = { text => "static void\nfprint_enum_$name (FILE *fp, " . "int rw __attribute__ ((unused)), int value)\n" . "{\nfprint_symbolic (fp, 1, value,\n", deps => [] }; while (@contents) { $_ = shift(@contents); if (/^\s*\}\s*;/) { last; } elsif (/^\s*($ident)\s*(=\s*.*)\,/) { push @symbols, $1; } } $prefix = &common_prefix (@symbols); foreach $symbol (@symbols) { $funcs{$type}->{text} .= "\"" . substr ($symbol, length ($prefix)) . "\", (unsigned long) $symbol,\n"; } $funcs{$type}->{text} .= "(void *) 0);\n}\n\n"; } # Let's parse while (@contents) { $_ = shift(@contents); # print ">>$_<<\n"; if (/^\s*(struct|union)\s*($ident)\s*\{/) { &aggregate ($1, $2); } elsif (/^\s*enum\s*($ident)\s*\{/) { &enumeration ($1); } elsif (/^\s*typedef\s*([^;]+)\s+($ident)\s*;/) { $typedefs{$2} = $1; } } # # Step III - create the file # print "/* Generated file, do not edit! */ #include #include \"common/device.h\" #ifndef __GNUC__ #undef __attribute__ #define __attribute__(x) #endif "; while (($name, $type) = each %int_ioctls) { my $prefix; my $sbody; $prefix = $symbolic{$name}; foreach (@global_symbols) { if (/^$prefix/) { $str = $_; $str =~ s/^$prefix//; $sbody .= "\"$str\", (unsigned long) $_,\n"; } } # No switch() such that fprint_symbolic() can determine if # these are flags or enum. $funcs{$name} = { text => "static void\n" . "fprint_$name (FILE *fp, " . "int rw __attribute__ ((unused)), $type *arg)\n" . "{\nfprint_symbolic (fp, 0, (unsigned long) *arg,\n" . $sbody . "0);\n}\n\n", deps => [] }; } sub print_type { my ($type) = @_; if (!$printed{$type}) { foreach $dependency (@{$funcs{$type}->{deps}}) { &print_type ($dependency); } print $funcs{$type}->{text}; $printed{$type} = TRUE; } } $text = "static void\n$printfn (FILE *fp, unsigned int cmd, int rw, void *arg)\n" . "{\nswitch (cmd) {\n"; while (($type, $case) = each %ioctl_cases) { if ($typedefs{$type}) { if ($symbolic{$type}) { &print_type ($type); $prefix = lc $symbolic{$type}; $type = $typedefs{$type}; $text .= "$case fprint_symbol_$prefix "; $text .= "(fp, rw, * ($type *) arg);\nbreak;\n"; next; } $type = $typedefs{$type}; } if ($funcs{$type}) { &print_type ($type); $type =~ s/ /_/; $text .= "$case fprint_$type (fp, rw, arg);\nbreak;\n"; } elsif ($type =~ m/$unsigned/) { $text .= "$case fprintf (fp, \"%lu\", " . "(unsigned long) * ($type *) arg);\nbreak;\n"; } elsif ($type =~ m/$signed/) { $text .= "$case fprintf (fp, \"%ld\", " . "(long) * ($type *) arg);\nbreak;\n"; } else { $text .= "$case break; /* $type */\n"; } } $text .= "\tdefault:\n" . "\t\tif (!arg) { fprint_unknown_ioctl (fp, cmd, arg); return; }\n" . "\t\tbreak;\n"; $text .= "\t}\n\}\n\n"; print $text; print $ioctl_check; print "\n"; zapping-0.10cvs6/common/threads.h 644 764 144 2753 10167772033 12115 /* * Copyright (C) 1999-2000 Michael H. Schimek * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. * * 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 this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* $Id: threads.h,v 1.9 2005/01/08 14:54:19 mschimek Exp $ */ #ifndef THREADS_H #define THREADS_H #undef _GNU_SOURCE #define _GNU_SOURCE 1 /* XXX for rwlocks, but the parent file may have included pthread.h already */ #include #include "list.h" typedef struct { pthread_mutex_t mutex; /* attn: fast mutex */ pthread_cond_t cond; struct list list; } mucon; static inline void mucon_init(mucon *m) { pthread_mutex_init(&m->mutex, NULL); pthread_cond_init(&m->cond, NULL); init_list(&m->list); } static inline void mucon_destroy(mucon *m) { pthread_mutex_destroy(&m->mutex); pthread_cond_destroy(&m->cond); } static inline void wait_mucon(mucon *m) { pthread_mutex_lock(&m->mutex); pthread_cond_wait(&m->cond, &m->mutex); pthread_mutex_unlock(&m->mutex); } #endif /* THREADS_H */ zapping-0.10cvs6/common/videodev25.h 644 764 144 72251 10155364057 12457 #ifndef __LINUX_VIDEODEV2_H #define __LINUX_VIDEODEV2_H /* * Video for Linux Two * * Header file for v4l or V4L2 drivers and applications, for * Linux kernels 2.2.x or 2.4.x. * * See http://bytesex.org/v4l/ for API specs and other * v4l2 documentation. * * Author: Bill Dirks * Justin Schoeman * et al. */ #ifdef __KERNEL__ #include /* need struct timeval */ #endif /* * M I S C E L L A N E O U S */ /* Four-character-code (FOURCC) */ #define v4l2_fourcc(a,b,c,d)\ (((__u32)(a)<<0)|((__u32)(b)<<8)|((__u32)(c)<<16)|((__u32)(d)<<24)) /* * E N U M S */ enum v4l2_field { V4L2_FIELD_ANY = 0, /* driver can choose from none, top, bottom, interlaced depending on whatever it thinks is approximate ... */ V4L2_FIELD_NONE = 1, /* this device has no fields ... */ V4L2_FIELD_TOP = 2, /* top field only */ V4L2_FIELD_BOTTOM = 3, /* bottom field only */ V4L2_FIELD_INTERLACED = 4, /* both fields interlaced */ V4L2_FIELD_SEQ_TB = 5, /* both fields sequential into one buffer, top-bottom order */ V4L2_FIELD_SEQ_BT = 6, /* same as above + bottom-top order */ V4L2_FIELD_ALTERNATE = 7, /* both fields alternating into separate buffers */ }; #define V4L2_FIELD_HAS_TOP(field) \ ((field) == V4L2_FIELD_TOP ||\ (field) == V4L2_FIELD_INTERLACED ||\ (field) == V4L2_FIELD_SEQ_TB ||\ (field) == V4L2_FIELD_SEQ_BT) #define V4L2_FIELD_HAS_BOTTOM(field) \ ((field) == V4L2_FIELD_BOTTOM ||\ (field) == V4L2_FIELD_INTERLACED ||\ (field) == V4L2_FIELD_SEQ_TB ||\ (field) == V4L2_FIELD_SEQ_BT) #define V4L2_FIELD_HAS_BOTH(field) \ ((field) == V4L2_FIELD_INTERLACED ||\ (field) == V4L2_FIELD_SEQ_TB ||\ (field) == V4L2_FIELD_SEQ_BT) enum v4l2_buf_type { V4L2_BUF_TYPE_VIDEO_CAPTURE = 1, V4L2_BUF_TYPE_VIDEO_OUTPUT = 2, V4L2_BUF_TYPE_VIDEO_OVERLAY = 3, V4L2_BUF_TYPE_VBI_CAPTURE = 4, V4L2_BUF_TYPE_VBI_OUTPUT = 5, V4L2_BUF_TYPE_PRIVATE = 0x80, }; enum v4l2_ctrl_type { V4L2_CTRL_TYPE_INTEGER = 1, V4L2_CTRL_TYPE_BOOLEAN = 2, V4L2_CTRL_TYPE_MENU = 3, V4L2_CTRL_TYPE_BUTTON = 4, }; enum v4l2_tuner_type { V4L2_TUNER_RADIO = 1, V4L2_TUNER_ANALOG_TV = 2, }; enum v4l2_memory { V4L2_MEMORY_MMAP = 1, V4L2_MEMORY_USERPTR = 2, V4L2_MEMORY_OVERLAY = 3, }; /* see also http://vektor.theorem.ca/graphics/ycbcr/ */ enum v4l2_colorspace { /* ITU-R 601 -- broadcast NTSC/PAL */ V4L2_COLORSPACE_SMPTE170M = 1, /* 1125-Line (US) HDTV */ V4L2_COLORSPACE_SMPTE240M = 2, /* HD and modern captures. */ V4L2_COLORSPACE_REC709 = 3, /* broken BT878 extents (601, luma range 16-253 instead of 16-235) */ V4L2_COLORSPACE_BT878 = 4, /* These should be useful. Assume 601 extents. */ V4L2_COLORSPACE_470_SYSTEM_M = 5, V4L2_COLORSPACE_470_SYSTEM_BG = 6, /* I know there will be cameras that send this. So, this is * unspecified chromaticities and full 0-255 on each of the * Y'CbCr components */ V4L2_COLORSPACE_JPEG = 7, /* For RGB colourspaces, this is probably a good start. */ V4L2_COLORSPACE_SRGB = 8, }; enum v4l2_priority { V4L2_PRIORITY_UNSET = 0, /* not initialized */ V4L2_PRIORITY_BACKGROUND = 1, V4L2_PRIORITY_INTERACTIVE = 2, V4L2_PRIORITY_RECORD = 3, V4L2_PRIORITY_DEFAULT = V4L2_PRIORITY_INTERACTIVE, }; struct v4l2_rect { __s32 left; __s32 top; __s32 width; __s32 height; }; struct v4l2_fract { __u32 numerator; __u32 denominator; }; /* * D R I V E R C A P A B I L I T I E S */ struct v4l2_capability { __u8 driver[16]; /* i.e. "bttv" */ __u8 card[32]; /* i.e. "Hauppauge WinTV" */ __u8 bus_info[32]; /* "PCI:" + pci_name(pci_dev) */ __u32 version; /* should use KERNEL_VERSION() */ __u32 capabilities; /* Device capabilities */ __u32 reserved[4]; }; /* Values for 'capabilities' field */ #define V4L2_CAP_VIDEO_CAPTURE 0x00000001 /* Is a video capture device */ #define V4L2_CAP_VIDEO_OUTPUT 0x00000002 /* Is a video output device */ #define V4L2_CAP_VIDEO_OVERLAY 0x00000004 /* Can do video overlay */ #define V4L2_CAP_VBI_CAPTURE 0x00000010 /* Is a VBI capture device */ #define V4L2_CAP_VBI_OUTPUT 0x00000020 /* Is a VBI output device */ #define V4L2_CAP_RDS_CAPTURE 0x00000100 /* RDS data capture */ #define V4L2_CAP_TUNER 0x00010000 /* has a tuner */ #define V4L2_CAP_AUDIO 0x00020000 /* has audio support */ #define V4L2_CAP_RADIO 0x00040000 /* is a radio device */ #define V4L2_CAP_READWRITE 0x01000000 /* read/write systemcalls */ #define V4L2_CAP_ASYNCIO 0x02000000 /* async I/O */ #define V4L2_CAP_STREAMING 0x04000000 /* streaming I/O ioctls */ /* * V I D E O I M A G E F O R M A T */ struct v4l2_pix_format { __u32 width; __u32 height; __u32 pixelformat; enum v4l2_field field; __u32 bytesperline; /* for padding, zero if unused */ __u32 sizeimage; enum v4l2_colorspace colorspace; __u32 priv; /* private data, depends on pixelformat */ }; /* Pixel format FOURCC depth Description */ #define V4L2_PIX_FMT_RGB332 v4l2_fourcc('R','G','B','1') /* 8 RGB-3-3-2 */ #define V4L2_PIX_FMT_RGB555 v4l2_fourcc('R','G','B','O') /* 16 RGB-5-5-5 */ #define V4L2_PIX_FMT_RGB565 v4l2_fourcc('R','G','B','P') /* 16 RGB-5-6-5 */ #define V4L2_PIX_FMT_RGB555X v4l2_fourcc('R','G','B','Q') /* 16 RGB-5-5-5 BE */ #define V4L2_PIX_FMT_RGB565X v4l2_fourcc('R','G','B','R') /* 16 RGB-5-6-5 BE */ #define V4L2_PIX_FMT_BGR24 v4l2_fourcc('B','G','R','3') /* 24 BGR-8-8-8 */ #define V4L2_PIX_FMT_RGB24 v4l2_fourcc('R','G','B','3') /* 24 RGB-8-8-8 */ #define V4L2_PIX_FMT_BGR32 v4l2_fourcc('B','G','R','4') /* 32 BGR-8-8-8-8 */ #define V4L2_PIX_FMT_RGB32 v4l2_fourcc('R','G','B','4') /* 32 RGB-8-8-8-8 */ #define V4L2_PIX_FMT_GREY v4l2_fourcc('G','R','E','Y') /* 8 Greyscale */ #define V4L2_PIX_FMT_YVU410 v4l2_fourcc('Y','V','U','9') /* 9 YVU 4:1:0 */ #define V4L2_PIX_FMT_YVU420 v4l2_fourcc('Y','V','1','2') /* 12 YVU 4:2:0 */ #define V4L2_PIX_FMT_YUYV v4l2_fourcc('Y','U','Y','V') /* 16 YUV 4:2:2 */ #define V4L2_PIX_FMT_UYVY v4l2_fourcc('U','Y','V','Y') /* 16 YUV 4:2:2 */ #define V4L2_PIX_FMT_YUV422P v4l2_fourcc('4','2','2','P') /* 16 YVU422 planar */ #define V4L2_PIX_FMT_YUV411P v4l2_fourcc('4','1','1','P') /* 16 YVU411 planar */ #define V4L2_PIX_FMT_Y41P v4l2_fourcc('Y','4','1','P') /* 12 YUV 4:1:1 */ /* two planes -- one Y, one Cr + Cb interleaved */ #define V4L2_PIX_FMT_NV12 v4l2_fourcc('N','V','1','2') /* 12 Y/CbCr 4:2:0 */ #define V4L2_PIX_FMT_NV21 v4l2_fourcc('N','V','2','1') /* 12 Y/CrCb 4:2:0 */ /* The following formats are not defined in the V4L2 specification */ #define V4L2_PIX_FMT_YUV410 v4l2_fourcc('Y','U','V','9') /* 9 YUV 4:1:0 */ #define V4L2_PIX_FMT_YUV420 v4l2_fourcc('Y','U','1','2') /* 12 YUV 4:2:0 */ #define V4L2_PIX_FMT_YYUV v4l2_fourcc('Y','Y','U','V') /* 16 YUV 4:2:2 */ #define V4L2_PIX_FMT_HI240 v4l2_fourcc('H','I','2','4') /* 8 8-bit color */ /* see http://www.siliconimaging.com/RGB%20Bayer.htm */ #define V4L2_PIX_FMT_SBGGR8 v4l2_fourcc('B','A','8','1') /* 8 BGBG.. GRGR.. */ /* compressed formats */ #define V4L2_PIX_FMT_MJPEG v4l2_fourcc('M','J','P','G') /* Motion-JPEG */ #define V4L2_PIX_FMT_JPEG v4l2_fourcc('J','P','E','G') /* JFIF JPEG */ #define V4L2_PIX_FMT_DV v4l2_fourcc('d','v','s','d') /* 1394 */ #define V4L2_PIX_FMT_MPEG v4l2_fourcc('M','P','E','G') /* MPEG */ /* Vendor-specific formats */ #define V4L2_PIX_FMT_WNVA v4l2_fourcc('W','N','V','A') /* Winnov hw compress */ /* * F O R M A T E N U M E R A T I O N */ struct v4l2_fmtdesc { __u32 index; /* Format number */ enum v4l2_buf_type type; /* buffer type */ __u32 flags; __u8 description[32]; /* Description string */ __u32 pixelformat; /* Format fourcc */ __u32 reserved[4]; }; #define V4L2_FMT_FLAG_COMPRESSED 0x0001 /* * T I M E C O D E */ struct v4l2_timecode { __u32 type; __u32 flags; __u8 frames; __u8 seconds; __u8 minutes; __u8 hours; __u8 userbits[4]; }; /* Type */ #define V4L2_TC_TYPE_24FPS 1 #define V4L2_TC_TYPE_25FPS 2 #define V4L2_TC_TYPE_30FPS 3 #define V4L2_TC_TYPE_50FPS 4 #define V4L2_TC_TYPE_60FPS 5 /* Flags */ #define V4L2_TC_FLAG_DROPFRAME 0x0001 /* "drop-frame" mode */ #define V4L2_TC_FLAG_COLORFRAME 0x0002 #define V4L2_TC_USERBITS_field 0x000C #define V4L2_TC_USERBITS_USERDEFINED 0x0000 #define V4L2_TC_USERBITS_8BITCHARS 0x0008 /* The above is based on SMPTE timecodes */ /* * C O M P R E S S I O N P A R A M E T E R S */ #if 0 /* ### generic compression settings don't work, there is too much * ### codec-specific stuff. Maybe reuse that for MPEG codec settings * ### later ... */ struct v4l2_compression { __u32 quality; __u32 keyframerate; __u32 pframerate; __u32 reserved[5]; /* what we'll need for MPEG, extracted from some postings on the v4l list (Gert Vervoort, PlasmaJohn). system stream: - type: elementary stream(ES), packatised elementary stream(s) (PES) program stream(PS), transport stream(TS) - system bitrate - PS packet size (DVD: 2048 bytes, VCD: 2324 bytes) - TS video PID - TS audio PID - TS PCR PID - TS system information tables (PAT, PMT, CAT, NIT and SIT) - (MPEG-1 systems stream vs. MPEG-2 program stream (TS not supported by MPEG-1 systems) audio: - type: MPEG (+Layer I,II,III), AC-3, LPCM - bitrate - sampling frequency (DVD: 48 Khz, VCD: 44.1 KHz, 32 kHz) - Trick Modes? (ff, rew) - Copyright - Inverse Telecine video: - picturesize (SIF, 1/2 D1, 2/3 D1, D1) and PAL/NTSC norm can be set through excisting V4L2 controls - noise reduction, parameters encoder specific? - MPEG video version: MPEG-1, MPEG-2 - GOP (Group Of Pictures) definition: - N: number of frames per GOP - M: distance between reference (I,P) frames - open/closed GOP - quantiser matrix: inter Q matrix (64 bytes) and intra Q matrix (64 bytes) - quantiser scale: linear or logarithmic - scanning: alternate or zigzag - bitrate mode: CBR (constant bitrate) or VBR (variable bitrate). - target video bitrate for CBR - target video bitrate for VBR - maximum video bitrate for VBR - min. quantiser value for VBR - max. quantiser value for VBR - adaptive quantisation value - return the number of bytes per GOP or bitrate for bitrate monitoring */ }; #endif struct v4l2_jpegcompression { int quality; int APPn; /* Number of APP segment to be written, * must be 0..15 */ int APP_len; /* Length of data in JPEG APPn segment */ char APP_data[60]; /* Data in the JPEG APPn segment. */ int COM_len; /* Length of data in JPEG COM segment */ char COM_data[60]; /* Data in JPEG COM segment */ __u32 jpeg_markers; /* Which markers should go into the JPEG * output. Unless you exactly know what * you do, leave them untouched. * Inluding less markers will make the * resulting code smaller, but there will * be fewer aplications which can read it. * The presence of the APP and COM marker * is influenced by APP_len and COM_len * ONLY, not by this property! */ #define V4L2_JPEG_MARKER_DHT (1<<3) /* Define Huffman Tables */ #define V4L2_JPEG_MARKER_DQT (1<<4) /* Define Quantization Tables */ #define V4L2_JPEG_MARKER_DRI (1<<5) /* Define Restart Interval */ #define V4L2_JPEG_MARKER_COM (1<<6) /* Comment segment */ #define V4L2_JPEG_MARKER_APP (1<<7) /* App segment, driver will * allways use APP0 */ }; /* * M E M O R Y - M A P P I N G B U F F E R S */ struct v4l2_requestbuffers { __u32 count; enum v4l2_buf_type type; enum v4l2_memory memory; __u32 reserved[2]; }; struct v4l2_buffer { __u32 index; enum v4l2_buf_type type; __u32 bytesused; __u32 flags; enum v4l2_field field; struct timeval timestamp; struct v4l2_timecode timecode; __u32 sequence; /* memory location */ enum v4l2_memory memory; union { __u32 offset; unsigned long userptr; } m; __u32 length; __u32 input; __u32 reserved; }; /* Flags for 'flags' field */ #define V4L2_BUF_FLAG_MAPPED 0x0001 /* Buffer is mapped (flag) */ #define V4L2_BUF_FLAG_QUEUED 0x0002 /* Buffer is queued for processing */ #define V4L2_BUF_FLAG_DONE 0x0004 /* Buffer is ready */ #define V4L2_BUF_FLAG_KEYFRAME 0x0008 /* Image is a keyframe (I-frame) */ #define V4L2_BUF_FLAG_PFRAME 0x0010 /* Image is a P-frame */ #define V4L2_BUF_FLAG_BFRAME 0x0020 /* Image is a B-frame */ #define V4L2_BUF_FLAG_TIMECODE 0x0100 /* timecode field is valid */ #define V4L2_BUF_FLAG_INPUT 0x0200 /* input field is valid */ /* * O V E R L A Y P R E V I E W */ struct v4l2_framebuffer { __u32 capability; __u32 flags; /* FIXME: in theory we should pass something like PCI device + memory * region + offset instead of some physical address */ void* base; struct v4l2_pix_format fmt; }; /* Flags for the 'capability' field. Read only */ #define V4L2_FBUF_CAP_EXTERNOVERLAY 0x0001 #define V4L2_FBUF_CAP_CHROMAKEY 0x0002 #define V4L2_FBUF_CAP_LIST_CLIPPING 0x0004 #define V4L2_FBUF_CAP_BITMAP_CLIPPING 0x0008 /* Flags for the 'flags' field. */ #define V4L2_FBUF_FLAG_PRIMARY 0x0001 #define V4L2_FBUF_FLAG_OVERLAY 0x0002 #define V4L2_FBUF_FLAG_CHROMAKEY 0x0004 struct v4l2_clip { struct v4l2_rect c; struct v4l2_clip *next; }; struct v4l2_window { struct v4l2_rect w; enum v4l2_field field; __u32 chromakey; struct v4l2_clip /* __user */ *clips; __u32 clipcount; void /* __user */ *bitmap; }; /* * C A P T U R E P A R A M E T E R S */ struct v4l2_captureparm { __u32 capability; /* Supported modes */ __u32 capturemode; /* Current mode */ struct v4l2_fract timeperframe; /* Time per frame in .1us units */ __u32 extendedmode; /* Driver-specific extensions */ __u32 readbuffers; /* # of buffers for read */ __u32 reserved[4]; }; /* Flags for 'capability' and 'capturemode' fields */ #define V4L2_MODE_HIGHQUALITY 0x0001 /* High quality imaging mode */ #define V4L2_CAP_TIMEPERFRAME 0x1000 /* timeperframe field is supported */ struct v4l2_outputparm { __u32 capability; /* Supported modes */ __u32 outputmode; /* Current mode */ struct v4l2_fract timeperframe; /* Time per frame in seconds */ __u32 extendedmode; /* Driver-specific extensions */ __u32 writebuffers; /* # of buffers for write */ __u32 reserved[4]; }; /* * I N P U T I M A G E C R O P P I N G */ struct v4l2_cropcap { enum v4l2_buf_type type; struct v4l2_rect bounds; struct v4l2_rect defrect; struct v4l2_fract pixelaspect; }; struct v4l2_crop { enum v4l2_buf_type type; struct v4l2_rect c; }; /* * A N A L O G V I D E O S T A N D A R D */ typedef __u64 v4l2_std_id; /* one bit for each */ #define V4L2_STD_PAL_B ((v4l2_std_id)0x00000001) #define V4L2_STD_PAL_B1 ((v4l2_std_id)0x00000002) #define V4L2_STD_PAL_G ((v4l2_std_id)0x00000004) #define V4L2_STD_PAL_H ((v4l2_std_id)0x00000008) #define V4L2_STD_PAL_I ((v4l2_std_id)0x00000010) #define V4L2_STD_PAL_D ((v4l2_std_id)0x00000020) #define V4L2_STD_PAL_D1 ((v4l2_std_id)0x00000040) #define V4L2_STD_PAL_K ((v4l2_std_id)0x00000080) #define V4L2_STD_PAL_M ((v4l2_std_id)0x00000100) #define V4L2_STD_PAL_N ((v4l2_std_id)0x00000200) #define V4L2_STD_PAL_Nc ((v4l2_std_id)0x00000400) #define V4L2_STD_PAL_60 ((v4l2_std_id)0x00000800) #define V4L2_STD_NTSC_M ((v4l2_std_id)0x00001000) #define V4L2_STD_NTSC_M_JP ((v4l2_std_id)0x00002000) #define V4L2_STD_SECAM_B ((v4l2_std_id)0x00010000) #define V4L2_STD_SECAM_D ((v4l2_std_id)0x00020000) #define V4L2_STD_SECAM_G ((v4l2_std_id)0x00040000) #define V4L2_STD_SECAM_H ((v4l2_std_id)0x00080000) #define V4L2_STD_SECAM_K ((v4l2_std_id)0x00100000) #define V4L2_STD_SECAM_K1 ((v4l2_std_id)0x00200000) #define V4L2_STD_SECAM_L ((v4l2_std_id)0x00400000) /* ATSC/HDTV */ #define V4L2_STD_ATSC_8_VSB ((v4l2_std_id)0x01000000) #define V4L2_STD_ATSC_16_VSB ((v4l2_std_id)0x02000000) /* some common needed stuff */ #define V4L2_STD_PAL_BG (V4L2_STD_PAL_B |\ V4L2_STD_PAL_B1 |\ V4L2_STD_PAL_G) #define V4L2_STD_PAL_DK (V4L2_STD_PAL_D |\ V4L2_STD_PAL_D1 |\ V4L2_STD_PAL_K) #define V4L2_STD_PAL (V4L2_STD_PAL_BG |\ V4L2_STD_PAL_DK |\ V4L2_STD_PAL_H |\ V4L2_STD_PAL_I) #define V4L2_STD_NTSC (V4L2_STD_NTSC_M |\ V4L2_STD_NTSC_M_JP) #define V4L2_STD_SECAM_DK (V4L2_STD_SECAM_D |\ V4L2_STD_SECAM_K |\ V4L2_STD_SECAM_K1) #define V4L2_STD_SECAM (V4L2_STD_SECAM_B |\ V4L2_STD_SECAM_G |\ V4L2_STD_SECAM_H |\ V4L2_STD_SECAM_DK |\ V4L2_STD_SECAM_L) #define V4L2_STD_525_60 (V4L2_STD_PAL_M |\ V4L2_STD_PAL_60 |\ V4L2_STD_NTSC) #define V4L2_STD_625_50 (V4L2_STD_PAL |\ V4L2_STD_PAL_N |\ V4L2_STD_PAL_Nc |\ V4L2_STD_SECAM) #define V4L2_STD_ATSC (V4L2_STD_ATSC_8_VSB |\ V4L2_STD_ATSC_16_VSB) #define V4L2_STD_UNKNOWN 0 #define V4L2_STD_ALL (V4L2_STD_525_60 |\ V4L2_STD_625_50) struct v4l2_standard { __u32 index; v4l2_std_id id; __u8 name[24]; struct v4l2_fract frameperiod; /* Frames, not fields */ __u32 framelines; __u32 reserved[4]; }; /* * V I D E O I N P U T S */ struct v4l2_input { __u32 index; /* Which input */ __u8 name[32]; /* Label */ __u32 type; /* Type of input */ __u32 audioset; /* Associated audios (bitfield) */ __u32 tuner; /* Associated tuner */ v4l2_std_id std; __u32 status; __u32 reserved[4]; }; /* Values for the 'type' field */ #define V4L2_INPUT_TYPE_TUNER 1 #define V4L2_INPUT_TYPE_CAMERA 2 /* field 'status' - general */ #define V4L2_IN_ST_NO_POWER 0x00000001 /* Attached device is off */ #define V4L2_IN_ST_NO_SIGNAL 0x00000002 #define V4L2_IN_ST_NO_COLOR 0x00000004 /* field 'status' - analog */ #define V4L2_IN_ST_NO_H_LOCK 0x00000100 /* No horizontal sync lock */ #define V4L2_IN_ST_COLOR_KILL 0x00000200 /* Color killer is active */ /* field 'status' - digital */ #define V4L2_IN_ST_NO_SYNC 0x00010000 /* No synchronization lock */ #define V4L2_IN_ST_NO_EQU 0x00020000 /* No equalizer lock */ #define V4L2_IN_ST_NO_CARRIER 0x00040000 /* Carrier recovery failed */ /* field 'status' - VCR and set-top box */ #define V4L2_IN_ST_MACROVISION 0x01000000 /* Macrovision detected */ #define V4L2_IN_ST_NO_ACCESS 0x02000000 /* Conditional access denied */ #define V4L2_IN_ST_VTR 0x04000000 /* VTR time constant */ /* * V I D E O O U T P U T S */ struct v4l2_output { __u32 index; /* Which output */ __u8 name[32]; /* Label */ __u32 type; /* Type of output */ __u32 audioset; /* Associated audios (bitfield) */ __u32 modulator; /* Associated modulator */ v4l2_std_id std; __u32 reserved[4]; }; /* Values for the 'type' field */ #define V4L2_OUTPUT_TYPE_MODULATOR 1 #define V4L2_OUTPUT_TYPE_ANALOG 2 #define V4L2_OUTPUT_TYPE_ANALOGVGAOVERLAY 3 /* * C O N T R O L S */ struct v4l2_control { __u32 id; __s32 value; }; /* Used in the VIDIOC_QUERYCTRL ioctl for querying controls */ struct v4l2_queryctrl { __u32 id; enum v4l2_ctrl_type type; __u8 name[32]; /* Whatever */ __s32 minimum; /* Note signedness */ __s32 maximum; __s32 step; __s32 default_value; __u32 flags; __u32 reserved[2]; }; /* Used in the VIDIOC_QUERYMENU ioctl for querying menu items */ struct v4l2_querymenu { __u32 id; __u32 index; __u8 name[32]; /* Whatever */ __u32 reserved; }; /* Control flags */ #define V4L2_CTRL_FLAG_DISABLED 0x0001 #define V4L2_CTRL_FLAG_GRABBED 0x0002 /* Control IDs defined by V4L2 */ #define V4L2_CID_BASE 0x00980900 /* IDs reserved for driver specific controls */ #define V4L2_CID_PRIVATE_BASE 0x08000000 #define V4L2_CID_BRIGHTNESS (V4L2_CID_BASE+0) #define V4L2_CID_CONTRAST (V4L2_CID_BASE+1) #define V4L2_CID_SATURATION (V4L2_CID_BASE+2) #define V4L2_CID_HUE (V4L2_CID_BASE+3) #define V4L2_CID_AUDIO_VOLUME (V4L2_CID_BASE+5) #define V4L2_CID_AUDIO_BALANCE (V4L2_CID_BASE+6) #define V4L2_CID_AUDIO_BASS (V4L2_CID_BASE+7) #define V4L2_CID_AUDIO_TREBLE (V4L2_CID_BASE+8) #define V4L2_CID_AUDIO_MUTE (V4L2_CID_BASE+9) #define V4L2_CID_AUDIO_LOUDNESS (V4L2_CID_BASE+10) #define V4L2_CID_BLACK_LEVEL (V4L2_CID_BASE+11) #define V4L2_CID_AUTO_WHITE_BALANCE (V4L2_CID_BASE+12) #define V4L2_CID_DO_WHITE_BALANCE (V4L2_CID_BASE+13) #define V4L2_CID_RED_BALANCE (V4L2_CID_BASE+14) #define V4L2_CID_BLUE_BALANCE (V4L2_CID_BASE+15) #define V4L2_CID_GAMMA (V4L2_CID_BASE+16) #define V4L2_CID_WHITENESS (V4L2_CID_GAMMA) /* ? Not sure */ #define V4L2_CID_EXPOSURE (V4L2_CID_BASE+17) #define V4L2_CID_AUTOGAIN (V4L2_CID_BASE+18) #define V4L2_CID_GAIN (V4L2_CID_BASE+19) #define V4L2_CID_HFLIP (V4L2_CID_BASE+20) #define V4L2_CID_VFLIP (V4L2_CID_BASE+21) #define V4L2_CID_HCENTER (V4L2_CID_BASE+22) #define V4L2_CID_VCENTER (V4L2_CID_BASE+23) #define V4L2_CID_LASTP1 (V4L2_CID_BASE+24) /* last CID + 1 */ /* * T U N I N G */ struct v4l2_tuner { __u32 index; __u8 name[32]; enum v4l2_tuner_type type; __u32 capability; __u32 rangelow; __u32 rangehigh; __u32 rxsubchans; __u32 audmode; __s32 signal; __s32 afc; __u32 reserved[4]; }; struct v4l2_modulator { __u32 index; __u8 name[32]; __u32 capability; __u32 rangelow; __u32 rangehigh; __u32 txsubchans; __u32 reserved[4]; }; /* Flags for the 'capability' field */ #define V4L2_TUNER_CAP_LOW 0x0001 #define V4L2_TUNER_CAP_NORM 0x0002 #define V4L2_TUNER_CAP_STEREO 0x0010 #define V4L2_TUNER_CAP_LANG2 0x0020 #define V4L2_TUNER_CAP_SAP 0x0020 #define V4L2_TUNER_CAP_LANG1 0x0040 /* Flags for the 'rxsubchans' field */ #define V4L2_TUNER_SUB_MONO 0x0001 #define V4L2_TUNER_SUB_STEREO 0x0002 #define V4L2_TUNER_SUB_LANG2 0x0004 #define V4L2_TUNER_SUB_SAP 0x0004 #define V4L2_TUNER_SUB_LANG1 0x0008 /* Values for the 'audmode' field */ #define V4L2_TUNER_MODE_MONO 0x0000 #define V4L2_TUNER_MODE_STEREO 0x0001 #define V4L2_TUNER_MODE_LANG2 0x0002 #define V4L2_TUNER_MODE_SAP 0x0002 #define V4L2_TUNER_MODE_LANG1 0x0003 struct v4l2_frequency { __u32 tuner; enum v4l2_tuner_type type; __u32 frequency; __u32 reserved[8]; }; /* * A U D I O */ struct v4l2_audio { __u32 index; __u8 name[32]; __u32 capability; __u32 mode; __u32 reserved[2]; }; /* Flags for the 'capability' field */ #define V4L2_AUDCAP_STEREO 0x00001 #define V4L2_AUDCAP_AVL 0x00002 /* Flags for the 'mode' field */ #define V4L2_AUDMODE_AVL 0x00001 struct v4l2_audioout { __u32 index; __u8 name[32]; __u32 capability; __u32 mode; __u32 reserved[2]; }; /* * D A T A S E R V I C E S ( V B I ) * * Data services API by Michael Schimek */ struct v4l2_vbi_format { __u32 sampling_rate; /* in 1 Hz */ __u32 offset; __u32 samples_per_line; __u32 sample_format; /* V4L2_PIX_FMT_* */ __s32 start[2]; __u32 count[2]; __u32 flags; /* V4L2_VBI_* */ __u32 reserved[2]; /* must be zero */ }; /* VBI flags */ #define V4L2_VBI_UNSYNC (1<< 0) #define V4L2_VBI_INTERLACED (1<< 1) /* * A G G R E G A T E S T R U C T U R E S */ /* Stream data format */ struct v4l2_format { enum v4l2_buf_type type; union { struct v4l2_pix_format pix; // V4L2_BUF_TYPE_VIDEO_CAPTURE struct v4l2_window win; // V4L2_BUF_TYPE_VIDEO_OVERLAY struct v4l2_vbi_format vbi; // V4L2_BUF_TYPE_VBI_CAPTURE __u8 raw_data[200]; // user-defined } fmt; }; /* Stream type-dependent parameters */ struct v4l2_streamparm { enum v4l2_buf_type type; union { struct v4l2_captureparm capture; struct v4l2_outputparm output; __u8 raw_data[200]; /* user-defined */ } parm; }; /* * I O C T L C O D E S F O R V I D E O D E V I C E S * */ #define VIDIOC_QUERYCAP _IOR ('V', 0, struct v4l2_capability) #define VIDIOC_RESERVED _IO ('V', 1) #define VIDIOC_ENUM_FMT _IOWR ('V', 2, struct v4l2_fmtdesc) #define VIDIOC_G_FMT _IOWR ('V', 4, struct v4l2_format) #define VIDIOC_S_FMT _IOWR ('V', 5, struct v4l2_format) #if 0 #define VIDIOC_G_COMP _IOR ('V', 6, struct v4l2_compression) #define VIDIOC_S_COMP _IOW ('V', 7, struct v4l2_compression) #endif #define VIDIOC_REQBUFS _IOWR ('V', 8, struct v4l2_requestbuffers) #define VIDIOC_QUERYBUF _IOWR ('V', 9, struct v4l2_buffer) #define VIDIOC_G_FBUF _IOR ('V', 10, struct v4l2_framebuffer) #define VIDIOC_S_FBUF _IOW ('V', 11, struct v4l2_framebuffer) #define VIDIOC_OVERLAY _IOW ('V', 14, int) #define VIDIOC_QBUF _IOWR ('V', 15, struct v4l2_buffer) #define VIDIOC_DQBUF _IOWR ('V', 17, struct v4l2_buffer) #define VIDIOC_STREAMON _IOW ('V', 18, int) #define VIDIOC_STREAMOFF _IOW ('V', 19, int) #define VIDIOC_G_PARM _IOWR ('V', 21, struct v4l2_streamparm) #define VIDIOC_S_PARM _IOWR ('V', 22, struct v4l2_streamparm) #define VIDIOC_G_STD _IOR ('V', 23, v4l2_std_id) #define VIDIOC_S_STD _IOW ('V', 24, v4l2_std_id) #define VIDIOC_ENUMSTD _IOWR ('V', 25, struct v4l2_standard) #define VIDIOC_ENUMINPUT _IOWR ('V', 26, struct v4l2_input) #define VIDIOC_G_CTRL _IOWR ('V', 27, struct v4l2_control) #define VIDIOC_S_CTRL _IOWR ('V', 28, struct v4l2_control) #define VIDIOC_G_TUNER _IOWR ('V', 29, struct v4l2_tuner) #define VIDIOC_S_TUNER _IOW ('V', 30, struct v4l2_tuner) #define VIDIOC_G_AUDIO _IOR ('V', 33, struct v4l2_audio) #define VIDIOC_S_AUDIO _IOW ('V', 34, struct v4l2_audio) #define VIDIOC_QUERYCTRL _IOWR ('V', 36, struct v4l2_queryctrl) #define VIDIOC_QUERYMENU _IOWR ('V', 37, struct v4l2_querymenu) #define VIDIOC_G_INPUT _IOR ('V', 38, int) #define VIDIOC_S_INPUT _IOWR ('V', 39, int) #define VIDIOC_G_OUTPUT _IOR ('V', 46, int) #define VIDIOC_S_OUTPUT _IOWR ('V', 47, int) #define VIDIOC_ENUMOUTPUT _IOWR ('V', 48, struct v4l2_output) #define VIDIOC_G_AUDOUT _IOR ('V', 49, struct v4l2_audioout) #define VIDIOC_S_AUDOUT _IOW ('V', 50, struct v4l2_audioout) #define VIDIOC_G_MODULATOR _IOWR ('V', 54, struct v4l2_modulator) #define VIDIOC_S_MODULATOR _IOW ('V', 55, struct v4l2_modulator) #define VIDIOC_G_FREQUENCY _IOWR ('V', 56, struct v4l2_frequency) #define VIDIOC_S_FREQUENCY _IOW ('V', 57, struct v4l2_frequency) #define VIDIOC_CROPCAP _IOWR ('V', 58, struct v4l2_cropcap) #define VIDIOC_G_CROP _IOWR ('V', 59, struct v4l2_crop) #define VIDIOC_S_CROP _IOW ('V', 60, struct v4l2_crop) #define VIDIOC_G_JPEGCOMP _IOR ('V', 61, struct v4l2_jpegcompression) #define VIDIOC_S_JPEGCOMP _IOW ('V', 62, struct v4l2_jpegcompression) #define VIDIOC_QUERYSTD _IOR ('V', 63, v4l2_std_id) #define VIDIOC_TRY_FMT _IOWR ('V', 64, struct v4l2_format) #define VIDIOC_ENUMAUDIO _IOWR ('V', 65, struct v4l2_audio) #define VIDIOC_ENUMAUDOUT _IOWR ('V', 66, struct v4l2_audioout) #define VIDIOC_G_PRIORITY _IOR ('V', 67, enum v4l2_priority) #define VIDIOC_S_PRIORITY _IOW ('V', 68, enum v4l2_priority) /* for compatibility, will go away some day */ #define VIDIOC_OVERLAY_OLD _IOWR ('V', 14, int) #define VIDIOC_S_PARM_OLD _IOW ('V', 22, struct v4l2_streamparm) #define VIDIOC_S_CTRL_OLD _IOW ('V', 28, struct v4l2_control) #define VIDIOC_G_AUDIO_OLD _IOWR ('V', 33, struct v4l2_audio) #define VIDIOC_G_AUDOUT_OLD _IOWR ('V', 49, struct v4l2_audioout) #define VIDIOC_CROPCAP_OLD _IOR ('V', 58, struct v4l2_cropcap) #define BASE_VIDIOC_PRIVATE 192 /* 192-255 are private */ #ifdef __KERNEL__ /* * * V 4 L 2 D R I V E R H E L P E R A P I * * Some commonly needed functions for drivers (v4l2-common.o module) */ #include /* Video standard functions */ extern unsigned int v4l2_video_std_fps(struct v4l2_standard *vs); extern int v4l2_video_std_construct(struct v4l2_standard *vs, int id, char *name); /* prority handling */ struct v4l2_prio_state { atomic_t prios[4]; }; int v4l2_prio_init(struct v4l2_prio_state *global); int v4l2_prio_change(struct v4l2_prio_state *global, enum v4l2_priority *local, enum v4l2_priority new); int v4l2_prio_open(struct v4l2_prio_state *global, enum v4l2_priority *local); int v4l2_prio_close(struct v4l2_prio_state *global, enum v4l2_priority *local); enum v4l2_priority v4l2_prio_max(struct v4l2_prio_state *global); int v4l2_prio_check(struct v4l2_prio_state *global, enum v4l2_priority *local); /* names for fancy debug output */ extern char *v4l2_field_names[]; extern char *v4l2_type_names[]; extern char *v4l2_ioctl_names[]; /* Compatibility layer interface -- v4l1-compat module */ typedef int (*v4l2_kioctl)(struct inode *inode, struct file *file, unsigned int cmd, void *arg); int v4l_compat_translate_ioctl(struct inode *inode, struct file *file, int cmd, void *arg, v4l2_kioctl driver_ioctl); #endif /* __KERNEL__ */ #endif /* __LINUX_VIDEODEV2_H */ /* * Local variables: * c-basic-offset: 8 * End: */ zapping-0.10cvs6/common/ioctl_bt848.h 644 764 144 23053 7762173331 12525 /* * extensions to ioctl_meteor.h for the bt848 cards * * $FreeBSD: src/sys/i386/include/ioctl_bt848.h,v 1.25.2.3 2000/10/31 14:31:27 roger Exp $ */ #ifndef _MACHINE_IOCTL_BT848_H_ #define _MACHINE_IOCTL_BT848_H_ /* * frequency sets */ #define CHNLSET_NABCST 1 #define CHNLSET_CABLEIRC 2 #define CHNLSET_CABLEHRC 3 #define CHNLSET_WEUROPE 4 #define CHNLSET_JPNBCST 5 #define CHNLSET_JPNCABLE 6 #define CHNLSET_XUSSR 7 #define CHNLSET_AUSTRALIA 8 #define CHNLSET_FRANCE 9 #define CHNLSET_MIN CHNLSET_NABCST #define CHNLSET_MAX CHNLSET_FRANCE /* * constants for various tuner registers */ #define BT848_HUEMIN (-90) #define BT848_HUEMAX 90 #define BT848_HUECENTER 0 #define BT848_HUERANGE 179.3 #define BT848_HUEREGMIN (-128) #define BT848_HUEREGMAX 127 #define BT848_HUESTEPS 256 #define BT848_BRIGHTMIN (-50) #define BT848_BRIGHTMAX 50 #define BT848_BRIGHTCENTER 0 #define BT848_BRIGHTRANGE 99.6 #define BT848_BRIGHTREGMIN (-128) #define BT848_BRIGHTREGMAX 127 #define BT848_BRIGHTSTEPS 256 #define BT848_CONTRASTMIN 0 #define BT848_CONTRASTMAX 237 #define BT848_CONTRASTCENTER 100 #define BT848_CONTRASTRANGE 236.57 #define BT848_CONTRASTREGMIN 0 #define BT848_CONTRASTREGMAX 511 #define BT848_CONTRASTSTEPS 512 #define BT848_CHROMAMIN 0 #define BT848_CHROMAMAX 284 #define BT848_CHROMACENTER 100 #define BT848_CHROMARANGE 283.89 #define BT848_CHROMAREGMIN 0 #define BT848_CHROMAREGMAX 511 #define BT848_CHROMASTEPS 512 #define BT848_SATUMIN 0 #define BT848_SATUMAX 202 #define BT848_SATUCENTER 100 #define BT848_SATURANGE 201.18 #define BT848_SATUREGMIN 0 #define BT848_SATUREGMAX 511 #define BT848_SATUSTEPS 512 #define BT848_SATVMIN 0 #define BT848_SATVMAX 284 #define BT848_SATVCENTER 100 #define BT848_SATVRANGE 283.89 #define BT848_SATVREGMIN 0 #define BT848_SATVREGMAX 511 #define BT848_SATVSTEPS 512 /* * audio stuff */ #define AUDIO_TUNER 0x00 /* command for the audio routine */ #define AUDIO_EXTERN 0x01 /* don't confuse them with bit */ #define AUDIO_INTERN 0x02 /* settings */ #define AUDIO_MUTE 0x80 #define AUDIO_UNMUTE 0x81 /* * EEProm stuff */ struct eeProm { short offset; short count; u_char bytes[ 256 ]; }; /* * XXX: this is a hack, should be in ioctl_meteor.h * here to avoid touching that file for now... */ #define TVTUNER_SETCHNL _IOW('x', 32, unsigned int) /* set channel */ #define TVTUNER_GETCHNL _IOR('x', 32, unsigned int) /* get channel */ #define TVTUNER_SETTYPE _IOW('x', 33, unsigned int) /* set tuner type */ #define TVTUNER_GETTYPE _IOR('x', 33, unsigned int) /* get tuner type */ #define TVTUNER_GETSTATUS _IOR('x', 34, unsigned int) /* get tuner status */ #define TVTUNER_SETFREQ _IOW('x', 35, unsigned int) /* set frequency */ #define TVTUNER_GETFREQ _IOR('x', 36, unsigned int) /* get frequency */ #define BT848_SHUE _IOW('x', 37, int) /* set hue */ #define BT848_GHUE _IOR('x', 37, int) /* get hue */ #define BT848_SBRIG _IOW('x', 38, int) /* set brightness */ #define BT848_GBRIG _IOR('x', 38, int) /* get brightness */ #define BT848_SCSAT _IOW('x', 39, int) /* set chroma sat */ #define BT848_GCSAT _IOR('x', 39, int) /* get UV saturation */ #define BT848_SCONT _IOW('x', 40, int) /* set contrast */ #define BT848_GCONT _IOR('x', 40, int) /* get contrast */ #define BT848_SVSAT _IOW('x', 41, int) /* set chroma V sat */ #define BT848_GVSAT _IOR('x', 41, int) /* get V saturation */ #define BT848_SUSAT _IOW('x', 42, int) /* set chroma U sat */ #define BT848_GUSAT _IOR('x', 42, int) /* get U saturation */ #define BT848_SCBARS _IOR('x', 43, int) /* set colorbar */ #define BT848_CCBARS _IOR('x', 44, int) /* clear colorbar */ #define BT848_SAUDIO _IOW('x', 46, int) /* set audio channel */ #define BT848_GAUDIO _IOR('x', 47, int) /* get audio channel */ #define BT848_SBTSC _IOW('x', 48, int) /* set audio channel */ #define BT848_GSTATUS _IOR('x', 49, unsigned int) /* reap status */ #define BT848_WEEPROM _IOWR('x', 50, struct eeProm) /* write to EEProm */ #define BT848_REEPROM _IOWR('x', 51, struct eeProm) /* read from EEProm */ #define BT848_SIGNATURE _IOWR('x', 52, struct eeProm) /* read card sig */ #define TVTUNER_SETAFC _IOW('x', 53, int) /* turn AFC on/off */ #define TVTUNER_GETAFC _IOR('x', 54, int) /* query AFC on/off */ #define BT848_SLNOTCH _IOW('x', 55, int) /* set luma notch */ #define BT848_GLNOTCH _IOR('x', 56, int) /* get luma notch */ /* Read/Write the BT848's I2C bus directly * b7-b0: data (read/write) * b15-b8: internal peripheral register (write) * b23-b16: i2c addr (write) * b31-b24: 1 = write, 0 = read */ #define BT848_I2CWR _IOWR('x', 57, u_long) /* i2c read-write */ struct bktr_msp_control { unsigned char function; unsigned int address; unsigned int data; }; #define BT848_MSP_RESET _IO('x', 76) /* MSP chip reset */ #define BT848_MSP_READ _IOWR('x', 77, struct bktr_msp_control) /* MSP chip read */ #define BT848_MSP_WRITE _IOWR('x', 78, struct bktr_msp_control) /* MSP chip write */ /* Support for radio tuner */ #define RADIO_SETMODE _IOW('x', 58, unsigned int) /* set radio modes */ #define RADIO_GETMODE _IOR('x', 58, unsigned char) /* get radio modes */ #define RADIO_AFC 0x01 /* These modes will probably not */ #define RADIO_MONO 0x02 /* work on the FRxxxx. It does */ #define RADIO_MUTE 0x08 /* work on the FMxxxx. */ #define RADIO_SETFREQ _IOW('x', 59, unsigned int) /* set frequency */ #define RADIO_GETFREQ _IOR('x', 59, unsigned int) /* set frequency */ /* Argument is frequency*100MHz */ /* * XXX: more bad magic, * we need to fix the METEORGINPUT to return something public * duplicate them here for now... */ #define METEOR_DEV0 0x00001000 #define METEOR_DEV1 0x00002000 #define METEOR_DEV2 0x00004000 #define METEOR_DEV3 0x00008000 #define METEOR_DEV_SVIDEO 0x00006000 /* * right now I don't know were to put these, but as they are suppose to be * a part of a common video capture interface, these should be relocated to * another place. Probably most of the METEOR_xxx defines need to be * renamed and moved to a common header */ typedef enum { METEOR_PIXTYPE_RGB, METEOR_PIXTYPE_YUV, METEOR_PIXTYPE_YUV_PACKED, METEOR_PIXTYPE_YUV_12 } METEOR_PIXTYPE; struct meteor_pixfmt { u_int index; /* Index in supported pixfmt list */ METEOR_PIXTYPE type; /* What's the board gonna feed us */ u_int Bpp; /* Bytes per pixel */ u_long masks[3]; /* R,G,B or Y,U,V masks, respectively */ unsigned swap_bytes :1; /* Bytes swapped within shorts */ unsigned swap_shorts:1; /* Shorts swapped within longs */ }; struct bktr_clip { int x_min; int x_max; int y_min; int y_max; }; #define BT848_MAX_CLIP_NODE 100 struct _bktr_clip { struct bktr_clip x[BT848_MAX_CLIP_NODE]; }; /* * I'm using METEOR_xxx just because that will be common to other interface * and less of a surprise */ #define METEORSACTPIXFMT _IOW('x', 64, int ) #define METEORGACTPIXFMT _IOR('x', 64, int ) #define METEORGSUPPIXFMT _IOWR('x', 65, struct meteor_pixfmt) /* set clip list */ #define BT848SCLIP _IOW('x', 66, struct _bktr_clip ) #define BT848GCLIP _IOR('x', 66, struct _bktr_clip ) /* set input format */ #define BT848SFMT _IOW('x', 67, unsigned long ) #define BT848GFMT _IOR('x', 67, unsigned long ) /* set clear-buffer-on-start */ #define BT848SCBUF _IOW('x', 68, int) #define BT848GCBUF _IOR('x', 68, int) /* set capture area */ /* The capture area is the area of the video image which is grabbed */ /* Usually the capture area is 640x480 (768x576 PAL) pixels */ /* This area is then scaled to the dimensions the user requires */ /* using the METEORGEO ioctl */ /* However, the capture area could be 400x300 pixels from the top right */ /* corner of the video image */ struct bktr_capture_area { int x_offset; int y_offset; int x_size; int y_size; }; #define BT848_SCAPAREA _IOW('x', 69, struct bktr_capture_area) #define BT848_GCAPAREA _IOR('x', 69, struct bktr_capture_area) /* Get channel Set */ #define BT848_MAX_CHNLSET_NAME_LEN 16 struct bktr_chnlset { short index; short max_channel; char name[BT848_MAX_CHNLSET_NAME_LEN]; }; #define TVTUNER_GETCHNLSET _IOWR('x', 70, struct bktr_chnlset) /* Infra Red Remote Control */ struct bktr_remote { unsigned char data[3]; }; #define REMOTE_GETKEY _IOR('x', 71, struct bktr_remote)/*read the remote */ /*control receiver*/ /*returns raw data*/ /* * Direct access to GPIO pins. You must add BKTR_GPIO_ACCESS to your kernel * configuration file to use these */ #define BT848_GPIO_SET_EN _IOW('x', 72, int) /* set gpio_out_en */ #define BT848_GPIO_GET_EN _IOR('x', 73, int) /* get gpio_out_en */ #define BT848_GPIO_SET_DATA _IOW('x', 74, int) /* set gpio_data */ #define BT848_GPIO_GET_DATA _IOR('x', 75, int) /* get gpio_data */ /* XXX - Copied from /sys/pci/brktree_reg.h */ #define BT848_IFORM_FORMAT (0x7<<0) # define BT848_IFORM_F_RSVD (0x7) # define BT848_IFORM_F_SECAM (0x6) # define BT848_IFORM_F_PALN (0x5) # define BT848_IFORM_F_PALM (0x4) # define BT848_IFORM_F_PALBDGHI (0x3) # define BT848_IFORM_F_NTSCJ (0x2) # define BT848_IFORM_F_NTSCM (0x1) # define BT848_IFORM_F_AUTO (0x0) #endif /* _MACHINE_IOCTL_BT848_H_ */ zapping-0.10cvs6/common/fifo.c 644 764 144 70425 10173356547 11427 /* * Copyright (C) 1999-2001 Michael H. Schimek * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. * * 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 this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* $Id: fifo.c,v 1.44 2005/01/19 04:09:11 mschimek Exp $ */ #ifdef HAVE_CONFIG_H # include "config.h" #endif #include #include #include #include #include #include #include "fifo.h" #include "alloc.h" #include "math.h" #ifndef CACHE_LINE #define CACHE_LINE 32 #endif #ifndef HAVE_PROGRAM_INVOCATION_NAME extern char *program_invocation_name; extern char *program_invocation_short_name; #endif #define _pthread_mutex_lock pthread_mutex_lock #define _pthread_mutex_unlock pthread_mutex_unlock typedef void cleanup_fn (void *); static char * addr2line(void *addr) { static char buf[256]; FILE *stream; char *d; snprintf(buf, 255, "addr2line -Ce \"%s\" 0x%lx", program_invocation_name, (long) addr); if (!(stream = popen(buf, "r"))) return NULL; fgets(buf, sizeof(buf) - 1, stream); pclose(stream); if (!(d = strchr(buf, '\n'))) return NULL; *d = 0; if (buf[0] == 0 || buf[0] == '?') return NULL; return buf; } void asserts_fail(const char *assertion, const char *file, unsigned int line, const char *function, void *caller) { char *at = addr2line(caller); if (at) fprintf(stderr, "%s: %s:%u: %s called from %s: Assertion \"%s\" failed\n", program_invocation_short_name, file, line, function, at, assertion); else fprintf(stderr, "%s: %s:%u: %s: Assertion \"%s\" failed\n", program_invocation_short_name, file, line, function, assertion); abort(); } /* * Buffer */ static z_bool nop(void) { return TRUE; } static void uninit_buffer(zf_buffer *b) { if (b->allocated) free_aligned(b->allocated); b->allocated = NULL; b->size = 0; } /** * init_buffer: * @b: zf_buffer * * @size: buffer memory to be allocated, in bytes < SSIZE_MAX. * * Initialize a buffer structure erasing all prior * contents, and allocate buffer memory if size > 0. * destroy_buffer() frees all resources associated * with the buffer. You may override b->destroy to * add your own cleanup functions. * * Return value: * The buffer pointer, or %NULL if the allocation failed. **/ zf_buffer * zf_init_buffer(zf_buffer *b, ssize_t size) { ssize_t page_size = (ssize_t) sysconf(_SC_PAGESIZE); memset(b, 0, sizeof(zf_buffer)); b->destroy = (void (*)(zf_buffer *)) nop; if (size > 0) { b->data = b->allocated = (unsigned char *) calloc_aligned((size_t) size, (unsigned int)((size < page_size) ? CACHE_LINE : page_size)); if (!b->allocated) return NULL; b->destroy = uninit_buffer; b->size = size; } return b; } static void free_buffer(zf_buffer *b) { uninit_buffer(b); free(b); } /** * alloc_buffer: * @size: buffer memory to be allocated, in bytes < %SSIZE_MAX. * * Allocate a buffer structure, and buffer memory if * size > 0. You must call destroy_buffer() to free all * resources associated with the buffer. You may override * b->destroy to add your own cleanup functions. * * Return value: * Buffer pointer, or %NULL if any allocation failed. **/ zf_buffer * zf_alloc_buffer(ssize_t size) { zf_buffer *b; if (!(b = (zf_buffer *) malloc(sizeof(zf_buffer)))) return NULL; if (!zf_init_buffer(b, size)) { free(b); return NULL; } if (size > 0) b->destroy = free_buffer; else b->destroy = (void (*)(zf_buffer *)) free; return b; } /* * Fifo */ /* * To avoid a deadlock, two threads holding a resource * the opposite wants to lock. */ static inline void mutex_bi_lock(pthread_mutex_t *m1, pthread_mutex_t *m2) { for (;;) { _pthread_mutex_lock(m1); if (pthread_mutex_trylock(m2) == 0) break; _pthread_mutex_unlock(m1); swap(m1, m2); } } static inline void mutex_co_lock(pthread_mutex_t *m1, pthread_mutex_t *m2) { while (pthread_mutex_trylock(m2) != 0) { _pthread_mutex_unlock(m1); swap(m1, m2); _pthread_mutex_lock(m1); } } static void dead_fifo(zf_fifo *f) { char *at = addr2line(__builtin_return_address(0)); if (at) fprintf(stderr, "Invalid fifo %p (%s) called at %s\n", f, f->name, at); else fprintf(stderr, "Invalid fifo %p (%s) called at %p\n", f, f->name, __builtin_return_address(0)); signal(SIGABRT, SIG_DFL); abort(); } static void dead_producer(zf_producer *p) { zf_fifo *f = p->fifo; char *at = addr2line(__builtin_return_address(0)); if (at) fprintf(stderr, "Invalid fifo %p (%s) called by producer %p at %s\n", f, f->name, p, at); else fprintf(stderr, "Invalid fifo %p (%s) called by producer %p at %p\n", f, f->name, p, __builtin_return_address(0)); signal(SIGABRT, SIG_DFL); abort(); } static void dead_consumer(zf_consumer *c) { zf_fifo *f = c->fifo; char *at = addr2line(__builtin_return_address(0)); if (at) fprintf(stderr, "Invalid fifo %p (%s) called by consumer " "%p at %s, terminating.\n", f, f->name, c, at); else fprintf(stderr, "Invalid fifo %p (%s) called by consumer " "%p at %p, terminating.\n", f, f->name, c, __builtin_return_address(0)); /* * A sane consumer should never hold a mutex * when calling fifo functions, so we won't block * joining other consumers or producers. */ pthread_exit(0); } static void uninit_fifo(zf_fifo *f) { node *n; f->destroy = (void (*)(zf_fifo *)) dead_fifo; f->wait_empty = (void (*)(zf_fifo *)) dead_fifo; f->send_full = (void (*)(zf_producer *, zf_buffer *)) dead_producer; f->wait_full = (void (*)(zf_fifo *)) dead_fifo; f->send_empty = (void (*)(zf_consumer *, zf_buffer *)) dead_consumer; f->start = (z_bool (*)(zf_fifo *)) dead_fifo; f->stop = (void (*)(zf_fifo *)) dead_fifo; f->alloc_buffer = NULL; while ((n = rem_tail(&f->buffers))) zf_destroy_buffer(PARENT(n, zf_buffer, added)); /* destroy_list(&f->buffers); */ mucon_destroy(&f->pro); mucon_destroy(&f->con); /* destroy_list(&f->full); destroy_list(&f->empty); destroy_list(&f->producers); destroy_list(&f->consumers); */ } /** * wait_full_buffer_timeout: * @c: zf_consumer * * @timeout: struct timespec * * * Suspends execution of the calling thread until a full buffer becomes * available for consumption or the timeout is reached. * Otherwise identical to recv_full_buffer(). * * Return value: * Buffer pointer, or %NULL if the timeout was reached. **/ zf_buffer * zf_wait_full_buffer_timeout(zf_consumer *c, struct timespec *timeout) { zf_fifo *f = c->fifo; zf_buffer *b; int err = 0; _pthread_mutex_lock(&f->consumer->mutex); while (!(b = c->next_buffer)->node.succ) { if (f->c_reentry++ || !f->wait_full) { /* Free resources which may block other consumers */ pthread_cleanup_push ((cleanup_fn *) _pthread_mutex_unlock, &f->consumer->mutex); if (timeout) err = pthread_cond_timedwait (&f->consumer->cond, &f->consumer->mutex, timeout); else err = pthread_cond_wait (&f->consumer->cond, &f->consumer->mutex); pthread_cleanup_pop (0); } else { _pthread_mutex_unlock(&f->consumer->mutex); f->wait_full(f); _pthread_mutex_lock(&f->consumer->mutex); } f->c_reentry--; if (err == ETIMEDOUT) { _pthread_mutex_unlock(&f->consumer->mutex); return NULL; } } c->next_buffer = (zf_buffer *) b->node.succ; b->dequeued++; _pthread_mutex_unlock(&f->consumer->mutex); c->dequeued++; // fprintf(stderr, "WFB %s b=%p dq=%d\n", f->name, b, c->dequeued); return b; } /** * wait_full_buffer: * @c: zf_consumer * * * Suspends execution of the calling thread until a full buffer becomes * available for consumption. Otherwise identical to recv_full_buffer(). * * Return value: * Buffer pointer, never %NULL. **/ zf_buffer * zf_wait_full_buffer(zf_consumer *c) { return zf_wait_full_buffer_timeout (c, NULL); } /* * This function removes the *oldest* buffer from the full queue * which meets these conditions: * - the buffer has no b->used == 0 (eof) or b->used < 0 (error), * to avoid consumers miss this information * - it is not in use by any consumer (b->enqueued < b->dequeued) * - it has been consumed at least once, to avoid producers * spinloop with unlinked buffers * - it has been consumed by the majority of consumers (rounding * up, ie. 1/2, 2/3, 2/4, 3/5). This way the caller (producer) * is throttled when the majority of consumers (be it just one) * is slow, reducing the CPU load. Otherwise the minority of * slow consumers will loose buffers ("drop frames"). * * f->consumers->mutex must be locked when calling this. */ static zf_buffer * unlink_full_buffer(zf_fifo *f) { zf_consumer *c; zf_buffer *b; if (!f->unlink_full_buffers || f->consumers.members < 2) return NULL; for_all_nodes (b, &f->full, node) { if (0) printf("Unlink cand %p <%s> en=%d de=%d co=%d us=%d\n", b, (char *) b->data, b->enqueued, b->dequeued, b->consumers, b->used); if (b->enqueued >= b->dequeued && (b->enqueued * 2) >= b->consumers && b->used > 0) { for_all_nodes (c, &f->consumers, node) if (c->next_buffer == b) c->next_buffer = (zf_buffer *) b->node.succ; b->consumers = 0; b->dequeued = 0; b = PARENT(unlink_node(&f->full, &b->node), zf_buffer, node); return b; } } return NULL; } static void wait_empty_buffer_cleanup(mucon *m) { rem_head(&m->list); _pthread_mutex_unlock(&m->mutex); } /** * wait_empty_buffer: * @p: zf_producer * * @timeout: struct timespec * * * Suspends execution of the calling thread until an empty buffer becomes * available or the timeout is reached. Otherwise identical to * recv_empty_buffer(). * * Return value: * Buffer pointer, or %NULL if the timeout was reached. **/ zf_buffer * zf_wait_empty_buffer_timeout(zf_producer *p, struct timespec *timeout) { zf_fifo *f = p->fifo; zf_buffer *b = NULL; node n; int err = 0; _pthread_mutex_lock(&f->producer->mutex); if (!empty_list(&f->producer->list)) goto wait; while (!(b = PARENT(rem_head(&f->empty), zf_buffer, node))) { mutex_co_lock(&f->producer->mutex, &f->consumer->mutex); if ((b = unlink_full_buffer(f))) { _pthread_mutex_unlock(&f->consumer->mutex); break; } _pthread_mutex_unlock(&f->consumer->mutex); wait: if (f->p_reentry++ || !f->wait_empty) { /* Free resources which may block other producers */ pthread_cleanup_push ((cleanup_fn *) wait_empty_buffer_cleanup, f->producer); add_tail(&f->producer->list, &n); /* * Assure first come first served * XXX works, but inefficient */ do { if (timeout) err = pthread_cond_timedwait (&f->producer->cond, &f->producer->mutex, timeout); else err = pthread_cond_wait (&f->producer->cond, &f->producer->mutex); } while (err != ETIMEDOUT && f->producer->list.head != &n); pthread_cleanup_pop(0); rem_head(&f->producer->list); } else { _pthread_mutex_unlock(&f->producer->mutex); f->wait_empty(f); _pthread_mutex_lock(&f->producer->mutex); } f->p_reentry--; if (err == ETIMEDOUT) { _pthread_mutex_unlock(&f->producer->mutex); return NULL; } } _pthread_mutex_unlock(&f->producer->mutex); b->dequeued = 1; p->dequeued++; // fprintf(stderr, "WEB %s b=%p dq=%d\n", f->name, b, p->dequeued); return b; } /** * wait_empty_buffer: * @p: zf_producer * * * Suspends execution of the calling thread until an empty buffer becomes * available. Otherwise identical to recv_empty_buffer(). * * Return value: * Buffer pointer, never %NULL. **/ zf_buffer * zf_wait_empty_buffer(zf_producer *p) { return zf_wait_empty_buffer_timeout (p, NULL); } /* * This is the unbuffered lower half of function send_empty_buffer(), * for callback consumers which lack a virtual full queue. */ static inline void send_empty_unbuffered(zf_consumer *c, zf_buffer *b) { zf_fifo *f = c->fifo; b->dequeued = 0; b->consumers = 0; _pthread_mutex_lock(&f->producer->mutex); add_head(&f->empty, &b->node); if (f->buffer_done) f->buffer_done(f, b); _pthread_mutex_unlock(&f->producer->mutex); pthread_cond_broadcast(&f->producer->cond); } /* * This is the buffered lower half of function send_empty_buffer(). */ void zf_send_empty_buffered(zf_consumer *c, zf_buffer *b) { zf_fifo *f = c->fifo; _pthread_mutex_lock(&f->consumer->mutex); if (++b->enqueued >= b->consumers) unlink_node(&f->full, &b->node); else b = NULL; _pthread_mutex_unlock(&f->consumer->mutex); if (!b) return; if (b->remove) { unlink_node(&f->buffers, &b->added); zf_destroy_buffer(b); return; } send_empty_unbuffered(c, b); } /* * This is the lower half of function send_full_buffer(). * * b->dequeued, enqueued are zero. */ static void send_full(zf_producer *p, zf_buffer *b) { zf_fifo *f = p->fifo; _pthread_mutex_lock(&f->consumer->mutex); if ((b->consumers = f->consumers.members)) { zf_consumer *c; /* * c->next_buffer is NULL after the consumer dequeued all * buffers from the virtual f->full queue. */ for_all_nodes (c, &f->consumers, node) if (!c->next_buffer->node.succ) c->next_buffer = b; add_tail(&f->full, &b->node); _pthread_mutex_unlock(&f->consumer->mutex); pthread_cond_broadcast(&f->consumer->cond); } else { zf_consumer c; _pthread_mutex_unlock(&f->consumer->mutex); /* * Nobody is listening, I'm only the loopback. */ asserts(!f->wait_empty); c.fifo = f; send_empty_unbuffered(&c, b); } } /** * send_full_buffer: * @p: zf_producer * * @b: zf_buffer * * * Producers call this function when a previously dequeued empty * buffer has been filled and is ready for consumption. Dereferencing * the buffer pointer after sending the buffer is not permitted. * * Take precautions to avoid spinlooping because consumption * of buffers may take no time. * * These fields must be valid: * b->data Pointer to the buffer payload. * b->used Bytes of buffer payload. Zero indicates the end of a * stream and negative values indicate a non-recoverable * error. Consumers must send_empty_buffer() all received * buffers regardless of the b->used value. Producers * need not send EOF before they are removed from a fifo. * When a fifo has multiple producers the EOF will be * recorded until all producers sent EOF, the buffer * will be recycled. Sending non-zero b->used after EOF * is not permitted. * b->error Copy of errno if appropriate, zero otherwise. * b->errstr Pointer to a gettext()ized error message for display * to the user if appropriate, %NULL otherwise. Shall not * include strerror(errno), but rather hint the attempted * action (e.g. "tried to read foo", errno = [no such file]). * * These fields have application specific semantics: * b->type e.g. MPEG picture type * b->offset e.g. IPB picture reorder offset * b->time Seconds elapsed since some arbitrary reference point, * usually epoch (gettimeofday()), for example the capture * instant of a picture. b->time may not always increase, * but consumers are guaranteed to receive buffers in * sent order. **/ void zf_send_full_buffer(zf_producer *p, zf_buffer *b) { /* Migration prohibited, don't use this to add buffers to the fifo (n/a to asy callback producers) */ asserts(p->fifo == b->fifo /* && b->dequeued == 1 */); b->consumers = 1; b->dequeued = 0; b->enqueued = 0; p->dequeued--; if (b->used > 0) { asserts(!p->eof_sent); } else { zf_fifo *f = p->fifo; _pthread_mutex_lock(&f->producer->mutex); if (!p->eof_sent) f->eof_count++; if (f->eof_count < (int) list_members(&f->producers)) { b->consumers = 0; b->used = -1; b->error = EINVAL; b->errorstr = NULL; add_head(&f->empty, &b->node); p->eof_sent = TRUE; _pthread_mutex_unlock(&f->producer->mutex); pthread_cond_broadcast(&f->producer->cond); return; } p->eof_sent = TRUE; _pthread_mutex_unlock(&f->producer->mutex); } p->fifo->send_full(p, b); } /** * rem_buffer: * @b: zf_buffer * * * Remove the buffer which has been previously added to its * fifo by add_buffer(), from the fifo and destroy it with * destroy_buffer(). * * You can remove any buffer regardless if full, empty, * dequeued or enqueued. It will be either destroyed immediately * or scheduled for removal as soon as it has been consumed. **/ void zf_rem_buffer(zf_buffer *b) { zf_fifo *f = b->fifo; _pthread_mutex_lock(&f->consumer->mutex); /* * We do not remove buffers on the full queue: consumers > 0, * which have not been consumed yet: dequeued < consumers, * or are currently in use: enqueued < dequeued. * But we do remove buffers which reside on the empty queue * (have been returned by all consumers): consumers == dequeued == 0. * or have been dequeued from the empty queue: dequeued > 0, */ if (b->consumers == 0) { if (b->dequeued == 0) unlink_node(&f->empty, &b->node); unlink_node(&f->buffers, &b->added); zf_destroy_buffer(b); } else b->remove = TRUE; _pthread_mutex_unlock(&f->consumer->mutex); } static zf_buffer * attach_buffer(zf_fifo *f, zf_buffer *b) { if (!b) return NULL; b->fifo = f; b->consumers = 0; b->dequeued = 0; b->enqueued = 0; b->used = -1; b->error = EINVAL; add_tail(&f->buffers, &b->added); return b; } /** * add_buffer: * @f: zf_fifo * * @b: zf_buffer * * * Add the buffer to the fifo buffers list and make it available * for use. No op when @b is %NULL. Be warned havoc may prevail * when the caller of this function and the fifo owner disagree * about the buffer allocation method. * * Return value: * %FALSE when @b is %NULL. **/ z_bool zf_add_buffer(zf_fifo *f, zf_buffer *b) { zf_consumer c; if (!attach_buffer(f, b)) return FALSE; c.fifo = f; send_empty_unbuffered(&c, b); return TRUE; } static int init_fifo(zf_fifo *f, const char *name, void (* custom_wait_empty)(zf_fifo *), void (* custom_send_full)(zf_producer *, zf_buffer *), void (* custom_wait_full)(zf_fifo *), void (* custom_send_empty)(zf_consumer *, zf_buffer *), int num_buffers, ssize_t buffer_size) { memset(f, 0, sizeof(zf_fifo)); strncpy(f->name, name, sizeof(f->name) - 1); f->unlink_full_buffers = TRUE; f->wait_empty = custom_wait_empty; f->send_full = custom_send_full; f->wait_full = custom_wait_full; f->send_empty = custom_send_empty; f->start = (z_bool (*)(zf_fifo *)) nop; f->stop = (void (*)(zf_fifo *)) nop; f->destroy = uninit_fifo; f->alloc_buffer = zf_alloc_buffer; init_list(&f->full); init_list(&f->empty); init_list(&f->producers); init_list(&f->consumers); mucon_init(f->producer = &f->pro); mucon_init(f->consumer = &f->con); init_list(&f->buffers); for (; num_buffers > 0; num_buffers--) { zf_buffer *b; if (!(b = attach_buffer(f, f->alloc_buffer(buffer_size)))) { if (empty_list(&f->buffers)) { uninit_fifo(f); return 0; } else break; } add_tail(&f->empty, &b->node); } return list_members(&f->buffers); } /** * init_buffered_fifo: * @f: zf_fifo * * @name: The fifo name, for debugging purposes. Will be copied. * @num_buffers: Number of buffer objects to allocate and add to the fifo as * with add_buffer(). * @buffer_size: If non-zero this is the size in bytes of buffer memory to * be allocated for each buffer with alloc_buffer(). * * Initialize a fifo structure erasing all prior contents, and allocate * buffer memory as desired. destroy_fifo() frees all resources associated * with the fifo. You may override f->destroy to add your own cleanup functions. * * Return value: * The number of buffers actually allocated. **/ int zf_init_buffered_fifo(zf_fifo *f, const char *name, int num_buffers, ssize_t buffer_size) { return init_fifo(f, name, NULL, send_full, NULL, zf_send_empty_buffered, num_buffers, buffer_size); } /** * init_callback_fifo: * @f: zf_fifo * * @name: The fifo name, for debugging purposes. Will be copied. * @custom_wait_empty: Custom functions, see below. NULL to get the default. * @custom_send_full: dto. * @custom_wait_full: dto. * @custom_send_empty: dto. * @num_buffers: Number of buffers to allocate and add to the fifo as * with add_buffer(). * @buffer_size: If non-zero this is the size in bytes of buffer memory to * be allocated for each buffer with alloc_buffer(). * * DEPRECATED. Will be replaced. * * Some producers or consumers merely transfer data to another fifo, * for example a device driver. Running a separate thread for this purpose * is just a waste of resources, so fifos can be initialized to use custom * functions for i/o. Callback fifos are transparent to the opposite side * and permit multiple producers or consumers. * * Note that custom_wait_* callbacks are protected from reentrancy, * custom_send_* callbacks must do their own serialization. * * Entering callback functions is not enough, the callback producer or * consumer must be added to the fifo with add_producer() or add_consumer() * to complete the initialization. Apart of this, init_callback_fifo() is * identical to init_buffered_fifo(). * * a) Callback producer * Preface: * add_buffer() (or init_callback_fifo does it) * custom_send_full(): * %NULL (default) * custom_wait_empty(): * %NULL (default). If no buffers are available this will * block until a consumer returns an empty buffer, should * only happen when the fifo has less buffers than consumers * or the producer wants more than one buffer for synchronous i/o. * Consumer: * wait_full_buffer() * send_empty_buffer() * Producer, synchronous i/o: * custom_wait_full(): * call wait_empty_buffer(). Initially this will take a * buffer from the empty queue, added by add_buffer(). * complete i/o * call send_full_buffer() and return * Of course you can wait for and send more buffers at once. * custom_send_empty(): * %NULL (default). Puts the buffer on the empty queue * for wait_empty_buffer(). * Producer, asynchronous i/o: * custom_send_empty(): * XXX flawed, rethink: send_empty_buffered? * start i/o and return * custom_wait_full(): * wait for i/o completion * call send_full_buffer() and return * * b) Callback consumer * Preface: * add_buffer() (or init_callback_fifo does it) * custom_send_empty(): * %NULL (default) * custom_wait_full(): * %NULL (default). If no buffers are available this will * block until a producer provides a full buffer, should * only happen when the fifo has less buffers than producers * or the consumer wants more than one buffer for synchronous i/o. * Producer: * wait_empty_buffer(). Initially this will take a * buffer from the empty queue, added by add_buffer(). * send_full_buffer() * Consumer, synchronous i/o: * custom_wait_empty(): * call wait_full_buffer() * complete i/o * call send_empty_buffer() and return * custom_send_full(): * NULL (default). Puts the buffer on the full queue * for wait_full_buffer(). * Consumer, asynchronous i/o: * custom_send_full(): * XXX check * start i/o and return * custom_wait_empty(): * wait for i/o completion * call send_empty_buffer() and return * * c) There is no c), either the producer or consumer must * provide callbacks. * * Return value: * The number of buffers actually allocated. **/ int zf_init_callback_fifo(zf_fifo *f, const char *name, void (* custom_wait_empty)(zf_fifo *), void (* custom_send_full)(zf_producer *, zf_buffer *), void (* custom_wait_full)(zf_fifo *), void (* custom_send_empty)(zf_consumer *, zf_buffer *), int num_buffers, ssize_t buffer_size) { // asserts((!!custom_wait_empty) != (!!custom_wait_full)); // asserts((!!custom_wait_empty) >= (!!custom_send_full)); // asserts((!!custom_wait_full) >= (!!custom_send_empty)); if (!custom_send_full) custom_send_full = send_full; if (!custom_send_empty) { if (custom_wait_empty) custom_send_empty = send_empty_unbuffered; else custom_send_empty = zf_send_empty_buffered; } return init_fifo(f, name, custom_wait_empty, custom_send_full, custom_wait_full, custom_send_empty, num_buffers, buffer_size); } /** * rem_producer: * @p: zf_producer * * * Detach a producer from its fifo. No resource tracking; * All previously dequeued buffers must be returned with * send_full_buffer() before calling this function or they * remain unavailable until the fifo is destroyed. * * Safe to call after add_producer failed. **/ void zf_rem_producer(zf_producer *p) { zf_fifo *f; if ((f = p->fifo)) { _pthread_mutex_lock(&f->producer->mutex); if (rem_node(&f->producers, &p->node)) { asserts(p->dequeued == 0); /* * Pretend we didn't attempt an eof, and when * we really sent eofs remember it. */ if (f->eof_count > 1) if (p->eof_sent) f->eof_count--; } _pthread_mutex_unlock(&f->producer->mutex); } memset(p, 0, sizeof(*p)); } /** * add_producer: * @f: zf_fifo * * @p: zf_producer * * * Initialize the producer object and add the producer to an * already initialized fifo. The fifo will recycle old buffers * when it runs out of empty buffers, so producers will not * starve when the fifo has no consumers. * * Producers should be removed when done to free resources, and * must be removed before destroying the producer object, with * the rem_producer() function. * * Return value: * The producer pointer, or %NULL if the operation failed. **/ zf_producer * zf_add_producer(zf_fifo *f, zf_producer *p) { p->fifo = f; p->dequeued = 0; p->eof_sent = FALSE; _pthread_mutex_lock(&f->producer->mutex); /* * Callback producers are individuals and finished * fifos remain finished. (Just in case.) */ if ((empty_list(&f->producers) || !f->wait_full) && f->eof_count <= (int) list_members(&f->consumers)) add_tail(&f->producers, &p->node); else p = NULL; _pthread_mutex_unlock(&f->producer->mutex); return p; } /** * rem_consumer: * @c: zf_consumer * * * Detach a consumer from its fifo. No resource tracking; * All previously dequeued buffers must be returned with * send_empty_buffer() before calling this function or they * remain unavailable until the fifo is destroyed. * * Safe to call after add_consumer failed. **/ void zf_rem_consumer(zf_consumer *c) { zf_fifo *f; if ((f = c->fifo)) { _pthread_mutex_lock(&f->consumer->mutex); if (rem_node(&f->consumers, &c->node)) { zf_buffer *b; asserts(c->dequeued == 0); if (c->next_buffer) { for_all_nodes (b, &f->full, node) { b->consumers = f->consumers.members; } } } _pthread_mutex_unlock(&f->consumer->mutex); } memset(c, 0, sizeof(*c)); } /** * add_consumer: * @f: zf_fifo * * @c: zf_consumer * * * Initialize the consumer object and add the consumer to an * already initialized fifo. The consumer will not dequeue buffers * which have been produced and enqueued prior to this call. * * Consumers should be removed when done to free resources, and * must be removed before destroying the consumer object, with * the rem_consumer() function. * * Return value: * The consumer pointer, or %NULL if the operation failed. **/ zf_consumer * zf_add_consumer(zf_fifo *f, zf_consumer *c) { c->fifo = f; c->next_buffer = (zf_buffer *) &f->full.null; c->dequeued = 0; mutex_bi_lock(&f->producer->mutex, &f->consumer->mutex); /* * Callback consumers are individuals and finished * fifos are inhibited for new consumers. (Just in case.) */ if ((empty_list(&f->consumers) || !f->wait_empty) && f->eof_count <= (int) list_members(&f->consumers)) add_tail(&f->consumers, &c->node); else c = NULL; _pthread_mutex_unlock(&f->producer->mutex); _pthread_mutex_unlock(&f->consumer->mutex); return c; } /* TODO: * test callbacks * stealing buffers & callbacks ok? * add_p/c shall make a fifo callback * error ignores mp-fifo, in data direction only * add wait timeout (optional) */ zapping-0.10cvs6/common/fifo.h 644 764 144 25415 10222615545 11422 /* * Copyright (C) 1999-2001 Michael H. Schimek * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. * * 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 this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* $Id: fifo.h,v 1.35 2005/03/30 21:34:29 mschimek Exp $ */ #ifndef FIFO_H #define FIFO_H #include #include #include "list.h" #include "threads.h" typedef struct zf_fifo zf_fifo; typedef struct zf_buffer zf_buffer; typedef struct zf_consumer zf_consumer; typedef struct zf_producer zf_producer; struct zf_buffer { struct node node; /* fifo->full/empty */ zf_fifo * fifo; /* * These fields are used for the "virtual full queue". * * consumer->next points to the next buffer in fifo->full * to be dequeued, NULL if all buffers have been consumed. * (b->refcount used to count the number of these * references but it turned out redundant.) * * consumers is their number at send_full time, always > 0 * because without consumers the buffer is instantly * send_emptied. We can't use fifo->consumers.members * because new consumers shall not dequeue old buffers. * * dequeued and enqueued count the wait_full and send_empty * calls, respectively. A buffer is actually send_emptied * when enqueued >= consumers, and can be "recycled" when * dequeued == 0. enqueued > dequeued is already implied by * enqueued > consumers and no steady state. * * For empty buffers b->refcount is n/a, consumers always 0 and * dequeued counts the wait_empty calls. enqueued is n/a * because send_full transfers the buffer immediately to * the full queue. * * See rem_buffer for scheduled removal. */ int consumers; int dequeued; int enqueued; z_bool remove; /* Consumer read only, see send_full_buffer() */ int type; /* application specific */ int offset; double time; unsigned char * data; /* mandatory */ ssize_t used; int error; /* copy of errno */ char * errorstr; /* gettext()ized, may be NULL */ /* Owner private */ struct node added; /* fifo->buffers */ unsigned char * allocated; ssize_t size; void (* destroy)(zf_buffer *); void * user_data; /* XXX? */ int rte_flags; /* rte internal use */ }; struct zf_fifo { struct node node; /* owner private */ char name[64]; /* for debug messages */ mucon pro, con; list full; /* FIFO */ list empty; /* LIFO */ list producers; list consumers; int p_reentry; int c_reentry; int eof_count; /* counts p->eof_sent */ /* Owner private */ mucon * producer; /* -> pro */ mucon * consumer; /* -> con */ list buffers; /* add/rem_buffer */ z_bool unlink_full_buffers; /* default true */ void (* wait_empty)(zf_fifo *); void (* send_full)(struct zf_producer *, zf_buffer *); void (* wait_full)(zf_fifo *); void (* send_empty)(struct zf_consumer *, zf_buffer *); z_bool (* start)(zf_fifo *); void (* stop)(zf_fifo *); void (* destroy)(zf_fifo *); void * user_data; zf_buffer * (* alloc_buffer)(ssize_t); void (* buffer_done)(zf_fifo *, zf_buffer *); }; struct zf_producer { struct node node; /* fifo->producers */ zf_fifo * fifo; int dequeued; /* bookkeeping */ z_bool eof_sent; }; struct zf_consumer { struct node node; /* fifo->consumers */ zf_fifo * fifo; zf_buffer * next_buffer; /* virtual pointer */ int dequeued; /* bookkeeping */ }; /** * current_time: * * Buffer time is usually noted in seconds TOD. Unfortunately too * many interfaces provide no interrupt time so we have no choice * but to query the system clock. * * Return value: * gettimeofday() in seconds and fractions, double. **/ static inline double zf_current_time(void) { struct timeval tv; gettimeofday(&tv, NULL); return tv.tv_sec + tv.tv_usec * (1 / 1e6); /* rezp. mult is faster, not auto optimized for accuracy */ } /** * destroy_buffer: * @b: buffer * * * Free all resources associated with the buffer. This is a * low-level function, don't call it for buffers which have * been added to a fifo. No op when @b is %NULL. **/ static inline void zf_destroy_buffer(zf_buffer *b) { if (b && b->destroy) b->destroy(b); } extern zf_buffer * zf_init_buffer(zf_buffer *, ssize_t); extern zf_buffer * zf_alloc_buffer(ssize_t); /** * destroy_fifo: * @f: fifo * * * Free all resources associated with the fifo, including all * buffers. Make sure no threads are using the fifo and no * producers or consumers can be added. * * Removing all producers and consumers before calling this * function is not necessary, for example when a consumer * aborted before detaching himself from the fifo. * * No op when @f is %NULL. **/ static inline void zf_destroy_fifo(zf_fifo *f) { if (f && f->destroy) f->destroy(f); } /** * recv_full_buffer: * @c: consumer * * * Dequeues the next buffer in production order from the consumer's fifo's * full queue. Remind callback (unbuffered) fifos do not fill automatically * but only when the consumer calls wait_full_buffer(). In this case * recv_full_buffer() returns a buffer only after unget_full_buffer() or * when the producer enqueued more than one full buffer at the last * wait_full_buffer(). * * Buffers must be returned with send_empty_buffer() as soon as possible * for re-use by the producer, including those with buffer.used == 0 * (end of stream) or buffer.used < 0 (error). You can dequeue more buffers * before returning and buffers need not be returned in order. All buffer * contents are read-only for consumers. * * None of the fifo functions depend on the identity of the calling thread * (thread_t), however we assume the consumer object is not shared. * * Return value: * Buffer pointer, or %NULL if the full queue is empty. **/ static inline zf_buffer * zf_recv_full_buffer(zf_consumer *c) { zf_fifo *f = c->fifo; zf_buffer *b; pthread_mutex_lock(&f->consumer->mutex); if ((b = c->next_buffer)->node.succ) { c->next_buffer = (zf_buffer *) b->node.succ; b->dequeued++; c->dequeued++; } else b = NULL; pthread_mutex_unlock(&f->consumer->mutex); return b; } extern zf_buffer * zf_wait_full_buffer(zf_consumer *c); extern zf_buffer * zf_wait_full_buffer_timeout(zf_consumer *c, struct timespec *timeout); /** * unget_full_buffer: * @c: consumer * * @b: buffer * * * Put buffer @b, dequeued with wait_full_buffer() or recv_full_buffer() * and not yet returned with send_empty_buffer(), back on the full queue * of its fifo, to be dequeued again later. You can unget more than one * buffer, in reverse order of dequeuing, starting with the most * recently dequeued. **/ static inline void zf_unget_full_buffer(zf_consumer *c, zf_buffer *b) { zf_fifo *f = c->fifo; /* Migration prohibited */ assert(c->fifo == b->fifo); assert (c->dequeued > 0); c->dequeued--; pthread_mutex_lock(&f->consumer->mutex); assert(c->next_buffer == (zf_buffer *) b->node.succ); b->dequeued--; c->next_buffer = b; pthread_mutex_unlock(&f->consumer->mutex); } /** * send_empty_buffer: * @c: consumer * * @b: buffer * * * Consumers call this function when done with a previously dequeued * full buffer. Dereferencing the buffer pointer after sending the * buffer is not permitted. **/ static inline void zf_send_empty_buffer(zf_consumer *c, zf_buffer *b) { /* Migration prohibited */ assert(c->fifo == b->fifo); assert (c->dequeued > 0); c->dequeued--; c->fifo->send_empty(c, b); } /* XXX rethink */ extern void zf_send_empty_buffered(zf_consumer *c, zf_buffer *b); /** * recv_empty_buffer: * @p: producer * * * Dequeues an empty buffer, no particular order, from the producer's fifo's * empty queue. Remind callback (unbuffered) fifos do not fill automatically * but only when the producer calls wait_empty_buffer(). * * Send filled buffers with send_full_buffer(). You can dequeue more buffers * before sending and buffers need not be sent in dequeuing order. * * None of the fifo functions depend on the identity of the calling thread * (thread_t), however we assume the producer object is not shared. * * Return value: * Buffer pointer, or %NULL if the empty queue is empty. **/ static inline zf_buffer * zf_recv_empty_buffer(zf_producer *p) { zf_fifo *f = p->fifo; zf_buffer *b; pthread_mutex_lock(&f->producer->mutex); b = PARENT(rem_head(&f->empty), zf_buffer, node); pthread_mutex_unlock(&f->producer->mutex); if (b) { b->dequeued = 1; p->dequeued++; } return b; } extern zf_buffer * zf_wait_empty_buffer (zf_producer * p); extern zf_buffer * zf_wait_empty_buffer_timeout (zf_producer * p, struct timespec * timeout); /** * unget_empty_buffer: * @p: producer * * @b: buffer * * * Put buffer @b, dequeued with wait_empty_buffer() or recv_empty_buffer() * and not yet enqueued with send_full_buffer(), back on the empty queue * of its fifo, to be dequeued again later. You can unget more than one * buffer, in any order, but not the same buffer twice. * * It may happen another producer grabs the ungot buffer, so a subsequent * recv_empty_buffer() will not necessarily succeed. **/ static inline void zf_unget_empty_buffer(zf_producer *p, zf_buffer *b) { zf_fifo *f = p->fifo; /* Migration prohibited, don't use this to add buffers to the fifo */ assert(p->fifo == b->fifo && b->dequeued == 1); p->dequeued--; b->dequeued = 0; pthread_mutex_lock(&f->producer->mutex); add_tail(&f->empty, &b->node); pthread_mutex_unlock(&f->producer->mutex); } extern void zf_send_full_buffer(zf_producer *p, zf_buffer *b); extern void zf_rem_buffer(zf_buffer *b); extern z_bool zf_add_buffer(zf_fifo *f, zf_buffer *b); extern int zf_init_buffered_fifo(zf_fifo *f, const char *name, int num_buffers, ssize_t buffer_size); extern int zf_init_callback_fifo(zf_fifo *f, const char *name, void (* custom_wait_empty)(zf_fifo *), void (* custom_send_full)(zf_producer *, zf_buffer *), void (* custom_wait_full)(zf_fifo *), void (* custom_send_empty)(zf_consumer *, zf_buffer *), int num_buffers, ssize_t buffer_size); extern void zf_rem_producer(zf_producer *p); extern zf_producer * zf_add_producer(zf_fifo *f, zf_producer *p); extern void zf_rem_consumer(zf_consumer *c); extern zf_consumer * zf_add_consumer(zf_fifo *f, zf_consumer *c); /* XXX TBD */ /* start only *after* adding a consumer? */ /* mp-fifos? */ static inline z_bool zf_start_fifo(zf_fifo *f) { return f->start(f); } #endif /* FIFO_H */ zapping-0.10cvs6/common/_videodev25.h 644 764 144 111051 10427306000 12610 /* Generated file, do not edit! */ #include #include "common/device.h" #ifndef __GNUC__ #undef __attribute__ #define __attribute__(x) #endif static void fprint_enum_v4l2_buf_type (FILE *fp, int rw __attribute__ ((unused)), int value) { fprint_symbolic (fp, 1, value, "VIDEO_CAPTURE", (unsigned long) V4L2_BUF_TYPE_VIDEO_CAPTURE, "VIDEO_OUTPUT", (unsigned long) V4L2_BUF_TYPE_VIDEO_OUTPUT, "VIDEO_OVERLAY", (unsigned long) V4L2_BUF_TYPE_VIDEO_OVERLAY, "VBI_CAPTURE", (unsigned long) V4L2_BUF_TYPE_VBI_CAPTURE, "VBI_OUTPUT", (unsigned long) V4L2_BUF_TYPE_VBI_OUTPUT, "PRIVATE", (unsigned long) V4L2_BUF_TYPE_PRIVATE, (void *) 0); } static void fprint_struct_v4l2_rect (FILE *fp, int rw __attribute__ ((unused)), const struct v4l2_rect *t) { fprintf (fp, "left=%ld " "top=%ld " "width=%ld " "height=%ld ", (long) t->left, (long) t->top, (long) t->width, (long) t->height); } static void fprint_struct_v4l2_crop (FILE *fp, int rw __attribute__ ((unused)), const struct v4l2_crop *t) { fputs ("type=", fp); fprint_enum_v4l2_buf_type (fp, rw, t->type); fputs (" c={", fp); fprint_struct_v4l2_rect (fp, rw, &t->c); fputs ("} ", fp); } static void fprint_struct_v4l2_fmtdesc (FILE *fp, int rw __attribute__ ((unused)), const struct v4l2_fmtdesc *t) { fprintf (fp, "index=%lu ", (unsigned long) t->index); if (1 == rw) { fputs ("type=", fp); fprint_enum_v4l2_buf_type (fp, rw, t->type); fputs (" flags=", fp); fprint_symbolic (fp, 2, t->flags, "COMPRESSED", (unsigned long) V4L2_FMT_FLAG_COMPRESSED, (void *) 0); fprintf (fp, " description=\"%.*s\" " "pixelformat=\"%.4s\"=0x%lx " "reserved[] ", 32, (const char *) t->description, (const char *) & t->pixelformat, (unsigned long) t->pixelformat); } } static void fprint_enum_v4l2_tuner_type (FILE *fp, int rw __attribute__ ((unused)), int value) { fprint_symbolic (fp, 1, value, "RADIO", (unsigned long) V4L2_TUNER_RADIO, "ANALOG_TV", (unsigned long) V4L2_TUNER_ANALOG_TV, (void *) 0); } static void fprint_symbol_v4l2_tuner_cap_ (FILE *fp, int rw __attribute__ ((unused)), unsigned long value) { fprint_symbolic (fp, 0, value, "LOW", (unsigned long) V4L2_TUNER_CAP_LOW, "NORM", (unsigned long) V4L2_TUNER_CAP_NORM, "STEREO", (unsigned long) V4L2_TUNER_CAP_STEREO, "LANG2", (unsigned long) V4L2_TUNER_CAP_LANG2, "SAP", (unsigned long) V4L2_TUNER_CAP_SAP, "LANG1", (unsigned long) V4L2_TUNER_CAP_LANG1, (void *) 0); } static void fprint_symbol_v4l2_tuner_sub_ (FILE *fp, int rw __attribute__ ((unused)), unsigned long value) { fprint_symbolic (fp, 0, value, "MONO", (unsigned long) V4L2_TUNER_SUB_MONO, "STEREO", (unsigned long) V4L2_TUNER_SUB_STEREO, "LANG2", (unsigned long) V4L2_TUNER_SUB_LANG2, "SAP", (unsigned long) V4L2_TUNER_SUB_SAP, "LANG1", (unsigned long) V4L2_TUNER_SUB_LANG1, (void *) 0); } static void fprint_symbol_v4l2_tuner_mode_ (FILE *fp, int rw __attribute__ ((unused)), unsigned long value) { fprint_symbolic (fp, 0, value, "MONO", (unsigned long) V4L2_TUNER_MODE_MONO, "STEREO", (unsigned long) V4L2_TUNER_MODE_STEREO, "LANG2", (unsigned long) V4L2_TUNER_MODE_LANG2, "SAP", (unsigned long) V4L2_TUNER_MODE_SAP, "LANG1", (unsigned long) V4L2_TUNER_MODE_LANG1, (void *) 0); } static void fprint_struct_v4l2_tuner (FILE *fp, int rw __attribute__ ((unused)), const struct v4l2_tuner *t) { fprintf (fp, "index=%lu " "name=\"%.*s\" " "type=", (unsigned long) t->index, 32, (const char *) t->name); fprint_enum_v4l2_tuner_type (fp, rw, t->type); fputs (" capability=", fp); fprint_symbol_v4l2_tuner_cap_ (fp, rw, t->capability); fprintf (fp, " rangelow=%lu " "rangehigh=%lu " "rxsubchans=", (unsigned long) t->rangelow, (unsigned long) t->rangehigh); fprint_symbol_v4l2_tuner_sub_ (fp, rw, t->rxsubchans); fputs (" audmode=", fp); fprint_symbol_v4l2_tuner_mode_ (fp, rw, t->audmode); fprintf (fp, " signal=%ld " "afc=%ld " "reserved[] ", (long) t->signal, (long) t->afc); } static void fprint_symbol_v4l2_cap_ (FILE *fp, int rw __attribute__ ((unused)), unsigned long value) { fprint_symbolic (fp, 0, value, "VIDEO_CAPTURE", (unsigned long) V4L2_CAP_VIDEO_CAPTURE, "VIDEO_OUTPUT", (unsigned long) V4L2_CAP_VIDEO_OUTPUT, "VIDEO_OVERLAY", (unsigned long) V4L2_CAP_VIDEO_OVERLAY, "VBI_CAPTURE", (unsigned long) V4L2_CAP_VBI_CAPTURE, "VBI_OUTPUT", (unsigned long) V4L2_CAP_VBI_OUTPUT, "RDS_CAPTURE", (unsigned long) V4L2_CAP_RDS_CAPTURE, "TUNER", (unsigned long) V4L2_CAP_TUNER, "AUDIO", (unsigned long) V4L2_CAP_AUDIO, "RADIO", (unsigned long) V4L2_CAP_RADIO, "READWRITE", (unsigned long) V4L2_CAP_READWRITE, "ASYNCIO", (unsigned long) V4L2_CAP_ASYNCIO, "STREAMING", (unsigned long) V4L2_CAP_STREAMING, "TIMEPERFRAME", (unsigned long) V4L2_CAP_TIMEPERFRAME, (void *) 0); } static void fprint_struct_v4l2_capability (FILE *fp, int rw __attribute__ ((unused)), const struct v4l2_capability *t) { fprintf (fp, "driver=\"%.*s\" " "card=\"%.*s\" " "bus_info=\"%.*s\" " "version=0x%lx " "capabilities=", 16, (const char *) t->driver, 32, (const char *) t->card, 32, (const char *) t->bus_info, (unsigned long) t->version); fprint_symbol_v4l2_cap_ (fp, rw, t->capabilities); fputs (" reserved[] ", fp); } static void fprint_symbol_v4l2_cid_ (FILE *fp, int rw __attribute__ ((unused)), unsigned long value) { fprint_symbolic (fp, 0, value, "BASE", (unsigned long) V4L2_CID_BASE, "PRIVATE_BASE", (unsigned long) V4L2_CID_PRIVATE_BASE, "BRIGHTNESS", (unsigned long) V4L2_CID_BRIGHTNESS, "CONTRAST", (unsigned long) V4L2_CID_CONTRAST, "SATURATION", (unsigned long) V4L2_CID_SATURATION, "HUE", (unsigned long) V4L2_CID_HUE, "AUDIO_VOLUME", (unsigned long) V4L2_CID_AUDIO_VOLUME, "AUDIO_BALANCE", (unsigned long) V4L2_CID_AUDIO_BALANCE, "AUDIO_BASS", (unsigned long) V4L2_CID_AUDIO_BASS, "AUDIO_TREBLE", (unsigned long) V4L2_CID_AUDIO_TREBLE, "AUDIO_MUTE", (unsigned long) V4L2_CID_AUDIO_MUTE, "AUDIO_LOUDNESS", (unsigned long) V4L2_CID_AUDIO_LOUDNESS, "BLACK_LEVEL", (unsigned long) V4L2_CID_BLACK_LEVEL, "AUTO_WHITE_BALANCE", (unsigned long) V4L2_CID_AUTO_WHITE_BALANCE, "DO_WHITE_BALANCE", (unsigned long) V4L2_CID_DO_WHITE_BALANCE, "RED_BALANCE", (unsigned long) V4L2_CID_RED_BALANCE, "BLUE_BALANCE", (unsigned long) V4L2_CID_BLUE_BALANCE, "GAMMA", (unsigned long) V4L2_CID_GAMMA, "WHITENESS", (unsigned long) V4L2_CID_WHITENESS, "EXPOSURE", (unsigned long) V4L2_CID_EXPOSURE, "AUTOGAIN", (unsigned long) V4L2_CID_AUTOGAIN, "GAIN", (unsigned long) V4L2_CID_GAIN, "HFLIP", (unsigned long) V4L2_CID_HFLIP, "VFLIP", (unsigned long) V4L2_CID_VFLIP, "HCENTER", (unsigned long) V4L2_CID_HCENTER, "VCENTER", (unsigned long) V4L2_CID_VCENTER, "LASTP1", (unsigned long) V4L2_CID_LASTP1, (void *) 0); } static void fprint_enum_v4l2_ctrl_type (FILE *fp, int rw __attribute__ ((unused)), int value) { fprint_symbolic (fp, 1, value, "INTEGER", (unsigned long) V4L2_CTRL_TYPE_INTEGER, "BOOLEAN", (unsigned long) V4L2_CTRL_TYPE_BOOLEAN, "MENU", (unsigned long) V4L2_CTRL_TYPE_MENU, "BUTTON", (unsigned long) V4L2_CTRL_TYPE_BUTTON, (void *) 0); } static void fprint_struct_v4l2_queryctrl (FILE *fp, int rw __attribute__ ((unused)), const struct v4l2_queryctrl *t) { fputs ("id=", fp); fprint_symbol_v4l2_cid_ (fp, rw, t->id); fputs (" ", fp); if (1 == rw) { fputs ("type=", fp); fprint_enum_v4l2_ctrl_type (fp, rw, t->type); fprintf (fp, " name=\"%.*s\" " "minimum=%ld " "maximum=%ld " "step=%ld " "default_value=%ld " "flags=", 32, (const char *) t->name, (long) t->minimum, (long) t->maximum, (long) t->step, (long) t->default_value); fprint_symbolic (fp, 2, t->flags, "DISABLED", (unsigned long) V4L2_CTRL_FLAG_DISABLED, "GRABBED", (unsigned long) V4L2_CTRL_FLAG_GRABBED, (void *) 0); fputs (" reserved[] ", fp); } } static void fprint_struct_v4l2_modulator (FILE *fp, int rw __attribute__ ((unused)), const struct v4l2_modulator *t) { fprintf (fp, "index=%lu " "name=\"%.*s\" " "capability=", (unsigned long) t->index, 32, (const char *) t->name); fprint_symbol_v4l2_tuner_cap_ (fp, rw, t->capability); fprintf (fp, " rangelow=%lu " "rangehigh=%lu " "txsubchans=", (unsigned long) t->rangelow, (unsigned long) t->rangehigh); fprint_symbol_v4l2_tuner_sub_ (fp, rw, t->txsubchans); fputs (" reserved[] ", fp); } static void fprint_symbol_v4l2_std_ (FILE *fp, int rw __attribute__ ((unused)), unsigned long value) { fprint_symbolic (fp, 0, value, "PAL_B", (unsigned long) V4L2_STD_PAL_B, "PAL_B1", (unsigned long) V4L2_STD_PAL_B1, "PAL_G", (unsigned long) V4L2_STD_PAL_G, "PAL_H", (unsigned long) V4L2_STD_PAL_H, "PAL_I", (unsigned long) V4L2_STD_PAL_I, "PAL_D", (unsigned long) V4L2_STD_PAL_D, "PAL_D1", (unsigned long) V4L2_STD_PAL_D1, "PAL_K", (unsigned long) V4L2_STD_PAL_K, "PAL_M", (unsigned long) V4L2_STD_PAL_M, "PAL_N", (unsigned long) V4L2_STD_PAL_N, "PAL_Nc", (unsigned long) V4L2_STD_PAL_Nc, "PAL_60", (unsigned long) V4L2_STD_PAL_60, "NTSC_M", (unsigned long) V4L2_STD_NTSC_M, "NTSC_M_JP", (unsigned long) V4L2_STD_NTSC_M_JP, "SECAM_B", (unsigned long) V4L2_STD_SECAM_B, "SECAM_D", (unsigned long) V4L2_STD_SECAM_D, "SECAM_G", (unsigned long) V4L2_STD_SECAM_G, "SECAM_H", (unsigned long) V4L2_STD_SECAM_H, "SECAM_K", (unsigned long) V4L2_STD_SECAM_K, "SECAM_K1", (unsigned long) V4L2_STD_SECAM_K1, "SECAM_L", (unsigned long) V4L2_STD_SECAM_L, "ATSC_8_VSB", (unsigned long) V4L2_STD_ATSC_8_VSB, "ATSC_16_VSB", (unsigned long) V4L2_STD_ATSC_16_VSB, "PAL_BG", (unsigned long) V4L2_STD_PAL_BG, "PAL_DK", (unsigned long) V4L2_STD_PAL_DK, "PAL", (unsigned long) V4L2_STD_PAL, "NTSC", (unsigned long) V4L2_STD_NTSC, "SECAM_DK", (unsigned long) V4L2_STD_SECAM_DK, "SECAM", (unsigned long) V4L2_STD_SECAM, "525_60", (unsigned long) V4L2_STD_525_60, "625_50", (unsigned long) V4L2_STD_625_50, "ATSC", (unsigned long) V4L2_STD_ATSC, "UNKNOWN", (unsigned long) V4L2_STD_UNKNOWN, "ALL", (unsigned long) V4L2_STD_ALL, (void *) 0); } static void fprint_symbol_v4l2_in_st_ (FILE *fp, int rw __attribute__ ((unused)), unsigned long value) { fprint_symbolic (fp, 0, value, "NO_POWER", (unsigned long) V4L2_IN_ST_NO_POWER, "NO_SIGNAL", (unsigned long) V4L2_IN_ST_NO_SIGNAL, "NO_COLOR", (unsigned long) V4L2_IN_ST_NO_COLOR, "NO_H_LOCK", (unsigned long) V4L2_IN_ST_NO_H_LOCK, "COLOR_KILL", (unsigned long) V4L2_IN_ST_COLOR_KILL, "NO_SYNC", (unsigned long) V4L2_IN_ST_NO_SYNC, "NO_EQU", (unsigned long) V4L2_IN_ST_NO_EQU, "NO_CARRIER", (unsigned long) V4L2_IN_ST_NO_CARRIER, "MACROVISION", (unsigned long) V4L2_IN_ST_MACROVISION, "NO_ACCESS", (unsigned long) V4L2_IN_ST_NO_ACCESS, "VTR", (unsigned long) V4L2_IN_ST_VTR, (void *) 0); } static void fprint_struct_v4l2_input (FILE *fp, int rw __attribute__ ((unused)), const struct v4l2_input *t) { fprintf (fp, "index=%lu ", (unsigned long) t->index); if (1 == rw) { fprintf (fp, "name=\"%.*s\" " "type=", 32, (const char *) t->name); fprint_symbolic (fp, 0, t->type, "TUNER", (unsigned long) V4L2_INPUT_TYPE_TUNER, "CAMERA", (unsigned long) V4L2_INPUT_TYPE_CAMERA, (void *) 0); fprintf (fp, " audioset=%lu " "tuner=%lu " "std=", (unsigned long) t->audioset, (unsigned long) t->tuner); fprint_symbol_v4l2_std_ (fp, rw, t->std); fputs (" status=", fp); fprint_symbol_v4l2_in_st_ (fp, rw, t->status); fputs (" reserved[] ", fp); } } static void fprint_symbol_v4l2_pix_fmt_ (FILE *fp, int rw __attribute__ ((unused)), unsigned long value) { fprint_symbolic (fp, 0, value, "RGB332", (unsigned long) V4L2_PIX_FMT_RGB332, "RGB555", (unsigned long) V4L2_PIX_FMT_RGB555, "RGB565", (unsigned long) V4L2_PIX_FMT_RGB565, "RGB555X", (unsigned long) V4L2_PIX_FMT_RGB555X, "RGB565X", (unsigned long) V4L2_PIX_FMT_RGB565X, "BGR24", (unsigned long) V4L2_PIX_FMT_BGR24, "RGB24", (unsigned long) V4L2_PIX_FMT_RGB24, "BGR32", (unsigned long) V4L2_PIX_FMT_BGR32, "RGB32", (unsigned long) V4L2_PIX_FMT_RGB32, "GREY", (unsigned long) V4L2_PIX_FMT_GREY, "YVU410", (unsigned long) V4L2_PIX_FMT_YVU410, "YVU420", (unsigned long) V4L2_PIX_FMT_YVU420, "YUYV", (unsigned long) V4L2_PIX_FMT_YUYV, "UYVY", (unsigned long) V4L2_PIX_FMT_UYVY, "YUV422P", (unsigned long) V4L2_PIX_FMT_YUV422P, "YUV411P", (unsigned long) V4L2_PIX_FMT_YUV411P, "Y41P", (unsigned long) V4L2_PIX_FMT_Y41P, "NV12", (unsigned long) V4L2_PIX_FMT_NV12, "NV21", (unsigned long) V4L2_PIX_FMT_NV21, "YUV410", (unsigned long) V4L2_PIX_FMT_YUV410, "YUV420", (unsigned long) V4L2_PIX_FMT_YUV420, "YYUV", (unsigned long) V4L2_PIX_FMT_YYUV, "HI240", (unsigned long) V4L2_PIX_FMT_HI240, "SBGGR8", (unsigned long) V4L2_PIX_FMT_SBGGR8, "MJPEG", (unsigned long) V4L2_PIX_FMT_MJPEG, "JPEG", (unsigned long) V4L2_PIX_FMT_JPEG, "DV", (unsigned long) V4L2_PIX_FMT_DV, "MPEG", (unsigned long) V4L2_PIX_FMT_MPEG, "WNVA", (unsigned long) V4L2_PIX_FMT_WNVA, (void *) 0); } static void fprint_enum_v4l2_field (FILE *fp, int rw __attribute__ ((unused)), int value) { fprint_symbolic (fp, 1, value, "ANY", (unsigned long) V4L2_FIELD_ANY, "NONE", (unsigned long) V4L2_FIELD_NONE, "TOP", (unsigned long) V4L2_FIELD_TOP, "BOTTOM", (unsigned long) V4L2_FIELD_BOTTOM, "INTERLACED", (unsigned long) V4L2_FIELD_INTERLACED, "SEQ_TB", (unsigned long) V4L2_FIELD_SEQ_TB, "SEQ_BT", (unsigned long) V4L2_FIELD_SEQ_BT, "ALTERNATE", (unsigned long) V4L2_FIELD_ALTERNATE, (void *) 0); } static void fprint_enum_v4l2_colorspace (FILE *fp, int rw __attribute__ ((unused)), int value) { fprint_symbolic (fp, 1, value, "SMPTE170M", (unsigned long) V4L2_COLORSPACE_SMPTE170M, "SMPTE240M", (unsigned long) V4L2_COLORSPACE_SMPTE240M, "REC709", (unsigned long) V4L2_COLORSPACE_REC709, "BT878", (unsigned long) V4L2_COLORSPACE_BT878, "470_SYSTEM_M", (unsigned long) V4L2_COLORSPACE_470_SYSTEM_M, "470_SYSTEM_BG", (unsigned long) V4L2_COLORSPACE_470_SYSTEM_BG, "JPEG", (unsigned long) V4L2_COLORSPACE_JPEG, "SRGB", (unsigned long) V4L2_COLORSPACE_SRGB, (void *) 0); } static void fprint_struct_v4l2_pix_format (FILE *fp, int rw __attribute__ ((unused)), const struct v4l2_pix_format *t) { fprintf (fp, "width=%lu " "height=%lu " "pixelformat=", (unsigned long) t->width, (unsigned long) t->height); fprint_symbol_v4l2_pix_fmt_ (fp, rw, t->pixelformat); fputs (" field=", fp); fprint_enum_v4l2_field (fp, rw, t->field); fprintf (fp, " bytesperline=%lu " "sizeimage=%lu " "colorspace=", (unsigned long) t->bytesperline, (unsigned long) t->sizeimage); fprint_enum_v4l2_colorspace (fp, rw, t->colorspace); fprintf (fp, " priv=%lu ", (unsigned long) t->priv); } static void fprint_struct_v4l2_window (FILE *fp, int rw __attribute__ ((unused)), const struct v4l2_window *t) { fputs ("w={", fp); fprint_struct_v4l2_rect (fp, rw, &t->w); fputs ("} field=", fp); fprint_enum_v4l2_field (fp, rw, t->field); fprintf (fp, " chromakey=%lu " "clips=%p " "clipcount=%lu " "bitmap=%p ", (unsigned long) t->chromakey, (const void *) t->clips, (unsigned long) t->clipcount, (const void *) t->bitmap); } static void fprint_struct_v4l2_vbi_format (FILE *fp, int rw __attribute__ ((unused)), const struct v4l2_vbi_format *t) { fprintf (fp, "sampling_rate=%lu " "offset=%lu " "samples_per_line=%lu " "sample_format=", (unsigned long) t->sampling_rate, (unsigned long) t->offset, (unsigned long) t->samples_per_line); fprint_symbol_v4l2_pix_fmt_ (fp, rw, t->sample_format); fputs (" start[]=? " "count[]=? " "flags=", fp); fprint_symbolic (fp, 2, t->flags, "UNSYNC", (unsigned long) V4L2_VBI_UNSYNC, "INTERLACED", (unsigned long) V4L2_VBI_INTERLACED, (void *) 0); fputs (" reserved[] ", fp); } static void fprint_struct_v4l2_format (FILE *fp, int rw __attribute__ ((unused)), const struct v4l2_format *t) { fputs ("type=", fp); fprint_enum_v4l2_buf_type (fp, rw, t->type); fputs (" ", fp); fputs ("fmt={", fp); if (V4L2_BUF_TYPE_VIDEO_CAPTURE == t->type) { fputs ("pix={", fp); fprint_struct_v4l2_pix_format (fp, rw, &t->fmt.pix); fputs ("} ", fp); } if (V4L2_BUF_TYPE_VIDEO_OVERLAY == t->type) { fputs ("win={", fp); fprint_struct_v4l2_window (fp, rw, &t->fmt.win); fputs ("} ", fp); } if (V4L2_BUF_TYPE_VBI_CAPTURE == t->type) { fputs ("vbi={", fp); fprint_struct_v4l2_vbi_format (fp, rw, &t->fmt.vbi); fputs ("} ", fp); } fputs ("raw_data[]=? ", fp); fputs ("} ", fp); } static void fprint_symbol_v4l2_buf_flag_ (FILE *fp, int rw __attribute__ ((unused)), unsigned long value) { fprint_symbolic (fp, 2, value, "MAPPED", (unsigned long) V4L2_BUF_FLAG_MAPPED, "QUEUED", (unsigned long) V4L2_BUF_FLAG_QUEUED, "DONE", (unsigned long) V4L2_BUF_FLAG_DONE, "KEYFRAME", (unsigned long) V4L2_BUF_FLAG_KEYFRAME, "PFRAME", (unsigned long) V4L2_BUF_FLAG_PFRAME, "BFRAME", (unsigned long) V4L2_BUF_FLAG_BFRAME, "TIMECODE", (unsigned long) V4L2_BUF_FLAG_TIMECODE, "INPUT", (unsigned long) V4L2_BUF_FLAG_INPUT, (void *) 0); } static void fprint_symbol_v4l2_tc_type_ (FILE *fp, int rw __attribute__ ((unused)), unsigned long value) { fprint_symbolic (fp, 0, value, "24FPS", (unsigned long) V4L2_TC_TYPE_24FPS, "25FPS", (unsigned long) V4L2_TC_TYPE_25FPS, "30FPS", (unsigned long) V4L2_TC_TYPE_30FPS, "50FPS", (unsigned long) V4L2_TC_TYPE_50FPS, "60FPS", (unsigned long) V4L2_TC_TYPE_60FPS, (void *) 0); } static void fprint_struct_v4l2_timecode (FILE *fp, int rw __attribute__ ((unused)), const struct v4l2_timecode *t) { fputs ("type=", fp); fprint_symbol_v4l2_tc_type_ (fp, rw, t->type); fputs (" flags=", fp); fprint_symbolic (fp, 2, t->flags, "DROPFRAME", (unsigned long) V4L2_TC_FLAG_DROPFRAME, "COLORFRAME", (unsigned long) V4L2_TC_FLAG_COLORFRAME, (void *) 0); fprintf (fp, " frames=%lu " "seconds=%lu " "minutes=%lu " "hours=%lu " "userbits[]=? ", (unsigned long) t->frames, (unsigned long) t->seconds, (unsigned long) t->minutes, (unsigned long) t->hours); } static void fprint_enum_v4l2_memory (FILE *fp, int rw __attribute__ ((unused)), int value) { fprint_symbolic (fp, 1, value, "MMAP", (unsigned long) V4L2_MEMORY_MMAP, "USERPTR", (unsigned long) V4L2_MEMORY_USERPTR, "OVERLAY", (unsigned long) V4L2_MEMORY_OVERLAY, (void *) 0); } static void fprint_struct_v4l2_buffer (FILE *fp, int rw __attribute__ ((unused)), const struct v4l2_buffer *t) { fprintf (fp, "index=%lu " "type=", (unsigned long) t->index); fprint_enum_v4l2_buf_type (fp, rw, t->type); fputs (" ", fp); if (1 == rw) { fprintf (fp, "bytesused=%lu ", (unsigned long) t->bytesused); } fputs ("flags=", fp); fprint_symbol_v4l2_buf_flag_ (fp, rw, t->flags); fputs (" ", fp); if (1 == rw) { fputs ("field=", fp); fprint_enum_v4l2_field (fp, rw, t->field); fputs (" timestamp=? timecode={", fp); fprint_struct_v4l2_timecode (fp, rw, &t->timecode); fprintf (fp, "} sequence=%lu " "memory=", (unsigned long) t->sequence); fprint_enum_v4l2_memory (fp, rw, t->memory); fputs (" ", fp); fputs ("m={", fp); } if (1 == rw && V4L2_MEMORY_MMAP == t->memory) { fprintf (fp, "offset=%lu ", (unsigned long) t->m.offset); } if (1 == rw && V4L2_MEMORY_USERPTR == t->memory) { fprintf (fp, "userptr=%lu ", (unsigned long) t->m.userptr); } if (1 == rw) { fprintf (fp, "} length=%lu " "input=%lu " "reserved ", (unsigned long) t->length, (unsigned long) t->input); } } static void fprint_struct_v4l2_control (FILE *fp, int rw __attribute__ ((unused)), const struct v4l2_control *t) { fputs ("id=", fp); fprint_symbol_v4l2_cid_ (fp, rw, t->id); fprintf (fp, " value=%ld ", (long) t->value); } static void fprint_struct_v4l2_fract (FILE *fp, int rw __attribute__ ((unused)), const struct v4l2_fract *t) { fprintf (fp, "%u/%u", t->numerator, t->denominator); } static void fprint_struct_v4l2_captureparm (FILE *fp, int rw __attribute__ ((unused)), const struct v4l2_captureparm *t) { fputs ("capability=", fp); fprint_symbol_v4l2_cap_ (fp, rw, t->capability); fputs (" capturemode=", fp); fprint_symbolic (fp, 0, t->capturemode, "HIGHQUALITY", (unsigned long) V4L2_MODE_HIGHQUALITY, (void *) 0); fputs (" timeperframe={", fp); fprint_struct_v4l2_fract (fp, rw, &t->timeperframe); fprintf (fp, "} extendedmode=%lu " "readbuffers=%lu " "reserved[] ", (unsigned long) t->extendedmode, (unsigned long) t->readbuffers); } static void fprint_struct_v4l2_outputparm (FILE *fp, int rw __attribute__ ((unused)), const struct v4l2_outputparm *t) { fprintf (fp, "capability=%lu " "outputmode=%lu " "timeperframe={", (unsigned long) t->capability, (unsigned long) t->outputmode); fprint_struct_v4l2_fract (fp, rw, &t->timeperframe); fprintf (fp, "} extendedmode=%lu " "writebuffers=%lu " "reserved[] ", (unsigned long) t->extendedmode, (unsigned long) t->writebuffers); } static void fprint_struct_v4l2_streamparm (FILE *fp, int rw __attribute__ ((unused)), const struct v4l2_streamparm *t) { fputs ("type=", fp); fprint_enum_v4l2_buf_type (fp, rw, t->type); fputs (" ", fp); fputs ("parm={capture={", fp); fprint_struct_v4l2_captureparm (fp, rw, &t->parm.capture); fputs ("} output={", fp); fprint_struct_v4l2_outputparm (fp, rw, &t->parm.output); fputs ("} raw_data[]=? ", fp); fputs ("} ", fp); } static void fprint_struct_v4l2_frequency (FILE *fp, int rw __attribute__ ((unused)), const struct v4l2_frequency *t) { fprintf (fp, "tuner=%lu " "type=", (unsigned long) t->tuner); fprint_enum_v4l2_tuner_type (fp, rw, t->type); fprintf (fp, " frequency=%lu " "reserved[] ", (unsigned long) t->frequency); } static void fprint_struct_v4l2_querymenu (FILE *fp, int rw __attribute__ ((unused)), const struct v4l2_querymenu *t) { fputs ("id=", fp); fprint_symbol_v4l2_cid_ (fp, rw, t->id); fputs (" index=", fp); fprint_symbol_v4l2_cid_ (fp, rw, t->index); fputs (" ", fp); if (1 == rw) { fprintf (fp, "name=\"%.*s\" " "reserved ", 32, (const char *) t->name); } } static void fprint_symbol_v4l2_jpeg_marker_ (FILE *fp, int rw __attribute__ ((unused)), unsigned long value) { fprint_symbolic (fp, 0, value, "DHT", (unsigned long) V4L2_JPEG_MARKER_DHT, "DQT", (unsigned long) V4L2_JPEG_MARKER_DQT, "DRI", (unsigned long) V4L2_JPEG_MARKER_DRI, "COM", (unsigned long) V4L2_JPEG_MARKER_COM, "APP", (unsigned long) V4L2_JPEG_MARKER_APP, (void *) 0); } static void fprint_struct_v4l2_jpegcompression (FILE *fp, int rw __attribute__ ((unused)), const struct v4l2_jpegcompression *t) { fprintf (fp, "quality=%ld " "APPn=%ld " "APP_len=%ld " "APP_data=\"%.*s\" " "COM_len=%ld " "COM_data=\"%.*s\" " "jpeg_markers=", (long) t->quality, (long) t->APPn, (long) t->APP_len, 60, (const char *) t->APP_data, (long) t->COM_len, 60, (const char *) t->COM_data); fprint_symbol_v4l2_jpeg_marker_ (fp, rw, t->jpeg_markers); fputs (" ", fp); } static void fprint_struct_v4l2_audioout (FILE *fp, int rw __attribute__ ((unused)), const struct v4l2_audioout *t) { fprintf (fp, "index=%lu ", (unsigned long) t->index); if (1 == rw) { fprintf (fp, "name=\"%.*s\" " "capability=%lu " "mode=%lu " "reserved[] ", 32, (const char *) t->name, (unsigned long) t->capability, (unsigned long) t->mode); } } static void fprint_struct_v4l2_requestbuffers (FILE *fp, int rw __attribute__ ((unused)), const struct v4l2_requestbuffers *t) { fprintf (fp, "count=%lu " "type=", (unsigned long) t->count); fprint_enum_v4l2_buf_type (fp, rw, t->type); fputs (" memory=", fp); fprint_enum_v4l2_memory (fp, rw, t->memory); fputs (" reserved[] ", fp); } static void fprint_struct_v4l2_cropcap (FILE *fp, int rw __attribute__ ((unused)), const struct v4l2_cropcap *t) { fputs ("type=", fp); fprint_enum_v4l2_buf_type (fp, rw, t->type); fputs (" bounds={", fp); fprint_struct_v4l2_rect (fp, rw, &t->bounds); fputs ("} defrect={", fp); fprint_struct_v4l2_rect (fp, rw, &t->defrect); fputs ("} pixelaspect={", fp); fprint_struct_v4l2_fract (fp, rw, &t->pixelaspect); fputs ("} ", fp); } static void fprint_struct_v4l2_audio (FILE *fp, int rw __attribute__ ((unused)), const struct v4l2_audio *t) { fprintf (fp, "index=%lu ", (unsigned long) t->index); if (1 == rw) { fprintf (fp, "name=\"%.*s\" " "capability=", 32, (const char *) t->name); fprint_symbolic (fp, 0, t->capability, "STEREO", (unsigned long) V4L2_AUDCAP_STEREO, "AVL", (unsigned long) V4L2_AUDCAP_AVL, (void *) 0); fputs (" mode=", fp); fprint_symbolic (fp, 0, t->mode, "AVL", (unsigned long) V4L2_AUDMODE_AVL, (void *) 0); fputs (" reserved[] ", fp); } } static void fprint_struct_v4l2_output (FILE *fp, int rw __attribute__ ((unused)), const struct v4l2_output *t) { fprintf (fp, "index=%lu ", (unsigned long) t->index); if (1 == rw) { fprintf (fp, "name=\"%.*s\" " "type=", 32, (const char *) t->name); fprint_symbolic (fp, 0, t->type, "MODULATOR", (unsigned long) V4L2_OUTPUT_TYPE_MODULATOR, "ANALOG", (unsigned long) V4L2_OUTPUT_TYPE_ANALOG, "ANALOGVGAOVERLAY", (unsigned long) V4L2_OUTPUT_TYPE_ANALOGVGAOVERLAY, (void *) 0); fprintf (fp, " audioset=%lu " "modulator=%lu " "std=", (unsigned long) t->audioset, (unsigned long) t->modulator); fprint_symbol_v4l2_std_ (fp, rw, t->std); fputs (" reserved[] ", fp); } } static void fprint_symbol_v4l2_fbuf_cap_ (FILE *fp, int rw __attribute__ ((unused)), unsigned long value) { fprint_symbolic (fp, 0, value, "EXTERNOVERLAY", (unsigned long) V4L2_FBUF_CAP_EXTERNOVERLAY, "CHROMAKEY", (unsigned long) V4L2_FBUF_CAP_CHROMAKEY, "LIST_CLIPPING", (unsigned long) V4L2_FBUF_CAP_LIST_CLIPPING, "BITMAP_CLIPPING", (unsigned long) V4L2_FBUF_CAP_BITMAP_CLIPPING, (void *) 0); } static void fprint_struct_v4l2_framebuffer (FILE *fp, int rw __attribute__ ((unused)), const struct v4l2_framebuffer *t) { fputs ("capability=", fp); fprint_symbol_v4l2_fbuf_cap_ (fp, rw, t->capability); fputs (" flags=", fp); fprint_symbolic (fp, 2, t->flags, "PRIMARY", (unsigned long) V4L2_FBUF_FLAG_PRIMARY, "OVERLAY", (unsigned long) V4L2_FBUF_FLAG_OVERLAY, "CHROMAKEY", (unsigned long) V4L2_FBUF_FLAG_CHROMAKEY, (void *) 0); fputs (" base=? " "fmt={", fp); fprint_struct_v4l2_pix_format (fp, rw, &t->fmt); fputs ("} ", fp); } static void fprint_struct_v4l2_standard (FILE *fp, int rw __attribute__ ((unused)), const struct v4l2_standard *t) { fprintf (fp, "index=%lu ", (unsigned long) t->index); if (1 == rw) { fputs ("id=", fp); fprint_symbol_v4l2_std_ (fp, rw, t->id); fprintf (fp, " name=\"%.*s\" " "frameperiod={", 24, (const char *) t->name); fprint_struct_v4l2_fract (fp, rw, &t->frameperiod); fprintf (fp, "} framelines=%lu " "reserved[] ", (unsigned long) t->framelines); } } static void fprint_v4l25_ioctl_arg (FILE *fp, unsigned int cmd, int rw, void *arg) { switch (cmd) { case VIDIOC_G_CROP: if (!arg) { fputs ("VIDIOC_G_CROP", fp); return; } case VIDIOC_S_CROP: if (!arg) { fputs ("VIDIOC_S_CROP", fp); return; } fprint_struct_v4l2_crop (fp, rw, arg); break; case VIDIOC_OVERLAY: if (!arg) { fputs ("VIDIOC_OVERLAY", fp); return; } case VIDIOC_STREAMON: if (!arg) { fputs ("VIDIOC_STREAMON", fp); return; } case VIDIOC_STREAMOFF: if (!arg) { fputs ("VIDIOC_STREAMOFF", fp); return; } case VIDIOC_G_INPUT: if (!arg) { fputs ("VIDIOC_G_INPUT", fp); return; } case VIDIOC_S_INPUT: if (!arg) { fputs ("VIDIOC_S_INPUT", fp); return; } case VIDIOC_G_OUTPUT: if (!arg) { fputs ("VIDIOC_G_OUTPUT", fp); return; } case VIDIOC_S_OUTPUT: if (!arg) { fputs ("VIDIOC_S_OUTPUT", fp); return; } case VIDIOC_OVERLAY_OLD: if (!arg) { fputs ("VIDIOC_OVERLAY_OLD", fp); return; } fprintf (fp, "%ld", (long) * (int *) arg); break; case VIDIOC_ENUM_FMT: if (!arg) { fputs ("VIDIOC_ENUM_FMT", fp); return; } fprint_struct_v4l2_fmtdesc (fp, rw, arg); break; case VIDIOC_G_TUNER: if (!arg) { fputs ("VIDIOC_G_TUNER", fp); return; } case VIDIOC_S_TUNER: if (!arg) { fputs ("VIDIOC_S_TUNER", fp); return; } fprint_struct_v4l2_tuner (fp, rw, arg); break; case VIDIOC_QUERYCAP: if (!arg) { fputs ("VIDIOC_QUERYCAP", fp); return; } fprint_struct_v4l2_capability (fp, rw, arg); break; case VIDIOC_QUERYCTRL: if (!arg) { fputs ("VIDIOC_QUERYCTRL", fp); return; } fprint_struct_v4l2_queryctrl (fp, rw, arg); break; case VIDIOC_G_MODULATOR: if (!arg) { fputs ("VIDIOC_G_MODULATOR", fp); return; } case VIDIOC_S_MODULATOR: if (!arg) { fputs ("VIDIOC_S_MODULATOR", fp); return; } fprint_struct_v4l2_modulator (fp, rw, arg); break; case VIDIOC_ENUMINPUT: if (!arg) { fputs ("VIDIOC_ENUMINPUT", fp); return; } fprint_struct_v4l2_input (fp, rw, arg); break; case VIDIOC_G_FMT: if (!arg) { fputs ("VIDIOC_G_FMT", fp); return; } case VIDIOC_S_FMT: if (!arg) { fputs ("VIDIOC_S_FMT", fp); return; } case VIDIOC_TRY_FMT: if (!arg) { fputs ("VIDIOC_TRY_FMT", fp); return; } fprint_struct_v4l2_format (fp, rw, arg); break; case VIDIOC_QUERYBUF: if (!arg) { fputs ("VIDIOC_QUERYBUF", fp); return; } case VIDIOC_QBUF: if (!arg) { fputs ("VIDIOC_QBUF", fp); return; } case VIDIOC_DQBUF: if (!arg) { fputs ("VIDIOC_DQBUF", fp); return; } fprint_struct_v4l2_buffer (fp, rw, arg); break; case VIDIOC_G_CTRL: if (!arg) { fputs ("VIDIOC_G_CTRL", fp); return; } case VIDIOC_S_CTRL: if (!arg) { fputs ("VIDIOC_S_CTRL", fp); return; } case VIDIOC_S_CTRL_OLD: if (!arg) { fputs ("VIDIOC_S_CTRL_OLD", fp); return; } fprint_struct_v4l2_control (fp, rw, arg); break; case VIDIOC_G_STD: if (!arg) { fputs ("VIDIOC_G_STD", fp); return; } case VIDIOC_S_STD: if (!arg) { fputs ("VIDIOC_S_STD", fp); return; } case VIDIOC_QUERYSTD: if (!arg) { fputs ("VIDIOC_QUERYSTD", fp); return; } fprint_symbol_v4l2_std_ (fp, rw, * (__u64 *) arg); break; case VIDIOC_G_PARM: if (!arg) { fputs ("VIDIOC_G_PARM", fp); return; } case VIDIOC_S_PARM: if (!arg) { fputs ("VIDIOC_S_PARM", fp); return; } case VIDIOC_S_PARM_OLD: if (!arg) { fputs ("VIDIOC_S_PARM_OLD", fp); return; } fprint_struct_v4l2_streamparm (fp, rw, arg); break; case VIDIOC_G_FREQUENCY: if (!arg) { fputs ("VIDIOC_G_FREQUENCY", fp); return; } case VIDIOC_S_FREQUENCY: if (!arg) { fputs ("VIDIOC_S_FREQUENCY", fp); return; } fprint_struct_v4l2_frequency (fp, rw, arg); break; case VIDIOC_QUERYMENU: if (!arg) { fputs ("VIDIOC_QUERYMENU", fp); return; } fprint_struct_v4l2_querymenu (fp, rw, arg); break; case VIDIOC_G_JPEGCOMP: if (!arg) { fputs ("VIDIOC_G_JPEGCOMP", fp); return; } case VIDIOC_S_JPEGCOMP: if (!arg) { fputs ("VIDIOC_S_JPEGCOMP", fp); return; } fprint_struct_v4l2_jpegcompression (fp, rw, arg); break; case VIDIOC_G_AUDOUT: if (!arg) { fputs ("VIDIOC_G_AUDOUT", fp); return; } case VIDIOC_S_AUDOUT: if (!arg) { fputs ("VIDIOC_S_AUDOUT", fp); return; } case VIDIOC_ENUMAUDOUT: if (!arg) { fputs ("VIDIOC_ENUMAUDOUT", fp); return; } case VIDIOC_G_AUDOUT_OLD: if (!arg) { fputs ("VIDIOC_G_AUDOUT_OLD", fp); return; } fprint_struct_v4l2_audioout (fp, rw, arg); break; case VIDIOC_REQBUFS: if (!arg) { fputs ("VIDIOC_REQBUFS", fp); return; } fprint_struct_v4l2_requestbuffers (fp, rw, arg); break; case VIDIOC_CROPCAP: if (!arg) { fputs ("VIDIOC_CROPCAP", fp); return; } case VIDIOC_CROPCAP_OLD: if (!arg) { fputs ("VIDIOC_CROPCAP_OLD", fp); return; } fprint_struct_v4l2_cropcap (fp, rw, arg); break; case VIDIOC_G_AUDIO: if (!arg) { fputs ("VIDIOC_G_AUDIO", fp); return; } case VIDIOC_S_AUDIO: if (!arg) { fputs ("VIDIOC_S_AUDIO", fp); return; } case VIDIOC_ENUMAUDIO: if (!arg) { fputs ("VIDIOC_ENUMAUDIO", fp); return; } case VIDIOC_G_AUDIO_OLD: if (!arg) { fputs ("VIDIOC_G_AUDIO_OLD", fp); return; } fprint_struct_v4l2_audio (fp, rw, arg); break; case VIDIOC_ENUMOUTPUT: if (!arg) { fputs ("VIDIOC_ENUMOUTPUT", fp); return; } fprint_struct_v4l2_output (fp, rw, arg); break; case VIDIOC_G_FBUF: if (!arg) { fputs ("VIDIOC_G_FBUF", fp); return; } case VIDIOC_S_FBUF: if (!arg) { fputs ("VIDIOC_S_FBUF", fp); return; } fprint_struct_v4l2_framebuffer (fp, rw, arg); break; case VIDIOC_ENUMSTD: if (!arg) { fputs ("VIDIOC_ENUMSTD", fp); return; } fprint_struct_v4l2_standard (fp, rw, arg); break; default: if (!arg) { fprint_unknown_ioctl (fp, cmd, arg); return; } break; } } static __inline__ void IOCTL_ARG_TYPE_CHECK_VIDIOC_QUERYCAP (struct v4l2_capability *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_VIDIOC_ENUM_FMT (struct v4l2_fmtdesc *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_VIDIOC_G_FMT (struct v4l2_format *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_VIDIOC_S_FMT (struct v4l2_format *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_VIDIOC_REQBUFS (struct v4l2_requestbuffers *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_VIDIOC_QUERYBUF (struct v4l2_buffer *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_VIDIOC_G_FBUF (struct v4l2_framebuffer *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_VIDIOC_S_FBUF (const struct v4l2_framebuffer *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_VIDIOC_OVERLAY (const int *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_VIDIOC_QBUF (struct v4l2_buffer *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_VIDIOC_DQBUF (struct v4l2_buffer *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_VIDIOC_STREAMON (const int *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_VIDIOC_STREAMOFF (const int *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_VIDIOC_G_PARM (struct v4l2_streamparm *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_VIDIOC_S_PARM (struct v4l2_streamparm *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_VIDIOC_G_STD (v4l2_std_id *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_VIDIOC_S_STD (const v4l2_std_id *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_VIDIOC_ENUMSTD (struct v4l2_standard *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_VIDIOC_ENUMINPUT (struct v4l2_input *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_VIDIOC_G_CTRL (struct v4l2_control *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_VIDIOC_S_CTRL (struct v4l2_control *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_VIDIOC_G_TUNER (struct v4l2_tuner *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_VIDIOC_S_TUNER (const struct v4l2_tuner *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_VIDIOC_G_AUDIO (struct v4l2_audio *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_VIDIOC_S_AUDIO (const struct v4l2_audio *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_VIDIOC_QUERYCTRL (struct v4l2_queryctrl *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_VIDIOC_QUERYMENU (struct v4l2_querymenu *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_VIDIOC_G_INPUT (int *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_VIDIOC_S_INPUT (int *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_VIDIOC_G_OUTPUT (int *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_VIDIOC_S_OUTPUT (int *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_VIDIOC_ENUMOUTPUT (struct v4l2_output *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_VIDIOC_G_AUDOUT (struct v4l2_audioout *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_VIDIOC_S_AUDOUT (const struct v4l2_audioout *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_VIDIOC_G_MODULATOR (struct v4l2_modulator *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_VIDIOC_S_MODULATOR (const struct v4l2_modulator *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_VIDIOC_G_FREQUENCY (struct v4l2_frequency *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_VIDIOC_S_FREQUENCY (const struct v4l2_frequency *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_VIDIOC_CROPCAP (struct v4l2_cropcap *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_VIDIOC_G_CROP (struct v4l2_crop *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_VIDIOC_S_CROP (const struct v4l2_crop *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_VIDIOC_G_JPEGCOMP (struct v4l2_jpegcompression *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_VIDIOC_S_JPEGCOMP (const struct v4l2_jpegcompression *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_VIDIOC_QUERYSTD (v4l2_std_id *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_VIDIOC_TRY_FMT (struct v4l2_format *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_VIDIOC_ENUMAUDIO (struct v4l2_audio *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_VIDIOC_ENUMAUDOUT (struct v4l2_audioout *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_VIDIOC_G_PRIORITY (enum v4l2_priority *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_VIDIOC_S_PRIORITY (const enum v4l2_priority *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_VIDIOC_OVERLAY_OLD (int *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_VIDIOC_S_PARM_OLD (const struct v4l2_streamparm *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_VIDIOC_S_CTRL_OLD (const struct v4l2_control *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_VIDIOC_G_AUDIO_OLD (struct v4l2_audio *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_VIDIOC_G_AUDOUT_OLD (struct v4l2_audioout *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_VIDIOC_CROPCAP_OLD (struct v4l2_cropcap *arg __attribute__ ((unused))) {} zapping-0.10cvs6/common/Makefile.am 644 764 144 15722 10327374631 12366 ## Process this file with automake to produce Makefile.in noinst_LIBRARIES = libcommon.a libcommon_a_SOURCES = \ alloc.h alloc.c \ device.c device.h \ fifo.h fifo.c \ intl-priv.h \ ioctl_meteor.h ioctl_bt848.h \ list.h \ math.h \ pwc-ioctl.h \ threads.h \ types.h \ videodev.h videodev2.h videodev25.h structpr = structpr_gen.pl BUILT_SOURCES = \ _bktr.h \ _pwc-ioctl.h \ _videodev.h \ _videodev2.h \ _videodev25.h EXTRA_DIST = \ $(structpr) \ $(BUILT_SOURCES) AM_CFLAGS = \ @DEFAULT_CFLAGS@ \ $(UNICODE_CFLAGS) INCLUDES = \ -I$(srcdir) \ @COMMON_INCLUDES@ if MAINTAINER_MODE _videodev.h: Makefile.am $(structpr) videodev.h $(srcdir)/$(structpr) <$(srcdir)/videodev.h \ printfn=fprint_v4l_ioctl_arg \ video_device.type=VFL_TYPE_ \ video_device.hardware=VID_HARDWARE_ \ video_capability.type=VID_TYPE_ \ video_channel=R \ video_channel.channel=WR \ video_channel.norm=WR \ video_channel.flags=VIDEO_VC_ \ video_channel.type=VIDEO_TYPE_ \ video_tuner=R \ video_tuner.tuner=WR \ video_tuner.flags=VIDEO_TUNER_ \ video_tuner.mode=WR,VIDEO_MODE_ \ video_picture.palette=VIDEO_PALETTE_ \ video_audio.flags=VIDEO_AUDIO_ \ video_audio.mode=VIDEO_SOUND_ \ video_window.flags=VIDEO_WINDOW_ \ video_capture.flags=VIDEO_CAPTURE_ \ vbi_format.flags=VBI_ \ > $@ # XXX v4l2_pix_format.flags has V4L2_FMT_CS_field subset. # XXX v4l2_timecode.flags has V4L2_TC_USERBITS_field subset. # XXX v4l2_buffer.flags has V4L2_BUF_FLAG_, V4L2_BUF_ATTR_, V4L2_BUF_REQ_. _videodev2.h: Makefile.am $(structpr) videodev2.h $(srcdir)/$(structpr) <$(srcdir)/videodev2.h \ printfn=fprint_v4l2_ioctl_arg \ v4l2_capability.type=V4L2_TYPE_ \ v4l2_capability.flags=V4L2_FLAG_ \ v4l2_pix_format.pixelformat=V4L2_PIX_FMT_ \ v4l2_pix_format.flags=V4L2_FMT_FLAG_ \ v4l2_fmtdesc=R \ v4l2_fmtdesc.index=WR \ v4l2_fmtdesc.pixelformat=V4L2_PIX_FMT_ \ v4l2_cvtdesc=R \ v4l2_cvtdesc.index=WR \ v4l2_fxdesc=R \ v4l2_fxdesc.index=WR \ v4l2_timecode.flags=V4L2_TC_FLAG_ \ v4l2_timecode.type=V4L2_TC_TYPE_ \ v4l2_compression=WR \ v4l2_requestbuffers=WR \ v4l2_requestbuffers.type=V4L2_BUF_TYPE_ \ v4l2_buffer=R \ v4l2_buffer.index=WR \ v4l2_buffer.type=WR,V4L2_BUF_TYPE_ \ v4l2_buffer.flags=V4L2_BUF_FLAG_ \ v4l2_framebuffer.capability=V4L2_FBUF_CAP_ \ v4l2_framebuffer.flags=V4L2_FBUF_FLAG_ \ v4l2_captureparm.capability=V4L2_CAP_ \ v4l2_captureparm.capturemode=V4L2_MODE_ \ v4l2_zoomcap.capability=V4L2_ZOOM_ \ v4l2_standard.colorstandard=V4L2_COLOR_STD_, \ V4L2_COLOR_STD_PAL:colorstandard_data.pal, \ V4L2_COLOR_STD_NTSC:colorstandard_data.ntsc, \ V4L2_COLOR_STD_SECAM:colorstandard_data.secam \ v4l2_standard.transmission=V4L2_TRANSM_STD_ \ v4l2_enumstd=R \ v4l2_enumstd.index=WR \ v4l2_input=R \ v4l2_input.index=WR \ v4l2_input.type=V4L2_INPUT_TYPE_ \ v4l2_input.capability=V4L2_INPUT_CAP_ \ v4l2_output=R \ v4l2_output.index=WR \ v4l2_output.type=V4L2_OUTPUT_TYPE_ \ v4l2_output.capability=V4L2_OUTPUT_CAP_ \ v4l2_control.id=V4L2_CID_ \ v4l2_queryctrl=R \ v4l2_queryctrl.id=WR,V4L2_CID_ \ v4l2_queryctrl.type=V4L2_CTRL_TYPE_ \ v4l2_queryctrl.flags=V4L2_CTRL_FLAG_ \ v4l2_queryctrl.group=string \ v4l2_queryctrl.category=V4L2_CTRL_CAT_ \ v4l2_querymenu=R \ v4l2_querymenu.id=WR,V4L2_CID_ \ v4l2_querymenu.index=WR \ v4l2_fxcontrol.id=V4L2_CID_ \ v4l2_tuner=R \ v4l2_tuner.input=WR \ v4l2_tuner.capability=V4L2_TUNER_CAP_ \ v4l2_tuner.rxsubchans=V4L2_TUNER_SUB_ \ v4l2_tuner.audmode=V4L2_TUNER_MODE_ \ v4l2_modulator=R \ v4l2_modulator.output=WR \ v4l2_modulator.capability=V4L2_TUNER_CAP_ \ v4l2_modulator.txsubchans=V4L2_TUNER_SUB_ \ v4l2_audio=R \ v4l2_audio.audio=WR \ v4l2_audio.capability=V4L2_AUDCAP_ \ v4l2_audio.mode=V4L2_AUDMODE_ \ v4l2_audioout=R \ v4l2_audioout.audio=WR \ v4l2_vbi_format.sample_format=V4L2_VBI_SF_ \ v4l2_vbi_format.flags=V4L2_VBI_ \ v4l2_format=R \ v4l2_format.type=WR,V4L2_BUF_TYPE_, \ V4L2_BUF_TYPE_CAPTURE:fmt.pix, \ V4L2_BUF_TYPE_VBI:fmt.vbi \ v4l2_streamparm=R \ v4l2_streamparm.type=WR,V4L2_BUF_TYPE_, \ V4L2_BUF_TYPE_CAPTURE:parm.capture, \ V4L2_BUF_TYPE_VIDEOOUT:parm.output \ > $@ # XXX v4l2_timecode.flags has V4L2_TC_USERBITS_field subset. _videodev25.h: Makefile.am $(structpr) videodev25.h $(srcdir)/$(structpr) <$(srcdir)/videodev25.h \ "v4l2_fract={ fprintf (fp, \"%u/%u\", \ t->numerator, t->denominator); }" \ printfn=fprint_v4l25_ioctl_arg \ v4l2_capability.driver=string \ v4l2_capability.card=string \ v4l2_capability.bus_info=string \ v4l2_capability.version=hex \ v4l2_capability.capabilities=V4L2_CAP_ \ v4l2_pix_format.pixelformat=V4L2_PIX_FMT_ \ v4l2_fmtdesc=R \ v4l2_fmtdesc.index=WR \ v4l2_fmtdesc.flags=V4L2_FMT_FLAG_ \ v4l2_fmtdesc.description=string \ v4l2_fmtdesc.pixelformat=fourcc \ v4l2_timecode.type=V4L2_TC_TYPE_ \ v4l2_timecode.flags=V4L2_TC_FLAG_ \ v4l2_jpegcompression.jpeg_markers=V4L2_JPEG_MARKER_ \ v4l2_buffer=R \ v4l2_buffer.index=WR \ v4l2_buffer.type=WR \ v4l2_buffer.flags=WR,V4L2_BUF_FLAG_ \ v4l2_buffer.memory=V4L2_MEMORY_MMAP:m.offset, \ V4L2_MEMORY_USERPTR:m.userptr \ v4l2_framebuffer.capability=V4L2_FBUF_CAP_ \ v4l2_framebuffer.flags=V4L2_FBUF_FLAG_ \ v4l2_captureparm.capability=V4L2_CAP_ \ v4l2_captureparm.capturemode=V4L2_MODE_ \ v4l2_std_id=V4L2_STD_ \ v4l2_standard=R \ v4l2_standard.index=WR \ v4l2_input=R \ v4l2_input.index=WR \ v4l2_input.type=V4L2_INPUT_TYPE_ \ v4l2_input.status=V4L2_IN_ST_ \ v4l2_output=R \ v4l2_output.index=WR \ v4l2_output.type=V4L2_OUTPUT_TYPE_ \ v4l2_control.id=V4L2_CID_ \ v4l2_queryctrl=R \ v4l2_queryctrl.id=WR,V4L2_CID_ \ v4l2_queryctrl.flags=V4L2_CTRL_FLAG_ \ v4l2_querymenu=R \ v4l2_querymenu.id=WR,V4L2_CID_ \ v4l2_querymenu.index=WR,V4L2_CID_ \ v4l2_tuner.capability=V4L2_TUNER_CAP_ \ v4l2_tuner.rxsubchans=V4L2_TUNER_SUB_ \ v4l2_tuner.audmode=V4L2_TUNER_MODE_ \ v4l2_modulator.capability=V4L2_TUNER_CAP_ \ v4l2_modulator.txsubchans=V4L2_TUNER_SUB_ \ v4l2_audio=R \ v4l2_audio.index=WR \ v4l2_audio.capability=V4L2_AUDCAP_ \ v4l2_audio.mode=V4L2_AUDMODE_ \ v4l2_audioout=R \ v4l2_audioout.index=WR \ v4l2_vbi_format.sample_format=V4L2_PIX_FMT_ \ v4l2_vbi_format.flags=V4L2_VBI_ \ v4l2_format.type=V4L2_BUF_TYPE_VIDEO_CAPTURE:fmt.pix, \ V4L2_BUF_TYPE_VIDEO_OVERLAY:fmt.win, \ V4L2_BUF_TYPE_VBI_CAPTURE:fmt.vbi \ > $@ _bktr.h: Makefile.am $(structpr) ioctl_bt848.h ioctl_meteor.h cat $(srcdir)/ioctl_bt848.h $(srcdir)/ioctl_meteor.h | \ $(srcdir)/$(structpr) \ METEORCAPTUR=METEOR_CAP_ \ METEORSTATUS=METEOR_STATUS_ \ METEORSFMT=METEOR_FMT_ \ METEORGFMT=METEOR_FMT_ \ METEORSINPUT=METEOR_INPUT_ \ METEORGINPUT=METEOR_INPUT_ \ METEORSSIGNAL=METEOR_SIG_ \ METEORGSIGNAL=METEOR_SIG_ \ TVTUNER_SETCHNL=CHNLSET_ \ TVTUNER_GETCHNL=CHNLSET_ \ BT848_SAUDIO=AUDIO_ \ BT848_GAUDIO=AUDIO_ \ RADIO_SETMODE=RADIO_ \ RADIO_GETMODE=RADIO_ \ BT848SFMT=BT848_IFORM_F_ \ meteor_geomet.oformat=METEOR_GEO_ \ > $@ _pwc-ioctl.h: Makefile.am $(structpr) pwc-ioctl.h $(srcdir)/$(structpr) <$(srcdir)/pwc-ioctl.h \ printfn=fprint_pwc_ioctl_arg \ pwc_whitebalance.mode=PWC_WB_ \ > $@ endif zapping-0.10cvs6/common/Makefile.in 644 764 144 70525 10442575403 12377 # Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = .. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = common DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = LIBRARIES = $(noinst_LIBRARIES) ARFLAGS = cru libcommon_a_AR = $(AR) $(ARFLAGS) libcommon_a_LIBADD = am_libcommon_a_OBJECTS = alloc.$(OBJEXT) device.$(OBJEXT) \ fifo.$(OBJEXT) libcommon_a_OBJECTS = $(am_libcommon_a_OBJECTS) DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ SOURCES = $(libcommon_a_SOURCES) DIST_SOURCES = $(libcommon_a_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ ARTS_CFLAGS = @ARTS_CFLAGS@ ARTS_LIBS = @ARTS_LIBS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BUILD_DEINTERLACE_PLUGIN_FALSE = @BUILD_DEINTERLACE_PLUGIN_FALSE@ BUILD_DEINTERLACE_PLUGIN_TRUE = @BUILD_DEINTERLACE_PLUGIN_TRUE@ BUILD_MAN_FALSE = @BUILD_MAN_FALSE@ BUILD_MAN_TRUE = @BUILD_MAN_TRUE@ CAN_COMPILE_3DNOW_FALSE = @CAN_COMPILE_3DNOW_FALSE@ CAN_COMPILE_3DNOW_TRUE = @CAN_COMPILE_3DNOW_TRUE@ CAN_COMPILE_ALTIVEC_FALSE = @CAN_COMPILE_ALTIVEC_FALSE@ CAN_COMPILE_ALTIVEC_TRUE = @CAN_COMPILE_ALTIVEC_TRUE@ CAN_COMPILE_MMX_FALSE = @CAN_COMPILE_MMX_FALSE@ CAN_COMPILE_MMX_TRUE = @CAN_COMPILE_MMX_TRUE@ CAN_COMPILE_SSE2_FALSE = @CAN_COMPILE_SSE2_FALSE@ CAN_COMPILE_SSE2_TRUE = @CAN_COMPILE_SSE2_TRUE@ CAN_COMPILE_SSE3_FALSE = @CAN_COMPILE_SSE3_FALSE@ CAN_COMPILE_SSE3_TRUE = @CAN_COMPILE_SSE3_TRUE@ CAN_COMPILE_SSE_FALSE = @CAN_COMPILE_SSE_FALSE@ CAN_COMPILE_SSE_TRUE = @CAN_COMPILE_SSE_TRUE@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCAS = @CCAS@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ COMMON_INCLUDES = @COMMON_INCLUDES@ CONSOLEHELPER_LOCATION = @CONSOLEHELPER_LOCATION@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFAULT_CFLAGS = @DEFAULT_CFLAGS@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ESD_LIBS = @ESD_LIBS@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ GCONF_SCHEMAS_INSTALL_FALSE = @GCONF_SCHEMAS_INSTALL_FALSE@ GCONF_SCHEMAS_INSTALL_TRUE = @GCONF_SCHEMAS_INSTALL_TRUE@ GCONF_SCHEMA_CONFIG_SOURCE = @GCONF_SCHEMA_CONFIG_SOURCE@ GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@ GDK_PIXBUF_CSOURCE = @GDK_PIXBUF_CSOURCE@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ HAVE_GCC_LIMITS_FALSE = @HAVE_GCC_LIMITS_FALSE@ HAVE_GCC_LIMITS_TRUE = @HAVE_GCC_LIMITS_TRUE@ HAVE_LIBZVBI_FALSE = @HAVE_LIBZVBI_FALSE@ HAVE_LIBZVBI_TRUE = @HAVE_LIBZVBI_TRUE@ HAVE_X86_FALSE = @HAVE_X86_FALSE@ HAVE_X86_TRUE = @HAVE_X86_TRUE@ HAVE_XMU_FALSE = @HAVE_XMU_FALSE@ HAVE_XMU_TRUE = @HAVE_XMU_TRUE@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ INTLTOOL_CAVES_RULE = @INTLTOOL_CAVES_RULE@ INTLTOOL_DESKTOP_RULE = @INTLTOOL_DESKTOP_RULE@ INTLTOOL_DIRECTORY_RULE = @INTLTOOL_DIRECTORY_RULE@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ INTLTOOL_ICONV = @INTLTOOL_ICONV@ INTLTOOL_KBD_RULE = @INTLTOOL_KBD_RULE@ INTLTOOL_KEYS_RULE = @INTLTOOL_KEYS_RULE@ INTLTOOL_MERGE = @INTLTOOL_MERGE@ INTLTOOL_MSGFMT = @INTLTOOL_MSGFMT@ INTLTOOL_MSGMERGE = @INTLTOOL_MSGMERGE@ INTLTOOL_OAF_RULE = @INTLTOOL_OAF_RULE@ INTLTOOL_PERL = @INTLTOOL_PERL@ INTLTOOL_PONG_RULE = @INTLTOOL_PONG_RULE@ INTLTOOL_PROP_RULE = @INTLTOOL_PROP_RULE@ INTLTOOL_SCHEMAS_RULE = @INTLTOOL_SCHEMAS_RULE@ INTLTOOL_SERVER_RULE = @INTLTOOL_SERVER_RULE@ INTLTOOL_SHEET_RULE = @INTLTOOL_SHEET_RULE@ INTLTOOL_SOUNDLIST_RULE = @INTLTOOL_SOUNDLIST_RULE@ INTLTOOL_THEME_RULE = @INTLTOOL_THEME_RULE@ INTLTOOL_UI_RULE = @INTLTOOL_UI_RULE@ INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ INTLTOOL_XAM_RULE = @INTLTOOL_XAM_RULE@ INTLTOOL_XGETTEXT = @INTLTOOL_XGETTEXT@ INTLTOOL_XML_NOMERGE_RULE = @INTLTOOL_XML_NOMERGE_RULE@ INTLTOOL_XML_RULE = @INTLTOOL_XML_RULE@ JPEG_LIB = @JPEG_LIB@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBXML_CFLAGS = @LIBXML_CFLAGS@ LIBXML_LIBS = @LIBXML_LIBS@ LIRC_LIB = @LIRC_LIB@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAKEINFO = @MAKEINFO@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ NEED_ZSFB_FALSE = @NEED_ZSFB_FALSE@ NEED_ZSFB_TRUE = @NEED_ZSFB_TRUE@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_CFLAGS = @PACKAGE_CFLAGS@ PACKAGE_LIBS = @PACKAGE_LIBS@ PACKAGE_LIB_DIR = @PACKAGE_LIB_DIR@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_PIXMAPS_DIR = @PACKAGE_PIXMAPS_DIR@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PACKAGE_VERSION_ID = @PACKAGE_VERSION_ID@ PATH_SEPARATOR = @PATH_SEPARATOR@ PG_CFLAGS = @PG_CFLAGS@ PKG_CONFIG = @PKG_CONFIG@ PLUGIN_DEFAULT_DIR = @PLUGIN_DEFAULT_DIR@ PLUGIN_DEFAULT_FLAGS = @PLUGIN_DEFAULT_FLAGS@ PNG_LIBS = @PNG_LIBS@ POFILES = @POFILES@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ PYTHON_LIBS = @PYTHON_LIBS@ PY_CFLAGS = @PY_CFLAGS@ PY_EXTRA_LIBS = @PY_EXTRA_LIBS@ PY_LIBS = @PY_LIBS@ PY_LIB_LOC = @PY_LIB_LOC@ RANLIB = @RANLIB@ RTE_LIBS = @RTE_LIBS@ SCROLLKEEPER_BUILD_REQUIRED = @SCROLLKEEPER_BUILD_REQUIRED@ SCROLLKEEPER_CONFIG = @SCROLLKEEPER_CONFIG@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ SUID_ZSFB_FALSE = @SUID_ZSFB_FALSE@ SUID_ZSFB_TRUE = @SUID_ZSFB_TRUE@ UNICODE_CFLAGS = @UNICODE_CFLAGS@ UNICODE_LIBS = @UNICODE_LIBS@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ WARN_CFLAGS = @WARN_CFLAGS@ XGETTEXT = @XGETTEXT@ XMLCATALOG = @XMLCATALOG@ XML_CATALOG_FILE = @XML_CATALOG_FILE@ XSLTPROC = @XSLTPROC@ X_CFLAGS = @X_CFLAGS@ X_DPMS_LIBS = @X_DPMS_LIBS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ X_XF86DGA_LIBS = @X_XF86DGA_LIBS@ X_XF86VMODE_LIBS = @X_XF86VMODE_LIBS@ X_XINERAMA_LIBS = @X_XINERAMA_LIBS@ X_XMU_LIBS = @X_XMU_LIBS@ X_XV_LIBS = @X_XV_LIBS@ ZSFB_GROUP = @ZSFB_GROUP@ ZSFB_OWNER = @ZSFB_OWNER@ ZVBI_CFLAGS = @ZVBI_CFLAGS@ ZVBI_LIBS = @ZVBI_LIBS@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_STRIP = @ac_ct_STRIP@ ac_pt_PKG_CONFIG = @ac_pt_PKG_CONFIG@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ datadir = @datadir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ python_val = @python_val@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ noinst_LIBRARIES = libcommon.a libcommon_a_SOURCES = \ alloc.h alloc.c \ device.c device.h \ fifo.h fifo.c \ intl-priv.h \ ioctl_meteor.h ioctl_bt848.h \ list.h \ math.h \ pwc-ioctl.h \ threads.h \ types.h \ videodev.h videodev2.h videodev25.h structpr = structpr_gen.pl BUILT_SOURCES = \ _bktr.h \ _pwc-ioctl.h \ _videodev.h \ _videodev2.h \ _videodev25.h EXTRA_DIST = \ $(structpr) \ $(BUILT_SOURCES) AM_CFLAGS = \ @DEFAULT_CFLAGS@ \ $(UNICODE_CFLAGS) INCLUDES = \ -I$(srcdir) \ @COMMON_INCLUDES@ all: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu common/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu common/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh clean-noinstLIBRARIES: -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) libcommon.a: $(libcommon_a_OBJECTS) $(libcommon_a_DEPENDENCIES) -rm -f libcommon.a $(libcommon_a_AR) libcommon.a $(libcommon_a_OBJECTS) $(libcommon_a_LIBADD) $(RANLIB) libcommon.a mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/alloc.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/device.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fifo.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool uninstall-info-am: ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) check-am all-am: Makefile $(LIBRARIES) installdirs: install: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-libtool distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-exec-am: install-info: install-info-am install-man: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-info-am .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLIBRARIES ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-exec \ install-exec-am install-info install-info-am install-man \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags uninstall uninstall-am \ uninstall-info-am @MAINTAINER_MODE_TRUE@_videodev.h: Makefile.am $(structpr) videodev.h @MAINTAINER_MODE_TRUE@ $(srcdir)/$(structpr) <$(srcdir)/videodev.h \ @MAINTAINER_MODE_TRUE@ printfn=fprint_v4l_ioctl_arg \ @MAINTAINER_MODE_TRUE@ video_device.type=VFL_TYPE_ \ @MAINTAINER_MODE_TRUE@ video_device.hardware=VID_HARDWARE_ \ @MAINTAINER_MODE_TRUE@ video_capability.type=VID_TYPE_ \ @MAINTAINER_MODE_TRUE@ video_channel=R \ @MAINTAINER_MODE_TRUE@ video_channel.channel=WR \ @MAINTAINER_MODE_TRUE@ video_channel.norm=WR \ @MAINTAINER_MODE_TRUE@ video_channel.flags=VIDEO_VC_ \ @MAINTAINER_MODE_TRUE@ video_channel.type=VIDEO_TYPE_ \ @MAINTAINER_MODE_TRUE@ video_tuner=R \ @MAINTAINER_MODE_TRUE@ video_tuner.tuner=WR \ @MAINTAINER_MODE_TRUE@ video_tuner.flags=VIDEO_TUNER_ \ @MAINTAINER_MODE_TRUE@ video_tuner.mode=WR,VIDEO_MODE_ \ @MAINTAINER_MODE_TRUE@ video_picture.palette=VIDEO_PALETTE_ \ @MAINTAINER_MODE_TRUE@ video_audio.flags=VIDEO_AUDIO_ \ @MAINTAINER_MODE_TRUE@ video_audio.mode=VIDEO_SOUND_ \ @MAINTAINER_MODE_TRUE@ video_window.flags=VIDEO_WINDOW_ \ @MAINTAINER_MODE_TRUE@ video_capture.flags=VIDEO_CAPTURE_ \ @MAINTAINER_MODE_TRUE@ vbi_format.flags=VBI_ \ @MAINTAINER_MODE_TRUE@ > $@ # XXX v4l2_pix_format.flags has V4L2_FMT_CS_field subset. # XXX v4l2_timecode.flags has V4L2_TC_USERBITS_field subset. # XXX v4l2_buffer.flags has V4L2_BUF_FLAG_, V4L2_BUF_ATTR_, V4L2_BUF_REQ_. @MAINTAINER_MODE_TRUE@_videodev2.h: Makefile.am $(structpr) videodev2.h @MAINTAINER_MODE_TRUE@ $(srcdir)/$(structpr) <$(srcdir)/videodev2.h \ @MAINTAINER_MODE_TRUE@ printfn=fprint_v4l2_ioctl_arg \ @MAINTAINER_MODE_TRUE@ v4l2_capability.type=V4L2_TYPE_ \ @MAINTAINER_MODE_TRUE@ v4l2_capability.flags=V4L2_FLAG_ \ @MAINTAINER_MODE_TRUE@ v4l2_pix_format.pixelformat=V4L2_PIX_FMT_ \ @MAINTAINER_MODE_TRUE@ v4l2_pix_format.flags=V4L2_FMT_FLAG_ \ @MAINTAINER_MODE_TRUE@ v4l2_fmtdesc=R \ @MAINTAINER_MODE_TRUE@ v4l2_fmtdesc.index=WR \ @MAINTAINER_MODE_TRUE@ v4l2_fmtdesc.pixelformat=V4L2_PIX_FMT_ \ @MAINTAINER_MODE_TRUE@ v4l2_cvtdesc=R \ @MAINTAINER_MODE_TRUE@ v4l2_cvtdesc.index=WR \ @MAINTAINER_MODE_TRUE@ v4l2_fxdesc=R \ @MAINTAINER_MODE_TRUE@ v4l2_fxdesc.index=WR \ @MAINTAINER_MODE_TRUE@ v4l2_timecode.flags=V4L2_TC_FLAG_ \ @MAINTAINER_MODE_TRUE@ v4l2_timecode.type=V4L2_TC_TYPE_ \ @MAINTAINER_MODE_TRUE@ v4l2_compression=WR \ @MAINTAINER_MODE_TRUE@ v4l2_requestbuffers=WR \ @MAINTAINER_MODE_TRUE@ v4l2_requestbuffers.type=V4L2_BUF_TYPE_ \ @MAINTAINER_MODE_TRUE@ v4l2_buffer=R \ @MAINTAINER_MODE_TRUE@ v4l2_buffer.index=WR \ @MAINTAINER_MODE_TRUE@ v4l2_buffer.type=WR,V4L2_BUF_TYPE_ \ @MAINTAINER_MODE_TRUE@ v4l2_buffer.flags=V4L2_BUF_FLAG_ \ @MAINTAINER_MODE_TRUE@ v4l2_framebuffer.capability=V4L2_FBUF_CAP_ \ @MAINTAINER_MODE_TRUE@ v4l2_framebuffer.flags=V4L2_FBUF_FLAG_ \ @MAINTAINER_MODE_TRUE@ v4l2_captureparm.capability=V4L2_CAP_ \ @MAINTAINER_MODE_TRUE@ v4l2_captureparm.capturemode=V4L2_MODE_ \ @MAINTAINER_MODE_TRUE@ v4l2_zoomcap.capability=V4L2_ZOOM_ \ @MAINTAINER_MODE_TRUE@ v4l2_standard.colorstandard=V4L2_COLOR_STD_, \ @MAINTAINER_MODE_TRUE@ V4L2_COLOR_STD_PAL:colorstandard_data.pal, \ @MAINTAINER_MODE_TRUE@ V4L2_COLOR_STD_NTSC:colorstandard_data.ntsc, \ @MAINTAINER_MODE_TRUE@ V4L2_COLOR_STD_SECAM:colorstandard_data.secam \ @MAINTAINER_MODE_TRUE@ v4l2_standard.transmission=V4L2_TRANSM_STD_ \ @MAINTAINER_MODE_TRUE@ v4l2_enumstd=R \ @MAINTAINER_MODE_TRUE@ v4l2_enumstd.index=WR \ @MAINTAINER_MODE_TRUE@ v4l2_input=R \ @MAINTAINER_MODE_TRUE@ v4l2_input.index=WR \ @MAINTAINER_MODE_TRUE@ v4l2_input.type=V4L2_INPUT_TYPE_ \ @MAINTAINER_MODE_TRUE@ v4l2_input.capability=V4L2_INPUT_CAP_ \ @MAINTAINER_MODE_TRUE@ v4l2_output=R \ @MAINTAINER_MODE_TRUE@ v4l2_output.index=WR \ @MAINTAINER_MODE_TRUE@ v4l2_output.type=V4L2_OUTPUT_TYPE_ \ @MAINTAINER_MODE_TRUE@ v4l2_output.capability=V4L2_OUTPUT_CAP_ \ @MAINTAINER_MODE_TRUE@ v4l2_control.id=V4L2_CID_ \ @MAINTAINER_MODE_TRUE@ v4l2_queryctrl=R \ @MAINTAINER_MODE_TRUE@ v4l2_queryctrl.id=WR,V4L2_CID_ \ @MAINTAINER_MODE_TRUE@ v4l2_queryctrl.type=V4L2_CTRL_TYPE_ \ @MAINTAINER_MODE_TRUE@ v4l2_queryctrl.flags=V4L2_CTRL_FLAG_ \ @MAINTAINER_MODE_TRUE@ v4l2_queryctrl.group=string \ @MAINTAINER_MODE_TRUE@ v4l2_queryctrl.category=V4L2_CTRL_CAT_ \ @MAINTAINER_MODE_TRUE@ v4l2_querymenu=R \ @MAINTAINER_MODE_TRUE@ v4l2_querymenu.id=WR,V4L2_CID_ \ @MAINTAINER_MODE_TRUE@ v4l2_querymenu.index=WR \ @MAINTAINER_MODE_TRUE@ v4l2_fxcontrol.id=V4L2_CID_ \ @MAINTAINER_MODE_TRUE@ v4l2_tuner=R \ @MAINTAINER_MODE_TRUE@ v4l2_tuner.input=WR \ @MAINTAINER_MODE_TRUE@ v4l2_tuner.capability=V4L2_TUNER_CAP_ \ @MAINTAINER_MODE_TRUE@ v4l2_tuner.rxsubchans=V4L2_TUNER_SUB_ \ @MAINTAINER_MODE_TRUE@ v4l2_tuner.audmode=V4L2_TUNER_MODE_ \ @MAINTAINER_MODE_TRUE@ v4l2_modulator=R \ @MAINTAINER_MODE_TRUE@ v4l2_modulator.output=WR \ @MAINTAINER_MODE_TRUE@ v4l2_modulator.capability=V4L2_TUNER_CAP_ \ @MAINTAINER_MODE_TRUE@ v4l2_modulator.txsubchans=V4L2_TUNER_SUB_ \ @MAINTAINER_MODE_TRUE@ v4l2_audio=R \ @MAINTAINER_MODE_TRUE@ v4l2_audio.audio=WR \ @MAINTAINER_MODE_TRUE@ v4l2_audio.capability=V4L2_AUDCAP_ \ @MAINTAINER_MODE_TRUE@ v4l2_audio.mode=V4L2_AUDMODE_ \ @MAINTAINER_MODE_TRUE@ v4l2_audioout=R \ @MAINTAINER_MODE_TRUE@ v4l2_audioout.audio=WR \ @MAINTAINER_MODE_TRUE@ v4l2_vbi_format.sample_format=V4L2_VBI_SF_ \ @MAINTAINER_MODE_TRUE@ v4l2_vbi_format.flags=V4L2_VBI_ \ @MAINTAINER_MODE_TRUE@ v4l2_format=R \ @MAINTAINER_MODE_TRUE@ v4l2_format.type=WR,V4L2_BUF_TYPE_, \ @MAINTAINER_MODE_TRUE@ V4L2_BUF_TYPE_CAPTURE:fmt.pix, \ @MAINTAINER_MODE_TRUE@ V4L2_BUF_TYPE_VBI:fmt.vbi \ @MAINTAINER_MODE_TRUE@ v4l2_streamparm=R \ @MAINTAINER_MODE_TRUE@ v4l2_streamparm.type=WR,V4L2_BUF_TYPE_, \ @MAINTAINER_MODE_TRUE@ V4L2_BUF_TYPE_CAPTURE:parm.capture, \ @MAINTAINER_MODE_TRUE@ V4L2_BUF_TYPE_VIDEOOUT:parm.output \ @MAINTAINER_MODE_TRUE@ > $@ # XXX v4l2_timecode.flags has V4L2_TC_USERBITS_field subset. @MAINTAINER_MODE_TRUE@_videodev25.h: Makefile.am $(structpr) videodev25.h @MAINTAINER_MODE_TRUE@ $(srcdir)/$(structpr) <$(srcdir)/videodev25.h \ @MAINTAINER_MODE_TRUE@ "v4l2_fract={ fprintf (fp, \"%u/%u\", \ @MAINTAINER_MODE_TRUE@ t->numerator, t->denominator); }" \ @MAINTAINER_MODE_TRUE@ printfn=fprint_v4l25_ioctl_arg \ @MAINTAINER_MODE_TRUE@ v4l2_capability.driver=string \ @MAINTAINER_MODE_TRUE@ v4l2_capability.card=string \ @MAINTAINER_MODE_TRUE@ v4l2_capability.bus_info=string \ @MAINTAINER_MODE_TRUE@ v4l2_capability.version=hex \ @MAINTAINER_MODE_TRUE@ v4l2_capability.capabilities=V4L2_CAP_ \ @MAINTAINER_MODE_TRUE@ v4l2_pix_format.pixelformat=V4L2_PIX_FMT_ \ @MAINTAINER_MODE_TRUE@ v4l2_fmtdesc=R \ @MAINTAINER_MODE_TRUE@ v4l2_fmtdesc.index=WR \ @MAINTAINER_MODE_TRUE@ v4l2_fmtdesc.flags=V4L2_FMT_FLAG_ \ @MAINTAINER_MODE_TRUE@ v4l2_fmtdesc.description=string \ @MAINTAINER_MODE_TRUE@ v4l2_fmtdesc.pixelformat=fourcc \ @MAINTAINER_MODE_TRUE@ v4l2_timecode.type=V4L2_TC_TYPE_ \ @MAINTAINER_MODE_TRUE@ v4l2_timecode.flags=V4L2_TC_FLAG_ \ @MAINTAINER_MODE_TRUE@ v4l2_jpegcompression.jpeg_markers=V4L2_JPEG_MARKER_ \ @MAINTAINER_MODE_TRUE@ v4l2_buffer=R \ @MAINTAINER_MODE_TRUE@ v4l2_buffer.index=WR \ @MAINTAINER_MODE_TRUE@ v4l2_buffer.type=WR \ @MAINTAINER_MODE_TRUE@ v4l2_buffer.flags=WR,V4L2_BUF_FLAG_ \ @MAINTAINER_MODE_TRUE@ v4l2_buffer.memory=V4L2_MEMORY_MMAP:m.offset, \ @MAINTAINER_MODE_TRUE@ V4L2_MEMORY_USERPTR:m.userptr \ @MAINTAINER_MODE_TRUE@ v4l2_framebuffer.capability=V4L2_FBUF_CAP_ \ @MAINTAINER_MODE_TRUE@ v4l2_framebuffer.flags=V4L2_FBUF_FLAG_ \ @MAINTAINER_MODE_TRUE@ v4l2_captureparm.capability=V4L2_CAP_ \ @MAINTAINER_MODE_TRUE@ v4l2_captureparm.capturemode=V4L2_MODE_ \ @MAINTAINER_MODE_TRUE@ v4l2_std_id=V4L2_STD_ \ @MAINTAINER_MODE_TRUE@ v4l2_standard=R \ @MAINTAINER_MODE_TRUE@ v4l2_standard.index=WR \ @MAINTAINER_MODE_TRUE@ v4l2_input=R \ @MAINTAINER_MODE_TRUE@ v4l2_input.index=WR \ @MAINTAINER_MODE_TRUE@ v4l2_input.type=V4L2_INPUT_TYPE_ \ @MAINTAINER_MODE_TRUE@ v4l2_input.status=V4L2_IN_ST_ \ @MAINTAINER_MODE_TRUE@ v4l2_output=R \ @MAINTAINER_MODE_TRUE@ v4l2_output.index=WR \ @MAINTAINER_MODE_TRUE@ v4l2_output.type=V4L2_OUTPUT_TYPE_ \ @MAINTAINER_MODE_TRUE@ v4l2_control.id=V4L2_CID_ \ @MAINTAINER_MODE_TRUE@ v4l2_queryctrl=R \ @MAINTAINER_MODE_TRUE@ v4l2_queryctrl.id=WR,V4L2_CID_ \ @MAINTAINER_MODE_TRUE@ v4l2_queryctrl.flags=V4L2_CTRL_FLAG_ \ @MAINTAINER_MODE_TRUE@ v4l2_querymenu=R \ @MAINTAINER_MODE_TRUE@ v4l2_querymenu.id=WR,V4L2_CID_ \ @MAINTAINER_MODE_TRUE@ v4l2_querymenu.index=WR,V4L2_CID_ \ @MAINTAINER_MODE_TRUE@ v4l2_tuner.capability=V4L2_TUNER_CAP_ \ @MAINTAINER_MODE_TRUE@ v4l2_tuner.rxsubchans=V4L2_TUNER_SUB_ \ @MAINTAINER_MODE_TRUE@ v4l2_tuner.audmode=V4L2_TUNER_MODE_ \ @MAINTAINER_MODE_TRUE@ v4l2_modulator.capability=V4L2_TUNER_CAP_ \ @MAINTAINER_MODE_TRUE@ v4l2_modulator.txsubchans=V4L2_TUNER_SUB_ \ @MAINTAINER_MODE_TRUE@ v4l2_audio=R \ @MAINTAINER_MODE_TRUE@ v4l2_audio.index=WR \ @MAINTAINER_MODE_TRUE@ v4l2_audio.capability=V4L2_AUDCAP_ \ @MAINTAINER_MODE_TRUE@ v4l2_audio.mode=V4L2_AUDMODE_ \ @MAINTAINER_MODE_TRUE@ v4l2_audioout=R \ @MAINTAINER_MODE_TRUE@ v4l2_audioout.index=WR \ @MAINTAINER_MODE_TRUE@ v4l2_vbi_format.sample_format=V4L2_PIX_FMT_ \ @MAINTAINER_MODE_TRUE@ v4l2_vbi_format.flags=V4L2_VBI_ \ @MAINTAINER_MODE_TRUE@ v4l2_format.type=V4L2_BUF_TYPE_VIDEO_CAPTURE:fmt.pix, \ @MAINTAINER_MODE_TRUE@ V4L2_BUF_TYPE_VIDEO_OVERLAY:fmt.win, \ @MAINTAINER_MODE_TRUE@ V4L2_BUF_TYPE_VBI_CAPTURE:fmt.vbi \ @MAINTAINER_MODE_TRUE@ > $@ @MAINTAINER_MODE_TRUE@_bktr.h: Makefile.am $(structpr) ioctl_bt848.h ioctl_meteor.h @MAINTAINER_MODE_TRUE@ cat $(srcdir)/ioctl_bt848.h $(srcdir)/ioctl_meteor.h | \ @MAINTAINER_MODE_TRUE@ $(srcdir)/$(structpr) \ @MAINTAINER_MODE_TRUE@ METEORCAPTUR=METEOR_CAP_ \ @MAINTAINER_MODE_TRUE@ METEORSTATUS=METEOR_STATUS_ \ @MAINTAINER_MODE_TRUE@ METEORSFMT=METEOR_FMT_ \ @MAINTAINER_MODE_TRUE@ METEORGFMT=METEOR_FMT_ \ @MAINTAINER_MODE_TRUE@ METEORSINPUT=METEOR_INPUT_ \ @MAINTAINER_MODE_TRUE@ METEORGINPUT=METEOR_INPUT_ \ @MAINTAINER_MODE_TRUE@ METEORSSIGNAL=METEOR_SIG_ \ @MAINTAINER_MODE_TRUE@ METEORGSIGNAL=METEOR_SIG_ \ @MAINTAINER_MODE_TRUE@ TVTUNER_SETCHNL=CHNLSET_ \ @MAINTAINER_MODE_TRUE@ TVTUNER_GETCHNL=CHNLSET_ \ @MAINTAINER_MODE_TRUE@ BT848_SAUDIO=AUDIO_ \ @MAINTAINER_MODE_TRUE@ BT848_GAUDIO=AUDIO_ \ @MAINTAINER_MODE_TRUE@ RADIO_SETMODE=RADIO_ \ @MAINTAINER_MODE_TRUE@ RADIO_GETMODE=RADIO_ \ @MAINTAINER_MODE_TRUE@ BT848SFMT=BT848_IFORM_F_ \ @MAINTAINER_MODE_TRUE@ meteor_geomet.oformat=METEOR_GEO_ \ @MAINTAINER_MODE_TRUE@ > $@ @MAINTAINER_MODE_TRUE@_pwc-ioctl.h: Makefile.am $(structpr) pwc-ioctl.h @MAINTAINER_MODE_TRUE@ $(srcdir)/$(structpr) <$(srcdir)/pwc-ioctl.h \ @MAINTAINER_MODE_TRUE@ printfn=fprint_pwc_ioctl_arg \ @MAINTAINER_MODE_TRUE@ pwc_whitebalance.mode=PWC_WB_ \ @MAINTAINER_MODE_TRUE@ > $@ # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: zapping-0.10cvs6/common/list.h 644 764 144 14563 10167772033 11460 /* * Copyright (C) 1999-2001 Michael H. Schimek * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. * * 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 this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* $Id: list.h,v 1.13 2005/01/08 14:54:19 mschimek Exp $ */ #ifndef LIST_H #define LIST_H #include #include #include "types.h" /* * Your familiar doubly linked list type, plus member * count for fast resource accounting and optional rwlock. * * Warning: No verification of the validity of list and * node parameters. The number of members must not * exceed INT_MAX. * * Traverse: * for (node = list->head; node->succ; node = node->succ) * * Remove: * for (n1 = list->head; (n2 = n1->succ); n1 = n2) * rem_node(n1); */ typedef struct node node; typedef struct list list; typedef struct xlist xlist; /* Xclusive access */ struct node { node * succ; node * pred; }; struct list { node * head; node * null; node * tail; int members; }; struct xlist { node * head; node * null; node * tail; int members; pthread_rwlock_t rwlock; }; /* * list foo_list; * struct foo { int baz; node bar; }, *foop; * * for_all_nodes(foop, &foo_list, bar) * foop->baz = 0; * * Not useful to delete list members. */ #define for_all_nodes(p, l, _node_) \ for ((p) = PARENT((l)->head, typeof(*(p)), _node_); \ (p)->_node_.succ; \ (p) = PARENT((p)->_node_.succ, typeof(*(p)), _node_)) /** * destroy_list: * * Free all resources associated with the list, * you must pair this with an init_list() call. * * Does not free the list object or any nodes. **/ static inline void destroy_xlist(xlist *l) { assert(l->members == 0); assert(pthread_rwlock_destroy(&l->rwlock) == 0); } static inline void destroy_invalid_xlist(xlist *l) { pthread_rwlock_destroy(&l->rwlock); } /** * init_list: * @l: list * * * Return value: * The list pointer. **/ static inline list * init_list(list *l) { l->head = (node *) &l->null; l->null = (node *) 0; l->tail = (node *) &l->head; l->members = 0; return l; } static inline xlist * init_xlist(xlist *l) { assert(pthread_rwlock_init(&l->rwlock, NULL) == 0); l->head = (node *) &l->null; l->null = (node *) 0; l->tail = (node *) &l->head; l->members = 0; return l; } /** * list_members: * @l: list * * * Return value: * Number of nodes linked in the list. You can read * l->members directly when the rwlock is unused. **/ static inline unsigned int list_members(list *l) { return l->members; } static inline unsigned int list_xmembers(xlist *l) { int members; pthread_rwlock_rdlock(&l->rwlock); members = l->members; pthread_rwlock_unlock(&l->rwlock); return members; } /** * empty_list: * @l: list * * * Return value: * 1 if the list is empty, 0 otherwise. You can read * l->members directly when the rwlock is unused. **/ static inline int empty_list(list *l) { return l->members == 0; } static inline int empty_xlist(xlist *l) { return list_xmembers(l) == 0; } /** * add_head: * @l: list * * @n: node * * * Add node at the head of the list. * * Return value: * The node pointer. **/ static inline node * add_head(list *l, node *n) { n->pred = (node *) &l->head; n->succ = l->head; l->head->pred = n; l->head = n; l->members++; return n; } static inline node * add_xhead(xlist *l, node *n) { pthread_rwlock_wrlock(&l->rwlock); n = add_head((list *) l, n); pthread_rwlock_unlock(&l->rwlock); return n; } /** * add_tail: * @l: list * * @n: node * * * Add node at the end of the list. * * Return value: * The node pointer. **/ static inline node * add_tail(list *l, node *n) { n->succ = (node *) &l->null; n->pred = l->tail; l->tail->succ = n; l->tail = n; l->members++; return n; } static inline node * add_xtail(xlist *l, node *n) { pthread_rwlock_wrlock(&l->rwlock); n = add_tail((list *) l, n); pthread_rwlock_unlock(&l->rwlock); return n; } /** * rem_head: * @l: list * * * Remove first node of the list. * * Return value: * Node pointer, or NULL if the list is empty. **/ static inline node * rem_head(list *l) { node *n = l->head, *s = n->succ; if (s) { s->pred = (node *) &l->head; l->head = s; l->members--; return n; } return NULL; } static inline node * rem_xhead(xlist *l) { node *n; pthread_rwlock_wrlock(&l->rwlock); n = rem_head((list *) l); pthread_rwlock_unlock(&l->rwlock); return n; } /** * rem_tail: * @l: list * * * Remove last node of the list. * * Return value: * Node pointer, or NULL if the list is empty. **/ static inline node * rem_tail(list *l) { node *n = l->tail, *p = n->pred; if (p) { p->succ = (node *) &l->null; l->tail = p; l->members--; return n; } return NULL; } static inline node * rem_xtail(xlist *l) { node *n; pthread_rwlock_wrlock(&l->rwlock); n = rem_tail((list *) l); pthread_rwlock_unlock(&l->rwlock); return n; } /** * unlink_node: * @l: list * * @n: node * * * Remove the node from its list. The node must * be a member of the list, not verified. * * Return value: * The node pointer. **/ static inline node * unlink_node(list *l, node *n) { n->pred->succ = n->succ; n->succ->pred = n->pred; l->members--; return n; } static inline node * unlink_xnode(xlist *l, node *n) { pthread_rwlock_wrlock(&l->rwlock); n = unlink_node((list *) l, n); pthread_rwlock_unlock(&l->rwlock); return n; } /** * rem_node: * @l: list * * @n: node * * * Remove the node if member of the list. * * Return value: * The node pointer or NULL if the node is not * member of the list. **/ static inline node * rem_node(list *l, node *n) { node *q; for (q = l->head; q->succ; q = q->succ) if (n == q) { unlink_node(l, n); return n; } return NULL; } static inline node * rem_xnode(xlist *l, node *n) { pthread_rwlock_wrlock(&l->rwlock); n = rem_node((list *) l, n); pthread_rwlock_unlock(&l->rwlock); return n; } #endif /* LIST_H */ zapping-0.10cvs6/common/math.h 644 764 144 3132 10167772033 11404 /* * Copyright (C) 1999-2000 Michael H. Schimek * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* $Id: math.h,v 1.5 2005/01/08 14:54:19 mschimek Exp $ */ #ifndef MATH_H #define MATH_H #include #ifndef MIN #define MIN(a, b) ((a) < (b) ? (a) : (b)) #endif #ifndef MAX #define MAX(a, b) ((a) > (b) ? (a) : (b)) #endif #define swap(a, b) \ do { \ __typeof__ (a) _t = (b); \ (b) = (a); \ (a) = _t; \ } while (0) static inline int saturate(int val, int min, int max) { #ifdef __i686__ /* 2 x cmp cmov, typ. both evaluated */ if (val < min) val = min; if (val > max) val = max; #else /* 1-2 branches */ if (val < min) val = min; else if (val > max) val = max; #endif return val; } static inline unsigned int nbabs(register int n) { register int t = n; t >>= 31; n ^= t; n -= t; return n; } #ifndef acount #define acount(array) (sizeof(array)/sizeof(array[0])) #endif #endif /* MATH_H */ zapping-0.10cvs6/common/videodev2.h 644 764 144 67311 10120231561 12354 /* * Video for Linux Two * * Header file for v4l or V4L2 drivers and applications, for * Linux kernels 2.2.x or 2.4.x. * * Author: Bill Dirks * Justin Schoeman * et al. */ #ifndef __LINUX_VIDEODEV_H #define __LINUX_VIDEODEV_H #include #include #ifdef __KERNEL__ #include #if (LINUX_VERSION_CODE >= 0x020300) || defined(CONFIG_FS_DEVFS) #include #endif #endif #define V4L2_MAJOR_VERSION 0 #define V4L2_MINOR_VERSION 20 /* * M I S C E L L A N E O U S */ /* Four-character-code (FOURCC) */ #define v4l2_fourcc(a,b,c,d)\ (((__u32)(a)<<0)|((__u32)(b)<<8)|((__u32)(c)<<16)|((__u32)(d)<<24)) /* Open flag for non-capturing opens on capture devices */ #define O_NONCAP O_TRUNC #define O_NOIO O_TRUNC /* Timestamp data type, 64-bit signed integer, in nanoseconds */ #ifndef STAMP_T #define STAMP_T typedef __s64 stamp_t; #endif /* * D R I V E R C A P A B I L I T I E S */ struct v4l2_capability { char name[32]; /* Descriptive, and unique */ int type; /* Device type, see below */ int inputs; /* Num video inputs */ int outputs; /* Num video outputs */ int audios; /* Num audio devices */ int maxwidth; int maxheight; int minwidth; int minheight; int maxframerate; __u32 flags; /* Feature flags, see below */ __u32 reserved[4]; }; /* Values for 'type' field */ #define V4L2_TYPE_CAPTURE 0 /* Is a video capture device */ #define V4L2_TYPE_CODEC 1 /* Is a CODEC device */ #define V4L2_TYPE_OUTPUT 2 /* Is a video output device */ #define V4L2_TYPE_FX 3 /* Is a video effects device */ #define V4L2_TYPE_VBI 4 /* Is a VBI capture device */ #define V4L2_TYPE_VTR 5 /* Is a tape recorder controller */ #define V4L2_TYPE_VTX 6 /* Is a teletext device */ #define V4L2_TYPE_RADIO 7 /* Is a radio device */ #define V4L2_TYPE_VBI_INPUT 4 /* Is a VBI capture device */ #define V4L2_TYPE_VBI_OUTPUT 9 /* Is a VBI output device */ #define V4L2_TYPE_PRIVATE 1000 /* Start of driver private types */ /* Flags for 'flags' field */ #define V4L2_FLAG_READ 0x00001 /* Can capture via read() call */ #define V4L2_FLAG_WRITE 0x00002 /* Can accept data via write() */ #define V4L2_FLAG_STREAMING 0x00004 /* Can capture streaming video */ #define V4L2_FLAG_PREVIEW 0x00008 /* Can do automatic preview */ #define V4L2_FLAG_SELECT 0x00010 /* Supports the select() call */ #define V4L2_FLAG_TUNER 0x00020 /* Can tune */ #define V4L2_FLAG_MONOCHROME 0x00040 /* Monochrome only */ #define V4L2_FLAG_DATA_SERVICE 0x00080 /* Has a related data service dev. */ /* * V I D E O I M A G E F O R M A T */ struct v4l2_pix_format { __u32 width; __u32 height; __u32 depth; __u32 pixelformat; __u32 flags; __u32 bytesperline; /* only used when there are pad bytes */ __u32 sizeimage; __u32 priv; /* private data, depends on pixelformat */ }; /* Pixel format FOURCC depth Description */ #define V4L2_PIX_FMT_RGB332 v4l2_fourcc('R','G','B','1') /* 8 RGB-3-3-2 */ #define V4L2_PIX_FMT_RGB555 v4l2_fourcc('R','G','B','O') /* 16 RGB-5-5-5 */ #define V4L2_PIX_FMT_RGB565 v4l2_fourcc('R','G','B','P') /* 16 RGB-5-6-5 */ #define V4L2_PIX_FMT_RGB555X v4l2_fourcc('R','G','B','Q') /* 16 RGB-5-5-5 BE */ #define V4L2_PIX_FMT_RGB565X v4l2_fourcc('R','G','B','R') /* 16 RGB-5-6-5 BE */ #define V4L2_PIX_FMT_BGR24 v4l2_fourcc('B','G','R','3') /* 24 BGR-8-8-8 */ #define V4L2_PIX_FMT_RGB24 v4l2_fourcc('R','G','B','3') /* 24 RGB-8-8-8 */ #define V4L2_PIX_FMT_BGR32 v4l2_fourcc('B','G','R','4') /* 32 BGR-8-8-8-8 */ #define V4L2_PIX_FMT_RGB32 v4l2_fourcc('R','G','B','4') /* 32 RGB-8-8-8-8 */ #define V4L2_PIX_FMT_GREY v4l2_fourcc('G','R','E','Y') /* 8 Greyscale */ #define V4L2_PIX_FMT_YVU410 v4l2_fourcc('Y','V','U','9') /* 9 YVU 4:1:0 */ #define V4L2_PIX_FMT_YVU420 v4l2_fourcc('Y','V','1','2') /* 12 YVU 4:2:0 */ #define V4L2_PIX_FMT_YUYV v4l2_fourcc('Y','U','Y','V') /* 16 YUV 4:2:2 */ #define V4L2_PIX_FMT_UYVY v4l2_fourcc('U','Y','V','Y') /* 16 YUV 4:2:2 */ #define V4L2_PIX_FMT_YVU422P v4l2_fourcc('4','2','2','P') /* 16 YVU422 planar */ #define V4L2_PIX_FMT_YVU411P v4l2_fourcc('4','1','1','P') /* 16 YVU411 planar */ #define V4L2_PIX_FMT_Y41P v4l2_fourcc('Y','4','1','P') /* 12 YUV 4:1:1 */ /* The following formats are not defined in the V4L2 specification */ #define V4L2_PIX_FMT_YUV410 v4l2_fourcc('Y','U','V','9') /* 9 YUV 4:1:0 */ #define V4L2_PIX_FMT_YUV420 v4l2_fourcc('Y','U','1','2') /* 12 YUV 4:2:0 */ #define V4L2_PIX_FMT_YYUV v4l2_fourcc('Y','Y','U','V') /* 16 YUV 4:2:2 */ #define V4L2_PIX_FMT_HI240 v4l2_fourcc('H','I','2','4') /* 8 8-bit color */ /* Vendor-specific formats */ #define V4L2_PIX_FMT_WNVA v4l2_fourcc('W','N','V','A') /* Winnov hw compres */ /* Flags */ #define V4L2_FMT_FLAG_COMPRESSED 0x0001 /* Compressed format */ #define V4L2_FMT_FLAG_BYTESPERLINE 0x0002 /* bytesperline field valid */ #define V4L2_FMT_FLAG_NOT_INTERLACED 0x0000 #define V4L2_FMT_FLAG_INTERLACED 0x0004 /* Image is interlaced */ #define V4L2_FMT_FLAG_TOPFIELD 0x0008 /* is a top field only */ #define V4L2_FMT_FLAG_BOTFIELD 0x0010 /* is a bottom field only */ #define V4L2_FMT_FLAG_ODDFIELD V4L2_FMT_FLAG_TOPFIELD #define V4L2_FMT_FLAG_EVENFIELD V4L2_FMT_FLAG_BOTFIELD #define V4L2_FMT_FLAG_COMBINED V4L2_FMT_FLAG_INTERLACED #define V4L2_FMT_FLAG_FIELD_field 0x001C #define V4L2_FMT_CS_field 0xF000 /* Color space field mask */ #define V4L2_FMT_CS_601YUV 0x1000 /* ITU YCrCb color space */ #define V4L2_FMT_FLAG_SWCONVERSION 0x0800 /* used only in format enum. */ /* SWCONVERSION indicates the format is not natively supported by the */ /* driver and the driver uses software conversion to support it */ /* * F O R M A T E N U M E R A T I O N */ struct v4l2_fmtdesc { int index; /* Format number */ char description[32]; /* Description string */ __u32 pixelformat; /* Format fourcc */ __u32 flags; /* Format flags */ __u32 depth; /* Bits per pixel */ __u32 reserved[2]; }; struct v4l2_cvtdesc { int index; struct { __u32 pixelformat; __u32 flags; __u32 depth; __u32 reserved[2]; } in, out; }; struct v4l2_fxdesc { int index; char name[32]; __u32 flags; __u32 inputs; __u32 controls; __u32 reserved[2]; }; /* * T I M E C O D E */ struct v4l2_timecode { __u8 frames; __u8 seconds; __u8 minutes; __u8 hours; __u8 userbits[4]; __u32 flags; __u32 type; }; /* Type */ #define V4L2_TC_TYPE_24FPS 1 #define V4L2_TC_TYPE_25FPS 2 #define V4L2_TC_TYPE_30FPS 3 #define V4L2_TC_TYPE_50FPS 4 #define V4L2_TC_TYPE_60FPS 5 /* Flags */ #define V4L2_TC_FLAG_DROPFRAME 0x0001 /* "drop-frame" mode */ #define V4L2_TC_FLAG_COLORFRAME 0x0002 #define V4L2_TC_USERBITS_field 0x000C #define V4L2_TC_USERBITS_USERDEFINED 0x0000 #define V4L2_TC_USERBITS_8BITCHARS 0x0008 /* The above is based on SMPTE timecodes */ /* * C O M P R E S S I O N P A R A M E T E R S */ struct v4l2_compression { int quality; int keyframerate; int pframerate; __u32 reserved[5]; }; /* * M E M O R Y - M A P P I N G B U F F E R S */ struct v4l2_requestbuffers { int count; __u32 type; __u32 reserved[2]; }; struct v4l2_buffer { int index; __u32 type; __u32 offset; __u32 length; __u32 bytesused; __u32 flags; stamp_t timestamp; struct v4l2_timecode timecode; __u32 sequence; __u32 reserved[3]; }; /* Buffer type codes and flags for 'type' field */ #define V4L2_BUF_TYPE_field 0x00001FFF /* Type field mask */ #define V4L2_BUF_TYPE_CAPTURE 0x00000001 #define V4L2_BUF_TYPE_CODECIN 0x00000002 #define V4L2_BUF_TYPE_CODECOUT 0x00000003 #define V4L2_BUF_TYPE_EFFECTSIN 0x00000004 #define V4L2_BUF_TYPE_EFFECTSIN2 0x00000005 #define V4L2_BUF_TYPE_EFFECTSOUT 0x00000006 #define V4L2_BUF_TYPE_VIDEOOUT 0x00000007 #define V4L2_BUF_TYPE_FXCONTROL 0x00000008 #define V4L2_BUF_TYPE_VBI 0x00000009 /* Starting value of driver private buffer types */ #define V4L2_BUF_TYPE_PRIVATE 0x00001000 #define V4L2_BUF_ATTR_DEVICEMEM 0x00010000 /* Buffer is on device (flag) */ /* Flags used only in VIDIOC_REQBUFS */ #define V4L2_BUF_REQ_field 0xF0000000 #define V4L2_BUF_REQ_CONTIG 0x10000000 /* Map all buffers in one contiguous mmap(). This flag only used in VIDIOC_REQBUFS */ /* Flags for 'flags' field */ #define V4L2_BUF_FLAG_MAPPED 0x0001 /* Buffer is mapped (flag) */ #define V4L2_BUF_FLAG_QUEUED 0x0002 /* Buffer is queued for processing */ #define V4L2_BUF_FLAG_DONE 0x0004 /* Buffer is ready */ #define V4L2_BUF_FLAG_KEYFRAME 0x0008 /* Image is a keyframe (I-frame) */ #define V4L2_BUF_FLAG_PFRAME 0x0010 /* Image is a P-frame */ #define V4L2_BUF_FLAG_BFRAME 0x0020 /* Image is a B-frame */ #define V4L2_BUF_FLAG_TOPFIELD 0x0040 /* Image is a top field only */ #define V4L2_BUF_FLAG_BOTFIELD 0x0080 /* Image is a bottom field only */ #define V4L2_BUF_FLAG_ODDFIELD V4L2_BUF_FLAG_TOPFIELD #define V4L2_BUF_FLAG_EVENFIELD V4L2_BUF_FLAG_BOTFIELD #define V4L2_BUF_FLAG_TIMECODE 0x0100 /* timecode field is valid */ /* * O V E R L A Y P R E V I E W */ struct v4l2_framebuffer { __u32 capability; __u32 flags; void *base[3]; struct v4l2_pix_format fmt; }; /* Flags for the 'capability' field. Read only */ #define V4L2_FBUF_CAP_EXTERNOVERLAY 0x0001 #define V4L2_FBUF_CAP_CHROMAKEY 0x0002 #define V4L2_FBUF_CAP_CLIPPING 0x0004 #define V4L2_FBUF_CAP_SCALEUP 0x0008 #define V4L2_FBUF_CAP_SCALEDOWN 0x0010 #define V4L2_FBUF_CAP_BITMAP_CLIPPING 0x0020 /* Flags for the 'flags' field. */ #define V4L2_FBUF_FLAG_PRIMARY 0x0001 #define V4L2_FBUF_FLAG_OVERLAY 0x0002 #define V4L2_FBUF_FLAG_CHROMAKEY 0x0004 struct v4l2_clip { int x; int y; int width; int height; struct v4l2_clip *next; }; struct v4l2_window { int x; int y; int width; int height; __u32 chromakey; struct v4l2_clip *clips; int clipcount; void *bitmap; }; /* * D E V I C E P E R F O R M A N C E */ struct v4l2_performance { int frames; int framesdropped; __u64 bytesin; __u64 bytesout; __u32 reserved[4]; }; /* * C A P T U R E P A R A M E T E R S */ struct v4l2_captureparm { __u32 capability; /* Supported modes */ __u32 capturemode; /* Current mode */ unsigned long timeperframe; /* Time per frame in .1us units */ __u32 extendedmode; /* Driver-specific extensions */ __u32 reserved[4]; }; /* Flags for 'capability' and 'capturemode' fields */ #define V4L2_MODE_HIGHQUALITY 0x0001 /* High quality imaging mode */ //#define V4L2_MODE_VFLIP 0x0002 /* Flip image vertically */ //#define V4L2_MODE_HFLIP 0x0004 /* Flip image horizontally */ #define V4L2_CAP_TIMEPERFRAME 0x1000 /* timeperframe field is supported */ struct v4l2_outputparm { __u32 capability; /* Supported modes */ __u32 outputmode; /* Current mode */ unsigned long timeperframe; /* Time per frame in .1us units */ __u32 extendedmode; /* Driver-specific extensions */ __u32 reserved[4]; }; /* * I N P U T I M A G E C R O P P I N G */ struct v4l2_cropcap { __u32 capability; int min_x; int min_y; int max_x; int max_y; int default_left; int default_top; int default_right; int default_bottom; __u32 reserved[2]; }; struct v4l2_crop { int left; int top; int right; int bottom; __u32 reserved; }; /* * D I G I T A L Z O O M */ struct v4l2_zoomcap { __u32 capability; __u32 maxwidth; __u32 maxheight; __u32 minwidth; __u32 minheight; __u32 reserved[2]; }; /* Flags for the capability field */ #define V4L2_ZOOM_NONCAP 0x0001 #define V4L2_ZOOM_WHILESTREAMING 0x0002 struct v4l2_zoom { __u32 x; __u32 y; __u32 width; __u32 height; __u32 reserved; }; /* * A N A L O G V I D E O S T A N D A R D */ struct v4l2_standard { __u8 name[24]; struct { __u32 numerator; __u32 denominator; /* >= 1 */ } framerate; /* Frames, not fields */ __u32 framelines; __u32 reserved1; __u32 colorstandard; union { struct { __u32 colorsubcarrier; /* Hz */ } pal; struct { __u32 colorsubcarrier; /* Hz */ } ntsc; struct { __u32 f0b; /* Hz (blue) */ __u32 f0r; /* Hz (red) */ } secam; __u8 reserved[12]; } colorstandard_data; __u32 transmission; /* Bit field. Must be zero for non-modulators/demodulators. */ __u32 reserved2; /* Must be set to zero */ }; /* Values for the 'colorstandard' field */ #define V4L2_COLOR_STD_PAL 1 #define V4L2_COLOR_STD_NTSC 2 #define V4L2_COLOR_STD_SECAM 3 /* Values for the color subcarrier fields */ #define V4L2_COLOR_SUBC_PAL 4433619 /* PAL BGHI, NTSC-44 */ #define V4L2_COLOR_SUBC_PAL_M 3575611 /* PAL M (Brazil) */ #define V4L2_COLOR_SUBC_PAL_N 3582056 /* PAL N */ #define V4L2_COLOR_SUBC_NTSC 3579545 /* NTSC M, NTSC-Japan */ #define V4L2_COLOR_SUBC_SECAMB 4250000 /* SECAM B - Y carrier */ #define V4L2_COLOR_SUBC_SECAMR 4406250 /* SECAM R - Y carrier */ /* Flags for the 'transmission' field */ #define V4L2_TRANSM_STD_B (1<<1) #define V4L2_TRANSM_STD_D (1<<3) #define V4L2_TRANSM_STD_G (1<<6) #define V4L2_TRANSM_STD_H (1<<7) #define V4L2_TRANSM_STD_I (1<<8) #define V4L2_TRANSM_STD_K (1<<10) #define V4L2_TRANSM_STD_K1 (1<<11) #define V4L2_TRANSM_STD_L (1<<12) #define V4L2_TRANSM_STD_M (1<<13) #define V4L2_TRANSM_STD_N (1<<14) /* Used in the VIDIOC_ENUMSTD ioctl for querying supported standards */ struct v4l2_enumstd { int index; struct v4l2_standard std; __u32 inputs; /* set of inputs that */ /* support this standard */ __u32 outputs; /* set of outputs that */ /* support this standard */ __u32 reserved[2]; }; /* * V I D E O I N P U T S */ struct v4l2_input { int index; /* Which input */ char name[32]; /* Label */ int type; /* Type of input */ __u32 capability; /* Capability flags */ int assoc_audio; /* Associated audio input */ __u32 reserved[4]; }; /* Values for the 'type' field */ #define V4L2_INPUT_TYPE_TUNER 1 #define V4L2_INPUT_TYPE_CAMERA 2 /* Flags for the 'capability' field */ #define V4L2_INPUT_CAP_AUDIO 0x0001 /* assoc_audio */ /* * V I D E O O U T P U T S */ struct v4l2_output { int index; /* Which output */ char name[32]; /* Label */ int type; /* Type of output */ __u32 capability; /* Capability flags */ int assoc_audio; /* Associated audio */ __u32 reserved[4]; }; /* Values for the 'type' field */ #define V4L2_OUTPUT_TYPE_MODULATOR 1 #define V4L2_OUTPUT_TYPE_ANALOG 2 #define V4L2_OUTPUT_TYPE_ANALOGVGAOVERLAY 3 /* Flags for the 'capability' field */ #define V4L2_OUTPUT_CAP_AUDIO 0x0001 /* assoc_audio */ /* * C O N T R O L S */ struct v4l2_control { __u32 id; int value; }; /* Used in the VIDIOC_QUERYCTRL ioctl for querying controls */ struct v4l2_queryctrl { __u32 id; __u8 name[32]; /* Whatever */ int minimum; /* Note signedness */ int maximum; unsigned int step; int default_value; __u32 type; __u32 flags; __u32 category; /* Automatically filled in by V4L2 */ __u8 group[32]; /* for pre-defined controls */ __u32 reserved[2]; }; /* Used in the VIDIOC_QUERYMENU ioctl for querying menu items */ struct v4l2_querymenu { __u32 id; int index; __u8 name[32]; /* Whatever */ int reserved; }; /* Used in V4L2_BUF_TYPE_FXCONTROL buffers */ struct v4l2_fxcontrol { __u32 id; __u32 value; }; /* Control types */ #define V4L2_CTRL_TYPE_INTEGER 0 #define V4L2_CTRL_TYPE_BOOLEAN 1 #define V4L2_CTRL_TYPE_MENU 2 #define V4L2_CTRL_TYPE_BUTTON 3 /* Control flags */ #define V4L2_CTRL_FLAG_DISABLED 0x0001 #define V4L2_CTRL_FLAG_GRABBED 0x0002 /* Control categories */ #define V4L2_CTRL_CAT_VIDEO 1 /* "Video" */ #define V4L2_CTRL_CAT_AUDIO 2 /* "Audio" */ #define V4L2_CTRL_CAT_EFFECT 3 /* "Effect" */ /* Control IDs defined by V4L2 */ #define V4L2_CID_BASE 0x00980900 /* IDs reserved for driver specific controls */ #define V4L2_CID_PRIVATE_BASE 0x08000000 /* IDs reserved for effect-specific controls on effects devices */ #define V4L2_CID_EFFECT_BASE 0x0A00B000 #define V4L2_CID_BRIGHTNESS (V4L2_CID_BASE+0) #define V4L2_CID_CONTRAST (V4L2_CID_BASE+1) #define V4L2_CID_SATURATION (V4L2_CID_BASE+2) #define V4L2_CID_HUE (V4L2_CID_BASE+3) #define V4L2_CID_AUDIO_VOLUME (V4L2_CID_BASE+5) #define V4L2_CID_AUDIO_BALANCE (V4L2_CID_BASE+6) #define V4L2_CID_AUDIO_BASS (V4L2_CID_BASE+7) #define V4L2_CID_AUDIO_TREBLE (V4L2_CID_BASE+8) #define V4L2_CID_AUDIO_MUTE (V4L2_CID_BASE+9) #define V4L2_CID_AUDIO_LOUDNESS (V4L2_CID_BASE+10) #define V4L2_CID_BLACK_LEVEL (V4L2_CID_BASE+11) #define V4L2_CID_AUTO_WHITE_BALANCE (V4L2_CID_BASE+12) #define V4L2_CID_DO_WHITE_BALANCE (V4L2_CID_BASE+13) #define V4L2_CID_RED_BALANCE (V4L2_CID_BASE+14) #define V4L2_CID_BLUE_BALANCE (V4L2_CID_BASE+15) #define V4L2_CID_GAMMA (V4L2_CID_BASE+16) #define V4L2_CID_WHITENESS (V4L2_CID_GAMMA) /* ? Not sure */ #define V4L2_CID_EXPOSURE (V4L2_CID_BASE+17) #define V4L2_CID_AUTOGAIN (V4L2_CID_BASE+18) #define V4L2_CID_GAIN (V4L2_CID_BASE+19) #define V4L2_CID_HFLIP (V4L2_CID_BASE+20) #define V4L2_CID_VFLIP (V4L2_CID_BASE+21) #define V4L2_CID_HCENTER (V4L2_CID_BASE+22) #define V4L2_CID_VCENTER (V4L2_CID_BASE+23) #define V4L2_CID_LASTP1 (V4L2_CID_BASE+24) /* last CID + 1 */ /* Remember to change fill_ctrl_category() in videodev.c */ /* * T U N I N G */ struct v4l2_tuner { int input; char name[32]; struct v4l2_standard std; __u32 capability; __u32 rangelow; __u32 rangehigh; __u32 rxsubchans; __u32 audmode; int signal; int afc; __u32 reserved[4]; }; struct v4l2_modulator { int output; char name[32]; struct v4l2_standard std; __u32 capability; __u32 rangelow; __u32 rangehigh; __u32 txsubchans; __u32 reserved[4]; }; /* Flags for the 'capability' field */ #define V4L2_TUNER_CAP_LOW 0x0001 #define V4L2_TUNER_CAP_NORM 0x0002 #define V4L2_TUNER_CAP_STEREO 0x0010 #define V4L2_TUNER_CAP_LANG2 0x0020 #define V4L2_TUNER_CAP_SAP 0x0020 #define V4L2_TUNER_CAP_LANG1 0x0040 /* Flags for the 'rxsubchans' field */ #define V4L2_TUNER_SUB_MONO 0x0001 #define V4L2_TUNER_SUB_STEREO 0x0002 #define V4L2_TUNER_SUB_LANG2 0x0004 #define V4L2_TUNER_SUB_SAP 0x0004 #define V4L2_TUNER_SUB_LANG1 0x0008 /* Values for the 'audmode' field */ #define V4L2_TUNER_MODE_MONO 0x0000 #define V4L2_TUNER_MODE_STEREO 0x0001 #define V4L2_TUNER_MODE_LANG2 0x0002 #define V4L2_TUNER_MODE_SAP 0x0002 #define V4L2_TUNER_MODE_LANG1 0x0003 struct v4l2_frequency { int port; __u32 frequency; __u32 reserved[2]; }; /* * A U D I O */ struct v4l2_audio { int audio; char name[32]; __u32 capability; __u32 mode; __u32 reserved[2]; }; /* Flags for the 'capability' field */ #define V4L2_AUDCAP_EFFECTS 0x0020 #define V4L2_AUDCAP_LOUDNESS 0x0040 #define V4L2_AUDCAP_AVL 0x0080 /* Flags for the 'mode' field */ #define V4L2_AUDMODE_LOUDNESS 0x00002 #define V4L2_AUDMODE_AVL 0x00004 #define V4L2_AUDMODE_STEREO_field 0x0FF00 #define V4L2_AUDMODE_STEREO_LINEAR 0x00100 #define V4L2_AUDMODE_STEREO_PSEUDO 0x00200 #define V4L2_AUDMODE_STEREO_SPATIAL30 0x00300 #define V4L2_AUDMODE_STEREO_SPATIAL50 0x00400 struct v4l2_audioout { int audio; char name[32]; __u32 capability; __u32 mode; __u32 reserved[2]; }; /* * D A T A S E R V I C E S ( V B I ) * * Data services API by Michael Schimek */ struct v4l2_vbi_format { __u32 sampling_rate; /* in 1 Hz */ __u32 offset; __u32 samples_per_line; __u32 sample_format; /* V4L2_VBI_SF_* */ __s32 start[2]; __u32 count[2]; __u32 flags; /* V4L2_VBI_* */ __u32 reserved2; /* must be zero */ }; /* VBI sampling formats */ #define V4L2_VBI_SF_UBYTE 1 /* VBI flags */ #define V4L2_VBI_UNSYNC (1<< 0) #define V4L2_VBI_INTERLACED (1<< 1) /* * A G G R E G A T E S T R U C T U R E S */ /* Stream data format */ struct v4l2_format { __u32 type; union { struct v4l2_pix_format pix; /* image format */ struct v4l2_vbi_format vbi; /* VBI data */ /* add more */ __u8 raw_data[200]; /* user-defined */ } fmt; }; /* Stream type-dependent parameters */ struct v4l2_streamparm { __u32 type; union { struct v4l2_captureparm capture; struct v4l2_outputparm output; /* add more */ __u8 raw_data[200]; /* user-defined */ } parm; }; /* * I O C T L C O D E S F O R V I D E O D E V I C E S * */ #define VIDIOC_QUERYCAP _IOR ('V', 0, struct v4l2_capability) #define VIDIOC_RESERVED _IO ('V', 1) #define VIDIOC_ENUM_PIXFMT _IOWR ('V', 2, struct v4l2_fmtdesc) #define VIDIOC_ENUM_FBUFFMT _IOWR ('V', 3, struct v4l2_fmtdesc) #define VIDIOC_G_FMT _IOWR ('V', 4, struct v4l2_format) #define VIDIOC_S_FMT _IOWR ('V', 5, struct v4l2_format) #define VIDIOC_G_COMP _IOR ('V', 6, struct v4l2_compression) #define VIDIOC_S_COMP _IOW ('V', 7, struct v4l2_compression) #define VIDIOC_REQBUFS _IOWR ('V', 8, struct v4l2_requestbuffers) #define VIDIOC_QUERYBUF _IOWR ('V', 9, struct v4l2_buffer) #define VIDIOC_G_FBUF _IOR ('V', 10, struct v4l2_framebuffer) #define VIDIOC_S_FBUF _IOW ('V', 11, struct v4l2_framebuffer) #define VIDIOC_G_WIN _IOR ('V', 12, struct v4l2_window) #define VIDIOC_S_WIN _IOW ('V', 13, struct v4l2_window) #define VIDIOC_PREVIEW _IOWR ('V', 14, int) #define VIDIOC_QBUF _IOWR ('V', 15, struct v4l2_buffer) #define VIDIOC_DQBUF _IOWR ('V', 17, struct v4l2_buffer) #define VIDIOC_STREAMON _IOW ('V', 18, int) #define VIDIOC_STREAMOFF _IOW ('V', 19, int) #define VIDIOC_G_PERF _IOR ('V', 20, struct v4l2_performance) #define VIDIOC_G_PARM _IOWR ('V', 21, struct v4l2_streamparm) #define VIDIOC_S_PARM _IOW ('V', 22, struct v4l2_streamparm) #define VIDIOC_G_STD _IOR ('V', 23, struct v4l2_standard) #define VIDIOC_S_STD _IOW ('V', 24, struct v4l2_standard) #define VIDIOC_ENUMSTD _IOWR ('V', 25, struct v4l2_enumstd) #define VIDIOC_ENUMINPUT _IOWR ('V', 26, struct v4l2_input) #define VIDIOC_G_CTRL _IOWR ('V', 27, struct v4l2_control) #define VIDIOC_S_CTRL _IOW ('V', 28, struct v4l2_control) #define VIDIOC_G_TUNER _IOWR ('V', 29, struct v4l2_tuner) #define VIDIOC_S_TUNER _IOW ('V', 30, struct v4l2_tuner) #define VIDIOC_G_FREQ _IOR ('V', 31, int) #define VIDIOC_S_FREQ _IOWR ('V', 32, int) #define VIDIOC_G_AUDIO _IOWR ('V', 33, struct v4l2_audio) #define VIDIOC_S_AUDIO _IOW ('V', 34, struct v4l2_audio) #define VIDIOC_QUERYCTRL _IOWR ('V', 36, struct v4l2_queryctrl) #define VIDIOC_QUERYMENU _IOWR ('V', 37, struct v4l2_querymenu) #define VIDIOC_G_INPUT _IOR ('V', 38, int) #define VIDIOC_S_INPUT _IOWR ('V', 39, int) #define VIDIOC_ENUMCVT _IOWR ('V', 40, struct v4l2_cvtdesc) #define VIDIOC_G_OUTPUT _IOR ('V', 46, int) #define VIDIOC_S_OUTPUT _IOWR ('V', 47, int) #define VIDIOC_ENUMOUTPUT _IOWR ('V', 48, struct v4l2_output) #define VIDIOC_G_AUDOUT _IOWR ('V', 49, struct v4l2_audioout) #define VIDIOC_S_AUDOUT _IOW ('V', 50, struct v4l2_audioout) #define VIDIOC_ENUMFX _IOWR ('V', 51, struct v4l2_fxdesc) #define VIDIOC_G_EFFECT _IOR ('V', 52, int) #define VIDIOC_S_EFFECT _IOWR ('V', 53, int) #define VIDIOC_G_MODULATOR _IOWR ('V', 54, struct v4l2_modulator) #define VIDIOC_S_MODULATOR _IOW ('V', 55, struct v4l2_modulator) #define VIDIOC_ENUM_CAPFMT VIDIOC_ENUM_PIXFMT #define VIDIOC_ENUM_OUTFMT VIDIOC_ENUM_PIXFMT #define VIDIOC_ENUM_SRCFMT VIDIOC_ENUM_PIXFMT #define VIDIOC_ENUMFMT VIDIOC_ENUM_PIXFMT #define BASE_VIDIOC_PRIVATE 192 /* 192-255 are private */ #ifdef __KERNEL__ /* * These things are used only by drivers. */ extern int videodev_init(void); /* * * V 4 L 2 D R I V E R H E L P E R A P I * * Some commonly needed functions for drivers. */ extern void v4l2_version(int *major, int *minor); extern int v4l2_major_number(void); /* Memory management */ extern unsigned long v4l2_vmalloc_to_bus(void *virt); #if LINUX_VERSION_CODE >= 0x020300 extern struct page *v4l2_vmalloc_to_page(void *virt); #else extern unsigned long v4l2_vmalloc_to_page(void *virt); #endif /* Simple queue management */ struct v4l2_q_node { struct v4l2_q_node *forw, *back; }; struct v4l2_queue { struct v4l2_q_node *forw, *back; rwlock_t qlock; }; extern void v4l2_q_init(struct v4l2_queue *q); extern void v4l2_q_add_head(struct v4l2_queue *q, struct v4l2_q_node *node); extern void v4l2_q_add_tail(struct v4l2_queue *q, struct v4l2_q_node *node); extern void *v4l2_q_del_head(struct v4l2_queue *q); extern void *v4l2_q_del_tail(struct v4l2_queue *q); extern void *v4l2_q_peek_head(struct v4l2_queue *q); extern void *v4l2_q_peek_tail(struct v4l2_queue *q); extern void *v4l2_q_yank_node(struct v4l2_queue *q, struct v4l2_q_node *node); extern int v4l2_q_last(struct v4l2_queue *q); /* Math functions */ extern u32 v4l2_math_div6432(u64 a, u32 d, u32 *r); /* Time functions */ extern unsigned long v4l2_timestamp_divide(stamp_t t, unsigned long p_100ns); extern unsigned long v4l2_timestamp_correct(stamp_t *t, unsigned long p_100ns); /* Master Clock functions */ struct v4l2_clock { void (*gettime)(stamp_t *); }; extern int v4l2_masterclock_register(struct v4l2_clock *clock); extern void v4l2_masterclock_unregister(struct v4l2_clock *clock); extern void v4l2_masterclock_gettime(stamp_t *curr); /* Video standard functions */ extern unsigned int v4l2_video_std_fps(struct v4l2_standard *vs); extern unsigned long v4l2_video_std_tpf(struct v4l2_standard *vs); extern int v4l2_video_std_confirm(struct v4l2_standard *vs); extern int v4l2_video_std_construct(struct v4l2_standard *vs, int id, __u32 transmission); #define V4L2_STD_PAL 1 /* PAL B, G, H, I (...) */ #define V4L2_STD_PAL_M 5 /* (Brazil) */ #define V4L2_STD_PAL_N 6 /* (Argentina, Paraguay, Uruguay) */ #define V4L2_STD_PAL_60 10 /* PAL/NTSC hybrid */ #define V4L2_STD_NTSC 11 /* NTSC M (USA, ...) */ #define V4L2_STD_NTSC_N 12 /* (Barbados, Bolivia, Colombia, S. Korea) */ #define V4L2_STD_NTSC_44 15 /* PAL/NTSC hybrid */ #define V4L2_STD_SECAM 21 /* SECAM B, D, G, K, K1 (...) */ //#define V4L2_STD_SECAM_H 27 /* (Greece, Iran, Morocco) */ //#define V4L2_STD_SECAM_L 28 /* (France, Luxembourg, Monaco) */ //#define V4L2_STD_SECAM_M 29 /* (Jamaica) */ /* * D E V I C E D R I V E R R E G I S T R A T I O N * */ struct v4l2_device { char name[32]; int type; int minor; int (*open)(struct v4l2_device *v, int flags, void **idptr); void (*close)(void *id); long (*read)(void *id, char *buf, unsigned long count, int noblock); long (*write)(void *id, const char *buf, unsigned long count, int noblock); int (*ioctl)(void *id, unsigned int cmd, void *arg); int (*mmap)(void *id, struct vm_area_struct *vma); int (*poll)(void *id, struct file *file, poll_table *table); int (*initialize)(struct v4l2_device *v); void *priv; /* may be used by the driver */ int busy; /* open count maintained by videodev.c */ void *v4l2_priv; /* for V4L2 use */ int v4l2_reserved[4]; /* for V4L2 use */ #if (LINUX_VERSION_CODE >= 0x020300) || defined(CONFIG_FS_DEVFS) devfs_handle_t devfs_handle; char devfs_devname[16]; #endif }; /* Size of kernel ioctl arg buffer used in ioctl handler */ #define V4L2_MAX_IOCTL_SIZE 256 extern int v4l2_register_device(struct v4l2_device *); extern void v4l2_unregister_device(struct v4l2_device *); /* V4L2 structures */ extern struct v4l2_device *v4l2_device_from_file(struct file *file); extern void *v4l2_openid_from_file(struct file *file); #endif/*ifdef __KERNEL__ */ /*---------------------------------------------------------------------- Old Video for Linux backward compatibility below this line. ---------------------------------------------------------------------- All new applications should use the new API calls. (These definitions taken from 2.4.0-test9.) */ #ifdef __KERNEL__ /* Compatibility layer interface */ struct v4l2_v4l_compat { int (*translate_ioctl)(struct file *file, struct v4l2_device *vfl, void *per_open_data, int cmd, void *arg); void (*fix_offset)(struct file *file, struct v4l2_device *vfl, struct vm_area_struct *vma); }; extern int v4l2_v4l_compat_register(struct v4l2_v4l_compat *); extern void v4l2_v4l_compat_unregister(struct v4l2_v4l_compat *); #endif /* Zapping */ #undef __LINUX_VIDEODEV_H #include "videodev.h" #endif/*ifndef __LINUX_VIDEODEV_H*/ zapping-0.10cvs6/common/pwc-ioctl.h 644 764 144 21366 10167767375 12422 #ifndef PWC_IOCTL_H #define PWC_IOCTL_H /* (C) 2001-2004 Nemosoft Unv. webcam@smcc.demon.nl 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 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ /* This is pwc-ioctl.h belonging to PWC 8.12.1 It contains structures and defines to communicate from user space directly to the driver. */ /* Changes 2001/08/03 Alvarado Added ioctl constants to access methods for changing white balance and red/blue gains 2002/12/15 G. H. Fernandez-Toribio VIDIOCGREALSIZE 2003/12/13 Nemosft Unv. Some modifications to make interfacing to PWCX easier */ /* These are private ioctl() commands, specific for the Philips webcams. They contain functions not found in other webcams, and settings not specified in the Video4Linux API. The #define names are built up like follows: VIDIOC VIDeo IOCtl prefix PWC Philps WebCam G optional: Get S optional: Set ... the function */ /* Enumeration of image sizes */ #define PSZ_SQCIF 0x00 #define PSZ_QSIF 0x01 #define PSZ_QCIF 0x02 #define PSZ_SIF 0x03 #define PSZ_CIF 0x04 #define PSZ_VGA 0x05 #define PSZ_MAX 6 /* The frame rate is encoded in the video_window.flags parameter using the upper 16 bits, since some flags are defined nowadays. The following defines provide a mask and shift to filter out this value. In 'Snapshot' mode the camera freezes its automatic exposure and colour balance controls. */ #define PWC_FPS_SHIFT 16 #define PWC_FPS_MASK 0x00FF0000 #define PWC_FPS_FRMASK 0x003F0000 #define PWC_FPS_SNAPSHOT 0x00400000 /* structure for transfering x & y coordinates */ struct pwc_coord { int x, y; /* guess what */ int size; /* size, or offset */ }; /* Used with VIDIOCPWCPROBE */ struct pwc_probe { char name[32]; int type; }; struct pwc_serial { char serial[30]; /* String with serial number. Contains terminating 0 */ }; /* pwc_whitebalance.mode values */ #define PWC_WB_INDOOR 0 #define PWC_WB_OUTDOOR 1 #define PWC_WB_FL 2 #define PWC_WB_MANUAL 3 #define PWC_WB_AUTO 4 /* Used with VIDIOCPWC[SG]AWB (Auto White Balance). Set mode to one of the PWC_WB_* values above. *red and *blue are the respective gains of these colour components inside the camera; range 0..65535 When 'mode' == PWC_WB_MANUAL, 'manual_red' and 'manual_blue' are set or read; otherwise undefined. 'read_red' and 'read_blue' are read-only. */ struct pwc_whitebalance { int mode; int manual_red, manual_blue; /* R/W */ int read_red, read_blue; /* R/O */ }; /* 'control_speed' and 'control_delay' are used in automatic whitebalance mode, and tell the camera how fast it should react to changes in lighting, and with how much delay. Valid values are 0..65535. */ struct pwc_wb_speed { int control_speed; int control_delay; }; /* Used with VIDIOCPWC[SG]LED */ struct pwc_leds { int led_on; /* Led on-time; range = 0..25000 */ int led_off; /* Led off-time; range = 0..25000 */ }; /* Image size (used with GREALSIZE) */ struct pwc_imagesize { int width; int height; }; /* Defines and structures for Motorized Pan & Tilt */ #define PWC_MPT_PAN 0x01 #define PWC_MPT_TILT 0x02 #define PWC_MPT_TIMEOUT 0x04 /* for status */ /* Set angles; when absolute != 0, the angle is absolute and the driver calculates the relative offset for you. This can only be used with VIDIOCPWCSANGLE; VIDIOCPWCGANGLE always returns absolute angles. */ struct pwc_mpt_angles { int absolute; /* write-only */ int pan; /* degrees * 100 */ int tilt; /* degress * 100 */ }; /* Range of angles of the camera, both horizontally and vertically. */ struct pwc_mpt_range { int pan_min, pan_max; /* degrees * 100 */ int tilt_min, tilt_max; }; struct pwc_mpt_status { int status; int time_pan; int time_tilt; }; /* This is used for out-of-kernel decompression. With it, you can get all the necessary information to initialize and use the decompressor routines in standalone applications. */ struct pwc_video_command { int type; /* camera type (645, 675, 730, etc.) */ int release; /* release number */ int size; /* one of PSZ_* */ int alternate; int command_len; /* length of USB video command */ unsigned char command_buf[13]; /* Actual USB video command */ int bandlength; /* >0 = compressed */ int frame_size; /* Size of one (un)compressed frame */ }; /* Flags for PWCX subroutines. Not all modules honour all flags. */ #define PWCX_FLAG_PLANAR 0x0001 #define PWCX_FLAG_BAYER 0x0008 /* IOCTL definitions */ /* Restore user settings */ #define VIDIOCPWCRUSER _IO('v', 192) /* Save user settings */ #define VIDIOCPWCSUSER _IO('v', 193) /* Restore factory settings */ #define VIDIOCPWCFACTORY _IO('v', 194) /* You can manipulate the compression factor. A compression preference of 0 means use uncompressed modes when available; 1 is low compression, 2 is medium and 3 is high compression preferred. Of course, the higher the compression, the lower the bandwidth used but more chance of artefacts in the image. The driver automatically chooses a higher compression when the preferred mode is not available. */ /* Set preferred compression quality (0 = uncompressed, 3 = highest compression) */ #define VIDIOCPWCSCQUAL _IOW('v', 195, int) /* Get preferred compression quality */ #define VIDIOCPWCGCQUAL _IOR('v', 195, int) /* Retrieve serial number of camera */ #define VIDIOCPWCGSERIAL _IOR('v', 198, struct pwc_serial) /* This is a probe function; since so many devices are supported, it becomes difficult to include all the names in programs that want to check for the enhanced Philips stuff. So in stead, try this PROBE; it returns a structure with the original name, and the corresponding Philips type. To use, fill the structure with zeroes, call PROBE and if that succeeds, compare the name with that returned from VIDIOCGCAP; they should be the same. If so, you can be assured it is a Philips (OEM) cam and the type is valid. */ #define VIDIOCPWCPROBE _IOR('v', 199, struct pwc_probe) /* Set AGC (Automatic Gain Control); int < 0 = auto, 0..65535 = fixed */ #define VIDIOCPWCSAGC _IOW('v', 200, int) /* Get AGC; int < 0 = auto; >= 0 = fixed, range 0..65535 */ #define VIDIOCPWCGAGC _IOR('v', 200, int) /* Set shutter speed; int < 0 = auto; >= 0 = fixed, range 0..65535 */ #define VIDIOCPWCSSHUTTER _IOW('v', 201, int) /* Color compensation (Auto White Balance) */ #define VIDIOCPWCSAWB _IOW('v', 202, struct pwc_whitebalance) #define VIDIOCPWCGAWB _IOR('v', 202, struct pwc_whitebalance) /* Auto WB speed */ #define VIDIOCPWCSAWBSPEED _IOW('v', 203, struct pwc_wb_speed) #define VIDIOCPWCGAWBSPEED _IOR('v', 203, struct pwc_wb_speed) /* LEDs on/off/blink; int range 0..65535 */ #define VIDIOCPWCSLED _IOW('v', 205, struct pwc_leds) #define VIDIOCPWCGLED _IOR('v', 205, struct pwc_leds) /* Contour (sharpness); int < 0 = auto, 0..65536 = fixed */ #define VIDIOCPWCSCONTOUR _IOW('v', 206, int) #define VIDIOCPWCGCONTOUR _IOR('v', 206, int) /* Backlight compensation; 0 = off, otherwise on */ #define VIDIOCPWCSBACKLIGHT _IOW('v', 207, int) #define VIDIOCPWCGBACKLIGHT _IOR('v', 207, int) /* Flickerless mode; = 0 off, otherwise on */ #define VIDIOCPWCSFLICKER _IOW('v', 208, int) #define VIDIOCPWCGFLICKER _IOR('v', 208, int) /* Dynamic noise reduction; 0 off, 3 = high noise reduction */ #define VIDIOCPWCSDYNNOISE _IOW('v', 209, int) #define VIDIOCPWCGDYNNOISE _IOR('v', 209, int) /* Real image size as used by the camera; tells you whether or not there's a gray border around the image */ #define VIDIOCPWCGREALSIZE _IOR('v', 210, struct pwc_imagesize) /* Motorized pan & tilt functions */ #define VIDIOCPWCMPTRESET _IOW('v', 211, int) #define VIDIOCPWCMPTGRANGE _IOR('v', 211, struct pwc_mpt_range) #define VIDIOCPWCMPTSANGLE _IOW('v', 212, struct pwc_mpt_angles) #define VIDIOCPWCMPTGANGLE _IOR('v', 212, struct pwc_mpt_angles) #define VIDIOCPWCMPTSTATUS _IOR('v', 213, struct pwc_mpt_status) /* Get the USB set-video command; needed for initializing libpwcx */ #define VIDIOCPWCGVIDCMD _IOR('v', 215, struct pwc_video_command) #endif zapping-0.10cvs6/common/_videodev2.h 644 764 144 104770 10427306000 12535 /* Generated file, do not edit! */ #include #include "common/device.h" #ifndef __GNUC__ #undef __attribute__ #define __attribute__(x) #endif static void fprint_struct_v4l2_performance (FILE *fp, int rw __attribute__ ((unused)), const struct v4l2_performance *t) { fprintf (fp, "frames=%ld " "framesdropped=%ld " "bytesin=%lu " "bytesout=%lu " "reserved[] ", (long) t->frames, (long) t->framesdropped, (unsigned long) t->bytesin, (unsigned long) t->bytesout); } static void fprint_struct_v4l2_compression (FILE *fp, int rw __attribute__ ((unused)), const struct v4l2_compression *t) { fprintf (fp, "quality=%ld " "keyframerate=%ld " "pframerate=%ld " "reserved[] ", (long) t->quality, (long) t->keyframerate, (long) t->pframerate); } static void fprint_symbol_v4l2_pix_fmt_ (FILE *fp, int rw __attribute__ ((unused)), unsigned long value) { fprint_symbolic (fp, 0, value, "RGB332", (unsigned long) V4L2_PIX_FMT_RGB332, "RGB555", (unsigned long) V4L2_PIX_FMT_RGB555, "RGB565", (unsigned long) V4L2_PIX_FMT_RGB565, "RGB555X", (unsigned long) V4L2_PIX_FMT_RGB555X, "RGB565X", (unsigned long) V4L2_PIX_FMT_RGB565X, "BGR24", (unsigned long) V4L2_PIX_FMT_BGR24, "RGB24", (unsigned long) V4L2_PIX_FMT_RGB24, "BGR32", (unsigned long) V4L2_PIX_FMT_BGR32, "RGB32", (unsigned long) V4L2_PIX_FMT_RGB32, "GREY", (unsigned long) V4L2_PIX_FMT_GREY, "YVU410", (unsigned long) V4L2_PIX_FMT_YVU410, "YVU420", (unsigned long) V4L2_PIX_FMT_YVU420, "YUYV", (unsigned long) V4L2_PIX_FMT_YUYV, "UYVY", (unsigned long) V4L2_PIX_FMT_UYVY, "YVU422P", (unsigned long) V4L2_PIX_FMT_YVU422P, "YVU411P", (unsigned long) V4L2_PIX_FMT_YVU411P, "Y41P", (unsigned long) V4L2_PIX_FMT_Y41P, "YUV410", (unsigned long) V4L2_PIX_FMT_YUV410, "YUV420", (unsigned long) V4L2_PIX_FMT_YUV420, "YYUV", (unsigned long) V4L2_PIX_FMT_YYUV, "HI240", (unsigned long) V4L2_PIX_FMT_HI240, "WNVA", (unsigned long) V4L2_PIX_FMT_WNVA, (void *) 0); } static void fprint_struct_v4l2_fmtdesc (FILE *fp, int rw __attribute__ ((unused)), const struct v4l2_fmtdesc *t) { fprintf (fp, "index=%ld ", (long) t->index); if (1 == rw) { fprintf (fp, "description=\"%.*s\" " "pixelformat=", 32, (const char *) t->description); fprint_symbol_v4l2_pix_fmt_ (fp, rw, t->pixelformat); fprintf (fp, " flags=0x%lx " "depth=%lu " "reserved[] ", (unsigned long) t->flags, (unsigned long) t->depth); } } static void fprint_symbol_v4l2_transm_std_ (FILE *fp, int rw __attribute__ ((unused)), unsigned long value) { fprint_symbolic (fp, 0, value, "B", (unsigned long) V4L2_TRANSM_STD_B, "D", (unsigned long) V4L2_TRANSM_STD_D, "G", (unsigned long) V4L2_TRANSM_STD_G, "H", (unsigned long) V4L2_TRANSM_STD_H, "I", (unsigned long) V4L2_TRANSM_STD_I, "K", (unsigned long) V4L2_TRANSM_STD_K, "K1", (unsigned long) V4L2_TRANSM_STD_K1, "L", (unsigned long) V4L2_TRANSM_STD_L, "M", (unsigned long) V4L2_TRANSM_STD_M, "N", (unsigned long) V4L2_TRANSM_STD_N, (void *) 0); } static void fprint_struct_v4l2_standard (FILE *fp, int rw __attribute__ ((unused)), const struct v4l2_standard *t) { fprintf (fp, "name=\"%.*s\" ", 24, (const char *) t->name); fprintf (fp, "framerate={numerator=%lu " "denominator=%lu ", (unsigned long) t->framerate.numerator, (unsigned long) t->framerate.denominator); fprintf (fp, "} framelines=%lu " "reserved1 " "colorstandard=", (unsigned long) t->framelines); fprint_symbolic (fp, 0, t->colorstandard, "PAL", (unsigned long) V4L2_COLOR_STD_PAL, "NTSC", (unsigned long) V4L2_COLOR_STD_NTSC, "SECAM", (unsigned long) V4L2_COLOR_STD_SECAM, (void *) 0); fputs (" ", fp); fputs ("colorstandard_data={", fp); if (V4L2_COLOR_STD_PAL == t->colorstandard) { fputs ("pal={", fp); } fprintf (fp, "colorsubcarrier=%lu ", (unsigned long) t->colorstandard_data.pal.colorsubcarrier); if (V4L2_COLOR_STD_PAL == t->colorstandard) { fputs ("} ", fp); } if (V4L2_COLOR_STD_NTSC == t->colorstandard) { fputs ("ntsc={", fp); } fprintf (fp, "colorsubcarrier=%lu ", (unsigned long) t->colorstandard_data.ntsc.colorsubcarrier); if (V4L2_COLOR_STD_NTSC == t->colorstandard) { fputs ("} ", fp); } if (V4L2_COLOR_STD_SECAM == t->colorstandard) { fputs ("secam={", fp); } fprintf (fp, "f0b=%lu " "f0r=%lu ", (unsigned long) t->colorstandard_data.secam.f0b, (unsigned long) t->colorstandard_data.secam.f0r); if (V4L2_COLOR_STD_SECAM == t->colorstandard) { fputs ("} ", fp); } fputs ("reserved[] ", fp); fputs ("} transmission=", fp); fprint_symbol_v4l2_transm_std_ (fp, rw, t->transmission); fputs (" reserved2 ", fp); } static void fprint_symbol_v4l2_tuner_cap_ (FILE *fp, int rw __attribute__ ((unused)), unsigned long value) { fprint_symbolic (fp, 0, value, "LOW", (unsigned long) V4L2_TUNER_CAP_LOW, "NORM", (unsigned long) V4L2_TUNER_CAP_NORM, "STEREO", (unsigned long) V4L2_TUNER_CAP_STEREO, "LANG2", (unsigned long) V4L2_TUNER_CAP_LANG2, "SAP", (unsigned long) V4L2_TUNER_CAP_SAP, "LANG1", (unsigned long) V4L2_TUNER_CAP_LANG1, (void *) 0); } static void fprint_symbol_v4l2_tuner_sub_ (FILE *fp, int rw __attribute__ ((unused)), unsigned long value) { fprint_symbolic (fp, 0, value, "MONO", (unsigned long) V4L2_TUNER_SUB_MONO, "STEREO", (unsigned long) V4L2_TUNER_SUB_STEREO, "LANG2", (unsigned long) V4L2_TUNER_SUB_LANG2, "SAP", (unsigned long) V4L2_TUNER_SUB_SAP, "LANG1", (unsigned long) V4L2_TUNER_SUB_LANG1, (void *) 0); } static void fprint_symbol_v4l2_tuner_mode_ (FILE *fp, int rw __attribute__ ((unused)), unsigned long value) { fprint_symbolic (fp, 0, value, "MONO", (unsigned long) V4L2_TUNER_MODE_MONO, "STEREO", (unsigned long) V4L2_TUNER_MODE_STEREO, "LANG2", (unsigned long) V4L2_TUNER_MODE_LANG2, "SAP", (unsigned long) V4L2_TUNER_MODE_SAP, "LANG1", (unsigned long) V4L2_TUNER_MODE_LANG1, (void *) 0); } static void fprint_struct_v4l2_tuner (FILE *fp, int rw __attribute__ ((unused)), const struct v4l2_tuner *t) { fprintf (fp, "input=%ld ", (long) t->input); if (1 == rw) { fprintf (fp, "name=\"%.*s\" " "std={", 32, (const char *) t->name); fprint_struct_v4l2_standard (fp, rw, &t->std); fputs ("} capability=", fp); fprint_symbol_v4l2_tuner_cap_ (fp, rw, t->capability); fprintf (fp, " rangelow=%lu " "rangehigh=%lu " "rxsubchans=", (unsigned long) t->rangelow, (unsigned long) t->rangehigh); fprint_symbol_v4l2_tuner_sub_ (fp, rw, t->rxsubchans); fputs (" audmode=", fp); fprint_symbol_v4l2_tuner_mode_ (fp, rw, t->audmode); fprintf (fp, " signal=%ld " "afc=%ld " "reserved[] ", (long) t->signal, (long) t->afc); } } static void fprint_symbol_v4l2_type_ (FILE *fp, int rw __attribute__ ((unused)), unsigned long value) { fprint_symbolic (fp, 0, value, "CAPTURE", (unsigned long) V4L2_TYPE_CAPTURE, "CODEC", (unsigned long) V4L2_TYPE_CODEC, "OUTPUT", (unsigned long) V4L2_TYPE_OUTPUT, "FX", (unsigned long) V4L2_TYPE_FX, "VBI", (unsigned long) V4L2_TYPE_VBI, "VTR", (unsigned long) V4L2_TYPE_VTR, "VTX", (unsigned long) V4L2_TYPE_VTX, "RADIO", (unsigned long) V4L2_TYPE_RADIO, "VBI_INPUT", (unsigned long) V4L2_TYPE_VBI_INPUT, "VBI_OUTPUT", (unsigned long) V4L2_TYPE_VBI_OUTPUT, "PRIVATE", (unsigned long) V4L2_TYPE_PRIVATE, (void *) 0); } static void fprint_symbol_v4l2_flag_ (FILE *fp, int rw __attribute__ ((unused)), unsigned long value) { fprint_symbolic (fp, 2, value, "READ", (unsigned long) V4L2_FLAG_READ, "WRITE", (unsigned long) V4L2_FLAG_WRITE, "STREAMING", (unsigned long) V4L2_FLAG_STREAMING, "PREVIEW", (unsigned long) V4L2_FLAG_PREVIEW, "SELECT", (unsigned long) V4L2_FLAG_SELECT, "TUNER", (unsigned long) V4L2_FLAG_TUNER, "MONOCHROME", (unsigned long) V4L2_FLAG_MONOCHROME, "DATA_SERVICE", (unsigned long) V4L2_FLAG_DATA_SERVICE, (void *) 0); } static void fprint_struct_v4l2_capability (FILE *fp, int rw __attribute__ ((unused)), const struct v4l2_capability *t) { fprintf (fp, "name=\"%.*s\" " "type=", 32, (const char *) t->name); fprint_symbol_v4l2_type_ (fp, rw, t->type); fprintf (fp, " inputs=%ld " "outputs=%ld " "audios=%ld " "maxwidth=%ld " "maxheight=%ld " "minwidth=%ld " "minheight=%ld " "maxframerate=%ld " "flags=", (long) t->inputs, (long) t->outputs, (long) t->audios, (long) t->maxwidth, (long) t->maxheight, (long) t->minwidth, (long) t->minheight, (long) t->maxframerate); fprint_symbol_v4l2_flag_ (fp, rw, t->flags); fputs (" reserved[] ", fp); } static void fprint_struct_v4l2_enumstd (FILE *fp, int rw __attribute__ ((unused)), const struct v4l2_enumstd *t) { fprintf (fp, "index=%ld ", (long) t->index); if (1 == rw) { fputs ("std={", fp); fprint_struct_v4l2_standard (fp, rw, &t->std); fprintf (fp, "} inputs=%lu " "outputs=%lu " "reserved[] ", (unsigned long) t->inputs, (unsigned long) t->outputs); } } static void fprint_symbol_v4l2_cid_ (FILE *fp, int rw __attribute__ ((unused)), unsigned long value) { fprint_symbolic (fp, 0, value, "BASE", (unsigned long) V4L2_CID_BASE, "PRIVATE_BASE", (unsigned long) V4L2_CID_PRIVATE_BASE, "EFFECT_BASE", (unsigned long) V4L2_CID_EFFECT_BASE, "BRIGHTNESS", (unsigned long) V4L2_CID_BRIGHTNESS, "CONTRAST", (unsigned long) V4L2_CID_CONTRAST, "SATURATION", (unsigned long) V4L2_CID_SATURATION, "HUE", (unsigned long) V4L2_CID_HUE, "AUDIO_VOLUME", (unsigned long) V4L2_CID_AUDIO_VOLUME, "AUDIO_BALANCE", (unsigned long) V4L2_CID_AUDIO_BALANCE, "AUDIO_BASS", (unsigned long) V4L2_CID_AUDIO_BASS, "AUDIO_TREBLE", (unsigned long) V4L2_CID_AUDIO_TREBLE, "AUDIO_MUTE", (unsigned long) V4L2_CID_AUDIO_MUTE, "AUDIO_LOUDNESS", (unsigned long) V4L2_CID_AUDIO_LOUDNESS, "BLACK_LEVEL", (unsigned long) V4L2_CID_BLACK_LEVEL, "AUTO_WHITE_BALANCE", (unsigned long) V4L2_CID_AUTO_WHITE_BALANCE, "DO_WHITE_BALANCE", (unsigned long) V4L2_CID_DO_WHITE_BALANCE, "RED_BALANCE", (unsigned long) V4L2_CID_RED_BALANCE, "BLUE_BALANCE", (unsigned long) V4L2_CID_BLUE_BALANCE, "GAMMA", (unsigned long) V4L2_CID_GAMMA, "WHITENESS", (unsigned long) V4L2_CID_WHITENESS, "EXPOSURE", (unsigned long) V4L2_CID_EXPOSURE, "AUTOGAIN", (unsigned long) V4L2_CID_AUTOGAIN, "GAIN", (unsigned long) V4L2_CID_GAIN, "HFLIP", (unsigned long) V4L2_CID_HFLIP, "VFLIP", (unsigned long) V4L2_CID_VFLIP, "HCENTER", (unsigned long) V4L2_CID_HCENTER, "VCENTER", (unsigned long) V4L2_CID_VCENTER, "LASTP1", (unsigned long) V4L2_CID_LASTP1, (void *) 0); } static void fprint_symbol_v4l2_ctrl_type_ (FILE *fp, int rw __attribute__ ((unused)), unsigned long value) { fprint_symbolic (fp, 0, value, "INTEGER", (unsigned long) V4L2_CTRL_TYPE_INTEGER, "BOOLEAN", (unsigned long) V4L2_CTRL_TYPE_BOOLEAN, "MENU", (unsigned long) V4L2_CTRL_TYPE_MENU, "BUTTON", (unsigned long) V4L2_CTRL_TYPE_BUTTON, (void *) 0); } static void fprint_struct_v4l2_queryctrl (FILE *fp, int rw __attribute__ ((unused)), const struct v4l2_queryctrl *t) { fputs ("id=", fp); fprint_symbol_v4l2_cid_ (fp, rw, t->id); fputs (" ", fp); if (1 == rw) { fprintf (fp, "name=\"%.*s\" " "minimum=%ld " "maximum=%ld " "step=%lu " "default_value=%ld " "type=", 32, (const char *) t->name, (long) t->minimum, (long) t->maximum, (unsigned long) t->step, (long) t->default_value); fprint_symbol_v4l2_ctrl_type_ (fp, rw, t->type); fputs (" flags=", fp); fprint_symbolic (fp, 2, t->flags, "DISABLED", (unsigned long) V4L2_CTRL_FLAG_DISABLED, "GRABBED", (unsigned long) V4L2_CTRL_FLAG_GRABBED, (void *) 0); fputs (" category=", fp); fprint_symbolic (fp, 0, t->category, "VIDEO", (unsigned long) V4L2_CTRL_CAT_VIDEO, "AUDIO", (unsigned long) V4L2_CTRL_CAT_AUDIO, "EFFECT", (unsigned long) V4L2_CTRL_CAT_EFFECT, (void *) 0); fprintf (fp, " group=\"%.*s\" " "reserved[] ", 32, (const char *) t->group); } } static void fprint_struct_v4l2_modulator (FILE *fp, int rw __attribute__ ((unused)), const struct v4l2_modulator *t) { fprintf (fp, "output=%ld ", (long) t->output); if (1 == rw) { fprintf (fp, "name=\"%.*s\" " "std={", 32, (const char *) t->name); fprint_struct_v4l2_standard (fp, rw, &t->std); fputs ("} capability=", fp); fprint_symbol_v4l2_tuner_cap_ (fp, rw, t->capability); fprintf (fp, " rangelow=%lu " "rangehigh=%lu " "txsubchans=", (unsigned long) t->rangelow, (unsigned long) t->rangehigh); fprint_symbol_v4l2_tuner_sub_ (fp, rw, t->txsubchans); fputs (" reserved[] ", fp); } } static void fprint_struct_v4l2_input (FILE *fp, int rw __attribute__ ((unused)), const struct v4l2_input *t) { fprintf (fp, "index=%ld ", (long) t->index); if (1 == rw) { fprintf (fp, "name=\"%.*s\" " "type=", 32, (const char *) t->name); fprint_symbolic (fp, 0, t->type, "TUNER", (unsigned long) V4L2_INPUT_TYPE_TUNER, "CAMERA", (unsigned long) V4L2_INPUT_TYPE_CAMERA, (void *) 0); fputs (" capability=", fp); fprint_symbolic (fp, 0, t->capability, "AUDIO", (unsigned long) V4L2_INPUT_CAP_AUDIO, (void *) 0); fprintf (fp, " assoc_audio=%ld " "reserved[] ", (long) t->assoc_audio); } } static void fprint_symbol_v4l2_buf_type_ (FILE *fp, int rw __attribute__ ((unused)), unsigned long value) { fprint_symbolic (fp, 0, value, "field", (unsigned long) V4L2_BUF_TYPE_field, "CAPTURE", (unsigned long) V4L2_BUF_TYPE_CAPTURE, "CODECIN", (unsigned long) V4L2_BUF_TYPE_CODECIN, "CODECOUT", (unsigned long) V4L2_BUF_TYPE_CODECOUT, "EFFECTSIN", (unsigned long) V4L2_BUF_TYPE_EFFECTSIN, "EFFECTSIN2", (unsigned long) V4L2_BUF_TYPE_EFFECTSIN2, "EFFECTSOUT", (unsigned long) V4L2_BUF_TYPE_EFFECTSOUT, "VIDEOOUT", (unsigned long) V4L2_BUF_TYPE_VIDEOOUT, "FXCONTROL", (unsigned long) V4L2_BUF_TYPE_FXCONTROL, "VBI", (unsigned long) V4L2_BUF_TYPE_VBI, "PRIVATE", (unsigned long) V4L2_BUF_TYPE_PRIVATE, (void *) 0); } static void fprint_symbol_v4l2_fmt_flag_ (FILE *fp, int rw __attribute__ ((unused)), unsigned long value) { fprint_symbolic (fp, 2, value, "COMPRESSED", (unsigned long) V4L2_FMT_FLAG_COMPRESSED, "BYTESPERLINE", (unsigned long) V4L2_FMT_FLAG_BYTESPERLINE, "NOT_INTERLACED", (unsigned long) V4L2_FMT_FLAG_NOT_INTERLACED, "INTERLACED", (unsigned long) V4L2_FMT_FLAG_INTERLACED, "TOPFIELD", (unsigned long) V4L2_FMT_FLAG_TOPFIELD, "BOTFIELD", (unsigned long) V4L2_FMT_FLAG_BOTFIELD, "ODDFIELD", (unsigned long) V4L2_FMT_FLAG_ODDFIELD, "EVENFIELD", (unsigned long) V4L2_FMT_FLAG_EVENFIELD, "COMBINED", (unsigned long) V4L2_FMT_FLAG_COMBINED, "FIELD_field", (unsigned long) V4L2_FMT_FLAG_FIELD_field, "SWCONVERSION", (unsigned long) V4L2_FMT_FLAG_SWCONVERSION, (void *) 0); } static void fprint_struct_v4l2_pix_format (FILE *fp, int rw __attribute__ ((unused)), const struct v4l2_pix_format *t) { fprintf (fp, "width=%lu " "height=%lu " "depth=%lu " "pixelformat=", (unsigned long) t->width, (unsigned long) t->height, (unsigned long) t->depth); fprint_symbol_v4l2_pix_fmt_ (fp, rw, t->pixelformat); fputs (" flags=", fp); fprint_symbol_v4l2_fmt_flag_ (fp, rw, t->flags); fprintf (fp, " bytesperline=%lu " "sizeimage=%lu " "priv=%lu ", (unsigned long) t->bytesperline, (unsigned long) t->sizeimage, (unsigned long) t->priv); } static void fprint_struct_v4l2_vbi_format (FILE *fp, int rw __attribute__ ((unused)), const struct v4l2_vbi_format *t) { fprintf (fp, "sampling_rate=%lu " "offset=%lu " "samples_per_line=%lu " "sample_format=", (unsigned long) t->sampling_rate, (unsigned long) t->offset, (unsigned long) t->samples_per_line); fprint_symbolic (fp, 0, t->sample_format, "UBYTE", (unsigned long) V4L2_VBI_SF_UBYTE, (void *) 0); fputs (" start[]=? " "count[]=? " "flags=", fp); fprint_symbolic (fp, 2, t->flags, "SF_UBYTE", (unsigned long) V4L2_VBI_SF_UBYTE, "UNSYNC", (unsigned long) V4L2_VBI_UNSYNC, "INTERLACED", (unsigned long) V4L2_VBI_INTERLACED, (void *) 0); fputs (" reserved2 ", fp); } static void fprint_struct_v4l2_format (FILE *fp, int rw __attribute__ ((unused)), const struct v4l2_format *t) { fputs ("type=", fp); fprint_symbol_v4l2_buf_type_ (fp, rw, t->type); fputs (" ", fp); if (1 == rw) { fputs ("fmt={", fp); } if (1 == rw && V4L2_BUF_TYPE_CAPTURE == t->type) { fputs ("pix={", fp); fprint_struct_v4l2_pix_format (fp, rw, &t->fmt.pix); fputs ("} ", fp); } if (1 == rw && V4L2_BUF_TYPE_VBI == t->type) { fputs ("vbi={", fp); fprint_struct_v4l2_vbi_format (fp, rw, &t->fmt.vbi); fputs ("} ", fp); } if (1 == rw) { fputs ("raw_data[]=? ", fp); fputs ("} ", fp); } } static void fprint_symbol_v4l2_buf_flag_ (FILE *fp, int rw __attribute__ ((unused)), unsigned long value) { fprint_symbolic (fp, 2, value, "MAPPED", (unsigned long) V4L2_BUF_FLAG_MAPPED, "QUEUED", (unsigned long) V4L2_BUF_FLAG_QUEUED, "DONE", (unsigned long) V4L2_BUF_FLAG_DONE, "KEYFRAME", (unsigned long) V4L2_BUF_FLAG_KEYFRAME, "PFRAME", (unsigned long) V4L2_BUF_FLAG_PFRAME, "BFRAME", (unsigned long) V4L2_BUF_FLAG_BFRAME, "TOPFIELD", (unsigned long) V4L2_BUF_FLAG_TOPFIELD, "BOTFIELD", (unsigned long) V4L2_BUF_FLAG_BOTFIELD, "ODDFIELD", (unsigned long) V4L2_BUF_FLAG_ODDFIELD, "EVENFIELD", (unsigned long) V4L2_BUF_FLAG_EVENFIELD, "TIMECODE", (unsigned long) V4L2_BUF_FLAG_TIMECODE, (void *) 0); } static void fprint_symbol_v4l2_tc_type_ (FILE *fp, int rw __attribute__ ((unused)), unsigned long value) { fprint_symbolic (fp, 0, value, "24FPS", (unsigned long) V4L2_TC_TYPE_24FPS, "25FPS", (unsigned long) V4L2_TC_TYPE_25FPS, "30FPS", (unsigned long) V4L2_TC_TYPE_30FPS, "50FPS", (unsigned long) V4L2_TC_TYPE_50FPS, "60FPS", (unsigned long) V4L2_TC_TYPE_60FPS, (void *) 0); } static void fprint_struct_v4l2_timecode (FILE *fp, int rw __attribute__ ((unused)), const struct v4l2_timecode *t) { fprintf (fp, "frames=%lu " "seconds=%lu " "minutes=%lu " "hours=%lu " "userbits[]=? " "flags=", (unsigned long) t->frames, (unsigned long) t->seconds, (unsigned long) t->minutes, (unsigned long) t->hours); fprint_symbolic (fp, 2, t->flags, "DROPFRAME", (unsigned long) V4L2_TC_FLAG_DROPFRAME, "COLORFRAME", (unsigned long) V4L2_TC_FLAG_COLORFRAME, (void *) 0); fputs (" type=", fp); fprint_symbol_v4l2_tc_type_ (fp, rw, t->type); fputs (" ", fp); } static void fprint_struct_v4l2_buffer (FILE *fp, int rw __attribute__ ((unused)), const struct v4l2_buffer *t) { fprintf (fp, "index=%ld " "type=", (long) t->index); fprint_symbol_v4l2_buf_type_ (fp, rw, t->type); fputs (" ", fp); if (1 == rw) { fprintf (fp, "offset=%lu " "length=%lu " "bytesused=%lu " "flags=", (unsigned long) t->offset, (unsigned long) t->length, (unsigned long) t->bytesused); fprint_symbol_v4l2_buf_flag_ (fp, rw, t->flags); fprintf (fp, " timestamp=%ld " "timecode={", (long) t->timestamp); fprint_struct_v4l2_timecode (fp, rw, &t->timecode); fprintf (fp, "} sequence=%lu " "reserved[] ", (unsigned long) t->sequence); } } static void fprint_struct_v4l2_cvtdesc (FILE *fp, int rw __attribute__ ((unused)), const struct v4l2_cvtdesc *t) { fprintf (fp, "index=%ld ", (long) t->index); if (1 == rw) { fprintf (fp, "in={pixelformat=%lu " "flags=0x%lx " "depth=%lu " "reserved[] ", (unsigned long) t->in.pixelformat, (unsigned long) t->in.flags, (unsigned long) t->in.depth); fputs ("} ", fp); fprintf (fp, "out={pixelformat=%lu " "flags=0x%lx " "depth=%lu " "reserved[] ", (unsigned long) t->out.pixelformat, (unsigned long) t->out.flags, (unsigned long) t->out.depth); fputs ("} ", fp); } } static void fprint_struct_v4l2_control (FILE *fp, int rw __attribute__ ((unused)), const struct v4l2_control *t) { fputs ("id=", fp); fprint_symbol_v4l2_cid_ (fp, rw, t->id); fprintf (fp, " value=%ld ", (long) t->value); } static void fprint_struct_v4l2_captureparm (FILE *fp, int rw __attribute__ ((unused)), const struct v4l2_captureparm *t) { fputs ("capability=", fp); fprint_symbolic (fp, 0, t->capability, "TIMEPERFRAME", (unsigned long) V4L2_CAP_TIMEPERFRAME, (void *) 0); fputs (" capturemode=", fp); fprint_symbolic (fp, 0, t->capturemode, "HIGHQUALITY", (unsigned long) V4L2_MODE_HIGHQUALITY, (void *) 0); fprintf (fp, " timeperframe=%lu " "extendedmode=%lu " "reserved[] ", (unsigned long) t->timeperframe, (unsigned long) t->extendedmode); } static void fprint_struct_v4l2_outputparm (FILE *fp, int rw __attribute__ ((unused)), const struct v4l2_outputparm *t) { fprintf (fp, "capability=%lu " "outputmode=%lu " "timeperframe=%lu " "extendedmode=%lu " "reserved[] ", (unsigned long) t->capability, (unsigned long) t->outputmode, (unsigned long) t->timeperframe, (unsigned long) t->extendedmode); } static void fprint_struct_v4l2_streamparm (FILE *fp, int rw __attribute__ ((unused)), const struct v4l2_streamparm *t) { fputs ("type=", fp); fprint_symbol_v4l2_buf_type_ (fp, rw, t->type); fputs (" ", fp); if (1 == rw) { fputs ("parm={", fp); } if (1 == rw && V4L2_BUF_TYPE_CAPTURE == t->type) { fputs ("capture={", fp); fprint_struct_v4l2_captureparm (fp, rw, &t->parm.capture); fputs ("} ", fp); } if (1 == rw && V4L2_BUF_TYPE_VIDEOOUT == t->type) { fputs ("output={", fp); fprint_struct_v4l2_outputparm (fp, rw, &t->parm.output); fputs ("} ", fp); } if (1 == rw) { fputs ("raw_data[]=? ", fp); fputs ("} ", fp); } } static void fprint_struct_v4l2_fxdesc (FILE *fp, int rw __attribute__ ((unused)), const struct v4l2_fxdesc *t) { fprintf (fp, "index=%ld ", (long) t->index); if (1 == rw) { fprintf (fp, "name=\"%.*s\" " "flags=0x%lx " "inputs=%lu " "controls=%lu " "reserved[] ", 32, (const char *) t->name, (unsigned long) t->flags, (unsigned long) t->inputs, (unsigned long) t->controls); } } static void fprint_struct_v4l2_querymenu (FILE *fp, int rw __attribute__ ((unused)), const struct v4l2_querymenu *t) { fputs ("id=", fp); fprint_symbol_v4l2_cid_ (fp, rw, t->id); fprintf (fp, " index=%ld ", (long) t->index); if (1 == rw) { fprintf (fp, "name=\"%.*s\" " "reserved ", 32, (const char *) t->name); } } static void fprint_struct_v4l2_audioout (FILE *fp, int rw __attribute__ ((unused)), const struct v4l2_audioout *t) { fprintf (fp, "audio=%ld ", (long) t->audio); if (1 == rw) { fprintf (fp, "name=\"%.*s\" " "capability=%lu " "mode=%lu " "reserved[] ", 32, (const char *) t->name, (unsigned long) t->capability, (unsigned long) t->mode); } } static void fprint_struct_v4l2_requestbuffers (FILE *fp, int rw __attribute__ ((unused)), const struct v4l2_requestbuffers *t) { fprintf (fp, "count=%ld " "type=", (long) t->count); fprint_symbol_v4l2_buf_type_ (fp, rw, t->type); fputs (" reserved[] ", fp); } static void fprint_symbol_v4l2_audmode_ (FILE *fp, int rw __attribute__ ((unused)), unsigned long value) { fprint_symbolic (fp, 0, value, "LOUDNESS", (unsigned long) V4L2_AUDMODE_LOUDNESS, "AVL", (unsigned long) V4L2_AUDMODE_AVL, "STEREO_field", (unsigned long) V4L2_AUDMODE_STEREO_field, "STEREO_LINEAR", (unsigned long) V4L2_AUDMODE_STEREO_LINEAR, "STEREO_PSEUDO", (unsigned long) V4L2_AUDMODE_STEREO_PSEUDO, "STEREO_SPATIAL30", (unsigned long) V4L2_AUDMODE_STEREO_SPATIAL30, "STEREO_SPATIAL50", (unsigned long) V4L2_AUDMODE_STEREO_SPATIAL50, (void *) 0); } static void fprint_struct_v4l2_audio (FILE *fp, int rw __attribute__ ((unused)), const struct v4l2_audio *t) { fprintf (fp, "audio=%ld ", (long) t->audio); if (1 == rw) { fprintf (fp, "name=\"%.*s\" " "capability=", 32, (const char *) t->name); fprint_symbolic (fp, 0, t->capability, "EFFECTS", (unsigned long) V4L2_AUDCAP_EFFECTS, "LOUDNESS", (unsigned long) V4L2_AUDCAP_LOUDNESS, "AVL", (unsigned long) V4L2_AUDCAP_AVL, (void *) 0); fputs (" mode=", fp); fprint_symbol_v4l2_audmode_ (fp, rw, t->mode); fputs (" reserved[] ", fp); } } static void fprint_struct_v4l2_output (FILE *fp, int rw __attribute__ ((unused)), const struct v4l2_output *t) { fprintf (fp, "index=%ld ", (long) t->index); if (1 == rw) { fprintf (fp, "name=\"%.*s\" " "type=", 32, (const char *) t->name); fprint_symbolic (fp, 0, t->type, "MODULATOR", (unsigned long) V4L2_OUTPUT_TYPE_MODULATOR, "ANALOG", (unsigned long) V4L2_OUTPUT_TYPE_ANALOG, "ANALOGVGAOVERLAY", (unsigned long) V4L2_OUTPUT_TYPE_ANALOGVGAOVERLAY, (void *) 0); fputs (" capability=", fp); fprint_symbolic (fp, 0, t->capability, "AUDIO", (unsigned long) V4L2_OUTPUT_CAP_AUDIO, (void *) 0); fprintf (fp, " assoc_audio=%ld " "reserved[] ", (long) t->assoc_audio); } } static void fprint_struct_v4l2_window (FILE *fp, int rw __attribute__ ((unused)), const struct v4l2_window *t) { fprintf (fp, "x=%ld " "y=%ld " "width=%ld " "height=%ld " "chromakey=%lu " "clips=%p " "clipcount=%ld " "bitmap=%p ", (long) t->x, (long) t->y, (long) t->width, (long) t->height, (unsigned long) t->chromakey, (const void *) t->clips, (long) t->clipcount, (const void *) t->bitmap); } static void fprint_symbol_v4l2_fbuf_cap_ (FILE *fp, int rw __attribute__ ((unused)), unsigned long value) { fprint_symbolic (fp, 0, value, "EXTERNOVERLAY", (unsigned long) V4L2_FBUF_CAP_EXTERNOVERLAY, "CHROMAKEY", (unsigned long) V4L2_FBUF_CAP_CHROMAKEY, "CLIPPING", (unsigned long) V4L2_FBUF_CAP_CLIPPING, "SCALEUP", (unsigned long) V4L2_FBUF_CAP_SCALEUP, "SCALEDOWN", (unsigned long) V4L2_FBUF_CAP_SCALEDOWN, "BITMAP_CLIPPING", (unsigned long) V4L2_FBUF_CAP_BITMAP_CLIPPING, (void *) 0); } static void fprint_struct_v4l2_framebuffer (FILE *fp, int rw __attribute__ ((unused)), const struct v4l2_framebuffer *t) { fputs ("capability=", fp); fprint_symbol_v4l2_fbuf_cap_ (fp, rw, t->capability); fputs (" flags=", fp); fprint_symbolic (fp, 2, t->flags, "PRIMARY", (unsigned long) V4L2_FBUF_FLAG_PRIMARY, "OVERLAY", (unsigned long) V4L2_FBUF_FLAG_OVERLAY, "CHROMAKEY", (unsigned long) V4L2_FBUF_FLAG_CHROMAKEY, (void *) 0); fputs (" base[]=? " "fmt={", fp); fprint_struct_v4l2_pix_format (fp, rw, &t->fmt); fputs ("} ", fp); } static void fprint_v4l2_ioctl_arg (FILE *fp, unsigned int cmd, int rw, void *arg) { switch (cmd) { case VIDIOC_G_PERF: if (!arg) { fputs ("VIDIOC_G_PERF", fp); return; } fprint_struct_v4l2_performance (fp, rw, arg); break; case VIDIOC_PREVIEW: if (!arg) { fputs ("VIDIOC_PREVIEW", fp); return; } case VIDIOC_STREAMON: if (!arg) { fputs ("VIDIOC_STREAMON", fp); return; } case VIDIOC_STREAMOFF: if (!arg) { fputs ("VIDIOC_STREAMOFF", fp); return; } case VIDIOC_G_FREQ: if (!arg) { fputs ("VIDIOC_G_FREQ", fp); return; } case VIDIOC_S_FREQ: if (!arg) { fputs ("VIDIOC_S_FREQ", fp); return; } case VIDIOC_G_INPUT: if (!arg) { fputs ("VIDIOC_G_INPUT", fp); return; } case VIDIOC_S_INPUT: if (!arg) { fputs ("VIDIOC_S_INPUT", fp); return; } case VIDIOC_G_OUTPUT: if (!arg) { fputs ("VIDIOC_G_OUTPUT", fp); return; } case VIDIOC_S_OUTPUT: if (!arg) { fputs ("VIDIOC_S_OUTPUT", fp); return; } case VIDIOC_G_EFFECT: if (!arg) { fputs ("VIDIOC_G_EFFECT", fp); return; } case VIDIOC_S_EFFECT: if (!arg) { fputs ("VIDIOC_S_EFFECT", fp); return; } fprintf (fp, "%ld", (long) * (int *) arg); break; case VIDIOC_G_COMP: if (!arg) { fputs ("VIDIOC_G_COMP", fp); return; } case VIDIOC_S_COMP: if (!arg) { fputs ("VIDIOC_S_COMP", fp); return; } fprint_struct_v4l2_compression (fp, rw, arg); break; case VIDIOC_ENUM_PIXFMT: if (!arg) { fputs ("VIDIOC_ENUM_PIXFMT", fp); return; } case VIDIOC_ENUM_FBUFFMT: if (!arg) { fputs ("VIDIOC_ENUM_FBUFFMT", fp); return; } fprint_struct_v4l2_fmtdesc (fp, rw, arg); break; case VIDIOC_G_TUNER: if (!arg) { fputs ("VIDIOC_G_TUNER", fp); return; } case VIDIOC_S_TUNER: if (!arg) { fputs ("VIDIOC_S_TUNER", fp); return; } fprint_struct_v4l2_tuner (fp, rw, arg); break; case VIDIOC_QUERYCAP: if (!arg) { fputs ("VIDIOC_QUERYCAP", fp); return; } fprint_struct_v4l2_capability (fp, rw, arg); break; case VIDIOC_ENUMSTD: if (!arg) { fputs ("VIDIOC_ENUMSTD", fp); return; } fprint_struct_v4l2_enumstd (fp, rw, arg); break; case VIDIOC_QUERYCTRL: if (!arg) { fputs ("VIDIOC_QUERYCTRL", fp); return; } fprint_struct_v4l2_queryctrl (fp, rw, arg); break; case VIDIOC_G_MODULATOR: if (!arg) { fputs ("VIDIOC_G_MODULATOR", fp); return; } case VIDIOC_S_MODULATOR: if (!arg) { fputs ("VIDIOC_S_MODULATOR", fp); return; } fprint_struct_v4l2_modulator (fp, rw, arg); break; case VIDIOC_ENUMINPUT: if (!arg) { fputs ("VIDIOC_ENUMINPUT", fp); return; } fprint_struct_v4l2_input (fp, rw, arg); break; case VIDIOC_G_FMT: if (!arg) { fputs ("VIDIOC_G_FMT", fp); return; } case VIDIOC_S_FMT: if (!arg) { fputs ("VIDIOC_S_FMT", fp); return; } fprint_struct_v4l2_format (fp, rw, arg); break; case VIDIOC_QUERYBUF: if (!arg) { fputs ("VIDIOC_QUERYBUF", fp); return; } case VIDIOC_QBUF: if (!arg) { fputs ("VIDIOC_QBUF", fp); return; } case VIDIOC_DQBUF: if (!arg) { fputs ("VIDIOC_DQBUF", fp); return; } fprint_struct_v4l2_buffer (fp, rw, arg); break; case VIDIOC_ENUMCVT: if (!arg) { fputs ("VIDIOC_ENUMCVT", fp); return; } fprint_struct_v4l2_cvtdesc (fp, rw, arg); break; case VIDIOC_G_CTRL: if (!arg) { fputs ("VIDIOC_G_CTRL", fp); return; } case VIDIOC_S_CTRL: if (!arg) { fputs ("VIDIOC_S_CTRL", fp); return; } fprint_struct_v4l2_control (fp, rw, arg); break; case VIDIOC_G_PARM: if (!arg) { fputs ("VIDIOC_G_PARM", fp); return; } case VIDIOC_S_PARM: if (!arg) { fputs ("VIDIOC_S_PARM", fp); return; } fprint_struct_v4l2_streamparm (fp, rw, arg); break; case VIDIOC_ENUMFX: if (!arg) { fputs ("VIDIOC_ENUMFX", fp); return; } fprint_struct_v4l2_fxdesc (fp, rw, arg); break; case VIDIOC_QUERYMENU: if (!arg) { fputs ("VIDIOC_QUERYMENU", fp); return; } fprint_struct_v4l2_querymenu (fp, rw, arg); break; case VIDIOC_G_AUDOUT: if (!arg) { fputs ("VIDIOC_G_AUDOUT", fp); return; } case VIDIOC_S_AUDOUT: if (!arg) { fputs ("VIDIOC_S_AUDOUT", fp); return; } fprint_struct_v4l2_audioout (fp, rw, arg); break; case VIDIOC_REQBUFS: if (!arg) { fputs ("VIDIOC_REQBUFS", fp); return; } fprint_struct_v4l2_requestbuffers (fp, rw, arg); break; case VIDIOC_G_AUDIO: if (!arg) { fputs ("VIDIOC_G_AUDIO", fp); return; } case VIDIOC_S_AUDIO: if (!arg) { fputs ("VIDIOC_S_AUDIO", fp); return; } fprint_struct_v4l2_audio (fp, rw, arg); break; case VIDIOC_ENUMOUTPUT: if (!arg) { fputs ("VIDIOC_ENUMOUTPUT", fp); return; } fprint_struct_v4l2_output (fp, rw, arg); break; case VIDIOC_G_WIN: if (!arg) { fputs ("VIDIOC_G_WIN", fp); return; } case VIDIOC_S_WIN: if (!arg) { fputs ("VIDIOC_S_WIN", fp); return; } fprint_struct_v4l2_window (fp, rw, arg); break; case VIDIOC_G_FBUF: if (!arg) { fputs ("VIDIOC_G_FBUF", fp); return; } case VIDIOC_S_FBUF: if (!arg) { fputs ("VIDIOC_S_FBUF", fp); return; } fprint_struct_v4l2_framebuffer (fp, rw, arg); break; case VIDIOC_G_STD: if (!arg) { fputs ("VIDIOC_G_STD", fp); return; } case VIDIOC_S_STD: if (!arg) { fputs ("VIDIOC_S_STD", fp); return; } fprint_struct_v4l2_standard (fp, rw, arg); break; default: if (!arg) { fprint_unknown_ioctl (fp, cmd, arg); return; } break; } } static __inline__ void IOCTL_ARG_TYPE_CHECK_VIDIOC_QUERYCAP (struct v4l2_capability *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_VIDIOC_ENUM_PIXFMT (struct v4l2_fmtdesc *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_VIDIOC_ENUM_FBUFFMT (struct v4l2_fmtdesc *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_VIDIOC_G_FMT (struct v4l2_format *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_VIDIOC_S_FMT (struct v4l2_format *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_VIDIOC_G_COMP (struct v4l2_compression *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_VIDIOC_S_COMP (const struct v4l2_compression *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_VIDIOC_REQBUFS (struct v4l2_requestbuffers *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_VIDIOC_QUERYBUF (struct v4l2_buffer *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_VIDIOC_G_FBUF (struct v4l2_framebuffer *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_VIDIOC_S_FBUF (const struct v4l2_framebuffer *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_VIDIOC_G_WIN (struct v4l2_window *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_VIDIOC_S_WIN (const struct v4l2_window *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_VIDIOC_PREVIEW (int *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_VIDIOC_QBUF (struct v4l2_buffer *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_VIDIOC_DQBUF (struct v4l2_buffer *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_VIDIOC_STREAMON (const int *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_VIDIOC_STREAMOFF (const int *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_VIDIOC_G_PERF (struct v4l2_performance *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_VIDIOC_G_PARM (struct v4l2_streamparm *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_VIDIOC_S_PARM (const struct v4l2_streamparm *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_VIDIOC_G_STD (struct v4l2_standard *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_VIDIOC_S_STD (const struct v4l2_standard *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_VIDIOC_ENUMSTD (struct v4l2_enumstd *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_VIDIOC_ENUMINPUT (struct v4l2_input *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_VIDIOC_G_CTRL (struct v4l2_control *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_VIDIOC_S_CTRL (const struct v4l2_control *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_VIDIOC_G_TUNER (struct v4l2_tuner *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_VIDIOC_S_TUNER (const struct v4l2_tuner *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_VIDIOC_G_FREQ (int *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_VIDIOC_S_FREQ (int *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_VIDIOC_G_AUDIO (struct v4l2_audio *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_VIDIOC_S_AUDIO (const struct v4l2_audio *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_VIDIOC_QUERYCTRL (struct v4l2_queryctrl *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_VIDIOC_QUERYMENU (struct v4l2_querymenu *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_VIDIOC_G_INPUT (int *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_VIDIOC_S_INPUT (int *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_VIDIOC_ENUMCVT (struct v4l2_cvtdesc *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_VIDIOC_G_OUTPUT (int *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_VIDIOC_S_OUTPUT (int *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_VIDIOC_ENUMOUTPUT (struct v4l2_output *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_VIDIOC_G_AUDOUT (struct v4l2_audioout *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_VIDIOC_S_AUDOUT (const struct v4l2_audioout *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_VIDIOC_ENUMFX (struct v4l2_fxdesc *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_VIDIOC_G_EFFECT (int *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_VIDIOC_S_EFFECT (int *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_VIDIOC_G_MODULATOR (struct v4l2_modulator *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_VIDIOC_S_MODULATOR (const struct v4l2_modulator *arg __attribute__ ((unused))) {} zapping-0.10cvs6/common/_pwc-ioctl.h 644 764 144 21534 10427306000 12523 /* Generated file, do not edit! */ #include #include "common/device.h" #ifndef __GNUC__ #undef __attribute__ #define __attribute__(x) #endif static void fprint_symbol_pwc_wb_ (FILE *fp, int rw __attribute__ ((unused)), unsigned long value) { fprint_symbolic (fp, 0, value, "INDOOR", (unsigned long) PWC_WB_INDOOR, "OUTDOOR", (unsigned long) PWC_WB_OUTDOOR, "FL", (unsigned long) PWC_WB_FL, "MANUAL", (unsigned long) PWC_WB_MANUAL, "AUTO", (unsigned long) PWC_WB_AUTO, (void *) 0); } static void fprint_struct_pwc_whitebalance (FILE *fp, int rw __attribute__ ((unused)), const struct pwc_whitebalance *t) { fputs ("mode=", fp); fprint_symbol_pwc_wb_ (fp, rw, t->mode); fprintf (fp, " manual_red=%ld " "manual_blue=%ld " "read_red=%ld " "read_blue=%ld ", (long) t->manual_red, (long) t->manual_blue, (long) t->read_red, (long) t->read_blue); } static void fprint_struct_pwc_mpt_status (FILE *fp, int rw __attribute__ ((unused)), const struct pwc_mpt_status *t) { fprintf (fp, "status=%ld " "time_pan=%ld " "time_tilt=%ld ", (long) t->status, (long) t->time_pan, (long) t->time_tilt); } static void fprint_struct_pwc_leds (FILE *fp, int rw __attribute__ ((unused)), const struct pwc_leds *t) { fprintf (fp, "led_on=%ld " "led_off=%ld ", (long) t->led_on, (long) t->led_off); } static void fprint_struct_pwc_mpt_angles (FILE *fp, int rw __attribute__ ((unused)), const struct pwc_mpt_angles *t) { fprintf (fp, "absolute=%ld " "pan=%ld " "tilt=%ld ", (long) t->absolute, (long) t->pan, (long) t->tilt); } static void fprint_struct_pwc_mpt_range (FILE *fp, int rw __attribute__ ((unused)), const struct pwc_mpt_range *t) { fprintf (fp, "pan_min=%ld " "pan_max=%ld " "tilt_min=%ld " "tilt_max=%ld ", (long) t->pan_min, (long) t->pan_max, (long) t->tilt_min, (long) t->tilt_max); } static void fprint_struct_pwc_wb_speed (FILE *fp, int rw __attribute__ ((unused)), const struct pwc_wb_speed *t) { fprintf (fp, "control_speed=%ld " "control_delay=%ld ", (long) t->control_speed, (long) t->control_delay); } static void fprint_struct_pwc_serial (FILE *fp, int rw __attribute__ ((unused)), const struct pwc_serial *t) { fprintf (fp, "serial=\"%.*s\" ", 30, (const char *) t->serial); } static void fprint_struct_pwc_imagesize (FILE *fp, int rw __attribute__ ((unused)), const struct pwc_imagesize *t) { fprintf (fp, "width=%ld " "height=%ld ", (long) t->width, (long) t->height); } static void fprint_struct_pwc_video_command (FILE *fp, int rw __attribute__ ((unused)), const struct pwc_video_command *t) { fprintf (fp, "type=%ld " "release=%ld " "size=%ld " "alternate=%ld " "command_len=%ld " "command_buf[]=? " "bandlength=%ld " "frame_size=%ld ", (long) t->type, (long) t->release, (long) t->size, (long) t->alternate, (long) t->command_len, (long) t->bandlength, (long) t->frame_size); } static void fprint_struct_pwc_probe (FILE *fp, int rw __attribute__ ((unused)), const struct pwc_probe *t) { fprintf (fp, "name=\"%.*s\" " "type=%ld ", 32, (const char *) t->name, (long) t->type); } static void fprint_pwc_ioctl_arg (FILE *fp, unsigned int cmd, int rw, void *arg) { switch (cmd) { case VIDIOCPWCSAWB: if (!arg) { fputs ("VIDIOCPWCSAWB", fp); return; } case VIDIOCPWCGAWB: if (!arg) { fputs ("VIDIOCPWCGAWB", fp); return; } fprint_struct_pwc_whitebalance (fp, rw, arg); break; case VIDIOCPWCMPTSTATUS: if (!arg) { fputs ("VIDIOCPWCMPTSTATUS", fp); return; } fprint_struct_pwc_mpt_status (fp, rw, arg); break; case VIDIOCPWCSCQUAL: if (!arg) { fputs ("VIDIOCPWCSCQUAL", fp); return; } case VIDIOCPWCGCQUAL: if (!arg) { fputs ("VIDIOCPWCGCQUAL", fp); return; } case VIDIOCPWCSAGC: if (!arg) { fputs ("VIDIOCPWCSAGC", fp); return; } case VIDIOCPWCGAGC: if (!arg) { fputs ("VIDIOCPWCGAGC", fp); return; } case VIDIOCPWCSSHUTTER: if (!arg) { fputs ("VIDIOCPWCSSHUTTER", fp); return; } case VIDIOCPWCSCONTOUR: if (!arg) { fputs ("VIDIOCPWCSCONTOUR", fp); return; } case VIDIOCPWCGCONTOUR: if (!arg) { fputs ("VIDIOCPWCGCONTOUR", fp); return; } case VIDIOCPWCSBACKLIGHT: if (!arg) { fputs ("VIDIOCPWCSBACKLIGHT", fp); return; } case VIDIOCPWCGBACKLIGHT: if (!arg) { fputs ("VIDIOCPWCGBACKLIGHT", fp); return; } case VIDIOCPWCSFLICKER: if (!arg) { fputs ("VIDIOCPWCSFLICKER", fp); return; } case VIDIOCPWCGFLICKER: if (!arg) { fputs ("VIDIOCPWCGFLICKER", fp); return; } case VIDIOCPWCSDYNNOISE: if (!arg) { fputs ("VIDIOCPWCSDYNNOISE", fp); return; } case VIDIOCPWCGDYNNOISE: if (!arg) { fputs ("VIDIOCPWCGDYNNOISE", fp); return; } case VIDIOCPWCMPTRESET: if (!arg) { fputs ("VIDIOCPWCMPTRESET", fp); return; } fprintf (fp, "%ld", (long) * (int *) arg); break; case VIDIOCPWCSLED: if (!arg) { fputs ("VIDIOCPWCSLED", fp); return; } case VIDIOCPWCGLED: if (!arg) { fputs ("VIDIOCPWCGLED", fp); return; } fprint_struct_pwc_leds (fp, rw, arg); break; case VIDIOCPWCMPTSANGLE: if (!arg) { fputs ("VIDIOCPWCMPTSANGLE", fp); return; } case VIDIOCPWCMPTGANGLE: if (!arg) { fputs ("VIDIOCPWCMPTGANGLE", fp); return; } fprint_struct_pwc_mpt_angles (fp, rw, arg); break; case VIDIOCPWCMPTGRANGE: if (!arg) { fputs ("VIDIOCPWCMPTGRANGE", fp); return; } fprint_struct_pwc_mpt_range (fp, rw, arg); break; case VIDIOCPWCSAWBSPEED: if (!arg) { fputs ("VIDIOCPWCSAWBSPEED", fp); return; } case VIDIOCPWCGAWBSPEED: if (!arg) { fputs ("VIDIOCPWCGAWBSPEED", fp); return; } fprint_struct_pwc_wb_speed (fp, rw, arg); break; case VIDIOCPWCGSERIAL: if (!arg) { fputs ("VIDIOCPWCGSERIAL", fp); return; } fprint_struct_pwc_serial (fp, rw, arg); break; case VIDIOCPWCGREALSIZE: if (!arg) { fputs ("VIDIOCPWCGREALSIZE", fp); return; } fprint_struct_pwc_imagesize (fp, rw, arg); break; case VIDIOCPWCGVIDCMD: if (!arg) { fputs ("VIDIOCPWCGVIDCMD", fp); return; } fprint_struct_pwc_video_command (fp, rw, arg); break; case VIDIOCPWCPROBE: if (!arg) { fputs ("VIDIOCPWCPROBE", fp); return; } fprint_struct_pwc_probe (fp, rw, arg); break; default: if (!arg) { fprint_unknown_ioctl (fp, cmd, arg); return; } break; } } static __inline__ void IOCTL_ARG_TYPE_CHECK_VIDIOCPWCSCQUAL (const int *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_VIDIOCPWCGCQUAL (int *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_VIDIOCPWCGSERIAL (struct pwc_serial *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_VIDIOCPWCPROBE (struct pwc_probe *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_VIDIOCPWCSAGC (const int *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_VIDIOCPWCGAGC (int *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_VIDIOCPWCSSHUTTER (const int *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_VIDIOCPWCSAWB (const struct pwc_whitebalance *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_VIDIOCPWCGAWB (struct pwc_whitebalance *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_VIDIOCPWCSAWBSPEED (const struct pwc_wb_speed *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_VIDIOCPWCGAWBSPEED (struct pwc_wb_speed *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_VIDIOCPWCSLED (const struct pwc_leds *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_VIDIOCPWCGLED (struct pwc_leds *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_VIDIOCPWCSCONTOUR (const int *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_VIDIOCPWCGCONTOUR (int *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_VIDIOCPWCSBACKLIGHT (const int *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_VIDIOCPWCGBACKLIGHT (int *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_VIDIOCPWCSFLICKER (const int *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_VIDIOCPWCGFLICKER (int *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_VIDIOCPWCSDYNNOISE (const int *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_VIDIOCPWCGDYNNOISE (int *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_VIDIOCPWCGREALSIZE (struct pwc_imagesize *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_VIDIOCPWCMPTRESET (const int *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_VIDIOCPWCMPTGRANGE (struct pwc_mpt_range *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_VIDIOCPWCMPTSANGLE (const struct pwc_mpt_angles *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_VIDIOCPWCMPTGANGLE (struct pwc_mpt_angles *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_VIDIOCPWCMPTSTATUS (struct pwc_mpt_status *arg __attribute__ ((unused))) {} static __inline__ void IOCTL_ARG_TYPE_CHECK_VIDIOCPWCGVIDCMD (struct pwc_video_command *arg __attribute__ ((unused))) {} zapping-0.10cvs6/common/types.h 644 764 144 3206 10167772033 11621 /* * Copyright (C) 1999-2000 Michael H. Schimek * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* $Id: types.h,v 1.8 2005/01/08 14:54:19 mschimek Exp $ */ #ifndef TYPES_H #define TYPES_H #include #include #undef TRUE #define TRUE 1 #undef FALSE #define FALSE 0 typedef unsigned char z_bool; /* * Get a pointer to a structure of from * a to one of its . */ #undef PARENT #define PARENT(_ptr, _type, _member) \ ({ char *_p = (char *)(_ptr); (_p != 0) ? \ (_type *)(_p - offsetof (_type, _member)) : (_type *) 0; }) /* * Same as libc assert, but also reports the caller. */ #ifdef NDEBUG # define asserts(expr) ((void) 0) #else extern void asserts_fail(const char *assertion, const char *file, unsigned int line, const char *function, void *caller); #define asserts(expr) \ ((void)((expr) ? 0 : asserts_fail(#expr, __FILE__, __LINE__, \ __PRETTY_FUNCTION__, __builtin_return_address(0)))) #endif #endif /* TYPES_H */ zapping-0.10cvs6/common/alloc.c 644 764 144 2326 10167772033 11544 /* * Copyright (C) 1999-2001 Michael H. Schimek * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* $Id: alloc.c,v 1.5 2005/01/08 14:54:19 mschimek Exp $ */ #include #include "alloc.h" #ifndef HAVE_MEMALIGN void * alloc_aligned(size_t size, unsigned int align, z_bool clear) { void *p, *b; if (align < sizeof(void *)) align = sizeof(void *); if (!(b = malloc(size + align))) return NULL; p = (void *)(((long)((char *) b + align)) & -align); ((void **) p)[-1] = b; if (clear) memset(p, 0, size); return p; } #endif /* !HAVE_MEMALIGN */ zapping-0.10cvs6/common/alloc.h 644 764 144 3332 10167772033 11547 /* * Copyright (C) 1999-2000 Michael H. Schimek * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* $Id: alloc.h,v 1.5 2005/01/08 14:54:19 mschimek Exp $ */ #ifndef ALLOC_H #define ALLOC_H #include /*#include deprecated? */ #include "types.h" #ifdef HAVE_MEMALIGN #define free_aligned(p) free(p) #else #define free_aligned(p) free(((void **) p)[-1]) #endif extern void *alloc_aligned(size_t, unsigned int, z_bool); static inline void * malloc_aligned(size_t size, unsigned int align) { void *p; #ifdef HAVE_MEMALIGN p = (void *) memalign(align, size); #else p = alloc_aligned(size, align, FALSE); /* if ((p = malloc(size + align))) (char *) p += align - ((int) p & (align - 1)); */ #endif return p; } static inline void * calloc_aligned(size_t size, unsigned int align) { void *p; #ifdef HAVE_MEMALIGN if ((p = (void *) memalign(align, size))) memset(p, 0, size); #else p = alloc_aligned(size, align, TRUE); /* if ((p = calloc(1, size + align))) (char *) p += align - ((int) p & (align - 1)); */ #endif return p; } #endif /* ALLOC_H */ zapping-0.10cvs6/common/device.c 644 764 144 16453 10431632422 11726 /* * Zapping (TV viewer for the Gnome Desktop) * * Copyright (C) 2003 Michael H. Schimek * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* $Id: device.c,v 1.11 2006/05/14 13:48:02 mschimek Exp $ */ #include #include #include #include /* LONG_MAX */ #include #include #include /* open() */ #include /* close(), mmap(), munmap() */ #include /* ioctl() */ #include /* mmap(), munmap() */ #include #ifndef PRId64 # define PRId64 "lld" #endif #ifndef PRIu64 # define PRIu64 "llu" #endif #ifndef PRIx64 # define PRIx64 "llx" #endif #include "device.h" void fprint_symbolic (FILE * fp, int mode, unsigned long value, ...) { unsigned int i, j = 0; unsigned long v; const char *s; va_list ap; if (mode == 0) { unsigned int n[2] = { 0, 0 }; va_start (ap, value); for (i = 0; (s = va_arg (ap, const char *)); i++) { v = va_arg (ap, unsigned long); n[((v & (v - 1)) == 0)]++; /* single bit */ } mode = 1 + (n[1] > n[0]); /* 1-enum, 2-set flags, 3-all flags */ va_end (ap); } va_start (ap, value); for (i = 0; (s = va_arg (ap, const char *)); i++) { v = va_arg (ap, unsigned long); if (mode == 3 || v == value || (mode == 2 && (v & value))) { fprintf (fp, "%s%s%s", j++ ? "|" : "", (mode == 3 && (v & value) == 0) ? "!" : "", s); value &= ~v; } } if (0 == value && 0 == j) fputc ('0', fp); else if (value) fprintf (fp, "%s0x%lx", j ? "|" : "", value); va_end (ap); } void fprint_unknown_ioctl (FILE * fp, unsigned int cmd, void * arg) { fprintf (fp, "", cmd, IOCTL_READ (cmd) ? 'R' : 'r', IOCTL_WRITE (cmd) ? 'W' : 'w', arg, IOCTL_ARG_SIZE (cmd)); } /** * Helper function to calculate remaining time for select(). * result = timeout - (now - start). */ void timeout_subtract_elapsed (struct timeval * result, const struct timeval * timeout, const struct timeval * now, const struct timeval * start) { if (!timeout) { result->tv_sec = LONG_MAX; result->tv_usec = LONG_MAX; } else { struct timeval elapsed; timeval_subtract (&elapsed, now, start); if ((elapsed.tv_sec | elapsed.tv_usec) > 0) { timeval_subtract (result, timeout, &elapsed); if ((result->tv_sec | result->tv_usec) < 0) { result->tv_sec = 0; result->tv_usec = 0; } } else { *result = *timeout; } } } int device_open (FILE * fp, const char * pathname, int flags, mode_t mode) { int fd; fd = open (pathname, flags, mode); if (fp) { int saved_errno; saved_errno = errno; fprintf (fp, "%d = open (\"%s\", ", fd, pathname); fprint_symbolic (fp, 2, (unsigned long) flags, "RDONLY", O_RDONLY, "WRONLY", O_WRONLY, "RDWR", O_RDWR, "CREAT", O_CREAT, "EXCL", O_EXCL, "TRUNC", O_TRUNC, "APPEND", O_APPEND, "NONBLOCK", O_NONBLOCK, 0); fprintf (fp, ", 0%o)", mode); if (-1 == fd) fprintf (fp, ", errno=%d, %s\n", saved_errno, strerror (saved_errno)); else fputc ('\n', fp); errno = saved_errno; } return fd; } int device_close (FILE * fp, int fd) { int r; r = close (fd); if (fp) { int saved_errno; saved_errno = errno; if (-1 == r) fprintf (fp, "%d = close (%d), errno=%d, %s\n", r, fd, saved_errno, strerror (saved_errno)); else fprintf (fp, "%d = close (%d)\n", r, fd); errno = saved_errno; } return r; } int device_ioctl (FILE * fp, ioctl_log_fn * fn, int fd, unsigned int cmd, void * arg) { int buf[2048]; int err; if (fp && IOCTL_WRITE (cmd)) { assert (sizeof (buf) >= IOCTL_ARG_SIZE (cmd)); memcpy (buf, arg, IOCTL_ARG_SIZE (cmd)); } do err = ioctl (fd, cmd, arg); while (-1 == err && EINTR == errno); if (fp && fn) { int saved_errno; saved_errno = errno; fprintf (fp, "%d = ", err); fn (fp, cmd, 0, NULL); fputc ('(', fp); if (IOCTL_WRITE (cmd)) fn (fp, cmd, IOCTL_READ (cmd) ? 2 : 3, &buf); if (-1 == err) { fprintf (fp, "), errno = %d, %s\n", errno, strerror (errno)); } else { if (IOCTL_READ (cmd)) { fputs (") -> (", fp); fn (fp, cmd, IOCTL_WRITE (cmd) ? 1 : 3, arg); } fputs (")\n", fp); } errno = saved_errno; } return err; } void * device_mmap (FILE * fp, void * start, size_t length, int prot, int flags, int fd, off_t offset) { void *r; r = mmap (start, length, prot, flags, fd, offset); if (fp) { int saved_errno; saved_errno = errno; fprintf (fp, "%p = mmap (start=%p length=%d prot=", r, start, (int) length); fprint_symbolic (fp, 2, (unsigned long) prot, "EXEC", PROT_EXEC, "READ", PROT_READ, "WRITE", PROT_WRITE, "NONE", PROT_NONE, 0); fputs (" flags=", fp); fprint_symbolic (fp, 2, (unsigned long) flags, "FIXED", MAP_FIXED, "SHARED", MAP_SHARED, "PRIVATE", MAP_PRIVATE, 0); fprintf (fp, " fd=%d offset=%d)", fd, (int) offset); if (MAP_FAILED == r) fprintf (fp, ", errno=%d, %s\n", saved_errno, strerror (saved_errno)); else fputc ('\n', fp); errno = saved_errno; } return r; } int device_munmap (FILE * fp, void * start, size_t length) { int r; r = munmap (start, length); if (fp) { int saved_errno; saved_errno = errno; if (-1 == r) fprintf (fp, "%d = munmap (start=%p length=%d), errno=%d, %s\n", r, start, (int) length, saved_errno, strerror (saved_errno)); else fprintf (fp, "%d = munmap (start=%p length=%d)\n", r, start, (int) length); errno = saved_errno; } return r; } ssize_t device_read (FILE * fp, int fd, void * buf, size_t count) { ssize_t actual; actual = read (fd, buf, count); if (fp) { int saved_errno; saved_errno = errno; if (-1 == actual) { fprintf (fp, "%" PRId64 " = 0x%" PRIx64 " = read (fd=%d buf=%p count=%" PRIu64 "=0x%" PRIx64 "), errno=%d, %s\n", (int64_t) actual, (int64_t) actual, fd, buf, (uint64_t) count, (uint64_t) count, saved_errno, strerror (saved_errno)); } else { fprintf (fp, "%" PRId64 " = 0x%" PRIx64 " = read (fd=%d buf=%p count=%" PRIu64 "=0x%" PRIx64 ")\n", (int64_t) actual, (int64_t) actual, fd, buf, (uint64_t) count, (uint64_t) count); } errno = saved_errno; } return actual; } zapping-0.10cvs6/common/device.h 644 764 144 7417 10431632413 11713 /* * Zapping (TV viewer for the Gnome Desktop) * * Copyright (C) 2003 Michael H. Schimek * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* $Id: device.h,v 1.9 2006/05/14 13:47:55 mschimek Exp $ */ #ifndef DEVICE_H #define DEVICE_H #include #include #include #include #if defined (_IOC_SIZE) /* Linux */ #define IOCTL_ARG_SIZE(cmd) _IOC_SIZE (cmd) #define IOCTL_READ(cmd) (_IOC_DIR (cmd) & _IOC_READ) #define IOCTL_WRITE(cmd) (_IOC_DIR (cmd) & _IOC_WRITE) #define IOCTL_READ_WRITE(cmd) (_IOC_DIR (cmd) == (_IOC_READ | _IOC_WRITE)) #define IOCTL_NUMBER(cmd) _IOC_NR (cmd) #elif defined (IOCPARM_LEN) /* FreeBSD */ #define IOCTL_ARG_SIZE(cmd) IOCPARM_LEN (cmd) #define IOCTL_READ(cmd) ((cmd) & IOC_OUT) #define IOCTL_WRITE(cmd) ((cmd) & IOC_IN) #define IOCTL_READ_WRITE(cmd) (((cmd) & IOC_DIRMASK) == (IOC_IN | IOC_OUT)) #define IOCTL_NUMBER(cmd) ((cmd) & 0xFF) #else /* Don't worry, only used for debugging */ #define IOCTL_ARG_SIZE(cmd) 0 #define IOCTL_READ(cmd) 0 #define IOCTL_WRITE(cmd) 0 #define IOCTL_READ_WRITE(cmd) 0 #define IOCTL_NUMBER(cmd) 0 #endif typedef void (ioctl_log_fn) (FILE * fp, unsigned int cmd, int rw, void * arg); extern void fprint_symbolic (FILE * fp, int mode, unsigned long value, ...); extern void fprint_unknown_ioctl (FILE * fp, unsigned int cmd, void * arg); static __inline__ void timeval_add (struct timeval * sum, const struct timeval * tv1, const struct timeval * tv2) { long usec; usec = tv1->tv_usec + tv2->tv_usec; if (usec > 1000000) { sum->tv_sec = tv1->tv_sec + tv2->tv_sec + 1; sum->tv_usec = usec - 1000000; } else { sum->tv_sec = tv1->tv_sec + tv2->tv_sec; sum->tv_usec = usec; } } static __inline__ void timeval_subtract (struct timeval * diff, const struct timeval * tv1, const struct timeval * tv2) { if (tv1->tv_usec < tv2->tv_usec) { diff->tv_sec = tv1->tv_sec - tv2->tv_sec - 1; diff->tv_usec = 1000000 + tv1->tv_usec - tv2->tv_usec; } else { diff->tv_sec = tv1->tv_sec - tv2->tv_sec; diff->tv_usec = tv1->tv_usec - tv2->tv_usec; } } static __inline__ long timeval_cmp (const struct timeval * tv1, const struct timeval * tv2) { if (tv1->tv_sec == tv2->tv_sec) return tv1->tv_usec - tv2->tv_usec; else return tv1->tv_sec - tv2->tv_sec; } extern void timeout_subtract_elapsed (struct timeval * result, const struct timeval * timeout, const struct timeval * now, const struct timeval * start); extern int device_open (FILE * fp, const char * pathname, int flags, mode_t mode); extern int device_close (FILE * fp, int fd); extern int device_ioctl (FILE * fp, ioctl_log_fn * fn, int fd, unsigned int cmd, void * arg); extern void * device_mmap (FILE * fp, void * start, size_t length, int prot, int flags, int fd, off_t offset); extern int device_munmap (FILE * fp, void * start, size_t length); extern ssize_t device_read (FILE * fp, int fd, void * buf, size_t count); #endif /* DEVICE_H */ zapping-0.10cvs6/common/videodev.h 644 764 144 35455 7344323306 12273 #ifndef __LINUX_VIDEODEV_H #define __LINUX_VIDEODEV_H #include #include #ifdef __KERNEL__ #if LINUX_VERSION_CODE >= 0x020100 #include #endif #include struct video_device { char name[32]; int type; int hardware; int (*open)(struct video_device *, int mode); void (*close)(struct video_device *); long (*read)(struct video_device *, char *, unsigned long, int noblock); /* Do we need a write method ? */ long (*write)(struct video_device *, const char *, unsigned long, int noblock); #if LINUX_VERSION_CODE >= 0x020100 unsigned int (*poll)(struct video_device *, struct file *, poll_table *); #endif int (*ioctl)(struct video_device *, unsigned int , void *); int (*mmap)(struct video_device *, const char *, unsigned long); int (*initialize)(struct video_device *); void *priv; /* Used to be 'private' but that upsets C++ */ int busy; int minor; devfs_handle_t devfs_handle; }; extern int videodev_init(void); #define VIDEO_MAJOR 81 extern int video_register_device(struct video_device *, int type); #define VFL_TYPE_GRABBER 0 #define VFL_TYPE_VBI 1 #define VFL_TYPE_RADIO 2 #define VFL_TYPE_VTX 3 extern void video_unregister_device(struct video_device *); #endif #define VID_TYPE_CAPTURE 1 /* Can capture */ #define VID_TYPE_TUNER 2 /* Can tune */ #define VID_TYPE_TELETEXT 4 /* Does teletext */ #define VID_TYPE_OVERLAY 8 /* Overlay onto frame buffer */ #define VID_TYPE_CHROMAKEY 16 /* Overlay by chromakey */ #define VID_TYPE_CLIPPING 32 /* Can clip */ #define VID_TYPE_FRAMERAM 64 /* Uses the frame buffer memory */ #define VID_TYPE_SCALES 128 /* Scalable */ #define VID_TYPE_MONOCHROME 256 /* Monochrome only */ #define VID_TYPE_SUBCAPTURE 512 /* Can capture subareas of the image */ #define VID_TYPE_MPEG_DECODER 1024 /* Can decode MPEG streams */ #define VID_TYPE_MPEG_ENCODER 2048 /* Can encode MPEG streams */ #define VID_TYPE_MJPEG_DECODER 4096 /* Can decode MJPEG streams */ #define VID_TYPE_MJPEG_ENCODER 8192 /* Can encode MJPEG streams */ struct video_capability { char name[32]; int type; int channels; /* Num channels */ int audios; /* Num audio devices */ int maxwidth; /* Supported width */ int maxheight; /* And height */ int minwidth; /* Supported width */ int minheight; /* And height */ }; struct video_channel { int channel; char name[32]; int tuners; __u32 flags; #define VIDEO_VC_TUNER 1 /* Channel has a tuner */ #define VIDEO_VC_AUDIO 2 /* Channel has audio */ __u16 type; #define VIDEO_TYPE_TV 1 #define VIDEO_TYPE_CAMERA 2 __u16 norm; /* Norm set by channel */ }; struct video_tuner { int tuner; char name[32]; unsigned long rangelow, rangehigh; /* Tuner range */ __u32 flags; #define VIDEO_TUNER_PAL 1 #define VIDEO_TUNER_NTSC 2 #define VIDEO_TUNER_SECAM 4 #define VIDEO_TUNER_LOW 8 /* Uses KHz not MHz */ #define VIDEO_TUNER_NORM 16 /* Tuner can set norm */ #define VIDEO_TUNER_STEREO_ON 128 /* Tuner is seeing stereo */ #define VIDEO_TUNER_RDS_ON 256 /* Tuner is seeing an RDS datastream */ #define VIDEO_TUNER_MBS_ON 512 /* Tuner is seeing an MBS datastream */ __u16 mode; /* PAL/NTSC/SECAM/OTHER */ #define VIDEO_MODE_PAL 0 #define VIDEO_MODE_NTSC 1 #define VIDEO_MODE_SECAM 2 #define VIDEO_MODE_AUTO 3 __u16 signal; /* Signal strength 16bit scale */ }; struct video_picture { __u16 brightness; __u16 hue; __u16 colour; __u16 contrast; __u16 whiteness; /* Black and white only */ __u16 depth; /* Capture depth */ __u16 palette; /* Palette in use */ #define VIDEO_PALETTE_GREY 1 /* Linear greyscale */ #define VIDEO_PALETTE_HI240 2 /* High 240 cube (BT848) */ #define VIDEO_PALETTE_RGB565 3 /* 565 16 bit RGB */ #define VIDEO_PALETTE_RGB24 4 /* 24bit RGB */ #define VIDEO_PALETTE_RGB32 5 /* 32bit RGB */ #define VIDEO_PALETTE_RGB555 6 /* 555 15bit RGB */ #define VIDEO_PALETTE_YUV422 7 /* YUV422 capture */ #define VIDEO_PALETTE_YUYV 8 #define VIDEO_PALETTE_UYVY 9 /* The great thing about standards is ... */ #define VIDEO_PALETTE_YUV420 10 #define VIDEO_PALETTE_YUV411 11 /* YUV411 capture */ #define VIDEO_PALETTE_RAW 12 /* RAW capture (BT848) */ #define VIDEO_PALETTE_YUV422P 13 /* YUV 4:2:2 Planar */ #define VIDEO_PALETTE_YUV411P 14 /* YUV 4:1:1 Planar */ #define VIDEO_PALETTE_YUV420P 15 /* YUV 4:2:0 Planar */ #define VIDEO_PALETTE_YUV410P 16 /* YUV 4:1:0 Planar */ #define VIDEO_PALETTE_PLANAR 13 /* start of planar entries */ #define VIDEO_PALETTE_COMPONENT 7 /* start of component entries */ }; struct video_audio { int audio; /* Audio channel */ __u16 volume; /* If settable */ __u16 bass, treble; __u32 flags; #define VIDEO_AUDIO_MUTE 1 #define VIDEO_AUDIO_MUTABLE 2 #define VIDEO_AUDIO_VOLUME 4 #define VIDEO_AUDIO_BASS 8 #define VIDEO_AUDIO_TREBLE 16 char name[16]; #define VIDEO_SOUND_MONO 1 #define VIDEO_SOUND_STEREO 2 #define VIDEO_SOUND_LANG1 4 #define VIDEO_SOUND_LANG2 8 __u16 mode; __u16 balance; /* Stereo balance */ __u16 step; /* Step actual volume uses */ }; struct video_clip { __s32 x,y; __s32 width, height; struct video_clip *next; /* For user use/driver use only */ }; struct video_window { __u32 x,y; /* Position of window */ __u32 width,height; /* Its size */ __u32 chromakey; __u32 flags; struct video_clip *clips; /* Set only */ int clipcount; #define VIDEO_WINDOW_INTERLACE 1 #define VIDEO_WINDOW_CHROMAKEY 16 /* Overlay by chromakey */ #define VIDEO_CLIP_BITMAP -1 /* bitmap is 1024x625, a '1' bit represents a clipped pixel */ #define VIDEO_CLIPMAP_SIZE (128 * 625) }; struct video_capture { __u32 x,y; /* Offsets into image */ __u32 width, height; /* Area to capture */ __u16 decimation; /* Decimation divder */ __u16 flags; /* Flags for capture */ #define VIDEO_CAPTURE_ODD 0 /* Temporal */ #define VIDEO_CAPTURE_EVEN 1 }; struct video_buffer { void *base; int height,width; int depth; int bytesperline; }; struct video_mmap { unsigned int frame; /* Frame (0 - n) for double buffer */ int height,width; unsigned int format; /* should be VIDEO_PALETTE_* */ }; struct video_key { __u8 key[8]; __u32 flags; }; #define VIDEO_MAX_FRAME 32 struct video_mbuf { int size; /* Total memory to map */ int frames; /* Frames */ int offsets[VIDEO_MAX_FRAME]; }; #define VIDEO_NO_UNIT (-1) struct video_unit { int video; /* Video minor */ int vbi; /* VBI minor */ int radio; /* Radio minor */ int audio; /* Audio minor */ int teletext; /* Teletext minor */ }; struct vbi_format { __u32 sampling_rate; /* in Hz */ __u32 samples_per_line; __u32 sample_format; /* VIDEO_PALETTE_RAW only (1 byte) */ __s32 start[2]; /* starting line for each frame */ __u32 count[2]; /* count of lines for each frame */ __u32 flags; #define VBI_UNSYNC 1 /* can distingues between top/bottom field */ #define VBI_INTERLACED 2 /* lines are interlaced */ }; /* video_info is biased towards hardware mpeg encode/decode */ /* but it could apply generically to any hardware compressor/decompressor */ struct video_info { __u32 frame_count; /* frames output since decode/encode began */ __u32 h_size; /* current unscaled horizontal size */ __u32 v_size; /* current unscaled veritcal size */ __u32 smpte_timecode; /* current SMPTE timecode (for current GOP) */ __u32 picture_type; /* current picture type */ __u32 temporal_reference; /* current temporal reference */ __u8 user_data[256]; /* user data last found in compressed stream */ /* user_data[0] contains user data flags, user_data[1] has count */ }; /* generic structure for setting playback modes */ struct video_play_mode { int mode; int p1; int p2; }; /* for loading microcode / fpga programming */ struct video_code { char loadwhat[16]; /* name or tag of file being passed */ int datasize; __u8 *data; }; #define VIDIOCGCAP _IOR('v',1,struct video_capability) /* Get capabilities */ #define VIDIOCGCHAN _IOWR('v',2,struct video_channel) /* Get channel info (sources) */ #define VIDIOCSCHAN _IOW('v',3,struct video_channel) /* Set channel */ #define VIDIOCGTUNER _IOWR('v',4,struct video_tuner) /* Get tuner abilities */ #define VIDIOCSTUNER _IOW('v',5,struct video_tuner) /* Tune the tuner for the current channel */ #define VIDIOCGPICT _IOR('v',6,struct video_picture) /* Get picture properties */ #define VIDIOCSPICT _IOW('v',7,struct video_picture) /* Set picture properties */ #define VIDIOCCAPTURE _IOW('v',8,int) /* Start, end capture */ #define VIDIOCGWIN _IOR('v',9, struct video_window) /* Get the video overlay window */ #define VIDIOCSWIN _IOW('v',10, struct video_window) /* Set the video overlay window - passes clip list for hardware smarts , chromakey etc */ #define VIDIOCGFBUF _IOR('v',11, struct video_buffer) /* Get frame buffer */ #define VIDIOCSFBUF _IOW('v',12, struct video_buffer) /* Set frame buffer - root only */ #define VIDIOCKEY _IOR('v',13, struct video_key) /* Video key event - to dev 255 is to all - cuts capture on all DMA windows with this key (0xFFFFFFFF == all) */ #define VIDIOCGFREQ _IOR('v',14, unsigned long) /* Set tuner */ #define VIDIOCSFREQ _IOW('v',15, unsigned long) /* Set tuner */ #define VIDIOCGAUDIO _IOR('v',16, struct video_audio) /* Get audio info */ #define VIDIOCSAUDIO _IOW('v',17, struct video_audio) /* Audio source, mute etc */ #define VIDIOCSYNC _IOW('v',18, int) /* Sync with mmap grabbing */ #define VIDIOCMCAPTURE _IOW('v',19, struct video_mmap) /* Grab frames */ #define VIDIOCGMBUF _IOR('v',20, struct video_mbuf) /* Memory map buffer info */ #define VIDIOCGUNIT _IOR('v',21, struct video_unit) /* Get attached units */ #define VIDIOCGCAPTURE _IOR('v',22, struct video_capture) /* Get subcapture */ #define VIDIOCSCAPTURE _IOW('v',23, struct video_capture) /* Set subcapture */ #define VIDIOCSPLAYMODE _IOW('v',24, struct video_play_mode) /* Set output video mode/feature */ #define VIDIOCSWRITEMODE _IOW('v',25, int) /* Set write mode */ #define VIDIOCGPLAYINFO _IOR('v',26, struct video_info) /* Get current playback info from hardware */ #define VIDIOCSMICROCODE _IOW('v',27, struct video_code) /* Load microcode into hardware */ #define VIDIOCGVBIFMT _IOR('v',28, struct vbi_format) /* Get VBI information */ #define VIDIOCSVBIFMT _IOW('v',29, struct vbi_format) /* Set VBI information */ #define BASE_VIDIOCPRIVATE 192 /* 192-255 are private */ /* VIDIOCSWRITEMODE */ #define VID_WRITE_MPEG_AUD 0 #define VID_WRITE_MPEG_VID 1 #define VID_WRITE_OSD 2 #define VID_WRITE_TTX 3 #define VID_WRITE_CC 4 #define VID_WRITE_MJPEG 5 /* VIDIOCSPLAYMODE */ #define VID_PLAY_VID_OUT_MODE 0 /* p1: = VIDEO_MODE_PAL, VIDEO_MODE_NTSC, etc ... */ #define VID_PLAY_GENLOCK 1 /* p1: 0 = OFF, 1 = ON */ /* p2: GENLOCK FINE DELAY value */ #define VID_PLAY_NORMAL 2 #define VID_PLAY_PAUSE 3 #define VID_PLAY_SINGLE_FRAME 4 #define VID_PLAY_FAST_FORWARD 5 #define VID_PLAY_SLOW_MOTION 6 #define VID_PLAY_IMMEDIATE_NORMAL 7 #define VID_PLAY_SWITCH_CHANNELS 8 #define VID_PLAY_FREEZE_FRAME 9 #define VID_PLAY_STILL_MODE 10 #define VID_PLAY_MASTER_MODE 11 /* p1: see below */ #define VID_PLAY_MASTER_NONE 1 #define VID_PLAY_MASTER_VIDEO 2 #define VID_PLAY_MASTER_AUDIO 3 #define VID_PLAY_ACTIVE_SCANLINES 12 /* p1 = first active; p2 = last active */ #define VID_PLAY_RESET 13 #define VID_PLAY_END_MARK 14 #define VID_HARDWARE_BT848 1 #define VID_HARDWARE_QCAM_BW 2 #define VID_HARDWARE_PMS 3 #define VID_HARDWARE_QCAM_C 4 #define VID_HARDWARE_PSEUDO 5 #define VID_HARDWARE_SAA5249 6 #define VID_HARDWARE_AZTECH 7 #define VID_HARDWARE_SF16MI 8 #define VID_HARDWARE_RTRACK 9 #define VID_HARDWARE_ZOLTRIX 10 #define VID_HARDWARE_SAA7146 11 #define VID_HARDWARE_VIDEUM 12 /* Reserved for Winnov videum */ #define VID_HARDWARE_RTRACK2 13 #define VID_HARDWARE_PERMEDIA2 14 /* Reserved for Permedia2 */ #define VID_HARDWARE_RIVA128 15 /* Reserved for RIVA 128 */ #define VID_HARDWARE_PLANB 16 /* PowerMac motherboard video-in */ #define VID_HARDWARE_BROADWAY 17 /* Broadway project */ #define VID_HARDWARE_GEMTEK 18 #define VID_HARDWARE_TYPHOON 19 #define VID_HARDWARE_VINO 20 /* SGI Indy Vino */ #define VID_HARDWARE_CADET 21 /* Cadet radio */ #define VID_HARDWARE_TRUST 22 /* Trust FM Radio */ #define VID_HARDWARE_TERRATEC 23 /* TerraTec ActiveRadio */ #define VID_HARDWARE_CPIA 24 #define VID_HARDWARE_ZR36120 25 /* Zoran ZR36120/ZR36125 */ #define VID_HARDWARE_ZR36067 26 /* Zoran ZR36067/36060 */ #define VID_HARDWARE_OV511 27 #define VID_HARDWARE_ZR356700 28 /* Zoran 36700 series */ /* * Initialiser list */ struct video_init { char *name; int (*init)(struct video_init *); }; #endif zapping-0.10cvs6/mkinstalldirs 755 764 144 6622 10442575001 11617 #! /bin/sh # mkinstalldirs --- make directory hierarchy scriptversion=2005-06-29.22 # Original author: Noah Friedman # Created: 1993-05-16 # Public domain. # # This file is maintained in Automake, please report # bugs to or send patches to # . errstatus=0 dirmode= usage="\ Usage: mkinstalldirs [-h] [--help] [--version] [-m MODE] DIR ... Create each directory DIR (with mode MODE, if specified), including all leading file name components. Report bugs to ." # process command line arguments while test $# -gt 0 ; do case $1 in -h | --help | --h*) # -h for help echo "$usage" exit $? ;; -m) # -m PERM arg shift test $# -eq 0 && { echo "$usage" 1>&2; exit 1; } dirmode=$1 shift ;; --version) echo "$0 $scriptversion" exit $? ;; --) # stop option processing shift break ;; -*) # unknown option echo "$usage" 1>&2 exit 1 ;; *) # first non-opt arg break ;; esac done for file do if test -d "$file"; then shift else break fi done case $# in 0) exit 0 ;; esac # Solaris 8's mkdir -p isn't thread-safe. If you mkdir -p a/b and # mkdir -p a/c at the same time, both will detect that a is missing, # one will create a, then the other will try to create a and die with # a "File exists" error. This is a problem when calling mkinstalldirs # from a parallel make. We use --version in the probe to restrict # ourselves to GNU mkdir, which is thread-safe. case $dirmode in '') if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then echo "mkdir -p -- $*" exec mkdir -p -- "$@" else # On NextStep and OpenStep, the `mkdir' command does not # recognize any option. It will interpret all options as # directories to create, and then abort because `.' already # exists. test -d ./-p && rmdir ./-p test -d ./--version && rmdir ./--version fi ;; *) if mkdir -m "$dirmode" -p --version . >/dev/null 2>&1 && test ! -d ./--version; then echo "mkdir -m $dirmode -p -- $*" exec mkdir -m "$dirmode" -p -- "$@" else # Clean up after NextStep and OpenStep mkdir. for d in ./-m ./-p ./--version "./$dirmode"; do test -d $d && rmdir $d done fi ;; esac for file do case $file in /*) pathcomp=/ ;; *) pathcomp= ;; esac oIFS=$IFS IFS=/ set fnord $file shift IFS=$oIFS for d do test "x$d" = x && continue pathcomp=$pathcomp$d case $pathcomp in -*) pathcomp=./$pathcomp ;; esac if test ! -d "$pathcomp"; then echo "mkdir $pathcomp" mkdir "$pathcomp" || lasterr=$? if test ! -d "$pathcomp"; then errstatus=$lasterr else if test ! -z "$dirmode"; then echo "chmod $dirmode $pathcomp" lasterr= chmod "$dirmode" "$pathcomp" || lasterr=$? if test ! -z "$lasterr"; then errstatus=$lasterr fi fi fi fi pathcomp=$pathcomp/ done done exit $errstatus # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-end: "$" # End: zapping-0.10cvs6/Makefile.am 644 764 144 2777 10432663166 11065 ## Process this file with automake to produce Makefile.in if NEED_ZSFB ZSFB_DIRS = zapping_setup_fb else ZSFB_DIRS = endif # Keep order SUBDIRS = \ common \ libtv \ libvbi \ po \ glade \ pixmaps \ plugins \ help \ $(ZSFB_DIRS) \ src \ test EXTRA_DIST = \ acinclude.m4 \ autogen.sh \ BUGS \ ChangeLog.01 \ ChangeLog.03 \ ChangeLog.05 \ intltool-extract.in \ intltool-merge.in \ intltool-update.in \ README.plugins \ THANKS \ zapping.desktop.in \ zapping.schemas.in desktopdir = $(datadir)/applications desktop_DATA = zapping.desktop @INTLTOOL_DESKTOP_RULE@ schemadir = @GCONF_SCHEMA_FILE_DIR@ schema_DATA = zapping.schemas @INTLTOOL_SCHEMAS_RULE@ if GCONF_SCHEMAS_INSTALL install-data-local: GCONF_CONFIG_SOURCE=$(GCONF_SCHEMA_CONFIG_SOURCE) \ gconftool-2 --makefile-install-rule $(top_builddir)/zapping.schemas uninstall-local: GCONF_CONFIG_SOURCE=$(GCONF_SCHEMA_CONFIG_SOURCE) \ gconftool-2 --makefile-uninstall-rule $(top_builddir)/zapping.schemas else install-data-local: uninstall-local: endif DISTCLEANFILES = \ intltool-extract \ intltool-merge \ intltool-update \ zapping.desktop \ zapping.schemas # configure creates site_def.h if it doesn't already exist. distcleancheck_listfiles = \ find . -name site_def.h -prune -o -type f -print # make uninstall leaves a scrollkeeper contents skeleton in pkglocalstatedir. # make distuninstallcheck shall ignore that. distuninstallcheck_listfiles = \ find . -name scrollkeeper -prune -o -type f -print dist-hook: chown -R 500:100 $(distdir) zapping-0.10cvs6/Makefile.in 644 764 144 66424 10442575643 11120 # Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = . am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(srcdir)/config.h.in \ $(srcdir)/zapping.desktop.in.in $(srcdir)/zapping.spec.in \ $(top_srcdir)/configure ABOUT-NLS AUTHORS COPYING ChangeLog \ INSTALL NEWS THANKS TODO compile config.guess config.rpath \ config.sub depcomp install-sh ltmain.sh missing mkinstalldirs subdir = . ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno configure.status.lineno mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = config.h CONFIG_CLEAN_FILES = zapping.desktop.in zapping.spec SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-exec-recursive install-info-recursive \ install-recursive installcheck-recursive installdirs-recursive \ pdf-recursive ps-recursive uninstall-info-recursive \ uninstall-recursive am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; am__installdirs = "$(DESTDIR)$(desktopdir)" "$(DESTDIR)$(schemadir)" desktopDATA_INSTALL = $(INSTALL_DATA) schemaDATA_INSTALL = $(INSTALL_DATA) DATA = $(desktop_DATA) $(schema_DATA) ETAGS = etags CTAGS = ctags DIST_SUBDIRS = common libtv libvbi po glade pixmaps plugins help \ zapping_setup_fb src test DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) am__remove_distdir = \ { test ! -d $(distdir) \ || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \ && rm -fr $(distdir); }; } DIST_ARCHIVES = $(distdir).tar.gz GZIP_ENV = --best ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ ARTS_CFLAGS = @ARTS_CFLAGS@ ARTS_LIBS = @ARTS_LIBS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BUILD_DEINTERLACE_PLUGIN_FALSE = @BUILD_DEINTERLACE_PLUGIN_FALSE@ BUILD_DEINTERLACE_PLUGIN_TRUE = @BUILD_DEINTERLACE_PLUGIN_TRUE@ BUILD_MAN_FALSE = @BUILD_MAN_FALSE@ BUILD_MAN_TRUE = @BUILD_MAN_TRUE@ CAN_COMPILE_3DNOW_FALSE = @CAN_COMPILE_3DNOW_FALSE@ CAN_COMPILE_3DNOW_TRUE = @CAN_COMPILE_3DNOW_TRUE@ CAN_COMPILE_ALTIVEC_FALSE = @CAN_COMPILE_ALTIVEC_FALSE@ CAN_COMPILE_ALTIVEC_TRUE = @CAN_COMPILE_ALTIVEC_TRUE@ CAN_COMPILE_MMX_FALSE = @CAN_COMPILE_MMX_FALSE@ CAN_COMPILE_MMX_TRUE = @CAN_COMPILE_MMX_TRUE@ CAN_COMPILE_SSE2_FALSE = @CAN_COMPILE_SSE2_FALSE@ CAN_COMPILE_SSE2_TRUE = @CAN_COMPILE_SSE2_TRUE@ CAN_COMPILE_SSE3_FALSE = @CAN_COMPILE_SSE3_FALSE@ CAN_COMPILE_SSE3_TRUE = @CAN_COMPILE_SSE3_TRUE@ CAN_COMPILE_SSE_FALSE = @CAN_COMPILE_SSE_FALSE@ CAN_COMPILE_SSE_TRUE = @CAN_COMPILE_SSE_TRUE@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCAS = @CCAS@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ COMMON_INCLUDES = @COMMON_INCLUDES@ CONSOLEHELPER_LOCATION = @CONSOLEHELPER_LOCATION@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFAULT_CFLAGS = @DEFAULT_CFLAGS@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ESD_LIBS = @ESD_LIBS@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ GCONF_SCHEMAS_INSTALL_FALSE = @GCONF_SCHEMAS_INSTALL_FALSE@ GCONF_SCHEMAS_INSTALL_TRUE = @GCONF_SCHEMAS_INSTALL_TRUE@ GCONF_SCHEMA_CONFIG_SOURCE = @GCONF_SCHEMA_CONFIG_SOURCE@ GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@ GDK_PIXBUF_CSOURCE = @GDK_PIXBUF_CSOURCE@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ HAVE_GCC_LIMITS_FALSE = @HAVE_GCC_LIMITS_FALSE@ HAVE_GCC_LIMITS_TRUE = @HAVE_GCC_LIMITS_TRUE@ HAVE_LIBZVBI_FALSE = @HAVE_LIBZVBI_FALSE@ HAVE_LIBZVBI_TRUE = @HAVE_LIBZVBI_TRUE@ HAVE_X86_FALSE = @HAVE_X86_FALSE@ HAVE_X86_TRUE = @HAVE_X86_TRUE@ HAVE_XMU_FALSE = @HAVE_XMU_FALSE@ HAVE_XMU_TRUE = @HAVE_XMU_TRUE@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ INTLTOOL_CAVES_RULE = @INTLTOOL_CAVES_RULE@ INTLTOOL_DESKTOP_RULE = @INTLTOOL_DESKTOP_RULE@ INTLTOOL_DIRECTORY_RULE = @INTLTOOL_DIRECTORY_RULE@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ INTLTOOL_ICONV = @INTLTOOL_ICONV@ INTLTOOL_KBD_RULE = @INTLTOOL_KBD_RULE@ INTLTOOL_KEYS_RULE = @INTLTOOL_KEYS_RULE@ INTLTOOL_MERGE = @INTLTOOL_MERGE@ INTLTOOL_MSGFMT = @INTLTOOL_MSGFMT@ INTLTOOL_MSGMERGE = @INTLTOOL_MSGMERGE@ INTLTOOL_OAF_RULE = @INTLTOOL_OAF_RULE@ INTLTOOL_PERL = @INTLTOOL_PERL@ INTLTOOL_PONG_RULE = @INTLTOOL_PONG_RULE@ INTLTOOL_PROP_RULE = @INTLTOOL_PROP_RULE@ INTLTOOL_SCHEMAS_RULE = @INTLTOOL_SCHEMAS_RULE@ INTLTOOL_SERVER_RULE = @INTLTOOL_SERVER_RULE@ INTLTOOL_SHEET_RULE = @INTLTOOL_SHEET_RULE@ INTLTOOL_SOUNDLIST_RULE = @INTLTOOL_SOUNDLIST_RULE@ INTLTOOL_THEME_RULE = @INTLTOOL_THEME_RULE@ INTLTOOL_UI_RULE = @INTLTOOL_UI_RULE@ INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ INTLTOOL_XAM_RULE = @INTLTOOL_XAM_RULE@ INTLTOOL_XGETTEXT = @INTLTOOL_XGETTEXT@ INTLTOOL_XML_NOMERGE_RULE = @INTLTOOL_XML_NOMERGE_RULE@ INTLTOOL_XML_RULE = @INTLTOOL_XML_RULE@ JPEG_LIB = @JPEG_LIB@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBXML_CFLAGS = @LIBXML_CFLAGS@ LIBXML_LIBS = @LIBXML_LIBS@ LIRC_LIB = @LIRC_LIB@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAKEINFO = @MAKEINFO@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ NEED_ZSFB_FALSE = @NEED_ZSFB_FALSE@ NEED_ZSFB_TRUE = @NEED_ZSFB_TRUE@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_CFLAGS = @PACKAGE_CFLAGS@ PACKAGE_LIBS = @PACKAGE_LIBS@ PACKAGE_LIB_DIR = @PACKAGE_LIB_DIR@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_PIXMAPS_DIR = @PACKAGE_PIXMAPS_DIR@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PACKAGE_VERSION_ID = @PACKAGE_VERSION_ID@ PATH_SEPARATOR = @PATH_SEPARATOR@ PG_CFLAGS = @PG_CFLAGS@ PKG_CONFIG = @PKG_CONFIG@ PLUGIN_DEFAULT_DIR = @PLUGIN_DEFAULT_DIR@ PLUGIN_DEFAULT_FLAGS = @PLUGIN_DEFAULT_FLAGS@ PNG_LIBS = @PNG_LIBS@ POFILES = @POFILES@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ PYTHON_LIBS = @PYTHON_LIBS@ PY_CFLAGS = @PY_CFLAGS@ PY_EXTRA_LIBS = @PY_EXTRA_LIBS@ PY_LIBS = @PY_LIBS@ PY_LIB_LOC = @PY_LIB_LOC@ RANLIB = @RANLIB@ RTE_LIBS = @RTE_LIBS@ SCROLLKEEPER_BUILD_REQUIRED = @SCROLLKEEPER_BUILD_REQUIRED@ SCROLLKEEPER_CONFIG = @SCROLLKEEPER_CONFIG@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ SUID_ZSFB_FALSE = @SUID_ZSFB_FALSE@ SUID_ZSFB_TRUE = @SUID_ZSFB_TRUE@ UNICODE_CFLAGS = @UNICODE_CFLAGS@ UNICODE_LIBS = @UNICODE_LIBS@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ WARN_CFLAGS = @WARN_CFLAGS@ XGETTEXT = @XGETTEXT@ XMLCATALOG = @XMLCATALOG@ XML_CATALOG_FILE = @XML_CATALOG_FILE@ XSLTPROC = @XSLTPROC@ X_CFLAGS = @X_CFLAGS@ X_DPMS_LIBS = @X_DPMS_LIBS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ X_XF86DGA_LIBS = @X_XF86DGA_LIBS@ X_XF86VMODE_LIBS = @X_XF86VMODE_LIBS@ X_XINERAMA_LIBS = @X_XINERAMA_LIBS@ X_XMU_LIBS = @X_XMU_LIBS@ X_XV_LIBS = @X_XV_LIBS@ ZSFB_GROUP = @ZSFB_GROUP@ ZSFB_OWNER = @ZSFB_OWNER@ ZVBI_CFLAGS = @ZVBI_CFLAGS@ ZVBI_LIBS = @ZVBI_LIBS@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_STRIP = @ac_ct_STRIP@ ac_pt_PKG_CONFIG = @ac_pt_PKG_CONFIG@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ datadir = @datadir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ python_val = @python_val@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ @NEED_ZSFB_FALSE@ZSFB_DIRS = @NEED_ZSFB_TRUE@ZSFB_DIRS = zapping_setup_fb # Keep order SUBDIRS = \ common \ libtv \ libvbi \ po \ glade \ pixmaps \ plugins \ help \ $(ZSFB_DIRS) \ src \ test EXTRA_DIST = \ acinclude.m4 \ autogen.sh \ BUGS \ ChangeLog.01 \ ChangeLog.03 \ ChangeLog.05 \ intltool-extract.in \ intltool-merge.in \ intltool-update.in \ README.plugins \ THANKS \ zapping.desktop.in \ zapping.schemas.in desktopdir = $(datadir)/applications desktop_DATA = zapping.desktop schemadir = @GCONF_SCHEMA_FILE_DIR@ schema_DATA = zapping.schemas DISTCLEANFILES = \ intltool-extract \ intltool-merge \ intltool-update \ zapping.desktop \ zapping.schemas # configure creates site_def.h if it doesn't already exist. distcleancheck_listfiles = \ find . -name site_def.h -prune -o -type f -print # make uninstall leaves a scrollkeeper contents skeleton in pkglocalstatedir. # make distuninstallcheck shall ignore that. distuninstallcheck_listfiles = \ find . -name scrollkeeper -prune -o -type f -print all: config.h $(MAKE) $(AM_MAKEFLAGS) all-recursive .SUFFIXES: am--refresh: @: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ echo ' cd $(srcdir) && $(AUTOMAKE) --gnu '; \ cd $(srcdir) && $(AUTOMAKE) --gnu \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ echo ' $(SHELL) ./config.status'; \ $(SHELL) ./config.status;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(SHELL) ./config.status --recheck $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(srcdir) && $(AUTOCONF) $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) config.h: stamp-h1 @if test ! -f $@; then \ rm -f stamp-h1; \ $(MAKE) stamp-h1; \ else :; fi stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status @rm -f stamp-h1 cd $(top_builddir) && $(SHELL) ./config.status config.h $(srcdir)/config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_srcdir) && $(AUTOHEADER) rm -f stamp-h1 touch $@ distclean-hdr: -rm -f config.h stamp-h1 zapping.desktop.in: $(top_builddir)/config.status $(srcdir)/zapping.desktop.in.in cd $(top_builddir) && $(SHELL) ./config.status $@ zapping.spec: $(top_builddir)/config.status $(srcdir)/zapping.spec.in cd $(top_builddir) && $(SHELL) ./config.status $@ mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool uninstall-info-am: install-desktopDATA: $(desktop_DATA) @$(NORMAL_INSTALL) test -z "$(desktopdir)" || $(mkdir_p) "$(DESTDIR)$(desktopdir)" @list='$(desktop_DATA)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ f=$(am__strip_dir) \ echo " $(desktopDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(desktopdir)/$$f'"; \ $(desktopDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(desktopdir)/$$f"; \ done uninstall-desktopDATA: @$(NORMAL_UNINSTALL) @list='$(desktop_DATA)'; for p in $$list; do \ f=$(am__strip_dir) \ echo " rm -f '$(DESTDIR)$(desktopdir)/$$f'"; \ rm -f "$(DESTDIR)$(desktopdir)/$$f"; \ done install-schemaDATA: $(schema_DATA) @$(NORMAL_INSTALL) test -z "$(schemadir)" || $(mkdir_p) "$(DESTDIR)$(schemadir)" @list='$(schema_DATA)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ f=$(am__strip_dir) \ echo " $(schemaDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(schemadir)/$$f'"; \ $(schemaDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(schemadir)/$$f"; \ done uninstall-schemaDATA: @$(NORMAL_UNINSTALL) @list='$(schema_DATA)'; for p in $$list; do \ f=$(am__strip_dir) \ echo " rm -f '$(DESTDIR)$(schemadir)/$$f'"; \ rm -f "$(DESTDIR)$(schemadir)/$$f"; \ done # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" mostlyclean-recursive clean-recursive distclean-recursive \ maintainer-clean-recursive: @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) $(am__remove_distdir) mkdir $(distdir) $(mkdir_p) $(distdir)/. $(distdir)/po @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(mkdir_p) "$(distdir)/$$subdir" \ || exit 1; \ distdir=`$(am__cd) $(distdir) && pwd`; \ top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ (cd $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$top_distdir" \ distdir="$$distdir/$$subdir" \ distdir) \ || exit 1; \ fi; \ done $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$(top_distdir)" distdir="$(distdir)" \ dist-hook -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ ! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \ || chmod -R a+r $(distdir) dist-gzip: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__remove_distdir) dist-bzip2: distdir tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 $(am__remove_distdir) dist-tarZ: distdir tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z $(am__remove_distdir) dist-shar: distdir shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz $(am__remove_distdir) dist-zip: distdir -rm -f $(distdir).zip zip -rq $(distdir).zip $(distdir) $(am__remove_distdir) dist dist-all: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__remove_distdir) # This target untars the dist file and tries a VPATH configuration. Then # it guarantees that the distribution is self-contained by making another # tarfile. distcheck: dist case '$(DIST_ARCHIVES)' in \ *.tar.gz*) \ GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ esac chmod -R a-w $(distdir); chmod a+w $(distdir) mkdir $(distdir)/_build mkdir $(distdir)/_inst chmod a-w $(distdir) dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ && cd $(distdir)/_build \ && ../configure --srcdir=.. --prefix="$$dc_install_base" \ $(DISTCHECK_CONFIGURE_FLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ && $(MAKE) $(AM_MAKEFLAGS) check \ && $(MAKE) $(AM_MAKEFLAGS) install \ && $(MAKE) $(AM_MAKEFLAGS) installcheck \ && $(MAKE) $(AM_MAKEFLAGS) uninstall \ && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ distuninstallcheck \ && chmod -R a-w "$$dc_install_base" \ && ({ \ (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ } || { rm -rf "$$dc_destdir"; exit 1; }) \ && rm -rf "$$dc_destdir" \ && $(MAKE) $(AM_MAKEFLAGS) dist \ && rm -rf $(DIST_ARCHIVES) \ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck $(am__remove_distdir) @(echo "$(distdir) archives ready for distribution: "; \ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ sed -e '1{h;s/./=/g;p;x;}' -e '$${p;x;}' distuninstallcheck: @cd $(distuninstallcheck_dir) \ && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ || { echo "ERROR: files left after uninstall:" ; \ if test -n "$(DESTDIR)"; then \ echo " (check DESTDIR support)"; \ fi ; \ $(distuninstallcheck_listfiles) ; \ exit 1; } >&2 distcleancheck: distclean @if test '$(srcdir)' = . ; then \ echo "ERROR: distcleancheck can only run from a VPATH build" ; \ exit 1 ; \ fi @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left in build directory after distclean:" ; \ $(distcleancheck_listfiles) ; \ exit 1; } >&2 check-am: all-am check: check-recursive all-am: Makefile $(DATA) config.h installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(desktopdir)" "$(DESTDIR)$(schemadir)"; do \ test -z "$$dir" || $(mkdir_p) "$$dir"; \ done install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -f Makefile distclean-am: clean-am distclean-generic distclean-hdr \ distclean-libtool distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive info: info-recursive info-am: install-data-am: install-data-local install-desktopDATA \ install-schemaDATA install-exec-am: install-info: install-info-recursive install-man: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf $(top_srcdir)/autom4te.cache -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-desktopDATA uninstall-info-am uninstall-local \ uninstall-schemaDATA uninstall-info: uninstall-info-recursive .PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am am--refresh check \ check-am clean clean-generic clean-libtool clean-recursive \ ctags ctags-recursive dist dist-all dist-bzip2 dist-gzip \ dist-hook dist-shar dist-tarZ dist-zip distcheck distclean \ distclean-generic distclean-hdr distclean-libtool \ distclean-recursive distclean-tags distcleancheck distdir \ distuninstallcheck dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am \ install-data-local install-desktopDATA install-exec \ install-exec-am install-info install-info-am install-man \ install-schemaDATA install-strip installcheck installcheck-am \ installdirs installdirs-am maintainer-clean \ maintainer-clean-generic maintainer-clean-recursive \ mostlyclean mostlyclean-generic mostlyclean-libtool \ mostlyclean-recursive pdf pdf-am ps ps-am tags tags-recursive \ uninstall uninstall-am uninstall-desktopDATA uninstall-info-am \ uninstall-local uninstall-schemaDATA @INTLTOOL_DESKTOP_RULE@ @INTLTOOL_SCHEMAS_RULE@ @GCONF_SCHEMAS_INSTALL_TRUE@install-data-local: @GCONF_SCHEMAS_INSTALL_TRUE@ GCONF_CONFIG_SOURCE=$(GCONF_SCHEMA_CONFIG_SOURCE) \ @GCONF_SCHEMAS_INSTALL_TRUE@ gconftool-2 --makefile-install-rule $(top_builddir)/zapping.schemas @GCONF_SCHEMAS_INSTALL_TRUE@uninstall-local: @GCONF_SCHEMAS_INSTALL_TRUE@ GCONF_CONFIG_SOURCE=$(GCONF_SCHEMA_CONFIG_SOURCE) \ @GCONF_SCHEMAS_INSTALL_TRUE@ gconftool-2 --makefile-uninstall-rule $(top_builddir)/zapping.schemas @GCONF_SCHEMAS_INSTALL_FALSE@install-data-local: @GCONF_SCHEMAS_INSTALL_FALSE@uninstall-local: dist-hook: chown -R 500:100 $(distdir) # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: zapping-0.10cvs6/libvbi/ 777 764 144 0 10443536344 10266 5zapping-0.10cvs6/libvbi/event-priv.h 644 764 144 5315 10260120244 12517 /* * libzvbi - Events * * Copyright (C) 2000, 2001, 2002, 2003, 2004 Michael H. Schimek * * Based on code from AleVT 1.5.1 * Copyright (C) 1998,1999 Edgar Toernig (froese@gmx.de) * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* $Id: event-priv.h,v 1.3 2005/06/28 00:58:12 mschimek Exp $ */ #ifndef EVENT_PRIV_H #define EVENT_PRIV_H #include "event.h" #ifndef EVENT_PRIV_LOG #define EVENT_PRIV_LOG 0 #endif /** @internal */ typedef struct _vbi3_event_handler vbi3_event_handler; /** @internal */ struct _vbi3_event_handler { vbi3_event_handler * next; vbi3_event_cb * callback; void * user_data; vbi3_event_mask event_mask; unsigned int blocked; }; /** @internal */ typedef struct { vbi3_event_handler * first; vbi3_event_handler * current; vbi3_event_mask event_mask; } _vbi3_event_handler_list; extern const char * _vbi3_event_name (vbi3_event_mask event); #if EVENT_PRIV_LOG #define _vbi3_event_handler_list_send(es, ev) \ do { \ fprintf (stderr, "%s:%u event %s\n", \ __FILE__, __LINE__, _vbi3_event_name ((ev)->type)); \ __vbi3_event_handler_list_send (es, ev); \ } while (0) #else #define _vbi3_event_handler_list_send(es, ev) \ __vbi3_event_handler_list_send (es, ev) #endif extern void __vbi3_event_handler_list_send (_vbi3_event_handler_list *es, const vbi3_event * ev); extern void _vbi3_event_handler_list_remove_by_event (_vbi3_event_handler_list *es, vbi3_event_mask event_mask); extern void _vbi3_event_handler_list_remove_by_callback (_vbi3_event_handler_list *es, vbi3_event_cb * callback, void * user_data); extern void _vbi3_event_handler_list_remove (_vbi3_event_handler_list *es, vbi3_event_handler * eh); extern vbi3_event_handler * _vbi3_event_handler_list_add (_vbi3_event_handler_list *es, vbi3_event_mask event_mask, vbi3_event_cb * callback, void * user_data); extern void _vbi3_event_handler_list_destroy (_vbi3_event_handler_list *es); extern vbi3_bool _vbi3_event_handler_list_init (_vbi3_event_handler_list *es); #endif /* EVENT_PRIV_H */ zapping-0.10cvs6/libvbi/vt.h 644 764 144 22142 10305456044 11100 /* * libzvbi - Teletext decoder * * Copyright (C) 2000, 2001, 2003, 2004 Michael H. Schimek * * Based on code from AleVT 1.5.1 * Copyright (C) 1998, 1999 Edgar Toernig * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* $Id: vt.h,v 1.39 2005/09/01 01:40:52 mschimek Exp $ */ #ifndef VT_H #define VT_H #include "bcd.h" /* vbi3_pgno, vbi3_subno */ #include "lang.h" /* vbi3_charset_code */ #include "page.h" /* vbi3_color */ /** * @internal * EN 300 706, Section 9.4.2, Table 3 Page function. */ typedef enum { PAGE_FUNCTION_ACI = -4, /* libzvbi private */ PAGE_FUNCTION_EPG = -3, /* libzvbi private */ PAGE_FUNCTION_DISCARD = -2, /* libzvbi private */ PAGE_FUNCTION_UNKNOWN = -1, /* libzvbi private */ PAGE_FUNCTION_LOP = 0, PAGE_FUNCTION_DATA, PAGE_FUNCTION_GPOP, PAGE_FUNCTION_POP, PAGE_FUNCTION_GDRCS, PAGE_FUNCTION_DRCS, PAGE_FUNCTION_MOT, PAGE_FUNCTION_MIP, PAGE_FUNCTION_BTT, PAGE_FUNCTION_AIT, PAGE_FUNCTION_MPT, PAGE_FUNCTION_MPT_EX, PAGE_FUNCTION_TRIGGER } page_function; extern const char * page_function_name (page_function function); /** * @internal * TOP BTT links to other TOP pages. * top_page_number() translates this to enum page_function. */ typedef enum { TOP_PAGE_FUNCTION_MPT = 1, TOP_PAGE_FUNCTION_AIT, TOP_PAGE_FUNCTION_MPT_EX, } top_page_function; /** * @internal * 9.4.2 Table 3 Page coding. */ typedef enum { PAGE_CODING_UNKNOWN = -1, /**< libzvbi private */ PAGE_CODING_ODD_PARITY, PAGE_CODING_UBYTES, PAGE_CODING_TRIPLETS, PAGE_CODING_HAMMING84, PAGE_CODING_AIT, /** * First byte is a hamming 8/4 coded page_coding, * describing remaining 39 bytes. */ PAGE_CODING_META84 } page_coding; extern const char * page_coding_name (page_coding coding); /** * @internal * TOP BTT page type. * decode_btt_page() translates this to MIP page type * which is defined as enum vbi3_page_type in vbi.h. */ typedef enum { BTT_NO_PAGE = 0, BTT_SUBTITLE, /** S = single page */ BTT_PROGR_INDEX_S, /** M = multi-page (number of subpages in MPT or MPT-EX) */ BTT_PROGR_INDEX_M, BTT_BLOCK_S, BTT_BLOCK_M, BTT_GROUP_S, BTT_GROUP_M, BTT_NORMAL_S, BTT_NORMAL_9, /**< ? */ BTT_NORMAL_M, BTT_NORMAL_11, /**< ? */ BTT_12, /**< ? */ BTT_13, /**< ? */ BTT_14, /**< ? */ BTT_15 /**< ? */ } btt_page_type; /** * @internal * 12.3.1 Table 28 Enhancement object type. */ typedef enum { LOCAL_ENHANCEMENT_DATA = 0, /**< depends on context */ OBJECT_TYPE_NONE = 0, OBJECT_TYPE_ACTIVE, OBJECT_TYPE_ADAPTIVE, OBJECT_TYPE_PASSIVE } object_type; extern const char * object_type_name (object_type type); /** * @internal * 14.2 Table 31, 9.4.6 Table 9 DRCS character coding. */ typedef enum { DRCS_MODE_12_10_1, DRCS_MODE_12_10_2, DRCS_MODE_12_10_4, DRCS_MODE_6_5_4, DRCS_MODE_SUBSEQUENT_PTU = 14, DRCS_MODE_NO_DATA } drcs_mode; extern const char * drcs_mode_name (drcs_mode mode); /** @internal */ #define DRCS_PTUS_PER_PAGE 48 /** @internal */ typedef struct { page_function function; /** NO_PAGE (pgno) when unused or broken. */ vbi3_pgno pgno; /** * X/27/4 ... 5 format 1 (struct lop.link[]): * Set of subpages required: 1 << (0 ... 15). * Otherwise subpage number or VBI3_NO_SUBNO. */ vbi3_subno subno; } pagenum; /** @internal */ #define NO_PAGE(pgno) (((pgno) & 0xFF) == 0xFF) extern void pagenum_dump (const pagenum * pn, FILE * fp); /* Level one page enhancement */ /** * @internal * 12.3.1 Packet X/26 code triplet. * Broken triplets are set to -1, -1, -1. */ typedef struct { unsigned address : 8; unsigned mode : 8; unsigned data : 8; } /* __attribute__ ((packed)) */ triplet; /** @internal */ typedef triplet enhancement[16 * 13 + 1]; /* Level one page extension */ /** * @internal * 9.4.2.2 X/28/0, X/28/4 and * 10.6.4 MOT POP link fallback flags. */ typedef struct { vbi3_bool black_bg_substitution; int left_panel_columns; int right_panel_columns; } ext_fallback; /** @internal */ #define VBI3_TRANSPARENT_BLACK 8 /** * @internal * 9.4.2 Packet X/28 * 9.5 Packet M/29 */ typedef struct { /** * We have data from packets X/28 (in lop) or M/29 (in magazine) * with this set of designations. Magazine is always valid, * LOP should fall back to magazine unless these bits are set: * * - 1 << 4 color_map[0 ... 15] is valid * - 1 << 1 drcs_clut[] is valid * - 1 << 0 or * 1 << 4 everything else is valid. */ unsigned int designations; /** Primary and secondary character set. */ vbi3_charset_code charset_code[2]; /** Blah. */ unsigned int def_screen_color; unsigned int def_row_color; /** * Adding these values (0, 8, 16, 24) to character color * 0 ... 7 gives index into color_map[] below. */ unsigned int foreground_clut; unsigned int background_clut; ext_fallback fallback; /** * - 2 dummy entries, 12x10x1 (G)DRCS use the color_map[] * like built-in chars. * - 4 entries for 12x10x2 GDRCS pixel 0 ... 3 to color_map[]. * - 4 more for local DRCS * - 16 entries for 12x10x4 and 6x5x4 GDRCS pixel 0 ... 15 * to color_map[]. * - 16 more for local DRCS. */ vbi3_color drcs_clut[2 + 2 * 4 + 2 * 16]; /** * CLUTs 0 ... 4 of 8 colors each. CLUT 2 & 3 are redefinable * at Level 2.5, CLUT 0 to 3 at Level 3.5, except color_map[8] * which is "transparent" color (VBI3_TRANSPARENT_BLACK). * CLUT 4 contains libzvbi private colors which never change. */ vbi3_rgba color_map[40]; } extension; extern void extension_dump (const extension * ext, FILE * fp); /** * @internal * * 12.3.1 Table 28 Mode 10001, 10101 - Object invocation, * object definition. See also triplet_object_address(). * * MOT default, POP and GPOP object address. * * n8 n7 n6 n5 n4 n3 n2 n1 n0 * packet triplet lsb ----- s1 ----- */ typedef int object_address; /** @internal */ typedef struct { pagenum page; uint8_t text[12]; } ait_title; /* Level one page */ /** * @internal * 9.3.1.3 Control bits (0xE03F7F), * 15.2 National subset C12-C14, * B.6 Transmission rules for enhancement data. */ #define C4_ERASE_PAGE 0x000080 #define C5_NEWSFLASH 0x004000 #define C6_SUBTITLE 0x008000 #define C7_SUPPRESS_HEADER 0x010000 #define C8_UPDATE 0x020000 #define C9_INTERRUPTED 0x040000 #define C10_INHIBIT_DISPLAY 0x080000 #define C11_MAGAZINE_SERIAL 0x100000 #define C12_FRAGMENT 0x200000 #define C13_PARTIAL_PAGE 0x400000 #define C14_RESERVED 0x800000 /** * @internal * @brief Level one page. */ struct lop { /** Raw text as received. */ uint8_t raw[26][40]; /** Packet X/27/0-5 links. */ pagenum link[6 * 6]; /** * Packet X/27 flag (ETR 287 section 10.4): * Have FLOF navigation, display row 24. */ vbi3_bool have_flof; }; /* Magazine */ /** * @internal * 10.6.4 MOT object links */ typedef struct { vbi3_pgno pgno; ext_fallback fallback; struct { object_type type; object_address address; } default_obj[2]; } pop_link; /** * @internal * @brief Magazine defaults. */ typedef struct { /** Default extension. */ extension extension; /** * Page number to pop_link[] and drcs_link[] for default * object invocation. Valid range is 0 ... 7, broken -1. */ uint8_t pop_lut[0x100]; uint8_t drcs_lut[0x100]; /** * Level 2.5 (0) or 3.5 (1), 1 global and 7 local links to * POP/DRCS page. Unused or broken: NO_PAGE (pgno). */ pop_link pop_link[2][8]; vbi3_pgno drcs_link[2][8]; } magazine; /* Network */ /** @inline */ #define SUBCODE_SINGLE_PAGE 0x0000 /** @inline */ #define SUBCODE_MULTI_PAGE 0xFFFE /** @inline */ #define SUBCODE_UNKNOWN 0xFFFF /** @inline */ typedef struct { /* Information gathered from MOT, MIP, BTT, G/POP pages. */ /** Actually a vbi3_page_type. */ uint8_t page_type; /** Actually a vbi3_charset_code, 0xFF unknown. */ uint8_t charset_code; /** * Highest subpage number transmitted according to MOT, MIP, BTT. * - 0x0000 single page (SUBCODE_SINGLE_PAGE) * - 0x0002 - 0x0079 multi-page * - 0x0080 - 0x3F7F clock page, other pages with non-standard * subpages not to be cached * - 0xFFFE has 2+ subpages (libzvbi) (SUBCODE_MULTI_PAGE) * - 0xFFFF unknown (libzvbi) (SUBCODE_UNKNOWN) */ uint16_t subcode; /** Last received page flags (cache_page.flags) */ uint32_t flags; /* Cache statistics. */ /** Subpages cached now and ever. */ uint8_t n_subpages; uint8_t max_subpages; /** Subpage numbers actually encountered (0x00 ... 0x79). */ uint8_t subno_min; uint8_t subno_max; } page_stat; extern const magazine * _vbi3_teletext_decoder_default_magazine (void); #endif /* VT_H */ zapping-0.10cvs6/libvbi/export.c 644 764 144 100177 10305455435 12013 /* * libzvbi - Export modules * * Copyright (C) 2001, 2002, 2003, 2004 Michael H. Schimek * * Based on code from AleVT 1.5.1 * Copyright (C) 1998, 1999 Edgar Toernig * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* $Id: export.c,v 1.52 2005/09/01 01:36:29 mschimek Exp $ */ #ifdef HAVE_CONFIG_H # include "config.h" #endif #include #include #include #include #include #include #include #include /* fabs() */ #include "misc.h" #ifdef ZAPPING8 # include "common/intl-priv.h" #else # include "intl-priv.h" #endif #include "export-priv.h" /** * @addtogroup Export Exporting formatted Teletext and Closed Caption pages * @ingroup Service * * Once libzvbi received, decoded and formatted a Teletext or Closed * Caption page you will want to render it on screen, print it as * text or store it in various formats. * * Fortunately you don't have to do it all by yourself. libzvbi provides * export modules converting a vbi3_page into the desired format or * rendering directly into memory. * * A minimalistic export example: * * @code * static void * export_my_page (vbi3_page *pg) * { * vbi3_export *ex; * char *errstr; * * if (!(ex = vbi3_export_new ("html", &errstr))) { * fprintf (stderr, "Cannot export as HTML: %s\n", errstr); * free (errstr); * return; * } * * if (!vbi3_export_file (ex, "my_page.html", pg)) * puts (vbi3_export_errstr (ex)); * * vbi3_export_delete (ex); * } * @endcode */ /** * @addtogroup Exmod Internal export module interface * @ingroup Export * * This is the private interface between the public libzvbi export * functions and export modules. libzvbi client applications * don't use this. * * Export modules @c #include @c "export.h" to get these * definitions. See example module exp-templ.c. */ /** * @addtogroup Render Teletext and Closed Caption page render functions * @ingroup Export * * These are functions to render Teletext and Closed Caption pages * directly into memory, essentially a more direct interface to the * functions of some important export modules. */ extern _vbi3_export_module _vbi3_export_module_html; extern _vbi3_export_module _vbi3_export_module_mpsub; extern _vbi3_export_module _vbi3_export_module_png; extern _vbi3_export_module _vbi3_export_module_ppm; extern _vbi3_export_module _vbi3_export_module_qttext; extern _vbi3_export_module _vbi3_export_module_realtext; extern _vbi3_export_module _vbi3_export_module_sami; extern _vbi3_export_module _vbi3_export_module_subrip; extern _vbi3_export_module _vbi3_export_module_subviewer; extern _vbi3_export_module _vbi3_export_module_text; extern _vbi3_export_module _vbi3_export_module_tmpl; extern _vbi3_export_module _vbi3_export_module_vtx; static const _vbi3_export_module * export_modules [] = { &_vbi3_export_module_ppm, #ifdef HAVE_LIBPNG &_vbi3_export_module_png, #endif &_vbi3_export_module_html, &_vbi3_export_module_text, &_vbi3_export_module_vtx, &_vbi3_export_module_mpsub, &_vbi3_export_module_qttext, &_vbi3_export_module_realtext, &_vbi3_export_module_sami, &_vbi3_export_module_subrip, &_vbi3_export_module_subviewer, /* &_vbi3_export_module_tmpl, */ }; static vbi3_export_info local_export_info [N_ELEMENTS (export_modules)]; static const vbi3_option_info generic_options [] = { _VBI3_OPTION_STRING_INITIALIZER ("creator", NULL, PACKAGE " " VERSION, NULL), _VBI3_OPTION_STRING_INITIALIZER ("network", NULL, "", NULL), _VBI3_OPTION_BOOL_INITIALIZER ("reveal", NULL, FALSE, NULL) }; static void reset_error (vbi3_export * e) { if (e->errstr) { vbi3_free (e->errstr); e->errstr = NULL; } } /** * @param e Initialized vbi3_export object. * @param templ See printf(). * @param ... See printf(). * * Stores an error description in the @a export object. Including the * current error description (to append or prepend) is safe. */ void _vbi3_export_error_printf (vbi3_export * e, const char * templ, ...) { char buf[512]; va_list ap; if (!e) return; va_start (ap, templ); vsnprintf (buf, sizeof (buf) - 1, templ, ap); va_end (ap); reset_error (e); e->errstr = strdup (buf); } /** * @param e Initialized vbi3_export object. * * Like vbi3_export_error_printf this function stores an error * description in the @a export object, after examining the errno * variable and choosing an appropriate message. Only export * modules call this function. */ void _vbi3_export_write_error (vbi3_export * e) { if (!e) return; if (errno) { _vbi3_export_error_printf (e, "%s.", strerror (errno)); } else { _vbi3_export_error_printf (e, _("Write error.")); } } void _vbi3_export_malloc_error (vbi3_export * e) { if (!e) return; _vbi3_export_error_printf (e, _("Out of memory.")); } static const char * module_name (vbi3_export * e) { const vbi3_export_info *xi = e->module->export_info; if (xi->label) return _(xi->label); else return xi->keyword; } /** * @param e Initialized vbi3_export object. * @param keyword Name of the unknown option. * * Stores an error description in the export object. */ void _vbi3_export_unknown_option (vbi3_export * e, const char * keyword) { _vbi3_export_error_printf (e, _("Export module %s has no option %s."), module_name (e), keyword); } /** * @param e Initialized vbi3_export object. * @param keyword Name of the unknown option. * @param ... Invalid value, type depending on the option. * * Stores an error description in the export object. */ void _vbi3_export_invalid_option (vbi3_export * e, const char * keyword, ...) { char buf[512]; const vbi3_option_info *oi; if ((oi = vbi3_export_option_info_by_keyword (e, keyword))) { va_list ap; const char *s; va_start (ap, keyword); switch (oi->type) { case VBI3_OPTION_BOOL: case VBI3_OPTION_INT: case VBI3_OPTION_MENU: snprintf (buf, sizeof (buf) - 1, "'%d'", va_arg (ap, int)); break; case VBI3_OPTION_REAL: snprintf (buf, sizeof (buf) - 1, "'%f'", va_arg (ap, double)); break; case VBI3_OPTION_STRING: s = va_arg (ap, const char *); if (!s) STRCOPY (buf, "NULL"); else snprintf (buf, sizeof (buf) - 1, "'%s'", s); break; default: fprintf (stderr, "%s: unknown export option type %d\n", __PRETTY_FUNCTION__, oi->type); STRCOPY (buf, "?"); break; } va_end (ap); } else { buf[0] = 0; } _vbi3_export_error_printf (e, _("Invalid argument %s " "for option %s of export module %s."), buf, keyword, module_name (e)); } /** * @param e Initialized vbi3_export object. * @param d If non-zero, store pointer to allocated string here. When *d * is non-zero, free(*d) the old string first. * @param s String to be duplicated. * * Helper function for export modules. * * Same as the libc strdup(), except for @a d argument and setting * the @a e error string on failure. * * @returns * @c NULL on failure, pointer to malloc()ed string otherwise. */ char * _vbi3_export_strdup (vbi3_export * e, char ** d, const char * s) { char *new_string = strdup (s ? s : ""); if (!new_string) { _vbi3_export_malloc_error (e); errno = ENOMEM; return NULL; } if (d) { if (*d) vbi3_free (*d); *d = new_string; } return new_string; } /** * @param e Initialized vbi3_export object. * * @returns * After an export function failed, this function returns a pointer * to a more detailed error description. It remains valid until the * next call of an export function. */ const char * vbi3_export_errstr (vbi3_export * e) { assert (NULL != e); if (!e->errstr) return _("Unknown error."); return e->errstr; } /** * @param e Initialized vbi3_export object. * @param fp Buffered i/o stream to write to. * @param pg Page to be exported. * * This function writes the @a pg contents, converted to the respective * export module format, to the stream @a fp. The caller is responsible for * opening and closing the stream, don't forget to check for i/o * errors after closing. Note this function may write incomplete files * when an error occurs. * * You can call this function as many times as you want, it does not * change vbi3_export state or the vbi3_page. * * @return * @c TRUE on success. */ vbi3_bool vbi3_export_stdio (vbi3_export * e, FILE * fp, const vbi3_page * pg) { vbi3_bool success; assert (NULL != e); assert (NULL != fp); if (!e->module->export_info->open_format) { if (NULL == pg) return TRUE; } e->fp = fp; reset_error (e); clearerr (fp); success = e->module->export (e, pg); if (success && ferror (fp)) { _vbi3_export_write_error (e); success = FALSE; } e->fp = NULL; return success; } /** * @param export Initialized vbi3_export object. * @param name File to be created. * @param pg Page to be exported. * * Writes the @a pg contents, converted to the respective * export format, into a new file of the given @a name. When an error * occured the incomplete file will be deleted. * * You can call this function as many times as you want, it does not * change vbi3_export state or the vbi3_page. * * @returns * @c TRUE on success. */ vbi3_bool vbi3_export_file (vbi3_export * e, const char * name, const vbi3_page * pg) { struct stat st; vbi3_bool success; assert (NULL != e); assert (NULL != name); assert (NULL != pg); reset_error (e); if (!(e->fp = fopen (name, "w"))) { _vbi3_export_error_printf (e, _("Could not create %s. %s."), name, strerror (errno)); return FALSE; } e->name = name; success = e->module->export (e, pg); if (success && ferror (e->fp)) { _vbi3_export_write_error (e); success = FALSE; } if (fclose (e->fp)) { if (success) { _vbi3_export_write_error (e); success = FALSE; } } e->fp = NULL; if (!success && 0 == stat (name, &st) && S_ISREG (st.st_mode)) remove (name); e->name = NULL; return success; } #ifndef ZAPPING8 static void export_stream (vbi3_event * ev, void * user_data) { ev = ev; user_data = user_data; #if 0 vbi3_export *e = (vbi3_export *) user_data; vbi3_page_private pgp; if (!(VBI3_EVENT_TTX_PAGE == ev->type) || e->stream.pgno != ev.ttx_page.pgno) return; if (VBI3_ANY_SUBNO != e->stream.subno && e->stream.subno != ev.ttx_page.subno) return; /* to do get page */ if (!vbi3_format_vt_page (ev->vbi, ev->ev.ttx_page.pgno, ev->ev.ttx_page.subno, 0)) return; if (!vbi3_export_stdio (e, e->fp, &pgp.pg)) { /* to do */ } /* to do destroy page */ #endif } /** * @param e Initialized vbi3_export object. * * Finalizes a file created by a streaming export context. Closes the * file when streaming was started with vbi3_export_stream_file(). Detaches * the vbi3_export context from the vbi3_decoder. * * @returns * FALSE on failure. * * @bugs * Not implemented yet. */ vbi3_bool vbi3_export_stream_close (vbi3_export * e) { e = e; /* to do */ return FALSE; } /** * @param e Initialized vbi3_export object. * @param fp Buffered i/o stream to write to. * @param vbi VBI decoder providing vbi3_pages. * @param pgno Page number of the page to export. * @param subno Subpage number of the page to export, can be * @c VBI3_ANY_SUBNO. * @param format_options Format option list, see * vbi3_fetch_vt_page() for details. * * Attaches a vbi3_export context to a vbi3_decoder, to export page * @a pgno, @a subno every time it is received. This is most useful to * convert subtitle pages to a subtitle file. * * @returns * FALSE on failure. * * @bugs * Not implemented yet. */ vbi3_bool vbi3_export_stream_stdio_va_list (vbi3_export * e, FILE * fp, vbi3_decoder * vbi, vbi3_pgno pgno, vbi3_subno subno, va_list format_options) { e = e; vbi = vbi; fp = fp; format_options = format_options; e->stream.pgno = pgno; e->stream.subno = subno; /* to do */ return FALSE; export_stream (0, 0); } /** * @param e Initialized vbi3_export object. * @param fp Buffered i/o stream to write to. * @param vbi VBI decoder providing vbi3_pages. * @param pgno Page number of the page to export. * @param subno Subpage number of the page to export, can be * @c VBI3_ANY_SUBNO. * @param ... Format option list, see vbi3_fetch_vt_page() for details. * * Attaches a vbi3_export context to a vbi3_decoder, to export page * @a pgno, @a subno every time it is received. This is most useful to * convert subtitle pages to a subtitle file. * * @returns * FALSE on failure. * * @bugs * Not implemented yet. */ vbi3_bool vbi3_export_stream_stdio (vbi3_export * e, FILE * fp, vbi3_decoder * vbi, vbi3_pgno pgno, vbi3_subno subno, ...) { va_list format_options; vbi3_bool r; va_start (format_options, subno); r = vbi3_export_stream_stdio_va_list (e, fp, vbi, pgno, subno, format_options); va_end (format_options); return r; } /** * @param e Initialized vbi3_export object. * @param name File to be created. * @param vbi VBI decoder providing vbi3_pages. * @param pgno Page number of the page to export. * @param subno Subpage number of the page to export, can be * @c VBI3_ANY_SUBNO. * @param format_options Format option list, see * vbi3_fetch_vt_page() for details. * * Attaches a vbi3_export context to a vbi3_decoder, to export page * @a pgno, @a subno every time it is received. This is most useful to * convert subtitle pages to a subtitle file. * * @returns * FALSE on failure. * * @bugs * Not implemented yet. */ vbi3_bool vbi3_export_stream_file_va_list (vbi3_export * e, const char * name, vbi3_decoder * vbi, vbi3_pgno pgno, vbi3_subno subno, va_list format_options) { e = e; vbi = vbi; name = name; format_options = format_options; e->stream.pgno = pgno; e->stream.subno = subno; /* to do */ return FALSE; } /** * @param e Initialized vbi3_export object. * @param name File to be created. * @param vbi VBI decoder providing vbi3_pages. * @param pgno Page number of the page to export. * @param subno Subpage number of the page to export, can be * @c VBI3_ANY_SUBNO. * @param ... Format option list, see vbi3_fetch_vt_page() for details. * * Attaches a vbi3_export context to a vbi3_decoder, to export page * @a pgno, @a subno every time it is received. This is most useful to * convert subtitle pages to a subtitle file. * * @returns * FALSE on failure. * * @bugs * Not implemented yet. */ vbi3_bool vbi3_export_stream_file (vbi3_export * e, const char * name, vbi3_decoder * vbi, vbi3_pgno pgno, vbi3_subno subno, ...) { va_list format_options; vbi3_bool r; va_start (format_options, subno); r = vbi3_export_stream_file_va_list (e, name, vbi, pgno, subno, format_options); va_end (format_options); return r; } #endif /* !ZAPPING8 */ /** */ void vbi3_export_set_link_cb (vbi3_export * e, vbi3_export_link_cb * callback, void * user_data) { assert (NULL != e); e->link_callback = callback; e->link_user_data = user_data; } /** */ void vbi3_export_set_pdc_cb (vbi3_export * e, vbi3_export_pdc_cb * callback, void * user_data) { assert (NULL != e); e->pdc_callback = callback; e->pdc_user_data = user_data; } /** */ void vbi3_export_set_timestamp (vbi3_export * e, double timestamp) { assert (NULL != e); if (!e->stream.have_timestamp) { e->stream.start_timestamp = timestamp; e->stream.have_timestamp = TRUE; } e->stream.timestamp = timestamp; } /** * @param e Initialized vbi3_export object. * @param keyword Keyword identifying the option as in vbi3_option_info. * @param entry A place to store the current menu entry. * * Similar to vbi3_export_option_get() this function queries the current * value of the named option, but returns the value as number of the * corresponding menu entry. Naturally this must be an option with * menu. * * @return * @c TRUE on success, otherwise @c FALSE @a *entry is unchanged. */ vbi3_bool vbi3_export_option_menu_get (vbi3_export * e, const char * keyword, unsigned int * entry) { const vbi3_option_info *oi; vbi3_option_value val; vbi3_bool r; unsigned int i; assert (NULL != e); assert (NULL != keyword); assert (NULL != entry); reset_error (e); if (!(oi = vbi3_export_option_info_by_keyword (e, keyword))) return FALSE; if (!vbi3_export_option_get (e, keyword, &val)) return FALSE; r = FALSE; for (i = 0; i <= (unsigned int) oi->max.num; ++i) { switch (oi->type) { case VBI3_OPTION_BOOL: case VBI3_OPTION_INT: if (!oi->menu.num) return FALSE; r = (oi->menu.num[i] == val.num); break; case VBI3_OPTION_REAL: if (!oi->menu.dbl) return FALSE; r = fabs (oi->menu.dbl[i] - val.dbl) < 1e-3; break; case VBI3_OPTION_MENU: r = (i == (unsigned int) val.num); break; default: fprintf (stderr, "%s: unknown export option type %d\n", __PRETTY_FUNCTION__, oi->type); exit (EXIT_FAILURE); } if (r) { *entry = i; break; } } return r; } /** * @param export Initialized vbi3_export object. * @param keyword Keyword identifying the option, as in vbi3_option_info. * @param entry Menu entry to be selected. * * Similar to vbi3_export_option_set() this function sets the value of * the named option, however it does so by number of the corresponding * menu entry. Naturally this must be an option with menu. * * @return * @c TRUE on success, otherwise @c FALSE and the option is not changed. */ vbi3_bool vbi3_export_option_menu_set (vbi3_export * e, const char * keyword, unsigned int entry) { const vbi3_option_info *oi; assert (NULL != e); assert (NULL != keyword); reset_error (e); if (!(oi = vbi3_export_option_info_by_keyword (e, keyword))) return FALSE; if (entry > (unsigned int) oi->max.num) return FALSE; switch (oi->type) { case VBI3_OPTION_BOOL: case VBI3_OPTION_INT: if (!oi->menu.num) return FALSE; return vbi3_export_option_set (e, keyword, oi->menu.num[entry]); case VBI3_OPTION_REAL: if (!oi->menu.dbl) return FALSE; return vbi3_export_option_set (e, keyword, oi->menu.dbl[entry]); case VBI3_OPTION_MENU: return vbi3_export_option_set (e, keyword, entry); default: fprintf (stderr, "%s: unknown export option type %d\n", __PRETTY_FUNCTION__, oi->type); exit (EXIT_FAILURE); } } #define KEYWORD(str) (0 == strcmp (keyword, str)) /** * @param e Initialized vbi3_export object. * @param keyword Keyword identifying the option as in vbi3_option_info. * @param value A place to store the current option value. * * This function queries the current value of the named option. * When the option is of type VBI3_OPTION_STRING @a value.str must be * freed with vbi3_free() when the string is no longer needed. When the * option is of type VBI3_OPTION_MENU then @a value.num contains the * selected entry. * * @returns * @c TRUE on success, otherwise @c FALSE and @a value is unchanged. */ vbi3_bool vbi3_export_option_get (vbi3_export * e, const char * keyword, vbi3_option_value * value) { vbi3_bool r; assert (NULL != e); assert (NULL != keyword); assert (NULL != value); reset_error (e); r = TRUE; if (KEYWORD ("reveal")) { value->num = e->reveal; } else if (KEYWORD ("network")) { char *s; s = _vbi3_export_strdup (e, NULL, e->network ? : ""); if (s) value->str = s; else r = FALSE; } else if (KEYWORD ("creator")) { char *s; s = _vbi3_export_strdup (e, NULL, e->creator); if (s) value->str = s; else r = FALSE; } else { const _vbi3_export_module *xc; xc = e->module; if (xc->option_get) { r = xc->option_get (e, keyword, value); } else { _vbi3_export_unknown_option (e, keyword); r = FALSE; } } return r; } /** * @param e Initialized vbi3_export object. * @param keyword Keyword identifying the option as in vbi3_option_info. * @param Varargs New value to set. * * Sets the value of the named option. Make sure the value is casted * to the correct type (int, double, char *). * * Typical usage of vbi3_export_option_set(): * @code * vbi3_export_option_set (export, "quality", 75.5); * @endcode * * Mind that options of type @c VBI3_OPTION_MENU must be set by menu * entry number (int), all other options by value. If necessary it will * be replaced by the closest value possible. Use function * vbi3_export_option_menu_set() to set options with menu * by menu entry. * * @return * @c TRUE on success, otherwise @c FALSE and the option is not changed. */ vbi3_bool vbi3_export_option_set (vbi3_export * e, const char * keyword, ...) { vbi3_bool r; va_list ap; assert (NULL != e); assert (NULL != keyword); reset_error (e); r = TRUE; va_start (ap, keyword); if (KEYWORD ("reveal")) { e->reveal = !!va_arg (ap, vbi3_bool); } else if (KEYWORD ("network")) { const char *network = va_arg (ap, const char *); if (!network || !network[0]) { if (e->network) { vbi3_free (e->network); e->network = NULL; } } else if (!_vbi3_export_strdup (e, &e->network, network)) { r = FALSE; } } else if (KEYWORD ("creator")) { const char *creator = va_arg (ap, const char *); if (!_vbi3_export_strdup (e, &e->creator, creator)) r = FALSE; } else { const _vbi3_export_module *xc; xc = e->module; if (xc->option_set) r = xc->option_set (e, keyword, ap); else r = FALSE; } va_end (ap); return r; } /** * @param e Initialized vbi3_export object. * @param indx Index into the option table 0 ... n. * * Enumerates the options available for the given export module. You * should start at index 0, incrementing. * * @returns * Pointer to a vbi3_option_info structure, * @c NULL if @a indx is out of bounds. */ const vbi3_option_info * vbi3_export_option_info_enum (vbi3_export * e, unsigned int indx) { unsigned int size; assert (NULL != e); reset_error (e); size = N_ELEMENTS (generic_options) + e->module->option_info_size; if (indx >= size) return NULL; return e->local_option_info + indx; } /** * @param e Initialized vbi3_export object. * @param keyword Option identifier as in vbi3_option_info. * * Like vbi3_export_option_info_enum(), except this function tries to * find the option by keyword. * * @returns * Pointer to a vbi3_option_info structure, * @c NULL if the named option was not found. */ const vbi3_option_info * vbi3_export_option_info_by_keyword (vbi3_export * e, const char * keyword) { unsigned int size; unsigned int i; assert (NULL != e); if (!keyword) return NULL; reset_error (e); size = N_ELEMENTS (generic_options) + e->module->option_info_size; for (i = 0; i < size; ++i) if (0 == strcmp (keyword, e->local_option_info[i].keyword)) return e->local_option_info + i; _vbi3_export_unknown_option (e, keyword); return NULL; } /** * @param indx Index into the export module list 0 ... n. * * Enumerates available export modules. You should start at index 0, * incrementing. Some modules may depend on machine features or the presence * of certain libraries, thus the list can vary from session to session. * * @return * Pointer to a vbi3_export_info structure, * @c NULL if the @a indx is out of bounds. */ const vbi3_export_info * vbi3_export_info_enum (unsigned int indx) { const _vbi3_export_module *xc; vbi3_export_info *xi; if (indx >= N_ELEMENTS (export_modules)) return NULL; xc = export_modules[indx]; xi = local_export_info + indx; xi->keyword = xc->export_info->keyword; xi->label = _(xc->export_info->label); xi->tooltip = _(xc->export_info->tooltip); xi->mime_type = xc->export_info->mime_type; xi->extension = xc->export_info->extension; xi->open_format = xc->export_info->open_format; return xi; } /** * @param keyword Export module identifier as in vbi3_export_info and * vbi3_export_new(). * * Like vbi3_export_info_enum(), except this function tries to find * an export module by keyword. * * @return * Pointer to a vbi3_export_info structure, * @c NULL if the named export module was not found. */ const vbi3_export_info * vbi3_export_info_by_keyword (const char * keyword) { unsigned int keylen; unsigned int i; if (!keyword) return NULL; for (keylen = 0; keyword[keylen]; ++keylen) if (';' == keyword[keylen] || ',' == keyword[keylen]) break; for (i = 0; i < N_ELEMENTS (export_modules); ++i) { const vbi3_export_info *xi; xi = export_modules[i]->export_info; if (0 == strncmp (keyword, xi->keyword, keylen)) { return vbi3_export_info_enum (i); } } return NULL; } /** * @param e vbi3_export object allocated with vbi3_export_new(). * * Returns the export module info for the given @a export object. * * @return * Pointer to vbi3_export_info structure or * @c NULL if @a e is @c NULL. */ const vbi3_export_info * vbi3_export_info_from_export (const vbi3_export * e) { assert (NULL != e); return e->local_export_info; } static void free_option_info (vbi3_option_info * oi, unsigned int oi_size) { unsigned int i; for (i = 0; i < oi_size; ++i) { if (VBI3_OPTION_MENU == oi[i].type) { vbi3_free (oi[i].menu.str); } } vbi3_free (oi); } /** * @param e vbi3_export object allocated with vbi3_export_new(). * * Frees all resources associated with the export object. */ void vbi3_export_delete (vbi3_export * e) { const _vbi3_export_module *xc; if (!e) return; vbi3_free (e->errstr); vbi3_free (e->network); vbi3_free (e->creator); xc = e->module; free_option_info (e->local_option_info, N_ELEMENTS (generic_options) + xc->option_info_size); if (xc->_new && xc->_delete) { xc->_delete (e); } else { vbi3_free (e); } } static vbi3_option_info * localize_option_info (const vbi3_option_info *oi, unsigned int oi_size) { vbi3_option_info *loi; unsigned int size; unsigned int i; size = (N_ELEMENTS (generic_options) + oi_size) * sizeof (*loi); if (!(loi = vbi3_malloc (size))) return NULL; memcpy (loi, generic_options, N_ELEMENTS (generic_options) * sizeof (*loi)); memcpy (loi + N_ELEMENTS (generic_options), oi, oi_size * sizeof (*loi)); oi_size += N_ELEMENTS (generic_options); for (i = 0; i < oi_size; ++i) { loi[i].label = _(loi[i].label); loi[i].tooltip = _(loi[i].tooltip); if (VBI3_OPTION_MENU == loi[i].type) { unsigned int j; const char **menu; size = loi[i].max.num + 1; if (!(menu = vbi3_malloc (size * sizeof (*menu)))) { free_option_info (loi, i); return NULL; } for (j = 0; j < size; ++j) menu[j] = _(loi[i].menu.str[j]); loi[i].menu.str = menu; } } return loi; } static void reset_options (vbi3_export * e) { const vbi3_option_info *oi; unsigned int i; for (i = 0; (oi = vbi3_export_option_info_enum (e, i)); ++i) { switch (oi->type) { case VBI3_OPTION_BOOL: case VBI3_OPTION_INT: if (oi->menu.num) vbi3_export_option_set (e, oi->keyword, oi->menu.num[oi->def.num]); else vbi3_export_option_set (e, oi->keyword, oi->def.num); break; case VBI3_OPTION_REAL: if (oi->menu.dbl) vbi3_export_option_set (e, oi->keyword, oi->menu.dbl[oi->def.num]); else vbi3_export_option_set (e, oi->keyword, oi->def.dbl); break; case VBI3_OPTION_STRING: if (oi->menu.str) vbi3_export_option_set (e, oi->keyword, oi->menu.str[oi->def.num]); else vbi3_export_option_set (e, oi->keyword, oi->def.str); break; case VBI3_OPTION_MENU: vbi3_export_option_set (e, oi->keyword, oi->def.num); break; default: fprintf (stderr, "%s: unknown export option type %u\n", __PRETTY_FUNCTION__, oi->type); exit (EXIT_FAILURE); } } } static vbi3_bool option_string (vbi3_export * e, const char * s2) { const vbi3_option_info *oi; char *s; char *s1; char *keyword; char *string; char quote; vbi3_bool r = TRUE; if (!(s = s1 = _vbi3_export_strdup (e, NULL, s2))) return FALSE; do { while (isspace (*s)) ++s; if (',' == *s || ';' == *s) { ++s; continue; } if (!*s) { vbi3_free (s1); return TRUE; } keyword = s; while (isalnum (*s) || '_' == *s) ++s; if (!*s) goto invalid; *s++ = 0; while (isspace (*s) || '=' == *s) ++s; if (!*s) { invalid: _vbi3_export_error_printf (e, _("Invalid option string \"%s\"."), s2); break; } if (!(oi = vbi3_export_option_info_by_keyword (e, keyword))) break; switch (oi->type) { case VBI3_OPTION_BOOL: case VBI3_OPTION_INT: case VBI3_OPTION_MENU: r = vbi3_export_option_set (e, keyword, (int) strtol (s, &s, 0)); break; case VBI3_OPTION_REAL: r = vbi3_export_option_set (e, keyword, (double) strtod (s, &s)); break; case VBI3_OPTION_STRING: quote = 0; if ('\'' == *s || '\"' == *s) /* " */ quote = *s++; string = s; while (*s && *s != quote && (quote || (',' != *s && ';' != *s))) ++s; if (*s) *s++ = 0; r = vbi3_export_option_set (e, keyword, string); break; default: fprintf (stderr, "%s: unknown export option type %d\n", __PRETTY_FUNCTION__, oi->type); exit (EXIT_FAILURE); } } while (r); vbi3_free (s1); return FALSE; } /** * @param keyword Export module identifier as in vbi3_export_info. * @param errstr If not @c NULL this function stores a pointer to an error * description here. You must free() this string when no longer needed. * * Creates a new export module instance to export a vbi3_page in * the respective module format. As a special service you can * initialize options by appending to the @param keyword like this: * * @code * vbi3_export_new ("keyword; quality=75.5, comment=\"example text\""); * @endcode * * @return * Pointer to a newly allocated vbi3_export object which must be * freed by calling vbi3_export_delete(). @c NULL is returned and * the @a errstr may be set (else @a NULL) if some problem occurred. */ vbi3_export * vbi3_export_new (const char * keyword, char ** errstr) { char key[256]; const _vbi3_export_module *xc; vbi3_export *e; unsigned int keylen; unsigned int i; if (errstr) *errstr = NULL; if (!keyword) keyword = ""; for (keylen = 0; keyword[keylen] && keylen < (sizeof (key) - 1) && ';' != keyword[keylen] && ',' != keyword[keylen]; ++keylen) key[keylen] = keyword[keylen]; key[keylen] = 0; for (i = 0; i < N_ELEMENTS (export_modules); ++i) { const vbi3_export_info *xi; xc = export_modules[i]; xi = xc->export_info; if (0 == strncmp (keyword, xi->keyword, keylen)) break; } if (i >= N_ELEMENTS (export_modules)) { if (errstr) _vbi3_asprintf (errstr, _("Unknown export module '%s'."), key); return NULL; } if (!xc->_new) { if ((e = vbi3_malloc (sizeof (*e)))) CLEAR (*e); } else { e = xc->_new (xc); } if (!e) { if (errstr) _vbi3_asprintf (errstr, _("Cannot initialize export " "module '%s', " "probably lack of memory."), xc->export_info->label ? xc->export_info->label : keyword); return NULL; } e->module = xc; e->errstr = NULL; e->stream.start_timestamp = 0.0; e->stream.timestamp = 0.0; e->local_export_info = vbi3_export_info_enum (i); e->local_option_info = localize_option_info (xc->option_info, xc->option_info_size); if (!e->local_option_info) { vbi3_free (e); if (errstr) _vbi3_asprintf (errstr, _("Cannot initialize export module " "'%s', out of memory."), xc->export_info->label ? xc->export_info->label : keyword); return NULL; } e->name = NULL; reset_options (e); if (keyword[keylen] && !option_string (e, keyword + keylen + 1)) { if (errstr) *errstr = strdup(vbi3_export_errstr(e)); vbi3_export_delete(e); return NULL; } if (errstr) errstr = NULL; return e; } zapping-0.10cvs6/libvbi/export.h 644 764 144 26340 10305456044 11774 /* * libzvbi - Export modules * * Copyright (C) 2001, 2002, 2003, 2004 Michael H. Schimek * * Based on code from AleVT 1.5.1 * Copyright (C) 1998, 1999 Edgar Toernig * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* $Id: export.h,v 1.37 2005/09/01 01:40:52 mschimek Exp $ */ #ifndef __ZVBI3_EXPORT_H__ #define __ZVBI3_EXPORT_H__ #include /* va_list */ #include /* FILE */ #include "macros.h" #include "bcd.h" /* vbi3_pgno, vbi3_subno */ #include "link.h" /* vbi3_link */ #include "pdc.h" /* vbi3_preselection */ #include "page.h" /* vbi3_page */ #include "vbi_decoder.h" /* vbi3_decoder */ VBI3_BEGIN_DECLS /** * @ingroup Export * @brief Export context. * * The contents of this structure are private. * Call vbi3_export_new() to allocate an export module instance. */ typedef struct _vbi3_export vbi3_export; /** * @ingroup Export * @brief Information about an export module. * * You can obtain this information with vbi3_export_info_enum(). */ typedef struct vbi3_export_info { /** * Unique (within this library) keyword identifying * this export module, a NUL terminated ASCII string. */ const char * keyword; /** * Localized name of the export module for the user interface. Can * be @c NULL if the option is not supposed to be listed in the UI. */ const char * label; /** * A localized description of the option for the user, * can be @c NULL. */ const char * tooltip; /** * Description of the export format as MIME type, * a NUL terminated ASCII string, for example "text/html". * Can be @c NULL if no MIME type applicable. */ const char * mime_type; /** * Suggested filename extension, a NUL terminated ASCII string. * Multiple strings are possible, separated by comma. The first * string is preferred. Example: "html,htm". Can be @c NULL. */ const char * extension; /** * The file format is open, it can contain more than one * vbi3_page. Call vbi3_export_stdio() with a NULL vbi3_page * pointer to finalize the file. */ vbi3_bool open_format; } vbi3_export_info; /** * @ingroup Export */ typedef enum { /** * A boolean value, either @c TRUE (1) or @c FALSE (0). * * * * * *
Type:int
Default:def.num
Bounds:min.num (0) ... max.num (1), * step.num (1)
Menu:%NULL
*/ VBI3_OPTION_BOOL = 1, /** * A signed integer value. When only a few discrete values rather than * a range are permitted @p menu points to a vector of integers. Note * the option is still set by value, not by menu index. Setting the * value may fail, or it may be replaced by the closest possible. * * * * * * *
Type:int
Default:def.num or menu.num[def.num]
Bounds:min.num ... max.num, step.num or menu
Menu:%NULL or menu.num[min.num ... max.num], * step.num (1)
*/ VBI3_OPTION_INT, /** * A real value, optional a vector of suggested values. * * * * * *
Type:double
Default:def.dbl or menu.dbl[def.num]
Bounds:min.dbl ... max.dbl, * step.dbl or menu
Menu:%NULL or menu.dbl[min.num ... max.num], * step.num (1)
*/ VBI3_OPTION_REAL, /** * A null terminated string. Note the menu version differs from * VBI3_OPTION_MENU in its argument, which is the string itself. * For example: * @code * menu.str[0] = "red" * menu.str[1] = "blue" * ... and the option may accept other strings not explicitely listed. * @endcode * * * * * *
Type:char *
Default:def.str or menu.str[def.num]
Bounds:not applicable
Menu:%NULL or menu.str[min.num ... max.num], * step.num (1)
*/ VBI3_OPTION_STRING, /** * Choice between a number of named options. For example: * @code * menu.str[0] = "up" * menu.str[1] = "down" * menu.str[2] = "strange" * @endcode * * * * * *
Type:int
Default:def.num
Bounds:min.num (0) ... max.num, * step.num (1)
Menu:menu.str[min.num ... max.num], * step.num (1). * The menu strings are localized. *
*/ VBI3_OPTION_MENU } vbi3_option_type; /** * @ingroup Export * @brief Result of an option query. */ typedef union { int num; double dbl; char * str; } vbi3_option_value; /** * @ingroup Export * @brief Option menu types. */ typedef union { int * num; double * dbl; char ** str; } vbi3_option_value_ptr; /** * @ingroup Export * @brief Information about an export option. * * Clients can access known options by keyword, or enumerate unknown * options and use the information in this structure for proper * presentation and access. * * You can obtain this information with vbi3_export_option_info_enum(). */ typedef struct { /** @see vbi3_option_type */ vbi3_option_type type; /** * Unique (within the export module) keyword to identify * this option, a NUL terminated ASCII string. */ const char * keyword; /** * Localized name of the option for the user interface. Can * be @c NULL if the option is not supposed to be listed in the UI. */ const char * label; /** @see vbi3_option_type */ union { int num; double dbl; const char * str; } def; /** @see vbi3_option_type */ union { int num; double dbl; } min, max, step; /** @see vbi3_option_type */ union { int * num; double * dbl; const char ** str; } menu; /** * A localized description of the option for the user, * can be @c NULL. */ const char * tooltip; } vbi3_option_info; /** * @param e Export context passed to vbi3_export_stdio() or * other output functions. * @param user_data User pointer passed through by * vbi3_export_set_link_cb(). * @param fp Output stream. * @param link Structure describing the link. * * Export modules call this type of function to write a link text * with metadata. Might do something like this: * @code * if (VBI3_LINK_HTTP == link->type) * fprintf (fp, "
%s", link->url, link->text); * @endcode * * @returns * FALSE on failure, which causes the export module to abort and * return FALSE to its caller. */ typedef vbi3_bool vbi3_export_link_cb (vbi3_export * e, void * user_data, FILE * fp, const vbi3_link * lnk); /** * @param e Export context passed to vbi3_export_stdio() or * other output functions. * @param user_data User pointer passed through by * vbi3_export_set_pdc_cb(). * @param fp Output stream. * @param ps Structure describing the program. * @param text Text of the link. * * Export modules call this type of function to write a PDC * preselection text with metadata. * * @returns * FALSE on failure, which causes the export module to abort and * return FALSE to its caller. */ typedef vbi3_bool vbi3_export_pdc_cb (vbi3_export * e, void * user_data, FILE * fp, const vbi3_preselection *ps, const char * text); /** * @addtogroup Export * @{ */ extern const char * vbi3_export_errstr (vbi3_export * e) __attribute__ ((_vbi3_nonnull (1))); extern vbi3_bool vbi3_export_stdio (vbi3_export * e, FILE * fp, const vbi3_page * pg) __attribute__ ((_vbi3_nonnull (1, 2))); /* sic */ extern vbi3_bool vbi3_export_file (vbi3_export * e, const char * name, const vbi3_page * pg) __attribute__ ((_vbi3_nonnull (1, 2, 3))); #ifndef ZAPPING8 extern vbi3_bool vbi3_export_stream_close (vbi3_export * e) __attribute__ ((_vbi3_nonnull (1))); extern vbi3_bool vbi3_export_stream_stdio_va_list (vbi3_export * e, FILE * fp, vbi3_decoder * vbi, vbi3_pgno pgno, vbi3_subno subno, va_list format_options) __attribute__ ((_vbi3_nonnull (1, 2, 3))); extern vbi3_bool vbi3_export_stream_stdio (vbi3_export * e, FILE * fp, vbi3_decoder * vbi, vbi3_pgno pgno, vbi3_subno subno, ...) __attribute__ ((_vbi3_nonnull (1, 2, 3), _vbi3_sentinel)); extern vbi3_bool vbi3_export_stream_file_va_list (vbi3_export * e, const char * name, vbi3_decoder * vbi, vbi3_pgno pgno, vbi3_subno subno, va_list format_options) __attribute__ ((_vbi3_nonnull (1, 2, 3))); extern vbi3_bool vbi3_export_stream_file (vbi3_export * e, const char * name, vbi3_decoder * vbi, vbi3_pgno pgno, vbi3_subno subno, ...) __attribute__ ((_vbi3_nonnull (1, 2, 3), _vbi3_sentinel)); #endif /* !ZAPPING8 */ extern void vbi3_export_set_link_cb (vbi3_export * e, vbi3_export_link_cb * callback, void * user_data) __attribute__ ((_vbi3_nonnull (1))); extern void vbi3_export_set_pdc_cb (vbi3_export * e, vbi3_export_pdc_cb * callback, void * user_data) __attribute__ ((_vbi3_nonnull (1))); extern void vbi3_export_set_timestamp (vbi3_export * e, double timestamp) __attribute__ ((_vbi3_nonnull (1))); extern vbi3_bool vbi3_export_option_menu_get (vbi3_export * e, const char * keyword, unsigned int * entry) __attribute__ ((_vbi3_nonnull (1, 2, 3))); extern vbi3_bool vbi3_export_option_menu_set (vbi3_export * e, const char * keyword, unsigned int entry) __attribute__ ((_vbi3_nonnull (1, 2))); extern vbi3_bool vbi3_export_option_get (vbi3_export * e, const char * keyword, vbi3_option_value * value) __attribute__ ((_vbi3_nonnull (1, 2, 3))); extern vbi3_bool vbi3_export_option_set (vbi3_export * e, const char * keyword, ...) __attribute__ ((_vbi3_nonnull (1, 2))); extern const vbi3_option_info * vbi3_export_option_info_enum (vbi3_export * e, unsigned int indx) __attribute__ ((_vbi3_nonnull (1))); extern const vbi3_option_info * vbi3_export_option_info_by_keyword (vbi3_export * e, const char * keyword) __attribute__ ((_vbi3_nonnull (1))); extern const vbi3_export_info * vbi3_export_info_enum (unsigned int indx); extern const vbi3_export_info * vbi3_export_info_by_keyword (const char * keyword); extern const vbi3_export_info * vbi3_export_info_from_export (const vbi3_export * e) __attribute__ ((_vbi3_nonnull (1))); extern void vbi3_export_delete (vbi3_export * e); extern vbi3_export * vbi3_export_new (const char * keyword, char ** errstr) __attribute__ ((malloc)); /** @} */ VBI3_END_DECLS #endif /* __ZVBI3_EXPORT_H__ */ zapping-0.10cvs6/libvbi/teletext_decoder.c 644 764 144 306642 10370717752 14027 /* * libzvbi - Teletext decoder * * Copyright (C) 2000, 2001, 2002, 2003, 2004 Michael H. Schimek * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. * * 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 this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* $Id: teletext_decoder.c,v 1.12 2006/02/03 18:24:42 mschimek Exp $ */ #include "../site_def.h" #include /* malloc() */ #include #include "hamm.h" /* vbi3_unham functions */ #include "packet-830.h" /* vbi3_decode_teletext_830x functions */ #include "conv.h" /* _vbi3_strdup_locale_teletext() */ #include "page-priv.h" #include "teletext_decoder-priv.h" /** * @addtogroup Teletext Teletext Decoder * @ingroup HiDec */ #ifndef TELETEXT_DECODER_CHSW_TEST # define TELETEXT_DECODER_CHSW_TEST 0 #endif #ifndef TELETEXT_DECODER_LOG # define TELETEXT_DECODER_LOG 0 #endif #define log(templ, args...) \ do { \ if (TELETEXT_DECODER_LOG) \ fprintf (stderr, templ , ##args); \ } while (0) #define MAG8(mag0) ((mag0) ? (mag0) : 8) /* ETS 300 706 Table 30 Colour Map */ static const vbi3_rgba default_color_map [40] = { VBI3_RGBA (0x00, 0x00, 0x00), VBI3_RGBA (0xFF, 0x00, 0x00), VBI3_RGBA (0x00, 0xFF, 0x00), VBI3_RGBA (0xFF, 0xFF, 0x00), VBI3_RGBA (0x00, 0x00, 0xFF), VBI3_RGBA (0xFF, 0x00, 0xFF), VBI3_RGBA (0x00, 0xFF, 0xFF), VBI3_RGBA (0xFF, 0xFF, 0xFF), VBI3_RGBA (0x00, 0x00, 0x00), VBI3_RGBA (0x77, 0x00, 0x00), VBI3_RGBA (0x00, 0x77, 0x00), VBI3_RGBA (0x77, 0x77, 0x00), VBI3_RGBA (0x00, 0x00, 0x77), VBI3_RGBA (0x77, 0x00, 0x77), VBI3_RGBA (0x00, 0x77, 0x77), VBI3_RGBA (0x77, 0x77, 0x77), VBI3_RGBA (0xFF, 0x00, 0x55), VBI3_RGBA (0xFF, 0x77, 0x00), VBI3_RGBA (0x00, 0xFF, 0x77), VBI3_RGBA (0xFF, 0xFF, 0xBB), VBI3_RGBA (0x00, 0xCC, 0xAA), VBI3_RGBA (0x55, 0x00, 0x00), VBI3_RGBA (0x66, 0x55, 0x22), VBI3_RGBA (0xCC, 0x77, 0x77), VBI3_RGBA (0x33, 0x33, 0x33), VBI3_RGBA (0xFF, 0x77, 0x77), VBI3_RGBA (0x77, 0xFF, 0x77), VBI3_RGBA (0xFF, 0xFF, 0x77), VBI3_RGBA (0x77, 0x77, 0xFF), VBI3_RGBA (0xFF, 0x77, 0xFF), VBI3_RGBA (0x77, 0xFF, 0xFF), VBI3_RGBA (0xDD, 0xDD, 0xDD), /* Private colors */ VBI3_RGBA (0x00, 0x00, 0x00), VBI3_RGBA (0xFF, 0xAA, 0x99), VBI3_RGBA (0x44, 0xEE, 0x00), VBI3_RGBA (0xFF, 0xDD, 0x00), VBI3_RGBA (0xFF, 0xAA, 0x99), VBI3_RGBA (0xFF, 0x00, 0xFF), VBI3_RGBA (0x00, 0xFF, 0xFF), VBI3_RGBA (0xEE, 0xEE, 0xEE) }; /** @internal */ const char * page_function_name (page_function function) { switch (function) { #undef CASE #define CASE(function) case PAGE_FUNCTION_##function : return #function ; CASE (ACI) CASE (EPG) CASE (DISCARD) CASE (UNKNOWN) CASE (LOP) CASE (DATA) CASE (GPOP) CASE (POP) CASE (GDRCS) CASE (DRCS) CASE (MOT) CASE (MIP) CASE (BTT) CASE (AIT) CASE (MPT) CASE (MPT_EX) CASE (TRIGGER) } return NULL; } /** @internal */ const char * page_coding_name (page_coding coding) { switch (coding) { #undef CASE #define CASE(coding) case PAGE_CODING_##coding : return #coding ; CASE (UNKNOWN) CASE (ODD_PARITY) CASE (UBYTES) CASE (TRIPLETS) CASE (HAMMING84) CASE (AIT) CASE (META84) } return NULL; } /** @internal */ const char * object_type_name (object_type type) { switch (type) { case OBJECT_TYPE_NONE: return "NONE/LOCAL_ENH"; case OBJECT_TYPE_ACTIVE: return "ACTIVE"; case OBJECT_TYPE_ADAPTIVE: return "ADAPTIVE"; case OBJECT_TYPE_PASSIVE: return "PASSIVE"; } return NULL; } /** @internal */ const char * drcs_mode_name (drcs_mode mode) { switch (mode) { #undef CASE #define CASE(mode) case DRCS_MODE_##mode : return #mode ; CASE (12_10_1) CASE (12_10_2) CASE (12_10_4) CASE (6_5_4) CASE (SUBSEQUENT_PTU) CASE (NO_DATA) } return NULL; } /** * @param type Teletext page type. * * Returns the name of a Teletext page type, for example VBI3_SUBTITLE_PAGE -> * "SUBTITLE_PAGE". This is mainly intended for debugging. * * @returns * Static ASCII string, NULL if @a type is invalid. */ const char * vbi3_page_type_name (vbi3_page_type type) { switch (type) { #undef CASE #define CASE(type) case VBI3_##type : return #type ; CASE (NO_PAGE) CASE (NORMAL_PAGE) CASE (SUBTITLE_PAGE) CASE (SUBTITLE_INDEX) CASE (NONSTD_SUBPAGES) CASE (PROGR_WARNING) CASE (CURRENT_PROGR) CASE (NOW_AND_NEXT) CASE (PROGR_INDEX) CASE (PROGR_SCHEDULE) CASE (UNKNOWN_PAGE) CASE (NOT_PUBLIC) CASE (CA_DATA) CASE (PFC_EPG_DATA) CASE (PFC_DATA) CASE (DRCS_PAGE) CASE (POP_PAGE) CASE (SYSTEM_PAGE) CASE (KEYWORD_SEARCH_LIST) CASE (TOP_BLOCK) CASE (TOP_GROUP) CASE (NEWSFLASH_PAGE) CASE (TRIGGER_DATA) CASE (ACI_PAGE) CASE (TOP_PAGE) } return NULL; } /** @internal */ void pagenum_dump (const pagenum * pn, FILE * fp) { fprintf (fp, "%s %3x.%04x", page_function_name (pn->function), pn->pgno, pn->subno); } static void cache_page_raw_dump (const cache_page * cp, FILE * fp, page_coding coding) { unsigned int i; unsigned int j; fprintf (fp, "Page %03x.%04x\n", cp->pgno, cp->subno); for (j = 0; j < 25; ++j) { switch (coding) { case PAGE_CODING_TRIPLETS: for (i = 0; i < 13; ++i) { const uint8_t *p; p = &cp->data.lop.raw[j][1 + i * 3]; fprintf (fp, "%05x ", vbi3_unham24p (p)); } break; case PAGE_CODING_HAMMING84: for (i = 0; i < 40; ++i) { unsigned int c; c = cp->data.lop.raw[j][i]; fprintf (fp, "%x", vbi3_unham8 (c)); } break; default: for (i = 0; i < 40; ++i) { unsigned int c; c = cp->data.lop.raw[j][i]; fprintf (fp, "%02x ", c); } break; } for (i = 0; i < 40; ++i) fputc (vbi3_printable (cp->data.lop.raw[j][i]), fp); fputc ('\n', fp); } } /** @internal */ void extension_dump (const extension * ext, FILE * fp) { unsigned int i; fprintf (fp, "Extension:\n" " designations %08x\n" " charset=%u,%u def_screen_color=%u row_color=%u\n" " bbg_subst=%u panel=%u,%u clut=%u,%u\n" " 12x10x2 global dclut=", ext->designations, ext->charset_code[0], ext->charset_code[1], ext->def_screen_color, ext->def_row_color, ext->fallback.black_bg_substitution, ext->fallback.left_panel_columns, ext->fallback.right_panel_columns, ext->foreground_clut, ext->background_clut); for (i = 0; i < 4; ++i) fprintf (fp, "%u, ", ext->drcs_clut[i + 2]); fputs ("\n 12x10x2 dclut=", fp); for (i = 0; i < 4; ++i) fprintf (fp, "%u, ", ext->drcs_clut[i + 6]); fputs ("\n 12x10x4 global dclut=", fp); for (i = 0; i < 16; ++i) fprintf (fp, "%u, ", ext->drcs_clut[i + 10]); fputs ("\n 12x10x4 dclut=", fp); for (i = 0; i < 16; ++i) fprintf (fp, "%u, ", ext->drcs_clut[i + 26]); fputs ("\n color_map=\n", fp); for (i = 0; i < 40; ++i) { fprintf (fp, "%08x, ", ext->color_map[i]); if ((i % 8) == 7) fputc ('\n', fp); } fputc ('\n', fp); } static vbi3_bool unham8_page_number (pagenum * pn, const uint8_t buffer[6], unsigned int mag0) { int b1, b2, b3; b1 = vbi3_unham16p (buffer + 0); b2 = vbi3_unham16p (buffer + 2); b3 = vbi3_unham16p (buffer + 4); if ((b1 | b2 | b3) < 0) return FALSE; mag0 ^= ((b3 >> 5) & 6) + (b2 >> 7); pn->function = PAGE_FUNCTION_UNKNOWN; pn->pgno = MAG8 (mag0) * 256 + b1; pn->subno = (b3 * 256 + b2) & 0x3F7F; /* subno flags? */ return TRUE; } static void clear_lop (cache_page * cp) { memset (cp->data.lop.raw, 0x20, sizeof (cp->data.lop.raw)); /* NO_PAGE (pgno): (pgno & 0xFF) == 0xFF. */ memset (cp->data.lop.link, -1, sizeof (cp->data.lop.link)); cp->data.lop.have_flof = FALSE; } static void clear_enhancement (cache_page * cp) { /* Valid range of mode 0x00 ... 0x1F, broken -1. */ memset (cp->data.enh_lop.enh, -1, sizeof (cp->data.enh_lop.enh)); } /* 10.5 (Global) Public Object Page */ static void clear_pop_page (cache_page * cp) { /* Valid range 0 ... 506 (39 packets * 13 triplets), unused pointers 511 (10.5.1.2), broken -1. */ memset (cp->data.pop.pointer, -1, sizeof (cp->data.pop.pointer)); /* Valid range of mode 0x00 ... 0x1F, broken -1. */ memset (cp->data.pop.triplet, -1, sizeof (cp->data.pop.triplet)); } static vbi3_bool decode_pop_packet (cache_page * cp, const uint8_t buffer[40], unsigned int packet) { int n18[13]; int designation; int err; unsigned int i; designation = vbi3_unham8 (buffer[0]); err = 0; for (i = 0; i < 13; ++i) err |= n18[i] = vbi3_unham24p (buffer + 1 + i * 3); if (TELETEXT_DECODER_LOG) { log ("POP page %x.%x flags %x packet %u designation %d\n", cp->pgno, cp->subno, cp->flags, packet, designation); for (i = 1; i < 13; ++i) log ("... %u: %d %x %u %u\n", i, n18[i], n18[i], n18[i] & 0x1FF, (n18[i] >> 9) & 0x1FF); } if ((designation | err) < 0) { return FALSE; } if (26 == packet) packet += designation; switch (packet) { case 1 ... 2: /* 10.5.1.2: Must be pointer table. */ if (0 && !(designation & 1)) { return FALSE; } /* fall through */ case 3 ... 4: if (designation & 1) { unsigned int index; /* Pointer table. */ index = (packet - 1) * 12 * 2; /* 10.5.1.2: triplet[0] is reserved. */ for (i = 1; i < 13; ++i) { cp->data.pop.pointer[index + 0] = n18[i] & 0x1FF; cp->data.pop.pointer[index + 1] = n18[i] >> 9; log ("PT %2u %2u (%2u): %3u %3u\n", packet, i, index, n18[i] & 0x1FF, n18[i] >> 9); index += 2; } return TRUE; } /* fall through */ case 5 ... 42: { triplet *trip; trip = &cp->data.pop.triplet[(packet - 3) * 13]; for (i = 0; i < 13; ++i) { trip->address = (n18[i] >> 0) & 0x3F; trip->mode = (n18[i] >> 6) & 0x1F; trip->data = (n18[i] >> 11); ++trip; } return TRUE; } default: assert (0); } return FALSE; } static vbi3_bool convert_pop_page (cache_page * dst, const cache_page * src, page_function function) { unsigned int packet; const uint8_t *raw; assert (dst != src); clear_pop_page (dst); dst->function = function; raw = src->data.unknown.raw[1]; for (packet = 1; packet <= 25; ++packet) { if (src->lop_packets & (1 << packet)) if (!decode_pop_packet (dst, raw, packet)) return FALSE; raw += 40; } assert ((39 * 13 + 1) == N_ELEMENTS (dst->data.pop.triplet)); assert ((16 * 13 + 1) == N_ELEMENTS (src->data.enh_lop.enh)); if (src->x26_designations) memcpy (dst->data.pop.triplet + 23 * 13, src->data.enh_lop.enh, sizeof (src->data.enh_lop.enh)); return TRUE; } /* 10.6 Magazine Organization Table */ static void decode_mot_page_lut (magazine * mag, const uint8_t buffer[2], vbi3_pgno pgno) { int n0, n1; n0 = vbi3_unham8 (buffer[0]); n1 = vbi3_unham8 (buffer[1]); if ((n0 | n1) < 0) return; /* n0 & 8 "global objects required" ignored. */ /* n1 & 8 "global drcs required" ignored. */ mag->pop_lut[pgno] = n0 & 7; mag->drcs_lut[pgno] = n1 & 7; } static void decode_mot_page_pop (vbi3_teletext_decoder * td, pop_link pop[4], const uint8_t buffer[40]) { unsigned int i; for (i = 0; i < 4; ++i) { int n4[10]; int err; unsigned int j; page_stat *ps; err = 0; for (j = 0; j < 10; ++j) err |= n4[j] = vbi3_unham8 (buffer[j]); if (err < 0) continue; buffer += 10; /* n4[0] & 8 "link page number may be superseded by X/27/4 or X/27/5 data" ignored. */ pop->pgno = MAG8 (n4[0] & 7) * 256 + n4[1] * 16 + n4[2]; ps = cache_network_page_stat (td->network, pop->pgno); ps->page_type = VBI3_SYSTEM_PAGE; ps->subcode = n4[3]; /* highest S1 transmitted */ if (n4[4] & 1) { /* No side-panels, no black background colour substitution. */ CLEAR (pop->fallback); } else { unsigned int s = (n4[4] >> 1) & 3; pop->fallback.black_bg_substitution = n4[4] >> 3; /* s: 0+0, 16+0, 0+16, 8+8 */ pop->fallback.left_panel_columns = "\00\20\00\10"[s]; pop->fallback.right_panel_columns = "\00\00\20\10"[s]; } pop->default_obj[0].type = (object_type)(n4[5] & 3); pop->default_obj[0].address = (n4[7] << 4) + n4[6]; pop->default_obj[1].type = (object_type)(n4[5] >> 2); pop->default_obj[1].address = (n4[9] << 4) + n4[8]; ++pop; } } static void decode_mot_page_drcs (vbi3_teletext_decoder * td, vbi3_pgno pgno[8], const uint8_t buffer[40]) { unsigned int i; for (i = 0; i < 8; ++i) { int n4[4]; int err; unsigned int j; page_stat *ps; err = 0; for (j = 0; j < 4; ++j) err |= n4[j] = vbi3_unham8 (buffer[j]); if (err < 0) continue; buffer += 4; /* n4[0] & 8 "link page number may be superseded by X/27/4 or X/27/5 data" ignored. */ pgno[i] = MAG8 (n4[0] & 7) * 256 + n4[1] * 16 + n4[2]; ps = cache_network_page_stat (td->network, pgno[i]); ps->page_type = VBI3_SYSTEM_PAGE; ps->subcode = n4[3]; /* highest S1 transmitted */ } } static void decode_mot_page (vbi3_teletext_decoder * td, const cache_page * cp) { magazine *mag; const uint8_t *raw; unsigned int packet; vbi3_pgno pgno; mag = cache_network_magazine (td->network, cp->pgno); raw = cp->data.unknown.raw[1]; pgno = 0; for (packet = 1; packet <= 8; ++packet) { if (cp->lop_packets & (1 << packet)) { vbi3_pgno i; for (i = 0x00; i <= 0x09; raw += 2, ++i) decode_mot_page_lut (mag, raw, pgno + i); for (i = 0x10; i <= 0x19; raw += 2, ++i) decode_mot_page_lut (mag, raw, pgno + i); } else { raw += 40; } pgno += 0x20; } pgno = 0; for (packet = 9; packet <= 14; ++packet) { if (cp->lop_packets & (1 << packet)) { vbi3_pgno i; for (i = 0x0A; i <= 0x0F; raw += 2, ++i) decode_mot_page_lut (mag, raw, pgno + i); if (14 == packet) /* 0xFA ... 0xFF, rest unused */ break; for (i = 0x1A; i <= 0x1F; raw += 2, ++i) decode_mot_page_lut (mag, raw, pgno + i); for (i = 0x2A; i <= 0x2F; raw += 2, ++i) decode_mot_page_lut (mag, raw, pgno + i); raw += 40 - 3 * 6 * 2; } else { raw += 40; } pgno += 0x30; } /* Level 2.5 POP links. */ for (packet = 19; packet <= 20; ++packet) if (cp->lop_packets & (1 << packet)) decode_mot_page_pop (td, mag->pop_link[0] + (packet - 19) * 4, cp->data.unknown.raw[packet]); /* Level 2.5 DRCS links. */ if (cp->lop_packets & (1 << 21)) decode_mot_page_drcs (td, mag->drcs_link[0], cp->data.unknown.raw[21]); /* Level 3.5 POP links. */ for (packet = 22; packet <= 23; ++packet) if (cp->lop_packets & (1 << packet)) decode_mot_page_pop (td, mag->pop_link[1] + (packet - 22) * 4, cp->data.unknown.raw[packet]); /* Level 3.5 DRCS links. */ if (cp->lop_packets & (1 << 24)) decode_mot_page_drcs (td, mag->drcs_link[1], cp->data.unknown.raw[24]); } /* 11.2 Table Of Pages navigation */ static vbi3_bool top_page_number (pagenum * pn, const uint8_t buffer[8]) { int n4[8]; int err; unsigned int i; vbi3_pgno pgno; vbi3_subno subno; err = 0; for (i = 0; i < 8; ++i) err |= n4[i] = vbi3_unham8 (buffer[i]); pgno = n4[0] * 256 + n4[1] * 16 + n4[2]; if (err < 0 || pgno < 0x100 || pgno > 0x8FF) return FALSE; subno = (n4[3] << 12) | (n4[4] << 8) | (n4[5] << 4) | n4[6]; switch ((top_page_function) n4[7]) { case TOP_PAGE_FUNCTION_AIT: pn->function = PAGE_FUNCTION_AIT; break; case TOP_PAGE_FUNCTION_MPT: pn->function = PAGE_FUNCTION_MPT; break; case TOP_PAGE_FUNCTION_MPT_EX: pn->function = PAGE_FUNCTION_MPT_EX; break; default: pn->function = PAGE_FUNCTION_UNKNOWN; break; } pn->pgno = pgno; pn->subno = subno & 0x3F7F; /* flags? */ return TRUE; } /* 11.2 Basic TOP Table */ static vbi3_bool top_page_stat (cache_network * cn, vbi3_pgno pgno, btt_page_type btt_type) { page_stat *ps; vbi3_page_type page_type; unsigned int subcode; vbi3_bool changed; subcode = SUBCODE_SINGLE_PAGE; switch (btt_type) { case BTT_NO_PAGE: page_type = VBI3_NO_PAGE; subcode = SUBCODE_UNKNOWN; break; /* Observation: BTT_SUBTITLE only when the page is transmitted, otherwise BTT_NO_PAGE. */ case BTT_SUBTITLE: page_type = VBI3_SUBTITLE_PAGE; break; case BTT_PROGR_INDEX_M: subcode = SUBCODE_MULTI_PAGE; /* fall through */ case BTT_PROGR_INDEX_S: /* Usually _SCHEDULE, not _INDEX. */ page_type = VBI3_PROGR_SCHEDULE; break; case BTT_BLOCK_M: subcode = SUBCODE_MULTI_PAGE; /* fall through */ case BTT_BLOCK_S: page_type = VBI3_TOP_BLOCK; break; case BTT_GROUP_M: subcode = SUBCODE_MULTI_PAGE; /* fall through */ case BTT_GROUP_S: page_type = VBI3_TOP_GROUP; break; case BTT_NORMAL_M: case BTT_NORMAL_11: /* ? */ subcode = SUBCODE_MULTI_PAGE; /* fall through */ case BTT_NORMAL_S: case BTT_NORMAL_9: /* ? */ page_type = VBI3_NORMAL_PAGE; break; default: page_type = VBI3_UNKNOWN_PAGE; subcode = SUBCODE_UNKNOWN; break; } log ("BTT %04x: %2u %04x %s\n", pgno, btt_type, subcode, vbi3_page_type_name (page_type)); ps = cache_network_page_stat (cn, pgno); changed = FALSE; if (ps->page_type != page_type && (VBI3_UNKNOWN_PAGE == ps->page_type || VBI3_SUBTITLE_PAGE == ps->page_type || VBI3_SUBTITLE_PAGE == page_type)) { ps->page_type = page_type; changed = TRUE; } /* We only ever increase the subcode, such that the table is consistent when BTT, MIP and the number of received subpages disagree. SUBCODE_MULTI_PAGE means the page has subpages, how many is not known (yet). Interestingly there doesn't seem to be a btt_type for clock pages, I saw only BTT_NORMAL_S. */ if (SUBCODE_UNKNOWN == ps->subcode || (SUBCODE_SINGLE_PAGE == ps->subcode && SUBCODE_MULTI_PAGE == subcode)) { ps->subcode = subcode; } return changed; } static vbi3_bool top_link_stat (cache_network * cn, unsigned int link) { pagenum *pn; page_stat *ps; cn->have_top = TRUE; pn = &cn->btt_link[link]; switch (pn->function) { case PAGE_FUNCTION_MPT: case PAGE_FUNCTION_AIT: case PAGE_FUNCTION_MPT_EX: if (TELETEXT_DECODER_LOG) { log ("BTT %2u: ", link); pagenum_dump (pn, stderr); fputc ('\n', stderr); } ps = cache_network_page_stat (cn, pn->pgno); ps->page_type = VBI3_TOP_PAGE; return TRUE; default: return FALSE; } } static void decode_btt_page (vbi3_teletext_decoder * td, const cache_page * cp) { unsigned int packet; const uint8_t *raw; cache_network *cn; vbi3_bool changed; vbi3_pgno pgno; raw = cp->data.unknown.raw[1]; changed = FALSE; pgno = 0x100; for (packet = 1; packet <= 20; ++packet) { unsigned int i; if (cp->lop_packets & (1 << packet)) { for (i = 0; i < 40; ++i) { btt_page_type btt_type; btt_type = vbi3_unham8 (raw[i]); if ((int) btt_type < 0) { pgno = vbi3_add_bcd (pgno, 1); continue; } changed |= top_page_stat (td->network, pgno, btt_type); pgno = vbi3_add_bcd (pgno, 1); } } else { pgno = vbi3_add_bcd (pgno, 0x40); } raw += 40; } /* Links to other TOP pages. */ cn = td->network; for (packet = 21; packet <= 22; ++packet) { if (cp->lop_packets & (1 << packet)) { unsigned int l; unsigned int i; l = (packet - 21) * 5; for (i = 0; i < 5; ++i) { if (top_page_number (&cn->btt_link[l], raw)) top_link_stat (cn, l); raw += 8; ++l; } } else { raw += 40; } } /* What's in packet 23? */ if (changed && (td->handlers.event_mask & VBI3_EVENT_PAGE_TYPE)) { vbi3_event e; e.type = VBI3_EVENT_PAGE_TYPE; e.network = &td->network->network; e.timestamp = td->timestamp; _vbi3_event_handler_list_send (&td->handlers, &e); } } /* 11.2 Additional Information Table */ static vbi3_bool decode_ait_packet (cache_page * cp, const uint8_t buffer[40], unsigned int packet) { unsigned int i; assert (46 * sizeof (ait_title) == sizeof (cp->data.ait.title)); if (packet < 1 || packet > 23) return FALSE; for (i = 0; i < 2; ++i) { ait_title temp; unsigned int j; int c; if (!top_page_number (&temp.page, buffer)) continue; buffer += 8; for (j = 0; j < 12; ++j) { /* Usually filled up with spaces, but zeroes also possible. */ c = vbi3_unpar8 (buffer[j]); if (c && c < 0x20) break; temp.text[j] = c; } if (j < 12) continue; buffer += 12; if (TELETEXT_DECODER_LOG) { log ("AIT %2u: ", packet * 2 - 2 + i); pagenum_dump (&temp.page, stderr); fputc (' ', stderr); for (j = 0; j < 12; ++j) log ("%02x ", temp.text[j] & 0xFF); fputc ('>', stderr); for (j = 0; j < 12; ++j) fputc (vbi3_printable (temp.text[j]), stderr); fputs ("<\n", stderr); } cp->data.ait.title[packet * 2 - 2 + i] = temp; } return TRUE; } static vbi3_bool convert_ait_page (cache_page * dst, const cache_page * src) { unsigned int packet; const uint8_t *raw; /* NO_PAGE (pgno): (pgno & 0xFF) == 0xFF. */ memset (&dst->data.ait, -1, sizeof (dst->data.ait)); dst->function = PAGE_FUNCTION_AIT; raw = src->data.unknown.raw[1]; for (packet = 1; packet <= 23; ++packet) { if (src->lop_packets & (1 << packet)) if (!decode_ait_packet (dst, raw, packet)) return FALSE; raw += 40; } dst->data.ait.checksum = 0; /* changed */ return TRUE; } /* 11.2 Multi-Page Table */ static void decode_mpt_page (vbi3_teletext_decoder * td, const cache_page * cp) { unsigned int packet; const uint8_t *raw; vbi3_pgno pgno; raw = cp->data.unknown.raw[1]; pgno = 0x100; for (packet = 1; packet <= 20; ++packet) { if (cp->lop_packets & (1 << packet)) { unsigned int i; for (i = 0; i < 40; ++i) { page_stat *ps; vbi3_page_type page_type; unsigned int subcode; int n; if ((n = vbi3_unham8 (raw[i])) < 0) { pgno = vbi3_add_bcd (pgno, 1); continue; } ps = cache_network_page_stat (td->network, pgno); page_type = ps->page_type; subcode = ps->subcode; log ("MPT %04x: %04x %x %s\n", pgno, subcode, n, vbi3_page_type_name (page_type)); if (n > 9) { /* Has more than 9 subpages, details may follow in MPT-EX. */ n = 0x10; } if (SUBCODE_UNKNOWN == subcode) subcode = 0x0000; else if (SUBCODE_MULTI_PAGE == subcode) subcode = 0x0002; /* at least */ if (VBI3_NO_PAGE != page_type && VBI3_UNKNOWN_PAGE != page_type && (unsigned int) n > subcode) { ps->subcode = n; } pgno = vbi3_add_bcd (pgno, 1); } } else { pgno = vbi3_add_bcd (pgno, 0x40); } raw += 40; } } /* 11.2 Multi-Page Extension Table */ static void decode_mpt_ex_page (vbi3_teletext_decoder * td, const cache_page * cp) { unsigned int packet; const uint8_t *raw; raw = cp->data.unknown.raw[1]; for (packet = 1; packet <= 23; ++packet) { if (cp->lop_packets & (1 << packet)) { unsigned int i; for (i = 0; i < 5; ++i) { pagenum pn; page_stat *ps; vbi3_page_type page_type; unsigned int subcode; if (!top_page_number (&pn, raw)) { raw += 8; continue; } pn.subno = vbi3_bin2bcd (pn.subno & 0x7F); if (TELETEXT_DECODER_LOG) { log ("MPT-EX %3u: ", (packet - 1) * 5 + i); pagenum_dump (&pn, stderr); fputc ('\n', stderr); } if (pn.pgno < 0x100) break; else if (pn.pgno > 0x8FF || pn.subno < 0x02 || pn.subno > 0x99) continue; ps = cache_network_page_stat (td->network, pn.pgno); page_type = ps->page_type; subcode = ps->subcode; if (SUBCODE_UNKNOWN == subcode) subcode = 0x0000; else if (SUBCODE_MULTI_PAGE == subcode) subcode = 0x0002; /* at least */ if (VBI3_NO_PAGE != page_type && VBI3_UNKNOWN_PAGE != page_type && (unsigned int) pn.subno > subcode) { ps->subcode = pn.subno; } raw += 8; } } else { raw += 40; } } } /* 11.3 Magazine Inventory Page */ static vbi3_bool mip_page_stat (cache_network * cn, const cache_page * cp, const uint8_t ** raw, unsigned int * sub_index, vbi3_pgno pgno) { page_stat *ps; vbi3_page_type page_type; vbi3_page_type old_type; int code; unsigned int subcode; unsigned int old_subcode; vbi3_bool changed; code = vbi3_unham16p (*raw); *raw += 2; if (code < 0) return FALSE; changed = FALSE; ps = cache_network_page_stat (cn, pgno); page_type = VBI3_UNKNOWN_PAGE; subcode = SUBCODE_UNKNOWN; old_type = ps->page_type; old_subcode = ps->subcode; switch (code) { case 0x00: /* VBI3_NO_PAGE */ case 0x01: /* VBI3_NORMAL_PAGE, single page */ case 0x78: /* VBI3_SUBTITLE_INDEX */ case 0x7A: /* VBI3_PROGR_WARNING (adult content etc) */ case 0x7C: /* VBI3_CURRENT_PROGR, single page */ case 0x7D: /* VBI3_NOW_AND_NEXT */ case 0x7F: /* VBI3_PROGR_INDEX, single page */ case 0x80: /* VBI3_NOT_PUBLIC */ case 0x81: /* VBI3_PROGR_SCHEDULE, single page */ case 0xE3: /* VBI3_PFC_EPG_DATA */ case 0xE4: /* VBI3_PFC_DATA */ case 0xE7: /* VBI3_SYSTEM_PAGE, e.g. MOT and MIP */ case 0xF9: /* VBI3_KEYWORD_SEARCH_LIST, single page */ case 0xFC: /* VBI3_TRIGGER_DATA */ case 0xFD: /* VBI3_ACI_PAGE (automatic channel installation) */ case 0xFE: /* VBI3_TOP_PAGE (AIT, MPT, MPT-EX) */ page_type = code; subcode = 0; break; case 0x02 ... 0x4F: /* VBI3_NORMAL_PAGE with 2 ... 79 subpages */ page_type = VBI3_NORMAL_PAGE; subcode = vbi3_bin2bcd (code); break; case 0x50 ... 0x51: /* normal page */ case 0xD0 ... 0xD1: /* program */ case 0xE0 ... 0xE1: /* page format CA */ case 0x7B: /* current program, multi-page */ case 0x7E: /* program index, multi-page */ case 0xF8: /* keyword search list, multi-page */ { unsigned int packet = *sub_index / 13; const uint8_t *raw; int n; if (packet > 24 || 0 == (cp->lop_packets & (1 << packet))) return FALSE; raw = &cp->data.unknown.raw[packet][*sub_index % 13]; n = vbi3_unham16p (raw) | (vbi3_unham8 (raw[2]) << 8); if (n < 0) { return FALSE; } else if (0x1 == (code & 0xF)) { /* 4096+ subpages? Strange but true. */ subcode = n + (1 << 12); } else if (n < 2) { return FALSE; } else { subcode = n; } page_type = (code == 0xF8) ? VBI3_KEYWORD_SEARCH_LIST : (code == 0x7E) ? VBI3_PROGR_INDEX : (code == 0x7B) ? VBI3_CURRENT_PROGR : (code >= 0xE0) ? VBI3_CA_DATA : (code >= 0xD0) ? VBI3_PROGR_SCHEDULE : VBI3_NORMAL_PAGE; break; } case 0x52 ... 0x5F: /* reserved */ case 0x60 ... 0x61: /* reserved, we use them as VBI3_TOP_BLOCK (= BTT_BLOCK_S/M) VBI3_TOP_GROUP (= BTT_GROUP_S/M) */ case 0x62 ... 0x6F: /* reserved */ case 0xD2 ... 0xDF: /* reserved */ case 0xFF: /* reserved, we use it as VBI3_UNKNOWN_PAGE */ return FALSE; case 0x70 ... 0x77: page_type = VBI3_SUBTITLE_PAGE; subcode = 0; if (0xFF == ps->charset_code) { const magazine *mag; vbi3_charset_code cs_code; mag = cache_network_magazine (cn, cp->pgno); cs_code = (mag->extension.charset_code[0] & (unsigned int) ~7) | (code & 7); if (vbi3_character_set_from_code (cs_code)) { ps->charset_code = cs_code; } else { ps->charset_code = cs_code & 7; } changed = TRUE; } break; case 0x79: /* VBI3_NONSTD_SUBPAGES (e.g. clock page) */ page_type = VBI3_NONSTD_SUBPAGES; subcode = 0x3F7F; break; case 0x82 ... 0xCF: /* VBI3_PROGR_SCHEDULE with 2 ... 79 subpages */ page_type = VBI3_PROGR_SCHEDULE; subcode = vbi3_bin2bcd (code & 0x7F); break; case 0xE2: /* Page format CA, undefined number of subpages. */ case 0xE5: /* VBI3_DRCS_PAGE */ case 0xE6: /* VBI3_POP_PAGE */ case 0xF0 ... 0xF3: /* broadcaster system page */ case 0xF4 ... 0xF6: /* test page */ case 0xF7: /* displayable system page */ page_type = code; subcode = old_subcode; break; case 0xE8 ... 0xEB: page_type = VBI3_DRCS_PAGE; subcode = old_subcode; break; case 0xEC ... 0xEF: page_type = VBI3_POP_PAGE; subcode = old_subcode; break; } if (old_type != page_type && (VBI3_UNKNOWN_PAGE == old_type || VBI3_SUBTITLE_PAGE == old_type || VBI3_SUBTITLE_PAGE == page_type)) { ps->page_type = page_type; changed = TRUE; } if (SUBCODE_UNKNOWN == old_subcode) old_subcode = 0x0000; else if (SUBCODE_MULTI_PAGE == old_subcode) old_subcode = 0x0002; /* at least */ if (subcode > old_subcode) { ps->subcode = subcode; } log ("MIP %04x: %02x:%02x:%04x %s\n", pgno, page_type, ps->charset_code, subcode, vbi3_page_type_name (page_type)); return changed; } static void decode_mip_page (vbi3_teletext_decoder * td, const cache_page * cp) { unsigned int packet; unsigned int sub_index; const uint8_t *raw; vbi3_bool changed; vbi3_pgno pgno; sub_index = 15 * 13; raw = cp->data.unknown.raw[1]; changed = FALSE; pgno = cp->pgno & 0xF00; for (packet = 1; packet <= 8; ++packet) { /* 11.3.2: Packets which contain only 0x00 VBI3_NO_PAGE are optional. */ if (cp->lop_packets & (1 << packet)) { vbi3_pgno i; for (i = 0x00; i <= 0x09; ++i) changed |= mip_page_stat (td->network, cp, &raw, &sub_index, pgno + i); for (i = 0x10; i <= 0x19; ++i) changed |= mip_page_stat (td->network, cp, &raw, &sub_index, pgno + i); } else { raw += 40; } pgno += 0x20; } pgno = cp->pgno & 0xF00; for (packet = 9; packet <= 14; ++packet) { /* 11.3.2: Packets which contain only 0x00 VBI3_NO_PAGE are optional. */ if (cp->lop_packets & (1 << packet)) { vbi3_pgno i; for (i = 0x0A; i <= 0x0F; ++i) changed |= mip_page_stat (td->network, cp, &raw, &sub_index, pgno + i); if (14 == packet) /* 0xFA ... 0xFF, rest unused */ break; for (i = 0x1A; i <= 0x1F; ++i) changed |= mip_page_stat (td->network, cp, &raw, &sub_index, pgno + i); for (i = 0x2A; i <= 0x2F; ++i) changed |= mip_page_stat (td->network, cp, &raw, &sub_index, pgno + i); } else { raw += 40; } pgno += 0x30; } if (changed && (td->handlers.event_mask & VBI3_EVENT_PAGE_TYPE)) { vbi3_event e; e.type = VBI3_EVENT_PAGE_TYPE; e.network = &td->network->network; e.timestamp = td->timestamp; _vbi3_event_handler_list_send (&td->handlers, &e); } } /* 14. Dynamically Re-definable Characters download page */ static void cache_page_drcs_dump (const cache_page * cp, FILE * fp) { unsigned int i; const uint8_t *p; fprintf (fp, "DRCS page %03x.%04x\n", cp->pgno, cp->subno); p = cp->data.drcs.chars[0]; for (i = 0; i < DRCS_PTUS_PER_PAGE; ++i) { unsigned int j; fprintf (fp, "#%2u mode %02x\n ", i, cp->data.drcs.mode[i]); for (j = 0; j < 10; ++j) { unsigned int k; for (k = 0; k < 6; ++k) fprintf (fp, "%x%x", p[k] & 15, p[k] >> 4); p += 6; fputs ("\n ", fp); } } } static const unsigned int expand1 [64] = { 0x000000, 0x100000, 0x010000, 0x110000, 0x001000, 0x101000, 0x011000, 0x111000, 0x000100, 0x100100, 0x010100, 0x110100, 0x001100, 0x101100, 0x011100, 0x111100, 0x000010, 0x100010, 0x010010, 0x110010, 0x001010, 0x101010, 0x011010, 0x111010, 0x000110, 0x100110, 0x010110, 0x110110, 0x001110, 0x101110, 0x011110, 0x111110, 0x000001, 0x100001, 0x010001, 0x110001, 0x001001, 0x101001, 0x011001, 0x111001, 0x000101, 0x100101, 0x010101, 0x110101, 0x001101, 0x101101, 0x011101, 0x111101, 0x000011, 0x100011, 0x010011, 0x110011, 0x001011, 0x101011, 0x011011, 0x111011, 0x000111, 0x100111, 0x010111, 0x110111, 0x001111, 0x101111, 0x011111, 0x111111 }; static const unsigned int expand2 [8] = { 0x000000, 0x110000, 0x001100, 0x111100, 0x000011, 0x110011, 0x001111, 0x111111, }; static void decode_drcs_page (cache_page * cp) { uint8_t *s; uint8_t *d; uint64_t invalid; unsigned int i; invalid = 0; s = cp->data.drcs.lop.raw[1]; for (i = 0; i < DRCS_PTUS_PER_PAGE / 2; ++i) { if (cp->lop_packets & (2 << i)) { unsigned int j; for (j = 0; j < 40; ++j) if (vbi3_unpar8 (s[j]) < 0x40) { invalid |= ((uint64_t) 3) << (i * 2); break; } } else { invalid |= ((uint64_t) 3) << (i * 2); } s += 40; } d = cp->data.drcs.chars[0]; s = cp->data.drcs.lop.raw[1]; for (i = 0; i < DRCS_PTUS_PER_PAGE; ++i) { unsigned int j; unsigned int q; switch ((drcs_mode) cp->data.drcs.mode[i]) { case DRCS_MODE_12_10_1: if (invalid & (((uint64_t) 1) << i)) { s += 20; d += 60; } else { for (j = 0; j < 20; ++j) { q = expand1[*s++ & 0x3F]; d[0] = q; d[1] = q >> 8; d[2] = q >> 16; d += 3; } } break; case DRCS_MODE_12_10_2: if (invalid & (((uint64_t) 3) << i)) { invalid |= ((uint64_t) 3) << i; s += 40; d += 60; } else { for (j = 0; j < 20; ++j) { q = expand1[s[ 0] & 0x3F] + expand1[s[20] & 0x3F] * 2; ++s; d[0] = q; d[1] = q >> 8; d[2] = q >> 16; d += 3; } } i += 1; break; case DRCS_MODE_12_10_4: if (invalid & (((uint64_t) 15) << i)) { invalid |= ((uint64_t) 15) << i; s += 80; d += 60; } else { for (j = 0; j < 20; ++j) { q = expand1[s[ 0] & 0x3F] + expand1[s[20] & 0x3F] * 2 + expand1[s[40] & 0x3F] * 4 + expand1[s[60] & 0x3F] * 8; ++s; d[0] = q; d[1] = q >> 8; d[2] = q >> 16; d += 3; } } i += 3; break; case DRCS_MODE_6_5_4: if (invalid & (((uint64_t) 1) << i)) { s += 20; d += 60; } else { for (j = 0; j < 5; ++j) { q = expand2[s[0] & 7] + expand2[s[1] & 7] * 2 + expand2[s[2] & 7] * 4 + expand2[s[3] & 7] * 8; d[0] = q; d[1] = q >> 8; d[2] = q >> 16; q = expand2[(s[0] >> 3) & 7] + expand2[(s[1] >> 3) & 7] * 2 + expand2[(s[2] >> 3) & 7] * 4 + expand2[(s[3] >> 3) & 7] * 8; s += 4; d[3] = q; d[4] = q >> 8; d[5] = q >> 16; memcpy (d + 6, d, 6); d += 12; } } break; default: s += 20; d += 60; break; } } cp->data.drcs.invalid &= invalid; if (0) cache_page_drcs_dump (cp, stderr); } /** * @internal * * Since MOT, MIP and X/28 are optional, the function of a system page * may not be clear until we format a LOP and find a link. */ cache_page * _vbi3_convert_cached_page (cache_page * cp, page_function new_function) { cache_page temp; cache_page *cp1; if (PAGE_FUNCTION_UNKNOWN != cp->function) { return NULL; } log ("Convert page %s -> %s\n", page_function_name (cp->function), page_function_name (new_function)); cache_page_copy (&temp, cp); switch (new_function) { case PAGE_FUNCTION_LOP: temp.function = new_function; break; case PAGE_FUNCTION_GPOP: case PAGE_FUNCTION_POP: if (!convert_pop_page (&temp, cp, new_function)) return NULL; break; case PAGE_FUNCTION_GDRCS: case PAGE_FUNCTION_DRCS: { unsigned int i; /* 14.1: Packet X/28/3 is optional when PTUs use only mode 12x10x1. B.2: X/28 must be transmitted before packets 1 ... 24. Since we didn't readily recognize the page as DRCS, X/28/3 has been omitted, so 12x10x1 must be assumed. When we missed X/28/3 due to a transmission error we will correct the page when retransmitted. */ for (i = 0; i < DRCS_PTUS_PER_PAGE; ++i) temp.data.drcs.mode[i] = DRCS_MODE_12_10_1; temp.function = new_function; temp.data.drcs.invalid = (uint64_t) -1; /* all */ decode_drcs_page (&temp); break; } case PAGE_FUNCTION_AIT: if (!convert_ait_page (&temp, cp)) return NULL; break; default: /* Needs no conversion. */ assert (0); } if (!(cp1 = _vbi3_cache_put_page (cp->network->cache, cp->network, &temp))) return NULL; cache_page_unref (cp); return cp1; } static void eacem_trigger (vbi3_teletext_decoder * td, cache_page * cp) { td = td; cp = cp; #if 0 /* TODO */ vbi3_page_priv pgp; uint8_t *d; unsigned int i; if (0) cache_page_raw_dump (cp, stderr, PAGE_CODING_ODD_PARITY); _vbi3_page_priv_init (&pgp); /* Must format the page for proper Level 1.5 characters. */ if (!_vbi3_page_priv_from_cache_page (&pgp, cp, VBI3_WST_LEVEL, VBI3_WST_LEVEL_1p5, 0)) return; /* Latin-1!! */ d = (uint8_t *) pgp.pg.text; for (i = 1 * 40; i < 25 * 40; ++i) { int c; c = pgp.pg.text[i].unicode; *d++ = (c < 0x20 || c > 0xFF) ? 0x20 : c; } *d = 0; _vbi3_trigger_list_add_eacem (&td->triggers, &td->handlers, (uint8_t *) pgp.pg.text, &td->network->network, td->time); #endif } static vbi3_charset_code page_charset_code (vbi3_teletext_decoder * td, const cache_page * cp) { vbi3_charset_code code; const magazine *mag; if (cp->x28_designations & cp->data.ext_lop.ext.designations & 0x11) { code = (cp->data.ext_lop.ext.charset_code[0] & (unsigned int) ~7) + cp->national; if (vbi3_character_set_from_code (code)) return code; code = cp->data.ext_lop.ext.charset_code[0]; if (vbi3_character_set_from_code (code)) return code; } mag = cache_network_magazine (td->network, cp->pgno); code = (mag->extension.charset_code[0] & (unsigned int) ~7) + cp->national; if (vbi3_character_set_from_code (code)) return code; code = mag->extension.charset_code[0]; if (vbi3_character_set_from_code (code)) return code; return 0xFF; /* unknown */ } /* 9.3.1 Teletext packet 0, Page Header. */ static int same_header (vbi3_pgno cur_pgno, const uint8_t * cur, vbi3_pgno ref_pgno, const uint8_t * ref) { uint8_t buf[3]; unsigned int i; unsigned int j; int neq; int err; /* NB this assumes vbi3_is_bcd (cur_pgno), which follows from roll_header. */ buf[2] = (cur_pgno & 15) + '0'; buf[1] = ((cur_pgno >> 4) & 15) + '0'; buf[0] = (cur_pgno >> 8) + '0'; vbi3_par (buf, 3); j = 32; neq = 0; err = 0; /* Header: 8 byte page address & control, 24 text, 8 byte hh:mm:ss (usually). */ for (i = 8; i < 29; ++i) { if (cur[0] == buf[0] && cur[1] == buf[1] && cur[2] == buf[2]) break; err |= vbi3_unpar8 (*cur); err |= vbi3_unpar8 (*ref); neq |= *cur++ ^ *ref++; } /* Skip page number. */ j = i; i += 3; cur += 3; ref += 3; for (; i < 32; ++i) { err |= vbi3_unpar8 (*cur); err |= vbi3_unpar8 (*ref); neq |= *cur++ ^ *ref++; } /* Parity error or no page number. */ if (err < 0 || j >= 32) return -3; /* inconclusive */ if (!neq) { /* I have yet to see equal headers from different networks, so this is probably correct. */ return TRUE; } /* Comparing headers from different magazines can result in false negatives. */ if ((cur_pgno ^ ref_pgno) & 0xF00) return -2; /* inconclusive */ /* Often headers show the current date. Check for false negative due to date transition. 23xmmxss -> 00xmmxss. */ if (((ref[32] * 256 + ref[33]) & 0x7F7F) == 0x3233 && ((cur[32] * 256 + cur[33]) & 0x7F7F) == 0x3030) { return -1; /* inconclusive */ } /* Pages with headers from the same network can still differ, but what more can we do. */ return FALSE; } #if 0 /* Note "clock" may not be a clock. */ static vbi3_bool same_clock (const uint8_t * cur, const uint8_t * ref) { unsigned int i; for (i = 32; i < 40; ++i) { if (*cur != *ref && (vbi3_ipar8 (*cur) | vbi3_ipar8 (*ref)) >= 0) return FALSE; ++cur; ++ref; } return TRUE; } #endif static void network_event (vbi3_teletext_decoder * td) { vbi3_event e; e.type = VBI3_EVENT_NETWORK; e.network = &td->network->network; e.timestamp = td->timestamp; _vbi3_event_handler_list_send (&td->handlers, &e); e.type = VBI3_EVENT_TOP_CHANGE; _vbi3_event_handler_list_send (&td->handlers, &e); /* XXX? e.type = VBI3_EVENT_PAGE_TYPE; _vbi3_event_handler_list_send (&td->handlers, &e); e.type = VBI3_EVENT_PROG_INFO; e.ev.prog_info = &cn->program_info; _vbi3_event_handler_list_send (&td->handlers, &e); */ /* XXX ASPECT? */ /* XXX PROG_ID? */ } static void detect_channel_change (vbi3_teletext_decoder * td, const cache_page * cp) { vbi3_network *nk; int r; if (0 == td->header_page.pgno) { /* First page after channel change, test may return inconclusive due to hamming error. */ r = same_header (cp->pgno, cp->data.lop.raw[0] + 8, cp->pgno, cp->data.lop.raw[0] + 8); } else { r = same_header (cp->pgno, cp->data.lop.raw[0] + 8, td->header_page.pgno, td->header + 8); } switch (r) { case TRUE: if (TELETEXT_DECODER_CHSW_TEST) { fprintf (stderr, "+"); fflush (stderr); } td->header_page.pgno = cp->pgno; COPY (td->header, cp->data.lop.raw[0]); /* Cancel reset. */ td->virtual_reset (td, NULL, -1.0); if (0) { /* XXX improve */ nk = &td->network->network; if (!nk->name && 0 == nk->call_sign[0] && 0 == (nk->cni_vps | nk->cni_8301 | nk->cni_8302)) { if (_vbi3_network_set_name_from_ttx_header (nk, cp->data.lop.raw[0])) network_event (td); } } break; case FALSE: if (TELETEXT_DECODER_CHSW_TEST) { fprintf (stderr, "-"); fflush (stderr); } td->header_page.pgno = cp->pgno; COPY (td->header, cp->data.lop.raw[0]); /* Reset at next vbi3_teletext_decoder_feed() call. */ td->virtual_reset (td, NULL, td->timestamp + 0.0); break; default: if (TELETEXT_DECODER_CHSW_TEST) { fprintf (stderr, "%d", -r); fflush (stderr); } if (-1 == r) { /* Date transition. */ td->header_page.pgno = cp->pgno; COPY (td->header, cp->data.lop.raw[0]); } else if (td->reset_time <= 0) { /* Suspect a channel change. */ td->virtual_reset (td, NULL, td->timestamp + td->cni_830_timeout); } break; } } static void store_page (vbi3_teletext_decoder * td, cache_page * cp) { cache_page *cp1; if (td->reset_time > 0) { /* Suspended because we suspect a channel change. */ if (PAGE_FUNCTION_LOP != cp->function) return; } if (0 && !vbi3_is_bcd (cp->pgno) && 0xFF != (0xFF & cp->pgno)) { fprintf (stderr, "store_page:\n"); cache_page_raw_dump (cp, stderr, PAGE_CODING_ODD_PARITY); } switch (cp->function) { case PAGE_FUNCTION_EPG: case PAGE_FUNCTION_ACI: case PAGE_FUNCTION_DISCARD: case PAGE_FUNCTION_DATA: /* Discard. */ break; case PAGE_FUNCTION_LOP: { page_stat *ps; vbi3_bool roll_header; if (0) cache_page_raw_dump (cp, stderr, PAGE_CODING_ODD_PARITY); roll_header = (vbi3_is_bcd (cp->pgno) && 0 == (cp->flags & (C5_NEWSFLASH | C6_SUBTITLE | C7_SUPPRESS_HEADER | C9_INTERRUPTED | C10_INHIBIT_DISPLAY))); if (roll_header) detect_channel_change (td, cp); /* We know there was a channel change, or the check was inconclusive and we suspect there was a change, or a change was already suspected but the header is unsuitable to make a decision now. Discard received data. */ if (td->reset_time > 0) return; /* Collect information about pages not listed in MIP and BTT. */ ps = cache_network_page_stat (td->network, cp->pgno); ps->flags = cp->flags; switch ((vbi3_page_type) ps->page_type) { case VBI3_NO_PAGE: case VBI3_UNKNOWN_PAGE: if (cp->flags & C6_SUBTITLE) ps->page_type = VBI3_SUBTITLE_PAGE; else ps->page_type = VBI3_NORMAL_PAGE; if (0xFF == ps->charset_code) ps->charset_code = page_charset_code (td, cp); break; case VBI3_NORMAL_PAGE: if (cp->flags & C6_SUBTITLE) ps->page_type = VBI3_SUBTITLE_PAGE; if (0xFF == ps->charset_code) ps->charset_code = page_charset_code (td, cp); break; case VBI3_TOP_BLOCK: case VBI3_TOP_GROUP: case VBI3_SUBTITLE_INDEX: case VBI3_NONSTD_SUBPAGES: case VBI3_PROGR_WARNING: case VBI3_CURRENT_PROGR: case VBI3_NOW_AND_NEXT: case VBI3_PROGR_INDEX: case VBI3_PROGR_SCHEDULE: if (0xFF == ps->charset_code) ps->charset_code = page_charset_code (td, cp); break; case VBI3_SUBTITLE_PAGE: if (cp->flags & C6_SUBTITLE) { /* Keep up-to-date, just in case. */ ps->charset_code = page_charset_code (td, cp); } else { /* Fixes bug in ORF 1 BTT. */ ps->page_type = VBI3_NORMAL_PAGE; } break; default: break; } if (td->handlers.event_mask & VBI3_EVENT_TTX_PAGE) { log ("... store %03x.%04x, " "packets=%x x26=%x x27=%x x28=%x\n", cp->pgno, cp->subno, cp->lop_packets, cp->x26_designations, cp->x27_designations, cp->x28_designations); cp1 = _vbi3_cache_put_page (td->cache, td->network, cp); if (cp1) { vbi3_event e; e.type = VBI3_EVENT_TTX_PAGE; e.network = &td->network->network; e.timestamp = td->timestamp; e.ev.ttx_page.pgno = cp->pgno; e.ev.ttx_page.subno = cp->subno; e.ev.ttx_page.flags = (roll_header ? VBI3_ROLL_HEADER : 0) | (cp->flags & (C5_NEWSFLASH | C6_SUBTITLE | C8_UPDATE | C11_MAGAZINE_SERIAL)); _vbi3_event_handler_list_send (&td->handlers, &e); cache_page_unref (cp1); } } break; } case PAGE_FUNCTION_GPOP: case PAGE_FUNCTION_POP: /* Page was decoded on the fly. */ if (td->handlers.event_mask & VBI3_EVENT_TTX_PAGE) { cp1 = _vbi3_cache_put_page (td->cache, td->network, cp); cache_page_unref (cp1); } break; case PAGE_FUNCTION_GDRCS: case PAGE_FUNCTION_DRCS: /* (Global) Dynamically Redefinable Characters download page - Identify valid PTUs, convert PTU bit planes to character pixmaps and store in cp->data.drcs.chars[]. Note characters can span multiple packets. */ if (td->handlers.event_mask & VBI3_EVENT_TTX_PAGE) { decode_drcs_page (cp); cp1 = _vbi3_cache_put_page (td->cache, td->network, cp); cache_page_unref (cp1); } break; case PAGE_FUNCTION_MOT: /* Magazine Organization Table - Store valid (G)POP and (G)DRCS links in td->network->magazine[n], update td->network->pages[]. */ decode_mot_page (td, cp); break; case PAGE_FUNCTION_MIP: /* Magazine Inventory Page - Store valid information in td->network->pages[]. */ decode_mip_page (td, cp); break; case PAGE_FUNCTION_BTT: /* Basic TOP Table - Store valid information in td->network->pages[], valid links to other BTT pages in td->network->btt_link[]. */ decode_btt_page (td, cp); break; case PAGE_FUNCTION_AIT: /* Page was decoded on the fly. */ cp1 = _vbi3_cache_put_page (td->cache, td->network, cp); if (cp1) { unsigned int i; unsigned int sum; sum = 0; for (i = 0; i < sizeof (cp->data.ait.title); ++i) sum += ((uint8_t *) &cp->data.ait.title)[i]; if (cp->data.ait.checksum != sum && (td->handlers.event_mask & VBI3_EVENT_TOP_CHANGE)) { vbi3_event e; e.type = VBI3_EVENT_TOP_CHANGE; e.network = &td->network->network; e.timestamp = td->timestamp; _vbi3_event_handler_list_send (&td->handlers, &e); } cp1->data.ait.checksum = sum; cache_page_unref (cp1); } break; case PAGE_FUNCTION_MPT: /* Multi-Page Table - Store valid information about single-digit subpages in td->network->pages[]. */ decode_mpt_page (td, cp); break; case PAGE_FUNCTION_MPT_EX: /* Multi-Page Extension Table - Store valid information about multi-digit subpages in td->network->pages[]. */ decode_mpt_ex_page (td, cp); break; case PAGE_FUNCTION_TRIGGER: if (td->handlers.event_mask & VBI3_EVENT_TRIGGER) eacem_trigger (td, cp); break; case PAGE_FUNCTION_UNKNOWN: /* The page is not listed in MIP, MOT or BTT, or we have no MIP, MOT or BTT (yet), and the page has no X/28/0 or /4, and the page has a non-bcd page number, and was not referenced from another page (yet). */ cp1 = _vbi3_cache_put_page (td->cache, td->network, cp); cache_page_unref (cp1); break; } } #if 0 /* TODO */ static vbi3_bool epg_callback (vbi3_pfc_demux * pc, void * user_data, const vbi3_pfc_block * block) { vbi3_teletext_decoder *td = user_data; return TRUE; } #endif static vbi3_bool decode_packet_0 (vbi3_teletext_decoder * td, cache_page * cp, const uint8_t buffer[42], unsigned int mag0) { int page; vbi3_pgno pgno; vbi3_subno subno; unsigned int flags; cache_page *cached_cp; if ((page = vbi3_unham16p (buffer + 2)) < 0) { _vbi3_teletext_decoder_resync (td); log ("Hamming error in packet 0 page number\n"); return FALSE; } pgno = ((0 == mag0) ? 0x800 : mag0 << 8) + page; if (0 && !vbi3_is_bcd (page) && 0xFF != page) { fprintf (stderr, "System page %x\n", pgno); } else { log ("Packet 0 page %x\n", pgno); } if (td->current) { if (td->current->flags & C11_MAGAZINE_SERIAL) { /* New pgno terminates the most recently received page. */ if (td->current->pgno != pgno) { store_page (td, td->current); cp->function = PAGE_FUNCTION_DISCARD; } } else { /* A new pgno terminates the most recently received page of the same magazine. */ if (0 != ((cp->pgno ^ pgno) & 0xFF)) { store_page (td, cp); cp->function = PAGE_FUNCTION_DISCARD; } } } /* A.1: mFF time filling / terminator. */ if (0xFF == page) { td->current = NULL; cp->function = PAGE_FUNCTION_DISCARD; return TRUE; } subno = (vbi3_unham16p (buffer + 4) + vbi3_unham16p (buffer + 6) * 256); /* C7 ... C14 */ flags = vbi3_unham16p (buffer + 8); if ((int)(subno | flags) < 0) { td->current = NULL; cp->function = PAGE_FUNCTION_DISCARD; return FALSE; } td->current = cp; if (PAGE_FUNCTION_DISCARD != cp->function && cp->pgno == pgno && cp->flags == (flags << 16) + subno) { /* Repeated header for time filling. */ return TRUE; } cp->pgno = pgno; cp->national = vbi3_rev8 (flags) & 7; cp->flags = (flags << 16) + subno; if (vbi3_is_bcd (page)) { subno &= 0x3F7F; log ("Normal page %03x.%04x flags %06x\n", cp->pgno, subno, cp->flags); if (!vbi3_is_bcd (subno)) { td->current = NULL; cp->function = PAGE_FUNCTION_DISCARD; return FALSE; } cp->subno = subno; } else { cp->subno = subno & 0x000F; log ("System page %03x.%04x flags %06x\n", cp->pgno, cp->subno, cp->flags); } if (cp->flags & C4_ERASE_PAGE) goto erase; cached_cp = _vbi3_cache_get_page (td->cache, td->network, cp->pgno, cp->subno, /* subno mask */ -1); if (cached_cp) { log ("... %03x.%04x is cached, " "packets=%x x26=%x x27=%x x28=%x\n", cached_cp->pgno, cached_cp->subno, cached_cp->lop_packets, cached_cp->x26_designations, cached_cp->x27_designations, cached_cp->x28_designations); /* Page is already cached. We load it into our page buffer, add received data and store the page back when complete. Note packet decoders write only correct data, this way we can fix broken pages in two or more passes. */ memcpy (&cp->data, &cached_cp->data, cache_page_size (cached_cp) - (sizeof (*cp) - sizeof (cp->data))); cp->function = cached_cp->function; switch (cp->function) { case PAGE_FUNCTION_UNKNOWN: case PAGE_FUNCTION_LOP: /* Store header packet. */ memcpy (cp->data.unknown.raw[0], buffer + 2, 40); break; default: break; } cp->lop_packets = cached_cp->lop_packets; cp->x26_designations = cached_cp->x26_designations; cp->x27_designations = cached_cp->x27_designations; cp->x28_designations = cached_cp->x28_designations; cache_page_unref (cached_cp); cached_cp = NULL; } else { page_stat *ps; /* Page is not cached, we rebuild from scratch. EPG, DATA and TRIGGER pages are never cached, they must be handled by the appropriate demultiplexer. Data from MOT, MIP, BTT, MPT and MPT_EX pages is cached in the cache_network struct, not as page data. */ erase: ps = cache_network_page_stat (td->network, cp->pgno); log ("... rebuild %03x.%04x from scratch\n", cp->pgno, cp->subno); /* Determine the page function from A.10 reserved page numbers. A.1: MIP and MOT always use subno 0. XXX should erase MIP/MOT/TOP tables on C4. */ if (0x1B0 == cp->pgno) { cp->function = PAGE_FUNCTION_ACI; ps->page_type = VBI3_ACI_PAGE; } else if (0x1F0 == cp->pgno) { cp->function = PAGE_FUNCTION_BTT; ps->page_type = VBI3_TOP_PAGE; CLEAR (cp->data.ext_lop); } else if (0xFD == page && 0 == cp->subno) { cp->function = PAGE_FUNCTION_MIP; ps->page_type = VBI3_SYSTEM_PAGE; CLEAR (cp->data.ext_lop); } else if (0xFE == page && 0 == cp->subno) { cp->function = PAGE_FUNCTION_MOT; ps->page_type = VBI3_SYSTEM_PAGE; CLEAR (cp->data.ext_lop); } else { cp->function = PAGE_FUNCTION_UNKNOWN; clear_lop (cp); clear_enhancement (cp); /* No X/28 packets received. */ cp->data.ext_lop.ext.designations = 0; /* Store header packet. */ memcpy (cp->data.unknown.raw[0] + 0, buffer + 2, 40); } /* Packet 0 received. */ cp->lop_packets = 1; cp->x26_designations = 0; cp->x27_designations = 0; cp->x28_designations = 0; } /* Determine the page function from MOT, MIP or BTT data. Another opportunity arises when we receive packet X/28, see there. */ if (PAGE_FUNCTION_UNKNOWN == cp->function) { page_stat *ps; ps = cache_network_page_stat (td->network, cp->pgno); switch ((vbi3_page_type) ps->page_type) { case VBI3_NO_PAGE: /* Who's wrong here? */ ps->page_type = VBI3_UNKNOWN_PAGE; cp->function = PAGE_FUNCTION_DISCARD; break; case VBI3_NORMAL_PAGE: case VBI3_TOP_BLOCK: case VBI3_TOP_GROUP: case VBI3_SUBTITLE_PAGE: case VBI3_SUBTITLE_INDEX: case VBI3_NONSTD_SUBPAGES: case VBI3_CURRENT_PROGR: case VBI3_NOW_AND_NEXT: case VBI3_PROGR_WARNING: case VBI3_PROGR_INDEX: case VBI3_PROGR_SCHEDULE: cp->function = PAGE_FUNCTION_LOP; break; case VBI3_SYSTEM_PAGE: /* Not ACI, BTT, MOT or MIP (reserved page number), not MPT, AIT or MPT-EX (VBI3_TOP_PAGE), so it remains unknown. */ break; case VBI3_TOP_PAGE: { cache_network *cn; unsigned int i; cn = td->network; for (i = 0; i < N_ELEMENTS (cn->btt_link); ++i) if (cn->btt_link[i].pgno == cp->pgno) break; if (i < N_ELEMENTS (cn->btt_link)) { switch (cn->btt_link[i].function) { case PAGE_FUNCTION_MPT: case PAGE_FUNCTION_MPT_EX: cp->function = cn->btt_link[i].function; break; case PAGE_FUNCTION_AIT: { cache_page temp; cache_page_copy (&temp, cp); convert_ait_page (cp, &temp); cp->function = PAGE_FUNCTION_AIT; break; } default: assert (0); break; } } else { log ("%03x.%04x claims to be " "TOP page, but no link found\n", cp->pgno, cp->subno); } break; } case VBI3_DRCS_PAGE: { unsigned int i; /* 14.1: Packet X/28/3 is optional when PTUs use only mode 12x10x1. B.2: X/28 must be transmitted before packets 1 ... 24. We have only the header yet, so let's default. Conversion of packets 1 ... 24 we may have cached before takes place when the page is complete. */ for (i = 0; i < DRCS_PTUS_PER_PAGE; ++i) cp->data.drcs.mode[i] = DRCS_MODE_12_10_1; cp->function = PAGE_FUNCTION_DRCS; break; } case VBI3_POP_PAGE: { cache_page temp; cache_page_copy (&temp, cp); convert_pop_page (cp, &temp, PAGE_FUNCTION_POP); break; } case VBI3_TRIGGER_DATA: cp->function = PAGE_FUNCTION_TRIGGER; break; case VBI3_PFC_EPG_DATA: { cp->function = PAGE_FUNCTION_EPG; #if 0 /* TODO */ if (0 == td->epg_stream[0].block.pgno) { _vbi3_pfc_demux_init (&td->epg_stream[0], cp->pgno, 1, epg_callback, td); _vbi3_pfc_demux_init (&td->epg_stream[1], cp->pgno, 2, epg_callback, td); } #endif break; } case VBI3_NOT_PUBLIC: case VBI3_CA_DATA: case VBI3_PFC_DATA: case VBI3_KEYWORD_SEARCH_LIST: cp->function = PAGE_FUNCTION_DISCARD; break; default: if (vbi3_is_bcd (page)) cp->function = PAGE_FUNCTION_LOP; /* else remains unknown. */ break; } log ("... identified as %s\n", page_function_name (cp->function)); } switch (cp->function) { case PAGE_FUNCTION_ACI: case PAGE_FUNCTION_TRIGGER: /* ? */ break; case PAGE_FUNCTION_BTT: case PAGE_FUNCTION_AIT: case PAGE_FUNCTION_MPT: case PAGE_FUNCTION_MPT_EX: /* ? */ /* Observation: BTT with 3Fx0, others with 0000. */ break; case PAGE_FUNCTION_LOP: /* 0000 single page, 0001 ... 0079 multi page 2359 clock page / subpages not to be cached. */ break; case PAGE_FUNCTION_EPG: case PAGE_FUNCTION_DATA: /* Uses different scheme, see EN 300 708 4.3.1 */ break; case PAGE_FUNCTION_GPOP: case PAGE_FUNCTION_POP: case PAGE_FUNCTION_GDRCS: case PAGE_FUNCTION_DRCS: case PAGE_FUNCTION_MOT: case PAGE_FUNCTION_MIP: { unsigned int last_packet; unsigned int continuity; /* A.1, B.6 Page numbering. */ /* C12, C13 not observed in the field, last_packet is unreliable, so this information is pretty useless. */ last_packet = subno >> 8; continuity = (subno >> 4) & 15; if (last_packet >= 26) log ("... last packet X/26/%u ci %u ", last_packet - 26, continuity); else log ("... last packet X/%u ci %u ", last_packet, continuity); if (cp->flags & C13_PARTIAL_PAGE) log ("partial page"); else log ("full page"); if (cp->flags & C12_FRAGMENT) log (" fragment\n"); else log (", complete or first fragment\n"); break; } case PAGE_FUNCTION_DISCARD: case PAGE_FUNCTION_UNKNOWN: break; } return TRUE; } /* 9.4.1 Teletext packet 26, enhancement data. */ static vbi3_bool decode_packet_26 (vbi3_teletext_decoder * td, cache_page * cp, const uint8_t buffer[42]) { int n18[13]; int designation; int err; triplet *trip; unsigned int i; switch (cp->function) { case PAGE_FUNCTION_DISCARD: return TRUE; case PAGE_FUNCTION_GPOP: case PAGE_FUNCTION_POP: return decode_pop_packet (cp, buffer + 2, 26); case PAGE_FUNCTION_ACI: case PAGE_FUNCTION_EPG: case PAGE_FUNCTION_DATA: case PAGE_FUNCTION_GDRCS: case PAGE_FUNCTION_DRCS: case PAGE_FUNCTION_MOT: case PAGE_FUNCTION_MIP: case PAGE_FUNCTION_BTT: case PAGE_FUNCTION_AIT: case PAGE_FUNCTION_MPT: case PAGE_FUNCTION_MPT_EX: /* Not supposed to have X/26, tx error? */ _vbi3_teletext_decoder_resync (td); return FALSE; case PAGE_FUNCTION_UNKNOWN: case PAGE_FUNCTION_LOP: case PAGE_FUNCTION_TRIGGER: break; } designation = vbi3_unham8 (buffer[2]); err = 0; for (i = 0; i < 13; ++i) err |= n18[i] = vbi3_unham24p (buffer + 3 + i * 3); if (TELETEXT_DECODER_LOG) { log ("Packet X/26/%u page %x.%x flags %x\n", designation, cp->pgno, cp->subno, cp->flags); for (i = 1; i < 13; ++i) log ("... %u: %d %x\n", i, n18[i], n18[i]); } if ((designation | err) < 0) { return FALSE; } #if 0 /* B.2, D.1.3: Packets X/26 must arrive in designation order 0 ... 15. No check here if the sequence is correct and complete, that happens in page formatting. */ if (cp->x26_designations != (0x0FFFFU >> (16 - designation))) { cp->x26_designations = 0; return FALSE; } #endif cp->x26_designations |= 1 << designation; trip = &cp->data.enh_lop.enh[designation * 13]; for (i = 0; i < 13; ++i) { trip->address = (n18[i] >> 0) & 0x3F; trip->mode = (n18[i] >> 6) & 0x1F; trip->data = (n18[i] >> 11); ++trip; } return TRUE; } /* 9.6 Teletext packet 27, page linking. */ static vbi3_bool decode_packet_27 (vbi3_teletext_decoder * td, cache_page * cp, const uint8_t buffer[42]) { const uint8_t *p; int designation; switch (cp->function) { case PAGE_FUNCTION_DISCARD: return TRUE; case PAGE_FUNCTION_ACI: case PAGE_FUNCTION_EPG: case PAGE_FUNCTION_DATA: case PAGE_FUNCTION_GPOP: case PAGE_FUNCTION_POP: case PAGE_FUNCTION_GDRCS: case PAGE_FUNCTION_DRCS: case PAGE_FUNCTION_MOT: case PAGE_FUNCTION_MIP: case PAGE_FUNCTION_BTT: case PAGE_FUNCTION_AIT: case PAGE_FUNCTION_MPT: case PAGE_FUNCTION_MPT_EX: case PAGE_FUNCTION_TRIGGER: /* Not supposed to have X/27, tx error? */ _vbi3_teletext_decoder_resync (td); return FALSE; case PAGE_FUNCTION_UNKNOWN: case PAGE_FUNCTION_LOP: break; } if ((designation = vbi3_unham8 (buffer[2])) < 0) return FALSE; log ("Packet X/27/%u page %03x.%x\n", designation, cp->pgno, cp->subno); p = buffer + 3; switch (designation) { case 0: { int control; unsigned int crc; if ((control = vbi3_unham8 (buffer[39])) < 0) return FALSE; log ("... control %02x\n", control); /* CRC cannot be trusted, some stations transmit incorrect data. Link Control Byte bits 1 ... 3 (disable green, yellow, blue key) cannot be trusted, EN 300 706 is ambiguous and not all stations follow the suggestions of ETR 287. */ crc = buffer[40] + buffer[41] * 256; log ("... crc %04x\n", crc); /* ETR 287 section 10.4: Have FLOF, display row 24. */ cp->data.lop.have_flof = control >> 3; /* fall through */ } case 1 ... 3: { unsigned int i; /* X/27/0 ... 4 */ for (i = 0; i < 6; ++i) { pagenum *pn; pn = &cp->data.lop.link[designation * 6 + i]; /* Hamming error ignored. We just don't store broken page numbers. */ unham8_page_number (pn, p, (unsigned int)(cp->pgno >> 8) & 7); p += 6; log ("... link[%u] = %03x.%04x\n", i, pn->pgno, pn->subno); } cp->x27_designations |= 1 << designation; break; } case 4 ... 7: { unsigned int i; /* X/27/4 ... 7 */ /* (Never observed this in the field; let's hope the code is correct.) */ for (i = 0; i < 6; ++i) { pagenum *pn; int t1, t2; t1 = vbi3_unham24p (p + 0); t2 = vbi3_unham24p (p + 3); if ((t1 | t2) < 0) break; p += 6; if (designation <= 5 && (t1 & (1 << 10))) { unsigned int mag0; unsigned int validity; /* 9.6.2 Packets X/27/4 and X/27/5 format 1. */ /* t1: tt ttmmm1uu uuxxvvff */ /* t2: ss ssssssss ssssssx0 */ pn = &cp->data.lop.link[designation * 6 + i]; /* GPOP, POP, GDRCS, DRCS */ pn->function = PAGE_FUNCTION_GPOP + (t1 & 3); validity = (t1 >> 2) & 3; mag0 = (cp->pgno ^ (t1 >> 3)) & 0x700; pn->pgno = ((0 == mag0) ? 0x800 : mag0) + (t1 >> 10) + ((t1 >> 6) & 0x00F); /* NB this is "set of required subpages", not a real subno. */ pn->subno = t2 >> 2; log ("... link[%u] = %s %x/%x\n", i, page_function_name (pn->function), pn->pgno, pn->subno); /* XXX "The function of first four links in a packet X/27/4 with the link coding of table 15 is fixed for Level 2.5, as shown in table 16. The Page Validity bits may also indicate their use at Level 3.5. The function of the remaining two links in a packet X/27/4 and the first two links in a packet X/27/5 is defined by the Link Function and Page Validity bits. These links do not contain information relevant to a Level 2.5 decoder." */ } else { /* 9.6.3 Packets X/27/4 to X/27/7 format 2 - compositional linking in data broadcasting applications. */ /* Ignored. */ } } cp->x27_designations |= 1 << designation; break; } case 8 ... 15: /* Undefined, ignored. */ break; } return TRUE; } /* 9.4.2, 9.4.3, 9.5 Teletext packets 28 and 29, Level 2.5/3.5 enhancement. */ struct bit_stream { int * triplet; unsigned int buffer; unsigned int left; }; static unsigned int get_bits (struct bit_stream * bs, unsigned int count) { unsigned int r; int n; r = bs->buffer; n = count - bs->left; if (n > 0) { bs->buffer = *(bs->triplet)++; r |= bs->buffer << bs->left; bs->left = 18 - n; } else { n = count; bs->left -= count; } bs->buffer >>= n; return r & ((1UL << count) - 1); } static vbi3_bool decode_packet_28_29 (vbi3_teletext_decoder * td, cache_page * cp, const uint8_t buffer[42], unsigned int packet) { const uint8_t *p; int designation; int n18[13]; struct bit_stream bs; extension *ext; unsigned int i; unsigned int j; int err; switch (cp->function) { case PAGE_FUNCTION_DISCARD: return TRUE; default: break; } p = buffer + 2; if ((designation = vbi3_unham8 (*p++)) < 0) return FALSE; log ("Packet %u/%u/%u page %03x.%x\n", (cp->pgno >> 8) & 7, packet, designation, cp->pgno, cp->subno); err = 0; for (i = 0; i < 13; ++i) { err |= n18[i] = vbi3_unham24p (p); p += 3; } bs.triplet = n18; bs.buffer = 0; bs.left = 0; switch (designation) { case 0: { /* X/28/0, M/29/0 Level 2.5 */ if (n18[0] < 0) return FALSE; if (28 == packet) { /* triplet[13 ... 0], bit 18 ... 1: ... ssss pppppp p 000 0000 a) reserved 0011 111111 1 001 0001 b) reserved 0011 111111 1 ccc ffff c) reserved cccc 000000 0 xx0 0000 d) reserved cccc 000000 1 000 0100 e) reserved cccc 000000 1 000 0101 f) ... 000000 0 ccc ffff g) ... 000000 1 111 0011 h) ... 000010 0 111 0011 h) a) X/28/0 format 1 - function = LOP, coding = ODD_PARITY, primary and secondary character set code (0 ... 87) (EN 300 706, 9.4.2.2) b) X/28/0 format 1 - function = DATA (PFC), coding = UBYTES (EN 300 708, 4.3.3) c) X/28/0 format 1 for other types of pages (EN 300 706, 9.4.2.4) d) X/28/0 format 2 (CA) - coding 0 ... 3. (EN 300 706, 9.4.3 and EN 300 708, 5.4.1) e), f) same as d) g) observed on SWR with cccffff != 0, in violation of c). h) observed on ARTE, transmitted with various level one pages. Apparently not format 1 or 2. How am I supposed to distinguish a) with p=0 (en) or p=1 (de) from d)? Not to mention g) and h). */ if (0 == (n18[0] & 0x3F00) && 0 != (n18[0] & 0x7F)) { unsigned int i; log ("... format 2 ignored.\n"); if (0) { for (i = 0; i < 40; ++i) fprintf (stderr, "%02x ", buffer[2 + i]); fputc ('\n', stderr); for (i = 0; i < 13; ++i) fprintf (stderr, "%05x ", n18[i]); fputc ('\n', stderr); } break; } } /* fall through */ } case 4: { page_function function; page_coding coding; /* X/28/0, M/29/0 Level 2.5 */ /* X/28/4, M/29/4 Level 3.5 */ if (n18[0] < 0) return FALSE; function = get_bits (&bs, 4); coding = get_bits (&bs, 3); log ("... %s, %s\n", page_function_name (function), page_coding_name (coding)); if (function > PAGE_FUNCTION_TRIGGER || coding > PAGE_CODING_META84) break; /* undefined */ if (28 == packet) { if (PAGE_FUNCTION_UNKNOWN == cp->function) { switch (function) { case PAGE_FUNCTION_ACI: case PAGE_FUNCTION_EPG: case PAGE_FUNCTION_DISCARD: case PAGE_FUNCTION_UNKNOWN: /* libzvbi private */ assert (0); case PAGE_FUNCTION_LOP: /* ZDF and BR3 transmit GPOP 1EE/.. with 1/28/0 function 0 = PAGE_FUNCTION_LOP, should be PAGE_FUNCTION_GPOP. Cannot trust function. */ break; case PAGE_FUNCTION_DATA: case PAGE_FUNCTION_MOT: case PAGE_FUNCTION_MIP: case PAGE_FUNCTION_BTT: case PAGE_FUNCTION_MPT: case PAGE_FUNCTION_MPT_EX: case PAGE_FUNCTION_TRIGGER: cp->function = function; break; case PAGE_FUNCTION_GPOP: case PAGE_FUNCTION_POP: { cache_page temp; cache_page_copy (&temp, cp); convert_pop_page (cp, &temp, function); break; } case PAGE_FUNCTION_GDRCS: case PAGE_FUNCTION_DRCS: { unsigned int i; /* See comments in decode_packet_0. */ for (i= 0; i < DRCS_PTUS_PER_PAGE; ++i) cp->data.drcs.mode[i] = DRCS_MODE_12_10_1; cp->function = function; break; } case PAGE_FUNCTION_AIT: { cache_page temp; cache_page_copy (&temp, cp); convert_ait_page (cp, &temp); break; } } } else if (function != cp->function) { /* Who's wrong here? */ cp->function = PAGE_FUNCTION_DISCARD; return FALSE; } /* 9.4.2.2: Rest of packet applies to LOP only. */ if (PAGE_FUNCTION_LOP != function) break; /* All remaining triplets must be correct. */ if (err < 0) return FALSE; ext = &cp->data.ext_lop.ext; cp->x28_designations |= 1 << designation; } else { /* 9.5.1: Rest of packet applies if zero. */ if (function | coding) break; if (err < 0) return FALSE; ext = &cache_network_magazine (td->network, cp->pgno) ->extension; } if (4 == designation && (ext->designations & (1 << 0))) { /* 9.4.2.2: X/28/0 takes precedence over X/28/4, 9.5.1: M/29/0 takes precendence over M/29/4, for all but the colour map entry coding. */ get_bits (&bs, 7 + 7 + 1 + 1 + 1 + 4); } else { unsigned int left_panel; unsigned int right_panel; unsigned int left_columns; ext->charset_code[0] = get_bits (&bs, 7); ext->charset_code[1] = get_bits (&bs, 7); left_panel = get_bits (&bs, 1); right_panel = get_bits (&bs, 1); /* 0 - panels required at Level 3.5 only, 1 - at 2.5 and 3.5 ignored. */ get_bits (&bs, 1); left_columns = get_bits (&bs, 4); if (left_panel && 0 == left_columns) left_columns = 16; ext->fallback.left_panel_columns = left_columns & -left_panel; ext->fallback.right_panel_columns = (16 - left_columns) & -right_panel; } /* Color map for CLUTs 0 & 1 (desig. 4) or 2 & 3. */ j = (4 == designation) ? 16 : 32; for (i = j - 16; i < j; ++i) { vbi3_rgba col = get_bits (&bs, 12); if (8 == i) /* transparent */ continue; col = VBI3_RGBA ((col ) & 15, (col >> 4) & 15, (col >> 8)); ext->color_map[i] = col | (col << 4); } /* libzvbi private, invariable. */ memcpy (ext->color_map + 32, default_color_map + 32, 8 * sizeof (*ext->color_map)); if (4 == designation && (ext->designations & (1 << 0))) { /* 9.4.2.2: X/28/0 takes precedence over X/28/4, 9.5.1: M/29/0 takes precendence over M/29/4, for all but the colour map entry coding. */ get_bits (&bs, 5 + 5 + 1 + 3); } else { ext->def_screen_color = get_bits (&bs, 5); ext->def_row_color = get_bits (&bs, 5); ext->fallback.black_bg_substitution = get_bits (&bs, 1); i = get_bits (&bs, 3); /* color table remapping */ ext->foreground_clut = "\00\00\00\10\10\20\20\20"[i]; ext->background_clut = "\00\10\20\10\20\10\20\30"[i]; } ext->designations |= 1 << designation; if (0) extension_dump (ext, stderr); break; } case 1: /* X/28/1, M/29/1 Level 3.5 DRCS CLUT */ { if (err < 0) return FALSE; if (28 == packet) { ext = &cp->data.ext_lop.ext; cp->x28_designations |= 1 << 1; } else { ext = &cache_network_magazine (td->network, cp->pgno) ->extension; } /* 9.4.4: "Compatibility, not for Level 2.5/3.5 decoders." No more details, so we ignore this triplet. */ ++bs.triplet; for (i = 0; i < 8; ++i) ext->drcs_clut[i + 2] = vbi3_rev8 (get_bits (&bs, 5)) >> 3; for (i = 0; i < 32; ++i) ext->drcs_clut[i + 10] = vbi3_rev8 (get_bits (&bs, 5)) >> 3; ext->designations |= 1 << 1; break; } case 2: { /* CA key packet ignored. */ break; } case 3: { page_function function; page_coding coding; /* X/28/3 Level 3.5 DRCS download page modes */ if (29 == packet) break; /* M/29/3 undefined */ if (n18[0] < 0) return FALSE; cp->x28_designations |= 1 << 3; function = get_bits (&bs, 4); coding = get_bits (&bs, 3); log ("... %s, %s\n", page_function_name (function), page_coding_name (coding)); if (PAGE_FUNCTION_GDRCS != function && PAGE_FUNCTION_DRCS != function) break; /* undefined */ if (err < 0) return FALSE; if (PAGE_FUNCTION_UNKNOWN == cp->function) { cp->function = function; } else if (function != cp->function) { /* Who's wrong here? */ cp->function = PAGE_FUNCTION_DISCARD; return FALSE; } get_bits (&bs, 11); /* reserved */ for (i = 0; i < 48; ++i) cp->data.drcs.mode[i] = get_bits (&bs, 4); /* Rest reserved. */ break; } case 5 ... 15: /* Undefined, ignored. */ break; } return TRUE; } /* 9.8 Teletext packet 8/30, broadcast service data. */ static void cni_change (vbi3_teletext_decoder * td, vbi3_cni_type type, unsigned int cni, double timeout_min) { cache_network *cn; double timeout; cn = td->network; timeout = 0.0; if (VBI3_CNI_TYPE_VPS != type && 0 != cn->network.cni_vps && (cn->network.cni_vps != vbi3_convert_cni (VBI3_CNI_TYPE_VPS, type, cni))) { /* We cannot say with certainty if cni and cni_vps belong to the same network. If 0 == vbi3_convert_cni() we cannot convert, otherwise CNIs mismatch because the channel changed, the network transmits wrong CNIs or the conversion is incorrect. After n seconds, if we cannot confirm the cni_vps or receive a new one, we assume there was a channel change and the new network does not transmit a cni_vps. */ cn->confirm_cni_vps = cn->network.cni_vps; timeout = td->cni_vps_timeout; } if (VBI3_CNI_TYPE_8301 != type && 0 != cn->network.cni_8301 && (cn->network.cni_8301 != vbi3_convert_cni (VBI3_CNI_TYPE_8301, type, cni))) { cn->confirm_cni_8301 = cn->network.cni_8301; timeout = td->cni_830_timeout; } if (VBI3_CNI_TYPE_8302 != type && 0 != cn->network.cni_8302 && (cn->network.cni_8302 != vbi3_convert_cni (VBI3_CNI_TYPE_8302, type, cni))) { cn->confirm_cni_8302 = cn->network.cni_8302; timeout = td->cni_830_timeout; } if (timeout > 0.0) { td->virtual_reset (td, NULL, td->timestamp + MAX (timeout, timeout_min)); } } static vbi3_bool status_change (vbi3_teletext_decoder * td, const uint8_t buffer[42]) { const vbi3_character_set *cs; char *title; cs = vbi3_character_set_from_code (0); /* XXX ok? */ title = _vbi3_strdup_locale_teletext (buffer + 22, 20, cs); if (!title) return FALSE; #ifdef ZAPPING8 td = td; #else { cache_network *cn; vbi3_event e; cn = td->network; vbi3_free (cn->program_info.title); cn->program_info.title = title; e.type = VBI3_EVENT_PROG_INFO; e.network = &cn->network; e.timestamp = td->timestamp; e.ev.prog_info = &cn->program_info; _vbi3_event_handler_list_send (&td->handlers, &e); } #endif return TRUE; } static vbi3_bool decode_packet_8_30 (vbi3_teletext_decoder * td, const uint8_t buffer[42]) { int designation; if ((designation = vbi3_unham8 (buffer[2])) < 0) return FALSE; log ("Packet 8/30/%d\n", designation); if (designation > 4) return TRUE; /* undefined, ignored */ if (td->reset_time <= 0.0) { if (td->handlers.event_mask & VBI3_EVENT_TTX_PAGE) { pagenum pn; if (!unham8_page_number (&pn, buffer + 3, 0)) return FALSE; /* 9.8.1 Table 18 Note 2 */ if (!NO_PAGE (pn.pgno)) { pn.function = PAGE_FUNCTION_LOP; td->network->initial_page = pn; } } if (td->handlers.event_mask & VBI3_EVENT_PROG_INFO) { uint8_t *s; unsigned int i; int err; err = 0; for (i = 0; i < 20; ++i) { err |= vbi3_unpar8 (buffer[i + 22]); if (0) { int c = buffer[i + 22]; fprintf (stderr, "%2u %02x %02x %c\n", i, td->network->status[i], c & 0x7F, vbi3_printable (c)); } } if (err < 0) return FALSE; assert (20 == sizeof (td->network->status)); s = td->network->status; if (0 != memcmp (s, buffer + 22, 20)) { if (status_change (td, buffer)) memcpy (s, buffer + 22, 20); } } } if (designation < 2) { unsigned int cni; cache_network *cn; /* 8/30 format 1 */ if (!vbi3_decode_teletext_8301_cni (&cni, buffer)) return FALSE; cn = td->network; if (0 == cni) { /* Should probably ignore this. */ } else if (cni == cn->network.cni_8301) { /* No CNI change, no channel change. */ cn->confirm_cni_8301 = 0; if (0 == cn->confirm_cni_vps && 0 == cn->confirm_cni_8302) { /* All CNIs valid, cancel reset requests. */ td->virtual_reset (td, NULL, -1.0); } } else if (cni == cn->confirm_cni_8301) { /* The CNI is correct. */ if (0 == cn->network.cni_8301) { /* First CNI, assume no channel change. */ vbi3_network_set_cni (&cn->network, VBI3_CNI_TYPE_8301, cni); cn->confirm_cni_8301 = 0; if (0 == cn->confirm_cni_vps && 0 == cn->confirm_cni_8302) { /* All CNIs valid, cancel reset requests. */ td->virtual_reset (td, NULL, -1.0); } } else { vbi3_network nk; cache_network *cn; /* Different CNI, channel change detected. */ vbi3_network_init (&nk); vbi3_network_set_cni (&nk, VBI3_CNI_TYPE_8301, cni); cn = _vbi3_cache_add_network (td->cache, &nk, td->videostd_set); td->virtual_reset (td, cn, 0.0 /* now */); cache_network_unref (cn); vbi3_network_destroy (&nk); } network_event (td); } else { /* The packet 8/30 format 1 CNI is poorly error protected. We accept this CNI after receiving it twice in a row. */ cn->confirm_cni_8301 = cni; if (0 == cn->network.cni_8301) { /* First CNI, channel change possible. */ cni_change (td, VBI3_CNI_TYPE_8301, cni, td->cni_830_timeout); } else { /* Assume a channel change with unknown CNI if we cannot confirm the new CNI or receive the old CNI again within n seconds. */ td->virtual_reset (td, NULL, td->timestamp + td->cni_830_timeout); } } if (td->handlers.event_mask & VBI3_EVENT_LOCAL_TIME) { vbi3_event e; if (!vbi3_decode_teletext_8301_local_time (&e.ev.local_time.time, &e.ev.local_time.gmtoff, buffer)) return FALSE; e.type = VBI3_EVENT_LOCAL_TIME; e.network = &td->network->network; e.timestamp = td->timestamp; _vbi3_event_handler_list_send (&td->handlers, &e); } } else { unsigned int cni; cache_network *cn; /* 8/30 format 2 */ if (!vbi3_decode_teletext_8302_cni (&cni, buffer)) return FALSE; cn = td->network; if (0 == cni) { /* Should probably ignore this. */ } else if (cni == cn->network.cni_8302) { /* No CNI change, no channel change. */ cn->confirm_cni_8302 = 0; /* confirmed */ if (0 == cn->confirm_cni_vps && 0 == cn->confirm_cni_8301) { /* All CNIs valid, cancel reset requests. */ td->virtual_reset (td, NULL, -1.0); } } else { if (0 == cn->network.cni_8302) { /* First CNI, channel change possible. */ vbi3_network_set_cni (&cn->network, VBI3_CNI_TYPE_8302, cni); cn->confirm_cni_8302 = 0; cni_change (td, VBI3_CNI_TYPE_8302, cni, 0.0); if (0 == cn->confirm_cni_vps && 0 == cn->confirm_cni_8301) { /* All CNIs valid, cancel reset requests. */ td->virtual_reset (td, NULL, -1.0); } } else { vbi3_network nk; cache_network *cn; /* Different CNI, channel change detected. */ vbi3_network_init (&nk); vbi3_network_set_cni (&nk, VBI3_CNI_TYPE_8302, cni); cn = _vbi3_cache_add_network (td->cache, &nk, td->videostd_set); td->virtual_reset (td, cn, 0.0 /* now */); cache_network_unref (cn); vbi3_network_destroy (&nk); } network_event (td); } #ifndef ZAPPING8 if (td->handlers.event_mask & VBI3_EVENT_PROG_ID) { vbi3_program_id pid; vbi3_program_id *p; if (!vbi3_decode_teletext_8302_pdc (&pid, buffer)) return FALSE; p = &td->network->program_id[pid.channel]; if (p->cni != pid.cni || p->pil != pid.pil || ((p->luf ^ pid.luf) | (p->mi ^ pid.mi) | (p->prf ^ pid.prf)) || p->pcs_audio != pid.pcs_audio || p->pty != pid.pty) { vbi3_event e; *p = pid; e.type = VBI3_EVENT_PROG_ID; e.network = &td->network->network; e.timestamp = td->timestamp; e.ev.prog_id = p; _vbi3_event_handler_list_send (&td->handlers, &e); } } #endif /* !ZAPPING8 */ } return TRUE; } /** * @param td Teletext decoder allocated with vbi3_teletext_decoder_new(). * @param buffer Teletext packet as defined for @c VBI3_SLICED_TELETEXT_B, * i.e. 42 bytes without clock run-in and framing code. * @param timestamp System time in seconds when the Teletext packet * was captured. * * Decodes a teletext packet and update the decoder state. * * Return value: * @c FALSE if the packet contained incorrectable errors. */ vbi3_bool vbi3_teletext_decoder_feed (vbi3_teletext_decoder * td, const uint8_t buffer[42], double timestamp) { vbi3_bool success; cache_page *cp; int pmag; int mag0; int packet; success = FALSE; td->timestamp = timestamp; if (td->reset_time > 0 && timestamp >= td->reset_time) { cache_network *cn; /* Deferred reset. */ cn = _vbi3_cache_add_network (td->cache, NULL, td->videostd_set); td->virtual_reset (td, cn, 0.0 /* now */); cache_network_unref (cn); network_event (td); } if ((pmag = vbi3_unham16p (buffer)) < 0) goto finish; mag0 = pmag & 7; packet = pmag >> 3; cp = &td->buffer[mag0]; if (0) { unsigned int i; fprintf (stderr, "packet %xxx %d >", (0 == mag0) ? 8 : mag0, packet); for (i = 0; i < 40; i++) fputc (vbi3_printable (buffer[2 + i]), stderr); fprintf (stderr, "<\n"); } if (packet < 30 && 0 == (td->handlers.event_mask & (VBI3_EVENT_TTX_PAGE | VBI3_EVENT_TRIGGER | VBI3_EVENT_PAGE_TYPE | VBI3_EVENT_TOP_CHANGE))) { success = TRUE; goto finish; } switch (packet) { case 0: /* Page header. */ success = decode_packet_0 (td, cp, buffer, (unsigned int) mag0); break; case 1 ... 25: /* Page body. */ switch (cp->function) { case PAGE_FUNCTION_DISCARD: success = TRUE; break; case PAGE_FUNCTION_GPOP: case PAGE_FUNCTION_POP: success = decode_pop_packet (cp, buffer + 2, (unsigned int) packet); break; case PAGE_FUNCTION_GDRCS: case PAGE_FUNCTION_DRCS: memcpy (cp->data.drcs.lop.raw[packet], buffer + 2, 40); success = TRUE; break; case PAGE_FUNCTION_AIT: success = decode_ait_packet (cp, buffer + 2, (unsigned int) packet); break; case PAGE_FUNCTION_EPG: /* TODO */ success = TRUE; break; case PAGE_FUNCTION_LOP: case PAGE_FUNCTION_TRIGGER: { unsigned int i; int err; err = 0; for (i = 0; i < 40; ++i) err |= vbi3_unpar8 (buffer[2 + i]); if (err < 0) break; memcpy (cp->data.unknown.raw[packet], buffer + 2, 40); success = TRUE; break; } case PAGE_FUNCTION_MOT: case PAGE_FUNCTION_MIP: case PAGE_FUNCTION_BTT: case PAGE_FUNCTION_MPT: case PAGE_FUNCTION_MPT_EX: default: memcpy (cp->data.unknown.raw[packet], buffer + 2, 40); success = TRUE; break; } cp->lop_packets |= 1 << packet; break; case 26: /* Page enhancement packet. */ success = decode_packet_26 (td, cp, buffer); break; case 27: /* Page linking. */ success = decode_packet_27 (td, cp, buffer); break; case 28: case 29: /* Level 2.5/3.5 enhancement. */ success = decode_packet_28_29 (td, cp, buffer, (unsigned int) packet); break; case 30: case 31: { unsigned int channel; /* IDL packet (ETS 300 708). */ channel = pmag & 15; switch (channel) { case 0: success = decode_packet_8_30 (td, buffer); break; /* 1 ... 3 = Packet 1/30 ... 3/30 */ /* 4 = Low bit rate audio */ /* 5 ... 6 = Datavideo */ /* 7 = Packet 7/30 */ /* 8 ... 11 = IDL Format A (Packet 8/31, 1/31 ... 3/31) */ /* 12 = Low bit rate audio */ /* 13 ... 14 = Datavideo */ /* 15 = Packet 7/31 */ default: log ("IDL %u\n", channel); success = TRUE; break; } break; } default: assert (0); } finish: td->error_history = td->error_history * 2 + success; return success; } /** * DOCUMENT ME */ vbi3_search * vbi3_teletext_decoder_search_utf8_new (vbi3_teletext_decoder *td, const vbi3_network * nk, vbi3_pgno pgno, vbi3_subno subno, const char * pattern, vbi3_bool casefold, vbi3_bool regexp, vbi3_search_progress_cb *progress, void * user_data) { assert (NULL != td); if (NULL == nk) { if (!td->network) return NULL; nk = &td->network->network; } /* XXX s/nk/cn ? */ return vbi3_search_utf8_new (td->cache, nk, pgno, subno, pattern, casefold, regexp, progress, user_data); } /** * DOCUMENT ME */ vbi3_bool vbi3_teletext_decoder_get_top_title (vbi3_teletext_decoder * td, vbi3_top_title * tt, const vbi3_network * nk, vbi3_pgno pgno, vbi3_subno subno) { cache_network *cn; vbi3_bool r; assert (NULL != td); assert (NULL != tt); if (nk) { if (!(cn = _vbi3_cache_get_network (td->cache, nk))) return FALSE; } else { /* Current network. */ cn = td->network; } r = cache_network_get_top_title (cn, tt, pgno, subno); if (nk) cache_network_unref (cn); return r; } /** * DOCUMENT ME */ vbi3_top_title * vbi3_teletext_decoder_get_top_titles (vbi3_teletext_decoder * td, const vbi3_network * nk, unsigned int * n_elements) { cache_network *cn; vbi3_top_title *tt; assert (NULL != td); assert (NULL != n_elements); *n_elements = 0; if (nk) { if (!(cn = _vbi3_cache_get_network (td->cache, nk))) return FALSE; } else { /* Current network. */ cn = td->network; } tt = cache_network_get_top_titles (cn, n_elements); if (nk) cache_network_unref (cn); return tt; } /** * DOCUMENT ME */ vbi3_bool vbi3_teletext_decoder_get_ttx_page_stat (vbi3_teletext_decoder * td, vbi3_ttx_page_stat * ps, const vbi3_network * nk, vbi3_pgno pgno) { cache_network *cn; assert (NULL != td); assert (NULL != ps); if (pgno < 0x100 || pgno > 0x8FF) return FALSE; if (nk) { if (!(cn = _vbi3_cache_get_network (td->cache, nk))) return FALSE; } else { /* Current network. */ cn = td->network; } cache_network_get_ttx_page_stat (cn, ps, pgno); if (nk) cache_network_unref (cn); return TRUE; } /** * DOCUMENT ME */ vbi3_page * vbi3_teletext_decoder_get_page_va_list (vbi3_teletext_decoder * td, const vbi3_network * nk, vbi3_pgno pgno, vbi3_subno subno, va_list format_options) { cache_network *cn; cache_page *cp; vbi3_subno subno_mask; vbi3_page *pg; assert (NULL != td); cn = NULL; cp = NULL; pg = NULL; /* Current network. */ cn = td->network; if (nk) { if (!(cn = _vbi3_cache_get_network (td->cache, nk))) goto failure; } subno_mask = -1; if (VBI3_ANY_SUBNO == subno) { subno = 0; subno_mask = 0; } if (!(cp = _vbi3_cache_get_page (td->cache, cn, pgno, subno, subno_mask))) goto failure; if (!(pg = vbi3_page_new ())) goto failure; if (!_vbi3_page_priv_from_cache_page_va_list (pg->priv, cp, format_options)) { vbi3_page_delete (pg); pg = NULL; } failure: cache_page_unref (cp); if (nk) cache_network_unref (cn); return pg; } /** * DOCUMENT ME */ vbi3_page * vbi3_teletext_decoder_get_page (vbi3_teletext_decoder * td, const vbi3_network * nk, vbi3_pgno pgno, vbi3_subno subno, ...) { vbi3_page *pg; va_list format_options; va_start (format_options, subno); pg = vbi3_teletext_decoder_get_page_va_list (td, nk, pgno, subno, format_options); va_end (format_options); return pg; } /** * @param td Teletext decoder allocated with vbi3_teletext_decoder_new(). * @param pid Program ID will be stored here. * @param channel Logical channel transmitting the ID, @c * VBI3_PID_CHANNEL_LCI_0 ... @c VBI3_PID_CHANNEL_LCI_3. * * Returns the most recently on a logical channel received program ID. */ void vbi3_teletext_decoder_get_program_id (vbi3_teletext_decoder * td, vbi3_program_id * pid, vbi3_pid_channel channel) { #ifdef ZAPPING8 td = td; pid = pid; channel = channel; assert (0); #else assert (NULL != td); assert (NULL != pid); assert ((unsigned int) channel <= VBI3_PID_CHANNEL_LCI_3); *pid = td->network->program_id[channel]; #endif } /** * @internal * @param td Teletext decoder allocated with vbi3_teletext_decoder_new(). * * To be called after frame dropping, when Teletext packets might have * been lost. After a channel change call vbi3_teletext_decoder_reset() * instead. */ void _vbi3_teletext_decoder_resync (vbi3_teletext_decoder * td) { unsigned int i; /* Discard all in progress pages. */ for (i = 0; i < N_ELEMENTS (td->buffer); ++i) td->buffer[i].function = PAGE_FUNCTION_DISCARD; td->current = NULL; #if 0 /* TODO */ vbi3_pfc_demux_reset (&td->epg_stream[0]); vbi3_pfc_demux_reset (&td->epg_stream[1]); #endif } /** @internal */ void cache_network_dump_teletext (const cache_network * cn, FILE * fp) { unsigned int i; vbi3_pgno pgno; pagenum_dump (&cn->initial_page, fp); for (i = 0; i < N_ELEMENTS (cn->btt_link); ++i) { fprintf (fp, "\nbtt_link[%u]=", i); pagenum_dump (cn->btt_link + i, fp); } fputs ("\nstatus=\"", fp); for (i = 0; i < N_ELEMENTS (cn->status); ++i) fputc (vbi3_printable (cn->status[i]), fp); fputs ("\"\npage_stat=\n", fp); for (pgno = 0x100; pgno < 0x8FF; pgno += 8) { vbi3_pgno unit; for (unit = 0; unit < 8; ++unit) { const page_stat *ps; ps = cache_network_const_page_stat (cn, pgno + unit); fprintf (fp, "%02x:%02x:%04x:%2u/%2u:%02x-%02x ", ps->page_type, ps->charset_code, ps->subcode, ps->n_subpages, ps->max_subpages, ps->subno_min, ps->subno_max); } fputc ('\n', fp); } fputc ('\n', fp); } static void extension_init (extension * ext) { unsigned int i; CLEAR (*ext); ext->def_screen_color = VBI3_BLACK; /* A.5 */ ext->def_row_color = VBI3_BLACK; /* A.5 */ for (i = 0; i < 8; ++i) ext->drcs_clut[2 + i] = i & 3; for (i = 0; i < 32; ++i) ext->drcs_clut[2 + 8 + i] = i & 15; memcpy (ext->color_map, default_color_map, sizeof (ext->color_map)); } static void magazine_init (magazine * mag) { extension_init (&mag->extension); /* Valid range 0 ... 7. */ memset (mag->pop_lut, -1, sizeof (mag->pop_lut)); memset (mag->drcs_lut, -1, sizeof (mag->pop_lut)); /* NO_PAGE (pgno): (pgno & 0xFF) == 0xFF. */ memset (mag->pop_link, -1, sizeof (mag->pop_link)); memset (mag->drcs_link, -1, sizeof (mag->drcs_link)); } /** * @internal * * Provides default magazine parameters to be used at Level 1 and 1.5. * Remember editors can redefine cache_network_magazine() at Level 2.5 * and 3.5. */ const magazine * _vbi3_teletext_decoder_default_magazine (void) { static magazine default_magazine; if (!NO_PAGE (default_magazine.pop_link[0][0].pgno)) magazine_init (&default_magazine); return &default_magazine; } static void page_stat_init (page_stat * ps) { CLEAR (*ps); ps->page_type = VBI3_UNKNOWN_PAGE; ps->charset_code = 0xFF; ps->subcode = SUBCODE_UNKNOWN; } /** @internal */ void cache_network_destroy_teletext (cache_network * cn) { /* Nothing. */ cn = cn; } /** * @internal * @param cn cache_network structure to be initialized. * * Initializes the Teletext fields of a cache_network structure. */ void cache_network_init_teletext (cache_network * cn) { unsigned int i; /* D.3: In absence of packet 8/30/0 ... 4 assume page 100. */ cn->initial_page.function = PAGE_FUNCTION_LOP; cn->initial_page.pgno = 0x100; cn->initial_page.subno = VBI3_ANY_SUBNO; for (i = 0; i < N_ELEMENTS (cn->_magazines); ++i) magazine_init (&cn->_magazines[i]); for (i = 0; i < N_ELEMENTS (cn->_pages); ++i) page_stat_init (&cn->_pages[i]); /* NO_PAGE (pgno): (pgno & 0xFF) == 0xFF. */ memset (cn->btt_link, -1, sizeof (cn->btt_link)); CLEAR (cn->status); cn->have_top = FALSE; } /** * @internal * @param td Teletext decoder allocated with vbi3_teletext_decoder_new(). * @param cn New network, can be @c NULL if 0.0 != time. * @param time Deferred reset when time is greater than * vbi3_teletext_decoder_feed() timestamp. Pass a negative number to * cancel a deferred reset, 0.0 to reset immediately. * * Internal reset function, called via td->virtual_reset(). */ static void internal_reset (vbi3_teletext_decoder * td, cache_network * cn, double time) { assert (NULL != td); if (0) fprintf (stderr, "teletext reset %f: %f -> %f\n", td->timestamp, td->reset_time, time); if (time <= 0.0 /* reset now or cancel deferred reset */ || time > td->reset_time) td->reset_time = time; if (0.0 != time) { /* Don't reset now. */ return; } assert (NULL != cn); cache_network_unref (td->network); td->network = cache_network_ref (cn); #if 0 /* TODO */ td->epg_stream[0].block.pgno = 0; td->epg_stream[1].block.pgno = 0; #endif td->header_page.pgno = 0; CLEAR (td->header); _vbi3_teletext_decoder_resync (td); if (internal_reset == td->virtual_reset) { vbi3_event e; e.type = VBI3_EVENT_RESET; e.network = &td->network->network; e.timestamp = td->timestamp; _vbi3_event_handler_list_send (&td->handlers, &e); } } /** * @param td Teletext decoder allocated with vbi3_teletext_decoder_new(). * @param callback Function to be called on events. * @param user_data User pointer passed through to the @a callback function. * * Removes an event handler from the Teletext decoder, if a handler with * this @a callback and @a user_data has been registered. You can * safely call this function from a handler removing itself or another * handler. */ void vbi3_teletext_decoder_remove_event_handler (vbi3_teletext_decoder * td, vbi3_event_cb * callback, void * user_data) { vbi3_cache_remove_event_handler (td->cache, callback, user_data); _vbi3_event_handler_list_remove_by_callback (&td->handlers, callback, user_data); } /** * @param td Teletext decoder allocated with vbi3_teletext_decoder_new(). * @param event_mask Set of events (@c VBI3_EVENT_) the handler is waiting * for, can be -1 for all and 0 for none. * @param callback Function to be called on events by * vbi3_teletext_decoder_feed() and other vbi3_teletext functions as noted. * @param user_data User pointer passed through to the @a callback function. * * Adds a new event handler to the Teletext decoder. When the @a callback * with @a user_data is already registered the function merely changes the * set of events it will receive in the future. When the @a event_mask is * empty the function does nothing or removes an already registered event * handler. You can safely call this function from an event handler. * * Any number of handlers can be added, also different handlers for the * same event which will be called in registration order. * * @returns * @c FALSE of failure (out of memory). */ vbi3_bool vbi3_teletext_decoder_add_event_handler (vbi3_teletext_decoder * td, vbi3_event_mask event_mask, vbi3_event_cb * callback, void * user_data) { vbi3_event_mask ttx_mask; vbi3_event_mask add_mask; vbi3_event_mask rem_mask; if (!vbi3_cache_add_event_handler (td->cache, event_mask, callback, user_data)) return FALSE; ttx_mask = event_mask & (VBI3_EVENT_CLOSE | VBI3_EVENT_RESET | VBI3_EVENT_TTX_PAGE | VBI3_EVENT_NETWORK | VBI3_EVENT_TRIGGER | VBI3_EVENT_PROG_INFO | VBI3_EVENT_PAGE_TYPE | VBI3_EVENT_TOP_CHANGE | VBI3_EVENT_LOCAL_TIME | VBI3_EVENT_PROG_ID); add_mask = ttx_mask & ~td->handlers.event_mask; rem_mask = td->handlers.event_mask & ~event_mask; if (rem_mask & VBI3_EVENT_TRIGGER) { #ifndef ZAPPING8 /* Don't fire old triggers. */ _vbi3_trigger_list_delete (&td->triggers); #endif } if (0 == ttx_mask) { return TRUE; } if (NULL != _vbi3_event_handler_list_add (&td->handlers, ttx_mask, callback, user_data)) { if (add_mask & (VBI3_EVENT_TTX_PAGE | VBI3_EVENT_TRIGGER)) { /* XXX is this really necessary? */ _vbi3_teletext_decoder_resync (td); } return TRUE; } else { vbi3_cache_remove_event_handler (td->cache, callback, user_data); } return FALSE; } /** * DOCUMENT ME */ vbi3_bool vbi3_teletext_decoder_get_network (vbi3_teletext_decoder *td, vbi3_network * nk) { assert (NULL != td); assert (NULL != nk); if (!td->network) return FALSE; return vbi3_network_copy (nk, &td->network->network); } /** * DOCUMENT ME */ vbi3_cache * vbi3_teletext_decoder_get_cache (vbi3_teletext_decoder *td) { assert (NULL != td); if (!td->cache) return NULL; return vbi3_cache_ref (td->cache); } /** * @param td Teletext decoder allocated with vbi3_teletext_decoder_new(). * @param nk Identifies the new network, can be @c NULL. * * Resets the Teletext decoder, useful for example after a channel change. * This function sends a @c VBI3_EVENT_RESET. * * You can pass a vbi3_network structure to identify the new network in * advance, before the decoder receives a network ID, if ever. */ void vbi3_teletext_decoder_reset (vbi3_teletext_decoder * td, const vbi3_network * nk, vbi3_videostd_set videostd_set) { cache_network *cn; assert (NULL != td); td->videostd_set = videostd_set; cn = _vbi3_cache_add_network (td->cache, nk, videostd_set); td->virtual_reset (td, cn, 0.0 /* now */); cache_network_unref (cn); } /** * @internal * @param td Teletext decoder to be destroyed. * * Frees all resources associated with @a td, except the structure itself. * This function sends a @c VBI3_EVENT_CLOSE. */ void _vbi3_teletext_decoder_destroy (vbi3_teletext_decoder * td) { vbi3_event e; assert (NULL != td); e.type = VBI3_EVENT_CLOSE; e.network = &td->network->network; e.timestamp = td->timestamp; _vbi3_event_handler_list_send (&td->handlers, &e); _vbi3_event_handler_list_destroy (&td->handlers); #ifndef ZAPPING8 _vbi3_trigger_list_delete (&td->triggers); #endif cache_network_unref (td->network); /* Delete if we hold the last reference. */ vbi3_cache_unref (td->cache); CLEAR (*td); } /** * @internal * @param td Teletext decoder to be initialized. * @param ca Cache to be used by this Teletext decoder, can be @c NULL. * To allocate a cache call vbi3_cache_new(). Caches have a reference * counter, you can vbi3_cache_unref() after calling this function. * @param nk Initial network (see vbi3_teletext_decoder_reset()), * can be @c NULL. * * Initializes a Teletext decoder structure. * * @returns * @c FALSE on failure (out of memory). */ vbi3_bool _vbi3_teletext_decoder_init (vbi3_teletext_decoder * td, vbi3_cache * ca, const vbi3_network * nk, vbi3_videostd_set videostd_set) { cache_network *cn; assert (NULL != td); CLEAR (*td); if (ca) td->cache = vbi3_cache_ref (ca); else td->cache = vbi3_cache_new (); if (!td->cache) return FALSE; td->virtual_reset = internal_reset; td->cni_830_timeout = 2.5; /* sec */ td->cni_vps_timeout = 5 / 25.0; /* sec */ _vbi3_event_handler_list_init (&td->handlers); td->videostd_set = videostd_set; cn = _vbi3_cache_add_network (td->cache, nk, videostd_set); internal_reset (td, cn, 0.0 /* now */); cache_network_unref (cn); return TRUE; } static void internal_delete (vbi3_teletext_decoder * td) { assert (NULL != td); _vbi3_teletext_decoder_destroy (td); vbi3_free (td); } /** * @param td Teletext decoder allocated with vbi3_teletext_decoder_new(), * can be @c NULL. * * Frees all resources associated with @a td. * This function sends a @c VBI3_EVENT_CLOSE. */ void vbi3_teletext_decoder_delete (vbi3_teletext_decoder * td) { if (NULL == td) return; assert (NULL != td->virtual_delete); td->virtual_delete (td); } /** * @param ca Cache to be used by this Teletext decoder. If @a ca is @c NULL * the function allocates a new cache. To allocate a cache yourself call * vbi3_cache_new(). Caches have a reference counter, you can * vbi3_cache_unref() after calling this function. * * Allocates a new Teletext (ETS 300 706) decoder. Decoded data is * available through the following functions: * - vbi3_teletext_decoder_get_page() * - vbi3_teletext_decoder_get_program_id() * * To be notified when new data is available call * vbi3_teletext_decoder_add_event_handler(). * * @returns * Pointer to newly allocated Teletext decoder which must be * freed with vbi3_teletext_decoder_delete() when done. * @c NULL on failure (out of memory). */ vbi3_teletext_decoder * vbi3_teletext_decoder_new (vbi3_cache * ca, const vbi3_network * nk, vbi3_videostd_set videostd_set) { vbi3_teletext_decoder *td; if (!(td = vbi3_malloc (sizeof (*td)))) { error ("Out of memory (%u bytes)", sizeof (*td)); return NULL; } if (!_vbi3_teletext_decoder_init (td, ca, nk, videostd_set)) { vbi3_free (td); td = NULL; } td->virtual_delete = internal_delete; return td; } zapping-0.10cvs6/libvbi/teletext_decoder.h 644 764 144 11104 10305456044 13766 /* * libzvbi - Teletext decoder * * Copyright (C) 2000, 2001, 2002, 2003, 2004 Michael H. Schimek * * Based on code from AleVT 1.5.1 * Copyright (C) 1998, 1999 Edgar Toernig * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* $Id: teletext_decoder.h,v 1.5 2005/09/01 01:40:52 mschimek Exp $ */ #ifndef __ZVBI3_TELETEXT_DECODER_H__ #define __ZVBI3_TELETEXT_DECODER_H__ #include /* uint8_t */ #include "macros.h" #include "pdc.h" /* vbi3_program_id, vbi3_pid_channel */ #include "network.h" /* vbi3_network */ #include "cache.h" /* vbi3_cache */ #include "event.h" /* vbi3_event_cb */ #include "sampling_par.h" /* vbi3_videostd_set */ #include "search.h" /* vbi3_search */ VBI3_BEGIN_DECLS /** * @addtogroup Teletext * @{ */ /** * @brief Teletext decoder. * * The contents of this structure are private. * Call vbi3_teletext_decoder_new() to allocate a Teletext decoder. */ typedef struct _vbi3_teletext_decoder vbi3_teletext_decoder; extern vbi3_search * vbi3_teletext_decoder_search_utf8_new (vbi3_teletext_decoder *td, const vbi3_network * nk, vbi3_pgno pgno, vbi3_subno subno, const char * pattern, vbi3_bool casefold, vbi3_bool regexp, vbi3_search_progress_cb *progress, void * user_data) __attribute__ ((malloc, _vbi3_nonnull (1, 5))); extern vbi3_bool vbi3_teletext_decoder_get_top_title (vbi3_teletext_decoder * td, vbi3_top_title * tt, const vbi3_network * nk, vbi3_pgno pgno, vbi3_subno subno) __attribute__ ((_vbi3_nonnull (1, 2))); extern vbi3_top_title * vbi3_teletext_decoder_get_top_titles (vbi3_teletext_decoder * td, const vbi3_network * nk, unsigned int * n_elements) __attribute__ ((malloc, _vbi3_nonnull (1, 3))); extern vbi3_bool vbi3_teletext_decoder_get_ttx_page_stat (vbi3_teletext_decoder * td, vbi3_ttx_page_stat * ps, const vbi3_network * nk, vbi3_pgno pgno) __attribute__ ((_vbi3_nonnull (1, 2))); extern void vbi3_teletext_decoder_get_program_id (vbi3_teletext_decoder * td, vbi3_program_id * pid, vbi3_pid_channel channel) __attribute__ ((_vbi3_nonnull (1, 2))); extern vbi3_page * vbi3_teletext_decoder_get_page_va_list (vbi3_teletext_decoder * td, const vbi3_network * nk, vbi3_pgno pgno, vbi3_subno subno, va_list format_options) __attribute__ ((malloc, _vbi3_nonnull (1))); extern vbi3_page * vbi3_teletext_decoder_get_page (vbi3_teletext_decoder * td, const vbi3_network * nk, vbi3_pgno pgno, vbi3_subno subno, ...) __attribute__ ((malloc, _vbi3_nonnull (1), _vbi3_sentinel)); extern vbi3_bool vbi3_teletext_decoder_get_network (vbi3_teletext_decoder *td, vbi3_network * nk) __attribute__ ((_vbi3_nonnull (1, 2))); extern vbi3_cache * vbi3_teletext_decoder_get_cache (vbi3_teletext_decoder * td) __attribute__ ((_vbi3_nonnull (1))); extern void vbi3_teletext_decoder_remove_event_handler (vbi3_teletext_decoder * td, vbi3_event_cb * callback, void * user_data) __attribute__ ((_vbi3_nonnull (1))); extern vbi3_bool vbi3_teletext_decoder_add_event_handler (vbi3_teletext_decoder * td, vbi3_event_mask event_mask, vbi3_event_cb * callback, void * user_data) __attribute__ ((_vbi3_nonnull (1))); extern void vbi3_teletext_decoder_reset (vbi3_teletext_decoder * td, const vbi3_network * nk, vbi3_videostd_set videostd_set) __attribute__ ((_vbi3_nonnull (1))); extern vbi3_bool vbi3_teletext_decoder_feed (vbi3_teletext_decoder * td, const uint8_t buffer[42], double timestamp) __attribute__ ((_vbi3_nonnull (1, 2))); extern void vbi3_teletext_decoder_delete (vbi3_teletext_decoder * td); extern vbi3_teletext_decoder * vbi3_teletext_decoder_new (vbi3_cache * ca, const vbi3_network * nk, vbi3_videostd_set videostd_set) __attribute__ ((malloc)); /** @} */ VBI3_END_DECLS #endif /* __ZVBI3_TELETEXT_DECODER_H__ */ zapping-0.10cvs6/libvbi/caption_decoder.c 644 764 144 142214 10427064055 13611 /* * libzvbi - Closed Caption decoder * * Copyright (C) 2000-2005 Michael H. Schimek * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* $Id: caption_decoder.c,v 1.2 2006/05/06 09:11:09 mschimek Exp $ */ #include #include #include #include #include "hamm.h" #include "page-priv.h" #include "caption_decoder-priv.h" #define XDS_EVENTS 0 /* TODO */ #define CAPTION_EVENTS (VBI3_EVENT_CC_PAGE | \ VBI3_EVENT_CC_RAW | \ VBI3_EVENT_PAGE_TYPE) /* Resources: Code of Federal Regulations, Title 47 Telecommunication, Section 15.119 "Closed caption decoder requirements for analog television receivers". EIA 608-B "Recommended Practice for Line 21 Data Service" http://global.ihs.com for those with money to burn. Video Demystified http://www.video-demystified.com Related documents: 47 CFR Section 15.120 "Program blocking technology requirements for television receivers". "Analog television receivers will receive program ratings transmitted pursuant to industry standard EIA-744 "Transport of Content Advisory Information Using Extended Data Service (XDS)" and EIA-608 "Recommended Practice for Line 21 Data Service". This incorporation by reference was approved by the Director of the Federal Register in accordance with 5 U.S.C. 522(a) and 1 CFR Part 51. [...] Copies of EIA-744 and EIA-608 may be obtained from: Global Engineering Documents, 15 Inverness Way East, Englewood, CO 80112-5704. Copies of EIA-744 may be inspected during normal business hours at the following locations: Federal Communications Commission, 2000 M Street, NW, Technical Information Center (Suite 230), Washington, DC, or the Office of the Federal Register, 800 North Capitol Street, NW, Suite 700, Washington, DC." 47 CFR Section 15.122 "Closed caption decoder requirements for digital television receivers and converter boxes". "Digital television receivers and tuners must be capable of decoding closed captioning information that is delivered pursuant to the industry standard EIA-708-B, "Digital Television (DTV) Closed Captioning," Electronics Industries Association (1999). This incorporation by reference was approved by the Director of the Federal Register in accordance with 5 U.S.C. 552(a) and 1 CFR part 51. Digital television manufacturers may wish to view EIA-708-B in its entirety. Copies of EIA-708-B may be obtained from: Global Engineering Documents, 15 Inverness Way East, Englewood, CO 80112-5704, http://www.global.ihs.com/. Copies of EIA-708-B may be inspected during regular business hours at the following locations: Federal Communications Commission, 445 12th Street, S.W., Washington, D.C. 20554, or the Office of the Federal Register, 800 N. Capitol Street, N.W., Washington, D.C." */ /* Closed Caption decoder ****************************************************/ #define ALL_DIRTY ((1 << MAX_ROWS) - 1) #define WORD_UPDATE (VBI3_CHAR_UPDATE | VBI3_WORD_UPDATE) #define ROW_UPDATE (WORD_UPDATE | VBI3_ROW_UPDATE) #define PAGE_UPDATE (ROW_UPDATE | VBI3_PAGE_UPDATE) static const vbi3_char transparent_space [2] = { { /* Caption channels. */ .attr = 0, .size = VBI3_NORMAL_SIZE, .opacity = VBI3_TRANSPARENT_SPACE, .foreground = VBI3_WHITE, .background = VBI3_BLACK, .drcs_clut_offs = 0, .unicode = 0x0020 }, { /* Text channels. */ .attr = 0, .size = VBI3_NORMAL_SIZE, .opacity = VBI3_OPAQUE, .foreground = VBI3_WHITE, .background = VBI3_BLACK, .drcs_clut_offs = 0, .unicode = 0x0020 } }; #define TRANSPARENT_SPACE(cd, ch) \ transparent_space[((ch) \ >= &(cd)->cc.channel[VBI3_CAPTION_T1 - VBI3_CAPTION_CC1])] static const vbi3_color color_mapping [8] = { VBI3_WHITE, VBI3_GREEN, VBI3_BLUE, VBI3_CYAN, VBI3_RED, VBI3_YELLOW, VBI3_MAGENTA, VBI3_BLACK }; #define IS_OPAQUE(c) \ (VBI3_TRANSPARENT_SPACE != (c).opacity && 0x0020 != (c).unicode) /** */ void vbi3_cc_channel_stat_destroy (vbi3_cc_channel_stat * cs) { assert (NULL != cs); CLEAR (*cs); } /** */ void vbi3_cc_channel_stat_init (vbi3_cc_channel_stat * cs) { assert (NULL != cs); CLEAR (*cs); cs->page_type = VBI3_UNKNOWN_PAGE; cs->last_received = 0.0; } vbi3_bool vbi3_caption_decoder_get_cc_channel_stat (vbi3_caption_decoder * cd, vbi3_cc_channel_stat * cs, vbi3_pgno channel) { caption_channel *ch; assert (NULL != cd); assert (NULL != cs); if (channel < VBI3_CAPTION_CC1 || channel > VBI3_CAPTION_T4) return FALSE; ch = &cd->cc.channel[channel - VBI3_CAPTION_CC1]; CLEAR (*cs); cs->channel = channel; cs->page_type = (channel >= VBI3_CAPTION_T1) ? VBI3_NORMAL_PAGE : VBI3_SUBTITLE_PAGE; cs->caption_mode = ch->mode; /* TODO language code */ cs->last_received = ch->last_timestamp; return TRUE; } /* Add solid spaces for legibility, according to Sec. 15.119 (d)(1), (f)(1)(vii), (f)(1)(viii), (f)(2)(iii), (f)(3)(ii). */ static __inline__ void copy_with_padding (vbi3_char * dcp, const vbi3_char * scp, vbi3_char ts, unsigned int dirty) { unsigned int rowct; for (rowct = MAX_ROWS; rowct > 0; --rowct) { if (unlikely (dirty & 1)) { unsigned int colct; dcp[0] = ts; dcp[1] = scp[0]; dcp[2] = scp[1]; if (IS_OPAQUE (scp[0])) { dcp[0].opacity = VBI3_OPAQUE; dcp[0].background = scp[0].background; if (VBI3_OPAQUE != scp[1].opacity) dcp[2].opacity = VBI3_OPAQUE; } for (colct = MAX_COLUMNS - 2; colct > 0; --colct) { dcp[3] = scp[2]; if (IS_OPAQUE (scp[1])) { if (VBI3_OPAQUE != scp[0].opacity) { dcp[1].opacity = VBI3_OPAQUE; } if (VBI3_OPAQUE != scp[2].opacity) { dcp[3].opacity = VBI3_OPAQUE; dcp[3].background = scp[1].background; } } ++scp; ++dcp; } dcp[3] = ts; if (IS_OPAQUE (scp[1])) { if (VBI3_OPAQUE != scp[0].opacity) dcp[1].opacity = VBI3_OPAQUE; dcp[3].opacity = VBI3_OPAQUE; dcp[3].background = scp[1].background; } scp += 2; dcp += 4; } else { vbi3_char *end; end = dcp + MAX_COLUMNS + 2; while (dcp < end) *dcp++ = ts; scp += MAX_COLUMNS; } dirty >>= 1; } } /** * DOCUMENT ME */ vbi3_page * vbi3_caption_decoder_get_page_va_list (vbi3_caption_decoder * cd, vbi3_pgno channel, va_list format_options) { /* This map corresponds to enum vbi3_color names, NOT closed caption colors. We could do without color_mapping[] but it's better to use the same color indices everywhere. */ static const vbi3_rgba default_color_map [8] = { VBI3_RGBA (0x00, 0x00, 0x00), VBI3_RGBA (0xFF, 0x00, 0x00), VBI3_RGBA (0x00, 0xFF, 0x00), VBI3_RGBA (0xFF, 0xFF, 0x00), VBI3_RGBA (0x00, 0x00, 0xFF), VBI3_RGBA (0xFF, 0x00, 0xFF), VBI3_RGBA (0x00, 0xFF, 0xFF), VBI3_RGBA (0xFF, 0xFF, 0xFF) }; vbi3_color option_foreground; vbi3_color option_background; vbi3_bool option_row_change; vbi3_page *pg; vbi3_page_priv *pgp; const vbi3_character_set *cs; caption_channel *ch; unsigned int n; vbi3_char ts; assert (NULL != cd); if (channel < VBI3_CAPTION_CC1 || channel > VBI3_CAPTION_T4) return NULL; ch = &cd->cc.channel[channel - VBI3_CAPTION_CC1]; /* This clears pgp and initializes pg->priv and pg->ref_count. */ if (!(pg = vbi3_page_new ())) return NULL; pgp = pg->priv; pgp->cn = cache_network_ref (cd->network); pgp->pg.cache = cd->cache; pgp->pg.network = &cd->network->network; pgp->pg.pgno = channel; pgp->pg.rows = MAX_ROWS; pgp->pg.columns = MAX_COLUMNS; assert (N_ELEMENTS (pgp->pg.text) >= MAX_ROWS * (MAX_COLUMNS + 2)); /* Must be initialized for export. */ cs = vbi3_character_set_from_code (0); pgp->char_set[0] = cs; pgp->char_set[1] = cs; option_foreground = -1; option_background = -1; option_row_change = FALSE; for (;;) { vbi3_format_option option; option = va_arg (format_options, vbi3_format_option); switch (option) { case VBI3_PADDING: /* Turns the text [foo] [bar baz] into [ foo ] [ bar baz ] */ pgp->pg.columns = va_arg (format_options, vbi3_bool) ? MAX_COLUMNS + 2 : MAX_COLUMNS; break; case VBI3_ROW_CHANGE: option_row_change = va_arg (format_options, vbi3_bool); break; case VBI3_DEFAULT_FOREGROUND: pgp->pg.color_map[8] = va_arg (format_options, vbi3_rgba); if (VBI3_RGBA (0xFF, 0xFF, 0xFF) & (default_color_map[VBI3_WHITE] ^ pgp->pg.color_map[8])) option_foreground = VBI3_WHITE; break; case VBI3_DEFAULT_BACKGROUND: pgp->pg.color_map[9] = va_arg (format_options, vbi3_rgba); if (VBI3_RGBA (0xFF, 0xFF, 0xFF) & (default_color_map[VBI3_BLACK] ^ pgp->pg.color_map[9])) option_background = VBI3_BLACK; break; default: option = 0; break; } if (0 == option) break; } ts = TRANSPARENT_SPACE (cd, ch); if (option_background == ts.background) ts.background = 9; n = ch->displayed_buffer; if (option_row_change && VBI3_CAPTION_MODE_POP_ON != ch->mode) n = 2; if (ch->dirty[n] <= 0) { vbi3_char *cp; vbi3_char *end; cp = pgp->pg.text; end = pgp->pg.text + pgp->pg.rows * pgp->pg.columns; while (cp < end) *cp++ = ts; } else { if (pgp->pg.columns > MAX_COLUMNS) { copy_with_padding (pgp->pg.text, ch->buffer[n][FIRST_ROW], ts, ch->dirty[n]); } else { assert (sizeof (pgp->pg.text) >= sizeof (ch->buffer[0])); memcpy (pgp->pg.text, ch->buffer[n][FIRST_ROW], sizeof (ch->buffer[0])); } if ((int) option_foreground >= 0 || (int) option_background >= 0) { vbi3_char *cp; vbi3_char *end; cp = pgp->pg.text; end = pgp->pg.text + pgp->pg.rows * pgp->pg.columns; while (cp < end) { if (option_foreground == cp->foreground) cp->foreground = 8; if (option_background == cp->background) cp->background = 9; ++cp; } } } pgp->pg.screen_color = ts.background; pgp->pg.screen_opacity = ts.opacity; assert (sizeof (pgp->pg.color_map) >= sizeof (default_color_map)); memcpy (pgp->pg.color_map, default_color_map, sizeof (default_color_map)); return pg; } /** * DOCUMENT ME */ vbi3_page * vbi3_caption_decoder_get_page (vbi3_caption_decoder * cd, vbi3_pgno channel, ...) { vbi3_page *pg; va_list format_options; va_start (format_options, channel); pg = vbi3_caption_decoder_get_page_va_list (cd, channel, format_options); va_end (format_options); return pg; } static void send_event (vbi3_caption_decoder * cd, caption_channel * ch, unsigned int event_type, vbi3_cc_page_flags flags) { vbi3_event e; e.type = event_type; e.network = &cd->network->network; e.timestamp = cd->timestamp; e.ev.caption.channel = (ch - cd->cc.channel) + VBI3_CAPTION_CC1; e.ev.caption.flags = flags; _vbi3_event_handler_list_send (&cd->handlers, &e); cd->cc.event_pending = NULL; } static void row_change_snapshot (caption_channel * ch) { unsigned int n; /* Copy displayed buffer to row-change-snapshot buffer (when a row is complete) for VBI3_ROW_CHANGE formatting option. */ n = ch->displayed_buffer; if (ch->dirty[n] > 0) memcpy (ch->buffer[2], ch->buffer[n], sizeof (ch->buffer[2])); ch->dirty[2] = ch->dirty[n]; } static void send_raw_event (vbi3_caption_decoder * cd, caption_channel * ch, unsigned int first_row, unsigned int last_row) { vbi3_char buffer[MAX_COLUMNS + 1]; vbi3_event e; unsigned int row; e.type = VBI3_EVENT_CC_RAW; e.network = &cd->network->network; e.timestamp = cd->timestamp; e.ev.cc_raw.channel = (ch - cd->cc.channel) + VBI3_CAPTION_CC1; e.ev.cc_raw.text = buffer; e.ev.cc_raw.length = MAX_COLUMNS; CLEAR (buffer[MAX_COLUMNS]); for (row = first_row; row <= last_row; ++row) { const vbi3_char *text; unsigned int column; text = ch->buffer[ch->displayed_buffer][row]; for (column = FIRST_COLUMN; column <= LAST_COLUMN; ++column) if (VBI3_TRANSPARENT_SPACE != text[column].opacity) break; if (column > LAST_COLUMN) continue; memcpy (buffer, text, MAX_COLUMNS * sizeof (*text)); e.ev.cc_raw.row = row; _vbi3_event_handler_list_send (&cd->handlers, &e); } } /* NOTE ch is invalid if CHANNEL_UNKNOWN == cd->cc.curr_ch_num. */ static caption_channel * switch_channel (vbi3_caption_decoder * cd, caption_channel * ch, vbi3_pgno new_ch_num) { if (CHANNEL_UNKNOWN != cd->cc.curr_ch_num && VBI3_CAPTION_MODE_UNKNOWN != ch->mode) { /* Force a display update if we do not send events on every display change. */ } cd->cc.curr_ch_num = new_ch_num; return &cd->cc.channel[new_ch_num - VBI3_CAPTION_CC1]; } static void reset_curr_attr (vbi3_caption_decoder * cd, caption_channel * ch) { ch->curr_attr = TRANSPARENT_SPACE (cd, ch); ch->curr_attr.opacity = VBI3_OPAQUE; } static void set_cursor (caption_channel * ch, unsigned int column, unsigned int row) { ch->curr_row = row; ch->curr_column = column; } static void erase_memory (vbi3_caption_decoder * cd, caption_channel * ch, unsigned int n) { vbi3_char ts; unsigned int i; ts = TRANSPARENT_SPACE (cd, ch); for (i = 0; i < MAX_ROWS * MAX_COLUMNS; ++i) ch->buffer[n][0][i] = ts; ch->dirty[n] = 0; } static void put_char (vbi3_caption_decoder * cd, caption_channel * ch, unsigned int unicode) { unsigned int n; unsigned int row; unsigned int column; n = ch->displayed_buffer ^ (VBI3_CAPTION_MODE_POP_ON == ch->mode); /* Execute lazy erase. */ if (ch->dirty[n] < 0) erase_memory (cd, ch, n); /* Sec. 15.119 (f)(1)(v), (1)(vi), (2)(ii), (3)(i). */ row = ch->curr_row; column = ch->curr_column; if (column < LAST_COLUMN) ch->curr_column = column + 1; ch->curr_attr.unicode = unicode; ch->buffer[n][row][column] = ch->curr_attr; assert (sizeof (ch->dirty[0]) * 8 - 1 >= MAX_ROWS); ch->dirty[n] |= 1 << row; /* Send a display update event when the displayed buffer of the current channel changed, but no more than once for each pair of Closed Caption bytes. */ if (VBI3_CAPTION_MODE_POP_ON != ch->mode) { cd->cc.event_pending = ch; } } static void put_transparent_space (vbi3_caption_decoder * cd, caption_channel * ch) { unsigned int n; unsigned int row; unsigned int column; /* Sec. 15.119 (f)(1)(v), (1)(vi), (2)(ii), (3)(i). */ row = ch->curr_row; column = ch->curr_column; if (column < LAST_COLUMN) ch->curr_column = column + 1; n = ch->displayed_buffer ^ (VBI3_CAPTION_MODE_POP_ON == ch->mode); /* No event if the buffer will be erased to TRANSPARENT_SPACEs (dirty < 0) or the row still contains only TRANSPARENT_SPACEs. */ if (ch->dirty[n] > 0 && (ch->dirty[n] & (1 << row))) { ch->buffer[n][row][column] = TRANSPARENT_SPACE (cd, ch); if (VBI3_CAPTION_MODE_POP_ON != ch->mode) { cd->cc.event_pending = ch; } } } static void move_window (vbi3_caption_decoder * cd, caption_channel * ch, unsigned int new_base_row) { vbi3_char *text; vbi3_char ts; unsigned int old_max_rows; unsigned int new_max_rows; unsigned int copy_rows; unsigned int copy_chars; unsigned int erase_begin; unsigned int erase_end; unsigned int n; n = ch->displayed_buffer; /* No event if the buffer contains all TRANSPARENT_SPACEs. */ if (ch->dirty[n] <= 0) return; old_max_rows = ch->curr_row + 1 - FIRST_ROW; new_max_rows = new_base_row + 1 - FIRST_ROW; copy_rows = MIN (MIN (old_max_rows, new_max_rows), ch->window_rows); copy_chars = copy_rows * MAX_COLUMNS; text = ch->buffer[n][FIRST_ROW]; ts = TRANSPARENT_SPACE (cd, ch); if (new_base_row < ch->curr_row) { erase_begin = (new_base_row + 1) * MAX_COLUMNS; erase_end = (ch->curr_row + 1) * MAX_COLUMNS; memmove (text + erase_begin - copy_chars, text + erase_end - copy_chars, copy_chars * sizeof (*text)); ch->dirty[n] >>= ch->curr_row - new_base_row; } else { erase_begin = FIRST_ROW * MAX_COLUMNS; erase_end = (new_base_row + 1) * MAX_COLUMNS - copy_chars; memmove (text + erase_end, text + (ch->curr_row + 1) * MAX_COLUMNS - copy_chars, copy_chars * sizeof (*text)); ch->dirty[n] = (ch->dirty[n] << (new_base_row - ch->curr_row)) & ALL_DIRTY; } while (erase_begin < erase_end) { text[erase_begin++] = ts; } send_event (cd, ch, VBI3_EVENT_CC_PAGE, PAGE_UPDATE); } static void preamble_address_code (vbi3_caption_decoder * cd, caption_channel * ch, unsigned int c1, unsigned int c2) { static const int row_mapping [16] = { /* 0 */ 10, /* 0x1040 */ /* 1 */ -1, /* unassigned */ /* 2 */ 0, 1, 2, 3, /* 0x1140 ... 0x1260 */ /* 6 */ 11, 12, 13, 14, /* 0x1340 ... 0x1460 */ /* 10 */ 4, 5, 6, 7, 8, 9 /* 0x1540 ... 0x1760 */ }; int row; /* Preamble Address Codes 001 crrr 1ri xxxu */ row = row_mapping[(c1 & 7) * 2 + ((c2 >> 5) & 1)]; /* Sec. 15.119 (j): No function, reject. */ if (row < 0) return; if (c2 & 1) ch->curr_attr.attr |= VBI3_UNDERLINE; else ch->curr_attr.attr &= ~VBI3_UNDERLINE; ch->curr_attr.background = VBI3_BLACK; ch->curr_attr.opacity = VBI3_OPAQUE; if (VBI3_CAPTION_MODE_ROLL_UP == ch->mode) { /* Sec. 15.119 (f)(1)(ii). */ if (row != (int) ch->curr_row) { move_window (cd, ch, /* new_base_row */ row); } } /* Sec. 15.119 (d)(1)(i) */ set_cursor (ch, FIRST_COLUMN, row); if (c2 & 0x10) { /* Indent. */ /* Sec. 15.119 (d)(1)(i) */ ch->curr_column = FIRST_COLUMN + (c2 & 0x0E) * 2; } else { unsigned int color; color = (c2 >> 1) & 7; if (7 == color) { ch->curr_attr.attr |= VBI3_ITALIC; ch->curr_attr.foreground = VBI3_WHITE; } else { ch->curr_attr.attr &= ~VBI3_ITALIC; ch->curr_attr.foreground = color_mapping[color]; } } } static void mid_row_code (vbi3_caption_decoder * cd, caption_channel * ch, unsigned int c2) { unsigned int color; /* Mid-Row Codes 001 c001 010 xxxu */ if (c2 & 1) { /* Underline on. XXX correct to underline the space between underlined words? */ ch->curr_attr.attr &= ~VBI3_FLASH; } else { /* Sec. 15.119 (h)(1)(iii). */ ch->curr_attr.attr &= ~(VBI3_FLASH | VBI3_UNDERLINE); } /* Sec. 15.119 (h)(1)(i): Is a spacing attribute. */ put_char (cd, ch, 0x0020); color = (c2 >> 1) & 7; if (7 == color) { ch->curr_attr.attr |= VBI3_ITALIC; /* Sec. 15.119 (h)(1)(ii): No color change. */ } else { /* Sec. 15.119 (h)(1)(ii). */ ch->curr_attr.attr &= ~VBI3_ITALIC; ch->curr_attr.foreground = color_mapping[color]; } if (c2 & 1) ch->curr_attr.attr |= VBI3_UNDERLINE; } static void backspace (vbi3_caption_decoder * cd, caption_channel * ch) { vbi3_char ts; unsigned int n; unsigned int row; unsigned int column; /* Backspace 001 c10f 010 0001 */ /* Sec. 15.119 (f)(1)(vi). */ /* XXX how should we delete spacing attributes? A simple backspace or undo the attribute change (i.e. store spacing attributes in the buffer[] similar to raw Teletext pages)? */ column = ch->curr_column; if (column <= FIRST_COLUMN) return; row = ch->curr_row; ch->curr_column = --column; n = ch->displayed_buffer ^ (VBI3_CAPTION_MODE_POP_ON == ch->mode); /* No event if the buffer will be erased to TRANSPARENT_SPACEs (dirty < 0) or the row still contains only TRANSPARENT_SPACEs. */ if (ch->dirty[n] > 0 && (ch->dirty[n] & (1 << row))) { ts = TRANSPARENT_SPACE (cd, ch); /* Transparent space has no attributes but background color (when opaque, or when rendered opaque). */ ts.foreground = ch->curr_attr.foreground; ts.background = ch->curr_attr.background; ch->buffer[n][row][column] = ts; if (VBI3_CAPTION_MODE_POP_ON != ch->mode) { send_event (cd, ch, VBI3_EVENT_CC_PAGE, VBI3_CHAR_UPDATE); } } } static void delete_to_end_of_row (vbi3_caption_decoder * cd, caption_channel * ch) { unsigned int n; unsigned int row; /* Delete To End Of Row 001 c10f 010 0100 */ /* Sec. 15.119 (f)(1)(vii). */ n = ch->displayed_buffer ^ (VBI3_CAPTION_MODE_POP_ON == ch->mode); row = ch->curr_row; /* No event if the buffer will be erased to TRANSPARENT_SPACEs (dirty < 0) or the row still contains only TRANSPARENT_SPACEs. */ if (ch->dirty[n] > 0 && (ch->dirty[n] & (1 << row))) { vbi3_char ts; unsigned int column; ts = TRANSPARENT_SPACE (cd, ch); for (column = ch->curr_column; column <= LAST_COLUMN; ++column) { /* Transparent space with default colors for this row. */ ch->buffer[n][row][column] = ts; } if (VBI3_CAPTION_MODE_POP_ON != ch->mode) { /* No ROW_UPDATE because row is not complete yet. */ send_event (cd, ch, VBI3_EVENT_CC_PAGE, WORD_UPDATE); } } } static void resize_window (vbi3_caption_decoder * cd, caption_channel * ch, unsigned int n_rows) { vbi3_char *cp; vbi3_char *end; unsigned int n; n = ch->displayed_buffer; /* No event if the buffer contains all TRANSPARENT_SPACEs. */ if (ch->dirty[n] <= 0) return; /* Nothing to do unless the window shrinks. */ if (n_rows >= ch->window_rows) return; n_rows = MIN (ch->curr_row - FIRST_ROW + 1, n_rows); cp = ch->buffer[n][FIRST_ROW]; end = cp + (ch->curr_row + 1 - n_rows) * MAX_COLUMNS; if (cp < end) { vbi3_char ts; ts = TRANSPARENT_SPACE (cd, ch); while (cp < end) *cp++ = ts; send_event (cd, ch, VBI3_EVENT_CC_PAGE, PAGE_UPDATE); } } static void roll_up_captions (vbi3_caption_decoder * cd, caption_channel * ch, unsigned int c2) { unsigned int n_rows; /* Roll-Up Captions 001 c10f 010 01xx */ /* Sec. 15.119 (f)(1). */ n_rows = (c2 & 7) - 3; /* 2, 3, 4 */ if (VBI3_CAPTION_MODE_ROLL_UP == ch->mode) { /* Sec. 15.119 (f)(1)(iv). */ resize_window (cd, ch, n_rows); ch->window_rows = n_rows; /* XXX NBC (sample s4) sends resume-text and roll-up commands to switch between channels T2 and C1 *without* a PAC after roll-up to place the cursor back at the previous column. That makes sense to me but it contradicts Sec. 15.119 (f)(1)(ii): "The Roll-up command, in normal practice, will be followed (not necessarily immediately) by a Preamble Address Code indicating the base row and the horizontal indent position. If no Preamble Address Code is received, the base row will default to Row 15 or, if a roll-up caption is currently displayed, to the same base row last received, and the cursor will be placed at Column 1." */ /* set_cursor (ch, FIRST_COLUMN, ch->curr_row); */ } else { int was_dirty; ch->mode = VBI3_CAPTION_MODE_ROLL_UP; ch->window_rows = n_rows; set_cursor (ch, FIRST_COLUMN, LAST_ROW); was_dirty = ch->dirty[ch->displayed_buffer]; /* Sec. 15.119 (f)(1)(x). */ /* Lazy erase of displayed and non-displayed buffer. */ ch->dirty[0] = -1; ch->dirty[1] = -1; /* Copy displayed buffer to row-change-snapshot buffer. */ ch->dirty[2] = -1; if (was_dirty > 0) send_event (cd, ch, VBI3_EVENT_CC_PAGE, PAGE_UPDATE); } } static void erase_displayed_memory (vbi3_caption_decoder * cd, caption_channel * ch) { unsigned int n; int was_dirty; /* Erase Displayed Memory 001 c10f 010 1100 */ /* Sec. 15.119 (f). */ n = ch->displayed_buffer; was_dirty = ch->dirty[n]; /* Lazy erase. */ ch->dirty[n] = -1; /* Copy displayed buffer to row-change-snapshot buffer. */ ch->dirty[2] = -1; if (was_dirty > 0) { /* We don't send empty rows. send_raw_event (cd, ch, FIRST_ROW, LAST_ROW); */ send_event (cd, ch, VBI3_EVENT_CC_PAGE, PAGE_UPDATE); } } static void carriage_return (vbi3_caption_decoder * cd, caption_channel * ch) { vbi3_char ts; unsigned int n_rows; unsigned int first_row; unsigned int row; unsigned int n; vbi3_cc_page_flags flags; /* Carriage Return 001 c10f 010 1101 */ /* Sec. 15.119 (f)(1)(iii). */ n = ch->displayed_buffer; row = ch->curr_row; if (unlikely (VBI3_CAPTION_MODE_TEXT == ch->mode)) { if (LAST_ROW != row) { /* No event if the buffer will be erased to TRANSPARENT_SPACEs (dirty < 0) or the row still contains only TRANSPARENT_SPACEs. */ if (ch->dirty[n] > 0 && (ch->dirty[n] & (1 << row))) { row_change_snapshot (ch); send_raw_event (cd, ch, row, row); } set_cursor (ch, FIRST_COLUMN, row + 1); return; } /* No event if the buffer contains all TRANSPARENT_SPACEs. */ if (ch->dirty[n] <= 0) { ch->curr_column = FIRST_COLUMN; return; } n_rows = MAX_ROWS; } else { /* VBI3_CAPTION_MODE_ROLL_UP == ch->mode. */ /* No event if the buffer contains all TRANSPARENT_SPACEs. */ if (ch->dirty[n] <= 0) { ch->curr_column = FIRST_COLUMN; return; } n_rows = row - FIRST_ROW + 1; n_rows = MIN (n_rows, ch->window_rows); } row_change_snapshot (ch); /* No event if the row contains only TRANSPARENT_SPACEs. */ if (likely (ch->dirty[n] & (1 << row))) { unsigned int column; send_raw_event (cd, ch, row, row); first_row = row + 1 - n_rows; memmove (ch->buffer[n][first_row], ch->buffer[n][first_row + 1], (n_rows - 1) * sizeof (ch->buffer[0][0])); ch->dirty[n] >>= 1; ts = TRANSPARENT_SPACE (cd, ch); for (column = FIRST_COLUMN; column <= LAST_COLUMN; ++column) ch->buffer[n][row][column] = ts; } else { first_row = row + 1 - n_rows; memmove (ch->buffer[n][first_row], ch->buffer[n][first_row + 1], (n_rows - 1) * sizeof (ch->buffer[0][0])); ch->dirty[n] >>= 1; } ch->curr_column = FIRST_COLUMN; flags = PAGE_UPDATE; if (VBI3_CAPTION_MODE_ROLL_UP == ch->mode) flags = PAGE_UPDATE | VBI3_START_ROLLING; send_event (cd, ch, VBI3_EVENT_CC_PAGE, flags); } static void optional_attributes (vbi3_caption_decoder * cd, caption_channel * ch, unsigned int c2) { vbi3_char attr; unsigned int column; attr = ch->curr_attr; switch (c2) { case 0x21 ... 0x23: /* Misc Control Codes, Tab Offset 001 c111 010 00xx */ column = ch->curr_column + (c2 & 3); ch->curr_column = MIN (column, (unsigned int) LAST_COLUMN); return; case 0x2D: /* Optional Attributes 001 c111 010 1101 */ /* From Video Demystified, not verified. */ attr.opacity = VBI3_TRANSPARENT_FULL; break; case 0x2E: case 0x2F: /* Optional Attributes 001 c111 010 111u */ /* From Video Demystified, not verified. */ attr.foreground = VBI3_BLACK; if (c2 & 1) attr.attr |= VBI3_UNDERLINE; else attr.attr &= ~VBI3_UNDERLINE; break; default: /* ? */ /* Sec. 15.119 (i)(1): Ignore. */ return; } /* "Background and foreground attribute codes have an automatic backspace for backward compatibility with current decoders. Thus, an attribute must be preceded by a standard space character. Standard decoders display the space and ignore the attribute. Extended decoders display the space, and on receiving the attribute, backspace, then display a space that changes the color and opacity." XXX what if there is no "standard space character" or we're in first column? */ column = ch->curr_column; if (column > FIRST_COLUMN) ch->curr_column = column - 1; /* This is a spacing attribute. */ put_char (cd, ch, 0x0020); /* XXX I *think* attributes should set-after, not set-at. */ ch->curr_attr = attr; } /* NOTE ch is invalid if CHANNEL_UNKNOWN == cd->cc.curr_ch_num. */ static void misc_control_code (vbi3_caption_decoder * cd, caption_channel * ch, unsigned int c2, unsigned int ch_num0) { /* Misc Control Codes 001 c10f 010 xxxx */ /* XXX according to Video Demystified f = field. Purpose? Sec. 15.119 does not mention this bit or caption on field 2 at all. */ switch (c2 & 15) { case 0: /* Resume Caption Loading 001 c10f 010 0000 */ ch = switch_channel (cd, ch, VBI3_CAPTION_CC1 + (ch_num0 & 3)); ch->mode = VBI3_CAPTION_MODE_POP_ON; /* Sec. 15.119 (f)(1)(x): Memory not erased. Sec. 15.119 (f)(2)(iv): Cursor position unchanged. */ break; case 1: /* Backspace 001 c10f 010 0001 */ if (CHANNEL_UNKNOWN == cd->cc.curr_ch_num || VBI3_CAPTION_MODE_UNKNOWN == ch->mode) break; backspace (cd, ch); break; case 2: /* reserved (formerly Alarm Off) */ case 3: /* reserved (formerly Alarm On) */ /* Sec. 15.119 (i)(1): Ignore. */ break; case 4: /* Delete To End Of Row 001 c10f 010 0100 */ if (CHANNEL_UNKNOWN == cd->cc.curr_ch_num || VBI3_CAPTION_MODE_UNKNOWN == ch->mode) break; delete_to_end_of_row (cd, ch); break; case 5: case 6: case 7: /* Roll-Up Captions 001 c10f 010 01xx */ ch = switch_channel (cd, ch, VBI3_CAPTION_CC1 + (ch_num0 & 3)); roll_up_captions (cd, ch, c2); break; case 8: /* Flash On 001 c10f 010 1000 */ /* Sec. 15.119 (h)(1)(i). */ if (CHANNEL_UNKNOWN == cd->cc.curr_ch_num || VBI3_CAPTION_MODE_UNKNOWN == ch->mode) break; /* This is a spacing attribute. */ put_char (cd, ch, 0x0020); ch->curr_attr.attr |= VBI3_FLASH; break; case 9: /* Resume Direct Captioning 001 c10f 010 1001 */ ch = switch_channel (cd, ch, VBI3_CAPTION_CC1 + (ch_num0 & 3)); /* Sec. 15.119 (f)(1)(x), (2)(vi): Memory not erased. */ if (VBI3_CAPTION_MODE_UNKNOWN == ch->mode || VBI3_CAPTION_MODE_POP_ON == ch->mode) row_change_snapshot (ch); ch->mode = VBI3_CAPTION_MODE_PAINT_ON; break; case 10: /* Text Restart 001 c10f 010 1010 */ ch = switch_channel (cd, ch, VBI3_CAPTION_T1 + (ch_num0 & 3)); /* Mode is invariably VBI3_CAPTION_MODE_TEXT. */ set_cursor (ch, FIRST_COLUMN, FIRST_ROW); break; case 11: /* Resume Text Display 001 c10f 010 1011 */ ch = switch_channel (cd, ch, VBI3_CAPTION_T1 + (ch_num0 & 3)); /* Mode is invariably VBI3_CAPTION_MODE_TEXT. */ break; case 12: /* Erase Displayed Memory 001 c10f 010 1100 */ /* Sec. 15.119 (f). */ if (CHANNEL_UNKNOWN == cd->cc.curr_ch_num || VBI3_CAPTION_MODE_UNKNOWN == ch->mode) break; erase_displayed_memory (cd, ch); break; case 13: /* Carriage Return 001 c10f 010 1101 */ if (CHANNEL_UNKNOWN == cd->cc.curr_ch_num) break; switch (ch->mode) { case VBI3_CAPTION_MODE_UNKNOWN: break; case VBI3_CAPTION_MODE_POP_ON: case VBI3_CAPTION_MODE_PAINT_ON: /* Sec. 15.119 (f)(2)(i), (3)(i): No effect. */ break; case VBI3_CAPTION_MODE_ROLL_UP: case VBI3_CAPTION_MODE_TEXT: carriage_return (cd, ch); break; } break; case 14: /* Erase Non-Displayed Memory 001 c10f 010 1110 */ /* Sec. 15.119 (f)(2)(v). */ if (CHANNEL_UNKNOWN == cd->cc.curr_ch_num) break; /* Lazy erase. */ ch->dirty[ch->displayed_buffer ^ 1] = -1; break; case 15: /* End Of Caption 001 c10f 010 1111 */ /* Sec. 15.119 (f)(2). */ ch = switch_channel (cd, ch, VBI3_CAPTION_CC1 + (ch_num0 & 3)); /* Sec. 15.119 (f)(2). */ ch->mode = VBI3_CAPTION_MODE_POP_ON; /* Swap displayed and non-displayed caption. */ ch->displayed_buffer ^= 1; /* Sec. 15.119 (f)(3)(iv): Does not erase non-displayed memory. */ /* No event if both buffers are empty. */ if (ch->dirty[0] > 0 || ch->dirty[1] > 0) { row_change_snapshot (ch); send_raw_event (cd, ch, FIRST_ROW, LAST_ROW); send_event (cd, ch, VBI3_EVENT_CC_PAGE, PAGE_UPDATE); } break; } } static void caption_control_code (vbi3_caption_decoder * cd, unsigned int c1, unsigned int c2, field_num f) { unsigned int ch_num0; caption_channel *ch; if (0) fprintf (stderr, "caption_control_code %02x %02x %d\n", c1, c2, f); /* Caption / text, field 1 / 2, primary / secondary channel. */ ch_num0 = (((cd->cc.curr_ch_num - VBI3_CAPTION_CC1) & 4) + f * 2 + ((c1 >> 3) & 1)); ch = &cd->cc.channel[ch_num0]; if (c2 >= 0x40) { /* Preamble Address Codes 001 crrr 1ri xxxu */ if (CHANNEL_UNKNOWN == cd->cc.curr_ch_num || VBI3_CAPTION_MODE_UNKNOWN == ch->mode) return; preamble_address_code (cd, ch, c1, c2); return; } switch (c1 & 7) { case 0: { unsigned int color; if (c2 & 0x10) { /* Sec. 15.119 (i)(1): Ignore. */ } else { /* Optional Attributes 001 c000 010 xxxt */ /* From Video Demystified; not verified. */ if (CHANNEL_UNKNOWN == cd->cc.curr_ch_num || VBI3_CAPTION_MODE_UNKNOWN == ch->mode) break; color = (c2 >> 1) & 7; ch->curr_attr.opacity = (c2 & 1) ? VBI3_TRANSLUCENT : VBI3_OPAQUE; ch->curr_attr.background = color_mapping[color]; } break; } case 1: if (CHANNEL_UNKNOWN == cd->cc.curr_ch_num || VBI3_CAPTION_MODE_UNKNOWN == ch->mode) break; if (c2 & 0x10) { /* Special Characters 001 c001 011 xxxx */ c2 &= 15; if (9 == c2) { put_transparent_space (cd, ch); } else { put_char (cd, ch, vbi3_caption_unicode (c2)); } } else { /* Mid-Row Codes 001 c001 010 xxxu */ mid_row_code (cd, ch, c2); } break; case 2: /* ? */ case 3: /* ? */ /* Sec. 15.119 (i)(1): Ignore. */ break; case 4: case 5: if (c2 & 0x10) { /* Sec. 15.119 (i)(1): Ignore. */ } else { misc_control_code (cd, ch, c2, ch_num0); } break; case 6: /* reserved */ /* Sec. 15.119 (i)(1): Ignore. */ break; case 7: if (CHANNEL_UNKNOWN == cd->cc.curr_ch_num || VBI3_CAPTION_MODE_UNKNOWN == ch->mode) break; optional_attributes (cd, ch, c2); break; } } static vbi3_bool caption_text (vbi3_caption_decoder * cd, caption_channel * ch, int c, double timestamp) { double last_timestamp; if (0) fprintf (stderr, "caption_text %02x '%c' %f\n", c, c, timestamp); if (0 == c) { if (VBI3_CAPTION_MODE_UNKNOWN == ch->mode) return TRUE; /* After x NUL characters (presumably a caption pause), force a display update if we do not send events on every display change. */ return TRUE; } if (c < 0x20) { /* Parity error or invalid data. */ if (c < 0 && VBI3_CAPTION_MODE_UNKNOWN != ch->mode) { /* Sec. 15.119 (j)(1). */ put_char (cd, ch, vbi3_caption_unicode (0x7F)); } return FALSE; } last_timestamp = ch->last_timestamp + 10.0 /* seconds */; /* Last activity on this channel. */ ch->last_timestamp = timestamp; if ((cd->handlers.event_mask & VBI3_EVENT_PAGE_TYPE) && timestamp > last_timestamp) { vbi3_event e; e.type = VBI3_EVENT_PAGE_TYPE; e.network = &cd->network->network; e.timestamp = timestamp; _vbi3_event_handler_list_send (&cd->handlers, &e); } if (VBI3_CAPTION_MODE_UNKNOWN != ch->mode) put_char (cd, ch, vbi3_caption_unicode (c)); return TRUE; } /* ITV decoder ***************************************************************/ static vbi3_bool itv_text (vbi3_caption_decoder * cd, int c) { if (c >= 0x20) { /* Sample s4-NBC omitted CR. */ if ('<' == c) itv_text (cd, 0); if (cd->itv.size > sizeof (cd->itv.buffer) - 2) cd->itv.size = 0; cd->itv.buffer[cd->itv.size++] = c; return TRUE; } else if (0 != c) { /* Parity error or invalid character. */ cd->itv.size = 0; return FALSE; } cd->itv.buffer[cd->itv.size] = 0; cd->itv.size = 0; #ifndef ZAPPING8 #warning TODO /* vbi3_atvef_trigger(vbi, cc->itv_buf); event */ #endif return TRUE; } static void itv_control_code (vbi3_caption_decoder * cd, unsigned int c1, unsigned int c2) { if (c2 >= 0x40) { /* Preamble Address Codes 001 crrr 1ri xxxu */ return; } switch (c1 & 7) { case 4: case 5: if (c2 & 0x10) { break; } /* Misc Control Codes 001 c10f 010 xxxx */ /* f ("field"): purpose? */ switch (c2 & 15) { case 0: /* Resume Caption Loading 001 c10f 010 0000 */ case 5: case 6: case 7: /* Roll-Up Captions 001 c10f 010 01xx */ case 9: /* Resume Direct Captioning 001 c10f 010 1001 */ case 15: /* End Of Caption 001 c10f 010 1111 */ cd->in_itv = FALSE; break; case 10: /* Text Restart 001 c10f 010 1010 */ cd->itv.size = 0; /* Fall through. */ case 11: /* Resume Text Display 001 c10f 010 1011 */ /* First field, text mode, secondary channel -> VBI3_CAPTION_T2. */ cd->in_itv = !!(c1 & 0x08); break; case 13: /* Carriage Return 001 c10f 010 1101 */ if (cd->in_itv) itv_text (cd, 0); break; default: break; } break; default: break; } } /* Demultiplexer *************************************************************/ /** * @internal * @param cd * @param buffer Two bytes. * @param line ITU-R line number this data originated from. * @param timestamp * * Decode two bytes of Closed Caption data (Caption, XDS, ITV), * updating the decoder state accordingly. May send events. */ vbi3_bool vbi3_caption_decoder_feed (vbi3_caption_decoder * cd, const uint8_t buffer[2], unsigned int line, double timestamp) { int c1; int c2; field_num f; vbi3_bool all_successful; assert (NULL != cd); assert (NULL != buffer); if (0) fprintf (stderr, "caption feed %02x %02x '%c%c' %3d %f\n", buffer[0] & 0x7F, buffer[1] & 0x7F, buffer[0] & 0x7F, buffer[1] & 0x7F, line, timestamp); f = FIELD_1; switch (line) { case 21: /* NTSC */ case 22: /* PAL/SECAM */ break; case 284: /* NTSC */ f = FIELD_2; break; default: return FALSE; } cd->timestamp = timestamp; // FIXME deferred reset here c1 = vbi3_unpar8 (buffer[0]); c2 = vbi3_unpar8 (buffer[1]); all_successful = TRUE; if (FIELD_1 == f) { /* First field. Control codes may repeat to insure correct reception. */ /* According to Sec. 15.119 (2)(i)(4). */ if (c1 == cd->expect_ctrl[FIELD_1][0] && c2 == cd->expect_ctrl[FIELD_1][1]) { /* Already acted upon. */ goto finish; } else if (c1 < 0 && cd->expect_ctrl[FIELD_1][0] && c2 == cd->expect_ctrl[FIELD_1][1]) { /* Parity error, probably in repeat control code. */ goto parity_error; } } else { /* Second field. */ if (cd->handlers.event_mask & XDS_EVENTS) { /* TODO all_successful &= vbi3_xds_demux_feed (&cd->xds.demux, buffer); */ } /* XDS bytes are in range 0x01 ... 0x0F (control codes) and 0x40 ... 0x7F (data), must be filtered. */ switch (c1) { case 0x01 ... 0x0E: /* XDS packet start or continuation. */ cd->in_xds = TRUE; goto finish; case 0x0F: /* XDS packet terminator. */ cd->in_xds = FALSE; goto finish; case 0x10 ... 0x1F: /* Caption control code. */ cd->in_xds = FALSE; break; default: if (c1 < 0) { goto parity_error; } break; } } switch (c1) { case 0x10 ... 0x1F: /* Sec. 15.119 (i)(1), (i)(2). */ if (c2 < 0x20) { /* Parity error or invalid control code. Let's hope it repeats. */ goto parity_error; } if (cd->handlers.event_mask & VBI3_EVENT_TRIGGER) { if (FIELD_1 == f) itv_control_code (cd, c1, c2); } if (cd->handlers.event_mask & CAPTION_EVENTS) { caption_control_code (cd, c1, c2, f); if (cd->cc.event_pending) { send_event (cd, cd->cc.event_pending, VBI3_EVENT_CC_PAGE, VBI3_CHAR_UPDATE); } } cd->expect_ctrl[f][0] = c1; cd->expect_ctrl[f][1] = c2; break; default: if (FIELD_1 != f && cd->in_xds) break; cd->expect_ctrl[f][0] = 0; /* Sec. 15.119 (i)(1). */ if (c1 > 0x00 && c1 < 0x10) { c1 = 0; } if (cd->in_itv) { all_successful &= itv_text (cd, c1); all_successful &= itv_text (cd, c2); } if (cd->handlers.event_mask & CAPTION_EVENTS) { vbi3_pgno ch_num; caption_channel *ch; ch_num = cd->cc.curr_ch_num; if (CHANNEL_UNKNOWN == ch_num) break; ch_num = ((ch_num - VBI3_CAPTION_CC1) & 5) + f * 2; ch = &cd->cc.channel[ch_num]; all_successful &= caption_text (cd, ch, c1, timestamp); all_successful &= caption_text (cd, ch, c2, timestamp); if (cd->cc.event_pending) { send_event (cd, cd->cc.event_pending, VBI3_EVENT_CC_PAGE, VBI3_CHAR_UPDATE); } } break; } finish: cd->error_history = cd->error_history * 2 + all_successful; return all_successful; parity_error: cd->expect_ctrl[f][0] = 0; cd->error_history *= 2; return FALSE; } void _vbi3_caption_decoder_resync (vbi3_caption_decoder * cd) { unsigned int ch_num; assert (NULL != cd); if (0) fprintf (stderr, "caption resync\n"); for (ch_num = 0; ch_num < MAX_CHANNELS; ++ch_num) { caption_channel *ch; ch = &cd->cc.channel[ch_num]; if (ch_num <= 3) ch->mode = VBI3_CAPTION_MODE_UNKNOWN; else ch->mode = VBI3_CAPTION_MODE_TEXT; /* invariable */ ch->displayed_buffer = 0; /* Lazy erase of all buffers. */ memset (ch->dirty, -1, sizeof (ch->dirty)); set_cursor (ch, FIRST_COLUMN, LAST_ROW); ch->window_rows = 3; reset_curr_attr (cd, ch); ch->last_timestamp = 0.0; } cd->cc.curr_ch_num = CHANNEL_UNKNOWN; cd->in_xds = FALSE; CLEAR (cd->expect_ctrl); cd->error_history = 0; /* all failed */ } /** @internal */ void cache_network_destroy_caption (cache_network * cn) { cn = cn; /* TODO */ } /** * @internal * @param cn cache_network structure to be initialized. * * Initializes the Caption fields of a cache_network structure. */ void cache_network_init_caption (cache_network * cn) { cn = cn; /* TODO */ } /** * @internal * @param cd Caption decoder allocated with vbi3_caption_decoder_new(). * @param cn New network, can be @c NULL if 0.0 != time. * @param time Deferred reset when time is greater than * vbi3_caption_decoder_feed() timestamp. Pass a negative number to * cancel a deferred reset, 0.0 to reset immediately. * * Internal reset function, called via cd->virtual_reset(). */ static void internal_reset (vbi3_caption_decoder * cd, cache_network * cn, double time) { assert (NULL != cd); if (0) fprintf (stderr, "caption reset %f: %f -> %f\n", cd->timestamp, cd->reset_time, time); if (time <= 0.0 /* reset now or cancel deferred reset */ || time > cd->reset_time) cd->reset_time = time; if (0.0 != time) { /* Don't reset now. */ return; } assert (NULL != cn); cache_network_unref (cd->network); cd->network = cache_network_ref (cn); _vbi3_caption_decoder_resync (cd); if (internal_reset == cd->virtual_reset) { vbi3_event e; e.type = VBI3_EVENT_RESET; e.network = &cd->network->network; e.timestamp = cd->timestamp; _vbi3_event_handler_list_send (&cd->handlers, &e); } } /** * @param cd Caption decoder allocated with vbi3_caption_decoder_new(). * @param callback Function to be called on events. * @param user_data User pointer passed through to the @a callback function. * * Removes an event handler from the Caption decoder, if a handler with * this @a callback and @a user_data has been registered. You can * safely call this function from a handler removing itself or another * handler. */ void vbi3_caption_decoder_remove_event_handler (vbi3_caption_decoder * cd, vbi3_event_cb * callback, void * user_data) { /* TODO vbi3_cache_remove_event_handler (cd->cache, callback, user_data); */ _vbi3_event_handler_list_remove_by_callback (&cd->handlers, callback, user_data); } /** * @param cd Caption decoder allocated with vbi3_caption_decoder_new(). * @param event_mask Set of events (@c VBI3_EVENT_) the handler is waiting * for, can be -1 for all and 0 for none. * @param callback Function to be called on events by * vbi3_caption_decoder_feed(). * @param user_data User pointer passed through to the @a callback function. * * Adds a new event handler to the Caption decoder. When the @a callback * with @a user_data is already registered the function merely changes the * set of events it will receive in the future. When the @a event_mask is * empty the function does nothing or removes an already registered event * handler. You can safely call this function from an event handler. * * Any number of handlers can be added, also different handlers for the * same event which will be called in registration order. * * @returns * @c FALSE of failure (out of memory). */ vbi3_bool vbi3_caption_decoder_add_event_handler (vbi3_caption_decoder * cd, unsigned int event_mask, vbi3_event_cb * callback, void * user_data) { unsigned int cc_mask; unsigned int add_mask; unsigned int rem_mask; /* TODO if (!vbi3_cache_add_event_handler (cd->cache, event_mask, callback, user_data)) return FALSE; */ cc_mask = event_mask & (VBI3_EVENT_CLOSE | VBI3_EVENT_RESET | VBI3_EVENT_CC_PAGE | VBI3_EVENT_CC_RAW | VBI3_EVENT_NETWORK | VBI3_EVENT_TRIGGER | VBI3_EVENT_PROG_INFO | VBI3_EVENT_LOCAL_TIME | VBI3_EVENT_PROG_ID | VBI3_EVENT_PAGE_TYPE); add_mask = cc_mask & ~cd->handlers.event_mask; rem_mask = cd->handlers.event_mask & ~event_mask; if (0 == cc_mask) { return TRUE; } if (NULL != _vbi3_event_handler_list_add (&cd->handlers, cc_mask, callback, user_data)) { if (add_mask & (VBI3_EVENT_CC_PAGE | VBI3_EVENT_CC_RAW | VBI3_EVENT_TRIGGER)) { /* XXX is this really necessary? */ _vbi3_caption_decoder_resync (cd); } return TRUE; } else { /* TODO vbi3_cache_remove_event_handler (cd->cache, callback, user_data); */ } return FALSE; } /** * DOCUMENT ME */ vbi3_bool vbi3_caption_decoder_get_network (vbi3_caption_decoder * cd, vbi3_network * nk) { assert (NULL != cd); assert (NULL != nk); if (!cd->network) return FALSE; return vbi3_network_copy (nk, &cd->network->network); } /** * DOCUMENT ME */ vbi3_cache * vbi3_caption_decoder_get_cache (vbi3_caption_decoder * cd) { assert (NULL != cd); if (!cd->cache) return NULL; return vbi3_cache_ref (cd->cache); } /** * @param cd Caption decoder allocated with vbi3_caption_decoder_new(). * @param nk Identifies the new network, can be @c NULL. * * Resets the caption decoder, useful for example after a channel change. * This function sends a @c VBI3_EVENT_RESET. * * You can pass a vbi3_network structure to identify the new network in * advance, before the decoder receives a network ID, if ever. */ void vbi3_caption_decoder_reset (vbi3_caption_decoder * cd, const vbi3_network * nk, vbi3_videostd_set videostd_set) { cache_network *cn; assert (NULL != cd); cd->videostd_set = videostd_set; cn = _vbi3_cache_add_network (cd->cache, nk, videostd_set); cd->virtual_reset (cd, cn, 0.0 /* now */); cache_network_unref (cn); } /** * @internal * @param cd Caption decoder to be destroyed. * * Frees all resources associated with @a cd, except the structure itself. * This function sends a @c VBI3_EVENT_CLOSE. */ void _vbi3_caption_decoder_destroy (vbi3_caption_decoder * cd) { vbi3_event e; assert (NULL != cd); e.type = VBI3_EVENT_CLOSE; e.network = &cd->network->network; e.timestamp = cd->timestamp; _vbi3_event_handler_list_send (&cd->handlers, &e); _vbi3_event_handler_list_destroy (&cd->handlers); cache_network_unref (cd->network); /* Delete if we hold the last reference. */ vbi3_cache_unref (cd->cache); CLEAR (*cd); } /** * @internal * @param cd Caption decoder to be initialized. * @param ca Cache to be used by this Caption decoder, can be @c NULL. * To allocate a cache call vbi3_cache_new(). Caches have a reference * counter, you can vbi3_cache_unref() after calling this function. * @param nk Initial network (see vbi3_caption_decoder_reset()), * can be @c NULL. * * Initializes a Caption decoder structure. * * @returns * @c FALSE on failure (out of memory). */ vbi3_bool _vbi3_caption_decoder_init (vbi3_caption_decoder * cd, vbi3_cache * ca, const vbi3_network * nk, vbi3_videostd_set videostd_set) { cache_network *cn; assert (NULL != cd); CLEAR (*cd); if (ca) cd->cache = vbi3_cache_ref (ca); else cd->cache = vbi3_cache_new (); if (!cd->cache) return FALSE; cd->virtual_reset = internal_reset; _vbi3_event_handler_list_init (&cd->handlers); cd->videostd_set = videostd_set; cn = _vbi3_cache_add_network (cd->cache, nk, videostd_set); internal_reset (cd, cn, 0.0 /* now */); cache_network_unref (cn); return TRUE; } static void internal_delete (vbi3_caption_decoder * cd) { assert (NULL != cd); _vbi3_caption_decoder_destroy (cd); vbi3_free (cd); } /** * @param cd Caption decoder context allocated with * vbi3_caption_decoder_new(), can be @c NULL. * * Frees all resources associated with @a cd. * This function sends a @c VBI3_EVENT_CLOSE. */ void vbi3_caption_decoder_delete (vbi3_caption_decoder * cd) { if (NULL == cd) return; assert (NULL != cd->virtual_delete); cd->virtual_delete (cd); } /** * @param ca Cache to be used by this Caption decoder. If @a ca is @c NULL * the function allocates a new cache. To allocate a cache yourself call * vbi3_cache_new(). Caches have a reference counter, you can * vbi3_cache_unref() after calling this function. * * Allocates a new Close Caption (EIA 608) decoder. Decoded data is * available through the following functions: * - vbi3_caption_decoder_get_page() * * To be notified when new data is available call * vbi3_caption_decoder_add_event_handler(). * * @returns * Pointer to newly allocated Caption decoder which must be * freed with vbi3_caption_decoder_delete() when done. * @c NULL on failure (out of memory). */ vbi3_caption_decoder * vbi3_caption_decoder_new (vbi3_cache * ca, const vbi3_network * nk, vbi3_videostd_set videostd_set) { vbi3_caption_decoder *cd; if (!(cd = malloc (sizeof (*cd)))) { return NULL; } _vbi3_caption_decoder_init (cd, ca, nk, videostd_set); cd->virtual_delete = internal_delete; return cd; } zapping-0.10cvs6/libvbi/caption_decoder.h 644 764 144 10355 10305455013 13567 /* * libzvbi - Caption decoder * * Copyright (C) 2000, 2001, 2002, 2005 Michael H. Schimek * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* $Id: caption_decoder.h,v 1.1 2005/09/01 01:31:55 mschimek Exp $ */ #ifndef __ZVBI3_CAPTION_DECODER_H__ #define __ZVBI3_CAPTION_DECODER_H__ #include /* uint8_t */ #include /* va_list */ #include "macros.h" #include "bcd.h" /* vbi3_pgno */ #include "page.h" /* vbi3_page */ #include "cache.h" /* vbi3_cache */ #include "network.h" /* vbi3_network */ #include "event.h" /* vbi3_event_cb */ #include "sampling_par.h" /* vbi3_videostd_set */ VBI3_BEGIN_DECLS /** * @addtogroup Caption * @{ */ typedef enum { VBI3_CAPTION_MODE_UNKNOWN, VBI3_CAPTION_MODE_POP_ON, VBI3_CAPTION_MODE_PAINT_ON, VBI3_CAPTION_MODE_ROLL_UP, VBI3_CAPTION_MODE_TEXT } vbi3_caption_mode; /** * @brief Meta data and statistical info about a Closed Caption channels. */ typedef struct { vbi3_pgno channel; /** VBI3_SUBTITLE_PAGE or VBI3_NORMAL_PAGE. */ vbi3_page_type page_type; vbi3_caption_mode caption_mode; /** * Language, if a subtitle page. This is a ISO 639 two-character * language code string, for example "fr" for French. Can be * NULL if unknown. */ const char * language_code; double last_received; void * reserved1[2]; unsigned int reserved2[2]; } vbi3_cc_channel_stat; extern void vbi3_cc_channel_stat_destroy (vbi3_cc_channel_stat * cs) __attribute__ ((_vbi3_nonnull (1))); extern void vbi3_cc_channel_stat_init (vbi3_cc_channel_stat * cs) __attribute__ ((_vbi3_nonnull (1))); /** * @brief Caption decoder. * * The contents of this structure are private. * Call vbi3_caption_decoder_new() to allocate a Caption decoder. */ typedef struct _vbi3_caption_decoder vbi3_caption_decoder; extern vbi3_bool vbi3_caption_decoder_get_cc_channel_stat (vbi3_caption_decoder * cd, vbi3_cc_channel_stat * cs, vbi3_pgno channel) __attribute__ ((_vbi3_nonnull (1, 2))); extern vbi3_page * vbi3_caption_decoder_get_page_va_list (vbi3_caption_decoder * cd, vbi3_pgno channel, va_list format_options) __attribute__ ((malloc, _vbi3_nonnull (1))); extern vbi3_page * vbi3_caption_decoder_get_page (vbi3_caption_decoder * cd, vbi3_pgno channel, ...) __attribute__ ((malloc, _vbi3_nonnull (1), _vbi3_sentinel)); extern vbi3_bool vbi3_caption_decoder_feed (vbi3_caption_decoder * cd, const uint8_t buffer[2], unsigned int line, double timestamp) __attribute__ ((_vbi3_nonnull (1, 2))); extern void vbi3_caption_decoder_remove_event_handler (vbi3_caption_decoder * cd, vbi3_event_cb * callback, void * user_data) __attribute__ ((_vbi3_nonnull (1))); extern vbi3_bool vbi3_caption_decoder_add_event_handler (vbi3_caption_decoder * cd, unsigned int event_mask, vbi3_event_cb * callback, void * user_data) __attribute__ ((_vbi3_nonnull (1))); extern vbi3_bool vbi3_caption_decoder_get_network (vbi3_caption_decoder * cd, vbi3_network * nk) __attribute__ ((_vbi3_nonnull (1, 2))); extern vbi3_cache * vbi3_caption_decoder_get_cache (vbi3_caption_decoder * cd) __attribute__ ((_vbi3_nonnull (1))); extern void vbi3_caption_decoder_reset (vbi3_caption_decoder * cd, const vbi3_network * nk, vbi3_videostd_set videostd_set); extern void vbi3_caption_decoder_delete (vbi3_caption_decoder * cd); extern vbi3_caption_decoder * vbi3_caption_decoder_new (vbi3_cache * ca, const vbi3_network * nk, vbi3_videostd_set videostd_set) __attribute__ ((malloc)); /** @} */ VBI3_END_DECLS #endif /* __ZVBI3_CAPTION_DECODER_H__ */ zapping-0.10cvs6/libvbi/fontgen.c 644 764 144 7545 10176065307 12100 /* * libzvbi * * Copyright (C) 2004 Michael H. Schimek * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* $Id: fontgen.c,v 1.5 2005/01/27 04:15:03 mschimek Exp $ */ #include #include #include #include #include "misc.h" #include "hamm.c" /* _vbi3_bit_reverse[] */ static char * font_name; static unsigned int char_height; uint8_t * image; static unsigned int image_width; static unsigned int image_height; static int pbm_getc (FILE * fp) { int c; c = getc (fp); if ('#' == c) { do c = getc (fp); while ('\n' != c && '\r' != c && EOF != c); } return c; } static void pbm_getint (FILE * fp, unsigned int * val) { int c; unsigned int t; do c = pbm_getc (fp); while (EOF != c && isspace (c)); t = 0; while (isdigit (c)) { t = t * 10 + c - '0'; c = pbm_getc (fp); } *val = t; if (EOF == c) { perror ("read error"); exit (EXIT_FAILURE); } } static void pbm_read (void) { FILE *fp; size_t n; size_t image_size; uint8_t buf[2]; fp = stdin; n = fread (buf, sizeof (*buf), N_ELEMENTS (buf), fp); if (2 != n || 'P' != buf[0] || '4' != buf[1]) { fprintf (stderr, "source is not a .pbm file\n"); exit (EXIT_FAILURE); } pbm_getint (fp, &image_width); pbm_getint (fp, &image_height); image_size = image_width * image_height / 8; image = vbi3_malloc (image_size); if (NULL == image) { fprintf (stderr, "out of memory\n"); exit (EXIT_FAILURE); } n = fread (image, 1, image_size, fp); if (n < image_size) { perror ("read error or unexpected eof"); exit (EXIT_FAILURE); } } static void xbm_write (void) { FILE *fp; unsigned int row; unsigned int line; fp = stdout; fprintf (fp, "/* Generated file, do not edit */\n" "#define %s_width %u\n" "#define %s_height %u\n" "static const uint8_t %s_bits [] = {\n ", font_name, image_width * image_height / char_height, font_name, char_height, font_name); assert (0 == (image_width % 8)); /* Note this de-interleaves the font image (puts all chars in row 0) */ for (line = 0; line < char_height; ++line) { for (row = 0; row < image_height; row += char_height) { unsigned int x; uint8_t *p; p = (image + row * image_width / 8 + line * image_width / 8); for (x = 0; x < image_width / 8; ++x) { fprintf (fp, "0x%02x,", _vbi3_bit_reverse[p[x]]); if (7 == (x % 8)) fputs ("\n ", fp); else fputc (' ', fp); } } } fputs ("};\n", fp); } int main (int argc, char ** argv) { if (4 != argc) { fprintf (stderr, "Usage: %s format font_name char_height " "output\n", argv[0]); exit (EXIT_FAILURE); } font_name = argv[2]; char_height = atoi (argv[3]); pbm_read (); assert (0 == (image_height % char_height)); if (0 == strcmp (argv[1], "xbm")) { /* XBM image for built-in render functions (exp-gfx.c). */ xbm_write (); } else if (0 == strcmp (argv[1], "bdf")) { /* BDF file for X11 rendering. */ /* TODO (s/a contrib) */ } else if (0 == strcmp (argv[1], "ttf")) { /* TTF file for TT rendering of G1 Block Mosaics Set and G3 Smooth Mosaics and Line Drawing Set. */ /* TODO */ } exit (EXIT_SUCCESS); return 0; } zapping-0.10cvs6/libvbi/exp-html.c 644 764 144 41567 10305456044 12214 /* * libzvbi - Closed Caption and Teletext HTML export functions * * Copyright (C) 2001, 2002, 2004 Michael H. Schimek * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* $Id: exp-html.c,v 1.36 2005/09/01 01:40:52 mschimek Exp $ */ #ifdef HAVE_CONFIG_H # include "config.h" #endif #include /* malloc() */ #include /* strlen(), memcpy() */ #include /* ssize_t */ #include #include "misc.h" #ifdef ZAPPING8 # include "common/intl-priv.h" #else # include "intl-priv.h" #endif #include "export-priv.h" /* vbi3_export */ #include "page.h" /* vbi3_page */ #include "lang.h" /* vbi3_character_set, ... */ typedef struct { vbi3_char ac; unsigned int id; unsigned int ref; } style; typedef struct { char * buffer; char * bp; char * end; } vec; typedef struct html_instance { vbi3_export export; /* Options */ unsigned int gfx_chr; vbi3_bool ascii_art; vbi3_bool color; vbi3_bool header; jmp_buf main; vbi3_char cac; vbi3_bool in_span; vbi3_bool in_hyperlink; vbi3_bool in_pdc_link; vec text; vec style; vbi3_link link; const vbi3_preselection *pdc; } html_instance; static vbi3_export * html_new (const _vbi3_export_module *em) { html_instance *html; em = em; if (!(html = vbi3_malloc (sizeof (*html)))) return NULL; CLEAR (*html); vbi3_link_init (&html->link); return &html->export; } static void html_delete (vbi3_export * e) { html_instance *html = PARENT (e, html_instance, export); vbi3_free (html->text.buffer); vbi3_free (html->style.buffer); vbi3_link_destroy (&html->link); vbi3_free (html); } static const vbi3_option_info option_info [] = { _VBI3_OPTION_STRING_INITIALIZER ("gfx_chr", N_("Graphics char"), "#", N_("Replacement for block graphic characters: " "a single character or decimal (32) or hex (0x20) code")), _VBI3_OPTION_BOOL_INITIALIZER ("ascii_art", N_("ASCII art"), FALSE, N_("Replace graphic characters by ASCII art")), _VBI3_OPTION_BOOL_INITIALIZER ("color", N_("Color (CSS)"), TRUE, N_("Store the page colors using CSS attributes")), _VBI3_OPTION_BOOL_INITIALIZER ("header", N_("HTML header"), TRUE, N_("Include HTML page header")) }; #define KEYWORD(str) (0 == strcmp (keyword, str)) static vbi3_bool option_get (vbi3_export * e, const char * keyword, vbi3_option_value * value) { html_instance *html = PARENT (e, html_instance, export); if (KEYWORD ("gfx_chr")) { if (!(value->str = _vbi3_export_strdup (e, NULL, "x"))) return FALSE; value->str[0] = html->gfx_chr; } else if (KEYWORD ("ascii_art")) { value->num = html->ascii_art; } else if (KEYWORD ("color")) { value->num = html->color; } else if (KEYWORD ("header")) { value->num = html->header; } else { _vbi3_export_unknown_option (e, keyword); return FALSE; } return TRUE; } static vbi3_bool option_set (vbi3_export * e, const char * keyword, va_list ap) { html_instance *html = PARENT (e, html_instance, export); if (KEYWORD ("gfx_chr")) { const char *string = va_arg (ap, const char *); char *s; int value; if (!string || !string[0]) { _vbi3_export_invalid_option (e, keyword, string); return FALSE; } else if (1 == strlen (string)) { value = string[0]; } else { value = strtol (string, &s, 0); if (s == string) value = string[0]; } html->gfx_chr = (value < 0x20 || value > 0xE000) ? 0x20 : value; } else if (KEYWORD ("ascii_art")) { html->ascii_art = !!va_arg (ap, vbi3_bool); } else if (KEYWORD ("color")) { html->color = !!va_arg (ap, vbi3_bool); } else if (KEYWORD ("header")) { html->header = !!va_arg (ap, vbi3_bool); } else { _vbi3_export_unknown_option (e, keyword); return FALSE; } return TRUE; } static void extend (html_instance * html, vec * v, unsigned int incr, unsigned int size) { char *buffer; unsigned int n; n = (v->end - v->buffer + incr) * size; if (!(buffer = vbi3_realloc (v->buffer, n))) { longjmp (html->main, -1); } v->bp = buffer + (v->bp - v->buffer); v->buffer = buffer; v->end = buffer + n; } static void nputs (html_instance * html, const char * s, unsigned int n) { if (html->text.bp + n > html->text.end) extend (html, &html->text, 4096, 1); memcpy (html->text.bp, s, n); html->text.bp += n; } static __inline__ void cputs (html_instance * html, const char * s) { nputs (html, s, strlen (s)); } #ifdef __GNUC__ #define puts(html, s) \ (__builtin_constant_p (s) ? \ nputs (html, s, (sizeof (s) - 1) * sizeof (char)) : \ cputs (html, s)) #else #define puts cputs #endif static void putwc (html_instance * html, unsigned int c, vbi3_bool escape) { char *d; if (escape) { switch (c) { case '<': puts (html, "<"); return; case '>': puts (html, ">"); return; case '&': puts (html, "&"); return; default: break; } } if (html->text.bp + 3 > html->text.end) extend (html, &html->text, 4096, 1); d = html->text.bp; if (c < 0x80) { *d = c; html->text.bp = d + 1; } else if (c < 0x800) { d[0] = 0xC0 | (c >> 6); d[1] = 0x80 | (c & 0x3F); html->text.bp = d + 2; } else { d[0] = 0xE0 | (c >> 12); d[1] = 0x80 | ((c >> 6) & 0x3F); d[2] = 0x80 | (c & 0x3F); html->text.bp = d + 3; } } static void puts_escape (html_instance * html, const char * s) { while (*s) { putwc (html, (unsigned int) *s, TRUE); ++s; } } static void puts_printf (html_instance * html, vbi3_bool escape, const char * template, ...) { char buffer[1024]; va_list ap; int n; va_start (ap, template); n = vsnprintf (buffer, sizeof (buffer), template, ap); va_end (ap); if (n < 0 && n > (int) sizeof (buffer) - 1) { longjmp (html->main, -1); } if (escape) puts_escape (html, buffer); else puts (html, buffer); } static void puts_color (html_instance * html, const char * label, vbi3_rgba color) { puts_printf (html, FALSE, "%s#%02x%02x%02x", label, VBI3_R (color), VBI3_G (color), VBI3_B (color)); } static void attr (html_instance * html, const vbi3_page * pg, const vbi3_char * ac) { const vbi3_char *body; unsigned int ct = 0; body = &((style *) html->style.buffer)->ac; if (ac->foreground != body->foreground) { puts_color (html, "color:", pg->color_map[ac->foreground]); ct = 1; } if (ac->background != body->background) { if (ct) puts (html, ";"); ct = 1; puts_color (html, "background-color:", pg->color_map[ac->background]); } if (ac->attr & VBI3_UNDERLINE) { if (ct) puts (html, ";"); ct = 1; puts (html, "text-decoration:underline"); } if (ac->attr & VBI3_BOLD) { if (ct) puts (html, ";"); ct = 1; puts (html, "font-weight:bold"); } if (ac->attr & VBI3_ITALIC) { if (ct) puts (html, ";"); ct = 1; puts (html, "font-style:italic"); } if (ac->attr & VBI3_FLASH) { if (ct) puts (html, ";"); ct = 1; puts (html, "text-decoration:blink"); } } static void flush (html_instance * html) { size_t n; ssize_t r; n = html->text.bp - html->text.buffer; r = fwrite (html->text.buffer, 1, n, html->export.fp); if ((ssize_t) n != r) { _vbi3_export_write_error (&html->export); longjmp (html->main, -1); } html->text.bp = html->text.buffer; } static __inline__ vbi3_bool same_style (const vbi3_char * ac1, const vbi3_char * ac2) { if (ac1->background != ac2->background || ((ac1->attr ^ ac2->attr) & VBI3_UNDERLINE)) return FALSE; if (0x0020 == ac1->unicode) return TRUE; if (ac1->foreground != ac2->foreground || ((ac1->attr ^ ac2->attr) & (VBI3_BOLD | VBI3_ITALIC | VBI3_FLASH))) return FALSE; return TRUE; } static void style_gen (html_instance * html, vbi3_page * dpg, const vbi3_page * spg, vbi3_bool conceal) { vbi3_char *dp; vbi3_char *dend; const vbi3_char *sp; style *s; style *s0; unsigned int size; size = spg->rows * spg->columns; dend = dpg->text + size; sp = spg->text + size - 1; for (dp = dend - 1; dp >= dpg->text; --sp, --dp) { *dp = *sp; if (((dp->attr & VBI3_CONCEAL) && conceal) || dp->size > VBI3_DOUBLE_SIZE) { dp->unicode = 0x0020; dp->attr &= ~(VBI3_LINK | VBI3_PDC); } if (0x0020 == dp->unicode || 0x00A0 == dp->unicode) { dp->unicode = 0x0020; /* When the character is a space we can merge foreground and text style changes with an earlier background change. */ if (dp + 1 < dend && !((dp->attr ^ dp[1].attr) & VBI3_UNDERLINE) && dp->background == dp[1].background) { COPY_SET_MASK (dp->attr, dp[1].attr, VBI3_BOLD | VBI3_ITALIC | VBI3_FLASH); dp->foreground = dp[1].foreground; } } } /* Body style. */ if (!html->style.buffer) extend (html, &html->style, 32, sizeof (style)); s = (style *) html->style.buffer; CLEAR (s->ac); s->ac.foreground = VBI3_WHITE; s->ac.background = spg->screen_color; s->id = 0; html->style.bp = (char *)(s + 1); if (!html->header) return; /* Text style. */ for (dp = dpg->text; dp < dend; ++dp) { s0 = s; do { if (same_style (dp, &s->ac)) { ++s->ref; goto next; } if (++s >= (style *) html->style.bp) s = (style *) html->style.buffer; } while (s != s0); if (html->style.bp >= html->style.end) extend (html, &html->style, 32, sizeof (style)); s = (style *) html->style.bp; html->style.bp += sizeof (style); s->ac = *dp; s->id = s - (style *) html->style.buffer; s->ref = 1; next: ; } } static void title (html_instance * html, const vbi3_page * pg) { if (pg->pgno < 0x100) { puts (html, ""); } else { /* TRANSLATORS: lang=\"en\" refers to the page title "Teletext Page ...". Please specify "de", "fr", "es" etc. */ puts (html, _("<title lang=\"en\">")); } if (html->export.network) { puts_escape (html, html->export.network); putwc (html, ' ', FALSE); } if (pg->pgno < 0x100) { puts (html, "Closed Caption"); } else if (pg->subno && pg->subno != VBI3_ANY_SUBNO) { puts_printf (html, TRUE, _("Teletext Page %3x.%x"), pg->pgno, pg->subno); } else { puts_printf (html, TRUE, _("Teletext Page %3x"), pg->pgno); } puts (html, "\n"); } static void header (html_instance * html, const vbi3_page * pg) { static const vbi3_character_set *cs; const char *lang; const char *dir; cs = vbi3_page_get_character_set (pg, 0); if (!cs || !cs->language_code[0]) { lang = "en"; dir = NULL; } else { /* Could we guess [0, 1, 2] from network ID? */ lang = cs->language_code[0]; dir = NULL; /* Hebrew, Arabic visually ordered */ } puts (html, "\n" "\n" "\n" "export.creator); puts (html, "\">\n" "\n"); if (html->color) { style *s; puts (html, "\n"); } title (html, pg); puts (html, "\n\n"); } static const style * span_start (html_instance * html, const vbi3_page * pg, const vbi3_char * acp, const style * s0) { const style *s; if (!html->header) goto inline_style; s = s0; while (!same_style (acp, &s->ac)) { if (++s >= (style *) html->style.bp) s = (style *) html->style.buffer; if (s == s0) goto inline_style; } if (s->id > 0) { if (1 == s->ref) goto inline_style; puts_printf (html, FALSE, "", s->id); html->in_span = TRUE; } /* else body style */ html->cac = s->ac; return (const style *) html->style.buffer; return s; inline_style: html->cac = *acp; puts (html, "cac); puts (html, "\">"); html->in_span = TRUE; return (const style *) html->style.buffer; } static void link_end (html_instance * html, vbi3_bool pdc) { vbi3_bool success; putwc (html, 0, FALSE); if (pdc) { success = html->export.pdc_callback (&html->export, html->export.pdc_user_data, html->export.fp, html->pdc, html->text.buffer); html->in_pdc_link = FALSE; } else { html->link.name = html->text.buffer; success = html->export.link_callback (&html->export, html->export.link_user_data, html->export.fp, &html->link); html->link.name = NULL; html->in_hyperlink = FALSE; } html->text.bp = html->text.buffer; if (!success) longjmp (html->main, -1); } static vbi3_bool export (vbi3_export * e, const vbi3_page * pg) { html_instance *html = PARENT(e, html_instance, export); vbi3_page page; vbi3_char *acp; vbi3_char *acpend; const style *s; unsigned int row; unsigned int column; if (setjmp (html->main)) { return FALSE; } style_gen (html, &page, pg, !e->reveal); html->text.bp = html->text.buffer; if (html->header) header (html, pg); puts (html, "
");

	s = (style *) html->style.buffer;

	html->cac = s->ac;

	html->in_span = FALSE;
	html->in_hyperlink = FALSE;
	html->in_pdc_link = FALSE;

	row = 0;
	column = 0;

	acpend = page.text + pg->rows * pg->columns;

	for (acp = page.text; acp < acpend; ++acp) {
		if ((!!(acp->attr & VBI3_LINK)) != html->in_hyperlink
		    && e->link_callback) {
			if (html->in_span) {
				puts (html, "");
				html->cac = ((style *) html->style.buffer)->ac;
				html->in_span = FALSE;
			}

			if (html->in_hyperlink)
				link_end (html, FALSE);

			if (acp->attr & VBI3_LINK) {
				vbi3_bool r;

				vbi3_link_destroy (&html->link);

				r = vbi3_page_get_hyperlink (pg, &html->link,
							    column, row);

				flush (html);

				html->in_hyperlink = r;
			}
		}

		if ((!!(acp->attr & VBI3_PDC)) != html->in_pdc_link
		    && e->pdc_callback) {
			if (html->in_span) {
				puts (html, "");
				html->cac = ((style *) html->style.buffer)->ac;
				html->in_span = FALSE;
			}

			if (html->in_pdc_link)
				link_end (html, TRUE);

			if (acp->attr & VBI3_PDC) {
				html->pdc = vbi3_page_get_pdc_link
					(pg, column, row);

				flush (html);

				if (html->pdc)
					html->in_pdc_link = TRUE;
			}
		}

		if (html->color && !same_style (acp, &html->cac)) {
			if (html->in_span) {
				puts (html, "");
				html->in_span = FALSE;
			}

			s = span_start (html, pg, acp, s);
		}

		if (vbi3_is_print (acp->unicode)) {
			putwc (html, acp->unicode, TRUE);
		} else if (vbi3_is_gfx (acp->unicode)) {
			if (html->ascii_art) {
				unsigned int c;

				c = _vbi3_teletext_ascii_art (acp->unicode);

				if (vbi3_is_print (c))
					putwc (html, c, TRUE);
				else
					putwc (html, html->gfx_chr, TRUE);
			} else {
				putwc (html, html->gfx_chr, TRUE);
			}
		} else {
			putwc (html, 0x0020, FALSE);
		}

		if (++column == pg->columns) {
			if (html->text.bp > html->text.buffer
			    && 0x20 == html->text.bp[-1]) {
				--html->text.bp;
				puts (html, " \n"); 
			} else {
				puts (html, "\n");
			}

			column = 0;
			++row;
		}
	}

	if (html->in_span)
		puts (html, "");

	if (html->in_hyperlink)
		link_end (html, FALSE);

	if (html->in_pdc_link)
		link_end (html, TRUE);

	puts (html, "
\n"); if (html->header) puts (html, "\n\n"); flush (html); return TRUE; } static const vbi3_export_info export_info = { .keyword = "html", .label = N_("HTML"), .tooltip = N_("Export this page as HTML page"), .mime_type = "text/html", .extension = "html,htm", }; const _vbi3_export_module _vbi3_export_module_html = { .export_info = &export_info, ._new = html_new, ._delete = html_delete, .option_info = option_info, .option_info_size = N_ELEMENTS (option_info), .option_get = option_get, .option_set = option_set, .export = export }; zapping-0.10cvs6/libvbi/bcd.c 644 764 144 7072 10370717575 11172 /* * libzvbi - BCD arithmetic for Teletext page numbers * * Copyright (C) 2001-2003 Michael H. Schimek * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* $Id: bcd.c,v 1.4 2006/02/03 18:22:53 mschimek Exp $ */ #include "bcd.h" #include "misc.h" /* unlikely() */ /** * @addtogroup BCD BCD arithmetic for Teletext page numbers * @ingroup Service * * Teletext page numbers are expressed as packed binary coded decimal * numbers in range 0x100 to 0x8FF. The packed bcd format encodes one * decimal digit in every hex nibble (four bits) of the number. Page * numbers containing digits 0xA to 0xF are reserved for various * system purposes and not intended for display. * * BCD numbers are stored in int types. Negative BCDs are expressed * as ten's complement, for example -1 as 0xF999 9999, assumed * sizeof(int) is four. Their precision as signed packed bcd value * is VBI3_BCD_MIN .. VBI3_BCD_MAX, as two's complement * binary VBI3_BCD_BIN_MIN ... VBI3_BCD_BIN_MAX. That is -10 ** n ... * (10 ** n) - 1, where n = 2 * sizeof(int) - 1. */ /** * @ingroup BCD * @param bin Binary number. * * Converts a two's complement binary to a signed packed bcd value. * The argument @a bin must be in range VBI3_BCD_BIN_MIN ... * VBI3_BCD_BIN_MAX. Other values yield an undefined result. * * @return * BCD number. */ int vbi3_bin2bcd (int bin) { int t = 0; /* XXX might try x87 bcd for large values. */ /* Teletext page numbers are unsigned. */ if (unlikely (bin < 0)) { t |= VBI3_BCD_MIN; bin += -VBI3_BCD_BIN_MIN; } /* Most common case 2-4 digits, as in Teletext page and subpage numbers. */ t += (bin % 10) << 0; bin /= 10; t += (bin % 10) << 4; bin /= 10; t += (bin % 10) << 8; bin /= 10; t += (bin % 10) << 12; if (unlikely (bin >= 10)) { unsigned int i; for (i = 16; i < sizeof (int) * 8; i += 4) { bin /= 10; t += (bin % 10) << i; } } return t; } /** * @ingroup BCD * @param bcd BCD number. * * Converts a signed packed bcd to a two's complement binary value. * * @return * Binary number. The result is undefined when the bcd number * contains hex digits 0xA ... 0xF, except for the sign nibble. */ int vbi3_bcd2bin (int bcd) { int s; int t; s = bcd; /* Teletext page numbers are unsigned. */ if (unlikely (bcd < 0)) { /* Cannot negate minimum. */ if (unlikely (VBI3_BCD_MIN == bcd)) return VBI3_BCD_BIN_MIN; bcd = vbi3_neg_bcd (bcd); } /* Most common case 2-4 digits, as in Teletext page and subpage numbers. */ t = (bcd & 15) * 1; bcd >>= 4; t += (bcd & 15) * 10; bcd >>= 4; t += (bcd & 15) * 100; bcd >>= 4; t += (bcd & 15) * 1000; if (unlikely (bcd & -16)) { unsigned int u; unsigned int i; u = (bcd >> (sizeof (int) * 8 - 5 * 4)) & 15; for (i = sizeof (int) * 8 - 6 * 4; i >= 4; i -= 4) u = u * 10 + ((bcd >> i) & 15); t += u * 10000; } /* Teletext page numbers are unsigned. */ if (unlikely (s < 0)) t = -t; return t; } zapping-0.10cvs6/libvbi/bcd.h 644 764 144 14370 10370717752 11213 /* * libzvbi - BCD arithmetic for Teletext page numbers * * Copyright (C) 2001, 2002, 2003 Michael H. Schimek * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* $Id: bcd.h,v 1.6 2006/02/03 18:24:42 mschimek Exp $ */ #ifndef __ZVBI3_BCD_H__ #define __ZVBI3_BCD_H__ #include "macros.h" VBI3_BEGIN_DECLS #ifndef DOXYGEN_SHOULD_IGNORE_THIS #define _VBI3_BCD_10 (((int) 0x1111111111111111LL) << 4) #define _VBI3_BCD_06 (((int) 0x6666666666666666LL) >> 4) #endif /** * @addtogroup BCD * @{ */ #define VBI3_BCD_MIN (0xF << (sizeof (int) * 8 - 4)) #define VBI3_BCD_MAX (VBI3_BCD_MIN ^ ~_VBI3_BCD_06) #define VBI3_BCD_BIN_MAX /* FEDCBA9876543210 F6543210 */ \ ((8 == sizeof (int)) ? 999999999999999LL : 9999999) #define VBI3_BCD_BIN_MIN ((-VBI3_BCD_BIN_MAX) - 1) extern int vbi3_bin2bcd (int bin) __attribute__ ((const)); extern int vbi3_bcd2bin (int bcd) __attribute__ ((const)); /** * @param a BCD number. * @param b BCD number. * * Adds two signed packed bcd numbers, returning a signed packed bcd sum. * * @return * BCD number. The result is undefined when any of the arguments * contain hex digits 0xA ... 0xF, except for the sign nibble. */ vbi3_inline int vbi3_add_bcd (int a, int b) { int t = a + (b += _VBI3_BCD_06); a = ((~(b ^ a ^ t) & _VBI3_BCD_10) >> 3) * 3; return t - a; } /** * @param bcd BCD number. * * Calculates the ten's complement of a signed packed bcd. The most * significant nibble is the sign, e.g. 0xF999 9999 = vbi3_neg_bcd * (0x0000 00001), presumed sizeof(int) is 4. * * @return * BCD number. The result is undefined when any of the arguments * contain hex digits 0xA ... 0xF, except for the sign nibble. * * Note the ten's complement of VBI3_BCD_MIN is not representable * as signed packed bcd, this function will return VBI3_BCD_MAX + 1 * (0x1000 0000) instead. */ vbi3_inline int vbi3_neg_bcd (int bcd) { int t = -bcd; return t - (((bcd ^ t) & _VBI3_BCD_10) >> 3) * 3; } /** * @param a BCD number. * @param b BCD number. * * Subtracts two signed packed bcd numbers, returning a - b. The result * may be negative (ten's complement), see vbi3_neg_bcd(). * * @return * BCD number. The result is undefined when any of the arguments * contain hex digits 0xA ... 0xF, except for the sign nibble. */ vbi3_inline int vbi3_sub_bcd (int a, int b) { return vbi3_add_bcd (a, vbi3_neg_bcd (b)); } /** * @param bcd BCD number. * * Tests if @a bcd forms a valid signed packed bcd number. * * @return * @c FALSE if @a bcd contains hex digits 0xA ... 0xF, ignoring * the four most significant bits i.e. the sign nibble. */ vbi3_inline vbi3_bool vbi3_is_bcd (int bcd) { bcd &= ~VBI3_BCD_MIN; return 0 == (((bcd + _VBI3_BCD_06) ^ bcd ^ _VBI3_BCD_06) & _VBI3_BCD_10); } /** * @param bcd Unsigned BCD number. * @param maximum Unsigned maximum value. * * Compares an unsigned packed bcd number digit-wise against a maximum * value, for example 0x295959. The function takes about six instructions. * @a maximum can contain digits 0x0 ... 0xF. * * @return * @c TRUE if any digit of @a bcd is greater than the * corresponding digit of @a maximum. */ vbi3_inline vbi3_bool vbi3_bcd_digits_greater (unsigned int bcd, unsigned int maximum) { maximum ^= ~0; return 0 != (((bcd + maximum) ^ bcd ^ maximum) & _VBI3_BCD_10); } /** @} */ /** * @addtogroup Service * @{ */ /** * Teletext or Closed Caption page number. For Teletext pages * this is a bcd number in range 0x100 ... 0x8FF. Page numbers * containing digits 0xA to 0xF are reserved for various system * purposes, these pages are not intended for display. * * Closed Caption page numbers between 1 ... 8 correspond * to the four Caption and Text channels: * * * * * * * * * *
1Caption 1 * "Primary synchronous caption service [English]"
2Caption 2 * "Special non-synchronous data that is intended to * augment information carried in the program"
3Caption 3 * "Secondary synchronous caption service, usually * second language [Spanish, French]"
4Caption 4 * "Special non-synchronous data similar to Caption 2"
5Text 1 * "First text service, data usually not program related"
6Text 2 * "Second text service, additional data usually not program related * [ITV data]"
7Text 3 * "Additional text channel"
8Text 4 * "Additional text channel"
*/ typedef int vbi3_pgno; /* XXX document me */ #define VBI3_CAPTION_CC1 1 #define VBI3_CAPTION_CC2 2 #define VBI3_CAPTION_CC3 3 #define VBI3_CAPTION_CC4 4 #define VBI3_CAPTION_T1 5 #define VBI3_CAPTION_T2 6 #define VBI3_CAPTION_T3 7 #define VBI3_CAPTION_T4 8 /** * This is the subpage number only applicable to Teletext pages, * a BCD number in range 0x01 ... 0x79. Pages without subpages * have subpage number 0x00. * * On special 'clock' pages (for example listing the current time * in different time zones) it can assume values between 0x0000 ... * 0x2359 expressing local time (EN 300 706, Section E.2). These are * not actually subpages. * * Finally the non-BCD value 0x3F7F is possible, symbolic * @c VBI3_ANY_SUBNO and @c VBI3_NO_SUBNO depending on context. */ typedef int vbi3_subno; /* Magic constants from EN 300 706. */ #define VBI3_ANY_SUBNO ((vbi3_subno) 0x3F7F) #define VBI3_NO_SUBNO ((vbi3_subno) 0x3F7F) /** @} */ VBI3_END_DECLS #endif /* __ZVBI3_BCD_H__ */ zapping-0.10cvs6/libvbi/dlist.h 644 764 144 14540 10360121113 11554 /* * libzvbi - Double linked wheel, reinvented * * Copyright (C) 2004 Michael H. Schimek * * Based on code from AleVT 1.5.1 * Copyright (C) 1998, 1999 Edgar Toernig * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* $Id: dlist.h,v 1.5 2006/01/08 05:25:31 mschimek Exp $ */ #ifndef DLIST_H #define DLIST_H #include #include "macros.h" #include "misc.h" #ifndef DLIST_CONSISTENCY # define DLIST_CONSISTENCY 0 #endif typedef struct node node; struct node { node * _succ; node * _pred; }; vbi3_inline void verify_ring (const node * n) { unsigned int counter; const node *start; if (!DLIST_CONSISTENCY) return; start = n; counter = 0; do { const node *_succ = n->_succ; assert (counter++ < 30000); assert (n == _succ->_pred); n = _succ; } while (n != start); } vbi3_inline node * _remove_nodes (node * before, node * after, node * first, node * last, vbi3_bool close_ring, vbi3_bool return_ring) { verify_ring (before); if (close_ring) { before->_succ = after; after->_pred = before; } else { before->_succ = NULL; after->_pred = NULL; } if (return_ring) { first->_pred = last; last->_succ = first; } else { first->_pred = NULL; last->_succ = NULL; } return first; } vbi3_inline node * _insert_nodes (node * before, node * after, node * first, node * last) { verify_ring (before); first->_pred = before; last->_succ = after; after->_pred = last; before->_succ = first; return first; } /** * @internal * Adds node n to a list or ring after node a. */ vbi3_inline node * insert_after (node * a, node * n) { return _insert_nodes (a, a->_succ, n, n); } /** * @internal * Adds node n to a list or ring before node b. */ vbi3_inline node * insert_before (node * b, node * n) { return _insert_nodes (b->_pred, b, n, n); } /** * @internal * Removes node n from its list or ring. */ vbi3_inline node * unlink_node (node * n) { return _remove_nodes (n->_pred, n->_succ, n, n, TRUE, FALSE); } typedef struct node list; /** * @internal * * Traverses a list. p points to the parent structure of a node. p1 is * a pointer of same type as p, used to remember the _succ node in the * list. This permits unlink_node(p) in the loop. Resist the temptation * to unlink p->_succ or p->_pred. l points to the list to traverse. * _node is the name of the node element. Example: * * struct mystruct { node foo; int bar; }; * * list mylist; // assumed initialized * struct mystruct *p, *p1; * * FOR_ALL_NODES (p, p1, &mylist, foo) * do_something (p); */ #define FOR_ALL_NODES(p, p1, l, _node) \ for (verify_ring (l), p = PARENT ((l)->_succ, __typeof__ (* p), _node); \ p1 = PARENT (p->_node._succ, __typeof__ (* p), _node), \ &p->_node != (l); p = p1) #define FOR_ALL_NODES_REVERSE(p, p1, l, _node) \ for (verify_ring (l), p = PARENT ((l)->_pred, __typeof__ (* p), _node); \ p1 = PARENT (p->_node._pred, __typeof__ (* p), _node), \ &p->_node != (l); p = p1) /** * @internal * Destroys list l (not its nodes). */ vbi3_inline list * list_destroy (list * l) { return _remove_nodes (l->_pred, l->_succ, l, l, FALSE, FALSE); } /** * @internal * Initializes list l. */ vbi3_inline list * list_init (list * l) { l->_succ = l; l->_pred = l; return l; } /** * @internal * TRUE if node n is at head of list l. */ vbi3_inline vbi3_bool is_head (const list * l, const node * n) { verify_ring (l); return (n == l->_succ); } /** * @internal * TRUE if node n is at tail of list l. */ vbi3_inline vbi3_bool is_tail (const list * l, const node * n) { verify_ring (l); return (n == l->_pred); } /** * @internal * TRUE if list l is empty. */ vbi3_inline int is_empty (const list * l) { return is_head (l, l); } /** * @internal * TRUE if node n is a member of list l. */ vbi3_inline vbi3_bool is_member (const list * l, const node * n) { const node *q; verify_ring (l); for (q = l->_succ; q != l; q = q->_succ) { if (unlikely (q == n)) { return TRUE; } } return FALSE; } /** * @internal * Adds node n at begin of list l. */ vbi3_inline node * add_head (list * l, node * n) { return _insert_nodes (l, l->_succ, n, n); } /** * @internal * Adds node n at end of list l. */ vbi3_inline node * add_tail (list * l, node * n) { return _insert_nodes (l->_pred, l, n, n); } /** * @internal * Removes all nodes from list l2 and adds them at end of list l1. */ vbi3_inline node * add_tail_list (list * l1, list * l2) { node *h2 = l2->_succ; verify_ring (l2); if (unlikely (l2 == h2)) { return NULL; } _insert_nodes (l1->_pred, l1, h2, l2->_pred); l2->_succ = l2; l2->_pred = l2; return h2; } /** * @internal * Removes node n if member of list l. */ vbi3_inline node * rem_node (list * l, node * n) { if (is_member (l, n)) { return unlink_node (n); } else { return NULL; } } /** * @internal * Removes first node of list l, returns NULL if empty list. */ vbi3_inline node * rem_head (list * l) { node *n = l->_succ; if (likely (n != l)) { return _remove_nodes (l, n->_succ, n, n, TRUE, FALSE); } else { return NULL; } } /** * @internal * Removes last node of list l, returns NULL if empty list. */ vbi3_inline node * rem_tail (list * l) { node *n = l->_pred; if (likely (n != l)) { return _remove_nodes (n->_pred, l, n, n, TRUE, FALSE); } else { return NULL; } } /** * @internal * Returns number of nodes in list l. */ vbi3_inline unsigned int list_length (list * l) { unsigned int count = 0; node *n; verify_ring (l); for (n = l->_succ; n != l; n = n->_succ) ++count; return count; } #endif /* DLIST_H */ zapping-0.10cvs6/libvbi/pdc.h 644 764 144 20052 10177355304 11217 /* * libzvbi - Program Delivery Control * * Copyright (C) 2000, 2001, 2002, 2003, 2004 Michael H. Schimek * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. * * 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 this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* $Id: pdc.h,v 1.3 2005/01/31 07:14:12 mschimek Exp $ */ #ifndef __ZVBI3_PDC_H__ #define __ZVBI3_PDC_H__ #include /* uint8_t */ #include /* FILE */ #include /* time_t */ #include "macros.h" #include "network.h" /* vbi3_cni_type */ VBI3_BEGIN_DECLS /** * @addtogroup ProgramID * @{ */ /** @brief PDC Programme Identification Label. */ typedef unsigned int vbi3_pil; /** * @brief Macro to create a PDC PIL. * Note month and day start at 1. */ #define VBI3_PIL(month, day, hour, minute) \ (((day) << 15) | ((month) << 11) | ((hour) << 6) | (minute)) #define VBI3_PIL_MONTH(pil) (((pil) >> 11) & 15) /**< 1 ... 12 */ #define VBI3_PIL_DAY(pil) ((pil) >> 15) /**< 1 ... 31 */ #define VBI3_PIL_HOUR(pil) (((pil) >> 6) & 31) /**< 0 ... 23 */ #define VBI3_PIL_MINUTE(pil) ((pil) & 63) /**< 0 ... 59 */ /** * @brief PDC PIL Service Codes. */ enum { /** No program ID available, use timer to record. */ VBI3_PIL_TIMER_CONTROL = VBI3_PIL (15, 0, 31, 63), VBI3_PIL_INHIBIT_TERMINATE = VBI3_PIL (15, 0, 30, 63), VBI3_PIL_INTERRUPT = VBI3_PIL (15, 0, 29, 63), VBI3_PIL_CONTINUE = VBI3_PIL (15, 0, 28, 63), }; /* Private */ extern void _vbi3_pil_dump (vbi3_pil pil, FILE * fp); /** * A program identification can be transmitted on different logical * channels. The first four channels correspond to the Teletext Packet * 8/30 format 2 Label Channel Identifier. The remaining two identify * VPS and XDS as source. */ typedef enum { VBI3_PID_CHANNEL_LCI_0 = 0, VBI3_PID_CHANNEL_LCI_1, VBI3_PID_CHANNEL_LCI_2, VBI3_PID_CHANNEL_LCI_3, VBI3_PID_CHANNEL_VPS, VBI3_PID_CHANNEL_XDS } vbi3_pid_channel; /** * @brief PDC Programme Control Status, Audio. */ typedef enum { /** Nothing known about audio channels. */ VBI3_PCS_AUDIO_UNKNOWN = 0, /** Mono audio. */ VBI3_PCS_AUDIO_MONO, /** Stereo audio. */ VBI3_PCS_AUDIO_STEREO, /** Primary language on left channel, secondary on right. */ VBI3_PCS_AUDIO_BILINGUAL } vbi3_pcs_audio; /** * DOCUMENT ME */ typedef struct { /** * Network identifier type, one of VBI3_CNI_TYPE_UNKNOWN, * VBI3_CNI_TYPE_NONE, VBI3_CNI_TYPE_8302 or VBI3_CNI_TYPE_VPS. */ vbi3_cni_type cni_type; /** * Network identifier, valid if the source is Teletext packet * 8/30 format 2 or VPS. Note 8/30 CNIs may refer to other * networks. */ unsigned int cni; /** Source of this information. */ vbi3_pid_channel channel; /** * Month, day, hour and minute are the first announced starting * time of the program. * * month range 1 ... 12. */ unsigned int month; unsigned int day; /**< 1 ... 31 */ unsigned int hour; /**< 0 ... 23 */ unsigned int minute; /**< 0 ... 59 */ /** * PDC programme identification label, that is a packed * representation of the date above, or one of the * service codes. Will be VBI3_PIL_TIMER_CONTROL if no * program ID is available. */ vbi3_pil pil; /** * Duration of the program in minutes, zero if unknown. * XDS transmits this. */ unsigned int length; /** * PDC Label Update flag. When set this label is intented to * update VCR memory, it does not refer to the current program. */ vbi3_bool luf; /** * PDC Mode Identifier. When set labels are 30 seconds early, * such that a PID can be transmitted announcing the following * program before the current program ends. */ vbi3_bool mi; /** * PDC Prepare-to-Record flag. When set the program this label * refers to is about to start. A transition to cleared state * indicates the actual start of the program. */ vbi3_bool prf; /** PDC Program Control Status audio. */ vbi3_pcs_audio pcs_audio; /** PDC program type code, 0 or 0xFF if none or unknown. */ unsigned int pty; /** * XDS "program is tape delayed" flag, FALSE if unknown. */ vbi3_bool tape_delayed; } vbi3_program_id; extern void vbi3_program_id_destroy (vbi3_program_id * pid) __attribute__ ((_vbi3_nonnull (1))); extern void vbi3_program_id_init (vbi3_program_id * pid, vbi3_pid_channel channel) __attribute__ ((_vbi3_nonnull (1))); /* Private */ extern void _vbi3_program_id_dump (const vbi3_program_id * pid, FILE * fp) __attribute__ ((_vbi3_nonnull (1, 2))); /** * @brief VCR programming from Teletext. * This structure contains PDC data of a program selected * from a Teletext page. */ typedef struct { /** * Network identifier type, either VBI3_CNI_TYPE_PDC_A * or VBI3_CNI_TYPE_PDC_B. */ vbi3_cni_type cni_type; /** * Network identifier, always valid. Note Teletext pages * may list programs on other networks. */ unsigned int cni; /** * year, month, day, at1_hour and at1_minute is the * most recently announced starting time of a * program. * * year range: 2000+. */ unsigned int year; unsigned int month; /**< 1 ... 12 */ unsigned int day; /**< 1 ... 31 */ unsigned int at1_hour; /**< 0 ... 23 */ unsigned int at1_minute; /**< 0 ... 59 */ /** * at2_hour and at2_minute is the first announced * starting time of a program. This is what you want * to compare against vbi3_program_id hour and minute. * * at2_hour range: 0 .. 23. */ unsigned int at2_hour; unsigned int at2_minute; /**< 0 ... 59 */ /** * Duration of the program in minutes. */ unsigned int length; /** * Offset of local time from UTC in minutes. */ int lto; /** PDC program type code, 0 or 0xFF if none or unknown. */ unsigned int pty; /** * Conditional Access Flag. * TRUE if the program is encrypted, FALSE if clear or unknown. */ vbi3_bool caf; /** * Program title. Networks rarely identify the title * unambiguously. Expect incomplete titles and unrelated text. * * This is a NUL-terminated string in locale encoding. */ char * title; /** * @internal * Method A: position of AT-1 and up to three PTLs. * Method B: position of PTL; elements 0, 2, 3 unused. */ struct { uint8_t row; /**< 1 ... 23 */ uint8_t pad; uint8_t column_begin; /**< 0 ... 39 */ uint8_t column_end; /**< 0 ... 40 */ } _at1_ptl[4]; } vbi3_preselection; extern time_t vbi3_preselection_time (const vbi3_preselection *p) __attribute__ ((_vbi3_nonnull (1))); extern void vbi3_preselection_destroy (vbi3_preselection * p) __attribute__ ((_vbi3_nonnull (1))); extern vbi3_bool vbi3_preselection_copy (vbi3_preselection * dst, const vbi3_preselection *src) __attribute__ ((_vbi3_nonnull (1))); extern vbi3_bool vbi3_preselection_init (vbi3_preselection * p) __attribute__ ((_vbi3_nonnull (1))); /* Private */ extern void _vbi3_preselection_dump (const vbi3_preselection *p, FILE * fp) __attribute__ ((_vbi3_nonnull (1, 2))); extern void _vbi3_preselection_array_dump (const vbi3_preselection *p, unsigned int n_elements, FILE * fp) __attribute__ ((_vbi3_nonnull (1, 3))); extern void _vbi3_preselection_array_delete (vbi3_preselection * p, unsigned int n_elements); extern vbi3_preselection * _vbi3_preselection_array_dup (const vbi3_preselection *p, unsigned int n_elements) __attribute__ ((malloc)); extern vbi3_preselection * _vbi3_preselection_array_new (unsigned int n_elements) __attribute__ ((malloc)); extern unsigned int _vbi3_pdc_method_a (vbi3_preselection * table, unsigned int n_elements, const uint8_t lop_raw[26][40]) __attribute__ ((_vbi3_nonnull (1, 3))); /** @} */ VBI3_END_DECLS #endif /* __ZVBI3_PDC_H__ */ zapping-0.10cvs6/libvbi/ure.c 644 764 144 154335 10305455202 11262 /* * Copyright 1997, 1998, 1999 Computing Research Labs, * New Mexico State University * * Modifications and fixes for the Zapping 0.5 release by * Iaki Garca Etxebarrria * * Modifications by Michael H. Schimek * for libzvbi 0.1: Added character classes :gfx: and :drcs:, * commented surrogate expansion and IGNORE_NONSPACING * in ure_exec we don't need. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal in the Software without restriction, including without limitation * the rights to use, copy, modify, merge, publish, distribute, sublicense, * and/or sell copies of the Software, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL * THE COMPUTING RESEARCH LAB OR NEW MEXICO STATE UNIVERSITY BE LIABLE FOR ANY * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT * OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /* $Id: ure.c,v 1.5 2005/09/01 01:33:54 mschimek Exp $ */ #ifdef HAVE_CONFIG_H # include "config.h" #endif #include #include #include #include "macros.h" #include "misc.h" #if defined(HAVE_GLIBC21) #include #define unicode_isalnum(c) iswalnum((wint_t)(c)) #define unicode_isalpha(c) iswalpha((wint_t)(c)) #define unicode_iscntrl(c) iswcntrl((wint_t)(c)) #define unicode_isdigit(c) iswdigit((wint_t)(c)) #define unicode_isgraph(c) iswgraph((wint_t)(c)) #define unicode_islower(c) iswlower((wint_t)(c)) #define unicode_isprint(c) iswprint((wint_t)(c)) #define unicode_ispunct(c) iswpunct((wint_t)(c)) #define unicode_isspace(c) iswspace((wint_t)(c)) #define unicode_isupper(c) iswupper((wint_t)(c)) #define unicode_isxdigit(c) iswxdigit((wint_t)(c)) #define unicode_tolower(c) towlower((wint_t)(c)) #elif defined(HAVE_LIBUNICODE) #include #endif #if defined(HAVE_GLIBC21) || defined(HAVE_LIBUNICODE) #include "ure.h" /* * Set of character class flags. */ #define _URE_ALNUM (1<<0) #define _URE_ALPHA (1<<1) #define _URE_CNTRL (1<<2) #define _URE_DIGIT (1<<3) #define _URE_GRAPH (1<<4) #define _URE_LOWER (1<<5) #define _URE_PRINT (1<<6) #define _URE_PUNCT (1<<7) #define _URE_SPACE (1<<8) #define _URE_UPPER (1<<9) #define _URE_XDIGIT (1<<10) /* These are unused yet */ #define _URE_TITLE (1<<11) #define _URE_DEFINED (1<<12) #define _URE_WIDE (1<<13) #define _URE_NONSPACING (1<<14) #define _URE_SEPARATOR (1<<15) #define _URE_ZVBI3_GFX (1<<16) #define _URE_ZVBI3_DRCS (1<<17) /* * Flags used internally in the DFA. */ #define _URE_DFA_CASEFOLD 0x01 #define _URE_DFA_BLANKLINE 0x02 /* * Symbol types for the DFA. */ #define _URE_ANY_CHAR 1 #define _URE_CHAR 2 #define _URE_CCLASS 3 #define _URE_NCCLASS 4 #define _URE_BOL_ANCHOR 5 #define _URE_EOL_ANCHOR 6 /* * Op codes for converting the NFA to a DFA. */ #define _URE_SYMBOL 10 #define _URE_PAREN 11 #define _URE_QUEST 12 #define _URE_STAR 13 #define _URE_PLUS 14 #define _URE_ONE 15 #define _URE_AND 16 #define _URE_OR 17 #define _URE_NOOP 0xffff #define _URE_REGSTART 0x8000 #define _URE_REGEND 0x4000 /* * This routine takes a set of URE character property flags (see ure.h) along * with a character and tests to see if the character has one or more of those * properties. */ vbi3_inline int #ifdef __STDC__ _ure_matches_properties(unsigned long props, ucs4_t c) #else _ure_matches_properties(props, c) unsigned long props; ucs4_t c; #endif { if ((props & _URE_ALNUM) && (unicode_isalnum(c))) return 1; if ((props & _URE_ALPHA) && (unicode_isalpha(c))) return 1; if ((props & _URE_CNTRL) && (unicode_iscntrl(c))) return 1; if ((props & _URE_DIGIT) && (unicode_isdigit(c))) return 1; if ((props & _URE_GRAPH) && (unicode_isgraph(c))) return 1; if ((props & _URE_LOWER) && (unicode_islower(c))) return 1; if ((props & _URE_PRINT) && (unicode_isprint(c))) return 1; if ((props & _URE_PUNCT) && (unicode_ispunct(c))) return 1; if ((props & _URE_SPACE) && (unicode_isspace(c))) return 1; if ((props & _URE_UPPER) && (unicode_isupper(c))) return 1; if ((props & _URE_XDIGIT) && (unicode_isxdigit(c))) return 1; /* No such characters in libzvbi if ((props & _URE_TITLE) && (unicode_istitle(c))) return 1; if ((props & _URE_DEFINED) && (unicode_isdefined(c))) return 1; if ((props & _URE_WIDE) && (unicode_iswide(c))) return 1; if ((props & _URE_SEPARATOR)) { int type = unicode_type(c); if (type >= UNICODE_LINE_SEPARATOR) return 1; } if (props & _URE_NONSPACING) { int type = unicode_type(c); if (type < UNICODE_LINE_SEPARATOR) return 1; } */ if (props & _URE_NONSPACING) return 1; if (props & _URE_ZVBI3_GFX) { if (c >= 0xEE00 && c <= 0xEE7F) return 1; /* Teletext G1 Block Mosaic */ if (c >= 0xEF20 && c <= 0xEF7F) return 1; /* Teletext G3 Smooth Mosaic and Line Drawing */ } if ((props & _URE_ZVBI3_DRCS) && (c >= 0xF000 && c <= 0xF7FF)) return 1; /* Teletext DRCS */ return 0; } /* * Structure used to handle a compacted range of characters. */ typedef struct { ucs4_t min_code; ucs4_t max_code; } _ure_range_t; typedef struct { _ure_range_t *ranges; ucs2_t ranges_used; ucs2_t ranges_size; } _ure_ccl_t; typedef union { ucs4_t chr; _ure_ccl_t ccl; } _ure_sym_t; /* * This is a general element structure used for expressions and stack * elements. */ typedef struct { ucs2_t reg; ucs2_t onstack; ucs2_t type; ucs2_t lhs; ucs2_t rhs; } _ure_elt_t; /* * This is a structure used to track a list or a stack of states. */ typedef struct { ucs2_t *slist; ucs2_t slist_size; ucs2_t slist_used; } _ure_stlist_t; /* * Structure to track the list of unique states for a symbol * during reduction. */ typedef struct { ucs2_t id; ucs2_t type; unsigned long mods; unsigned long props; _ure_sym_t sym; _ure_stlist_t states; } _ure_symtab_t; /* * Structure to hold a single state. */ typedef struct { ucs2_t id; ucs2_t accepting; ucs2_t pad; _ure_stlist_t st; _ure_elt_t *trans; ucs2_t trans_size; ucs2_t trans_used; } _ure_state_t; /* * Structure used for keeping lists of states. */ typedef struct { _ure_state_t *states; ucs2_t states_size; ucs2_t states_used; } _ure_statetable_t; /* * Structure to track pairs of DFA states when equivalent states are * merged. */ typedef struct { ucs2_t l; ucs2_t r; } _ure_equiv_t; /* * Structure used for constructing the NFA and reducing to a minimal DFA. */ typedef struct _ure_buffer_t { int reducing; int error; unsigned long flags; _ure_stlist_t stack; /* * Table of unique symbols encountered. */ _ure_symtab_t *symtab; ucs2_t symtab_size; ucs2_t symtab_used; /* * Tracks the unique expressions generated for the NFA and when the NFA is * reduced. */ _ure_elt_t *expr; ucs2_t expr_used; ucs2_t expr_size; /* * The reduced table of unique groups of NFA states. */ _ure_statetable_t states; /* * Tracks states when equivalent states are merged. */ _ure_equiv_t *equiv; ucs2_t equiv_used; ucs2_t equiv_size; } _ure_buffer_t; typedef struct { ucs2_t symbol; ucs2_t next_state; } _ure_trans_t; typedef struct { ucs2_t accepting; ucs2_t ntrans; _ure_trans_t *trans; } _ure_dstate_t; typedef struct _ure_dfa_t { unsigned long flags; _ure_symtab_t *syms; ucs2_t nsyms; _ure_dstate_t *states; ucs2_t nstates; _ure_trans_t *trans; ucs2_t ntrans; } _ure_dfa_t; /************************************************************************* * * Functions. * *************************************************************************/ static void #ifdef __STDC__ _ure_push(ucs2_t v, _ure_buffer_t *b) #else _ure_push(v, b) ucs2_t v; _ure_buffer_t *b; #endif { _ure_stlist_t *s; if (b == 0) return; /* * If the `reducing' parameter is non-zero, check to see if the value * passed is already on the stack. */ if (b->reducing != 0 && b->expr[v].onstack != 0) return; s = &b->stack; if (s->slist_used == s->slist_size) { if (s->slist_size == 0) s->slist = (ucs2_t *) vbi3_malloc(sizeof(ucs2_t) << 3); else s->slist = (ucs2_t *) vbi3_realloc((char *) s->slist, sizeof(ucs2_t) * (s->slist_size + 8)); s->slist_size += 8; } s->slist[s->slist_used++] = v; /* * If the `reducing' parameter is non-zero, flag the element as being on * the stack. */ if (b->reducing != 0) b->expr[v].onstack = 1; } static ucs2_t #ifdef __STDC__ _ure_peek(_ure_buffer_t *b) #else _ure_peek(b) _ure_buffer_t *b; #endif { if (b == 0 || b->stack.slist_used == 0) return _URE_NOOP; return b->stack.slist[b->stack.slist_used - 1]; } static ucs2_t #ifdef __STDC__ _ure_pop(_ure_buffer_t *b) #else _ure_pop(b) _ure_buffer_t *b; #endif { ucs2_t v; if (b == 0 || b->stack.slist_used == 0) return _URE_NOOP; v = b->stack.slist[--b->stack.slist_used]; if (b->reducing) b->expr[v].onstack = 0; return v; } /************************************************************************* * * Start symbol parse functions. * *************************************************************************/ static unsigned long cclass_flags[] = { 0, _URE_ALNUM, _URE_ALPHA, _URE_CNTRL, _URE_DIGIT, _URE_GRAPH, _URE_LOWER, _URE_PRINT, _URE_PUNCT, _URE_SPACE, _URE_UPPER, _URE_XDIGIT, _URE_TITLE, _URE_DEFINED, _URE_WIDE, _URE_NONSPACING, _URE_ZVBI3_GFX, _URE_ZVBI3_DRCS }; /* * Parse a comma-separated list of integers that represent character * properties. Combine them into a mask that is returned in the `mask' * variable, and return the number of characters consumed. */ static unsigned long #ifdef __STDC__ _ure_prop_list(const ucs2_t *pp, unsigned long limit, unsigned long *mask, _ure_buffer_t *b) #else _ure_prop_list(pp, limit, mask, b) ucs2_t *pp; unsigned long limit, *mask; _ure_buffer_t *b; #endif { unsigned long n, m; const ucs2_t *sp, *ep; sp = pp; ep = sp + limit; for (m = n = 0; b->error == _URE_OK && sp < ep; sp++) { if (*sp == ',') { /* * Encountered a comma, so select the next character property flag * and reset the number. */ m |= cclass_flags[n]; n = 0; } else if (*sp >= '0' && *sp <= '9') /* * Encountered a digit, so start or continue building the cardinal * that represents the character property flag. */ n = (n * 10) + (*sp - '0'); else /* * Encountered something that is not part of the property list. * Indicate that we are done. */ break; /* * If a property number greater than 32 occurs, then there is a * problem. Most likely a missing comma separator. */ if (n > 32) b->error = _URE_INVALID_PROPERTY; } if (n != 0) m |= cclass_flags[n]; /* * Set the mask that represents the group of character properties. */ *mask = m; /* * Return the number of characters consumed. */ return sp - pp; } /* * Collect a hex number with 1 to 4 digits and return the number * of characters used. */ static unsigned long #ifdef __STDC__ _ure_hex(const ucs2_t *np, unsigned long limit, ucs4_t *n) #else _ure_hex(np, limit, n) ucs2_t *np; unsigned long limit; ucs4_t *n; #endif { ucs2_t i; const ucs2_t *sp, *ep; ucs4_t nn; sp = np; ep = sp + limit; for (nn = 0, i = 0; i < 4 && sp < ep; i++, sp++) { if (*sp >= '0' && *sp <= '9') nn = (nn << 4) + (*sp - '0'); else if (*sp >= 'A' && *sp <= 'F') nn = (nn << 4) + ((*sp - 'A') + 10); else if (*sp >= 'a' && *sp <= 'f') nn = (nn << 4) + ((*sp - 'a') + 10); else /* * Encountered something that is not a hex digit. */ break; } /* * Assign the character code collected and return the number of * characters used. */ *n = nn; return sp - np; } /* * Insert a range into a character class, removing duplicates and ordering * them in increasing range-start order. */ static void #ifdef __STDC__ _ure_add_range(_ure_ccl_t *ccl, _ure_range_t *r, _ure_buffer_t *b) #else _ure_add_range(ccl, r, b) _ure_ccl_t *ccl; _ure_range_t *r; _ure_buffer_t *b; #endif { ucs2_t i; ucs4_t tmp; _ure_range_t *rp; /* * If the `casefold' flag is set, then make sure both endpoints of the * range are converted to lower case. */ if (b->flags & _URE_DFA_CASEFOLD) { r->min_code = unicode_tolower(r->min_code); r->max_code = unicode_tolower(r->max_code); } /* * Swap the range endpoints if they are not in increasing order. */ if (r->min_code > r->max_code) { tmp = r->min_code; r->min_code = r->max_code; r->max_code = tmp; } for (i = 0, rp = ccl->ranges; i < ccl->ranges_used && r->min_code < rp->min_code; i++, rp++) ; /* * Check for a duplicate. */ if (i < ccl->ranges_used && r->min_code == rp->min_code && r->max_code == rp->max_code) return; if (ccl->ranges_used == ccl->ranges_size) { if (ccl->ranges_size == 0) ccl->ranges = (_ure_range_t *) vbi3_malloc(sizeof(_ure_range_t) << 3); else ccl->ranges = (_ure_range_t *) vbi3_realloc((char *) ccl->ranges, sizeof(_ure_range_t) * (ccl->ranges_size + 8)); ccl->ranges_size += 8; } rp = ccl->ranges + i; if (i < ccl->ranges_used) memmove((char *) (rp + 1), (char *) rp, sizeof(_ure_range_t) * (ccl->ranges_used - i)); ccl->ranges_used++; rp->min_code = r->min_code; rp->max_code = r->max_code; } typedef struct { ucs2_t key; unsigned long len; unsigned long next; unsigned long mask; } _ure_trie_t; static _ure_trie_t cclass_trie[] = { {':', 1, 1, 0}, /* 0 */ {'a', 10, 11, 0}, /* 1 a (0/10) */ {'c', 9, 20, 0}, /* 2 c (1/10) */ {'d', 8, 79, 0}, /* {'d', 8, 25, 0}, */ {'g', 7, 71, 0}, /* {'g', 7, 30, 0}, */ {'l', 6, 35, 0}, {'p', 5, 40, 0}, {'s', 4, 50, 0}, {'u', 3, 55, 0}, {'x', 2, 60, 0}, {'t', 1, 66, 0}, /* 10 t (9/10) */ {'l', 1, 12, 0}, /* 11 al (0/1) */ {'n', 2, 14, 0}, /* 12 aln (0/2) */ {'p', 1, 17, 0}, /* 13 alp (1/2) */ {'u', 1, 15, 0}, /* alnu */ {'m', 1, 16, 0}, /* alnum */ {':', 1, 17, _URE_ALNUM}, {'h', 1, 18, 0}, {'a', 1, 19, 0}, {':', 1, 20, _URE_ALPHA}, {'n', 1, 21, 0}, /* 20 <- cn */ {'t', 1, 22, 0}, {'r', 1, 23, 0}, {'l', 1, 24, 0}, {':', 1, 25, _URE_CNTRL}, {'i', 1, 26, 0}, {'g', 1, 27, 0}, {'i', 1, 28, 0}, {'t', 1, 29, 0}, {':', 1, 30, _URE_DIGIT}, {'r', 1, 31, 0}, {'a', 1, 32, 0}, {'p', 1, 33, 0}, {'h', 1, 34, 0}, {':', 1, 35, _URE_GRAPH}, {'o', 1, 36, 0}, {'w', 1, 37, 0}, {'e', 1, 38, 0}, {'r', 1, 39, 0}, {':', 1, 40, _URE_LOWER}, {'r', 2, 42, 0}, {'u', 1, 46, 0}, {'i', 1, 43, 0}, {'n', 1, 44, 0}, {'t', 1, 45, 0}, {':', 1, 46, _URE_PRINT}, {'n', 1, 47, 0}, {'c', 1, 48, 0}, {'t', 1, 49, 0}, {':', 1, 50, _URE_PUNCT}, {'p', 1, 51, 0}, {'a', 1, 52, 0}, {'c', 1, 53, 0}, {'e', 1, 54, 0}, {':', 1, 55, _URE_SPACE}, {'p', 1, 56, 0}, {'p', 1, 57, 0}, {'e', 1, 58, 0}, {'r', 1, 59, 0}, {':', 1, 60, _URE_UPPER}, {'d', 1, 61, 0}, {'i', 1, 62, 0}, {'g', 1, 63, 0}, {'i', 1, 64, 0}, {'t', 1, 65, 0}, {':', 1, 66, _URE_XDIGIT}, {'i', 1, 67, 0}, {'t', 1, 68, 0}, {'l', 1, 69, 0}, {'e', 1, 70, 0}, {':', 1, 71, _URE_TITLE}, /* mhs: duplicated, so I dont have to renumber everything */ {'f', 1, 77, 0}, {'r', 2, 73, 0}, {'a', 1, 74, 0}, {'p', 1, 75, 0}, {'h', 1, 76, 0}, {':', 1, 77, _URE_GRAPH}, {'x', 1, 78, 0}, {':', 1, 79, _URE_ZVBI3_GFX}, {'i', 2, 81, 0}, {'r', 1, 85, 0}, {'g', 1, 82, 0}, {'i', 1, 83, 0}, {'t', 1, 84, 0}, {':', 1, 85, _URE_DIGIT}, {'c', 1, 86, 0}, {'s', 1, 87, 0}, {':', 1, 88, _URE_ZVBI3_DRCS} }; /* * Probe for one of the POSIX colon delimited character classes in the static * trie. */ static unsigned long #ifdef __STDC__ _ure_posix_ccl(const ucs2_t *cp, unsigned long limit, _ure_symtab_t *sym) #else _ure_posix_ccl(cp, limit, sym) ucs2_t *cp; unsigned long limit; _ure_symtab_t *sym; #endif { int i; unsigned long n; _ure_trie_t *tp; const ucs2_t *sp, *ep; /* * If the number of characters left is less than 7, then this cannot be * interpreted as one of the colon delimited classes. */ if (limit < 7) return 0; sp = cp; ep = sp + limit; tp = cclass_trie; for (i = 0; sp < ep && i < 8; i++, sp++) { n = tp->len; for (; n > 0 && tp->key != *sp; tp++, n--) ; if (n == 0) return 0; if (*sp == ':' && (i == 6 || i == 7)) { sp++; break; } if (sp + 1 < ep) tp = cclass_trie + tp->next; } if (!tp->mask) return 0; sym->props |= tp->mask; return sp - cp; } /* * Construct a list of ranges and return the number of characters consumed. */ static unsigned long #ifdef __STDC__ _ure_cclass(const ucs2_t *cp, unsigned long limit, _ure_symtab_t *symp, _ure_buffer_t *b) #else _ure_cclass(cp, limit, symp, b) ucs2_t *cp; unsigned long limit; _ure_symtab_t *symp; _ure_buffer_t *b; #endif { int range_end; unsigned long n; const ucs2_t *sp, *ep; ucs4_t c, last; _ure_ccl_t *cclp; _ure_range_t range; sp = cp; ep = sp + limit; if (*sp == '^') { symp->type = _URE_NCCLASS; sp++; } else symp->type = _URE_CCLASS; for (last = 0, range_end = 0; b->error == _URE_OK && sp < ep && *sp != ']'; ) { c = *sp++; if (c == '\\') { if (sp == ep) { /* * The EOS was encountered when expecting the reverse solidus * to be followed by the character it is escaping. Set an * error code and return the number of characters consumed up * to this point. */ b->error = _URE_UNEXPECTED_EOS; return sp - cp; } c = *sp++; switch (c) { case 'a': c = 0x07; break; case 'b': c = 0x08; break; case 'f': c = 0x0c; break; case 'n': c = 0x0a; break; case 'r': c = 0x0d; break; case 't': c = 0x09; break; case 'v': c = 0x0b; break; case 'p': case 'P': sp += _ure_prop_list(sp, ep - sp, &symp->props, b); /* * Invert the bit mask of the properties if this is a negated * character class or if 'P' is used to specify a list of * character properties that should *not* match in a * character class. */ if (c == 'P') symp->props = ~symp->props; continue; break; case 'x': case 'X': case 'u': case 'U': if (sp < ep && ((*sp >= '0' && *sp <= '9') || (*sp >= 'A' && *sp <= 'F') || (*sp >= 'a' && *sp <= 'f'))) sp += _ure_hex(sp, ep - sp, &c); } } else if (c == ':') { /* * Probe for a POSIX colon delimited character class. */ sp--; if ((n = _ure_posix_ccl(sp, ep - sp, symp)) == 0) sp++; else { sp += n; continue; } } cclp = &symp->sym.ccl; /* * Check to see if the current character is a low surrogate that needs * to be combined with a preceding high surrogate. */ if (last != 0) { if (c >= 0xdc00 && c <= 0xdfff) /* * Construct the UTF16 character code. */ c = 0x10000 + (((last & 0x03ff) << 10) | (c & 0x03ff)); else { /* * Add the isolated high surrogate to the range. */ if (range_end == 1) range.max_code = last & 0xffff; else range.min_code = range.max_code = last & 0xffff; _ure_add_range(cclp, &range, b); range_end = 0; } } /* * Clear the last character code. */ last = 0; /* * This slightly awkward code handles the different cases needed to * construct a range. */ if (c >= 0xd800 && c <= 0xdbff) { /* * If the high surrogate is followed by a range indicator, simply * add it as the range start. Otherwise, save it in case the next * character is a low surrogate. */ if (*sp == '-') { sp++; range.min_code = c; range_end = 1; } else last = c; } else if (range_end == 1) { range.max_code = c; _ure_add_range(cclp, &range, b); range_end = 0; } else { range.min_code = range.max_code = c; if (*sp == '-') { sp++; range_end = 1; } else _ure_add_range(cclp, &range, b); } } if (sp < ep && *sp == ']') sp++; else /* * The parse was not terminated by the character class close symbol * (']'), so set an error code. */ b->error = _URE_CCLASS_OPEN; return sp - cp; } /* * Probe for a low surrogate hex code. */ static unsigned long #ifdef __STDC__ _ure_probe_ls(const ucs2_t *ls, unsigned long limit, ucs4_t *c) #else _ure_probe_ls(ls, limit, c) ucs2_t *ls; unsigned long limit; ucs4_t *c; #endif { ucs4_t i, code; const ucs2_t *sp, *ep; for (i = code = 0, sp = ls, ep = sp + limit; i < 4 && sp < ep; sp++) { if (*sp >= '0' && *sp <= '9') code = (code << 4) + (*sp - '0'); else if (*sp >= 'A' && *sp <= 'F') code = (code << 4) + ((*sp - 'A') + 10); else if (*sp >= 'a' && *sp <= 'f') code = (code << 4) + ((*sp - 'a') + 10); else break; } *c = code; return (0xdc00 <= code && code <= 0xdfff) ? sp - ls : 0; } static unsigned long #ifdef __STDC__ _ure_compile_symbol(const ucs2_t *sym, unsigned long limit, _ure_symtab_t *symp, _ure_buffer_t *b) #else _ure_compile_symbol(sym, limit, symp, b) const ucs2_t *sym; unsigned long limit; _ure_symtab_t *symp; _ure_buffer_t *b; #endif { ucs4_t c; const ucs2_t *sp, *ep; sp = sym; ep = sym + limit; if ((c = *sp++) == '\\') { if (sp == ep) { /* * The EOS was encountered when expecting the reverse solidus to * be followed by the character it is escaping. Set an error code * and return the number of characters consumed up to this point. */ b->error = _URE_UNEXPECTED_EOS; return sp - sym; } c = *sp++; switch (c) { case 'p': case 'P': symp->type = (c == 'p') ? _URE_CCLASS : _URE_NCCLASS; sp += _ure_prop_list(sp, ep - sp, &symp->props, b); break; case 'a': symp->type = _URE_CHAR; symp->sym.chr = 0x07; break; case 'b': symp->type = _URE_CHAR; symp->sym.chr = 0x08; break; case 'f': symp->type = _URE_CHAR; symp->sym.chr = 0x0c; break; case 'n': symp->type = _URE_CHAR; symp->sym.chr = 0x0a; break; case 'r': symp->type = _URE_CHAR; symp->sym.chr = 0x0d; break; case 't': symp->type = _URE_CHAR; symp->sym.chr = 0x09; break; case 'v': symp->type = _URE_CHAR; symp->sym.chr = 0x0b; break; case 'x': case 'X': case 'u': case 'U': /* * Collect between 1 and 4 digits representing a UCS2 code. Fall * through to the next case. */ if (sp < ep && ((*sp >= '0' && *sp <= '9') || (*sp >= 'A' && *sp <= 'F') || (*sp >= 'a' && *sp <= 'f'))) sp += _ure_hex(sp, ep - sp, &c); /* FALLTHROUGH */ default: /* * Simply add an escaped character here. */ symp->type = _URE_CHAR; symp->sym.chr = c; } } else if (c == '^' || c == '$') /* * Handle the BOL and EOL anchors. This actually consists simply of * setting a flag that indicates that the user supplied anchor match * function should be called. This needs to be done instead of simply * matching line/paragraph separators because beginning-of-text and * end-of-text tests are needed as well. */ symp->type = (c == '^') ? _URE_BOL_ANCHOR : _URE_EOL_ANCHOR; else if (c == '[') /* * Construct a character class. */ sp += _ure_cclass(sp, ep - sp, symp, b); else if (c == '.') symp->type = _URE_ANY_CHAR; else { symp->type = _URE_CHAR; symp->sym.chr = c; } /* * If the symbol type happens to be a character and is a high surrogate, * then probe forward to see if it is followed by a low surrogate that * needs to be added. */ if (sp < ep && symp->type == _URE_CHAR && 0xd800 <= symp->sym.chr && symp->sym.chr <= 0xdbff) { if (0xdc00 <= *sp && *sp <= 0xdfff) { symp->sym.chr = 0x10000 + (((symp->sym.chr & 0x03ff) << 10) | (*sp & 0x03ff)); sp++; } else if (*sp == '\\' && (*(sp + 1) == 'x' || *(sp + 1) == 'X' || *(sp + 1) == 'u' || *(sp + 1) == 'U')) { sp += _ure_probe_ls(sp + 2, ep - (sp + 2), &c); if (0xdc00 <= c && c <= 0xdfff) { /* * Take into account the \[xu] in front of the hex code. */ sp += 2; symp->sym.chr = 0x10000 + (((symp->sym.chr & 0x03ff) << 10) | (c & 0x03ff)); } } } /* * Last, make sure any _URE_CHAR type symbols are changed to lower case if * the `casefold' flag is set. */ if ((b->flags & _URE_DFA_CASEFOLD) && symp->type == _URE_CHAR) symp->sym.chr = unicode_tolower(symp->sym.chr); /* * If the symbol constructed is anything other than one of the anchors, * make sure the _URE_DFA_BLANKLINE flag is removed. */ if (symp->type != _URE_BOL_ANCHOR && symp->type != _URE_EOL_ANCHOR) b->flags &= ~_URE_DFA_BLANKLINE; /* * Return the number of characters consumed. */ return sp - sym; } static int #ifdef __STDC__ _ure_sym_neq(_ure_symtab_t *a, _ure_symtab_t *b) #else _ure_sym_neq(a, b) _ure_symtab_t *a, *b; #endif { if (a->type != b->type || a->mods != b->mods || a->props != b->props) return 1; if (a->type == _URE_CCLASS || a->type == _URE_NCCLASS) { if (a->sym.ccl.ranges_used != b->sym.ccl.ranges_used) return 1; if (a->sym.ccl.ranges_used > 0 && memcmp((char *) a->sym.ccl.ranges, (char *) b->sym.ccl.ranges, sizeof(_ure_range_t) * a->sym.ccl.ranges_used) != 0) return 1; } else if (a->type == _URE_CHAR && a->sym.chr != b->sym.chr) return 1; return 0; } /* * Construct a symbol, but only keep unique symbols. */ static ucs2_t #ifdef __stdc__ _ure_make_symbol(const ucs2_t *sym, unsigned long limit, unsigned long *consumed, _ure_buffer_t *b) #else _ure_make_symbol(sym, limit, consumed, b) const ucs2_t *sym; unsigned long limit, *consumed; _ure_buffer_t *b; #endif { ucs2_t i; _ure_symtab_t *sp, symbol; /* * Build the next symbol so we can test to see if it is already in the * symbol table. */ (void) memset((char *) &symbol, 0, sizeof(_ure_symtab_t)); *consumed = _ure_compile_symbol(sym, limit, &symbol, b); /* * Check to see if the symbol exists. */ for (i = 0, sp = b->symtab; i < b->symtab_used && _ure_sym_neq(&symbol, sp); i++, sp++) ; if (i < b->symtab_used) { /* * Free up any ranges used for the symbol. */ if ((symbol.type == _URE_CCLASS || symbol.type == _URE_NCCLASS) && symbol.sym.ccl.ranges_size > 0) vbi3_free((char *) symbol.sym.ccl.ranges); return b->symtab[i].id; } /* * Need to add the new symbol. */ if (b->symtab_used == b->symtab_size) { if (b->symtab_size == 0) b->symtab = (_ure_symtab_t *) vbi3_malloc(sizeof(_ure_symtab_t) << 3); else b->symtab = (_ure_symtab_t *) vbi3_realloc((char *) b->symtab, sizeof(_ure_symtab_t) * (b->symtab_size + 8)); sp = b->symtab + b->symtab_size; (void) memset((char *) sp, 0, sizeof(_ure_symtab_t) << 3); b->symtab_size += 8; } symbol.id = b->symtab_used++; (void) memcpy((char *) &b->symtab[symbol.id], (char *) &symbol, sizeof(_ure_symtab_t)); return symbol.id; } /************************************************************************* * * End symbol parse functions. * *************************************************************************/ static ucs2_t #ifdef __stdc__ _ure_make_expr(ucs2_t type, ucs2_t lhs, ucs2_t rhs, _ure_buffer_t *b) #else _ure_make_expr(type, lhs, rhs, b) ucs2_t type, lhs, rhs; _ure_buffer_t *b; #endif { ucs2_t i; if (b == 0) return _URE_NOOP; /* * Determine if the expression already exists or not. */ for (i = 0; i < b->expr_used; i++) { if (b->expr[i].type == type && b->expr[i].lhs == lhs && b->expr[i].rhs == rhs) break; } if (i < b->expr_used) return i; /* * Need to add a new expression. */ if (b->expr_used == b->expr_size) { if (b->expr_size == 0) b->expr = (_ure_elt_t *) vbi3_malloc(sizeof(_ure_elt_t) << 3); else b->expr = (_ure_elt_t *) vbi3_realloc((char *) b->expr, sizeof(_ure_elt_t) * (b->expr_size + 8)); b->expr_size += 8; } b->expr[b->expr_used].onstack = 0; b->expr[b->expr_used].type = type; b->expr[b->expr_used].lhs = lhs; b->expr[b->expr_used].rhs = rhs; return b->expr_used++; } static unsigned char spmap[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; #define _ure_isspecial(cc) ((cc) > 0x20 && (cc) < 0x7f && \ (spmap[(cc) >> 3] & (1 << ((cc) & 7)))) /* * Convert the regular expression into an NFA in a form that will be easy to * reduce to a DFA. The starting state for the reduction will be returned. */ static ucs2_t #ifdef __STDC__ _ure_re2nfa(const ucs2_t *re, unsigned long relen, _ure_buffer_t *b) #else _ure_re2nfa(re, relen, b) ucs2_t *re; unsigned long relen; _ure_buffer_t *b; #endif { ucs2_t c, state, top, sym, p; const ucs2_t *sp, *ep; unsigned long used; state = _URE_NOOP; sp = re; ep = sp + relen; while (b->error == _URE_OK && sp < ep) { c = *sp++; switch (c) { case '(': _ure_push(_URE_PAREN, b); break; case ')': /* * Check for the case of too many close parentheses. */ if (_ure_peek(b) == _URE_NOOP) { b->error = _URE_UNBALANCED_GROUP; break; } while ((top = _ure_peek(b)) == _URE_AND || top == _URE_OR) /* * Make an expression with the AND or OR operator and its right * hand side. */ { p = _ure_pop(b); state = _ure_make_expr(p, _ure_pop(b), state, b); } /* * Remove the _URE_PAREN off the stack. */ (void) _ure_pop(b); break; case '|': while ((top = _ure_peek(b)) == _URE_AND || top == _URE_OR) /* * Make an expression with the AND or OR operator and its right * hand side. */ { p = _ure_pop(b); state = _ure_make_expr(p, _ure_pop(b), state, b); } _ure_push(state, b); _ure_push(_URE_OR, b); break; case '*': /* If this is the first char, treat as escaped */ if (re+1 != sp) { state = _ure_make_expr(_URE_STAR, state, _URE_NOOP, b); break; } case '+': if (re+1 != sp) { state = _ure_make_expr(_URE_PLUS, state, _URE_NOOP, b); break; } case '?': if (re+1 != sp) { state = _ure_make_expr(_URE_QUEST, state, _URE_NOOP, b); break; } default: sp--; sym = _ure_make_symbol(sp, ep - sp, &used, b); sp += used; state = _ure_make_expr(_URE_SYMBOL, sym, _URE_NOOP, b); break; } if (c != '(' && c != '|' && sp < ep && (!_ure_isspecial(*sp) || *sp == '(')) { _ure_push(state, b); _ure_push(_URE_AND, b); } } while ((top = _ure_peek(b)) == _URE_AND || top == _URE_OR) /* * Make an expression with the AND or OR operator and its right * hand side. */ { p = _ure_pop(b); state = _ure_make_expr(p, _ure_pop(b), state, b); } if (b->stack.slist_used > 0) b->error = _URE_UNBALANCED_GROUP; return (b->error == _URE_OK) ? state : _URE_NOOP; } static void #ifdef __STDC__ _ure_add_symstate(ucs2_t sym, ucs2_t state, _ure_buffer_t *b) #else _ure_add_symstate(sym, state, b) ucs2_t sym, state; _ure_buffer_t *b; #endif { ucs2_t i, *stp; _ure_symtab_t *sp; /* * Locate the symbol in the symbol table so the state can be added. * If the symbol doesn't exist, then a real problem exists. */ for (i = 0, sp = b->symtab; i < b->symtab_used && sym != sp->id; i++, sp++) ; /* * Now find out if the state exists in the symbol's state list. */ for (i = 0, stp = sp->states.slist; i < sp->states.slist_used && state > *stp; i++, stp++) ; if (i == sp->states.slist_used || state < *stp) { /* * Need to add the state in order. */ if (sp->states.slist_used == sp->states.slist_size) { if (sp->states.slist_size == 0) sp->states.slist = (ucs2_t *) vbi3_malloc(sizeof(ucs2_t) << 3); else sp->states.slist = (ucs2_t *) vbi3_realloc((char *) sp->states.slist, sizeof(ucs2_t) * (sp->states.slist_size + 8)); sp->states.slist_size += 8; } if (i < sp->states.slist_used) (void) memmove((char *) (sp->states.slist + i + 1), (char *) (sp->states.slist + i), sizeof(ucs2_t) * (sp->states.slist_used - i)); sp->states.slist[i] = state; sp->states.slist_used++; } } static ucs2_t #ifdef __STDC__ _ure_add_state(ucs2_t nstates, ucs2_t *states, _ure_buffer_t *b) #else _ure_add_state(nstates, states, b) ucs2_t nstates, *states; _ure_buffer_t *b; #endif { ucs2_t i; _ure_state_t *sp; for (i = 0, sp = b->states.states; i < b->states.states_used; i++, sp++) { if (sp->st.slist_used == nstates && memcmp((char *) states, (char *) sp->st.slist, sizeof(ucs2_t) * nstates) == 0) break; } if (i == b->states.states_used) { /* * Need to add a new DFA state (set of NFA states). */ if (b->states.states_used == b->states.states_size) { if (b->states.states_size == 0) b->states.states = (_ure_state_t *) vbi3_malloc(sizeof(_ure_state_t) << 3); else b->states.states = (_ure_state_t *) vbi3_realloc((char *) b->states.states, sizeof(_ure_state_t) * (b->states.states_size + 8)); sp = b->states.states + b->states.states_size; (void) memset((char *) sp, 0, sizeof(_ure_state_t) << 3); b->states.states_size += 8; } sp = b->states.states + b->states.states_used++; sp->id = i; if (sp->st.slist_used + nstates > sp->st.slist_size) { if (sp->st.slist_size == 0) sp->st.slist = (ucs2_t *) vbi3_malloc(sizeof(ucs2_t) * (sp->st.slist_used + nstates)); else sp->st.slist = (ucs2_t *) vbi3_realloc((char *) sp->st.slist, sizeof(ucs2_t) * (sp->st.slist_used + nstates)); sp->st.slist_size = sp->st.slist_used + nstates; } sp->st.slist_used = nstates; (void) memcpy((char *) sp->st.slist, (char *) states, sizeof(ucs2_t) * nstates); } /* * Return the ID of the DFA state representing a group of NFA states. */ return i; } static void #ifdef __STDC__ _ure_reduce(ucs2_t start, _ure_buffer_t *b) #else _ure_reduce(start, b) ucs2_t start; _ure_buffer_t *b; #endif { ucs2_t i, j, state, eval, syms, rhs; ucs2_t s1, s2, ns1, ns2; _ure_state_t *sp; _ure_symtab_t *smp; b->reducing = 1; /* * Add the starting state for the reduction. */ _ure_add_state(1, &start, b); /* * Process each set of NFA states that get created. */ for (i = 0; i < b->states.states_used; i++) { sp = b->states.states + i; /* * Push the current states on the stack. */ for (j = 0; j < sp->st.slist_used; j++) _ure_push(sp->st.slist[j], b); /* * Reduce the NFA states. */ for (j = sp->accepting = syms = 0; j < b->stack.slist_used; j++) { state = b->stack.slist[j]; eval = 1; /* * This inner loop is the iterative equivalent of recursively * reducing subexpressions generated as a result of a reduction. */ while (eval) { switch (b->expr[state].type) { case _URE_SYMBOL: ns1 = _ure_make_expr(_URE_ONE, _URE_NOOP, _URE_NOOP, b); _ure_add_symstate(b->expr[state].lhs, ns1, b); syms++; eval = 0; break; case _URE_ONE: sp->accepting = 1; eval = 0; break; case _URE_QUEST: s1 = b->expr[state].lhs; ns1 = _ure_make_expr(_URE_ONE, _URE_NOOP, _URE_NOOP, b); state = _ure_make_expr(_URE_OR, ns1, s1, b); break; case _URE_PLUS: s1 = b->expr[state].lhs; ns1 = _ure_make_expr(_URE_STAR, s1, _URE_NOOP, b); state = _ure_make_expr(_URE_AND, s1, ns1, b); break; case _URE_STAR: s1 = b->expr[state].lhs; ns1 = _ure_make_expr(_URE_ONE, _URE_NOOP, _URE_NOOP, b); ns2 = _ure_make_expr(_URE_PLUS, s1, _URE_NOOP, b); state = _ure_make_expr(_URE_OR, ns1, ns2, b); break; case _URE_OR: s1 = b->expr[state].lhs; s2 = b->expr[state].rhs; _ure_push(s1, b); _ure_push(s2, b); eval = 0; break; case _URE_AND: s1 = b->expr[state].lhs; s2 = b->expr[state].rhs; switch (b->expr[s1].type) { case _URE_SYMBOL: _ure_add_symstate(b->expr[s1].lhs, s2, b); syms++; eval = 0; break; case _URE_ONE: state = s2; break; case _URE_QUEST: ns1 = b->expr[s1].lhs; ns2 = _ure_make_expr(_URE_AND, ns1, s2, b); state = _ure_make_expr(_URE_OR, s2, ns2, b); break; case _URE_PLUS: ns1 = b->expr[s1].lhs; ns2 = _ure_make_expr(_URE_OR, s2, state, b); state = _ure_make_expr(_URE_AND, ns1, ns2, b); break; case _URE_STAR: ns1 = b->expr[s1].lhs; ns2 = _ure_make_expr(_URE_AND, ns1, state, b); state = _ure_make_expr(_URE_OR, s2, ns2, b); break; case _URE_OR: ns1 = b->expr[s1].lhs; ns2 = b->expr[s1].rhs; ns1 = _ure_make_expr(_URE_AND, ns1, s2, b); ns2 = _ure_make_expr(_URE_AND, ns2, s2, b); state = _ure_make_expr(_URE_OR, ns1, ns2, b); break; case _URE_AND: ns1 = b->expr[s1].lhs; ns2 = b->expr[s1].rhs; ns2 = _ure_make_expr(_URE_AND, ns2, s2, b); state = _ure_make_expr(_URE_AND, ns1, ns2, b); break; } } } } /* * Clear the state stack. */ while (_ure_pop(b) != _URE_NOOP) ; /* * Reset the state pointer because the reduction may have moved it * during a reallocation. */ sp = b->states.states + i; /* * Generate the DFA states for the symbols collected during the * current reduction. */ if (sp->trans_used + syms > sp->trans_size) { if (sp->trans_size == 0) sp->trans = (_ure_elt_t *) vbi3_malloc(sizeof(_ure_elt_t) * (sp->trans_used + syms)); else sp->trans = (_ure_elt_t *) vbi3_realloc((char *) sp->trans, sizeof(_ure_elt_t) * (sp->trans_used + syms)); sp->trans_size = sp->trans_used + syms; } /* * Go through the symbol table and generate the DFA state transitions * for each symbol that has collected NFA states. */ for (j = syms = 0, smp = b->symtab; j < b->symtab_used; j++, smp++) { sp = b->states.states + i; if (smp->states.slist_used > 0) { sp->trans[syms].lhs = smp->id; rhs = _ure_add_state(smp->states.slist_used, smp->states.slist, b); /* * Reset the state pointer in case the reallocation moves it * in memory. */ sp = b->states.states + i; sp->trans[syms].rhs = rhs; smp->states.slist_used = 0; syms++; } } /* * Set the number of transitions actually used. */ sp->trans_used = syms; } b->reducing = 0; } static void #ifdef __STDC__ _ure_add_equiv(ucs2_t l, ucs2_t r, _ure_buffer_t *b) #else _ure_add_equiv(l, r, b) ucs2_t l, r; _ure_buffer_t *b; #endif { ucs2_t tmp; l = b->states.states[l].id; r = b->states.states[r].id; if (l == r) return; if (l > r) { tmp = l; l = r; r = tmp; } /* * Check to see if the equivalence pair already exists. */ for (tmp = 0; tmp < b->equiv_used && (b->equiv[tmp].l != l || b->equiv[tmp].r != r); tmp++) ; if (tmp < b->equiv_used) return; if (b->equiv_used == b->equiv_size) { if (b->equiv_size == 0) b->equiv = (_ure_equiv_t *) vbi3_malloc(sizeof(_ure_equiv_t) << 3); else b->equiv = (_ure_equiv_t *) vbi3_realloc((char *) b->equiv, sizeof(_ure_equiv_t) * (b->equiv_size + 8)); b->equiv_size += 8; } b->equiv[b->equiv_used].l = l; b->equiv[b->equiv_used].r = r; b->equiv_used++; } /* * Merge the DFA states that are equivalent. */ static void #ifdef __STDC__ _ure_merge_equiv(_ure_buffer_t *b) #else _ure_merge_equiv(b) _ure_buffer_t *b; #endif { ucs2_t i, j, k, eq, done; _ure_state_t *sp1, *sp2, *ls, *rs; for (i = 0; i < b->states.states_used; i++) { sp1 = b->states.states + i; if (sp1->id != i) continue; for (j = 0; j < i; j++) { sp2 = b->states.states + j; if (sp2->id != j) continue; b->equiv_used = 0; _ure_add_equiv(i, j, b); for (eq = 0, done = 0; eq < b->equiv_used; eq++) { ls = b->states.states + b->equiv[eq].l; rs = b->states.states + b->equiv[eq].r; if (ls->accepting != rs->accepting || ls->trans_used != rs->trans_used) { done = 1; break; } for (k = 0; k < ls->trans_used && ls->trans[k].lhs == rs->trans[k].lhs; k++) ; if (k < ls->trans_used) { done = 1; break; } for (k = 0; k < ls->trans_used; k++) _ure_add_equiv(ls->trans[k].rhs, rs->trans[k].rhs, b); } if (done == 0) break; } for (eq = 0; j < i && eq < b->equiv_used; eq++) b->states.states[b->equiv[eq].r].id = b->states.states[b->equiv[eq].l].id; } /* * Renumber the states appropriately. */ for (i = eq = 0, sp1 = b->states.states; i < b->states.states_used; sp1++, i++) sp1->id = (sp1->id == i) ? eq++ : b->states.states[sp1->id].id; } /************************************************************************* * * API. * *************************************************************************/ ure_buffer_t #ifdef __STDC__ ure_buffer_create(void) #else ure_buffer_create() #endif { ure_buffer_t b; b = vbi3_malloc (sizeof (*b)); memset (b, 0, sizeof (*b)); return b; } void #ifdef __STDC__ ure_buffer_free(ure_buffer_t buf) #else ure_buffer_free(buf) ure_buffer_t buf; #endif { unsigned long i; if (buf == 0) return; if (buf->stack.slist_size > 0) vbi3_free((char *) buf->stack.slist); if (buf->expr_size > 0) vbi3_free((char *) buf->expr); for (i = 0; i < buf->symtab_size; i++) { if (buf->symtab[i].states.slist_size > 0) vbi3_free((char *) buf->symtab[i].states.slist); } if (buf->symtab_size > 0) vbi3_free((char *) buf->symtab); for (i = 0; i < buf->states.states_size; i++) { if (buf->states.states[i].trans_size > 0) vbi3_free((char *) buf->states.states[i].trans); if (buf->states.states[i].st.slist_size > 0) vbi3_free((char *) buf->states.states[i].st.slist); } if (buf->states.states_size > 0) vbi3_free((char *) buf->states.states); if (buf->equiv_size > 0) vbi3_free((char *) buf->equiv); vbi3_free((char *) buf); } ure_dfa_t #ifdef __STDC__ ure_compile(const ucs2_t *re, unsigned long relen, int casefold, ure_buffer_t buf) #else ure_compile(re, relen, casefold, buf) ucs2_t *re; unsigned long relen; int casefold; ure_buffer_t buf; #endif { ucs2_t i, j, state; _ure_state_t *sp; _ure_dstate_t *dsp; _ure_trans_t *tp; ure_dfa_t dfa; if (re == 0 || *re == 0 || relen == 0 || buf == 0) return 0; /* * Reset the various fields of the compilation buffer. Default the flags * to indicate the presense of the "^$" pattern. If any other pattern * occurs, then this flag will be removed. This is done to catch this * special pattern and handle it specially when matching. */ buf->flags = _URE_DFA_BLANKLINE | ((casefold) ? _URE_DFA_CASEFOLD : 0); buf->reducing = 0; buf->stack.slist_used = 0; buf->expr_used = 0; for (i = 0; i < buf->symtab_used; i++) buf->symtab[i].states.slist_used = 0; buf->symtab_used = 0; for (i = 0; i < buf->states.states_used; i++) { buf->states.states[i].st.slist_used = 0; buf->states.states[i].trans_used = 0; } buf->states.states_used = 0; /* * Construct the NFA. If this stage returns a 0, then an error occured or * an empty expression was passed. */ if ((state = _ure_re2nfa(re, relen, buf)) == _URE_NOOP) return 0; /* * Do the expression reduction to get the initial DFA. */ _ure_reduce(state, buf); /* * Merge all the equivalent DFA states. */ _ure_merge_equiv(buf); /* * Construct the minimal DFA. */ dfa = (ure_dfa_t) vbi3_malloc(sizeof(_ure_dfa_t)); (void) memset((char *) dfa, 0, sizeof(_ure_dfa_t)); dfa->flags = buf->flags & (_URE_DFA_CASEFOLD|_URE_DFA_BLANKLINE); /* * Free up the NFA state groups and transfer the symbols from the buffer * to the DFA. */ for (i = 0; i < buf->symtab_size; i++) { if (buf->symtab[i].states.slist_size > 0) vbi3_free((char *) buf->symtab[i].states.slist); } dfa->syms = buf->symtab; dfa->nsyms = buf->symtab_used; buf->symtab_used = buf->symtab_size = 0; /* * Collect the total number of states and transitions needed for the DFA. */ for (i = state = 0, sp = buf->states.states; i < buf->states.states_used; i++, sp++) { if (sp->id == state) { dfa->nstates++; dfa->ntrans += sp->trans_used; state++; } } /* * Allocate enough space for the states and transitions. */ dfa->states = (_ure_dstate_t *) vbi3_malloc(sizeof(_ure_dstate_t) * dfa->nstates); dfa->trans = (_ure_trans_t *) vbi3_malloc(sizeof(_ure_trans_t) * dfa->ntrans); /* * Actually transfer the DFA states from the buffer. */ dsp = dfa->states; tp = dfa->trans; for (i = state = 0, sp = buf->states.states; i < buf->states.states_used; i++, sp++) { if (sp->id == state) { dsp->trans = tp; dsp->ntrans = sp->trans_used; dsp->accepting = sp->accepting; /* * Add the transitions for the state. */ for (j = 0; j < dsp->ntrans; j++, tp++) { tp->symbol = sp->trans[j].lhs; tp->next_state = buf->states.states[sp->trans[j].rhs].id; } dsp++; state++; } } return dfa; } void #ifdef __STDC__ ure_dfa_free(ure_dfa_t dfa) #else ure_dfa_free(dfa) ure_dfa_t dfa; #endif { ucs2_t i; if (dfa == 0) return; for (i = 0; i < dfa->nsyms; i++) { if ((dfa->syms[i].type == _URE_CCLASS || dfa->syms[i].type == _URE_NCCLASS) && dfa->syms[i].sym.ccl.ranges_size > 0) vbi3_free((char *) dfa->syms[i].sym.ccl.ranges); } if (dfa->nsyms > 0) vbi3_free((char *) dfa->syms); if (dfa->nstates > 0) vbi3_free((char *) dfa->states); if (dfa->ntrans > 0) vbi3_free((char *) dfa->trans); vbi3_free((char *) dfa); } void #ifdef __STDC__ ure_write_dfa(ure_dfa_t dfa, FILE *out) #else ure_write_dfa(dfa, out) ure_dfa_t dfa; FILE *out; #endif { ucs2_t i, j, k, h, l; _ure_dstate_t *sp; _ure_symtab_t *sym; _ure_range_t *rp; if (dfa == 0 || out == 0) return; /* * Write all the different character classes. */ for (i = 0, sym = dfa->syms; i < dfa->nsyms; i++, sym++) { if (sym->type == _URE_CCLASS || sym->type == _URE_NCCLASS) { fprintf(out, "C%hd = ", sym->id); if (sym->sym.ccl.ranges_used > 0) { putc('[', out); if (sym->type == _URE_NCCLASS) putc('^', out); } if (sym->props != 0) { if (sym->type == _URE_NCCLASS) fprintf(out, "\\P"); else fprintf(out, "\\p"); for (k = h = 0; k < 32; k++) { if (sym->props & (1 << k)) { if (h != 0) putc(',', out); fprintf(out, "%hd", k + 1); h = 1; } } } /* * Dump the ranges. */ for (k = 0, rp = sym->sym.ccl.ranges; k < sym->sym.ccl.ranges_used; k++, rp++) { /* * Check for UTF16 characters. */ if (0x10000 <= rp->min_code && rp->min_code <= 0x10ffff) { h = ((rp->min_code - 0x10000) >> 10) + 0xd800; l = ((rp->min_code - 0x10000) & 1023) + 0xdc00; fprintf(out, "\\x%04X\\x%04X", (unsigned) h, (unsigned) l); } else fprintf(out, "\\x%04lX", (unsigned long)(rp->min_code & 0xffff)); if (rp->max_code != rp->min_code) { putc('-', out); if (rp->max_code >= 0x10000 && rp->max_code <= 0x10ffff) { h = ((rp->max_code - 0x10000) >> 10) + 0xd800; l = ((rp->max_code - 0x10000) & 1023) + 0xdc00; fprintf(out, "\\x%04hX\\x%04hX", h, l); } else fprintf(out, "\\x%04lX", (unsigned long) rp->max_code & 0xffff); } } if (sym->sym.ccl.ranges_used > 0) putc(']', out); putc('\n', out); } } for (i = 0, sp = dfa->states; i < dfa->nstates; i++, sp++) { fprintf(out, "S%hd = ", i); if (sp->accepting) { fprintf(out, "1 "); if (sp->ntrans) fprintf(out, "| "); } for (j = 0; j < sp->ntrans; j++) { if (j > 0) fprintf(out, "| "); sym = dfa->syms + sp->trans[j].symbol; switch (sym->type) { case _URE_CHAR: if (0x10000 <= sym->sym.chr && sym->sym.chr <= 0x10ffff) { /* * Take care of UTF16 characters. */ h = ((sym->sym.chr - 0x10000) >> 10) + 0xd800; l = ((sym->sym.chr - 0x10000) & 1023) + 0xdc00; fprintf(out, "\\x%04hX\\x%04hX ", h, l); } else // fprintf(out, "\\x%04lX ", sym->sym.chr & 0xffff); fprintf(out, "%c ", (char)sym->sym.chr); break; case _URE_ANY_CHAR: fprintf(out, " "); break; case _URE_BOL_ANCHOR: fprintf(out, " "); break; case _URE_EOL_ANCHOR: fprintf(out, " "); break; case _URE_CCLASS: case _URE_NCCLASS: fprintf(out, "[C%hd] ", sym->id); break; } fprintf(out, "S%hd", sp->trans[j].next_state); if (j + 1 < sp->ntrans) putc(' ', out); } putc('\n', out); } } #define _ure_issep(cc) _ure_matches_properties(cc, _URE_SEPARATOR) #define _ure_isbrk(cc) ((cc) == '\n' || (cc) == '\r' || (cc) == 0x2028 ||\ (cc) == 0x2029) int #ifdef __STDC__ ure_exec(ure_dfa_t dfa, int flags, ucs2_t *text, unsigned long textlen, unsigned long *match_start, unsigned long *match_end) #else ure_exec(dfa, flags, text, textlen, match_start, match_end) ure_dfa_t dfa; int flags; ucs2_t *text; unsigned long textlen, *match_start, *match_end; #endif { int i, j, matched, found, skip; unsigned long ms, me; ucs4_t c; ucs2_t *sp, *ep, *lp; _ure_dstate_t *stp; _ure_symtab_t *sym; _ure_range_t *rp; if (dfa == 0 || text == 0 || match_start == 0 || match_end == 0) return 0; /* * Handle the special case of an empty string matching the "^$" pattern. */ if (textlen == 0 && (dfa->flags & _URE_DFA_BLANKLINE)) { *match_start = *match_end = 0; return 1; } sp = text; ep = sp + textlen; ms = me = ~0; stp = dfa->states; for (found = skip = 0; found == 0 && sp < ep; ) { lp = sp; c = *sp++; #if 0 /* zvbi: never */ /* * Check to see if this is a high surrogate that should be * combined with a following low surrogate. */ if (sp < ep && 0xd800 <= c && c <= 0xdbff && 0xdc00 <= *sp && *sp <= 0xdfff) c = 0x10000 + (((c & 0x03ff) << 10) | (*sp++ & 0x03ff)); /* * Determine if the character is non-spacing and should be skipped. */ if ((flags & URE_IGNORE_NONSPACING) && (_ure_matches_properties(_URE_NONSPACING, c))) continue; #endif if (dfa->flags & _URE_DFA_CASEFOLD) c = unicode_tolower(c); /* * See if one of the transitions matches. */ for (i = 0, matched = 0; matched == 0 && i < stp->ntrans; i++) { sym = dfa->syms + stp->trans[i].symbol; switch (sym->type) { case _URE_ANY_CHAR: if ((flags & URE_DOT_MATCHES_SEPARATORS) || !_ure_issep(c)) matched = 1; break; case _URE_CHAR: if (c == sym->sym.chr) matched = 1; break; case _URE_BOL_ANCHOR: if (flags & URE_NOTBOL) break; if (lp == text) { sp = lp; matched = 1; } else if (_ure_isbrk(c)) { if (c == '\r' && sp < ep && *sp == '\n') sp++; lp = sp; matched = 1; } break; case _URE_EOL_ANCHOR: if (flags & URE_NOTEOL) break; if (_ure_isbrk(c)) { /* * Put the pointer back before the separator so the match * end position will be correct. This case will also * cause the `sp' pointer to be advanced over the current * separator once the match end point has been recorded. */ sp = lp; matched = 1; } break; case _URE_CCLASS: case _URE_NCCLASS: if (sym->props != 0) matched = _ure_matches_properties(sym->props, c); for (j = 0, rp = sym->sym.ccl.ranges; j < sym->sym.ccl.ranges_used; j++, rp++) { if (rp->min_code <= c && c <= rp->max_code) matched = 1; } if (sym->type == _URE_NCCLASS) { matched = !matched; if (matched && _ure_issep(c) && (!(flags & URE_DOT_MATCHES_SEPARATORS))) matched = 0; } break; } if (matched) { me = sp - text; if (ms == (unsigned long) -1) ms = lp - text; stp = dfa->states + stp->trans[i].next_state; /* * If the match was an EOL anchor, adjust the pointer past the * separator that caused the match. The correct match * position has been recorded already. */ if (sym->type == _URE_EOL_ANCHOR) { /* * Skip the character that caused the match. */ sp++; /* * Handle the infamous CRLF situation. */ if (sp < ep && c == '\r' && *sp == '\n') sp++; } } } if (matched == 0) { if (stp->accepting == 0) { /* * If the last state was not accepting, then reset * and start over. */ stp = dfa->states; ms = me = ~0; } else /* * The last state was accepting, so terminate the matching * loop to avoid more work. */ found = 1; } else if (sp == ep) { if (!stp->accepting) { /* * This ugly hack is to make sure the end-of-line anchors * match when the source text hits the end. This is only done * if the last subexpression matches. */ for (i = 0; found == 0 && i < stp->ntrans; i++) { sym = dfa->syms + stp->trans[i].symbol; if (sym->type ==_URE_EOL_ANCHOR) { stp = dfa->states + stp->trans[i].next_state; if (stp->accepting) { me = sp - text; found = 1; } else break; } } } else { /* * Make sure any conditions that match all the way to the end * of the string match. */ found = 1; me = sp - text; } } } if (found == 0) ms = me = ~0; *match_start = ms; *match_end = me; return (ms != (unsigned long) -1) ? 1 : 0; } #endif /* HAVE_GLIBC21 || HAVE_LIBUNICODE */ zapping-0.10cvs6/libvbi/ure.h 644 764 144 10102 10173357562 11243 /* * Copyright 1997, 1998, 1999 Computing Research Labs, * New Mexico State University * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal in the Software without restriction, including without limitation * the rights to use, copy, modify, merge, publish, distribute, sublicense, * and/or sell copies of the Software, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL * THE COMPUTING RESEARCH LAB OR NEW MEXICO STATE UNIVERSITY BE LIABLE FOR ANY * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT * OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /* $Id: ure.h,v 1.3 2005/01/19 04:17:54 mschimek Exp $ */ #ifndef _h_ure #define _h_ure #ifdef HAVE_CONFIG_H # include "config.h" #endif #if defined(HAVE_GLIBC21) || defined(HAVE_LIBUNICODE) #include #include #ifdef __cplusplus extern "C" { #endif #undef __ #ifdef __STDC__ #define __(x) x #else #define __(x) () #endif /* * Error codes. */ #define _URE_OK 0 #define _URE_UNEXPECTED_EOS -1 #define _URE_CCLASS_OPEN -2 #define _URE_UNBALANCED_GROUP -3 #define _URE_INVALID_PROPERTY -4 /* * Options that can be combined for searching. */ /* mhs: not used, disabled #define URE_IGNORE_NONSPACING 0x01 */ #define URE_DOT_MATCHES_SEPARATORS 0x02 #define URE_NOTBOL 0x04 #define URE_NOTEOL 0x08 typedef uint32_t ucs4_t; typedef uint16_t ucs2_t; /* * Opaque type for memory used when compiling expressions. */ typedef struct _ure_buffer_t *ure_buffer_t; /* * Opaque type for the minimal DFA used when matching. */ typedef struct _ure_dfa_t *ure_dfa_t; /************************************************************************* * * API. * *************************************************************************/ /** * @internal * * Alloc memory for the regex internal buffer, NULL on error. * Use ure_buffer_free to free the returned buffer. * * @return * ure_buffer_t. */ extern ure_buffer_t ure_buffer_create __((void)); extern void ure_buffer_free __((ure_buffer_t buf)); /** * @internal * @param re Buffer containing the UCS-2 regexp. * @param relen Size in characters of the regexp. * @param casefold @c TRUE for matching disregarding case. * @param buf The regexp buffer. * * Compile the given expression into a dfa. * * @return * The compiled DFA, @c NULL on error. */ extern ure_dfa_t ure_compile __((const ucs2_t *re, unsigned long relen, int casefold, ure_buffer_t buf)); extern void ure_dfa_free __((ure_dfa_t dfa)); extern void ure_write_dfa __((ure_dfa_t dfa, FILE *out)); /** * @internal * @param dfa The compiled expression. * @param flags Or'ed * @c URE_IGNORED_NONSPACING: Set if nonspacing chars should be ignored. * @c URE_DOT_MATCHES_SEPARATORS: Set if dot operator matches * separator characters too. * @param text UCS-2 text to run the compiled regexp against. * @param textlen Size in characters of the text. * @param match_start Index in text of the first matching char. * @param match_end Index in text of the first non-matching char after the * matching characters. * * Run the compiled regexp search on the given text. * * @return * @c TRUE if the search suceeded. */ extern int ure_exec __((ure_dfa_t dfa, int flags, ucs2_t *text, unsigned long textlen, unsigned long *match_start, unsigned long *match_end)); #undef __ #ifdef __cplusplus } #endif #endif /* HAVE_GLIBC21 || HAVE_LIBUNICODE */ #endif /* _h_ure */ zapping-0.10cvs6/libvbi/vps.c 644 764 144 6356 10326457351 11250 /* * libzvbi - Video Program System * * Copyright (C) 2000-2004 Michael H. Schimek * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. * * 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 this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* $Id: vps.c,v 1.1 2005/10/22 15:46:49 mschimek Exp $ */ #include "../config.h" #include #include "vps.h" /** * @addtogroup VPS Video Program System Decoder * @ingroup LowDec * @brief Functions to decode VPS packets (ETS 300 231). */ /** * @param cni CNI of type VBI3_CNI_TYPE_VPS is stored here. * @param buffer VPS packet as defined for @c VBI3_SLICED_VPS, * i.e. 13 bytes without clock run-in and start code. * * Decodes a VPS packet according to ETS 300 231, returning the * 12 bit Country and Network Identifier in @a cni. * * The code 0xDC3 is translated according to TR 101 231: "As this * code is used for a time in two networks a distinction for automatic * tuning systems is given in data line 16 [VPS]: bit 3 of byte 5 = 1 * for the ARD network / = 0 for the ZDF network." * * @returns * Always @c TRUE, no error checking possible. */ vbi3_bool vbi3_decode_vps_cni (unsigned int * cni, const uint8_t buffer[13]) { unsigned int cni_value; assert (NULL != cni); assert (NULL != buffer); cni_value = (+ ((buffer[10] & 0x03) << 10) + ((buffer[11] & 0xC0) << 2) + (buffer[ 8] & 0xC0) + (buffer[11] & 0x3F)); if (0x0DC3 == cni_value) cni_value = (buffer[2] & 0x10) ? 0x0DC2 /* ZDF */ : 0x0DC1 /* ARD */; *cni = cni_value; return TRUE; } /** * @param pid PDC data is stored here. * @param buffer VPS packet as defined for @c VBI3_SLICED_VPS, * i.e. 13 bytes without clock run-in and start code. * * Decodes a VPS datagram according to ETS 300 231, * storing PDC recording-control data in @a pid. * * @returns * Always @c TRUE, no error checking possible. */ vbi3_bool vbi3_decode_vps_pdc (vbi3_program_id * pid, const uint8_t buffer[13]) { assert (NULL != pid); assert (NULL != buffer); pid->cni_type = VBI3_CNI_TYPE_VPS; pid->cni = (+ ((buffer[10] & 0x03) << 10) + ((buffer[11] & 0xC0) << 2) + (buffer[ 8] & 0xC0) + (buffer[11] & 0x3F)); pid->channel = VBI3_PID_CHANNEL_VPS; pid->pil = (+ ((buffer[ 8] & 0x3F) << 14) + (buffer[ 9] << 6) + (buffer[10] >> 2)); pid->month = VBI3_PIL_MONTH (pid->pil) - 1; pid->day = VBI3_PIL_DAY (pid->pil) - 1; pid->hour = VBI3_PIL_HOUR (pid->pil); pid->minute = VBI3_PIL_MINUTE (pid->pil); pid->length = 0; /* unknown */ pid->luf = FALSE; /* no update, just pil */ pid->mi = FALSE; /* label is not 30 s early */ pid->prf = FALSE; /* prepare to record unknown */ pid->pcs_audio = buffer[ 2] >> 6; pid->pty = buffer[12]; pid->tape_delayed = FALSE; return TRUE; } zapping-0.10cvs6/libvbi/vps.h 644 764 144 2327 10326457364 11253 /* * libzvbi - Video Program System * * Copyright (C) 2000-2004 Michael H. Schimek * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. * * 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 this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* $Id: vps.h,v 1.1 2005/10/22 15:47:00 mschimek Exp $ */ #ifndef __ZVBI3_VPS_H__ #define __ZVBI3_VPS_H__ #include /* uint8_t */ #include "macros.h" #include "pdc.h" /* vbi3_program_id */ VBI3_BEGIN_DECLS /** * @addtogroup VPS * @{ */ extern vbi3_bool vbi3_decode_vps_cni (unsigned int * cni, const uint8_t buffer[13]); extern vbi3_bool vbi3_decode_vps_pdc (vbi3_program_id * pid, const uint8_t buffer[13]); /** @} */ VBI3_END_DECLS #endif /* __ZVBI3_VPS_H__ */ zapping-0.10cvs6/libvbi/teletext_decoder-priv.h 644 764 144 6402 10305456044 14731 /* * libzvbi - Teletext decoder * * Copyright (C) 2000, 2001, 2002, 2003, 2004 Michael H. Schimek * * Based on code from AleVT 1.5.1 * Copyright (C) 1998, 1999 Edgar Toernig * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* $Id: teletext_decoder-priv.h,v 1.4 2005/09/01 01:40:52 mschimek Exp $ */ #ifndef TELETEXT_DECODER_PRIV_H #define TELETEXT_DECODER_PRIV_H #include "event-priv.h" /* _vbi3_event_handler_list */ #include "cache-priv.h" /* vbi3_cache, vt.h */ #ifndef ZAPPING8 # include "pfc_demux.h" /* vbi3_pfc_demux */ # include "trigger.h" /* _vbi3_trigger */ #endif #include "teletext_decoder.h" typedef void teletext_reset_fn (vbi3_teletext_decoder *td, cache_network * cn, double time); typedef void teletext_delete_fn (vbi3_teletext_decoder *td); struct _vbi3_teletext_decoder { /** * Pages in progress, per magazine in case of parallel transmission. * When complete we copy the page into the cache. */ cache_page buffer[8]; /** * Current page, points into buffer[], switched by a page header * with different magazine number. Can be @c NULL (no header * received yet). */ cache_page * current; #ifndef ZAPPING8 /** Page Function Clear EPG Data. */ vbi3_pfc_demux epg_stream[2]; /** EACEM triggers. */ _vbi3_trigger * triggers; #endif /** Used for channel switch detection, see there. */ pagenum header_page; uint8_t header[40]; /** Time to receive a packet 8/30 CNI or VPS CNI. */ double cni_830_timeout; double cni_vps_timeout; /** * Remember past uncorrectable errors: One bit for each call of * vbi3_teletext_decoder_feed(), most recent result in lsb. The idea * is to disable the decoder if we get too many errors. */ unsigned int error_history; /* Interface */ /** The cache we use. */ vbi3_cache * cache; /** Current network in the cache. */ cache_network * network; double timestamp; double reset_time; vbi3_videostd_set videostd_set; /** Called by vbi3_teletext_decoder_reset(). */ teletext_reset_fn * virtual_reset; _vbi3_event_handler_list handlers; /** Called by vbi3_teletext_decoder_delete(). */ teletext_delete_fn * virtual_delete; }; /* in packet.c */ extern cache_page * _vbi3_convert_cached_page (cache_page * cp, page_function new_function); extern void _vbi3_teletext_decoder_resync (vbi3_teletext_decoder * td); extern void _vbi3_teletext_decoder_destroy (vbi3_teletext_decoder * td); extern vbi3_bool _vbi3_teletext_decoder_init (vbi3_teletext_decoder * td, vbi3_cache * ca, const vbi3_network * nk, vbi3_videostd_set videostd_set); #endif /* TELETEXT_DECODER_PRIV_H */ zapping-0.10cvs6/libvbi/macros.h 644 764 144 4241 10410046604 11705 /* * libzvbi - Useful macros * * Copyright (C) 2002, 2003, 2004 Michael H. Schimek * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* $Id: macros.h,v 1.5 2006/03/21 19:01:24 mschimek Exp $ */ #ifndef __ZVBI3_MACROS_H__ #define __ZVBI3_MACROS_H__ #ifdef __cplusplus # define VBI3_BEGIN_DECLS extern "C" { # define VBI3_END_DECLS } #else # define VBI3_BEGIN_DECLS # define VBI3_END_DECLS #endif VBI3_BEGIN_DECLS #if __GNUC__ >= 4 # define _vbi3_sentinel sentinel(0) #else # define _vbi3_sentinel # define __restrict__ #endif #if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || __GNUC__ >= 4 # define _vbi3_nonnull(args...) nonnull(args) #else # define _vbi3_nonnull(args...) #endif #if __GNUC__ >= 3 # define _vbi3_pure pure # define _vbi3_alloc malloc #else # define _vbi3_pure # define _vbi3_alloc #endif #if __GNUC__ >= 2 # define vbi3_inline static __inline__ #else # define vbi3_inline static # define __attribute__(args...) #endif /** * @ingroup Basic * @name Boolean type * @{ */ #ifndef TRUE # define TRUE 1 #endif #ifndef FALSE # define FALSE 0 #endif typedef int vbi3_bool; /** @} */ #ifndef NULL # ifdef __cplusplus # define NULL (0L) # else # define NULL ((void *) 0) # endif #endif /** XXX Document me - for variadic funcs. (this is a pointer not int to take advantage of __attribute__((sentinel))). */ #define VBI3_END ((void *) 0) typedef void vbi3_lock_fn (void * user_data); typedef void vbi3_unlock_fn (void * user_data); VBI3_END_DECLS #endif /* __ZVBI3_MACROS_H__ */ zapping-0.10cvs6/libvbi/network-table.h 644 764 144 132374 10326457276 13271 /* $Id: network-table.h,v 1.5 2005/10/22 15:46:06 mschimek Exp $ */ /* Generated file, do not edit! */ struct country { uint16_t cni_8301; /* Packet 8/30 format 1 */ uint16_t cni_8302; /* Packet 8/30 format 2 */ uint16_t cni_pdc_b; /* Packet X/26 (PDC B) */ uint16_t cni_vps; /* VPS */ const char country_code[4]; const char * name; /* UTF-8 */ }; struct network { uint16_t cni_8301; /* Packet 8/30 format 1 */ uint16_t cni_8302; /* Packet 8/30 format 2 */ uint16_t cni_pdc_b; /* Packet X/26 (PDC B) */ uint16_t cni_vps; /* VPS */ unsigned int country; const char * name; /* UTF-8 */ }; struct ttx_header { const char * name; /* UTF-8 */ const uint8_t * header; /* raw Teletext data */ }; static const struct country country_table [] = { { 0x0000, 0x0000, 0x0000, 0x0000, "AA", "Unknown" }, { 0x4300, 0x0000, 0x0000, 0x0A00, "AT", "Austria" }, { 0x3200, 0x1600, 0x0000, 0x0000, "BE", "Belgium" }, { 0x4100, 0x2400, 0x3400, 0x0400, "CH", "Switzerland" }, { 0x0000, 0x3200, 0x0000, 0x0000, "CZ", "Czech Republic" }, { 0x4900, 0x0000, 0x3D00, 0x0D00, "DE", "Germany" }, { 0x0000, 0x2900, 0x0000, 0x0000, "DK", "Denmark" }, { 0x0000, 0x0000, 0x0000, 0x0000, "ES", "Spain" }, { 0x3500, 0x2600, 0x0000, 0x0000, "FI", "Finland" }, { 0x3300, 0x2F00, 0x3F00, 0x0000, "FR", "France" }, { 0x4400, 0x2C00, 0x3C00, 0x0000, "GB", "United Kingdom" }, { 0x3000, 0x2100, 0x3100, 0x0000, "GR", "Greece" }, { 0x0000, 0x0000, 0x0000, 0x0000, "HR", "Croatia" }, { 0x3600, 0x0000, 0x0000, 0x0000, "HU", "Hungary" }, { 0x0000, 0x4200, 0x3200, 0x0000, "IE", "Ireland" }, { 0x0000, 0x0000, 0x0000, 0x0000, "IS", "Iceland" }, { 0x3900, 0x1500, 0x0000, 0x0000, "IT", "Italy" }, { 0x0000, 0x0000, 0x0000, 0x0000, "LU", "Luxembourg" }, { 0x3100, 0x4800, 0x3800, 0x0000, "NL", "Netherlands" }, { 0x4700, 0x0000, 0x0000, 0x0000, "NO", "Norway" }, { 0x4800, 0x0000, 0x0000, 0x0000, "PL", "Poland" }, { 0x0000, 0x0000, 0x0000, 0x0000, "PT", "Portugal" }, { 0x0000, 0x0000, 0x0000, 0x0000, "SE", "Sweden" }, { 0xAA00, 0x0000, 0x0000, 0x0000, "SI", "Slovenia" }, { 0x0000, 0x3500, 0x3500, 0x0000, "SK", "Slovakia" }, { 0x0000, 0x0000, 0x0000, 0x0000, "SM", "San Marino" }, { 0x9000, 0x0000, 0x0000, 0x0000, "TR", "Turkey" }, { 0x7700, 0x0000, 0x0000, 0x0700, "UA", "Ukraine" }, }; static const struct network network_table [] = { { 0x0000, 0x0000, 0x0000, 0x0481, 3, "TeleZüri" }, { 0x0000, 0x0000, 0x0000, 0x0482, 3, "Teleclub Abo-Fernsehen" }, { 0x0000, 0x0000, 0x0000, 0x0483, 3, "Zürich 1" }, { 0x0000, 0x0000, 0x0000, 0x0484, 3, "TeleBern" }, { 0x0000, 0x0000, 0x0000, 0x0485, 3, "Tele M1" }, { 0x0000, 0x0000, 0x0000, 0x0486, 3, "Star TV" }, { 0x0000, 0x0000, 0x0000, 0x0487, 3, "Pro 7" }, { 0x0000, 0x0000, 0x0000, 0x0488, 3, "TopTV" }, { 0x0000, 0x0000, 0x0000, 0x0AC3, 1, "ORF 3" }, { 0x0000, 0x0000, 0x0000, 0x0ACB, 1, "ORF Burgenland" }, { 0x0000, 0x0000, 0x0000, 0x0ACC, 1, "ORF Kärnten" }, { 0x0000, 0x0000, 0x0000, 0x0ACD, 1, "ORF Niederösterreich" }, { 0x0000, 0x0000, 0x0000, 0x0ACE, 1, "ORF Oberösterreich" }, { 0x0000, 0x0000, 0x0000, 0x0ACF, 1, "ORF Salzburg" }, { 0x0000, 0x0000, 0x0000, 0x0AD0, 1, "ORF Steiermark" }, { 0x0000, 0x0000, 0x0000, 0x0AD1, 1, "ORF Tirol" }, { 0x0000, 0x0000, 0x0000, 0x0AD2, 1, "ORF Vorarlberg" }, { 0x0000, 0x0000, 0x0000, 0x0AD3, 1, "ORF Wien" }, { 0x0000, 0x0000, 0x0000, 0x0D75, 5, "KDG Infokanal" }, { 0x0000, 0x0000, 0x0000, 0x0D76, 5, "DAS VIERTE" }, { 0x0000, 0x0000, 0x0000, 0x0D79, 5, "RTL Shop" }, { 0x0000, 0x0000, 0x0000, 0x0D7A, 5, "N24" }, { 0x0000, 0x0000, 0x0000, 0x0D7B, 5, "TV Berlin" }, { 0x0000, 0x0000, 0x0000, 0x0D7C, 5, "ONYX-TV" }, { 0x0000, 0x0000, 0x0000, 0x0D7E, 5, "Nickelodeon" }, { 0x0000, 0x0000, 0x0000, 0x0D81, 5, "ORB-1 Regional" }, { 0x0000, 0x0000, 0x0000, 0x0D87, 5, "1A-Fernsehen" }, { 0x0000, 0x0000, 0x0000, 0x0D88, 5, "VIVA" }, { 0x0000, 0x0000, 0x0000, 0x0D89, 5, "VIVA 2" }, { 0x0000, 0x0000, 0x0000, 0x0D8A, 5, "Super RTL" }, { 0x0000, 0x0000, 0x0000, 0x0D8B, 5, "RTL Club" }, { 0x0000, 0x0000, 0x0000, 0x0D8C, 5, "n-tv" }, { 0x0000, 0x0000, 0x0000, 0x0D8D, 5, "DSF" }, { 0x0000, 0x0000, 0x0000, 0x0D90, 5, "RTL 2 Regional" }, { 0x0000, 0x0000, 0x0000, 0x0D91, 5, "Eurosport" }, { 0x0000, 0x0000, 0x0000, 0x0D92, 5, "Kabel 1" }, { 0x0000, 0x0000, 0x0000, 0x0D94, 5, "PRO 7" }, { 0x0000, 0x0000, 0x0000, 0x0D95, 5, "SAT 1 Brandenburg" }, { 0x0000, 0x0000, 0x0000, 0x0D96, 5, "SAT 1 Thüringen" }, { 0x0000, 0x0000, 0x0000, 0x0D97, 5, "SAT 1 Sachsen" }, { 0x0000, 0x0000, 0x0000, 0x0D98, 5, "SAT 1 Mecklenb.-Vorpommern" }, { 0x0000, 0x0000, 0x0000, 0x0D99, 5, "SAT 1 Sachsen-Anhalt" }, { 0x0000, 0x0000, 0x0000, 0x0D9A, 5, "RTL Regional" }, { 0x0000, 0x0000, 0x0000, 0x0D9B, 5, "RTL Schleswig-Holstein" }, { 0x0000, 0x0000, 0x0000, 0x0D9C, 5, "RTL Hamburg" }, { 0x0000, 0x0000, 0x0000, 0x0D9D, 5, "RTL Berlin" }, { 0x0000, 0x0000, 0x0000, 0x0D9E, 5, "RTL Niedersachsen" }, { 0x0000, 0x0000, 0x0000, 0x0D9F, 5, "RTL Bremen" }, { 0x0000, 0x0000, 0x0000, 0x0DA0, 5, "RTL Nordrhein-Westfalen" }, { 0x0000, 0x0000, 0x0000, 0x0DA1, 5, "RTL Hessen" }, { 0x0000, 0x0000, 0x0000, 0x0DA2, 5, "RTL Rheinland-Pfalz" }, { 0x0000, 0x0000, 0x0000, 0x0DA3, 5, "RTL Baden-Württemberg" }, { 0x0000, 0x0000, 0x0000, 0x0DA4, 5, "RTL Bayern" }, { 0x0000, 0x0000, 0x0000, 0x0DA5, 5, "RTL Saarland" }, { 0x0000, 0x0000, 0x0000, 0x0DA6, 5, "RTL Sachsen-Anhalt" }, { 0x0000, 0x0000, 0x0000, 0x0DA7, 5, "RTL Mecklenburg-Vorpommern" }, { 0x0000, 0x0000, 0x0000, 0x0DA8, 5, "RTL Sachsen" }, { 0x0000, 0x0000, 0x0000, 0x0DA9, 5, "RTL Thüringen" }, { 0x0000, 0x0000, 0x0000, 0x0DAA, 5, "RTL Brandenburg" }, { 0x0000, 0x0000, 0x0000, 0x0DAB, 5, "RTL" }, { 0x0000, 0x0000, 0x0000, 0x0DAC, 5, "Premiere" }, { 0x0000, 0x0000, 0x0000, 0x0DAD, 5, "SAT 1 Regional" }, { 0x0000, 0x0000, 0x0000, 0x0DAE, 5, "SAT 1 Schleswig-Holstein" }, { 0x0000, 0x0000, 0x0000, 0x0DAF, 5, "SAT 1 Hamburg" }, { 0x0000, 0x0000, 0x0000, 0x0DB0, 5, "SAT 1 Berlin" }, { 0x0000, 0x0000, 0x0000, 0x0DB1, 5, "SAT 1 Niedersachsen" }, { 0x0000, 0x0000, 0x0000, 0x0DB2, 5, "SAT 1 Bremen" }, { 0x0000, 0x0000, 0x0000, 0x0DB3, 5, "SAT 1 Nordrhein-Westfalen" }, { 0x0000, 0x0000, 0x0000, 0x0DB4, 5, "SAT 1 Hessen" }, { 0x0000, 0x0000, 0x0000, 0x0DB5, 5, "SAT 1 Rheinland-Pfalz" }, { 0x0000, 0x0000, 0x0000, 0x0DB6, 5, "SAT 1 Baden-Württemberg" }, { 0x0000, 0x0000, 0x0000, 0x0DB7, 5, "SAT 1 Bayern" }, { 0x0000, 0x0000, 0x0000, 0x0DB8, 5, "SAT 1 Saarland" }, { 0x0000, 0x0000, 0x0000, 0x0DB9, 5, "SAT 1" }, { 0x0000, 0x0000, 0x0000, 0x0DBA, 5, "NEUN LIVE" }, { 0x0000, 0x0000, 0x0000, 0x0DBB, 5, "Deutsche Welle TV Berlin" }, { 0x0000, 0x0000, 0x0000, 0x0DBD, 5, "Berlin Offener Kanal" }, { 0x0000, 0x0000, 0x0000, 0x0DBE, 5, "Berlin-Mix-Channel 2" }, { 0x0000, 0x0000, 0x0000, 0x0DBF, 5, "Berlin-Mix-Channel 1" }, { 0x0000, 0x0000, 0x0000, 0x0DC3, 5, "ARD/ZDF Vormittagsprogramm" }, { 0x0000, 0x0000, 0x0000, 0x0DC4, 5, "ARD-TV-Sternpunkt" }, { 0x0000, 0x0000, 0x0000, 0x0DC5, 5, "ARD-TV-Sternpunkt-Fehler" }, { 0x0000, 0x0000, 0x0000, 0x0DCA, 5, "BR-1 Regional" }, { 0x0000, 0x0000, 0x0000, 0x0DCC, 5, "BR-3 Süd" }, { 0x0000, 0x0000, 0x0000, 0x0DCD, 5, "BR-3 Nord" }, { 0x0000, 0x0000, 0x0000, 0x0DCE, 5, "HR-1 Regional" }, { 0x0000, 0x0000, 0x0000, 0x0DD0, 5, "NDR-1 Dreiländerweit" }, { 0x0000, 0x0000, 0x0000, 0x0DD1, 5, "NDR-1 Hamburg" }, { 0x0000, 0x0000, 0x0000, 0x0DD2, 5, "NDR-1 Niedersachsen" }, { 0x0000, 0x0000, 0x0000, 0x0DD3, 5, "NDR-1 Schleswig-Holstein" }, { 0x0000, 0x0000, 0x0000, 0x0DD4, 5, "Nord-3 (NDR/SFB/RB)" }, { 0x0000, 0x0000, 0x0000, 0x0DD6, 5, "NDR-3 Hamburg" }, { 0x0000, 0x0000, 0x0000, 0x0DD7, 5, "NDR-3 Niedersachsen" }, { 0x0000, 0x0000, 0x0000, 0x0DD8, 5, "NDR-3 Schleswig-Holstein" }, { 0x0000, 0x0000, 0x0000, 0x0DD9, 5, "RB-1 Regional" }, { 0x0000, 0x0000, 0x0000, 0x0DDB, 5, "SFB-1 Regional" }, { 0x0000, 0x0000, 0x0000, 0x0DDD, 5, "SWR-1 Baden-Württemberg" }, { 0x0000, 0x0000, 0x0000, 0x0DDE, 5, "SWR-1 Rheinland-Pfalz" }, { 0x0000, 0x0000, 0x0000, 0x0DE0, 5, "Südwest 3 (SDR/SR/SWF)" }, { 0x0000, 0x0000, 0x0000, 0x0DE2, 5, "SW 3 Saarland" }, { 0x0000, 0x0000, 0x0000, 0x0DE3, 5, "SW 3 Baden-Württemb. Süd" }, { 0x0000, 0x0000, 0x0000, 0x0DE5, 5, "WDR-1 Regionalprogramm" }, { 0x0000, 0x0000, 0x0000, 0x0DE7, 5, "WDR-3 Bielefeld" }, { 0x0000, 0x0000, 0x0000, 0x0DE8, 5, "WDR-3 Dortmund" }, { 0x0000, 0x0000, 0x0000, 0x0DE9, 5, "WDR-3 Düsseldorf" }, { 0x0000, 0x0000, 0x0000, 0x0DEA, 5, "WDR-3 Köln" }, { 0x0000, 0x0000, 0x0000, 0x0DEB, 5, "WDR-3 Münster" }, { 0x0000, 0x0000, 0x0000, 0x0DEC, 5, "SW 3 Regional" }, { 0x0000, 0x0000, 0x0000, 0x0DED, 5, "SW 3 Baden-Württemberg Nord" }, { 0x0000, 0x0000, 0x0000, 0x0DEE, 5, "SW 3 Mannheim" }, { 0x0000, 0x0000, 0x0000, 0x0DEF, 5, "SW 3 Regional" }, { 0x0000, 0x0000, 0x0000, 0x0DF0, 5, "SWR1 / Regionalprogramm" }, { 0x0000, 0x0000, 0x0000, 0x0DF1, 5, "NDR-1 Mecklenb.-Vorpommern" }, { 0x0000, 0x0000, 0x0000, 0x0DF2, 5, "NDR-3 Mecklenb.-Vorpommern" }, { 0x0000, 0x0000, 0x0000, 0x0DF3, 5, "MDR-1 Sachsen" }, { 0x0000, 0x0000, 0x0000, 0x0DF4, 5, "MDR-3 Sachsen" }, { 0x0000, 0x0000, 0x0000, 0x0DF5, 5, "MDR Dresden" }, { 0x0000, 0x0000, 0x0000, 0x0DF6, 5, "MDR-1 Sachsen-Anhalt" }, { 0x0000, 0x0000, 0x0000, 0x0DF7, 5, "WDR Dortmund" }, { 0x0000, 0x0000, 0x0000, 0x0DF8, 5, "MDR-3 Sachsen-Anhalt" }, { 0x0000, 0x0000, 0x0000, 0x0DF9, 5, "MDR Magdeburg" }, { 0x0000, 0x0000, 0x0000, 0x0DFA, 5, "MDR-1 Thüringen" }, { 0x0000, 0x0000, 0x0000, 0x0DFB, 5, "MDR-3 Thüringen" }, { 0x0000, 0x0000, 0x0000, 0x0DFC, 5, "MDR Erfurt" }, { 0x0000, 0x0000, 0x0000, 0x0DFD, 5, "MDR-1 Regional" }, { 0x01F2, 0x5BF1, 0x3B71, 0x0000, 10, "CNN International" }, { 0x0385, 0x0000, 0x0000, 0x0000, 12, "HRT" }, { 0x0404, 0x1604, 0x3604, 0x0000, 2, "VT4" }, { 0x0AE8, 0x0000, 0x0000, 0x0D14, 5, "PRO 7 Austria" }, { 0x0D8F, 0x0000, 0x0000, 0x0D8F, 5, "RTL 2" }, { 0x10E4, 0x2C34, 0x3C34, 0x0000, 10, "MERIDIAN" }, { 0x1609, 0x2C09, 0x3C09, 0x0000, 10, "CHANNEL 5 (2)" }, { 0x25D0, 0x2C30, 0x3C30, 0x0000, 10, "WESTCOUNTRY TV" }, { 0x28EB, 0x2C2B, 0x3C2B, 0x0000, 10, "CHANNEL 5 (3)" }, { 0x2F27, 0x2C37, 0x3C37, 0x0000, 10, "CENTRAL TV" }, { 0x3001, 0x2101, 0x3101, 0x0000, 11, "ET-1" }, { 0x3002, 0x2102, 0x3102, 0x0000, 11, "NET" }, { 0x3003, 0x2103, 0x3103, 0x0000, 11, "ET-3" }, { 0x3101, 0x4801, 0x3801, 0x0000, 18, "Nederland 1" }, { 0x3102, 0x4802, 0x3802, 0x0000, 18, "Nederland 2" }, { 0x3103, 0x4803, 0x3803, 0x0000, 18, "Nederland 3" }, { 0x3104, 0x4804, 0x3804, 0x0000, 18, "RTL 4" }, { 0x3105, 0x4805, 0x3805, 0x0000, 18, "RTL 5" }, { 0x3106, 0x4806, 0x3806, 0x0000, 18, "Yorin" }, { 0x3120, 0x4820, 0x3820, 0x0000, 18, "The BOX" }, { 0x3121, 0x0000, 0x0000, 0x0000, 18, "Discovery Netherlands" }, { 0x3122, 0x0000, 0x0000, 0x0000, 18, "Nickelodeon" }, { 0x3123, 0x0000, 0x0000, 0x0000, 18, "Animal Planet Benelux" }, { 0x3124, 0x0000, 0x0000, 0x0000, 18, "TALPA TV" }, { 0x3125, 0x0000, 0x0000, 0x0000, 18, "NET5" }, { 0x3126, 0x0000, 0x0000, 0x0000, 18, "SBS6" }, { 0x3128, 0x0000, 0x0000, 0x0000, 18, "V8" }, { 0x3130, 0x0000, 0x0000, 0x0000, 18, "TMF Netherlands" }, { 0x3131, 0x0000, 0x0000, 0x0000, 18, "TMF Belgian Flanders" }, { 0x3132, 0x0000, 0x0000, 0x0000, 18, "MTV NL" }, { 0x3137, 0x0000, 0x0000, 0x0000, 18, "RNN7" }, { 0x3147, 0x4847, 0x3847, 0x0000, 18, "RTL 7" }, { 0x3201, 0x1601, 0x3603, 0x0000, 2, "VRT TV1" }, { 0x3202, 0x1602, 0x3602, 0x0000, 2, "CANVAS" }, { 0x3203, 0x0000, 0x0000, 0x0000, 2, "RTBF 1" }, { 0x3204, 0x0000, 0x0000, 0x0000, 2, "RTBF 2" }, { 0x3205, 0x1605, 0x3605, 0x0000, 2, "VTM" }, { 0x3206, 0x1606, 0x3606, 0x0000, 2, "Kanaal2" }, { 0x3207, 0x0000, 0x0000, 0x0000, 2, "RTBF Sat" }, { 0x3209, 0x0000, 0x0000, 0x0000, 2, "RTL-TV1" }, { 0x320A, 0x0000, 0x0000, 0x0000, 2, "CLUB-RTL" }, { 0x320B, 0x0000, 0x0000, 0x0000, 10, "National Geographic Channel" }, { 0x320C, 0x0000, 0x0000, 0x0000, 2, "AB3" }, { 0x320D, 0x0000, 0x0000, 0x0000, 2, "AB4e" }, { 0x320E, 0x0000, 0x0000, 0x0000, 2, "Ring TV" }, { 0x320F, 0x0000, 0x0000, 0x0000, 2, "JIM.tv" }, { 0x3210, 0x0000, 0x0000, 0x0000, 2, "RTV-Kempen" }, { 0x3211, 0x0000, 0x0000, 0x0000, 2, "RTV-Mechelen" }, { 0x3212, 0x0000, 0x0000, 0x0000, 2, "MCM Belgium" }, { 0x3213, 0x0000, 0x0000, 0x0000, 2, "Vitaya" }, { 0x3214, 0x0000, 0x0000, 0x0000, 2, "WTV" }, { 0x3215, 0x0000, 0x0000, 0x0000, 2, "FocusTV" }, { 0x3216, 0x0000, 0x0000, 0x0000, 2, "Be 1 ana" }, { 0x3217, 0x0000, 0x0000, 0x0000, 2, "Be 1 num" }, { 0x3218, 0x0000, 0x0000, 0x0000, 2, "Be Ciné 1" }, { 0x3219, 0x0000, 0x0000, 0x0000, 2, "Be Sport 1" }, { 0x321A, 0x0000, 0x0000, 0x0000, 2, "PRIME Sport 1" }, { 0x321B, 0x0000, 0x0000, 0x0000, 2, "PRIME Sport 2" }, { 0x321C, 0x0000, 0x0000, 0x0000, 2, "PRIME Action" }, { 0x321D, 0x0000, 0x0000, 0x0000, 2, "PRIME One" }, { 0x321E, 0x0000, 0x0000, 0x0000, 2, "TV Brussel" }, { 0x321F, 0x0000, 0x0000, 0x0000, 2, "AVSe" }, { 0x3221, 0x0000, 0x0000, 0x0000, 2, "TV Limburg" }, { 0x3222, 0x0000, 0x0000, 0x0000, 2, "Kanaal 3" }, { 0x3223, 0x0000, 0x0000, 0x0000, 2, "ATV" }, { 0x3224, 0x0000, 0x0000, 0x0000, 2, "ROB TV" }, { 0x3225, 0x0000, 0x0000, 0x0000, 2, "PLUG TV" }, { 0x3226, 0x0000, 0x0000, 0x0000, 2, "Sporza" }, { 0x3230, 0x0000, 0x0000, 0x0000, 2, "Télé Bruxelles" }, { 0x3231, 0x0000, 0x0000, 0x0000, 2, "Télésambre" }, { 0x3232, 0x0000, 0x0000, 0x0000, 2, "TV Com" }, { 0x3233, 0x0000, 0x0000, 0x0000, 2, "Canal Zoom" }, { 0x3234, 0x0000, 0x0000, 0x0000, 2, "Vidéoscope" }, { 0x3235, 0x0000, 0x0000, 0x0000, 2, "Canal C" }, { 0x3236, 0x0000, 0x0000, 0x0000, 2, "Télé MB" }, { 0x3237, 0x0000, 0x0000, 0x0000, 2, "Antenne Centre" }, { 0x3238, 0x0000, 0x0000, 0x0000, 2, "Télévesdre" }, { 0x3239, 0x0000, 0x0000, 0x0000, 2, "RTC Télé Liège" }, { 0x3240, 0x0000, 0x0000, 0x0000, 2, "No tele" }, { 0x3241, 0x0000, 0x0000, 0x0000, 2, "TV Lux" }, { 0x325A, 0x0000, 0x0000, 0x0000, 2, "Kanaal Z - NL" }, { 0x325B, 0x0000, 0x0000, 0x0000, 2, "CANAL Z - FR" }, { 0x326A, 0x0000, 0x0000, 0x0000, 2, "CARTOON Network - NL" }, { 0x326B, 0x0000, 0x0000, 0x0000, 2, "CARTOON Network - FR" }, { 0x327A, 0x0000, 0x0000, 0x0000, 2, "LIBERTY CHANNEL - NL" }, { 0x327B, 0x0000, 0x0000, 0x0000, 2, "LIBERTY CHANNEL - FR" }, { 0x328A, 0x0000, 0x0000, 0x0000, 2, "TCM - NL" }, { 0x328B, 0x0000, 0x0000, 0x0000, 2, "TCM - FR" }, { 0x3298, 0x0000, 0x0000, 0x0000, 2, "Mozaiek/Mosaique" }, { 0x3299, 0x0000, 0x0000, 0x0000, 2, "Info Kanaal/Canal Info" }, { 0x32A7, 0x0000, 0x0000, 0x0000, 2, "Be 1 + 1h" }, { 0x32A8, 0x0000, 0x0000, 0x0000, 2, "Be Ciné 2" }, { 0x32A9, 0x0000, 0x0000, 0x0000, 2, "Be Sport 2" }, { 0x330A, 0x2F0A, 0x3F0A, 0x0000, 9, "Arte" }, { 0x3311, 0x2F11, 0x3F11, 0x0000, 9, "RFO1" }, { 0x3312, 0x2F12, 0x3F12, 0x0000, 9, "RFO2" }, { 0x3320, 0x2F20, 0x3F20, 0x0000, 9, "Aqui TV" }, { 0x3321, 0x2F21, 0x3F21, 0x0000, 9, "TLM" }, { 0x3322, 0x2F22, 0x3F22, 0x0000, 9, "TLT" }, { 0x3333, 0x0000, 0x0000, 0x0000, 14, "TV3" }, { 0x33B2, 0x0000, 0x0000, 0x0000, 9, "Sailing Channel" }, { 0x33C1, 0x2FC1, 0x3F41, 0x0000, 9, "AB1" }, { 0x33C2, 0x2FC2, 0x3F42, 0x0000, 9, "Canal J" }, { 0x33C3, 0x2FC3, 0x3F43, 0x0000, 9, "Canal Jimmy" }, { 0x33C4, 0x2FC4, 0x3F44, 0x0000, 9, "LCI" }, { 0x33C5, 0x2FC5, 0x3F45, 0x0000, 9, "La Chaîne Météo" }, { 0x33C6, 0x2FC6, 0x3F46, 0x0000, 9, "MCM" }, { 0x33C7, 0x2FC7, 0x3F47, 0x0000, 9, "TMC Monte-Carlo" }, { 0x33C8, 0x2FC8, 0x3F48, 0x0000, 9, "Paris Première" }, { 0x33C9, 0x2FC9, 0x3F49, 0x0000, 9, "Planète" }, { 0x33CA, 0x2FCA, 0x3F4A, 0x0000, 9, "Série Club" }, { 0x33CB, 0x2FCB, 0x3F4B, 0x0000, 9, "Télétoon" }, { 0x33CC, 0x2FCC, 0x3F4C, 0x0000, 9, "Téva" }, { 0x33F1, 0x2F01, 0x3F01, 0x0000, 9, "TF1" }, { 0x33F2, 0x2F02, 0x3F02, 0x0000, 9, "France 2" }, { 0x33F3, 0x2F03, 0x3F03, 0x0000, 9, "France 3" }, { 0x33F4, 0x2F04, 0x3F04, 0x0000, 9, "Canal+" }, { 0x33F5, 0x2F05, 0x3F05, 0x0000, 9, "France 5" }, { 0x33F6, 0x2F06, 0x3F06, 0x0000, 9, "M6" }, { 0x3402, 0x0000, 0x0000, 0x0000, 7, "ETB 2" }, { 0x3403, 0x0000, 0x0000, 0x0000, 7, "CANAL 9" }, { 0x3404, 0x0000, 0x0000, 0x0000, 7, "PUNT 2" }, { 0x3405, 0x0000, 0x0000, 0x0000, 7, "CCV" }, { 0x340A, 0x0000, 0x0000, 0x0000, 7, "Arte" }, { 0x3510, 0x0000, 0x0000, 0x0000, 21, "RTP1" }, { 0x3511, 0x0000, 0x0000, 0x0000, 21, "RTP2" }, { 0x3512, 0x0000, 0x0000, 0x0000, 21, "RTPAF" }, { 0x3513, 0x0000, 0x0000, 0x0000, 21, "RTPI" }, { 0x3514, 0x0000, 0x0000, 0x0000, 21, "RTPAZ" }, { 0x3515, 0x0000, 0x0000, 0x0000, 21, "RTPM" }, { 0x3531, 0x4201, 0x3201, 0x0000, 14, "RTE1" }, { 0x3532, 0x4202, 0x3202, 0x0000, 14, "Network 2" }, { 0x3533, 0x4203, 0x3203, 0x0000, 14, "Teilifis na Gaeilge" }, { 0x3541, 0x0000, 0x0000, 0x0000, 15, "Rikisutvarpid-Sjonvarp" }, { 0x3581, 0x2601, 0x3601, 0x0000, 8, "YLE1" }, { 0x3582, 0x2602, 0x3607, 0x0000, 8, "YLE2" }, { 0x358F, 0x260F, 0x3614, 0x0000, 8, "OWL3" }, { 0x3601, 0x0000, 0x0000, 0x0000, 13, "MTV1" }, { 0x3602, 0x0000, 0x0000, 0x0000, 13, "MTV2" }, { 0x3611, 0x0000, 0x0000, 0x0000, 13, "MTV1 Budapest" }, { 0x3621, 0x0000, 0x0000, 0x0000, 13, "MTV1 Pécs" }, { 0x3622, 0x0000, 0x0000, 0x0000, 13, "tv2" }, { 0x3631, 0x0000, 0x0000, 0x0000, 13, "MTV1 Szeged" }, { 0x3636, 0x0000, 0x0000, 0x0000, 13, "Duna Televizio" }, { 0x3641, 0x0000, 0x0000, 0x0000, 13, "MTV1 Szombathely" }, { 0x3651, 0x0000, 0x0000, 0x0000, 13, "MTV1 Debrecen" }, { 0x3661, 0x0000, 0x0000, 0x0000, 13, "MTV1 Miskolc" }, { 0x3781, 0x0000, 0x0000, 0x0000, 25, "RTV" }, { 0x37E5, 0x2C25, 0x3C25, 0x0000, 10, "SSVC" }, { 0x3901, 0x0000, 0x0000, 0x0000, 16, "RAI 1" }, { 0x3902, 0x0000, 0x0000, 0x0000, 16, "RAI 2" }, { 0x3903, 0x0000, 0x0000, 0x0000, 16, "RAI 3" }, { 0x3904, 0x0000, 0x0000, 0x0000, 16, "Rete A" }, { 0x3905, 0x1505, 0x0000, 0x0000, 16, "Canale Italia" }, { 0x3909, 0x0000, 0x0000, 0x0000, 16, "Telenova" }, { 0x390A, 0x0000, 0x0000, 0x0000, 16, "Arte" }, { 0x3910, 0x0000, 0x0000, 0x0000, 16, "TRS TV" }, { 0x3911, 0x1511, 0x0000, 0x0000, 16, "Sky Cinema Classic" }, { 0x3912, 0x1512, 0x0000, 0x0000, 16, "Sky Future use (canale 109)" }, { 0x3913, 0x1513, 0x0000, 0x0000, 16, "Sky Calcio 1" }, { 0x3914, 0x1514, 0x0000, 0x0000, 16, "Sky Calcio 2" }, { 0x3915, 0x1515, 0x0000, 0x0000, 16, "Sky Calcio 3" }, { 0x3916, 0x1516, 0x0000, 0x0000, 16, "Sky Calcio 4" }, { 0x3917, 0x1517, 0x0000, 0x0000, 16, "Sky Calcio 5" }, { 0x3918, 0x1518, 0x0000, 0x0000, 16, "Sky Calcio 6" }, { 0x3919, 0x1519, 0x0000, 0x0000, 16, "Sky Calcio 7" }, { 0x3920, 0x0000, 0x0000, 0x0000, 16, "RaiNews24" }, { 0x3921, 0x0000, 0x0000, 0x0000, 16, "RAI Med" }, { 0x3922, 0x0000, 0x0000, 0x0000, 16, "RAI Sport" }, { 0x3923, 0x0000, 0x0000, 0x0000, 16, "RAI Educational" }, { 0x3924, 0x0000, 0x0000, 0x0000, 16, "RAI Edu Lab" }, { 0x3925, 0x0000, 0x0000, 0x0000, 16, "RAI Nettuno 1" }, { 0x3926, 0x0000, 0x0000, 0x0000, 16, "RAI Nettuno 2" }, { 0x3927, 0x0000, 0x0000, 0x0000, 16, "Camera Deputati" }, { 0x3928, 0x0000, 0x0000, 0x0000, 16, "RAI Mosaico" }, { 0x3930, 0x0000, 0x0000, 0x0000, 16, "Discovery Italy" }, { 0x3933, 0x0000, 0x0000, 0x0000, 16, "MTV Italia" }, { 0x3934, 0x0000, 0x0000, 0x0000, 16, "MTV Brand New" }, { 0x3935, 0x0000, 0x0000, 0x0000, 16, "MTV Hits" }, { 0x3938, 0x0000, 0x0000, 0x0000, 16, "RTV38" }, { 0x3939, 0x0000, 0x0000, 0x0000, 16, "GAY TV" }, { 0x3940, 0x0000, 0x0000, 0x0000, 16, "Video Italia" }, { 0x3941, 0x0000, 0x0000, 0x0000, 16, "SAT 2000" }, { 0x3942, 0x1542, 0x0000, 0x0000, 16, "Jimmy" }, { 0x3943, 0x1543, 0x0000, 0x0000, 16, "Planet" }, { 0x3944, 0x1544, 0x0000, 0x0000, 16, "Cartoon Network" }, { 0x3945, 0x1545, 0x0000, 0x0000, 16, "Boomerang" }, { 0x3946, 0x1546, 0x0000, 0x0000, 16, "CNN International" }, { 0x3947, 0x1547, 0x0000, 0x0000, 16, "Cartoon Network +1" }, { 0x3948, 0x1548, 0x0000, 0x0000, 16, "Sky Sports 3" }, { 0x3949, 0x1549, 0x0000, 0x0000, 16, "Sky Diretta Gol" }, { 0x3950, 0x0000, 0x0000, 0x0000, 16, "RaiSat Album" }, { 0x3951, 0x0000, 0x0000, 0x0000, 16, "RaiSat Art" }, { 0x3952, 0x0000, 0x0000, 0x0000, 16, "RaiSat Cinema" }, { 0x3953, 0x0000, 0x0000, 0x0000, 16, "RaiSat Fiction" }, { 0x3954, 0x0000, 0x0000, 0x0000, 16, "RaiSat GamberoRosso" }, { 0x3955, 0x0000, 0x0000, 0x0000, 16, "RaiSat Ragazzi" }, { 0x3956, 0x0000, 0x0000, 0x0000, 16, "RaiSat Show" }, { 0x3957, 0x0000, 0x0000, 0x0000, 16, "RaiSat G. Rosso interattivo" }, { 0x3960, 0x1560, 0x0000, 0x0000, 16, "SCI FI CHANNEL" }, { 0x3961, 0x0000, 0x0000, 0x0000, 16, "Discovery Civilisations" }, { 0x3962, 0x0000, 0x0000, 0x0000, 16, "Discovery Travel and Adventure" }, { 0x3963, 0x0000, 0x0000, 0x0000, 16, "Discovery Science" }, { 0x3968, 0x1568, 0x0000, 0x0000, 16, "Sky Meteo24" }, { 0x3970, 0x0000, 0x0000, 0x0000, 16, "Sky Cinema 2" }, { 0x3971, 0x0000, 0x0000, 0x0000, 16, "Sky Cinema 3" }, { 0x3972, 0x0000, 0x0000, 0x0000, 16, "Sky Cinema Autore" }, { 0x3973, 0x0000, 0x0000, 0x0000, 16, "Sky Cinema Max" }, { 0x3974, 0x0000, 0x0000, 0x0000, 16, "Sky Cinema 16:9" }, { 0x3975, 0x0000, 0x0000, 0x0000, 16, "Sky Sports 2" }, { 0x3976, 0x0000, 0x0000, 0x0000, 16, "Sky TG24" }, { 0x3977, 0x1577, 0x0000, 0x0000, 16, "Fox" }, { 0x3978, 0x1578, 0x0000, 0x0000, 16, "Foxlife" }, { 0x3979, 0x1579, 0x0000, 0x0000, 16, "National Geographic Channel" }, { 0x3980, 0x1580, 0x0000, 0x0000, 16, "A1" }, { 0x3981, 0x1581, 0x0000, 0x0000, 16, "History Channel" }, { 0x3985, 0x0000, 0x0000, 0x0000, 16, "FOX Kids" }, { 0x3986, 0x0000, 0x0000, 0x0000, 16, "PEOPLE TV - RETE 7" }, { 0x3987, 0x0000, 0x0000, 0x0000, 16, "FOX Kids +1" }, { 0x3988, 0x0000, 0x0000, 0x0000, 16, "LA7" }, { 0x3989, 0x0000, 0x0000, 0x0000, 16, "PrimaTV" }, { 0x398A, 0x0000, 0x0000, 0x0000, 16, "SportItalia" }, { 0x3990, 0x1590, 0x0000, 0x0000, 16, "STUDIO UNIVERSAL" }, { 0x3991, 0x0000, 0x0000, 0x0000, 16, "Marcopolo" }, { 0x3992, 0x0000, 0x0000, 0x0000, 16, "Alice" }, { 0x3993, 0x0000, 0x0000, 0x0000, 16, "Nuvolari" }, { 0x3994, 0x0000, 0x0000, 0x0000, 16, "Leonardo" }, { 0x3996, 0x1596, 0x0000, 0x0000, 16, "SUPERPIPPA CHANNEL" }, { 0x3997, 0x0000, 0x0000, 0x0000, 16, "Tele+1" }, { 0x3998, 0x0000, 0x0000, 0x0000, 16, "Tele+2" }, { 0x3999, 0x0000, 0x0000, 0x0000, 16, "Tele+3" }, { 0x39A0, 0x15A0, 0x0000, 0x0000, 16, "Sky Calcio 8" }, { 0x39A1, 0x15A1, 0x0000, 0x0000, 16, "Sky Calcio 9" }, { 0x39A2, 0x15A2, 0x0000, 0x0000, 16, "Sky Calcio 10" }, { 0x39A3, 0x15A3, 0x0000, 0x0000, 16, "Sky Calcio 11" }, { 0x39A4, 0x15A4, 0x0000, 0x0000, 16, "Sky Calcio 12" }, { 0x39A5, 0x15A5, 0x0000, 0x0000, 16, "Sky Calcio 13" }, { 0x39A6, 0x15A6, 0x0000, 0x0000, 16, "Sky Calcio 14" }, { 0x39A7, 0x15A7, 0x0000, 0x0000, 16, "Telesanterno" }, { 0x39A8, 0x15A8, 0x0000, 0x0000, 16, "Telecentro" }, { 0x39A9, 0x15A9, 0x0000, 0x0000, 16, "Telestense" }, { 0x39B0, 0x15B0, 0x0000, 0x0000, 16, "Disney Channel +1" }, { 0x39B1, 0x0000, 0x0000, 0x0000, 16, "Sailing Channel" }, { 0x39B2, 0x15B2, 0x0000, 0x0000, 16, "Disney Channel" }, { 0x39B3, 0x15B3, 0x0000, 0x0000, 16, "7 Gold-Sestra Rete" }, { 0x39B4, 0x15B4, 0x0000, 0x0000, 16, "Rete 8-VGA" }, { 0x39B5, 0x15B5, 0x0000, 0x0000, 16, "Nuovarete" }, { 0x39B6, 0x15B6, 0x0000, 0x0000, 16, "Radio Italia TV" }, { 0x39B7, 0x15B7, 0x0000, 0x0000, 16, "Rete 7" }, { 0x39B8, 0x15B8, 0x0000, 0x0000, 16, "E! Entertainment Television" }, { 0x39B9, 0x15B9, 0x0000, 0x0000, 16, "Toon Disney" }, { 0x39C7, 0x15C7, 0x0000, 0x0000, 16, "Bassano TV" }, { 0x39C8, 0x15C8, 0x0000, 0x0000, 16, "ESPN Classic Sport" }, { 0x39CA, 0x0000, 0x0000, 0x0000, 16, "VIDEOLINA" }, { 0x39D1, 0x15D1, 0x0000, 0x0000, 16, "Mediaset Premium 5" }, { 0x39D2, 0x15D2, 0x0000, 0x0000, 16, "Mediaset Premium 1" }, { 0x39D3, 0x15D3, 0x0000, 0x0000, 16, "Mediaset Premium 2" }, { 0x39D4, 0x15D4, 0x0000, 0x0000, 16, "Mediaset Premium 3" }, { 0x39D5, 0x15D5, 0x0000, 0x0000, 16, "Mediaset Premium 4" }, { 0x39D6, 0x15D6, 0x0000, 0x0000, 16, "BOING" }, { 0x39D7, 0x15D7, 0x0000, 0x0000, 16, "Playlist Italia" }, { 0x39D8, 0x15D8, 0x0000, 0x0000, 16, "MATCH MUSIC" }, { 0x39E1, 0x15E1, 0x0000, 0x0000, 16, "National Geographic +1" }, { 0x39E2, 0x15E2, 0x0000, 0x0000, 16, "Histroy Channel +1" }, { 0x39E3, 0x15E3, 0x0000, 0x0000, 16, "Sky TV" }, { 0x39E4, 0x15E4, 0x0000, 0x0000, 16, "GXT" }, { 0x39E5, 0x15E5, 0x0000, 0x0000, 16, "Playhouse Disney" }, { 0x39E6, 0x15E6, 0x0000, 0x0000, 16, "Sky Canale 224" }, { 0x39F1, 0x0000, 0x0000, 0x0000, 16, "Teleradiocity" }, { 0x39F2, 0x0000, 0x0000, 0x0000, 16, "Teleradiocity Genova" }, { 0x39F3, 0x0000, 0x0000, 0x0000, 16, "Teleradiocity Lombardia" }, { 0x39F4, 0x0000, 0x0000, 0x0000, 16, "Telestar Piemonte" }, { 0x39F5, 0x0000, 0x0000, 0x0000, 16, "Telestar Liguria" }, { 0x39F6, 0x0000, 0x0000, 0x0000, 16, "Telestar Lombardia" }, { 0x39F7, 0x0000, 0x0000, 0x0000, 16, "Italia 8 Piemonte" }, { 0x39F8, 0x0000, 0x0000, 0x0000, 16, "Italia 8 Lombardia" }, { 0x3E00, 0x0000, 0x0000, 0x0000, 7, "TVE1" }, { 0x4000, 0x0000, 0x0000, 0x0000, 17, "RTL Télé Letzebuerg" }, { 0x4101, 0x24C1, 0x3441, 0x04C1, 3, "SRG Schweizer Fernsehen SF 1" }, { 0x4102, 0x24C2, 0x3442, 0x04C2, 3, "SSR Télévis. Suisse TSR 1" }, { 0x4103, 0x24C3, 0x3443, 0x04C3, 3, "SSR Televis. svizzera TSI 1" }, { 0x4107, 0x24C7, 0x3447, 0x04C7, 3, "SRG Schweizer Fernsehen SF 2" }, { 0x4108, 0x24C8, 0x3448, 0x04C8, 3, "SSR Télévis. Suisse TSR 2" }, { 0x4109, 0x24C9, 0x3449, 0x04C9, 3, "SSR Televis. svizzera TSI 2" }, { 0x410A, 0x24CA, 0x344A, 0x04CA, 3, "SRG SSR Sat Access" }, { 0x4121, 0x2421, 0x0000, 0x0000, 3, "U1" }, { 0x4201, 0x32C1, 0x3C21, 0x0000, 4, "CT 1" }, { 0x4202, 0x32C2, 0x3C22, 0x0000, 4, "CT 2" }, { 0x4203, 0x32C3, 0x3C23, 0x0000, 4, "NOVA TV" }, { 0x4204, 0x0000, 0x0000, 0x0000, 4, "Prima TV" }, { 0x4205, 0x0000, 0x0000, 0x0000, 4, "TV Praha" }, { 0x4206, 0x0000, 0x0000, 0x0000, 4, "TV HK" }, { 0x4207, 0x0000, 0x0000, 0x0000, 4, "TV Pardubice" }, { 0x4208, 0x0000, 0x0000, 0x0000, 4, "TV Brno" }, { 0x4211, 0x32D1, 0x3B01, 0x0000, 4, "CT1 Brno" }, { 0x4212, 0x32D2, 0x3B04, 0x0000, 4, "CT2 Brno" }, { 0x4221, 0x32E1, 0x3B02, 0x0000, 4, "CT1 Ostravia" }, { 0x4222, 0x32E2, 0x3B05, 0x0000, 4, "CT2 Ostravia" }, { 0x4231, 0x32F1, 0x3C25, 0x0000, 4, "CT1 Regional" }, { 0x4232, 0x32F2, 0x3B03, 0x0000, 4, "CT2 Regional" }, { 0x42A1, 0x35A1, 0x3521, 0x0000, 24, "STV1" }, { 0x42A2, 0x35A2, 0x3522, 0x0000, 24, "STV2" }, { 0x42A3, 0x35A3, 0x3523, 0x0000, 24, "STV1 Kosice" }, { 0x42A4, 0x35A4, 0x3524, 0x0000, 24, "STV2 Kosice" }, { 0x42A5, 0x35A5, 0x3525, 0x0000, 24, "STV1 B. Bystrica" }, { 0x42A6, 0x35A6, 0x3526, 0x0000, 24, "STV2 B. Bystrica" }, { 0x4301, 0x0000, 0x0000, 0x0AC1, 1, "ORF 1" }, { 0x4302, 0x0000, 0x0000, 0x0AC2, 1, "ORF 2" }, { 0x430C, 0x0000, 0x0000, 0x0ACA, 1, "ATV+" }, { 0x4401, 0x5BFA, 0x3B7A, 0x0000, 10, "UK GOLD" }, { 0x4402, 0x2C01, 0x3C01, 0x0000, 10, "UK LIVING" }, { 0x4403, 0x2C3C, 0x3C3C, 0x0000, 10, "WIRE TV" }, { 0x4404, 0x5BF0, 0x3B70, 0x0000, 10, "CHILDREN'S CHANNEL" }, { 0x4405, 0x5BEF, 0x3B6F, 0x0000, 10, "BRAVO" }, { 0x4406, 0x5BF7, 0x3B77, 0x0000, 10, "LEARNING CHANNEL" }, { 0x4407, 0x5BF2, 0x3B72, 0x0000, 10, "DISCOVERY" }, { 0x4408, 0x5BF3, 0x3B73, 0x0000, 10, "FAMILY CHANNEL" }, { 0x4409, 0x5BF8, 0x3B78, 0x0000, 10, "Live TV" }, { 0x4420, 0x0000, 0x0000, 0x0000, 10, "Discovery Home & Leisure" }, { 0x4440, 0x2C40, 0x3C40, 0x0000, 10, "BBC2" }, { 0x4441, 0x2C41, 0x3C41, 0x0000, 10, "BBC1 NI" }, { 0x4442, 0x2C42, 0x3C42, 0x0000, 10, "BBC2 Wales" }, { 0x4444, 0x2C44, 0x3C44, 0x0000, 10, "BBC2 Scotland" }, { 0x4457, 0x2C57, 0x3C57, 0x0000, 10, "BBC World" }, { 0x4468, 0x2C68, 0x3C68, 0x0000, 10, "BBC Prime" }, { 0x4469, 0x2C69, 0x3C69, 0x0000, 10, "BBC News 24" }, { 0x447B, 0x2C7B, 0x3C7B, 0x0000, 10, "BBC1 Scotland" }, { 0x447D, 0x2C7D, 0x3C7D, 0x0000, 10, "BBC1 Wales" }, { 0x447E, 0x2C7E, 0x3C7E, 0x0000, 10, "BBC2 NI" }, { 0x447F, 0x2C7F, 0x3C7F, 0x0000, 10, "BBC1" }, { 0x44C1, 0x0000, 0x0000, 0x0000, 10, "TNT / Cartoon Network" }, { 0x44D1, 0x5BCC, 0x3B4C, 0x0000, 10, "DISNEY CHANNEL UK" }, { 0x4502, 0x2902, 0x3902, 0x0000, 6, "TV2" }, { 0x4503, 0x2904, 0x3904, 0x0000, 6, "TV2 Zulu" }, { 0x4504, 0x0000, 0x0000, 0x0000, 6, "Discovery Denmark" }, { 0x4505, 0x2905, 0x0000, 0x0000, 6, "TV2 Charlie" }, { 0x4506, 0x2906, 0x0000, 0x0000, 6, "TV Danmark" }, { 0x4507, 0x2907, 0x0000, 0x0000, 6, "Kanal 5" }, { 0x4508, 0x2908, 0x0000, 0x0000, 6, "TV2 Film" }, { 0x4600, 0x4E00, 0x3E00, 0x0000, 22, "SVT Test Transmissions" }, { 0x4601, 0x4E01, 0x3E01, 0x0000, 22, "SVT 1" }, { 0x4602, 0x4E02, 0x3E02, 0x0000, 22, "SVT 2" }, { 0x4640, 0x4E40, 0x3E40, 0x0000, 22, "TV 4" }, { 0x4701, 0x0000, 0x0000, 0x0000, 19, "NRK1" }, { 0x4702, 0x0000, 0x0000, 0x0000, 19, "TV 2" }, { 0x4703, 0x0000, 0x0000, 0x0000, 19, "NRK2" }, { 0x4704, 0x0000, 0x0000, 0x0000, 19, "TV Norge" }, { 0x4720, 0x0000, 0x0000, 0x0000, 19, "Discovery Nordic" }, { 0x4801, 0x0000, 0x0000, 0x0000, 20, "TVP1" }, { 0x4802, 0x0000, 0x0000, 0x0000, 20, "TVP2" }, { 0x4810, 0x0000, 0x0000, 0x0000, 20, "TV Polonia" }, { 0x4820, 0x0000, 0x0000, 0x0000, 20, "TVN" }, { 0x4821, 0x0000, 0x0000, 0x0000, 20, "TVN Siedem" }, { 0x4822, 0x0000, 0x0000, 0x0000, 20, "TVN24" }, { 0x4830, 0x0000, 0x0000, 0x0000, 20, "Discovery Poland" }, { 0x4831, 0x0000, 0x0000, 0x0000, 20, "Animal Planet" }, { 0x4880, 0x0000, 0x0000, 0x0000, 20, "TVP Warszawa" }, { 0x4881, 0x0000, 0x0000, 0x0000, 20, "TVP Bialystok" }, { 0x4882, 0x0000, 0x0000, 0x0000, 20, "TVP Bydgoszcz" }, { 0x4883, 0x0000, 0x0000, 0x0000, 20, "TVP Gdansk" }, { 0x4884, 0x0000, 0x0000, 0x0000, 20, "TVP Katowice" }, { 0x4886, 0x0000, 0x0000, 0x0000, 20, "TVP Krakow" }, { 0x4887, 0x0000, 0x0000, 0x0000, 20, "TVP Lublin" }, { 0x4888, 0x0000, 0x0000, 0x0000, 20, "TVP Lodz" }, { 0x4890, 0x0000, 0x0000, 0x0000, 20, "TVP Rzeszow" }, { 0x4891, 0x0000, 0x0000, 0x0000, 20, "TVP Poznan" }, { 0x4892, 0x0000, 0x0000, 0x0000, 20, "TVP Szczecin" }, { 0x4893, 0x0000, 0x0000, 0x0000, 20, "TVP Wroclaw" }, { 0x4901, 0x0000, 0x3D41, 0x0DC1, 5, "ARD" }, { 0x4902, 0x0000, 0x3D42, 0x0DC2, 5, "ZDF" }, { 0x4908, 0x0000, 0x0000, 0x0DC8, 5, "Phoenix" }, { 0x490A, 0x0000, 0x3D05, 0x0D85, 5, "Arte" }, { 0x490C, 0x0000, 0x0000, 0x0D8E, 5, "VOX" }, { 0x4941, 0x0000, 0x0000, 0x0D41, 5, "FESTIVAL" }, { 0x4942, 0x0000, 0x0000, 0x0D42, 5, "MUXX" }, { 0x4943, 0x0000, 0x0000, 0x0D43, 5, "EXTRA" }, { 0x4944, 0x0000, 0x0000, 0x0000, 5, "BR-Alpha" }, { 0x4982, 0x0000, 0x0000, 0x0D82, 5, "ORB-3" }, { 0x49BD, 0x0000, 0x0000, 0x0D77, 5, "1-2-3.TV" }, { 0x49BE, 0x0000, 0x0000, 0x0D78, 5, "TELE-5" }, { 0x49BF, 0x0000, 0x0000, 0x0D7F, 5, "Home Shopping Europe" }, { 0x49C7, 0x0000, 0x0000, 0x0DC7, 5, "3sat" }, { 0x49C9, 0x0000, 0x0000, 0x0DC9, 5, "Kinderkanal" }, { 0x49CB, 0x0000, 0x3D4B, 0x0DCB, 5, "BR-3" }, { 0x49CF, 0x2903, 0x3903, 0x0000, 6, "DR2" }, { 0x49D4, 0x0000, 0x0000, 0x0DD5, 5, "NDR-3 Dreiländerweit" }, { 0x49D9, 0x0000, 0x0000, 0x0DDA, 5, "RB-3" }, { 0x49DC, 0x0000, 0x0000, 0x0DDC, 5, "SFB-3" }, { 0x49DF, 0x0000, 0x0000, 0x0DDF, 5, "SR-1 Regional" }, { 0x49E1, 0x0000, 0x0000, 0x0DE1, 5, "SW 3 Baden-Württemberg" }, { 0x49E4, 0x0000, 0x0000, 0x0DE4, 5, "SW 3 Rheinland-Pfalz" }, { 0x49E6, 0x0000, 0x0000, 0x0DE6, 5, "WDR-3" }, { 0x49FE, 0x0000, 0x0000, 0x0DFE, 5, "MDR-3" }, { 0x49FF, 0x0000, 0x0000, 0x0DCF, 5, "Hessen 3" }, { 0x4D54, 0x2C14, 0x3C14, 0x0000, 10, "MTV" }, { 0x4D58, 0x2C20, 0x3C20, 0x0000, 10, "VH-1" }, { 0x4D59, 0x2C21, 0x3C21, 0x0000, 10, "VH-1 German" }, { 0x4D5A, 0x5BF4, 0x3B74, 0x0000, 10, "GRANADA PLUS" }, { 0x4D5B, 0x5BF5, 0x3B75, 0x0000, 10, "GRANADA Timeshare" }, { 0x5AAF, 0x2C3F, 0x3C3F, 0x0000, 10, "HTV" }, { 0x5C44, 0x0000, 0x0000, 0x0000, 10, "QVC UK" }, { 0x5C49, 0x0000, 0x0000, 0x0D7D, 5, "QVC" }, { 0x7392, 0x2901, 0x3901, 0x0000, 6, "DR1" }, { 0x7700, 0x0000, 0x0000, 0x07C0, 27, "1+1" }, { 0x7705, 0x0000, 0x0000, 0x07C5, 27, "M1" }, { 0x7707, 0x0000, 0x0000, 0x0000, 27, "ICTV" }, { 0x7708, 0x0000, 0x0000, 0x07C8, 27, "Novy Kanal" }, { 0x82DD, 0x2C1D, 0x3C1D, 0x0000, 10, "CARLTON TV" }, { 0x82E1, 0x2C05, 0x3C05, 0x0000, 10, "CARLTON SELECT" }, { 0x833B, 0x2C3D, 0x3C3D, 0x0000, 10, "ULSTER TV" }, { 0x884B, 0x2C0B, 0x3C0B, 0x0000, 10, "LWT" }, { 0x8E71, 0x2C31, 0x3C31, 0x0E86, 10, "NBC Europe" }, { 0x8E72, 0x2C35, 0x3C35, 0x0000, 10, "CNBC Europe" }, { 0x9001, 0x4301, 0x3301, 0x0000, 26, "TRT-1" }, { 0x9002, 0x4302, 0x3302, 0x0000, 26, "TRT-2" }, { 0x9003, 0x4303, 0x3303, 0x0000, 26, "TRT-3" }, { 0x9004, 0x4304, 0x3304, 0x0000, 26, "TRT-4" }, { 0x9005, 0x4305, 0x3305, 0x0000, 26, "TRT-INT" }, { 0x9006, 0x4306, 0x3306, 0x0000, 26, "AVRASYA" }, { 0x9007, 0x0000, 0x0000, 0x0000, 26, "Show TV" }, { 0x9008, 0x0000, 0x0000, 0x0000, 26, "Cine 5" }, { 0x9009, 0x0000, 0x0000, 0x0000, 26, "Super Sport" }, { 0x900A, 0x0000, 0x0000, 0x0000, 26, "ATV" }, { 0x900B, 0x0000, 0x0000, 0x0000, 26, "KANAL D" }, { 0x900C, 0x0000, 0x0000, 0x0000, 26, "EURO D" }, { 0x900D, 0x0000, 0x0000, 0x0000, 26, "EKO TV" }, { 0x900E, 0x0000, 0x0000, 0x0000, 26, "BRAVO TV" }, { 0x900F, 0x0000, 0x0000, 0x0000, 26, "GALAKSI TV" }, { 0x9010, 0x0000, 0x0000, 0x0000, 26, "FUN TV" }, { 0x9011, 0x0000, 0x0000, 0x0000, 26, "TEMPO TV" }, { 0x9014, 0x0000, 0x0000, 0x0000, 26, "TGRT" }, { 0x9020, 0x0000, 0x0000, 0x0000, 26, "STAR TV" }, { 0x9021, 0x0000, 0x0000, 0x0000, 26, "STARMAX" }, { 0x9022, 0x0000, 0x0000, 0x0000, 26, "KANAL 6" }, { 0x9023, 0x0000, 0x0000, 0x0000, 26, "STAR 4" }, { 0x9024, 0x0000, 0x0000, 0x0000, 26, "STAR 5" }, { 0x9025, 0x0000, 0x0000, 0x0000, 26, "STAR 6" }, { 0x9026, 0x0000, 0x0000, 0x0000, 26, "STAR 7" }, { 0x9027, 0x0000, 0x0000, 0x0000, 26, "STAR 8" }, { 0x9602, 0x2C02, 0x3C02, 0x0000, 10, "CHANNEL 5 (1)" }, { 0xA460, 0x0000, 0x0000, 0x0000, 10, "Nickelodeon UK" }, { 0xA465, 0x0000, 0x0000, 0x0000, 10, "Paramount Comedy Channel UK" }, { 0xA55A, 0x0000, 0x0000, 0x0000, 7, "Canal+" }, { 0xA82C, 0x2C2C, 0x3C2C, 0x0000, 10, "TYNE TEES TV" }, { 0xAAE1, 0x0000, 0x0000, 0x0000, 23, "SLO1" }, { 0xAAE2, 0x0000, 0x0000, 0x0000, 23, "SLO2" }, { 0xAAE3, 0x0000, 0x0000, 0x0000, 23, "KC" }, { 0xAAE4, 0x0000, 0x0000, 0x0000, 23, "TLM" }, { 0xAAF1, 0x0000, 0x0000, 0x0000, 23, "SLO3" }, { 0xADD8, 0x2C18, 0x3C18, 0x0000, 10, "GRANADA TV" }, { 0xADDC, 0x5BD2, 0x3B52, 0x0000, 10, "GMTV" }, { 0xB4C7, 0x2C07, 0x3C07, 0x0000, 10, "S4C" }, { 0xB7F7, 0x2C27, 0x3C27, 0x0000, 10, "BORDER TV" }, { 0xBA01, 0x0000, 0x0000, 0x0000, 7, "ETB 1" }, { 0xC47B, 0x2C3B, 0x3C3B, 0x0000, 10, "CHANNEL 5 (4)" }, { 0xC4F4, 0x42F4, 0x3274, 0x0000, 10, "FilmFour" }, { 0xC8DE, 0x2C1E, 0x3C1E, 0x0000, 10, "ITV NETWORK" }, { 0xCA03, 0x0000, 0x0000, 0x0000, 7, "TV3" }, { 0xCA33, 0x0000, 0x0000, 0x0000, 7, "C33" }, { 0xE100, 0x0000, 0x0000, 0x0000, 7, "TVE2" }, { 0xE200, 0x0000, 0x0000, 0x0000, 7, "TVE Internacional Europa" }, { 0xE500, 0x1FE5, 0x0000, 0x0000, 7, "Tele5" }, { 0xF101, 0x2FE2, 0x3F62, 0x0000, 9, "Eurosport" }, { 0xF102, 0x2FE3, 0x3F63, 0x0000, 9, "Eurosport2" }, { 0xF103, 0x2FE4, 0x3F64, 0x0000, 9, "Eurosportnews" }, { 0xF33A, 0x2C3A, 0x3C3A, 0x0000, 10, "GRAMPIAN TV" }, { 0xF500, 0x2FE5, 0x3F65, 0x0000, 9, "TV5" }, { 0xF9D2, 0x2C12, 0x3C12, 0x0000, 10, "SCOTTISH TV" }, { 0xFA04, 0x0000, 0x0000, 0x0000, 16, "Rete 4" }, { 0xFA05, 0x0000, 0x0000, 0x0000, 16, "Canale 5" }, { 0xFA06, 0x0000, 0x0000, 0x0000, 16, "Italia 1" }, { 0xFA08, 0x0000, 0x0000, 0x0000, 16, "TMC" }, { 0xFA2C, 0x2C2D, 0x3C2D, 0x0000, 10, "YORKSHIRE TV" }, { 0xFB9C, 0x2C1C, 0x3C1C, 0x0000, 10, "ANGLIA TV" }, { 0xFCD1, 0x2C11, 0x3C11, 0x0000, 10, "CHANNEL 4" }, { 0xFCE4, 0x2C24, 0x3C24, 0x0000, 10, "CHANNEL TV" }, { 0xFCF3, 0x2C13, 0x3C13, 0x0000, 10, "RACING CHANNEL" }, { 0xFCF4, 0x5BF6, 0x3B76, 0x0000, 10, "HISTORY CHANNEL" }, { 0xFCF5, 0x2C15, 0x3C15, 0x0000, 10, "SCI FI CHANNEL" }, { 0xFCF6, 0x5BF9, 0x3B79, 0x0000, 10, "SKY TRAVEL" }, { 0xFCF7, 0x2C17, 0x3C17, 0x0000, 10, "SKY SOAPS" }, { 0xFCF8, 0x2C08, 0x3C08, 0x0000, 10, "SKY SPORTS 2" }, { 0xFCF9, 0x2C19, 0x3C19, 0x0000, 10, "SKY GOLD" }, { 0xFCFA, 0x2C1A, 0x3C1A, 0x0000, 10, "SKY SPORTS" }, { 0xFCFB, 0x2C1B, 0x3C1B, 0x0000, 10, "MOVIE CHANNEL" }, { 0xFCFC, 0x2C0C, 0x3C0C, 0x0000, 10, "SKY MOVIES PLUS" }, { 0xFCFD, 0x2C0D, 0x3C0D, 0x0000, 10, "SKY NEWS" }, { 0xFCFE, 0x2C0E, 0x3C0E, 0x0000, 10, "SKY ONE" }, { 0xFCFF, 0x2C0F, 0x3C0F, 0x0000, 10, "SKY TWO" }, { 0xFE01, 0x2FE1, 0x3F61, 0x0000, 9, "Euronews" }, }; /* 615 */ static const uint16_t lookup_cni_8302 [] = { 278, /* 1505 */ 282, /* 1511 */ 283, /* 1512 */ 284, /* 1513 */ 285, /* 1514 */ 286, /* 1515 */ 287, /* 1516 */ 288, /* 1517 */ 289, /* 1518 */ 290, /* 1519 */ 308, /* 1542 */ 309, /* 1543 */ 310, /* 1544 */ 311, /* 1545 */ 312, /* 1546 */ 313, /* 1547 */ 314, /* 1548 */ 315, /* 1549 */ 324, /* 1560 */ 328, /* 1568 */ 336, /* 1577 */ 337, /* 1578 */ 338, /* 1579 */ 339, /* 1580 */ 340, /* 1581 */ 347, /* 1590 */ 352, /* 1596 */ 356, /* 15A0 */ 357, /* 15A1 */ 358, /* 15A2 */ 359, /* 15A3 */ 360, /* 15A4 */ 361, /* 15A5 */ 362, /* 15A6 */ 363, /* 15A7 */ 364, /* 15A8 */ 365, /* 15A9 */ 366, /* 15B0 */ 368, /* 15B2 */ 369, /* 15B3 */ 370, /* 15B4 */ 371, /* 15B5 */ 372, /* 15B6 */ 373, /* 15B7 */ 374, /* 15B8 */ 375, /* 15B9 */ 376, /* 15C7 */ 377, /* 15C8 */ 379, /* 15D1 */ 380, /* 15D2 */ 381, /* 15D3 */ 382, /* 15D4 */ 383, /* 15D5 */ 384, /* 15D6 */ 385, /* 15D7 */ 386, /* 15D8 */ 387, /* 15E1 */ 388, /* 15E2 */ 389, /* 15E3 */ 390, /* 15E4 */ 391, /* 15E5 */ 392, /* 15E6 */ 157, /* 1601 */ 158, /* 1602 */ 127, /* 1604 */ 161, /* 1605 */ 162, /* 1606 */ 586, /* 1FE5 */ 135, /* 2101 */ 136, /* 2102 */ 137, /* 2103 */ 410, /* 2421 */ 403, /* 24C1 */ 404, /* 24C2 */ 405, /* 24C3 */ 406, /* 24C7 */ 407, /* 24C8 */ 408, /* 24C9 */ 409, /* 24CA */ 259, /* 2601 */ 260, /* 2602 */ 261, /* 260F */ 527, /* 2901 */ 457, /* 2902 */ 509, /* 2903 */ 458, /* 2904 */ 460, /* 2905 */ 461, /* 2906 */ 462, /* 2907 */ 463, /* 2908 */ 435, /* 2C01 */ 564, /* 2C02 */ 533, /* 2C05 */ 576, /* 2C07 */ 606, /* 2C08 */ 131, /* 2C09 */ 535, /* 2C0B */ 610, /* 2C0C */ 611, /* 2C0D */ 612, /* 2C0E */ 613, /* 2C0F */ 599, /* 2C11 */ 592, /* 2C12 */ 601, /* 2C13 */ 519, /* 2C14 */ 603, /* 2C15 */ 605, /* 2C17 */ 574, /* 2C18 */ 607, /* 2C19 */ 608, /* 2C1A */ 609, /* 2C1B */ 598, /* 2C1C */ 532, /* 2C1D */ 581, /* 2C1E */ 520, /* 2C20 */ 521, /* 2C21 */ 600, /* 2C24 */ 273, /* 2C25 */ 577, /* 2C27 */ 133, /* 2C2B */ 568, /* 2C2C */ 597, /* 2C2D */ 132, /* 2C30 */ 536, /* 2C31 */ 130, /* 2C34 */ 537, /* 2C35 */ 134, /* 2C37 */ 590, /* 2C3A */ 579, /* 2C3B */ 436, /* 2C3C */ 534, /* 2C3D */ 524, /* 2C3F */ 444, /* 2C40 */ 445, /* 2C41 */ 446, /* 2C42 */ 447, /* 2C44 */ 448, /* 2C57 */ 449, /* 2C68 */ 450, /* 2C69 */ 451, /* 2C7B */ 452, /* 2C7D */ 453, /* 2C7E */ 454, /* 2C7F */ 238, /* 2F01 */ 239, /* 2F02 */ 240, /* 2F03 */ 241, /* 2F04 */ 242, /* 2F05 */ 243, /* 2F06 */ 218, /* 2F0A */ 219, /* 2F11 */ 220, /* 2F12 */ 221, /* 2F20 */ 222, /* 2F21 */ 223, /* 2F22 */ 226, /* 2FC1 */ 227, /* 2FC2 */ 228, /* 2FC3 */ 229, /* 2FC4 */ 230, /* 2FC5 */ 231, /* 2FC6 */ 232, /* 2FC7 */ 233, /* 2FC8 */ 234, /* 2FC9 */ 235, /* 2FCA */ 236, /* 2FCB */ 237, /* 2FCC */ 614, /* 2FE1 */ 587, /* 2FE2 */ 588, /* 2FE3 */ 589, /* 2FE4 */ 591, /* 2FE5 */ 411, /* 32C1 */ 412, /* 32C2 */ 413, /* 32C3 */ 419, /* 32D1 */ 420, /* 32D2 */ 421, /* 32E1 */ 422, /* 32E2 */ 423, /* 32F1 */ 424, /* 32F2 */ 425, /* 35A1 */ 426, /* 35A2 */ 427, /* 35A3 */ 428, /* 35A4 */ 429, /* 35A5 */ 430, /* 35A6 */ 255, /* 4201 */ 256, /* 4202 */ 257, /* 4203 */ 580, /* 42F4 */ 538, /* 4301 */ 539, /* 4302 */ 540, /* 4303 */ 541, /* 4304 */ 542, /* 4305 */ 543, /* 4306 */ 138, /* 4801 */ 139, /* 4802 */ 140, /* 4803 */ 141, /* 4804 */ 142, /* 4805 */ 143, /* 4806 */ 144, /* 4820 */ 156, /* 4847 */ 464, /* 4E00 */ 465, /* 4E01 */ 466, /* 4E02 */ 467, /* 4E40 */ 456, /* 5BCC */ 575, /* 5BD2 */ 438, /* 5BEF */ 437, /* 5BF0 */ 125, /* 5BF1 */ 440, /* 5BF2 */ 441, /* 5BF3 */ 522, /* 5BF4 */ 523, /* 5BF5 */ 602, /* 5BF6 */ 439, /* 5BF7 */ 442, /* 5BF8 */ 604, /* 5BF9 */ 434, /* 5BFA */ }; static const uint16_t lookup_cni_pdc_b [] = { 135, /* 3101 */ 136, /* 3102 */ 137, /* 3103 */ 255, /* 3201 */ 256, /* 3202 */ 257, /* 3203 */ 580, /* 3274 */ 538, /* 3301 */ 539, /* 3302 */ 540, /* 3303 */ 541, /* 3304 */ 542, /* 3305 */ 543, /* 3306 */ 403, /* 3441 */ 404, /* 3442 */ 405, /* 3443 */ 406, /* 3447 */ 407, /* 3448 */ 408, /* 3449 */ 409, /* 344A */ 425, /* 3521 */ 426, /* 3522 */ 427, /* 3523 */ 428, /* 3524 */ 429, /* 3525 */ 430, /* 3526 */ 259, /* 3601 */ 158, /* 3602 */ 157, /* 3603 */ 127, /* 3604 */ 161, /* 3605 */ 162, /* 3606 */ 260, /* 3607 */ 261, /* 3614 */ 138, /* 3801 */ 139, /* 3802 */ 140, /* 3803 */ 141, /* 3804 */ 142, /* 3805 */ 143, /* 3806 */ 144, /* 3820 */ 156, /* 3847 */ 527, /* 3901 */ 457, /* 3902 */ 509, /* 3903 */ 458, /* 3904 */ 419, /* 3B01 */ 421, /* 3B02 */ 424, /* 3B03 */ 420, /* 3B04 */ 422, /* 3B05 */ 456, /* 3B4C */ 575, /* 3B52 */ 438, /* 3B6F */ 437, /* 3B70 */ 125, /* 3B71 */ 440, /* 3B72 */ 441, /* 3B73 */ 522, /* 3B74 */ 523, /* 3B75 */ 602, /* 3B76 */ 439, /* 3B77 */ 442, /* 3B78 */ 604, /* 3B79 */ 434, /* 3B7A */ 435, /* 3C01 */ 564, /* 3C02 */ 533, /* 3C05 */ 576, /* 3C07 */ 606, /* 3C08 */ 131, /* 3C09 */ 535, /* 3C0B */ 610, /* 3C0C */ 611, /* 3C0D */ 612, /* 3C0E */ 613, /* 3C0F */ 599, /* 3C11 */ 592, /* 3C12 */ 601, /* 3C13 */ 519, /* 3C14 */ 603, /* 3C15 */ 605, /* 3C17 */ 574, /* 3C18 */ 607, /* 3C19 */ 608, /* 3C1A */ 609, /* 3C1B */ 598, /* 3C1C */ 532, /* 3C1D */ 581, /* 3C1E */ 520, /* 3C20 */ 521, /* 3C21 */ 412, /* 3C22 */ 413, /* 3C23 */ 600, /* 3C24 */ 423, /* 3C25 */ 577, /* 3C27 */ 133, /* 3C2B */ 568, /* 3C2C */ 597, /* 3C2D */ 132, /* 3C30 */ 536, /* 3C31 */ 130, /* 3C34 */ 537, /* 3C35 */ 134, /* 3C37 */ 590, /* 3C3A */ 579, /* 3C3B */ 436, /* 3C3C */ 534, /* 3C3D */ 524, /* 3C3F */ 444, /* 3C40 */ 445, /* 3C41 */ 446, /* 3C42 */ 447, /* 3C44 */ 448, /* 3C57 */ 449, /* 3C68 */ 450, /* 3C69 */ 451, /* 3C7B */ 452, /* 3C7D */ 453, /* 3C7E */ 454, /* 3C7F */ 496, /* 3D05 */ 493, /* 3D41 */ 494, /* 3D42 */ 508, /* 3D4B */ 464, /* 3E00 */ 465, /* 3E01 */ 466, /* 3E02 */ 467, /* 3E40 */ 238, /* 3F01 */ 239, /* 3F02 */ 240, /* 3F03 */ 241, /* 3F04 */ 242, /* 3F05 */ 243, /* 3F06 */ 218, /* 3F0A */ 219, /* 3F11 */ 220, /* 3F12 */ 221, /* 3F20 */ 222, /* 3F21 */ 223, /* 3F22 */ 226, /* 3F41 */ 227, /* 3F42 */ 228, /* 3F43 */ 229, /* 3F44 */ 230, /* 3F45 */ 231, /* 3F46 */ 232, /* 3F47 */ 233, /* 3F48 */ 234, /* 3F49 */ 235, /* 3F4A */ 236, /* 3F4B */ 237, /* 3F4C */ 614, /* 3F61 */ 587, /* 3F62 */ 588, /* 3F63 */ 589, /* 3F64 */ 591, /* 3F65 */ }; static const uint16_t lookup_cni_vps [] = { 0, /* 0481 */ 1, /* 0482 */ 2, /* 0483 */ 3, /* 0484 */ 4, /* 0485 */ 5, /* 0486 */ 6, /* 0487 */ 7, /* 0488 */ 403, /* 04C1 */ 404, /* 04C2 */ 405, /* 04C3 */ 406, /* 04C7 */ 407, /* 04C8 */ 408, /* 04C9 */ 409, /* 04CA */ 528, /* 07C0 */ 529, /* 07C5 */ 531, /* 07C8 */ 431, /* 0AC1 */ 432, /* 0AC2 */ 8, /* 0AC3 */ 433, /* 0ACA */ 9, /* 0ACB */ 10, /* 0ACC */ 11, /* 0ACD */ 12, /* 0ACE */ 13, /* 0ACF */ 14, /* 0AD0 */ 15, /* 0AD1 */ 16, /* 0AD2 */ 17, /* 0AD3 */ 128, /* 0D14 */ 498, /* 0D41 */ 499, /* 0D42 */ 500, /* 0D43 */ 18, /* 0D75 */ 19, /* 0D76 */ 503, /* 0D77 */ 504, /* 0D78 */ 20, /* 0D79 */ 21, /* 0D7A */ 22, /* 0D7B */ 23, /* 0D7C */ 526, /* 0D7D */ 24, /* 0D7E */ 505, /* 0D7F */ 25, /* 0D81 */ 502, /* 0D82 */ 496, /* 0D85 */ 26, /* 0D87 */ 27, /* 0D88 */ 28, /* 0D89 */ 29, /* 0D8A */ 30, /* 0D8B */ 31, /* 0D8C */ 32, /* 0D8D */ 497, /* 0D8E */ 129, /* 0D8F */ 33, /* 0D90 */ 34, /* 0D91 */ 35, /* 0D92 */ 36, /* 0D94 */ 37, /* 0D95 */ 38, /* 0D96 */ 39, /* 0D97 */ 40, /* 0D98 */ 41, /* 0D99 */ 42, /* 0D9A */ 43, /* 0D9B */ 44, /* 0D9C */ 45, /* 0D9D */ 46, /* 0D9E */ 47, /* 0D9F */ 48, /* 0DA0 */ 49, /* 0DA1 */ 50, /* 0DA2 */ 51, /* 0DA3 */ 52, /* 0DA4 */ 53, /* 0DA5 */ 54, /* 0DA6 */ 55, /* 0DA7 */ 56, /* 0DA8 */ 57, /* 0DA9 */ 58, /* 0DAA */ 59, /* 0DAB */ 60, /* 0DAC */ 61, /* 0DAD */ 62, /* 0DAE */ 63, /* 0DAF */ 64, /* 0DB0 */ 65, /* 0DB1 */ 66, /* 0DB2 */ 67, /* 0DB3 */ 68, /* 0DB4 */ 69, /* 0DB5 */ 70, /* 0DB6 */ 71, /* 0DB7 */ 72, /* 0DB8 */ 73, /* 0DB9 */ 74, /* 0DBA */ 75, /* 0DBB */ 76, /* 0DBD */ 77, /* 0DBE */ 78, /* 0DBF */ 493, /* 0DC1 */ 494, /* 0DC2 */ 79, /* 0DC3 */ 80, /* 0DC4 */ 81, /* 0DC5 */ 506, /* 0DC7 */ 495, /* 0DC8 */ 507, /* 0DC9 */ 82, /* 0DCA */ 508, /* 0DCB */ 83, /* 0DCC */ 84, /* 0DCD */ 85, /* 0DCE */ 518, /* 0DCF */ 86, /* 0DD0 */ 87, /* 0DD1 */ 88, /* 0DD2 */ 89, /* 0DD3 */ 90, /* 0DD4 */ 510, /* 0DD5 */ 91, /* 0DD6 */ 92, /* 0DD7 */ 93, /* 0DD8 */ 94, /* 0DD9 */ 511, /* 0DDA */ 95, /* 0DDB */ 512, /* 0DDC */ 96, /* 0DDD */ 97, /* 0DDE */ 513, /* 0DDF */ 98, /* 0DE0 */ 514, /* 0DE1 */ 99, /* 0DE2 */ 100, /* 0DE3 */ 515, /* 0DE4 */ 101, /* 0DE5 */ 516, /* 0DE6 */ 102, /* 0DE7 */ 103, /* 0DE8 */ 104, /* 0DE9 */ 105, /* 0DEA */ 106, /* 0DEB */ 107, /* 0DEC */ 108, /* 0DED */ 109, /* 0DEE */ 110, /* 0DEF */ 111, /* 0DF0 */ 112, /* 0DF1 */ 113, /* 0DF2 */ 114, /* 0DF3 */ 115, /* 0DF4 */ 116, /* 0DF5 */ 117, /* 0DF6 */ 118, /* 0DF7 */ 119, /* 0DF8 */ 120, /* 0DF9 */ 121, /* 0DFA */ 122, /* 0DFB */ 123, /* 0DFC */ 124, /* 0DFD */ 517, /* 0DFE */ 536, /* 0E86 */ }; static const struct ttx_header ttx_header_table [] = { { "MTV", "### MTVtext ##.##.## " }, { "UPC Telekabel", "###?Wiener?Kabel?Text " }, { "TW1", "###?TW1 " }, }; zapping-0.10cvs6/libvbi/ccfont3.pbm 644 764 144 15163 10305456044 12342 P4 # CREATOR: XV Version 3.10a Rev: 12/29/94 (PNG patch 1.2) # CREATOR: The GIMP's PNM Filter Version 1.0 512 104 98?8p?88888<?8p 88???wp  88888;8?vn 9 8888?888?88?w89<??88888888<8?vn089<>|88888888?8|<<88vp8??889<p888088888?98|p?8888p?;x8p?p<<?<8p>?889v8p888p8888<?8``????88888??888888p8888888p8<<<888888888p898888888898>|?88888888;8?88??8|??8?;8?8?8p9889?888888898;8888|8p8?8888888888p898<8888888x88888???888?88888898888?888<?8??8<????88888????88888889988888889p8p8;8?8888?88?98888888;88?88?8888888899888888pxp888<8??88<98?8?88?88?8?8ppppp88 p~8???wp  88888;8?vn 9 8888?888?88?w89<??88p8pp8p8ppxp8`p8s>x|p8pp8pp8p8?????p8p8p88????889s8pp8p8p8p8p8p8p89?8x????????8p0`0``?88?p88p98888888898>|?888888p8;8?88??8|??8?;8?8?89889?888888898;8888|8p8?88p8p888pppp88p8p8pps8px8pp8pppp8p8<8pppp8p8pp8?p8p8p8pp8??8pp8??p~8??8<????88888????88888889988888889p8p8;8?8888?88?98888888;88?88?p8p8p8pp8pp8p8ss8p8p8p8p8p8p8<p8ppxp8??????p8px?s8p8??p?8pp8??p8p88p88?~p8?zapping-0.10cvs6/libvbi/ccfont3.xbm 644 764 144 121405 10433067273 12373 /* Generated file, do not edit */ #define ccfont3_width 4096 #define ccfont3_height 13 static const uint8_t ccfont3_bits [] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x07, 0x00, 0x07, 0x00, 0x07, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x1f, 0xf8, 0x39, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x80, 0x01, 0x80, 0x01, 0x80, 0x01, 0x80, 0x01, 0x80, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x03, 0x00, 0x06, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x1f, 0xf8, 0x39, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x0e, 0x00, 0x0e, 0x00, 0x0e, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x3f, 0xf0, 0x73, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x03, 0x00, 0x03, 0x00, 0x03, 0x00, 0x03, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x06, 0x00, 0x0c, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x3f, 0xf0, 0x73, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x03, 0x80, 0x03, 0x80, 0x03, 0x80, 0x03, 0x80, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9c, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0xe0, 0x07, 0xe0, 0x07, 0xe0, 0x07, 0xe0, 0x07, 0xe0, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x3c, 0x1c, 0xf0, 0x01, 0x80, 0x03, 0x00, 0x07, 0xe0, 0x00, 0x80, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x07, 0x00, 0x03, 0xe0, 0x07, 0x80, 0x01, 0x00, 0x03, 0x80, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9c, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x07, 0x00, 0x07, 0x00, 0x07, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0x80, 0x03, 0xc0, 0x0f, 0xc0, 0x0f, 0xc0, 0x0f, 0xc0, 0x0f, 0xc0, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x78, 0x38, 0xe0, 0x03, 0x00, 0x07, 0x00, 0x0e, 0xc0, 0x01, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x0f, 0x00, 0x06, 0xc0, 0x0f, 0x00, 0x03, 0x00, 0x06, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x01, 0xc0, 0x01, 0xc0, 0x01, 0xc0, 0x01, 0xc0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x38, 0x00, 0x00, 0xfc, 0x3f, 0xf8, 0x1f, 0xe0, 0x07, 0x1c, 0x0e, 0xc0, 0x01, 0xfc, 0x33, 0x00, 0x00, 0xc0, 0x0f, 0xe0, 0x3f, 0x80, 0x03, 0x00, 0x00, 0x80, 0x03, 0x38, 0x1c, 0x38, 0x1c, 0x38, 0x1c, 0x38, 0x1c, 0x38, 0x1c, 0x00, 0x00, 0xc0, 0x01, 0x38, 0x07, 0xe0, 0x1c, 0xf8, 0x1f, 0x6e, 0x0e, 0xb8, 0x03, 0x80, 0x03, 0x80, 0x03, 0xc0, 0x01, 0xc0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0xf8, 0x1f, 0xc0, 0x01, 0xf8, 0x1f, 0xf8, 0x1f, 0x00, 0x0f, 0xfc, 0x3f, 0xf8, 0x1f, 0xfc, 0x3f, 0xf8, 0x1f, 0xf8, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x1c, 0x00, 0xf8, 0x1f, 0xe0, 0x1f, 0xe0, 0x07, 0xfc, 0x1f, 0xf0, 0x1f, 0xfc, 0x0f, 0xfc, 0x3f, 0xfc, 0x3f, 0xf0, 0x1f, 0x1c, 0x38, 0xf0, 0x07, 0x00, 0x38, 0x1c, 0x38, 0x1c, 0x00, 0x1c, 0x38, 0x1c, 0x38, 0xf0, 0x0f, 0xfc, 0x1f, 0xf0, 0x0f, 0xfc, 0x1f, 0xf8, 0x1f, 0xfe, 0x3f, 0x1c, 0x38, 0x1c, 0x38, 0x1c, 0x38, 0x1c, 0x38, 0x1c, 0x1c, 0xfe, 0x3f, 0xe0, 0x00, 0x80, 0x01, 0x00, 0x07, 0xc0, 0x00, 0x80, 0x01, 0xc0, 0x01, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x1c, 0x00, 0xc0, 0x01, 0xc0, 0x01, 0x1c, 0x00, 0xf8, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x38, 0x00, 0x00, 0xfc, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x03, 0x80, 0x03, 0x80, 0x03, 0x80, 0x03, 0x80, 0x03, 0x00, 0x00, 0x00, 0x00, 0x38, 0x70, 0x00, 0x00, 0xf8, 0x7f, 0xf0, 0x3f, 0xc0, 0x0f, 0x38, 0x1c, 0x80, 0x03, 0xf8, 0x67, 0x00, 0x00, 0x80, 0x1f, 0xc0, 0x7f, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x70, 0x38, 0x70, 0x38, 0x70, 0x38, 0x70, 0x38, 0x70, 0x38, 0x00, 0x00, 0x80, 0x03, 0x70, 0x0e, 0xc0, 0x39, 0xf0, 0x3f, 0xdc, 0x1c, 0x70, 0x07, 0x00, 0x07, 0x00, 0x07, 0x80, 0x03, 0x80, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0xf0, 0x3f, 0x80, 0x03, 0xf0, 0x3f, 0xf0, 0x3f, 0x00, 0x1e, 0xf8, 0x7f, 0xf0, 0x3f, 0xf8, 0x7f, 0xf0, 0x3f, 0xf0, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x38, 0x00, 0xf0, 0x3f, 0xc0, 0x3f, 0xc0, 0x0f, 0xf8, 0x3f, 0xe0, 0x3f, 0xf8, 0x1f, 0xf8, 0x7f, 0xf8, 0x7f, 0xe0, 0x3f, 0x38, 0x70, 0xe0, 0x0f, 0x00, 0x70, 0x38, 0x70, 0x38, 0x00, 0x38, 0x70, 0x38, 0x70, 0xe0, 0x1f, 0xf8, 0x3f, 0xe0, 0x1f, 0xf8, 0x3f, 0xf0, 0x3f, 0xfc, 0x7f, 0x38, 0x70, 0x1c, 0x70, 0x38, 0x70, 0x38, 0x70, 0x1c, 0x70, 0xfc, 0x7f, 0xc0, 0x01, 0x00, 0x03, 0x00, 0x0e, 0x80, 0x01, 0x00, 0x03, 0x80, 0x03, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x7e, 0x00, 0x00, 0x38, 0x00, 0x80, 0x03, 0x80, 0x03, 0x38, 0x00, 0xf0, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x70, 0x00, 0x00, 0xf8, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x38, 0x00, 0x00, 0xfc, 0x3f, 0x1c, 0x38, 0x70, 0x0e, 0x18, 0x07, 0x00, 0x00, 0x30, 0x3f, 0x80, 0x01, 0xe0, 0x1c, 0xe0, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x01, 0x38, 0x07, 0xe0, 0x1c, 0x9c, 0x39, 0x3c, 0x07, 0xb8, 0x03, 0xc0, 0x01, 0xc0, 0x01, 0x80, 0x03, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x1c, 0x38, 0xf0, 0x01, 0x1c, 0x38, 0x1c, 0x38, 0xc0, 0x0f, 0x0c, 0x00, 0x1c, 0x38, 0x1c, 0x38, 0x1c, 0x38, 0x1c, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0xf0, 0x00, 0x1c, 0x38, 0x38, 0x38, 0x70, 0x0e, 0x1c, 0x38, 0x38, 0x38, 0x1c, 0x1c, 0x1c, 0x00, 0x1c, 0x00, 0x38, 0x38, 0x1c, 0x38, 0xc0, 0x01, 0x00, 0x38, 0x1c, 0x0e, 0x1c, 0x00, 0x3c, 0x3c, 0x3c, 0x38, 0x38, 0x1c, 0x1c, 0x38, 0x38, 0x1c, 0x1c, 0x38, 0x1c, 0x38, 0xc0, 0x01, 0x1c, 0x38, 0x1c, 0x38, 0x1c, 0x38, 0x38, 0x1c, 0x38, 0x0e, 0x00, 0x1c, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0xc0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x38, 0x00, 0x00, 0xfc, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0x70, 0x00, 0x00, 0xf8, 0x7f, 0x38, 0x70, 0xe0, 0x1c, 0x30, 0x0e, 0x00, 0x00, 0x60, 0x7e, 0x00, 0x03, 0xc0, 0x39, 0xc0, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x03, 0x70, 0x0e, 0xc0, 0x39, 0x38, 0x73, 0x78, 0x0e, 0x70, 0x07, 0x80, 0x03, 0x80, 0x03, 0x00, 0x07, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x38, 0x70, 0xe0, 0x03, 0x38, 0x70, 0x38, 0x70, 0x80, 0x1f, 0x18, 0x00, 0x38, 0x70, 0x38, 0x70, 0x38, 0x70, 0x38, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0xe0, 0x01, 0x38, 0x70, 0x70, 0x70, 0xe0, 0x1c, 0x38, 0x70, 0x70, 0x70, 0x38, 0x38, 0x38, 0x00, 0x38, 0x00, 0x70, 0x70, 0x38, 0x70, 0x80, 0x03, 0x00, 0x70, 0x38, 0x1c, 0x38, 0x00, 0x78, 0x78, 0x78, 0x70, 0x70, 0x38, 0x38, 0x70, 0x70, 0x38, 0x38, 0x70, 0x38, 0x70, 0x80, 0x03, 0x38, 0x70, 0x38, 0x38, 0x38, 0x70, 0x70, 0x38, 0x38, 0x38, 0x00, 0x38, 0xc0, 0x01, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x80, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0x70, 0x00, 0x00, 0xf8, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x1f, 0xf8, 0x1f, 0xf0, 0x01, 0xf8, 0x1f, 0x1c, 0x38, 0xf8, 0x3f, 0xc0, 0x01, 0xfc, 0x38, 0xfc, 0x1f, 0xfc, 0x3f, 0xee, 0x73, 0x70, 0x0e, 0x98, 0x03, 0xc0, 0x01, 0x30, 0x33, 0xf8, 0x3f, 0xe0, 0x00, 0x60, 0x30, 0xf8, 0x1f, 0x00, 0x00, 0xf8, 0x1f, 0xf8, 0x1f, 0xf8, 0x1f, 0xf0, 0x01, 0xf8, 0x1f, 0x1c, 0x38, 0x00, 0x00, 0xc0, 0x01, 0x38, 0x07, 0xfc, 0x3f, 0x9c, 0x01, 0x80, 0x03, 0xf0, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x07, 0xf8, 0x1f, 0xc0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x1c, 0x3e, 0xc0, 0x01, 0x00, 0x38, 0x00, 0x38, 0x70, 0x0e, 0xfc, 0x1f, 0x1c, 0x00, 0x00, 0x1c, 0x1c, 0x38, 0x1c, 0x38, 0xc0, 0x01, 0xc0, 0x01, 0xe0, 0x01, 0xf8, 0x1f, 0x80, 0x07, 0x00, 0x38, 0x9c, 0x3f, 0x38, 0x1c, 0x1c, 0x38, 0x1c, 0x00, 0x1c, 0x38, 0x1c, 0x00, 0x1c, 0x00, 0x1c, 0x00, 0x1c, 0x38, 0xc0, 0x01, 0x00, 0x38, 0x9c, 0x03, 0x1c, 0x00, 0x7c, 0x3e, 0xfc, 0x38, 0x1c, 0x38, 0x1c, 0x38, 0x1c, 0x38, 0x1c, 0x38, 0x1c, 0x00, 0xc0, 0x01, 0x1c, 0x38, 0x38, 0x1c, 0x1c, 0x38, 0xe0, 0x07, 0xf0, 0x07, 0x00, 0x07, 0xe0, 0x00, 0xf8, 0x1f, 0x00, 0x07, 0xf0, 0x01, 0xf8, 0x1f, 0x1c, 0x38, 0xf8, 0x1f, 0xfc, 0x1f, 0xf8, 0x3f, 0xf8, 0x3f, 0xf8, 0x1f, 0xf0, 0x3f, 0xf8, 0x3f, 0xfc, 0x1f, 0xf0, 0x01, 0xf8, 0x01, 0x1c, 0x3c, 0xc0, 0x01, 0xfc, 0x1f, 0xfc, 0x1f, 0xf8, 0x1f, 0xfc, 0x1f, 0xf8, 0x3f, 0xfc, 0x1f, 0xf8, 0x3f, 0xf8, 0x07, 0x1c, 0x38, 0x1c, 0x70, 0x1c, 0x38, 0x1c, 0x38, 0x1c, 0x38, 0xfc, 0x3f, 0xf8, 0x3f, 0xc0, 0x01, 0xfc, 0x38, 0xfc, 0x1f, 0xfc, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x1f, 0xf8, 0x1f, 0xf0, 0x01, 0xf8, 0x1f, 0x1c, 0x38, 0xf8, 0x3f, 0xc0, 0x01, 0xfc, 0x38, 0xfc, 0x1f, 0xfc, 0x3f, 0xee, 0x73, 0x70, 0x0e, 0x98, 0x03, 0xc0, 0x01, 0x30, 0x33, 0xf8, 0x3f, 0xe0, 0x00, 0x60, 0x30, 0xf8, 0x1f, 0x00, 0x00, 0xf8, 0x1f, 0xf8, 0x1f, 0xf8, 0x1f, 0xf0, 0x01, 0xf8, 0x1f, 0x1c, 0x38, 0x00, 0x00, 0xc0, 0x01, 0x38, 0x07, 0xfc, 0x3f, 0x9c, 0x01, 0x80, 0x03, 0xf0, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x07, 0xf8, 0x1f, 0xc0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x1c, 0x3e, 0xc0, 0x01, 0x00, 0x38, 0x00, 0x38, 0x70, 0x0e, 0xfc, 0x1f, 0x1c, 0x00, 0x00, 0x1c, 0x1c, 0x38, 0x1c, 0x38, 0xc0, 0x01, 0xc0, 0x01, 0xe0, 0x01, 0xf8, 0x1f, 0x80, 0x07, 0x00, 0x38, 0x9c, 0x3f, 0x38, 0x1c, 0x1c, 0x38, 0x1c, 0x00, 0x1c, 0x38, 0x1c, 0x00, 0x1c, 0x00, 0x1c, 0x00, 0x1c, 0x38, 0xc0, 0x01, 0x00, 0x38, 0x9c, 0x03, 0x1c, 0x00, 0x7c, 0x3e, 0xfc, 0x38, 0x1c, 0x38, 0x1c, 0x38, 0x1c, 0x38, 0x1c, 0x38, 0x1c, 0x00, 0xc0, 0x01, 0x1c, 0x38, 0x38, 0x0e, 0x1c, 0x38, 0xe0, 0x07, 0x78, 0x0f, 0x00, 0x07, 0xe0, 0x00, 0xf8, 0x1f, 0x00, 0x07, 0xf0, 0x01, 0xf8, 0x1f, 0x1c, 0x38, 0xf8, 0x1f, 0xfc, 0x1f, 0xf8, 0x3f, 0xf8, 0x3f, 0xf8, 0x1f, 0xf0, 0x3f, 0xf8, 0x3f, 0xfc, 0x1f, 0xf0, 0x01, 0xf8, 0x01, 0x1c, 0x3c, 0xc0, 0x01, 0xfc, 0x1f, 0xfc, 0x1f, 0xf8, 0x1f, 0xfc, 0x1f, 0xf8, 0x3f, 0xfc, 0x1f, 0xf8, 0x3f, 0xf8, 0x07, 0x1c, 0x38, 0x1c, 0x70, 0x1c, 0x38, 0x1c, 0x38, 0x1c, 0x38, 0xfc, 0x3f, 0xf8, 0x3f, 0xc0, 0x01, 0xfc, 0x38, 0xfc, 0x1f, 0xfc, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1c, 0x38, 0xc0, 0x01, 0x1c, 0x38, 0x1c, 0x38, 0x1c, 0x00, 0x00, 0x00, 0xdc, 0x3b, 0x1c, 0x38, 0xfc, 0x3f, 0x6e, 0x76, 0xe0, 0x07, 0xd8, 0x1f, 0xf0, 0x00, 0x30, 0x33, 0x9c, 0x01, 0xf8, 0x07, 0x60, 0x30, 0x00, 0x38, 0x00, 0x00, 0x1c, 0x38, 0x00, 0x38, 0x1c, 0x38, 0xc0, 0x01, 0x1c, 0x38, 0x1c, 0x38, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0x70, 0x0e, 0xf8, 0x1f, 0xc0, 0x01, 0xb8, 0x3b, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x07, 0x00, 0x38, 0xfc, 0x1f, 0x00, 0x00, 0xf8, 0x1f, 0x00, 0x00, 0x80, 0x03, 0xdc, 0x3b, 0xc0, 0x01, 0x00, 0x1e, 0x80, 0x1f, 0x1c, 0x0e, 0x00, 0x38, 0xfc, 0x1f, 0x00, 0x0e, 0xf8, 0x1f, 0xf8, 0x3f, 0xc0, 0x01, 0xc0, 0x01, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x0f, 0xdc, 0x39, 0x1c, 0x38, 0xfc, 0x1f, 0x1c, 0x00, 0x1c, 0x38, 0xfc, 0x07, 0xfc, 0x07, 0x1c, 0x3e, 0xfc, 0x3f, 0xc0, 0x01, 0x00, 0x38, 0xfc, 0x00, 0x1c, 0x00, 0xfc, 0x3f, 0xdc, 0x3b, 0x1c, 0x38, 0xfc, 0x1f, 0x1c, 0x38, 0xfc, 0x1f, 0xf8, 0x1f, 0xc0, 0x01, 0x1c, 0x38, 0x70, 0x0e, 0x9c, 0x39, 0xc0, 0x03, 0xe0, 0x03, 0xc0, 0x01, 0xe0, 0x00, 0x1c, 0x38, 0x00, 0x07, 0xc0, 0x01, 0x1c, 0x38, 0x1c, 0x38, 0x00, 0x38, 0x1c, 0x38, 0x1c, 0x00, 0x1c, 0x38, 0x1c, 0x38, 0x80, 0x03, 0x1c, 0x38, 0x1c, 0x38, 0xc0, 0x01, 0xc0, 0x01, 0x9c, 0x07, 0xc0, 0x01, 0x9c, 0x39, 0x1c, 0x38, 0x1c, 0x38, 0x1c, 0x38, 0x1c, 0x38, 0x1c, 0x38, 0x1c, 0x00, 0xe0, 0x00, 0x1c, 0x38, 0x38, 0x38, 0x9c, 0x39, 0x70, 0x0e, 0x1c, 0x38, 0x00, 0x0e, 0x1c, 0x00, 0x00, 0x00, 0xdc, 0x3b, 0x1c, 0x38, 0xfc, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1c, 0x38, 0xc0, 0x01, 0x1c, 0x38, 0x1c, 0x38, 0x1c, 0x00, 0x00, 0x00, 0xdc, 0x3b, 0x1c, 0x38, 0xfc, 0x3f, 0x6e, 0x76, 0xe0, 0x07, 0xd8, 0x1f, 0xf0, 0x00, 0x30, 0x33, 0x9c, 0x01, 0xf8, 0x07, 0x60, 0x30, 0x00, 0x38, 0x00, 0x00, 0x1c, 0x38, 0x00, 0x38, 0x1c, 0x38, 0xc0, 0x01, 0x1c, 0x38, 0x1c, 0x38, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0x70, 0x0e, 0xf8, 0x1f, 0xc0, 0x01, 0xb8, 0x3b, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x07, 0x00, 0x38, 0xfc, 0x1f, 0x00, 0x00, 0xf8, 0x1f, 0x00, 0x00, 0x80, 0x03, 0xdc, 0x3b, 0xc0, 0x01, 0x00, 0x1e, 0x80, 0x1f, 0x1c, 0x0e, 0x00, 0x38, 0xfc, 0x1f, 0x00, 0x0e, 0xf8, 0x1f, 0xf8, 0x3f, 0xc0, 0x01, 0xc0, 0x01, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x0f, 0xdc, 0x39, 0x1c, 0x38, 0xfc, 0x1f, 0x1c, 0x00, 0x1c, 0x38, 0xfc, 0x07, 0xfc, 0x07, 0x1c, 0x3e, 0xfc, 0x3f, 0xc0, 0x01, 0x00, 0x38, 0xfc, 0x00, 0x1c, 0x00, 0xfc, 0x3f, 0xdc, 0x3b, 0x1c, 0x38, 0xfc, 0x1f, 0x1c, 0x38, 0xfc, 0x1f, 0xf8, 0x1f, 0xc0, 0x01, 0x1c, 0x38, 0x70, 0x07, 0x9c, 0x39, 0xc0, 0x03, 0xe0, 0x03, 0xc0, 0x01, 0xe0, 0x00, 0x1c, 0x38, 0x00, 0x07, 0xc0, 0x01, 0x1c, 0x38, 0x1c, 0x38, 0x00, 0x38, 0x1c, 0x38, 0x1c, 0x00, 0x1c, 0x38, 0x1c, 0x38, 0x80, 0x03, 0x1c, 0x38, 0x1c, 0x38, 0xc0, 0x01, 0xc0, 0x01, 0x9c, 0x07, 0xc0, 0x01, 0x9c, 0x39, 0x1c, 0x38, 0x1c, 0x38, 0x1c, 0x38, 0x1c, 0x38, 0x1c, 0x38, 0x1c, 0x00, 0xe0, 0x00, 0x1c, 0x38, 0x38, 0x38, 0x9c, 0x39, 0x70, 0x0e, 0x1c, 0x38, 0x00, 0x0e, 0x1c, 0x00, 0x00, 0x00, 0xdc, 0x3b, 0x1c, 0x38, 0xfc, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x3f, 0xfc, 0x3f, 0xc0, 0x01, 0x1c, 0x38, 0x1c, 0x38, 0x1c, 0x00, 0xfc, 0x1f, 0x1c, 0x3f, 0x1c, 0x38, 0xfc, 0x3f, 0xee, 0x73, 0x00, 0x00, 0xe0, 0x38, 0x1c, 0x00, 0x00, 0x00, 0x9c, 0x01, 0xe0, 0x00, 0x78, 0x3c, 0xf8, 0x3f, 0x00, 0x00, 0xfc, 0x3f, 0xf8, 0x3f, 0xfc, 0x3f, 0xc0, 0x01, 0x1c, 0x38, 0x1c, 0x38, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0xfc, 0x3f, 0x80, 0x39, 0xe0, 0x3c, 0x1c, 0x0e, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x07, 0xf8, 0x3f, 0xc0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x01, 0x7c, 0x38, 0xc0, 0x01, 0xc0, 0x03, 0x00, 0x38, 0xfc, 0x3f, 0x00, 0x38, 0x1c, 0x38, 0x00, 0x07, 0x1c, 0x38, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x01, 0xf8, 0x1f, 0x80, 0x07, 0x80, 0x03, 0x9c, 0x3f, 0xfc, 0x3f, 0x1c, 0x38, 0x1c, 0x00, 0x1c, 0x38, 0x1c, 0x00, 0x1c, 0x00, 0x1c, 0x38, 0x1c, 0x38, 0xc0, 0x01, 0x00, 0x38, 0x9c, 0x03, 0x1c, 0x00, 0xdc, 0x3b, 0x1c, 0x3f, 0x1c, 0x38, 0x1c, 0x00, 0x1c, 0x3e, 0x1c, 0x0e, 0x00, 0x38, 0xc0, 0x01, 0x1c, 0x38, 0xe0, 0x07, 0xf8, 0x1f, 0xe0, 0x07, 0xc0, 0x01, 0x70, 0x00, 0xe0, 0x00, 0xfc, 0x3f, 0x00, 0x07, 0xc0, 0x01, 0x1c, 0x38, 0x1c, 0x38, 0xf8, 0x3f, 0x1c, 0x38, 0x1c, 0x00, 0x1c, 0x38, 0xfc, 0x3f, 0x80, 0x03, 0x1c, 0x38, 0x1c, 0x38, 0xc0, 0x01, 0xc0, 0x01, 0xfc, 0x00, 0xc0, 0x01, 0x9c, 0x39, 0x1c, 0x38, 0x1c, 0x38, 0x1c, 0x38, 0x1c, 0x38, 0x1c, 0x00, 0xf8, 0x1f, 0xe0, 0x00, 0x1c, 0x38, 0x70, 0x1c, 0xdc, 0x3b, 0xc0, 0x03, 0x1c, 0x38, 0xc0, 0x03, 0x1c, 0x00, 0xfc, 0x1f, 0x1c, 0x3f, 0x1c, 0x38, 0xfc, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x3f, 0xfc, 0x3f, 0xc0, 0x01, 0x1c, 0x38, 0x1c, 0x38, 0x1c, 0x00, 0xfc, 0x1f, 0x1c, 0x3f, 0x1c, 0x38, 0xfc, 0x3f, 0xee, 0x73, 0x00, 0x00, 0xe0, 0x38, 0x1c, 0x00, 0x00, 0x00, 0x9c, 0x01, 0xe0, 0x00, 0x78, 0x3c, 0xf8, 0x3f, 0x00, 0x00, 0xfc, 0x3f, 0xf8, 0x3f, 0xfc, 0x3f, 0xc0, 0x01, 0x1c, 0x38, 0x1c, 0x38, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0xfc, 0x3f, 0x80, 0x39, 0xe0, 0x3c, 0x1c, 0x0e, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x07, 0xf8, 0x3f, 0xc0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x01, 0x7c, 0x38, 0xc0, 0x01, 0xc0, 0x03, 0x00, 0x38, 0xfc, 0x3f, 0x00, 0x38, 0x1c, 0x38, 0x00, 0x07, 0x1c, 0x38, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x01, 0xf8, 0x1f, 0x80, 0x07, 0x80, 0x03, 0x9c, 0x3f, 0xfc, 0x3f, 0x1c, 0x38, 0x1c, 0x00, 0x1c, 0x38, 0x1c, 0x00, 0x1c, 0x00, 0x1c, 0x38, 0x1c, 0x38, 0xc0, 0x01, 0x00, 0x38, 0x9c, 0x03, 0x1c, 0x00, 0xdc, 0x3b, 0x1c, 0x3f, 0x1c, 0x38, 0x1c, 0x00, 0x1c, 0x3e, 0x1c, 0x0e, 0x00, 0x38, 0xc0, 0x01, 0x1c, 0x38, 0xe0, 0x03, 0xf8, 0x1f, 0xe0, 0x07, 0xc0, 0x01, 0x70, 0x00, 0xe0, 0x00, 0xfc, 0x3f, 0x00, 0x07, 0xc0, 0x01, 0x1c, 0x38, 0x1c, 0x38, 0xf8, 0x3f, 0x1c, 0x38, 0x1c, 0x00, 0x1c, 0x38, 0xfc, 0x3f, 0x80, 0x03, 0x1c, 0x38, 0x1c, 0x38, 0xc0, 0x01, 0xc0, 0x01, 0xfc, 0x00, 0xc0, 0x01, 0x9c, 0x39, 0x1c, 0x38, 0x1c, 0x38, 0x1c, 0x38, 0x1c, 0x38, 0x1c, 0x00, 0xf8, 0x1f, 0xe0, 0x00, 0x1c, 0x38, 0x70, 0x1c, 0xdc, 0x3b, 0xc0, 0x03, 0x1c, 0x38, 0xc0, 0x03, 0x1c, 0x00, 0xfc, 0x1f, 0x1c, 0x3f, 0x1c, 0x38, 0xfc, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x38, 0x1c, 0x00, 0xc0, 0x01, 0x1c, 0x38, 0x1c, 0x38, 0x1c, 0x00, 0x00, 0x00, 0x1c, 0x3c, 0x1c, 0x38, 0xfc, 0x3f, 0x6e, 0x76, 0x00, 0x00, 0x70, 0x0c, 0x1c, 0x38, 0x00, 0x00, 0x9c, 0x01, 0xf8, 0x3c, 0x7c, 0x3e, 0x1c, 0x38, 0x00, 0x00, 0x1c, 0x00, 0x1c, 0x38, 0x1c, 0x00, 0xc0, 0x01, 0x1c, 0x38, 0x1c, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x07, 0x9c, 0x39, 0x70, 0x6e, 0x1c, 0x0e, 0x00, 0x00, 0xc0, 0x01, 0x80, 0x03, 0x1c, 0x38, 0xc0, 0x01, 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0xe0, 0x00, 0x1c, 0x38, 0xc0, 0x01, 0x70, 0x00, 0x1c, 0x38, 0x00, 0x0e, 0x1c, 0x38, 0x1c, 0x38, 0x80, 0x03, 0x1c, 0x38, 0x1c, 0x38, 0xc0, 0x01, 0xc0, 0x01, 0x00, 0x0f, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0x38, 0x00, 0x1c, 0x38, 0x1c, 0x38, 0x38, 0x38, 0x1c, 0x1c, 0x1c, 0x00, 0x1c, 0x00, 0x38, 0x38, 0x1c, 0x38, 0xc0, 0x01, 0x1c, 0x38, 0x1c, 0x0e, 0x1c, 0x00, 0x9c, 0x39, 0x1c, 0x3c, 0x38, 0x1c, 0x1c, 0x00, 0x38, 0x1c, 0x1c, 0x1c, 0x1c, 0x38, 0xc0, 0x01, 0x1c, 0x38, 0xc0, 0x03, 0x78, 0x1e, 0x38, 0x1c, 0xc0, 0x01, 0x1c, 0x00, 0xe0, 0x00, 0x1c, 0x00, 0x00, 0x07, 0xc0, 0x01, 0x1c, 0x38, 0x1c, 0x38, 0x1c, 0x38, 0x1c, 0x38, 0x1c, 0x00, 0x1c, 0x38, 0x1c, 0x00, 0x80, 0x03, 0x1c, 0x38, 0x1c, 0x38, 0xc0, 0x01, 0xc0, 0x01, 0x9c, 0x07, 0xc0, 0x01, 0x9c, 0x39, 0x1c, 0x38, 0x1c, 0x38, 0x1c, 0x38, 0x1c, 0x38, 0x1c, 0x00, 0x00, 0x38, 0xe0, 0x00, 0x1c, 0x38, 0xe0, 0x0e, 0x78, 0x1e, 0x70, 0x0e, 0x1c, 0x38, 0x70, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x1c, 0x3c, 0x1c, 0x38, 0xfc, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x1c, 0x0e, 0x00, 0xe0, 0x00, 0x0e, 0x1c, 0x0e, 0x1c, 0x0e, 0x00, 0x00, 0x00, 0x0e, 0x1e, 0x0e, 0x1c, 0xfe, 0x1f, 0x37, 0x3b, 0x00, 0x00, 0x38, 0x06, 0x0e, 0x1c, 0x00, 0x00, 0xce, 0x00, 0x7c, 0x1e, 0x3e, 0x1f, 0x0e, 0x1c, 0x00, 0x00, 0x0e, 0x00, 0x0e, 0x1c, 0x0e, 0x00, 0xe0, 0x00, 0x0e, 0x1c, 0x0e, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9c, 0x03, 0xce, 0x1c, 0x38, 0x37, 0x0e, 0x07, 0x00, 0x00, 0xe0, 0x00, 0xc0, 0x01, 0x0e, 0x1c, 0xe0, 0x00, 0xe0, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x70, 0x00, 0x0e, 0x1c, 0xe0, 0x00, 0x38, 0x00, 0x0e, 0x1c, 0x00, 0x07, 0x0e, 0x1c, 0x0e, 0x1c, 0xc0, 0x01, 0x0e, 0x1c, 0x0e, 0x1c, 0xe0, 0x00, 0xe0, 0x00, 0x80, 0x07, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x0e, 0x1c, 0x0e, 0x1c, 0x1c, 0x1c, 0x0e, 0x0e, 0x0e, 0x00, 0x0e, 0x00, 0x1c, 0x1c, 0x0e, 0x1c, 0xe0, 0x00, 0x0e, 0x1c, 0x0e, 0x07, 0x0e, 0x00, 0xce, 0x1c, 0x0e, 0x1e, 0x1c, 0x0e, 0x0e, 0x00, 0x1c, 0x0e, 0x0e, 0x0e, 0x0e, 0x1c, 0xe0, 0x00, 0x0e, 0x1c, 0xe0, 0x00, 0x3c, 0x0f, 0x1c, 0x0e, 0xe0, 0x00, 0x0e, 0x00, 0x70, 0x00, 0x0e, 0x00, 0x80, 0x03, 0xe0, 0x00, 0x0e, 0x1c, 0x0e, 0x1c, 0x0e, 0x1c, 0x0e, 0x1c, 0x0e, 0x00, 0x0e, 0x1c, 0x0e, 0x00, 0xc0, 0x01, 0x0e, 0x1c, 0x0e, 0x1c, 0xe0, 0x00, 0xe0, 0x00, 0xce, 0x03, 0xe0, 0x00, 0xce, 0x1c, 0x0e, 0x1c, 0x0e, 0x1c, 0x0e, 0x1c, 0x0e, 0x1c, 0x0e, 0x00, 0x00, 0x1c, 0x70, 0x00, 0x0e, 0x1c, 0x70, 0x07, 0x3c, 0x0f, 0x38, 0x07, 0x0e, 0x1c, 0x38, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x0e, 0x1e, 0x0e, 0x1c, 0xfe, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x3f, 0xf8, 0x1f, 0xf0, 0x07, 0xf8, 0x1f, 0xf8, 0x3f, 0xf8, 0x3f, 0xc0, 0x01, 0x1c, 0x38, 0x1c, 0x38, 0xfc, 0x3f, 0x1c, 0x38, 0x00, 0x00, 0x38, 0x3e, 0xf8, 0x1f, 0x00, 0x00, 0xf8, 0x3f, 0xf8, 0x0f, 0x78, 0x3c, 0xf8, 0x3f, 0x00, 0x00, 0xf8, 0x1f, 0xf8, 0x3f, 0xf8, 0x1f, 0xf0, 0x07, 0xf8, 0x1f, 0xf8, 0x3f, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0x38, 0x07, 0xf8, 0x1f, 0x38, 0x3c, 0xf8, 0x3b, 0x00, 0x00, 0x80, 0x03, 0xc0, 0x01, 0xf8, 0x3f, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x70, 0x00, 0xf8, 0x1f, 0xf0, 0x07, 0xfc, 0x3f, 0xf8, 0x1f, 0x80, 0x3f, 0xf8, 0x1f, 0xf8, 0x1f, 0xc0, 0x01, 0xf8, 0x1f, 0xf8, 0x1f, 0xc0, 0x01, 0xc0, 0x01, 0x00, 0x38, 0x00, 0x00, 0x1c, 0x00, 0x80, 0x03, 0xe0, 0x0f, 0x1c, 0x38, 0xfc, 0x1f, 0xf0, 0x1f, 0xfc, 0x0f, 0xfc, 0x3f, 0x1c, 0x00, 0xf0, 0x1f, 0x1c, 0x38, 0xf0, 0x07, 0xf8, 0x1f, 0x1c, 0x38, 0xfc, 0x3f, 0x1c, 0x38, 0x1c, 0x38, 0xf0, 0x0f, 0x1c, 0x00, 0xf0, 0x37, 0x1c, 0x38, 0xf8, 0x1f, 0xc0, 0x01, 0xf8, 0x1f, 0x80, 0x01, 0x38, 0x1c, 0x1c, 0x38, 0xc0, 0x01, 0xfe, 0x3f, 0xe0, 0x00, 0xf8, 0x1f, 0x00, 0x07, 0xf0, 0x07, 0xf8, 0x1f, 0xf8, 0x3f, 0xf8, 0x3f, 0xfc, 0x1f, 0xf8, 0x3f, 0xf8, 0x3f, 0xf8, 0x1f, 0x80, 0x03, 0xf8, 0x3f, 0x1c, 0x38, 0xf0, 0x07, 0xc0, 0x01, 0x1c, 0x3c, 0xf8, 0x0f, 0x9c, 0x39, 0x1c, 0x38, 0xf8, 0x1f, 0xfc, 0x1f, 0xf8, 0x3f, 0x1c, 0x00, 0xfc, 0x1f, 0xc0, 0x1f, 0xf8, 0x3f, 0xc0, 0x07, 0x38, 0x1c, 0x1c, 0x38, 0xf8, 0x3f, 0xfc, 0x3f, 0xf8, 0x3f, 0xc0, 0x01, 0x1c, 0x38, 0x1c, 0x38, 0xfc, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x1f, 0xfc, 0x0f, 0xf8, 0x03, 0xfc, 0x0f, 0xfc, 0x1f, 0xfc, 0x1f, 0xe0, 0x00, 0x0e, 0x1c, 0x0e, 0x1c, 0xfe, 0x1f, 0x0e, 0x1c, 0x00, 0x00, 0x1c, 0x1f, 0xfc, 0x0f, 0x00, 0x00, 0xfc, 0x1f, 0xfc, 0x07, 0x3c, 0x1e, 0xfc, 0x1f, 0x00, 0x00, 0xfc, 0x0f, 0xfc, 0x1f, 0xfc, 0x0f, 0xf8, 0x03, 0xfc, 0x0f, 0xfc, 0x1f, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x9c, 0x03, 0xfc, 0x0f, 0x1c, 0x1e, 0xfc, 0x1d, 0x00, 0x00, 0xc0, 0x01, 0xe0, 0x00, 0xfc, 0x1f, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x38, 0x00, 0xfc, 0x0f, 0xf8, 0x03, 0xfe, 0x1f, 0xfc, 0x0f, 0xc0, 0x1f, 0xfc, 0x0f, 0xfc, 0x0f, 0xe0, 0x00, 0xfc, 0x0f, 0xfc, 0x0f, 0xe0, 0x00, 0xe0, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x0e, 0x00, 0xc0, 0x01, 0xf0, 0x07, 0x0e, 0x1c, 0xfe, 0x0f, 0xf8, 0x0f, 0xfe, 0x07, 0xfe, 0x1f, 0x0e, 0x00, 0xf8, 0x1f, 0x0e, 0x1c, 0xf8, 0x03, 0xfc, 0x0f, 0x0e, 0x1c, 0xfe, 0x1f, 0x0e, 0x1c, 0x0e, 0x1c, 0xf8, 0x07, 0x0e, 0x00, 0xf8, 0x1b, 0x0e, 0x1c, 0xfc, 0x0f, 0xe0, 0x00, 0xfc, 0x0f, 0x40, 0x00, 0x1c, 0x0e, 0x0e, 0x1c, 0xe0, 0x00, 0xff, 0x1f, 0x70, 0x00, 0xfc, 0x0f, 0x80, 0x03, 0xf8, 0x03, 0xfc, 0x0f, 0xfc, 0x1f, 0xfc, 0x1f, 0xfe, 0x0f, 0xfc, 0x1f, 0xfc, 0x1f, 0xfc, 0x0f, 0xc0, 0x01, 0xfc, 0x1f, 0x0e, 0x1c, 0xf8, 0x03, 0xe0, 0x00, 0x0e, 0x1e, 0xfc, 0x07, 0xce, 0x1c, 0x0e, 0x1c, 0xfc, 0x0f, 0xfe, 0x0f, 0xfc, 0x1f, 0x0e, 0x00, 0xfe, 0x0f, 0xe0, 0x0f, 0xfc, 0x1f, 0xe0, 0x03, 0x1c, 0x0e, 0x0e, 0x1c, 0xfc, 0x1f, 0xfe, 0x1f, 0xfc, 0x1f, 0xe0, 0x00, 0x0e, 0x1c, 0x0e, 0x1c, 0xfe, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x07, 0x00, 0x00, 0xe0, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x03, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x03, 0x00, 0x00, 0xf0, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x1f, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x1f, 0x00, 0x00, 0xe0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x0f, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; zapping-0.10cvs6/libvbi/sampling_par.h 644 764 144 15545 10305456044 13134 /* * libzvbi - Raw VBI sampling * * Copyright (C) 2000, 2001, 2002, 2003, 2004 Michael H. Schimek * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. * * 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 this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* $Id: sampling_par.h,v 1.5 2005/09/01 01:40:52 mschimek Exp $ */ #ifndef __ZVBI3_SAMPLING_PAR_H__ #define __ZVBI3_SAMPLING_PAR_H__ #include /* uint64_t */ #include "macros.h" #include "misc.h" #include "image_format.h" /* vbi3_pixfmt */ #include "sliced.h" /* vbi3_service_set */ VBI3_BEGIN_DECLS /** * @addtogroup Sampling * @{ */ /** Videostandard identifier. */ typedef enum { VBI3_VIDEOSTD_NONE = 0, VBI3_VIDEOSTD_UNKNOWN = VBI3_VIDEOSTD_NONE, VBI3_VIDEOSTD_PAL_B = 1, VBI3_VIDEOSTD_PAL_B1, VBI3_VIDEOSTD_PAL_G, VBI3_VIDEOSTD_PAL_H, VBI3_VIDEOSTD_PAL_I, VBI3_VIDEOSTD_PAL_D, VBI3_VIDEOSTD_PAL_D1, VBI3_VIDEOSTD_PAL_K, VBI3_VIDEOSTD_PAL_M = 9, VBI3_VIDEOSTD_PAL_N, VBI3_VIDEOSTD_PAL_NC, VBI3_VIDEOSTD_NTSC_M = 13, VBI3_VIDEOSTD_NTSC_M_JP, VBI3_VIDEOSTD_SECAM_B = 17, VBI3_VIDEOSTD_SECAM_D, VBI3_VIDEOSTD_SECAM_G, VBI3_VIDEOSTD_SECAM_H, VBI3_VIDEOSTD_SECAM_K, VBI3_VIDEOSTD_SECAM_K1, VBI3_VIDEOSTD_SECAM_L, /** * Video hardware may support custom videostandards not defined * by libzvbi, for example hybrid standards to play back NTSC video * tapes at 60 Hz on a PAL TV. */ VBI3_VIDEOSTD_CUSTOM_BEGIN = 32, VBI3_VIDEOSTD_CUSTOM_END = 64 } vbi3_videostd; /** * A set of videostandards is used where more than one * videostandard may apply. Use VBI3_VIDEOSTD_SET macros * to build a set. */ typedef uint64_t vbi3_videostd_set; #define VBI3_VIDEOSTD_SET(videostd) (((vbi3_videostd_set) 1) << (videostd)) #define VBI3_VIDEOSTD_SET_UNKNOWN 0 #define VBI3_VIDEOSTD_SET_EMPTY 0 #define VBI3_VIDEOSTD_SET_PAL_BG (VBI3_VIDEOSTD_SET (VBI3_VIDEOSTD_PAL_B) | \ VBI3_VIDEOSTD_SET (VBI3_VIDEOSTD_PAL_B1) | \ VBI3_VIDEOSTD_SET (VBI3_VIDEOSTD_PAL_G)) #define VBI3_VIDEOSTD_SET_PAL_DK (VBI3_VIDEOSTD_SET (VBI3_VIDEOSTD_PAL_D) | \ VBI3_VIDEOSTD_SET (VBI3_VIDEOSTD_PAL_D1) | \ VBI3_VIDEOSTD_SET (VBI3_VIDEOSTD_PAL_K)) #define VBI3_VIDEOSTD_SET_PAL (VBI3_VIDEOSTD_SET_PAL_BG | \ VBI3_VIDEOSTD_SET_PAL_DK | \ VBI3_VIDEOSTD_SET (VBI3_VIDEOSTD_PAL_H) | \ VBI3_VIDEOSTD_SET (VBI3_VIDEOSTD_PAL_I)) #define VBI3_VIDEOSTD_SET_NTSC (VBI3_VIDEOSTD_SET (VBI3_VIDEOSTD_NTSC_M) | \ VBI3_VIDEOSTD_SET (VBI3_VIDEOSTD_NTSC_M_JP)) #define VBI3_VIDEOSTD_SET_SECAM (VBI3_VIDEOSTD_SET (VBI3_VIDEOSTD_SECAM_B) | \ VBI3_VIDEOSTD_SET (VBI3_VIDEOSTD_SECAM_D) | \ VBI3_VIDEOSTD_SET (VBI3_VIDEOSTD_SECAM_G) | \ VBI3_VIDEOSTD_SET (VBI3_VIDEOSTD_SECAM_H) | \ VBI3_VIDEOSTD_SET (VBI3_VIDEOSTD_SECAM_K) | \ VBI3_VIDEOSTD_SET (VBI3_VIDEOSTD_SECAM_K1) | \ VBI3_VIDEOSTD_SET (VBI3_VIDEOSTD_SECAM_L)) #define VBI3_VIDEOSTD_SET_525_60 (VBI3_VIDEOSTD_SET (VBI3_VIDEOSTD_PAL_M) | \ VBI3_VIDEOSTD_SET_NTSC) #define VBI3_VIDEOSTD_SET_625_50 (VBI3_VIDEOSTD_SET_PAL | \ VBI3_VIDEOSTD_SET (VBI3_VIDEOSTD_PAL_N) | \ VBI3_VIDEOSTD_SET (VBI3_VIDEOSTD_PAL_NC) | \ VBI3_VIDEOSTD_SET_SECAM) /** All defined videostandards without custom standards. */ #define VBI3_VIDEOSTD_SET_ALL (VBI3_VIDEOSTD_SET_525_60 | \ VBI3_VIDEOSTD_SET_625_50) /** All custrom videostandards. */ #define VBI3_VIDEOSTD_SET_CUSTOM \ ((~VBI3_VIDEOSTD_SET_EMPTY) << VBI3_VIDEOSTD_CUSTOM_BEGIN) extern const char * _vbi3_videostd_name (vbi3_videostd videostd) __attribute__ ((const)); /** * @brief Raw VBI sampling parameters. */ typedef struct { /** * Defines the system all line numbers refer to. Can be more * than one standard if not exactly known, provided there * is no ambiguity. */ vbi3_videostd_set videostd_set; /** Format of the raw vbi data. */ vbi3_pixfmt sampling_format; /** * Sampling rate in Hz, the number of samples or pixels * captured per second. */ unsigned int sampling_rate; /** * Number of samples (pixels) captured per scan line. The * decoder will access only these bytes. */ unsigned int samples_per_line; /** * Distance of the first bytes of two successive scan lines * in memory, in bytes. Must be greater or equal @a * samples_per_line times bytes per sample. */ unsigned long bytes_per_line; /** * The distance between 0H (leading edge of horizontal sync pulse, * half amplitude point) and the first sample (pixel) captured, * in samples (pixels). */ int offset; /** * First scan line to be captured, of the first and second field * respectively, according to the ITU-R line numbering scheme * (see vbi3_sliced). Set to zero if the exact line number isn't * known. */ unsigned int start[2]; /** * Number of scan lines captured, of the first and second * field respectively. This can be zero if only data from one * field is required or available. The sum @a count[0] + @a * count[1] determines the raw vbi image height. */ unsigned int count[2]; /** * In the raw vbi image, normally all lines of the second * field are supposed to follow all lines of the first field. When * this flag is set, the scan lines of first and second field * will be interleaved in memory, starting with the first field. * This implies @a count[0] and @a count[1] are equal. */ vbi3_bool interlaced; /** * Fields must be stored in temporal order, as the lines have * been captured. It is assumed that the first field is also * stored first in memory, however if the hardware cannot reliable * distinguish between fields this flag shall be cleared, which * disables decoding of data services depending on the field * number. */ vbi3_bool synchronous; } vbi3_sampling_par; #ifndef ZAPPING8 extern vbi3_service_set vbi3_sampling_par_from_services (vbi3_sampling_par * sp, unsigned int * max_rate, vbi3_videostd_set videostd_set, vbi3_service_set services); extern vbi3_service_set vbi3_sampling_par_check_services (const vbi3_sampling_par *sp, vbi3_service_set services, unsigned int strict) __attribute__ ((_vbi3_pure)); /** @} */ /* Private */ extern vbi3_bool _vbi3_sampling_par_check_service (const vbi3_sampling_par *sp, const vbi3_service_par *par, unsigned int strict) __attribute__ ((_vbi3_pure)); extern vbi3_bool _vbi3_sampling_par_verify (const vbi3_sampling_par *sp) __attribute__ ((_vbi3_pure)); #endif /* !ZAPPING8 */ VBI3_END_DECLS #endif /* __ZVBI3_SAMPLING_PAR_H__ */ zapping-0.10cvs6/libvbi/exp-gfx.c 644 764 144 140626 10305456044 12050 /* * libzvbi - Closed Caption and Teletext rendering * * Copyright (C) 2000-2004 Michael H. Schimek * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* $Id: exp-gfx.c,v 1.55 2005/09/01 01:40:52 mschimek Exp $ */ #ifdef HAVE_CONFIG_H # include "config.h" #endif #include #include #include /* malloc() */ #include /* memcpy() */ #include "misc.h" #include "page.h" /* vbi3_page */ #include "lang.h" /* vbi3_is_drcs() */ #ifdef ZAPPING8 # include "common/intl-priv.h" #else # include "intl-priv.h" #endif #include "export-priv.h" /* vbi3_export */ #include "exp-gfx.h" #include "vt.h" /* VBI3_TRANSPARENT_BLACK */ #include "wstfont2.xbm" /* Teletext character cell dimensions - hardcoded (DRCS) */ #define TCW 12 #define TCH 10 #define TCPL (wstfont2_width / TCW * wstfont2_height / TCH) #include "ccfont3.xbm" /* Closed Caption character cell dimensions */ #define CCW 16 #define CCH 13 #define CCPL (ccfont3_width / CCW * ccfont3_height / CCH) /** * @internal * * unicode_wstfont2() subroutine. */ vbi3_inline unsigned int unicode_wstfont2_special (unsigned int c, vbi3_bool italic) { static const uint16_t specials [] = { 0x01B5, 0x2016, 0x01CD, 0x01CE, 0x0229, 0x0251, 0x02DD, 0x02C6, 0x02C7, 0x02C9, 0x02CA, 0x02CB, 0x02CD, 0x02CF, 0x02D8, 0x02D9, 0x02DA, 0x02DB, 0x02DC, 0x2014, 0x2018, 0x2019, 0x201C, 0x201D, 0x20A0, 0x2030, 0x20AA, 0x2122, 0x2126, 0x215B, 0x215C, 0x215D, 0x215E, 0x2190, 0x2191, 0x2192, 0x2193, 0x25A0, 0x266A, 0x20A4, 0xE75F }; const unsigned int invalid = 357; unsigned int i; for (i = 0; i < N_ELEMENTS (specials); ++i) if (c == specials[i]) { if (italic) return i + 41 * 32; else return i + 10 * 32; } return invalid; } /** * @internal * @param c Unicode. * @param italic @c TRUE to switch to slanted character set (doesn't affect * Hebrew and Arabic). If this is a G1 block graphic character switch * to separated block mosaic set. * * Translates Unicode character to glyph number in wstfont2 image. * * @return * Glyph number. */ static unsigned int unicode_wstfont2 (unsigned int c, vbi3_bool italic) { const unsigned int invalid = 357; if (c < 0x0180) { if (c < 0x0080) { if (c < 0x0020) return invalid; else /* %3 Basic Latin (ASCII) 0x0020 ... 0x007F */ c = c - 0x0020 + 0 * 32; } else if (c < 0x00A0) return invalid; else /* %3 Latin-1 Sup, Latin Ext-A 0x00A0 ... 0x017F */ c = c - 0x00A0 + 3 * 32; } else if (c < 0xEE00) { if (c < 0x0460) { if (c < 0x03D0) { if (c < 0x0370) return unicode_wstfont2_special (c, italic); else /* %5 Greek 0x0370 ... 0x03CF */ c = c - 0x0370 + 12 * 32; } else if (c < 0x0400) return invalid; else /* %5 Cyrillic 0x0400 ... 0x045F */ c = c - 0x0400 + 15 * 32; } else if (c < 0x0620) { if (c < 0x05F0) { if (c < 0x05D0) return invalid; else /* %6 Hebrew 0x05D0 ... 0x05EF */ return c - 0x05D0 + 18 * 32; } else if (c < 0x0600) return invalid; else /* %6 Arabic 0x0600 ... 0x061F */ return c - 0x0600 + 19 * 32; } else if (c >= 0xE600 && c < 0xE740) return c - 0xE600 + 19 * 32; /* %6 Arabic (TTX) */ else return unicode_wstfont2_special (c, italic); } else if (c < 0xEF00) { /* %3 G1 Graphics */ return (c ^ 0x20) - 0xEE00 + 23 * 32; } else if (c < 0xF000) { /* %4 G3 Graphics */ return c - 0xEF20 + 27 * 32; } else /* 0xF000 ... 0xF7FF reserved for DRCS */ return invalid; if (italic) return c + 31 * 32; else return c; } /** * @internal * @param c Unicode. * @param italic @c TRUE to switch to slanted character set. * * Translates Unicode character to glyph number in ccfont3 image. * * @return * Glyph number. */ static unsigned int unicode_ccfont3 (unsigned int c, vbi3_bool italic) { static const uint16_t specials[] = { 0x00E1, 0x00E9, 0x00ED, 0x00F3, 0x00FA, 0x00E7, 0x00F7, 0x00D1, 0x00F1, 0x25A0, 0x00AE, 0x00B0, 0x00BD, 0x00BF, 0x2122, 0x00A2, 0x00A3, 0x266A, 0x00E0, 0x0020, 0x00E8, 0x00E2, 0x00EA, 0x00EE, 0x00F4, 0x00FB }; unsigned int i; if (c < 0x0020) { c = 15; /* invalid */ } else if (c < 0x0080) { c = c; } else { for (i = 0; i < N_ELEMENTS (specials); ++i) if (c == specials[i]) { c = i + 6; break; } if (i >= N_ELEMENTS (specials)) c = 15; /* invalid */ } if (italic) c += 4 * 32; return c; } /** * @internal * * Copies even lines to odd lines. */ static void line_doubler (void * buffer, const vbi3_image_format *format, unsigned int x, unsigned int y, unsigned int width, unsigned int height) { uint8_t *canvas; unsigned int byte_width; unsigned int bytes_per_line; unsigned int bytes_per_pixel; assert (VBI3_PIXFMT_IS_PACKED (format->pixfmt)); assert (x + width <= format->width); assert (y + height <= format->height); assert (0 == (height % 2)); bytes_per_pixel = vbi3_pixfmt_bytes_per_pixel (format->pixfmt); byte_width = width * bytes_per_pixel; bytes_per_line = format->bytes_per_line; if (bytes_per_line <= 0) { bytes_per_line = byte_width; } else { assert (byte_width <= bytes_per_line); } canvas = ((uint8_t *) buffer) + format->offset + y * bytes_per_line + x * bytes_per_pixel; while (height > 0) { memcpy (canvas + bytes_per_line, canvas, byte_width); canvas += bytes_per_line * 2; height -= 2; } } #define TRANS(v) \ SATURATE((((((int)((v) & 0xFF) - 128) \ * contrast) >> 6) + brightness), 0, 255) /* Find first set bit in constant, e.g. 0xFFFFFFFF -> 32, 0x123 -> 9, 1 -> 1, 0 -> 1 */ #define FFS2(m) ((m) & 0x2 ? 2 : 1) #define FFS4(m) ((m) & 0xC ? 2 + FFS2 ((m) >> 2) : FFS2 (m)) #define FFS8(m) ((m) & 0xF0 ? 4 + FFS4 ((m) >> 4) : FFS4 (m)) #define FFS16(m) ((m) & 0xFF00 ? 8 + FFS8 ((m) >> 8) : FFS8 (m)) #define FFS32(m) ((m) & 0xFFFF0000 ? 16 + FFS16 ((m) >> 16) : FFS16 (m)) #define CONV(v, n, m) \ ((FFS32 (m) > n) ? \ ((v) << (FFS32 (m) - n)) & m : \ ((v) >> (n - FFS32 (m))) & m) #define TRANS_CONV(v, n, m) \ ((FFS32 (m) > 8) ? \ (TRANS ((v) >> (n - 8)) << (FFS32 (m) - 8)) & m : \ (TRANS ((v) >> (n - 8)) >> (8 - FFS32 (m))) & m) /* Converts 0xBBGGRR value v to another value, transposing by brightness and contrast, then shifting and masking color bits to positions given by r, g, b, a mask */ #define RGBA_CONV(v, r, g, b, a) \ (+ TRANS_CONV (v, 8, r) \ + TRANS_CONV (v, 16, g) \ + TRANS_CONV (v, 24, b) \ + CONV (alpha, 8, a)) /* Like RGBA_CONV for reversed endian */ #define RGBA_CONV_SWAB32(v, r, g, b, a) \ (+ TRANS_CONV (v, 8, SWAB32 (r)) \ + TRANS_CONV (v, 16, SWAB32 (g)) \ + TRANS_CONV (v, 24, SWAB32 (b)) \ + CONV (alpha, 8, SWAB32 (a))) #define PUSH(p, type, value) \ *((type *) p) = value; p += sizeof (type); #define RGBA_CONV4(r, g, b, a, endian) \ while (color_size-- > 0) { \ unsigned int value = *color++; \ \ switch (Z_BYTE_ORDER) { \ case Z_LITTLE_ENDIAN: \ if (0 == endian) \ value = RGBA_CONV (value, r, g, b, a); \ else \ value = RGBA_CONV_SWAB32 (value, r, g, b, a); \ break; \ case Z_BIG_ENDIAN: \ if (0 == endian) \ value = RGBA_CONV_SWAB32 (value, r, g, b, a); \ else \ value = RGBA_CONV (value, r, g, b, a); \ break; \ } \ PUSH (d, uint32_t, value); \ } #define RGBA_CONV2(r, g, b, a, endian) \ while (color_size-- > 0) { \ unsigned int value = *color++; \ \ value = RGBA_CONV (value, r, g, b, a); \ switch (Z_BYTE_ORDER) { \ case Z_LITTLE_ENDIAN: \ if (0 == endian) { \ PUSH (d, uint16_t, value); \ } else { \ d[0] = value >> 8; \ d[1] = value; \ d += 2; \ } \ break; \ case Z_BIG_ENDIAN: \ if (1 == endian) { \ PUSH (d, uint16_t, value); \ } else { \ d[0] = value; \ d[1] = value >> 8; \ d += 2; \ } \ break; \ } \ } #define RGBA_CONV1(r, g, b, a) \ while (color_size-- > 0) { \ unsigned int value = *color++; \ \ *d++ = RGBA_CONV (value, r, g, b, a); \ } /** * @internal * @param buffer Output. The buffer must be large enough to hold * @a n entries of vbi3_pixfmt_bytes_per_pixel(@a pixfmt) each. * @param pixfmt Pixel format to convert to. * @param color Array of vbi3_rgba types. * @param color_size Number of elements in @a color array. * @param brightness Change brightness: 0 dark ... 255 bright, 128 * for no change. * @param contrast Change contrast: -128 inverse ... 0 none ... * 127 maximum, 64 for no change. * @param alpha Replacement alpha value: 0 ... 255. * * Converts vbi3_rgba types to pixels of desired format. * * @returns * @c FALSE if parameters are invalid. * * @bug * YUV pixel formats are not supported. */ static vbi3_bool vbi3_rgba_conv (void * buffer, vbi3_pixfmt pixfmt, const vbi3_rgba * color, unsigned int color_size, int brightness, int contrast, int alpha) { uint8_t *d = buffer; switch (pixfmt) { case VBI3_PIXFMT_RGBA24_LE: RGBA_CONV4 (0xFF, 0xFF00, 0xFF0000, 0xFF000000, 0); break; case VBI3_PIXFMT_RGBA24_BE: RGBA_CONV4 (0xFF, 0xFF00, 0xFF0000, 0xFF000000, 3); break; case VBI3_PIXFMT_BGRA24_LE: RGBA_CONV4 (0xFF0000, 0xFF00, 0xFF, 0xFF000000, 0); break; case VBI3_PIXFMT_BGRA24_BE: RGBA_CONV4 (0xFF0000, 0xFF00, 0xFF, 0xFF000000, 3); break; case VBI3_PIXFMT_RGB24_LE: while (color_size-- > 0) { unsigned int value = *color++; d[0] = TRANS (value & 0xFF); d[1] = TRANS ((value >> 8) & 0xFF); d[2] = TRANS ((value >> 16) & 0xFF); d += 3; } break; case VBI3_PIXFMT_RGB24_BE: while (color_size-- > 0) { unsigned int value = *color++; d[0] = TRANS ((value >> 16) & 0xFF); d[1] = TRANS ((value >> 8) & 0xFF); d[2] = TRANS (value & 0xFF); d += 3; } break; case VBI3_PIXFMT_RGB16_LE: RGBA_CONV2 (0x001F, 0x07E0, 0xF800, 0, 0); break; case VBI3_PIXFMT_RGB16_BE: RGBA_CONV2 (0x001F, 0x07E0, 0xF800, 0, 1); break; case VBI3_PIXFMT_BGR16_LE: RGBA_CONV2 (0xF800, 0x07E0, 0x001F, 0, 0); break; case VBI3_PIXFMT_BGR16_BE: RGBA_CONV2 (0xF800, 0x07E0, 0x001F, 0, 1); break; case VBI3_PIXFMT_RGBA15_LE: RGBA_CONV2 (0x001F, 0x03E0, 0x7C00, 0x8000, 0); break; case VBI3_PIXFMT_RGBA15_BE: RGBA_CONV2 (0x001F, 0x03E0, 0x7C00, 0x8000, 1); break; case VBI3_PIXFMT_BGRA15_LE: RGBA_CONV2 (0x7C00, 0x03E0, 0x001F, 0x8000, 0); break; case VBI3_PIXFMT_BGRA15_BE: RGBA_CONV2 (0x7C00, 0x03E0, 0x001F, 0x8000, 1); break; case VBI3_PIXFMT_ARGB15_LE: RGBA_CONV2 (0x003E, 0x07C0, 0xF800, 0x0001, 0); break; case VBI3_PIXFMT_ARGB15_BE: RGBA_CONV2 (0x003E, 0x07C0, 0xF800, 0x0001, 1); break; case VBI3_PIXFMT_ABGR15_LE: RGBA_CONV2 (0xF800, 0x07C0, 0x003E, 0x0001, 0); break; case VBI3_PIXFMT_ABGR15_BE: RGBA_CONV2 (0xF800, 0x07C0, 0x003E, 0x0001, 1); break; case VBI3_PIXFMT_RGBA12_LE: RGBA_CONV2 (0x000F, 0x00F0, 0x0F00, 0xF000, 0); break; case VBI3_PIXFMT_RGBA12_BE: RGBA_CONV2 (0x000F, 0x00F0, 0x0F00, 0xF000, 1); break; case VBI3_PIXFMT_BGRA12_LE: RGBA_CONV2 (0x0F00, 0x00F0, 0x000F, 0xF000, 0); break; case VBI3_PIXFMT_BGRA12_BE: RGBA_CONV2 (0x0F00, 0x00F0, 0x000F, 0xF000, 1); break; case VBI3_PIXFMT_ARGB12_LE: RGBA_CONV2 (0x00F0, 0x0F00, 0xF000, 0x000F, 0); break; case VBI3_PIXFMT_ARGB12_BE: RGBA_CONV2 (0x00F0, 0x0F00, 0xF000, 0x000F, 1); break; case VBI3_PIXFMT_ABGR12_LE: RGBA_CONV2 (0xF000, 0x0F00, 0x000F, 0x000F, 0); break; case VBI3_PIXFMT_ABGR12_BE: RGBA_CONV2 (0xF000, 0x0F00, 0x000F, 0x000F, 1); break; case VBI3_PIXFMT_RGB8: RGBA_CONV1 (0x07, 0x38, 0xC0, 0); break; case VBI3_PIXFMT_BGR8: RGBA_CONV1 (0xE0, 0x1C, 0x03, 0); break; case VBI3_PIXFMT_RGBA7: RGBA_CONV1 (0x03, 0x1C, 0x60, 0x80); break; case VBI3_PIXFMT_BGRA7: RGBA_CONV1 (0x60, 0x1C, 0x03, 0x80); break; case VBI3_PIXFMT_ARGB7: RGBA_CONV1 (0x06, 0x38, 0xC0, 0x01); break; case VBI3_PIXFMT_ABGR7: RGBA_CONV1 (0xC0, 0x38, 0x06, 0x01); break; default: debug ("Invalid pixfmt %u (%s)", (unsigned int) pixfmt, vbi3_pixfmt_name (pixfmt)); return FALSE; } return TRUE; } #define COLOR_MAP_ELEMENTS N_ELEMENTS (((vbi3_page *) 0)->color_map) struct color_map { unsigned int map [3 * COLOR_MAP_ELEMENTS]; void * fg [4]; void * bg [4]; }; static vbi3_bool color_map_init (struct color_map * cm, const vbi3_page * pg, vbi3_pixfmt pixfmt, unsigned int bytes_per_pixel, int brightness, int contrast) { cm->bg[VBI3_TRANSPARENT_SPACE] = (uint8_t *) cm->map + COLOR_MAP_ELEMENTS * 2 * bytes_per_pixel; cm->bg[VBI3_TRANSLUCENT] = (uint8_t *) cm->map + COLOR_MAP_ELEMENTS * 1 * bytes_per_pixel; if (!vbi3_rgba_conv (cm->bg[VBI3_TRANSPARENT_SPACE], pixfmt, pg->color_map, COLOR_MAP_ELEMENTS, brightness, contrast, /* alpha */ 0x00)) return FALSE; if (!vbi3_rgba_conv (cm->bg[VBI3_TRANSLUCENT], pixfmt, pg->color_map, COLOR_MAP_ELEMENTS, brightness, contrast, /* alpha */ 0x7F)) return FALSE; cm->bg[VBI3_TRANSPARENT_FULL] = cm->bg[VBI3_TRANSPARENT_SPACE]; cm->bg[VBI3_OPAQUE] = cm->map; if (!vbi3_rgba_conv (cm->map, pixfmt, pg->color_map, COLOR_MAP_ELEMENTS, brightness, contrast, /* alpha */ 0xFF)) return FALSE; cm->fg[VBI3_TRANSPARENT_SPACE] = cm->bg[VBI3_TRANSPARENT_SPACE]; cm->fg[VBI3_TRANSPARENT_FULL] = cm->map; cm->fg[VBI3_TRANSLUCENT] = cm->map; cm->fg[VBI3_OPAQUE] = cm->map; return TRUE; } #define PIXEL(d, i, s, j) \ (1 == bpp ? ((uint8_t *)(d))[i] = \ ((const uint8_t *)(s))[j] : \ (2 == bpp ? ((uint16_t *)(d))[i] = \ ((const uint16_t *)(s))[j] : \ (3 == bpp ? memcpy (((uint8_t *)(d)) + (i) * 3, \ ((const uint8_t *)(s)) + (j) * 3, 3) : \ (4 == bpp ? ((uint32_t *)(d))[i] = \ ((const uint32_t *)(s))[j] : \ assert (0))))) #if #cpu (i386) /* unaligned / little endian */ #define FONT_BITS *((const uint16_t *) s) #else #define FONT_BITS (s[1] * 256 + s[0]) #endif #define DRAW_CHAR(canvas, bytes_per_pixel, bpl, pen, \ font, cpl, cw, ch, \ glyph, bold, underline, size) \ do { \ const unsigned int bpp = bytes_per_pixel; \ uint8_t *d; \ const uint8_t *s; \ unsigned int x; \ unsigned int y; \ unsigned int shift; \ unsigned int bold1; \ unsigned int under1; \ unsigned int ch1; \ \ d = canvas; \ \ assert ((cw) >= 8 && (cw) <= 16); \ assert ((ch) >= 1 && (ch) <= 31); \ \ x = (glyph) * (cw); \ shift = x & 7; \ \ s = font; \ s += (x >> 3); \ \ ch1 = (ch); \ \ bold1 = !!(bold); \ under1 = (underline); \ \ switch (size) { \ case VBI3_DOUBLE_HEIGHT2: \ case VBI3_DOUBLE_SIZE2: \ s += (cpl) * (cw) / 8 * (ch) / 2; \ under1 >>= (ch) / 2; \ \ case VBI3_DOUBLE_HEIGHT: \ case VBI3_DOUBLE_SIZE: \ ch1 >>= 1; \ \ default: \ break; \ } \ \ for (y = 0; y < ch1; under1 >>= 1, ++y) { \ unsigned int bits = ~0; \ \ if (!(under1 & 1)) { \ bits = FONT_BITS >> shift; \ bits |= bits << bold1; \ } \ \ s += (cpl) * (cw) / 8; \ \ switch (size) { \ case VBI3_NORMAL_SIZE: \ for (x = 0; x < (cw); bits >>= 1, ++x) \ PIXEL (d, x, pen, bits & 1); \ d += bpl; \ break; \ \ case VBI3_DOUBLE_HEIGHT: \ case VBI3_DOUBLE_HEIGHT2: \ for (x = 0; x < (cw); bits >>= 1, ++x) { \ PIXEL (d, x, pen, bits & 1); \ PIXEL (d + bpl, x, pen, bits & 1); \ } \ d += bpl * 2; \ break; \ \ case VBI3_DOUBLE_WIDTH: \ for (x = 0; x < (cw) * 2; bits >>= 1, x += 2) { \ PIXEL (d, x, pen, bits & 1); \ PIXEL (d, x + 1, pen, bits & 1); \ } \ d += bpl; \ break; \ \ case VBI3_DOUBLE_SIZE: \ case VBI3_DOUBLE_SIZE2: \ for (x = 0; x < (cw) * 2; bits >>= 1, x += 2) { \ unsigned int col = bits & 1; \ \ PIXEL (d, x, pen, col); \ PIXEL (d, x + 1, pen, col); \ PIXEL (d + bpl, x, pen, col); \ PIXEL (d + bpl, x + 1, pen, col); \ } \ d += bpl * 2; \ break; \ \ default: \ break; \ } \ } \ } while (0) #define DRAW_DRCS(canvas, bytes_per_pixel, bpl, pen, font, color, size) \ do { \ const unsigned int bpp = bytes_per_pixel; \ uint8_t *d; \ const uint8_t *s; \ const uint8_t *pen2; \ unsigned int col; \ unsigned int x; \ unsigned int y; \ \ d = canvas; \ s = font; \ \ pen2 = (const uint8_t *)(pen); \ pen2 += (color) * bpp; /* 2, 4, 16 entry palette */ \ \ switch (size) { \ case VBI3_NORMAL_SIZE: \ for (y = 0; y < TCH; d += bpl, ++y) \ for (x = 0; x < 12; ++s, x += 2) { \ PIXEL (d, x, pen2, *s & 15); \ PIXEL (d, x + 1, pen2, *s >> 4); \ } \ break; \ \ case VBI3_DOUBLE_HEIGHT2: \ s += 30; \ \ case VBI3_DOUBLE_HEIGHT: \ for (y = 0; y < TCH / 2; d += bpl * 2, ++y) \ for (x = 0; x < 12; ++s, x += 2) { \ col = *s & 15; \ PIXEL (d, x, pen2, col); \ PIXEL (d + bpl, x, pen2, col); \ col = *s >> 4; \ PIXEL (d, x + 1, pen2, col); \ PIXEL (d + bpl, x + 1, pen2, col); \ } \ break; \ \ case VBI3_DOUBLE_WIDTH: \ for (y = 0; y < TCH; d += bpl, ++y) \ for (x = 0; x < 12 * 2; ++s, x += 4) { \ col = *s & 15; \ PIXEL (d, x + 0, pen2, col); \ PIXEL (d, x + 1, pen2, col); \ col = *s >> 4; \ PIXEL (d, x + 2, pen2, col); \ PIXEL (d, x + 3, pen2, col); \ } \ break; \ \ case VBI3_DOUBLE_SIZE2: \ s += 30; \ \ case VBI3_DOUBLE_SIZE: \ for (y = 0; y < TCH / 2; d += bpl * 2, ++y) \ for (x = 0; x < 12 * 2; ++s, x += 4) { \ col = *s & 15; \ PIXEL (d, x, pen2, col); \ PIXEL (d, x + 1, pen2, col); \ PIXEL (d + bpl, x, pen2, col); \ PIXEL (d + bpl, x + 1, pen2, col); \ col = *s >> 4; \ PIXEL (d, x + 2, pen2, col); \ PIXEL (d, x + 3, pen2, col); \ PIXEL (d + bpl, x + 2, pen2, col); \ PIXEL (d + bpl, x + 3, pen2, col); \ } \ break; \ \ default: \ break; \ } \ } while (0) #define DRAW_BLANK(canvas, bytes_per_pixel, bpl, pen, cw, ch) \ do { \ const unsigned int bpp = bytes_per_pixel; \ uint8_t *d; \ unsigned int x; \ unsigned int y; \ \ d = canvas; \ \ for (y = 0; y < (ch); d += (bpl), ++y) \ for (x = 0; x < (cw); ++x) \ PIXEL (d, x, pen, 0); \ } while (0) #define DRAW_CC_PAGE(bytes_per_pixel) \ do { \ for (rowct = n_rows; rowct-- > 0; ++row) { \ const vbi3_char *ac; \ unsigned int colct; \ \ ac = pg->text + row * pg->columns + column; \ \ for (colct = n_columns; colct-- > 0; ++ac) { \ const unsigned int bpp = bytes_per_pixel; \ unsigned int pen[2]; \ \ PIXEL (pen, 0, cm.bg[ac->opacity], ac->background); \ PIXEL (pen, 1, cm.fg[ac->opacity], ac->foreground); \ \ DRAW_CHAR (canvas, bytes_per_pixel, \ bytes_per_line, pen, \ ccfont3_bits, CCPL, CCW, CCH, \ unicode_ccfont3 (ac->unicode, \ ac->attr & VBI3_ITALIC), \ /* bold */ 0, \ (!!(ac->attr & VBI3_UNDERLINE)) \ << 12 /* cell row */, \ VBI3_NORMAL_SIZE); \ \ canvas += CCW * bytes_per_pixel; \ } \ \ canvas += row_adv; \ } \ } while (0) /** * @param pg Source page. * @param buffer Image buffer. * @param format Pixel format and dimensions of the buffer. * The buffer must be large enough for @a n_columns x @a height characters * of 16 x 13 pixels each. * @param flags Optional set of the following flags: * - @c VBI3_SCALE: Duplicate lines. In this case characters are 16 x 26 * pixels, suitable for frame (rather than field) overlay. * @param column First source column, 0 ... pg->columns - 1. * @param row First source row, 0 ... pg->rows - 1. * @param n_columns Number of columns to draw, 1 ... pg->columns. * @param n_rows Number of rows to draw, 1 ... pg->rows. * * Draws a subsection of a Closed Caption vbi3_page. * * @returns * @c FALSE if parameters are invalid. * * @bug * YUV pixel formats are not supported. */ vbi3_bool vbi3_page_draw_caption_region_va_list (const vbi3_page * pg, void * buffer, const vbi3_image_format *format, unsigned int x, unsigned int y, unsigned int column, unsigned int row, unsigned int n_columns, unsigned int n_rows, va_list export_options) { struct color_map cm; vbi3_bool option_scale; int brightness; int contrast; uint8_t *canvas; unsigned int scaled_height; unsigned int bytes_per_pixel; unsigned long bytes_per_line; unsigned long size; unsigned long row_adv; assert (NULL != pg); assert (NULL != buffer); assert (NULL != format); if (0) { unsigned int i, j; for (i = 0; i < pg->rows; ++i) { const vbi3_char *ac; fprintf (stderr, "%2d: ", i); ac = pg->text + i * pg->columns; for (j = 0; j < pg->columns; ++j) fprintf (stderr, "%d%d%d%02x ", ac[j].opacity, ac[j].foreground, ac[j].background, ac[j].unicode & 0xFF); fputs ("\n", stderr); } } option_scale = FALSE; brightness = 128; contrast = 64; for (;;) { vbi3_export_option option; option = va_arg (export_options, vbi3_export_option); switch (option) { case VBI3_TABLE: case VBI3_RTL: case VBI3_REVEAL: case VBI3_FLASH_ON: va_arg (export_options, vbi3_bool); break; case VBI3_SCALE: option_scale = va_arg (export_options, vbi3_bool); break; case VBI3_BRIGHTNESS: brightness = va_arg (export_options, int); break; case VBI3_CONTRAST: contrast = va_arg (export_options, int); break; default: option = 0; break; } if (0 == option) break; } if (x >= format->width || y >= format->height) { debug ("Position x %u, y %u is beyond image size %u x %u", x, y, format->width, format->height); return FALSE; } if (column + n_columns > pg->columns || row + n_rows > pg->rows) { debug ("Columns %u ... %u, rows %u ... %u beyond " "page size of %u x %u characters", column, column + n_columns - 1, row, row + n_rows - 1, pg->columns, pg->rows); return FALSE; } scaled_height = option_scale ? 26 : 13; if (n_columns * 16 > format->width - x || n_rows * scaled_height > format->height - y) { debug ("Image size %u x %u too small to draw %u x %u " "characters (%u x %u pixels) at x %u, y %u", format->width, format->height, n_columns, n_rows, n_columns * 16, n_rows * scaled_height, x, y); return FALSE; } bytes_per_pixel = vbi3_pixfmt_bytes_per_pixel (format->pixfmt); color_map_init (&cm, pg, format->pixfmt, bytes_per_pixel, brightness, contrast); bytes_per_line = format->bytes_per_line; if (bytes_per_line <= 0) { bytes_per_line = pg->columns * CCW * bytes_per_pixel; } else if ((format->width * bytes_per_pixel) > bytes_per_line) { debug ("Image width %u (%s) > bytes_per_line %lu", format->width, vbi3_pixfmt_name (format->pixfmt), bytes_per_line); return FALSE; } canvas = ((uint8_t *) buffer) + format->offset + y * bytes_per_line + x * bytes_per_pixel; size = format->offset + bytes_per_line * format->height; if (size > format->size) { debug ("Image %u x %u, offset %lu, bytes_per_line %lu " "> buffer size %lu = 0x%08lx", format->width, format->height, format->offset, bytes_per_line, format->size, format->size); return FALSE; } if (option_scale) bytes_per_line *= 2; row_adv = bytes_per_line * CCH - bytes_per_pixel * n_columns * CCW; switch (bytes_per_pixel) { unsigned int rowct; case 1: DRAW_CC_PAGE (1); break; case 2: DRAW_CC_PAGE (2); break; case 3: DRAW_CC_PAGE (3); break; case 4: DRAW_CC_PAGE (4); break; default: assert (0); } if (option_scale) line_doubler (buffer, format, x, y, n_columns * 16, n_rows * scaled_height); return TRUE; } vbi3_bool vbi3_page_draw_caption_region (const vbi3_page * pg, void * buffer, const vbi3_image_format *format, unsigned int x, unsigned int y, unsigned int column, unsigned int row, unsigned int n_columns, unsigned int n_rows, ...) { vbi3_bool r; va_list export_options; va_start (export_options, n_rows); r = vbi3_page_draw_caption_region_va_list (pg, buffer, format, x, y, column, row, n_columns, n_rows, export_options); va_end (export_options); return r; } /** * @param pg Source page. * @param buffer Image buffer. * @param format Pixel format and dimensions of the buffer. The buffer must be * large enough for pg->columns * pg->rows characters of 16 x 13 pixels * each. * @param flags Optional set of the following flags: * - @c VBI3_SCALE: Duplicate lines. In this case characters are 16 x 26 * pixels, suitable for frame (rather than field) overlay. * @param column First source column, 0 ... pg->columns - 1. * @param row First source row, 0 ... pg->rows - 1. * @param n_columns Number of columns to draw, 1 ... pg->columns. * @param n_rows Number of rows to draw, 1 ... pg->rows. * * Draws a subsection of a Closed Caption vbi3_page. * * @returns * @c FALSE if parameters are invalid. * * @bug * YUV pixel formats are not supported. */ vbi3_bool vbi3_page_draw_caption_va_list (const vbi3_page * pg, void * buffer, const vbi3_image_format *format, va_list export_options) { return vbi3_page_draw_caption_region_va_list (pg, buffer, format, /* x */ 0, /* y */ 0, /* column */ 0, /* row */ 0, pg->columns, pg->rows, export_options); } vbi3_bool vbi3_page_draw_caption (const vbi3_page * pg, void * buffer, const vbi3_image_format *format, ...) { vbi3_bool r; va_list export_options; va_start (export_options, format); r = vbi3_page_draw_caption_region_va_list (pg, buffer, format, /* x */ 0, /* y */ 0, /* column */ 0, /* row */ 0, pg->columns, pg->rows, export_options); va_end (export_options); return r; } #define DRAW_VT_CHAR(bytes_per_line, bytes_per_pixel) \ do { \ const unsigned int bpp = bytes_per_pixel; \ unsigned int unicode; \ \ PIXEL (pen, 0, cm.bg[ac->opacity], ac->background); \ PIXEL (pen, 1, cm.fg[ac->opacity], ac->foreground); \ \ unicode = (ac->attr & option_space_attr) ? \ 0x0020 : ac->unicode; \ \ switch (ac->size) { \ case VBI3_OVER_TOP: \ case VBI3_OVER_BOTTOM: \ break; \ \ default: \ if (vbi3_is_drcs (unicode)) { \ const uint8_t *font; \ \ font = vbi3_page_get_drcs_data (pg, unicode); \ \ if (NULL != font) \ DRAW_DRCS (canvas, bytes_per_pixel, \ bytes_per_line, pen, font, \ ac->drcs_clut_offs, \ ac->size); \ else /* shouldn't happen */ \ DRAW_BLANK (canvas, bytes_per_pixel, \ bytes_per_line, pen, \ TCW, TCH); \ } else { \ DRAW_CHAR (canvas, bytes_per_pixel, \ bytes_per_line, pen, \ wstfont2_bits, TCPL, TCW, TCH, \ unicode_wstfont2 (unicode, \ ac->attr & VBI3_ITALIC), \ ac->attr & VBI3_BOLD, \ (!!(ac->attr & VBI3_UNDERLINE)) << 9 \ /* cell row 9 */, \ ac->size); \ } \ } \ } while (0) #define DRAW_VT_PAGE(bytes_per_pixel) \ do { \ uint8_t pen [(2 + 8 + 32) * bytes_per_pixel]; \ const unsigned int bpp = bytes_per_pixel; \ unsigned int rowct; \ unsigned int i; \ \ if (pg->drcs_clut) \ for (i = 2; i < 2 + 8 + 32; i++) \ PIXEL (pen, i, cm.map, pg->drcs_clut[i]); \ \ for (rowct = n_rows; rowct-- > 0; ++row) { \ const vbi3_char *ac; \ unsigned int colct; \ \ ac = pg->text + row * pg->columns + column; \ \ for (colct = n_columns; colct-- > 0; ++ac) { \ DRAW_VT_CHAR (bytes_per_line, bytes_per_pixel); \ canvas += TCW * bytes_per_pixel; \ } \ \ canvas += row_adv; \ } \ } while (0) /** * @param pg Source page. * @param buffer Image buffer. * @param format Pixel format and dimensions of the buffer. The buffer must be * large enough for @a n_columns x @a n_rows characters of 12 x 10 pixels * each. * @param flags Optional set of the following flags: * - @c VBI3_REVEAL: Draw characters flagged 'conceal' (see vbi3_char). * - @c VBI3_FLASH_ON: Draw characters flagged 'flash' (see vbi3_char) * in on state, otherwise like a space (U+0020). * - @c VBI3_SCALE: Duplicate lines. In this case characters are 12 x 20 * pixels, suitable for frame (rather than field) overlay. * @param column First source column, 0 ... pg->columns - 1. * @param row First source row, 0 ... pg->rows - 1. * @param n_columns Number of columns to draw, 1 ... pg->columns. * @param n_rows Number of rows to draw, 1 ... pg->rows. * * Draws a subsection of a Teletext vbi3_page. * * @returns * @c FALSE if parameters are invalid. * * @bug * YUV pixel formats are not supported. */ vbi3_bool vbi3_page_draw_teletext_region_va_list (const vbi3_page * pg, void * buffer, const vbi3_image_format *format, unsigned int x, unsigned int y, unsigned int column, unsigned int row, unsigned int n_columns, unsigned int n_rows, va_list export_options) { struct color_map cm; vbi3_bool option_scale; unsigned int option_space_attr; int brightness; int contrast; uint8_t *canvas; unsigned int scaled_height; unsigned int bytes_per_pixel; unsigned long bytes_per_line; unsigned long size; unsigned int row_adv; assert (NULL != pg); assert (NULL != buffer); assert (NULL != format); if (0) { unsigned int i, j; for (i = 0; i < pg->rows; ++i) { const vbi3_char *ac; fprintf (stderr, "%2d: ", i); ac = pg->text + i * pg->columns; for (j = 0; j < pg->columns; ++j) fprintf (stderr, "%04x ", ac[j].unicode); fputs ("\n", stderr); } } option_scale = FALSE; option_space_attr = 0; brightness = 128; contrast = 64; for (;;) { vbi3_export_option option; option = va_arg (export_options, vbi3_export_option); switch (option) { case VBI3_TABLE: case VBI3_RTL: va_arg (export_options, vbi3_bool); break; case VBI3_REVEAL: COPY_SET_COND (option_space_attr, VBI3_CONCEAL, !va_arg (export_options, vbi3_bool)); break; case VBI3_FLASH_ON: COPY_SET_COND (option_space_attr, VBI3_FLASH, !va_arg (export_options, vbi3_bool)); break; case VBI3_SCALE: option_scale = va_arg (export_options, vbi3_bool); break; case VBI3_BRIGHTNESS: brightness = va_arg (export_options, int); break; case VBI3_CONTRAST: contrast = va_arg (export_options, int); break; default: option = 0; break; } if (0 == option) break; } if (x >= format->width || y >= format->height) { debug ("Position x %u, y %u is beyond image size %u x %u", x, y, format->width, format->height); return FALSE; } if (column + n_columns > pg->columns || row + n_rows > pg->rows) { debug ("Columns %u ... %u, rows %u ... %u beyond " "page size of %u x %u characters", column, column + n_columns - 1, row, row + n_rows - 1, pg->columns, pg->rows); return FALSE; } scaled_height = option_scale ? 20 : 10; if (n_columns * 12 > format->width - x || n_rows * scaled_height > format->height - x) { debug ("Image size %u x %u too small to draw %u x %u " "characters (%u x %u pixels) at x %u, y %u", format->width, format->height, n_columns, n_rows, n_columns * 12, n_rows * scaled_height, x, y); return FALSE; } bytes_per_pixel = vbi3_pixfmt_bytes_per_pixel (format->pixfmt); color_map_init (&cm, pg, format->pixfmt, bytes_per_pixel, brightness, contrast); bytes_per_line = format->bytes_per_line; if (bytes_per_line <= 0) { bytes_per_line = pg->columns * TCW * bytes_per_pixel; } else if ((format->width * bytes_per_pixel) > bytes_per_line) { debug ("Image width %u (%s) > bytes_per_line %lu", format->width, vbi3_pixfmt_name (format->pixfmt), bytes_per_line); return FALSE; } canvas = ((uint8_t *) buffer) + format->offset + y * bytes_per_line + x * bytes_per_pixel; size = format->offset + bytes_per_line * format->height; if (size > format->size) { debug ("Image %u x %u, offset %lu, bytes_per_line %lu " "> buffer size %lu = 0x%08lx", format->width, format->height, format->offset, bytes_per_line, format->size, format->size); return FALSE; } if (option_scale) bytes_per_line *= 2; row_adv = bytes_per_line * TCH - bytes_per_pixel * n_columns * TCW; switch (bytes_per_pixel) { case 1: DRAW_VT_PAGE (1); break; case 2: DRAW_VT_PAGE (2); break; case 3: DRAW_VT_PAGE (3); break; case 4: DRAW_VT_PAGE (4); break; default: assert (0); } if (option_scale) line_doubler (buffer, format, x, y, n_columns * 12, n_rows * scaled_height); return TRUE; } vbi3_bool vbi3_page_draw_teletext_region (const vbi3_page * pg, void * buffer, const vbi3_image_format *format, unsigned int x, unsigned int y, unsigned int column, unsigned int row, unsigned int n_columns, unsigned int n_rows, ...) { vbi3_bool r; va_list export_options; va_start (export_options, n_rows); r = vbi3_page_draw_teletext_region_va_list (pg, buffer, format, x, y, column, row, n_columns, n_rows, export_options); va_end (export_options); return r; } /** * @param pg Source page. * @param buffer Image buffer. * @param format Pixel format and dimensions of the buffer. The buffer must be * large enough for pg->columns * pg->rows characters of 12 x 10 pixels * each. * @param flags Optional set of the following flags: * - @c VBI3_REVEAL: Draw characters flagged 'conceal' (see vbi3_char). * - @c VBI3_FLASH_ON: Draw characters flagged 'flash' (see vbi3_char) * in off state, i. e. like a space (U+0020). * - @c VBI3_SCALE: Duplicate lines. In this case characters are 12 x 20 * pixels, suitable for frame (rather than field) overlay. * * Draws a Teletext vbi3_page. * * @returns * @c FALSE if parameters are invalid. * * @bug * YUV pixel formats are not supported. */ vbi3_bool vbi3_page_draw_teletext_va_list (const vbi3_page * pg, void * buffer, const vbi3_image_format *format, va_list export_options) { return vbi3_page_draw_teletext_region_va_list (pg, buffer, format, /* x */ 0, /* y */ 0, /* column */ 0, /* row */ 0, pg->columns, pg->rows, export_options); } vbi3_bool vbi3_page_draw_teletext (const vbi3_page * pg, void * buffer, const vbi3_image_format *format, ...) { vbi3_bool r; va_list export_options; va_start (export_options, format); r = vbi3_page_draw_teletext_region_va_list (pg, buffer, format, /* x */ 0, /* y */ 0, /* column */ 0, /* row */ 0, pg->columns, pg->rows, export_options); va_end (export_options); return r; } /* * Shared export options */ typedef struct { vbi3_export export; /* Options */ /* The raw image contains the same information a real TV would show, however a TV overlays the image on both fields. So raw pixel aspect is 2:1, and this option will double lines adding redundant information. The resulting images with pixel aspect 2:2 are still too narrow compared to a real TV closer to 4:3 (11 MHz TXT pixel clock), but I think one should export raw, not scaled data (which is still possible in Zapping using the screenshot plugin). */ vbi3_bool double_height; } gfx_instance; static vbi3_export * gfx_new (const _vbi3_export_module *em) { gfx_instance *gfx; em = em; if (!(gfx = vbi3_malloc (sizeof (*gfx)))) return NULL; CLEAR (*gfx); return &gfx->export; } static void gfx_delete (vbi3_export * e) { vbi3_free (PARENT (e, gfx_instance, export)); } static const vbi3_option_info option_info [] = { _VBI3_OPTION_BOOL_INITIALIZER ("aspect", N_("Correct aspect ratio"), TRUE, N_("Approach an image aspect ratio similar to " "a real TV. This will double the image size.")) }; static vbi3_bool option_get (vbi3_export * e, const char * keyword, vbi3_option_value * value) { gfx_instance *gfx = PARENT (e, gfx_instance, export); if (0 == strcmp (keyword, "aspect")) { value->num = gfx->double_height; } else { _vbi3_export_unknown_option (e, keyword); return FALSE; } return TRUE; } static vbi3_bool option_set (vbi3_export * e, const char * keyword, va_list ap) { gfx_instance *gfx = PARENT (e, gfx_instance, export); if (0 == strcmp (keyword, "aspect")) { gfx->double_height = !!va_arg (ap, int); } else { _vbi3_export_unknown_option (e, keyword); return FALSE; } return TRUE; } /* * PPM - Portable Pixmap File (raw) */ static vbi3_bool export_ppm (vbi3_export * e, const vbi3_page * pg) { gfx_instance *gfx = PARENT (e, gfx_instance, export); vbi3_image_format format; unsigned int cw, ch; uint8_t *image; unsigned int row; if (pg->columns < 40) { /* caption */ cw = CCW; ch = CCH; } else { cw = TCW; ch = TCH; } format.width = cw * pg->columns; format.height = ch; format.size = format.width * format.height * 3; format.offset = 0; format.bytes_per_line = format.width * 3; format.pixfmt = VBI3_PIXFMT_RGB24_LE; if (!(image = vbi3_malloc (format.size))) { _vbi3_export_malloc_error (e); return FALSE; } fprintf (e->fp, "P6 %u %u 255\n", format.width, (ch * pg->rows) << gfx->double_height); if (ferror (e->fp)) goto write_error; for (row = 0; row < pg->rows; ++row) { vbi3_bool success; if (pg->columns < 40) success = vbi3_page_draw_caption_region (pg, image, &format, /* x */ 0, /* y */ 0, /* column */ 0, /* row */ row, pg->columns, /* rows */ 1, /* options */ VBI3_END); else success = vbi3_page_draw_teletext_region (pg, image, &format, /* x */ 0, /* y */ 0, /* column */ 0, /* row */ row, pg->columns, /* rows */ 1, /* options: */ VBI3_REVEAL, e->reveal, VBI3_END); assert (success); if (gfx->double_height) { uint8_t *body; unsigned int line; body = image; for (line = 0; line < ch; ++line) { if (format.width != fwrite (body, 3, format.width, e->fp)) goto write_error; if (format.width != fwrite (body, 3, format.width, e->fp)) goto write_error; body += format.width * 3; } } else { if (format.size != fwrite (image, 1, format.size, e->fp)) goto write_error; } } vbi3_free (image); return TRUE; write_error: _vbi3_export_write_error (e); vbi3_free (image); return FALSE; } static const vbi3_export_info export_info_ppm = { .keyword = "ppm", .label = N_("PPM"), .tooltip = N_("Export this page as raw PPM image"), .mime_type = "image/x-portable-pixmap", .extension = "ppm", }; const _vbi3_export_module _vbi3_export_module_ppm = { .export_info = &export_info_ppm, ._new = gfx_new, ._delete = gfx_delete, .option_info = option_info, .option_info_size = N_ELEMENTS (option_info), .option_get = option_get, .option_set = option_set, .export = export_ppm }; /* * PNG - Portable Network Graphics File */ #ifdef HAVE_LIBPNG #include "png.h" #include "setjmp.h" #define COLOR_MAP_SIZE (N_ELEMENTS (pg->color_map)) #define TRANSLUCENT COLOR_MAP_SIZE #define TRANSPARENT (COLOR_MAP_SIZE * 2) #define PALETTE_SIZE (TRANSPARENT + 1) static void png_draw_char (uint8_t * canvas, unsigned int bytes_per_line, const vbi3_page * pg, const vbi3_char * ac, unsigned int conceal, uint8_t * pen, vbi3_bool is_ttx) { unsigned int unicode; unicode = ((ac->attr & VBI3_CONCEAL) & conceal) ? 0x0020 : ac->unicode; switch (ac->opacity) { case VBI3_TRANSPARENT_SPACE: /* Transparent foreground and background. */ blank: pen[0] = TRANSPARENT; if (is_ttx) DRAW_BLANK (canvas, 1, bytes_per_line, pen, TCW, TCH); else DRAW_BLANK (canvas, 1, bytes_per_line, pen, CCW, CCH); return; case VBI3_TRANSPARENT_FULL: /* Transparent background, opaque foreground. The background of Teletext multicolor DRCS is ambiguous, so we make them opaque. */ pen[0] = TRANSPARENT; pen[1] = ac->foreground; break; case VBI3_TRANSLUCENT: /* Translucent background (for 'boxed' text), opaque foreground. The background of Teletext multicolor DRCS is ambiguous, so we make them completely translucent. */ if (vbi3_is_drcs (unicode)) pen += 64; /* use translucent DRCS palette */ pen[0] = ac->background + TRANSLUCENT; pen[1] = ac->foreground; break; case VBI3_OPAQUE: pen[0] = ac->background; pen[1] = ac->foreground; break; } if (vbi3_is_drcs (unicode)) { const uint8_t *font; font = vbi3_page_get_drcs_data (pg, unicode); if (font && is_ttx) { DRAW_DRCS (canvas, 1, bytes_per_line, pen, font, ac->drcs_clut_offs, ac->size); } else { /* shouldn't happen */ goto blank; } } else { if (is_ttx) { DRAW_CHAR (canvas, 1, bytes_per_line, pen, wstfont2_bits, TCPL, TCW, TCH, unicode_wstfont2 (unicode, ac->attr & VBI3_ITALIC), ac->attr & VBI3_BOLD, (!!(ac->attr & VBI3_UNDERLINE)) << 9 /* cell row 9 */, ac->size); } else { DRAW_CHAR (canvas, 1, bytes_per_line, pen, ccfont3_bits, CCPL, CCW, CCH, unicode_ccfont3 (unicode, ac->attr & VBI3_ITALIC), /* bold */ 0, (!!(ac->attr & VBI3_UNDERLINE)) << 12 /* cell row 12 */, VBI3_NORMAL_SIZE); } } } static vbi3_bool write_png (vbi3_export * e, const vbi3_page * pg, png_structp png_ptr, png_infop info_ptr, png_bytep image, png_bytep * row_pointer, const vbi3_image_format *format, vbi3_bool double_height) { png_color palette[PALETTE_SIZE]; png_byte alpha[PALETTE_SIZE]; png_text text[4]; char title[80]; unsigned int i; unsigned int size; if (setjmp (png_ptr->jmpbuf)) return FALSE; png_init_io (png_ptr, e->fp); png_set_IHDR (png_ptr, info_ptr, format->width, format->height << double_height, /* bit_depth */ 8, PNG_COLOR_TYPE_PALETTE, double_height ? PNG_INTERLACE_ADAM7 : PNG_INTERLACE_NONE, PNG_COMPRESSION_TYPE_DEFAULT, PNG_FILTER_TYPE_DEFAULT); /* Could be optimized (or does libpng?) */ for (i = 0; i < COLOR_MAP_SIZE; ++i) { /* Opaque. */ palette[i].red = VBI3_R (pg->color_map[i]); palette[i].green = VBI3_G (pg->color_map[i]); palette[i].blue = VBI3_B (pg->color_map[i]); alpha[i] = 255; /* Translucent. */ palette[i + TRANSLUCENT] = palette[i]; alpha[i + TRANSLUCENT] = 128; } /* Transparent (black) background. */ palette[TRANSPARENT].red = 0; palette[TRANSPARENT].green = 0; palette[TRANSPARENT].blue = 0; alpha[TRANSPARENT] = 0; png_set_PLTE (png_ptr, info_ptr, palette, 80); png_set_tRNS (png_ptr, info_ptr, alpha, 80, NULL); png_set_gAMA (png_ptr, info_ptr, 1.0 / 2.2); size = 0; if (e->network) size = snprintf (title, sizeof (title), "%s ", e->network); else title[0] = 0; /* FIXME ISO 8859-1 (Latin-1) character set required, see png spec for other */ if (pg->pgno < 0x100) { size += snprintf (title + size, sizeof (title) - size, "Closed Caption"); /* proper name */ } else if (VBI3_ANY_SUBNO != pg->subno) { size += snprintf (title + size, sizeof (title) - size, _("Teletext Page %3x.%x"), pg->pgno, pg->subno); } else { size += snprintf (title + size, sizeof (title) - size, _("Teletext Page %3x"), pg->pgno); } CLEAR (text); text[0].key = strdup ("Title"); assert (NULL != text[0].key); text[0].text = title; text[0].compression = PNG_TEXT_COMPRESSION_NONE; text[1].key = strdup ("Software"); assert (NULL != text[1].key); text[1].text = e->creator; text[1].compression = PNG_TEXT_COMPRESSION_NONE; png_set_text (png_ptr, info_ptr, text, 2); free (text[1].key); text[1].key = NULL; free (text[0].key); text[0].key = NULL; png_write_info (png_ptr, info_ptr); if (double_height) { for (i = 0; i < format->height; ++i) { uint8_t *s; s = image + format->bytes_per_line * i; row_pointer[i * 2 + 0] = s; row_pointer[i * 2 + 1] = s; } } else { for (i = 0; i < format->height; ++i) row_pointer[i] = image + format->bytes_per_line * i; } png_write_image (png_ptr, row_pointer); png_write_end (png_ptr, info_ptr); return TRUE; } static vbi3_bool export_png (vbi3_export * e, const vbi3_page * pg) { gfx_instance *gfx = PARENT (e, gfx_instance, export); vbi3_image_format format; unsigned int cw, ch; png_bytep image; png_bytep *row_pointer; unsigned int row_adv; png_byte pen[128]; png_bytep canvas; unsigned int row; png_structp png_ptr; png_infop info_ptr; if (pg->columns < 40) { /* caption */ cw = CCW; ch = CCH; } else { cw = TCW; ch = TCH; } format.width = cw * pg->columns; format.height = ch * pg->rows; format.size = format.width * format.height; format.bytes_per_line = format.width; format.pixfmt = VBI3_PIXFMT_RGB8; row_pointer = vbi3_malloc (sizeof (*row_pointer) * format.height * 2); if (NULL == row_pointer) { _vbi3_export_malloc_error (e); return FALSE; } image = vbi3_malloc (format.size); if (NULL == image) { _vbi3_export_malloc_error (e); vbi3_free (row_pointer); return FALSE; } row_adv = pg->columns * cw * (ch - 1); if (pg->drcs_clut) { unsigned int i; for (i = 2; i < 2 + 8 + 32; ++i) { pen[i] = pg->drcs_clut[i]; /* opaque */ pen[i + 64] = pg->drcs_clut[i] + TRANSLUCENT; } } canvas = image; for (row = 0; row < pg->rows; ++row) { unsigned int column; for (column = 0; column < pg->columns; ++column) { const vbi3_char *ac; ac = pg->text + row * pg->columns + column; switch (ac->size) { case VBI3_OVER_TOP: case VBI3_OVER_BOTTOM: continue; default: break; } if (0) fprintf(stderr, "%2u %2u %04x %u\n", row, column, ac->unicode, ac->size); png_draw_char (canvas, format.bytes_per_line, pg, ac, (unsigned int) !e->reveal, pen, /* is_ttx */ pg->columns >= 40); switch (ac->size) { case VBI3_DOUBLE_WIDTH: case VBI3_DOUBLE_SIZE: case VBI3_DOUBLE_SIZE2: canvas += cw * 2; break; default: canvas += cw; break; } } canvas += row_adv; } /* Now save the image */ png_ptr = png_create_write_struct (PNG_LIBPNG_VER_STRING, NULL, NULL, NULL); if (NULL == png_ptr) goto unknown_error; info_ptr = png_create_info_struct (png_ptr); if (NULL == info_ptr) { png_destroy_write_struct (&png_ptr, (png_infopp) NULL); goto unknown_error; } if (!write_png (e, pg, png_ptr, info_ptr, image, row_pointer, &format, gfx->double_height)) { png_destroy_write_struct (&png_ptr, &info_ptr); goto write_error; } png_destroy_write_struct (&png_ptr, &info_ptr); vbi3_free (row_pointer); vbi3_free (image); return TRUE; write_error: _vbi3_export_write_error (e); unknown_error: if (row_pointer) vbi3_free (row_pointer); if (image) vbi3_free (image); return FALSE; } static const vbi3_export_info export_info_png = { .keyword = "png", .label = N_("PNG"), .tooltip = N_("Export this page as PNG image"), .mime_type = "image/png", .extension = "png", }; const _vbi3_export_module _vbi3_export_module_png = { .export_info = &export_info_png, ._new = gfx_new, ._delete = gfx_delete, .option_info = option_info, .option_info_size = N_ELEMENTS (option_info), .option_get = option_get, .option_set = option_set, .export = export_png }; #endif /* HAVE_LIBPNG */ zapping-0.10cvs6/libvbi/exp-gfx.h 644 764 144 7044 10260120175 12002 /* * libzvbi - Closed Caption and Teletext rendering * * Copyright (C) 2000, 2001, 2002, 2004 Michael H. Schimek * * Based on code from AleVT 1.5.1 * Copyright (C) 1998, 1999 Edgar Toernig * Copyright (C) 1999 Paul Ortyl * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* $Id: exp-gfx.h,v 1.4 2005/06/28 00:57:33 mschimek Exp $ */ #ifndef __ZVBI3_EXP_GFX_H__ #define __ZVBI3_EXP_GFX_H__ #include /* va_list */ #include "macros.h" #include "page.h" /* vbi3_page */ #include "image_format.h" /* vbi3_image_format */ VBI3_BEGIN_DECLS /** * @addtogroup Render * @{ */ extern vbi3_bool vbi3_page_draw_teletext_region_va_list (const vbi3_page * pg, void * buffer, const vbi3_image_format *format, unsigned int x, unsigned int y, unsigned int column, unsigned int row, unsigned int n_columns, unsigned int n_rows, va_list export_options) __attribute__ ((_vbi3_nonnull (1, 2, 3))); extern vbi3_bool vbi3_page_draw_teletext_region (const vbi3_page * pg, void * buffer, const vbi3_image_format *format, unsigned int x, unsigned int y, unsigned int column, unsigned int row, unsigned int n_columns, unsigned int n_rows, ...) __attribute__ ((_vbi3_nonnull (1, 2, 3), _vbi3_sentinel)); extern vbi3_bool vbi3_page_draw_teletext_va_list (const vbi3_page * pg, void * buffer, const vbi3_image_format *format, va_list export_options) __attribute__ ((_vbi3_nonnull (1, 2, 3))); extern vbi3_bool vbi3_page_draw_teletext (const vbi3_page * pg, void * buffer, const vbi3_image_format *format, ...) __attribute__ ((_vbi3_nonnull (1, 2, 3), _vbi3_sentinel)); extern vbi3_bool vbi3_page_draw_caption_region_va_list (const vbi3_page * pg, void * buffer, const vbi3_image_format *format, unsigned int x, unsigned int y, unsigned int column, unsigned int row, unsigned int n_columns, unsigned int n_rows, va_list export_options) __attribute__ ((_vbi3_nonnull (1, 2, 3))); extern vbi3_bool vbi3_page_draw_caption_region (const vbi3_page * pg, void * buffer, const vbi3_image_format *format, unsigned int x, unsigned int y, unsigned int column, unsigned int row, unsigned int n_columns, unsigned int n_rows, ...) __attribute__ ((_vbi3_nonnull (1, 2, 3), _vbi3_sentinel)); extern vbi3_bool vbi3_page_draw_caption_va_list (const vbi3_page * pg, void * buffer, const vbi3_image_format *format, va_list export_options) __attribute__ ((_vbi3_nonnull (1, 2, 3))); extern vbi3_bool vbi3_page_draw_caption (const vbi3_page * pg, void * buffer, const vbi3_image_format *format, ...) __attribute__ ((_vbi3_nonnull (1, 2), _vbi3_sentinel)); /** @} */ VBI3_END_DECLS #endif /* __ZVBI3_EXP_GFX_H__ */ zapping-0.10cvs6/libvbi/image_format.c 644 764 144 5053 10167772034 13064 /* * libzvbi * * Copyright (C) 2003, 2004 Michael H. Schimek * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. * * 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 this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* $Id: image_format.c,v 1.2 2005/01/08 14:54:20 mschimek Exp $ */ #include "image_format.h" /** * @param pixfmt Pixel format. * * Returns the name of a pixel format like VBI3_PIXFMT_YUYV -> * "YUYV". This is mainly intended for debugging. * * @return * Static ASCII string, NULL if @a pixfmt is invalid. */ const char * vbi3_pixfmt_name (vbi3_pixfmt pixfmt) { switch (pixfmt) { #undef CASE #define CASE(fmt) case VBI3_PIXFMT_##fmt : return #fmt ; CASE (NONE) CASE (YUV444) CASE (YVU444) CASE (YUV422) CASE (YVU422) CASE (YUV411) CASE (YVU411) CASE (YUV420) CASE (YVU420) CASE (YUV410) CASE (YVU410) CASE (YUVA24_LE) CASE (YUVA24_BE) CASE (YVUA24_LE) CASE (YVUA24_BE) CASE (YUV24_LE) CASE (YUV24_BE) CASE (YVU24_LE) CASE (YVU24_BE) CASE (YUYV) CASE (YVYU) CASE (UYVY) CASE (VYUY) CASE (Y8) CASE (RGBA24_LE) CASE (RGBA24_BE) CASE (BGRA24_LE) CASE (BGRA24_BE) CASE (RGB24_LE) CASE (BGR24_LE) CASE (RGB16_LE) CASE (RGB16_BE) CASE (BGR16_LE) CASE (BGR16_BE) CASE (RGBA15_LE) CASE (RGBA15_BE) CASE (BGRA15_LE) CASE (BGRA15_BE) CASE (ARGB15_LE) CASE (ARGB15_BE) CASE (ABGR15_LE) CASE (ABGR15_BE) CASE (RGBA12_LE) CASE (RGBA12_BE) CASE (BGRA12_LE) CASE (BGRA12_BE) CASE (ARGB12_LE) CASE (ARGB12_BE) CASE (ABGR12_LE) CASE (ABGR12_BE) CASE (RGB8) CASE (BGR8) CASE (RGBA7) CASE (BGRA7) CASE (ARGB7) CASE (ABGR7) case VBI3_PIXFMT_RESERVED0: case VBI3_PIXFMT_RESERVED1: case VBI3_PIXFMT_RESERVED2: case VBI3_PIXFMT_RESERVED3: break; /* No default, gcc warns. */ } return NULL; } unsigned int _vbi3_pixfmt_bytes_per_pixel (vbi3_pixfmt pixfmt) { vbi3_pixfmt_set set = VBI3_PIXFMT_SET (pixfmt); if (set & (_VBI3_PIXFMT_SET_4 | _VBI3_PIXFMT_SET_3)) return (set & _VBI3_PIXFMT_SET_4) ? 4 : 3; else if (set & (_VBI3_PIXFMT_SET_2 | _VBI3_PIXFMT_SET_1)) return (set & _VBI3_PIXFMT_SET_2) ? 2 : 1; return 0; } zapping-0.10cvs6/libvbi/image_format.h 644 764 144 30717 10260120434 13077 /* * libzvbi - Image definitions * * Copyright (C) 2003, 2004 Michael H. Schimek * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. * * 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 this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* $Id: image_format.h,v 1.4 2005/06/28 01:00:12 mschimek Exp $ */ #ifndef __ZVBI3_IMAGE_FORMAT_H__ #define __ZVBI3_IMAGE_FORMAT_H__ #include /* uint64_t */ #include "macros.h" VBI3_BEGIN_DECLS /** * @addtogroup Types * @{ */ /** Pixel format identifier. */ typedef enum { VBI3_PIXFMT_NONE, /**< */ VBI3_PIXFMT_UNKNOWN = VBI3_PIXFMT_NONE, /**< */ VBI3_PIXFMT_RESERVED0, /** * Planar YUV formats. Letters XYZ describe the contents of the * first to last plane in memory. Numbers follow standard naming * conventions, e. g. YUV422 means YUV 4:2:2. * * Relative plane sizes of VBI3_PIXFMT_YUV444: 4x4 4x4 4x4 */ VBI3_PIXFMT_YUV444, VBI3_PIXFMT_YVU444, /**< 4x4 4x4 4x4 */ VBI3_PIXFMT_YUV422, /**< 4x4 2x4 2x4 */ VBI3_PIXFMT_YVU422, /**< 4x4 2x4 2x4 */ VBI3_PIXFMT_YUV411, /**< 4x4 1x4 1x4 */ VBI3_PIXFMT_YVU411, /**< 4x4 1x4 1x4 */ VBI3_PIXFMT_YUV420, /**< 4x4 2x2 2x2 */ VBI3_PIXFMT_YVU420, /**< 4x4 2x2 2x2 */ VBI3_PIXFMT_YUV410, /**< 4x4 1x1 1x1 */ VBI3_PIXFMT_YVU410, /**< 4x4 1x1 1x1 */ /** * Packed YUV formats. Letters WXYZ describe register contents * from last to most significant bit. Numbers are the significant * bits without alpha bits. Appendix _LE means LSB is stored * first in memory, _BE means MSB. * * VBI3_PIXFMT_YUVA24_LE in register: 0xAAVVUUYY, memory: Y U V A */ VBI3_PIXFMT_YUVA24_LE, VBI3_PIXFMT_YUVA24_BE, /**< 0xAAVVUUYY, A V U Y */ VBI3_PIXFMT_YVUA24_LE, /**< 0xAAUUVVYY, Y V U A */ VBI3_PIXFMT_YVUA24_BE, /**< 0xAAUUVVYY, A U V Y */ VBI3_PIXFMT_AVUY24_BE = VBI3_PIXFMT_YUVA24_LE, /**< */ VBI3_PIXFMT_AVUY24_LE, /**< */ VBI3_PIXFMT_AUVY24_BE, /**< */ VBI3_PIXFMT_AUVY24_LE, /**< */ VBI3_PIXFMT_YUV24_LE, /**< 0xVVUUYY, Y U V */ VBI3_PIXFMT_YUV24_BE, /**< 0xVVUUYY, V U Y */ VBI3_PIXFMT_YVU24_LE, /**< 0xUUVVYY, Y V U */ VBI3_PIXFMT_YVU24_BE, /**< 0xUUVVYY, U V Y */ VBI3_PIXFMT_VUY24_BE = VBI3_PIXFMT_YUV24_LE, /**< */ VBI3_PIXFMT_VUY24_LE, /**< */ VBI3_PIXFMT_UVY24_BE, /**< */ VBI3_PIXFMT_UVY24_LE, /**< */ /** * Packed YUV 4:2:2 formats. Letters WXYZ describe color components * stored at ascending memory addresses, 8 bits each. * * VBI3_PIXFMT_YUYV: Y0, (U0 + U1) / 2, Y1, (V0 + V1) / 2 in memory */ VBI3_PIXFMT_YUYV, VBI3_PIXFMT_YVYU, /**< Y0 V Y1 U */ VBI3_PIXFMT_UYVY, /**< U Y0 V Y1 */ VBI3_PIXFMT_VYUY, /**< V Y0 U Y1 */ VBI3_PIXFMT_RESERVED1, /** Y only, 8 bit per pixel. */ VBI3_PIXFMT_Y8, VBI3_PIXFMT_RESERVED2, VBI3_PIXFMT_RESERVED3, /** * Packed RGB formats. Letters WXYZ describe register contents * from last to most significant bit. Numbers are the significant * bits without alpha bits. Appendix _LE means LSB is stored * first in memory, _BE means MSB. * * VBI3_PIXFMT_RGBA24_LE in register: 0xAABBGGRR, memory: R G B A */ VBI3_PIXFMT_RGBA24_LE, VBI3_PIXFMT_RGBA24_BE, /**< 0xAABBGGRR, A B G R */ VBI3_PIXFMT_BGRA24_LE, /**< 0xAARRGGBB, B G R A */ VBI3_PIXFMT_BGRA24_BE, /**< 0xAARRGGBB, A R G B */ VBI3_PIXFMT_ABGR24_BE = VBI3_PIXFMT_RGBA24_LE, /**< */ VBI3_PIXFMT_ABGR24_LE, /**< */ VBI3_PIXFMT_ARGB24_BE, /**< */ VBI3_PIXFMT_ARGB24_LE, /**< */ VBI3_PIXFMT_RGB24_LE, /* 0xBBGGRR, R G B */ VBI3_PIXFMT_RGB24_BE, /* 0xRRGGBB, B G R */ VBI3_PIXFMT_BGR24_BE = VBI3_PIXFMT_RGB24_LE, /**< */ VBI3_PIXFMT_BGR24_LE, /**< */ /** In register: bbbbbggg gggrrrrr (msb to lsb) */ VBI3_PIXFMT_RGB16_LE, VBI3_PIXFMT_RGB16_BE, /**< */ VBI3_PIXFMT_BGR16_LE, /**< rrrrrggg gggbbbbb */ VBI3_PIXFMT_BGR16_BE, /**< */ VBI3_PIXFMT_RGBA15_LE, /**< abbbbbgg gggrrrrr */ VBI3_PIXFMT_RGBA15_BE, /**< */ VBI3_PIXFMT_BGRA15_LE, /**< arrrrrgg gggbbbbb */ VBI3_PIXFMT_BGRA15_BE, /**< */ VBI3_PIXFMT_ARGB15_LE, /**< bbbbbggg ggrrrrra */ VBI3_PIXFMT_ARGB15_BE, /**< */ VBI3_PIXFMT_ABGR15_LE, /**< rrrrrggg ggbbbbba */ VBI3_PIXFMT_ABGR15_BE, /**< */ VBI3_PIXFMT_RGBA12_LE, /**< aaaabbbb ggggrrrr */ VBI3_PIXFMT_RGBA12_BE, /**< */ VBI3_PIXFMT_BGRA12_LE, /**< aaaarrrr ggggbbbb */ VBI3_PIXFMT_BGRA12_BE, /**< */ VBI3_PIXFMT_ARGB12_LE, /**< bbbbgggg rrrraaaa */ VBI3_PIXFMT_ARGB12_BE, /**< */ VBI3_PIXFMT_ABGR12_LE, /**< rrrrgggg bbbbaaaa */ VBI3_PIXFMT_ABGR12_BE, /**< */ VBI3_PIXFMT_RGB8, /**< bbgggrrr */ VBI3_PIXFMT_BGR8, /**< rrrgggbb */ VBI3_PIXFMT_RGBA7, /**< abbgggrr */ VBI3_PIXFMT_BGRA7, /**< arrgggbb */ VBI3_PIXFMT_ARGB7, /**< bbgggrra */ VBI3_PIXFMT_ABGR7 /**< rrgggbba */ } vbi3_pixfmt; #define VBI3_MAX_PIXFMTS 64 /** * A set of pixel formats is used where more than one * format may apply. Use VBI3_PIXFMT_SET macros * to build a set. */ typedef uint64_t vbi3_pixfmt_set; #define VBI3_PIXFMT_SET(pixfmt) (((vbi3_pixfmt_set) 1) << (pixfmt)) #define VBI3_PIXFMT_SET_UNKNOWN 0 #define VBI3_PIXFMT_SET_EMPTY 0 #define VBI3_PIXFMT_SET_YUV_PLANAR (VBI3_PIXFMT_SET (VBI3_PIXFMT_YUV444) | \ VBI3_PIXFMT_SET (VBI3_PIXFMT_YVU444) | \ VBI3_PIXFMT_SET (VBI3_PIXFMT_YUV422) | \ VBI3_PIXFMT_SET (VBI3_PIXFMT_YVU422) | \ VBI3_PIXFMT_SET (VBI3_PIXFMT_YUV411) | \ VBI3_PIXFMT_SET (VBI3_PIXFMT_YVU411) | \ VBI3_PIXFMT_SET (VBI3_PIXFMT_YUV420) | \ VBI3_PIXFMT_SET (VBI3_PIXFMT_YVU420) | \ VBI3_PIXFMT_SET (VBI3_PIXFMT_YUV410) | \ VBI3_PIXFMT_SET (VBI3_PIXFMT_YVU410)) #define VBI3_PIXFMT_SET_YUVA24 (VBI3_PIXFMT_SET (VBI3_PIXFMT_YUVA24_LE) | \ VBI3_PIXFMT_SET (VBI3_PIXFMT_YUVA24_BE) | \ VBI3_PIXFMT_SET (VBI3_PIXFMT_YVUA24_LE) | \ VBI3_PIXFMT_SET (VBI3_PIXFMT_YVUA24_BE)) #define VBI3_PIXFMT_SET_YUV24 (VBI3_PIXFMT_SET (VBI3_PIXFMT_YUV24_LE) | \ VBI3_PIXFMT_SET (VBI3_PIXFMT_YUV24_BE) | \ VBI3_PIXFMT_SET (VBI3_PIXFMT_YVU24_LE) | \ VBI3_PIXFMT_SET (VBI3_PIXFMT_YVU24_BE)) #define VBI3_PIXFMT_SET_YUV16 (VBI3_PIXFMT_SET (VBI3_PIXFMT_YUYV) | \ VBI3_PIXFMT_SET (VBI3_PIXFMT_YVYU) | \ VBI3_PIXFMT_SET (VBI3_PIXFMT_UYVY) | \ VBI3_PIXFMT_SET (VBI3_PIXFMT_VYUY)) #define VBI3_PIXFMT_SET_YUV_PACKED (VBI3_PIXFMT_SET_YUVA24 | \ VBI3_PIXFMT_SET_YUV24 | \ VBI3_PIXFMT_SET_YUV16 | \ VBI3_PIXFMT_SET (VBI3_PIXFMT_Y8)) #define VBI3_PIXFMT_SET_YUV (VBI3_PIXFMT_SET_YUV_PLANAR | \ VBI3_PIXFMT_SET_YUV_PACKED) #define VBI3_PIXFMT_SET_RGBA24 (VBI3_PIXFMT_SET (VBI3_PIXFMT_RGBA24_LE) | \ VBI3_PIXFMT_SET (VBI3_PIXFMT_RGBA24_BE) | \ VBI3_PIXFMT_SET (VBI3_PIXFMT_BGRA24_LE) | \ VBI3_PIXFMT_SET (VBI3_PIXFMT_BGRA24_BE)) #define VBI3_PIXFMT_SET_RGB24 (VBI3_PIXFMT_SET (VBI3_PIXFMT_RGB24_LE) | \ VBI3_PIXFMT_SET (VBI3_PIXFMT_BGR24_LE)) #define VBI3_PIXFMT_SET_RGB16 (VBI3_PIXFMT_SET (VBI3_PIXFMT_RGB16_LE) | \ VBI3_PIXFMT_SET (VBI3_PIXFMT_RGB16_BE) | \ VBI3_PIXFMT_SET (VBI3_PIXFMT_BGR16_LE) | \ VBI3_PIXFMT_SET (VBI3_PIXFMT_BGR16_BE)) #define VBI3_PIXFMT_SET_RGB15 (VBI3_PIXFMT_SET (VBI3_PIXFMT_RGBA15_LE) | \ VBI3_PIXFMT_SET (VBI3_PIXFMT_RGBA15_BE) | \ VBI3_PIXFMT_SET (VBI3_PIXFMT_BGRA15_LE) | \ VBI3_PIXFMT_SET (VBI3_PIXFMT_BGRA15_BE) | \ VBI3_PIXFMT_SET (VBI3_PIXFMT_ARGB15_LE) | \ VBI3_PIXFMT_SET (VBI3_PIXFMT_ARGB15_BE) | \ VBI3_PIXFMT_SET (VBI3_PIXFMT_ABGR15_LE) | \ VBI3_PIXFMT_SET (VBI3_PIXFMT_ABGR15_BE)) #define VBI3_PIXFMT_SET_RGB12 (VBI3_PIXFMT_SET (VBI3_PIXFMT_RGBA12_LE) | \ VBI3_PIXFMT_SET (VBI3_PIXFMT_RGBA12_BE) | \ VBI3_PIXFMT_SET (VBI3_PIXFMT_BGRA12_LE) | \ VBI3_PIXFMT_SET (VBI3_PIXFMT_BGRA12_BE) | \ VBI3_PIXFMT_SET (VBI3_PIXFMT_ARGB12_LE) | \ VBI3_PIXFMT_SET (VBI3_PIXFMT_ARGB12_BE) | \ VBI3_PIXFMT_SET (VBI3_PIXFMT_ABGR12_LE) | \ VBI3_PIXFMT_SET (VBI3_PIXFMT_ABGR12_BE)) #define VBI3_PIXFMT_SET_RGB8 (VBI3_PIXFMT_SET (VBI3_PIXFMT_RGB8) | \ VBI3_PIXFMT_SET (VBI3_PIXFMT_BGR8)) #define VBI3_PIXFMT_SET_RGB7 (VBI3_PIXFMT_SET (VBI3_PIXFMT_RGBA7) | \ VBI3_PIXFMT_SET (VBI3_PIXFMT_BGRA7) | \ VBI3_PIXFMT_SET (VBI3_PIXFMT_ARGB7) | \ VBI3_PIXFMT_SET (VBI3_PIXFMT_ABGR7)) #define VBI3_PIXFMT_SET_RGB_PACKED (VBI3_PIXFMT_SET_RGBA24 | \ VBI3_PIXFMT_SET_RGB24 | \ VBI3_PIXFMT_SET_RGB16 | \ VBI3_PIXFMT_SET_RGB15 | \ VBI3_PIXFMT_SET_RGB12 | \ VBI3_PIXFMT_SET_RGB8 | \ VBI3_PIXFMT_SET_RGB7) #define VBI3_PIXFMT_SET_RGB (VBI3_PIXFMT_SET_RGB_PACKED) #define VBI3_PIXFMT_SET_PLANAR (VBI3_PIXFMT_SET_YUV_PLANAR) #define VBI3_PIXFMT_SET_PACKED (VBI3_PIXFMT_SET_YUV_PACKED | \ VBI3_PIXFMT_SET_RGB_PACKED) #define VBI3_PIXFMT_SET_ALL (VBI3_PIXFMT_SET_YUV | \ VBI3_PIXFMT_SET_RGB) #define VBI3_PIXFMT_IS_YUV(pixfmt) \ (0 != (VBI3_PIXFMT_SET (pixfmt) & VBI3_PIXFMT_SET_YUV)) #define VBI3_PIXFMT_IS_RGB(pixfmt) \ (0 != (VBI3_PIXFMT_SET (pixfmt) & VBI3_PIXFMT_SET_RGB)) #define VBI3_PIXFMT_IS_PLANAR(pixfmt) \ (0 != (VBI3_PIXFMT_SET (pixfmt) & VBI3_PIXFMT_SET_PLANAR)) #define VBI3_PIXFMT_IS_PACKED(pixfmt) \ (0 != (VBI3_PIXFMT_SET (pixfmt) & VBI3_PIXFMT_SET_PACKED)) #ifndef DOXYGEN_SHOULD_SKIP_THIS #define _VBI3_PIXFMT_SET_4 (VBI3_PIXFMT_SET_YUVA24 | \ VBI3_PIXFMT_SET_RGBA24) #define _VBI3_PIXFMT_SET_3 (VBI3_PIXFMT_SET_YUV24 | \ VBI3_PIXFMT_SET_RGB24) #define _VBI3_PIXFMT_SET_2 (VBI3_PIXFMT_SET_YUV16 | \ VBI3_PIXFMT_SET_RGB16 | \ VBI3_PIXFMT_SET_RGB15 | \ VBI3_PIXFMT_SET_RGB12) #define _VBI3_PIXFMT_SET_1 (VBI3_PIXFMT_SET_YUV_PLANAR | \ VBI3_PIXFMT_SET (VBI3_PIXFMT_Y8) | \ VBI3_PIXFMT_SET_RGB8 | \ VBI3_PIXFMT_SET_RGB7) #endif #ifdef __GNUC__ #define vbi3_pixfmt_bytes_per_pixel(pixfmt) \ (!__builtin_constant_p (pixfmt) ? \ _vbi3_pixfmt_bytes_per_pixel (pixfmt) : \ ((VBI3_PIXFMT_SET (pixfmt) & _VBI3_PIXFMT_SET_4) ? 4U : \ ((VBI3_PIXFMT_SET (pixfmt) & _VBI3_PIXFMT_SET_3) ? 3U : \ ((VBI3_PIXFMT_SET (pixfmt) & _VBI3_PIXFMT_SET_2) ? 2U : \ ((VBI3_PIXFMT_SET (pixfmt) & _VBI3_PIXFMT_SET_1) ? 1U : \ 0U))))) #else /** * @param pixfmt Pixel format. * * Returns the number of bytes per pixel used by a pixel format. * For planar YUV formats (which may take a fraction of bytes * on average) the result is 1. * * @return * Number of bytes per pixel, 0 if @a pixfmt is invalid. */ #define vbi3_pixfmt_bytes_per_pixel(pixfmt) \ (_vbi3_pixfmt_bytes_per_pixel (pixfmt)) #endif extern const char * vbi3_pixfmt_name (vbi3_pixfmt pixfmt) __attribute__ ((const)); #ifndef DOXYGEN_SHOULD_SKIP_THIS extern unsigned int _vbi3_pixfmt_bytes_per_pixel (vbi3_pixfmt pixfmt) __attribute__ ((const)); #endif /** Color space identifier. No values defined yet. */ typedef enum { VBI3_COLOR_SPACE_NONE, /**< */ VBI3_COLOR_SPACE_UNKNOWN = VBI3_COLOR_SPACE_NONE, /**< */ } vbi3_color_space; /** This structure describes an image buffer. */ typedef struct { /** * Image width in pixels, for planar formats this refers to * the Y plane and must be a multiple of vbi3_pixel_format.uv_hscale. */ unsigned int width; /** * Image height in pixels, for planar formats this refers to * the Y plane and must be a multiple of tv_pixel_format.uv_vscale. */ unsigned int height; /** * For packed formats bytes_per_line >= (width * * vbi3_pixel_format.bits_per_pixel + 7) / 8. For planar formats * this refers to the Y plane only, with implied y_size = * bytes_per_line * height. */ unsigned long bytes_per_line; /** For planar formats only, refers to the U and V plane. */ unsigned long uv_bytes_per_line; /** * For packed formats the image offset in bytes from the buffer * start. For planar formats this refers to the Y plane. */ unsigned long offset; /** * For planar formats only, the byte offset of the U and V * plane from the start of the buffer. */ unsigned long u_offset; unsigned long v_offset; /** * Buffer size. For packed formats size >= offset + height * * bytes_per_line. For planar formats size >= * MAX (offset + y_size, u_offset + uv_size, v_offset + uv_size). */ unsigned long size; /** Pixel format used by the buffer. */ vbi3_pixfmt pixfmt; /** Color space used by the buffer. */ vbi3_color_space color_space; } vbi3_image_format; /** @} */ VBI3_END_DECLS #endif /* __ZVBI3_IMAGE_FORMAT_H__ */ zapping-0.10cvs6/libvbi/exp-sub.c 644 764 144 102525 10324040735 12046 /* * libzvbi - Closed Caption and Teletext * caption / subtitle export functions * * Copyright (C) 2004 Michael H. Schimek * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* $Id: exp-sub.c,v 1.2 2005/10/14 23:40:13 mschimek Exp $ */ #ifdef HAVE_CONFIG_H # include "config.h" #endif #include #include #include /* malloc() */ #include /* floor() */ #include #include "page.h" /* vbi3_page */ #include "conv.h" #include "misc.h" #include "lang.h" /* vbi3_character_set, ... */ #ifdef ZAPPING8 # include "common/intl-priv.h" #else # include "intl-priv.h" #endif #include "export-priv.h" /* vbi3_export */ /* Resources: MPSub format http://www.mplayerhq.hu/DOCS/HTML/en/subosd.html QuickTime Text http://www.apple.com/quicktime/tools_tips/tutorials/texttracks.html http://developer.apple.com/documentation/QuickTime/QTFF/QTFFChap4/ chapter_5_section_2.html RealText http://service.real.com/help/library/encoders.html Understanding SAMI 1.0 http://msdn.microsoft.com/library/en-us/dnacc/html/atg_samiarticle.asp Adding Closed Captions to Digital Media http://msdn.microsoft.com/library/en-us/dnwmt/html/wmp7_sami.asp SubRip http://membres.lycos.fr/subrip/ SubViewer http://www.subviewer.com/ */ typedef struct { uint16_t * buffer; uint16_t * bp; uint16_t * end; } vec; typedef enum { FORMAT_MPSUB, FORMAT_QTTEXT, FORMAT_REALTEXT, FORMAT_SAMI, FORMAT_SUBRIP, FORMAT_SUBVIEWER, } format; typedef struct sub_instance { vbi3_export export; jmp_buf main; vec text1; vec text2; iconv_t cd; format format; int encoding; char * charset; char * font; vbi3_bool have_header; vbi3_pgno last_pgno; double last_timestamp; double delay_time; unsigned int n_pages; unsigned int blank_pages; vbi3_char para_ac; vbi3_char last_ac; unsigned int last_just; vbi3_bool in_span; vbi3_bool in_underline; vbi3_bool in_bold; vbi3_bool in_italic; } sub_instance; static const char * user_encodings [] = { N_("ASCII"), N_("ISO-8859-1 (Latin-1 Western languages)"), N_("ISO-8859-2 (Latin-2 Central and Eastern European languages)"), N_("ISO-8859-4 (Latin-3 Baltic languages)"), N_("ISO-8859-5 (Cyrillic)"), N_("ISO-8859-7 (Greek)"), N_("ISO-8859-8 (Hebrew)"), N_("ISO-8859-9 (Turkish)"), N_("KOI8-R (Russian and Bulgarian)"), N_("KOI8-U (Ukranian)"), N_("ISO-10646/UTF-8 (Unicode)"), }; static const char * iconv_encodings [] = { "ASCII", "ISO-8859-1", "ISO-8859-2", "ISO-8859-4", "ISO-8859-5", "ISO-8859-7", "ISO-8859-8", "ISO-8859-9", "KOI8-R", "KOI8-U", "UTF-8" }; static const vbi3_option_info option_info1 [] = { _VBI3_OPTION_MENU_INITIALIZER ("format", N_("Encoding"), 1, user_encodings, N_ELEMENTS (user_encodings), NULL), /* one for users, another for programs */ _VBI3_OPTION_STRING_INITIALIZER ("charset", NULL, "ISO-8859-1", NULL), }; static const vbi3_option_info option_info2 [] = { _VBI3_OPTION_MENU_INITIALIZER ("format", N_("Encoding"), 0, user_encodings, N_ELEMENTS (user_encodings), NULL), /* one for users, another for programs */ _VBI3_OPTION_STRING_INITIALIZER ("charset", NULL, "ISO-8859-1", NULL), _VBI3_OPTION_STRING_INITIALIZER ("font", N_("Font face"), "Tahoma", NULL), }; #undef KEYWORD #define KEYWORD(str) (0 == strcmp (em->export_info->keyword, str)) static vbi3_export * sub_new (const _vbi3_export_module *em) { sub_instance *sub; assert (sizeof (user_encodings) == sizeof (iconv_encodings)); if (!(sub = vbi3_malloc (sizeof (*sub)))) return NULL; CLEAR (*sub); if (KEYWORD ("mpsub")) { sub->format = FORMAT_MPSUB; } else if (KEYWORD ("qttext")) { sub->format = FORMAT_QTTEXT; } else if (KEYWORD ("realtext")) { sub->format = FORMAT_REALTEXT; } else if (KEYWORD ("sami")) { sub->format = FORMAT_SAMI; } else if (KEYWORD ("subrip")) { sub->format = FORMAT_SUBRIP; } else if (KEYWORD ("subviewer")) { sub->format = FORMAT_SUBVIEWER; } else { assert (!"reached"); } sub->cd = (iconv_t) -1; return &sub->export; } static void sub_delete (vbi3_export * e) { sub_instance *sub = PARENT (e, sub_instance, export); vbi3_free (sub->text1.buffer); vbi3_free (sub->text2.buffer); vbi3_free (sub->charset); vbi3_free (sub->font); if ((iconv_t) -1 == sub->cd) vbi3_iconv_ucs2_close (sub->cd); vbi3_free (sub); } #undef KEYWORD #define KEYWORD(str) (0 == strcmp (keyword, str)) static vbi3_bool option_get (vbi3_export * e, const char * keyword, vbi3_option_value * value) { sub_instance *sub = PARENT (e, sub_instance, export); if (KEYWORD ("format") || KEYWORD ("encoding")) { value->num = sub->encoding; } else if (KEYWORD ("charset")) { value->str = _vbi3_export_strdup (e, NULL, sub->charset); if (!value->str) return FALSE; } else if (KEYWORD ("font")) { value->str = _vbi3_export_strdup (e, NULL, sub->font); if (!value->str) return FALSE; } else { _vbi3_export_unknown_option (e, keyword); return FALSE; } return TRUE; /* success */ } static vbi3_bool option_set (vbi3_export * e, const char * keyword, va_list ap) { sub_instance *sub = PARENT (e, sub_instance, export); if (KEYWORD ("format") || KEYWORD ("encoding")) { unsigned int encoding = va_arg (ap, unsigned int); if (encoding >= N_ELEMENTS (user_encodings)) { _vbi3_export_invalid_option (e, keyword, encoding); return FALSE; } if (!_vbi3_export_strdup (e, &sub->charset, iconv_encodings[encoding])) return FALSE; sub->encoding = encoding; } else if (KEYWORD ("charset")) { const char *string = va_arg (ap, const char *); if (!string) { _vbi3_export_invalid_option (e, keyword, string); return FALSE; } if (!_vbi3_export_strdup (e, &sub->charset, string)) return FALSE; } else if (KEYWORD ("font")) { const char *string = va_arg (ap, const char *); if (!string) { _vbi3_export_invalid_option (e, keyword, string); return FALSE; } if (!_vbi3_export_strdup (e, &sub->font, string)) return FALSE; } else { _vbi3_export_unknown_option (e, keyword); return FALSE; } return TRUE; } /* We write UCS-2 into an automatically growing buffer. */ static void extend (sub_instance * sub, vec * v) { uint16_t *buffer; unsigned int n; n = v->end - v->buffer + 2048; if (!(buffer = vbi3_realloc (v->buffer, n * sizeof (*v->buffer)))) { longjmp (sub->main, -1); } v->bp = buffer + (v->bp - v->buffer); v->buffer = buffer; v->end = buffer + n; } static void putws (sub_instance * sub, vbi3_bool escape, const char * s); static void putwc (sub_instance * sub, vbi3_bool escape, unsigned int wc) { if (escape) { switch (sub->format) { case FORMAT_REALTEXT: case FORMAT_SAMI: switch (wc) { case '<': putws (sub, FALSE, "<"); return; case '>': putws (sub, FALSE, ">"); return; case '&': putws (sub, FALSE, "&"); return; default: break; } break; default: break; } } if (sub->text1.bp >= sub->text1.end) extend (sub, &sub->text1); *sub->text1.bp++ = wc; } static void putws (sub_instance * sub, vbi3_bool escape, const char * s) { if (escape) { while (*s) putwc (sub, TRUE, (unsigned int) *s++); } else { uint16_t *d; unsigned int n; n = strlen (s); if (sub->text1.bp + n > sub->text1.end) extend (sub, &sub->text1); d = sub->text1.bp; while (n-- > 0) *d++ = *s++; sub->text1.bp = d; } } static void wprintf (sub_instance * sub, vbi3_bool escape, const char * template, ...) { char buffer[1024]; va_list ap; int n; va_start (ap, template); n = vsnprintf (buffer, sizeof (buffer), template, ap); va_end (ap); if (n < 0 || n > (int) sizeof (buffer) - 1) { longjmp (sub->main, -1); } putws (sub, escape, buffer); } static void color (sub_instance * sub, const char * label, vbi3_rgba color) { switch (sub->format) { case FORMAT_QTTEXT: wprintf (sub, FALSE, "{%s%u,%u,%u}", label, VBI3_R (color) * 0x0101, VBI3_G (color) * 0x0101, VBI3_B (color) * 0x0101); break; case FORMAT_REALTEXT: case FORMAT_SAMI: wprintf (sub, FALSE, "%s#%02x%02x%02x", label, VBI3_R (color), VBI3_G (color), VBI3_B (color)); break; default: assert (!"reached"); } } static void sami_span (sub_instance * sub, const vbi3_page * pg, const vbi3_char * ac) { unsigned int ct = 0; putws (sub, FALSE, "foreground != sub->last_ac.foreground) { color (sub, "color:", pg->color_map[ac->foreground]); ct = 1; } if (ac->background != sub->last_ac.background) { if (ct) putwc (sub, FALSE, ';'); ct = 1; color (sub, "background-color:", pg->color_map[ac->background]); } if (ac->attr & VBI3_UNDERLINE) { if (ct) putwc (sub, FALSE, ';'); ct = 1; putws (sub, FALSE, "text-decoration:underline"); } if (ac->attr & VBI3_BOLD) { if (ct) putwc (sub, FALSE, ';'); ct = 1; putws (sub, FALSE, "font-weight:bold"); } if (ac->attr & VBI3_ITALIC) { if (ct) putwc (sub, FALSE, ';'); ct = 1; putws (sub, FALSE, "font-style:italic"); } if (ac->attr & VBI3_FLASH) { if (ct) putwc (sub, FALSE, ';'); ct = 1; putws (sub, FALSE, "text-decoration:blink"); } putws (sub, FALSE, "\">"); sub->last_ac = *ac; sub->in_span = TRUE; } static void qt_style (sub_instance * sub, const vbi3_page * pg, const vbi3_char * ac) { unsigned int attr; if (ac->foreground != sub->last_ac.foreground) color (sub, "textColor:", pg->color_map[ac->foreground]); if (ac->background != sub->last_ac.background) color (sub, "backColor:", pg->color_map[ac->background]); attr = ac->attr ^ sub->last_ac.attr; if (attr) /* reset */ putws (sub, FALSE, "{plain}"); if (attr & VBI3_UNDERLINE) putws (sub, FALSE, "{underline}"); if (attr & VBI3_BOLD) putws (sub, FALSE, "{bold}"); if (attr & VBI3_ITALIC) putws (sub, FALSE, "{italic}"); sub->last_ac = *ac; } static void real_style (sub_instance * sub, const vbi3_page * pg, const vbi3_char * ac) { if (ac->foreground != sub->last_ac.foreground || ac->background != sub->last_ac.background) { unsigned int ct = 0; putws (sub, FALSE, "foreground != sub->last_ac.foreground) { color (sub, "color=\"", pg->color_map[ac->foreground]); ct = 1; } if (ac->background != sub->last_ac.background) { if (ct) putws (sub, FALSE, "\" "); color (sub, "bgcolor=\"", pg->color_map[ac->background]); } putws (sub, FALSE, "\">"); sub->in_span = TRUE; } if (ac->attr & VBI3_UNDERLINE) { putws (sub, FALSE, ""); sub->in_underline = TRUE; } if (ac->attr & VBI3_BOLD) { putws (sub, FALSE, ""); sub->in_bold = TRUE; } if (ac->attr & VBI3_ITALIC) { putws (sub, FALSE, ""); sub->in_italic = TRUE; } sub->last_ac = *ac; } static void real_style_end (sub_instance * sub) { if (sub->in_italic) { putws (sub, FALSE, ""); sub->in_italic = FALSE; } if (sub->in_bold) { putws (sub, FALSE, ""); sub->in_bold = FALSE; } if (sub->in_underline) { putws (sub, FALSE, ""); sub->in_underline = FALSE; } if (sub->in_span) { putws (sub, FALSE, ""); sub->in_span = FALSE; } sub->last_ac = sub->para_ac; } static void flush (sub_instance * sub) { if (!vbi3_stdio_cd_ucs2 (sub->export.fp, sub->cd, sub->text1.buffer, (unsigned int)(sub->text1.bp - sub->text1.buffer))) { longjmp (sub->main, -1); } sub->text1.bp = sub->text1.buffer; } static void header (sub_instance * sub, const vbi3_page * pg) { switch (sub->format) { case FORMAT_MPSUB: putws (sub, FALSE, "TITLE="); if (sub->export.network) { putws (sub, TRUE, sub->export.network); putwc (sub, FALSE, 0x0020); } if (pg->pgno < 0x100) { putws (sub, FALSE, "Closed Caption"); } else if (pg->subno && pg->subno != VBI3_ANY_SUBNO) { wprintf (sub, TRUE, _("Teletext Page %3x.%x"), pg->pgno, pg->subno); } else { wprintf (sub, TRUE, _("Teletext Page %3x"), pg->pgno); } putws (sub, FALSE, "\nAUTHOR="); putws (sub, TRUE, sub->export.creator); /* Times in seconds, not frames. */ putws (sub, FALSE, "\nFORMAT=TIME\n"); break; case FORMAT_QTTEXT: { /* Of course they have to use a proprietary numbering scheme... */ static const char *languages [] = { "en", "fr", "de", "it", "nl", "es", "da", "pt", "nn", "he", "jp", "ar", "fi", "el", "is", "mt", "tr", "hr", "zh", "ur", "th", "ko", "lt", "pl", "hu", "et", "lv", "lv", "??", "fo", "??", "??", "ru", "zh", "??", "ga", "sq", "ro", "cs", "sk", "sl", "yi", "sr", "mk", "bg", "uk", }; static const vbi3_character_set *cs; unsigned int lc; cs = vbi3_page_get_character_set (pg, 0); if (!cs) { lc = 0; } else { for (lc = 0; lc < N_ELEMENTS (languages); ++lc) if (0 == strcmp (languages[lc], cs->language_code[0])) break; if (lc >= N_ELEMENTS (languages)) lc = 0; } CLEAR (sub->last_ac); sub->last_ac.foreground = 7; sub->last_ac.background = 0; sub->last_just = 0; /* center */ wprintf (sub, FALSE, "{QTtext}" "{font:%s}" "{plain}" "{justify:center}", sub->font); color (sub, "textColor:", pg->color_map[7]); color (sub, "backColor:", pg->color_map[0]); if (lc < N_ELEMENTS (languages)) wprintf (sub, FALSE, "{language:%u}", lc); putws (sub, FALSE, "{timeStamps:absolute}" "{timeScale:100}" "\n"); break; } case FORMAT_REALTEXT: { CLEAR (sub->para_ac); sub->para_ac.foreground = 7; sub->para_ac.background = 0; sub->last_just = 0; /* center */ wprintf (sub, FALSE, "charset, sub->font); color (sub, "color=\"", pg->color_map[7]); color (sub, "\" bgcolor=\"", pg->color_map[0]); putws (sub, FALSE, "\">\n"); break; } case FORMAT_SAMI: { static const vbi3_character_set *cs; const char *lang; lang = "en"; cs = vbi3_page_get_character_set (pg, 0); if (cs && cs->language_code[0]) lang = cs->language_code[0]; putws (sub, FALSE, "\n" "\n" ""); if (sub->export.network) { putws (sub, TRUE, sub->export.network); putwc (sub, FALSE, 0x0020); } if (pg->pgno < 0x100) { putws (sub, FALSE, "Closed Caption"); } else if (pg->subno && pg->subno != VBI3_ANY_SUBNO) { /* XXX gettext encoding */ wprintf (sub, TRUE, _("Teletext Page %3x.%x"), pg->pgno, pg->subno); } else { wprintf (sub, TRUE, _("Teletext Page %3x"), pg->pgno); } putws (sub, FALSE, "\n" "\n" "Metrics {time:ms}\n" "Spec {MSFT:1.0}\n" "\n" "\n" "\n" "\n"); break; } case FORMAT_SUBRIP: /* Nothing. */ break; case FORMAT_SUBVIEWER: wprintf (sub, FALSE, "[INFORMATION]\n" "[TITLE]\n" "[AUTHOR]%s\n" "[SOURCE]", sub->export.creator); if (sub->export.network) wprintf (sub, FALSE, "%s ", sub->export.network); if (pg->pgno < 0x100) { putws (sub, FALSE, "Closed Caption"); } else if (pg->subno && pg->subno != VBI3_ANY_SUBNO) { /* XXX gettext encoding */ wprintf (sub, FALSE, _("Teletext Page %3x.%x"), pg->pgno, pg->subno); } else { wprintf (sub, FALSE, _("Teletext Page %3x"), pg->pgno); } /* What's this? I have no idea, just copied. */ wprintf (sub, FALSE, "\n" "[PRG]\n" "[FILEPATH]\n" "[DELAY]0\n" "[CD TRACK]0\n" "[COMMENT]\n" "[END INFORMATION]\n" "[SUBTITLE]\n" "[COLF]&HFFFFFF,[STYLE]bd,[SIZE]24,[FONT]%s\n", sub->font); break; } } static void footer (sub_instance * sub) { switch (sub->format) { case FORMAT_MPSUB: case FORMAT_QTTEXT: case FORMAT_SUBRIP: case FORMAT_SUBVIEWER: break; case FORMAT_REALTEXT: putws (sub, FALSE, "\n"); break; case FORMAT_SAMI: putws (sub, FALSE, "\n" "\n"); break; } } static void timestamp (sub_instance * sub) { double t1; double t2; unsigned int s1; unsigned int s2; /* Absolute stream time. */ t1 = sub->last_timestamp; t2 = sub->export.stream.timestamp; /* Seconds and fractions (to prevent overflow). */ s1 = floor (t1); t1 -= s1; s2 = floor (t2); t2 -= s2; switch (sub->format) { case FORMAT_MPSUB: { double delay_time; double show_time; /* Apparently delay_time must be integer. We round down and add the fraction to show_time to compensate for the error. */ delay_time = floor (sub->delay_time); show_time = sub->export.stream.timestamp - sub->last_timestamp; show_time += sub->delay_time - delay_time; /* wait hold\n That is how long to wait after the previous page disappeared and how long to display the following page. */ wprintf (sub, FALSE, "%u %f\n", (unsigned int) delay_time, show_time); break; } case FORMAT_QTTEXT: /* [hh:mm:ss.xx]\n presentation time */ wprintf (sub, FALSE, "[%02u:%02u:%02u.%02u]\n", s2 / 3600, (s2 / 60) % 60, s2 % 60, (unsigned int)(t2 * 100)); break; case FORMAT_REALTEXT: /* "); sub->in_span = FALSE; sub->last_ac = sub->para_ac; if (!same_style (sub, ac, &sub->last_ac)) sami_span (sub, pg, ac); } break; default: break; } } static void page_layout (unsigned int * top, unsigned int * bottom, unsigned int * left, unsigned int * right, unsigned int * hjust, const vbi3_page * pg) { unsigned int row; unsigned int left_min; unsigned int left_max; unsigned int right_min; unsigned int right_max; *top = pg->rows; *bottom = 0; left_min = pg->columns; left_max = 0; right_min = pg->columns; right_max = 0; row = 0; if (pg->pgno >= 0x100) row = 1; for (; row < pg->rows; ++row) { const vbi3_char *cp; unsigned int column; cp = pg->text + row * pg->columns; for (column = 0; column < pg->columns; ++column) if (0x0020 != cp[column].unicode && cp[column].size < VBI3_OVER_TOP && vbi3_is_print (cp[column].unicode)) break; if (column >= pg->columns) continue; /* empty row */ *top = MIN (*top, row); *bottom = MAX (*bottom, row); left_min = MIN (left_min, column); left_max = MAX (left_max, column); for (column = pg->columns; column > 0; --column) if (0x0020 != cp[column - 1].unicode && cp[column - 1].size < VBI3_OVER_TOP && vbi3_is_print (cp[column - 1].unicode)) break; right_min = MIN (right_min, column); right_max = MAX (right_max, column); } *left = left_min; *right = right_max - 1; *hjust = 0; /* not justified */ if (left_min == left_max) *hjust |= 1; /* left */ if (right_min == right_max) *hjust |= 2; /* right */ } static void paragraph (sub_instance * sub, const vbi3_page * pg, unsigned int top, unsigned int bottom, unsigned int left, unsigned int right) { unsigned int row; unsigned int width; width = right - left + 1; for (row = top; row <= bottom; ++row) { const vbi3_char *cp; unsigned int column; unsigned int spaces; unsigned int fluff; cp = pg->text + row * pg->columns; spaces = 0; fluff = 0; for (column = left; column <= right; ++column) { unsigned int c; if (cp[column].size >= VBI3_OVER_TOP) { ++fluff; continue; } c = cp[column].unicode; if (0x0020 == c || !vbi3_is_print (c)) { switch (sub->format) { case FORMAT_SAMI: if (sub->last_ac.background != cp[column].background) break; /* fall through */ default: ++spaces; continue; } c = 0x0020; } if (spaces > 0) { if (spaces + fluff >= (column - left)) { /* Discard leading spaces. */ } else if (spaces > 1) { /* Runs of spaces. */ switch (sub->format) { case FORMAT_SAMI: while (spaces-- > 0) putws (sub, FALSE, " "); break; default: /* Collapse to single space. */ putwc (sub, FALSE, 0x0020); break; } } else { putwc (sub, FALSE, 0x0020); } spaces = 0; } fluff = 0; style_change (sub, pg, cp + column); putwc (sub, /* escape */ TRUE, c); } if (spaces > 0) { /* Discard trailing spaces. */ } /* Line separator. */ switch (sub->format) { case FORMAT_MPSUB: case FORMAT_QTTEXT: case FORMAT_SUBRIP: if (spaces + fluff >= width) { /* Suppress blank line. */ } else { putwc (sub, /* escape */ FALSE, 10); } break; case FORMAT_REALTEXT: case FORMAT_SAMI: if (row < bottom) putws (sub, FALSE, "
"); break; case FORMAT_SUBVIEWER: if (row < bottom) putws (sub, FALSE, "[br]"); else putwc (sub, FALSE, 10); break; } } } static vbi3_bool export (vbi3_export * e, const vbi3_page * pg) { sub_instance *sub = PARENT (e, sub_instance, export); unsigned int top; unsigned int bottom; unsigned int left; unsigned int right; unsigned int hjust; if (setjmp (sub->main)) { /* Discard unfinished output. */ sub->text1.bp = sub->text1.buffer; return FALSE; } if (!pg) { /* Finalize the stream. */ if (sub->text1.bp > sub->text1.buffer) { /* Put timestamp in front of page (text1). */ SWAP (sub->text1, sub->text2); timestamp (sub); flush (sub); SWAP (sub->text1, sub->text2); } footer (sub); flush (sub); sub->have_header = FALSE; vbi3_iconv_ucs2_close (sub->cd); sub->cd = (iconv_t) -1; return TRUE; } if (0 != sub->last_pgno && pg->pgno != sub->last_pgno) { fprintf (stderr, "Multilingual subtitle recording " "not supported yet: pgno=%x last_pgno=%x\n", pg->pgno, sub->last_pgno); return FALSE; } sub->last_pgno = pg->pgno; if (!sub->have_header) { char buffer[256]; char *d; size_t n; d = buffer; sub->cd = vbi3_iconv_ucs2_open (sub->charset, &d, sizeof (buffer)); if ((iconv_t) -1 == sub->cd) { return FALSE; } n = d - buffer; if (n > 0) if (n != fwrite (buffer, 1, n, sub->export.fp)) longjmp (sub->main, -1); header (sub, pg); flush (sub); sub->have_header = TRUE; sub->last_timestamp = e->stream.start_timestamp; sub->delay_time = e->stream.timestamp - e->stream.start_timestamp; sub->n_pages = 0; sub->blank_pages = 0; } /* First let's determine where the text is, and if it's left or right justified or centered. Not handled are split cases, e. g. one para at top right, another bottom centered. When the page is empty top > bottom. */ page_layout (&top, &bottom, &left, &right, &hjust, pg); /* Finalize the previous page and write text position/justification tags. */ switch (sub->format) { case FORMAT_MPSUB: if (0 == sub->blank_pages) { if (sub->text1.bp > sub->text1.buffer) { SWAP (sub->text1, sub->text2); timestamp (sub); flush (sub); SWAP (sub->text1, sub->text2); flush (sub); } /* End of last non-blank page. */ sub->last_timestamp = e->stream.timestamp; } if (top > bottom) { /* Ignore blank pages. */ sub->blank_pages = 1; return TRUE; } /* Delay btw end of last and start of this non-blank page. */ sub->delay_time = e->stream.timestamp - sub->last_timestamp; sub->blank_pages = 0; /* MPSub is always centered at bottom. */ hjust = 0; break; case FORMAT_QTTEXT: { static const char *hjust_attr [] = { "{justify:center}", "{justify:left}", "{justify:right}", "{justify:center}", }; timestamp (sub); if (top > bottom) goto page_separator; if (1 && 0 == hjust) { if ((int)(left + right + 8) < (int) pg->columns * 2) hjust = 1; /* left */ else if ((int)(left + right - 8) > (int) pg->columns * 2) hjust = 2; /* right */ /* else center */ } if (sub->last_just != hjust) { putws (sub, FALSE, hjust_attr[hjust]); sub->last_just = hjust; } break; } case FORMAT_REALTEXT: if (0 == sub->blank_pages && sub->text1.bp > sub->text1.buffer) { SWAP (sub->text1, sub->text2); timestamp (sub); flush (sub); SWAP (sub->text1, sub->text2); flush (sub); } if (top > bottom) { /* Ignore blank pages. */ sub->blank_pages = 1; return TRUE; } hjust = 0; /* ? */ sub->last_timestamp = sub->export.stream.timestamp; sub->blank_pages = 0; sub->last_ac = sub->para_ac; break; case FORMAT_SAMI: timestamp (sub); if (top > bottom) { putws (sub, FALSE, "

 "); goto page_separator; } /* Pity we cannot just define a screen center relative position. */ if (1 && 0 == hjust) { if ((int)(left + right + 8) < (int) pg->columns * 2) hjust = 1; /* left */ else if ((int)(left + right - 8) > (int) pg->columns * 2) hjust = 2; /* right */ /* else center */ } if (0 == hjust || 3 == hjust) { /* Can only justify left or right. */ /* Note MPlayer cannot handle "

". */ putws (sub, FALSE, "

"); } else { wprintf (sub, FALSE, "

", "xlrx"[hjust]); } sub->last_ac = sub->para_ac; break; case FORMAT_SUBRIP: case FORMAT_SUBVIEWER: if (0 == sub->blank_pages && sub->text1.bp > sub->text1.buffer) { SWAP (sub->text1, sub->text2); timestamp (sub); flush (sub); SWAP (sub->text1, sub->text2); flush (sub); ++sub->n_pages; } if (top > bottom) { /* Ignore blank pages. */ sub->blank_pages = 1; return TRUE; } sub->last_timestamp = sub->export.stream.timestamp; sub->blank_pages = 0; break; } /* Write paragraph. */ paragraph (sub, pg, top, bottom, left, right); page_separator: /* Page separator. */ switch (sub->format) { case FORMAT_MPSUB: case FORMAT_SUBRIP: case FORMAT_SUBVIEWER: /* Separator is a blank line. */ putwc (sub, FALSE, 10); /* Don't flush, have to add timestamp. */ break; case FORMAT_QTTEXT: /* Nothing. */ flush (sub); break; case FORMAT_REALTEXT: real_style_end (sub); putwc (sub, FALSE, 10); /* Don't flush, have to add timestamp. */ break; case FORMAT_SAMI: if (sub->in_span) { putws (sub, FALSE, ""); sub->in_span = FALSE; } putws (sub, FALSE, "

\n"); flush (sub); break; } sub->last_timestamp = sub->export.stream.timestamp; return TRUE; } static const vbi3_export_info export_info_mpsub = { .keyword = "mpsub", .label = "MPSub", /* TRANSLATORS: Caption is an aid for the hearing impaired, subtitles for foreign language viewers. */ .tooltip = N_("MPlayer caption/subtitle file"), .mime_type = NULL, .extension = "sub", .open_format = TRUE, }; const _vbi3_export_module _vbi3_export_module_mpsub = { .export_info = &export_info_mpsub, ._new = sub_new, ._delete = sub_delete, .option_info = option_info1, .option_info_size = N_ELEMENTS (option_info1), .option_get = option_get, .option_set = option_set, .export = export }; static const vbi3_export_info export_info_qttext = { .keyword = "qttext", .label = "QTText", /* TRANSLATORS: Styles like bold, italic, underlined, etc. Justification to the left, right, centered. */ .tooltip = N_("QuickTime Text caption/subtitle file " "preserving text styles, justification " "and color"), .mime_type = NULL, .extension = "txt", .open_format = TRUE, }; const _vbi3_export_module _vbi3_export_module_qttext = { .export_info = &export_info_qttext, ._new = sub_new, ._delete = sub_delete, .option_info = option_info2, .option_info_size = N_ELEMENTS (option_info2), .option_get = option_get, .option_set = option_set, .export = export }; static const vbi3_export_info export_info_realtext = { .keyword = "realtext", .label = "RealText", .tooltip = N_("RealText caption/subtitle file " "preserving text styles and color"), .mime_type = NULL, .extension = "rt", .open_format = TRUE, }; const _vbi3_export_module _vbi3_export_module_realtext = { .export_info = &export_info_realtext, ._new = sub_new, ._delete = sub_delete, .option_info = option_info2, .option_info_size = N_ELEMENTS (option_info2), .option_get = option_get, .option_set = option_set, .export = export }; static const vbi3_export_info export_info_sami = { .keyword = "sami", .label = "SAMI", .tooltip = N_("SAMI 1.0 caption/subtitle file " "preserving text styles, justification " "and color"), .mime_type = NULL, .extension = "sami,smi", .open_format = TRUE, }; const _vbi3_export_module _vbi3_export_module_sami = { .export_info = &export_info_sami, ._new = sub_new, ._delete = sub_delete, .option_info = option_info1, .option_info_size = N_ELEMENTS (option_info1), .option_get = option_get, .option_set = option_set, .export = export }; static const vbi3_export_info export_info_subrip = { .keyword = "subrip", .label = "SubRip", .tooltip = N_("SubRip caption/subtitle file"), .mime_type = NULL, .extension = "srt", .open_format = TRUE, }; const _vbi3_export_module _vbi3_export_module_subrip = { .export_info = &export_info_subrip, ._new = sub_new, ._delete = sub_delete, .option_info = option_info1, .option_info_size = N_ELEMENTS (option_info1), .option_get = option_get, .option_set = option_set, .export = export }; static const vbi3_export_info export_info_subviewer = { .keyword = "subviewer", .label = "SubViewer", .tooltip = N_("SubViewer 2.x caption/subtitle file"), .mime_type = NULL, .extension = "sub", .open_format = TRUE, }; const _vbi3_export_module _vbi3_export_module_subviewer = { .export_info = &export_info_subviewer, ._new = sub_new, ._delete = sub_delete, .option_info = option_info2, .option_info_size = N_ELEMENTS (option_info2), .option_get = option_get, .option_set = option_set, .export = export }; zapping-0.10cvs6/libvbi/exp-txt.c 644 764 144 56712 10305456044 12065 /* * libzvbi - Text export functions * * Copyright (C) 2001, 2002, 2004 Michael H. Schimek * * Based on code from AleVT 1.5.1 * Copyright (C) 1998, 1999 Edgar Toernig * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* $Id: exp-txt.c,v 1.25 2005/09/01 01:40:52 mschimek Exp $ */ #ifdef HAVE_CONFIG_H # include "config.h" #endif #include #include #include /* malloc() */ #include /* strcmp(), strlen(), memcpy() */ #include /* INT_MAX */ #include #include "misc.h" #include "page.h" /* vbi3_page */ #include "conv.h" #include "lang.h" /* vbi3_is_print() */ #ifdef ZAPPING8 # include "common/intl-priv.h" #else # include "intl-priv.h" #endif #include "export-priv.h" /* vbi3_export */ #include "exp-txt.h" typedef struct { uint16_t * buffer; uint16_t * bp; uint16_t * end; } vec; #define MAX_COLORS N_ELEMENTS (((vbi3_page *) 0)->color_map) typedef struct text_instance { vbi3_export export; /* Options */ int encoding; char * charset; vbi3_bool color; int term; int gfx_chr; vbi3_bool ascii_art; /* Not used anymore, stored for compatibility. */ int def_fg; int def_bg; jmp_buf main; vec text; char palette[MAX_COLORS]; } text_instance; static const char * user_encodings [] = { N_("ASCII"), N_("ISO-8859-1 (Latin-1 Western languages)"), N_("ISO-8859-2 (Latin-2 Central and Eastern European languages)"), N_("ISO-8859-4 (Latin-3 Baltic languages)"), N_("ISO-8859-5 (Cyrillic)"), N_("ISO-8859-7 (Greek)"), N_("ISO-8859-8 (Hebrew)"), N_("ISO-8859-9 (Turkish)"), N_("KOI8-R (Russian and Bulgarian)"), N_("KOI8-U (Ukranian)"), N_("ISO-10646/UTF-8 (Unicode)"), }; static const char * iconv_encodings [] = { "ASCII", "ISO-8859-1", "ISO-8859-2", "ISO-8859-4", "ISO-8859-5", "ISO-8859-7", "ISO-8859-8", "ISO-8859-9", "KOI8-R", "KOI8-U", "UTF-8" }; static const char * terminal [] = { /* TRANSLATORS: Terminal control codes menu */ N_("None"), N_("ANSI X3.64 / VT 100"), N_("VT 200") }; enum { TERMINAL_NONE, TERMINAL_VT100, TERMINAL_VT200, }; static const vbi3_option_info option_info [] = { _VBI3_OPTION_MENU_INITIALIZER /* TRANSLATORS: Text export encoding (ASCII, Unicode, ...) menu */ ("format", N_("Encoding"), 0, user_encodings, N_ELEMENTS (user_encodings), NULL), /* one for users, another for programs */ _VBI3_OPTION_STRING_INITIALIZER ("charset", NULL, "", NULL), _VBI3_OPTION_STRING_INITIALIZER ("gfx_chr", N_("Graphics char"), "#", N_("Replacement for block graphic characters: " "a single character or decimal (32) or hex (0x20) code")), _VBI3_OPTION_BOOL_INITIALIZER ("ascii_art", N_("ASCII art"), FALSE, N_("Replace graphic characters by ASCII art")), _VBI3_OPTION_MENU_INITIALIZER ("control", N_("Control codes"), 0, terminal, N_ELEMENTS (terminal), NULL), }; static vbi3_export * text_new (const _vbi3_export_module *em) { text_instance *text; assert (sizeof (user_encodings) == sizeof (iconv_encodings)); em = em; if (!(text = vbi3_malloc (sizeof (*text)))) return NULL; CLEAR (*text); return &text->export; } static void text_delete (vbi3_export * e) { text_instance *text = PARENT (e, text_instance, export); vbi3_free (text->text.buffer); vbi3_free (text->charset); vbi3_free (text); } #define KEYWORD(str) (0 == strcmp (keyword, str)) static vbi3_bool option_get (vbi3_export * e, const char * keyword, vbi3_option_value * value) { text_instance *text = PARENT (e, text_instance, export); if (KEYWORD ("format") || KEYWORD ("encoding")) { value->num = text->encoding; } else if (KEYWORD ("charset")) { value->str = _vbi3_export_strdup (e, NULL, text->charset); if (!value->str) return FALSE; } else if (KEYWORD ("gfx_chr")) { if (!(value->str = _vbi3_export_strdup (e, NULL, "x"))) return FALSE; value->str[0] = text->gfx_chr; } else if (KEYWORD ("ascii_art")) { value->num = text->ascii_art; } else if (KEYWORD ("control")) { value->num = text->term; } else if (KEYWORD ("fg")) { value->num = text->def_fg; } else if (KEYWORD ("bg")) { value->num = text->def_bg; } else { _vbi3_export_unknown_option (e, keyword); return FALSE; } return TRUE; /* success */ } static vbi3_bool option_set (vbi3_export * e, const char * keyword, va_list ap) { text_instance *text = PARENT (e, text_instance, export); if (KEYWORD ("format") || KEYWORD ("encoding")) { unsigned int encoding = va_arg (ap, unsigned int); if (encoding >= N_ELEMENTS (user_encodings)) { _vbi3_export_invalid_option (e, keyword, encoding); return FALSE; } if (!_vbi3_export_strdup (e, &text->charset, iconv_encodings[encoding])) return FALSE; text->encoding = encoding; } else if (KEYWORD ("charset")) { const char *string = va_arg (ap, const char *); if (!string) { _vbi3_export_invalid_option (e, keyword, string); return FALSE; } if (!_vbi3_export_strdup (e, &text->charset, string)) return FALSE; } else if (KEYWORD ("gfx_chr")) { const char *string = va_arg (ap, const char *); char *s; int value; if (!string || !string[0]) { _vbi3_export_invalid_option (e, keyword, string); return FALSE; } if (1 == strlen (string)) { value = string[0]; } else { value = strtol (string, &s, 0); if (s == string) value = string[0]; } text->gfx_chr = (value < 0x20 || value > 0xE000) ? 0x20 : value; } else if (KEYWORD ("ascii_art")) { text->ascii_art = !!va_arg (ap, vbi3_bool); } else if (KEYWORD ("control")) { unsigned int term = va_arg (ap, unsigned int); if (term > N_ELEMENTS (terminal)) { _vbi3_export_invalid_option (e, keyword, term); return FALSE; } text->term = term; } else if (KEYWORD ("fg")) { unsigned int col = va_arg (ap, unsigned int); if (col > 8) { _vbi3_export_invalid_option (e, keyword, col); return FALSE; } text->def_fg = col; } else if (KEYWORD ("bg")) { unsigned int col = va_arg (ap, unsigned int); if (col > 8) { _vbi3_export_invalid_option (e, keyword, col); return FALSE; } text->def_bg = col; } else { _vbi3_export_unknown_option (e, keyword); return FALSE; } return TRUE; } static void extend (text_instance * text, vec * v) { uint16_t *buffer; unsigned int n; n = v->end - v->buffer + 2048; if (!(buffer = vbi3_realloc (v->buffer, n * sizeof (*v->buffer)))) { longjmp (text->main, -1); } v->bp = buffer + (v->bp - v->buffer); v->buffer = buffer; v->end = buffer + n; } static void putw_spaces (text_instance * text, unsigned int n) { uint16_t *d; if (text->text.bp + n > text->text.end) extend (text, &text->text); d = text->text.bp; while (n-- > 0) *d++ = 0x0020; text->text.bp = d; } static void putwc (text_instance * text, unsigned int c) { if (text->text.bp >= text->text.end) extend (text, &text->text); *text->text.bp++ = c; } static void create_palette (text_instance * text, const vbi3_page * pg) { unsigned int j; for (j = 0; j < N_ELEMENTS (text->palette); ++j) { vbi3_rgba color; unsigned int i; unsigned int imin; int d; int dmin; color = pg->color_map[j]; imin = 0; dmin = INT_MAX; /* VT.100 defines only 8 pure colors. Try to find one close to the color_map entry (yeah, that's probably too simple). */ for (i = 0; i < 8; ++i) { d = ABS( (i & 1) * 0xFF - VBI3_R (color)); d += ABS(((i >> 1) & 1) * 0xFF - VBI3_G (color)); d += ABS( (i >> 2) * 0xFF - VBI3_B (color)); if (d < dmin) { dmin = d; imin = i; } } text->palette[j] = '0' + imin; } } static vbi3_bool putw_attr (text_instance * text, vbi3_char old, vbi3_char cur) { uint16_t *d; if (text->text.bp + 32 >= text->text.end) extend (text, &text->text); d = text->text.bp; /* Control sequences based on ECMA-48, http://www.ecma-international.org/ */ if (old.size != cur.size) { switch (cur.size) { case VBI3_NORMAL_SIZE: d[0] = 27; d[1] = '#'; d[2] = '5'; d += 3; break; case VBI3_DOUBLE_WIDTH: d[0] = 27; d[1] = '#'; d[2] = '6'; d += 3; break; case VBI3_DOUBLE_HEIGHT: case VBI3_DOUBLE_HEIGHT2: break; /* ignore */ case VBI3_DOUBLE_SIZE: d[0] = 27; d[1] = '#'; d[2] = '3'; d += 3; break; case VBI3_DOUBLE_SIZE2: d[0] = 27; d[1] = '#'; d[2] = '4'; d += 3; break; case VBI3_OVER_TOP: case VBI3_OVER_BOTTOM: return FALSE; /* don't print */ } } else { switch (cur.size) { case VBI3_OVER_TOP: case VBI3_OVER_BOTTOM: return FALSE; /* don't print */ default: break; /* no change */ } } /* SGR sequence */ d[0] = 27; /* CSI */ d[1] = '['; d += 2; if (TERMINAL_VT100 == text->term) { if ((old.attr ^ cur.attr) & (VBI3_UNDERLINE | VBI3_BOLD | VBI3_FLASH)) { *d++ = ';'; /* \e[0; reset */ old.attr &= ~(VBI3_UNDERLINE | VBI3_BOLD | VBI3_FLASH); old.foreground = ~cur.foreground; old.background = ~cur.background; } } if ((old.attr ^ cur.attr) & VBI3_BOLD) { if (cur.attr & VBI3_BOLD) { d[0] = '1'; /* bold */ d[1] = ';'; d += 2; } else { d[0] = '2'; /* bold off */ d[1] = '2'; d[2] = ';'; d += 3; } } if ((old.attr ^ cur.attr) & VBI3_ITALIC) { if (!(cur.attr & VBI3_ITALIC)) *d++ = '2'; /* off */ d[0] = '3'; /* italic */ d[1] = ';'; d += 2; } if ((old.attr ^ cur.attr) & VBI3_UNDERLINE) { if (!(cur.attr & VBI3_UNDERLINE)) *d++ = '2'; /* off */ d[0] = '4'; /* underline */ d[1] = ';'; d += 2; } if ((old.attr ^ cur.attr) & VBI3_FLASH) { if (!(cur.attr & VBI3_FLASH)) *d++ = '2'; /* steady */ d[0] = '5'; /* slowly blinking */ d[1] = ';'; d += 2; } /* ECMA-48 SGR offers conceal/reveal code, but we don't know if the terminal implements this correctly as requested by the caller. Proportional spacing needs further investigation. */ if (old.foreground != cur.foreground) { d[0] = '3'; d[1] = text->palette[cur.foreground]; d[2] = ';'; d += 3; } if (old.background != cur.background) { d[0] = '4'; d[1] = text->palette[cur.background]; d[2] = ';'; d += 3; } if ('[' == d[-1]) d -= 2; /* no change, remove CSI */ else d[-1] = 'm'; /* replace last semicolon */ text->text.bp = d; return TRUE; } /** * Like vbi3_print_page_region(), but takes export options as va_list. */ unsigned int vbi3_print_page_region_va_list (vbi3_page * pg, char * buffer, unsigned int buffer_size, const char * format, const char * separator, unsigned int separator_size, unsigned int column, unsigned int row, unsigned int width, unsigned int height, va_list export_options) { text_instance text; vbi3_bool option_table; vbi3_bool option_rtl; unsigned int option_space_attr; unsigned int y; unsigned int row0; unsigned int row1; unsigned int column0; unsigned int column1; unsigned int doubleh; /* current row */ unsigned int doubleh0; /* previous row */ iconv_t cd; char *p; char *buffer_end; const vbi3_char *acp; assert (NULL != pg); assert (NULL != buffer); if (0 == buffer_size) return 0; if (0) fprintf (stderr, "vbi3_print_page_region '%s' " "col=%d row=%d width=%d height=%d\n", format, column, row, width, height); CLEAR (text.text); option_table = FALSE; option_rtl = FALSE; option_space_attr = 0; for (;;) { vbi3_export_option option; option = va_arg (export_options, vbi3_export_option); switch (option) { case VBI3_TABLE: option_table = va_arg (export_options, vbi3_bool); break; case VBI3_RTL: option_rtl = va_arg (export_options, vbi3_bool); break; case VBI3_REVEAL: if (va_arg (export_options, vbi3_bool)) option_space_attr &= ~VBI3_CONCEAL; else option_space_attr |= VBI3_CONCEAL; break; case VBI3_FLASH_ON: if (va_arg (export_options, vbi3_bool)) option_space_attr &= ~VBI3_FLASH; else option_space_attr |= VBI3_FLASH; break; case VBI3_SCALE: va_arg (export_options, vbi3_bool); break; default: option = 0; break; } if (0 == option) break; } row0 = row; row1 = row + height - 1; column0 = column; column1 = column + width - 1; if (row1 >= pg->rows || column1 >= pg->columns) return 0; p = buffer; buffer_end = buffer + buffer_size; cd = vbi3_iconv_ucs2_open (format, &p, buffer_size); if ((iconv_t) -1 == cd) return 0; if (setjmp (text.main)) goto failure; doubleh = 0; acp = pg->text + row0 * pg->columns; for (y = row0; y <= row1; ++y) { unsigned int x, xs, xe, xl, xw; unsigned int chars, spaces; int dir; xs = (option_table || y == row0) ? column0 : 0; xe = (option_table || y == row1) ? column1 : (pg->columns - 1); xw = xe - xs; dir = +1; if (option_rtl) { SWAP (xs, xe); dir = -1; } xe += dir; if (!option_table && y == row0 && 2 == height) xl = option_rtl ? column0 : column1; else xl = INT_MAX; doubleh0 = doubleh; doubleh = 0; chars = 0; spaces = 0; for (x = xs; x != xe; x += dir) { vbi3_char ac = acp[x]; if (ac.attr & option_space_attr) ac.unicode = 0x0020; if (option_table) { if (ac.size > VBI3_DOUBLE_SIZE) ac.unicode = 0x0020; } else { switch (ac.size) { case VBI3_NORMAL_SIZE: case VBI3_DOUBLE_WIDTH: break; case VBI3_DOUBLE_HEIGHT: case VBI3_DOUBLE_SIZE: doubleh++; break; case VBI3_OVER_TOP: case VBI3_OVER_BOTTOM: continue; case VBI3_DOUBLE_HEIGHT2: case VBI3_DOUBLE_SIZE2: if (y > row0) ac.unicode = 0x0020; break; } /* Special case two lines row0 ... row1, and all chars in row0, column0 ... column1 are double height: Skip row1, don't wrap around. */ if (x == xl && doubleh >= chars) { xe = xl + dir; y = row1; } if (0x0020 == ac.unicode || !vbi3_is_print (ac.unicode)) { ++spaces; ++chars; continue; } else { if (spaces < chars || y == row0) putw_spaces (&text, spaces); /* else discard leading spaces */ spaces = 0; } } putwc (&text, ac.unicode); ++chars; } if (y < row1) { /* Note option_table implies 0 == spaces. */ if (spaces >= xw) { ; /* suppress blank line */ } else { ; /* discard trailing spaces */ if (separator) { unsigned int size; size = text.text.bp - text.text.buffer; if (!vbi3_iconv_ucs2 (cd, &p, (unsigned int)(buffer_end - p), text.text.buffer, size)) goto failure; text.text.bp = text.text.buffer; if (separator_size > (unsigned int)(buffer_end - p)) goto failure; memcpy (p, separator, separator_size); p += separator_size; } else { putwc (&text, option_table ? 0x000AU : 0x0020U); } } } else { /* Last row. */ if (doubleh0 > 0) { ; /* pretend this is the lower half of an all blank double height row */ } else { /* Trailing spaces. */ putw_spaces (&text, spaces); } } acp += pg->columns; } if (!vbi3_iconv_ucs2 (cd, &p, (unsigned int)(buffer_end - p), text.text.buffer, (unsigned int)(text.text.bp - text.text.buffer))) goto failure; vbi3_iconv_ucs2_close (cd); return p - buffer; failure: vbi3_free (text.text.buffer); vbi3_iconv_ucs2_close (cd); return 0; } /** * @param pg Source page. * @param buffer Output buffer. * @param buffer_size Size of the buffer in bytes. * @param format Character set name for iconv() conversion, * for example "ISO-8859-1". When @c NULL, the default is "UTF-8". * @param separator This string is copied verbatim into the buffer * to separate rows. When @c NULL a default is provided, * converted to the requested @a format. In table mode the * default separator is character 0x0A, otherwise a space 0x20. * @param separator_size Length of the separator string in bytes. * This permits separators containing zero bytes. * @param export_options Array of export options, these are * vbi3_export_option codes followed by a value. The last * option code must be @a 0. * The following export options are presently recognized: * - @c VBI3_TABLE (vbi3_bool): Scan page in table mode, printing * all characters within the source rectangle including runs of * spaces at the start and end of rows. When @c FALSE, scan * all characters from @a column, @a row to @a column + @a width - 1, * @a row + @a height - 1 and all intermediate rows to their * full pg->columns width. In this mode runs of spaces at * the start and end of rows collapse into single spaces, * blank lines are suppressed. * - @c VBI3_RTL (vbi3_bool): When @c TRUE scan the page right to * left (Hebrew, Arabic), otherwise left to right. * - @c VBI3_REVEAL (vbi3_bool): When @c TRUE reveal hidden * characters otherwise printed as space. * - @c VBI3_FLASH_ON (vbi3_bool): Print flashing characters in on (TRUE) or * off (FALSE) state. * @param column First source column, 0 ... pg->columns - 1. * @param row First source row, 0 ... pg->rows - 1. * @param width Number of columns to print, 1 ... pg->columns. * @param height Number of rows to print, 1 ... pg->rows. * * Prints a subsection of a Teletext or Closed Caption vbi3_page * into a buffer. All character attributes and colors will be lost. * (Conversion to terminal control codes is possible using the text * export module.) Graphics characters and DRCS will be replaced * by spaces. * * @return * Number of bytes written into @a buffer, a value of zero when * some error occurred. In this case @a buffer may contain incomplete * data. Note this function does not append a terminating zero * character. */ unsigned int vbi3_print_page_region (vbi3_page * pg, char * buffer, unsigned int buffer_size, const char * format, const char * separator, unsigned int separator_size, unsigned int column, unsigned int row, unsigned int width, unsigned int height, ...) { unsigned int r; va_list export_options; va_start (export_options, height); r = vbi3_print_page_region_va_list (pg, buffer, buffer_size, format, separator, separator_size, column, row, width, height, export_options); va_end (export_options); return r; } /** * Like vbi3_print_page(), but takes export options as va_list. */ unsigned int vbi3_print_page_va_list (vbi3_page * pg, char * buffer, unsigned int buffer_size, const char * format, va_list export_options) { return vbi3_print_page_region_va_list (pg, buffer, buffer_size, format, /* separator */ NULL, /* separator_size */ 0, /* column */ 0, /* row */ 0, pg->columns, pg->rows, export_options); } /** * @param pg Source page. * @param buffer Output buffer. * @param buffer_size Size of the buffer in bytes. * @param format Character set name for iconv() conversion, * for example "ISO-8859-1". When @c NULL, the default is "UTF-8". * @param export_options Array of export options, these are * vbi3_export_option codes followed by a value. The last * option code must be @a 0. * The following export options are presently recognized: * - @c VBI3_TABLE (vbi3_bool): Scan page in table mode, printing * all characters within the source rectangle including runs of * spaces at the start and end of rows. When @c FALSE, scan * all characters from @a column, @a row to @a column + @a width - 1, * @a row + @a height - 1 and all intermediate rows to their * full pg->columns width. In this mode runs of spaces at * the start and end of rows collapse into single spaces, * blank lines are suppressed. * - @c VBI3_RTL (vbi3_bool): When @c TRUE scan the page right to * left (Hebrew, Arabic), otherwise left to right. * - @c VBI3_REVEAL (vbi3_bool): When @c TRUE reveal hidden * characters otherwise printed as space. * - @c VBI3_FLASH_ON (vbi3_bool): Print flashing characters in on (TRUE) or * off (FALSE) state. * * Prints a Teletext or Closed Caption vbi3_page into a buffer. * All character attributes and colors will be lost. * (Conversion to terminal control codes is possible using the * text export module.) Graphics characters and DRCS will be * replaced by spaces. * * This is a specialization of vbi3_print_page_region(). * * @return * Number of bytes written into @a buffer, a value of zero when * some error occurred. In this case @a buffer may contain incomplete * data. Note this function does not append a terminating zero * character. */ unsigned int vbi3_print_page (vbi3_page * pg, char * buffer, unsigned int buffer_size, const char * format, ...) { unsigned int r; va_list export_options; va_start (export_options, format); r = vbi3_print_page_region_va_list (pg, buffer, buffer_size, format, /* separator */ NULL, /* separator_size */ 0, /* column */ 0, /* row */ 0, pg->columns, pg->rows, export_options); va_end (export_options); return r; } static void xputwc (text_instance * text, unsigned int c) { if (vbi3_is_gfx (c)) { if (text->ascii_art) { c = _vbi3_teletext_ascii_art (c); if (!vbi3_is_print (c)) c = text->gfx_chr; } else { c = text->gfx_chr; } } else if (!vbi3_is_print (c)) { c = 0x0020; } putwc (text, c); } static vbi3_bool export (vbi3_export * e, const vbi3_page * pg) { text_instance *text = PARENT (e, text_instance, export); const vbi3_char *acp; vbi3_char last; unsigned int row; unsigned int column; unsigned int size; create_palette (text, pg); text->text.bp = text->text.buffer; acp = pg->text; SET (last); for (row = 0; row < pg->rows; ++row) { uint16_t *d; for (column = 0; column < pg->columns; ++column) { if (TERMINAL_NONE != text->term) { if (putw_attr (text, last, *acp)) xputwc (text, acp->unicode); last = *acp; } else { xputwc (text, acp->unicode); } ++acp; } if (text->text.bp + 4 >= text->text.end) extend (text, &text->text); d = text->text.bp; if (row + 1 >= pg->rows) { if (TERMINAL_NONE != text->term) { d[0] = 27; /* reset */ d[1] = '['; d[2] = 'm'; d += 3; } } d[0] = '\n'; text->text.bp = d + 1; } size = text->text.bp - text->text.buffer; if (!vbi3_stdio_iconv_ucs2 (text->export.fp, text->charset, text->text.buffer, size)) { _vbi3_export_write_error (&text->export); return FALSE; } return TRUE; } static const vbi3_export_info export_info = { .keyword = "text", .label = N_("Text"), .tooltip = N_("Export this page as text file"), .mime_type = "text/plain", .extension = "txt", }; const _vbi3_export_module _vbi3_export_module_text = { .export_info = &export_info, ._new = text_new, ._delete = text_delete, .option_info = option_info, .option_info_size = N_ELEMENTS (option_info), .option_get = option_get, .option_set = option_set, .export = export }; zapping-0.10cvs6/libvbi/exp-txt.h 644 764 144 4670 10410046604 12040 /* * libzvbi - Text export functions * * Copyright (C) 2001, 2002, 2003, 2004 Michael H. Schimek * * Based on code from AleVT 1.5.1 * Copyright (C) 1998, 1999 Edgar Toernig * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* $Id: exp-txt.h,v 1.4 2006/03/21 19:01:24 mschimek Exp $ */ #ifndef __ZVBI3_EXP_TXT_H__ #define __ZVBI3_EXP_TXT_H__ #include /* va_list */ #include "macros.h" #include "page.h" /* vbi3_page */ VBI3_BEGIN_DECLS /** * @addtogroup Render * @{ */ extern unsigned int vbi3_print_page_region_va_list (vbi3_page * pg, char * buffer, unsigned int buffer_size, const char * __restrict__ format, const char * __restrict__ separator, unsigned int separator_size, unsigned int column, unsigned int row, unsigned int width, unsigned int height, va_list export_options) __attribute__ ((_vbi3_nonnull (1, 2))); extern unsigned int vbi3_print_page_region (vbi3_page * pg, char * buffer, unsigned int buffer_size, const char * __restrict__ format, const char * __restrict__ separator, unsigned int separator_size, unsigned int column, unsigned int row, unsigned int width, unsigned int height, ...) __attribute__ ((_vbi3_nonnull (1, 2), _vbi3_sentinel)); extern unsigned int vbi3_print_page_va_list (vbi3_page * pg, char * buffer, unsigned int buffer_size, const char * format, va_list export_options) __attribute__ ((_vbi3_nonnull (1, 2))); extern unsigned int vbi3_print_page (vbi3_page * pg, char * buffer, unsigned int buffer_size, const char * format, ...) __attribute__ ((_vbi3_nonnull (1, 2), _vbi3_sentinel)); /** @} */ VBI3_END_DECLS #endif /* __ZVBI3_EXP_TXT_H__ */ zapping-0.10cvs6/libvbi/exp-vtx.c 644 764 144 7375 10305456044 12050 /* * libzvbi - VTX export function * * Copyright (C) 2001, 2002, 2003, 2004 Michael H. Schimek * * Based on code from AleVT 1.5.1 * Copyright (C) 1998, 1999 Edgar Toernig * Copyright (C) 1999 Paul Ortyl * * Based on code from VideoteXt 0.6 * Copyright (C) 1995, 1996, 1997 Martin Buck * * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* $Id: exp-vtx.c,v 1.15 2005/09/01 01:40:52 mschimek Exp $ */ /* VTX is the file format used by the VideoteXt application. It stores Teletext pages in raw level 1.0 format. Level 1.5 additional characters (e.g. accents), the FLOF and TOP navigation bars and the level 2.5 chrome will be lost. Since restoring the raw page from a fmt_page is complicated if not impossible, we violate encapsulation by fetching a raw copy from the cache. :-( */ #ifdef HAVE_CONFIG_H # include "config.h" #endif #include #include #include "hamm.h" /* vbi3_rev8() */ #include "cache-priv.h" /* cache_page */ #include "page-priv.h" /* vbi3_page_priv */ #ifdef ZAPPING8 # include "common/intl-priv.h" #else # include "intl-priv.h" #endif #include "export-priv.h" struct header { uint8_t signature[5]; uint8_t pagenum_l; uint8_t pagenum_h; uint8_t hour; uint8_t minute; uint8_t charset; uint8_t wst_flags; uint8_t vtx_flags; }; /* * VTX - VideoteXt File (VTXV4) */ static vbi3_bool export (vbi3_export * e, const vbi3_page * pg) { const vbi3_page_priv *pgp; const cache_page *cp; struct header h; if (pg->pgno < 0x100 || pg->pgno > 0x8FF) { _vbi3_export_error_printf (e, _("Can only export Teletext pages.")); return FALSE; } pgp = CONST_PARENT (pg, vbi3_page_priv, pg); if (pg->priv != pgp || !pgp->cp) { _vbi3_export_error_printf (e, _("Page is not cached.")); return FALSE; } cp = pgp->cp; if (cp->function != PAGE_FUNCTION_UNKNOWN && cp->function != PAGE_FUNCTION_LOP) { _vbi3_export_error_printf (e, _("Cannot export this page, is not displayable.")); goto error; } memcpy (h.signature, "VTXV4", 5); h.pagenum_l = cp->pgno & 0xFF; h.pagenum_h = (cp->pgno >> 8) & 15; h.hour = 0; h.minute = 0; h.charset = cp->national & 7; h.wst_flags = cp->flags & C4_ERASE_PAGE; h.wst_flags |= vbi3_rev8 (cp->flags >> 12); h.vtx_flags = (0 << 7) | (0 << 6) | (0 << 5) | (0 << 4) | (0 << 3); /* notfound, pblf (?), hamming error, virtual, seven bits */ if (fwrite (&h, sizeof (h), 1, e->fp) != 1) goto write_error; if (fwrite (cp->data.lop.raw, 40 * 24, 1, e->fp) != 1) goto write_error; return TRUE; write_error: _vbi3_export_write_error (e); error: return FALSE; } static const vbi3_export_info export_info = { .keyword = "vtx", .label = N_("VTX"), .tooltip = N_("Export this page as VTX file, the " "format used by VideoteXt and vbidecode"), /* From VideoteXt examples/mime.types */ .mime_type = "application/videotext", .extension = "vtx", }; const _vbi3_export_module _vbi3_export_module_vtx = { .export_info = &export_info, /* no private data, no options */ .export = export }; zapping-0.10cvs6/libvbi/vbi_decoder.c 644 764 144 53145 10326457374 12730 /* * libzvbi - VBI decoding library * * Copyright (C) 2000, 2001, 2002 Michael H. Schimek * Copyright (C) 2000, 2001 Iaki Garca Etxebarria * * Based on AleVT 1.5.1 * Copyright (C) 1998, 1999 Edgar Toernig * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* $Id: vbi_decoder.c,v 1.21 2005/10/22 15:47:08 mschimek Exp $ */ #include #include /* malloc() */ #include "vbi_decoder-priv.h" #include "misc.h" #include "vps.h" #ifndef ZAPPING8 # include "wss.h" #endif /** * @param vbi VBI decoder allocated with vbi3_decoder_new(). * @param nk Identifies the network transmitting the page. * @param pgno Teletext page number or Closed Caption channel. * @param subno Teletext subpage number, can be @c VBI3_ANY_SUBNO * (most recently received subpage, if any). * @param format_options Array of pairs of a vbi3_format_option and value, * terminated by a @c 0 option. See vbi3_decoder_get_page(). * * Allocates a new vbi3_page, formatted from a cached Teletext page. * * @returns * vbi3_page which must be freed with vbi3_page_delete() when done. * @c NULL on error. */ vbi3_page * vbi3_decoder_get_page_va_list (vbi3_decoder * vbi, const vbi3_network * nk, vbi3_pgno pgno, vbi3_subno subno, va_list format_options) { if (pgno < 0x100) return vbi3_caption_decoder_get_page_va_list (&vbi->cc, pgno, format_options); else return vbi3_teletext_decoder_get_page_va_list (&vbi->vt, nk, pgno, subno, format_options); } /** * @param vbi VBI decoder allocated with vbi3_decoder_new(). * @param nk Identifies the network transmitting the page. * @param pgno Teletext page number or Closed Caption channel. * @param subno Teletext subpage number, can be @c VBI3_ANY_SUBNO * (most recently received subpage, if any). * @param ... Array of pairs of a vbi3_format_option and value, * terminated by a @c 0 option. * * Allocates a new vbi3_page, formatted from a cached Teletext * or Closed Caption page. * * Example: * * @code * vbi3_page *pg; * * pg = vbi3_decoder_get_page (vbi, NULL, 0x100, VBI3_ANY_SUBNO, * VBI3_NAVIGATION, TRUE, * VBI3_WST_LEVEL, VBI3_LEVEL_2p5, * 0); * @endcode * * @returns * vbi3_page which must be freed with vbi3_page_delete() when done. * @c NULL on error. */ vbi3_page * vbi3_decoder_get_page (vbi3_decoder * vbi, const vbi3_network * nk, vbi3_pgno pgno, vbi3_subno subno, ...) { vbi3_page *pg; va_list format_options; va_start (format_options, subno); if (pgno < 0x100) pg = vbi3_caption_decoder_get_page_va_list (&vbi->cc, pgno, format_options); else pg = vbi3_teletext_decoder_get_page_va_list (&vbi->vt, nk, pgno, subno, format_options); va_end (format_options); return pg; } #ifndef ZAPPING8 /** * @param vbi VBI decoder allocated with vbi3_decoder_new(). * @param pid Program ID will be stored here. * @param channel Logical channel transmitting the ID. * * Returns the most recently on a logical channel received program ID. * * Sources can be VBI3_SLICED_TELETEXT_B and VBI3_SLICED_VPS (EN 300 231 PDC), * and VBI3_SLICED_CAPTION_525 (EIA 608 XDS) data. */ void vbi3_decoder_get_program_id (vbi3_decoder * vbi, vbi3_program_id * pid, vbi3_pid_channel channel) { cache_network *cn; assert (NULL != vbi); assert (NULL != pid); cn = vbi->vt.network; assert ((unsigned int) channel < N_ELEMENTS (cn->program_id)); *pid = cn->program_id[channel]; } /** * @param vbi VBI decoder allocated with vbi3_decoder_new(). * @param ar Aspect ratio information will be stored here. * * Returns the most recently received aspect ratio information. * * Sources can be VBI3_SLICED_WSS_625 (EN 300 294), VBI3_SLICED_WSS_CPR1204 * (EIA-J CPR-1204) and VBI3_SLICED_CAPTION_525 (EIA 608 XDS) data. */ void vbi3_decoder_get_aspect_ratio (vbi3_decoder * vbi, vbi3_aspect_ratio * ar) { assert (NULL != vbi); assert (NULL != ar); *ar = vbi->vt.network->aspect_ratio; } #endif /* !ZAPPING8 */ vbi3_teletext_decoder * vbi3_decoder_cast_to_teletext_decoder (vbi3_decoder * vbi) { assert (NULL != vbi); return &vbi->vt; } vbi3_caption_decoder * vbi3_decoder_cast_to_caption_decoder (vbi3_decoder * vbi) { assert (NULL != vbi); return &vbi->cc; } /** * @internal * @param vbi VBI decoder allocated with vbi3_decoder_new(). * @param cn New network, can be @c NULL if 0.0 != time. * @param time Deferred reset when time is greater than * vbi3_decoder_feed() timestamp. Pass a negative number to * cancel a deferred reset, 0.0 to reset immediately. * * Internal reset function. */ static void internal_reset (vbi3_decoder * vbi, cache_network * cn, double time) { vbi3_event e; if (time <= 0.0 /* reset now or cancel deferred reset */ || time > vbi->reset_time) vbi->reset_time = time; vbi->teletext_reset (&vbi->vt, cn, time); vbi->caption_reset (&vbi->cc, cn, time); if (0.0 == time /* reset now */) { e.type = VBI3_EVENT_RESET; e.network = &vbi->vt.network->network; e.timestamp = vbi->timestamp; _vbi3_event_handler_list_send (&vbi->handlers, &e); } } static void cni_change (vbi3_decoder * vbi, vbi3_cni_type type, unsigned int cni) { cache_network *cn; double timeout; cn = vbi->vt.network; /* Timeout is variable because VPS and 8/30 repeat at different rates. */ timeout = 0.0; if (VBI3_CNI_TYPE_VPS != type && 0 != cn->network.cni_vps && (cn->network.cni_vps != vbi3_convert_cni (VBI3_CNI_TYPE_VPS, type, cni))) { /* We cannot say with certainty if cni and cni_vps belong to the same network. If 0 == vbi3_convert_cni() we cannot convert, otherwise CNIs mismatch because the channel changed, the network transmits wrong CNIs or the conversion is incorrect. After n seconds, if we cannot confirm the cni_vps or receive a new one, we assume there was a channel change and the new network does not transmit a cni_vps. */ cn->confirm_cni_vps = cn->network.cni_vps; timeout = vbi->vt.cni_vps_timeout; } if (VBI3_CNI_TYPE_8301 != type && 0 != cn->network.cni_8301 && (cn->network.cni_8301 != vbi3_convert_cni (VBI3_CNI_TYPE_8301, type, cni))) { cn->confirm_cni_8301 = cn->network.cni_8301; timeout = vbi->vt.cni_830_timeout; } if (VBI3_CNI_TYPE_8302 != type && 0 != cn->network.cni_8302 && (cn->network.cni_8302 != vbi3_convert_cni (VBI3_CNI_TYPE_8302, type, cni))) { cn->confirm_cni_8302 = cn->network.cni_8302; timeout = vbi->vt.cni_830_timeout; } if (timeout > 0.0) { /* Arrange for a reset in timeout seconds and discard all data received in the meantime. */ internal_reset (vbi, cn, vbi->timestamp + timeout); } } static vbi3_bool decode_vps (vbi3_decoder * vbi, const uint8_t buffer[13]) { unsigned int cni; cache_network *cn; if (!vbi3_decode_vps_cni (&cni, buffer)) return FALSE; cn = vbi->vt.network; if (0 == cni) { /* Should probably ignore this. */ } else if (cni == cn->network.cni_vps) { /* No CNI change, no channel change. */ cn->confirm_cni_vps = 0; if (0 == cn->confirm_cni_8301 && 0 == cn->confirm_cni_8302) { /* All CNIs valid, cancel reset requests. */ internal_reset (vbi, cn, -1); } } else if (cni == cn->confirm_cni_vps) { vbi3_event e; /* The CNI is correct. */ if (0 == cn->network.cni_vps) { /* First time CNI, assume no channel change. */ vbi3_network_set_cni (&cn->network, VBI3_CNI_TYPE_VPS, cni); cn->confirm_cni_vps = 0; if (0 == cn->confirm_cni_8301 && 0 == cn->confirm_cni_8302) { /* All CNIs valid, cancel reset requests. */ internal_reset (vbi, cn, -1); } } else { vbi3_network nk; cache_network *cn; /* Different CNI, channel change detected. */ vbi3_network_init (&nk); vbi3_network_set_cni (&nk, VBI3_CNI_TYPE_VPS, cni); cn = _vbi3_cache_add_network (vbi->vt.cache, &nk, vbi->vt.videostd_set); internal_reset (vbi, cn, 0.0 /* now */); cache_network_unref (cn); vbi3_network_destroy (&nk); } /* internal_reset() may have changed this. */ cn = vbi->vt.network; e.type = VBI3_EVENT_NETWORK; e.network = &cn->network; e.timestamp = vbi->timestamp; _vbi3_event_handler_list_send (&vbi->handlers, &e); } else { /* VPS is poorly error protected but repeats once per frame. We accept this CNI after receiving it twice in a row. */ cn->confirm_cni_vps = cni; if (0 == cn->network.cni_vps) { /* First time CNI, channel change possible. */ cni_change (vbi, VBI3_CNI_TYPE_VPS, cni); } else { /* Assume a channel change with unknown CNI if we cannot confirm the new CNI or receive the old CNI again within timeout seconds. */ internal_reset (vbi, cn, vbi->timestamp + vbi->vt.cni_vps_timeout); } /* Discard PDC data until we identified the network. */ return TRUE; } #ifndef ZAPPING8 if ((vbi->handlers.event_mask & VBI3_EVENT_PROG_ID) && vbi->reset_time <= 0.0 /* not suspended */) { vbi3_program_id pid; vbi3_program_id *p; cache_network *cn; if (!vbi3_decode_vps_pdc (&pid, buffer)) return FALSE; cn = vbi->vt.network; p = &cn->program_id[VBI3_PID_CHANNEL_VPS]; if (p->cni != pid.cni || p->pil != pid.pil || p->pcs_audio != pid.pcs_audio || p->pty != pid.pty) { vbi3_event e; /* Program ID changed. */ *p = pid; e.type = VBI3_EVENT_PROG_ID; e.network = &cn->network; e.timestamp = vbi->timestamp; e.ev.prog_id = p; _vbi3_event_handler_list_send (&vbi->handlers, &e); } } #endif /* !ZAPPING8 */ return TRUE; } #ifndef ZAPPING8 static void aspect_event (vbi3_decoder * vbi, const vbi3_aspect_ratio *ar) { cache_network *cn; vbi3_event e; cn = vbi->vt.network; if (0 == memcmp (&cn->aspect_ratio, ar, sizeof (cn->aspect_ratio))) { /* No change. */ return; } /* WSS is poorly error protected but repeats once per frame. We accept this aspect ratio after receiving it twice. */ if (0 != memcmp (&vbi->confirm_aspect_ratio, ar, sizeof (vbi->confirm_aspect_ratio))) { vbi->confirm_aspect_ratio = *ar; return; } cn->aspect_ratio = *ar; e.type = VBI3_EVENT_ASPECT; e.network = &cn->network; e.timestamp = vbi->timestamp; e.ev.aspect = &cn->aspect_ratio; _vbi3_event_handler_list_send (&vbi->handlers, &e); } #endif /* !ZAPPING8 */ /** */ void vbi3_decoder_feed (vbi3_decoder * vbi, vbi3_sliced * sliced, unsigned int n_lines, double timestamp) { vbi3_bool all_success; double dt; dt = timestamp - vbi->timestamp; if (vbi->timestamp > 0.0 && (dt < 0.025 || dt > 0.050)) { if (0) fprintf (stderr, "vbi frame/s dropped at %f, dt=%f\n", timestamp, dt); if (0 != vbi->vt.handlers.event_mask || (VBI3_EVENT_NETWORK & vbi->handlers.event_mask)) { _vbi3_teletext_decoder_resync (&vbi->vt); } if (0 != vbi->cc.handlers.event_mask || (VBI3_EVENT_NETWORK & vbi->handlers.event_mask)) { _vbi3_caption_decoder_resync (&vbi->cc); } /* Set to all failed. */ vbi->error_history_vps = 0; vbi->error_history_wss_625 = 0; vbi->error_history_wss_cpr1204 = 0; vbi->timestamp = timestamp; /* Assuming a channel change, arrange for a reset in 1.5 seconds if we don't receive the old or a new network ID, and discard all data received in the meantime. */ internal_reset (vbi, /* cn */ NULL, vbi->timestamp + 1.5); } else { // FIXME deferred reset here } if (timestamp > vbi->timestamp) { vbi->timestamp = timestamp; if (vbi->handlers.event_mask & VBI3_EVENT_TIMER) { vbi3_event e; e.type = VBI3_EVENT_TIMER; e.network = &vbi->vt.network->network; e.timestamp = timestamp; _vbi3_event_handler_list_send (&vbi->handlers, &e); } } all_success = TRUE; while (n_lines > 0) { if (sliced->id & VBI3_SLICED_TELETEXT_B_625) { vbi->timestamp_teletext = vbi->timestamp; all_success &= vbi3_teletext_decoder_feed (&vbi->vt, sliced->data, vbi->timestamp); } else if (sliced->id & VBI3_SLICED_CAPTION_525) { vbi->timestamp_caption = vbi->timestamp; all_success &= vbi3_caption_decoder_feed (&vbi->cc, sliced->data, sliced->line, vbi->timestamp); } else if ((sliced->id & VBI3_SLICED_VPS) && (0 == sliced->line || 16 == sliced->line)) { vbi->timestamp_vps = vbi->timestamp; all_success &= decode_vps (vbi, sliced->data); #ifndef ZAPPING8 } else if ((sliced->id & VBI3_SLICED_WSS_625) && (0 == sliced->line || 23 == sliced->line)) { vbi3_aspect_ratio aspect; vbi3_bool success; vbi->timestamp_wss_625 = vbi->timestamp; /* Make sure memcmp() won't see random bits in gaps in the structure. */ CLEAR (aspect); success = vbi3_decode_wss_625 (&aspect, sliced->data); vbi->error_history_wss_625 = vbi->error_history_wss_625 * 2 + success; all_success &= success; if (success) { aspect_event (vbi, &aspect); } } else if (sliced->id & VBI3_SLICED_WSS_CPR1204) { vbi3_aspect_ratio aspect; vbi3_bool success; vbi->timestamp_wss_cpr1204 = vbi->timestamp; CLEAR (aspect); success = vbi3_decode_wss_cpr1204 (&aspect, sliced->data); vbi->error_history_wss_cpr1204 = vbi->error_history_wss_cpr1204 * 2 + success; all_success &= success; if (success) { aspect_event (vbi, &aspect); } #endif /* !ZAPPING8 */ } ++sliced; --n_lines; } #if 0 /* TODO */ if (vbi->handlers.event_mask & VBI3_EVENT_TRIGGER) vbi3_deferred_trigger(vbi); if (0 && (rand() % 511) == 0) vbi3_eacem_trigger (vbi, (unsigned char *) /* Latin-1 */ "[n:Zapping][5450]"); #endif } /** * @param vbi VBI decoder allocated with vbi3_decoder_new(). * @param callback Function to be called on events. * @param user_data User pointer passed through to the @a callback function. * * Removes all event handlers from the list with this @a callback and * @a user_data. You can safely call this function from a handler removing * itself or another handler. */ void vbi3_decoder_remove_event_handler (vbi3_decoder * vbi, vbi3_event_cb * callback, void * user_data) { assert (NULL != vbi); vbi3_teletext_decoder_remove_event_handler (&vbi->vt, callback, user_data); vbi3_caption_decoder_remove_event_handler (&vbi->cc, callback, user_data); _vbi3_event_handler_list_remove_by_callback (&vbi->handlers, callback, user_data); } /** * @param vbi VBI decoder allocated with vbi3_decoder_new(). * @param event_mask Set of events (@c VBI3_EVENT_) the handler is waiting * for, can be -1 for all and 0 for none. * @param callback Function to be called on events by * vbi3_decoder_feed() and other vbi3_decoder methods as noted. * @param user_data User pointer passed through to the @a callback function. * * Adds a new event handler to the VBI decoder. When the @a callback * with @a user_data is already registered the function merely changes the * set of events it will receive in the future. When the @a event_mask is * empty the function does nothing or removes a registered event * handler. You can safely call this function from an event handler. * * Any number of handlers can be added, also different handlers for the * same event which will be called in registration order. * * @returns * @c FALSE on failure (out of memory), removing the handler. */ vbi3_bool vbi3_decoder_add_event_handler (vbi3_decoder * vbi, vbi3_event_mask event_mask, vbi3_event_cb * callback, void * user_data) { vbi3_event_mask child_events; assert (NULL != vbi); child_events = event_mask & ~(VBI3_EVENT_CLOSE | VBI3_EVENT_RESET | VBI3_EVENT_TIMER); if (vbi3_teletext_decoder_add_event_handler (&vbi->vt, child_events, callback, user_data)) { if (vbi3_caption_decoder_add_event_handler (&vbi->cc, child_events, callback, user_data)) { event_mask &= (VBI3_EVENT_CLOSE | VBI3_EVENT_RESET | VBI3_EVENT_NETWORK | VBI3_EVENT_PROG_ID | VBI3_EVENT_ASPECT | VBI3_EVENT_TIMER); if (0 == event_mask) { return TRUE; } if (_vbi3_event_handler_list_add (&vbi->handlers, event_mask, callback, user_data)) { return TRUE; } vbi3_caption_decoder_remove_event_handler (&vbi->cc, callback, user_data); } vbi3_teletext_decoder_remove_event_handler (&vbi->vt, callback, user_data); } return FALSE; } /** * @param vbi VBI decoder allocated with vbi3_decoder_new(). * @param nk Identifies the new network, can be @c NULL. * @param videostd_set The new video standard. * * Resets the VBI decoder, useful for example after a channel change. * * This function sends a @c VBI3_EVENT_RESET. */ void vbi3_decoder_reset (vbi3_decoder * vbi, const vbi3_network * nk, vbi3_videostd_set videostd_set) { cache_network *cn; cn = _vbi3_cache_add_network (vbi->vt.cache, nk, videostd_set); vbi->vt.videostd_set = videostd_set; vbi->cc.videostd_set = videostd_set; internal_reset (vbi, cn, 0.0); cache_network_unref (cn); } static void teletext_reset_trampoline (vbi3_teletext_decoder * td, cache_network * cn, double time) { internal_reset (PARENT (td, vbi3_decoder, vt), cn, time); } static void caption_reset_trampoline (vbi3_caption_decoder * cd, cache_network * cn, double time) { internal_reset (PARENT (cd, vbi3_decoder, cc), cn, time); } /** * @param vbi VBI decoder structure to be destroyed. * * Frees all resources associated with @a vbi, except the structure itself. * This function sends a @c VBI3_EVENT_CLOSE. */ void _vbi3_decoder_destroy (vbi3_decoder * vbi) { vbi3_event e; assert (NULL != vbi); e.type = VBI3_EVENT_CLOSE; e.network = &vbi->vt.network->network; e.timestamp = vbi->timestamp; _vbi3_event_handler_list_send (&vbi->handlers, &e); _vbi3_caption_decoder_destroy (&vbi->cc); _vbi3_teletext_decoder_destroy (&vbi->vt); _vbi3_event_handler_list_destroy (&vbi->handlers); CLEAR (*vbi); } /** * @internal * @param vbi VBI decoder structure to be initialized. * @param ca Cache to be used by this decoder, can be @c NULL. * To allocate a cache call vbi3_cache_new(). Caches have a reference * counter, you can vbi3_cache_unref() after calling this function. * @param nk Current network, can be @c NULL. * @param videostd_set The current video standard. * * Initialize a VBI decoder structure. * * @returns * @c FALSE on failure (out of memory). */ vbi3_bool _vbi3_decoder_init (vbi3_decoder * vbi, vbi3_cache * ca, const vbi3_network * nk, vbi3_videostd_set videostd_set) { vbi3_cache *cache; assert (NULL != vbi); CLEAR (*vbi); /* Most recent VBI data timestamp. */ vbi->timestamp = 0.0; /* Ditto for each service, to detect activity. */ vbi->timestamp_teletext = -1000000.0; vbi->timestamp_caption = -1000000.0; vbi->timestamp_vps = -1000000.0; vbi->timestamp_wss_625 = -1000000.0; vbi->timestamp_wss_cpr1204 = -1000000.0; if (ca) { cache = ca; } else { if (!(cache = vbi3_cache_new ())) return FALSE; } _vbi3_event_handler_list_init (&vbi->handlers); _vbi3_teletext_decoder_init (&vbi->vt, cache, nk, videostd_set); _vbi3_caption_decoder_init (&vbi->cc, cache, nk, videostd_set); if (!ca) { /* Drop our reference. */ vbi3_cache_unref (cache); } vbi->reset_time = 0.0; /* no deferred reset */ /* Redirect reset requests to parent vbi3_decoder. */ vbi->teletext_reset = vbi->vt.virtual_reset; vbi->vt.virtual_reset = teletext_reset_trampoline; vbi->caption_reset = vbi->cc.virtual_reset; vbi->cc.virtual_reset = caption_reset_trampoline; return TRUE; } /** * @param vbi VBI decoder allocated with vbi3_decoder_new(), can be @c NULL. * * Frees all resources associated with @a vbi. This function sends a * @c VBI3_EVENT_CLOSE. */ void vbi3_decoder_delete (vbi3_decoder * vbi) { if (NULL == vbi) return; _vbi3_decoder_destroy (vbi); vbi3_free (vbi); } static void teletext_delete_trampoline (vbi3_teletext_decoder *td) { vbi3_decoder_delete (PARENT (td, vbi3_decoder, vt)); } static void caption_delete_trampoline (vbi3_caption_decoder * cd) { vbi3_decoder_delete (PARENT (cd, vbi3_decoder, cc)); } /** * @param ca Cache to be used by this decoder, can be @c NULL. * To allocate a cache call vbi3_cache_new(). Caches have a reference * counter, you can vbi3_cache_unref() after calling this function. * @param nk Current network, can be @c NULL. * @param videostd_set The current video standard. * * Allocates a new VBI (Teletext, Closed Caption, VPS, WSS, etc) decoder. * * @returns * Pointer to newly allocated VBI decoder which must be freed with * vbi3_decoder_delete() when done. @c NULL on failure (out of memory). */ vbi3_decoder * vbi3_decoder_new (vbi3_cache * ca, const vbi3_network * nk, vbi3_videostd_set videostd_set) { vbi3_decoder *vbi; if (!(vbi = vbi3_malloc (sizeof (*vbi)))) { error ("Out of memory (%u bytes)", sizeof (*vbi)); return NULL; } if (!_vbi3_decoder_init (vbi, ca, nk, videostd_set)) { vbi3_free (vbi); vbi = NULL; } /* Make it safe to delete a vbi3_teletext/caption_decoder cast from a vbi3_decoder. */ vbi->vt.virtual_delete = teletext_delete_trampoline; vbi->cc.virtual_delete = caption_delete_trampoline; return vbi; } zapping-0.10cvs6/libvbi/vbi_decoder.h 644 764 144 6612 10305456044 12700 /* * libzvbi - VBI decoding library * * Copyright (C) 2000, 2001, 2002 Michael H. Schimek * Copyright (C) 2000, 2001 Iaki Garca Etxebarria * * Based on AleVT 1.5.1 * Copyright (C) 1998, 1999 Edgar Toernig * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* $Id: vbi_decoder.h,v 1.1 2005/09/01 01:40:52 mschimek Exp $ */ #ifndef __ZVBI3_VBI3_DECODER_H__ #define __ZVBI3_VBI3_DECODER_H__ #include "macros.h" #include "page.h" /* vbi3_page */ #include "sliced.h" #include "caption_decoder.h" #include "teletext_decoder.h" VBI3_BEGIN_DECLS /** * @ingroup Service * @brief VBI decoder. * * The contents of this structure are private. * Call vbi3_decoder_new() to allocate a VBI decoder. */ typedef struct vbi3_decoder vbi3_decoder; extern vbi3_page * vbi3_decoder_get_page_va_list (vbi3_decoder * vbi, const vbi3_network * nk, vbi3_pgno pgno, vbi3_subno subno, va_list format_options) __attribute__ ((malloc, _vbi3_nonnull (1))); extern vbi3_page * vbi3_decoder_get_page (vbi3_decoder * vbi, const vbi3_network * nk, vbi3_pgno pgno, vbi3_subno subno, ...) __attribute__ ((malloc, _vbi3_nonnull (1), _vbi3_sentinel)); extern void vbi3_decoder_get_program_id (vbi3_decoder * vbi, vbi3_program_id * pid, vbi3_pid_channel channel) __attribute__ ((_vbi3_nonnull (1, 2))); #ifndef ZAPPING8 extern void vbi3_decoder_get_aspect_ratio (vbi3_decoder * vbi, vbi3_aspect_ratio * ar) __attribute__ ((_vbi3_nonnull (1, 2))); #endif extern vbi3_teletext_decoder * vbi3_decoder_cast_to_teletext_decoder (vbi3_decoder * vbi) __attribute__ ((_vbi3_nonnull (1), _vbi3_pure)); extern vbi3_caption_decoder * vbi3_decoder_cast_to_caption_decoder (vbi3_decoder * vbi) __attribute__ ((_vbi3_nonnull (1), _vbi3_pure)); extern void vbi3_decoder_feed (vbi3_decoder * vbi, vbi3_sliced * sliced, unsigned int n_lines, double time) __attribute__ ((_vbi3_nonnull (1, 2))); extern void vbi3_decoder_reset (vbi3_decoder * vbi, const vbi3_network * nk, vbi3_videostd_set videostd_set) __attribute__ ((_vbi3_nonnull (1))); extern void vbi3_decoder_remove_event_handler (vbi3_decoder * vbi, vbi3_event_cb * callback, void * user_data) __attribute__ ((_vbi3_nonnull (1))); extern vbi3_bool vbi3_decoder_add_event_handler (vbi3_decoder * vbi, vbi3_event_mask event_mask, vbi3_event_cb * callback, void * user_data) __attribute__ ((_vbi3_nonnull (1))); extern void vbi3_decoder_delete (vbi3_decoder * vbi); extern vbi3_decoder * vbi3_decoder_new (vbi3_cache * ca, const vbi3_network * nk, vbi3_videostd_set videostd_set) __attribute__ ((malloc)); VBI3_END_DECLS #endif /* __ZVBI3_VBI3_DECODER_H__ */ zapping-0.10cvs6/libvbi/event.c 644 764 144 16714 10305455260 11572 /* * libzvbi - Events * * Copyright (C) 2000, 2001, 2002, 2003, 2004 Michael H. Schimek * * Based on code from AleVT 1.5.1 * Copyright (C) 1998,1999 Edgar Toernig (froese@gmx.de) * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* $Id: event.c,v 1.6 2005/09/01 01:34:40 mschimek Exp $ */ #include #include /* malloc() */ #include "misc.h" /* CLEAR() */ #include "event-priv.h" /** * @addtogroup Event Events * @ingroup Service * * Typically the transmission of VBI data like a Teletext or Closed * Caption page spans several VBI lines or even video frames. So internally * the data service decoder maintains caches accumulating data. When a page * or other object is complete it calls the respective event handler to * notify the application. * * Clients can register any number of handlers needed, also different * handlers for the same event. They will be called in the order registered * from the vbi3_decode() function. Since they block decoding, they should * return as soon as possible. The event structure and all data * pointed to from there must be read only. The data is only valid until * the handler returns. */ /** @internal */ const char * _vbi3_event_name (vbi3_event_mask event) { switch (event) { #undef CASE #define CASE(s) case VBI3_EVENT_##s : return #s ; CASE (NONE) CASE (CLOSE) CASE (RESET) CASE (TTX_PAGE) CASE (CC_PAGE) CASE (NETWORK) CASE (TRIGGER) CASE (ASPECT) CASE (PROG_INFO) CASE (PAGE_TYPE) CASE (TOP_CHANGE) CASE (LOCAL_TIME) CASE (PROG_ID) CASE (CC_RAW) } return NULL; } /** * @internal * @param es Event handler list. * @param ev The event to send. * * Traverses the list of event handlers and calls each handler waiting * for this @a ev->type of event, passing @a ev as parameter. */ void __vbi3_event_handler_list_send (_vbi3_event_handler_list *es, const vbi3_event * ev) { vbi3_event_handler *eh; vbi3_event_handler *current; assert (NULL != es); assert (NULL != ev); if (0 == (es->event_mask & ev->type)) return; current = es->current; eh = es->first; while (eh) { if ((eh->event_mask & ev->type) && eh->callback && 0 == eh->blocked) { vbi3_bool done; es->current = eh; eh->blocked = 1; done = eh->callback (ev, eh->user_data); if (es->current == eh) { eh->blocked = 0; eh = eh->next; } else { /* eh removed itself in callback. */ eh = es->current; } if (done) break; } else { eh = eh->next; } } es->current = current; } /** * @internal * @param es Event handler list. * @param event_mask Event mask. * * Removes all handlers from the list which handle * only events given in the @a event_mask. */ void _vbi3_event_handler_list_remove_by_event (_vbi3_event_handler_list *es, vbi3_event_mask event_mask) { vbi3_event_handler *eh, **ehp; vbi3_event_mask clear_mask; assert (NULL != es); clear_mask = ~event_mask; ehp = &es->first; while ((eh = *ehp)) { if (0 == (eh->event_mask &= clear_mask)) { /* Remove handler. */ *ehp = eh->next; if (es->current == eh) es->current = eh->next; vbi3_free (eh); } else { ehp = &eh->next; } } es->event_mask &= clear_mask; } /** * @param es Event handler list. * @param callback Function to be called on events. * @param user_data User pointer passed through to the @a callback function. * * Removes all event handlers from the list with this @a callback and * @a user_data. You can safely call this function from a handler removing * itself or another handler. */ void _vbi3_event_handler_list_remove_by_callback (_vbi3_event_handler_list *es, vbi3_event_cb * callback, void * user_data) { _vbi3_event_handler_list_add (es, 0, callback, user_data); } /** * @param es Event handler list. * @param eh Event handler. * * Removes event handler @a eh if member of the list @a es. You can * safely call this function from a handler removing itself or another * handler. */ void _vbi3_event_handler_list_remove (_vbi3_event_handler_list *es, vbi3_event_handler * eh) { vbi3_event_handler *eh1, **ehp; vbi3_event_mask event_union; assert (NULL != es); assert (NULL != eh); ehp = &es->first; event_union = 0; while ((eh1 = *ehp)) { if (eh == eh1) { /* Remove handler. */ *ehp = eh->next; if (es->current == eh) es->current = eh->next; vbi3_free (eh); } else { event_union |= eh1->event_mask; ehp = &eh1->next; } } es->event_mask = event_union; } /** * @param es Event handler list. * @param event_mask Set of events (@c VBI3_EVENT_) the handler is waiting * for, can be -1 for all and 0 for none. * @param callback Function to be called on events. * @param user_data User pointer passed through to the @a callback function. * * Adds a new event handler to the list. When the @a callback with @a * user_data is already registered the function merely changes the set * of events it will receive in the future. When the @a event_mask is * empty the function does nothing or removes an already registered event * handler. You can safely call this function from an event handler. * * Any number of handlers can be added, also different handlers for the * same event which will be called in registration order. Handlers are * not recursively called when they trigger events. * * @return * Pointer to opaque vbi3_event_handler object, @c NULL on failure or if * no handler has been added. */ vbi3_event_handler * _vbi3_event_handler_list_add (_vbi3_event_handler_list *es, vbi3_event_mask event_mask, vbi3_event_cb * callback, void * user_data) { vbi3_event_handler *eh, **ehp, *found; vbi3_event_mask event_union; assert (NULL != es); ehp = &es->first; event_union = 0; found = NULL; while ((eh = *ehp)) { if (eh->callback == callback && eh->user_data == user_data) { found = eh; if (0 == event_mask) { /* Remove handler. */ *ehp = eh->next; if (es->current == eh) es->current = eh->next; vbi3_free (eh); continue; } else { eh->event_mask = event_mask; } } event_union |= eh->event_mask; ehp = &eh->next; } if (NULL == found && event_mask) { /* Add handler. */ if ((found = vbi3_malloc (sizeof (*found)))) { CLEAR (*found); found->next = NULL; found->event_mask = event_mask; found->callback = callback; found->user_data = user_data; /* Whoops. Remalloc'ed ourselves? */ found->blocked = (es->current == found); event_union |= event_mask; *ehp = found; } } es->event_mask = event_union; return found; } void _vbi3_event_handler_list_destroy (_vbi3_event_handler_list *es) { assert (NULL != es); _vbi3_event_handler_list_remove_by_event (es, (vbi3_event_mask) -1); CLEAR (*es); } vbi3_bool _vbi3_event_handler_list_init (_vbi3_event_handler_list *es) { assert (NULL != es); CLEAR (*es); return TRUE; } zapping-0.10cvs6/libvbi/event.h 644 764 144 15272 10305455233 11575 /* * libzvbi - Events * * Copyright (C) 2000-2004 Michael H. Schimek * * Based on code from AleVT 1.5.1 * Copyright (C) 1998,1999 Edgar Toernig (froese@gmx.de) * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* $Id: event.h,v 1.5 2005/09/01 01:34:19 mschimek Exp $ */ #ifndef EVENT_H #define EVENT_H /* TO DO */ #include /* time_t */ #include "bcd.h" /* vbi3_pgno, vbi3_subno */ #include "network.h" /* vbi3_network */ #include "link.h" /* vbi3_link */ #ifndef ZAPPING8 # include "aspect_ratio.h" /* vbi3_aspect_ratio */ # include "program_info.h" /* vbi3_program_info */ #endif #include "page.h" /* vbi3_char */ #include "pdc.h" /* vbi3_program_id */ VBI3_BEGIN_DECLS /** * @ingroup Event * @name Event types. * @{ */ typedef unsigned int vbi3_event_mask; /** * @anchor VBI3_EVENT_ * No event. */ #define VBI3_EVENT_NONE 0x0000 /** * The decoding context is about to be closed. delete() functions * send this event to clean up event handlers. */ #define VBI3_EVENT_CLOSE 0x0001 /** * The decoding context has been reset. reset() functions send * this event. Note a @c VBI3_EVENT_NETWORK may follow. */ #define VBI3_EVENT_RESET 0x0002 /** * The decoder received and cached another Teletext page * designated by ev.ttx_page.pgno and ev.ttx_page.subno. */ #define VBI3_EVENT_TTX_PAGE 0x0004 /** * A Closed Caption page has changed and needs visual update. * The "page", actually CC channel, is designated by ev.caption.pgno, * see vbi3_pgno for details. */ #define VBI3_EVENT_CC_PAGE 0x0008 /** * XXX which other events may follow? TOP_CHANGE, ...? */ #define VBI3_EVENT_NETWORK 0x0010 /** * @anchor VBI3_EVENT_TRIGGER * * Triggers are sent by broadcasters to start some action on the * user interface of modern TVs. Until libzvbi implements all ;-) of * WebTV and SuperTeletext the information available are program * related (or unrelated) URLs, short messages and Teletext * page links. * * This event is sent when a trigger has fired, ev.trigger * points to a vbi3_link structure describing the link in detail. * The structure must be read only. */ #define VBI3_EVENT_TRIGGER 0x0020 /** * @anchor VBI3_EVENT_ASPECT * * The vbi decoder received new information (potentially from * PAL WSS, NTSC XDS or EIA-J CPR-1204) about the program * aspect ratio. ev.ratio is a pointer to a vbi3_ratio structure. * The structure must be read only. */ #define VBI3_EVENT_ASPECT 0x0040 /** * We have new information about the current or next program. * ev.prog_info is a vbi3_program_info pointer (due to size), read only. * * Preliminary. * * XXX Info from Teletext not implemented yet. * XXX Change to get_prog_info. network ditto? */ #define VBI3_EVENT_PROG_INFO 0x0080 /** * New information about Closed Caption or Teletext pages is available, * for example a subtitle page is in transmission now. */ #define VBI3_EVENT_PAGE_TYPE 0x0100 /** * New information for TOP navigation is available, i.e. the * table of page titles changed. Typically clients receive this * event once or maybe a few times after a channel change, when * the decoder first receives uncached TOP data. */ #define VBI3_EVENT_TOP_CHANGE 0x0200 /** * A new network local time (Teletext packet 8/30 format 1) * has been transmitted. ev.local_time.time contains UTC, * ev.local_time.gmtoff the local time offset in seconds east * of UTC. To get the local time of the network broadcasting * this add gmtoff to time. */ #define VBI3_EVENT_LOCAL_TIME 0x0400 /** * A new program ID (VPS, PDC or XDS impulse capture ID) has * been transmitted. ev.prog_id points to a vbi3_program_id * structure with details. */ #define VBI3_EVENT_PROG_ID 0x0800 /** * A network is about to be removed from the cache. * Note vbi3_event.timestamp will not be set. */ #define VBI3_EVENT_REMOVE_NETWORK 0x1000 /* TODO */ #define VBI3_EVENT_CC_RAW 0x400000 /* TODO */ #define VBI3_EVENT_TIMER 0x800000 /** @} */ /** * @brief Teletext page flags. */ /* Note the bit positions are defined by the Teletext standard, don't change. */ typedef enum { /** * The page header is suitable for a rolling display * and clock updates. */ VBI3_ROLL_HEADER = 0x000001, /** * Newsflash page. */ VBI3_NEWSFLASH = 0x004000, /** * Subtitle page. */ VBI3_SUBTITLE = 0x008000, /** * The page has changed since the last transmission. This * flag is under editorial control, not set by the * vbi3_teletext_decoder. See EN 300 706, Section A.2 for details. */ VBI3_UPDATE = 0x020000, /** * When this flag is set, pages are in serial transmission. When * cleared, pages are in series only within their magazine (pgno & * 0x0FF). In the latter case a rolling header should display only * pages from the same magazine. */ VBI3_SERIAL = 0x100000, } vbi3_ttx_page_flags; typedef enum { VBI3_CHAR_UPDATE = (1 << 0), VBI3_WORD_UPDATE = (1 << 1), /* XXX not implemented yet */ VBI3_ROW_UPDATE = (1 << 2), VBI3_PAGE_UPDATE = (1 << 3), /* XXX not implemented yet */ VBI3_START_ROLLING = (1 << 4), } vbi3_cc_page_flags; /** * @ingroup Event * @brief Event union. */ typedef struct vbi3_event { /** Event type, one of the VBI3_EVENT_ symbols. */ unsigned int type; /** The network this event refers to. */ const vbi3_network * network; /** Capture time passed to the decoder when the event occured. */ double timestamp; union { struct { vbi3_pgno pgno; vbi3_subno subno; vbi3_ttx_page_flags flags; } ttx_page; struct { vbi3_pgno channel; vbi3_cc_page_flags flags; } caption; struct { vbi3_pgno channel; unsigned int row; const vbi3_char * text; unsigned int length; } cc_raw; const vbi3_link * trigger; #ifndef ZAPPING8 const vbi3_aspect_ratio *aspect; const vbi3_program_info *prog_info; #endif struct { } page_type; struct { } top_change; struct { time_t time; int gmtoff; } local_time; const vbi3_program_id * prog_id; struct { } remove_network; } ev; } vbi3_event; typedef vbi3_bool vbi3_event_cb (const vbi3_event * event, void * user_data); VBI3_END_DECLS #endif /* EVENT_H */ zapping-0.10cvs6/libvbi/page-priv.h 644 764 144 5146 10167772035 12335 /* * libzvbi - vbi3_page private stuff * * Copyright (C) 2000, 2001, 2002, 2003, 2004 Michael H. Schimek * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* $Id: page-priv.h,v 1.2 2005/01/08 14:54:21 mschimek Exp $ */ #ifndef PAGE_PRIV_H #define PAGE_PRIV_H #include "page.h" /* vbi3_page, vbi3_opacity */ #include "vt.h" /* magazine, extension, pagenum */ #include "pdc.h" /* vbi3_preselection */ #include "lang.h" /* vbi3_character_set */ #include "cache-priv.h" /* cache_network, cache_page, vbi3_wst_level */ struct _vbi3_page_priv { vbi3_page pg; /* Source network, implicitely reference counted. */ cache_network * cn; /* Only used in _vbi3_page_priv_from_cache_page_va_list(). */ const magazine * mag; const extension * ext; /* Source page, reference counted. */ cache_page * cp; /* _vbi3_page_priv_from_cache_page_va_list() parameter. */ vbi3_wst_level max_level; /* PDC preselection data, if requested and available. */ vbi3_preselection * pdc_table; unsigned int pdc_table_size; /* Referenced DRCS download pages. */ cache_page * drcs_cp[32]; /** Default primary and secondary character set. */ const vbi3_character_set *char_set[2]; /** 0 header, 1 other rows. */ vbi3_opacity page_opacity[2]; vbi3_opacity boxed_opacity[2]; /** TOP navigation. */ vbi3_link link[6]; /** * Points from each character in TOP/FLOF row 25 (max 64 columns) * to a link[] element. -1 if no link. */ int8_t link_ref[64]; }; /* in teletext.c */ extern vbi3_bool _vbi3_page_priv_from_cache_page_va_list (vbi3_page_priv * pgp, cache_page * cp, va_list format_options); extern vbi3_bool _vbi3_page_priv_from_cache_page (vbi3_page_priv * pgp, cache_page * cp, ...); extern void _vbi3_page_priv_dump (const vbi3_page_priv * pgp, FILE * fp, unsigned int mode); extern void _vbi3_page_priv_destroy (vbi3_page_priv * pgp); extern void _vbi3_page_priv_init (vbi3_page_priv * pgp); #endif /* PAGE_PRIV_H */ zapping-0.10cvs6/libvbi/conv.c 644 764 144 33000 10305456044 11402 /* * libzvbi - Unicode conversion helper functions * * Copyright (C) 2003, 2004 Michael H. Schimek * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* $Id: conv.c,v 1.7 2005/09/01 01:40:52 mschimek Exp $ */ #ifdef HAVE_CONFIG_H # include "config.h" #endif #include #include #include #include #include #ifdef ZAPPING8 # include "common/intl-priv.h" #else # include "intl-priv.h" #endif #include "misc.h" /* N_ELEMENTS() */ #include "conv.h" const char vbi3_intl_domainname [] = PACKAGE; /** * @param cd Conversion object returned by vbi3_iconv_ucs2_open(). * * Frees all resources associated with the coversion object. */ void vbi3_iconv_ucs2_close (iconv_t cd) { if ((iconv_t) -1 != cd) iconv_close (cd); } static iconv_t xiconv_open (const char * dst_format, const char * src_format, char ** dst, unsigned int dst_size) { iconv_t cd; size_t n; if (NULL == dst_format) dst_format = "UTF-8"; if (NULL == src_format) src_format = "UCS-2"; cd = iconv_open (dst_format, src_format); if ((iconv_t) -1 == cd) return cd; /* Write out the byte sequence to get into the initial state if this is necessary. */ n = iconv (cd, NULL, NULL, dst, &dst_size); if ((size_t) -1 == n) { iconv_close (cd); cd = (iconv_t) -1; } return cd; } /** * @param dst_format Character set name for iconv() conversion, * for example "ISO-8859-1". When @c NULL, the default is UTF-8. * @param dst Pointer to output buffer pointer, will be incremented * by the number of bytes written. * @param dst_size Space available in the output buffer, in bytes. * * Helper function to convert UCS-2 coded text (as in vbi3_page) to * another format. A start byte sequence will be stored in @a dst if * necessary. * * @returns * (iconv_t) -1 when the conversion is not possible. */ iconv_t vbi3_iconv_ucs2_open (const char * dst_format, char ** dst, unsigned long dst_size) { assert (NULL != dst); return xiconv_open (dst_format, NULL, dst, dst_size); } /* Like iconv, but converts unrepresentable characters to space 0x0020. Source is assumed to be UTF-8 (csize 1) or UCS-2 (csize 2) with native endianess. */ static size_t xiconv (iconv_t cd, const char ** s, size_t * sleft, char ** d, size_t * dleft, unsigned int csize) { size_t r; for (;;) { const uint16_t ucs2_space[1] = { 0x0020 }; const uint8_t utf8_space[1] = { 0x20 }; const char *s1; size_t sleft1; /* iconv() source pointer may be defined as char **, should be const char ** or const void **. Ignore compiler warnings. */ r = iconv (cd, s, sleft, d, dleft); if ((size_t) -1 != r) break; if (EILSEQ != errno) break; /* Replace unrepresentable character by space. */ if (1 == csize) s1 = (const char *) utf8_space; else s1 = (const char *) ucs2_space; sleft1 = csize; r = iconv (cd, &s1, &sleft1, d, dleft); if ((size_t) -1 == r) break; if (1 == csize) { do { ++*s; --*sleft; } while (**s & 0x80); } else { *s += 2; *sleft -= 2; } } return r; } /** * @param cd Conversion object returned by vbi3_iconv_ucs2_open(). * @param dst Pointer to output buffer pointer, will be incremented * by the number of bytes written. * @param dst_size Space available in the output buffer, in bytes. * @param src Source string in UCS-2 format. * @param src_size Number of characters (not bytes) in the * source string. * * Converts UCS-2 coded text (as in vbi3_page) to another format * and stores it in the output buffer. Characters not representable * in the target format are converted to spaces 0x0020. * * @returns * FALSE on failure, including @a dst_size too small. Output buffer * contents are undefined on failure. */ vbi3_bool vbi3_iconv_ucs2 (iconv_t cd, char ** dst, unsigned long dst_size, const uint16_t * src, unsigned long src_size) { const char *s; size_t sleft; size_t dleft; size_t r; assert (NULL != dst); if (NULL == src) { static const uint16_t dummy[1] = { 0 }; src = dummy; } s = (const char *) src; sleft = src_size * 2; dleft = dst_size; r = xiconv (cd, &s, &sleft, dst, &dleft, 2); if ((size_t) -1 == r) return FALSE; if (sleft > 0) return FALSE; return TRUE; } /** * @param cd Conversion object returned by vbi3_iconv_ucs2_open(). * @param dst Pointer to output buffer pointer, will be incremented * by the number of bytes written. * @param dst_size Space available in the output buffer, in bytes. * @param unicode Single 16 bit Unicode character. * * Converts UCS-2 character (as in vbi3_page) to another format * and stores it in the output buffer. Characters not representable * in the target format are converted to spaces 0x0020. * * @returns * FALSE on failure, including @a dst_size too small. Output buffer * contents are undefined on failure. */ vbi3_bool vbi3_iconv_unicode (iconv_t cd, char ** dst, unsigned long dst_size, unsigned int unicode) { uint16_t t[1]; assert (NULL != dst); t[0] = unicode; return vbi3_iconv_ucs2 (cd, dst, dst_size, t, 1); } /** * @param src String to be duplicated. * * Creates a duplicate of a NUL-terminated string encoded in the * character set used by gettext or the current locale. * * @returns * NUL terminated string. You must free() the string when no longer * needed. The function returns NULL when @a src is NULL or memory * is exhausted. */ char * _vbi3_strdup_locale (const char * src) { /* FIXME this is supposed to take multi-byte characters into account. */ return strdup (src); } static char * strdup_iconv (const char * dst_format, const char * src_format, const char * src, unsigned long src_size, unsigned int csize) { char *buf; char *buf2; unsigned long buf_size; iconv_t cd; const char *s; char *d; size_t sleft; size_t dleft; if (!src) return NULL; buf_size = src_size * 8; if (!(buf = vbi3_malloc (buf_size))) return NULL; s = (const char *) src; d = buf; cd = xiconv_open (dst_format, src_format, &d, buf_size); if ((iconv_t) -1 == cd) goto failure; sleft = src_size; dleft = buf_size - (d - buf); while (sleft > 0) { size_t r; r = xiconv (cd, &s, &sleft, &d, &dleft, csize); if ((size_t) -1 != r) break; if (E2BIG != errno) goto failure; if (!(buf2 = vbi3_realloc (buf, buf_size * 2))) goto failure; d = buf2 + (d - buf); dleft += buf_size * 2 - buf_size; buf = buf2; buf_size *= 2; } if (!(buf2 = vbi3_realloc (buf, buf_size - dleft + 4))) goto failure; memset (buf2 + (d - buf), 0, 4); iconv_close (cd); return buf2; failure: if ((iconv_t) -1 != cd) iconv_close (cd); vbi3_free (buf); return NULL; } /** * @param dst_format Character set name for iconv() conversion, * for example "ISO-8859-1". When @c NULL, the default is UTF-8. * @param src Input buffer. * @param src_size Number of characters (not bytes) in the * input buffer. * * Converts UCS-2 coded text (as in vbi3_page) to another format, * and stores it in a newly allocated buffer. Characters not representable * in the @a dst_format are converted to spaces 0x0020. * * @returns * NUL terminated string. You must free() the string when no longer * needed. The function returns an empty string when @a src_size is 0, * a @c NULL pointer on failure. */ char * vbi3_strdup_iconv_ucs2 (const char * dst_format, const uint16_t * src, unsigned long src_size) { return strdup_iconv (dst_format, NULL, (const char *) src, src_size * 2, 2); } /** * @internal * @param src Input buffer. * @param src_size Number of characters (not bytes) in the * input buffer. * * Converts UCS-2 coded text (as in vbi3_page) to the character set * used by gettext or the current locale and stores it in a newly * allocated buffer. Characters not representable * in the target format are converted to spaces 0x0020. * * @returns * NUL terminated string. You must free() the string when no longer * needed. The function returns an empty string when @a src_size is 0, * a @c NULL pointer on failure. */ char * _vbi3_strdup_locale_ucs2 (const uint16_t * src, unsigned long src_size) { const char *dst_format; if (!src) return NULL; dst_format = bind_textdomain_codeset (vbi3_intl_domainname, NULL); if (NULL == dst_format) dst_format = nl_langinfo (CODESET); if (NULL == dst_format) return NULL; return strdup_iconv (dst_format, NULL, (const char *) src, src_size * 2, 2); } /** * @internal * @param src NUL-terminated string in UTF-8 format. * * Converts UTF-8 coded string to the character set used by gettext * or the current locale and stores it in a newly allocated buffer. * Characters not representable in the output format are converted * to spaces 0x0020. * * @returns * NUL terminated string. You must free() the string when no longer * needed. The function returns an empty string when @a src is @c NULL, * a @c NULL pointer on failure. */ char * _vbi3_strdup_locale_utf8 (const char * src) { const char *dst_format; unsigned long src_size; if (!src) return NULL; dst_format = bind_textdomain_codeset (vbi3_intl_domainname, NULL); if (NULL == dst_format) dst_format = nl_langinfo (CODESET); if (NULL == dst_format) return NULL; if (0 == strcmp (dst_format, "UTF-8")) return strdup (src); src_size = strlen (src); return strdup_iconv (dst_format, "UTF-8", src, src_size, 1); } /** */ char * _vbi3_strdup_locale_teletext (const uint8_t * src, unsigned long src_size, const vbi3_character_set *cs) { uint16_t buffer[64]; unsigned long begin; unsigned long end; unsigned long i; if (!src) return NULL; assert (src_size < N_ELEMENTS (buffer)); for (begin = 0; begin < src_size; ++begin) if ((src[begin] & 0x7F) > 0x20) break; if (begin >= src_size) return NULL; for (end = src_size; end > 0; --end) if ((src[end - 1] & 0x7F) > 0x20) break; for (i = begin; i < end; ++i) { buffer[i] = vbi3_teletext_unicode (cs->g0, cs->subset, (unsigned int)(src[i] & 0x7F)); } return _vbi3_strdup_locale_ucs2 (buffer + begin, end - begin); } /** * @internal * @param src NUL-terminated string in UTF-8 format. * * Converts UTF-8 coded string to UCS-2 string and stores it in a * newly allocated buffer. * * @returns * NUL terminated string. You must free() the string when no longer * needed. The function returns an empty string when @a src is @c NULL, * a @c NULL pointer on failure. */ uint16_t * _vbi3_strdup_ucs2_utf8 (const char * src) { unsigned long src_size; if (!src) return NULL; src_size = strlen (src); return (uint16_t *) strdup_iconv ("UCS-2", "UTF-8", src, src_size, 1); } /** * @param fp Output file. * @param cd Conversion object returned by vbi3_iconv_ucs2_open(). * @param src Input buffer. * @param src_size Number of characters (not bytes) in the * input buffer. * * Converts UCS-2 coded text (as in vbi3_page) to another format, * and writes it into the given file. Characters not representable * in the output format are converted to spaces 0x0020. * * @returns * FALSE on failure. */ vbi3_bool vbi3_stdio_cd_ucs2 (FILE * fp, iconv_t cd, const uint16_t * src, unsigned long src_size) { char buffer[4096]; const char *s; size_t sleft; s = (const char *) src; sleft = src_size * 2; while (sleft > 0) { char *d; size_t dleft; size_t r; size_t n; d = buffer; dleft = sizeof (buffer); r = xiconv (cd, &s, &sleft, &d, &dleft, 2); if ((size_t) -1 == r) if (E2BIG != errno) return FALSE; n = d - buffer; r = fwrite (buffer, 1, n, fp); if (n != r) return FALSE; } return TRUE; } /** * @param fp Output file. * @param dst_format Character set name for iconv() conversion, * for example "ISO-8859-1". When @c NULL, the default is UTF-8. * @param src Input buffer. * @param src_size Number of characters (not bytes) in the * input buffer. * * Converts UCS-2 coded text (as in vbi3_page) to another format, * and writes it into the given file. Characters not representable * in the output format are converted to spaces 0x0020. * * @returns * FALSE on failure. */ vbi3_bool vbi3_stdio_iconv_ucs2 (FILE * fp, const char * dst_format, const uint16_t * src, unsigned long src_size) { char buffer[4096]; iconv_t cd; const char *s; char *d; size_t sleft; size_t dleft; s = (const char *) src; d = buffer; cd = xiconv_open (dst_format, NULL, &d, sizeof (buffer)); if ((iconv_t) -1 == cd) return FALSE; sleft = src_size * 2; dleft = sizeof (buffer) - (buffer - d); while (sleft > 0) { size_t r; size_t n; r = xiconv (cd, &s, &sleft, &d, &dleft, 2); if ((size_t) -1 == r) if (E2BIG != errno) goto failure; n = d - buffer; r = fwrite (buffer, 1, n, fp); if (n != r) goto failure; d = buffer; dleft = sizeof (buffer); } iconv_close (cd); return TRUE; failure: iconv_close (cd); return FALSE; } zapping-0.10cvs6/libvbi/conv.h 644 764 144 5074 10260120540 11366 /* * libzvbi - Unicode conversion helper functions * * Copyright (C) 2003, 2004 Michael H. Schimek * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* $Id: conv.h,v 1.4 2005/06/28 01:01:20 mschimek Exp $ */ #ifndef __ZVBI3_CONV_H__ #define __ZVBI3_CONV_H__ #include #include /* uint16_t */ #include /* iconv_t */ #include "lang.h" /* vbi3_character_set */ #include "macros.h" VBI3_BEGIN_DECLS extern iconv_t vbi3_iconv_ucs2_open (const char * dst_format, char ** dst, unsigned long dst_size) __attribute__ ((_vbi3_nonnull (2))); extern void vbi3_iconv_ucs2_close (iconv_t cd); extern vbi3_bool vbi3_iconv_ucs2 (iconv_t cd, char ** dst, unsigned long dst_size, const uint16_t * src, unsigned long src_size) __attribute__ ((_vbi3_nonnull (2))); extern vbi3_bool vbi3_iconv_unicode (iconv_t cd, char ** dst, unsigned long dst_size, unsigned int unicode) __attribute__ ((_vbi3_nonnull (2))); extern char * vbi3_strdup_iconv_ucs2 (const char * dst_format, const uint16_t * src, unsigned long src_size); extern vbi3_bool vbi3_stdio_cd_ucs2 (FILE * fp, iconv_t cd, const uint16_t * src, unsigned long src_size); extern vbi3_bool vbi3_stdio_iconv_ucs2 (FILE * fp, const char * dst_format, const uint16_t * src, unsigned long src_size); /* Private */ extern char * _vbi3_strdup_locale (const char * src); extern char * _vbi3_strdup_locale_ucs2 (const uint16_t * src, unsigned long src_size); extern char * _vbi3_strdup_locale_utf8 (const char * src); extern char * _vbi3_strndup_locale_utf8 (const char * src, unsigned long src_size); extern char * _vbi3_strdup_locale_teletext (const uint8_t * src, unsigned long src_size, const vbi3_character_set *cs); extern uint16_t * _vbi3_strdup_ucs2_utf8 (const char * src); VBI3_END_DECLS #endif /* __ZVBI3_CONV_H__ */ zapping-0.10cvs6/libvbi/cache-priv.h 644 764 144 23202 10305456044 12466 /* * libzvbi - Teletext page cache * * Copyright (C) 2001, 2002, 2003, 2004 Michael H. Schimek * * Based on code from AleVT 1.5.1 * Copyright (C) 1998, 1999 Edgar Toernig * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* $Id: cache-priv.h,v 1.3 2005/09/01 01:40:52 mschimek Exp $ */ #ifndef CACHE_PRIV_H #define CACHE_PRIV_H #include "cache.h" #include "dlist.h" /* list, node & funcs */ #ifndef ZAPPING8 # include "aspect_ratio.h" /* vbi3_aspect_ratio */ # include "program_info.h" /* vbi3_program_info */ #endif #include "sampling_par.h" /* vbi3_videostd_set */ #include "vt.h" /* Teletext definitions */ #define HASH_SIZE 113 /** @internal */ typedef enum { /** Pages to be deleted when no longer referenced. */ CACHE_PRI_ZOMBIE, /** * Ordinary pages, oldest at head of list. * These are deleted first when we run out of memory. */ CACHE_PRI_NORMAL, /** * Pages we expect to use frequently, or which take long to reload: * - pgno 0x100 * n and 0x111 * n * - shared pages (objs, drcs, navigation) * - subpages */ CACHE_PRI_SPECIAL, } cache_priority; /** * @internal * Network related data. */ typedef struct { /* Cache internal stuff. */ /** Network chain. */ node node; /** Cache this network belongs to. */ vbi3_cache * cache; unsigned int ref_count; /** To be deleted when no longer referenced. */ vbi3_bool zombie; /* Decoder stuff. */ /** Network identification. */ vbi3_network network; /** Used by vbi3_decoder and vbi3_teletext_decoder, see there. */ unsigned int confirm_cni_vps; unsigned int confirm_cni_8301; unsigned int confirm_cni_8302; #ifndef ZAPPING8 /** Last received program information. */ vbi3_program_info program_info; /** Last received aspect ratio information. */ vbi3_aspect_ratio aspect_ratio; /** Last received program ID, sorted by vbi3_program_id.channel. */ vbi3_program_id program_id[6]; #endif /* Caption stuff. */ /** Last XDS_CHANNEL_NAME. */ uint8_t channel_name[32]; /* Teletext stuff. */ /** Pages cached now and ever, maintained by cache routines. */ unsigned int n_pages; unsigned int max_pages; /** Number of referenced Teletext pages of this network. */ unsigned int n_referenced_pages; /** Usually 100. */ pagenum initial_page; /** BTT links to TOP pages. */ pagenum btt_link[2 * 5]; vbi3_bool have_top; /** Magazine defaults. Use vt_network_magazine() to access. */ magazine _magazines[8]; /** Last packet 8/30 Status Display, with parity. */ uint8_t status[20]; /** Page statistics. Use cache_network_page_stat() to access. */ page_stat _pages[0x800]; } cache_network; /** * @internal * @brief Cached preprocessed Teletext page. * * In the Teletext decoder we check for transmission errors before storing * data in the cache, and for efficiency store data in decoded format. * * Caution! To save memory this structure uses a variable size union. */ typedef struct { /* Cache internal stuff. */ /** See struct vbi3_cache. */ node hash_node; node pri_node; /** Network sending this page. */ cache_network * network; unsigned int ref_count; /** Current priority of this page. */ cache_priority priority; /* Teletext stuff. */ /** * Defines the page function and which member of the * union applies. */ page_function function; /** Page and subpage number. */ vbi3_pgno pgno; vbi3_subno subno; /** * National character set designator 0 ... 7 * (3 lsb of a vbi3_charset_code). */ int national; /** * Page flags C4 ... C14. * Other bits will be set, just ignore them. */ unsigned int flags; /** * Sets of packets we received. This may include packets * with hamming errors. * * lop_packets: 1 << packet 0 ... 25 * x26_designations: 1 << X/26 designation 0 ... 15 */ unsigned int lop_packets; unsigned int x26_designations; unsigned int x27_designations; unsigned int x28_designations; union { /** Raw page, content unknown. */ struct lop unknown; /** Plain level one page. */ struct lop lop; /** Level one page with X/26 page enhancements. */ struct { struct lop lop; enhancement enh; } enh_lop; /** * Level one page with X/26 page enhancements * and X/28 extensions for Level 2.5 / 3.5. */ struct { struct lop lop; enhancement enh; extension ext; } ext_lop; /** (Global) public object page. */ struct { /** * 12 * 2 triplet pointers from packet 1 ... 4. * Valid range 0 ... 506 (39 packets * 13 triplets), * unused pointers 511 (10.5.1.2), broken -1. */ uint16_t pointer[4 * 12 * 2]; /** * 13 triplets from each of packet 3 ... 25 and * 26/0 ... 26/15. * * Valid range of mode 0x00 ... 0x1F, broken -1. */ triplet triplet[39 * 13 + 1]; } gpop, pop; /** * (Global) dynamically redefinable characters * download page. */ struct { /** DRCS in raw format for error correction. */ struct lop lop; /** * Each character consists of 12x10 pixels, stored * left to right and top to bottom. Pixels can assume * up to 16 colors. Every two pixels * are stored in one byte, left pixel in bits 0x0F, * right pixel in bits 0xF0. */ uint8_t chars[DRCS_PTUS_PER_PAGE][12 * 10 / 2]; /** See 9.4.6. */ uint8_t mode[DRCS_PTUS_PER_PAGE]; /** * 1 << (0 ... (DRCS_PTUS_PER_PAGE - 1)). * * Note characters can span multiple successive PTUs, * see get_drcs_data(). */ uint64_t invalid; } gdrcs, drcs; /** TOP AIT page. */ struct { ait_title title[46]; /** Used to detect changes. */ unsigned int checksum; } ait; } data; /* Dynamic size, add no fields below unless cache_page is statically allocated. */ } cache_page; /** @internal */ vbi3_inline magazine * cache_network_magazine (cache_network * cn, vbi3_pgno pgno) { assert (pgno >= 0x100 && pgno <= 0x8FF); return &cn->_magazines[(pgno >> 8) - 1]; } /** @internal */ vbi3_inline const magazine * cache_network_const_magazine (const cache_network * cn, vbi3_pgno pgno) { assert (pgno >= 0x100 && pgno <= 0x8FF); return &cn->_magazines[(pgno >> 8) - 1]; } /** @internal */ vbi3_inline page_stat * cache_network_page_stat (cache_network * cn, vbi3_pgno pgno) { assert (pgno >= 0x100 && pgno <= 0x8FF); return &cn->_pages[pgno - 0x100]; } /** @internal */ vbi3_inline const page_stat * cache_network_const_page_stat (const cache_network * cn, vbi3_pgno pgno) { assert (pgno >= 0x100 && pgno <= 0x8FF); return &cn->_pages[pgno - 0x100]; } /* in top.c */ extern const ait_title * cache_network_get_ait_title (cache_network * cn, cache_page ** ait_cp, vbi3_pgno pgno, vbi3_subno subno); extern vbi3_bool cache_network_get_top_title (cache_network * cn, vbi3_top_title * tt, vbi3_pgno pgno, vbi3_subno subno); extern vbi3_top_title * cache_network_get_top_titles (cache_network * cn, unsigned int * n_elements); /* in cache.c */ extern void cache_network_get_ttx_page_stat (const cache_network * cn, vbi3_ttx_page_stat * ps, vbi3_pgno pgno); extern void cache_network_unref (cache_network * cn); extern cache_network * cache_network_ref (cache_network * cn); extern cache_network * _vbi3_cache_get_network (vbi3_cache * ca, const vbi3_network * nk); extern cache_network * _vbi3_cache_add_network (vbi3_cache * ca, const vbi3_network * nk, vbi3_videostd_set videostd_set); /* in caption.c */ extern void cache_network_destroy_caption (cache_network * cn); extern void cache_network_init_caption (cache_network * cn); /* in packet.c */ extern void cache_network_dump_teletext (const cache_network * cn, FILE * fp); extern void cache_network_destroy_teletext (cache_network * cn); extern void cache_network_init_teletext (cache_network * cn); /* in cache.c */ extern void cache_page_dump (const cache_page * cp, FILE * fp); extern unsigned int cache_page_size (const cache_page * cp); extern vbi3_bool cache_page_copy (cache_page * dst, const cache_page * src); extern void cache_page_unref (cache_page * cp); extern cache_page * cache_page_ref (cache_page * cp); extern cache_page * _vbi3_cache_get_page (vbi3_cache * ca, cache_network * cn, vbi3_pgno pgno, vbi3_subno subno, vbi3_subno subno_mask); extern cache_page * _vbi3_cache_put_page (vbi3_cache * ca, cache_network * cn, const cache_page * cp); extern void _vbi3_cache_dump (const vbi3_cache * ca, FILE * fp); /* Other stuff. */ typedef int _vbi3_cache_foreach_cb (cache_page * cp, vbi3_bool wrapped, void * user_data); /* in cache.c */ extern int _vbi3_cache_foreach_page (vbi3_cache * ca, cache_network * cn, vbi3_pgno pgno, vbi3_subno subno, int dir, _vbi3_cache_foreach_cb *callback, void * user_data); /* in teletext.c */ extern void _vbi3_character_set_init (const vbi3_character_set *charset[2], vbi3_charset_code default_code_0, vbi3_charset_code default_code_1, const extension * ext, const cache_page * cp); #endif /* CACHE_PRIV_H */ zapping-0.10cvs6/libvbi/packet-830.c 644 764 144 14302 10371711036 12216 /* * libzvbi - Teletext packet decoder, packet 8/30 * * Copyright (C) 2003, 2004 Michael H. Schimek * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. * * 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 this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* $Id: packet-830.c,v 1.6 2006/02/06 18:14:54 mschimek Exp $ */ #ifdef HAVE_CONFIG_H # include "config.h" #endif #include #include "bcd.h" /* vbi3_bcd2bin() */ #include "hamm.h" /* vbi3_rev16p(), vbi3_iham8() */ #include "packet-830.h" /** * @addtogroup Packet830 Teletext Packet 8/30 Decoder * @ingroup LowDec * @brief Functions to decode Teletext packets 8/30 (ETS 300 706). */ /** * @param cni CNI of type VBI3_CNI_TYPE_8301 will be stored here. * @param buffer Teletext packet as defined for @c VBI3_SLICED_TELETEXT_B, * i.e. 42 bytes without clock run-in and framing code. * * Decodes a Teletext packet 8/30 format 1 according to * ETS 300 706 section 9.8.1, returning the 16 bit Country and * Network Identifier in @a cni. * * @returns * Always @c TRUE, no error checking possible. */ vbi3_bool vbi3_decode_teletext_8301_cni (unsigned int * cni, const uint8_t buffer[42]) { assert (NULL != cni); assert (NULL != buffer); *cni = vbi3_rev16p (buffer + 9); return TRUE; } /** * @param tme UTC time will be stored here. * @param gmtoff Local time offset in seconds east of UTC is stored here, * including daylight saving time, as in BSD and GNU struct tm tm_gmtoff. * To get the local time of the network broadcasting this packet add * @a gmtoff to @a time. * @param buffer Teletext packet as defined for @c VBI3_SLICED_TELETEXT_B, * i.e. 42 bytes without clock run-in and framing code. * * Decodes a Teletext packet 8/30 format 1 according to * ETS 300 706 section 9.8.1, returning the time data. * * Note a few stations incorrectly transmit local time instead of UTC, * with gmtoff zero. * * @returns * @c FALSE if the buffer contained incorrectable data, in this case * @a tme and @a gmtoff remain unchanged. */ vbi3_bool vbi3_decode_teletext_8301_local_time (time_t * tme, int * gmtoff, const uint8_t buffer[42]) { unsigned int mjd; unsigned int utc; int bcd; int t; assert (NULL != tme); assert (NULL != gmtoff); assert (NULL != buffer); bcd = (+ ((buffer[12] & 15) << 16) + (buffer[13] << 8) + buffer[14] - 0x11111); if (!vbi3_is_bcd (bcd)) return FALSE; mjd = vbi3_bcd2bin (bcd); bcd = (+ (buffer[15] << 16) + (buffer[16] << 8) + buffer[17] - 0x111111); if (vbi3_bcd_digits_greater (bcd, 0x295959)) return FALSE; utc = (bcd & 15) + ((bcd >> 4) & 15) * 10; bcd >>= 8; utc += (bcd & 15) * 60 + ((bcd >> 4) & 15) * 600; bcd >>= 8; utc += (bcd & 15) * 3600 + (bcd >> 4) * 36000; if (utc >= 24 * 60 * 60) return FALSE; *tme = (mjd - 40587) * 86400 + utc; /* Local time offset in seconds east of UTC. */ t = (buffer[11] & 0x3E) * (15 * 60); if (buffer[11] & 0x40) t = -t; /* 300 706 says 0x81 bits are reserved, some stations set, some clear, no apparent function (no UTC/local flag anyway). */ *gmtoff = t; return TRUE; } /** * @param cni CNI of type VBI3_CNI_TYPE_8302 will be stored here. * @param buffer Teletext packet as defined for @c VBI3_SLICED_TELETEXT_B, * i.e. 42 bytes without clock run-in and framing code. * * Decodes a Teletext packet 8/30 format 2 according to * ETS 300 706 section 9.8.2, returning the 16 bit Country and * Network Identifier in @a cni. * * @returns * @c FALSE if the buffer contained incorrectable data, in this case * @a cni remains unchanged. */ vbi3_bool vbi3_decode_teletext_8302_cni (unsigned int * cni, const uint8_t buffer[42]) { int b[13]; assert (NULL != cni); assert (NULL != buffer); b[ 7] = vbi3_unham16p (buffer + 10); b[ 8] = vbi3_unham16p (buffer + 12); b[10] = vbi3_unham16p (buffer + 16); b[11] = vbi3_unham16p (buffer + 18); if ((b[7] | b[8] | b[10] | b[11]) < 0) return FALSE; b[ 7] = vbi3_rev8 (b[ 7]); b[ 8] = vbi3_rev8 (b[ 8]); b[10] = vbi3_rev8 (b[10]); b[11] = vbi3_rev8 (b[11]); *cni = (+ ((b[ 7] & 0x0F) << 12) + ((b[10] & 0x03) << 10) + ((b[11] & 0xC0) << 2) + (b[ 8] & 0xC0) + (b[11] & 0x3F)); return TRUE; } /** * @param pid PDC data will be stored here. * @param buffer Teletext packet as defined for @c VBI3_SLICED_TELETEXT_B, * i.e. 42 bytes without clock run-in and framing code. * * Decodes a Teletext packet 8/30 format 2 according to * ETS 300 231, storing PDC recording-control data in @a pid. * * @returns * @c FALSE if the buffer contained incorrectable data, in this case * @a pid remains unchanged. */ vbi3_bool vbi3_decode_teletext_8302_pdc (vbi3_program_id * pid, const uint8_t buffer[42]) { uint8_t b[13]; unsigned int i; int error; assert (NULL != pid); assert (NULL != buffer); error = vbi3_unham8 (buffer[10]); b[ 6] = error; for (i = 7; i <= 12; ++i) { int t; t = vbi3_unham16p (buffer + i * 2 - 4); error |= t; b[i] = vbi3_rev8 (t); } if (error < 0) return FALSE; pid->cni_type = VBI3_CNI_TYPE_8302; pid->cni = (+ ((b[ 7] & 0x0F) << 12) + ((b[10] & 0x03) << 10) + ((b[11] & 0xC0) << 2) + (b[ 8] & 0xC0) + (b[11] & 0x3F)); pid->channel = VBI3_PID_CHANNEL_LCI_0 + ((b[6] >> 2) & 3); pid->luf = !!(b[6] & 2); pid->prf = b[6] & 1; pid->pcs_audio = b[7] >> 6; pid->mi = !!(b[7] & 0x20); pid->pil = (+ ((b[ 8] & 0x3F) << 14) + (b[ 9] << 6) + (b[10] >> 2)); pid->month = VBI3_PIL_MONTH (pid->pil) - 1; pid->day = VBI3_PIL_DAY (pid->pil) - 1; pid->hour = VBI3_PIL_HOUR (pid->pil); pid->minute = VBI3_PIL_MINUTE (pid->pil); pid->length = 0; /* unknown */ pid->pty = b[12]; pid->tape_delayed = FALSE; return TRUE; } zapping-0.10cvs6/libvbi/packet-830.h 644 764 144 3312 10177355376 12221 /* * libzvbi - Teletext packet decoder, packet 8/30 * * Copyright (C) 2003, 2004 Michael H. Schimek * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. * * 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 this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* $Id: packet-830.h,v 1.3 2005/01/31 07:15:10 mschimek Exp $ */ #ifndef __ZVBI3_PACKET_830_H__ #define __ZVBI3_PACKET_830_H__ #include /* uint8_t */ #include /* time_t */ #include "macros.h" #include "pdc.h" /* vbi3_program_id */ VBI3_BEGIN_DECLS /** * @addtogroup Packet830 * @{ */ extern vbi3_bool vbi3_decode_teletext_8301_cni (unsigned int * cni, const uint8_t buffer[42]) __attribute__ ((_vbi3_nonnull (1, 2))); extern vbi3_bool vbi3_decode_teletext_8301_local_time (time_t * tme, int * gmtoff, const uint8_t buffer[42]) __attribute__ ((_vbi3_nonnull (1, 2, 3))); extern vbi3_bool vbi3_decode_teletext_8302_cni (unsigned int * cni, const uint8_t buffer[42]) __attribute__ ((_vbi3_nonnull (1, 2))); extern vbi3_bool vbi3_decode_teletext_8302_pdc (vbi3_program_id * pid, const uint8_t buffer[42]) __attribute__ ((_vbi3_nonnull (1, 2))); /** @} */ VBI3_END_DECLS #endif /* __ZVBI3__PACKET_830_H__ */ zapping-0.10cvs6/libvbi/hamm.c 644 764 144 26102 10260120513 11351 /* * libzvbi - Error correction functions * * Copyright (C) 2001, 2002, 2003, 2004 Michael H. Schimek * * Based on code from AleVT 1.5.1 * Copyright (C) 1998, 1999 Edgar Toernig * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* $Id: hamm.c,v 1.15 2005/06/28 01:00:59 mschimek Exp $ */ #include /* CHAR_BIT */ #include "hamm.h" const uint8_t _vbi3_bit_reverse [256] = { 0x00, 0x80, 0x40, 0xc0, 0x20, 0xa0, 0x60, 0xe0, 0x10, 0x90, 0x50, 0xd0, 0x30, 0xb0, 0x70, 0xf0, 0x08, 0x88, 0x48, 0xc8, 0x28, 0xa8, 0x68, 0xe8, 0x18, 0x98, 0x58, 0xd8, 0x38, 0xb8, 0x78, 0xf8, 0x04, 0x84, 0x44, 0xc4, 0x24, 0xa4, 0x64, 0xe4, 0x14, 0x94, 0x54, 0xd4, 0x34, 0xb4, 0x74, 0xf4, 0x0c, 0x8c, 0x4c, 0xcc, 0x2c, 0xac, 0x6c, 0xec, 0x1c, 0x9c, 0x5c, 0xdc, 0x3c, 0xbc, 0x7c, 0xfc, 0x02, 0x82, 0x42, 0xc2, 0x22, 0xa2, 0x62, 0xe2, 0x12, 0x92, 0x52, 0xd2, 0x32, 0xb2, 0x72, 0xf2, 0x0a, 0x8a, 0x4a, 0xca, 0x2a, 0xaa, 0x6a, 0xea, 0x1a, 0x9a, 0x5a, 0xda, 0x3a, 0xba, 0x7a, 0xfa, 0x06, 0x86, 0x46, 0xc6, 0x26, 0xa6, 0x66, 0xe6, 0x16, 0x96, 0x56, 0xd6, 0x36, 0xb6, 0x76, 0xf6, 0x0e, 0x8e, 0x4e, 0xce, 0x2e, 0xae, 0x6e, 0xee, 0x1e, 0x9e, 0x5e, 0xde, 0x3e, 0xbe, 0x7e, 0xfe, 0x01, 0x81, 0x41, 0xc1, 0x21, 0xa1, 0x61, 0xe1, 0x11, 0x91, 0x51, 0xd1, 0x31, 0xb1, 0x71, 0xf1, 0x09, 0x89, 0x49, 0xc9, 0x29, 0xa9, 0x69, 0xe9, 0x19, 0x99, 0x59, 0xd9, 0x39, 0xb9, 0x79, 0xf9, 0x05, 0x85, 0x45, 0xc5, 0x25, 0xa5, 0x65, 0xe5, 0x15, 0x95, 0x55, 0xd5, 0x35, 0xb5, 0x75, 0xf5, 0x0d, 0x8d, 0x4d, 0xcd, 0x2d, 0xad, 0x6d, 0xed, 0x1d, 0x9d, 0x5d, 0xdd, 0x3d, 0xbd, 0x7d, 0xfd, 0x03, 0x83, 0x43, 0xc3, 0x23, 0xa3, 0x63, 0xe3, 0x13, 0x93, 0x53, 0xd3, 0x33, 0xb3, 0x73, 0xf3, 0x0b, 0x8b, 0x4b, 0xcb, 0x2b, 0xab, 0x6b, 0xeb, 0x1b, 0x9b, 0x5b, 0xdb, 0x3b, 0xbb, 0x7b, 0xfb, 0x07, 0x87, 0x47, 0xc7, 0x27, 0xa7, 0x67, 0xe7, 0x17, 0x97, 0x57, 0xd7, 0x37, 0xb7, 0x77, 0xf7, 0x0f, 0x8f, 0x4f, 0xcf, 0x2f, 0xaf, 0x6f, 0xef, 0x1f, 0x9f, 0x5f, 0xdf, 0x3f, 0xbf, 0x7f, 0xff }; /** * @ingroup Error * * @param p Array of unsigned bytes. * @param n Size of array. * * Of each byte of the array, changes the most significant * bit to make the number of set bits odd. */ void vbi3_par (uint8_t * p, unsigned long n) { while (n-- > 0) { uint8_t c = *p; /* if 0 == (inv_par[] & 32) change msb of *p. */ *p++ = c ^ (128 & ~(_vbi3_hamm24_inv_par[0][c] << 2)); } } /** * @ingroup Error * @param p Array of unsigned bytes. * @param n Size of array. * * Tests the parity and clears the most significant bit of * each byte of the array. * * @return * A negative value if any byte of the array had even * parity (sum of bits modulo 2 is 0). */ int vbi3_unpar (uint8_t * p, unsigned long n) { int r = 0; while (n-- > 0) { uint8_t c = *p; /* if 0 == (inv_par[] & 32) set msb of r. */ r |= ~ _vbi3_hamm24_inv_par[0][c] << (sizeof (int) * CHAR_BIT - 1 - 5); *p++ = c & 127; } return r; } /* ETS 300 706, Section 8.2 Hamming 8/4 */ const uint8_t _vbi3_hamm8_fwd [16] = { 0x15, 0x02, 0x49, 0x5e, 0x64, 0x73, 0x38, 0x2f, 0xd0, 0xc7, 0x8c, 0x9b, 0xa1, 0xb6, 0xfd, 0xea }; const int8_t _vbi3_hamm8_inv [256] = { 0x01, -1, 0x01, 0x01, -1, 0x00, 0x01, -1, -1, 0x02, 0x01, -1, 0x0a, -1, -1, 0x07, -1, 0x00, 0x01, -1, 0x00, 0x00, -1, 0x00, 0x06, -1, -1, 0x0b, -1, 0x00, 0x03, -1, -1, 0x0c, 0x01, -1, 0x04, -1, -1, 0x07, 0x06, -1, -1, 0x07, -1, 0x07, 0x07, 0x07, 0x06, -1, -1, 0x05, -1, 0x00, 0x0d, -1, 0x06, 0x06, 0x06, -1, 0x06, -1, -1, 0x07, -1, 0x02, 0x01, -1, 0x04, -1, -1, 0x09, 0x02, 0x02, -1, 0x02, -1, 0x02, 0x03, -1, 0x08, -1, -1, 0x05, -1, 0x00, 0x03, -1, -1, 0x02, 0x03, -1, 0x03, -1, 0x03, 0x03, 0x04, -1, -1, 0x05, 0x04, 0x04, 0x04, -1, -1, 0x02, 0x0f, -1, 0x04, -1, -1, 0x07, -1, 0x05, 0x05, 0x05, 0x04, -1, -1, 0x05, 0x06, -1, -1, 0x05, -1, 0x0e, 0x03, -1, -1, 0x0c, 0x01, -1, 0x0a, -1, -1, 0x09, 0x0a, -1, -1, 0x0b, 0x0a, 0x0a, 0x0a, -1, 0x08, -1, -1, 0x0b, -1, 0x00, 0x0d, -1, -1, 0x0b, 0x0b, 0x0b, 0x0a, -1, -1, 0x0b, 0x0c, 0x0c, -1, 0x0c, -1, 0x0c, 0x0d, -1, -1, 0x0c, 0x0f, -1, 0x0a, -1, -1, 0x07, -1, 0x0c, 0x0d, -1, 0x0d, -1, 0x0d, 0x0d, 0x06, -1, -1, 0x0b, -1, 0x0e, 0x0d, -1, 0x08, -1, -1, 0x09, -1, 0x09, 0x09, 0x09, -1, 0x02, 0x0f, -1, 0x0a, -1, -1, 0x09, 0x08, 0x08, 0x08, -1, 0x08, -1, -1, 0x09, 0x08, -1, -1, 0x0b, -1, 0x0e, 0x03, -1, -1, 0x0c, 0x0f, -1, 0x04, -1, -1, 0x09, 0x0f, -1, 0x0f, 0x0f, -1, 0x0e, 0x0f, -1, 0x08, -1, -1, 0x05, -1, 0x0e, 0x0d, -1, -1, 0x0e, 0x0f, -1, 0x0e, 0x0e, -1, 0x0e }; /* ETS 300 706, Section 8.3 Hamming 18/24 (code from AleVT) */ /* This table generates the parity checks for hamm24/18 decoding. Bit 0 is for test A, 1 for B, ... Thanks to R. Gancarz for this fine table *g* */ const int8_t _vbi3_hamm24_inv_par [3][256] = { { /* Parities of first byte */ 0, 33, 34, 3, 35, 2, 1, 32, 36, 5, 6, 39, 7, 38, 37, 4, 37, 4, 7, 38, 6, 39, 36, 5, 1, 32, 35, 2, 34, 3, 0, 33, 38, 7, 4, 37, 5, 36, 39, 6, 2, 35, 32, 1, 33, 0, 3, 34, 3, 34, 33, 0, 32, 1, 2, 35, 39, 6, 5, 36, 4, 37, 38, 7, 39, 6, 5, 36, 4, 37, 38, 7, 3, 34, 33, 0, 32, 1, 2, 35, 2, 35, 32, 1, 33, 0, 3, 34, 38, 7, 4, 37, 5, 36, 39, 6, 1, 32, 35, 2, 34, 3, 0, 33, 37, 4, 7, 38, 6, 39, 36, 5, 36, 5, 6, 39, 7, 38, 37, 4, 0, 33, 34, 3, 35, 2, 1, 32, 40, 9, 10, 43, 11, 42, 41, 8, 12, 45, 46, 15, 47, 14, 13, 44, 13, 44, 47, 14, 46, 15, 12, 45, 41, 8, 11, 42, 10, 43, 40, 9, 14, 47, 44, 13, 45, 12, 15, 46, 42, 11, 8, 41, 9, 40, 43, 10, 43, 10, 9, 40, 8, 41, 42, 11, 15, 46, 45, 12, 44, 13, 14, 47, 15, 46, 45, 12, 44, 13, 14, 47, 43, 10, 9, 40, 8, 41, 42, 11, 42, 11, 8, 41, 9, 40, 43, 10, 14, 47, 44, 13, 45, 12, 15, 46, 41, 8, 11, 42, 10, 43, 40, 9, 13, 44, 47, 14, 46, 15, 12, 45, 12, 45, 46, 15, 47, 14, 13, 44, 40, 9, 10, 43, 11, 42, 41, 8 }, { /* Parities of second byte */ 0, 41, 42, 3, 43, 2, 1, 40, 44, 5, 6, 47, 7, 46, 45, 4, 45, 4, 7, 46, 6, 47, 44, 5, 1, 40, 43, 2, 42, 3, 0, 41, 46, 7, 4, 45, 5, 44, 47, 6, 2, 43, 40, 1, 41, 0, 3, 42, 3, 42, 41, 0, 40, 1, 2, 43, 47, 6, 5, 44, 4, 45, 46, 7, 47, 6, 5, 44, 4, 45, 46, 7, 3, 42, 41, 0, 40, 1, 2, 43, 2, 43, 40, 1, 41, 0, 3, 42, 46, 7, 4, 45, 5, 44, 47, 6, 1, 40, 43, 2, 42, 3, 0, 41, 45, 4, 7, 46, 6, 47, 44, 5, 44, 5, 6, 47, 7, 46, 45, 4, 0, 41, 42, 3, 43, 2, 1, 40, 48, 25, 26, 51, 27, 50, 49, 24, 28, 53, 54, 31, 55, 30, 29, 52, 29, 52, 55, 30, 54, 31, 28, 53, 49, 24, 27, 50, 26, 51, 48, 25, 30, 55, 52, 29, 53, 28, 31, 54, 50, 27, 24, 49, 25, 48, 51, 26, 51, 26, 25, 48, 24, 49, 50, 27, 31, 54, 53, 28, 52, 29, 30, 55, 31, 54, 53, 28, 52, 29, 30, 55, 51, 26, 25, 48, 24, 49, 50, 27, 50, 27, 24, 49, 25, 48, 51, 26, 30, 55, 52, 29, 53, 28, 31, 54, 49, 24, 27, 50, 26, 51, 48, 25, 29, 52, 55, 30, 54, 31, 28, 53, 28, 53, 54, 31, 55, 30, 29, 52, 48, 25, 26, 51, 27, 50, 49, 24 }, { /* Parities of third byte, xor 0x3F */ 63, 14, 13, 60, 12, 61, 62, 15, 11, 58, 57, 8, 56, 9, 10, 59, 10, 59, 56, 9, 57, 8, 11, 58, 62, 15, 12, 61, 13, 60, 63, 14, 9, 56, 59, 10, 58, 11, 8, 57, 61, 12, 15, 62, 14, 63, 60, 13, 60, 13, 14, 63, 15, 62, 61, 12, 8, 57, 58, 11, 59, 10, 9, 56, 8, 57, 58, 11, 59, 10, 9, 56, 60, 13, 14, 63, 15, 62, 61, 12, 61, 12, 15, 62, 14, 63, 60, 13, 9, 56, 59, 10, 58, 11, 8, 57, 62, 15, 12, 61, 13, 60, 63, 14, 10, 59, 56, 9, 57, 8, 11, 58, 11, 58, 57, 8, 56, 9, 10, 59, 63, 14, 13, 60, 12, 61, 62, 15, 31, 46, 45, 28, 44, 29, 30, 47, 43, 26, 25, 40, 24, 41, 42, 27, 42, 27, 24, 41, 25, 40, 43, 26, 30, 47, 44, 29, 45, 28, 31, 46, 41, 24, 27, 42, 26, 43, 40, 25, 29, 44, 47, 30, 46, 31, 28, 45, 28, 45, 46, 31, 47, 30, 29, 44, 40, 25, 26, 43, 27, 42, 41, 24, 40, 25, 26, 43, 27, 42, 41, 24, 28, 45, 46, 31, 47, 30, 29, 44, 29, 44, 47, 30, 46, 31, 28, 45, 41, 24, 27, 42, 26, 43, 40, 25, 30, 47, 44, 29, 45, 28, 31, 46, 42, 27, 24, 41, 25, 40, 43, 26, 43, 26, 25, 40, 24, 41, 42, 27, 31, 46, 45, 28, 44, 29, 30, 47 } }; /* Table to extract the lower 4 bits from first hamm24/18 encoded byte (P4 D4 D3 D2 P3 D1 P2 P1) */ static const int8_t _vbi3_hamm24_val [128] = { 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 7, 7, 7, 7, 6, 6, 6, 6, 7, 7, 7, 7, 8, 8, 8, 8, 9, 9, 9, 9, 8, 8, 8, 8, 9, 9, 9, 9, 10, 10, 10, 10, 11, 11, 11, 11, 10, 10, 10, 10, 11, 11, 11, 11, 12, 12, 12, 12, 13, 13, 13, 13, 12, 12, 12, 12, 13, 13, 13, 13, 14, 14, 14, 14, 15, 15, 15, 15, 14, 14, 14, 14, 15, 15, 15, 15 }; /* Correction of single bit error in decoded word, according to test A ... F in table vbi3_hamm24_inv_tst. MSB indicates double bit error. */ static const int32_t _vbi3_hamm24_corr [64] = { 0x00000000, 0x80000000, 0x80000000, 0x80000000, 0x80000000, 0x80000000, 0x80000000, 0x80000000, 0x80000000, 0x80000000, 0x80000000, 0x80000000, 0x80000000, 0x80000000, 0x80000000, 0x80000000, 0x80000000, 0x80000000, 0x80000000, 0x80000000, 0x80000000, 0x80000000, 0x80000000, 0x80000000, 0x80000000, 0x80000000, 0x80000000, 0x80000000, 0x80000000, 0x80000000, 0x80000000, 0x80000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000000, 0x00000002, 0x00000004, 0x00000008, 0x00000000, 0x00000010, 0x00000020, 0x00000040, 0x00000080, 0x00000100, 0x00000200, 0x00000400, 0x00000000, 0x00000800, 0x00001000, 0x00002000, 0x00004000, 0x00008000, 0x00010000, 0x00020000, 0x80000000, 0x80000000, 0x80000000, 0x80000000, 0x80000000, 0x80000000, 0x80000000, 0x80000000, }; /** * @ingroup Error * @param p Pointer to a Hamming 24/18 protected 24 bit word, * last significant byte first, lsb first transmitted. * * Decodes a Hamming 24/18 protected byte triplet * as specified in ETS 300 706, Section 8.3. * * @return * Triplet data bits D18 [msb] ... D1 [lsb] or a negative value * if the triplet contained incorrectable errors. */ int vbi3_unham24p (const uint8_t * p) { int e = _vbi3_hamm24_inv_par[0][p[0]] ^ _vbi3_hamm24_inv_par[1][p[1]] ^ _vbi3_hamm24_inv_par[2][p[2]]; int x = _vbi3_hamm24_val[p[0] & 127] + (p[1] & 127) * 16 + (p[2] & 127) * 2048; return x ^ (int) _vbi3_hamm24_corr[e]; } zapping-0.10cvs6/libvbi/hamm.h 644 764 144 11124 10260120446 11361 /* * libzvbi - Error correction functions * * Copyright (C) 2001, 2002, 2003, 2004 Michael H. Schimek * * Based on code from AleVT 1.5.1 * Copyright (C) 1998, 1999 Edgar Toernig * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* $Id: hamm.h,v 1.16 2005/06/28 01:00:22 mschimek Exp $ */ #ifndef __ZVBI3_HAMM_H__ #define __ZVBI3_HAMM_H__ #include /* uintN_t */ #include "macros.h" VBI3_BEGIN_DECLS extern const uint8_t _vbi3_bit_reverse [256]; extern const uint8_t _vbi3_hamm8_fwd [16]; extern const int8_t _vbi3_hamm8_inv [256]; extern const int8_t _vbi3_hamm24_inv_par [3][256]; /** * @addtogroup Error Error correction functions * @ingroup Raw * @brief Helper functions to decode sliced VBI data. * @{ */ /** * @param c Unsigned byte. * * Reverses the bits of the argument. * * @returns * Data bits 0 [msb] ... 7 [lsb]. */ vbi3_inline unsigned int vbi3_rev8 (unsigned int c) { return _vbi3_bit_reverse[(uint8_t) c]; } /** * @param c Unsigned 16 bit word. * * Reverses the bits of the argument. * * @returns * Data bits 0 [msb] ... 15 [lsb]. */ vbi3_inline unsigned int vbi3_rev16 (unsigned int c) { return _vbi3_bit_reverse[(uint8_t) c] * 256 + _vbi3_bit_reverse[(uint8_t)(c >> 8)]; } /** * @param p Pointer to a 16 bit word, last significant * byte first. * * Reverses the bits of the argument. * * @returns * Data bits 0 [msb] ... 15 [lsb]. */ vbi3_inline unsigned int vbi3_rev16p (const uint8_t * p) { return _vbi3_bit_reverse[p[0]] * 256 + _vbi3_bit_reverse[p[1]]; } /** * @param c Unsigned byte. * * @returns * Changes the most significant bit of the byte * to make the number of set bits odd. */ vbi3_inline unsigned int vbi3_par8 (unsigned int c) { c &= 255; /* if 0 == (inv_par[] & 32) change bit 7 of c. */ c ^= 128 & ~(_vbi3_hamm24_inv_par[0][c] << 2); return c; } /** * @param c Unsigned byte. * * @returns * If the byte has odd parity (sum of bits modulo 2 is 1) the * byte AND 127, otherwise a negative value. */ vbi3_inline int vbi3_unpar8 (unsigned int c) { #ifdef __GNUC__ #if #cpu (i686) int r = c & 127; /* This saves cache flushes and an explicit branch. */ __asm__ (" testb %1,%1\n" " cmovp %2,%0\n" : "+&a" (r) : "c" (c), "rm" (-1)); return r; #endif #endif if (_vbi3_hamm24_inv_par[0][(uint8_t) c] & 32) { return c & 127; } else { /* The idea is to OR results together to find a parity error in a sequence, rather than a test and branch on each byte. */ return -1; } } extern void vbi3_par (uint8_t * p, unsigned long n); extern int vbi3_unpar (uint8_t * p, unsigned long n); /** * @param c Integer between 0 ... 15. * * Encodes a nibble with Hamming 8/4 protection * as specified in EN 300 706, Section 8.2. * * @returns * Hamming encoded unsigned byte, lsb first transmitted. */ vbi3_inline unsigned int vbi3_ham8 (unsigned int c) { return _vbi3_hamm8_fwd[c & 15]; } /** * @param c Hamming 8/4 protected byte, lsb first transmitted. * * Decodes a Hamming 8/4 protected byte * as specified in EN 300 706, Section 8.2. * * @returns * Data bits (D4 [msb] ... D1 [lsb]) or a negative * value if the byte contained incorrectable errors. */ vbi3_inline int vbi3_unham8 (unsigned int c) { return _vbi3_hamm8_inv[(uint8_t) c]; } /** * @param p Pointer to a Hamming 8/4 protected 16 bit word, * last significant byte first, lsb first transmitted. * * Decodes a Hamming 8/4 protected byte pair * as specified in EN 300 706, Section 8.2. * * @returns * Data bits D4 [msb] ... D1 of first byte and D4 ... D1 [lsb] * of second byte, or a negative value if any of the bytes * contained incorrectable errors. */ vbi3_inline int vbi3_unham16p (const uint8_t * p) { return ((int) _vbi3_hamm8_inv[p[0]]) | (((int) _vbi3_hamm8_inv[p[1]]) << 4); } extern int vbi3_unham24p (const uint8_t * p) __attribute__ ((_vbi3_pure)); /** @} */ VBI3_END_DECLS #endif /* __ZVBI3_HAMM_H__ */ zapping-0.10cvs6/libvbi/Makefile.am 644 764 144 3243 10327374617 12324 ## Process this file with automake to produce Makefile.in noinst_LTLIBRARIES = libvbi.la BUILT_SOURCES = \ wstfont2.xbm \ ccfont3.xbm MAINTAINERCLEANFILES = \ fontgen EXTRA_DIST = \ $(BUILT_SOURCES) \ fontgen.c \ wstfont2.pbm \ ccfont3.pbm # ZAPPING8: this is only a subset of libzvbi 0.3, compile accordingly. AM_CFLAGS = \ -D_GNU_SOURCE \ -D_REENTRANT \ -DZAPPING8 \ $(UNICODE_CFLAGS) INCLUDES = -I$(top_srcdir) libvbi_la_SOURCES = \ bcd.c bcd.h \ cache.c cache.h cache-priv.h \ caption_decoder.c caption_decoder.h caption_decoder-priv.h \ conv.c conv.h \ dlist.h \ event.c event.h event-priv.h \ exp-gfx.c exp-gfx.h wstfont2.xbm \ exp-html.c \ exp-sub.c \ exp-txt.c exp-txt.h \ exp-vtx.c \ export.c export.h export-priv.h \ hamm.c hamm.h \ image_format.c image_format.h \ lang.c lang.h \ link.c link.h \ macros.h \ misc.c misc.h \ network.c network.h network-table.h \ packet-830.c packet-830.h \ page.h page-priv.h \ pdc.h \ sampling_par.h \ search.c search.h \ sliced.h \ teletext.c \ teletext_decoder.c teletext_decoder-priv.h teletext_decoder.h \ top_title.c top_title.h \ ure.c ure.h \ vbi_decoder.c vbi_decoder.h vbi_decoder-priv.h \ vps.c vps.h \ vt.h exp-gfx.$(OBJEXT): wstfont2.xbm ccfont3.xbm if MAINTAINER_MODE wstfont2.xbm: wstfont2.pbm Makefile.am fontgen$(EXEEXT) $(top_builddir)/libvbi/fontgen$(EXEEXT) xbm wstfont2 10 < $< > $@ ccfont3.xbm: ccfont3.pbm Makefile.am fontgen$(EXEEXT) $(top_builddir)/libvbi/fontgen$(EXEEXT) xbm ccfont3 13 < $< > $@ endif # Must prevent link conflict with libzvbi 0.2. great_rename: for file in *.c *.h; do \ sed "s/vbi_/vbi3_/g;s/VBI_/VBI3_/g" <$$file >tmp; \ mv tmp $$file; \ done zapping-0.10cvs6/libvbi/Makefile.in 644 764 144 52033 10442575446 12357 # Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = .. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = libvbi DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libvbi_la_LIBADD = am_libvbi_la_OBJECTS = bcd.lo cache.lo caption_decoder.lo conv.lo \ event.lo exp-gfx.lo exp-html.lo exp-sub.lo exp-txt.lo \ exp-vtx.lo export.lo hamm.lo image_format.lo lang.lo link.lo \ misc.lo network.lo packet-830.lo search.lo teletext.lo \ teletext_decoder.lo top_title.lo ure.lo vbi_decoder.lo vps.lo libvbi_la_OBJECTS = $(am_libvbi_la_OBJECTS) DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ SOURCES = $(libvbi_la_SOURCES) DIST_SOURCES = $(libvbi_la_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ ARTS_CFLAGS = @ARTS_CFLAGS@ ARTS_LIBS = @ARTS_LIBS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BUILD_DEINTERLACE_PLUGIN_FALSE = @BUILD_DEINTERLACE_PLUGIN_FALSE@ BUILD_DEINTERLACE_PLUGIN_TRUE = @BUILD_DEINTERLACE_PLUGIN_TRUE@ BUILD_MAN_FALSE = @BUILD_MAN_FALSE@ BUILD_MAN_TRUE = @BUILD_MAN_TRUE@ CAN_COMPILE_3DNOW_FALSE = @CAN_COMPILE_3DNOW_FALSE@ CAN_COMPILE_3DNOW_TRUE = @CAN_COMPILE_3DNOW_TRUE@ CAN_COMPILE_ALTIVEC_FALSE = @CAN_COMPILE_ALTIVEC_FALSE@ CAN_COMPILE_ALTIVEC_TRUE = @CAN_COMPILE_ALTIVEC_TRUE@ CAN_COMPILE_MMX_FALSE = @CAN_COMPILE_MMX_FALSE@ CAN_COMPILE_MMX_TRUE = @CAN_COMPILE_MMX_TRUE@ CAN_COMPILE_SSE2_FALSE = @CAN_COMPILE_SSE2_FALSE@ CAN_COMPILE_SSE2_TRUE = @CAN_COMPILE_SSE2_TRUE@ CAN_COMPILE_SSE3_FALSE = @CAN_COMPILE_SSE3_FALSE@ CAN_COMPILE_SSE3_TRUE = @CAN_COMPILE_SSE3_TRUE@ CAN_COMPILE_SSE_FALSE = @CAN_COMPILE_SSE_FALSE@ CAN_COMPILE_SSE_TRUE = @CAN_COMPILE_SSE_TRUE@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCAS = @CCAS@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ COMMON_INCLUDES = @COMMON_INCLUDES@ CONSOLEHELPER_LOCATION = @CONSOLEHELPER_LOCATION@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFAULT_CFLAGS = @DEFAULT_CFLAGS@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ESD_LIBS = @ESD_LIBS@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ GCONF_SCHEMAS_INSTALL_FALSE = @GCONF_SCHEMAS_INSTALL_FALSE@ GCONF_SCHEMAS_INSTALL_TRUE = @GCONF_SCHEMAS_INSTALL_TRUE@ GCONF_SCHEMA_CONFIG_SOURCE = @GCONF_SCHEMA_CONFIG_SOURCE@ GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@ GDK_PIXBUF_CSOURCE = @GDK_PIXBUF_CSOURCE@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ HAVE_GCC_LIMITS_FALSE = @HAVE_GCC_LIMITS_FALSE@ HAVE_GCC_LIMITS_TRUE = @HAVE_GCC_LIMITS_TRUE@ HAVE_LIBZVBI_FALSE = @HAVE_LIBZVBI_FALSE@ HAVE_LIBZVBI_TRUE = @HAVE_LIBZVBI_TRUE@ HAVE_X86_FALSE = @HAVE_X86_FALSE@ HAVE_X86_TRUE = @HAVE_X86_TRUE@ HAVE_XMU_FALSE = @HAVE_XMU_FALSE@ HAVE_XMU_TRUE = @HAVE_XMU_TRUE@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ INTLTOOL_CAVES_RULE = @INTLTOOL_CAVES_RULE@ INTLTOOL_DESKTOP_RULE = @INTLTOOL_DESKTOP_RULE@ INTLTOOL_DIRECTORY_RULE = @INTLTOOL_DIRECTORY_RULE@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ INTLTOOL_ICONV = @INTLTOOL_ICONV@ INTLTOOL_KBD_RULE = @INTLTOOL_KBD_RULE@ INTLTOOL_KEYS_RULE = @INTLTOOL_KEYS_RULE@ INTLTOOL_MERGE = @INTLTOOL_MERGE@ INTLTOOL_MSGFMT = @INTLTOOL_MSGFMT@ INTLTOOL_MSGMERGE = @INTLTOOL_MSGMERGE@ INTLTOOL_OAF_RULE = @INTLTOOL_OAF_RULE@ INTLTOOL_PERL = @INTLTOOL_PERL@ INTLTOOL_PONG_RULE = @INTLTOOL_PONG_RULE@ INTLTOOL_PROP_RULE = @INTLTOOL_PROP_RULE@ INTLTOOL_SCHEMAS_RULE = @INTLTOOL_SCHEMAS_RULE@ INTLTOOL_SERVER_RULE = @INTLTOOL_SERVER_RULE@ INTLTOOL_SHEET_RULE = @INTLTOOL_SHEET_RULE@ INTLTOOL_SOUNDLIST_RULE = @INTLTOOL_SOUNDLIST_RULE@ INTLTOOL_THEME_RULE = @INTLTOOL_THEME_RULE@ INTLTOOL_UI_RULE = @INTLTOOL_UI_RULE@ INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ INTLTOOL_XAM_RULE = @INTLTOOL_XAM_RULE@ INTLTOOL_XGETTEXT = @INTLTOOL_XGETTEXT@ INTLTOOL_XML_NOMERGE_RULE = @INTLTOOL_XML_NOMERGE_RULE@ INTLTOOL_XML_RULE = @INTLTOOL_XML_RULE@ JPEG_LIB = @JPEG_LIB@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBXML_CFLAGS = @LIBXML_CFLAGS@ LIBXML_LIBS = @LIBXML_LIBS@ LIRC_LIB = @LIRC_LIB@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAKEINFO = @MAKEINFO@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ NEED_ZSFB_FALSE = @NEED_ZSFB_FALSE@ NEED_ZSFB_TRUE = @NEED_ZSFB_TRUE@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_CFLAGS = @PACKAGE_CFLAGS@ PACKAGE_LIBS = @PACKAGE_LIBS@ PACKAGE_LIB_DIR = @PACKAGE_LIB_DIR@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_PIXMAPS_DIR = @PACKAGE_PIXMAPS_DIR@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PACKAGE_VERSION_ID = @PACKAGE_VERSION_ID@ PATH_SEPARATOR = @PATH_SEPARATOR@ PG_CFLAGS = @PG_CFLAGS@ PKG_CONFIG = @PKG_CONFIG@ PLUGIN_DEFAULT_DIR = @PLUGIN_DEFAULT_DIR@ PLUGIN_DEFAULT_FLAGS = @PLUGIN_DEFAULT_FLAGS@ PNG_LIBS = @PNG_LIBS@ POFILES = @POFILES@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ PYTHON_LIBS = @PYTHON_LIBS@ PY_CFLAGS = @PY_CFLAGS@ PY_EXTRA_LIBS = @PY_EXTRA_LIBS@ PY_LIBS = @PY_LIBS@ PY_LIB_LOC = @PY_LIB_LOC@ RANLIB = @RANLIB@ RTE_LIBS = @RTE_LIBS@ SCROLLKEEPER_BUILD_REQUIRED = @SCROLLKEEPER_BUILD_REQUIRED@ SCROLLKEEPER_CONFIG = @SCROLLKEEPER_CONFIG@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ SUID_ZSFB_FALSE = @SUID_ZSFB_FALSE@ SUID_ZSFB_TRUE = @SUID_ZSFB_TRUE@ UNICODE_CFLAGS = @UNICODE_CFLAGS@ UNICODE_LIBS = @UNICODE_LIBS@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ WARN_CFLAGS = @WARN_CFLAGS@ XGETTEXT = @XGETTEXT@ XMLCATALOG = @XMLCATALOG@ XML_CATALOG_FILE = @XML_CATALOG_FILE@ XSLTPROC = @XSLTPROC@ X_CFLAGS = @X_CFLAGS@ X_DPMS_LIBS = @X_DPMS_LIBS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ X_XF86DGA_LIBS = @X_XF86DGA_LIBS@ X_XF86VMODE_LIBS = @X_XF86VMODE_LIBS@ X_XINERAMA_LIBS = @X_XINERAMA_LIBS@ X_XMU_LIBS = @X_XMU_LIBS@ X_XV_LIBS = @X_XV_LIBS@ ZSFB_GROUP = @ZSFB_GROUP@ ZSFB_OWNER = @ZSFB_OWNER@ ZVBI_CFLAGS = @ZVBI_CFLAGS@ ZVBI_LIBS = @ZVBI_LIBS@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_STRIP = @ac_ct_STRIP@ ac_pt_PKG_CONFIG = @ac_pt_PKG_CONFIG@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ datadir = @datadir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ python_val = @python_val@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ noinst_LTLIBRARIES = libvbi.la BUILT_SOURCES = \ wstfont2.xbm \ ccfont3.xbm MAINTAINERCLEANFILES = \ fontgen EXTRA_DIST = \ $(BUILT_SOURCES) \ fontgen.c \ wstfont2.pbm \ ccfont3.pbm # ZAPPING8: this is only a subset of libzvbi 0.3, compile accordingly. AM_CFLAGS = \ -D_GNU_SOURCE \ -D_REENTRANT \ -DZAPPING8 \ $(UNICODE_CFLAGS) INCLUDES = -I$(top_srcdir) libvbi_la_SOURCES = \ bcd.c bcd.h \ cache.c cache.h cache-priv.h \ caption_decoder.c caption_decoder.h caption_decoder-priv.h \ conv.c conv.h \ dlist.h \ event.c event.h event-priv.h \ exp-gfx.c exp-gfx.h wstfont2.xbm \ exp-html.c \ exp-sub.c \ exp-txt.c exp-txt.h \ exp-vtx.c \ export.c export.h export-priv.h \ hamm.c hamm.h \ image_format.c image_format.h \ lang.c lang.h \ link.c link.h \ macros.h \ misc.c misc.h \ network.c network.h network-table.h \ packet-830.c packet-830.h \ page.h page-priv.h \ pdc.h \ sampling_par.h \ search.c search.h \ sliced.h \ teletext.c \ teletext_decoder.c teletext_decoder-priv.h teletext_decoder.h \ top_title.c top_title.h \ ure.c ure.h \ vbi_decoder.c vbi_decoder.h vbi_decoder-priv.h \ vps.c vps.h \ vt.h all: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu libvbi/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu libvbi/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libvbi.la: $(libvbi_la_OBJECTS) $(libvbi_la_DEPENDENCIES) $(LINK) $(libvbi_la_LDFLAGS) $(libvbi_la_OBJECTS) $(libvbi_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bcd.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cache.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/caption_decoder.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/conv.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/event.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/exp-gfx.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/exp-html.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/exp-sub.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/exp-txt.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/exp-vtx.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/export.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hamm.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/image_format.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lang.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/link.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/misc.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/network.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/packet-830.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/search.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/teletext.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/teletext_decoder.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/top_title.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ure.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vbi_decoder.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vps.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool uninstall-info-am: ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) check-am all-am: Makefile $(LTLIBRARIES) installdirs: install: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-libtool distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-exec-am: install-info: install-info-am install-man: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-info-am .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLTLIBRARIES ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-exec \ install-exec-am install-info install-info-am install-man \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags uninstall uninstall-am \ uninstall-info-am exp-gfx.$(OBJEXT): wstfont2.xbm ccfont3.xbm @MAINTAINER_MODE_TRUE@wstfont2.xbm: wstfont2.pbm Makefile.am fontgen$(EXEEXT) @MAINTAINER_MODE_TRUE@ $(top_builddir)/libvbi/fontgen$(EXEEXT) xbm wstfont2 10 < $< > $@ @MAINTAINER_MODE_TRUE@ccfont3.xbm: ccfont3.pbm Makefile.am fontgen$(EXEEXT) @MAINTAINER_MODE_TRUE@ $(top_builddir)/libvbi/fontgen$(EXEEXT) xbm ccfont3 13 < $< > $@ # Must prevent link conflict with libzvbi 0.2. great_rename: for file in *.c *.h; do \ sed "s/vbi_/vbi3_/g;s/VBI_/VBI3_/g" <$$file >tmp; \ mv tmp $$file; \ done # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: zapping-0.10cvs6/libvbi/search.c 644 764 144 43440 10260120366 11706 /* * libzvbi - Teletext page cache search functions * * Copyright (C) 2000, 2001, 2002, 2003, 2004 Michael H. Schimek * Copyright (C) 2000, 2001 Iaki G. Etxebarria * * Based on code from AleVT 1.5.1 * Copyright (C) 1998, 1999 Edgar Toernig * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* $Id: search.c,v 1.27 2005/06/28 00:59:34 mschimek Exp $ */ #ifdef HAVE_CONFIG_H # include "config.h" #endif #include /* malloc() */ #include //#include //#include //#include "lang.h" //#include "cache.h" #include "search.h" #include "ure.h" #include "conv.h" //#include "teletext_decoder-priv.h" #include "page-priv.h" //#include "misc.h" /** * @addtogroup Search * @ingroup Cache * @brief Search the Teletext page cache. */ #if defined(HAVE_GLIBC21) || defined(HAVE_LIBUNICODE) struct _vbi3_search { vbi3_cache * cache; cache_network * network; vbi3_pgno start_pgno; vbi3_subno start_subno; vbi3_pgno stop_pgno[2]; vbi3_subno stop_subno[2]; int row[2]; int col[2]; int dir; vbi3_search_progress_cb *progress; void * user_data; vbi3_page_priv pgp; va_list format_options; ure_buffer_t ub; ure_dfa_t ud; ucs2_t haystack[25 * (40 + 1) + 1]; }; #define SEPARATOR 0x000A #define FIRST_ROW 1 #define LAST_ROW 24 static void highlight (vbi3_search * s, const cache_page * cp, ucs2_t * first, long ms, long me) { vbi3_page *pg; ucs2_t *hp; int i, j; pg = &s->pgp.pg; hp = s->haystack; s->start_pgno = cp->pgno; s->start_subno = cp->subno; s->row[0] = LAST_ROW + 1; s->col[0] = 0; for (i = FIRST_ROW; i < LAST_ROW; i++) { vbi3_char *cp; cp = &pg->text[i * pg->columns]; for (j = 0; j < 40; ++j) { int offset = hp - first; if (offset >= me) { s->row[0] = i; s->col[0] = j; return; } if (offset < ms) { if (39 == j) { s->row[1] = i + 1; s->col[1] = 0; } else { s->row[1] = i; s->col[1] = j + 1; } } switch (cp->size) { case VBI3_DOUBLE_SIZE: if (offset >= ms) { cp[pg->columns].foreground = 32 + VBI3_BLACK; cp[pg->columns].background = 32 + VBI3_YELLOW; cp[pg->columns + 1].foreground = 32 + VBI3_BLACK; cp[pg->columns + 1].background = 32 + VBI3_YELLOW; } /* fall through */ case VBI3_DOUBLE_WIDTH: if (offset >= ms) { cp[0].foreground = 32 + VBI3_BLACK; cp[0].background = 32 + VBI3_YELLOW; cp[1].foreground = 32 + VBI3_BLACK; cp[1].background = 32 + VBI3_YELLOW; } ++hp; ++cp; ++j; break; case VBI3_DOUBLE_HEIGHT: if (offset >= ms) { cp[pg->columns].foreground = 32 + VBI3_BLACK; cp[pg->columns].background = 32 + VBI3_YELLOW; } /* fall through */ case VBI3_NORMAL_SIZE: if (offset >= ms) { cp[0].foreground = 32 + VBI3_BLACK; cp[0].background = 32 + VBI3_YELLOW; } ++hp; break; default: /* skipped */ /* ++hp; */ break; } ++cp; } ++hp; } } static int search_page_fwd (cache_page * cp, vbi3_bool wrapped, void * user_data) { vbi3_search *s = user_data; unsigned int here; unsigned int start; unsigned int stop; int row; ucs2_t *hp; ucs2_t *first; unsigned long ms; unsigned long me; int flags; int i; here = (cp->pgno << 16) + cp->subno; start = (s->start_pgno << 16) + s->start_subno; stop = (s->stop_pgno[0] << 16) + s->stop_subno[0]; if (start >= stop) { if (wrapped && here >= stop) return -1; /* all done, abort */ } else if (here < start || here >= stop) return -1; /* all done, abort */ if (cp->function != PAGE_FUNCTION_LOP) return 0; /* try next */ _vbi3_page_priv_destroy (&s->pgp); _vbi3_page_priv_init (&s->pgp); if (!_vbi3_page_priv_from_cache_page_va_list (&s->pgp, cp, s->format_options)) return -3; /* formatting error, abort */ if (s->progress) if (!s->progress (s, &s->pgp.pg, s->user_data)) { if (here != start) { s->start_pgno = cp->pgno; s->start_subno = cp->subno; s->row[0] = FIRST_ROW; s->row[1] = LAST_ROW + 1; s->col[0] = s->col[1] = 0; } return -2; /* canceled */ } /* To Unicode */ hp = s->haystack; first = hp; row = (here == start) ? s->row[0] : -1; flags = 0; if (row > LAST_ROW) return 0; /* try next page */ for (i = FIRST_ROW; i < LAST_ROW; i++) { vbi3_char *cp; int j; cp = &s->pgp.pg.text[i * s->pgp.pg.columns]; for (j = 0; j < 40; ++cp, ++j) { if (i == row && j <= s->col[0]) first = hp; if (cp->size == VBI3_DOUBLE_WIDTH || cp->size == VBI3_DOUBLE_SIZE) { /* "ZZAAPPZILLA" -> "ZAPZILLA" */ ++cp; /* skip left half */ ++j; } else if (cp->size > VBI3_DOUBLE_SIZE) { /* skip */ /* *hp++ = 0x0020; */ continue; } *hp++ = cp->unicode; flags = URE_NOTBOL; } *hp++ = SEPARATOR; flags = 0; } /* Search */ if (first >= hp) return 0; /* try next page */ if (0) fprintf (stderr, "exec: %x/%x; start %d,%d; %c%c%c...\n", cp->pgno, cp->subno, s->row[0], s->col[0], vbi3_printable (first[0]), vbi3_printable (first[1]), vbi3_printable (first[2])); if (!ure_exec (s->ud, flags, first, hp - first, &ms, &me)) return 0; /* try next page */ highlight (s, cp, first, ms, me); return 1; /* success, abort */ } static int search_page_rev (cache_page * cp, vbi3_bool wrapped, void * user_data) { vbi3_search *s = user_data; unsigned int here; unsigned int start; unsigned int stop; int row; unsigned long ms; unsigned long me; ucs2_t *hp; int flags; int i; here = (cp->pgno << 16) + cp->subno; start = (s->start_pgno << 16) + s->start_subno; stop = (s->stop_pgno[1] << 16) + s->stop_subno[1]; if (start <= stop) { if (wrapped && here <= stop) return -1; /* all done, abort */ } else if (here > start || here <= stop) return -1; /* all done, abort */ if (cp->function != PAGE_FUNCTION_LOP) return 0; /* try next page */ _vbi3_page_priv_destroy (&s->pgp); if (!_vbi3_page_priv_from_cache_page_va_list (&s->pgp, cp, s->format_options)) return -3; /* formatting error, abort */ if (s->progress) if (!s->progress (s, &s->pgp.pg, s->user_data)) { if (here != start) { s->start_pgno = cp->pgno; s->start_subno = cp->subno; s->row[0] = FIRST_ROW; s->row[1] = LAST_ROW + 1; s->col[0] = s->col[1] = 0; } return -2; /* canceled */ } /* To Unicode */ hp = s->haystack; row = (here == start) ? s->row[1] : 100; flags = 0; if (row < FIRST_ROW) goto break2; for (i = FIRST_ROW; i < LAST_ROW; i++) { vbi3_char *cp; int j; cp = &s->pgp.pg.text[i * s->pgp.pg.columns]; for (j = 0; j < 40; ++cp, ++j) { if (i == row && j >= s->col[1]) goto break2; if (cp->size == VBI3_DOUBLE_WIDTH || cp->size == VBI3_DOUBLE_SIZE) { /* "ZZAAPPZILLA" -> "ZAPZILLA" */ ++cp; /* skip left half */ ++j; } else if (cp->size > VBI3_DOUBLE_SIZE) { /* skip */ /* *hp++ = 0x0020; */ continue; } *hp++ = cp->unicode; flags = URE_NOTEOL; } *hp++ = SEPARATOR; flags = 0; } break2: if (hp <= s->haystack) return 0; /* try next page */ /* Search */ ms = 0; me = 0; for (i = 0; s->haystack + me < hp; ++i) { unsigned long ms1; unsigned long me1; if (0) fprintf (stderr, "exec: %x/%x; %d, %ld; '%c%c%c...'\n", cp->pgno, cp->subno, i, me, vbi3_printable (s->haystack[me + 0]), vbi3_printable (s->haystack[me + 1]), vbi3_printable (s->haystack[me + 2])); if (!ure_exec (s->ud, (me > 0) ? (flags | URE_NOTBOL) : flags, s->haystack + me, hp - s->haystack - me, &ms1, &me1)) break; ms = me + ms1; me = me + me1; } if (i == 0) return 0; /* try next page */ highlight (s, cp, s->haystack, ms, me); return 1; /* success, abort */ } /** * @param search Initialized search context. * @param pg Place to store the formatted (as with vbi3_fetch_vt_page()) * Teletext page containing the found pattern. Do not * call vbi3_unref_page() for this page. Also the page must not * be modified. See vbi3_search_status for semantics. * @param dir Search direction +1 forward or -1 backward. * @param format_options blah * * Find the next occurence of the search pattern. * * @return * vbi3_search_status. */ vbi3_search_status vbi3_search_next_va_list (vbi3_search * s, const vbi3_page ** pg, int dir, va_list format_options) { assert (NULL != s); assert (NULL != pg); *pg = NULL; dir = (dir > 0) ? +1 : -1; if (!s->dir) { s->dir = dir; if (dir > 0) { s->start_pgno = s->stop_pgno[0]; s->start_subno = s->stop_subno[0]; } else { s->start_pgno = s->stop_pgno[1]; s->start_subno = s->stop_subno[1]; } s->row[0] = FIRST_ROW; s->row[1] = LAST_ROW + 1; s->col[0] = s->col[1] = 0; } else if (dir != s->dir) { s->dir = dir; s->stop_pgno[0] = s->start_pgno; s->stop_subno[0] = (s->start_subno == VBI3_ANY_SUBNO) ? 0 : s->start_subno; s->stop_pgno[1] = s->start_pgno; s->stop_subno[1] = s->start_subno; } #ifdef __va_copy __va_copy (s->format_options, format_options); #else s->format_options = format_options; #endif switch (_vbi3_cache_foreach_page (s->cache, s->network, s->start_pgno, s->start_subno, dir, (dir > 0) ? search_page_fwd : search_page_rev, /* user_data */ s)) { case 1: *pg = &s->pgp.pg; return VBI3_SEARCH_SUCCESS; case 0: return VBI3_SEARCH_CACHE_EMPTY; case -1: s->dir = 0; return VBI3_SEARCH_NOT_FOUND; case -2: return VBI3_SEARCH_ABORTED; default: break; } return VBI3_SEARCH_ERROR; } vbi3_search_status vbi3_search_next (vbi3_search * search, const vbi3_page ** pg, int dir, ...) { vbi3_search_status s; va_list format_options; va_start (format_options, dir); s = vbi3_search_next_va_list (search, pg, dir, format_options); va_end (format_options); return s; } /** * @param search vbi3_search context. * * Delete the search context created by vbi3_search_new(). */ void vbi3_search_delete (vbi3_search * s) { if (NULL == s) return; if (s->ud) ure_dfa_free (s->ud); if (s->ub) ure_buffer_free (s->ub); _vbi3_page_priv_destroy (&s->pgp); if (s->network) cache_network_unref (s->network); if (s->cache) vbi3_cache_unref (s->cache); CLEAR (*s); vbi3_free (s); } static size_t ucs2_strlen (const uint16_t * s) { const uint16_t *s1; if (!s) return 0; s1 = s; while (*s) ++s; return s - s1; } /** * @param pgno * @param subno Page and subpage number of the first (forward) or * last (backward) page to visit. Optional @c VBI3_ANY_SUBNO. * @param pattern Unicode (UCS-2) search pattern. * @param pattern_size Number of characters (not bytes) in the pattern * buffer. * @param casefold Boolean, search case insensitive. * @param regexp Boolean, the search pattern is a regular expression. * @param progress A function called for each page scanned, can be * \c NULL. Shall return @c FALSE to abort the search. @a pg is valid * for display (e. g. @a pg->pgno), do not call * vbi3_unref_page() or modify this page. * @param user_data blah. * * Allocate a vbi3_search context and prepare for searching * the Teletext page cache. The context must be freed with * vbi3_search_delete(). * * Regular expression searching supports the standard set * of operators and constants, with these extensions: * * * * * * * * * * * *
\x....hexadecimal number of up to 4 digits
\X....hexadecimal number of up to 4 digits
\u....hexadecimal number of up to 4 digits
\U....hexadecimal number of up to 4 digits
:title:Unicode specific character class
:gfx:Teletext G1 or G3 graphics
:drcs:Teletext DRCS
\pN1,N2,...,NnCharacter properties class
\PN1,N2,...,NnNegated character properties class
* * * * * * * * * * * * * * * * * * * * *
NProperty
1alphanumeric
2alpha
3control
4digit
5graphical
6lowercase
7printable
8punctuation
9space
10uppercase
11hex digit
12title
13defined
14wide
15nonspacing
16Teletext G1 or G3 graphics
17Teletext DRCS
* * Character classes can contain literals, constants, and character * property classes. Example: [abc\U10A\p1,3,4]. Note double height * and size characters will match twice, on the upper and lower row, * and double width and size characters count as one (reducing the * line width) so one can find combinations of normal and enlarged * characters. * * @bug * In a multithreaded application the data service decoder may receive * and cache new pages during a search session. When these page numbers * have been visited already the pages are not searched. At a channel * switch (and in future at any time) pages can be removed from cache. * All this has yet to be addressed. * * @return * A vbi3_search context or @c NULL on error. */ vbi3_search * vbi3_search_ucs2_new (vbi3_cache * ca, const vbi3_network * nk, vbi3_pgno pgno, vbi3_subno subno, const uint16_t * pattern, unsigned long pattern_size, vbi3_bool casefold, vbi3_bool regexp, vbi3_search_progress_cb *progress, void * user_data) { vbi3_search *s; uint16_t *esc_pattern; assert (NULL != ca); assert (NULL != nk); assert (NULL != pattern); esc_pattern = NULL; if (0 == pattern_size) { return NULL; } if (!(s = vbi3_malloc (sizeof (*s)))) { error ("Out of memory (%u bytes)", sizeof (*s)); return NULL; } CLEAR (*s); s->cache = vbi3_cache_ref (ca); if (!(s->network = _vbi3_cache_get_network (ca, nk))) goto failure; _vbi3_page_priv_init (&s->pgp); s->progress = progress; s->user_data = user_data; if (!regexp) { unsigned int size; unsigned int i; unsigned int j; size = pattern_size * 2 * sizeof (*esc_pattern); if (!(esc_pattern = vbi3_malloc (size))) { error ("Out of memory (%u buffer)", size); goto failure; } j = 0; for (i = 0; i < pattern_size; ++i) { if (strchr ("!\"#$%&()*+,-./:;=?@[\\]^_{|}~", pattern[i])) esc_pattern[j++] = '\\'; esc_pattern[j++] = pattern[i]; } pattern = esc_pattern; pattern_size = j; } if (!(s->ub = ure_buffer_create ())) goto failure; if (!(s->ud = ure_compile (pattern, pattern_size, casefold, s->ub))) goto failure; vbi3_free (esc_pattern); esc_pattern = NULL; s->stop_pgno[0] = pgno; s->stop_subno[0] = (subno == VBI3_ANY_SUBNO) ? 0 : subno; if (subno <= 0) { s->stop_pgno[1] = (pgno <= 0x100) ? 0x8FF : pgno - 1; s->stop_subno[1] = 0x3F7E; } else { s->stop_pgno[1] = pgno; if ((subno & 0x7F) == 0) s->stop_subno[1] = (subno - 0x100) | 0x7E; else s->stop_subno[1] = subno - 1; } return s; failure: vbi3_free (esc_pattern); vbi3_search_delete (s); return NULL; } vbi3_search * vbi3_search_utf8_new (vbi3_cache * ca, const vbi3_network * nk, vbi3_pgno pgno, vbi3_subno subno, const char * pattern, vbi3_bool casefold, vbi3_bool regexp, vbi3_search_progress_cb *progress, void * user_data) { uint16_t *ucs2_pattern; vbi3_search *s; assert (NULL != pattern); ucs2_pattern = _vbi3_strdup_ucs2_utf8 (pattern); if (!ucs2_pattern) return NULL; s = vbi3_search_ucs2_new (ca, nk, pgno, subno, ucs2_pattern, ucs2_strlen (ucs2_pattern), casefold, regexp, progress, user_data); vbi3_free (ucs2_pattern); return s; } #else /* !HAVE_GLIBC21 && !HAVE_LIBUNICODE */ vbi3_search_status vbi3_search_next_va_list (vbi3_search * s, const vbi3_page ** pg, int dir, va_list format_options) { assert (NULL != s); assert (NULL != pg); return VBI3_SEARCH_ERROR; } vbi3_search_status vbi3_search_next (vbi3_search * s, const vbi3_page ** pg, int dir, ...) { assert (NULL != s); assert (NULL != pg); return VBI3_SEARCH_ERROR; } void vbi3_search_delete (vbi3_search * s) { assert (NULL == s); } vbi3_search * vbi3_search_ucs2_new (vbi3_cache * ca, const vbi3_network * nk, vbi3_pgno pgno, vbi3_subno subno, const uint16_t * pattern, unsigned long pattern_size, vbi3_bool casefold, vbi3_bool regexp, vbi3_search_progress_cb *progress, void * user_data) { return NULL; } vbi3_search * vbi3_search_utf8_new (vbi3_cache * ca, const vbi3_network * nk, vbi3_pgno pgno, vbi3_subno subno, const char * pattern, vbi3_bool casefold, vbi3_bool regexp, vbi3_search_progress_cb *progress, void * user_data) { return NULL; } #endif /* !HAVE_GLIBC21 && !HAVE_LIBUNICODE */ zapping-0.10cvs6/libvbi/search.h 644 764 144 7670 10260120400 11665 /* * libzvbi - Teletext page cache search functions * * Copyright (C) 2000, 2001 Michael H. Schimek * * Based on code from AleVT 1.5.1 * Copyright (C) 1998, 1999 Edgar Toernig * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* $Id: search.h,v 1.5 2005/06/28 00:59:44 mschimek Exp $ */ #ifndef __ZVBI3_SEARCH_H__ #define __ZVBI3_SEARCH_H__ #include /* va_list */ #include "page.h" VBI3_BEGIN_DECLS /** * @ingroup Search * Return codes of the vbi3_search_next() function. */ typedef enum { /** * Some error occured, condition unclear. Call vbi3_search_delete(). */ VBI3_SEARCH_ERROR = -3, /** * No pages in the cache, @a pg is invalid. */ VBI3_SEARCH_CACHE_EMPTY, /** * The search has been aborted by the progress callback function. * @a pg points to the current page as in success case, except * no text is highlighted. Another vbi3_search_next() call * continues from this page. */ VBI3_SEARCH_ABORTED, /** * Pattern not found, @a pg is invalid. Another vbi3_search_next() * call restarts from the original starting point. */ VBI3_SEARCH_NOT_FOUND = 0, /** * Pattern found. @a pg points to the page ready for display with * the found pattern highlighted. */ VBI3_SEARCH_SUCCESS } vbi3_search_status; /** * @ingroup Search * @brief Search context. * * The contents of this structure are private. * * Call vbi3_search_new_ucs2() or vbi3_search_new_utf8() to * allocate a search context. */ typedef struct _vbi3_search vbi3_search; /** * @ingroup Search * @param search Search context passed to vbi3_search_next(). * @param pg Current page being searched, formatted as requested * with vbi3_search_next(). Do not modify or free this page, if * necessary you can call vbi3_page_copy(). * @param user_data User data pointer passed to vbi3_search_next(). * * Search progress callback function. * * @returns: * @c FALSE to abort the search, then vbi3_search_next() will return * @c VBI3_SEARCH_ABORTED. */ typedef vbi3_bool vbi3_search_progress_cb (vbi3_search * search, const vbi3_page * pg, void * user_data); /** * @addtogroup Search * @{ */ extern vbi3_search_status vbi3_search_next_va_list (vbi3_search * s, const vbi3_page ** pg, int dir, va_list format_options) __attribute__ ((_vbi3_nonnull (1, 2))); extern vbi3_search_status vbi3_search_next (vbi3_search * s, const vbi3_page ** pg, int dir, ...) __attribute__ ((_vbi3_nonnull (1, 2), _vbi3_sentinel)); extern void vbi3_search_delete (vbi3_search * s); extern vbi3_search * vbi3_search_ucs2_new (vbi3_cache * ca, const vbi3_network * nk, vbi3_pgno pgno, vbi3_subno subno, const uint16_t * pattern, unsigned long pattern_size, vbi3_bool casefold, vbi3_bool regexp, vbi3_search_progress_cb *progress, void * user_data) __attribute__ ((malloc, _vbi3_nonnull (1, 2, 5))); extern vbi3_search * vbi3_search_utf8_new (vbi3_cache * ca, const vbi3_network * nk, vbi3_pgno pgno, vbi3_subno subno, const char * pattern, vbi3_bool casefold, vbi3_bool regexp, vbi3_search_progress_cb *progress, void * user_data) __attribute__ ((malloc, _vbi3_nonnull (1, 2, 5))); /** @} */ VBI3_END_DECLS #endif /* __ZVBI3_CACHE_H__ */ zapping-0.10cvs6/libvbi/lang.c 644 764 144 64217 10173357562 11404 /* * libzvbi - Teletext and Closed Caption character set * * Copyright (C) 2000, 2001, 2002, 2003 Michael H. Schimek * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. * * 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 this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* $Id: lang.c,v 1.23 2005/01/19 04:17:54 mschimek Exp $ */ #ifdef HAVE_CONFIG_H # include "config.h" #endif #include #include /* uint8_t, uint16_t */ #include /* FILE */ #include /* exit() */ #include "misc.h" /* N_ELEMENTS() */ #include "lang.h" #define UNUSED(n) { n, 0, 0, 0, { NULL, } } /* Teletext character set designation defined in ETS 300 706 Table 32, 33, 34 */ static const vbi3_character_set character_set_table [88] = { { 0, VBI3_CHARSET_LATIN_G0, VBI3_CHARSET_LATIN_G2, VBI3_SUBSET_ENGLISH, { "en", } }, { 1, VBI3_CHARSET_LATIN_G0, VBI3_CHARSET_LATIN_G2, VBI3_SUBSET_GERMAN, { "de", } }, { 2, VBI3_CHARSET_LATIN_G0, VBI3_CHARSET_LATIN_G2, VBI3_SUBSET_SWEDISH_FINNISH_HUNGARIAN, { "sv", "fi", "hu", } }, { 3, VBI3_CHARSET_LATIN_G0, VBI3_CHARSET_LATIN_G2, VBI3_SUBSET_ITALIAN, { "it", } }, { 4, VBI3_CHARSET_LATIN_G0, VBI3_CHARSET_LATIN_G2, VBI3_SUBSET_FRENCH, { "fr", } }, { 5, VBI3_CHARSET_LATIN_G0, VBI3_CHARSET_LATIN_G2, VBI3_SUBSET_PORTUGUESE_SPANISH, { "es", "pt", } }, { 6, VBI3_CHARSET_LATIN_G0, VBI3_CHARSET_LATIN_G2, VBI3_SUBSET_CZECH_SLOVAK, { "cs", "sk", } }, { 7, VBI3_CHARSET_LATIN_G0, VBI3_CHARSET_LATIN_G2, VBI3_SUBSET_NONE, { "en", } }, { 8, VBI3_CHARSET_LATIN_G0, VBI3_CHARSET_LATIN_G2, VBI3_SUBSET_POLISH, { "pl", } }, { 9, VBI3_CHARSET_LATIN_G0, VBI3_CHARSET_LATIN_G2, VBI3_SUBSET_GERMAN, { "de", } }, { 10, VBI3_CHARSET_LATIN_G0, VBI3_CHARSET_LATIN_G2, VBI3_SUBSET_SWEDISH_FINNISH_HUNGARIAN, { "sv", "fi", "hu", } }, { 11, VBI3_CHARSET_LATIN_G0, VBI3_CHARSET_LATIN_G2, VBI3_SUBSET_ITALIAN, { "it", } }, { 12, VBI3_CHARSET_LATIN_G0, VBI3_CHARSET_LATIN_G2, VBI3_SUBSET_FRENCH, { "fr", } }, { 13, VBI3_CHARSET_LATIN_G0, VBI3_CHARSET_LATIN_G2, VBI3_SUBSET_NONE, { "en", } }, { 14, VBI3_CHARSET_LATIN_G0, VBI3_CHARSET_LATIN_G2, VBI3_SUBSET_CZECH_SLOVAK, { "cs", "sk", } }, { 15, VBI3_CHARSET_LATIN_G0, VBI3_CHARSET_LATIN_G2, VBI3_SUBSET_NONE, { "en", } }, { 16, VBI3_CHARSET_LATIN_G0, VBI3_CHARSET_LATIN_G2, VBI3_SUBSET_ENGLISH, { "en", } }, { 17, VBI3_CHARSET_LATIN_G0, VBI3_CHARSET_LATIN_G2, VBI3_SUBSET_GERMAN, { "de", } }, { 18, VBI3_CHARSET_LATIN_G0, VBI3_CHARSET_LATIN_G2, VBI3_SUBSET_SWEDISH_FINNISH_HUNGARIAN, { "sv", "fi", "hu", } }, { 19, VBI3_CHARSET_LATIN_G0, VBI3_CHARSET_LATIN_G2, VBI3_SUBSET_ITALIAN, { "it", } }, { 20, VBI3_CHARSET_LATIN_G0, VBI3_CHARSET_LATIN_G2, VBI3_SUBSET_FRENCH, { "fr", } }, { 21, VBI3_CHARSET_LATIN_G0, VBI3_CHARSET_LATIN_G2, VBI3_SUBSET_PORTUGUESE_SPANISH, { "es", "pt", } }, { 22, VBI3_CHARSET_LATIN_G0, VBI3_CHARSET_LATIN_G2, VBI3_SUBSET_TURKISH, { "tr", } }, { 23, VBI3_CHARSET_LATIN_G0, VBI3_CHARSET_LATIN_G2, VBI3_SUBSET_NONE, { "en", } }, { 24, VBI3_CHARSET_LATIN_G0, VBI3_CHARSET_LATIN_G2, VBI3_SUBSET_NONE, { "en", } }, { 25, VBI3_CHARSET_LATIN_G0, VBI3_CHARSET_LATIN_G2, VBI3_SUBSET_NONE, { "en", } }, { 26, VBI3_CHARSET_LATIN_G0, VBI3_CHARSET_LATIN_G2, VBI3_SUBSET_NONE, { "en", } }, { 27, VBI3_CHARSET_LATIN_G0, VBI3_CHARSET_LATIN_G2, VBI3_SUBSET_NONE, { "en", } }, { 28, VBI3_CHARSET_LATIN_G0, VBI3_CHARSET_LATIN_G2, VBI3_SUBSET_NONE, { "en", } }, { 29, VBI3_CHARSET_LATIN_G0, VBI3_CHARSET_LATIN_G2, VBI3_SUBSET_SERBIAN_CROATIAN_SLOVENIAN, { "sr", "hr", "sl", } }, { 30, VBI3_CHARSET_LATIN_G0, VBI3_CHARSET_LATIN_G2, VBI3_SUBSET_NONE, { "en", } }, { 31, VBI3_CHARSET_LATIN_G0, VBI3_CHARSET_LATIN_G2, VBI3_SUBSET_RUMANIAN, { "ro", } }, { 32, VBI3_CHARSET_CYRILLIC1_G0, VBI3_CHARSET_CYRILLIC_G2, VBI3_SUBSET_NONE, { "sr", "hr", "sl", } }, { 33, VBI3_CHARSET_LATIN_G0, VBI3_CHARSET_LATIN_G2, VBI3_SUBSET_GERMAN, { "de", } }, { 34, VBI3_CHARSET_LATIN_G0, VBI3_CHARSET_LATIN_G2, VBI3_SUBSET_ESTONIAN, { "et", } }, { 35, VBI3_CHARSET_LATIN_G0, VBI3_CHARSET_LATIN_G2, VBI3_SUBSET_LETTISH_LITHUANIAN, { "lv", "lt", } }, { 36, VBI3_CHARSET_CYRILLIC2_G0, VBI3_CHARSET_CYRILLIC_G2, VBI3_SUBSET_NONE, { "ru", "bg", } }, { 37, VBI3_CHARSET_CYRILLIC3_G0, VBI3_CHARSET_CYRILLIC_G2, VBI3_SUBSET_NONE, { "uk", } }, { 38, VBI3_CHARSET_LATIN_G0, VBI3_CHARSET_LATIN_G2, VBI3_SUBSET_CZECH_SLOVAK, { "cs", "sk", } }, UNUSED (39), UNUSED (40), UNUSED (41), UNUSED (42), UNUSED (43), UNUSED (44), UNUSED (45), UNUSED (46), UNUSED (47), UNUSED (48), UNUSED (49), UNUSED (50), UNUSED (51), UNUSED (52), UNUSED (53), { 54, VBI3_CHARSET_LATIN_G0, VBI3_CHARSET_LATIN_G2, VBI3_SUBSET_TURKISH, { "tr", } }, { 55, VBI3_CHARSET_GREEK_G0, VBI3_CHARSET_GREEK_G2, VBI3_SUBSET_NONE, { "el", } }, UNUSED (56), UNUSED (57), UNUSED (58), UNUSED (59), UNUSED (60), UNUSED (61), UNUSED (62), UNUSED (63), { 64, VBI3_CHARSET_LATIN_G0, VBI3_CHARSET_ARABIC_G2, VBI3_SUBSET_ENGLISH, { "ar", "en", } }, UNUSED (65), UNUSED (66), UNUSED (67), { 68, VBI3_CHARSET_LATIN_G0, VBI3_CHARSET_ARABIC_G2, VBI3_SUBSET_FRENCH, { "ar", "fr", } }, UNUSED (69), UNUSED (70), { 71, VBI3_CHARSET_ARABIC_G0, VBI3_CHARSET_ARABIC_G2, VBI3_SUBSET_NONE, { "ar", } }, UNUSED (72), UNUSED (73), UNUSED (74), UNUSED (75), UNUSED (76), UNUSED (77), UNUSED (78), UNUSED (79), UNUSED (80), UNUSED (81), UNUSED (82), UNUSED (83), UNUSED (84), { 85, VBI3_CHARSET_HEBREW_G0, VBI3_CHARSET_ARABIC_G2, VBI3_SUBSET_NONE, { "he", } }, UNUSED (86), { 87, VBI3_CHARSET_ARABIC_G0, VBI3_CHARSET_ARABIC_G2, VBI3_SUBSET_NONE, { "ar", } }, }; const vbi3_character_set * vbi3_character_set_from_code (vbi3_charset_code code) { const vbi3_character_set *cs; if (code >= N_ELEMENTS (character_set_table)) return NULL; cs = character_set_table + code; if (0 == cs->g0 || 0 == cs->g2) return NULL; return cs; } /* * Teletext character set */ /* These characters mimic block mosaic, smooth mosaic or line drawing character patterns. */ static const uint8_t ascii_art [] = { /* 2 */ ' ', '\'','`','\"','-', '|', '/', '/', '-', '\\','|', '\\','-', '\\','/', '#', /* 3 */ '.', ':', ':', ':', '|', '|', '/', '/', '/', '>', '/', '>', '/', '+', '\\','#', /* 2 */ ' ', '\'','`','\"','-', '|', '/', '/', '-', '\\','|', '\\','-', '\\','/', '#', /* 3 */ '.', ':', ':', ':', '|', '|', '/', '/', '/', '>', '/', '>', '/', '+', '\\','#', /* 6 */ '.', ':', ':', ':', '\\','\\','<', '/', '|', '\\','|', '\\','\\','/', '+', '#', /* 7 */ '_', ':', ':', '=', '\\','\\','<', '[', '/', '>', '/', ']', '#', '#', '#', '#', /* 6 */ '.', ':', ':', ':', '\\','\\','<', '/', '|', '\\','|', '\\','\\','/', '+', '#', /* 7 */ '_', ':', ':', '=', '\\','\\','<', '[', '/', '>', '/', ']', '#', '#', '#', '#', /* 2 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 3 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 4 */ 0x2B, 0x2B, 0x2B, 0x2B, 0x3C, 0x3E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2B, 0x2A, 0x2A, 0x6F, /* 5 */ 0x7C, 0x2D, 0x2B, 0x2B, 0x2B, 0x2B, 0x2B, 0x2B, 0x2B, 0x2B, 0x2B, 0x3E, 0x3C, 0x00, 0x00, 0x00, /* 6 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 7 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; unsigned int _vbi3_teletext_ascii_art (unsigned int c) { if (c >= 0xEE00 && c < (0xEE00 + N_ELEMENTS (ascii_art))) if (ascii_art[c - 0xEE00]) return ascii_art[c - 0xEE00]; return c; } /* ETS 300 706 Table 36: Latin National Option Sub-sets Latin G0 character code to Unicode mapping per national subset, unmodified codes (VBI3_SUBSET_NONE) in row zero. */ static const uint16_t national_subset[14][13] = { { 0x0023, 0x0024, 0x0040, 0x005B, 0x005C, 0x005D, 0x005E, 0x005F, 0x0060, 0x007B, 0x007C, 0x007D, 0x007E }, /* Replaced by: */ { 0x0023, 0x016F, 0x010D, 0x0165, 0x017E, 0x00FD, 0x00ED, 0x0159, 0x00E9, 0x00E1, 0x011B, 0x00FA, 0x0161 }, { 0x00A3, 0x0024, 0x0040, 0x2190, 0x00BD, 0x2192, 0x2191, 0x0023, 0x2014, 0x00BC, 0x2016, 0x00BE, 0x00F7 }, { 0x0023, 0x00F5, 0x0160, 0x00C4, 0x00D6, 0x017D, 0x00DC, 0x00D5, 0x0161, 0x00E4, 0x00F6, 0x017E, 0x00FC }, { 0x00E9, 0x00EF, 0x00E0, 0x00EB, 0x00EA, 0x00F9, 0x00EE, 0x0023, 0x00E8, 0x00E2, 0x00F4, 0x00FB, 0x00E7 }, { 0x0023, 0x0024, 0x00A7, 0x00C4, 0x00D6, 0x00DC, 0x005E, 0x005F, 0x00B0, 0x00E4, 0x00F6, 0x00FC, 0x00DF }, { 0x00A3, 0x0024, 0x00E9, 0x00B0, 0x00E7, 0x2192, 0x2191, 0x0023, 0x00F9, 0x00E0, 0x00F2, 0x00E8, 0x00EC }, { 0x0023, 0x0024, 0x0160, 0x0117, 0x0229, 0x017D, 0x010D, 0x016B, 0x0161, 0x0105, 0x0173, 0x017E, 0x012F }, { 0x0023, 0x0144, 0x0105, 0x01B5, 0x015A, 0x0141, 0x0107, 0x00F3, 0x0119, 0x017C, 0x015B, 0x0142, 0x017A }, { 0x00E7, 0x0024, 0x00A1, 0x00E1, 0x00E9, 0x00ED, 0x00F3, 0x00FA, 0x00BF, 0x00FC, 0x00F1, 0x00E8, 0x00E0 }, { 0x0023, 0x00A4, 0x0162, 0x00C2, 0x015E, 0x01CD, 0x00CD, 0x0131, 0x0163, 0x00E2, 0x015F, 0X01CE, 0x00EE }, { 0x0023, 0x00CB, 0x010C, 0x0106, 0x017D, 0x00D0, 0x0160, 0x00EB, 0x010D, 0x0107, 0x017E, 0x00F0, 0x0161 }, { 0x0023, 0x00A4, 0x00C9, 0x00C4, 0x00D6, 0x00C5, 0x00DC, 0x005F, 0x00E9, 0x00E4, 0x00F6, 0x00E5, 0x00FC }, { 0x20A4, 0x011F, 0x0130, 0x015E, 0x00D6, 0x00C7, 0x00DC, 0x011E, 0x0131, 0x015F, 0x00F6, 0x00E7, 0x00FC } }; /* ETS 300 706 Table 37: Latin G2 Supplementary Set 0x49 seems to be dot below; not in Unicode (except combining), use 0x002E instead. */ static const uint16_t latin_g2 [96] = { 0x00A0, 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, 0x02CB, 0x02CA, 0x02C6, 0x02DC, 0x02C9, 0x02D8, 0x02D9, 0x00A8, 0x002E, 0x02DA, 0x02CF, 0x02CD, 0x02DD, 0x02DB, 0x02C7, 0x2014, 0x00B9, 0x00AE, 0x00A9, 0x2122, 0x266A, 0x20A0, 0x2030, 0x0251, 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 }; /* ETS 300 706 Table 38: Cyrillic G0 Primary Set - Option 1 - Serbian/Croatian */ static const uint16_t cyrillic1_g0 [64] = { 0x0427, 0x0410, 0x0411, 0x0426, 0x0414, 0x0415, 0x0424, 0x0413, 0x0425, 0x0418, 0x0408, 0x041A, 0x041B, 0x041C, 0x041D, 0x041E, 0x041F, 0x040C, 0x0420, 0x0421, 0x0422, 0x0423, 0x0412, 0x0403, 0x0409, 0x040A, 0x0417, 0x040B, 0x0416, 0x0402, 0x0428, 0x040F, 0x0447, 0x0430, 0x0431, 0x0446, 0x0434, 0x0435, 0x0444, 0x0433, 0x0445, 0x0438, 0x0458, 0x043A, 0x043B, 0x043C, 0x043D, 0x043E, 0x043F, 0x045C, 0x0440, 0x0441, 0x0442, 0x0443, 0x0432, 0x0453, 0x0459, 0x045A, 0x0437, 0x045B, 0x0436, 0x0452, 0x0448, 0x25A0 }; /* ETS 300 706 Table 39: Cyrillic G0 Primary Set - Option 2 - Russian/Bulgarian */ static const uint16_t cyrillic2_g0 [64] = { 0x042E, 0x0410, 0x0411, 0x0426, 0x0414, 0x0415, 0x0424, 0x0413, 0x0425, 0x0418, 0x040D, 0x041A, 0x041B, 0x041C, 0x041D, 0x041E, 0x041F, 0x042F, 0x0420, 0x0421, 0x0422, 0x0423, 0x0416, 0x0412, 0x042C, 0x042A, 0x0417, 0x0428, 0x042D, 0x0429, 0x0427, 0x042B, 0x044E, 0x0430, 0x0431, 0x0446, 0x0434, 0x0435, 0x0444, 0x0433, 0x0445, 0x0438, 0x045D, 0x043A, 0x043B, 0x043C, 0x043D, 0x043E, 0x043F, 0x044F, 0x0440, 0x0441, 0x0442, 0x0443, 0x0436, 0x0432, 0x044C, 0x044A, 0x0437, 0x0448, 0x044D, 0x0449, 0x0447, 0x25A0 }; /* ETS 300 706 Table 40: Cyrillic G0 Primary Set - Option 3 - Ukrainian */ static const uint16_t cyrillic3_g0 [64] = { 0x042E, 0x0410, 0x0411, 0x0426, 0x0414, 0x0415, 0x0424, 0x0413, 0x0425, 0x0418, 0x040D, 0x041A, 0x041B, 0x041C, 0x041D, 0x041E, 0x041F, 0x042F, 0x0420, 0x0421, 0x0422, 0x0423, 0x0416, 0x0412, 0x042C, 0x0406, 0x0417, 0x0428, 0x0404, 0x0429, 0x0427, 0x0407, 0x044E, 0x0430, 0x0431, 0x0446, 0x0434, 0x0435, 0x0444, 0x0433, 0x0445, 0x0438, 0x045D, 0x043A, 0x043B, 0x043C, 0x043D, 0x043E, 0x043F, 0x044F, 0x0440, 0x0441, 0x0442, 0x0443, 0x0436, 0x0432, 0x044C, 0x0456, 0x0437, 0x0448, 0x0454, 0x0449, 0x0447, 0x25A0 }; /* ETS 300 706 Table 41: Cyrillic G2 Supplementary Set */ static const uint16_t cyrillic_g2 [96] = { 0x00A0, 0x00A1, 0x00A2, 0x00A3, 0x0020, 0x00A5, 0x0023, 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, 0x02CB, 0x02CA, 0x02C6, 0x02DC, 0x02C9, 0x02D8, 0x02D9, 0x00A8, 0x002E, 0x02DA, 0x02CF, 0x02CD, 0x02DD, 0x02DB, 0x02C7, 0x2014, 0x00B9, 0x00AE, 0x00A9, 0x2122, 0x266A, 0x20A0, 0x2030, 0x0251, 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 }; /* ETS 300 706 Table 42: Greek G0 Primary Set */ static const uint16_t greek_g0 [64] = { 0x0390, 0x0391, 0x0392, 0x0393, 0x0394, 0x0395, 0x0396, 0x0397, 0x0398, 0x0399, 0x039A, 0x039B, 0x039C, 0x039D, 0x039E, 0x039F, 0x03A0, 0x03A1, 0x0374, 0x03A3, 0x03A4, 0x03A5, 0x03A6, 0x03A7, 0x03A8, 0x03A9, 0x03AA, 0x03AB, 0x03AC, 0x03AD, 0x03AE, 0x03AF, 0x03B0, 0x03B1, 0x03B2, 0x03B3, 0x03B4, 0x03B5, 0x03B6, 0x03B7, 0x03B8, 0x03B9, 0x03BA, 0x03BB, 0x03BC, 0x03BD, 0x03BE, 0x03BF, 0x03C0, 0x03C1, 0x03C2, 0x03C3, 0x03C4, 0x03C5, 0x03C6, 0x03C7, 0x03C8, 0x03C9, 0x03CA, 0x03CB, 0x03CC, 0x03CD, 0x03CE, 0x25A0 }; /* ETS 300 706 Table 43: Greek G2 Supplementary Set */ static const uint16_t greek_g2 [96] = { 0x00A0, 0x0061, 0x0062, 0x00A3, 0x0065, 0x0068, 0x0069, 0x00A7, 0x003A, 0x2018, 0x201C, 0x006B, 0x2190, 0x2191, 0x2192, 0x2193, 0x00B0, 0x00B1, 0x00B2, 0x00B3, 0x0078, 0x006D, 0x006E, 0x0070, 0x00F7, 0x2019, 0x201D, 0x0074, 0x00BC, 0x00BD, 0x00BE, 0x0078, 0x0020, 0x02CB, 0x02CA, 0x02C6, 0x02DC, 0x02C9, 0x02D8, 0x02D9, 0x00A8, 0x002E, 0x02DA, 0x02CF, 0x02CD, 0x02DD, 0x02DB, 0x02C7, 0x003F, 0x00B9, 0x00AE, 0x00A9, 0x2122, 0x266A, 0x20A0, 0x2030, 0x0251, 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 }; /* ETS 300 706 Table 44: Arabic G0 Primary Set XXX 0X0000 is what? Until these tables are finished use private codes. */ static const uint16_t arabic_g0 [96] = { /* 0x0020, 0x0021, 0x0022, 0x00A3, 0x0024, 0x0025, 0x0000, 0x0000, 0x0029, 0x0028, 0x002A, 0x002B, 0x060C, 0x002D, 0x002E, 0x002F, 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, 0x0038, 0x0039, 0x003A, 0x061B, 0x003E, 0x003D, 0x003C, 0x061F, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0630, 0x0631, 0x0632, 0x0633, 0x0634, 0x0635, 0x0636, 0x0637, 0x0638, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0023, 0x0640, 0x0641, 0x0642, 0x0643, 0x0644, 0x0645, 0x0646, 0x0647, 0x0648, 0x0649, 0x064A, 0x062B, 0x062D, 0x062C, 0x062E, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x25A0 */ 0x0020, 0x0021, 0x0022, 0x00A3, 0x0024, 0x0025, 0xE606, 0xE607, 0x0029, 0x0028, 0x002A, 0x002B, 0x060C, 0x002D, 0x002E, 0x002F, 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, 0x0038, 0x0039, 0x003A, 0x061B, 0x003E, 0x003D, 0x003C, 0x061F, 0xE620, 0xE621, 0xE622, 0xE623, 0xE624, 0xE625, 0xE626, 0xE627, 0xE628, 0xE629, 0xE62A, 0xE62B, 0xE62C, 0xE62D, 0xE62E, 0xE62F, 0xE630, 0xE631, 0xE632, 0xE633, 0xE634, 0xE635, 0xE636, 0xE637, 0xE638, 0xE639, 0xE63A, 0xE63B, 0xE63C, 0xE63D, 0xE63E, 0x0023, 0xE640, 0xE641, 0xE642, 0xE643, 0xE644, 0xE645, 0xE646, 0xE647, 0xE648, 0xE649, 0xE64A, 0xE64B, 0xE64C, 0xE64D, 0xE64E, 0xE64F, 0xE650, 0xE651, 0xE652, 0xE653, 0xE654, 0xE655, 0xE656, 0xE657, 0xE658, 0xE659, 0xE65A, 0xE65B, 0xE65C, 0xE65D, 0xE65E, 0x25A0 }; /* ETS 300 706 Table 45: Arabic G2 Supplementary Set XXX 0X0000 is what? Until these tables are finished use private codes. */ static const uint16_t arabic_g2 [96] = { /* 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0660, 0x0661, 0x0662, 0x0663, 0x0664, 0x0665, 0x0666, 0x0667, 0x0668, 0x0669, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 */ 0xE660, 0xE661, 0xE662, 0xE663, 0xE664, 0xE665, 0xE666, 0xE667, 0xE668, 0xE669, 0xE66A, 0xE66B, 0xE66C, 0xE66D, 0xE66E, 0xE66F, 0xE670, 0xE671, 0xE672, 0xE673, 0xE674, 0xE675, 0xE676, 0xE677, 0xE678, 0xE679, 0xE67A, 0xE67B, 0xE67C, 0xE67D, 0xE67E, 0xE67F, 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, 0xE75F, 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, 0x0020 }; /* ETS 300 706 Table 46: Hebrew G0 Primary Set */ static const uint16_t hebrew_g0 [37] = { 0x2190, 0x00BD, 0x2192, 0x2191, 0x0023, 0x05D0, 0x05D1, 0x05D2, 0x05D3, 0x05D4, 0x05D5, 0x05D6, 0x05D7, 0x05D8, 0x05D9, 0x05DA, 0x05DB, 0x05DC, 0x05DD, 0x05DE, 0x05DF, 0x05E0, 0x05E1, 0x05E2, 0x05E3, 0x05E4, 0x05E5, 0x05E6, 0x05E7, 0x05E8, 0x05E9, 0x05EA, 0x20AA, 0x2016, 0x00BE, 0x00F7, 0x25A0 }; /** * @param charset Teletext character set as defined in ETS 300 706 section 15. * @param subset National character subset as defined in section 15, only * applicable to character set LATIN_G0, otherwise ignored. * @param c Character code in range 0x20 ... 0x7F. * * Translates Teletext character code to Unicode. * * Exceptions: * ETS 300 706 Table 36 Latin National Subset Turkish character * 0x23 Turkish currency symbol is not representable in Unicode, * translated to private code U+E800. Was unable to identify all * Arabic glyphs in Table 44 and 45 Arabic G0 and G2, these are * mapped to private code U+E620 ... U+E67F and U+E720 ... U+E77F * respectively. Table 47 G1 Block Mosaic is not representable * in Unicode, translated to private code U+EE00 ... U+EE7F. * (contiguous form has bit 5 set, separate form cleared). * Table 48 G3 Smooth Mosaics and Line Drawing Set is not * representable in Unicode, translated to private code U+EF20 * ... U+EF7F. * * Note that some Teletext character sets contain complementary * Latin characters. For example the Greek capital letters Alpha * and Beta are reused as Latin capital letter A and B, while a * separate code exists for Latin capital letter C. This function * is unable to distinguish between uses, so it will always translate * Greek A and B to Alpha and Beta, C to Latin C. * * Private codes U+F000 ... U+F7FF are reserved for DRCS. * * @return * Unicode value. */ unsigned int vbi3_teletext_unicode (vbi3_charset charset, vbi3_subset subset, unsigned int c) { assert (c >= 0x20 && c <= 0x7F); switch (charset) { case VBI3_CHARSET_LATIN_G0: /* Shortcut. */ if (0xF8000019UL & (1 << (c & 31))) { if (subset > 0) { unsigned int i; assert (subset < 14); for (i = 0; i < 13; ++i) if (c == national_subset[0][i]) return national_subset[subset][i]; } if (c == 0x24) return 0x00A4; else if (c == 0x7C) return 0x00A6; else if (c == 0x7F) return 0x25A0; } return c; case VBI3_CHARSET_LATIN_G2: return latin_g2[c - 0x20]; case VBI3_CHARSET_CYRILLIC1_G0: if (c < 0x40) return c; else return cyrillic1_g0[c - 0x40]; case VBI3_CHARSET_CYRILLIC2_G0: if (c == 0x26) return 0x044B; else if (c < 0x40) return c; else return cyrillic2_g0[c - 0x40]; case VBI3_CHARSET_CYRILLIC3_G0: if (c == 0x26) return 0x00EF; else if (c < 0x40) return c; else return cyrillic3_g0[c - 0x40]; case VBI3_CHARSET_CYRILLIC_G2: return cyrillic_g2[c - 0x20]; case VBI3_CHARSET_GREEK_G0: if (c == 0x3C) return 0x00AB; else if (c == 0x3E) return 0x00BB; else if (c < 0x40) return c; else return greek_g0[c - 0x40]; case VBI3_CHARSET_GREEK_G2: return greek_g2[c - 0x20]; case VBI3_CHARSET_ARABIC_G0: return arabic_g0[c - 0x20]; case VBI3_CHARSET_ARABIC_G2: return arabic_g2[c - 0x20]; case VBI3_CHARSET_HEBREW_G0: if (c < 0x5B) return c; else return hebrew_g0[c - 0x5B]; case VBI3_CHARSET_BLOCK_MOSAIC_G1: /* 0x20 ... 0x3F -> 0xEE00 ... 0xEE1F separated */ /* 0xEE20 ... 0xEE3F contiguous */ /* 0x60 ... 0x7F -> 0xEE40 ... 0xEE5F separated */ /* 0xEE60 ... 0xEE7F contiguous */ assert (c < 0x40 || c >= 0x60); return 0xEE00u + c; case VBI3_CHARSET_SMOOTH_MOSAIC_G3: return 0xEF00u + c; default: fprintf (stderr, "%s: unknown char set %d\n", __PRETTY_FUNCTION__, charset); exit (EXIT_FAILURE); } } /* Unicode 0x00C0 ... 0x017F to Teletext combining diacritical mark (((Latin G2 0x40 ... 0x4F) - 0x40) << 12) + Latin G0 */ static const uint16_t composed [12 * 16] = { 0x1041, 0x2041, 0x3041, 0x4041, 0x8041, 0xA041, 0x0000, 0xB043, 0x1045, 0x2045, 0x3045, 0x8045, 0x1049, 0x2049, 0x3049, 0x8049, 0x0000, 0x404E, 0x104F, 0x204F, 0x304F, 0x404F, 0x804F, 0x0000, 0x0000, 0x1055, 0x2055, 0x3055, 0x8055, 0x2059, 0x0000, 0x0000, 0x1061, 0x2061, 0x3061, 0x4061, 0x8061, 0xA061, 0x0000, 0xB063, 0x1065, 0x2065, 0x3065, 0x8065, 0x1069, 0x2069, 0x3069, 0x8069, 0x0000, 0x406E, 0x106F, 0x206F, 0x306F, 0x406F, 0x806F, 0x0000, 0x00F9, 0x1075, 0x2075, 0x3075, 0x8075, 0x2079, 0x0000, 0x8079, 0x5041, 0x5061, 0x6041, 0x6061, 0xE041, 0xE061, 0x2043, 0x2063, 0x3043, 0x3063, 0x7043, 0x7063, 0xF043, 0xF063, 0xF044, 0xF064, 0x0000, 0x0000, 0x5045, 0x5065, 0x6045, 0x6065, 0x7045, 0x7065, 0xE045, 0xE065, 0xF045, 0xF065, 0x3047, 0x3067, 0x6047, 0x6067, 0x7047, 0x7067, 0x0000, 0x0000, 0x3048, 0x3068, 0x0000, 0x0000, 0x4049, 0x4069, 0x5049, 0x5069, 0x6049, 0x6069, 0xE049, 0xE069, 0x7049, 0x0000, 0x0000, 0x0000, 0x304A, 0x306A, 0x0000, 0x0000, 0x0000, 0x204C, 0x2049, 0x0000, 0x0000, 0xF04C, 0xF06C, 0x0000, 0x0000, 0x0000, 0x0000, 0x204E, 0x206E, 0x0000, 0x0000, 0xF04E, 0xF06E, 0x0000, 0x0000, 0x0000, 0x504F, 0x506F, 0x604F, 0x606F, 0xD04F, 0xD06F, 0x0000, 0x0000, 0x2052, 0x2072, 0x0000, 0x0000, 0xF052, 0xF072, 0x2053, 0x2073, 0x3053, 0x3073, 0xB053, 0xB073, 0xF053, 0xF073, 0xB054, 0xB074, 0xF053, 0xF073, 0x0000, 0x0000, 0x4055, 0x4075, 0x5055, 0x5075, 0x6055, 0x6075, 0xA055, 0xA075, 0xD055, 0xD075, 0xE055, 0xE075, 0x3057, 0x3077, 0x3059, 0x3079, 0x8059, 0x205A, 0x207A, 0x705A, 0x707A, 0xF05A, 0xF07A, 0x0000 }; /** * @internal * @param a Diacritical mark 0 ... 15. * @param c Character code in range 0x20 ... 0x7F. * * Translate Teletext Latin G1 character 0x20 ... 0x7F combined * with accent code from Latin G2 0x40 ... 0x4F to Unicode. Not all * combinations are representable in Unicode. * * @return * Unicode value or 0. */ unsigned int _vbi3_teletext_composed_unicode (unsigned int a, unsigned int c) { unsigned int i; assert (a <= 15); assert (c >= 0x20 && c <= 0x7F); if (0 == a) return vbi3_teletext_unicode (VBI3_CHARSET_LATIN_G0, VBI3_SUBSET_NONE, c); c += a << 12; for (i = 0; i < N_ELEMENTS (composed); ++i) if (composed[i] == c) return 0x00C0 + i; return 0; } /* * Closed Caption character set */ /* Closed Caption character set Defined in EIA 608. Standard not available, this information comes from Video Demystified, Table 8.31. Closed Captioning Basic Character Set) */ static const uint16_t caption [96] = { 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027, 0x0028, 0x0029, 0x00E1, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F, 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, 0x0038, 0x0039, 0x003A, 0x003B, 0x003C, 0x003D, 0x003E, 0x003F, 0x0040, 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, 0x005B, 0x00E9, 0x005D, 0x00ED, 0x00F3, 0x00FA, 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, 0x00E7, 0x00F7, 0x00D1, 0x00F1, 0x25A0 }; /* Closed Caption special characters. */ static const uint16_t caption_special [] = { 0x00AE, 0x00B0, 0x00BD, 0x00BF, 0x2122, 0x00A2, 0x00A3, 0x266A, 0x00E0, 0x0020, 0x00E8, 0x00E2, 0x00EA, 0x00EE, 0x00F4, 0x00FB }; /** * @param c Character code in range 0x00 ... 0x0F and 0x20 ... 0x7F. * * Translates Closed Caption character code to Unicode. Codes * in range 0x00 ... 0x0F are Special Characters (Closed * Caption commands 0x22/0x3x, 0x32/0x3x). * * @return * Unicode value. */ unsigned int vbi3_caption_unicode (unsigned int c) { assert (c <= 0x0F || (c >= 0x20 && c <= 0x7F)); if (c < 0x10) return caption_special[c]; else return caption[c - 0x20]; } zapping-0.10cvs6/libvbi/lang.h 644 764 144 11257 10305456044 11375 /* * libzvbi - Teletext and Closed Caption character set * * Copyright (C) 2000, 2001, 2002, 2003, 2004 Michael H. Schimek * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. * * 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 this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* $Id: lang.h,v 1.17 2005/09/01 01:40:52 mschimek Exp $ */ #ifndef __ZVBI3_LANG_H__ #define __ZVBI3_LANG_H__ #include "macros.h" VBI3_BEGIN_DECLS /** * @brief Teletext character set code. * * A character set code combines one vbi3_charset with * a vbi3_subset. See vbi3_character_set_from_code(). * * Defined in EN 300 706, Section 15, Table 33. * Valid codes are in range 0 ... 127. */ typedef unsigned int vbi3_charset_code; #define VBI3_CHARSET_CODE_NONE ((vbi3_charset_code) -1) /** * @brief Teletext character sets. * Defined in EN 300 706, Section 15. */ typedef enum { VBI3_CHARSET_NONE, VBI3_CHARSET_LATIN_G0, VBI3_CHARSET_LATIN_G2, VBI3_CHARSET_CYRILLIC1_G0, VBI3_CHARSET_CYRILLIC2_G0, VBI3_CHARSET_CYRILLIC3_G0, VBI3_CHARSET_CYRILLIC_G2, VBI3_CHARSET_GREEK_G0, VBI3_CHARSET_GREEK_G2, VBI3_CHARSET_ARABIC_G0, VBI3_CHARSET_ARABIC_G2, VBI3_CHARSET_HEBREW_G0, VBI3_CHARSET_BLOCK_MOSAIC_G1, VBI3_CHARSET_SMOOTH_MOSAIC_G3 } vbi3_charset; /** * @brief Teletext Latin G0 national option subsets. * Defined in EN 300 706, Section 15.2 and Section 15.6.2 Table 36. */ typedef enum { VBI3_SUBSET_NONE, VBI3_SUBSET_CZECH_SLOVAK, VBI3_SUBSET_ENGLISH, VBI3_SUBSET_ESTONIAN, VBI3_SUBSET_FRENCH, VBI3_SUBSET_GERMAN, VBI3_SUBSET_ITALIAN, VBI3_SUBSET_LETTISH_LITHUANIAN, VBI3_SUBSET_POLISH, VBI3_SUBSET_PORTUGUESE_SPANISH, VBI3_SUBSET_RUMANIAN, VBI3_SUBSET_SERBIAN_CROATIAN_SLOVENIAN, VBI3_SUBSET_SWEDISH_FINNISH_HUNGARIAN, VBI3_SUBSET_TURKISH } vbi3_subset; /** * @brief Teletext character set designation. * Defined in EN 300 706, Section 15, Table 32, 33 and 34. */ typedef struct { vbi3_charset_code code; /** Character set used for G0 characters (0x20 ... 0x7F). */ vbi3_charset g0; /** Character set used for G2 characters (0xA0 ... 0xFF). */ vbi3_charset g2; /** National character subset used with VBI3_CHARSET_LATIN_G0. */ vbi3_subset subset; /** * Languages covered. These are ISO 639 two-character language code * strings, for example "fr" for French. The array is terminated * by a NULL pointer. */ const char * language_code[16]; } vbi3_character_set; extern const vbi3_character_set * vbi3_character_set_from_code (vbi3_charset_code code) __attribute__ ((const)); extern unsigned int vbi3_teletext_unicode (vbi3_charset charset, vbi3_subset subset, unsigned int c) __attribute__ ((const)); extern unsigned int vbi3_caption_unicode (unsigned int c) __attribute__ ((const)); /** * @param unicode Unicode as in vbi3_char. * * @return * @c TRUE if @a unicode represents a Teletext or Closed Caption * printable character. This excludes Teletext Arabic characters (which * are represented by private codes U+E600 ... U+E7FF until the conversion * table is ready), the Teletext Turkish currency sign U+E800 which is not * representable in Unicode, the Teletext G1 Block Mosaic and G3 Smooth * Mosaics and Line Drawing Set, with codes U+EE00 ... U+EFFF, and * Teletext DRCS coded U+F000 ... U+F7FF. */ vbi3_inline vbi3_bool vbi3_is_print (unsigned int unicode) { return unicode < 0xE600; } /** * @param unicode Unicode as in vbi3_char. * * @return * @c TRUE if @a unicode represents a Teletext G1 Block Mosaic or G3 Smooth * Mosaics and Line Drawing Set, that is a code in range U+EE00 ... U+EFFF. */ vbi3_inline vbi3_bool vbi3_is_gfx (unsigned int unicode) { return unicode >= 0xEE00 && unicode <= 0xEFFF; } /** * @param unicode Unicode as in vbi3_char. * * @return * @c TRUE if @a unicode represents a Teletext DRCS (Dynamically * Redefinable Character), that is a code in range U+F000 ... U+F7FF. **/ vbi3_inline vbi3_bool vbi3_is_drcs (unsigned int unicode) { return unicode >= 0xF000; } /* Private */ extern unsigned int _vbi3_teletext_ascii_art (unsigned int c) __attribute__ ((const)); extern unsigned int _vbi3_teletext_composed_unicode (unsigned int a, unsigned int c) __attribute__ ((const)); VBI3_END_DECLS #endif /* __ZVBI3_LANG_H__ */ zapping-0.10cvs6/libvbi/export-priv.h 644 764 144 17700 10305455451 12753 /* * libzvbi - Export modules * * Copyright (C) 2001, 2002, 2003, 2004 Michael H. Schimek * * Based on code from AleVT 1.5.1 * Copyright (C) 1998, 1999 Edgar Toernig * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* $Id: export-priv.h,v 1.3 2005/09/01 01:36:41 mschimek Exp $ */ #ifndef EXPORT_PRIV_H #define EXPORT_PRIV_H #include "export.h" typedef struct _vbi3_export_module _vbi3_export_module; /** * @ingroup Exmod * * Structure representing an export module instance, part of the private * export module interface. * * Export modules can read, but do not normally write its fields, as * they are maintained by the public libzvbi export functions. */ struct _vbi3_export { /** * Points back to export module description. */ const _vbi3_export_module *module; /** * Use _vbi3_export_write_error(), * _vbi3_export_unknown_option(), * _vbi3_export_invalid_option(), * _vbi3_export_error_printf(). */ char * errstr; /** Name of the file we are writing, @c NULL if anonymous. */ const char * name; /** File we are writing. */ FILE * fp; /** Generic option: Network name or @c NULL. */ char * network; /** Generic option: Creator name [by default "libzvbi"] or @c NULL. */ char * creator; /** Generic option: Reveal hidden characters. */ vbi3_bool reveal; /** Generic option: Add page header. */ vbi3_bool header; struct { /** Not implemented yet. */ vbi3_pgno pgno; vbi3_subno subno; double start_timestamp; double timestamp; vbi3_bool have_timestamp; } stream; /** See vbi3_export_set_link_cb(). */ vbi3_export_link_cb * link_callback; void * link_user_data; /** See vbi3_export_set_pdc_cb(). */ vbi3_export_pdc_cb * pdc_callback; void * pdc_user_data; /** @internal */ const vbi3_export_info * local_export_info; vbi3_option_info * local_option_info; }; /** * @ingroup Exmod * * Structure describing an export module, part of the private * export module interface. One required for each module. */ struct _vbi3_export_module { const vbi3_export_info * export_info; vbi3_export * (* _new)(const _vbi3_export_module *em); void (* _delete)(vbi3_export *e); const vbi3_option_info * option_info; unsigned int option_info_size; vbi3_bool (* option_set)(vbi3_export *e, const char *keyword, va_list); vbi3_bool (* option_get)(vbi3_export *e, const char *keyword, vbi3_option_value *value); vbi3_bool (* export)(vbi3_export *e, const vbi3_page *pg); }; /** * @example exp-templ.c * @ingroup Exmod * * Template for internal export module. */ /* Helper functions */ /** * @addtogroup Exmod * @{ */ extern void _vbi3_export_write_error (vbi3_export * e); extern void _vbi3_export_malloc_error (vbi3_export * e); extern void _vbi3_export_unknown_option (vbi3_export * e, const char * keyword); extern void _vbi3_export_invalid_option (vbi3_export * e, const char * keyword, ...); extern void _vbi3_export_error_printf (vbi3_export * e, const char * template, ...); extern char * _vbi3_export_strdup (vbi3_export * e, char ** d, const char * s); /* Option info building */ /** * Helper macro for export modules to build option lists. Use like this: * * @code * vbi3_option_info myinfo = VBI3_OPTION_BOOL_INITIALIZER * ("mute", N_("Switch sound on/off"), FALSE, N_("I am a tooltip")); * @endcode * * N_() marks the string for i18n, see info gettext for details. */ #define _VBI3_OPTION_BOOL_INITIALIZER(key_, label_, def_, tip_) \ { VBI3_OPTION_BOOL, key_, label_, { .num = def_ }, { .num = 0 }, \ { .num = 1 }, { .num = 1 }, { .num = NULL }, tip_ } /** * Helper macro for export modules to build option lists. Use like this: * * @code * vbi3_option_info myinfo = VBI3_OPTION_INT_RANGE_INITIALIZER * ("sampling", N_("Sampling rate"), 44100, 8000, 48000, 100, NULL); * @endcode * * Here we have no tooltip (@c NULL). */ #define _VBI3_OPTION_INT_RANGE_INITIALIZER(key_, label_, def_, min_, \ max_, step_, tip_) { VBI3_OPTION_INT, key_, label_, \ { .num = def_ }, { .num = min_ }, { .num = max_ }, { .num = step_ }, \ { .num = NULL }, tip_ } /** * Helper macro for export modules to build option lists. Use like this: * * @code * int mymenu[] = { 29, 30, 31 }; * * vbi3_option_info myinfo = VBI3_OPTION_INT_MENU_INITIALIZER * ("days", NULL, 1, mymenu, N_ELEMENTS (mymenu), NULL); * @endcode * * No label and tooltip (@c NULL), i. e. this option is not to be * listed in the user interface. Default is entry 1 ("30") of 3 entries. */ #define _VBI3_OPTION_INT_MENU_INITIALIZER(key_, label_, def_, \ menu_, elements_, tip_) { VBI3_OPTION_INT, key_, label_, \ { .num = def_}, { .num = 0 }, { .num = (elements_) - 1 }, \ { .num = 1 }, { .num = menu_ }, tip_ } /** * Helper macro for export modules to build option lists. Use like * VBI3_OPTION_INT_RANGE_INITIALIZER(), just with doubles but ints. */ #define _VBI3_OPTION_REAL_RANGE_INITIALIZER(key_, label_, def_, min_, \ max_, step_, tip_) { VBI3_OPTION_REAL, key_, label_, \ { .dbl = def_ }, { .dbl = min_ }, { .dbl = max_ }, { .dbl = step_ }, \ { .dbl = NULL }, tip_ } /** * Helper macro for export modules to build option lists. Use like * VBI3_OPTION_INT_MENU_INITIALIZER(), just with an array of doubles but ints. */ #define _VBI3_OPTION_REAL_MENU_INITIALIZER(key_, label_, def_, \ menu_, elements_, tip_) { VBI3_OPTION_REAL, key_, label_, \ { .num = def_ }, { .num = 0 }, { .num = (elements_) - 1 }, \ { .num = 1 }, { .dbl = menu_ }, tip_ } /** * Helper macro for export modules to build option lists. Use like this: * * @code * vbi3_option_info myinfo = VBI3_OPTION_STRING_INITIALIZER * ("comment", N_("Comment"), "bububaba", "Please enter a string"); * @endcode */ #define _VBI3_OPTION_STRING_INITIALIZER(key_, label_, def_, tip_) \ { VBI3_OPTION_STRING, key_, label_, { .str = def_ }, { .num = 0 }, \ { .num = 0 }, { .num = 0 }, { .str = 0 }, tip_ } /** * Helper macro for export modules to build option lists. Use like this: * * @code * char *mymenu[] = { "txt", "html" }; * * vbi3_option_info myinfo = VBI3_OPTION_STRING_MENU_INITIALIZER * ("extension", "Ext", 0, mymenu, N_ELEMENTS (mymenu), * N_("Select an extension")); * @endcode * * Remember this is like VBI3_OPTION_STRING_INITIALIZER() in the sense * that the vbi client can pass any string as option value, not just those * proposed in the menu. In contrast a plain menu option as with * VBI3_OPTION_MENU_INITIALIZER() expects menu indices as input. */ #define _VBI3_OPTION_STRING_MENU_INITIALIZER(key_, label_, def_, \ menu_, elements_, tip_) { VBI3_OPTION_STRING, key_, label_, \ { .str = def_ }, { .num = 0 }, { .num = (elements_) - 1 }, \ { .num = 1 }, { .str = menu_ }, tip_ } /** * Helper macro for export modules to build option lists. Use like this: * * @code * char *mymenu [] = { N_("Monday"), N_("Tuesday") }; * * vbi3_option_info myinfo = VBI3_OPTION_MENU_INITIALIZER * ("weekday", "Weekday", 0, mymenu, N_ELEMENTS (mymenu), * N_("Select a weekday")); * @endcode */ #define _VBI3_OPTION_MENU_INITIALIZER(key_, label_, def_, menu_, \ elements_, tip_) { VBI3_OPTION_MENU, key_, label_, { .num = def_ }, \ { .num = 0 }, { .num = (elements_) - 1 }, { .num = 1 }, \ { .str = menu_ }, tip_ } /** @} */ #endif /* EXPORT_PRIV_H */ zapping-0.10cvs6/libvbi/link.c 644 764 144 11101 10177354713 11377 /* * libzvbi - Links * * Copyright (C) 2001, 2002, 2003, 2004 Michael H. Schimek * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* $Id: link.c,v 1.3 2005/01/31 07:10:03 mschimek Exp $ */ #include "../site_def.h" #include /* malloc() */ #include #include "misc.h" /* CLEAR() */ #include "link.h" /** */ const char * vbi3_link_type_name (vbi3_link_type type) { switch (type) { #undef CASE #define CASE(type) case VBI3_LINK_##type : return #type ; CASE (NONE) CASE (MESSAGE) CASE (PAGE) CASE (SUBPAGE) CASE (HTTP) CASE (FTP) CASE (EMAIL) CASE (LID) CASE (TELEWEB) } return NULL; } /** @internal */ void _vbi3_link_dump (const vbi3_link * ld, FILE * fp) { assert (NULL != ld); assert (NULL != fp); fprintf (fp, "%s eacem=%u name='%s' url='%s' script='%s' " "pgno=%x subno=%x expires=%f itv=", vbi3_link_type_name (ld->type), ld->eacem, ld->name ? ld->name : "none", ld->url ? ld->url : "none", ld->script ? ld->script : "none", ld->pgno, ld->subno, ld->expires); switch (ld->itv_type) { case VBI3_WEBLINK_UNKNOWN: fputs ("UNKNOWN", fp); break; case VBI3_WEBLINK_PROGRAM_RELATED: fputs ("PROGRAM", fp); break; case VBI3_WEBLINK_NETWORK_RELATED: fputs ("NETWORK", fp); break; case VBI3_WEBLINK_STATION_RELATED: fputs ("STATION", fp); break; case VBI3_WEBLINK_SPONSOR_MESSAGE: fputs ("SPONSOR", fp); break; case VBI3_WEBLINK_OPERATOR: fputs ("OPERATOR", fp); break; default: fprintf (fp, "%u??", ld->itv_type); break; } fputc ('\n', fp); if (ld->network) { _vbi3_network_dump (ld->network, fp); fputc ('\n', fp); } } /** * @param lk vbi3_link structure initialized with vbi3_link_init() * or vbi3_link_copy(). * * Frees all resources associated with @a lk, except the structure itself. */ void vbi3_link_destroy (vbi3_link * ld) { assert (NULL != ld); vbi3_free (ld->name); vbi3_free (ld->url); vbi3_free (ld->script); if (ld->nk_alloc) { vbi3_network_destroy (ld->network); vbi3_free (ld->network); } CLEAR (*ld); } /** * @param dst vbi3_link structure to initialize. * @param src Initialized vbi3_link structure, can be @c NULL. * * Initializes all fields of @a dst by copying from @a src. Does * nothing if @a dst and @a src are the same. * * @returns * @c FALSE on failure (out of memory). */ vbi3_bool vbi3_link_copy (vbi3_link * dst, const vbi3_link * src) { assert (NULL != dst); if (dst == src) return TRUE; if (!src) { vbi3_link_init (dst); } else if (dst != src) { char *name; char *url; char *script; vbi3_network *nk; name = NULL; url = NULL; script = NULL; nk = NULL; if (src->name && !(name = strdup (src->name))) return FALSE; if (src->url && !(url = strdup (src->url))) { vbi3_free (name); return FALSE; } if (src->script && !(script = strdup (src->script))) { vbi3_free (url); vbi3_free (name); return FALSE; } if (src->network) { if (!(nk = vbi3_malloc (sizeof (*nk)))) { vbi3_free (script); vbi3_free (url); vbi3_free (name); return FALSE; } vbi3_network_copy (nk, src->network); } dst->type = src->type; dst->eacem = src->eacem; dst->name = name; dst->url = url; dst->script = script; dst->network = nk; dst->nk_alloc = (NULL != nk); dst->pgno = src->pgno; dst->subno = src->subno; dst->expires = src->expires; dst->itv_type = src->itv_type; dst->priority = src->priority; dst->autoload = src->autoload; } return TRUE; } /** * @param ld vbi3_link structure to initialize. * * Initializes all fields of @a ld to zero. * * @returns * @c TRUE. */ void vbi3_link_init (vbi3_link * ld) { assert (NULL != ld); ld->type = VBI3_LINK_NONE; ld->eacem = FALSE; ld->name = NULL; ld->url = NULL; ld->script = NULL; ld->network = NULL; ld->nk_alloc = FALSE; ld->pgno = 0; ld->subno = VBI3_ANY_SUBNO; ld->expires = 0.0; ld->itv_type = VBI3_WEBLINK_UNKNOWN; ld->priority = 9; ld->autoload = FALSE; } zapping-0.10cvs6/libvbi/link.h 644 764 144 13352 10177355423 11415 /* * libzvbi - Links * * Copyright (C) 2000, 2001, 2002, 2003, 2004 Michael H. Schimek * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* $Id: link.h,v 1.3 2005/01/31 07:15:31 mschimek Exp $ */ #ifndef __ZVBI3_LINK_H__ #define __ZVBI3_LINK_H__ #include /* FILE */ #include "macros.h" #include "network.h" /* vbi3_nuid */ #include "bcd.h" /* vbi3_pgno, vbi3_subno */ VBI3_BEGIN_DECLS /** * @brief Link type. */ typedef enum { /** * vbi3_resolve_link() may return a link of this type on failure. */ VBI3_LINK_NONE = 0, /** * Not really a link, only vbi3_link->name will be set. (Probably * something like "Help! Help! The station is on fire!") */ VBI3_LINK_MESSAGE, /** * Points to a Teletext page, vbi3_link->pgno and vbi3_link->subno, * eventually vbi3_link->nuid and a descriptive text in vbi3_link->name. */ VBI3_LINK_PAGE, /** * Also a Teletext page link, but this one is used exclusively * to link subpages of the page containing the link. */ VBI3_LINK_SUBPAGE, /** * vbi3_link->url is a HTTP URL (like "http://zapping.sf.net"), * eventually accompanied by a descriptive text vbi3_link->name. */ VBI3_LINK_HTTP, /** * vbi3_link->url is a FTP URL (like "ftp://foo.bar.com/baz"), * eventually accompanied by a descriptive text vbi3_link->name. */ VBI3_LINK_FTP, /** * vbi3_link->url is an e-mail address (like "mailto:foo@bar"), * eventually accompanied by a descriptive text vbi3_link->name. */ VBI3_LINK_EMAIL, /** Is a trigger link id. Not useful, just ignore. */ VBI3_LINK_LID, /** Is a SuperTeletext link, ignore. */ VBI3_LINK_TELEWEB } vbi3_link_type; extern const char * vbi3_link_type_name (vbi3_link_type type) __attribute__ ((const)); /** * @ingroup Event * @brief ITV link type. * * Some ITV (WebTV, ATVEF) triggers include a type id intended * to filter relevant information. The names should speak for * themselves. EACEM triggers always have type @c VBI3_WEBLINK_UNKNOWN. */ typedef enum { VBI3_WEBLINK_UNKNOWN = 0, VBI3_WEBLINK_PROGRAM_RELATED, VBI3_WEBLINK_NETWORK_RELATED, VBI3_WEBLINK_STATION_RELATED, VBI3_WEBLINK_SPONSOR_MESSAGE, VBI3_WEBLINK_OPERATOR } vbi3_itv_type; /** * @ingroup Event * * General purpose link description for ATVEF (ITV, WebTV in the * United States) and EACEM (SuperTeletext et al in Europe) triggers, * Teletext TOP and FLOF navigation, and for links "guessed" by * libzvbi from the text (e. g. page numbers and URLs). Usually * not all fields will be used. */ typedef struct { /** See vbi3_link_type. */ vbi3_link_type type; /** * Links can be obtained two ways, via @ref VBI3_EVENT_TRIGGER, * then it arrived either through the EACEM or ATVEF transport * method as flagged by this field. Or it is a navigational link * returned by vbi3_resolve_link(), then this field does not apply. */ vbi3_bool eacem; /** * Some descriptive text, Latin-1, possibly blank. */ char * name; /** ASCII */ char * url; /** * A piece of ECMA script (Javascript), this may be * used on WebTV or SuperTeletext pages to trigger some action. * Usually blank. ASCII. */ char * script; /** * Teletext page links (no Closed Caption counterpart) can * can actually reach across networks. That happens for example * when vbi3_resolve_link() picked up a link on a page after we * switch away from that channel, or with EACEM triggers * deliberately pointing to a page on another network (sic!). * So the network id (if known, otherwise 0) is part of the * page number. See vbi3_nuid. */ vbi3_network * network; /* bah. ugly */ vbi3_bool nk_alloc; /** * @a pgno and @a subno Teletext page number, see vbi3_pgno, vbi3_subno. * Note subno can be VBI3_ANY_SUBNO. */ vbi3_pgno pgno; vbi3_subno subno; /** * The time in seconds and fractions since * 1970-01-01 00:00 when the link should no longer be offered * to the user, similar to a HTTP cache expiration date. */ double expires; /** * See vbi3_itv_type. This field applies only to * ATVEF triggers, is otherwise @c VBI3_WEBLINK_UNKNOWN. */ vbi3_itv_type itv_type; /** * Trigger priority. 0 = emergency, should never be * blocked. 1 or 2 = "high", 3 ... 5 = "medium", 6 ... 9 = * "low". The default is 9. Apart of filtering triggers, this * is also used to determine at which priority multiple links * should be presented to the user. This field applies only to * EACEM triggers, is otherwise 9. */ int priority; /** * Open the target without user confirmation. (Supposedly * this flag will be used to trigger scripts, not to open pages, * but I have yet to see such a trigger.) */ vbi3_bool autoload; } vbi3_link; extern void vbi3_link_destroy (vbi3_link * lk) __attribute__ ((_vbi3_nonnull (1))); extern vbi3_bool vbi3_link_copy (vbi3_link * dst, const vbi3_link * src) __attribute__ ((_vbi3_nonnull (1))); extern void vbi3_link_init (vbi3_link * lk) __attribute__ ((_vbi3_nonnull (1))); /* Private */ extern void _vbi3_link_dump (const vbi3_link * lk, FILE * fp) __attribute__ ((_vbi3_nonnull (1, 2))); VBI3_END_DECLS #endif /* __ZVBI3_LINK_H__ */ zapping-0.10cvs6/libvbi/misc.c 644 764 144 4726 10260120414 11352 /* * Copyright (C) 2001-2004 Michael H. Schimek * Copyright (C) 2000-2003 Iaki Garca Etxebarria * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* $Id: misc.c,v 1.8 2005/06/28 00:59:56 mschimek Exp $ */ #include #include #include #include #include "misc.h" #ifndef HAVE_STRLCPY /** * @internal * strlcpy() is a BSD/GNU extension. */ size_t _vbi3_strlcpy (char * dst, const char * src, size_t len) { char *dst1; char *end; char c; assert (NULL != dst); assert (NULL != src); assert (len > 0); dst1 = dst; end = dst + len - 1; while (dst < end && (c = *src++)) *dst++ = c; *dst = 0; return dst - dst1; } #endif /* !HAVE_STRLCPY */ #ifndef HAVE_STRNDUP /** * @internal * strndup() is a BSD/GNU extension. */ char * _vbi3_strndup (const char * s, size_t len) { size_t n; char *r; if (NULL == s) return NULL; n = strlen (s); len = MIN (len, n); r = malloc (len + 1); if (r) { memcpy (r, s, len); r[len] = 0; } return r; } #endif /* !HAVE_STRNDUP */ #ifndef HAVE_ASPRINTF /** * @internal * asprintf() is a GNU extension. */ int _vbi3_asprintf (char ** dstp, const char * templ, ...) { char *buf; unsigned long size; int temp; assert (NULL != dstp); assert (NULL != templ); temp = errno; buf = NULL; size = 64; for (;;) { va_list ap; char *buf2; long len; if (!(buf2 = realloc (buf, size))) break; buf = buf2; va_start (ap, templ); len = vsnprintf (buf, size, templ, ap); va_end (ap); if (len < 0) { /* Not enough. */ size *= 2; } else if ((unsigned long) len < size) { *dstp = buf; errno = temp; return len; } else { /* Size needed. */ size = len + 1; } } free (buf); *dstp = NULL; errno = temp; return -1; } #endif /* !HAVE_ASPRINTF */ zapping-0.10cvs6/libvbi/misc.h 644 764 144 16301 10305456044 11402 /* * libzvbi - Miscellaneous types and macros * * Copyright (C) 2002, 2003, 2004 Michael H. Schimek * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* $Id: misc.h,v 1.11 2005/09/01 01:40:52 mschimek Exp $ */ #ifndef MISC_H #define MISC_H #include #include #include #include "macros.h" #define N_ELEMENTS(array) (sizeof (array) / sizeof (*(array))) #ifdef __GNUC__ #if __GNUC__ < 3 /* Expect expression usually true/false, schedule accordingly. */ # define likely(expr) (expr) # define unlikely(expr) (expr) #else # define likely(expr) __builtin_expect(expr, 1) # define unlikely(expr) __builtin_expect(expr, 0) #endif #undef __i386__ #undef __i686__ #if #cpu (i386) # define __i386__ 1 #endif #if #cpu (i686) # define __i686__ 1 #endif /* &x == PARENT (&x.tm_min, struct tm, tm_min), safer than &x == (struct tm *) &x.tm_min. A NULL _ptr is safe and will return NULL, not -offsetof(_member). */ #undef PARENT #define PARENT(_ptr, _type, _member) ({ \ __typeof__ (&((_type *) 0)->_member) _p = (_ptr); \ (_p != 0) ? (_type *)(((char *) _p) - offsetof (_type, \ _member)) : (_type *) 0; \ }) /* Like PARENT(), to be used with const _ptr. */ #define CONST_PARENT(_ptr, _type, _member) ({ \ __typeof__ (&((const _type *) 0)->_member) _p = (_ptr); \ (_p != 0) ? (const _type *)(((const char *) _p) - offsetof \ (const _type, _member)) : (const _type *) 0; \ }) /* Note the following macros have no side effects only when you compile with GCC, so don't expect this. */ /* Absolute value of int without a branch. Note ABS (INT_MIN) == INT_MAX + 1. */ #undef ABS #define ABS(n) ({ \ register int _n = (n), _t = _n; \ _t >>= sizeof (_t) * 8 - 1; /* assumes signed shift, safe? */ \ _n ^= _t; \ _n -= _t; \ }) #undef MIN #define MIN(x, y) ({ \ __typeof__ (x) _x = (x); \ __typeof__ (y) _y = (y); \ (void)(&_x == &_y); /* alert when type mismatch */ \ (_x < _y) ? _x : _y; \ }) #undef MAX #define MAX(x, y) ({ \ __typeof__ (x) _x = (x); \ __typeof__ (y) _y = (y); \ (void)(&_x == &_y); /* alert when type mismatch */ \ (_x > _y) ? _x : _y; \ }) #undef SWAP #define SWAP(x, y) \ do { \ __typeof__ (x) _x = x; \ x = y; \ y = _x; \ } while (0) #undef SATURATE #ifdef __i686__ /* has conditional move. */ #define SATURATE(n, min, max) ({ \ __typeof__ (n) _n = (n); \ __typeof__ (n) _min = (min); \ __typeof__ (n) _max = (max); \ (void)(&_n == &_min); /* alert when type mismatch */ \ (void)(&_n == &_max); \ if (_n < _min) \ _n = _min; \ if (_n > _max) \ _n = _max; \ _n; \ }) #else #define SATURATE(n, min, max) ({ \ __typeof__ (n) _n = (n); \ __typeof__ (n) _min = (min); \ __typeof__ (n) _max = (max); \ (void)(&_n == &_min); /* alert when type mismatch */ \ (void)(&_n == &_max); \ if (_n < _min) \ _n = _min; \ else if (_n > _max) \ _n = _max; \ _n; \ }) #endif #else /* !__GNUC__ */ #define likely(expr) (expr) #define unlikely(expr) (expr) #undef __i386__ #undef __i686__ #define __attribute__(args...) static char * PARENT_HELPER (char *p, unsigned int offset) { return (p == 0) ? 0 : p - offset; } static const char * CONST_PARENT_HELPER (const char *p, unsigned int offset) { return (p == 0) ? 0 : p - offset; } #define PARENT(_ptr, _type, _member) \ ((offsetof (_type, _member) == 0) ? (_type *)(_ptr) \ : (_type *) PARENT_HELPER ((char *)(_ptr), offsetof (_type, _member))) #define CONST_PARENT(_ptr, _type, _member) \ ((offsetof (const _type, _member) == 0) ? (const _type *)(_ptr) \ : (const _type *) CONST_PARENT_HELPER ((const char *)(_ptr), \ offsetof (const _type, _member))) #undef ABS #define ABS(n) (((n) < 0) ? -(n) : (n)) #undef MIN #define MIN(x, y) (((x) < (y)) ? (x) : (y)) #undef MAX #define MAX(x, y) (((x) > (y)) ? (x) : (y)) #undef SWAP #define SWAP(x, y) \ do { \ long _x = x; \ x = y; \ y = _x; \ } while (0) #undef SATURATE #define SATURATE(n, min, max) MIN (MAX (n, min), max) #ifndef ZAPPING8 extern void vbi3_log_printf (const char * function, const char * template, ...); #endif #endif /* !__GNUC__ */ /* 32 bit constant byte reverse, e.g. 0xAABBCCDD -> 0xDDCCBBAA */ #define SWAB32(m) \ (+ (((m) & 0xFF000000) >> 24) \ + (((m) & 0xFF0000) >> 8) \ + (((m) & 0xFF00) << 16) \ + (((m) & 0xFF) << 8)) #undef CLAMP #define CLAMP(n, min, max) SATURATE (n, min, max) /* NB gcc inlines and optimizes when size is const. */ #define SET(var) memset (&(var), ~0, sizeof (var)) #define CLEAR(var) memset (&(var), 0, sizeof (var)) #define COPY(d, s) /* useful to copy arrays, otherwise use assignment */ \ (assert (sizeof (d) == sizeof (s)), memcpy (d, s, sizeof (d))) /* Use this instead of strncpy(), is a BSD/GNU extension.*/ #ifdef HAVE_STRLCPY # define _vbi3_strlcpy strlcpy #else extern size_t _vbi3_strlcpy (char * dst, const char * src, size_t len); #endif /* strndup is a BSD/GNU extension. */ #ifdef HAVE_STRNDUP # define _vbi3_strndup strndup #else extern char * _vbi3_strndup (const char * s, size_t len); #endif #ifdef HAVE_ASPRINTF # define _vbi3_asprintf asprintf #else extern int _vbi3_asprintf (char ** dstp, const char * templ, ...); #endif #define STRCOPY(d, s) (_vbi3_strlcpy (d, s, sizeof (d)) < sizeof (d)) /* Copy bits through mask. */ #define COPY_SET_MASK(to, from, mask) \ (to ^= (from) ^ (to & (mask))) /* Set bits if cond is true, clear if false. */ #define COPY_SET_COND(to, bits, cond) \ ((cond) ? (to |= (bits)) : (to &= ~(bits))) /* Set and clear bits. */ #define COPY_SET_CLEAR(to, set, clear) \ (to = (to & ~(clear)) | (set)) vbi3_inline int vbi3_printable (int c) { if (c < 0) return '?'; c &= 0x7F; if (c < 0x20 || c >= 0x7F) return '.'; return c; } /* TODO */ #define vbi3_malloc malloc #define vbi3_realloc realloc #define vbi3_free free #define vbi3_cache_malloc malloc #define vbi3_cache_free free #ifdef ZAPPING8 #define vbi3_log_printf(level, func, templ, args...) \ do { \ fprintf (stderr, "%s: " templ, func , ##args); \ } while (0) #endif #define debug(templ, args...) \ do { \ fprintf (stderr, "%s:%u: %s: " templ ".\n", \ __FILE__, __LINE__, __PRETTY_FUNCTION__ , ##args); \ } while (0) #define error(templ, args...) \ do { \ fprintf (stderr, "%s:%u: %s: " templ ".\n", \ __FILE__, __LINE__, __PRETTY_FUNCTION__ , ##args); \ } while (0) #endif /* MISC_H */ zapping-0.10cvs6/libvbi/network.c 644 764 144 34126 10371711036 12136 /* * libzvbi - Network identification * * Copyright (C) 2000, 2001, 2002, 2003, 2004 Michael H. Schimek * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. * * 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 this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* $Id: network.c,v 1.9 2006/02/06 18:14:54 mschimek Exp $ */ #ifdef HAVE_CONFIG_H # include "config.h" #endif #include #include /* isdigit() */ #include #include "misc.h" /* CLEAR() */ #include "bcd.h" /* vbi3_is_bcd(), vbi3_bcd2bin() */ #include "conv.h" /* _vbi3_strdup_locale_utf8() */ #include "network.h" #include "network-table.h" /** * @param type CNI type. * * Returns the name of a CNI type, for example VBI3_CNI_TYPE_PDC_A -> * "PDC_A". This is mainly intended for debugging. * * @return * Static ASCII string, NULL if @a type is invalid. */ const char * vbi3_cni_type_name (vbi3_cni_type type) { switch (type) { #undef CASE #define CASE(type) case VBI3_CNI_TYPE_##type : return #type ; CASE (NONE) CASE (VPS) CASE (8301) CASE (8302) CASE (PDC_A) CASE (PDC_B) } return NULL; } static unsigned int cni_pdc_a_to_vps (unsigned int cni) { unsigned int n; /* Relation guessed from values observed in DE and AT. Is this defined anywhere? */ switch (cni >> 12) { case 0x1A: /* Austria */ case 0x1D: /* Germany */ if (!vbi3_is_bcd ((int) cni & 0xFFF)) return 0; n = vbi3_bcd2bin ((int) cni & 0xFFF); switch (n) { case 100 ... 163: cni = ((cni >> 4) & 0xF00) + n + 0xC0 - 100; break; case 200 ... 263: /* in DE */ cni = ((cni >> 4) & 0xF00) + n + 0x80 - 200; break; default: return 0; } break; default: return 0; } return cni; } static unsigned int cni_vps_to_pdc_a (unsigned int cni) { switch (cni >> 8) { case 0xA: /* Austria */ case 0xD: /* Germany */ switch (cni & 0xFF) { case 0xC0 ... 0xFF: cni = ((cni << 4) & 0xF000) + 0x10000 + vbi3_bin2bcd ((int)(cni & 0xFF) - 0xC0 + 100); break; case 0x80 ... 0xBF: cni = ((cni << 4) & 0xF000) + 0x10000 + vbi3_bin2bcd ((int)(cni & 0xFF) - 0x80 + 200); break; default: return 0; } break; default: return 0; } return cni; } static const struct network * cni_lookup (vbi3_cni_type type, unsigned int cni) { const struct network *p; const struct network *network_table_end = network_table + N_ELEMENTS (network_table); /* TODO binary search. */ if (0 == cni) return NULL; switch (type) { case VBI3_CNI_TYPE_8301: for (p = network_table; p < network_table_end; ++p) if (p->cni_8301 == cni) { return p; } break; case VBI3_CNI_TYPE_8302: for (p = network_table; p < network_table_end; ++p) if (p->cni_8302 == cni) { return p; } cni &= 0x0FFF; /* fall through */ case VBI3_CNI_TYPE_VPS: for (p = network_table; p < network_table_end; ++p) if (p->cni_vps == cni) { return p; } break; case VBI3_CNI_TYPE_PDC_A: { unsigned int cni_vps; cni_vps = cni_pdc_a_to_vps (cni); if (0 == cni_vps) return NULL; for (p = network_table; p < network_table_end; ++p) if (p->cni_vps == cni_vps) { return p; } break; } case VBI3_CNI_TYPE_PDC_B: for (p = network_table; p < network_table_end; ++p) if (p->cni_pdc_b == cni) { return p; } /* try code | 0x0080 & 0x0FFF -> VPS ? */ break; default: debug ("Unknown CNI type %u", type); break; } return NULL; } /** * @param to_type Type of CNI to convert to. * @param from_type Type of CNI to convert from. * @param cni CNI to convert. * * Converts a CNI from one type to another. * * @returns * Converted CNI or 0 if conversion is not possible. */ unsigned int vbi3_convert_cni (vbi3_cni_type to_type, vbi3_cni_type from_type, unsigned int cni) { const struct network *p; if (!(p = cni_lookup (from_type, cni))) return 0; switch (to_type) { case VBI3_CNI_TYPE_VPS: return p->cni_vps; case VBI3_CNI_TYPE_8301: return p->cni_8301; case VBI3_CNI_TYPE_8302: return p->cni_8302; case VBI3_CNI_TYPE_PDC_A: return cni_vps_to_pdc_a (p->cni_vps); case VBI3_CNI_TYPE_PDC_B: return p->cni_pdc_b; default: debug ("Unknown CNI to_type %u", to_type); break; } return 0; } /** * @internal */ void _vbi3_network_dump (const vbi3_network * nk, FILE * fp) { assert (NULL != nk); assert (NULL != fp); fprintf (fp, "'%s' call_sign=%s cni=%x/%x/%x/%x/%x country=%s", nk->name ? nk->name : "unknown", nk->call_sign[0] ? nk->call_sign : "unknown", nk->cni_vps, nk->cni_8301, nk->cni_8302, nk->cni_pdc_a, nk->cni_pdc_b, nk->country_code[0] ? nk->country_code : "unknown"); } /** */ char * vbi3_network_id_string (const vbi3_network * nk) { char buffer[sizeof (nk->call_sign) * 3 + 5 * 9 + 1]; char *s; unsigned int i; s = buffer; for (i = 0; i < sizeof (nk->call_sign); ++i) { if (isalnum (nk->call_sign[i])) { *s++ = nk->call_sign[i]; } else { s += sprintf (s, "%%%02x", nk->call_sign[i]); } } s += sprintf (s, "-%8x", nk->cni_vps); s += sprintf (s, "-%8x", nk->cni_8301); s += sprintf (s, "-%8x", nk->cni_8302); s += sprintf (s, "-%8x", nk->cni_pdc_a); s += sprintf (s, "-%8x", nk->cni_pdc_b); return strdup (buffer); } /** */ vbi3_bool vbi3_network_set_name (vbi3_network * nk, const char * name) { char *name1; assert (NULL != nk); if (!(name1 = strdup (name))) return FALSE; vbi3_free (nk->name); nk->name = name1; return TRUE; } /** * @internal */ vbi3_bool _vbi3_network_set_name_from_ttx_header (vbi3_network * nk, const uint8_t buffer[40]) { unsigned int i; assert (NULL != nk); assert (NULL != buffer); for (i = 0; i < N_ELEMENTS (ttx_header_table); ++i) { const uint8_t *s1; const uint8_t *s2; uint8_t c1; uint8_t c2; char *name; s1 = (const uint8_t *) ttx_header_table[i].header; s2 = buffer + 8; while (0 != (c1 = *s1) && s2 < &buffer[40]) { switch (c1) { case '?': break; case '#': if (!isdigit (*s2 & 0x7F)) goto next; break; default: if (((c2 = *s2) & 0x7F) <= 0x20) { if (0x20 != c1) goto next; else break; } else if (0 != ((c1 ^ c2) & 0x7F)) { goto next; } break; } ++s1; ++s2; } name = _vbi3_strdup_locale_utf8 (ttx_header_table[i].name); if (!name) return FALSE; vbi3_free (nk->name); nk->name = name; return TRUE; next: ; } return FALSE; } /** */ vbi3_bool vbi3_network_set_cni (vbi3_network * nk, vbi3_cni_type type, unsigned int cni) { const struct network *p; char *name; assert (NULL != nk); switch (type) { case VBI3_CNI_TYPE_VPS: nk->cni_vps = cni; break; case VBI3_CNI_TYPE_8301: nk->cni_8301 = cni; break; case VBI3_CNI_TYPE_8302: nk->cni_8302 = cni; break; case VBI3_CNI_TYPE_PDC_A: nk->cni_pdc_a = cni; break; case VBI3_CNI_TYPE_PDC_B: nk->cni_pdc_b = cni; break; default: debug ("Unknown CNI type %u", type); } if (!(p = cni_lookup (type, cni))) return FALSE; /* Keep in mind our table may be wrong. */ if (p->cni_vps && nk->cni_vps && p->cni_vps != nk->cni_vps) return FALSE; if (p->cni_8301 && nk->cni_8301 && p->cni_8301 != nk->cni_8301) return FALSE; if (p->cni_8302 && nk->cni_8302 && p->cni_8302 != nk->cni_8302) return FALSE; if (!(name = _vbi3_strdup_locale_utf8 (p->name))) return FALSE; vbi3_free (nk->name); nk->name = name; nk->cni_vps = p->cni_vps; nk->cni_8301 = p->cni_8301; nk->cni_8302 = p->cni_8302; if (0 == nk->cni_pdc_a) nk->cni_pdc_a = cni_vps_to_pdc_a (p->cni_vps); if (0 == nk->cni_pdc_b) nk->cni_pdc_b = p->cni_pdc_b; if (0 == nk->country_code[0]) { assert (p->country < N_ELEMENTS (country_table)); _vbi3_strlcpy (nk->country_code, country_table[p->country].country_code, sizeof (nk->country_code)); } return TRUE; } /** */ vbi3_bool vbi3_network_set_call_sign (vbi3_network * nk, const char * call_sign) { assert (NULL != nk); assert (NULL != call_sign); _vbi3_strlcpy (nk->call_sign, call_sign, sizeof (nk->call_sign)); if (0 == nk->country_code[0]) { const char *country_code; country_code = ""; /* See http://www.fcc.gov/cgb/statid.html */ switch (call_sign[0]) { case 'A': switch (call_sign[1]) { case 'A' ... 'F': country_code = "US"; break; } break; case 'K': case 'W': case 'N': country_code = "US"; break; case 'C': switch (call_sign[1]) { case 'F' ... 'K': case 'Y' ... 'Z': country_code = "CA"; break; } break; case 'V': switch (call_sign[1]) { case 'A' ... 'G': case 'O': case 'X' ... 'Y': country_code = "CA"; break; } break; case 'X': switch (call_sign[1]) { case 'J' ... 'O': country_code = "CA"; break; } break; } _vbi3_strlcpy (nk->country_code, country_code, sizeof (nk->country_code)); } return TRUE; } /** * @param nk Initialized vbi3_network structure. * * @returns * @c TRUE if all fields user_data, cni_vps, cni_8301, cni_8302 * and call_sign are unset (zero). */ vbi3_bool vbi3_network_is_anonymous (const vbi3_network * nk) { assert (NULL != nk); return (NULL == nk->user_data && 0 == (nk->cni_vps | nk->cni_8301 | nk->cni_8302 | nk->call_sign[0])); } /** * @param nk1 Initialized vbi3_network structure. * @param nk2 Initialized vbi3_network structure. * * Compares two networks for weak equality. Networks are considered * weak equal if each pair of user_data, cni_vps, cni_8301, cni_8302 * and call_sign is equal or one value is unset (zero). * * @returns * @c TRUE if the networks are weakly equal. */ vbi3_bool vbi3_network_weak_equal (const vbi3_network * nk1, const vbi3_network * nk2) { assert (NULL != nk1); assert (NULL != nk2); if (nk1->user_data && nk2->user_data) if (nk1->user_data != nk2->user_data) return FALSE; if (nk1->cni_vps && nk2->cni_vps) if (nk1->cni_vps != nk2->cni_vps) return FALSE; if (nk1->cni_8301 && nk2->cni_8301) if (nk1->cni_8301 != nk2->cni_8301) return FALSE; if (nk1->cni_8302 && nk2->cni_8302) if (nk1->cni_8302 != nk2->cni_8302) return FALSE; if (nk1->call_sign[0] && nk2->call_sign[0]) if (0 != strcmp (nk1->call_sign, nk2->call_sign)) return FALSE; return TRUE; } /** * @param nk1 Initialized vbi3_network structure. * @param nk2 Initialized vbi3_network structure. * * Compares two networks for equality. Networks are considered equal * if each pair of user_data, cni_vps, cni_8301, cni_8302 and * call_sign is equal or both values are unset (zero). * * @returns * @c TRUE if the networks are equal. */ vbi3_bool vbi3_network_equal (const vbi3_network * nk1, const vbi3_network * nk2) { assert (NULL != nk1); assert (NULL != nk2); if (nk1->user_data || nk2->user_data) if (nk1->user_data != nk2->user_data) return FALSE; if (0 != ((nk1->cni_vps ^ nk2->cni_vps) | (nk1->cni_8301 ^ nk2->cni_8301) | (nk1->cni_8302 ^ nk2->cni_8302))) return FALSE; if (nk1->call_sign[0] || nk2->call_sign[0]) if (0 != strcmp (nk1->call_sign, nk2->call_sign)) return FALSE; return TRUE; } /** * @param nk Initialized vbi3_network structure. * * Resets all fields to zero, creating an anonymous network. */ void vbi3_network_reset (vbi3_network * nk) { assert (NULL != nk); vbi3_free (nk->name); CLEAR (*nk); } /** * @param nk vbi3_network structure initialized with vbi3_network_init() * or vbi3_network_copy(). * * Frees all resources associated with @a nk, except the structure itself. */ void vbi3_network_destroy (vbi3_network * nk) { vbi3_network_reset (nk); } /** * @param dst Initialized vbi3_network structure. * @param src Initialized vbi3_network structure, can be @c NULL. * * Sets all fields of @a dst by copying from @a src. Does * nothing if @a dst and @a src are the same. * * @returns * @c FALSE on failure (out of memory), leaving @a dst unmodified. */ vbi3_bool vbi3_network_set (vbi3_network * dst, const vbi3_network * src) { assert (NULL != dst); if (dst == src) return TRUE; if (!src) { vbi3_network_reset (dst); } else { char *name; name = NULL; if (src->name && !(name = strdup (src->name))) return FALSE; vbi3_free (dst->name); memcpy (dst, src, sizeof (*dst)); dst->name = name; } return TRUE; } /** * @param dst vbi3_network structure to initialize. * @param src Initialized vbi3_network structure, can be @c NULL. * * Initializes all fields of @a dst by copying from @a src. * Does nothing if @a dst and @a src are the same. * * @returns * @c FALSE on failure (out of memory), with @a dst unmodified. */ vbi3_bool vbi3_network_copy (vbi3_network * dst, const vbi3_network * src) { assert (NULL != dst); if (dst == src) return TRUE; if (!src) { CLEAR (*dst); } else if (dst != src) { char *name; name = NULL; if (src->name && !(name = strdup (src->name))) return FALSE; memcpy (dst, src, sizeof (*dst)); dst->name = name; } return TRUE; } /** * @param nk vbi3_network structure to initialize. * * Initializes all fields of @a nk to zero, creating an * anonymous network. * * @returns * @c TRUE. */ vbi3_bool vbi3_network_init (vbi3_network * nk) { return vbi3_network_copy (nk, NULL); } /** * @param nk malloc()ed array of initialized vbi3_network structures, * can be NULL. * @param n_elements Number of elements in the array. * * Frees an array of vbi3_network structures and all data associated * with them. Does nothing if @a nk or @a n_elements are zero. */ extern void vbi3_network_array_delete (vbi3_network * nk, unsigned int n_elements) { unsigned int i; if (NULL == nk || 0 == n_elements) return; for (i = 0; i < n_elements; ++i) vbi3_network_destroy (nk + i); vbi3_free (nk); } zapping-0.10cvs6/libvbi/network.h 644 764 144 11204 10177355410 12137 /* * libzvbi - Network identification * * Copyright (C) 2004 Michael H. Schimek * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. * * 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 this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* $Id: network.h,v 1.3 2005/01/31 07:15:20 mschimek Exp $ */ #ifndef __ZVBI3_NETWORK_H__ #define __ZVBI3_NETWORK_H__ #include /* FILE */ #include /* int64_t */ #include "macros.h" VBI3_BEGIN_DECLS /** * @addtogroup Network * @{ */ /** * DOCUMENT ME */ typedef struct { /* Locale encoding, NUL-terminated. Can be NULL. */ char * name; /* NUL-terminated ASCII string, can be empty if unknown. Only call_sign, cni_vps, cni_8301, cni_8302 and user_data will be used by libzvbi for channel identification, whichever is non-zero. */ char call_sign[16]; /* NUL-terminated RFC 1766 / ISO 3166 ASCII string, e.g. "GB", "FR", "DE". Can be empty if unknown. */ char country_code[4]; /* XDS Info */ unsigned int tape_delay; /* VPS Info */ unsigned int cni_vps; /* Teletext Info */ unsigned int cni_8301; unsigned int cni_8302; unsigned int cni_pdc_a; unsigned int cni_pdc_b; /* Other */ void * user_data; /* More? */ } vbi3_network; /** * The European Broadcasting Union (EBU) maintains several tables * of Country and Network Identification codes for different * purposes, presumably the result of independent development. */ typedef enum { VBI3_CNI_TYPE_NONE, VBI3_CNI_TYPE_UNKNOWN = VBI3_CNI_TYPE_NONE, /** VPS format, for example from vbi3_decode_vps_cni(). */ VBI3_CNI_TYPE_VPS, /** * Teletext packet 8/30 format 1, for example * from vbi3_decode_teletext_8301_cni(). */ VBI3_CNI_TYPE_8301, /** * Teletext packet 8/30 format 2, for example * from vbi3_decode_teletext_8302_cni(). */ VBI3_CNI_TYPE_8302, /** * 5 digit PDC Preselection method "A" format * encoded on Teletext pages. */ VBI3_CNI_TYPE_PDC_A, /** * 4 digit (0x3nnn) PDC Preselection method "B" format * encoded in Teletext packet X/26 local enhancement data. */ VBI3_CNI_TYPE_PDC_B, } vbi3_cni_type; extern const char * vbi3_cni_type_name (vbi3_cni_type type) __attribute__ ((const)); extern unsigned int vbi3_convert_cni (vbi3_cni_type to_type, vbi3_cni_type from_type, unsigned int cni) __attribute__ ((const)); extern vbi3_bool vbi3_network_is_anonymous (const vbi3_network * nk) __attribute__ ((_vbi3_nonnull (1))); extern vbi3_bool vbi3_network_equal (const vbi3_network * nk1, const vbi3_network * nk2) __attribute__ ((_vbi3_nonnull (1, 2))); extern vbi3_bool vbi3_network_weak_equal (const vbi3_network * nk1, const vbi3_network * nk2) __attribute__ ((_vbi3_nonnull (1, 2))); extern char * vbi3_network_id_string (const vbi3_network * nk) __attribute__ ((_vbi3_nonnull (1))); extern vbi3_bool vbi3_network_set_name (vbi3_network * nk, const char * name) __attribute__ ((_vbi3_nonnull (1))); extern vbi3_bool vbi3_network_set_call_sign (vbi3_network * nk, const char * call_sign) __attribute__ ((_vbi3_nonnull (1))); extern vbi3_bool vbi3_network_set_cni (vbi3_network * nk, vbi3_cni_type type, unsigned int cni) __attribute__ ((_vbi3_nonnull (1))); extern void vbi3_network_reset (vbi3_network * nk) __attribute__ ((_vbi3_nonnull (1))); extern void vbi3_network_destroy (vbi3_network * nk) __attribute__ ((_vbi3_nonnull (1))); extern vbi3_bool vbi3_network_set (vbi3_network * dst, const vbi3_network * src) __attribute__ ((_vbi3_nonnull (1))); extern vbi3_bool vbi3_network_copy (vbi3_network * dst, const vbi3_network * src) __attribute__ ((_vbi3_nonnull (1))); extern vbi3_bool vbi3_network_init (vbi3_network * nk) __attribute__ ((_vbi3_nonnull (1))); extern void vbi3_network_array_delete (vbi3_network * nk, unsigned int n_elements); /* Private */ extern void _vbi3_network_dump (const vbi3_network * nk, FILE * fp) __attribute__ ((_vbi3_nonnull (1, 2))); extern vbi3_bool _vbi3_network_set_name_from_ttx_header (vbi3_network * nk, const uint8_t buffer[40]) __attribute__ ((_vbi3_nonnull (1, 2))); /** @} */ VBI3_END_DECLS #endif /* __ZVBI3_NETWORK_H__ */ zapping-0.10cvs6/libvbi/page.h 644 764 144 33630 10260120047 11356 /* * libzvbi - Unified text buffer * * Copyright (C) 2000, 2001, 2002, 2003, 2004 Michael H. Schimek * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. * * 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 this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* $Id: page.h,v 1.4 2005/06/28 00:56:07 mschimek Exp $ */ #ifndef PAGE_H #define PAGE_H #include "macros.h" #include "bcd.h" /* vbi3_pgno, vbi3_subno */ #include "network.h" /* vbi3_nuid */ #include "link.h" /* vbi3_link */ #include "pdc.h" /* vbi3_preselection */ #include "lang.h" /* vbi3_character_set */ VBI3_BEGIN_DECLS typedef struct _vbi3_cache vbi3_cache; /* Public */ #include /** * @addtogroup Page Formatted text page * @ingroup Service */ /** * @ingroup Page * @brief Index into the vbi3_page->color_map. * * The enumerated color names * refer to the Teletext and Closed Caption base palette of eight * colors. Note however the color_map really has 40 entries for * Teletext Level 2.5+, 32 of which are redefinable, the remaining * eight are private colors of libzvbi e. g. for * navigational information. So these symbols may not necessarily * correspond to the respective color. */ /* Code depends on order, don't change. */ typedef enum { VBI3_BLACK, VBI3_RED, VBI3_GREEN, VBI3_YELLOW, VBI3_BLUE, VBI3_MAGENTA, VBI3_CYAN, VBI3_WHITE } vbi3_color; /** * @ingroup Page * @brief Colormap entry: 0xAABBGGRR. libzvbi sets the alpha channel * always to 0xFF. */ typedef uint32_t vbi3_rgba; /* Private */ #define VBI3_RGBA(r, g, b) \ ((((r) & 0xFFU) << 0) | (((g) & 0xFFU) << 8) \ | (((b) & 0xFFU) << 16) | (0xFFU << 24)) #define VBI3_R(rgba) (((rgba) >> 0) & 0xFFU) #define VBI3_G(rgba) (((rgba) >> 8) & 0xFFU) #define VBI3_B(rgba) (((rgba) >> 16) & 0xFFU) #define VBI3_A(rgba) (((rgba) >> 24) & 0xFFU) /* Public */ /** * @ingroup Page * @brief Defines the opacity of a vbi3_char and vbi3_page border. * * Teletext Level 2.5 defines a special transparent color which * permits unusual characters with transparent foreground, opaque * background. For simplicity this type of opacity has been omitted. Also * renderers shall rely on the opacity attribute and not attempt to * interpret the color value as transparency indicator. */ typedef enum { /** * This page is supposed to be overlayed onto * video, with video displayed in place of this character (or the page * border). In other words the character is a space (vbi3_char->unicode = * U+0020) and the glyph background is transparent. If desired the * renderer may also fall back to VBI3_TRANSLUCENT or VBI3_OPAQUE * mode. For this case vbi3_char->background names the color to use as * the translucent or opaque background. * * VBI3_TRANSPARENT_SPACE is the opacity of subtitle pages (both border and * characters, while the 'boxed' words are marked as VBI3_TRANSLUCENT), * but can also occur on a mainly VBI3_OPAQUE page to create a 'window' * effect. */ VBI3_TRANSPARENT_SPACE, /** * Display video instead of the background color. * Here the character is not a space and shall be displayed * in vbi3_char->foreground color. Only in the background of the character * video shall look through. Again the renderer may fall back to * VBI3_TRANSLUCENT or VBI3_OPAQUE. */ VBI3_TRANSPARENT_FULL, /** * Alpha blend video into background color, the * character background becomes translucent. This is the opacity used * for 'boxed' text on an otherwise VBI3_TRANSPARENT_SPACE page, typically * a subtitle or Teletext newsflash page. The renderer may fall back * to VBI3_OPAQUE. */ VBI3_TRANSLUCENT, /** * Display foreground and background color. Showing * foreground or background transparent instead is not recommended because * the editor may have swapped foreground and background color, then * replaced a glyph by its inverse image, so one cannot really know if * the character foreground or background will appear transparent. */ VBI3_OPAQUE } vbi3_opacity; /** * @ingroup Page * @brief Defines the size of a vbi3_char in a vbi3_page. * * Double width or height characters expand into the next * column right and/or next row below. * * Scanning two rows left to right, you will find
*
 * VBI3_NORMAL_SIZE | VBI3_DOUBLE_WIDTH VBI3_OVER_TOP | VBI3_DOUBLE_HEIGHT  | VBI3_DOUBLE_SIZE  VBI3_OVER_TOP
 *       x         |         x             x       | VBI3_DOUBLE_HEIGHT2 | VBI3_DOUBLE_SIZE2 VBI3_OVER_BOTTOM
 * 
* * A VBI3_DOUBLE_HEIGHT2, VBI3_DOUBLE_SIZE2, VBI3_OVER_TOP, VBI3_OVER_BOTTOM * vbi3_char has the same character unicode and attributes as the top/left anchor. * Partial characters (like a single VBI3_DOUBLE_HEIGHT2) will not appear, so * VBI3_DOUBLE_HEIGHT2, VBI3_DOUBLE_SIZE2, VBI3_OVER_TOP, VBI3_OVER_BOTTOM * can be safely ignored when scanning the page. */ /* Code depends on order, don't change. */ typedef enum { VBI3_NORMAL_SIZE, VBI3_DOUBLE_WIDTH, VBI3_DOUBLE_HEIGHT, VBI3_DOUBLE_SIZE, VBI3_OVER_TOP, VBI3_OVER_BOTTOM, VBI3_DOUBLE_HEIGHT2, VBI3_DOUBLE_SIZE2 } vbi3_size; typedef enum { VBI3_UNDERLINE = (1 << 0), /**< Display character underlined. */ VBI3_BOLD = (1 << 1), /**< Display character bold. */ VBI3_ITALIC = (1 << 2), /**< Display character slanted right. */ /** * Display character or space (U+0020). One second cycle time. */ VBI3_FLASH = (1 << 3), /** * Replace character by space (U+0020) if not revealed. * This is used for example to hide text on question & answer pages. */ VBI3_CONCEAL = (1 << 4), /** * No function yet, default is fixed spacing. */ VBI3_PROPORTIONAL = (1 << 5), /** * This character is part of a hyperlink. Call vbi3_resolve_link() * to get more information. */ VBI3_LINK = (1 << 6), /** * PDC link. */ VBI3_PDC = (1 << 7), } vbi3_attr; /** * @ingroup Page * @brief Attributed character. */ typedef struct vbi3_char { /** * Character attribute, see vbi3_attr. */ uint8_t attr; /** * Character size, see vbi3_size. */ uint8_t size; /** * Character opacity, see vbi3_opacity. Both @a foreground * and @a background color are valid independent of @a opacity. */ uint8_t opacity; /** * Character foreground color, a vbi3_color index * into the vbi3_page->color_map. */ uint8_t foreground; /** * Character background color, a vbi3_color index * into the vbi3_page->color_map. */ uint8_t background; /** * DRCS color look-up table offset, see vbi3_page for details. */ uint8_t drcs_clut_offs; /** * Character code according to ISO 10646 UCS-2 (not UTF-16). * * All Closed Caption characters can be represented in Unicode, * but unfortunately not all Teletext characters. * * ETS 300 706 * Table 36 Latin National Subset Turkish, character * 0x23 "Turkish currency symbol" is not representable in Unicode, * thus translated to private code U+E800. I was unable to identify * all Arabic glyphs in Table 44 and 45 Arabic G0 and G2, so for now * these are mapped to private code U+E620 ... U+E67F and U+E720 ... * U+E77F respectively. Table 47 G1 Block Mosaic is not representable * in Unicode, translated to private code U+EE00 ... U+EE7F. That is, * the contiguous form has bit 5 (0x20) set, the separate form * cleared. * Table 48 G3 "Smooth Mosaics and Line Drawing Set" is not * representable in Unicode, translated to private code * U+EF20 ... U+EF7F. * * Teletext Level 2.5+ DRCS are represented by private code * U+F000 ... U+F7FF. The 6 lsb select character 0x00 ... 0x3F * from a DRCS plane, the 5 msb select DRCS plane 0 ... 31, see * vbi3_page for details. * * @bug * Some Teletext character sets contain complementary * Latin characters. For example the Greek capital letters Alpha * and Beta are reused as Latin capital letter A and B, while a * separate code exists for the Latin capital letter C. libzvbi will * not analyse the page contents, so Greek A and B are always * translated to Greek Alpha and Beta, C to Latin C, even if they * appear in a pure Latin character word. */ uint16_t unicode; } vbi3_char; typedef struct _vbi3_page_priv vbi3_page_priv; /** * @ingroup Page * @brief Formatted Teletext or Closed Caption page. * * Clients can fetch pages * from the respective cache using vbi3_fetch_vt_page() or * vbi3_fetch_cc_page() for evaluation, display or output. Since * the page may reference other objects in cache which are locked * by the fetch functions, vbi3_unref_page() must be called when done. * Note this structure is large, some 10 KB. */ typedef struct { /** * Points back to the source context. */ vbi3_cache * cache; unsigned int ref_count; /** * Identifies the network broadcasting this page. */ const vbi3_network * network; /** * Page number, see vbi3_pgno. */ vbi3_pgno pgno; /** * Subpage number, see vbi3_subno. Only applicable * if this is a Teletext page. */ vbi3_subno subno; /** * Number of character rows in the page. */ unsigned int rows; /** * Number of character columns in the page. */ unsigned int columns; /** * The page contents, these are @a rows x @a columns without * padding between the rows. See vbi3_char for details. */ vbi3_char text[26 * 64]; /** * To speed up rendering these variables mark the rows * which actually changed since the page has been last fetched * from cache. @a y0 ... @a y1 are the first to last row changed, * inclusive, in range 0 ... @a rows - 1. @a roll indicates the * page has been vertically scrolled this number of rows, * negative numbers up (towards lower row numbers), positive * numbers down. For example -1 means row @a y0 + 1 ... @a y1 * moved to @a y0 ... @a y1 - 1, erasing row @a y1 to all spaces. * * Practically this is only used in Closed Caption roll-up * mode, otherwise all rows are always marked dirty. Clients * are free to ignore this information. */ struct { /* int x0, x1; */ int y0, y1; int roll; } dirty; /** * When a TV displays Teletext or Closed Caption only a subsection * of the screen is covered by the character matrix. The 'border' * around this area can have a distinct color, usually it is black. * @a screen_color is a vbi3_color index into the @a color_map. */ vbi3_color screen_color; /** * The 'border' can also have a distinct opacity. Usually it will * be VBI3_OPAQUE, but pages intended for overlay onto video * (Teletext subtitles, newsflash, Caption pages) will have a * @a screen_opacity of VBI3_TRANSPARENT_SPACE. * See vbi3_opacity for details. */ vbi3_opacity screen_opacity; /** * Ordinary characters are bi-level colored, with pixels assuming * vbi3_char->foreground or vbi3_char->background color. * * The pixels of Teletext DRCS (Dynamically Redefinable Characters) * can assume one color of a set of 2, 4 or 16. * * For bi-level DRCS vbi3_char->drcs_clut_offs is 0. '0' pixels * shall be painted in vbi3_char->background color, '1' pixels in * vbi3_char->foreground color. * * For 4- and 16-level DRCS the color is determined by one of * four color look-up tables. Here vbi3_char->drcs_clut_offs is * >= 2, and the color is calculated like this: * @code * vbi3_page->drcs_clut[vbi3_char->drcs_clut_offs + pixel value] * @endcode */ vbi3_color drcs_clut[2 + 2 * 4 + 2 * 16]; /** * This is the color palette indexed by vbi3_color in * vbi3_char and elsewhere, with colors defined as vbi3_rgba. * * Note the palette may not correspond to the vbi3_color * enumeration names since Teletext allows editors to redefine * the entire palette, depending on the Teletext level. * * Closed Caption and Teletext Level 1.0 / 1.5 pages use * entries 0 ... 7. Teletext Level 2.5 / 3.5 pages use entries * 0 ... 31. Teletext navigation (TOP, FLOF) added by libzvbi * in row 25 uses entries 32 ... 39. */ vbi3_rgba color_map[40]; vbi3_page_priv * priv; } vbi3_page; extern vbi3_bool vbi3_page_get_hyperlink (const vbi3_page * pg, vbi3_link * ld, unsigned int column, unsigned int row) __attribute__ ((_vbi3_nonnull (1, 2))); extern const vbi3_link * vbi3_page_get_teletext_link (const vbi3_page * pg, unsigned int indx) __attribute__ ((_vbi3_nonnull (1))); vbi3_inline const vbi3_link * vbi3_page_get_home_link (const vbi3_page * pg) { return vbi3_page_get_teletext_link (pg, 5); } extern const vbi3_preselection * vbi3_page_get_pdc_link (const vbi3_page * pg, unsigned int column, unsigned int row) __attribute__ ((_vbi3_nonnull (1))); extern const vbi3_preselection * vbi3_page_get_preselections (const vbi3_page * pg, unsigned int * n_elements) __attribute__ ((_vbi3_nonnull (1))); extern const uint8_t * vbi3_page_get_drcs_data (const vbi3_page * pg, unsigned int unicode) __attribute__ ((_vbi3_nonnull (1))); extern const vbi3_character_set * vbi3_page_get_character_set (const vbi3_page * pg, unsigned int level) __attribute__ ((_vbi3_nonnull (1))); extern void vbi3_page_unref (vbi3_page * pg) __attribute__ ((_vbi3_nonnull (1))); extern vbi3_page * vbi3_page_ref (vbi3_page * pg) __attribute__ ((_vbi3_nonnull (1))); extern void vbi3_page_delete (vbi3_page * pg); extern vbi3_page * vbi3_page_dup (const vbi3_page * pg) __attribute__ ((malloc, _vbi3_nonnull (1))); extern vbi3_page * vbi3_page_new (void) __attribute__ ((malloc)); typedef enum { VBI3_TABLE = 0x32f54a00, VBI3_RTL, VBI3_SCALE, VBI3_REVEAL, VBI3_FLASH_ON, VBI3_BRIGHTNESS, VBI3_CONTRAST, } vbi3_export_option; VBI3_END_DECLS #endif /* PAGE_H */ zapping-0.10cvs6/libvbi/sliced.h 644 764 144 23101 10305456044 11706 /* * libzvbi - Sliced vbi data object * * Copyright (C) 2000, 2001 Michael H. Schimek * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. * * 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 this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* $Id: sliced.h,v 1.9 2005/09/01 01:40:52 mschimek Exp $ */ #ifndef __ZVBI3_SLICED_H__ #define __ZVBI3_SLICED_H__ #include /* uintN_t */ #include "macros.h" VBI3_BEGIN_DECLS /** * @addtogroup Sliced Sliced VBI data * @ingroup Raw * @brief Definition of sliced VBI data. * * The output of the libzvbi raw VBI decoder, and input to the data * service decoder, is VBI data in binary format as defined in this * section. It is similar to the output of hardware VBI decoders * and VBI data transmitted in digital TV streams. */ /** * @name Data service symbols * @ingroup Sliced * @{ */ /** * @anchor VBI3_SLICED_ * No data service, blank vbi3_sliced structure. */ #define VBI3_SLICED_NONE 0 /** * Unknown data service (vbi3_dvb_demux). */ #define VBI3_SLICED_UNKNOWN 0 /** * Antiope a.k.a. Teletext System A * * Reference: ITU-R BT.653 * "Teletext Systems" * * vbi3_sliced payload: Last 37 bytes, without clock run-in and * framing code, lsb first transmitted. */ #define VBI3_SLICED_ANTIOPE 0x00002000 #define VBI3_SLICED_TELETEXT_A 0x00002000 #define VBI3_SLICED_TELETEXT_B_L10_625 0x00000001 #define VBI3_SLICED_TELETEXT_B_L25_625 0x00000002 /** * Teletext System B for 625 line systems * * Note this is separated into Level 1.0 and Level 2.5+ since the latter * permits occupation of scan line 6 which is frequently out of * range of raw VBI capture drivers. Clients should request decoding of both, * may then verify Level 2.5 is covered. Also sliced data can be tagged * as both Level 1.0 and 2.5+, i. e. VBI3_SLICED_TELETEXT_B. * * Reference: EN 300 706 * "Enhanced Teletext specification", * ITU-R BT.653 "Teletext Systems" * * vbi3_sliced payload: Last 42 of the 45 byte Teletext packet, that is * without clock run-in and framing code, lsb first transmitted. */ #define VBI3_SLICED_TELETEXT_B_625 (VBI3_SLICED_TELETEXT_B_L10_625 \ | VBI3_SLICED_TELETEXT_B_L25_625) /* Older definition */ #define VBI3_SLICED_TELETEXT_B VBI3_SLICED_TELETEXT_B_625 /** * Teletext System C for 625 line systems * * Reference: ITU-R BT.653 * "Teletext Systems" * * vbi3_sliced payload: Last 33 bytes, without clock run-in and * framing code, lsb first transmitted. */ #define VBI3_SLICED_TELETEXT_C_625 0x00004000 /** * Teletext System D for 625 line systems * * Reference: ITU-R BT.653 * "Teletext Systems" * * vbi3_sliced payload: Last 34 bytes, without clock run-in and * framing code, lsb first transmitted. */ #define VBI3_SLICED_TELETEXT_D_625 0x00008000 /** * Video Program System * * Reference: ETS 300 231 * "Specification of the domestic video Programme * Delivery Control system (PDC)", * IRT 8R2 "Video-Programm-System (VPS)". * * vbi3_sliced payload: Byte number 3 to 15 according to Figure 9, * lsb first transmitted. */ #define VBI3_SLICED_VPS 0x00000004 /** * Pseudo-VPS signal transmitted on field 2 * * Reference: ? * * vbi3_sliced payload: 13 bytes. */ #define VBI3_SLICED_VPS_F2 0x00001000 #define VBI3_SLICED_CAPTION_625_F1 0x00000008 #define VBI3_SLICED_CAPTION_625_F2 0x00000010 /** * Closed Caption for 625 line systems * * Note this is split into field one and two services since for basic * caption decoding only field one is required. Clients should compare * the vbi3_sliced line number, not the type to determine the source field. * * Reference: EIA 608 * "Recommended Practice for Line 21 Data Service". * * vbi3_sliced payload: First and second byte including parity, * lsb first transmitted. */ #define VBI3_SLICED_CAPTION_625 (VBI3_SLICED_CAPTION_625_F1 \ | VBI3_SLICED_CAPTION_625_F2) /** * Wide Screen Signalling for 625 line systems * * Reference: EN 300 294 * "625-line television Wide Screen Signalling (WSS)". * * vbi3_sliced payload: *
 * Byte         0                  1
 *       msb         lsb  msb             lsb
 * bit   7 6 5 4 3 2 1 0  x x 13 12 11 10 9 8
* according to EN 300 294, Table 1, lsb first transmitted. */ #define VBI3_SLICED_WSS_625 0x00000400 #define VBI3_SLICED_CAPTION_525_F1 0x00000020 #define VBI3_SLICED_CAPTION_525_F2 0x00000040 /** * Closed Caption for 525 line systems (NTSC) * * Note this is split into field one and two services since for basic * caption decoding only field one is required. Clients should compare * the vbi3_sliced line number, not the type to determine the source field. * VBI3_SLICED_CAPTION_525 also covers XDS (Extended Data Service), V-Chip data * and ITV data. * * Reference: EIA 608 * "Recommended Practice for Line 21 Data Service". * * vbi3_sliced payload: First and second byte including parity, * lsb first transmitted. */ #define VBI3_SLICED_CAPTION_525 (VBI3_SLICED_CAPTION_525_F1 \ | VBI3_SLICED_CAPTION_525_F2) /** * Closed Caption at double bit rate for 525 line systems * * Reference: ? * * vbi3_sliced payload: First to fourth byte including parity bit, * lsb first transmitted. */ #define VBI3_SLICED_2xCAPTION_525 0x00000080 /** * Teletext System B for 525 line systems * * Reference: ITU-R BT.653 * "Teletext Systems" * * vbi3_sliced payload: Last 34 bytes, without clock run-in and * framing code, lsb first transmitted. */ #define VBI3_SLICED_TELETEXT_B_525 0x00010000 /** * North American Basic Teletext Specification * a. k. a. Teletext System C for 525 line systems * * Reference: EIA-516 * "North American Basic Teletext Specification (NABTS)", * ITU-R BT.653 "Teletext Systems" * * vbi3_sliced payload: Last 33 bytes, without clock run-in and * framing code, lsb first transmitted. */ #define VBI3_SLICED_NABTS 0x00000100 #define VBI3_SLICED_TELETEXT_C_525 0x00000100 /** * Incorrect, don't use in new code. */ #define VBI3_SLICED_TELETEXT_BD_525 0x00000200 /** * Teletext System D for 525 line systems * * Reference: ITU-R BT.653 * "Teletext Systems" * * vbi3_sliced payload: Last 34 bytes, without clock run-in and * framing code, lsb first transmitted. */ #define VBI3_SLICED_TELETEXT_D_525 0x00020000 /** * Wide Screen Signalling for NTSC Japan * * Reference: EIA-J CPR-1204 * * vbi3_sliced payload: *
 * Byte         0                    1                  2
 *       msb         lsb  msb               lsb  msb             lsb
 * bit   7 6 5 4 3 2 1 0  15 14 13 12 11 10 9 8  x x x x 19 18 17 16
 * 
*/ #define VBI3_SLICED_WSS_CPR1204 0x00000800 /** * No actual data service. This symbol is used to request capturing * of all PAL/SECAM VBI data lines from the libzvbi driver interface, * as opposed to just those lines * used to transmit the requested data services. */ #define VBI3_SLICED_VBI3_625 0x20000000 /** * No actual data service. This symbol is used to request capturing * of all NTSC VBI data lines from the libzvbi driver interface, * as opposed to just those lines * used to transmit the requested data services. */ #define VBI3_SLICED_VBI3_525 0x40000000 /** @} */ /** * @ingroup Sliced * Data service identifier. A logical 'or' of VBI3_SLICED_ symbols. */ /* NB must be u32 for compatibility with older struct vbi3_sliced. */ typedef uint32_t vbi3_service_set; /** * @ingroup Sliced * @brief This structure holds one scan line of sliced vbi data. * * For example the contents of NTSC line 21, two bytes of Closed Caption * data. Usually an array of vbi3_sliced is used, covering all * VBI lines of the two fields of a video frame. */ typedef struct { /** * A @ref VBI3_SLICED_ symbol identifying the data service. Under cirumstances * (see VBI3_SLICED_TELETEXT_B) this can be a set of VBI3_SLICED_ symbols. */ vbi3_service_set id; /** * Source line number according to the ITU-R line numbering scheme, * a value of @c 0 if the exact line number is unknown. Note that some * data services cannot be reliable decoded without line number. * * @image html zvbi3_625.gif "ITU-R PAL/SECAM line numbering scheme" * @image html zvbi3_525.gif "ITU-R NTSC line numbering scheme" */ uint32_t line; /** * The actual payload. See the documentation of @ref VBI3_SLICED_ symbols * for details. */ uint8_t data[56]; } vbi3_sliced; /** * @addtogroup Sliced * @{ */ extern const char * vbi3_sliced_name (vbi3_service_set service) __attribute__ ((const)); extern unsigned int vbi3_sliced_payload_bits (vbi3_service_set service) __attribute__ ((const)); /** @} */ /* Private */ struct _vbi3_service_par; /* defined in raw_decoder.h */ typedef struct _vbi3_service_par vbi3_service_par; VBI3_END_DECLS #endif /* __ZVBI3_SLICED_H__ */ zapping-0.10cvs6/libvbi/top_title.c 644 764 144 17630 10260120346 12444 /* * libzvbi - Tables Of Pages * * Copyright (C) 2004 Michael H. Schimek * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. * * 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 this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* $Id: top_title.c,v 1.3 2005/06/28 00:59:18 mschimek Exp $ */ #include /* malloc(), qsort() */ #include "conv.h" /* _vbi3_strdup_locale_teletext() */ #include "lang.h" /* vbi3_character_set_code */ #include "cache-priv.h" #ifndef TOP_TITLE_LOG #define TOP_TITLE_LOG 0 #endif #define log(templ, args...) \ do { \ if (TOP_TITLE_LOG) \ fprintf (stderr, templ , ##args); \ } while (0) /** * Frees all resources associate with this vbi3_top_title * except the structure itself. */ void vbi3_top_title_destroy (vbi3_top_title * tt) { assert (NULL != tt); vbi3_free (tt->title); CLEAR (*tt); } /** * @param dst A copy of @a src will be stored here. * @param src vbi3_top_title to be copied. If @c NULL this function * has the same effect as vbi3_top_title_init(). * * Creates a deep copy of @a src in @a dst, overwriting the data * previously stored at @a dst. * * @returns * @c FALSE on failure (out of memory). */ vbi3_bool vbi3_top_title_copy (vbi3_top_title * dst, const vbi3_top_title * src) { if (dst == src) return TRUE; assert (NULL != dst); if (src) { char *title; if (!(title = strdup (src->title))) return FALSE; *dst = *src; dst->title = title; } else { CLEAR (*dst); } return TRUE; } /** * @param tt vbi3_top_title to be initialized. * * Initializes (clears) a vbi3_top_title structure. */ void vbi3_top_title_init (vbi3_top_title * tt) { assert (NULL != tt); CLEAR (*tt); } /** * @param tt Array of vbi3_top_title structures, can be @c NULL. * @param n_elements Number of structures in the array. * * Deletes an array of vbi3_top_title structures and all resources * associated with it. */ void vbi3_top_title_array_delete (vbi3_top_title * tt, unsigned int n_elements) { unsigned int i; if (NULL == tt || 0 == n_elements) return; for (i = 0; i < n_elements; ++i) vbi3_top_title_destroy (tt + i); vbi3_free (tt); } /** * @internal */ const ait_title * cache_network_get_ait_title (cache_network * cn, cache_page ** ait_cp, vbi3_pgno pgno, vbi3_subno subno) { unsigned int i; for (i = 0; i < 8; ++i) { cache_page *cp; const ait_title *ait; unsigned int j; if (cn->btt_link[i].function != PAGE_FUNCTION_AIT) continue; cp = _vbi3_cache_get_page (cn->cache, cn, cn->btt_link[i].pgno, cn->btt_link[i].subno, 0x3f7f); if (!cp) { log ("...top ait page %x not cached\n", cn->btt_link[i].pgno); continue; } else if (cp->function != PAGE_FUNCTION_AIT) { log ("...no ait page %x\n", cp->pgno); cache_page_unref (cp); continue; } ait = cp->data.ait.title; for (j = 0; j < N_ELEMENTS (cp->data.ait.title); ++j) { if (ait->page.pgno == pgno && (VBI3_ANY_SUBNO == subno || ait->page.subno == subno)) { *ait_cp = cp; return ait; } ++ait; } cache_page_unref (cp); } *ait_cp = NULL; return NULL; } static vbi3_bool _vbi3_top_title_from_ait_title (vbi3_top_title * tt, const cache_network * cn, const ait_title * ait, const vbi3_character_set *cs) { const page_stat *ps; char *title; title = _vbi3_strdup_locale_teletext (ait->text, N_ELEMENTS (ait->text), cs); if (!title) { /* Make vbi3_top_title_destroy() safe. */ vbi3_top_title_init (tt); return FALSE; } tt->title = title; tt->pgno = ait->page.pgno; tt->subno = ait->page.subno; ps = cache_network_const_page_stat (cn, ait->page.pgno); tt->group = (VBI3_TOP_GROUP == ps->page_type); return TRUE; } /** * @internal */ vbi3_bool cache_network_get_top_title (cache_network * cn, vbi3_top_title * tt, vbi3_pgno pgno, vbi3_subno subno) { cache_page *ait_cp; const ait_title *ait; const vbi3_character_set *char_set[2]; vbi3_bool r; assert (NULL != cn); assert (NULL != tt); if (!(ait = cache_network_get_ait_title (cn, &ait_cp, pgno, subno))) { /* Make vbi3_top_title_destroy() safe. */ vbi3_top_title_init (tt); return FALSE; } if (NO_PAGE (ait->page.pgno)) { cache_page_unref (ait_cp); vbi3_top_title_init (tt); return FALSE; } _vbi3_character_set_init (char_set, /* default en */ 0, /* default en */ 0, /* extension */ NULL, ait_cp); r = _vbi3_top_title_from_ait_title (tt, cn, ait, char_set[0]); cache_page_unref (ait_cp); return r; } /** */ vbi3_bool vbi3_cache_get_top_title (vbi3_cache * ca, vbi3_top_title * tt, const vbi3_network * nk, vbi3_pgno pgno, vbi3_subno subno) { cache_network *cn; vbi3_bool r; assert (NULL != ca); assert (NULL != tt); assert (NULL != nk); if (!(cn = _vbi3_cache_get_network (ca, nk))) { /* Make vbi3_top_title_destroy() safe. */ vbi3_top_title_init (tt); return FALSE; } r = cache_network_get_top_title (cn, tt, pgno, subno); cache_network_unref (cn); return r; } static int top_title_cmp (const void * p1, const void * p2) { const vbi3_top_title *tt1 = p1; const vbi3_top_title *tt2 = p2; if (tt1->pgno == tt2->pgno) return tt2->pgno - tt1->pgno; else return tt2->subno - tt2->subno; } /** * @internal */ vbi3_top_title * cache_network_get_top_titles (cache_network * cn, unsigned int * n_elements) { vbi3_top_title *tt; unsigned int size; unsigned int capacity; unsigned int i; assert (NULL != cn); assert (NULL != n_elements); capacity = 64; size = 0; if (!(tt = vbi3_malloc (capacity * sizeof (*tt)))) return NULL; for (i = 0; i < 8; ++i) { cache_page *cp; const ait_title *ait; const vbi3_character_set *char_set[2]; unsigned int j; if (cn->btt_link[i].function != PAGE_FUNCTION_AIT) continue; cp = _vbi3_cache_get_page (cn->cache, cn, cn->btt_link[i].pgno, cn->btt_link[i].subno, 0x3f7f); if (!cp) { log ("...top ait page %x not cached\n", cn->btt_link[i].pgno); continue; } else if (cp->function != PAGE_FUNCTION_AIT) { log ("...no ait page %x\n", cp->pgno); cache_page_unref (cp); continue; } _vbi3_character_set_init (char_set, /* default en */ 0, /* default en */ 0, /* extension */ NULL, cp); ait = cp->data.ait.title; for (j = 0; j < N_ELEMENTS (cp->data.ait.title); ++j) { if (NO_PAGE (ait->page.pgno)) { ++ait; continue; } if (size + 1 >= capacity) { vbi3_top_title *tt1; unsigned long n; n = sizeof (*tt) * 2 * capacity; if (!(tt1 = vbi3_realloc (tt, n))) { vbi3_top_title_array_delete (tt, size); cache_page_unref (cp); return NULL; } tt = tt1; capacity *= 2; } if (_vbi3_top_title_from_ait_title (tt + size, cn, ait, char_set[0])) { ++size; } ++ait; } cache_page_unref (cp); } /* Last element empty. */ vbi3_top_title_init (tt + size); if (0) { /* Make sure we're sorted by pgno. */ qsort (tt, size, sizeof (*tt), top_title_cmp); } *n_elements = size; return tt; } /** */ vbi3_top_title * vbi3_cache_get_top_titles (vbi3_cache * ca, const vbi3_network * nk, unsigned int * n_elements) { cache_network *cn; vbi3_top_title *tt; assert (NULL != ca); assert (NULL != nk); assert (NULL != n_elements); *n_elements = 0; if (!(cn = _vbi3_cache_get_network (ca, nk))) return NULL; tt = cache_network_get_top_titles (cn, n_elements); cache_network_unref (cn); return tt; } zapping-0.10cvs6/libvbi/top_title.h 644 764 144 3566 10177355230 12445 /* * libzvbi - Tables Of Pages * * Copyright (C) 2004 Michael H. Schimek * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* $Id: top_title.h,v 1.3 2005/01/31 07:13:28 mschimek Exp $ */ #ifndef __ZVBI3_TOP_TITLE_H__ #define __ZVBI3_TOP_TITLE_H__ #include #include "bcd.h" /* vbi3_pgno, vbi3_subno */ VBI3_BEGIN_DECLS /** * @brief Title of a page in a Table Of Pages array. */ typedef struct { /** Title of the page, localized. */ char * title; /** Page number. */ vbi3_pgno pgno; /** Subpage number or @c VBI3_ANY_SUBNO. */ vbi3_subno subno; /** * Whether this is the first page in a group or block. More * information is available through vbi3_cache_get_ttx_page_stat(). */ vbi3_bool group; int reserved[2]; } vbi3_top_title; extern void vbi3_top_title_destroy (vbi3_top_title * tt) __attribute__ ((_vbi3_nonnull (1))); extern vbi3_bool vbi3_top_title_copy (vbi3_top_title * dst, const vbi3_top_title * src) __attribute__ ((_vbi3_nonnull (1))); extern void vbi3_top_title_init (vbi3_top_title * tt) __attribute__ ((_vbi3_nonnull (1))); extern void vbi3_top_title_array_delete (vbi3_top_title * tt, unsigned int n_elements); VBI3_END_DECLS #endif /* __ZVBI3_TOP_TITLE_H__ */ zapping-0.10cvs6/libvbi/vbi_decoder-priv.h 644 764 144 4337 10305456044 13660 /* * libzvbi - VBI decoding library * * Copyright (C) 2000, 2001, 2002 Michael H. Schimek * Copyright (C) 2000, 2001 Iaki Garca Etxebarria * * Based on AleVT 1.5.1 * Copyright (C) 1998, 1999 Edgar Toernig * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* $Id: vbi_decoder-priv.h,v 1.1 2005/09/01 01:40:52 mschimek Exp $ */ #ifndef VBI3_DECODER_PRIV_H #define VBI3_DECODER_PRIV_H #include "caption_decoder-priv.h" #include "teletext_decoder-priv.h" /* vbi3_teletext_decoder */ #include "event.h" #ifndef ZAPPING8 # include "trigger.h" #endif #include "vbi_decoder.h" struct vbi3_decoder { /** Activity monitoring. */ double timestamp_teletext; double timestamp_caption; double timestamp_vps; double timestamp_wss_625; double timestamp_wss_cpr1204; #ifndef ZAPPING8 vbi3_aspect_ratio confirm_aspect_ratio; #endif #if 0 /* TODO */ vbi3_trigger * triggers; #endif /** * Remember past transmission errors: One bit for each call of * the decoder, most recent result in lsb. */ unsigned int error_history_vps; unsigned int error_history_wss_625; unsigned int error_history_wss_cpr1204; vbi3_teletext_decoder vt; vbi3_caption_decoder cc; double timestamp; double reset_time; teletext_reset_fn * teletext_reset; caption_reset_fn * caption_reset; _vbi3_event_handler_list handlers; }; extern void _vbi3_decoder_destroy (vbi3_decoder * vbi); extern vbi3_bool _vbi3_decoder_init (vbi3_decoder * vbi, vbi3_cache * ca, const vbi3_network * nk, vbi3_videostd_set videostd_set); #endif /* VBI3_DECODER_PRIV_H */ zapping-0.10cvs6/libvbi/cache.c 644 764 144 110753 10370717752 11543 /* * libzvbi - Teletext cache * * Copyright (C) 2001, 2002, 2003, 2004 Michael H. Schimek * * Based on code from AleVT 1.5.1 * Copyright (C) 1998, 1999 Edgar Toernig * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include "../site_def.h" #include /* malloc() */ #include "event-priv.h" #include "cache-priv.h" #ifndef CACHE_DEBUG # define CACHE_DEBUG 0 #endif #ifndef CACHE_STATUS # define CACHE_STATUS 0 #endif #ifndef CACHE_CONSISTENCY # define CACHE_CONSISTENCY 0 #endif /** @internal */ struct _vbi3_cache { /** * Teletext pages by pgno, most recently used at * head of list. Uses cache_page.hash_node. */ list hash[HASH_SIZE]; /** Total number of pages cached, for statistics. */ unsigned int n_pages; unsigned int ref_count; /** * Teletext pages to be replaced when out of memory, oldest at * head of list, uses cache_page.pri_node. */ list priority; /** Referenced Teletext pages, uses cache_page.pri_node. */ list referenced; /** * Memory used by all pages except referenced and zombies. (May * deadlock if all pages are referenced and the caller releases * only when receiving new pages.) */ unsigned long memory_used; unsigned long memory_limit; /** Cached networks, most recently used at head of list. */ list networks; /** Number of networks in cache except referenced and zombies. */ unsigned int n_networks; unsigned int network_limit; _vbi3_event_handler_list handlers; }; static void delete_all_pages (vbi3_cache * ca, cache_network * cn); static const char * cache_priority_name (cache_priority pri) { switch (pri) { #undef CASE #define CASE(pri) case CACHE_PRI_ ## pri : return #pri ; CASE (ZOMBIE) CASE (NORMAL) CASE (SPECIAL) default: assert (0); return NULL; } } static void cache_network_dump (const cache_network * cn, FILE * fp) { fprintf (fp, "network ref=%u referenced=%u zombie=%u", cn->ref_count, cn->n_referenced_pages, cn->zombie); } /* Removes Teletext page from network statistics. */ static void cache_network_remove_page (cache_network * cn, cache_page * cp) { page_stat *ps; if (CACHE_CONSISTENCY) assert (cn == cp->network); cp->network = NULL; --cn->n_pages; ps = cache_network_page_stat (cn, cp->pgno); --ps->n_subpages; } /* Adds Teletext page to network statistics. */ static void cache_network_add_page (cache_network * cn, cache_page * cp) { page_stat *ps; if (cn->zombie) { assert (NULL != cn->cache); ++cn->cache->n_networks; cn->zombie = FALSE; } cp->network = cn; ++cn->n_pages; /* Consistency check: page number range 0x100 ... 0x8FF including hex pages, and we store at most subpages 0x00 ... 0x79. */ if (CACHE_CONSISTENCY) assert (cn->n_pages <= 0x800 * 80); if (cn->n_pages > cn->max_pages) cn->max_pages = cn->n_pages; ps = cache_network_page_stat (cn, cp->pgno); ++ps->n_subpages; if (ps->n_subpages > ps->max_subpages) ps->max_subpages = ps->n_subpages; /* See above. */ if (CACHE_CONSISTENCY) assert (ps->n_subpages <= 80); /* Subno must be 0 (no subpages), 0x0 ... 0xF (system pages), 0x01 ... 0x79 bcd (regular subpages), 0x0000 ... 0x2359 bcd (clock pages). Note clock pages replace any page with same pgno, unless they have no page_type and subno is 0x0000 ... 0x0059. So we store at most 60 clock subpages. */ if (CACHE_CONSISTENCY) { assert (cp->subno >= 0); if (cp->subno >= 0x10) { assert (vbi3_is_bcd (cp->subno)); if (cp->subno >= 0x0100) { assert (cp->subno <= 0x2359); assert ((cp->subno & 0xFF) <= 0x59); } else { assert (cp->subno <= 0x79); } } } if (0 == ps->subno_min /* none yet */ || cp->subno < ps->subno_min) ps->subno_min = cp->subno; if (cp->subno > ps->subno_max) ps->subno_max = cp->subno; } static void delete_network (vbi3_cache * ca, cache_network * cn) { if (CACHE_CONSISTENCY) { assert (ca == cn->cache); assert (is_member (&ca->networks, &cn->node)); } if (CACHE_DEBUG) { fputs ("Delete ", stderr); cache_network_dump (cn, stderr); fputc ('\n', stderr); } if (cn->n_pages > 0) { /* Delete all unreferenced pages. */ delete_all_pages (ca, cn); } /* Zombies don't count. */ if (!cn->zombie) --ca->n_networks; if (ca->handlers.event_mask & VBI3_EVENT_REMOVE_NETWORK) { vbi3_event e; e.type = VBI3_EVENT_REMOVE_NETWORK; e.network = &cn->network; e.timestamp = 0; _vbi3_event_handler_list_send (&ca->handlers, &e); } if (cn->ref_count > 0 || cn->n_referenced_pages > 0) { cn->zombie = TRUE; return; } unlink_node (&cn->node); vbi3_network_destroy (&cn->network); #ifndef ZAPPING8 vbi3_program_info_destroy (&cn->program_info); vbi3_aspect_ratio_destroy (&cn->aspect_ratio); { vbi3_pid_channel ch; for (ch = 0; ch < N_ELEMENTS (cn->program_id); ++ch) vbi3_program_id_destroy (&cn->program_id[ch]); } #endif cache_network_destroy_caption (cn); cache_network_destroy_teletext (cn); CLEAR (*cn); vbi3_cache_free (cn); } /** * @internal * @param ca Cache allocated with vbi3_cache_new(). * * Deletes all cache contents. Referenced networks and Teletext pages * are marked for deletion when unreferenced. */ static void vbi3_cache_purge (vbi3_cache * ca) { cache_network *cn, *cn1; assert (NULL != ca); FOR_ALL_NODES (cn, cn1, &ca->networks, node) { delete_network (ca, cn); } } static void delete_surplus_networks (vbi3_cache * ca) { cache_network *cn, *cn1; /* Remove last recently used networks first. */ FOR_ALL_NODES_REVERSE (cn, cn1, &ca->networks, node) { if (cn->ref_count > 0 || cn->n_referenced_pages > 0) continue; if (cn->zombie || vbi3_network_is_anonymous (&cn->network) || ca->n_networks > ca->network_limit) delete_network (ca, cn); } } /** * @internal * @param ca Cache allocated with vbi3_cache_new(). * @param limit Number of networks. * * Limits the number of networks cached. The default is 1 * as in libzvbi 0.2. Currently each network takes about 16 KB * additional to the vbi3_cache_set_memory_limit(). * * When the number is smaller than the current number of networks * cached this function attempts to delete the data of the last * recently requested stations. */ void vbi3_cache_set_network_limit (vbi3_cache * ca, unsigned int limit) { assert (NULL != ca); ca->network_limit = SATURATE (limit, 1, 3000); delete_surplus_networks (ca); } static cache_network * network_by_id (vbi3_cache * ca, const vbi3_network * nk) { cache_network *cn, *cn1; /* Shortcut if this is one of our pointers (e.g. event->network). */ FOR_ALL_NODES (cn, cn1, &ca->networks, node) if (&cn->network == nk) goto found; if (nk->user_data) { FOR_ALL_NODES (cn, cn1, &ca->networks, node) if (cn->network.user_data == nk->user_data) goto found2; /* Perhaps no user_data has been assigned to this network yet. Try to find it by CNI or call_sign. */ } if (nk->cni_vps) { FOR_ALL_NODES (cn, cn1, &ca->networks, node) if (cn->network.cni_vps == nk->cni_vps) goto found3; /* Perhaps we did not receive nk->cni_vps yet but another CNI or call_sign. */ } if (nk->cni_8301) FOR_ALL_NODES (cn, cn1, &ca->networks, node) if (cn->network.cni_8301 == nk->cni_8301) goto found3; if (nk->cni_8302) FOR_ALL_NODES (cn, cn1, &ca->networks, node) if (cn->network.cni_8302 == nk->cni_8302) goto found3; if (nk->call_sign[0]) FOR_ALL_NODES (cn, cn1, &ca->networks, node) if (0 == strcmp (cn->network.call_sign, nk->call_sign)) goto found3; return NULL; /* All given IDs must match unless the ID is not stored yet. */ found3: if (nk->user_data && cn->network.user_data) return NULL; found2: if (nk->cni_vps && cn->network.cni_vps && cn->network.cni_vps != nk->cni_vps) return NULL; if (nk->cni_8301 && cn->network.cni_8301 && cn->network.cni_8301 != nk->cni_8301) return NULL; if (nk->cni_8302 && cn->network.cni_8302 && cn->network.cni_8302 != nk->cni_8302) return NULL; if (nk->call_sign[0] && cn->network.call_sign[0] && 0 != strcmp (cn->network.call_sign, nk->call_sign)) return NULL; found: /* Find faster next time, delete last. */ add_head (&ca->networks, unlink_node (&cn->node)); return cn; } static cache_network * recycle_network (vbi3_cache * ca) { cache_network *cn, *cn1; /* We absorb the last recently used cache_network without references. */ FOR_ALL_NODES_REVERSE (cn, cn1, &ca->networks, node) { if (0 == cn->ref_count && 0 == cn->n_referenced_pages) { goto found; } } return NULL; found: if (cn->n_pages > 0) delete_all_pages (ca, cn); unlink_node (&cn->node); cn->ref_count = 0; cn->zombie = FALSE; vbi3_network_destroy (&cn->network); cn->confirm_cni_vps = 0; cn->confirm_cni_8301 = 0; cn->confirm_cni_8302 = 0; #ifndef ZAPPING8 vbi3_program_info_destroy (&cn->program_info); vbi3_aspect_ratio_destroy (&cn->aspect_ratio); { vbi3_pid_channel ch; for (ch = 0; ch < N_ELEMENTS (cn->program_id); ++ch) vbi3_program_id_destroy (&cn->program_id[ch]); } #endif cn->n_pages = 0; cn->max_pages = 0; cn->n_referenced_pages = 0; cache_network_destroy_caption (cn); cache_network_destroy_teletext (cn); return cn; } static cache_network * add_network (vbi3_cache * ca, const vbi3_network * nk, vbi3_videostd_set videostd_set) { cache_network *cn; #ifdef ZAPPING8 videostd_set = videostd_set; /* unused, no warning */ #endif if (nk && (cn = network_by_id (ca, nk))) { /* Note does not merge nk. */ return cn; } if (ca->n_networks < ca->network_limit || NULL == (cn = recycle_network (ca))) { if (!(cn = vbi3_cache_malloc (sizeof (*cn)))) { if (CACHE_DEBUG) fprintf (stderr, "%s: out of memory\n", __FUNCTION__); return NULL; } CLEAR (*cn); ++ca->n_networks; } add_head (&ca->networks, &cn->node); cn->cache = ca; if (nk) vbi3_network_copy (&cn->network, nk); #ifndef ZAPPING8 vbi3_program_info_init (&cn->program_info); vbi3_aspect_ratio_init (&cn->aspect_ratio, videostd_set); for (ch = 0; ch < N_ELEMENTS (cn->program_id); ++ch) vbi3_program_id_init (&cn->program_id[ch], ch); #endif cache_network_init_caption (cn); cache_network_init_teletext (cn); return cn; } /** */ void vbi3_ttx_page_stat_destroy (vbi3_ttx_page_stat * ps) { assert (NULL != ps); CLEAR (*ps); } /** */ void vbi3_ttx_page_stat_init (vbi3_ttx_page_stat * ps) { assert (NULL != ps); CLEAR (*ps); ps->page_type = VBI3_UNKNOWN_PAGE; } /** * @internal */ void cache_network_get_ttx_page_stat (const cache_network * cn, vbi3_ttx_page_stat * ps, vbi3_pgno pgno) { const page_stat *ps1; assert (NULL != ps); ps1 = cache_network_const_page_stat (cn, pgno); if (VBI3_NORMAL_PAGE == (vbi3_page_type) ps1->page_type) { unsigned int flags; flags = ps1->flags & (C5_NEWSFLASH | C6_SUBTITLE | C7_SUPPRESS_HEADER); if ((C5_NEWSFLASH | C7_SUPPRESS_HEADER) == flags) ps->page_type = VBI3_NEWSFLASH_PAGE; else if ((C6_SUBTITLE | C7_SUPPRESS_HEADER) == flags) ps->page_type = VBI3_SUBTITLE_PAGE; else ps->page_type = VBI3_NORMAL_PAGE; } else { ps->page_type = (vbi3_page_type) ps1->page_type; } if (0xFF == ps1->charset_code) { /* Unknown. */ ps->character_set = NULL; } else { ps->character_set = vbi3_character_set_from_code ((vbi3_charset_code) ps1->charset_code); } if (ps1->subcode <= 9) ps->subpages = ps1->subcode; /* common */ else if (SUBCODE_UNKNOWN == ps1->subcode) ps->subpages = 0; else if (SUBCODE_MULTI_PAGE == ps1->subcode) ps->subpages = 2; /* two or more */ else if (ps1->subcode >= 0x80) ps->subpages = 0; /* non-standard (clock etc) */ else ps->subpages = vbi3_bcd2bin (ps1->subcode); ps->subno_min = (vbi3_subno) ps1->subno_min; ps->subno_max = (vbi3_subno) ps1->subno_max; } /** */ vbi3_bool vbi3_cache_get_ttx_page_stat (vbi3_cache * ca, vbi3_ttx_page_stat * ps, const vbi3_network * nk, vbi3_pgno pgno) { cache_network *cn; assert (NULL != ca); assert (NULL != ps); assert (NULL != nk); if (pgno < 0x100 || pgno > 0x8FF) return FALSE; if (!(cn = _vbi3_cache_get_network (ca, nk))) return FALSE; cache_network_get_ttx_page_stat (cn, ps, pgno); cache_network_unref (cn); return TRUE; } /** * DOCUMENT ME */ vbi3_network * vbi3_cache_get_networks (vbi3_cache * ca, unsigned int * n_elements) { vbi3_network *nk; cache_network *cn, *cn1; unsigned long size; unsigned int i; assert (NULL != ca); assert (NULL != n_elements); *n_elements = 0; if (0 == ca->n_networks) return NULL; /* Not ca->n_networks because we list zombies too. */ size = (list_length (&ca->networks) + 1) * sizeof (*nk); if (!(nk = vbi3_malloc (size))) { error ("Out of memory (%lu bytes)", size); return NULL; } i = 0; FOR_ALL_NODES (cn, cn1, &ca->networks, node) { if (vbi3_network_is_anonymous (&cn->network)) continue; if (!(vbi3_network_copy (nk + i, &cn->network))) { vbi3_network_array_delete (nk, i); return NULL; } ++i; } CLEAR (nk[i]); *n_elements = i; return nk; } /** * @internal * @param cn cache_network obtained with _vbi3_cache_add_cache_network() * or _vbi3_cache_get_cache_network(), can be @c NULL. * * Releases a network reference. */ void cache_network_unref (cache_network * cn) { vbi3_cache *ca; if (NULL == cn) return; assert (NULL != cn->cache); ca = cn->cache; if (CACHE_CONSISTENCY) assert (is_member (&ca->networks, &cn->node)); if (0 == cn->ref_count) { debug ("Unreferenced network %p", (void *) cn); return; } else if (1 == cn->ref_count) { cn->ref_count = 0; delete_surplus_networks (ca); } else { --cn->ref_count; } } /** * @internal * @param cn * * Duplicates a network reference. * * @returns * @a cn, never fails. */ cache_network * cache_network_ref (cache_network * cn) { assert (NULL != cn); ++cn->ref_count; return cn; } /** * @internal * @param ca Cache allocated with vbi3_cache_new(). * @param nk Identifies the network by cni_8301, cni_8302, cni_vps, * call_sign or user_data, whichever is non-zero. * * Finds a network in the cache. * * @returns * Pointer to a cache_network structure, @c NULL on error. You must call * _vbi3_cache_network_unref() when this reference is no longer * needed. */ cache_network * _vbi3_cache_get_network (vbi3_cache * ca, const vbi3_network * nk) { cache_network *cn; assert (NULL != ca); assert (NULL != nk); if ((cn = network_by_id (ca, nk))) { if (cn->zombie) { ++ca->n_networks; cn->zombie = FALSE; } ++cn->ref_count; } return cn; } /** * @internal * @param ca Cache allocated with vbi3_cache_new(). * @param nk Create network with this cni_8301, cni_8302, cni_vps, * call_sign or temp_id, whichever is non-zero. Can be @c NULL * to add an anonymous network. * * Adds a network to the cache. * * @returns * Pointer to a new cache_network structure, an already existing * structure or @c NULL on error. You must call * _vbi3_cache_network_unref() when this reference is no * longer needed. */ cache_network * _vbi3_cache_add_network (vbi3_cache * ca, const vbi3_network * nk, vbi3_videostd_set videostd_set) { cache_network *cn; assert (NULL != ca); if ((cn = add_network (ca, nk, videostd_set))) { ++cn->ref_count; } return cn; } /** internal */ void cache_page_dump (const cache_page * cp, FILE * fp) { const cache_network *cn; fprintf (fp, "page %x.%x ", cp->pgno, cp->subno); if ((cn = cp->network)) { const page_stat *ps; ps = cache_network_const_page_stat (cn, cp->pgno); fprintf (fp, "%s/L%u/S%04x subp=%u/%u (%u-%u) ", vbi3_page_type_name (ps->page_type), ps->charset_code, ps->subcode, ps->n_subpages, ps->max_subpages, ps->subno_min, ps->subno_max); } fprintf (stderr, "ref=%u %s", cp->ref_count, cache_priority_name (cp->priority)); } /** * @internal * @param cp Teletext page. * * @returns * Storage size required for the raw Teletext page, * depending on its function and the data union member used. */ unsigned int cache_page_size (const cache_page * cp) { const unsigned int header_size = sizeof (*cp) - sizeof (cp->data); switch (cp->function) { case PAGE_FUNCTION_UNKNOWN: case PAGE_FUNCTION_LOP: if (cp->x28_designations & 0x13) return header_size + sizeof (cp->data.ext_lop); else if (cp->x26_designations) return header_size + sizeof (cp->data.enh_lop); else return header_size + sizeof (cp->data.lop); case PAGE_FUNCTION_GPOP: case PAGE_FUNCTION_POP: return header_size + sizeof (cp->data.pop); case PAGE_FUNCTION_GDRCS: case PAGE_FUNCTION_DRCS: return header_size + sizeof (cp->data.drcs); case PAGE_FUNCTION_AIT: return header_size + sizeof (cp->data.ait); default: return sizeof (*cp); } } /** internal */ vbi3_bool cache_page_copy (cache_page * dst, const cache_page * src) { if (dst == src) return TRUE; assert (NULL != dst); if (src) { memcpy (dst, src, cache_page_size (src)); dst->network = NULL; /* not cached */ } else { CLEAR (*dst); } return TRUE; } vbi3_inline unsigned int hash (vbi3_pgno pgno) { return pgno % HASH_SIZE; } static vbi3_bool page_in_cache (const vbi3_cache * ca, const cache_page * cp) { const list *hash_list; const list *pri_list; if (CACHE_PRI_ZOMBIE == cp->priority) { /* Note cp->ref_count may be zero if the page is about to be deleted. */ return is_member (&ca->referenced, &cp->pri_node); } hash_list = &ca->hash[hash (cp->pgno)]; if (cp->ref_count > 0) pri_list = &ca->referenced; else pri_list = &ca->priority; return (is_member (hash_list, &cp->hash_node) && is_member (pri_list, &cp->pri_node)); } static void delete_page (vbi3_cache * ca, cache_page * cp) { if (CACHE_CONSISTENCY) { assert (NULL != cp->network); assert (ca == cp->network->cache); assert (page_in_cache (ca, cp)); } if (cp->ref_count > 0) { if (CACHE_PRI_ZOMBIE != cp->priority) { /* Remove from cache, mark for deletion. cp->pri_node remains on ca->referenced. */ unlink_node (&cp->hash_node); cp->priority = CACHE_PRI_ZOMBIE; } return; } if (CACHE_DEBUG) { fputs ("Delete ", stderr); cache_page_dump (cp, stderr); fputc (' ', stderr); cache_network_dump (cp->network, stderr); fputc ('\n', stderr); } if (CACHE_PRI_ZOMBIE != cp->priority) { /* Referenced and zombie pages don't count. */ ca->memory_used -= cache_page_size (cp); unlink_node (&cp->hash_node); } unlink_node (&cp->pri_node); cache_network_remove_page (cp->network, cp); vbi3_cache_free (cp); --ca->n_pages; } static void delete_all_pages (vbi3_cache * ca, cache_network * cn) { cache_page *cp, *cp1; if (CACHE_CONSISTENCY && NULL != cn) { assert (ca == cn->cache); assert (is_member (&ca->networks, &cn->node)); } FOR_ALL_NODES (cp, cp1, &ca->priority, pri_node) if (!cn || cp->network == cn) delete_page (ca, cp); } static void delete_surplus_pages (vbi3_cache * ca) { cache_priority pri; cache_page *cp, *cp1; for (pri = CACHE_PRI_NORMAL; pri <= CACHE_PRI_SPECIAL; ++pri) { FOR_ALL_NODES (cp, cp1, &ca->priority, pri_node) { if (ca->memory_used <= ca->memory_limit) return; else if (cp->priority == pri && 0 == cp->network->ref_count) delete_page (ca, cp); } } for (pri = CACHE_PRI_NORMAL; pri <= CACHE_PRI_SPECIAL; ++pri) { FOR_ALL_NODES (cp, cp1, &ca->priority, pri_node) { if (ca->memory_used <= ca->memory_limit) return; else if (cp->priority == pri) delete_page (ca, cp); } } } /** * @param ca Cache allocated with vbi3_cache_new(). * @param limit Amount of memory in bytes. * * Limits the amount of memory used by the Teletext page cache. Reasonable * values range from 16 KB to 1 GB, default is 1 GB as in libzvbi 0.2. * The number of pages transmitted by networks varies. Expect on the order * of one megabyte for a complete set. * * When the cache is too small to contain all pages of a network, * newly received pages will replace older pages. Pages of the * current network, or which have been recently requested, or will * likely be requested in the future, or take longer to reload * are last deleted. * * When @a limit is smaller than the amount of memory currently * used, this function attempts to delete an appropriate number of * pages. */ void vbi3_cache_set_memory_limit (vbi3_cache * ca, unsigned long limit) { assert (NULL != ca); ca->memory_limit = SATURATE (limit, 1 << 10, 1 << 30); delete_surplus_pages (ca); } static cache_page * page_by_pgno (vbi3_cache * ca, const cache_network * cn, vbi3_pgno pgno, vbi3_subno subno, vbi3_subno subno_mask) { list *hash_list; cache_page *cp, *cp1; if (CACHE_CONSISTENCY) { assert (ca == cn->cache); assert (is_member (&ca->networks, &cn->node)); } hash_list = ca->hash + hash (pgno); FOR_ALL_NODES (cp, cp1, hash_list, hash_node) { if (CACHE_DEBUG > 1) { fputs ("Try ", stderr); cache_page_dump (cp, stderr); fputc ('\n', stderr); } if (cp->pgno == pgno && (cp->subno & subno_mask) == subno && (!cn || cp->network == cn)) { /* Find faster next time. */ add_head (hash_list, unlink_node (&cp->hash_node)); return cp; } } return NULL; } /** * @internal * @param cp * * Unreferences a page returned by vbi3_cache_put_cache_page(), * vbi3_cache_get_cache_page(), or vbi3_page_new_cache_page_ref(). * @a cp can be @c NULL. */ void cache_page_unref (cache_page * cp) { vbi3_cache *ca; if (NULL == cp) return; assert (NULL != cp->network); assert (NULL != cp->network->cache); ca = cp->network->cache; if (CACHE_CONSISTENCY) assert (page_in_cache (ca, cp)); if (0 == cp->ref_count) { debug ("Unreferenced page %p", (void *) cp); return; } if (CACHE_DEBUG) { fputs ("Unref ", stderr); _vbi3_cache_dump (ca, stderr); fputc (' ', stderr); cache_page_dump (cp, stderr); } if (1 == cp->ref_count) { cache_network *cn; cp->ref_count = 0; cn = cp->network; switch (cp->priority) { case CACHE_PRI_ZOMBIE: delete_page (ca, cp); break; default: if (CACHE_DEBUG) { fputc (' ', stderr); cache_network_dump (cn, stderr); } add_tail (&ca->priority, unlink_node (&cp->pri_node)); ca->memory_used += cache_page_size (cp); break; } --cn->n_referenced_pages; if (cn->zombie && 0 == cn->n_referenced_pages && 0 == cn->ref_count) delete_network (ca, cn); if (ca->memory_used > ca->memory_limit) delete_surplus_pages (ca); } else { --cp->ref_count; } if (CACHE_DEBUG) fputc ('\n', stderr); } /** * @internal * @param cp * * Duplicates a page reference. * * @returns * @a cp, never fails. */ cache_page * cache_page_ref (cache_page * cp) { assert (NULL != cp); if (CACHE_DEBUG) { fputs ("Ref ", stderr); cache_page_dump (cp, stderr); } if (0 == cp->ref_count) { vbi3_cache *ca; cache_network *cn; cn = cp->network; ca = cn->cache; if (CACHE_DEBUG) { fputc (' ', stderr); cache_network_dump (cn, stderr); } if (cn->zombie) { ++ca->n_networks; cn->zombie = FALSE; } ++cn->n_referenced_pages; ca->memory_used -= cache_page_size (cp); add_tail (&ca->referenced, unlink_node (&cp->pri_node)); } if (CACHE_DEBUG) fputc ('\n', stderr); ++cp->ref_count; return cp; } /** * @internal * * Gets a page from the cache. When @a subno is @c VBI3_ANY_SUBNO, the most * recently received subpage of that page is returned. * * The reference counter of the page is incremented, you must call * cache_page_unref() to unreference the page. * * @return * cache_page pointer, NULL when the requested page is not cached. */ cache_page * _vbi3_cache_get_page (vbi3_cache * ca, cache_network * cn, vbi3_pgno pgno, vbi3_subno subno, vbi3_subno subno_mask) { cache_page *cp; assert (NULL != ca); assert (NULL != cn); assert (ca == cn->cache); if (CACHE_CONSISTENCY) assert (is_member (&ca->networks, &cn->node)); if (pgno < 0x100 || pgno > 0x8FF) { debug ("pgno 0x%x out of bounds", pgno); return NULL; } if (CACHE_DEBUG) { fprintf (stderr, "Get %x.%x/%x ", pgno, subno, subno_mask); _vbi3_cache_dump (ca, stderr); fputc (' ', stderr); cache_network_dump (cn, stderr); fputc ('\n', stderr); } if (VBI3_ANY_SUBNO == subno) subno_mask = 0; if (!(cp = page_by_pgno (ca, cn, pgno, subno, subno_mask))) goto failure; if (CACHE_DEBUG) { fputs ("Found ", stderr); cache_page_dump (cp, stderr); fputc ('\n', stderr); } return cache_page_ref (cp); failure: return NULL; } /** * @internal * For vbi3_search. */ int _vbi3_cache_foreach_page (vbi3_cache * ca, cache_network * cn, vbi3_pgno pgno, vbi3_subno subno, int dir, _vbi3_cache_foreach_cb *callback, void * user_data) { cache_page *cp; page_stat *ps; vbi3_bool wrapped; assert (NULL != ca); assert (NULL != cn); assert (NULL != callback); if (0 == cn->n_pages) return 0; if ((cp = _vbi3_cache_get_page (ca, cn, pgno, subno, -1))) { subno = cp->subno; } else if (VBI3_ANY_SUBNO == subno) { cp = NULL; subno = 0; } ps = cache_network_page_stat (cn, pgno); wrapped = FALSE; for (;;) { if (cp) { int r; r = callback (cp, wrapped, user_data); cache_page_unref (cp); cp = NULL; if (0 != r) return r; } subno += dir; while (0 == ps->n_subpages || subno < ps->subno_min || subno > ps->subno_max) { if (dir < 0) { --pgno; --ps; if (pgno < 0x100) { pgno = 0x8FF; ps = cache_network_page_stat(cn, pgno); wrapped = TRUE; } subno = ps->subno_max; } else { ++pgno; ++ps; if (pgno > 0x8FF) { pgno = 0x100; ps = cache_network_page_stat(cn, pgno); wrapped = TRUE; } subno = ps->subno_min; } } cp = _vbi3_cache_get_page (ca, cn, pgno, subno, -1); } } /** * @internal * @param ca Cache. * @param cn Network this page belongs to. * @param cp Teletext page to store in the cache. * * Puts a copy of @a cp in the cache. * * @returns * cache_page pointer (in the cache, not @a cp), NULL on failure * (out of memory). You must unref the returned page if no longer needed. */ cache_page * _vbi3_cache_put_page (vbi3_cache * ca, cache_network * cn, const cache_page * cp) { cache_page *death_row[20]; unsigned int death_count; cache_page *old_cp; long memory_available; /* NB can be < 0 */ long memory_needed; cache_priority pri; cache_page *new_cp; assert (NULL != ca); assert (NULL != cn); assert (NULL != cp); assert (ca == cn->cache); memory_needed = cache_page_size (cp); memory_available = ca->memory_limit - ca->memory_used; if (CACHE_CONSISTENCY) assert (is_member (&ca->networks, &cn->node)); if (CACHE_DEBUG) { fprintf (stderr, "Put %x.%x ", cp->pgno, cp->subno); _vbi3_cache_dump (ca, stderr); fputc (' ', stderr); cache_network_dump (cn, stderr); fputc (' ', stderr); } death_count = 0; { const page_stat *ps; vbi3_subno subno_mask; /* EN 300 706, A.1, E.2: Pages with subno > 0x79 do not really have subpages. In this case we use subno_mask zero, replacing any previously received subpage. XXX doesn't work for clock pages without page_type between 00:00 and 00:59. */ ps = cache_network_const_page_stat (cn, cp->pgno); if (VBI3_NONSTD_SUBPAGES == (vbi3_page_type) ps->page_type) subno_mask = 0; else subno_mask = - ((unsigned int) cp->subno <= 0x79); old_cp = page_by_pgno (ca, cn, cp->pgno, cp->subno & subno_mask, subno_mask); } if (old_cp) { if (CACHE_DEBUG) { fputs ("is cached ", stderr); cache_page_dump (old_cp, stderr); fputc (' ', stderr); } if (old_cp->ref_count > 0) { /* This page is still in use. We remove it from the cache and mark for deletion when unref'd. old_cp->pri_node remains on ca->referenced. */ unlink_node (&old_cp->hash_node); old_cp->priority = CACHE_PRI_ZOMBIE; old_cp = NULL; } else { /* Got our first replacement candidate. */ death_row[death_count++] = old_cp; memory_available += cache_page_size (old_cp); } } if (memory_available >= memory_needed) goto replace; /* Find more pages to replace until we have enough memory. */ for (pri = CACHE_PRI_NORMAL; pri <= CACHE_PRI_SPECIAL; ++pri) { cache_page *cp, *cp1; FOR_ALL_NODES (cp, cp1, &ca->priority, pri_node) { if (memory_available >= memory_needed) goto replace; if (pri != cp->priority || cp->network->ref_count > 0 || cp == old_cp) continue; assert (death_count < N_ELEMENTS (death_row)); death_row[death_count++] = cp; memory_available += cache_page_size (cp); } } for (pri = CACHE_PRI_NORMAL; pri <= CACHE_PRI_SPECIAL; ++pri) { cache_page *cp, *cp1; FOR_ALL_NODES (cp, cp1, &ca->priority, pri_node) { if (memory_available >= memory_needed) goto replace; if (pri != cp->priority || cp == old_cp) continue; assert (death_count < N_ELEMENTS (death_row)); death_row[death_count++] = cp; memory_available += cache_page_size (cp); } } if (CACHE_DEBUG) { fprintf (stderr, "need %lu bytes but only %lu available ", memory_needed, memory_available); } goto failure; replace: if (memory_available == memory_needed && 1 == death_count) { /* Usually we can replace a single page of same size. */ new_cp = death_row[0]; if (CACHE_DEBUG) { fputs ("reusing ", stderr); cache_page_dump (new_cp, stderr); fputc (' ', stderr); } unlink_node (&new_cp->pri_node); unlink_node (&new_cp->hash_node); cache_network_remove_page (new_cp->network, new_cp); ca->memory_used -= memory_needed; } else { unsigned int i; if (!(new_cp = vbi3_cache_malloc ((size_t) memory_needed))) { if (CACHE_DEBUG) fputs ("out of memory ", stderr); goto failure; } for (i = 0; i < death_count; ++i) delete_page (ca, death_row[i]); ++ca->n_pages; } add_head (ca->hash + hash (cp->pgno), &new_cp->hash_node); /* 100, 200, 300, ... magazine start page. */ if (0x00 == (cp->pgno & 0xFF)) new_cp->priority = CACHE_PRI_SPECIAL; /* 111, 222, 333, ... magic page number. */ else if ((cp->pgno >> 4) == (cp->pgno & 0xFF)) new_cp->priority = CACHE_PRI_SPECIAL; /* Something we may not want in cache, much less all subpages. */ else if (PAGE_FUNCTION_UNKNOWN == cp->function) new_cp->priority = CACHE_PRI_NORMAL; /* POP, GPOP, DRCS, GDRCS */ else if (PAGE_FUNCTION_LOP != cp->function) new_cp->priority = CACHE_PRI_SPECIAL; /* Regular subpage, not clock, not rotating ads etc. */ else if (cp->subno > 0x00 && cp->subno < 0x79) new_cp->priority = CACHE_PRI_SPECIAL; else new_cp->priority = CACHE_PRI_NORMAL; new_cp->function = cp->function; new_cp->pgno = cp->pgno; new_cp->subno = cp->subno; new_cp->national = cp->national; new_cp->flags = cp->flags; new_cp->lop_packets = cp->lop_packets; new_cp->x26_designations = cp->x26_designations; new_cp->x27_designations = cp->x27_designations; new_cp->x28_designations = cp->x28_designations; memcpy (&new_cp->data, &cp->data, memory_needed - (sizeof (*new_cp) - sizeof (new_cp->data))); new_cp->ref_count = 1; ca->memory_used += 0; /* see _vbi3_cache_get_page() */ ++cn->n_referenced_pages; add_tail (&ca->referenced, &new_cp->pri_node); cache_network_add_page (cn, new_cp); if (CACHE_DEBUG) { fputc ('\n', stderr); } if (CACHE_STATUS) { fprintf (stderr, "cache status:\n"); _vbi3_cache_dump (ca, stderr); fputc ('\n', stderr); cache_page_dump (new_cp, stderr); fputc ('\n', stderr); cache_network_dump (new_cp->network, stderr); fputc ('\n', stderr); } return new_cp; failure: if (CACHE_DEBUG) { fputc ('\n', stderr); } return NULL; } /** @internal */ void _vbi3_cache_dump (const vbi3_cache * ca, FILE * fp) { fprintf (fp, "cache ref=%u pages=%u mem=%lu/%lu KiB networks=%u/%u", ca->ref_count, ca->n_pages, (ca->memory_used + 1023) >> 10, (ca->memory_limit + 1023) >> 10, ca->n_networks, ca->network_limit); } /** * @param ca Cache allocated with vbi3_cache_new(). * @param callback Function to be called on events. * @param user_data User pointer passed through to the @a callback function. * * Removes an event handler from the cache, if a handler with * this @a callback and @a user_data has been registered. You can * safely call this function from a handler removing itself or another * handler. */ void vbi3_cache_remove_event_handler (vbi3_cache * ca, vbi3_event_cb * callback, void * user_data) { assert (NULL != ca); _vbi3_event_handler_list_remove_by_callback (&ca->handlers, callback, user_data); } /** * @param ca Cache allocated with vbi3_cache_new(). * @param event_mask Set of events (@c VBI3_EVENT_) the handler is waiting * for, can be -1 for all and 0 for none. * @param callback Function to be called on events. * @param user_data User pointer passed through to the @a callback function. * * Adds a new event handler to the cache. When the @a callback * with @a user_data is already registered the function merely changes the * set of events it will receive in the future. When the @a event_mask is * empty the function does nothing or removes an already registered event * handler. You can safely call this function from an event handler. * * Any number of handlers can be added, also different handlers for the * same event which will be called in registration order. * * Currently the following events are supported: * @c VBI3_EVENT_REMOVE_NETWORK. * * @returns * @c FALSE of failure (out of memory). */ vbi3_bool vbi3_cache_add_event_handler (vbi3_cache * ca, vbi3_event_mask event_mask, vbi3_event_cb * callback, void * user_data) { assert (NULL != ca); event_mask &= VBI3_EVENT_REMOVE_NETWORK; if (0 == event_mask) return TRUE; return (NULL != _vbi3_event_handler_list_add (&ca->handlers, event_mask, callback, user_data)); } /** * @param ca Cache allocated with vbi3_cache_new(), can be @c NULL. * * Frees all resources associated with the cache, regardless of * any remaining references to it. */ void vbi3_cache_delete (vbi3_cache * ca) { unsigned int i; if (NULL == ca) return; vbi3_cache_purge (ca); if (!is_empty (&ca->referenced)) { debug ("Some cached pages still referenced, memory leaks"); } if (!is_empty (&ca->networks)) { debug ("Some cached networks still referenced, memory leaks"); } _vbi3_event_handler_list_destroy (&ca->handlers); list_destroy (&ca->networks); list_destroy (&ca->priority); list_destroy (&ca->referenced); for (i = 0; i < N_ELEMENTS (ca->hash); ++i) list_destroy (ca->hash + i); CLEAR (*ca); vbi3_free (ca); } /** * @param ca Cache allocated with vbi3_cache_new(), can be @c NULL. * * Releases a cache reference. When this is the last reference * the function calls vbi3_cache_delete(). */ void vbi3_cache_unref (vbi3_cache * ca) { if (NULL == ca) return; if (1 == ca->ref_count) { vbi3_cache_delete (ca); } else { --ca->ref_count; } } /** * @param ca Cache allocated with vbi3_cache_new(). * * Creates a new reference to the cache. * * @returns * @a ca. You must call vbi3_cache_unref() when the reference is * no longer needed. */ vbi3_cache * vbi3_cache_ref (vbi3_cache * ca) { assert (NULL != ca); ++ca->ref_count; return ca; } /** * Allocates a new cache for VBI decoders. * * A cache is a shared object with a reference counter. To create * a new reference call vbi3_cache_ref(). * * @returns * Pointer to newly allocated cache which must be freed with * vbi3_cache_unref() or vbi3_cache_delete() when done. @c NULL on * failure (out of memory). */ vbi3_cache * vbi3_cache_new (void) { vbi3_cache *ca; unsigned int i; if (!(ca = vbi3_malloc (sizeof (*ca)))) { error ("Out of memory (%u bytes)", sizeof (*ca)); return NULL; } CLEAR (*ca); for (i = 0; i < N_ELEMENTS (ca->hash); ++i) list_init (ca->hash + i); list_init (&ca->referenced); list_init (&ca->priority); list_init (&ca->networks); ca->memory_limit = 1 << 30; ca->network_limit = 1; ca->ref_count = 1; if (!_vbi3_event_handler_list_init (&ca->handlers)) { vbi3_cache_delete (ca); ca = NULL; } return ca; } zapping-0.10cvs6/libvbi/cache.h 644 764 144 21146 10305456044 11515 /* * libzvbi - Network cache * * Copyright (C) 2001, 2002, 2003, 2004 Michael H. Schimek * * Based on code from AleVT 1.5.1 * Copyright (C) 1998, 1999 Edgar Toernig * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* $Id: cache.h,v 1.18 2005/09/01 01:40:52 mschimek Exp $ */ #ifndef __ZVBI3_CACHE_H__ #define __ZVBI3_CACHE_H__ #include #include "network.h" #include "page.h" #include "top_title.h" #include "event.h" VBI3_BEGIN_DECLS /* in format.h */ /* typedef struct _vbi3_cache vbi3_cache; */ /** * @brief Teletext page type. * * Some networks provide information to classify Teletext pages, * this can be used for example to automatically find program schedule * and subtitle pages. See also x(). */ typedef enum { VBI3_NO_PAGE = 0x00, VBI3_NORMAL_PAGE = 0x01, VBI3_TOP_BLOCK = 0x60, /* libzvbi private */ VBI3_TOP_GROUP = 0x61, /* libzvbi private */ VBI3_NEWSFLASH_PAGE = 0x62, /* libzvbi private */ VBI3_SUBTITLE_PAGE = 0x70, VBI3_SUBTITLE_INDEX = 0x78, VBI3_NONSTD_SUBPAGES = 0x79, VBI3_PROGR_WARNING = 0x7A, VBI3_CURRENT_PROGR = 0x7C, VBI3_NOW_AND_NEXT = 0x7D, VBI3_PROGR_INDEX = 0x7F, VBI3_NOT_PUBLIC = 0x80, VBI3_PROGR_SCHEDULE = 0x81, VBI3_CA_DATA = 0xE0, VBI3_PFC_EPG_DATA = 0xE3, VBI3_PFC_DATA = 0xE4, VBI3_DRCS_PAGE = 0xE5, VBI3_POP_PAGE = 0xE6, VBI3_SYSTEM_PAGE = 0xE7, VBI3_KEYWORD_SEARCH_LIST = 0xF9, VBI3_TRIGGER_DATA = 0xFC, VBI3_ACI_PAGE = 0xFD, VBI3_TOP_PAGE = 0xFE, /* MPT, AIT, MPT-EX */ VBI3_UNKNOWN_PAGE = 0xFF, /* libzvbi private */ } vbi3_page_type; /* in packet.c */ extern const char * vbi3_page_type_name (vbi3_page_type type) __attribute__ ((const)); /** * @brief Meta data and statistical info about a cached Teletext page. * * Note the page this information refers to may not be cached yet * (e.g. data from Teletext page inventory tables) or not anymore. */ typedef struct { /* XXX add pgno and timestamp? */ /** Teletext page type. */ vbi3_page_type page_type; /** * Primary character set used on the page. You might use * this as a subtitle language hint. @c NULL if unknown. */ const vbi3_character_set *character_set; /** Expected number of subpages: 0 or 2 ... 79. */ unsigned int subpages; /** Lowest subno received yet. */ vbi3_subno subno_min; /** Highest subno received yet. */ vbi3_subno subno_max; void * reserved1[2]; unsigned int reserved2[2]; } vbi3_ttx_page_stat; extern void vbi3_ttx_page_stat_destroy (vbi3_ttx_page_stat * ps) __attribute__ ((_vbi3_nonnull (1))); extern void vbi3_ttx_page_stat_init (vbi3_ttx_page_stat * ps) __attribute__ ((_vbi3_nonnull (1))); extern vbi3_bool vbi3_cache_get_ttx_page_stat (vbi3_cache * ca, vbi3_ttx_page_stat * ps, const vbi3_network * nk, vbi3_pgno pgno) __attribute__ ((_vbi3_nonnull (1, 2, 3))); extern vbi3_bool vbi3_cache_get_top_title (vbi3_cache * ca, vbi3_top_title * tt, const vbi3_network * nk, vbi3_pgno pgno, vbi3_subno subno) __attribute__ ((_vbi3_nonnull (1, 2, 3))); extern vbi3_top_title * vbi3_cache_get_top_titles (vbi3_cache * ca, const vbi3_network * nk, unsigned int * n_elements) __attribute__ ((_vbi3_nonnull (1, 2, 3))); /** * @brief Values for the vbi3_format_option @c VBI3_WST_LEVEL. */ typedef enum { /** * Level 1 - Basic Teletext pages. All pages can be formatted * like this since networks transmit Level 1 data as fallback * for older Teletext decoders. */ VBI3_WST_LEVEL_1, /** * Level 1.5 - Additional national and graphics characters. */ VBI3_WST_LEVEL_1p5, /** * Level 2.5 - Additional text styles, more colors, DRCS, side * panels. You should enable Level 2.5 only if you can render * and/or export such pages. */ VBI3_WST_LEVEL_2p5, /** * Level 3.5 - Multicolor DRCS, proportional script. */ VBI3_WST_LEVEL_3p5 } vbi3_wst_level; /** * @brief Page formatting options. * * Pass formatting options as a vector of option pairs, consisting * of an option number and value. The last option number must be @c VBI3_END. * * function (foo, bar, * VBI3_PADDING, TRUE, * VBI3_DEFAULT_CHARSET_0, 15, * VBI3_HEADER_ONLY, FALSE, * VBI3_END); */ /* We use random numbering assuming the variadic functions using these values stop reading when they encounter an unknown number (VBI3_END is zero). Parameters shall be only int or pointer (vbi3_bool is an int, enum is an int) for proper automatic casts. */ typedef enum { /** * Format only the first row. * Parameter: vbi3_bool, default FALSE. */ VBI3_HEADER_ONLY = 0x37138F00, /** * Often column 0 of a page contains all black spaces, * unlike column 39. Enabling this option will result in * a more balanced view. * Parameter: vbi3_bool, default FALSE. */ VBI3_PADDING, /** * Not implemented yet. * Format the page with side panels if it has any. This * option takes precedence over VBI3_41_COLUMNS if side panels * are present. * Parameter: vbi3_bool, default FALSE. */ VBI3_PANELS, /** * Enable TOP or FLOF navigation in row 25. * - 0 disable * - 1 FLOF or TOP style 1 * - 2 FLOF or TOP style 2 * Parameter: int, default 0. */ VBI3_NAVIGATION, /** * Scan the page for page numbers, URLs, e-mail addresses * etc. and create hyperlinks. * Parameter: vbi3_bool, default FALSE. */ VBI3_HYPERLINKS, /** * Scan the page for PDC Method A/B preselection data * and create a PDC table and links. * Parameter: vbi3_bool, default FALSE. */ VBI3_PDC_LINKS, /** * Format the page at the given Teletext implementation level. * Parameter: vbi3_wst_level, default VBI3_WST_LEVEL_1. */ VBI3_WST_LEVEL, /** * The default character set code. Codes transmitted by the * network take precedence. When the network transmits only the * three last significant bits, this value provides the higher * bits, or if this yields no valid code all bits. * Parameter: vbi3_charset_code, default 0 (English). */ VBI3_DEFAULT_CHARSET_0, /** * Same as VBI3_DEFAULT_CHARSET_0, for secondary character set. */ VBI3_DEFAULT_CHARSET_1, /** * Overrides the primary character set code of a page. This takes * precedence over VBI3_DEFAULT_CHARSET_0 and any code transmitted * by the network. * Parameter: vbi3_charset_code, default is transmitted value. */ VBI3_OVERRIDE_CHARSET_0, /** * Same as VBI3_OVERRIDE_CHARSET_0, for secondary character set. */ VBI3_OVERRIDE_CHARSET_1, VBI3_DEFAULT_FOREGROUND, /* XXX document me */ VBI3_DEFAULT_BACKGROUND, VBI3_ROW_CHANGE, } vbi3_format_option; /* in teletext.c */ extern vbi3_page * vbi3_cache_get_teletext_page_va_list (vbi3_cache * ca, const vbi3_network * nk, vbi3_pgno pgno, vbi3_subno subno, va_list format_options) __attribute__ ((_vbi3_nonnull (1, 2))); extern vbi3_page * vbi3_cache_get_teletext_page (vbi3_cache * ca, const vbi3_network * nk, vbi3_pgno pgno, vbi3_subno subno, ...) __attribute__ ((_vbi3_nonnull (1, 2))); /* in cache.c */ extern vbi3_network * vbi3_cache_get_networks (vbi3_cache * ca, unsigned int * n_elements) __attribute__ ((_vbi3_nonnull (1, 2))); /* in cache.c */ extern void vbi3_cache_remove_event_handler (vbi3_cache * ca, vbi3_event_cb * callback, void * user_data) __attribute__ ((_vbi3_nonnull (1))); extern vbi3_bool vbi3_cache_add_event_handler (vbi3_cache * ca, vbi3_event_mask event_mask, vbi3_event_cb * callback, void * user_data) __attribute__ ((_vbi3_nonnull (1))); extern void vbi3_cache_set_memory_limit (vbi3_cache * ca, unsigned long limit) __attribute__ ((_vbi3_nonnull (1))); extern void vbi3_cache_set_network_limit (vbi3_cache * ca, unsigned int limit) __attribute__ ((_vbi3_nonnull (1))); extern void vbi3_cache_unref (vbi3_cache * ca); extern vbi3_cache * vbi3_cache_ref (vbi3_cache * ca) __attribute__ ((_vbi3_nonnull (1))); extern void vbi3_cache_delete (vbi3_cache * ca); extern vbi3_cache * vbi3_cache_new (void) __attribute__ ((malloc)); VBI3_END_DECLS #endif /* __ZVBI3_CACHE_H__ */ zapping-0.10cvs6/libvbi/teletext.c 644 764 144 246235 10305456044 12333 /* * libzvbi - Teletext formatter * * Copyright (C) 2000, 2001, 2002, 2003 Michael H. Schimek * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. * * 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 this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* $Id: teletext.c,v 1.37 2005/09/01 01:40:52 mschimek Exp $ */ #include "site_def.h" #ifdef HAVE_CONFIG_H # include "config.h" #endif #include #include #include #include #include #include #ifdef ZAPPING8 # include "common/intl-priv.h" #else # include "intl-priv.h" #endif #include "cache-priv.h" #include "teletext_decoder-priv.h" #ifndef ZAPPING8 #include "export.h" #include "vbi.h" #endif #include "hamm.h" #include "lang.h" #include "pdc.h" #include "misc.h" #include "page-priv.h" #include "conv.h" #ifndef TELETEXT_FMT_LOG #define TELETEXT_FMT_LOG 0 #endif #define fmt_log(templ, args...) \ do { \ if (TELETEXT_FMT_LOG) \ fprintf (stderr, templ , ##args); \ } while (0) #define PGP_CHECK(ret_value) \ do { \ assert (NULL != pg); \ \ pgp = CONST_PARENT (pg, vbi3_page_priv, pg); \ \ if (pg->priv != pgp) \ return ret_value; \ } while (0) static vbi3_bool enhance (vbi3_page_priv * pgp, object_type type, const triplet * trip, unsigned int n_triplets, unsigned int inv_row, unsigned int inv_column); void _vbi3_page_priv_dump (const vbi3_page_priv * pgp, FILE * fp, unsigned int mode) { unsigned int row; unsigned int column; const vbi3_char *acp; acp = pgp->pg.text; for (row = 0; row < pgp->pg.rows; ++row) { fprintf (fp, "%2u: ", row); for (column = 0; column < pgp->pg.columns; ++column) { int c; switch (mode) { case 0: c = acp->unicode; if (c < 0x20 || c >= 0x7F) c = '.'; fputc (c, fp); break; case 1: fprintf (fp, "%04x ", acp->unicode); break; case 2: fprintf (fp, "%04xF%uB%uS%uO%uL%u%u ", acp->unicode, acp->foreground, acp->background, acp->size, acp->opacity, !!(acp->attr & VBI3_LINK), !!(acp->attr & VBI3_PDC)); break; } ++acp; } fputc ('\n', fp); } } /** * @internal */ void _vbi3_character_set_init (const vbi3_character_set *charset[2], vbi3_charset_code default_code_0, vbi3_charset_code default_code_1, const extension * ext, const cache_page * cp) { unsigned int i; /* Primary and secondary. */ for (i = 0; i < 2; ++i) { const vbi3_character_set *cs; vbi3_charset_code code; code = i ? default_code_1 : default_code_0; if (ext && (ext->designations & 0x11)) { /* Have X/28/0 or M/29/0 or /4. */ code = ext->charset_code[i]; } cs = vbi3_character_set_from_code ((code & (unsigned int) ~7) + cp->national); if (!cs) cs = vbi3_character_set_from_code (code); if (!cs) cs = vbi3_character_set_from_code (0); charset[i] = cs; } } /** * @param level Return primary (0) or secondary (1) character set. * * @returns * The default character set associated with a Teletext page. * @c NULL if @a pg is no Teletext page. */ const vbi3_character_set * vbi3_page_get_character_set (const vbi3_page * pg, unsigned int level) { const vbi3_page_priv *pgp; PGP_CHECK (NULL); if (pgp->pg.pgno < 0x100) return NULL; return pgp->char_set[level & 1]; } static void init_screen_color (vbi3_page * pg, unsigned int flags, unsigned int color) { pg->screen_color = color; if (color == VBI3_TRANSPARENT_BLACK || (flags & (C5_NEWSFLASH | C6_SUBTITLE))) pg->screen_opacity = VBI3_TRANSPARENT_SPACE; else pg->screen_opacity = VBI3_OPAQUE; } /* Level One Page ---------------------------------------------------------- */ static vbi3_bool level_one_row (vbi3_page_priv * pgp, unsigned int row) { static const unsigned int mosaic_separate = 0xEE00 - 0x20; static const unsigned int mosaic_contiguous = 0xEE20 - 0x20; const vbi3_character_set *cs; unsigned int mosaic_plane; unsigned int held_mosaic_unicode; vbi3_bool hold; vbi3_bool mosaic; vbi3_bool double_height_row; vbi3_bool wide_char; const uint8_t *rawp; int raw; vbi3_char *acp; vbi3_char ac; unsigned int column; rawp = pgp->cp->data.lop.raw[row]; acp = pgp->pg.text + row * pgp->pg.columns; /* G1 block mosaic, blank, contiguous. */ held_mosaic_unicode = mosaic_contiguous + 0x20; CLEAR (ac); ac.unicode = 0x0020; ac.foreground = pgp->ext->foreground_clut + VBI3_WHITE; ac.background = pgp->ext->background_clut + VBI3_BLACK; mosaic_plane = mosaic_contiguous; ac.opacity = pgp->page_opacity[row > 0]; cs = pgp->char_set[0]; hold = FALSE; mosaic = FALSE; double_height_row = FALSE; wide_char = FALSE; for (column = 0; column < 40; ++column) { raw = vbi3_unpar8 (*rawp++); if ((0 == row && column < 8) || raw < 0) raw = 0x20; /* Set-at spacing attributes. */ switch (raw) { case 0x09: /* steady */ ac.attr &= ~VBI3_FLASH; break; case 0x0C: /* normal size */ ac.size = VBI3_NORMAL_SIZE; break; case 0x18: /* conceal */ ac.attr |= VBI3_CONCEAL; break; case 0x19: /* contiguous mosaics */ mosaic_plane = mosaic_contiguous; break; case 0x1A: /* separated mosaics */ mosaic_plane = mosaic_separate; break; case 0x1C: /* black background */ ac.background = pgp->ext->background_clut + VBI3_BLACK; break; case 0x1D: /* new background */ ac.background = pgp->ext->background_clut + (ac.foreground & 7); break; case 0x1E: /* hold mosaic */ hold = TRUE; break; default: break; } if (raw <= 0x1F) { ac.unicode = (hold & mosaic) ? held_mosaic_unicode : 0x0020; } else { if (mosaic && (raw & 0x20)) { held_mosaic_unicode = mosaic_plane + raw; ac.unicode = held_mosaic_unicode; } else { ac.unicode = vbi3_teletext_unicode (cs->g0, cs->subset, (unsigned int) raw); } } if (wide_char) { wide_char = FALSE; } else { acp[column] = ac; wide_char = !!(ac.size & VBI3_DOUBLE_WIDTH); if (wide_char && column < 39) { acp[column + 1] = ac; acp[column + 1].size = VBI3_OVER_TOP; } } /* Set-after spacing attributes. */ switch (raw) { case 0x00 ... 0x07: /* alpha + foreground color */ ac.foreground = pgp->ext->foreground_clut + (raw & 7); ac.attr &= ~VBI3_CONCEAL; mosaic = FALSE; break; case 0x08: /* flash */ ac.attr |= VBI3_FLASH; break; case 0x0A: /* end box */ /* 12.2 Table 26: Double transmission as additional error protection. */ if (column >= 39) break; if (0x0A == vbi3_unpar8 (*rawp)) ac.opacity = pgp->page_opacity[row > 0]; break; case 0x0B: /* start box */ /* 12.2 Table 26: Double transmission as additional error protection. */ if (column >= 39) break; if (0x0B == vbi3_unpar8 (*rawp)) ac.opacity = pgp->boxed_opacity[row > 0]; break; case 0x0D: /* double height */ if (row == 0 || row >= 23) break; ac.size = VBI3_DOUBLE_HEIGHT; double_height_row = TRUE; break; case 0x0E: /* double width */ if (column >= 39) break; ac.size = VBI3_DOUBLE_WIDTH; break; case 0x0F: /* double size */ if (column >= 39 || row == 0 || row >= 23) break; ac.size = VBI3_DOUBLE_SIZE; double_height_row = TRUE; break; case 0x10 ... 0x17: /* mosaic + foreground color */ ac.foreground = pgp->ext->foreground_clut + (raw & 7); ac.attr &= ~VBI3_CONCEAL; mosaic = TRUE; break; case 0x1B: /* ESC */ cs = pgp->char_set[cs == pgp->char_set[0]]; break; case 0x1F: /* release mosaic */ hold = FALSE; break; } } return double_height_row; } static void level_one_extend_row (vbi3_page_priv * pgp, unsigned int row) { vbi3_char *acp; unsigned int column; /* 12.2 Table 26: When double height (or double size) characters are used on a given row, the row below normal height characters on that row is displayed with the same local background colour and no foreground data. */ acp = pgp->pg.text + row * pgp->pg.columns; for (column = 0; column < pgp->pg.columns; ++column) { vbi3_char ac = acp[column]; switch (ac.size) { case VBI3_DOUBLE_HEIGHT: ac.size = VBI3_DOUBLE_HEIGHT2; acp[pgp->pg.columns + column] = ac; break; case VBI3_DOUBLE_SIZE: ac.size = VBI3_DOUBLE_SIZE2; acp[pgp->pg.columns + column] = ac; ++column; ac.size = VBI3_OVER_BOTTOM; acp[pgp->pg.columns + column] = ac; break; case VBI3_NORMAL_SIZE: case VBI3_DOUBLE_WIDTH: case VBI3_OVER_TOP: ac.size = VBI3_NORMAL_SIZE; ac.unicode = 0x0020; acp[pgp->pg.columns + column] = ac; break; default: assert (0); } } } /** * @internal * @param pgp Current vbi3_page. * * Formats a level one page. */ static void level_one_page (vbi3_page_priv * pgp) { unsigned int row; for (row = 0; row < pgp->pg.rows; ++row) { vbi3_bool double_height_row; double_height_row = level_one_row (pgp, row); if (double_height_row) { level_one_extend_row (pgp, row); ++row; } } if (0) _vbi3_page_priv_dump (pgp, stderr, 0); } /* Level One Page Enhancement ---------------------------------------------- */ static cache_page * get_system_page (const vbi3_page_priv * pgp, vbi3_pgno pgno, vbi3_subno subno, page_function function) { cache_page *cp; cache_page *cp1; cp = _vbi3_cache_get_page (pgp->pg.cache, /* const cast */ (cache_network *) pgp->cn, pgno, subno, 0x000F); if (!cp) { fmt_log ("... page %03x.%04x not cached\n", pgno, subno); goto failure; } switch (cp->function) { case PAGE_FUNCTION_UNKNOWN: if ((cp1 = _vbi3_convert_cached_page (cp, function))) return cp1; fmt_log ("... not %s or hamming error\n", page_function_name (function)); goto failure; case PAGE_FUNCTION_POP: case PAGE_FUNCTION_GPOP: if (PAGE_FUNCTION_POP == function || PAGE_FUNCTION_GPOP == function) return cp; break; case PAGE_FUNCTION_DRCS: case PAGE_FUNCTION_GDRCS: if (PAGE_FUNCTION_DRCS == function || PAGE_FUNCTION_GDRCS == function) return cp; break; default: break; } fmt_log ("... source page wrong function %s, expected %s\n", page_function_name (cp->function), page_function_name (function)); failure: cache_page_unref (cp); return NULL; } /* Objects */ static const pop_link * magazine_pop_link (const vbi3_page_priv * pgp, unsigned int link) { const pop_link *pop; if (pgp->max_level >= VBI3_WST_LEVEL_3p5) { pop = &pgp->mag->pop_link[1][link]; if (!NO_PAGE (pop->pgno)) return pop; } return &pgp->mag->pop_link[0][link]; } static object_address triplet_object_address (const triplet * trip) { /* .mode .address .data 1 0 x m1 m0 1 s1 s0 x n8 n7 n6 n5 n4 n3 n2 n1 n0 -type- source packet triplet lsb ----s1----- -------------address------------- */ return ((trip->address & 3) << 7) | trip->data; } /** * @internal * @param pgp Current vbi3_page. * * @param trip_cp Returns reference to page containing object triplets, * must cache_page_unref() when done. * @param trip Returns pointer to object triplets. * @param trip_size Returns number of object triplets. * * @param type Type of the object (ACTIVE, ADAPTIVE, PASSIVE). * @param pgno Page where the object is stored. * @param address Address of the object within the page. * * @param function Presumed function of the page (POP, GPOP). * * Resolves a POP or GPOP object address (12.3.1 Table 28 Mode 10001). * * @returns * FALSE on failure. */ static vbi3_bool resolve_obj_address (vbi3_page_priv * pgp, cache_page ** trip_cp, const triplet ** trip, unsigned int * trip_size, object_type type, vbi3_pgno pgno, object_address address, page_function function) { cache_page *cp; vbi3_subno subno; unsigned int lsb; unsigned int tr; unsigned int packet; unsigned int pointer; const triplet *t; cp = NULL; subno = address & 15; lsb = ((address >> 4) & 1); tr = ((address >> 5) & 3) * 3 + type - 1; packet = ((address >> 7) & 3); fmt_log ("obj invocation, source page %03x.%04x, " "pointer packet=%u triplet=%u lsb=%u\n", pgno, subno, packet + 1, tr + 1, lsb); if (!(cp = get_system_page (pgp, pgno, subno, function))) goto failure; pointer = cp->data.pop.pointer[packet * (12 * 2) + tr * 2 + lsb]; if (pointer > 506) { fmt_log ("... triplet pointer %u > 506\n", pointer); goto failure; } else { fmt_log ("... triplet pointer %u\n", pointer); } if (TELETEXT_FMT_LOG) { packet = (pointer / 13) + 3; if (packet <= 25) { fmt_log ("... object start in packet %u, " "triplet %u (pointer %u)\n", packet, pointer % 13, pointer); } else { fmt_log ("... object start in packet 26/%u, " "triplet %u (pointer %u)\n", packet - 26, pointer % 13, pointer); } } t = cp->data.pop.triplet + pointer; fmt_log ("... obj def: addr=0x%02x mode=0x%04x data=%u=0x%x\n", t->address, t->mode, t->data, t->data); /* Object definition points to itself. */ if (t->mode != (type + 0x14) || triplet_object_address (t) != address) { fmt_log ("... no object definition\n"); goto failure; } *trip_cp = cp; *trip = t + 1; *trip_size = N_ELEMENTS (cp->data.pop.triplet) - (pointer + 1); return TRUE; failure: cache_page_unref (cp); return FALSE; } /** * @internal * @param pgp Current vbi3_page. * @param type Current object type. * @param trip Triplet requesting the object. * @param row Current row. * @param column Current column. * * Recursive object invocation at row, column. * * @returns * FALSE on failure. */ static vbi3_bool object_invocation (vbi3_page_priv * pgp, object_type type, const triplet * trip, unsigned int row, unsigned int column) { object_type new_type; unsigned int source; cache_page *trip_cp; unsigned int n_triplets; vbi3_bool success; new_type = trip->mode & 3; source = (trip->address >> 3) & 3; fmt_log ("enhancement obj invocation source %u type %s\n", source, object_type_name (new_type)); if (new_type <= type) { /* EN 300 706 13.2ff. */ fmt_log ("... type priority violation %s -> %s\n", object_type_name (type), object_type_name (new_type)); return FALSE; } trip_cp = NULL; n_triplets = 0; switch (source) { case 0: fmt_log ("... invalid source\n"); return FALSE; case 1: { unsigned int designation; unsigned int triplet; unsigned int offset; /* .mode .address .data 1 0 0 m1 m0 1 s1 s0 x n8 n7 n6 n5 n4 n3 n2 n1 n0 -type- source -designation- --triplet-- */ designation = (trip->data >> 4) + ((trip->address & 1) << 3); triplet = trip->data & 15; fmt_log ("... local obj %u/%u\n", designation, triplet); if (LOCAL_ENHANCEMENT_DATA != type || triplet > 12) { fmt_log ("... invalid type %s or triplet %u\n", object_type_name (type), triplet); return FALSE; } /* Shortcut. May find more missing packets in enhance(). */ if (0 == (pgp->cp->x26_designations & (1 << designation))) { fmt_log ("... have no packet X/26/%u\n", designation); return FALSE; } offset = designation * 13 + triplet; trip = pgp->cp->data.enh_lop.enh + offset; n_triplets = N_ELEMENTS (pgp->cp->data.enh_lop.enh) - offset; break; } case 2: { vbi3_pgno pgno; fmt_log ("... public obj\n"); pgno = pgp->cp->data.lop.link[25].pgno; if (NO_PAGE (pgno)) { unsigned int link; link = pgp->mag->pop_lut[pgp->cp->pgno & 0xFF]; if (link > 7) { fmt_log ("... MOT pop_lut empty\n"); return FALSE; } pgno = magazine_pop_link (pgp, link)->pgno; if (NO_PAGE (pgno)) { fmt_log ("... dead MOT link %u\n", link); return FALSE; } } else { fmt_log ("... X/27/4 POP overrides MOT\n"); } if (!resolve_obj_address (pgp, &trip_cp, &trip, &n_triplets, new_type, pgno, triplet_object_address (trip), PAGE_FUNCTION_POP)) return FALSE; break; } case 3: { vbi3_pgno pgno; fmt_log ("... global obj\n"); pgno = pgp->cp->data.lop.link[24].pgno; if (NO_PAGE (pgno)) { unsigned int link = 0; pgno = magazine_pop_link (pgp, link)->pgno; if (NO_PAGE (pgno)) { fmt_log ("... dead MOT link %u\n", link); return FALSE; } } else { fmt_log ("... X/27/4 GPOP overrides MOT\n"); } if (!resolve_obj_address (pgp, &trip_cp, &trip, &n_triplets, new_type, pgno, triplet_object_address (trip), PAGE_FUNCTION_GPOP)) return FALSE; break; } default: assert (0); } success = enhance (pgp, new_type, trip, n_triplets, row, column); cache_page_unref (trip_cp); fmt_log ("... object done, %s\n", success ? "success" : "failed"); return success; } /** * @internal * @param pgp Current vbi3_page. * * Like object_invocation(), but uses default object links if * available. Called when a page has no enhancement packets. */ static vbi3_bool default_object_invocation (vbi3_page_priv * pgp) { const pop_link *pop; unsigned int link; unsigned int order; unsigned int i; fmt_log ("default obj invocation\n"); link = pgp->mag->pop_lut[pgp->cp->pgno & 0xFF]; if (link > 7) { fmt_log ("...no pop link\n"); return FALSE; } pop = magazine_pop_link (pgp, link); if (NO_PAGE (pop->pgno)) { fmt_log ("... dead MOT pop link %u\n", link); return FALSE; } /* PASSIVE > ADAPTIVE > ACTIVE */ order = (pop->default_obj[0].type > pop->default_obj[1].type); for (i = 0; i < 2; ++i) { object_type type; cache_page *trip_cp; const triplet *trip; unsigned int n_triplets; vbi3_bool success; type = pop->default_obj[i ^ order].type; if (OBJECT_TYPE_NONE == type) continue; fmt_log ("... invocation %u, type %s\n", i ^ order, object_type_name (type)); if (!resolve_obj_address (pgp, &trip_cp, &trip, &n_triplets, type, pop->pgno, pop->default_obj[i ^ order].address, PAGE_FUNCTION_POP)) return FALSE; success = enhance (pgp, type, trip, n_triplets, 0, 0); cache_page_unref (trip_cp); if (!success) return FALSE; } fmt_log ("... default object done\n"); return TRUE; } /* DRCS */ static vbi3_pgno magazine_drcs_link (const vbi3_page_priv * pgp, unsigned int link) { vbi3_pgno pgno; if (pgp->max_level >= VBI3_WST_LEVEL_3p5) { pgno = pgp->mag->drcs_link[1][link]; if (!NO_PAGE (pgno)) return pgno; } return pgp->mag->drcs_link[0][link]; } static const uint8_t * get_drcs_data (const cache_page * drcs_cp, unsigned int glyph) { uint64_t ptu_mask; if (!drcs_cp) return NULL; if (glyph >= 48) return NULL; switch (drcs_cp->data.drcs.mode[glyph]) { case DRCS_MODE_12_10_1: ptu_mask = ((uint64_t) 1) << glyph; break; case DRCS_MODE_12_10_2: /* Uses two PTUs. */ ptu_mask = ((uint64_t) 3) << glyph; break; case DRCS_MODE_12_10_4: case DRCS_MODE_6_5_4: /* Uses four PTUs. */ ptu_mask = ((uint64_t) 15) << glyph; break; default: /* No character data or glyph points into subsequent PTU. */ return NULL; } if (drcs_cp->data.drcs.invalid & ptu_mask) { /* Data is incomplete. */ return NULL; } return drcs_cp->data.drcs.chars[glyph]; } /** * @internal * @param pgp Current vbi3_page. * @param normal Normal or global DRCS. * @param glyph 0 ... 47. * @param subno Subpage to take DRCS from * (pgno from page links or magazine defaults). */ static vbi3_bool reference_drcs_page (vbi3_page_priv * pgp, unsigned int normal, unsigned int glyph, vbi3_subno subno) { cache_page *drcs_cp; page_function function; vbi3_pgno pgno; unsigned int plane; unsigned int link; plane = normal * 16 + subno; { const cache_page *drcs_cp; if ((drcs_cp = pgp->drcs_cp[plane])) return !!get_drcs_data (drcs_cp, glyph); } link = 0; if (normal) { function = PAGE_FUNCTION_DRCS; pgno = pgp->cp->data.lop.link[25].pgno; if (NO_PAGE (pgno)) { link = pgp->mag->drcs_lut[pgp->cp->pgno & 0xFF]; if (link > 7) { fmt_log ("... MOT drcs_lut empty\n"); return FALSE; } pgno = magazine_drcs_link (pgp, link); if (NO_PAGE (pgno)) { fmt_log ("... dead MOT link %u\n", link); return FALSE; } } else { fmt_log ("... X/27/4 DRCS overrides MOT\n"); } } else /* global */ { function = PAGE_FUNCTION_GDRCS; pgno = pgp->cp->data.lop.link[26].pgno; if (NO_PAGE (pgno)) { pgno = magazine_drcs_link (pgp, link); if (NO_PAGE (pgno)) { fmt_log ("... dead MOT link %u\n", link); return FALSE; } } else { fmt_log ("... X/27/4 GDRCS overrides MOT\n"); } } fmt_log ("... %s drcs from page %03x.%04x\n", normal ? "normal" : "global", pgno, subno); if (!(drcs_cp = get_system_page (pgp, pgno, subno, function))) return FALSE; if (!get_drcs_data (drcs_cp, glyph)) { fmt_log ("... invalid drcs, prob. tx error\n"); cache_page_unref (drcs_cp); return FALSE; } pgp->drcs_cp[plane] = drcs_cp; return TRUE; } /** * @param pg * @param unicode DRCS character code. * * When a vbi3_char on Teletext vbi3_page @a pg is a Dynamically * Redefinable Character, this function returns a pointer to the * character shape. The data is valid until the page is deleted * with vbi3_page_delete(). * * Characters are 12 pixels wide, 10 pixels high, and each pixel can * assume one of a set of 2, 4 or 16 colors. Pixels are stored left to * right and top to bottom. Every two pixels are stored in one byte, * first pixel in the last significant four bits, second pixel in the * most significant four bits. * * Pixels translate to color map indices through a color look-up table, * see the description of vbi3_page for details. * * @returns * Pointer to character data, NULL if @a pg is invalid, not a Teletext * page, @a unicode is not a DRCS code, or no DRCS data is available. */ const uint8_t * vbi3_page_get_drcs_data (const vbi3_page * pg, unsigned int unicode) { const vbi3_page_priv *pgp; const cache_page *drcs_cp; unsigned int plane; unsigned int glyph; PGP_CHECK (NULL); if (!vbi3_is_drcs (unicode)) return NULL; plane = (unicode >> 6) & 0x1F; if (!(drcs_cp = pgp->drcs_cp[plane])) { /* No character of this plane in pgp->text[]. */ return NULL; } glyph = unicode & 0x3F; return get_drcs_data (drcs_cp, glyph); } /* Enhancement */ /** @internal */ typedef struct { /** Current page. */ vbi3_page_priv * pgp; /** Referencing object type. */ object_type type; /** Triplet vector (triplets left). */ const triplet * trip; unsigned int n_triplets; /** Current text row. */ vbi3_char * curr_line; /** Cursor position at object invocation. */ unsigned int inv_row; unsigned int inv_column; /** Current cursor position, relative to inv_row, inv_column. */ unsigned int active_row; unsigned int active_column; /** Origin modifier. */ unsigned int offset_row; unsigned int offset_column; vbi3_color row_color; vbi3_color next_row_color; /** Global (0) and normal (1) DRCS subno. */ vbi3_subno drcs_s1[2]; /** Current character set. */ const vbi3_character_set *cs; /** Accumulated attributes and attribute mask. */ vbi3_char ac; vbi3_char mac; /** Foreground/background invert attribute. */ vbi3_bool invert; /** PDC Preselection method "B". ETS 300 231, Section 7.3.2. */ vbi3_preselection * p1; /**< Current entry. */ vbi3_preselection pdc_tmp; /**< Accumulator. */ triplet pdc_hour; /**< Previous hour triplet. */ } enhance_state; /** * @internal * * Flushes accumulated attributes up to but excluding column, * or -1 to end of row. */ static void enhance_flush (enhance_state * st, unsigned int column_end) { unsigned int row; unsigned int column; row = st->inv_row + st->active_row; if (row >= 25) return; if (column_end >= 40) { /* Flush entire row. */ switch (st->type) { case OBJECT_TYPE_PASSIVE: case OBJECT_TYPE_ADAPTIVE: column_end = st->active_column + 1; break; default: column_end = 40; break; } } if (OBJECT_TYPE_PASSIVE == st->type && !st->mac.unicode) { st->active_column = column_end; return; } fmt_log ("... flush [%04x%c,F%d%c,B%d%c,S%d%c,O%d%c,H%d%c] %d - %d\n", st->ac.unicode, st->mac.unicode ? '*' : ' ', st->ac.foreground, st->mac.foreground ? '*' : ' ', st->ac.background, st->mac.background ? '*' : ' ', st->ac.size, st->mac.size ? '*' : ' ', st->ac.opacity, st->mac.opacity ? '*' : ' ', !!(st->ac.attr & VBI3_FLASH), !!(st->mac.attr & VBI3_FLASH) ? '*' : ' ', st->active_column, column_end - 1); column = st->inv_column + st->active_column; while (column < (st->inv_column + column_end) && column < 40) { vbi3_char c; int raw; c = st->curr_line[column]; if (st->mac.attr & VBI3_UNDERLINE) { unsigned int attr = st->ac.attr; if (!st->mac.unicode) st->ac.unicode = c.unicode; if (vbi3_is_gfx (st->ac.unicode)) { if (attr & VBI3_UNDERLINE) { /* Separated. */ st->ac.unicode &= ~0x20; } else { /* Contiguous. */ st->ac.unicode |= 0x20; } st->mac.unicode = 0xFFFF; attr &= ~VBI3_UNDERLINE; } COPY_SET_MASK (c.attr, attr, VBI3_UNDERLINE); } if (st->mac.foreground) c.foreground = (st->ac.foreground == VBI3_TRANSPARENT_BLACK) ? st->row_color : st->ac.foreground; if (st->mac.background) c.background = (st->ac.background == VBI3_TRANSPARENT_BLACK) ? st->row_color : st->ac.background; if (st->invert) SWAP (c.foreground, c.background); if (st->mac.opacity) c.opacity = st->ac.opacity; COPY_SET_MASK (c.attr, st->ac.attr, st->mac.attr & (VBI3_FLASH | VBI3_CONCEAL)); if (st->mac.unicode) { c.unicode = st->ac.unicode; st->mac.unicode = 0; if (st->mac.size) c.size = st->ac.size; else if (c.size > VBI3_DOUBLE_SIZE) c.size = VBI3_NORMAL_SIZE; } st->curr_line[column++] = c; if (OBJECT_TYPE_PASSIVE == st->type) break; if (OBJECT_TYPE_ADAPTIVE == st->type) continue; /* OBJECT_TYPE_ACTIVE */ raw = (0 == row && column < 9) ? 0x20 : vbi3_unpar8 (st->pgp->cp->data.lop.raw [row][column - 1]); /* Set-after spacing attributes cancelling non-spacing. */ switch (raw) { case 0x00 ... 0x07: /* alpha + foreground color */ case 0x10 ... 0x17: /* mosaic + foreground color */ fmt_log ("... fg term %d %02x\n", column, raw); st->mac.foreground = 0; st->mac.attr &= ~VBI3_CONCEAL; break; case 0x08: /* flash */ st->mac.attr &= ~VBI3_FLASH; break; case 0x0A: /* end box */ case 0x0B: /* start box */ if (column < 40 && raw == vbi3_unpar8 (st->pgp->cp->data.lop.raw[row][column])) { fmt_log ("... boxed term %d %02x\n", column, raw); st->mac.opacity = 0; } break; case 0x0D: /* double height */ case 0x0E: /* double width */ case 0x0F: /* double size */ fmt_log ("... size term %d %02x\n", column, raw); st->mac.size = 0; break; } if (column > 39) break; raw = (0 == row && column < 8) ? 0x20 : vbi3_unpar8 (st->pgp->cp->data.lop.raw [row][column]); /* Set-at spacing attributes cancelling non-spacing. */ switch (raw) { case 0x09: /* steady */ st->mac.attr &= ~VBI3_FLASH; break; case 0x0C: /* normal size */ fmt_log ("... size term %d %02x\n", column, raw); st->mac.size = 0; break; case 0x18: /* conceal */ st->mac.attr &= ~VBI3_CONCEAL; break; /* Non-spacing underlined/separated display attribute cannot be cancelled by a subsequent spacing attribute. */ case 0x1C: /* black background */ case 0x1D: /* new background */ fmt_log ("... bg term %d %02x\n", column, raw); st->mac.background = 0; break; } } st->active_column = column_end; } static vbi3_bool enhance_row_triplet (enhance_state * st) { unsigned int row; unsigned int column; unsigned int s; unsigned int pos; if (st->pdc_hour.mode > 0) { fmt_log ("... enh invalid pdc hours, no minutes follow\n"); return FALSE; } row = st->trip->address - 40; row = (0 == row) ? 24 : row; column = 0; s = st->trip->data >> 5; switch (st->trip->mode) { case 0x00: /* full screen color */ if (st->pgp->max_level < VBI3_WST_LEVEL_2p5) break; if (0 == s && st->type <= OBJECT_TYPE_ACTIVE) { unsigned int flags; unsigned int color; flags = st->pgp->cp->flags; color = st->trip->data & 0x1F; init_screen_color (&st->pgp->pg, flags, color); } break; case 0x07: /* address display row 0 */ if (st->pgp->max_level < VBI3_WST_LEVEL_1p5) break; if (st->trip->address != 0x3F) break; /* reserved, no position */ row = 0; /* fall through */ case 0x01: /* full row color */ if (st->pgp->max_level < VBI3_WST_LEVEL_1p5) break; st->row_color = st->next_row_color; switch (s) { case 0: st->row_color = st->trip->data & 0x1F; st->next_row_color = st->pgp->ext->def_row_color; break; case 3: st->row_color = st->trip->data & 0x1F; st->next_row_color = st->row_color; break; } goto set_active; case 0x02: /* reserved */ case 0x03: /* reserved */ break; case 0x04: /* set active position */ if (st->pgp->max_level >= VBI3_WST_LEVEL_2p5) { if (st->trip->data >= 40) break; /* reserved */ column = st->trip->data; } else if (st->pgp->max_level < VBI3_WST_LEVEL_1p5) { break; } if (row > st->active_row) st->row_color = st->next_row_color; set_active: if (row > 0 && 1 == st->pgp->pg.rows) { /* Shortcut: we need only row 0 triplets, skip other. */ while (st->n_triplets > 1) { if (st->trip[1].address >= 40) { unsigned int mode; mode = st->trip[1].mode; if (mode >= 0x20) return FALSE; if (mode == 0x1F) goto terminate; if (mode == 0x07) break; } ++st->trip; --st->n_triplets; } break; } fmt_log ("... enh set_active row %d col %d\n", row, column); if (row > st->active_row) { enhance_flush (st, (unsigned int) -1); if (st->type != OBJECT_TYPE_PASSIVE) CLEAR (st->mac); } st->active_row = row; st->active_column = column; pos = (st->inv_row + st->active_row) * st->pgp->pg.columns; st->curr_line = &st->pgp->pg.text[pos]; break; case 0x05: /* reserved */ case 0x06: /* reserved */ break; case 0x08: /* PDC data - Country of Origin and Programme Source */ { /* .address .data 1 1 c3 c2 c1 c0 n6 n5 n4 n3 n2 n1 n0 --country-- msb ------source----- -> 0011 cccc 0mss ssss as in TR 101 231. */ st->pdc_tmp.cni = st->trip->address * 256 + st->trip->data; st->pdc_tmp.cni_type = VBI3_CNI_TYPE_PDC_B; break; } case 0x09: /* PDC data - Month and Day */ /* .address .data 1 1 m3 m2 m1 m0 0 t1 t0 u3 u2 u1 u0 ---month--- ------day-------- Plausibility check when we find start hour too. */ st->pdc_tmp.month = (st->trip->address & 15); st->pdc_tmp.day = (st->trip->data >> 4) * 10 + (st->trip->data & 15); break; case 0x0A: /* PDC data - Cursor Row and Announced Starting Time Hours */ /* .address .data 1 r4 r3 r2 r1 r0 caf t1 t0 u3 u2 u1 u0 ------row----- -------hour------ */ if (!st->p1) { break; } if ( ((unsigned int) st->pdc_tmp.month - 1) > 11 || ((unsigned int) st->pdc_tmp.day - 1) > 30 || 0 == st->pdc_tmp.cni) { /* PDC data is broken, but no need to throw away all the enhancement. */ st->p1 = NULL; break; } st->pdc_tmp.at2_hour = (((st->trip->data & 0x30) >> 4) * 10 + (st->trip->data & 15)); st->pdc_tmp.length = 0; st->pdc_tmp._at1_ptl[1].row = row; st->pdc_tmp.caf = !!(st->trip->data & 0x40); st->pdc_hour = *st->trip; break; case 0x0B: /* PDC data - Cursor Row and Announced Finishing Time Hours */ /* .address .data 1 r4 r3 r2 r1 r0 msb t1 t0 u3 u2 u1 u0 -----row------ -------hour------ */ /* msb: Duration or end time, see column triplet 0x06. */ st->pdc_tmp.at2_hour = (((st->trip->data & 0x70) >> 4) * 10 + (st->trip->data & 15)); st->pdc_hour = *st->trip; break; case 0x0C: /* PDC data - Cursor Row and Local Time Offset */ { unsigned int lto; /* .address .data 1 r4 r3 r2 r1 r0 t6 t5 t4 t3 t2 t1 t0 ------row----- -------offset------- */ lto = st->trip->data; if (lto & 0x40) /* 7 bit two's complement */ lto |= ~0x7F; st->pdc_tmp.lto = lto * 15; /* minutes */ break; } case 0x0D: /* PDC data - Series Identifier and Series Code */ /* .address .data 1 1 0 0 0 0 0 p6 p5 p4 p3 p2 p1 p0 ---------pty-------- */ /* 0x30 == is series code. */ if (0x30 != st->trip->address) break; st->pdc_tmp.pty = 0x80 + st->trip->data; break; case 0x0E: /* reserved */ case 0x0F: /* reserved */ break; case 0x10: /* origin modifier */ if (st->pgp->max_level < VBI3_WST_LEVEL_2p5) break; if (st->trip->data >= 72) return FALSE; /* invalid */ /* Note side panels are not implemented yet. Characters for column >= 40 which should go into left or right panel are discarded. */ st->offset_row = st->trip->address - 40; st->offset_column = st->trip->data; fmt_log ("... enh origin modifier col %+d row %+d\n", st->offset_column, st->offset_row); break; case 0x11 ... 0x13: /* object invocation */ { vbi3_preselection *table; vbi3_bool success; if (st->pgp->max_level < VBI3_WST_LEVEL_2p5) break; row = st->inv_row + st->active_row; column = st->inv_column + st->active_column; table = st->pgp->pdc_table; st->pgp->pdc_table = NULL; success = object_invocation (st->pgp, st->type, st->trip, row + st->offset_row, column + st->offset_column); st->pgp->pdc_table = table; if (!success) return FALSE; st->offset_row = 0; st->offset_column = 0; break; } case 0x14: /* reserved */ break; case 0x15 ... 0x17: /* object definition */ fmt_log ("... enh obj definition 0x%02x 0x%02x\n", st->trip->mode, st->trip->data); goto terminate; case 0x18: /* drcs mode */ fmt_log ("... enh DRCS mode 0x%02x\n", st->trip->data); st->drcs_s1[st->trip->data >> 6] = st->trip->data & 15; break; case 0x19 ... 0x1E: /* reserved */ break; case 0x1F: /* termination marker */ terminate: if (st->pgp->max_level >= VBI3_WST_LEVEL_1p5) enhance_flush (st, (unsigned int) -1); fmt_log ("... enh terminated %02x\n", st->trip->mode); st->n_triplets = 0; break; default: return FALSE; } return TRUE; } static void pdc_duration (enhance_state * st) { int length; length = (st->pdc_tmp.at2_hour - st->p1[-1].at2_hour) * 60 + (st->pdc_tmp.at2_minute - st->p1[-1].at2_minute); if (length < 0 || length >= 12 * 60) { /* Garbagge. */ --st->p1; } else { st->p1[-1].length = length; } } static vbi3_bool enhance_column_triplet (enhance_state * st) { unsigned int unicode; unsigned int column; unsigned int s; column = st->trip->address; s = st->trip->data >> 5; switch (st->trip->mode) { case 0x00: /* foreground color */ if (st->pgp->max_level < VBI3_WST_LEVEL_2p5) break; if (0 != s) break; if (column > st->active_column) enhance_flush (st, column); st->ac.foreground = st->trip->data & 0x1F; st->mac.foreground = 0xFF; fmt_log ("... enh col %d foreground %d\n", st->active_column, st->ac.foreground); break; case 0x01: /* G1 block mosaic character */ if (st->pgp->max_level < VBI3_WST_LEVEL_2p5) break; if (column > st->active_column) enhance_flush (st, column); if (st->trip->data & 0x20) { /* G1 contiguous */ unicode = 0xEE00 + st->trip->data; goto store; } else if (st->trip->data >= 0x40) { unsigned int code; code = st->trip->data; unicode = vbi3_teletext_unicode (st->cs->g0, VBI3_SUBSET_NONE, code); goto store; } break; case 0x0B: /* G3 smooth mosaic or line drawing character */ if (st->pgp->max_level < VBI3_WST_LEVEL_2p5) break; /* fall through */ case 0x02: /* G3 smooth mosaic or line drawing character */ if (st->pgp->max_level < VBI3_WST_LEVEL_1p5) break; if (st->trip->data < 0x20) break; if (column > st->active_column) enhance_flush (st, column); unicode = 0xEF00 + st->trip->data; goto store; case 0x03: /* background color */ if (st->pgp->max_level < VBI3_WST_LEVEL_2p5) break; if (0 != s) break; if (column > st->active_column) enhance_flush (st, column); st->ac.background = st->trip->data & 0x1F; st->mac.background = 0xFF; fmt_log ("... enh col %d background %d\n", st->active_column, st->ac.background); break; case 0x04: /* reserved */ case 0x05: /* reserved */ break; case 0x06: /* PDC data - Cursor Column and Announced Starting and Finishing Time Minutes */ /* .address .data c5 c4 c3 c2 c1 c0 t2 t1 t0 u3 u2 u1 u0 ------column----- -------minute------- */ if (!st->p1) break; st->pdc_tmp.at2_minute = ((st->trip->data >> 4) * 10 + (st->trip->data & 15)); switch (st->pdc_hour.mode) { case 0x0A: /* Starting time */ if (st->p1 > st->pgp->pdc_table && 0 == st->p1[-1].length) { pdc_duration (st); } st->pdc_tmp._at1_ptl[1].column_begin = column; st->pdc_tmp._at1_ptl[1].column_end = 40; if (st->p1 >= st->pgp->pdc_table + 24) return FALSE; *st->p1++ = st->pdc_tmp; st->pdc_tmp.pty = 0; break; case 0x0B: /* Finishing time */ if (st->p1 == st->pgp->pdc_table) { /* Finish what? PDC is broken, but no need to throw away all the enhancement. */ st->p1 = NULL; break; } /* See row triplet 0x0B. */ if (st->pdc_tmp.at2_hour >= 40) { /* Duration. */ st->p1[-1].length = (st->pdc_tmp.at2_hour - 40) * 60 + st->pdc_tmp.at2_minute; } else { /* End time. */ pdc_duration (st); } break; default: fmt_log ("... pdc hour triplet missing\n"); /* PDC is broken. */ st->p1 = NULL; break; } st->pdc_hour.mode = 0; break; case 0x07: /* additional flash functions */ if (st->pgp->max_level < VBI3_WST_LEVEL_2p5) break; if (column > st->active_column) enhance_flush (st, column); /* XXX Only one flash function implemented: Mode 1 - Normal flash to background color Rate 0 - Slow rate (1 Hz) */ COPY_SET_COND (st->ac.attr, VBI3_FLASH, st->trip->data & 3); st->mac.attr |= VBI3_FLASH; fmt_log ("... enh col %d flash 0x%02x\n", st->active_column, st->trip->data); break; case 0x08: /* modified G0 and G2 character set designation */ { const vbi3_character_set *cs; if (st->pgp->max_level < VBI3_WST_LEVEL_2p5) break; if (column > st->active_column) enhance_flush (st, column); cs = vbi3_character_set_from_code ((unsigned int) st->trip->data); if (cs) { st->cs = cs; fmt_log ("... enh col %d modify character set %d\n", st->active_column, st->trip->data); } break; } case 0x09: /* G0 character */ if (st->pgp->max_level < VBI3_WST_LEVEL_2p5) break; if (st->trip->data < 0x20) break; if (column > st->active_column) enhance_flush (st, column); unicode = vbi3_teletext_unicode (st->cs->g0, VBI3_SUBSET_NONE, (unsigned int) st->trip->data); goto store; case 0x0A: /* reserved */ break; case 0x0C: /* display attributes */ if (st->pgp->max_level < VBI3_WST_LEVEL_2p5) break; if (column > st->active_column) enhance_flush (st, column); st->ac.size = ((st->trip->data & 0x40) ? VBI3_DOUBLE_WIDTH : 0) + ((st->trip->data & 1) ? VBI3_DOUBLE_HEIGHT : 0); st->mac.size = 0xFF; if (st->trip->data & 2) { if (st->pgp->cp->flags & (C5_NEWSFLASH | C6_SUBTITLE)) st->ac.opacity = VBI3_TRANSLUCENT; else st->ac.opacity = VBI3_TRANSPARENT_SPACE; } else { st->ac.opacity = st->pgp->page_opacity[1]; } st->mac.opacity = 0xFF; COPY_SET_COND (st->ac.attr, VBI3_CONCEAL, st->trip->data & 4); st->mac.attr |= VBI3_CONCEAL; /* (st->trip->data & 8) reserved */ st->invert = !!(st->trip->data & 0x10); COPY_SET_COND (st->ac.attr, VBI3_UNDERLINE, st->trip->data & 0x20); st->mac.attr |= VBI3_UNDERLINE; fmt_log ("... enh col %d display attr 0x%02x\n", st->active_column, st->trip->data); break; case 0x0D: /* drcs character invocation */ { unsigned int normal; unsigned int glyph; unsigned int plane; if (st->pgp->max_level < VBI3_WST_LEVEL_2p5) break; glyph = st->trip->data & 0x3F; normal = st->trip->data >> 6; if (glyph >= 48) { fmt_log ("invalid drcs offset %u\n", glyph); break; } if (column > st->active_column) enhance_flush (st, column); fmt_log ("... enh col %d DRCS %u/%u\n", st->active_column, normal, glyph); if (!reference_drcs_page (st->pgp, normal, glyph, st->drcs_s1[normal])) return FALSE; plane = 16 * normal + st->drcs_s1[normal]; unicode = 0xF000 + (plane << 6) + glyph; goto store; } case 0x0E: /* font style */ { vbi3_char *acp; unsigned int n_rows; unsigned int row; unsigned int attr; if (st->pgp->max_level < VBI3_WST_LEVEL_3p5) break; attr = 0; if (st->trip->data & 0x01) attr |= VBI3_PROPORTIONAL; if (st->trip->data & 0x02) attr |= VBI3_BOLD; if (st->trip->data & 0x04) attr |= VBI3_ITALIC; n_rows = (st->trip->data >> 4) + 1; fmt_log ("... enh %u ... %u, %u ... %u font style 0x%02x\n", st->inv_column + column, 39, row, row + n_rows - 1, attr); row = st->inv_row + st->active_row; acp = &st->pgp->pg.text[row * st->pgp->pg.columns]; while (row < 25 && n_rows > 0) { unsigned int col; for (col = st->inv_column + column; col < 40; ++col) { COPY_SET_MASK (acp[col].attr, attr, (VBI3_PROPORTIONAL | VBI3_BOLD | VBI3_ITALIC)); } acp += st->pgp->pg.columns; ++row; --n_rows; } break; } case 0x0F: /* G2 character */ if (st->pgp->max_level < VBI3_WST_LEVEL_1p5) break; if (st->trip->data < 0x20) break; if (column > st->active_column) enhance_flush (st, column); unicode = vbi3_teletext_unicode (st->cs->g2, VBI3_SUBSET_NONE, (unsigned int) st->trip->data); goto store; case 0x10 ... 0x1F: /* characters including diacritical marks */ if (st->pgp->max_level < VBI3_WST_LEVEL_1p5) break; if (st->trip->data < 0x20) break; if (column > st->active_column) enhance_flush (st, column); unicode = _vbi3_teletext_composed_unicode ((unsigned int)(st->trip->mode - 0x10), (unsigned int) st->trip->data); store: fmt_log ("... enh row %d col %d print " "0x%02x/0x%02x -> 0x%04x %c\n", st->active_row, st->active_column, st->trip->mode, st->trip->data, unicode, unicode & 0xFF); st->ac.unicode = unicode; st->mac.unicode = 0xFFFF; break; default: return FALSE; } return TRUE; } /** * @internal * @param pgp Current vbi3_page. * @param type Current object type. * @param trip Triplet vector. * @param n_triplets Triplet vector size. * @param inv_row Cursor position at object invocation. * @param inv_column Cursor position at object invocation. * * Enhances a level one page with data from page enhancement * packets. * * @bugs * XXX panels not implemented. * * @returns * FALSE on failure. */ static vbi3_bool enhance (vbi3_page_priv * pgp, object_type type, const triplet * trip, unsigned int n_triplets, unsigned int inv_row, unsigned int inv_column) { enhance_state st; st.pgp = pgp; st.type = type; st.trip = trip; st.n_triplets = n_triplets; st.inv_row = inv_row; st.inv_column = inv_column; st.active_row = 0; st.active_column = 0; st.curr_line = pgp->pg.text + inv_row * pgp->pg.columns; st.offset_row = 0; st.offset_column = 0; st.row_color = pgp->ext->def_row_color; st.next_row_color = pgp->ext->def_row_color; st.drcs_s1[0] = 0; /* global */ st.drcs_s1[1] = 0; /* normal */ st.cs = pgp->char_set[0]; CLEAR (st.ac); CLEAR (st.mac); st.invert = FALSE; if (OBJECT_TYPE_PASSIVE == type) { st.ac.foreground = VBI3_WHITE; st.ac.background = VBI3_BLACK; st.ac.opacity = pgp->page_opacity[1]; st.mac.foreground = 0xFF; st.mac.background = 0xFF; st.mac.opacity = 0xFF; st.mac.size = 0xFF; st.mac.attr = (VBI3_UNDERLINE | VBI3_CONCEAL | VBI3_FLASH); } /* PDC Preselection method "B" ETS 300 231, Section 7.3.2. */ st.p1 = pgp->pdc_table; CLEAR (st.pdc_tmp); st.pdc_tmp.month = 0; st.pdc_hour.mode = 0; /* Main loop. */ while (st.n_triplets > 0) { if (st.trip->address >= 40) { if (!enhance_row_triplet (&st)) return FALSE; if (0 == st.n_triplets) break; } else { if (!enhance_column_triplet (&st)) return FALSE; } ++st.trip; --st.n_triplets; } if (st.p1 > pgp->pdc_table) { vbi3_preselection *p; time_t now; struct tm t; time (&now); if ((time_t) -1 == now) { pgp->pdc_table_size = 0; goto finish; } localtime_r (&now, &t); if (st.pdc_hour.mode > 0 || 0 == st.p1[-1].length) --st.p1; /* incomplete start or end tag */ for (p = pgp->pdc_table; p < st.p1; ++p) { int d; d = t.tm_mon - p->month; if (d > 0 && d <= 6) p->year = t.tm_year + 1901; else p->year = t.tm_year + 1900; p->at1_hour = p->at2_hour; p->at1_minute = p->at2_minute; } pgp->pdc_table_size = st.p1 - pgp->pdc_table; if (0) _vbi3_preselection_array_dump (pgp->pdc_table, pgp->pdc_table_size, stderr); } finish: if (0) _vbi3_page_priv_dump (pgp, stderr, 2); return TRUE; } static void post_enhance (vbi3_page_priv * pgp) { vbi3_char ac, *acp; unsigned int row; unsigned int column; unsigned int last_row; unsigned int last_column; acp = pgp->pg.text; last_row = (1 == pgp->pg.rows) ? 0 : 25 - 2; last_column = pgp->pg.columns - 1; for (row = 0; row <= last_row; ++row) { for (column = 0; column < pgp->pg.columns; ++acp, ++column) { if (acp->opacity == VBI3_TRANSPARENT_SPACE || (acp->foreground == VBI3_TRANSPARENT_BLACK && acp->background == VBI3_TRANSPARENT_BLACK)) { acp->opacity = VBI3_TRANSPARENT_SPACE; acp->unicode = 0x0020; } else if (acp->background == VBI3_TRANSPARENT_BLACK) { acp->opacity = VBI3_TRANSLUCENT; } else { /* transparent foreground not implemented */ } switch (acp->size) { case VBI3_NORMAL_SIZE: if (row < last_row && (acp[pgp->pg.columns].size == VBI3_DOUBLE_HEIGHT2 || acp[pgp->pg.columns].size == VBI3_DOUBLE_SIZE2)) { acp[pgp->pg.columns].unicode = 0x0020; acp[pgp->pg.columns].size = VBI3_NORMAL_SIZE; } if (column < 39 && (acp[1].size == VBI3_OVER_TOP || acp[1].size == VBI3_OVER_BOTTOM)) { acp[1].unicode = 0x0020; acp[1].size = VBI3_NORMAL_SIZE; } break; case VBI3_DOUBLE_HEIGHT: if (row < last_row) { ac = acp[0]; ac.size = VBI3_DOUBLE_HEIGHT2; acp[pgp->pg.columns] = ac; } break; case VBI3_DOUBLE_SIZE: if (row < last_row) { ac = acp[0]; ac.size = VBI3_DOUBLE_SIZE2; acp[pgp->pg.columns] = ac; ac.size = VBI3_OVER_BOTTOM; acp[pgp->pg.columns + 1] = ac; } /* fall through */ case VBI3_DOUBLE_WIDTH: if (column < 39) { ac = acp[0]; ac.size = VBI3_OVER_TOP; acp[1] = ac; } break; default: break; } } fmt_log ("\n"); } } /* PDC Preselection -------------------------------------------------------- */ /** * @internal * @param pg Formatted page. * @param pbegin Take AT-1 and PTL positions from this table. * @param pend End of the table. * * Adds PDC flags to the text. * * XXX incomplete: p->text */ static void post_pdc (vbi3_page * pg, const vbi3_preselection *pbegin, const vbi3_preselection *pend) { const vbi3_preselection *p; for (p = pbegin; p < pend; ++p) { unsigned int i; for (i = 0; i < N_ELEMENTS (p->_at1_ptl); ++i) { unsigned int row; row = p->_at1_ptl[i].row; if (row > 0) { vbi3_char *acp; unsigned int j; acp = pg->text + pg->columns * row; /* We could mark exactly the AT-1 and PTL characters, but from a usability standpoint it's better to make the sensitive area larger. */ for (j = 0; j < pg->columns; ++j) { acp[j].attr |= VBI3_PDC; switch (acp[j].size) { case VBI3_DOUBLE_HEIGHT: case VBI3_DOUBLE_SIZE: case VBI3_OVER_TOP: acp[pg->columns].attr |= VBI3_PDC; break; default: break; } } } } #ifndef ZAPPING8 #warning to do p->title #endif } } /** * @param pg * @param column Column 0 ... pg->columns - 1 of the character in question. * @param row Row 0 ... pg->rows - 1 of the character in question. * * Describe me. * * @returns * Describe me. */ const vbi3_preselection * vbi3_page_get_pdc_link (const vbi3_page * pg, unsigned int column, unsigned int row) { const vbi3_page_priv *pgp; const vbi3_preselection *p; const vbi3_preselection *end; const vbi3_preselection *match; PGP_CHECK (FALSE); if (0 == row || row >= pgp->pg.rows || column >= pgp->pg.columns) return FALSE; end = pgp->pdc_table + pgp->pdc_table_size; match = NULL; for (p = pgp->pdc_table; p < end; ++p) { unsigned int i; for (i = 0; i < N_ELEMENTS (p->_at1_ptl); ++i) { if (row != p->_at1_ptl[i].row) continue; if (!match) match = p; if (column >= p->_at1_ptl[i].column_begin && column < p->_at1_ptl[i].column_end) goto finish; } } if (!match) return NULL; p = match; finish: return p; } /** * @param pg * @param n_elements * * Describe me. * * @returns * Describe me. */ const vbi3_preselection * vbi3_page_get_preselections (const vbi3_page * pg, unsigned int * n_elements) { const vbi3_page_priv *pgp; PGP_CHECK (FALSE); assert (NULL != n_elements); *n_elements = pgp->pdc_table_size; return pgp->pdc_table; } /* Column 41 --------------------------------------------------------------- */ /** * @internal * @param pgp Current vbi3_page. * * Artificial 41st column. Often column 0 of a LOP contains only set-after * attributes and thus all black spaces, unlike column 39. To balance the * view we add a black column 40. If OTOH column 0 has been modified using * enhancement we extend column 39. */ static void column_41 (vbi3_page_priv * pgp) { vbi3_char *acp; unsigned int row; vbi3_bool black0; vbi3_bool cont39; acp = pgp->pg.text; /* Header. */ acp[40] = acp[39]; acp[40].unicode = 0x0020; if (1 == pgp->pg.rows) return; /* Body. */ acp += 41; black0 = TRUE; cont39 = TRUE; for (row = 1; row <= 24; ++row) { if (0x0020 != acp[0].unicode || VBI3_BLACK != acp[0].background) { black0 = FALSE; } if (vbi3_is_gfx (acp[39].unicode)) { if (acp[38].unicode != acp[39].unicode || acp[38].foreground != acp[39].foreground || acp[38].background != acp[39].background) { cont39 = FALSE; } } acp += 41; } acp = pgp->pg.text + 41; if (!black0 && cont39) { for (row = 1; row <= 24; ++row) { acp[40] = acp[39]; if (!vbi3_is_gfx (acp[39].unicode)) acp[40].unicode = 0x0020; acp += 41; } } else { vbi3_char ac; CLEAR (ac); ac.unicode = 0x0020; ac.foreground = pgp->ext->foreground_clut + VBI3_WHITE; ac.background = pgp->ext->background_clut + VBI3_BLACK; ac.opacity = pgp->page_opacity[1]; for (row = 1; row <= 24; ++row) { acp[40] = ac; acp += 41; } } /* Navigation bar. */ acp[40] = acp[39]; acp[40].unicode = 0x0020; } /* Hyperlinks -------------------------------------------------------------- */ #define SECTION_SIGN ((char) 0xA7) /* Simple case insensitive strcmp. */ static unsigned int keycmp (const char * s1, const char * key) { const char *s; char c; for (s = s1; (c = *key); ++s, ++key) { if (*s == c) continue; if (c >= 'a' && c <= 'z') if (0x20 == (*s ^ c)) continue; return 0; } return s - s1; } static vbi3_bool keyword (vbi3_link * ld, vbi3_network * nk, const char * buf, vbi3_pgno pgno, vbi3_subno subno, unsigned int * start, unsigned int * end) { const char *s; unsigned int len; unsigned int address; vbi3_link_type type; const char *proto; s = buf + *start; *end = *start + 1; /* unknown character */ proto = ""; if (isdigit (*s)) { const char *s1; unsigned int num1; unsigned int num2; /* Page number "###". */ s1 = s; num1 = 0; do num1 = num1 * 16 + (*s & 15); while (isdigit (*++s)); len = s - s1; *end += len - 1; if (len > 3 || isdigit (s1[-1])) return FALSE; if (3 == len) { if (pgno == (vbi3_pgno) num1) return FALSE; if (num1 < 0x100 || num1 > 0x899) return FALSE; if (ld) { vbi3_link_init (ld); ld->type = VBI3_LINK_PAGE; ld->network = nk; ld->pgno = num1; } return TRUE; } /* Subpage number "##/##". */ if (*s != '/' && *s != ':') return FALSE; s1 = ++s; num2 = 0; while (isdigit (*s)) num2 = num2 * 16 + (*s++ & 15); len = s - s1; *end += len + 1; if (0 == len || len > 2 || subno != (vbi3_subno) num1) return FALSE; if (ld) { vbi3_link_init (ld); ld->type = VBI3_LINK_SUBPAGE; ld->network = nk; ld->pgno = pgno; if (num1 == num2) ld->subno = 0x01; /* wrap */ else ld->subno = vbi3_add_bcd ((int) num1, 0x01); } return TRUE; } else if (*s == '>' && s[1] == '>' && s[-1] != '>') { for (s += 2; 0x20 == *s; ++s) ; *end = s - buf; if (*s) return FALSE; if (0 == subno || VBI3_ANY_SUBNO == subno) { if (0x899 == pgno) return FALSE; if (ld) { vbi3_link_init (ld); ld->type = VBI3_LINK_PAGE; ld->network = nk; ld->pgno = vbi3_add_bcd (pgno, 0x001); } return TRUE; } else if (subno < 0x99) { /* XXX wrap? */ if (ld) { vbi3_link_init (ld); ld->type = VBI3_LINK_SUBPAGE; ld->network = nk; ld->pgno = pgno; ld->subno = vbi3_add_bcd (subno, 0x01); } return TRUE; } return FALSE; } else if (*s == 'h') { if (0 == (len = keycmp (s, "https://")) && 0 == (len = keycmp (s, "http://"))) return FALSE; type = VBI3_LINK_HTTP; } else if (*s == '(') { if (0 == (len = keycmp (s, "(at)")) && 0 == (len = keycmp (s, "(a)"))) return FALSE; type = VBI3_LINK_EMAIL; } else if ((len = keycmp (s, "www.")) > 0) { type = VBI3_LINK_HTTP; proto = "http://"; } else if ((len = keycmp (s, "ftp://")) > 0) { type = VBI3_LINK_FTP; } else if (*s == '@' || *s == SECTION_SIGN) { type = VBI3_LINK_EMAIL; len = 1; } else { return FALSE; } *end = *start + len; { const char *s1; unsigned int domains; s += len; s1 = s; domains = 0; for (;;) { /* RFC 1738 */ static const char *valid = "%&/=?+-~:;@_"; const char *s1; s1 = s; while (isalnum (*s) || strchr (valid, *s)) ++s; if (s == s1) return FALSE; if (*s != '.') break; ++s; ++domains; } if (0 == domains) return FALSE; address = s - s1; } *end += address; if (VBI3_LINK_EMAIL == type) { static const char *valid = "-~._"; const char *s1; unsigned int recipient; s = buf + *start; s1 = s; while (isalnum (s[-1]) || strchr (valid, s[-1])) --s; recipient = s1 - s; if (0 == recipient) return FALSE; *start -= recipient; if (ld) { char *url; if (!(url = vbi3_malloc (recipient + address + 9))) return FALSE; strcpy (url, "mailto:"); _vbi3_strlcpy (url + 7, s1 - recipient, recipient); url[recipient + 7] = '@'; _vbi3_strlcpy (url + recipient + 7, s1 + len, address); vbi3_link_init (ld); ld->type = type; ld->url = url; } } else { if (ld) { char *url; unsigned int plen; plen = strlen (proto); len += address; if (!(url = vbi3_malloc (plen + len + 1))) return FALSE; strcpy (url, proto); _vbi3_strlcpy (url + plen, buf + *start, len); vbi3_link_init (ld); ld->type = type; ld->url = url; } } return TRUE; } /** * @internal * @param pgp Current vbi3_page. * @param row Row to scan. * * Analyses page contents and adds link flags when keywords appear: * http and ftp urls, e-mail addresses, 3-digit page * numbers, subpage numbers "n/m", next page ">>". */ static void hyperlinks (vbi3_page_priv * pgp, unsigned int row) { /* One row, two spaces on the sides and NUL. */ char buffer[43]; vbi3_bool link[43]; vbi3_char *acp; unsigned int i; unsigned int j; acp = pgp->pg.text + row * pgp->pg.columns; j = 0; for (i = 0; i < 40; ++i) { if (VBI3_OVER_TOP == acp[i].size || VBI3_OVER_BOTTOM == acp[i].size) continue; ++j; if (acp[i].unicode >= 0x20 && acp[i].unicode <= 0xFF) buffer[j] = acp[i].unicode; else buffer[j] = 0x20; } buffer[0] = ' '; buffer[j + 1] = ' '; buffer[j + 2] = 0; CLEAR (link); i = 0; while (i < 40) { unsigned int end; if (keyword (NULL, NULL, buffer, pgp->pg.pgno, pgp->pg.subno, &i, &end)) { for (j = i; j < end; ++j) link[j] = TRUE; } i = end; } j = 1; for (i = 0; i < 40; ++i) { if (VBI3_OVER_TOP == acp[i].size || VBI3_OVER_BOTTOM == acp[i].size) { if (i > 0) COPY_SET_MASK (acp[i].attr, acp[i - 1].attr, VBI3_LINK); continue; } COPY_SET_COND (acp[i].attr, VBI3_LINK, link[j++]); } } /** * @param pg With vbi3_fetch_vt_page() obtained vbi3_page. * @param ld Place to store information about the link. * NOTE vbi3_link_destroy(). * @param column Column 0 ... pg->columns - 1 of the character in question. * @param row Row 0 ... pg->rows - 1 of the character in question. * * A vbi3_page (in practice only Teletext pages) may contain hyperlinks * such as HTTP URLs, e-mail addresses or links to other pages. Characters * being part of a hyperlink have a set vbi3_char->link flag, this function * returns a more verbose description of the link. * * @returns * TRUE if the link is valid. NOTE vbi3_link_destroy(). */ vbi3_bool vbi3_page_get_hyperlink (const vbi3_page * pg, vbi3_link * ld, unsigned int column, unsigned int row) { const vbi3_page_priv *pgp; char buffer[43]; const vbi3_char *acp; unsigned int i; unsigned int j; unsigned int start; unsigned int end; PGP_CHECK (FALSE); assert (NULL != ld); if (pg->pgno < 0x100 || 0 == row || row >= pg->rows || column >= pg->columns) return FALSE; acp = pg->text + row * pg->columns; if (!(acp[column].attr & VBI3_LINK)) return FALSE; if (row == 25) { int i; i = pgp->link_ref[column]; if (i < 0) return FALSE; vbi3_link_init (ld); ld->type = VBI3_LINK_PAGE; ld->network = &pgp->cn->network; ld->pgno = pgp->link[i].pgno; ld->subno = pgp->link[i].subno; return TRUE; } start = 0; j = 0; for (i = 0; i < 40; ++i) { if (acp[i].size == VBI3_OVER_TOP || acp[i].size == VBI3_OVER_BOTTOM) continue; ++j; if (i < column && !(acp[i].attr & VBI3_LINK)) start = j + 1; if (acp[i].unicode >= 0x20 && acp[i].unicode <= 0xFF) buffer[j] = acp[i].unicode; else buffer[j] = 0x20; } buffer[0] = ' '; buffer[j + 1] = ' '; buffer[j + 2] = 0; return keyword (ld, &pgp->cn->network, buffer, pg->pgno, pg->subno, &start, &end); } /* Navigation enhancements ------------------------------------------------- */ #ifndef TELETEXT_NAV_LOG #define TELETEXT_NAV_LOG 0 #endif #define nav_log(templ, args...) \ do { \ if (TELETEXT_NAV_LOG) \ fprintf (stderr, templ , ##args); \ } while (0) /* FLOF navigation */ static const vbi3_color flof_link_col [4] = { VBI3_RED, VBI3_GREEN, VBI3_YELLOW, VBI3_CYAN }; static vbi3_char * navigation_row (vbi3_page_priv * pgp) { return pgp->pg.text + 25 * pgp->pg.columns; } static vbi3_char * clear_navigation_bar (vbi3_page_priv * pgp) { vbi3_char ac; vbi3_char *acp; unsigned int columns; unsigned int i; acp = navigation_row (pgp); CLEAR (ac); ac.foreground = 32 + VBI3_WHITE; /* 32: immutable color */ ac.background = 32 + VBI3_BLACK; ac.opacity = pgp->page_opacity[1]; ac.unicode = 0x0020; columns = pgp->pg.columns; for (i = 0; i < columns; ++i) { acp[i] = ac; } return acp; } /* We have FLOF links but no labels in row 25. This function replaces row 25 using the FLOF page numbers as labels. */ static void flof_navigation_bar (vbi3_page_priv * pgp) { vbi3_char ac; vbi3_char *acp; unsigned int i; acp = clear_navigation_bar (pgp); ac = *acp; ac.attr |= VBI3_LINK; for (i = 0; i < 4; ++i) { unsigned int pos; unsigned int k; pos = i * 10 + 3; ac.foreground = flof_link_col[i]; for (k = 0; k < 3; ++k) { unsigned int digit; digit = pgp->cp->data.lop.link[i].pgno; digit = (digit >> ((2 - k) * 4)) & 15; if (digit > 9) ac.unicode = digit + 'A' - 9; else ac.unicode = digit + '0'; acp[pos + k] = ac; pgp->link_ref[pos + k] = i; } pgp->link[i].pgno = pgp->cp->data.lop.link[i].pgno; pgp->link[i].subno = pgp->cp->data.lop.link[i].subno; } } /* Adds link flags to a page navigation bar (row 25) from FLOF data. */ static void flof_links (vbi3_page_priv * pgp) { vbi3_char *acp; unsigned int start; unsigned int end; unsigned int i; int color; acp = navigation_row (pgp); start = 0; color = -1; for (i = 0; i <= 40; ++i) { if (i == 40 || (acp[i].foreground & 7) != color) { unsigned int k; pagenum *pn; for (k = 0; k < 4; ++k) if (flof_link_col[k] == (unsigned int) color) break; pn = &pgp->cp->data.lop.link[k]; if (k < 4 && !NO_PAGE (pn->pgno)) { /* Leading and trailing spaces not sensitive */ for (end = i - 1; end >= start && acp[end].unicode == 0x0020; --end) ; for (; end >= start; --end) { acp[end].attr |= VBI3_LINK; pgp->link_ref[end] = k; } pgp->link[k].pgno = pn->pgno; pgp->link[k].subno = pn->subno; } if (i >= 40) break; color = acp[i].foreground & 7; start = i; } if (start == i && acp[i].unicode == 0x0020) ++start; } } /* TOP navigation */ static void write_link (vbi3_page_priv * pgp, vbi3_char * acp, const char * s, unsigned int n, unsigned int indx, unsigned int column, vbi3_color foreground) { while (n-- > 0) { acp[column].unicode = *s++; acp[column].foreground = foreground; acp[column].attr |= VBI3_LINK; pgp->link_ref[column] = indx; ++column; } } /** * @internal * @param indx Create pgp->nav_link 0 ... 3. * @param column Store text in a 12 character wide slot starting at * this column (0 ... 40 - 12). * @param pgno Store name of this page. * @param foreground Store text using this color. * @param ff add 0 ... 2 '>' characters (if space is available). * * Creates a TOP label for pgno in row 25. */ static vbi3_bool top_label (vbi3_page_priv * pgp, const vbi3_character_set *cs, unsigned int indx, unsigned int column, vbi3_pgno pgno, vbi3_color foreground, unsigned int ff) { const ait_title *ait; cache_page *ait_cp; vbi3_char *acp; unsigned int sh; int i; if (!(ait = cache_network_get_ait_title (pgp->cn, &ait_cp, pgno, VBI3_ANY_SUBNO))) return FALSE; acp = navigation_row (pgp); pgp->link[indx].pgno = pgno; pgp->link[indx].subno = VBI3_ANY_SUBNO; for (i = 11; i >= 0; --i) if (ait->text[i] > 0x20) break; if (ff > 0 && (i <= (int)(11 - ff))) { sh = (11 - ff - i) >> 1; acp[sh + i + 1].attr |= VBI3_LINK; pgp->link_ref[column + sh + i + 1] = indx; write_link (pgp, acp, ">>", ff, indx, column + i + sh + 1, foreground); } else { sh = (11 - i) >> 1; /* center */ } acp += sh; column += sh; while (i >= 0) { uint8_t c; c = MAX (ait->text[i], (uint8_t) 0x20); acp[i].unicode = vbi3_teletext_unicode (cs->g0, cs->subset, c); acp[i].foreground = foreground; acp[i].attr |= VBI3_LINK; pgp->link_ref[column + i] = indx; --i; } cache_page_unref (ait_cp); return TRUE; } /** * @internal * * Replaces row 25 by labels and links from TOP data. * Style: Prev-page Next-chapter Next-block Next-page */ static void top_navigation_bar_style_1 (vbi3_page_priv * pgp) { vbi3_pgno pgno; vbi3_bool have_group; const page_stat *ps; vbi3_char *acp; if (TELETEXT_NAV_LOG) { ps = cache_network_const_page_stat (pgp->cn, pgp->cp->pgno); nav_log ("page mip/btt: %d\n", ps->page_type); } clear_navigation_bar (pgp); if (VBI3_OPAQUE != pgp->page_opacity[1]) return; pgno = pgp->pg.pgno; acp = navigation_row (pgp); pgp->link[0].pgno = vbi3_add_bcd (pgno, -1); pgp->link[0].subno = VBI3_ANY_SUBNO; write_link (pgp, acp, "(<<)", 4, 0, 1, 32 + VBI3_RED); pgp->link[3].pgno = vbi3_add_bcd (pgno, +1); pgp->link[3].subno = VBI3_ANY_SUBNO; write_link (pgp, acp, "(>>)", 4, 3, 40 - 5, 32 + VBI3_CYAN); /* Item 2 & 3, next group and block */ pgno = pgp->pg.pgno; have_group = FALSE; for (;;) { pgno = ((pgno - 0xFF) & 0x7FF) + 0x100; if (pgno == pgp->cp->pgno) break; ps = cache_network_const_page_stat (pgp->cn, pgno); switch (ps->page_type) { case VBI3_TOP_BLOCK: /* XXX should we use char_set of the AIT page? */ top_label (pgp, pgp->char_set[0], 1, 0 * 14 + 7, pgno, 32 + VBI3_GREEN, 0); return; case VBI3_TOP_GROUP: if (!have_group) { /* XXX as above */ top_label (pgp, pgp->char_set[0], 2, 1 * 14 + 7, pgno, 32 + VBI3_BLUE, 0); have_group = TRUE; } break; } } } /** * @internal * * Replaces row 25 by labels and links from TOP data. * Style: Current-block-or-chapter Next-chapter > Next-block >> */ static void top_navigation_bar_style_2 (vbi3_page_priv * pgp) { vbi3_pgno pgno; vbi3_bool have_group; const page_stat *ps; if (TELETEXT_NAV_LOG) { ps = cache_network_const_page_stat (pgp->cn, pgp->cp->pgno); nav_log ("page mip/btt: %d\n", ps->page_type); } clear_navigation_bar (pgp); if (VBI3_OPAQUE != pgp->page_opacity[1]) return; /* Item 1, current block/chapter */ pgno = pgp->pg.pgno; do { vbi3_page_type type; ps = cache_network_const_page_stat (pgp->cn, pgno); type = ps->page_type; if (VBI3_TOP_BLOCK == type || VBI3_TOP_GROUP == type) { /* XXX should we use char_set of the AIT page? */ top_label (pgp, pgp->char_set[0], 0, 0 * 13 + 1, pgno, 32 + VBI3_WHITE, 0); break; } pgno = ((pgno - 0x101) & 0x7FF) + 0x100; } while (pgno != pgp->pg.pgno); /* Item 2 & 3, next group and block */ pgno = pgp->pg.pgno; have_group = FALSE; for (;;) { pgno = ((pgno - 0xFF) & 0x7FF) + 0x100; if (pgno == pgp->cp->pgno) break; ps = cache_network_const_page_stat (pgp->cn, pgno); switch (ps->page_type) { case VBI3_TOP_BLOCK: /* XXX should we use char_set of the AIT page? */ top_label (pgp, pgp->char_set[0], 2, 2 * 13 + 1, pgno, 32 + VBI3_YELLOW, 2); return; case VBI3_TOP_GROUP: if (!have_group) { /* XXX as above */ top_label (pgp, pgp->char_set[0], 1, 1 * 13 + 1, pgno, 32 + VBI3_GREEN, 1); have_group = TRUE; } break; } } } /* Navigation (TOP and FLOF) enhancements. */ static void navigation (vbi3_page_priv * pgp, int style) { cache_page *cp; cp = pgp->cp; if (cp->data.lop.have_flof) { vbi3_pgno home_pgno = cp->data.lop.link[5].pgno; if (home_pgno >= 0x100 && home_pgno <= 0x899 && !NO_PAGE (home_pgno)) { pgp->link[5].pgno = home_pgno; pgp->link[5].subno = cp->data.lop.link[5].subno; } if (cp->lop_packets & (1 << 24)) { flof_links (pgp); } else { flof_navigation_bar (pgp); } } else if (pgp->cn->have_top) { if (2 == style) top_navigation_bar_style_2 (pgp); else top_navigation_bar_style_1 (pgp); } } /** * @param pg With vbi3_fetch_vt_page() obtained vbi3_page. * @param ld Place to store information about the link. * DONT vbi3_link_destroy(). * @param indx Number 0 ... 5 of the link. * * When a Teletext vbi3_page has been formatted with TOP or FLOF * navigation enabled the last row may contain four links * to other pages. Apart of being hyperlinks (see * vbi3_page_hyperlink()) you can also query the links by * ordinal number, 0 refering to the leftmost and 3 to * the rightmost link displayed. * * Further all Teletext pages have a built-in home link, * by default page 100, but also the magazine intro page * or another page selected by the editor. This link has * number 5. * * Other numbers are currently unused. * * FIXME * @returns * TRUE if the link is valid. DONT vbi3_link_destroy(). */ const vbi3_link * vbi3_page_get_teletext_link (const vbi3_page * pg, unsigned int indx) { const vbi3_page_priv *pgp; PGP_CHECK (NULL); if (pg->pgno < 0x100 || indx >= N_ELEMENTS (pgp->link) || pgp->link[indx].pgno < 0x100) { return NULL; } return &pgp->link[indx]; } /* ------------------------------------------------------------------------ */ /** * @internal * @param pgp Initialized vbi3_page_priv, results will be stored here. * @param cp Source page. * @param format_options Array of pairs of a vbi3_format_option and value, * terminated by a @c 0 option. See vbi3_cache_get_teletext_page(). * * Formats a cached Teletext page and stores results in @a pgp. * * @returns * @c FALSE on error. */ vbi3_bool _vbi3_page_priv_from_cache_page_va_list (vbi3_page_priv * pgp, cache_page * cp, va_list format_options) { vbi3_bool option_hyperlinks; vbi3_bool option_pdc_links; int option_navigation_style; vbi3_charset_code option_cs_default[2]; const vbi3_character_set *option_cs_override[2]; const extension * ext; cache_network * cn; unsigned int i; assert (NULL != pgp); assert (NULL != cp); if (cp->function != PAGE_FUNCTION_LOP && cp->function != PAGE_FUNCTION_TRIGGER) return FALSE; fmt_log ("\nFormatting page %03x/%04x pgp=%p\n", cp->pgno, cp->subno, pgp); /* Source page */ cn = cp->network; assert (NULL != cn); assert (NULL != cn->cache); pgp->cn = cache_network_ref (cn); pgp->cp = cache_page_ref (cp); pgp->pg.cache = cn->cache; pgp->pg.network = &cn->network; pgp->pg.pgno = cp->pgno; pgp->pg.subno = cp->subno; pgp->pg.dirty.y0 = 0; pgp->pg.dirty.y1 = pgp->pg.rows - 1; pgp->pg.dirty.roll = 0; /* Options */ pgp->max_level = VBI3_WST_LEVEL_1; pgp->pg.rows = 25; pgp->pg.columns = 40; pgp->pdc_table = NULL; pgp->pdc_table_size = 0; option_navigation_style = 0; option_hyperlinks = FALSE; option_pdc_links = FALSE; option_cs_default[0] = 0; option_cs_default[1] = 0; option_cs_override[0] = NULL; option_cs_override[1] = NULL; for (;;) { vbi3_format_option option; option = va_arg (format_options, vbi3_format_option); switch (option) { case VBI3_HEADER_ONLY: pgp->pg.rows = va_arg (format_options, vbi3_bool) ? 1 : 25; break; case VBI3_PADDING: pgp->pg.columns = va_arg (format_options, vbi3_bool) ? 41 : 40; break; case VBI3_PANELS: /* TODO */ va_arg (format_options, vbi3_bool); break; case VBI3_NAVIGATION: option_navigation_style = va_arg (format_options, int); break; case VBI3_HYPERLINKS: option_hyperlinks = va_arg (format_options, vbi3_bool); break; case VBI3_PDC_LINKS: option_pdc_links = va_arg (format_options, vbi3_bool); break; case VBI3_WST_LEVEL: pgp->max_level = va_arg (format_options, vbi3_wst_level); break; case VBI3_DEFAULT_CHARSET_0: option_cs_default[0] = va_arg (format_options, vbi3_charset_code); break; case VBI3_DEFAULT_CHARSET_1: option_cs_default[1] = va_arg (format_options, vbi3_charset_code); break; case VBI3_OVERRIDE_CHARSET_0: option_cs_override[0] = vbi3_character_set_from_code (va_arg (format_options, vbi3_charset_code)); break; case VBI3_OVERRIDE_CHARSET_1: option_cs_override[1] = vbi3_character_set_from_code (va_arg (format_options, vbi3_charset_code)); break; default: option = 0; break; } if (0 == option) break; } /* Magazine and extension defaults */ pgp->mag = (pgp->max_level <= VBI3_WST_LEVEL_1p5) ? _vbi3_teletext_decoder_default_magazine () : cache_network_const_magazine (cn, cp->pgno); if (cp->x28_designations & 0x11) pgp->ext = &cp->data.ext_lop.ext; else pgp->ext = &pgp->mag->extension; /* Colors */ init_screen_color (&pgp->pg, cp->flags, pgp->ext->def_screen_color); ext = &pgp->mag->extension; COPY (pgp->pg.color_map, ext->color_map); COPY (pgp->pg.drcs_clut, ext->drcs_clut); if (pgp->max_level >= VBI3_WST_LEVEL_2p5 && (cp->x28_designations & 0x13)) { ext = &cp->data.ext_lop.ext; if (ext->designations & (1 << 4)) /* X/28/4 -> CLUT 0 & 1 */ memcpy (pgp->pg.color_map + 0, ext->color_map + 0, 16 * sizeof (*pgp->pg.color_map)); if (ext->designations & (1 << 1)) /* X/28/1 -> drcs_clut */ COPY (pgp->pg.drcs_clut, ext->drcs_clut); if (ext->designations & (1 << 0)) /* X/28/0 -> CLUT 2 & 3 */ memcpy (pgp->pg.color_map + 16, ext->color_map + 16, 16 * sizeof (*pgp->pg.color_map)); } /* Opacity */ pgp->page_opacity[1] = VBI3_OPAQUE; pgp->boxed_opacity[1] = VBI3_TRANSLUCENT; if (cp->flags & (C5_NEWSFLASH | C6_SUBTITLE | C10_INHIBIT_DISPLAY)) pgp->page_opacity[1] = VBI3_TRANSPARENT_SPACE; if (cp->flags & C10_INHIBIT_DISPLAY) pgp->boxed_opacity[1] = VBI3_TRANSPARENT_SPACE; if (cp->flags & C7_SUPPRESS_HEADER) { pgp->page_opacity[0] = VBI3_TRANSPARENT_SPACE; pgp->boxed_opacity[0] = VBI3_TRANSPARENT_SPACE; } else { pgp->page_opacity[0] = pgp->page_opacity[1]; pgp->boxed_opacity[0] = pgp->boxed_opacity[1]; } /* Character set designation */ _vbi3_character_set_init (pgp->char_set, option_cs_default[0], option_cs_default[1], pgp->ext, cp); if (option_cs_override[0]) pgp->char_set[0] = option_cs_override[0]; if (option_cs_override[1]) pgp->char_set[1] = option_cs_override[1]; /* Format level one page */ level_one_page (pgp); /* PDC Preselection method "A" links */ #ifndef ZAPPING8 if (pgp->pg.rows > 1 && option_pdc_links) { pgp->pdc_table = _vbi3_preselection_array_new (25); if (pgp->pdc_table) { pgp->pdc_table_size = _vbi3_pdc_method_a (pgp->pdc_table, 25, cp->data.lop.raw); } } #endif /* Local enhancement data and objects */ if (pgp->max_level >= VBI3_WST_LEVEL_1p5) { vbi3_page page; vbi3_bool success; page = pgp->pg; CLEAR (pgp->drcs_cp); if (!(cp->flags & (C5_NEWSFLASH | C6_SUBTITLE))) { pgp->boxed_opacity[0] = VBI3_TRANSPARENT_SPACE; pgp->boxed_opacity[1] = VBI3_TRANSPARENT_SPACE; } fmt_log ("enhancement packets %08x\n", cp->x26_designations); if (cp->x26_designations & 1) { success = enhance (pgp, LOCAL_ENHANCEMENT_DATA, cp->data.enh_lop.enh, N_ELEMENTS (cp->data.enh_lop.enh), 0, 0); } else { success = default_object_invocation (pgp); } if (success) { if (pgp->max_level >= VBI3_WST_LEVEL_2p5) post_enhance (pgp); } else { unsigned int i; /* Roll back incomplete enhancements. */ for (i = 0; i < N_ELEMENTS (pgp->drcs_cp); ++i) { cache_page_unref (pgp->drcs_cp[i]); pgp->drcs_cp[i] = NULL; } pgp->pg = page; } } else if (option_pdc_links && pgp->pdc_table && 0 == pgp->pdc_table_size) { /* Just PDC preselection from packets X/26. */ if (cp->x26_designations & 1) { enhance (pgp, LOCAL_ENHANCEMENT_DATA, cp->data.enh_lop.enh, N_ELEMENTS (cp->data.enh_lop.enh), 0, 0); } } for (i = 0; i < N_ELEMENTS (pgp->link); ++i) { vbi3_link *ld; ld = &pgp->link[i]; ld->type = VBI3_LINK_PAGE; ld->name = NULL; ld->pgno = 0; /* No allocated copy for efficency. */ ld->network = &pgp->cn->network; } pgp->link[5].pgno = cn->initial_page.pgno; pgp->link[5].subno = cn->initial_page.subno; /* -1 no link. */ memset (pgp->link_ref, -1, sizeof (pgp->link_ref)); if (pgp->pg.rows > 1) { unsigned int row; if (option_hyperlinks) for (row = 1; row < 25; ++row) hyperlinks (pgp, row); if (option_navigation_style > 0) navigation (pgp, option_navigation_style); if (pgp->pdc_table_size > 0) post_pdc (&pgp->pg, pgp->pdc_table, pgp->pdc_table + pgp->pdc_table_size); } if (41 == pgp->pg.columns) column_41 (pgp); if (0) _vbi3_page_priv_dump (pgp, stderr, 2); return TRUE; } /** * @internal * @param pgp Initialized vbi3_page_priv, results will be stored here. * @param cp Source page. * @param ... Array of pairs of a vbi3_format_option and value, * terminated by a @c 0 option. See vbi3_cache_get_teletext_page(). * * Formats a cached Teletext page and stores results in @a pgp. * * @returns * @c FALSE on error. */ vbi3_bool _vbi3_page_priv_from_cache_page (vbi3_page_priv * pgp, cache_page * cp, ...) { vbi3_bool r; va_list format_options; va_start (format_options, cp); r = _vbi3_page_priv_from_cache_page_va_list (pgp, cp, format_options); va_end (format_options); return r; } /* ------------------------------------------------------------------------ */ /** * @param ca VBI cache allocated with vbi3_cache_new(). * @param nk Identifies the network transmitting the page. * @param pgno Teletext page number. * @param subno Teletext subpage number, can be @c VBI3_ANY_SUBNO * (most recently received subpage, if any). * @param format_options Array of pairs of a vbi3_format_option and value, * terminated by a @c 0 option. See vbi3_cache_get_teletext_page(). * * Allocates a new vbi3_page, formatted from a cached Teletext page. * * @returns * vbi3_page which must be freed with vbi3_page_delete() when done. * @c NULL on error. */ vbi3_page * vbi3_cache_get_teletext_page_va_list (vbi3_cache * ca, const vbi3_network * nk, vbi3_pgno pgno, vbi3_subno subno, va_list format_options) { cache_network *cn; cache_page *cp; vbi3_subno subno_mask; vbi3_page *pg; cn = NULL; cp = NULL; pg = NULL; if (!(cn = _vbi3_cache_get_network (ca, nk))) goto failure; subno_mask = -1; if (VBI3_ANY_SUBNO == subno) { subno = 0; subno_mask = 0; } if (!(cp = _vbi3_cache_get_page (ca, cn, pgno, subno, subno_mask))) goto failure; if (!(pg = vbi3_page_new ())) goto failure; if (!_vbi3_page_priv_from_cache_page_va_list (pg->priv, cp, format_options)) { vbi3_page_delete (pg); pg = NULL; } failure: cache_page_unref (cp); cache_network_unref (cn); return pg; } /** * @param ca VBI cache allocated with vbi3_cache_new(). * @param nk Identifies the network transmitting the page. * @param pgno Teletext page number. * @param subno Teletext subpage number, can be @c VBI3_ANY_SUBNO * (most recently received subpage, if any). * @param ... Array of pairs of a vbi3_format_option and value, * terminated by a @c 0 option. * * Allocates a new vbi3_page, formatted from a cached Teletext page. * * Example: * * @code * vbi3_page *pg; * vbi3_network network; * * vbi3_network_init (&network); * network.cni_8301 = 0x3A01; * * pg = vbi3_cache_get_teletext_page (ca, &network, 0x100, VBI3_ANY_SUBNO, * VBI3_NAVIGATION, 2, * VBI3_WST_LEVEL, VBI3_LEVEL_2p5, * 0); * @endcode * * @returns * vbi3_page which must be freed with vbi3_page_delete() when done. * @c NULL on error. */ vbi3_page * vbi3_cache_get_teletext_page (vbi3_cache * ca, const vbi3_network * nk, vbi3_pgno pgno, vbi3_subno subno, ...) { vbi3_page *pg; va_list format_options; va_start (format_options, subno); pg = vbi3_cache_get_teletext_page_va_list (ca, nk, pgno, subno, format_options); va_end (format_options); return pg; } /* ------------------------------------------------------------------------- */ /** * @param pg A vbi3_page allocated with vbi3_page_new() or * one of the vbi3_page get functions, e.g. vbi3_teletext_decoder_get_page(). * * Allocates a duplicate of @a pg. * * @returns * Pointer to newly allocated vbi3_page, which must be released with * vbi3_page_unref() or deleted with vbi3_page_delete() when done. * @c NULL on error. */ vbi3_page * vbi3_page_dup (const vbi3_page * pg) { const vbi3_page_priv *pgp; vbi3_page_priv *new_pgp; unsigned int i; PGP_CHECK (NULL); if (!(new_pgp = vbi3_malloc (sizeof (*new_pgp)))) { error ("Out of memory (%u bytes)", sizeof (*new_pgp)); return NULL; } /* No need to duplicate our pgp->ca or ->cn reference here, that is implied by the pgp->cp reference. */ *new_pgp = *pgp; new_pgp->pg.ref_count = 1; new_pgp->pg.priv = new_pgp; new_pgp->pdc_table = NULL; new_pgp->pdc_table_size = 0; if (new_pgp->pg.cache) { if (new_pgp->cn) cache_network_ref (new_pgp->cn); if (new_pgp->cp) cache_page_ref (new_pgp->cp); for (i = 0; i < N_ELEMENTS (new_pgp->drcs_cp); ++i) if (new_pgp->drcs_cp[i]) cache_page_ref (new_pgp->drcs_cp[i]); } #ifndef ZAPPING8 if (pgp->pdc_table) { new_pgp->pdc_table = _vbi3_preselection_array_dup (pgp->pdc_table, pgp->pdc_table_size); if (new_pgp->pdc_table) { new_pgp->pdc_table_size = pgp->pdc_table_size; } else { debug ("Out of memory"); vbi3_page_delete (&new_pgp->pg); return NULL; } } #endif /* Should vbi3_link_copy() pgp->link[i] here, but we use no allocated fields except network, which for efficiency just points into our ref counted pgp->cn. */ return &new_pgp->pg; } /** * @internal * @param pgp Initialized vbi3_page_priv structure. * * Frees all resources associated with @a pgp, except the structure itself. * Ignores reference count. */ void _vbi3_page_priv_destroy (vbi3_page_priv * pgp) { unsigned int i; assert (NULL != pgp); if (pgp->pg.cache) { for (i = 0; i < N_ELEMENTS (pgp->drcs_cp); ++i) { cache_page_unref (pgp->drcs_cp[i]); } cache_page_unref (pgp->cp); cache_network_unref (pgp->cn); } #ifndef ZAPPING8 _vbi3_preselection_array_delete (pgp->pdc_table, pgp->pdc_table_size); #endif CLEAR (*pgp); } /** * @internal * @param pgp vbi3_page_priv structure to initialize. * * Initializes a VBI page. */ void _vbi3_page_priv_init (vbi3_page_priv * pgp) { assert (NULL != pgp); CLEAR (*pgp); pgp->pg.ref_count = 1; pgp->pg.priv = pgp; } /** * @param pg A vbi3_page allocated with vbi3_page_new() or * one of the vbi3_page get functions, e.g. vbi3_teletext_decoder_get_page(). * Can be @c NULL. * * Frees all resources associated with @a pg, regardless of * any remaining references to it. */ void vbi3_page_delete (vbi3_page * pg) { vbi3_page_priv *pgp; if (NULL == pg) return; pgp = PARENT (pg, vbi3_page_priv, pg); if (pg->priv != pgp) { debug ("vbi3_page %p not allocated by libzvbi", pg); return; } _vbi3_page_priv_destroy (pgp); vbi3_free (pgp); } /** * @param pg A vbi3_page allocated with vbi3_page_new() or * one of the vbi3_page get functions, e.g. vbi3_teletext_decoder_get_page(). * Can be @c NULL. * * Releases a vbi3_page reference. When this is the last reference * the function calls vbi3_page_delete(). */ void vbi3_page_unref (vbi3_page * pg) { if (NULL == pg) return; if (pg->ref_count > 1) { --pg->ref_count; return; } vbi3_page_delete (pg); } /** * @param pg A vbi3_page allocated with vbi3_page_new() or * one of the vbi3_page get functions, e.g. vbi3_teletext_decoder_get_page(). * * Creates a new reference to the page. * * @returns * @a pg. You must call vbi3_page_unref() when the reference is * no longer needed. */ vbi3_page * vbi3_page_ref (vbi3_page * pg) { assert (NULL != pg); ++pg->ref_count; return pg; } /** * Allocates a new, empty vbi3_page. * * @returns * @c NULL when out of memory. The vbi3_page must be freed with * vbi3_page_unref() or vbi3_page_delete() when done. */ vbi3_page * vbi3_page_new (void) { vbi3_page_priv *pgp; if (!(pgp = vbi3_malloc (sizeof (*pgp)))) { error ("Out of memory (%u bytes)", sizeof (pgp)); return NULL; } _vbi3_page_priv_init (pgp); return &pgp->pg; } zapping-0.10cvs6/libvbi/caption_decoder-priv.h 644 764 144 12627 10427064104 14553 /* * libzvbi - Caption decoder * * Copyright (C) 2000, 2001, 2002, 2005 Michael H. Schimek * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* $Id: caption_decoder-priv.h,v 1.2 2006/05/06 09:11:32 mschimek Exp $ */ #ifndef CAPTION_DECODER_PRIV_H #define CAPTION_DECODER_PRIV_H #include "cache-priv.h" #include "event-priv.h" #include "caption_decoder.h" typedef enum { FIELD_1 = 0, FIELD_2, MAX_FIELDS } field_num; #define FIELD_UNKNOWN MAX_FIELDS /* Closed Caption definitions. */ #define CHANNEL_UNKNOWN 0 #define MAX_CHANNELS 8 /* Sec. 15.119 (d) Screen format. */ #define FIRST_ROW 0 #define LAST_ROW 14 #define MAX_ROWS (LAST_ROW + 1) #define FIRST_COLUMN 0 #define LAST_COLUMN 31 #define MAX_COLUMNS (LAST_COLUMN + 1) /** This structure maintains Closed Caption channel state. */ typedef struct { /** * Displayed and non-displayed buffer according to spec. * Snapshot of displayed buffer at last row update. */ vbi3_char buffer[3][MAX_ROWS][MAX_COLUMNS]; /** * For all buffers, if bit (1 << row) is set this row contains * text, otherwise only TRANSPARENT_SPACEs. Intended to speed * up copying and conversion of characters. * * When dirty[n] < 0 this buffer shall be erased to all * TRANSPARENT_SPACEs before storing characters. Intended to * avoid copying and erasing buffers which are never used. */ int dirty[3]; /** Index of displayed buffer, 0 or 1. */ unsigned int displayed_buffer; /** Cursor position. */ unsigned int curr_row; unsigned int curr_column; /** * Text window height in VBI3_CAPTION_MODE_ROLL_UP * (ranges from curr_row - window_rows + 1 to curr_row inclusive). * * NOTE curr_row - window_rows + 1 can be < FIRST_ROW, this must * be clipped before using window_rows: * actual_rows = MIN (curr_row - FIRST_ROW + 1, window_rows); * * We won't do that at a Roll-Up Captions command because usually * a Preamble Address Code follows which may change curr_row. */ unsigned int window_rows; /** * Current character attributes (foreground and background color, * underlined, flash, italic). */ vbi3_char curr_attr; /** Current caption mode or VBI3_CAPTION_MODE_UNKNOWN. */ vbi3_caption_mode mode; /** Last time when text was transmitted on this channel. */ double last_timestamp; } caption_channel; /* General stuff. */ typedef void caption_reset_fn (vbi3_caption_decoder * cd, cache_network * cn, double time); typedef void caption_delete_fn (vbi3_caption_decoder * cd); /** @internal */ struct _vbi3_caption_decoder { struct { /* Closed Caption decoder */ /** * Decoder state. We decode all channels in parallel, this * way clients can switch between channels without data * loss, or capture multiple channels with a single decoder * instance. */ caption_channel channel[MAX_CHANNELS]; /** * Current channel, switched by caption control codes. Can * be @c CHANNEL_UNKNOWN (no channel number received yet). */ vbi3_pgno curr_ch_num; /** * To send a display update event (VBI3_EVENT_CC_PAGE) when the * visible buffer of the current channel changed, but no more * than once for each pair of Closed Caption bytes. */ caption_channel * event_pending; } cc; struct { /* ITV decoder */ /** Incoming data. */ uint8_t buffer[256]; /** Number of bytes in buffer. */ unsigned int size; } itv; struct { /* XDS decoder */ // vbi3_xds_demux demux; } xds; /* Master demultiplexer */ /** Receiving ITV data on field 1 (channel VBI3_CHAPTION_T2). */ vbi3_bool in_itv; /** Receiving XDS data on field 2, as opposed to caption. */ vbi3_bool in_xds; /** * Caption control codes (two bytes) may repeat once for * error correction on the first field. expect_ctrl[1] is * only written, to save conditionals. */ int expect_ctrl[2][2]; /** * Remember past parity errors: One bit for each call of * vbi3_caption_decoder_feed(), most recent result in lsb. The idea * is to disable the decoder if we get too many errors. */ unsigned int error_history; /* Interface */ /** The cache we use. */ vbi3_cache * cache; /** Current network in the cache. */ cache_network * network; double timestamp; double reset_time; vbi3_videostd_set videostd_set; /** Called by vbi3_caption_decoder_reset(). */ caption_reset_fn * virtual_reset; _vbi3_event_handler_list handlers; /** Called by vbi3_caption_decoder_delete(). */ caption_delete_fn * virtual_delete; }; extern void _vbi3_caption_decoder_resync (vbi3_caption_decoder * cd); extern void _vbi3_caption_decoder_destroy (vbi3_caption_decoder * cd); extern vbi3_bool _vbi3_caption_decoder_init (vbi3_caption_decoder * cd, vbi3_cache * ca, const vbi3_network * nk, vbi3_videostd_set videostd_set); #endif /* CAPTION_DECODER_PRIV_H */ zapping-0.10cvs6/libvbi/wstfont2.pbm 644 764 144 55142 10142077573 12577 P4 # Copyright (C) 2000, 2001, 2002, 2003, 2004 Michael H. Schimek # Based on ETS 300 706 384 480 `9? p 0p`fm30 0f``0`0`  0c `1f03`6`00`0`  0c  `?``0`0<? 8``306`0`000`00``faa 0f``800`0?0``0`0 `??000?` p`0x???0cc0pa??`f0?`0`0a0a000``c80xc0c0c`f ``c 0c0c00``cp0lc0c0c0f` `1ff?0c??`c0ffc??0f``fg0c0c00``cp0cc01` ``c0a000``0c80a060```0??00c?`00a 0`?``x80`0`c ```0` 0 ``37a 7777?`fp?`` 8c0?8``cf8c8c8c 0f00c0c 0``cf0c0c0 f`` 0c0c 0``cf0c8c0 clp ``? 0a0cf0a70p`?``08`   `x?`pGx@`0qO3` fpc00 `?0Hf``a19``fc0` 0`?O`0>````2s>`f00H`~``4C}c`f` qH`0 0 c `?<0` ? ` ` 2 ``  0 `p0<0 <0 `?<0 <`0f6??0Æ0c0c f00``0c0c0c0a10c0ac 0c0c0c??``|cf0c0c0`3c0c0`c???f00``0c60c0c0``6c0c0``0c0c0cf00``00c0c0`0a0a0c0c`````3a0c330c0cy01`0` p`  `f0p0p0` 0?p` `8`3?0`?0`777|`c f`A*`c90` 0cA"`c> ??A"0R|R0f 0@?0cy`` p|@``18@c6e!86 ``> 0 !0ǀπl0-͆`0`000`?0`00!0006?xp?fa0`0C ```1y@&0F# fc fc   00 ```3 oc0faffao?`c`>fcl0`f`ff18`0`c ```3`c<0`?? `10`0`c8C ```1`c@&0` `10`?x`gpap6`0100pc10p`p?`c 00f87? `30 006Üff0c``0f1` 0`>80 6fff0cf`0f<0p`  0`3 700 ?0co`7? p0`090` 0 00?ac6` ?fa`0p?00cc0c0 0cfca1y0c 07``c0c|160 00cf`cf67of0c ?8c?`c>7f `c?|fff<fg0c 00c``c3c3< 0cf`lf7`f0c 00c0c`0c3c33 `c0cfcxg1`f0c ?0?>c0`c?fapg0`f ````?? 1ffp030a?1ff00 6c0cf`1ff006c?8?600p?f``1ff??>a0c61c1y0c 0f`1ff0f60`6`6??<2c&>oc0c 0fa1ff0f60f 6`f`0c64cF1fc0c 0? ???3??68c0`c ````00`07?1ffp030c00c 8c61ff00 6c0c70c`c0c1 0c6`1ff??|>a?8>`c>>& 8cp61ff0c60f 6`6000``c3c11F 7`???310g>c00``0`1a?o91f?0 c0 9   `  f`0 `0 p   ` f`6`0 `0 `  njx f`3 `0 ` `    f`1`0 `  `  f`0`0 g  ?px`  0 ``3``x7 ``x0006`  f`f`0`????  ` `aa c138`1  `0 `s<3<30x`}`0`0 0?0 ```gx00 gx8c>08`p0 x1`c`` ``10` 8``  |`0` 3<0 `0 0| 1` aO` 0 0o``p``` ```p0 `60 `?`?????????????????>>>>>>>>>>>>????????????????????????????????????????>>>>>>>>>>>>>>>>>>>>>>>>>>>>0   ??030 ?030?0 p030p?0 p?03?0 p?03`pp`````````0  0 ````````?8?````````?``0 00 ``````````pp```p?0p?p`0p? p`0?0q? 3 08pp80 `36300 0x01`1f03`6`00`0`  0c  `?``0`0<? 8``306`0`000`00``06À`p```8  ```80~` 0`?`?? `<x~1180?03c0000a001<11103 0 0 c 0c0c00``cp0lc0c0c0f` `1ff?0c??`c0ffc??0f``fg0c0c00``cp0cc01` `` ` a` ``p` `la  830` ``? ``  a?00010000`007a 7777?`fp?`` 8c0?8``cf8c8c8c 0f00c0c 0``cf0c0c0 f`` ```0 ` p` 3 ? ``? `o` 0 ?` p `0~0<08#< 0`8`'0`38p 1A@`?0Hf``a19``fc0` 0`?O`0>````2s>`f00H`~``4C}c? 0 0 `a xa @@ ?'/ ? @d>@   `|   `08 `~0 0l3 |||a11f00``0c0c0c0a10c0ac 0c0c0c??``|cf0c0c0`3c0c0`c???f00``0c60c0c0``6c0c0``` ` `  `` a<` ` `x ` `0 ` ` ` ?????0???xx`` x  `08 ` 0 00l x` ???=|`?0c0c c0c0c``0c0c0c0`cc0c0ac??????``0c0c0c0cfc0c0`a`` ` ` ` `aa0????? ???>>?000 a80l l `0l8 `0`l8;|8l|`aaaa00`000000a0a0` 0` 0` 00000c|a?????00???00000c0c0000011```0000a a ``````````? ? 08`lal 0l10<00q11?00a0a0a0c0c0c`7100?|?|`````0a`<3110c0c`````0a`7>``` ` f ` g0g   ? ? ` ` ??????ac???  8`   l `03 l8`80|`f80la000777| ??A"0R|R00``8 R(3<<0`?/$!"$0  @00a18@c6e!86 ?|`"@ 80C 0 coogl6~f`lal`ff`0`000`?0```0C 1``? ?  `x??fcl0`f`ff18`0`c ```3`c<0`?? `10` apc 8L a  0 ca?  80 6fff0cf``xaagoA` a  ?8  ` ?o?`>a?  8??s``  ``~010300p|p|8s111s 1 310<107``c0c|160 00cf`cf67of0c ?8c?`c>7f `c?|fff<fg0c 00c``c3c3< 0cf`lf7`f0c ``` `ff g  `3 c0 `a??| a  a0 ?~33l8033l1`|0cf`1ff006c?8?600p?f``1ff??>a0c61c1y0c 0f`1ff0f60`6`6??<2c&>oc0c ` 0c Ͱ`l`l `3m hƌc ``  gmp a ?  0 `0~7?1ffp030100c 8c61ff00 6c0c70c`a11 0c6`1ff??|>a?8>`a?>& p mc Ͱ`l`ll`a` 3c3 co ?0 g?c?`>c a ` ?8`zapping-0.10cvs6/libvbi/wstfont2.xbm 644 764 144 431411 10433067273 12623 /* Generated file, do not edit */ #define wstfont2_width 18432 #define wstfont2_height 10 static const uint8_t wstfont2_bits [] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x80, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x80, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x1f, 0x18, 0x83, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x83, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x18, 0xe0, 0x80, 0x67, 0x18, 0x03, 0x1f, 0x00, 0x00, 0x00, 0x60, 0x00, 0x18, 0xe0, 0x80, 0x31, 0x30, 0x00, 0x0c, 0xf0, 0x80, 0x19, 0x00, 0x80, 0x67, 0x30, 0x00, 0x18, 0xe0, 0x80, 0x67, 0x18, 0x03, 0x00, 0x00, 0x00, 0x06, 0xc0, 0x00, 0x0e, 0x18, 0x03, 0x0c, 0x3c, 0x00, 0x00, 0x30, 0x00, 0x0c, 0x70, 0x80, 0x33, 0x98, 0x01, 0x0f, 0x00, 0x00, 0x00, 0x60, 0x00, 0x0c, 0xe0, 0x80, 0x31, 0x30, 0x00, 0x0c, 0xe0, 0x80, 0x19, 0x80, 0x81, 0x67, 0x30, 0x00, 0x18, 0xe0, 0x80, 0x67, 0x18, 0x03, 0x00, 0x00, 0x00, 0x06, 0xc0, 0x00, 0x0e, 0x18, 0x03, 0x18, 0x00, 0xc0, 0x18, 0xf8, 0xc3, 0x1f, 0x18, 0xc3, 0x18, 0x00, 0x00, 0x00, 0x80, 0x01, 0x0c, 0xc0, 0x01, 0x0e, 0xc0, 0x00, 0x06, 0xb0, 0x01, 0x1b, 0xd8, 0x00, 0x1b, 0x00, 0x00, 0x00, 0xf8, 0x83, 0x3f, 0x18, 0x83, 0x31, 0x60, 0x00, 0x06, 0x00, 0x00, 0x00, 0xb0, 0x01, 0x1b, 0xe0, 0x00, 0x0e, 0x18, 0x83, 0x31, 0x60, 0x00, 0x06, 0x00, 0x00, 0x0c, 0xe0, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x38, 0x03, 0x1b, 0xf8, 0x81, 0x1f, 0x0c, 0xc3, 0x30, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00, 0x00, 0x18, 0x80, 0x01, 0x00, 0x00, 0x00, 0x1b, 0xb0, 0x61, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x83, 0x3f, 0x18, 0x83, 0x31, 0x60, 0x06, 0x66, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x18, 0x00, 0x00, 0x00, 0xd8, 0x00, 0x1b, 0xc0, 0x00, 0x0c, 0xe0, 0x00, 0x0e, 0x00, 0x00, 0x00, 0xb0, 0x01, 0x1b, 0x00, 0x00, 0x00, 0x98, 0x81, 0x19, 0x00, 0x00, 0x00, 0x70, 0x03, 0x37, 0xf8, 0x83, 0x3f, 0x18, 0x83, 0x31, 0xe0, 0x00, 0x0e, 0x60, 0x06, 0x66, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x0f, 0xf0, 0x00, 0x0e, 0x98, 0x01, 0x0c, 0xc0, 0x00, 0x06, 0x60, 0x00, 0x1b, 0xb0, 0x01, 0x00, 0x00, 0x00, 0x00, 0xb0, 0x81, 0x0d, 0x00, 0x00, 0x00, 0x30, 0x03, 0x0e, 0xb0, 0x81, 0x3f, 0xc0, 0x00, 0x03, 0x00, 0x00, 0x00, 0x18, 0x03, 0x06, 0xf0, 0x00, 0x00, 0x70, 0x03, 0x00, 0xc0, 0x00, 0x0e, 0x30, 0x83, 0x3b, 0x7e, 0xe0, 0x31, 0x00, 0xe0, 0x47, 0xf8, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x98, 0x81, 0x19, 0xc0, 0x00, 0x18, 0xc0, 0x00, 0x0c, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x18, 0xc0, 0x00, 0x00, 0x30, 0x80, 0x31, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x80, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x01, 0x03, 0x0c, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x31, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x80, 0x31, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x80, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x06, 0x18, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x07, 0x00, 0x70, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x03, 0xc0, 0xff, 0xff, 0x00, 0xf0, 0x03, 0xc0, 0xff, 0xff, 0x00, 0xf0, 0x03, 0xc0, 0xff, 0xff, 0x00, 0xf0, 0x03, 0xc0, 0xff, 0xff, 0x00, 0xf0, 0x03, 0xc0, 0xff, 0xff, 0x00, 0xf0, 0x03, 0xc0, 0xff, 0xff, 0x00, 0xf0, 0x03, 0xc0, 0xff, 0xff, 0x00, 0xf0, 0x03, 0xc0, 0xff, 0xff, 0x00, 0xf0, 0x01, 0xc0, 0xf7, 0x7d, 0x00, 0xf0, 0x01, 0xc0, 0xf7, 0x7d, 0x00, 0xf0, 0x01, 0xc0, 0xf7, 0x7d, 0x00, 0xf0, 0x01, 0xc0, 0xf7, 0xfd, 0x00, 0xf0, 0x01, 0xc0, 0xf7, 0x7d, 0x00, 0xf0, 0x01, 0xc0, 0xf7, 0x7d, 0x00, 0xf0, 0x01, 0xc0, 0xf7, 0x7d, 0x00, 0xf0, 0x01, 0xc0, 0xf7, 0x7d, 0x00, 0xf0, 0x03, 0xc0, 0xff, 0xff, 0x00, 0xf0, 0x03, 0xc0, 0xff, 0xff, 0x00, 0xf0, 0x03, 0xc0, 0xff, 0xff, 0x00, 0xf0, 0x03, 0xc0, 0xff, 0xff, 0x00, 0xf0, 0x03, 0xc0, 0xff, 0xff, 0x00, 0xf0, 0x03, 0xc0, 0xff, 0xff, 0x00, 0xf0, 0x03, 0xc0, 0xff, 0xff, 0x00, 0xf0, 0x03, 0xc0, 0xff, 0xff, 0x00, 0xf0, 0x01, 0xc0, 0xf7, 0x7d, 0x00, 0xf0, 0x01, 0xc0, 0xf7, 0x7d, 0x00, 0xf0, 0x01, 0xc0, 0xf7, 0x7d, 0x00, 0xf0, 0x01, 0xc0, 0xf7, 0x7d, 0x00, 0xf0, 0x01, 0xc0, 0xf7, 0x7d, 0x00, 0xf0, 0x01, 0xc0, 0xf7, 0x7d, 0x00, 0xf0, 0x01, 0xc0, 0xf7, 0x7d, 0x00, 0xf0, 0x01, 0xc0, 0xf7, 0x7d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0xe0, 0x0f, 0xc0, 0xc0, 0x0f, 0x80, 0xc0, 0x0f, 0x00, 0xfe, 0x1f, 0x80, 0x0c, 0x30, 0x33, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x7f, 0x30, 0x00, 0x3f, 0x10, 0x00, 0x3f, 0x00, 0x00, 0xff, 0xf7, 0xff, 0x00, 0xf3, 0xff, 0x60, 0x00, 0x00, 0x60, 0x00, 0x06, 0x70, 0x00, 0x0e, 0x00, 0x00, 0x0f, 0x70, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x06, 0x60, 0x00, 0x06, 0x00, 0x00, 0x06, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xef, 0xff, 0x1f, 0xf0, 0x3f, 0x3f, 0xf0, 0x7f, 0x3f, 0xf0, 0xff, 0x01, 0xe0, 0x7f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0x80, 0xcf, 0xff, 0xc0, 0xef, 0xff, 0xc0, 0xff, 0xff, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x30, 0x06, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x07, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x30, 0xc0, 0x01, 0xcf, 0x30, 0x06, 0x3e, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x30, 0xc0, 0x01, 0x63, 0x60, 0x00, 0x18, 0xe0, 0x01, 0x33, 0x00, 0x00, 0xcf, 0x60, 0x00, 0x30, 0xc0, 0x01, 0xcf, 0x30, 0x06, 0x00, 0x00, 0x00, 0x0c, 0x80, 0x01, 0x1c, 0x30, 0x06, 0x18, 0x78, 0x00, 0x00, 0x60, 0x00, 0x18, 0xe0, 0x00, 0x67, 0x30, 0x03, 0x1e, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x18, 0xc0, 0x01, 0x63, 0x60, 0x00, 0x18, 0xc0, 0x01, 0x33, 0x00, 0x03, 0xcf, 0x60, 0x00, 0x30, 0xc0, 0x01, 0xcf, 0x30, 0x06, 0x00, 0x00, 0x00, 0x0c, 0x80, 0x01, 0x1c, 0x30, 0x06, 0x30, 0x00, 0x80, 0x31, 0xf0, 0x87, 0x3f, 0x30, 0x86, 0x31, 0x00, 0x00, 0x00, 0x00, 0x03, 0x18, 0x80, 0x03, 0x1c, 0x80, 0x01, 0x0c, 0x60, 0x03, 0x36, 0xb0, 0x01, 0x36, 0x00, 0x00, 0x00, 0xf0, 0x07, 0x7f, 0x30, 0x06, 0x63, 0xc0, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x60, 0x03, 0x36, 0xc0, 0x01, 0x1c, 0x30, 0x06, 0x63, 0xc0, 0x00, 0x0c, 0x00, 0x00, 0x18, 0xc0, 0x01, 0x1c, 0x00, 0x00, 0x00, 0x70, 0x06, 0x36, 0xf0, 0x03, 0x3f, 0x18, 0x86, 0x61, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x03, 0x36, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x80, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x03, 0x00, 0x00, 0x00, 0x36, 0x60, 0xc3, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x07, 0x7f, 0x30, 0x06, 0x63, 0xc0, 0x0c, 0xcc, 0x00, 0x00, 0x00, 0x80, 0x01, 0x30, 0x00, 0x00, 0x00, 0xb0, 0x01, 0x36, 0x80, 0x01, 0x18, 0xc0, 0x01, 0x1c, 0x00, 0x00, 0x00, 0x60, 0x03, 0x36, 0x00, 0x00, 0x00, 0x30, 0x03, 0x33, 0x00, 0x00, 0x00, 0xe0, 0x06, 0x6e, 0xf0, 0x07, 0x7f, 0x30, 0x06, 0x63, 0xc0, 0x01, 0x1c, 0xc0, 0x0c, 0xcc, 0x00, 0x00, 0x00, 0xe0, 0x01, 0x1e, 0xe0, 0x01, 0x1c, 0x30, 0x03, 0x18, 0x80, 0x01, 0x0c, 0xc0, 0x00, 0x36, 0x60, 0x03, 0x00, 0x00, 0x00, 0x00, 0x60, 0x03, 0x1b, 0x00, 0x00, 0x00, 0x60, 0x06, 0x1c, 0x60, 0x03, 0x7f, 0x80, 0x01, 0x06, 0x00, 0x00, 0x00, 0x30, 0x06, 0x0c, 0xe0, 0x01, 0x00, 0xe0, 0x06, 0x00, 0x80, 0x01, 0x1c, 0x60, 0x06, 0x77, 0xfc, 0xc0, 0x63, 0x00, 0xc0, 0x8f, 0xf0, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x30, 0x03, 0x33, 0x80, 0x01, 0x30, 0x80, 0x01, 0x18, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x30, 0x80, 0x01, 0x00, 0x60, 0x00, 0x63, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x33, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x03, 0x06, 0x18, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x63, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x63, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x33, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x0c, 0x30, 0x06, 0x00, 0x00, 0x00, 0x06, 0x9c, 0x83, 0x19, 0xfc, 0xe3, 0x30, 0x78, 0x00, 0x0e, 0xe0, 0x00, 0x07, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0xf8, 0x03, 0x0c, 0xf8, 0xc3, 0x7f, 0xc0, 0xc0, 0x7f, 0x60, 0xc0, 0x7f, 0xf8, 0x83, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x0e, 0x80, 0x1f, 0xf8, 0x03, 0x0f, 0xfc, 0x03, 0x3f, 0xfc, 0xc1, 0x7f, 0xfc, 0x87, 0x3f, 0x0c, 0xc6, 0x3f, 0x00, 0xc6, 0x70, 0x0c, 0xe0, 0x70, 0x0e, 0x86, 0x3f, 0xfc, 0x83, 0x3f, 0xfc, 0x83, 0x3f, 0xfe, 0xc7, 0x60, 0x06, 0x66, 0x60, 0x0c, 0x63, 0x60, 0xfc, 0x03, 0x06, 0x0c, 0x00, 0x06, 0x70, 0x00, 0x00, 0x60, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x06, 0x00, 0xe0, 0x01, 0x00, 0x0c, 0x00, 0x06, 0x00, 0xc6, 0x00, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x60, 0x00, 0x06, 0x78, 0x06, 0x00, 0x00, 0x00, 0x06, 0x60, 0x00, 0x3f, 0x00, 0xc0, 0x30, 0x60, 0xc0, 0x30, 0x00, 0x40, 0x40, 0xf8, 0x01, 0x00, 0x00, 0x00, 0x00, 0x04, 0x04, 0x00, 0x78, 0x00, 0x06, 0x1e, 0xe0, 0x01, 0xc0, 0x00, 0x00, 0xfc, 0x0f, 0x00, 0x00, 0x00, 0x06, 0xf0, 0x03, 0x00, 0x0e, 0xe2, 0x20, 0x1e, 0x02, 0x06, 0x60, 0x00, 0x0c, 0xb0, 0xc1, 0x3c, 0x00, 0x80, 0x31, 0xf8, 0x07, 0x3f, 0xc0, 0x00, 0x0c, 0xb0, 0x01, 0x00, 0x60, 0x00, 0x06, 0x98, 0x01, 0x00, 0xfc, 0xc1, 0x3c, 0x60, 0x00, 0x0c, 0xb0, 0xc1, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x06, 0x0c, 0x60, 0x00, 0x1b, 0x00, 0x60, 0x66, 0x18, 0x00, 0x1f, 0x60, 0x00, 0x06, 0xd8, 0xc0, 0x1c, 0x00, 0x80, 0x19, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x06, 0xb0, 0x01, 0x00, 0x60, 0x00, 0x06, 0xb0, 0x01, 0x00, 0xe0, 0xcf, 0x3c, 0x60, 0x00, 0x0c, 0xb0, 0xc1, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x60, 0x00, 0x1b, 0x00, 0x00, 0x0c, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x81, 0x0f, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x06, 0x60, 0x03, 0x1b, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x0e, 0x70, 0x00, 0x6e, 0xfc, 0x01, 0x60, 0x00, 0x00, 0x00, 0xf0, 0x01, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x0e, 0xb0, 0x01, 0x1b, 0xf0, 0x01, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0xb0, 0x01, 0x1b, 0x0c, 0xc6, 0x00, 0xcc, 0x81, 0x0d, 0x00, 0x00, 0x00, 0xf8, 0x81, 0x1f, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x1e, 0x86, 0x61, 0xb0, 0x01, 0x1b, 0x0c, 0xc7, 0x00, 0x00, 0x00, 0x0c, 0x60, 0xc0, 0x00, 0x78, 0xc0, 0x18, 0x78, 0xc6, 0x00, 0x60, 0xc0, 0x00, 0x78, 0x03, 0x0c, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x0e, 0xe0, 0xc0, 0x00, 0x0c, 0x06, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x01, 0x1f, 0x30, 0x03, 0x33, 0xf8, 0x07, 0x00, 0x60, 0x00, 0x0c, 0xfc, 0x03, 0x00, 0x70, 0x00, 0x0e, 0x60, 0x00, 0x06, 0xb0, 0x01, 0x1b, 0xf8, 0x03, 0x00, 0xe0, 0x00, 0x0e, 0xfe, 0x07, 0x03, 0xf0, 0x00, 0x0f, 0xfe, 0x07, 0x03, 0xd8, 0x81, 0x1d, 0x00, 0x00, 0x00, 0xf0, 0x01, 0x1f, 0xb0, 0x01, 0x1b, 0x30, 0x03, 0x33, 0x0c, 0x06, 0x00, 0x98, 0x81, 0x19, 0x98, 0x01, 0x1b, 0x00, 0x00, 0x06, 0x60, 0x00, 0x00, 0x00, 0x00, 0x0e, 0xe0, 0x00, 0x0f, 0xfc, 0x83, 0x19, 0xe0, 0x00, 0x07, 0x00, 0x00, 0x00, 0x98, 0x01, 0x1b, 0xe0, 0x00, 0x00, 0x60, 0x00, 0x06, 0x00, 0x00, 0x00, 0xf0, 0x01, 0x00, 0x98, 0x01, 0x00, 0xd8, 0x01, 0x00, 0x60, 0x00, 0x0c, 0x98, 0x01, 0x33, 0x06, 0x20, 0x19, 0x00, 0x80, 0x6c, 0x0c, 0xe3, 0x20, 0x1e, 0xe2, 0x21, 0x3e, 0x02, 0x00, 0x60, 0x00, 0x00, 0x60, 0xe0, 0x7f, 0xc0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe3, 0x01, 0x00, 0xfb, 0xb7, 0x61, 0xfb, 0x07, 0x00, 0xf3, 0x01, 0x00, 0x1b, 0x36, 0x3f, 0x6c, 0x03, 0x0f, 0xfe, 0xe1, 0x7f, 0xf0, 0xe0, 0x3f, 0xfe, 0xe3, 0x70, 0xfc, 0x83, 0x1f, 0x1e, 0x07, 0x0f, 0x0e, 0xe7, 0x70, 0xfe, 0xc7, 0x3f, 0xfe, 0xc7, 0x3f, 0x00, 0xe0, 0x7f, 0xfe, 0x67, 0x60, 0xfc, 0xe3, 0x70, 0x66, 0x86, 0x1f, 0x00, 0x00, 0x00, 0x60, 0x00, 0x0c, 0x60, 0x00, 0x06, 0x6c, 0x06, 0x00, 0xf8, 0x00, 0x00, 0xfe, 0x03, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x01, 0x00, 0x00, 0xe0, 0x01, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x98, 0x81, 0x31, 0xc0, 0x00, 0x0c, 0x60, 0x00, 0x00, 0x60, 0x00, 0x00, 0x3f, 0x00, 0x0c, 0xf8, 0x83, 0x3f, 0xfc, 0x03, 0x00, 0x00, 0x86, 0x0f, 0xc6, 0xf0, 0x03, 0x6c, 0x00, 0x06, 0xf8, 0xc1, 0x30, 0xf0, 0xc0, 0x3f, 0xfc, 0xc3, 0x3f, 0xf0, 0xc1, 0x7f, 0x66, 0x86, 0x3f, 0x06, 0x07, 0x1f, 0x0c, 0x07, 0x1f, 0x0e, 0x67, 0x60, 0xf8, 0xc3, 0x3f, 0xfc, 0x03, 0x3f, 0xfc, 0xc3, 0x60, 0x60, 0xc0, 0x30, 0x8c, 0xc1, 0x60, 0x66, 0x66, 0x1b, 0x0e, 0x60, 0x60, 0x0c, 0xc0, 0x1f, 0xcc, 0x83, 0x7f, 0x00, 0x80, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x31, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x0c, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x80, 0x01, 0x60, 0x00, 0x0c, 0xf0, 0x01, 0x00, 0x8c, 0x03, 0x00, 0xf8, 0xe1, 0x7f, 0xfe, 0x03, 0x0f, 0xf0, 0xe1, 0x3f, 0x86, 0x03, 0x0f, 0xfc, 0xe3, 0x3f, 0xfe, 0xe3, 0x3f, 0xf6, 0x00, 0x38, 0xe0, 0xe1, 0x1f, 0x9c, 0xe3, 0x3f, 0xfe, 0xe3, 0x38, 0x8c, 0xe3, 0x3f, 0xfe, 0x63, 0x66, 0xfc, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x1f, 0x6c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x06, 0x00, 0x80, 0x19, 0x00, 0x80, 0x01, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x83, 0x01, 0x18, 0x03, 0x00, 0x60, 0x00, 0x03, 0x00, 0x00, 0x00, 0x30, 0x80, 0x19, 0x00, 0x00, 0x0c, 0x30, 0x03, 0xf8, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x06, 0x00, 0x83, 0x19, 0xc0, 0x06, 0xc0, 0x60, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0xe6, 0x7f, 0x00, 0x00, 0x00, 0xfc, 0x01, 0x03, 0x80, 0x01, 0x06, 0x18, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0xc0, 0xf1, 0x00, 0x00, 0x06, 0xfc, 0x61, 0x66, 0xf8, 0x00, 0x00, 0xfc, 0x63, 0x60, 0x60, 0x80, 0x0f, 0xc0, 0x00, 0x00, 0x06, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x03, 0xc0, 0xff, 0xff, 0x00, 0xf0, 0x03, 0xc0, 0xff, 0xff, 0x00, 0xf0, 0x03, 0xc0, 0xff, 0xff, 0x00, 0xf0, 0x03, 0xc0, 0xff, 0xff, 0x00, 0xf0, 0x03, 0xc0, 0xff, 0xff, 0x00, 0xf0, 0x03, 0xc0, 0xff, 0xff, 0x00, 0xf0, 0x03, 0xc0, 0xff, 0xff, 0x00, 0xf0, 0x03, 0xc0, 0xff, 0xff, 0x00, 0xf0, 0x01, 0xc0, 0xf7, 0x7d, 0x00, 0xf0, 0x01, 0xc0, 0xf7, 0x7d, 0x00, 0xf0, 0x01, 0xc0, 0xf7, 0x7d, 0x00, 0xf0, 0x01, 0xc0, 0xf7, 0xfd, 0x00, 0xf0, 0x01, 0xc0, 0xf7, 0x7d, 0x00, 0xf0, 0x01, 0xc0, 0xf7, 0x7d, 0x00, 0xf0, 0x01, 0xc0, 0xf7, 0x7d, 0x00, 0xf0, 0x01, 0xc0, 0xf7, 0x7d, 0x00, 0xf0, 0x03, 0xc0, 0xff, 0xff, 0x00, 0xf0, 0x03, 0xc0, 0xff, 0xff, 0x00, 0xf0, 0x03, 0xc0, 0xff, 0xff, 0x00, 0xf0, 0x03, 0xc0, 0xff, 0xff, 0x00, 0xf0, 0x03, 0xc0, 0xff, 0xff, 0x00, 0xf0, 0x03, 0xc0, 0xff, 0xff, 0x00, 0xf0, 0x03, 0xc0, 0xff, 0xff, 0x00, 0xf0, 0x03, 0xc0, 0xff, 0xff, 0x00, 0xf0, 0x01, 0xc0, 0xf7, 0x7d, 0x00, 0xf0, 0x01, 0xc0, 0xf7, 0x7d, 0x00, 0xf0, 0x01, 0xc0, 0xf7, 0x7d, 0x00, 0xf0, 0x01, 0xc0, 0xf7, 0x7d, 0x00, 0xf0, 0x01, 0xc0, 0xf7, 0x7d, 0x00, 0xf0, 0x01, 0xc0, 0xf7, 0x7d, 0x00, 0xf0, 0x01, 0xc0, 0xf7, 0x7d, 0x00, 0xf0, 0x01, 0xc0, 0xf7, 0x7d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x30, 0x00, 0xf8, 0x0f, 0xfc, 0xe0, 0x0f, 0xe0, 0xe0, 0x0f, 0x00, 0xfc, 0x3f, 0xc0, 0x0c, 0xc0, 0xcc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0xc0, 0xff, 0xf1, 0x03, 0x7f, 0x70, 0x00, 0x7f, 0x00, 0x00, 0xff, 0xf3, 0xff, 0x00, 0xf3, 0xff, 0x60, 0x00, 0x00, 0x60, 0x00, 0x06, 0x18, 0x00, 0x18, 0x00, 0x80, 0x19, 0x18, 0x00, 0x18, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0xf8, 0x81, 0x1f, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x06, 0x60, 0x00, 0x06, 0x00, 0x00, 0x06, 0x60, 0x00, 0x00, 0x00, 0x00, 0x06, 0x60, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0xcf, 0xff, 0x07, 0xf0, 0x03, 0x1f, 0xf0, 0x1f, 0x1f, 0xf0, 0xff, 0x03, 0xc0, 0x3f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf7, 0x3f, 0x00, 0x0e, 0xfc, 0x80, 0x8f, 0xff, 0x80, 0xff, 0xff, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x38, 0x07, 0x33, 0xf8, 0xc7, 0x61, 0xf0, 0x00, 0x1c, 0xc0, 0x01, 0x0e, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0xf0, 0x07, 0x18, 0xf0, 0x87, 0xff, 0x80, 0x81, 0xff, 0xc0, 0x80, 0xff, 0xf0, 0x07, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x1c, 0x00, 0x3f, 0xf0, 0x07, 0x1e, 0xf8, 0x07, 0x7e, 0xf8, 0x83, 0xff, 0xf8, 0x0f, 0x7f, 0x18, 0x8c, 0x7f, 0x00, 0x8c, 0xe1, 0x18, 0xc0, 0xe1, 0x1c, 0x0c, 0x7f, 0xf8, 0x07, 0x7f, 0xf8, 0x07, 0x7f, 0xfc, 0x8f, 0xc1, 0x0c, 0xcc, 0xc0, 0x18, 0xc6, 0xc0, 0xf8, 0x07, 0x0c, 0x18, 0x00, 0x0c, 0xe0, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x0c, 0x00, 0xc0, 0x03, 0x00, 0x18, 0x00, 0x0c, 0x00, 0x8c, 0x01, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0xc0, 0x00, 0x0c, 0xf0, 0x0c, 0x00, 0x00, 0x00, 0x0c, 0xc0, 0x00, 0x7e, 0x00, 0x80, 0x61, 0xc0, 0x80, 0x61, 0x00, 0x80, 0x80, 0xf0, 0x03, 0x00, 0x00, 0x00, 0x00, 0x08, 0x08, 0x00, 0xf0, 0x00, 0x0c, 0x3c, 0xc0, 0x03, 0x80, 0x01, 0x00, 0xf8, 0x1f, 0x00, 0x00, 0x00, 0x0c, 0xe0, 0x07, 0x00, 0x1c, 0xc4, 0x41, 0x3c, 0x04, 0x0c, 0xc0, 0x00, 0x18, 0x60, 0x83, 0x79, 0x00, 0x00, 0x63, 0xf0, 0x0f, 0x7e, 0x80, 0x01, 0x18, 0x60, 0x03, 0x00, 0xc0, 0x00, 0x0c, 0x30, 0x03, 0x00, 0xf8, 0x83, 0x79, 0xc0, 0x00, 0x18, 0x60, 0x83, 0x79, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x18, 0xc0, 0x00, 0x36, 0x00, 0xc0, 0xcc, 0x30, 0x00, 0x3e, 0xc0, 0x00, 0x0c, 0xb0, 0x81, 0x39, 0x00, 0x00, 0x33, 0x00, 0x00, 0x00, 0x80, 0x01, 0x0c, 0x60, 0x03, 0x00, 0xc0, 0x00, 0x0c, 0x60, 0x03, 0x00, 0xc0, 0x9f, 0x79, 0xc0, 0x00, 0x18, 0x60, 0x83, 0x79, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0xc0, 0x00, 0x36, 0x00, 0x00, 0x18, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x03, 0x1f, 0x00, 0x00, 0x00, 0x80, 0x01, 0x0c, 0xc0, 0x06, 0x36, 0x00, 0x00, 0x00, 0xc0, 0x01, 0x1c, 0xe0, 0x00, 0xdc, 0xf8, 0x03, 0xc0, 0x00, 0x00, 0x00, 0xe0, 0x03, 0x3e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x01, 0x1c, 0x60, 0x03, 0x36, 0xe0, 0x03, 0x3e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x60, 0x03, 0x36, 0x18, 0x8c, 0x01, 0x98, 0x03, 0x1b, 0x00, 0x00, 0x00, 0xf0, 0x03, 0x3f, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x3c, 0x0c, 0xc3, 0x00, 0x0c, 0x00, 0x18, 0x8e, 0x01, 0x00, 0x00, 0x18, 0xc0, 0x80, 0x01, 0xf0, 0x80, 0x31, 0xf0, 0x8c, 0x01, 0xc0, 0x80, 0x01, 0xf0, 0x06, 0x18, 0x80, 0x01, 0x00, 0x00, 0x00, 0x1c, 0xc0, 0x81, 0x01, 0x18, 0x0c, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x03, 0x3e, 0x60, 0x06, 0x66, 0xf0, 0x0f, 0x00, 0xc0, 0x00, 0x18, 0xf8, 0x07, 0x00, 0xe0, 0x00, 0x1c, 0xc0, 0x00, 0x0c, 0x60, 0x03, 0x36, 0xf0, 0x07, 0x00, 0xc0, 0x01, 0x1c, 0xfc, 0x0f, 0x06, 0xe0, 0x01, 0x1e, 0xfc, 0x0f, 0x06, 0xb0, 0x03, 0x3b, 0x00, 0x00, 0x00, 0xe0, 0x03, 0x3e, 0x60, 0x03, 0x36, 0x60, 0x06, 0x66, 0x18, 0x0c, 0x00, 0x30, 0x03, 0x33, 0x30, 0x03, 0x36, 0x00, 0x00, 0x0c, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x1c, 0xc0, 0x01, 0x1e, 0xf8, 0x07, 0x33, 0xc0, 0x01, 0x0e, 0x00, 0x00, 0x00, 0x30, 0x03, 0x36, 0xc0, 0x01, 0x00, 0xc0, 0x00, 0x0c, 0x00, 0x00, 0x00, 0xe0, 0x03, 0x00, 0x30, 0x03, 0x00, 0xb0, 0x03, 0x00, 0xc0, 0x00, 0x18, 0x30, 0x03, 0x66, 0x0c, 0x40, 0x32, 0x00, 0x00, 0xd9, 0x18, 0xc6, 0x41, 0x3c, 0xc4, 0x43, 0x7c, 0x04, 0x00, 0xc0, 0x00, 0x00, 0xc0, 0xc0, 0xff, 0x80, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc6, 0x03, 0x00, 0xf6, 0x6f, 0xc3, 0xf6, 0x0f, 0x00, 0xe6, 0x03, 0x00, 0x36, 0x6c, 0x7e, 0xd8, 0x06, 0x1e, 0xfc, 0xc3, 0xff, 0xe0, 0xc1, 0x7f, 0xfc, 0xc7, 0xe1, 0xf8, 0x07, 0x3f, 0x3c, 0x0e, 0x1e, 0x1c, 0xce, 0xe1, 0xfc, 0x8f, 0x7f, 0xfc, 0x8f, 0x7f, 0x00, 0xc0, 0xff, 0xfc, 0xcf, 0xc0, 0xf8, 0xc7, 0xe1, 0xcc, 0x8c, 0x61, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x18, 0xc0, 0x00, 0x0c, 0xd8, 0x0c, 0x00, 0xf0, 0x01, 0x00, 0xfc, 0x07, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x03, 0x00, 0x00, 0xc0, 0x03, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x03, 0x63, 0x80, 0x01, 0x18, 0xc0, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x7e, 0x00, 0x18, 0xf0, 0x07, 0x7f, 0xf8, 0x07, 0x00, 0x00, 0x0c, 0x1f, 0x8c, 0xe1, 0x07, 0xd8, 0x00, 0x0c, 0xf0, 0x83, 0x61, 0xe0, 0x81, 0x7f, 0xf8, 0x87, 0x7f, 0xe0, 0x83, 0xff, 0xcc, 0x0c, 0x7f, 0x0c, 0x0e, 0x3e, 0x18, 0x0e, 0x3e, 0x1c, 0xce, 0xc0, 0xf0, 0x87, 0x7f, 0xf8, 0x07, 0x7e, 0xf8, 0x87, 0xc1, 0xc0, 0x80, 0x61, 0x18, 0x83, 0xc1, 0xcc, 0xcc, 0x36, 0x1c, 0xc0, 0xc0, 0x18, 0x80, 0x3f, 0x98, 0x07, 0xff, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x63, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x18, 0x00, 0x18, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x03, 0xc0, 0x00, 0x18, 0xe0, 0x03, 0x00, 0x00, 0x00, 0x06, 0x18, 0x83, 0x19, 0x66, 0xb6, 0x19, 0xcc, 0x00, 0x0c, 0x30, 0x00, 0x0c, 0x66, 0x06, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x0c, 0x06, 0x0f, 0x0c, 0x06, 0x30, 0x60, 0xc0, 0x00, 0x30, 0x00, 0x60, 0x0c, 0xc6, 0x60, 0x00, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x38, 0xc0, 0x30, 0x0c, 0x86, 0x19, 0x0c, 0x86, 0x61, 0x0c, 0xc3, 0x00, 0x0c, 0xc0, 0x60, 0x0c, 0x06, 0x06, 0x00, 0xc6, 0x1c, 0x0c, 0xe0, 0x79, 0x1e, 0xc6, 0x60, 0x0c, 0xc6, 0x60, 0x0c, 0xc6, 0x60, 0x60, 0xc0, 0x60, 0x06, 0x66, 0x60, 0x98, 0xc1, 0x30, 0x80, 0x01, 0x06, 0x18, 0x00, 0x06, 0xd8, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x06, 0x00, 0x30, 0x03, 0x00, 0x0c, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x60, 0x00, 0x06, 0xcc, 0x03, 0x00, 0x00, 0x00, 0x00, 0x60, 0x80, 0x61, 0x0c, 0x83, 0x19, 0x60, 0xc0, 0x00, 0x00, 0x20, 0x8e, 0x00, 0x83, 0x19, 0x00, 0x00, 0x00, 0xf2, 0x09, 0x00, 0xcc, 0x00, 0x06, 0x30, 0x00, 0x03, 0x60, 0x00, 0x00, 0x66, 0x0e, 0x00, 0x00, 0x00, 0x07, 0x18, 0xc6, 0x0c, 0x0c, 0xc1, 0x10, 0x30, 0x01, 0x00, 0xf0, 0x01, 0x1f, 0x00, 0x00, 0x00, 0xf0, 0x01, 0x1f, 0x6c, 0x80, 0x61, 0xfc, 0xc7, 0x7f, 0xfc, 0xc7, 0x7f, 0xf8, 0x81, 0x1f, 0x00, 0x80, 0x1f, 0x0c, 0xc3, 0x61, 0xf8, 0x83, 0x3f, 0xf8, 0x83, 0x3f, 0xf8, 0x03, 0x00, 0xf8, 0xc3, 0x60, 0x0c, 0xc6, 0x60, 0x0c, 0xc6, 0x30, 0xf8, 0x83, 0x31, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0xf0, 0x01, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x01, 0x00, 0xf0, 0x03, 0x00, 0xf0, 0x03, 0x00, 0xf0, 0x03, 0x00, 0xf0, 0x03, 0x00, 0xfc, 0x01, 0x60, 0x0c, 0x03, 0xf8, 0xfd, 0x07, 0x00, 0xfc, 0x07, 0x00, 0xfc, 0x07, 0x00, 0xfc, 0x07, 0x00, 0xfc, 0x07, 0x00, 0xf8, 0x03, 0x00, 0xf8, 0x03, 0x00, 0xf8, 0x03, 0x00, 0xf8, 0x03, 0x00, 0x0c, 0xc6, 0x00, 0xfe, 0xef, 0x03, 0xf8, 0x01, 0x00, 0xf8, 0x01, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x01, 0x00, 0xf8, 0x01, 0x00, 0x0c, 0x06, 0x00, 0x00, 0x06, 0x00, 0xcc, 0xc1, 0x00, 0x00, 0xc0, 0x00, 0x78, 0xc0, 0x00, 0x60, 0xc0, 0x0c, 0x60, 0xc3, 0x00, 0x60, 0xc3, 0x06, 0xe0, 0xc1, 0x61, 0x00, 0xc0, 0x61, 0x00, 0xc0, 0x61, 0x00, 0x00, 0x00, 0x1c, 0x06, 0x00, 0xf8, 0x03, 0x00, 0xf8, 0x03, 0x00, 0xf8, 0x03, 0x00, 0xcc, 0x00, 0x00, 0xfc, 0x03, 0x00, 0x0c, 0x06, 0x00, 0xfc, 0x03, 0x00, 0xf8, 0x03, 0x00, 0xf8, 0x03, 0x00, 0x0c, 0x06, 0x00, 0xf8, 0x03, 0x00, 0x60, 0x00, 0x03, 0xfe, 0x07, 0x03, 0x60, 0xc0, 0x1f, 0x0c, 0x06, 0x00, 0x0c, 0x06, 0x00, 0x0c, 0x06, 0x00, 0xec, 0x06, 0x0e, 0x0c, 0x06, 0x00, 0x0c, 0x06, 0x00, 0x06, 0x06, 0x00, 0x00, 0x00, 0x00, 0x0c, 0xc3, 0x3f, 0x00, 0xc0, 0x3f, 0x00, 0xc0, 0x3f, 0x00, 0x80, 0x19, 0x80, 0x81, 0x19, 0xf0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x06, 0xb8, 0x83, 0x19, 0xe6, 0xe7, 0x0d, 0xf8, 0x82, 0x7c, 0x06, 0xc6, 0x10, 0x30, 0x21, 0x10, 0x18, 0x01, 0x06, 0xf0, 0x00, 0x06, 0x60, 0xe0, 0x7f, 0x40, 0xc3, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x33, 0x03, 0x00, 0x1b, 0xb4, 0x61, 0xc3, 0x00, 0x00, 0x1b, 0x03, 0x00, 0x33, 0xb3, 0x61, 0x00, 0x80, 0x19, 0x0c, 0xc3, 0x40, 0x98, 0xc1, 0x20, 0xc2, 0xc1, 0x30, 0x06, 0x06, 0x06, 0x8c, 0x81, 0x19, 0x9e, 0xc7, 0x31, 0x02, 0x64, 0x60, 0x0c, 0xc3, 0x60, 0x00, 0xc0, 0x41, 0x62, 0xc4, 0x30, 0x66, 0xc6, 0x30, 0x66, 0xc6, 0x30, 0xf8, 0xc1, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x8c, 0x01, 0x00, 0x0c, 0x00, 0x00, 0x38, 0x00, 0x00, 0x0c, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xc7, 0x7f, 0x0c, 0xc0, 0x7f, 0x0c, 0xc6, 0x60, 0x60, 0x80, 0x1f, 0x00, 0xc6, 0x0c, 0xc6, 0xc0, 0x00, 0x0c, 0x67, 0x78, 0x00, 0xc0, 0x30, 0x98, 0xc1, 0x00, 0x0c, 0xc6, 0x00, 0x98, 0xc1, 0x00, 0x66, 0xc6, 0x60, 0x86, 0x67, 0x78, 0x8c, 0x81, 0x19, 0x9e, 0x67, 0x60, 0x0c, 0xc6, 0x30, 0x0c, 0x86, 0x61, 0x60, 0xc0, 0x60, 0xfc, 0x83, 0x19, 0x8c, 0xc1, 0x60, 0x66, 0x66, 0x1b, 0x0c, 0x60, 0x60, 0x0c, 0x60, 0x30, 0x6c, 0xc6, 0x60, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0xe3, 0x1f, 0x80, 0x01, 0x18, 0x00, 0x03, 0x0c, 0x60, 0x60, 0x30, 0xc6, 0x03, 0x0c, 0x00, 0x03, 0x30, 0x00, 0x63, 0x30, 0x9c, 0x01, 0x30, 0x80, 0xc1, 0x30, 0x18, 0x63, 0x30, 0x06, 0xc3, 0x30, 0x18, 0x03, 0x30, 0x00, 0x63, 0x66, 0x18, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x30, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x66, 0x00, 0x00, 0x60, 0x00, 0x06, 0x00, 0x00, 0x00, 0x66, 0x60, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x98, 0x01, 0x00, 0x00, 0x80, 0x01, 0x18, 0x00, 0x00, 0x00, 0xc0, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x80, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x60, 0x00, 0x00, 0x0c, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x80, 0x19, 0xfe, 0xe0, 0x0f, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc7, 0x60, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x30, 0xe6, 0x7f, 0x00, 0x00, 0x1e, 0x00, 0x80, 0x0f, 0xc0, 0x07, 0x06, 0x7c, 0x00, 0x7c, 0x00, 0x00, 0x00, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x73, 0x1c, 0x00, 0x00, 0x06, 0x0e, 0xe0, 0x7f, 0x0c, 0x00, 0x00, 0x00, 0xc3, 0x30, 0xf0, 0xc0, 0x18, 0x00, 0x00, 0x1e, 0x8c, 0x03, 0x00, 0x00, 0x03, 0x00, 0x00, 0xf0, 0x03, 0xc0, 0xff, 0xff, 0x00, 0xf0, 0x03, 0xc0, 0xff, 0xff, 0x00, 0xf0, 0x03, 0xc0, 0xff, 0xff, 0x00, 0xf0, 0x03, 0xc0, 0xff, 0xff, 0x00, 0xf0, 0x03, 0xc0, 0xff, 0xff, 0x00, 0xf0, 0x03, 0xc0, 0xff, 0xff, 0x00, 0xf0, 0x03, 0xc0, 0xff, 0xff, 0x00, 0xf0, 0x03, 0xc0, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x03, 0xc0, 0xff, 0xff, 0x00, 0xf0, 0x03, 0xc0, 0xff, 0xff, 0x00, 0xf0, 0x03, 0xc0, 0xff, 0xff, 0x00, 0xf0, 0x03, 0xc0, 0xff, 0xff, 0x00, 0xf0, 0x03, 0xc0, 0xff, 0xff, 0x00, 0xf0, 0x03, 0xc0, 0xff, 0xff, 0x00, 0xf0, 0x03, 0xc0, 0xff, 0xff, 0x00, 0xf0, 0x03, 0xc0, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x70, 0x00, 0xfe, 0x8f, 0xff, 0xf0, 0x0f, 0xf8, 0xe0, 0x0f, 0x00, 0xf8, 0x7f, 0xe0, 0x0c, 0x30, 0x33, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0xe0, 0xff, 0xf7, 0x1f, 0xff, 0xf0, 0x01, 0x7f, 0x00, 0x00, 0xff, 0xf1, 0xff, 0x00, 0xf3, 0xff, 0x60, 0x00, 0x00, 0x60, 0x00, 0x06, 0x0c, 0x00, 0x30, 0x00, 0xc0, 0x30, 0x0c, 0x00, 0x30, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0xfe, 0xe7, 0x70, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x06, 0x60, 0x00, 0x06, 0x00, 0x00, 0x06, 0x60, 0x00, 0x03, 0xc0, 0x00, 0x0f, 0x60, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0x8f, 0xff, 0x01, 0x70, 0x00, 0x0f, 0xf0, 0x07, 0x1f, 0xf0, 0xff, 0x07, 0x80, 0x1f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf7, 0x1f, 0x00, 0x08, 0xe0, 0x00, 0x0f, 0xfe, 0x80, 0xff, 0xff, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x30, 0x06, 0x33, 0xcc, 0x6c, 0x33, 0x98, 0x01, 0x18, 0x60, 0x00, 0x18, 0xcc, 0x0c, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x18, 0x0c, 0x1e, 0x18, 0x0c, 0x60, 0xc0, 0x80, 0x01, 0x60, 0x00, 0xc0, 0x18, 0x8c, 0xc1, 0x00, 0x00, 0x00, 0x80, 0x03, 0x00, 0x70, 0x80, 0x61, 0x18, 0x0c, 0x33, 0x18, 0x0c, 0xc3, 0x18, 0x86, 0x01, 0x18, 0x80, 0xc1, 0x18, 0x0c, 0x0c, 0x00, 0x8c, 0x39, 0x18, 0xc0, 0xf3, 0x3c, 0x8c, 0xc1, 0x18, 0x8c, 0xc1, 0x18, 0x8c, 0xc1, 0xc0, 0x80, 0xc1, 0x0c, 0xcc, 0xc0, 0x30, 0x83, 0x61, 0x00, 0x03, 0x0c, 0x30, 0x00, 0x0c, 0xb0, 0x01, 0x00, 0x80, 0x01, 0x00, 0x18, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x60, 0x06, 0x00, 0x18, 0x00, 0x00, 0x00, 0x80, 0x01, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0xc0, 0x00, 0x0c, 0x98, 0x07, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0xc3, 0x18, 0x06, 0x33, 0xc0, 0x80, 0x01, 0x00, 0x40, 0x1c, 0x01, 0x06, 0x33, 0x00, 0x00, 0x00, 0xe4, 0x13, 0x00, 0x98, 0x01, 0x0c, 0x60, 0x00, 0x06, 0xc0, 0x00, 0x00, 0xcc, 0x1c, 0x00, 0x00, 0x00, 0x0e, 0x30, 0x8c, 0x19, 0x18, 0x82, 0x21, 0x60, 0x02, 0x00, 0xe0, 0x03, 0x3e, 0x00, 0x00, 0x00, 0xe0, 0x03, 0x3e, 0xd8, 0x00, 0xc3, 0xf8, 0x8f, 0xff, 0xf8, 0x8f, 0xff, 0xf0, 0x03, 0x3f, 0x00, 0x00, 0x3f, 0x18, 0x86, 0xc3, 0xf0, 0x07, 0x7f, 0xf0, 0x07, 0x7f, 0xf0, 0x07, 0x00, 0xf0, 0x87, 0xc1, 0x18, 0x8c, 0xc1, 0x18, 0x8c, 0x61, 0xf0, 0x07, 0x63, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0xe0, 0x03, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x03, 0x00, 0xe0, 0x07, 0x00, 0xe0, 0x07, 0x00, 0xe0, 0x07, 0x00, 0xe0, 0x07, 0x00, 0xf8, 0x03, 0xc0, 0x18, 0x06, 0xf0, 0xfb, 0x0f, 0x00, 0xf8, 0x0f, 0x00, 0xf8, 0x0f, 0x00, 0xf8, 0x0f, 0x00, 0xf8, 0x0f, 0x00, 0xf0, 0x07, 0x00, 0xf0, 0x07, 0x00, 0xf0, 0x07, 0x00, 0xf0, 0x07, 0x00, 0x18, 0x8c, 0x01, 0xfc, 0xdf, 0x07, 0xf0, 0x03, 0x00, 0xf0, 0x03, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x03, 0x00, 0xf0, 0x03, 0x00, 0x18, 0x0c, 0x00, 0x00, 0x0c, 0xf0, 0x98, 0x83, 0x01, 0x00, 0x80, 0x01, 0xf0, 0x80, 0x01, 0xc0, 0x80, 0x19, 0xc0, 0x86, 0x01, 0xc0, 0x86, 0x0d, 0xc0, 0x83, 0xc3, 0x00, 0x80, 0xc3, 0x00, 0x80, 0xc3, 0x00, 0x00, 0x00, 0x38, 0x0c, 0x00, 0xf0, 0x07, 0x00, 0xf0, 0x07, 0x00, 0xf0, 0x07, 0x00, 0x98, 0x01, 0x00, 0xf8, 0x07, 0x00, 0x18, 0x0c, 0x00, 0xf8, 0x07, 0x00, 0xf0, 0x07, 0x00, 0xf0, 0x07, 0x00, 0x18, 0x0c, 0x00, 0xf0, 0x07, 0x00, 0xc0, 0x00, 0x06, 0xfc, 0x0f, 0x06, 0xc0, 0x80, 0x3f, 0x18, 0x0c, 0x00, 0x18, 0x0c, 0x00, 0x18, 0x0c, 0x00, 0xd8, 0x0d, 0x1c, 0x18, 0x0c, 0x00, 0x18, 0x0c, 0x00, 0x0c, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x18, 0x86, 0x7f, 0x00, 0x80, 0x7f, 0x00, 0x80, 0x7f, 0x00, 0x00, 0x33, 0x00, 0x03, 0x33, 0xe0, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x01, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x01, 0x0c, 0x70, 0x07, 0x33, 0xcc, 0xcf, 0x1b, 0xf0, 0x05, 0xf9, 0x0c, 0x8c, 0x21, 0x60, 0x42, 0x20, 0x30, 0x02, 0x0c, 0xe0, 0x01, 0x0c, 0xc0, 0xc0, 0xff, 0x80, 0x86, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x66, 0x06, 0x00, 0x36, 0x68, 0xc3, 0x86, 0x01, 0x00, 0x36, 0x06, 0x00, 0x66, 0x66, 0xc3, 0x00, 0x00, 0x33, 0x18, 0x86, 0x81, 0x30, 0x83, 0x41, 0x84, 0x83, 0x61, 0x0c, 0x0c, 0x0c, 0x18, 0x03, 0x33, 0x3c, 0x8f, 0x63, 0x04, 0xc8, 0xc0, 0x18, 0x86, 0xc1, 0x00, 0x80, 0x83, 0xc4, 0x88, 0x61, 0xcc, 0x8c, 0x61, 0xcc, 0xcc, 0xc0, 0xf0, 0x83, 0x61, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x03, 0x00, 0x18, 0x00, 0x00, 0x70, 0x00, 0x00, 0x18, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0xe0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x8f, 0xff, 0x18, 0x80, 0xff, 0x18, 0x8c, 0xc1, 0xc0, 0x00, 0x3f, 0x00, 0x8c, 0x19, 0x8c, 0x81, 0x01, 0x18, 0xce, 0xf0, 0x00, 0x80, 0x61, 0x30, 0x83, 0x01, 0x18, 0x8c, 0x01, 0x30, 0x83, 0x01, 0xcc, 0x8c, 0xc1, 0x0c, 0xcf, 0xf0, 0x18, 0x03, 0x33, 0x3c, 0xcf, 0xc0, 0x18, 0x8c, 0x61, 0x18, 0x0c, 0xc3, 0xc0, 0x80, 0xc1, 0xf8, 0x07, 0x33, 0x18, 0x83, 0xc1, 0xcc, 0xcc, 0x36, 0x18, 0xc0, 0xc0, 0x18, 0xc0, 0x60, 0xd8, 0x8c, 0xc1, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x8c, 0xe1, 0x7f, 0x66, 0xe0, 0x0c, 0xcc, 0x00, 0x06, 0x18, 0x00, 0x18, 0x6c, 0x03, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x0c, 0x06, 0x0c, 0x00, 0x06, 0x18, 0x30, 0xc0, 0x3f, 0x18, 0x00, 0x30, 0x0c, 0xc6, 0x60, 0x30, 0x00, 0x03, 0x70, 0xc0, 0x3f, 0xe0, 0x00, 0x30, 0xc6, 0xc7, 0x30, 0x0c, 0xc6, 0x00, 0x0c, 0xc6, 0x00, 0x0c, 0xc0, 0x00, 0x0c, 0x06, 0x06, 0x00, 0xc6, 0x0e, 0x0c, 0x60, 0x6f, 0x36, 0xc6, 0x60, 0x0c, 0xc6, 0x60, 0x0c, 0xc6, 0x00, 0x60, 0xc0, 0x60, 0x0c, 0x63, 0x66, 0xf0, 0x80, 0x19, 0xc0, 0x00, 0x06, 0x30, 0x00, 0x06, 0x8c, 0x01, 0x00, 0x80, 0xc1, 0x1f, 0xec, 0x83, 0x3f, 0xf8, 0x86, 0x3f, 0x30, 0x80, 0x6f, 0xec, 0x03, 0x07, 0x80, 0xc7, 0x70, 0x60, 0xe0, 0x3b, 0xec, 0x83, 0x3f, 0xec, 0x83, 0x6f, 0xec, 0x83, 0x3f, 0xfc, 0xc1, 0x60, 0x06, 0x66, 0x60, 0x0e, 0xc7, 0x60, 0xfc, 0x07, 0x06, 0x60, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0xfc, 0x03, 0x03, 0xf8, 0x01, 0x0f, 0x60, 0x80, 0x1f, 0x00, 0x20, 0x91, 0xf8, 0xc3, 0x0c, 0x00, 0x00, 0x00, 0x12, 0x0b, 0x00, 0x78, 0xc0, 0x3f, 0x18, 0xc0, 0x01, 0x00, 0x60, 0x18, 0x66, 0x06, 0x00, 0x00, 0x00, 0x06, 0x18, 0x86, 0x19, 0x8c, 0xc0, 0x08, 0x9c, 0x00, 0x06, 0x18, 0x83, 0x31, 0xf8, 0x83, 0x3f, 0x18, 0x83, 0x31, 0x66, 0xc0, 0x00, 0x0c, 0xc0, 0x00, 0x0c, 0xc0, 0x00, 0x60, 0x00, 0x06, 0xf8, 0x01, 0x06, 0x0c, 0xc6, 0x63, 0x0c, 0xc6, 0x60, 0x0c, 0xc6, 0x60, 0x0c, 0x86, 0x19, 0x8c, 0xc7, 0x60, 0x0c, 0xc6, 0x60, 0x0c, 0x86, 0x19, 0x18, 0xc6, 0x30, 0xfc, 0xc1, 0x1f, 0xfc, 0xc1, 0x1f, 0xfc, 0xc1, 0x1f, 0xbc, 0x83, 0x3f, 0xf8, 0x83, 0x3f, 0xf8, 0x83, 0x3f, 0x70, 0x00, 0x07, 0x70, 0x00, 0x07, 0xf8, 0xc7, 0x3e, 0xf8, 0x83, 0x3f, 0xf8, 0x83, 0x3f, 0xf8, 0x03, 0x06, 0xfc, 0xc3, 0x60, 0x0c, 0xc6, 0x60, 0x0c, 0xc6, 0x60, 0xf8, 0x63, 0x30, 0x18, 0xc3, 0x1f, 0xf8, 0xc3, 0x1f, 0x18, 0xc3, 0x1f, 0x18, 0x86, 0x3f, 0x18, 0x86, 0x3f, 0x18, 0x86, 0x3f, 0x18, 0x86, 0x3f, 0x0c, 0x83, 0x6f, 0x0c, 0x06, 0x60, 0x0c, 0x80, 0x3f, 0x0c, 0x80, 0x3f, 0x0c, 0x80, 0x3f, 0x0c, 0x80, 0x3f, 0x0c, 0x80, 0x3f, 0x0c, 0x86, 0x6f, 0x0c, 0x86, 0x6f, 0x0c, 0x86, 0x6f, 0x0c, 0x86, 0x6f, 0x0c, 0xc6, 0x00, 0x0c, 0xc6, 0x00, 0x60, 0x00, 0x07, 0x60, 0x00, 0x07, 0xf8, 0x01, 0x07, 0x60, 0x00, 0x07, 0x60, 0x00, 0x07, 0x0c, 0xc6, 0x71, 0x00, 0x06, 0x78, 0xec, 0xc0, 0x70, 0x8c, 0xc7, 0x00, 0x60, 0xc0, 0x00, 0x60, 0xc0, 0x00, 0x60, 0xc0, 0x18, 0x60, 0xc0, 0x03, 0xe0, 0xc0, 0x63, 0xec, 0xc3, 0x63, 0xec, 0xc3, 0x63, 0xec, 0xc3, 0x3e, 0x3c, 0xc6, 0x3e, 0x0c, 0x86, 0x3f, 0x0c, 0x86, 0x3f, 0x0c, 0x86, 0x3f, 0xc6, 0xc0, 0x3f, 0x0c, 0xc6, 0x3e, 0x0c, 0xc6, 0x3e, 0x0c, 0xc6, 0x3e, 0x0c, 0x80, 0x3f, 0x0c, 0x80, 0x3f, 0x0c, 0x80, 0x3f, 0x0c, 0x80, 0x3f, 0x60, 0xc0, 0x1f, 0x60, 0xc0, 0x1f, 0x60, 0x00, 0x03, 0x0c, 0xc6, 0x60, 0x0c, 0xc6, 0x60, 0x0c, 0xc6, 0x60, 0x0c, 0xc6, 0x60, 0x0c, 0xc6, 0x60, 0x0c, 0xc6, 0x60, 0x66, 0x66, 0x60, 0x0c, 0xc3, 0x60, 0x98, 0x01, 0x0c, 0xfc, 0x07, 0x0c, 0xfc, 0x07, 0x0c, 0xfc, 0xc7, 0x01, 0xc0, 0x80, 0x19, 0x18, 0xc3, 0x1f, 0xf8, 0x83, 0x6f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x66, 0x00, 0x06, 0x88, 0x82, 0x54, 0x06, 0xc6, 0x08, 0x9c, 0xe0, 0x09, 0x8c, 0x80, 0x03, 0xf8, 0x01, 0x1c, 0x60, 0xe0, 0x7f, 0x40, 0x02, 0x03, 0xf8, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x06, 0x00, 0x18, 0x80, 0x61, 0xc0, 0x00, 0x00, 0x0c, 0x06, 0x00, 0xe0, 0xc1, 0xc0, 0x70, 0xc0, 0x30, 0x0c, 0xc3, 0x00, 0x0c, 0xc3, 0x00, 0xe0, 0xc0, 0x30, 0x06, 0x06, 0x06, 0xcc, 0xc0, 0x30, 0xf6, 0xc6, 0x33, 0x00, 0x60, 0x60, 0x0c, 0xc3, 0x60, 0x00, 0x00, 0x03, 0x60, 0x80, 0x19, 0x66, 0x86, 0x19, 0x66, 0x66, 0x60, 0x60, 0x80, 0x19, 0x78, 0x86, 0x3f, 0xf6, 0x01, 0x07, 0x0e, 0xc6, 0x37, 0x8c, 0xe1, 0x60, 0x18, 0x80, 0x3f, 0xe0, 0x63, 0x1f, 0x0c, 0x03, 0x07, 0x0e, 0x03, 0x06, 0x0e, 0xe3, 0x70, 0x18, 0x80, 0x3f, 0xfe, 0x07, 0x3f, 0xf8, 0x81, 0x7f, 0xfc, 0xe3, 0x60, 0xf8, 0xe1, 0x70, 0x06, 0xc6, 0x30, 0x70, 0xe0, 0x60, 0xf8, 0xe3, 0x60, 0x0c, 0x03, 0x00, 0x0c, 0xc0, 0x00, 0xec, 0xc3, 0x00, 0x06, 0xc0, 0x00, 0x60, 0x00, 0x06, 0x00, 0xc6, 0x0c, 0xc6, 0xc0, 0x3e, 0x8c, 0x61, 0x6c, 0x0c, 0xc3, 0x30, 0x0c, 0xc3, 0x00, 0x0c, 0xc6, 0x00, 0x98, 0xc1, 0x00, 0x66, 0x06, 0x60, 0xc6, 0x66, 0x6c, 0xec, 0x80, 0x19, 0xf6, 0x66, 0x60, 0x0c, 0xc6, 0x30, 0x0c, 0xc6, 0x00, 0x60, 0xc0, 0x60, 0x66, 0x06, 0x0f, 0x8c, 0xc1, 0x60, 0x66, 0x66, 0x1b, 0x0c, 0x60, 0x60, 0x0c, 0x00, 0x60, 0x6c, 0xc6, 0x60, 0xfc, 0x01, 0x1c, 0xfc, 0xc3, 0x1f, 0xf0, 0x81, 0x3f, 0x6c, 0x83, 0x3f, 0x0c, 0xc7, 0x70, 0x0c, 0x07, 0x3f, 0x0e, 0xc7, 0x60, 0xf8, 0xc3, 0x3f, 0xec, 0x83, 0x3f, 0xfc, 0xc3, 0x60, 0xf8, 0x81, 0x19, 0x8c, 0xc1, 0x60, 0x66, 0x66, 0x1b, 0x0e, 0xc0, 0x60, 0x0c, 0xc0, 0x0f, 0xcc, 0x83, 0x7f, 0xf8, 0x83, 0x3f, 0x0c, 0xc0, 0x7f, 0xf0, 0x83, 0x3f, 0x70, 0x00, 0x07, 0x80, 0x87, 0x0f, 0xc6, 0x80, 0x01, 0x0c, 0xc7, 0x70, 0x0c, 0xc6, 0x30, 0x38, 0x03, 0x18, 0x80, 0x01, 0x18, 0x00, 0x03, 0x0c, 0x60, 0x60, 0x30, 0x06, 0x03, 0x0c, 0x00, 0x03, 0x30, 0x00, 0x63, 0x30, 0x0e, 0x03, 0x30, 0x80, 0x61, 0x30, 0x18, 0x63, 0x30, 0x06, 0x83, 0x31, 0x30, 0xc3, 0x30, 0x00, 0x63, 0x66, 0x18, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0xf0, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x19, 0x60, 0x00, 0x06, 0x00, 0x80, 0x1f, 0x00, 0x00, 0x00, 0xfc, 0xc0, 0x0f, 0xfc, 0x00, 0x18, 0x80, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0x80, 0x87, 0x7d, 0xd8, 0x07, 0x1f, 0xf0, 0x01, 0x00, 0xfc, 0xc0, 0x0f, 0xfc, 0xe0, 0x7f, 0x00, 0x00, 0x1e, 0xe0, 0x81, 0x03, 0x60, 0x00, 0x00, 0x00, 0xe0, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc6, 0x63, 0x3c, 0xc6, 0x03, 0x00, 0x00, 0xc0, 0x1f, 0xfc, 0x01, 0x0f, 0x80, 0x07, 0x0f, 0x80, 0x87, 0xc1, 0x60, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x60, 0xe6, 0x7f, 0x00, 0x00, 0x03, 0x60, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0xf8, 0xc0, 0x07, 0xc6, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x70, 0x00, 0x06, 0x06, 0x60, 0x00, 0x18, 0x80, 0x1f, 0x00, 0xc3, 0x30, 0x98, 0x81, 0x1f, 0xf8, 0x03, 0x03, 0xd8, 0x03, 0x1f, 0xf0, 0x83, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xf0, 0x03, 0x3f, 0xf0, 0x03, 0xc0, 0x0f, 0xfc, 0xc0, 0x0f, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xf0, 0x03, 0x3f, 0xf0, 0x03, 0xc0, 0x0f, 0xfc, 0xc0, 0x0f, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0xf0, 0x01, 0x1f, 0xf0, 0x01, 0xc0, 0x07, 0x7c, 0xc0, 0x07, 0x7c, 0xdf, 0xf7, 0x7d, 0xdf, 0xf7, 0x7d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0xf0, 0x01, 0x1f, 0xf0, 0x01, 0xc0, 0x07, 0x7c, 0xc0, 0x07, 0x7c, 0xdf, 0xf7, 0x7d, 0xdf, 0xf7, 0x7d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xf0, 0x03, 0x3f, 0xf0, 0x03, 0xc0, 0x0f, 0xfc, 0xc0, 0x0f, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xf0, 0x03, 0x3f, 0xf0, 0x03, 0xc0, 0x0f, 0xfc, 0xc0, 0x0f, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0xf0, 0x01, 0x1f, 0xf0, 0x01, 0xc0, 0x07, 0x7c, 0xc0, 0x07, 0x7c, 0xdf, 0xf7, 0x7d, 0xdf, 0xf7, 0x7d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0xf0, 0x01, 0x1f, 0xf0, 0x01, 0xc0, 0x07, 0x7c, 0xc0, 0x07, 0x7c, 0xdf, 0xf7, 0x7d, 0xdf, 0xf7, 0x7d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xf0, 0x00, 0xff, 0xff, 0xff, 0xf8, 0x0f, 0xfc, 0xf0, 0x0f, 0x80, 0xf0, 0xff, 0xf0, 0x0c, 0xc0, 0xcc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xf1, 0x07, 0xff, 0x10, 0x00, 0xff, 0xf0, 0xff, 0x00, 0xf3, 0xff, 0xfe, 0xff, 0xff, 0xe0, 0xff, 0x07, 0x06, 0x00, 0x60, 0x00, 0x60, 0x60, 0x06, 0x00, 0x60, 0x00, 0x00, 0x00, 0xff, 0x0f, 0x0f, 0xff, 0x3f, 0xc0, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x06, 0x60, 0x00, 0x06, 0x00, 0x00, 0x06, 0x60, 0x00, 0x0f, 0xf0, 0x80, 0x1f, 0x60, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, 0x0f, 0xff, 0x00, 0x00, 0x00, 0x07, 0xf0, 0x03, 0x0f, 0xf0, 0xff, 0x0f, 0x00, 0x0f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf3, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x0e, 0xf8, 0x00, 0xef, 0xff, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x8c, 0xe1, 0x7f, 0x66, 0xe0, 0x0c, 0xcc, 0x00, 0x06, 0x18, 0x00, 0x18, 0x6c, 0x03, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x0c, 0x06, 0x0c, 0x00, 0x06, 0x18, 0x30, 0xc0, 0x3f, 0x18, 0x00, 0x30, 0x0c, 0xc6, 0x60, 0x30, 0x00, 0x03, 0x70, 0xc0, 0x3f, 0xe0, 0x00, 0x30, 0xc6, 0xc7, 0x30, 0x0c, 0xc6, 0x00, 0x0c, 0xc6, 0x00, 0x0c, 0xc0, 0x00, 0x0c, 0x06, 0x06, 0x00, 0xc6, 0x0e, 0x0c, 0x60, 0x6f, 0x36, 0xc6, 0x60, 0x0c, 0xc6, 0x60, 0x0c, 0xc6, 0x00, 0x60, 0xc0, 0x60, 0x0c, 0x63, 0x66, 0xf0, 0x80, 0x19, 0xc0, 0x00, 0x06, 0x30, 0x00, 0x06, 0x8c, 0x01, 0x00, 0x80, 0xc1, 0x1f, 0xec, 0x83, 0x3f, 0xf8, 0x86, 0x3f, 0x30, 0x80, 0x6f, 0xec, 0x03, 0x07, 0x80, 0xc7, 0x70, 0x60, 0xe0, 0x3b, 0xec, 0x83, 0x3f, 0xec, 0x83, 0x6f, 0xec, 0x83, 0x3f, 0xfc, 0xc1, 0x60, 0x06, 0x66, 0x60, 0x0e, 0xc7, 0x60, 0xfc, 0x07, 0x06, 0x60, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0xfc, 0x03, 0x03, 0xf8, 0x01, 0x0f, 0x60, 0x80, 0x1f, 0x00, 0x20, 0x91, 0xf8, 0xc3, 0x0c, 0x00, 0x00, 0x00, 0x12, 0x0b, 0x00, 0x78, 0xc0, 0x3f, 0x18, 0xc0, 0x01, 0x00, 0x60, 0x18, 0x66, 0x06, 0x00, 0x00, 0x00, 0x06, 0x18, 0x86, 0x19, 0x8c, 0xc0, 0x08, 0x9c, 0x00, 0x06, 0x18, 0x83, 0x31, 0xf8, 0x83, 0x3f, 0x18, 0x83, 0x31, 0x66, 0xc0, 0x00, 0x0c, 0xc0, 0x00, 0x0c, 0xc0, 0x00, 0x60, 0x00, 0x06, 0xf8, 0x01, 0x06, 0x0c, 0xc6, 0x63, 0x0c, 0xc6, 0x60, 0x0c, 0xc6, 0x60, 0x0c, 0x86, 0x19, 0x8c, 0xc7, 0x60, 0x0c, 0xc6, 0x60, 0x0c, 0x86, 0x19, 0x18, 0xc6, 0x30, 0xfc, 0xc1, 0x1f, 0xfc, 0xc1, 0x1f, 0xfc, 0xc1, 0x1f, 0xbc, 0x83, 0x3f, 0xf8, 0x83, 0x3f, 0xf8, 0x83, 0x3f, 0x70, 0x00, 0x07, 0x70, 0x00, 0x07, 0xf8, 0xc7, 0x3e, 0xf8, 0x83, 0x3f, 0xf8, 0x83, 0x3f, 0xf8, 0x03, 0x06, 0xfc, 0xc3, 0x60, 0x0c, 0xc6, 0x60, 0x0c, 0xc6, 0x60, 0xf8, 0x63, 0x30, 0x18, 0xc3, 0x1f, 0xf8, 0xc3, 0x1f, 0x18, 0xc3, 0x1f, 0x18, 0x86, 0x3f, 0x18, 0x86, 0x3f, 0x18, 0x86, 0x3f, 0x18, 0x86, 0x3f, 0x0c, 0x83, 0x6f, 0x0c, 0x06, 0x60, 0x0c, 0x80, 0x3f, 0x0c, 0x80, 0x3f, 0x0c, 0x80, 0x3f, 0x0c, 0x80, 0x3f, 0x0c, 0x80, 0x3f, 0x0c, 0x86, 0x6f, 0x0c, 0x86, 0x6f, 0x0c, 0x86, 0x6f, 0x0c, 0x86, 0x6f, 0x0c, 0xc6, 0x00, 0x0c, 0xc6, 0x00, 0x60, 0x00, 0x07, 0x60, 0x00, 0x07, 0xf8, 0x01, 0x07, 0x60, 0x00, 0x07, 0x60, 0x00, 0x07, 0x0c, 0xc6, 0x71, 0x00, 0x06, 0x60, 0xec, 0xc0, 0x70, 0x8c, 0xc7, 0x00, 0x60, 0xc0, 0x00, 0x60, 0xc0, 0x00, 0x60, 0xc0, 0x18, 0x60, 0xc0, 0x03, 0xe0, 0xc0, 0x63, 0xec, 0xc3, 0x63, 0xec, 0xc3, 0x63, 0xec, 0xc3, 0x3e, 0x3c, 0xc6, 0x3e, 0x0c, 0x86, 0x3f, 0x0c, 0x86, 0x3f, 0x0c, 0x86, 0x3f, 0xc6, 0xc0, 0x3f, 0x0c, 0xc6, 0x3e, 0x0c, 0xc6, 0x3e, 0x0c, 0xc6, 0x3e, 0x0c, 0x80, 0x3f, 0x0c, 0x80, 0x3f, 0x0c, 0x80, 0x3f, 0x0c, 0x80, 0x3f, 0x60, 0xc0, 0x1f, 0x60, 0xc0, 0x1f, 0x60, 0x00, 0x03, 0x0c, 0xc6, 0x60, 0x0c, 0xc6, 0x60, 0x0c, 0xc6, 0x60, 0x0c, 0xc6, 0x60, 0x0c, 0xc6, 0x60, 0x0c, 0xc6, 0x60, 0x66, 0x66, 0x60, 0x0c, 0xc3, 0x60, 0x98, 0x01, 0x0c, 0xfc, 0x07, 0x0c, 0xfc, 0x07, 0x0c, 0xfc, 0xc7, 0x01, 0xc0, 0x80, 0x19, 0x18, 0xc3, 0x1f, 0xf8, 0x83, 0x6f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x66, 0x00, 0x06, 0x88, 0x82, 0x54, 0x06, 0xc6, 0x08, 0x9c, 0xe0, 0x09, 0x8c, 0x80, 0x03, 0xf8, 0x01, 0x1c, 0x60, 0xe0, 0x7f, 0x40, 0x02, 0x03, 0xf8, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x06, 0x00, 0x18, 0x80, 0x61, 0xc0, 0x00, 0x00, 0x0c, 0x06, 0x00, 0xe0, 0xc1, 0xc0, 0x70, 0xc0, 0x30, 0x0c, 0xc3, 0x00, 0x0c, 0xc3, 0x00, 0xe0, 0xc0, 0x30, 0x06, 0x06, 0x06, 0xcc, 0xc0, 0x30, 0xf6, 0xc6, 0x33, 0x00, 0x60, 0x60, 0x0c, 0xc3, 0x60, 0x00, 0x00, 0x03, 0x60, 0x80, 0x19, 0x66, 0x86, 0x19, 0x66, 0x66, 0x60, 0x60, 0x80, 0x19, 0x78, 0x86, 0x3f, 0xf6, 0x01, 0x07, 0x0e, 0xc6, 0x37, 0x8c, 0xe1, 0x60, 0x18, 0x80, 0x3f, 0xe0, 0x63, 0x1f, 0x0c, 0x03, 0x07, 0x0e, 0x03, 0x06, 0x0e, 0xe3, 0x70, 0x18, 0x80, 0x3f, 0xfe, 0x07, 0x3f, 0xf8, 0x81, 0x7f, 0xfc, 0xe3, 0x60, 0xf8, 0xe1, 0x70, 0x06, 0xc6, 0x30, 0x70, 0xe0, 0x60, 0xf8, 0xe3, 0x60, 0x0c, 0x03, 0x00, 0x0c, 0xc0, 0x00, 0xec, 0xc3, 0x00, 0x06, 0xc0, 0x00, 0x60, 0x00, 0x06, 0x00, 0xc6, 0x0c, 0xc6, 0xc0, 0x3e, 0x8c, 0x61, 0x6c, 0x0c, 0xc3, 0x30, 0x0c, 0xc3, 0x00, 0x0c, 0xc6, 0x00, 0x98, 0xc1, 0x00, 0x66, 0x06, 0x60, 0xc6, 0x66, 0x6c, 0xec, 0x80, 0x19, 0xf6, 0x66, 0x60, 0x0c, 0xc6, 0x30, 0x0c, 0xc6, 0x00, 0x60, 0xc0, 0x60, 0x66, 0x06, 0x0f, 0x8c, 0xc1, 0x60, 0x66, 0x66, 0x1b, 0x0c, 0x60, 0x60, 0x0c, 0x00, 0x60, 0x6c, 0xc6, 0x60, 0xfc, 0x01, 0x1c, 0xfc, 0xc3, 0x1f, 0xf0, 0x81, 0x3f, 0x6c, 0x83, 0x3f, 0x0c, 0xc7, 0x70, 0x0c, 0x07, 0x3f, 0x0e, 0xc7, 0x60, 0xf8, 0xc3, 0x3f, 0xec, 0x83, 0x3f, 0xfc, 0xc3, 0x60, 0xf8, 0x81, 0x19, 0x8c, 0xc1, 0x60, 0x66, 0x66, 0x1b, 0x0e, 0xc0, 0x60, 0x0c, 0xc0, 0x0f, 0xcc, 0x83, 0x7f, 0xf8, 0x83, 0x3f, 0x0c, 0xc0, 0x7f, 0xf0, 0x83, 0x3f, 0x70, 0x00, 0x07, 0x80, 0x07, 0x1f, 0x8c, 0x81, 0x01, 0x0c, 0xc7, 0x70, 0x0c, 0xc6, 0x30, 0x00, 0x00, 0x06, 0x00, 0x80, 0x19, 0xfc, 0x03, 0x06, 0x78, 0x00, 0x00, 0x18, 0x00, 0x18, 0xf0, 0xc0, 0x3f, 0x00, 0xc0, 0x3f, 0x00, 0x00, 0x06, 0x0c, 0x06, 0x0c, 0x80, 0x03, 0x3c, 0x18, 0x03, 0x60, 0xfc, 0x03, 0x18, 0xf8, 0x83, 0x3f, 0x30, 0x00, 0x03, 0x1c, 0x00, 0x00, 0x80, 0x03, 0x18, 0x66, 0x66, 0x60, 0xfc, 0xc3, 0x00, 0x0c, 0xc6, 0x1f, 0xfc, 0xc1, 0x78, 0xfc, 0x07, 0x06, 0x00, 0xc6, 0x03, 0x0c, 0x60, 0x66, 0x66, 0xc6, 0x60, 0xfc, 0xc3, 0x60, 0xfc, 0x83, 0x3f, 0x60, 0xc0, 0x60, 0x0c, 0x63, 0x66, 0x60, 0x00, 0x0f, 0x60, 0x00, 0x06, 0x60, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x1c, 0xc6, 0x60, 0x0c, 0xc7, 0x60, 0xfc, 0xc0, 0x70, 0x1c, 0x06, 0x06, 0x00, 0xc6, 0x18, 0x60, 0x60, 0x66, 0x1c, 0xc6, 0x60, 0x1c, 0xc6, 0x70, 0x1c, 0xc6, 0x00, 0x30, 0xc0, 0x60, 0x0c, 0x63, 0x66, 0x98, 0x81, 0x31, 0x80, 0x01, 0x03, 0x60, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x66, 0xc6, 0x0f, 0x0c, 0x03, 0x06, 0x00, 0xc0, 0x30, 0x00, 0x20, 0x81, 0x0c, 0x63, 0x06, 0xfc, 0xc3, 0x3f, 0xf2, 0x09, 0x00, 0x00, 0x00, 0x06, 0x0c, 0x00, 0x03, 0x00, 0x60, 0x18, 0x7c, 0x06, 0x06, 0x00, 0x00, 0x06, 0x18, 0x06, 0x33, 0x4c, 0xce, 0x7c, 0x70, 0x87, 0x01, 0x0c, 0xc6, 0x60, 0x0c, 0xc6, 0x60, 0x0c, 0xc6, 0x60, 0xfe, 0xc3, 0x00, 0xfc, 0xc1, 0x1f, 0xfc, 0xc1, 0x1f, 0x60, 0x00, 0x06, 0x60, 0x00, 0x06, 0x3e, 0xc6, 0x66, 0x0c, 0xc6, 0x60, 0x0c, 0xc6, 0x60, 0x0c, 0x06, 0x0f, 0xcc, 0xc6, 0x60, 0x0c, 0xc6, 0x60, 0x0c, 0x06, 0x0f, 0x18, 0xc6, 0x18, 0x00, 0x03, 0x30, 0x00, 0x03, 0x30, 0x00, 0x03, 0x30, 0x60, 0xc6, 0x60, 0x0c, 0xc6, 0x60, 0x0c, 0xc6, 0x60, 0x60, 0x00, 0x06, 0x60, 0x00, 0x06, 0x0c, 0xc6, 0x61, 0x0c, 0xc6, 0x60, 0x0c, 0xc6, 0x60, 0x0c, 0x06, 0x00, 0xc6, 0xc6, 0x60, 0x0c, 0xc6, 0x60, 0x0c, 0x86, 0x31, 0x18, 0xc6, 0x18, 0x0c, 0x06, 0x30, 0x0c, 0x06, 0x30, 0x0c, 0x06, 0x30, 0x0c, 0xc0, 0x60, 0x0c, 0xc0, 0x60, 0x0c, 0xc0, 0x60, 0x0c, 0xc0, 0x60, 0x0c, 0xc6, 0x70, 0x3e, 0x86, 0x7f, 0xfc, 0xc1, 0x60, 0xfc, 0xc1, 0x60, 0xfc, 0xc1, 0x60, 0xfc, 0xc1, 0x60, 0xfc, 0xc1, 0x60, 0x0c, 0xc0, 0x70, 0x0c, 0xc0, 0x70, 0x0c, 0xc0, 0x70, 0x0c, 0xc0, 0x70, 0xfc, 0xc7, 0x3e, 0xfc, 0xc7, 0x3e, 0x60, 0x00, 0x06, 0x60, 0x00, 0x06, 0x60, 0x00, 0x06, 0x60, 0x00, 0x06, 0x60, 0x00, 0x06, 0x0c, 0x86, 0x61, 0x00, 0x06, 0x60, 0x3c, 0xc0, 0x18, 0xcc, 0xc1, 0x00, 0x60, 0xc0, 0x00, 0x60, 0xc0, 0x00, 0x60, 0xc0, 0x00, 0x60, 0xc0, 0x01, 0x70, 0xc0, 0x66, 0x1c, 0xc6, 0x66, 0x1c, 0xc6, 0x66, 0x1c, 0xc6, 0x61, 0x6c, 0xc6, 0x61, 0x0c, 0xc6, 0x60, 0x0c, 0xc6, 0x60, 0x0c, 0xc6, 0x60, 0xc6, 0x63, 0x66, 0x0c, 0xc6, 0x61, 0xfc, 0xc3, 0x61, 0x0c, 0xc6, 0x61, 0xf8, 0xc3, 0x00, 0xf8, 0xc3, 0x00, 0xf8, 0xc3, 0x00, 0xf8, 0xc3, 0x00, 0x60, 0x00, 0x03, 0x60, 0x00, 0x03, 0xf8, 0xc1, 0x1f, 0x0c, 0xc6, 0x60, 0x0c, 0xc6, 0x60, 0x0c, 0xc6, 0x60, 0x0c, 0xc6, 0x60, 0x0c, 0xc6, 0x60, 0x0c, 0xc6, 0x60, 0x66, 0x66, 0x66, 0x98, 0x81, 0x31, 0xf0, 0x00, 0x06, 0x80, 0x01, 0x06, 0x80, 0x01, 0x06, 0x80, 0x81, 0x01, 0xf8, 0x81, 0x19, 0x0c, 0x06, 0x30, 0x0c, 0xc6, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x03, 0x03, 0xa8, 0x82, 0x44, 0x06, 0xc6, 0x7c, 0x70, 0x8f, 0x7d, 0xc6, 0xe7, 0xff, 0x6c, 0xf3, 0x7f, 0x60, 0xe0, 0x7f, 0x40, 0x00, 0x1b, 0xf0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x0c, 0x00, 0xf8, 0x81, 0x7f, 0xc0, 0x00, 0x00, 0x0c, 0x06, 0x00, 0xc0, 0xc0, 0xc0, 0x60, 0x60, 0x60, 0xfc, 0xc1, 0x00, 0x06, 0xc6, 0x07, 0x70, 0xc0, 0x3f, 0xfe, 0x07, 0x06, 0x7c, 0x60, 0x60, 0x66, 0xc6, 0x36, 0xf8, 0x61, 0x60, 0x0c, 0xc3, 0x3f, 0x00, 0x00, 0x06, 0x60, 0x00, 0x0f, 0x66, 0x06, 0x0f, 0x66, 0x66, 0x60, 0x60, 0x00, 0x0f, 0x8c, 0xc3, 0x00, 0x1c, 0x03, 0x06, 0x0c, 0x66, 0x1c, 0xec, 0xa0, 0x31, 0xfc, 0xc1, 0x00, 0x30, 0xc0, 0x31, 0xf8, 0x03, 0x06, 0xcc, 0x01, 0x0f, 0x0c, 0xc3, 0x30, 0xf0, 0xc0, 0x60, 0x0c, 0x83, 0x61, 0x0c, 0xc0, 0x18, 0x60, 0xc0, 0x60, 0x6c, 0xc3, 0x39, 0x66, 0x66, 0x60, 0x60, 0xc0, 0x60, 0x0c, 0xc6, 0x60, 0x06, 0x06, 0x00, 0xfc, 0xc1, 0x1f, 0x1c, 0xc6, 0x00, 0xfc, 0x80, 0x3f, 0x60, 0x00, 0x06, 0x00, 0xc6, 0x7c, 0xfe, 0xc7, 0x61, 0xec, 0x60, 0x66, 0x98, 0xc1, 0x30, 0x06, 0xc6, 0x3f, 0xfc, 0xc3, 0x00, 0x98, 0xc1, 0x0f, 0xf8, 0x01, 0x3e, 0x66, 0x66, 0x66, 0x3c, 0x80, 0x19, 0x66, 0xe6, 0x7f, 0x0c, 0xc6, 0x30, 0xfc, 0xc3, 0x00, 0x60, 0x80, 0x7f, 0x66, 0x06, 0x06, 0x8c, 0x81, 0x7f, 0x66, 0x66, 0x1b, 0xfc, 0xe3, 0x67, 0xfc, 0x03, 0x3f, 0x7c, 0x86, 0x7f, 0x00, 0x83, 0x3f, 0x0c, 0xc6, 0x00, 0x98, 0xc1, 0x60, 0x6c, 0xc3, 0x60, 0x8c, 0xc6, 0x68, 0x8c, 0x81, 0x31, 0x9e, 0xc7, 0x60, 0x0c, 0xc6, 0x30, 0x1c, 0xc6, 0x60, 0x60, 0x80, 0x31, 0x6c, 0x03, 0x0f, 0x8c, 0xc1, 0x60, 0x66, 0x66, 0x1b, 0x0c, 0xc0, 0x60, 0x0c, 0x60, 0x30, 0x6c, 0xc6, 0x60, 0x0c, 0xc6, 0x60, 0xec, 0xc1, 0x00, 0x0c, 0xc6, 0x00, 0x60, 0x00, 0x06, 0x00, 0xc6, 0x0c, 0xc6, 0x80, 0x3d, 0x8c, 0xc1, 0x68, 0x18, 0xc3, 0x30, 0x6c, 0x03, 0x18, 0xe0, 0x01, 0x18, 0x06, 0x03, 0x0c, 0x60, 0x60, 0x30, 0x06, 0x03, 0x0c, 0x00, 0x03, 0x30, 0x00, 0x63, 0x30, 0x06, 0x03, 0x30, 0x80, 0x61, 0x30, 0x18, 0xe3, 0x31, 0x1e, 0x83, 0x39, 0xe0, 0xc1, 0x30, 0x00, 0x63, 0x66, 0x18, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x18, 0x03, 0x07, 0x60, 0x30, 0xc0, 0x60, 0x30, 0xc0, 0x60, 0x00, 0x06, 0x60, 0xc0, 0x30, 0x60, 0x00, 0x06, 0x86, 0x61, 0x18, 0x86, 0x01, 0x30, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc6, 0x60, 0x8c, 0xc7, 0x78, 0xcc, 0x31, 0x1c, 0x03, 0x06, 0x80, 0x03, 0x38, 0x80, 0x83, 0x19, 0x00, 0x00, 0x33, 0x30, 0x03, 0x1e, 0x60, 0x00, 0x1f, 0x60, 0xe0, 0x36, 0xc0, 0x07, 0x00, 0x60, 0x30, 0xc0, 0xf0, 0x0f, 0xff, 0xf0, 0x0f, 0x06, 0xe0, 0x81, 0x0d, 0xd8, 0x80, 0x19, 0xc0, 0x8c, 0x19, 0xc0, 0xcc, 0xc7, 0x60, 0x40, 0xc0, 0xf8, 0x01, 0x78, 0x60, 0x00, 0x40, 0xc0, 0xe6, 0x7f, 0x00, 0x00, 0x03, 0x60, 0x00, 0x06, 0xc0, 0x07, 0x06, 0x60, 0x00, 0x78, 0x8c, 0x61, 0x0c, 0xf0, 0x0f, 0x06, 0x60, 0x30, 0xc0, 0x00, 0x00, 0x1c, 0x70, 0x00, 0x06, 0x06, 0x60, 0x00, 0x70, 0xc0, 0x30, 0x00, 0x83, 0x19, 0x98, 0x01, 0x18, 0xf0, 0x01, 0x03, 0x70, 0x83, 0x31, 0x18, 0xc3, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xf0, 0x03, 0x3f, 0xf0, 0x03, 0xc0, 0x0f, 0xfc, 0xc0, 0x0f, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xf0, 0x03, 0x3f, 0xf0, 0x03, 0xc0, 0x0f, 0xfc, 0xc0, 0x0f, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0xf0, 0x01, 0x1f, 0xf0, 0x01, 0xc0, 0x07, 0x7c, 0xc0, 0x07, 0x7c, 0xdf, 0xf7, 0x7d, 0xdf, 0xf7, 0x7d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0xf0, 0x01, 0x1f, 0xf0, 0x01, 0xc0, 0x07, 0x7c, 0xc0, 0x07, 0x7c, 0xdf, 0xf7, 0x7d, 0xdf, 0xf7, 0x7d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xf0, 0x03, 0x3f, 0xf0, 0x03, 0xc0, 0x0f, 0xfc, 0xc0, 0x0f, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xf0, 0x03, 0x3f, 0xf0, 0x03, 0xc0, 0x0f, 0xfc, 0xc0, 0x0f, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0xf0, 0x01, 0x1f, 0xf0, 0x01, 0xc0, 0x07, 0x7c, 0xc0, 0x07, 0x7c, 0xdf, 0xf7, 0x7d, 0xdf, 0xf7, 0x7d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0xf0, 0x01, 0x1f, 0xf0, 0x01, 0xc0, 0x07, 0x7c, 0xc0, 0x07, 0x7c, 0xdf, 0xf7, 0x7d, 0xdf, 0xf7, 0x7d, 0x00, 0x00, 0x00, 0x01, 0x10, 0x00, 0x07, 0xf0, 0x01, 0xff, 0xff, 0xff, 0xfc, 0x0f, 0xff, 0xf8, 0x0f, 0xf0, 0xe0, 0xff, 0xf9, 0x0c, 0x30, 0x33, 0x00, 0x00, 0x00, 0x00, 0x08, 0x80, 0x00, 0x0e, 0xf8, 0xff, 0xff, 0xff, 0xff, 0xf3, 0x1f, 0xff, 0xf1, 0x00, 0x7f, 0xf0, 0xff, 0x00, 0xf3, 0xff, 0xfe, 0xff, 0xff, 0xe0, 0xff, 0x07, 0x03, 0x00, 0xc0, 0x01, 0x38, 0xc0, 0x03, 0x00, 0xc0, 0x01, 0x00, 0x80, 0xff, 0x8f, 0x1f, 0xff, 0x3f, 0xc0, 0x60, 0xf0, 0xff, 0xe0, 0xff, 0x07, 0xe0, 0xff, 0x07, 0xe0, 0xff, 0x07, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0xfc, 0xcf, 0x3f, 0x60, 0x00, 0x00, 0xff, 0xff, 0xff, 0xfe, 0xef, 0xff, 0xf8, 0x0f, 0xfe, 0x00, 0x00, 0x00, 0x03, 0xf0, 0x00, 0x07, 0xf0, 0x0f, 0x1f, 0x00, 0x06, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xf7, 0x7f, 0xff, 0xf1, 0x07, 0x00, 0x00, 0x00, 0x00, 0x0c, 0xe0, 0x00, 0x0e, 0xff, 0x80, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x80, 0x19, 0xfc, 0x03, 0x06, 0x78, 0x00, 0x00, 0x18, 0x00, 0x18, 0xf0, 0xc0, 0x3f, 0x00, 0xc0, 0x3f, 0x00, 0x00, 0x06, 0x0c, 0x06, 0x0c, 0x80, 0x03, 0x3c, 0x18, 0x03, 0x60, 0xfc, 0x03, 0x18, 0xf8, 0x83, 0x3f, 0x30, 0x00, 0x03, 0x1c, 0x00, 0x00, 0x80, 0x03, 0x18, 0x66, 0x66, 0x60, 0xfc, 0xc3, 0x00, 0x0c, 0xc6, 0x1f, 0xfc, 0xc1, 0x78, 0xfc, 0x07, 0x06, 0x00, 0xc6, 0x03, 0x0c, 0x60, 0x66, 0x66, 0xc6, 0x60, 0xfc, 0xc3, 0x60, 0xfc, 0x83, 0x3f, 0x60, 0xc0, 0x60, 0x0c, 0x63, 0x66, 0x60, 0x00, 0x0f, 0x60, 0x00, 0x06, 0x60, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x1c, 0xc6, 0x60, 0x0c, 0xc7, 0x60, 0xfc, 0xc0, 0x70, 0x1c, 0x06, 0x06, 0x00, 0xc6, 0x18, 0x60, 0x60, 0x66, 0x1c, 0xc6, 0x60, 0x1c, 0xc6, 0x70, 0x1c, 0xc6, 0x00, 0x30, 0xc0, 0x60, 0x0c, 0x63, 0x66, 0x98, 0x81, 0x31, 0x80, 0x01, 0x03, 0x60, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x66, 0xc6, 0x0f, 0x0c, 0x03, 0x06, 0x00, 0xc0, 0x30, 0x00, 0x20, 0x81, 0x0c, 0x63, 0x06, 0xfc, 0xc3, 0x3f, 0xf2, 0x09, 0x00, 0x00, 0x00, 0x06, 0x0c, 0x00, 0x03, 0x00, 0x60, 0x18, 0x7c, 0x06, 0x06, 0x00, 0x00, 0x06, 0x18, 0x06, 0x33, 0x4c, 0xce, 0x7c, 0x70, 0x87, 0x01, 0x0c, 0xc6, 0x60, 0x0c, 0xc6, 0x60, 0x0c, 0xc6, 0x60, 0xfe, 0xc3, 0x00, 0xfc, 0xc1, 0x1f, 0xfc, 0xc1, 0x1f, 0x60, 0x00, 0x06, 0x60, 0x00, 0x06, 0x3e, 0xc6, 0x66, 0x0c, 0xc6, 0x60, 0x0c, 0xc6, 0x60, 0x0c, 0x06, 0x0f, 0xcc, 0xc6, 0x60, 0x0c, 0xc6, 0x60, 0x0c, 0x06, 0x0f, 0x18, 0xc6, 0x18, 0x00, 0x03, 0x30, 0x00, 0x03, 0x30, 0x00, 0x03, 0x30, 0x60, 0xc6, 0x60, 0x0c, 0xc6, 0x60, 0x0c, 0xc6, 0x60, 0x60, 0x00, 0x06, 0x60, 0x00, 0x06, 0x0c, 0xc6, 0x61, 0x0c, 0xc6, 0x60, 0x0c, 0xc6, 0x60, 0x0c, 0x06, 0x00, 0xc6, 0xc6, 0x60, 0x0c, 0xc6, 0x60, 0x0c, 0x86, 0x31, 0x18, 0xc6, 0x18, 0x0c, 0x06, 0x30, 0x0c, 0x06, 0x30, 0x0c, 0x06, 0x30, 0x0c, 0xc0, 0x60, 0x0c, 0xc0, 0x60, 0x0c, 0xc0, 0x60, 0x0c, 0xc0, 0x60, 0x0c, 0xc6, 0x70, 0x3e, 0x86, 0x7f, 0xfc, 0xc1, 0x60, 0xfc, 0xc1, 0x60, 0xfc, 0xc1, 0x60, 0xfc, 0xc1, 0x60, 0xfc, 0xc1, 0x60, 0x0c, 0xc0, 0x70, 0x0c, 0xc0, 0x70, 0x0c, 0xc0, 0x70, 0x0c, 0xc0, 0x70, 0xfc, 0xc7, 0x3e, 0xfc, 0xc7, 0x3e, 0x60, 0x00, 0x06, 0x60, 0x00, 0x06, 0x60, 0x00, 0x06, 0x60, 0x00, 0x06, 0x60, 0x00, 0x06, 0x0c, 0x86, 0x61, 0x00, 0x06, 0x60, 0x3c, 0xc0, 0x18, 0xcc, 0xc1, 0x00, 0x60, 0xc0, 0x00, 0x60, 0xc0, 0x00, 0x60, 0xc0, 0x00, 0x60, 0xc0, 0x01, 0x70, 0xc0, 0x66, 0x1c, 0xc6, 0x66, 0x1c, 0xc6, 0x66, 0x1c, 0xc6, 0x61, 0x6c, 0xc6, 0x61, 0x0c, 0xc6, 0x60, 0x0c, 0xc6, 0x60, 0x0c, 0xc6, 0x60, 0xc6, 0x63, 0x66, 0x0c, 0xc6, 0x61, 0xfc, 0xc3, 0x61, 0x0c, 0xc6, 0x61, 0xf8, 0xc3, 0x00, 0xf8, 0xc3, 0x00, 0xf8, 0xc3, 0x00, 0xf8, 0xc3, 0x00, 0x60, 0x00, 0x03, 0x60, 0x00, 0x03, 0xf8, 0xc1, 0x1f, 0x0c, 0xc6, 0x60, 0x0c, 0xc6, 0x60, 0x0c, 0xc6, 0x60, 0x0c, 0xc6, 0x60, 0x0c, 0xc6, 0x60, 0x0c, 0xc6, 0x60, 0x66, 0x66, 0x66, 0x98, 0x81, 0x31, 0xf0, 0x00, 0x06, 0x80, 0x01, 0x06, 0x80, 0x01, 0x06, 0x80, 0x81, 0x01, 0xf8, 0x81, 0x19, 0x0c, 0x06, 0x30, 0x0c, 0xc6, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x03, 0x03, 0xa8, 0x82, 0x44, 0x06, 0xc6, 0x7c, 0x70, 0x8f, 0x7d, 0xc6, 0xe7, 0xff, 0x6c, 0xf3, 0x7f, 0x60, 0xe0, 0x7f, 0x40, 0x00, 0x1b, 0xf0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x0c, 0x00, 0xf8, 0x81, 0x7f, 0xc0, 0x00, 0x00, 0x0c, 0x06, 0x00, 0xc0, 0xc0, 0xc0, 0x60, 0x60, 0x60, 0xfc, 0xc1, 0x00, 0x06, 0xc6, 0x07, 0x70, 0xc0, 0x3f, 0xfe, 0x07, 0x06, 0x7c, 0x60, 0x60, 0x66, 0xc6, 0x36, 0xf8, 0x61, 0x60, 0x0c, 0xc3, 0x3f, 0x00, 0x00, 0x06, 0x60, 0x00, 0x0f, 0x66, 0x06, 0x0f, 0x66, 0x66, 0x60, 0x60, 0x00, 0x0f, 0x8c, 0xc3, 0x00, 0x1c, 0x03, 0x06, 0x0c, 0x66, 0x1c, 0xec, 0xa0, 0x31, 0xfc, 0xc1, 0x00, 0x30, 0xc0, 0x31, 0xf8, 0x03, 0x06, 0xcc, 0x01, 0x0f, 0x0c, 0xc3, 0x30, 0xf0, 0xc0, 0x60, 0x0c, 0x83, 0x61, 0x0c, 0xc0, 0x18, 0x60, 0xc0, 0x60, 0x6c, 0xc3, 0x39, 0x66, 0x66, 0x60, 0x60, 0xc0, 0x60, 0x0c, 0xc6, 0x60, 0x06, 0x06, 0x00, 0xfc, 0xc1, 0x1f, 0x1c, 0xc6, 0x00, 0xfc, 0x80, 0x3f, 0x60, 0x00, 0x06, 0x00, 0xc6, 0x7c, 0xfe, 0xc7, 0x61, 0xec, 0x60, 0x66, 0x98, 0xc1, 0x30, 0x06, 0xc6, 0x3f, 0xfc, 0xc3, 0x00, 0x98, 0xc1, 0x0f, 0xf8, 0x01, 0x3e, 0x66, 0x66, 0x66, 0x3c, 0x80, 0x19, 0x66, 0xe6, 0x7f, 0x0c, 0xc6, 0x30, 0xfc, 0xc3, 0x00, 0x60, 0x80, 0x7f, 0x66, 0x06, 0x06, 0x8c, 0x81, 0x7f, 0x66, 0x66, 0x1b, 0xfc, 0xe3, 0x67, 0xfc, 0x03, 0x3f, 0x7c, 0x86, 0x7f, 0x00, 0x83, 0x3f, 0x0c, 0xc6, 0x00, 0x98, 0xc1, 0x60, 0x6c, 0xc3, 0x60, 0x8c, 0xc6, 0x68, 0x8c, 0x81, 0x31, 0x9e, 0xc7, 0x60, 0x0c, 0xc6, 0x30, 0x1c, 0xc6, 0x60, 0x60, 0x80, 0x31, 0x6c, 0x03, 0x0f, 0x8c, 0xc1, 0x60, 0x66, 0x66, 0x1b, 0x0c, 0xc0, 0x60, 0x0c, 0x60, 0x30, 0x6c, 0xc6, 0x60, 0x0c, 0xc6, 0x60, 0xec, 0xc1, 0x00, 0x0c, 0xc6, 0x00, 0x60, 0x00, 0x06, 0x00, 0x86, 0x19, 0x8c, 0x81, 0x3d, 0x8c, 0xc1, 0x68, 0x18, 0xc3, 0x30, 0x00, 0x00, 0x06, 0x00, 0xe0, 0x7f, 0x60, 0x06, 0x73, 0xcc, 0x0c, 0x00, 0x18, 0x00, 0x18, 0x6c, 0x03, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x0c, 0x06, 0x0c, 0xe0, 0x00, 0x60, 0x0c, 0x03, 0x60, 0x0c, 0x06, 0x0c, 0x0c, 0x06, 0x18, 0x00, 0x00, 0x00, 0x70, 0xc0, 0x3f, 0xe0, 0x00, 0x06, 0x66, 0xe6, 0x7f, 0x0c, 0xc6, 0x00, 0x0c, 0xc6, 0x00, 0x0c, 0xc0, 0x60, 0x0c, 0x06, 0x06, 0x00, 0xc6, 0x0e, 0x0c, 0x60, 0x60, 0xc6, 0xc6, 0x60, 0x0c, 0xc0, 0x60, 0x8c, 0x01, 0x60, 0x60, 0xc0, 0x60, 0x98, 0x61, 0x6f, 0xf0, 0x00, 0x06, 0x30, 0x00, 0x06, 0xc0, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x3f, 0x0c, 0xc6, 0x00, 0x0c, 0xc6, 0x7f, 0x30, 0xc0, 0x60, 0x0c, 0x06, 0x06, 0x00, 0xc6, 0x07, 0x60, 0x60, 0x66, 0x0c, 0xc6, 0x60, 0x0c, 0xc6, 0x60, 0x0c, 0x80, 0x3f, 0x30, 0xc0, 0x60, 0x98, 0x61, 0x66, 0xf0, 0x00, 0x1b, 0xe0, 0x00, 0x06, 0x60, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x66, 0x00, 0x03, 0x0c, 0x83, 0x1f, 0x60, 0x80, 0x1f, 0x00, 0x20, 0x91, 0xf8, 0xc7, 0x0c, 0x00, 0x03, 0x00, 0x12, 0x09, 0x00, 0x00, 0x00, 0x06, 0x7e, 0xe0, 0x01, 0x00, 0x60, 0x18, 0x60, 0x06, 0x00, 0x00, 0x00, 0x06, 0xf0, 0x83, 0x19, 0x2c, 0xcd, 0xc2, 0xbe, 0xc6, 0x00, 0xfc, 0xc7, 0x7f, 0xfc, 0xc7, 0x7f, 0xfc, 0xc7, 0x7f, 0x66, 0xc0, 0x00, 0x0c, 0xc0, 0x00, 0x0c, 0xc0, 0x00, 0x60, 0x00, 0x06, 0x60, 0x00, 0x06, 0x0c, 0xc6, 0x6c, 0x0c, 0xc6, 0x60, 0x0c, 0xc6, 0x60, 0x0c, 0x06, 0x06, 0x6c, 0xc6, 0x60, 0x0c, 0xc6, 0x60, 0x0c, 0x06, 0x06, 0xf8, 0xc3, 0x60, 0xfc, 0xc3, 0x3f, 0xfc, 0xc3, 0x3f, 0xfc, 0xc3, 0x3f, 0xfc, 0xc7, 0x00, 0xfc, 0xc7, 0x7f, 0xfc, 0xc7, 0x7f, 0x60, 0x00, 0x06, 0x60, 0x00, 0x06, 0x0c, 0xc6, 0x60, 0x0c, 0xc6, 0x60, 0x0c, 0xc6, 0x60, 0x0c, 0xc6, 0x3f, 0x66, 0xc6, 0x60, 0x0c, 0xc6, 0x60, 0x0c, 0x06, 0x1b, 0x18, 0x86, 0x0d, 0xfc, 0xc7, 0x3f, 0xfc, 0xc7, 0x3f, 0xfc, 0xc7, 0x3f, 0x0c, 0xc0, 0x00, 0x0c, 0xc0, 0x00, 0x0c, 0xc0, 0x00, 0x0c, 0xc0, 0x00, 0x0c, 0xc6, 0x60, 0x0c, 0xc6, 0x60, 0x0c, 0xc0, 0x7f, 0x0c, 0xc0, 0x7f, 0x0c, 0xc0, 0x7f, 0x0c, 0xc0, 0x7f, 0x0c, 0xc0, 0x7f, 0x8c, 0xc7, 0x60, 0x8c, 0xc7, 0x60, 0x8c, 0xc7, 0x60, 0x8c, 0xc7, 0x60, 0x0c, 0xc6, 0x61, 0x0c, 0xc6, 0x61, 0x60, 0x00, 0x06, 0x60, 0x00, 0x06, 0x60, 0x00, 0x06, 0x60, 0x00, 0x06, 0x60, 0x00, 0x06, 0x0c, 0x86, 0x61, 0x00, 0x06, 0x60, 0xec, 0xc0, 0x07, 0x7c, 0xc0, 0x00, 0x60, 0xc0, 0x00, 0x60, 0xc0, 0x00, 0x60, 0xc0, 0x00, 0x60, 0xe0, 0x00, 0x78, 0xc0, 0x6c, 0x0c, 0xc6, 0x6c, 0x0c, 0xc6, 0x6c, 0x0c, 0xc6, 0x60, 0xcc, 0xc6, 0x60, 0x0c, 0xc6, 0x60, 0x0c, 0xc6, 0x60, 0x0c, 0xc6, 0x60, 0xc6, 0x60, 0x7e, 0xfc, 0xc3, 0x00, 0x8c, 0xc1, 0x00, 0xfc, 0xc3, 0x00, 0x00, 0x86, 0x3f, 0x00, 0x86, 0x3f, 0x00, 0x86, 0x3f, 0x00, 0x86, 0x3f, 0x60, 0x00, 0x03, 0x60, 0x00, 0x03, 0x60, 0x00, 0x03, 0x0c, 0xc6, 0x60, 0x0c, 0xc6, 0x60, 0x0c, 0xc6, 0x60, 0x0c, 0xc6, 0x60, 0x0c, 0xc6, 0x60, 0x0c, 0xc6, 0x60, 0xf6, 0x66, 0x66, 0xf0, 0x00, 0x1b, 0x60, 0x00, 0x03, 0xe0, 0x00, 0x03, 0xe0, 0x00, 0x03, 0xe0, 0x80, 0x01, 0x30, 0x80, 0x19, 0xfc, 0xc7, 0x3f, 0xfc, 0x67, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x80, 0xf7, 0xa8, 0x82, 0x44, 0x0c, 0xc3, 0x4a, 0x3e, 0xe9, 0x4a, 0xa6, 0x84, 0x03, 0x60, 0x00, 0x1c, 0x6c, 0xe3, 0x7f, 0x78, 0x00, 0x1b, 0x60, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x0f, 0x00, 0x18, 0x80, 0x61, 0xc0, 0x00, 0x00, 0x0c, 0x06, 0x00, 0xc0, 0x80, 0x61, 0x60, 0xe0, 0x7f, 0x0c, 0xc3, 0x00, 0x06, 0xc6, 0x00, 0x38, 0xc0, 0x30, 0x06, 0x06, 0x06, 0xcc, 0x60, 0x60, 0x06, 0xc6, 0x3c, 0x00, 0x60, 0x60, 0x0c, 0xc3, 0x00, 0x00, 0x00, 0x03, 0x60, 0x00, 0x06, 0xfc, 0x83, 0x19, 0xfc, 0xc3, 0x30, 0x60, 0x00, 0x06, 0x8c, 0x81, 0x0f, 0x0c, 0x03, 0x06, 0x0c, 0x66, 0x18, 0x8c, 0x03, 0x1b, 0x06, 0xc3, 0x0f, 0x18, 0xc0, 0x30, 0x0c, 0x03, 0x06, 0x7c, 0x80, 0x19, 0x1c, 0x83, 0x19, 0x18, 0xc0, 0x60, 0x0c, 0x83, 0x61, 0xf8, 0xc1, 0x30, 0x60, 0xc0, 0x60, 0x6c, 0x03, 0x0f, 0x66, 0x66, 0x66, 0x60, 0xc0, 0x60, 0x0c, 0xc6, 0x60, 0x66, 0x06, 0x00, 0x0c, 0xc0, 0x00, 0x0c, 0xc6, 0x00, 0x06, 0x00, 0x60, 0x60, 0x00, 0x06, 0x00, 0xc6, 0xcc, 0xc6, 0xcc, 0x60, 0x3c, 0x60, 0x63, 0xf0, 0xc0, 0x30, 0xfe, 0xc7, 0x60, 0x0c, 0xc6, 0x00, 0x98, 0xc1, 0x00, 0x66, 0x06, 0x60, 0x36, 0x66, 0x63, 0xec, 0x80, 0x19, 0x06, 0x66, 0x60, 0x0c, 0xc6, 0x30, 0x0c, 0xc0, 0x00, 0x60, 0x00, 0x60, 0x66, 0x06, 0x0f, 0x8c, 0x01, 0x60, 0x66, 0x66, 0x1b, 0x0c, 0x66, 0x6c, 0x0c, 0x06, 0x60, 0x6c, 0x06, 0x6c, 0xfc, 0xc3, 0x60, 0xfc, 0xc3, 0x00, 0x98, 0xc1, 0x7f, 0xf0, 0x00, 0x3c, 0x4c, 0xc6, 0x64, 0x7c, 0x80, 0x31, 0xf6, 0xc6, 0x7f, 0x0c, 0xc6, 0x30, 0x0c, 0xc6, 0x00, 0x60, 0x00, 0x1b, 0x6c, 0x03, 0x06, 0x8c, 0x81, 0x7f, 0x66, 0x66, 0x1b, 0xfc, 0xc3, 0x67, 0xfc, 0x03, 0x3e, 0x7c, 0x86, 0x7f, 0xfc, 0xc7, 0x7f, 0x1c, 0xc3, 0x00, 0x7c, 0x80, 0x3f, 0x60, 0x00, 0x06, 0x00, 0xc6, 0x7c, 0xfe, 0x87, 0x63, 0x7c, 0xc0, 0x64, 0xb0, 0xc1, 0x30, 0xcc, 0x01, 0x18, 0xb0, 0x01, 0x18, 0x06, 0x03, 0x0c, 0x60, 0x60, 0x30, 0x06, 0x03, 0x00, 0x00, 0x03, 0x30, 0x00, 0x63, 0x30, 0x06, 0x03, 0x30, 0x80, 0x61, 0x30, 0x18, 0x03, 0x30, 0x00, 0x83, 0x1f, 0xc0, 0xc0, 0x30, 0x00, 0x63, 0x66, 0x18, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0xcc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x8c, 0x87, 0x01, 0xf0, 0x30, 0xc0, 0xf0, 0x30, 0xc0, 0x60, 0x00, 0x06, 0xc0, 0x60, 0x60, 0xc0, 0x00, 0x0c, 0x00, 0x03, 0x30, 0x00, 0x03, 0x60, 0x00, 0x06, 0x70, 0x00, 0x37, 0xce, 0xe3, 0x3c, 0xc3, 0x33, 0xcc, 0xc3, 0x3c, 0xcc, 0x00, 0x0c, 0x00, 0x0f, 0xe0, 0x01, 0x1e, 0xe0, 0x81, 0x19, 0x00, 0x00, 0x3e, 0xe0, 0x03, 0x78, 0x60, 0xc0, 0x31, 0xc0, 0xc0, 0x63, 0x60, 0x0c, 0x78, 0xc0, 0x30, 0xc0, 0x3c, 0xc8, 0x83, 0x3c, 0x08, 0x0f, 0x32, 0x00, 0x07, 0x70, 0x00, 0x0f, 0x83, 0x0f, 0x0f, 0x82, 0x1f, 0xc0, 0x60, 0x60, 0xc0, 0x9c, 0x03, 0xcc, 0xf0, 0x40, 0xc0, 0x80, 0xe3, 0x7f, 0x00, 0x00, 0x3e, 0x60, 0x00, 0x06, 0x60, 0x0c, 0x06, 0xc0, 0x30, 0xcc, 0x00, 0x03, 0x38, 0x3c, 0x08, 0x0c, 0xf0, 0x30, 0xc0, 0x00, 0x07, 0x70, 0x70, 0x00, 0x06, 0x0c, 0x60, 0x00, 0x30, 0x60, 0x60, 0x00, 0x83, 0x19, 0x0c, 0x03, 0x18, 0x60, 0x07, 0x3e, 0x30, 0x83, 0x19, 0x8c, 0x67, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xf0, 0x03, 0x3f, 0xf0, 0x03, 0xc0, 0x0f, 0xfc, 0xc0, 0x0f, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xf0, 0x03, 0x3f, 0xf0, 0x03, 0xc0, 0x0f, 0xfc, 0xc0, 0x0f, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0xf0, 0x01, 0x1f, 0xf0, 0x01, 0xc0, 0x07, 0x7c, 0xc0, 0x07, 0x7c, 0xdf, 0xf7, 0x7d, 0xdf, 0xf7, 0x7d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0xf0, 0x01, 0x1f, 0xf0, 0x01, 0xc0, 0x07, 0x7c, 0xc0, 0x07, 0x7c, 0xdf, 0xf7, 0x7d, 0xdf, 0xf7, 0x7d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xf0, 0x03, 0x3f, 0xf0, 0x03, 0xc0, 0x0f, 0xfc, 0xc0, 0x0f, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xf0, 0x03, 0x3f, 0xf0, 0x03, 0xc0, 0x0f, 0xfc, 0xc0, 0x0f, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0xf0, 0x01, 0x1f, 0xf0, 0x01, 0xc0, 0x07, 0x7c, 0xc0, 0x07, 0x7c, 0xdf, 0xf7, 0x7d, 0xdf, 0xf7, 0x7d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0xf0, 0x01, 0x1f, 0xf0, 0x01, 0xc0, 0x07, 0x7c, 0xc0, 0x07, 0x7c, 0xdf, 0xf7, 0x7d, 0xdf, 0xf7, 0x7d, 0x00, 0x00, 0x00, 0x03, 0x70, 0x00, 0x07, 0xf0, 0x07, 0xff, 0xff, 0xff, 0xfe, 0xcf, 0xff, 0xf8, 0x0f, 0xff, 0xe0, 0xff, 0xff, 0x0c, 0xc0, 0xcc, 0x00, 0x00, 0x00, 0x00, 0x0c, 0xe0, 0x00, 0x0e, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xf7, 0x7f, 0xff, 0xf1, 0x0f, 0x7f, 0xf0, 0xf9, 0x00, 0xf3, 0xff, 0xfe, 0xff, 0xff, 0xe0, 0xff, 0x07, 0x03, 0x00, 0xc0, 0x03, 0x1c, 0x80, 0x01, 0x00, 0x80, 0x03, 0x00, 0xc0, 0xff, 0x8f, 0x1f, 0xff, 0x3f, 0xc0, 0x60, 0xf0, 0xff, 0xe0, 0xff, 0x07, 0xe0, 0xff, 0x07, 0xe0, 0xff, 0x07, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0xfc, 0x0f, 0x06, 0x60, 0x00, 0x00, 0xff, 0xff, 0xff, 0xfc, 0x8f, 0xff, 0xf8, 0x0f, 0xf8, 0x00, 0x00, 0x00, 0x01, 0x30, 0x00, 0x07, 0xf0, 0x00, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xf3, 0x1f, 0xff, 0xf1, 0x01, 0x00, 0x00, 0x00, 0x00, 0x08, 0x80, 0x00, 0x0e, 0xf0, 0x80, 0x0f, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0xe0, 0x7f, 0x60, 0x06, 0x73, 0xcc, 0x0c, 0x00, 0x18, 0x00, 0x18, 0x6c, 0x03, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x0c, 0x06, 0x0c, 0xe0, 0x00, 0x60, 0x0c, 0x03, 0x60, 0x0c, 0x06, 0x0c, 0x0c, 0x06, 0x18, 0x00, 0x00, 0x00, 0x70, 0xc0, 0x3f, 0xe0, 0x00, 0x06, 0x66, 0xe6, 0x7f, 0x0c, 0xc6, 0x00, 0x0c, 0xc6, 0x00, 0x0c, 0xc0, 0x60, 0x0c, 0x06, 0x06, 0x00, 0xc6, 0x0e, 0x0c, 0x60, 0x60, 0xc6, 0xc6, 0x60, 0x0c, 0xc0, 0x60, 0x8c, 0x01, 0x60, 0x60, 0xc0, 0x60, 0x98, 0x61, 0x6f, 0xf0, 0x00, 0x06, 0x30, 0x00, 0x06, 0xc0, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x3f, 0x0c, 0xc6, 0x00, 0x0c, 0xc6, 0x7f, 0x30, 0xc0, 0x60, 0x0c, 0x06, 0x06, 0x00, 0xc6, 0x07, 0x60, 0x60, 0x66, 0x0c, 0xc6, 0x60, 0x0c, 0xc6, 0x60, 0x0c, 0x80, 0x3f, 0x30, 0xc0, 0x60, 0x98, 0x61, 0x66, 0xf0, 0x00, 0x1b, 0xe0, 0x00, 0x06, 0x60, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x66, 0x00, 0x03, 0x0c, 0x83, 0x1f, 0x60, 0x80, 0x1f, 0x00, 0x20, 0x91, 0xf8, 0xc7, 0x0c, 0x00, 0x03, 0x00, 0x12, 0x09, 0x00, 0x00, 0x00, 0x06, 0x7e, 0xe0, 0x01, 0x00, 0x60, 0x18, 0x60, 0x06, 0x00, 0x00, 0x00, 0x06, 0xf0, 0x83, 0x19, 0x2c, 0xcd, 0xc2, 0xbe, 0xc6, 0x00, 0xfc, 0xc7, 0x7f, 0xfc, 0xc7, 0x7f, 0xfc, 0xc7, 0x7f, 0x66, 0xc0, 0x00, 0x0c, 0xc0, 0x00, 0x0c, 0xc0, 0x00, 0x60, 0x00, 0x06, 0x60, 0x00, 0x06, 0x0c, 0xc6, 0x6c, 0x0c, 0xc6, 0x60, 0x0c, 0xc6, 0x60, 0x0c, 0x06, 0x06, 0x6c, 0xc6, 0x60, 0x0c, 0xc6, 0x60, 0x0c, 0x06, 0x06, 0xf8, 0xc3, 0x60, 0xfc, 0xc3, 0x3f, 0xfc, 0xc3, 0x3f, 0xfc, 0xc3, 0x3f, 0xfc, 0xc7, 0x00, 0xfc, 0xc7, 0x7f, 0xfc, 0xc7, 0x7f, 0x60, 0x00, 0x06, 0x60, 0x00, 0x06, 0x0c, 0xc6, 0x60, 0x0c, 0xc6, 0x60, 0x0c, 0xc6, 0x60, 0x0c, 0xc6, 0x3f, 0x66, 0xc6, 0x60, 0x0c, 0xc6, 0x60, 0x0c, 0x06, 0x1b, 0x18, 0x86, 0x0d, 0xfc, 0xc7, 0x3f, 0xfc, 0xc7, 0x3f, 0xfc, 0xc7, 0x3f, 0x0c, 0xc0, 0x00, 0x0c, 0xc0, 0x00, 0x0c, 0xc0, 0x00, 0x0c, 0xc0, 0x00, 0x0c, 0xc6, 0x60, 0x0c, 0xc6, 0x60, 0x0c, 0xc0, 0x7f, 0x0c, 0xc0, 0x7f, 0x0c, 0xc0, 0x7f, 0x0c, 0xc0, 0x7f, 0x0c, 0xc0, 0x7f, 0x8c, 0xc7, 0x60, 0x8c, 0xc7, 0x60, 0x8c, 0xc7, 0x60, 0x8c, 0xc7, 0x60, 0x0c, 0xc6, 0x61, 0x0c, 0xc6, 0x61, 0x60, 0x00, 0x06, 0x60, 0x00, 0x06, 0x60, 0x00, 0x06, 0x60, 0x00, 0x06, 0x60, 0x00, 0x06, 0x0c, 0x86, 0x61, 0x00, 0x06, 0x60, 0xec, 0xc0, 0x07, 0x7c, 0xc0, 0x00, 0x60, 0xc0, 0x00, 0x60, 0xc0, 0x00, 0x60, 0xc0, 0x00, 0x60, 0xe0, 0x00, 0x78, 0xc0, 0x6c, 0x0c, 0xc6, 0x6c, 0x0c, 0xc6, 0x6c, 0x0c, 0xc6, 0x60, 0xcc, 0xc6, 0x60, 0x0c, 0xc6, 0x60, 0x0c, 0xc6, 0x60, 0x0c, 0xc6, 0x60, 0xc6, 0x60, 0x7e, 0xfc, 0xc3, 0x00, 0x8c, 0xc1, 0x00, 0xfc, 0xc3, 0x00, 0x00, 0x86, 0x3f, 0x00, 0x86, 0x3f, 0x00, 0x86, 0x3f, 0x00, 0x86, 0x3f, 0x60, 0x00, 0x03, 0x60, 0x00, 0x03, 0x60, 0x00, 0x03, 0x0c, 0xc6, 0x60, 0x0c, 0xc6, 0x60, 0x0c, 0xc6, 0x60, 0x0c, 0xc6, 0x60, 0x0c, 0xc6, 0x60, 0x0c, 0xc6, 0x60, 0xf6, 0x66, 0x66, 0xf0, 0x00, 0x1b, 0x60, 0x00, 0x03, 0xe0, 0x00, 0x03, 0xe0, 0x00, 0x03, 0xe0, 0x80, 0x01, 0x30, 0x80, 0x19, 0xfc, 0xc7, 0x3f, 0xfc, 0x67, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x80, 0xf7, 0xa8, 0x82, 0x44, 0x0c, 0xc3, 0x4a, 0x3e, 0xe9, 0x4a, 0xa6, 0x84, 0x03, 0x60, 0x00, 0x1c, 0x6c, 0xe3, 0x7f, 0x78, 0x00, 0x1b, 0x60, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x0f, 0x00, 0x18, 0x80, 0x61, 0xc0, 0x00, 0x00, 0x0c, 0x06, 0x00, 0xc0, 0x80, 0x61, 0x60, 0xe0, 0x7f, 0x0c, 0xc3, 0x00, 0x06, 0xc6, 0x00, 0x38, 0xc0, 0x30, 0x06, 0x06, 0x06, 0xcc, 0x60, 0x60, 0x06, 0xc6, 0x3c, 0x00, 0x60, 0x60, 0x0c, 0xc3, 0x00, 0x00, 0x00, 0x03, 0x60, 0x00, 0x06, 0xfc, 0x83, 0x19, 0xfc, 0xc3, 0x30, 0x60, 0x00, 0x06, 0x8c, 0x81, 0x0f, 0x0c, 0x03, 0x06, 0x0c, 0x66, 0x18, 0x8c, 0x03, 0x1b, 0x06, 0xc3, 0x0f, 0x18, 0xc0, 0x30, 0x0c, 0x03, 0x06, 0x7c, 0x80, 0x19, 0x1c, 0x83, 0x19, 0x18, 0xc0, 0x60, 0x0c, 0x83, 0x61, 0xf8, 0xc1, 0x30, 0x60, 0xc0, 0x60, 0x6c, 0x03, 0x0f, 0x66, 0x66, 0x66, 0x60, 0xc0, 0x60, 0x0c, 0xc6, 0x60, 0x66, 0x06, 0x00, 0x0c, 0xc0, 0x00, 0x0c, 0xc6, 0x00, 0x06, 0x00, 0x60, 0x60, 0x00, 0x06, 0x00, 0xc6, 0xcc, 0xc6, 0xcc, 0x60, 0x3c, 0x60, 0x63, 0xf0, 0xc0, 0x30, 0xfe, 0xc7, 0x60, 0x0c, 0xc6, 0x00, 0x98, 0xc1, 0x00, 0x66, 0x06, 0x60, 0x36, 0x66, 0x63, 0xec, 0x80, 0x19, 0x06, 0x66, 0x60, 0x0c, 0xc6, 0x30, 0x0c, 0xc0, 0x00, 0x60, 0x00, 0x60, 0x66, 0x06, 0x0f, 0x8c, 0x01, 0x60, 0x66, 0x66, 0x1b, 0x0c, 0x66, 0x6c, 0x0c, 0x06, 0x60, 0x6c, 0x06, 0x6c, 0xfc, 0xc3, 0x60, 0xfc, 0xc3, 0x00, 0x98, 0xc1, 0x7f, 0xf0, 0x00, 0x3c, 0x4c, 0xc6, 0x64, 0x7c, 0x80, 0x31, 0xf6, 0xc6, 0x7f, 0x0c, 0xc6, 0x30, 0x0c, 0xc6, 0x00, 0x60, 0x00, 0x1b, 0x6c, 0x03, 0x06, 0x8c, 0x81, 0x7f, 0x66, 0x66, 0x1b, 0xfc, 0xc3, 0x67, 0xfc, 0x03, 0x3e, 0x7c, 0x86, 0x7f, 0xfc, 0xc7, 0x7f, 0x1c, 0xc3, 0x00, 0x7c, 0x80, 0x3f, 0x60, 0x00, 0x06, 0x00, 0x86, 0xf9, 0xfc, 0x8f, 0x63, 0x7c, 0xc0, 0x64, 0xb0, 0xc1, 0x30, 0x00, 0x00, 0x00, 0x00, 0x80, 0x19, 0x66, 0x86, 0xd9, 0x86, 0x03, 0x00, 0x30, 0x00, 0x0c, 0x66, 0x06, 0x06, 0x1c, 0x00, 0x00, 0x0c, 0x80, 0x01, 0x0c, 0x06, 0x0c, 0x38, 0x00, 0x60, 0xfc, 0xc7, 0x60, 0x0c, 0x06, 0x06, 0x0c, 0x06, 0x0c, 0x30, 0x00, 0x03, 0xc0, 0x01, 0x00, 0x38, 0x00, 0x00, 0xc6, 0x67, 0x60, 0x0c, 0x86, 0x61, 0x0c, 0xc3, 0x00, 0x0c, 0xc0, 0x60, 0x0c, 0x06, 0x06, 0x0c, 0xc6, 0x1c, 0x0c, 0x60, 0x60, 0x86, 0xc7, 0x60, 0x0c, 0xc0, 0x6c, 0x0c, 0xc3, 0x60, 0x60, 0xc0, 0x60, 0xf0, 0xc0, 0x39, 0x98, 0x01, 0x06, 0x18, 0x00, 0x06, 0x80, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00, 0x60, 0x30, 0x0c, 0xc6, 0x00, 0x0c, 0xc6, 0x00, 0x30, 0x80, 0x7f, 0x0c, 0x06, 0x06, 0x00, 0xc6, 0x18, 0x60, 0x60, 0x66, 0x0c, 0xc6, 0x60, 0x1c, 0xc6, 0x70, 0x0c, 0x00, 0x60, 0x30, 0xc6, 0x70, 0xf0, 0xc0, 0x36, 0x98, 0x01, 0x0e, 0x30, 0x00, 0x06, 0x60, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x66, 0xc0, 0x67, 0xf8, 0x01, 0x06, 0x60, 0x00, 0x30, 0x00, 0x20, 0x8e, 0x00, 0x80, 0x19, 0x00, 0x00, 0x00, 0x12, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x18, 0x60, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x0c, 0x90, 0x0c, 0x61, 0x50, 0xc6, 0x30, 0x0c, 0xc6, 0x60, 0x0c, 0xc6, 0x60, 0x0c, 0xc6, 0x60, 0x66, 0x80, 0x61, 0x0c, 0xc0, 0x00, 0x0c, 0xc0, 0x00, 0x60, 0x00, 0x06, 0x60, 0x00, 0x06, 0x0c, 0xc3, 0x78, 0x0c, 0xc6, 0x60, 0x0c, 0xc6, 0x60, 0x0c, 0x06, 0x0f, 0x3c, 0xc6, 0x60, 0x0c, 0xc6, 0x60, 0x0c, 0x06, 0x06, 0x18, 0xc0, 0x60, 0x06, 0x63, 0x30, 0x06, 0x63, 0x30, 0x06, 0x63, 0x30, 0x66, 0xc0, 0x00, 0x0c, 0xc0, 0x00, 0x0c, 0xc0, 0x00, 0x60, 0x00, 0x06, 0x60, 0x00, 0x06, 0x0c, 0xc6, 0x60, 0x0c, 0xc6, 0x60, 0x0c, 0xc6, 0x60, 0x0c, 0x06, 0x00, 0x36, 0xc6, 0x70, 0x0c, 0xc7, 0x70, 0x0c, 0x07, 0x0e, 0x18, 0x06, 0x07, 0x0c, 0x66, 0x30, 0x0c, 0x66, 0x30, 0x0c, 0x66, 0x30, 0x18, 0xc6, 0x00, 0x18, 0xc6, 0x00, 0x18, 0xc6, 0x00, 0x18, 0xc6, 0x00, 0x0c, 0xc3, 0x60, 0x0c, 0xc3, 0x60, 0x0c, 0xc0, 0x00, 0x0c, 0xc0, 0x00, 0x0c, 0xc0, 0x00, 0x0c, 0xc0, 0x00, 0x0c, 0xc0, 0x00, 0x0c, 0x86, 0x7f, 0x0c, 0x86, 0x7f, 0x0c, 0x86, 0x7f, 0x0c, 0x86, 0x7f, 0x0c, 0xc6, 0x60, 0x0c, 0xc6, 0x60, 0x60, 0x00, 0x06, 0x60, 0x00, 0x06, 0x60, 0x00, 0x06, 0x60, 0x00, 0x06, 0x60, 0x00, 0x06, 0xcc, 0x86, 0x61, 0x0c, 0xc6, 0x60, 0xcc, 0xc1, 0x18, 0xcc, 0xc1, 0x00, 0x60, 0xc0, 0x00, 0x60, 0xc0, 0x00, 0x60, 0xc0, 0x00, 0x60, 0xf0, 0x00, 0x60, 0xc0, 0x78, 0x0c, 0xc6, 0x78, 0x0c, 0xc6, 0x78, 0x0c, 0xc6, 0x60, 0x8c, 0xc7, 0x60, 0x0c, 0xc6, 0x60, 0x0c, 0xc6, 0x60, 0x0c, 0xc6, 0x60, 0xcc, 0x60, 0x06, 0x8c, 0xc1, 0x00, 0x0c, 0xc3, 0x00, 0x8c, 0xc1, 0x00, 0x0c, 0x06, 0x60, 0x0c, 0x06, 0x60, 0x0c, 0x06, 0x60, 0x0c, 0x06, 0x60, 0x60, 0x00, 0x63, 0x60, 0x00, 0x63, 0x60, 0x00, 0x63, 0x0c, 0xc6, 0x70, 0x0c, 0xc6, 0x70, 0x0c, 0xc6, 0x70, 0x0c, 0xc6, 0x70, 0x0c, 0xc6, 0x70, 0x0c, 0xc6, 0x70, 0x9c, 0xc3, 0x36, 0x60, 0x00, 0x0e, 0x60, 0x80, 0x01, 0x30, 0x80, 0x01, 0x30, 0x80, 0x01, 0x30, 0x80, 0x01, 0x18, 0x80, 0x19, 0x0c, 0x66, 0x30, 0x0c, 0xc0, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0xc0, 0x95, 0x28, 0x02, 0x00, 0x98, 0x01, 0x79, 0x10, 0x0f, 0x79, 0x90, 0x07, 0x06, 0x60, 0x00, 0x06, 0xf8, 0xe1, 0x7f, 0x7c, 0x00, 0x1b, 0x30, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x0c, 0x00, 0x18, 0x84, 0x61, 0xc0, 0x00, 0x00, 0x18, 0x03, 0x00, 0xc0, 0x00, 0x33, 0x60, 0x60, 0x60, 0x0c, 0xc3, 0x00, 0x06, 0xc6, 0x20, 0x1c, 0xc2, 0x30, 0x06, 0x06, 0x06, 0x8c, 0x61, 0x60, 0x06, 0xc6, 0x38, 0x02, 0x64, 0x60, 0x0c, 0xc3, 0x00, 0x00, 0xc0, 0x41, 0x60, 0x00, 0x06, 0x60, 0xc0, 0x30, 0x60, 0x80, 0x19, 0x60, 0x00, 0x06, 0x8c, 0xc3, 0x00, 0x0c, 0x03, 0x06, 0x0c, 0x66, 0x3c, 0x0c, 0x03, 0x0e, 0x06, 0xc3, 0x00, 0x30, 0xc0, 0x30, 0x0c, 0x03, 0x06, 0xcc, 0xc1, 0x30, 0xec, 0x05, 0x0f, 0x0c, 0xc0, 0x60, 0x0c, 0x83, 0x3f, 0x00, 0xc3, 0x30, 0x60, 0xc0, 0x60, 0xf8, 0xc1, 0x39, 0xfc, 0x63, 0x6f, 0x60, 0xc0, 0x60, 0x0c, 0xc6, 0x60, 0xf6, 0x06, 0x00, 0x0c, 0xc0, 0x00, 0x0c, 0xc6, 0x00, 0x0c, 0xc6, 0x60, 0x60, 0x00, 0x06, 0x0c, 0xc6, 0xcc, 0xc6, 0xcc, 0x60, 0xcc, 0xe1, 0x61, 0x60, 0xc0, 0x30, 0x06, 0xc6, 0x60, 0x0c, 0xc6, 0x00, 0x98, 0xc1, 0x00, 0x66, 0xc6, 0x60, 0x1e, 0xe6, 0x61, 0x8c, 0x81, 0x19, 0x06, 0x66, 0x60, 0x0c, 0xc6, 0x30, 0x0c, 0x80, 0x61, 0x60, 0x00, 0x60, 0x66, 0x86, 0x19, 0x8c, 0x01, 0x60, 0x66, 0x66, 0x1b, 0x0c, 0x66, 0x6c, 0x0c, 0x66, 0x30, 0x6c, 0x06, 0x66, 0x06, 0xc3, 0x60, 0x0c, 0xc6, 0x00, 0x98, 0xc1, 0x00, 0x6c, 0xc3, 0x60, 0x2c, 0xc6, 0x62, 0x8c, 0x81, 0x31, 0x66, 0xc6, 0x60, 0x0c, 0xc6, 0x30, 0x1c, 0xc6, 0x00, 0x60, 0x00, 0x0e, 0x6c, 0x03, 0x0f, 0x8c, 0x01, 0x60, 0x66, 0x66, 0x1b, 0x0c, 0xc6, 0x6c, 0x0c, 0x66, 0x30, 0x6c, 0x06, 0x6c, 0x0c, 0xc0, 0x00, 0x0c, 0xc3, 0x00, 0x0c, 0x06, 0x60, 0x60, 0x00, 0x06, 0x00, 0xc6, 0xcc, 0xc6, 0x8c, 0x61, 0x8c, 0xc1, 0x62, 0xe0, 0xc0, 0x30, 0x8c, 0x01, 0x18, 0x98, 0x01, 0x18, 0x06, 0x03, 0x0c, 0x60, 0x60, 0x30, 0x06, 0x03, 0x00, 0x00, 0x03, 0x30, 0x80, 0x61, 0x30, 0x06, 0x03, 0x30, 0x80, 0xc1, 0x18, 0x98, 0x01, 0x30, 0x00, 0x83, 0x01, 0x80, 0xc1, 0x18, 0x00, 0x63, 0x66, 0x18, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x38, 0x98, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0xcd, 0x07, 0x9f, 0xef, 0x7f, 0x9f, 0xef, 0x7f, 0xc0, 0x0f, 0x06, 0x7f, 0x80, 0x1f, 0x7f, 0xf0, 0x07, 0xff, 0xff, 0xff, 0xff, 0x0f, 0xff, 0xf0, 0x0f, 0xf0, 0x00, 0xef, 0x7b, 0xbe, 0xe7, 0x7f, 0xfe, 0xf7, 0x7f, 0xff, 0xf7, 0x7f, 0xff, 0xf7, 0xf9, 0x3f, 0xff, 0xf3, 0x3f, 0xef, 0x7f, 0xff, 0xff, 0x0f, 0xff, 0xf0, 0xff, 0x3f, 0x70, 0x3f, 0x7f, 0xf0, 0x3e, 0xc0, 0x2f, 0xcc, 0x7f, 0xe0, 0x7f, 0x06, 0x60, 0x00, 0x06, 0xf0, 0xf9, 0x63, 0xf0, 0xfd, 0xdf, 0xff, 0xf9, 0x01, 0xfc, 0xf9, 0x03, 0xfc, 0xff, 0xbf, 0x6f, 0xc0, 0xf7, 0x0e, 0x7f, 0x9f, 0x6f, 0xc0, 0x60, 0xe6, 0x7f, 0x00, 0x00, 0x03, 0x60, 0x00, 0x06, 0xc0, 0x0f, 0x00, 0x7f, 0x30, 0x98, 0xff, 0xf3, 0xff, 0x86, 0xf2, 0x07, 0x9f, 0xef, 0x7f, 0x00, 0xff, 0xff, 0x00, 0x00, 0x06, 0x18, 0x60, 0x00, 0x18, 0xc0, 0x30, 0x00, 0x03, 0x0f, 0x0c, 0x03, 0x18, 0x30, 0x0c, 0x03, 0x18, 0xf6, 0xff, 0xf8, 0xcd, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xf0, 0x03, 0x3f, 0xf0, 0x03, 0xc0, 0x0f, 0xfc, 0xc0, 0x0f, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xf0, 0x03, 0x3f, 0xf0, 0x03, 0xc0, 0x0f, 0xfc, 0xc0, 0x0f, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xf0, 0x03, 0x3f, 0xf0, 0x03, 0xc0, 0x0f, 0xfc, 0xc0, 0x0f, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xf0, 0x03, 0x3f, 0xf0, 0x03, 0xc0, 0x0f, 0xfc, 0xc0, 0x0f, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xf0, 0x01, 0x0f, 0xf0, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, 0xef, 0xff, 0xf0, 0xff, 0xff, 0x0c, 0x30, 0x33, 0x00, 0x00, 0x00, 0x00, 0x0e, 0xf8, 0x00, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf3, 0x7f, 0xff, 0xf0, 0xf0, 0x00, 0xf3, 0xff, 0xfe, 0xff, 0xff, 0xe0, 0xff, 0x07, 0x06, 0x00, 0x60, 0x06, 0x06, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x60, 0xff, 0x0f, 0x0f, 0xff, 0x3f, 0xc0, 0x60, 0x00, 0x00, 0x60, 0x00, 0x06, 0x00, 0x00, 0x00, 0x60, 0x00, 0x06, 0x60, 0x00, 0x00, 0x60, 0x00, 0x0f, 0xf0, 0x00, 0x06, 0xfc, 0x03, 0x00, 0xff, 0xff, 0xff, 0xf8, 0x0f, 0xfe, 0xf0, 0x0f, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x10, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xf1, 0x07, 0xff, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x80, 0x00, 0x0f, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x0c, 0x33, 0xc3, 0x6c, 0xc3, 0x01, 0x00, 0x18, 0x00, 0x06, 0x33, 0x03, 0x03, 0x0e, 0x00, 0x00, 0x06, 0xc0, 0x00, 0x06, 0x03, 0x06, 0x1c, 0x00, 0x30, 0xfe, 0x63, 0x30, 0x06, 0x03, 0x03, 0x06, 0x03, 0x06, 0x18, 0x80, 0x01, 0xe0, 0x00, 0x00, 0x1c, 0x00, 0x00, 0xe3, 0x33, 0x30, 0x06, 0xc3, 0x30, 0x86, 0x61, 0x00, 0x06, 0x60, 0x30, 0x06, 0x03, 0x03, 0x06, 0x63, 0x0e, 0x06, 0x30, 0x30, 0xc3, 0x63, 0x30, 0x06, 0x60, 0x36, 0x86, 0x61, 0x30, 0x30, 0x60, 0x30, 0x78, 0xe0, 0x1c, 0xcc, 0x00, 0x03, 0x0c, 0x00, 0x03, 0xc0, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x30, 0x18, 0x06, 0x63, 0x00, 0x06, 0x63, 0x00, 0x18, 0xc0, 0x3f, 0x06, 0x03, 0x03, 0x00, 0x63, 0x0c, 0x30, 0x30, 0x33, 0x06, 0x63, 0x30, 0x0e, 0x63, 0x38, 0x06, 0x00, 0x30, 0x18, 0x63, 0x38, 0x78, 0x60, 0x1b, 0xcc, 0x00, 0x07, 0x18, 0x00, 0x03, 0x30, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x33, 0xe0, 0x33, 0xfc, 0x00, 0x03, 0x30, 0x00, 0x18, 0x00, 0x10, 0x47, 0x00, 0xc0, 0x0c, 0x00, 0x00, 0x00, 0x89, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x0c, 0x30, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x06, 0x48, 0x86, 0x30, 0x28, 0x63, 0x18, 0x06, 0x63, 0x30, 0x06, 0x63, 0x30, 0x06, 0x63, 0x30, 0x33, 0xc0, 0x30, 0x06, 0x60, 0x00, 0x06, 0x60, 0x00, 0x30, 0x00, 0x03, 0x30, 0x00, 0x03, 0x86, 0x61, 0x3c, 0x06, 0x63, 0x30, 0x06, 0x63, 0x30, 0x06, 0x83, 0x07, 0x1e, 0x63, 0x30, 0x06, 0x63, 0x30, 0x06, 0x03, 0x03, 0x0c, 0x60, 0x30, 0x83, 0x31, 0x18, 0x83, 0x31, 0x18, 0x83, 0x31, 0x18, 0x33, 0x60, 0x00, 0x06, 0x60, 0x00, 0x06, 0x60, 0x00, 0x30, 0x00, 0x03, 0x30, 0x00, 0x03, 0x06, 0x63, 0x30, 0x06, 0x63, 0x30, 0x06, 0x63, 0x30, 0x06, 0x03, 0x00, 0x1b, 0x63, 0x38, 0x86, 0x63, 0x38, 0x86, 0x03, 0x07, 0x0c, 0x83, 0x03, 0x06, 0x33, 0x18, 0x06, 0x33, 0x18, 0x06, 0x33, 0x18, 0x0c, 0x63, 0x00, 0x0c, 0x63, 0x00, 0x0c, 0x63, 0x00, 0x0c, 0x63, 0x00, 0x86, 0x61, 0x30, 0x86, 0x61, 0x30, 0x06, 0x60, 0x00, 0x06, 0x60, 0x00, 0x06, 0x60, 0x00, 0x06, 0x60, 0x00, 0x06, 0x60, 0x00, 0x06, 0xc3, 0x3f, 0x06, 0xc3, 0x3f, 0x06, 0xc3, 0x3f, 0x06, 0xc3, 0x3f, 0x06, 0x63, 0x30, 0x06, 0x63, 0x30, 0x30, 0x00, 0x03, 0x30, 0x00, 0x03, 0x30, 0x00, 0x03, 0x30, 0x00, 0x03, 0x30, 0x00, 0x03, 0x66, 0xc3, 0x30, 0x06, 0x63, 0x30, 0xe6, 0x60, 0x0c, 0xe6, 0x60, 0x00, 0x30, 0x60, 0x00, 0x30, 0x60, 0x00, 0x30, 0x60, 0x00, 0x30, 0x78, 0x00, 0x30, 0x60, 0x3c, 0x06, 0x63, 0x3c, 0x06, 0x63, 0x3c, 0x06, 0x63, 0x30, 0xc6, 0x63, 0x30, 0x06, 0x63, 0x30, 0x06, 0x63, 0x30, 0x06, 0x63, 0x30, 0x66, 0x30, 0x03, 0xc6, 0x60, 0x00, 0x86, 0x61, 0x00, 0xc6, 0x60, 0x00, 0x06, 0x03, 0x30, 0x06, 0x03, 0x30, 0x06, 0x03, 0x30, 0x06, 0x03, 0x30, 0x30, 0x80, 0x31, 0x30, 0x80, 0x31, 0x30, 0x80, 0x31, 0x06, 0x63, 0x38, 0x06, 0x63, 0x38, 0x06, 0x63, 0x38, 0x06, 0x63, 0x38, 0x06, 0x63, 0x38, 0x06, 0x63, 0x38, 0xce, 0x61, 0x1b, 0x30, 0x00, 0x07, 0x30, 0xc0, 0x00, 0x18, 0xc0, 0x00, 0x18, 0xc0, 0x00, 0x18, 0xc0, 0x00, 0x0c, 0xc0, 0x0c, 0x06, 0x33, 0x18, 0x06, 0x60, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0xe0, 0x4a, 0x14, 0x01, 0x00, 0xcc, 0x80, 0x3c, 0x88, 0x87, 0x3c, 0xc8, 0x03, 0x03, 0x30, 0x00, 0x03, 0xfc, 0xf0, 0x3f, 0x3e, 0x80, 0x0d, 0x18, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x06, 0x00, 0x0c, 0xc2, 0x30, 0x60, 0x00, 0x00, 0x8c, 0x01, 0x00, 0x60, 0x80, 0x19, 0x30, 0x30, 0x30, 0x86, 0x61, 0x00, 0x03, 0x63, 0x10, 0x0e, 0x61, 0x18, 0x03, 0x03, 0x03, 0xc6, 0x30, 0x30, 0x03, 0x63, 0x1c, 0x01, 0x32, 0x30, 0x86, 0x61, 0x00, 0x00, 0xe0, 0x20, 0x30, 0x00, 0x03, 0x30, 0x60, 0x18, 0x30, 0xc0, 0x0c, 0x30, 0x00, 0x03, 0xc6, 0x61, 0x00, 0x86, 0x01, 0x03, 0x06, 0x33, 0x1e, 0x86, 0x01, 0x07, 0x83, 0x61, 0x00, 0x18, 0x60, 0x18, 0x86, 0x01, 0x03, 0xe6, 0x60, 0x18, 0xf6, 0x82, 0x07, 0x06, 0x60, 0x30, 0x86, 0xc1, 0x1f, 0x80, 0x61, 0x18, 0x30, 0x60, 0x30, 0xfc, 0xe0, 0x1c, 0xfe, 0xb1, 0x37, 0x30, 0x60, 0x30, 0x06, 0x63, 0x30, 0x7b, 0x03, 0x00, 0x06, 0x60, 0x00, 0x06, 0x63, 0x00, 0x06, 0x63, 0x30, 0x30, 0x00, 0x03, 0x06, 0x63, 0x66, 0x63, 0x66, 0x30, 0xe6, 0xf0, 0x30, 0x30, 0x60, 0x18, 0x03, 0x63, 0x30, 0x06, 0x63, 0x00, 0xcc, 0x60, 0x00, 0x33, 0x63, 0x30, 0x0f, 0xf3, 0x30, 0xc6, 0xc0, 0x0c, 0x03, 0x33, 0x30, 0x06, 0x63, 0x18, 0x06, 0xc0, 0x30, 0x30, 0x00, 0x30, 0x33, 0xc3, 0x0c, 0xc6, 0x00, 0x30, 0x33, 0xb3, 0x0d, 0x06, 0x33, 0x36, 0x06, 0x33, 0x18, 0x36, 0x03, 0x33, 0x83, 0x61, 0x30, 0x06, 0x63, 0x00, 0xcc, 0x60, 0x00, 0xb6, 0x61, 0x30, 0x16, 0x63, 0x31, 0xc6, 0xc0, 0x18, 0x33, 0x63, 0x30, 0x06, 0x63, 0x18, 0x0e, 0x63, 0x00, 0x30, 0x00, 0x07, 0xb6, 0x81, 0x07, 0xc6, 0x00, 0x30, 0x33, 0xb3, 0x0d, 0x06, 0x63, 0x36, 0x06, 0x33, 0x18, 0x36, 0x03, 0x36, 0x06, 0x60, 0x00, 0x86, 0x61, 0x00, 0x06, 0x03, 0x30, 0x30, 0x00, 0x03, 0x00, 0xc3, 0xcc, 0xc6, 0xcc, 0x30, 0xc6, 0x60, 0x31, 0x70, 0x60, 0x18, 0x00, 0x00, 0x06, 0x00, 0x80, 0x19, 0xfc, 0xc3, 0x70, 0xfc, 0x0c, 0x00, 0xe0, 0x00, 0x07, 0x60, 0x00, 0x00, 0x18, 0x00, 0x00, 0x0c, 0xc0, 0x00, 0xf8, 0x03, 0x0c, 0xfc, 0xc7, 0x3f, 0x00, 0x83, 0x3f, 0xf8, 0x03, 0x03, 0xf8, 0x03, 0x06, 0x30, 0x00, 0x03, 0x00, 0x07, 0x00, 0x0e, 0x00, 0x06, 0x0c, 0x60, 0x60, 0xfc, 0x03, 0x3f, 0xfc, 0xc1, 0x7f, 0x0c, 0x80, 0x3f, 0x0c, 0xc6, 0x3f, 0xf8, 0xc3, 0x70, 0xfc, 0x67, 0x60, 0x06, 0x87, 0x3f, 0x0c, 0x80, 0x3f, 0x0c, 0x86, 0x3f, 0x60, 0x80, 0x3f, 0x60, 0xc0, 0x30, 0x0c, 0x03, 0x06, 0xfc, 0x03, 0x06, 0x00, 0x03, 0x06, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x7f, 0xfc, 0x83, 0x7f, 0xf8, 0x87, 0x3f, 0x30, 0x00, 0x60, 0x0c, 0x86, 0x1f, 0x0c, 0xc6, 0x70, 0xf8, 0x61, 0x66, 0x0c, 0x86, 0x3f, 0xec, 0x83, 0x6f, 0x0c, 0x80, 0x3f, 0xe0, 0x83, 0x6f, 0x60, 0x80, 0x19, 0x0e, 0x07, 0x06, 0xfc, 0x07, 0x06, 0x60, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0xfc, 0xc7, 0x3c, 0x0c, 0x03, 0x06, 0x60, 0xc0, 0x30, 0x00, 0x40, 0x40, 0xfc, 0x07, 0x00, 0x00, 0x00, 0x00, 0x04, 0x04, 0x00, 0x00, 0xc0, 0x3f, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x37, 0x60, 0x06, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x07, 0x00, 0xc8, 0x8f, 0x30, 0xe8, 0x87, 0x1f, 0x0c, 0xc6, 0x60, 0x0c, 0xc6, 0x60, 0x0c, 0xc6, 0x60, 0xe6, 0x07, 0x3f, 0xfc, 0xc7, 0x7f, 0xfc, 0xc7, 0x7f, 0xf8, 0x81, 0x1f, 0xf8, 0x81, 0x1f, 0xfc, 0xc1, 0x70, 0xf8, 0x83, 0x3f, 0xf8, 0x83, 0x3f, 0xf8, 0x83, 0x19, 0xf8, 0x83, 0x3f, 0xf8, 0x83, 0x3f, 0xf8, 0x03, 0x06, 0x3c, 0xc0, 0x3c, 0xfc, 0xc7, 0x7f, 0xfc, 0xc7, 0x7f, 0xfc, 0xc7, 0x7f, 0xfc, 0x83, 0x7f, 0xf8, 0x83, 0x3f, 0xf8, 0x83, 0x3f, 0xf8, 0x81, 0x1f, 0xf8, 0x81, 0x1f, 0xf8, 0xc7, 0x60, 0xf8, 0x83, 0x3f, 0xf8, 0x83, 0x3f, 0xf8, 0x03, 0x06, 0xfc, 0x83, 0x6f, 0xf8, 0x86, 0x6f, 0xf8, 0x06, 0x06, 0xf8, 0x03, 0x03, 0x0c, 0xc6, 0x7f, 0x0c, 0xc6, 0x7f, 0x0c, 0xc6, 0x7f, 0xf0, 0x83, 0x7f, 0xf0, 0x83, 0x7f, 0xf0, 0x83, 0x7f, 0xf0, 0x83, 0x7f, 0xfc, 0x81, 0x7f, 0xfc, 0x81, 0x7f, 0xfc, 0x87, 0x3f, 0xfc, 0x87, 0x3f, 0xfc, 0x87, 0x3f, 0xfc, 0x87, 0x3f, 0xfc, 0x87, 0x3f, 0xf8, 0x03, 0x60, 0xf8, 0x03, 0x60, 0xf8, 0x03, 0x60, 0xf8, 0x03, 0x60, 0x0c, 0xc6, 0x60, 0x0c, 0xc6, 0x60, 0xf8, 0x81, 0x1f, 0xf8, 0x81, 0x1f, 0xf8, 0x81, 0x1f, 0xf8, 0x81, 0x1f, 0xf8, 0x81, 0x1f, 0x9e, 0xe3, 0x67, 0xf8, 0x83, 0x3f, 0x0c, 0xc7, 0x70, 0x8c, 0xc7, 0x7f, 0xf8, 0xc1, 0x7f, 0xf8, 0xc1, 0x7f, 0xf8, 0xc1, 0x7f, 0xf8, 0xc1, 0x7f, 0xf8, 0xc1, 0x70, 0x0c, 0xc6, 0x70, 0x0c, 0xc6, 0x70, 0x0c, 0xc6, 0x60, 0x0c, 0xc7, 0x60, 0xf8, 0x83, 0x3f, 0xf8, 0x83, 0x3f, 0xf8, 0x83, 0x3f, 0xf8, 0xc7, 0x3f, 0x0c, 0xc7, 0x00, 0x0c, 0xc6, 0x00, 0x0c, 0xc7, 0x00, 0xf8, 0x83, 0x3f, 0xf8, 0x83, 0x3f, 0xf8, 0x83, 0x3f, 0xf8, 0x83, 0x3f, 0x60, 0x00, 0x3e, 0x60, 0x00, 0x3e, 0x60, 0x00, 0x3e, 0xf8, 0x83, 0x6f, 0xf8, 0x83, 0x6f, 0xf8, 0x83, 0x6f, 0xf8, 0x83, 0x6f, 0xf8, 0x83, 0x6f, 0xf8, 0x83, 0x6f, 0x0c, 0x83, 0x19, 0x60, 0x00, 0x06, 0x60, 0xc0, 0x3f, 0xfc, 0xc7, 0x3f, 0xfc, 0xc7, 0x3f, 0xfc, 0xc7, 0x03, 0xfc, 0x83, 0x19, 0x0c, 0xc6, 0x7f, 0xf8, 0x83, 0x6f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x67, 0xf7, 0xe8, 0x03, 0x00, 0x9e, 0x87, 0x48, 0x08, 0x89, 0x48, 0x88, 0x04, 0x00, 0x60, 0x00, 0x00, 0xf0, 0xe0, 0x7f, 0x38, 0x00, 0x7b, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x0c, 0x00, 0xf8, 0x87, 0x61, 0xf8, 0x07, 0x00, 0xf0, 0x01, 0x00, 0xe0, 0xc1, 0xf3, 0xf8, 0x61, 0x60, 0xfe, 0xe1, 0x00, 0xfe, 0xe7, 0x3f, 0xfe, 0xe3, 0x70, 0xfc, 0x83, 0x1f, 0x1e, 0x67, 0x60, 0x06, 0xe6, 0x70, 0xfe, 0xc7, 0x3f, 0x0e, 0xe7, 0x01, 0x00, 0xe0, 0x7f, 0xf0, 0x00, 0x0f, 0xf0, 0xe0, 0x70, 0xf0, 0xe0, 0x79, 0xf8, 0x01, 0x0f, 0x78, 0x86, 0x3f, 0x0e, 0x83, 0x1f, 0xf8, 0xc3, 0x67, 0xec, 0x01, 0x07, 0xfc, 0x81, 0x3f, 0xe0, 0xe3, 0x30, 0xf8, 0x81, 0x1f, 0x0e, 0xe7, 0x70, 0x0c, 0x00, 0x06, 0xf8, 0x80, 0x3f, 0x0c, 0x83, 0x01, 0xf8, 0x81, 0x1f, 0xe0, 0x80, 0x3f, 0x60, 0xe0, 0x70, 0x60, 0xc0, 0x39, 0xf8, 0x81, 0x3f, 0xf8, 0x83, 0x3f, 0x9c, 0x03, 0x00, 0xfc, 0xc7, 0x7f, 0x0c, 0xc3, 0x00, 0xf8, 0x83, 0x3f, 0xfc, 0x83, 0x1f, 0xf8, 0xe3, 0x7c, 0xc6, 0xc7, 0x60, 0x0c, 0xe7, 0x60, 0x60, 0xc0, 0x3f, 0x06, 0xc6, 0x3f, 0xfc, 0xc3, 0x00, 0xfe, 0xc7, 0x7f, 0x66, 0x86, 0x3f, 0x0e, 0xe6, 0x60, 0x0c, 0xe7, 0x19, 0x06, 0x66, 0x60, 0xf8, 0xc3, 0x30, 0x0c, 0x00, 0x3f, 0x60, 0xc0, 0x7f, 0xfc, 0xc3, 0x30, 0xfc, 0x07, 0x60, 0xfe, 0xe7, 0x7f, 0xfc, 0xe7, 0x67, 0xfc, 0xc7, 0x1f, 0xcc, 0xc3, 0x63, 0xfc, 0x87, 0x3f, 0xfc, 0xc3, 0x00, 0xfe, 0x87, 0x3f, 0x6c, 0x83, 0x3f, 0x1c, 0xc6, 0x61, 0x0c, 0xe7, 0x31, 0x06, 0xc6, 0x60, 0xf8, 0xc3, 0x30, 0xec, 0x83, 0x7f, 0x60, 0x00, 0x06, 0xf8, 0x81, 0x19, 0xfc, 0x07, 0x60, 0xfe, 0xe7, 0x7f, 0xfc, 0xc3, 0x67, 0xfc, 0xc3, 0x0f, 0xcc, 0x83, 0x63, 0xf8, 0x83, 0x3f, 0x8c, 0xc1, 0x00, 0xf0, 0x83, 0x3f, 0xf8, 0x81, 0x1f, 0x0c, 0xe6, 0x7c, 0xc6, 0x87, 0x61, 0x0c, 0xc7, 0x61, 0x60, 0xc0, 0x3f, 0x0c, 0xe3, 0x7f, 0x98, 0x01, 0x18, 0x06, 0x03, 0x0c, 0x60, 0x60, 0x30, 0xfe, 0x03, 0x00, 0x00, 0xe3, 0x1f, 0xe0, 0xe0, 0x3f, 0xe6, 0x03, 0x30, 0xf0, 0x81, 0x0f, 0xfe, 0x00, 0x30, 0xfe, 0x83, 0x01, 0xfc, 0xc3, 0x0e, 0x00, 0xc3, 0x3f, 0x1e, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1e, 0xec, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0x18, 0x00, 0x00, 0x00, 0xc6, 0x60, 0x00, 0x06, 0x00, 0x00, 0xc3, 0x01, 0x00, 0x00, 0x00, 0x00, 0xff, 0x0f, 0x00, 0x06, 0x06, 0x00, 0x00, 0x80, 0x7f, 0x00, 0x00, 0x03, 0x00, 0xc0, 0x60, 0xf0, 0xe7, 0x7f, 0x00, 0x80, 0x01, 0x60, 0x00, 0x06, 0x00, 0x06, 0x0e, 0x00, 0xe0, 0x0f, 0x00, 0x00, 0x00, 0x06, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x30, 0x60, 0x00, 0xf8, 0x83, 0x1f, 0x00, 0x03, 0x06, 0x06, 0x06, 0x18, 0x18, 0x80, 0x01, 0x0e, 0x80, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xf0, 0x03, 0x3f, 0xf0, 0x03, 0x3f, 0xf0, 0x03, 0x3f, 0xf0, 0x03, 0x3f, 0xf0, 0x03, 0x3f, 0xf0, 0x03, 0x3f, 0xf0, 0x03, 0x3f, 0xf0, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0xf0, 0x01, 0x1f, 0xf0, 0x01, 0x1f, 0xf0, 0x01, 0x1f, 0xf0, 0x01, 0x1f, 0xf0, 0x01, 0x1f, 0xf0, 0x01, 0x1f, 0xf0, 0x01, 0x1f, 0xf0, 0x01, 0xc0, 0x0f, 0xfc, 0xc0, 0x0f, 0xfc, 0xc0, 0x0f, 0xfc, 0xc0, 0x0f, 0xfc, 0xc0, 0x0f, 0xfc, 0xc0, 0x0f, 0xfc, 0xc0, 0x0f, 0xfc, 0xc0, 0x0f, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc0, 0x07, 0x7c, 0xc0, 0x07, 0x7c, 0xc0, 0x07, 0x7c, 0xc0, 0x07, 0x7c, 0xc0, 0x07, 0x7c, 0xc0, 0x07, 0x7c, 0xc0, 0x07, 0x7c, 0xc0, 0x07, 0x7c, 0xdf, 0xf7, 0x7d, 0xdf, 0xf7, 0x7d, 0xdf, 0xf7, 0x7d, 0xdf, 0xf7, 0x7d, 0xdf, 0xf7, 0x7d, 0xdf, 0xf7, 0x7d, 0xdf, 0xf7, 0x7d, 0xdf, 0xf7, 0x7d, 0x03, 0x70, 0x00, 0x0f, 0xf0, 0x07, 0x0f, 0xf0, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, 0xff, 0xff, 0xf8, 0xff, 0xff, 0x0c, 0xc0, 0xcc, 0x00, 0x08, 0xe0, 0x00, 0x0f, 0xfe, 0x00, 0x8f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf3, 0xff, 0xff, 0x71, 0xe0, 0x00, 0xf3, 0xff, 0x00, 0x00, 0x06, 0x60, 0x00, 0x06, 0x0c, 0x00, 0x30, 0x0c, 0x03, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x30, 0x60, 0x00, 0x00, 0xfe, 0xe7, 0x70, 0x60, 0x00, 0x00, 0x60, 0x00, 0x06, 0x00, 0x00, 0x00, 0x60, 0x00, 0x06, 0x60, 0x00, 0x00, 0x60, 0x00, 0x03, 0xc0, 0x00, 0x06, 0xf8, 0x01, 0x00, 0xfc, 0x8f, 0xff, 0xf0, 0x0f, 0xf8, 0xf0, 0x0f, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xf7, 0x1f, 0xff, 0xf0, 0x01, 0xff, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x8e, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0xc0, 0x0c, 0xfe, 0x61, 0x38, 0x7e, 0x06, 0x00, 0x70, 0x80, 0x03, 0x30, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x06, 0x60, 0x00, 0xfc, 0x01, 0x06, 0xfe, 0xe3, 0x1f, 0x80, 0xc1, 0x1f, 0xfc, 0x81, 0x01, 0xfc, 0x01, 0x03, 0x18, 0x80, 0x01, 0x80, 0x03, 0x00, 0x07, 0x00, 0x03, 0x06, 0x30, 0x30, 0xfe, 0x81, 0x1f, 0xfe, 0xe0, 0x3f, 0x06, 0xc0, 0x1f, 0x06, 0xe3, 0x1f, 0xfc, 0x61, 0x38, 0xfe, 0x33, 0x30, 0x83, 0xc3, 0x1f, 0x06, 0xc0, 0x1f, 0x06, 0xc3, 0x1f, 0x30, 0xc0, 0x1f, 0x30, 0x60, 0x18, 0x86, 0x01, 0x03, 0xfe, 0x01, 0x03, 0x80, 0x01, 0x03, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x3f, 0xfe, 0xc1, 0x3f, 0xfc, 0xc3, 0x1f, 0x18, 0x00, 0x30, 0x06, 0xc3, 0x0f, 0x06, 0x63, 0x38, 0xfc, 0x30, 0x33, 0x06, 0xc3, 0x1f, 0xf6, 0xc1, 0x37, 0x06, 0xc0, 0x1f, 0xf0, 0xc1, 0x37, 0x30, 0xc0, 0x0c, 0x87, 0x03, 0x03, 0xfe, 0x03, 0x03, 0x30, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xfe, 0x63, 0x1e, 0x86, 0x01, 0x03, 0x30, 0x60, 0x18, 0x00, 0x20, 0x20, 0xfe, 0x03, 0x00, 0x00, 0x00, 0x00, 0x02, 0x02, 0x00, 0x00, 0xe0, 0x1f, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x1b, 0x30, 0x03, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x03, 0x00, 0xe4, 0x47, 0x18, 0xf4, 0xc3, 0x0f, 0x06, 0x63, 0x30, 0x06, 0x63, 0x30, 0x06, 0x63, 0x30, 0xf3, 0x83, 0x1f, 0xfe, 0xe3, 0x3f, 0xfe, 0xe3, 0x3f, 0xfc, 0xc0, 0x0f, 0xfc, 0xc0, 0x0f, 0xfe, 0x60, 0x38, 0xfc, 0xc1, 0x1f, 0xfc, 0xc1, 0x1f, 0xfc, 0xc1, 0x0c, 0xfc, 0xc1, 0x1f, 0xfc, 0xc1, 0x1f, 0xfc, 0x01, 0x03, 0x1e, 0x60, 0x1e, 0xfe, 0xe3, 0x3f, 0xfe, 0xe3, 0x3f, 0xfe, 0xe3, 0x3f, 0xfe, 0xc1, 0x3f, 0xfc, 0xc1, 0x1f, 0xfc, 0xc1, 0x1f, 0xfc, 0xc0, 0x0f, 0xfc, 0xc0, 0x0f, 0xfc, 0x63, 0x30, 0xfc, 0xc1, 0x1f, 0xfc, 0xc1, 0x1f, 0xfc, 0x01, 0x03, 0xfe, 0xc1, 0x37, 0x7c, 0xc3, 0x37, 0x7c, 0x03, 0x03, 0xfc, 0x81, 0x01, 0x06, 0xe3, 0x3f, 0x06, 0xe3, 0x3f, 0x06, 0xe3, 0x3f, 0xf8, 0xc1, 0x3f, 0xf8, 0xc1, 0x3f, 0xf8, 0xc1, 0x3f, 0xf8, 0xc1, 0x3f, 0xfe, 0xc0, 0x3f, 0xfe, 0xc0, 0x3f, 0xfe, 0xc3, 0x1f, 0xfe, 0xc3, 0x1f, 0xfe, 0xc3, 0x1f, 0xfe, 0xc3, 0x1f, 0xfe, 0xc3, 0x1f, 0xfc, 0x01, 0x30, 0xfc, 0x01, 0x30, 0xfc, 0x01, 0x30, 0xfc, 0x01, 0x30, 0x06, 0x63, 0x30, 0x06, 0x63, 0x30, 0xfc, 0xc0, 0x0f, 0xfc, 0xc0, 0x0f, 0xfc, 0xc0, 0x0f, 0xfc, 0xc0, 0x0f, 0xfc, 0xc0, 0x0f, 0xcf, 0xf1, 0x33, 0xfc, 0xc1, 0x1f, 0x86, 0x63, 0x38, 0xc6, 0xe3, 0x3f, 0xfc, 0xe0, 0x3f, 0xfc, 0xe0, 0x3f, 0xfc, 0xe0, 0x3f, 0xfc, 0xe0, 0x3f, 0xfc, 0x60, 0x38, 0x06, 0x63, 0x38, 0x06, 0x63, 0x38, 0x06, 0x63, 0x30, 0x86, 0x63, 0x30, 0xfc, 0xc1, 0x1f, 0xfc, 0xc1, 0x1f, 0xfc, 0xc1, 0x1f, 0xfc, 0xe3, 0x1f, 0x86, 0x63, 0x00, 0x06, 0x63, 0x00, 0x86, 0x63, 0x00, 0xfc, 0xc1, 0x1f, 0xfc, 0xc1, 0x1f, 0xfc, 0xc1, 0x1f, 0xfc, 0xc1, 0x1f, 0x30, 0x00, 0x1f, 0x30, 0x00, 0x1f, 0x30, 0x00, 0x1f, 0xfc, 0xc1, 0x37, 0xfc, 0xc1, 0x37, 0xfc, 0xc1, 0x37, 0xfc, 0xc1, 0x37, 0xfc, 0xc1, 0x37, 0xfc, 0xc1, 0x37, 0x86, 0xc1, 0x0c, 0x30, 0x00, 0x03, 0x30, 0xe0, 0x1f, 0xfe, 0xe3, 0x1f, 0xfe, 0xe3, 0x1f, 0xfe, 0xe3, 0x01, 0xfe, 0xc1, 0x0c, 0x06, 0xe3, 0x3f, 0xfc, 0xc1, 0x37, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xb3, 0x7b, 0xf4, 0x01, 0x00, 0xcf, 0x43, 0x24, 0x84, 0x44, 0x24, 0x44, 0x02, 0x00, 0x30, 0x00, 0x00, 0x78, 0xf0, 0x3f, 0x1c, 0x80, 0x3d, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x06, 0x00, 0xfc, 0xc3, 0x30, 0xfc, 0x03, 0x00, 0xf8, 0x00, 0x00, 0xf0, 0xe0, 0xf9, 0xfc, 0x30, 0x30, 0xff, 0x70, 0x00, 0xff, 0xf3, 0x1f, 0xff, 0x71, 0x38, 0xfe, 0xc1, 0x0f, 0x8f, 0x33, 0x30, 0x03, 0x73, 0x38, 0xff, 0xe3, 0x1f, 0x87, 0xf3, 0x00, 0x00, 0xf0, 0x3f, 0x78, 0x80, 0x07, 0x78, 0x70, 0x38, 0x78, 0xf0, 0x3c, 0xfc, 0x80, 0x07, 0x3c, 0xc3, 0x1f, 0x87, 0xc1, 0x0f, 0xfc, 0xe1, 0x33, 0xf6, 0x80, 0x03, 0xfe, 0xc0, 0x1f, 0xf0, 0x71, 0x18, 0xfc, 0xc0, 0x0f, 0x87, 0x73, 0x38, 0x06, 0x00, 0x03, 0x7c, 0xc0, 0x1f, 0x86, 0xc1, 0x00, 0xfc, 0xc0, 0x0f, 0x70, 0xc0, 0x1f, 0x30, 0x70, 0x38, 0x30, 0xe0, 0x1c, 0xfc, 0xc0, 0x1f, 0xfc, 0xc1, 0x1f, 0xce, 0x01, 0x00, 0xfe, 0xe3, 0x3f, 0x86, 0x61, 0x00, 0xfc, 0xc1, 0x1f, 0xfe, 0xc1, 0x0f, 0xfc, 0x71, 0x3e, 0xe3, 0x63, 0x30, 0x86, 0x73, 0x30, 0x30, 0xe0, 0x1f, 0x03, 0xe3, 0x1f, 0xfe, 0x61, 0x00, 0xff, 0xe3, 0x3f, 0x33, 0xc3, 0x1f, 0x07, 0x73, 0x30, 0x86, 0xf3, 0x0c, 0x03, 0x33, 0x30, 0xfc, 0x61, 0x18, 0x06, 0x80, 0x1f, 0x30, 0xe0, 0x3f, 0xfe, 0x61, 0x18, 0xfe, 0x03, 0x30, 0xff, 0xf3, 0x3f, 0xfe, 0xf3, 0x33, 0xfe, 0xe3, 0x0f, 0xe6, 0xe1, 0x31, 0xfe, 0xc3, 0x1f, 0xfe, 0x61, 0x00, 0xff, 0xc3, 0x1f, 0xb6, 0xc1, 0x1f, 0x0e, 0xe3, 0x30, 0x86, 0xf3, 0x18, 0x03, 0x63, 0x30, 0xfc, 0x61, 0x18, 0xf6, 0xc1, 0x3f, 0x30, 0x00, 0x03, 0xfc, 0xc0, 0x0c, 0xfe, 0x03, 0x30, 0xff, 0xf3, 0x3f, 0xfe, 0xe1, 0x33, 0xfe, 0xe1, 0x07, 0xe6, 0xc1, 0x31, 0xfc, 0xc1, 0x1f, 0xc6, 0x60, 0x00, 0xf8, 0xc1, 0x1f, 0xfc, 0xc0, 0x0f, 0x06, 0xe3, 0x7c, 0xc6, 0xc7, 0x30, 0x86, 0xe3, 0x30, 0x30, 0xe0, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x80, 0x07, 0x00, 0xe0, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x00, 0xf8, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0x1c, 0x00, 0x80, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x1f, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x60, 0x06, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x4c, 0xf8, 0x04, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x03, 0x18, 0xc0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x80, 0x3f, 0x00, 0x80, 0x3f, 0x60, 0x80, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x0c, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x19, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x78, 0x04, 0x4f, 0x78, 0x84, 0x07, 0x00, 0x60, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x80, 0x03, 0x00, 0x00, 0x00, 0x00, 0x06, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x80, 0x03, 0x60, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x80, 0x01, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x80, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x33, 0x30, 0x66, 0x00, 0x00, 0x06, 0x6c, 0xc0, 0x06, 0x6c, 0x06, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x80, 0x3f, 0x00, 0xe0, 0x7f, 0x00, 0x80, 0x01, 0x00, 0x00, 0x00, 0x00, 0x03, 0x03, 0x00, 0x00, 0x00, 0x0c, 0xc3, 0x30, 0x06, 0x6c, 0x18, 0x0c, 0xc3, 0x30, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x80, 0x01, 0x00, 0x80, 0x31, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xf0, 0x03, 0x3f, 0xf0, 0x03, 0x3f, 0xf0, 0x03, 0x3f, 0xf0, 0x03, 0x3f, 0xf0, 0x03, 0x3f, 0xf0, 0x03, 0x3f, 0xf0, 0x03, 0x3f, 0xf0, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0xf0, 0x01, 0x1f, 0xf0, 0x01, 0x1f, 0xf0, 0x01, 0x1f, 0xf0, 0x01, 0x1f, 0xf0, 0x01, 0x1f, 0xf0, 0x01, 0x1f, 0xf0, 0x01, 0x1f, 0xf0, 0x01, 0xc0, 0x0f, 0xfc, 0xc0, 0x0f, 0xfc, 0xc0, 0x0f, 0xfc, 0xc0, 0x0f, 0xfc, 0xc0, 0x0f, 0xfc, 0xc0, 0x0f, 0xfc, 0xc0, 0x0f, 0xfc, 0xc0, 0x0f, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc0, 0x07, 0x7c, 0xc0, 0x07, 0x7c, 0xc0, 0x07, 0x7c, 0xc0, 0x07, 0x7c, 0xc0, 0x07, 0x7c, 0xc0, 0x07, 0x7c, 0xc0, 0x07, 0x7c, 0xc0, 0x07, 0x7c, 0xdf, 0xf7, 0x7d, 0xdf, 0xf7, 0x7d, 0xdf, 0xf7, 0x7d, 0xdf, 0xf7, 0x7d, 0xdf, 0xf7, 0x7d, 0xdf, 0xf7, 0x7d, 0xdf, 0xf7, 0x7d, 0xdf, 0xf7, 0x7d, 0x07, 0xf0, 0x03, 0x1f, 0xf0, 0x1f, 0x1f, 0xf0, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0xff, 0xff, 0xfc, 0xff, 0xff, 0x0c, 0x30, 0x33, 0x00, 0x0e, 0xfc, 0x80, 0x8f, 0xff, 0x80, 0xcf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf7, 0xff, 0xff, 0x33, 0xc0, 0x00, 0xf3, 0xff, 0x00, 0x00, 0x06, 0x60, 0x00, 0x06, 0x18, 0x00, 0x18, 0x98, 0x01, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x18, 0x60, 0x00, 0x00, 0xf8, 0x81, 0x1f, 0x60, 0x00, 0x00, 0x60, 0x00, 0x06, 0x00, 0x00, 0x00, 0x60, 0x00, 0x06, 0x60, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x06, 0xf0, 0x00, 0x00, 0xf8, 0x0f, 0xfc, 0xe0, 0x0f, 0xe0, 0xe0, 0x0f, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xf1, 0x03, 0x7f, 0x70, 0x00, 0x7f, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0xcc, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0xc0, 0x03, 0x00, 0xf0, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x1f, 0x00, 0x00, 0x00, 0xfc, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0x0e, 0x00, 0xc0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x0f, 0x00, 0xc0, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x30, 0x03, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x26, 0x7c, 0x02, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x01, 0x0c, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x1f, 0x00, 0xc0, 0x1f, 0x00, 0xc0, 0x1f, 0x30, 0xc0, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x60, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x06, 0x00, 0x00, 0x00, 0x60, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x0c, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x3c, 0x82, 0x27, 0x3c, 0xc2, 0x03, 0x00, 0x30, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x00, 0x00, 0x06, 0xc0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x03, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0xc0, 0x01, 0x30, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x60, 0x06, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x01, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x03, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x0e, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x03, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x80, 0x01, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0xc3, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x1f, 0xfc, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xe1, 0x1f, 0x00, 0x00, 0x00, 0xfc, 0xc7, 0x7f, 0xfc, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0x00, 0x00, 0x00, 0xf8, 0x81, 0x0f, 0x00, 0x00, 0x00, 0x60, 0x00, 0x06, 0xfc, 0x07, 0x03, 0x60, 0x00, 0x06, 0xfc, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x07, 0x7f, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xf0, 0x03, 0x3f, 0xf0, 0x03, 0x3f, 0xf0, 0x03, 0x3f, 0xf0, 0x03, 0x3f, 0xf0, 0x03, 0x3f, 0xf0, 0x03, 0x3f, 0xf0, 0x03, 0x3f, 0xf0, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x0f, 0xfc, 0xc0, 0x0f, 0xfc, 0xc0, 0x0f, 0xfc, 0xc0, 0x0f, 0xfc, 0xc0, 0x0f, 0xfc, 0xc0, 0x0f, 0xfc, 0xc0, 0x0f, 0xfc, 0xc0, 0x0f, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0xf0, 0x3f, 0x3f, 0xf0, 0x7f, 0x3f, 0xf0, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0xff, 0xff, 0x0c, 0xc0, 0xcc, 0x80, 0xcf, 0xff, 0xc0, 0xef, 0xff, 0xc0, 0xef, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x17, 0x80, 0x00, 0xf3, 0xff, 0x00, 0x00, 0x06, 0x60, 0x00, 0x06, 0x70, 0x00, 0x0e, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x0e, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x60, 0x00, 0x06, 0x00, 0x00, 0x00, 0x60, 0x00, 0x06, 0x60, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x06, 0x60, 0x00, 0x00, 0xe0, 0x0f, 0xc0, 0xc0, 0x0f, 0x80, 0xc0, 0x0f, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0x30, 0x00, 0x3f, 0x10, 0x00, 0x3f, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe8, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x30, 0x03, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x03, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x07, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x01, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x07, 0x00, 0x00, 0x00, 0x78, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x81, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; zapping-0.10cvs6/config.h.in 644 764 144 11472 10442575363 11066 /* config.h.in. Generated from configure.in by autoheader. */ /* Define if $CC supports 3DNOW extensions */ #undef CAN_COMPILE_3DNOW /* Define if $CC supports ALTIVEC extensions */ #undef CAN_COMPILE_ALTIVEC /* Define if $CC supports MMX extensions */ #undef CAN_COMPILE_MMX /* Define if $CC supports SSE extensions */ #undef CAN_COMPILE_SSE /* Define if $CC supports SSE2 extensions */ #undef CAN_COMPILE_SSE2 /* Define if $CC supports SSE3 extensions */ #undef CAN_COMPILE_SSE3 /* Define to build with Bktr/Meteor support */ #undef ENABLE_BKTR /* always defined to indicate that i18n is enabled */ #undef ENABLE_NLS /* Define to build with V4L support */ #undef ENABLE_V4L /* Package name */ #undef GETTEXT_PACKAGE /* Define if ARTS sound server is present */ #undef HAVE_ARTS /* Define to 1 if you have the `asprintf' function. */ #undef HAVE_ASPRINTF /* Define to 1 if you have the `bind_textdomain_codeset' function. */ #undef HAVE_BIND_TEXTDOMAIN_CODESET /* Define if CC has __builtin_popcount */ #undef HAVE_BUILTIN_POPCOUNT /* Define to 1 if you have the `dcgettext' function. */ #undef HAVE_DCGETTEXT /* Define if present */ #undef HAVE_DGA_EXTENSION /* Define to 1 if you have the header file. */ #undef HAVE_DLFCN_H /* Define if present */ #undef HAVE_DPMS_EXTENSION /* Define if ESD lib is present */ #undef HAVE_ESD /* Define to 1 if you have the `getopt_long' function. */ #undef HAVE_GETOPT_LONG /* Define if the GNU gettext() function is already present or preinstalled. */ #undef HAVE_GETTEXT /* Define if you have GNU C Lib 2.1+ */ #undef HAVE_GLIBC21 /* Define if $CC supports GNU C variadic macros */ #undef HAVE_GNU_C_VARIADIC_MACROS /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H /* Define if $CC supports __VA_ARGS__ */ #undef HAVE_ISO_C_VARIADIC_MACROS /* Define if your file defines LC_MESSAGES. */ #undef HAVE_LC_MESSAGES /* Define if JPEG lib is present */ #undef HAVE_LIBJPEG /* Define if PNG lib is present */ #undef HAVE_LIBPNG /* Define to 1 if you have the `pthread' library (-lpthread). */ #undef HAVE_LIBPTHREAD /* Define if RTE lib 0.5 is present */ #undef HAVE_LIBRTE /* Define if you have libunicode */ #undef HAVE_LIBUNICODE /* Define if ZVBI lib is present */ #undef HAVE_LIBZVBI /* Define if LIRC client lib is present */ #undef HAVE_LIRC /* Define to 1 if you have the header file. */ #undef HAVE_LOCALE_H /* Define if the lrint() function is available */ #undef HAVE_LRINT /* Define to 1 if you have the header file. */ #undef HAVE_MACHINE_SOUNDCARD_H /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H /* Define to compile with OSS support */ #undef HAVE_OSS /* Define to 1 if you have the `program_invocation_name' function. */ #undef HAVE_PROGRAM_INVOCATION_NAME /* Define if present */ #undef HAVE_SOLARIS_XINERAMA_EXTENSION /* Define to 1 if you have the header file. */ #undef HAVE_STDINT_H /* Define to 1 if you have the header file. */ #undef HAVE_STDLIB_H /* Define to 1 if you have the header file. */ #undef HAVE_STRINGS_H /* Define to 1 if you have the header file. */ #undef HAVE_STRING_H /* Define to 1 if you have the `strlcpy' function. */ #undef HAVE_STRLCPY /* Define to 1 if you have the `strndup' function. */ #undef HAVE_STRNDUP /* Define to 1 if you have the header file. */ #undef HAVE_SYS_SOUNDCARD_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_STAT_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TYPES_H /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H /* Define if present */ #undef HAVE_VIDMODE_EXTENSION /* Define if target is x86 (not x86_64) */ #undef HAVE_X86 /* Define if present */ #undef HAVE_XFREE86_XINERAMA_EXTENSION /* Define if present */ #undef HAVE_XINERAMA_EXTENSION /* Define if present */ #undef HAVE_XV_EXTENSION /* Name of package */ #undef PACKAGE /* Define to the address where bug reports for this package should be sent. */ #undef PACKAGE_BUGREPORT /* Define to the full name of this package. */ #undef PACKAGE_NAME /* Define to the full name and version of this package. */ #undef PACKAGE_STRING /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME /* Define to the version of this package. */ #undef PACKAGE_VERSION /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS /* Version number of package */ #undef VERSION /* Define to 1 if the X Window System is missing or not being used. */ #undef X_DISPLAY_MISSING /* Big endian */ #undef Z_BIG_ENDIAN /* Byte order */ #undef Z_BYTE_ORDER /* naidne elttiL */ #undef Z_LITTLE_ENDIAN /* Enable GNU extensions on systems that have them. */ #ifndef _GNU_SOURCE # undef _GNU_SOURCE #endif zapping-0.10cvs6/acinclude.m4 644 764 144 16151 10432663167 11232 dnl Checks for availability of Python to C interface lib and setups dnl PY_LIBS, PY_LIB_LOC, PY_EXTRA_LIBS and PY_CFLAGS adequately. dnl As a convenience, PYTHON_LIBS (covering _LIBS, _LIB_LOC and dnl _EXTRA_LIBS) is also set. dnl This code is adapted with minor changes from gnumeric's dnl configure.in AC_DEFUN([AC_PYTHON_CHECK], [ python_val="" dnl The name of the python executable python_prog="python" AC_CHECK_PROG(python_val, "$python_prog", true, false) if test ! $python_val; then AC_MSG_ERROR(Cannot find the python executable) fi PY_PREFIX=`$python_prog -c 'import sys ; print sys.prefix'` PY_EXEC_PREFIX=`$python_prog -c 'import sys ; print sys.exec_prefix'` changequote(<<, >>)dnl PY_VERSION=`$python_prog -c 'import sys ; print sys.version[0:3]'` changequote([, ])dnl if test ! -f $PY_PREFIX/include/python$PY_VERSION/Python.h; then AC_MSG_ERROR(Python.h not found in its standard location) fi PY_LIBS="python$PY_VERSION" PY_LIB_LOC="-L$PY_EXEC_PREFIX/lib/python$PY_VERSION/config" PY_CFLAGS="-I$PY_PREFIX/include/python$PY_VERSION" PY_MAKEFILE="$PY_EXEC_PREFIX/lib/python$PY_VERSION/config/Makefile" PY_LOCALMODLIBS=`sed -n -e 's/^LOCALMODLIBS=\(.*\)/\1/p' $PY_MAKEFILE` PY_BASEMODLIBS=`sed -n -e 's/^BASEMODLIBS=\(.*\)/\1/p' $PY_MAKEFILE` PY_OTHER_LIBS=`sed -n -e 's/^LIBS=\(.*\)/\1/p' $PY_MAKEFILE` PY_EXTRA_LIBS="$PY_LOCALMODLIBS $PY_BASEMODLIBS $PY_OTHER_LIBS" PYTHON_LIBS="$PY_LIB_LOC -l$PY_LIBS $PY_EXTRA_LIBS" AC_SUBST(PY_LIBS) AC_SUBST(PY_LIB_LOC) AC_SUBST(PY_CFLAGS) AC_SUBST(PY_EXTRA_LIBS) AC_SUBST(PYTHON_LIBS) ]) dnl Checks the location of the XML Catalog dnl Usage: JH_PATH_XML_CATALOG([ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) dnl Defines XMLCATALOG and XML_CATALOG_FILE substitutions. dnl Copied from gtk-doc. AC_DEFUN([JH_PATH_XML_CATALOG], [ dnl check for the presence of the XML catalog AC_ARG_WITH([xml-catalog], AC_HELP_STRING([--with-xml-catalog=CATALOG], [path to xml catalog to use]),, [with_xml_catalog=/etc/xml/catalog]) jh_found_xmlcatalog=true XML_CATALOG_FILE="$with_xml_catalog" AC_SUBST([XML_CATALOG_FILE]) AC_MSG_CHECKING([for XML catalog ($XML_CATALOG_FILE)]) if test -f "$XML_CATALOG_FILE"; then AC_MSG_RESULT([found]) else jh_found_xmlcatalog=false AC_MSG_RESULT([not found]) fi dnl check for the xmlcatalog program AC_PATH_PROG(XMLCATALOG, xmlcatalog, no) if test "x$XMLCATALOG" = xno; then jh_found_xmlcatalog=false fi if $jh_found_xmlcatalog; then ifelse([$1],,[:],[$1]) else ifelse([$2],,[AC_MSG_ERROR([could not find XML catalog])],[$2]) fi ]) dnl Checks if a particular URI appears in the XML catalog dnl Usage: JH_CHECK_XML_CATALOG(URI, [FRIENDLY-NAME], [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) dnl Copied from gtk-doc. AC_DEFUN([JH_CHECK_XML_CATALOG], [ AC_REQUIRE([JH_PATH_XML_CATALOG],[JH_PATH_XML_CATALOG(,[:])])dnl AC_MSG_CHECKING([for ifelse([$2],,[$1],[$2]) in XML catalog]) if $jh_found_xmlcatalog && \ AC_RUN_LOG([$XMLCATALOG --noout "$XML_CATALOG_FILE" "$1" >&2]); then AC_MSG_RESULT([found]) ifelse([$3],,,[$3 ])dnl else AC_MSG_RESULT([not found]) ifelse([$4],, [AC_MSG_ERROR([could not find ifelse([$2],,[$1],[$2]) in XML catalog])], [$4]) fi ]) dnl GNOME_COMPILE_WARNINGS dnl Turn on many useful compiler warnings dnl For now, only works on GCC dnl Copied from gnome-common to eliminate a Gnome CVS module dependency dnl on distros without gnome-common package. AC_DEFUN([GNOME_COMPILE_WARNINGS],[ dnl ****************************** dnl More compiler warnings dnl ****************************** if test -z "$1" ; then default_compile_warnings=yes else default_compile_warnings="$1" fi AC_ARG_ENABLE(compile-warnings, [ --enable-compile-warnings=[no/minimum/yes/maximum/error] Turn on compiler warnings.],, [enable_compile_warnings="$default_compile_warnings"]) warnCFLAGS= if test "x$GCC" != xyes; then enable_compile_warnings=no fi warning_flags= realsave_CFLAGS="$CFLAGS" case "$enable_compile_warnings" in no) warning_flags= ;; minimum) warning_flags="-Wall" ;; yes) warning_flags="-Wall -Wmissing-prototypes" ;; maximum|error) warning_flags="-Wall -Wmissing-prototypes -Wnested-externs -Wpointer-arith" CFLAGS="$warning_flags $CFLAGS" for option in -Wno-sign-compare; do SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS $option" AC_MSG_CHECKING([whether gcc understands $option]) AC_TRY_COMPILE([], [], has_option=yes, has_option=no,) CFLAGS="$SAVE_CFLAGS" AC_MSG_RESULT($has_option) if test $has_option = yes; then warning_flags="$warning_flags $option" fi unset has_option unset SAVE_CFLAGS done unset option if test "$enable_compile_warnings" = "error" ; then warning_flags="$warning_flags -Werror" fi ;; *) AC_MSG_ERROR(Unknown argument '$enable_compile_warnings' to --enable-compile-warnings) ;; esac CFLAGS="$realsave_CFLAGS" AC_MSG_CHECKING(what warning flags to pass to the C compiler) AC_MSG_RESULT($warning_flags) AC_ARG_ENABLE(iso-c, [ --enable-iso-c Try to warn if code is not ISO C ],, enable_iso_c=no) AC_MSG_CHECKING(what language compliance flags to pass to the C compiler) complCFLAGS= if test "x$enable_iso_c" != "xno"; then if test "x$GCC" = "xyes"; then case " $CFLAGS " in *[\ \ ]-ansi[\ \ ]*) ;; *) complCFLAGS="$complCFLAGS -ansi" ;; esac case " $CFLAGS " in *[\ \ ]-pedantic[\ \ ]*) ;; *) complCFLAGS="$complCFLAGS -pedantic" ;; esac fi fi AC_MSG_RESULT($complCFLAGS) WARN_CFLAGS="$warning_flags $complCFLAGS" AC_SUBST(WARN_CFLAGS) ]) dnl For C++, do basically the same thing. AC_DEFUN([GNOME_CXX_WARNINGS],[ AC_ARG_ENABLE(cxx-warnings, [ --enable-cxx-warnings=[no/minimum/yes] Turn on compiler warnings.],,enable_cxx_warnings=minimum) AC_MSG_CHECKING(what warning flags to pass to the C++ compiler) warnCXXFLAGS= if test "x$GCC" != xyes; then enable_compile_warnings=no fi if test "x$enable_cxx_warnings" != "xno"; then if test "x$GCC" = "xyes"; then case " $CXXFLAGS " in *[\ \ ]-Wall[\ \ ]*) ;; *) warnCXXFLAGS="-Wall -Wno-unused" ;; esac ## -W is not all that useful. And it cannot be controlled ## with individual -Wno-xxx flags, unlike -Wall if test "x$enable_cxx_warnings" = "xyes"; then warnCXXFLAGS="$warnCXXFLAGS -Wshadow -Woverloaded-virtual" fi fi fi AC_MSG_RESULT($warnCXXFLAGS) AC_ARG_ENABLE(iso-cxx, [ --enable-iso-cxx Try to warn if code is not ISO C++ ],, enable_iso_cxx=no) AC_MSG_CHECKING(what language compliance flags to pass to the C++ compiler) complCXXFLAGS= if test "x$enable_iso_cxx" != "xno"; then if test "x$GCC" = "xyes"; then case " $CXXFLAGS " in *[\ \ ]-ansi[\ \ ]*) ;; *) complCXXFLAGS="$complCXXFLAGS -ansi" ;; esac case " $CXXFLAGS " in *[\ \ ]-pedantic[\ \ ]*) ;; *) complCXXFLAGS="$complCXXFLAGS -pedantic" ;; esac fi fi AC_MSG_RESULT($complCXXFLAGS) WARN_CXXFLAGS="$CXXFLAGS $warnCXXFLAGS $complCXXFLAGS" AC_SUBST(WARN_CXXFLAGS) ]) zapping-0.10cvs6/AUTHORS 644 764 144 5465 10432663123 10067 Iñaki García Etxebarria -----BEGIN PGP PUBLIC KEY BLOCK----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org mQGiBD2XPugRBAD+XjKGe0Nks35boWJNc4ouoXd8kvpCAgb+9KK+yDRMtwkX3gx6 Sjwy3STJ4t5PWEvms4yulsICUnJGGDEMZVHbNoWdAKStSGy9/jKHOcH2esVP6qt5 wvd0ITeS/ZLumZTxc8XqhW4KOvUhle8KkzEubrB6MFv6xGQ/wiN+3DXP/wCgrfbr tr+lmHLsPytAHRCBKVjC+R8D/0d2enQ/Aj0Br5Bh2m+X2a8/OAzisIisKOEM+oQi GbPyIxnvLTwDT9oBEYHBrU0xuJ2UmgixsaDWH7QTGcUD495KGH8PuAvrDFgQBENV DDxVJLSSBwB+/eb4oCoIVdIgQ36Gc4yeaFKT4xbHJkV7Co1sEJ/+Qlfck8CX3QAO fRksBADim1EH9To+LGlC5Z9T9+Ic4b7pSuJWFRfsyD8HIcuKGh5lg5bxJna836hP 1KhvWAaSBedoHfSn+FY8lOfqHwxEHcF1fWGtWzgX7H2vqzEKjVW1lWW+BWCo7+j9 2lQ6HpuAL/doc69YNiMRE1YIcaijmqm89sAp4PLpchyWtcuX1rQrScOxYWtpIEdh cmPDrWEgRXR4ZWJhcnJpYSA8Z2FyZXR4ZUBnbXgubmV0PohXBBMRAgAXBQI9lz7o BQsHCgMEAxUDAgMWAgECF4AACgkQF0Bm+G3HG/2GyQCffKIZlsvQcD+ny9a5cbR5 xWzTzokAoJkGxq0R0PGgRdfA8DH28UhJ26iCuQENBD2XPusQBAC97oqKo+v6bIrl won6CtLSuCcgm6XHY/rOEpTqbwckz5MiM23kisP8uc4mq1xqA84K8JcUu60LLCuy w7EmyAg9CSjN0MdACLPeMjmSP29afgwDjSNDVpeJ9MyNFWxF67OtOu955hzxK0Kt 6bjR4CeXDAhJBtoUfDrMrmmfOylA0wADBQP+L7f96E9zfK01WceOPwsQG7i493Qu CDSniRGdMKz9mjxIHBy2l8zZ8EDwHil2AEadyLHM9iWPt1t0ijN+Gy+7wfhuTxsM 3axt7kBQvPHeuKj1hKIJt8oLLd2r7dRFV4gY13wpQSYy6j/NsWu/7/Pf5Jwn5fIo BjTw2/12aBGeDeeIRgQYEQIABgUCPZc+6wAKCRAXQGb4bccb/U6cAJ9w+wem13KY BcX0Bl723wDsv2co4gCeOsGzFWIojZ28HoeKLuhRabFkvRM= =pU7d -----END PGP PUBLIC KEY BLOCK----- Michael H. Schimek -----BEGIN PGP PUBLIC KEY BLOCK----- Version: GnuPG v1.0.7 (GNU/Linux) mQGiBD37IFERBAD0O7OMo2FYlaZLZW2/Se6h2Tnw3YiqRYrg4H/BXMB0hWjd4Zvs 6DIXXoMVfMrmP3/y7JT2F9J+V48S/9Z8JmyPCpu3+0lhDWmOdypkJ1YMxSB8ntOk jX79yZhTuPyRV0/ylJizE7sKzSDU/EdEvOnwrHD/Sq+5vOmj1OAPFZgCIwCglTcw fn30Z/kcKNWHstOf36aKG/kEAMUyuM041x/zUDWDPwDxD4XZVEcInwwuB859vqx+ 1GcQB0ySGC1bKMmjZzGnbYJXdCeUPm8AwRaO/c3AiAZrKpWeQX85toroNZdsaw9l CxawPCb1NNc9N1G4IIcjeNnNytoj402FMn/JPP/NhL7OIZ5pJyJ/LvxQ7UFozbDT sTsgA/4r9f9M0XTJl5iA3sMO3vS9Rlsl5ymV5jszYm2dRm+FHB4R1vFaHQ1h3gaH HTaSZyYm9ZumaybMeTr/QPmaF6RtutJVxrIl1ZX42HRaYIeX4CDtdWxOmGN7upon ZzQTE+UqZyTDnvF6fefJVyBJTl5CLP+WcLTQHCgKWLHjFJaWsrQzTWljaGFlbCBI LiBTY2hpbWVrIDxtc2NoaW1la0B1c2Vycy5zb3VyY2Vmb3JnZS5uZXQ+iFkEExEC ABkFAj37IFEECwcDAgMVAgMDFgIBAh4BAheAAAoJEC7lEHu9dNho1wMAnR35l+pg yBmdzYI5j9Esna+gozpkAKCCjYqjiMtb54qtNuo5jXRDb62apLkBDQQ9+yBfEAQA kea1haOdrwx8eEfSQ1gbEci2/w90UaINAC/LtQJBSyYSe6keCyXD2FpHt7Vmhl0S sOn3BoKjKZrDYLCYPAINziOIxLToXgtd3MZWgpPZTFQay7ZTJlvx3R7k1Kmb53vX pluEQchPe4xR619OumLXUrVxpbD6Q9d3ktFKyIAe83sAAwYD+wYeymullsVcpIJ9 UcKcWzQ56wSv3iwFTI9HNgzYfa5Z1Efb40Ro1za6uq/XQqxq7uCYNNI3rOoH5lLB IxIcG5Uxy2ARPUksWa956KLg07I4cm+ihkLteN7dLLtTxcVhiHJFCoprhTJT8SMM xfhbbLEwBC1+SeyyQy4gYxTzK4N0iEYEGBECAAYFAj37IF8ACgkQLuUQe7102GhA CACeMkBxKvu59js7H+T+s6Z23uEPUDoAoJCRRWwibRau+hAQz6JWOxUl9NJJ =PQod -----END PGP PUBLIC KEY BLOCK----- Local Variables: coding: utf-8 End: zapping-0.10cvs6/zapping.desktop.in 644 764 144 617 10442576032 12444 [Desktop Entry] Version=0.9 Encoding=UTF-8 _Name=Zapping TV Viewer _Comment=Lets you watch TV in a window Type=Application Exec=zapping Icon=zapping/gnome-television.png Terminal=false StartupNotify=true Categories=GNOME;Application;Multimedia;AudioVideo;Video;TV; X-GNOME-Bugzilla-Bugzilla=GNOME X-GNOME-Bugzilla-Product=Zapping X-GNOME-Bugzilla-Version=0.10cvs6 X-GNOME-Bugzilla-Component=general zapping-0.10cvs6/zapping.schemas.in 644 764 144 70214 10432663202 12451 /schemas/apps/zapping/window/view_menu /apps/zapping/window/view_menu Zapping bool 1 Show a menu bar in the main window. /schemas/apps/zapping/window/view_toolbar /apps/zapping/window/view_toolbar Zapping bool 1 Show a toolbar in the main window. /schemas/apps/zapping/window/keep_on_top /apps/zapping/window/keep_on_top Zapping bool 0 Keep the main window above other windows. /schemas/apps/zapping/plugins/teletext/default_charset /apps/zapping/plugins/teletext/default_charset Zapping string western_central_europe Default Teletext character set. Some stations fail to transmit a complete language identifier, so the Teletext viewer may not display the correct font or national characters. You can select your geographical region here as an additional hint. Valid values: western_and_central_europe, eastern_europe, western_europe_and_turkey, central_and_southeast_europe, cyrillic, greek_and_turkish, arabic, hebrew_and_arabic. /schemas/apps/zapping/plugins/teletext/level /apps/zapping/plugins/teletext/level Zapping string 2.5 Teletext implementation level. Teletext implementation level. Valid values: 1, 1.5, 2.5, 3.5. /schemas/apps/zapping/plugins/teletext/view/interp_type /apps/zapping/plugins/teletext/view/interp_type Zapping string hyper Teletext page scaling quality. Quality/speed trade-off when scaling and anti-aliasing Teletext pages. Valid values: nearest, tiles, bilinear, hyper. /schemas/apps/zapping/plugins/teletext/home_page /apps/zapping/plugins/teletext/home_page Zapping int 100 Default Teletext home page. Default Teletext home page, usually 100. Valid values range from 100 to 899. /schemas/apps/zapping/plugins/teletext/window/view_toolbar /apps/zapping/plugins/teletext/window/view_toolbar Zapping bool 1 Show a toolbar in Teletext windows. /schemas/apps/zapping/plugins/teletext/window/view_statusbar /apps/zapping/plugins/teletext/window/view_statusbar Zapping bool 1 Show a status bar in Teletext windows. /schemas/apps/zapping/blank_cursor_timeout /apps/zapping/blank_cursor_timeout Zapping int 1500 Time to wait until blanking the pointer. This is the time in milliseconds Zapping will wait between pointer movements and blanking the pointer when over the video. A value of zero disables this feature. /schemas/apps/zapping/plugins/teletext/view/rolling_header /apps/zapping/plugins/teletext/view/rolling_header Zapping bool 1 Roll Teletext page numbers. Roll the Teletext page number in the page header until the requested page has arrived. /schemas/apps/zapping/plugins/teletext/view/live_clock /apps/zapping/plugins/teletext/view/live_clock Zapping bool 1 Update the clock in the Teletext page header. /schemas/apps/zapping/plugins/teletext/cache_size /apps/zapping/plugins/teletext/cache_size Zapping int 1024000 Maximum size of the Teletext page cache in bytes. /schemas/apps/zapping/plugins/teletext/cache_networks /apps/zapping/plugins/teletext/cache_networks Zapping int 1 Maximum number of networks in the Teletext page cache. /schemas/apps/zapping/plugins/teletext/view/brightness /apps/zapping/plugins/teletext/view/brightness Zapping int 128 Text brightness, valid values range from 0 to 255. /schemas/apps/zapping/plugins/teletext/view/contrast /apps/zapping/plugins/teletext/view/contrast Zapping int 64 Text contrast, valid values range from -128 to 127. /schemas/apps/zapping/plugins/teletext/search/regexp /apps/zapping/plugins/teletext/search/regexp Zapping bool 1 Interpret the Teletext search text as regular expression. /schemas/apps/zapping/plugins/teletext/search/casefold /apps/zapping/plugins/teletext/search/casefold Zapping bool 0 The Teletext search is case insensitive. /schemas/apps/zapping/plugins/teletext/search/all_channels /apps/zapping/plugins/teletext/search/all_channels Zapping bool 0 Search all channels in the Teletext page memory. /schemas/apps/zapping/plugins/teletext/view/navigation /apps/zapping/plugins/teletext/view/navigation Zapping string flof_top2 Enable navigation elements. Enable navigation elements in the bottom row of the Teletext page. Valid values: disabled, flof_top1 (FLOF or TOP style 1), flof_top2 (TOP style 2). /schemas/apps/zapping/plugins/deinterlace/options/Deinterlace/EdgeDetect /apps/zapping/plugins/deinterlace/options/Deinterlace/EdgeDetect Zapping int 625 Deinterlace option. /schemas/apps/zapping/plugins/deinterlace/options/Deinterlace/JaggieThreshold /apps/zapping/plugins/deinterlace/options/Deinterlace/JaggieThreshold Zapping int 73 Deinterlace option. /schemas/apps/zapping/plugins/deinterlace/options/Deinterlace/TemporalTolerance /apps/zapping/plugins/deinterlace/options/Deinterlace/TemporalTolerance Zapping int 300 Deinterlace option. /schemas/apps/zapping/plugins/deinterlace/options/Deinterlace/SpatialTolerance /apps/zapping/plugins/deinterlace/options/Deinterlace/SpatialTolerance Zapping int 600 Deinterlace option. /schemas/apps/zapping/plugins/deinterlace/options/Deinterlace/SimilarityThreshold /apps/zapping/plugins/deinterlace/options/Deinterlace/SimilarityThreshold Zapping int 25 Deinterlace option. /schemas/apps/zapping/plugins/deinterlace/options/Deinterlace/TwoFrameSpatialTolerance /apps/zapping/plugins/deinterlace/options/Deinterlace/TwoFrameSpatialTolerance Zapping int 600 Deinterlace option. /schemas/apps/zapping/plugins/deinterlace/options/Deinterlace/TwoFrameTemporalTolerance /apps/zapping/plugins/deinterlace/options/Deinterlace/TwoFrameTemporalTolerance Zapping int 300 Deinterlace option. /schemas/apps/zapping/plugins/deinterlace/options/Deinterlace/BlcMinimumClip /apps/zapping/plugins/deinterlace/options/Deinterlace/BlcMinimumClip Zapping int -15 Deinterlace option. /schemas/apps/zapping/plugins/deinterlace/options/Deinterlace/BlcPixelMotionSense /apps/zapping/plugins/deinterlace/options/Deinterlace/BlcPixelMotionSense Zapping int 17 Deinterlace option. /schemas/apps/zapping/plugins/deinterlace/options/Deinterlace/BlcMotionAvgPeriod /apps/zapping/plugins/deinterlace/options/Deinterlace/BlcMotionAvgPeriod Zapping int 20 Deinterlace option. /schemas/apps/zapping/plugins/deinterlace/options/Deinterlace/BlcRecentMotionSense /apps/zapping/plugins/deinterlace/options/Deinterlace/BlcRecentMotionSense Zapping int 0 Deinterlace option. /schemas/apps/zapping/plugins/deinterlace/options/Deinterlace/BlcPixelCombSense /apps/zapping/plugins/deinterlace/options/Deinterlace/BlcPixelCombSense Zapping int 27 Deinterlace option. /schemas/apps/zapping/plugins/deinterlace/options/Deinterlace/BlcRecentCombSense /apps/zapping/plugins/deinterlace/options/Deinterlace/BlcRecentCombSense Zapping int 0 Deinterlace option. /schemas/apps/zapping/plugins/deinterlace/options/Deinterlace/BlcCombAvgPeriod /apps/zapping/plugins/deinterlace/options/Deinterlace/BlcCombAvgPeriod Zapping int 20 Deinterlace option. /schemas/apps/zapping/plugins/deinterlace/options/Deinterlace/BlcHighCombSkip /apps/zapping/plugins/deinterlace/options/Deinterlace/BlcHighCombSkip Zapping int 10 Deinterlace option. /schemas/apps/zapping/plugins/deinterlace/options/Deinterlace/BlcLowMotionSkip /apps/zapping/plugins/deinterlace/options/Deinterlace/BlcLowMotionSkip Zapping int 0 Deinterlace option. /schemas/apps/zapping/plugins/deinterlace/options/Deinterlace/BlcVerticalSmoothing /apps/zapping/plugins/deinterlace/options/Deinterlace/BlcVerticalSmoothing Zapping int 0 Deinterlace option. /schemas/apps/zapping/plugins/deinterlace/options/Deinterlace/BlcUseInterpBob /apps/zapping/plugins/deinterlace/options/Deinterlace/BlcUseInterpBob Zapping bool 0 Deinterlace option. /schemas/apps/zapping/plugins/deinterlace/options/Deinterlace/BlcBlendChroma /apps/zapping/plugins/deinterlace/options/Deinterlace/BlcBlendChroma Zapping bool 1 Deinterlace option. /schemas/apps/zapping/plugins/deinterlace/options/Deinterlace/BlcShowControls /apps/zapping/plugins/deinterlace/options/Deinterlace/BlcShowControls Zapping bool 1 Deinterlace option. /schemas/apps/zapping/plugins/deinterlace/options/Deinterlace/GreedyMaxComb /apps/zapping/plugins/deinterlace/options/Deinterlace/GreedyMaxComb Zapping int 15 Deinterlace option. /schemas/apps/zapping/plugins/deinterlace/options/Deinterlace/GreedyTwoFrameThreshold /apps/zapping/plugins/deinterlace/options/Deinterlace/GreedyTwoFrameThreshold Zapping int 4 Deinterlace option. /schemas/apps/zapping/plugins/deinterlace/options/Deinterlace/GreedyTwoFrameThreshold2 /apps/zapping/plugins/deinterlace/options/Deinterlace/GreedyTwoFrameThreshold2 Zapping int 8 Deinterlace option. /schemas/apps/zapping/plugins/deinterlace/options/Deinterlace/GreedyMaxComb /apps/zapping/plugins/deinterlace/options/Deinterlace/GreedyMaxComb Zapping int 5 Deinterlace option. /schemas/apps/zapping/plugins/deinterlace/options/Deinterlace/GreedyMotionThreshold /apps/zapping/plugins/deinterlace/options/Deinterlace/GreedyMotionThreshold Zapping int 25 Deinterlace option. /schemas/apps/zapping/plugins/deinterlace/options/Deinterlace/GreedyMotionSense /apps/zapping/plugins/deinterlace/options/Deinterlace/GreedyMotionSense Zapping int 30 Deinterlace option. /schemas/apps/zapping/plugins/deinterlace/options/Deinterlace/GreedyGoodPullDownLvl /apps/zapping/plugins/deinterlace/options/Deinterlace/GreedyGoodPullDownLvl Zapping int 83 Deinterlace option. /schemas/apps/zapping/plugins/deinterlace/options/Deinterlace/GreedyBadPullDownLvl /apps/zapping/plugins/deinterlace/options/Deinterlace/GreedyBadPullDownLvl Zapping int 88 Deinterlace option. /schemas/apps/zapping/plugins/deinterlace/options/Deinterlace/GreedyHSharpnessAmt /apps/zapping/plugins/deinterlace/options/Deinterlace/GreedyHSharpnessAmt Zapping int 50 Deinterlace option. /schemas/apps/zapping/plugins/deinterlace/options/Deinterlace/GreedyVHSharpnessAmt /apps/zapping/plugins/deinterlace/options/Deinterlace/GreedyVHSharpnessAmt Zapping int 23 Deinterlace option. /schemas/apps/zapping/plugins/deinterlace/options/Deinterlace/GreedyMedianFilterAmt /apps/zapping/plugins/deinterlace/options/Deinterlace/GreedyMedianFilterAmt Zapping int 5 Deinterlace option. /schemas/apps/zapping/plugins/deinterlace/options/Deinterlace/GreedyLowMotionPdLvl /apps/zapping/plugins/deinterlace/options/Deinterlace/GreedyLowMotionPdLvl Zapping int 0 Deinterlace option. /schemas/apps/zapping/plugins/deinterlace/options/Deinterlace/GreedyUsePulldown /apps/zapping/plugins/deinterlace/options/Deinterlace/GreedyUsePulldown Zapping bool 0 Deinterlace option. /schemas/apps/zapping/plugins/deinterlace/options/Deinterlace/GreedyUseInBetween /apps/zapping/plugins/deinterlace/options/Deinterlace/GreedyUseInBetween Zapping bool 0 Deinterlace option. /schemas/apps/zapping/plugins/deinterlace/options/Deinterlace/GreedyUseMedianFilter /apps/zapping/plugins/deinterlace/options/Deinterlace/GreedyUseMedianFilter Zapping bool 0 Deinterlace option. /schemas/apps/zapping/plugins/deinterlace/options/Deinterlace/GreedyUseVSharpness /apps/zapping/plugins/deinterlace/options/Deinterlace/GreedyUseVSharpness Zapping bool 0 Deinterlace option. /schemas/apps/zapping/plugins/deinterlace/options/Deinterlace/GreedyUseHSharpness /apps/zapping/plugins/deinterlace/options/Deinterlace/GreedyUseHSharpness Zapping bool 0 Deinterlace option. /schemas/apps/zapping/plugins/deinterlace/options/DI_OldGame/maxComb /apps/zapping/plugins/deinterlace/options/DI_OldGame/maxComb Zapping int 300 Deinterlace option. /schemas/apps/zapping/plugins/deinterlace/options/DI_OldGame/CompositeMode /apps/zapping/plugins/deinterlace/options/DI_OldGame/CompositeMode Zapping bool 0 Deinterlace option. /schemas/apps/zapping/plugins/deinterlace/options/Deinterlace/SearchEffort /apps/zapping/plugins/deinterlace/options/Deinterlace/SearchEffort Zapping int 5 Deinterlace option. /schemas/apps/zapping/plugins/deinterlace/options/Deinterlace/UseStrangeBob /apps/zapping/plugins/deinterlace/options/Deinterlace/UseStrangeBob Zapping bool 0 Deinterlace option. /schemas/apps/zapping/plugins/deinterlace/options/Deinterlace/MoComp2SE /apps/zapping/plugins/deinterlace/options/Deinterlace/MoComp2SE Zapping int 1 Deinterlace option. /schemas/apps/zapping/plugins/deinterlace/reverse_fields /apps/zapping/plugins/deinterlace/reverse_fields Zapping bool 0 Reverse the temporal field order. /schemas/apps/zapping/plugins/deinterlace/field_balance /apps/zapping/plugins/deinterlace/field_balance Zapping float 0.45 Display delay of second field (0.0 to 1.0 of one frame period). /schemas/apps/zapping/plugins/screenshot/full_size /apps/zapping/plugins/screenshot/full_size Zapping bool 0 Switch to full capture size for screenshot. /schemas/apps/zapping/plugins/deinterlace/resolution /apps/zapping/plugins/deinterlace/resolution Zapping string high Horizontal image resolution in deinterlace mode. When your CPU is too slow to use the desired deinterlace mode you can reduce the horizontal resolution. Valid values: low, medium, high. /schemas/apps/zapping/plugins/deinterlace/options/Deinterlace/GreedyTestMode /apps/zapping/plugins/deinterlace/options/Deinterlace/GreedyTestMode Zapping bool 0 Greedy (high motion) deinterlace test mode. Enables slow MMX and 3DNow! optimized functions for tests. /schemas/apps/zapping/plugins/subtitle/default_charset /apps/zapping/plugins/subtitle/default_charset Zapping string western_central_europe Default Teletext character set. Some stations fail to transmit a complete language identifier, so the Teletext viewer may not display the correct font or national characters. You can select your geographical region here as an additional hint. Valid values: western_and_central_europe, eastern_europe, western_europe_and_turkey, central_and_southeast_europe, cyrillic, greek_and_turkish, arabic, hebrew_and_arabic. /schemas/apps/zapping/plugins/subtitle/interp_type /apps/zapping/plugins/subtitle/interp_type Zapping string bilinear Caption/subtitle scaling quality. Quality/speed trade-off when scaling and anti-aliasing caption/subtitles. Valid values: nearest, tiles, bilinear, hyper. /schemas/apps/zapping/plugins/subtitle/pad /apps/zapping/plugins/subtitle/pad Zapping bool 1 Pad Closed Caption text with spaces. Adds spaces around words in Closed Caption text to improve legibility. /schemas/apps/zapping/plugins/subtitle/roll /apps/zapping/plugins/subtitle/roll Zapping bool 1 Enable smooth rolling of real time Closed Caption. /schemas/apps/zapping/plugins/subtitle/foreground /apps/zapping/plugins/subtitle/foreground Zapping string #FFFFFF Closed Caption default foreground color. Default foreground color of Closed Caption text (#RRGGBB), default #FFFFFF. /schemas/apps/zapping/plugins/subtitle/background /apps/zapping/plugins/subtitle/background Zapping string #000000 Closed Caption default background color. Default background color of Closed Caption text (#RRGGBB), default #000000. /schemas/apps/zapping/plugins/subtitle/brightness /apps/zapping/plugins/subtitle/brightness Zapping int 128 Text brightness, valid values range from 0 to 255. /schemas/apps/zapping/plugins/subtitle/contrast /apps/zapping/plugins/subtitle/contrast Zapping int 64 Text contrast, valid values range from -128 to 127. /schemas/apps/zapping/plugins/subtitle/show_dheight /apps/zapping/plugins/subtitle/show_dheight Zapping bool 1 Show double height characters in Teletext subtitles. /schemas/apps/zapping/window/chroma_key_color /apps/zapping/window/chroma_key_color Zapping string #FFCCCC Color for chroma-key overlay (#RRGGBB), default #FFCCCC. /schemas/apps/zapping/plugins/deinterlace/method /apps/zapping/plugins/deinterlace/method Zapping string disabled zapping-0.10cvs6/zapping_setup_fb/ 777 764 144 0 10443536372 12357 5zapping-0.10cvs6/zapping_setup_fb/v4l25.c 644 764 144 12645 10400112522 13377 /* * Zapping (TV viewer for the Gnome Desktop) * * Copyright (C) 2000 Iaki Garca Etxebarria * Copyright (C) 2003-2005 Michael H. Schimek * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* $Id: v4l25.c,v 1.15 2006/02/25 17:35:14 mschimek Exp $ */ #ifdef HAVE_CONFIG_H # include "config.h" #endif #include "zapping_setup_fb.h" #ifdef ENABLE_V4L #include "common/intl-priv.h" #include /* __u32 etc */ #include /* struct timeval */ #include "common/videodev25.h" /* V4L2 header file */ #include "common/_videodev25.h" #define xioctl(fd, cmd, arg) \ (IOCTL_ARG_TYPE_CHECK_ ## cmd (arg), \ device_ioctl (device_log_fp, fprint_v4l25_ioctl_arg, fd, cmd, arg)) /* Attn: device_name may be NULL, device_fd may be -1. */ zsfb_status setup_v4l25 (const char * device_name, int device_fd, const tv_overlay_buffer *buffer) { zsfb_status status; int saved_errno; int fd; struct v4l2_capability cap; struct v4l2_framebuffer fb; const tv_pixel_format *pf; status = device_open_safer (&fd, device_name, device_fd, /* major */ 81, O_RDWR); if (ZSFB_SUCCESS != status) return status; message (/* verbosity */ 2, "Querying device capabilities.\n"); if (-1 == xioctl (fd, VIDIOC_QUERYCAP, &cap)) { saved_errno = errno; if (EINVAL == saved_errno) { message (/* verbosity */ 2, "Not a V4L2 2.5 device.\n"); status = ZSFB_UNKNOWN_DEVICE; } else { errmsg_ioctl ("VIDIOC_QUERYCAP", saved_errno); status = ZSFB_IOCTL_ERROR; } goto failure; } message (/* verbosity */ 1, "Using V4L2 2.5 interface.\n"); message (/* verbosity */ 2, "Checking overlay capability.\n"); if (!(cap.capabilities & V4L2_CAP_VIDEO_OVERLAY)) { errmsg (_("The device does not support video overlay.")); saved_errno = EINVAL; status = ZSFB_OVERLAY_IMPOSSIBLE; goto failure; } message (/* verbosity */ 2, "Getting current frame buffer parameters.\n"); if (-1 == xioctl (fd, VIDIOC_G_FBUF, &fb)) { saved_errno = errno; errmsg_ioctl ("VIDIOC_G_FBUF", saved_errno); status = ZSFB_IOCTL_ERROR; goto failure; } if (fb.capability & V4L2_FBUF_CAP_EXTERNOVERLAY) { message (/* verbosity */ 2, "Genlock device, no setup necessary.\n"); goto success; } memset (&fb, 0, sizeof (fb)); fb.base = (void *) buffer->base; fb.fmt.width = buffer->format.width; fb.fmt.height = buffer->format.height; pf = buffer->format.pixel_format; switch (Z_BYTE_ORDER) { case Z_LITTLE_ENDIAN: switch (pf->color_depth) { case 8: fb.fmt.pixelformat = V4L2_PIX_FMT_HI240; /* XXX bttv only */ break; /* Note defines and spec (0.4) are wrong: r <-> b, RGB32 == A,R,G,B in bttv 0.9 unlike description in spec. */ case 15: fb.fmt.pixelformat = V4L2_PIX_FMT_RGB555; break; case 16: fb.fmt.pixelformat = V4L2_PIX_FMT_RGB565; break; case 24: case 32: if (24 == pf->bits_per_pixel) fb.fmt.pixelformat = V4L2_PIX_FMT_BGR24; else fb.fmt.pixelformat = V4L2_PIX_FMT_BGR32; break; } break; case Z_BIG_ENDIAN: switch (pf->color_depth) { case 8: fb.fmt.pixelformat = V4L2_PIX_FMT_HI240; break; case 15: fb.fmt.pixelformat = V4L2_PIX_FMT_RGB555X; break; case 16: fb.fmt.pixelformat = V4L2_PIX_FMT_RGB565X; break; case 24: case 32: if (24 == pf->bits_per_pixel) fb.fmt.pixelformat = V4L2_PIX_FMT_RGB24; else fb.fmt.pixelformat = V4L2_PIX_FMT_RGB32; break; } break; } fb.fmt.bytesperline = buffer->format.bytes_per_line[0]; fb.fmt.sizeimage = buffer->format.height * fb.fmt.bytesperline; message (/* verbosity */ 2, "Setting new frame buffer parameters.\n"); /* This ioctl is privileged because it sets up DMA to a random (video memory) address. */ { int result; status = restore_root_privileges (); if (ZSFB_SUCCESS != status) { saved_errno = errno; goto failure; } result = ioctl (fd, VIDIOC_S_FBUF, &fb); saved_errno = errno; /* Aborts on error. */ drop_root_privileges (); if (-1 == result) { errmsg_ioctl ("VIDIOC_S_FBUF", saved_errno); status = ZSFB_IOCTL_ERROR; if (EPERM == saved_errno) { status = ZSFB_NO_PERMISSION; if (ROOT_UID != euid) privilege_hint (); } goto failure; } } success: device_close (device_log_fp, fd); return ZSFB_SUCCESS; failure: device_close (device_log_fp, fd); errno = saved_errno; return status; } #else /* !ENABLE_V4L */ zsfb_status setup_v4l25 (const char * device_name, const tv_overlay_buffer *buffer) { message (/* verbosity */ 2, "No V4L2 2.5 support compiled in.\n"); errno = EINVAL; return ZSFB_UNKNOWN_DEVICE; } #endif /* !ENABLE_V4L */ zapping-0.10cvs6/zapping_setup_fb/v4l.c 644 764 144 10341 10400112476 13227 /* * Zapping (TV viewer for the Gnome Desktop) * * Copyright (C) 2000 Iaki Garca Etxebarria * Copyright (C) 2003, 2005 Michael H. Schimek * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* $Id: v4l.c,v 1.13 2006/02/25 17:34:54 mschimek Exp $ */ #ifdef HAVE_CONFIG_H # include "config.h" #endif #include "zapping_setup_fb.h" #ifdef ENABLE_V4L #include "common/intl-priv.h" #include "common/videodev.h" #include "common/_videodev.h" #define xioctl(fd, cmd, arg) \ (IOCTL_ARG_TYPE_CHECK_ ## cmd (arg), \ device_ioctl (device_log_fp, fprint_v4l_ioctl_arg, fd, cmd, arg)) /* Attn: device_name may be NULL, device_fd may be -1. */ zsfb_status setup_v4l (const char * device_name, int device_fd, const tv_overlay_buffer *buffer) { zsfb_status status; int saved_errno; int fd; struct video_capability caps; struct video_buffer fb; const tv_pixel_format *pf; status = device_open_safer (&fd, device_name, device_fd, /* major */ 81, O_RDWR); if (ZSFB_SUCCESS != status) return status; message (/* verbosity */ 2, "Querying device capabilities.\n"); if (-1 == xioctl (fd, VIDIOCGCAP, &caps)) { saved_errno = errno; if (EINVAL == saved_errno) { message (/* verbosity */ 2, "Not a V4L device.\n"); status = ZSFB_UNKNOWN_DEVICE; } else { errmsg_ioctl ("VIDIOCGCAP", saved_errno); status = ZSFB_IOCTL_ERROR; } goto failure; } message (/* verbosity */ 1, "Using V4L interface.\n"); message (/* verbosity */ 2, "Checking overlay capability.\n"); if (!(caps.type & VID_TYPE_OVERLAY)) { errmsg (_("The device does not support video overlay.")); saved_errno = EINVAL; status = ZSFB_OVERLAY_IMPOSSIBLE; goto failure; } message (/* verbosity */ 2, "Getting current frame buffer parameters.\n"); if (-1 == xioctl (fd, VIDIOCGFBUF, &fb)) { saved_errno = errno; errmsg_ioctl ("VIDIOCGFBUF", saved_errno); status = ZSFB_IOCTL_ERROR; goto failure; } fb.base = (void *) buffer->base; fb.width = buffer->format.width; fb.height = buffer->format.height; pf = buffer->format.pixel_format; if (32 == pf->bits_per_pixel) fb.depth = 32; /* depth 24 bpp 32 */ else fb.depth = pf->color_depth; /* 15, 16, 24 */ fb.bytesperline = buffer->format.bytes_per_line[0]; message (/* verbosity */ 2, "Setting new frame buffer parameters.\n"); message (/* verbosity */ 3, "base=%p height=%u width=%u depth=%u bytesperline=%u\n", fb.base, fb.height, fb.width, fb.depth, fb.bytesperline); /* This ioctl is privileged because it sets up DMA to a random (video memory) address. */ { int result; status = restore_root_privileges (); if (ZSFB_SUCCESS != status) { saved_errno = errno; goto failure; } result = ioctl (fd, VIDIOCSFBUF, &fb); saved_errno = errno; /* Aborts on error. */ drop_root_privileges (); if (-1 == result) { errmsg_ioctl ("VIDIOCSFBUF", saved_errno); status = ZSFB_IOCTL_ERROR; if (EPERM == saved_errno) { status = ZSFB_NO_PERMISSION; if (ROOT_UID != euid) privilege_hint (); } goto failure; } } device_close (device_log_fp, fd); return ZSFB_SUCCESS; failure: device_close (device_log_fp, fd); errno = saved_errno; return status; } #else /* !ENABLE_V4L */ zsfb_status setup_v4l (const char * device_name, const tv_overlay_buffer *buffer) { message (/* verbosity */ 2, "No V4L support compiled in.\n"); errno = EINVAL; return ZSFB_UNKNOWN_DEVICE; } #endif /* !ENABLE_V4L */ zapping-0.10cvs6/zapping_setup_fb/zapping_setup_fb.pam 644 764 144 374 7665555605 16371 #%PAM-1.0 auth sufficient pam_rootok.so auth required pam_console.so #auth required pam_stack.so service=system-auth account required pam_permit.so session required pam_permit.so session optional pam_xauth.so zapping-0.10cvs6/zapping_setup_fb/zapping_setup_fb.c 644 764 144 34105 10400112466 16064 /* * Zapping (TV viewer for the Gnome Desktop) * * Copyright (C) 2000 Iñaki García Etxebarria * Copyright (C) 2003 Michael H. Schimek * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* This is an auxiliary suid program to prepare a kernel video capture device for DMA overlay onto video memory. When you find any security flaws here, please report at zapping-misc@lists.sourceforge.net. */ #ifdef HAVE_CONFIG_H # include "config.h" #endif #include #include #include #include #ifdef HAVE_GETOPT_LONG # include #endif #include #include #include "common/intl-priv.h" #include "zapping_setup_fb.h" static const char * zsfb_version = "zapping_setup_fb 0.13"; static const char * default_device_name = "/dev/video0"; #ifndef HAVE_PROGRAM_INVOCATION_NAME char * program_invocation_name; char * program_invocation_short_name; #endif unsigned int uid; unsigned int euid; #define VERBOSITY_CHILD_PROCESS -1 #define VERBOSITY_MIN 0 #define VERBOSITY_MAX 3 int verbosity = 1; /* Legacy verbosity value, used in libtv/screen.c. */ int debug_msg = 0; /* Log V4L/V4L2 driver responses. */ FILE * device_log_fp = NULL; void message (int level, const char * template, ...) { if (VERBOSITY_CHILD_PROCESS == verbosity) return; assert (level >= VERBOSITY_MIN && level <= VERBOSITY_MAX); if (verbosity >= level) { va_list ap; va_start (ap, template); vfprintf (stderr, template, ap); va_end (ap); } } void error_message (const char * file, unsigned int line, const char * template, ...) { va_list ap; va_start (ap, template); if (VERBOSITY_CHILD_PROCESS == verbosity) { vfprintf (stderr, template, ap); } else if (verbosity > 0) { fprintf (stderr, "%s:%s:%u: ", program_invocation_short_name, file, line); vfprintf (stderr, template, ap); fputc ('\n', stderr); } va_end (ap); } #include "common/device.c" /* generic device access routines */ #ifndef major # define major(dev) ((unsigned int)(((dev) >> 8) & 0xff)) #endif zsfb_status device_open_safer (int * fd, const char * device_name, int device_fd, unsigned int major_number, unsigned int flags) { struct stat st; assert (NULL != fd); if (NULL != device_name) { if (strchr (device_name, '.')) { errmsg (_("Device name %s is unsafe, contains dots."), device_name); errno = EINVAL; return ZSFB_BAD_DEVICE_NAME; } if (strncmp (device_name, "/dev/", 5)) { errmsg (_("Device name %s is unsafe, " "does not begin with /dev/."), device_name); errno = EINVAL; return ZSFB_BAD_DEVICE_NAME; } message (/* verbosity */ 1, "Opening device %s.\n", device_name); flags |= O_NOCTTY; flags &= ~(O_CREAT | O_EXCL | O_TRUNC); *fd = device_open (device_log_fp, device_name, flags, 0600); if (-1 == *fd) { int saved_errno = errno; /* TRANSLATORS: File name, error message. */ errmsg (_("Cannot open device %s. %s."), device_name, strerror (saved_errno)); errno = saved_errno; return ZSFB_OPEN_ERROR; } if (-1 == fstat (*fd, &st)) { int saved_errno = errno; device_close (device_log_fp, *fd); *fd = -1; /* TRANSLATORS: File name, error message. */ errmsg (_("Cannot identify %s. %s."), device_name, strerror (saved_errno)); errno = saved_errno; return ZSFB_UNKNOWN_DEVICE; } if (!S_ISCHR (st.st_mode)) { device_close (device_log_fp, *fd); *fd = -1; errmsg (_("%s is not a device."), device_name); errno = ENODEV; return ZSFB_UNKNOWN_DEVICE; } if (0 != major_number) { if (major_number != major (st.st_rdev)) { device_close (device_log_fp, *fd); *fd = -1; errmsg (_("%s is not a video device."), device_name); errno = ENODEV; return ZSFB_UNKNOWN_DEVICE; } } } else if (-1 != device_fd) { if (-1 == fstat (device_fd, &st)) { int saved_errno = errno; errmsg (_("Cannot identify file descriptor %d. %s."), device_fd, strerror (saved_errno)); errno = saved_errno; if (EBADF == saved_errno) return ZSFB_BAD_DEVICE_FD; else return ZSFB_UNKNOWN_DEVICE; } if (!S_ISCHR (st.st_mode)) { errmsg (_("File descriptor %d is not a device."), device_fd); errno = ENODEV; return ZSFB_UNKNOWN_DEVICE; } if (0 != major_number) { if (major_number != major (st.st_rdev)) { errmsg (_("File descriptor %d is not a video device."), device_fd); errno = ENODEV; return ZSFB_UNKNOWN_DEVICE; } } message (/* verbosity */ 1, "Using device by file descriptor %d.\n", device_fd); *fd = device_fd; } else { errmsg (_("Internal error at %s:%u."), __FILE__, __LINE__); errno = 0; return ZSFB_BUG; } return ZSFB_SUCCESS; } void drop_root_privileges (void) { if (ROOT_UID == euid && ROOT_UID != uid) { message (/* verbosity */ 2, "Dropping root privileges\n"); if (-1 == seteuid (uid)) { errmsg (_("Cannot drop root privileges despite " "running with UID %d, EUID %d."), uid, euid); exit (ZSFB_BUG); } } else if (ROOT_UID == uid) { if (0) /* cannot distinguish between root and consolehelper */ message (/* verbosity */ 1, "You should not run %s as root,\n" "better use consolehelper, sudo, su or set the " "SUID flag with chmod +s.\n", program_invocation_name); } } zsfb_status restore_root_privileges (void) { if (ROOT_UID == euid && ROOT_UID != uid) { message (/* verbosity */ 2, "Restoring root privileges\n"); if (-1 == seteuid (euid)) { int saved_errno = errno; errmsg (_("Cannot restore root privileges despite " "running with UID %d, EUID %d."), uid, euid); errno = saved_errno; return ZSFB_NO_PERMISSION; } } return ZSFB_SUCCESS; } static const char short_options [] = "b:cd:f:hqvD:S:V"; #ifdef HAVE_GETOPT_LONG static const struct option long_options [] = { { "bpp", required_argument, 0, 'b' }, { "child", no_argument, 0, 'c' }, { "device", required_argument, 0, 'd' }, { "fd", required_argument, 0, 'f' }, { "help", no_argument, 0, 'h' }, { "quiet", no_argument, 0, 'q' }, { "usage", no_argument, 0, 'h' }, { "verbose", no_argument, 0, 'v' }, { "display", required_argument, 0, 'D' }, { "screen", required_argument, 0, 'S' }, { "version", no_argument, 0, 'V' }, { 0, 0, 0, 0 } }; #else # define getopt_long(ac, av, s, l, i) getopt (ac, av, s) #endif static void usage (FILE * fp) { if (VERBOSITY_CHILD_PROCESS == verbosity) return; fprintf (fp, "Usage: %s [OPTIONS]\n" "Available options:\n" " -b, --bpp x Color depth hint, bits per pixel on " " display in question (24 or 32)\n" " -c, --child Return localized error messages in UTF-8\n" " encoding to parent process on stderr\n" " -d, --device name The video device to open, default %s\n" " -f, --fd number Access video device by file descriptor\n" " -h, --help, --usage Print this message\n" " -q, --quiet Decrement verbosity level\n" " -v, --verbose Increment verbosity level\n" " -D, --display name The X display to use\n" " -S, --screen number The X screen to use (Xinerama)\n" " -V, --version Print the program version and exit\n" "", program_invocation_name, default_device_name); } int main (int argc, char ** argv) { zsfb_status status; const char *device_name; int device_fd; const char *display_name; int screen_number; int bpp_arg; tv_screen *screens; tv_screen *xs; status = ZSFB_BUG; #ifndef HAVE_PROGRAM_INVOCATION_NAME program_invocation_name = argv[0]; program_invocation_short_name = argv[0]; #endif /* Make sure fds 0 1 2 are open, otherwise we might end up sending error messages to the device file. */ { int flags; int fd; for (fd = 0; fd <= 2; ++fd) if (-1 == fcntl (fd, F_GETFL, &flags)) { errmsg (_("No standard input, output or error file.")); exit (ZSFB_BUG); } } /* Drop root privileges until we need them. */ uid = getuid (); euid = geteuid (); drop_root_privileges (); /* Parse arguments. */ if (0) { unsigned int i; for (i = 0; i < (unsigned int) argc; ++i) fprintf (stderr, "argv[%u]='%s'\n", i, argv[i]); } device_name = default_device_name; device_fd = -1; display_name = getenv ("DISPLAY"); screen_number = -1; /* use default screen of display */ bpp_arg = -1; /* unknown bpp */ assert (verbosity >= VERBOSITY_MIN && verbosity <= VERBOSITY_MAX); for (;;) { int c; c = getopt_long (argc, argv, short_options, long_options, NULL); if (-1 == c) break; switch (c) { case 'b': bpp_arg = strtol (optarg, NULL, 0); switch (bpp_arg) { case 24: case 32: break; default: errmsg (_("Invalid bpp argument %d. Expected 24 or 32."), bpp_arg); status = ZSFB_INVALID_BPP; goto failure; } break; case 'c': #ifdef ENABLE_NLS bindtextdomain (GETTEXT_PACKAGE, PACKAGE_LOCALE_DIR); bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); textdomain (GETTEXT_PACKAGE); #endif verbosity = VERBOSITY_CHILD_PROCESS; break; case 'd': device_name = strdup (optarg); device_fd = -1; break; case 'D': display_name = strdup (optarg); break; case 'f': device_name = NULL; device_fd = strtol (optarg, NULL, 0); if (device_fd <= 2) { errmsg (_("Invalid device file descriptor %d."), device_fd); exit (ZSFB_BAD_DEVICE_FD); } break; case 'h': usage (stdout); exit (ZSFB_SUCCESS); case 'q': if (verbosity > VERBOSITY_MIN) --verbosity; break; case 'S': screen_number = strtol (optarg, NULL, 0); break; case 'v': if (verbosity < VERBOSITY_MAX) ++verbosity; break; case 'V': printf ("%s\n", zsfb_version); exit (ZSFB_SUCCESS); default: /* getopt(_long) prints option name when unknown or arg missing. */ usage (stderr); goto failure; } } if (verbosity >= 2) debug_msg = 1; if (verbosity >= 3) device_log_fp = stderr; message (/* verbosity */ 1, "(C) 2000-2005 Iñaki G. Etxebarria, Michael H. Schimek.\n" "This program is freely redistributable under the terms\n" "of the GNU General Public License.\n\n"); message (/* verbosity */ 1, "Using video device '%s', display '%s', screen %d.\n", device_name, display_name, screen_number); message (/* verbosity */ 1, "Querying frame buffer parameters from X server.\n"); screens = tv_screen_list_new (display_name, bpp_arg); if (NULL == screens) { errmsg (_("No screens found.")); status = ZSFB_NO_SCREEN; goto failure; } for (xs = screens; xs; xs = xs->next) { message (/* verbosity */ 2, "Screen %d:\n" " position %u, %u - %u, %u\n" " frame buffer address 0x%lx\n" " frame buffer size %ux%u pixels, 0x%lx bytes\n" " bytes per line %lu bytes\n" " pixfmt %s\n", xs->screen_number, xs->x, xs->y, xs->x + xs->width, xs->y + xs->height, xs->target.base, xs->target.format.width, xs->target.format.height, xs->target.format.size, xs->target.format.bytes_per_line[0], tv_pixfmt_name (xs->target.format.pixel_format->pixfmt)); } if (-1 == screen_number) { Display *display; display = XOpenDisplay (display_name); if (NULL == display) { errmsg (_("Cannot open display %s."), display_name); status = ZSFB_NO_SCREEN; goto failure; } screen_number = XDefaultScreen (display); XCloseDisplay (display); } for (xs = screens; xs; xs = xs->next) if (xs->screen_number == screen_number) break; if (NULL == xs) { errmsg (_("Screen %d not found."), screen_number); status = ZSFB_NO_SCREEN; goto failure; } if (!tv_screen_is_target (xs)) { errmsg (_("DMA is not possible on screen %d."), xs->screen_number); status = ZSFB_OVERLAY_IMPOSSIBLE; goto failure; } status = setup_v4l25 (device_name, device_fd, &xs->target); if (ZSFB_UNKNOWN_DEVICE == status) /* not Linux 2.6 V4L2 */ { status = setup_v4l2 (device_name, device_fd, &xs->target); if (ZSFB_UNKNOWN_DEVICE == status) /* not V4L2 0.20 */ { status = setup_v4l (device_name, device_fd, &xs->target); if (ZSFB_UNKNOWN_DEVICE == status) /* not V4L */ { if (NULL != device_name) errmsg (_("%s is not a V4L or V4L2 device."), device_name); else if (-1 != device_fd) errmsg (_("File descriptor %d is not a V4L or V4L2 device."), device_fd); else errmsg (_("Cannot identify the video capture device.")); goto failure; } } } if (ZSFB_SUCCESS != status) goto failure; message (/* verbosity */ 1, "Setup completed.\n"); exit (ZSFB_SUCCESS); failure: message (/* verbosity */ 1, "Setup failed. Try %s -v or -vv for more details.\n", program_invocation_name); exit (status); return EXIT_FAILURE; } /* Local Variables: coding: utf-8 End: */ zapping-0.10cvs6/zapping_setup_fb/zapping_setup_fb.h 644 764 144 6701 10400112454 16047 /* * Zapping (TV viewer for the Gnome Desktop) * * Copyright (C) 2000 Iaki Garca Etxebarria * Copyright (C) 2003-2004 Michael H. Schimek * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* $Id: zapping_setup_fb.h,v 1.10 2006/02/25 17:34:36 mschimek Exp $ */ #ifndef ZAPPING_SETUP_FB_H #define ZAPPING_SETUP_FB_H #include #include #include #include "libtv/screen.h" /* Xinerama & DGA interface */ #include "common/device.h" /* generic device access routines */ #define ROOT_UID 0 /* Keep this in sync with tveng.c. */ typedef enum { ZSFB_SUCCESS = EXIT_SUCCESS, ZSFB_BUG = 60, ZSFB_NO_PERMISSION, ZSFB_NO_SCREEN, ZSFB_INVALID_BPP, ZSFB_BAD_DEVICE_NAME, ZSFB_BAD_DEVICE_FD, ZSFB_UNKNOWN_DEVICE, ZSFB_OPEN_ERROR, ZSFB_IOCTL_ERROR, ZSFB_OVERLAY_IMPOSSIBLE, } zsfb_status; #ifdef HAVE_GNU_C_VARIADIC_MACROS # define errmsg(template, args...) \ error_message (__FILE__, __LINE__, template , ##args) # define errmsg_ioctl(name, errno) \ error_message (__FILE__, __LINE__, _("Ioctl %s failed: %s."), \ name, strerror (errno)) #else # error Compiler does not support GNU C variadic macros #endif #define privilege_hint() \ message (/* verbosity */ 1, \ "%s must run with root privileges.\n" \ "Try consolehelper, sudo, su or set the SUID flag with " \ "chmod +s.\n", program_invocation_name); #if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || __GNUC__ >= 4 # define _zsfb_nonnull(args...) nonnull(args) #else # define _zsfb_nonnull(args...) #endif extern char * program_invocation_name; extern char * program_invocation_short_name; extern int verbosity; extern unsigned int uid; extern unsigned int euid; extern FILE * device_log_fp; extern void drop_root_privileges (void); extern zsfb_status restore_root_privileges (void); extern void message (int level, const char * template, ...) __attribute__ ((format (printf, 2, 3))); extern void error_message (const char * file, unsigned int line, const char * template, ...) __attribute__ ((_zsfb_nonnull (1), format (printf, 3, 4))); extern zsfb_status device_open_safer (int * fd, const char * device_name, int device_fd, unsigned int major_number, unsigned int flags) __attribute__ ((_zsfb_nonnull (1))); extern zsfb_status setup_v4l (const char * device_name, int device_fd, const tv_overlay_buffer *buffer) __attribute__ ((_zsfb_nonnull (3))); extern zsfb_status setup_v4l2 (const char * device_name, int device_fd, const tv_overlay_buffer *buffer) __attribute__ ((_zsfb_nonnull (3))); extern zsfb_status setup_v4l25 (const char * device_name, int device_fd, const tv_overlay_buffer *buffer) __attribute__ ((_zsfb_nonnull (3))); #endif /* ZAPPING_SETUP_FB_H */ zapping-0.10cvs6/zapping_setup_fb/Makefile.am 644 764 144 3667 10402712515 14411 ## Process this file with automake to produce Makefile.in ## Note $(DESTDIR)$(sbindir) also encoded in src/Makefile.am bin_PROGRAMS = zapping_setup_fb EXTRA_DIST = \ zapping_setup_fb.pam AM_CFLAGS = @DEFAULT_CFLAGS@ INCLUDES = \ -I$(top_srcdir) \ @COMMON_INCLUDES@ zapping_setup_fb_SOURCES = \ zapping_setup_fb.c zapping_setup_fb.h \ v4l.c \ v4l2.c \ v4l25.c zapping_setup_fb_LDADD = \ $(top_builddir)/libtv/libtv.la \ @X_LIBS@ \ -lX11 \ -lXext \ $(X_XINERAMA_LIBS) \ $(X_XF86DGA_LIBS) \ $(X_EXTRA_LIBS) zsfb.capps: echo USER=root >$@ echo SESSION=TRUE >>$@ echo PROGRAM=$(sbindir)/zapping_setup_fb >>$@ DISTCLEANFILES = zsfb.capps install-binPROGRAMS: $(bin_PROGRAMS) zsfb.capps if SUID_ZSFB $(mkinstalldirs) $(DESTDIR)$(bindir) $(mkinstalldirs) $(DESTDIR)$(sbindir) $(INSTALL) -m4755 -o $(ZSFB_OWNER) -g $(ZSFB_GROUP) \ zapping_setup_fb $(DESTDIR)$(sbindir) ln -sf $(DESTDIR)$(sbindir)/zapping_setup_fb \ $(DESTDIR)$(bindir)/zapping_setup_fb else $(mkinstalldirs) $(DESTDIR)$(bindir) $(mkinstalldirs) $(DESTDIR)$(sbindir) $(mkinstalldirs) $(DESTDIR)$(sysconfdir)/pam.d $(mkinstalldirs) $(DESTDIR)$(sysconfdir)/security/console.apps $(INSTALL) zapping_setup_fb $(DESTDIR)$(sbindir) ln -sf $(CONSOLEHELPER_LOCATION) $(DESTDIR)$(bindir)/zapping_setup_fb if ! test -e $(DESTDIR)$(sysconfdir)/pam.d/zapping_setup_fb ; then \ $(INSTALL_DATA) $(top_srcdir)/zapping_setup_fb/zapping_setup_fb.pam \ $(DESTDIR)$(sysconfdir)/pam.d/zapping_setup_fb; \ fi cp zsfb.capps \ $(DESTDIR)$(sysconfdir)/security/console.apps/zapping_setup_fb endif uninstall-binPROGRAMS: if SUID_ZSFB rm -f $(DESTDIR)$(bindir)/zapping_setup_fb else rm -f $(DESTDIR)$(sbindir)/zapping_setup_fb rm -f $(DESTDIR)$(bindir)/zapping_setup_fb rm -f $(DESTDIR)$(sysconfdir)/security/console.apps/zapping_setup_fb ## Should we really remove this file? The administrator might have ## changed it... rm -f $(DESTDIR)$(sysconfdir)/pam.d/zapping_setup_fb endif zapping-0.10cvs6/zapping_setup_fb/Makefile.in 644 764 144 47642 10442575635 14461 # Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = .. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = zapping_setup_fb$(EXEEXT) subdir = zapping_setup_fb DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = am__installdirs = "$(DESTDIR)$(bindir)" binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) PROGRAMS = $(bin_PROGRAMS) am_zapping_setup_fb_OBJECTS = zapping_setup_fb.$(OBJEXT) v4l.$(OBJEXT) \ v4l2.$(OBJEXT) v4l25.$(OBJEXT) zapping_setup_fb_OBJECTS = $(am_zapping_setup_fb_OBJECTS) am__DEPENDENCIES_1 = zapping_setup_fb_DEPENDENCIES = $(top_builddir)/libtv/libtv.la \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ SOURCES = $(zapping_setup_fb_SOURCES) DIST_SOURCES = $(zapping_setup_fb_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ ARTS_CFLAGS = @ARTS_CFLAGS@ ARTS_LIBS = @ARTS_LIBS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BUILD_DEINTERLACE_PLUGIN_FALSE = @BUILD_DEINTERLACE_PLUGIN_FALSE@ BUILD_DEINTERLACE_PLUGIN_TRUE = @BUILD_DEINTERLACE_PLUGIN_TRUE@ BUILD_MAN_FALSE = @BUILD_MAN_FALSE@ BUILD_MAN_TRUE = @BUILD_MAN_TRUE@ CAN_COMPILE_3DNOW_FALSE = @CAN_COMPILE_3DNOW_FALSE@ CAN_COMPILE_3DNOW_TRUE = @CAN_COMPILE_3DNOW_TRUE@ CAN_COMPILE_ALTIVEC_FALSE = @CAN_COMPILE_ALTIVEC_FALSE@ CAN_COMPILE_ALTIVEC_TRUE = @CAN_COMPILE_ALTIVEC_TRUE@ CAN_COMPILE_MMX_FALSE = @CAN_COMPILE_MMX_FALSE@ CAN_COMPILE_MMX_TRUE = @CAN_COMPILE_MMX_TRUE@ CAN_COMPILE_SSE2_FALSE = @CAN_COMPILE_SSE2_FALSE@ CAN_COMPILE_SSE2_TRUE = @CAN_COMPILE_SSE2_TRUE@ CAN_COMPILE_SSE3_FALSE = @CAN_COMPILE_SSE3_FALSE@ CAN_COMPILE_SSE3_TRUE = @CAN_COMPILE_SSE3_TRUE@ CAN_COMPILE_SSE_FALSE = @CAN_COMPILE_SSE_FALSE@ CAN_COMPILE_SSE_TRUE = @CAN_COMPILE_SSE_TRUE@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCAS = @CCAS@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ COMMON_INCLUDES = @COMMON_INCLUDES@ CONSOLEHELPER_LOCATION = @CONSOLEHELPER_LOCATION@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFAULT_CFLAGS = @DEFAULT_CFLAGS@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ESD_LIBS = @ESD_LIBS@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ GCONF_SCHEMAS_INSTALL_FALSE = @GCONF_SCHEMAS_INSTALL_FALSE@ GCONF_SCHEMAS_INSTALL_TRUE = @GCONF_SCHEMAS_INSTALL_TRUE@ GCONF_SCHEMA_CONFIG_SOURCE = @GCONF_SCHEMA_CONFIG_SOURCE@ GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@ GDK_PIXBUF_CSOURCE = @GDK_PIXBUF_CSOURCE@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ HAVE_GCC_LIMITS_FALSE = @HAVE_GCC_LIMITS_FALSE@ HAVE_GCC_LIMITS_TRUE = @HAVE_GCC_LIMITS_TRUE@ HAVE_LIBZVBI_FALSE = @HAVE_LIBZVBI_FALSE@ HAVE_LIBZVBI_TRUE = @HAVE_LIBZVBI_TRUE@ HAVE_X86_FALSE = @HAVE_X86_FALSE@ HAVE_X86_TRUE = @HAVE_X86_TRUE@ HAVE_XMU_FALSE = @HAVE_XMU_FALSE@ HAVE_XMU_TRUE = @HAVE_XMU_TRUE@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ INTLTOOL_CAVES_RULE = @INTLTOOL_CAVES_RULE@ INTLTOOL_DESKTOP_RULE = @INTLTOOL_DESKTOP_RULE@ INTLTOOL_DIRECTORY_RULE = @INTLTOOL_DIRECTORY_RULE@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ INTLTOOL_ICONV = @INTLTOOL_ICONV@ INTLTOOL_KBD_RULE = @INTLTOOL_KBD_RULE@ INTLTOOL_KEYS_RULE = @INTLTOOL_KEYS_RULE@ INTLTOOL_MERGE = @INTLTOOL_MERGE@ INTLTOOL_MSGFMT = @INTLTOOL_MSGFMT@ INTLTOOL_MSGMERGE = @INTLTOOL_MSGMERGE@ INTLTOOL_OAF_RULE = @INTLTOOL_OAF_RULE@ INTLTOOL_PERL = @INTLTOOL_PERL@ INTLTOOL_PONG_RULE = @INTLTOOL_PONG_RULE@ INTLTOOL_PROP_RULE = @INTLTOOL_PROP_RULE@ INTLTOOL_SCHEMAS_RULE = @INTLTOOL_SCHEMAS_RULE@ INTLTOOL_SERVER_RULE = @INTLTOOL_SERVER_RULE@ INTLTOOL_SHEET_RULE = @INTLTOOL_SHEET_RULE@ INTLTOOL_SOUNDLIST_RULE = @INTLTOOL_SOUNDLIST_RULE@ INTLTOOL_THEME_RULE = @INTLTOOL_THEME_RULE@ INTLTOOL_UI_RULE = @INTLTOOL_UI_RULE@ INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ INTLTOOL_XAM_RULE = @INTLTOOL_XAM_RULE@ INTLTOOL_XGETTEXT = @INTLTOOL_XGETTEXT@ INTLTOOL_XML_NOMERGE_RULE = @INTLTOOL_XML_NOMERGE_RULE@ INTLTOOL_XML_RULE = @INTLTOOL_XML_RULE@ JPEG_LIB = @JPEG_LIB@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBXML_CFLAGS = @LIBXML_CFLAGS@ LIBXML_LIBS = @LIBXML_LIBS@ LIRC_LIB = @LIRC_LIB@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAKEINFO = @MAKEINFO@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ NEED_ZSFB_FALSE = @NEED_ZSFB_FALSE@ NEED_ZSFB_TRUE = @NEED_ZSFB_TRUE@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_CFLAGS = @PACKAGE_CFLAGS@ PACKAGE_LIBS = @PACKAGE_LIBS@ PACKAGE_LIB_DIR = @PACKAGE_LIB_DIR@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_PIXMAPS_DIR = @PACKAGE_PIXMAPS_DIR@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PACKAGE_VERSION_ID = @PACKAGE_VERSION_ID@ PATH_SEPARATOR = @PATH_SEPARATOR@ PG_CFLAGS = @PG_CFLAGS@ PKG_CONFIG = @PKG_CONFIG@ PLUGIN_DEFAULT_DIR = @PLUGIN_DEFAULT_DIR@ PLUGIN_DEFAULT_FLAGS = @PLUGIN_DEFAULT_FLAGS@ PNG_LIBS = @PNG_LIBS@ POFILES = @POFILES@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ PYTHON_LIBS = @PYTHON_LIBS@ PY_CFLAGS = @PY_CFLAGS@ PY_EXTRA_LIBS = @PY_EXTRA_LIBS@ PY_LIBS = @PY_LIBS@ PY_LIB_LOC = @PY_LIB_LOC@ RANLIB = @RANLIB@ RTE_LIBS = @RTE_LIBS@ SCROLLKEEPER_BUILD_REQUIRED = @SCROLLKEEPER_BUILD_REQUIRED@ SCROLLKEEPER_CONFIG = @SCROLLKEEPER_CONFIG@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ SUID_ZSFB_FALSE = @SUID_ZSFB_FALSE@ SUID_ZSFB_TRUE = @SUID_ZSFB_TRUE@ UNICODE_CFLAGS = @UNICODE_CFLAGS@ UNICODE_LIBS = @UNICODE_LIBS@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ WARN_CFLAGS = @WARN_CFLAGS@ XGETTEXT = @XGETTEXT@ XMLCATALOG = @XMLCATALOG@ XML_CATALOG_FILE = @XML_CATALOG_FILE@ XSLTPROC = @XSLTPROC@ X_CFLAGS = @X_CFLAGS@ X_DPMS_LIBS = @X_DPMS_LIBS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ X_XF86DGA_LIBS = @X_XF86DGA_LIBS@ X_XF86VMODE_LIBS = @X_XF86VMODE_LIBS@ X_XINERAMA_LIBS = @X_XINERAMA_LIBS@ X_XMU_LIBS = @X_XMU_LIBS@ X_XV_LIBS = @X_XV_LIBS@ ZSFB_GROUP = @ZSFB_GROUP@ ZSFB_OWNER = @ZSFB_OWNER@ ZVBI_CFLAGS = @ZVBI_CFLAGS@ ZVBI_LIBS = @ZVBI_LIBS@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_STRIP = @ac_ct_STRIP@ ac_pt_PKG_CONFIG = @ac_pt_PKG_CONFIG@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ datadir = @datadir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ python_val = @python_val@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ EXTRA_DIST = \ zapping_setup_fb.pam AM_CFLAGS = @DEFAULT_CFLAGS@ INCLUDES = \ -I$(top_srcdir) \ @COMMON_INCLUDES@ zapping_setup_fb_SOURCES = \ zapping_setup_fb.c zapping_setup_fb.h \ v4l.c \ v4l2.c \ v4l25.c zapping_setup_fb_LDADD = \ $(top_builddir)/libtv/libtv.la \ @X_LIBS@ \ -lX11 \ -lXext \ $(X_XINERAMA_LIBS) \ $(X_XF86DGA_LIBS) \ $(X_EXTRA_LIBS) DISTCLEANFILES = zsfb.capps all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu zapping_setup_fb/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu zapping_setup_fb/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh clean-binPROGRAMS: @list='$(bin_PROGRAMS)'; for p in $$list; do \ f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ echo " rm -f $$p $$f"; \ rm -f $$p $$f ; \ done zapping_setup_fb$(EXEEXT): $(zapping_setup_fb_OBJECTS) $(zapping_setup_fb_DEPENDENCIES) @rm -f zapping_setup_fb$(EXEEXT) $(LINK) $(zapping_setup_fb_LDFLAGS) $(zapping_setup_fb_OBJECTS) $(zapping_setup_fb_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/v4l.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/v4l2.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/v4l25.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zapping_setup_fb.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool uninstall-info-am: ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) installdirs: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(mkdir_p) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-libtool distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-exec-am: install-binPROGRAMS install-info: install-info-am install-man: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS uninstall-info-am .PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ clean-generic clean-libtool ctags distclean distclean-compile \ distclean-generic distclean-libtool distclean-tags distdir dvi \ dvi-am html html-am info info-am install install-am \ install-binPROGRAMS install-data install-data-am install-exec \ install-exec-am install-info install-info-am install-man \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags uninstall uninstall-am \ uninstall-binPROGRAMS uninstall-info-am zsfb.capps: echo USER=root >$@ echo SESSION=TRUE >>$@ echo PROGRAM=$(sbindir)/zapping_setup_fb >>$@ install-binPROGRAMS: $(bin_PROGRAMS) zsfb.capps @SUID_ZSFB_TRUE@ $(mkinstalldirs) $(DESTDIR)$(bindir) @SUID_ZSFB_TRUE@ $(mkinstalldirs) $(DESTDIR)$(sbindir) @SUID_ZSFB_TRUE@ $(INSTALL) -m4755 -o $(ZSFB_OWNER) -g $(ZSFB_GROUP) \ @SUID_ZSFB_TRUE@ zapping_setup_fb $(DESTDIR)$(sbindir) @SUID_ZSFB_TRUE@ ln -sf $(DESTDIR)$(sbindir)/zapping_setup_fb \ @SUID_ZSFB_TRUE@ $(DESTDIR)$(bindir)/zapping_setup_fb @SUID_ZSFB_FALSE@ $(mkinstalldirs) $(DESTDIR)$(bindir) @SUID_ZSFB_FALSE@ $(mkinstalldirs) $(DESTDIR)$(sbindir) @SUID_ZSFB_FALSE@ $(mkinstalldirs) $(DESTDIR)$(sysconfdir)/pam.d @SUID_ZSFB_FALSE@ $(mkinstalldirs) $(DESTDIR)$(sysconfdir)/security/console.apps @SUID_ZSFB_FALSE@ $(INSTALL) zapping_setup_fb $(DESTDIR)$(sbindir) @SUID_ZSFB_FALSE@ ln -sf $(CONSOLEHELPER_LOCATION) $(DESTDIR)$(bindir)/zapping_setup_fb @SUID_ZSFB_FALSE@ if ! test -e $(DESTDIR)$(sysconfdir)/pam.d/zapping_setup_fb ; then \ @SUID_ZSFB_FALSE@ $(INSTALL_DATA) $(top_srcdir)/zapping_setup_fb/zapping_setup_fb.pam \ @SUID_ZSFB_FALSE@ $(DESTDIR)$(sysconfdir)/pam.d/zapping_setup_fb; \ @SUID_ZSFB_FALSE@ fi @SUID_ZSFB_FALSE@ cp zsfb.capps \ @SUID_ZSFB_FALSE@ $(DESTDIR)$(sysconfdir)/security/console.apps/zapping_setup_fb uninstall-binPROGRAMS: @SUID_ZSFB_TRUE@ rm -f $(DESTDIR)$(bindir)/zapping_setup_fb @SUID_ZSFB_FALSE@ rm -f $(DESTDIR)$(sbindir)/zapping_setup_fb @SUID_ZSFB_FALSE@ rm -f $(DESTDIR)$(bindir)/zapping_setup_fb @SUID_ZSFB_FALSE@ rm -f $(DESTDIR)$(sysconfdir)/security/console.apps/zapping_setup_fb @SUID_ZSFB_FALSE@ rm -f $(DESTDIR)$(sysconfdir)/pam.d/zapping_setup_fb # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: zapping-0.10cvs6/zapping_setup_fb/v4l2.c 644 764 144 5237 10400112547 13300 /* * Zapping (TV viewer for the Gnome Desktop) * * Copyright (C) 2000 Iaki Garca Etxebarria * Copyright (C) 2003, 2005 Michael H. Schimek * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* $Id: v4l2.c,v 1.12 2006/02/25 17:35:35 mschimek Exp $ */ #ifdef HAVE_CONFIG_H # include "config.h" #endif #include "zapping_setup_fb.h" #ifdef ENABLE_V4L #include "common/intl-priv.h" #include "common/videodev2.h" /* V4L2 header file */ #include "common/_videodev2.h" #define xioctl(fd, cmd, arg) \ (IOCTL_ARG_TYPE_CHECK_ ## cmd (arg), \ device_ioctl (device_log_fp, fprint_v4l2_ioctl_arg, fd, cmd, arg)) /* Attn: device_name may be NULL, device_fd may be -1. */ zsfb_status setup_v4l2 (const char * device_name, int device_fd, const tv_overlay_buffer *buffer) { zsfb_status status; int fd; struct v4l2_capability cap; buffer = buffer; /* unused */ status = device_open_safer (&fd, device_name, device_fd, /* major */ 81, O_RDWR); if (ZSFB_SUCCESS != status) return status; message (/* verbosity */ 2, "Querying device capabilities.\n"); if (-1 == xioctl (fd, VIDIOC_QUERYCAP, &cap)) { int saved_errno = errno; device_close (device_log_fp, fd); if (EINVAL == saved_errno) { message (/* verbosity */ 2, "Not a V4L2 0.20 device.\n"); errno = EINVAL; return ZSFB_UNKNOWN_DEVICE; } else { errmsg_ioctl ("VIDIOC_QUERYCAP (V4L2 0.20)", saved_errno); errno = saved_errno; return ZSFB_IOCTL_ERROR; } } device_close (device_log_fp, fd); /* V4L2 0.20 is obsolete, superseded by V4L2 of Linux 2.6. */ message (/* verbosity */ 2, "V4L2 0.20 API is no longer supported.\n"); errno = EINVAL; return ZSFB_UNKNOWN_DEVICE; /* unknown API (may talk V4L) */ } #else /* !ENABLE_V4L */ zsfb_status setup_v4l2 (const char * device_name, const tv_overlay_buffer *buffer) { message (/* verbosity */ 2, "No V4L2 0.20 support compiled in.\n"); errno = EINVAL; return ZSFB_UNKNOWN_DEVICE; } #endif /* !ENABLE_V4L */ zapping-0.10cvs6/INSTALL 644 764 144 22432 10304524022 10051 Installation Instructions ************************* Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005 Free Software Foundation, Inc. This file is free documentation; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. Basic Installation ================== These are generic installation instructions. The `configure' shell script attempts to guess correct values for various system-dependent variables used during compilation. It uses those values to create a `Makefile' in each directory of the package. It may also create one or more `.h' files containing system-dependent definitions. Finally, it creates a shell script `config.status' that you can run in the future to recreate the current configuration, and a file `config.log' containing compiler output (useful mainly for debugging `configure'). It can also use an optional file (typically called `config.cache' and enabled with `--cache-file=config.cache' or simply `-C') that saves the results of its tests to speed up reconfiguring. (Caching is disabled by default to prevent problems with accidental use of stale cache files.) If you need to do unusual things to compile the package, please try to figure out how `configure' could check whether to do them, and mail diffs or instructions to the address given in the `README' so they can be considered for the next release. If you are using the cache, and at some point `config.cache' contains results you don't want to keep, you may remove or edit it. The file `configure.ac' (or `configure.in') is used to create `configure' by a program called `autoconf'. You only need `configure.ac' if you want to change it or regenerate `configure' using a newer version of `autoconf'. The simplest way to compile this package is: 1. `cd' to the directory containing the package's source code and type `./configure' to configure the package for your system. If you're using `csh' on an old version of System V, you might need to type `sh ./configure' instead to prevent `csh' from trying to execute `configure' itself. Running `configure' takes awhile. While running, it prints some messages telling which features it is checking for. 2. Type `make' to compile the package. 3. Optionally, type `make check' to run any self-tests that come with the package. 4. Type `make install' to install the programs and any data files and documentation. 5. You can remove the program binaries and object files from the source code directory by typing `make clean'. To also remove the files that `configure' created (so you can compile the package for a different kind of computer), type `make distclean'. There is also a `make maintainer-clean' target, but that is intended mainly for the package's developers. If you use it, you may have to get all sorts of other programs in order to regenerate files that came with the distribution. Compilers and Options ===================== Some systems require unusual options for compilation or linking that the `configure' script does not know about. Run `./configure --help' for details on some of the pertinent environment variables. You can give `configure' initial values for configuration parameters by setting variables in the command line or in the environment. Here is an example: ./configure CC=c89 CFLAGS=-O2 LIBS=-lposix *Note Defining Variables::, for more details. Compiling For Multiple Architectures ==================================== You can compile the package for more than one kind of computer at the same time, by placing the object files for each architecture in their own directory. To do this, you must use a version of `make' that supports the `VPATH' variable, such as GNU `make'. `cd' to the directory where you want the object files and executables to go and run the `configure' script. `configure' automatically checks for the source code in the directory that `configure' is in and in `..'. If you have to use a `make' that does not support the `VPATH' variable, you have to compile the package for one architecture at a time in the source code directory. After you have installed the package for one architecture, use `make distclean' before reconfiguring for another architecture. Installation Names ================== By default, `make install' installs the package's commands under `/usr/local/bin', include files under `/usr/local/include', etc. You can specify an installation prefix other than `/usr/local' by giving `configure' the option `--prefix=PREFIX'. You can specify separate installation prefixes for architecture-specific files and architecture-independent files. If you pass the option `--exec-prefix=PREFIX' to `configure', the package uses PREFIX as the prefix for installing programs and libraries. Documentation and other data files still use the regular prefix. In addition, if you use an unusual directory layout you can give options like `--bindir=DIR' to specify different values for particular kinds of files. Run `configure --help' for a list of the directories you can set and what kinds of files go in them. If the package supports it, you can cause programs to be installed with an extra prefix or suffix on their names by giving `configure' the option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. Optional Features ================= Some packages pay attention to `--enable-FEATURE' options to `configure', where FEATURE indicates an optional part of the package. They may also pay attention to `--with-PACKAGE' options, where PACKAGE is something like `gnu-as' or `x' (for the X Window System). The `README' should mention any `--enable-' and `--with-' options that the package recognizes. For packages that use the X Window System, `configure' can usually find the X include and library files automatically, but if it doesn't, you can use the `configure' options `--x-includes=DIR' and `--x-libraries=DIR' to specify their locations. Specifying the System Type ========================== There may be some features `configure' cannot figure out automatically, but needs to determine by the type of machine the package will run on. Usually, assuming the package is built to be run on the _same_ architectures, `configure' can figure that out, but if it prints a message saying it cannot guess the machine type, give it the `--build=TYPE' option. TYPE can either be a short name for the system type, such as `sun4', or a canonical name which has the form: CPU-COMPANY-SYSTEM where SYSTEM can have one of these forms: OS KERNEL-OS See the file `config.sub' for the possible values of each field. If `config.sub' isn't included in this package, then this package doesn't need to know the machine type. If you are _building_ compiler tools for cross-compiling, you should use the option `--target=TYPE' to select the type of system they will produce code for. If you want to _use_ a cross compiler, that generates code for a platform different from the build platform, you should specify the "host" platform (i.e., that on which the generated programs will eventually be run) with `--host=TYPE'. Sharing Defaults ================ If you want to set default values for `configure' scripts to share, you can create a site shell script called `config.site' that gives default values for variables like `CC', `cache_file', and `prefix'. `configure' looks for `PREFIX/share/config.site' if it exists, then `PREFIX/etc/config.site' if it exists. Or, you can set the `CONFIG_SITE' environment variable to the location of the site script. A warning: not all `configure' scripts look for a site script. Defining Variables ================== Variables not defined in a site shell script can be set in the environment passed to `configure'. However, some packages may run configure again during the build, and the customized values of these variables may be lost. In order to avoid this problem, you should set them in the `configure' command line, using `VAR=value'. For example: ./configure CC=/usr/local2/bin/gcc causes the specified `gcc' to be used as the C compiler (unless it is overridden in the site shell script). Here is a another example: /bin/bash ./configure CONFIG_SHELL=/bin/bash Here the `CONFIG_SHELL=/bin/bash' operand causes subsequent configuration-related scripts to be executed by `/bin/bash'. `configure' Invocation ====================== `configure' recognizes the following options to control how it operates. `--help' `-h' Print a summary of the options to `configure', and exit. `--version' `-V' Print the version of Autoconf used to generate the `configure' script, and exit. `--cache-file=FILE' Enable the cache: use and save the results of the tests in FILE, traditionally `config.cache'. FILE defaults to `/dev/null' to disable caching. `--config-cache' `-C' Alias for `--cache-file=config.cache'. `--quiet' `--silent' `-q' Do not print messages saying which checks are being made. To suppress all normal output, redirect it to `/dev/null' (any error messages will still be shown). `--srcdir=DIR' Look for the package's source code in directory DIR. Usually `configure' can determine that directory automatically. `configure' also accepts some other, not widely useful, options. Run `configure --help' for more details. zapping-0.10cvs6/intltool-merge.in 644 764 144 104633 10324352654 12351 #!@INTLTOOL_PERL@ -w # -*- Mode: perl; indent-tabs-mode: nil; c-basic-offset: 4 -*- # # The Intltool Message Merger # # Copyright (C) 2000, 2003 Free Software Foundation. # Copyright (C) 2000, 2001 Eazel, Inc # # Intltool is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # version 2 published by the Free Software Foundation. # # Intltool 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 this program; if not, write to the Free Software # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # # Authors: Maciej Stachowiak # Kenneth Christiansen # Darin Adler # # Proper XML UTF-8'ification written by Cyrille Chepelov # ## Release information my $PROGRAM = "intltool-merge"; my $PACKAGE = "intltool"; my $VERSION = "0.34.1"; ## Loaded modules use strict; use Getopt::Long; use Text::Wrap; use File::Basename; my $must_end_tag = -1; my $last_depth = -1; my $translation_depth = -1; my @tag_stack = (); my @entered_tag = (); my @translation_strings = (); my $leading_space = ""; ## Scalars used by the option stuff my $HELP_ARG = 0; my $VERSION_ARG = 0; my $BA_STYLE_ARG = 0; my $XML_STYLE_ARG = 0; my $KEYS_STYLE_ARG = 0; my $DESKTOP_STYLE_ARG = 0; my $SCHEMAS_STYLE_ARG = 0; my $RFC822DEB_STYLE_ARG = 0; my $QUIET_ARG = 0; my $PASS_THROUGH_ARG = 0; my $UTF8_ARG = 0; my $MULTIPLE_OUTPUT = 0; my $cache_file; ## Handle options GetOptions ( "help" => \$HELP_ARG, "version" => \$VERSION_ARG, "quiet|q" => \$QUIET_ARG, "oaf-style|o" => \$BA_STYLE_ARG, ## for compatibility "ba-style|b" => \$BA_STYLE_ARG, "xml-style|x" => \$XML_STYLE_ARG, "keys-style|k" => \$KEYS_STYLE_ARG, "desktop-style|d" => \$DESKTOP_STYLE_ARG, "schemas-style|s" => \$SCHEMAS_STYLE_ARG, "rfc822deb-style|r" => \$RFC822DEB_STYLE_ARG, "pass-through|p" => \$PASS_THROUGH_ARG, "utf8|u" => \$UTF8_ARG, "multiple-output|m" => \$MULTIPLE_OUTPUT, "cache|c=s" => \$cache_file ) or &error; my $PO_DIR; my $FILE; my $OUTFILE; my %po_files_by_lang = (); my %translations = (); my $iconv = $ENV{"ICONV"} || $ENV{"INTLTOOL_ICONV"} || "/usr/bin/iconv"; my $devnull = ($^O eq 'MSWin32' ? 'NUL:' : '/dev/null'); # Use this instead of \w for XML files to handle more possible characters. my $w = "[-A-Za-z0-9._:]"; # XML quoted string contents my $q = "[^\\\"]*"; ## Check for options. if ($VERSION_ARG) { &print_version; } elsif ($HELP_ARG) { &print_help; } elsif ($BA_STYLE_ARG && @ARGV > 2) { &utf8_sanity_check; &preparation; &print_message; &ba_merge_translations; &finalize; } elsif ($XML_STYLE_ARG && @ARGV > 2) { &utf8_sanity_check; &preparation; &print_message; &xml_merge_output; &finalize; } elsif ($KEYS_STYLE_ARG && @ARGV > 2) { &utf8_sanity_check; &preparation; &print_message; &keys_merge_translations; &finalize; } elsif ($DESKTOP_STYLE_ARG && @ARGV > 2) { &utf8_sanity_check; &preparation; &print_message; &desktop_merge_translations; &finalize; } elsif ($SCHEMAS_STYLE_ARG && @ARGV > 2) { &utf8_sanity_check; &preparation; &print_message; &schemas_merge_translations; &finalize; } elsif ($RFC822DEB_STYLE_ARG && @ARGV > 2) { &preparation; &print_message; &rfc822deb_merge_translations; &finalize; } else { &print_help; } exit; ## Sub for printing release information sub print_version { print <<_EOF_; ${PROGRAM} (${PACKAGE}) ${VERSION} Written by Maciej Stachowiak, Darin Adler and Kenneth Christiansen. Copyright (C) 2000-2003 Free Software Foundation, Inc. Copyright (C) 2000-2001 Eazel, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. _EOF_ exit; } ## Sub for printing usage information sub print_help { print <<_EOF_; Usage: ${PROGRAM} [OPTION]... PO_DIRECTORY FILENAME OUTPUT_FILE Generates an output file that includes some localized attributes from an untranslated source file. Mandatory options: (exactly one must be specified) -b, --ba-style includes translations in the bonobo-activation style -d, --desktop-style includes translations in the desktop style -k, --keys-style includes translations in the keys style -s, --schemas-style includes translations in the schemas style -r, --rfc822deb-style includes translations in the RFC822 style -x, --xml-style includes translations in the standard xml style Other options: -u, --utf8 convert all strings to UTF-8 before merging (default for everything except RFC822 style) -p, --pass-through deprecated, does nothing and issues a warning -m, --multiple-output output one localized file per locale, instead of a single file containing all localized elements -c, --cache=FILE specify cache file name (usually \$top_builddir/po/.intltool-merge-cache) -q, --quiet suppress most messages --help display this help and exit --version output version information and exit Report bugs to http://bugzilla.gnome.org/ (product name "$PACKAGE") or send email to . _EOF_ exit; } ## Sub for printing error messages sub print_error { print STDERR "Try `${PROGRAM} --help' for more information.\n"; exit; } sub print_message { print "Merging translations into $OUTFILE.\n" unless $QUIET_ARG; } sub preparation { $PO_DIR = $ARGV[0]; $FILE = $ARGV[1]; $OUTFILE = $ARGV[2]; &gather_po_files; &get_translation_database; } # General-purpose code for looking up translations in .po files sub po_file2lang { my ($tmp) = @_; $tmp =~ s/^.*\/(.*)\.po$/$1/; return $tmp; } sub gather_po_files { for my $po_file (glob "$PO_DIR/*.po") { $po_files_by_lang{po_file2lang($po_file)} = $po_file; } } sub get_local_charset { my ($encoding) = @_; my $alias_file = $ENV{"G_CHARSET_ALIAS"} || "/opt/gnome-2.10/lib/charset.alias"; # seek character encoding aliases in charset.alias (glib) if (open CHARSET_ALIAS, $alias_file) { while () { next if /^\#/; return $1 if (/^\s*([-._a-zA-Z0-9]+)\s+$encoding\b/i) } close CHARSET_ALIAS; } # if not found, return input string return $encoding; } sub get_po_encoding { my ($in_po_file) = @_; my $encoding = ""; open IN_PO_FILE, $in_po_file or die; while () { ## example: "Content-Type: text/plain; charset=ISO-8859-1\n" if (/Content-Type\:.*charset=([-a-zA-Z0-9]+)\\n/) { $encoding = $1; last; } } close IN_PO_FILE; if (!$encoding) { print STDERR "Warning: no encoding found in $in_po_file. Assuming ISO-8859-1\n" unless $QUIET_ARG; $encoding = "ISO-8859-1"; } system ("$iconv -f $encoding -t UTF-8 <$devnull 2>$devnull"); if ($?) { $encoding = get_local_charset($encoding); } return $encoding } sub utf8_sanity_check { print STDERR "Warning: option --pass-through has been removed.\n" if $PASS_THROUGH_ARG; $UTF8_ARG = 1; } sub get_translation_database { if ($cache_file) { &get_cached_translation_database; } else { &create_translation_database; } } sub get_newest_po_age { my $newest_age; foreach my $file (values %po_files_by_lang) { my $file_age = -M $file; $newest_age = $file_age if !$newest_age || $file_age < $newest_age; } $newest_age = 0 if !$newest_age; return $newest_age; } sub create_cache { print "Generating and caching the translation database\n" unless $QUIET_ARG; &create_translation_database; open CACHE, ">$cache_file" || die; print CACHE join "\x01", %translations; close CACHE; } sub load_cache { print "Found cached translation database\n" unless $QUIET_ARG; my $contents; open CACHE, "<$cache_file" || die; { local $/; $contents = ; } close CACHE; %translations = split "\x01", $contents; } sub get_cached_translation_database { my $cache_file_age = -M $cache_file; if (defined $cache_file_age) { if ($cache_file_age <= &get_newest_po_age) { &load_cache; return; } print "Found too-old cached translation database\n" unless $QUIET_ARG; } &create_cache; } sub create_translation_database { for my $lang (keys %po_files_by_lang) { my $po_file = $po_files_by_lang{$lang}; if ($UTF8_ARG) { my $encoding = get_po_encoding ($po_file); if (lc $encoding eq "utf-8") { open PO_FILE, "<$po_file"; } else { print STDERR "WARNING: $po_file is not in UTF-8 but $encoding, converting...\n" unless $QUIET_ARG;; open PO_FILE, "$iconv -f $encoding -t UTF-8 $po_file|"; } } else { open PO_FILE, "<$po_file"; } my $nextfuzzy = 0; my $inmsgid = 0; my $inmsgstr = 0; my $msgid = ""; my $msgstr = ""; while () { $nextfuzzy = 1 if /^#, fuzzy/; if (/^msgid "((\\.|[^\\])*)"/ ) { $translations{$lang, $msgid} = $msgstr if $inmsgstr && $msgid && $msgstr; $msgid = ""; $msgstr = ""; if ($nextfuzzy) { $inmsgid = 0; } else { $msgid = unescape_po_string($1); $inmsgid = 1; } $inmsgstr = 0; $nextfuzzy = 0; } if (/^msgstr "((\\.|[^\\])*)"/) { $msgstr = unescape_po_string($1); $inmsgstr = 1; $inmsgid = 0; } if (/^"((\\.|[^\\])*)"/) { $msgid .= unescape_po_string($1) if $inmsgid; $msgstr .= unescape_po_string($1) if $inmsgstr; } } $translations{$lang, $msgid} = $msgstr if $inmsgstr && $msgid && $msgstr; } } sub finalize { } sub unescape_one_sequence { my ($sequence) = @_; return "\\" if $sequence eq "\\\\"; return "\"" if $sequence eq "\\\""; return "\n" if $sequence eq "\\n"; return "\r" if $sequence eq "\\r"; return "\t" if $sequence eq "\\t"; return "\b" if $sequence eq "\\b"; return "\f" if $sequence eq "\\f"; return "\a" if $sequence eq "\\a"; return chr(11) if $sequence eq "\\v"; # vertical tab, see ascii(7) return chr(hex($1)) if ($sequence =~ /\\x([0-9a-fA-F]{2})/); return chr(oct($1)) if ($sequence =~ /\\([0-7]{3})/); # FIXME: Is \0 supported as well? Kenneth and Rodney don't want it, see bug #48489 return $sequence; } sub unescape_po_string { my ($string) = @_; $string =~ s/(\\x[0-9a-fA-F]{2}|\\[0-7]{3}|\\.)/unescape_one_sequence($1)/eg; return $string; } ## NOTE: deal with < - < but not > - > because it seems its ok to have ## > in the entity. For further info please look at #84738. sub entity_decode { local ($_) = @_; s/'/'/g; # ' s/"/"/g; # " s/&/&/g; s/</; close INPUT; } open OUTPUT, ">$OUTFILE" or die "can't open $OUTFILE: $!"; # Binmode so that selftest works ok if using a native Win32 Perl... binmode (OUTPUT) if $^O eq 'MSWin32'; while ($source =~ s|^(.*?)([ \t]*<\s*$w+\s+($w+\s*=\s*"$q"\s*)+/?>)([ \t]*\n)?||s) { print OUTPUT $1; my $node = $2 . "\n"; my @strings = (); $_ = $node; while (s/(\s)_($w+\s*=\s*"($q)")/$1$2/s) { push @strings, entity_decode($3); } print OUTPUT; my %langs; for my $string (@strings) { for my $lang (keys %po_files_by_lang) { $langs{$lang} = 1 if $translations{$lang, $string}; } } for my $lang (sort keys %langs) { $_ = $node; s/(\sname\s*=\s*)"($q)"/$1"$2-$lang"/s; s/(\s)_($w+\s*=\s*")($q)"/$1 . $2 . entity_encoded_translation($lang, $3) . '"'/seg; print OUTPUT; } } print OUTPUT $source; close OUTPUT; } ## XML (non-bonobo-activation) merge code # Process tag attributes # Only parameter is a HASH containing attributes -> values mapping sub getAttributeString { my $sub = shift; my $do_translate = shift || 0; my $language = shift || ""; my $result = ""; my $translate = shift; foreach my $e (reverse(sort(keys %{ $sub }))) { my $key = $e; my $string = $sub->{$e}; my $quote = '"'; $string =~ s/^[\s]+//; $string =~ s/[\s]+$//; if ($string =~ /^'.*'$/) { $quote = "'"; } $string =~ s/^['"]//g; $string =~ s/['"]$//g; if ($do_translate && $key =~ /^_/) { $key =~ s|^_||g; if ($language) { # Handle translation my $decode_string = entity_decode($string); my $translation = $translations{$language, $decode_string}; if ($translation) { $translation = entity_encode($translation); $string = $translation; } $$translate = 2; } else { $$translate = 2 if ($translate && (!$$translate)); # watch not to "overwrite" $translate } } $result .= " $key=$quote$string$quote"; } return $result; } # Returns a translatable string from XML node, it works on contents of every node in XML::Parser tree sub getXMLstring { my $ref = shift; my $spacepreserve = shift || 0; my @list = @{ $ref }; my $result = ""; my $count = scalar(@list); my $attrs = $list[0]; my $index = 1; $spacepreserve = 1 if ((exists $attrs->{"xml:space"}) && ($attrs->{"xml:space"} =~ /^["']?preserve["']?$/)); $spacepreserve = 0 if ((exists $attrs->{"xml:space"}) && ($attrs->{"xml:space"} =~ /^["']?default["']?$/)); while ($index < $count) { my $type = $list[$index]; my $content = $list[$index+1]; if (! $type ) { # We've got CDATA if ($content) { # lets strip the whitespace here, and *ONLY* here $content =~ s/\s+/ /gs if (!$spacepreserve); $result .= $content; } } elsif ( "$type" ne "1" ) { # We've got another element $result .= "<$type"; $result .= getAttributeString(@{$content}[0], 0); # no nested translatable elements if ($content) { my $subresult = getXMLstring($content, $spacepreserve); if ($subresult) { $result .= ">".$subresult . ""; } else { $result .= "/>"; } } else { $result .= "/>"; } } $index += 2; } return $result; } # Translate list of nodes if necessary sub translate_subnodes { my $fh = shift; my $content = shift; my $language = shift || ""; my $singlelang = shift || 0; my $spacepreserve = shift || 0; my @nodes = @{ $content }; my $count = scalar(@nodes); my $index = 0; while ($index < $count) { my $type = $nodes[$index]; my $rest = $nodes[$index+1]; if ($singlelang) { my $oldMO = $MULTIPLE_OUTPUT; $MULTIPLE_OUTPUT = 1; traverse($fh, $type, $rest, $language, $spacepreserve); $MULTIPLE_OUTPUT = $oldMO; } else { traverse($fh, $type, $rest, $language, $spacepreserve); } $index += 2; } } sub isWellFormedXmlFragment { my $ret = eval 'require XML::Parser'; if(!$ret) { die "You must have XML::Parser installed to run $0\n\n"; } my $fragment = shift; return 0 if (!$fragment); $fragment = "$fragment"; my $xp = new XML::Parser(Style => 'Tree'); my $tree = 0; eval { $tree = $xp->parse($fragment); }; return $tree; } sub traverse { my $fh = shift; my $nodename = shift; my $content = shift; my $language = shift || ""; my $spacepreserve = shift || 0; if (!$nodename) { if ($content =~ /^[\s]*$/) { $leading_space .= $content; } print $fh $content; } else { # element my @all = @{ $content }; my $attrs = shift @all; my $translate = 0; my $outattr = getAttributeString($attrs, 1, $language, \$translate); if ($nodename =~ /^_/) { $translate = 1; $nodename =~ s/^_//; } my $lookup = ''; $spacepreserve = 0 if ((exists $attrs->{"xml:space"}) && ($attrs->{"xml:space"} =~ /^["']?default["']?$/)); $spacepreserve = 1 if ((exists $attrs->{"xml:space"}) && ($attrs->{"xml:space"} =~ /^["']?preserve["']?$/)); print $fh "<$nodename", $outattr; if ($translate) { $lookup = getXMLstring($content, $spacepreserve); if (!$spacepreserve) { $lookup =~ s/^\s+//s; $lookup =~ s/\s+$//s; } if ($lookup || $translate == 2) { my $translation = $translations{$language, $lookup} if isWellFormedXmlFragment($translations{$language, $lookup}); if ($MULTIPLE_OUTPUT && ($translation || $translate == 2)) { $translation = $lookup if (!$translation); print $fh " xml:lang=\"", $language, "\"" if $language; print $fh ">"; if ($translate == 2) { translate_subnodes($fh, \@all, $language, 1, $spacepreserve); } else { print $fh $translation; } print $fh ""; return; # this means there will be no same translation with xml:lang="$language"... # if we want them both, just remove this "return" } else { print $fh ">"; if ($translate == 2) { translate_subnodes($fh, \@all, $language, 1, $spacepreserve); } else { print $fh $lookup; } print $fh ""; } } else { print $fh "/>"; } for my $lang (sort keys %po_files_by_lang) { if ($MULTIPLE_OUTPUT && $lang ne "$language") { next; } if ($lang) { # Handle translation # my $translate = 0; my $localattrs = getAttributeString($attrs, 1, $lang, \$translate); my $translation = $translations{$lang, $lookup} if isWellFormedXmlFragment($translations{$lang, $lookup}); if ($translate && !$translation) { $translation = $lookup; } if ($translation || $translate) { print $fh "\n"; $leading_space =~ s/.*\n//g; print $fh $leading_space; print $fh "<", $nodename, " xml:lang=\"", $lang, "\"", $localattrs, ">"; if ($translate == 2) { translate_subnodes($fh, \@all, $lang, 1, $spacepreserve); } else { print $fh $translation; } print $fh ""; } } } } else { my $count = scalar(@all); if ($count > 0) { print $fh ">"; my $index = 0; while ($index < $count) { my $type = $all[$index]; my $rest = $all[$index+1]; traverse($fh, $type, $rest, $language, $spacepreserve); $index += 2; } print $fh ""; } else { print $fh "/>"; } } } } sub intltool_tree_comment { my $expat = shift; my $data = shift; my $clist = $expat->{Curlist}; my $pos = $#$clist; push @$clist, 1 => $data; } sub intltool_tree_cdatastart { my $expat = shift; my $clist = $expat->{Curlist}; my $pos = $#$clist; push @$clist, 0 => $expat->original_string(); } sub intltool_tree_cdataend { my $expat = shift; my $clist = $expat->{Curlist}; my $pos = $#$clist; $clist->[$pos] .= $expat->original_string(); } sub intltool_tree_char { my $expat = shift; my $text = shift; my $clist = $expat->{Curlist}; my $pos = $#$clist; # Use original_string so that we retain escaped entities # in CDATA sections. # if ($pos > 0 and $clist->[$pos - 1] eq '0') { $clist->[$pos] .= $expat->original_string(); } else { push @$clist, 0 => $expat->original_string(); } } sub intltool_tree_start { my $expat = shift; my $tag = shift; my @origlist = (); # Use original_string so that we retain escaped entities # in attribute values. We must convert the string to an # @origlist array to conform to the structure of the Tree # Style. # my @original_array = split /\x/, $expat->original_string(); my $source = $expat->original_string(); # Remove leading tag. # $source =~ s|^\s*<\s*(\S+)||s; # Grab attribute key/value pairs and push onto @origlist array. # while ($source) { if ($source =~ /^\s*([\w:-]+)\s*[=]\s*["]/) { $source =~ s|^\s*([\w:-]+)\s*[=]\s*["]([^"]*)["]||s; push @origlist, $1; push @origlist, '"' . $2 . '"'; } elsif ($source =~ /^\s*([\w:-]+)\s*[=]\s*[']/) { $source =~ s|^\s*([\w:-]+)\s*[=]\s*[']([^']*)[']||s; push @origlist, $1; push @origlist, "'" . $2 . "'"; } else { last; } } my $ol = [ { @origlist } ]; push @{ $expat->{Lists} }, $expat->{Curlist}; push @{ $expat->{Curlist} }, $tag => $ol; $expat->{Curlist} = $ol; } sub readXml { my $filename = shift || return; if(!-f $filename) { die "ERROR Cannot find filename: $filename\n"; } my $ret = eval 'require XML::Parser'; if(!$ret) { die "You must have XML::Parser installed to run $0\n\n"; } my $xp = new XML::Parser(Style => 'Tree'); $xp->setHandlers(Char => \&intltool_tree_char); $xp->setHandlers(Start => \&intltool_tree_start); $xp->setHandlers(CdataStart => \&intltool_tree_cdatastart); $xp->setHandlers(CdataEnd => \&intltool_tree_cdataend); my $tree = $xp->parsefile($filename); # Hello thereHowdydo # would be: # [foo, [{}, head, [{id => "a"}, 0, "Hello ", em, [{}, 0, "there"]], bar, [{}, # 0, "Howdy", ref, [{}]], 0, "do" ] ] return $tree; } sub print_header { my $infile = shift; my $fh = shift; my $source; if(!-f $infile) { die "ERROR Cannot find filename: $infile\n"; } print $fh qq{\n}; { local $/; open DOCINPUT, "<${FILE}" or die; $source = ; close DOCINPUT; } if ($source =~ /()/s) { print $fh "$1\n"; } elsif ($source =~ /(]*>)/s) { print $fh "$1\n"; } } sub parseTree { my $fh = shift; my $ref = shift; my $language = shift || ""; my $name = shift @{ $ref }; my $cont = shift @{ $ref }; while (!$name || "$name" eq "1") { $name = shift @{ $ref }; $cont = shift @{ $ref }; } my $spacepreserve = 0; my $attrs = @{$cont}[0]; $spacepreserve = 1 if ((exists $attrs->{"xml:space"}) && ($attrs->{"xml:space"} =~ /^["']?preserve["']?$/)); traverse($fh, $name, $cont, $language, $spacepreserve); } sub xml_merge_output { my $source; if ($MULTIPLE_OUTPUT) { for my $lang (sort keys %po_files_by_lang) { if ( ! -e $lang ) { mkdir $lang or die "Cannot create subdirectory $lang: $!\n"; } open OUTPUT, ">$lang/$OUTFILE" or die "Cannot open $lang/$OUTFILE: $!\n"; binmode (OUTPUT) if $^O eq 'MSWin32'; my $tree = readXml($FILE); print_header($FILE, \*OUTPUT); parseTree(\*OUTPUT, $tree, $lang); close OUTPUT; print "CREATED $lang/$OUTFILE\n" unless $QUIET_ARG; } } open OUTPUT, ">$OUTFILE" or die "Cannot open $OUTFILE: $!\n"; binmode (OUTPUT) if $^O eq 'MSWin32'; my $tree = readXml($FILE); print_header($FILE, \*OUTPUT); parseTree(\*OUTPUT, $tree); close OUTPUT; print "CREATED $OUTFILE\n" unless $QUIET_ARG; } sub keys_merge_translations { open INPUT, "<${FILE}" or die; open OUTPUT, ">${OUTFILE}" or die; binmode (OUTPUT) if $^O eq 'MSWin32'; while () { if (s/^(\s*)_(\w+=(.*))/$1$2/) { my $string = $3; print OUTPUT; my $non_translated_line = $_; for my $lang (sort keys %po_files_by_lang) { my $translation = $translations{$lang, $string}; next if !$translation; $_ = $non_translated_line; s/(\w+)=.*/[$lang]$1=$translation/; print OUTPUT; } } else { print OUTPUT; } } close OUTPUT; close INPUT; } sub desktop_merge_translations { open INPUT, "<${FILE}" or die; open OUTPUT, ">${OUTFILE}" or die; binmode (OUTPUT) if $^O eq 'MSWin32'; while () { if (s/^(\s*)_(\w+=(.*))/$1$2/) { my $string = $3; print OUTPUT; my $non_translated_line = $_; for my $lang (sort keys %po_files_by_lang) { my $translation = $translations{$lang, $string}; next if !$translation; $_ = $non_translated_line; s/(\w+)=.*/${1}[$lang]=$translation/; print OUTPUT; } } else { print OUTPUT; } } close OUTPUT; close INPUT; } sub schemas_merge_translations { my $source; { local $/; # slurp mode open INPUT, "<$FILE" or die "can't open $FILE: $!"; $source = ; close INPUT; } open OUTPUT, ">$OUTFILE" or die; binmode (OUTPUT) if $^O eq 'MSWin32'; # FIXME: support attribute translations # Empty nodes never need translation, so unmark all of them. # For example, <_foo/> is just replaced by . $source =~ s|<\s*_($w+)\s*/>|<$1/>|g; while ($source =~ s/ (.*?) (\s+)((\s*) (\s*(?:\s*)?(.*?)\s*<\/default>)?(\s*) (\s*(?:\s*)?(.*?)\s*<\/short>)?(\s*) (\s*(?:\s*)?(.*?)\s*<\/long>)?(\s*) <\/locale>) //sx) { print OUTPUT $1; my $locale_start_spaces = $2 ? $2 : ''; my $default_spaces = $4 ? $4 : ''; my $short_spaces = $7 ? $7 : ''; my $long_spaces = $10 ? $10 : ''; my $locale_end_spaces = $13 ? $13 : ''; my $c_default_block = $3 ? $3 : ''; my $default_string = $6 ? $6 : ''; my $short_string = $9 ? $9 : ''; my $long_string = $12 ? $12 : ''; print OUTPUT "$locale_start_spaces$c_default_block"; $default_string =~ s/\s+/ /g; $default_string = entity_decode($default_string); $short_string =~ s/\s+/ /g; $short_string = entity_decode($short_string); $long_string =~ s/\s+/ /g; $long_string = entity_decode($long_string); for my $lang (sort keys %po_files_by_lang) { my $default_translation = $translations{$lang, $default_string}; my $short_translation = $translations{$lang, $short_string}; my $long_translation = $translations{$lang, $long_string}; next if (!$default_translation && !$short_translation && !$long_translation); print OUTPUT "\n$locale_start_spaces"; print OUTPUT "$default_spaces"; if ($default_translation) { $default_translation = entity_encode($default_translation); print OUTPUT "$default_translation"; } print OUTPUT "$short_spaces"; if ($short_translation) { $short_translation = entity_encode($short_translation); print OUTPUT "$short_translation"; } print OUTPUT "$long_spaces"; if ($long_translation) { $long_translation = entity_encode($long_translation); print OUTPUT "$long_translation"; } print OUTPUT "$locale_end_spaces"; } } print OUTPUT $source; close OUTPUT; } sub rfc822deb_merge_translations { my %encodings = (); for my $lang (keys %po_files_by_lang) { $encodings{$lang} = ($UTF8_ARG ? 'UTF-8' : get_po_encoding($po_files_by_lang{$lang})); } my $source; $Text::Wrap::huge = 'overflow'; $Text::Wrap::break = qr/\n|\s(?=\S)/; { local $/; # slurp mode open INPUT, "<$FILE" or die "can't open $FILE: $!"; $source = ; close INPUT; } open OUTPUT, ">${OUTFILE}" or die; binmode (OUTPUT) if $^O eq 'MSWin32'; while ($source =~ /(^|\n+)(_*)([^:\s]+)(:[ \t]*)(.*?)(?=\n[\S\n]|$)/sg) { my $sep = $1; my $non_translated_line = $3.$4; my $string = $5; my $underscore = length($2); next if $underscore eq 0 && $non_translated_line =~ /^#/; # Remove [] dummy strings my $stripped = $string; $stripped =~ s/\[\s[^\[\]]*\],/,/g if $underscore eq 2; $stripped =~ s/\[\s[^\[\]]*\]$//; $non_translated_line .= $stripped; print OUTPUT $sep.$non_translated_line; if ($underscore) { my @str_list = rfc822deb_split($underscore, $string); for my $lang (sort keys %po_files_by_lang) { my $is_translated = 1; my $str_translated = ''; my $first = 1; for my $str (@str_list) { my $translation = $translations{$lang, $str}; if (!$translation) { $is_translated = 0; last; } # $translation may also contain [] dummy # strings, mostly to indicate an empty string $translation =~ s/\[\s[^\[\]]*\]$//; if ($first) { if ($underscore eq 2) { $str_translated .= $translation; } else { $str_translated .= Text::Tabs::expand($translation) . "\n"; } } else { if ($underscore eq 2) { $str_translated .= ', ' . $translation; } else { $str_translated .= Text::Tabs::expand( Text::Wrap::wrap(' ', ' ', $translation)) . "\n .\n"; } } $first = 0; # To fix some problems with Text::Wrap::wrap $str_translated =~ s/(\n )+\n/\n .\n/g; } next unless $is_translated; $str_translated =~ s/\n \.\n$//; $str_translated =~ s/\s+$//; $_ = $non_translated_line; s/^(\w+):\s*.*/$sep${1}-$lang.$encodings{$lang}: $str_translated/s; print OUTPUT; } } } print OUTPUT "\n"; close OUTPUT; close INPUT; } sub rfc822deb_split { # Debian defines a special way to deal with rfc822-style files: # when a value contain newlines, it consists of # 1. a short form (first line) # 2. a long description, all lines begin with a space, # and paragraphs are separated by a single dot on a line # This routine returns an array of all paragraphs, and reformat # them. # When first argument is 2, the string is a comma separated list of # values. my $type = shift; my $text = shift; $text =~ s/^[ \t]//mg; return (split(/, */, $text, 0)) if $type ne 1; return ($text) if $text !~ /\n/; $text =~ s/([^\n]*)\n//; my @list = ($1); my $str = ''; for my $line (split (/\n/, $text)) { chomp $line; if ($line =~ /^\.\s*$/) { # New paragraph $str =~ s/\s*$//; push(@list, $str); $str = ''; } elsif ($line =~ /^\s/) { # Line which must not be reformatted $str .= "\n" if length ($str) && $str !~ /\n$/; $line =~ s/\s+$//; $str .= $line."\n"; } else { # Continuation line, remove newline $str .= " " if length ($str) && $str !~ /\n$/; $str .= $line; } } $str =~ s/\s*$//; push(@list, $str) if length ($str); return @list; } zapping-0.10cvs6/ABOUT-NLS 644 764 144 113113 10432663123 10274 Notes on the Free Translation Project ************************************* Free software is going international! The Free Translation Project is a way to get maintainers of free software, translators, and users all together, so that will gradually become able to speak many languages. A few packages already provide translations for their messages. If you found this `ABOUT-NLS' file inside a distribution, you may assume that the distributed package does use GNU `gettext' internally, itself available at your nearest GNU archive site. But you do _not_ need to install GNU `gettext' prior to configuring, installing or using this package with messages translated. Installers will find here some useful hints. These notes also explain how users should proceed for getting the programs to use the available translations. They tell how people wanting to contribute and work at translations should contact the appropriate team. When reporting bugs in the `intl/' directory or bugs which may be related to internationalization, you should tell about the version of `gettext' which is used. The information can be found in the `intl/VERSION' file, in internationalized packages. Quick configuration advice ========================== If you want to exploit the full power of internationalization, you should configure it using ./configure --with-included-gettext to force usage of internationalizing routines provided within this package, despite the existence of internationalizing capabilities in the operating system where this package is being installed. So far, only the `gettext' implementation in the GNU C library version 2 provides as many features (such as locale alias, message inheritance, automatic charset conversion or plural form handling) as the implementation here. It is also not possible to offer this additional functionality on top of a `catgets' implementation. Future versions of GNU `gettext' will very likely convey even more functionality. So it might be a good idea to change to GNU `gettext' as soon as possible. So you need _not_ provide this option if you are using GNU libc 2 or you have installed a recent copy of the GNU gettext package with the included `libintl'. INSTALL Matters =============== Some packages are "localizable" when properly installed; the programs they contain can be made to speak your own native language. Most such packages use GNU `gettext'. Other packages have their own ways to internationalization, predating GNU `gettext'. By default, this package will be installed to allow translation of messages. It will automatically detect whether the system already provides the GNU `gettext' functions. If not, the GNU `gettext' own library will be used. This library is wholly contained within this package, usually in the `intl/' subdirectory, so prior installation of the GNU `gettext' package is _not_ required. Installers may use special options at configuration time for changing the default behaviour. The commands: ./configure --with-included-gettext ./configure --disable-nls will respectively bypass any pre-existing `gettext' to use the internationalizing routines provided within this package, or else, _totally_ disable translation of messages. When you already have GNU `gettext' installed on your system and run configure without an option for your new package, `configure' will probably detect the previously built and installed `libintl.a' file and will decide to use this. This might be not what is desirable. You should use the more recent version of the GNU `gettext' library. I.e. if the file `intl/VERSION' shows that the library which comes with this package is more recent, you should use ./configure --with-included-gettext to prevent auto-detection. The configuration process will not test for the `catgets' function and therefore it will not be used. The reason is that even an emulation of `gettext' on top of `catgets' could not provide all the extensions of the GNU `gettext' library. Internationalized packages have usually many `po/LL.po' files, where LL gives an ISO 639 two-letter code identifying the language. Unless translations have been forbidden at `configure' time by using the `--disable-nls' switch, all available translations are installed together with the package. However, the environment variable `LINGUAS' may be set, prior to configuration, to limit the installed set. `LINGUAS' should then contain a space separated list of two-letter codes, stating which languages are allowed. Using This Package ================== As a user, if your language has been installed for this package, you only have to set the `LANG' environment variable to the appropriate `LL_CC' combination. Here `LL' is an ISO 639 two-letter language code, and `CC' is an ISO 3166 two-letter country code. For example, let's suppose that you speak German and live in Germany. At the shell prompt, merely execute `setenv LANG de_DE' (in `csh'), `export LANG; LANG=de_DE' (in `sh') or `export LANG=de_DE' (in `bash'). This can be done from your `.login' or `.profile' file, once and for all. You might think that the country code specification is redundant. But in fact, some languages have dialects in different countries. For example, `de_AT' is used for Austria, and `pt_BR' for Brazil. The country code serves to distinguish the dialects. The locale naming convention of `LL_CC', with `LL' denoting the language and `CC' denoting the country, is the one use on systems based on GNU libc. On other systems, some variations of this scheme are used, such as `LL' or `LL_CC.ENCODING'. You can get the list of locales supported by your system for your country by running the command `locale -a | grep '^LL''. Not all programs have translations for all languages. By default, an English message is shown in place of a nonexistent translation. If you understand other languages, you can set up a priority list of languages. This is done through a different environment variable, called `LANGUAGE'. GNU `gettext' gives preference to `LANGUAGE' over `LANG' for the purpose of message handling, but you still need to have `LANG' set to the primary language; this is required by other parts of the system libraries. For example, some Swedish users who would rather read translations in German than English for when Swedish is not available, set `LANGUAGE' to `sv:de' while leaving `LANG' to `sv_SE'. In the `LANGUAGE' environment variable, but not in the `LANG' environment variable, `LL_CC' combinations can be abbreviated as `LL' to denote the language's main dialect. For example, `de' is equivalent to `de_DE' (German as spoken in Germany), and `pt' to `pt_PT' (Portuguese as spoken in Portugal) in this context. Translating Teams ================= For the Free Translation Project to be a success, we need interested people who like their own language and write it well, and who are also able to synergize with other translators speaking the same language. Each translation team has its own mailing list. The up-to-date list of teams can be found at the Free Translation Project's homepage, `http://www.iro.umontreal.ca/contrib/po/HTML/', in the "National teams" area. If you'd like to volunteer to _work_ at translating messages, you should become a member of the translating team for your own language. The subscribing address is _not_ the same as the list itself, it has `-request' appended. For example, speakers of Swedish can send a message to `sv-request@li.org', having this message body: subscribe Keep in mind that team members are expected to participate _actively_ in translations, or at solving translational difficulties, rather than merely lurking around. If your team does not exist yet and you want to start one, or if you are unsure about what to do or how to get started, please write to `translation@iro.umontreal.ca' to reach the coordinator for all translator teams. The English team is special. It works at improving and uniformizing the terminology in use. Proven linguistic skill are praised more than programming skill, here. Available Packages ================== Languages are not equally supported in all packages. The following matrix shows the current state of internationalization, as of May 2003. The matrix shows, in regard of each package, for which languages PO files have been submitted to translation coordination, with a translation percentage of at least 50%. Ready PO files am az be bg ca cs da de el en en_GB eo es +-------------------------------------------+ a2ps | [] [] [] [] | aegis | () | anubis | | ap-utils | | bash | [] [] [] | batchelor | | bfd | [] [] | binutils | [] [] | bison | [] [] [] | bluez-pin | [] [] | clisp | | clisp | [] [] [] | coreutils | [] [] [] [] | cpio | [] [] [] | darkstat | () [] | diffutils | [] [] [] [] [] [] [] | e2fsprogs | [] [] | enscript | [] [] [] [] | error | [] [] [] [] [] | fetchmail | [] () [] [] [] [] | fileutils | [] [] [] | findutils | [] [] [] [] [] [] | flex | [] [] [] [] | gas | [] | gawk | [] [] [] [] | gcal | [] | gcc | [] [] | gettext | [] [] [] [] [] | gettext-runtime | [] [] [] [] [] | gettext-tools | [] [] | gimp-print | [] [] [] [] [] | gliv | | glunarclock | [] [] [] | gnucash | () [] | gnucash-glossary | [] () [] | gnupg | [] () [] [] [] [] | gpe-calendar | [] | gpe-conf | [] | gpe-contacts | [] | gpe-edit | | gpe-login | [] | gpe-ownerinfo | [] | gpe-sketchbook | [] | gpe-timesheet | | gpe-today | [] | gpe-todo | [] | gphoto2 | [] [] [] [] | gprof | [] [] | gpsdrive | () () () | grep | [] [] [] [] [] | gretl | [] | hello | [] [] [] [] [] [] | id-utils | [] [] | indent | [] [] [] [] | jpilot | [] [] [] [] | jwhois | [] | kbd | [] [] [] [] [] | ld | [] [] | libc | [] [] [] [] [] [] | libgpewidget | [] | libiconv | [] [] [] [] [] | lifelines | [] () | lilypond | [] | lingoteach | | lingoteach_lessons | () () | lynx | [] [] [] [] | m4 | [] [] [] [] | mailutils | [] [] | make | [] [] [] | man-db | [] () [] [] () | mysecretdiary | [] [] [] | nano | [] () [] [] [] | nano_1_0 | [] () [] [] [] | opcodes | [] [] | parted | [] [] [] [] [] | ptx | [] [] [] [] [] | python | | radius | | recode | [] [] [] [] [] [] | screem | | sed | [] [] [] [] [] | sh-utils | [] [] [] | sharutils | [] [] [] [] [] [] | sketch | [] () [] | soundtracker | [] [] [] | sp | [] | tar | [] [] [] [] | texinfo | [] [] [] [] | textutils | [] [] [] [] | tin | () () | util-linux | [] [] [] [] [] | vorbis-tools | [] [] [] | wastesedge | () | wdiff | [] [] [] [] | wget | [] [] [] [] [] [] [] | xchat | [] [] [] | xpad | | +-------------------------------------------+ am az be bg ca cs da de el en en_GB eo es 0 1 4 2 31 17 54 60 14 1 4 12 56 et fa fi fr ga gl he hr hu id it ja ko +----------------------------------------+ a2ps | [] [] [] () () | aegis | | anubis | [] | ap-utils | [] | bash | [] [] | batchelor | [] | bfd | [] [] | binutils | [] [] | bison | [] [] [] [] | bluez-pin | [] [] [] [] | clisp | | clisp | [] | coreutils | [] [] [] [] | cpio | [] [] [] [] | darkstat | () [] [] [] | diffutils | [] [] [] [] [] [] [] | e2fsprogs | | enscript | [] [] | error | [] [] [] [] | fetchmail | [] | fileutils | [] [] [] [] [] | findutils | [] [] [] [] [] [] [] [] [] [] [] | flex | [] [] | gas | [] | gawk | [] [] | gcal | [] | gcc | [] | gettext | [] [] [] | gettext-runtime | [] [] [] [] | gettext-tools | [] | gimp-print | [] [] | gliv | () | glunarclock | [] [] [] [] | gnucash | [] | gnucash-glossary | [] | gnupg | [] [] [] [] [] [] [] | gpe-calendar | [] | gpe-conf | | gpe-contacts | [] | gpe-edit | [] [] | gpe-login | [] | gpe-ownerinfo | [] [] [] | gpe-sketchbook | [] | gpe-timesheet | [] [] [] | gpe-today | [] [] | gpe-todo | [] [] | gphoto2 | [] [] [] | gprof | [] [] | gpsdrive | () [] () () | grep | [] [] [] [] [] [] [] [] [] [] [] | gretl | [] | hello | [] [] [] [] [] [] [] [] [] [] [] [] [] | id-utils | [] [] [] | indent | [] [] [] [] [] [] [] [] | jpilot | [] () | jwhois | [] [] [] [] | kbd | [] | ld | [] | libc | [] [] [] [] [] [] | libgpewidget | [] [] [] | libiconv | [] [] [] [] [] [] [] [] | lifelines | () | lilypond | [] | lingoteach | [] [] | lingoteach_lessons | | lynx | [] [] [] [] | m4 | [] [] [] [] | mailutils | | make | [] [] [] [] [] [] | man-db | [] () () | mysecretdiary | [] [] | nano | [] [] [] [] | nano_1_0 | [] [] [] [] | opcodes | [] [] | parted | [] [] [] | ptx | [] [] [] [] [] [] [] | python | | radius | | recode | [] [] [] [] [] [] | screem | | sed | [] [] [] [] [] [] [] [] | sh-utils | [] [] [] [] [] [] | sharutils | [] [] [] [] [] | sketch | [] | soundtracker | [] [] [] | sp | [] () | tar | [] [] [] [] [] [] [] [] [] | texinfo | [] [] [] [] | textutils | [] [] [] [] [] | tin | [] () | util-linux | [] [] [] [] () [] | vorbis-tools | [] | wastesedge | () | wdiff | [] [] [] [] [] | wget | [] [] [] [] [] [] [] [] | xchat | [] [] [] | xpad | | +----------------------------------------+ et fa fi fr ga gl he hr hu id it ja ko 20 1 15 73 14 24 8 10 30 31 19 31 9 lg lt lv ms nb nl nn no pl pt pt_BR ro +----------------------------------------+ a2ps | [] [] () () () [] [] | aegis | () | anubis | [] [] | ap-utils | () | bash | [] | batchelor | | bfd | | binutils | | bison | [] [] [] [] | bluez-pin | [] | clisp | | clisp | [] | coreutils | [] | cpio | [] [] [] | darkstat | [] [] [] [] | diffutils | [] [] [] | e2fsprogs | | enscript | [] [] | error | [] [] | fetchmail | () () | fileutils | [] | findutils | [] [] [] [] | flex | [] | gas | | gawk | [] | gcal | | gcc | | gettext | [] | gettext-runtime | [] | gettext-tools | | gimp-print | [] | gliv | [] | glunarclock | [] | gnucash | | gnucash-glossary | [] [] | gnupg | | gpe-calendar | [] [] | gpe-conf | [] [] | gpe-contacts | [] | gpe-edit | [] [] | gpe-login | [] [] | gpe-ownerinfo | [] [] | gpe-sketchbook | [] [] | gpe-timesheet | [] [] | gpe-today | [] [] | gpe-todo | [] [] | gphoto2 | | gprof | [] | gpsdrive | () () () | grep | [] [] [] [] | gretl | | hello | [] [] [] [] [] [] [] [] [] | id-utils | [] [] [] | indent | [] [] [] | jpilot | () () | jwhois | [] [] [] | kbd | | ld | | libc | [] [] [] [] | libgpewidget | [] [] | libiconv | [] [] | lifelines | | lilypond | [] | lingoteach | | lingoteach_lessons | | lynx | [] [] | m4 | [] [] [] [] | mailutils | | make | [] [] | man-db | [] | mysecretdiary | [] | nano | [] [] [] [] | nano_1_0 | [] [] [] [] | opcodes | [] [] [] | parted | [] [] [] | ptx | [] [] [] [] [] [] [] | python | | radius | | recode | [] [] [] | screem | | sed | [] [] | sh-utils | [] | sharutils | [] | sketch | [] | soundtracker | | sp | | tar | [] [] [] [] [] [] | texinfo | [] | textutils | [] | tin | | util-linux | [] [] | vorbis-tools | [] [] | wastesedge | | wdiff | [] [] [] [] | wget | [] [] [] | xchat | [] [] | xpad | [] | +----------------------------------------+ lg lt lv ms nb nl nn no pl pt pt_BR ro 0 0 2 11 7 26 3 4 18 15 34 34 ru sk sl sr sv ta tr uk vi wa zh_CN zh_TW +-------------------------------------------+ a2ps | [] [] [] [] [] | 16 aegis | () | 0 anubis | [] [] | 5 ap-utils | () | 1 bash | [] | 7 batchelor | | 1 bfd | [] [] [] | 7 binutils | [] [] [] | 7 bison | [] [] | 13 bluez-pin | | 7 clisp | | 0 clisp | | 5 coreutils | [] [] [] [] [] | 14 cpio | [] [] [] | 13 darkstat | [] () () | 9 diffutils | [] [] [] [] | 21 e2fsprogs | [] | 3 enscript | [] [] [] | 11 error | [] [] [] | 14 fetchmail | [] | 7 fileutils | [] [] [] [] [] [] | 15 findutils | [] [] [] [] [] [] | 27 flex | [] [] [] | 10 gas | [] | 3 gawk | [] [] | 9 gcal | [] [] | 4 gcc | [] | 4 gettext | [] [] [] [] [] [] | 15 gettext-runtime | [] [] [] [] [] [] | 16 gettext-tools | [] [] | 5 gimp-print | [] [] | 10 gliv | | 1 glunarclock | [] [] [] | 11 gnucash | [] [] | 4 gnucash-glossary | [] [] [] | 8 gnupg | [] [] [] [] | 16 gpe-calendar | [] | 5 gpe-conf | | 3 gpe-contacts | [] | 4 gpe-edit | [] | 5 gpe-login | [] | 5 gpe-ownerinfo | [] | 7 gpe-sketchbook | [] | 5 gpe-timesheet | [] | 6 gpe-today | [] | 6 gpe-todo | [] | 6 gphoto2 | [] [] | 9 gprof | [] [] | 7 gpsdrive | [] [] | 3 grep | [] [] [] [] | 24 gretl | | 2 hello | [] [] [] [] [] | 33 id-utils | [] [] [] | 11 indent | [] [] [] [] | 19 jpilot | [] [] [] [] [] | 10 jwhois | () () [] [] | 10 kbd | [] [] | 8 ld | [] [] | 5 libc | [] [] [] [] | 20 libgpewidget | | 6 libiconv | [] [] [] [] [] [] | 21 lifelines | [] | 2 lilypond | [] | 4 lingoteach | | 2 lingoteach_lessons | () | 0 lynx | [] [] [] [] | 14 m4 | [] [] [] | 15 mailutils | | 2 make | [] [] [] [] | 15 man-db | [] | 6 mysecretdiary | [] [] | 8 nano | [] [] [] | 15 nano_1_0 | [] [] [] | 15 opcodes | [] [] | 9 parted | [] [] | 13 ptx | [] [] [] | 22 python | | 0 radius | | 0 recode | [] [] [] [] | 19 screem | [] | 1 sed | [] [] [] [] [] | 20 sh-utils | [] [] [] | 13 sharutils | [] [] [] [] | 16 sketch | [] | 5 soundtracker | [] | 7 sp | [] | 3 tar | [] [] [] [] [] | 24 texinfo | [] [] [] [] | 13 textutils | [] [] [] [] [] | 15 tin | | 1 util-linux | [] [] | 14 vorbis-tools | [] | 7 wastesedge | | 0 wdiff | [] [] [] [] | 17 wget | [] [] [] [] [] [] [] | 25 xchat | [] [] [] | 11 xpad | | 1 +-------------------------------------------+ 50 teams ru sk sl sr sv ta tr uk vi wa zh_CN zh_TW 97 domains 32 19 16 0 56 0 48 10 1 1 12 23 913 Some counters in the preceding matrix are higher than the number of visible blocks let us expect. This is because a few extra PO files are used for implementing regional variants of languages, or language dialects. For a PO file in the matrix above to be effective, the package to which it applies should also have been internationalized and distributed as such by its maintainer. There might be an observable lag between the mere existence a PO file and its wide availability in a distribution. If May 2003 seems to be old, you may fetch a more recent copy of this `ABOUT-NLS' file on most GNU archive sites. The most up-to-date matrix with full percentage details can be found at `http://www.iro.umontreal.ca/contrib/po/HTML/matrix.html'. Using `gettext' in new packages =============================== If you are writing a freely available program and want to internationalize it you are welcome to use GNU `gettext' in your package. Of course you have to respect the GNU Library General Public License which covers the use of the GNU `gettext' library. This means in particular that even non-free programs can use `libintl' as a shared library, whereas only free software can use `libintl' as a static library or use modified versions of `libintl'. Once the sources are changed appropriately and the setup can handle the use of `gettext' the only thing missing are the translations. The Free Translation Project is also available for packages which are not developed inside the GNU project. Therefore the information given above applies also for every other Free Software Project. Contact `translation@iro.umontreal.ca' to make the `.pot' files available to the translation teams. zapping-0.10cvs6/pixmaps/ 777 764 144 0 10443536350 10475 5zapping-0.10cvs6/pixmaps/up.h 644 764 144 2222 10433067453 11266 /* Generated file, do not edit! */ /* GdkPixbuf RGBA C-Source image dump 1-byte-run-length-encoded */ static const GdkPixdata up_png = { 0x47646b50, /* Pixbuf magic: 'GdkP' */ 24 + 220, /* header length + pixel_data length */ 0x2010002, /* pixdata_type */ 40, /* rowstride */ 10, /* width */ 10, /* height */ /* pixel_data: */ (guint8 *) "\204\320\324\320\0\202\0\0\0\377\210\320\324\320\0\202\0\0\0\377\207" "\320\324\320\0\4\0\0\0\377\357\364\327\377\271\271\244\377\0\0\0\377" "\206\320\324\320\0\4\0\0\0\377\357\364\327\377\271\271\244\377\0\0\0" "\377\205\320\324\320\0\1\0\0\0\377\202\357\364\327\377\3\351\356\321" "\377\271\271\244\377\0\0\0\377\204\320\324\320\0\6\0\0\0\377\357\364" "\327\377\351\356\321\377\344\350\314\377\271\271\244\377\0\0\0\377\203" "\320\324\320\0\10\0\0\0\377\357\364\327\377\351\356\321\377\344\350\314" "\377\336\342\307\377\331\334\302\377\271\271\244\377\0\0\0\377\202\320" "\324\320\0\13\0\0\0\377\357\364\327\377\344\350\314\377\336\342\307\377" "\331\334\302\377\323\326\275\377\271\271\244\377\0\0\0\377\320\324\320" "\0\0\0\0\377\357\364\327\377\207\271\271\244\377\213\0\0\0\377", }; zapping-0.10cvs6/pixmaps/saturation.h 644 764 144 4214 10433067454 13037 /* Generated file, do not edit! */ /* GdkPixbuf RGBA C-Source image dump 1-byte-run-length-encoded */ static const GdkPixdata saturation_png = { 0x47646b50, /* Pixbuf magic: 'GdkP' */ 24 + 614, /* header length + pixel_data length */ 0x2010002, /* pixdata_type */ 96, /* rowstride */ 24, /* width */ 24, /* height */ /* pixel_data: */ (guint8 *) "\272\0\0\0\0\204\1\0\1\377\222\0\0\0\0\202\1\0\1\377\202\377\323\323" "\377\202\377\0\0\377\202\1\0\1\377\217\0\0\0\0\1\1\0\1\377\202\377\323" "\323\377\206\377\0\0\377\1\1\0\1\377\216\0\0\0\0\2\1\0\1\377\377\323" "\323\377\207\377\0\0\377\2\1\0\1\377\0\0\0\77\214\0\0\0\0\2\1\0\1\377" "\377\323\323\377\211\377\0\0\377\1\1\0\1\377\214\0\0\0\0\2\1\0\1\377" "\377\323\323\377\211\377\0\0\377\2\1\0\1\377\0\0\0\77\213\0\0\0\0\1\1" "\0\1\377\212\377\0\0\377\2\1\0\1\377\0\0\0\77\213\0\0\0\0\1\1\0\1\377" "\212\377\0\0\377\2\1\0\1\377\0\0\0\77\212\0\0\0\0\202\1\0\1\377\202\0" "\377\0\377\210\377\0\0\377\202\1\0\1\377\210\0\0\0\0\202\1\0\1\377\202" "\323\377\323\377\204\0\377\0\377\205\377\0\0\377\203\0\0\377\377\202" "\1\0\1\377\205\0\0\0\0\1\1\0\1\377\202\323\377\323\377\207\0\377\0\377" "\202\377\0\0\377\207\0\0\377\377\1\1\0\1\377\204\0\0\0\0\2\1\0\1\377" "\323\377\323\377\210\0\377\0\377\211\0\0\377\377\2\1\0\1\377\0\0\0\77" "\202\0\0\0\0\2\1\0\1\377\323\377\323\377\210\0\377\0\377\213\0\0\377" "\377\1\1\0\1\377\202\0\0\0\0\2\1\0\1\377\323\377\323\377\210\0\377\0" "\377\213\0\0\377\377\4\1\0\1\377\0\0\0\77\0\0\0\0\1\0\1\377\211\0\377" "\0\377\213\0\0\377\377\4\1\0\1\377\0\0\0\77\0\0\0\0\1\0\1\377\211\0\377" "\0\377\213\0\0\377\377\2\1\0\1\377\0\0\0\77\202\0\0\0\0\1\1\0\1\377\211" "\0\377\0\377\211\0\0\377\377\1\1\0\1\377\202\0\0\0\77\202\0\0\0\0\1\1" "\0\1\377\210\0\377\0\377\202\1\0\1\377\210\0\0\377\377\2\1\0\1\377\0" "\0\0\77\204\0\0\0\0\202\1\0\1\377\204\0\377\0\377\202\1\0\1\377\202\0" "\0\0\77\202\1\0\1\377\204\0\0\377\377\202\1\0\1\377\202\0\0\0\77\205" "\0\0\0\0\3\0\0\0\77\1\0\1\377\0\0\0\377\202\1\0\1\377\203\0\0\0\77\202" "\0\0\0\0\1\0\0\0\77\204\1\0\1\377\203\0\0\0\77\210\0\0\0\0\204\0\0\0" "\77\206\0\0\0\0\204\0\0\0\77\234\0\0\0\0", }; zapping-0.10cvs6/pixmaps/gnome-session.png 644 764 144 5335 7400267204 13751 PNG  IHDR00WgAMA abKGD pHYs."."ݒtIME 01 ZIDATx{pT?d7لy  T(2xDHb,&􏜻,yo9~,|G%aZhc؟D"Oڮ>ߴ'"gm} &HCuZZ@$fτ $)@l]ԤL ܽ{w˷.jʜ큯ܽ3jC\^D|`qkg[,IG¡+j%1iJH)/Pt]j 4 x_ʒ,xg|j.tR^uu@ hYx[CDg^Uq/Pfdua&+W4MV^u!dQp'O&77.}>@7Wi^_ GhЕӶ\:xRJ @Jx<>C9BrtŀBGo~$wfX ҀCU |//n-J`PK4gͮI@CiZ+ɦ#kjjbٲe=R2;8p@}9tf׾C9>ƾWՆLo_qee̼ڇv-|bhe_1oun3f`9D lZWE|>RY 0X~2}E GsYeމi{hmޮ9a|>Μ9u0? "00 V'otΊ]v9J %h׳bŊ(R1 baò [B+_IQ-4ܮ́w0+DHKKcƌ8aQ_쐊ݣwVn 0Ϛҍ=jU9q 6;`h1`0iQs8H)zx^4kg (lp60x23R58GH)CJIMMM]&L4M233xN>2?"E|>ޔ"QCSFR0Z1d֘6m^R"2q +-[TL-xnŀf1 } 7M },å;Aɡ*+"Q[DC)((mź9Ӝ:*M2cn.p+0PMk&XTWe[Wy46G"@>bc)Ta O(EڸRٕTI&C0N{щBjSomBzȶO1Ja4Hӹ*t W1Q ԪD 5;{aKrV$Bv 2ӱH@ V(^[hF8^Tk!&%#pz QhҗTSv$f/Rߏ+Ņ!%%˅pFL o喛' WnR~՜Tp8|٫P> ^h0{* Q0 ի~4)Dˬe_wopjP7@VqCSQlkV֭#j*#QJبh%206q_wmL6T/6'h?z(&&ٺ=rRի%tS;_NNNҢBcMr0eĥ7scXÀeciңίzo*kfB*+ico41(!* HR:Cf,lJݣ VXDOˀ9iҤCï^hl`?{Vn .tO?6m Kdphq̠韻x&톛8kF-ޥ3?|g_uSGuvs9s7g.;G4^p}zhԢ>7"5Žh< aQEF#KF5?~ECGU[DH:ү;gf2)D>ceBk,˙?hؼ 4W X^PjoۋTU iL˝@o ޶g̾ ZF"/}rQX[8_h}fz'͌ ^8$h0ҕW,+l| ppq"gz;ե з?.%v2.xzsw15aw\!Y@޶mb/Gtأ(޸q>Y&xဤ]|*kԸԑm }»r-Ԩ?~{:UmeiOc:U':i:K$"M+{v/!똦3 #; W V_3I+W (++;m'*ԞΖ@o1?XbUiUU wA%*)a9:qd5^~Ys).?6k~ f69KIENDB`zapping-0.10cvs6/pixmaps/video.png 644 764 144 1142 7762173332 12272 PNG  IHDRJ~sgAMA a pHYs  d_IDATxkSQܓ4-M 5UJV`q.8uqtTD nǠN(BԖIz{9CH,އADRPż`O}(hK 蓴*j")VM \c{ ):L̜Շ}8k3ɞ^k:ֱksu@hw0}SOwV(M( v^ |o?m-0|xB VJO(C`/І|5(ʞE"e% <~fG^׼Pf6l@<X,F8&b&---ytud2XTd2eQ(bw#p+Fٳٲe XH$B(4M <umRSSSZ@ hllFH.zbX0lB픮@#hml WaT !0D"08}|k׮UDdd2 Yps\݋/޽cvvfv299I&}&Y S n(O.R#GV*6Ruy1|tSsٴiLLLT۶kjK!̌߿?8} HfJ x\~۶i5yofbb_ctVw "DB߿_#keO?p"ݻ޽{ל|P19x(eIGG\pA&&&$u]K|l޼cKR|n~ |Iww7b``{Uv/(ZY<( Xś7ox9###<|W^9cO?Nu]WG8:;;I$TVJ܌id2Dq'ˑJaffi$eav  W Oա1}SltJ%nEhAЅ/5?!W/A_,mFK}FW&n ٠}7h7e)@XO> ա|6X>tYLE ֱugLOL@IENDB`zapping-0.10cvs6/pixmaps/hue.h 644 764 144 4430 10433067454 11427 /* Generated file, do not edit! */ /* GdkPixbuf RGBA C-Source image dump 1-byte-run-length-encoded */ static const GdkPixdata hue_png = { 0x47646b50, /* Pixbuf magic: 'GdkP' */ 24 + 636, /* header length + pixel_data length */ 0x2010002, /* pixdata_type */ 96, /* rowstride */ 24, /* width */ 24, /* height */ /* pixel_data: */ (guint8 *) "\351\0\0\0\0\206\0\0\0\377\220\0\0\0\0\202\0\0\0\377\204\377\246\246" "\377\2\377~\177\377\377\0\2\377\202\0\0\0\377\4\0\0\0\0\0\377\377\0\0" "\377\0\0\377\377\0\0\211\0\0\0\0\3\0\0\0\377\377\377\377\377\377\377" "\363\377\206\377\0\2\377\202\375\0\377\377\1\0\0\0\377\203\0\377\0\0" "\210\0\0\0\0\1\0\0\0\377\202\377\377\377\377\1\377\377\0\377\205\377" "\0\2\377\204\375\0\377\377\3\0\0\0\377\0\377\0\0\377\377\0\0\210\0\0" "\0\0\2\0\0\0\377\377\377\363\377\203\377\377\0\377\204\377\0\2\377\204" "\375\0\377\377\3\0\0\0\377\0\0\0\77\0\377\0\0\207\0\0\0\0\2\0\0\0\377" "\377\377\360\377\204\377\377\0\377\203\377\0\2\377\206\375\0\377\377" "\2\0\0\0\377\377\377\0\0\206\0\0\0\0\3\377\377\0\0\0\0\0\377\377\377" "\360\377\205\377\377\0\377\202\377\0\2\377\206\375\0\377\377\2\0\0\0" "\377\0\0\0\77\206\0\0\0\0\3\0\377\0\0\0\0\0\377\377\377\360\377\205\377" "\377\0\377\1\377\0\2\377\207\375\0\377\377\2\0\0\0\377\0\0\0\77\206\0" "\0\0\0\3\377\377\0\0\0\0\0\377\322\376\246\377\206\177\376\0\377\1\0" "\377\377\377\206\0\3\377\377\2\0\0\0\377\0\0\0\77\206\0\0\0\0\3\0\377" "\0\0\0\0\0\377\276\376~\377\205\177\376\0\377\202\0\377\377\377\206\0" "\3\377\377\2\0\0\0\377\0\0\0\77\206\0\0\0\0\2\377\377\0\0\0\0\0\377\206" "\177\376\0\377\203\0\377\377\377\205\0\3\377\377\2\0\0\0\377\0\0\0\77" "\206\0\0\0\0\3\0\377\0\0\377\377\0\0\0\0\0\377\204\177\376\0\377\204" "\0\377\377\377\204\0\3\377\377\1\0\0\0\377\202\0\0\0\77\206\0\0\0\0\202" "\377\377\0\0\1\0\0\0\377\204\177\376\0\377\205\0\377\377\377\203\0\3" "\377\377\3\0\0\0\377\0\0\0\77\0\377\0\0\206\0\0\0\0\4\0\377\0\0\377\377" "\0\0\377\0\0\0\0\0\0\377\202\177\376\0\377\206\0\377\377\377\202\0\3" "\377\377\1\0\0\0\377\202\0\0\0\77\1\377\377\0\0\206\0\0\0\0\203\377\377" "\0\0\1\377\0\0\0\202\0\0\0\377\206\0\377\377\377\202\0\0\0\377\202\0" "\0\0\77\202\0\377\0\0\213\0\0\0\0\1\0\0\0\77\206\0\0\0\377\203\0\0\0" "\77\220\0\0\0\0\206\0\0\0\77\320\0\0\0\0", }; zapping-0.10cvs6/pixmaps/right.h 644 764 144 2756 10433067453 11773 /* Generated file, do not edit! */ /* GdkPixbuf RGBA C-Source image dump 1-byte-run-length-encoded */ static const GdkPixdata right_png = { 0x47646b50, /* Pixbuf magic: 'GdkP' */ 24 + 335, /* header length + pixel_data length */ 0x2010002, /* pixdata_type */ 40, /* rowstride */ 10, /* width */ 10, /* height */ /* pixel_data: */ (guint8 *) "\202\0\0\0\377\206\320\324\320\0\202\0\0\0\0\4\0\0\0\377\357\364\327" "\377\0\0\0\267\0\0\0\307\202\320\324\320\0\202\0\0\0\0\3\355\362\325" "\0\0\0\0\0\0\0\0\377\203\357\364\327\377\12\0\0\0\377\0\0\0\267\0\0\0" "\0\271\271\244\0\357\364\327\0\0\0\0\0\0\0\0\377\357\364\327\377\341" "\345\312\377\335\340\306\377\202\357\364\327\377\202\0\0\0\377\10\357" "\364\327\0\0\0\0\0\0\0\0\377\357\364\327\377\335\340\306\377\330\333" "\301\377\323\326\275\377\317\321\271\377\202\357\364\327\377\10\0\0\0" "\377\0\0\0\203\0\0\0\377\357\364\327\377\330\333\301\377\323\326\275" "\377\317\321\271\377\312\314\265\377\202\271\271\244\377\203\0\0\0\377" "\3\357\364\327\377\323\326\275\377\317\321\271\377\202\271\271\244\377" "\202\0\0\0\377\4\357\364\327\0\0\0\0\0\0\0\0\377\357\364\327\377\202" "\271\271\244\377\202\0\0\0\377\6\315\317\270\0\321\324\274\0\357\364" "\327\0\0\0\0\0\0\0\0\377\357\364\327\377\202\0\0\0\377\6\301\302\254" "\0\305\307\260\0\311\313\264\0\315\317\270\0\357\364\327\0\0\0\0\0\202" "\0\0\0\377\10\0\0\0\0\271\271\244\0\275\276\250\0\301\302\254\0\305\307" "\260\0\311\313\264\0\357\364\327\0\0\0\0\0", }; zapping-0.10cvs6/pixmaps/reveal.png 644 764 144 464 7762173332 12430 PNG  IHDRw=gAMA a pHYs  IDATx; 6;%rvTAotWQQ٢@$ PDyiLK.qxz)@SB*JY0XED8OQ<DlPMa ~r_}:`/|11eQڅ&?7n8IENDB`zapping-0.10cvs6/pixmaps/left.png 644 764 144 413 7341255231 12066 PNG  IHDR 2ϽgAMA a pHYs  #uIDATx1 0hG"P!!DХPܺKA^Ip?Β uV政o%i >)Џ[mL:.\1et\(TuDҍFvLsL9[APT y1WC`ݿIENDB`zapping-0.10cvs6/pixmaps/interlace48.png 644 764 144 6650 10167772035 13335 PNG  IHDR00WgAMA a pHYs  @A JIDATxۯT~?g[n$2ZÝR.`FPNEU U}@43J  LG Iu_e{٫Mԗ.駵.[3mz+ʠ7IMo!H_VM:t(ɟeP)]wkV#_eMt8~-uС&G9@P@ DĹ=ņD`oOQ{ V1vѣ?! >#W*l "οvZСCٶMYxy;v4- AD9ʒ1AY$I2`{[- 7n@:nM:}R%~gsu Žd5:h++xoJf( 17!Ph/U6@4J tJŨ|ě#r{z܅i;y띷6x4ACvҪ9s\HWᵷyo}]DZש!~~/=*H5Xi *:8 a$ e BVk߽_xJQps𚱘y0Ʈ4-ީzКPDi&KF]A PE<(Ķ-0OM_"T!@%00ruXZ[bY˅g  D!Sq1M8SH \4 T,UDĮDF)(hT謦gLV> $2a.g:qe0* !3gOϓ{}Z`PA@enp zIHX,εmAJێI0 ' QQ:٪Tc(0M mpٿZorįY}7]ߍpvVH).hq5nߴهld%MQ8 PJBWǶ>aI|Ņ"MS|?t7KCdZ4M.a-Z*,Ol% &[{7AhObǭƏN2k2 I$q)O?8;OaY=R\^^nghLY!T!" ` m$ ?:KKKͻq#T@DXFo 4Th,0DB[jМa aQoL!tf ͦ$.2gS I %5iح:ó~%,BQ$ۜz)BGލrm_j7i>۷g/L8ʻ )$x ܆U ULŪqpl/q0}(a@},.'DiFl6+VV_*Mg10M&DJt:̶fٶ֊nւ@zԪsڵԪ ~zm#]wC$Ө{h!X1 AjfsV#$ʈL&(oҒDQ\o"À0h4H:tsH?df6~ySR=ͅ64EXtN­A[q)L6aK,@,QaYJ),BTbQ@P3Ǭ{-dKVOmKfc jmDH_MD|YR_Qf0aGףy=Pߠyǘu=eO[R3!Aاb4mBք1PڻAOz4s{Rjνw?d\#J,?6Nb4[S#?콦޽nm[DQ@DԜRhabr $4чPu¥Zm٧; ?࣏s>>͞{IRNΟ[c1$q%E/ *&_b`8twɯN3ϳm; ^{EfҨ]?G~zʷxVÕ+KwÁ;o_Kjs[5@*֚4"$ٟrmAXF5>ն̴IcMD1M4yJ͌xjN&2r{X]n%_7D[$C"5l&$v\ffnOq"emUajAr|/n'^ˀc4O<ZĤuŕ+hwn5AR R#3y^\8 !APڢ' jD0A)E$$a[Q\/)Uʑ}_οp:JJ*# /T4>|8 rg֙kx *}TM *¢utcbк$mqLE,y \ր.Ybb@̻dPs׮w 5SHAbMDõ[%Q"HChCfHD2&MSbZ_fAj7^yu` \. (S,Ye`g.;m|I"n'hٵL8~Ccv( X[S+vXs-(WtF,fffX, Ӵte~Ҭ:$EwqE/XL7 jYMȮ[z9\:a)~SW 990>oniֶZ54a`DFbh :( RtG1aե\Yϯ_k9 -0,1*"IsfNM՚KN$"4Dą8ZijF V-aZcb b8PܣUF([VVt e&v>dtld3J7KFe(SN?'-0Z} 7ؤX| Čܪ\`BSA`]`壦g^|t2:I'm%$4/4W>[WէLrbÏVP]Y|6ܷk$cRmJHE=nH+ϒ㧉gd/JJoDP~'(dl| kظbpj8O-mWPIENDB`zapping-0.10cvs6/pixmaps/gnome-digital-camera.png 644 764 144 7013 7762173332 15135 PNG  IHDR00W IDATxkl\ez9s_Nq.xm~, (_RT H|J|i~B芛Jea j.e7b8{|vf93Ǝò^{?n7MGN !PL&~O}sĉ\^^׮]eI)ek"o)y晣_7 2 c4MZib&px!~,oat]\(w O'P.u"i=qL#(ʏfffGFFx7B ĭ5CJI^'4 oS sssc xRn @1im'ethhhR9988H>'K 7xGrO8tz!ʕ+nIuirbbBB!s[n B2 P(t[k1h4y?ɐZɶ퇁6z(qۇH&ܼyh4mۣF#@ -Ȍ{%38288/Apw$ J=@?PCϓ͛Z<wKO, UU9|v,\.399Ʌ 8{w);v,kQLc@-FyB ޽{u]$ dxxqfffx"cbw}i;kZauu5)PÑHӡD11@ @^_Buj#1*v._?O$auu^zG}uEA}}}ŋ,H$ixG:faa{Z8i\yqţGfpp>ȤݹOIP $cx]IRtvvh4-&''Rh4BB__Tj~yyh4(SSSxAFFF`ǎ~?r;-Ouݝ452eN~gΜfz򺞱J9sn,b~~%z{{R"lh8=\cq>$ BTBA RPd2E4M^o<|*wJ6v׮4v]S')+4 LgŲ,8 ضM@SQ`4װ*VLVdlVVbRXXX`qqp8LOOϗѫWw֪qR:j5jCT&Z/(Wm._{ eJ""=;L8N ([%R.M_b}qk-+$RR"I u"HBg3erj\Ta(ȬQKfehgJ1a_]JHH)"mz-4+8}l᝻DdaMz~΍%vF4cp5_^*(F|f]-U$6^mGlvuvvbYUr&KIJ"=f7':C6p8LWn>CO!0eӔK%݉D!<4&'vYYIQȯqϡyf*@H$!( |rceGX"Ka5YͤNlE r!}q971LX0C(LMc?0 OƲ,E<!\dvӫv ~ׯU Em=yV ZT&MŮ8/Nr} ؏yWB!;FWWWq¡0|muSKe.^ȥKmpb I_ݵ\h҆hlc&U`:}.](PU~P(s=itttpUVhU狌P(PoHMh8NTX֮J&z{ B$ANJg,JjSVt]Gu( 9rRDRiH說Jus 4X%ۜ.nՅ T+z-?i:uE t9S1ǮBJٳg[Upyꌷ1a[Q61u],:.XT6KREJaBo"Gi̙IRAUUEizנ;wnhn 7>1oz]66UH$Boo/HSx^PPym~~RDGGiRVyx'1a$J*sd7۶ PH&'bhv]U,3Tx$)g]OU=ST*YLTUtM#JV̴WOeCyߓ_I}xM0'y,:.!`DHlu]lƲ, \l6K.c-FGB灦 ]f|~Br9fffVk&p3}o)UA4cRh mP*Y\[TΜ9a8 5v9BBUu=@W:n]Qq]'Onv}?ǧPCACvǎX4J('Vufd::T (Jy7q N !44]GT4EEglp}i _mW@k]ZveU怌OAV?@U~r BO7CY]ss!~z|tCL#_Rb"`K*5?&ܬHsD@/q\ѝwW8Et<顨*a`t0)54]Zp?=+VیRlڷ%&kt4]U횮asN_B볳]cM|X@on[oXDV4$D(EU@4WpgDJA(@ ~0\OFft:zUV b3f.imkRKof=5j4yWgV#/4VJJ[(m`e7`isTԶsmS>6Guodb [W5x?$Ӷ͎IENDB`zapping-0.10cvs6/pixmaps/subtitle48.png 644 764 144 3736 10305467520 13216 PNG  IHDR00WgAMA a pHYs  ~IDATx{PTǿ< "D-H"a F*RE4 $1VP:&*Dc0h*PBE$)J"(\vy.ݽAcL?3;sy{={RE3B +N0 }ݱ}wń04PX[)lwW|koTMӌ!ڀFݬ-UʮݼU~]dftY^s}AW}Ee\.O=LqC3]+ :kKA_m38f&mmVCS5 !2. PP899A i4 F\V477C&*A1E|'F0^y]ڇ}Ptb|!<<օУT*QQQ梧юܔ^w@͢M)F"W󼼼۷HTT*!==lOEk\qmw8>hɉHR0 1 TJ-[Fq)bƦ'Os̄N?M фODPX2^þ]ǎOۇ)bC222MDN>M8'| >|P׀H$';;PEp۫4#]wّ#GZ;˱c[ـI d,]h,j&2Onfs 3_ѧ 4\.iiiqAmAgæ|jG\pss#SZ=PxW5PPEBCCj_xнw,WZmۛMmrt_ Y` 6=<2LFCCC.lh46Ms@gVwy6]ܹæl ]}of;,p5]"Vz urfeA>6GKvv%$6 !8z肈|ll@?%W}6ljdi;t …X M[Ƨ-%L#Ix0yn9|`ck:?>lܸ555nȋ_ya|vf{`98""x;ϟ?Z www\|MM BBBPZZm z(s3}K#>ozw!!7g ee}TΣMkg_yY'SDjt|5OOO8;;VVV>44C"yϹKsgNtutýyݓS@!0 -#""F$;MnfPzfUՠ/^] jh\I&N$==qNN R @ ݁Dˬ L~}C̳[ǽ]KŲ;_ * 8ws\t}m b`2#2 MMMŨ(;1g}`_h&rjJ\.X.Z,c6(/scod%y/ӕŬxUs\$={+Ȏg2^lV F*>(Jqsq։/2Q O.zW;V8=SoXFa_Vҽ-$6+W~1گ|sb χ%/B\;IENDB`zapping-0.10cvs6/pixmaps/mute.png 644 764 144 663 7460206726 12124 PNG  IHDRw=gAMA a pHYs  ~UIDATx핽JA1I![nX"Vn|`@,7E AeI""B] %%I 3p=g mEtY~I o|URTJƤ¥LU&^Qn|fztb(:N:uVPV씒)sd})nuP@×v; u!JGfش^;1 &L#xD~O>p F=HA^t >i_\J8cE&>E'Ea׷'&5h},ߕm DCrIENDB`zapping-0.10cvs6/pixmaps/gnome-media-player.png 644 764 144 7357 7400267204 14645 PNG  IHDR00WbKGDCIDATx՚y%G}?U]͛kgvg5>0v Nb 0VP?B(H EJDXs-^ݯ*;YH)G~]߯?/_um; w $8߹z%X]=(ħ./\˥^BJ7%vB\֪ S׿ 7.X6Sƭp]T}82iC U6!8 >`=4;B\B|?"gٰkeUฐ(V0x|Gy;d|"eH2}NЉ K:&{($ca  c~Qlϲ[BF cx|慶{GqUl'{.!4< Hf@~DȘ۾w|PEC7\ *CÔ rP\#@.-,JfKg}tĎchd 6<Ħ!8Al[/%ؐ{}=9< Ek_$psFH4^Ǭufk.JEb)O/J馂^džHEL,CC}"Aoem{g4 vZYAŞj q`Ao 4þT ͎p!k-z!TK~P7:JR<|,MS'g=5 |Q/W˅W[(ppÍ!nǁﺍ׌s);s?ygOwoKo g_+ڽ _Z0=5|+\vbFFOZ}ױ{|nnnc'ڽK_@w$1WF |WBZP~wm:MK}6Tc-Xk0Vc T+E컖^LϝFa}\m\"I.]m|B0TRG>|JPS!zhmzy:0?z*e!? 2J$x)\/װroɏ9wq&NAJW{x>^ Ic,XtjPT, 9Z6ŢX /(IKB#.Ϲ# JSCoߺ~`n)r"I4X0ƐjMwUj\\Fg0ԫ%sm ]nyN )?G/|LmT g(}y\(}ZG/|jq6=JaH|?A8`ͦ+s̭?OۤmFi0?>_x3mLo[h5WŅZdj9[oJ- 2"P FZz{aI[ }`;W\(so>H"j/扣Up N!* "(4&{mb4SF?#{81;ZAV}b9SB3f$}џPܪ^ >.˽>Is)Fy׋Q^9^mkÇԧ?y_ԛ|{^s?ǟP. )#Ry]>qhq3iy>@(YkoBJ ̗A%p=Iu)5$\%>ȑ I;/]@u ^APh1c-{rcukeڽLH@X$eE[CenIbC[:Ϟ煐k1N9(6n5Z6 BRUn`oEt |w )+bF+xILSM&ǒ$})EKW)G$IZXch/@HA BXc@-b @8lQƾm+[8:utP-Iu)4%5~¾S{vsrD177SX>2E?\#;QhNA}YYLInC(BXID_f&:%IN_#U.j&v/.+ʵ|g;nAI iJ~.:3Qh&2 rN븸ݘ[}sGxƚG"i!Q?2pő|.p̰Ze^D/riOs'9yfNga₰Rǘq\4vɜ~ѵ#mlK)KJ1{ZܱTMymu=\$vW{rIq|j iGzٽN@Rʂ/!)LcV1cm9MӂF )p]hI!.YcƚvK] 䵏@OA^nI9NE*Y8 GGA7պ gZz:ﭲJRzq|k !h!DlM3I ]mƕfŷPC7`{q8+?{:Z9VIENDB`zapping-0.10cvs6/pixmaps/recordtb.h 644 764 144 13121 10433067454 12467 /* Generated file, do not edit! */ /* GdkPixbuf RGBA C-Source image dump 1-byte-run-length-encoded */ static const GdkPixdata recordtb_png = { 0x47646b50, /* Pixbuf magic: 'GdkP' */ 24 + 1774, /* header length + pixel_data length */ 0x2010002, /* pixdata_type */ 96, /* rowstride */ 24, /* width */ 24, /* height */ /* pixel_data: */ (guint8 *) "\1\0\0\0\0\214\0\0\0\1\213\0\0\0\0\17JJJ\377\0\0\0)\1\1\1\377\234G@\377" "\312rX\377\374\253\213\377\376\315\264\377\377\316\266\377\371\237\213" "\377\277\260\262\377STZ\377\1\1\1\225\1\1\1\227\0\0\0\6\0\0\0\3\211\0" "\0\0\0\1""666\377\202\1\1\1\377\10\216::\377\253K>\377\345\203d\377\377" "\261\227\377\363\254\223\377\325o\\\377\317\261\267\377OWd\377\202\1" "\1\1\377\3\0\0\0\31\0\0\0\13\0\0\0\2\210\0\0\0\0\2""666\377\0\0\0<\211" "\1\1\1\377\5\1\1\1\257\1\1\1\255\0\0\0""1\0\0\0\25\0\0\0\4\210\0\0\0" "\0\1""666\377\202\1\1\1\377\10)\10\2\377\215;$\377\264fL\377\317~c\377" "\360\240\205\377\373\255\222\377\330\265\266\377RXh\377\202\1\1\1\377" "\3\0\0\0""9\0\0\0\31\0\0\0\5\210\0\0\0\0\20""666\377\0\0\0E\1\1\1\377" "v3)\377\271dN\377\270hR\377\317\200h\377\345\230|\377\336\221u\377\265" "\247\257\377GJW\377\1\1\1\267\1\1\1\262\0\0\0:\0\0\0\31\0\0\0\5\210\0" "\0\0\0\1""666\377\202\1\1\1\377\10\242OB\377\315z`\377\333\210j\377\316" "|V\377\336\226s\377\344\232\200\377\243\245\262\377PPV\377\202\1\1\1" "\377\5\0\0\0;\0\0\0\34\0\0\0\7\0\0\0\2\0\0\0\1\206\0\0\0\0\24""666\377" "\0\0\0G\1\1\1\377\234G@\377\312rX\377\374\253\213\377\376\315\264\377" "\377\316\266\377\371\237\213\377\277\260\262\377STZ\377\0\0\0\270\11" "\6\10\271\13\10\13y\2\1\2o\21\16\21M\12\10\13\34\0\0\0\15\0\0\0\6\0\0" "\0\2\204\0\0\0\0\1""666\377\202\1\1\1\377\23\216::\377\253K>\377\345" "\203d\377\377\261\227\377\363\254\223\377\325o\\\377\316\260\266\377" "QXe\377@:3\377\216}u\377\300\247\243\377\327\306\264\377\233\215\177" "\377f\\U\363)$#\236\10\7\7-\0\0\0\17\0\0\0\5\0\0\0\1\202\0\0\0\0\2""6" "66\377\0\0\0F\207\1\1\1\377\20\23\20\21\377\222\210\205\377\366\350\332" "\377\346\320\273\377\325\267\264\377\334\312\270\377\270\247\227\377" "\313\267\247\377\272\257\225\377:9-\342\7\7\10K\0\0\0\24\0\0\0\5\0\0" "\0\1\0\0\0\0""666\377\202\1\1\1\377.)\10\2\377\215;$\377\264fL\377\317" "~c\377\357\240\205\377\276\205s\377\237\214\213\377\367\334\333\377\373" "\354\346\377\360\337\311\377\326\272\263\377\331\307\266\377\270\247" "\227\377\324\302\255\377\245\241|\377\213\211a\37764)\337\7\5\6<\0\0" "\0\22\0\0\0\4\0\0\0\0""666\377\0\0\0E\1\1\1\377v3)\377\271dN\377\270" "hR\377\317\200h\377\333\222w\377\200me\377\370\350\343\377\367\340\335" "\377\367\336\334\377\371\352\336\377\334\301\266\377\325\303\262\377" "\304\262\241\377\264\254\213\377\221\217f\377\251\233{\377\264\233\213" "\377#\34\34\241\1\1\1%\0\0\0\12\0\0\0\1""666\377\202\1\1\1\377D\242O" "B\377\315z`\377\333\210j\377\315{V\377\245qX\377\265\246\222\377\365" "\345\320\377\372\354\341\377\371\345\341\377\372\351\346\377\370\362" "\355\377\361\355\351\377\346\340\325\377\242\235z\377\277\250\221\377" "\344\306\271\377\357\335\315\377oja\346\12\12\11C\0\0\0\23\0\0\0\3\13" "\13\13\215\0\0\0H\1\1\1\245P$\40\254h<>\301\244\237\234\371\362\353\351\377\330\322\310\377\313" "\312\270\377\305\302\253\377\213\207u\374\7\7\7w\0\0\0$\0\0\0\11\0\0" "\0\1\0\0\0\3\202\0\0\0\4\202\0\0\0\5\22\4\3\4\14\21\16\21s\207{p\376" "\267\246\226\377\313\267\246\377\311\273\241\377\265\261\225\377\360" "\351\342\377\361\362\356\377\365\356\354\377\356\335\312\377\356\330" "\320\377\352\325\324\377\341\330\326\377ba`\357\11\10\12d\0\0\0!\0\0" "\0\10\206\0\0\0\0\22\4\2\4\3\16\10\16=E=;\344\327\303\260\377\277\264" "\226\377\230\226n\377\254\235\177\377\352\334\313\377\307\313\276\377" "\325\320\305\377\356\327\320\377\353\332\301\377\356\331\313\377\321" "\273\271\377!\34\37\305\4\4\4I\0\0\0\31\0\0\0\5\206\0\0\0\0\22\0\0\0" "\1\11\5\10\27\22\16\17\220miT\374\230\225n\377\227\221k\377\324\267\247" "\377\354\347\324\377\307\315\304\377\310\306\263\377\347\326\325\377" "\357\331\316\377\343\324\271\377SLE\361\14\12\13\177\2\1\1""0\0\0\0\20" "\0\0\0\3\207\0\0\0\0\21\4\1\3\5\12\7\11""7\16\16\15\265SR:\375\263\240" "\206\377\351\315\300\377\351\352\326\377\307\317\310\377\302\276\246" "\377\333\330\323\377\333\305\304\377VNI\365\16\14\12\241\5\3\4G\0\0\0" "\33\0\0\0\10\0\0\0\1\207\0\0\0\0\20\0\0\0\1\3\3\3\13\4\4\4B\11\10\10" "\244;0.\352\233\217\204\376\313\316\276\377\300\310\304\377\235\231\205" "\377qrm\374\"\37!\337\14\11\12\230\6\4\4M\0\0\0\"\0\0\0\14\0\0\0\3\211" "\0\0\0\0\16\0\0\0\1\1\1\1\12\6\5\5.\11\5\6i\20\16\16\240\14\14\14\301" "\1\2\3\311\15\14\15\275\10\7\11\233\7\5\7j\4\3\4<\0\0\0\35\0\0\0\15\0" "\0\0\4\213\0\0\0\0\14\0\0\0\1\0\0\0\5\3\1\1\22\10\7\6&\4\4\5:\1\1\1A" "\3\3\4>\3\3\4.\1\1\1\36\0\0\0\22\0\0\0\11\0\0\0\3\216\0\0\0\0\11\0\0" "\0\2\0\0\0\5\0\0\0\10\0\0\0\13\0\0\0\14\0\0\0\12\0\0\0\7\0\0\0\4\0\0" "\0\1\204\0\0\0\0", }; zapping-0.10cvs6/pixmaps/gnome-television.png 644 764 144 6656 7327357310 14464 PNG  IHDR00WgAMA abKGD pHYs  tIME:0y$ +IDATxߏEv??;/laAYJl"H(% 򔬒"kE (( 1{f}*}o̵tuvSUm6>?mUy#p ;Pv&Ξ=p+U=W9Bؠ^|ŤVk-T0ꫯnsܹr k n6;e`pEly7;+ @_8wܽXx'gf/6зꇜB^zio? 8gϞn?Nna ( BBT噽bW0RܢO>iR9ʹsUT>$WY)TW&fJ^2hg<1Aoo[:BjV~GDDkj.=wDr{7 dR?{￷ H|̓'i] J5fgɽ?q=b9f83 L<(v2@`o&2! %Vo`Ak<˸V V(o.tWHez1431Hu6MTjTL$瀕CI DRp U2 {?͝M&I$  %U)-0@6IBh a m1J0B=5i@X\rIR1D.RV! <a`a&8m;e<.\g)ʁ|F`ۆ l@BY9SZx$@azHl;1`Of I"wh4Q*C)(IJltѨJG6Wmq[|f^[~1k@؊fGx67ױ7pc @<7ZȦ,ɄH%D&¸c2 yeLFØ mrm۽mRhK<{ 6|ۡf40"em0@In~+nc I4k6v2! wwƑb?$zGؚ,B04 ıdg4 tb`3J"2I"3Jڦc`lnn|eq4!NT@hTA*xGI;?2-i.@t:-qIB0.v Ȋ.ⳉɊ dƵXƣ9x 2M tfX^Xg&NzK5vm,e48$`%'zTwRdj Q{(Ư+'G)E,#+w-.iȔ[m<קii !q:+xˡ<c]VV9la0F2)Sz;ԼzN [ 2 O? cc @%#Q3$Ɂn:X@x6։e V6Ds q(Y:~?m|y&&NǦؤPkx4WIf{k P(cq8*7ID;+8<Ky䱧p_>Χ<ǷΜ/i7\=L4qШ9DX'e)\F H02 F !#?<ݣ'+_y|b{υFcI$GMk5HTAr=U q)? qJHc }*z/q׉}dg<>9իt~}h]\ VvUVv ̏p,3\\PsώYAobzK_W_-p =Ǒ#B0|z<ǏM&XbnkĤi VBF D:$*E Hj!x54hr9q˲|2v ?q߽r%:V ˆp,cR(!V1t"<?J8y*ԵiL mc6<+H)eL@kÿ.Ϗ>a'Tl NZFc(Sl-y LS?i[؎͉T"nMu H)z\m|v&S\x퍔q?n$Nw.z:9D&yxoGSe) ەW~/_Lrbc ?Mc w0Ɣ N Mnn~1!2R0m ωӨ̬j;iE5BkJ),CeAjhZVM'7ͧ{5R!(%V +4 T~1i -VGgcT1pna6vG,!~4MI?_ ~!;B1P&5LhwGVcb9cDZci !ɒ-1I&Zc cgLDBhIc1h؀?6p X/v`@i}<\+G 9 <™_#KhZC.~N`:݆OkK_>80z.o.w-F:Q pV/l^@*%zqm["I9ABw趛 ymsaZحLBB3RRW `{=˞ixeH-+AtS qf @h&)a<6ۛ?]^a񭢿S,"R zN4eaK0bDVTc N泖cFz\R !t=fA@Yݷ:]eN[R!x鱑4 +)DXO:t)(ab• LݪZ`jѩpS`գ#d%addz[b\-,OĨLˉeOfZ&vU)?^ ]xչo5J 3R̞ f@T%ŋn>*="{Vcn>?=#PVϮQEU~H &^gel^ӷfAu7{jyv5b IENDB`zapping-0.10cvs6/pixmaps/screenshot.png 644 764 144 2413 7762173332 13343 PNG  IHDRw=gAMA a pHYs  ~IDATxՕoTN&m>nV:VL0 `v.X/FeKati5qN8  8ґs><{l2/ EoݺฮZ-͛7˗,,,؎H8riifW.&2cccnmmue0aFhrr{}W1/lQ(f2 ]ˮ~cYV'R؃2ZO6Fq0>MJ!DIJ,Y* { 7]t*Ulڶ;;;9`XyB9!Eo&T*b񈪪Bӂ{Չd2ɩSRs]V]4m۶˅B"|155e&A)7Gjq ޽K2dmm u}D"A.CJ(<|>33y3*οui.`vvD"#@`&! ʇfդ\)J)XE___p~~W)l4MΞ^3<|3GXYYI.Ϲ3,..211ng*U qqGQ u\oE fx<uFO։E"yX_{iZ %H}+-@'Ԝ]rۨ/s=%K}J)HP,0J!\ ܾ}|>aL"f'c`%ByDJGIT4-H@ `ת( f7EUT@!Jw, o+ 5qR j2==a s D1,pslʼnhF,oKKēiSIlfuu!D5OT*ջL^ kS>Z\^]퍽vnl|pd0:H]=blnnxeqֶ0 -%p(dz~2ڍУ(Po,>xo`@e}cǏV*_sWUm הz !bAMz[UVkQ6o (P<@Vڹ-s/2:D uNN8p~CKIENDB`zapping-0.10cvs6/pixmaps/brightness.png 644 764 144 516 7762173332 13320 PNG  IHDRw=gAMA a pHYs  ~IDATxT 0<m1A?&0y|$KI V+ U8kpx@kPVMDUagfE3H@J$"VBi'Vx(9kSжYw U,NtDI%i\s].rŁx$ <@ Ln؋Kn ޓWB>'9ĵHdivsqU3ZS%O1IENDB`zapping-0.10cvs6/pixmaps/recordtb.png 644 764 144 2617 7762173332 13000 PNG  IHDRw=gAMA a pHYs  ~1IDATxYl]gsι˱c_qmHZ;( Դ}jE*e*K$^ #ԐQ RFxI.r{ȩ;Ҽ}53u>>A}̙>gݿadA{w 0h""X^e_17:F](QI`4iDE`>2pwBxj_wu&z3%(TD#;u'цFST"MepQvumz6U7)&v\<<Qq' 8{12aQW#OaGjn}l'Ҽ+\ɖ/]~Ooq9iȹlmn|JRh]SG[oO~u7U 'a<14e5мAPgb& Vznl,%u,2`X\^Z|n껧]k@!m."b,kNɃ* {+Z2P}5p$wTfU`Cic*Aa@) ֺ}q1qYu>Nh3IENDB`zapping-0.10cvs6/pixmaps/down.h 644 764 144 2216 10433067453 11614 /* Generated file, do not edit! */ /* GdkPixbuf RGBA C-Source image dump 1-byte-run-length-encoded */ static const GdkPixdata down_png = { 0x47646b50, /* Pixbuf magic: 'GdkP' */ 24 + 223, /* header length + pixel_data length */ 0x2010002, /* pixdata_type */ 40, /* rowstride */ 10, /* width */ 10, /* height */ /* pixel_data: */ (guint8 *) "\213\0\0\0\377\210\357\364\327\377\12\0\0\0\377\320\324\320\0\0\0\0\377" "\357\364\327\377\341\345\312\377\335\340\306\377\330\333\301\377\323" "\326\275\377\271\271\244\377\0\0\0\377\202\320\324\320\0\10\0\0\0\377" "\357\364\327\377\335\340\306\377\330\333\301\377\323\326\275\377\317" "\321\271\377\271\271\244\377\0\0\0\377\203\320\324\320\0\6\0\0\0\377" "\357\364\327\377\323\326\275\377\317\321\271\377\271\271\244\377\0\0" "\0\377\204\320\324\320\0\6\0\0\0\377\357\364\327\377\317\321\271\377" "\312\314\265\377\271\271\244\377\0\0\0\377\205\320\324\320\0\4\0\0\0" "\377\357\364\327\377\271\271\244\377\0\0\0\377\206\320\324\320\0\4\0" "\0\0\377\357\364\327\377\271\271\244\377\0\0\0\377\203\320\324\320\0" "\204\0\0\0\0\202\0\0\0\377\210\0\0\0\0\202\0\0\0\377\204\0\0\0\0", }; zapping-0.10cvs6/pixmaps/saturation.png 644 764 144 540 7762173332 13336 PNG  IHDRw=gAMA a pHYs  d_IDATxT k~oO0gNA%njLK{ r3>4¶ud4H`$ N fA)F X2,74 $bR,$Pj i2Pu&2µi(&U zY'n.:AEEaJvTw,r5 Yz݉GHO8=͟U䖗j@`<2qm #O:IENDB`zapping-0.10cvs6/pixmaps/gnome-keyboard.png 644 764 144 7414 7460206726 14076 PNG  IHDR00WgAMA aIDATxkt]e゙[rr-M&i4IoŦC;DgPQTTguleP^Ҧ-msk~9Im}y|)̗:~yy}.qK\2C^Fd"弋Kt᪵UrL+ͷRu-YVV^zU+W (=ݽo `L-(`Fy9&NaYV왳vmۏ:/L/zefB01o2jy_8Pϱup H)B0qm_[ ȿV;@V(\{^fr(6 IG{x3cKս( *H$|)T4h?]ȂeneY9kjx4Jbd+W^y%լhB L  [|aIl2F~~+&OG @Uө|A< _ 8nSOn$I1UfV^~<`wn~ t4'8͞-ZXYyށT{߽ۿ_qǎR\RȬJ Il[8y%e^UQ5Mc_EVvϕxK"yn /﮻iK,554k>+cY=\mOw0 xmO~/P Be``}r!ʊ)- 3blя[i%hF*$LcuTcP⒊;>u{)j0%yyB` p㉸퇿]WWWwBǁQ`rJn'7†jB4E4Lo߫4kp$/w]MP5b$q|tb嗱kҲr=elt_="GeG7tM0M'߽;~rt]G"IA4¡0hhlzFF 3:$ccc$IFc8z9zG BB&Mرc<.馛)/+W||f9pEQP <.ӿxb&8ҊoRinm&77Jj-_Ƽy9s4gΝ"JY8R"}qʦa&j`A4Mlذk\k  ԾZolDUUt]_}}RL7^L@G>2EUPu.+ZJBz{zof$6JEE% ;.' ˪g΂HC "Yz@0H__/CA=ơCعs'K,acض͑#u}ctL%Oxɼ@QQQov(G&]]]]Pe1HSPX+0LښhhlॗvHũcH.iiiq,*QUΞսGbYAx|;w$;7p(*斪yϝxd0 x _bf/H_y_|'<9Bcǎ8y3˙;gPs &pl}G3RK v5V>3tZ͆O~7^/f(=>.\wI àa&M/}TM#;+#?EQQ*̟;˗zΎNod*Iii2~n}.**gdh+HOjo.a 7\rY"&6>55<.<ץ-?žp7QZVi o=B:==Xu,KpUܱAR{`?wE 'OP6ן"#QtM! 12CʛKco}wc) R0u #%'4 U?>D"Yy_?? ,kf:ōm[+k&pmTTT,]=[(x3SE_8R88I*"@+_FW\=|v4 ,\W M -郵ugsrm7d mݽ횪BP@(hB;u…5?=x'uyjS_kOYpݡ:+>6M>۾d;O5;{}#6//oY''UTTT3L'lK}ACRJ%A kBg[ԌT4hzo>JhBkVjUSÙL DUU;?vTaYvȡc=gN7=='yiT]m-mV 3KhqCowL&0 NCDz.L\Τ/y۽e˗rsM5.b$ Dcx}k+V.Ng{cC#4y/x'QV]ʫYZZꍌ Y{Q~WRnaswkwD"&w?K\{;$誂IENDB`zapping-0.10cvs6/pixmaps/Makefile.am 644 764 144 4224 10360121113 12510 ## Process this file with automake to produce Makefile.in PIXMAPS = \ gnome-digital-camera.png \ gnome-grecord.png \ gnome-info.png \ gnome-keyboard.png \ gnome-media-player.png \ gnome-monitor.png \ gnome-oscilloscope.png \ gnome-session.png \ gnome-shutdown.png \ interlace48.png \ subtitle48.png \ teletext48.png BUILTIN_PIXMAPS = \ up.png \ down.png \ left.png \ right.png \ reset.png \ reveal.png \ brightness.png \ contrast.png \ saturation.png \ hue.png \ recordtb.png \ screenshot.png \ mute.png \ teletext.png \ subtitle.png \ video.png RATING_CA = \ rating_tv_ca_en_1.png rating_tv_ca_en_2.png \ rating_tv_ca_en_3.png rating_tv_ca_en_4.png \ rating_tv_ca_en_5.png rating_tv_ca_en_6.png RATING_US = \ rating_tv_us_10.png rating_tv_us_20.png \ rating_tv_us_21.png rating_tv_us_30.png \ rating_tv_us_40.png rating_tv_us_41.png \ rating_tv_us_42.png rating_tv_us_43.png \ rating_tv_us_44.png rating_tv_us_45.png \ rating_tv_us_46.png rating_tv_us_47.png \ rating_tv_us_48.png rating_tv_us_49.png \ rating_tv_us_4a.png rating_tv_us_4b.png \ rating_tv_us_4c.png rating_tv_us_4d.png \ rating_tv_us_4e.png rating_tv_us_4f.png \ rating_tv_us_50.png rating_tv_us_51.png \ rating_tv_us_52.png rating_tv_us_53.png \ rating_tv_us_54.png rating_tv_us_55.png \ rating_tv_us_56.png rating_tv_us_57.png \ rating_tv_us_58.png rating_tv_us_59.png \ rating_tv_us_5a.png rating_tv_us_5b.png \ rating_tv_us_5c.png rating_tv_us_5d.png \ rating_tv_us_5e.png rating_tv_us_5f.png \ rating_tv_us_60.png rating_tv_us_61.png \ rating_tv_us_62.png rating_tv_us_63.png \ rating_tv_us_64.png rating_tv_us_65.png \ rating_tv_us_66.png rating_tv_us_67.png IMAGES = \ vt_loading1.jpeg \ vt_loading2.jpeg \ gnome-television.png pixmapdir = $(datadir)/pixmaps/zapping pixmap_DATA = \ $(PIXMAPS) \ $(IMAGES) BUILT_SOURCES = $(BUILTIN_PIXMAPS:.png=.h) EXTRA_DIST = \ $(pixmap_DATA) \ $(BUILTIN_PIXMAPS) noinst_HEADERS = $(BUILT_SOURCES) %.h: %.png echo -e "\n/* Generated file, do not edit! */\n" > $@ @GDK_PIXBUF_CSOURCE@ --struct --build-list \ `echo $(> $@ zapping-0.10cvs6/pixmaps/Makefile.in 644 764 144 43531 10442575453 12572 # Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = .. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = pixmaps DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = SOURCES = DIST_SOURCES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; am__installdirs = "$(DESTDIR)$(pixmapdir)" pixmapDATA_INSTALL = $(INSTALL_DATA) DATA = $(pixmap_DATA) HEADERS = $(noinst_HEADERS) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ ARTS_CFLAGS = @ARTS_CFLAGS@ ARTS_LIBS = @ARTS_LIBS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BUILD_DEINTERLACE_PLUGIN_FALSE = @BUILD_DEINTERLACE_PLUGIN_FALSE@ BUILD_DEINTERLACE_PLUGIN_TRUE = @BUILD_DEINTERLACE_PLUGIN_TRUE@ BUILD_MAN_FALSE = @BUILD_MAN_FALSE@ BUILD_MAN_TRUE = @BUILD_MAN_TRUE@ CAN_COMPILE_3DNOW_FALSE = @CAN_COMPILE_3DNOW_FALSE@ CAN_COMPILE_3DNOW_TRUE = @CAN_COMPILE_3DNOW_TRUE@ CAN_COMPILE_ALTIVEC_FALSE = @CAN_COMPILE_ALTIVEC_FALSE@ CAN_COMPILE_ALTIVEC_TRUE = @CAN_COMPILE_ALTIVEC_TRUE@ CAN_COMPILE_MMX_FALSE = @CAN_COMPILE_MMX_FALSE@ CAN_COMPILE_MMX_TRUE = @CAN_COMPILE_MMX_TRUE@ CAN_COMPILE_SSE2_FALSE = @CAN_COMPILE_SSE2_FALSE@ CAN_COMPILE_SSE2_TRUE = @CAN_COMPILE_SSE2_TRUE@ CAN_COMPILE_SSE3_FALSE = @CAN_COMPILE_SSE3_FALSE@ CAN_COMPILE_SSE3_TRUE = @CAN_COMPILE_SSE3_TRUE@ CAN_COMPILE_SSE_FALSE = @CAN_COMPILE_SSE_FALSE@ CAN_COMPILE_SSE_TRUE = @CAN_COMPILE_SSE_TRUE@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCAS = @CCAS@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ COMMON_INCLUDES = @COMMON_INCLUDES@ CONSOLEHELPER_LOCATION = @CONSOLEHELPER_LOCATION@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFAULT_CFLAGS = @DEFAULT_CFLAGS@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ESD_LIBS = @ESD_LIBS@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ GCONF_SCHEMAS_INSTALL_FALSE = @GCONF_SCHEMAS_INSTALL_FALSE@ GCONF_SCHEMAS_INSTALL_TRUE = @GCONF_SCHEMAS_INSTALL_TRUE@ GCONF_SCHEMA_CONFIG_SOURCE = @GCONF_SCHEMA_CONFIG_SOURCE@ GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@ GDK_PIXBUF_CSOURCE = @GDK_PIXBUF_CSOURCE@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ HAVE_GCC_LIMITS_FALSE = @HAVE_GCC_LIMITS_FALSE@ HAVE_GCC_LIMITS_TRUE = @HAVE_GCC_LIMITS_TRUE@ HAVE_LIBZVBI_FALSE = @HAVE_LIBZVBI_FALSE@ HAVE_LIBZVBI_TRUE = @HAVE_LIBZVBI_TRUE@ HAVE_X86_FALSE = @HAVE_X86_FALSE@ HAVE_X86_TRUE = @HAVE_X86_TRUE@ HAVE_XMU_FALSE = @HAVE_XMU_FALSE@ HAVE_XMU_TRUE = @HAVE_XMU_TRUE@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ INTLTOOL_CAVES_RULE = @INTLTOOL_CAVES_RULE@ INTLTOOL_DESKTOP_RULE = @INTLTOOL_DESKTOP_RULE@ INTLTOOL_DIRECTORY_RULE = @INTLTOOL_DIRECTORY_RULE@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ INTLTOOL_ICONV = @INTLTOOL_ICONV@ INTLTOOL_KBD_RULE = @INTLTOOL_KBD_RULE@ INTLTOOL_KEYS_RULE = @INTLTOOL_KEYS_RULE@ INTLTOOL_MERGE = @INTLTOOL_MERGE@ INTLTOOL_MSGFMT = @INTLTOOL_MSGFMT@ INTLTOOL_MSGMERGE = @INTLTOOL_MSGMERGE@ INTLTOOL_OAF_RULE = @INTLTOOL_OAF_RULE@ INTLTOOL_PERL = @INTLTOOL_PERL@ INTLTOOL_PONG_RULE = @INTLTOOL_PONG_RULE@ INTLTOOL_PROP_RULE = @INTLTOOL_PROP_RULE@ INTLTOOL_SCHEMAS_RULE = @INTLTOOL_SCHEMAS_RULE@ INTLTOOL_SERVER_RULE = @INTLTOOL_SERVER_RULE@ INTLTOOL_SHEET_RULE = @INTLTOOL_SHEET_RULE@ INTLTOOL_SOUNDLIST_RULE = @INTLTOOL_SOUNDLIST_RULE@ INTLTOOL_THEME_RULE = @INTLTOOL_THEME_RULE@ INTLTOOL_UI_RULE = @INTLTOOL_UI_RULE@ INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ INTLTOOL_XAM_RULE = @INTLTOOL_XAM_RULE@ INTLTOOL_XGETTEXT = @INTLTOOL_XGETTEXT@ INTLTOOL_XML_NOMERGE_RULE = @INTLTOOL_XML_NOMERGE_RULE@ INTLTOOL_XML_RULE = @INTLTOOL_XML_RULE@ JPEG_LIB = @JPEG_LIB@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBXML_CFLAGS = @LIBXML_CFLAGS@ LIBXML_LIBS = @LIBXML_LIBS@ LIRC_LIB = @LIRC_LIB@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAKEINFO = @MAKEINFO@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ NEED_ZSFB_FALSE = @NEED_ZSFB_FALSE@ NEED_ZSFB_TRUE = @NEED_ZSFB_TRUE@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_CFLAGS = @PACKAGE_CFLAGS@ PACKAGE_LIBS = @PACKAGE_LIBS@ PACKAGE_LIB_DIR = @PACKAGE_LIB_DIR@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_PIXMAPS_DIR = @PACKAGE_PIXMAPS_DIR@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PACKAGE_VERSION_ID = @PACKAGE_VERSION_ID@ PATH_SEPARATOR = @PATH_SEPARATOR@ PG_CFLAGS = @PG_CFLAGS@ PKG_CONFIG = @PKG_CONFIG@ PLUGIN_DEFAULT_DIR = @PLUGIN_DEFAULT_DIR@ PLUGIN_DEFAULT_FLAGS = @PLUGIN_DEFAULT_FLAGS@ PNG_LIBS = @PNG_LIBS@ POFILES = @POFILES@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ PYTHON_LIBS = @PYTHON_LIBS@ PY_CFLAGS = @PY_CFLAGS@ PY_EXTRA_LIBS = @PY_EXTRA_LIBS@ PY_LIBS = @PY_LIBS@ PY_LIB_LOC = @PY_LIB_LOC@ RANLIB = @RANLIB@ RTE_LIBS = @RTE_LIBS@ SCROLLKEEPER_BUILD_REQUIRED = @SCROLLKEEPER_BUILD_REQUIRED@ SCROLLKEEPER_CONFIG = @SCROLLKEEPER_CONFIG@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ SUID_ZSFB_FALSE = @SUID_ZSFB_FALSE@ SUID_ZSFB_TRUE = @SUID_ZSFB_TRUE@ UNICODE_CFLAGS = @UNICODE_CFLAGS@ UNICODE_LIBS = @UNICODE_LIBS@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ WARN_CFLAGS = @WARN_CFLAGS@ XGETTEXT = @XGETTEXT@ XMLCATALOG = @XMLCATALOG@ XML_CATALOG_FILE = @XML_CATALOG_FILE@ XSLTPROC = @XSLTPROC@ X_CFLAGS = @X_CFLAGS@ X_DPMS_LIBS = @X_DPMS_LIBS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ X_XF86DGA_LIBS = @X_XF86DGA_LIBS@ X_XF86VMODE_LIBS = @X_XF86VMODE_LIBS@ X_XINERAMA_LIBS = @X_XINERAMA_LIBS@ X_XMU_LIBS = @X_XMU_LIBS@ X_XV_LIBS = @X_XV_LIBS@ ZSFB_GROUP = @ZSFB_GROUP@ ZSFB_OWNER = @ZSFB_OWNER@ ZVBI_CFLAGS = @ZVBI_CFLAGS@ ZVBI_LIBS = @ZVBI_LIBS@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_STRIP = @ac_ct_STRIP@ ac_pt_PKG_CONFIG = @ac_pt_PKG_CONFIG@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ datadir = @datadir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ python_val = @python_val@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ PIXMAPS = \ gnome-digital-camera.png \ gnome-grecord.png \ gnome-info.png \ gnome-keyboard.png \ gnome-media-player.png \ gnome-monitor.png \ gnome-oscilloscope.png \ gnome-session.png \ gnome-shutdown.png \ interlace48.png \ subtitle48.png \ teletext48.png BUILTIN_PIXMAPS = \ up.png \ down.png \ left.png \ right.png \ reset.png \ reveal.png \ brightness.png \ contrast.png \ saturation.png \ hue.png \ recordtb.png \ screenshot.png \ mute.png \ teletext.png \ subtitle.png \ video.png RATING_CA = \ rating_tv_ca_en_1.png rating_tv_ca_en_2.png \ rating_tv_ca_en_3.png rating_tv_ca_en_4.png \ rating_tv_ca_en_5.png rating_tv_ca_en_6.png RATING_US = \ rating_tv_us_10.png rating_tv_us_20.png \ rating_tv_us_21.png rating_tv_us_30.png \ rating_tv_us_40.png rating_tv_us_41.png \ rating_tv_us_42.png rating_tv_us_43.png \ rating_tv_us_44.png rating_tv_us_45.png \ rating_tv_us_46.png rating_tv_us_47.png \ rating_tv_us_48.png rating_tv_us_49.png \ rating_tv_us_4a.png rating_tv_us_4b.png \ rating_tv_us_4c.png rating_tv_us_4d.png \ rating_tv_us_4e.png rating_tv_us_4f.png \ rating_tv_us_50.png rating_tv_us_51.png \ rating_tv_us_52.png rating_tv_us_53.png \ rating_tv_us_54.png rating_tv_us_55.png \ rating_tv_us_56.png rating_tv_us_57.png \ rating_tv_us_58.png rating_tv_us_59.png \ rating_tv_us_5a.png rating_tv_us_5b.png \ rating_tv_us_5c.png rating_tv_us_5d.png \ rating_tv_us_5e.png rating_tv_us_5f.png \ rating_tv_us_60.png rating_tv_us_61.png \ rating_tv_us_62.png rating_tv_us_63.png \ rating_tv_us_64.png rating_tv_us_65.png \ rating_tv_us_66.png rating_tv_us_67.png IMAGES = \ vt_loading1.jpeg \ vt_loading2.jpeg \ gnome-television.png pixmapdir = $(datadir)/pixmaps/zapping pixmap_DATA = \ $(PIXMAPS) \ $(IMAGES) BUILT_SOURCES = $(BUILTIN_PIXMAPS:.png=.h) EXTRA_DIST = \ $(pixmap_DATA) \ $(BUILTIN_PIXMAPS) noinst_HEADERS = $(BUILT_SOURCES) all: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu pixmaps/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu pixmaps/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool uninstall-info-am: install-pixmapDATA: $(pixmap_DATA) @$(NORMAL_INSTALL) test -z "$(pixmapdir)" || $(mkdir_p) "$(DESTDIR)$(pixmapdir)" @list='$(pixmap_DATA)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ f=$(am__strip_dir) \ echo " $(pixmapDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(pixmapdir)/$$f'"; \ $(pixmapDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(pixmapdir)/$$f"; \ done uninstall-pixmapDATA: @$(NORMAL_UNINSTALL) @list='$(pixmap_DATA)'; for p in $$list; do \ f=$(am__strip_dir) \ echo " rm -f '$(DESTDIR)$(pixmapdir)/$$f'"; \ rm -f "$(DESTDIR)$(pixmapdir)/$$f"; \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) check-am all-am: Makefile $(DATA) $(HEADERS) installdirs: for dir in "$(DESTDIR)$(pixmapdir)"; do \ test -z "$$dir" || $(mkdir_p) "$$dir"; \ done install: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic distclean-libtool \ distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-pixmapDATA install-exec-am: install-info: install-info-am install-man: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-info-am uninstall-pixmapDATA .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool ctags distclean distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-exec install-exec-am install-info \ install-info-am install-man install-pixmapDATA install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ uninstall-am uninstall-info-am uninstall-pixmapDATA %.h: %.png echo -e "\n/* Generated file, do not edit! */\n" > $@ @GDK_PIXBUF_CSOURCE@ --struct --build-list \ `echo $(> $@ # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: zapping-0.10cvs6/pixmaps/left.h 644 764 144 2456 10433067453 11605 /* Generated file, do not edit! */ /* GdkPixbuf RGBA C-Source image dump 1-byte-run-length-encoded */ static const GdkPixdata left_png = { 0x47646b50, /* Pixbuf magic: 'GdkP' */ 24 + 281, /* header length + pixel_data length */ 0x2010002, /* pixdata_type */ 40, /* rowstride */ 10, /* width */ 10, /* height */ /* pixel_data: */ (guint8 *) "\204\320\324\320\0\202\0\0\0\0\2\320\324\320\0\0\0\0\0\202\0\0\0\377" "\2\0\0\0\0\0\0\0\2\204\0\0\0\0\202\0\0\0\377\6\357\364\327\377\0\0\0" "\377\0\0\0\30\357\364\327\0\271\271\244\3\271\271\244\0\202\0\0\0\377" "\202\357\364\327\377\4\271\271\244\377\0\0\0\377\320\324\320\0\0\0\0" "\0\202\0\0\0\377\202\357\364\327\377\3\351\356\321\377\344\350\314\377" "\271\271\244\377\203\0\0\0\377\203\357\364\327\377\4\351\356\321\377" "\344\350\314\377\336\342\307\377\271\271\244\377\203\0\0\0\377\202\271" "\271\244\377\10\351\356\321\377\344\350\314\377\336\342\307\377\331\334" "\302\377\271\271\244\377\0\0\0\377\320\324\320\0\0\0\0\0\202\0\0\0\377" "\202\271\271\244\377\4\331\334\302\377\323\326\275\377\271\271\244\377" "\0\0\0\377\202\0\0\0\0\2\357\364\327\0\344\350\314\0\202\0\0\0\377\203" "\271\271\244\377\3\0\0\0\377\0\0\0\0\357\364\327\0\204\271\271\244\0" "\202\0\0\0\377\2\271\271\244\377\0\0\0\377\210\0\0\0\0\202\0\0\0\377", }; zapping-0.10cvs6/pixmaps/contrast.h 644 764 144 3373 10433067454 12510 /* Generated file, do not edit! */ /* GdkPixbuf RGBA C-Source image dump 1-byte-run-length-encoded */ static const GdkPixdata contrast_png = { 0x47646b50, /* Pixbuf magic: 'GdkP' */ 24 + 467, /* header length + pixel_data length */ 0x2010002, /* pixdata_type */ 96, /* rowstride */ 24, /* width */ 24, /* height */ /* pixel_data: */ (guint8 *) "\351\0\0\0\0\206\0\0\0\377\220\0\0\0\0\202\0\0\0\377\203\246\246\246" "\377\203\377\377\377\377\202\0\0\0\377\215\0\0\0\0\1\0\0\0\377\202\246" "\246\246\377\203\0\0\0\377\205\377\377\377\377\1\0\0\0\377\213\0\0\0" "\0\1\0\0\0\377\202\246\246\246\377\204\0\0\0\377\206\377\377\377\377" "\1\0\0\0\377\212\0\0\0\0\2\0\0\0\377\246\246\246\377\205\0\0\0\377\206" "\377\377\377\377\2\0\0\0\377\0\0\0\77\210\0\0\0\0\2\0\0\0\377\246\246" "\246\377\206\0\0\0\377\207\377\377\377\377\1\0\0\0\377\210\0\0\0\0\2" "\0\0\0\377\246\246\246\377\206\0\0\0\377\207\377\377\377\377\2\0\0\0" "\377\0\0\0\77\207\0\0\0\0\2\0\0\0\377\246\246\246\377\206\0\0\0\377\207" "\377\377\377\377\2\0\0\0\377\0\0\0\77\207\0\0\0\0\2\0\0\0\377\246\246" "\246\377\206\0\0\0\377\207\377\377\377\377\2\0\0\0\377\0\0\0\77\207\0" "\0\0\0\2\0\0\0\377~~~\377\206\0\0\0\377\207\377\377\377\377\2\0\0\0\377" "\0\0\0\77\207\0\0\0\0\210\0\0\0\377\207\377\377\377\377\2\0\0\0\377\0" "\0\0\77\210\0\0\0\0\207\0\0\0\377\206\377\377\377\377\1\0\0\0\377\202" "\0\0\0\77\210\0\0\0\0\207\0\0\0\377\206\377\377\377\377\2\0\0\0\377\0" "\0\0\77\212\0\0\0\0\206\0\0\0\377\205\377\377\377\377\1\0\0\0\377\202" "\0\0\0\77\213\0\0\0\0\205\0\0\0\377\203\377\377\377\377\202\0\0\0\377" "\202\0\0\0\77\215\0\0\0\0\1\0\0\0\77\206\0\0\0\377\203\0\0\0\77\220\0" "\0\0\0\206\0\0\0\77\240\0\0\0\0\1\0\0\0\1\227\0\0\0\0\205\0\0\0\1\223" "\0\0\0\0", }; zapping-0.10cvs6/pixmaps/reset.png 644 764 144 437 7460206726 12273 PNG  IHDR ,gAMA a pHYs  ~IDATxP+P%A$C!P b  ]WMKoЗdgvvh.$~5&@3,JjWbo7G_{&}sY^(6v\Q z5i@H 'LcIPΧ8Xl6[(~5IB!}$]xOjn;%IENDB`zapping-0.10cvs6/pixmaps/mute.h 644 764 144 6126 10433067455 11625 /* Generated file, do not edit! */ /* GdkPixbuf RGBA C-Source image dump 1-byte-run-length-encoded */ static const GdkPixdata mute_png = { 0x47646b50, /* Pixbuf magic: 'GdkP' */ 24 + 889, /* header length + pixel_data length */ 0x2010002, /* pixdata_type */ 96, /* rowstride */ 24, /* width */ 24, /* height */ /* pixel_data: */ (guint8 *) "\315\0\0\0\0\1\262\201\201\377\215\0\0\0\0\1\262\201\201\377\210\0\0" "\0\0\3\262\201\201\377\377\201\201\377\262\201\201\377\213\0\0\0\0\3" "\262\201\201\377\377\201\201\377\262\201\201\377\210\0\0\0\0\3\262\201" "\201\377\377\201\201\377\262\201\201\377\202\0\0\0\0\1\0\0\0\377\206" "\0\0\0\0\3\262\201\201\377~\0\0\377\262\201\201\377\212\0\0\0\0\3\262" "\201\201\377\377\201\201\377\262\201\201\377\202\0\0\0\377\204\0\0\0" "\0\5\0\0\0\377\262\201\201\377\377\201\201\377\262\201\201\377\0\0\0" "\377\213\0\0\0\0\4\262\201\201\377~\0\0\377\201MF\377\0\0\0\377\204\0" "\0\0\0\5\262\201\201\377~\0\0\377\262\201\201\377\0\0\0\0\0\0\0\377\207" "\0\0\0\0\203\0\0\0\377\5\0\0\0\0\0\0\0\377\201MF\377\333[S\3771\0\0\377" "\202\0\0\0\0\4\0\0\0\377\262\201\201\377\377\201\201\3771\0\0\377\203" "\0\0\0\0\1\0\0\0\377\206\0\0\0\0\1\0\0\0\377\202\233\230\212\377\14\0" "\0\0\377\236\232\214\377\317\314\304\377\244rp\377~\0\0\377\262\201\201" "\377\0\0\0\0\262\201\201\377~\0\0\377\262\201\201\377\0\0\0\0\0\0\0\377" "\202\0\0\0\0\1\0\0\0\377\206\0\0\0\0\14\0\0\0\377\321\317\307\377\305" "\302\267\377\0\0\0\377\336\334\327\377\327\325\317\377\305\301\267\377" "1\0\0\377~\0\0\377\262\201\201\377\377\201\201\3771\0\0\377\202\0\0\0" "\0\1\0\0\0\377\202\0\0\0\0\1\0\0\0\377\206\0\0\0\0\1\0\0\0\377\202\260" "\254\234\377\1\0\0\0\377\202\270\264\246\377\6\277\273\257\377\0\0\0" "\377J\0\0\377\377\201\201\377\262\201\201\377\0\0\0\377\202\0\0\0\0\1" "\0\0\0\377\202\0\0\0\0\1\0\0\0\377\206\0\0\0\0\1\0\0\0\377\202\233\230" "\212\377\2\0\0\0\377\236\232\214\377\202\260\254\234\377\5""1\0\0\377" "~\0\0\377\262\201\201\377\377\201\201\3771\0\0\377\202\0\0\0\0\1\0\0" "\0\377\202\0\0\0\0\1\0\0\0\377\206\0\0\0\0\1\0\0\0\377\202yvl\377\1\0" "\0\0\377\202\236\232\214\377\11\201MF\377~\0\0\377\262\201\201\377\0" "\0\0\0\262\201\201\377~\0\0\377\262\201\201\377\0\0\0\0\0\0\0\377\202" "\0\0\0\0\1\0\0\0\377\206\0\0\0\0\203\0\0\0\377\5\0\0\0\0\0\0\0\377xE" "\77\377\315MF\3771\0\0\377\202\0\0\0\0\4\0\0\0\377\262\201\201\377\377" "\201\201\3771\0\0\377\203\0\0\0\0\1\0\0\0\377\212\0\0\0\0\4\262\201\201" "\377~\0\0\377q>8\377\0\0\0\377\204\0\0\0\0\5\262\201\201\377~\0\0\377" "\262\201\201\377\0\0\0\0\0\0\0\377\212\0\0\0\0\3\262\201\201\377\377" "\201\201\377\262\201\201\377\202\0\0\0\377\204\0\0\0\0\5\0\0\0\377\262" "\201\201\377\377\201\201\377\262\201\201\377\0\0\0\377\211\0\0\0\0\3" "\262\201\201\377\377\201\201\377\262\201\201\377\202\0\0\0\0\1\0\0\0" "\377\206\0\0\0\0\3\262\201\201\377~\0\0\377\262\201\201\377\210\0\0\0" "\0\3\262\201\201\377\377\201\201\377\262\201\201\377\213\0\0\0\0\3\262" "\201\201\377\377\201\201\377\262\201\201\377\210\0\0\0\0\1\262\201\201" "\377\215\0\0\0\0\1\262\201\201\377\344\0\0\0\0", }; zapping-0.10cvs6/pixmaps/teletext.png 644 764 144 1243 7762173332 13024 PNG  IHDRJ~sgAMA a pHYs  ~EIDATx=hSQsInTZZ-hRI\: XMQ h;?u"tU MG$Mɽϡ-(lr|;JK4h*5j?9$H GlP!ujTI7YpsTEk#AY)^2M4\8{U42K#O~9W*h.g7ïJ F6b$Wd$TB8VHF6jDOϐJRb/82ƻǙX;t+LP(DŽFYIG@"EER9Ft;6FX$pnF+rɓF@(A (s+r4y@D|Dc1EI$R M ŢalFIF(R)k 3 4 ҈J{`4J١b8b|/d;G`aaa ;eƙ x]N_;$3z~R@Ge>[4@q~ }-ɖx̲ú_ykfjLʤ l*oqoMFwv?7#O؈IENDB`zapping-0.10cvs6/pixmaps/subtitle.png 644 764 144 1522 7762173332 13021 PNG  IHDRw=gAMA a pHYs  d_IDATxՕOK$WҲMA4.(t3! $! "1##Ce٫EHD%Ak͢ZcK2r@::_^=N,`7("R\s;@/F~~~~ sU=#uL&Z[[NNNۓ}xxXZ|M |bjjz'rvv&AZ0 \.,//qH$c3N-y1FV.Z{Ach}Y\\wU< <4[[[+\f&L&Rr>?1hme%I$'sqXrFX,>TCGFFhnnid2I6U4tuu)s]^RqkYPؠR*~|gssU 0MT277'(OX8cTU\202\31\31\31A\6\32\32\32\77\32\32\32""7\32\32\32+\32\32\32\34" "\32\32\32\16\32\32\32\3\204\32\32\32\0\2)))\0\234\234\234\0\202\0\0\0" "\0\10\0\0\0\7\0\0\0""6\0\0\0\201\1\1\1\267\4\4\4\324\11\11\11\343\16" "\16\16\353\22\22\22\357\202\25\25\25\361\10\22\22\22\360\16\16\16\354" "\11\11\11\344\4\4\4\325\1\1\1\270\0\0\0\202\0\0\0""8\0\0\0\7\202\0\0" "\0\0\14\26\26\26\0\234\234\234\0\0\0\0\0\0\0\0\16\0\0\0x\7\7\7\340//" "/\373ggg\376\221\221\221\377\254\254\254\377\274\274\274\377\305\305" "\305\377\202\313\313\313\377\23\305\305\305\377\274\274\274\377\254\254" "\254\377\222\222\222\377ggg\376000\373\10\10\10\341\0\0\0{\0\0\0\17\0" "\0\0\0\26\26\26\0\234\234\234\0\0\0\0\4\0\0\0o\22\22\22\360\201\201\201" "\376\336\336\336\377\367\367\367\377\374\374\374\377\202\375\375\375" "\377\204\376\376\376\377\202\375\375\375\377\16\374\374\374\377\367\367" "\367\377\337\337\337\377\202\202\202\376\22\22\22\361\0\0\0r\0\0\0\5" "\26\26\26\0\234\234\234\0\0\0\0#\4\4\4\323sss\376\362\362\362\377\375" "\375\375\377\214\374\374\374\377\13\375\375\375\377\363\363\363\377v" "vv\376\5\5\5\326\0\0\0&\26\26\26\0\234\234\234\1\0\0\0Y\31\31\31\365" "\312\312\312\377\375\375\375\377\216\377\377\377\377\12\375\375\375\377" "\315\315\315\377\34\34\34\366\0\0\0]\26\26\26\1\234\234\234\3\0\0\0\207" ":::\374\352\352\352\377\375\375\375\377\216\377\377\377\377\12\375\375" "\375\377\354\354\354\377>>>\375\0\0\0\214\26\26\26\4\234\234\234\7\0" "\0\0\244WWW\376\365\365\365\377\376\376\376\377\216\377\377\377\377\12" "\376\376\376\377\366\366\366\377[[[\376\1\1\1\251\26\26\26\10\234\234" "\234\13\1\1\1\264hhh\376\370\370\370\377\376\376\376\377\216\377\377" "\377\377\12\376\376\376\377\371\371\371\377mmm\376\1\1\1\267\26\26\26" "\14\234\234\234\14\1\1\1\271nnn\377\371\371\371\377\376\376\376\377\216" "\377\377\377\377\12\376\376\376\377\372\372\372\377ttt\377\2\2\2\275" "\26\26\26\16\234\234\234\13\1\1\1\265jjj\376\371\371\371\377\376\376" "\376\377\216\377\377\377\377\12\376\376\376\377\371\371\371\377nnn\376" "\1\1\1\270\26\26\26\15\234\234\234\10\1\1\1\247ZZZ\376\366\366\366\377" "\376\376\376\377\216\377\377\377\377\12\376\376\376\377\367\367\367\377" "^^^\376\1\1\1\253\26\26\26\11\234\234\234\4\0\0\0\213>>>\375\355\355" "\355\377\375\375\375\377\216\377\377\377\377\12\376\376\376\377\356\356" "\356\377CCC\375\0\0\0\220\26\26\26\4\234\234\234\1\0\0\0_\35\35\35\366" "\320\320\320\377\375\375\375\377\216\377\377\377\377\12\375\375\375\377" "\323\323\323\377\40\40\40\367\0\0\0d\26\26\26\1\234\234\234\0\0\0\0)" "\5\5\5\332\200\200\200\376\366\366\366\377\215\377\377\377\377\15\375" "\375\375\377\366\366\366\377\205\205\205\376\6\6\6\334\0\0\0,\26\26\26" "\0\234\234\234\0\0\0\0\6\0\0\0~\31\31\31\365\225\225\225\376\351\351" "\351\377\372\372\372\377\202\375\375\375\377\206\376\376\376\377\202" "\375\375\375\377\22\372\372\372\377\352\352\352\377\230\230\230\376\32" "\32\32\365\0\0\0\202\0\0\0\7\26\26\26\0\234\234\234\0\0\0\0\0\0\0\0\25" "\0\0\0\216\14\14\14\353BBB\375\177\177\177\376\251\251\251\377\302\302" "\302\377\321\321\321\377\327\327\327\377\202\333\333\333\377\14\327\327" "\327\377\321\321\321\377\303\303\303\377\252\252\252\377\201\201\201" "\376CCC\375\15\15\15\353\0\0\0\220\0\0\0\25\0\0\0\0\26\26\26\0\234\234" "\234\0\202\0\0\0\0\10\0\0\0\14\0\0\0J\0\0\0\232\3\3\3\313\11\11\11\343" "\21\21\21\356\31\31\31\364\36\36\36\366\202!!!\367\10\36\36\36\366\31" "\31\31\364\21\21\21\357\11\11\11\343\3\3\3\315\0\0\0\234\0\0\0K\0\0\0" "\14\202\0\0\0\0\2\26\26\26\0\234\234\234\0\203\0\0\0\0\7\0\0\0\1\0\0" "\0\7\0\0\0\27\0\0\0+\0\0\0\77\0\0\0N\0\0\0X\202\0\0\0[\7\0\0\0X\0\0\0" "N\0\0\0@\0\0\0,\0\0\0\30\0\0\0\7\0\0\0\1\203\0\0\0\0\2\26\26\26\0\261" "\261\261\0\225\221\221\221\0\2\221\221\221\2\230\230\230\0\260\0\0\0" "\0", }; zapping-0.10cvs6/pixmaps/vt_loading1.jpeg 644 764 144 7622 7155537562 13552 JFIFHHCreated with The GIMPC    $.' ",#(7),01444'9=82<.342C  2!!22222222222222222222222222222222222222222222222222h"<!1AQa"q2B#34RrCbc!1 ?<[TcۚfA*5Lgٽ77*tݛU_nsܪ)9NZ.]vkqj1nLm_Jh6~2p2"kǿ<:~(i_SES3?f8LZX9ft\ȧuˍ3Sv7Zv1T*vD\#RkW_iXᅤ7[{MTGwݦu~.ST[^)Vr1n&zSwѩlZ"O~Q*9]Xm3=Oy%>lڵ?,qcN.omk nղhU=!p4ê5vOZwh}ٳ]ڷO5uN ȹEmb5{u妮_L^E\]S^VxW=U&=ֺ""i;8BgM4xND Z8 2w5E1֊jU<eơv8^_b&f'j8ٚVF58.LڳLSAOy2nLLz;ĻMk.FFt<%ZFM|ۯ#"}:ty%wxQn9隦"&vS3*=[~:=~E+qz'𵋚o dы3M̚'&jBd}ըUw_ƽS]Kz{bgo *jlKVc[{V6WM[W6cäL:]rĪ6VQWKڬJ_ˬo S7W0|D}VLJ<\ 0lz`nӴӿs)#hޚo1Tzo?P̽7oUTGH1⩎&[5EWXķn#҈~V8#J@]:j]w&<)߮S33lB%uͳ7tDNGs}+XǽT4OǚQLiwh<79zn4|;n*r]թ&y4D:v30wl۪Ʀ{}#hi53]QE6biiubҴ FO b{:^nS1cx'o,pVm\ƚkkN{ojwތ "hJc1ׯZsV]τmv;ȨuEѿf[7*9u]t7ZOTOxɡz zveV+jjNFj'9sVT5x5SߓiI[qXVݙԪ۳\UGYfzDy"@\#goQG-SU"MStqf>h%ҙޙnFzg dhw25{1DȊgm69Mw}6:6V颯LZq =3W꽧*ܵ1u]_YYǿfgᚩ^Xijx޻Dmo>2L&^W/UL3MM3QGXH@zapping-0.10cvs6/pixmaps/vt_loading2.jpeg 644 764 144 14630 7155537562 13570 JFIFHHCreated with The GIMPC    $.' ",#(7),01444'9=82<.342C  2!!22222222222222222222222222222222222222222222222222h"H!1AQ2aq"#bBRSV$%3UrCst.!12AQaq"#3r ?>#(|,ZGZ5sOk3&ut{bZ*)ReWS$6xmKuJgBEᖞދȼz-c4 c2^):h^ &ߣI)x)3ֽȧ ikΫtXܨwAN=_;*fP^̬UBG=Y X],w+!DcX{rmWΥpOXWfdNV93DOqz $\.w|W ͲVcA8z~wcAmx6~zZIen{;Щ%jgRLLnOnWmnL#~*'y}jVtFg7\Y-fYּY#i9]wW@?W85,JkDkCC:ƕ)Ƒ"m|<Όo[Z5Lop/`^$ENVd UQI΁%7'zmjn60֫zݮPDP>wp1燉y"#9b'Zͦ,V@HUQp_"QU&+`QMƜ2gޞٴ6iH~jrOdjj*tAU_IX'_JsQy*.Ʌ+>=MT Zv-|cr*g{M-UQuE>Zaq %k:0 v#U'DjsWmd,U[7u NZG mF*j+\'&9cZx$l\9 _↫xGL<5Px!T>N w;^uXkVe=tyM]?@&;E?O{OV4%qZ?#+[G%d:78'j/a9nmѥ;]]["} 4pkcMԴ]ӹ_y;ȿfi+4+}d2,9W 6:$fS]]$G w{ tݚD۞oQJ=zE9NzWў+˥OKQQPzskQpqa;NUQzv*51ڭXah}OMj )c^w?Ŧ \kQUUpgQR-:yIܞU^;f9r4䦶O2joDX:f#Qr97wڊt2)`m@Z~RX:1o}U JʷU{⚫TS# EcvI:|m;v9MgUS7{^Գ"Q9tG5;_G;u4kidF8/j&|X$J5RSG2"ʚf6R&:Iu+r*'tE2twR;;']n: y%]7O]4\&MGnU~̕Lr(CJZljdO{)mo%2jZ{Sݕ5U IRt TO̠Ѻtg<͍=TC+ ct*ؾѺz։ū:T*z/.DRE}+:&B;ýyrCo^كY#?ќXEcOE6?gDàIdO~y!٣ooʹ OS?%djďG%-tTIf/)Uj)^‘3ѽɿ䆃IJǹ{N?Ǵ#^(dD9+ʧADE"#WtT9ۚ9ZTTsz j֦UWQԱ#vb9> }CE#ieuS6IeVDFq]X놣ΑQM7}Yhz(5FܨPsq2<ωJseZF T?Hk+\ jLϭz^U9]3WRr" /ʲUn%;PC#p޽+7o[WQav?Yx| -#N'u*w[VƹDU[ԞQټ4+j+]z"zV41gvs#Dc{1H c%>(iV#{y* USspɏql.Ռ±LܔӐq+7TMK/'|ȵT@ja\ju،vpYoʓ9j#%G$*2E[i!H֖dÞ~7)dRDj8O}5V5mg}Tcvtj!Y LS]yzIRtDs*pfVk*d;M3xܪMB$~GulnNR&dOzZ&5Z\W-#kᘥKsQ] dl8܉'{rQ]+p9mss6Sbbb'f:LLrFѺtg<̍;fjɣb}3[ :tU0:zPQ\%e bsT{JI lJQ:=q^9YmRMWiɨ ?FmHeEdy{¥uK38Smu 6:kRB:dT_$3՞PWUVTUڕzL~Lwbd'̤>VӐx VbR?I }2Nƻ\{*={V=,˜rc4è5PXG&US?Bj(y%VȮ{ʸNkk\z23}QMLFrWGT-z$T]ՎDM봍#n*L}j,ZW+R<Ѩ^guu1iLkV]*@b'q|6Sp^GѵZ 䘛rj1[>ɥ֢W6SW(gtE+9G@IR1PFr&sț_-lfNq5E¹S~Yɝײ5Z֢N-+X/3@%薥qNd^&|x& w \*e]G.=>>\342AAA\343GGF\312\216\216\216\377\244\244\244\377\203\261\261" "\261\377\7\260\260\260\377\222\222\222\377AAA\364444\355&&&\342\33\33" "\33\322\0\0\0\3\202\0\0\0\0\14\0\0\0h998\377ddc\377feb\377edc\377kjg" "\377{{z\377nnn\377\345\345\345\377\231\231\231\377\257\257\257\377\212" "\212\212\377\202\203\203\203\377\202\201\201\201\377\6\226\226\226\377" "xxx\377www\377yyy\377JJJ\366\5\5\5E\202\0\0\0\0\1LKH\377\202yxu\377\23" "ffe\377--,\377a`^\377GFD\377ZZZ\377\221\221\221\377\220\220\220\377\240" "\240\240\377\217\216\216\377\215\214\212\377nmk\377gfd\377ffd\377nom" "\377\212\212\212\377lll\377fff\377kkk\377\3\3\3q\202\0\0\0\0\26>=:\377" "\233\232\226\377\222\221\215\377\226\225\224\377\206\205\203\377]\\Z" "\377(('\377ooo\377eee\377\232\232\232\377\206\206\205\377prp\377aed\377" "Y]]\377RVW\377OSR\377BEA\377[]Y\377iih\377~~~\377}}}\377\0\0\0\200\202" "\0\0\0\0\26>=8\377\203\201x\377sph\377gd]\377XVP\377;:6\37700.\377qq" "q\377nnn\377\222\222\221\377`cc\377W\\\\\377DHI\377FKM\377DIL\377A\377UXY\377045\377034\3779<=\377BFI\377SWY\377" "158\377\13\14\14\307\0\0\0\251\0\0\0e\0\0\0\32\0\0\0\10\0\0\0\7\0\0\0" "\30\0\0\0G\0\0\0e\0\0\0}\10\7\7o\3\3\3X\0\0\0F'\0\0\0J\0\0\0V\2\2\2q" "\22\23\24\324][H =; iޫٟ ]5iJUh`3'sfҙ=0s6d5Z}=~jx1Ò7RXy&dZl|nStI.F(cƓ'ocӖݽSe{˯hͺFۥ)994n[;BJ h}s?\aݿ77-D|~uvt}{B[V*Dcu:q&#ĢQ^ܸSkڶB(Qr-x|Iƛ[ $F_\fve9% (òdg o!.0wۛ|Pz)s %w+EyOm)/tKϚ-SᅗwOBog!FHe R&RJ*8sؾ9<N{c dc=^vjB{.*Ɠeg\g/wb`zv}twNdGڬ9`5kh!!)APR61z8-|$So.gsn۴͜5wpgss<֎ùso@H<i.ڮ!$JI%Ƣ7zmURD2fϛeL6Anc7o?`{eͯ?7n/^6ICK* jU;[AZ~hxe-{vs9;-]}]XJuf<…@J9䅷녍hw]4 B()m:(aFcƻ|M\3枨xoC=l*o`(޼ iXe R@&P1ȑX(jҌIS->w6q:ُginn(b(qgKHeaG c)ZD)!5&V._F^ylg7T|^TJɶʟ}q:Xm";v۹c E0뀫550bilN? vCiJyL+xtͅ[wm>N& ?R3l@:2B62L43gQW!_,!PBJI8Z8+c&q]cBA# =cw<у0 G uMXT.RCa|5TV ItzjJuWthk>(\>{kwwXzd:/m۾7 ;PJg4/E&P(P,p]F)";i7vm<6ˤ8|U7]w酇Nd<[Pkk+`hPm.@t_pǏPd29 h@(RXh&h_9zX[&н\-aÃM%^yo\W=\Oݿ(JaZ~L_ &`ܓ@&`S*W)JJ9HBgQ,T(]M߶o;PZ5#6o_έITKѧ{ӆpX" hLӇTڵq{hR':Ig UUbHTV-2q H1cH{H{1C]O\qݷ??pRk҇vd=814!s(%`8/v|/T&JJR(%=F 护r$SY2J$JI'JoNN.gRJ)zz{? 5%W'3 “"_ho=f|'! 'CBa,xDԊ)jhES9aIR(ʥZ vU Vҿ=e/;߶$?sltKۻ㺏lf{RēlPR*oC2e ÇcY~ `رĻhkJ6A>A!'bIIj@?QFB.]+Q-)RO}S/s .vuk”1wu#Hoi4B0 abL }kPaJSOSW}SB[gJB2}|WZ8mDc+G5`5K{߻6C*gՅ\O% 罸 :5 gbeaYPH4Lc}ΜE !LcJ:eRHfttNf0šJ82rLf>fY7:ԓc78Еxa 6{PACB! E$! 0 (hh cִeJ*";vz;uصRh=]oLO'yx:eVQ=zTvH2hMCcH$D4>! LE\ U[w_ [P*hh, ԧ6/+TjPYjMxD\)Vx͸A* PcFb0E(`3 pp]AT`m-ܼrJ.&:ː(ڶ~T1/> 8+OY >fΘgaq} SI C!FH6Hg ym&^y =5BRJ.;جNy%r#5|\.G0L2@j\q]IdS(I 3& \:>@s:=SxT<`|%w >p 5ۡ7DM꠵ hyJjh۬y[׈zK`灪810% X(0?׶. ̞9:}0xO[nIue3,pe/YsZ $.ȼy=2e%ZC;KʐG#XD_B1KRDkS-mۮ p<:Z'xﯤz!p$rirM|b].64(Cb. {P9qpK=^iuBk|/ރ}@D1JJ9I1Y16VWwZ,x6BADZJ-rRv]LH<›*PZ:y1B)XπF  6=Ò. y:Ϡ81R !JF]:8Oa !R@L1~lhCPGk]=/󢷈 >b<{5ȉa/H/ni(ʙX׻`av+xTeÆ9@M"zd\KR@4;){X5,憒1#ƺ#3`Q`:`_cIENDB`zapping-0.10cvs6/pixmaps/gnome-monitor.png 644 764 144 6377 7400267204 13764 PNG  IHDR00WgAMA a pHYs  @A IDATxݙ[oIvդ(")f˲dٲ= 2`'6`|<yǼ2/$@d<3o#Kn(":'E[ /I::Nj7|Ekɵ?\\{g~pW ] o!` Y?`,"`yb냷Y+v^-9y`D7}H1^^@ՂGOEŁyۜ8dq.8#F? w}B $f0굎a<@/a6/"lj<QJfW_@cÄ(Ź/'B!"FD &( VB3Xh+$&ZZXAɾH$>?nC2 ﶥ(2&q8}7]t97i,=ci2rكIv~/v^K;VO0tA7u&j4:O*L4ן02VuUR9T b!tD~_EVawj6f[ZXbL04 BjLWbTgUVZ_VYG"f>]ކH+/*ϯc^_^V)C^*(5`<_p9s(1bݿ_.Vy2\Grw]#\ξeymy*7渶y%gQ+̿ʫiT$vBa^f`)!\`{Ig}a;QqCMTXUEDE -X6Ԣ:#wry:3yoP|j,Շ$ރ묾ΝGdBmo6k/9saJaGos Lh#4+ԏrRmS=-#]!4+m>Υk|+q?IC|9B\ 9PNX Bi?ubxȑE#zB= &EqOȚ!ƙ<^yVyzc;udVyve >Q60+a0>?W>D"#MLEX8LNn@^|NnNQw/Vd,V*QQnl^ai25Q(Nzu4R.jpyVݝ`fV>3yT+LWW"q>,x !sPiqEэKҗ_Ma3OJ%s O,^[zwd S`ueZe)L`?B  !:{tE*\ߘCU[@3J̽dnw ¥3Ӈu&k0~\UcTqrTrmW?x(m'G-"篕 Omӹ)DpJ)^U@^hLrwKI1tUПjE銂)˓^j `.=BN`$PlbCKlcrtv6iLV?/Og86pIZlv-P?z GM& "!z"e):mCTX_cGcv/ qspnS;)&iImc@@h>bvT,1tE$@Q"c8$!lLDi8LPU[o _?8^*|(4p ,ٻ'?.6Zz9(QӓDxhapzb4§G2Lԝ'WY'.+,dm19^KLMMqx|HբX,R(yVGml[,rYDudmLk-0.t2̀63BP*RD$ AD/VK"BB$&b(g'g{ٯ #5,B-2@P+$ FJB6$0cByc IR%K3U 5 v<#Uh|ða ,*etdƩ2m'<.Q}4{ ~vibT\n&~f>y/vn=ͬBY{ۏ"~d=^0v|98#W2f0p0lz&9mlpǍQ?PtVq6M838\P1d. 0HHn,wnz.~>1_`aq 2N]]ǿvy!o+uNW|C:|z`IENDB`zapping-0.10cvs6/pixmaps/teletext.h 644 764 144 11617 10433067455 12532 /* Generated file, do not edit! */ /* GdkPixbuf RGBA C-Source image dump 1-byte-run-length-encoded */ static const GdkPixdata teletext_png = { 0x47646b50, /* Pixbuf magic: 'GdkP' */ 24 + 1399, /* header length + pixel_data length */ 0x2010002, /* pixdata_type */ 96, /* rowstride */ 24, /* width */ 24, /* height */ /* pixel_data: */ (guint8 *) "\207\377\377\377\0\3\377\377\377\2\377\377\377\13\377\377\377\4\216\377" "\377\377\0\1\333\333\333\27\227\233\233\233\0\1\247\247\247\0\204\32" "\32\32\0\6\32\32\32\3\32\32\32\15\32\32\32\34\32\32\32+\32\32\32""7\32" "\32\32>\202\31\31\31A\6\32\32\32\77\32\32\32""7\32\32\32+\32\32\32\34" "\32\32\32\16\32\32\32\3\204\32\32\32\0\2)))\0\234\234\234\0\202\0\0\0" "\0\10\0\0\0\7\0\0\0""6\0\0\0\201\1\1\1\267\4\4\4\324\11\11\11\343\16" "\16\16\353\22\22\22\357\202\25\25\25\361\10\22\22\22\360\16\16\16\354" "\11\11\11\344\4\4\4\325\1\1\1\270\0\0\0\202\0\0\0""8\0\0\0\7\202\0\0" "\0\0\14\26\26\26\0\234\234\234\0\0\0\0\0\0\0\0\16\0\0\0x\7\7\7\340//" "/\373ggg\376\221\221\221\377\254\254\254\377\274\274\274\377\305\305" "\305\377\202\313\313\313\377\23\305\305\305\377\274\274\274\377\254\254" "\254\377\222\222\222\377ggg\376000\373\10\10\10\341\0\0\0{\0\0\0\17\0" "\0\0\0\26\26\26\0\234\234\234\0\0\0\0\4\0\0\0o\22\22\22\360\201\201\201" "\376\336\336\336\377\367\367\367\377\374\374\374\377\202\375\375\375" "\377\204\376\376\376\377\202\375\375\375\377\16\374\374\374\377\367\367" "\367\377\337\337\337\377\202\202\202\376\22\22\22\361\0\0\0r\0\0\0\5" "\26\26\26\0\234\234\234\0\0\0\0#\4\4\4\323sss\376\362\362\362\377\375" "\375\375\377\214\374\374\374\377\15\375\375\375\377\363\363\363\377v" "vv\376\5\5\5\326\0\0\0&\26\26\26\0\234\234\234\1\0\0\0Y\31\31\31\365" "\312\312\312\377\375\375\375\377\342\342\342\377\231\231\231\377\212" "\223\223\223\377\16\231\231\231\377\342\342\342\377\375\375\375\377\315" "\315\315\377\34\34\34\366\0\0\0]\26\26\26\1\234\234\234\3\0\0\0\207:" "::\374\352\352\352\377\375\375\375\377\312\312\312\377@@@\377\212444" "\377\16@@@\377\312\312\312\377\375\375\375\377\354\354\354\377>>>\375" "\0\0\0\214\26\26\26\4\234\234\234\7\0\0\0\244WWW\376\365\365\365\377" "\376\376\376\377\367\367\367\377\347\347\347\377\212\346\346\346\377" "\16\347\347\347\377\367\367\367\377\376\376\376\377\366\366\366\377[" "[[\376\1\1\1\251\26\26\26\10\234\234\234\13\1\1\1\264hhh\376\370\370" "\370\377\376\376\376\377\361\361\361\377\321\321\321\377\212\317\317" "\317\377\16\321\321\321\377\361\361\361\377\376\376\376\377\371\371\371" "\377mmm\376\1\1\1\267\26\26\26\14\234\234\234\14\1\1\1\271nnn\377\371" "\371\371\377\376\376\376\377\306\306\306\377111\377\212%%%\377\16""1" "11\377\306\306\306\377\376\376\376\377\372\372\372\377ttt\377\2\2\2\275" "\26\26\26\16\234\234\234\13\1\1\1\265jjj\376\371\371\371\377\376\376" "\376\377\354\354\354\377\275\275\275\377\212\271\271\271\377\16\275\275" "\275\377\354\354\354\377\376\376\376\377\371\371\371\377nnn\376\1\1\1" "\270\26\26\26\15\234\234\234\10\1\1\1\247ZZZ\376\366\366\366\377\376" "\376\376\377\371\371\371\377\356\356\356\377\212\355\355\355\377\16\356" "\356\356\377\371\371\371\377\376\376\376\377\367\367\367\377^^^\376\1" "\1\1\253\26\26\26\11\234\234\234\4\0\0\0\213>>>\375\355\355\355\377\375" "\375\375\377\315\315\315\377KKK\377\212@@@\377\16KKK\377\315\315\315" "\377\376\376\376\377\356\356\356\377CCC\375\0\0\0\220\26\26\26\4\234" "\234\234\1\0\0\0_\35\35\35\366\320\320\320\377\375\375\375\377\336\336" "\336\377\210\210\210\377\212\201\201\201\377\15\210\210\210\377\336\336" "\336\377\375\375\375\377\323\323\323\377\40\40\40\367\0\0\0d\26\26\26" "\1\234\234\234\0\0\0\0)\5\5\5\332\200\200\200\376\366\366\366\377\375" "\375\375\377\214\373\373\373\377\15\375\375\375\377\366\366\366\377\205" "\205\205\376\6\6\6\334\0\0\0,\26\26\26\0\234\234\234\0\0\0\0\6\0\0\0" "~\31\31\31\365\225\225\225\376\351\351\351\377\372\372\372\377\202\375" "\375\375\377\206\376\376\376\377\202\375\375\375\377\22\372\372\372\377" "\352\352\352\377\230\230\230\376\32\32\32\365\0\0\0\202\0\0\0\7\26\26" "\26\0\234\234\234\0\0\0\0\0\0\0\0\25\0\0\0\216\14\14\14\353BBB\375\177" "\177\177\376\251\251\251\377\302\302\302\377\321\321\321\377\327\327" "\327\377\202\333\333\333\377\14\327\327\327\377\321\321\321\377\303\303" "\303\377\252\252\252\377\201\201\201\376CCC\375\15\15\15\353\0\0\0\220" "\0\0\0\25\0\0\0\0\26\26\26\0\234\234\234\0\202\0\0\0\0\10\0\0\0\14\0" "\0\0J\0\0\0\232\3\3\3\313\11\11\11\343\21\21\21\356\31\31\31\364\36\36" "\36\366\202!!!\367\10\36\36\36\366\31\31\31\364\21\21\21\357\11\11\11" "\343\3\3\3\315\0\0\0\234\0\0\0K\0\0\0\14\202\0\0\0\0\2\26\26\26\0\234" "\234\234\0\203\0\0\0\0\7\0\0\0\1\0\0\0\7\0\0\0\27\0\0\0+\0\0\0\77\0\0" "\0N\0\0\0X\202\0\0\0[\7\0\0\0X\0\0\0N\0\0\0@\0\0\0,\0\0\0\30\0\0\0\7" "\0\0\0\1\203\0\0\0\0\2\26\26\26\0\261\261\261\0\225\221\221\221\0\2\221" "\221\221\2\230\230\230\0\260\0\0\0\0", }; zapping-0.10cvs6/pixmaps/subtitle.h 644 764 144 7435 10433067455 12512 /* Generated file, do not edit! */ /* GdkPixbuf RGBA C-Source image dump 1-byte-run-length-encoded */ static const GdkPixdata subtitle_png = { 0x47646b50, /* Pixbuf magic: 'GdkP' */ 24 + 1135, /* header length + pixel_data length */ 0x2010002, /* pixdata_type */ 96, /* rowstride */ 24, /* width */ 24, /* height */ /* pixel_data: */ (guint8 *) "\2\0\0\0\0\376\376\376\3\267\0\0\0\0\6\0\0\0\1\0\0\0\4\0\0\0\7\0\0\0" "\6\0\0\0\4\0\0\0\1\211\0\0\0\0\1\377\377\377\3\205\0\0\0\0\5\0\0\0\10" "\0\0\0,\0\0\0c\0\0\0\225\0\0\0\264\202\0\0\0\301\5\0\0\0\262\0\0\0\221" "\0\0\0\\\0\0\0&\0\0\0\6\206\0\0\0\0\1\377\377\377\1\203\0\0\0\0\20\0" "\0\0\10\0\0\0K\0\0\0\265\6\6\6\354\40\40\40\372FFF\375ggg\376www\376" "vvv\376ddd\376AAA\375\34\34\34\371\4\4\4\351\0\0\0\253\0\0\0@\0\0\0\5" "\207\0\0\0\0\22\0\0\0\34\0\0\0\241\14\14\14\362RRR\376\262\262\262\377" "\345\345\345\377\366\366\366\377\372\372\372\377\374\374\374\377\373" "\373\373\377\372\372\372\377\365\365\365\377\342\342\342\377\250\250" "\250\376FFF\375\10\10\10\357\0\0\0\220\0\0\0\24\205\0\0\0\0\7\0\0\0\40" "\0\0\0\301)))\374\262\262\262\377\364\364\364\377\375\375\375\377\376" "\376\376\376\203\377\377\377\377\203\376\376\376\377\7\375\375\375\377" "\374\374\374\377\361\361\361\377\243\243\243\376\37\37\37\372\0\0\0\260" "\0\0\0\25\203\0\0\0\0\6\0\0\0\13\0\0\0\253///\375\323\323\323\377\374" "\374\374\377\376\376\376\377\205\377\377\377\377\206\376\376\376\377" "\5\373\373\373\377\304\304\304\377!!!\373\0\0\0\224\0\0\0\6\202\0\0\0" "\0\4\0\0\0O\16\16\16\365\273\273\273\377\374\374\374\377\203\376\376" "\376\377\3\377\377\377\377\375\375\375\375\374\374\374\376\210\376\376" "\376\377\11\373\373\373\377\246\246\246\377\10\10\10\356\0\0\0""8\0\0" "\0\0\0\0\0\3\0\0\0\243JJJ\376\365\365\365\377\220\376\376\376\377\10" "\357\357\357\377333\375\0\0\0\206\0\0\0\1\0\0\0\11\0\0\0\310~~~\376\374" "\374\374\377\220\376\376\376\377\10\372\372\372\377```\376\0\0\0\257" "\0\0\0\4\27\27\27\12\0\0\0\306{{{\376\374\374\374\377\210\376\376\376" "\377\203\377\377\377\377\205\376\376\376\377\10\372\372\372\377]]]\376" "\0\0\0\255\0\0\0\4\0\0\0\3\0\0\0\234BBB\376\363\363\363\377\207\376\376" "\376\377\204\377\377\377\377\205\376\376\376\377\11\353\353\353\377-" "--\374\0\0\0\177\0\0\0\1\0\0\0\0\0\0\0E\13\13\13\362\256\256\256\377" "\373\373\373\377\206\376\376\376\377\204\377\377\377\377\204\376\376" "\376\377\13\372\372\372\377\230\230\230\377\6\6\6\352\0\0\0""0\0\0\0" "\0\377\377\377\3\0\0\0\10\0\0\0\234$$$\373\305\305\305\377\373\373\373" "\377\205\376\376\376\377\204\377\377\377\377\202\376\376\376\377\20\375" "\375\375\377\370\370\370\377\262\262\262\377\30\30\30\371\0\0\0\204\0" "\0\0\4\0\0\0\0\377\377\377\1\0\0\0\0\0\0\0\27\0\0\0\260\35\35\35\372" "\235\235\235\376\357\357\357\377\374\374\374\377\375\375\375\377\202" "\376\376\376\377\204\377\377\377\377\7\376\376\376\377\375\375\375\377" "\360\360\360\377\207\207\207\376\21\21\21\370\0\0\0\235\0\0\0\16\205" "\0\0\0\0\11\0\0\0\23\0\0\0\212\6\6\6\354===\375\232\232\232\376\331\331" "\331\377\360\360\360\377\370\370\370\377\361\361\361\377\203\377\377" "\377\377\6\374\374\374\377\334\334\334\377VVV\376\5\5\5\352\0\0\0z\0" "\0\0\15\207\0\0\0\0\20\0\0\0\4\0\0\0""8\0\0\0\236\3\3\3\342\23\23\23" "\367111\374MMM\376TTT\376\22\22\22\377\254\254\254\377\371\371\371\377" "\273\273\273\377---\374\1\1\1\317\0\0\0B\0\0\0\3\212\0\0\0\0\14\0\0\0" "\4\0\0\0\34\0\0\0J\0\0\0{\0\0\0\234\0\0\0\326\35\35\35\376\326\326\326" "\377\215\215\215\376\24\24\24\367\0\0\0\247\0\0\0\40\220\0\0\0\0\7\0" "\0\0\10\0\0\0\263<<<\376VVV\376\6\6\6\353\0\0\0w\0\0\0\14\221\0\0\0\0" "\6\0\0\0\37\0\0\0\345\6\6\6\375\1\1\1\324\0\0\0H\0\0\0\3\222\0\0\0\0" "\4\0\0\0B\0\0\0\352\0\0\0\255\0\0\0$\224\0\0\0\0\3\0\0\0\7\0\0\0""9\0" "\0\0\15\243\0\0\0\0", }; zapping-0.10cvs6/pixmaps/gnome-shutdown.png 644 764 144 5703 7400267204 14140 PNG  IHDR00WgAMA a pHYs  ~ eIDATxՙn$yZM6HbXR,P؀ W+Fo ,%NlK8QC|M-3Cr ,W_}+zh(}I)|`h66Ri}%< iޓ+k:{ē1u Y1~%={vvzݗٛ7/zVv~ ֊y1/~*[/|U$0{xG|j@ ,E%B9AcxoZlU^\P_hIB…9@P @g?6o˓&fDq̚6H ZQM+a0RR D:hMG<ܗ.m\!toJA&j!ަ^'JSК0NiEŤIBE[ou+dZEju0PX:G<6$IҊj,w\ۏpw h̤((BW%bʸzGŘ}`ju㘋$D=wGԽK\[ jZF.0rU#bl-1?܅qƙS{+uM~Y3tsg,0a`b-Em-|y}: 9!E{l}6ޡ>g0j*QyNhR8ǝ^1/s%5hݡ? %[ģUA#I#9Jh"IU GGiE#C]a[VJ=@h{2)/<+8@`6@@D{230@uY:k! @86jIמ93}ߝgҌ}sRuF 2B@K43,4uΉH4)loZ^E!'竴r8ytL3a~yF9uЋP(NO7%li)$SH%Ҋ.h3_zf;?"9k!=q (7T7B|> gµk׹^&F,˩&ﰽc.xï3s3-M0:*:lxįJ_qNz Ɔ6B\:we@R5]?;P{p||,{{ L~N>xVVįB++ Q>eSUI`VF5qqVfɨB!q'*Z1.s|#W;MQt]&I 4M_a^>z5dVŝPZf>͚W]הeYTu7ú̫ !+@d ?+JŴn^v { I;oQײbk壖`u 'u G1ć c IE;C|EyVcd ˌ7R<^;8=b-cȲfI\ðC0n_N#twMӔ,^K$I0ƜJ‡%V,b|XXaYS?$ɩ9yp|9qIENDB`zapping-0.10cvs6/pixmaps/gnome-oscilloscope.png 644 764 144 10263 7400267204 15000 PNG  IHDR00WgAMA a pHYs  d_tIME 2*(BIDATx{lT?5O?؃ ̌R!(Q*E]nP"V6al7 bC#M"hHL0I;c{}1[mV۟t|9sOx&}(oq ~ W4S1p,o?v}(4>P \[o(  euQUIB, EQB8!rߏ۶ hp8(ض aidYƶmr'OK@V OM@[[UUUFI&TVVI}}=dD"0Dd2ҥK)--%.X\.GCCiR__O$@ @" S__ŋqbqjkk}kR9w***fv'ٸq#,yra-ZD$,4M>M`Xʅ)*~+B4,4R! C l6/D1DCXfϞDz^+/HDss3?<PTeGlROp=?(hSFfrȲɨ*~?29#L .IJ,&''Yv-? ikkGebb? ' @IqheeJ '/RʳhjYa!(!lc``YekdP $E&;i~3p]p(DyzT*ljb$|-5McժUB%bso3P\TDP?H& iaDz@vedE뎻)*2?X,Ɩ-[r<#v{"8T5- INڡQ@`2Nubˎa\Ķ]VccN2I4l .ͼwwAΞ=KCC?ωb_>A9s(++$IbڵyϘ&&vGz=ZP_12:cs L\,'|K_`m&ur[}{nY~=MMMq֭[HdfP/*6& , HCܰ)-/4mjPD9U:nhn } gni`17kwze۶mN" rJ BB,Y:ئQΑ3161M %x!gאKN17Xߴ#Ɨ Q[k.ٳg{'xMffuȻf,G4Yl 2XsztSGP4*5!"N8Ass3aq0eԄa3,˅aR\6{<`'.624GWA^wFe09 Er ɷ_ =2^U_|T*iXYgBd2R*00& }|-.H%A"a~w#~J cR|ގy<R$=t˲f  Bzg!<p-`&y7,_1Y{C+.i܄="!<L׭t!ۋi3w<1,>X3Uۘi䵱s8Gz[uGq/160aR}C9??YFGGI%Gp3^HS(#7lɌg_12֮eǎ#28qe;30Ef9]jPC+Ҹ~b yH2l y{B"Pw?v|ٹs'L'x=4\?,Y7R"td7w*Xous+Oa:ayKi]%y7/s]\Kl$ @CCL}QSSòeHRx$I\wu,%OK/˩36;LA/a˽9dr|D-by6esiN-9ñ=$ó'x^~eKGGaӃb1gȦ-`L&F3d3.B($I"=>l222<q0L1_rtIdeQ1LoV\ץ388(D"TU% ,˅Li*gCPZ\DCH$RlO0:0=?w\rsQ__X뺅ь銊 8cֶʑ#Gu]oΎ;W6t^?)7?хE᳟, 1w\Yp!CCC$ R $I.\K.x<{GMM +Ccc#,Z!y;wdpp@ eKիWst+pDIENDB`zapping-0.10cvs6/pixmaps/contrast.png 644 764 144 435 7762173332 13005 PNG  IHDRw=gAMA a pHYs  ~IDATxT 0 B!!vDJ$$d|w6G": ιtUf_aYrHz􈫓DS5jf ^&&"'* lQ`3 2cBj [ GN?z`tmM) [gkr_[ R# O1YKp{ka$IENDB`zapping-0.10cvs6/pixmaps/gnome-info.png 644 764 144 6660 7400267204 13223 PNG  IHDR00WgAMA a gIDATx{u?73޻5x4ƍPp[PPTBZEA }(.QUAm$*ܪM@6!&4n ulǾ{􏙹;^;x9Os5sg9#|dd97#SqN 5U89,owMS]Mω3'̺P[񑼈ÉIAۊNL 6!q73eumbRYGks䘾ODĞ1d!GASQ|~u0>ڼd &BLHtFc@"ӑr@L zE=5I6@=!V<ŮB@Di,}@b>U͋?߯ׯovmu_J M.]zʝ8~6ҤϺ]f"? yK[GM AP Q5͐c3FNzp_ "r8 TȄۅxdR/Ht0`p֭K7o슃81%WD4DAD/'C=ryW7C'_(w}^L7&|> ;.dIܼys}]8\$^\Lq%g-Rx&6}!wluw#A0Ѩ΂׋)a⢨es\9WSuόA-R"6A#+!P;EiGG0AԛzF>>sцpժUI܏w`U2Wn:-@6JN qYώmN˫x%@5m6PYff#f'[q6mTIj7w4Tm;SElԥQ#5Y$rT$H׮.va\ u!-Z`6Z4Tƫz蘵7xTfrf&qΪDDXj>qZuQ(-̪ʤ},Uq3FY DA1muِzjiڼ/t}뮻KR8+ZMR68 S ^qTu ӪRڷ'bk9lZI^eҢ+w=T7mp 8ǝ ;a *h &1LɶU!b "o};G:*sl,jj Q;xz~Um۶k"2A\.4v$ ".))H *@^zeC}fÆ+9z_W2u[zLJ#̏ޏV_pu_׋b-x._dYHEY*H b"o@׳n\wor/}z%. gkQ뿞<{W:4DL5% "ɹJBCD) ݸ0jGUCUzX1۹ϱm66nU}ry7Ͽ޵jyCeQ' u0CI|j e,% ι8i4BzzJ /R./6qMǞ=qmgg9 > cwHv&B"ntdi׳R+1okF~\.PȳzJn p,_~<}{n'V!RΝ;N=q_aWgVE*i%rs:g#\EQgtt~]G{ϲex=\{/zt?AUHGwqE/bOGZ'OM yx~{{⦛>Dž~_~o~1jW\q9SS{jR%:h:ml{ҎSAHςj-^PUuVA{]ns9sزe cc?fp+WD \G5rAgf_锄;thܶZuN}|KUWm`׮#˳fVu3nVUꚪB^\z?A>OMabb\m#G&qNTjjl'BlWut8sjC+&]dq7q:2^oT*5Zʏ.BZT't9GwnxS~<)6k33wahݪιl%OpYwǓo"Я%"Kc9`hh]Џs#}!)JP,pOYwVCW8ۅX}":MMR#Gt OLwYsɂs#p2˂c_/,4bIENDB`zapping-0.10cvs6/ChangeLog 644 764 144 67534 10443536314 10621 2006-06-13 * Prerelease 0.10cvs6. 2006-06-11 * src/tveng.c (tveng_attach_device): Must not access xv_port_id field when Xv support not compiled in. * configure.in: Replaced lrint() link check by compile and link check. CFLAGS changes have no effect after AC_PROG_CC, added AC_GNU_SOURCE instead of -D_GNU_SOURCE. * src/zvbi.c: Undefined lrint() because config.h was not included. 2006-06-07 * configure.in: Replaced lrint() link check by compile check because it's a macro in glibc. * src/main.c (MAIN), src/globals.c: * src/audio.c (mixer_setup, devices_audio_apply, startup_audio): * src/audio.c (loopback_start): Added preliminary support for ivtv audio device. * src/tveng25.c (read_frame), src/tveng1.c (read_frame): Assert tv_copy_image() success. * libtv/copy_image.c (tv_copy_image): * test/copy_image.c (test): HM12 not supported yet, no complaints please. * test/convert_image.c (all_formats): Fixed the HM12 check. * plugins/deinterlace/DI_GreedyH/DI_GreedyH.c: SSE version was not compiled because the SSE_INT checks were backwards. 2006-06-06 * test/convert_image.c, libtv/lut_yuv2rgb-gen.c: Did not define a replacement in case lrint() is unavailable. * src/tvengbktr.c (tvengbktr_attach_device): Fixed struct private_tvengbktr_device_info name, * src/tveng.c: Did not define PRIx64 if missing in inttypes.h. * libtv/Makefile.am (libtv_la_SOURCES): copy_image-priv.h was missing. 2006-05-29 * configure.in: Run function checks with -D_GNU_SOURCE because we also compile with this flag. * src/capture.c: Added some log points. * src/tveng25.c (image_format_from_format): Uninitialized bytes-per-line fix. (read_buffer): Disable ivtv read work-around because this bug seems to be fixed. * src/tveng1.c: Added code to read back the pixel format requested with VIDIOCSPICT because the v4l1-compat module does not return an error when the format is unsupported. Perhaps some drivers have similar bugs. 2006-05-18 * src/tveng25.c (tveng25_attach_device): Added a work-around for cx88 which sets the overlay capability flag but doesn't really support overlay, causing Zapping to try the V4L API instead. 2006-05-17 * src/tveng1.c: s/TVENG25_XV_TEST/TVENG1_XV_TEST. * src/tveng25.c (read_buffer): Preliminary work-around for ivtv YUV read size bug. Use HM12 instead of NV12 format with ivtv driver. * src/tveng.c (YUVHACK): Added TV_PIXFMT_HM12. * libtv/image_format.c (tv_image_format_init): Added TV_PIXFMT_HM12. * libtv/clear_image.c (tv_clear_image): Added TV_PIXFMT_HM12. * test/convert_image.c: Added _tv_hm12_to_yuv420() test. * src/csconvert.c (startup_csconvert): Added _tv_hm12_to_yuv420(). * libtv/yuv2yuv.h, libtv/yuv2yuv.c (_tv_hm12_to_yuv420): Added converter from ivtv YUV format to planar YUV 4:2:0. * libtv/pixel_format.c (tv_pixfmt_name, pixel_formats): Added TV_PIXFMT_HM12. * libtv/pixel_format.h (tv_pixfmt, TV_PIXFMT_SET_YUV_PLANAR): Added TV_PIXFMT_HM12. 2006-05-11 * src/tveng25.c (read_buffer), common/device.h, common/device.c (device_read): Added read() logging. * src/tveng25.c (set_capture_format): Handle EBUSY error of ivtv VIDIOC_S_FMT. (enable_capture, streamoff_or_reopen): Try to reopen the device if VIDIOC_STREAMOFF doesn't succeed after read()ing. 2006-05-07 * common/structpr_gen.pl (enumeration): ILP64 fixes. 2006-04-28 * libvbi/caption_decoder.c (vbi3_caption_decoder_feed): Executed repeated control codes twice if interrupted by data on the second field. 2006-04-24 * src/frequencies.c, src/strnatcmp.h, src/strnatcmp.c: strnatcmp no longer used, files removed. * src/error_console.c: No longer used, file removed. * configure.in (ALL_LINGUAS): Added ja. * po/ja.po: New Japanese translation contributed by Hiroshi Hasebe. 2006-04-12 * src/tveng25.c (get_capabilities): Added a no-overlay test. * src/main.c (restore_last_capture_mode): Disable capture or overlay GUI elements if the device does not support it. Try capture OR overlay if the old mode is unsupported. (main): Do not disable fullscreen GUI if overlay has been disabled because we now have fullscreen ttx and capture. * src/frequencies.c (frequency_tables): Added UPC NL. * plugins/deinterlace/test/Makefile.am (ditest_LDADD): Added libtv.la which defines various SIMD constants. * test/simd.c, plugins/deinterlace/test/ditest.c, plugins/deinterlace/main.c, plugins/deinterlace/ditest.c: Removed include simd-consts.h, they're now defined in libtv.a. * libtv/simd-consts.h: Replaced by simd.c. * test/simd.c, plugins/deinterlace/DI_Misc/Makefile.am, plugins/deinterlace/DI_Misc/DI_Weave.c, plugins/deinterlace/DI_Misc/DI_VideoWeave.c, plugins/deinterlace/DI_Misc/DI_VideoBob.c, plugins/deinterlace/DI_Misc/DI_TwoFrame.c, plugins/deinterlace/DI_Misc/DI_TomsMoComp.c, plugins/deinterlace/DI_Misc/DI_ScalerBob.c, plugins/deinterlace/DI_Misc/DI_OldGame.c, plugins/deinterlace/DI_Misc/DI_OddOnly.c, plugins/deinterlace/DI_Misc/DI_MoComp2.c, plugins/deinterlace/DI_Misc/DI_Greedy2Frame.c, plugins/deinterlace/DI_Misc/DI_Greedy.c, plugins/deinterlace/DI_Misc/DI_EvenOnly.c, plugins/deinterlace/DI_Misc/DI_Bob.c, plugins/deinterlace/DI_GreedyH/Makefile.am, plugins/deinterlace/DI_GreedyH/DI_GreedyHMPulldown.c, plugins/deinterlace/DI_GreedyH/DI_GreedyHM.c, plugins/deinterlace/DI_GreedyH/DI_GreedyH.c, plugins/deinterlace/windows.h, libtv/rgb2rgb.c, libtv/simd-conv.h, libtv/simd.h, libtv/yuv2yuv.c: s/CPU_FEATURE_SSE/CPU_FEATURE_SSE_INT. * libtv/cpu.h, libtv/cpu.c: Splitted CPU_FEATURE_SSE into SSE_INT and SSE_FLT to allow 128 bit loads/stores in P3 code. * test/Makefile.am: Added copy_image and clear_image checks. * libtv/yuv2yuv.c: copy_plane_SCALAR() is now tv_copy_plane(). * libtv/image_format.c: Moved scalar image clear and copy routines to clear_image.c, copy_image.c. (tv_image_format_init): Added tv_pixel_format.hmask, .vmask to simplify image size checks. * libtv/cpu.c: Integrated the x86 and ppc checks formerly in mmx and avec subdirs. (cpu_detection): Added SIGILL check for SSE kernel support. * libtv/Makefile.am: Removed mmx, sse, avec subdirs. (SIMD_SOURCES): Added clear_image.c, clear_image.h, copy_image.c, copy_image.h. * src/video_mem.c (planar_image_new), libtv/pixel_format.h: libtv/pixel_format.c: Added tv_pixel_format.hmask, .vmask to simplify image size checks. * libtv/yuv2yuv.c, libtv/yuv2rgb.c: nt-stores are weakly ordered, added sfence before returning from the function. * libtv/simd.h: always_inline disabled because it does not seem to work with GCC 4.1 and -O0. Added sfence() macro and SSE float loads and stores. Removed __builtin_constant_p() checks because they fail without always_inline. * libtv/simd-conv.h: Removed __builtin_constant_p() checks because they fail without always_inline. (store_rgb16): Fixed a 32_BE bug in previous CVS version. 2006-03-21 * configure.in (ALL_LINGUAS): Added cs. * po/cs.po: New Czech translation contributed by Pavel Mlcoch. 2006-03-17 * TODO, NEWS: Updated. * src/tvengxv.h, src/tvengxv.c (tvengxv_port_scan): New function enumerating XVideo video input ports. * src/tvengbktr.h, src/tvengbktr.c (tvengbktr_device_scan): New function enumerating installed bktr devices. * src/tveng25.h, src/tveng25.c (tveng25_device_scan): New function enumerating installed V4L2 and V4L video capture devices. * src/tveng1.c: Rewrote the code temporarily opening and closing the V4L device. Finished XVideo-V4L support. Added functions to access controls and tuner frequency through the XVideo interface, so we don't have to stop overlay and reopen the V4L every time. Added a change_attach_mode function as in tveng25.c. Restructured the code a bit and cleaned up. XVideo-V4L and change_attach_mode not enabled yet. * src/tveng.h (enum tveng_attach_mode): Added TVENG_ATTACH_UNKNOWN = 0. * src/tveng.c (tveng_attach_device): Now tveng1.c supports change_attach_mode method too. 2006-03-11 * src/x11stuff.h, src/x11stuff.c (x11_error_handler): Now public to avoid code duplication in video_xv.c and tvengxv.c. * src/video_xv.c: Use x11stuff.c X error handler instead of a local copy. * src/tvengxv.c: Use tveng_device_info.overlay.xv_port_id instead of a private port_id to permit code sharing with other controllers. Replaced direct XVideo calls by wrapper functions with logging and proper error checking. * src/tvengxv.c, src/tvengxv.h (_tv_xv_stop_video, _tv_xv_put_video) (_tv_xv_get_port_attribute, _tv_xv_set_port_attribute) (_tv_xv_ungrab_port, _tv_xv_grab_port): New public wrappers around XVideo functions with --io-debug logging and industrial strength error checking. Also used by tveng25.c. * src/tveng_private.h (tveng_module_info): New change_attach_mode interface. (overlay_device): New xv_port_id field, for tvengxv.c and other controllers which can use XVideo. * src/tveng25.c: Probe the XVideo adaptors and ports to find the XVideo-V4L wrapper and use XvPutVideo() instead of setting up an overlay DMA directly. Not enabled yet. Unlike tvengxv.c we will be able to access all the controls, inputs and stuff. Switching between capture and overlay mode will be faster and easier. (get_overlay_buffer): Update overlay capabilities. attach_device() used to call VIDIOC_G_FBUF twice, once to get capabilities and again to get current frame buffer parameters. (tveng25_change_attach_mode): Allow mode switches without querying all the driver parameters. Not enabled yet. * src/tveng1.c: Added preliminary XVideo port probe code, not enabled yet. * src/tveng.h: Added TVENG_CAPS_XVIDEO. Future tveng1.c and tveng25.c will support XVideo for overlay programming. tvengxv.c sets this flag too. * src/tveng_private.h (tveng_device_info), src/tveng.c (p_tv_enable_overlay): Skip overlay window visibility and frame buffer checks in enable_overlay() only if the controller supports XVideo (which is no longer limited to tvengxv.c) AND the client uses the XVideo interface. * src/tveng.c: Testing XVideo support and change_attach_mode shortcut in tveng25.c. This code is not enabled yet. (tveng_attach_device): Dump new overlay.xv_port_id. (round_boundary_4): Signedness fix. * src/overlay.c: Check new TVENG_CAPS_XVIDEO instead of TVENG_CONTROLLER_XV because in the future tveng1.c and tveng25.c will support XVideo for overlay programming. * src/zmisc.c (tv_get_attach_mode), src/overlay.c (start_overlay), src/fullscreen.c (start_fullscreen): Removed redundant tveng_close_device() before tveng_attach_device(). * src/audio.c (loopback_thread): Volume scaling doesn't have to be perfectly accurate, signed shift instead of / 256 will do. * libtv/yuv2yuv.c: Minor optimizations. (SIMD_SHUFFLE, YUV420_YUYV): Didn't emms. * libtv/simd-consts.h: Make sure we get 16 byte alignment. * libtv/rgb2rgb.c: Minor optimizations. * libtv/pixel_format.h (tv_pixfmt): Reordered YUYV formats to simplify conversions. (TV_PIXFMT_SET_ALL): Accidentally added SBGGR twice. * src/video_mem.c, src/video_xv.c: * libtv/pixel_format.c, libtv/pixel_format.h: * test/convert_image.c: Added YUV to RGB conversion tests. * test/Makefile.am (convert_image_LDADD): Added -lm for YUV to RGB conversion tests. * src/yuv2rgb.h, src/yuv2rgb.c: Replaced mpeg2dec scalar and x86-only MMX YUV420 to RGB and YUYV to RGB functions by libtv/yuv2rgb.c routines. Replaced dummy NV12 to RGB test functions by the real thing in libtv/yuv2rgb.c. * src/csconvert.h, src/csconvert.c: Use the new yuv2yuv.c and yuv2rgb.c routines. * src/csconvert.c: (lookup_csconvert): Was called before initializing the conversion table. (nv12_yuv420): Moved into yuv2yuv.c. * libtv/simd-conv.h: Fixes and improvements for yuv2rgb.c. (store_rgb16): Added saturating conversions to RGB16. (fast_yuv2rgb): Added for yuv2rgb.c. * libtv/simd.h: Added vsplatu8_F8 and _FC for RGB16 conversions. Fixed signedness of vpacksu16(). Added vmulhi16() for YUV to RGB conversion. (SIMD_FN_ARRAY_PROTOS): Permit multidimensional arrays. * libtv/image_format.c: Replaced tv_pixel_format.planar by n_planes to simplify NV12 checks. * libtv/yuv2yuv.h, libtv/yuv2yuv.c: Added NV12 to YUYV and YUV420 converters. * libtv/yuv2rgb.c, libtv/yuv2rgb.h: New image conversion routines. * libtv/yuv2rgb-gen.c: New generator of YUV to RGB conversion lookup tables and SIMD consts. * libtv/Makefile.am (BUILT_SOURCES): Added lut_yuv2rgb.c, lut_yuv2rgb.h. (MAINTAINERCLEANFILES): Added lut_yuv2rgb-gen. (EXTRA_DIST): Added lut_yuv2rgb-gen.c. (SIMD_SOURCES): Added yuv2rgb.c, yuv2rgb.h. (libtv_la_SOURCES): Added lut_yuv2rgb.c, lut_yuv2rgb.h. (noinst_PROGRAMS): Added lut_yuv2rgb-gen. 2006-03-06 * Prerelease 0.10cvs4. 2006-03-05 * src/oss.c (_open, _add_props, _apply_props, _init): Used old config value blah/oss/device instead of blah/pcm_device for /dev/dsp name. * src/tveng.c (tveng_attach_device), src/mixer.c (startup_mixer): Present the audio loopback mixer in the GUI instead of the TV card or soundcard mixer if the loopback is enabled. * src/main.c (MAIN), src/globals.h, src/globals.c: New --esd-out option. * src/zvbi.c (join_thread), src/zmisc.h, src/zmisc.c, src/capture.c (join): Replaced join functions by one z_join_thread_with_timeout() in zmisc.c. * src/audio.h: Added a mixer interface to mute and change the volume of the new audio loopback, so we can leave the TV card or soundcard recording level alone. * src/audio.c: Added a software audio loopback from the audio source (TV card, soundcard) to ESD in response to Gnome bug #332777. Recording is not yet possible while the loopback is active. Added a mixer interface to mute and change the volume of the loopback, so we can leave the TV card or soundcard recording level alone. (mixer_setup): Mute (for output) the recorded mixer line when the audio loopback is enabled. (open_audio_device): Added PCM write interface. * src/esd.c: Added playback capability. * src/oss.c, src/esd.c, src/audio.h, src/arts.c: Defined a PCM write interface. * src/zvbi.c (zvbi_find_subtitle_page), src/v4linterface.c (z_switch_channel), src/subtitle.c (py_closed_caption), plugins/mpeg/mpeg.c (init_subtitle_encoding): When switching to an NTSC channel, guess caption is on CC channel zero. In response to Gnome bug #332746 Subtitles should stay enabled between channel changes. * src/tvengxv.c (enable_overlay): Xorg 6.8.0 w/bttv 0.9.5 freezes when the requested size is briefly 1x1 during video widget creation. * src/capture.c (change_capture_format): Preserve the image aspect in fullscreen mode (preliminary). * src/fullscreen.c (start_fullscreen): Preserve the image aspect in capture mode (preliminary). Bug introduced when removing the 768 x 576 limit. * src/x11stuff.c (x11_vidmode_current, x11_vidmode_switch) (x11_vidmode_restore): Handle asynchronous errors of XF86VidModeSwitchToMode(), XF86VidModeSetViewPort() and XWarpPointer(). Supposed to fix Gnome bug #332846 Crash When Put Into Full Screen Mode. * src/fullscreen.c (start_fullscreen): tveng_set_capture_size() removed, use tv_cur/set_capture_format() instead. * src/tveng.c, src/tveng.h: (tveng_start_capturing, tveng_stop_capturing): Replaced by tv_enable_capturing(). (tv_set_capture_buffers, tv_get_capture_buffers): Renamed to tv_get/set_num_capture_buffers() for clarity. (tveng_set_capture_size, tveng_get_capture_size): Removed. Was only used in fullscreen.c, which uses tv_cur/set_capture_format() now. * src/tveng.c: Accidentally disabled all APIs except V4L1. (tveng_attach_device): Dump tveng_device_info.caps.flags with -d. * src/zapping.c (crash_action): Unused parameter warnings. * src/tveng1.c (update_capture_limits, p_tveng1_open_device_file): Capabilities maxwidth must be a multiple of 8 because the old SIMD routines we still use do not check this and fall back to scalar functions. * src/csconvert.c (startup_csconvert): Register new YUV-to-YUV routines in libtv/yuv2yuv.c. * test/convert_image.c: Added checks for yuv2yuv.c routines, handling of planar formats (YUV420). * libtv/simd.h: Added vector size unpack macros. (SIMD_FN_ALIGNED_SELECT, SIMD_FN_ARRAY_PROTOS): Added for yuv2yuv.c. * libtv/simd.h: Added 32 bit shifts and byte/word swap for yuv2yuv.c. * libtv/simd-conv.h (load_16): Added. (load_yuyv8): Added offset parameter. (load_yuyv16): Added for yuv2yuv.c. * libtv/rgb2rgb.c (_tv_rgb32_to_rgb32): Reuse yuv2yuv.c uint32_t shuffle routines. * libtv/pixel_format.h (TV_PIXFMT_SET_RGB): SBGGR is also RGB. * libtv/image_format.h (tv_image_format): Added field order field. * libtv/sse/sse.h, libtv/sse/copy_block.c, libtv/mmx/mmx.h, libtv/mmx/copy_block.c, libtv/misc.h, libtv/image_format.c: Modified the image copy routines for reuse by yuv2yuv.c. * libtv/Makefile.am (SIMD_SOURCES): Added yuv2yuv.(c|h). * zapping_setup_fb/Makefile.am, zapping_setup_fb/zapping_fix_overlay.in: zapping_fix_overlay removed. Simply making /sbin/zapping_setup_fb setuid root will work as well. 2006-02-26 * Prerelease 0.10cvs3. 2006-02-25 * src/overlay.c (visible_timeout): Overlay window renegotiation unnecessary if clips didn't change. * src/tveng1.c (tveng1_attach_device): Distinguish read and overlay attach_mode, so we can return different image size limits. * src/overlay.c (start_overlay): Ask the driver for a maximum size instead of assuming 768 x 576. * src/tveng1.c (get_video_standard, set_video_standard): Update the capture size limits after a video standard change. * src/xawtv.c (xawtv_ipc_set_station): g_locale_from_utf8 g_convert assertion str != NULL failed. * src/properties-handler.c (picture_sizes_setup), src/keyboard.c (setup): Must not enable selection changed signal before the dialog is completely initialized. * src/channel_editor.c (create_channel_editor): Must not enable selection changed signal before the dialog is completely built. Supposed to fix Gnome bug #332221, #328309 Crash in channel menu. * src/video_xv.c (image_new): Handle asynchronous XShmAttach errors, fixes Gnome bug #331580 Crash Using Remote Display To Thin Clients. * zapping_setup_fb/zapping_setup_fb.h, zapping_setup_fb/zapping_setup_fb.c: Signedness fixes. * zapping_setup_fb/v4l.c (setup_v4l): Dump requested frame buffer parameters at verbosity level 3. * zapping_setup_fb/zapping_setup_fb.c, zapping_setup_fb/v4l25.c, zapping_setup_fb/v4l2.c, zapping_setup_fb/v4l.c: Did not produce an error message on all errors. * src/zapping.c: Added assert() test. 2006-02-20 * src/tveng_private.h (NODE_HELPER_FUNCTIONS): Const fix. * src/tveng.c (tv_set_overlay_buffer): Added printv's to log execution of zapping_setup_fb. (STORE_CURRENT_FUNC, store_cur_video_standard) (store_cur_audio_input): Const fix. * test/simd.c, plugins/deinterlace/test/ditest.c, plugins/deinterlace/main.c, plugins/deinterlace/ditest.c: Replaced definition of SIMD constants by inclusion of libtv/simd-consts.h. * libtv/simd-consts.h: New definition of constants declared in libtv/simd.h. * libtv/sse/copy_block.c (copy_block1_sse_nt), libtv/mmx/copy_block.c (copy_block1_mmx): Return FALSE if bytes_per_line smaller than image width instead of running backwards. * libtv/image_format.c (copy_block1_generic): Didn't work right if bytes_per_line > width * bytes_per_pixel. Return FALSE if bytes_per_line smaller than width instead of running backwards. * test/Makefile.am: Added image conversion test. * src/csconvert.c: All RGB-to-RGB conversion functions moved into libtv/rgb2rgb.c. * src/Makefile.am (zapping_SOURCES): bayer.c, bayer.h removed. The code is now in libtv/rgb2rgb.c. * libtv/lut_rgb16.c: New tables for image conversion to RGB16 (generated file). * libtv/lut_rgb16.h: New tables for image conversion to RGB16. * libtv/lut_rgb16-gen.c: New generator of lut_rgb16.c table for image conversion to RGB16. * libtv/misc.h (MASKED_SHIFT): Added for RGB16 conversion. * libtv/rgb2rgb.c, libtv/rgb2rgb.h: New SIMD and scalar image conversion functions replacing code in src/bayer.c and src/cconvert.c. * libtv/simd-conv.h: New macros for SIMD image conversion. * libtv/simd.h: vsplat16_m1, vsplat32_m1, vsplatu16_m1, vsplatu32_m1 were misdefined. Added vpacksu16 and vavgu16 for SBGGR conversion. * libtv/Makefile.am: Build rgb2rgb.c, SIMD code there, and generated lut_rgb16.c. (MAINTAINERCLEANFILES): Added lut_rgb16-gen. (BUILT_SOURCES): Added lut_rgb16.c. (EXTRA_DIST): Added lut_rgb16(-gen).c. (libtv_la_SOURCES): Added lut_rgb16.(c|h). * src/yuv2rgb.c, plugins/deinterlace/test/Makefile.am, plugins/deinterlace/DI_Misc/Makefile.am, plugins/deinterlace/DI_GreedyH/Makefile.am, plugins/deinterlace/DI_GreedyH/DI_GreedyH.c (DeinterlaceGreedyH), libtv/simd.h, libtv/image_format.c (tv_clear_image), libtv/cpu.c (cpu_detection), configure.in (CHECK_SIMD): s/HAVE_MMX/CAN_COMPILE_MMX etc for clarity. * src/Makefile.am (AM_CFLAGS): Compile with -g to produce better backtraces. * src/main.c (main), configure.in (PACKAGE_VERSION_IDENT): Tack program version onto main() name to make sure it appears in BugBuddy reports with backtrace. 2006-02-15 * Makefile.am (EXTRA_DIST): Added ChangeLog.05. * ChangeLog, ChangeLog.05: Moved 2004-2005 history into ChangeLog.05. 2006-02-13 * src/fullscreen.c (on_cursor_blanked): Recenter the window as well. * src/overlay.c, src/zmisc.h, src/zmisc.c: Moved z_set_overlay_buffer() from src/zmisc.c into src/overlay.c. * src/overlay.c (visible_timeout): Cleaned new instead of old screen when the window moved to a different Xinerama screen. (reconfigure, visible_timeout): Placed the overlay rectangle root window relative instead of Xinerama screen relative. (reconfigure): Did not renegotiate chroma-key frame buffer address when the window moved to a different Xinerama screen. 2006-02-10 * zapping.schemas.in: Missing deinterlace/method. 2006-02-10 * Prerelease 0.10cvs2. 2006-02-10 * po/POTFILES.in: DI_Adaptive.c, DI_BlendedClip.c, DI_OldGame, src/zapzilla.c not used/distributed this time. * src/overlay.c (stop_overlay): Didn't disconnect from zapping delete event. * src/tvengxv.c (tvengxv_attach_device), src/tvengemu.c (tvengemu_attach_device), src/tvengbktr.c (tvengbktr_attach_device), src/tveng25.c (tveng25_attach_device), src/tveng1.c (tveng1_attach_device): Clear the private part of tveng_device_info. tveng25 interface crashed due to data left over from a previous failed tveng1_attach_device() call. * src/tveng.c (verify_clip_vector): Didn't check the last clip in a vector. (overlay_window_visible): Fixed a signedness bug. (p_tv_set_overlay_window): Didn't disable overlay when the window became invisible. (tv_set_overlay_window_chromakey): Didn't disable overlay when the window became invisible. * src/tveng1.c (channel_norm_test): Incorrectly assumed VIDIOCSCHAN returns parameters, not really testing anything. (p_tveng1_open_device_file): Used to set FD_CLOEXEC which is precisely what we not want when calling zapping_setup_fb. (get_video_standard_list): Select PAL if the current standard is AUTO. (get_overlay_buffer): Always return a buffer format, we need it to clip against screen boundaries. (set_overlay_buffer): Added. (identify_driver): Added check for rivatv driver for a work-around in set/get_overlay_buffer(). 2006-02-09 * zapping_setup_fb/zapping_setup_fb.c (long_options): Array lacked a terminating 0, resulting in a segfault when unknown options were given. * src/tveng25.c (get_overlay_buffer): Return a useful error string when the frame buffer format is invalid. * src/tveng1.c: Always clear structs before calling ioctl(), in case the driver is broken. (get_overlay_buffer): Ignore invalid frame buffer format returned rivatv driver. Return a useful error string when the format is invalid. * libtv/image_format.c (tv_image_format_init): Fail if the requested bytes_per_line is non-zero and too small. 2006-02-07 * src/tveng.c (tv_set_overlay_buffer): Negotiation of the frame buffer format is no longer required for chroma-key overlay. 2006-02-06 * Prerelease 0.10cvs1. 2006-02-06 * src/overlay.c: Monitor config for chroma_key_color change and apply it to the window. * src/zgconf.h, src/zgconf.c (z_gconf_notify_remove, z_gconf_set_color, z_gconf_get_color): Added. * src/properties-handler.c (video_setup, video_apply): New chroma key colorbutton. * glade/zapping.glade2: Added chroma-key colorbutton in preferences/video. * zapping.schemas.in: Added chroma_key_color. * plugins/subtitle/view.c (get_color), plugins/subtitle/preferences.c (get_color): Use new string_to_color() helper. * src/zgconf.h, src/zgconf.c (string_to_color): Added. * src/fullscreen.c: Replaced overlay code by overlay.c calls. Restores chroma-key overlay and clipping. * src/tveng.h, src/tveng.c (tv_cur_overlay_clipvec): Added. * src/overlay.c: Replaced set_vector copy by zapping->info.overlay.clip_vector. (visible_timeout): Used wrong clip vector during set_overlay_window retry, causing an assertion failure. 2006-02-06 * src/zmisc.h, src/zmisc.c (z_set_window_bg_black): Added. * src/tvengxv.c, src/tvengemu.c, src/tvengbktr.c, src/tveng_private.h, src/tveng1.c, src/tveng25.c: Merged chroma key accessor functions into overlay window functions. * src/tveng1.c (get_capture_and_overlay_parameters): Didn't read back the current chroma key. (set_overlay_window_chromakey): Removed color key to X display color translation. Higher level code must do that. * src/tveng.h: tv_set_overlay_xwindow now also takes a chroma key. * src/tveng.c (tv_set_overlay_window_chromakey): Restored and added screen boundary clips to prevent a system crash when the driver is broken. * src/overlay.c: Restored chroma-key overlay and cleaned up. Changed chroma key color from blue to pink. 2006-02-03 * src/tveng1.c (init_audio, get_audio_control_list): Zapping didn't work with rivatv driver because VIDIOCGAUDIO returned unexpected errno ENODEV. Patch by Tim. * src/xawtv.c (property_get_string), libtv/screen.c (tv_screen_list_new): Fixed XGetWindowAttributes return code check. * libvbi/bcd.c, libvbi/bdc.h: Renamed vbi3_dec2bcd to bin2bcd, vbi3_bcd2dec to bcd2bin. * src/v4linterface.c (on_control_window_key_press, channel_txl), src/main.c (on_zapping_key_press), src/fullscreen.c (on_key_press): Fixed entering of channel numbers on the numeric keypad. Pg-up/down now completes channel number entering like nk-enter. 2006-01-07 * src/x11stuff.c (x11_force_expose, x11_window_viewable, wm_hints_detect, x11_vidmode_list_new, find_xscreensaver_window, x11_xvideo_dump): Temporarily override the default xlib error handler so we don't abort on errors. * libtv/screen.c (dga_query, xinerama_query, tv_screen_list_new, pixfmt_from_dga_modes): Temporarily override the default xlib error handler so we don't abort on errors. The dga_query() change is supposed to fix feature request #1395190. Local Variables: mode: change-log coding: utf-8 left-margin: 8 fill-column: 76 End: zapping-0.10cvs6/ChangeLog.01 644 764 144 247726 10432663137 11065 2001-12-25 hide pointer timeout * main.c: Hide the pointer after 1.5s, timeout logic. 2001-12-23 fake std * tveng1.c: Automatic workaround for v4l api bug, now tunerless inputs can set the std when there's a tuner in the card. * screenshot: Made the ov511 button polling a timeout+thread. Rather inelegant, but we don't have much choice. * po: Dumped the ngettext emulation and require the real thing (>0.10.36). It won't be a problem except for people building from cvs. 2001-12-16 pl.po updated * pl.po: Update by Paweł. 2001-12-16 fixes * 176x144: bug in XvPutImage, driver side, deleted. * Crash on exit: not recently observed, probably fixed. * screenshot.c: Replaced "appx %.2f kB", appx w/2 decimals, yeah. * capture.c: zapping --no-xv never cleared window regions not covered by image in case of exposure or image resizing (eg. mpeg plugin). * zvbi.c: Fixed "last known station name" bug. * export.c: Changed subno separator from '.' to '-'. Problems with new on_electric... but it's probably better to avoid two dots in filenames. 2001-12-14 yet more channel stuff * channel_editor.c: Fixed random freq when modifying channel to baseband input (or adding baseband input channel) and then modifying back to tuner. Selecting a channel now sets fine tuning even if "dont change" or baseband channel, so one can switch back and forth without erasing the freq. In clist "dont change" channels are now marked to distinguish from tuner channels. * libvbi/lang.c: iconv broken??? Added workaround. * libvbi/exp_html.c: Fixed blink attribute. Replaced ISO-8859-5 charset by KOI8-R which seems to be more widely accepted. 2001-12-13 more channel stuff * tveng.h: Added tveng_control.def[ault]_value, from api (tveng2.c), or current value (tveng1.c, tvengxv.c). For controls dialog. * tveng2.c: Added fake tuner for tests (by default not compiled), fixed in set_input: info->cur_input = input->id; * tveng1.c: ditto input->id * channel_editor.c: Changing input now activates said input and makes fine tuning sensitive iff tuner. Modified the spinbutton adjustment to allow entering arbitrary frequencies (for add-new-channel). 2001-12-12 channel stuff * Moved channel_editor.c z_spinslider into misc.c, merged with mpeg/options.c and made a few improvements. Replaced spinslider in options.c, channel_editor.c and v4linterface.c (which added a reset button to the latter two and a kHz label in channel dialog. * v4linterface.c: Changed controls window policy allow_grow to TRUE, to allow wider sliders. 2001-12-10 Solaris portability * Many fixes, mainly Solaris portability (thanks to Roger Fujii for his help with this). * mpeg: run the properties dialog at least once before recording. 2001-12-09 JPEG plugin * Rewrote jpeg plugin. New attractions: screenshot dialog got a format selector, quality slider and preview (optional), output size estimation, simple deinterlace option, also previewed. Like [Ctrl-S] the image is now grabbed on [S] rather than OK (optional). Added PPM backend. Electrified file name entry, made dialog closing on filename-enter optional. 2001-12-07 * v4linterface.c: Added new title bar vars $(title), $(rating), contents from program_info[current] (for now CC/XDS only). * Added program_info dialog, clone of vbi_info (now Network Info), unified the dialog design. 2001-12-05 caption.c * Fixed repeated roll-ups may be merged into one. (Not related to the osd bug.) * vbi.c: Fixed full stop bug in filter. * Fixed vbi_classify_page could mistake current/next program caption language. * Added XDS program info event. * Added rating pixmaps for program info dialog. 2001-12-05 screenshot.c * Made Convert_RGB5*5_RGB24 more accurate ((r & 31) * 255 / 31 instead of (r & 31) << 3). * Cleaned up and slightly accelerated line converters. * Primitive beginnings of multiple backends. 2001-12-03 fr.po * fr.po: Update by Christian Marillat. * callbacks.c: Resize the tv_screen, not the whole window. * tveng1.c: Fixed typo when getting the minor device number. * zvbi.c: Disable VBI when opening the device fails. 2001-12-02 Fractional pixel problem * audio.c: Set configured mixer settings when opening the device. * osd.c: Teletubbyfied Mr. Copperfield. 2001-12-01 Mixer et co. * tveng: Added tveng_ov511_get_button_state (untested), autodetects /proc entry, etc. * screenshot: use tveng for querying ov511 status. * bookmark.ico: Added, it's a png indeed. Dunno why this, just following what the galeon.sf.net web page does. * htdocs: Added a "Shortcut Icon" link to the header so bookmarking in galeon puts the logo next to the icon (might work in other browsers, untested). * mixer: Added code to control the mixer, nothing uses it yet apart from properties.c * properties/audio: Add a simple gui to force a given audio recording line and volume, so we always record with the desired settings. 2001-11-27 Post-release fixes * zapping.spec.in: Included missing zapping_fix_overlay. * src/frequencies.c: Added missing UHF for Italy (reported by Lorenzo Delana) and Ireland (not sure, but it's probable). * screenshot: call plugin_start only once when the ov511 button is clicked. 2001-11-27 Screenshot extension * Added function to poll Creative WebCam (ov511) grab button to screenshot plugin, contributed by Sandino Flores Moreno. 2001-11-22 Fixes * v4lx.c: "bad signal -> eof_sent", probably due to exceeding the select timeout limit (can't test mmapped vbi), -> fatal error considered eof. Read interface not affected. Timeouts are ignored now, however a better response is warranted, this code to be revisited at a later date. * teletext.c, ttxview.c: TOP index fixes: insufficient pg init, wrong char set, next subp didn't work, char size heisenbug (gcc?). * teletext.c, vbi_page_title: Use correct national character set. * teletext.c: [default] object invocation did not recursively abort. * packet.c, eacem trigger: didn't consider 41st column. First encounter of 'ttx:' trigger, decoding worked out of the box incl nuid and stuff, link not quite. 2001-11-20 Fixes * libvbi/caption.c: Fixed CR display update. * osd.c: Segv in gdk_draw_rgb_image_dithalign at gdkrgb.c:3057 due to missing gdk_rgb_init; Didn't happen when opening prefs first, gdk_rgb_init was called as load image side effect. Copied gdk_rgb_init seq from shaped_caption.c to main.c, correct? 2001-11-18 Completed fast-clicked * screenshot: gladeified clicked() dialog. * mpeg: Select destination file on clicked signal, as in screenshot. 2001-11-16 Fast variants of screenshot and mpeg * screenshot, mpeg: Added fast (Ctrl, no configuration) distinction. * main.c: GtkButtons in Z now have a "fast-clicked" signal in their class. * nl.po: Update by Ime Smits. 2001-11-15 nl.po * nl.po: Added, contributed by Ime Smits and Reinout van Schouwen. * tveng1.c: Reenabled pal-n. * properties.c: Remember last open group, added a frame around the properties contents, fixed sidebar geometry calculation ("add" isn't called for boxes, apparently, even being containers...) 2001-11-14 Killed parrot * parrot: Removed from build tree. * configure.in: Added --with-gnome-prefix, overrides 'gnome-config --prefix' * prepare_dist: Added optional prefix parameter. * channel_editor.c: Sync with glade file. * TODO: I think ttx search gui is clear enough, removing from here. 2001-11-12 Plugins properties conversion * mpeg, lirc, screenshot: Converted properties to the new style. * plugins.c: Removed properties handling code, each plugin manages its properties now through the properties.h api. 2001-11-06 More properties work * audio: Ported to the new properties code. * zconf: Added hook_while_alive * properties-handler: Dynamic ITV sensitivity. 2001-11-05 Properties almost done * properties.c: Finished the shell code. * properties-handler.c: Added, it's the handler for Z's properties pages. Almost done except for audio backend properties code and dynamic ITV sensitivity. 2001-11-04 GUI sweetpill follow-up * mpeg.c: Added rte.h version check. * Replaced occurences of "Elija un color" outside es.po by "Choose a color". * zapping.glade: Moved a few channel dialog widgets. * channel_editor.c: Added index and video standard to channel list, moved country, NLSed accelerator modifiers, displays input name instead of country, channel and freq when source is not tuner. Replaced unsafe snprintf(d, n, t) by strncpy. Up and down button insensitive at end of list and after selecting all rows (not always??). The respective next row is moved back in sight on up or down. My spelling gland asked for a change of the freq table names. 2001-11-04 New properties dialog * properties.c: New Galeon style properties code. Still under construction (and nonfunctional), but I couldn't resist commiting :-) Plugins can be configured in the 'Plugins' dialog. 2001-11-02 GUI sweetpill * channel_editor: Rearranged as discussed in the mailing list. * gnome_help: Remember to update clips after tveng_restart_everything. * zapping_fix_overlay: Script to fix the so common consolehelper bug (is it really consolehelper?). 2001-10-30 * macros: Added as.m4 from automake 1.5, required there but not shipped with previous versions. aclocal 1.5 doesn't abort on double def anymore. * mpeg.c: Sets correct frame rate for NTSC. * tveng2.c, tvengxv.c: Fixed tveng_enumstd.frame_rate. 2001-10-26 Show/hide pointer * zmisc.c: Routines for showing/hiding the pointer, adapted from a patch by Jonas Aaberg. Add also a properties entry. * zconf: Modified hook semantics to save a lookup. * overlay.c: Hooked on the root window events to remove the (expensive??) check_timeout. Makes no difference here, but could fix some reported bugs about cpu usage in overlay. * tveng1.c: Fixed a typo that made working v4l1 devices unavailable. Fixed a bug when setting audio controls too (stupid confusing ugly v4l api...) 2001-10-23 Mpeg plugin * Added format menu, grte_load|save_context and moved all functions accessing the config file into options.c, with brief descriptions. * fifo.c: Added alloc_buffer(*) to struct fifo, renamed recv_full_buffer_timeout to wait_full_buffer_timeout since recv_* never waits. 2001-10-21 CS conversion, qce * csconvert.[ch]: Added some unaccelerated rgb colorspace conversions. * capture.c: Fallbacks to the csconvert routines if no better rgb mode is available. * Z: Works now with the Logitech Quickcam Express driver (possibly with many other quickcams too). * properties.c: Only one properties dialog can be opened simultaneously. 2001-10-21 Mpeg plugin * Slider values are rounded down to option step size. * Added effective bits/s display. * All the video options seem to work now. 2001-10-19 Mpeg plugin * tveng1.c: Added mp1e/video/v4l.c timestamping method to get sufficently accurate time. Prerequisities: * tveng.h: Added frame rate field to tveng_enumstd, will be set in tveng1.c, tveng2.c, tvengxv.c. * tveng1.c: Fixed PAL-M incorrectly assumed 625/50. * tveng2.c: Replaced strstr(enumstd.std.name, "ntsc"); Unless the driver is borken the w/h info is more reliable deduced from enumstd.std.framelines. May have incorrectly assumed PAL-M, PAL-60 are 625/50. * esd.c, oss.c: Added mp1e esd.c, oss.c timestamping, tested, works. * arts.c: Added mp1e esd.c timestamping, untested. (Not installed on my box.) * src/properties.c: Complained "no plugin accepts..." (arg1 == 0), moved handlers[i].apply() loop under default: as it was supposedly intended. * mpeg plugin: Ducks are back in a row, but it needs some more testing and polishing. 2001-10-18 Easy stuff * v4linterface.c: Fixed an stupid bug in control saving, appears to work nicely now. * exp-html.c: Replaced by text-decoration: blink; 2001-10-17 Video output abstraction * x11stuff.c, video_xv.c: Virtualized all xvz_ operations, allowing for other kinds of YUV acceleration apart from XVideo. 2001-10-14 Audio recording abstraction * audio.c: Audio recording abstraction so we can reuse the code between plugins and make it easier to configure. * esd.c, oss.c, arts.c: Some backends. Still ![finished|tested]. * properties.c: Added the property_handler logic, allows for properties managing decentralization. * glade/zapping.glade: Created new properties cathegory, audio. 2001-10-10 Swap chan up/down * v4linterface.c: Made the PgUp/Down behaviour configurable, it was counterintuitive for some people. This is provisional, just till we have the generical bindings stuff in place. 2001-10-09 Requested controls gui polishing * v4linterface.c: Added a spinbutton to the slider in the video controls for finer tuning. 2001-10-08 Context menu for plugins * plugins.c: Added plugin_process_popup_menu. * plugins/mpeg/mpeg.c: Add it to the context menu. * fifos: added recv_full_buffer_timeout to solve problems in vbi_close. 2001-10-08 * configure.in: Changed REQUIRED_RTE_VERSION to 0.4cvs. * plugins/mpeg/options.c: Resynced with rte.h. 2001-10-01 Channel editor improvements * channel_editor.c: Now the freq saved with the channel is the one set in the slider bar, not the current freq. Also, add the option to enter custom freqs. 2001-09-29 tvscreen gtkda again * glade/zapping.glade: Make tv_screen a GtkDrawingArea again to fix GtkFixed expose problems with TTX. * osd.c: Subtitles toggle only affects CC/TTX, not osd_render* text. Same goes for osd_clear. 2001-09-28 OSD complete * osd.c: Added osd_render, keep correct ratio for OSD text, timeout, added zmodel_changed as needed. Appears to work reliably. * v4linterface.c, callbacks.c: Added OSD notification for Audio Mute/Unmute and channel change (when Fullscreen). * TODO: Cleaned up a bit, moved some things to 0.6.3 to have another release soon. 2001-09-26 OSD fixes * osd.c: Fixed 'flicker in FS', 'off-by-one', 'extra size_allocates' and 'prolly more' :-) 'Missing words' is still a mistery. 2001-09-25 OSD rewrite * osd.c: Rewritten, now osd windows are subwindows of the TV screen, still some bugs (flicker in FS, missing words ???, off-by-one error in y coords when doing roll_up, extra size_allocates, prolly more). You can get a feeling of the sgml renderer pressing 'o'. 2001-09-21 mpeg properties fixes * mpeg.c: Fixed options frame deletion (objects are created with a floating ref, attaching them to a parent makes this ref be 1, when the parent is destroyed the widget is unref'ed, and thus destroyed, no need to call gtk_object_ref/unref ourselves). * plugins.c: First load plugins under $home, then global. 2001-09-19 more renderer work * osd.c: Make the renderer honour , , and the colour tags. Cleanup of the code, now the renderer is integrated with the SAX parser and no charset translation is needed. * release a new updated package with the .spec hopefully working for RH (the new OSD code is disabled in here). 2001-09-18 SGML renderer * osd.c: Wrote sgml gdk renderer, sgml tags still not recognised (but that's easy). * zmisc.c: Added hide button on status bar messages. * zapping.spec.in: Now it should work under RH too, thanks to Mark (mark at extension2.freeserve.co.uk) for his help with this. 2001-09-17 OSD properties * osd.c: Finally(?) decided to try the gdk way, added properties dialog handling. * fr.po: Update by Christian. * ttxview.c: Fixed a typo that broke the automatic overlaying of subtitles, treat pages with TRANSPARENT background as subtitles too. * Makefile.am: Added autogen.sh to the distro, so prepare_dist.sh works out of the box. * ru.po: Removed, unmaintained for a number of releases. 2001-09-16 SGML->attr_char * zvbi.c: Wrote a first version of the SGML->attr_char converter, will improve. 2001-09-13 bounds checking * libvbi/teletext.c: Added bounds checking for enhance, could segfault under certain circunstances. * ttxview.c: Search gui touches. 2001-09-11 mpeg plugin audio options * plugins/mpeg: Added dynamic audio options using the new rte_option API. Unfinished, won't work as expected yet. 2001-09-10 automatic overlaying of subtitles * ttxview: Subtitle pages opened in the main window can now be opened automatically (configurable). * tveng.c: Fixed xv control multigenesis bug. * tveng[12].c: Removed the ioctl tests, they did no good. * pl.po: Updated (Paweł) 2001-09-03 fifo hang fix * fifo.c: rem_consumer could under certain circumstances leave unconsumed buffers on the virtual full queue, fixed. 2001-09-02 sv translation * sv.po: Commited Swedish translation, contributed by Henrik Isacsson. Many thanks! 2001-09-01 libvbi * decoder.c: NTSC requires valid line numbers, added vbi_ prefixes. * exp-html.c: Added missing language id's, replaced open_memstr. * export.c: Added vbi_export_open parameter "reveal". * v4lx.c: Moved printv above ENABLE_V4L. * Made vbi_event a union. * tables.c updated, cleanup in cache.c|h, removed -D_GNU_SOURCE. * zapping.desktop: Added comment translations from *.po. * ttxview.c: Page up/down wasn't connected, changed page num format to %03x.02x to avoid widget resizing. 2001-08-31 Channel editor usability * src/channel_editor: Do not tune all channels when there are many of them selected, smarter modify/add when activating the channel name GtkEntry, keep selection et al when modifying. * zapping_setup_fb: Reverted to the old bpp detection. * configure.in: require ngettext in AM_GNU_GETTEXT (i18ed plural forms). * fr.po: Updated translation (Christian). 2001-08-30 Select audio device * plugins/mpeg/mpeg.c: Added audio input device selection. 2001-08-26 * src/gen_conv.*: Added rgb2yuv functions, for now MMX only. * src/gen_conv.s: Fixed stack allocation bug (harmless). * libvbi/lang.c: Fixed bugs in Arabic and Hebrew glyph mapping. 2001-08-25 Plural forms * gettext: Applied patch from Paweł for handling plural i18ed strings correctly. 2001-08-24 0.6.0 released * 0.6.0 released, include prepare_dist.sh in the distro. Do not compile gen_conv.s if there's no MMX/GAS 2001-08-23 capture with different bpl * capture.c, tveng: Capture now accepts frames with different bytes per line but the same format otherwise. * zapping_setup_fb: Made PAM support work for me again. * capture.c: Correct format.pixformat set for YVU420 XV bundles. * zapping.spec.in, configure.in: Made stupid rpm's out there work fine. Now making 0.6.0 should be just running prepare_dist.sh. 2001-08-22 Overlay this page * TTX mode: added the option to "overlay" the current page when the main window is in TTX mode. * ttxview: improved page selection as discussed, use the new pixmaps. * main.c, zvbi.c: Added support for aspect ratio autodetecting. 2001-08-21 es updated * es.po: Up to date, preparation for 0.6.0 release. * configure.in: Cleaned up the gcc options a bit, avoid passing many times the same flag. Use gnome-config --prefix instead of ac_default_prefix. * src/ttxview.c: Use Michael's left, rigth arrows instead of <>. The rest will come later. 2001-08-21 * Committed pixmaps: left, right, up, down, reveal, parrot. * Modified a few, um, not so clear labels (en) in the channel dialog. 2001-08-20 pl updated * pl.po: Updated to CVS. * htdocs: Added content and dropped PHP session support for the traditional grandma cookies. 2001-08-19 * common/errstr.*: Added. libvbi/export and v4lx first victims. * zvbi.c: page event change broke TTX and CC subtitles, fixed. * caption.c: Corrected a channel switch bug. 2001-08-18 * libvbi.h, packet.c: Modified & enhanced TTX page event. * vbi_format_page bugs: Not pg->row = display_rows; Wrote glyph 0 instead of 0x20 in 41st column; Didn't write spacing attr double height lower row, probable cause of the vbi_fetch_vt_page segv. * po: Added emacs coding hints. How's this coded btw? 2001-08-18 pl translation * pl.po: Commited pl translation, contributed by Paweł Sakowski. Thanks! * zmisc.c: Fixed button hor/vert aligning in toolbars when the orientation changes. Left the '<[Subpage]>' group always horizontal because it made more sense. * zvbi.c, v4linterface.c: Called vbi_channel_switched when changing inputs, standards or channels. 2001-08-17 many channels * v4linterface: create submenus as needed when there are many channels, add inputs and standards to the context menu. 2001-08-16 fixes * zvbi.c: Reduced the number of fetch_page calls. Better now? (mhs: Z still calls fetch for notify_clients/rolling_header even in pure capture mode. Purpose?) * vbi_fetch_vt_page: Added memset(pg, 0, sizeof(*pg)), otherwise segfault when drawing the page if pg is initially bogus data. * capture.c: Fixes, but mc still breaks the mpeg plugin. Spent the whole day tracking this down, nothing so far :-( 2001-08-16 Zapzilla gui * ttxview.c: Removed export dir field, Zapzilla now remembers the path last entered. z_build_path is applied to the entered path, not exportdir. Made the file entry "electric", ie. the proposed file name is automagically appended. * search.c, ttxview.c: Added regular expression option. 2001-08-16 libvbi et al * exp-html.c: Added color option, fixed anchor insertion. * ttxview.c: Didn't set vbi export from zconf, fixed. 2001-08-15 add all channels * channel_editor: Added 'Add all channel' button. 2001-08-15 libvbi et al * glade: Removed the gettextized "labelxx" and the like. * list.h: rem_node() returns NULL if node is not member of the list. Fast removing w/o check under unlink_node(). * fifo.c: rem_producer/consumer() safe to call after adding failed. (More changes ahead.) * vbi.c: Restored test filter. * teletext.c: Fixed SWR p570 DRCS bug. Added enhancement header-only shortcut as suggested by spec. * zvbi.c: Fixed off-by-one error (41st column) updating RTC in rolling_header(), and no RTC from a page not marked for rolling (was a problem on MTV ger; arguable, let's see). 2001-08-14 mpeg plugin * plugins/mpeg: Avoided memcpy using mc fifos. 2001-08-14 libvbi * Added explicit and autodetected channel switch. Note VBI_EVEN_NETWORK changed: vbi_network can be all zero now when switching away from a known channel. * Updated CNI table. 2001-08-13 capture code rewrite * src/capture.c: Rewrote/cleaned up the capture core to differenciate between read/write serial plugins and allow for other producer/consumers (this one not yet tested). * plugins/mpeg: Commented out lip-sync warning. 2001-08-09 z_build_path * zmisc.c: Added z_build_path. * screenshot, mpeg, ttxview: Use it. * mpeg: mv plugin.c mpeg.c 2001-08-09 * zvbi.c: Displays the received station name in the titlebar if not known from channel list. 2001-08-08 prepare_dist.sh * prepare_dist.sh: rpm generation now works for zapping, mp1e and rte. 2001-08-08 * Deleted old fifo code. 2001-08-06 channel editor * src/channel_editor.c: Keep selected channels selected when hitting up/down. * glade/zapping.glade: s/frequence/frequency/ for consistence. Ctrl+a mutes/unmutes the device. 2001-08-06 MPEG plugin * no progress report in audio only mode, fixed. 2001-08-05 v4lx.c * Rewrote guess_bttv. * Added lots of error messages. * Added lots of --debug output. * Enabled the v4l 2.4.x vbi interface. 2001-08-01 fixes * libvbi/exp-png.c: Fixed setjmp warning. * src/x11stuff.c: Removed XSynchronize call, was broken according to 'man XSynchronize'. 2001-08-01 libvbi fix * search.c: Corrected hardcoded column width 40. 2001-07-31 libvbi * v4lx.c: Fixed blank vbi bug. * libvbi: Rewrote open sequence. 2001-07-29 parrot fixes * x11stuff.c: Check success of shmget et al. * parrot: Forgot to install parrot.glide. 2001-07-28 gui fixes * ttxview: Added a sep between up/down and the rest. * main.c: Worked around a bug in glade (automagically changes GNOME_STOCK_PIXMAP_(UP|DOWN) into _(TOP|BOTTOM)). * v4linterface.c, properties.c: Added configurable title bar. * src/zapzilla: Because of popular demand, added standalone Zapzilla. * src/ttxview.c: Added view creation/destruction notification. 2001-07-28 * Fifo conversion complete. 2001-07-25 rearranged gui * src/v4linterface.c, glade/zapping.glade: Left just channel up/down in the toolbar, moved Channels, standards and inputs to the menu. Set channel name in the main window title bar. 2001-07-24 french translation * src/channel_editor.c: Doesn't add the channel if Cancel is clicked on the new channel prompt. * plugins/parrot: Made num_bundles configurable, size estimation in the properties. * Applied patches from Roger Fujii (Solaris port). s/TRANSPARENT/TRANSPARENT_FULL/g. * Updated french translation (Christian Marillat) 2001-07-22 parrot gui * parrot.glade, parrot_strings.h: Added, gui for the parrot plugin. * src/ttxview.c: Cosmetic bugfix. 2001-07-21 libvbi * Added aspect ratio event. * Artificial 41st column for TTX pages. 2001-07-20 zvbi station names * src/zvbi.c: Restored functionality to read channel names from TTX. * plugins/parrot: Play the "parrot" stream with the proper speed, and fake timestamps so they are equal to the original ones. * src/channel_editor.c: Added afc and zvbi_get_name support to the autosearcher. afc is untested (i cannot test it). 2001-07-19 Parrot buffer * src/ttxview.c: Restore old toolbar style when detaching the view. * plugins/parrot.c: Added parrot buffer plugin (unfinished, but works). * src/capture.c (set_bundle_filler): Plugins can now provide custom data and override the standard tveng_read_frame routine. 2001-07-17 libvbi/wss * Added vbi_push_video function, works ok. Some more details to be finished. 2001-07-16 * capture.c: ported capture_fifo to fifo2 * v4lx.c: ported vbi fifo to fifo2 * Removed unneeded functions from acc colour conv: uyvy, *v*u*; enabled SSE, 3DNow, Athlon. * Replaced CPU detection code. Hope this works for everyone. 2001-07-16 fix aspect ratio * main.c: apply the aspect ratio setting to the tv screen, not to the main window, including toolbar and menu in the geometry computation. * ttxview.c: Fixed a segv when vbi_search_next reported < 0, added 'Empty cache' message. * libvbi/search.c: Made vbi_search_next return -2 when the cache is empty and -3 when the error is unknown. * plugins/mpeg: Adapted to the new (multi-backend) rte. 2001-07-15 mpeg plugin * tveng.c: tveng_get_timestamp(), RETURN_UNTVLOCK() int cast of double time; symptom MPEG plugin a+v heisenbug in mp1e sync routines, delayed or inhibited recording. Added timestamp validation in mp1e. 2001-07-07 save controls with channel * frequencies.c, main.c, v4linterface.c: The state of the controls is saved when changing channels, and restored when switching back. * zapping.glade: Added a global toggle to control this. * pixmaps/gnome-television.h: Added, new icon. 2001-07-06 mpeg plugin * made tveng2 EINTR aware (debugging) * added motion option to mpeg plugin 2001-07-05 libvbi * rewrote common/list.h * replaced libvbi/dllist.h * fixed http link name bug 2001-07-02 assorted fixes * channel_editor: Pops up a dialog box asking for the new channel name if none was given when hitting Add. * everything: Portability to Solaris, adapted from a patch by Roger Fujii. * configure.in: Removed broken "-multrasparc -mvis" in configure.in. * error_console.c: "console_errors" clo. * fr.po: Updated (Christian Marillat). * help/man/: Man pages (Christian Marillat). 2001-06-30 yuv filters * yuv2rgb_mmx.c: Uses Michael's autogenerated filters now. * gen_conv.[sh]: added. * x11stuff.c, zapping_setup_fb: improve screen depth detection. 2001-06-28 --disable-v4l * configure.in, v4lx.c, tveng1.c, tveng2.c: Added --disable-v4l option, lets all the V4L specific stuff out of the compilation, for Solaris. 2001-06-23 * gcc 3.0 fixes (nothing serious) 2001-06-22 bug fixes * callbacks.c: fixed channel ordering, reported by n0mada@terra.es. * zconf.c: Fixed double free(), used xmlFree instead of g_free where appropiate. * fullscreen.c: Made channel accelerators work in fullscreen. 2001-06-15 alirc, plugin properties * src/plugin_common.h: Made plugin_add_properties a gboolean, returns TRUE if the plugins will add anything. gpb arg can be NULL. * plugins/alirc: integrated patch by Sjoerd Simons. * src/remote.c: Added load_page. 2001-06-08 color dialog * glade/zapping.glade: Beautified ttx color dialog a bit. * pixmaps/*.xpm: Added con and brig used above, the rest in prevision for future use. 2001-05-29 * list.h: double linked now * fifotest.c: added * yuv2rgb_mmx.c: added yuyv_rgba32, yuyv_rgb16 2001-05-28 alirc plugin * plugins/alirc: 'Another lirc plugin', by Sjoerd Simons . Thanks! :-) 2001-05-27 MPEG fixes * plugins/mpeg.c: Works now if Z's yuv pixformat is YUYV and capture isn't buffered push. Core when buffered push and lock with YVU420 (probably RGB too, untested). Probably bugs in plugin.c and capture.c. * glade/zapping.glade: Configurable Q/S tradeoff when doing the scaling of the TTX pages. 2001-05-25 * plugins/screenshot: YVU420, TTX capture. 2001-05-24 * plugins/lirc/lirc.c: lirc_page fixed in plugin_add_properties 2001-05-24 Rolling headers * src/zvbi.c: Rolling headers support (just the time field for the moment). 2001-05-19 Fullscreen * src/fullscreen.c: Made fullscreen usable under many heads. 2001-05-16 * Fixed port_grabbed shortcut in xvz_grab_port. 2001-05-14 --yuv-format flag * src/main.c, capture.c, x11stuff.c: Added CLO [command line option :-)] for deciding between YUYV and YVU420. * src/fullscreen.c: No longer grabs the keyboard. * src/videodev*: moved to /common, made libvbi use these versions too for consistency. 2001-05-13 CC classify gui * src/ttxview.c: Added gui for the CC classification, added 'Subtitle Page' VBI property and removed toolbar spinbutton. * BUGS: Investigated problems with bundle_data under V4L1, they were due to a bug in bttv support for interlaced YUV420P. Maintainer informed. 2001-05-12 YVU420 * src/capture.c: Defaulted to YVU420P for capture, plugins need to be adapted. Added display of _DATA bundles, using yuv2rgb. * tveng: Added assume_yvu to work around V4L1 API limitations. * yuv2rgb_mmx: Added lacking "emms" to reenable math coprocessor. 2001-05-11 did some things from TODO * src/channel_editor.c: Channels can have an arbitrary order now. * configure.in: Remove --disable-ordering flag. * src/zvbi.c: Added a verboser message when vbi fails to open. * src/ttxview.c: Go back from TTX. 2001-05-05 remote(get_channel_info) * src/remote.c: added get_channel_info call. * common/fifo: "slow consumer" killing code, unfinished, breaks some things. 2001-05-04 mpeg plugin improvements * plugins/mpeg: Adapted to new bundled capture. Now it's possible to record mpeg's without XVideo backend scaler. 2001-05-02 Config options * src/capture.c: Fixed, so plugins can work again. Made capture size under XVideo configurable. 2001-05-01 New capture code * src/capture.c: Rewrote capture code using fifos, etc. Appears to use less CPU with XV scaling (identically 0 :-)). Oppps, and plugins won't work either, will fix tomorrow. 2001-04-30 xvzImage * src/x11stuff.c: Moved XvImage support here, made easier to use. 2001-04-28 XV_SIGNAL_STRENGTH * src/tvengxv.c: Added support for this atom, allows for automatic channel searching. Now let's see if the v4l.c maintainer in XFree accepts my patch, and the rest of the world sees this too :-) * src/zmisc.c: Reduce unnecessary open/close couples. 2001-04-27 TVeng thread-safe * src/tveng.c: Added a per-device mutex, made tveng.c lock, unlock it as necessary. Rewrote some common code as #macros. 2001-04-25 --command switch * src/remote.c, src/main.c: Added --command line switch, currently just "set_channel". Use with 'zapping -c "set_channel BBC"' 2001-04-24 trigger gui * zvbi.c, properties, .glade: Started trigger gui. * eacem_icon, atvef_icon: Moved to pixmaps. 2001-04-07 mpeg plugin * rte: rte_stop closes properly, buffers used for push are send_empty'ed, lots of fixes and tuning. Removed rgb support, it was nonfunctional. * fifos: Proper refcounting. * plugins/mpeg/: Encodes, needs a lot of work though. 2001-04-05 libvbi, help * Finished trigger rewrite. * Some work in /help. 2001-04-03 overlay+osd fixes * overlay, tveng, osd: Made them play nice together under V4L[12]. * src/tveng: Print more verbose messages if no DGA present. * src/tvengxv.c: Made it work without DGA. * src/osd.c, fullscreen: Centered subtitles in fullscreen even if VidMode changed. 2001-04-02 accelerators * controls: Added accelerators for hiding/showing menu bars (Ctrl+H), control box (Ctrl+C). * es.po: Updated. * src/ttxview.c: Added TTX subtitles selection to the popup menu. 2001-04-01 screenshot gladefied * plugins/screenshot: uses libglade now, added accelator for saving (Ctrl+s). * src/capture.c: send_event = False. Appears to be faster in some setups. 2001-03-31 mcfifos fixed * fifo: Rewrote most multi-consumer part of fifos, rte works again :-) * mp1e: 'make dist' functional * libvbi/v4lx.c: Minimized delay on joining the thread. 2001-03-30 libvbi * Teletext page classification. 2001-03-28 libvbi * New weblink event for ITV and Z2W. * packet.c: Added preliminary decoding of "zap2web", TTX based equv. of CC-ITV, went on air at CeBit last week. UPDATE: Just got the EACEM prop "zap2web" is based on, this feature is on freeze for a rewrite. * packet.c: Added page classification (program related, subtitles, number of subpages etc). Not reliable yet. 2001-03-25 channel=f(bookmark) * src/ttxview.c: Selecting a bookmark can tune the current channel. * libvbi/v4lx.c: Added some cancellation points, so the thread is always joinable. 2001-03-25 ttxview/libvbi * ttxview.c & exp_txt.c: Improved wrapping selection of double-h/w/s characters. * v4lx.c has a buffered fifo, timestamps are valid, out-of-sync function restored. * Added text colour levels (brightness, contrast), no gui. Primarily an improvement when scaling < 1x. * Page event flags rolling header. * Added resize options 720x576 and 352x288 (ITU-R 601 devices). 2001-03-24 channel editor * src/channel_editor.c: Completed new channel code. 2001-03-23 channels * src/: Mostly finished new channels design. Lacks gui polishing, but works. * src/zmisc.c: Added convenience functions for GtkOptionMenu. * tveng: Added hash for input/standards. 2001-03-22 libxml2 * configure.in: Better libxml detection, libxml2 support. * ttxview.c: Fixed segv in expose. Added www.* addresses to #url# mask. * Started channel => channel+input+standard work. 2001-03-21 ttxview.c * frequencies.c: Added PAL-China, ripped from XawTV. Isn't GPL a wonderful thing? * libvbi: Rewrite of export api finished. * ttxview.c: The export menu builds dynamically now, the only visible change is the dialog title "Export ". * ttxview.c: Replaced the string export hack by mem fp. * ttxview.c: Simplified the selection routines, added wrap-around mode cf. xterm. * de.po update. 2001-03-20 0.5.92 released * src/overlay.c: Do not clean screen with cards that support chromakeying. Reported to work. * fifos: Fixed gross bug. Amazing it didn't have zillions of side effects... but i cannot join mux thread from rte yet, getting weirder and weirder... * tveng, src/main.c: --dword-align option. Has some uses for broken drivers, but disabled by default. * libvbi/Makefile.am, src/Makefile.am: Added $(UNICODE_CFLAGS), that should fix the build problems for people with unicode.h not in an standard location. 2001-03-18 Chroma * Added chroma support for overlay, dunno if it works. * plugins/lirc/lirc.c: Cleanup, fixed a bug. 2001-03-18 TTX * Fixed spurious blinking bug in level 2.5 decoder. * Export filename and HTML/PNG title includes station name if known. * HTML export adds anchors for http/ftp/email links. 2001-03-17 Export beautification * src/ttxview.c: Changed export file GtkEntry to GnomeFileEntry, and now uses zconf to keep preferences. Made it a bit wider. * configure.in: Released 0.5.91 (bugfixes) today, bumped version to 0.6.0cvs. * libvbi/lang.h, exp-*: Added gettext support to export. * src/ttxview.c: Fixed ENIAC bug in txt mode. 2001-03-16 TTX export * Export options interface now tveng controls style. * Rewrote export dialog. Not completely satisfied, but well. * Added email keywords (a), (at). * Added vbi_network XDS/CNI unique id. 2001-03-16 pam workarounds * configure.in: Added --disable-pam option, apparently some pam versions are broken, so they cannot exec zsfb properly. * src/mmx.c: Strangely enough, the TryAMD label fails to compile under gcc 2.95.3 (report by Olivier Perron), applied the patch he sent to work around this. 2001-03-15 more clean calls for Overlay * src/overlay.c: Added some extra clean() calls (unmapping, stopping), this should fix those ugly pixels left. * src/main.c: Added a set of fallbacks in case /dev/video0 doesn't open, should make devFS work too. * src/capture.c: Capture mode speedup with XVideo scaler (1% cpu usage, whew!). 2001-03-14 DPMS in Xext * configure.in: Applied patch by Dirk Meul to search for DPMS functions in DPMS in -lXext in case -Xdpms fails. 2001-03-10 osd rough edges * osd.c: No flicker even w/o XVideo, knows about showing/hiding the main window. * help/de: German translation of index.html, by Carsten Menke. * src/osd.c: Fixed "ttx subtitles no update" bug. 2001-03-09 Cleanup * Updated de.po 2001-03-08 Fullscreen * src/fullscreen: Added, holds the code for fullscreen mode. Added the hability to do OSD correctly in fullscreen without XVideo PutVideo. 2001-03-04 TTX subtitles gui * glade/zapping.glade: Added some provisional GUI for TTX subtitles, but thinking about better ways to do it. 2001-03-03 Network info * src/zvbi.c: Added network info dialog. * src/ttxview.c: Fixed a bug with with TTX restart. * glade/zapping.glade: Reorganized a bit the VBI properties to make the dialog take less space. 2001-03-02 VBI open/close * Made the vbi object notify clients (TTXView) about being closed, this allows for clean start/restart of TTX. * plugins/lirc: Bugfixes (one of them introduced by me ;-P) * libvbi/v4lx.c: Made it accept a given_fd parameter, rationale: guess_v4l tries to open a device to query state, let it know that we already own it (otherwise v4l1 drivers will refuse re-opening it). Now just fails for me reopening the vbi device under XVideo and v4l1, good enough i think. 2001-03-01 Lirc * plugins/lirc: Added infrared support, written by Marco Pfattner. Thanks a lot! 2001-02-28 zconfhook * zconf.c: Added gconfish notification mechanism, now the vbi device can be opened/closed using the properties dialog, V4L open fails. 2001-02-27 osd * osd.c: Pipe replaced fifo/timer event queue. Moved rendering to exp_gfx.c, modified ttx render funcs for Teletext overlay. Works nicely. 2001-02-26 TTX * Added VTX export module, rationale * Cleaned up events, made caption a genuine event. 2001-02-25 caption ipc * Renamed conceal button to reveal. Is reveal on all RC's and TTX refers to it as 'reveal function'. Also renamed all identifiers for consistency. * station: Added VPS support, fixed cni priority. * caption.c, osd.c: Changed render()/clear()/ roll_up() calls to caption event, fetch_cc, and tracking of changes. * caption.c: All double buffered now. 2001-02-23 XV fixes * src/tvengxv.c: Added support in the controller for fullscreen XVideo (easier than expected). * XV: Fixed flicker because of extra preview_on, _off calls. * src/ttxview.c, src/zvbi.c: Conceal option. * src/osd.c: OSD works in fullscreen mode too. * glade/zapping.glade: Option for turning CC display on/off. 2001-02-21 caption integrated * caption.c, osd.c: Integrated caption display into the program, it works great :-) Flickers more than necessary when adding text to the same row, could be solved by passing a starting_row to the render function, thus avoiding the need to remove the currently drawn portion of the line to draw again the same. 2001-02-20 TTX * export.c: Zero 'struct export *' on allocation, caused segv when pasting text. * zvbi.c: Better patch generation, corrects errors caused by interp. 2001-02-20 caption * Fixed 'double height acute vowels' bug. * Caption decoder is online, minor tweaks here and there. * lang.c: translates caption glyphs. 2001-02-19 blink * Modified phase from 50:50 to 75:25, is easier to read, and cycle time 1.5 s. * libvbi/exp-gfx.c: correction, flash to background. 2001-02-18 blink * TTX: Blinking chars now blink, but needs further work. How should the blink be done? * libvbi/exp-gfx.c: Added rowstride parameter, hope i didn't break too many things ;-P 2001-02-17 osd * osd.c: Created. Has the required functionality for integrating CC. No smooth scrolling but will work nicely without XV. * tveng: Made it a bit more fault tolerant, tries to restart capture after failed S_INPUT and S_STD. * main.c: Killed the demiurgical fscking inmortal i-resize-magically-when-*I*-desire-because-i'm-THE-MAIN-WINDOW bug... for some time at least, awaiting its certain resurrection. * error_console.c: Created, avoids creating too many dialogs in broken systems and allows copy&paste of the exact error messages (so hopefully i won't get more "it breaks saying something i didn't bother to look to" bug reports :-)) * osd.c: Added interface (cc_* routines) to be called from the CC decoder threads (untested). * zmisc.c: Z works now in environments with XVideo but no functional video device. 2001-02-16 TTX export * removed all vt_page references from ttxview, zvbi. This is a private libvbi structure now: vbi_event->pgno | user input -> vbi_fetch_page -> fmt_page -> buffer, export, render. Rationale: Raw data is useless for GUI, need not export the rat tail of vt_page substructures and definitions. No cache access outside libvbi, client can't maintain pointers into a dynamically allocated & updated cache or feed back outdated local copies of raw data. 2001-02-15 Copy (pixmaps) * src/ttxview.c: The selection is now exported as a pixmap too (can be pasted into xpaint, for example) * src/tveng2.c: Support for driver private controls (untested) * libvbi/exp-gfx.c: Partial (region) rendering. 2001-02-13 TTX export * added aspect option to ppm/png export * removed vt_page* from struct fmt_page 2001-02-11 Copy (text) * src/ttxview.c: Exports the selection as TEXT to the primary clipboard (Emacs, X apps) and to CLIPBOARD (GTK apps). X sucks. * libvbi/exp-txt.c: Added a string export filter. 2001-02-10 Visual selection finished * src/ttxview.c: Visually selecting the region works flicker free, lacks the export filter to clipboard. * src/tveng2.c: dummy s_win on startup, avoid g_win failing later on because no window set. * configure.in, src/x11stuff.c: Deactivate DPMS when going fullscreen. * libvbi/v4lx.c (guess_v4l): Try with /dev/video0 before traversing dev, 1s startup speedup in the common case. 2001-02-09 CP work * src/ttxview.c: Visual selection works, needs to get flicker free (easy, but time consuming). Fixed SEGV (button_release not disconnected). * src/tvengxv.c: Fixed cur_input setting, added index field to tveng_enum_input. * src/tveng.c: Applied patch to do normalized comparing of standards and inputs (Magnus). 2001-02-08 gnome-help-browser * src/ttxview.c: Action for links. Configure with gnomecc, "URL handler". Started copy&paste work, selecting doesn't work properly yet, but i need to sleep 8-P 2001-02-07 Zapzilla navigation * new add_bcd and carry fix in on_ttxview_key_press() * modified links, double width/size safe and http/ftp/email, action tbd. * unified CC/WST attr_char, added format.h. * moved conceal/reveal into render functions; Need a reveal button. 2001-02-05 Set input * src/zmisc.c: Applied patch by Magnus Sandin to keep input whilst switching modes. * zapping_setup_fb/Makefile.am, zapping.spec.in: Applied patch by Tim Powers to fix build process. 2001-02-03 ZSFB goes PAM * zapping_setup_fb: Uses PAM if available, as explained by Tim Powers. * plugins: they get installed now under $(prefix)/lib/zapping/plugins, that's more polite, according to informed sources :-) 2001-02-02 /dev/video0 * s/dev\/video/dev\/video0/g: rationale: In RH 7.1 beta (Fisher), /dev/video is a dir. Patch sent by Tim Powers, thanks :-) * Trying to get Z running under 2.4.1, BTTV. The driver appears to be broken (mmap fails), haven't tested with xawtv yet. 2001-01-31 Accel keys * src/main.c, channel_editor.c: Finished accel keys. The key list takes too much ram (custom widget?) * configure.in: Used unicode-config for checking unicode. * glade/: Added right-click access to some useful sizes. * callbacks.c: Put the tuned channels in a submenu if more than 7. 2001-01-31 Zapzilla * export.c: rewrote enhancement decoder, didn't scale. Should support all of 2.5, 3.5 now. Fragments of a TOP index. * vbi.c: fixes 2001-01-30 Key syms * src/keysysms.h: busy, just putting up list of known keys. 2001-01-27 Channel accels * glade/zapping.glade, src/channel_editor.c: Added support for attaching accelerators to channels, unfinished. 2001-01-25 Old cruft removed * libvbi/: Moved vbi_v4l[2].c to the attic, not longer needed, updated README. 2001-01-24 minor tweaks * src/zmisc.c: Hide the pointer in fullscreen mode. * src/overlay.c: Fixed tv_screen geometry changed handling. * src/callbacks.c: Recompute gometry after modifying (hide, show, resize) toolbar and menu. * src/callbacks.c: Support for mouse wheel buttons 4 (channel up) and 5 (channel down). 2001-01-24 Zapzilla * caption.c: added xds and itv decoder * caption.c: various caption fixes (still unfinished) * samples: s2-s7 * cache.c et al: optimized memory usage (-50%) 2001-01-24 mp1e * added vcd mux, syntax verified but not tested with hw players. 2001-01-23 libunicode * configure.in, zapping.spec.in: Added dependency on libunicode * src/callbacks.c: Added option to hide menubars and toolbar. * help/C/ure.html: [Extremely] Brief introduction to Unicode, and some comments on the regex implementation. * src/ttxview.c: New search button, pattern history. * src/zvbi.c: Search results are freezed. * po/*.po: Removed obsolete strings. 2001-01-14 ** bug * common/ure.c: Fixed the "**" pattern bug. * src/main.c: Definitively closed the auto-resizing bug (and the many bugs its fix had caused :-) * src/frequencies.c: South African frequency table, donated by Jeremy Maccelary. Thanks! * src/ttxview.c: Added popup menu support in attached views. * zapping_setup_fb: Added not-running-as suid message, paranoid security changes. 2001-01-14 Search GUI * Backward search added, remaining bugs fixed in the libvbi search routines, should be all gone now. 2001-01-13 TTXView in main window * Restored teletext support into the main window, lacks popup menu integration. * src/main.c: Fixed the auto-resizing bug. A bit hackish, but will remove the annoyance. * src/txtcontrols.c: Removed, not longer needed. * src/ttxview.c (update_pointer): Bounds checks, needed for calls when the window isn't completely open. * src/callbacks.c (popup): Transform "Hide extra options" into "Show extra options" when needed. * help/C/ure.html: Wrote help for the search engine. 2001-01-12 Rewrite of main loop * src/main.c: Got rid of that ugly main loop, use the usual gtk_main instead, modules should hook into it if necessary. * src/capture.c: Old (capture related) main loop has been moved here. * src/ttxview.c: Small usability improvements in search_progress, default button setting (easier keyb navigation). * src/zconf.h: Moved the zc[cgs]_ macros here. * src/zmisc.h: Added z_update_gui, calling while (gtk_events_pending()) is not any longer safe (idle calls). * common/ure: Added URE_NOTBOL, URE_NOTEOL. No gui for that yet. Made DOT_MATCHES_SEPARATORS behave properly with negated cclasses. 2001-01-12 Search GUI * src/ttxview.c: GUI for TTX searching added. * glade/zapping.glade: search_progress created. 2001-01-10 URE, unicode * common/README, common/ucs-2.h: Added. * URE: Fixed some bugs, better is...() masks, some optimizations, document the prototypes, use libunicode. * unicode.c: current locale charset autodetection (taken from libiconv), endianness workaround, URE usage example. 2001-01-07 options * src/ttxview.c: Added preliminary support for entering export options. * common/ure.c: Partial UTF16 regex implementation * common/unicode.c: Unicode routines (requires -lunicode) 2001-01-04 libvbi * HTML export restored, enhanced, export filter enabled * ASCII/ANSI export restored, enabled * vbi_page_title added, unfinished * fixed a problem with ttxview subpage display * modified toolbar, let's see what Iñaki sez ;-) 2001-01-03 gui for export filters * src/ttxview.c: Export filters GUI. 2001-01-02 libvbi * fmt_page: returns boolean success now * PPM export restored * PNG export added (requires libpng) 2000-12-31 libvbi * FLOF restored 2000-12-31 Small fixes * libvbi/export.h: Prototype for fmt_page * src/ttxview.c: Better handling of invalid pages..., better management of status bar. 2000-12-30 Bookmarks editor * glade/zapping.glade: Bookmarks editing dialog added. * src/ttxview.c: Added some bookmarks editing (currently just deleting, anything else is a wombat) * src/zmodel.c, src/zmodel.h: Added, generic model object, with just a "changed" signal. Quite useful for MV design. 2000-12-30 Faster rendering, bookmarks * glade/zapping.glade: [<<][<][>][>>] * src/ttxview.c: Added bookmarks. They cannot be removed yet (edit by hand zapping.conf) * src/zmisc.c: Got rid of redundant malloc, free's, it should be faster now. 2000-12-28 YAGR * glade/zapping.glade: Yet another GUi revamp. We are getting closer to perfection :-) * src/ttxview.c: Made the prev, next subpage buttons traverse the cache of pages. We probably need some way to request a given subpage. 2000-12-26 GUI changes * glade/zapping.glade: Added some GUI elements to access the new stuff, and the option to hide the Standards, Inputs optionmenus. * src/overlay.c: Made it a bit more modular. * src/callbacks.c: Code to handle the new GUi items, unfinished. 2000-12-23 History done * src/ttxview.c: History works now * glade/zapping.glade: Redesigned advanced controls. 2000-12-22 More TTXView work * src/ttxview.c: More GUI love, should be ready to start merging history and other fancy stuff. Tried to minimize used screen space, support for subpages, and a very improved Keyb handling. * src/tvengxv.c: I shouldn't read that fast... 2000-12-20 TTXView, T thread * src/ttxview.c: All the difficult things are done by now, lacks history. * src/zvbi.c: Created T thread as discussed, loads of old code need to be removed now. * src/tvengxv.c (tvengxv_get_tune): Fixed(?) a bug, the pointer was apparently wrongly passed. This could be a memleak, needs further investigation, i just fixed the sympthoms. 2000-12-17 TTXView started * src/ttxview.c: Started, will be the GUI for the TTX decoder. 2000-12-16 Configurable default charset * glade/zapping.glade, libvbi/vbi.c: Added the option to set the default charset. 2000-12-16 Teletext character sets * /libvbi: Zapping now supports all Teletext character sets. 2000-12-16 MC fifos * common/fifo.[ch]: Converted to multi-consumers. Lacks some things yet. 2000-12-06 XV bugfixes, remote.c * src/remote.[ch]: Created, allows running some internal Zapping functions from inside the plugins. * All: Fixed a number of bugs with the XVideo support, thanks to all the people that helped with them. 2000-12-02 Multi-controller controls * src/tveng.c: Filter and Colorkey controls are now managed by the "mother" controller. * src/tveng.h: Mother controller added, COLOR control type added, controllers now know who do they belong to. * src/v4linterface.c: Added GUI item for COLOR controls, cleanup. * src/tvengxv.c: removed filter control, now managed by the mother controller. 2000-11-30 Bug fixes * all: some code cleanups, wrong assumptions removed. 2000-11-29 Doc updates * TODO, README, NEWS, THANKS, BUGS, doc/: Updated, i'm going to make a new release soon. * src/channel_editor.c: Print a notice when the XVideo controller is used and channel autosearching is requested. * all: Fixed some fixme's. 2000-11-26 Controller auto-switching * src/tvengxv.c, src/zmisc.c: Use the XV controller just for Overlay mode, READ controller for the rest, fixed some bugs (XSync) * zmisc.c: The standards, input and controls are dynamically changed when the controller changes. * libvbi: Now allows dynamic glyphs switching (currently just Latin[12] and Russian) * src/mmx.c: Fixed incorrect instruction order (pop, then Return:) * src/main.c: Fixed incorrect function order (zmisc_switch_mode, then startup_teletext) 2000-11-25 XVideo working (mol) * src/tvengxv.c, src/callbacks.c, src/main.c, src/overlay.c: First working XVideo code. It almost works, except for some glitches, and that some parts (mainly overlay) are a compendium of gross hacks that should be rewritten cleanly. 2000-11-24 Russian glyphs, XVideo * libvbi/: Added font3 and font4, they are the Russian glyphs. Contributed by Sergey Nikulin. * libvbi/font.h: Added some prepocessor magic for using this fonts (FONTS_RUSSIAN) * src/tveng1.c: Fixed a couple of minor bugs and some stylistic changes. * src/tvengxv.c: standards, inputs, freq, controls done. * src/tvengxv.h: Created. 2000-11-23 More XVideo, tveng1 fixes * tvengxv.c: Some more work into this, emulating TVeng api using XVideo is a bit tricky. get_inputs, find_input. * tveng1.c: Fixed a bug that could cause memleaks and broken inputs. 2000-11-22 XVideo work * tvengxv.c: Created, handles the XV module. Just does some minimal work by now: attach, describe, close, init. * /me: I wish i had time to sleep... a day with 48 hours would be fine too... All day in the Uni, then code :-( 2000-11-21 tveng modularized * tveng: Changed the structure into a more modular design, this will let me add the XVideo handling module easier. 2000-11-19 ru.po * po/ru.po: Added Russian translation 2000-11-17 V4L VBI support * libvbi/: tries to open the vbi device as V4L2. If it fails, uses V4L instead. * po/es.po: Updated. * src/main.c (main): startup_vbi called after setting the input and the standard to work around bttv2 locking. 2000-11-15 V4L2 VBI support * libvbi/: Brought up-to-date with alevt 1.6.0, added V4L2-aware code. This will be replaced in the future by Michael's decoder. * configure.in: Fixed, --disable options didn't work (i wasn't using $enableval), removed --enable-tveng-debug, no longer needed. 2000-11-14 Bug fixes * main.c: Fixed the auto-resize-to-unusable-size bug, it lacked a gtk_main_iteration. * tveng.h: Privatized some stuff * tveng_private.h: Added, definitions for the private stuff. * tveng_lib: Brought the standalone lib in sync with the latest stuff. 2000-11-12 de.po and some quick hacks * po/de.po: Commited by Michael some days ago. * src/tveng.c: Changing the vidmode is now configurable, some people had complained about this. * glade/zapping.glade: Added the property to modify this. * configure.in: The channel ordering is configurable now. 2000-11-05 YUYV->RGB converter * plugins/screenshot: Added this needed converter. 2000-11-04 MPEG starts to work * plugins/mpeg: It starts to work fine after many bugfixes in rte. * src/tveng2.c: Fixed a bug that made it segfault when changing standards. Well, not really a bug, but a "feature" of the bttv2 driver. * src/tveng: Use seconds as the timestamp unit, it's a double now. 2000-10-31 More work on Xv * src/capture.c: Default Xv pixformat is YUYV now, was UYVY. * src/tveng1.c: Fixed the YUV modes defs (TVENG_PIX_YUV420 = PALETTE_YUV420P, not PALETTE_YUV420) 2000-10-30 Capture code working * src/capture.c: It can work without Xv support now. * src/zmisc.c: Removed some code (obsoleted by capture.c). 2000-10-29 YUV and XV support * src/tveng: Added support for YUV modes (YUV420, YVU420, UYVY, YUYV). * src/main.c: * src/zmisc.c: The capture code now goes into capture.c * src/capture.c: Now it can read and draw data (only if the Xv extension is present and it works). 2000-10-28 ZVBI more modular * src/zvbi.c, zvbi.h: Now the callbacks that handle the VBI are self-contained, they don't need to be called from other modules. * src/tveng2.c, src/videodev2.h: Brought up-to-date with the latest videodevX. * src/capture.c: Some preliminar Xv code has been written. 2000-10-27 Tveng debug configurable * src/tveng.c: Now the debug level can be changed using tveng_set_debug_level. * src/sound: Removed sound support. It wasn't used, and it was causing some problems. 2000-10-24 MPEG plugin started * plugins/mpeg: rte is now ready, i'm starting the wrapper plugin. * configure.in, Makefile.am: Modified as necessary 2000-10-14 XGetScreenSaver * src/x11stuff.c: Use XGetScreenSaver and friends to modify the screensaver, but it doesn't appear to work yet :-( 2000-10-05 Russian frequency table * src/frequencies.c: Added russian frequency table, donated by Eugene Crosser. 2000-10-05 overlay rewritten * configure.in: Added check for CPU type and presence of MMX. * src/yuv2rgb.c: * src/yuv2rgb.h: * src/yuv2rgb_mmx: YUV->RGB transform routines, with MMX aceleration supported. * src/mmx.h: * src/mmx.c: MMX detecting and handling helper functions. * src/overlay.{ch}: Overlay handling code, completely rewritten. Now it works perfectly, just a bit of necessary flicker. * src/x11stuff.{ch}: Low-level X11 stuff. I'll try to stick with GDK in the rest of Zapping for the sake of clarity. * src/tveng2.c: Some fixes to make it work with the newest bttv2 and videodevX. 2000-09-23 back again * src/main.c: Added option for supporting old bttv devices. 2000-09-17 fr.po updated * po/fr.po: Updated (Christian Marillat) 2000-09-16 /dev/dsp bug closed * src/main.c: When VBI was disabled, the previous capture mode was set automatically to CAPTURE, fixed. * src/tveng.c: tveng_attach_device prints info about the video device on success (if not configured with --disable-tveng-debug) * src/tveng.c: Kernel 2.4.0test8's bttv makes the program hang if the given width and height aren't valid, fixed (was '/dev/dsp bug') * src/tveng.c: Added the option to tveng_device_info_new to use a standard norm is the input we are going to switch to is tunerless (so it defaults to PAL). * src/main.c: Added the command line option to control the default norm (--tunerless-norm, -n) 2000-09-14 Kernel 2.4.0test8 * /box: Installed the new kernel, a number of problems have arisen with Zapping. I can reproduce now the /dev/dsp bug! I don't have a clue of the cause, though :-) * /box: NOTE: Some user related that the problem disappeared after installing Gerd's bttv over the 2.4.0test8's one. Check. * src/sound.c: bugfix, even when esd failed to open the device, startup_sound returned succeeded. * src/main.c: Sound can be disabled by a command line option and if startup_sound fails. * README: Updated, added a quick troubleshooting. 2000-09-13 Teletext processed * src/zvbi.c, src/main.c: The teletext image is now received by the plugins, so it can be processed. * src/plugins.c: The plugin_sample struct no longer contains a GdkImage. * plugins/screenshot: Now it saves the current teletext page too. * src/strnatcmp: Like strcmp and strcasecmp, but perform natural ordering of strings with numbers (1, 2, 3, .., 8, 9, 10, 11) * src/strnatcmp.c: fall back to str[case]cmp if they compare the same in natural order. * src/frequencies.c: Now it uses strnatcmp for station aliases. 2000-09-12 JPEG screenshots * plugins/screenshot.c: Now it uses JPEG format instead of PNG. * main.c: Added option to disable VBI on startup (avoid V4L2 crashes) * src/zvbi.c: Added debug messages 2000-09-11 New release * html docs: Updated. * src/tveng.c: Support for command-line bpp added. * src/callbacks.c: The screensaver now goes to throttle mode when Fullscreen is used. * src/zmisc.h: Added some debug routines * src/main.c: populated with debugging messages 2000-09-08 History improved * glade/zapping.glade: txtcontrols redesigned, now it only shows the visited pages, not page + subpage. For using both, a tree would be better. * src/zvbi.c: Added a web-browser-like history, and a visited pages list. It's easier to navigate now. Added fast navigation ("color" navigation, FLOF), and subpage/page recognision. * src/main.c: Added command line option --bpp. 2000-09-07 History implemented * src/txtcontrols.c: Previous, next work for pages and subpages, history is saved when setting pages. 2000-09-06 VBI integrated * glade/zapping.glade: VBI has been integrated into the GUI. * src/callbacks.c: Added code for switching to VBI * src/zvbi.c: Much less CPU usage (pre-rendered frames, draw only when neccessary) * pixmaps/vt_loading*: Two images (~11K) created for when the requested page isn't available. * src/channel_editor.c: Uses VBI for getting the station names. * src/main.c: Added config setting for saving the VBI state. * src/txtcontrols.c: Created, manages the VBI GUI. 2000-09-05 Bpp fixes * zapping_setup_fb: Now accepts command line --bpp option * src/zvbi.c: Does most of the work. Fetches, renders and scales automagically teletext pages. Depends on GdkPixbuf to work. * src/properties.c: Now the VBI properties are modificable. 2000-09-04 Bug fixes * src/tveng[12].c: Fixes in the fullscreen mode, it had errors related to non-functional DGA drivers. Now most of the functionality goes into the VidMode extension, that usually works. 2000-09-03 Project structure changes * libvbi/: It's a bit cleaner now, and commited to CVS * src/zvbi.c: Gets the date and the name on each header/xpacket * configure.in: Not having -lpng is not longer fatal, conditional plugin build, [optional] GdkPixbuf support added (i will need it for the VBI plugin) 2000-09-01 VBI support added * libvbi/: Added support for VBI (stolen from alevt) * src/zvbi.c: Swallow support and encapsulation added 2000-08-25 mode switch when needed * plugins/screenshot: Now switchs to capture mode automagically when overlay. Doesn't switch back, though. * src/zmisc.c: ShowBox now accepts parameters (like sprintf, printf and friends) 2000-08-24 back to work * po/fr.po: Updated the french translation (Christian Marillat) * src/callbacks.c: The focus change no longer makes the overlay refresh (was a bit visually unpleasant) * src/tveng[12].c: Added a configure option to avoid initial channel and standard selection. 2000-07-27 mode switching * src/zmisc.c: Added a routine for switching modes correctly. 2000-07-23 Misc bug fixing * src/zmisc.c: Fixed the segfault when quitting (i believe so, at least). * src/tveng.c: Fixed some memleaks with the X code, and made it restore the VidMode correctly when returning from fullscreen. * src/zconf.c: Fixed the problems with the help being opened by Mozilla - it was a mem-leak, g_get_home_dir returns a static string, and I was g_free'ing it. * plugins/screenshot: It now checks for capture mode before starting. * help/C: I updated the docs and the screenshots. 2000-07-22 Windowed preview working * src/zmisc.c: Fixed the last bugs with it except one, that i would need to get events from the root window to fix (and I don't want to). You could call it a "feature" ;-) Did I tell that windowed preview sucks? There is a bug with it that i'm trying to reproduce (a SIGSEGV when exitting) * src/tveng2.c: Fixed a bug with clipping rectangles. The struct wasn't built correctly for more than one rectangle. * everything: The windowed mode has been integrated in the program (TVENG_CAPTURE_WINDOW mode). * src/zmisc.c: I think the SIGSEGV previously mencioned is fixed now. 2000-07-21 Windowed preview * src/zmisc.c: It's still unfinished (and sucks), but it mostly works now. I've added (copied from xawtv) clipping support. There are some bugs with it still. 2000-07-20 Modify channels * src/channel_editor.c: Added the option to modify channels and a fine tuner * glade/zapping.glade: Modified accordingly. * src/main.c: Fixed ratio is working (although it doesn't work under Sawfish) * macros/autogen.sh: Little fix, it tried to autoconf mp1e's configure.in (it's in the same CVS tree as zapping) * src/callbacks.c: Added some (very rudimentary) support for windowed overlay mode. It just sucks, and will suck forever, but people ask for it :-/ 2000-07-19 Option for keeping the ratio * src/properties.c: Added the option (doesn't do anything for now) to keep a given aspect ratio when resizing. * glade/zapping.glade: Updated the properties dialog accordingly. 2000-07-04 configure.in fix * configure.in: configure.in now tries "-lpng -lz" if "-lpng" fails. * /me: I'm working with M.Schimek in a lib front-end for mp1e, don't expect changes in Zapping in the near future. 2000-06-21 Timestamps * src/tveng: Timestamps support has been added * src/plugins: Now the plugins receive a sample object (a+v), not just video. 2000-06-20 Channel finder * src/channel_editor.c: Added the option to find automagically all the tunable channels (works fine in V4L, a bit worse in V4L2) * src/tveng2.c: Fixed, so it can do channel searching. 2000-06-19 datadir fixed * configure.in: Now the need to specify the datadir option has disappeared, --prefix is enough. * tveng1.c: Worked around a bug in the bttv driver, the returned maximum capture width isn't correct (thanks to Marcel Janssen) 2000-06-14 Right-click menu * src/callbacks.c: Fullscreen mode grabs the keyboard again, but it is apparently safe now. * glade/zapping.glade: Added a right click menu. Not very useful, but it is fancy and somewhat faster to use. * src/tveng.c: Now it fills the fb_info struct correctly on startup. 2000-06-13 Sound fixes * src/sound.c: Some fixes have been made, now it should be somewhat faster. It is yet untested. * src/tveng.c: Added support for 15 bpp screen depth. * zapping.spec.in: Fixed, now it adds the translations to the RPM correctly. * src/callbacks.c: Fullscreen mode no longer grabs the keybord. This should avoid blocking X (completely :-) if something doesn't work while we are fullscreen. 2000-06-12 Docs added * help/C/channel_editor.html: Added. * src/sound.c: Sound capturing support is now complete. It is slow, though. * src/tveng.c: Fixed a couple of memleaks in tveng_get_display_depth (memprof is great!) 2000-06-09 VidMode extension * tveng.c: If a better resolution for going fullscreen is available, switch to it using the Vidmode extension. 2000-06-07 fr.po added * fr.po: thanks to Christian Marillat a french translation is available. * main.c: Zapping now saves the current input and the current standard. * zapping.spec.in: I got to build a RPM, seems to work. 2000-06-06 Lazy day * help/C/properties.c: Added the help for the properties * zapping.spec.in: Written, but it doesn't build yet, and lacks dependencies. 2000-06-04 Plugin code remade * src/plugin_properties.c: * glade/zapping.glade: Dialog layout redesigned, now the plugins are configurable from the plugin_properties dialog too. * src/sound.[ch]: Preliminary esd sound support added. 2000-06-02 First problems fixed * configure.in: Added the option to disable X extensions (DGA) from the configure script (thanks to Jan Castermans). * configure.in: Added a test to determine whether to use node->children or node->childs. * tveng: Added frame timestamps. * callbacks.c: * main.c: Added option for resizing with fixed increments. 2000-06-01 Bug fixes * everything: Lots of bugs and fixme's have been corrected. Some code cleanups have been made too. * configure.in: Changed release number from 0.5.0pre1 to 0.5.0. I plan to release tomorrow. 2000-05-29 Tveng2 done * tveng2.c: * tveng.c: The V4L2 driver has been [re]written and apparently it works fine. The bugs when opening external programs and changing inputs are still there, though :( * plugins.c: Converted plugin_get_priority into a more general pourpouse function, plugin_get_misc_info. Added cathegories too. 2000-05-20 Back into coding * /me: I'm very busy with my finals, i won't have much time for coding this month (and half of the next one) :( * plugins.c: * plugin_common.h: New plugin structure, more flexible. * plugins/template/template.c: * plugins/screenshot/screenshot.c: Adapted to the new API. * tveng: Started rewritting the V4L2 controller. * zapping_setup_fb/zapping_setub_fb.c: Corrected verbosity and some typos. 2000-04-30 Screenshot saver * plugins/screenshot/screenshot.c: Finished. * configure.in: Added checking for -lpng 2000-04-29 Screenshot saver * plugins/template/template.c: Finished. * src/Makefile.am: Added pthread support. * src/zmisc.c: * src/zmisc.h: Added some blocking, modal variations of ShowBox. 2000-04-28 Plugins working * src/plugins.c: some bugs (misfeatures ;) corrected, it now works as expected. * help/C/plugin_devel.html: Changed plugin_ prefix to zp_ in the plugin API (there was a symbol collision). * plugins/template/template.c: Template plugin created. * src/zmisc.c: Fixed a bug in zimage_reallocate 2000-04-27 Plugins finished * help/C/plugins_devel.html: Holds the new plugin API. * src/plugins.c: Implements the functionality described in the doc. 2000-04-24 Again into CVS * CVS/: Zapping has gone again into CVS (it was time since the last cvs ci, but a lot of work has been done :))) * src/tveng1.c: All the V4L1 specific stuff has been placed here * src/tveng.c: Now it detects the video device driver (V4L1 or V4L2) and acts accordingly. Total rewrite. * help/C/plugin_devel.html: Created, it is the plugin API. 2000-04-22 Channel editor done * channel_editor.c: Finished, except for the help (not written) and autotuning (not written in tveng.c) * SF: Added the project to the Trove system in SourceForge. 2000-04-21 Channel editor improved * channel_editor.c: Created. Holds the code for handling the channel editor dialog. * frequencies.c: Added tveng_get_id_of_channel and tveng_get_id_of_country_tune, needed by channel_editor.c * callbacks.h: Cleanup and some comments have been added * src/Makefile.am: Added channel_editor.c to the list of sources. 2000-04-20 misc improvements * properties.c: Created, holds all the code for handling the properties dialog. * zapping.glade: Channel choosing dialog redesigned. * tveng.c: Added a parameter to tveng_attach_device (attach_mode) * callbacks.c: Cleaned a hack used in go_windowed 2000-04-16 properties done * callbacks.c: Properties dialog has been implemented, shows now some info about the video device (a la gnometv) * main.c: the video device name and zapping setup fb verbosity now can be configured, just as before * tveng.c: Added a range check in tveng_set_format, it prevents errors that let the device in a unusable state. 2000-04-15 help support added * help/: The introduction to Zapping has been written here * Makefile.am: * configure.in: Modified to reflect the above * callbacks.c: Some bugfixes * main.c: Everything works now, except for plugin support (the API has to be slightly modified) 2000-04-15 bugtrack day * v4linterface.c: * tveng.c: * callbacks.c: Lots of bugs were introduced, some have been fixed, now zapping works (almost) as 0.3.3 :-) * tveng.c: * v4linterface.c: Added language select control (mono, stereo, european1 and european2), but apparently it doesn't work. * tveng.c: Some conflictive and bttv-only code fragments have been #ifdef'ed. 2000-04-14 zapping reassembled * v4linterface.c: Adapted to the new tveng interface * everything: Zapping now is completely reassembled and compiles clean, lots of bugs have arosen, but i'm so happy ;-)))) 2000-04-13 callbacks updated * zapping.glade: Removed the 'Save screenshot button', it will be a plug-in. * callbacks.c: It now uses the new tveng api, it is much nicer to deal with, btw :-) * libglade: Posted a bug to the mantainer, the about box wouldn't show the logo properly, and that was a pity with such a nice Zapping logo. 2000-04-13 libglade in * interface.c: The project now uses libglade. * support.c: Removed from the project, it is now useless. 2000-04-08 zconf working * zconf.c: Now it is written and appears to work fine. 2000-04-01 New module * zmisc.c: Created, is a place for putting some misc functions that didn't fit elsewhere. 2000-04-01 ZConf API created * zconf.h: It holds the new zconf API, but nothing of it is implemented yet. 2000-03-31 Using shared mem * main.c: The program uses shared mem for displaying the data, it is faster now. * tveng.c: Removed info->format.data, now a parameter must be supplied to tveng_read_frame, the user of tveng must take care now about allocating memory. 2000-03-30 V4L fixes * tveng.c: Some bugs in tveng for V4L have been fixed, now should work quite reliably (tveng_[sg]et_format, tveng_start/stop_capturing, tveng_read_frame, p_tveng_[de]queue, ... had to be tested and fixed). * tveng.c: tveng_attach_device sets a correct starting capture size and tveng_set_capture_size stops capturing as neccesary. * everything: The new 0.5 series are into CVS again ;-) 2000-03-27 V4L support ended * tveng.c: V4L support has been completed after 9 days, i've been very busy this two weeks with the Uni :-( * main.c: Rewritten, it was becoming very messy. * zconf.c: Created. It's a config saving module, created with gconf porting in mind. * plugins.c: The new plugin protocol has been designed, it lacks the implementation yet, and some docs. 2000-03-18 V4L support started * tveng.c: It has been converted to V4L and the API has changed significantly. Now the rest of the program must be changed... * zapping_setup_fb: Converted to V4L * Release: 0.3.2 contained a bug in the distro, a bug fix release has been made, named 0.3.3. 2000-02-24 New release: 0.3.2 * plugins.c: * main.c: * callbacks.c: Added a tveng_read_frame() function and fixed some bugs. This is the first version considered "working". The plugin protocol shouldn't change too much in the near future. * tveng.c: i cannot get read() calls to work under v4l2 yet :-( 2000-02-22 Plugin support finished * plugins.c: * main.c: The plugin support is now completely integrated into zapping, i made a test plugin and works fine. 2000-02-20 Plugin config saved * plugins.c: * main.c: Now the plugins can save/restore their configuration 2000-02-19 Plugin structure ready * plugin.c: The plugin loading / unloading funtions work 2000-02-19 Added the project to CVS * Generic: The project has been added to cvs.zapping.sourceforge.net, it can now be accessed anonymously * zapping_setup_fb: Has moved from src/zapping_setup_fb to zapping_setup_fb in order to follow the 'no / in Makefile.am' rule, and not to break automake. * io.c: Minor changes 2000-02-11 Suid and preview operative * src/zapping_setup_fb/zapping_setup_fb.c: I finished the preview code and the suid program, i hope it hasn't many security flaws. * src/interface.c: some more configurable properties * pixmaps/0.3-logo.png: Created a nice logo with the Gimp 2000-02-02 Fullscreen mode working * src/tveng.c: Fullscreen mode now works (although the code now is just a hack, needs to be cleaned up) * Makefile.am: Added the suid to the project, now it compiles 2000-01-29 First _really_ working version * src/tveng.c: Fairly complete V4L2 wrapping library * src/io.c: Ability to capture PNG images * src/tveng.c: Direct Video Blitting (BGR -> RGB conversion avoided) * src/interface.c: Channel editor added Local Variables: mode: change-log coding: utf-8 left-margin: 8 fill-column: 76 End: zapping-0.10cvs6/ChangeLog.03 644 764 144 246117 10432663162 11056 2003-12-31 * src/tveng25.c (set_standard), src/tveng2.c (set_standard): Shortcut if requested standard same as current, saves a stop_everything cycle. * src/tvengxv.c, src/tvengemu.c, src/tveng1.c, src/tveng2.c, src/tveng25.c, src/tveng.c, p_tveng_stop_everything must be reentrant, not use static overlay_was_active. * src/properties.h, src/properties.c (append_properties_group), plugins/lirc/lirc.c (custom_properties_add): append_properties_group stored translated string in config. * glade/zapping.glade2: Restored show-toolbar-as option. * po: Updated from 0.6 & gnome for show-toolbar-as option. * src/properties-handler.c: Restored show-toolbar-as option. * configure.in: PKG_CHECK_MODULES for gconf-2.0. * plugins/screenshot/screenshot.c: Auto filename didn't work right. 2003-12-25 * src/plugin_common.h (PLUGIN_PROTOCOL): Changed to 0x700, just in case. * src/v4linterface.c: Enable numeric keypad channel entering without libzvbi. * src/zvbi.h, src/zvbi.c, src/main.c: Enable py_closed_caption with or without libzvbi. 2003-12-17 * src/vdr.c (vdr_open): Error messages only with -d option. 2003-12-16 * help/man/zapping.xml, help/man/zapping_setup_fb.xml: Added. * acinclude.m4: Added XML catalog check macros from gtk-doc. * configure.in: Check for prereqs to rebuild man pages. * help/man/Makefile.am: Modified to build man pages from DocBook sources. * src/audio.c (set_mute), po/da.po, po/de.po, po/es.po, po/fr.po, po/it.po, po/nl.po, po/pl.po, po/sv.po: Correction of OSD markup. * src/main.c: Startup/shutdown vdr module. * src/Makefile.am: Added vdr.c, vdr.h. * src/vdr.c, src/vdr.h: Added. Contributed by Slobodan Tomic. Modified for new Python based commands. * src/ttxview.c: Restored search dialog help. * src/properties.h, src/properties.c: Modified to open help file on help button click. * src/channel_editor.c: Added help button. * plugins/screenshot/screenshot.c (properties_add): Replaced help box by ghelp link. * src/properties-handler.c, src/osd.c, src/keyboard.c, src/audio.c, plugins/mpeg/mpeg.c: Linked each prefs page to the appropriate help file section. 2003-12-15 * help/C/figures: Added. * help/C: Rewrote help docs Gnome2 style. * help/de: Removed. 2003-12-11 * plugins/alirc/README.alirc: Moved user instructions into on-line help. * README.commands: Moved contents into on-line help, file no longer needed. 2003-12-06 * po/fr.po: Updated by Christian Marillat. * po/it.po: Updated by Pino Toscano. * po/nl.po: Updated by Guus Bonnema. 2003-12-04 * po/sv.po: Updated by Henrik Isacsson. 2003-12-04 * it.po, es.po: Updated. * src/zvbi.c (acknowledge_trigger): Display proper location of web browser setting in GNOME Preferences (Pino). 2003-12-03 * configure.in: Work with automake 1.4, 1.5, 1.6, 1.7. * plugins/template/Makefile.am, plugins/screenshot/Makefile.am, plugins/parrot/Makefile.am, plugins/mpeg/Makefile.am, plugins/lirc/Makefile.am, plugins/alirc/Makefile.am: Don't set CFLAGS. * src/ttxview.c (search_dialog_continue): Restart search on regexp or casefold option change. * src/zvideo.c (blank_cursor_timeout): Pointer wasn't unblanked on motion in overlay mode. 2003-12-01 * src/zmisc.c (z_status_print): Merged z_status_print_markup() in and added hide/clean option. * src/audio.c (set_mute): Bad OSD markup. * src/osd.c (render_console): Assumed console uses UTF-8. (osd_render_markup): Use no markup (i.e. funky colors) in status bar, clean but hide after timeout. 2003-11-29 * Merged zapping-gnome2 branch back into cvs main trunk. 2003-11-28 * zapping_setup_fb/zapping_setup_fb.c (drop_root_privileges): Cannot distiguish between root and consolehelper, warning removed. * src/properties-handler.c (video_setup, video_apply): Fullscreen vidmode option only when xf86vmode available. (vbi_general_setup): VBI options only when libzvbi available. * src/zmisc.c (zmisc_stop), src/v4linterface.c (z_switch_channel): Compile only if libzvbi present. (z_on_electric_filename): Uninitialized pointer deref. * src/x11stuff.c: Compile warning fixes. * src/tvengxv.c (p_tvengxv_open_device): Uninitialized value. * src/tveng.c (set_control_audio): Compile warning fix. (tveng_attach_device): Use emulator backend if device name is 'emulator'. * src/tvengemu.c: Removed TVENGEMU_ENABLE. * src/ttxview.c (get_ttxview_page), src/osd.c (osd_clear): Uninitialized pointer deref (might be called from py_closed_caption() before main_window was created). 2003-11-27 * src/zvbi.h: Define vbi_pgno, vbi_gui_sensitive() when libzvbi not present. * src/tveng2.c (update_video_input_list): Uninitialized value. * src/tveng.c (tveng_get_control_by_name): Uninitialized pointer deref. * src/properties-handler.c (video_setup, video_apply), src/main.c (main): Xv options only when XVideo available. * src/tveng.c (tv_set_overlay_buffer): Try zapping_setup_fb in PATH first, installed exe might lack suid root. * src/zvbi.c (vbi_gui_sensitive): Remove menu item subtitles when vbi is disabled. (decoding_thread): Didn't properly handle i/o errors, causing chance segv's in vbi_decode(). * src/interface.c (zapping_popup_menu_new): Show toolbar checkmark was reversed. * plugins/mpeg/Makefile.am: Removed mpeg_strings.c, intltool takes care. * po/POTFILE.in: s/mpeg_strings.c/mpeg_properties.glade2, added missing files. * plugins/Makefile.am: Don't build plugins/lirc. * configure.in: Don't configure plugins/lirc. * src, plugins: Some i18n related improvements and corrections. 2003-11-26 * src/zvbi.c: Removed unused zvbi_(caption_)subpage. (py_closed_caption): Rewrote. * src/zmisc.h: New SIGNAL_BLOCK macro. * src/zmisc.c, src/zmisc.h: Removed zmisc_overlay_subtitles(page). * src/zconf.c, src/zconf.h: Added zconf_hook_check_menu. * src/v4linterface.c (z_switch_channel): Change caption page on channel switch. * src/tveng2.c, src/tveng25.c: Clear image buffers on tuner freq change and capture start. Proper info->format initialization in update_capture_format. Report timeout in read_frame. * src/tveng1.c (set_tuner_frequency): Clear image buffers on tuner freq change. * src/tveng.c, src/tveng.h: Added tv_clear_image(). (tv_image_format_is_valid): Added optional bytes_per_line parameter. * src/ttxview.c (get_ttxview_page): Improper parameter declaration. (ttxview_subtitles_menu_new): Added disable item. * src/osd.c (osd_event): Bail out if invalid caption pgno, no more caption subno. * src/main.c (init_zapping_stock): New subtitle icon. (main): Moved startup_zvbi() up, is needed to create_zapping() with bindings to caption functions. Removed obsolete caption initialization. (shutdown_zapping): Save per-channel caption page. (startup_zapping): Load per-channel caption page from config. * src/interface.c: Restored subtitle menu, added subtitle toolbar button. Some minor improvements. * src/frequencies.c, src/frequencies.h: Caption pgno now remembered per channel. * src/channel_editor.c (station_search_timeout): Always use vbi to determine station names, option gone. * src/capture.c (fill_bundle_tveng): Ignored tveng_read_frame() success. (capture_thread): Ignored fill_bundle_tveng() success, especially timeout, sending out old frames. * glade/zapping.glade2, src/properties-handler.c: Removed vbi options: use vbi for getting station names (yes), auto overlay subtitle pages (no), subtitle page (now per channel). * src/audio.c: s/SIGNAL_HANDLER_BLOCK/SIGNAL_BLOCK due to changes in src/interface.c. 2003-11-20 * pixmaps/Makefile.am: Added subtitle.png. * configure.in: Accidentally replaced default prefix by dirname which gdk-pixbuf-csource, that's some/bin. Was a bad idea to begin with, removed. * configure.in, zapping.spec.in, prepare_dist.sh: Configure --with-gnome-prefix option asks for user confusion, removed and its applications replaced by --prefix. * prepare_dist.sh: Updated to match configure.in. * configure.in: Must not expand prefix var in configure.in. * src/Makefile.am: Moved -DZSFB_DIR to configure.in. 2003-11-19 * src/tveng.c (update_xv_control): Channel change muted permanently when controls window was open due to missing quiet handling in p_tveng_update_controls(), fixed here. * src/audio.c (startup_audio): Wrong zconf key when setting start/quit muted to defaults. 2003-11-17 * src/zvbi.c (rolling_headers): Preliminary fix of invalid pointer deref in vbi_draw_vt_page_region after channel change. * src/ttxview.c (ttxview_delete): Post destruction use of color_zmodel. (on_main_menu_bookmarks_destroy): Post destruction use of bookmarks_zmodel. (on_ttxview_expose_event): Segv refreshing an exposed region when drawing area is smaller than window. Appears to "fix" that second bug as well. (on_ttxview_quit): Works now. 2003-11-15 * pixmaps/Makefile.am: Don't install built-in pixmaps. * src/zvideo.c: g_source_remove id must be > 0. 2003-11-14 * src/tvengxv.c, src/tvengemu.c, src/tvengbktr.c, src/tveng_private.h, src/tveng25.c, src/tveng2.c, src/tveng1.c, src/tveng.c: Recursive tveng_device_info-> priv->mutex didn't work, replaced by fast type. Divided a few tveng_ funcs for internal use without locking. 2003-11-13 * plugins/mpeg/mpeg.c (py_record): Missing check if dialog already opened. * src/zimage.h, src/video_xv.c, src/video_x11.c, src/video_mem.c, src/video_gdkrgb.c, src/tvengemu.c, src/tveng25.c, src/tveng2.c, src/tveng1.c, src/tveng.c, src/tveng.h, src/capture.c, plugins/screenshot/screenshot.c, plugins/screenshot/screenshot.h: struct tveng_frame_format replaced by tv_image_format. More work required. * src/x11stuff.c, src/tveng.c, src/main.c, src/zmisc.h, src/fullscreen.c: Update due to tv_image_format in tv_overlay_buffer (dga_param). * src/tveng.h: Replaced image format parameters in struct tv_overlay_buffer by tv_image_format. Replaced base pointer by ulong, since it refers to another address space. * src/tveng.c (tv_pixfmt_bytes_per_pixel): Added to speed up future copy functions. * plugins/mpeg/mpeg.c (video_callback): Missing retrieve_frame(), abort loop if necessary. (do_start): Preliminary hack to prefer native image format if 4:2:0 or 4:2:2. Missing size locking of requested capture format. Translation to RTE_PIXFMT_YUV had UV order wrong. Added support for TV_PIXFMT_YUV420. False negative in format retry loop. * plugins/mpeg/mpeg.c: Missing release_capture_format() calls. 2003-11-07 * plugins/screenshot/screenshot.glade2: File selection dialog didn't focus. Apparently it must be modal if parent is (by using gtk_dialog_run). * src/cmd.c (py_quit): Quit-muted fix (wrong zconf key). (py_toggle_mode): Logic fix. 2003-11-04 * src/interface.c (zapping_popup_menu_new): Show toolbar and keep on top didn't work. 2003-11-03 * src/ttxview.c (on_search_dialog_destroy, search_dialog_continue), src/capture.c (capture_start, capture_stop): Replaced deprecated gtk_idle by g_idle. * src/osd.c (osd_render_osd, osd_set_window): Replaced deprecated gdk_window... by gdk_drawable... functions. * src/zvideo.c (z_video_set_cursor, z_video_blank_cursor), src/overlay.c (stop_timeout, restart_timeout), src/audio.c (reset_quiet), src/ttxview.c, src/osd.c (osd_render_osd), src/zmisc.c (z_status_print), src/x11stuff.c (x11_screensaver_set), src/main.c (main), plugins/screenshot/screenshot.c (plugin_init, plugin_close), plugins/mpeg/mpeg.c (saving_dialog_status_disable, saving_dialog_status_enable): Replaced deprecated gtk_timeout by g_timeout. 2003-11-02 * configure.in: Added Xinerama check. * plugins/mpeg/options.c (create_slider): Calculation of decimal digits no longer in spinslider. * src/video_gdkrgb.c: Correct red/blue order. * src/video_x11.c (add_backend_x11): Expect DGA not present (Xnest, remote display). * plugins/mpeg/mpeg.c (saving_dialog_new): Didn't show pixmaps. 2003-10-31 * plugins/mpeg/mpeg.c (saving_dialog_attach_formats), src/ttxview.c (export_dialog_new), src/zmisc.c (z_electric_replace_extension): Fixed inconsistent freeing of basename. * src/zmisc.c (z_electric_set_basename): Added. * src/zmisc.c (z_on_electric_filename): Fixed buffer overflow. * plugins/mpeg/options.c: Fixed NULL tooltips deref. (create_menu): Another locale to UTF-8 fix. * plugins/mpeg/mpeg_properties.glade2: Removed obsolete rte 0.4 dialogs. * src/main.c (main): Added new options to disable and select port for xv video and image. 2003-10-30 * src/tvengxv.c (tvengxv_attach_device): Glint XV_ENCODING bug work-around. * src/zvbi.c (threads_init), src/ttxview.c (on_export_dialog_ok_clicked): Make sure errstr is UTF8. * src/keyboard.c: Fixed loading of default keybindings. 2003-10-20 * plugins/mpeg/options.c: Locale to UTF-8 fixes. * common/fifo.h, common/fifo.c, src, plugins/mpeg: Prefixed fifo functions and types to prevent linker accidents because the fifo functions aren't binary compatible with their rte clones if rte was compiled with linuxthreads and zapping with nptl, or vice versa. Ported from 0.6 branch. 2003-10-17 * src/frequencies.c (tv_rf_channel_next): Off-by-one error skipping last channel in range. * src/channel_editor.c (station_search_timeout): Incomplete frequency change on 09-24. 2003-10-14 * src/tveng.c (tveng_unset_xv_port): Only #ifdef USE_XV. 2003-10-11 * src/yuv2rgb.c (startup_yuv2rgb): cfuncs r<->b fix. * src/tveng_private.h: tveng_private.assume_yvu useless, removed. * src/video_mem.c (planar_image_new): Incorrect uv_stride. * src/capture.c (request_capture_format_real): No tveng_set_capture_format call if the format is still the same. * src/tveng.c (tveng_set_capture_format): We have a few problems in request_capture_format_real, see TODO. Fix is complex. For now this function will block requests for RGB formats. Zapping 0.0 to 0.6 worked well enough this way. (tveng_copy_frame): assume_yvu useless, removed. Implicit YVU420 to YUV420 conversion removed. * src/tveng.c, src/tveng.h: tveng_assume_yvu() useless, removed. * src/video_xv.c (traverse_ports): Did not register YVU420 ports. (image_new): Proper U/V plane swapping for YUV/YVU 4:2:0, support more packed formats. 2003-10-10 * plugins/screenshot/screenshot.c, plugins/screenshot/screenshot.glade: Brushed up the dialogs. 2003-10-09 * src/video_x11.c (image_new): Incorrect pixfmt assertion. * src/frequencies.c (tveng_tuned_channel_copy): Function decomposed characters with diacritical marks, solution s/G_NORMALIZE_DEFAULT/G_NORMALIZE_DEFAULT_COMPOSE. * src/xawtv.c (xawtv_import_config): Handle non-ASCII channel names. * src/zmisc.c, src/zmisc.h: Added z_set_window_bg(). * src/zmisc.c, src/overlay.c, src/fullscreen.c: Setting window background did not, or not immediately, show. 2003-10-07 * src/frequencies.c (tv_rf_channel_next): Still didn't work right. Fixed again, hopefully for the last time. * src/tvengxv.c: Cleaned up a bit. (grab_port): NVidia tv out bug workaround. (set_overlay): Fixed return values. * src/video_xv.c (add_backend_xv): Cleaned and split up for better readability. Listing XVideo resources moved into helper function in src/x11_stuff.c. (tveng2xv): Removed, the module now remembers the image format id reported by xvlib. (tveng2bpp): Replaced by tv_pixfmt_to_pixel_format(). * src/zmisc.c (zmisc_switch_mode): Proper overlay and fullscreen error messages. * src/tveng2.c (tveng2_set_capture_format): Capture didn't work, added tveng_stop/restart to remap buffers after format change. * src/tveng.c (tv_set_overlay_buffer): Missing slash in zapping_setup_fb install path. Improved error messages. * src/tveng.c, src/tveng.h: Moved preview functions into fullscreen.c. * src/main.c: Moved zapping_setup_fb call into overlay.c and fullscreen.c, where it is called only before DMA overlay is actually activated (mostly for error reporting reasons). Removed Xv detection which existed here only to bypass zapping_setup_fb when we (apparently) have Xv overlay capability. Fixed start-muted. * src/video_x11.c: Replaced zmisc_resolve_pixformat() call by global dga_param access, which already contains the required information. * src/overlay.c: Proper overlay target initialization. * src/fullscreen.c: Moved tveng preview functions here. Removed superfluous (when we're using XVideo) tv_set_overlay_buffer() call. * plugins/mpeg/mpeg.c, plugins/screenshot/screenshot.c, src/capture.c, src/capture.h, src/csconvert.c, src/csconvert.h, src/main.c, src/tveng.c, src/tveng.h, src/tveng1.c, src/tveng2.c, src/tveng25.c, src/tvengemu.c, src/tvengxv.c, src/video_gdkrgb.c, src/video_mem.c, src/video_x11.c, src/video_xv.c, src/x11_stuff.c, src/x11_stuff.h, src/yuv2rgb.c, src/zimage.c, src/zimage.h, src/zmisc.c, src/zmisc.h: Replaced tveng_frame_pixformat by tv_pixfmt and tv_pixfmt_set, which covers more formats and is more accurate WRT color component order and endianess. (So accurate in fact, it revealed a V4L2 API bug.) * src/zmisc.h (zmisc_resolve_pixformat): No longer needed. * src/tveng.c, src/tveng.h, src/tveng_private.h: Replaced tv_video_standard_id by tv_videostd and tv_videostd_set a la tv_pixfmt, under the "no surprise today will keep the bug away" rule. (pig_depth_to_pixfmt): New helper function for backends. * src/tveng.c, src/tveng.h: (tveng_set_xv_port): Missing XFree(). (tveng_detect_xv_overlay): No longer needed, see main.c. (tveng_is_planar): No longer needed, replaced by TV_PIXFMT_IS_PLANAR() and tv_pixfmt_to_pixel_format(). (tv_pixfmt_name): Added, for debugging. (tv_pixfmt_to_pixel_format): Extended. Replaces tveng_frame_pixformat to tv_pixel_format function of same name. (tv_videostd_name): Added, for debugging. * src/main.c, src/globals.c, src/globals.h: Obsoleted --no-zsfb switch. zapping_setup_fb is no longer called at startup but only when we actually switch to dma overlay. * zapping_setup_fb/v4l.c, zapping_setup_fb/v4l2.c, zapping_setup_fb/v4l25.c: Did not properly distinguish between 24 and 32 bpp. * src/x11stuff.c, src/x11stuff.h: Added XVideo helper functions. 2003-09-27 * src/tveng1.c (p_tveng1_open_device_file): ioctl BTTV_VERSION failure is non-fatal. * src/tveng1.c, src/tveng2.c, src/tveng25.c, src/tvengbktr.c: s/open/device_open, s/close/device_close (debugging). * src/properties-handler.c (picture_sizes_on_menu_activate): Fixed wrong selection. * src/v4linterface.c (load_control_values): Fixed, cleaned. * src/frequencies.c (tveng_tuned_channel_set_control): Added. * src/frequencies.h: Removed obsolete declarations. 2003-09-24 * configure.in, src/Makefile.am: Restored libxml check from 0.6.x for src/zconf. * configure.in: Added BSD driver check, cleanup. * src/Makefile.am, src/keyboard.c: Replaced z_key editing widget by eggcellrendererkeys. * src/Makefile.am, src/channel_editor.c: Added channel list import from xawtv config file. * src/frequencies.c: Resynched frequency tables with XawTV for config import function. Added SE Asian tables. * src/frequencies.h: Changed all frequency values to Hz unit. * src/i18n.c: New SE Asian country names. * src/channel_editor.c: Fixed standard and input option menu. * src/zmisc.c, src/zmisc.h: Added a few gtk_tree_view helper functions. Added z_device_entry_grab_focus(). * src/tvengbktr.c: Cleaned up, removed old cruft, compiles now. But doesn't do anything useful yet. :-( * src/tveng.c (tv_set_overlay_buffer): First try the zapping_setup_fb install path. * src/audio.c, src/audio.h, src/properties-handler.c: Rewrote audio device selection in preferences. Cleaned up audio preferences. Added mute on exit option. Removed mute on channel switch option, always on now. * src/zmisc.c: Always mute on channel switch. * src/cmd.c: Mute on exit optional. * src/callbacks.c, src/callbacks.h: No longer used. The remaining button press cb moved into src/interface.c. * src/main.c (on_zapping_key_press): Missing call to on_picture_size_key_press(). * zapping_setup_fb/v4l.c, zapping_setup_fb/v4l2.c, zapping_setup_fb/v4l25.c: Missing #include w/o ENABLE_V4L. * plugins, src: Make VPATH include fixes. (cmd_register): Replaced description and example by set of macros. 2003-08-26 * src/ttxview.c: Teletext doesn't hang anymore. TTXView windows now have a main menu, roughly as recommended in GHIG. Show toolbar/statusbar options inhibited, must investigate how this should be properly implemented. Quit item inhibited, keeps crashing, reason to be investigated. Toolbar improvements: History finally works as expected, page numbers display better, page up/down/etc buttons rearrange on orientation change. Removed Stop button, windows ought to have a close button and we still have the main menu. Added on_toggle and zconf callbacks for reveal button, fixes possible display inconsistency. Fixed attaching to main window toolbar. Creates smaller toolbar for main window. New Python command to open page link in current window. Search dialog not modal anymore. Unified text input dialog and progress display (actually no more progress display, libzvbi needs a fix for proper function). Help button disabled, help needs update for Gnome 2. Export dialog not modal anymore. Format selection moved from submenu (in main_window from popup subsubmenu :-P) into dialog. Removed electric filename, needs work. Fixed bug picking up the wrong file extension. Fixed tabulation of widgets in color dialog, changed to spin slider as in controls dialog. Brushed up bookmarks dialog. Libzvbi strings coded in Latin1 or locale are converted to UTF-8. Rearranged TTXView context menu. Different menus depending on link type, added Open and Open in New Window items. Changed Export to Save as. Create modified context menu for Teletext view in main window. Removed all Teletext widgets from zapping.glade, these are now custom built in ttxview.c. Cleanups. * pixmaps/reveal.png: Reveal is now a normal toolbar button, had to resize icon to keep it in line with other buttons. * src/interface.c, src/properties-handler.c, src/zvbi.c, src/zvbi.h: Removed program and network info stuff, vbi triggers. Were barely useful and the GUI sucked. Maybe later. * src/zvbi.c: Libzvbi network name coded in Latin1 is converted to UTF-8. (vbi_gui_sensitive): Simplified. * src/v4linterface.c (add_controls): Properly pad box. (substitute_keywords): Program and network info temporarily unavailable, needs a rewrite. * src/zmisc.c, src/zmisc.h: Cleanup in [z_toolbar_]set_style_recursive(). propagate_toolbar_changes() no longer needed, removed. z_strlcpy() added for tveng. * src/capture.c, src/cmd.c, src/overlay.c, src/properties-handler.c, src/tveng.c, src/tveng.h, src/zmisc.c, src/zvbi.c: Added tveng_capture_mode TVENG_TELETEXT (which is, naturally, not handled by tveng itself but I don't want to break too many things at once by splitting into a capture and display mode). TVENG_NO_CAPTURE changed meaning to "no display", so we have a state to start from or to fall back. * src/zmisc.c (zmisc_stop): Blanks the window since a restart may fail. Basically this is what TVENG_NO_CAPTURE displays. (zmisc_switch_mode): Moved ttxview_detach() into zmisc_stop(). Changed appearance of Teletext toolbar button to toggle between Teletext and Video. Separated TVENG_NO_CAPTURE and TVENG_TELETEXT start code. * src/interface.c: Zapping GnomeApp, its menu, toolbar and popup menu are now built here instead of by Glade. Better control, no more working around Glade flaws. * src/main.c, src/properties-handler.c: Added toolbar style option and zconf, then I discovered Gnome has one already. Code disabled until I know how to properly handle the conflict while satisfying GHIG. Removed "avoid flicker" option and zconf, not used anymore. * src/interface.c: Added zconf hooks to automagically update menus when hide-toolbar-and-menu and keep-window-on-top config changes. Hook also hides/shows toolbar and menu. * pixmaps/Makefile.am: zapping_stock.h was a stupid idea, removed. Rating pixmaps are no longer installed, the code using them is gone. For now. * src/main.c: Replaced stupid zapping_stock.h. * src/audio.c, src/interface.c, src/interface.h, src/properties.c: Added optional parent widget parameter to register_widget, in case the widget is no child of main_window. * src/audio.c, src/interface.c: Replaced "bonobodockitem" widget names by gnome_app_get_dock_item_by_name(). * src/callbacks.c (on_tv_screen_button_press_event): Moved popup menu initialization into create_popup_menu1(). * src/main.c: Hide toolbar and menu via zconf hook after main_window was shown, has no effect before. :-P * src/cmd.c (py_toggle_mode): Made no sense, cleaned up. (py_keep_on_top): Moved menu item update into zconf hook. (py_help): Disabled, help stuff needs rewrite for Gnome 2. * glade/zapping2.glade: Removed a number of obsolete widgets, others are now custom built. Removed "avoid flicker in preview mode" option, not used anymore. Could return later as a hidden option, this just isn't anything the average user cares about. * src/overlay.c (on_video_window_event): Added GDK_EXPOSE case, is need when child windows (like popup menu submenu) disappear. * src/fullscreen.c (osd_model_changed): Fixed automatic recentering of view. * src/x11stuff (x11_vidmode_list_new): Turned out the server does not behave as expected. (x11_vidmode_switch, x11_vidmode_restore): Make sure this works right when switching to the present vidmode. * src/zconf.c, src/zconf.h: Added option to zconf_add_hook() to call the hook for initialization right away. Added zconf_hook_widget_show(), a generic hook. * help/Makefile.am: Removed C, de subdirs. Help files and installation need a rewrite for Gnome 2. * plugins/alirc/alirc.c, plugins/lirc/lirc.c, plugins/lirc/mpeg.c, plugins/lirc/screenshot.c, src/audio.c, src/callbacks.c, src/fullscreen.c, src/interface.c, src/keyboard.c, src/main.c, src/remote.c, src/remote.h, src/zvbi.c: Renamed python command calls, added optional widget parameter to properly identify the caller. * plugins/mpeg/mpeg.c: Replaced code which is now in z_electric_replace_extension(). * src/properties-handler.c (zapping.picture_size_cycle): Wrong error message. * src/frequencies.c (tv_rf_channel_next): Fixed bug adding null channel in channel editor frequency table. * src/channel_editor.c, src/plugin_properties.c, src/properties-handler.c, src/zmisc.c, src/zmisc.h: New convenience function z_label_set_text_printf(). * src/channel_editor.c: Replaced tveng_tune_input by tv_set_tuner_frequency(). * src/tveng.c (panel_failure, REQUIRE_IO_MODE): Block some functions when the controller is in TVENG_ATTACH_CONTROL mode. Saves similar checks in the backends. (support_failure, REQUIRE_SUPPORT): Abort some functions when the controller doesn't support it. Replaces UNSUPPORTED macro. (tv_get_tuner_frequency, tv_set_tuner_frequency): Replacement for tveng_get_tune, tveng_tune_input. (tveng_get_tuner_bounds): Removed. This information is now available directly in struct tv_tuner. (tv_set_overlay_buffer): Worked only when the driver was initialized for overlay before. (tveng_start_previewing): Limit window size to video standard nominal picture size. (tv_clip_vector_to_clip_mask): Added, untested. Primarily for tveng backends, for drivers supporting only a clip mask. * src/tveng.h (tv_clip_vector_to_clip_mask): Added, untested. (tv_get_tuner_frequency, tv_set_tuner_frequency): Replacement for tveng_get_tune, tveng_tune_input. (tveng_get_tuner_bounds): Removed. This information is now available in struct tv_tuner. * src/tveng_private.h: Rewrote tuner frequency interface, now with bounds in struct tv_tuner, promise of per-tuner frequency setting and control like change callbacks. Unit is Hz instead of kHz or whatever the driver likes. Cleanups. * src/tveng1.c: Rewrote tuner frequency code. V4L does not promise per-tuner frequency settings, so we enforce that here. Added rudimentary panel mode. Some cleanup as usual. :-) * src/tveng2.c: Rewrote tuner frequency code. V4L2 does not promise per-tuner frequency settings, so we enforce that here. Cleanups. * src/tveng25.c: Rewrote tuner frequency code. * src/tvengemu.c: Rewrote tuner frequency code. (add_controls): Fixed incorrect action and color control bounds. * src/tvengxv.c: Rewrote tuner frequency code. Parsing of encoding string (standard-input) was backwards. * src/tveng1.c (v4l_ioctl_nf): New macro to call ioctl without error report, used when EINVAL is expected. (tveng1_set_control): Fixed bogus non-handling of audio control error. * src/tveng2.c (v4l2_ioctl_nf): New macro to call ioctl without error report, used when EINVAL is expected. (add_control): Workaround for drivers reporting wrong boolean and action control bounds. * src/tveng25.c (v4l25_ioctl_nf): New macro to call ioctl without error report, used when EINVAL is expected. (add_control): Workaround for drivers reporting wrong boolean and action control bounds. None observed yet, but just in case. * src/tveng1.h, src/tveng2.h, src/tveng25.h, src/tvengemu.h, src/tvengxv.h: Removed no longer needed function declarations. * po/Makefile.in.in: Updated. * configure.in: Incremented version number for intermediate release. Disabled help Makefile targets, these need work. 2003-07-28 * src/zvideo.c: Gtk version check for aspect bug. * configure.in: gdk_pixbuf_csource helper app check. * pixmaps: Some work to embed pixmaps as stock into the application instead of loading at runtime, unfinished. * src/main.c (init_zapping_stock): Added. * plugins/mpeg/Makefile.am, plugins/mpeg/mpeg.c: Use GtkPixdata and application stock instead of loading pixmaps at runtime. * plugins/screenshot/screenshot.c: Use application stock instead of loading toolbutton image at runtime. * src/zmisc.c, src/zmisc.h: Rewrote helper functions for application stock icons. * src/ttxview.c: Use GtkPixdata and application stock instead of loading pixmaps at runtime. * glade/zapping.glade2: "s/Hide// menu and toolbar" as recommeded in HIG. Use application stock pixmaps. * src/callbacks.c (on_tv_screen_button_press_event), src/cmd.c (py_hide_controls): Changed hide/show menu and toolbar menu to check menu as recommended in HIG. * src/interface.c: Added on_toggle callbacks for toolbar and keep-on-top check menus calling python. Fixes possible keep-on-top menu check mark and state inconsistency. * src/tveng.c, src/tveng.h, src/tveng_private.h: Replaced video input and video standard vectors of tveng_device_info by linked lists, with appropriate methods, callbacks, helper functions and macros. * src/tveng.c, src/tveng.h: Rewrote tv_control and its methods to follow the design of other enumerated items. * src/tveng.c, src/tveng.h: tv_callback_s/node//, Added tv_callback_fn type. * src/tveng.c, src/tveng_private.h, src/tveng1.c, src/tveng2.c, src/tveng25.c: Helper function ioctl_failure to record ioctl name and errno in case of failure. Called automagically from ioctl macros. * src/v4linterface.c: Don't make station menu insensitive when there are no channels, we still have baseband inputs. Rewrote video input and video standard menu building functions. These are now radio menus with automatic update and rebuilding taking advantage of tv_callbacks. * src/zmisc.c, src/zmisc.h: Added z_menu_shell_nth_item() helper. * plugins/mpeg/mpeg.c, src/channel_editor.c, src/main.c, src/properties-handler.c, src/zmisc.c: Updated for new video input and standard enumeration. * src/tveng.c, src/tveng.h: Replaced tv_mixer_line by generic tv_audio_line. Added audio input list to tveng_device_info, audio input helper functions, not used yet. * src/audio.c, src/globals.c, src/globals.h, src/mixer.c, src/oss.c: Replaced tv_mixer_line by generic tv_audio_line. * src/tveng.c, src/tveng.h: Work towards audio mode interface (mono/stereo/...), unfinished. * src/tveng.c, src/tveng.h: Replaced tveng_clip by tv_clip and tv_clip_vector structures and methods, updated tveng_window (now tv_overlay_window) accordingly. Makes things a lot cleaner. New function tv_clip_vector_add_clip_xy sorts clips, will be necessary for bktr. * src/tveng.c, src/tveng.h: Rewrote get/set frame buffer routines. Setting checks if already initialized, saving the zapping_setup_fb call, and again if the helper really worked as expected. * src/tveng.c (tveng_set_preview): DMA target check before overlay is enabled to prevent memory corruption. * src/tveng1.c, src/tveng2.c, src/tveng25.c, src/tvengxv.c, src/tvengemu.c, src/tveng1.h, src/tveng2.h, src/tveng25.h, src/tvengxv.h, src/tvengemu.h: Rewrote video input, standard and some overlay functions. Removed redundant detect_preview and start/stop_previewing (fullscreen overlay) functions. * src/tvengemu.c, src/tveng_private.h: Added tv_set_overlay_buffer function. Not used yet, except in tvengemu.c where calling zapping_setup_fb makes no sense. * src/main.c (main): Pixfmt breakdown in DGA parameter dump. Moved zapping_setup_fb call after device open to permit check if parameters are already initialized. * src/overlay.c, src/overlay.h: Major cleanup. Fixed (non-)clipping against window bounds (right border trashing bug due to DMA overlay alignment by (bttv <= 0.8) driver), tooltip flicker, screen cleanup. All windowed overlay is now controlled by start_overlay() and stop_overlay() in this file. * src/x11stuff.c, src/x11stuff.h: Rewrote clip vector building routines. Simpler now, and take window boundary into account. * src/fullscreen.c: Update to new tv_overlay_window and tv_clip_vector. * src/tveng.c, src/tveng.h: Replaced tveng_fb_info by tv_overlay_buffer structure, also used to hold DGA parameters. * src/tveng.c, src/tveng.h, src/video_mem.c: Added tv_pixfmt_to_pixel_format(), with argument struct tv_pixel_format. Breaks down pixfmt, for clients requiring more details. Accordingly removed redundant color depth and bpp from DGA parameters and tveng_pixformat_bits_per_pixel function. * src/x11stuff.c, src/x11stuff.h: Replaced x11_dga_parameters by tv_overlay_buffer structure in DGA routines. The same structure is used in tveng to program overlay. * src/globals.c, src/globals.h: Replaced x11_dga_parameters by tv_overlay_buffer. * src/zmisc.c (zmisc_stop): Replaced tveng_stop_everything() calls, this function is tveng internal now. * src/zmisc.c (zmisc_restart): Removed, tveng_restart_everything() is tveng internal now and the function wasn't used anyway. * src/zmisc.c (zmisc_switch_mode): Replaced obsolete tveng_detect_preview() call. Simplified switch to windowed overlay, all initialization now in overlay.c/start_overlay(). * src/tveng.c, src/tveng.h, src/tveng_private.h: Added tv_set_overlay_xwindow as set_overlay_buffer (video memory) counterpart. * src/tveng.c, src/tveng.h, src/tveng_private.h: tveng_stop_everything() conflicts with encapsulation of overlay code in overlay.c, therefore now tveng internal. Actually it shouldn't be used at all (before video standard change etc), permitting asynchronous video parameter changes and what not. But fixing this is complicated, postponed until a later date. * src/tveng.c (round_boundary_4): Replaced doubleword alignment of images by more elaborate rounding function. * src/capture.c (scan_device): Restore pixfmt after scan. * common/Makefile.am: VPATH fix: location of structpr_gen.pl script. * common/types.h, src/zmisc.h: PARENT macro passes through NULL. * src/zmisc.c, src/zmisc.h: Added z_strlcpy() helper. Sane version of strncpy, idea from FreeBSD. * zapping_setup_fb/zapping_setup_fb.c: #include for device_open_safer(). Oops. 2003-05-28 * plugins/screenshot/screenshot.c: Fix incompatibility with RH9 nptl library, wrong assumption about pthread_t. * zapping_setup_fb/Makefile.am, zapping_setup_fb/zapping_setup_fb.pam: Consolehelper mediation didn't work on RH9. Fix borrowed from v4l-conf. 2003-04-26 * src/zmisc.c, src/zmisc.h: Cleaned up & improved filename helpers. In particular z_on_electric_filename() didn't work right. Added z_electric_replace_extension(), better than tinkering with text entry directly. * src/ttxview.c, src/zmisc.c, src/zmisc.h: z_build_filename() no longer needed, use glib 2.0 g_build_filename(). * plugins/screenshot/screenshot.c: Use z_electric_replace_extension(). * plugins/screenshot/Makefile.am, plugins/screenshot/screenshot_strings.c: Switched to intltool. screenshot_strings.c obsolete, removed. * po/POTFILES.in: Intltoolized screenshot plugin. * src/capture.c: Race in capture resize logic, added added rwlock. * src/capture.c: Restored on_capture_canvas_allocate() to (if possible) resize captured image to window size. Provisional. * src/capture.c (find_request_size): Default capture size determined by window size. Provisional. * src/zvideo.c, src/zvideo.h: Added cursor blanked signal. * src/fullscreen.c (on_cursor_blanked): Automagically recenter view. * src/fullscreen.c (fullscreen_start): Fixed black background. * src/interface.c (create_zapping): Fixed black background. * src/tveng.c, src/tveng.h, src/tveng1.c, src/tveng2.c, src/tveng25.c, src/tvengxv.c, src/tvengemu.c, src/v4linterface.c: Made tv_control.next and .ignore private as planned. Added tv_control_next() function. * src/tveng_private.h, src/tveng.c: Moved control and image copy helper functions, pointless to inline. * src/tveng.h: New tveng_pixformat_bits_per_pixel() helper. * src/tvengbktr.c: Some progress, but still unfinished. Remove some duplicate code. Won't help security but it helps maintenance. * zapping_setup_fb/Makefile.am: Include src/ headers. Um. * src/x11stuff.c (x11_dga_query), src/x11stuff.h: Added optional display_name parameter. * zapping_setup_fb/dga.c: Replaced by x11stuff.c code. Later zapping_setup_fb should link tveng. * zapping_setup_fb/zapping_setup_fb.c, zapping_setup_fb/v4l.c, zapping_setup_fb/v4l2.c, zapping_setup_fb/v4l25.c, zapping_setup_fb/zapping_setup_fb.h: Use common/device interface instead of local copy. Use x11_dga_parameters (x11stuff.h) parameter instead of globals. * glade/zapping.glade2: Eliminated nested toolbar widgets creating unwanted border around channel up/down buttons. * plugins/mpeg/mpeg.c: Format request fix. Hint to self, never forget to clear unused fields. 2003-03-25 * src/channel_editor.c: "Add all" aligns channel name with channel list number in NTSC country. Automatically select channel_txl option depending on country. * src/frequencies.c, src/frequencies.h: Added channel number alignment hint. Fixed tv_rf_channel_next(), specifically using the French frequency table. * v4linterface.c: Don't list unnamed stations in menus. 2003-03-24 * zapping_setup_fb/Makefile.am: Patch #706599 by Kris Verbeeck to fix installation on Gentoo Linux. 2003-03-22 * pixmaps/Makefile.am: Fixed path of zapping.desktop icon. * src/oss.c (oss_mixer_set_rec_line): Fixed incorrect set of record lines. 2003-03-21 * glade/zapping.glade2, src/properties-handler.c: Removed ratio option, needs rewrite. Auto ratio doesn't work as suggested, belongs into menu, ought to use ZVideo. * glade/zapping.glade2: Replaced tv_screen GtkDrawingArea. * src/Makefile.am: added zvideo.c, zvideo.h. * src/cmd.c: Fixed shutdown muting incorrectly recorded in config. * src/fullscreen.c: Switched from GtkDrawingArea to ZVideo. Paint video background black. * src/interface.c: Replaced tv_screen GtkDrawingArea by ZVideo. Paint window background black. Fixed toolbar up/down command connection. * src/main.c: Removed 1-unit-height hack. Removed geometry hints timeout hack. This is now better addressed (I hope) in ZVideo. Moved hide-pointer functions into ZVideo, is cleaner. Fixed first startup video size 0,0. Fixed saving of global (vs. per-channel) controls. * src/properties-handler.c: Control window size increment with ZVideo. * src/zmisc.c (zmisc_switch_mode): Use ZVideo cursor blanking. Fixed unmuting during shutdown. Moved z_set_cursor() into ZVideo. * src/zmisc.c, src/zmisc.h (z_set_cursor): Moved into ZVideo. * src/zvideo.c, src/zvideo.h: New custom widget, specialization of GtkDrawingArea, for better control over video size. 2003-03-07 * src/tveng2.c, src/tveng25.c: Fixed get_standard code determining active picture size. 2003-03-05 * common/Makefile.am: fprintf_videodev25.h compile warning fix. * common/device.c, common/device.h: Added open() and close() wrapper. Volume/Mute rewrite (mostly finished): * src/mixer.c, src/mixer.h: Replaced mixer interface by 2003-01-15 routines. Rewrote startup|shutdown_mixer(). * src/tveng.c, src/tveng.h, src/mixer.h: Added tv_device_node type and helper functions. Moved mixer definitions from mixer.h into tveng.h. * src/oss.c: Enabled new OSS mixer routines. Various corrections. New function to scan for mixer devices, to be listed in the mixer selection GUI. * src/zmisc.c, src/zmisc.h: Added z_device_entry helpers for prefs kernel device selection. * glade/zapping.glade2: Redesigned soundcard mixer selection. * src/audio.c, src/audio.h: New mixer selection GUI and config. * src/globals.c, src/globals.h: Provisional current mixer and mixer_line variables, later to be moved into a virtual device context. * configure.in: New audio mixer hack #defines for tveng.c. * src/tveng.c, src/tveng.h: Integrated soundcard mixer volume control with tveng_attach_mixer_line(). Mixer controls are properly (and transparently) listed in the controls box. * src/tveng.h, src/tveng1.c, src/tveng2.c, src/tveng25.c, src/tvengxv.c, src/tvengemu.c, src/v4linterface.c: Removed _dev abstraction from controls and mixer, was overkill. Added step property and 'ignore' flag (preliminary?) to controls. * src/audio.c, src/audio.h: Use new mixer API. Removed audio_get|set_mute functions selecting between video device and soundcard mixer volume, this is now transparently handled by tveng. * src/cmd.c (py_quit), src/main.c: s/audio_set_mute/tv_mute_set. * src/main.c: Save and restore "global" controls if not saved per channel. Moved control config code into src/v4linterface.c. * src/v4linterface.c, src/v4linterface.h: New functions to store controls in config and retrieve from config, code extracted from main.c. * src/v4linterface.c (add_controls): Control box rebuilding didn't properly delete old controls. * src/tveng.c, src/tveng.h: New tv_quiet_set() function implementing a program (as opposed to user) level mute function for transparent channel switch muting. * src/v4linterface.c (z_switch_channel): Replaced mute and post-switch usleep by tv_quiet_set() and gtk timeout. * src/audio.c, src/audio.h: New functions for gtk timeout delayed unmute after channel switch. * README.commands, src/v4linterface.c: Removed zapping.volume_incr() ("record volume" which is BS, see ROADMAP) Python command, added zapping.control_incr() command. zapping.control_incr('volume', ...), [+]/[-], controls box volume is now all the same, using video device or soundcard mixer as configured. * src/remote.c (cmd_compatibility): Convert obsolete zapping.volume_incr(). * src/keyboard.c: Default keymap s/zapping.volume_incr/zapping.control_incr. Added new keys to change brig, con, sat & hue, assigned to F-keys as in XawTV. * src/properties-handler.c, src/v4linterface.c: Cleaned up option how to interpret channel numbers entered on keypad/alirc, former "no keypad entering" no longer applicable. * src/properties.c (build_properties_contents): Fixed spurious semicolon in conditional. * plugins/mpeg/mpeg.c, plugins/mpeg/options.c, src/zvbi.c: Compile warning fixes. * src/zvbi.c: Don't abort on i/o error, does more harm than good. Needs a better solution, perhaps in libzvbi. 2003-02-20 * common/Makefile.am, common/device.c, common/device.h, common/structpr_gen.pl: Added script to generate ioctl argument printing and testing functions, and the respective support functions. * src/oss.c, src/tveng1.c, src/tveng2.c, src/tveng25.c: Use new ioctl facilities. V4L2 Linux 2.5 port (finished): * src/tveng.c, src/tveng.h: Updates for tveng25.c. * src/tveng25.c, src/tveng25.h: Misc. fixes, compiles and seems to work correct now (although more polishing is needed, e.g. scaling). * src/tvengemu.c, src/tvengemu.h: Compile fixes. 2003-02-19 * configure.in, plugins/Makefile.am, plugins/mpeg/options.c, plugins/mpeg/schedule.c, plugins/mpeg/mpeg.c, plugins/mpeg/mpeg.h: Recording plugin compiles again, removed librte 0.4 support. Doesn't work however. * glade/zapping.glade2, src/v4linterface.c, src/v4linterface.h: Ported videostd question from 0.6.6. * plugins/mpeg/mpeg.c: Ported 0.6.6 fixes. 2003-02-18 * po/LINGUAS, po/da.po, THANKS: Added Danish translation by Morten Brix Pedersen. * configure.in: Cleaned up gettext checks. * src/main.c, src/global.c, src/global.h, src/tvengxv.c: Added --xv-port option. 2003-02-16 * configure.in: Don't build static libraries (plugins) by default. We never use them. 2003-02-10 * configure.in, Makefile.am, zapping.desktop.in, po/POTFILES.in: Switched to intltool. See intltool/README and http://www.freedesktop.org/standards/desktop-entry-spec.html. FreeBSD port II (unfinished, emulated video dev only): * configure.in, zapping_setup_fb/zapping_setup_fb.c: Added getopt_long check. * configure.in, zapping_setup_fb/Makefile.am: Made suid zapping_setup_fb owner & group OS dependant. * common/Makefile.am: Added ioctl_meteor.h, ioctl_bt848.h, videodev25.h. * common/alloc.h: Don't include malloc.h, BSD says is deprecated. * configure.in, common/unicode.c: Replaced iconv and libunicode routines by glib routines, removed libunicode checks. * src/Makefile.am: COMMON_LIB is in top_builddir (VPATH builds). Added tvengbktr.c tvengbktr.h. * src/frequencies.c, src/tvengemu.c, src/video_gdkrgb.c, src/video_mem.c, src/yuv2rgb.c, src/zimage.h: Use relative path to common/ includes. * src/oss.c: Workarounds for older OSS mixer interface. * src/zvbi.c: Still compile vbi_gui_sensitive() without libzvbi. * zapping_setup_fb/Makefile.am: Use X_CFLAGS, X_XF86DGA_LIBS. * zapping_setup_fb/dga.c: Use HAVE_DGA_EXTENSION. * configure.in: More robust X extensions checks. 2003-02-09 * src/frequencies.c: Moved video standard defines into tveng.h. * src/tveng.h, src/tveng1.c, src/tveng2.c, src/tvengxv.c: New video standard types, for automatic standard selection et al. * src/tveng2.c: Fixed TVENG_ATTACH_CONTROL. * src/zmisc.c (zmisc_switch_mode): Save video standard. V4L2 Linux 2.5 port (unfinished): * common/Makefile.am: Added videodev25.h. * src/Makefile.am: Added tveng25.c, tveng25.h. * zapping_setup_fb/Makefile.am: Added v4l25 target. * zapping_setup_fb/zapping_setup_fb.c, zapping_setup_fb/v4l25.c: Added v4l2 2.5 interface. 2003-02-08 * zapping_setup_fb/Makefile.am: Fixed incorrect $(DESTDIR) prefix in csfb.capps. * po/ChangeLog: Added. This is needed to make dist with our po/Makefile.in.in, an older gettext Makefile customized by the gnomes. 2003-01-27 * configure.in: DPMS check didn't work properly, rewrote. In the course also add/changed checks for xf86dga, xf86vmode, xv. * src/Makefile.am: configure.in X lib checks changed. * src/fullscreen.c: Moved screensaver disabling into zmisc.c. * src/main.c: Init screensaver routines. * src/mixer.c, src/mixer.h: A few minor interface corrections. * src/x11stuff.c: User more fine grained configure.in X lib checks. Various cleanups. Rewrote screensaver disabling routines. * src/x11stuff.h: Cleanup, screensaver interface changed. * src/zmisc.c (zmisc_switch_mode): Disable screensaver in all modes except Teletext. 2003-01-25 * src/tveng.c, src/tveng.h: Switch to tv_control with better encapsulation of controller specifics and callbacks, numerous small changes. Attn tveng_device_info.controls changed from vec to list. Added tveng_update_control(). Moved sanity checks from controllers into tveng_set_control(). tveng_*_control_by_id() preliminary disabled. tveng_*_mute() use controls, controller mute interface removed. * src/tveng_private.h: New tv_dev_control for controller control interface, mute interface removed. Replaced control helper functions. * src/tveng1.c, src/tveng1.h, src/tveng2.c, src/tveng2.h, src/tvengxv.c, src/tvengxv.h, src/tvengemu.c, src/tvengemu.h: Switch to tv_control, rewrote most of the control routines. Mute interface routines removed. * src/v4linterface.c: Switch to tv_control, use tv_control callback to update mute button. 2003-01-23 * src/main.c, src/tveng.c, src/tveng1.c, src/tveng2.c, src/tvengxv.c: Added disable_overlay (--remote) option. 2003-01-22 * src/properties_handler.c, src/tveng.c: Added fullscreen mode list. * src/x11stuff.c, src/x11stuff.h (x11_vidmode_by_name): Added. 2003-01-20 * src/globals.c, src/globals.h: New vidmodes list. * src/main.c: Init new vidmodes list. * src/tveng.c (tveng_start_previewing), src/tveng_private.h: Rewrote to use new x11_vidmode routines. * src/tveng1.c (tveng1_start_previewing), src/tveng2.c (tveng2_start_previewing): Center fullscreen overlay over root window instead of viewport, same as Xv overlay. Accordingly x11_vidmode_switch() centers and we get nice margins. * src/tvengxv.c: Fixed wrong icon in controls box. * src/x11stuff.c, src/x11stuff.h: New x11_root_geometry() helper. New and extended x11_vidmode helper functions, former tveng_start_previewing() code. 2003-01-19 * zapping_setup_fb/Makefile.am, zapping_setup_fb/dga.c, zapping_setup_fb/zapping_setup_fb.c, zapping_setup_fb/zapping_setup_fb.h, zapping_setup_fb/v4l.c, zapping_setup_fb/v4l2.c: Separated video driver interface, added v4l2 interface. * zapping_setup_fb/zapping_fix_overlay: test syntax correction. * configure.in: Added program_invocation_name check for zsfb. 2003-01-18 * src/channel_editor.c (py_channel_editor), src/plugin_properties.c (py_plugin_properties), src/properties.c (build_properties_dialog), src/v4linterface.c (py_control_box): Raise window on reopen. * src/v4linterface.c: Don't disable toolbutton after open. Const fix. 2003-01-15 * common/types.h (PARENT): Missing brackets. * src/ROADMAP: Added some notes for future tveng improvements. * src/audio.c (audio_set_mute): Unmute tv audio when unmuting mixer line. * src/main.c: Const fix. * src/mixer.c, src/mixer.h, src/oss.c: New interface, not used yet. * src/tveng.c, src/tveng.h: Added (final) callback mechanism for new mixer interface (and other tveng properties in the future). 2003-01-08 * src/Makefile.am, src/i18n.c, src/i18n.h: Added i18n.c, i18n.h country name routines. * src/channel_editor.c, src/frequencies.c, src/frequencies.h: Replaced frequency table routines. * src/frequencies.c (tveng_tuned_channel_by_string): Fixed. * src/main.c, src/globals.c, src/globals.h, * src/ttxview.c, src/v4linterface.c: Removed global current_country, renamed tveng_tuned_channel.country to .rf_table "cc@table". * src/v4linterface.c: Channel name completion in keypad (alirc) channel number entering for faster switching. 2003-01-05 * src/tveng1.c: Fixed audio mode selection. 2003-01-03 * glade: Added force_mixer checkbutton in audio prefs. * src/audio.c, src/audio.h: Added force_mixer checkbutton, new master mute functions. * src/cmd.c, src/main.c, src/v4linterface.c, src/zmisc.c: Use audio_xxx_mute(). 2002-12-31 * common/unicode.c: (get_locale_charset): Switched to g_get_charset(), hopefully this is more reliable. * src/v4linterface.c, src/tveng2.c: Fixed controls display. * src/v4linterface.c: Update controls faster on channel switch etc. * src/audio.c: Restored mute button/controls binding. * src/tveng2.c: Added bttv mute bug work-around. Added (preliminary) audio mode menu (no luck w/bttv 0.8.45, needs another work-around). 2002-12-30 * src/frequencies.c: Added Poland Autocom cable Frequency table, contributed by Artur Flinta. * src/osd.c: Ported to Pango. 2002-12-28 * configure.in: Preliminary libesd check. * src/tveng.h: mutable. * src/tveng1.c, src/tveng2.c, src/tvengxv.c: Set info->audio_mutable flag. * src/mixer.h, src/mixer.c: Added mute function. * src/main.c, src/zmisc.c, src/audio.c (set_mute1): Mute by mixer if not supported by video device (preliminary). 2002-12-26 * src/properties-handler.c, src/properties-handler.h: Popup menu appearance sizes now configurable with kbd shortcuts re http://bugs.debian.org/168263. Added py_picture_size_cycle function. * src/keyboard.c: Changed KP_Add and _Sub default key bindings to cycle through the favorite picture sizes. The ttx_subpage_incr functions are still available on cursor l/r. * src/v4linterface.c (on_channel_key_press, kp_timeout): Keypad channel number entering broken, fixed zapping.set_channel argument. Splitted for reuse by alirc. * plugins/alirc/alirc.c: Added MUTE, VOL_UP, VOL_DOWN re zapping-misc@lists.sourceforge.net 23 Dec 2002. Connected SETCHANNEL to the keypad channel number entering routines. Alirc now accepts the new Python commands. * README.commands: Added. 2002-12-24 * src/channel_editor.c, src/channel_editor.h: Rewrote from scratch. Modify button dropped, text entries change the list directly now. Add button adds blank channel. Modification of multiple channels works better. Station search channel name from vbi works better (for me from ttx/vps, anyway), although it runs a bit slower now. Station search and add-all does not add already known channels. Internal the dialog isn't modal and global_channel_list is edited, so all changes are put into effect immediately (needs more work). Cancel button or close restores the old list. Added missing channel_editor.h file. * src/frequencies.c, src/frequencies.h: Rewrote tuned_channel routines. Cleaner and UTF-8 safe. * src/keyboard.c, src/keyboard.h: Added z_key_entry_entry() and cleaned up to permit z_key_entry signal callback. * src/keyboard.c: Commands in key bindings loaded from config now automagically translated from pre-0.7 syntax to Python (e.g. channel up/dn). * src/remote.c, src/remote.h (cmd_compatibility): Added to translate pre-0.7 syntax commands. * src/zmisc.c, src/zmisc.h: Spinslider cleanup. Reset button now cycles between current, previous and reset value. (z_icon_factory_add_default_files): Added but not used yet. * src/v4linterface.c (add_channel_entries): Cleanup. * src/options.c, src/v4linterface.c: Spinslider interface changed. * src/main.c, src/v4linterface.c, src/zvbi.c, src/ttxview.c, plugins/screenshot/screenshot.c: Tuned channel interface changed. * src/zvbi.c (zvbi_get_name): Changed to return UTF-8 string instead of Latin-1 station name. * src/cmd.c: Added py_keep_on_top function. * src/properties-handler.c, glade/zapping.glade2: Moved keep-window-on-top option into View menu. * src/interface.c: Initialize keep-window-on-top check menu. 2002-12-04 * src/main.c, src/x11stuff.c (wm_hints_detect): Rewrote to work with Sawfish. * src/gen_conv.s: Replaced comments, older as dislike C style. * src/tveng.h, src/tveng2.c, src/tvengxv.c: Provisions for control icons. * src/tveng1.c: Provisions for control icons and defaults 32768. * src/zmisc.c, src/zmisc.h: Spinslider improvements. * src/v4linterface.c: More compact control box. 2002-11-15 * src/Makefile.am: Added DEFAULT_CFLAGS, didn't compile without -D_GNU_SOURCE. 2002-10-30 Italian translation * po/it.po: Italian translation, contributed by Pino Toscano. 2002-10-10 * configure.in: Updated rte 0.5 check. * common: Removed obsolete errstr.c, errstr.h. * po/README: Added to explain UTF-8. * po: Updated from 0.6.5 trunk. * plugins/mpeg/mpeg.c, plugins/mpeg/mpeg.h, plugins/mpeg/options.c: Updated rte 0.5 interface to match latest revision. Changed gettext() calls to dgettext() where they access library strings. Proper setup of quickrec recording window. (From 0.6.5) * src/Makefile.am (COMMON_LIB): Changed to $(top_builddir). * src/ttxview.c: Changed gettext() calls to dgettext() where they access library strings. (From 0.6.5) * src/tvengxv.c: Added XSync in tvengxv_tune_input as suggested by bug report #599834. * src: #include fixes for GCC 2.7 (as if anyone would still use it...) * zapping_setup_fb/Makefile.am: Added missing DISTCLEANFILES. * zapping_setup_fb/zapping_setup_fb.c: Had to restore pre-gcc3 macro varargs for compatibility. * BUGS, NEWS, THANKS, prepare_dist.sh, src/zvbi.c, zapping.spec.in: Merged in changes since 0.6.5 branch. 2002-10-08 * plugins/Makefile.am: Disabled mpeg, does not compile. * glade/Makefile.am: Disabled zapping.glade2p, no file. 2002-10-05 bug fixes in screenshot * plugins/screenshot: Fixed a couple bugs introduced when porting. * src/capture.c: Fixed stupid mistake when resizing formats array. 2002-10-04 screenshot, template restored * plugins/screenshot: Restored. * plugins/template: Restored. 2002-09-09 * src/frequencies.c: Added Canada cable contributed by "matt". 2002-08-22 First simple tests * capture.c: Testing the new code. Works more or less with the TVeng_emu driver. Appears to have fewer bugs than i expected, yeeha! :-) Commiting, so the world finally sees the breakage. Plugins are broken, btw. * video_xv.c, video_x11.c: (later) Both work fine, sometimes i find myself utterly amazing:-) 2002-08-18 capture.c finished * capture.c: Finished modulo a couple simple things, I will do those tomorrow, but Z compiles again (at last!). 2002-08-15 capture.c * capture.c: Wrote the complex logic, doesn't compile yet, but the remaining pieces are a piece of cake compared to this. 2002-08-12 video_* done * video_*: Finished video_xv and wrote the rest of the backends needed for having all the previous functionality (actually much more, as usual ;) Now we only need to finish capture.c and the rewrite will compile (but not work yet, as it will surely contain miriads of bugs and/or typos). 2002-08-11 video_xv done * video_xv.c: Compiles. It's the xv video backend adapted to the new design, the rest of the backends i intend to write (x11, rgb and mem) will be considerably easier. 2002-08-10 Continued capture core work * capture.c: Wrote part of it (doesn't compile yet, though). * main.c, x11stuff.c: Adapted. * zimage.[ch]: created, it's a generic image object. Provides an uniform interface to the various possible accelerated kinds of images (Xv[Shm]Image, GdkImage, GdkPixbuf, ...), even to unblittable data. * tveng (tveng_read_frame): Made it accept a tveng_image_data argument instead of void* data, int stride; this syntax suports planar modes better. 2002-08-08 Capture core rewrite * capture, csconvert, video_xv...: Finished the new design for the capture code, hopefully it will become much clearer and robust when implemented. * csconvert.c: Rewrote rgb->rgb filters according to the new design. * yuv2rgb.c: Adapted to the new design, and enabled the rgb->yuv filters in the process. All this is untested, but compiles. 2002-08-03 TVeng emu * tvengemu.c: Created, manages a virtual device. Useful for debugging without convenient hw. 2002-08-02 Chroma+gtk2 fixes * overlay, fullscreen: Found and fixed the infamous "video not redrawn with xvideo" problem, it appeared because gtk2 was drawing over the chromakey whenever it received an expose event. Thanks to Gerd Knorr for some advice regarding this bug. * tveng (tveng_[gs]et_chromakey): Added saner chromakey handling, prolly the V4L[2] code chromakey isn't 100% correct but i have no way to know. It isn't worse than before, anyway. 2002-07-23 Further fixes * zapping: Fixes and missing functionality, it's getting quite usable now. 2002-07-20 Fixes * lirc: Fixed a typo. * acinclude.in: Don't check whether we can build libs depending on libpython, we won't use it anyway. * help: Include it. 2002-07-19 Plugins done * mpeg, screenshot, lirc, alirc: Ported. * po: Converted to utf-8. 2002-07-17 Plugins * plugin_properties: Redone. * template: Ported. 2002-07-16 Everything except plugins * zapping_setup_fb: Copy'n'paste. 2002-07-15 ttxview * ttxview: Ported, but untested. * zapzilla.c: Ported. * properties-handler: Ported. 2002-07-14 Small tweaks * cmd.c: Added some missing functions. * keyboard.c: Converted default bindings to Python syntax. * interface.c: For some strange reason sometimes (most times indeed) "activate" isn't invoqued for items in the appearance submenu of the popup menu. No idea why, and spent too much time with it. 2002-07-13 Audio, v4linterface * v4linterface, x11stuff: Ported. * arts.c, esd.c, oss.c, audio, mixer: Ported. * cpu, csconvert, yuv2rgb: Ported. * plugins: Ported. Now ~/.zapping/plugin_dirs has disappeared, there's a zconf key /zapping/plugins/plugins_dirs instead. This way, when zconf is converted to gconf we won't need .zapping any longer. * capture, preview, fullscreen: Ported but untested. * zmisc: Added zmisc_switch_mode routines. * main.c: Ported, things start to work, khewl! I can see the image produced by my webcam as before. 2002-07-12 Ported OSD * osd.c: Ported, kept some deprecated gdk_font stuff around since it's so much easier to use than raw Pango. As a little bonus osd now works even without zvbi compiled in. Moved the OSD properties management code in here, helps modularity. * zapping: Compiled with GDK_DISABLED_DEPRECATED too, fixed appearances of deprecated stuff. * src/zvbi.c: Ported. * remote.c: Added missing cmd_run_printf. 2002-07-11 Properties shell working * properties: Ported the shell code, works no problem with the keyboard settings. properties-handler isn't there yet. * video_xv.c, x11stuff: Ported. The WM_HOOKS (stay on top) isn't ported yet, apparently gnome-winhints has just dissapeared without any replacement. Stuff to work on after I make the hard things work. * zmisc: Ported all of it modulo the switch_mode routines, I cannot port those till I have the capture stuff working, perhaps a couple of days. 2002-07-10 Started high-gui stuff * frequencies.[ch]: Ported. * keyboard.c, .h, keysyms.h: Ported, compiles but untested yet since it requires the properties stuff, which i have't ported yet. This was my first exposure to GtkTreeView (GtkCList on steroids). While ackward at first glance, gets easier to work with when you get used to it. 2002-07-09 Low-gui stuff ported * common: Copied and pasted, this one was easy :-) * tveng: Ported. * configure.in: Brought back some missing macros. * src/interface.c: Added menu callbacks support. * zmodel: Ported to being a GObject. * zconf: Ported. Not completely tested, but the hook stuff, which is the part that could break appears to work. Zapping will be the definite test, though. * zmisc: Ported propagate_toolbar_changes; ShowBox and friends are now GtkMessage boxes. 2002-07-08 Started port * zapping: Started Gnome 2 port, it will become zapping 0.7 when completed. * glade: Converted to glade-2, fixed a few stock pixmaps that went astray during the conversion. Surely there are others left. Change some callbacks that were using user_data to specify the action, this ain't easy to do with glade-2. * src/callbacks.c: Added on_zapping_delete_event. * src/remote.c: Uses the builtin Python interpreter now. * src/cmd.[ch]: Created, C implementation on Python methods, currently just quit(). * acinclude.m4: Custom macros, necessary since there's no macros subdir in Gnome2 (at least by default). * src/interface.c: Libglade routines adapted, some stuff is missing yet. ######### zapping-gnome2 merge point ########################################## 2003-11-29 * Release 0.6.8. 2003-11-04 * po/it.po: Updated by Pino Toscano. 2003-09-29 * src/overlay.c: Background fix. Patch #811746 by Cheuksan Wang. 2003-05-27 * Release 0.6.7. 2003-05-24 * plugins/screenshot/screenshot.c: Fix incompatibility with RH9 nptl library, wrong assumption about pthread_t. * common/fifo.h, common/fifo.c, src, plugins/mpeg: Prefixed fifo functions and types to prevent linker accidents because the fifo functions aren't binary compatible with their rte clones if rte was compiled with linuxthreads and zapping with nptl, or vice versa. * zapping_setup_fb/Makefile.am, zapping_setup_fb/zapping_setup_fb.pam: Consolehelper mediation didn't work on RH9. Fix borrowed from v4l-conf. * Switched to libpng12 (so.3) in RPM. Apparently we must link with the same version as the Gnome libs we use. The linker won't load two different versions (??) and libpng complains about version mismatch. 2003-05-17 * src/callbacks.c: Fix compile err without libzvbi, patch by Leonard Norrgard. 2003-05-07 * src/zvbi.c: Experimental proxyd interface. * configure.in: Added --enable-proxy (experimental proxyd interface). 2003-02-19 * zapping.desktop: Add Danish translation. 2003-02-18 * po/LINGUAS, po/da.po, THANKS: Added Danish translation by Morten Brix Pedersen. * src/main.c, src/tvengxv.c: Added --xv-port option. 2003-02-16 * Release 0.6.6. 2003-02-16 * configure.in: Don't build static libraries (plugins) by default. We never use them. 2003-02-08 * src/zmisc.c (zmisc_switch_mode): Save video standard. V4L2 Linux 2.5 port: * common/Makefile.am: Added videodev25.h. * src/Makefile.am: Added tveng25.c, tveng25.h. * zapping_setup_fb/Makefile.am: Fixed incorrect $(DESTDIR) prefix in csfb.capps. Added v4l25 target. * zapping_setup_fb/zapping_setup_fb.c, zapping_setup_fb/v4l25.c: Added v4l2 2.5 interface. 2003-01-23 * src/main.c, src/tveng.c, src/tveng1.c, src/tveng2.c, src/tvengxv.c: Added disable_overlay (--remote) option. 2003-01-19 * zapping_setup_fb/Makefile.am, zapping_setup_fb/dga.c, zapping_setup_fb/zapping_setup_fb.c, zapping_setup_fb/zapping_setup_fb.h, zapping_setup_fb/v4l.c, zapping_setup_fb/v4l2.c: Separated video driver interface, added v4l2 interface. * zapping_setup_fb/zapping_fix_overlay: test correction. 2003-01-15 * src/audio.c (audio_set_mute): Unmute tv audio when unmuting mixer line. * src/main.c: Const fix. 2003-01-05 * src/tveng1.c: Fixed audio mode selection. 2003-01-03 * glade: Added force_mixer checkbutton in audio prefs. * src/audio.c, src/audio.h: Added force_mixer checkbutton, new master mute functions. * src/callback.c, src/main.c, src/zmisc.c, src/v4linterface.c: Use audio_xxx_mute(). 2002-12-28 * src/tveng.h: mutable. * src/tveng1.c, src/tveng2.c, src/tvengxv.c: Set info->audio_mutable flag. * src/tveng2.c: Bttv mute bug work-around. * src/mixer.h, src/mixer.c: Added mute function. * src/main.c, src/zmisc.c, src/callback.c (set_mute1): Mute by mixer if not supported by video device (preliminary). 2002-12-26 * src/v4linterface.c: Splitted keypad channel number entering routines for reuse by alirc. * plugins/alirc/alirc.c: Added MUTE, VOL_UP, VOL_DOWN re zapping-misc@lists.sourceforge.net 23 Dec 2002. Connected SETCHANNEL to the keypad channel number entering routines. 2002-12-13 * glade/zapping.glade, src/v4linterface.c, src/v4linterface.h, plugins/mpeg/mpeg.c: Added video standard inquiry if not reported by driver. * src/zmisc.c (z_spinslider_new): digits init bug fixed. 2002-12-12 * plugins/mpeg/mpeg.c (video_callback): Unusual condition can block encoding, added temp fix to abort after stop. (on_saving_configure_clicked, saving_dialog_attach_formats): GUI confusion fix, saving dialog now automatically selects last configured format. (select_file_format): preliminary visual hint, mp1e vcd image size is not variable. (do_start): Retry request_bundle_format() with codec video parameters. * src/callbacks.c, src/osd.c, src/ttxview.c, src/zvbi.h, src/zvbi.c: Corrected wrong type of zvbi_page, zvbi_subpage for libzvbi 0.3. * zapping.desktop: Italian translation from po/it.po. 2002-10-30 Italian translation * it.po: Italian translation, contributed by Pino Toscano. 2002-10-21 * src/zvbi.c (threads_init): g_strconcat() fix re #635976. * src/gen_conv.s: Replaced /**/ remarks, old as don't like it. 2002-10-04 * Release 0.6.5. 2002-10-01 * po/nl.po: Updated by Guus Bonnema. 2002-09-29 * src: #include fixes for GCC 2.7 (as if anyone would still use it...) * Makefile.am: Added missing DISTCLEANFILES. * zapping_setup_fb/Makefile.am: Added missing DISTCLEANFILES. * src/Makefile.am (COMMON_LIB): Changed to $(top_builddir). 2002-09-28 * po/fr.po: Updated by Christan Marillat. 2002-09-27 * plugins/mpeg/mpeg.c: Proper setup of quickrec recording window. 2002-09-26 * src/ttxview.c, plugins/mpeg/mpeg.c: Changed gettext() calls to dgettext() where they access library strings. Oops. 2002-09-24 * configure.in: Change rte 0.5 check to match latest revision. * plugins/mpeg/mpeg.c: Updated rte 0.5 interface to match latest revision. 2002-09-09 * src/frequencies.c: Added Canada cable contributed by "matt". 2002-08-31 * src/tvengxv.c: Added XSync in tvengxv_tune_input as suggested by bug report #599834. * src/v4linterface.c: Increased nap time before unmuting after channel switch. * src/main.c: Fixed widget lookup before main window creation bug. * zapping_setup_fb/zapping_setup_fb.c: Had to restore pre-gcc3 macro varargs for compatibility. ######### zapping-gnome2 branch point ######################################### 2002-06-19 * src, glade, plugins: Added show tooltips option. 2002-06-17 * m4, po, intl, config.rpath: Added because cannot use autogen.sh gettextize --force since gettext 0.11. The fine hack insists on updating already updated Makefile.am's and configure.in. * po/Rules-quot: s/PACKAGE VERSION/... because msgfmt complains. 2002-06-16 gettextize * Makefile.am (SUBDIRS): Add m4. (ACLOCAL_AMFLAGS): New variable. (EXTRA_DIST): Add config.rpath. * configure.in (AC_OUTPUT): Add m4/Makefile. 2002-06-10 * src/mixer.c: Try /dev/mixer before /dev/mixer0 etc, thanks to Heiko Abraham for reporting. Patch by Iñaki. * zapping_setup_fb/zapping_setup_fb.c: Reduce the amount of code executed with root privileges. Patch by Iñaki. Yours truly cleaned up the code to make it more readable. 2002-05-30 * src: Added "keep on top" re feature request #555064. Note doesn't work with sawfish, has incomplete Gnome wm proto. 2002-05-29 * plugins/mpeg: Finished changes for rte 0.5 (still compiles with rte 0.4). * src/x11stuff.c: Applied Iñaki's XScreensaver patch. 2002-05-28 * src/zmisc.c, src/zmisc.h: Added set_sensitive_with_tooltips(), made find_unused_name() more flexible. * plugins/screenshot/screenshot.c: Disabled widgets explain why... doesn't seem to work. :-( 2002-05-25 * src/properties.c, src/properties.h: Added handler cancel function. * src/interface.c: Modified build_widget() semantics to get rid of hardcoded PACKAGE_DATA_DIR. 2002-05-24 * src/zmisc.c, src/zmisc.h: Added z_load_pixmap() (simplification and less instances of PACKAGE_PIXMAP_DIR), replaced old pixmap from file creation code. * src/interface.c, src/properties.c, src/lirc.c: Replaced old pixmap from file creation code. * src/ttxview.c, src/zvbi.c: Replaced old pixmap/pixbuf from file creation code. 2002-05-20 * configure.in: Now inherits CFLAGS from environment, modified clean.pl to retain argument order. 2002-04-17 * plugins/mpeg/mpeg.c: Some work towards the new recording dialog. 2002-04-15 * plugins/mpeg/mpeg.c, plugins/mpeg/options.c: Ported to rte 0.5 (optional), config audio and video pages now sensitive only when the stream type applies. For testing only. * configure.in: Added check for rte 0.5. 2002-04-10 Greetings from the chrome department: * src/keyboard.c: Replaced shutdown by keyboard image in prefs. * src/properties-handler.c: Added toolbar style option. * src/interface.c: Added toolbar style option and changed toolbar mute button image from stock volume to crossed speaker symbol. * src/zmisc.c: Spinslider [reset] button replaced by pixbutton, needs less screen real estate and no translation. 2002-04-09 * zapping_setup_fb/Makefile.am: In absence of consolehelper install suid root zapping_setup_fb in $sbindir but $bindir and create a symlink in $bindir. Now the executable is always in $sbindir. Removed zsfb.capps.in, now created by Makefile, to replace $prefix/sbin by $sbindir (which isn't fully expanded by autoconf in zsfb.capps.in). * zapping_setup_fb/zapping_fix_overlay.in: Renamed from zapping_fix_overlay. This version works exactly like the new make install, honouring $bindir and $sbindir, with a a provision for RPM relocation and a reversion option. 2002-04-06 * src/osd.c: Fix to compile w/o zvbi. * src/callbacks.c: Fix to compile w/o zvbi. 2002-04-04 * zapping_setup_fb/zapping_fix_overlay: Didn't work when 'which' found */sbin/zapping_setup_fb. 2002-04-02 tveng_detect_xv_overlay * src/tveng.c: Do not run zsfb if XV overlay will be used, bttv and v4l driver in XFree do weird things otherwise. 2002-04-01 Release 0.6.4 * po/es.po: Updated by Iñaki G. Etxebarria. * po/pl.po: Updated by Paweł Sakowski. * src/properties-handler.c: Use ngettext for 'with %d tuners' (%d > 1) string. 2002-03-23 Christian Marillat * po/fr.po: Updated. 2002-03-22 automake 1.6 * configure.in: Prepared for automake 1.6, removed 'deprecated and discouraged' acconfig.h. 2002-03-21 Fixes * src/callbacks.c: quit_cmd() didn't work correctly when called from Quit menu, fixed. Added subtitle_overlay command to replace the toggle function of switch_mode teletext. * src/zapzilla.c: Added quit command (for [q]). 2002-03-19 * src/zvbi.c: Experimental change re zapping-Bugs-527786. * configure.in: Added runtime tests for arts, unicode, xml. * callbacks.c: switch_mode_cmd() to current not remebered as last mode. Extended restore_mode_cmd() to swap between current/last or requested/last. Added "swap_mode" synonym. * keyboard.c: Replaced switch_mode by swap_mode. 2002-03-15 * zapping_setup_fb/zapping_setup_fb.c: Changed messages refering to "this program", which is confusing, to "zapping_setup_fb". * src/main.c: Replaced "overlay" in error messages by "previewing" for consistency with the GUI. Actually overlay would be the better term. 2002-03-12 * configure.in: Added "/opt/gnome/share/aclocal" to AM_ACLOCAL_INCLUDE() (this has to be literal since aclocal scans configure.in before it's autoconf'ed), seems to solve the problems we had with gnome installs in /opt. See zap-misc 2001-10-15, 2002-03-09. 2002-03-10 zapping-Bugs-527984 * src/tveng1.c: Added mmap PROT_READ | PROT_WRITE for bttv 0.8.x. * src/tveng2.c: Added mmap PROT_READ | PROT_WRITE for bttv 0.8.x. * src/audio.c: Missing LIBZVBI conditional around osd_render_sgml(). * src/osd.c: Added dummy osd_render_sgml(), just in case. 2002-03-08 zapping_setup_fb * zapping_setup_fb/Makefile.am: Automake or autoconf created a bad Makefile, moving the "if SUID_ZFSB" around helped. 2002-02-26 Keyboard and command changes * Channel number entering on KP: Removed all keys except 0-9, decimal, enter. Decimal now runs through all channel prefixes and serves as clear key. * src/v4linterface.c: Removed channel up/down swap option. * src/remote.c: Added new command functions. These replace a number of on_event functions, allowing both keys and glade GUI elements to trigger kind of mini scripts. Will probably add more of these and extend to (a)lirc and command line. * src/ttxview.c: Removed all key bindings except 0-9. Replaced several functions by remote commands. * src/keyboard.c: New file. Added key entry widget based on channel dialog with two changes: Reordered the 'known keys' dialog key table and added a key enter function. Preferences: Added keyboard section to assign commands to keys. Added new one-key bindings. Key events are differently handled now, see README. * plugins/screenshot/screenshot.c: Made toolbar button optional. Added two remote commands to activate, with format parameter. * plugins/screenshot/mpeg.c: Added two remote commands to activate. Had to rewrite mpeg_configured() message, crashed due to a glade bug (?). * src/audio.c: Volume and mute remote commands. * src/callbacks.c: Switch mode/restore/quit remote commands. (Should probably go into main.c) * src/channel_editor.c: Replaced key entry dialog. The channel accel stuff is much cleaner now. * src/frequencies.c: A little renaming to reduce the confusion between station name and RF channel name. 2002-02-24 Audio * Added preliminary volume +/- buttons. This affects the record line volume using OSS /dev/mixer. 2002-02-25 zapping_setup_fb patch * zapping_setup_fb/zapping_setup_fb.c: Patch by David Fries. zapping_setup_fb won't run because the .Xauthority is on a nfs mounted directory with the server doing root squash so it can't contact the X server. This patch drops the root privileges when connecting to the X server. 2002-02-08 Fixes * src/zvbi.c: Made threads_destroy() block-proof, fixed a td == 0 crash (??) in update_vi_network(). * src/zmisc.c: -d dumps failure cause of z_pixmap_new_from_file(). 2002-02-05 Another mute fix and better KP entering * src/tvengxv.c: tveng_get|set_mute ignored controls bttv mute bug workaround. * src/osd.c: Added remove timeout callback. * src/v4linterface.c: Uses OSD for KP channel number entering. * Added "channel number refers to" option. 2002-02-03 Mute fixes * src/zmisc.c: zmisc_switch_mode() didn't expect failure of tveng_get_mute(), updated control box before restoring old mute state. * src/callbacks.c: on_toggle_muted1_activate() didn't expect failure of tveng_get_mute() and didn't update control box. * Added KP channel number entering suggested by Nathan G. Grennan. 2002-01-24 Added @euro charset * common/unicode.c: Added support for the ISO-8859-15 locale (@euro), and a default when the charset is unknown. * src/osd.c: Prefixed correctly VBI_BLUE in sax parsing, etc, otherwise they would be ignored. 2002-01-19 * src/osd.c: Segv fix in geometry_update(). * src/zvbi.c: threads_init(), threads_destroy() didn't work correctly on failure. * Updated Zapzilla export docs. 2002-01-18 * plugins/mpeg/mpeg.c: Error box when the video standard is unknown, used to crash. * src/zvbi.c: "Overlay subtitle pages automatically" defaults to FALSE. 2002-01-14 * src/zvbi.c: Restored v4l vbi interface, untested. 2002-01-13 libzvbi * Ported Zapping from old libvbi to libzvbi, the new standalone version in CVS, module "vbi". Right now only the v4l2 interface works (oops...), ttx search doesn't and the "sample filter" is gone, but the rest seems to be in good shape. Zapping will also compile without libzvbi, disabling all vbi features. 2002-01-08 * ttxview.c: Page is exported with current reveal state. * vbi export: "TODO: TTX export ANSI colors needs improvement" done, now has char set and terminal option, the stupid fg/bg options are gone. Local Variables: mode: change-log coding: utf-8 left-margin: 8 fill-column: 76 End: zapping-0.10cvs6/ChangeLog.05 644 764 144 346441 10432663165 11064 2005-12-21 * libvbi/dlist.h: Fixed spurious crashes due to a pointer aliasing bug. 2005-11-29 * src/Makefile.am (zapping_LDADD): Added PNG_LIBS (libvbi). 2005-11-23 * configure.in: Added check for -lXmu. * src/Makefile.am (bin_PROGRAMS): Compile zapping_remote only if we have -lXmu. 2005-11-21 * help/C/zapping-C.omf: Corrected document description. 2005-10-30 * zapping_setup_fb/zapping_setup_fb.c: Say try -vv which app. * pixmaps/Makefile.am, plugins/mpeg/Makefile.am: BUILT_SOURCES do not belong into CLEANFILES, they're already in MAINTAINERCLEANFILES. * help/C/settings.xml: XML syntax fix. 2005-10-26 * Prerelease 0.10cvs. 2005-10-26 * src/main.c (startup_zapping): Compile zconf_get_ttx_encodings call only if we HAVE_LIBZVBI. * src/fullscreen.c (fullscreen_activate_subtitles): Compile only if we HAVE_LIBZVBI. * configure.in: Removed DESTDIR prefix from -DPACKAGE_ZSFB_DIR. 2005-10-24 * configure.in: Added check for glib-genmarshal, required by src/Makefile.am. * src/Makefile.am, zapping_setup_fb/Makefile.am, plugins/template/Makefile.am, plugins/teletext/Makefile.am, plugins/subtitle/Makefile.am, plugins/mpeg/Makefile.am, plugins/lirc/Makefile.am, plugins/deinterlace/Makefile.am, plugins/alirc/Makefile.am, libtv/Makefile.am, help/Makefile.am: Cleaned up. * pixmaps/Makefile.am, libvbi/Makefile.am, common/Makefile.am: Build BUILT_SOURCES only in maintainer mode, cleaned up. * help/man/Makefile.am: Build manuals only in maintainer mode. * autogen.sh: Don't fall back to gnome-autogen.sh because it always enables maintainer mode. * help/C/zapping.xml: Added move/resize and context menu descriptions to the subtitle section. Added note about subtitles to the screenshot section. * help/C/settings.xml: Added Devices/VBI and Plugins/Subtitles section. Added explanation of recording plugin VBI preferences. * libtv/cpu.c (features): Added 'none'. * help/man/zapping.xml, help/man/zapping_remote.xml, help/man/zapping_setup_fb.xml: Updated. 2005-10-22 * src/v4linterface.c (kp_enter): Numeric keypad channel number entering, try nth channel if channel name lookup failed. * src/zmisc.c (start_teletext): Didn't connect the video window status bar to Teletext view. 2005-10-21 * configure.in, plugins/mpeg/Makefile.am: Use librte on FreeBSD, works now. * src/fullscreen.c (osd_model_changed): Used wrong window to calculate clip vector. * src/fullscreen.c (start_fullscreen), src/overlay.c (start_overlay): zconf_get_source() call was missing to restore settings which are reset at device open(). Required for bktr. * src/capture.c (capture_start): Didn't call on_capture_canvas_allocate, so the capture size wasn't adjusted to the window size from the beginning. * src/tvengbktr.c (p_tvengbktr_open_device_file): (tvengbktr_attach_device): Reenabled overlay support. 2005-10-18 * zapping.schemas.in: show_dheight missing. * libvbi/network-table.h: Updated. * plugins/teletext/view.c (export_action): g_free() fix. * libvbi/Makefile.am (libvbi_la_SOURCES): Added vps.c, vps.h. * libvbi/vps.c, libvbi/vps.h: Added from libzvbi 0.3 branch. * libvbi/vbi_decoder.c: Enabled VPS decoding. * src/zvbi.c: Restored network identification. * configure.in: Added lrint check. List deinterlace plugin only if we build the V4L2 interface, doesn't work with V4L and bktr yet. * plugins/subtitle/view.c: Added lrint substitute. * plugins/Makefile.am (SUBDIRS): Build deinterlace module only if we build the V4L2 interface, doesn't work with V4L and bktr yet. 2005-10-14 * src/fullscreen.c (start_fullscreen): Fixed the bug misplacing the main window by window frame size when returning from fullscreen mode. * glade/zapping.glade2, src/properties-handler.c (mw_setup, mw_apply): Removed 'Save window geometry' option. * src/main.c: Removed the hack restoring the window geometry. Now Zapping restores the old window size if the session manager didn't do it already. * src/main.c (main): Added GnomeClient (session) callbacks. 2005-10-13 * src/tvengemu.c (get_overlay_buffer): Didn't return data. * src/zmisc.c (zmisc_switch_mode): Replaced ShowBox() by shiny new z_show_non_modal_message_dialog(). * src/cmd.c (switch_mode): Fixed double error message. * glade/zapping.glade2, plugins/mpeg/mpeg_properties.glade2, plugins/screenshot/screenshot.glade2: Use FileChooser for all FileEntries. 2005-10-12 * zapping_setup_fb/zapping_setup_fb.c, zapping_setup_fb/zapping_setup_fb.h: Replaced message and errmsg macros by functions. * zapping_setup_fb/zapping_setup_fb.c: Brushed up progress and error messages. Localized error messages. (device_open_safer): Open device by name or fd. Replaced stat/open by open/fstat to prevent race. (long_options): Added -c/--child to return localized UTF-8 error messages back to parent process on stderr and suppress other messages. Added -f/--fd to use a file descriptor to access the video device. * zapping_setup_fb/v4l25.c (setup_v4l25), * zapping_setup_fb/v4l2.c (setup_v4l2), * zapping_setup_fb/v4l.c (setup_v4l): Open device by name or fd. Brushed up progress and error messages. Localized error messages. * zapping_setup_fb/Makefile.am (INCLUDES): Added DEFAULT_CFLAGS to define GETTEXT_PACKAGE and PACKAGE_LOCAL_DIR. * po/POTFILES.in: Added zapping_setup_fb. * src/tveng.c (tv_set_overlay_buffer): Pass info->fd to zapping_setup_fb instead of temporarily closing the device. Use a pipe to read back error messages on stderr and present them to the user. 2005-10-11 * configure.in: Added check for ISO C99 __VA_ARGS__. (GCC_VERSION): Evaluate to false if not GCC. 2005-10-10 * configure.in: Improved the ambiguous "checking for SIMD support" messages. 3DNow check used -mmmx instead of -m3dnow. 2005-08-25 * src/keyboard.c (on_selection_changed): Fixed crash on clicking keyboard prefs remove key button. * src/zmisc.c (zmisc_switch_mode): Reenable subtitles after a switch to capture or overlay mode. * src/xawtv.c (channel_section): Handle baseband inputs (Debian bug/patch #302835, with a fix). 2005-08-24 * src/zvbi.h, src/zvbi.c (zvbi_add_decoder, zvbi_remove_decoder): No longer needed, removed. * src/zvbi.c (zvbi_channel_switched): vbi3_(teletext_)decoder_reset on channel change moved here from plugins/teletext/main.c. * plugins/teletext/window.c (top_menu_item_new, append_top_menu, append_channel_menu, instance_finalize, instance_init), plugins/teletext/search.c (search_restart), plugins/teletext/preferences.c (teletext_prefs_apply), plugins/teletext/bookmark.c (on_add_bookmark_activate), plugins/teletext/main.c, plugins/teletext/view.c: Use zvbi_get_object() vbi3_decoder instead of teletext plugin private vbi3_teletext_decoder. * src/fullscreen.c (fullscreen_activate_subtitles), src/subtitle.c (py_closed_caption): Remember subtitle size and position in config. * src/subtitle.h, src/subtitle.c: Added helper functions to get/set subtitle position in Zapping config. * plugins/subtitle/view.h, plugins/subtitle/view.c: Added position changed signal to update config. 2005-08-23 * po/POTFILES.in: Added libvbi/exp-sub.c, plugins/subtitle/main.c, plugins/subtitle/preferences.c, plugins/subtitle/view.c, src/mixer.c, src/zgconf.c, src/zspinslider.c. Removed src/fullscreen.c, src/interface.c. * libvbi/caption_decoder.h, libvbi/caption_decoder.c: Added vbi3_caption_decoder_get_cc_channel_stat function to find active caption channels, equivalent to vbi3_ttx_page_stat. Added VBI3_EVENT_PAGE_TYPE as in teletext_decoder to notify clients about caption activity changes. * src/subtitle.c (subtitle_menu_new), src/zvbi.c (zvbi_find_subtitle_page): Use new vbi3_caption_decoder_get_cc_channel_stat function to find active caption channels. (subtitle_menu_new): Use radio menu items to indicate the currently selected subtitle page, if any. Display language from user selected Teletext encoding, if any. * configure.in: Require libzvbi >= 0.2.11 to make vbi_pes_demux_reset() available. * src/zvbi.c: Play back PES VBI files in real time, at a rate calculated from PTS. * src/zmisc.h, src/zmisc.c (z_timeout_add): New GSource based on g_timeout to alert the process once at some future time, for real time playback of PES VBI files. * src/main.c (startup_teletext): Disable vbi only if both the Teletext and subtitle plugin are missing. * src/zvbi.c (zvbi_stop, zvbi_start), src/zapping.h (struct _Zapping), src/zmisc.c (show_teletext_buttons), src/main.c (startup_teletext), src/zapping.c (zapping_create_popup, instance_init): Split zapping->vbi_action_group into Teletext and subtitle groups. 2005-08-21 * libvbi/ure.c: Const fixes. * libvbi/caption_decoder-priv.h, libvbi/caption_decoder.h, libvbi/caption_decoder.c, libvbi/event.h: Replaced VBI_EVENT_ROLL_UP event by a cc_page flag. Same effect but more efficient. * libvbi/vbi_decoder.c, libvbi/event.h: Added VBI_EVENT_TIMER to aid caption roll-up. * libvbi/event.c (_vbi3_event_handler_list_add): Incorrectly returned NULL failure if the handler is already listed and only its event mask changed. * libvbi/cache.c (add_network): Ignore network_limit if we cannot reuse a cached network because they're all referenced. (add_network, delete_network): Call caption routines now present in the Zapping version of libzvbi3. 2005-08-15 * plugins/teletext/view.c, src/main.c, src/v4linterface.c, src/v4linterface.h, src/frequencies.c, src/frequencies.h: Added functions to store individual Teletext page character encodings with channel config data. * libvbi/export.c (vbi3_export_set_timestamp), libvbi/export-priv.h, libvbi/exp-sub.c: Fixed the calculation of the display delay of the first subtitle page. * plugins/mpeg/mpeg.c (pref_setup, pref_apply): Replaced makeshift config copy which handled only rte_context stuff by the new zconf_copy() to copy the VBI configuration as well. (do_stop, do_start): Added subtitle file recording. * src/zconf.h, src/zconf.c (zconf_copy): Added for the recording plugin. 2005-08-12 * libvbi/Makefile.am (libvbi_la_SOURCES): Added exp-sub.c. * libvbi/export.c: Enabled caption/subtitle export modules. * libvbi/exp-sub.c: New caption/subtitle export module, added from libzvbi 0.3 branch. * plugins/teletext/export.c (on_menu_activate), src/zvbi.h, src/zvbi.c: Moved functions to create a GtkTable of vbi_export options from plugins/teletext/export.c to zvbi.c for reuse by recording plugin. Fixed config initialization. * src/zvbi.c (on_control_changed): Did not store the value of VBI export menu options in config. 2005-08-11 * src/fullscreen.c: Changed to use new subtitle routines. Subtitles no longer appear outside the video (but can be dragged there). * src/zvbi.c: Use GnomeVFS to read PES files. Tested with local raw and .gz files. Replaced RunBox macros by z_show_non_modal_message_dialog(). * src/properties.c (autoconnect_modify): Support gtk_combo_box. * src/v4linterface.c (z_switch_video_input): Disable subtitles on success. 2005-08-02 * src/zvbi.c (decoder_giofunc): Didn't handle errors passed through the vbi fifo. * plugins/mpeg/mpeg.c, plugins/screenshot/screenshot.c (screenshot_grab), plugins/deinterlace/main.c (start_thread1), src/zmisc.c (z_url_show, z_help_display, zmisc_switch_mode, zmisc_restore_previous_mode), src/zmisc.h, src/zvbi.c (on_vbi_prefs_changed), src/main.c (restore_last_capture_mode), src/cmd.c (py_quit, switch_mode), src/channel_editor.c (on_channel_search_clicked): Avoid duplicate or unnecessary error dialogs on display/capture mode change. 2005-07-30 * libvbi/exp-gfx.c (rgba_conv): Optimized. (vbi3_page_draw_caption_region_va_list): Store alpha channel depending on character opacity (used to be always 0xFF). (vbi3_page_draw_teletext_region_va_list): Store alpha channel depending on character opacity. * src/zvbi.c: Added Devices/VBI preferences. * src/main.c (startup_teletext), src/v4linterface.c (z_switch_standard): Functions to start/stop VBI capturing changed. 2005-07-29 * src/globals.c, src/globals.h, src/main.c (startup_zapping): Another plugin hack for subtitles. * zapping.schemas.in: Added subtitle options. * plugins/subtitle/view.c, plugins/subtitle/view.h: New file replacing the subtitle rendering routines in src/osd.c. GObject-ified the subtitle drawing area. Added support for page and URL hyperlinks on Teletext overlays. Made subtitles movable by dragging, but only as far as they remain visible, and new subtitles automatically move to become visible again. Made subtitles resizeable by dragging. Added rolling display of roll-up Closed Caption. Added options interpolation type, text brightness and contrast, CC padding, CC foreground and background color, rolling CC, Teletext default charset, shrink double height Teletext characters. Added a subtitle context menu to disable subtitles, reset size and position, open the preferences, override the character set of Teletext subtitles, select another language. Subtitles no longer scale horizontally, preserving the character aspect, unless the allocated space is too small. * plugins/subtitle/preferences.c, plugins/subtitle/preferences.h: New subtitle preferences. * plugins/subtitle/main.c, plugins/subtitle/main.h: New subtitle plugin interface. * plugins/subtitle/Makefile.am: New subtitle plugin. * plugins/Makefile.am (SUBDIRS): Added subtitle. * configure.in (AC_OUTPUT): Added plugins/subtitle/Makefile. * src/v4linterface.c (z_switch_standard): Temporarily closed but did not reopen VBI when the requested standard is already selected. Bug introduced in 0.9.6. * configure.in (AC_OUTPUT): Added zapping.desktop.in. * zapping.desktop.in, zapping.desktop.in.in: Renamed zapping.desktop.in to zapping.desktop.in.in for automatic insertion of the application version number. Added _Comment and X-GNOME-Bugzilla metadata. 2005-07-27 * configure.in (CHECK_SIMD): Added SSE3 check. * libtv/mmx/cpu.c: Added SSE3 detection. * plugins/deinterlace/test/README: Added sse3. * plugins/deinterlace/test/emulator.sh: Can't emulate sse3. * plugins/deinterlace/test/gen-md5sums.sh (builddir): Added sse3. * plugins/deinterlace/test/ditest.c (usage): Added --cpu sse3. * plugins/deinterlace/test/Makefile.am (TESTS, EXTRA_DIST): Added ditest-sse3.sh, md5sums-sse3. * plugins/deinterlace/test/ditest-sse3.sh, plugins/deinterlace/test/md5sums-sse3: Added. * plugins/deinterlace/DI_Misc/DI_TomsMoComp.c, plugins/deinterlace/DI_Misc/DI_MoComp2.c, plugins/deinterlace/DI_GreedyH/DI_GreedyH.c: Added support for SSE3 optimized versions. * plugins/deinterlace/DI_GreedyH/Makefile.am, plugins/deinterlace/DI_Misc/Makefile.am: Added SSE3 optimized targets. * plugins/deinterlace/windows.h: Removed obsolete inline asm code. Added SSE3 optimized functions. 2005-07-21 * plugins/teletext/view.c (teletext_view_vbi3_link_from_pointer_position): Removed duplicate safety checks. * src/osd.c: Replaced the caption/subtitle rendering code by a simpler version, with only one non-rectangular shaped window instead of one variable width window per row. 2005-07-20 * src/tveng25.c (set_tuner_frequency): No STREAMOFF before the first read(), don't restart streaming if we're read()ing. (enable_capture): No STREAMOFF before the first read(). (get_supported_pixfmt_set): Added work-around for ivtv driver which does not support ENUM_FMT and has broken TRY_FMT. * src/tveng25.c (set_tuner_frequency): No STREAMOFF before the first read(), don't restart streaming if we're read()ing. (enable_capture): No STREAMOFF before the first read(). (get_supported_pixfmt_set): Added work-around for ivtv driver which does not support ENUM_FMT and has broken TRY_FMT. 2005-07-16 * src/zvbi.c (destroy_threads): Attempted to destroy already destroyed resources, aborting the app with an invalid fifo error. * plugins/screenshot/screenshot.c (execute_command): Const fix. * src/tveng.c (store_cur_audio_input): Expect NULL input. * src/tveng25.c: Added xstrndup, xstrcmp to get rid of warnings due to __u8* strings in the v4l2 API. Added support for audio inputs. Added work-around for ivtv driver G|S_FMT bugs. Added support for read()ing images. 2005-07-15 * configure.in: Check if GCC has __builtin_popcount. Removed -pg workaround since we no longer use -masm=intel. (CHECK_SIMD): SSE2 DI_GreedyHM.c internal error fixed in GCC 4.0.1. * libtv/pixel_format.c (popcnt): Use __builtin_popcount if available. * src/zmisc.h (likely, unlikely): Fixed macro. * libtv/image_format.c, libtv/pixel_format.h, libtv/pixel_format.c: Added TV_PIXFMT_NV12. * src/csconvert.c: Added NV12-to-YUV420 converter for tests. 2005-07-14 * Release 0.9.6. 2005-07-14 * configure.in: Bumped version number to 0.9.6. 2005-07-13 * src/zmisc.c (zmisc_switch_mode), src/v4linterface.c (z_switch_video_input, z_switch_standard), src/fullscreen.c (stop_fullscreen, start_fullscreen), src/zapping.h (struct _Zapping): Remember display window for capture restart (black fullscreen bug). * src/tveng25.c (set_tuner_frequency): Test current frequency before stopping and restarting streaming. * src/v4linterface.c (z_switch_video_input): Test current video input before stopping and restarting capturing. Removed redundant tveng_start_capturing() call. (z_switch_standard): Test current standard before stopping and restarting capturing. Removed redundant tveng_start_capturing() call. 2005-07-12 * src/tveng.c (mixer_replace): Rewrote because it didn't work with audio-less tv cards (shutdown crash bug). * src/tveng.c (reset_video_volume): Sets video volume to maximum when we use the mixer, now 80% maximum to prevent whatsitsname. 2005-07-07 * Release 0.9.5. 2005-07-06 * de/po: Updated and merged in fixes from Debian Bug #313872. * src/tvengbktr.c (tvengbktr_close_device), src/zmisc.c (zmisc_stop): Properly reset the tveng device when switching out of Teletext mode ("Couldn't change video standard" et al). * src/tvengbktr.c (get_control_list): Mute control type s/int/bool. 2005-07-05 * test/simd-sse.sh, test/simd-sse2.sh, test/simd-mmx.sh, test/simd-altivec.sh, test/simd-3dnow.sh, test/memcpy-sse.sh, test/memcpy-mmx.sh, test/clear_image-sse.sh, test/clear_image-mmx.sh, plugins/deinterlace/test/gen-md5sums.sh, plugins/deinterlace/test/ditest-x86.sh, plugins/deinterlace/test/ditest-sse2.sh, plugins/deinterlace/test/ditest-sse.sh, plugins/deinterlace/test/ditest-scalar.sh, plugins/deinterlace/test/ditest-mmx.sh, plugins/deinterlace/test/ditest-altivec.sh, plugins/deinterlace/test/ditest-all.sh, plugins/deinterlace/test/ditest-3dnow.sh: s/source/./ for csh compatibility. * plugins/deinterlace/test/dicmp.c: Include unistd.h for BSD getopt(). * src/tvengbktr.c: tv_control API changed. 2005-07-04 * plugins/teletext/view.c (update_header, selection_get): Added missing vbi3_page_draw_teletext_region x y parameters. * src/mixer.c (startup_mixer), src/audio.c (devices_audio_kernel_open, devices_audio_mixer_open): Log OSS ioctls when --io-debug was given. * libtv/callback.c (tv_callback_remove_all, tv_callback_delete_all, tv_callback_unblock_all, tv_callback_block_all): Fixed matching of NULL callback parameters. * src/tveng.c (ccontrol_copy): Clear new control. Fixed callback redirection. (destroy_ccontrol): Fixed restoring of callbacks. * libtv/control.h, libtv/control.c (tv_control_dup): Removed unusual size parameter. 2005-06-30 * src/structpr_gen.pl: Didn't log VIDIOC_G|S_STD. 2005-06-29 * po/POTFILES.in: DI_MoComp2.c, DI_TomsMoComp.c moved into DI_Misc. * zapping/plugins/deinterlace/test/md5sums-altivec: New file containing MD5 checksums of the expected output of this implementation of each deinterlace method for make check. Empty until someone tests this code on PPC. 2005-06-28 * src/tveng.c (mixer_line_destroy_cb): Dereferenced uninitialized tv_control pointer. * src/properties-handler.c: set_toggle() unused, removed. * src/tveng.c (tveng_attach_device), src/video_xv.c (image_new), zapping_setup_fb/zapping_setup_fb.c (main), src/main.c (main): Fixed printf %d/%u format mismatch with long int argument. * src/zimage.c (startup_zimage), src/zapping.c (instance_finalize), plugins/teletext/view.c, src/main.c (main), libvbi/network.c (cni_lookup), plugins/deinterlace/main.c (start_thread1): Tweaked to avoid compiler warnings. * plugins/deinterlace/preferences.c: attach_field_balance() unused, removed. * libtv/misc.h (printv): Moved extern declaration to avoid a pointless compiler warning. * libvbi/exp-gfx.c (export_png): Isolated the nested do_write function. png_destroy_write_struct() wasn't called on error. Fixed transparent background color of caption pages (not used yet). (vbi3_page_draw_teletext_region_va_list): Replaced ints referring to memory sizes to longs for proper operation on LP64 systems. 2005-06-27 * zapping/plugins/deinterlace/test/ditest-x86.sh: New script to compare the output of different implementations of each deinterlace method. * zapping/plugins/deinterlace/test/ditest-3dnow.sh, zapping/plugins/deinterlace/test/ditest-altivec.sh, zapping/plugins/deinterlace/test/ditest-mmx.sh, zapping/plugins/deinterlace/test/ditest-scalar.sh, zapping/plugins/deinterlace/test/ditest-sse2.sh, zapping/plugins/deinterlace/test/ditest-sse.sh: New make check script to ditest a particular implementation of all deinterlace methods, with SIMD emulator if necessary. * zapping/plugins/deinterlace/test/md5sums-3dnow, zapping/plugins/deinterlace/test/md5sums-mmx, zapping/plugins/deinterlace/test/md5sums-scalar, zapping/plugins/deinterlace/test/md5sums-sse, zapping/plugins/deinterlace/test/md5sums-sse2: New file containing MD5 checksums of the expected output of this implementation of each deinterlace method for make check. * zapping/plugins/deinterlace/test/gen-md5sums.sh: New script to generate MD5 checksums of the expected output of each implementation of each deinterlace method, using a SIMD emulator if necessary, for make check. * zapping/plugins/deinterlace/test/emulator.sh: New shell helper function to find a CPU emulator if the required SIMD extension isn't supported, for various tests. * zapping/plugins/deinterlace/test/ditest-all.sh: New shell helper function to repeat a ditest run with all deinterlace methods. * zapping/plugins/deinterlace/test/guard.h: New miniature built-in efence for ditest (make check). Copy of test/guard.h. * plugins/deinterlace/test/dicmp.c: Extended for additional and automated tests. * plugins/deinterlace/test/cpudt.c, plugins/deinterlace/test/dicmp.c: Moved here from plugins/deinterlace for make check. * zapping/plugins/deinterlace/test/Makefile.am: New file for deinterlace plugin make check. * zapping/plugins/deinterlace/test/README: New file. * plugins/deinterlace/DI_GreedyH/DI_GreedyDeLoop.asm, plugins/deinterlace/DI_GreedyH/DI_GreedyH.asm, plugins/deinterlace/DI_GreedyH/DI_GreedyHF.asm, plugins/deinterlace/DI_GreedyH/DI_GreedyHM2.h, plugins/deinterlace/DI_GreedyH/DI_GreedyHM_NV.c, plugins/deinterlace/DI_GreedyH/DI_GrUpdtFS.asm, plugins/deinterlace/DI_GreedyH/DScalerCalls.c: Obsoleted by conversion to vector intrinsics, removed. * plugins/deinterlace/DI_GreedyH/DI_GreedyHM_V.c, plugins/deinterlace/DI_GreedyH/DI_GreedyHMPulldown.c, plugins/deinterlace/DI_GreedyH/DI_GreedyHM.h, plugins/deinterlace/DI_GreedyH/DI_GreedyHM.c, plugins/deinterlace/DI_GreedyH/DI_GreedyH.c, plugins/deinterlace/DI_GreedyH/DI_GreedyHF.c: Converted to vector intrinsics. Added support for 3DNow, SSE2, x86-64 and AltiVec. Removed ununsed DScaler code. Cleaned up. All options work now. * plugins/deinterlace/DI_GreedyH/Makefile.am: Rewrote along plugins/deinterlace/DI_Misc/Makefile.am as this code has been converted to vector intrinsics as well. * plugins/deinterlace/DI_Misc/DI_TwoFrame.c: AltiVec compile fixes. * plugins/deinterlace/DI_Misc/DI_TomsMoComp.c: New file integrating all the code formerly in plugins/deinterlace/DI_TomsMoComp. Converted the MMX inline asm to vector intrinsics. Added support for 3DNow, SSE2, x86-64 and AltiVec. Cleaned up. All options work now. * plugins/deinterlace/DI_Misc/DI_MoComp2.c: New file integrating all the code formerly in plugins/deinterlace/DI_MoComp2. Converted the MMX inline asm to vector intrinsics. Added support for 3DNow, SSE2, x86-64 and AltiVec. Cleaned up. * plugins/deinterlace/DI_Misc/DI_VideoWeave.c, plugins/deinterlace/DI_Misc/DI_VideoBob.c, plugins/deinterlace/DI_Misc/DI_TwoFrame.c, plugins/deinterlace/DI_Misc/DI_OldGame.c, plugins/deinterlace/DI_Misc/DI_BlendedClip.c, plugins/deinterlace/DI_Misc/DI_Adaptive.c, plugins/deinterlace/windows.h, plugins/deinterlace/DS_Deinterlace.h, plugins/deinterlace/DS_ApiCommon.h: Replaced longs by ints for proper operation on LP64 machines. Code assumes option values cast to int. * plugins/deinterlace/DI_Misc/DI_Greedy2Frame.c: Upper limit of GreedyTwoFrameThreshold is 127, not 128. * plugins/deinterlace/DI_Misc/DI_Bob.c: Replaced inline asm by vector intrinsics. * plugins/deinterlace/DI_Misc/DI_Weave.c, plugins/deinterlace/DI_Misc/DI_ScalerBob.c, plugins/deinterlace/DI_Misc/DI_OddOnly.c, plugins/deinterlace/DI_Misc/DI_Bob.c, plugins/deinterlace/DI_Misc/DI_EvenOnly.c: Added support for x86-64, AltiVec and a scalar version. Cleaned up. * plugins/deinterlace/DI_Misc/DI_VideoWeave.c, plugins/deinterlace/DI_Misc/DI_VideoBob.c, plugins/deinterlace/DI_Misc/DI_TwoFrame.c, plugins/deinterlace/DI_Misc/DI_OldGame.c, plugins/deinterlace/DI_Misc/DI_Greedy2Frame.c, plugins/deinterlace/DI_Misc/DI_Greedy.c: Cleaned up. * plugins/deinterlace/DI_Misc/Makefile.am (SIMD_CFLAGS): Increased inline limits for TomsMoComp and MoComp2. simd.h switches changed. (libDI_Misc_la_CFLAGS): Removed -masm=intel as we no longer have any inline asm left over from DScaler. (libDI_Misc_la_SOURCES, SIMD_SOURCES): DI_Bob.c, DI_EvenOnly.c DI_OddOnly.c, DI_ScalerBob.c, DI_Weave.c are now SIMD_SOURCES. * plugins/deinterlace/DI_TomsMoComp, plugins/deinterlace/DI_MoComp2: Directory removed. This code is now in DI_Misc. * plugins/deinterlace/windows.h: Improved SIMD helpers, added new scalar and SIMD optimized copy line and load-shift functions for new scalar, MoComp2, TomsMoComp and GreedyH plugin implementations. * zapping.schemas.in: Added GreedyTestMode key. * plugins/deinterlace/DS_Deinterlace.h: Added DEINTERLACE_METHOD prototypes. * plugins/deinterlace/DS_Control.h: Removed unused DScaler code. * plugins/deinterlace/preferences.c (load_options): Skip hidden options, for GreedyTestMode. * plugins/deinterlace/main.c: Improved definition of SIMD consts. If DI_MAIN_HEIGHT_DIV is given (reducing the image height to test time consuming deinterlace methods on slow CPUs), process image bottom instead of top. (plugin_init): A SIMD CPU is no longer required. DScaler cpu_feature_flags no longer needed, removed. Added GreedyTestMode gconf key. * plugins/deinterlace/Makefile.am: Removed ditest and dicmp targets. These are now in test/. (SUBDIRS): DI_MoComp2, DI_TomsMoComp removed. This code is now in DI_Misc. Added test. (libdeinterlace_zapping_la_LIBADD): Removed DI_MoComp2/libDI_MoComp2.la, DI_TomsMoComp/libDI_TomsMoComp.la. * plugins/Makefile.am: Since the deinterlace plugin now has scalar functions too, always compile it. * libtv/cpu.h: Added CPU_FEATURE_SSE3 for simd.h. * libtv/simd.h: Improved and added new functions for MoComp2, TomsMoComp and GreedyH. * libvbi/export.c (vbi3_export_new): Cleared pointer, without NULL check, instead of vbi3_export struct after allocation. No asprintf when errstr is NULL. Patch #1188283 by Mako the Goldfish. * plugins/teletext/view.c: s/VBI3_41_COLUMNS/VBI3_PADDING. * libvbi/export.h (vbi3_export_stdio): vbi3_page* may be NULL. * libvbi/export.c (vbi3_export_info_enum): Didn't copy open_format. * libvbi/bcd.h, libvbi/teletext.c, libvbi/network.c, libvbi/teletext_decoder.c, libvbi/teletext_decoder.h, libvbi/teletext_decoder-priv.h, libvbi/teletext.c, libvbi/sampling_par.h, libvbi/page.h, libvbi/misc.h, libvbi/export.c, libvbi/export.h, libvbi/exp-vtx.c, libvbi/exp-txt.c, libvbi/exp-html.c, libvbi/exp-gfx.c, libvbi/exp-gfx.h, libvbi/event.c, libvbi/event-priv.h, libvbi/event.h, libvbi/cache.c, libvbi/cache.h: Resynced with libzvbi 0.3. * libvbi/Makefile.am (AM_CFLAGS): Compile with -DZAPPING8 to disable incomplete code. Removed such #defines in .c files. (INCLUDES): Added top_srcdir/common to remove common/ from #include paths. common/ doesn't exist in libzvbi source tree. * libtv/mmx/cpu.c (cpuid): x86-64 version didn't compile with older GCC. * libvbi/top_title.c, libvbi/search.c, libvbi/search.h, libvbi/sampling_par.h, libvbi/misc.c, libvbi/image_format.h, libvbi/hamm.h, libvbi/hamm.c, libvbi/conv.c, libvbi/conv.h, libvbi/cache.c, libtv/sse/copy_block.c, libtv/mmx/copy_block.c, libtv/mmx/clear_block.h, libtv/avec/clear_block.h, libtv/misc.h, libtv/image_format.c, libtv/image_format.h, libtv/clip_vector.c: Replaced ints referring to memory sizes to longs for proper operation on LP64 systems. * libvbi/macros.h (_vbi3_nonnull), libtv/macros.h (_tv_nonnull): This __attribute__ is not available before GCC 3.3. * libvbi/macros.h (_vbi3_alloc): This __attribute__ is not available before GCC 3.0. * src/tvengxv.c, src/tvengemu.c, src/tvengbktr.c, src/tveng25.c, src/tveng1.c, src/tveng_private.h, src/tveng.h, src/tveng.c: Replaced the code combining a soundcard volume and mute control with TV card controls by a layer of virtual controls. Moved the dead xv control code into video_xv.c, not yet integrated into the virtual control layer. Moved the control struct and methods into libtv/control.c/.h. Separated functions to access virtual and tv panel controls, and simplified various helper functions. * src/video_xv.c: Moved dead xv control code from tveng.c here, not used yet. * src/xawtv.c (set_control), src/v4linterface.c: Simplifications due to new virtual controls. * libtv/control.c, libtv/control.h: New files. tv_control struct and methods moved here from src/tveng.c, src/tveng.h. * libtv/Makefile.am (libtv_la_SOURCES): Added control.c, control.h. * test/clear_image-mmx.sh, test/clear_image-sse.sh, test/memcpy-mmx.sh, test/memcpy-sse.sh, test/simd-3dnow.sh, test/simd-altivec.sh, test/simd-mmx.sh, test/simd-sse2.sh, test/simd-sse.sh: New make check script to run this implementation of the test app, with emulator if necessary. * test/simd-emu.sh: Find a CPU emulator if the required SIMD extension isn't supported at make check time. * test/cpudt.c: New tool to determine which SIMD extensions are supported by our CPU during make check. From plugins/deinterlace. * test/README: New file. * test/simd.c: Fixed saturation macros. Improved definition of SIMD consts. (test): Added missing vsplat, vzero, vminus1, vor, vxor, vector shift, vadds, vsubs, vector compare, vector min/max checks. AltiVec compile fixes. (PASS, FAIL): Replaced vsplat by scalar code, giving more reliable results and working around a GCC vector initialization bug. * test/simd.c, test/memcpy.c, test/clear_image.c: Don't try all implementations, let the user choose one (and run the test app with emulator if necessary). * test/Makefile.am: Rewrote to make check SIMD code with emulator if necessary, as we do in the deinterlace plugin. * help/man/zapping.xml: Documented --cpu-features option. * src/main.c (main): Added --cpu-features option to override CPU detection for tests. * libtv/cpu.c, libtv/cpu.h: New function cpu_feature_set_from_string() for --cpu-features option and make check tools. * configure.in: Since the deinterlace plugin now has scalar functions too, list it as always available. (GCC_VERSION): Moved GCC version check into an AC_DEFUN. (CHECK_SIMD): Check for more SIMD-broken GCC versions. (AC_OUTPUT): Added plugins/deinterlace/test/Makefile. Removed DI_MoComp2 and DI_TomsMoComp, this code is now in DI_Misc. 2005-06-12 * libvbi/misc.h, src/zmisc.h, libvbi/dlist.h (is_member, rem_head), libvbi/bcd.c (vbi3_dec2bcd, vbi3_bcd2dec), libtv/misc.h, libtv/image_format.c (copy_block1_generic), libtv/avec/clear_block.h, libtv/sse/copy_block.c (copy_block1_sse_nt), libtv/mmx/copy_block.c (copy_block1_mmx), libtv/mmx/clear_block.h: Replaced __builtin_expect() by more readable likely()/unlikely() macros. Thanks to Linux hackers for the idea. 2005-06-01 * zapping_setup_fb/Makefile.am (install-binPROGRAMS), (uninstall-binPROGRAMS): Replaced hard-coded path /etc by $(sysconfdir). This follows GNU standards as recommended in automake.info, permits non-root installs and proper make distcheck. NOTE the default $(sysconfdir) is $(prefix)/etc, so root installation now requires ./configure --sysconfdir=/etc. * libvbi/teletext.c (level_one_row): Corrected 2004-11-08 wide_char fix. * libvbi/exp-gfx.c (DRAW_CHAR): Reverted incorrect 2004-11-08 double width character bpl fix. * plugins/deinterlace/DI_MoComp2/SearchLoopBottom.inc, plugins/deinterlace/DI_MoComp2/MoComp2.h, plugins/deinterlace/DI_MoComp2/DI_MoComp2.c, plugins/deinterlace/DI_TomsMoComp/SearchLoopBottom.inc, plugins/deinterlace/DI_TomsMoComp/DI_TomsMoComp.c, plugins/deinterlace/DI_TomsMoComp/TomsMoComp.h: Changed SIMD constants from static const to global const due to optimization problems with gcc 4.1. 2005-05-04 * src/yuv2rgb.c: Didn't compile on x86-64 because it references asm routines we cannot and did not compile on x86-64. 2005-05-02 * src/tveng_private.h: New capture interface method set_buffers(). * src/tveng25.c: Modified to negotiate the number of capture buffers before enable_capture(). * src/tveng.c, src/tveng.h: Added tv_set_buffers(), tv_get_buffers() to negotiate the number of capture buffers. * src/capture.c (capture_start): Changed to request N_BUNDLES, ie. eight buffers, accept four, and fall back to using the capture thread if less. See also zapping-misc 2005-04-24. 2005-04-22 * src/zvbi.c (on_vbi_prefs_changed, on_vbi_device_changed), src/properties-handler.c (vbi_general_setup, vbi_general_apply). src/main.c (startup_teletext), src/globals.c, src/globals.h: Added shadow VBI switch to disable VBI on startup errors or --no-vbi for the current session. * configure.in: Bumped version number to 0.9.5. * configure.in: Users were confused when Zapping compiled without libzvbi, now configure fails when the library isn't present unless --without-zvbi was given. 2005-04-21 * Release 0.9.4. 2005-04-21 * src/tveng1.c (get_video_standard_list): Did not list additional bttv video standards (zapping-misc 2005-04-15). (p_tveng1_open_device_file): snprintf no good to copy string, replaced by z_strlcpy. * plugins/deinterlace/DI_TomsMoComp/TomsMoCompAll.inc, plugins/deinterlace/DI_TomsMoComp/TomsMoComp.h: Used SearchEffort value of MoComp2. Renamed it to SearchEffort2. * plugins/deinterlace/DI_Misc/Makefile.am (SIMD_CFLAGS): Add --param switches only if supported by gcc (compile bug reported by Christian). * src/plugins.c (plugin_init), src/main.c (startup_zapping), plugins/teletext/main.c (plugin_init), plugins/screenshot/screenshot.c (plugin_init, plugin_load_config), plugins/mpeg/mpeg.c (plugin_init, plugin_load_config), plugins/deinterlace/main.c (plugin_init): Added plugin initialization tracing printfs. * libtv/avec/cpu.c (sigill_handler): Suppress unused parameter warning. * src/plugin_common.h (PLUGIN_PROTOCOL): Changed to 0x904 for tests. * configure.in: Bumped version number to 0.9.4. Quoted underquoted AC_DEFUN function names (automake 1.9 complaint). Added check for gcc --param inline-unit-growth, used in DI_Misc/Makefile.am. 2005-04-05 * Release 0.9.3. 2005-04-04 * README, NEWS: Updated for 0.9.3. * src/mixer.c (shutdown_mixer): Detach mixer line in case startup_mixer() restart fails. 2005-03-30 * test/simd.c: Added to check libtv/simd.h macros. * test/Makefile.am (TESTS): Added simd. 2005-03-18 * common/structpr_gen.pl: VPATH include fix. device.h is in common. * src/tveng1.c (dequeue_xbuffer, read_frame): Didn't return buffer sample time. 2005-03-13 * src/zvbi.c (init_threads): Changed #if to if(), to catch bktr compile errors early. * src/v4linterface.c: On FreeBSD (bktr) the initial video standard is NTSC. Restoring the last standard to PAL didn't work because apparently the radio menu item "activate" signal called twice for the new and old standard, tv_setting PAL then NTSC again. * src/tvengbktr.c: With Teletext in main window, input and channel changes were blocked because video capturing was on. Changed capture_mode from NONE to TELETEXT (i.e. capturing video to make Teletext work, a bug work-around). (get_standard_list): Remember a PAL standard to choose when video capturing in Teletext mode. (get_signal_strength): Did not set afc return value. * src/zmisc.c (zmisc_switch_mode), src/v4linterface.h, src/v4linterface.c (zconf_get_sources, zconf_set_sources), src/main.c (restore_controls, shutdown_zapping): Moved code to save and restore current video standard, video and audio input at startup/shutdown and zmisc_switch_mode() to common functions zconf_set_sources() and zconf_get_sources(). * plugins/deinterlace/DI_Misc/Makefile.am: Rewrote to compile (almost) all MMX code as MMX, 3DNow, SSE, SSE2 (x86 and x86-64), and AltiVec vector intrinsics. * plugins/deinterlace/DI_Misc/DI_VideoWeave.c, plugins/deinterlace/DI_Misc/DI_VideoBob.c, plugins/deinterlace/DI_Misc/DI_TwoFrame.c, plugins/deinterlace/DI_Misc/DI_OldGame.c, plugins/deinterlace/DI_Misc/DI_Greedy2Frame.c, plugins/deinterlace/DI_Misc/DI_Greedy.c: Integrated and converted the MMX code to vector intrinsics. * plugins/deinterlace/DI_Misc/DI_VideoWeave.asm, plugins/deinterlace/DI_Misc/DI_VideoBob.asm, plugins/deinterlace/DI_Misc/DI_TwoFrame.asm, plugins/deinterlace/DI_Misc/DI_OldGame.asm, plugins/deinterlace/DI_Misc/DI_Greedy2Frame.asm, plugins/deinterlace/DI_Misc/DI_Greedy.asm: MMX code integrated into respective .c file, this file is no longer needed. * plugins/deinterlace/windows.h: Added some SIMD macros to save typing in Di_Misc. * libtv/Makefile.am (libtv_la_SOURCES): Added simd.h. * libtv/simd.h: New file. Some macros to simplify coding with vector intrinsics. * plugins/deinterlace/main.c, plugins/deinterlace/ditest.c: Define constants needed by new DI_Misc SIMD code. * plugins/deinterlace/DS_Deinterlace.h (_DEINTERLACE_METHOD), plugins/deinterlace/DS_ApiCommon.h: Constness fixes. * plugins/Makefile.am: Distinguish between SSE2 asm and SSE2 intrinsics availability for deinterlacing. * configure.in (CHECK_SIMD): Rewrote SIMD check to recognize broken gcc 4.0 SSE2 implementation. * plugins/mpeg/mpeg.c (video_unref): Added work-around for a librte bug causing an assert (c->dequeued == 0) when stopping mp1e video recording. * src/capture.c (change_capture_format): Segfaulted when current capture format was set but no pixel_format. 2005-03-06 * plugins/deinterlace/DS_ApiCommon.h (MEMCPY_FUNC): Source is const pointer. 2005-03-04 * plugins/deinterlace/DI_Misc/DI_TwoFrame.asm, plugins/deinterlace/DI_Misc/DI_Greedy2Frame.asm: Segfault because used esp register which isn't available when compiling with -fomit-frame-pointer. 2005-03-03 * src/zmisc.c (zmisc_switch_mode): Tried to restore old video input and standard which isn't longer possible if capture mode is active. Didn't restore audio input. * configure.in: Bumped version number to 0.9.3. 2005-02-28 * Release 0.9.2. 2005-02-27 * src/zmisc.c (zmisc_stop): Didn't work right. * src/capture.c (change_capture_format): Start capturing only when it was active before, so we can request formats before starting. * src/capture.c (capture_stop, capture_start): Don't use the capture queue when a REQ_CONTINUOUS format has been requested (i.e. we're recording). Works a problem in plugins/mpeg/mpeg.c. * plugins/mpeg/mpeg.c (do_start): Must restart capturing because recording doesn't work with a capture queue yet. Symptom: hangs when recording is stopped. * plugins/mpeg/mpeg.c (plugin_capture_stop): Do not close the recording dialog on capture stop. 2005-02-26 * help/C/zapping.xml: Improved overlay explanation. * Makefile.am: s/srcdir/top_builddir in zapping.schemas install rule. * libtv/avec/Makefile.am: Changed to LTLIBRARIES. 2005-02-25 * src/v4linterface.c (z_switch_video_input, z_switch_standard): Didn't report the cause when capture_stop() failed (e.g. recording is in progress). * src/tveng.h, src/tveng.c: Added tv_set_errstr() and tv_get_debug_level() and rewrote tv_error_msg() macro to make it usable outside tveng code. * src/capture.h: Added REQ_CONTINUOUS flag to prevent capturing interruptions. * src/capture.c (buffer_done): Don't re-enqueue buffers after capturing stopped, the pointers are no longer valid. (capture_stop): Changed do-not-stop condition from REQ_SIZE to new REQ_CONTINUOUS. Prevented capture and display mode change with active deinterlacing, bug #1145094. Leave error message if we cannot stop, bug #1145094. (request_capture_format): Print new REQ_CONTINUOUS flag. * zapping_setup_fb/Makefile.am (zapping_setup_fb_LDADD): libtv is now a LTLIBRARY. * zapping_setup_fb/zapping_setup_fb.h, zapping_setup_fb/zapping_setup_fb.c, zapping_setup_fb/v4l25.c, zapping_setup_fb/v4l2.c, zapping_setup_fb/v4l.c, zapping_setup_fb/Makefile.am: Includes cleaned. * test/memcpy.c, test/clear_image.c: Cannot include src/cpu.c anymore, changed to libtv/cpu.h. * test/Makefile.am: libtv is now a LTLIBRARY. * src/Makefile.am: libtv is now a LTLIBRARY. (zapping_SOURCES): Removed cpu.c, cpu.h. * po/POTFILES.in: Added zapping.schemas.in. * plugins/mpeg/mpeg.c (do_start): Added request_capture_format() flag REQ_CONTINUOUS (don't interrupt capturing). * libtv/mmx/mmx.h: Added cpu_detection_mmx() proto. * libtv/mmx/Makefile.am (libmmx_la_SOURCES): Added cpu.c. * libtv/mmx/cpu.c: x86 SIMD detection from src/cpu.c moved here. Added a x86-64 version of the cpuid function. * libtv/avec/avec.h: Added cpu_detection_altivec() proto. * libtv/avec/Makefile.am (libavec_a_SOURCES): Added cpu.c. * libtv/avec/cpu.c: AltiVec detection from src/cpu.c moved here because "as" doesn't recognize avec instructions without -maltivec. * src/yuv2rgb.c, src/main.c, plugins/deinterlace/main.c, libtv/image_format.c: src/cpu.h renamed to libtv/cpu.h. * libtv/Makefile.am, libtv/mmx/Makefile.am, libtv/sse/Makefile.am, libtv/avec/Makefile.am: Changed to LTLIBRARIES because merging libs didn't work well with plain old archives and libtv will become a LTLIB anyway. Simplified SIMD conditionals. (libtv_la_SOURCES): Added cpu.c, cpu.h. * src/cpu.c, src/cpu.h, libtv/cpu.c, libtv/cpu.h: cpu.c|h moved from src to libtv because AltiVec detection must build in avec dir with -maltivec flag and cpu detection belongs in libtv anyway. * zapping.schemas, zapping.schemas.in: Renamed to zapping.schemas to zapping.schemas.in. zapping.schemas is now a built file, removed from CVS. Improved key descriptions in zapping.schemas.in. * Makefile.am: Localize and install zapping.schemas (INTLTOOL_SCHEMAS_RULE). 2005-02-22 * help/man/zapping_remote.1: Added to CVS. * help/man/Makefile.am: Fixed BUILD_MANS fix. * src/cpu.c (HAVE_ALTIVEC): Missing signal.h and sigjmp.h includes. * configure.in: Bumped version number to 0.9.2. Added man page rebuild option for automated test builds with/without the required XML files. 2005-02-20 * Release 0.9.1. 2005-02-19 * configure.in: Bumped version number to 0.9.1. * help/xmldocs.make (uninstall-local-doc), help/omf.make (uninstall-local-omf): Missing DESTDIR prefix. * help/C/Makefile.am: Missing DISTCLEANFILES. * Makefile.am: Make distuninstallcheck shall ignore files left by scrollkeeper, make distcleancheck shall ignore site_def.h. Added missing DISTCLEANFILES. * help/C/zapzilla.xml: s/ˆ/Eacute. 2005-02-18 * po/fr.po: Updated by Christian Marillat. * help/Makefile.am: Added recursive xmlcheck target. * help/man/Makefile.am: Didn't work with !BUILD_MANS. (xmlcheck): Added to check man pages. * help/C/Makefile.am (xmlcheck): Updated. * help/C/zapping.xml: Updated appversion, manrevision, date. Various improvements. * help/C/settings.xml: s/&/&, s/—/×. 2005-02-17 * libtv/sse/sse.c (clear_block_mmx_nt), libtv/mmx/mmx.c (clear_block_mmx): Two byte version not needed. * libvbi/misc.h: Removed byte order macro check, will use config.h. * libtv/image_format.c (clear_block3), libtv/avec/clear_block.h (3): Use native endian value instead of LE for clarity. (tv_clear_image): Missing Altivec runtime test. * libtv/image_format.c (SWAB16, SWAB32): * libvbi/exp-gfx.c (RGBA_CONV4, RGBA_CONV2): * src/tveng1.c (palette_to_pixfmt), src/tveng.c (pig_depth_to_pixfmt), zapping_setup_fb/v4l25.c (setup_v4l25): Replaced #if by switch to enable compiler checks of big and little endian code. * zapping_setup_fb/v4l25.c (setup_v4l25): Fixed pf.bits_per_pixel big endian build bug. 2005-02-15 * Release 0.9. 2005-02-14 * Makefile.am (EXTRA_DIST): Added ChangeLog.01, ChangeLog.03. * ChangeLog: Split to speed up cvs commits. * src/main.c (main): shutdown_remote() moved here to fix quit menu crash (indirectly finalized Python from py_quit function). * src/v4linterface.c: s/t_assert/g_assert. (select_cur_video_standard_item, select_cur_audio_input_item, select_cur_video_input_item): Fixed menu item activation. * src/tvengxv.c, src/tvengemu.c, src/tvengbktr.c, src/tveng25.c, src/tveng1.c, src/tveng.c, src/mixer.c, src/tveng.h: Replaced t_assert by libc assert. * src/tveng.h (tv_error_msg): Missing line feed. * src/tveng.c (tveng_attach_device): In device info dump print audio inputs, current video standard, video input, audio input, tuner frequency. * zapping.schemas: Added missing plugins/deinterlace/resolution, window/keep_on_top. * src/x11stuff.c (x11_screensaver_set, x11_screensaver_init): Changed kscreensaver command syntax for POSIX.2 sh compat. * test/guard.h: Rewrote for FreeBSD compat. 2005-02-12 * plugins/mpeg/mpeg.c (do_start): Incorrect zmisc_switch_mode() error check. * src/zmisc.c (zmisc_switch_mode), src/fullscreen.c (start_fullscreen): Incorrect capture_stop() error check. * src/tvengxv.c (get_video_standard_list): Match video standard names loosely (case insensitive, alnum only). * src/tvengxv.c (get_video_input_list): Load current tuner frequency into video_input. * src/audio.c, src/esd.c, configure.in: Compile ESD backend only if libesd is present. * plugins/deinterlace/ditest.c (main, write_buffer): s/ssize_t/size_t fread/fwrite return type. * libvbi/search.h: Missing include stdarg.h for va_list. 2005-02-10 * src/properties-handler.c, src/overlay.c, src/interface.c: Removed unneeded #include. * glade/zapping.glade2: Made video device notebook tabs (inputs) scrollable to reduce page width. * help/man/zapping_remote.xml: Added. * help/man/Makefile.am (man_MANS): Added zapping_remote.1. * src/tvengxv.c (split_encoding): Handle malformed (pal-m-composite etc) encodings. * src/tveng.c (store_cur_video_standard): Don't assert on std != NULL. * libtv/image_format.c, libtv/Makefile.am (INCLUDES): Enabled untested SIMD routines for tests. * test/clear_image.c (main): Added altivec check. * test/memcpy.c (main): Added altivec check. * src/cpu.h (CPU_FEATURE_ALTIVEC): Missing #define. * src/cpu.c: Replaced #if #cpu by plain #ifdef. * configure.in: Added AC_DEFINE HAVE_X86 for src/cpu.c. * src/tveng.c (append_video_standard): Disabled videostd set collision warning, is normal with saa7134. 2005-02-06 * test/Makefile.am (INCLUDES): Include top_srcdir. * test/clear_image.c: Out of date wrt tv_pixel_format. * libtv/image_format.c (tv_clear_image altivec path) zapping_setup_fb/v4l.c (setup_v4l): Used bytes_per_line instead of bytes_per_line[0]. 2005-02-05 * autogen.sh: Prepared for autoconf/make version test. * po/POTFILES.in: Missing deinterlace plugin files. * plugins/deinterlace/DI_TomsMoComp/DI_TomsMoComp.c, plugins/deinterlace/DI_MoComp2/DI_MoComp2.c, plugins/deinterlace/DI_Misc/DI_Weave.c, plugins/deinterlace/DI_Misc/DI_VideoWeave.c, plugins/deinterlace/DI_Misc/DI_VideoBob.c, plugins/deinterlace/DI_Misc/DI_TwoFrame.c, plugins/deinterlace/DI_Misc/DI_ScalerBob.c, plugins/deinterlace/DI_Misc/DI_OldGame.c, plugins/deinterlace/DI_Misc/DI_OddOnly.c, plugins/deinterlace/DI_Misc/DI_Greedy2Frame.c, plugins/deinterlace/DI_Misc/DI_Greedy.c, plugins/deinterlace/DI_Misc/DI_EvenOnly.c, plugins/deinterlace/DI_Misc/DI_Bob.c, plugins/deinterlace/DI_Misc/DI_BlendedClip.c, plugins/deinterlace/DI_Misc/DI_Adaptive.c, plugins/deinterlace/DI_GreedyH/DI_GreedyH.c: Completed l18n. * plugins/deinterlace/DI_TomsMoComp/TomsMoCompAll.inc: UseStrangeBob disabled, functions use pavgb without capability check and look buggy. * plugins/deinterlace/DI_GreedyH/DScalerCalls.c (InitDScaler): GreedyUseVertFilter is undefined. * plugins/deinterlace/preferences.c (on_method_changed, attach_method_combo): Fixed method enumeration. * plugins/deinterlace/main.c (properties_add): Restored help link. (plugin_init): OldGame temporarily disabled, needs CombFactor. * help/C/settings.xml: Added deinterlace plugin documentation. 2005-01-30 * src/video_gdkrgb.c (image_put), src/tvengbktr.c (set_overlay_window), zapping_setup_fb/v4l25.c (setup_v4l25), zapping_setup_fb/v4l.c (setup_v4l): Used bytes_per_line instead of bytes_per_line[0]. * zapping_setup_fb/zapping_setup_fb.c (main): printf type mismatch. * src/capture.c (request_capture_format): Possibly uninitialized return value. * src/x11stuff.c (xv_adaptor_dump), libvbi/teletext.c (top_navigation_bar_style_1), libvbi/event.c (_vbi3_event_handler_list_remove): Uninitialized variable. * plugins/deinterlace/DI_MoComp2/DI_MoComp2.c, plugins/deinterlace/windows.h: Don't define size_t or we run into conflicts with system headers. * libtv/image_format.c (tv_copy_image): NULL check correction. * src/zvbi.c: Open and close ttx_pipe as needed. (decoder_giofunc): Blocked on capture error. Now aborts when error/eof propagates through ttx_pipe. * src/tvengxv.c, src/tvengemu.c, src/tvengbktr.c, src/tveng25.c: Replaced t_error_msg() by tv_error_msg(). * src/tveng1.c: Rewrote buffering routines to stack up empty buffers and prepared for out of order buffer queuing. Replaced t_error_msg() by tv_error_msg(). * src/tveng.h (t_error_msg): Removed the ugly thing. (t_error): Replaced t_error_msg() by tv_error_msg(). * src/tveng.c: Replaced t_error_msg() by tv_error_msg(). (validate_overlay_buffer): Compared bytes_per_line instead of bytes_per_line[0], always failing, disabling overlay. * plugins/teletext/view.c: s/0/VBI3_END. * plugins/teletext/search.c (idle): Missing sentinel in vbi3_search_next call. * src/zconf.c (zconf_init), src/v4linterface.c (z_switch_channel), src/plugins.c, src/osd.c (py_osd_render), src/cmd.c (switch_mode), plugins/screenshot/screenshot.c (screenshot_save, screenshot_timeout): Used message as printf-like template. Replaced by %s string. * libvbi/teletext_decoder.c (mip_page_stat): Parameter sign fix. (vbi3_teletext_decoder_reset): Missing NULL check. * libvbi/search.c (vbi3_search_utf8_new): Abort on NULL pattern. * libvbi/misc.c (_vbi3_asprintf): Sign fix. * libvbi/link.c (vbi3_link_copy): NULL check correction. * libvbi/hamm.c (_vbi3_hamm8_inv): s/0xff/-1 to get rid of warning. * libvbi/export.c (vbi3_export_option_menu_get, vbi3_export_option_menu_set, vbi3_export_option_get, vbi3_export_option_set): Abort on NULL keyword. * libvbi/exp-gfx.c (vbi3_page_draw_caption_region_va_list, vbi3_page_draw_teletext_region_va_list): Missing NULL checks. * libvbi/event.c (_vbi3_event_name): Missing default case. * libvbi/conv.c (vbi3_iconv_ucs2_close): Invalid pointer check. (vbi3_iconv_ucs2_open, vbi3_iconv_ucs2, vbi3_iconv_unicode, strdup_iconv, _vbi3_strdup_locale_ucs2, _vbi3_strdup_locale_teletext): Missing NULL checks. * libvbi/cache.c (vbi3_cache_remove_event_handler, vbi3_cache_add_event_handler): assert !NULL. * libvbi/macros.h (VBI3_END): Added to take advantage of gcc 4 sentinel attribute in variadic format_options, export_options. * libtv/screen.h, libtv/pixel_format.h, libtv/macros.h, libtv/image_format.h, libtv/clip_vector.h, libtv/callback.h, libvbi/top_title.h, libvbi/teletext_decoder.h, libvbi/search.h, libvbi/sampling_par.h, libvbi/pdc.h, libvbi/page.h, libvbi/packet-830.h, libvbi/network.h, libvbi/macros.h, libvbi/link.h, libvbi/lang.h, libvbi/image_format.h, libvbi/hamm.h, libvbi/export.h, libvbi/exp-txt.h, libvbi/exp-gfx.h, libvbi/conv.h, libvbi/cache.h, libvbi/bcd.h: Updated function attributes. 2005-01-27 * plugins/deinterlace/Makefile.am, plugins/deinterlace/DI_GreedyH/Makefile.am, plugins/deinterlace/DI_Misc/Makefile.am, plugins/deinterlace/DI_MoComp2/Makefile.am, plugins/deinterlace/DI_TomsMoComp/Makefile.am: Added files missing in distribution. * src/zvbi.c: Define vbi_dvb_demux only if we have old libzvbi. * src/tvengbktr.c: Updated. * src/tveng25.c: Choose fprint_ioctl function at runtime. (dequeue_buffer, flush_buffers): EINTR check is redundant. * src/tveng1.c (p_tveng1_dequeue): Must bypass device_ioctl() to get EINTR for timeout. Didn't help the videostd bug though. * libvbi/Makefile.am (wstfont2.xbm): Don't rebuild fontgen if wstfont2.xbm is up to date. * libvbi/search.c (vbi3_search_next_va_list, vbi3_search_next): Const parameter fix in replacement funcs. * libvbi/fontgen.c (pbm_read): s/ssize_t/size_t fread return type. * libvbi/teletext_decoder.c (vbi3_teletext_decoder_get_network): Fixed. 2005-01-26 * Makefile.am (SUBDIRS): Added test. * libvbi/teletext.c (vbi3_page_get_teletext_link): Fixed index check. * libvbi/teletext_decoder.c (decode_packet_0): Discard regular pages with non-bcd subno, these are probably defective. (decode_packet_0): Parallel transmission fix fixed. * plugins/teletext/view.c (teletext_view_vbi3_link_from_pointer_position): Fully initialize link, just in case. (home_action): Expect vbi3_page_get_home_link failure. * plugins/teletext/main.c (ttxview_popup_menu_new): vbi3_link_destroy() crashed on teletext_view_vbi3_link_from_pointer_position() failure. 2005-01-22 * libvbi/hamm.h (vbi3_unham8): Must return signed int. 2005-01-20 * src/tveng25.c: Removed bayer hack, bayer is now a first class format. * src/capture.c (rebuild_buffer): Fixed to handle cases where available capture formats do not intersect with requested formats. * src/capture.c (change_capture_format): Always restart capturing, for now. * src/tveng1.c (set_capture_format): Try common capture sizes on failure, helps pwc driver. 2005-01-19 * plugins/deinterlace/DI_TomsMoComp/TomsMoComp.h, plugins/deinterlace/DI_MoComp2/MoComp2.h: Don't include malloc.h, makes problems with gcc 4.0 and is obsolete and unneeded anyway. * plugins/mpeg/mpeg.c (pref_rebuild_configs): Nested func declaration fix for gcc 4.0. * plugins/deinterlace/windows.h: Added _m_int(). * plugins/deinterlace/DI_GreedyH/DI_GreedyHMPulldown.c (PullDown_VSharp2, PullDown_VSoft2), plugins/deinterlace/DI_GreedyH/DI_GreedyHF.asm: QWORD PTR fix, bug #1102718. * src/csconvert.c, libtv/pixel_format.c (tv_pixfmt_name, pixel_formats), libtv/image_format.c (tv_clear_image), libtv/pixel_format.h: Added SBBGR, Bayer conversion to get rid of tveng25 hack. 2005-01-18 * src/tveng1.c (p_tveng1_dequeue): Timeout fix. * plugins/deinterlace/DI_TomsMoComp/Makefile.am (INCLUDES): * plugins/deinterlace/DI_MoComp2/Makefile.am (INCLUDES): * plugins/deinterlace/DI_Misc/Makefile.am (INCLUDES): * plugins/deinterlace/DI_GreedyH/Makefile.am (INCLUDES): VPATH fix. * src, plugins/teletext, plugins/mpeg/mpeg.h, libvbi, libtv/misc.h, common/intl-priv.h, common/fifo.c: Include config.h correction. * libvbi/teletext_decoder.c, libvbi/teletext.c, libvbi/search.c, libvbi/packet-830.c, libvbi/misc.h (vbi3_printable), libvbi/hamm.h, libvbi/hamm.c, libvbi/fontgen.c (xbm_write): hamm.c synchronized with libzvbi 0.2.12. * libvbi/Makefile.am (EXTRA_DIST): s/fontgen/fontgen.c - what did I smoke?? (CLEANFILES): Added fontgen. * libvbi/Makefile.am, libtv/sse/Makefile.am, libtv/mmx/Makefile.am, libtv/avec/Makefile.am (INCLUDES): Need top_srcdir for config.h. * libtv/screen.c (dga_query): Succeed without xf86dga, bug #1064597. 2005-01-15 * plugins/screenshot/screenshot.c (ov511_grab_button_timeout, screenshot_apply): Nested func declaration fix for gcc 4.0, Debian bug #288749. * libvbi/exp-gfx.c (export_png): Nested func fix for gcc 4.0, Debian bug #288749. 2005-01-10 * plugins/screenshot/screenshot.glade2: Added full size grab option. * plugins/screenshot/screenshot.c (screenshot_setup, screenshot_apply): Added full size grab option. (screenshot_grab): Optionally switch to full image size before capturing an image. * zapping.schemas: Added plugins/screenshot/full_size. 2005-01-08 * src/capture.h, src/capture.c: Rewrote the capture format negotiation routines. Now clients can pass a set of suitable pixel formats. That makes on the fly changes a lot easier, badly needed by the deinterlace plugin, and allows more efficient buffer management. (rebuild_buffer): Optimized to avoid reallocation of buffers with usable size and pixfmt after release_capture_format(). (capture_source_dispatch): Replaced hardcoded field balance by gconf value, auto applies. Made the function video standard agnostic. * src/video_gdkrgb.c, src/video_mem.c, src/video_x11.c, src/video_xv.c, src/zimage.c, src/zimage.h: Replaced suggest_format interface by supported pixel formats report. * src/zgconf.c, src/zgconf.h: Added z_gconf_float_spinslider_new() for deinterlace/field_balance. * src/zimage.c: (video_uninit): release_capture_format(). (video_init): request_capture_format() for display moved here from video_suggest_format() which is gone now. * src/fullscreen.c, src/zmisc.c: video_init(), video_uninit(), video_suggest_format() moved into capture_start(). * plugins/screenshot/screenshot.c (screenshot_grab): request_capture_format() changed, rewrote image format negotiation. * plugins/mpeg/mpeg.c (do_start): request_capture_format() changed, rewrote image format negotiation. * plugins/deinterlace/preferences.c: Added field balance slider, but not used now. Fixed table padding. * plugins/deinterlace/main.c: Moved HEIGHT_DIV into site_def.h. Added reverse_fields gconf option, auto applies. Removed deinterlace_test(), no longer needed. (deinterlace): Video standard agnostic. (start_thread1): Video standard agnostic, enable capture mode if necessary, request_capture_format() and add_display_filter() changed. * src/tveng1.c: Added support for PWC driver custom ioctls. For now two extra controls 'fps' and 'snapshot'. (fprint_bttv_ioctl_arg): Was missing to print custom BTTV_VERSION. * common/Makefile.am: Added pwc-ioctl.h (PWC driver custom ioctls). * common/pwc-ioctl.h: PWC driver custom ioctls, added from Linux 2.6.8. * zapping.schemas: Added deinterlace/reverse_fields and field_balance. * configure.in: site_def.h change. 2005-01-03 * src/fullscreen.c (stop_fullscreen), src/zmisc.c (zmisc_stop), src/capture.c (capture_stop): Don't stop when recording. * src/tveng.c: (tv_read_frame): Replaces tveng_read_frame(). (tveng_get_timestamp): No longer needed, removed. * src/capture.c (buffer_done): Requeue capture buffers all fifo consumers consumed. (fill_bundle_tveng): tveng_read_frame() changed. (capture_source_dispatch): Throttle display if the CPU is too slow for the selected deinterlace method and would block the GUI from displaying a "your cpu is too SLOW to play this" message. * plugins/deinterlace/DI_TomsMoComp/DI_TomsMoComp.c (TomsMoCompMethod), plugins/deinterlace/DI_MoComp2/DI_MoComp2.c (MoComp2Method), plugins/deinterlace/DI_Misc/DI_VideoWeave.c (VideoWeaveMethod), plugins/deinterlace/DI_Misc/DI_VideoBob.c (VideoBobMethod), plugins/deinterlace/DI_Misc/DI_TwoFrame.c (TwoFrameMethod), plugins/deinterlace/DI_Misc/DI_OldGame.c (OldGameMethod), plugins/deinterlace/DI_Misc/DI_Greedy2Frame.c (Greedy2FrameMethod), plugins/deinterlace/DI_Misc/DI_Greedy.c (GreedyMethod), plugins/deinterlace/DI_GreedyH/DI_GreedyH.c (DI_GreedyHSettings), plugins/deinterlace/windows.h: Localized. * zapping.schemas: Added deinterlace options. * src/zvbi.c (destroy_threads): Disabling vbi crashed b/c g_io_add_watch() wasn't undone. * src/tveng25.c (tveng25_close_device): Destroy info->node. * common/structpr_gen.pl: fourcc fix. * src/zmisc.h (SINGLE_BIT): Macro from src/tveng1.c and tveng25.c. * src/yuv2rgb.c: s/HAVE_GAS/HAVE_SSE fix. * src/v4linterface.c: (z_switch_video_input): Stop and restart capturing on a video input change. (z_switch_standard): Stop and restart capturing on a video standard change. * src/tvengxv.c (tvengxv_attach_device): Clear private data fix. * src/tveng_private.h (capture_device): Added streaming interface. * src/tveng25.c: Cleaned up a bit. (set_audio_mode): Proper V4L ioctl checks. (set_control): Try VIDIOC_S_CTRL_OLD and remember to reduce ioctl calls. (set_video_standard, set_video_input): Does not automatically stop and restart capturing anymore. Added check for capturing active. (set_tuner_frequency): Made capture restart on frequency change optional. (queue_xbuffer, queue_xbuffers, p_tveng25_open_device_file, restart, dequeue_buffer, flush_buffers): New streaming capture routines to eliminate unnecessary copying when deinterlacing, also replaces p_tveng25_qbuf/_dqbuf. (tveng25_start_capturing): Can no longer accept less buffers granted than requested, would conflict with src/capture.c/producer_buffer fifo when streaming. Needs better fix one day. Munmap already mapped buffers on mmap failure. (tveng25_read_frame): Timeout code moved to dequeue_buffer(). (get_capabilities): Extracted from p_tveng25_open_device_file(). * src/tveng1.c: Cleaned up a bit. (set_video_standard, set_video_input): Does not automatically stop and restart capturing anymore. Added check for capturing active. (get_supported_pixfmt_set): Added to get rid of slow and error prone src/capture.c/scan_device(). * src/tveng.c (tveng_attach_device): Made capture restart on frequency change optional. (tv_set_capture_format): Does not automatically stop and restart capturing anymore. Was always a bad idea, fatal when streaming. * src/tveng.h, src/tveng.c: (tv_dequeue_capture_buffer, tv_dequeue_capture_buffer_with_timeout, tv_flush_capture_buffers, tv_queue_capture_buffer): New streaming capture interface to eliminate unnecessary copying when deinterlacing. (tveng_copy_frame): Replaced by libtv/image_format.c/tv_copy_image(). * src/cpu.c: Added runtime AltiVec detection. * src/capture.c: Cleaned up struct producer_buffer. Added support for streaming capture to avoid copying twice in the driver read function and deinterlace plugin. Added GSource replacing idle_handler() when the driver supports streaming, with a deinterlace hook. (capture_start, capture_stop): Use GSource if possible. (fill_bundle_tveng, rebuild_buffer, plugin_read): Moved duplicate code here. (scan_device): No longer needed, now all interfaces have supported_pixfmt_set. (add_display_filter, remove_display_filter): New deinterlace hook. (retrieve_frame): Copy buffers only if necessary. * po/POTFILES.in: Added deinterlace plugin files. * src/zimage.h, src/yuv2rgb.c, src/tveng.h, src/tveng.c, src/main.c, src/csconvert.h, src/csconvert.c, src/capture.c, plugins/screenshot/screenshot.h, plugins/screenshot/screenshot.c, plugins/screenshot/deint.c, plugins/screenshot/b_ppm.c, plugins/screenshot/b_jpeg.c, plugins/mpeg/mpeg.c: zimage changed, tveng_image_data finally gone. * plugins/Makefile.am (deinterlace_plugin): Enabled deinterlace dir. * pixmaps/Makefile.am (PIXMAPS): Added interlace48.png. * libtv/avec/Makefile.am (AM_CFLAGS): Add -maltivec since we have runtime detection now. * libtv/sse/copy_block.c, libtv/mmx/copy_block.c, libtv/image_format.h, libtv/image_format.c: tv_copy_image takes source and dest format which is more logical and permits cropping and padding. * zapping_setup_fb/zapping_setup_fb.c, zapping_setup_fb/v4l.c, zapping_setup_fb/v4l25.c, src/video_xv.c, src/video_x11.c, src/video_mem.c, src/video_gdkrgb.c, src/tvengemu.c, src/tveng25.c, src/tveng1.c, src/capture.c, libtv/screen.c, libtv/pixel_format.c, libtv/image_format.h, libtv/image_format.c: More generic tv_image_format (u_|v_)offset -> offset[4], (uv_)bytes_per_line -> bytes_per_line[4], pixfmt -> tv_pixel_format*, added name field. * libtv/image_format.h, libtv/image_format.c: (tv_new_image): Added for screenshot plugin to create temp images. * common/fifo.h, common/fifo.c (zf_wait_empty_buffer_timeout): Added to prevent blocking in src/capture.c/capture_source_dispatch(). (zf_wait_full_buffer_timeout): Handle NULL timeout. (zf_wait_full_buffer): Replaced duplicate code by zf_wait_full_buffer_timeout() call. * common/device.h (timeval_add): Added. (timeval_cmp): Added. * common/device.c (timeout_subtract_elapsed): Handle NULL timeout as select(2) does. * common/structpr_gen.pl: Made ioctl arg function name variable. * common/Makefile.am (_videodev.h): Renamed fprint_ioctl_arg to fprint_v4l_ioctl_arg to permit inclusion in tveng25.c. * configure.in (CHECK_SIMD): Result string fix. Enable -maltivec since we have runtime detection now. (AC_OUTPUT): Added deinterlace plugin. * test/Makefile.am (TESTS): Added memcpy. * test/memcpy.c (test1): tv_memcpy unit test. * libtv/avec: New AltiVec routines using gcc vector extensions. 2004-12-09 * src/bayer.c (LOOP): Off-by-one read fix. * libtv/misc.h: Added constant ffs macro for get pixel function. * configure.in: Check for x86_64 since not all SWAR is portable. (AC_OUTPUT): Added test/Makefile, libtv/mmx|sse|avec/Makefile. * test: Added for SWAR checks. * libtv/mmx: New MMX routines using gcc vector extensions. * libtv/sse: New SSE routines using gcc vector extensions. * libtv/image_format.c (clear_image): Added MMX and SSE optimized routines. (tv_memcpy): Added for deinterlacer, with MMX and SSE optimized versions. * src/main.c, src/yuv2rgb.c: CPU detection API changed. * src/cpu.h, src/cpu.c (cpu_detection): Added AMD SSE2, Centaur (now Cyrix) tests, new API. 2004-12-07 * src/tveng25.c: Replaced tveng25_vbuf by tv_capture_buffer. (get_supported_pixfmt_set): Try ENUM_FMT first. Don't TRY_FMT with buggy sn9c102. (p_tveng25_open_device_file): Don't open O_NONBLOCK with buggy sn9c102. Factored out get_capabilities(). (tveng25_start_capturing): Map only one buffer with buggy sn9c102. (tveng25_read_frame): Improved timeout. Proper handling of EINTR and EAGAIN. (reset_crop_rect): Try VIDIOC_CROPCAP_OLD. (set_control): Try VIDIOC_S_CTRL_OLD. * src/tveng.h: Added tv_capture_buffer and TV_CAPS_QUEUE. * libtv/pixel_format.h: Extended tv_color_space. (tv_pixel_format): Replaced UV plane scales by shifts to eliminate time consuming divisions. * libtv/pixel_format.h, libtv/pixel_format.c (tv_pixel_format_from_pixfmt, tv_pixfmt_bytes_per_pixel, tv_pixel_format_to_pixfmt): Replaced tv_pixel_format_from_pixfmt code by static table to speed up format lookups. * zapping_setup_fb/v4l.c (setup_v4l), zapping_setup_fb/v4l25.c (setup_v4l25), src/video_xv.c (image_new), src/video_gdkrgb.c (image_new), src/video_mem.c (planar_image_new), src/tveng.c (tveng_copy_frame, tv_clear_image): libtv/screen.c, libtv/image_format.c (tv_image_format_init, tv_image_format_is_valid): tv_pixel_format_from_pixfmt changed. * common/videodev25.h: Updated from Linux 2.6.9. * common/device.h, common/device.c: (timeval_subtract, timeout_subtract_elapsed): New helper functions for proper select() timeout. 2004-12-01 * src/tveng25.c: Added preliminary Bayer (SBGGR8) support with conversion to BGRA32, BGR24 and BGR16. * src/tveng.c (tveng_attach_device, p_tv_set_capture_format): Disable YUVHACK if the device supports only RGB. * common/videodev25.h: Added V4L2_PIX_FMT_SBGGR8. * src/bayer.c, src/bayer.h: New plain C Bayer (SBGGR) to RGB conversion routines. * src/zmisc.c (zmisc_switch_mode): No py zapping.closed_caption call without libzvbi, command not compiled. (zmisc_switch_mode): tveng_set_capture_size() redundant, removed. * src/zapping.c (instance_init): No zconf_add_hook closed_caption without libzvbi. * plugins/teletext/view.c, * plugins/teletext/Makefile.am, * libvbi/misc.h, libvbi/event.h: (ZAPPING8): Let Makefile.am disable incomplete features. 2004-11-20 * plugins/mpeg/mpeg.c: Fixed capture_format_id unset value. * plugins/mpeg/mpeg.c (video_callback), src/capture.h, src/capture.c: Added copy parameter to retrieve_frame to avoid unnecessary image copying (unfinished). * libtv/image_format.c, libtv/image_format.h, src/tveng.c, src/tveng.h: Moved tv_clear_image from tveng.c to image_format.c. Color parameter unnecessary, removed. * common/fifo.h, common/fifo.c (send_empty_unbuffered): Added buffer_done callback for tveng buffer queues. * configure.in: Cleaned up. Improved SIMD checks. 2004-11-18 * plugins/teletext/preferences.c, plugins/mpeg/options.c, src/v4linterface.c, src/channel_editor.c: Spinslider changes. * src/zmisc.c, src/zmisc.h, src/zgconf.c, src/zgconf.h, src/Makefile.am: Moved zspinslider code from zmisc.(c|h) to new zspinslider.(c|h) and GObject-ified. * libvbi/dlist.h (DLIST_CONSISTENCY), libvbi/cache.c (CACHE_CONSISTENCY): Seems to be ok, now disabled by default. 2004-11-17 * src/zgconf.c, src/zgconf.h: (z_gconf_check_button_new): Incorporated auto-update function. (z_gconf_int_spinslider_new): Added. * src/zmisc.c, src/zmisc.h, src/zgconf.c, src/zgconf.h, src/Makefile.am: Moved GConf helpers from zmisc.(c|h) to new zgconf.(c|h) and added a few missing set and auto-update functions. 2004-11-16 * plugins/teletext/preferences.c (instance_finalize): Didn't finalize parent class. * plugins/deinterlace/preferences.h, plugins/deinterlace/preferences.c, plugins/deinterlace/main.c, plugins/deinterlace/main.h, plugins/deinterlace/Makefile.am: Added plugin interface and GUI. * src/zmisc.h, src/zmisc.c (z_gconf_get_string): Added z_gconf_get_string(). * plugins/deinterlace: Corrected ref'ing of MMX globals in inline asm, cannot use -fPIC GOT pointer ebx. Checked with ditest that everything works. * plugins/deinterlace/ditest.c: Added. * plugins/deinterlace: Stole deinterlace plugins from DScaler, commented out Windows dialog code, ported asm to gcc. 2004-11-12 * libvbi/Makefile.am, plugins/teletext/Makefile.am: Changed libvbi to LTLIBRARY for proper linking. 2004-11-11 * Release 0.8 2004-11-10 * libvbi/Makefile.am (EXTRA_DIST): fontgen.c, not fontgen. * libvbi/search.c (vbi3_search_next_va_list, vbi3_search_next): Constness fix in no-search section. * libvbi/conv.c: Have to prepare for byte-reversed UCS-2 iconv on FreeBSD, sigh. * src/zmisc.c, src/zvbi.c: Without-zvbi fixes. 2004-11-09 * README, TODO, NEWS, help/C/figures/zapzilla.png, help/C/zapzilla.xml, help/C/settings.xml: Updated for 0.8. * plugins/teletext/window.c: Fixed button-press-event, must watch view, not entire window. * src/zapping.c: Fixed button-press-event, must watch zvideo, not the entire window. * plugins/teletext/view.c: FLOF/TOP navigation optional, a GConf key without preferences. * zapping.schemas: Added plugins/teletext/view/navigation. * libvbi/teletext.c (keyword): Short-by-one URL strings fixed. * plugins/teletext/view.c (class_init), plugins/teletext/window.c (instance_init): Prefixed custom view signals, just in case. 2004-11-08 * libvbi/teletext_decoder.c (reset): Send network event too. * src/zvbi.c (zvbi_channel_switched), plugins/teletext/main.c: Notify decoders of channel changes, including name. * plugins/teletext/main.c, plugins/teletext/view.c: Moved zvbi decoder routines from view.c to main.c where the stuff belongs, and replaced sliced_list hack. * src/zvbi.c: Added DVB PES reader for tests. (on_vbi_device_changed): Added to semi-auto-apply device change with prefs apply button. * src/zvbi.c, src/zvbi.h: New decoder add and remove funcs to replace the sliced_list hack. * libvbi/exp-gfx.c (DRAW_CHAR): Double width bpl fix. * libvbi/teletext.c (level_one_row): Wide char fix. 2004-11-07 * libvbi/teletext.c: Fixed TOP navigation. (vbi3_page_get_teletext_link): Fixed. * libvbi/teletext_decoder.c (top_page_stat): Must override guessed normal page type. * plugins/teletext/main.c (py_ttx_open_new): Default to GConf home_page instead of 100. * plugins/teletext/view.c (redraw_view): Make sure we have a page image even before the window was realized, prevents display of only header patch. While scanning show requested not current pgno in toolbar. (expose_event): No resize_scaled_page_image() needed here. (monitor_pgno): Draw "loading" image if we have no page. (resize_scaled_page_image): Redraw "loading" image if we have no page. (teletext_view_load_page, view_vbi3_event_handler, teletext_view_switch_network): Reset view charset only on network changes. 2004-11-03 * libvbi/teletext_decoder.c (decode_packet_0): Parallel transmission fix. * plugins/teletext/view.c (class_init): live_clock key name fixed. 2004-11-02 * zapping.desktop.in: Added Terminal, StartupNotify, Categories from patch by Pino Toscano. * configure.in: Libzvbi requirement changed to 0.2.9 for proxy routines, and checked with pkg-config. Note 0.2.9 is the first version installing a zvbi-0.2.pc file. Added glibc 2.1 / libunicode check from libzvbi for libvbi/search.c. (AC_OUTPUT): Added libvbi/Makefile. * src/Makefile.am (INCLUDES): Added -D_GNU_SOURCE - we _want_ to use GNU extensions, but don't _depend_ on them. * common/Makefile.am (libcommon_a_SOURCES): Added intl-priv.h. * common/intl-priv.h: New common localization header. * Makefile.am (SUBDIRS): Added libvbi. * libvbi: Update from libzvbi CVS for the Teletext plugin. Will be removed after the libzvbi-0.3 release. Renamed prefix vbi_ to vbi3_ to avoid linker conflicts with libzvbi-0.2, which is still used for I/O. Various fixes and improvements. * src/zvbi.c, src/zvbi.h: Moved Teletext page rendering code, GConf level and interp type code into plugins/teletext/view.c. Replaced VBI decoding thread by GIOChannel, seems to work well enough and the ability to call GUI routines directly from Teletext decoder greatly simplifies things. Removed the ttx_client code. Added basic support for Tom's zvbid in libvbi 0.2.9. Added a GSource to read from the proxy. Proxy buffers for us, so we can eliminate the capture thread too and need no GIOChannel. * src/zmisc.c, src/zmisc.h: Added z_misc_error_quark, Z_MISC_ERROR, enum ZMiscError to throw our own GErrors. Renamed z_overwrite_file to z_overwrite_file_dialog for clarity, improved messages and changed to HIG-2 style error dialogs. (start_teletext): resize/render_ttx_page obsolete, replaced by view->client_redraw. (z_message_dialog_new, z_message_dialog_new_va_list): Added to simplify building of HIG-2 style message dialogs. (z_show_non_modal_message_dialog): HIG-2 style equivalent of our old ShowBox macro. (z_build_path): Replaced error_description arg by GError. Changed error messages for nicer dialogs. (z_build_path_with_alert): New function like z_build_path, but also shows a HIG-2 style alert message dialog on error. (z_gconf_check_button_new): New function to create a check button linked to a boolean GConf key, for Teletext prefs. (z_show_empty_submenu): New helper function to show action group submenus despite being empty, when we create them manually. Used in zapping.c, Teletext plugin. (z_strappend): Clone of g_strconcat which reallocates. (z_help_display): Wrapper of gnome_help_display, switching out of fullscreen if necessary and showing a HIG-2 style error dialog on failure. (z_url_display): Wrapper of gnome_url_show, switching out of fullscreen if necessary and showing a HIG-2 style error dialog on failure. * src/zmisc.c, src/zapping.c, src/v4linterface.c, src/tvengxv.c, src/tvengemu.c, src/tvengbktr.c, src/tveng_private.h, src/tveng25.c, src/tveng1.c, src/tveng.h, src/tveng.c, src/properties-handler.c, src/overlay.c, src/main.c, src/fullscreen.c, src/cmd.c, src/channel_editor.c, src/capture.c, plugins/screenshot/screenshot.c, plugins/mpeg/mpeg.c: Made struct tveng_device_info opaque and added a various get/set functions. Removed clip vector from tv_window, added clip vector parameter to set overlay window function. Cleaned up chromakey interface. * My First Decent Monitor 1998-2004 RIP. :-( * zapping_setup_fb/v4l2.c (setup_v4l2), zapping_setup_fb/v4l.c (setup_v4l), src/tveng1.c (get_overlay_buffer), src/tveng25.c (image_format_from_format), src/tveng.c (tv_clear_image), libtv/image_format.h, libtv/image_format.c (tv_image_format_init): Added tv_color_space, image_format.color_space. * src/tvengxv.c, src/tvengemu.c, src/tvengbktr.c, src/tveng_private.h, src/tveng25.c, src/tveng1.c, src/tveng.h, src/tveng.c: Merged private device info struct into now opaque tveng_device_info. Grouped overlay and capture values and methods. Cleaned up internal capture format interface. * src/zmisc.c (start_teletext): Moved last remaining ttx_client calls to plugins/teletext/view.c. * src/tveng1.c (p_tveng1_open_device_file): Fixed BTTV_VERSION ioctl parameter. * src/tveng2.c, src/tveng2.h, src/tveng.c, zapping_setup_fb/v4l2.c (setup_v4l2): V4L2 0.20 no longer supported. * src/zmisc.c, src/main.c, src/globals.c, src/globals.h, src/fullscreen.c, plugins/teletext/view.c, plugins/teletext/view.h: Replaced teletext_view_on_key_press by "member function". * src/main.c: Call startup_subtitle, subtitle.c, for py_closed_caption. * src/subtitle.c, src/subtitle.h: zvbi_caption_pgno and py_closed_caption moved here from zvbi.c. * src/properties.c (generic_cancel): set_data before calling the cancel function, which may destroy the page like teletext prefs do. * src/plugin.c (plugin_load_plugins_in_di): Log g_dir_open GError. * src/i18n.c, src/i18n.h (iso639_to_language_name): Added for TeletextWindow page encoding menu. * src/fullscreen.c (set_blank_timeout), src/zmisc (zmisc_switch_mode): Default to no cursor blanking. * src/frequencies.c: Oops. Debugging fprintf was enabled. * src/channel_editor.c, src/cmd.c, src/properties.c, src/zapping.c: s/gnome_help_display/z_help_display for fullscreen switch and proper error handling. * src/Makefile.am (INCLUDES): Added -D_GNU_SOURCE - we _want_ to use GNU extensions, but don't _depend_ on them. Added ZVBI_CFLAGS which comes from pkgconfig. (zapping_LDADD): s/ZVBI_LIB/ZVBI_LIBS from pkgconfig, includes libs libzvbi depends upon. * plugins/teletext/Makefile.am: Link plugin with local libvbi 0.3 instead of libzvbi 0.2, until libzvbi 0.3 is out. (libteletext_zapping_la_SOURCES): Removed color.c/h, added preferences.c/h, page_num.h. * plugins/teletext/bookmark.c, plugins/teletext/bookmark.h: Ported to libvbi 0.3. Replaced pgno, subno in bookmarks by page_num, unfinished. Functions take network parameter. Moved bookmark menu routines here. * plugins/teletext/color.c, plugins/teletext/color.h: Files removed, color settings are now in preferences. * plugins/teletext/export.c: L10n / encoding improved in libvbi 0.3, work-arounds removed or replaced here. Constness fixes. Not working electric filename code removed. (on_ok_clicked): New HIG-2 style overwrite confirmation, build path error and write error message dialogs. Function simplified with new zmisc routines. * plugins/teletext/export.c, plugins/teletext/export.h: Ported to libvbi 0.3. Now uses refcounted vbi_page. * plugins/teletext/main.c, plugins/teletext/main.h: Ported to libvbi 0.3. Cleaned up plugin interface. BCD hacks removed. Color dialog removed. ZConf color options now in GConf, view.c since color changed from decoder to page rendering param in libvbi 0.3. Popup menu code moved to view.c. GConf charset, level notification moved to view.c since these changed from decoder to page formatting params. Bookmark menu code moved to bookmark.c. Preferences code moved to new file preferences.c. ZConf search options now in GConf, search.c. The module now maintains a libvbi 0.3 Teletext decoder. Provides a static anonymous vbi_network identifier for various functions. * plugins/teletext/page_num.h: New type to conveniently handle page addresses consisting of network, pgno and subno. * plugins/teletext/preferences.c, plugins/teletext/preferences.h: Preferences code moved here from main.c, wrapped in GObject. Added page memory size and number of networks options, text brightness and contrast moved here from color.c. Ported to GConf with auto apply. Added apply function for cache parameters. New HIG-2 style layout. * plugins/teletext/search.c, plugins/teletext/search.h: Ported to libvbi 0.3. Now uses refcounted vbi_page. View page hack replaced by teletext_view_show_page call. ZConf regexp and casefold options now in GConf. UTF-8 conversion removed, libvbi now supports UTF-8 directly. (on_help_clicked): s/gnome_help_display/z_help_display for fullscreen switch and proper error handling. * plugins/teletext/toolbar.c, plugins/teletext/toolbar.h: Ported to libvbi 0.3. (on_reveal_toggled): Fixed. * plugins/teletext/window.c, plugins/teletext/window.h: Ported to libvbi 0.3. New TOP menu. Rebuilds automatically on TOP changes and channel change. New Channel radio menu for multi-channel cache, with received channel option. Rebuilds automatically on cache or channel changes. New View/Encoding radio menu to select character set for the current page, with automatic option. Rebuilds automatically when page view changes. No config code yet. Removed on_picture_size_key_press call, doesn't belong here. * plugins/teletext/view.c, plugins/teletext/view.h: Ported to libvbi 0.3. Replaced deprecated Gtk calls. Merged zvbi.c drawing routines into TeletextView to simplify things. Removed the ttx_client interface. Added preliminary sliced VBI data interface. Cleaned up. Patch code (blinking, rolling header, clock) is faster and needs less memory by merging patches of consecutive characters. Improved scaling. TeletextView now supports a multi-network cache, interface changed accordingly. Replaced pgno, subno in browser history by page_num. Separated teletext_view_load_page into cleaner load and show functions, the latter used by search.c. Added two signals to update TeletextWindow on view changes. Moved teletext level, default charset and interp type GConf notify code here. Added code for new brightness and contrast GConf options, formerly part of color dialog. Added code for new rolling header and live clock GConf options without preferences. All these options auto apply now. Support overriding of transmitted charset, but no config code yet. Removed support for TOP page 900 (also from libvbi 0.3), now TeletextWindow implements a TOP menu. Selection supports UTF-8, untested. Replaced open_url, gnome_url_show by z_url_show for fullscreen switch and proper error handling. Fixed teletext_view_popup_menu_new. Replaced remaining signals by overriding widget class functions. * zapping.schemas: Added rolling_header, live_clock, cache_size, cache_networks, brightness, contrast, search regexp, casefold, all_channels. * POTFILES.in: Updated. 2004-10-28 * Makefile.am (desktopdir): Changed zapping.desktop install dir /gnome/apps/Multimedia to /applications. (uninstall-local): Uninstall zapping.schemas. 2004-10-22 * src/zmisc.c (zmisc_switch_mode), src/fullscreen.c (set_blank_timeout): Changed gconf_client_get to z_gconf_get. * src/zmisc.c, src/zmisc.h: Added helper functions to get and set gconf keys with error reporting and warning about unset keys, also used internally. * src/zmisc.c, src/zmisc.h: New add_notify helpers with error reporting and initial get, and helpers to automatically update gconf-based variables in time critical path. * src/zmisc.c, src/zmisc.h (z_menu_shell_chop_off): Helper for dynamic menu updates. * plugins/teletext/main.c (preferences_action): Don't localize property names, the property routines won't find them. 2004-10-13 * src/zmisc.c (z_gconf_combo_box_new, z_gconf_get_string_enum): Handle NULL GError* from gconf_client_get_string(). 2004-10-11 * configure.in: Make sure we check for libzvbi with -liconv if necessary, bug #1044403. 2004-10-11 * Release 0.7.3. 2004-10-10 * help/C/commands.xml: Updated switch_mode, toggle_mode. * src/cmd.c (py_switch_mode, py_toggle_mode): Extended to switch display mode and capture mode at once. 2004-10-09 * src/audio.c (set_mute): OSD related crash fix by Sjoerd Simons. * Makefile.am (install-data-local): VPATH fix. * src/zvbi.c, src/zmisc.c, src/subtitle.h, src/subtitle.c, src/main.c, src/globals.c, src/fullscreen.c, plugins/Makefile.am (teletext subdir), src/globals.h: Didn't compile without libzvbi. * src/cmd.c (py_toggle_mode): Toggled wrong pair of the 3x3 modes. * plugins/teletext/window.c (create_main_menu), src/fullscreen.c (start_fullscreen), src/zapping.c (instance_init): Menu accelerators didn't work. 2004-10-08 * help/C/zapzilla.xml, help/C/zapping.xml, help/C/settings.xml, help/C/commands.xml: Syntax fixes. * zapping.desktop.in, po: Merged comment into name, not like everyone knows what zapping means. * Makefile.am (install-data-local): s/gconftool/gconftool-2. * plugins/alirc/alirc.c (legacy_zoom): Better to use py_toggle_mode. * src/cmd.c (py_switch_mode), src/fullscreen.c (stop_fullscreen), src/zmisc.c (to_old_tveng_capture_mode), src/zapping.h: DISPLAY_MODE_NONE considered harmful, made WINDOW the default and fallback. 2004-10-04 * Release 0.7.2. 2004-10-03 * po/POTFILES.in: Added src/subtitle.c. * plugins/teletext/view.c (teletext_view_popup_menu_new): Fixed context > teletext > save as / colors. * src/capture.c (capture_thread): Abort retry on thread join. (capture_stop): Force thread join when capture thread hangs. * help/C/zapping.xml, help/C/settings.xml, help/C/commands.xml: Updated to reflect bktr support, new window, fullscreen and background modes and the Teletext switch to a plugin. * zapping_setup_fb/Makefile.am: Installed zapping_fix_overlay on BSD although not needed, fixed in toplevel Makefile.am by excluding zapping_setup_fb subdir from compilation. * src/tvengbktr.c: Compile fixes. * src/tveng1.c, src/tveng2.c, src/tveng25.c, src/tveng.c, src/tvengbktr.c, src/tvengxv.c: Always compare and set fds to -1 instead of 0. * libtv/callback.c, libtv/callback.h, libtv/misc.c: Added, moving tveng.c routines here. * src/tveng.h, src/tveng.c: Extended and moved callback routines to libtv. * src/fullscreen.c (start_fullscreen), src/zmisc.c (start_teletext): In Teletext mode put video device into VBI-bypass mode (bktr bug). * src/cmd.c (py_quit): Must destroy zapping object before we quit, to save config. * plugins/teletext/main.c: Added missing py_ttx_color(). (cancel_preferences): Fixed params. * libtv/misc.h, libtv/misc.c: Moved strlcpy, strndup, asprintf replacement functions here from tveng.c. * libtv/Makefile.am (libtv_a_SOURCES): Added callback.c/h, misc.c. * Makefile.am: Don't compile zapping_setup_fb subdir on BSD. 2004-09-26 * po: Updated from Gnome compendium. * src/zvideo.c (size_allocate): Option to disable size magic for fullscreen. * src/zmisc.c: Rewrote mode switch functions to support fullscreen capture mode and teletext. * src/fullscreen.c: Rewrote to support capture mode and teletext. Keys and mouse button functions as in main window. * src/cmd.c (py_switch_mode, py_toggle_mode): Rewrote to switch between window/full and capture/overlay/teletext separately. * src/capture.h, src/capture.c: Determine capture size from arbitrary window instead of zapping->video, for fullscreen. * src/zapping.c, plugins/teletext/window.c, src/zvideo.c, plugins/teletext/view.c: Replaced signals by overriding widget class functions. * src/x11stuff.h, src/x11stuff.c: Added keep-window-below function for background display mode. * src/zapping.c: Added window and background action and menu entries complementing fullscreen. * pixmaps/Makefile.am (PIXMAPS): Added teletext48.png for Teletext plugin prefs. * pixmaps/teletext48.png: Larger version of teletext.png for preferences. * glade/zapping.glade2: Removed Teletext preferences, now implemented in Teletext plugin. * src/fullscreen.c (start_fullscreen), src/zmisc.c (zmisc_switch_mode), zapping.schemas: Made blank cursor timeout variable. * src/zapping.c: Added scroll_event mouse wheel support, untested. 2004-09-22 * src/zvbi.c: Switched to GConf for Teletext region, level and interpolation. Eliminated some duplicate code. No more rendering of flash-off image if the page has no flashing chars to speed things up. (find_subtitle_page): Moved to subtitle.c. * src/zmisc.c, src/zmisc.h (z_overwrite_file): New helper function asking user whether to overwrite existing file. (z_toggle_action_connect_gconf_key): New helper function connecting GtkToggleAction with GConf bool key, improved. (z_gconf_combo_box_new): New helper function creating GtkComboBox menu with GConf string key connection. (z_gconf_get_string_enum): New helper function looking up GConf string in menu table. (z_action_set_sensitive, z_action_set_visible): Replacement for 2.6 GtkAction functions. * src/zapping.c: Include fixes. s/show/view_menu and toolbar for clarity, s/Show //Menu and Toolbar in menu name which is Gnome standard. Public create_popup for Teletext in main window context menu. Enable proper i18n. Public video widget box for Teletext. * src/video_xv.c (image_put), src/video_x11.c (image_put), src/video_gdkrgb.c (image_put): With gtk 2.4 for some reasons images do not display continuously. XFlush seems to fix this. * src/ttxview.c, src/ttxview.h: Removed. Teletext code moved to plugin, split into several files and GObject-ified. Switched to GtkAction, GConf, made a few improvements. Subtitle menu code moved to src/subtitle.c/h, is not Teletext specific. * src/properties.h, src/properties.c (standard_properties_add): Extended to create prefs page on the fly for Teletext plugin. * src/properties-handler.c (vbi_general_setup, vbi_general_apply): Moved Teletext preferences to plugin, switched to gconf. * src/zvbi.c, src/zmisc.c, src/properties-handler.c, src/main.c: Changes after moving teletext code from ttxview.c to plugin. * src/properties-handler.c (style_menu_item_activated, global_menu_item_activated, create_toolbar_style_menu): Use default gconf_client. * src/plugins.c, src/plugins.h: Simplify plugin symbol access. * src/zmisc.c, src/properties.c, src/plugin_properties.c, src/main.c: Replaced 2.6 GtkAction calls. * src/globals.c, src/globals.h: Added preliminary teletext plugin interface. * src/Makefile.am (zapping_SOURCES): Added subtitle.c/h, removed ttxview.c/h. * po/POTFILES.in: Added teletext plugin files. * plugins/Makefile.am: Added teletext. * configure.in: Require gtk >= 2.4. Added plugins/teletext/Makefile. * zapping.schemas: Added. * Makefile.am: Added rules to install zapping.schemas. * configure.in (AM_GCONF_SOURCE_2): Added to install schemas. 2004-09-20 * src/zvbi.c (vbi_gui_sensitive): Use GtkActionGroup visibility change instead of hiding widgets manually. * src/zapping.h, src/zapping.c, src/v4linterface.c (update_bundle): Rebuild channel menu code moved to src/zapping.c. * src/zapping.c, src/main.c: Initial hiding of menu and toolbar now properly implemented in src/zapping.c. shutdown_zapping() call moved to src/zapping.c finalization for dependency reasons. * src/zapping.h, src/zapping.c, src/interface.h, src/interface.c: Moved Zapping widget creation routines to src/zapping.c, switched from GnomeUI to GtkActions. * src/zapping.c, src/main.c, src/globals.h, src/globals.c: Removed obsolete display_preview flag, replaced by disable_overlay where necessary. Added gconf_client for zapping show options. hide_controls and keep_on_top zconf options moved into gconf. * src/overlay.h, src/overlay.c (start_overlay, stop_overlay), src/fullscreen.h, src/fullscreen.c (start_fullscreen, stop_fullscreen): Implicit parameters. * src/zapping.c, src/cmd.c: Moved py_hide_controls(), py_keep_on_top() to src/zapping.c. * src/zmisc.c, src/zapping.h, src/zapping.c, src/properties-handler.c (video_apply), src/main.c, src/capture.c, plugins/screenshot/screenshot.c, plugins/mpeg/mpeg.c: Replaced widget registration/lookup by simple pointers in zapping object. * src/zmisc.h, src/zmisc.c: Added helper connecting a GtkToggleAction and gconf bool. * src/ttxview.h, src/ttxview.c (ttxview_hotlist_menu_append): Changed to _insert due to new action based menus creation. * src/zmisc.c, src/zapping.h, src/zapping.c, src/properties.c, src/plugin_properties.c, src/main.c, src/audio.c (set_mute): Switched to action based menus and toolbar. NOTE Zapping now requires Gtk+ 2.4. * po/sv.po, po/nl.po, po/it.po, po/fr.po, po/es.po, po/de.po: Updated from Gnome compendium (former libgnomeui strings). * po/POTFILES.in: Added src/zapping.c. 2004-09-16 * src/tveng25.c: Cleaned up overlay and capture format code. Added function to quickly determine supported pixfmts. (p_tveng25_dqbuf, tveng25_read_frame): Did not handle EAGAIN. (tveng25_attach_device): Cleaned up, no more set default capture format, just get current overlay and capture format which has no side effects. Skip ioctls if unsupported. * src/tveng.c (tv_get_overlay_buffer), src/tveng.h, src/tveng1.c, src/tveng2.c, src/tveng25.c, src/tveng_private.h, src/tvengbktr.c: Removed unnecessary target parameter. * src/tveng.c, src/capture.c, src/tveng.h, src/tveng1.c, src/tveng2.c, src/tveng25.c, src/tvengbktr.c, src/tvengemu.c, plugins/mpeg/mpeg.c: s/info->format/info->capture_format for clarity. * src/x11stuff.c: Disable/enable KScreensaver (untested). 2004-09-13 * Release 0.7.1. 2004-09-13 * src/x11stuff.c (x11_vidmode_switch): No-Vidmode fix. * src/zmisc.c (zmisc_switch_mode): Fixed previous_mode. * help/C/zapping.xml: Version number update. * src/fullscreen.c: Vidmode fixes. * src/zmisc.c (zmisc_switch_mode): Teletext tool button fix. * libtv/screen.c: Made sure screens have a pixfmt without DGA. (dga_query): If possible try to determine screen pixfmt from XDGAModes, don't guess bpp 16, more sanity checks. No-DGA fix. 2004-09-11 * src/main.c (main), libtv/screen.c (dga_query), zapping_setup_fb/zapping_setup_fb.c (main): Accept only --bpp 24 or 32. 2004-09-09 * src/interface.c (create_zapping): Create a Zapping instance instead of GnomeApp for modularity. * zapping_setup_fb/zapping_setup_fb.h: Rewrote using Xinerama aware libtv routines. * zapping_setup_fb/zapping_setup_fb.c: Rewrote using Xinerama aware libtv routines. Added new --screen option to select the exact physical screen in Xinerama configuration. * zapping_setup_fb/v4l25.c, zapping_setup_fb/v4l2.c, zapping_setup_fb/v4l.c: Switched from old x11_dga_parameters to tv_overlay_buffer. * zapping_setup_fb/dga.c: Replaced by Xinerama aware libtv routines. * zapping_setup_fb/Makefile.am: Removed dga.c, added internal libtv dependency. * src/zmisc.h: Added CONST_PARENT and _unused_ attribute. Added some useful constants to improve code documentation. (z_set_overlay_buffer): New helper to set overlay buffer from display and screen number (Xinerama). * src/zmisc.c: Added functions to translate obsolete tveng_capture_mode which is still used in zapping conf. (zmisc_switch_mode): Cleaned up overlay and fullscreen code. (z_set_overlay_buffer): New helper to set overlay buffer from display and screen number (Xinerama). * src/zconf.h, src/zconf.c: Replaced zc/zconf _integer functions by _int and _uint for proper type checks. * src/x11_stuff.h, src/x11_stuff.c: Added functions to ask WM for fullscreen display of window. Rewrote x11_vidmode routines to consider display and physical screen number, size and position for proper Xinerama support. DGA routines merged with new Xinerama routines and moved to libtv for zapping_setup_fb. (x11_window_clip_vector): Used to create clips outside overlay rectangle when it did not align with containing window, fixed. * src/tvengxv.c (p_tvengxv_open_device): Use given window, i.e. physical screen, to query adaptors. Removed unused overlay_window functions. * src/tveng1.c, src/tveng2.c, src/tveng25.c (set_overlay_window): Function now takes a clip_vector parameter, puts window relative to overlay_buffer origin (Xinerama), cleaned up. * src/tvengbktr.c (set_clips): Function now takes a clip_vector parameter, puts window relative to overlay_buffer origin (Xinerama). Cleaned up and simplified things after moving clip checks to tveng.c. * src/tveng.h: Moved tv_bool, tv_pixfmt, tv_image_format, tv_overlay_buffer to libtv for zapping_setup_fb. Moved tv_clip_vector to libtv. X window pointers in tv_window no longer used, removed. * src/tveng.c: Public functions clear the error string on entry. In overlay mode, do not expect the driver can handle an invisible overlay window. Moved tv_pixfmt routines to libtv for zapping_setup_fb. (p_tveng_set_preview): dga_param is gone, now the overlay buffer must be any one of the physical screens (Xinerama). (p_tveng_set_preview_window): Check that clips stay within overlay buffer and window bounds. Check that clips are valid and in proper order. (tv_set_overlay_buffer): Added display_name and screen_number parameters so we can tell zapping_setup_fb the exact physical screen (Xinerama). (tveng_device_attach): Added window parameter to open only Xv drivers which can put video onto that physical screen. * src/remote.h, src/remote.c: Added PyArg_ParseTuple wrapper with proper const args. * src/main.c (main): Query and report physical X screens (Xinerama). * src/globals.h, src/globals.c: Added list of physical X screens (Xinerama). * src/overlay.c: Rewrote for Xinerama (choose the right physical screen initially and on window motion, clean only the ps we DMA'ed, open right Xv driver). * src/fullscreen.c: Rewrote for Xinerama (choose the right physical screen, use ps vidmodes instead of virtual screen, limit black window size to ps size, open right Xv driver). Use NET_WM_STATE_FULLSCREEN, since the old hack does not work with Gtk 2.6 anymore and most WMs should support this now. * src/Makefile.am: Added internal libtv dependency. Added Xinerama to LDADD. (zapping_SOURCES): Added zapping.c, zapping.h. * src/zmisc.h, src/zmisc.c, src/properties.c, src/main.c, src/interface.c, src/globals.h, src/globals.c, src/cmd.c, src/capture.c, src/audio.c, plugins/screenshot/screenshot.c: Replaced GtkWiget* main_window by Zapping GObject. * plugins/mpeg/mpeg.c: Removed lots of unused local vars. * src/zmisc.c, src/tveng_private.h, src/tveng.h, src/tveng.c, src/overlay.c, src/main.c, src/globals.h, src/globals.c, src/fullscreen.c, src/cmd.c, src/channel_editor.c, src/capture.c, src/audio.c, plugins/mpeg/mpeg.c, plugins/alirc/alirc.c: Split tveng_capture_mode into display and capture mode for future fullscreen capture and Teletext. * pixmaps/Makefile.am: Depend on self, fix type of gdk_pixbuf_csource output. * common/videodev2.h: Removed LINUX_VERSION_CODE warning, this symbol may be undefined. * configure.in: Changed to use automake 1.7. Removed compile warning flags, users must set CFLAGS themselves now. Added libtv/Makefile output. Added endian check for libtv/pixel_format.c. * autogen.sh: Require automake 1.7 or compatible, updated Plan B. * Makefile.am (SUBDIRS): Added libtv. * src/zvideo.c, src/zvbi.c, src/zmisc.c, src/zimage.h, src/zimage.c, src/zconf.h, src/zconf.c, src/yuv2rgb.c, src/xawtv.c, src/x11stuff.h, src/x11stuff.c, src/video_xv.c, src/video_x11.c, src/video_mem.c, src/video_gdkrgb.c, src/vdr.c, src/v4linterface.h, src/v4linterface.c, src/tvengxv.c, src/tvengemu.c, src/tveng_private.h, src/tveng25.c, src/tveng2.c, src/tveng1.h, src/tveng1.c, src/tveng.h, src/tveng.c, src/ttxview.c, src/remote.c, src/properties.c, src/properties-handler.h, src/properties-handler.c, src/plugin_properties.c, src/plugin_common.h, src/overlay.c, src/oss.c, src/osd.c, src/mixer.c, src/main.c, src/keysyms.h, src/keyboard.c, src/interface.c, src/fullscreen.c, src/frequencies.h, src/frequencies.c, src/esd.c, src/csconvert.h src/csconvert.c, src/cmd.c, src/channel_editor.c, src/capture.c, src/audio.h, src/audio.c, src/arts.c, plugins/screenshot/screenshot.h, plugins/screenshot/screenshot.c, plugins/screenshot/deint.c, plugins/screenshot/b_ppm.c, plugins/screenshot/b_jpeg.c, plugins/mpeg/options.c, plugins/mpeg/mpeg.c, plugins/alirc/alirc.c, common/fifo.h, common/fifo.c, common/device.c, common/alloc.h: Const, signedness, unused function parameters, void pointer arithmetic fixes. * src/zapping.c, src/zapping.h: Added to modularize things more in the future. * libtv: Added for zapping_setup_fb. * libtv/clip_vector.c, libtv/clip_vector.h, libtv/image_format.c, libtv/image_format.h, libtv/overlay_buffer.h, libtv/pixel_format.c, libtv/pixel_format.h: Moved here from src/tveng.c, src/tveng.h. * libtv/clip_vector.c (tv_clip_vector_copy): Fixed too small realloc. * libtv/screen.c, libtv/screen.h: Merged DGA and Xinerama routines, moved here from src/x11_stuff.c, src/x11_stuff.h. * libtv/macros.h, libtv/misc.h: Cloned from zvbi-0.3. 2004-08-13 * src/ttxview.c (ttxview_detach, ttxview_attach): Create second toolbar in Teletext mode. * src/zvideo.c (z_video_new): Fixed double instantiation. 2004-08-11 * plugins/alirc/alirc.c (legacy_command_txl_table): Fixed invalid volume_incr command (bug #1005111). * src/osd.c (ttx_position, cc_position): Corrected subtitle position in fullscreen mode. * tvengbktr.c (set_clips): Don't scale clip coordinates when we capture only one field. * tveng.c, tveng.h, tveng1.c,tveng2.c,tveng25.c, tvengbktr.c, zmisc.c: Added TVENG_ATTACH_VBI mode to prepare driver for VBI capturing only. Required by the bktr driver which cannot capture VBI without video, otherwise like TVENG_ATTACH_CONTROL. * zapping_setup_fb/Makefile.am (install-binPROGRAMS): Need not install when we use the bktr driver. * src/yuv2rgb.c (mmx_register_converters), src/csconvert.h, src/csconvert.c (register_converter, register_converters): Added converter name parameter for debugging. * src/xawtv.c (property_get_string): Don't use gdk 2.4 X Atom functions, must work with 2.0. * src/video_xv.c (image_new): Fixed mem leak. (image_new): Await X server confirmation before marking shared segment for removal (FreeBSD). (suggest_format): Broken by design, disabled. (traverse_ports): Add support for RGB formats. Required by bktr driver. * src/video_mem.c (planar_image_new): Handle YUV formats besides 420. * src/vdr.c (vdr_open): Properly close vdr_sock on connect failure. * src/v4linterface.h, src/v4linterface.c (z_switch_audio_input): Added audio input menu builder and z_switch_audio_input functions for bktr. (z_switch_standard): Restart VBI capturing after standard change. s/strncpy/g_strlcpy. * src/tvengbktr.c (set_video_standard): Did not store current standard, fixed p_tveng_stop_everything call. (set_tuner_frequency): Undo forced mute after frequency change. (set_video_input): Undo forced mute after frequency change, fixed p_tveng_stop_everything call. (get_signal_strength): Finished for automatic channel scan. * src/tveng25.c, src/tveng2.c, src/tveng1.c, src/tvengemu.c, src/tveng_private.h: Cleaned up preview window interface. * src/tvengbktr.c: Added capture and overlay routines, audio input support because automatic selection by video input doesn't seem to work. Rewrote controls code and added mute control. * src/tveng_private.h: Added driver audio input interface for bktr. * src/tvengemu.c: Removed redundant get/set_capture_size(). * src/tveng25.c: Replaced audio mode control hack by tveng audio mode interface. Use audio mode control helper functions in tveng.c. Use V4L audio ioctl to work around bttv bug. Removed redundant get/set_capture_size(). * src/tveng2.c: Removed get/set capture_size(). * src/tveng1.c: Replaced audio mode control hack by tveng audio mode interface, moved control building function to tveng.c. Removed redundant get/set_capture_size(). * src/tveng.h: Changed tv_audio_capability enum to flag set. Changed tv_clip width, height to x2, y2. * src/tveng.c, src/tveng_private.h (_tv_strlcpy): Added, with strlcpy() fallback if available. (_tv_strndup): Use strndup() if available. (_tv_asprintf): Use asprintf() if available. (append_audio_mode_control, set_audio_mode_control): New helper function to build and set an audio mode (mono stereo etc) control, preliminary wrapper for tv_set_audio_mode. * src/tveng.c (tveng_device_info_destroy): Did not destroy audio mode callback. (tveng_attach_device): Mask out bktr YUV formats, conflict with VBI capturing. Replaced GNU asprintf by _tv_asprintf. (tv_get_audio_input, tv_set_audio_input, tv_set_audio_mode): Implemented now. (tv_pixel_format_to_pixfmt): Expect more unusual input, required for bktr. (tveng_copy_frame): Handle planar YUV formats besides 420. (tv_clip_vector_equal): Handle comparison of same. (tv_clip_vector_copy): Handle self assignment. (tv_clip_vector_add_clip_xy): Changed tv_clip width, height to x2, y2. Fixed band order bug. (_tv_image_format_dump): Added. Replaced redundant get/set_capture_size by calls to driver capture format functions. * src/remote.c (python_command_printf): Replaced GNU vasprintf by glib/g_strdup_vprintf(). * src/plugins.c (plugin_load_plugins_in_dir): Replaced GNU scandir by glib/g_dir functions. * src/overlay.c: Changed tv_clip width, height to x2, y2. * src/oss.c (open_pcm): SOUND_MASK_PHONEIN not defined on Solaris. * src/main.c (restore_controls): Restore current audio input. (restore_controls): Expect invalid current channel (NULL). (main, startup_zapping): Use different default / fallback devices on FreeBSD. * src/vdr.c, src/keyboard.c, src/interface.c, src/cmd.c: Moved include remote.h to properly compile on Solaris. * src/capture.c (scan_device): Take shortcut if set of supported pixel formats is const. (request_capture_format_real): Fixed conversion check. * src/Makefile.am (zapping_LDADD): Missing -lX11. * plugins/mpeg/options.c (grte_options_load): Skip special options to keep defaults. * plugins/mpeg/mpeg.c (plugin_load_config): s/strndup/g_strndup. * common/structpr_gen.pl: Handle ioctls with plain type parameters. * common/device.h, common/device.c: Added mmap, munmap wrappers. * common/Makefile.am (_videodev25.h): RW fixes. (_bktr.h): Added hints. * configure.in: strlcpy() check. Bktr driver needs no zapping_setup_fb and PAM. Don't compile with librte on FreeBSD, doesn't work right. s/DATADIRNAME/datadir, is a gettextism. 2004-07-09 * Release 0.7. 2004-07-02 * src/video_xv.c (add_backend_xv): Corrected nv overlay adaptor name. 2004-06-16 * src/zvbi.c (capturing_thread): Log status and errors, retry on EIO. * src/tveng25.c (p_tveng25_dqbuf): Restart streaming on VIDIOC_DQBUF error. (tveng25_start_capturing): Didn't properly clear v4l2_buffer. (tveng25_read_frame): Don't discard stale frames, needs a more robust solution. * autogen.sh, acinclude.m4: Copied parts from gnome-common to eliminate a Gnome CVS dependency on distros without gnome-common package. 2004-06-05 * src/fullscreen.c (start_fullscreen): Fixed fullscreen w/xv OSD positioning. * src/capture.c: size and fmt lock may deadlock, reduced to single lock. (capture_thread): Must not hold lock why busy looping. 2004-05-29 * src/v4linterface.c: Reversed default title format, channel name first, for better panel view. 2004-05-26 * configure.in: Version 0.7cvs8. * common/Makefile.am: README no longer needed. 2004-05-23 * src/xawtv.c (xawtv_import_config): Channel names can contain all sorts of funny characters GScanner cannot easily handle, rewrote the parser. * src/fullscreen.c (start_fullscreen): Keys didn't work if the main window didn't have focus when starting fullscreen. * src/main.c (main): Startup sequence was backwards, we cannot restore overlay mode before the window is mapped. 2004-05-22 * plugins/mpeg/mpeg.c (do_start): Corrected YUV/YVU pixfmt retries. 2004-05-21 * src/frequencies.c (loose_strcmp): Infinite loop. Holy crap I still cannot write ten lines without a bug. 2004-05-19 * src/xawtv.c, src/tvengbktr.c, Makefile.am (Multimedia_DATA): FreeBSD fixes. 2004-05-18 * src/frequencies.c: Extended tveng_tuned_channel_by_(rf_)name to match loosely for xawtv setstation. * src/xawtv.c: Accept setstation command from nxtvepg. 2004-05-17 * src/channel_editor.c (on_channel_search_clicked): Make sure we're in capture mode. * src/osd.c, src/osd.h, src/xawtv.c: Accept vtx, message XAWTV_REMOTE commands from nxtvepg. 2004-05-15 * src/Makefile.am, src/zremote.c: New experimental zremote tool. * src/tveng1.c: Must not include linux/kernel.k, fs.h. * src/eggcellrendererkeys.c (egg_cell_renderer_keys_get_accelerator): GCC 3.4 warnings. * src/xawtv.c, src/xawtv.h, src/v4linterface.c (z_switch_channel), src/main.c (main): Added Xawtv compatible IPC. 2004-05-14 * src/tveng.h, src/tveng.c (tv_clip_vector_add_clip_xy): Fix after gcc warning about MIN() on bitfield. 2004-04-21 * po/sv.po, po/pl.po, po/nl.po, po/it.po, po/fr.po, po/es.po, po/de.po, glade/zapping.glade2, src/audio.c (startup_audio, general_audio_setup, general_audio_apply), src/v4linterface.c (z_switch_channel), src/zmisc.c (zmisc_switch_mode): Restored mute on channel change option. 2004-04-19 * common/Makefile.am: Updated structpr hints. Removed obsolete unicode helper files. * common/device.c, common/device.h, common/structpr_gen.pl: Added R/W hints, union selector. * common/videodev25.h: Updated. * src/oss.c: common/structpr interface changed. * src/overlay.c: Limit window size to 768, preliminary. * src/remote.h: Python.h 2.3 redefines _POSIX_C_SOURCE. * src/tveng25.c: bttv 0.9.12+ returns EINVAL on improper v4l2_buffer init. * src/tveng25.c: bttv 0.9.12 returns bpl = width * depth. * src/v4linterface.c: Compile error without libzvbi. 2004-02-11 * po/it.po: Updated by Pino Toscano. 2004-01-06 * src/zvbi.c: Fixed browser setting hint. Again. * src/tveng25.c: Reset cropping source as mandated by spec. * plugins/lirc/lirc.c, src/properties.c, src/properties.h: Translated strings used to create property structs where we use them as keys. * src/capture.c (request_capture_format_real): Expect tveng_set_capture_format() changes image size. 2004-01-02 * po/it.po: Updated by Pino Toscano. Local Variables: mode: change-log coding: utf-8 left-margin: 8 fill-column: 76 End: zapping-0.10cvs6/plugins/ 777 764 144 0 10443536364 10502 5zapping-0.10cvs6/plugins/mpeg/ 777 764 144 0 10443536354 11431 5zapping-0.10cvs6/plugins/mpeg/volume.png 644 764 144 543 7460206726 13406 PNG  IHDR Vu\gAMA a pHYs  ~IDATxQR@ N *O "#OFFTD ' D$2de $yq3v: Ú7;[wXދ^uk`1MӬm+!!"}/^=8n@W.@D00URU,eɉ7w>.4K 53R|)%l߿)Rmd䏌db`fSMӈكV^C1N5f9f1F7>QIENDB`zapping-0.10cvs6/plugins/mpeg/record.png 644 764 144 1075 7460206726 13376 PNG  IHDRw=gAMA a pHYs  d_IDATxՕk@ƿ3AhO2dBoKl2ܨ ?͙2dT Ş Zђ%r {{wd4ajl_b:ͪUJ\c RZQi!&y \K).vF?%_m4/^lm4GsON6KlL*tX0y>YUZwWYm8q]G6Y^Rb(71Gm4eIENDB`zapping-0.10cvs6/plugins/mpeg/Makefile.am 644 764 144 1451 10331032215 13441 ## Process this file with automake to produce Makefile.in plugindir = @PLUGIN_DEFAULT_DIR@ plugin_LTLIBRARIES = libmpeg.zapping.la PIXMAPS = \ record.png \ pause.png \ stop.png \ disk_empty.png \ drop.png \ time.png \ volume.png BUILT_SOURCES = pixmaps.h EXTRA_DIST = \ $(PIXMAPS) \ mpeg_properties.glade2 pkgdata_DATA = mpeg_properties.glade2 pixmaps.h: $(PIXMAPS) echo -e "\n/* Generated file, do not edit! */\n" > $@ for fi in $(PIXMAPS); do \ @GDK_PIXBUF_CSOURCE@ --struct --build-list \ `echo $$fi | sed -e 's%[^[:alnum:]]%_%g'` $(srcdir)/$$fi >> $@; \ done AM_CFLAGS = \ @PLUGIN_DEFAULT_FLAGS@ \ -DZAPPING8 INCLUDES = \ -I$(top_srcdir) \ @COMMON_INCLUDES@ libmpeg_zapping_la_SOURCES = \ mpeg.c mpeg.h \ options.c \ pixmaps.h libmpeg_zapping_la_LIBADD = $(RTE_LIBS) zapping-0.10cvs6/plugins/mpeg/Makefile.in 644 764 144 50675 10442575562 13532 # Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = ../.. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = plugins/mpeg DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; am__installdirs = "$(DESTDIR)$(plugindir)" "$(DESTDIR)$(pkgdatadir)" pluginLTLIBRARIES_INSTALL = $(INSTALL) LTLIBRARIES = $(plugin_LTLIBRARIES) am__DEPENDENCIES_1 = libmpeg_zapping_la_DEPENDENCIES = $(am__DEPENDENCIES_1) am_libmpeg_zapping_la_OBJECTS = mpeg.lo options.lo libmpeg_zapping_la_OBJECTS = $(am_libmpeg_zapping_la_OBJECTS) DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ SOURCES = $(libmpeg_zapping_la_SOURCES) DIST_SOURCES = $(libmpeg_zapping_la_SOURCES) pkgdataDATA_INSTALL = $(INSTALL_DATA) DATA = $(pkgdata_DATA) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ ARTS_CFLAGS = @ARTS_CFLAGS@ ARTS_LIBS = @ARTS_LIBS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BUILD_DEINTERLACE_PLUGIN_FALSE = @BUILD_DEINTERLACE_PLUGIN_FALSE@ BUILD_DEINTERLACE_PLUGIN_TRUE = @BUILD_DEINTERLACE_PLUGIN_TRUE@ BUILD_MAN_FALSE = @BUILD_MAN_FALSE@ BUILD_MAN_TRUE = @BUILD_MAN_TRUE@ CAN_COMPILE_3DNOW_FALSE = @CAN_COMPILE_3DNOW_FALSE@ CAN_COMPILE_3DNOW_TRUE = @CAN_COMPILE_3DNOW_TRUE@ CAN_COMPILE_ALTIVEC_FALSE = @CAN_COMPILE_ALTIVEC_FALSE@ CAN_COMPILE_ALTIVEC_TRUE = @CAN_COMPILE_ALTIVEC_TRUE@ CAN_COMPILE_MMX_FALSE = @CAN_COMPILE_MMX_FALSE@ CAN_COMPILE_MMX_TRUE = @CAN_COMPILE_MMX_TRUE@ CAN_COMPILE_SSE2_FALSE = @CAN_COMPILE_SSE2_FALSE@ CAN_COMPILE_SSE2_TRUE = @CAN_COMPILE_SSE2_TRUE@ CAN_COMPILE_SSE3_FALSE = @CAN_COMPILE_SSE3_FALSE@ CAN_COMPILE_SSE3_TRUE = @CAN_COMPILE_SSE3_TRUE@ CAN_COMPILE_SSE_FALSE = @CAN_COMPILE_SSE_FALSE@ CAN_COMPILE_SSE_TRUE = @CAN_COMPILE_SSE_TRUE@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCAS = @CCAS@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ COMMON_INCLUDES = @COMMON_INCLUDES@ CONSOLEHELPER_LOCATION = @CONSOLEHELPER_LOCATION@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFAULT_CFLAGS = @DEFAULT_CFLAGS@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ESD_LIBS = @ESD_LIBS@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ GCONF_SCHEMAS_INSTALL_FALSE = @GCONF_SCHEMAS_INSTALL_FALSE@ GCONF_SCHEMAS_INSTALL_TRUE = @GCONF_SCHEMAS_INSTALL_TRUE@ GCONF_SCHEMA_CONFIG_SOURCE = @GCONF_SCHEMA_CONFIG_SOURCE@ GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@ GDK_PIXBUF_CSOURCE = @GDK_PIXBUF_CSOURCE@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ HAVE_GCC_LIMITS_FALSE = @HAVE_GCC_LIMITS_FALSE@ HAVE_GCC_LIMITS_TRUE = @HAVE_GCC_LIMITS_TRUE@ HAVE_LIBZVBI_FALSE = @HAVE_LIBZVBI_FALSE@ HAVE_LIBZVBI_TRUE = @HAVE_LIBZVBI_TRUE@ HAVE_X86_FALSE = @HAVE_X86_FALSE@ HAVE_X86_TRUE = @HAVE_X86_TRUE@ HAVE_XMU_FALSE = @HAVE_XMU_FALSE@ HAVE_XMU_TRUE = @HAVE_XMU_TRUE@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ INTLTOOL_CAVES_RULE = @INTLTOOL_CAVES_RULE@ INTLTOOL_DESKTOP_RULE = @INTLTOOL_DESKTOP_RULE@ INTLTOOL_DIRECTORY_RULE = @INTLTOOL_DIRECTORY_RULE@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ INTLTOOL_ICONV = @INTLTOOL_ICONV@ INTLTOOL_KBD_RULE = @INTLTOOL_KBD_RULE@ INTLTOOL_KEYS_RULE = @INTLTOOL_KEYS_RULE@ INTLTOOL_MERGE = @INTLTOOL_MERGE@ INTLTOOL_MSGFMT = @INTLTOOL_MSGFMT@ INTLTOOL_MSGMERGE = @INTLTOOL_MSGMERGE@ INTLTOOL_OAF_RULE = @INTLTOOL_OAF_RULE@ INTLTOOL_PERL = @INTLTOOL_PERL@ INTLTOOL_PONG_RULE = @INTLTOOL_PONG_RULE@ INTLTOOL_PROP_RULE = @INTLTOOL_PROP_RULE@ INTLTOOL_SCHEMAS_RULE = @INTLTOOL_SCHEMAS_RULE@ INTLTOOL_SERVER_RULE = @INTLTOOL_SERVER_RULE@ INTLTOOL_SHEET_RULE = @INTLTOOL_SHEET_RULE@ INTLTOOL_SOUNDLIST_RULE = @INTLTOOL_SOUNDLIST_RULE@ INTLTOOL_THEME_RULE = @INTLTOOL_THEME_RULE@ INTLTOOL_UI_RULE = @INTLTOOL_UI_RULE@ INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ INTLTOOL_XAM_RULE = @INTLTOOL_XAM_RULE@ INTLTOOL_XGETTEXT = @INTLTOOL_XGETTEXT@ INTLTOOL_XML_NOMERGE_RULE = @INTLTOOL_XML_NOMERGE_RULE@ INTLTOOL_XML_RULE = @INTLTOOL_XML_RULE@ JPEG_LIB = @JPEG_LIB@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBXML_CFLAGS = @LIBXML_CFLAGS@ LIBXML_LIBS = @LIBXML_LIBS@ LIRC_LIB = @LIRC_LIB@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAKEINFO = @MAKEINFO@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ NEED_ZSFB_FALSE = @NEED_ZSFB_FALSE@ NEED_ZSFB_TRUE = @NEED_ZSFB_TRUE@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_CFLAGS = @PACKAGE_CFLAGS@ PACKAGE_LIBS = @PACKAGE_LIBS@ PACKAGE_LIB_DIR = @PACKAGE_LIB_DIR@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_PIXMAPS_DIR = @PACKAGE_PIXMAPS_DIR@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PACKAGE_VERSION_ID = @PACKAGE_VERSION_ID@ PATH_SEPARATOR = @PATH_SEPARATOR@ PG_CFLAGS = @PG_CFLAGS@ PKG_CONFIG = @PKG_CONFIG@ PLUGIN_DEFAULT_DIR = @PLUGIN_DEFAULT_DIR@ PLUGIN_DEFAULT_FLAGS = @PLUGIN_DEFAULT_FLAGS@ PNG_LIBS = @PNG_LIBS@ POFILES = @POFILES@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ PYTHON_LIBS = @PYTHON_LIBS@ PY_CFLAGS = @PY_CFLAGS@ PY_EXTRA_LIBS = @PY_EXTRA_LIBS@ PY_LIBS = @PY_LIBS@ PY_LIB_LOC = @PY_LIB_LOC@ RANLIB = @RANLIB@ RTE_LIBS = @RTE_LIBS@ SCROLLKEEPER_BUILD_REQUIRED = @SCROLLKEEPER_BUILD_REQUIRED@ SCROLLKEEPER_CONFIG = @SCROLLKEEPER_CONFIG@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ SUID_ZSFB_FALSE = @SUID_ZSFB_FALSE@ SUID_ZSFB_TRUE = @SUID_ZSFB_TRUE@ UNICODE_CFLAGS = @UNICODE_CFLAGS@ UNICODE_LIBS = @UNICODE_LIBS@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ WARN_CFLAGS = @WARN_CFLAGS@ XGETTEXT = @XGETTEXT@ XMLCATALOG = @XMLCATALOG@ XML_CATALOG_FILE = @XML_CATALOG_FILE@ XSLTPROC = @XSLTPROC@ X_CFLAGS = @X_CFLAGS@ X_DPMS_LIBS = @X_DPMS_LIBS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ X_XF86DGA_LIBS = @X_XF86DGA_LIBS@ X_XF86VMODE_LIBS = @X_XF86VMODE_LIBS@ X_XINERAMA_LIBS = @X_XINERAMA_LIBS@ X_XMU_LIBS = @X_XMU_LIBS@ X_XV_LIBS = @X_XV_LIBS@ ZSFB_GROUP = @ZSFB_GROUP@ ZSFB_OWNER = @ZSFB_OWNER@ ZVBI_CFLAGS = @ZVBI_CFLAGS@ ZVBI_LIBS = @ZVBI_LIBS@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_STRIP = @ac_ct_STRIP@ ac_pt_PKG_CONFIG = @ac_pt_PKG_CONFIG@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ datadir = @datadir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ python_val = @python_val@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ plugindir = @PLUGIN_DEFAULT_DIR@ plugin_LTLIBRARIES = libmpeg.zapping.la PIXMAPS = \ record.png \ pause.png \ stop.png \ disk_empty.png \ drop.png \ time.png \ volume.png BUILT_SOURCES = pixmaps.h EXTRA_DIST = \ $(PIXMAPS) \ mpeg_properties.glade2 pkgdata_DATA = mpeg_properties.glade2 AM_CFLAGS = \ @PLUGIN_DEFAULT_FLAGS@ \ -DZAPPING8 INCLUDES = \ -I$(top_srcdir) \ @COMMON_INCLUDES@ libmpeg_zapping_la_SOURCES = \ mpeg.c mpeg.h \ options.c \ pixmaps.h libmpeg_zapping_la_LIBADD = $(RTE_LIBS) all: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu plugins/mpeg/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu plugins/mpeg/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh install-pluginLTLIBRARIES: $(plugin_LTLIBRARIES) @$(NORMAL_INSTALL) test -z "$(plugindir)" || $(mkdir_p) "$(DESTDIR)$(plugindir)" @list='$(plugin_LTLIBRARIES)'; for p in $$list; do \ if test -f $$p; then \ f=$(am__strip_dir) \ echo " $(LIBTOOL) --mode=install $(pluginLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(plugindir)/$$f'"; \ $(LIBTOOL) --mode=install $(pluginLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(plugindir)/$$f"; \ else :; fi; \ done uninstall-pluginLTLIBRARIES: @$(NORMAL_UNINSTALL) @set -x; list='$(plugin_LTLIBRARIES)'; for p in $$list; do \ p=$(am__strip_dir) \ echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(plugindir)/$$p'"; \ $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(plugindir)/$$p"; \ done clean-pluginLTLIBRARIES: -test -z "$(plugin_LTLIBRARIES)" || rm -f $(plugin_LTLIBRARIES) @list='$(plugin_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libmpeg.zapping.la: $(libmpeg_zapping_la_OBJECTS) $(libmpeg_zapping_la_DEPENDENCIES) $(LINK) -rpath $(plugindir) $(libmpeg_zapping_la_LDFLAGS) $(libmpeg_zapping_la_OBJECTS) $(libmpeg_zapping_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mpeg.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/options.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool uninstall-info-am: install-pkgdataDATA: $(pkgdata_DATA) @$(NORMAL_INSTALL) test -z "$(pkgdatadir)" || $(mkdir_p) "$(DESTDIR)$(pkgdatadir)" @list='$(pkgdata_DATA)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ f=$(am__strip_dir) \ echo " $(pkgdataDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(pkgdatadir)/$$f'"; \ $(pkgdataDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(pkgdatadir)/$$f"; \ done uninstall-pkgdataDATA: @$(NORMAL_UNINSTALL) @list='$(pkgdata_DATA)'; for p in $$list; do \ f=$(am__strip_dir) \ echo " rm -f '$(DESTDIR)$(pkgdatadir)/$$f'"; \ rm -f "$(DESTDIR)$(pkgdatadir)/$$f"; \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) check-am all-am: Makefile $(LTLIBRARIES) $(DATA) installdirs: for dir in "$(DESTDIR)$(plugindir)" "$(DESTDIR)$(pkgdatadir)"; do \ test -z "$$dir" || $(mkdir_p) "$$dir"; \ done install: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) clean: clean-am clean-am: clean-generic clean-libtool clean-pluginLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-libtool distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-pkgdataDATA install-pluginLTLIBRARIES install-exec-am: install-info: install-info-am install-man: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-info-am uninstall-pkgdataDATA \ uninstall-pluginLTLIBRARIES .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-pluginLTLIBRARIES ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-exec \ install-exec-am install-info install-info-am install-man \ install-pkgdataDATA install-pluginLTLIBRARIES install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags uninstall uninstall-am uninstall-info-am \ uninstall-pkgdataDATA uninstall-pluginLTLIBRARIES pixmaps.h: $(PIXMAPS) echo -e "\n/* Generated file, do not edit! */\n" > $@ for fi in $(PIXMAPS); do \ @GDK_PIXBUF_CSOURCE@ --struct --build-list \ `echo $$fi | sed -e 's%[^[:alnum:]]%_%g'` $(srcdir)/$$fi >> $@; \ done # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: zapping-0.10cvs6/plugins/mpeg/pause.png 644 764 144 530 7460206726 13210 PNG  IHDRw=gAMA a pHYs  ~IDATx핽0蠃=^a"|18h]A— 6fZ_}8yu]!Tnz ? */ #undef GTK_DISABLE_DEPRECATED #include "src/plugin_common.h" #ifdef HAVE_LIBRTE #include #include #include #include "src/audio.h" #include "mpeg.h" #include "src/properties.h" #include "pixmaps.h" #include "src/zvbi.h" #include "src/subtitle.h" #include "src/v4linterface.h" /* videostd_inquiry; preliminary */ #include "libvbi/export.h" /* TODO: . options aren't checked at input time. problem eg. gop_seq, why bother the user while he's still typing. otoh we use the codec as temp storage and it wont accept any invalid options. . Clipping/scaling init sequence: * user selects capture size (video window). * user selects coded width and height as options * x0 = display_width - width / 2, y0 accordingly. * repeat * zapping overlays border onto video. * user changes capture size (video window) * continue * user drags border, grabs line or corner. * translate coordinates * tentative rte_parameter_set, when accepted the border coordinates change, otherwise only the pointer moves. Remind the parameters snap to the closest possible. Border is nifty, we can re-use it elsewhere. Propose 1-pixel windows with X11 accelerated bg texture (eg. 16x16 with black/yellow 8x8 pattern) to keep it simple and fast. Add to osd.c. When we have a preview, one could use resizing that window instead of showing width and height options. Ha! cool. :-) */ static gchar * zconf_root; static gchar * zconf_root_temp; static gchar * record_config_name; static gchar * record_option_filename; /* Configuration */ static rte_context * context_prop; static vbi3_export * export_prop; static GtkWidget * audio_options; static GtkWidget * video_options; static gint capture_w = 384; static gint capture_h = 288; /* Encoding */ static GtkWidget * saving_dialog; static volatile gboolean active; static gint capture_format_id = -1; static tv_pixfmt capture_pixfmt; /* XXX */ static volatile gint stopped; static rte_context * context_enc; static rte_codec * audio_codec; static rte_codec * video_codec; static rte_stream_parameters audio_params; static rte_stream_parameters video_params; static guint update_timeout_id = NO_SOURCE_ID; static gpointer audio_handle; static void * audio_buf; /* preliminary */ static unsigned int audio_size; /* An array of files for multilingual subtitle recording in multiple monolingual formats. Not implemented yet. */ static struct { vbi3_export * export; FILE * fp; } subt_file[30]; static struct { vbi3_pgno first; vbi3_pgno last; guint file_num; /* index into subt_file[] */ } subt_page[60]; static enum { SUBT_SEL_DISPLAYED, SUBT_SEL_ALL, SUBT_SEL_PAGES, } subt_selection; static double subt_start_timestamp; static gboolean subt_row_update; static tveng_device_info * zapping_info; static zf_consumer mpeg_consumer; static void saving_dialog_attach_formats (void); /* * Input/output */ static rte_bool audio_callback (rte_context * context _unused_, rte_codec * codec _unused_, rte_buffer * rb) { rb->data = audio_buf; rb->size = audio_size; read_audio_data (audio_handle, rb->data, rb->size, &rb->timestamp); return TRUE; } static rte_bool video_callback (rte_context * context _unused_, rte_codec * codec _unused_, rte_buffer * rb) { zf_buffer *b; zimage *zi; for (;;) { capture_frame *cf; /* Abort if a bug prevents normal termination. */ if (0 == stopped) return FALSE; else if (stopped > 0) --stopped; b = zf_wait_full_buffer (&mpeg_consumer); cf = PARENT (b, capture_frame, b); /* XXX copy? */ zi = retrieve_frame (cf, capture_pixfmt, /* copy */ TRUE); if (NULL != zi) break; zf_send_empty_buffer (&mpeg_consumer, b); } rb->timestamp = b->time; rb->data = zi->img; rb->size = 1; /* XXX don't care 4 now, should be zi->fmt.size */ rb->user_data = b; return TRUE; } static rte_bool video_unref (rte_context * context _unused_, rte_codec * codec _unused_, rte_buffer * rb) { zf_buffer *b; if (0 == rb->size) { /* Bug in librte < 0.5.6: If video_callback() returned FALSE it passes an "EOF" buffer to the codec and later thinks it must return data to this function. */ return TRUE; } b = (zf_buffer *) rb->user_data; zf_send_empty_buffer (&mpeg_consumer, b); return TRUE; } static vbi3_bool subt_handler (const vbi3_event * ev, void * user_data) { vbi3_page *pg; vbi3_decoder *vbi; vbi3_pgno pgno; guint file_num; user_data = user_data; switch (ev->type) { case VBI3_EVENT_TTX_PAGE: pgno = ev->ev.ttx_page.pgno; break; case VBI3_EVENT_CC_PAGE: if (subt_row_update && !(ev->ev.caption.flags & VBI3_ROW_UPDATE)) return FALSE; /* pass on */ pgno = ev->ev.caption.channel; break; default: g_assert_not_reached (); } file_num = 0; switch (subt_selection) { guint i; default: for (i = 0; i < 1 /* G_N_ELEMENTS (subt_page) */; ++i) { if (pgno >= subt_page[i].first && pgno <= subt_page[i].last) break; } if (i >= 1 /* G_N_ELEMENTS (subt_page) */) return FALSE; /* pass on */ file_num = subt_page[i].file_num; break; } vbi = zvbi_get_object (); g_assert (NULL != vbi); if (pgno >= 0x100) { vbi3_charset_code charset_code; if (zvbi_cur_channel_get_ttx_encoding (&charset_code, pgno)) { pg = vbi3_decoder_get_page (vbi, NULL /* current network */, pgno, VBI3_ANY_SUBNO, VBI3_OVERRIDE_CHARSET_0, charset_code, VBI3_WST_LEVEL, VBI3_WST_LEVEL_1p5, VBI3_PADDING, FALSE, VBI3_END); } else { pg = vbi3_decoder_get_page (vbi, NULL /* current network */, pgno, VBI3_ANY_SUBNO, #if 0 VBI3_DEFAULT_CHARSET_0, option_default_cs, #endif VBI3_WST_LEVEL, VBI3_WST_LEVEL_1p5, VBI3_PADDING, FALSE, VBI3_END); } } else { pg = vbi3_decoder_get_page (vbi, NULL /* current network */, pgno, /* subno */ 0, #if 0 VBI3_DEFAULT_FOREGROUND, option_default_fg, VBI3_DEFAULT_BACKGROUND, option_default_bg, #endif VBI3_PADDING, FALSE, VBI3_ROW_CHANGE, (vbi3_bool) subt_row_update, VBI3_END); } g_assert (NULL != pg); g_assert (NULL != subt_file[file_num].export); vbi3_export_set_timestamp (subt_file[file_num].export, ev->timestamp); if (!vbi3_export_stdio (subt_file[file_num].export, subt_file[file_num].fp, pg)) { /* TODO, error ignored for now. */ } vbi3_page_delete (pg); return FALSE; /* pass on */ } /* * Saving dialog status */ static inline unsigned int qabs (register int n) { register int t = n; t >>= 31; n ^= t; n -= t; return n; } /* * Redraws the audio volume level bars when the widget * is exposed (or needs an update). */ static gboolean volume_expose (GtkWidget * widget, GdkEventExpose * event, gpointer data _unused_) { gint max[2] = { 0, 0 }; char *p, *e; gint w, h; /* ATTENTION S16LE assumed */ for (p = ((char *) audio_buf) + 1, e = ((char *) audio_buf + audio_size) - 2; p < e; p += 32) { gint n; n = qabs (p[0]); if (n > max[0]) max[0] = n; n = qabs (p[2]); if (n > max[1]) max[1] = n; } gdk_window_clear_area (widget->window, event->area.x, event->area.y, event->area.width, event->area.height); gdk_gc_set_clip_rectangle (widget->style->fg_gc[widget->state], &event->area); h = (widget->allocation.height - 1) >> 1; w = widget->allocation.width * max[0] / 128; if (audio_params.audio.channels == 1) { gdk_draw_rectangle (widget->window, widget->style->fg_gc[widget->state], TRUE, 0, h >> 1, MAX(1, w), h); } else { gdk_draw_rectangle (widget->window, widget->style->fg_gc[widget->state], TRUE, 0, 0, MAX(1, w), h); w = widget->allocation.width * max[1] / 128; gdk_draw_rectangle (widget->window, widget->style->fg_gc[widget->state], TRUE, 0, h + 1, MAX(1, w), h); } gdk_gc_set_clip_rectangle (widget->style->fg_gc[widget->state], NULL); return TRUE; } /* * Called by GTK timer to update saving window (time elapsed etc). */ static gint saving_dialog_status_update (rte_context * context) { static gchar buf[64]; rte_status status; GtkWidget *widget; gint h, m, s; if (!active || !saving_dialog) { update_timeout_id = NO_SOURCE_ID; return FALSE; } if (audio_codec) { static gint cd; gtk_widget_queue_draw_area (lookup_widget (saving_dialog, "volume"), 0, 0, 0x7FFF, 0x7FFF); if (cd-- <= 0) cd = 8 / 2; else return TRUE; } rte_context_status (context, &status); if (status.valid & RTE_STATUS_CODED_TIME) { s = status.coded_time; m = s / 60; s -= m * 60; h = m / 60; m -= h * 60; h %= 99; snprintf(buf, sizeof(buf) - 1, "%02u:%02u:%02u", h, m, s); widget = lookup_widget (saving_dialog, "elapsed"); gtk_label_set_text (GTK_LABEL (widget), buf); } if (status.valid & RTE_STATUS_BYTES_OUT) { snprintf(buf, sizeof(buf) - 1, "%.1f MB", (status.bytes_out + ((1 << 20) / 10 - 1)) * (1.0 / (1 << 20))); widget = lookup_widget (saving_dialog, "bytes"); gtk_label_set_text (GTK_LABEL (widget), buf); } /* more... */ return TRUE; } static void saving_dialog_status_disable (void) { if (update_timeout_id != NO_SOURCE_ID) { g_source_remove (update_timeout_id); update_timeout_id = NO_SOURCE_ID; } } static void saving_dialog_status_enable (rte_context * context) { g_assert (saving_dialog != NULL); if (audio_codec) { g_signal_connect (G_OBJECT (lookup_widget (saving_dialog, "volume")), "expose-event", G_CALLBACK (volume_expose), NULL); update_timeout_id = g_timeout_add (1000 / 8, (GSourceFunc) saving_dialog_status_update, context); } else { update_timeout_id = g_timeout_add (1000 / 2, (GSourceFunc) saving_dialog_status_update, context); } } /* * Start/stop recording */ static void stop_subtitle_encoding (void) { vbi3_decoder *vbi; guint i; vbi = NULL; if (NULL != subt_file[0].export) { vbi = zvbi_get_object (); g_assert (NULL != vbi); vbi3_decoder_remove_event_handler (vbi, subt_handler, NULL); } for (i = 0; i < G_N_ELEMENTS (subt_file); ++i) { if (NULL != subt_file[i].export) { const vbi3_export_info *xi; g_assert (NULL != subt_file[i].fp); xi = vbi3_export_info_from_export (subt_file[i].export); g_assert (xi != NULL); if (xi->open_format) { /* Finalize. */ /* XXX error check */ vbi3_export_stdio (subt_file[i].export, subt_file[i].fp, NULL); } fclose (subt_file[i].fp); subt_file[i].fp = NULL; vbi3_export_delete (subt_file[i].export); subt_file[i].export = NULL; } } } static void do_stop (void) { if (!active) return; stopped = 20; saving_dialog_status_disable (); rte_context_delete (context_enc); context_enc = NULL; stop_subtitle_encoding (); zf_rem_consumer (&mpeg_consumer); if (audio_handle) close_audio_device (audio_handle); audio_handle = NULL; if (audio_buf) free (audio_buf); audio_buf = NULL; if (-1 != capture_format_id) release_capture_format (capture_format_id); capture_format_id = -1; active = FALSE; } static const gchar * rec_conf_get_string (const gchar * name) { gchar *zcname; const gchar *value; zcname = g_strconcat (zconf_root, "/configs/", record_config_name, name, NULL); value = zconf_get_string (NULL, zcname); g_free (zcname); return value; } static gchar * xo_zconf_name (const vbi3_export * e, const vbi3_option_info *oi, gpointer user_data) { const vbi3_export_info *xi; user_data = user_data; xi = vbi3_export_info_from_export (e); g_assert (xi != NULL); return g_strconcat (zconf_root, "/configs/", record_config_name, "/vbi_file_options/", xi->keyword, "/", oi->keyword, NULL); } static gboolean open_subtitle_file (const gchar * format, const gchar * file_name) { const vbi3_export_info *xi; gchar **extensions; gchar *subt_file_name; guint i; subt_file_name = NULL; for (i = 0; i < G_N_ELEMENTS (subt_file); ++i) if (NULL == subt_file[i].export) break; if (i >= G_N_ELEMENTS (subt_file)) return FALSE; subt_file[i].export = vbi3_export_new (format, NULL); if (NULL == subt_file[i].export) goto failure; if (!zvbi_export_load_zconf (subt_file[i].export, xo_zconf_name, NULL)) goto failure; vbi3_export_set_timestamp (subt_file[i].export, subt_start_timestamp); xi = vbi3_export_info_from_export (subt_file[i].export); g_assert (xi != NULL); extensions = g_strsplit (xi->extension, ",", 2); subt_file_name = z_replace_filename_extension (file_name, extensions[0]); g_strfreev (extensions); subt_file[i].fp = fopen (subt_file_name, "w"); if (NULL == subt_file[i].fp) goto failure; g_free (subt_file_name); subt_file_name = NULL; return TRUE; failure: g_free (subt_file_name); subt_file_name = NULL; vbi3_export_delete (subt_file[i].export); subt_file[i].export = NULL; return FALSE; } static gboolean is_valid_pgno (vbi3_pgno pgno) { if (!vbi3_is_bcd (pgno)) return FALSE; if (pgno >= 1 && pgno <= 8) return TRUE; if (pgno >= 0x100 && pgno <= 0x899) return TRUE; return FALSE; } static void parse_subtitle_page_numbers (void) { gchar *zcname; const gchar *s; gchar *end; vbi3_pgno pgno; guint n_pages; CLEAR (subt_page); zcname = g_strconcat (zconf_root, "/configs/", record_config_name, "/vbi_pages", NULL); s = zconf_get_string (NULL, zcname); g_free (zcname); zcname = NULL; if (NULL == s) return; n_pages = 0; for (;;) { if (n_pages >= G_N_ELEMENTS (subt_page)) break; if (0 == *s) break; if (!isdigit (*s)) { ++s; continue; } pgno = strtoul (s, &end, 16); s = end; if (!is_valid_pgno (pgno)) continue; subt_page[n_pages].first = pgno; while (*s && isspace (*s)) ++s; if (0 && '-' == *s) { ++s; while (*s && isspace (*s)) ++s; if (isdigit (*s)) { pgno = strtoul (s, &end, 16); s = end; if (!is_valid_pgno (pgno)) continue; } } subt_page[n_pages++].last = pgno; } } static void init_subtitle_encoding (const gchar * file_name) { const gchar *selection; const gchar *mode; selection = rec_conf_get_string ("/vbi_selection"); if (NULL == selection) return; if (0 == strcmp (selection, "displayed")) { subt_selection = SUBT_SEL_DISPLAYED; CLEAR (subt_page); subt_page[0].first = zvbi_caption_pgno; subt_page[0].last = subt_page[0].first; } else if (0 == strcmp (selection, "all")) { subt_selection = SUBT_SEL_ALL; CLEAR (subt_page); /* 0 if none. */ subt_page[0].first = zvbi_find_subtitle_page (zapping_info); subt_page[0].last = subt_page[0].first; } else if (0 == strcmp (selection, "pages")) { subt_selection = SUBT_SEL_PAGES; parse_subtitle_page_numbers (); } if (0 == subt_page[0].first) return; mode = rec_conf_get_string ("/vbi_mode"); if (NULL == mode) return; if (0 == strcmp (mode, "file")) { vbi3_decoder *vbi; const gchar *format; gchar *zcname; vbi = zvbi_get_object (); if (NULL == vbi) goto failure; format = rec_conf_get_string ("/vbi_file_format"); if (NULL == format) goto failure; /* XXX this isn't terribly accurate, should use the start time calculated by/for the rte_context. */ subt_start_timestamp = zf_current_time (); /* Error ignored. */ open_subtitle_file (format, file_name); zcname = g_strconcat (zconf_root, "/configs/", record_config_name, "/vbi_row_update", NULL); subt_row_update = zconf_get_boolean (NULL, zcname); g_free (zcname); failure: ; } } static gboolean do_start (const gchar * file_name) { rte_context *context; gdouble captured_frame_rate; gint width, height; gint retry; if (active) return FALSE; stopped = -1; /* sync_warning (void); */ g_assert (context_enc == NULL); context = grte_context_load (zconf_root, record_config_name, NULL, &audio_codec, &video_codec, &width, &height); if (!context) { ShowBox ("Couldn't create the encoding context", GTK_MESSAGE_ERROR); return FALSE; } if (!audio_codec && !video_codec) { ShowBox (_("Format %s is incomplete, please configure the video or audio codec."), GTK_MESSAGE_ERROR, record_config_name); rte_context_delete (context); return FALSE; } context_enc = context; if (0) fprintf (stderr, "codecs: a%p v%p\n", audio_codec, video_codec); captured_frame_rate = 0.0; if (video_codec) { display_mode old_dmode; capture_mode old_cmode; tv_pixfmt_set pixfmt_set; rte_video_stream_params *par; par = &video_params.video; old_dmode = zapping->display_mode; old_cmode = tv_get_capture_mode (zapping_info); /* Stop and restart to make sure we use a capture thread, not a queue because in do_stop the (main) thread copying buffers from the queue to the fifo and the video codec thread reading frames until stop time is reached may deadlock. That means for now recording and deinterlacing do not combine. :-( */ if (-1 == zmisc_stop (zapping_info)) { rte_context_delete (context); context_enc = NULL; ShowBox ("This plugin needs to run in Capture mode, but" " couldn't switch to that mode:\n%s", GTK_MESSAGE_INFO, tv_get_errstr (zapping_info)); return FALSE; } retry = 0; pixfmt_set = (TV_PIXFMT_SET (TV_PIXFMT_YUV420) | TV_PIXFMT_SET (TV_PIXFMT_YVU420) | TV_PIXFMT_SET (TV_PIXFMT_YUYV)); for (;;) { const tv_image_format *fmt; guint i; if (-1 != capture_format_id) { release_capture_format (capture_format_id); capture_format_id = -1; } if (6 == retry++ || TV_PIXFMT_SET_EMPTY == pixfmt_set) { rte_context_delete (context); context_enc = NULL; ShowBox ("Cannot switch to requested capture format", GTK_MESSAGE_ERROR); zmisc_switch_mode (old_dmode, old_cmode, zapping_info, /* warnings */ FALSE); return FALSE; } capture_format_id = request_capture_format (zapping_info, width, height, pixfmt_set, REQ_SIZE | REQ_PIXFMT | REQ_CONTINUOUS); if (-1 == capture_format_id) { rte_context_delete (context); context_enc = NULL; ShowBox ("Cannot switch capture format", GTK_MESSAGE_ERROR); zmisc_switch_mode (old_dmode, old_cmode, zapping_info, /* warnings */ FALSE); return FALSE; } get_capture_format (capture_format_id, /* width */ NULL, /* height */ NULL, &capture_pixfmt); fmt = tv_cur_capture_format (zapping_info); CLEAR (*par); par->width = fmt->width; par->height = fmt->height; switch (capture_pixfmt) { case TV_PIXFMT_YUV420: par->pixfmt = RTE_PIXFMT_YUV420; par->stride = par->width; par->uv_stride = par->stride >> 1; par->v_offset = par->stride * par->height; par->u_offset = par->v_offset * 5 / 4; break; case TV_PIXFMT_YVU420: par->pixfmt = RTE_PIXFMT_YUV420; par->stride = par->width; par->uv_stride = par->stride >> 1; par->u_offset = par->stride * par->height; par->v_offset = par->u_offset * 5 / 4; break; case TV_PIXFMT_YUYV: par->pixfmt = RTE_PIXFMT_YUYV; /* defaults */ break; default: g_assert_not_reached (); } if (tv_cur_video_standard (zapping_info)) { captured_frame_rate = tv_cur_video_standard (zapping_info)->frame_rate; } else { captured_frame_rate = videostd_inquiry (); if (captured_frame_rate < 0.0) { rte_context_delete (context); context_enc = NULL; if (-1 != capture_format_id) { release_capture_format (capture_format_id); capture_format_id = -1; } zmisc_switch_mode (old_dmode, old_cmode, zapping_info, /* warnings */ FALSE); return FALSE; } } /* not supported by all codecs */ /* g_assert */ (rte_codec_option_set (video_codec, "coded_frame_rate", (double) captured_frame_rate)); par->frame_rate = captured_frame_rate; if (!rte_parameters_set (video_codec, &video_params)) { rte_context_delete (context); context_enc = NULL; if (-1 != capture_format_id) { release_capture_format (capture_format_id); capture_format_id = -1; } /* FIXME */ ShowBox ("Oops, catched a bug.", GTK_MESSAGE_ERROR); zmisc_switch_mode (old_dmode, old_cmode, zapping_info, /* warnings */ FALSE); return FALSE; } fmt = tv_cur_capture_format (zapping_info); /* Width, height may change due to codec limits. */ if (par->width != fmt->width || par->height != fmt->height) { /* Try to capture this size. */ width = par->width; height = par->height; continue; } else if (par->pixfmt == RTE_PIXFMT_YUYV) { if (capture_pixfmt == TV_PIXFMT_YUYV) break; } else if (par->pixfmt == RTE_PIXFMT_YUV420) { /* NB RTE_PIXFMT_YUV420 is backwards. */ if (par->v_offset < par->u_offset) { if (capture_pixfmt == TV_PIXFMT_YUV420) break; } else { if (capture_pixfmt == TV_PIXFMT_YVU420) break; } } /* Try other format. */ for (i = 0; i < TV_MAX_PIXFMTS; ++i) { if (pixfmt_set & TV_PIXFMT_SET (i)) { pixfmt_set &= ~TV_PIXFMT_SET (i); break; } } } /* retry loop */ if (-1 == zmisc_switch_mode (old_dmode, CAPTURE_MODE_READ, zapping_info, /* warnings */ FALSE)) { rte_context_delete (context); context_enc = NULL; if (-1 != capture_format_id) { release_capture_format (capture_format_id); capture_format_id = -1; } ShowBox ("This plugin needs to run in Capture mode, but" " couldn't switch to that mode:\n%s", GTK_MESSAGE_INFO, tv_get_errstr (zapping_info)); return FALSE; } } if (audio_codec) { rte_audio_stream_params *par = &audio_params.audio; memset (par, 0, sizeof (*par)); /* XXX improve */ g_assert (rte_parameters_set (audio_codec, &audio_params)); audio_handle = open_audio_device (par->channels > 1, par->sampling_freq, AUDIO_FORMAT_S16_LE); if (!audio_handle) { ShowBox ("Couldn't open the audio device", GTK_MESSAGE_ERROR); goto failed; } if (!(audio_buf = malloc(audio_size = par->fragment_size))) { ShowBox ("Couldn't open the audio device", GTK_MESSAGE_ERROR); goto failed; } } if (audio_codec) { // XXX rte_set_input_callback_master (audio_codec, audio_callback, NULL, NULL); } if (video_codec) { // XXX rte_set_input_callback_master (video_codec, video_callback, video_unref, NULL); } if (1) { gchar *dir = g_path_get_dirname(file_name); /* XXX zapping real parent? */ if (!z_build_path_with_alert (GTK_WINDOW (zapping), dir)) { g_free (dir); goto failed; } g_free(dir); if (!rte_set_output_file (context, file_name)) /* XXX more info please */ { ShowBox (_("Cannot create file %s: %s\n"), GTK_MESSAGE_WARNING, file_name, rte_errstr (context)); goto failed; } } else { g_assert (rte_set_output_discard (context)); } init_subtitle_encoding (file_name); active = TRUE; /* don't let anyone mess with our settings from now on */ // capture_lock (); if (video_codec) zf_add_consumer (&capture_fifo, &mpeg_consumer); if (subt_file[0].export) { vbi3_decoder *vbi; vbi3_bool success; vbi = zvbi_get_object (); g_assert (NULL != vbi); success = vbi3_decoder_add_event_handler (vbi, VBI3_EVENT_TTX_PAGE | VBI3_EVENT_CC_PAGE, subt_handler, NULL); g_assert (success); } if (!rte_start (context, 0.0, NULL, TRUE)) { ShowBox ("Cannot start encoding: %s", GTK_MESSAGE_ERROR, rte_errstr (context)); zf_rem_consumer (&mpeg_consumer); // capture_unlock (); active = FALSE; goto failed; } saving_dialog_status_enable (context); return TRUE; failed: stop_subtitle_encoding (); if (context_enc) rte_context_delete (context_enc); context_enc = NULL; if (audio_buf) free (audio_buf); audio_buf = NULL; if (audio_handle) close_audio_device (audio_handle); audio_handle = NULL; if (-1 != capture_format_id) release_capture_format (capture_format_id); capture_format_id = -1; return FALSE; } /* * Record config menu */ /** * record_config_menu_get_active: * @option_menu: * * Returns currently selected configuration. * * Return value: * Static keyword (escaped config name). **/ static const gchar * record_config_menu_get_active (GtkWidget * option_menu) { GtkWidget *widget; widget = gtk_option_menu_get_menu (GTK_OPTION_MENU (option_menu)); widget = gtk_menu_get_active (GTK_MENU (widget)); if (!widget) return NULL; return g_object_get_data (G_OBJECT (widget), "keyword"); } static gboolean record_config_menu_set_active (GtkWidget * option_menu, const gchar * keyword) { GtkWidget *widget; GtkMenuShell *menu_shell; guint i; GList *glist; widget = gtk_option_menu_get_menu (GTK_OPTION_MENU (option_menu)); menu_shell = GTK_MENU_SHELL (widget); i = 0; for (glist = menu_shell->children; glist; glist = glist->next) { const gchar *key; key = g_object_get_data (G_OBJECT (glist->data), "keyword"); if (key && 0 == strcmp (key, keyword)) { gtk_option_menu_set_history (GTK_OPTION_MENU (option_menu), i); return TRUE; } ++i; } return FALSE; } /** * record_config_menu_attach: * @source: * @option_menu: * @default_item: * * Rebuilds an @option_menu of configurations from zconf * <@source>/configs. Selects @default_item (escaped config name) * when it exists. * * Return value: * Number of configurations. **/ static gint record_config_menu_attach (const gchar * source, GtkWidget * option_menu, const gchar * default_item) { gchar *zcname = g_strconcat (source, "/configs", NULL); GtkWidget *menu; const gchar *label; gint i; guint def, count; if ((menu = gtk_option_menu_get_menu (GTK_OPTION_MENU (option_menu)))) gtk_widget_destroy (menu); menu = gtk_menu_new (); def = 0; count = 0; for (i = 0; (label = zconf_get_nth ((guint) i, NULL, zcname)); i++) { gchar *base = g_path_get_basename (label); GtkWidget *menu_item; menu_item = gtk_menu_item_new_with_label (base); gtk_widget_show (menu_item); g_object_set_data_full (G_OBJECT (menu_item), "keyword", base, (GtkDestroyNotify) g_free); gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_item); if (default_item) if (strcmp (base, default_item) == 0) def = count; count++; } gtk_option_menu_set_menu (GTK_OPTION_MENU (option_menu), menu); gtk_option_menu_set_history (GTK_OPTION_MENU (option_menu), def); g_free (zcname); return count; } /** * record_config_zconf_find: * @source: * @name: * * Checks if configuration @name exists in zconf under * <@source>/configs. * * Return value: * Number of entry or -1 if not found. **/ static gint record_config_zconf_find (const gchar * source, const gchar * name) { gchar *zcname = g_strconcat (source, "/configs", NULL); const gchar *label; gint i; for (i = 0; (label = zconf_get_nth ((guint) i, NULL, zcname)); i++) { gchar *base = g_path_get_basename (label); if (strcmp (base, name) == 0) { g_free (zcname); g_free (base); return i; } g_free (base); } g_free (zcname); return -1; } /* * Format configuration */ /** * select_codec: * @mpeg_properties: * @conf_name: * @keyword: * @stream_type: * * Loads new #rte_codec @keyword of @stream_type into #context_prop, * with settings from <#zconf_root_temp>/configs/<@conf_name>, and * rebuilds the respective dialog options. **/ static void select_codec (GtkWidget * mpeg_properties, const gchar * conf_name, const char * keyword, rte_stream_type stream_type) { GtkWidget *vbox = 0; GtkWidget **optionspp = 0; rte_codec *codec; g_assert (mpeg_properties != NULL); g_assert (conf_name && conf_name[0]); switch (stream_type) { case RTE_STREAM_AUDIO: vbox = lookup_widget (mpeg_properties, "vbox13"); optionspp = &audio_options; break; case RTE_STREAM_VIDEO: vbox = lookup_widget (mpeg_properties, "vbox12"); optionspp = &video_options; break; default: g_assert_not_reached (); } g_assert (vbox); if (*optionspp) gtk_widget_destroy (*optionspp); *optionspp = NULL; if (keyword) { codec = grte_codec_load (context_prop, zconf_root_temp, conf_name, stream_type, keyword); g_assert (codec); *optionspp = grte_options_create (context_prop, codec); if (*optionspp) { gtk_widget_show (*optionspp); gtk_box_pack_end (GTK_BOX (vbox), *optionspp, TRUE, TRUE, 3); g_signal_connect_swapped (G_OBJECT (*optionspp), "destroy", G_CALLBACK (g_nullify_pointer), optionspp); } } else { rte_remove_codec (context_prop, stream_type, 0); } } static void on_audio_codec_changed (GtkWidget * menu, GtkWidget * mpeg_properties) { GtkWidget *menu_item = gtk_menu_get_active (GTK_MENU (menu)); char *keyword; g_assert (menu_item); keyword = g_object_get_data (G_OBJECT (menu_item), "keyword"); select_codec (mpeg_properties, record_config_name, keyword, RTE_STREAM_AUDIO); } static void on_video_codec_changed (GtkWidget * menu, GtkWidget * mpeg_properties) { GtkWidget *menu_item = gtk_menu_get_active (GTK_MENU (menu)); char *keyword; g_assert (menu_item); keyword = g_object_get_data (G_OBJECT (menu_item), "keyword"); select_codec (mpeg_properties, record_config_name, keyword, RTE_STREAM_VIDEO); } static void attach_codec_menu (GtkWidget * mpeg_properties, gint page, const gchar * widget_name, const gchar * conf_name, rte_stream_type stream_type) { GtkWidget *menu, *menu_item; GtkWidget *widget, *notebook; guint default_item; void (* on_changed) (GtkWidget *, GtkWidget *) = 0; char *keyword; g_assert (mpeg_properties != NULL); if (!conf_name || !conf_name[0]) return; switch (stream_type) { case RTE_STREAM_AUDIO: on_changed = on_audio_codec_changed; break; case RTE_STREAM_VIDEO: on_changed = on_video_codec_changed; break; default: g_assert_not_reached (); } notebook = lookup_widget (GTK_WIDGET (mpeg_properties), "notebook2"); widget = gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook), page); switch (grte_num_codecs (context_prop, stream_type, NULL)) { case 0: gtk_widget_set_sensitive (gtk_notebook_get_tab_label (GTK_NOTEBOOK (notebook), widget), FALSE); gtk_widget_set_sensitive (widget, FALSE); break; case 1: default: gtk_widget_set_sensitive (gtk_notebook_get_tab_label (GTK_NOTEBOOK (notebook), widget), TRUE); gtk_widget_set_sensitive (widget, TRUE); break; } widget = lookup_widget (mpeg_properties, widget_name); if ((menu = gtk_option_menu_get_menu (GTK_OPTION_MENU (widget)))) gtk_widget_destroy (menu); menu = grte_codec_create_menu (context_prop, zconf_root_temp, conf_name, stream_type, &default_item); g_assert (menu); gtk_option_menu_set_menu (GTK_OPTION_MENU (widget), menu); gtk_option_menu_set_history (GTK_OPTION_MENU (widget), default_item); g_signal_connect (G_OBJECT (menu), "selection-done", G_CALLBACK (on_changed), mpeg_properties); menu_item = gtk_menu_get_active (GTK_MENU (menu)); keyword = g_object_get_data (G_OBJECT (menu_item), "keyword"); select_codec (mpeg_properties, conf_name, keyword, stream_type); } /** * select_file_format: * @mpeg_properties: * @conf_name: * @keyword: * * Loads new #rte_context @keyword into #context_prop, settings * from <#zconf_root_temp>/configs/<@conf_name>, and rebuilds the * config dialog codec pages. **/ static void select_file_format (GtkWidget * mpeg_properties, const gchar * conf_name, const char * keyword) { rte_context *context; g_assert (mpeg_properties != NULL); g_assert (conf_name && conf_name[0]); if (!keyword) return; context = rte_context_new (keyword, NULL, NULL); if (!context) return; if (context_prop) rte_context_delete (context_prop); context_prop = context; attach_codec_menu (mpeg_properties, 2, "optionmenu12", conf_name, RTE_STREAM_AUDIO); attach_codec_menu (mpeg_properties, 1, "optionmenu11", conf_name, RTE_STREAM_VIDEO); /* preliminary */ { rte_context_info *ci = rte_context_info_by_context (context); GtkWidget *widget; if (ci && 0 == strcmp (ci->keyword, "mp1e_mpeg1_vcd")) ci = NULL; widget = lookup_widget (mpeg_properties, "spinbutton9"); gtk_widget_set_sensitive (widget, !!ci); widget = lookup_widget (mpeg_properties, "spinbutton10"); gtk_widget_set_sensitive (widget, !!ci); } } static void on_file_format_changed (GtkWidget * menu, GtkWidget * mpeg_properties) { GtkWidget *menu_item = gtk_menu_get_active (GTK_MENU (menu)); char *keyword = g_object_get_data (G_OBJECT (menu_item), "keyword"); select_file_format (mpeg_properties, record_config_name, keyword); } static const gchar * subtitle_modes [] = { "none", /* "open", */ /* "closed", */ "file" }; static guint find_subtitle_mode (const gchar * mode) { guint i; for (i = 0; i < G_N_ELEMENTS (subtitle_modes); ++i) if (0 == strcmp (subtitle_modes[i], mode)) return i; return 0; } static void activate_subtitle_mode_button (GtkWidget * mpeg_properties, const gchar * conf_name) { gchar *zcname; const gchar *mode; gchar *wname; GtkWidget *widget; zcname = g_strconcat (zconf_root_temp, "/configs/", conf_name, "/vbi_mode", NULL); zconf_create_string (subtitle_modes[0], "VBI recording mode", zcname); mode = zconf_get_string (NULL, zcname); if (NULL != mode) mode = subtitle_modes[find_subtitle_mode (mode)]; else mode = subtitle_modes[0]; g_free (zcname); wname = g_strconcat ("subt-", mode, NULL); widget = lookup_widget (mpeg_properties, wname); g_free (wname); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (widget), TRUE); } static void on_subtitle_file_toggled (GtkToggleButton * toggle_button, GtkWidget * mpeg_properties) { gboolean active; GtkWidget *box; active = gtk_toggle_button_get_active (toggle_button); box = lookup_widget (mpeg_properties, "alignment5"); gtk_widget_set_sensitive (box, active); } static gchar * xo_temp_zconf_name (const vbi3_export * e, const vbi3_option_info *oi, gpointer user_data) { const vbi3_export_info *xi; user_data = user_data; xi = vbi3_export_info_from_export (e); g_assert (xi != NULL); return g_strconcat (zconf_root_temp, "/configs/", record_config_name, "/vbi_file_options/", xi->keyword, "/", oi->keyword, NULL); } static void on_vbi_format_menu_activate (GtkWidget * menu_item, GtkWidget * mpeg_properties) { GtkWidget *format_menu; gchar *zcname; gchar *keyword; GtkContainer *container; GList *glist; GtkWidget *table; format_menu = lookup_widget (mpeg_properties, "optionmenu17"); zcname = (gchar *) g_object_get_data (G_OBJECT (format_menu), "zcname"); keyword = (gchar *) g_object_get_data (G_OBJECT (menu_item), "key"); g_assert (keyword != NULL); zconf_set_string (keyword, zcname); vbi3_export_delete (export_prop); export_prop = vbi3_export_new (keyword, NULL); g_assert (NULL != export_prop); container = GTK_CONTAINER (lookup_widget (mpeg_properties, "subt-file-option-box")); while ((glist = gtk_container_get_children (container))) gtk_container_remove (container, GTK_WIDGET (glist->data)); table = zvbi_export_option_table_new (export_prop, xo_temp_zconf_name, /* user_data */ NULL); if (NULL != table) { #if 0 GtkWidget *frame; frame = gtk_frame_new (_("Options")); gtk_container_add (GTK_CONTAINER (frame), table); gtk_widget_show_all (frame); gtk_box_pack_start (GTK_BOX (container), frame, TRUE, TRUE, 0); #else gtk_widget_show_all (table); gtk_box_pack_start (GTK_BOX (container), table, TRUE, TRUE, 0); #endif } } static const gchar * subtitle_selections [] = { "displayed", /* "all", */ "pages", }; static guint find_subtitle_selection (const gchar * selection) { guint i; for (i = 0; i < G_N_ELEMENTS (subtitle_selections); ++i) if (0 == strcmp (subtitle_selections[i], selection)) return i; return 0; } static void activate_subtitle_selection (GtkWidget * mpeg_properties, const gchar * conf_name) { gchar *zcname; const gchar *selection; gchar *wname; GtkWidget *widget; zcname = g_strconcat (zconf_root_temp, "/configs/", conf_name, "/vbi_selection", NULL); zconf_create_string (subtitle_selections[0], "VBI subtitle page selection", zcname); selection = zconf_get_string (NULL, zcname); if (NULL != selection) selection = subtitle_selections[find_subtitle_selection (selection)]; else selection = subtitle_selections[0]; g_free (zcname); wname = g_strconcat ("subt-", selection, NULL); widget = lookup_widget (mpeg_properties, wname); g_free (wname); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (widget), TRUE); } static void init_subtitle_file_options (GtkWidget * mpeg_properties, const gchar * conf_name) { GtkWidget *format_menu; GtkWidget *menu; gchar *zcname; gchar *format; const vbi3_export_info *xm; guint count; guint i; format_menu = lookup_widget (mpeg_properties, "optionmenu17"); menu = gtk_menu_new (); gtk_widget_show (menu); gtk_option_menu_set_menu (GTK_OPTION_MENU (format_menu), menu); zcname = g_strconcat (zconf_root_temp, "/configs/", conf_name, "/vbi_file_format", NULL); g_object_set_data_full (G_OBJECT (format_menu), "zcname", zcname, g_free); zconf_get_string (&format, zcname); count = 0; for (i = 0; (xm = vbi3_export_info_enum ((int) i)); ++i) { if (xm->label && xm->open_format) { GtkWidget *menu_item; menu_item = gtk_menu_item_new_with_label (xm->label); gtk_widget_show (menu_item); gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_item); if (xm->tooltip) z_tooltip_set (menu_item, xm->tooltip); z_object_set_const_data (G_OBJECT (menu_item), "key", xm->keyword); if (0 == count || (format && 0 == strcmp (xm->keyword, format))) { on_vbi_format_menu_activate (menu_item, mpeg_properties); gtk_option_menu_set_history (GTK_OPTION_MENU (format_menu), count); } g_signal_connect (G_OBJECT (menu_item), "activate", G_CALLBACK (on_vbi_format_menu_activate), mpeg_properties); ++count; } } g_free (format); format = NULL; } static void save_subtitle_config (GtkWidget * mpeg_properties) { gchar *zcname; GtkWidget *widget; gboolean active; guint i; for (i = 0; i < G_N_ELEMENTS (subtitle_modes); ++i) { gchar *wname; wname = g_strconcat ("subt-", subtitle_modes[i], NULL); widget = lookup_widget (mpeg_properties, wname); g_free (wname); active = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget)); if (active) { zcname = g_strconcat (zconf_root_temp, "/configs/", record_config_name, "/vbi_mode", NULL); zconf_set_string (subtitle_modes[i], zcname); g_free (zcname); zcname = NULL; break; } } /* vbi_file_format and its options take care of themselves, except for row_update. */ { widget = lookup_widget (mpeg_properties, "subt-row-update"); active = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget)); zcname = g_strconcat (zconf_root_temp, "/configs/", record_config_name, "/vbi_row_update", NULL); zconf_set_boolean (active, zcname); g_free (zcname); zcname = NULL; } for (i = 0; i < G_N_ELEMENTS (subtitle_selections); ++i) { gchar *wname; wname = g_strconcat ("subt-", subtitle_selections[i], NULL); widget = lookup_widget (mpeg_properties, wname); g_free (wname); active = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget)); if (active) { zcname = g_strconcat (zconf_root_temp, "/configs/", record_config_name, "/vbi_selection", NULL); zconf_set_string (subtitle_selections[i], zcname); g_free (zcname); zcname = NULL; break; } } { const gchar *buffer; widget = lookup_widget (mpeg_properties, "subt-page-entry"); buffer = gtk_entry_get_text (GTK_ENTRY (widget)); zcname = g_strconcat (zconf_root_temp, "/configs/", record_config_name, "/vbi_pages", NULL); zconf_set_string (buffer, zcname); g_free (zcname); zcname = NULL; } } /** * rebuild_config_dialog: * @mpeg_properties: * @conf_name: * * Rebuilds configuration dialog with all settings loaded from * <#zconf_root_temp>/configs/<@conf_name>. **/ static void rebuild_config_dialog (GtkWidget * mpeg_properties, const gchar * conf_name) { GtkWidget *menu; GtkWidget *widget; guint default_item; g_assert (mpeg_properties != NULL); if (!conf_name || !conf_name[0]) return; widget = lookup_widget (mpeg_properties, "context"); if ((menu = gtk_option_menu_get_menu (GTK_OPTION_MENU (widget)))) gtk_widget_destroy (menu); menu = grte_context_create_menu (zconf_root_temp, conf_name, &default_item); g_assert (menu); gtk_option_menu_set_menu (GTK_OPTION_MENU (widget), menu); gtk_option_menu_set_history (GTK_OPTION_MENU (widget), default_item); g_signal_connect (G_OBJECT (menu), "selection-done", G_CALLBACK (on_file_format_changed), mpeg_properties); widget = gtk_menu_get_active (GTK_MENU (GTK_OPTION_MENU (widget)->menu)); if (widget) { char *keyword; keyword = g_object_get_data (G_OBJECT (widget), "keyword"); select_file_format (mpeg_properties, conf_name, keyword); } /* preliminary */ { gchar *zcname; zcname = g_strconcat (zconf_root_temp, "/configs/", conf_name, "/capture_width", NULL); zconf_create_int (384, "Capture width", zcname); zconf_get_int (&capture_w, zcname); g_free (zcname); widget = lookup_widget (mpeg_properties, "spinbutton9"); gtk_spin_button_set_value (GTK_SPIN_BUTTON (widget), (gdouble) capture_w); zcname = g_strconcat (zconf_root_temp, "/configs/", conf_name, "/capture_height", NULL); zconf_create_int (288, "Capture height", zcname); zconf_get_int (&capture_h, zcname); g_free (zcname); widget = lookup_widget (mpeg_properties, "spinbutton10"); gtk_spin_button_set_value (GTK_SPIN_BUTTON (widget), (gdouble) capture_h); } { widget = lookup_widget (mpeg_properties, "subt-open"); gtk_widget_set_sensitive (widget, FALSE); widget = lookup_widget (mpeg_properties, "subt-closed"); gtk_widget_set_sensitive (widget, FALSE); widget = lookup_widget (mpeg_properties, "alignment1"); gtk_widget_set_sensitive (widget, FALSE); widget = lookup_widget (mpeg_properties, "optionmenu16"); gtk_widget_set_sensitive (widget, FALSE); widget = lookup_widget (mpeg_properties, "subt-all"); gtk_widget_set_sensitive (widget, FALSE); widget = lookup_widget (mpeg_properties, "subt-file"); on_subtitle_file_toggled (GTK_TOGGLE_BUTTON (widget), mpeg_properties); g_signal_connect (G_OBJECT (widget), "toggled", G_CALLBACK (on_subtitle_file_toggled), mpeg_properties); activate_subtitle_mode_button (mpeg_properties, conf_name); activate_subtitle_selection (mpeg_properties, conf_name); init_subtitle_file_options (mpeg_properties, conf_name); { gchar *zcname; zcname = g_strconcat (zconf_root, "/configs/", record_config_name, "/vbi_row_update", NULL); zconf_create_boolean (FALSE, "Update roll-up caption at row granularity", zcname); widget = lookup_widget (mpeg_properties, "subt-row-update"); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (widget), zconf_get_boolean (NULL, zcname)); g_free (zcname); zcname = NULL; } { gchar *zcname; zcname = g_strconcat (zconf_root, "/configs/", record_config_name, "/vbi_pages", NULL); zconf_create_string ("", "Subtitle pages to record", zcname); widget = lookup_widget (mpeg_properties, "subt-page-entry"); gtk_entry_set_text (GTK_ENTRY (widget), zconf_get_string (NULL, zcname)); g_free (zcname); zcname = NULL; } } } static void on_pref_config_changed (GtkWidget *, GtkWidget *); /** * pref_rebuild_configs: * @page: * @default_item: * * Rebuilds preferences configs menu, selects @default_item (escaped * config name) if exists and rebuilds config dialog loading the * selected configuration from <#zconf_root_temp>/configs. **/ static void pref_rebuild_configs (GtkWidget * page, const gchar * default_item) { GtkWidget *configs; gchar *why; gint nformats; configs = lookup_widget (page, "optionmenu15"); nformats = record_config_menu_attach (zconf_root_temp, configs, default_item); g_signal_connect (G_OBJECT (GTK_OPTION_MENU (configs)->menu), "selection-done", G_CALLBACK (on_pref_config_changed), page); why = NULL; z_set_sensitive_with_tooltip (configs, nformats > 0, NULL, why); z_set_sensitive_with_tooltip (lookup_widget (page, "delete"), nformats > 0, NULL, why); z_set_sensitive_with_tooltip (lookup_widget (page, "notebook2"), nformats > 0, NULL, why); if (nformats > 0) on_pref_config_changed (NULL, page); } static void pref_cancel (GtkWidget * page _unused_) { /* Delete preliminary changes */ zconf_delete (zconf_root_temp); } static void save_current_config (GtkWidget * page) { if (context_prop && record_config_name[0]) { GtkWidget *widget; widget = lookup_widget (page, "spinbutton9"); capture_w = ~15 & gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (widget)); widget = lookup_widget (page, "spinbutton10"); capture_h = ~15 & gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (widget)); grte_context_save (context_prop, zconf_root_temp, record_config_name, capture_w, capture_h); save_subtitle_config (page); } } static void pref_apply (GtkWidget * page) { gchar *buffer; save_current_config (page); /* Replace old configs by changed ones and delete temp */ buffer = g_strconcat (zconf_root_temp, "/configs", NULL); zconf_copy (zconf_root, buffer); g_free (buffer); zconf_delete (zconf_root_temp); saving_dialog_attach_formats (); } static void on_config_new_clicked (GtkButton * button _unused_, GtkWidget * page) { gchar *name; name = Prompt (GTK_WIDGET (zapping), _("New format"), _("Format name:"), NULL); if (!name || !*name) { g_free (name); return; } if (record_config_zconf_find (zconf_root_temp, name) >= 0) { if (strcmp (name, record_config_name) != 0) { /* Rebuild configs menu, select new and save current */ pref_rebuild_configs (page, name); } } else { /* * Create new config (clone current), rebuild configs * menu, select new and save current config. */ if (!context_prop) rebuild_config_dialog (page, name); if (context_prop) grte_context_save (context_prop, zconf_root_temp, name, capture_w, capture_h); pref_rebuild_configs (page, name); z_property_item_modified (page); } g_free (name); } static void on_config_delete_clicked (GtkButton * button _unused_, GtkWidget * page) { /* * If config selected delete it, rebuild configs menu and * config dialog, and select some other config. */ if (!record_config_name[0]) return; grte_config_delete (zconf_root_temp, record_config_name); g_free (record_config_name); record_config_name = g_strdup (""); pref_rebuild_configs (page, NULL); z_property_item_modified (page); } static void on_pref_config_changed (GtkWidget * menu _unused_, GtkWidget * page) { GtkWidget *configs; const gchar *conf; configs = lookup_widget (page, "optionmenu15"); conf = record_config_menu_get_active (configs); if (!conf || strcmp(conf, record_config_name) == 0) return; save_current_config (page); g_free (record_config_name); record_config_name = g_strdup (conf); rebuild_config_dialog (page, record_config_name); if (saving_dialog) { configs = lookup_widget (saving_dialog, "optionmenu14"); record_config_menu_set_active (configs, record_config_name); } } static void pref_setup (GtkWidget * page) { GtkWidget *new = lookup_widget (page, "new"); GtkWidget *delete = lookup_widget (page, "delete"); gchar *buffer; /* All changes preliminary until ok/apply */ buffer = g_strconcat (zconf_root, "/configs", NULL); zconf_copy (zconf_root_temp, buffer); g_free (buffer); pref_rebuild_configs (page, record_config_name); /* Load context_prop even if nothing configured yet */ rebuild_config_dialog (page, record_config_name); g_signal_connect (G_OBJECT (new), "clicked", G_CALLBACK (on_config_new_clicked), page); g_signal_connect (G_OBJECT (delete), "clicked", G_CALLBACK (on_config_delete_clicked), page); } /* * Saving dialog */ static gboolean on_saving_delete_event (GtkWidget * widget _unused_, GdkEvent * event _unused_, gpointer user_data _unused_) { saving_dialog = NULL; do_stop (); return FALSE; } static gchar * file_format_ext (const gchar * conf_name) { rte_context *context; rte_context_info *info; const gchar *s; if (!conf_name || !conf_name[0]) return NULL; context = grte_context_load (zconf_root, conf_name, NULL, NULL, NULL, NULL, NULL); if (!context) return NULL; info = rte_context_info_by_context (context); if (!info->extension) { rte_context_delete (context); return NULL; } for (s = info->extension; *s != 0 && *s != ','; s++) ; return g_strndup (info->extension, (guint)(s - info->extension)); } static void on_saving_format_changed (GtkWidget * menu _unused_, gpointer user_data _unused_) { GtkWidget *configs; GtkWidget *entry; gchar *ext; g_assert (saving_dialog != NULL); /* Replace filename extension in entry according to selected format */ configs = lookup_widget (saving_dialog, "optionmenu14"); entry = lookup_widget (saving_dialog, "entry1"); ext = file_format_ext (record_config_menu_get_active (configs)); z_electric_replace_extension (entry, ext); g_free (ext); } static void on_saving_configure_clicked (GtkButton * button, gpointer user_data _unused_) { g_assert (saving_dialog != NULL); gtk_widget_set_sensitive (saving_dialog, FALSE); python_command_printf (GTK_WIDGET (button), "zapping.properties('%s', '%s')", _("Plugins"), _("Record")); gtk_widget_set_sensitive (saving_dialog, TRUE); saving_dialog_attach_formats (); } static void on_saving_filename_changed (GtkWidget * widget, gpointer user_data _unused_) { gchar *buffer; g_assert (saving_dialog != NULL); /* Inhibit record button when filename is blank */ buffer = gtk_editable_get_chars (GTK_EDITABLE (widget), 0, -1); gtk_widget_set_sensitive (lookup_widget (saving_dialog, "record"), buffer && buffer[0]); g_free (buffer); } static void on_saving_stop_clicked (GtkButton * button _unused_, gpointer user_data _unused_) { g_assert (saving_dialog != NULL); gtk_widget_destroy (saving_dialog); saving_dialog = NULL; do_stop (); } static void on_saving_record_clicked (GtkButton * button _unused_, gpointer user_data _unused_) { GtkToggleButton *record; GtkWidget *widget; const gchar *buffer; g_assert (saving_dialog != NULL); if (active) return; record = GTK_TOGGLE_BUTTON (lookup_widget (saving_dialog, "record")); /* Do not start recording if case we are _unset_ */ if (!gtk_toggle_button_get_active (record)) return; widget = lookup_widget (saving_dialog, "optionmenu14"); buffer = record_config_menu_get_active (widget); if (!buffer || !buffer[0]) goto reject; g_free (record_config_name); record_config_name = g_strdup (buffer); widget = lookup_widget (saving_dialog, "entry1"); buffer = gtk_entry_get_text (GTK_ENTRY (widget)); if (!buffer || !buffer[0]) goto reject; g_free (record_option_filename); record_option_filename = g_strdup (buffer); if (0) fprintf(stderr, "Record <%s> as <%s>\n", record_option_filename, record_config_name); if (do_start (record_option_filename)) { z_set_sensitive_with_tooltip (lookup_widget (saving_dialog, "optionmenu14"), FALSE, NULL, NULL); gtk_widget_set_sensitive (lookup_widget (saving_dialog, "fileentry3"), FALSE); gtk_widget_set_sensitive (GTK_WIDGET (record), FALSE); gtk_widget_set_sensitive (lookup_widget (saving_dialog, "stop"), TRUE); } else { active = TRUE; gtk_toggle_button_set_active (record, FALSE); active = FALSE; } return; reject: gtk_toggle_button_set_active (record, FALSE); return; } static void saving_dialog_attach_formats (void) { GtkWidget *configs; GtkWidget *entry; gint nformats; gchar *ext; gchar *name; gchar *base_name; if (!saving_dialog) return; configs = lookup_widget (saving_dialog, "optionmenu14"); entry = lookup_widget (saving_dialog, "entry1"); nformats = record_config_menu_attach (zconf_root, configs, record_config_name); z_set_sensitive_with_tooltip (configs, nformats > 0, NULL, NULL); /* * Proposed filename is last one, with appropriate extension * and numeral suffix++ if file exists. */ ext = file_format_ext (record_config_menu_get_active (configs)); name = find_unused_name (NULL, record_option_filename, ext); gtk_entry_set_text (GTK_ENTRY (entry), name); base_name = g_path_get_basename (name); z_electric_set_basename (entry, base_name); g_free (base_name); g_free (name); g_free (ext); g_signal_connect (G_OBJECT (entry), "changed", G_CALLBACK (z_on_electric_filename), (gpointer) NULL); gtk_editable_select_region (GTK_EDITABLE (entry), 0, -1); if (nformats > 0) { GtkWidget *optionmenu; if (!active) gtk_widget_set_sensitive (lookup_widget (saving_dialog, "record"), TRUE); optionmenu = lookup_widget (saving_dialog, "optionmenu14"); g_signal_connect (G_OBJECT (GTK_OPTION_MENU (optionmenu)->menu), "selection-done", G_CALLBACK (on_saving_format_changed), NULL); } else { gtk_widget_set_sensitive (lookup_widget (saving_dialog, "record"), FALSE); } } #if 0 static GtkWidget * saving_popup_new (void) { static gint times[] = { 15, 30, 45, 60, 90, 120, 180 }; GtkWidget *menu; guint i; menu = build_widget ("menu1", "mpeg_properties.glade2"); gtk_widget_set_sensitive (lookup_widget (menu, "record_this"), FALSE); gtk_widget_set_sensitive (lookup_widget (menu, "record_next"), FALSE); for (i = 0; i < sizeof(times) / sizeof (times[0]); ++i) { GtkWidget *menu_item; gchar *buffer = g_strdup_printf("Record %d min", times[i]); menu_item = gtk_menu_item_new_with_label (buffer); g_free (buffer); gtk_widget_show (menu_item); gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_item); } return menu; } #endif static void saving_dialog_delete (void) { if (saving_dialog) { gtk_widget_destroy (saving_dialog); saving_dialog = NULL; } } static void saving_dialog_new_pixmap_table (const GdkPixdata * pixdata, const gchar * table_name) { GtkWidget *pixmap; pixmap = z_gtk_image_new_from_pixdata (pixdata); if (pixmap) { GtkWidget *table; table = lookup_widget (saving_dialog, table_name); gtk_widget_show (pixmap); gtk_table_attach (GTK_TABLE (table), pixmap, 0, 1, 0, 1, 0, 0, 3, 0); } } static void saving_dialog_new_pixmap_box (const GdkPixdata * pixdata, const gchar * box_name) { GtkWidget *pixmap; pixmap = z_gtk_image_new_from_pixdata (pixdata); if (pixmap) { GtkWidget *box; box = lookup_widget (saving_dialog, box_name); gtk_widget_show (pixmap); gtk_box_pack_start (GTK_BOX (box), pixmap, FALSE, FALSE, 0); } } static void saving_dialog_new (gboolean recording) { GtkWidget *widget; GtkWidget *record, *stop; if (saving_dialog) gtk_widget_destroy (saving_dialog); saving_dialog = build_widget ("window3", "mpeg_properties.glade2"); saving_dialog_new_pixmap_table (&time_png, "table4"); saving_dialog_new_pixmap_table (&drop_png, "table5"); saving_dialog_new_pixmap_table (&disk_empty_png, "table7"); saving_dialog_new_pixmap_table (&volume_png, "table8"); saving_dialog_new_pixmap_box (&record_png, "hbox20"); saving_dialog_new_pixmap_box (&pause_png, "hbox22"); saving_dialog_new_pixmap_box (&stop_png, "hbox24"); saving_dialog_attach_formats (); /* gnome_popup_menu_attach (saving_popup = saving_popup_new (), saving_dialog, NULL); */ g_signal_connect (G_OBJECT (saving_dialog), "delete-event", G_CALLBACK (on_saving_delete_event), NULL); g_signal_connect (G_OBJECT (lookup_widget (saving_dialog, "configure_format")), "clicked", G_CALLBACK (on_saving_configure_clicked), NULL); g_signal_connect (G_OBJECT (lookup_widget (saving_dialog, "entry1")), "changed", G_CALLBACK (on_saving_filename_changed), NULL); record = lookup_widget (saving_dialog, "record"); if (recording) { gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (record), TRUE); gtk_widget_set_sensitive (record, FALSE); } g_signal_connect (G_OBJECT (record), "clicked", G_CALLBACK (on_saving_record_clicked), NULL); stop = lookup_widget (saving_dialog, "stop"); gtk_widget_set_sensitive (stop, recording); g_signal_connect (G_OBJECT (stop), "clicked", G_CALLBACK (on_saving_stop_clicked), NULL); widget = lookup_widget (saving_dialog, "pause"); gtk_widget_set_sensitive (widget, FALSE); z_tooltip_set (widget, _("Not implemented yet")); if (recording) { z_set_sensitive_with_tooltip (lookup_widget (saving_dialog, "optionmenu14"), FALSE, NULL, NULL); gtk_widget_set_sensitive (lookup_widget (saving_dialog, "fileentry3"), FALSE); } gtk_widget_show (saving_dialog); } /* * Command interface */ static PyObject* py_stoprec (PyObject *self _unused_, PyObject *args _unused_) { saving_dialog_delete (); do_stop (); py_return_true; } static PyObject* py_pauserec (PyObject *self _unused_, PyObject *args _unused_) { py_return_false; } static PyObject* py_quickrec (PyObject *self _unused_, PyObject *args _unused_) { gchar *ext; gchar *name; gboolean success; if (saving_dialog || active) py_return_false; if (!record_config_name[0]) py_return_false; if (!record_option_filename[0]) { g_free (record_option_filename); record_option_filename = g_strconcat (getenv ("HOME"), "/clips/clip1", NULL); } ext = file_format_ext (record_config_name); name = find_unused_name (NULL, record_option_filename, ext); saving_dialog_new (TRUE); success = do_start (name); if (success) { GtkToggleButton *record; record = GTK_TOGGLE_BUTTON (lookup_widget (saving_dialog, "record")); } else { saving_dialog_delete (); } g_free (name); g_free (ext); return PyInt_FromLong (success); } static PyObject* py_record (PyObject *self _unused_, PyObject *args _unused_) { if (saving_dialog || active) py_return_false; saving_dialog_new (FALSE); py_return_true; } /* * Save config */ #define SAVE_CONFIG(_type, _name) \ buffer = g_strconcat (root_key, #_name, NULL); \ zconf_set_##_type (record_option_##_name, buffer); \ g_free (buffer); static void plugin_save_config (gchar * root_key) { gchar *buffer; buffer = g_strconcat (root_key, "config", NULL); zconf_set_string (record_config_name, buffer); g_free (buffer); g_free (record_config_name); record_config_name = NULL; SAVE_CONFIG (string, filename); g_free (record_option_filename); record_option_filename = NULL; /* Obsolete pre-RTE 0.5 configuration */ zconf_delete ("/zapping/plugins/mpeg"); } #define LOAD_CONFIG(_type, _def, _name, _descr) \ buffer = g_strconcat (root_key, #_name, NULL); \ zconf_create_##_type (_def, _descr, buffer); \ zconf_get_##_type (&record_option_##_name, buffer); \ g_free (buffer); static void plugin_load_config (gchar * root_key) { gchar *buffer; gchar *default_filename; guint n = strlen (root_key); D(); g_assert (n > 0 && root_key[n - 1] == '/'); zconf_root = g_strndup (root_key, n - 1); zconf_root_temp = g_strconcat (zconf_root, "/temp", NULL); buffer = g_strconcat (root_key, "config", NULL); zconf_create_string ("", "Last config", buffer); zconf_get_string (&record_config_name, buffer); g_free (buffer); D(); default_filename = g_strconcat (getenv ("HOME"), "/clips/clip1", NULL); LOAD_CONFIG (string, default_filename, filename, "Last filename"); g_free (default_filename); } /* * Plugin interface */ static gboolean plugin_running (void) { return active; } static void plugin_capture_stop (void) { /* Not good, and we stop capturing ourselves in do_start(). */ /* saving_dialog_delete (); */ do_stop (); } static gboolean plugin_start (void) { saving_dialog_new (FALSE); return TRUE; } static void plugin_remove_gui (GnomeApp * app _unused_) { GtkWidget *button; button = GTK_WIDGET (g_object_get_data (G_OBJECT (zapping), "mpeg_button")); gtk_container_remove (GTK_CONTAINER (zapping->toolbar), button); } static const gchar *tooltip = N_("Record a video stream"); static void plugin_add_gui (GnomeApp * app _unused_) { GtkToolItem *tool_item; tool_item = gtk_tool_button_new (NULL, _("Record")); gtk_widget_show (GTK_WIDGET (tool_item)); gtk_tool_button_set_stock_id (GTK_TOOL_BUTTON (tool_item), "zapping-recordtb"); z_tooltip_set (GTK_WIDGET (tool_item), _(tooltip)); z_signal_connect_python (G_OBJECT (tool_item), "clicked", "zapping.record()"); gtk_toolbar_insert (zapping->toolbar, tool_item, APPEND); /* Set up the widget so we can find it later */ g_object_set_data (G_OBJECT (zapping), "mpeg_button", tool_item); } static void plugin_process_popup_menu (GtkWidget * widget _unused_, GdkEventButton * event _unused_, GtkMenu * popup) { GtkWidget *menuitem; menuitem = gtk_menu_item_new (); gtk_widget_show (menuitem); gtk_menu_shell_append (GTK_MENU_SHELL (popup), menuitem); menuitem = z_gtk_pixmap_menu_item_new (_("Record"), GTK_STOCK_SELECT_COLOR); z_tooltip_set (menuitem, _(tooltip)); z_signal_connect_python (G_OBJECT (menuitem), "activate", "zapping.record()"); gtk_widget_show (menuitem); gtk_menu_shell_append (GTK_MENU_SHELL (popup), menuitem); } static struct plugin_misc_info * plugin_get_misc_info (void) { static struct plugin_misc_info returned_struct = { sizeof (struct plugin_misc_info), /* size of this struct */ -10, /* plugin priority, we must be executed with a fully processed image */ /* Category */ PLUGIN_CATEGORY_VIDEO_OUT | PLUGIN_CATEGORY_GUI }; return (&returned_struct); } static gboolean plugin_get_public_info (gint i _unused_, gpointer * ptr _unused_, gchar ** symbol _unused_, gchar ** description _unused_, gchar ** type _unused_, gint * hash _unused_) { return FALSE; /* Nothing exported */ } static void plugin_get_info (const gchar ** canonical_name, const gchar ** descriptive_name, const gchar ** description, const gchar ** short_description, const gchar ** author, const gchar ** version) { if (canonical_name) *canonical_name = "record"; if (descriptive_name) *descriptive_name = _("Audio/Video Recorder"); if (description) *description = _("This plugin records video and audio into a file"); if (short_description) *short_description = _("Record video and audio."); if (author) *author = "Iñaki García Etxebarria, Michael H. Schimek"; if (version) *version = "0.3"; } static void plugin_close (void) { // XXX order? saving_dialog_delete (); if (export_prop) vbi3_export_delete (export_prop); export_prop = NULL; if (context_prop) rte_context_delete (context_prop); context_prop = NULL; if (active) { if (context_enc) rte_context_delete (context_enc); context_enc = NULL; if (audio_buf) free (audio_buf); audio_buf = NULL; if (audio_handle) close_audio_device (audio_handle); audio_handle = NULL; active = FALSE; } g_free (zconf_root); g_free (zconf_root_temp); zconf_root = NULL; zconf_root_temp = NULL; } static void properties_add (GtkDialog * dialog) { SidebarEntry plugin_options[] = { { N_("Record"), "gnome-media-player.png", "vbox9", .setup = pref_setup, .apply = pref_apply, .cancel = pref_cancel, .help_link_id = "zapping-settings-recording" } }; SidebarGroup groups[] = { { N_("Plugins"), plugin_options, 1 } }; standard_properties_add (dialog, groups, G_N_ELEMENTS (groups), "mpeg_properties.glade2"); } static gboolean plugin_init (PluginBridge bridge _unused_, tveng_device_info * info) { property_handler mpeg_handler = { add: properties_add }; D(); zapping_info = info; append_property_handler (&mpeg_handler); D(); cmd_register ("record", py_record, METH_VARARGS, ("Record dialog"), "zapping.record()"); cmd_register ("quickrec", py_quickrec, METH_VARARGS, ("Start recording"), "zapping.quickrec()"); cmd_register ("pauserec", py_pauserec, METH_VARARGS, ("Pause recording"), "zapping.pauserec()"); cmd_register ("stoprec", py_stoprec, METH_VARARGS, ("Stop recording"), "zapping.stoprec()"); return TRUE; } gboolean plugin_get_symbol (const gchar * name, gint hash, gpointer * ptr) { struct plugin_exported_symbol table_of_symbols[] = { SYMBOL (plugin_init, 0x1234), SYMBOL (plugin_get_info, 0x1234), SYMBOL (plugin_close, 0x1234), SYMBOL (plugin_start, 0x1234), SYMBOL (plugin_load_config, 0x1234), SYMBOL (plugin_save_config, 0x1234), SYMBOL (plugin_capture_stop, 0x1234), SYMBOL (plugin_get_public_info, 0x1234), SYMBOL (plugin_add_gui, 0x1234), SYMBOL (plugin_remove_gui, 0x1234), SYMBOL (plugin_get_misc_info, 0x1234), SYMBOL (plugin_running, 0x1234), SYMBOL (plugin_process_popup_menu, 0x1234) }; gint num_exported_symbols = sizeof (table_of_symbols) / sizeof (struct plugin_exported_symbol); gint i; for (i = 0; i < num_exported_symbols; i++) if (!strcmp (table_of_symbols[i].symbol, name)) { if (table_of_symbols[i].hash != hash) { if (ptr) *ptr = GINT_TO_POINTER (0x3); /* hash collision code */ g_warning (_("Check error: \"%s\" in plugin %s" " has hash 0x%x vs. 0x%x"), name, "record", table_of_symbols[i].hash, hash); return FALSE; } if (ptr) *ptr = table_of_symbols[i].ptr; return TRUE; /* Success */ } if (ptr) *ptr = GINT_TO_POINTER (0x2); /* Symbol not found in the plugin */ return FALSE; } gint plugin_get_protocol (void) { return PLUGIN_PROTOCOL; } #else /** * Load the plugin saying that it has been disabled due to RTE * missing, and tell the place to get it, with a handy "Goto.." button. */ #endif /* HAVE_LIBRTE */ zapping-0.10cvs6/plugins/mpeg/mpeg.h 644 764 144 4665 10173356414 12536 /* RTE (Real time encoder) front end for Zapping * Copyright (C) 2000-2001 Iaki Garca Etxebarria * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* $Id: mpeg.h,v 1.14 2005/01/19 04:07:40 mschimek Exp $ */ #ifdef HAVE_CONFIG_H # include "config.h" #endif #ifdef ENABLE_NLS # include # define R_(String) dgettext("rte", String) #else # define R_(String) (String) #endif #ifdef HAVE_LIBRTE #include extern gint grte_num_codecs (rte_context *context, rte_stream_type stream_type, rte_codec_info **info_p); #endif extern GtkWidget * grte_options_create (rte_context * context, rte_codec * codec); extern GtkWidget * grte_codec_create_menu (rte_context * context, const gchar * zc_root, const gchar * zc_conf, rte_stream_type stream_type, gint * default_item); extern rte_codec * grte_codec_load (rte_context * context, const gchar * zc_root, const gchar * zc_conf, rte_stream_type stream_type, const gchar * keyword); extern void grte_codec_save (rte_context * context, const gchar * zc_root, const gchar * zc_conf, rte_stream_type stream_type); extern GtkWidget * grte_context_create_menu (const gchar * zc_root, const gchar * zc_conf, gint * default_item); extern rte_context * grte_context_load (const gchar * zc_root, const gchar * zc_conf, const gchar * keyword, rte_codec ** audio_codec_p, rte_codec ** video_codec_p, gint * capture_w, gint * capture_h); extern void grte_context_save (rte_context * context, const gchar * zc_root, const gchar * zc_conf, gint capture_w, gint capture_h); extern void grte_config_delete (const gchar * zc_root, const gchar * zc_conf); zapping-0.10cvs6/plugins/mpeg/options.c 644 764 144 72463 10305456044 13312 /* * RTE (Real time encoder) front end for Zapping * Copyright (C) 2000-2001 Iaki Garca Etxebarria * * Export options cloned & extended 2001 byMichael H. Schimek * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* $Id: options.c,v 1.27 2005/09/01 01:40:52 mschimek Exp $ */ /* XXX gtk+ 2.3 GtkOptionMenu -> ? */ #undef GTK_DISABLE_DEPRECATED #include "src/plugin_common.h" #ifdef HAVE_LIBRTE #include #include #include "mpeg.h" #include "src/properties.h" #include "src/zspinslider.h" typedef struct grte_options { rte_context * context; rte_codec * codec; GtkWidget * table; } grte_options; static void grte_options_destroy (grte_options *opts) { g_free (opts); } static GtkWidget * ro_label_new (rte_option_info *ro) { GtkWidget *label; gchar *s; gchar *t; t = g_locale_to_utf8 (R_(ro->label), -1, NULL, NULL, NULL); g_assert (t != NULL); s = g_strdup_printf ("%s:", t); g_free (t); label = gtk_label_new (s); gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); gtk_misc_set_padding (GTK_MISC (label), 3, 3); gtk_widget_show (label); g_free (s); return label; } static void do_option_control (GtkWidget *w, gpointer user_data) { grte_options *opts = (grte_options *) user_data; char *keyword = (char *) g_object_get_data (G_OBJECT (w), "key"); rte_option_info *ro; rte_option_value val; g_assert (opts && keyword); if (!opts->context || !opts->codec || !(ro = rte_codec_option_info_by_keyword (opts->codec, keyword))) return; /* rte_option_set errors ignored */ if (ro->menu.num) { val.num = z_object_get_int_data (G_OBJECT (w), "idx"); rte_codec_option_menu_set (opts->codec, ro->keyword, val.num); } else { switch (ro->type) { case RTE_OPTION_BOOL: val.num = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (w)); break; case RTE_OPTION_INT: case RTE_OPTION_REAL: if (ro->type == RTE_OPTION_INT) { val.num = rint(GTK_ADJUSTMENT (w)->value / GTK_ADJUSTMENT (w)->step_increment); val.num *= ro->step.num; } else { val.dbl = GTK_ADJUSTMENT (w)->value * ro->step.dbl / GTK_ADJUSTMENT (w)->step_increment; val.dbl = rint(val.dbl / ro->step.dbl) * ro->step.dbl; } break; case RTE_OPTION_MENU: g_assert_not_reached(); break; case RTE_OPTION_STRING: val.str = (gchar *) gtk_entry_get_text (GTK_ENTRY (w)); break; default: g_warning ("Type %d of RTE option %s is not supported", ro->type, ro->keyword); } rte_codec_option_set (opts->codec, ro->keyword, val); } } static void on_option_control (GtkWidget *w, gpointer user_data) { do_option_control (w, user_data); /* Make sure we call z_property_item_modified for *widgets* */ if (GTK_IS_WIDGET (w)) z_property_item_modified (w); else if (GTK_IS_ADJUSTMENT (w)) z_property_item_modified ((GtkWidget *) g_object_get_data (G_OBJECT (w), "spinslider")); } static void create_entry (grte_options *opts, rte_option_info *ro, guint index) { GtkWidget *label; GtkWidget *entry; rte_option_value val; gchar *t; label = ro_label_new (ro); entry = gtk_entry_new (); if (ro->tooltip) { t = g_locale_to_utf8 (R_(ro->tooltip), -1, NULL, NULL, NULL); g_assert (t != NULL); z_tooltip_set (entry, t); g_free (t); } gtk_widget_show (entry); g_assert (rte_codec_option_get (opts->codec, ro->keyword, &val)); gtk_entry_set_text (GTK_ENTRY (entry), val.str); free (val.str); g_object_set_data (G_OBJECT (entry), "key", ro->keyword); g_signal_connect (G_OBJECT (entry), "changed", G_CALLBACK (on_option_control), opts); do_option_control (entry, opts); gtk_table_resize (GTK_TABLE (opts->table), index + 1, 2); gtk_table_attach (GTK_TABLE (opts->table), label, 0, 1, index, index + 1, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 3, 3); gtk_table_attach (GTK_TABLE (opts->table), entry, 1, 3, index, index + 1, (GtkAttachOptions) (GTK_FILL | GTK_EXPAND), (GtkAttachOptions) (0), 3, 3); } static void create_menu (grte_options *opts, rte_option_info *ro, guint index) { GtkWidget *label; /* This shows what the menu is for */ GtkWidget *option_menu; /* The option menu */ GtkWidget *menu; /* The menu displayed */ GtkWidget *menu_item; /* Each of the menu items */ int current; gint i; gchar *t; label = ro_label_new (ro); option_menu = gtk_option_menu_new (); menu = gtk_menu_new (); g_assert (ro->menu.num != NULL); if (!rte_codec_option_menu_get (opts->codec, ro->keyword, ¤t)) current = 0; for (i = ro->min.num; i <= ro->max.num; i++) { char *str; switch (ro->type) { case RTE_OPTION_BOOL: case RTE_OPTION_INT: str = rte_codec_option_print (opts->codec, ro->keyword, ro->menu.num[i]); break; case RTE_OPTION_REAL: str = rte_codec_option_print (opts->codec, ro->keyword, ro->menu.dbl[i]); break; case RTE_OPTION_STRING: str = R_(ro->menu.str[i]); break; case RTE_OPTION_MENU: str = rte_codec_option_print (opts->codec, ro->keyword, i); break; default: g_warning ("Type %d of RTE option %s is not supported", ro->type, ro->keyword); abort(); } g_assert(str != NULL); t = g_locale_to_utf8 (str, -1, NULL, NULL, NULL); g_assert (t != NULL); menu_item = gtk_menu_item_new_with_label (t); g_free (t); free(str); g_object_set_data (G_OBJECT (menu_item), "key", ro->keyword); g_object_set_data (G_OBJECT (menu_item), "idx", GINT_TO_POINTER (i)); g_signal_connect (G_OBJECT (menu_item), "activate", G_CALLBACK (on_option_control), opts); gtk_widget_show (menu_item); gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_item); if (current == i) do_option_control (menu_item, opts); } gtk_option_menu_set_menu (GTK_OPTION_MENU (option_menu), menu); gtk_option_menu_set_history (GTK_OPTION_MENU (option_menu), (guint) current); gtk_widget_show (menu); if (ro->tooltip) { t = g_locale_to_utf8 (R_(ro->tooltip), -1, NULL, NULL, NULL); g_assert (t != NULL); z_tooltip_set (option_menu, t); g_free (t); } gtk_widget_show (option_menu); gtk_table_resize (GTK_TABLE (opts->table), index + 1, 2); gtk_table_attach (GTK_TABLE (opts->table), label, 0, 1, index, index + 1, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 3, 3); gtk_table_attach (GTK_TABLE (opts->table), option_menu, 1, 3, index, index + 1, (GtkAttachOptions) (GTK_FILL | GTK_EXPAND), (GtkAttachOptions) (0), 3, 3); } static void create_slider (grte_options *opts, rte_option_info *ro, guint index) { GtkWidget *label; /* This shows what the menu is for */ GtkWidget *spinslider; GtkObject *adj; /* Adjustment object for the slider */ gdouble def, min, max, step, big_step, div, maxp; rte_option_value val; char *s; gint digits = 0; label = ro_label_new (ro); s = rte_codec_option_print (opts->codec, ro->keyword, ro->max); maxp = strtod (s, &s); while (*s == ' ') s++; g_assert (rte_codec_option_get (opts->codec, ro->keyword, &val)); if (ro->type == RTE_OPTION_INT) { def = ro->def.num; step = ro->step.num; min = ro->min.num; max = ro->max.num; val.dbl = val.num; } else { def = ro->def.dbl; step = ro->step.dbl; min = ro->min.dbl; max = ro->max.dbl; } div = maxp / max; if (div > 1.0) div = 1.0; big_step = (max - min + step) / 10; if (0) fprintf(stderr, "slider %s: def=%f min=%f max=%f step=%f foo=%f cur=%f\n", ro->keyword, (double) def, (double) min, (double) max, (double) step, (double) big_step, val.dbl); adj = gtk_adjustment_new (val.dbl * div, min * div, max * div, step * div, big_step * div, big_step * div); /* Set decimal digits so that step increments < 1.0 become visible */ if (GTK_ADJUSTMENT (adj)->step_increment == 0.0 || (digits = floor (log10 (GTK_ADJUSTMENT (adj)->step_increment))) > 0) digits = 0; spinslider = z_spinslider_new (GTK_ADJUSTMENT (adj), NULL, s, def * div, -digits); g_object_set_data (G_OBJECT (adj), "key", ro->keyword); g_object_set_data (G_OBJECT (adj), "spinslider", spinslider); g_signal_connect (G_OBJECT (adj), "value-changed", G_CALLBACK (on_option_control), opts); gtk_widget_show (spinslider); gtk_table_resize (GTK_TABLE (opts->table), index + 1, 2); gtk_table_attach (GTK_TABLE (opts->table), label, 0, 1, index, index + 1, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 3, 3); gtk_table_attach (GTK_TABLE (opts->table), spinslider, 1, 3, index, index + 1, (GtkAttachOptions) (GTK_FILL | GTK_EXPAND), (GtkAttachOptions) (0), 3, 3); } static void create_checkbutton (grte_options *opts, rte_option_info *ro, guint index) { GtkWidget *cb; rte_option_value val; gchar *t; t = g_locale_to_utf8 (R_(ro->label), -1, NULL, NULL, NULL); g_assert (t != NULL); cb = gtk_check_button_new_with_label (t); g_free (t); gtk_toggle_button_set_mode (GTK_TOGGLE_BUTTON (cb), FALSE); if (ro->tooltip) { t = g_locale_to_utf8 (R_(ro->tooltip), -1, NULL, NULL, NULL); g_assert (t != NULL); z_tooltip_set (cb, t); g_free (t); } gtk_widget_show (cb); g_assert (rte_codec_option_get (opts->codec, ro->keyword, &val)); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (cb), val.num); g_object_set_data (G_OBJECT (cb), "key", ro->keyword); g_signal_connect (G_OBJECT (cb), "toggled", G_CALLBACK (on_option_control), opts); do_option_control (cb, opts); gtk_table_resize (GTK_TABLE (opts->table), index + 1, 2); gtk_table_attach (GTK_TABLE (opts->table), cb, 1, 3, index, index + 1, (GtkAttachOptions) (GTK_FILL | GTK_EXPAND), (GtkAttachOptions) (0), 3, 3); } /** * grte_options_create: * @context: * @codec: * * Create a tree of GtkWidgets containing all options of &rte_codec @codec * of &rte_context @context. Initially the option widgets will display the * respective CURRENT value of the &rte_codec option, you may need to reset * the options by other means first. DO NOT delete the @context or @codec * while Gtk may access this tree. * * + frame "Options" * + table (3 * n) * + option (label || menu) * + option (label | value | [ slider | reset ]) * + option (label || entry) * + option (|| button) * * On any widget change, the respective &rte_codec option will be set. * * Return value: * &GtkWidget pointer, %NULL when the @codec has no options. * * BUGS: * No verification of user input, all rte errors will be ignored. * Undocumented filtering of options. **/ GtkWidget * grte_options_create (rte_context *context, rte_codec *codec) { GtkWidget *frame; grte_options *opts; rte_option_info *ro; guint index; unsigned int i; if (!rte_codec_option_info_enum (codec, 0)) return NULL; /* no options */ opts = g_malloc (sizeof (*opts)); opts->context = context; opts->codec = codec; frame = gtk_frame_new (_("Options")); gtk_widget_show (frame); g_object_set_data_full (G_OBJECT (frame), "opts", opts, (GtkDestroyNotify) grte_options_destroy); opts->table = gtk_table_new (1, 3, FALSE); gtk_widget_show (opts->table); for (i = 0, index = 0; (ro = rte_codec_option_info_enum (codec, i)); i++) { #ifdef LIBRTE4 if (strcmp(ro->keyword, "coded_frame_rate") == 0) continue; /* we'll override this */ else if (ro->entries > 0) #else if (!ro->label) continue; /* experts only */ else if (ro->menu.num) #endif create_menu (opts, ro, index++); else switch (ro->type) { case RTE_OPTION_BOOL: create_checkbutton (opts, ro, index++); break; case RTE_OPTION_INT: case RTE_OPTION_REAL: create_slider (opts, ro, index++); break; case RTE_OPTION_MENU: g_assert_not_reached (); break; case RTE_OPTION_STRING: create_entry (opts, ro, index++); break; default: g_warning ("Type %d of RTE option %s is not supported", ro->type, ro->keyword); continue; } if (strcmp(ro->keyword, "audio_mode") == 0) { /* insert auto option */ } } gtk_container_add (GTK_CONTAINER (frame), opts->table); return frame; } /* * Config tree, rte 0.5+ rte 0.4 * * /zapping/plugins/record ZCONF_DOMAIN * + ... * + /configs nil * + / "user config name" / "default" * + format = ... * + audio_codec = ... * + video_codec = ... * + ... * + / context } to do nil * + option = ... } * + / codecs nil * + / "codec name" / "codec name" * + option = ... * : * + / vbi_file_options * + option = ... * : * * Note this assumes a stream can consist of exactly one video * and/or audio stream, which is a limitation of Zapping, not rte. * * All functions accessing this tree below. */ #define CONFIGS "/configs/" #define CODECS "/codecs/" /** * grte_options_load: * @codec: * @zc_domain: * * Set the value of all options of #rte_codec @codec which are configured * in the Zapping config file under @zc_domain. All other options * remain unchanged (usually at their respective defaults). * * XXX the zconf error handling is unsatisfactory. Keeping the default * if nothing else is known seems ok, but I don't want to record crap * because of some unreported problem (permissions, read error etc) * (should display the error cause too) * * Return value: * FALSE if an error ocurred, in this case options may be only * partially loaded. **/ static gboolean grte_options_load (rte_codec * codec, const gchar * zc_domain) { rte_option_info *ro; unsigned int i; g_assert (codec && zc_domain); for (i = 0; (ro = rte_codec_option_info_enum (codec, i)); i++) { gchar *zcname; rte_option_value val; if (!ro->label) continue; /* experts only */ zcname = g_strconcat (zc_domain, "/", ro->keyword, NULL); switch (ro->type) { case RTE_OPTION_BOOL: val.num = zconf_get_boolean (NULL, zcname); break; case RTE_OPTION_INT: case RTE_OPTION_MENU: val.num = zconf_get_int (NULL, zcname); break; case RTE_OPTION_REAL: val.dbl = zconf_get_float (NULL, zcname); break; case RTE_OPTION_STRING: val.str = (char *) zconf_get_string (NULL, zcname); break; default: g_warning ("Unknown option keyword %d in grte_load_options", ro->type); break; } g_free (zcname); if (zconf_error ()) continue; if (!rte_codec_option_set (codec, ro->keyword, val)) return FALSE; } return TRUE; } /** * grte_options_save: * @codec: * @zc_domain: * * Save the current value of all options of #rte_codec @codec in the Zapping * config file under @zc_domain. * * Return value: * FALSE if an error ocurred, in this case options may be only * partially saved. **/ static gboolean grte_options_save (rte_codec * codec, const gchar * zc_domain) { rte_option_info *ro; unsigned int i; gchar *t; g_assert (codec && zc_domain); for (i = 0; (ro = rte_codec_option_info_enum (codec, i)); i++) { gchar *zcname = g_strconcat (zc_domain, "/", ro->keyword, NULL); rte_option_value val; if (!rte_codec_option_get (codec, ro->keyword, &val)) { g_free(zcname); return FALSE; } switch (ro->type) { case RTE_OPTION_BOOL: /* Create won't set an already existing variable, * Set won't create one with description. */ if (ro->tooltip) { t = g_locale_to_utf8 (R_(ro->tooltip), -1, NULL, NULL, NULL); g_assert (t != NULL); } else { t = NULL; } zconf_create_boolean (val.num, t, zcname); g_free (t); zconf_set_boolean (val.num, zcname); break; case RTE_OPTION_INT: case RTE_OPTION_MENU: if (ro->tooltip) { t = g_locale_to_utf8 (R_(ro->tooltip), -1, NULL, NULL, NULL); g_assert (t != NULL); } else { t = NULL; } zconf_create_int (val.num, t, zcname); g_free (t); zconf_set_int (val.num, zcname); break; case RTE_OPTION_REAL: if (ro->tooltip) { t = g_locale_to_utf8 (R_(ro->tooltip), -1, NULL, NULL, NULL); g_assert (t != NULL); } else { t = NULL; } zconf_create_float (val.dbl, t, zcname); g_free (t); zconf_set_float (val.dbl, zcname); break; case RTE_OPTION_STRING: if (ro->tooltip) { t = g_locale_to_utf8 (R_(ro->tooltip), -1, NULL, NULL, NULL); g_assert (t != NULL); } else { t = NULL; } zconf_create_string (val.str, t, zcname); g_free (t); zconf_set_string (val.str, zcname); free (val.str); break; default: g_warning ("Type %d of RTE option %s is not supported", ro->type, ro->keyword); } g_free (zcname); } return TRUE; } static const gchar * codec_type_string[RTE_STREAM_MAX + 1] = { NULL, "video_codec", "audio_codec", "vbi_codec", }; /** * grte_codec_create_menu: * @context: * @stream_type: * @zc_root: * @zc_conf: * @default_item: * * Create a #GtkMenu consisting of all codecs available for * #rte_context @context, of @stream_type (%RTE_STREAM_VIDEO or * %RTE_STREAM_AUDIO). The first menu item (number 0) will be "None". * * For all items except "None", a #GtkObject value "keyword" is allocated, * pointing to the respective #rte_codec_info keyword. * * When @default_item is given, this function queries the codec configured * for this @stream_type from the Zapping config file under @zc_root // * @zc_conf. Then @default_item is set to the item number listing said * codec, or item 0. * * Return value: * #GtkWidget pointer, %NULL if no codecs are available. * * BUGS: * The menu will always contain "None", even if the context offers * only one codec, or no suitable codec is available. **/ GtkWidget * grte_codec_create_menu (rte_context * context, const gchar * zc_root, const gchar * zc_conf, rte_stream_type stream_type, gint * default_item) { GtkWidget *menu, *menu_item; rte_context_info *cxinfo; rte_codec_info *cdinfo; gchar *zcname; const gchar *keyword = 0; gint base = 1, items = 0; int i; if (default_item) { zcname = g_strconcat (zc_root, CONFIGS, zc_conf, "/", codec_type_string[stream_type], NULL); keyword = (char *) zconf_get_string (NULL, zcname); g_free (zcname); if (!keyword || !keyword[0]) { keyword = ""; *default_item = 0; /* "None" */ } else { *default_item = 1; /* first valid */ } } menu = gtk_menu_new (); g_assert ((cxinfo = rte_context_info_by_context (context))); if (cxinfo->min_elementary[stream_type] != 1) /* "None" permitted? */ { menu_item = gtk_menu_item_new_with_label (_("No codec")); gtk_widget_show (menu_item); gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_item); } else { /* gtk_widget_set_sensitive (menu_item, FALSE); */ if (default_item) *default_item = 0; base = 0; } // XXX it makes no sense to display a menu when there's // really no choice for (i = 0; (cdinfo = rte_codec_info_enum (context, (guint) i)); i++) { gchar *t; if (cdinfo->stream_type != stream_type) continue; t = g_locale_to_utf8 (R_(cdinfo->label), -1, NULL, NULL, NULL); g_assert (t != NULL); menu_item = gtk_menu_item_new_with_label (t); g_free (t); z_object_set_const_data (G_OBJECT (menu_item), "keyword", cdinfo->keyword); if (cdinfo->tooltip) { t = g_locale_to_utf8 (R_(cdinfo->tooltip), -1, NULL, NULL, NULL); g_assert (t != NULL); z_tooltip_set (menu_item, t); g_free (t); } gtk_widget_show (menu_item); gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_item); if (default_item) if (strcmp (keyword, cdinfo->keyword) == 0) *default_item = base + items; items++; } return menu; } /** * grte_num_codecs: * @context: * @stream_type: * @info_p: * * Return value: * Number of codecs of @stream_type available for @context. When * @info_p is not %NULL and number of codecs is 1, a pointer to * its #rte_codec_info is stored here. **/ gint grte_num_codecs (rte_context * context, rte_stream_type stream_type, rte_codec_info ** info_p) { rte_codec_info *info; gint count, i; if (!info_p) info_p = &info; count = 0; for (i = 0; (*info_p = rte_codec_info_enum (context, (guint) i)); i++) if ((*info_p)->stream_type == stream_type) count++; return count; } /** * grte_codec_load: * @context: * @zc_root: * @zc_conf: * @keyword: * @stream_type: * * Set the #rte_codec for @stream_type (%RTE_STREAM_AUDIO or %RTE_STREAM_VIDEO) * of #rte_context @context named by @keyword and configure according to the * Zapping config file under @zc_root // @zc_conf. When @keyword is * %NULL, the #rte_codec configured in the Zapping config file will be set. * * Return value: * #rte_codec pointer (as returned by rte_codec_set()) or %NULL if no codec * has been configured for this %stream_type or another error ocurred. **/ rte_codec * grte_codec_load (rte_context * context, const gchar * zc_root, const gchar * zc_conf, rte_stream_type stream_type, const gchar * keyword) { rte_codec *codec = NULL; gchar *zcname; if (!keyword) { zcname = g_strconcat (zc_root, CONFIGS, zc_conf, "/", codec_type_string[stream_type], NULL); keyword = (const gchar *) zconf_get_string (NULL, zcname); g_free (zcname); } if (keyword && keyword[0]) { codec = rte_set_codec (context, keyword, 0, NULL); if (codec) { zcname = g_strconcat (zc_root, CONFIGS, zc_conf, CODECS, keyword, NULL); grte_options_load (codec, zcname); g_free (zcname); } } return codec; } /** * grte_codec_save: * @context: * @zc_root: * @zc_conf: * @stream_type: * * Save the configuration of the codec set for @stream_type (%RTE_STREAM_AUDIO * or %RTE_STREAM_VIDEO) of #rte_context @context in the Zapping config file * under @zc_root // @zc_conf. **/ void grte_codec_save (rte_context * context, const gchar * zc_root, const gchar * zc_conf, rte_stream_type stream_type) { rte_codec *codec; rte_codec_info *info; gchar *zcname; g_assert (zc_root && zc_root[0]); g_assert (zc_conf && zc_conf[0]); zcname = g_strconcat (zc_root, CONFIGS, zc_conf, "/", codec_type_string[stream_type], NULL); codec = rte_get_codec (context, stream_type, 0); if (codec) { g_assert ((info = rte_codec_info_by_codec (codec))); zconf_set_string (info->keyword, zcname); g_free (zcname); zcname = g_strconcat (zc_root, CONFIGS, zc_conf, CODECS, info->keyword, NULL); grte_options_save (codec, zcname); } else { zconf_set_string ("", zcname); } g_free (zcname); } /** * grte_context_create_menu: * @zc_root: * @zc_conf: * @default_item: * * Create a #GtkMenu consisting of all rte formats / backends / multiplexers * available. For all items except "None", a #GtkObject value "keyword" is * allocated, pointing to the respective #rte_context_info keyword. * * When @default_item is given, this function queries the format configured * for this @stream_type from the Zapping config file under @zc_root // * @zc_conf. Then @default_item is set to the item number listing said * format, or item 0. * * Return value: * #GtkWidget pointer, %NULL if no formats are available. * * BUGS: * Assumes the format list is never empty. **/ GtkWidget * grte_context_create_menu (const gchar * zc_root, const gchar * zc_conf, gint * default_item) { GtkWidget *menu, *menu_item; rte_context_info *info; gchar *zcname; const gchar *keyword = 0; gint items = 0; int i; if (default_item) { zcname = g_strconcat (zc_root, CONFIGS, zc_conf, "/format", NULL); keyword = (char *) zconf_get_string (NULL, zcname); g_free (zcname); if (!keyword || !keyword[0]) keyword = ""; *default_item = 0; } menu = gtk_menu_new (); // XXX prepare for empty menu for (i = 0; (info = rte_context_info_enum ((guint) i)); i++) { gchar *label; gchar *t; t = g_locale_to_utf8 (R_(info->label), -1, NULL, NULL, NULL); g_assert (t != NULL); label = g_strconcat (info->backend, " | ", t, NULL); g_free (t); menu_item = gtk_menu_item_new_with_label (label); g_free(label); z_object_set_const_data (G_OBJECT (menu_item), "keyword", info->keyword); if (info->tooltip) { t = g_locale_to_utf8 (R_(info->tooltip), -1, NULL, NULL, NULL); g_assert (t != NULL); z_tooltip_set (menu_item, t); g_free (t); } gtk_widget_show (menu_item); gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_item); if (default_item) if (strcmp (keyword, info->keyword) == 0) *default_item = items; items++; } return menu; } /** * grte_context_load: * @zc_root: * @zc_conf: * @audio_codec_p: * @video_codec_p: * * Allocate a new #rte_context @context encoding the format @keyword, * and configure according to the Zapping config file entries under * @zc_root // @zc_conf. When @keyword is %NULL, the format * configured in the Zapping config file will be used. * * If given, pointers to the respective audio and video #rte_codec are * stored in @audio_codec_p and @video_codec_p. They will be %NULL when * the respective stream (audio or video) is not applicable or the codec * has been configured as "None". * * Return value: * #rte_context pointer, %NULL if the Zapping config file is empty * or another error occured. **/ rte_context * grte_context_load (const gchar * zc_root, const gchar * zc_conf, const gchar * keyword, rte_codec ** audio_codec_p, rte_codec ** video_codec_p, gint * capture_w, gint * capture_h) { gchar *zcname; rte_context *context; rte_codec *dummy; if (!keyword) { zcname = g_strconcat (zc_root, CONFIGS, zc_conf, "/format", NULL); keyword = (const gchar *) zconf_get_string (NULL, zcname); g_free (zcname); if (!keyword || !keyword[0]) return NULL; } /* preliminary */ if (capture_w) { zcname = g_strconcat (zc_root, CONFIGS, zc_conf, "/capture_width", NULL); zconf_create_int (384, "Capture width", zcname); zconf_get_int (capture_w, zcname); g_free (zcname); } if (capture_h) { zcname = g_strconcat (zc_root, CONFIGS, zc_conf, "/capture_height", NULL); zconf_create_int (288, "Capture height", zcname); zconf_get_int (capture_h, zcname); g_free (zcname); } context = rte_context_new (keyword, NULL, NULL); if (!context) return NULL; if (!audio_codec_p) audio_codec_p = &dummy; if (!video_codec_p) video_codec_p = &dummy; *audio_codec_p = grte_codec_load (context, zc_root, zc_conf, RTE_STREAM_AUDIO, NULL); *video_codec_p = grte_codec_load (context, zc_root, zc_conf, RTE_STREAM_VIDEO, NULL); return context; } /** * grte_context_save: * @context: * @zc_root: * @zc_conf: * * Save the configuration of #rte_context @context in the Zapping * config file under @zc_root // @zc_conf. **/ void grte_context_save (rte_context * context, const gchar * zc_root, const gchar * zc_conf, gint capture_w, gint capture_h) { rte_context_info *info; gchar *zcname; g_assert (zc_root && zc_root[0]); g_assert (zc_conf && zc_conf[0]); g_assert ((info = rte_context_info_by_context (context))); zcname = g_strconcat (zc_root, CONFIGS, zc_conf, "/format", NULL); zconf_set_string (info->keyword, zcname); g_free (zcname); { /* preliminary */ zcname = g_strconcat (zc_root, CONFIGS, zc_conf, "/capture_width", NULL); zconf_set_int (capture_w, zcname); g_free (zcname); zcname = g_strconcat (zc_root, CONFIGS, zc_conf, "/capture_height", NULL); zconf_set_int (capture_h, zcname); g_free (zcname); } grte_codec_save (context, zc_root, zc_conf, RTE_STREAM_AUDIO); grte_codec_save (context, zc_root, zc_conf, RTE_STREAM_VIDEO); } /** * grte_config_delete: * @zc_root: * @zc_conf: * * Delete the entry @zc_root // @zc_conf in the Zapping * config file. **/ void grte_config_delete (const gchar * zc_root, const gchar * zc_conf) { gchar *zcname; zcname = g_strconcat (zc_root, CONFIGS, zc_conf, NULL); zconf_delete (zcname); g_free (zcname); } #endif /* HAVE_LIBRTE */ zapping-0.10cvs6/plugins/mpeg/pixmaps.h 644 764 144 32556 10433067545 13312 /* Generated file, do not edit! */ /* GdkPixbuf RGBA C-Source image dump 1-byte-run-length-encoded */ static const GdkPixdata record_png = { 0x47646b50, /* Pixbuf magic: 'GdkP' */ 24 + 677, /* header length + pixel_data length */ 0x2010002, /* pixdata_type */ 96, /* rowstride */ 24, /* width */ 24, /* height */ /* pixel_data: */ "\313\275\275\275\0\222\343\343\343\0\206\275\275\275\0\205\343\343\343" "\0\2\211\211\211\0kkk\377\203\0\0\0\377\2kkk\377\211\211\211\0\206\343" "\343\343\0\206\275\275\275\0\204\343\343\343\0\3iii\377\0\0\0\377\324" "\210\210\377\203\364\210\210\377\4\324\210\210\377\0\0\0\377iii\377\202" "\202\202\0\204\343\343\343\0\206\275\275\275\0\203\343\343\343\0\2\0" "\0\0\377\304mm\377\207\364\210\210\377\3\304mm\377\0\0\0\377\202\202" "\202\0\203\343\343\343\0\206\275\275\275\0\202\343\343\343\0\2iii\377" "\304mm\377\211\364\210\210\377\3\304mm\377iii\377\202\202\202\0\202\343" "\343\343\0\206\275\275\275\0\3\343\343\343\0\211\211\211\0\0\0\0\377" "\213\364\210\210\377\2\0\0\0\377\211\211\211\377\202\343\343\343\0\206" "\275\275\275\0\3\343\343\343\0kkk\377\326~~\377\213\354||\377\2\326~" "~\377kkk\377\202\202\202\202\0\2\275\275\275\0\211\211\211J\204\275\275" "\275\0\2\343\343\343\0\0\0\0\377\215\344pp\377\3\0\0\0\377\0\0\0\0\343" "\343\343\0\206\275\275\275\0\2\343\343\343\0\0\0\0\377\215\335cc\377" "\3\0\0\0\377\0\0\0\0\343\343\343\0\206\275\275\275\0\2\343\343\343\0" "\0\0\0\377\215\325WW\377\3\0\0\0\377\0\0\0\0\343\343\343\0\206\275\275" "\275\0\3\343\343\343\0kkk\377\276WW\377\213\315JJ\377\4\276WW\377kkk" "\377\202\202\202\0\343\343\343\0\206\275\275\275\0\3\343\343\343\0\211" "\211\211\0\0\0\0\377\213\306>>\377\4\0\0\0\377\211\211\211\0\202\202" "\202\0\343\343\343\0\206\275\275\275\0\202\343\343\343\0\2iii\377\230" "''\377\211\27611\377\3\230''\377iii\377\202\202\202\0\202\343\343\343" "\0\206\275\275\275\0\202\343\343\343\0\3\202\202\202\0\0\0\0\377\222" "\35\35\377\207\266%%\377\2\222\35\35\377\0\0\0\377\202\202\202\202\0" "\202\343\343\343\0\206\275\275\275\0\203\343\343\343\0\4\202\202\202" "\0iii\377\0\0\0\377\24388\377\203\257\30\30\377\3\24388\377\0\0\0\377" "iii\377\202\202\202\202\0\203\343\343\343\0\206\275\275\275\0\204\343" "\343\343\0\3\202\202\202\0\211\211\211\0kkk\377\203\0\0\0\377\2kkk\377" "\211\211\211\0\202\202\202\202\0\204\343\343\343\0\206\275\275\275\0" "\206\343\343\343\0\1\202\202\202\0\203\0\0\0\0\202\202\202\202\0\206" "\343\343\343\0\206\275\275\275\0\222\343\343\343\0\313\275\275\275\0", }; /* GdkPixbuf RGBA C-Source image dump 1-byte-run-length-encoded */ static const GdkPixdata pause_png = { 0x47646b50, /* Pixbuf magic: 'GdkP' */ 24 + 903, /* header length + pixel_data length */ 0x2010002, /* pixdata_type */ 96, /* rowstride */ 24, /* width */ 24, /* height */ /* pixel_data: */ "\374\275\275\275\0\202\202\202\202\0\1\275\275\275\0\204\0\0\0\377\202" "\0\0\0\0\204\0\0\0\377\204\0\0\0\0\207\275\275\275\0\202\202\202\202" "\0\2\0\0\0\0\0\0\0\377\202\341\352\337\377\4\0\0\0\377\341\352\337\0" "\0\0\0\0\0\0\0\377\202\341\352\337\377\5\0\0\0\377\341\352\337\0\0\0" "\0\0\341\352\337\0\0\0\0\0\207\275\275\275\0\202\202\202\202\0\2\360" "\364\357\0\0\0\0\377\202\377\377\377\377\4\0\0\0\377\377\377\377\0\0" "\0\0\0\0\0\0\377\202\377\377\377\377\5\0\0\0\377\377\377\377\0\0\0\0" "\0\377\377\377\0\0\0\0\0\207\275\275\275\0\202\202\202\202\0\2\363\367" "\363\0\0\0\0\377\202\377\377\377\377\4\0\0\0\377\377\377\377\0\0\0\0" "\0\0\0\0\377\202\377\377\377\377\5\0\0\0\377\377\377\377\0\0\0\0\0\377" "\377\377\0\0\0\0\0\207\275\275\275\0\202\202\202\202\0\2\364\367\364" "\0\0\0\0\377\202\377\377\377\377\4\0\0\0\377\377\377\377\0\0\0\0\0\0" "\0\0\377\202\377\377\377\377\5\0\0\0\377\377\377\377\0\0\0\0\0\377\377" "\377\0\0\0\0\0\207\275\275\275\0\4\0\0\0\0\377\377\377\0\357\363\356" "\0\0\0\0\377\202\377\377\377\377\4\0\0\0\377\377\377\377\0\0\0\0\0\0" "\0\0\377\202\377\377\377\377\5\0\0\0\377\377\377\377\0\0\0\0\0\377\377" "\377\0\0\0\0\0\207\275\275\275\0\4\0\0\0\0\377\377\377\0\357\363\356" "\0\0\0\0\377\202\377\377\377\377\4\0\0\0\377\377\377\377\0\0\0\0\0\0" "\0\0\377\202\377\377\377\377\5\0\0\0\377\377\377\377\0\0\0\0\0\377\377" "\377\0\0\0\0\0\207\275\275\275\0\4\0\0\0\0\235\273\220\0\210\254\200" "\0\0\0\0\377\202\235\273\220\377\4\0\0\0\377\235\273\220\0\0\0\0\0\0" "\0\0\377\202\235\273\220\377\5\0\0\0\377\235\273\220\0\0\0\0\0\235\273" "\220\0\0\0\0\0\207\275\275\275\0\4\0\0\0\0\232\273\217\0\203\252z\0\0" "\0\0\377\202\232\273\217\377\4\0\0\0\377\232\273\217\0\0\0\0\0\0\0\0" "\377\202\232\273\217\377\5\0\0\0\377\232\273\217\0\0\0\0\0\232\273\217" "\0\0\0\0\0\207\275\275\275\0\4\0\0\0\0\232\273\217\0\207\254}\0\0\0\0" "\377\202\232\273\217\377\4\0\0\0\377\232\273\217\0\0\0\0\0\0\0\0\377" "\202\232\273\217\377\5\0\0\0\377\232\273\217\0\0\0\0\0\232\273\217\0" "\0\0\0\0\207\275\275\275\0\4\0\0\0\0\220\263\207\0\200\247v\0\0\0\0\377" "\202\220\263\207\377\4\0\0\0\377\220\263\207\0\0\0\0\0\0\0\0\377\202" "\220\263\207\377\5\0\0\0\377\220\263\207\0\0\0\0\0\220\263\207\0\0\0" "\0\0\207\275\275\275\0\4\0\0\0\0\203\252|\0]\205T\0\0\0\0\377\202\203" "\252|\377\4\0\0\0\377\203\252|\0\0\0\0\0\0\0\0\377\202\203\252|\377\5" "\0\0\0\377\203\252|\0\0\0\0\0\203\252|\0\0\0\0\0\207\275\275\275\0\4" "\0\0\0\0\77e4\0\0\0\0\0\0\0\0\377\202\77e4\377\4\0\0\0\377\77e4\0\0\0" "\0\0\0\0\0\377\202\77e4\377\5\0\0\0\377\77e4\0\0\0\0\0\77e4\0\0\0\0\0" "\207\275\275\275\0\202\0\0\0\0\1\275\275\275\0\204\0\0\0\377\202\0\0" "\0\0\204\0\0\0\377\204\0\0\0\0\373\275\275\275\0", }; /* GdkPixbuf RGBA C-Source image dump 1-byte-run-length-encoded */ static const GdkPixdata stop_png = { 0x47646b50, /* Pixbuf magic: 'GdkP' */ 24 + 429, /* header length + pixel_data length */ 0x2010002, /* pixdata_type */ 96, /* rowstride */ 24, /* width */ 24, /* height */ /* pixel_data: */ "\374\275\275\275\0\1\202\202\202\0\216\0\0\0\377\202\0\0\0\0\207\275" "\275\275\0\2\202\202\202\0\0\0\0\377\214\341\352\337\377\3\0\0\0\377" "\341\352\337\0\0\0\0\0\207\275\275\275\0\2\202\202\202\0\0\0\0\377\214" "\377\377\377\377\3\0\0\0\377\377\377\377\0\0\0\0\0\207\275\275\275\0" "\2\202\202\202\0\0\0\0\377\214\377\377\377\377\3\0\0\0\377\377\377\377" "\0\0\0\0\0\207\275\275\275\0\2\202\202\202\0\0\0\0\377\214\377\377\377" "\377\3\0\0\0\377\377\377\377\0\0\0\0\0\207\275\275\275\0\2\0\0\0\0\0" "\0\0\377\214\377\377\377\377\3\0\0\0\377\377\377\377\0\0\0\0\0\207\275" "\275\275\0\2\0\0\0\0\0\0\0\377\214\377\377\377\377\3\0\0\0\377\377\377" "\377\0\0\0\0\0\207\275\275\275\0\2\0\0\0\0\0\0\0\377\214\235\273\220" "\377\3\0\0\0\377\235\273\220\0\0\0\0\0\207\275\275\275\0\2\0\0\0\0\0" "\0\0\377\214\232\273\217\377\3\0\0\0\377\232\273\217\0\0\0\0\0\207\275" "\275\275\0\2\0\0\0\0\0\0\0\377\214\232\273\217\377\3\0\0\0\377\232\273" "\217\0\0\0\0\0\207\275\275\275\0\2\0\0\0\0\0\0\0\377\214\220\263\207" "\377\3\0\0\0\377\220\263\207\0\0\0\0\0\207\275\275\275\0\2\0\0\0\0\0" "\0\0\377\214\203\252|\377\3\0\0\0\377\203\252|\0\0\0\0\0\207\275\275" "\275\0\2\0\0\0\0\0\0\0\377\214\77e4\377\3\0\0\0\377\77e4\0\0\0\0\0\207" "\275\275\275\0\1\0\0\0\0\216\0\0\0\377\202\0\0\0\0\373\275\275\275\0", }; /* GdkPixbuf RGBA C-Source image dump 1-byte-run-length-encoded */ static const GdkPixdata disk_empty_png = { 0x47646b50, /* Pixbuf magic: 'GdkP' */ 24 + 357, /* header length + pixel_data length */ 0x2010002, /* pixdata_type */ 48, /* rowstride */ 12, /* width */ 12, /* height */ /* pixel_data: */ "\203\340\340\340\0\2ttt\377HHH\377\203\0\0\0\377\1ppp\377\205\340\340" "\340\0\4ttt\377\311\311\311\377\367\367\367\377\374\374\374\377\203\0" "\0\0\377\1BBB\377\203\340\340\340\0\3ttt\377\365\365\365\377\367\367" "\367\377\202\374\374\374\377\203\0\0\0\377\5\77\77\77\377ttt\377\340" "\340\340\0ttt\377\306\306\306\377\204\374\374\374\377\202\0\0\0\377\1" "\77\77\77\377\202\335\335\335\377\3ttt\377HHH\377\367\367\367\377\204" "\374\374\374\377\3\0\0\0\377\77\77\77\377\335\335\335\377\202\374\374" "\374\377\2HHH\377\0\0\0\377\205\374\374\374\377\2\77\77\77\377\335\335" "\335\377\203\374\374\374\377\202\0\0\0\377\205\374\374\374\377\1\335" "\335\335\377\204\374\374\374\377\2\0\0\0\377HHH\377\212\374\374\374\377" "\4HHH\377ttt\377\310\310\310\377\371\371\371\377\207\374\374\374\377" "\5\306\306\306\377ttt\377\340\340\340\0sss\377\364\364\364\377\206\374" "\374\374\377\2\365\365\365\377sss\377\203\340\340\340\0\3ttt\377\306" "\306\306\377\367\367\367\377\203\374\374\374\377\3\306\306\306\377tt" "t\377\335\335\335\0\203\340\340\340\0\3\343\343\343\0ttt\377HHH\377\202" "\0\0\0\377\3HHH\377sss\377\343\343\343\0\202\340\340\340\0", }; /* GdkPixbuf RGBA C-Source image dump 1-byte-run-length-encoded */ static const GdkPixdata drop_png = { 0x47646b50, /* Pixbuf magic: 'GdkP' */ 24 + 323, /* header length + pixel_data length */ 0x2010002, /* pixdata_type */ 48, /* rowstride */ 12, /* width */ 12, /* height */ /* pixel_data: */ "\217\0\0\0\0\2$$\0\377\266\266\252\377\211\0\0\0\0\4$$\0\377\377\377" "\377\377$$\0\377\266\266\252\377\207\0\0\0\0\2$$\0\377\266\266\252\377" "\202\377\377\377\377\1\0\0\0\377\210\0\0\0\0\3\0\0\0\377\266\266\252" "\377\0\0\0\377\212\0\0\0\0\1\0\0\0\377\203\0\0\0\0\2\0\0\0\377\266\266" "\252\377\205\0\0\0\0\1mmU\377\203\0\0\0\0\4\0\0\0\377\377\377\377\377" "$$\0\377\266\266\252\377\203\0\0\0\0\2\0\0\0\377\266\266\252\377\202" "mmU\377\2\0\0\0\377\266\266\252\377\202\377\377\377\377\2\0\0\0\377\266" "\266\252\377\202\0\0\0\0\17mmU\377\377\377\377\377\266\266\252\377\0" "\0\0\377\0\0\0\0$$\0\377\266\266\252\377\0\0\0\377\377\377\377\377$$" "\0\377\266\266\252\377\0\0\0\377\266\266\252\377\377\377\377\377mmU\377" "\203\0\0\0\0\2$$\0\377\266\266\252\377\202\377\377\377\377\1$$\0\377" "\202mmU\377\2\266\266\252\377\0\0\0\377\204\0\0\0\0\3$$\0\377\266\266" "\252\377\0\0\0\377\203\0\0\0\0\1mmU\377\206\0\0\0\0\1$$\0\377\202\0\0" "\0\0", }; /* GdkPixbuf RGBA C-Source image dump 1-byte-run-length-encoded */ static const GdkPixdata time_png = { 0x47646b50, /* Pixbuf magic: 'GdkP' */ 24 + 508, /* header length + pixel_data length */ 0x2010002, /* pixdata_type */ 48, /* rowstride */ 12, /* width */ 12, /* height */ /* pixel_data: */ "\204\370\374\370\0\1ptp\377\202@D@\377\1ptp\377\206\370\374\370\0\10" "\240\244\240\377HHH\377\260\260\260\377\370\374\370\377\350\354\350\377" "\230\234\230\3778<8\377\240\244\240\377\203\370\374\370\0\12\240\244" "\240\377ptp\377\360\360\360\377\330\330\320\377\270\300\270\377\300\304" "\300\377\330\334\330\377\320\324\320\377ptp\377\240\244\240\377\202\370" "\374\370\0\34""8<8\377\340\344\340\377\260\260\250\377\240\240\230\377" "\250\260\250\377\260\264\250\377\240\244\230\37700(\377\310\314\310\377" "8<8\377\370\374\370\0ptp\377\220\224\220\377\310\314\310\377xxp\3778" "80\377\300\304\270\377\310\310\300\377(((\377PXP\377\330\330\320\377" "\210\210\210\377ptp\377@D@\377\340\344\340\377\270\274\270\377\250\250" "\240\377hh`\377\202(,(\377\4ptp\377\310\320\310\377\320\324\310\377\250" "\250\250\377\202@D@\377\"\340\344\340\377\300\300\270\377\250\254\240" "\377\300\304\270\377@@8\377@D@\377\320\324\320\377\320\324\310\377\320" "\330\320\377\250\250\250\377@D@\377ptp\377\220\224\220\377\320\324\320" "\377\250\254\240\377\270\274\260\377\300\304\270\377\310\314\300\377" "\320\324\310\377\320\330\320\377\330\334\330\377\210\210\210\377ptp\377" "\370\374\370\0""8<8\377\320\324\320\377\300\304\300\377\260\264\250\377" "\300\304\270\377\310\314\300\377\310\320\310\377\320\324\310\377\260" "\264\260\3778<8\377\202\370\374\370\0\13\240\244\240\377hhh\377\330\330" "\330\377\330\334\330\377\320\324\320\377\320\320\310\377\320\324\320" "\377\260\264\260\377ptp\377\240\244\240\377\377\377\377\0\202\370\374" "\370\0\10\240\244\240\377@@@\377\230\230\230\377\320\320\320\377\300" "\304\300\377xxx\3778<8\377\240\244\240\377\202\377\377\377\0\204\370" "\374\370\0\1ptp\377\202@D@\377\2ptp\377\370\374\370\0\203\377\377\377" "\0", }; /* GdkPixbuf RGBA C-Source image dump 1-byte-run-length-encoded */ static const GdkPixdata volume_png = { 0x47646b50, /* Pixbuf magic: 'GdkP' */ 24 + 368, /* header length + pixel_data length */ 0x2010002, /* pixdata_type */ 48, /* rowstride */ 12, /* width */ 12, /* height */ /* pixel_data: */ "\220\370\374\370\0\202\240\244\240\377\204\370\374\370\0\1ptp\377\204" "\370\374\370\0\3\240\244\240\377\40\40\30\377\210\214\210\377\202\370" "\374\370\0\2X\\X\377\270\274\270\377\202\210\214\210\377\202@D@\377\4" "\240\244\240\377X\\P\377pph\377\210\214\210\377\202\240\244\240\377\202" "\210\214\210\3772\270\274\270\377X\\X\377880\377\250\244\230\377880\377" "\300\304\270\377\220\214\210\377X\\X\377\370\374\370\0@D@\377\370\374" "\370\0@D@\377\370\374\370\0@D@\3778<8\377\270\264\240\377@@8\377\300" "\274\260\377\200|p\377\0\0\0\377\370\374\370\0@D@\377\370\374\370\0@" "D@\377\370\374\370\0@D@\377(,(\377\210\214\200\37700(\377\240\240\220" "\377pl`\377(,(\377\370\374\370\0@D@\377\370\374\370\0@D@\377\370\374" "\370\0@D@\377\10\14\10\377($\40\377pph\377pp`\377hdX\377\210\214\210" "\377\240\244\240\377ptp\377\240\244\240\377ptp\377\370\374\370\0@D@\377" "\203\370\374\370\0\3ptp\377840\377\210\214\210\377\202\370\374\370\0" "\2ptp\377\240\244\240\377\202\210\214\210\377\204\370\374\370\0\2X\\" "X\377\210\214\210\377\202\370\374\370\0\4\240\244\240\377\370\374\370" "\0X\\X\377\270\274\270\377\230\370\374\370\0", }; zapping-0.10cvs6/plugins/mpeg/time.png 644 764 144 741 7460206726 13035 PNG  IHDR Vu\gAMA a pHYs  ~IDATx!l@E{nACÀUu@AAC 08hPP```p*:U .XU NAAiDau],h&zs ́v+0H'm+s:yEa}/ZCŊ$I!uYQE9}=JkT {nvTU1&Z=~f֚'#;[k8c# ZKUUHex) nKqY@O/U P\bb)*IӔ<GԒ +{p,۶{niz49(˒kK.,CJ`$[MN >C0V/sIENDB`zapping-0.10cvs6/plugins/mpeg/mpeg_properties.glade2 644 764 144 151400 10324040455 15740 True Record GTK_WINDOW_TOPLEVEL GTK_WIN_POS_NONE False True False True False False GDK_WINDOW_TYPE_HINT_NORMAL GDK_GRAVITY_NORTH_WEST True False 0 True False 0 True 2 2 False 3 12 True _Format: True False GTK_JUSTIFY_CENTER False False 0 0.5 6 3 0 1 0 1 fill True Save _as: True False GTK_JUSTIFY_CENTER False False 1 0.5 6 3 entry1 0 1 1 2 fill True False 3 True True -1 True 0 True True True True _Configure... True GTK_RELIEF_NORMAL True 0 False True 1 2 0 1 fill True mpeg_dest_file_history 10 Destination file False False True GTK_FILE_CHOOSER_ACTION_OPEN True True True True 0 True * False 1 2 1 2 0 True True 1 True 0 0.5 GTK_SHADOW_ETCHED_IN True 2 2 True 0 0 True 1 2 False 0 0 True False False GTK_JUSTIFY_CENTER False False 0 0.5 2 2 1 2 0 1 0 1 0 1 True 1 2 False 0 0 True False False GTK_JUSTIFY_CENTER False False 0 0.5 2 2 1 2 0 1 0 1 1 2 fill True 1 2 False 0 0 True False False GTK_JUSTIFY_CENTER False False 0 0.5 2 2 1 2 0 1 1 2 0 1 fill True 1 2 False 0 0 True 1 2 0 1 2 2 1 2 1 2 fill fill 0 True True True GTK_PROGRESS_LEFT_TO_RIGHT 0 0.1 0 False False True True 0 True True GTK_RELIEF_NORMAL True True True 0 True False 4 True _Stop True False GTK_JUSTIFY_CENTER False False 0.5 0.5 3 3 0 False False GTK_PACK_END 0 False False 0 True True GTK_PACK_END True True GTK_RELIEF_NORMAL True False False True True 0 True False 4 True _Record True False GTK_JUSTIFY_CENTER False False 0.5 0.5 3 3 0 False False GTK_PACK_END 0 False False 0 True True True True GTK_RELIEF_NORMAL True False False True True 0 True False 4 True _Pause True False GTK_JUSTIFY_CENTER False False 0.5 0.5 3 3 0 False False GTK_PACK_END 0 False False 0 True True 1 False True 0 True True True GTK_WINDOW_TOPLEVEL GTK_WIN_POS_NONE False True False True False False GDK_WINDOW_TYPE_HINT_NORMAL GDK_GRAVITY_NORTH_WEST 6 True False 3 True 1 4 False 3 3 True _Format: True False GTK_JUSTIFY_CENTER False False 0 0.5 3 0 optionmenu15 0 1 0 1 fill True True _New True GTK_RELIEF_NORMAL True 2 3 0 1 fill fill 1 True True _Delete True GTK_RELIEF_NORMAL True 3 4 0 1 fill fill True True -1 True 1 2 0 1 expand|shrink|fill expand|shrink|fill 0 False False True True True True GTK_POS_TOP False False 6 True False 3 True False 0 True _Codec: True False GTK_JUSTIFY_CENTER False False 0 0.5 3 0 context 0 False False True True -1 True 0 True True 0 False False False False True Fil_e format True False GTK_JUSTIFY_CENTER False False 0.5 0.5 0 0 tab 6 True False 3 True False 0 True _Codec: True False GTK_JUSTIFY_CENTER False False 0 0.5 3 0 optionmenu11 0 False False True True -1 True 0 True True 0 False False True False 0 True Capture _width: True False GTK_JUSTIFY_LEFT False False 0 0.5 0 0 spinbutton9 3 False False True True 1 0 True GTK_UPDATE_ALWAYS False False 16 16 1600 16 16 16 0 True True True Capture _height: True False GTK_JUSTIFY_LEFT False False 0 0.5 0 0 spinbutton10 3 False False True True 1 0 True GTK_UPDATE_ALWAYS False False 16 16 1600 16 16 16 0 True True 0 False False False False True _Video True False GTK_JUSTIFY_CENTER False False 0.5 0.5 0 0 tab 6 True False 3 True False 0 True _Codec: True False GTK_JUSTIFY_CENTER False False 0 0.5 3 0 optionmenu12 0 False False True True -1 True 0 True True 0 False False False False True _Audio True False GTK_JUSTIFY_CENTER False False 0.5 0.5 0 0 tab 6 True False 0 True True _No caption or subtitle recording True GTK_RELIEF_NORMAL True False False True 0 False False True True _Superimposed onto the picture True GTK_RELIEF_NORMAL True False False True subt-none 0 False False True True _Embedded in the video file: True GTK_RELIEF_NORMAL True False False True subt-none 0 False False True 0.5 0.5 1 1 0 0 12 0 True False 3 True Co_dec: True False GTK_JUSTIFY_CENTER False False 0 0.5 3 0 optionmenu12 0 False False True True 0 True True - True 0 True True 0 False False True True _Subtitle file: True GTK_RELIEF_NORMAL True False False True subt-none 0 False False True 0.5 0.5 1 1 0 0 12 0 True False 0 True False 3 True _Format: True False GTK_JUSTIFY_CENTER False False 0 0.5 3 0 optionmenu12 0 False False True True -1 True 0 True True 0 True True True False 0 0 True True True True _Update live caption at line breaks True GTK_RELIEF_NORMAL True False False True 0 False False 0 False False True 0.5 0.5 1 1 6 0 0 0 True False 0 True True _Record the displayed caption or subtitles True GTK_RELIEF_NORMAL True False False True 0 False False True True Record _all subtitles True GTK_RELIEF_NORMAL True False False True subt-displayed 0 False False True True Record this channel or _page: True GTK_RELIEF_NORMAL True False False True subt-displayed 0 False False True 0.5 0.5 1 1 0 0 12 0 True True True True 0 True * False 0 True True 6 False False False False True _Caption and Subtitles True False GTK_JUSTIFY_LEFT False False 0.5 0.5 0 0 tab 0 True True zapping-0.10cvs6/plugins/alirc/ 777 764 144 0 10443536351 11570 5zapping-0.10cvs6/plugins/alirc/Makefile.am 644 764 144 533 10327374527 13607 ## Process this file with automake to produce Makefile.in plugindir = @PLUGIN_DEFAULT_DIR@ plugin_LTLIBRARIES = libalirc.zapping.la EXTRA_DIST = README.alirc AM_CFLAGS = \ @PLUGIN_DEFAULT_FLAGS@ \ -DZAPPING8 INCLUDES = \ -I$(top_srcdir) \ @COMMON_INCLUDES@ libalirc_zapping_la_SOURCES = alirc.c libalirc_zapping_la_LIBADD = $(LIRC_LIB) zapping-0.10cvs6/plugins/alirc/Makefile.in 644 764 144 45676 10442575466 13704 # Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = ../.. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = plugins/alirc DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; am__installdirs = "$(DESTDIR)$(plugindir)" pluginLTLIBRARIES_INSTALL = $(INSTALL) LTLIBRARIES = $(plugin_LTLIBRARIES) am__DEPENDENCIES_1 = libalirc_zapping_la_DEPENDENCIES = $(am__DEPENDENCIES_1) am_libalirc_zapping_la_OBJECTS = alirc.lo libalirc_zapping_la_OBJECTS = $(am_libalirc_zapping_la_OBJECTS) DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ SOURCES = $(libalirc_zapping_la_SOURCES) DIST_SOURCES = $(libalirc_zapping_la_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ ARTS_CFLAGS = @ARTS_CFLAGS@ ARTS_LIBS = @ARTS_LIBS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BUILD_DEINTERLACE_PLUGIN_FALSE = @BUILD_DEINTERLACE_PLUGIN_FALSE@ BUILD_DEINTERLACE_PLUGIN_TRUE = @BUILD_DEINTERLACE_PLUGIN_TRUE@ BUILD_MAN_FALSE = @BUILD_MAN_FALSE@ BUILD_MAN_TRUE = @BUILD_MAN_TRUE@ CAN_COMPILE_3DNOW_FALSE = @CAN_COMPILE_3DNOW_FALSE@ CAN_COMPILE_3DNOW_TRUE = @CAN_COMPILE_3DNOW_TRUE@ CAN_COMPILE_ALTIVEC_FALSE = @CAN_COMPILE_ALTIVEC_FALSE@ CAN_COMPILE_ALTIVEC_TRUE = @CAN_COMPILE_ALTIVEC_TRUE@ CAN_COMPILE_MMX_FALSE = @CAN_COMPILE_MMX_FALSE@ CAN_COMPILE_MMX_TRUE = @CAN_COMPILE_MMX_TRUE@ CAN_COMPILE_SSE2_FALSE = @CAN_COMPILE_SSE2_FALSE@ CAN_COMPILE_SSE2_TRUE = @CAN_COMPILE_SSE2_TRUE@ CAN_COMPILE_SSE3_FALSE = @CAN_COMPILE_SSE3_FALSE@ CAN_COMPILE_SSE3_TRUE = @CAN_COMPILE_SSE3_TRUE@ CAN_COMPILE_SSE_FALSE = @CAN_COMPILE_SSE_FALSE@ CAN_COMPILE_SSE_TRUE = @CAN_COMPILE_SSE_TRUE@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCAS = @CCAS@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ COMMON_INCLUDES = @COMMON_INCLUDES@ CONSOLEHELPER_LOCATION = @CONSOLEHELPER_LOCATION@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFAULT_CFLAGS = @DEFAULT_CFLAGS@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ESD_LIBS = @ESD_LIBS@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ GCONF_SCHEMAS_INSTALL_FALSE = @GCONF_SCHEMAS_INSTALL_FALSE@ GCONF_SCHEMAS_INSTALL_TRUE = @GCONF_SCHEMAS_INSTALL_TRUE@ GCONF_SCHEMA_CONFIG_SOURCE = @GCONF_SCHEMA_CONFIG_SOURCE@ GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@ GDK_PIXBUF_CSOURCE = @GDK_PIXBUF_CSOURCE@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ HAVE_GCC_LIMITS_FALSE = @HAVE_GCC_LIMITS_FALSE@ HAVE_GCC_LIMITS_TRUE = @HAVE_GCC_LIMITS_TRUE@ HAVE_LIBZVBI_FALSE = @HAVE_LIBZVBI_FALSE@ HAVE_LIBZVBI_TRUE = @HAVE_LIBZVBI_TRUE@ HAVE_X86_FALSE = @HAVE_X86_FALSE@ HAVE_X86_TRUE = @HAVE_X86_TRUE@ HAVE_XMU_FALSE = @HAVE_XMU_FALSE@ HAVE_XMU_TRUE = @HAVE_XMU_TRUE@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ INTLTOOL_CAVES_RULE = @INTLTOOL_CAVES_RULE@ INTLTOOL_DESKTOP_RULE = @INTLTOOL_DESKTOP_RULE@ INTLTOOL_DIRECTORY_RULE = @INTLTOOL_DIRECTORY_RULE@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ INTLTOOL_ICONV = @INTLTOOL_ICONV@ INTLTOOL_KBD_RULE = @INTLTOOL_KBD_RULE@ INTLTOOL_KEYS_RULE = @INTLTOOL_KEYS_RULE@ INTLTOOL_MERGE = @INTLTOOL_MERGE@ INTLTOOL_MSGFMT = @INTLTOOL_MSGFMT@ INTLTOOL_MSGMERGE = @INTLTOOL_MSGMERGE@ INTLTOOL_OAF_RULE = @INTLTOOL_OAF_RULE@ INTLTOOL_PERL = @INTLTOOL_PERL@ INTLTOOL_PONG_RULE = @INTLTOOL_PONG_RULE@ INTLTOOL_PROP_RULE = @INTLTOOL_PROP_RULE@ INTLTOOL_SCHEMAS_RULE = @INTLTOOL_SCHEMAS_RULE@ INTLTOOL_SERVER_RULE = @INTLTOOL_SERVER_RULE@ INTLTOOL_SHEET_RULE = @INTLTOOL_SHEET_RULE@ INTLTOOL_SOUNDLIST_RULE = @INTLTOOL_SOUNDLIST_RULE@ INTLTOOL_THEME_RULE = @INTLTOOL_THEME_RULE@ INTLTOOL_UI_RULE = @INTLTOOL_UI_RULE@ INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ INTLTOOL_XAM_RULE = @INTLTOOL_XAM_RULE@ INTLTOOL_XGETTEXT = @INTLTOOL_XGETTEXT@ INTLTOOL_XML_NOMERGE_RULE = @INTLTOOL_XML_NOMERGE_RULE@ INTLTOOL_XML_RULE = @INTLTOOL_XML_RULE@ JPEG_LIB = @JPEG_LIB@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBXML_CFLAGS = @LIBXML_CFLAGS@ LIBXML_LIBS = @LIBXML_LIBS@ LIRC_LIB = @LIRC_LIB@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAKEINFO = @MAKEINFO@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ NEED_ZSFB_FALSE = @NEED_ZSFB_FALSE@ NEED_ZSFB_TRUE = @NEED_ZSFB_TRUE@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_CFLAGS = @PACKAGE_CFLAGS@ PACKAGE_LIBS = @PACKAGE_LIBS@ PACKAGE_LIB_DIR = @PACKAGE_LIB_DIR@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_PIXMAPS_DIR = @PACKAGE_PIXMAPS_DIR@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PACKAGE_VERSION_ID = @PACKAGE_VERSION_ID@ PATH_SEPARATOR = @PATH_SEPARATOR@ PG_CFLAGS = @PG_CFLAGS@ PKG_CONFIG = @PKG_CONFIG@ PLUGIN_DEFAULT_DIR = @PLUGIN_DEFAULT_DIR@ PLUGIN_DEFAULT_FLAGS = @PLUGIN_DEFAULT_FLAGS@ PNG_LIBS = @PNG_LIBS@ POFILES = @POFILES@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ PYTHON_LIBS = @PYTHON_LIBS@ PY_CFLAGS = @PY_CFLAGS@ PY_EXTRA_LIBS = @PY_EXTRA_LIBS@ PY_LIBS = @PY_LIBS@ PY_LIB_LOC = @PY_LIB_LOC@ RANLIB = @RANLIB@ RTE_LIBS = @RTE_LIBS@ SCROLLKEEPER_BUILD_REQUIRED = @SCROLLKEEPER_BUILD_REQUIRED@ SCROLLKEEPER_CONFIG = @SCROLLKEEPER_CONFIG@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ SUID_ZSFB_FALSE = @SUID_ZSFB_FALSE@ SUID_ZSFB_TRUE = @SUID_ZSFB_TRUE@ UNICODE_CFLAGS = @UNICODE_CFLAGS@ UNICODE_LIBS = @UNICODE_LIBS@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ WARN_CFLAGS = @WARN_CFLAGS@ XGETTEXT = @XGETTEXT@ XMLCATALOG = @XMLCATALOG@ XML_CATALOG_FILE = @XML_CATALOG_FILE@ XSLTPROC = @XSLTPROC@ X_CFLAGS = @X_CFLAGS@ X_DPMS_LIBS = @X_DPMS_LIBS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ X_XF86DGA_LIBS = @X_XF86DGA_LIBS@ X_XF86VMODE_LIBS = @X_XF86VMODE_LIBS@ X_XINERAMA_LIBS = @X_XINERAMA_LIBS@ X_XMU_LIBS = @X_XMU_LIBS@ X_XV_LIBS = @X_XV_LIBS@ ZSFB_GROUP = @ZSFB_GROUP@ ZSFB_OWNER = @ZSFB_OWNER@ ZVBI_CFLAGS = @ZVBI_CFLAGS@ ZVBI_LIBS = @ZVBI_LIBS@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_STRIP = @ac_ct_STRIP@ ac_pt_PKG_CONFIG = @ac_pt_PKG_CONFIG@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ datadir = @datadir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ python_val = @python_val@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ plugindir = @PLUGIN_DEFAULT_DIR@ plugin_LTLIBRARIES = libalirc.zapping.la EXTRA_DIST = README.alirc AM_CFLAGS = \ @PLUGIN_DEFAULT_FLAGS@ \ -DZAPPING8 INCLUDES = \ -I$(top_srcdir) \ @COMMON_INCLUDES@ libalirc_zapping_la_SOURCES = alirc.c libalirc_zapping_la_LIBADD = $(LIRC_LIB) all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu plugins/alirc/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu plugins/alirc/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh install-pluginLTLIBRARIES: $(plugin_LTLIBRARIES) @$(NORMAL_INSTALL) test -z "$(plugindir)" || $(mkdir_p) "$(DESTDIR)$(plugindir)" @list='$(plugin_LTLIBRARIES)'; for p in $$list; do \ if test -f $$p; then \ f=$(am__strip_dir) \ echo " $(LIBTOOL) --mode=install $(pluginLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(plugindir)/$$f'"; \ $(LIBTOOL) --mode=install $(pluginLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(plugindir)/$$f"; \ else :; fi; \ done uninstall-pluginLTLIBRARIES: @$(NORMAL_UNINSTALL) @set -x; list='$(plugin_LTLIBRARIES)'; for p in $$list; do \ p=$(am__strip_dir) \ echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(plugindir)/$$p'"; \ $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(plugindir)/$$p"; \ done clean-pluginLTLIBRARIES: -test -z "$(plugin_LTLIBRARIES)" || rm -f $(plugin_LTLIBRARIES) @list='$(plugin_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libalirc.zapping.la: $(libalirc_zapping_la_OBJECTS) $(libalirc_zapping_la_DEPENDENCIES) $(LINK) -rpath $(plugindir) $(libalirc_zapping_la_LDFLAGS) $(libalirc_zapping_la_OBJECTS) $(libalirc_zapping_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/alirc.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool uninstall-info-am: ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: for dir in "$(DESTDIR)$(plugindir)"; do \ test -z "$$dir" || $(mkdir_p) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-pluginLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-libtool distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-pluginLTLIBRARIES install-exec-am: install-info: install-info-am install-man: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-info-am uninstall-pluginLTLIBRARIES .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-pluginLTLIBRARIES ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-exec \ install-exec-am install-info install-info-am install-man \ install-pluginLTLIBRARIES install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags uninstall uninstall-am uninstall-info-am \ uninstall-pluginLTLIBRARIES # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: zapping-0.10cvs6/plugins/alirc/README.alirc 644 764 144 3256 10074144272 13540 /* Alirc: Another lirc plugin for Zapping * based on zappings template plugin * Copyright (C) 2001 Sjoerd Simons * * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ Why another lirc plugin for zapping? The original lirc plugin has two big problems: * It uses a thread to read the lirc socket and takes actions in that thread. The X libraries aren't thread safe, so this will cause Xlib errors. * It reads the lirc socket itself, instead of using the lirc_client library. The causes it to not play nice with other lirc clients. why, an lirc client read your ~/.lircrc, in which you can specify different modes, so you can reuse buttons among applications.. the lirc plugins assumes the buttons are always meant for it, so bye bye reusing buttons.. How do we solve this, simply use gdk_input_add instead of an extra thread and use the lirc_client library, like any good lirc client app would For configuration please see the Zapping built-in documentation (menu Help > Contents). zapping-0.10cvs6/plugins/alirc/alirc.c 644 764 144 24120 10167772036 13046 /* Alirc: Another lirc plugin for Zapping * based on zappings template plugin * Copyright (C) 2001 Sjoerd Simons * * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* $Id: alirc.c,v 1.12 2005/01/08 14:54:22 mschimek Exp $ */ /* XXX gtk_input */ #undef GTK_DISABLE_DEPRECATED #include "src/v4linterface.h" /* channel_key_press() */ #include "src/plugin_common.h" #ifdef HAVE_LIRC #include #include #include /* This is the description of the plugin, change as appropiate */ static const gchar str_canonical_name[] = "alirc"; static const gchar str_descriptive_name[] = N_("Another lirc plugin"); static const gchar str_description[] = N_("Another plugin to control zapping through lirc\n\n\ To enable this plugin you must edit your ~/.lircrc\n\ file. See the Zapping documentation for details.\n"); static const gchar str_short_description[] = N_("Lets you control zapping through lirc"); static const gchar str_author[] = "Sjoerd Simons"; /* The format of the version string must be %d[[.%d[.%d]][other_things]], where the things between [] aren't needed, and if not present, 0 will be assumed */ static const gchar str_version[] = "1.0"; /* Active status of the plugin */ static gboolean active = FALSE; /* global lirc config struct */ static struct lirc_config *config = NULL; /* lirc io_tag */ static guint lirc_iotag; /* our link to the device struct */ static tveng_device_info *tveng_info; static void legacy_zoom (const gchar * args _unused_) { python_command (NULL, "zapping.toggle_mode('fullscreen')"); } static void legacy_setchannel (const gchar * args) { GdkEventKey event; gint n; if (args == NULL) return; n = atoi (args); if (n < 0) n = 0; if (n < 10) { /* * This (preliminary) calls the routine used to * enter channel numbers on the numeric keypad. * Side effects: OSD, digits combine within timeout, * numbers are interpreted as RF channel or channel name. */ event.keyval = GDK_KP_0 + n; channel_key_press (&event); } else { python_command_printf (NULL, "zapping.set_channel(%d)", n); } } struct legacy_command { const gchar * lirc_command; const gchar * py_command; void (* func)(const gchar *args); }; static const struct legacy_command legacy_command_txl_table [] = { { "CHANUP", "zapping.channel_up()", NULL }, { "CHANDOWN", "zapping.channel_down()", NULL }, { "QUIT", "zapping.quit()", NULL }, { "ZOOM", NULL, legacy_zoom }, { "SETCHANNEL", NULL, legacy_setchannel }, { "MUTE", "zapping.mute()", NULL }, { "VOL_UP", "zapping.control_incr('volume',+1)", NULL }, { "VOL_DOWN", "zapping.control_incr('volume',-1)", NULL }, }; static void run_command (const gchar * s) { const struct legacy_command *lc; guint i; printv ("alirc: command string '%s'\n", s); while (*s && isspace(*s)) s++; if (!*s) return; lc = legacy_command_txl_table; for (i = 0; i < G_N_ELEMENTS (legacy_command_txl_table); i++) { guint n = strlen (lc->lirc_command); if (0 == strncmp (s, lc->lirc_command, n) && (s[n] == 0 || isspace(s[n]))) { printv ("alirc: command '%*s'\n", n, s); s += n; while (*s && isspace(*s)) s++; if (lc->py_command) { printv ("alirc: command txl '%s'\n", lc->py_command); python_command (NULL, lc->py_command); } else { printv ("alirc: command func w/args '%s'\n", s); lc->func (s); } return; } lc++; } printv ("alirc: not a legacy command\n"); python_command (NULL, s); } static void plugin_stop(void) { /* Most times we cannot be stopped while we are stopped */ if (!active) return; /* stop it, we were active so */ gtk_input_remove(lirc_iotag); lirc_freeconfig(config); printv("alirc: Freed config struct\n"); lirc_deinit(); printv("alirc: Lirc deinitialized\n"); /* Stop anything the plugin is doing and set the flag */ active = FALSE; } static void lirc_receive(gpointer *data _unused_, int fd _unused_) { /* activity on the lirc socket, so let's check */ char *string; char *command; if (lirc_nextcode(&string) != 0) { printv("alirc: Eeek somethings wrong with lirc\n"); printv("alirc: Stopping plugin\n"); plugin_stop(); } printv("->Received from lirc: %s",string); lirc_code2char(config,string,&command); while(command != NULL) { run_command(command); lirc_code2char(config,string,&command); } } /* Declaration of the static symbols of the plugin. Refer to the docs to know what does each of these functions do */ gint plugin_get_protocol ( void ) { /* You don't need to modify this function */ return PLUGIN_PROTOCOL; } static gboolean plugin_running (void) { /* This will usually be like this too */ return active; } static void plugin_get_info (const gchar ** canonical_name, const gchar ** descriptive_name, const gchar ** description, const gchar ** short_description, const gchar ** author, const gchar ** version) { /* Usually, this one doesn't need modification either */ if (canonical_name) *canonical_name = _(str_canonical_name); if (descriptive_name) *descriptive_name = _(str_descriptive_name); if (description) *description = _(str_description); if (short_description) *short_description = _(str_short_description); if (author) *author = _(str_author); if (version) *version = _(str_version); } static gboolean plugin_start (void) { /* In most plugins, you don't want to be started twice */ int fd; if (active) return TRUE; /* Do any neccessary work to start the plugin here */ if ((fd = lirc_init("zapping_lirc",1)) < 0) { printv("alirc: Failed to initialize\n"); return FALSE; } if (lirc_readconfig(NULL,&config,NULL) != 0) { printv("Couldn't read config file\n"); return FALSE; } printv("alirc: Succesfully initialize\n"); lirc_iotag = gtk_input_add_full (fd, GDK_INPUT_READ, (GdkInputFunction) lirc_receive, NULL, NULL, NULL); /* If everything has been ok, set the active flags and return TRUE */ active = TRUE; return TRUE; } static gboolean plugin_init (PluginBridge bridge _unused_, tveng_device_info * info) { /* Do any startup you need here, and return FALSE on error */ printv("alirc plugin: init\n"); tveng_info = info; /* If this is set, autostarting is on (we should start now) */ if (active) { active = FALSE; /* autostarting, so we're not really active */ return plugin_start(); } return TRUE; } static void plugin_close(void) { /* If we were working, stop the work */ if (active) plugin_stop(); /* Any cleanups would go here (closing fd's and so on) */ } static void plugin_load_config (gchar * root_key) { gchar * buffer; /* The autostart config value is compulsory, you shouldn't need to change the following */ printv("alirc: loading configuration\n"); buffer = g_strconcat(root_key, "autostart", NULL); /* Create sets a default value for a key, check src/zconf.h */ zconf_create_boolean(FALSE, "Whether the plugin should start" " automatically when opening Zapping", buffer); active = zconf_get_boolean(NULL, buffer); g_free(buffer); /* Load here any other config key */ } static void plugin_save_config (gchar * root_key) { gchar * buffer; /* This one is compulsory, you won't need to change it */ buffer = g_strconcat(root_key, "autostart", NULL); zconf_set_boolean(active, buffer); g_free(buffer); /* Save here any other config keys you need to save */ } static struct plugin_misc_info * plugin_get_misc_info (void) { static struct plugin_misc_info returned_struct = { sizeof(struct plugin_misc_info), /* size of this struct */ 6, /* plugin priority, this is just an example */ 0 /* Category */ }; /* Tell that the template plugin should be run with a somewhat high priority (just to put an example) */ return (&returned_struct); } /* Return FALSE if we aren't able to access a symbol, you should only need to edit the pointer table, not the code */ gboolean plugin_get_symbol(const gchar * name, gint hash, gpointer * ptr) { /* Usually this table is the only thing you will need to change */ const struct plugin_exported_symbol table_of_symbols[] = { SYMBOL(plugin_get_info, 0x1234), SYMBOL(plugin_init, 0x1234), SYMBOL(plugin_close, 0x1234), SYMBOL(plugin_start, 0x1234), SYMBOL(plugin_stop, 0x1234), SYMBOL(plugin_load_config, 0x1234), SYMBOL(plugin_save_config, 0x1234), SYMBOL(plugin_running, 0x1234), SYMBOL(plugin_get_misc_info, 0x1234) }; gint num_exported_symbols = sizeof(table_of_symbols)/sizeof(struct plugin_exported_symbol); gint i; /* Try to find the given symbol in the table of exported symbols of the plugin */ for (i=0; ikeyword, oi->keyword); } static gchar * default_filename (ExportDialog * sp) { const vbi3_export_info *xi; gchar **extensions; gchar *filename; vbi3_subno subno; xi = vbi3_export_info_from_export (sp->context); extensions = g_strsplit (xi->extension, ",", 2); subno = sp->pg->subno; if (subno > 0 && subno <= 0x99) filename = g_strdup_printf ("%s-%x-%x.%s", sp->network, sp->pg->pgno, subno, extensions[0]); else filename = g_strdup_printf ("%s-%x.%s", sp->network, sp->pg->pgno, extensions[0]); g_strfreev (extensions); return filename; } static void on_menu_activate (GtkWidget * menu_item, ExportDialog * sp) { gchar *keyword; GtkContainer *container; GList *glist; GtkWidget *table; keyword = (gchar *) g_object_get_data (G_OBJECT (menu_item), "key"); g_assert (keyword != NULL); zconf_set_string (keyword, "/zapping/options/export_format"); if (sp->context) vbi3_export_delete (sp->context); sp->context = vbi3_export_new (keyword, NULL); g_assert (sp->context != NULL); /* Don't care if these fail */ vbi3_export_option_set (sp->context, "network", sp->network); vbi3_export_option_set (sp->context, "creator", "Zapzilla " VERSION); vbi3_export_option_set (sp->context, "reveal", sp->reveal); { const vbi3_export_info *xi; gchar **extensions; xi = vbi3_export_info_from_export (sp->context); extensions = g_strsplit (xi->extension, ",", 2); z_electric_replace_extension (sp->entry, extensions[0]); g_strfreev (extensions); } container = GTK_CONTAINER (sp->option_box); while ((glist = gtk_container_get_children (container))) gtk_container_remove (container, GTK_WIDGET (glist->data)); table = zvbi_export_option_table_new (sp->context, xo_zconf_name, /* user_data */ NULL); if (NULL != table) { GtkWidget *box; GtkWidget *frame; box = gtk_hbox_new (/* homogeneous */ FALSE, /* spacing */ 0); gtk_container_add (GTK_CONTAINER (box), table); gtk_container_set_border_width (GTK_CONTAINER (box), 6); frame = gtk_frame_new (_("Options")); gtk_container_add (GTK_CONTAINER (frame), box); gtk_widget_show_all (frame); gtk_box_pack_start (GTK_BOX (sp->option_box), frame, TRUE, TRUE, 0); } } static void on_cancel_clicked (GtkWidget * widget, gpointer user_data _unused_) { while (widget->parent) widget = widget->parent; gtk_widget_destroy (widget); } static void on_ok_clicked (GtkWidget * button, ExportDialog * sp) { const gchar *cname; gchar *name; gchar *dirname; name = NULL; dirname = NULL; cname = gtk_entry_get_text (GTK_ENTRY (sp->entry)); if (!cname || !*cname) { gtk_window_present (GTK_WINDOW (sp)); gtk_widget_grab_focus (sp->entry); return; } name = g_strdup (cname); if (!z_overwrite_file_dialog (GTK_WINDOW (sp), _("Could not save page"), name)) goto failure; g_strstrip (name); dirname = g_path_get_dirname (name); if (0 != strcmp (dirname, ".") || '.' == name[0]) { if (!z_build_path_with_alert (GTK_WINDOW (sp), dirname)) goto failure; /* XXX make absolute path? */ zcs_char (dirname, "exportdir"); } else { zcs_char ("", "exportdir"); } if (!vbi3_export_file (sp->context, name, sp->pg)) { z_show_non_modal_message_dialog (GTK_WINDOW (sp), GTK_MESSAGE_ERROR, _("Could not save page"), "%s", vbi3_export_errstr (sp->context)); goto failure; } g_free (name); g_free (dirname); on_cancel_clicked (button, sp); return; failure: g_free (name); g_free (dirname); } static void instance_finalize (GObject * object) { ExportDialog *t = EXPORT_DIALOG (object); if (t->context) vbi3_export_delete (t->context); g_free (t->network); vbi3_page_delete (t->pg); parent_class->finalize (object); } static void instance_init (GTypeInstance * instance, gpointer g_class _unused_) { ExportDialog *sp = (ExportDialog *) instance; GtkWindow *window; GtkBox *vbox; GtkBox *hbox; GtkWidget *file_entry; GtkWidget *widget; window = GTK_WINDOW (sp); gtk_window_set_title (window, _("Save as")); widget = gtk_vbox_new (FALSE, 3); gtk_container_set_border_width (GTK_CONTAINER (widget), 6); vbox = GTK_BOX (widget); gtk_box_pack_start (GTK_BOX (sp->dialog.vbox), widget, TRUE, TRUE, 0); file_entry = gnome_file_entry_new ("ttxview_export_id", NULL); gtk_widget_set_size_request (file_entry, 400, -1); sp->entry = gnome_file_entry_gtk_entry (GNOME_FILE_ENTRY (file_entry)); gtk_entry_set_activates_default (GTK_ENTRY (sp->entry), TRUE); gtk_box_pack_start (vbox, file_entry, FALSE, FALSE, 0); { widget = gtk_hbox_new (FALSE, 0); hbox = GTK_BOX (widget); gtk_box_pack_start (vbox, widget, FALSE, FALSE, 0); widget = gtk_label_new (_("Format:")); gtk_misc_set_padding (GTK_MISC (widget), 3, 0); gtk_box_pack_start (hbox, widget, FALSE, FALSE, 0); sp->format_menu = gtk_option_menu_new (); gtk_box_pack_start (hbox, sp->format_menu, TRUE, TRUE, 0); } sp->option_box = gtk_hbox_new (FALSE, 0); gtk_box_pack_start (vbox, sp->option_box, TRUE, TRUE, 0); { GtkWidget *menu; gchar *format; const vbi3_export_info *xm; guint count; guint i; menu = gtk_menu_new (); gtk_option_menu_set_menu (GTK_OPTION_MENU (sp->format_menu), menu); zconf_get_string (&format, "/zapping/options/export_format"); count = 0; for (i = 0; (xm = vbi3_export_info_enum ((int) i)); ++i) { if (xm->label && !xm->open_format) /* user module, not subtitles */ { GtkWidget *menu_item; menu_item = gtk_menu_item_new_with_label (xm->label); gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_item); if (xm->tooltip) z_tooltip_set (menu_item, xm->tooltip); z_object_set_const_data (G_OBJECT (menu_item), "key", xm->keyword); if (0 == count || (format && 0 == strcmp (xm->keyword, format))) { on_menu_activate (menu_item, sp); gtk_option_menu_set_history (GTK_OPTION_MENU (sp->format_menu), count); } g_signal_connect (G_OBJECT (menu_item), "activate", G_CALLBACK (on_menu_activate), sp); ++count; } } g_free (format); format = NULL; } widget = gtk_button_new_from_stock (GTK_STOCK_CANCEL); gtk_dialog_add_action_widget (&sp->dialog, widget, 1); GTK_WIDGET_SET_FLAGS (widget, GTK_CAN_DEFAULT); g_signal_connect (G_OBJECT (widget), "clicked", G_CALLBACK (on_cancel_clicked), sp); widget = gtk_button_new_from_stock (GTK_STOCK_OK); gtk_dialog_add_action_widget (&sp->dialog, widget, 2); GTK_WIDGET_SET_FLAGS (widget, GTK_CAN_DEFAULT); g_signal_connect (G_OBJECT (widget), "clicked", G_CALLBACK (on_ok_clicked), sp); gtk_dialog_set_default_response (&sp->dialog, 2); gtk_widget_grab_focus (sp->entry); } GtkWidget * export_dialog_new (const vbi3_page * pg, const gchar * network, gboolean reveal) { ExportDialog *sp; sp = (ExportDialog *) g_object_new (TYPE_EXPORT_DIALOG, NULL); sp->pg = vbi3_page_dup (pg); g_assert (NULL != sp->pg); sp->reveal = reveal; sp->network = g_strdup (network); { gchar *base; gchar *path; base = default_filename (sp); z_electric_set_basename (sp->entry, base); path = g_build_filename (zcg_char (NULL, "exportdir"), base, NULL); gtk_entry_set_text (GTK_ENTRY (sp->entry), path); g_free (base); } return GTK_WIDGET (sp); } static void class_init (gpointer g_class, gpointer class_data _unused_) { GObjectClass *object_class; object_class = G_OBJECT_CLASS (g_class); parent_class = g_type_class_peek_parent (object_class); object_class->finalize = instance_finalize; } GType export_dialog_get_type (void) { static GType type = 0; if (!type) { GTypeInfo info; CLEAR (info); info.class_size = sizeof (ExportDialogClass); info.class_init = class_init; info.instance_size = sizeof (ExportDialog); info.instance_init = instance_init; type = g_type_register_static (GTK_TYPE_DIALOG, "ExportDialog", &info, (GTypeFlags) 0); } return type; } zapping-0.10cvs6/plugins/teletext/export.h 644 764 144 4322 10305456045 14021 /* * Zapping TV viewer * * Copyright (C) 2000, 2001, 2002 Iaki Garca Etxebarria * Copyright (C) 2000, 2001, 2002, 2003, 2004 Michael H. Schimek * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* $Id: export.h,v 1.3 2005/09/01 01:40:53 mschimek Exp $ */ #ifndef TELETEXT_EXPORT_H #define TELETEXT_EXPORT_H #include #include "libvbi/export.h" G_BEGIN_DECLS #define TYPE_EXPORT_DIALOG (export_dialog_get_type ()) #define EXPORT_DIALOG(obj) \ (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_EXPORT_DIALOG, ExportDialog)) #define EXPORT_DIALOG_CLASS(klass) \ (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_EXPORT_DIALOG, ExportDialogClass)) #define IS_EXPORT_DIALOG(obj) \ (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_EXPORT_DIALOG)) #define IS_EXPORT_DIALOG_CLASS(klass) \ (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_EXPORT_DIALOG)) #define EXPORT_DIALOG_GET_CLASS(obj) \ (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_EXPORT_DIALOG, ExportDialogClass)) typedef struct _ExportDialog ExportDialog; typedef struct _ExportDialogClass ExportDialogClass; struct _ExportDialog { GtkDialog dialog; /*< private >*/ GtkWidget * entry; GtkWidget * format_menu; GtkWidget * option_box; vbi3_export * context; vbi3_page * pg; gboolean reveal; gchar * network; }; struct _ExportDialogClass { GtkDialogClass parent_class; }; extern GType export_dialog_get_type (void) G_GNUC_CONST; extern GtkWidget * export_dialog_new (const vbi3_page * pg, const gchar * network, gboolean reveal); G_END_DECLS #endif /* TELETEXT_EXPORT_H */ zapping-0.10cvs6/plugins/teletext/toolbar.c 644 764 144 20524 10167772040 14161 /* * Zapping TV viewer * * Copyright (C) 2000, 2001, 2002 Iaki Garca Etxebarria * Copyright (C) 2000, 2001, 2002, 2003, 2004 Michael H. Schimek * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* $Id: toolbar.c,v 1.3 2005/01/08 14:54:24 mschimek Exp $ */ #include #include #include "src/zmisc.h" #include "src/remote.h" #include "pixmaps/left.h" #include "pixmaps/down.h" #include "pixmaps/up.h" #include "pixmaps/right.h" #include "pixmaps/reveal.h" #include "toolbar.h" void teletext_toolbar_set_url (TeletextToolbar * toolbar, vbi3_pgno pgno, vbi3_subno subno) { gchar buffer[16]; if ((guint) subno > 0x99) subno = 0; /* 0, VBI3_ANY_SUBNO, 0x2359, bug */ snprintf (buffer, 16, "%3x.%02x", pgno & 0xFFF, subno); gtk_label_set_text (toolbar->url, buffer); } static void on_hold_toggled (GtkToggleButton * button, gpointer user_data _unused_) { python_command_printf (GTK_WIDGET (button), "zapping.ttx_hold(%u)", gtk_toggle_button_get_active (button)); } static void on_reveal_toggled (GtkToggleToolButton * button, gpointer user_data _unused_) { python_command_printf (GTK_WIDGET (button), "zapping.ttx_reveal(%u)", gtk_toggle_tool_button_get_active (button)); } static GtkWidget * button_new_from_pixdata (const GdkPixdata * pixdata, const gchar * tooltip, GtkReliefStyle relief_style, const gchar * py_cmd) { GtkWidget *button; GtkWidget *icon; icon = z_gtk_image_new_from_pixdata (pixdata); gtk_widget_show (icon); button = gtk_button_new (); gtk_widget_show (button); gtk_container_add (GTK_CONTAINER (button), icon); gtk_button_set_relief (GTK_BUTTON (button), relief_style); z_tooltip_set (button, tooltip); z_signal_connect_python (G_OBJECT (button), "clicked", py_cmd); return button; } /* XXX How can we do this with GtkActions? */ static void on_orientation_changed (GtkToolbar * toolbar, GtkOrientation orientation, TeletextToolbar * t) { GtkReliefStyle button_relief; GList *glist; GtkWidget *up; GtkWidget *down; GtkWidget *left; GtkWidget *right; while ((glist = t->box1->children)) gtk_container_remove (GTK_CONTAINER (t->box1), ((GtkBoxChild *) glist->data)->widget); while ((glist = t->box2->children)) gtk_container_remove (GTK_CONTAINER (t->box2), ((GtkBoxChild *) glist->data)->widget); button_relief = GTK_RELIEF_NORMAL; gtk_widget_style_get (GTK_WIDGET (toolbar), "button_relief", &button_relief, NULL); up = button_new_from_pixdata (&up_png, _("Next page"), button_relief, "zapping.ttx_page_incr(1)"); down = button_new_from_pixdata (&down_png, _("Previous page"), button_relief, "zapping.ttx_page_incr(-1)"); left = button_new_from_pixdata (&left_png, _("Previous subpage"), button_relief, "zapping.ttx_subpage_incr(-1)"); right = button_new_from_pixdata (&right_png, _("Next subpage"), button_relief, "zapping.ttx_subpage_incr(1)"); switch (orientation) { case GTK_ORIENTATION_HORIZONTAL: SWAP (up, left); /* fall through */ case GTK_ORIENTATION_VERTICAL: gtk_box_pack_start (t->box1, up, FALSE, FALSE, 0); gtk_box_pack_start (t->box1, down, FALSE, FALSE, 0); gtk_box_pack_start (t->box2, left, FALSE, FALSE, 0); gtk_box_pack_start (t->box2, right, FALSE, FALSE, 0); break; } } static void instance_init (GTypeInstance * instance _unused_, gpointer g_class _unused_) { /* TeletextToolbar *toolbar = (TeletextToolbar *) instance; */ } /* ugh that should take a TeletextView* */ GtkWidget * teletext_toolbar_new (GtkActionGroup *action_group) { TeletextToolbar *toolbar; GtkWidget *widget; GtkReliefStyle button_relief; GtkToolItem *tool_item; toolbar = TELETEXT_TOOLBAR (g_object_new (TYPE_TELETEXT_TOOLBAR, NULL)); widget = GTK_WIDGET (toolbar); button_relief = GTK_RELIEF_NORMAL; gtk_widget_ensure_style (widget); gtk_widget_style_get (widget, "button_relief", &button_relief, NULL); widget = gtk_action_create_tool_item (gtk_action_group_get_action (action_group, "HistoryBack")); gtk_toolbar_insert (&toolbar->toolbar, GTK_TOOL_ITEM (widget), APPEND); widget = gtk_action_create_tool_item (gtk_action_group_get_action (action_group, "HistoryForward")); gtk_toolbar_insert (&toolbar->toolbar, GTK_TOOL_ITEM (widget), APPEND); widget = gtk_action_create_tool_item (gtk_action_group_get_action (action_group, "Home")); gtk_toolbar_insert (&toolbar->toolbar, GTK_TOOL_ITEM (widget), APPEND); /* XXX should use NewTeletextView action. */ tool_item = gtk_tool_button_new_from_stock (GTK_STOCK_NEW); z_tooltip_set (GTK_WIDGET (tool_item), _("Open new Teletext window")); z_signal_connect_python (tool_item, "clicked", "zapping.ttx_open_new()"); gtk_toolbar_insert (&toolbar->toolbar, tool_item, APPEND); widget = gtk_action_create_tool_item (gtk_action_group_get_action (action_group, "Search")); gtk_toolbar_insert (&toolbar->toolbar, GTK_TOOL_ITEM (widget), APPEND); widget = gtk_hbox_new (FALSE, 0); tool_item = gtk_tool_item_new (); gtk_container_add (GTK_CONTAINER (tool_item), widget); gtk_widget_show_all (GTK_WIDGET (tool_item)); toolbar->box1 = GTK_BOX (widget); gtk_toolbar_insert (&toolbar->toolbar, tool_item, APPEND); { GtkWidget *frame; widget = gtk_toggle_button_new (); tool_item = gtk_tool_item_new (); gtk_container_add (GTK_CONTAINER (tool_item), widget); z_tooltip_set (GTK_WIDGET (tool_item), _("Hold the current subpage")); gtk_widget_show_all (GTK_WIDGET (tool_item)); toolbar->hold = GTK_TOGGLE_BUTTON (widget); gtk_button_set_relief (GTK_BUTTON (widget), button_relief); gtk_toolbar_insert (&toolbar->toolbar, tool_item, APPEND); g_signal_connect (G_OBJECT (widget), "clicked", G_CALLBACK (on_hold_toggled), toolbar); frame = gtk_frame_new (NULL); gtk_widget_show (frame); gtk_container_add (GTK_CONTAINER (widget), frame); widget = gtk_label_new ("888.88"); gtk_widget_show (widget); toolbar->url = GTK_LABEL (widget); gtk_container_add (GTK_CONTAINER (frame), widget); } widget = gtk_hbox_new (FALSE, 0); tool_item = gtk_tool_item_new (); gtk_container_add (GTK_CONTAINER (tool_item), widget); gtk_widget_show_all (GTK_WIDGET (tool_item)); toolbar->box2 = GTK_BOX (widget); gtk_toolbar_insert (&toolbar->toolbar, tool_item, APPEND); widget = z_gtk_image_new_from_pixdata (&reveal_png); tool_item = gtk_toggle_tool_button_new (); toolbar->reveal = GTK_TOGGLE_TOOL_BUTTON (tool_item); gtk_tool_button_set_icon_widget (GTK_TOOL_BUTTON (tool_item), widget); gtk_tool_button_set_label (GTK_TOOL_BUTTON (tool_item), _("Reveal")); z_tooltip_set (GTK_WIDGET (tool_item), _("Reveal concealed text")); gtk_widget_show_all (GTK_WIDGET (tool_item)); gtk_toggle_tool_button_set_active (toolbar->reveal, FALSE); gtk_toolbar_insert (&toolbar->toolbar, tool_item, APPEND); g_signal_connect (tool_item, "toggled", G_CALLBACK (on_reveal_toggled), toolbar); g_signal_connect (G_OBJECT (&toolbar->toolbar), "orientation-changed", G_CALLBACK (on_orientation_changed), toolbar); on_orientation_changed (&toolbar->toolbar, gtk_toolbar_get_orientation (&toolbar->toolbar), toolbar); return GTK_WIDGET (toolbar); } GType teletext_toolbar_get_type (void) { static GType type = 0; if (!type) { GTypeInfo info; CLEAR (info); info.class_size = sizeof (TeletextToolbarClass); info.instance_size = sizeof (TeletextToolbar); info.instance_init = instance_init; type = g_type_register_static (GTK_TYPE_TOOLBAR, "TeletextToolbar", &info, (GTypeFlags) 0); } return type; } zapping-0.10cvs6/plugins/teletext/toolbar.h 644 764 144 5412 10305456045 14143 /* * Zapping TV viewer * * Copyright (C) 2000, 2001, 2002 Iaki Garca Etxebarria * Copyright (C) 2000, 2001, 2002, 2003, 2004 Michael H. Schimek * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* $Id: toolbar.h,v 1.3 2005/09/01 01:40:53 mschimek Exp $ */ #ifndef TELETEXT_TOOLBAR_H #define TELETEXT_TOOLBAR_H #include #include "libvbi/bcd.h" /* vbi3_pgno, vbi3_subno */ G_BEGIN_DECLS #define TYPE_TELETEXT_TOOLBAR (teletext_toolbar_get_type ()) #define TELETEXT_TOOLBAR(obj) \ (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_TELETEXT_TOOLBAR, TeletextToolbar)) #define TELETEXT_TOOLBAR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), \ TYPE_TELETEXT_TOOLBAR, TeletextToolbarClass)) #define IS_TELETEXT_TOOLBAR(obj) \ (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_TELETEXT_TOOLBAR)) #define IS_TELETEXT_TOOLBAR_CLASS(klass) \ (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_TELETEXT_TOOLBAR)) #define TELETEXT_TOOLBAR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), \ TYPE_TELETEXT_TOOLBAR, TeletextToolbarClass)) typedef struct _TeletextToolbar TeletextToolbar; typedef struct _TeletextToolbarClass TeletextToolbarClass; struct _TeletextToolbar { GtkToolbar toolbar; /*< private >*/ GtkBox * box1; GtkToggleButton * hold; GtkLabel * url; GtkBox * box2; GtkToggleToolButton * reveal; }; struct _TeletextToolbarClass { GtkToolbarClass parent_class; }; static __inline__ void teletext_toolbar_set_reveal (TeletextToolbar * toolbar, gboolean reveal) { if (reveal != gtk_toggle_tool_button_get_active (toolbar->reveal)) gtk_toggle_tool_button_set_active (toolbar->reveal, reveal); } static __inline__ void teletext_toolbar_set_hold (TeletextToolbar * toolbar, gboolean hold) { if (hold != gtk_toggle_button_get_active (toolbar->hold)) gtk_toggle_button_set_active (toolbar->hold, hold); } extern void teletext_toolbar_set_url (TeletextToolbar * toolbar, vbi3_pgno pgno, vbi3_subno subno); extern GType teletext_toolbar_get_type (void) G_GNUC_CONST; extern GtkWidget * teletext_toolbar_new (GtkActionGroup *action_group); G_END_DECLS #endif /* TELETEXT_TOOLBAR_H */ zapping-0.10cvs6/plugins/teletext/page_num.h 644 764 144 4440 10305456045 14274 /* * Zapping TV viewer * * Copyright (C) 2000, 2001, 2002 Iaki Garca Etxebarria * Copyright (C) 2000, 2001, 2002, 2003, 2004 Michael H. Schimek * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* $Id: page_num.h,v 1.2 2005/09/01 01:40:53 mschimek Exp $ */ #ifndef TELETEXT_PAGE_NUM_H #define TELETEXT_PAGE_NUM_H #include #include "libvbi/bcd.h" /* vbi3_pgno, vbi3_subno */ #include "libvbi/network.h" /* vbi3_network */ typedef struct { vbi3_network network; vbi3_pgno pgno; vbi3_subno subno; } page_num; vbi3_inline void network_set (vbi3_network * dst, const vbi3_network * src) { vbi3_bool success; success = vbi3_network_set (dst, src); assert (success); } vbi3_inline vbi3_bool page_num_equal (const page_num * ad1, const page_num * ad2) { return (vbi3_network_equal (&ad1->network, &ad2->network) && ad1->pgno == ad2->pgno && (ad1->subno == ad2->subno || VBI3_ANY_SUBNO == ad1->subno || VBI3_ANY_SUBNO == ad2->subno)); } vbi3_inline vbi3_bool page_num_equal2 (const page_num * ad1, const vbi3_network * nk2, vbi3_pgno pgno2, vbi3_subno subno2) { return (vbi3_network_equal (&ad1->network, nk2) && ad1->pgno == pgno2 && (ad1->subno == subno2 || VBI3_ANY_SUBNO == ad1->subno || VBI3_ANY_SUBNO == subno2)); } vbi3_inline void page_num_destroy (page_num * pn) { vbi3_network_destroy (&pn->network); } vbi3_inline void page_num_set (page_num * pn, const vbi3_network * nk, vbi3_pgno pgno, vbi3_subno subno) { network_set (&pn->network, nk); pn->pgno = pgno; pn->subno = subno; } #endif /* TELETEXT_PAGE_NUM_H */ zapping-0.10cvs6/plugins/teletext/Makefile.am 644 764 144 1604 10327374461 14370 ## Process this file with automake to produce Makefile.in plugindir = @PLUGIN_DEFAULT_DIR@ plugin_LTLIBRARIES = libteletext.zapping.la AM_CFLAGS = \ @PLUGIN_DEFAULT_FLAGS@ \ -Wunused-function \ -DZAPPING8 INCLUDES = \ -I$(top_srcdir) \ @COMMON_INCLUDES@ libteletext_zapping_la_SOURCES = \ bookmark.c bookmark.h \ export.c export.h \ main.c main.h \ page_num.h \ preferences.c preferences.h \ search.c search.h \ toolbar.c toolbar.h \ view.c view.h \ window.c window.h libteletext_zapping_la_LIBADD = \ $(top_builddir)/libvbi/libvbi.la \ $(PTHREAD_LIB) \ $(PNG_LIB) \ $(UNICODE_LIBS) # Must prevent link conflict with libzvbi 0.2. great_rename: for file in *.c *.h; do \ sed "s/vbi_/vbi3_/g;s/VBI_/VBI3_/g" <$$file >tmp; \ mv tmp $$file; \ done great_emaner: for file in *.c *.h; do \ sed "s/vbi3_/vbi_/g;s/VBI3_/VBI_/g" <$$file >tmp; \ mv tmp $$file; \ done zapping-0.10cvs6/plugins/teletext/Makefile.in 644 764 144 50200 10442575606 14417 # Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = ../.. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = plugins/teletext DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; am__installdirs = "$(DESTDIR)$(plugindir)" pluginLTLIBRARIES_INSTALL = $(INSTALL) LTLIBRARIES = $(plugin_LTLIBRARIES) am__DEPENDENCIES_1 = libteletext_zapping_la_DEPENDENCIES = \ $(top_builddir)/libvbi/libvbi.la $(am__DEPENDENCIES_1) am_libteletext_zapping_la_OBJECTS = bookmark.lo export.lo main.lo \ preferences.lo search.lo toolbar.lo view.lo window.lo libteletext_zapping_la_OBJECTS = $(am_libteletext_zapping_la_OBJECTS) DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ SOURCES = $(libteletext_zapping_la_SOURCES) DIST_SOURCES = $(libteletext_zapping_la_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ ARTS_CFLAGS = @ARTS_CFLAGS@ ARTS_LIBS = @ARTS_LIBS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BUILD_DEINTERLACE_PLUGIN_FALSE = @BUILD_DEINTERLACE_PLUGIN_FALSE@ BUILD_DEINTERLACE_PLUGIN_TRUE = @BUILD_DEINTERLACE_PLUGIN_TRUE@ BUILD_MAN_FALSE = @BUILD_MAN_FALSE@ BUILD_MAN_TRUE = @BUILD_MAN_TRUE@ CAN_COMPILE_3DNOW_FALSE = @CAN_COMPILE_3DNOW_FALSE@ CAN_COMPILE_3DNOW_TRUE = @CAN_COMPILE_3DNOW_TRUE@ CAN_COMPILE_ALTIVEC_FALSE = @CAN_COMPILE_ALTIVEC_FALSE@ CAN_COMPILE_ALTIVEC_TRUE = @CAN_COMPILE_ALTIVEC_TRUE@ CAN_COMPILE_MMX_FALSE = @CAN_COMPILE_MMX_FALSE@ CAN_COMPILE_MMX_TRUE = @CAN_COMPILE_MMX_TRUE@ CAN_COMPILE_SSE2_FALSE = @CAN_COMPILE_SSE2_FALSE@ CAN_COMPILE_SSE2_TRUE = @CAN_COMPILE_SSE2_TRUE@ CAN_COMPILE_SSE3_FALSE = @CAN_COMPILE_SSE3_FALSE@ CAN_COMPILE_SSE3_TRUE = @CAN_COMPILE_SSE3_TRUE@ CAN_COMPILE_SSE_FALSE = @CAN_COMPILE_SSE_FALSE@ CAN_COMPILE_SSE_TRUE = @CAN_COMPILE_SSE_TRUE@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCAS = @CCAS@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ COMMON_INCLUDES = @COMMON_INCLUDES@ CONSOLEHELPER_LOCATION = @CONSOLEHELPER_LOCATION@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFAULT_CFLAGS = @DEFAULT_CFLAGS@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ESD_LIBS = @ESD_LIBS@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ GCONF_SCHEMAS_INSTALL_FALSE = @GCONF_SCHEMAS_INSTALL_FALSE@ GCONF_SCHEMAS_INSTALL_TRUE = @GCONF_SCHEMAS_INSTALL_TRUE@ GCONF_SCHEMA_CONFIG_SOURCE = @GCONF_SCHEMA_CONFIG_SOURCE@ GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@ GDK_PIXBUF_CSOURCE = @GDK_PIXBUF_CSOURCE@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ HAVE_GCC_LIMITS_FALSE = @HAVE_GCC_LIMITS_FALSE@ HAVE_GCC_LIMITS_TRUE = @HAVE_GCC_LIMITS_TRUE@ HAVE_LIBZVBI_FALSE = @HAVE_LIBZVBI_FALSE@ HAVE_LIBZVBI_TRUE = @HAVE_LIBZVBI_TRUE@ HAVE_X86_FALSE = @HAVE_X86_FALSE@ HAVE_X86_TRUE = @HAVE_X86_TRUE@ HAVE_XMU_FALSE = @HAVE_XMU_FALSE@ HAVE_XMU_TRUE = @HAVE_XMU_TRUE@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ INTLTOOL_CAVES_RULE = @INTLTOOL_CAVES_RULE@ INTLTOOL_DESKTOP_RULE = @INTLTOOL_DESKTOP_RULE@ INTLTOOL_DIRECTORY_RULE = @INTLTOOL_DIRECTORY_RULE@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ INTLTOOL_ICONV = @INTLTOOL_ICONV@ INTLTOOL_KBD_RULE = @INTLTOOL_KBD_RULE@ INTLTOOL_KEYS_RULE = @INTLTOOL_KEYS_RULE@ INTLTOOL_MERGE = @INTLTOOL_MERGE@ INTLTOOL_MSGFMT = @INTLTOOL_MSGFMT@ INTLTOOL_MSGMERGE = @INTLTOOL_MSGMERGE@ INTLTOOL_OAF_RULE = @INTLTOOL_OAF_RULE@ INTLTOOL_PERL = @INTLTOOL_PERL@ INTLTOOL_PONG_RULE = @INTLTOOL_PONG_RULE@ INTLTOOL_PROP_RULE = @INTLTOOL_PROP_RULE@ INTLTOOL_SCHEMAS_RULE = @INTLTOOL_SCHEMAS_RULE@ INTLTOOL_SERVER_RULE = @INTLTOOL_SERVER_RULE@ INTLTOOL_SHEET_RULE = @INTLTOOL_SHEET_RULE@ INTLTOOL_SOUNDLIST_RULE = @INTLTOOL_SOUNDLIST_RULE@ INTLTOOL_THEME_RULE = @INTLTOOL_THEME_RULE@ INTLTOOL_UI_RULE = @INTLTOOL_UI_RULE@ INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ INTLTOOL_XAM_RULE = @INTLTOOL_XAM_RULE@ INTLTOOL_XGETTEXT = @INTLTOOL_XGETTEXT@ INTLTOOL_XML_NOMERGE_RULE = @INTLTOOL_XML_NOMERGE_RULE@ INTLTOOL_XML_RULE = @INTLTOOL_XML_RULE@ JPEG_LIB = @JPEG_LIB@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBXML_CFLAGS = @LIBXML_CFLAGS@ LIBXML_LIBS = @LIBXML_LIBS@ LIRC_LIB = @LIRC_LIB@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAKEINFO = @MAKEINFO@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ NEED_ZSFB_FALSE = @NEED_ZSFB_FALSE@ NEED_ZSFB_TRUE = @NEED_ZSFB_TRUE@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_CFLAGS = @PACKAGE_CFLAGS@ PACKAGE_LIBS = @PACKAGE_LIBS@ PACKAGE_LIB_DIR = @PACKAGE_LIB_DIR@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_PIXMAPS_DIR = @PACKAGE_PIXMAPS_DIR@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PACKAGE_VERSION_ID = @PACKAGE_VERSION_ID@ PATH_SEPARATOR = @PATH_SEPARATOR@ PG_CFLAGS = @PG_CFLAGS@ PKG_CONFIG = @PKG_CONFIG@ PLUGIN_DEFAULT_DIR = @PLUGIN_DEFAULT_DIR@ PLUGIN_DEFAULT_FLAGS = @PLUGIN_DEFAULT_FLAGS@ PNG_LIBS = @PNG_LIBS@ POFILES = @POFILES@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ PYTHON_LIBS = @PYTHON_LIBS@ PY_CFLAGS = @PY_CFLAGS@ PY_EXTRA_LIBS = @PY_EXTRA_LIBS@ PY_LIBS = @PY_LIBS@ PY_LIB_LOC = @PY_LIB_LOC@ RANLIB = @RANLIB@ RTE_LIBS = @RTE_LIBS@ SCROLLKEEPER_BUILD_REQUIRED = @SCROLLKEEPER_BUILD_REQUIRED@ SCROLLKEEPER_CONFIG = @SCROLLKEEPER_CONFIG@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ SUID_ZSFB_FALSE = @SUID_ZSFB_FALSE@ SUID_ZSFB_TRUE = @SUID_ZSFB_TRUE@ UNICODE_CFLAGS = @UNICODE_CFLAGS@ UNICODE_LIBS = @UNICODE_LIBS@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ WARN_CFLAGS = @WARN_CFLAGS@ XGETTEXT = @XGETTEXT@ XMLCATALOG = @XMLCATALOG@ XML_CATALOG_FILE = @XML_CATALOG_FILE@ XSLTPROC = @XSLTPROC@ X_CFLAGS = @X_CFLAGS@ X_DPMS_LIBS = @X_DPMS_LIBS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ X_XF86DGA_LIBS = @X_XF86DGA_LIBS@ X_XF86VMODE_LIBS = @X_XF86VMODE_LIBS@ X_XINERAMA_LIBS = @X_XINERAMA_LIBS@ X_XMU_LIBS = @X_XMU_LIBS@ X_XV_LIBS = @X_XV_LIBS@ ZSFB_GROUP = @ZSFB_GROUP@ ZSFB_OWNER = @ZSFB_OWNER@ ZVBI_CFLAGS = @ZVBI_CFLAGS@ ZVBI_LIBS = @ZVBI_LIBS@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_STRIP = @ac_ct_STRIP@ ac_pt_PKG_CONFIG = @ac_pt_PKG_CONFIG@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ datadir = @datadir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ python_val = @python_val@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ plugindir = @PLUGIN_DEFAULT_DIR@ plugin_LTLIBRARIES = libteletext.zapping.la AM_CFLAGS = \ @PLUGIN_DEFAULT_FLAGS@ \ -Wunused-function \ -DZAPPING8 INCLUDES = \ -I$(top_srcdir) \ @COMMON_INCLUDES@ libteletext_zapping_la_SOURCES = \ bookmark.c bookmark.h \ export.c export.h \ main.c main.h \ page_num.h \ preferences.c preferences.h \ search.c search.h \ toolbar.c toolbar.h \ view.c view.h \ window.c window.h libteletext_zapping_la_LIBADD = \ $(top_builddir)/libvbi/libvbi.la \ $(PTHREAD_LIB) \ $(PNG_LIB) \ $(UNICODE_LIBS) all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu plugins/teletext/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu plugins/teletext/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh install-pluginLTLIBRARIES: $(plugin_LTLIBRARIES) @$(NORMAL_INSTALL) test -z "$(plugindir)" || $(mkdir_p) "$(DESTDIR)$(plugindir)" @list='$(plugin_LTLIBRARIES)'; for p in $$list; do \ if test -f $$p; then \ f=$(am__strip_dir) \ echo " $(LIBTOOL) --mode=install $(pluginLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(plugindir)/$$f'"; \ $(LIBTOOL) --mode=install $(pluginLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(plugindir)/$$f"; \ else :; fi; \ done uninstall-pluginLTLIBRARIES: @$(NORMAL_UNINSTALL) @set -x; list='$(plugin_LTLIBRARIES)'; for p in $$list; do \ p=$(am__strip_dir) \ echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(plugindir)/$$p'"; \ $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(plugindir)/$$p"; \ done clean-pluginLTLIBRARIES: -test -z "$(plugin_LTLIBRARIES)" || rm -f $(plugin_LTLIBRARIES) @list='$(plugin_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libteletext.zapping.la: $(libteletext_zapping_la_OBJECTS) $(libteletext_zapping_la_DEPENDENCIES) $(LINK) -rpath $(plugindir) $(libteletext_zapping_la_LDFLAGS) $(libteletext_zapping_la_OBJECTS) $(libteletext_zapping_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bookmark.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/export.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/main.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/preferences.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/search.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/toolbar.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/view.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/window.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool uninstall-info-am: ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: for dir in "$(DESTDIR)$(plugindir)"; do \ test -z "$$dir" || $(mkdir_p) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-pluginLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-libtool distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-pluginLTLIBRARIES install-exec-am: install-info: install-info-am install-man: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-info-am uninstall-pluginLTLIBRARIES .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-pluginLTLIBRARIES ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-exec \ install-exec-am install-info install-info-am install-man \ install-pluginLTLIBRARIES install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags uninstall uninstall-am uninstall-info-am \ uninstall-pluginLTLIBRARIES # Must prevent link conflict with libzvbi 0.2. great_rename: for file in *.c *.h; do \ sed "s/vbi_/vbi3_/g;s/VBI_/VBI3_/g" <$$file >tmp; \ mv tmp $$file; \ done great_emaner: for file in *.c *.h; do \ sed "s/vbi3_/vbi_/g;s/VBI3_/VBI_/g" <$$file >tmp; \ mv tmp $$file; \ done # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: zapping-0.10cvs6/plugins/teletext/search.c 644 764 144 27024 10305454533 13764 /* * Zapping TV viewer * * Copyright (C) 2000, 2001, 2002 Iaki Garca Etxebarria * Copyright (C) 2000, 2001, 2002, 2003, 2004 Michael H. Schimek * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* $Id: search.c,v 1.5 2005/09/01 01:28:59 mschimek Exp $ */ #include "src/zgconf.h" #include "main.h" /* td */ #include "search.h" enum { SEARCH_RESPONSE_BACK = 1, SEARCH_RESPONSE_FORWARD, }; #define GCONF_DIR "/apps/zapping/plugins/teletext" static GObjectClass * parent_class; static GdkCursor * cursor_normal; static GdkCursor * cursor_busy; /* Substitute keywords by regex, returns a newly allocated string. */ static gchar * substitute (const gchar * string) { static const gchar *search_keys [][2] = { { "#email#", "([:alnum:]|[-~.])+@([:alnum:]|[-~.])+" }, { "#url#", "(https?://([:alnum:]|[-~./?%_=+])+)|" "(www.([:alnum:]|[-~./?%_=+])+)" } }; gchar *s; guint i; if (!string || !*string) return g_strdup (""); else s = g_strdup (string); for (i = 0; i < 2; ++i) { gchar *found; while ((found = strstr (s, search_keys[i][0]))) { gchar *s1; *found = 0; s1 = g_strconcat (s, search_keys[i][1], found + strlen (search_keys[i][0]), NULL); g_free (s); s = s1; } } return s; } static void result (SearchDialog * sp, const gchar * format, ...) { gchar *buffer; va_list args; #if 1 gdk_window_set_cursor (GTK_WIDGET (sp)->window, cursor_normal); gtk_widget_set_sensitive (GTK_WIDGET (sp), TRUE); #else gtk_widget_set_sensitive (sp->entry, TRUE); gtk_widget_set_sensitive (GTK_WIDGET (sp->regexp), TRUE); gtk_widget_set_sensitive (GTK_WIDGET (sp->casefold), TRUE); gtk_widget_set_sensitive (sp->back, TRUE); gtk_widget_set_sensitive (sp->forward, TRUE); if (sp->direction < 0) gtk_dialog_set_default_response (GTK_DIALOG (sp), SEARCH_RESPONSE_BACK); else gtk_dialog_set_default_response (GTK_DIALOG (sp), SEARCH_RESPONSE_FORWARD); #endif va_start (args, format); buffer = g_strdup_vprintf (format, args); va_end (args); gtk_label_set_text (sp->label, buffer); g_free (buffer); } static gboolean idle (gpointer user_data) { SearchDialog *sp = user_data; vbi3_search_status status; const vbi3_page *pg; gboolean call_again; #if 1 gdk_window_set_cursor (GTK_WIDGET (sp)->window, cursor_busy); gtk_widget_set_sensitive (GTK_WIDGET (sp), FALSE); #else gtk_widget_set_sensitive (sp->entry, FALSE); gtk_widget_set_sensitive (GTK_WIDGET (sp->regexp), FALSE); gtk_widget_set_sensitive (GTK_WIDGET (sp->casefold), FALSE); gtk_widget_set_sensitive (sp->back, FALSE); gtk_widget_set_sensitive (sp->forward, FALSE); gtk_dialog_set_default_response (GTK_DIALOG (sp), GTK_RESPONSE_CANCEL); #endif gtk_label_set_text (sp->label, _("Search text:")); /* XXX shouldn't we have a few format options here? */ status = vbi3_search_next (sp->context, &pg, sp->direction, VBI3_END); switch (status) { case VBI3_SEARCH_SUCCESS: sp->start_pgno = pg->pgno; sp->start_subno = pg->subno; if (sp->view) { vbi3_page *pg2; pg2 = vbi3_page_dup (pg); g_assert (NULL != pg2); sp->view->show_page (sp->view, pg2); } result (sp, _("Found text on page %x.%02x:"), pg->pgno, pg->subno); call_again = FALSE; sp->searching = FALSE; break; case VBI3_SEARCH_NOT_FOUND: result (sp, _("Not found:")); call_again = FALSE; sp->searching = FALSE; break; case VBI3_SEARCH_ABORTED: /* Events pending, handle them and continue. */ call_again = TRUE; break; case VBI3_SEARCH_CACHE_EMPTY: result (sp, _("Page memory is empty")); call_again = FALSE; sp->searching = FALSE; break; default: g_message ("Unknown search status %d in %s", status, __PRETTY_FUNCTION__); /* fall through */ case VBI3_SEARCH_ERROR: call_again = FALSE; sp->searching = FALSE; break; } return call_again; } static void search_restart (SearchDialog * sp, const gchar * text, vbi3_pgno start_pgno, vbi3_subno start_subno, gboolean regexp, gboolean casefold, gboolean all_channels _unused_) { vbi3_teletext_decoder *td; const vbi3_network *nk; gchar *pattern; g_free (sp->text); sp->text = g_strdup (text); pattern = substitute (text); vbi3_search_delete (sp->context); nk = &sp->view->req.network; if (vbi3_network_is_anonymous (nk)) nk = NULL; /* use received */ g_assert (NULL != sp->view->vbi); td = vbi3_decoder_cast_to_teletext_decoder (sp->view->vbi); /* Progress callback: Tried first with, to permit the user cancelling a running search. But it seems there's a bug in libzvbi, vbi3_search_next does not properly resume after the progress callback aborted to handle pending gtk events. Calling gtk main from callback is suicidal. Another bug: the callback lacks a user_data parameter. */ sp->context = vbi3_teletext_decoder_search_utf8_new (td, nk, start_pgno, start_subno, pattern, casefold, regexp, /* progress */ NULL, /* user_data */ NULL); g_free (pattern); } static void _continue (SearchDialog * sp, gint direction) { gboolean regexp = TRUE; gboolean casefold = FALSE; gboolean all_channels = FALSE; const gchar *ctext; gchar *text; ctext = gtk_entry_get_text (GTK_ENTRY (sp->entry)); if (!ctext || !*ctext) { /* Search for what? */ gtk_window_present (GTK_WINDOW (sp)); gtk_widget_grab_focus (sp->entry); return; } text = g_strdup (ctext); /* Error ignored. */ z_gconf_get_bool (®exp, GCONF_DIR "/search/regexp"); z_gconf_get_bool (&casefold, GCONF_DIR "/search/casefold"); z_gconf_get_bool (&all_channels, GCONF_DIR "/search/all_channels"); if (!sp->text || 0 != strcmp (sp->text, text)) { search_restart (sp, text, 0x100, VBI3_ANY_SUBNO, regexp, casefold, all_channels); } else if (regexp != sp->regexp || casefold != sp->casefold || all_channels != sp->all_channels) { search_restart (sp, text, sp->start_pgno, sp->start_subno, regexp, casefold, all_channels); } sp->regexp = regexp; sp->casefold = casefold; sp->all_channels = all_channels; g_free (text); sp->direction = direction; g_idle_add (idle, sp); sp->searching = TRUE; } static void on_next_clicked (GtkButton * button _unused_, SearchDialog * sp) { _continue (sp, +1); } static void on_prev_clicked (GtkButton * button _unused_, SearchDialog * sp) { _continue (sp, -1); } static void on_cancel_clicked (GtkWidget * button _unused_, SearchDialog * sp) { gtk_widget_destroy (GTK_WIDGET (sp)); } static void on_help_clicked (GtkWidget * button _unused_, SearchDialog * sp _unused_) { z_help_display (GTK_WINDOW (sp), "zapping", "zapzilla-search"); } static void instance_finalize (GObject * object) { SearchDialog *t = SEARCH_DIALOG (object); if (t->searching) g_idle_remove_by_data (t); if (t->context) vbi3_search_delete (t->context); g_free (t->text); parent_class->finalize (object); } static void instance_init (GTypeInstance * instance, gpointer g_class _unused_) { SearchDialog *t = (SearchDialog *) instance; GtkWindow *window; GtkWidget *widget; GtkBox *vbox; t->start_pgno = 0x100; t->start_subno = VBI3_ANY_SUBNO; window = GTK_WINDOW (t); gtk_window_set_title (window, _("Search page memory")); widget = gtk_vbox_new (FALSE, 0); vbox = GTK_BOX (widget); gtk_container_set_border_width (GTK_CONTAINER (widget), 6); gtk_box_pack_start (GTK_BOX (t->dialog.vbox), widget, TRUE, TRUE, 0); widget = gtk_label_new (_("Search text:")); t->label = GTK_LABEL (widget); gtk_box_pack_start (vbox, widget, FALSE, FALSE, 3); widget = gnome_entry_new ("ure_search_history"); t->entry = gnome_entry_gtk_entry (GNOME_ENTRY (widget)); gtk_entry_set_activates_default (GTK_ENTRY (t->entry), TRUE); gtk_box_pack_start (vbox, widget, FALSE, FALSE, 3); widget = z_gconf_check_button_new (_("_Regular expression"), GCONF_DIR "/search/regexp", NULL, TRUE); gtk_box_pack_start (vbox, widget, FALSE, FALSE, 3); widget = z_gconf_check_button_new (_("Search case _insensitive"), GCONF_DIR "/search/casefold", NULL, FALSE); gtk_box_pack_start (vbox, widget, FALSE, FALSE, 3); /* Future stuff. */ widget = z_gconf_check_button_new (_("_All channels"), GCONF_DIR "/search/all_channels", NULL, FALSE); gtk_widget_set_sensitive (widget, FALSE); gtk_box_pack_start (vbox, widget, FALSE, FALSE, 3); widget = gtk_button_new_from_stock (GTK_STOCK_HELP); gtk_dialog_add_action_widget (&t->dialog, widget, GTK_RESPONSE_HELP); g_signal_connect (G_OBJECT (widget), "clicked", G_CALLBACK (on_help_clicked), t); widget = gtk_button_new_from_stock (GTK_STOCK_CANCEL); gtk_dialog_add_action_widget (&t->dialog, widget, GTK_RESPONSE_CANCEL); GTK_WIDGET_SET_FLAGS (widget, GTK_CAN_DEFAULT); g_signal_connect (G_OBJECT (widget), "clicked", G_CALLBACK (on_cancel_clicked), t); widget = gtk_button_new_from_stock (GTK_STOCK_GO_BACK); t->back = widget; gtk_dialog_add_action_widget (&t->dialog, widget, SEARCH_RESPONSE_BACK); GTK_WIDGET_SET_FLAGS (widget, GTK_CAN_DEFAULT); g_signal_connect (G_OBJECT (widget), "clicked", G_CALLBACK (on_prev_clicked), t); widget = gtk_button_new_from_stock (GTK_STOCK_GO_FORWARD); t->forward = widget; gtk_dialog_add_action_widget (&t->dialog, widget, SEARCH_RESPONSE_FORWARD); GTK_WIDGET_SET_FLAGS (widget, GTK_CAN_DEFAULT); g_signal_connect (G_OBJECT (widget), "clicked", G_CALLBACK (on_next_clicked), t); gtk_dialog_set_default_response (&t->dialog, SEARCH_RESPONSE_FORWARD); gtk_widget_grab_focus (t->entry); } GtkWidget * search_dialog_new (TeletextView * view) { SearchDialog *sp; sp = (SearchDialog *) g_object_new (TYPE_SEARCH_DIALOG, NULL); sp->view = view; g_signal_connect_swapped (G_OBJECT (view), "destroy", G_CALLBACK (gtk_widget_destroy), sp); return GTK_WIDGET (sp); } static void class_init (gpointer g_class, gpointer class_data _unused_) { GObjectClass *object_class; SearchDialogClass *c; object_class = G_OBJECT_CLASS (g_class); parent_class = g_type_class_peek_parent (object_class); object_class->finalize = instance_finalize; c = SEARCH_DIALOG_CLASS (g_class); cursor_normal = gdk_cursor_new (GDK_LEFT_PTR); cursor_busy = gdk_cursor_new (GDK_WATCH); } GType search_dialog_get_type (void) { static GType type = 0; if (!type) { GTypeInfo info; CLEAR (info); info.class_size = sizeof (SearchDialogClass); info.class_init = class_init; info.instance_size = sizeof (SearchDialog); info.instance_init = instance_init; type = g_type_register_static (GTK_TYPE_DIALOG, "SearchDialog", &info, (GTypeFlags) 0); } return type; } zapping-0.10cvs6/plugins/teletext/search.h 644 764 144 4620 10305456045 13746 /* * Zapping TV viewer * * Copyright (C) 2000, 2001, 2002 Iaki Garca Etxebarria * Copyright (C) 2000, 2001, 2002, 2003, 2004 Michael H. Schimek * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* $Id: search.h,v 1.3 2005/09/01 01:40:53 mschimek Exp $ */ #ifndef TELETEXT_SEARCH_H #define TELETEXT_SEARCH_H #include #include "libvbi/bcd.h" /* vbi3_pgno, vbi3_subno */ #include "libvbi/search.h" /* vbi3_search */ #include "view.h" G_BEGIN_DECLS #define TYPE_SEARCH_DIALOG (search_dialog_get_type ()) #define SEARCH_DIALOG(obj) \ (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SEARCH_DIALOG, SearchDialog)) #define SEARCH_DIALOG_CLASS(klass) \ (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SEARCH_DIALOG, SearchDialogClass)) #define IS_SEARCH_DIALOG(obj) \ (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SEARCH_DIALOG)) #define IS_SEARCH_DIALOG_CLASS(klass) \ (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SEARCH_DIALOG)) #define SEARCH_DIALOG_GET_CLASS(obj) \ (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SEARCH_DIALOG, SearchDialogClass)) typedef struct _SearchDialog SearchDialog; typedef struct _SearchDialogClass SearchDialogClass; struct _SearchDialog { GtkDialog dialog; /*< private >*/ GtkLabel * label; GtkWidget * entry; GtkWidget * back; GtkWidget * forward; TeletextView * view; vbi3_search * context; gchar * text; gint direction; gboolean searching; vbi3_pgno start_pgno; vbi3_subno start_subno; gboolean regexp; gboolean casefold; gboolean all_channels; }; struct _SearchDialogClass { GtkDialogClass parent_class; }; extern GType search_dialog_get_type (void) G_GNUC_CONST; extern GtkWidget * search_dialog_new (TeletextView * view); G_END_DECLS #endif /* TELETEXT_SEARCH_H */ zapping-0.10cvs6/plugins/teletext/bookmark.c 644 764 144 41657 10305454571 14336 /* * Zapping TV viewer * * Copyright (C) 2000, 2001, 2002 Iaki Garca Etxebarria * Copyright (C) 2000, 2001, 2002, 2003, 2004 Michael H. Schimek * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* $Id: bookmark.c,v 1.4 2005/09/01 01:29:29 mschimek Exp $ */ #include "libvbi/top_title.h" #include "main.h" #include "bookmark.h" #define ZCONF_DOMAIN "/zapping/ttxview/" #include "src/zconf.h" #include "src/zmisc.h" #include "src/v4linterface.h" void bookmark_delete (bookmark * b) { if (!b) return; g_free (b->channel); g_free (b->description); page_num_destroy (&b->pn); CLEAR (*b); g_free (b); } void bookmark_list_destroy (bookmark_list * bl) { g_assert (NULL != bl); bookmark_list_remove_all (bl); g_object_unref (G_OBJECT (bl->zmodel)); CLEAR (*bl); } void bookmark_list_init (bookmark_list * bl) { g_assert (NULL != bl); CLEAR (*bl); bl->zmodel = ZMODEL (zmodel_new ()); } void bookmark_list_remove_all (bookmark_list * bl) { g_assert (NULL != bl); while (bl->bookmarks) { bookmark_delete ((bookmark *) bl->bookmarks->data); bl->bookmarks = g_list_delete_link (bl->bookmarks, bl->bookmarks); } } bookmark * bookmark_list_add (bookmark_list * bl, const gchar * channel, const vbi3_network * nk, vbi3_pgno pgno, vbi3_subno subno, const gchar * description) { bookmark *b; vbi3_bool success; g_assert (NULL != bl); b = (bookmark *) g_malloc (sizeof (*b)); b->channel = (channel && *channel) ? g_strdup (channel) : NULL; success = vbi3_network_copy (&b->pn.network, nk); g_assert (success); b->pn.pgno = pgno; b->pn.subno = subno; b->description = (description && *description) ? g_strdup (description) : NULL; bl->bookmarks = g_list_append (bl->bookmarks, b); return b; } /* XXX save vbi3_network */ void bookmark_list_save (const bookmark_list * bl) { const GList *glist; guint i; g_assert (NULL != bl); zconf_delete (ZCONF_DOMAIN "bookmarks"); i = 0; for (glist = bl->bookmarks; glist; glist = glist->next) { bookmark *b; gchar buf[200]; gint n; b = (bookmark *) glist->data; n = snprintf (buf, sizeof (buf) - 20, ZCONF_DOMAIN "bookmarks/%u/", i); g_assert (n > 0 && n < (gint) sizeof (buf) - 20); if (b->channel) { strcpy (buf + n, "channel"); zconf_create_string (b->channel, "Channel", buf); } strcpy (buf + n, "page"); zconf_create_int (b->pn.pgno, "Page", buf); strcpy (buf + n, "subpage"); zconf_create_int (b->pn.subno, "Subpage", buf); if (b->description) { strcpy (buf + n, "description"); zconf_create_string (b->description, "Description", buf); } ++i; } } /* XXX load vbi3_network */ void bookmark_list_load (bookmark_list * bl) { gchar *buffer; gchar *buffer2; gint pgno; gint subno; const gchar *channel; const gchar *descr; guint i; g_assert (NULL != bl); bookmark_list_remove_all (bl); i = 0; while (zconf_get_nth (i, &buffer, ZCONF_DOMAIN "bookmarks")) { buffer2 = g_strconcat (buffer, "/channel", NULL); channel = zconf_get_string (NULL, buffer2); g_free (buffer2); buffer2 = g_strconcat (buffer, "/page", NULL); zconf_get_int (&pgno, buffer2); g_free (buffer2); buffer2 = g_strconcat (buffer, "/subpage", NULL); zconf_get_int (&subno, buffer2); g_free (buffer2); buffer2 = g_strconcat (buffer, "/description", NULL); descr = zconf_get_string (NULL, buffer2); g_free (buffer2); bookmark_list_add (bl, channel, NULL, (vbi3_pgno) pgno, (vbi3_subno) subno, descr); g_free (buffer); ++i; } } /* Bookmark menu */ static void set_transient_for (GtkWindow * window, TeletextView * view) { GtkWidget *parent; parent = GTK_WIDGET (view); for (;;) { if (!parent) return; if (GTK_IS_WINDOW (parent)) break; parent = parent->parent; } gtk_window_set_transient_for (window, GTK_WINDOW (parent)); } static void on_add_bookmark_activate (GtkWidget * menu_item _unused_, TeletextView * view) { tveng_tuned_channel *channel; vbi3_teletext_decoder *td; vbi3_top_title tt; if (NULL == view->pg) return; td = NULL; if (view->vbi) td = vbi3_decoder_cast_to_teletext_decoder (view->vbi); channel = tveng_tuned_channel_nth (global_channel_list, (unsigned int) cur_tuned_channel); if (td && vbi3_teletext_decoder_get_top_title (td, &tt, view->pg->network, view->pg->pgno, view->pg->subno)) { bookmark_list_add (&bookmarks, channel ? channel->name : NULL, view->pg->network, view->pg->pgno, view->pg->subno, tt.title); vbi3_top_title_destroy (&tt); } else { bookmark_list_add (&bookmarks, channel ? channel->name : NULL, view->pg->network, view->pg->pgno, view->pg->subno, NULL); } zmodel_changed (bookmarks.zmodel); if (view->appbar) { gchar *buffer; if (view->pg->subno && VBI3_ANY_SUBNO != view->pg->subno) buffer = g_strdup_printf (_("Added page %x.%02x to bookmarks"), view->pg->pgno, view->pg->subno); else buffer = g_strdup_printf (_("Added page %x to bookmarks"), view->pg->pgno); gnome_appbar_set_status (GNOME_APPBAR (view->appbar), buffer); g_free (buffer); } } static void on_edit_bookmarks_activate (GtkWidget * menu_item _unused_, TeletextView * view) { GtkWidget *widget; if (bookmarks_dialog) { gtk_window_present (GTK_WINDOW (bookmarks_dialog)); } else if ((widget = bookmark_editor_new (&bookmarks))) { set_transient_for (GTK_WINDOW (widget), view); gtk_widget_show_all (widget); } } /* XXX use vbi3_network */ static void on_bookmark_menu_item_activate (GtkWidget * menu_item, TeletextView * data) { bookmark *b; GList *glist; b = g_object_get_data (G_OBJECT (menu_item), "bookmark"); for (glist = bookmarks.bookmarks; glist; glist = glist->next) if (glist->data == b) break; if (!glist) return; if (zapping->info && global_channel_list && b->channel) { tveng_tuned_channel *channel; channel = tveng_tuned_channel_by_name (global_channel_list, b->channel); if (channel) z_switch_channel (channel, zapping->info); } data->load_page (data, &anonymous_network, b->pn.pgno, b->pn.subno); } static GnomeUIInfo bookmarks_uiinfo [] = { { GNOME_APP_UI_ITEM, N_("_Add Bookmark"), NULL, G_CALLBACK (on_add_bookmark_activate), NULL, NULL, GNOME_APP_PIXMAP_STOCK, GTK_STOCK_ADD, GDK_D, (GdkModifierType) GDK_CONTROL_MASK, NULL }, { GNOME_APP_UI_ITEM, N_("_Edit Bookmarks..."), NULL, G_CALLBACK (on_edit_bookmarks_activate), NULL, NULL, GNOME_APP_PIXMAP_NONE, NULL, GDK_B, (GdkModifierType) GDK_CONTROL_MASK, NULL }, GNOMEUIINFO_END }; /* XXX use vbi3_network */ GtkWidget * bookmarks_menu_new (TeletextView * view) { GtkMenuShell *menu; GtkWidget *widget; GList *glist; menu = GTK_MENU_SHELL (gtk_menu_new ()); bookmarks_uiinfo[0].user_data = view; bookmarks_uiinfo[1].user_data = view; gnome_app_fill_menu (menu, bookmarks_uiinfo, /* accel */ NULL, /* mnemo */ TRUE, /* position */ 0); if (!bookmarks.bookmarks) return GTK_WIDGET (menu); widget = gtk_separator_menu_item_new (); gtk_widget_show (widget); gtk_menu_shell_append (menu, widget); for (glist = bookmarks.bookmarks; glist; glist = glist->next) { bookmark *b; GtkWidget *menu_item; gchar *buffer; gchar *channel; b = (bookmark * ) glist->data; channel = b->channel; if (channel && !*channel) channel = NULL; if (b->pn.subno != VBI3_ANY_SUBNO) buffer = g_strdup_printf ("%s%s%x.%x", channel ? channel : "", channel ? " " : "", b->pn.pgno, b->pn.subno); else buffer = g_strdup_printf ("%s%s%x", channel ? channel : "", channel ? " " : "", b->pn.pgno); if (b->description && *b->description) { menu_item = z_gtk_pixmap_menu_item_new (b->description, GTK_STOCK_JUMP_TO); z_tooltip_set (menu_item, buffer); } else { menu_item = z_gtk_pixmap_menu_item_new (buffer, GTK_STOCK_JUMP_TO); } gtk_widget_show (menu_item); g_object_set_data (G_OBJECT (menu_item), "bookmark", b); g_signal_connect (G_OBJECT (menu_item), "activate", G_CALLBACK (on_bookmark_menu_item_activate), view); gtk_menu_shell_append (menu, menu_item); g_free (buffer); } return GTK_WIDGET (menu); } /* Bookmark editor */ enum { BOOKMARK_COLUMN_CHANNEL, BOOKMARK_COLUMN_PGNO, BOOKMARK_COLUMN_SUBNO, BOOKMARK_COLUMN_DESCRIPTION, BOOKMARK_COLUMN_EDITABLE, BOOKMARK_NUM_COLUMNS }; static GObjectClass *parent_class; static void page_cell_data_func (GtkTreeViewColumn * column _unused_, GtkCellRenderer * cell, GtkTreeModel * model, GtkTreeIter * iter, gpointer user_data _unused_) { gchar buf[32]; guint pgno; guint subno; gtk_tree_model_get (model, iter, BOOKMARK_COLUMN_PGNO, &pgno, BOOKMARK_COLUMN_SUBNO, &subno, -1); if (subno && subno != VBI3_ANY_SUBNO) g_snprintf (buf, sizeof (buf), "%x.%02x", pgno & 0xFFF, subno & 0xFF); else g_snprintf (buf, sizeof (buf), "%x", pgno & 0xFFF); g_object_set (GTK_CELL_RENDERER (cell), "text", buf, NULL); } static void on_descr_cell_edited (GtkCellRendererText * cell _unused_, const gchar * path_string, const gchar * new_text, BookmarkEditor * sp) { GtkTreePath *path; GtkTreeIter iter; path = gtk_tree_path_new_from_string (path_string); gtk_tree_model_get_iter (GTK_TREE_MODEL (sp->store), &iter, path); gtk_list_store_set (sp->store, &iter, BOOKMARK_COLUMN_DESCRIPTION, new_text, -1); gtk_tree_path_free (path); } static void on_remove_clicked (GtkWidget * widget _unused_, BookmarkEditor * sp) { z_tree_view_remove_selected (sp->tree_view, sp->selection, GTK_TREE_MODEL (sp->store)); } static void on_selection_changed (GtkTreeSelection * selection, BookmarkEditor * sp) { GtkTreeIter iter; gboolean selected; selected = z_tree_selection_iter_first (selection, GTK_TREE_MODEL (sp->store), &iter); gtk_widget_set_sensitive (sp->remove, selected); } static void on_cancel_clicked (GtkWidget * widget, gpointer user_data _unused_) { while (widget->parent) widget = widget->parent; gtk_widget_destroy (widget); } /* XXX use vbi3_network */ static gboolean foreach_add (GtkTreeModel * model, GtkTreePath * path _unused_, GtkTreeIter * iter, gpointer user_data) { BookmarkEditor *sp = (BookmarkEditor *) user_data; guint pgno; guint subno; gchar *channel; gchar *descr; gtk_tree_model_get (model, iter, BOOKMARK_COLUMN_CHANNEL, &channel, BOOKMARK_COLUMN_PGNO, &pgno, BOOKMARK_COLUMN_SUBNO, &subno, BOOKMARK_COLUMN_DESCRIPTION, &descr, -1); bookmark_list_add (sp->bl, channel, NULL, (vbi3_pgno) pgno, (vbi3_subno) subno, descr); return FALSE; /* continue */ } static void on_ok_clicked (GtkWidget * button, BookmarkEditor * sp) { bookmark_list_remove_all (sp->bl); gtk_tree_model_foreach (GTK_TREE_MODEL (sp->store), foreach_add, sp); zmodel_changed (sp->bl->zmodel); on_cancel_clicked (button, sp); } static void instance_finalize (GObject * object) { BookmarkEditor *t = BOOKMARK_EDITOR (object); g_object_unref (t->store); parent_class->finalize (object); } static void instance_init (GTypeInstance * instance, gpointer g_class _unused_) { BookmarkEditor *sp = (BookmarkEditor *) instance; GtkWindow *window; GtkBox *vbox; GtkWidget *scrolled_window; GtkCellRenderer *renderer; GtkTreeViewColumn *column; GtkWidget *widget; window = GTK_WINDOW (sp); gtk_window_set_title (window, _("Bookmarks")); widget = gtk_vbox_new (FALSE, 3); gtk_container_set_border_width (GTK_CONTAINER (widget), 6); vbox = GTK_BOX (widget); gtk_box_pack_start (GTK_BOX (sp->dialog.vbox), widget, TRUE, TRUE, 0); scrolled_window = gtk_scrolled_window_new (NULL, NULL); gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolled_window), GTK_SHADOW_ETCHED_IN); gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled_window), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); gtk_box_pack_start (vbox, scrolled_window, TRUE, TRUE, 0); sp->store = gtk_list_store_new (BOOKMARK_NUM_COLUMNS, G_TYPE_STRING, G_TYPE_UINT, G_TYPE_UINT, G_TYPE_STRING, G_TYPE_BOOLEAN); widget = gtk_tree_view_new_with_model (GTK_TREE_MODEL (sp->store)); sp->tree_view = GTK_TREE_VIEW (widget); gtk_tree_view_set_rules_hint (sp->tree_view, TRUE); gtk_tree_view_set_reorderable (sp->tree_view, TRUE); gtk_tree_view_set_search_column (sp->tree_view, BOOKMARK_COLUMN_DESCRIPTION); gtk_container_add (GTK_CONTAINER (scrolled_window), widget); sp->selection = gtk_tree_view_get_selection (sp->tree_view); gtk_tree_selection_set_mode (sp->selection, GTK_SELECTION_MULTIPLE); g_signal_connect (G_OBJECT (sp->selection), "changed", G_CALLBACK (on_selection_changed), sp); column = gtk_tree_view_column_new_with_attributes (_("Channel"), gtk_cell_renderer_text_new (), "text", BOOKMARK_COLUMN_CHANNEL, NULL); gtk_tree_view_append_column (sp->tree_view, column); gtk_tree_view_insert_column_with_data_func (sp->tree_view, -1, _("Page"), gtk_cell_renderer_text_new (), page_cell_data_func, NULL, NULL); renderer = gtk_cell_renderer_text_new (); column = gtk_tree_view_column_new_with_attributes (_("Description"), renderer, "text", BOOKMARK_COLUMN_DESCRIPTION, "editable", BOOKMARK_COLUMN_EDITABLE, NULL); gtk_tree_view_append_column (sp->tree_view, column); g_signal_connect (renderer, "edited", G_CALLBACK (on_descr_cell_edited), sp); widget = gtk_button_new_from_stock (GTK_STOCK_REMOVE); sp->remove = widget; gtk_box_pack_start (vbox, widget, FALSE, FALSE, 0); gtk_widget_set_sensitive (widget, FALSE); g_signal_connect (G_OBJECT (widget), "clicked", G_CALLBACK (on_remove_clicked), sp); widget = gtk_button_new_from_stock (GTK_STOCK_CANCEL); gtk_dialog_add_action_widget (&sp->dialog, widget, 1); GTK_WIDGET_SET_FLAGS (widget, GTK_CAN_DEFAULT); g_signal_connect (G_OBJECT (widget), "clicked", G_CALLBACK (on_cancel_clicked), sp); widget = gtk_button_new_from_stock (GTK_STOCK_OK); gtk_dialog_add_action_widget (&sp->dialog, widget, 2); GTK_WIDGET_SET_FLAGS (widget, GTK_CAN_DEFAULT); g_signal_connect (G_OBJECT (widget), "clicked", G_CALLBACK (on_ok_clicked), sp); } /* XXX use vbi3_network */ static void append (BookmarkEditor * sp, const bookmark * b) { GtkTreeIter iter; const gchar *channel; const gchar *description; channel = b->channel ? b->channel : ""; description = b->description ? b->description : ""; gtk_list_store_append (sp->store, &iter); gtk_list_store_set (sp->store, &iter, BOOKMARK_COLUMN_CHANNEL, channel, BOOKMARK_COLUMN_PGNO, b->pn.pgno, BOOKMARK_COLUMN_SUBNO, b->pn.subno, BOOKMARK_COLUMN_DESCRIPTION, description, BOOKMARK_COLUMN_EDITABLE, TRUE, -1); } GtkWidget * bookmark_editor_new (bookmark_list * bl) { BookmarkEditor *sp; GList *glist; sp = (BookmarkEditor *) g_object_new (TYPE_BOOKMARK_EDITOR, NULL); sp->bl = bl; for (glist = bl->bookmarks; glist; glist = glist->next) append (sp, (bookmark *) glist->data); return GTK_WIDGET (sp); } static void class_init (gpointer g_class, gpointer class_data _unused_) { GObjectClass *object_class; object_class = G_OBJECT_CLASS (g_class); parent_class = g_type_class_peek_parent (object_class); object_class->finalize = instance_finalize; } GType bookmark_editor_get_type (void) { static GType type = 0; if (!type) { GTypeInfo info; CLEAR (info); info.class_size = sizeof (BookmarkEditorClass); info.class_init = class_init; info.instance_size = sizeof (BookmarkEditor); info.instance_init = instance_init; type = g_type_register_static (GTK_TYPE_DIALOG, "BookmarkEditor", &info, (GTypeFlags) 0); } return type; } zapping-0.10cvs6/plugins/teletext/bookmark.h 644 764 144 5677 10305456045 14323 /* * Zapping TV viewer * * Copyright (C) 2000, 2001, 2002 Iaki Garca Etxebarria * Copyright (C) 2000, 2001, 2002, 2003, 2004 Michael H. Schimek * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* $Id: bookmark.h,v 1.3 2005/09/01 01:40:53 mschimek Exp $ */ #ifndef TELETEXT_BOOKMARK_H #define TELETEXT_BOOKMARK_H #include #include "src/zmodel.h" #include "page_num.h" #include "view.h" G_BEGIN_DECLS typedef struct { gchar * channel; gchar * description; page_num pn; } bookmark; typedef struct { GList * bookmarks; ZModel * zmodel; } bookmark_list; extern void bookmark_delete (bookmark * b); extern void bookmark_list_destroy (bookmark_list * bl); extern void bookmark_list_init (bookmark_list * bl); extern void bookmark_list_remove_all (bookmark_list * bl); extern bookmark * bookmark_list_add (bookmark_list * bl, const gchar * channel, const vbi3_network * nk, vbi3_pgno pgno, vbi3_subno subno, const gchar * description); extern void bookmark_list_save (const bookmark_list * bl); extern void bookmark_list_load (bookmark_list * bl); GtkWidget * bookmarks_menu_new (TeletextView * view); #define TYPE_BOOKMARK_EDITOR (bookmark_editor_get_type ()) #define BOOKMARK_EDITOR(obj) \ (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_BOOKMARK_EDITOR, BookmarkEditor)) #define BOOKMARK_EDITOR_CLASS(klass) \ (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_BOOKMARK_EDITOR, BookmarkEditorClass)) #define IS_BOOKMARK_EDITOR(obj) \ (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_BOOKMARK_EDITOR)) #define IS_BOOKMARK_EDITOR_CLASS(klass) \ (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_BOOKMARK_EDITOR)) #define BOOKMARK_EDITOR_GET_CLASS(obj) \ (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_BOOKMARK_EDITOR, BookmarkEditorClass)) typedef struct _BookmarkEditor BookmarkEditor; typedef struct _BookmarkEditorClass BookmarkEditorClass; struct _BookmarkEditor { GtkDialog dialog; /*< private >*/ GtkTreeView * tree_view; GtkTreeSelection * selection; GtkListStore * store; GtkWidget * remove; bookmark_list * bl; }; struct _BookmarkEditorClass { GtkDialogClass parent_class; }; extern GType bookmark_editor_get_type (void) G_GNUC_CONST; extern GtkWidget * bookmark_editor_new (bookmark_list * bl); G_END_DECLS #endif /* TELETEXT_BOOKMARK_H */ zapping-0.10cvs6/plugins/teletext/main.c 644 764 144 17464 10370717752 13461 /* * Zapping TV viewer * * Copyright (C) 2000, 2001, 2002 Iaki Garca Etxebarria * Copyright (C) 2000, 2001, 2002, 2003, 2004 Michael H. Schimek * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* $Id: main.c,v 1.15 2006/02/03 18:24:42 mschimek Exp $ */ #ifdef HAVE_CONFIG_H # include "config.h" #endif #define ZCONF_DOMAIN "/zapping/ttxview/" #include "src/zconf.h" #include "src/plugin_common.h" #include "src/properties.h" #include "src/zgconf.h" #include "src/remote.h" #include "view.h" #include "window.h" #include "preferences.h" #include "main.h" #define GCONF_DIR "/apps/zapping/plugins/teletext" vbi3_network anonymous_network; GtkActionGroup * teletext_action_group; bookmark_list bookmarks; BookmarkEditor * bookmarks_dialog; GList * teletext_windows; GList * teletext_views; static GtkWidget * ttxview_popup_menu_new (GtkWidget * widget, GdkEventButton * event) { TeletextView *view; gboolean success; vbi3_link link; if (!(view = teletext_view_from_widget (widget))) return NULL; success = view->link_from_pointer_position (view, &link, (int) event->x, (int) event->y); widget = view->popup_menu (view, &link, /* large */ FALSE); if (success) vbi3_link_destroy (&link); return widget; } static GtkWidget * ttxview_bookmarks_menu_new (GtkWidget * widget) { TeletextView *view; if ((view = teletext_view_from_widget (widget))) return bookmarks_menu_new (view); return NULL; } static PyObject * py_ttx_open_new (PyObject * self _unused_, PyObject * args) { TeletextView *view; TeletextWindow *window; GtkWidget *widget; int page; int subpage; vbi3_pgno pgno; vbi3_subno subno; gint width; gint height; view = teletext_view_from_widget (python_command_widget ()); if (view && view->pg) { page = vbi3_bcd2bin (view->pg->pgno); subpage = vbi3_bcd2bin (view->pg->subno & 0xFF); } else { gint value; value = 100; if (z_gconf_get_int (&value, GCONF_DIR "/home_page")) value = SATURATE (value, 100, 899); page = value; subpage = -1; } if (!ParseTuple (args, "|ii", &page, &subpage)) g_error ("zapping.ttx_open_new(|ii)"); if (page >= 100 && page <= 899) pgno = vbi3_bin2bcd (page); else py_return_false; if (subpage < 0) subno = VBI3_ANY_SUBNO; else if ((guint) subpage <= 99) subno = vbi3_bin2bcd (subpage); else py_return_false; width = 300; height = 200; if (view) gdk_window_get_geometry (GTK_WIDGET (view)->window, /* x */ NULL, /* y */ NULL, &width, &height, /* depth */ NULL); widget = teletext_window_new (); window = TELETEXT_WINDOW (widget); window->view->load_page (window->view, &anonymous_network, pgno, subno); gtk_widget_realize (widget); z_update_gui (); gdk_window_resize (widget->window, width, height); gtk_widget_show (widget); py_return_true; } static void preferences_action (GtkAction * action _unused_, gpointer user_data _unused_) { python_command_printf (NULL, "zapping.properties('Plugins','Teletext')"); } static PyObject * py_ttx_color (PyObject * self _unused_, PyObject * args _unused_) { preferences_action (NULL, NULL); py_return_true; } static GtkActionEntry actions [] = { { "Preferences", NULL, N_("_Preferences"), NULL, NULL, G_CALLBACK (preferences_action) }, { "Colors", NULL, N_("_Colors"), NULL, NULL, G_CALLBACK (preferences_action) /* sic */}, }; static void plugin_close (void) { while (teletext_windows) gtk_widget_destroy (GTK_WIDGET (teletext_windows->data)); if (bookmarks_dialog) { gtk_widget_destroy (GTK_WIDGET (bookmarks_dialog)); bookmarks_dialog = NULL; } bookmark_list_save (&bookmarks); bookmark_list_destroy (&bookmarks); vbi3_network_destroy (&anonymous_network); } static void properties_add (GtkDialog * dialog) { static SidebarEntry se = { .label = N_("Teletext"), .icon_name = "teletext48.png", .create = teletext_prefs_new, .apply = (void (*)(GtkWidget *)) teletext_prefs_apply, .cancel = (void (*)(GtkWidget *)) teletext_prefs_cancel, .help_link_id = "zapping-settings-vbi", }; static const SidebarGroup sg = { N_("Plugins"), &se, 1 }; standard_properties_add (dialog, &sg, 1, /* glade */ NULL); } static gboolean plugin_init (PluginBridge bridge _unused_, tveng_device_info * info _unused_) { static const property_handler ph = { .add = properties_add, }; D(); /* Preliminary. */ _ttxview_popup_menu_new = ttxview_popup_menu_new; _ttxview_bookmarks_menu_new = ttxview_bookmarks_menu_new; _ttxview_hotlist_menu_insert = ttxview_hotlist_menu_insert; append_property_handler (&ph); D(); teletext_action_group = gtk_action_group_new ("TeletextActions"); #ifdef ENABLE_NLS gtk_action_group_set_translation_domain (teletext_action_group, GETTEXT_PACKAGE); #endif gtk_action_group_add_actions (teletext_action_group, actions, G_N_ELEMENTS (actions), NULL); D(); vbi3_network_init (&anonymous_network); bookmark_list_init (&bookmarks); bookmark_list_load (&bookmarks); zcc_char (g_get_home_dir(), "Export directory", "exportdir"); D(); cmd_register ("ttx_open_new", py_ttx_open_new, METH_VARARGS, ("Open new Teletext window"), "zapping.ttx_open_new()"); cmd_register ("ttx_color", py_ttx_color, METH_VARARGS, ("Open Teletext color dialog"), "zapping.ttx_color()"); D(); return TRUE; } static void plugin_get_info (const gchar ** canonical_name, const gchar ** descriptive_name, const gchar ** description, const gchar ** short_description, const gchar ** author, const gchar ** version) { if (canonical_name) *canonical_name = "teletext"; if (descriptive_name) *descriptive_name = N_("Teletext plugin"); if (description) *description = ""; if (short_description) *short_description = ""; if (author) *author = ""; if (version) *version = "2.0"; } static struct plugin_misc_info * plugin_get_misc_info (void) { static struct plugin_misc_info returned_struct = { sizeof (struct plugin_misc_info), 6, /* plugin priority */ 0 /* category */ }; return &returned_struct; } gboolean plugin_get_symbol (const gchar * name, gint hash, gpointer * ptr) { static const struct plugin_exported_symbol symbols [] = { SYMBOL (plugin_close, 0x1234), SYMBOL (plugin_get_info, 0x1234), SYMBOL (plugin_get_misc_info, 0x1234), SYMBOL (plugin_init, 0x1234), SYMBOL2 (teletext, view_new), SYMBOL2 (teletext, view_from_widget), SYMBOL2 (teletext, toolbar_new), }; guint i; for (i = 0; i < N_ELEMENTS (symbols); ++i) if (0 == strcmp (symbols[i].symbol, name)) { if (symbols[i].hash != hash) { if (ptr) *ptr = GINT_TO_POINTER(0x3); /* hash collision code */ g_warning("Check error: \"%s\" in plugin %s " "has hash 0x%x vs. 0x%x", name, "teletext", symbols[i].hash, hash); return FALSE; } if (ptr) *ptr = symbols[i].ptr; return TRUE; } if (ptr) *ptr = GINT_TO_POINTER(0x2); return FALSE; } gint plugin_get_protocol (void) { return PLUGIN_PROTOCOL; } zapping-0.10cvs6/plugins/teletext/main.h 644 764 144 2534 10305456045 13427 /* * Zapping TV viewer * * Copyright (C) 2000, 2001, 2002 Iaki Garca Etxebarria * Copyright (C) 2000, 2001, 2002, 2003, 2004 Michael H. Schimek * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* $Id: main.h,v 1.4 2005/09/01 01:40:53 mschimek Exp $ */ #ifndef TELETEXT_MAIN_H #define TELETEXT_MAIN_H #ifdef HAVE_CONFIG_H # include "config.h" #endif #include #include "libvbi/teletext_decoder.h" #include "bookmark.h" extern vbi3_network anonymous_network; extern bookmark_list bookmarks; extern BookmarkEditor * bookmarks_dialog; extern GtkActionGroup * teletext_action_group; extern GList * teletext_windows; extern GList * teletext_views; #endif /* TELETEXT_MAIN_H */ zapping-0.10cvs6/plugins/teletext/window.c 644 764 144 64620 10305454517 14033 /* * Zapping TV viewer * * Copyright (C) 2000, 2001, 2002 Iaki Garca Etxebarria * Copyright (C) 2000, 2001, 2002, 2003, 2004 Michael H. Schimek * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* $Id: window.c,v 1.10 2005/09/01 01:28:47 mschimek Exp $ */ #ifdef HAVE_CONFIG_H # include "config.h" #endif #include "libvbi/link.h" #include "src/zmisc.h" #include "src/remote.h" #include "src/i18n.h" #include "src/zvbi.h" #include "src/zgconf.h" #include "view.h" #include "main.h" #include "window.h" static GObjectClass * parent_class; static void on_zvbi_model_changed (ZModel * zmodel _unused_, TeletextWindow * window) { gtk_widget_destroy (GTK_WIDGET (window)); } /* TOP menu */ typedef struct { TeletextWindow * window; page_num pn; } top_menu; static void top_menu_destroy (gpointer user_data) { top_menu *tm = (top_menu *) user_data; page_num_destroy (&tm->pn); CLEAR (*tm); g_free (tm); } static void on_top_menu_activate (GtkWidget * menu_item _unused_, top_menu * tm) { tm->window->view->load_page (tm->window->view, &tm->pn.network, tm->pn.pgno, tm->pn.subno); } static GtkWidget * top_menu_item_new (TeletextWindow * window, const vbi3_network * nk, const vbi3_top_title * tt, gboolean connect) { vbi3_teletext_decoder *td; vbi3_ttx_page_stat ps; GtkWidget *menu_item; const gchar *stock_id; td = vbi3_decoder_cast_to_teletext_decoder (window->vbi); ps.page_type = VBI3_UNKNOWN_PAGE; /* Error ignored. */ vbi3_teletext_decoder_get_ttx_page_stat (td, &ps, nk, tt->pgno); switch (ps.page_type) { case VBI3_SUBTITLE_PAGE: stock_id = "zapping-teletext"; break; case VBI3_PROGR_SCHEDULE: stock_id = "gnome-stock-timer"; break; default: stock_id = NULL; break; } if (stock_id) { GtkWidget *image; menu_item = gtk_image_menu_item_new_with_label (tt->title); image = gtk_image_new_from_stock (stock_id, GTK_ICON_SIZE_MENU); gtk_widget_show (image); gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_item), image); } else { menu_item = gtk_menu_item_new_with_label (tt->title); } gtk_widget_show (menu_item); { gchar buffer [32]; g_snprintf (buffer, sizeof (buffer), "%x", tt->pgno); z_tooltip_set (menu_item, buffer); } if (connect) { top_menu *tm; vbi3_bool success; tm = g_malloc (sizeof (*tm)); tm->window = window; tm->pn.pgno = tt->pgno; tm->pn.subno = tt->subno; if (nk) success = vbi3_network_copy (&tm->pn.network, nk); else success = vbi3_teletext_decoder_get_network (td, &tm->pn.network); g_assert (success); g_object_set_data_full (G_OBJECT (menu_item), "z-top-menu", tm, top_menu_destroy); g_signal_connect (G_OBJECT (menu_item), "activate", G_CALLBACK (on_top_menu_activate), tm); } return menu_item; } static GtkWidget * append_top_menu (TeletextWindow * window, GtkMenuShell * menu, const vbi3_network * nk) { vbi3_teletext_decoder *td; GtkWidget *first_item; vbi3_top_title *tt; unsigned int n_elements; td = vbi3_decoder_cast_to_teletext_decoder (window->vbi); first_item = NULL; vbi3_network_set (&window->top_network, nk); if (vbi3_network_is_anonymous (nk)) nk = NULL; /* use received network */ tt = vbi3_teletext_decoder_get_top_titles (td, nk, &n_elements); if (tt && n_elements > 0) { GtkWidget *subitem; GtkMenuShell *submenu; guint i; first_item = gtk_separator_menu_item_new (); gtk_widget_show (first_item); gtk_menu_shell_append (menu, first_item); subitem = NULL; submenu = NULL; for (i = 0; i < n_elements; ++i) { GtkWidget *item; item = top_menu_item_new (window, nk, &tt[i], TRUE); if (tt[i].group && subitem) { gtk_menu_shell_append (submenu, item); } else if ((i + 1) < n_elements && tt[i + 1].group) { GtkWidget *widget; subitem = top_menu_item_new (window, nk, &tt[i], FALSE); gtk_menu_shell_append (menu, subitem); widget = gtk_menu_new (); gtk_widget_show (widget); submenu = GTK_MENU_SHELL (widget); gtk_menu_item_set_submenu (GTK_MENU_ITEM (subitem), widget); gtk_menu_shell_append (submenu, item); } else { gtk_menu_shell_append (menu, item); subitem = NULL; } } } vbi3_top_title_array_delete (tt, n_elements); return first_item; } static void update_top_menu (TeletextWindow * window) { GtkWidget *item; GtkMenuShell *shell; GtkWidget *first_item; item = gtk_ui_manager_get_widget (window->ui_manager, "/MainMenu/GoSubmenu"); if (!item) return; shell = GTK_MENU_SHELL (gtk_menu_item_get_submenu GTK_MENU_ITEM (item)); if (window->top_items) z_menu_shell_chop_off (shell, window->top_items); first_item = append_top_menu (window, shell, &window->view->req.network); window->top_items = GTK_MENU_ITEM (first_item); } static void on_view_request_changed (TeletextView * view, TeletextWindow * window) { /* Update the TOP menu when the user changes networks. */ if (!vbi3_network_equal (&view->req.network, &window->top_network)) update_top_menu (window); } /* Channels menu */ typedef struct { TeletextWindow * window; vbi3_network network; } channel_menu; static void channel_menu_destroy (gpointer user_data) { channel_menu *cm = (channel_menu *) user_data; vbi3_network_destroy (&cm->network); CLEAR (*cm); g_free (cm); } static void on_channel_menu_received_toggled (GtkCheckMenuItem * menu_item, TeletextWindow * window) { if (menu_item->active) window->view->switch_network (window->view, &anonymous_network); } static void on_channel_menu_toggled (GtkCheckMenuItem * menu_item, channel_menu * cm) { if (menu_item->active) { if (0) { _vbi3_network_dump (&cm->network, stderr); fputc ('\n', stderr); } cm->window->view->switch_network (cm->window->view, &cm->network); } } static GtkWidget * append_channel_menu (TeletextWindow * window, GtkMenuShell * menu) { GtkWidget *first_item; vbi3_teletext_decoder *td; vbi3_cache *ca; vbi3_network *nk; unsigned int n_elements; vbi3_bool anon; GSList *group; /* TRANSLATORS: Choose from the Teletext page cache the currently received channel. */ first_item = gtk_radio_menu_item_new_with_mnemonic (NULL, _("_Received")); gtk_widget_show (first_item); group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (first_item)); if ((anon = vbi3_network_is_anonymous (&window->view->req.network))) gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (first_item), TRUE); g_signal_connect (G_OBJECT (first_item), "toggled", G_CALLBACK (on_channel_menu_received_toggled), window); gtk_menu_shell_append (menu, first_item); td = vbi3_decoder_cast_to_teletext_decoder (window->vbi); ca = vbi3_teletext_decoder_get_cache (td); nk = vbi3_cache_get_networks (ca, &n_elements); vbi3_cache_unref (ca); if (nk && n_elements > 0) { guint i; for (i = 0; i < n_elements; ++i) { GtkWidget *menu_item; channel_menu *cm; vbi3_bool success; if (nk[i].name) menu_item = gtk_radio_menu_item_new_with_label (group, nk[i].name); else menu_item = gtk_radio_menu_item_new_with_mnemonic (group, _("Unnamed")); gtk_widget_show (menu_item); group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (menu_item)); cm = g_malloc (sizeof (*cm)); cm->window = window; success = vbi3_network_copy (&cm->network, &nk[i]); g_assert (success); g_object_set_data_full (G_OBJECT (menu_item), "z-channel-menu", cm, channel_menu_destroy); if (!anon) if (vbi3_network_equal (&window->view->req.network, &cm->network)) gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (menu_item), TRUE); g_signal_connect (G_OBJECT (menu_item), "toggled", G_CALLBACK (on_channel_menu_toggled), cm); gtk_menu_shell_append (menu, menu_item); } } vbi3_network_array_delete (nk, n_elements); return first_item; } static void update_channel_menu (TeletextWindow * window) { GtkWidget *item; GtkMenuShell *shell; GtkWidget *first_item; item = gtk_ui_manager_get_widget (window->ui_manager, "/MainMenu/ChannelsSubmenu"); if (!item) return; shell = GTK_MENU_SHELL (gtk_menu_item_get_submenu GTK_MENU_ITEM (item)); /* Tried to set_submenu, but when we do that while the menu is active (think new channel on composite input) the app freezes. Gtk bug? Removing and adding items works fine. */ z_menu_shell_chop_off (shell, NULL /* all items */); first_item = append_channel_menu (window, shell); window->channel_items = GTK_MENU_ITEM (first_item); } /* Bookmarks menu */ static void on_bookmarks_changed (ZModel * zmodel _unused_, TeletextWindow * window) { GtkWidget *menu_item; menu_item = gtk_ui_manager_get_widget (window->ui_manager, "/MainMenu/BookmarksSubmenu"); if (!menu_item) return; gtk_menu_item_set_submenu (GTK_MENU_ITEM (menu_item), bookmarks_menu_new (window->view)); } static void on_bookmarks_destroy (GObject * object _unused_, TeletextWindow * window) { if (bookmarks.zmodel) g_signal_handlers_disconnect_matched (G_OBJECT (bookmarks.zmodel), G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, 0, 0, NULL, G_CALLBACK (on_bookmarks_changed), window); } /* Encoding menu */ typedef struct _encoding_menu encoding_menu; struct _encoding_menu { encoding_menu * next; TeletextWindow * window; GtkCheckMenuItem * item; gchar * name; vbi3_charset_code code; }; static void on_encoding_menu_auto_toggled (GtkCheckMenuItem * menu_item, TeletextWindow * window) { if (menu_item->active) window->view->set_charset (window->view, (vbi3_charset_code) -1); } static void on_encoding_menu_toggled (GtkCheckMenuItem * menu_item, encoding_menu * em) { if (menu_item->active) em->window->view->set_charset (em->window->view, em->code); } static void on_view_charset_changed (TeletextView * view, TeletextWindow * window) { GtkWidget *item; encoding_menu *list; GtkCheckMenuItem *check; item = gtk_ui_manager_get_widget (window->ui_manager, "/MainMenu/ViewSubmenu/EncodingSubmenu"); if (!item) return; list = g_object_get_data (G_OBJECT (item), "z-encoding-list"); g_assert (NULL != list); check = window->encoding_auto_item; for (; list; list = list->next) if (list->code == view->override_charset) { check = list->item; break; } if (!check->active) gtk_check_menu_item_set_active (check, TRUE); } static void encoding_menu_list_delete (gpointer user_data) { encoding_menu *em = (encoding_menu *) user_data; while (em) { encoding_menu *next; next = em->next; g_free (em->name); CLEAR (*em); g_free (em); em = next; } } static encoding_menu * encoding_menu_list_new (TeletextWindow * window) { encoding_menu *list; vbi3_charset_code code; list = NULL; for (code = 0; code < 88; ++code) { const vbi3_character_set *cs; vbi3_charset_code code2; gchar *item_name; encoding_menu *em; encoding_menu **emp; guint i; if (!(cs = vbi3_character_set_from_code (code))) continue; for (code2 = 0; code2 < code; ++code2) { const vbi3_character_set *cs2; if (!(cs2 = vbi3_character_set_from_code (code2))) continue; if (cs->g0 == cs2->g0 && cs->g2 == cs2->g2 && cs->subset == cs2->subset) break; } if (code2 < code) continue; /* duplicate */ item_name = NULL; for (i = 0; i < N_ELEMENTS (cs->language_code) && cs->language_code[i]; ++i) { const char *language_name; language_name = iso639_to_language_name (cs->language_code[i]); if (!language_name) continue; if (!item_name) item_name = g_strdup (language_name); else item_name = z_strappend (item_name, " / ", language_name, NULL); } if (!item_name) continue; /* sr/hr/sl */ if (29 == code) item_name = z_strappend (item_name, _(" (Latin)"), NULL); else if (32 == code) item_name = z_strappend (item_name, _(" (Cyrillic)"), NULL); em = g_malloc (sizeof (*em)); em->window = window; em->name = item_name; em->code = code; for (emp = &list; *emp; emp = &(*emp)->next) if (g_utf8_collate ((*emp)->name, item_name) >= 0) break; em->next = *emp; *emp = em; } return list; } static void create_encoding_menu (TeletextWindow * window) { GtkWidget *menu; GtkMenuShell *shell; GtkWidget *item; GSList *group; encoding_menu *list; encoding_menu *em; item = gtk_ui_manager_get_widget (window->ui_manager, "/MainMenu/ViewSubmenu/EncodingSubmenu"); if (!item) return; list = encoding_menu_list_new (window); g_object_set_data_full (G_OBJECT (item), "z-encoding-list", list, encoding_menu_list_delete); menu = gtk_menu_new (); shell = GTK_MENU_SHELL (menu); gtk_menu_item_set_submenu (GTK_MENU_ITEM (item), menu); item = gtk_radio_menu_item_new_with_mnemonic (NULL, _("_Automatic")); gtk_widget_show (item); window->encoding_auto_item = GTK_CHECK_MENU_ITEM (item); group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (item)); gtk_check_menu_item_set_active (window->encoding_auto_item, TRUE); g_signal_connect (G_OBJECT (item), "toggled", G_CALLBACK (on_encoding_menu_auto_toggled), window); gtk_menu_shell_append (shell, item); for (em = list; em; em = em->next) { item = gtk_radio_menu_item_new_with_label (group, em->name); gtk_widget_show (item); em->item = GTK_CHECK_MENU_ITEM (item); group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (item)); g_signal_connect (G_OBJECT (item), "toggled", G_CALLBACK (on_encoding_menu_toggled), em); gtk_menu_shell_append (shell, item); } } static const char * menu_description = "" " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " ""; static void create_main_menu (TeletextWindow * window) { GError *error = NULL; GtkAccelGroup *accel_group; GtkWidget *widget; gboolean success; window->ui_manager = gtk_ui_manager_new (); gtk_ui_manager_insert_action_group (window->ui_manager, window->action_group, APPEND); gtk_ui_manager_insert_action_group (window->ui_manager, window->view->action_group, APPEND); gtk_ui_manager_insert_action_group (window->ui_manager, teletext_action_group, APPEND); gtk_ui_manager_insert_action_group (window->ui_manager, zapping->generic_action_group, APPEND); success = gtk_ui_manager_add_ui_from_string (window->ui_manager, menu_description, NUL_TERMINATED, &error); if (!success || error) { if (error) { g_message ("Cannot build Teletext window menu:\n%s", error->message); g_error_free (error); error = NULL; } exit (EXIT_FAILURE); } accel_group = gtk_ui_manager_get_accel_group (window->ui_manager); gtk_window_add_accel_group (GTK_WINDOW (window), accel_group); widget = gtk_ui_manager_get_widget (window->ui_manager, "/MainMenu"); gnome_app_set_menus (GNOME_APP (window), GTK_MENU_BAR (widget)); vbi3_network_init (&window->top_network); update_top_menu (window); update_channel_menu (window); on_bookmarks_changed (NULL, window); /* Update bookmarks menu on bookmark changes. */ g_signal_connect (G_OBJECT (bookmarks.zmodel), "changed", G_CALLBACK (on_bookmarks_changed), window); g_signal_connect (G_OBJECT (window), "destroy", G_CALLBACK (on_bookmarks_destroy), window); create_encoding_menu (window); } static gboolean key_press_event (GtkWidget * widget, GdkEventKey * event) { TeletextWindow *window = TELETEXT_WINDOW (widget); return (window->view->key_press (window->view, event) || on_user_key_press (widget, event, NULL)); } static gboolean on_button_press_event (GtkWidget * widget _unused_, GdkEventButton * event, gpointer user_data) { TeletextWindow *window = TELETEXT_WINDOW (user_data); vbi3_link link; gboolean success; GtkWidget *menu; switch (event->button) { case 3: /* right button, context menu */ success = window->view->link_from_pointer_position (window->view, &link, (gint) event->x, (gint) event->y); menu = window->view->popup_menu (window->view, success ? &link : NULL, /* large */ TRUE); if (menu) gtk_menu_popup (GTK_MENU (menu), NULL, NULL, NULL, NULL, event->button, event->time); if (success) vbi3_link_destroy (&link); return TRUE; /* handled */ default: break; } return FALSE; /* pass on */ } static void close_action (GtkAction * action _unused_, TeletextWindow * window) { gtk_widget_destroy (GTK_WIDGET (window)); } /* preliminary */ static void new_window_action (GtkAction * action _unused_, TeletextWindow * window) { on_python_command1 (GTK_WIDGET (window), "zapping.ttx_open_new()"); } static GtkActionEntry actions [] = { { "FileSubmenu", NULL, N_("_File"), NULL, NULL, NULL }, { "NewWindow", GTK_STOCK_NEW, N_("_New Window"), NULL, NULL, G_CALLBACK (new_window_action) }, { "Close", GTK_STOCK_CLOSE, NULL, NULL, NULL, G_CALLBACK (close_action) }, { "EditSubmenu", NULL, N_("_Edit"), NULL, NULL, NULL }, { "ViewSubmenu", NULL, N_("_View"), NULL, NULL, NULL }, { "EncodingSubmenu", NULL, N_("_Encoding"), NULL, NULL, NULL }, { "ChannelsSubmenu", NULL, N_("_Channels"), NULL, NULL, NULL }, { "BookmarksSubmenu", NULL, N_("_Bookmarks"), NULL, NULL, NULL }, }; static void view_statusbar_action (GtkToggleAction * toggle_action, TeletextWindow * window) { if (gtk_toggle_action_get_active (toggle_action)) { /* Adding a hidden status bar is impossible, we have to add when the status bar becomes first visible. */ if (!window->statusbar_added) { window->statusbar_added = TRUE; gnome_app_set_statusbar (&window->app, GTK_WIDGET (window->view->appbar)); } gtk_widget_show (GTK_WIDGET (window->view->appbar)); } else if (window->statusbar_added) { gtk_widget_hide (GTK_WIDGET (window->view->appbar)); } } static void view_toolbar_action (GtkToggleAction * toggle_action, TeletextWindow * window) { BonoboDockItem *dock_item; if (gtk_toggle_action_get_active (toggle_action)) { /* Adding a hidden toolbar is impossible, we have to add when the toolbar becomes first visible. */ if (!window->toolbar_added) { window->toolbar_added = TRUE; gnome_app_set_toolbar (&window->app, GTK_TOOLBAR (window->view->toolbar)); } dock_item = gnome_app_get_dock_item_by_name (&window->app, GNOME_APP_TOOLBAR_NAME); gtk_widget_show (GTK_WIDGET (dock_item)); } else if (window->toolbar_added) { dock_item = gnome_app_get_dock_item_by_name (&window->app, GNOME_APP_TOOLBAR_NAME); gtk_widget_hide (GTK_WIDGET (dock_item)); } } static GtkToggleActionEntry toggle_actions [] = { { "ViewToolbar", NULL, N_("_Toolbar"), NULL, NULL, G_CALLBACK (view_toolbar_action), FALSE }, { "ViewStatusbar", NULL, N_("_Statusbar"), NULL, NULL, G_CALLBACK (view_statusbar_action), FALSE }, }; static vbi3_bool window_vbi3_event_handler (const vbi3_event * ev, void * user_data) { TeletextWindow *window = TELETEXT_WINDOW (user_data); switch (ev->type) { case VBI3_EVENT_CLOSE: gtk_widget_destroy (GTK_WIDGET (window)); break; case VBI3_EVENT_TOP_CHANGE: /* TOP data is distributed across several Teletext pages, may change as we receive more pages. Also called on network changes, when TOP at first becomes empty. */ if (vbi3_network_is_anonymous (&window->top_network) || vbi3_network_equal (&window->top_network, ev->network)) update_top_menu (window); break; case VBI3_EVENT_NETWORK: case VBI3_EVENT_REMOVE_NETWORK: /* Update the channel menu when cache contents change. */ update_channel_menu (window); break; default: break; } return FALSE; /* pass on */ } static void instance_finalize (GObject * object) { TeletextWindow *window = TELETEXT_WINDOW (object); vbi3_decoder_remove_event_handler (window->vbi, window_vbi3_event_handler, window); teletext_windows = g_list_remove (teletext_windows, window); g_signal_handlers_disconnect_matched (G_OBJECT (zvbi_get_model ()), G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, 0, 0, NULL, G_CALLBACK (on_zvbi_model_changed), window); vbi3_network_destroy (&window->top_network); g_object_unref (G_OBJECT (window->ui_manager)); parent_class->finalize (object); } static void instance_init (GTypeInstance * instance, gpointer g_class _unused_) { TeletextWindow *window = (TeletextWindow *) instance; GnomeApp *app; GtkWidget *widget; GObject *object; GtkToggleAction *toggle_action; /* XXX bad design */ window->vbi = zvbi_get_object (); g_assert (NULL != window->vbi); window->action_group = gtk_action_group_new ("TeletextWindowActions"); #ifdef ENABLE_NLS gtk_action_group_set_translation_domain (window->action_group, GETTEXT_PACKAGE); #endif gtk_action_group_add_actions (window->action_group, actions, G_N_ELEMENTS (actions), /* user_data */ window); gtk_action_group_add_toggle_actions (window->action_group, toggle_actions, G_N_ELEMENTS (toggle_actions), /* user_data */ window); /* We add the submenu ourselves. Make sure the menu item is visible despite initially without menu. */ z_show_empty_submenu (window->action_group, "BookmarksSubmenu"); z_show_empty_submenu (window->action_group, "ChannelsSubmenu"); z_show_empty_submenu (window->action_group, "EncodingSubmenu"); app = GNOME_APP (window); gnome_app_construct (app, "Zapping", "Zapzilla"); widget = teletext_view_new (); gtk_widget_show (widget); window->view = TELETEXT_VIEW (widget); object = G_OBJECT (window); g_object_set_data (object, "TeletextView", window->view); /* NOTE view only, not the entire window. */ g_signal_connect (G_OBJECT (window->view), "button-press-event", G_CALLBACK (on_button_press_event), window); gtk_widget_set_size_request (widget, 260, 250); gnome_app_set_contents (app, widget); create_main_menu (window); { widget = teletext_toolbar_new (window->view->action_group); gtk_widget_show_all (widget); window->view->toolbar = TELETEXT_TOOLBAR (widget); toggle_action = GTK_TOGGLE_ACTION (gtk_action_group_get_action (window->action_group, "ViewToolbar")); z_toggle_action_connect_gconf_key (toggle_action, "/apps/zapping/plugins/teletext/window/view_toolbar"); /* Adds the toolbar if necessary. */ view_toolbar_action (toggle_action, window); } { widget = gnome_appbar_new (/* has_progress */ FALSE, /* has_status */ TRUE, GNOME_PREFERENCES_NEVER); window->view->appbar = GNOME_APPBAR (widget); toggle_action = GTK_TOGGLE_ACTION (gtk_action_group_get_action (window->action_group, "ViewStatusbar")); z_toggle_action_connect_gconf_key (toggle_action, "/apps/zapping/plugins/teletext/window/view_statusbar"); /* Adds the status bar if necessary. */ view_statusbar_action (toggle_action, window); } { vbi3_bool success; /* Update UI if new information becomes available. */ success = vbi3_decoder_add_event_handler (window->vbi, (VBI3_EVENT_CLOSE | VBI3_EVENT_NETWORK | VBI3_EVENT_TOP_CHANGE | VBI3_EVENT_REMOVE_NETWORK), window_vbi3_event_handler, window); g_assert (success); } g_signal_connect (G_OBJECT (window->view), "z-charset-changed", G_CALLBACK (on_view_charset_changed), window); g_signal_connect (G_OBJECT (window->view), "z-request-changed", G_CALLBACK (on_view_request_changed), window); g_signal_connect (G_OBJECT (zvbi_get_model ()), "changed", G_CALLBACK (on_zvbi_model_changed), window); teletext_windows = g_list_append (teletext_windows, window); } GtkWidget * teletext_window_new (void) { return GTK_WIDGET (g_object_new (TYPE_TELETEXT_WINDOW, NULL)); } static void class_init (gpointer g_class, gpointer class_data _unused_) { GObjectClass *object_class; GtkWidgetClass *widget_class; object_class = G_OBJECT_CLASS (g_class); widget_class = GTK_WIDGET_CLASS (g_class); parent_class = g_type_class_peek_parent (g_class); object_class->finalize = instance_finalize; widget_class->key_press_event = key_press_event; } GType teletext_window_get_type (void) { static GType type = 0; if (!type) { GTypeInfo info; CLEAR (info); info.class_size = sizeof (TeletextWindowClass); info.class_init = class_init; info.instance_size = sizeof (TeletextWindow); info.instance_init = instance_init; type = g_type_register_static (GNOME_TYPE_APP, "TeletextWindow", &info, (GTypeFlags) 0); } return type; } zapping-0.10cvs6/plugins/teletext/window.h 644 764 144 4505 10305456045 14012 /* * Zapping TV viewer * * Copyright (C) 2000, 2001, 2002 Iaki Garca Etxebarria * Copyright (C) 2000, 2001, 2002, 2003, 2004 Michael H. Schimek * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* $Id: window.h,v 1.3 2005/09/01 01:40:53 mschimek Exp $ */ #ifndef TELETEXT_WINDOW_H #define TELETEXT_WINDOW_H #include #include "view.h" G_BEGIN_DECLS #define TYPE_TELETEXT_WINDOW (teletext_window_get_type ()) #define TELETEXT_WINDOW(obj) \ (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_TELETEXT_WINDOW, TeletextWindow)) #define TELETEXT_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), \ TYPE_TELETEXT_WINDOW, TeletextWindowClass)) #define IS_TELETEXT_WINDOW(obj) \ (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_TELETEXT_WINDOW)) #define IS_TELETEXT_WINDOW_CLASS(klass) \ (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_TELETEXT_WINDOW)) #define TELETEXT_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), \ TYPE_TELETEXT_WINDOW, TeletextWindowClass)) typedef struct _TeletextWindow TeletextWindow; typedef struct _TeletextWindowClass TeletextWindowClass; struct _TeletextWindow { GnomeApp app; GtkActionGroup * action_group; /*< private >*/ vbi3_decoder * vbi; GtkUIManager * ui_manager; TeletextView * view; GtkMenuItem * top_items; vbi3_network top_network; GtkMenuItem * channel_items; GtkMenuItem * bookmarks_menu; GtkCheckMenuItem * encoding_auto_item; gboolean toolbar_added; gboolean statusbar_added; }; struct _TeletextWindowClass { GnomeAppClass parent_class; }; extern GType teletext_window_get_type (void) G_GNUC_CONST; GtkWidget * teletext_window_new (void); G_END_DECLS #endif /* TELETEXT_WINDOW_H */ zapping-0.10cvs6/plugins/teletext/view.c 644 764 144 233014 10442152247 13506 /* * Zapping TV viewer * * Copyright (C) 2000, 2001, 2002 Iaki Garca Etxebarria * Copyright (C) 2000, 2001, 2002, 2003, 2004 Michael H. Schimek * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* $Id: view.c,v 1.21 2006/06/09 01:53:43 mschimek Exp $ */ #ifdef HAVE_CONFIG_H # include "config.h" #endif #include #include "libvbi/exp-gfx.h" #include "libvbi/exp-txt.h" #include "src/zgconf.h" #include "src/subtitle.h" #include "src/zvbi.h" #include "preferences.h" /* teletext_foo_enum[] */ #include "export.h" #include "search.h" #include "main.h" #include "view.h" #include "src/remote.h" #ifndef HAVE_LRINT static long lrint (double x) { if (x < 0) return (long)(x - 0.5); else return (long)(x + 0.5); } #endif #define BLINK_CYCLE 300 /* ms */ #define GCONF_DIR "/apps/zapping/plugins/teletext" enum { REQUEST_CHANGED, CHARSET_CHANGED, N_SIGNALS }; static GObjectClass * parent_class; static guint signals[N_SIGNALS]; static GdkCursor * cursor_normal; static GdkCursor * cursor_link; static GdkCursor * cursor_select; static GdkAtom GA_CLIPBOARD = GDK_NONE; static vbi3_wst_level teletext_level = VBI3_WST_LEVEL_1p5; static vbi3_charset_code default_charset = 0; static GdkInterpType interp_type = GDK_INTERP_HYPER; static gboolean rolling_header = TRUE; static gboolean live_clock = TRUE; static gboolean hex_pages = TRUE; static gint brightness = 128; static gint contrast = 64; static gint navigation = 2; static gboolean hyperlinks = TRUE; enum { TARGET_LAT1_STRING, TARGET_UTF8_STRING, TARGET_PIXMAP }; static const GtkTargetEntry clipboard_targets [] = { { "STRING", 0, TARGET_LAT1_STRING }, { "UTF8_STRING", 0, TARGET_UTF8_STRING }, { "PIXMAP", 0, TARGET_PIXMAP }, }; /* Scaling and drawing */ static void draw_scaled_page_image (TeletextView * view, GdkDrawable * drawable, GdkGC * gc, gint src_x, gint src_y, gint dest_x, gint dest_y, gint width, gint height) { gint sw; gint sh; if (!view->scaled_on) return; sw = gdk_pixbuf_get_width (view->scaled_on); sh = gdk_pixbuf_get_height (view->scaled_on); gdk_draw_pixbuf (/* dst */ drawable, gc, /* src */ view->scaled_on, src_x, src_y, dest_x, dest_y, MIN (width, sw), MIN (height, sh), GDK_RGB_DITHER_NORMAL, /* dither offset */ src_x, src_y); } /* This whole patch stuff is overkill. It would probably suffice to create a view->scaled_off and just one "patch" for the header. */ #define CW 12 #define CH 10 static void destroy_patch (struct ttx_patch * p) { g_assert (NULL != p); if (p->scaled_on) g_object_unref (G_OBJECT (p->scaled_on)); if (p->scaled_off) g_object_unref (G_OBJECT (p->scaled_off)); if (p->unscaled_on) g_object_unref (G_OBJECT (p->unscaled_on)); if (p->unscaled_off) g_object_unref (G_OBJECT (p->unscaled_off)); CLEAR (*p); } /* Creates p->scaled_on/off from p->unscaled_on/off. sw, sh: view->scaled_on size. uw, uh: view->unscaled_on size. */ static void scale_patch (struct ttx_patch * p, guint sw, guint sh, guint uw, guint uh) { guint srcw; guint srch; guint dstw; guint dsth; gint n; g_assert (NULL != p); if (p->scaled_on) { g_object_unref (G_OBJECT (p->scaled_on)); p->scaled_on = NULL; } if (p->scaled_off) { g_object_unref (G_OBJECT (p->scaled_off)); p->scaled_off = NULL; } srch = p->height * CH + 10; dsth = (sh * srch + (uh >> 1)) / uh; n = (0 == p->row) ? 0 : 5; p->sy = dsth * n / srch; p->sh = ceil (dsth * (n + p->height * CH) / (double) srch) - p->sy; p->dy = p->sy + lrint (floor (sh * p->row * CH / (double) uh - dsth * n / (double) srch + .5)); srcw = p->width * p->columns * CW + 10; dstw = (sw * srcw + (uw >> 1)) / uw; n = (0 == p->column) ? 0 : 5; p->sx = dstw * n / srcw; p->sw = ceil (dstw * (n + p->width * p->columns * CW) / (double) srcw) - p->sx; p->dx = p->sx + lrint (floor (sw * p->column * CW / (double) uw - dstw * n / (double) srcw + .5)); if (dstw > 0 && dsth > 0) { p->scaled_on = z_pixbuf_scale_simple (p->unscaled_on, (gint) dstw, (gint) dsth, interp_type); if (p->flash) p->scaled_off = z_pixbuf_scale_simple (p->unscaled_off, (gint) dstw, (gint) dsth, interp_type); p->dirty = TRUE; } } static void delete_patches (TeletextView * view) { struct ttx_patch *p; struct ttx_patch *end; end = view->patches + view->n_patches; for (p = view->patches; p < end; ++p) destroy_patch (p); g_free (view->patches); view->patches = NULL; view->n_patches = 0; } /* Copies dirty or flashing view->patches into view->scaled_on. draw: expose changed areas for later redrawing. */ static void apply_patches (TeletextView * view, gboolean draw) { GdkWindow *window; struct ttx_patch *p; struct ttx_patch *end; guint rows; guint columns; if (!view->pg) return; window = GTK_WIDGET (view)->window; rows = view->pg->rows; columns = view->pg->columns; end = view->patches + view->n_patches; for (p = view->patches; p < end; ++p) { GdkPixbuf *scaled; if (p->flash) { p->phase = (p->phase + 1) & 15; if (0 == p->phase) scaled = p->scaled_off; else if (4 == p->phase) scaled = p->scaled_on; else continue; } else { if (!p->dirty || !p->scaled_on) continue; p->dirty = FALSE; scaled = p->scaled_on; } /* Update the scaled version of the page */ if (view->scaled_on) { z_pixbuf_copy_area (/* src */ scaled, p->sx, p->sy, p->sw, p->sh, /* dst */ view->scaled_on, p->dx, p->dy); if (draw) gdk_window_clear_area_e (window, p->dx, p->dy, p->sw, p->sh); } } } static void scale_patches (TeletextView * view) { struct ttx_patch *p; struct ttx_patch *end; guint sw; guint sh; guint uw; guint uh; if (!view->scaled_on) return; g_assert (NULL != view->unscaled_on); sw = gdk_pixbuf_get_width (view->scaled_on); sh = gdk_pixbuf_get_height (view->scaled_on); uw = gdk_pixbuf_get_width (view->unscaled_on); uh = gdk_pixbuf_get_height (view->unscaled_on); end = view->patches + view->n_patches; for (p = view->patches; p < end; ++p) scale_patch (p, sw, sh, uw, uh); } static void add_patch (TeletextView * view, guint column, guint row, guint columns, vbi3_size size, gboolean flash) { struct ttx_patch *p; struct ttx_patch *end; gint pw, ph; gint ux, uy; guint endcol; g_assert (NULL != view->unscaled_on); g_assert (NULL != view->unscaled_off); end = view->patches + view->n_patches; endcol = column + columns; for (p = view->patches; p < end; ++p) if (p->row == row && p->column < endcol && (p->column + p->columns) > column) { /* Patches overlap, we replace the old one. */ destroy_patch (p); break; } if (p >= end) { guint size; size = (view->n_patches + 1) * sizeof (*view->patches); view->patches = g_realloc (view->patches, size); p = view->patches + view->n_patches; ++view->n_patches; } p->column = column; p->row = row; p->scaled_on = NULL; p->scaled_off = NULL; p->unscaled_off = NULL; p->columns = columns; p->phase = 0; p->flash = flash; p->dirty = TRUE; switch (size) { case VBI3_DOUBLE_WIDTH: p->width = 2; p->height = 1; break; case VBI3_DOUBLE_HEIGHT: p->width = 1; p->height = 2; break; case VBI3_DOUBLE_SIZE: p->width = 2; p->height = 2; break; default: p->width = 1; p->height = 1; break; } ux = (0 == p->column) ? 0 : p->column * CW - 5; uy = (0 == p->row) ? 0 : p->row * CH - 5; pw = p->width * p->columns * CW + 10; ph = p->height * CH + 10; p->unscaled_on = gdk_pixbuf_new (GDK_COLORSPACE_RGB, TRUE, 8, pw, ph); g_assert (NULL != p->unscaled_on); z_pixbuf_copy_area (/* src */ view->unscaled_on, ux, uy, pw, ph, /* dst */ p->unscaled_on, 0, 0); if (flash) { p->unscaled_off = gdk_pixbuf_new (GDK_COLORSPACE_RGB, TRUE, 8, pw, ph); g_assert (p->unscaled_off != NULL); z_pixbuf_copy_area (/* src */ view->unscaled_off, ux, uy, pw, ph, /* dst */ p->unscaled_off, 0, 0); } if (view->scaled_on) { guint sw, sh; guint uw, uh; sw = gdk_pixbuf_get_width (view->scaled_on); sh = gdk_pixbuf_get_height (view->scaled_on); uw = gdk_pixbuf_get_width (view->unscaled_on); uh = gdk_pixbuf_get_height (view->unscaled_on); scale_patch (p, sw, sh, uw, uh); } } static void build_patches (TeletextView * view) { vbi3_char *cp; guint row; delete_patches (view); if (!view->pg) return; cp = view->pg->text; for (row = 0; row < view->pg->rows; ++row) { guint col = 0; while (col < view->pg->columns) { if ((cp[col].attr & VBI3_FLASH) && cp[col].size <= VBI3_DOUBLE_SIZE) { guint n; for (n = 1; col + n < view->pg->columns; ++n) if (!(cp[col + n].attr & VBI3_FLASH) || cp[col].size != cp[col + n].size) break; add_patch (view, col, row, n, cp[col].size, /* flash */ TRUE); col += n; } else { ++col; } } cp += view->pg->columns; } } static gboolean vbi3_page_has_flash (const vbi3_page * pg) { const vbi3_char *cp; const vbi3_char *end; guint attr; end = pg->text + pg->rows * pg->columns; attr = 0; for (cp = pg->text; cp < end; ++cp) attr |= cp->attr; return !!(attr & VBI3_FLASH); } static void create_empty_image (TeletextView * view) { gchar *filename; GdkPixbuf *pixbuf; gint sw; gint sh; double sx; double sy; if (!view->scaled_on) return; filename = g_strdup_printf ("%s/vt_loading%d.jpeg", PACKAGE_PIXMAPS_DIR, (rand () & 1) + 1); pixbuf = gdk_pixbuf_new_from_file (filename, NULL); g_free (filename); if (!pixbuf) return; sw = gdk_pixbuf_get_width (view->scaled_on); sh = gdk_pixbuf_get_height (view->scaled_on); sx = gdk_pixbuf_get_width (pixbuf); sx = sw / sx; sy = gdk_pixbuf_get_height (pixbuf); sy = sh / sy; gdk_pixbuf_scale (/* src */ pixbuf, /* dst */ view->scaled_on, 0, 0, sw, sh, /* offset */ 0.0, 0.0, /* scale */ sx, sy, interp_type); g_object_unref (G_OBJECT (pixbuf)); delete_patches (view); } static void create_page_images_from_pg (TeletextView * view) { vbi3_image_format format; vbi3_bool success; if (!view->pg) { create_empty_image (view); return; } g_assert (NULL != view->unscaled_on); CLEAR (format); format.width = gdk_pixbuf_get_width (view->unscaled_on); format.height = gdk_pixbuf_get_height (view->unscaled_on); format.pixfmt = VBI3_PIXFMT_RGBA24_LE; format.bytes_per_line = gdk_pixbuf_get_rowstride (view->unscaled_on); format.size = format.width * format.height * 4; success = vbi3_page_draw_teletext (view->pg, gdk_pixbuf_get_pixels (view->unscaled_on), &format, VBI3_BRIGHTNESS, brightness, VBI3_CONTRAST, contrast, VBI3_REVEAL, (vbi3_bool) view->reveal, VBI3_FLASH_ON, TRUE, VBI3_END); g_assert (success); if (view->scaled_on) { gint sw; gint sh; double sx; double sy; sw = gdk_pixbuf_get_width (view->scaled_on); sh = gdk_pixbuf_get_height (view->scaled_on); sx = sw / (double) format.width; sy = sh / (double) format.height; gdk_pixbuf_scale (/* src */ view->unscaled_on, /* dst */ view->scaled_on, 0, 0, sw, sh, /* offset */ 0.0, 0.0, /* scale */ sx, sy, interp_type); } if (vbi3_page_has_flash (view->pg)) { success = vbi3_page_draw_teletext (view->pg, gdk_pixbuf_get_pixels (view->unscaled_off), &format, VBI3_BRIGHTNESS, brightness, VBI3_CONTRAST, contrast, VBI3_REVEAL, (vbi3_bool) view->reveal, VBI3_FLASH_ON, FALSE, VBI3_END); g_assert (success); build_patches (view); } else { delete_patches (view); } } static gboolean resize_scaled_page_image (TeletextView * view, gint width, gint height) { if (width <= 0 || height <= 0) return FALSE; if (!view->scaled_on || width != gdk_pixbuf_get_width (view->scaled_on) || height != gdk_pixbuf_get_height (view->scaled_on)) { double sx; double sy; g_assert (NULL != view->unscaled_on); if (view->scaled_on) g_object_unref (G_OBJECT (view->scaled_on)); view->scaled_on = gdk_pixbuf_new (GDK_COLORSPACE_RGB, TRUE, 8, width, height); g_assert (NULL != view->scaled_on); if (view->pg) { sx = gdk_pixbuf_get_width (view->unscaled_on); sx = width / sx; sy = gdk_pixbuf_get_height (view->unscaled_on); sy = height / sy; gdk_pixbuf_scale (/* src */ view->unscaled_on, /* dst */ view->scaled_on, 0, 0, width, height, /* offset */ 0.0, 0.0, /* scale */ sx, sy, interp_type); scale_patches (view); } else { /* Renders "loading" directly into view->scaled_on. */ create_empty_image (view); } } return TRUE; } /* Browser history */ /* Note history.stack[top - 1] is the current page. */ static void history_dump (TeletextView * view) { guint i; fprintf (stderr, "top=%u size=%u ", view->history.top, view->history.size); for (i = 0; i < view->history.size; ++i) fprintf (stderr, "%03x ", view->history.stack[i].pgno); fputc ('\n', stderr); } static void history_update_gui (TeletextView * view) { GtkAction *action; action = gtk_action_group_get_action (view->action_group, "HistoryBack"); z_action_set_sensitive (action, view->history.top >= 2); action = gtk_action_group_get_action (view->action_group, "HistoryForward"); z_action_set_sensitive (action, view->history.top < view->history.size); } /* Push *current page* onto history stack. Actually one should push the page being replaced, but things are simpler this way. */ static void history_push (TeletextView * view, const vbi3_network * nk, vbi3_pgno pgno, vbi3_subno subno) { guint top; top = view->history.top; if (NULL == nk) nk = &view->req.network; if (pgno < 0x100 || pgno > 0x899) return; if (top > 0) { if (page_num_equal2 (&view->history.stack[top - 1], nk, pgno, subno)) return; /* already stacked */ if (top >= N_ELEMENTS (view->history.stack)) { top = N_ELEMENTS (view->history.stack) - 1; memmove (view->history.stack, view->history.stack + 1, top * sizeof (*view->history.stack)); } else if (view->history.size > top) { if (page_num_equal2 (&view->history.stack[top], nk, pgno, subno)) { /* Apparently we move forward in history, no new page. */ view->history.top = top + 1; history_update_gui (view); return; } /* Will discard future branch. */ } } page_num_set (&view->history.stack[top], nk, pgno, subno); ++top; view->history.top = top; view->history.size = top; history_update_gui (view); if (0) history_dump (view); } static void history_back_action (GtkAction * action _unused_, TeletextView * view) { guint top; top = view->history.top; if (top >= 2) { page_num *sp; view->history.top = top - 1; history_update_gui (view); sp = &view->history.stack[top - 2]; view->load_page (view, &sp->network, sp->pgno, sp->subno); } } static PyObject * py_ttx_history_prev (PyObject * self _unused_, PyObject * args _unused_) { TeletextView *view; if (!(view = teletext_view_from_widget (python_command_widget ()))) py_return_true; history_back_action (NULL, view); py_return_true; } static void history_forward_action (GtkAction * action _unused_, TeletextView * view) { guint top; top = view->history.top; if (top < view->history.size) { page_num *sp; view->history.top = top + 1; history_update_gui (view); sp = &view->history.stack[top]; view->load_page (view, &sp->network, sp->pgno, sp->subno); } } static PyObject * py_ttx_history_next (PyObject * self _unused_, PyObject * args _unused_) { TeletextView *view; if (!(view = teletext_view_from_widget (python_command_widget ()))) py_return_true; history_forward_action (NULL, view); py_return_true; } /* Page rendering */ static void update_cursor_shape (TeletextView * view) { gint x; gint y; GdkModifierType mask; vbi3_link link; gchar *buffer; gboolean success; gdk_window_get_pointer (GTK_WIDGET (view)->window, &x, &y, &mask); link.type = VBI3_LINK_NONE; success = view->link_from_pointer_position (view, &link, x, y); switch (link.type) { case VBI3_LINK_PAGE: buffer = g_strdup_printf (_(" Page %x"), link.pgno); goto show; case VBI3_LINK_SUBPAGE: buffer = g_strdup_printf (_(" Subpage %x"), link.subno & 0xFF); goto show; case VBI3_LINK_HTTP: case VBI3_LINK_FTP: case VBI3_LINK_EMAIL: buffer = g_strconcat (" ", link.url, NULL); goto show; show: if (!view->cursor_over_link) { view->cursor_over_link = TRUE; if (view->appbar) gnome_appbar_push (GNOME_APPBAR (view->appbar), buffer); gdk_window_set_cursor (GTK_WIDGET (view)->window, cursor_link); } else { if (view->appbar) gnome_appbar_set_status (GNOME_APPBAR (view->appbar), buffer); } g_free (buffer); break; default: if (view->cursor_over_link) { view->cursor_over_link = FALSE; if (view->appbar) gnome_appbar_pop (GNOME_APPBAR (view->appbar)); gdk_window_set_cursor (GTK_WIDGET (view)->window, cursor_normal); } break; } if (success) vbi3_link_destroy (&link); } static gboolean redraw_view (TeletextView * view) { GtkAction *action; GdkWindow *window; vbi3_page *pg; gint width; gint height; action = gtk_action_group_get_action (view->action_group, "Export"); z_action_set_sensitive (action, NULL != vbi3_export_info_enum (0) && view->pg && view->pg->pgno >= 0x100); if (view->selecting) return FALSE; create_page_images_from_pg (view); apply_patches (view, /* draw */ FALSE); if (!(window = GTK_WIDGET (view)->window)) return FALSE; gdk_window_get_geometry (window, /* x */ NULL, /* y */ NULL, &width, &height, /* depth */ NULL); /* XXX if we have rolling header and this is an old page from cache we'll show an old header. */ /* Trigger expose event for later redrawing. */ gdk_window_clear_area_e (window, 0, 0, width, height); if ((pg = view->pg)) { if (view->toolbar) { if (view->freezed) teletext_toolbar_set_url (view->toolbar, pg->pgno, pg->subno); else teletext_toolbar_set_url (view->toolbar, view->req.pgno, view->req.subno); } /* Note does nothing if this page is already at TOS. */ history_push (view, pg->network, pg->pgno, pg->subno); } update_cursor_shape (view); return TRUE; } static void redraw_all_views (void) { GList *p; for (p = g_list_first (teletext_views); p; p = p->next) { TeletextView *view = p->data; if (view->pg) redraw_view (view); } } static vbi3_page * get_page (TeletextView * view, vbi3_charset_code * charset_code, const vbi3_network * nk, vbi3_pgno pgno, vbi3_subno subno) { vbi3_page *pg; vbi3_char *cp; vbi3_char *end; /* Override charset code from channel config, if present. */ zvbi_cur_channel_get_ttx_encoding (charset_code, pgno); if (nk && vbi3_network_is_anonymous (nk)) nk = NULL; /* use currently received network */ if (VBI3_CHARSET_CODE_NONE != *charset_code) { pg = vbi3_decoder_get_page (view->vbi, nk, pgno, subno, VBI3_PADDING, TRUE, /* add_column, */ /* VBI3_PANELS, FALSE, */ VBI3_NAVIGATION, navigation, VBI3_HYPERLINKS, hyperlinks, /* VBI3_PDC_LINKS, TRUE, */ VBI3_WST_LEVEL, teletext_level, VBI3_OVERRIDE_CHARSET_0, *charset_code, VBI3_END); } else { pg = vbi3_decoder_get_page (view->vbi, nk, pgno, subno, VBI3_PADDING, TRUE, /* add_column, */ /* VBI3_PANELS, FALSE, */ VBI3_NAVIGATION, navigation, VBI3_HYPERLINKS, hyperlinks, /* VBI3_PDC_LINKS, TRUE, */ VBI3_WST_LEVEL, teletext_level, VBI3_DEFAULT_CHARSET_0, default_charset, VBI3_END); } if (pg) { for (cp = pg->text, end = cp + pg->rows * pg->columns; cp < end; ++cp) cp->opacity = VBI3_OPAQUE; } return pg; } static void set_charset_code_from_config (TeletextView * view, vbi3_pgno pgno) { vbi3_charset_code charset_code; charset_code = view->override_charset; zvbi_cur_channel_get_ttx_encoding (&charset_code, pgno); if (charset_code != view->override_charset) { view->override_charset = charset_code; g_signal_emit (view, signals[CHARSET_CHANGED], 0); } } static void reformat_view (TeletextView * view) { vbi3_charset_code charset_code; vbi3_page *pg; charset_code = view->override_charset; if ((pg = get_page (view, &charset_code, view->pg->network, view->pg->pgno, view->pg->subno))) { vbi3_page_unref (view->pg); view->pg = pg; if (charset_code != view->override_charset) { view->override_charset = charset_code; g_signal_emit (view, signals[CHARSET_CHANGED], 0); } redraw_view (view); } } static void reformat_all_views (void) { GList *p; for (p = g_list_first (teletext_views); p; p = p->next) { TeletextView *view = p->data; if (view->selecting) continue; if (view->freezed) continue; if (view->pg) reformat_view (view); } } static void update_header (TeletextView * view, const vbi3_event * ev) { vbi3_image_format format; vbi3_page *pg; vbi3_bool success; guint column; guint i; uint8_t *buffer; if (!view->pg) return; if (view->pg->pgno == view->req.pgno || !rolling_header) { if (!live_clock) return; column = 32; /* only clock */ } else { if (!(ev->ev.ttx_page.flags & VBI3_SERIAL)) if (0 != ((ev->ev.ttx_page.pgno ^ view->req.pgno) & 0xF00)) return; column = 8; /* page number and clock */ } if (VBI3_CHARSET_CODE_NONE != view->override_charset) { pg = vbi3_decoder_get_page (view->vbi, ev->network, ev->ev.ttx_page.pgno, ev->ev.ttx_page.subno, VBI3_PADDING, TRUE, VBI3_HEADER_ONLY, TRUE, VBI3_WST_LEVEL, VBI3_WST_LEVEL_1p5, VBI3_OVERRIDE_CHARSET_0, view->override_charset, VBI3_END); } else { pg = vbi3_decoder_get_page (view->vbi, ev->network, ev->ev.ttx_page.pgno, ev->ev.ttx_page.subno, VBI3_PADDING, TRUE, VBI3_HEADER_ONLY, TRUE, VBI3_WST_LEVEL, VBI3_WST_LEVEL_1p5, VBI3_DEFAULT_CHARSET_0, default_charset, VBI3_END); } if (!pg) return; for (i = column; i < 40; ++i) if (view->pg->text[i].unicode != pg->text[i].unicode) break; if (i >= 40) { vbi3_page_unref (pg); return; } /* Some networks put level 2.5 elements into the header, keep that. */ if (view->pg->pgno == view->req.pgno) for (i = 32; i < 40; ++i) { guint unicode; unicode = pg->text[i].unicode; pg->text[i] = view->pg->text[i]; pg->text[i].unicode = unicode; } CLEAR (format); format.width = gdk_pixbuf_get_width (view->unscaled_on); format.height = gdk_pixbuf_get_height (view->unscaled_on); format.pixfmt = VBI3_PIXFMT_RGBA24_LE; format.bytes_per_line = gdk_pixbuf_get_rowstride (view->unscaled_on); format.size = format.width * format.height * 4; buffer = gdk_pixbuf_get_pixels (view->unscaled_on); buffer += column * (CW * 4); success = vbi3_page_draw_teletext_region (pg, buffer, &format, /* x */ 0, /* y */ 0, column, /* row */ 0, /* width */ 40 - column, /* height */ 1, VBI3_BRIGHTNESS, brightness, VBI3_CONTRAST, contrast, VBI3_REVEAL, TRUE, VBI3_FLASH_ON, TRUE, VBI3_END); g_assert (success); add_patch (view, column, /* row */ 0, /* columns */ 40 - column, VBI3_NORMAL_SIZE, /* flash */ FALSE); vbi3_page_unref (pg); } static vbi3_bool decoder_event_handler (const vbi3_event * ev, void * user_data _unused_) { TeletextView *view = TELETEXT_VIEW (user_data); switch (ev->type) { case VBI3_EVENT_CLOSE: gtk_widget_destroy (&view->darea.widget); break; case VBI3_EVENT_NETWORK: if (0) { _vbi3_network_dump (ev->network, stderr); fputc ('\n', stderr); } // for (p = g_list_first (teletext_views); p; p = p->next) { //TeletextView *view; vbi3_charset_code charset_code; //view = (TeletextView *) p->data; if (!vbi3_network_is_anonymous (&view->req.network)) break;// continue; if (view->selecting) break;// continue; if (view->freezed) break;// continue; vbi3_page_unref (view->pg); charset_code = VBI3_CHARSET_CODE_NONE; /* Change to view of same page of the new network, such that header updates match the rest of the page. When the page is not cached redraw_view() displays "loading". */ /* XXX multiple view instances could share the same page. */ view->pg = get_page (view, &charset_code, ev->network, view->req.pgno, view->req.subno); if (charset_code != view->override_charset) { view->override_charset = charset_code; g_signal_emit (view, signals[CHARSET_CHANGED], 0); } redraw_view (view); } break; case VBI3_EVENT_TTX_PAGE: //for (p = g_list_first (teletext_views); p; p = p->next) { //TeletextView *view; //view = (TeletextView *) p->data; if (view->selecting) break;// continue; if (view->freezed) break;// continue; if (!vbi3_network_is_anonymous (&view->req.network) && !vbi3_network_equal (&view->req.network, ev->network)) break;// continue; if (ev->ev.ttx_page.pgno == view->req.pgno && (VBI3_ANY_SUBNO == view->req.subno || ev->ev.ttx_page.subno == view->req.subno)) { vbi3_charset_code charset_code; vbi3_page *pg; charset_code = view->override_charset; /* XXX multiple view instances could share the same page. */ if ((pg = get_page (view, &charset_code, ev->network, ev->ev.ttx_page.pgno, ev->ev.ttx_page.subno))) { vbi3_page_unref (view->pg); view->pg = pg; if (charset_code != view->override_charset) { view->override_charset = charset_code; g_signal_emit (view, signals[CHARSET_CHANGED], 0); } redraw_view (view); } } else if (ev->ev.ttx_page.flags & VBI3_ROLL_HEADER) { update_header (view, ev); } } break; default: break; } return FALSE; /* pass on */ } static void set_hold (TeletextView * view, gboolean hold) { if (view->toolbar) teletext_toolbar_set_hold (view->toolbar, hold); if (hold != view->hold) { const vbi3_page *pg; view->hold = hold; if ((pg = view->pg)) { if (hold) view->req.subno = pg->subno; else view->req.subno = VBI3_ANY_SUBNO; } } } static gboolean monitor_pgno (TeletextView * view, const vbi3_network * nk, vbi3_pgno pgno, vbi3_subno subno) { vbi3_charset_code charset_code; vbi3_page *pg; view->freezed = FALSE; if (!nk) nk = &view->req.network; page_num_set (&view->req, nk, pgno, subno); if (NULL == view->vbi) { vbi3_teletext_decoder *td; vbi3_cache *ca; gint value; vbi3_bool success; if (NULL == (view->vbi = zvbi_get_object ())) return FALSE; td = vbi3_decoder_cast_to_teletext_decoder (view->vbi); ca = vbi3_teletext_decoder_get_cache (td); g_assert (NULL != ca); value = 1 << 30; z_gconf_get_int (&value, GCONF_DIR "/cache_size"); vbi3_cache_set_memory_limit (ca, (unsigned int) value); value = 1; z_gconf_get_int (&value, GCONF_DIR "/cache_networks"); vbi3_cache_set_network_limit (ca, (unsigned int) value); vbi3_cache_unref (ca); success = vbi3_decoder_add_event_handler (view->vbi, (VBI3_EVENT_CLOSE | VBI3_EVENT_NETWORK | VBI3_EVENT_TTX_PAGE), decoder_event_handler, view); g_assert (success); } g_signal_emit (view, signals[REQUEST_CHANGED], 0); pg = NULL; charset_code = VBI3_CHARSET_CODE_NONE; if (pgno >= 0x100 && pgno <= 0x899) pg = get_page (view, &charset_code, nk, pgno, subno); if (pg || !rolling_header) { vbi3_page_unref (view->pg); view->pg = pg; /* can be NULL */ if (charset_code != view->override_charset) { view->override_charset = charset_code; g_signal_emit (view, signals[CHARSET_CHANGED], 0); } } redraw_view (view); return TRUE; } static gboolean deferred_load_timeout (gpointer user_data) { TeletextView *view = user_data; view->deferred.timeout_id = NO_SOURCE_ID; monitor_pgno (view, &view->deferred.network, view->deferred.pgno, view->deferred.subno); view->deferred_load = FALSE; return FALSE; /* don't call again */ } static gboolean load_page_ (TeletextView * view, const vbi3_network * nk, vbi3_pgno pgno, vbi3_subno subno) { view->hold = (VBI3_ANY_SUBNO != subno); set_hold (view, view->hold); if (view->toolbar) teletext_toolbar_set_url (view->toolbar, pgno, subno); if (view->appbar) { gchar *buffer; if (pgno >= 0x100 && pgno <= 0x8FF) { if (0 == subno || VBI3_ANY_SUBNO == subno) buffer = g_strdup_printf (_("Loading page %X..."), pgno); else buffer = g_strdup_printf (_("Loading page %X.%02X..."), pgno, subno & 0x7F); } else { buffer = g_strdup_printf ("Invalid page %X.%X", pgno, subno); } gnome_appbar_set_status (view->appbar, buffer); g_free (buffer); } gtk_widget_grab_focus (GTK_WIDGET (view)); if (nk) network_set (&view->deferred.network, nk); else network_set (&view->deferred.network, &view->req.network); view->deferred.pgno = pgno; view->deferred.subno = subno; if (view->deferred.timeout_id > 0) g_source_remove (view->deferred.timeout_id); if (view->deferred_load) { view->deferred.timeout_id = g_timeout_add (300, (GSourceFunc) deferred_load_timeout, view); } else { view->deferred.timeout_id = NO_SOURCE_ID; monitor_pgno (view, nk, pgno, subno); } z_update_gui (); return TRUE; } static void show_page_ (TeletextView * view, vbi3_page * pg) { if (NULL == pg) return; view->hold = TRUE; set_hold (view, view->hold); if (view->toolbar) teletext_toolbar_set_url (view->toolbar, pg->pgno, pg->subno); if (view->appbar) gnome_appbar_set_status (view->appbar, ""); gtk_widget_grab_focus (GTK_WIDGET (view)); if (view->deferred.timeout_id > 0) g_source_remove (view->deferred.timeout_id); page_num_set (&view->req, pg->network, pg->pgno, pg->subno); g_signal_emit (view, signals[REQUEST_CHANGED], 0); set_charset_code_from_config (view, pg->pgno); vbi3_page_unref (view->pg); view->pg = vbi3_page_ref (pg); view->freezed = TRUE; redraw_view (view); z_update_gui (); } /* User interface */ TeletextView * teletext_view_from_widget (GtkWidget * widget) { TeletextView *view; while (!(view = (TeletextView *) g_object_get_data (G_OBJECT (widget), "TeletextView"))) { if (!(widget = widget->parent)) return NULL; } return view; } static void set_transient_for (GtkWindow * window, TeletextView * view) { GtkWidget *parent; parent = GTK_WIDGET (view); while (parent) { if (GTK_IS_WINDOW (parent)) { gtk_window_set_transient_for (window, GTK_WINDOW (parent)); break; } parent = parent->parent; } } /* Note on success you must vbi3_link_destroy. */ static gboolean link_from_pointer_position_ (TeletextView * view, vbi3_link * lk, gint x, gint y) { GdkWindow *window; const vbi3_page *pg; gint width; gint height; guint row; guint column; vbi3_link_init (lk); if (x < 0 || y < 0) return FALSE; if (!(pg = view->pg)) return FALSE; if (!(window = GTK_WIDGET (view)->window)) return FALSE; gdk_window_get_geometry (window, /* x */ NULL, /* y */ NULL, &width, &height, /* depth */ NULL); if (width <= 0 || height <= 0) return FALSE; column = (x * pg->columns) / width; row = (y * pg->rows) / height; return vbi3_page_get_hyperlink (pg, lk, column, row); } /* Page commands */ static gint decimal_subno (vbi3_subno subno) { if (0 == subno || (guint) subno > 0x99) return -1; /* any */ else return vbi3_bcd2bin (subno); } static PyObject * py_ttx_hold (PyObject * self _unused_, PyObject * args) { TeletextView *view; gint hold; if (!(view = teletext_view_from_widget (python_command_widget ()))) py_return_true; hold = -1; if (!ParseTuple (args, "|i", &hold)) g_error ("zapping.ttx_hold(|i)"); if (hold < 0) hold = !view->hold; else hold = !!hold; set_hold (view, hold); py_return_true; } static PyObject * py_ttx_reveal (PyObject * self _unused_, PyObject * args) { TeletextView *view; gint reveal; if (!(view = teletext_view_from_widget (python_command_widget ()))) py_return_true; reveal = -1; if (!ParseTuple (args, "|i", &reveal)) g_error ("zapping.ttx_reveal(|i)"); if (reveal < 0) reveal = !view->reveal; else reveal = !!reveal; if (view->toolbar) teletext_toolbar_set_reveal (view->toolbar, reveal); view->reveal = reveal; if (view->pg) redraw_view (view); py_return_true; } static PyObject * py_ttx_open (PyObject * self _unused_, PyObject * args) { TeletextView *view; int page; int subpage; vbi3_pgno pgno; vbi3_subno subno; if (!(view = teletext_view_from_widget (python_command_widget ()))) py_return_true; page = 100; subpage = -1; if (!ParseTuple (args, "|ii", &page, &subpage)) g_error ("zapping.ttx_open_new(|ii)"); if (page >= 100 && page <= 899) pgno = vbi3_bin2bcd (page); else py_return_false; if (subpage < 0) subno = VBI3_ANY_SUBNO; else if ((guint) subpage <= 99) subno = vbi3_bin2bcd (subpage); else py_return_false; view->load_page (view, &view->req.network, pgno, subno); py_return_true; } static PyObject * py_ttx_page_incr (PyObject * self _unused_, PyObject * args) { TeletextView *view; vbi3_pgno pgno; gint value; if (!(view = teletext_view_from_widget (python_command_widget ()))) py_return_true; value = +1; if (!ParseTuple (args, "|i", &value)) g_error ("zapping.ttx_page_incr(|i)"); if (abs (value) > 999) py_return_false; if (value < 0) value += 1000; pgno = vbi3_add_bcd (view->req.pgno, vbi3_bin2bcd (value)) & 0xFFF; if (pgno < 0x100) pgno = 0x800 + (pgno & 0xFF); else if (pgno > 0x899) pgno = 0x100 + (pgno & 0xFF); view->load_page (view, &view->req.network, pgno, VBI3_ANY_SUBNO); py_return_true; } static PyObject * py_ttx_subpage_incr (PyObject * self _unused_, PyObject * args) { TeletextView *view; vbi3_subno subno; gint value; if (!(view = teletext_view_from_widget (python_command_widget ()))) py_return_true; value = +1; if (!ParseTuple (args, "|i", &value)) g_error ("zapping.ttx_subpage_incr(|i)"); if (abs (value) > 99) py_return_false; if (value < 0) value += 100; /* XXX should use actual or anounced number of subp */ subno = view->req.subno; if (VBI3_ANY_SUBNO == view->req.subno) { subno = 0; if (view->pg) subno = view->pg->subno; } subno = vbi3_add_bcd (subno, vbi3_bin2bcd (value)) & 0xFF; view->load_page (view, &view->req.network, view->req.pgno, subno); py_return_true; } static vbi3_pgno default_home_pgno (void) { gint value; value = 100; if (z_gconf_get_int (&value, GCONF_DIR "/home_page")) value = SATURATE (value, 100, 899); return vbi3_bin2bcd (value); } static void home_action (GtkAction * action _unused_, TeletextView * view) { const vbi3_link *lk; if (!view->pg) return; lk = vbi3_page_get_home_link (view->pg); if (!lk) return; switch (lk->type) { case VBI3_LINK_PAGE: case VBI3_LINK_SUBPAGE: if (lk->pgno) { view->load_page (view, lk->network, lk->pgno, lk->subno); } else { view->load_page (view, &view->req.network, default_home_pgno (), VBI3_ANY_SUBNO); } break; default: break; } } static PyObject * py_ttx_home (PyObject * self _unused_, PyObject * args _unused_) { TeletextView *view; if (!(view = teletext_view_from_widget (python_command_widget ()))) py_return_true; home_action (NULL, view); py_return_true; } static gboolean switch_network_ (TeletextView * view, const vbi3_network * nk) { if (VBI3_CHARSET_CODE_NONE != view->override_charset) { view->override_charset = VBI3_CHARSET_CODE_NONE; g_signal_emit (view, signals[CHARSET_CHANGED], 0); } view->load_page (view, nk, default_home_pgno (), VBI3_ANY_SUBNO); return TRUE; } static gboolean set_charset_ (TeletextView * view, vbi3_charset_code charset_code) { if (charset_code == view->override_charset) return TRUE; view->override_charset = charset_code; g_signal_emit (view, signals[CHARSET_CHANGED], 0); if (view->pg) { /* Error ignored. */ zvbi_cur_channel_set_ttx_encoding (view->pg->pgno, charset_code); } reformat_view (view); return TRUE; } /* Selection */ /* Called when another application claims the selection (i.e. sends new data to the clipboard). */ static gboolean selection_clear_event (GtkWidget * widget, GdkEventSelection * event) { TeletextView *view = TELETEXT_VIEW (widget); if (event->selection == GDK_SELECTION_PRIMARY) view->select.in_selection = FALSE; else if (event->selection == GA_CLIPBOARD) view->select.in_clipboard = FALSE; return FALSE; /* pass on */ } /* Called when another application requests our selected data (overriden GtkWidget method). */ static void selection_get (GtkWidget * widget, GtkSelectionData * selection_data, guint info, guint time _unused_) { TeletextView *view = TELETEXT_VIEW (widget); if ((selection_data->selection == GDK_SELECTION_PRIMARY && view->select.in_selection) || (selection_data->selection == GA_CLIPBOARD && view->select.in_clipboard)) { switch (info) { case TARGET_LAT1_STRING: case TARGET_UTF8_STRING: { gint width; gint height; unsigned int size; unsigned int actual; char *buffer; width = view->select.column2 - view->select.column1 + 1; height = view->select.row2 - view->select.row1 + 1; size = 25 * 64 * 4; buffer = g_malloc (size); actual = vbi3_print_page_region (view->select.pg, buffer, size, (TARGET_LAT1_STRING == info) ? "ISO-8859-1" : "UTF-8", NULL, 0, /* standard line separator */ view->select.column1, view->select.row1, width, height, VBI3_TABLE, (vbi3_bool) view->select.table_mode, VBI3_RTL, (vbi3_bool) view->select.rtl_mode, VBI3_REVEAL, (vbi3_bool) view->select.reveal, VBI3_FLASH_ON, TRUE, VBI3_END); if (actual > 0) { gtk_selection_data_set (selection_data, GDK_SELECTION_TYPE_STRING, 8, (void *) buffer, actual); } g_free (buffer); break; } case TARGET_PIXMAP: { const gint cell_width = 12; /* Teletext character cell size */ const gint cell_height = 10; gint width; gint height; GdkPixmap *pixmap; GdkPixbuf *pixbuf; gint id[2]; vbi3_image_format format; vbi3_bool success; /* Selection is open (eg. 25,5 - 15,6). */ if (view->select.column2 < view->select.column1) break; width = view->select.column2 - view->select.column1 + 1; height = view->select.row2 - view->select.row1 + 1; pixmap = gdk_pixmap_new (GTK_WIDGET (view)->window, width * cell_width, height * cell_height, -1 /* same depth as window */); pixbuf = gdk_pixbuf_new (GDK_COLORSPACE_RGB, /* has_alpha */ TRUE, /* bits_per_sample */ 8, width * cell_width, height * cell_height); CLEAR (format); format.width = gdk_pixbuf_get_width (pixbuf); format.height = gdk_pixbuf_get_height (pixbuf); format.pixfmt = VBI3_PIXFMT_RGBA24_LE; format.bytes_per_line = gdk_pixbuf_get_rowstride (pixbuf); format.size = format.width * format.height * 4; success = vbi3_page_draw_teletext_region (view->select.pg, gdk_pixbuf_get_pixels (pixbuf), &format, /* x */ 0, /* y */ 0, view->select.column1, view->select.row1, width, height, VBI3_BRIGHTNESS, brightness, VBI3_CONTRAST, contrast, VBI3_REVEAL, (vbi3_bool) view->select.reveal, VBI3_FLASH_ON, TRUE, VBI3_END); g_assert (success); gdk_draw_pixbuf (pixmap, GTK_WIDGET (view)->style->white_gc, pixbuf, /* src */ 0, 0, /* dst */ 0, 0, gdk_pixbuf_get_width (pixbuf), gdk_pixbuf_get_height (pixbuf), GDK_RGB_DITHER_NORMAL, /* dither */ 0, 0); id[0] = GDK_WINDOW_XWINDOW (pixmap); gtk_selection_data_set (selection_data, GDK_SELECTION_TYPE_PIXMAP, 32, (void * ) id, 4); g_object_unref (pixbuf); break; } default: break; } } } static __inline__ void select_positions (TeletextView * view, gint x, gint y, gint * pcols, gint * prows, gint * scol, gint * srow, gint * ccol, gint * crow) { gint width, height; /* window */ gint columns, rows; /* page */ gdk_window_get_geometry (GTK_WIDGET (view)->window, NULL, NULL, &width, &height, NULL); *pcols = columns = view->pg->columns; *prows = rows = view->pg->rows; *scol = SATURATE ((view->select.start_x * columns) / width, 0, columns - 1); *srow = SATURATE ((view->select.start_y * rows) / height, 0, rows - 1); *ccol = SATURATE ((x * columns) / width, 0, columns - 1); *crow = SATURATE ((y * rows) / height, 0, rows - 1); } static __inline__ gboolean is_hidden_row (TeletextView * view, gint row) { vbi3_char *cp; unsigned int column; if (row <= 0 || row >= 25) return FALSE; cp = view->pg->text + row * view->pg->columns; for (column = 0; column < view->pg->columns; ++column) { if (cp->size >= VBI3_OVER_BOTTOM) return TRUE; ++cp; } return FALSE; } /* Calculates a rectangle, scaling from text coordinates to window coordinates. */ static void scale_rect (GdkRectangle * rect, gint x1, gint y1, gint x2, gint y2, gint width, gint height, gint rows, gint columns) { gint ch = columns >> 1; gint rh = rows >> 1; rect->x = (x1 * width + ch) / columns; rect->y = (y1 * height + rh) / rows; rect->width = ((x2 + 1) * width + ch) / columns - rect->x; rect->height = ((y2 + 1) * height + rh) / rows - rect->y; } /* Transforms the selected region from the first rectangle to the second one, given in text coordinates. */ static void select_transform (TeletextView * view, gint sx1, gint sy1, gint sx2, gint sy2, gboolean stable, gint dx1, gint dy1, gint dx2, gint dy2, gboolean dtable, GdkRegion * exposed) { gint width, height; /* window */ gint columns, rows; /* page */ GdkRectangle rect; GdkRegion *src_region; GdkRegion *dst_region; gdk_window_get_geometry (GTK_WIDGET (view)->window, NULL, NULL, &width, &height, NULL); columns = view->pg->columns; rows = view->pg->rows; gdk_gc_set_clip_origin (view->select.xor_gc, 0, 0); { gboolean h1, h2, h3, h4; if (sy1 > sy2) { SWAP (sx1, sx2); SWAP (sy1, sy2); } h1 = is_hidden_row (view, sy1); h2 = is_hidden_row (view, sy1 + 1); h3 = is_hidden_row (view, sy2); h4 = is_hidden_row (view, sy2 + 1); if (stable || sy1 == sy2 || ((sy2 - sy1) == 1 && h3)) { if (sx1 > sx2) SWAP (sx1, sx2); scale_rect (&rect, sx1, sy1 - h1, sx2, sy2 + h4, width, height, rows, columns); src_region = gdk_region_rectangle (&rect); } else { scale_rect (&rect, sx1, sy1 - h1, columns - 1, sy1 + h2, width, height, rows, columns); src_region = gdk_region_rectangle (&rect); scale_rect (&rect, 0, sy2 - h3, sx2, sy2 + h4, width, height, rows, columns); gdk_region_union_with_rect (src_region, &rect); sy1 += h2 + 1; sy2 -= h3 + 1; if (sy2 >= sy1) { scale_rect (&rect, 0, sy1, columns - 1, sy2, width, height, rows, columns); gdk_region_union_with_rect (src_region, &rect); } } } { gboolean h1, h2, h3, h4; if (dy1 > dy2) { SWAP(dx1, dx2); SWAP(dy1, dy2); } h1 = is_hidden_row (view, dy1); h2 = is_hidden_row (view, dy1 + 1); h3 = is_hidden_row (view, dy2); h4 = is_hidden_row (view, dy2 + 1); if (dtable || dy1 == dy2 || ((dy2 - dy1) == 1 && h3)) { if (dx1 > dx2) SWAP(dx1, dx2); view->select.column1 = dx1; view->select.row1 = dy1 -= h1; view->select.column2 = dx2; view->select.row2 = dy2 += h4; scale_rect (&rect, dx1, dy1, dx2, dy2, width, height, rows, columns); dst_region = gdk_region_rectangle (&rect); } else { scale_rect (&rect, dx1, dy1 - h1, columns - 1, dy1 + h2, width, height, rows, columns); dst_region = gdk_region_rectangle (&rect); scale_rect (&rect, 0, dy2 - h3, dx2, dy2 + h4, width, height, rows, columns); gdk_region_union_with_rect (dst_region, &rect); view->select.column1 = dx1; view->select.row1 = dy1 + h2; view->select.column2 = dx2; view->select.row2 = dy2 - h3; dy1 += h2 + 1; dy2 -= h3 + 1; if (dy2 >= dy1) { scale_rect (&rect, 0, dy1, columns - 1, dy2, width, height, rows, columns); gdk_region_union_with_rect (dst_region, &rect); } } } if (exposed) gdk_region_subtract (src_region, exposed); gdk_region_xor (src_region, dst_region); gdk_region_destroy (dst_region); gdk_gc_set_clip_region (view->select.xor_gc, src_region); gdk_region_destroy (src_region); gdk_draw_rectangle (GTK_WIDGET (view)->window, view->select.xor_gc, TRUE, 0, 0, width - 1, height - 1); gdk_gc_set_clip_rectangle (view->select.xor_gc, NULL); } static void select_stop (TeletextView * view) { if (view->appbar) gnome_appbar_pop (view->appbar); if (view->select.last_x != -1) { gint columns, rows; /* page */ gint scol, srow; /* start */ gint ccol, crow; /* current */ gint tcol1, trow1; gint tcol2, trow2; select_positions (view, view->select.last_x, view->select.last_y, &columns, &rows, &scol, &srow, &ccol, &crow); /* Save because select_transform() will reset. */ tcol1 = view->select.column1; trow1 = view->select.row1; tcol2 = view->select.column2; trow2 = view->select.row2; select_transform (view, scol, srow, /* src1 */ ccol, crow, /* src2 */ view->select.table_mode, columns, rows, /* dst1 */ columns, rows, /* dst2 */ view->select.table_mode, NULL); /* Copy selected text. */ vbi3_page_unref (view->select.pg); view->select.pg = vbi3_page_dup (view->pg); g_assert (NULL != view->select.pg); view->select.column1 = tcol1; view->select.row1 = trow1; view->select.column2 = tcol2; view->select.row2 = trow2; view->select.reveal = view->reveal; if (!view->select.in_clipboard) if (gtk_selection_owner_set (GTK_WIDGET (view), GA_CLIPBOARD, GDK_CURRENT_TIME)) view->select.in_clipboard = TRUE; if (!view->select.in_selection) if (gtk_selection_owner_set (GTK_WIDGET (view), GDK_SELECTION_PRIMARY, GDK_CURRENT_TIME)) view->select.in_selection = TRUE; if (view->appbar) gnome_appbar_set_status (view->appbar, _("Selection copied to clipboard")); } update_cursor_shape (view); view->selecting = FALSE; } static void select_update (TeletextView * view, gint x, gint y, guint state) { gint columns, rows; /* page */ gint scol, srow; /* start */ gint ocol, orow; /* last */ gint ccol, crow; /* current */ gboolean table; select_positions (view, x, y, &columns, &rows, &scol, &srow, &ccol, &crow); table = !!(state & GDK_SHIFT_MASK); if (view->select.last_x == -1) { /* First motion. */ select_transform (view, columns, rows, /* src1 */ columns, rows, /* src2 */ view->select.table_mode, scol, srow, /* dst1 */ ccol, crow, /* dst2 */ table, NULL); } else { gint width, height; gdk_window_get_geometry (GTK_WIDGET (view)->window, NULL, NULL, &width, &height, NULL); ocol = (view->select.last_x * columns) / width; ocol = SATURATE (ocol, 0, columns - 1); orow = (view->select.last_y * rows) / height; orow = SATURATE (orow, 0, rows - 1); select_transform (view, scol, srow, /* src1 */ ocol, orow, /* src2 */ view->select.table_mode, scol, srow, /* dst1 */ ccol, crow, /* dst2 */ table, NULL); } view->select.last_x = MAX (0, x); view->select.last_y = y; view->select.table_mode = table; } static void select_start (TeletextView * view, gint x, gint y, guint state) { if (view->selecting || !view->pg) return; if (view->pg->pgno < 0x100) { if (view->appbar) gnome_appbar_set_status (view->appbar, _("No page loaded")); return; } if (view->cursor_over_link) { view->cursor_over_link = FALSE; if (view->appbar) gnome_appbar_pop (view->appbar); } if (view->appbar) gnome_appbar_push (view->appbar, _("Selecting - press Shift key for table mode")); gdk_window_set_cursor (GTK_WIDGET (view)->window, cursor_select); view->select.start_x = x; view->select.start_y = y; view->select.last_x = -1; /* not yet, wait for move event */ view->select.table_mode = !!(state & GDK_SHIFT_MASK); view->select.rtl_mode = FALSE; /* XXX to do */ view->selecting = TRUE; } /* Export */ extern gchar *zvbi_get_current_network_name (void); /* XXX */ static void export_action (GtkAction * action _unused_, TeletextView * view) { GtkWidget *dialog; gchar *name; g_assert (view->pg && view->pg->pgno >= 0x100); if ((name = zvbi_get_name ())) { guint i; for (i = 0; i < strlen (name); ++i) if (!g_ascii_isalnum (name[i])) name[i] = '_'; dialog = export_dialog_new (view->pg, name, view->reveal); g_free (name); } else { dialog = export_dialog_new (view->pg, "Zapzilla", view->reveal); } if (dialog) { set_transient_for (GTK_WINDOW (dialog), view); gtk_widget_show_all (dialog); } } static PyObject * py_ttx_export (PyObject * self _unused_, PyObject * args _unused_) { TeletextView *view; if (!(view = teletext_view_from_widget (python_command_widget ()))) py_return_true; export_action (NULL, view); py_return_true; } /* Search */ static void search_action (GtkAction * action _unused_, TeletextView * view) { GtkWidget *widget; if (view->search_dialog) { gtk_window_present (GTK_WINDOW (view->search_dialog)); } else if ((widget = search_dialog_new (view))) { view->search_dialog = widget; g_signal_connect (G_OBJECT (widget), "destroy", G_CALLBACK (gtk_widget_destroyed), &view->search_dialog); set_transient_for (GTK_WINDOW (widget), view); gtk_widget_show_all (widget); } } static PyObject * py_ttx_search (PyObject * self _unused_, PyObject * args _unused_) { TeletextView *view; if (!(view = teletext_view_from_widget (python_command_widget ()))) py_return_true; search_action (NULL, view); py_return_true; } /* Popup Menu */ static guint hotlist_menu_insert (GtkMenuShell * menu, const vbi3_network * nk, gboolean separator, gint position) { vbi3_decoder *vbi; vbi3_teletext_decoder *td; gboolean have_subtitle_index = FALSE; gboolean have_now_and_next = FALSE; gboolean have_current_progr = FALSE; gboolean have_progr_index = FALSE; gboolean have_progr_schedule = FALSE; gboolean have_progr_warning = FALSE; vbi3_pgno pgno; guint count; if (!(vbi = zvbi_get_object ())) return 0; td = vbi3_decoder_cast_to_teletext_decoder (vbi); count = 0; for (pgno = 0x100; pgno <= 0x899; pgno = vbi3_add_bcd (pgno, 0x001)) { vbi3_ttx_page_stat ps; gboolean new_window; GtkWidget *menu_item; gchar *buffer; ps.page_type = VBI3_UNKNOWN_PAGE; /* Error ignored. */ vbi3_teletext_decoder_get_ttx_page_stat (td, &ps, nk, pgno); new_window = TRUE; switch (ps.page_type) { #undef ONCE #define ONCE(b) if (b) continue; else b = TRUE; case VBI3_SUBTITLE_INDEX: ONCE (have_subtitle_index); menu_item = z_gtk_pixmap_menu_item_new (_("Subtitle index"), GTK_STOCK_INDEX); break; case VBI3_NOW_AND_NEXT: ONCE (have_now_and_next); new_window = FALSE; menu_item = z_gtk_pixmap_menu_item_new (_("Now and Next"), GTK_STOCK_JUSTIFY_FILL); break; case VBI3_CURRENT_PROGR: ONCE (have_current_progr); menu_item = z_gtk_pixmap_menu_item_new (_("Current program"), GTK_STOCK_JUSTIFY_FILL); break; case VBI3_PROGR_INDEX: ONCE (have_progr_index); menu_item = z_gtk_pixmap_menu_item_new (_("Program Index"), GTK_STOCK_INDEX); break; case VBI3_PROGR_SCHEDULE: ONCE (have_progr_schedule); menu_item = z_gtk_pixmap_menu_item_new (_("Program Schedule"), "gnome-stock-timer"); break; case VBI3_PROGR_WARNING: ONCE (have_progr_warning); new_window = FALSE; /* TRANSLATORS: Schedule changes and the like. */ menu_item = z_gtk_pixmap_menu_item_new (_("Program Warning"), "gnome-stock-mail"); break; default: continue; } if (separator) { GtkWidget *menu_item; menu_item = gtk_separator_menu_item_new (); gtk_widget_show (menu_item); gtk_menu_shell_insert (menu, menu_item, position); if (position >= 0) ++position; separator = FALSE; } gtk_widget_show (menu_item); { gchar buffer[32]; g_snprintf (buffer, sizeof (buffer), "%x", pgno); z_tooltip_set (menu_item, buffer); } if (new_window) buffer = g_strdup_printf ("zapping.ttx_open_new(%x, -1)", pgno); else buffer = g_strdup_printf ("zapping.ttx_open(%x, -1)", pgno); g_signal_connect (G_OBJECT (menu_item), "activate", G_CALLBACK (on_python_command1), buffer); g_signal_connect_swapped (G_OBJECT (menu_item), "destroy", G_CALLBACK (g_free), buffer); gtk_menu_shell_insert (menu, menu_item, position); if (position >= 0) ++position; ++count; } return count; } guint ttxview_hotlist_menu_insert (GtkMenuShell * menu, gboolean separator, gint position) { return hotlist_menu_insert (menu, NULL, separator, position); } static GnomeUIInfo popup_open_page_uiinfo [] = { { GNOME_APP_UI_ITEM, N_("_Open"), NULL, G_CALLBACK (on_python_command1), NULL, NULL, GNOME_APP_PIXMAP_NONE, NULL, 0, (GdkModifierType) 0, NULL }, { GNOME_APP_UI_ITEM, N_("Open in _New Window"), NULL, G_CALLBACK (on_python_command1), NULL, NULL, GNOME_APP_PIXMAP_NONE, NULL, 0, (GdkModifierType) 0, NULL }, GNOMEUIINFO_END }; static GnomeUIInfo popup_open_url_uiinfo [] = { { GNOME_APP_UI_ITEM, N_("_Open Link"), NULL, G_CALLBACK (on_python_command1), NULL, NULL, GNOME_APP_PIXMAP_NONE, NULL, 0, (GdkModifierType) 0, NULL }, GNOMEUIINFO_END }; static GnomeUIInfo popup_page_uiinfo [] = { { GNOME_APP_UI_ITEM, N_("_New Window"), NULL, G_CALLBACK (on_python_command1), "zapping.ttx_open_new()", NULL, GNOME_APP_PIXMAP_STOCK, GTK_STOCK_NEW, 0, (GdkModifierType) 0, NULL }, { GNOME_APP_UI_ITEM, N_("_Save as..."), NULL, G_CALLBACK (on_python_command1), "zapping.ttx_export()", NULL, GNOME_APP_PIXMAP_STOCK, GTK_STOCK_SAVE_AS, 0, (GdkModifierType) 0, NULL }, { GNOME_APP_UI_ITEM, N_("S_earch..."), NULL, G_CALLBACK (on_python_command1), "zapping.ttx_search()", NULL, GNOME_APP_PIXMAP_STOCK, GTK_STOCK_FIND, 0, (GdkModifierType) 0, NULL }, { GNOME_APP_UI_ITEM, N_("S_ubtitles"), NULL, NULL, NULL, NULL, GNOME_APP_PIXMAP_STOCK, GTK_STOCK_INDEX, 0, (GdkModifierType) 0, NULL }, { GNOME_APP_UI_ITEM, N_("_Bookmarks"), NULL, NULL, NULL, NULL, GNOME_APP_PIXMAP_STOCK, GTK_STOCK_INDEX, 0, (GdkModifierType) 0, NULL }, GNOMEUIINFO_END }; static GtkWidget * popup_menu_ (TeletextView * view, const vbi3_link * lk, gboolean large) { GtkWidget *menu; GtkWidget *widget; gint pos; menu = gtk_menu_new (); g_object_set_data (G_OBJECT (menu), "TeletextView", view); pos = 0; if (lk) { switch (lk->type) { gint subpage; case VBI3_LINK_PAGE: case VBI3_LINK_SUBPAGE: subpage = decimal_subno (lk->subno); popup_open_page_uiinfo[0].user_data = g_strdup_printf ("zapping.ttx_open(%x, %d)", lk->pgno, subpage); g_signal_connect_swapped (G_OBJECT (menu), "destroy", G_CALLBACK (g_free), popup_open_page_uiinfo[0].user_data); popup_open_page_uiinfo[1].user_data = g_strdup_printf ("zapping.ttx_open_new(%x, %d)", lk->pgno, subpage); g_signal_connect_swapped (G_OBJECT (menu), "destroy", G_CALLBACK (g_free), popup_open_page_uiinfo[1].user_data); gnome_app_fill_menu (GTK_MENU_SHELL (menu), popup_open_page_uiinfo, /* accel */ NULL, /* mnemo */ TRUE, pos); return menu; case VBI3_LINK_HTTP: case VBI3_LINK_FTP: case VBI3_LINK_EMAIL: popup_open_url_uiinfo[0].user_data = g_strdup (lk->url); g_signal_connect_swapped (G_OBJECT (menu), "destroy", G_CALLBACK (g_free), popup_open_url_uiinfo[0].user_data); gnome_app_fill_menu (GTK_MENU_SHELL (menu), popup_open_url_uiinfo, /* accel */ NULL, /* mnemo */ TRUE, pos); return menu; default: break; } } gnome_app_fill_menu (GTK_MENU_SHELL (menu), popup_page_uiinfo, NULL, TRUE, pos); if (!vbi3_export_info_enum (0)) gtk_widget_set_sensitive (popup_page_uiinfo[1].widget, FALSE); if (large) { GtkWidget *subtitles_menu; widget = popup_page_uiinfo[3].widget; /* subtitles */ if ((subtitles_menu = zvbi_subtitle_menu_new (/* curr_pgno */ 0))) gtk_menu_item_set_submenu (GTK_MENU_ITEM (widget), subtitles_menu); else gtk_widget_set_sensitive (widget, FALSE); widget = popup_page_uiinfo[4].widget; /* bookmarks */ gtk_menu_item_set_submenu (GTK_MENU_ITEM (widget), bookmarks_menu_new (view)); ttxview_hotlist_menu_insert (GTK_MENU_SHELL (menu), /* separator */ TRUE, APPEND); } else { widget = popup_page_uiinfo[3].widget; /* subtitles */ gtk_widget_set_sensitive (widget, FALSE); gtk_widget_hide (widget); widget = popup_page_uiinfo[4].widget; /* bookmarks */ gtk_widget_set_sensitive (widget, FALSE); gtk_widget_hide (widget); } return menu; } static gboolean blink_timeout (gpointer user_data) { TeletextView *view = user_data; apply_patches (view, /* draw */ TRUE); return TRUE; } static void size_allocate (GtkWidget * widget, GtkAllocation * allocation) { TeletextView *view = TELETEXT_VIEW (widget); GTK_WIDGET_CLASS (parent_class)->size_allocate (widget, allocation); resize_scaled_page_image (view, allocation->width, allocation->height); } static gboolean expose_event (GtkWidget * widget, GdkEventExpose * event) { TeletextView *view = TELETEXT_VIEW (widget); draw_scaled_page_image (view, widget->window, widget->style->white_gc, /* src */ event->area.x, event->area.y, /* dst */ event->area.x, event->area.y, event->area.width, event->area.height); if (view->selecting && view->select.last_x != -1) { gint columns, rows; /* page */ gint scol, srow; /* start */ gint ccol, crow; /* current */ GdkRegion *region; select_positions (view, view->select.last_x, view->select.last_y, &columns, &rows, &scol, &srow, &ccol, &crow); region = gdk_region_rectangle (&event->area); select_transform (view, scol, srow, /* src1 */ ccol, crow, /* src2 */ view->select.table_mode, scol, srow, /* dst2 */ ccol, crow, /* dst2 */ view->select.table_mode, region); gdk_region_destroy (region); } return TRUE; } static gboolean motion_notify_event (GtkWidget * widget, GdkEventMotion * event) { TeletextView *view = TELETEXT_VIEW (widget); if (view->selecting) select_update (view, (int) event->x, (int) event->y, event->state); else update_cursor_shape (view); return FALSE; } static gboolean button_release_event (GtkWidget * widget, GdkEventButton * event _unused_) { TeletextView *view = TELETEXT_VIEW (widget); if (view->selecting) select_stop (view); return FALSE; /* pass on */ } static gboolean button_press_event (GtkWidget * widget, GdkEventButton * event) { TeletextView *view = TELETEXT_VIEW (widget); vbi3_link lk; gboolean success; switch (event->button) { case 1: /* left button */ if (event->state & (GDK_SHIFT_MASK | GDK_CONTROL_MASK | GDK_MOD1_MASK)) { select_start (view, (gint) event->x, (gint) event->y, event->state); } else { success = view->link_from_pointer_position (view, &lk, (int) event->x, (int) event->y); if (success) { switch (lk.type) { case VBI3_LINK_PAGE: case VBI3_LINK_SUBPAGE: view->load_page (view, lk.network, lk.pgno, lk.subno); break; case VBI3_LINK_HTTP: case VBI3_LINK_FTP: case VBI3_LINK_EMAIL: z_url_show (NULL, lk.url); break; default: select_start (view, (gint) event->x, (gint) event->y, event->state); break; } vbi3_link_destroy (&lk); } else { select_start (view, (gint) event->x, (gint) event->y, event->state); } } return TRUE; /* handled */ case 2: /* middle button, open link in new window */ success = view->link_from_pointer_position (view, &lk, (int) event->x, (int) event->y); if (success) { switch (lk.type) { case VBI3_LINK_PAGE: case VBI3_LINK_SUBPAGE: python_command_printf (widget, "zapping.ttx_open_new(%x,%d)", lk.pgno, decimal_subno (lk.subno)); vbi3_link_destroy (&lk); return TRUE; /* handled */ case VBI3_LINK_HTTP: case VBI3_LINK_FTP: case VBI3_LINK_EMAIL: z_url_show (NULL, lk.url); vbi3_link_destroy (&lk); return TRUE; /* handled */ default: vbi3_link_destroy (&lk); break; } } break; default: break; } return FALSE; /* pass on */ } /* Drawing area cannot focus, must be called by parent. */ static gboolean teletext_view_on_key_press (GtkWidget * widget _unused_, GdkEventKey * event, TeletextView * view) { guint digit; /* Loading a page takes time, possibly longer than the key repeat period, and repeated keys will stack up. This kludge effectively defers all loads until the key is released, and discards all but the last load request. */ if (abs ((int) view->last_key_press_event_time - (int) event->time) < 100 || event->length > 1) view->deferred_load = TRUE; view->last_key_press_event_time = event->time; digit = event->keyval - GDK_0; switch (event->keyval) { case GDK_a ... GDK_f: case GDK_A ... GDK_F: if (hex_pages) { digit = (event->keyval & 7) + 9; goto page_number; } break; case GDK_KP_0 ... GDK_KP_9: digit = event->keyval - GDK_KP_0; goto page_number; case GDK_0 ... GDK_9: page_number: if (event->state & (GDK_CONTROL_MASK | GDK_SHIFT_MASK | GDK_MOD1_MASK)) { if (digit >= 1 && digit <= 8) { view->load_page (view, NULL, (vbi3_pgno) digit * 0x100, VBI3_ANY_SUBNO); return TRUE; /* handled, don't pass on */ } break; } if (view->entered_pgno >= 0x100) view->entered_pgno = 0; view->entered_pgno = (view->entered_pgno << 4) + digit; if (view->entered_pgno >= 0x900) view->entered_pgno ^= 0x800; if (view->entered_pgno >= 0x100) { view->load_page (view, /* nk */ NULL, view->entered_pgno, VBI3_ANY_SUBNO); } else { /* view->freezed = TRUE; */ if (view->toolbar) teletext_toolbar_set_url (view->toolbar, view->entered_pgno, 0); } return TRUE; /* handled */ case GDK_S: /* Menu is "Save As", plain "Save" might be confusing. Now Save As has accelerator Ctrl-Shift-S, omitting the Shift might be confusing. But we accept Ctrl-S (of plain Save) here. */ if (event->state & GDK_CONTROL_MASK) { python_command_printf (GTK_WIDGET (view), "zapping.ttx_export()"); return TRUE; /* handled */ } break; default: break; } return FALSE; /* pass on */ } static gboolean my_key_press (TeletextView * view, GdkEventKey * event) { return teletext_view_on_key_press (GTK_WIDGET (view), event, view); } static void client_redraw (TeletextView * view, unsigned int width, unsigned int height) { resize_scaled_page_image (view, width, height); draw_scaled_page_image (view, GTK_WIDGET (view)->window, GTK_WIDGET (view)->style->white_gc, /* src */ 0, 0, /* dst */ 0, 0, width, height); } static void instance_finalize (GObject * object) { TeletextView *view = TELETEXT_VIEW (object); GdkWindow *window; teletext_views = g_list_remove (teletext_views, view); if (NULL != view->vbi) vbi3_decoder_remove_event_handler (view->vbi, decoder_event_handler, view); if (view->search_dialog) gtk_widget_destroy (view->search_dialog); if (view->blink_timeout_id > 0) g_source_remove (view->blink_timeout_id); if (view->deferred.timeout_id > 0) g_source_remove (view->deferred.timeout_id); g_object_unref (view->unscaled_on); g_object_unref (view->unscaled_off); if (view->scaled_on) g_object_unref (view->scaled_on); delete_patches (view); g_object_unref (view->select.xor_gc); window = GTK_WIDGET (view)->window; if (view->select.in_clipboard) { if (gdk_selection_owner_get (GA_CLIPBOARD) == window) gtk_selection_owner_set (NULL, GA_CLIPBOARD, GDK_CURRENT_TIME); } if (view->select.in_selection) { if (gdk_selection_owner_get (GDK_SELECTION_PRIMARY) == window) gtk_selection_owner_set (NULL, GDK_SELECTION_PRIMARY, GDK_CURRENT_TIME); } vbi3_page_unref (view->select.pg); vbi3_page_unref (view->pg); vbi3_network_destroy (&view->req.network); vbi3_network_destroy (&view->deferred.network); parent_class->finalize (object); } static GtkActionEntry actions [] = { { "GoSubmenu", NULL, N_("_Go"), NULL, NULL, NULL }, { "HistoryBack", GTK_STOCK_GO_BACK, NULL, NULL, N_("Previous page in history"), G_CALLBACK (history_back_action) }, { "HistoryForward", GTK_STOCK_GO_FORWARD, NULL, NULL, N_("Next page in history"), G_CALLBACK (history_forward_action) }, { "Home", GTK_STOCK_HOME, N_("Index"), NULL, N_("Go to the index page"), G_CALLBACK (home_action) }, { "Search", GTK_STOCK_FIND, NULL, NULL, N_("Search page memory"), G_CALLBACK (search_action) }, { "Export", GTK_STOCK_SAVE_AS, NULL, NULL, N_("Save this page to a file"), G_CALLBACK (export_action) }, }; /* We cannot initialize this until the widget (and its parent GtkWindow) has a window. */ static void realize (GtkWidget * widget) { TeletextView *view = TELETEXT_VIEW (widget); GTK_WIDGET_CLASS (parent_class)->realize (widget); /* No background, prevents flicker. */ gdk_window_set_back_pixmap (widget->window, NULL, FALSE); view->select.xor_gc = gdk_gc_new (widget->window); gdk_gc_set_function (view->select.xor_gc, GDK_INVERT); } static int cur_pgno (TeletextView * view) { if (view->pg) return view->pg->pgno; else return 0; } static void instance_init (GTypeInstance * instance, gpointer g_class _unused_) { TeletextView *view = (TeletextView *) instance; GtkAction *action; GtkWidget *widget; gint uw, uh; view->show_page = show_page_; view->load_page = load_page_; view->switch_network = switch_network_; view->popup_menu = popup_menu_; view->link_from_pointer_position = link_from_pointer_position_; view->set_charset = set_charset_; view->action_group = gtk_action_group_new ("TeletextViewActions"); #ifdef ENABLE_NLS gtk_action_group_set_translation_domain (view->action_group, GETTEXT_PACKAGE); #endif gtk_action_group_add_actions (view->action_group, actions, G_N_ELEMENTS (actions), view); action = gtk_action_group_get_action (view->action_group, "Export"); z_action_set_sensitive (action, NULL != vbi3_export_info_enum (0)); vbi3_network_init (&view->req.network); view->override_charset = VBI3_CHARSET_CODE_NONE; history_update_gui (view); widget = GTK_WIDGET (view); gtk_widget_add_events (widget, GDK_EXPOSURE_MASK | /* redraw */ GDK_POINTER_MOTION_MASK | /* cursor shape */ GDK_BUTTON_PRESS_MASK | /* links, selection */ GDK_BUTTON_RELEASE_MASK | /* selection */ GDK_KEY_PRESS_MASK | /* accelerators */ GDK_STRUCTURE_MASK | /* resize */ 0); /* Selection */ gtk_selection_add_targets (widget, GDK_SELECTION_PRIMARY, clipboard_targets, N_ELEMENTS (clipboard_targets)); gtk_selection_add_targets (widget, GA_CLIPBOARD, clipboard_targets, N_ELEMENTS (clipboard_targets)); uw = 41 * CW; uh = 25 * CH; view->unscaled_on = gdk_pixbuf_new (GDK_COLORSPACE_RGB, TRUE, 8, uw, uh); view->unscaled_off = gdk_pixbuf_new (GDK_COLORSPACE_RGB, TRUE, 8, uw, uh); g_assert (view->unscaled_on != NULL); g_assert (view->unscaled_off != NULL); create_page_images_from_pg (view); view->deferred_load = FALSE; view->deferred.timeout_id = NO_SOURCE_ID; view->blink_timeout_id = g_timeout_add (BLINK_CYCLE / 4, (GSourceFunc) blink_timeout, view); view->load_page (view, /* nk */ NULL, default_home_pgno (), VBI3_ANY_SUBNO); teletext_views = g_list_append (teletext_views, view); view->client_redraw = client_redraw; view->key_press = my_key_press; view->cur_pgno = cur_pgno; } GtkWidget * teletext_view_new (void) { return GTK_WIDGET (g_object_new (TYPE_TELETEXT_VIEW, NULL)); } static void teletext_level_notify (GConfClient * client _unused_, guint cnxn_id _unused_, GConfEntry * entry, gpointer user_data _unused_) { if (entry->value) { const gchar *s; gint enum_value; s = gconf_value_get_string (entry->value); if (s && gconf_string_to_enum (teletext_level_enum, s, &enum_value)) { teletext_level = (vbi3_wst_level) enum_value; reformat_all_views (); } } } static void default_charset_notify (GConfClient * client _unused_, guint cnxn_id _unused_, GConfEntry * entry, gpointer user_data _unused_) { if (entry->value) { const gchar *s; gint enum_value; s = gconf_value_get_string (entry->value); if (s && gconf_string_to_enum (teletext_charset_enum, s, &enum_value)) { default_charset = enum_value; reformat_all_views (); } } } static void interp_type_notify (GConfClient * client _unused_, guint cnxn_id _unused_, GConfEntry * entry, gpointer user_data _unused_) { if (entry->value) { const gchar *s; gint enum_value; s = gconf_value_get_string (entry->value); if (s && gconf_string_to_enum (teletext_interp_enum, s, &enum_value)) { interp_type = (GdkInterpType) enum_value; redraw_all_views (); } } } static void color_notify (GConfClient * client _unused_, guint cnxn_id _unused_, GConfEntry * entry _unused_, gpointer user_data _unused_) { gboolean success = FALSE; success |= z_gconf_get_int (&brightness, GCONF_DIR "/view/brightness"); success |= z_gconf_get_int (&contrast, GCONF_DIR "/view/contrast"); if (success) redraw_all_views (); } GConfEnumStringPair navigation_enum [] = { { 0, "disabled" }, { 1, "flof_top1" }, { 2, "flof_top2" }, { 0, NULL } }; static void navigation_notify (GConfClient * client _unused_, guint cnxn_id _unused_, GConfEntry * entry, gpointer user_data _unused_) { if (entry->value) { const gchar *s; gint enum_value; s = gconf_value_get_string (entry->value); if (s && gconf_string_to_enum (navigation_enum, s, &enum_value)) { navigation = enum_value; reformat_all_views (); } } } static void class_init (gpointer g_class, gpointer class_data _unused_) { GObjectClass *object_class; GtkWidgetClass *widget_class; vbi3_bool success; object_class = G_OBJECT_CLASS (g_class); widget_class = GTK_WIDGET_CLASS (g_class); parent_class = g_type_class_peek_parent (g_class); object_class->finalize = instance_finalize; widget_class->realize = realize; widget_class->size_allocate = size_allocate; widget_class->expose_event = expose_event; widget_class->button_press_event = button_press_event; widget_class->button_release_event = button_release_event; widget_class->motion_notify_event = motion_notify_event; widget_class->selection_clear_event = selection_clear_event; widget_class->selection_get = selection_get; signals[REQUEST_CHANGED] = g_signal_new ("z-request-changed", G_TYPE_FROM_CLASS (g_class), G_SIGNAL_RUN_LAST | G_SIGNAL_NO_RECURSE | G_SIGNAL_NO_HOOKS, G_STRUCT_OFFSET (TeletextViewClass, request_changed), /* accumulator */ NULL, NULL, g_cclosure_marshal_VOID__VOID, /* return_type */ G_TYPE_NONE, /* n_params */ 0); signals[CHARSET_CHANGED] = g_signal_new ("z-charset-changed", G_TYPE_FROM_CLASS (g_class), G_SIGNAL_RUN_LAST | G_SIGNAL_NO_RECURSE | G_SIGNAL_NO_HOOKS, G_STRUCT_OFFSET (TeletextViewClass, charset_changed), /* accumulator */ NULL, NULL, g_cclosure_marshal_VOID__VOID, /* return_type */ G_TYPE_NONE, /* n_params */ 0); cursor_normal = gdk_cursor_new (GDK_LEFT_PTR); cursor_link = gdk_cursor_new (GDK_HAND2); cursor_select = gdk_cursor_new (GDK_XTERM); GA_CLIPBOARD = gdk_atom_intern ("CLIPBOARD", FALSE); z_gconf_auto_update_bool (&rolling_header, GCONF_DIR "/view/rolling_header"); z_gconf_auto_update_bool (&live_clock, GCONF_DIR "/view/live_clock"); /* Error ignored */ z_gconf_notify_add (GCONF_DIR "/level", teletext_level_notify, NULL); z_gconf_notify_add (GCONF_DIR "/default_charset", default_charset_notify, NULL); z_gconf_notify_add (GCONF_DIR "/view/interp_type", interp_type_notify, NULL); z_gconf_notify_add (GCONF_DIR "/view/brightness", color_notify, NULL); z_gconf_notify_add (GCONF_DIR "/view/contrast", color_notify, NULL); z_gconf_notify_add (GCONF_DIR "/view/navigation", navigation_notify, NULL); cmd_register ("ttx_open", py_ttx_open, METH_VARARGS); cmd_register ("ttx_page_incr", py_ttx_page_incr, METH_VARARGS, ("Increment Teletext page number"), "zapping.ttx_page_incr(+1)", ("Decrement Teletext page number"), "zapping.ttx_page_incr(-1)"); cmd_register ("ttx_subpage_incr", py_ttx_subpage_incr, METH_VARARGS, ("Increment Teletext subpage number"), "zapping.ttx_subpage_incr(+1)", ("Decrement Teletext subpage number"), "zapping.ttx_subpage_incr(-1)"); cmd_register ("ttx_home", py_ttx_home, METH_VARARGS, ("Go to Teletext index page"), "zapping.ttx_home()"); cmd_register ("ttx_hold", py_ttx_hold, METH_VARARGS, ("Hold Teletext subpage"), "zapping.ttx_hold()"); cmd_register ("ttx_reveal", py_ttx_reveal, METH_VARARGS, ("Reveal concealed text"), "zapping.ttx_reveal()"); cmd_register ("ttx_history_prev", py_ttx_history_prev, METH_VARARGS, ("Previous Teletext page in history"), "zapping.ttx_history_prev()"); cmd_register ("ttx_history_next", py_ttx_history_next, METH_VARARGS, ("Next Teletext page in history"), "zapping.ttx_history_next()"); cmd_register ("ttx_search", py_ttx_search, METH_VARARGS, ("Teletext search"), "zapping.ttx_search()"); cmd_register ("ttx_export", py_ttx_export, METH_VARARGS, ("Teletext export"), "zapping.ttx_export()"); g_assert (success); } GType teletext_view_get_type (void) { static GType type = 0; if (!type) { GTypeInfo info; CLEAR (info); info.class_size = sizeof (TeletextViewClass); info.class_init = class_init; info.instance_size = sizeof (TeletextView); info.instance_init = instance_init; type = g_type_register_static (GTK_TYPE_DRAWING_AREA, "TeletextView", &info, (GTypeFlags) 0); } return type; } zapping-0.10cvs6/plugins/teletext/view.h 644 764 144 13216 10305456045 13474 /* * Zapping TV viewer * * Copyright (C) 2000, 2001, 2002 Iaki Garca Etxebarria * Copyright (C) 2000, 2001, 2002, 2003, 2004 Michael H. Schimek * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* $Id: view.h,v 1.3 2005/09/01 01:40:53 mschimek Exp $ */ #ifndef TELETEXT_VIEW_H #define TELETEXT_VIEW_H #include #include "libvbi/page.h" /* vbi3_page, vbi3_pgno, vbi3_subno */ #include "libvbi/link.h" /* vbi3_link */ #include "libvbi/vbi_decoder.h" #include "page_num.h" #include "toolbar.h" G_BEGIN_DECLS #define TYPE_TELETEXT_VIEW (teletext_view_get_type ()) #define TELETEXT_VIEW(obj) \ (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_TELETEXT_VIEW, TeletextView)) #define TELETEXT_VIEW_CLASS(klass) \ (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_TELETEXT_VIEW, TeletextViewClass)) #define IS_TELETEXT_VIEW(obj) \ (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_TELETEXT_VIEW)) #define IS_TELETEXT_VIEW_CLASS(klass) \ (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_TELETEXT_VIEW)) #define TELETEXT_VIEW_GET_CLASS(obj) \ (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_TELETEXT_VIEW, TeletextViewClass)) typedef struct _TeletextView TeletextView; typedef struct _TeletextViewClass TeletextViewClass; /** * The blink of items in the page is done by applying the patch once * every second (whenever the client wishes) to the apropriate places * on the screen. */ struct ttx_patch { guint column; guint row; gint width, height; /* geometry of the patch */ gint sx, sy; gint sw, sh; gint dx, dy; GdkPixbuf * unscaled_on; /* unscaled image, flash on */ GdkPixbuf * unscaled_off; /* unscaled image, flash off or NULL */ GdkPixbuf * scaled_on; /* scaled image, flash on */ GdkPixbuf * scaled_off; /* scaled image, flash off or NULL */ guint columns; /* text columns covered */ gint phase; /* flash phase */ gboolean flash; /* flashing patch */ gboolean dirty; /* image changed */ }; struct _TeletextView { GtkDrawingArea darea; TeletextToolbar * toolbar; GnomeAppBar * appbar; GtkActionGroup * action_group; void (* show_page) (TeletextView * view, vbi3_page * pg); gboolean (* load_page) (TeletextView * view, const vbi3_network * nk, vbi3_pgno pgno, vbi3_subno subno); gboolean (* switch_network) (TeletextView * view, const vbi3_network * nk); GtkWidget * (* popup_menu) (TeletextView * view, const vbi3_link * ld, gboolean large); gboolean (* link_from_pointer_position) (TeletextView * view, vbi3_link * ld, gint x, gint y); gboolean (* set_charset) (TeletextView * view, vbi3_charset_code charset_code); /* ugly hack */ void (* client_redraw)(TeletextView * view, unsigned int width, unsigned int height); gboolean (* key_press)(TeletextView * view, GdkEventKey * event); int (* cur_pgno)(TeletextView * view); /*< private >*/ vbi3_decoder * vbi; vbi3_pgno entered_pgno; /* page number being entered */ page_num req; /* requested page */ vbi3_charset_code override_charset; vbi3_page * pg; /* displayed page (shared, r/o) */ gboolean freezed; /* no refresh (header / subpages) */ GdkPixbuf * unscaled_on; /* unscaled image of pg, flash on */ GdkPixbuf * unscaled_off; /* unscaled image of pg, flash off */ GdkPixbuf * scaled_on; /* scaled image of pg, flash on */ struct ttx_patch * patches; /* patches to be applied */ guint n_patches; guint blink_timeout_id; guint32 last_key_press_event_time; /* repeat key kludge */ gboolean deferred_load; struct { guint timeout_id; vbi3_network network; vbi3_pgno pgno; vbi3_subno subno; } deferred; struct { page_num stack [25]; guint top; guint size; } history; gboolean hold; /* hold the current subpage */ gboolean reveal; /* reveal concealed text */ gboolean cursor_over_link; gboolean selecting; struct { gint start_x; gint start_y; gint last_x; gint last_y; gboolean table_mode; gboolean rtl_mode; gboolean reveal; /* at select time */ vbi3_page * pg; /* selected text */ gint column1; /* selected text */ gint row1; gint column2; gint row2; GdkGC * xor_gc; /* gfx context for xor mask */ /* selected text "sent" to */ gboolean in_clipboard; /* X11 "CLIPBOARD" */ gboolean in_selection; /* GDK primary selection */ } select; GtkWidget * search_dialog; }; struct _TeletextViewClass { GtkDrawingAreaClass parent_class; /* Signals. */ void (*request_changed)(TeletextView *view); void (*charset_changed)(TeletextView *view); }; extern GType teletext_view_get_type (void) G_GNUC_CONST; GtkWidget * teletext_view_new (void); extern TeletextView * teletext_view_from_widget (GtkWidget * widget); extern guint ttxview_hotlist_menu_insert (GtkMenuShell * menu, gboolean separator, gint position); G_END_DECLS #endif /* TELETEXT_VIEW_H */ zapping-0.10cvs6/plugins/teletext/preferences.c 644 764 144 30657 10324040735 15022 /* * Zapping TV viewer * * Copyright (C) 2000, 2001, 2002 Iaki Garca Etxebarria * Copyright (C) 2000, 2001, 2002, 2003, 2004 Michael H. Schimek * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* $Id: preferences.c,v 1.4 2005/10/14 23:40:13 mschimek Exp $ */ #ifdef HAVE_CONFIG_H # include "config.h" #endif #include "common/intl-priv.h" #include "libvbi/cache.h" #include "src/zgconf.h" #include "src/zspinslider.h" #include "src/zvbi.h" #include "main.h" #include "preferences.h" #define GCONF_DIR "/apps/zapping/plugins/teletext" #define INDENT_COL 2 static GObjectClass * parent_class; GConfEnumStringPair teletext_charset_enum [] = { { 0, "western_and_central_europe" }, { 8, "eastern_europe" }, { 16, "western_europe_and_turkey" }, { 24, "central_and_southeast_europe" }, { 32, "cyrillic" }, { 48, "greek_and_turkish" }, { 64, "arabic" }, { 80, "hebrew_and_arabic" }, { 0, NULL } }; static const gchar * charset_menu [] = { N_("Western and Central Europe"), N_("Eastern Europe"), N_("Western Europe and Turkey"), N_("Central and Southeast Europe"), N_("Cyrillic"), N_("Greek and Turkish"), N_("Arabic"), N_("Hebrew and Arabic"), NULL, }; GConfEnumStringPair teletext_level_enum [] = { { VBI3_WST_LEVEL_1, "1" }, { VBI3_WST_LEVEL_1p5, "1.5" }, { VBI3_WST_LEVEL_2p5, "2.5" }, { VBI3_WST_LEVEL_3p5, "3.5" }, { 0, NULL } }; static const gchar * level_menu [] = { N_("Level 1"), N_("Level 1.5 (additional national characters)"), N_("Level 2.5 (more colors, font styles and graphics)"), N_("Level 3.5 (proportional spacing, multicolor graphics)"), NULL, }; GConfEnumStringPair teletext_interp_enum [] = { { GDK_INTERP_NEAREST, "nearest" }, { GDK_INTERP_TILES, "tiles" }, { GDK_INTERP_BILINEAR, "bilinear" }, { GDK_INTERP_HYPER, "hyper" }, { 0, NULL } }; static const gchar * interp_menu [] = { N_("Nearest (fast, low quality)"), N_("Tiles"), N_("Bilinear"), N_("Hyper (slow, high quality)"), NULL, }; static void attach_header (GtkTable * table, guint row, const gchar * text) { GtkWidget *widget; widget = gtk_label_new (text); gtk_widget_show (widget); gtk_label_set_use_markup (GTK_LABEL (widget), TRUE); gtk_misc_set_alignment (GTK_MISC (widget), 0, 0.5); gtk_table_attach (table, widget, /* column */ 0, 4, row, row + 1, (GtkAttachOptions)(GTK_EXPAND | GTK_FILL), (GtkAttachOptions)(0), /* padding */ 0, 3); } static void attach_label (GtkTable * table, guint row, const gchar * text) { GtkWidget *widget; widget = gtk_label_new_with_mnemonic (text); gtk_widget_show (widget); gtk_misc_set_alignment (GTK_MISC (widget), 0.0, 0.5); gtk_table_attach (table, widget, INDENT_COL, INDENT_COL + 1, row, row + 1, (GtkAttachOptions)(GTK_FILL), (GtkAttachOptions)(0), /* padding */ 0, 0); } static void attach_combo_box (GtkTable * table, guint row, const gchar ** option_menu, const gchar * gconf_key, const GConfEnumStringPair *lookup_table, const gchar * tooltip) { GtkWidget *widget; widget = z_gconf_combo_box_new (option_menu, gconf_key, lookup_table); gtk_widget_show (widget); if (tooltip) z_tooltip_set (widget, tooltip); gtk_table_attach (table, widget, INDENT_COL + 1, INDENT_COL + 2, row, row + 1, (GtkAttachOptions)(GTK_EXPAND | GTK_FILL), (GtkAttachOptions)(0), /* padding */ 0, 0); } void teletext_prefs_apply (TeletextPrefs * prefs) { vbi3_decoder *vbi; vbi3_cache *ca; gint value; g_return_if_fail (IS_TELETEXT_PREFS (prefs)); /* These do not auto apply because we cannot undo. */ ca = NULL; if ((vbi = zvbi_get_object ())) { vbi3_teletext_decoder *td; td = vbi3_decoder_cast_to_teletext_decoder (vbi); ca = vbi3_teletext_decoder_get_cache (td); } value = gtk_adjustment_get_value (prefs->cache_size); value *= 1 << 10; z_gconf_set_int (GCONF_DIR "/cache_size", value); if (ca) vbi3_cache_set_memory_limit (ca, (unsigned int) value); value = gtk_adjustment_get_value (prefs->cache_networks); z_gconf_set_int (GCONF_DIR "/cache_networks", value); if (ca) { vbi3_cache_set_network_limit (ca, (unsigned int) value); vbi3_cache_unref (ca); } } void teletext_prefs_cancel (TeletextPrefs * prefs) { GError *error = NULL; gboolean success; g_return_if_fail (IS_TELETEXT_PREFS (prefs)); if (prefs->change_set) { /* Revert to old values. */ success = gconf_client_commit_change_set (gconf_client, prefs->change_set, /* remove_committed */ FALSE, &error); if (!success || error) { /* Error ignored. */ if (error) { printv ("Cannot revert Teletext prefs: %s\n", error->message); g_error_free (error); error = NULL; } } } gtk_widget_destroy (GTK_WIDGET (prefs)); } static void on_control_changed (GtkWidget * adj, gpointer user_data) { gint value; switch (GPOINTER_TO_INT (user_data)) { case 0: value = GTK_ADJUSTMENT (adj)->value; /* Error ignored. */ z_gconf_set_int (GCONF_DIR "/view/brightness", SATURATE (value, 0, 255)); break; case 1: value = GTK_ADJUSTMENT (adj)->value; /* Error ignored. */ z_gconf_set_int (GCONF_DIR "/view/contrast", SATURATE (value, -128, +127)); break; } } static void instance_finalize (GObject * object) { TeletextPrefs *prefs = TELETEXT_PREFS (object); if (prefs->change_set) { gconf_change_set_unref (prefs->change_set); prefs->change_set = NULL; } parent_class->finalize (object); } static void instance_init (GTypeInstance * instance, gpointer g_class _unused_) { TeletextPrefs *prefs = (TeletextPrefs *) instance; GError *error = NULL; GtkWidget *hbox; GtkWidget *widget; GtkObject *adj; guint row; gint value; gtk_table_resize (&prefs->table, /* rows */ 6, /* columns */ 4); gtk_table_set_homogeneous (&prefs->table, FALSE); gtk_container_set_border_width (GTK_CONTAINER (&prefs->table), 12); gtk_table_set_row_spacings (&prefs->table, 3); gtk_table_set_col_spacings (&prefs->table, 12); row = 0; attach_header (&prefs->table, row++, _("General")); attach_label (&prefs->table, row, _("_Teletext implementation:")); attach_combo_box (&prefs->table, row++, level_menu, GCONF_DIR "/level", teletext_level_enum, NULL); attach_label (&prefs->table, row, _("_Default encoding:")); attach_combo_box (&prefs->table, row++, charset_menu, GCONF_DIR "/default_charset", teletext_charset_enum, _("Some stations fail to transmit a complete language " "identifier, so the Teletext viewer may not display " "the correct font or national characters. You can " "select your geographical region here as an " "additional hint.")); attach_header (&prefs->table, row++, _("Page memory")); attach_label (&prefs->table, row, _("_Size:")); hbox = gtk_hbox_new (/* homogeneous */ FALSE, /* spacing */ 0); gtk_widget_show (hbox); gtk_box_set_spacing (GTK_BOX (hbox), 6); gtk_table_attach (&prefs->table, hbox, INDENT_COL + 1, INDENT_COL + 2, row, row + 1, (GtkAttachOptions)(GTK_EXPAND | GTK_FILL), (GtkAttachOptions)(0), /* padding */ 0, 0); value = 1000 << 10; /* bytes */ z_gconf_get_int (&value, GCONF_DIR "/cache_size"); adj = gtk_adjustment_new ((value + 1023) >> 10, /* kbytes */ /* min, max */ 1, 1 << 20, /* step */ 10, /* page incr, size */ 1000, 1000); prefs->cache_size = GTK_ADJUSTMENT (adj); widget = gtk_spin_button_new (prefs->cache_size, /* climb */ 10, /* decimals */ 0); gtk_widget_show (widget); gtk_box_pack_start (GTK_BOX (hbox), widget, /* expand */ TRUE, /* fill */ TRUE, /* pad */ 0); /* TRANSLATORS: Kilobyte (2^10) */ widget = gtk_label_new (_("KiB")); gtk_widget_show (widget); gtk_misc_set_alignment (GTK_MISC (widget), 0.0, 0.5); gtk_box_pack_start (GTK_BOX (hbox), widget, FALSE, FALSE, 0); ++row; attach_label (&prefs->table, 5, _("_Channels:")); value = 1; z_gconf_get_int (&value, GCONF_DIR "/cache_networks"); adj = gtk_adjustment_new (value, /* min, max */ 1, 300, /* step */ 1, /* page incr, size */ 10, 10); prefs->cache_networks = GTK_ADJUSTMENT (adj); widget = gtk_spin_button_new (prefs->cache_networks, /* climb */ 1, /* decimals */ 0); gtk_widget_show (widget); gtk_table_attach (&prefs->table, widget, INDENT_COL + 1, INDENT_COL + 2, row, row + 1, (GtkAttachOptions)(GTK_EXPAND | GTK_FILL), (GtkAttachOptions)(0), /* padding */ 0, 0); ++row; attach_header (&prefs->table, row++, _("Display")); attach_label (&prefs->table, row, _("_Brightness:")); value = 128; z_gconf_get_int (&value, GCONF_DIR "/view/brightness"); adj = gtk_adjustment_new (value, /* min, max */ 0.0, 255.0, /* step */ 1, /* page incr, size */ 16, 16); widget = z_spinslider_new (GTK_ADJUSTMENT (adj), NULL, NULL, 128, 0); z_spinslider_set_int_value (Z_SPINSLIDER (widget), value); gtk_widget_show (widget); gtk_table_attach (&prefs->table, widget, INDENT_COL + 1, INDENT_COL + 2, row, row + 1, (GtkAttachOptions)(GTK_EXPAND | GTK_FILL), (GtkAttachOptions)(0), /* padding */ 0, 0); g_signal_connect (G_OBJECT (adj), "value-changed", G_CALLBACK (on_control_changed), GINT_TO_POINTER (0)); ++row; attach_label (&prefs->table, row, _("_Contrast:")); value = 64; z_gconf_get_int (&value, GCONF_DIR "/view/contrast"); adj = gtk_adjustment_new (value, /* min, max */ -128, +127, /* step */ 1, /* page incr, size */ 16, 16); widget = z_spinslider_new (GTK_ADJUSTMENT (adj), NULL, NULL, 64, 0); z_spinslider_set_int_value (Z_SPINSLIDER (widget), value); gtk_widget_show (widget); gtk_table_attach (&prefs->table, widget, INDENT_COL + 1, INDENT_COL + 2, row, row + 1, (GtkAttachOptions)(GTK_EXPAND | GTK_FILL), (GtkAttachOptions)(0), /* padding */ 0, 0); g_signal_connect (G_OBJECT (adj), "value-changed", G_CALLBACK (on_control_changed), GINT_TO_POINTER (0)); ++row; attach_label (&prefs->table, row, _("S_caling:")); attach_combo_box (&prefs->table, row++, interp_menu, GCONF_DIR "/view/interp_type", teletext_interp_enum, _("Quality/speed trade-off when scaling and " "anti-aliasing the page.")); prefs->change_set = gconf_client_change_set_from_current (gconf_client, &error, GCONF_DIR "/default_charset", GCONF_DIR "/level", GCONF_DIR "/view/interp_type", NULL); if (!prefs->change_set || error) { g_assert (!prefs->change_set); if (error) { g_warning ("Cannot create Teletext prefs change set:\n%s", error->message); g_error_free (error); error = NULL; } } } GtkWidget * teletext_prefs_new (void) { return GTK_WIDGET (g_object_new (TYPE_TELETEXT_PREFS, NULL)); } static void class_init (gpointer g_class, gpointer class_data _unused_) { GObjectClass *object_class; object_class = G_OBJECT_CLASS (g_class); parent_class = g_type_class_peek_parent (g_class); object_class->finalize = instance_finalize; } GType teletext_prefs_get_type (void) { static GType type = 0; if (!type) { GTypeInfo info; CLEAR (info); info.class_size = sizeof (TeletextPrefsClass); info.class_init = class_init; info.instance_size = sizeof (TeletextPrefs); info.instance_init = instance_init; type = g_type_register_static (GTK_TYPE_TABLE, "TeletextPrefs", &info, (GTypeFlags) 0); } return type; } zapping-0.10cvs6/plugins/teletext/preferences.h 644 764 144 4572 10305456045 15010 /* * Zapping TV viewer * * Copyright (C) 2000, 2001, 2002 Iaki Garca Etxebarria * Copyright (C) 2000, 2001, 2002, 2003, 2004 Michael H. Schimek * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* $Id: preferences.h,v 1.2 2005/09/01 01:40:53 mschimek Exp $ */ #ifndef TELETEXT_PREFERENCES_H #define TELETEXT_PREFERENCES_H #include #include G_BEGIN_DECLS #define TYPE_TELETEXT_PREFS (teletext_prefs_get_type ()) #define TELETEXT_PREFS(obj) \ (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_TELETEXT_PREFS, TeletextPrefs)) #define TELETEXT_PREFS_CLASS(klass) \ (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_TELETEXT_PREFS, TeletextPrefsClass)) #define IS_TELETEXT_PREFS(obj) \ (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_TELETEXT_PREFS)) #define IS_TELETEXT_PREFS_CLASS(klass) \ (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_TELETEXT_PREFS)) #define TELETEXT_PREFS_GET_CLASS(obj) \ (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_TELETEXT_PREFS, TeletextPrefsClass)) typedef struct _TeletextPrefs TeletextPrefs; typedef struct _TeletextPrefsClass TeletextPrefsClass; struct _TeletextPrefs { GtkTable table; GtkAdjustment * cache_size; GtkAdjustment * cache_networks; GConfChangeSet * change_set; }; struct _TeletextPrefsClass { GtkTableClass parent_class; }; extern GConfEnumStringPair teletext_charset_enum []; extern GConfEnumStringPair teletext_level_enum []; extern GConfEnumStringPair teletext_interp_enum []; extern void teletext_prefs_cancel (TeletextPrefs * prefs); extern void teletext_prefs_apply (TeletextPrefs * prefs); extern GType teletext_prefs_get_type (void) G_GNUC_CONST; extern GtkWidget * teletext_prefs_new (void); G_END_DECLS #endif /* TELETEXT_PREFERENCES_H */ zapping-0.10cvs6/plugins/deinterlace/ 777 764 144 0 10443536362 12757 5zapping-0.10cvs6/plugins/deinterlace/DI_Misc/ 777 764 144 0 10443536361 14225 5zapping-0.10cvs6/plugins/deinterlace/DI_Misc/DI_ScalerBob.c 644 764 144 10711 10417055513 16611 /*/////////////////////////////////////////////////////////////////////////// // $Id: DI_ScalerBob.c,v 1.5 2006/04/12 01:43:39 mschimek Exp $ ///////////////////////////////////////////////////////////////////////////// // Copyright (c) 2000 John Adcock. All rights reserved. // Copyright (C) 2005 Michael Schimek ///////////////////////////////////////////////////////////////////////////// // // This file is subject to the terms of the GNU General Public License as // published by the Free Software Foundation. A copy of this license is // included with this software distribution in the file COPYING. If you // do not have a copy, you may obtain a copy by writing to the Free // Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. // // This software 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 ///////////////////////////////////////////////////////////////////////////// // Change Log // // Date Developer Changes // // 04 Jan 2001 John Adcock Split into separate module // ///////////////////////////////////////////////////////////////////////////// // CVS Log // // $Log: DI_ScalerBob.c,v $ // Revision 1.5 2006/04/12 01:43:39 mschimek // s/CPU_FEATURE_SSE/CPU_FEATURE_SSE_INT. // // Revision 1.4 2005/06/28 19:17:10 mschimek // *** empty log message *** // // Revision 1.3 2005/06/28 00:50:44 mschimek // Added support for x86-64, AltiVec and a scalar version. Cleaned up. // // Revision 1.2.2.4 2005/06/17 02:54:20 mschimek // *** empty log message *** // // Revision 1.2.2.3 2005/05/31 02:40:34 mschimek // *** empty log message *** // // Revision 1.2.2.2 2005/05/20 05:45:14 mschimek // *** empty log message *** // // Revision 1.2.2.1 2005/05/05 09:46:01 mschimek // *** empty log message *** // // Revision 1.2 2005/02/05 22:19:24 mschimek // Completed l18n. // // Revision 1.1 2005/01/08 14:54:23 mschimek // *** empty log message *** // // Revision 1.2 2004/11/15 23:03:19 michael // *** empty log message *** // // Revision 1.1 2004/11/14 15:35:14 michael // *** empty log message *** // // Revision 1.6 2002/06/13 12:10:24 adcockj // Move to new Setings dialog for filers, video deint and advanced settings // // Revision 1.5 2001/11/21 15:21:40 adcockj // Renamed DEINTERLACE_INFO to TDeinterlaceInfo in line with standards // Changed TDeinterlaceInfo structure to have history of pictures. // // Revision 1.4 2001/07/13 16:13:33 adcockj // Added CVS tags and removed tabs // ///////////////////////////////////////////////////////////////////////////*/ #include "windows.h" #include "DS_Deinterlace.h" SIMD_FN_PROTOS (DEINTERLACE_FUNC, DeinterlaceScalerBob); #if !SIMD || (SIMD & (CPU_FEATURE_MMX | CPU_FEATURE_SSE_INT | \ CPU_FEATURE_SSE2 | CPU_FEATURE_ALTIVEC)) BOOL SIMD_NAME (DeinterlaceScalerBob)(TDeinterlaceInfo * pInfo) { uint8_t *Dest; const uint8_t *Src; unsigned int height; if (SIMD == CPU_FEATURE_SSE2) { if (((unsigned long) pInfo->Overlay | (unsigned long) pInfo->PictureHistory[0]->pData | (unsigned long) pInfo->OverlayPitch | (unsigned long) pInfo->InputPitch | (unsigned long) pInfo->LineLength) & 15) return DeinterlaceScalerBob_SSE (pInfo); } Dest = pInfo->Overlay; Src = pInfo->PictureHistory[0]->pData; for (height = pInfo->FieldHeight; height > 0; --height) { copy_line (Dest, Src, pInfo->LineLength); Dest += pInfo->OverlayPitch; Src += pInfo->InputPitch; } vempty (); return TRUE; } #endif #if !SIMD static const DEINTERLACE_METHOD ScalerBobMethod = { sizeof(DEINTERLACE_METHOD), DEINTERLACE_CURRENT_VERSION, N_("Scaler Bob"), NULL, TRUE, FALSE, /* pfnAlgorithm */ NULL, 50, 60, 0, NULL, INDEX_SCALER_BOB, NULL, NULL, NULL, NULL, 1, 0, 0, -1, NULL, 0, FALSE, FALSE, IDH_SCALER_BOB, }; DEINTERLACE_METHOD * DI_ScalerBob_GetDeinterlacePluginInfo (void) { DEINTERLACE_METHOD *m; m = malloc (sizeof (*m)); *m = ScalerBobMethod; m->pfnAlgorithm = SIMD_FN_SELECT (DeinterlaceScalerBob, SCALAR | CPU_FEATURE_MMX | CPU_FEATURE_SSE_INT | CPU_FEATURE_SSE2 | CPU_FEATURE_ALTIVEC); return m; } #endif /* !SIMD */ /* Local Variables: c-basic-offset: 4 End: */ zapping-0.10cvs6/plugins/deinterlace/DI_Misc/DI_OddOnly.c 644 764 144 11324 10417055532 16327 /*/////////////////////////////////////////////////////////////////////////// // $Id: DI_OddOnly.c,v 1.5 2006/04/12 01:43:54 mschimek Exp $ ///////////////////////////////////////////////////////////////////////////// // Copyright (c) 2000 John Adcock. All rights reserved. // Copyright (C) 2005 Michael Schimek ///////////////////////////////////////////////////////////////////////////// // // This file is subject to the terms of the GNU General Public License as // published by the Free Software Foundation. A copy of this license is // included with this software distribution in the file COPYING. If you // do not have a copy, you may obtain a copy by writing to the Free // Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. // // This software 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 ///////////////////////////////////////////////////////////////////////////// // Change Log // // Date Developer Changes // // 04 Jan 2001 John Adcock Split into separate module // ///////////////////////////////////////////////////////////////////////////// // CVS Log // // $Log: DI_OddOnly.c,v $ // Revision 1.5 2006/04/12 01:43:54 mschimek // s/CPU_FEATURE_SSE/CPU_FEATURE_SSE_INT. // // Revision 1.4 2005/06/28 19:17:10 mschimek // *** empty log message *** // // Revision 1.3 2005/06/28 00:50:55 mschimek // Added support for x86-64, AltiVec and a scalar version. Cleaned up. // // Revision 1.2.2.4 2005/06/17 02:54:20 mschimek // *** empty log message *** // // Revision 1.2.2.3 2005/05/31 02:40:34 mschimek // *** empty log message *** // // Revision 1.2.2.2 2005/05/20 05:45:14 mschimek // *** empty log message *** // // Revision 1.2.2.1 2005/05/05 09:46:01 mschimek // *** empty log message *** // // Revision 1.2 2005/02/05 22:19:43 mschimek // Completed l18n. // // Revision 1.1 2005/01/08 14:54:23 mschimek // *** empty log message *** // // Revision 1.2 2004/11/15 23:03:19 michael // *** empty log message *** // // Revision 1.1 2004/11/14 15:35:14 michael // *** empty log message *** // // Revision 1.7 2002/06/13 12:10:24 adcockj // Move to new Setings dialog for filers, video deint and advanced settings // // Revision 1.6 2001/11/22 13:32:04 adcockj // Finished changes caused by changes to TDeinterlaceInfo - Compiles // // Revision 1.5 2001/11/21 15:21:40 adcockj // Renamed DEINTERLACE_INFO to TDeinterlaceInfo in line with standards // Changed TDeinterlaceInfo structure to have history of pictures. // // Revision 1.4 2001/07/13 16:13:33 adcockj // Added CVS tags and removed tabs // ///////////////////////////////////////////////////////////////////////////*/ #include "windows.h" #include "DS_Deinterlace.h" SIMD_FN_PROTOS (DEINTERLACE_FUNC, DeinterlaceOddOnly); #if !SIMD || (SIMD & (CPU_FEATURE_MMX | CPU_FEATURE_SSE_INT | \ CPU_FEATURE_SSE2 | CPU_FEATURE_ALTIVEC)) BOOL SIMD_NAME (DeinterlaceOddOnly) (TDeinterlaceInfo * pInfo) { uint8_t *Dest; const uint8_t *Src; unsigned int height; if (pInfo->PictureHistory[0]->Flags & PICTURE_INTERLACED_EVEN) return FALSE; if (SIMD == CPU_FEATURE_SSE2) { if (((unsigned long) pInfo->Overlay | (unsigned long) pInfo->PictureHistory[0]->pData | (unsigned long) pInfo->OverlayPitch | (unsigned long) pInfo->InputPitch | (unsigned long) pInfo->LineLength) & 15) return DeinterlaceOddOnly_SSE (pInfo); } Dest = pInfo->Overlay; Src = pInfo->PictureHistory[0]->pData; /* copy latest field's rows to overlay, resulting in a half-height image. */ for (height = pInfo->FieldHeight; height > 0; --height) { copy_line (Dest, Src, pInfo->LineLength); Dest += pInfo->OverlayPitch; Src += pInfo->InputPitch; } vempty (); return TRUE; } #endif #if !SIMD static const DEINTERLACE_METHOD OddOnlyMethod = { sizeof(DEINTERLACE_METHOD), DEINTERLACE_CURRENT_VERSION, N_("Odd Scanlines Only"), "Odd", TRUE, FALSE, /* pfnAlgorithm */ NULL, 25, 30, 0, NULL, INDEX_ODD_ONLY, NULL, NULL, NULL, NULL, 1, 0, 0, -1, NULL, 0, FALSE, FALSE, IDH_ODD, }; DEINTERLACE_METHOD * DI_OddOnly_GetDeinterlacePluginInfo (void) { DEINTERLACE_METHOD *m; m = malloc (sizeof (*m)); *m = OddOnlyMethod; m->pfnAlgorithm = SIMD_FN_SELECT (DeinterlaceOddOnly, SCALAR | CPU_FEATURE_MMX | CPU_FEATURE_SSE_INT | CPU_FEATURE_SSE2 | CPU_FEATURE_ALTIVEC); return m; } #endif /* !SIMD */ /* Local Variables: c-basic-offset: 4 End: */ zapping-0.10cvs6/plugins/deinterlace/DI_Misc/DI_MoComp2.c 644 764 144 27212 10417055542 16237 /*/////////////////////////////////////////////////////////////////////////// // $Id: DI_MoComp2.c,v 1.5 2006/04/12 01:44:02 mschimek Exp $ ///////////////////////////////////////////////////////////////////////////// // Copyright (c) 2003 Tom Barry & John Adcock. All rights reserved. // Copyright (c) 2005 Michael H. Schimek ///////////////////////////////////////////////////////////////////////////// // // This file is subject to the terms of the GNU General Public License as // published by the Free Software Foundation. A copy of this license is // included with this software distribution in the file COPYING. If you // do not have a copy, you may obtain a copy by writing to the Free // Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. // // This software 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 // // (From Tom Barry) // Also, this program is "Philanthropy-Ware". That is, if you like it and // feel the need to reward or inspire the author then please feel free (but // not obligated) to consider joining or donating to the Electronic Frontier // Foundation. This will help keep cyber space free of barbed wire and // bullsh*t. See www.eff.org for details ///////////////////////////////////////////////////////////////////////////// // CVS Log // // $Log: DI_MoComp2.c,v $ // Revision 1.5 2006/04/12 01:44:02 mschimek // s/CPU_FEATURE_SSE/CPU_FEATURE_SSE_INT. // // Revision 1.4 2005/07/29 17:39:30 mschimek // *** empty log message *** // // Revision 1.3 2005/06/28 19:17:10 mschimek // *** empty log message *** // // Revision 1.2 2005/06/28 00:48:07 mschimek // New file integrating all the code formerly in // plugins/deinterlace/DI_MoComp2. Converted the MMX inline asm to vector // intrinsics. Added support for 3DNow, SSE2, x86-64 and AltiVec. Cleaned // up. // // Revision 1.1.2.5 2005/06/17 02:54:20 mschimek // *** empty log message *** // // Revision 1.1.2.4 2005/05/31 02:40:34 mschimek // *** empty log message *** // // Revision 1.1.2.3 2005/05/20 05:45:14 mschimek // *** empty log message *** // // Revision 1.1.2.2 2005/05/17 19:58:32 mschimek // *** empty log message *** // // Revision 1.1.2.1 2005/05/05 09:46:01 mschimek // *** empty log message *** // // Revision 1.3 2005/02/05 22:18:27 mschimek // Completed l18n. // // Revision 1.2 2005/01/31 07:03:38 mschimek // Don\'t define size_t or we run into conflicts with system headers. // // Revision 1.1 2005/01/08 14:33:33 mschimek // TomsMoCompMethod, MoComp2Method, VideoWeaveMethod, VideoBobMethod, // TwoFrameMethod, OldGameMethod, Greedy2FrameMethod, GreedyMethod, // DI_GreedyHSettings: Localized. // // Revision 1.3 2003/06/17 12:46:28 adcockj // Added Help for new deinterlace methods // // Revision 1.2 2003/03/05 13:55:20 adcockj // Allow SSE optimizations // // Revision 1.1 2003/01/02 13:15:00 adcockj // Added new plug-ins ready for developement by copying TomsMoComp and Gamma // // // Log: DI_TomsMoComp.c,v // Revision 1.5 2002/12/10 16:32:19 adcockj // Fix StrangeBob for MMX // // Revision 1.4 2002/11/26 21:32:14 adcockj // Made new strange bob method optional // // Revision 1.3 2002/07/08 18:16:43 adcockj // final fixes fro alpha 3 // // Revision 1.2 2002/07/08 17:44:58 adcockj // Corrected Settings messages // // Revision 1.1 2002/07/07 20:07:24 trbarry // First cut at TomsMoComp, motion compensated deinterlace // // Revision 1.0 2002/05/04 16:13:33 trbarry // ///////////////////////////////////////////////////////////////////////////*/ #include "windows.h" #include SIMD_FN_PROTOS (DEINTERLACE_FUNC, DeinterlaceMoComp2); #if SIMD & (CPU_FEATURE_MMX | CPU_FEATURE_3DNOW | \ CPU_FEATURE_SSE_INT | CPU_FEATURE_SSE2 | CPU_FEATURE_SSE3 | \ CPU_FEATURE_ALTIVEC) static void simple_bob (uint8_t * pDest, const uint8_t * pBob, unsigned long dst_bpl, unsigned long src_bpl) { vu8 b, e; b = vload (pBob, 0); /* Copy line of previous field. */ vstorent (pDest, 0, b); e = vload (pBob, src_bpl); /* Estimate line of this field. */ vstorent (pDest, dst_bpl, fast_vavgu8 (b, e)); } BOOL SIMD_NAME (DeinterlaceMoComp2) (TDeinterlaceInfo *pInfo) { uint8_t *Dest; const uint8_t *F4; const uint8_t *F3; const uint8_t *F2; const uint8_t *F1; unsigned int byte_width; unsigned int height; unsigned long dst_bpl; unsigned long src_bpl; unsigned long dst_padding; unsigned long src_padding1; unsigned long src_padding2; if (SIMD & (CPU_FEATURE_SSE2 | CPU_FEATURE_SSE3)) { if (((unsigned long) pInfo->Overlay | (unsigned long) pInfo->PictureHistory[0]->pData | (unsigned long) pInfo->PictureHistory[1]->pData | (unsigned long) pInfo->PictureHistory[2]->pData | (unsigned long) pInfo->PictureHistory[3]->pData | (unsigned long) pInfo->OverlayPitch | (unsigned long) pInfo->InputPitch | (unsigned long) pInfo->LineLength) & 15) return DeinterlaceMoComp2_SSE (pInfo); } byte_width = pInfo->LineLength; dst_bpl = pInfo->OverlayPitch; src_bpl = pInfo->InputPitch; /* dest src (F3) odd src (F3) even 0 F2.0 (F3.0*) F3.0 1 { F3.0 F2.0 (F3.0*) 2 { weave.0 (F1|3.n|n+1 + F2.n+1 + F4.n+1) F3.1 } 3 F3.1 weave.1 (F1|3.n|n+1 + F2.n + F4.n) } 4 weave.1 F3.2 h-3 F3.h/2-2 weave.h/2-2 h-2 F2.h/2-1 (F3.h/2-1*) F3.h/2-1 h-1 F3.h/2-1 F2.h/2-1 (F3.h/2-1*) F4 next field, opposite parity F3 this field F2 previous field, opposite parity F1 previous field, same parity h frame height (*) Actual data stored here. Why? Ask Tom. :-) */ Dest = (uint8_t *) pInfo->Overlay; F4 = (const uint8_t *) pInfo->PictureHistory[0]->pData; F3 = (const uint8_t *) pInfo->PictureHistory[1]->pData; F2 = (const uint8_t *) pInfo->PictureHistory[2]->pData; F1 = (const uint8_t *) pInfo->PictureHistory[3]->pData; if (pInfo->PictureHistory[1]->Flags & PICTURE_INTERLACED_ODD) { copy_line (Dest, F3, byte_width); Dest += dst_bpl; } else { copy_line_pair (Dest, F3, byte_width, dst_bpl); Dest += dst_bpl * 2; F3 += src_bpl; F1 += src_bpl; } /* We start in field row 1, no access in first column. */ F4 += src_bpl + sizeof (vu8); F2 += src_bpl + sizeof (vu8); F1 += sizeof (vu8); /* We write two frame lines in parallel, incrementing Dest except after the last column. */ dst_padding = dst_bpl * 2 - byte_width + sizeof (vu8); /* We read one field line, incrementing the pointer except after the last column. */ src_padding1 = src_bpl - byte_width + sizeof (vu8); /* We read one field line and skip over first and last column. */ src_padding2 = src_padding1 + sizeof (vu8); /* All but first and last field line where we cannot read the line above and below. */ for (height = pInfo->FieldHeight - 2; height > 0; --height) { vu8 a, b, c, d, e, f; unsigned int count; /* Simple bob first column. */ simple_bob (Dest, F3, dst_bpl, src_bpl); F3 += sizeof (vu8); Dest += sizeof (vu8); /* All but first and last column where we cannot read the pixels left and right. */ for (count = byte_width / sizeof (vu8) - 2; count > 0; --count) { vu8 diff_af, diff_cd, diff_be; vu8 avg_af, avg_cd, avg_be; vu8 best, diag, bob, weave; vu8 mm1, mm2, mm4, mm6, next, prev, above, below; v32 tm, cm, bm; /* StrangeBob */ /*/////////////////////////////////////////////////////////////// // This implements the algorithm described in: // T. Chen, H.R. Wu; & Z.H. Yu, // "Efficient deinterlacing algorithm using edge-based line // average interpolation", // Optical Engineering, Volume 39, Issue 8, (2000) ///////////////////////////////////////////////////////////////*/ /* First, get and save our possible Bob values. Assume our pixels are layed out as follows with x the calc'd bob value and the other pixels are from the current field. a b c current field (F3.n) x calculated line (F2.n) d e f current field (F3.n+1) */ /* XXX could calculate a, d from b, e of previous loop and integrate first 8/16 bytes into the loop. */ uload2t (&a, &b, &c, F3, 0); uload2t (&d, &e, &f, F3, src_bpl); F3 += sizeof (vu8); diff_af = vabsdiffu8 (a, f); avg_af = fast_vavgu8 (a, f); diff_cd = vabsdiffu8 (c, d); avg_cd = fast_vavgu8 (c, d); /* Copy line of previous field. */ vstorent (Dest, 0, b); mm4 = fast_vavgu8 (vabsdiffu8 (b, d), vabsdiffu8 (c, e)); mm6 = fast_vavgu8 (vabsdiffu8 (a, e), vabsdiffu8 (b, f)); mm1 = (vu8) vcmpleu8 (mm6, mm4); best = vsel (mm1, diff_af, diff_cd); diag = vsel (mm1, avg_af, avg_cd); diff_be = vabsdiffu8 (b, e); avg_be = fast_vavgu8 (b, e); mm2 = (vu8) vcmpleu8 (diff_be, best); /* we only want luma from diagonals */ mm2 = vor (mm2, (vu8) UVMask); mm1 = (vu8) vcmpleu8 (diff_be, vsplatu8_15); /* we let bob through always if diff is small */ mm1 = vor (mm1, mm2); bob = vsel (mm1, avg_be, diag); /* SimpleWeave */ next = vload (F4, 0); F4 += sizeof (vu8); prev = vload (F2, 0); F2 += sizeof (vu8); /* "movement" in the centre */ cm = (v32) vabsdiffu8 (prev, next); weave = fast_vavgu8 (prev, next); /* operate only on luma as we will always bob the chroma */ cm = (v32) yuyv2yy ((vu8) cm); above = vload (F1, 0); below = vload (F1, src_bpl); F1 += sizeof (vu8); /* "movement" in the top and bottom btw curr and prev frame */ tm = (v32) yuyv2yy (vabsdiffu8 (b, above)); bm = (v32) yuyv2yy (vabsdiffu8 (e, below)); /* 0xff where movement (xm > 15) in either of *two* pixels */ tm = (v32) vcmpnz32 ((v32) vsubsu8 ((vu8) tm, vsplatu8_15)); cm = (v32) vcmpnz32 ((v32) vsubsu8 ((vu8) cm, vsplatu8_15)); bm = (v32) vcmpnz32 ((v32) vsubsu8 ((vu8) bm, vsplatu8_15)); mm2 = (vu8) vand (tm, bm); /* top and bottom moving */ mm1 = vor ((vu8) cm, mm2); /* where we should bob */ mm1 = vor (mm1, (vu8) UVMask); /* Our value for the line of this field. */ vstorent (Dest, dst_bpl, vsel (mm1, bob, weave)); Dest += sizeof (vu8); } /* Simple bob last column. */ simple_bob (Dest, F3, dst_bpl, src_bpl); F4 += src_padding2; F3 += src_padding1; F2 += src_padding2; F1 += src_padding2; Dest += dst_padding; } /* Remaining lines. */ if (pInfo->PictureHistory[1]->Flags & PICTURE_INTERLACED_ODD) { copy_line (Dest, F3, byte_width); Dest += dst_bpl; F3 += src_bpl; } copy_line_pair (Dest, F3, byte_width, dst_bpl); vempty (); return TRUE; } #elif !SIMD static const DEINTERLACE_METHOD MoComp2Method = { sizeof(DEINTERLACE_METHOD), DEINTERLACE_CURRENT_VERSION, N_("Video (MoComp2)"), "MoComp2", FALSE, FALSE, /* pfnAlgorithm */ NULL, 50, 60, 0, NULL, INDEX_VIDEO_MOCOMP2, NULL, NULL, NULL, NULL, 4, /* number fields needed */ 0, 0, 0, NULL, 0, FALSE, FALSE, IDH_MOCOMP2, }; DEINTERLACE_METHOD * DI_MoComp2_GetDeinterlacePluginInfo (void) { DEINTERLACE_METHOD *m; DEINTERLACE_FUNC *f; m = NULL; f = SIMD_FN_SELECT (DeinterlaceMoComp2, CPU_FEATURE_MMX | CPU_FEATURE_3DNOW | CPU_FEATURE_SSE_INT | CPU_FEATURE_SSE2 | CPU_FEATURE_SSE3 | CPU_FEATURE_ALTIVEC); if (f) { m = malloc (sizeof (*m)); *m = MoComp2Method; m->pfnAlgorithm = f; } return m; } #endif /* !SIMD */ /* Local Variables: c-basic-offset: 4 End: */ zapping-0.10cvs6/plugins/deinterlace/DI_Misc/DI_TwoFrame.c 644 764 144 27412 10417055471 16512 /*/////////////////////////////////////////////////////////////////////////// // $Id: DI_TwoFrame.c,v 1.6 2006/04/12 01:43:21 mschimek Exp $ ///////////////////////////////////////////////////////////////////////////// // Copyright (c) 2000 Steven Grimm. All rights reserved. ///////////////////////////////////////////////////////////////////////////// // // This file is subject to the terms of the GNU General Public License as // published by the Free Software Foundation. A copy of this license is // included with this software distribution in the file COPYING. If you // do not have a copy, you may obtain a copy by writing to the Free // Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. // // This software 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 /////////////////////////////////////////////////////////////////////////////// // Change Log // // Date Developer Changes // // 30 Dec 2000 Mark Rejhon Split into separate module // ///////////////////////////////////////////////////////////////////////////// // CVS Log // // $Log: DI_TwoFrame.c,v $ // Revision 1.6 2006/04/12 01:43:21 mschimek // s/CPU_FEATURE_SSE/CPU_FEATURE_SSE_INT. // // Revision 1.5 2005/06/28 19:17:10 mschimek // *** empty log message *** // // Revision 1.4 2005/06/28 00:47:43 mschimek // Cleaned up. // Replaced longs by ints for proper operation on LP64 machines. Code // assumes option values cast to int. // AltiVec compile fixes. // // Revision 1.3.2.5 2005/06/17 02:54:20 mschimek // *** empty log message *** // // Revision 1.3.2.4 2005/05/31 02:40:34 mschimek // *** empty log message *** // // Revision 1.3.2.3 2005/05/20 05:45:14 mschimek // *** empty log message *** // // Revision 1.3.2.2 2005/05/17 19:58:32 mschimek // *** empty log message *** // // Revision 1.3.2.1 2005/05/05 09:46:01 mschimek // *** empty log message *** // // Revision 1.3 2005/03/30 21:26:54 mschimek // Integrated and converted the MMX code to vector intrinsics. // // Revision 1.2 2005/02/05 22:19:14 mschimek // Completed l18n. // // Revision 1.1 2005/01/08 14:34:04 mschimek // TomsMoCompMethod, MoComp2Method, VideoWeaveMethod, VideoBobMethod, // TwoFrameMethod, OldGameMethod, Greedy2FrameMethod, GreedyMethod, // DI_GreedyHSettings: Localized. // // Revision 1.2 2004/11/15 23:03:19 michael // *** empty log message *** // // Revision 1.1 2004/11/14 15:35:14 michael // *** empty log message *** // // Revision 1.6 2002/06/18 19:46:07 adcockj // Changed appliaction Messages to use WM_APP instead of WM_USER // // Revision 1.5 2002/06/13 12:10:24 adcockj // Move to new Setings dialog for filers, video deint and advanced settings // // Revision 1.4 2001/07/13 16:13:33 adcockj // Added CVS tags and removed tabs // ///////////////////////////////////////////////////////////////////////////*/ #include "windows.h" #include "DS_Deinterlace.h" extern int TwoFrameTemporalTolerance; extern int TwoFrameSpatialTolerance; SIMD_FN_PROTOS (DEINTERLACE_FUNC, DeinterlaceFieldTwoFrame); #if SIMD & (CPU_FEATURE_MMX | CPU_FEATURE_3DNOW | \ CPU_FEATURE_SSE_INT | CPU_FEATURE_SSE2 | CPU_FEATURE_ALTIVEC) /*///////////////////////////////////////////////////////////////////////////// // Deinterlace the latest field, attempting to weave wherever it won't cause // visible artifacts. // // The data from the most recently captured field is always copied to the // overlay verbatim. For the data from the previous field, the following // algorithm is applied to each pixel. // // We use the following notation for the top, middle, and bottom pixels // of concern: // // Field 1 | Field 2 | Field 3 | Field 4 | // | T0 | | T1 | scanline we copied in last iteration // M0 | | M1 | | interm. scanline from altern. field // | B0 | | B1 | scanline we just copied // // We will weave M1 into the image if any of the following is true: // - M1 is similar to either B1 or T1. This indicates that no weave // artifacts would be visible. The SpatialTolerance setting controls // how far apart the luminances can be before pixels are considered // non-similar. // - T1 and B1 and M1 are old. In that case any weave artifact that // appears isn't due to fast motion, since it was there in the previous // frame too. By "old" I mean similar to their counterparts in the // previous frame; TemporalTolerance controls the maximum squared // luminance difference above which a pixel is considered "new". // // Pixels are processed 4 at a time using MMX instructions. // // SQUARING NOTE: // We square luminance differences to amplify the effects of large // differences and to avoid dealing with negative differences. Unfortunately, // we can't compare the square of difference directly against a threshold, // thanks to the lack of an MMX unsigned compare instruction. The // problem is that if we had two pixels with luminance 0 and 255, // the difference squared would be 65025, which is a negative // 16-bit signed value and would thus compare less than a threshold. // We get around this by dividing all the luminance values by two before // squaring them; this results in an effective maximum luminance // difference of 127, whose square (16129) is safely comparable. */ static always_inline v16 cmpsqdiff (v16 a, v16 b, v16 thresh) { v16 t; vu16 m; #if SIMD == CPU_FEATURE_ALTIVEC t = vsubs16 (a, b); m = vmullo16 (t, t); return (v16) vcmpgtu16 (m, (vu16) thresh); #else /* MMX/SSE/SSE2 has no cmpgtu */ t = vsr16 (vsubs16 (a, b), 1); m = vmullo16 (t, t); return (v16) vcmpgt16 ((v16) m, thresh); #endif } BOOL SIMD_NAME (DeinterlaceFieldTwoFrame) (TDeinterlaceInfo *pInfo) { v16 qwSpatialTolerance; v16 qwTemporalTolerance; uint8_t *Dest; const uint8_t *YVal0; const uint8_t *YVal1; const uint8_t *OVal0; const uint8_t *OVal1; unsigned int byte_width; unsigned int height; unsigned long dst_padding; unsigned long src_padding; unsigned long dst_bpl; unsigned long src_bpl; if (SIMD == CPU_FEATURE_SSE2) { if (((unsigned long) pInfo->Overlay | (unsigned long) pInfo->PictureHistory[0]->pData | (unsigned long) pInfo->PictureHistory[1]->pData | (unsigned long) pInfo->PictureHistory[2]->pData | (unsigned long) pInfo->PictureHistory[3]->pData | (unsigned long) pInfo->OverlayPitch | (unsigned long) pInfo->InputPitch | (unsigned long) pInfo->LineLength) & 15) return DeinterlaceFieldTwoFrame_SSE (pInfo); } #if SIMD == CPU_FEATURE_ALTIVEC qwSpatialTolerance = vsplat16 (TwoFrameSpatialTolerance); qwTemporalTolerance = vsplat16 (TwoFrameTemporalTolerance); #else /* divide by 4 because of squaring behavior, see above */ qwSpatialTolerance = vsplat16 (TwoFrameSpatialTolerance / 4); qwTemporalTolerance = vsplat16 (TwoFrameTemporalTolerance / 4); #endif byte_width = pInfo->LineLength; dst_bpl = pInfo->OverlayPitch; src_bpl = pInfo->InputPitch; Dest = pInfo->Overlay; YVal0 = pInfo->PictureHistory[0]->pData; YVal1 = pInfo->PictureHistory[1]->pData; OVal0 = pInfo->PictureHistory[2]->pData; OVal1 = pInfo->PictureHistory[3]->pData; /* copy first even line no matter what, and the first odd line if we're processing an odd field. */ if (pInfo->PictureHistory[0]->Flags & PICTURE_INTERLACED_ODD) { copy_line (Dest, YVal1, byte_width); Dest += dst_bpl; YVal1 += src_bpl; OVal1 += src_bpl; } copy_line (Dest, YVal0, byte_width); Dest += dst_bpl; dst_padding = dst_bpl * 2 - byte_width; src_padding = src_bpl - byte_width; for (height = pInfo->FieldHeight - 1; height > 0; --height) { unsigned int count; for (count = byte_width / sizeof (vu8); count > 0; --count) { vu8 T1, B1, M1, avg, mm0; v16 lum_T0, lum_B0, lum_M0; v16 lum_T1, lum_B1, lum_M1; v16 mm3, mm4, mm5, mm7; T1 = vload (YVal0, 0); B1 = vload (YVal0, src_bpl); YVal0 += sizeof (vu8); /* Always use the most recent data verbatim. */ vstorent (Dest, dst_bpl, B1); avg = fast_vavgu8 (T1, B1); M1 = vload (YVal1, 0); YVal1 += sizeof (vu8); lum_T1 = yuyv2yy (T1); lum_B1 = yuyv2yy (B1); lum_M1 = yuyv2yy (M1); /* Find out how different T1 and M1 are. */ mm3 = cmpsqdiff (lum_T1, lum_M1, qwSpatialTolerance); /* Find out how different B1 and M1 are. */ mm4 = cmpsqdiff (lum_B1, lum_M1, qwSpatialTolerance); /* We care about cases where M1 isn't different from its neighbors T1 and B1. */ mm3 = vnand (mm3, mm4); lum_M0 = yuyv2yy (vload (OVal1, 0)); OVal1 += sizeof (vu8); /* Find out whether M1 is new. "New" means the square of // the luminance difference between M1 and M0 is less than // the temporal tolerance. */ mm7 = cmpsqdiff (lum_M1, lum_M0, qwTemporalTolerance); lum_T0 = yuyv2yy (vload (OVal0, 0)); lum_B0 = yuyv2yy (vload (OVal0, src_bpl)); OVal0 += sizeof (vu8); /* Find out whether T1 is new. */ mm4 = cmpsqdiff (lum_T1, lum_T0, qwTemporalTolerance); /* Find out whether B1 is new. */ mm5 = cmpsqdiff (lum_B1, lum_B0, qwTemporalTolerance); /* We care about cases where M1 is old and either T1 or B1 is old. */ mm4 = vnor (mm7, vor (mm4, mm5)); /* Now figure out where we're going to weave (M1) and where // we're going to bob (avg). We'll weave if all pixels are // old or M1 isn't different from both its neighbors. */ mm0 = (vu8) vor (mm4, mm3); mm0 = vsel (mm0, M1, avg); vstorent (Dest, 0, mm0); Dest += sizeof (vu8); } YVal0 += src_padding; YVal1 += src_padding; OVal0 += src_padding; OVal1 += src_padding; Dest += dst_padding; } /* Copy last odd line if we're processing an even field. */ if (pInfo->PictureHistory[0]->Flags & PICTURE_INTERLACED_EVEN) { copy_line (Dest, YVal1, byte_width); } vempty (); return TRUE; } #elif !SIMD int TwoFrameTemporalTolerance = 300; int TwoFrameSpatialTolerance = 600; /*////////////////////////////////////////////////////////////////////////// // Start of Settings related code //////////////////////////////////////////////////////////////////////////*/ static const SETTING DI_TwoFrameSettings [] = { { N_("2 Frame Spatial Tolerance"), SLIDER, 0, &TwoFrameSpatialTolerance, 600, 0, 5000, 10, 1, NULL, "Deinterlace", "TwoFrameSpatialTolerance", NULL, }, { N_("2 Frame Temporal Tolerance"), SLIDER, 0, &TwoFrameTemporalTolerance, 300, 0, 5000, 10, 1, NULL, "Deinterlace", "TwoFrameTemporalTolerance", NULL, }, }; static const DEINTERLACE_METHOD TwoFrameMethod = { sizeof (DEINTERLACE_METHOD), DEINTERLACE_CURRENT_VERSION, N_("Video Deinterlace (2-Frame)"), "2-Frame", FALSE, FALSE, /* pfnAlgorithm */ NULL, 50, 60, N_ELEMENTS (DI_TwoFrameSettings), DI_TwoFrameSettings, INDEX_VIDEO_2FRAME, NULL, NULL, NULL, NULL, 4, 0, 0, 0, NULL, 0, FALSE, FALSE, IDH_2FRAME, }; DEINTERLACE_METHOD * DI_TwoFrame_GetDeinterlacePluginInfo (void) { DEINTERLACE_FUNC *f; DEINTERLACE_METHOD *m; m = NULL; f = SIMD_FN_SELECT (DeinterlaceFieldTwoFrame, CPU_FEATURE_MMX | CPU_FEATURE_3DNOW | CPU_FEATURE_SSE_INT | CPU_FEATURE_SSE2 | CPU_FEATURE_ALTIVEC); if (f) { m = malloc (sizeof (*m)); *m = TwoFrameMethod; m->pfnAlgorithm = f; } return m; } #endif /* !SIMD */ /* Local Variables: c-basic-offset: 4 End: */ zapping-0.10cvs6/plugins/deinterlace/DI_Misc/DI_EvenOnly.c 644 764 144 11213 10417055572 16517 /*/////////////////////////////////////////////////////////////////////////// // $Id: DI_EvenOnly.c,v 1.5 2006/04/12 01:44:26 mschimek Exp $ ///////////////////////////////////////////////////////////////////////////// // Copyright (c) 2000 John Adcock. All rights reserved. // Copyright (C) 2005 Michael H. Schimek ///////////////////////////////////////////////////////////////////////////// // // This file is subject to the terms of the GNU General Public License as // published by the Free Software Foundation. A copy of this license is // included with this software distribution in the file COPYING. If you // do not have a copy, you may obtain a copy by writing to the Free // Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. // // This software 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 ///////////////////////////////////////////////////////////////////////////// // Change Log // // Date Developer Changes // // 04 Jan 2001 John Adcock Split into separate module // ///////////////////////////////////////////////////////////////////////////// // CVS Log // // $Log: DI_EvenOnly.c,v $ // Revision 1.5 2006/04/12 01:44:26 mschimek // s/CPU_FEATURE_SSE/CPU_FEATURE_SSE_INT. // // Revision 1.4 2005/06/28 19:17:10 mschimek // *** empty log message *** // // Revision 1.3 2005/06/28 00:51:04 mschimek // Added support for x86-64, AltiVec and a scalar version. Cleaned up. // // Revision 1.2.2.4 2005/06/17 02:54:20 mschimek // *** empty log message *** // // Revision 1.2.2.3 2005/05/31 02:40:34 mschimek // *** empty log message *** // // Revision 1.2.2.2 2005/05/20 05:45:14 mschimek // *** empty log message *** // // Revision 1.2.2.1 2005/05/05 09:46:01 mschimek // *** empty log message *** // // Revision 1.2 2005/02/05 22:20:18 mschimek // Completed l18n. // // Revision 1.1 2005/01/08 14:54:23 mschimek // *** empty log message *** // // Revision 1.2 2004/11/15 23:03:19 michael // *** empty log message *** // // Revision 1.1 2004/11/14 15:35:14 michael // *** empty log message *** // // Revision 1.7 2002/06/13 12:10:24 adcockj // Move to new Setings dialog for filers, video deint and advanced settings // // Revision 1.6 2001/11/22 13:32:03 adcockj // Finished changes caused by changes to TDeinterlaceInfo - Compiles // // Revision 1.5 2001/11/21 15:21:40 adcockj // Renamed DEINTERLACE_INFO to TDeinterlaceInfo in line with standards // Changed TDeinterlaceInfo structure to have history of pictures. // // Revision 1.4 2001/07/13 16:13:33 adcockj // Added CVS tags and removed tabs // ///////////////////////////////////////////////////////////////////////////*/ #include "windows.h" #include "DS_Deinterlace.h" SIMD_FN_PROTOS (DEINTERLACE_FUNC, DeinterlaceEvenOnly); #if !SIMD || (SIMD & (CPU_FEATURE_MMX | CPU_FEATURE_SSE_INT | \ CPU_FEATURE_SSE2 | CPU_FEATURE_ALTIVEC)) BOOL SIMD_NAME (DeinterlaceEvenOnly) (TDeinterlaceInfo * pInfo) { uint8_t *Dest; const uint8_t *Src; unsigned int height; if (pInfo->PictureHistory[0]->Flags & PICTURE_INTERLACED_ODD) return FALSE; if (SIMD == CPU_FEATURE_SSE2) { if (((unsigned long) pInfo->Overlay | (unsigned long) pInfo->PictureHistory[0]->pData | (unsigned long) pInfo->OverlayPitch | (unsigned long) pInfo->InputPitch | (unsigned long) pInfo->LineLength) & 15) return DeinterlaceEvenOnly_SSE (pInfo); } Dest = pInfo->Overlay; Src = pInfo->PictureHistory[0]->pData; for (height = pInfo->FieldHeight; height > 0; --height) { copy_line (Dest, Src, pInfo->LineLength); Dest += pInfo->OverlayPitch; Src += pInfo->InputPitch; } vempty (); return TRUE; } #endif #if !SIMD static const DEINTERLACE_METHOD EvenOnlyMethod = { sizeof(DEINTERLACE_METHOD), DEINTERLACE_CURRENT_VERSION, N_("Even Scanlines Only"), "Even", TRUE, FALSE, /* pfnAlgorithm */ NULL, 25, 30, 0, NULL, INDEX_EVEN_ONLY, NULL, NULL, NULL, NULL, 1, 0, 0, -1, NULL, 0, FALSE, FALSE, IDH_EVEN, }; DEINTERLACE_METHOD * DI_EvenOnly_GetDeinterlacePluginInfo (void) { DEINTERLACE_METHOD *m; m = malloc (sizeof (*m)); *m = EvenOnlyMethod; m->pfnAlgorithm = SIMD_FN_SELECT (DeinterlaceEvenOnly, SCALAR | CPU_FEATURE_MMX | CPU_FEATURE_SSE_INT | CPU_FEATURE_SSE2 | CPU_FEATURE_ALTIVEC); return m; } #endif /* !SIMD */ /* Local Variables: c-basic-offset: 4 End: */ zapping-0.10cvs6/plugins/deinterlace/DI_Misc/DI_VideoWeave.c 644 764 144 24773 10417055450 17030 /*/////////////////////////////////////////////////////////////////////////// // $Id: DI_VideoWeave.c,v 1.6 2006/04/12 01:43:04 mschimek Exp $ ///////////////////////////////////////////////////////////////////////////// // Copyright (c) 2000 John Adcock, Tom Barry, Steve Grimm All rights reserved. ///////////////////////////////////////////////////////////////////////////// // // This file is subject to the terms of the GNU General Public License as // published by the Free Software Foundation. A copy of this license is // included with this software distribution in the file COPYING. If you // do not have a copy, you may obtain a copy by writing to the Free // Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. // // This software 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 ///////////////////////////////////////////////////////////////////////////// // Change Log // // Date Developer Changes // // 30 Dec 2000 Mark Rejhon Split into separate module // ///////////////////////////////////////////////////////////////////////////// // CVS Log // // $Log: DI_VideoWeave.c,v $ // Revision 1.6 2006/04/12 01:43:04 mschimek // s/CPU_FEATURE_SSE/CPU_FEATURE_SSE_INT. // // Revision 1.5 2005/06/28 19:17:10 mschimek // *** empty log message *** // // Revision 1.4 2005/06/28 00:48:17 mschimek // Cleaned up. // Replaced longs by ints for proper operation on LP64 machines. Code // assumes option values cast to int. // // Revision 1.3.2.4 2005/06/17 02:54:20 mschimek // *** empty log message *** // // Revision 1.3.2.3 2005/05/31 02:40:34 mschimek // *** empty log message *** // // Revision 1.3.2.2 2005/05/20 05:45:14 mschimek // *** empty log message *** // // Revision 1.3.2.1 2005/05/05 09:46:01 mschimek // *** empty log message *** // // Revision 1.3 2005/03/30 21:26:06 mschimek // Integrated and converted the MMX code to vector intrinsics. // // Revision 1.2 2005/02/05 22:18:54 mschimek // Completed l18n. // // Revision 1.1 2005/01/08 14:33:42 mschimek // TomsMoCompMethod, MoComp2Method, VideoWeaveMethod, VideoBobMethod, // TwoFrameMethod, OldGameMethod, Greedy2FrameMethod, GreedyMethod, // DI_GreedyHSettings: Localized. // // Revision 1.2 2004/11/15 23:03:19 michael // *** empty log message *** // // Revision 1.1 2004/11/14 15:35:15 michael // *** empty log message *** // // Revision 1.6 2002/06/18 19:46:08 adcockj // Changed appliaction Messages to use WM_APP instead of WM_USER // // Revision 1.5 2002/06/13 12:10:25 adcockj // Move to new Setings dialog for filers, video deint and advanced settings // // Revision 1.4 2001/07/13 16:13:33 adcockj // Added CVS tags and removed tabs // ///////////////////////////////////////////////////////////////////////////*/ #include "windows.h" #include "DS_Deinterlace.h" extern int TemporalTolerance; extern int SpatialTolerance; extern int SimilarityThreshold; SIMD_FN_PROTOS (DEINTERLACE_FUNC, DeinterlaceFieldWeave); #if SIMD & (CPU_FEATURE_MMX | CPU_FEATURE_3DNOW | \ CPU_FEATURE_SSE_INT | CPU_FEATURE_SSE2 | CPU_FEATURE_ALTIVEC) BOOL SIMD_NAME (DeinterlaceFieldWeave) (TDeinterlaceInfo * pInfo) { vu16 qwSpatialTolerance; vu16 qwTemporalTolerance; vu16 qwThreshold; uint8_t *Dest; const uint8_t *YVal1; const uint8_t *YVal2; const uint8_t *YVal3; const uint8_t *YVal4; unsigned int byte_width; unsigned int height; unsigned long dst_padding; unsigned long src_padding; unsigned long dst_bpl; unsigned long src_bpl; if (SIMD == CPU_FEATURE_SSE2) { if (((unsigned long) pInfo->Overlay | (unsigned long) pInfo->PictureHistory[0]->pData | (unsigned long) pInfo->PictureHistory[1]->pData | (unsigned long) pInfo->PictureHistory[2]->pData | (unsigned long) pInfo->OverlayPitch | (unsigned long) pInfo->InputPitch | (unsigned long) pInfo->LineLength) & 15) return DeinterlaceFieldWeave_SSE (pInfo); } qwSpatialTolerance = vsplatu16 (SpatialTolerance); qwTemporalTolerance = vsplatu16 (TemporalTolerance); qwThreshold = vsplatu16 (SimilarityThreshold); byte_width = pInfo->LineLength; dst_bpl = pInfo->OverlayPitch; src_bpl = pInfo->InputPitch; Dest = pInfo->Overlay; YVal1 = pInfo->PictureHistory[1]->pData; YVal2 = pInfo->PictureHistory[0]->pData; YVal3 = YVal1 + src_bpl; YVal4 = (const uint8_t *) pInfo->PictureHistory[2]->pData + src_bpl; if (pInfo->PictureHistory[0]->Flags & PICTURE_INTERLACED_EVEN) { copy_line (Dest, YVal2, byte_width); Dest += dst_bpl; YVal2 += src_bpl; } copy_line (Dest, YVal1, byte_width); Dest += dst_bpl; dst_padding = dst_bpl * 2 - byte_width; src_padding = src_bpl - byte_width; for (height = pInfo->FieldHeight - 1; height > 0; --height) { unsigned int count; /* For ease of reading, the comments below assume that we're // operating on an odd field (i.e., that bIsOdd is true). The // exact same processing is done when we operate on an even // field, but the roles of the odd and even fields are reversed. // It's just too cumbersome to explain the algorithm in terms // of "the next odd line if we're doing an odd field, or the // next even line if we're doing an even field" etc. So // wherever you see "odd" or "even" below, keep in mind that // half the time this function is called, those words' meanings // will invert. */ for (count = byte_width / sizeof (vu8); count > 0; --count) { vu8 E1, O, E2, avg, mm0; v16 lum_E1, lum_O, lum_E2, mm5, lum_Oold; vu16 mm3, mm7; E1 = vload (YVal1, 0); YVal1 += sizeof (vu8); lum_E1 = yuyv2yy (E1); E2 = vload (YVal3, 0); YVal3 += sizeof (vu8); lum_E2 = yuyv2yy (E2); /* Copy the even scanline below this one to the overlay buffer, since we'll be adapting the current scanline to the even lines surrounding it. */ vstorent (Dest, dst_bpl, E2); /* Average E1 and E2 for interpolated bobbing. */ avg = fast_vavgu8 (E1, E2); O = vload (YVal2, 0); YVal2 += sizeof (vu8); lum_O = yuyv2yy (O); /* The meat of the work is done here. We want to see // whether this pixel is close in luminosity to ANY of: // its top neighbor, its bottom neighbor, or its // predecessor. To do this without branching, we use MMX' // saturation feature, which gives us Z(x) = x if x>=0, // or 0 if x<0. // // The formula we're computing here is // Z(ST - (E1 - O) ^ 2) + Z(ST - (E2 - O) ^ 2) // + Z(TT - (Oold - O) ^ 2) // where ST is spatial tolerance and TT is temporal tolerance. // The idea is that if a pixel is similar to none of its // neighbors, the resulting value will be pretty low, probably // zero. A high value therefore indicates that the pixel had // a similar neighbor. The pixel in the same position in the // field before last (Oold) is considered a neighbor since we // want to be able to display 1-pixel-high horizontal lines. */ /* ST - (E1 - O) ^ 2, or 0 if that's negative */ mm5 = vsr16 (vsubs16 (lum_E1, lum_O), 1); mm7 = vmullo16 (mm5, mm5); mm7 = vsubsu16 (qwSpatialTolerance, mm7); /* ST - (E2 - O) ^ 2, or 0 if that's negative */ mm5 = vsr16 (vsubs16 (lum_E2, lum_O), 1); mm3 = vmullo16 (mm5, mm5); mm3 = vsubsu16 (qwSpatialTolerance, mm3); mm7 = vaddsu16 (mm7, mm3); lum_Oold = yuyv2yy (vload (YVal4, 0)); YVal4 += sizeof (vu8); /* TT - (Oold - O) ^ 2, or 0 if that's negative */ mm5 = vsr16 (vsubs16 (lum_Oold, lum_O), 1); mm3 = vmullo16 (mm5, mm5); mm3 = vsubsu16 (qwTemporalTolerance, mm3); mm7 = vaddsu16 (mm7, mm3); /* Now compare the similarity totals against our threshold. // The pcmpgtw instruction will populate the target register // with a bunch of mask bits, filling words where the // comparison is true with 1s and ones where it's false with // 0s. A few ANDs and NOTs and an OR later, we have bobbed // values for pixels under the similarity threshold and weaved // ones for pixels over the threshold. */ mm0 = (vu8) vcmpgt16 (mm7, qwThreshold); mm0 = vsel (mm0, O, avg); vstorent (Dest, 0, mm0); Dest += sizeof (vu8); } YVal1 += src_padding; YVal2 += src_padding; YVal3 += src_padding; YVal4 += src_padding; Dest += dst_padding; } /* Copy last odd line if we're processing an odd field. */ if (pInfo->PictureHistory[0]->Flags & PICTURE_INTERLACED_ODD) { copy_line (Dest, YVal2, byte_width); } vempty (); return TRUE; } #elif !SIMD int TemporalTolerance = 300; int SpatialTolerance = 600; int SimilarityThreshold = 25; /*////////////////////////////////////////////////////////////////////////// // Start of Settings related code //////////////////////////////////////////////////////////////////////////*/ static const SETTING DI_VideoWeaveSettings [] = { { N_("Temporal Tolerance"), SLIDER, 0, &TemporalTolerance, 300, 0, 5000, 10, 1, NULL, "Deinterlace", "TemporalTolerance", NULL, }, { N_("Spatial Tolerance"), SLIDER, 0, &SpatialTolerance, 600, 0, 5000, 10, 1, NULL, "Deinterlace", "SpatialTolerance", NULL, }, { N_("Similarity Threshold"), SLIDER, 0, &SimilarityThreshold, 25, 0, 255, 1, 1, NULL, "Deinterlace", "SimilarityThreshold", NULL, }, }; static const DEINTERLACE_METHOD VideoWeaveMethod = { sizeof (DEINTERLACE_METHOD), DEINTERLACE_CURRENT_VERSION, N_("Video Deinterlace (Weave)"), "Weave", FALSE, FALSE, /* pfnAlgorithm */ NULL, 50, 60, N_ELEMENTS (DI_VideoWeaveSettings), DI_VideoWeaveSettings, INDEX_VIDEO_WEAVE, NULL, NULL, NULL, NULL, 3, 0, 0, 0, NULL, 0, FALSE, FALSE, IDH_VIDEOWEAVE, }; DEINTERLACE_METHOD * DI_VideoWeave_GetDeinterlacePluginInfo (void) { DEINTERLACE_METHOD *m; DEINTERLACE_FUNC *f; m = NULL; f = SIMD_FN_SELECT (DeinterlaceFieldWeave, CPU_FEATURE_MMX | CPU_FEATURE_3DNOW | CPU_FEATURE_SSE_INT | CPU_FEATURE_SSE2 | CPU_FEATURE_ALTIVEC); if (f) { m = malloc (sizeof (*m)); *m = VideoWeaveMethod; m->pfnAlgorithm = f; } return m; } #endif /* !SIMD */ /* Local Variables: c-basic-offset: 4 End: */ zapping-0.10cvs6/plugins/deinterlace/DI_Misc/DI_TomsMoComp.c 644 764 144 73060 10417055503 17017 /*/////////////////////////////////////////////////////////////////////////// // $Id: DI_TomsMoComp.c,v 1.5 2006/04/12 01:43:31 mschimek Exp $ ///////////////////////////////////////////////////////////////////////////// // Copyright (c) 2002 Tom Barry. All rights reserved. // Copyright (c) 2005 Michael H. Schimek ///////////////////////////////////////////////////////////////////////////// // // This file is subject to the terms of the GNU General Public License as // published by the Free Software Foundation. A copy of this license is // included with this software distribution in the file COPYING. If you // do not have a copy, you may obtain a copy by writing to the Free // Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. // // This software 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 // // Also, this program is "Philanthropy-Ware". That is, if you like it and // feel the need to reward or inspire the author then please feel free (but // not obligated) to consider joining or donating to the Electronic Frontier // Foundation. This will help keep cyber space free of barbed wire and // bullsh*t. See www.eff.org for details ///////////////////////////////////////////////////////////////////////////// // Change Log // // Date Developer Changes // // 04 May 2002 Tom Barry Added TomsMoComp Deinterlace method // ///////////////////////////////////////////////////////////////////////////// // CVS Log // // $Log: DI_TomsMoComp.c,v $ // Revision 1.5 2006/04/12 01:43:31 mschimek // s/CPU_FEATURE_SSE/CPU_FEATURE_SSE_INT. // // Revision 1.4 2005/07/29 17:39:30 mschimek // *** empty log message *** // // Revision 1.3 2005/06/28 19:17:10 mschimek // *** empty log message *** // // Revision 1.2 2005/06/28 00:47:55 mschimek // New file integrating all the code formerly in // plugins/deinterlace/DI_TomsMoComp. Converted the MMX inline asm to // vector intrinsics. Added support for 3DNow, SSE2, x86-64 and AltiVec. // Cleaned up. All options work now. // // Revision 1.1.2.5 2005/06/17 02:54:20 mschimek // *** empty log message *** // // Revision 1.1.2.4 2005/05/31 02:40:34 mschimek // *** empty log message *** // // Revision 1.1.2.3 2005/05/20 05:45:14 mschimek // *** empty log message *** // // Revision 1.1.2.2 2005/05/17 19:58:32 mschimek // *** empty log message *** // // Revision 1.1.2.1 2005/05/05 09:46:01 mschimek // *** empty log message *** // // Revision 1.2 2005/04/08 15:18:57 michael // *** empty log message *** // // Revision 1.1 2005/04/07 05:52:57 michael // *** empty log message *** // // Revision 1.2 2005/02/05 22:18:17 mschimek // Completed l18n. // // Revision 1.1 2005/01/08 14:33:23 mschimek // TomsMoCompMethod, MoComp2Method, VideoWeaveMethod, VideoBobMethod, // TwoFrameMethod, OldGameMethod, Greedy2FrameMethod, GreedyMethod, // DI_GreedyHSettings: Localized. // // Revision 1.7 2003/06/17 12:46:29 adcockj // Added Help for new deinterlace methods // // Revision 1.6 2003/03/25 10:13:10 laurentg // Allow running of TomsMoComp SSE and 3DNOW methods with Toms'agreement // // Revision 1.5 2002/12/10 16:32:19 adcockj // Fix StrangeBob for MMX // // Revision 1.4 2002/11/26 21:32:14 adcockj // Made new strange bob method optional // // Revision 1.3 2002/07/08 18:16:43 adcockj // final fixes fro alpha 3 // // Revision 1.2 2002/07/08 17:44:58 adcockj // Corrected Settings messages // // Revision 1.1 2002/07/07 20:07:24 trbarry // First cut at TomsMoComp, motion compensated deinterlace // // Revision 1.0 2002/05/04 16:13:33 trbarry // ///////////////////////////////////////////////////////////////////////////*/ #include "windows.h" #include "DS_Deinterlace.h" extern int SearchEffort2; extern int UseStrangeBob2; SIMD_FN_PROTOS (DEINTERLACE_FUNC, DeinterlaceTomsMoComp); #if SIMD & (CPU_FEATURE_MMX | CPU_FEATURE_3DNOW | \ CPU_FEATURE_SSE_INT | CPU_FEATURE_SSE2 | CPU_FEATURE_SSE3 | \ CPU_FEATURE_ALTIVEC) #define USE_VERTICAL_FILTER 0 #define DONT_USE_STRANGE_BOB 0 #define DiffThres vsplatu8_15 static always_inline void simple_bob (uint8_t * pDest, const uint8_t * pBob, unsigned long dst_bpl, unsigned long src_bpl) { if (USE_VERTICAL_FILTER) { vu8 b, e, avg; b = vload (pBob, 0); e = vload (pBob, src_bpl); avg = fast_vavgu8 (b, e); /* halfway between */ vstorent (pDest, 0, fast_vavgu8 (b, avg)); /* 1/4 way */ vstorent (pDest, dst_bpl, fast_vavgu8 (e, avg)); /* 3/4 way */ } else { vu8 b, e; b = vload (pBob, 0); /* Copy line of previous field. */ vstorent (pDest, 0, b); e = vload (pBob, src_bpl); /* Estimate line of this field. */ vstorent (pDest, dst_bpl, fast_vavgu8 (b, e)); } } static always_inline void best_bob (vu8 * set, vu8 * pixels, vu8 * weight, int cont, vu8 a, vu8 b, vu8 c, vu8 d) { vu8 diff1, diff2, mask; diff1 = vabsdiffu8 (a, b); diff2 = vabsdiffu8 (c, d); mask = (vu8) vandnot (vcmpleu8 (diff1, DiffThres), vcmpleu8 (diff2, DiffThres)); if (cont) { *set = vor (*set, mask); *pixels = vsel (mask, fast_vavgu8 (a, b), *pixels); *weight = vsel (mask, diff1, *weight); } else { *set = mask; *pixels = fast_vavgu8 (a, b); *weight = diff1; } } static always_inline void MERGE4PIXavg (vu8 * pixels, vu8 * weight, int cont, vu8 a, vu8 b) { if (cont) { vu8 diff, mask; diff = vabsdiffu8 (a, b); #if SIMD & (CPU_FEATURE_SSE_INT | CPU_FEATURE_SSE2 | \ CPU_FEATURE_SSE3 | CPU_FEATURE_ALTIVEC) /* AVEC: saves one, SSE: three instructions. */ *weight = vminu8 (*weight, diff); mask = (vu8) vcmpeq8 (*weight, diff); *pixels = vsel (mask, vavgu8 (a, b), *pixels); #else mask = (vu8) vcmpleu8 (diff, *weight); *pixels = vsel (mask, fast_vavgu8 (a, b), *pixels); *weight = vsel (mask, diff, *weight); #endif } else { *weight = vabsdiffu8 (a, b); *pixels = fast_vavgu8 (a, b); } } static always_inline void MERGE4PIXavgH (vu8 * pixels, vu8 * weight, int cont, vu8 a, vu8 b, vu8 c, vu8 d) { MERGE4PIXavg (pixels, weight, cont, fast_vavgu8 (a, c), fast_vavgu8 (b, d)); } /* Same average functions as above, except chroma is not considered. Two pair calls and unpair are faster than four regular calls and throwing away chroma results. */ static always_inline void MERGE4PIXavgPair (vu8 * pixels, vu8 * weight, int cont, vu8 a, vu8 b, vu8 c, vu8 d) { #if SIMD == CPU_FEATURE_ALTIVEC const vu8 sel = { 0x00, 0x10, 0x02, 0x12, 0x04, 0x14, 0x06, 0x16, 0x08, 0x18, 0x0A, 0x1A, 0x0C, 0x1C, 0x0E, 0x1E }; a = vec_perm (a, c, sel); b = vec_perm (b, d, sel); #else a = vor (vand (a, vsplat16_255), vsl16 ((vu16) c, 8)); b = vor (vand (b, vsplat16_255), vsl16 ((vu16) d, 8)); #endif MERGE4PIXavg (pixels, weight, cont, a, b); } static always_inline void MERGE4PIXavgHPair (vu8 * pixels, vu8 * weight, int cont, vu8 a, vu8 b, vu8 c, vu8 d, vu8 e, vu8 f, vu8 g, vu8 h) { #if SIMD == CPU_FEATURE_ALTIVEC /* 0xY0UaY1Va */ const vu8 sel = { 0x00, 0x10, 0x02, 0x12, 0x04, 0x14, 0x06, 0x16, 0x08, 0x18, 0x0A, 0x1A, 0x0C, 0x1C, 0x0E, 0x1E }; a = vec_perm (a, e, sel); b = vec_perm (b, f, sel); c = vec_perm (c, g, sel); d = vec_perm (d, h, sel); #else /* 0xVaY1UaY0 */ a = vor (vand (a, vsplat16_255), vsl16 ((vu16) e, 8)); b = vor (vand (b, vsplat16_255), vsl16 ((vu16) f, 8)); c = vor (vand (c, vsplat16_255), vsl16 ((vu16) g, 8)); d = vor (vand (d, vsplat16_255), vsl16 ((vu16) h, 8)); #endif MERGE4PIXavgH (pixels, weight, cont, a, b, c, d); } static always_inline void Unpair (vu8 * pixels, vu8 * weight) { vu8 t, mask; #if SIMD == CPU_FEATURE_ALTIVEC /* 0xY0YaY1Yb */ t = (vu8) vsl16 ((v16) *weight, 8); /* Saves one instruction over vcmpleu because AltiVec has no integer cmple. */ *weight = vminu8 (*weight, t); mask = (vu8) vcmpeq8 (*weight, t); *weight = vor (*weight, (vu8) vsplat16_255); *pixels = vsel (mask, (vu8) vsl16 ((v16) *pixels, 8), *pixels); #elif SIMD & (CPU_FEATURE_SSE_INT | CPU_FEATURE_SSE2 | CPU_FEATURE_SSE3) /* 0xYbY1YaY0 */ t = (vu8) vsru16 ((vu16) *weight, 8); /* Saves three instructions over a second vsel. */ *weight = vminu8 (*weight, t); mask = vcmpeq8 (*weight, t); *weight = vor (*weight, (vu8) vsplat16_255); *pixels = vsel (mask, (vu8) vsru16 ((vu16) *pixels, 8), *pixels); #else /* 0xYbY1YaY0 */ t = (vu8) vsru16 ((vu16) *weight, 8); mask = (vu8) vcmpleu8 (t, *weight); *pixels = vsel (mask, (vu8) vsru16 ((vu16) *pixels, 8), *pixels); /* The vor masks out odd chroma. */ *weight = vor (vsel (mask, t, *weight), vsplat16_m256); #endif } #define SearchLoopOddA2(cont) \ uload2t (&cl1, &cc1, &cr1, pSrcP, src_bpl); \ uload2t (&cl2, &cc2, &cr2, pSrc, src_bpl); \ MERGE4PIXavgPair (&weave, &weave_d, cont, \ cl1, cr2, \ cr1, cl2); #define SearchLoopOddA(cont) \ uload2t (&ul1, &uc1, &ur1, pSrcP, 0); \ uload2t (&dl2, &dc2, &dr2, pSrc, src_bpl * 2); \ MERGE4PIXavgPair (&weave, &weave_d, cont, ul1, dr2, ur1, dl2); \ uload2t (&dl1, &dc1, &dr1, pSrcP, src_bpl * 2); \ uload2t (&ul2, &uc2, &ur2, pSrc, 0); \ MERGE4PIXavgPair (&weave, &weave_d, 1, dl1, ur2, dr1, ul2); #define SearchLoopOddAH2(cont) \ uload2t (&cl1, &cc1, &cr1, pSrcP, src_bpl); \ uload2t (&cl2, &cc2, &cr2, pSrc, src_bpl); \ MERGE4PIXavgHPair (&weave, &weave_d, cont, \ cl1, cc1, cc2, cr2, \ cr1, cc1, cc2, cl2); /* 4 odd v half pels, 3 to left & right. */ #define SearchLoopOddA6(cont) \ uload6t (&ul1, &uc1, &ur1, pSrcP, 0); \ uload6t (&dl2, &dc2, &dr2, pSrc, src_bpl * 2); \ MERGE4PIXavgPair (&weave, &weave_d, cont, ul1, dr2, ur1, dl2); \ uload6t (&dl1, &dc1, &dr1, pSrcP, src_bpl * 2); \ uload6t (&ul2, &uc2, &ur2, pSrc, 0); \ MERGE4PIXavgPair (&weave, &weave_d, 1, dl1, ur2, dr1, ul2); \ uload6t (&cl1, &cc1, &cr1, pSrcP, src_bpl); \ uload6t (&cl2, &cc2, &cr2, pSrc, src_bpl); \ MERGE4PIXavgPair (&weave, &weave_d, 1, cl1, cr2, cr1, cl2); /* Search averages of 2 pixels left and right. */ #define SearchLoopEdgeA(cont) \ uload4t (&ul1, &uc1, &ur1, pSrcP, 0); \ uload4t (&dl2, &dc2, &dr2, pSrc, src_bpl * 2); \ MERGE4PIXavg (&weave, &weave_d, cont, ul1, dr2); \ MERGE4PIXavg (&weave, &weave_d, 1, ur1, dl2); \ uload4t (&dl1, &dc1, &dr1, pSrcP, src_bpl * 2); \ uload4t (&ul2, &uc2, &ur2, pSrc, 0); \ MERGE4PIXavg (&weave, &weave_d, 1, dl1, ur2); \ MERGE4PIXavg (&weave, &weave_d, 1, dr1, ul2); \ uload4t (&cl1, &cc1, &cr1, pSrcP, src_bpl); \ uload4t (&cl2, &cc2, &cr2, pSrc, src_bpl); \ MERGE4PIXavg (&weave, &weave_d, 1, cl1, cr2); \ MERGE4PIXavg (&weave, &weave_d, 1, cr1, cl2); /* Search vertical line and averages, -1,0,+1 */ /* MHS: In principle we could move invocations of this macro after OddA to save the loads, but I'm not sure the order was intentional to give vertical lines an advantage. Reloading may also avoid register spills. */ #define SearchLoopVA(cont) \ dc1 = vload (pSrcP, 2 * src_bpl); \ uc2 = vload (pSrc, 0); \ MERGE4PIXavg (&weave, &weave_d, cont, dc1, uc2); \ uc1 = vload (pSrcP, 0); \ dc2 = vload (pSrc, src_bpl * 2); \ MERGE4PIXavg (&weave, &weave_d, 1, uc1, dc2); static always_inline BOOL Search_Effort_template (TDeinterlaceInfo * pInfo, const int effort, const int use_strange_bob) { uint8_t *pDest; const uint8_t *pSrc; const uint8_t *pSrcP; const uint8_t *pBob; const uint8_t *pBobP; unsigned int byte_width; unsigned int height; unsigned long dst_bpl; unsigned long src_bpl; unsigned long dst_padding; unsigned long src_padding1; unsigned long src_padding2; byte_width = pInfo->LineLength; height = pInfo->FieldHeight; dst_bpl = pInfo->OverlayPitch; src_bpl = pInfo->InputPitch; /* dest src odd src even 0 F3-0 copy F3-0 F4-0 wcopy F3-0 1 F4-0 wcopy F3-0 F3-0 copy F3-0 2 F3-1 copy F3-1 F4-1 weave F1/3-0/1,F2/4-0/1/2 3 F4-1 weave F1/3-1/2,F2/4-0/1/2 F3-1 copy F3-1 4 F3-2 copy F3-2 F4-2 weave F1/3-1/2,F2/4-1/2/3 5 F4-2 weave F1/3-2/3,F2/4-1/2/3 n-3 F3 copy F3-(n/2-2) n-2 F3 copy F3-(n/2-1) F4 wcopy F3-(n/2-1) n-1 F4 wcopy F3-(n/2-1) F3 copy F3-(n/2-1) dest src filter odd src filter even 0 F3-0 copy F3-0 F4-0 wcopy F3-0 1 F4-0 wcopy F3-0 F3-0 weave F3-0/1 2 F3-1 weave F3-1/2 F4-1 weave F3-0/1 3 F4-1 weave F3-1/2 F3-1 weave F3-1/2 4 F3-2 weave F3-2/3 F4-2 weave F3-1/2 5 F4-2 weave F3-2/3 n-3 F3 copy F3-(n/2-2) n-2 F3 copy F3-(n/2-1) F4 wcopy F3-(n/2-1) n-1 F4 wcopy F3-(n/2-1) F3 copy F3-(n/2-1) pDest 2 1 2 1 pSrc F4-0 F4-0 F4-0 F4-0 this field (-1, 0, +1) pBob F3-1 F3-0 F3-1 F3-0 previous field, opposite parity (0, +1) pSrcP F2-0 F2-0 F2-0 F2-0 previous field, same parity (-1, 0, +1) pBobP F1-1 F1-0 F1-1 F1-0 previous field, opposite parity (0, +1) */ pDest = (uint8_t *) pInfo->Overlay; /* pSrc, pSrcP point one field line above so we can easier calculate the address of current line -1, +0, +1 * bpl. */ pSrc = (const uint8_t *) pInfo->PictureHistory[0]->pData; pSrcP = (const uint8_t *) pInfo->PictureHistory[2]->pData; pBob = (const uint8_t *) pInfo->PictureHistory[1]->pData; pBobP = (const uint8_t *) pInfo->PictureHistory[3]->pData; if (pInfo->PictureHistory[0]->Flags & PICTURE_INTERLACED_ODD) { /* Copy first even and odd lines from first line of previous field. The loop copies the second and following pairs. */ copy_line_pair (pDest, pBob, byte_width, dst_bpl); pDest += dst_bpl * 2; pBob += src_bpl; pBobP += src_bpl; } else { /* Copy first even line, the loop starts in first odd line. */ copy_line (pDest, pBob, byte_width); pDest += dst_bpl; } /* We write two frame lines in parallel, incrementing pDest except after the last column. */ dst_padding = dst_bpl * 2 - byte_width + sizeof (vu8); /* We read one field line, incrementing the pointer except after the last column. */ src_padding1 = src_bpl - byte_width + sizeof (vu8); /* We read one field line and skip over first and last column. */ src_padding2 = src_padding1 + sizeof (vu8); pSrc += sizeof (vu8); /* no access in first column */ pSrcP += sizeof (vu8); pBobP += sizeof (vu8); /* All but first and last field line where we cannot read the line above and below. */ for (height -= 2; height > 0; --height) { unsigned int count; /* Simple bob first column. */ simple_bob (pDest, pBob, dst_bpl, src_bpl); pBob += sizeof (vu8); pDest += sizeof (vu8); /* All but first and last column where we cannot read the pixels left and right. */ for (count = byte_width / sizeof (vu8) - 2; count > 0; --count) { vu8 ul1, uc1, ur1, cl1, cc1, cr1, dl1, dc1, dr1; vu8 ul2, uc2, ur2, cl2, cc2, cr2, dl2, dc2, dr2; vu8 bob, bob_d; vu8 weave, weave_d; vu8 Min_Vals, Max_Vals; vu8 mm0, mm1; /* First, get and save our possible Bob values. Assume our pixels are layed out as follows with x the calc'd bob value and the other pixels are from the current field j a b c k current field x calculated line m d e f n current field */ if (use_strange_bob) { vu8 a, b, c, d, e, f, j, k, m, n; vu8 set, diff_be, avg_be, mask, mm3, mm4; /* -4 -2 0 +2 +4 +pBob +0 */ uload24t (&j, &a, &b, &c, &k, pBob, 0); uload24t (&m, &d, &e, &f, &n, pBob, src_bpl); /* we calc the bob value luma value as: if |j - n| < Thres && |a - m| > Thres avg(j,n) if |k - m| < Thres && |c - n| > Thres avg(k,m) if |c - d| < Thres && |b - f| > Thres avg(c,d) if |a - f| < Thres && |b - d| > Thres avg(a,f) if |b - e| < Thres avg(b,e) pickup any thing not yet set with avg(b,e) */ best_bob (&set, &bob, &bob_d, 0, j, n, a, m); best_bob (&set, &bob, &bob_d, 1, k, m, c, n); best_bob (&set, &bob, &bob_d, 1, c, d, b, f); best_bob (&set, &bob, &bob_d, 1, a, f, b, d); /* mask out odd chroma */ set = (vu8) yuyv2yy (set); bob = (vu8) yuyv2yy (bob); bob_d = (vu8) yuyv2yy (bob_d); diff_be = vabsdiffu8 (b, e); avg_be = fast_vavgu8 (b, e); mask = (vu8) vcmpleu8 (diff_be, DiffThres); set = vor (set, mask); bob = vsel (mask, avg_be, bob); bob_d = vsel (mask, diff_be, bob_d); /* bob in any leftovers */ /* We will also calc here the max/min values to later limit comb so the max excursion will not exceed the Max_Comb constant */ if (0 == effort) { vu8 min, max; vminmaxu8 (&min, &max, b, e); bob = vsatu8 (bob, min, max); } else { vu8 min, max, low_motion; mm4 = vload (pBobP, 0); mm3 = vload (pBobP, src_bpl); mm4 = vabsdiffu8 (b, mm4); mm3 = vabsdiffu8 (e, mm3); /* top or bottom pixel moved most */ mm3 = vmaxu8 (mm3, mm4); low_motion = (vu8) vcmpleu8 (mm3, DiffThres); vminmaxu8 (&min, &max, b, e); bob = vsatu8 (bob, min, max); /* saturate if no surround motion */ Min_Vals = vsubsu8 (min, low_motion); Max_Vals = vaddsu8 (max, low_motion); } mask = vor ((vu8) vcmpleu8 (diff_be, bob_d), vnot (set)); bob = vsel (mask, avg_be, bob); bob_d = vsel (mask, diff_be, bob_d); } else { vu8 a, b, c, d, e, f, j, k, m, n; /* WeirdBob */ /* we calc the bob value as: x2 = either avg(a,f), avg(c,d), avg(b,e), avg(j,n), or avg(k,m) selected for the smallest of abs(a-f), abs(c-d), abs(b-e), etc. */ uload24t (&j, &a, &b, &c, &k, pBob, 0); uload24t (&m, &d, &e, &f, &n, pBob, src_bpl); MERGE4PIXavg (&bob, &bob_d, 0, a, f); MERGE4PIXavg (&bob, &bob_d, 1, c, d); /* we know chroma is worthless so far */ bob_d = vor (bob_d, (vu8) UVMask); MERGE4PIXavg (&bob, &bob_d, 1, j, n); MERGE4PIXavg (&bob, &bob_d, 1, k, m); /* We will also calc here the max/min values to later limit comb so the max excursion will not exceed the Max_Comb constant */ if (0 == effort) { vu8 min, max; vminmaxu8 (&min, &max, b, e); bob = vsatu8 (bob, min, max); } else { vu8 min, max, low_motion, mm3, mm4; mm4 = vload (pBobP, 0); mm3 = vload (pBobP, src_bpl); mm4 = vabsdiffu8 (b, mm4); mm3 = vabsdiffu8 (e, mm3); /* top or bottom pixel moved most */ mm3 = vmaxu8 (mm3, mm4); low_motion = (vu8) vcmpleu8 (mm3, DiffThres); vminmaxu8 (&min, &max, b, e); bob = vsatu8 (bob, min, max); /* saturate if no surround motion */ Min_Vals = vsubsu8 (min, low_motion); Max_Vals = vaddsu8 (max, low_motion); } MERGE4PIXavg (&bob, &bob_d, 1, b, e); } /* We will keep a slight bias to using the weave pixels from the current location, by rating them by the min distance from the Bob value instead of the avg distance from that value. our best and only rating so far */ switch (effort) { case 0: break; case 1: cc1 = vload (pSrcP, src_bpl); cc2 = vload (pSrc, src_bpl); MERGE4PIXavg (&weave, &weave_d, /* cont */ FALSE, cc1, cc2); break; case 2 ... 3: SearchLoopOddA2 (0); Unpair (&weave, &weave_d); /* for SearchLoop0A.inc cc1, cc2 from OddA2 */ break; case 4 ... 5: SearchLoopOddA2 (0); /* SearchLoopOddAH2.inc (cl,cc,cr left over from OddA2) */ MERGE4PIXavgHPair (&weave, &weave_d, 1, cl1, cc1, cc2, cr2, cr1, cc1, cc2, cl2); Unpair (&weave, &weave_d); break; case 6 ... 9: /* 3x3 search */ SearchLoopOddA (0); Unpair (&weave, &weave_d); /* SearchLoopVA.inc (uc, dc left over from OddA) */ MERGE4PIXavg (&weave, &weave_d, 1, dc1, uc2); MERGE4PIXavg (&weave, &weave_d, 1, uc1, dc2); /* for SearchLoop0A.inc */ cc1 = vload (pSrcP, src_bpl); cc2 = vload (pSrc, src_bpl); break; case 10 ... 11: /* Search 9 with 2 H-half pels added */ /* MHS: Keep this order. Not ideal for register allocation but that's how the original code did it. Same below. */ SearchLoopOddA (0); SearchLoopOddAH2 (1); Unpair (&weave, &weave_d); /* SearchLoopVA.inc (uc, dc left over from OddA) */ MERGE4PIXavg (&weave, &weave_d, 1, dc1, uc2); MERGE4PIXavg (&weave, &weave_d, 1, uc1, dc2); break; case 12 ... 13: /* Search 11 with 2 V-half pels added */ SearchLoopOddA (0); SearchLoopOddAH2 (1); Unpair (&weave, &weave_d); /* SearchLoopVAH.inc (uc, dc left over from OddA, cc from OddAH2) */ MERGE4PIXavgH (&weave, &weave_d, 1, dc1, cc1, cc2, uc2); MERGE4PIXavgH (&weave, &weave_d, 1, uc1, cc1, cc2, dc2); /* SearchLoopVA.inc */ MERGE4PIXavg (&weave, &weave_d, 1, dc1, uc2); MERGE4PIXavg (&weave, &weave_d, 1, uc1, dc2); break; case 14 ... 15: /* 5x3 */ SearchLoopOddA (0); Unpair (&weave, &weave_d); SearchLoopEdgeA (1); SearchLoopVA (1); break; case 16 ... 19: /* 5x3 + 4 half pels */ SearchLoopOddAH2 (0); SearchLoopOddA (1); Unpair (&weave, &weave_d); /* SearchLoopVAH.inc (uc, dc left over from OddA, cc from OddAH2) */ MERGE4PIXavgH (&weave, &weave_d, 1, dc1, cc1, cc2, uc2); MERGE4PIXavgH (&weave, &weave_d, 1, uc1, cc1, cc2, dc2); /* SearchLoopVA.inc */ /* MHS: Keep order. */ MERGE4PIXavg (&weave, &weave_d, 1, dc1, uc2); MERGE4PIXavg (&weave, &weave_d, 1, uc1, dc2); break; case 20 ... 21: /* Search a 7x3 area, no half pels */ SearchLoopOddA6 (0); SearchLoopOddA (1); Unpair (&weave, &weave_d); SearchLoopEdgeA (1); SearchLoopVA (1); break; default: /* Search a 9x3 area, no half pels */ /* odd addresses -- use only luma data */ SearchLoopOddA6 (0); SearchLoopOddA (1); Unpair (&weave, &weave_d); /* even addresses -- use both luma and chroma from these */ /* SearchLoopEdgeA8.inc */ /* search averages of 4 pixels left and right */ uload8t (&ul1, &uc1, &ur1, pSrcP, 0); uload8t (&dl2, &dc2, &dr2, pSrc, src_bpl * 2); MERGE4PIXavg (&weave, &weave_d, 1, ul1, dr2); MERGE4PIXavg (&weave, &weave_d, 1, ur1, dl2); uload8t (&ul2, &uc2, &ur2, pSrc, 0); uload8t (&dl1, &dc1, &dr1, pSrcP, src_bpl * 2); MERGE4PIXavg (&weave, &weave_d, 1, dl1, ur2); MERGE4PIXavg (&weave, &weave_d, 1, dr1, ul2); uload8t (&cl1, &cc1, &cr1, pSrcP, src_bpl); uload8t (&cl2, &cc2, &cr2, pSrc, src_bpl); MERGE4PIXavg (&weave, &weave_d, 1, cl1, cr2); MERGE4PIXavg (&weave, &weave_d, 1, cr1, cl2); SearchLoopEdgeA (1); SearchLoopVA (1); break; } if (0 == effort) { mm0 = bob; /* just use the results of our weird bob */ } else { if (effort > 1) { /* SearchLoop0A.inc - center in old and new */ /* bias toward no motion */ weave_d = vaddsu8 (weave_d, vsplatu8_1); MERGE4PIXavg (&weave, &weave_d, /* cont */ TRUE, cc1, cc2); } /* JA 9/Dec/2002 failed experiment but leave in placeholder for me to play about */ if (DONT_USE_STRANGE_BOB) { /* Use the best weave if diffs less than 10 as that means the image is still or moving cleanly if there is motion we will clip which will catch anything */ mm0 = (vu8) vcmpleu8 (weave_d, vsplatu8i (4)); mm0 = vsel (mm0, weave, bob); // use weave, else bob } else { /* Use the better of bob or weave 10 is the most we care about */ bob_d = vminu8 (bob_d, vsplatu8i (10)); /* foregive that much from weave est? */ mm0 = vsubsu8 (weave_d, bob_d); mm0 = (vu8) vcmpleu8 (mm0, vsplatu8i (4)); mm0 = vsel (mm0, weave, bob); /* use weave, else bob */ } /* clip to catch the stray error */ mm0 = vsatu8 (mm0, Min_Vals, Max_Vals); } if (USE_VERTICAL_FILTER) { mm1 = vload (pBob, 0); vstorent (pDest, 0, fast_vavgu8 (mm0, mm1)); mm1 = vload (pBob, src_bpl); vstorent (pDest, dst_bpl, fast_vavgu8 (mm0, mm1)); } else { mm1 = vload (pBob, 0); /* Copy line of previous field. */ vstorent (pDest, 0, mm1); /* Our value for the line of this field. */ vstorent (pDest, dst_bpl, mm0); } pSrc += sizeof (vu8); pSrcP += sizeof (vu8); pBob += sizeof (vu8); pBobP += sizeof (vu8); pDest += sizeof (vu8); } pSrc += src_padding2; pSrcP += src_padding2; /* Simple bob last column. */ simple_bob (pDest, pBob, dst_bpl, src_bpl); pBob += src_padding1; pBobP += src_padding2; pDest += dst_padding; } if (pInfo->PictureHistory[0]->Flags & PICTURE_INTERLACED_EVEN) { /* Copy but-last odd dest line which isn't covered by the loop. */ copy_line (pDest, pBob, byte_width); pBob += src_bpl; pDest += dst_bpl; } /* Copy the last even and odd dest line from the last line of the previous field. */ copy_line_pair (pDest, pBob, byte_width, dst_bpl); vempty (); return TRUE; } typedef BOOL Search_Effort_fn (TDeinterlaceInfo * pInfo); #define Search_Effort_(effort) \ static BOOL \ Search_Effort_ ## effort (TDeinterlaceInfo * pInfo) \ { \ return Search_Effort_template (pInfo, effort, \ /* use_strange_bob */ FALSE); \ } \ static BOOL \ Search_Effort_ ## effort ## _SB (TDeinterlaceInfo * pInfo) \ { \ return Search_Effort_template (pInfo, effort, \ /* use_strange_bob */ TRUE); \ } Search_Effort_ (0) Search_Effort_ (1) Search_Effort_ (3) Search_Effort_ (5) Search_Effort_ (9) Search_Effort_ (11) Search_Effort_ (13) Search_Effort_ (15) Search_Effort_ (19) Search_Effort_ (21) Search_Effort_ (27) static Search_Effort_fn * Search_Effort_table [23][2] = { { Search_Effort_0, Search_Effort_0_SB }, { Search_Effort_1, Search_Effort_1_SB }, { Search_Effort_3, Search_Effort_3_SB }, { Search_Effort_3, Search_Effort_3_SB }, { Search_Effort_5, Search_Effort_5_SB }, { Search_Effort_5, Search_Effort_5_SB }, { Search_Effort_9, Search_Effort_9_SB }, { Search_Effort_9, Search_Effort_9_SB }, { Search_Effort_9, Search_Effort_9_SB }, { Search_Effort_9, Search_Effort_9_SB }, { Search_Effort_11, Search_Effort_11_SB }, { Search_Effort_11, Search_Effort_11_SB }, { Search_Effort_13, Search_Effort_13_SB }, { Search_Effort_13, Search_Effort_13_SB }, { Search_Effort_15, Search_Effort_15_SB }, { Search_Effort_15, Search_Effort_15_SB }, { Search_Effort_19, Search_Effort_19_SB }, { Search_Effort_19, Search_Effort_19_SB }, { Search_Effort_19, Search_Effort_19_SB }, { Search_Effort_19, Search_Effort_19_SB }, { Search_Effort_21, Search_Effort_21_SB }, { Search_Effort_21, Search_Effort_21_SB }, { Search_Effort_27, Search_Effort_27_SB }, }; BOOL SIMD_NAME (DeinterlaceTomsMoComp) (TDeinterlaceInfo *pInfo) { unsigned int effort; if (SIMD & (CPU_FEATURE_SSE2 | CPU_FEATURE_SSE3)) { if (((unsigned long) pInfo->Overlay | (unsigned long) pInfo->PictureHistory[0]->pData | (unsigned long) pInfo->PictureHistory[1]->pData | (unsigned long) pInfo->PictureHistory[2]->pData | (unsigned long) pInfo->PictureHistory[3]->pData | (unsigned long) pInfo->OverlayPitch | (unsigned long) pInfo->InputPitch | (unsigned long) pInfo->LineLength) & 15) return DeinterlaceTomsMoComp_SSE (pInfo); } effort = MIN ((unsigned int) SearchEffort2, (unsigned int) N_ELEMENTS (Search_Effort_table) - 1); return Search_Effort_table[effort][!!UseStrangeBob2](pInfo); } #elif !SIMD int SearchEffort2 = 3; int UseStrangeBob2 = FALSE; /*////////////////////////////////////////////////////////////////////////// // Start of Settings related code //////////////////////////////////////////////////////////////////////////*/ static const SETTING DI_TOMSMOCOMPSETTINGS [] = { { N_("Search Effort"), SLIDER, 0, &SearchEffort2, 5, 0, 255, 1, 1, NULL, "Deinterlace", "SearchEffort", NULL, }, { N_("Use Strange Bob"), YESNO, 0, &UseStrangeBob2, 0, 0, 1, 1, 1, NULL, "Deinterlace", "UseStrangeBob", NULL, }, }; static const DEINTERLACE_METHOD TomsMoCompMethod = { sizeof (DEINTERLACE_METHOD), DEINTERLACE_CURRENT_VERSION, N_("Video (TomsMoComp)"), "TomsMoComp", FALSE, FALSE, /* pfnAlgorithm */ NULL, 50, 60, N_ELEMENTS (DI_TOMSMOCOMPSETTINGS), DI_TOMSMOCOMPSETTINGS, INDEX_VIDEO_TOMSMOCOMP, NULL, NULL, NULL, NULL, 4, /* number fields needed */ 0, 0, 0, NULL, 0, FALSE, FALSE, IDH_TOMSMOCOMP, }; DEINTERLACE_METHOD * DI_TomsMoComp_GetDeinterlacePluginInfo (void) { DEINTERLACE_METHOD *m; DEINTERLACE_FUNC *f; m = NULL; f = SIMD_FN_SELECT (DeinterlaceTomsMoComp, CPU_FEATURE_MMX | CPU_FEATURE_3DNOW | CPU_FEATURE_SSE_INT | CPU_FEATURE_SSE2 | CPU_FEATURE_SSE3 | CPU_FEATURE_ALTIVEC); if (f) { m = malloc (sizeof (*m)); *m = TomsMoCompMethod; m->pfnAlgorithm = f; } return m; } #endif /* !SIMD */ /* Local Variables: c-basic-offset: 4 End: */ zapping-0.10cvs6/plugins/deinterlace/DI_Misc/DI_Greedy.c 644 764 144 20735 10417055563 16210 /*/////////////////////////////////////////////////////////////////////////// // $Id: DI_Greedy.c,v 1.6 2006/04/12 01:44:19 mschimek Exp $ ///////////////////////////////////////////////////////////////////////////// // Copyright (c) 2001 Tom Barry. All rights reserved. // Copyright (C) 2005 Michael Schimek ///////////////////////////////////////////////////////////////////////////// // // This file is subject to the terms of the GNU General Public License as // published by the Free Software Foundation. A copy of this license is // included with this software distribution in the file COPYING. If you // do not have a copy, you may obtain a copy by writing to the Free // Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. // // This software 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 ///////////////////////////////////////////////////////////////////////////// // Change Log // // Date Developer Changes // // 16 Jan 2001 Tom Barry Added Greedy Deinterlace method // ///////////////////////////////////////////////////////////////////////////// // CVS Log // // $Log: DI_Greedy.c,v $ // Revision 1.6 2006/04/12 01:44:19 mschimek // s/CPU_FEATURE_SSE/CPU_FEATURE_SSE_INT. // // Revision 1.5 2005/06/28 19:17:10 mschimek // *** empty log message *** // // Revision 1.4 2005/06/28 00:51:14 mschimek // Cleaned up. // // Revision 1.3.2.4 2005/06/17 02:54:20 mschimek // *** empty log message *** // // Revision 1.3.2.3 2005/05/31 02:40:34 mschimek // *** empty log message *** // // Revision 1.3.2.2 2005/05/20 05:45:14 mschimek // *** empty log message *** // // Revision 1.3.2.1 2005/05/05 09:46:01 mschimek // *** empty log message *** // // Revision 1.3 2005/03/30 21:27:58 mschimek // Integrated and converted the MMX code to vector intrinsics. // // Revision 1.2 2005/02/05 22:20:03 mschimek // Completed l18n. // // Revision 1.1 2005/01/08 14:35:11 mschimek // TomsMoCompMethod, MoComp2Method, VideoWeaveMethod, VideoBobMethod, // TwoFrameMethod, OldGameMethod, Greedy2FrameMethod, GreedyMethod, // DI_GreedyHSettings: Localized. // // Revision 1.2 2004/11/15 23:03:19 michael // *** empty log message *** // // Revision 1.1 2004/11/14 15:35:14 michael // *** empty log message *** // // Revision 1.6 2002/06/18 19:46:07 adcockj // Changed appliaction Messages to use WM_APP instead of WM_USER // // Revision 1.5 2002/06/13 12:10:24 adcockj // Move to new Setings dialog for filers, video deint and advanced settings // // Revision 1.4 2001/07/13 16:13:33 adcockj // Added CVS tags and removed tabs // ///////////////////////////////////////////////////////////////////////////*/ #include "windows.h" #include "DS_Deinterlace.h" extern int GreedyMaxComb; SIMD_FN_PROTOS (DEINTERLACE_FUNC, DeinterlaceGreedy); #if SIMD & (CPU_FEATURE_MMX | CPU_FEATURE_3DNOW | \ CPU_FEATURE_SSE_INT | CPU_FEATURE_SSE2 | CPU_FEATURE_ALTIVEC) /* This is a simple lightweight DeInterlace method that uses little CPU time // but gives very good results for low or intermedite motion. // It defers frames by one field, but that does not seem to produce noticeable // lip sync problems. // // The method used is to take either the older or newer weave pixel depending // upon which give the smaller comb factor, and then clip to avoid large damage // when wrong. // // I'd intended this to be part of a larger more elaborate method added to // Blended Clip but this give too good results for the CPU to ignore here. */ BOOL SIMD_NAME (DeinterlaceGreedy) (TDeinterlaceInfo * pInfo) { vu8 MaxComb; uint8_t *Dest; const uint8_t *L1; /* ptr to Line1, of 3 */ const uint8_t *L2; /* ptr to Line2, the weave line */ const uint8_t *L3; /* ptr to Line3 */ const uint8_t *LP2; /* ptr to prev Line2 */ unsigned int byte_width; unsigned int height; unsigned long dst_padding; unsigned long src_padding; unsigned long dst_bpl; unsigned long src_bpl; if (SIMD == CPU_FEATURE_SSE2) { if (((unsigned long) pInfo->Overlay | (unsigned long) pInfo->PictureHistory[0]->pData | (unsigned long) pInfo->PictureHistory[1]->pData | (unsigned long) pInfo->PictureHistory[2]->pData | (unsigned long) pInfo->OverlayPitch | (unsigned long) pInfo->InputPitch | (unsigned long) pInfo->LineLength) & 15) return DeinterlaceGreedy_SSE (pInfo); } /* How badly do we let it weave? 0-255 */ MaxComb = vsplatu8 (GreedyMaxComb); byte_width = pInfo->LineLength; dst_bpl = pInfo->OverlayPitch; src_bpl = pInfo->InputPitch; Dest = pInfo->Overlay; /* DL1 if Odd or DL2 if Even */ /* copy first even line no matter what, and the first odd line if we're processing an EVEN field. (note diff from other deint rtns.) */ L1 = pInfo->PictureHistory[1]->pData; L2 = pInfo->PictureHistory[0]->pData; L3 = L1 + src_bpl; LP2 = pInfo->PictureHistory[2]->pData; if (!(pInfo->PictureHistory[0]->Flags & PICTURE_INTERLACED_ODD)) { /* copy first even line */ copy_line (Dest, L2, byte_width); Dest += dst_bpl; L2 += src_bpl; LP2 += src_bpl; } copy_line (Dest, L1, byte_width); Dest += dst_bpl; dst_padding = dst_bpl * 2 - byte_width; src_padding = src_bpl - byte_width; for (height = pInfo->FieldHeight - 1; height > 0; --height) { unsigned int count; /* For ease of reading, the comments below assume that we're operating on an odd field (i.e., that pInfo->IsOdd is true). Assume the obvious for even lines. */ for (count = byte_width / sizeof (vu8); count > 0; --count) { vu8 l1, l2, l3, lp2, avg, mm4, mm5, best, min, max, sel; l1 = vload (L1, 0); L1 += sizeof (vu8); l3 = vload (L3, 0); L3 += sizeof (vu8); vstorent (Dest, dst_bpl, l3); /* the average, for computing comb */ avg = vavgu8 (l1, l3); l2 = vload (L2, 0); L2 += sizeof (vu8); lp2 = vload (LP2, 0); LP2 += sizeof (vu8); /* get abs value of possible L2 and LP2 comb */ mm5 = vabsdiffu8 (l2, avg); mm4 = vabsdiffu8 (lp2, avg); /* use L2 or LP2 depending upon which makes smaller comb */ sel = (vu8) vcmpleu8 (mm4, mm5); best = vsel (sel, lp2, l2); /* Now lets clip our chosen value to be not outside of the range of the high/low range L1-L3 by more than abs(L1-L3) This allows some comb but limits the damages and also allows more detail than a boring oversmoothed clip. */ vminmaxu8 (&min, &max, l1, l3); /* allow the value to be above the high or below the low by amt of MaxComb */ max = vaddsu8 (max, MaxComb); min = vsubsu8 (min, MaxComb); best = vsatu8 (best, min, max); vstorent (Dest, 0, best); Dest += sizeof (vu8); } L1 += src_padding; L2 += src_padding; L3 += src_padding; LP2 += src_padding; Dest += dst_padding; } /* Copy last odd line if we're processing an Odd field. */ if (pInfo->PictureHistory[0]->Flags & PICTURE_INTERLACED_ODD) { copy_line (Dest, L2, byte_width); } vempty (); return TRUE; } #elif !SIMD int GreedyMaxComb = 15; /*////////////////////////////////////////////////////////////////////////// // Start of Settings related code //////////////////////////////////////////////////////////////////////////*/ static const SETTING DI_GreedySettings [] = { { N_("Greedy Max Comb"), SLIDER, 0, &GreedyMaxComb, 15, 0, 255, 1, 1, NULL, "Deinterlace", "GreedyMaxComb", NULL, }, }; static const DEINTERLACE_METHOD GreedyMethod = { sizeof (DEINTERLACE_METHOD), DEINTERLACE_CURRENT_VERSION, N_("Video (Greedy, Low Motion)"), "Greedy", FALSE, FALSE, /* pfnAlgorithm */ NULL, 50, 60, N_ELEMENTS (DI_GreedySettings), DI_GreedySettings, INDEX_VIDEO_GREEDY, NULL, NULL, NULL, NULL, 3, 0, 0, 0, NULL, 0, FALSE, FALSE, IDH_GREEDY, }; DEINTERLACE_METHOD * DI_Greedy_GetDeinterlacePluginInfo (void) { DEINTERLACE_METHOD *m; DEINTERLACE_FUNC *f; m = NULL; f = SIMD_FN_SELECT (DeinterlaceGreedy, CPU_FEATURE_MMX | CPU_FEATURE_3DNOW | CPU_FEATURE_SSE_INT | CPU_FEATURE_SSE2 | CPU_FEATURE_ALTIVEC); if (f) { m = malloc (sizeof (*m)); *m = GreedyMethod; m->pfnAlgorithm = f; } return m; } #endif /* !SIMD */ /* Local Variables: c-basic-offset: 4 End: */ zapping-0.10cvs6/plugins/deinterlace/DI_Misc/DI_Weave.c 644 764 144 12601 10417055440 16023 /*/////////////////////////////////////////////////////////////////////////// // $Id: DI_Weave.c,v 1.5 2006/04/12 01:42:56 mschimek Exp $ ///////////////////////////////////////////////////////////////////////////// // Copyright (c) 2000 John Adcock. All rights reserved. // Copyright (C) 2005 Michael Schimek ///////////////////////////////////////////////////////////////////////////// // // This file is subject to the terms of the GNU General Public License as // published by the Free Software Foundation. A copy of this license is // included with this software distribution in the file COPYING. If you // do not have a copy, you may obtain a copy by writing to the Free // Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. // // This software 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 ///////////////////////////////////////////////////////////////////////////// // Change Log // // Date Developer Changes // // 30 Dec 2000 Mark Rejhon Split into separate module // ///////////////////////////////////////////////////////////////////////////// // CVS Log // // $Log: DI_Weave.c,v $ // Revision 1.5 2006/04/12 01:42:56 mschimek // s/CPU_FEATURE_SSE/CPU_FEATURE_SSE_INT. // // Revision 1.4 2005/06/28 19:17:10 mschimek // *** empty log message *** // // Revision 1.3 2005/06/28 00:50:22 mschimek // Added support for x86-64, AltiVec and a scalar version. Cleaned up. // // Revision 1.2.2.4 2005/06/17 02:54:20 mschimek // *** empty log message *** // // Revision 1.2.2.3 2005/05/31 02:40:34 mschimek // *** empty log message *** // // Revision 1.2.2.2 2005/05/20 05:45:14 mschimek // *** empty log message *** // // Revision 1.2.2.1 2005/05/05 09:46:01 mschimek // *** empty log message *** // // Revision 1.2 2005/02/05 22:18:36 mschimek // Completed l18n. // // Revision 1.1 2005/01/08 14:54:23 mschimek // *** empty log message *** // // Revision 1.2 2004/11/15 23:03:19 michael // *** empty log message *** // // Revision 1.1 2004/11/14 15:35:15 michael // *** empty log message *** // // Revision 1.8 2002/06/13 12:10:25 adcockj // Move to new Setings dialog for filers, video deint and advanced settings // // Revision 1.7 2001/11/22 13:32:04 adcockj // Finished changes caused by changes to TDeinterlaceInfo - Compiles // // Revision 1.6 2001/11/21 15:21:41 adcockj // Renamed DEINTERLACE_INFO to TDeinterlaceInfo in line with standards // Changed TDeinterlaceInfo structure to have history of pictures. // // Revision 1.5 2001/07/13 16:13:33 adcockj // Added CVS tags and removed tabs // ///////////////////////////////////////////////////////////////////////////*/ #include "windows.h" #include "DS_Deinterlace.h" SIMD_FN_PROTOS (DEINTERLACE_FUNC, DeinterlaceWeave); #if !SIMD || (SIMD & (CPU_FEATURE_MMX | CPU_FEATURE_SSE_INT | \ CPU_FEATURE_SSE2 | CPU_FEATURE_ALTIVEC)) /*/////////////////////////////////////////////////////////////////////////// // Simple Weave. Copies alternating scanlines from the most recent fields. ///////////////////////////////////////////////////////////////////////////*/ BOOL SIMD_NAME (DeinterlaceWeave) (TDeinterlaceInfo * pInfo) { uint8_t *Dest; const uint8_t *F4; const uint8_t *F3; unsigned int byte_width; unsigned int height; unsigned long dst_bpl; unsigned long src_bpl; if (SIMD == CPU_FEATURE_SSE2) { if (((unsigned long) pInfo->Overlay | (unsigned long) pInfo->PictureHistory[0]->pData | (unsigned long) pInfo->PictureHistory[1]->pData | (unsigned long) pInfo->OverlayPitch | (unsigned long) pInfo->InputPitch | (unsigned long) pInfo->LineLength) & 15) return DeinterlaceWeave_SSE (pInfo); } byte_width = pInfo->LineLength; dst_bpl = pInfo->OverlayPitch; src_bpl = pInfo->InputPitch; /* dest src odd src even 0 F3.0 F4.0 1 F4.0 F3.0 h-2 F3.h/2-1 F4.h/2-1 h-1 F4.h/2-1 F3.h/2-1 F4 this field F3 previous field, opposite parity h frame height */ Dest = (uint8_t *) pInfo->Overlay; F4 = (const uint8_t *) pInfo->PictureHistory[0]->pData; F3 = (const uint8_t *) pInfo->PictureHistory[1]->pData; if (pInfo->PictureHistory[0]->Flags & PICTURE_INTERLACED_ODD) { SWAP (F3, F4); } for (height = pInfo->FieldHeight; height > 0; --height) { copy_line (Dest, F4, byte_width); Dest += dst_bpl; F4 += src_bpl; copy_line (Dest, F3, byte_width); Dest += dst_bpl; F3 += src_bpl; } vempty (); return TRUE; } #endif #if !SIMD static const DEINTERLACE_METHOD WeaveMethod = { sizeof(DEINTERLACE_METHOD), DEINTERLACE_CURRENT_VERSION, N_("Simple Weave"), "Weave", FALSE, FALSE, /* pfnAlgorithm */ NULL, 50, 60, 0, NULL, INDEX_WEAVE, NULL, NULL, NULL, NULL, 2, 0, 0, -1, NULL, 0, FALSE, FALSE, IDH_WEAVE, }; DEINTERLACE_METHOD * DI_Weave_GetDeinterlacePluginInfo (void) { DEINTERLACE_METHOD *m; m = malloc (sizeof (*m)); *m = WeaveMethod; m->pfnAlgorithm = SIMD_FN_SELECT (DeinterlaceWeave, SCALAR | CPU_FEATURE_MMX | CPU_FEATURE_SSE_INT | CPU_FEATURE_SSE2 | CPU_FEATURE_ALTIVEC); return m; } #endif /* !SIMD */ /* Local Variables: c-basic-offset: 4 End: */ zapping-0.10cvs6/plugins/deinterlace/DI_Misc/DI_Greedy2Frame.c 644 764 144 22111 10417055553 17232 /*//////////////////////////////////////////////////////////////////////////// // $Id: DI_Greedy2Frame.c,v 1.6 2006/04/12 01:44:11 mschimek Exp $ ///////////////////////////////////////////////////////////////////////////// // Copyright (c) 2000 John Adcock, Tom Barry, Steve Grimm All rights reserved. ///////////////////////////////////////////////////////////////////////////// // // This file is subject to the terms of the GNU General Public License as // published by the Free Software Foundation. A copy of this license is // included with this software distribution in the file COPYING. If you // do not have a copy, you may obtain a copy by writing to the Free // Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. // // This software 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 /////////////////////////////////////////////////////////////////////////////// // Change Log // // Date Developer Changes // // 08 Feb 2000 John Adcock New Method // ///////////////////////////////////////////////////////////////////////////// // CVS Log // // $Log: DI_Greedy2Frame.c,v $ // Revision 1.6 2006/04/12 01:44:11 mschimek // s/CPU_FEATURE_SSE/CPU_FEATURE_SSE_INT. // // Revision 1.5 2005/06/28 19:17:10 mschimek // *** empty log message *** // // Revision 1.4 2005/06/28 00:50:03 mschimek // Cleaned up. // Upper limit of GreedyTwoFrameThreshold is 127, not 128. // // Revision 1.3.2.5 2005/06/17 02:54:20 mschimek // *** empty log message *** // // Revision 1.3.2.4 2005/05/31 02:40:34 mschimek // *** empty log message *** // // Revision 1.3.2.3 2005/05/20 05:45:14 mschimek // *** empty log message *** // // Revision 1.3.2.2 2005/05/17 19:58:32 mschimek // *** empty log message *** // // Revision 1.3.2.1 2005/05/05 09:46:01 mschimek // *** empty log message *** // // Revision 1.3 2005/03/30 21:27:32 mschimek // Integrated and converted the MMX code to vector intrinsics. // // Revision 1.2 2005/02/05 22:19:53 mschimek // Completed l18n. // // Revision 1.1 2005/01/08 14:35:01 mschimek // TomsMoCompMethod, MoComp2Method, VideoWeaveMethod, VideoBobMethod, // TwoFrameMethod, OldGameMethod, Greedy2FrameMethod, GreedyMethod, // DI_GreedyHSettings: Localized. // // Revision 1.2 2004/11/15 23:03:19 michael // *** empty log message *** // // Revision 1.1 2004/11/14 15:35:14 michael // *** empty log message *** // // Revision 1.8 2002/06/18 19:46:07 adcockj // Changed appliaction Messages to use WM_APP instead of WM_USER // // Revision 1.7 2002/06/13 12:10:24 adcockj // Move to new Setings dialog for filers, video deint and advanced settings // // Revision 1.6 2001/07/13 16:13:33 adcockj // Added CVS tags and removed tabs // ///////////////////////////////////////////////////////////////////////////*/ #include "windows.h" #include "DS_Deinterlace.h" extern int GreedyTwoFrameThreshold; SIMD_FN_PROTOS (DEINTERLACE_FUNC, DeinterlaceGreedy2Frame); #if SIMD & (CPU_FEATURE_MMX | CPU_FEATURE_3DNOW | \ CPU_FEATURE_SSE_INT | CPU_FEATURE_SSE2 | CPU_FEATURE_ALTIVEC) /*///////////////////////////////////////////////////////////////////////////// // Field 1 | Field 2 | Field 3 | Field 4 | // T0 | | T1 | | // | M0 | | M1 | // B0 | | B1 | | */ /* debugging feature output the value of mm4 at this point which is pink where we will weave and green were we are going to bob */ #define CHECK_BOBWEAVE 0 static always_inline v32 thresh_cmp (vu8 a, vu8 b, v8 thresh, v32 c) { vu8 t; // XXX emulates vcmpgtu8, AVEC has this instruction t = vsr1u8 (vabsdiffu8 (a, b)); t = (vu8) vcmpgt8 ((v8) t, thresh); t = vand (t, vsplatu8_127); // get rid of any sign bit // XXX can be replaced by logic ops. return vand ((v32) vcmpgt32 ((v32) t, vsplat32_1), c); } BOOL SIMD_NAME (DeinterlaceGreedy2Frame) (TDeinterlaceInfo *pInfo) { v8 qwGreedyTwoFrameThreshold; uint8_t *Dest; const uint8_t *T0; const uint8_t *T1; const uint8_t *M0; const uint8_t *M1; unsigned int byte_width; unsigned int height; unsigned long dst_padding; unsigned long src_padding; unsigned long dst_bpl; unsigned long src_bpl; if (SIMD == CPU_FEATURE_SSE2) { if (((unsigned long) pInfo->Overlay | (unsigned long) pInfo->PictureHistory[0]->pData | (unsigned long) pInfo->PictureHistory[1]->pData | (unsigned long) pInfo->PictureHistory[2]->pData | (unsigned long) pInfo->PictureHistory[3]->pData | (unsigned long) pInfo->OverlayPitch | (unsigned long) pInfo->InputPitch | (unsigned long) pInfo->LineLength) & 15) return DeinterlaceGreedy2Frame_SSE (pInfo); } qwGreedyTwoFrameThreshold = vsplat8 (GreedyTwoFrameThreshold); byte_width = pInfo->LineLength; dst_bpl = pInfo->OverlayPitch; src_bpl = pInfo->InputPitch; Dest = pInfo->Overlay; M1 = pInfo->PictureHistory[0]->pData; T1 = pInfo->PictureHistory[1]->pData; M0 = pInfo->PictureHistory[2]->pData; T0 = pInfo->PictureHistory[3]->pData; if (!(pInfo->PictureHistory[0]->Flags & PICTURE_INTERLACED_ODD)) { copy_line (Dest, M1, byte_width); Dest += dst_bpl; M1 = (const uint8_t *) pInfo->PictureHistory[0]->pData + src_bpl; M0 = (const uint8_t *) pInfo->PictureHistory[2]->pData + src_bpl; } dst_padding = dst_bpl * 2 - byte_width; src_padding = src_bpl - byte_width; for (height = pInfo->FieldHeight - 1; height > 0; --height) { unsigned int count; for (count = byte_width / sizeof (vu8); count > 0; --count) { vu8 m0, m1, t0, t1, b0, b1, avg, mm4; v32 sum; t1 = vload (T1, 0); b1 = vload (T1, src_bpl); T1 += sizeof (vu8); /* Always use the most recent data verbatim. By definition it's correct (it'd be shown on an interlaced display) and our job is to fill in the spaces between the new lines. */ vstorent (Dest, 0, t1); avg = fast_vavgu8 (t1, b1); m0 = vload (M0, 0); M0 += sizeof (vu8); m1 = vload (M1, 0); M1 += sizeof (vu8); /* if we have a good processor then make mm0 the average of M1 and M0 which should make weave look better when there is small amounts of movement */ if (SIMD != CPU_FEATURE_MMX) m1 = vavgu8 (m1, m0); /* if |M1-M0| > Threshold we want dword worth of twos */ sum = thresh_cmp (m1, m0, qwGreedyTwoFrameThreshold, vsplat32_2); /* if |T1-T0| > Threshold we want dword worth of ones */ t0 = vload (T0, 0); sum = vadd32 (sum, thresh_cmp (t1, t0, qwGreedyTwoFrameThreshold, vsplat32_1)); /* if |B1-B0| > Threshold we want dword worth of ones */ b0 = vload (T0, src_bpl); T0 += sizeof (vu8); sum = vadd32 (sum, thresh_cmp (b1, b0, qwGreedyTwoFrameThreshold, vsplat32_1)); mm4 = (vu8) vcmpgt32 (sum, vsplat32_2); /* debugging feature output the value of mm4 at this point which is pink where we will weave and green were we are going to bob */ if (CHECK_BOBWEAVE) vstorent (Dest, dst_bpl, mm4); else vstorent (Dest, dst_bpl, vsel (mm4, m1, avg)); Dest += sizeof (vu8); } M1 += src_padding; T1 += src_padding; M0 += src_padding; T0 += src_padding; Dest += dst_padding; } if (pInfo->PictureHistory[0]->Flags & PICTURE_INTERLACED_ODD) { copy_line (Dest, T1, byte_width); Dest += dst_bpl; copy_line (Dest, M1, byte_width); } else { copy_line (Dest, T1, byte_width); } vempty (); return TRUE; } #elif !SIMD int GreedyTwoFrameThreshold = 4; /*////////////////////////////////////////////////////////////////////////// // Start of Settings related code //////////////////////////////////////////////////////////////////////////*/ static const SETTING DI_Greedy2FrameSettings [] = { { N_("Greedy 2 Frame Luma Threshold"), SLIDER, 0, &GreedyTwoFrameThreshold, 4, 0, 127, 1, 1, NULL, "Deinterlace", "GreedyTwoFrameThreshold", NULL, }, }; static const DEINTERLACE_METHOD Greedy2FrameMethod = { sizeof (DEINTERLACE_METHOD), DEINTERLACE_CURRENT_VERSION, N_("Greedy 2 Frame"), "Greedy2", FALSE, FALSE, /* pfnAlgorithm */ NULL, 50, 60, N_ELEMENTS (DI_Greedy2FrameSettings), DI_Greedy2FrameSettings, INDEX_VIDEO_GREEDY2FRAME, NULL, NULL, NULL, NULL, 4, 0, 0, 0, NULL, 0, FALSE, FALSE, IDH_GREEDY2 }; DEINTERLACE_METHOD * DI_Greedy2Frame_GetDeinterlacePluginInfo (void) { DEINTERLACE_METHOD *m; DEINTERLACE_FUNC *f; m = NULL; f = SIMD_FN_SELECT (DeinterlaceGreedy2Frame, CPU_FEATURE_MMX | CPU_FEATURE_3DNOW | CPU_FEATURE_SSE_INT | CPU_FEATURE_SSE2 | CPU_FEATURE_ALTIVEC); if (f) { m = malloc (sizeof (*m)); *m = Greedy2FrameMethod; m->pfnAlgorithm = f; } return m; } #endif /* !SIMD */ /* Local Variables: c-basic-offset: 4 End: */ zapping-0.10cvs6/plugins/deinterlace/DI_Misc/Makefile.am 644 764 144 4251 10417055431 16252 ## Process this file with automake to produce Makefile.in # Note these are defaults, user CFLAGS take precedence. SIMD_CFLAGS = \ -I$(top_srcdir) \ -I$(top_srcdir)/plugins/deinterlace \ -O3 -fomit-frame-pointer -D_REENTRANT # We make extensive use of inline functions. The --param switches here # increase various inlining limits (gcc 3.4.x and later only). if HAVE_GCC_LIMITS SIMD_CFLAGS += \ --param max-inline-insns-single=50000 \ --param large-function-insns=150000 \ --param inline-unit-growth=30000 \ --param large-function-growth=30000 endif # TODO DI_OldGame.c SIMD_SOURCES = \ DI_Bob.c \ DI_EvenOnly.c \ DI_Greedy.c \ DI_Greedy2Frame.c \ DI_MoComp2.c \ DI_OddOnly.c \ DI_ScalerBob.c \ DI_TomsMoComp.c \ DI_TwoFrame.c \ DI_VideoBob.c \ DI_VideoWeave.c \ DI_Weave.c SIMD_LIBS = # x86 and x86-64 if CAN_COMPILE_MMX SIMD_LIBS += libDI_Misc_MMX.la libDI_Misc_MMX_la_CFLAGS = $(SIMD_CFLAGS) -mmmx -DSIMD=CPU_FEATURE_MMX libDI_Misc_MMX_la_SOURCES = $(SIMD_SOURCES) endif if CAN_COMPILE_3DNOW SIMD_LIBS += libDI_Misc_3DNOW.la libDI_Misc_3DNOW_la_CFLAGS = $(SIMD_CFLAGS) -m3dnow -DSIMD=CPU_FEATURE_3DNOW libDI_Misc_3DNOW_la_SOURCES = $(SIMD_SOURCES) endif if CAN_COMPILE_SSE SIMD_LIBS += libDI_Misc_SSE.la libDI_Misc_SSE_la_CFLAGS = $(SIMD_CFLAGS) -msse -DSIMD=CPU_FEATURE_SSE_INT libDI_Misc_SSE_la_SOURCES = $(SIMD_SOURCES) endif if CAN_COMPILE_SSE2 SIMD_LIBS += libDI_Misc_SSE2.la libDI_Misc_SSE2_la_CFLAGS = $(SIMD_CFLAGS) -msse2 -DSIMD=CPU_FEATURE_SSE2 libDI_Misc_SSE2_la_SOURCES = $(SIMD_SOURCES) endif if CAN_COMPILE_SSE3 SIMD_LIBS += libDI_Misc_SSE3.la libDI_Misc_SSE3_la_CFLAGS = $(SIMD_CFLAGS) -msse3 -DSIMD=CPU_FEATURE_SSE3 libDI_Misc_SSE3_la_SOURCES = $(SIMD_SOURCES) endif # powerpc if CAN_COMPILE_ALTIVEC SIMD_LIBS += libDI_Misc_ALTIVEC.la libDI_Misc_ALTIVEC_la_CFLAGS = \ $(SIMD_CFLAGS) \ -maltivec -mabi=altivec -DSIMD=CPU_FEATURE_ALTIVEC libDI_Misc_ALTIVEC_la_SOURCES = $(SIMD_SOURCES) endif libDI_Misc_la_CFLAGS = \ -I$(top_srcdir) \ -I$(top_srcdir)/plugins/deinterlace # To do / removed # DI_Adaptive.c # DI_BlendedClip.c libDI_Misc_la_SOURCES = \ $(SIMD_SOURCES) libDI_Misc_la_LIBADD = \ $(SIMD_LIBS) noinst_LTLIBRARIES = \ $(SIMD_LIBS) \ libDI_Misc.la zapping-0.10cvs6/plugins/deinterlace/DI_Misc/Makefile.in 644 764 144 373377 10442575535 16357 # Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = ../../.. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ # We make extensive use of inline functions. The --param switches here # increase various inlining limits (gcc 3.4.x and later only). @HAVE_GCC_LIMITS_TRUE@am__append_1 = \ @HAVE_GCC_LIMITS_TRUE@ --param max-inline-insns-single=50000 \ @HAVE_GCC_LIMITS_TRUE@ --param large-function-insns=150000 \ @HAVE_GCC_LIMITS_TRUE@ --param inline-unit-growth=30000 \ @HAVE_GCC_LIMITS_TRUE@ --param large-function-growth=30000 # x86 and x86-64 @CAN_COMPILE_MMX_TRUE@am__append_2 = libDI_Misc_MMX.la @CAN_COMPILE_3DNOW_TRUE@am__append_3 = libDI_Misc_3DNOW.la @CAN_COMPILE_SSE_TRUE@am__append_4 = libDI_Misc_SSE.la @CAN_COMPILE_SSE2_TRUE@am__append_5 = libDI_Misc_SSE2.la @CAN_COMPILE_SSE3_TRUE@am__append_6 = libDI_Misc_SSE3.la # powerpc @CAN_COMPILE_ALTIVEC_TRUE@am__append_7 = libDI_Misc_ALTIVEC.la subdir = plugins/deinterlace/DI_Misc DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) @CAN_COMPILE_MMX_TRUE@am__DEPENDENCIES_1 = libDI_Misc_MMX.la @CAN_COMPILE_3DNOW_TRUE@am__DEPENDENCIES_2 = libDI_Misc_3DNOW.la @CAN_COMPILE_SSE_TRUE@am__DEPENDENCIES_3 = libDI_Misc_SSE.la @CAN_COMPILE_SSE2_TRUE@am__DEPENDENCIES_4 = libDI_Misc_SSE2.la @CAN_COMPILE_SSE3_TRUE@am__DEPENDENCIES_5 = libDI_Misc_SSE3.la @CAN_COMPILE_ALTIVEC_TRUE@am__DEPENDENCIES_6 = libDI_Misc_ALTIVEC.la am__DEPENDENCIES_7 = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_2) \ $(am__DEPENDENCIES_3) $(am__DEPENDENCIES_4) \ $(am__DEPENDENCIES_5) $(am__DEPENDENCIES_6) libDI_Misc_la_DEPENDENCIES = $(am__DEPENDENCIES_7) am__objects_1 = libDI_Misc_la-DI_Bob.lo libDI_Misc_la-DI_EvenOnly.lo \ libDI_Misc_la-DI_Greedy.lo libDI_Misc_la-DI_Greedy2Frame.lo \ libDI_Misc_la-DI_MoComp2.lo libDI_Misc_la-DI_OddOnly.lo \ libDI_Misc_la-DI_ScalerBob.lo libDI_Misc_la-DI_TomsMoComp.lo \ libDI_Misc_la-DI_TwoFrame.lo libDI_Misc_la-DI_VideoBob.lo \ libDI_Misc_la-DI_VideoWeave.lo libDI_Misc_la-DI_Weave.lo am_libDI_Misc_la_OBJECTS = $(am__objects_1) libDI_Misc_la_OBJECTS = $(am_libDI_Misc_la_OBJECTS) libDI_Misc_3DNOW_la_LIBADD = am__libDI_Misc_3DNOW_la_SOURCES_DIST = DI_Bob.c DI_EvenOnly.c \ DI_Greedy.c DI_Greedy2Frame.c DI_MoComp2.c DI_OddOnly.c \ DI_ScalerBob.c DI_TomsMoComp.c DI_TwoFrame.c DI_VideoBob.c \ DI_VideoWeave.c DI_Weave.c am__objects_2 = libDI_Misc_3DNOW_la-DI_Bob.lo \ libDI_Misc_3DNOW_la-DI_EvenOnly.lo \ libDI_Misc_3DNOW_la-DI_Greedy.lo \ libDI_Misc_3DNOW_la-DI_Greedy2Frame.lo \ libDI_Misc_3DNOW_la-DI_MoComp2.lo \ libDI_Misc_3DNOW_la-DI_OddOnly.lo \ libDI_Misc_3DNOW_la-DI_ScalerBob.lo \ libDI_Misc_3DNOW_la-DI_TomsMoComp.lo \ libDI_Misc_3DNOW_la-DI_TwoFrame.lo \ libDI_Misc_3DNOW_la-DI_VideoBob.lo \ libDI_Misc_3DNOW_la-DI_VideoWeave.lo \ libDI_Misc_3DNOW_la-DI_Weave.lo @CAN_COMPILE_3DNOW_TRUE@am_libDI_Misc_3DNOW_la_OBJECTS = \ @CAN_COMPILE_3DNOW_TRUE@ $(am__objects_2) libDI_Misc_3DNOW_la_OBJECTS = $(am_libDI_Misc_3DNOW_la_OBJECTS) @CAN_COMPILE_3DNOW_TRUE@am_libDI_Misc_3DNOW_la_rpath = libDI_Misc_ALTIVEC_la_LIBADD = am__libDI_Misc_ALTIVEC_la_SOURCES_DIST = DI_Bob.c DI_EvenOnly.c \ DI_Greedy.c DI_Greedy2Frame.c DI_MoComp2.c DI_OddOnly.c \ DI_ScalerBob.c DI_TomsMoComp.c DI_TwoFrame.c DI_VideoBob.c \ DI_VideoWeave.c DI_Weave.c am__objects_3 = libDI_Misc_ALTIVEC_la-DI_Bob.lo \ libDI_Misc_ALTIVEC_la-DI_EvenOnly.lo \ libDI_Misc_ALTIVEC_la-DI_Greedy.lo \ libDI_Misc_ALTIVEC_la-DI_Greedy2Frame.lo \ libDI_Misc_ALTIVEC_la-DI_MoComp2.lo \ libDI_Misc_ALTIVEC_la-DI_OddOnly.lo \ libDI_Misc_ALTIVEC_la-DI_ScalerBob.lo \ libDI_Misc_ALTIVEC_la-DI_TomsMoComp.lo \ libDI_Misc_ALTIVEC_la-DI_TwoFrame.lo \ libDI_Misc_ALTIVEC_la-DI_VideoBob.lo \ libDI_Misc_ALTIVEC_la-DI_VideoWeave.lo \ libDI_Misc_ALTIVEC_la-DI_Weave.lo @CAN_COMPILE_ALTIVEC_TRUE@am_libDI_Misc_ALTIVEC_la_OBJECTS = \ @CAN_COMPILE_ALTIVEC_TRUE@ $(am__objects_3) libDI_Misc_ALTIVEC_la_OBJECTS = $(am_libDI_Misc_ALTIVEC_la_OBJECTS) @CAN_COMPILE_ALTIVEC_TRUE@am_libDI_Misc_ALTIVEC_la_rpath = libDI_Misc_MMX_la_LIBADD = am__libDI_Misc_MMX_la_SOURCES_DIST = DI_Bob.c DI_EvenOnly.c \ DI_Greedy.c DI_Greedy2Frame.c DI_MoComp2.c DI_OddOnly.c \ DI_ScalerBob.c DI_TomsMoComp.c DI_TwoFrame.c DI_VideoBob.c \ DI_VideoWeave.c DI_Weave.c am__objects_4 = libDI_Misc_MMX_la-DI_Bob.lo \ libDI_Misc_MMX_la-DI_EvenOnly.lo \ libDI_Misc_MMX_la-DI_Greedy.lo \ libDI_Misc_MMX_la-DI_Greedy2Frame.lo \ libDI_Misc_MMX_la-DI_MoComp2.lo \ libDI_Misc_MMX_la-DI_OddOnly.lo \ libDI_Misc_MMX_la-DI_ScalerBob.lo \ libDI_Misc_MMX_la-DI_TomsMoComp.lo \ libDI_Misc_MMX_la-DI_TwoFrame.lo \ libDI_Misc_MMX_la-DI_VideoBob.lo \ libDI_Misc_MMX_la-DI_VideoWeave.lo \ libDI_Misc_MMX_la-DI_Weave.lo @CAN_COMPILE_MMX_TRUE@am_libDI_Misc_MMX_la_OBJECTS = $(am__objects_4) libDI_Misc_MMX_la_OBJECTS = $(am_libDI_Misc_MMX_la_OBJECTS) @CAN_COMPILE_MMX_TRUE@am_libDI_Misc_MMX_la_rpath = libDI_Misc_SSE_la_LIBADD = am__libDI_Misc_SSE_la_SOURCES_DIST = DI_Bob.c DI_EvenOnly.c \ DI_Greedy.c DI_Greedy2Frame.c DI_MoComp2.c DI_OddOnly.c \ DI_ScalerBob.c DI_TomsMoComp.c DI_TwoFrame.c DI_VideoBob.c \ DI_VideoWeave.c DI_Weave.c am__objects_5 = libDI_Misc_SSE_la-DI_Bob.lo \ libDI_Misc_SSE_la-DI_EvenOnly.lo \ libDI_Misc_SSE_la-DI_Greedy.lo \ libDI_Misc_SSE_la-DI_Greedy2Frame.lo \ libDI_Misc_SSE_la-DI_MoComp2.lo \ libDI_Misc_SSE_la-DI_OddOnly.lo \ libDI_Misc_SSE_la-DI_ScalerBob.lo \ libDI_Misc_SSE_la-DI_TomsMoComp.lo \ libDI_Misc_SSE_la-DI_TwoFrame.lo \ libDI_Misc_SSE_la-DI_VideoBob.lo \ libDI_Misc_SSE_la-DI_VideoWeave.lo \ libDI_Misc_SSE_la-DI_Weave.lo @CAN_COMPILE_SSE_TRUE@am_libDI_Misc_SSE_la_OBJECTS = $(am__objects_5) libDI_Misc_SSE_la_OBJECTS = $(am_libDI_Misc_SSE_la_OBJECTS) @CAN_COMPILE_SSE_TRUE@am_libDI_Misc_SSE_la_rpath = libDI_Misc_SSE2_la_LIBADD = am__libDI_Misc_SSE2_la_SOURCES_DIST = DI_Bob.c DI_EvenOnly.c \ DI_Greedy.c DI_Greedy2Frame.c DI_MoComp2.c DI_OddOnly.c \ DI_ScalerBob.c DI_TomsMoComp.c DI_TwoFrame.c DI_VideoBob.c \ DI_VideoWeave.c DI_Weave.c am__objects_6 = libDI_Misc_SSE2_la-DI_Bob.lo \ libDI_Misc_SSE2_la-DI_EvenOnly.lo \ libDI_Misc_SSE2_la-DI_Greedy.lo \ libDI_Misc_SSE2_la-DI_Greedy2Frame.lo \ libDI_Misc_SSE2_la-DI_MoComp2.lo \ libDI_Misc_SSE2_la-DI_OddOnly.lo \ libDI_Misc_SSE2_la-DI_ScalerBob.lo \ libDI_Misc_SSE2_la-DI_TomsMoComp.lo \ libDI_Misc_SSE2_la-DI_TwoFrame.lo \ libDI_Misc_SSE2_la-DI_VideoBob.lo \ libDI_Misc_SSE2_la-DI_VideoWeave.lo \ libDI_Misc_SSE2_la-DI_Weave.lo @CAN_COMPILE_SSE2_TRUE@am_libDI_Misc_SSE2_la_OBJECTS = \ @CAN_COMPILE_SSE2_TRUE@ $(am__objects_6) libDI_Misc_SSE2_la_OBJECTS = $(am_libDI_Misc_SSE2_la_OBJECTS) @CAN_COMPILE_SSE2_TRUE@am_libDI_Misc_SSE2_la_rpath = libDI_Misc_SSE3_la_LIBADD = am__libDI_Misc_SSE3_la_SOURCES_DIST = DI_Bob.c DI_EvenOnly.c \ DI_Greedy.c DI_Greedy2Frame.c DI_MoComp2.c DI_OddOnly.c \ DI_ScalerBob.c DI_TomsMoComp.c DI_TwoFrame.c DI_VideoBob.c \ DI_VideoWeave.c DI_Weave.c am__objects_7 = libDI_Misc_SSE3_la-DI_Bob.lo \ libDI_Misc_SSE3_la-DI_EvenOnly.lo \ libDI_Misc_SSE3_la-DI_Greedy.lo \ libDI_Misc_SSE3_la-DI_Greedy2Frame.lo \ libDI_Misc_SSE3_la-DI_MoComp2.lo \ libDI_Misc_SSE3_la-DI_OddOnly.lo \ libDI_Misc_SSE3_la-DI_ScalerBob.lo \ libDI_Misc_SSE3_la-DI_TomsMoComp.lo \ libDI_Misc_SSE3_la-DI_TwoFrame.lo \ libDI_Misc_SSE3_la-DI_VideoBob.lo \ libDI_Misc_SSE3_la-DI_VideoWeave.lo \ libDI_Misc_SSE3_la-DI_Weave.lo @CAN_COMPILE_SSE3_TRUE@am_libDI_Misc_SSE3_la_OBJECTS = \ @CAN_COMPILE_SSE3_TRUE@ $(am__objects_7) libDI_Misc_SSE3_la_OBJECTS = $(am_libDI_Misc_SSE3_la_OBJECTS) @CAN_COMPILE_SSE3_TRUE@am_libDI_Misc_SSE3_la_rpath = DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ SOURCES = $(libDI_Misc_la_SOURCES) $(libDI_Misc_3DNOW_la_SOURCES) \ $(libDI_Misc_ALTIVEC_la_SOURCES) $(libDI_Misc_MMX_la_SOURCES) \ $(libDI_Misc_SSE_la_SOURCES) $(libDI_Misc_SSE2_la_SOURCES) \ $(libDI_Misc_SSE3_la_SOURCES) DIST_SOURCES = $(libDI_Misc_la_SOURCES) \ $(am__libDI_Misc_3DNOW_la_SOURCES_DIST) \ $(am__libDI_Misc_ALTIVEC_la_SOURCES_DIST) \ $(am__libDI_Misc_MMX_la_SOURCES_DIST) \ $(am__libDI_Misc_SSE_la_SOURCES_DIST) \ $(am__libDI_Misc_SSE2_la_SOURCES_DIST) \ $(am__libDI_Misc_SSE3_la_SOURCES_DIST) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ ARTS_CFLAGS = @ARTS_CFLAGS@ ARTS_LIBS = @ARTS_LIBS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BUILD_DEINTERLACE_PLUGIN_FALSE = @BUILD_DEINTERLACE_PLUGIN_FALSE@ BUILD_DEINTERLACE_PLUGIN_TRUE = @BUILD_DEINTERLACE_PLUGIN_TRUE@ BUILD_MAN_FALSE = @BUILD_MAN_FALSE@ BUILD_MAN_TRUE = @BUILD_MAN_TRUE@ CAN_COMPILE_3DNOW_FALSE = @CAN_COMPILE_3DNOW_FALSE@ CAN_COMPILE_3DNOW_TRUE = @CAN_COMPILE_3DNOW_TRUE@ CAN_COMPILE_ALTIVEC_FALSE = @CAN_COMPILE_ALTIVEC_FALSE@ CAN_COMPILE_ALTIVEC_TRUE = @CAN_COMPILE_ALTIVEC_TRUE@ CAN_COMPILE_MMX_FALSE = @CAN_COMPILE_MMX_FALSE@ CAN_COMPILE_MMX_TRUE = @CAN_COMPILE_MMX_TRUE@ CAN_COMPILE_SSE2_FALSE = @CAN_COMPILE_SSE2_FALSE@ CAN_COMPILE_SSE2_TRUE = @CAN_COMPILE_SSE2_TRUE@ CAN_COMPILE_SSE3_FALSE = @CAN_COMPILE_SSE3_FALSE@ CAN_COMPILE_SSE3_TRUE = @CAN_COMPILE_SSE3_TRUE@ CAN_COMPILE_SSE_FALSE = @CAN_COMPILE_SSE_FALSE@ CAN_COMPILE_SSE_TRUE = @CAN_COMPILE_SSE_TRUE@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCAS = @CCAS@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ COMMON_INCLUDES = @COMMON_INCLUDES@ CONSOLEHELPER_LOCATION = @CONSOLEHELPER_LOCATION@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFAULT_CFLAGS = @DEFAULT_CFLAGS@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ESD_LIBS = @ESD_LIBS@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ GCONF_SCHEMAS_INSTALL_FALSE = @GCONF_SCHEMAS_INSTALL_FALSE@ GCONF_SCHEMAS_INSTALL_TRUE = @GCONF_SCHEMAS_INSTALL_TRUE@ GCONF_SCHEMA_CONFIG_SOURCE = @GCONF_SCHEMA_CONFIG_SOURCE@ GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@ GDK_PIXBUF_CSOURCE = @GDK_PIXBUF_CSOURCE@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ HAVE_GCC_LIMITS_FALSE = @HAVE_GCC_LIMITS_FALSE@ HAVE_GCC_LIMITS_TRUE = @HAVE_GCC_LIMITS_TRUE@ HAVE_LIBZVBI_FALSE = @HAVE_LIBZVBI_FALSE@ HAVE_LIBZVBI_TRUE = @HAVE_LIBZVBI_TRUE@ HAVE_X86_FALSE = @HAVE_X86_FALSE@ HAVE_X86_TRUE = @HAVE_X86_TRUE@ HAVE_XMU_FALSE = @HAVE_XMU_FALSE@ HAVE_XMU_TRUE = @HAVE_XMU_TRUE@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ INTLTOOL_CAVES_RULE = @INTLTOOL_CAVES_RULE@ INTLTOOL_DESKTOP_RULE = @INTLTOOL_DESKTOP_RULE@ INTLTOOL_DIRECTORY_RULE = @INTLTOOL_DIRECTORY_RULE@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ INTLTOOL_ICONV = @INTLTOOL_ICONV@ INTLTOOL_KBD_RULE = @INTLTOOL_KBD_RULE@ INTLTOOL_KEYS_RULE = @INTLTOOL_KEYS_RULE@ INTLTOOL_MERGE = @INTLTOOL_MERGE@ INTLTOOL_MSGFMT = @INTLTOOL_MSGFMT@ INTLTOOL_MSGMERGE = @INTLTOOL_MSGMERGE@ INTLTOOL_OAF_RULE = @INTLTOOL_OAF_RULE@ INTLTOOL_PERL = @INTLTOOL_PERL@ INTLTOOL_PONG_RULE = @INTLTOOL_PONG_RULE@ INTLTOOL_PROP_RULE = @INTLTOOL_PROP_RULE@ INTLTOOL_SCHEMAS_RULE = @INTLTOOL_SCHEMAS_RULE@ INTLTOOL_SERVER_RULE = @INTLTOOL_SERVER_RULE@ INTLTOOL_SHEET_RULE = @INTLTOOL_SHEET_RULE@ INTLTOOL_SOUNDLIST_RULE = @INTLTOOL_SOUNDLIST_RULE@ INTLTOOL_THEME_RULE = @INTLTOOL_THEME_RULE@ INTLTOOL_UI_RULE = @INTLTOOL_UI_RULE@ INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ INTLTOOL_XAM_RULE = @INTLTOOL_XAM_RULE@ INTLTOOL_XGETTEXT = @INTLTOOL_XGETTEXT@ INTLTOOL_XML_NOMERGE_RULE = @INTLTOOL_XML_NOMERGE_RULE@ INTLTOOL_XML_RULE = @INTLTOOL_XML_RULE@ JPEG_LIB = @JPEG_LIB@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBXML_CFLAGS = @LIBXML_CFLAGS@ LIBXML_LIBS = @LIBXML_LIBS@ LIRC_LIB = @LIRC_LIB@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAKEINFO = @MAKEINFO@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ NEED_ZSFB_FALSE = @NEED_ZSFB_FALSE@ NEED_ZSFB_TRUE = @NEED_ZSFB_TRUE@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_CFLAGS = @PACKAGE_CFLAGS@ PACKAGE_LIBS = @PACKAGE_LIBS@ PACKAGE_LIB_DIR = @PACKAGE_LIB_DIR@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_PIXMAPS_DIR = @PACKAGE_PIXMAPS_DIR@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PACKAGE_VERSION_ID = @PACKAGE_VERSION_ID@ PATH_SEPARATOR = @PATH_SEPARATOR@ PG_CFLAGS = @PG_CFLAGS@ PKG_CONFIG = @PKG_CONFIG@ PLUGIN_DEFAULT_DIR = @PLUGIN_DEFAULT_DIR@ PLUGIN_DEFAULT_FLAGS = @PLUGIN_DEFAULT_FLAGS@ PNG_LIBS = @PNG_LIBS@ POFILES = @POFILES@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ PYTHON_LIBS = @PYTHON_LIBS@ PY_CFLAGS = @PY_CFLAGS@ PY_EXTRA_LIBS = @PY_EXTRA_LIBS@ PY_LIBS = @PY_LIBS@ PY_LIB_LOC = @PY_LIB_LOC@ RANLIB = @RANLIB@ RTE_LIBS = @RTE_LIBS@ SCROLLKEEPER_BUILD_REQUIRED = @SCROLLKEEPER_BUILD_REQUIRED@ SCROLLKEEPER_CONFIG = @SCROLLKEEPER_CONFIG@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ SUID_ZSFB_FALSE = @SUID_ZSFB_FALSE@ SUID_ZSFB_TRUE = @SUID_ZSFB_TRUE@ UNICODE_CFLAGS = @UNICODE_CFLAGS@ UNICODE_LIBS = @UNICODE_LIBS@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ WARN_CFLAGS = @WARN_CFLAGS@ XGETTEXT = @XGETTEXT@ XMLCATALOG = @XMLCATALOG@ XML_CATALOG_FILE = @XML_CATALOG_FILE@ XSLTPROC = @XSLTPROC@ X_CFLAGS = @X_CFLAGS@ X_DPMS_LIBS = @X_DPMS_LIBS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ X_XF86DGA_LIBS = @X_XF86DGA_LIBS@ X_XF86VMODE_LIBS = @X_XF86VMODE_LIBS@ X_XINERAMA_LIBS = @X_XINERAMA_LIBS@ X_XMU_LIBS = @X_XMU_LIBS@ X_XV_LIBS = @X_XV_LIBS@ ZSFB_GROUP = @ZSFB_GROUP@ ZSFB_OWNER = @ZSFB_OWNER@ ZVBI_CFLAGS = @ZVBI_CFLAGS@ ZVBI_LIBS = @ZVBI_LIBS@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_STRIP = @ac_ct_STRIP@ ac_pt_PKG_CONFIG = @ac_pt_PKG_CONFIG@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ datadir = @datadir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ python_val = @python_val@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ # Note these are defaults, user CFLAGS take precedence. SIMD_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/plugins/deinterlace -O3 \ -fomit-frame-pointer -D_REENTRANT $(am__append_1) # TODO DI_OldGame.c SIMD_SOURCES = \ DI_Bob.c \ DI_EvenOnly.c \ DI_Greedy.c \ DI_Greedy2Frame.c \ DI_MoComp2.c \ DI_OddOnly.c \ DI_ScalerBob.c \ DI_TomsMoComp.c \ DI_TwoFrame.c \ DI_VideoBob.c \ DI_VideoWeave.c \ DI_Weave.c SIMD_LIBS = $(am__append_2) $(am__append_3) $(am__append_4) \ $(am__append_5) $(am__append_6) $(am__append_7) @CAN_COMPILE_MMX_TRUE@libDI_Misc_MMX_la_CFLAGS = $(SIMD_CFLAGS) -mmmx -DSIMD=CPU_FEATURE_MMX @CAN_COMPILE_MMX_TRUE@libDI_Misc_MMX_la_SOURCES = $(SIMD_SOURCES) @CAN_COMPILE_3DNOW_TRUE@libDI_Misc_3DNOW_la_CFLAGS = $(SIMD_CFLAGS) -m3dnow -DSIMD=CPU_FEATURE_3DNOW @CAN_COMPILE_3DNOW_TRUE@libDI_Misc_3DNOW_la_SOURCES = $(SIMD_SOURCES) @CAN_COMPILE_SSE_TRUE@libDI_Misc_SSE_la_CFLAGS = $(SIMD_CFLAGS) -msse -DSIMD=CPU_FEATURE_SSE_INT @CAN_COMPILE_SSE_TRUE@libDI_Misc_SSE_la_SOURCES = $(SIMD_SOURCES) @CAN_COMPILE_SSE2_TRUE@libDI_Misc_SSE2_la_CFLAGS = $(SIMD_CFLAGS) -msse2 -DSIMD=CPU_FEATURE_SSE2 @CAN_COMPILE_SSE2_TRUE@libDI_Misc_SSE2_la_SOURCES = $(SIMD_SOURCES) @CAN_COMPILE_SSE3_TRUE@libDI_Misc_SSE3_la_CFLAGS = $(SIMD_CFLAGS) -msse3 -DSIMD=CPU_FEATURE_SSE3 @CAN_COMPILE_SSE3_TRUE@libDI_Misc_SSE3_la_SOURCES = $(SIMD_SOURCES) @CAN_COMPILE_ALTIVEC_TRUE@libDI_Misc_ALTIVEC_la_CFLAGS = \ @CAN_COMPILE_ALTIVEC_TRUE@ $(SIMD_CFLAGS) \ @CAN_COMPILE_ALTIVEC_TRUE@ -maltivec -mabi=altivec -DSIMD=CPU_FEATURE_ALTIVEC @CAN_COMPILE_ALTIVEC_TRUE@libDI_Misc_ALTIVEC_la_SOURCES = $(SIMD_SOURCES) libDI_Misc_la_CFLAGS = \ -I$(top_srcdir) \ -I$(top_srcdir)/plugins/deinterlace # To do / removed # DI_Adaptive.c # DI_BlendedClip.c libDI_Misc_la_SOURCES = \ $(SIMD_SOURCES) libDI_Misc_la_LIBADD = \ $(SIMD_LIBS) noinst_LTLIBRARIES = \ $(SIMD_LIBS) \ libDI_Misc.la all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu plugins/deinterlace/DI_Misc/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu plugins/deinterlace/DI_Misc/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libDI_Misc.la: $(libDI_Misc_la_OBJECTS) $(libDI_Misc_la_DEPENDENCIES) $(LINK) $(libDI_Misc_la_LDFLAGS) $(libDI_Misc_la_OBJECTS) $(libDI_Misc_la_LIBADD) $(LIBS) libDI_Misc_3DNOW.la: $(libDI_Misc_3DNOW_la_OBJECTS) $(libDI_Misc_3DNOW_la_DEPENDENCIES) $(LINK) $(am_libDI_Misc_3DNOW_la_rpath) $(libDI_Misc_3DNOW_la_LDFLAGS) $(libDI_Misc_3DNOW_la_OBJECTS) $(libDI_Misc_3DNOW_la_LIBADD) $(LIBS) libDI_Misc_ALTIVEC.la: $(libDI_Misc_ALTIVEC_la_OBJECTS) $(libDI_Misc_ALTIVEC_la_DEPENDENCIES) $(LINK) $(am_libDI_Misc_ALTIVEC_la_rpath) $(libDI_Misc_ALTIVEC_la_LDFLAGS) $(libDI_Misc_ALTIVEC_la_OBJECTS) $(libDI_Misc_ALTIVEC_la_LIBADD) $(LIBS) libDI_Misc_MMX.la: $(libDI_Misc_MMX_la_OBJECTS) $(libDI_Misc_MMX_la_DEPENDENCIES) $(LINK) $(am_libDI_Misc_MMX_la_rpath) $(libDI_Misc_MMX_la_LDFLAGS) $(libDI_Misc_MMX_la_OBJECTS) $(libDI_Misc_MMX_la_LIBADD) $(LIBS) libDI_Misc_SSE.la: $(libDI_Misc_SSE_la_OBJECTS) $(libDI_Misc_SSE_la_DEPENDENCIES) $(LINK) $(am_libDI_Misc_SSE_la_rpath) $(libDI_Misc_SSE_la_LDFLAGS) $(libDI_Misc_SSE_la_OBJECTS) $(libDI_Misc_SSE_la_LIBADD) $(LIBS) libDI_Misc_SSE2.la: $(libDI_Misc_SSE2_la_OBJECTS) $(libDI_Misc_SSE2_la_DEPENDENCIES) $(LINK) $(am_libDI_Misc_SSE2_la_rpath) $(libDI_Misc_SSE2_la_LDFLAGS) $(libDI_Misc_SSE2_la_OBJECTS) $(libDI_Misc_SSE2_la_LIBADD) $(LIBS) libDI_Misc_SSE3.la: $(libDI_Misc_SSE3_la_OBJECTS) $(libDI_Misc_SSE3_la_DEPENDENCIES) $(LINK) $(am_libDI_Misc_SSE3_la_rpath) $(libDI_Misc_SSE3_la_LDFLAGS) $(libDI_Misc_SSE3_la_OBJECTS) $(libDI_Misc_SSE3_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libDI_Misc_3DNOW_la-DI_Bob.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libDI_Misc_3DNOW_la-DI_EvenOnly.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libDI_Misc_3DNOW_la-DI_Greedy.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libDI_Misc_3DNOW_la-DI_Greedy2Frame.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libDI_Misc_3DNOW_la-DI_MoComp2.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libDI_Misc_3DNOW_la-DI_OddOnly.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libDI_Misc_3DNOW_la-DI_ScalerBob.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libDI_Misc_3DNOW_la-DI_TomsMoComp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libDI_Misc_3DNOW_la-DI_TwoFrame.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libDI_Misc_3DNOW_la-DI_VideoBob.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libDI_Misc_3DNOW_la-DI_VideoWeave.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libDI_Misc_3DNOW_la-DI_Weave.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libDI_Misc_ALTIVEC_la-DI_Bob.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libDI_Misc_ALTIVEC_la-DI_EvenOnly.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libDI_Misc_ALTIVEC_la-DI_Greedy.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libDI_Misc_ALTIVEC_la-DI_Greedy2Frame.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libDI_Misc_ALTIVEC_la-DI_MoComp2.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libDI_Misc_ALTIVEC_la-DI_OddOnly.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libDI_Misc_ALTIVEC_la-DI_ScalerBob.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libDI_Misc_ALTIVEC_la-DI_TomsMoComp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libDI_Misc_ALTIVEC_la-DI_TwoFrame.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libDI_Misc_ALTIVEC_la-DI_VideoBob.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libDI_Misc_ALTIVEC_la-DI_VideoWeave.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libDI_Misc_ALTIVEC_la-DI_Weave.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libDI_Misc_MMX_la-DI_Bob.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libDI_Misc_MMX_la-DI_EvenOnly.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libDI_Misc_MMX_la-DI_Greedy.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libDI_Misc_MMX_la-DI_Greedy2Frame.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libDI_Misc_MMX_la-DI_MoComp2.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libDI_Misc_MMX_la-DI_OddOnly.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libDI_Misc_MMX_la-DI_ScalerBob.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libDI_Misc_MMX_la-DI_TomsMoComp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libDI_Misc_MMX_la-DI_TwoFrame.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libDI_Misc_MMX_la-DI_VideoBob.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libDI_Misc_MMX_la-DI_VideoWeave.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libDI_Misc_MMX_la-DI_Weave.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libDI_Misc_SSE2_la-DI_Bob.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libDI_Misc_SSE2_la-DI_EvenOnly.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libDI_Misc_SSE2_la-DI_Greedy.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libDI_Misc_SSE2_la-DI_Greedy2Frame.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libDI_Misc_SSE2_la-DI_MoComp2.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libDI_Misc_SSE2_la-DI_OddOnly.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libDI_Misc_SSE2_la-DI_ScalerBob.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libDI_Misc_SSE2_la-DI_TomsMoComp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libDI_Misc_SSE2_la-DI_TwoFrame.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libDI_Misc_SSE2_la-DI_VideoBob.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libDI_Misc_SSE2_la-DI_VideoWeave.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libDI_Misc_SSE2_la-DI_Weave.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libDI_Misc_SSE3_la-DI_Bob.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libDI_Misc_SSE3_la-DI_EvenOnly.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libDI_Misc_SSE3_la-DI_Greedy.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libDI_Misc_SSE3_la-DI_Greedy2Frame.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libDI_Misc_SSE3_la-DI_MoComp2.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libDI_Misc_SSE3_la-DI_OddOnly.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libDI_Misc_SSE3_la-DI_ScalerBob.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libDI_Misc_SSE3_la-DI_TomsMoComp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libDI_Misc_SSE3_la-DI_TwoFrame.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libDI_Misc_SSE3_la-DI_VideoBob.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libDI_Misc_SSE3_la-DI_VideoWeave.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libDI_Misc_SSE3_la-DI_Weave.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libDI_Misc_SSE_la-DI_Bob.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libDI_Misc_SSE_la-DI_EvenOnly.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libDI_Misc_SSE_la-DI_Greedy.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libDI_Misc_SSE_la-DI_Greedy2Frame.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libDI_Misc_SSE_la-DI_MoComp2.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libDI_Misc_SSE_la-DI_OddOnly.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libDI_Misc_SSE_la-DI_ScalerBob.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libDI_Misc_SSE_la-DI_TomsMoComp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libDI_Misc_SSE_la-DI_TwoFrame.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libDI_Misc_SSE_la-DI_VideoBob.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libDI_Misc_SSE_la-DI_VideoWeave.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libDI_Misc_SSE_la-DI_Weave.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libDI_Misc_la-DI_Bob.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libDI_Misc_la-DI_EvenOnly.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libDI_Misc_la-DI_Greedy.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libDI_Misc_la-DI_Greedy2Frame.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libDI_Misc_la-DI_MoComp2.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libDI_Misc_la-DI_OddOnly.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libDI_Misc_la-DI_ScalerBob.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libDI_Misc_la-DI_TomsMoComp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libDI_Misc_la-DI_TwoFrame.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libDI_Misc_la-DI_VideoBob.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libDI_Misc_la-DI_VideoWeave.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libDI_Misc_la-DI_Weave.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< libDI_Misc_la-DI_Bob.lo: DI_Bob.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_Misc_la_CFLAGS) $(CFLAGS) -MT libDI_Misc_la-DI_Bob.lo -MD -MP -MF "$(DEPDIR)/libDI_Misc_la-DI_Bob.Tpo" -c -o libDI_Misc_la-DI_Bob.lo `test -f 'DI_Bob.c' || echo '$(srcdir)/'`DI_Bob.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libDI_Misc_la-DI_Bob.Tpo" "$(DEPDIR)/libDI_Misc_la-DI_Bob.Plo"; else rm -f "$(DEPDIR)/libDI_Misc_la-DI_Bob.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='DI_Bob.c' object='libDI_Misc_la-DI_Bob.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_Misc_la_CFLAGS) $(CFLAGS) -c -o libDI_Misc_la-DI_Bob.lo `test -f 'DI_Bob.c' || echo '$(srcdir)/'`DI_Bob.c libDI_Misc_la-DI_EvenOnly.lo: DI_EvenOnly.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_Misc_la_CFLAGS) $(CFLAGS) -MT libDI_Misc_la-DI_EvenOnly.lo -MD -MP -MF "$(DEPDIR)/libDI_Misc_la-DI_EvenOnly.Tpo" -c -o libDI_Misc_la-DI_EvenOnly.lo `test -f 'DI_EvenOnly.c' || echo '$(srcdir)/'`DI_EvenOnly.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libDI_Misc_la-DI_EvenOnly.Tpo" "$(DEPDIR)/libDI_Misc_la-DI_EvenOnly.Plo"; else rm -f "$(DEPDIR)/libDI_Misc_la-DI_EvenOnly.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='DI_EvenOnly.c' object='libDI_Misc_la-DI_EvenOnly.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_Misc_la_CFLAGS) $(CFLAGS) -c -o libDI_Misc_la-DI_EvenOnly.lo `test -f 'DI_EvenOnly.c' || echo '$(srcdir)/'`DI_EvenOnly.c libDI_Misc_la-DI_Greedy.lo: DI_Greedy.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_Misc_la_CFLAGS) $(CFLAGS) -MT libDI_Misc_la-DI_Greedy.lo -MD -MP -MF "$(DEPDIR)/libDI_Misc_la-DI_Greedy.Tpo" -c -o libDI_Misc_la-DI_Greedy.lo `test -f 'DI_Greedy.c' || echo '$(srcdir)/'`DI_Greedy.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libDI_Misc_la-DI_Greedy.Tpo" "$(DEPDIR)/libDI_Misc_la-DI_Greedy.Plo"; else rm -f "$(DEPDIR)/libDI_Misc_la-DI_Greedy.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='DI_Greedy.c' object='libDI_Misc_la-DI_Greedy.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_Misc_la_CFLAGS) $(CFLAGS) -c -o libDI_Misc_la-DI_Greedy.lo `test -f 'DI_Greedy.c' || echo '$(srcdir)/'`DI_Greedy.c libDI_Misc_la-DI_Greedy2Frame.lo: DI_Greedy2Frame.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_Misc_la_CFLAGS) $(CFLAGS) -MT libDI_Misc_la-DI_Greedy2Frame.lo -MD -MP -MF "$(DEPDIR)/libDI_Misc_la-DI_Greedy2Frame.Tpo" -c -o libDI_Misc_la-DI_Greedy2Frame.lo `test -f 'DI_Greedy2Frame.c' || echo '$(srcdir)/'`DI_Greedy2Frame.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libDI_Misc_la-DI_Greedy2Frame.Tpo" "$(DEPDIR)/libDI_Misc_la-DI_Greedy2Frame.Plo"; else rm -f "$(DEPDIR)/libDI_Misc_la-DI_Greedy2Frame.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='DI_Greedy2Frame.c' object='libDI_Misc_la-DI_Greedy2Frame.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_Misc_la_CFLAGS) $(CFLAGS) -c -o libDI_Misc_la-DI_Greedy2Frame.lo `test -f 'DI_Greedy2Frame.c' || echo '$(srcdir)/'`DI_Greedy2Frame.c libDI_Misc_la-DI_MoComp2.lo: DI_MoComp2.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_Misc_la_CFLAGS) $(CFLAGS) -MT libDI_Misc_la-DI_MoComp2.lo -MD -MP -MF "$(DEPDIR)/libDI_Misc_la-DI_MoComp2.Tpo" -c -o libDI_Misc_la-DI_MoComp2.lo `test -f 'DI_MoComp2.c' || echo '$(srcdir)/'`DI_MoComp2.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libDI_Misc_la-DI_MoComp2.Tpo" "$(DEPDIR)/libDI_Misc_la-DI_MoComp2.Plo"; else rm -f "$(DEPDIR)/libDI_Misc_la-DI_MoComp2.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='DI_MoComp2.c' object='libDI_Misc_la-DI_MoComp2.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_Misc_la_CFLAGS) $(CFLAGS) -c -o libDI_Misc_la-DI_MoComp2.lo `test -f 'DI_MoComp2.c' || echo '$(srcdir)/'`DI_MoComp2.c libDI_Misc_la-DI_OddOnly.lo: DI_OddOnly.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_Misc_la_CFLAGS) $(CFLAGS) -MT libDI_Misc_la-DI_OddOnly.lo -MD -MP -MF "$(DEPDIR)/libDI_Misc_la-DI_OddOnly.Tpo" -c -o libDI_Misc_la-DI_OddOnly.lo `test -f 'DI_OddOnly.c' || echo '$(srcdir)/'`DI_OddOnly.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libDI_Misc_la-DI_OddOnly.Tpo" "$(DEPDIR)/libDI_Misc_la-DI_OddOnly.Plo"; else rm -f "$(DEPDIR)/libDI_Misc_la-DI_OddOnly.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='DI_OddOnly.c' object='libDI_Misc_la-DI_OddOnly.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_Misc_la_CFLAGS) $(CFLAGS) -c -o libDI_Misc_la-DI_OddOnly.lo `test -f 'DI_OddOnly.c' || echo '$(srcdir)/'`DI_OddOnly.c libDI_Misc_la-DI_ScalerBob.lo: DI_ScalerBob.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_Misc_la_CFLAGS) $(CFLAGS) -MT libDI_Misc_la-DI_ScalerBob.lo -MD -MP -MF "$(DEPDIR)/libDI_Misc_la-DI_ScalerBob.Tpo" -c -o libDI_Misc_la-DI_ScalerBob.lo `test -f 'DI_ScalerBob.c' || echo '$(srcdir)/'`DI_ScalerBob.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libDI_Misc_la-DI_ScalerBob.Tpo" "$(DEPDIR)/libDI_Misc_la-DI_ScalerBob.Plo"; else rm -f "$(DEPDIR)/libDI_Misc_la-DI_ScalerBob.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='DI_ScalerBob.c' object='libDI_Misc_la-DI_ScalerBob.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_Misc_la_CFLAGS) $(CFLAGS) -c -o libDI_Misc_la-DI_ScalerBob.lo `test -f 'DI_ScalerBob.c' || echo '$(srcdir)/'`DI_ScalerBob.c libDI_Misc_la-DI_TomsMoComp.lo: DI_TomsMoComp.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_Misc_la_CFLAGS) $(CFLAGS) -MT libDI_Misc_la-DI_TomsMoComp.lo -MD -MP -MF "$(DEPDIR)/libDI_Misc_la-DI_TomsMoComp.Tpo" -c -o libDI_Misc_la-DI_TomsMoComp.lo `test -f 'DI_TomsMoComp.c' || echo '$(srcdir)/'`DI_TomsMoComp.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libDI_Misc_la-DI_TomsMoComp.Tpo" "$(DEPDIR)/libDI_Misc_la-DI_TomsMoComp.Plo"; else rm -f "$(DEPDIR)/libDI_Misc_la-DI_TomsMoComp.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='DI_TomsMoComp.c' object='libDI_Misc_la-DI_TomsMoComp.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_Misc_la_CFLAGS) $(CFLAGS) -c -o libDI_Misc_la-DI_TomsMoComp.lo `test -f 'DI_TomsMoComp.c' || echo '$(srcdir)/'`DI_TomsMoComp.c libDI_Misc_la-DI_TwoFrame.lo: DI_TwoFrame.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_Misc_la_CFLAGS) $(CFLAGS) -MT libDI_Misc_la-DI_TwoFrame.lo -MD -MP -MF "$(DEPDIR)/libDI_Misc_la-DI_TwoFrame.Tpo" -c -o libDI_Misc_la-DI_TwoFrame.lo `test -f 'DI_TwoFrame.c' || echo '$(srcdir)/'`DI_TwoFrame.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libDI_Misc_la-DI_TwoFrame.Tpo" "$(DEPDIR)/libDI_Misc_la-DI_TwoFrame.Plo"; else rm -f "$(DEPDIR)/libDI_Misc_la-DI_TwoFrame.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='DI_TwoFrame.c' object='libDI_Misc_la-DI_TwoFrame.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_Misc_la_CFLAGS) $(CFLAGS) -c -o libDI_Misc_la-DI_TwoFrame.lo `test -f 'DI_TwoFrame.c' || echo '$(srcdir)/'`DI_TwoFrame.c libDI_Misc_la-DI_VideoBob.lo: DI_VideoBob.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_Misc_la_CFLAGS) $(CFLAGS) -MT libDI_Misc_la-DI_VideoBob.lo -MD -MP -MF "$(DEPDIR)/libDI_Misc_la-DI_VideoBob.Tpo" -c -o libDI_Misc_la-DI_VideoBob.lo `test -f 'DI_VideoBob.c' || echo '$(srcdir)/'`DI_VideoBob.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libDI_Misc_la-DI_VideoBob.Tpo" "$(DEPDIR)/libDI_Misc_la-DI_VideoBob.Plo"; else rm -f "$(DEPDIR)/libDI_Misc_la-DI_VideoBob.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='DI_VideoBob.c' object='libDI_Misc_la-DI_VideoBob.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_Misc_la_CFLAGS) $(CFLAGS) -c -o libDI_Misc_la-DI_VideoBob.lo `test -f 'DI_VideoBob.c' || echo '$(srcdir)/'`DI_VideoBob.c libDI_Misc_la-DI_VideoWeave.lo: DI_VideoWeave.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_Misc_la_CFLAGS) $(CFLAGS) -MT libDI_Misc_la-DI_VideoWeave.lo -MD -MP -MF "$(DEPDIR)/libDI_Misc_la-DI_VideoWeave.Tpo" -c -o libDI_Misc_la-DI_VideoWeave.lo `test -f 'DI_VideoWeave.c' || echo '$(srcdir)/'`DI_VideoWeave.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libDI_Misc_la-DI_VideoWeave.Tpo" "$(DEPDIR)/libDI_Misc_la-DI_VideoWeave.Plo"; else rm -f "$(DEPDIR)/libDI_Misc_la-DI_VideoWeave.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='DI_VideoWeave.c' object='libDI_Misc_la-DI_VideoWeave.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_Misc_la_CFLAGS) $(CFLAGS) -c -o libDI_Misc_la-DI_VideoWeave.lo `test -f 'DI_VideoWeave.c' || echo '$(srcdir)/'`DI_VideoWeave.c libDI_Misc_la-DI_Weave.lo: DI_Weave.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_Misc_la_CFLAGS) $(CFLAGS) -MT libDI_Misc_la-DI_Weave.lo -MD -MP -MF "$(DEPDIR)/libDI_Misc_la-DI_Weave.Tpo" -c -o libDI_Misc_la-DI_Weave.lo `test -f 'DI_Weave.c' || echo '$(srcdir)/'`DI_Weave.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libDI_Misc_la-DI_Weave.Tpo" "$(DEPDIR)/libDI_Misc_la-DI_Weave.Plo"; else rm -f "$(DEPDIR)/libDI_Misc_la-DI_Weave.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='DI_Weave.c' object='libDI_Misc_la-DI_Weave.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_Misc_la_CFLAGS) $(CFLAGS) -c -o libDI_Misc_la-DI_Weave.lo `test -f 'DI_Weave.c' || echo '$(srcdir)/'`DI_Weave.c libDI_Misc_3DNOW_la-DI_Bob.lo: DI_Bob.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_Misc_3DNOW_la_CFLAGS) $(CFLAGS) -MT libDI_Misc_3DNOW_la-DI_Bob.lo -MD -MP -MF "$(DEPDIR)/libDI_Misc_3DNOW_la-DI_Bob.Tpo" -c -o libDI_Misc_3DNOW_la-DI_Bob.lo `test -f 'DI_Bob.c' || echo '$(srcdir)/'`DI_Bob.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libDI_Misc_3DNOW_la-DI_Bob.Tpo" "$(DEPDIR)/libDI_Misc_3DNOW_la-DI_Bob.Plo"; else rm -f "$(DEPDIR)/libDI_Misc_3DNOW_la-DI_Bob.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='DI_Bob.c' object='libDI_Misc_3DNOW_la-DI_Bob.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_Misc_3DNOW_la_CFLAGS) $(CFLAGS) -c -o libDI_Misc_3DNOW_la-DI_Bob.lo `test -f 'DI_Bob.c' || echo '$(srcdir)/'`DI_Bob.c libDI_Misc_3DNOW_la-DI_EvenOnly.lo: DI_EvenOnly.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_Misc_3DNOW_la_CFLAGS) $(CFLAGS) -MT libDI_Misc_3DNOW_la-DI_EvenOnly.lo -MD -MP -MF "$(DEPDIR)/libDI_Misc_3DNOW_la-DI_EvenOnly.Tpo" -c -o libDI_Misc_3DNOW_la-DI_EvenOnly.lo `test -f 'DI_EvenOnly.c' || echo '$(srcdir)/'`DI_EvenOnly.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libDI_Misc_3DNOW_la-DI_EvenOnly.Tpo" "$(DEPDIR)/libDI_Misc_3DNOW_la-DI_EvenOnly.Plo"; else rm -f "$(DEPDIR)/libDI_Misc_3DNOW_la-DI_EvenOnly.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='DI_EvenOnly.c' object='libDI_Misc_3DNOW_la-DI_EvenOnly.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_Misc_3DNOW_la_CFLAGS) $(CFLAGS) -c -o libDI_Misc_3DNOW_la-DI_EvenOnly.lo `test -f 'DI_EvenOnly.c' || echo '$(srcdir)/'`DI_EvenOnly.c libDI_Misc_3DNOW_la-DI_Greedy.lo: DI_Greedy.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_Misc_3DNOW_la_CFLAGS) $(CFLAGS) -MT libDI_Misc_3DNOW_la-DI_Greedy.lo -MD -MP -MF "$(DEPDIR)/libDI_Misc_3DNOW_la-DI_Greedy.Tpo" -c -o libDI_Misc_3DNOW_la-DI_Greedy.lo `test -f 'DI_Greedy.c' || echo '$(srcdir)/'`DI_Greedy.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libDI_Misc_3DNOW_la-DI_Greedy.Tpo" "$(DEPDIR)/libDI_Misc_3DNOW_la-DI_Greedy.Plo"; else rm -f "$(DEPDIR)/libDI_Misc_3DNOW_la-DI_Greedy.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='DI_Greedy.c' object='libDI_Misc_3DNOW_la-DI_Greedy.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_Misc_3DNOW_la_CFLAGS) $(CFLAGS) -c -o libDI_Misc_3DNOW_la-DI_Greedy.lo `test -f 'DI_Greedy.c' || echo '$(srcdir)/'`DI_Greedy.c libDI_Misc_3DNOW_la-DI_Greedy2Frame.lo: DI_Greedy2Frame.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_Misc_3DNOW_la_CFLAGS) $(CFLAGS) -MT libDI_Misc_3DNOW_la-DI_Greedy2Frame.lo -MD -MP -MF "$(DEPDIR)/libDI_Misc_3DNOW_la-DI_Greedy2Frame.Tpo" -c -o libDI_Misc_3DNOW_la-DI_Greedy2Frame.lo `test -f 'DI_Greedy2Frame.c' || echo '$(srcdir)/'`DI_Greedy2Frame.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libDI_Misc_3DNOW_la-DI_Greedy2Frame.Tpo" "$(DEPDIR)/libDI_Misc_3DNOW_la-DI_Greedy2Frame.Plo"; else rm -f "$(DEPDIR)/libDI_Misc_3DNOW_la-DI_Greedy2Frame.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='DI_Greedy2Frame.c' object='libDI_Misc_3DNOW_la-DI_Greedy2Frame.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_Misc_3DNOW_la_CFLAGS) $(CFLAGS) -c -o libDI_Misc_3DNOW_la-DI_Greedy2Frame.lo `test -f 'DI_Greedy2Frame.c' || echo '$(srcdir)/'`DI_Greedy2Frame.c libDI_Misc_3DNOW_la-DI_MoComp2.lo: DI_MoComp2.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_Misc_3DNOW_la_CFLAGS) $(CFLAGS) -MT libDI_Misc_3DNOW_la-DI_MoComp2.lo -MD -MP -MF "$(DEPDIR)/libDI_Misc_3DNOW_la-DI_MoComp2.Tpo" -c -o libDI_Misc_3DNOW_la-DI_MoComp2.lo `test -f 'DI_MoComp2.c' || echo '$(srcdir)/'`DI_MoComp2.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libDI_Misc_3DNOW_la-DI_MoComp2.Tpo" "$(DEPDIR)/libDI_Misc_3DNOW_la-DI_MoComp2.Plo"; else rm -f "$(DEPDIR)/libDI_Misc_3DNOW_la-DI_MoComp2.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='DI_MoComp2.c' object='libDI_Misc_3DNOW_la-DI_MoComp2.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_Misc_3DNOW_la_CFLAGS) $(CFLAGS) -c -o libDI_Misc_3DNOW_la-DI_MoComp2.lo `test -f 'DI_MoComp2.c' || echo '$(srcdir)/'`DI_MoComp2.c libDI_Misc_3DNOW_la-DI_OddOnly.lo: DI_OddOnly.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_Misc_3DNOW_la_CFLAGS) $(CFLAGS) -MT libDI_Misc_3DNOW_la-DI_OddOnly.lo -MD -MP -MF "$(DEPDIR)/libDI_Misc_3DNOW_la-DI_OddOnly.Tpo" -c -o libDI_Misc_3DNOW_la-DI_OddOnly.lo `test -f 'DI_OddOnly.c' || echo '$(srcdir)/'`DI_OddOnly.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libDI_Misc_3DNOW_la-DI_OddOnly.Tpo" "$(DEPDIR)/libDI_Misc_3DNOW_la-DI_OddOnly.Plo"; else rm -f "$(DEPDIR)/libDI_Misc_3DNOW_la-DI_OddOnly.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='DI_OddOnly.c' object='libDI_Misc_3DNOW_la-DI_OddOnly.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_Misc_3DNOW_la_CFLAGS) $(CFLAGS) -c -o libDI_Misc_3DNOW_la-DI_OddOnly.lo `test -f 'DI_OddOnly.c' || echo '$(srcdir)/'`DI_OddOnly.c libDI_Misc_3DNOW_la-DI_ScalerBob.lo: DI_ScalerBob.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_Misc_3DNOW_la_CFLAGS) $(CFLAGS) -MT libDI_Misc_3DNOW_la-DI_ScalerBob.lo -MD -MP -MF "$(DEPDIR)/libDI_Misc_3DNOW_la-DI_ScalerBob.Tpo" -c -o libDI_Misc_3DNOW_la-DI_ScalerBob.lo `test -f 'DI_ScalerBob.c' || echo '$(srcdir)/'`DI_ScalerBob.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libDI_Misc_3DNOW_la-DI_ScalerBob.Tpo" "$(DEPDIR)/libDI_Misc_3DNOW_la-DI_ScalerBob.Plo"; else rm -f "$(DEPDIR)/libDI_Misc_3DNOW_la-DI_ScalerBob.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='DI_ScalerBob.c' object='libDI_Misc_3DNOW_la-DI_ScalerBob.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_Misc_3DNOW_la_CFLAGS) $(CFLAGS) -c -o libDI_Misc_3DNOW_la-DI_ScalerBob.lo `test -f 'DI_ScalerBob.c' || echo '$(srcdir)/'`DI_ScalerBob.c libDI_Misc_3DNOW_la-DI_TomsMoComp.lo: DI_TomsMoComp.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_Misc_3DNOW_la_CFLAGS) $(CFLAGS) -MT libDI_Misc_3DNOW_la-DI_TomsMoComp.lo -MD -MP -MF "$(DEPDIR)/libDI_Misc_3DNOW_la-DI_TomsMoComp.Tpo" -c -o libDI_Misc_3DNOW_la-DI_TomsMoComp.lo `test -f 'DI_TomsMoComp.c' || echo '$(srcdir)/'`DI_TomsMoComp.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libDI_Misc_3DNOW_la-DI_TomsMoComp.Tpo" "$(DEPDIR)/libDI_Misc_3DNOW_la-DI_TomsMoComp.Plo"; else rm -f "$(DEPDIR)/libDI_Misc_3DNOW_la-DI_TomsMoComp.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='DI_TomsMoComp.c' object='libDI_Misc_3DNOW_la-DI_TomsMoComp.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_Misc_3DNOW_la_CFLAGS) $(CFLAGS) -c -o libDI_Misc_3DNOW_la-DI_TomsMoComp.lo `test -f 'DI_TomsMoComp.c' || echo '$(srcdir)/'`DI_TomsMoComp.c libDI_Misc_3DNOW_la-DI_TwoFrame.lo: DI_TwoFrame.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_Misc_3DNOW_la_CFLAGS) $(CFLAGS) -MT libDI_Misc_3DNOW_la-DI_TwoFrame.lo -MD -MP -MF "$(DEPDIR)/libDI_Misc_3DNOW_la-DI_TwoFrame.Tpo" -c -o libDI_Misc_3DNOW_la-DI_TwoFrame.lo `test -f 'DI_TwoFrame.c' || echo '$(srcdir)/'`DI_TwoFrame.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libDI_Misc_3DNOW_la-DI_TwoFrame.Tpo" "$(DEPDIR)/libDI_Misc_3DNOW_la-DI_TwoFrame.Plo"; else rm -f "$(DEPDIR)/libDI_Misc_3DNOW_la-DI_TwoFrame.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='DI_TwoFrame.c' object='libDI_Misc_3DNOW_la-DI_TwoFrame.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_Misc_3DNOW_la_CFLAGS) $(CFLAGS) -c -o libDI_Misc_3DNOW_la-DI_TwoFrame.lo `test -f 'DI_TwoFrame.c' || echo '$(srcdir)/'`DI_TwoFrame.c libDI_Misc_3DNOW_la-DI_VideoBob.lo: DI_VideoBob.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_Misc_3DNOW_la_CFLAGS) $(CFLAGS) -MT libDI_Misc_3DNOW_la-DI_VideoBob.lo -MD -MP -MF "$(DEPDIR)/libDI_Misc_3DNOW_la-DI_VideoBob.Tpo" -c -o libDI_Misc_3DNOW_la-DI_VideoBob.lo `test -f 'DI_VideoBob.c' || echo '$(srcdir)/'`DI_VideoBob.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libDI_Misc_3DNOW_la-DI_VideoBob.Tpo" "$(DEPDIR)/libDI_Misc_3DNOW_la-DI_VideoBob.Plo"; else rm -f "$(DEPDIR)/libDI_Misc_3DNOW_la-DI_VideoBob.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='DI_VideoBob.c' object='libDI_Misc_3DNOW_la-DI_VideoBob.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_Misc_3DNOW_la_CFLAGS) $(CFLAGS) -c -o libDI_Misc_3DNOW_la-DI_VideoBob.lo `test -f 'DI_VideoBob.c' || echo '$(srcdir)/'`DI_VideoBob.c libDI_Misc_3DNOW_la-DI_VideoWeave.lo: DI_VideoWeave.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_Misc_3DNOW_la_CFLAGS) $(CFLAGS) -MT libDI_Misc_3DNOW_la-DI_VideoWeave.lo -MD -MP -MF "$(DEPDIR)/libDI_Misc_3DNOW_la-DI_VideoWeave.Tpo" -c -o libDI_Misc_3DNOW_la-DI_VideoWeave.lo `test -f 'DI_VideoWeave.c' || echo '$(srcdir)/'`DI_VideoWeave.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libDI_Misc_3DNOW_la-DI_VideoWeave.Tpo" "$(DEPDIR)/libDI_Misc_3DNOW_la-DI_VideoWeave.Plo"; else rm -f "$(DEPDIR)/libDI_Misc_3DNOW_la-DI_VideoWeave.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='DI_VideoWeave.c' object='libDI_Misc_3DNOW_la-DI_VideoWeave.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_Misc_3DNOW_la_CFLAGS) $(CFLAGS) -c -o libDI_Misc_3DNOW_la-DI_VideoWeave.lo `test -f 'DI_VideoWeave.c' || echo '$(srcdir)/'`DI_VideoWeave.c libDI_Misc_3DNOW_la-DI_Weave.lo: DI_Weave.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_Misc_3DNOW_la_CFLAGS) $(CFLAGS) -MT libDI_Misc_3DNOW_la-DI_Weave.lo -MD -MP -MF "$(DEPDIR)/libDI_Misc_3DNOW_la-DI_Weave.Tpo" -c -o libDI_Misc_3DNOW_la-DI_Weave.lo `test -f 'DI_Weave.c' || echo '$(srcdir)/'`DI_Weave.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libDI_Misc_3DNOW_la-DI_Weave.Tpo" "$(DEPDIR)/libDI_Misc_3DNOW_la-DI_Weave.Plo"; else rm -f "$(DEPDIR)/libDI_Misc_3DNOW_la-DI_Weave.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='DI_Weave.c' object='libDI_Misc_3DNOW_la-DI_Weave.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_Misc_3DNOW_la_CFLAGS) $(CFLAGS) -c -o libDI_Misc_3DNOW_la-DI_Weave.lo `test -f 'DI_Weave.c' || echo '$(srcdir)/'`DI_Weave.c libDI_Misc_ALTIVEC_la-DI_Bob.lo: DI_Bob.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_Misc_ALTIVEC_la_CFLAGS) $(CFLAGS) -MT libDI_Misc_ALTIVEC_la-DI_Bob.lo -MD -MP -MF "$(DEPDIR)/libDI_Misc_ALTIVEC_la-DI_Bob.Tpo" -c -o libDI_Misc_ALTIVEC_la-DI_Bob.lo `test -f 'DI_Bob.c' || echo '$(srcdir)/'`DI_Bob.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libDI_Misc_ALTIVEC_la-DI_Bob.Tpo" "$(DEPDIR)/libDI_Misc_ALTIVEC_la-DI_Bob.Plo"; else rm -f "$(DEPDIR)/libDI_Misc_ALTIVEC_la-DI_Bob.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='DI_Bob.c' object='libDI_Misc_ALTIVEC_la-DI_Bob.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_Misc_ALTIVEC_la_CFLAGS) $(CFLAGS) -c -o libDI_Misc_ALTIVEC_la-DI_Bob.lo `test -f 'DI_Bob.c' || echo '$(srcdir)/'`DI_Bob.c libDI_Misc_ALTIVEC_la-DI_EvenOnly.lo: DI_EvenOnly.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_Misc_ALTIVEC_la_CFLAGS) $(CFLAGS) -MT libDI_Misc_ALTIVEC_la-DI_EvenOnly.lo -MD -MP -MF "$(DEPDIR)/libDI_Misc_ALTIVEC_la-DI_EvenOnly.Tpo" -c -o libDI_Misc_ALTIVEC_la-DI_EvenOnly.lo `test -f 'DI_EvenOnly.c' || echo '$(srcdir)/'`DI_EvenOnly.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libDI_Misc_ALTIVEC_la-DI_EvenOnly.Tpo" "$(DEPDIR)/libDI_Misc_ALTIVEC_la-DI_EvenOnly.Plo"; else rm -f "$(DEPDIR)/libDI_Misc_ALTIVEC_la-DI_EvenOnly.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='DI_EvenOnly.c' object='libDI_Misc_ALTIVEC_la-DI_EvenOnly.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_Misc_ALTIVEC_la_CFLAGS) $(CFLAGS) -c -o libDI_Misc_ALTIVEC_la-DI_EvenOnly.lo `test -f 'DI_EvenOnly.c' || echo '$(srcdir)/'`DI_EvenOnly.c libDI_Misc_ALTIVEC_la-DI_Greedy.lo: DI_Greedy.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_Misc_ALTIVEC_la_CFLAGS) $(CFLAGS) -MT libDI_Misc_ALTIVEC_la-DI_Greedy.lo -MD -MP -MF "$(DEPDIR)/libDI_Misc_ALTIVEC_la-DI_Greedy.Tpo" -c -o libDI_Misc_ALTIVEC_la-DI_Greedy.lo `test -f 'DI_Greedy.c' || echo '$(srcdir)/'`DI_Greedy.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libDI_Misc_ALTIVEC_la-DI_Greedy.Tpo" "$(DEPDIR)/libDI_Misc_ALTIVEC_la-DI_Greedy.Plo"; else rm -f "$(DEPDIR)/libDI_Misc_ALTIVEC_la-DI_Greedy.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='DI_Greedy.c' object='libDI_Misc_ALTIVEC_la-DI_Greedy.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_Misc_ALTIVEC_la_CFLAGS) $(CFLAGS) -c -o libDI_Misc_ALTIVEC_la-DI_Greedy.lo `test -f 'DI_Greedy.c' || echo '$(srcdir)/'`DI_Greedy.c libDI_Misc_ALTIVEC_la-DI_Greedy2Frame.lo: DI_Greedy2Frame.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_Misc_ALTIVEC_la_CFLAGS) $(CFLAGS) -MT libDI_Misc_ALTIVEC_la-DI_Greedy2Frame.lo -MD -MP -MF "$(DEPDIR)/libDI_Misc_ALTIVEC_la-DI_Greedy2Frame.Tpo" -c -o libDI_Misc_ALTIVEC_la-DI_Greedy2Frame.lo `test -f 'DI_Greedy2Frame.c' || echo '$(srcdir)/'`DI_Greedy2Frame.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libDI_Misc_ALTIVEC_la-DI_Greedy2Frame.Tpo" "$(DEPDIR)/libDI_Misc_ALTIVEC_la-DI_Greedy2Frame.Plo"; else rm -f "$(DEPDIR)/libDI_Misc_ALTIVEC_la-DI_Greedy2Frame.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='DI_Greedy2Frame.c' object='libDI_Misc_ALTIVEC_la-DI_Greedy2Frame.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_Misc_ALTIVEC_la_CFLAGS) $(CFLAGS) -c -o libDI_Misc_ALTIVEC_la-DI_Greedy2Frame.lo `test -f 'DI_Greedy2Frame.c' || echo '$(srcdir)/'`DI_Greedy2Frame.c libDI_Misc_ALTIVEC_la-DI_MoComp2.lo: DI_MoComp2.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_Misc_ALTIVEC_la_CFLAGS) $(CFLAGS) -MT libDI_Misc_ALTIVEC_la-DI_MoComp2.lo -MD -MP -MF "$(DEPDIR)/libDI_Misc_ALTIVEC_la-DI_MoComp2.Tpo" -c -o libDI_Misc_ALTIVEC_la-DI_MoComp2.lo `test -f 'DI_MoComp2.c' || echo '$(srcdir)/'`DI_MoComp2.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libDI_Misc_ALTIVEC_la-DI_MoComp2.Tpo" "$(DEPDIR)/libDI_Misc_ALTIVEC_la-DI_MoComp2.Plo"; else rm -f "$(DEPDIR)/libDI_Misc_ALTIVEC_la-DI_MoComp2.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='DI_MoComp2.c' object='libDI_Misc_ALTIVEC_la-DI_MoComp2.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_Misc_ALTIVEC_la_CFLAGS) $(CFLAGS) -c -o libDI_Misc_ALTIVEC_la-DI_MoComp2.lo `test -f 'DI_MoComp2.c' || echo '$(srcdir)/'`DI_MoComp2.c libDI_Misc_ALTIVEC_la-DI_OddOnly.lo: DI_OddOnly.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_Misc_ALTIVEC_la_CFLAGS) $(CFLAGS) -MT libDI_Misc_ALTIVEC_la-DI_OddOnly.lo -MD -MP -MF "$(DEPDIR)/libDI_Misc_ALTIVEC_la-DI_OddOnly.Tpo" -c -o libDI_Misc_ALTIVEC_la-DI_OddOnly.lo `test -f 'DI_OddOnly.c' || echo '$(srcdir)/'`DI_OddOnly.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libDI_Misc_ALTIVEC_la-DI_OddOnly.Tpo" "$(DEPDIR)/libDI_Misc_ALTIVEC_la-DI_OddOnly.Plo"; else rm -f "$(DEPDIR)/libDI_Misc_ALTIVEC_la-DI_OddOnly.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='DI_OddOnly.c' object='libDI_Misc_ALTIVEC_la-DI_OddOnly.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_Misc_ALTIVEC_la_CFLAGS) $(CFLAGS) -c -o libDI_Misc_ALTIVEC_la-DI_OddOnly.lo `test -f 'DI_OddOnly.c' || echo '$(srcdir)/'`DI_OddOnly.c libDI_Misc_ALTIVEC_la-DI_ScalerBob.lo: DI_ScalerBob.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_Misc_ALTIVEC_la_CFLAGS) $(CFLAGS) -MT libDI_Misc_ALTIVEC_la-DI_ScalerBob.lo -MD -MP -MF "$(DEPDIR)/libDI_Misc_ALTIVEC_la-DI_ScalerBob.Tpo" -c -o libDI_Misc_ALTIVEC_la-DI_ScalerBob.lo `test -f 'DI_ScalerBob.c' || echo '$(srcdir)/'`DI_ScalerBob.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libDI_Misc_ALTIVEC_la-DI_ScalerBob.Tpo" "$(DEPDIR)/libDI_Misc_ALTIVEC_la-DI_ScalerBob.Plo"; else rm -f "$(DEPDIR)/libDI_Misc_ALTIVEC_la-DI_ScalerBob.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='DI_ScalerBob.c' object='libDI_Misc_ALTIVEC_la-DI_ScalerBob.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_Misc_ALTIVEC_la_CFLAGS) $(CFLAGS) -c -o libDI_Misc_ALTIVEC_la-DI_ScalerBob.lo `test -f 'DI_ScalerBob.c' || echo '$(srcdir)/'`DI_ScalerBob.c libDI_Misc_ALTIVEC_la-DI_TomsMoComp.lo: DI_TomsMoComp.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_Misc_ALTIVEC_la_CFLAGS) $(CFLAGS) -MT libDI_Misc_ALTIVEC_la-DI_TomsMoComp.lo -MD -MP -MF "$(DEPDIR)/libDI_Misc_ALTIVEC_la-DI_TomsMoComp.Tpo" -c -o libDI_Misc_ALTIVEC_la-DI_TomsMoComp.lo `test -f 'DI_TomsMoComp.c' || echo '$(srcdir)/'`DI_TomsMoComp.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libDI_Misc_ALTIVEC_la-DI_TomsMoComp.Tpo" "$(DEPDIR)/libDI_Misc_ALTIVEC_la-DI_TomsMoComp.Plo"; else rm -f "$(DEPDIR)/libDI_Misc_ALTIVEC_la-DI_TomsMoComp.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='DI_TomsMoComp.c' object='libDI_Misc_ALTIVEC_la-DI_TomsMoComp.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_Misc_ALTIVEC_la_CFLAGS) $(CFLAGS) -c -o libDI_Misc_ALTIVEC_la-DI_TomsMoComp.lo `test -f 'DI_TomsMoComp.c' || echo '$(srcdir)/'`DI_TomsMoComp.c libDI_Misc_ALTIVEC_la-DI_TwoFrame.lo: DI_TwoFrame.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_Misc_ALTIVEC_la_CFLAGS) $(CFLAGS) -MT libDI_Misc_ALTIVEC_la-DI_TwoFrame.lo -MD -MP -MF "$(DEPDIR)/libDI_Misc_ALTIVEC_la-DI_TwoFrame.Tpo" -c -o libDI_Misc_ALTIVEC_la-DI_TwoFrame.lo `test -f 'DI_TwoFrame.c' || echo '$(srcdir)/'`DI_TwoFrame.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libDI_Misc_ALTIVEC_la-DI_TwoFrame.Tpo" "$(DEPDIR)/libDI_Misc_ALTIVEC_la-DI_TwoFrame.Plo"; else rm -f "$(DEPDIR)/libDI_Misc_ALTIVEC_la-DI_TwoFrame.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='DI_TwoFrame.c' object='libDI_Misc_ALTIVEC_la-DI_TwoFrame.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_Misc_ALTIVEC_la_CFLAGS) $(CFLAGS) -c -o libDI_Misc_ALTIVEC_la-DI_TwoFrame.lo `test -f 'DI_TwoFrame.c' || echo '$(srcdir)/'`DI_TwoFrame.c libDI_Misc_ALTIVEC_la-DI_VideoBob.lo: DI_VideoBob.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_Misc_ALTIVEC_la_CFLAGS) $(CFLAGS) -MT libDI_Misc_ALTIVEC_la-DI_VideoBob.lo -MD -MP -MF "$(DEPDIR)/libDI_Misc_ALTIVEC_la-DI_VideoBob.Tpo" -c -o libDI_Misc_ALTIVEC_la-DI_VideoBob.lo `test -f 'DI_VideoBob.c' || echo '$(srcdir)/'`DI_VideoBob.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libDI_Misc_ALTIVEC_la-DI_VideoBob.Tpo" "$(DEPDIR)/libDI_Misc_ALTIVEC_la-DI_VideoBob.Plo"; else rm -f "$(DEPDIR)/libDI_Misc_ALTIVEC_la-DI_VideoBob.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='DI_VideoBob.c' object='libDI_Misc_ALTIVEC_la-DI_VideoBob.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_Misc_ALTIVEC_la_CFLAGS) $(CFLAGS) -c -o libDI_Misc_ALTIVEC_la-DI_VideoBob.lo `test -f 'DI_VideoBob.c' || echo '$(srcdir)/'`DI_VideoBob.c libDI_Misc_ALTIVEC_la-DI_VideoWeave.lo: DI_VideoWeave.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_Misc_ALTIVEC_la_CFLAGS) $(CFLAGS) -MT libDI_Misc_ALTIVEC_la-DI_VideoWeave.lo -MD -MP -MF "$(DEPDIR)/libDI_Misc_ALTIVEC_la-DI_VideoWeave.Tpo" -c -o libDI_Misc_ALTIVEC_la-DI_VideoWeave.lo `test -f 'DI_VideoWeave.c' || echo '$(srcdir)/'`DI_VideoWeave.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libDI_Misc_ALTIVEC_la-DI_VideoWeave.Tpo" "$(DEPDIR)/libDI_Misc_ALTIVEC_la-DI_VideoWeave.Plo"; else rm -f "$(DEPDIR)/libDI_Misc_ALTIVEC_la-DI_VideoWeave.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='DI_VideoWeave.c' object='libDI_Misc_ALTIVEC_la-DI_VideoWeave.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_Misc_ALTIVEC_la_CFLAGS) $(CFLAGS) -c -o libDI_Misc_ALTIVEC_la-DI_VideoWeave.lo `test -f 'DI_VideoWeave.c' || echo '$(srcdir)/'`DI_VideoWeave.c libDI_Misc_ALTIVEC_la-DI_Weave.lo: DI_Weave.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_Misc_ALTIVEC_la_CFLAGS) $(CFLAGS) -MT libDI_Misc_ALTIVEC_la-DI_Weave.lo -MD -MP -MF "$(DEPDIR)/libDI_Misc_ALTIVEC_la-DI_Weave.Tpo" -c -o libDI_Misc_ALTIVEC_la-DI_Weave.lo `test -f 'DI_Weave.c' || echo '$(srcdir)/'`DI_Weave.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libDI_Misc_ALTIVEC_la-DI_Weave.Tpo" "$(DEPDIR)/libDI_Misc_ALTIVEC_la-DI_Weave.Plo"; else rm -f "$(DEPDIR)/libDI_Misc_ALTIVEC_la-DI_Weave.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='DI_Weave.c' object='libDI_Misc_ALTIVEC_la-DI_Weave.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_Misc_ALTIVEC_la_CFLAGS) $(CFLAGS) -c -o libDI_Misc_ALTIVEC_la-DI_Weave.lo `test -f 'DI_Weave.c' || echo '$(srcdir)/'`DI_Weave.c libDI_Misc_MMX_la-DI_Bob.lo: DI_Bob.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_Misc_MMX_la_CFLAGS) $(CFLAGS) -MT libDI_Misc_MMX_la-DI_Bob.lo -MD -MP -MF "$(DEPDIR)/libDI_Misc_MMX_la-DI_Bob.Tpo" -c -o libDI_Misc_MMX_la-DI_Bob.lo `test -f 'DI_Bob.c' || echo '$(srcdir)/'`DI_Bob.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libDI_Misc_MMX_la-DI_Bob.Tpo" "$(DEPDIR)/libDI_Misc_MMX_la-DI_Bob.Plo"; else rm -f "$(DEPDIR)/libDI_Misc_MMX_la-DI_Bob.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='DI_Bob.c' object='libDI_Misc_MMX_la-DI_Bob.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_Misc_MMX_la_CFLAGS) $(CFLAGS) -c -o libDI_Misc_MMX_la-DI_Bob.lo `test -f 'DI_Bob.c' || echo '$(srcdir)/'`DI_Bob.c libDI_Misc_MMX_la-DI_EvenOnly.lo: DI_EvenOnly.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_Misc_MMX_la_CFLAGS) $(CFLAGS) -MT libDI_Misc_MMX_la-DI_EvenOnly.lo -MD -MP -MF "$(DEPDIR)/libDI_Misc_MMX_la-DI_EvenOnly.Tpo" -c -o libDI_Misc_MMX_la-DI_EvenOnly.lo `test -f 'DI_EvenOnly.c' || echo '$(srcdir)/'`DI_EvenOnly.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libDI_Misc_MMX_la-DI_EvenOnly.Tpo" "$(DEPDIR)/libDI_Misc_MMX_la-DI_EvenOnly.Plo"; else rm -f "$(DEPDIR)/libDI_Misc_MMX_la-DI_EvenOnly.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='DI_EvenOnly.c' object='libDI_Misc_MMX_la-DI_EvenOnly.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_Misc_MMX_la_CFLAGS) $(CFLAGS) -c -o libDI_Misc_MMX_la-DI_EvenOnly.lo `test -f 'DI_EvenOnly.c' || echo '$(srcdir)/'`DI_EvenOnly.c libDI_Misc_MMX_la-DI_Greedy.lo: DI_Greedy.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_Misc_MMX_la_CFLAGS) $(CFLAGS) -MT libDI_Misc_MMX_la-DI_Greedy.lo -MD -MP -MF "$(DEPDIR)/libDI_Misc_MMX_la-DI_Greedy.Tpo" -c -o libDI_Misc_MMX_la-DI_Greedy.lo `test -f 'DI_Greedy.c' || echo '$(srcdir)/'`DI_Greedy.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libDI_Misc_MMX_la-DI_Greedy.Tpo" "$(DEPDIR)/libDI_Misc_MMX_la-DI_Greedy.Plo"; else rm -f "$(DEPDIR)/libDI_Misc_MMX_la-DI_Greedy.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='DI_Greedy.c' object='libDI_Misc_MMX_la-DI_Greedy.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_Misc_MMX_la_CFLAGS) $(CFLAGS) -c -o libDI_Misc_MMX_la-DI_Greedy.lo `test -f 'DI_Greedy.c' || echo '$(srcdir)/'`DI_Greedy.c libDI_Misc_MMX_la-DI_Greedy2Frame.lo: DI_Greedy2Frame.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_Misc_MMX_la_CFLAGS) $(CFLAGS) -MT libDI_Misc_MMX_la-DI_Greedy2Frame.lo -MD -MP -MF "$(DEPDIR)/libDI_Misc_MMX_la-DI_Greedy2Frame.Tpo" -c -o libDI_Misc_MMX_la-DI_Greedy2Frame.lo `test -f 'DI_Greedy2Frame.c' || echo '$(srcdir)/'`DI_Greedy2Frame.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libDI_Misc_MMX_la-DI_Greedy2Frame.Tpo" "$(DEPDIR)/libDI_Misc_MMX_la-DI_Greedy2Frame.Plo"; else rm -f "$(DEPDIR)/libDI_Misc_MMX_la-DI_Greedy2Frame.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='DI_Greedy2Frame.c' object='libDI_Misc_MMX_la-DI_Greedy2Frame.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_Misc_MMX_la_CFLAGS) $(CFLAGS) -c -o libDI_Misc_MMX_la-DI_Greedy2Frame.lo `test -f 'DI_Greedy2Frame.c' || echo '$(srcdir)/'`DI_Greedy2Frame.c libDI_Misc_MMX_la-DI_MoComp2.lo: DI_MoComp2.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_Misc_MMX_la_CFLAGS) $(CFLAGS) -MT libDI_Misc_MMX_la-DI_MoComp2.lo -MD -MP -MF "$(DEPDIR)/libDI_Misc_MMX_la-DI_MoComp2.Tpo" -c -o libDI_Misc_MMX_la-DI_MoComp2.lo `test -f 'DI_MoComp2.c' || echo '$(srcdir)/'`DI_MoComp2.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libDI_Misc_MMX_la-DI_MoComp2.Tpo" "$(DEPDIR)/libDI_Misc_MMX_la-DI_MoComp2.Plo"; else rm -f "$(DEPDIR)/libDI_Misc_MMX_la-DI_MoComp2.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='DI_MoComp2.c' object='libDI_Misc_MMX_la-DI_MoComp2.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_Misc_MMX_la_CFLAGS) $(CFLAGS) -c -o libDI_Misc_MMX_la-DI_MoComp2.lo `test -f 'DI_MoComp2.c' || echo '$(srcdir)/'`DI_MoComp2.c libDI_Misc_MMX_la-DI_OddOnly.lo: DI_OddOnly.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_Misc_MMX_la_CFLAGS) $(CFLAGS) -MT libDI_Misc_MMX_la-DI_OddOnly.lo -MD -MP -MF "$(DEPDIR)/libDI_Misc_MMX_la-DI_OddOnly.Tpo" -c -o libDI_Misc_MMX_la-DI_OddOnly.lo `test -f 'DI_OddOnly.c' || echo '$(srcdir)/'`DI_OddOnly.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libDI_Misc_MMX_la-DI_OddOnly.Tpo" "$(DEPDIR)/libDI_Misc_MMX_la-DI_OddOnly.Plo"; else rm -f "$(DEPDIR)/libDI_Misc_MMX_la-DI_OddOnly.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='DI_OddOnly.c' object='libDI_Misc_MMX_la-DI_OddOnly.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_Misc_MMX_la_CFLAGS) $(CFLAGS) -c -o libDI_Misc_MMX_la-DI_OddOnly.lo `test -f 'DI_OddOnly.c' || echo '$(srcdir)/'`DI_OddOnly.c libDI_Misc_MMX_la-DI_ScalerBob.lo: DI_ScalerBob.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_Misc_MMX_la_CFLAGS) $(CFLAGS) -MT libDI_Misc_MMX_la-DI_ScalerBob.lo -MD -MP -MF "$(DEPDIR)/libDI_Misc_MMX_la-DI_ScalerBob.Tpo" -c -o libDI_Misc_MMX_la-DI_ScalerBob.lo `test -f 'DI_ScalerBob.c' || echo '$(srcdir)/'`DI_ScalerBob.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libDI_Misc_MMX_la-DI_ScalerBob.Tpo" "$(DEPDIR)/libDI_Misc_MMX_la-DI_ScalerBob.Plo"; else rm -f "$(DEPDIR)/libDI_Misc_MMX_la-DI_ScalerBob.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='DI_ScalerBob.c' object='libDI_Misc_MMX_la-DI_ScalerBob.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_Misc_MMX_la_CFLAGS) $(CFLAGS) -c -o libDI_Misc_MMX_la-DI_ScalerBob.lo `test -f 'DI_ScalerBob.c' || echo '$(srcdir)/'`DI_ScalerBob.c libDI_Misc_MMX_la-DI_TomsMoComp.lo: DI_TomsMoComp.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_Misc_MMX_la_CFLAGS) $(CFLAGS) -MT libDI_Misc_MMX_la-DI_TomsMoComp.lo -MD -MP -MF "$(DEPDIR)/libDI_Misc_MMX_la-DI_TomsMoComp.Tpo" -c -o libDI_Misc_MMX_la-DI_TomsMoComp.lo `test -f 'DI_TomsMoComp.c' || echo '$(srcdir)/'`DI_TomsMoComp.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libDI_Misc_MMX_la-DI_TomsMoComp.Tpo" "$(DEPDIR)/libDI_Misc_MMX_la-DI_TomsMoComp.Plo"; else rm -f "$(DEPDIR)/libDI_Misc_MMX_la-DI_TomsMoComp.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='DI_TomsMoComp.c' object='libDI_Misc_MMX_la-DI_TomsMoComp.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_Misc_MMX_la_CFLAGS) $(CFLAGS) -c -o libDI_Misc_MMX_la-DI_TomsMoComp.lo `test -f 'DI_TomsMoComp.c' || echo '$(srcdir)/'`DI_TomsMoComp.c libDI_Misc_MMX_la-DI_TwoFrame.lo: DI_TwoFrame.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_Misc_MMX_la_CFLAGS) $(CFLAGS) -MT libDI_Misc_MMX_la-DI_TwoFrame.lo -MD -MP -MF "$(DEPDIR)/libDI_Misc_MMX_la-DI_TwoFrame.Tpo" -c -o libDI_Misc_MMX_la-DI_TwoFrame.lo `test -f 'DI_TwoFrame.c' || echo '$(srcdir)/'`DI_TwoFrame.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libDI_Misc_MMX_la-DI_TwoFrame.Tpo" "$(DEPDIR)/libDI_Misc_MMX_la-DI_TwoFrame.Plo"; else rm -f "$(DEPDIR)/libDI_Misc_MMX_la-DI_TwoFrame.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='DI_TwoFrame.c' object='libDI_Misc_MMX_la-DI_TwoFrame.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_Misc_MMX_la_CFLAGS) $(CFLAGS) -c -o libDI_Misc_MMX_la-DI_TwoFrame.lo `test -f 'DI_TwoFrame.c' || echo '$(srcdir)/'`DI_TwoFrame.c libDI_Misc_MMX_la-DI_VideoBob.lo: DI_VideoBob.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_Misc_MMX_la_CFLAGS) $(CFLAGS) -MT libDI_Misc_MMX_la-DI_VideoBob.lo -MD -MP -MF "$(DEPDIR)/libDI_Misc_MMX_la-DI_VideoBob.Tpo" -c -o libDI_Misc_MMX_la-DI_VideoBob.lo `test -f 'DI_VideoBob.c' || echo '$(srcdir)/'`DI_VideoBob.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libDI_Misc_MMX_la-DI_VideoBob.Tpo" "$(DEPDIR)/libDI_Misc_MMX_la-DI_VideoBob.Plo"; else rm -f "$(DEPDIR)/libDI_Misc_MMX_la-DI_VideoBob.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='DI_VideoBob.c' object='libDI_Misc_MMX_la-DI_VideoBob.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_Misc_MMX_la_CFLAGS) $(CFLAGS) -c -o libDI_Misc_MMX_la-DI_VideoBob.lo `test -f 'DI_VideoBob.c' || echo '$(srcdir)/'`DI_VideoBob.c libDI_Misc_MMX_la-DI_VideoWeave.lo: DI_VideoWeave.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_Misc_MMX_la_CFLAGS) $(CFLAGS) -MT libDI_Misc_MMX_la-DI_VideoWeave.lo -MD -MP -MF "$(DEPDIR)/libDI_Misc_MMX_la-DI_VideoWeave.Tpo" -c -o libDI_Misc_MMX_la-DI_VideoWeave.lo `test -f 'DI_VideoWeave.c' || echo '$(srcdir)/'`DI_VideoWeave.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libDI_Misc_MMX_la-DI_VideoWeave.Tpo" "$(DEPDIR)/libDI_Misc_MMX_la-DI_VideoWeave.Plo"; else rm -f "$(DEPDIR)/libDI_Misc_MMX_la-DI_VideoWeave.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='DI_VideoWeave.c' object='libDI_Misc_MMX_la-DI_VideoWeave.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_Misc_MMX_la_CFLAGS) $(CFLAGS) -c -o libDI_Misc_MMX_la-DI_VideoWeave.lo `test -f 'DI_VideoWeave.c' || echo '$(srcdir)/'`DI_VideoWeave.c libDI_Misc_MMX_la-DI_Weave.lo: DI_Weave.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_Misc_MMX_la_CFLAGS) $(CFLAGS) -MT libDI_Misc_MMX_la-DI_Weave.lo -MD -MP -MF "$(DEPDIR)/libDI_Misc_MMX_la-DI_Weave.Tpo" -c -o libDI_Misc_MMX_la-DI_Weave.lo `test -f 'DI_Weave.c' || echo '$(srcdir)/'`DI_Weave.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libDI_Misc_MMX_la-DI_Weave.Tpo" "$(DEPDIR)/libDI_Misc_MMX_la-DI_Weave.Plo"; else rm -f "$(DEPDIR)/libDI_Misc_MMX_la-DI_Weave.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='DI_Weave.c' object='libDI_Misc_MMX_la-DI_Weave.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_Misc_MMX_la_CFLAGS) $(CFLAGS) -c -o libDI_Misc_MMX_la-DI_Weave.lo `test -f 'DI_Weave.c' || echo '$(srcdir)/'`DI_Weave.c libDI_Misc_SSE_la-DI_Bob.lo: DI_Bob.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_Misc_SSE_la_CFLAGS) $(CFLAGS) -MT libDI_Misc_SSE_la-DI_Bob.lo -MD -MP -MF "$(DEPDIR)/libDI_Misc_SSE_la-DI_Bob.Tpo" -c -o libDI_Misc_SSE_la-DI_Bob.lo `test -f 'DI_Bob.c' || echo '$(srcdir)/'`DI_Bob.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libDI_Misc_SSE_la-DI_Bob.Tpo" "$(DEPDIR)/libDI_Misc_SSE_la-DI_Bob.Plo"; else rm -f "$(DEPDIR)/libDI_Misc_SSE_la-DI_Bob.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='DI_Bob.c' object='libDI_Misc_SSE_la-DI_Bob.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_Misc_SSE_la_CFLAGS) $(CFLAGS) -c -o libDI_Misc_SSE_la-DI_Bob.lo `test -f 'DI_Bob.c' || echo '$(srcdir)/'`DI_Bob.c libDI_Misc_SSE_la-DI_EvenOnly.lo: DI_EvenOnly.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_Misc_SSE_la_CFLAGS) $(CFLAGS) -MT libDI_Misc_SSE_la-DI_EvenOnly.lo -MD -MP -MF "$(DEPDIR)/libDI_Misc_SSE_la-DI_EvenOnly.Tpo" -c -o libDI_Misc_SSE_la-DI_EvenOnly.lo `test -f 'DI_EvenOnly.c' || echo '$(srcdir)/'`DI_EvenOnly.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libDI_Misc_SSE_la-DI_EvenOnly.Tpo" "$(DEPDIR)/libDI_Misc_SSE_la-DI_EvenOnly.Plo"; else rm -f "$(DEPDIR)/libDI_Misc_SSE_la-DI_EvenOnly.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='DI_EvenOnly.c' object='libDI_Misc_SSE_la-DI_EvenOnly.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_Misc_SSE_la_CFLAGS) $(CFLAGS) -c -o libDI_Misc_SSE_la-DI_EvenOnly.lo `test -f 'DI_EvenOnly.c' || echo '$(srcdir)/'`DI_EvenOnly.c libDI_Misc_SSE_la-DI_Greedy.lo: DI_Greedy.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_Misc_SSE_la_CFLAGS) $(CFLAGS) -MT libDI_Misc_SSE_la-DI_Greedy.lo -MD -MP -MF "$(DEPDIR)/libDI_Misc_SSE_la-DI_Greedy.Tpo" -c -o libDI_Misc_SSE_la-DI_Greedy.lo `test -f 'DI_Greedy.c' || echo '$(srcdir)/'`DI_Greedy.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libDI_Misc_SSE_la-DI_Greedy.Tpo" "$(DEPDIR)/libDI_Misc_SSE_la-DI_Greedy.Plo"; else rm -f "$(DEPDIR)/libDI_Misc_SSE_la-DI_Greedy.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='DI_Greedy.c' object='libDI_Misc_SSE_la-DI_Greedy.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_Misc_SSE_la_CFLAGS) $(CFLAGS) -c -o libDI_Misc_SSE_la-DI_Greedy.lo `test -f 'DI_Greedy.c' || echo '$(srcdir)/'`DI_Greedy.c libDI_Misc_SSE_la-DI_Greedy2Frame.lo: DI_Greedy2Frame.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_Misc_SSE_la_CFLAGS) $(CFLAGS) -MT libDI_Misc_SSE_la-DI_Greedy2Frame.lo -MD -MP -MF "$(DEPDIR)/libDI_Misc_SSE_la-DI_Greedy2Frame.Tpo" -c -o libDI_Misc_SSE_la-DI_Greedy2Frame.lo `test -f 'DI_Greedy2Frame.c' || echo '$(srcdir)/'`DI_Greedy2Frame.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libDI_Misc_SSE_la-DI_Greedy2Frame.Tpo" "$(DEPDIR)/libDI_Misc_SSE_la-DI_Greedy2Frame.Plo"; else rm -f "$(DEPDIR)/libDI_Misc_SSE_la-DI_Greedy2Frame.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='DI_Greedy2Frame.c' object='libDI_Misc_SSE_la-DI_Greedy2Frame.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_Misc_SSE_la_CFLAGS) $(CFLAGS) -c -o libDI_Misc_SSE_la-DI_Greedy2Frame.lo `test -f 'DI_Greedy2Frame.c' || echo '$(srcdir)/'`DI_Greedy2Frame.c libDI_Misc_SSE_la-DI_MoComp2.lo: DI_MoComp2.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_Misc_SSE_la_CFLAGS) $(CFLAGS) -MT libDI_Misc_SSE_la-DI_MoComp2.lo -MD -MP -MF "$(DEPDIR)/libDI_Misc_SSE_la-DI_MoComp2.Tpo" -c -o libDI_Misc_SSE_la-DI_MoComp2.lo `test -f 'DI_MoComp2.c' || echo '$(srcdir)/'`DI_MoComp2.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libDI_Misc_SSE_la-DI_MoComp2.Tpo" "$(DEPDIR)/libDI_Misc_SSE_la-DI_MoComp2.Plo"; else rm -f "$(DEPDIR)/libDI_Misc_SSE_la-DI_MoComp2.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='DI_MoComp2.c' object='libDI_Misc_SSE_la-DI_MoComp2.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_Misc_SSE_la_CFLAGS) $(CFLAGS) -c -o libDI_Misc_SSE_la-DI_MoComp2.lo `test -f 'DI_MoComp2.c' || echo '$(srcdir)/'`DI_MoComp2.c libDI_Misc_SSE_la-DI_OddOnly.lo: DI_OddOnly.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_Misc_SSE_la_CFLAGS) $(CFLAGS) -MT libDI_Misc_SSE_la-DI_OddOnly.lo -MD -MP -MF "$(DEPDIR)/libDI_Misc_SSE_la-DI_OddOnly.Tpo" -c -o libDI_Misc_SSE_la-DI_OddOnly.lo `test -f 'DI_OddOnly.c' || echo '$(srcdir)/'`DI_OddOnly.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libDI_Misc_SSE_la-DI_OddOnly.Tpo" "$(DEPDIR)/libDI_Misc_SSE_la-DI_OddOnly.Plo"; else rm -f "$(DEPDIR)/libDI_Misc_SSE_la-DI_OddOnly.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='DI_OddOnly.c' object='libDI_Misc_SSE_la-DI_OddOnly.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_Misc_SSE_la_CFLAGS) $(CFLAGS) -c -o libDI_Misc_SSE_la-DI_OddOnly.lo `test -f 'DI_OddOnly.c' || echo '$(srcdir)/'`DI_OddOnly.c libDI_Misc_SSE_la-DI_ScalerBob.lo: DI_ScalerBob.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_Misc_SSE_la_CFLAGS) $(CFLAGS) -MT libDI_Misc_SSE_la-DI_ScalerBob.lo -MD -MP -MF "$(DEPDIR)/libDI_Misc_SSE_la-DI_ScalerBob.Tpo" -c -o libDI_Misc_SSE_la-DI_ScalerBob.lo `test -f 'DI_ScalerBob.c' || echo '$(srcdir)/'`DI_ScalerBob.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libDI_Misc_SSE_la-DI_ScalerBob.Tpo" "$(DEPDIR)/libDI_Misc_SSE_la-DI_ScalerBob.Plo"; else rm -f "$(DEPDIR)/libDI_Misc_SSE_la-DI_ScalerBob.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='DI_ScalerBob.c' object='libDI_Misc_SSE_la-DI_ScalerBob.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_Misc_SSE_la_CFLAGS) $(CFLAGS) -c -o libDI_Misc_SSE_la-DI_ScalerBob.lo `test -f 'DI_ScalerBob.c' || echo '$(srcdir)/'`DI_ScalerBob.c libDI_Misc_SSE_la-DI_TomsMoComp.lo: DI_TomsMoComp.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_Misc_SSE_la_CFLAGS) $(CFLAGS) -MT libDI_Misc_SSE_la-DI_TomsMoComp.lo -MD -MP -MF "$(DEPDIR)/libDI_Misc_SSE_la-DI_TomsMoComp.Tpo" -c -o libDI_Misc_SSE_la-DI_TomsMoComp.lo `test -f 'DI_TomsMoComp.c' || echo '$(srcdir)/'`DI_TomsMoComp.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libDI_Misc_SSE_la-DI_TomsMoComp.Tpo" "$(DEPDIR)/libDI_Misc_SSE_la-DI_TomsMoComp.Plo"; else rm -f "$(DEPDIR)/libDI_Misc_SSE_la-DI_TomsMoComp.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='DI_TomsMoComp.c' object='libDI_Misc_SSE_la-DI_TomsMoComp.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_Misc_SSE_la_CFLAGS) $(CFLAGS) -c -o libDI_Misc_SSE_la-DI_TomsMoComp.lo `test -f 'DI_TomsMoComp.c' || echo '$(srcdir)/'`DI_TomsMoComp.c libDI_Misc_SSE_la-DI_TwoFrame.lo: DI_TwoFrame.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_Misc_SSE_la_CFLAGS) $(CFLAGS) -MT libDI_Misc_SSE_la-DI_TwoFrame.lo -MD -MP -MF "$(DEPDIR)/libDI_Misc_SSE_la-DI_TwoFrame.Tpo" -c -o libDI_Misc_SSE_la-DI_TwoFrame.lo `test -f 'DI_TwoFrame.c' || echo '$(srcdir)/'`DI_TwoFrame.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libDI_Misc_SSE_la-DI_TwoFrame.Tpo" "$(DEPDIR)/libDI_Misc_SSE_la-DI_TwoFrame.Plo"; else rm -f "$(DEPDIR)/libDI_Misc_SSE_la-DI_TwoFrame.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='DI_TwoFrame.c' object='libDI_Misc_SSE_la-DI_TwoFrame.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_Misc_SSE_la_CFLAGS) $(CFLAGS) -c -o libDI_Misc_SSE_la-DI_TwoFrame.lo `test -f 'DI_TwoFrame.c' || echo '$(srcdir)/'`DI_TwoFrame.c libDI_Misc_SSE_la-DI_VideoBob.lo: DI_VideoBob.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_Misc_SSE_la_CFLAGS) $(CFLAGS) -MT libDI_Misc_SSE_la-DI_VideoBob.lo -MD -MP -MF "$(DEPDIR)/libDI_Misc_SSE_la-DI_VideoBob.Tpo" -c -o libDI_Misc_SSE_la-DI_VideoBob.lo `test -f 'DI_VideoBob.c' || echo '$(srcdir)/'`DI_VideoBob.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libDI_Misc_SSE_la-DI_VideoBob.Tpo" "$(DEPDIR)/libDI_Misc_SSE_la-DI_VideoBob.Plo"; else rm -f "$(DEPDIR)/libDI_Misc_SSE_la-DI_VideoBob.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='DI_VideoBob.c' object='libDI_Misc_SSE_la-DI_VideoBob.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_Misc_SSE_la_CFLAGS) $(CFLAGS) -c -o libDI_Misc_SSE_la-DI_VideoBob.lo `test -f 'DI_VideoBob.c' || echo '$(srcdir)/'`DI_VideoBob.c libDI_Misc_SSE_la-DI_VideoWeave.lo: DI_VideoWeave.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_Misc_SSE_la_CFLAGS) $(CFLAGS) -MT libDI_Misc_SSE_la-DI_VideoWeave.lo -MD -MP -MF "$(DEPDIR)/libDI_Misc_SSE_la-DI_VideoWeave.Tpo" -c -o libDI_Misc_SSE_la-DI_VideoWeave.lo `test -f 'DI_VideoWeave.c' || echo '$(srcdir)/'`DI_VideoWeave.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libDI_Misc_SSE_la-DI_VideoWeave.Tpo" "$(DEPDIR)/libDI_Misc_SSE_la-DI_VideoWeave.Plo"; else rm -f "$(DEPDIR)/libDI_Misc_SSE_la-DI_VideoWeave.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='DI_VideoWeave.c' object='libDI_Misc_SSE_la-DI_VideoWeave.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_Misc_SSE_la_CFLAGS) $(CFLAGS) -c -o libDI_Misc_SSE_la-DI_VideoWeave.lo `test -f 'DI_VideoWeave.c' || echo '$(srcdir)/'`DI_VideoWeave.c libDI_Misc_SSE_la-DI_Weave.lo: DI_Weave.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_Misc_SSE_la_CFLAGS) $(CFLAGS) -MT libDI_Misc_SSE_la-DI_Weave.lo -MD -MP -MF "$(DEPDIR)/libDI_Misc_SSE_la-DI_Weave.Tpo" -c -o libDI_Misc_SSE_la-DI_Weave.lo `test -f 'DI_Weave.c' || echo '$(srcdir)/'`DI_Weave.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libDI_Misc_SSE_la-DI_Weave.Tpo" "$(DEPDIR)/libDI_Misc_SSE_la-DI_Weave.Plo"; else rm -f "$(DEPDIR)/libDI_Misc_SSE_la-DI_Weave.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='DI_Weave.c' object='libDI_Misc_SSE_la-DI_Weave.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_Misc_SSE_la_CFLAGS) $(CFLAGS) -c -o libDI_Misc_SSE_la-DI_Weave.lo `test -f 'DI_Weave.c' || echo '$(srcdir)/'`DI_Weave.c libDI_Misc_SSE2_la-DI_Bob.lo: DI_Bob.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_Misc_SSE2_la_CFLAGS) $(CFLAGS) -MT libDI_Misc_SSE2_la-DI_Bob.lo -MD -MP -MF "$(DEPDIR)/libDI_Misc_SSE2_la-DI_Bob.Tpo" -c -o libDI_Misc_SSE2_la-DI_Bob.lo `test -f 'DI_Bob.c' || echo '$(srcdir)/'`DI_Bob.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libDI_Misc_SSE2_la-DI_Bob.Tpo" "$(DEPDIR)/libDI_Misc_SSE2_la-DI_Bob.Plo"; else rm -f "$(DEPDIR)/libDI_Misc_SSE2_la-DI_Bob.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='DI_Bob.c' object='libDI_Misc_SSE2_la-DI_Bob.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_Misc_SSE2_la_CFLAGS) $(CFLAGS) -c -o libDI_Misc_SSE2_la-DI_Bob.lo `test -f 'DI_Bob.c' || echo '$(srcdir)/'`DI_Bob.c libDI_Misc_SSE2_la-DI_EvenOnly.lo: DI_EvenOnly.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_Misc_SSE2_la_CFLAGS) $(CFLAGS) -MT libDI_Misc_SSE2_la-DI_EvenOnly.lo -MD -MP -MF "$(DEPDIR)/libDI_Misc_SSE2_la-DI_EvenOnly.Tpo" -c -o libDI_Misc_SSE2_la-DI_EvenOnly.lo `test -f 'DI_EvenOnly.c' || echo '$(srcdir)/'`DI_EvenOnly.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libDI_Misc_SSE2_la-DI_EvenOnly.Tpo" "$(DEPDIR)/libDI_Misc_SSE2_la-DI_EvenOnly.Plo"; else rm -f "$(DEPDIR)/libDI_Misc_SSE2_la-DI_EvenOnly.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='DI_EvenOnly.c' object='libDI_Misc_SSE2_la-DI_EvenOnly.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_Misc_SSE2_la_CFLAGS) $(CFLAGS) -c -o libDI_Misc_SSE2_la-DI_EvenOnly.lo `test -f 'DI_EvenOnly.c' || echo '$(srcdir)/'`DI_EvenOnly.c libDI_Misc_SSE2_la-DI_Greedy.lo: DI_Greedy.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_Misc_SSE2_la_CFLAGS) $(CFLAGS) -MT libDI_Misc_SSE2_la-DI_Greedy.lo -MD -MP -MF "$(DEPDIR)/libDI_Misc_SSE2_la-DI_Greedy.Tpo" -c -o libDI_Misc_SSE2_la-DI_Greedy.lo `test -f 'DI_Greedy.c' || echo '$(srcdir)/'`DI_Greedy.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libDI_Misc_SSE2_la-DI_Greedy.Tpo" "$(DEPDIR)/libDI_Misc_SSE2_la-DI_Greedy.Plo"; else rm -f "$(DEPDIR)/libDI_Misc_SSE2_la-DI_Greedy.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='DI_Greedy.c' object='libDI_Misc_SSE2_la-DI_Greedy.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_Misc_SSE2_la_CFLAGS) $(CFLAGS) -c -o libDI_Misc_SSE2_la-DI_Greedy.lo `test -f 'DI_Greedy.c' || echo '$(srcdir)/'`DI_Greedy.c libDI_Misc_SSE2_la-DI_Greedy2Frame.lo: DI_Greedy2Frame.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_Misc_SSE2_la_CFLAGS) $(CFLAGS) -MT libDI_Misc_SSE2_la-DI_Greedy2Frame.lo -MD -MP -MF "$(DEPDIR)/libDI_Misc_SSE2_la-DI_Greedy2Frame.Tpo" -c -o libDI_Misc_SSE2_la-DI_Greedy2Frame.lo `test -f 'DI_Greedy2Frame.c' || echo '$(srcdir)/'`DI_Greedy2Frame.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libDI_Misc_SSE2_la-DI_Greedy2Frame.Tpo" "$(DEPDIR)/libDI_Misc_SSE2_la-DI_Greedy2Frame.Plo"; else rm -f "$(DEPDIR)/libDI_Misc_SSE2_la-DI_Greedy2Frame.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='DI_Greedy2Frame.c' object='libDI_Misc_SSE2_la-DI_Greedy2Frame.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_Misc_SSE2_la_CFLAGS) $(CFLAGS) -c -o libDI_Misc_SSE2_la-DI_Greedy2Frame.lo `test -f 'DI_Greedy2Frame.c' || echo '$(srcdir)/'`DI_Greedy2Frame.c libDI_Misc_SSE2_la-DI_MoComp2.lo: DI_MoComp2.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_Misc_SSE2_la_CFLAGS) $(CFLAGS) -MT libDI_Misc_SSE2_la-DI_MoComp2.lo -MD -MP -MF "$(DEPDIR)/libDI_Misc_SSE2_la-DI_MoComp2.Tpo" -c -o libDI_Misc_SSE2_la-DI_MoComp2.lo `test -f 'DI_MoComp2.c' || echo '$(srcdir)/'`DI_MoComp2.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libDI_Misc_SSE2_la-DI_MoComp2.Tpo" "$(DEPDIR)/libDI_Misc_SSE2_la-DI_MoComp2.Plo"; else rm -f "$(DEPDIR)/libDI_Misc_SSE2_la-DI_MoComp2.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='DI_MoComp2.c' object='libDI_Misc_SSE2_la-DI_MoComp2.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_Misc_SSE2_la_CFLAGS) $(CFLAGS) -c -o libDI_Misc_SSE2_la-DI_MoComp2.lo `test -f 'DI_MoComp2.c' || echo '$(srcdir)/'`DI_MoComp2.c libDI_Misc_SSE2_la-DI_OddOnly.lo: DI_OddOnly.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_Misc_SSE2_la_CFLAGS) $(CFLAGS) -MT libDI_Misc_SSE2_la-DI_OddOnly.lo -MD -MP -MF "$(DEPDIR)/libDI_Misc_SSE2_la-DI_OddOnly.Tpo" -c -o libDI_Misc_SSE2_la-DI_OddOnly.lo `test -f 'DI_OddOnly.c' || echo '$(srcdir)/'`DI_OddOnly.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libDI_Misc_SSE2_la-DI_OddOnly.Tpo" "$(DEPDIR)/libDI_Misc_SSE2_la-DI_OddOnly.Plo"; else rm -f "$(DEPDIR)/libDI_Misc_SSE2_la-DI_OddOnly.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='DI_OddOnly.c' object='libDI_Misc_SSE2_la-DI_OddOnly.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_Misc_SSE2_la_CFLAGS) $(CFLAGS) -c -o libDI_Misc_SSE2_la-DI_OddOnly.lo `test -f 'DI_OddOnly.c' || echo '$(srcdir)/'`DI_OddOnly.c libDI_Misc_SSE2_la-DI_ScalerBob.lo: DI_ScalerBob.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_Misc_SSE2_la_CFLAGS) $(CFLAGS) -MT libDI_Misc_SSE2_la-DI_ScalerBob.lo -MD -MP -MF "$(DEPDIR)/libDI_Misc_SSE2_la-DI_ScalerBob.Tpo" -c -o libDI_Misc_SSE2_la-DI_ScalerBob.lo `test -f 'DI_ScalerBob.c' || echo '$(srcdir)/'`DI_ScalerBob.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libDI_Misc_SSE2_la-DI_ScalerBob.Tpo" "$(DEPDIR)/libDI_Misc_SSE2_la-DI_ScalerBob.Plo"; else rm -f "$(DEPDIR)/libDI_Misc_SSE2_la-DI_ScalerBob.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='DI_ScalerBob.c' object='libDI_Misc_SSE2_la-DI_ScalerBob.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_Misc_SSE2_la_CFLAGS) $(CFLAGS) -c -o libDI_Misc_SSE2_la-DI_ScalerBob.lo `test -f 'DI_ScalerBob.c' || echo '$(srcdir)/'`DI_ScalerBob.c libDI_Misc_SSE2_la-DI_TomsMoComp.lo: DI_TomsMoComp.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_Misc_SSE2_la_CFLAGS) $(CFLAGS) -MT libDI_Misc_SSE2_la-DI_TomsMoComp.lo -MD -MP -MF "$(DEPDIR)/libDI_Misc_SSE2_la-DI_TomsMoComp.Tpo" -c -o libDI_Misc_SSE2_la-DI_TomsMoComp.lo `test -f 'DI_TomsMoComp.c' || echo '$(srcdir)/'`DI_TomsMoComp.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libDI_Misc_SSE2_la-DI_TomsMoComp.Tpo" "$(DEPDIR)/libDI_Misc_SSE2_la-DI_TomsMoComp.Plo"; else rm -f "$(DEPDIR)/libDI_Misc_SSE2_la-DI_TomsMoComp.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='DI_TomsMoComp.c' object='libDI_Misc_SSE2_la-DI_TomsMoComp.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_Misc_SSE2_la_CFLAGS) $(CFLAGS) -c -o libDI_Misc_SSE2_la-DI_TomsMoComp.lo `test -f 'DI_TomsMoComp.c' || echo '$(srcdir)/'`DI_TomsMoComp.c libDI_Misc_SSE2_la-DI_TwoFrame.lo: DI_TwoFrame.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_Misc_SSE2_la_CFLAGS) $(CFLAGS) -MT libDI_Misc_SSE2_la-DI_TwoFrame.lo -MD -MP -MF "$(DEPDIR)/libDI_Misc_SSE2_la-DI_TwoFrame.Tpo" -c -o libDI_Misc_SSE2_la-DI_TwoFrame.lo `test -f 'DI_TwoFrame.c' || echo '$(srcdir)/'`DI_TwoFrame.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libDI_Misc_SSE2_la-DI_TwoFrame.Tpo" "$(DEPDIR)/libDI_Misc_SSE2_la-DI_TwoFrame.Plo"; else rm -f "$(DEPDIR)/libDI_Misc_SSE2_la-DI_TwoFrame.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='DI_TwoFrame.c' object='libDI_Misc_SSE2_la-DI_TwoFrame.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_Misc_SSE2_la_CFLAGS) $(CFLAGS) -c -o libDI_Misc_SSE2_la-DI_TwoFrame.lo `test -f 'DI_TwoFrame.c' || echo '$(srcdir)/'`DI_TwoFrame.c libDI_Misc_SSE2_la-DI_VideoBob.lo: DI_VideoBob.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_Misc_SSE2_la_CFLAGS) $(CFLAGS) -MT libDI_Misc_SSE2_la-DI_VideoBob.lo -MD -MP -MF "$(DEPDIR)/libDI_Misc_SSE2_la-DI_VideoBob.Tpo" -c -o libDI_Misc_SSE2_la-DI_VideoBob.lo `test -f 'DI_VideoBob.c' || echo '$(srcdir)/'`DI_VideoBob.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libDI_Misc_SSE2_la-DI_VideoBob.Tpo" "$(DEPDIR)/libDI_Misc_SSE2_la-DI_VideoBob.Plo"; else rm -f "$(DEPDIR)/libDI_Misc_SSE2_la-DI_VideoBob.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='DI_VideoBob.c' object='libDI_Misc_SSE2_la-DI_VideoBob.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_Misc_SSE2_la_CFLAGS) $(CFLAGS) -c -o libDI_Misc_SSE2_la-DI_VideoBob.lo `test -f 'DI_VideoBob.c' || echo '$(srcdir)/'`DI_VideoBob.c libDI_Misc_SSE2_la-DI_VideoWeave.lo: DI_VideoWeave.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_Misc_SSE2_la_CFLAGS) $(CFLAGS) -MT libDI_Misc_SSE2_la-DI_VideoWeave.lo -MD -MP -MF "$(DEPDIR)/libDI_Misc_SSE2_la-DI_VideoWeave.Tpo" -c -o libDI_Misc_SSE2_la-DI_VideoWeave.lo `test -f 'DI_VideoWeave.c' || echo '$(srcdir)/'`DI_VideoWeave.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libDI_Misc_SSE2_la-DI_VideoWeave.Tpo" "$(DEPDIR)/libDI_Misc_SSE2_la-DI_VideoWeave.Plo"; else rm -f "$(DEPDIR)/libDI_Misc_SSE2_la-DI_VideoWeave.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='DI_VideoWeave.c' object='libDI_Misc_SSE2_la-DI_VideoWeave.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_Misc_SSE2_la_CFLAGS) $(CFLAGS) -c -o libDI_Misc_SSE2_la-DI_VideoWeave.lo `test -f 'DI_VideoWeave.c' || echo '$(srcdir)/'`DI_VideoWeave.c libDI_Misc_SSE2_la-DI_Weave.lo: DI_Weave.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_Misc_SSE2_la_CFLAGS) $(CFLAGS) -MT libDI_Misc_SSE2_la-DI_Weave.lo -MD -MP -MF "$(DEPDIR)/libDI_Misc_SSE2_la-DI_Weave.Tpo" -c -o libDI_Misc_SSE2_la-DI_Weave.lo `test -f 'DI_Weave.c' || echo '$(srcdir)/'`DI_Weave.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libDI_Misc_SSE2_la-DI_Weave.Tpo" "$(DEPDIR)/libDI_Misc_SSE2_la-DI_Weave.Plo"; else rm -f "$(DEPDIR)/libDI_Misc_SSE2_la-DI_Weave.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='DI_Weave.c' object='libDI_Misc_SSE2_la-DI_Weave.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_Misc_SSE2_la_CFLAGS) $(CFLAGS) -c -o libDI_Misc_SSE2_la-DI_Weave.lo `test -f 'DI_Weave.c' || echo '$(srcdir)/'`DI_Weave.c libDI_Misc_SSE3_la-DI_Bob.lo: DI_Bob.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_Misc_SSE3_la_CFLAGS) $(CFLAGS) -MT libDI_Misc_SSE3_la-DI_Bob.lo -MD -MP -MF "$(DEPDIR)/libDI_Misc_SSE3_la-DI_Bob.Tpo" -c -o libDI_Misc_SSE3_la-DI_Bob.lo `test -f 'DI_Bob.c' || echo '$(srcdir)/'`DI_Bob.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libDI_Misc_SSE3_la-DI_Bob.Tpo" "$(DEPDIR)/libDI_Misc_SSE3_la-DI_Bob.Plo"; else rm -f "$(DEPDIR)/libDI_Misc_SSE3_la-DI_Bob.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='DI_Bob.c' object='libDI_Misc_SSE3_la-DI_Bob.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_Misc_SSE3_la_CFLAGS) $(CFLAGS) -c -o libDI_Misc_SSE3_la-DI_Bob.lo `test -f 'DI_Bob.c' || echo '$(srcdir)/'`DI_Bob.c libDI_Misc_SSE3_la-DI_EvenOnly.lo: DI_EvenOnly.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_Misc_SSE3_la_CFLAGS) $(CFLAGS) -MT libDI_Misc_SSE3_la-DI_EvenOnly.lo -MD -MP -MF "$(DEPDIR)/libDI_Misc_SSE3_la-DI_EvenOnly.Tpo" -c -o libDI_Misc_SSE3_la-DI_EvenOnly.lo `test -f 'DI_EvenOnly.c' || echo '$(srcdir)/'`DI_EvenOnly.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libDI_Misc_SSE3_la-DI_EvenOnly.Tpo" "$(DEPDIR)/libDI_Misc_SSE3_la-DI_EvenOnly.Plo"; else rm -f "$(DEPDIR)/libDI_Misc_SSE3_la-DI_EvenOnly.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='DI_EvenOnly.c' object='libDI_Misc_SSE3_la-DI_EvenOnly.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_Misc_SSE3_la_CFLAGS) $(CFLAGS) -c -o libDI_Misc_SSE3_la-DI_EvenOnly.lo `test -f 'DI_EvenOnly.c' || echo '$(srcdir)/'`DI_EvenOnly.c libDI_Misc_SSE3_la-DI_Greedy.lo: DI_Greedy.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_Misc_SSE3_la_CFLAGS) $(CFLAGS) -MT libDI_Misc_SSE3_la-DI_Greedy.lo -MD -MP -MF "$(DEPDIR)/libDI_Misc_SSE3_la-DI_Greedy.Tpo" -c -o libDI_Misc_SSE3_la-DI_Greedy.lo `test -f 'DI_Greedy.c' || echo '$(srcdir)/'`DI_Greedy.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libDI_Misc_SSE3_la-DI_Greedy.Tpo" "$(DEPDIR)/libDI_Misc_SSE3_la-DI_Greedy.Plo"; else rm -f "$(DEPDIR)/libDI_Misc_SSE3_la-DI_Greedy.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='DI_Greedy.c' object='libDI_Misc_SSE3_la-DI_Greedy.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_Misc_SSE3_la_CFLAGS) $(CFLAGS) -c -o libDI_Misc_SSE3_la-DI_Greedy.lo `test -f 'DI_Greedy.c' || echo '$(srcdir)/'`DI_Greedy.c libDI_Misc_SSE3_la-DI_Greedy2Frame.lo: DI_Greedy2Frame.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_Misc_SSE3_la_CFLAGS) $(CFLAGS) -MT libDI_Misc_SSE3_la-DI_Greedy2Frame.lo -MD -MP -MF "$(DEPDIR)/libDI_Misc_SSE3_la-DI_Greedy2Frame.Tpo" -c -o libDI_Misc_SSE3_la-DI_Greedy2Frame.lo `test -f 'DI_Greedy2Frame.c' || echo '$(srcdir)/'`DI_Greedy2Frame.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libDI_Misc_SSE3_la-DI_Greedy2Frame.Tpo" "$(DEPDIR)/libDI_Misc_SSE3_la-DI_Greedy2Frame.Plo"; else rm -f "$(DEPDIR)/libDI_Misc_SSE3_la-DI_Greedy2Frame.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='DI_Greedy2Frame.c' object='libDI_Misc_SSE3_la-DI_Greedy2Frame.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_Misc_SSE3_la_CFLAGS) $(CFLAGS) -c -o libDI_Misc_SSE3_la-DI_Greedy2Frame.lo `test -f 'DI_Greedy2Frame.c' || echo '$(srcdir)/'`DI_Greedy2Frame.c libDI_Misc_SSE3_la-DI_MoComp2.lo: DI_MoComp2.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_Misc_SSE3_la_CFLAGS) $(CFLAGS) -MT libDI_Misc_SSE3_la-DI_MoComp2.lo -MD -MP -MF "$(DEPDIR)/libDI_Misc_SSE3_la-DI_MoComp2.Tpo" -c -o libDI_Misc_SSE3_la-DI_MoComp2.lo `test -f 'DI_MoComp2.c' || echo '$(srcdir)/'`DI_MoComp2.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libDI_Misc_SSE3_la-DI_MoComp2.Tpo" "$(DEPDIR)/libDI_Misc_SSE3_la-DI_MoComp2.Plo"; else rm -f "$(DEPDIR)/libDI_Misc_SSE3_la-DI_MoComp2.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='DI_MoComp2.c' object='libDI_Misc_SSE3_la-DI_MoComp2.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_Misc_SSE3_la_CFLAGS) $(CFLAGS) -c -o libDI_Misc_SSE3_la-DI_MoComp2.lo `test -f 'DI_MoComp2.c' || echo '$(srcdir)/'`DI_MoComp2.c libDI_Misc_SSE3_la-DI_OddOnly.lo: DI_OddOnly.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_Misc_SSE3_la_CFLAGS) $(CFLAGS) -MT libDI_Misc_SSE3_la-DI_OddOnly.lo -MD -MP -MF "$(DEPDIR)/libDI_Misc_SSE3_la-DI_OddOnly.Tpo" -c -o libDI_Misc_SSE3_la-DI_OddOnly.lo `test -f 'DI_OddOnly.c' || echo '$(srcdir)/'`DI_OddOnly.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libDI_Misc_SSE3_la-DI_OddOnly.Tpo" "$(DEPDIR)/libDI_Misc_SSE3_la-DI_OddOnly.Plo"; else rm -f "$(DEPDIR)/libDI_Misc_SSE3_la-DI_OddOnly.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='DI_OddOnly.c' object='libDI_Misc_SSE3_la-DI_OddOnly.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_Misc_SSE3_la_CFLAGS) $(CFLAGS) -c -o libDI_Misc_SSE3_la-DI_OddOnly.lo `test -f 'DI_OddOnly.c' || echo '$(srcdir)/'`DI_OddOnly.c libDI_Misc_SSE3_la-DI_ScalerBob.lo: DI_ScalerBob.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_Misc_SSE3_la_CFLAGS) $(CFLAGS) -MT libDI_Misc_SSE3_la-DI_ScalerBob.lo -MD -MP -MF "$(DEPDIR)/libDI_Misc_SSE3_la-DI_ScalerBob.Tpo" -c -o libDI_Misc_SSE3_la-DI_ScalerBob.lo `test -f 'DI_ScalerBob.c' || echo '$(srcdir)/'`DI_ScalerBob.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libDI_Misc_SSE3_la-DI_ScalerBob.Tpo" "$(DEPDIR)/libDI_Misc_SSE3_la-DI_ScalerBob.Plo"; else rm -f "$(DEPDIR)/libDI_Misc_SSE3_la-DI_ScalerBob.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='DI_ScalerBob.c' object='libDI_Misc_SSE3_la-DI_ScalerBob.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_Misc_SSE3_la_CFLAGS) $(CFLAGS) -c -o libDI_Misc_SSE3_la-DI_ScalerBob.lo `test -f 'DI_ScalerBob.c' || echo '$(srcdir)/'`DI_ScalerBob.c libDI_Misc_SSE3_la-DI_TomsMoComp.lo: DI_TomsMoComp.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_Misc_SSE3_la_CFLAGS) $(CFLAGS) -MT libDI_Misc_SSE3_la-DI_TomsMoComp.lo -MD -MP -MF "$(DEPDIR)/libDI_Misc_SSE3_la-DI_TomsMoComp.Tpo" -c -o libDI_Misc_SSE3_la-DI_TomsMoComp.lo `test -f 'DI_TomsMoComp.c' || echo '$(srcdir)/'`DI_TomsMoComp.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libDI_Misc_SSE3_la-DI_TomsMoComp.Tpo" "$(DEPDIR)/libDI_Misc_SSE3_la-DI_TomsMoComp.Plo"; else rm -f "$(DEPDIR)/libDI_Misc_SSE3_la-DI_TomsMoComp.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='DI_TomsMoComp.c' object='libDI_Misc_SSE3_la-DI_TomsMoComp.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_Misc_SSE3_la_CFLAGS) $(CFLAGS) -c -o libDI_Misc_SSE3_la-DI_TomsMoComp.lo `test -f 'DI_TomsMoComp.c' || echo '$(srcdir)/'`DI_TomsMoComp.c libDI_Misc_SSE3_la-DI_TwoFrame.lo: DI_TwoFrame.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_Misc_SSE3_la_CFLAGS) $(CFLAGS) -MT libDI_Misc_SSE3_la-DI_TwoFrame.lo -MD -MP -MF "$(DEPDIR)/libDI_Misc_SSE3_la-DI_TwoFrame.Tpo" -c -o libDI_Misc_SSE3_la-DI_TwoFrame.lo `test -f 'DI_TwoFrame.c' || echo '$(srcdir)/'`DI_TwoFrame.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libDI_Misc_SSE3_la-DI_TwoFrame.Tpo" "$(DEPDIR)/libDI_Misc_SSE3_la-DI_TwoFrame.Plo"; else rm -f "$(DEPDIR)/libDI_Misc_SSE3_la-DI_TwoFrame.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='DI_TwoFrame.c' object='libDI_Misc_SSE3_la-DI_TwoFrame.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_Misc_SSE3_la_CFLAGS) $(CFLAGS) -c -o libDI_Misc_SSE3_la-DI_TwoFrame.lo `test -f 'DI_TwoFrame.c' || echo '$(srcdir)/'`DI_TwoFrame.c libDI_Misc_SSE3_la-DI_VideoBob.lo: DI_VideoBob.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_Misc_SSE3_la_CFLAGS) $(CFLAGS) -MT libDI_Misc_SSE3_la-DI_VideoBob.lo -MD -MP -MF "$(DEPDIR)/libDI_Misc_SSE3_la-DI_VideoBob.Tpo" -c -o libDI_Misc_SSE3_la-DI_VideoBob.lo `test -f 'DI_VideoBob.c' || echo '$(srcdir)/'`DI_VideoBob.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libDI_Misc_SSE3_la-DI_VideoBob.Tpo" "$(DEPDIR)/libDI_Misc_SSE3_la-DI_VideoBob.Plo"; else rm -f "$(DEPDIR)/libDI_Misc_SSE3_la-DI_VideoBob.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='DI_VideoBob.c' object='libDI_Misc_SSE3_la-DI_VideoBob.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_Misc_SSE3_la_CFLAGS) $(CFLAGS) -c -o libDI_Misc_SSE3_la-DI_VideoBob.lo `test -f 'DI_VideoBob.c' || echo '$(srcdir)/'`DI_VideoBob.c libDI_Misc_SSE3_la-DI_VideoWeave.lo: DI_VideoWeave.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_Misc_SSE3_la_CFLAGS) $(CFLAGS) -MT libDI_Misc_SSE3_la-DI_VideoWeave.lo -MD -MP -MF "$(DEPDIR)/libDI_Misc_SSE3_la-DI_VideoWeave.Tpo" -c -o libDI_Misc_SSE3_la-DI_VideoWeave.lo `test -f 'DI_VideoWeave.c' || echo '$(srcdir)/'`DI_VideoWeave.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libDI_Misc_SSE3_la-DI_VideoWeave.Tpo" "$(DEPDIR)/libDI_Misc_SSE3_la-DI_VideoWeave.Plo"; else rm -f "$(DEPDIR)/libDI_Misc_SSE3_la-DI_VideoWeave.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='DI_VideoWeave.c' object='libDI_Misc_SSE3_la-DI_VideoWeave.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_Misc_SSE3_la_CFLAGS) $(CFLAGS) -c -o libDI_Misc_SSE3_la-DI_VideoWeave.lo `test -f 'DI_VideoWeave.c' || echo '$(srcdir)/'`DI_VideoWeave.c libDI_Misc_SSE3_la-DI_Weave.lo: DI_Weave.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_Misc_SSE3_la_CFLAGS) $(CFLAGS) -MT libDI_Misc_SSE3_la-DI_Weave.lo -MD -MP -MF "$(DEPDIR)/libDI_Misc_SSE3_la-DI_Weave.Tpo" -c -o libDI_Misc_SSE3_la-DI_Weave.lo `test -f 'DI_Weave.c' || echo '$(srcdir)/'`DI_Weave.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libDI_Misc_SSE3_la-DI_Weave.Tpo" "$(DEPDIR)/libDI_Misc_SSE3_la-DI_Weave.Plo"; else rm -f "$(DEPDIR)/libDI_Misc_SSE3_la-DI_Weave.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='DI_Weave.c' object='libDI_Misc_SSE3_la-DI_Weave.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_Misc_SSE3_la_CFLAGS) $(CFLAGS) -c -o libDI_Misc_SSE3_la-DI_Weave.lo `test -f 'DI_Weave.c' || echo '$(srcdir)/'`DI_Weave.c mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool uninstall-info-am: ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-libtool distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-exec-am: install-info: install-info-am install-man: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-info-am .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLTLIBRARIES ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-exec \ install-exec-am install-info install-info-am install-man \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags uninstall uninstall-am \ uninstall-info-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: zapping-0.10cvs6/plugins/deinterlace/DI_Misc/DI_VideoBob.c 644 764 144 21251 10417055461 16451 /*/////////////////////////////////////////////////////////////////////////// // $Id: DI_VideoBob.c,v 1.6 2006/04/12 01:43:13 mschimek Exp $ ///////////////////////////////////////////////////////////////////////////// // Copyright (c) 2000 John Adcock. All rights reserved. // Based on code from Virtual Dub Plug-in by Gunnar Thalin ///////////////////////////////////////////////////////////////////////////// // // This file is subject to the terms of the GNU General Public License as // published by the Free Software Foundation. A copy of this license is // included with this software distribution in the file COPYING. If you // do not have a copy, you may obtain a copy by writing to the Free // Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. // // This software 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 ///////////////////////////////////////////////////////////////////////////// // Change Log // // Date Developer Changes // // 30 Dec 2000 Mark Rejhon Split into separate module // ///////////////////////////////////////////////////////////////////////////// // CVS Log // // $Log: DI_VideoBob.c,v $ // Revision 1.6 2006/04/12 01:43:13 mschimek // s/CPU_FEATURE_SSE/CPU_FEATURE_SSE_INT. // // Revision 1.5 2005/06/28 19:17:10 mschimek // *** empty log message *** // // Revision 1.4 2005/06/28 00:48:29 mschimek // Cleaned up. // Replaced longs by ints for proper operation on LP64 machines. Code // assumes option values cast to int. // // Revision 1.3.2.4 2005/06/17 02:54:20 mschimek // *** empty log message *** // // Revision 1.3.2.3 2005/05/31 02:40:34 mschimek // *** empty log message *** // // Revision 1.3.2.2 2005/05/20 05:45:14 mschimek // *** empty log message *** // // Revision 1.3.2.1 2005/05/05 09:46:01 mschimek // *** empty log message *** // // Revision 1.3 2005/03/30 21:26:32 mschimek // Integrated and converted the MMX code to vector intrinsics. // // Revision 1.2 2005/02/05 22:19:04 mschimek // Completed l18n. // // Revision 1.1 2005/01/08 14:33:51 mschimek // TomsMoCompMethod, MoComp2Method, VideoWeaveMethod, VideoBobMethod, // TwoFrameMethod, OldGameMethod, Greedy2FrameMethod, GreedyMethod, // DI_GreedyHSettings: Localized. // // Revision 1.2 2004/11/15 23:03:19 michael // *** empty log message *** // // Revision 1.1 2004/11/14 15:35:14 michael // *** empty log message *** // // Revision 1.7 2002/06/18 19:46:07 adcockj // Changed appliaction Messages to use WM_APP instead of WM_USER // // Revision 1.6 2002/06/13 12:10:25 adcockj // Move to new Setings dialog for filers, video deint and advanced settings // // Revision 1.5 2001/07/26 11:53:08 adcockj // Fix for crashing in VideoBob // // Revision 1.4 2001/07/13 16:13:33 adcockj // Added CVS tags and removed tabs // ///////////////////////////////////////////////////////////////////////////*/ #include "windows.h" #include "DS_Deinterlace.h" extern int EdgeDetect; extern int JaggieThreshold; SIMD_FN_PROTOS (DEINTERLACE_FUNC, DeinterlaceFieldBob); #if SIMD & (CPU_FEATURE_MMX | CPU_FEATURE_3DNOW | \ CPU_FEATURE_SSE_INT | CPU_FEATURE_SSE2 | CPU_FEATURE_ALTIVEC) /*///////////////////////////////////////////////////////////////////////////// // DeinterlaceFieldBob // // Deinterlaces a field with a tendency to bob rather than weave. Best for // high-motion scenes like sports. // // The algorithm for this was taken from the // Deinterlace - area based Vitual Dub Plug-in by // Gunnar Thalin /////////////////////////////////////////////////////////////////////////////*/ BOOL SIMD_NAME (DeinterlaceFieldBob) (TDeinterlaceInfo * pInfo) { v16 qwEdgeDetect; v16 qwThreshold; uint8_t *Dest; const uint8_t *YVal1; const uint8_t *YVal2; const uint8_t *YVal3; unsigned int byte_width; unsigned int height; unsigned long dst_padding; unsigned long src_padding; unsigned long dst_bpl; unsigned long src_bpl; if (SIMD == CPU_FEATURE_SSE2) { if (((unsigned long) pInfo->Overlay | (unsigned long) pInfo->PictureHistory[0]->pData | (unsigned long) pInfo->PictureHistory[1]->pData | (unsigned long) pInfo->OverlayPitch | (unsigned long) pInfo->InputPitch | (unsigned long) pInfo->LineLength) & 15) return DeinterlaceFieldBob_SSE (pInfo); } qwEdgeDetect = vsplat16 (EdgeDetect); qwThreshold = vsplat16 (JaggieThreshold); byte_width = pInfo->LineLength; dst_bpl = pInfo->OverlayPitch; src_bpl = pInfo->InputPitch; Dest = pInfo->Overlay; YVal1 = pInfo->PictureHistory[0]->pData; YVal2 = pInfo->PictureHistory[1]->pData; YVal3 = YVal1 + src_bpl; if (pInfo->PictureHistory[0]->Flags & PICTURE_INTERLACED_ODD) { copy_line (Dest, YVal2, byte_width); Dest += dst_bpl; YVal2 += src_bpl; } copy_line (Dest, YVal1, byte_width); Dest += dst_bpl; dst_padding = dst_bpl * 2 - byte_width; src_padding = src_bpl - byte_width; for (height = pInfo->FieldHeight - 1; height > 0; --height) { unsigned int count; /* For ease of reading, the comments below assume that we're // operating on an odd field (i.e., that bIsOdd is true). The // exact same processing is done when we operate on an even // field, but the roles of the odd and even fields are reversed. // It's just too cumbersome to explain the algorithm in terms // of "the next odd line if we're doing an odd field, or the // next even line if we're doing an even field" etc. So // wherever you see "odd" or "even" below, keep in mind that // half the time this function is called, those words' meanings // will invert. */ for (count = byte_width / sizeof (vu8); count > 0; --count) { vu8 O1, E, O2, avg; v16 lum_O1, lum_E, lum_O2, mm6, mm7; O1 = vload (YVal1, 0); YVal1 += sizeof (vu8); lum_O1 = yuyv2yy (O1); O2 = vload (YVal3, 0); YVal3 += sizeof (vu8); lum_O2 = yuyv2yy (O2); /* Always use the most recent data verbatim. */ vstorent (Dest, dst_bpl, O2); avg = fast_vavgu8 (O1, O2); E = vload (YVal2, 0); YVal2 += sizeof (vu8); lum_E = yuyv2yy (E); /* work out (O1 - E) * (O2 - E) / 2 // - EdgeDetect * (((O1 - O2) / 2) ^ 2 >> 12) // (the shifts prevent overflow) */ lum_O1 = vsr16 (lum_O1, 1); lum_E = vsr16 (lum_E, 1); lum_O2 = vsr16 (lum_O2, 1); mm6 = (v16) vmullo16 (vsub16 (lum_O1, lum_E), vsub16 (lum_O2, lum_E)); mm7 = vsub16 (lum_O1, lum_O2); mm7 = vsr16 ((v16) vmullo16 (mm7, mm7), 12); mm7 = (v16) vmullo16 (mm7, qwEdgeDetect); mm6 = vsub16 (mm6, mm7); vstorent (Dest, 0, vsel ((vu8) vcmpgt16 (mm6, qwThreshold), avg, E)); Dest += sizeof (vu8); } YVal1 += src_padding; YVal2 += src_padding; YVal3 += src_padding; Dest += dst_padding; } /* Copy last odd line if we're processing an even field. */ if (pInfo->PictureHistory[0]->Flags & PICTURE_INTERLACED_EVEN) { copy_line (Dest, YVal2, byte_width); } vempty (); return TRUE; } #elif !SIMD int EdgeDetect = 625; int JaggieThreshold = 73; /*/////////////////////////////////////////////////////////////////////////// // Start of Settings related code ///////////////////////////////////////////////////////////////////////////*/ static const SETTING DI_VideoBobSettings [] = { { N_("Weave Edge Detect"), SLIDER, 0, &EdgeDetect, 625, 0, 10000, 5, 1, NULL, "Deinterlace", "EdgeDetect", NULL, }, { N_("Weave Jaggie Threshold"), SLIDER, 0, &JaggieThreshold, 73, 0, 5000, 5, 1, NULL, "Deinterlace", "JaggieThreshold", NULL, }, }; static const DEINTERLACE_METHOD VideoBobMethod = { sizeof (DEINTERLACE_METHOD), DEINTERLACE_CURRENT_VERSION, N_("Video Deinterlace (Bob)"), "Bob", FALSE, FALSE, /* pfnAlgorithm */ NULL, 50, 60, N_ELEMENTS (DI_VideoBobSettings), DI_VideoBobSettings, INDEX_VIDEO_BOB, NULL, NULL, NULL, NULL, 2, 0, 0, 0, NULL, 0, FALSE, FALSE, IDH_VIDEOBOB, }; DEINTERLACE_METHOD * DI_VideoBob_GetDeinterlacePluginInfo (void) { DEINTERLACE_METHOD *m; DEINTERLACE_FUNC *f; m = NULL; f = SIMD_FN_SELECT (DeinterlaceFieldBob, CPU_FEATURE_MMX | CPU_FEATURE_3DNOW | CPU_FEATURE_SSE_INT | CPU_FEATURE_SSE2 | CPU_FEATURE_ALTIVEC); if (f) { m = malloc (sizeof (*m)); *m = VideoBobMethod; m->pfnAlgorithm = f; } return m; } #endif /* !SIMD */ /* Local Variables: c-basic-offset: 4 End: */ zapping-0.10cvs6/plugins/deinterlace/DI_Misc/DI_Bob.c 644 764 144 13233 10417055601 15457 /*/////////////////////////////////////////////////////////////////////////// // $Id: DI_Bob.c,v 1.5 2006/04/12 01:44:33 mschimek Exp $ ///////////////////////////////////////////////////////////////////////////// // Copyright (c) 2000 John Adcock. All rights reserved. // Copyright (C) 2005 Michael Schimek ///////////////////////////////////////////////////////////////////////////// // // This file is subject to the terms of the GNU General Public License as // published by the Free Software Foundation. A copy of this license is // included with this software distribution in the file COPYING. If you // do not have a copy, you may obtain a copy by writing to the Free // Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. // // This software 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 ///////////////////////////////////////////////////////////////////////////// // Change Log // // Date Developer Changes // // 30 Dec 2000 Mark Rejhon Split into separate module // ///////////////////////////////////////////////////////////////////////////// // CVS Log // // $Log: DI_Bob.c,v $ // Revision 1.5 2006/04/12 01:44:33 mschimek // s/CPU_FEATURE_SSE/CPU_FEATURE_SSE_INT. // // Revision 1.4 2005/06/28 19:17:10 mschimek // *** empty log message *** // // Revision 1.3 2005/06/28 00:50:13 mschimek // Added support for x86-64, AltiVec and a scalar version. Cleaned up. // Replaced inline asm by vector intrinsics. // // Revision 1.2.2.4 2005/06/17 02:54:20 mschimek // *** empty log message *** // // Revision 1.2.2.3 2005/05/31 02:40:34 mschimek // *** empty log message *** // // Revision 1.2.2.2 2005/05/20 05:45:14 mschimek // *** empty log message *** // // Revision 1.2.2.1 2005/05/05 09:46:01 mschimek // *** empty log message *** // // Revision 1.2 2005/02/05 22:20:28 mschimek // Completed l18n. // // Revision 1.1 2005/01/08 14:54:23 mschimek // *** empty log message *** // // Revision 1.2 2004/11/15 23:03:19 michael // *** empty log message *** // // Revision 1.1 2004/11/14 15:35:14 michael // *** empty log message *** // // Revision 1.8 2002/06/13 12:10:24 adcockj // Move to new Setings dialog for filers, video deint and advanced settings // // Revision 1.7 2001/11/23 19:33:14 adcockj // Fixes to bob to make is less jittery // // Revision 1.6 2001/11/22 13:32:03 adcockj // Finished changes caused by changes to TDeinterlaceInfo - Compiles // // Revision 1.5 2001/11/21 15:21:40 adcockj // Renamed DEINTERLACE_INFO to TDeinterlaceInfo in line with standards // Changed TDeinterlaceInfo structure to have history of pictures. // // Revision 1.4 2001/07/13 16:13:33 adcockj // Added CVS tags and removed tabs // ///////////////////////////////////////////////////////////////////////////*/ #include "windows.h" #include "DS_Deinterlace.h" SIMD_FN_PROTOS (DEINTERLACE_FUNC, DeinterlaceBob); #if !SIMD || (SIMD & (CPU_FEATURE_MMX | CPU_FEATURE_SSE_INT | \ CPU_FEATURE_SSE2 | CPU_FEATURE_ALTIVEC)) /*/////////////////////////////////////////////////////////////////////////// // Simple Bob. Copies the most recent field to the overlay, with each scanline // copied twice. ///////////////////////////////////////////////////////////////////////////*/ BOOL SIMD_NAME (DeinterlaceBob) (TDeinterlaceInfo * pInfo) { int i; BYTE* lpOverlay = pInfo->Overlay; BYTE* CurrentLine = pInfo->PictureHistory[0]->pData; DWORD Pitch = pInfo->InputPitch; /* No recent data? We can't do anything. */ if (NULL == CurrentLine) { return FALSE; } if (SIMD == CPU_FEATURE_SSE2) { if (((unsigned long) pInfo->Overlay | (unsigned long) pInfo->PictureHistory[0]->pData | (unsigned long) pInfo->OverlayPitch | (unsigned long) pInfo->InputPitch | (unsigned long) pInfo->LineLength) & 15) return DeinterlaceBob_SSE (pInfo); } /* If field is odd we will offset it down 1 line to avoid jitter TRB 1/21/01 */ if (pInfo->PictureHistory[0]->Flags & PICTURE_INTERLACED_ODD) { /* extra copy of first line */ copy_line (lpOverlay, CurrentLine, pInfo->LineLength); lpOverlay += pInfo->OverlayPitch; /* and offset out output ptr */ for (i = 0; i < pInfo->FieldHeight - 1; i++) { copy_line_pair (lpOverlay, CurrentLine, pInfo->LineLength, pInfo->OverlayPitch); lpOverlay += 2 * pInfo->OverlayPitch; CurrentLine += Pitch; } /* only 1 copy of last line */ copy_line (lpOverlay, CurrentLine, pInfo->LineLength); } else { for (i = 0; i < pInfo->FieldHeight; i++) { copy_line_pair (lpOverlay, CurrentLine, pInfo->LineLength, pInfo->OverlayPitch); lpOverlay += 2 * pInfo->OverlayPitch; CurrentLine += Pitch; } } vempty (); return TRUE; } #endif #if !SIMD static const DEINTERLACE_METHOD BobMethod = { sizeof(DEINTERLACE_METHOD), DEINTERLACE_CURRENT_VERSION, N_("Simple Bob"), NULL, FALSE, FALSE, /* pfnAlgorithm */ NULL, 50, 60, 0, NULL, INDEX_BOB, NULL, NULL, NULL, NULL, 1, 0, 0, -1, NULL, 0, FALSE, FALSE, IDH_BOB, }; DEINTERLACE_METHOD * DI_Bob_GetDeinterlacePluginInfo (void) { DEINTERLACE_METHOD *m; m = malloc (sizeof (*m)); *m = BobMethod; m->pfnAlgorithm = SIMD_FN_SELECT (DeinterlaceBob, SCALAR | CPU_FEATURE_MMX | CPU_FEATURE_SSE_INT | CPU_FEATURE_SSE2 | CPU_FEATURE_ALTIVEC); return m; } #endif /* !SIMD */ /* Local Variables: c-basic-offset: 4 End: */ zapping-0.10cvs6/plugins/deinterlace/test/ 777 764 144 0 10443536363 13737 5zapping-0.10cvs6/plugins/deinterlace/test/cpudt.c 644 764 144 2517 10260116673 15216 /* * Zapping TV viewer * * Copyright (C) 2005 Michael H. Schimek * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* $Id: cpudt.c,v 1.2 2005/06/28 00:45:47 mschimek Exp $ */ #ifdef HAVE_CONFIG_H # include "config.h" #endif #include #include #include #include #include "libtv/cpu.h" int main (int argc, char ** argv) { cpu_feature_set required_features; cpu_feature_set actual_features; assert (2 == argc); required_features = cpu_feature_set_from_string (argv[1]); actual_features = cpu_detection (); if (required_features == (actual_features & required_features)) exit (EXIT_SUCCESS); else exit (EXIT_FAILURE); } zapping-0.10cvs6/plugins/deinterlace/test/dicmp.c 644 764 144 12543 10263053155 15211 /* * Zapping TV viewer * * Copyright (C) 2004 Michael H. Schimek * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* $Id: dicmp.c,v 1.3 2005/07/06 22:08:45 mschimek Exp $ */ #ifdef HAVE_CONFIG_H # include "config.h" #endif #include #include #include #include #include #ifdef HAVE_GETOPT_LONG # include #endif #include "libtv/macros.h" static unsigned int width; static unsigned int height; static unsigned int size; static const char short_options [] = "cd:h:lqvw:HV"; #ifdef HAVE_GETOPT_LONG static const struct option long_options [] = { { "continue", no_argument, NULL, 'c' }, { "maxdiff", required_argument, NULL, 'd' }, { "height", required_argument, NULL, 'h' }, { "clip", no_argument, NULL, 'l' }, { "quiet", no_argument, NULL, 'q' }, { "verbose", no_argument, NULL, 'v' }, { "width", required_argument, NULL, 'w' }, { "version", no_argument, NULL, 'V' }, { "help", no_argument, NULL, 'H' }, { 0, 0, 0, 0 } }; #else # define getopt_long(ac, av, s, l, i) getopt(ac, av, s) #endif static void usage (FILE * fp, char ** argv) { fprintf (fp, "Zapping deinterlacer test version " VERSION "\n" "Copyright (C) 2004-2005 Michael H. Schimek\n" "This program is licensed under GPL 2. NO WARRANTIES.\n\n" "This program compares images for bytewise equality to\n" "find differences between deinterlacer implementations.\n\n" "Usage: %s [options] image file image file\n\n" "Source images must be in raw YUYV format without headers.\n" "Options:\n" "-d | --maxdiff Max. abs. difference of each byte\n" "-h | --height Image height (288)\n" "-q | --quiet Quiet, no output\n" "-w | --width Image width (352)\n" , argv[0]); } static void dump (unsigned long counter, int c1, int c2) { static const unsigned long bpp = 2; unsigned long pixel; unsigned long col; unsigned long row; unsigned long frame; pixel = counter / bpp; col = pixel % width; row = (pixel / width) % height; frame = pixel / size; printf ("%9lu (%2lu:%3lu:%3lu): %02x %s %02x\n", counter, frame, row, col, c1, (c1 == c2) ? "==" : "!=", c2); } int main (int argc, char ** argv) { char *fname1, *fname2; FILE *fp1, *fp2; unsigned int maxdiff; unsigned long counter; int verbose; int quiet; int cont; int clip; int index; int c; width = 352; height = 288; maxdiff = 0; verbose = 0; quiet = FALSE; cont = FALSE; clip = FALSE; while (-1 != (c = getopt_long (argc, argv, short_options, long_options, &index))) { switch (c) { case 'c': cont ^= TRUE; break; case 'd': maxdiff = strtol (optarg, NULL, 0); if (maxdiff > 255) { fprintf (stderr, "maxdiff must be in " "range 0 ... 255\n"); exit (EXIT_FAILURE); } break; case 'h': height = strtol (optarg, NULL, 0); if (0 == height || 0 != (height % 16)) { fprintf (stderr, "Height must be a multiple of 16.\n"); exit (EXIT_FAILURE); } break; case 'l': clip ^= TRUE; break; case 'q': quiet ^= TRUE; break; case 'v': ++verbose; break; case 'w': width = strtol (optarg, NULL, 0); if (0 == width || 0 != (width % 16)) { fprintf (stderr, "Width must be a multiple of 16.\n"); exit (EXIT_FAILURE); } break; case 'H': usage (stdout, argv); exit (EXIT_SUCCESS); case 'V': printf (VERSION "\n"); exit (EXIT_SUCCESS); default: usage (stderr, argv); exit (EXIT_FAILURE); } } size = width * height; if (verbose > 1) quiet = TRUE; if ((argc - optind) < 2) { usage (stderr, argv); exit (EXIT_FAILURE); } fname1 = argv[optind + 0]; fname2 = argv[optind + 1]; if (!(fp1 = fopen (fname1, "r"))) { fprintf (stderr, "Couldn't open %s: %d, %s\n", fname1, errno, strerror (errno)); exit (EXIT_FAILURE); } if (!(fp2 = fopen (fname2, "r"))) { fprintf (stderr, "Couldn't open %s: %d, %s\n", fname2, errno, strerror (errno)); exit (EXIT_FAILURE); } for (counter = 0;; ++counter) { int c1, c2; c1 = fgetc (fp1); c2 = fgetc (fp2); if ((c1 | c2) < 0) { if (c1 >= 0 || c2 >= 0) { printf ("File sizes differ\n"); exit (EXIT_FAILURE); } exit (EXIT_SUCCESS); } if (verbose > 1) dump (counter, c1, c2); if (abs (c1 - c2) > maxdiff) { if (clip) { unsigned int col = (counter % width) & ~7; /* sse <-> sse2 first and last column mismatch due to different vector size. */ if (8 == col || (width - 16) == col) continue; } if (!quiet) dump (counter, c1, c2); if (!cont) exit (EXIT_FAILURE); } } return EXIT_SUCCESS; } zapping-0.10cvs6/plugins/deinterlace/test/ditest-mmx.sh 755 764 144 423 10263053100 16323 #!/bin/sh srcdir=`cd $(dirname $0) >/dev/null; pwd; cd - >/dev/null` builddir=`pwd` . $srcdir/ditest-all.sh trap "rm -rf $builddir/results-$$-*" EXIT feature=mmx ditest_all $feature || exit $? cd $builddir/results-$$-$feature md5sum -c $srcdir/md5sums-$feature >/dev/null zapping-0.10cvs6/plugins/deinterlace/test/gen-md5sums.sh 755 764 144 711 10272464722 16414 #!/bin/sh srcdir=`cd $(dirname $0) >/dev/null; pwd; cd - >/dev/null` builddir=`pwd` . $srcdir/ditest-all.sh trap "rm -rf $builddir/results-$$-*" EXIT for feature in scalar mmx 3dnow sse sse2 sse3 altivec; do ditest_all $feature dir="$builddir/results-$$-$feature" if test -d $dir; then cd $dir echo "Generating md5sums-$feature for $implemented." md5sum -b $implemented >$builddir/md5sums-$feature || exit 1 cd - fi done exit 0 zapping-0.10cvs6/plugins/deinterlace/test/README 644 764 144 4512 10272464722 14614 This directory contains tools, scripts and other files to test the deinterlace plugin. File overview ------------- cpudt/cpudt.c CPU feature detection. Use like "if cpudt mmx; then ..." Possible features are mmx, 3dnow, sse, sse2, sse3, altivec and others. Used by emulator.sh. dicmp/dicmp.c Compares YUYV images, kind of a specialized version of cmp. Type dicmp --help for options. Used by ditest-x86.sh. ditest/ditest.c/guard.h Runs a deinterlace method with test data. guard.h adds a miniature version of efence, testing for image buffer overflows. Type ditest --help for options. Used by ditest scripts. ditest-all.sh A shell function wrapping ditest, which runs through all deinterlace methods using pseudo random input and storing results in a subdirectory. May use an emulator if we cross-compile or the CPU lacks the required feature. Used by other ditest scripts. ditest-scalar|mmx|3dnow|sse|sse2|sse3|altivec.sh make check runs these scripts to check if each implementation of each deinterlace method we compiled produces the output recorded in md5sums-*. Supposed to reveal compiler bugs. ditest-x86.sh Uses ditest-all.sh to run all x86 implementations of all deinterlace methods which are executable on this machine and compare the output with dicmp. Supposed to prove all x86 implementations (mmx, sse, ...) produce the same output, but due to subtle differences and shortcuts for performance reasons we cannot compare all implementations. Something like this should also be used to compare sse2 and altivec output. Differences can be traced to the offending instruction by strategically placing fprintf-stderr's and vdump()'s in the source, then diff'ing the stderr output of the failed ditest runs. emulator.sh A shell function to determine if our CPU supports the required feature or if we can emulate it, currently using qemu. Sets $emu to the name of the emulator. Used by ditest-all.sh. gen-md5sums.sh This script uses ditest-all.sh to generate reference output for a make check. It runs through all implementations (mmx, sse, ...) of all deinterlace methods which are executable on this machine. Since reference output is too large to ship we compute md5 checksums. Supposed to be run after deinterlace sources changed. md5sums-scalar|mmx|3dnow|sse|sse2|sse3|altivec Checksums for make check. zapping-0.10cvs6/plugins/deinterlace/test/ditest-x86.sh 755 764 144 6443 10272464722 16217 #!/bin/sh srcdir=`cd $(dirname $0) >/dev/null; pwd; cd - >/dev/null` builddir=`pwd` . $srcdir/ditest-all.sh trap "rm -rf $builddir/results-$$-*" EXIT compare () { local method=$1 local feature=$2 local special=$3 echo "Comparing $method $feature implementation against sse results." if ! ./dicmp $size $special results-$$-sse/$method.yuv \ results-$$-$feature/$method.yuv; then echo "*** Mismatch in $method $feature and sse results." # exit 1 fi } compare_greedyh () { local feature=$1 local special=$2 for upd in 0 1; do for umf in 0 1; do for uhs in 0 1; do for uvs in 0 1; do for uib in 0 1; do local method="GreedyH-$upd-$umf-$uhs-$uvs-$uib" echo "Comparing $method $feature implementation against sse results." if ! ./dicmp $size $special results-$$-sse/$method.yuv \ results-$$-$feature/$method.yuv; then echo "*** Mismatch in $method $feature and sse results." # exit 1 fi done done done done done } compare_tomsmocomp () { local feature=$1 local special=$2 for usb in 0 1; do for se in 0 1 2 4 6 10 12 14 16 20 22; do local method="TomsMoComp-$usb-$se" echo "Comparing $method $feature implementation against sse results." if ! ./dicmp $size $special results-$$-sse/$method.yuv \ results-$$-$feature/$method.yuv; then echo "*** Mismatch in $method $feature and sse results." # exit 1 fi done done # TODO each $se should produce different results. } for feature in scalar mmx 3dnow sse sse2; do echo "Testing $feature implementations" ditest_all $feature done if test -d results-$$-sse; then if test -d results-$$-scalar; then for method in Weave Bob ScalerBob EvenOnly OddOnly; do compare $method scalar done fi if test -d results-$$-mmx; then for method in Weave Bob ScalerBob EvenOnly OddOnly; do compare $method mmx done # Ignore fast_vavgu8() rounding error for method in VideoBob VideoWeave TwoFrame; do compare $method mmx -d1 done # Argh! The mmx implementation of # Greedy2Frame GreedyH TomsMoComp MoComp2 # differs from 3dnow sse sse2 versions for performance reasons. else echo "*** Have no mmx results to compare against sse reference." fi if test -d results-$$-3dnow; then for method in VideoBob VideoWeave TwoFrame Bob Greedy Greedy2Frame ; do compare $method 3dnow done compare MoComp2 3dnow compare_greedyh 3dnow # TODO if possible # compare_tomsmocomp 3dnow # Weave ScalerBob EvenOnly OddOnly not implemented in 3dnow. else echo "*** Have no 3dnow results to compare against sse reference." fi if test -d results-$$-sse2; then for method in VideoBob VideoWeave TwoFrame Weave Bob ScalerBob EvenOnly \ OddOnly Greedy Greedy2Frame; do compare $method sse2 done # TODO if possible # compare_greedyh sse2 # Ignore error in first and last column (bytes 8 ... 15 and # n-16 ... n-9 of each line) due to vector size. compare MoComp2 sse2 -l compare_tomsmocomp sse2 -l else echo "*** Have no sse2 results to compare against sse reference." fi # TODO compare sse2 <-> sse3 (should be identical) else echo "*** Have no sse reference results to compare x86 implementations." fi exit 0 zapping-0.10cvs6/plugins/deinterlace/test/ditest-sse.sh 755 764 144 423 10263053047 16326 #!/bin/sh srcdir=`cd $(dirname $0) >/dev/null; pwd; cd - >/dev/null` builddir=`pwd` . $srcdir/ditest-all.sh trap "rm -rf $builddir/results-$$-*" EXIT feature=sse ditest_all $feature || exit $? cd $builddir/results-$$-$feature md5sum -c $srcdir/md5sums-$feature >/dev/null zapping-0.10cvs6/plugins/deinterlace/test/ditest.c 644 764 144 33145 10417055371 15415 /* * Zapping TV viewer * * Copyright (C) 2005 Michael H. Schimek * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* $Id: ditest.c,v 1.5 2006/04/12 01:42:17 mschimek Exp $ */ #ifdef HAVE_CONFIG_H # include "config.h" #endif #include #include #include #include #include #include /* isatty() */ #include /* gettimeofday() */ #ifdef HAVE_GETOPT_LONG # include #endif #include "windows.h" #include "DS_Deinterlace.h" #include "guard.h" #include "libtv/cpu.h" /* cpu_features */ cpu_feature_set cpu_features; static DEINTERLACE_METHOD * method; static TDeinterlaceInfo info; static TPicture pictures[MAX_PICTURE_HISTORY]; static int quiet; static void deinterlace (char * buffer, unsigned int width, unsigned int field_parity) { static unsigned int field_count = 0; TPicture *p; if (!quiet) { fputc ('.', stderr); fflush (stderr); } p = info.PictureHistory[MAX_PICTURE_HISTORY - 1]; memmove (info.PictureHistory + 1, info.PictureHistory + 0, (MAX_PICTURE_HISTORY - 1) * sizeof (TPicture *)); info.PictureHistory[0] = p; if (0 == field_parity) { p->pData = (void *) buffer; p->Flags = PICTURE_INTERLACED_EVEN; /* sic, if PAL */ p->IsFirstInSeries = (0 == field_count); } else { p->pData = (void *)(buffer + width * 2); p->Flags = PICTURE_INTERLACED_ODD; p->IsFirstInSeries = (0 == field_count); } ++field_count; if (field_count < (unsigned int) method->nFieldsRequired) return; assert (NULL != method->pfnAlgorithm); method->pfnAlgorithm (&info); /* NOTE if method->bIsHalfHeight only the upper half of out_buffer contains data, must be scaled. */ { struct timeval tv; long l; double d; gettimeofday (&tv, NULL); l = tv.tv_usec + field_count; d = tv.tv_usec + (double) field_count; /* vempty() check. XXX did we compile for scalar SSE2 or x87? */ assert (l == (long) d); } } static void init_info (char * out_buffer, unsigned int width, unsigned int height) { unsigned int i; memset (&info, 0, sizeof (info)); info.Version = DEINTERLACE_INFO_CURRENT_VERSION; for (i = 0; i < MAX_PICTURE_HISTORY; ++i) info.PictureHistory[i] = pictures + i; info.Overlay = (void *) out_buffer; info.OverlayPitch = width * 2; info.LineLength = width * 2; info.FrameWidth = width; info.FrameHeight = height; info.FieldHeight = height / 2; info.pMemcpy = (void *) memcpy; /* XXX */ info.InputPitch = width * 2 * 2; assert (!method->bNeedFieldDiff); assert (!method->bNeedCombFactor); } /* Make sure we produce predictable output on all platforms. */ static unsigned int myrand (void) { static uint32_t seed = 1; seed = seed * 1103515245 + 12345; return (seed / 65536) % 32768; } static void swab16 (char * buffer, unsigned int size) { unsigned int i; assert (0 == (size % 4)); for (i = 0; i < size; i += 4) { char c; c = buffer[i + 0]; buffer[i + 0] = buffer[i + 1]; buffer[i + 1] = c; } } static void swab32 (char * buffer, unsigned int size) { unsigned int i; assert (0 == (size % 4)); for (i = 0; i < size; i += 4) { char c, d; c = buffer[i + 0]; d = buffer[i + 1]; buffer[i + 0] = buffer[i + 3]; buffer[i + 1] = buffer[i + 2]; buffer[i + 2] = d; buffer[i + 3] = c; } } static char * new_buffer (unsigned int width, unsigned int height) { char *buffer; unsigned int size; unsigned int padding; unsigned int i; size = width * height * 2; padding = size % getpagesize (); buffer = guard_alloc (size + padding); assert (NULL != buffer); buffer += padding; assert (0 == ((unsigned long) buffer % 16)); for (i = 0; i < size; i += 2) { buffer[i + 0] = 0x00; buffer[i + 1] = 0x80; } return buffer; } static void write_buffer (const char * name, char * buffer, unsigned int width, unsigned int height) { unsigned int size; size_t actual; FILE *fp; size = width * height * 2; if (name) { fp = fopen (name, "wb"); assert (NULL != fp); } else { fp = stdout; } actual = fwrite (buffer, 1, size, fp); if (actual < size || ferror (fp)) { perror ("fwrite"); exit (EXIT_FAILURE); } if (name) { fclose (fp); } } static const char short_options [] = "24c:h:m:n:o:p:qrw:zHV"; #ifdef HAVE_GETOPT_LONG static const struct option long_options [] = { { "swab16", no_argument, NULL, '2' }, { "swab32", no_argument, NULL, '4' }, { "cpu", required_argument, NULL, 'c' }, { "height", required_argument, NULL, 'h' }, { "help", no_argument, NULL, 'H' }, { "method", required_argument, NULL, 'm' }, { "nframes", required_argument, NULL, 'n' }, { "option", required_argument, NULL, 'o' }, { "prefix", required_argument, NULL, 'p' }, { "quiet", no_argument, NULL, 'q' }, { "rand", no_argument, NULL, 'r' }, { "width", required_argument, NULL, 'w' }, { "zero", required_argument, NULL, 'z' }, { "version", no_argument, NULL, 'V' }, { 0, 0, 0, 0 } }; #else # define getopt_long(ac, av, s, l, i) getopt(ac, av, s) #endif static void usage (FILE * fp, char ** argv) { fprintf (fp, "Zapping deinterlacer test version " VERSION "\n" "Copyright (C) 2004-2005 Michael H. Schimek\n" "This program is licensed under GPL 2. NO WARRANTIES.\n\n" "Usage: %s [options] images\n\n" "Source images must be in raw YUYV format without headers.\n" "Options:\n" "-c | --cpu Expect CPU features (also mmx|sse|sse2):\n" " tsc x86 time stamp counter\n" " cmov x86 conditional moves\n" " mmx\n" " sse\n" " sse2\n" " sse3\n" " amd-mmx AMD MMX extensions\n" " 3dnow 3DNow!\n" " 3dnow-ext 3DNow! extensions\n" " cyrix-mmc Cyrix MMX extensions\n" " altivec\n" " sse3\n" "-h | --height Image height (288)\n" "-m | --method Number or name of deinterlace method:\n" " VideoBob = 1, VideoWeave, TwoFrame, Weave,\n" " Bob, ScalerBob, EvenOnly, OddOnly, Greedy,\n" " Greedy2Frame, GreedyH, TomsMoComp, MoComp2\n" "-n | --nframes Number of frames to convert (5)\n" "-p | --prefix Name of output images instead of writing to\n" " stdout\n" "-q | --quiet Quiet, no output\n" "-r | --rand Convert pseudo-random images (for automated\n" " tests), otherwise read from stdin\n" "-2 | --swab16 Swap every two bytes AB -> BA of the source\n" "-4 | --swab32 Swap every four bytes ABCD -> DCBA\n" "-w | --width Image width (352)\n" "-z | --zero Convert blank images (for automated tests)\n" , argv[0]); } static void set_method_options (DEINTERLACE_METHOD * method, unsigned int n_options, char ** options) { unsigned int i; if (0 == method->nSettings && n_options > 0) { fprintf (stderr, "This method has no options.\n"); exit (EXIT_FAILURE); } for (i = 0; i < n_options; ++i) { const char *s; char *key; unsigned int length; unsigned int j; s = options[i]; while (isalnum (*s)) ++s; length = s - options[i]; key = malloc (length + 1); key[length] = 0; assert (NULL != key); strncpy (key, options[i], length); for (j = 0; j < (unsigned int) method->nSettings; ++j) if (0 == strcmp (method->pSettings[j].szIniEntry, key)) break; if (j >= (unsigned int) method->nSettings) { fprintf (stderr, "Unknown method option '%s'. " "Valid options are: ", key); for (j = 0; j < (unsigned int) method->nSettings; ++j) fprintf (stderr, "%s%s", method->pSettings[j].szIniEntry, (j + 1 == (unsigned int) method->nSettings) ? "\n" : ", "); exit (EXIT_FAILURE); } free (key); key = NULL; while (0 != *s && !isalnum (*s)) ++s; *method->pSettings[j].pValue = strtol (s, NULL, 0); } } int main (int argc, char ** argv) { char *out_buffer; char *in_buffers[(MAX_PICTURE_HISTORY + 1) / 2]; int random_source; int zero_source; int swab2; int swab4; unsigned int n_frames; unsigned int width; unsigned int height; unsigned int size; char *method_name; char **method_options; unsigned int n_options; char *prefix; unsigned int i; int index; int c; cpu_features = 0; n_frames = 5; width = 352; height = 288; method_name = strdup ("1"); method_options = NULL; n_options = 0; prefix = NULL; random_source = FALSE; zero_source = FALSE; swab2 = FALSE; swab4 = FALSE; quiet = FALSE; while (-1 != (c = getopt_long (argc, argv, short_options, long_options, &index))) { switch (c) { case '2': swab2 ^= TRUE; break; case '4': swab4 ^= TRUE; break; case 'c': cpu_features = cpu_feature_set_from_string (optarg); break; case 'h': height = strtol (optarg, NULL, 0); if (0 == height || 0 != (height % 16)) { fprintf (stderr, "Height must be a multiple of 16.\n"); exit (EXIT_FAILURE); } break; case 'm': method_name = optarg; break; case 'n': n_frames = strtol (optarg, NULL, 0); if (0 == n_frames) { fprintf (stderr, "Number of frames must be " "one or more.\n"); exit (EXIT_FAILURE); } break; case 'o': { unsigned int new_size; new_size = (n_options + 1) * sizeof (method_options[0]); method_options = realloc (method_options, new_size); assert (NULL != method_options); method_options[n_options++] = optarg; break; } case 'p': prefix = optarg; break; case 'q': quiet ^= TRUE; break; case 'r': random_source ^= TRUE; break; case 'w': width = strtol (optarg, NULL, 0); if (0 == width || 0 != (width % 16)) { fprintf (stderr, "Width must be a multiple of 16.\n"); exit (EXIT_FAILURE); } break; case 'z': zero_source ^= TRUE; break; case 'H': usage (stdout, argv); exit (EXIT_SUCCESS); case 'V': printf (VERSION "\n"); exit (EXIT_SUCCESS); default: usage (stderr, argv); exit (EXIT_FAILURE); } } if (!random_source && !zero_source) { if (isatty (STDIN_FILENO)) { fprintf (stderr, "No image data on stdin\n"); exit (EXIT_FAILURE); } } size = width * height * 2; i = 0; #undef ELSEIF #define ELSEIF(x) \ else if (++i == strtoul (method_name, NULL, 0) \ || 0 == strcmp (#x, method_name)) \ method = DI_##x##_GetDeinterlacePluginInfo (); if (0) { exit (EXIT_FAILURE); } ELSEIF (VideoBob) ELSEIF (VideoWeave) ELSEIF (TwoFrame) ELSEIF (Weave) ELSEIF (Bob) ELSEIF (ScalerBob) ELSEIF (EvenOnly) ELSEIF (OddOnly) /* No longer supported. ELSEIF (BlendedClip) */ /* ELSEIF (Adaptive) */ ELSEIF (Greedy) ELSEIF (Greedy2Frame) ELSEIF (GreedyH) /* ELSEIF (OldGame) */ ELSEIF (TomsMoComp) ELSEIF (MoComp2) else { fprintf (stderr, "Unknown deinterlace method '%s'\n", method_name); exit (EXIT_FAILURE); } if (NULL == method) { if (!cpu_features) { fprintf (stderr, "Have no scalar version of %s\n", method_name); } else { fprintf (stderr, "Have no version of %s optimized " "for feature 0x%x\n", method_name, (unsigned int) cpu_features); } exit (55); } set_method_options (method, n_options, method_options); out_buffer = new_buffer (width, height); for (i = 0; i < (MAX_PICTURE_HISTORY + 1) / 2; ++i) in_buffers[i] = new_buffer (width, height); init_info (out_buffer, width, height); if (!quiet) fprintf (stderr, "Using '%s' ShortName='%s' " "HalfHeight=%d FilmMode=%d\n" "FrameRate=%d,%d ModeChanges=%d ModeTicks=%d\n" "NeedFieldDiff=%d NeedCombFactor=%d\n", method->szName, method->szShortName, (int) method->bIsHalfHeight, (int) method->bIsFilmMode, (int) method->FrameRate50Hz, (int) method->FrameRate60Hz, (int) method->ModeChanges, (int) method->ModeTicks, (int) method->bNeedFieldDiff, (int) method->bNeedCombFactor); for (i = 0; i < n_frames; ++i) { char name[40]; size_t actual; if (zero_source) { /* Nothing to do. */ } else if (random_source) { unsigned int j; for (j = 0; j < size; ++j) { in_buffers[i % 4][j] = myrand (); } } else { assert (!feof (stdin)); actual = fread (in_buffers[i % 4], 1, size, stdin); if (actual < size || ferror (stdin)) { perror ("Read error"); exit (EXIT_FAILURE); } if (swab2) swab16 (in_buffers[i % 4], size); if (swab4) swab32 (in_buffers[i % 4], size); } /* Top field */ deinterlace (in_buffers[i % 4], width, 0); if (prefix) { snprintf (name, sizeof (name), "%s%u-t.yuv", prefix, i); write_buffer (name, out_buffer, width, height); } else { write_buffer (NULL, out_buffer, width, height); } /* Bottom field */ deinterlace (in_buffers[i % 4], width, 1); if (prefix) { snprintf (name, sizeof (name), "%s%u-b.yuv", prefix, i); write_buffer (name, out_buffer, width, height); } else { write_buffer (NULL, out_buffer, width, height); } } if (!quiet) fprintf (stderr, "\n"); return EXIT_SUCCESS; } zapping-0.10cvs6/plugins/deinterlace/test/emulator.sh 755 764 144 1577 10272464722 16133 #!/bin/sh find_emulator () { local feature=$1 if ./cpudt $feature; then # Excellent! $feature is supported by our CPU. emu= pre= return 0 else case "$feature" in altivec) emu="qemu-ppc" ;; *) emu="qemu-i386" ;; esac if which $emu >/dev/null && $emu ./cpudt $feature; then # We have a CPU emulator and it supports $feature, so we can run # the test program on older CPUs and when cross-compiling. pre= return 0 else case "$feature" in altivec) pre=nosuchthing ;; sse3) pre=nosuchthing ;; *) pre=/usr/local/lib/libmmxemu.so ;; esac if test -e $pre; then # We can simulate unsupported mmx instructions on this CPU. emu= return 0 else echo "*** Cannot run $feature tests on this machine." emu=false pre= fi fi fi return 1 } zapping-0.10cvs6/plugins/deinterlace/test/md5sums-mmx 644 764 144 6632 10260122052 16040 bce34453f500c8592b1b8a345ff14fa6 *VideoBob.yuv 59699b9a41f648831ffd8806228f1921 *VideoWeave.yuv acbe474eba40a908e624d6cfaba187ed *TwoFrame.yuv 3ba399319a1142cb7d66a7ca4939fe8b *Weave.yuv bc2be9694d61b632df273116e28447f1 *Bob.yuv 2a4126e3c685f41317c38f2f54a5c3ad *ScalerBob.yuv a4c6c176f2846ae7f097c43b7991b655 *EvenOnly.yuv 36a77872a057f42bcbb8f67537a126e5 *OddOnly.yuv 4e5f7cbeb9aa44fbc3aae3b38eeda169 *Greedy.yuv 297fadb6efe87da3819c56bb0f4a9419 *Greedy2Frame.yuv f5f9ed43f070bc284e6af77daab112ba *MoComp2.yuv 569640c66f24a679a312c2d318688436 *GreedyH-0-0-0-0-0.yuv 569640c66f24a679a312c2d318688436 *GreedyH-0-0-0-0-1.yuv 0ba9abee2daa10c3e2e6c07eaf2c72e9 *GreedyH-0-0-0-1-0.yuv 0ba9abee2daa10c3e2e6c07eaf2c72e9 *GreedyH-0-0-0-1-1.yuv 40c84f4ab1ba500a55973dda9a8f513e *GreedyH-0-0-1-0-0.yuv 40c84f4ab1ba500a55973dda9a8f513e *GreedyH-0-0-1-0-1.yuv 40c84f4ab1ba500a55973dda9a8f513e *GreedyH-0-0-1-1-0.yuv 40c84f4ab1ba500a55973dda9a8f513e *GreedyH-0-0-1-1-1.yuv 45ce9d58815b2715ebabbabf8540501f *GreedyH-0-1-0-0-0.yuv 45ce9d58815b2715ebabbabf8540501f *GreedyH-0-1-0-0-1.yuv 45ce9d58815b2715ebabbabf8540501f *GreedyH-0-1-0-1-0.yuv 45ce9d58815b2715ebabbabf8540501f *GreedyH-0-1-0-1-1.yuv 5b5aab14c91e6068ac9fabfaa63cb3df *GreedyH-0-1-1-0-0.yuv 5b5aab14c91e6068ac9fabfaa63cb3df *GreedyH-0-1-1-0-1.yuv 5b5aab14c91e6068ac9fabfaa63cb3df *GreedyH-0-1-1-1-0.yuv 5b5aab14c91e6068ac9fabfaa63cb3df *GreedyH-0-1-1-1-1.yuv 0ba9abee2daa10c3e2e6c07eaf2c72e9 *GreedyH-1-0-0-0-0.yuv 0ba9abee2daa10c3e2e6c07eaf2c72e9 *GreedyH-1-0-0-0-1.yuv 0ba9abee2daa10c3e2e6c07eaf2c72e9 *GreedyH-1-0-0-1-0.yuv 0ba9abee2daa10c3e2e6c07eaf2c72e9 *GreedyH-1-0-0-1-1.yuv 40c84f4ab1ba500a55973dda9a8f513e *GreedyH-1-0-1-0-0.yuv 40c84f4ab1ba500a55973dda9a8f513e *GreedyH-1-0-1-0-1.yuv 40c84f4ab1ba500a55973dda9a8f513e *GreedyH-1-0-1-1-0.yuv 40c84f4ab1ba500a55973dda9a8f513e *GreedyH-1-0-1-1-1.yuv 45ce9d58815b2715ebabbabf8540501f *GreedyH-1-1-0-0-0.yuv 45ce9d58815b2715ebabbabf8540501f *GreedyH-1-1-0-0-1.yuv 45ce9d58815b2715ebabbabf8540501f *GreedyH-1-1-0-1-0.yuv 45ce9d58815b2715ebabbabf8540501f *GreedyH-1-1-0-1-1.yuv 5b5aab14c91e6068ac9fabfaa63cb3df *GreedyH-1-1-1-0-0.yuv 5b5aab14c91e6068ac9fabfaa63cb3df *GreedyH-1-1-1-0-1.yuv 5b5aab14c91e6068ac9fabfaa63cb3df *GreedyH-1-1-1-1-0.yuv 5b5aab14c91e6068ac9fabfaa63cb3df *GreedyH-1-1-1-1-1.yuv 311ae4639fe587f32313a5acaca49903 *TomsMoComp-0-0.yuv c613a041780849e2b0af8256bca4fea5 *TomsMoComp-0-1.yuv 057238bbe5bfa6ffacd9e6fad968b30b *TomsMoComp-0-2.yuv 203e2c35b3f4077320f55ef1b583eb43 *TomsMoComp-0-4.yuv 1d3fbc9bfd40c04c9b87e1305ee9f0ae *TomsMoComp-0-6.yuv 15e85adac546af377eb972ebf0a963f7 *TomsMoComp-0-10.yuv cd1d8f45851c7cfd41db9cd63ab672c2 *TomsMoComp-0-12.yuv 73f2c948147eaca3e1caa1085805f927 *TomsMoComp-0-14.yuv c2424b28d29606fb9b1396973f391337 *TomsMoComp-0-16.yuv b3f2bde8fc907cdc2eab3a2bba98ed05 *TomsMoComp-0-20.yuv d74b7749c33c29af2b37f59f86a00e71 *TomsMoComp-0-22.yuv 3d2219748ffc36a81123a3392b38fa50 *TomsMoComp-1-0.yuv 82b02b610cfd85d6ddfa60c0be44b513 *TomsMoComp-1-1.yuv 9106dcd49825e184bb76e599161b3eb5 *TomsMoComp-1-2.yuv 81c991669460cbdc9c740fe70eebb3b3 *TomsMoComp-1-4.yuv ebc80f66c0b92a9a0e8611a22b64a6dc *TomsMoComp-1-6.yuv ba2c311aa57f4778c9e7f930b20dd6b6 *TomsMoComp-1-10.yuv ee15b9ea56740be6a5ee936a8b7a8444 *TomsMoComp-1-12.yuv c5d48ac7d648b5de20fd0e98429462ef *TomsMoComp-1-14.yuv 3756c6266105f74ece9f83d49266298e *TomsMoComp-1-16.yuv 5318df8ac1962bf9aced8bf6efdee3c2 *TomsMoComp-1-20.yuv 96173c57101de81b7a541211ee1204de *TomsMoComp-1-22.yuv zapping-0.10cvs6/plugins/deinterlace/test/md5sums-sse 644 764 144 6632 10260122052 16031 1b819cec3d21b5c808c15d2ad2e240f1 *VideoBob.yuv 19d434304840d69829e0d9bb7438385b *VideoWeave.yuv 520917772b165a347f7d6b1312c046ac *TwoFrame.yuv 3ba399319a1142cb7d66a7ca4939fe8b *Weave.yuv bc2be9694d61b632df273116e28447f1 *Bob.yuv 2a4126e3c685f41317c38f2f54a5c3ad *ScalerBob.yuv a4c6c176f2846ae7f097c43b7991b655 *EvenOnly.yuv 36a77872a057f42bcbb8f67537a126e5 *OddOnly.yuv 4e5f7cbeb9aa44fbc3aae3b38eeda169 *Greedy.yuv bcebf933285456a4ef09326246a70c69 *Greedy2Frame.yuv d1da026c35b7a1b0a5cdbda2f9b764a5 *MoComp2.yuv 0d43e94167b86dd3165edbd92a6babbe *GreedyH-0-0-0-0-0.yuv 0d43e94167b86dd3165edbd92a6babbe *GreedyH-0-0-0-0-1.yuv ec059e1f25b5d986dfa2447e8ea829c5 *GreedyH-0-0-0-1-0.yuv ec059e1f25b5d986dfa2447e8ea829c5 *GreedyH-0-0-0-1-1.yuv 5b7c9bdd1fd468cbaface2dcd9d42121 *GreedyH-0-0-1-0-0.yuv 5b7c9bdd1fd468cbaface2dcd9d42121 *GreedyH-0-0-1-0-1.yuv 5b7c9bdd1fd468cbaface2dcd9d42121 *GreedyH-0-0-1-1-0.yuv 5b7c9bdd1fd468cbaface2dcd9d42121 *GreedyH-0-0-1-1-1.yuv f325aceff163725dc589a965bee0d77b *GreedyH-0-1-0-0-0.yuv f325aceff163725dc589a965bee0d77b *GreedyH-0-1-0-0-1.yuv f325aceff163725dc589a965bee0d77b *GreedyH-0-1-0-1-0.yuv f325aceff163725dc589a965bee0d77b *GreedyH-0-1-0-1-1.yuv 8a34d3f798230e041894b641e8e367ca *GreedyH-0-1-1-0-0.yuv 8a34d3f798230e041894b641e8e367ca *GreedyH-0-1-1-0-1.yuv 8a34d3f798230e041894b641e8e367ca *GreedyH-0-1-1-1-0.yuv 8a34d3f798230e041894b641e8e367ca *GreedyH-0-1-1-1-1.yuv ec059e1f25b5d986dfa2447e8ea829c5 *GreedyH-1-0-0-0-0.yuv ec059e1f25b5d986dfa2447e8ea829c5 *GreedyH-1-0-0-0-1.yuv ec059e1f25b5d986dfa2447e8ea829c5 *GreedyH-1-0-0-1-0.yuv ec059e1f25b5d986dfa2447e8ea829c5 *GreedyH-1-0-0-1-1.yuv 5b7c9bdd1fd468cbaface2dcd9d42121 *GreedyH-1-0-1-0-0.yuv 5b7c9bdd1fd468cbaface2dcd9d42121 *GreedyH-1-0-1-0-1.yuv 5b7c9bdd1fd468cbaface2dcd9d42121 *GreedyH-1-0-1-1-0.yuv 5b7c9bdd1fd468cbaface2dcd9d42121 *GreedyH-1-0-1-1-1.yuv f325aceff163725dc589a965bee0d77b *GreedyH-1-1-0-0-0.yuv f325aceff163725dc589a965bee0d77b *GreedyH-1-1-0-0-1.yuv f325aceff163725dc589a965bee0d77b *GreedyH-1-1-0-1-0.yuv f325aceff163725dc589a965bee0d77b *GreedyH-1-1-0-1-1.yuv 8a34d3f798230e041894b641e8e367ca *GreedyH-1-1-1-0-0.yuv 8a34d3f798230e041894b641e8e367ca *GreedyH-1-1-1-0-1.yuv 8a34d3f798230e041894b641e8e367ca *GreedyH-1-1-1-1-0.yuv 8a34d3f798230e041894b641e8e367ca *GreedyH-1-1-1-1-1.yuv 674572ffdc00d486fce9acea97da07dc *TomsMoComp-0-0.yuv 69b253fb1767c79c79f336219b6a3064 *TomsMoComp-0-1.yuv 90cd9068921ae54b0ef4e7209cdbca9c *TomsMoComp-0-2.yuv 90cd9068921ae54b0ef4e7209cdbca9c *TomsMoComp-0-4.yuv a7657b35251c4632900f197290f3d55d *TomsMoComp-0-6.yuv a7657b35251c4632900f197290f3d55d *TomsMoComp-0-10.yuv 43b1970aa69613f470d3e8e837851ab9 *TomsMoComp-0-12.yuv e60652e0b2bb5d12fac258e7bd5d8081 *TomsMoComp-0-14.yuv 43b1970aa69613f470d3e8e837851ab9 *TomsMoComp-0-16.yuv e60652e0b2bb5d12fac258e7bd5d8081 *TomsMoComp-0-20.yuv 9934ee956451adbd5574a70ed131f50b *TomsMoComp-0-22.yuv 812a44db7fe5b6932f10eb41b3cfe549 *TomsMoComp-1-0.yuv af220936f77a7073b2ebcb266c60ed32 *TomsMoComp-1-1.yuv ccd6c8237b149f6c4fea2381cb107a58 *TomsMoComp-1-2.yuv ccd6c8237b149f6c4fea2381cb107a58 *TomsMoComp-1-4.yuv cf7d21cbb20c19e66955117d76944350 *TomsMoComp-1-6.yuv cf7d21cbb20c19e66955117d76944350 *TomsMoComp-1-10.yuv b440d4d4f91421183c6244839a61e713 *TomsMoComp-1-12.yuv 1611ee45ba6e84136681fbef4402a07b *TomsMoComp-1-14.yuv b440d4d4f91421183c6244839a61e713 *TomsMoComp-1-16.yuv 1611ee45ba6e84136681fbef4402a07b *TomsMoComp-1-20.yuv 9d1e392f6c92583e4efd883be680cece *TomsMoComp-1-22.yuv zapping-0.10cvs6/plugins/deinterlace/test/ditest-altivec.sh 755 764 144 427 10263053114 17162 #!/bin/sh srcdir=`cd $(dirname $0) >/dev/null; pwd; cd - >/dev/null` builddir=`pwd` . $srcdir/ditest-all.sh trap "rm -rf $builddir/results-$$-*" EXIT feature=altivec ditest_all $feature || exit $? cd $builddir/results-$$-$feature md5sum -c $srcdir/md5sums-$feature >/dev/null zapping-0.10cvs6/plugins/deinterlace/test/ditest-3dnow.sh 755 764 144 425 10263053141 16563 #!/bin/sh srcdir=`cd $(dirname $0) >/dev/null; pwd; cd - >/dev/null` builddir=`pwd` . $srcdir/ditest-all.sh trap "rm -rf $builddir/results-$$-*" EXIT feature=3dnow ditest_all $feature || exit $? cd $builddir/results-$$-$feature md5sum -c $srcdir/md5sums-$feature >/dev/null zapping-0.10cvs6/plugins/deinterlace/test/md5sums-sse2 644 764 144 6632 10260122052 16113 1b819cec3d21b5c808c15d2ad2e240f1 *VideoBob.yuv 19d434304840d69829e0d9bb7438385b *VideoWeave.yuv 520917772b165a347f7d6b1312c046ac *TwoFrame.yuv 3ba399319a1142cb7d66a7ca4939fe8b *Weave.yuv bc2be9694d61b632df273116e28447f1 *Bob.yuv 2a4126e3c685f41317c38f2f54a5c3ad *ScalerBob.yuv a4c6c176f2846ae7f097c43b7991b655 *EvenOnly.yuv 36a77872a057f42bcbb8f67537a126e5 *OddOnly.yuv 4e5f7cbeb9aa44fbc3aae3b38eeda169 *Greedy.yuv bcebf933285456a4ef09326246a70c69 *Greedy2Frame.yuv b122012c3a7b1f5b319f7ee4c28f96f5 *MoComp2.yuv 0d43e94167b86dd3165edbd92a6babbe *GreedyH-0-0-0-0-0.yuv 0d43e94167b86dd3165edbd92a6babbe *GreedyH-0-0-0-0-1.yuv 8032165ba3083fdfe47f2c8464b954bd *GreedyH-0-0-0-1-0.yuv 8032165ba3083fdfe47f2c8464b954bd *GreedyH-0-0-0-1-1.yuv 10dde86b179f376f32772769b568eeba *GreedyH-0-0-1-0-0.yuv 10dde86b179f376f32772769b568eeba *GreedyH-0-0-1-0-1.yuv 10dde86b179f376f32772769b568eeba *GreedyH-0-0-1-1-0.yuv 10dde86b179f376f32772769b568eeba *GreedyH-0-0-1-1-1.yuv 46efa9a96ef9d070a19ca3b031478a0c *GreedyH-0-1-0-0-0.yuv 46efa9a96ef9d070a19ca3b031478a0c *GreedyH-0-1-0-0-1.yuv 46efa9a96ef9d070a19ca3b031478a0c *GreedyH-0-1-0-1-0.yuv 46efa9a96ef9d070a19ca3b031478a0c *GreedyH-0-1-0-1-1.yuv a57bc5e2c729ddbde58d81f91968104c *GreedyH-0-1-1-0-0.yuv a57bc5e2c729ddbde58d81f91968104c *GreedyH-0-1-1-0-1.yuv a57bc5e2c729ddbde58d81f91968104c *GreedyH-0-1-1-1-0.yuv a57bc5e2c729ddbde58d81f91968104c *GreedyH-0-1-1-1-1.yuv 8032165ba3083fdfe47f2c8464b954bd *GreedyH-1-0-0-0-0.yuv 8032165ba3083fdfe47f2c8464b954bd *GreedyH-1-0-0-0-1.yuv 8032165ba3083fdfe47f2c8464b954bd *GreedyH-1-0-0-1-0.yuv 8032165ba3083fdfe47f2c8464b954bd *GreedyH-1-0-0-1-1.yuv 10dde86b179f376f32772769b568eeba *GreedyH-1-0-1-0-0.yuv 10dde86b179f376f32772769b568eeba *GreedyH-1-0-1-0-1.yuv 10dde86b179f376f32772769b568eeba *GreedyH-1-0-1-1-0.yuv 10dde86b179f376f32772769b568eeba *GreedyH-1-0-1-1-1.yuv 46efa9a96ef9d070a19ca3b031478a0c *GreedyH-1-1-0-0-0.yuv 46efa9a96ef9d070a19ca3b031478a0c *GreedyH-1-1-0-0-1.yuv 46efa9a96ef9d070a19ca3b031478a0c *GreedyH-1-1-0-1-0.yuv 46efa9a96ef9d070a19ca3b031478a0c *GreedyH-1-1-0-1-1.yuv a57bc5e2c729ddbde58d81f91968104c *GreedyH-1-1-1-0-0.yuv a57bc5e2c729ddbde58d81f91968104c *GreedyH-1-1-1-0-1.yuv a57bc5e2c729ddbde58d81f91968104c *GreedyH-1-1-1-1-0.yuv a57bc5e2c729ddbde58d81f91968104c *GreedyH-1-1-1-1-1.yuv 71e620744ed136a81cb2daf8995aa75c *TomsMoComp-0-0.yuv 804b89c95efab3a89ed58dcb8bc65409 *TomsMoComp-0-1.yuv b22fa343df7ff9d5f82040d8aa075f7c *TomsMoComp-0-2.yuv b22fa343df7ff9d5f82040d8aa075f7c *TomsMoComp-0-4.yuv eeebd9d950e239e084888b2db7e88c5f *TomsMoComp-0-6.yuv eeebd9d950e239e084888b2db7e88c5f *TomsMoComp-0-10.yuv 9e1d4758786776f7c5cb8a2b4049e87c *TomsMoComp-0-12.yuv b6b7216d8cd9066cf1de11e12582052d *TomsMoComp-0-14.yuv 9e1d4758786776f7c5cb8a2b4049e87c *TomsMoComp-0-16.yuv b6b7216d8cd9066cf1de11e12582052d *TomsMoComp-0-20.yuv c9011eb8fdb9d5fbae3e1d5f70463a01 *TomsMoComp-0-22.yuv 2dc436f4b8dd166265e3c3056501b3eb *TomsMoComp-1-0.yuv e2665a28920544b3d1cca4e4d8f348ea *TomsMoComp-1-1.yuv 271ee3278e0790e0786ca0b2f309d364 *TomsMoComp-1-2.yuv 271ee3278e0790e0786ca0b2f309d364 *TomsMoComp-1-4.yuv 5a527cb0bc6b7ce148ab494e9cd7dc57 *TomsMoComp-1-6.yuv 5a527cb0bc6b7ce148ab494e9cd7dc57 *TomsMoComp-1-10.yuv 91b4c0c67e1ac9d2dd3bc89d1eae49a0 *TomsMoComp-1-12.yuv f78fbff147bc895b1d5c3a0a80882958 *TomsMoComp-1-14.yuv 91b4c0c67e1ac9d2dd3bc89d1eae49a0 *TomsMoComp-1-16.yuv f78fbff147bc895b1d5c3a0a80882958 *TomsMoComp-1-20.yuv c294aabf17d7e919093171807bb6e3d3 *TomsMoComp-1-22.yuv zapping-0.10cvs6/plugins/deinterlace/test/md5sums-sse3 644 764 144 6632 10272464722 16134 1b819cec3d21b5c808c15d2ad2e240f1 *VideoBob.yuv 19d434304840d69829e0d9bb7438385b *VideoWeave.yuv 520917772b165a347f7d6b1312c046ac *TwoFrame.yuv 3ba399319a1142cb7d66a7ca4939fe8b *Weave.yuv bc2be9694d61b632df273116e28447f1 *Bob.yuv 2a4126e3c685f41317c38f2f54a5c3ad *ScalerBob.yuv a4c6c176f2846ae7f097c43b7991b655 *EvenOnly.yuv 36a77872a057f42bcbb8f67537a126e5 *OddOnly.yuv 4e5f7cbeb9aa44fbc3aae3b38eeda169 *Greedy.yuv bcebf933285456a4ef09326246a70c69 *Greedy2Frame.yuv b122012c3a7b1f5b319f7ee4c28f96f5 *MoComp2.yuv 0d43e94167b86dd3165edbd92a6babbe *GreedyH-0-0-0-0-0.yuv 0d43e94167b86dd3165edbd92a6babbe *GreedyH-0-0-0-0-1.yuv 8032165ba3083fdfe47f2c8464b954bd *GreedyH-0-0-0-1-0.yuv 8032165ba3083fdfe47f2c8464b954bd *GreedyH-0-0-0-1-1.yuv 10dde86b179f376f32772769b568eeba *GreedyH-0-0-1-0-0.yuv 10dde86b179f376f32772769b568eeba *GreedyH-0-0-1-0-1.yuv 10dde86b179f376f32772769b568eeba *GreedyH-0-0-1-1-0.yuv 10dde86b179f376f32772769b568eeba *GreedyH-0-0-1-1-1.yuv 46efa9a96ef9d070a19ca3b031478a0c *GreedyH-0-1-0-0-0.yuv 46efa9a96ef9d070a19ca3b031478a0c *GreedyH-0-1-0-0-1.yuv 46efa9a96ef9d070a19ca3b031478a0c *GreedyH-0-1-0-1-0.yuv 46efa9a96ef9d070a19ca3b031478a0c *GreedyH-0-1-0-1-1.yuv a57bc5e2c729ddbde58d81f91968104c *GreedyH-0-1-1-0-0.yuv a57bc5e2c729ddbde58d81f91968104c *GreedyH-0-1-1-0-1.yuv a57bc5e2c729ddbde58d81f91968104c *GreedyH-0-1-1-1-0.yuv a57bc5e2c729ddbde58d81f91968104c *GreedyH-0-1-1-1-1.yuv 8032165ba3083fdfe47f2c8464b954bd *GreedyH-1-0-0-0-0.yuv 8032165ba3083fdfe47f2c8464b954bd *GreedyH-1-0-0-0-1.yuv 8032165ba3083fdfe47f2c8464b954bd *GreedyH-1-0-0-1-0.yuv 8032165ba3083fdfe47f2c8464b954bd *GreedyH-1-0-0-1-1.yuv 10dde86b179f376f32772769b568eeba *GreedyH-1-0-1-0-0.yuv 10dde86b179f376f32772769b568eeba *GreedyH-1-0-1-0-1.yuv 10dde86b179f376f32772769b568eeba *GreedyH-1-0-1-1-0.yuv 10dde86b179f376f32772769b568eeba *GreedyH-1-0-1-1-1.yuv 46efa9a96ef9d070a19ca3b031478a0c *GreedyH-1-1-0-0-0.yuv 46efa9a96ef9d070a19ca3b031478a0c *GreedyH-1-1-0-0-1.yuv 46efa9a96ef9d070a19ca3b031478a0c *GreedyH-1-1-0-1-0.yuv 46efa9a96ef9d070a19ca3b031478a0c *GreedyH-1-1-0-1-1.yuv a57bc5e2c729ddbde58d81f91968104c *GreedyH-1-1-1-0-0.yuv a57bc5e2c729ddbde58d81f91968104c *GreedyH-1-1-1-0-1.yuv a57bc5e2c729ddbde58d81f91968104c *GreedyH-1-1-1-1-0.yuv a57bc5e2c729ddbde58d81f91968104c *GreedyH-1-1-1-1-1.yuv 71e620744ed136a81cb2daf8995aa75c *TomsMoComp-0-0.yuv 804b89c95efab3a89ed58dcb8bc65409 *TomsMoComp-0-1.yuv b22fa343df7ff9d5f82040d8aa075f7c *TomsMoComp-0-2.yuv b22fa343df7ff9d5f82040d8aa075f7c *TomsMoComp-0-4.yuv eeebd9d950e239e084888b2db7e88c5f *TomsMoComp-0-6.yuv eeebd9d950e239e084888b2db7e88c5f *TomsMoComp-0-10.yuv 9e1d4758786776f7c5cb8a2b4049e87c *TomsMoComp-0-12.yuv b6b7216d8cd9066cf1de11e12582052d *TomsMoComp-0-14.yuv 9e1d4758786776f7c5cb8a2b4049e87c *TomsMoComp-0-16.yuv b6b7216d8cd9066cf1de11e12582052d *TomsMoComp-0-20.yuv c9011eb8fdb9d5fbae3e1d5f70463a01 *TomsMoComp-0-22.yuv 2dc436f4b8dd166265e3c3056501b3eb *TomsMoComp-1-0.yuv e2665a28920544b3d1cca4e4d8f348ea *TomsMoComp-1-1.yuv 271ee3278e0790e0786ca0b2f309d364 *TomsMoComp-1-2.yuv 271ee3278e0790e0786ca0b2f309d364 *TomsMoComp-1-4.yuv 5a527cb0bc6b7ce148ab494e9cd7dc57 *TomsMoComp-1-6.yuv 5a527cb0bc6b7ce148ab494e9cd7dc57 *TomsMoComp-1-10.yuv 91b4c0c67e1ac9d2dd3bc89d1eae49a0 *TomsMoComp-1-12.yuv f78fbff147bc895b1d5c3a0a80882958 *TomsMoComp-1-14.yuv 91b4c0c67e1ac9d2dd3bc89d1eae49a0 *TomsMoComp-1-16.yuv f78fbff147bc895b1d5c3a0a80882958 *TomsMoComp-1-20.yuv c294aabf17d7e919093171807bb6e3d3 *TomsMoComp-1-22.yuv zapping-0.10cvs6/plugins/deinterlace/test/Makefile.am 644 764 144 2654 10417055352 15771 ## Process this file with automake to produce Makefile.in TESTS = ditest-scalar.sh if CAN_COMPILE_MMX TESTS += ditest-mmx.sh endif if CAN_COMPILE_3DNOW TESTS += ditest-3dnow.sh endif if CAN_COMPILE_SSE TESTS += ditest-sse.sh endif if CAN_COMPILE_SSE2 TESTS += ditest-sse2.sh endif if CAN_COMPILE_SSE3 TESTS += ditest-sse3.sh endif if CAN_COMPILE_ALTIVEC TESTS += ditest-altivec.sh endif EXTRA_DIST = \ ditest-3dnow.sh \ ditest-all.sh \ ditest-altivec.sh \ ditest-mmx.sh \ ditest-scalar.sh \ ditest-sse.sh \ ditest-sse2.sh \ ditest-sse3.sh \ ditest-x86.sh \ emulator.sh \ gen-md5sums.sh \ md5sums-3dnow \ md5sums-altivec \ md5sums-mmx \ md5sums-scalar \ md5sums-sse \ md5sums-sse2 \ md5sums-sse3 INCLUDES = \ -I$(top_srcdir) \ -I$(top_srcdir)/plugins/deinterlace noinst_PROGRAMS = ditest dicmp cpudt ditest_SOURCES = \ ditest.c \ guard.h ditest_LDADD = \ $(top_builddir)/plugins/deinterlace/DI_GreedyH/libDI_GreedyH.la \ $(top_builddir)/plugins/deinterlace/DI_Misc/libDI_Misc.la \ $(top_builddir)/libtv/libtv.la dicmp_SOURCES = \ dicmp.c cpudt_SOURCES = \ cpudt.c cpudt_LDADD = \ $(top_builddir)/libtv/libtv.la emulator.sh: $(MAKE) cpudt ditest-all.sh: $(MAKE) ditest $(MAKE) emulator.sh ditest-3dnow.sh \ ditest-altivec.sh \ ditest-mmx.sh \ ditest-scalar.sh \ ditest-sse.sh \ ditest-sse2.sh \ ditest-sse3.sh \ gen-md5sums.sh: $(MAKE) ditest-all.sh ditest-x86.sh: $(MAKE) ditest-all.sh $(MAKE) dicmp zapping-0.10cvs6/plugins/deinterlace/test/Makefile.in 644 764 144 53110 10442575552 16022 # Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = ../../.. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ @CAN_COMPILE_MMX_TRUE@am__append_1 = ditest-mmx.sh @CAN_COMPILE_3DNOW_TRUE@am__append_2 = ditest-3dnow.sh @CAN_COMPILE_SSE_TRUE@am__append_3 = ditest-sse.sh @CAN_COMPILE_SSE2_TRUE@am__append_4 = ditest-sse2.sh @CAN_COMPILE_SSE3_TRUE@am__append_5 = ditest-sse3.sh @CAN_COMPILE_ALTIVEC_TRUE@am__append_6 = ditest-altivec.sh noinst_PROGRAMS = ditest$(EXEEXT) dicmp$(EXEEXT) cpudt$(EXEEXT) subdir = plugins/deinterlace/test DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = PROGRAMS = $(noinst_PROGRAMS) am_cpudt_OBJECTS = cpudt.$(OBJEXT) cpudt_OBJECTS = $(am_cpudt_OBJECTS) cpudt_DEPENDENCIES = $(top_builddir)/libtv/libtv.la am_dicmp_OBJECTS = dicmp.$(OBJEXT) dicmp_OBJECTS = $(am_dicmp_OBJECTS) dicmp_LDADD = $(LDADD) am_ditest_OBJECTS = ditest.$(OBJEXT) ditest_OBJECTS = $(am_ditest_OBJECTS) ditest_DEPENDENCIES = $(top_builddir)/plugins/deinterlace/DI_GreedyH/libDI_GreedyH.la \ $(top_builddir)/plugins/deinterlace/DI_Misc/libDI_Misc.la \ $(top_builddir)/libtv/libtv.la DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ SOURCES = $(cpudt_SOURCES) $(dicmp_SOURCES) $(ditest_SOURCES) DIST_SOURCES = $(cpudt_SOURCES) $(dicmp_SOURCES) $(ditest_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ ARTS_CFLAGS = @ARTS_CFLAGS@ ARTS_LIBS = @ARTS_LIBS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BUILD_DEINTERLACE_PLUGIN_FALSE = @BUILD_DEINTERLACE_PLUGIN_FALSE@ BUILD_DEINTERLACE_PLUGIN_TRUE = @BUILD_DEINTERLACE_PLUGIN_TRUE@ BUILD_MAN_FALSE = @BUILD_MAN_FALSE@ BUILD_MAN_TRUE = @BUILD_MAN_TRUE@ CAN_COMPILE_3DNOW_FALSE = @CAN_COMPILE_3DNOW_FALSE@ CAN_COMPILE_3DNOW_TRUE = @CAN_COMPILE_3DNOW_TRUE@ CAN_COMPILE_ALTIVEC_FALSE = @CAN_COMPILE_ALTIVEC_FALSE@ CAN_COMPILE_ALTIVEC_TRUE = @CAN_COMPILE_ALTIVEC_TRUE@ CAN_COMPILE_MMX_FALSE = @CAN_COMPILE_MMX_FALSE@ CAN_COMPILE_MMX_TRUE = @CAN_COMPILE_MMX_TRUE@ CAN_COMPILE_SSE2_FALSE = @CAN_COMPILE_SSE2_FALSE@ CAN_COMPILE_SSE2_TRUE = @CAN_COMPILE_SSE2_TRUE@ CAN_COMPILE_SSE3_FALSE = @CAN_COMPILE_SSE3_FALSE@ CAN_COMPILE_SSE3_TRUE = @CAN_COMPILE_SSE3_TRUE@ CAN_COMPILE_SSE_FALSE = @CAN_COMPILE_SSE_FALSE@ CAN_COMPILE_SSE_TRUE = @CAN_COMPILE_SSE_TRUE@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCAS = @CCAS@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ COMMON_INCLUDES = @COMMON_INCLUDES@ CONSOLEHELPER_LOCATION = @CONSOLEHELPER_LOCATION@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFAULT_CFLAGS = @DEFAULT_CFLAGS@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ESD_LIBS = @ESD_LIBS@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ GCONF_SCHEMAS_INSTALL_FALSE = @GCONF_SCHEMAS_INSTALL_FALSE@ GCONF_SCHEMAS_INSTALL_TRUE = @GCONF_SCHEMAS_INSTALL_TRUE@ GCONF_SCHEMA_CONFIG_SOURCE = @GCONF_SCHEMA_CONFIG_SOURCE@ GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@ GDK_PIXBUF_CSOURCE = @GDK_PIXBUF_CSOURCE@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ HAVE_GCC_LIMITS_FALSE = @HAVE_GCC_LIMITS_FALSE@ HAVE_GCC_LIMITS_TRUE = @HAVE_GCC_LIMITS_TRUE@ HAVE_LIBZVBI_FALSE = @HAVE_LIBZVBI_FALSE@ HAVE_LIBZVBI_TRUE = @HAVE_LIBZVBI_TRUE@ HAVE_X86_FALSE = @HAVE_X86_FALSE@ HAVE_X86_TRUE = @HAVE_X86_TRUE@ HAVE_XMU_FALSE = @HAVE_XMU_FALSE@ HAVE_XMU_TRUE = @HAVE_XMU_TRUE@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ INTLTOOL_CAVES_RULE = @INTLTOOL_CAVES_RULE@ INTLTOOL_DESKTOP_RULE = @INTLTOOL_DESKTOP_RULE@ INTLTOOL_DIRECTORY_RULE = @INTLTOOL_DIRECTORY_RULE@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ INTLTOOL_ICONV = @INTLTOOL_ICONV@ INTLTOOL_KBD_RULE = @INTLTOOL_KBD_RULE@ INTLTOOL_KEYS_RULE = @INTLTOOL_KEYS_RULE@ INTLTOOL_MERGE = @INTLTOOL_MERGE@ INTLTOOL_MSGFMT = @INTLTOOL_MSGFMT@ INTLTOOL_MSGMERGE = @INTLTOOL_MSGMERGE@ INTLTOOL_OAF_RULE = @INTLTOOL_OAF_RULE@ INTLTOOL_PERL = @INTLTOOL_PERL@ INTLTOOL_PONG_RULE = @INTLTOOL_PONG_RULE@ INTLTOOL_PROP_RULE = @INTLTOOL_PROP_RULE@ INTLTOOL_SCHEMAS_RULE = @INTLTOOL_SCHEMAS_RULE@ INTLTOOL_SERVER_RULE = @INTLTOOL_SERVER_RULE@ INTLTOOL_SHEET_RULE = @INTLTOOL_SHEET_RULE@ INTLTOOL_SOUNDLIST_RULE = @INTLTOOL_SOUNDLIST_RULE@ INTLTOOL_THEME_RULE = @INTLTOOL_THEME_RULE@ INTLTOOL_UI_RULE = @INTLTOOL_UI_RULE@ INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ INTLTOOL_XAM_RULE = @INTLTOOL_XAM_RULE@ INTLTOOL_XGETTEXT = @INTLTOOL_XGETTEXT@ INTLTOOL_XML_NOMERGE_RULE = @INTLTOOL_XML_NOMERGE_RULE@ INTLTOOL_XML_RULE = @INTLTOOL_XML_RULE@ JPEG_LIB = @JPEG_LIB@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBXML_CFLAGS = @LIBXML_CFLAGS@ LIBXML_LIBS = @LIBXML_LIBS@ LIRC_LIB = @LIRC_LIB@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAKEINFO = @MAKEINFO@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ NEED_ZSFB_FALSE = @NEED_ZSFB_FALSE@ NEED_ZSFB_TRUE = @NEED_ZSFB_TRUE@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_CFLAGS = @PACKAGE_CFLAGS@ PACKAGE_LIBS = @PACKAGE_LIBS@ PACKAGE_LIB_DIR = @PACKAGE_LIB_DIR@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_PIXMAPS_DIR = @PACKAGE_PIXMAPS_DIR@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PACKAGE_VERSION_ID = @PACKAGE_VERSION_ID@ PATH_SEPARATOR = @PATH_SEPARATOR@ PG_CFLAGS = @PG_CFLAGS@ PKG_CONFIG = @PKG_CONFIG@ PLUGIN_DEFAULT_DIR = @PLUGIN_DEFAULT_DIR@ PLUGIN_DEFAULT_FLAGS = @PLUGIN_DEFAULT_FLAGS@ PNG_LIBS = @PNG_LIBS@ POFILES = @POFILES@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ PYTHON_LIBS = @PYTHON_LIBS@ PY_CFLAGS = @PY_CFLAGS@ PY_EXTRA_LIBS = @PY_EXTRA_LIBS@ PY_LIBS = @PY_LIBS@ PY_LIB_LOC = @PY_LIB_LOC@ RANLIB = @RANLIB@ RTE_LIBS = @RTE_LIBS@ SCROLLKEEPER_BUILD_REQUIRED = @SCROLLKEEPER_BUILD_REQUIRED@ SCROLLKEEPER_CONFIG = @SCROLLKEEPER_CONFIG@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ SUID_ZSFB_FALSE = @SUID_ZSFB_FALSE@ SUID_ZSFB_TRUE = @SUID_ZSFB_TRUE@ UNICODE_CFLAGS = @UNICODE_CFLAGS@ UNICODE_LIBS = @UNICODE_LIBS@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ WARN_CFLAGS = @WARN_CFLAGS@ XGETTEXT = @XGETTEXT@ XMLCATALOG = @XMLCATALOG@ XML_CATALOG_FILE = @XML_CATALOG_FILE@ XSLTPROC = @XSLTPROC@ X_CFLAGS = @X_CFLAGS@ X_DPMS_LIBS = @X_DPMS_LIBS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ X_XF86DGA_LIBS = @X_XF86DGA_LIBS@ X_XF86VMODE_LIBS = @X_XF86VMODE_LIBS@ X_XINERAMA_LIBS = @X_XINERAMA_LIBS@ X_XMU_LIBS = @X_XMU_LIBS@ X_XV_LIBS = @X_XV_LIBS@ ZSFB_GROUP = @ZSFB_GROUP@ ZSFB_OWNER = @ZSFB_OWNER@ ZVBI_CFLAGS = @ZVBI_CFLAGS@ ZVBI_LIBS = @ZVBI_LIBS@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_STRIP = @ac_ct_STRIP@ ac_pt_PKG_CONFIG = @ac_pt_PKG_CONFIG@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ datadir = @datadir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ python_val = @python_val@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ TESTS = ditest-scalar.sh $(am__append_1) $(am__append_2) \ $(am__append_3) $(am__append_4) $(am__append_5) \ $(am__append_6) EXTRA_DIST = \ ditest-3dnow.sh \ ditest-all.sh \ ditest-altivec.sh \ ditest-mmx.sh \ ditest-scalar.sh \ ditest-sse.sh \ ditest-sse2.sh \ ditest-sse3.sh \ ditest-x86.sh \ emulator.sh \ gen-md5sums.sh \ md5sums-3dnow \ md5sums-altivec \ md5sums-mmx \ md5sums-scalar \ md5sums-sse \ md5sums-sse2 \ md5sums-sse3 INCLUDES = \ -I$(top_srcdir) \ -I$(top_srcdir)/plugins/deinterlace ditest_SOURCES = \ ditest.c \ guard.h ditest_LDADD = \ $(top_builddir)/plugins/deinterlace/DI_GreedyH/libDI_GreedyH.la \ $(top_builddir)/plugins/deinterlace/DI_Misc/libDI_Misc.la \ $(top_builddir)/libtv/libtv.la dicmp_SOURCES = \ dicmp.c cpudt_SOURCES = \ cpudt.c cpudt_LDADD = \ $(top_builddir)/libtv/libtv.la all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu plugins/deinterlace/test/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu plugins/deinterlace/test/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh clean-noinstPROGRAMS: @list='$(noinst_PROGRAMS)'; for p in $$list; do \ f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ echo " rm -f $$p $$f"; \ rm -f $$p $$f ; \ done cpudt$(EXEEXT): $(cpudt_OBJECTS) $(cpudt_DEPENDENCIES) @rm -f cpudt$(EXEEXT) $(LINK) $(cpudt_LDFLAGS) $(cpudt_OBJECTS) $(cpudt_LDADD) $(LIBS) dicmp$(EXEEXT): $(dicmp_OBJECTS) $(dicmp_DEPENDENCIES) @rm -f dicmp$(EXEEXT) $(LINK) $(dicmp_LDFLAGS) $(dicmp_OBJECTS) $(dicmp_LDADD) $(LIBS) ditest$(EXEEXT): $(ditest_OBJECTS) $(ditest_DEPENDENCIES) @rm -f ditest$(EXEEXT) $(LINK) $(ditest_LDFLAGS) $(ditest_OBJECTS) $(ditest_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpudt.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dicmp.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ditest.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool uninstall-info-am: ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags check-TESTS: $(TESTS) @failed=0; all=0; xfail=0; xpass=0; skip=0; \ srcdir=$(srcdir); export srcdir; \ list='$(TESTS)'; \ if test -n "$$list"; then \ for tst in $$list; do \ if test -f ./$$tst; then dir=./; \ elif test -f $$tst; then dir=; \ else dir="$(srcdir)/"; fi; \ if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ *" $$tst "*) \ xpass=`expr $$xpass + 1`; \ failed=`expr $$failed + 1`; \ echo "XPASS: $$tst"; \ ;; \ *) \ echo "PASS: $$tst"; \ ;; \ esac; \ elif test $$? -ne 77; then \ all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ *" $$tst "*) \ xfail=`expr $$xfail + 1`; \ echo "XFAIL: $$tst"; \ ;; \ *) \ failed=`expr $$failed + 1`; \ echo "FAIL: $$tst"; \ ;; \ esac; \ else \ skip=`expr $$skip + 1`; \ echo "SKIP: $$tst"; \ fi; \ done; \ if test "$$failed" -eq 0; then \ if test "$$xfail" -eq 0; then \ banner="All $$all tests passed"; \ else \ banner="All $$all tests behaved as expected ($$xfail expected failures)"; \ fi; \ else \ if test "$$xpass" -eq 0; then \ banner="$$failed of $$all tests failed"; \ else \ banner="$$failed of $$all tests did not behave as expected ($$xpass unexpected passes)"; \ fi; \ fi; \ dashes="$$banner"; \ skipped=""; \ if test "$$skip" -ne 0; then \ skipped="($$skip tests were not run)"; \ test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ dashes="$$skipped"; \ fi; \ report=""; \ if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ report="Please report to $(PACKAGE_BUGREPORT)"; \ test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ dashes="$$report"; \ fi; \ dashes=`echo "$$dashes" | sed s/./=/g`; \ echo "$$dashes"; \ echo "$$banner"; \ test -z "$$skipped" || echo "$$skipped"; \ test -z "$$report" || echo "$$report"; \ echo "$$dashes"; \ test "$$failed" -eq 0; \ else :; fi distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am $(MAKE) $(AM_MAKEFLAGS) check-TESTS check: check-am all-am: Makefile $(PROGRAMS) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-libtool distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-exec-am: install-info: install-info-am install-man: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-info-am .PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ clean-generic clean-libtool clean-noinstPROGRAMS ctags \ distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-exec install-exec-am install-info \ install-info-am install-man install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags uninstall uninstall-am uninstall-info-am emulator.sh: $(MAKE) cpudt ditest-all.sh: $(MAKE) ditest $(MAKE) emulator.sh ditest-3dnow.sh \ ditest-altivec.sh \ ditest-mmx.sh \ ditest-scalar.sh \ ditest-sse.sh \ ditest-sse2.sh \ ditest-sse3.sh \ gen-md5sums.sh: $(MAKE) ditest-all.sh ditest-x86.sh: $(MAKE) ditest-all.sh $(MAKE) dicmp # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: zapping-0.10cvs6/plugins/deinterlace/test/md5sums-3dnow 644 764 144 6632 10260122052 16271 1b819cec3d21b5c808c15d2ad2e240f1 *VideoBob.yuv 19d434304840d69829e0d9bb7438385b *VideoWeave.yuv 520917772b165a347f7d6b1312c046ac *TwoFrame.yuv 3ba399319a1142cb7d66a7ca4939fe8b *Weave.yuv bc2be9694d61b632df273116e28447f1 *Bob.yuv 2a4126e3c685f41317c38f2f54a5c3ad *ScalerBob.yuv a4c6c176f2846ae7f097c43b7991b655 *EvenOnly.yuv 36a77872a057f42bcbb8f67537a126e5 *OddOnly.yuv 4e5f7cbeb9aa44fbc3aae3b38eeda169 *Greedy.yuv bcebf933285456a4ef09326246a70c69 *Greedy2Frame.yuv d1da026c35b7a1b0a5cdbda2f9b764a5 *MoComp2.yuv 0d43e94167b86dd3165edbd92a6babbe *GreedyH-0-0-0-0-0.yuv 0d43e94167b86dd3165edbd92a6babbe *GreedyH-0-0-0-0-1.yuv ec059e1f25b5d986dfa2447e8ea829c5 *GreedyH-0-0-0-1-0.yuv ec059e1f25b5d986dfa2447e8ea829c5 *GreedyH-0-0-0-1-1.yuv 5b7c9bdd1fd468cbaface2dcd9d42121 *GreedyH-0-0-1-0-0.yuv 5b7c9bdd1fd468cbaface2dcd9d42121 *GreedyH-0-0-1-0-1.yuv 5b7c9bdd1fd468cbaface2dcd9d42121 *GreedyH-0-0-1-1-0.yuv 5b7c9bdd1fd468cbaface2dcd9d42121 *GreedyH-0-0-1-1-1.yuv f325aceff163725dc589a965bee0d77b *GreedyH-0-1-0-0-0.yuv f325aceff163725dc589a965bee0d77b *GreedyH-0-1-0-0-1.yuv f325aceff163725dc589a965bee0d77b *GreedyH-0-1-0-1-0.yuv f325aceff163725dc589a965bee0d77b *GreedyH-0-1-0-1-1.yuv 8a34d3f798230e041894b641e8e367ca *GreedyH-0-1-1-0-0.yuv 8a34d3f798230e041894b641e8e367ca *GreedyH-0-1-1-0-1.yuv 8a34d3f798230e041894b641e8e367ca *GreedyH-0-1-1-1-0.yuv 8a34d3f798230e041894b641e8e367ca *GreedyH-0-1-1-1-1.yuv ec059e1f25b5d986dfa2447e8ea829c5 *GreedyH-1-0-0-0-0.yuv ec059e1f25b5d986dfa2447e8ea829c5 *GreedyH-1-0-0-0-1.yuv ec059e1f25b5d986dfa2447e8ea829c5 *GreedyH-1-0-0-1-0.yuv ec059e1f25b5d986dfa2447e8ea829c5 *GreedyH-1-0-0-1-1.yuv 5b7c9bdd1fd468cbaface2dcd9d42121 *GreedyH-1-0-1-0-0.yuv 5b7c9bdd1fd468cbaface2dcd9d42121 *GreedyH-1-0-1-0-1.yuv 5b7c9bdd1fd468cbaface2dcd9d42121 *GreedyH-1-0-1-1-0.yuv 5b7c9bdd1fd468cbaface2dcd9d42121 *GreedyH-1-0-1-1-1.yuv f325aceff163725dc589a965bee0d77b *GreedyH-1-1-0-0-0.yuv f325aceff163725dc589a965bee0d77b *GreedyH-1-1-0-0-1.yuv f325aceff163725dc589a965bee0d77b *GreedyH-1-1-0-1-0.yuv f325aceff163725dc589a965bee0d77b *GreedyH-1-1-0-1-1.yuv 8a34d3f798230e041894b641e8e367ca *GreedyH-1-1-1-0-0.yuv 8a34d3f798230e041894b641e8e367ca *GreedyH-1-1-1-0-1.yuv 8a34d3f798230e041894b641e8e367ca *GreedyH-1-1-1-1-0.yuv 8a34d3f798230e041894b641e8e367ca *GreedyH-1-1-1-1-1.yuv 674572ffdc00d486fce9acea97da07dc *TomsMoComp-0-0.yuv 69b253fb1767c79c79f336219b6a3064 *TomsMoComp-0-1.yuv 84d370160eb3a5bfa7a9ecf3adc6b780 *TomsMoComp-0-2.yuv 35aa75d215f0c3c448bf714075633c8c *TomsMoComp-0-4.yuv 6640f5949160fe63e5ff358335e91e28 *TomsMoComp-0-6.yuv 6e2e54f6296d9dd8948f3c095e31c017 *TomsMoComp-0-10.yuv dee6acb054faedbaeb0a3abe896ccfcc *TomsMoComp-0-12.yuv 40d5de3652a9c96dbda3a67b91c31353 *TomsMoComp-0-14.yuv f96a24510b3f12bd9417aa3e695d43f3 *TomsMoComp-0-16.yuv ec50db1d310fc5a9062f0692492c7fec *TomsMoComp-0-20.yuv 122592cdf8666a0cdd6f106c9fa6a29e *TomsMoComp-0-22.yuv 812a44db7fe5b6932f10eb41b3cfe549 *TomsMoComp-1-0.yuv af220936f77a7073b2ebcb266c60ed32 *TomsMoComp-1-1.yuv 111661e94b291d7d2522685256f9395e *TomsMoComp-1-2.yuv 368973116533f073c3e1c7b210dc8b6c *TomsMoComp-1-4.yuv c6427f6255a8cd9f391b508d7cf4d4d7 *TomsMoComp-1-6.yuv eaa20eefa8382bd8855ea22e5219e79d *TomsMoComp-1-10.yuv 5e974cb88e877428c2c8aa39976deae7 *TomsMoComp-1-12.yuv 4bd9050526b4493c21686b113a14ab91 *TomsMoComp-1-14.yuv 86b4504fcd9ccd9416b532dd5fd4b33b *TomsMoComp-1-16.yuv 60c93c65fde7015a845670f5800ca7e5 *TomsMoComp-1-20.yuv 25aa6448f97016ad1bda1652e0b8cb45 *TomsMoComp-1-22.yuv zapping-0.10cvs6/plugins/deinterlace/test/ditest-sse2.sh 755 764 144 424 10263053020 16400 #!/bin/sh srcdir=`cd $(dirname $0) >/dev/null; pwd; cd - >/dev/null` builddir=`pwd` . $srcdir/ditest-all.sh trap "rm -rf $builddir/results-$$-*" EXIT feature=sse2 ditest_all $feature || exit $? cd $builddir/results-$$-$feature md5sum -c $srcdir/md5sums-$feature >/dev/null zapping-0.10cvs6/plugins/deinterlace/test/ditest-sse3.sh 755 764 144 424 10272464722 16420 #!/bin/sh srcdir=`cd $(dirname $0) >/dev/null; pwd; cd - >/dev/null` builddir=`pwd` . $srcdir/ditest-all.sh trap "rm -rf $builddir/results-$$-*" EXIT feature=sse3 ditest_all $feature || exit $? cd $builddir/results-$$-$feature md5sum -c $srcdir/md5sums-$feature >/dev/null zapping-0.10cvs6/plugins/deinterlace/test/md5sums-altivec 644 764 144 0 10260365575 16610 zapping-0.10cvs6/plugins/deinterlace/test/ditest-scalar.sh 755 764 144 426 10263053060 16777 #!/bin/sh srcdir=`cd $(dirname $0) >/dev/null; pwd; cd - >/dev/null` builddir=`pwd` . $srcdir/ditest-all.sh trap "rm -rf $builddir/results-$$-*" EXIT feature=scalar ditest_all $feature || exit $? cd $builddir/results-$$-$feature md5sum -c $srcdir/md5sums-$feature >/dev/null zapping-0.10cvs6/plugins/deinterlace/test/guard.h 644 764 144 4714 10260122052 15173 /* * Copyright (C) 2004 Michael H. Schimek * * Based on efence (C) Bruce Perens * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* $Id: guard.h,v 1.2 2005/06/28 01:13:14 mschimek Exp $ */ #undef NDEBUG #include #include #include #include #include #include #include #include #include #ifdef MAP_ANONYMOUS # define HAVE_MAP_ANONYMOUS 1 /* 386 BSD has MAP_ANON instead of MAP_ANONYMOUS. */ #elif defined (MAP_ANON) # define MAP_ANONYMOUS MAP_ANON # define HAVE_MAP_ANONYMOUS 1 #else # define HAVE_MAP_ANONYMOUS 0 #endif static int dev_zero (void) { static int fd = -1; if (-1 != fd) return fd; fd = open ("/dev/zero", O_RDWR); if (-1 == fd) { fprintf (stderr, "Could not open /dev/zero: %d, %s\n", errno, strerror (errno)); exit (EXIT_FAILURE); } return fd; } /* Allocates a block of memory surrounded by an inaccessible guard area. n_bytes must be page aligned. */ static void * guard_alloc (size_t n_bytes) { size_t page_size; char *p; int r; page_size = getpagesize (); assert (0 == n_bytes % page_size); if (HAVE_MAP_ANONYMOUS) { p = mmap (/* start: any */ NULL, n_bytes * 3, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS, /* fd: n/a */ -1, /* offset */ 0); } else { p = mmap (/* start: any */ NULL, n_bytes * 3, PROT_READ | PROT_WRITE, MAP_PRIVATE, dev_zero (), /* offset */ 0); } if (MAP_FAILED == p) { fprintf (stderr, "Guarded memory allocation failed: %d, %s\n", errno, strerror (errno)); exit (EXIT_FAILURE); } r = mprotect (p, n_bytes, PROT_NONE); assert (-1 != r); p += n_bytes; assert (0 == ((unsigned long) p % 16)); r = mprotect (p + n_bytes, n_bytes, PROT_NONE); assert (-1 != r); return p; } zapping-0.10cvs6/plugins/deinterlace/test/md5sums-scalar 644 764 144 343 10260122052 16455 3ba399319a1142cb7d66a7ca4939fe8b *Weave.yuv bc2be9694d61b632df273116e28447f1 *Bob.yuv 2a4126e3c685f41317c38f2f54a5c3ad *ScalerBob.yuv a4c6c176f2846ae7f097c43b7991b655 *EvenOnly.yuv 36a77872a057f42bcbb8f67537a126e5 *OddOnly.yuv zapping-0.10cvs6/plugins/deinterlace/test/ditest-all.sh 755 764 144 4457 10441445371 16342 #!/bin/sh . `dirname $0`/emulator.sh methods="\ VideoBob \ VideoWeave \ TwoFrame \ Weave \ Bob \ ScalerBob \ EvenOnly \ OddOnly \ Greedy \ Greedy2Frame \ GreedyH \ TomsMoComp \ MoComp2 \ " size="-w 256 -h 16" ditest_wrapper () { # -q quiet # -r use pseudo random source # -m method deinterlace method # -c feature test the version optimized for feature (mmx, sse, ...) # -w -h source and dest image size (adjusted to be a multiple of the # system page size for a built-in efence test). if test x$2 = xscalar; then LD_PRELOAD=$pre $emu ./ditest -q -r -m $1 \ $size $4 >$tmpd/$3.yuv 2>/dev/null else LD_PRELOAD=$pre $emu ./ditest -q -r -m $1 \ -c $2 $size $4 >$tmpd/$3.yuv 2>/dev/null fi case "$?" in 0) if test -e $tmpd/$3.yuv; then implemented="$implemented $3.yuv" fi ;; 55) # Have no $2 implementation of $1. test -e $tmpd/$3.yuv && rm $tmpd/$3.yuv ;; *) echo "Test of $2 implementation of $1 failed." echo LD_PRELOAD=$pre $emu ./ditest -q -r -m $1 -c $2 $size $4 exit 1 ;; esac echo -n "." } ditest_all () { feature=$1 if ! find_emulator $feature; then return 77 fi tmpd="results-$$-$feature" rm -rf $tmpd mkdir $tmpd || exit $? implemented= for method in VideoBob VideoWeave TwoFrame Weave Bob ScalerBob EvenOnly \ OddOnly Greedy Greedy2Frame MoComp2 ; do ditest_wrapper $method $feature $method done # Runtime options - run through all possible combinations. for upd in 0 1; do for umf in 0 1; do for uhs in 0 1; do for uvs in 0 1; do for uib in 0 1; do ditest_wrapper GreedyH $feature \ GreedyH-$upd-$umf-$uhs-$uvs-$uib \ "-o GreedyUsePulldown=$upd \ -o GreedyUseMedianFilter=$umf \ -o GreedyUseHSharpness=$uhs \ -o GreedyUseVSharpness=$uvs \ -o GreedyUseInBetween=$uib \ -o GreedyTestMode=1" done done done done done # Runtime options - run through all possible combinations. for usb in 0 1; do for se in 0 1 2 4 6 10 12 14 16 20 22; do ditest_wrapper TomsMoComp $feature TomsMoComp-$usb-$se \ "-o UseStrangeBob=$usb -o SearchEffort=$se" done done echo return 0 } zapping-0.10cvs6/plugins/deinterlace/DS_Deinterlace.h 644 764 144 12122 10260117242 15734 ///////////////////////////////////////////////////////////////////////////// // DS_Deinterlace.h ///////////////////////////////////////////////////////////////////////////// // Copyright (c) 2000 John Adcock. All rights reserved. ///////////////////////////////////////////////////////////////////////////// // This header file is free software; you can redistribute it and/or modify it // under the terms of the GNU Library General Public License as published by // the Free Software Foundation; either version 2 of the License, or (at your // option) any later version. // // This software 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 Library General Public License for more details ///////////////////////////////////////////////////////////////////////////// // Change Log // // Date Developer Changes // // 27 Mar 2001 John Adcock Separated code to support plug-ins // ///////////////////////////////////////////////////////////////////////////// #ifndef __DS_DEINTERLACE_H___ #define __DS_DEINTERLACE_H___ #include "DS_Control.h" #include "DS_ApiCommon.h" struct _DEINTERLACE_METHOD; // Deinterlace functions return true if the overlay is ready to be displayed. typedef BOOL (__cdecl DEINTERLACE_FUNC)(TDeinterlaceInfo *Info); typedef void (__cdecl DEINTERLACEPLUGINSETSTATUS)(LPCSTR StatusText); typedef void (__cdecl DEINTERLACEPLUGININIT)(void); typedef void (__cdecl DEINTERLACEPLUGINSTART)(int NumPlugIns, struct _DEINTERLACE_METHOD** OtherPlugins, DEINTERLACEPLUGINSETSTATUS* SetStatus); typedef void (__cdecl DEINTERLACEPLUGINSHOWUI)(HWND hwndMain); typedef void (__cdecl DEINTERLACEPLUGINEXIT)(void); // list of supported plugin versions #define DEINTERLACE_VERSION_3 3 // The current version #define DEINTERLACE_CURRENT_VERSION DEINTERLACE_VERSION_3 typedef struct _DEINTERLACE_METHOD { // should be set up as sizeof(DEINTERLACE_METHOD) // used to test that the program is using the same // header as the plug-in size_t SizeOfStructure; // may be used in the future when backwards combatability may // be required // set to DEINTERLACE_CURRENT_VERSION int DeinterlaceStructureVersion; // What to display when selected const char* szName; // Short Name // What to display when used in adaptive Mode (NULL to use szName) const char* szShortName; // Do we need to shrink the overlay by half BOOL bIsHalfHeight; // Is this a film Mode BOOL bIsFilmMode; // Pointer to Algorithm function (cannot be NULL) DEINTERLACE_FUNC* pfnAlgorithm; // flip frequency in 50Hz Mode unsigned int FrameRate50Hz; // flip frequency in 60Hz Mode unsigned int FrameRate60Hz; // number of settings int nSettings; // pointer to start of Settings[nSettings] const SETTING* pSettings; // Index Number (position in menu) should map to old enum Value // and should be unique int nMethodIndex; // call this if plugin needs to do anything on load up DEINTERLACEPLUGININIT* pfnPluginInit; // call this if plugin needs to do anything before it is used DEINTERLACEPLUGINSTART* pfnPluginStart; // call this to display any UI, if NULL no UI is supoprted DEINTERLACEPLUGINSHOWUI* pfnPluginShowUI; // call this if plugin needs to deallocate anything DEINTERLACEPLUGINEXIT* pfnPluginExit; // how many fields are required to run this plug-in int nFieldsRequired; // Track number of Mode Changes int ModeChanges; // Track Time in Mode int ModeTicks; // the offset used by the external settings API int nSettingsOffset; // Dll module so that we can unload the dll cleanly at the end HMODULE hModule; // Menu Id used for this plug-in, use 0 to automatically allocate one DWORD MenuId; // do we need FieldDiff filled in in Info BOOL bNeedFieldDiff; // do we need CombFactor filled in in Info BOOL bNeedCombFactor; // Help ID // needs to be in \help\helpids.h int HelpID; } DEINTERLACE_METHOD; // Call this function to init a plug-in // On exit pDeintMethod is a pointer to deinterlace properties typedef DEINTERLACE_METHOD* (__cdecl GETDEINTERLACEPLUGININFO)(int CpuFeatureFlags); DEINTERLACE_METHOD* DI_Bob_GetDeinterlacePluginInfo(void); DEINTERLACE_METHOD* DI_EvenOnly_GetDeinterlacePluginInfo(void); DEINTERLACE_METHOD* DI_Greedy_GetDeinterlacePluginInfo(void); DEINTERLACE_METHOD* DI_Greedy2Frame_GetDeinterlacePluginInfo(void); DEINTERLACE_METHOD* DI_GreedyH_GetDeinterlacePluginInfo(void); DEINTERLACE_METHOD* DI_MoComp2_GetDeinterlacePluginInfo(void); DEINTERLACE_METHOD* DI_OddOnly_GetDeinterlacePluginInfo(void); DEINTERLACE_METHOD* DI_ScalerBob_GetDeinterlacePluginInfo(void); DEINTERLACE_METHOD* DI_TomsMoComp_GetDeinterlacePluginInfo(void); DEINTERLACE_METHOD* DI_TwoFrame_GetDeinterlacePluginInfo(void); DEINTERLACE_METHOD* DI_VideoBob_GetDeinterlacePluginInfo(void); DEINTERLACE_METHOD* DI_VideoWeave_GetDeinterlacePluginInfo(void); DEINTERLACE_METHOD* DI_Weave_GetDeinterlacePluginInfo(void); #endif zapping-0.10cvs6/plugins/deinterlace/windows.h 644 764 144 31515 10417055654 14644 /* * Zapping TV viewer * * Copyright (C) 2004 Michael H. Schimek * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* $Id: windows.h,v 1.9 2006/04/12 01:45:16 mschimek Exp $ */ #ifndef WINDOWS_H #define WINDOWS_H #ifdef HAVE_CONFIG_H # include "config.h" #endif #include /* malloc() */ #include /* size_t */ #include /* int64_t */ #include #include /* memcpy() */ #include "common/intl-priv.h" /* i18n */ #include "libtv/misc.h" #include "libtv/cpu.h" /* cpu_features */ #include "libtv/simd.h" #if SIMD static void copy_line (uint8_t * dst, const uint8_t * src, unsigned int n_bytes) __attribute__ ((unused)); static void copy_line_pair (uint8_t * dst, const uint8_t * src, unsigned int n_bytes, unsigned int dst_bpl) __attribute__ ((unused)); # if Z_BYTE_ORDER == Z_LITTLE_ENDIAN # define YMask vsplat16_255 # define UVMask vsplat16_m256 # define yuyv2yy(yuyv) ((v16) vand ((v16)(yuyv), YMask)) # define yuyv2uv(yuyv) ((v16) vsru16 ((v16)(yuyv), 8)) # else # define YMask vsplat16_m256 # define UVMask vsplat16_255 # define yuyv2yy(yuyv) ((v16) vsru16 ((vu16)(yuyv), 8)) # define yuyv2uv(yuyv) ((v16) vand ((v16)(yuyv), UVMask)) # endif /* Z_BYTE_ORDER */ #if SIMD == CPU_FEATURE_ALTIVEC /* Defined here to enable parameter passing in registers. NOTE n_bytes must be a multiple of sizeof (vu8). */ static void copy_line (uint8_t * dst, const uint8_t * src, unsigned int n_bytes) { unsigned int i = 0; for (n_bytes /= sizeof (vu8); n_bytes > 0; --n_bytes) { vstorent (dst, i, vload (src, i)); i += sizeof (vu8); } } /* Copies src to dst and dst + dst_bpl. Defined here to enable parameter passing in registers. NOTE dst_bpl and n_bytes must be a multiple of sizeof (vu8). */ static void copy_line_pair (uint8_t * dst, const uint8_t * src, unsigned int n_bytes, unsigned int dst_bpl) { for (n_bytes /= sizeof (vu8); n_bytes > 0; --n_bytes) { vu8 m0; m0 = vload (src, 0); src += sizeof (vu8); vstorent (dst, 0, m0); vstorent (dst, dst_bpl, m0); dst += sizeof (vu8); } } /* Do an aligned load from s, and two unaligned loads from s + offs - dist and s + offs + dist. Offs and dist are given in bytes, offs must be a multiple of sizeof (vu8). */ static always_inline void uloadxt (vu8 * left, vu8 * center, vu8 * right, const uint8_t * src, unsigned int offs, unsigned int dist) { vu8 t1, t2, t3; src += offs; t1 = vload (src, -1 * (long) sizeof (vu8)); t2 = vload (src, 0 * (long) sizeof (vu8)); t3 = vload (src, +1 * (long) sizeof (vu8)); *left = vec_perm (t1, t2, vec_lvsl (-dist, src)); *center = t2; *right = vec_perm (t2, t3, vec_lvsl (+dist, src)); } static always_inline void uload24t (vu8 * m4, vu8 * m2, vu8 * center, vu8 * p2, vu8 * p4, const uint8_t * src, unsigned int offs) { vu8 t1, t2, t3; src += offs; t1 = vload (src, -1 * (long) sizeof (vu8)); t2 = vload (src, 0 * (long) sizeof (vu8)); t3 = vload (src, +1 * (long) sizeof (vu8)); *m4 = vec_perm (t1, t2, vec_lvsl (-4, src)); *m2 = vec_perm (t1, t2, vec_lvsl (-2, src)); *center = t2; *p2 = vec_perm (t2, t3, vec_lvsl (+2, src)); *p4 = vec_perm (t2, t3, vec_lvsl (+4, src)); } #else /* SIMD != CPU_FEATURE_ALTIVEC */ /* Defined here to enable parameter passing in registers. NOTE n_bytes must be a multiple of sizeof (vu8). */ static void copy_line (uint8_t * dst, const uint8_t * src, unsigned int n_bytes) { vu8 m0, m1, m2, m3; /* Copies 64 (128) bytes. */ for (; n_bytes & -(sizeof (vu8) * 8); n_bytes -= sizeof (vu8) * 8) { m0 = vload (src, 0 * sizeof (vu8)); m1 = vload (src, 1 * sizeof (vu8)); m2 = vload (src, 2 * sizeof (vu8)); m3 = vload (src, 3 * sizeof (vu8)); vstorent (dst, 0 * sizeof (vu8), m0); vstorent (dst, 1 * sizeof (vu8), m1); vstorent (dst, 2 * sizeof (vu8), m2); vstorent (dst, 3 * sizeof (vu8), m3); m0 = vload (src, 4 * sizeof (vu8)); m1 = vload (src, 5 * sizeof (vu8)); m2 = vload (src, 6 * sizeof (vu8)); m3 = vload (src, 7 * sizeof (vu8)); src += 8 * sizeof (vu8); vstorent (dst, 4 * sizeof (vu8), m0); vstorent (dst, 5 * sizeof (vu8), m1); vstorent (dst, 6 * sizeof (vu8), m2); vstorent (dst, 7 * sizeof (vu8), m3); dst += 8 * sizeof (vu8); } /* Remaining bytes, usually not needed. */ for (; n_bytes > 0; n_bytes -= sizeof (vu8)) { vstorent (dst, 0, vload (src, 0)); src += sizeof (vu8); dst += sizeof (vu8); } } /* Copies src to dst and dst + dst_bpl. Defined here to enable parameter passing in registers. NOTE dst_bpl and n_bytes must be a multiple of sizeof (vu8). */ static void copy_line_pair (uint8_t * dst, const uint8_t * src, unsigned int n_bytes, unsigned int dst_bpl) { uint8_t *dst2; vu8 m0, m1, m2, m3; dst2 = dst + dst_bpl; for (; n_bytes & -(sizeof (vu8) * 4); n_bytes -= sizeof (vu8) * 4) { m0 = vload (src, 0 * sizeof (vu8)); m1 = vload (src, 1 * sizeof (vu8)); m2 = vload (src, 2 * sizeof (vu8)); m3 = vload (src, 3 * sizeof (vu8)); src += 4 * sizeof (vu8); vstorent (dst, 0 * sizeof (vu8), m0); vstorent (dst, 1 * sizeof (vu8), m1); vstorent (dst, 2 * sizeof (vu8), m2); vstorent (dst, 3 * sizeof (vu8), m3); dst += 4 * sizeof (vu8); vstorent (dst2, 0 * sizeof (vu8), m0); vstorent (dst2, 1 * sizeof (vu8), m1); vstorent (dst2, 2 * sizeof (vu8), m2); vstorent (dst2, 3 * sizeof (vu8), m3); dst2 += 4 * sizeof (vu8); } for (; n_bytes > 0; n_bytes -= sizeof (vu8)) { m0 = vload (src, 0); src += sizeof (vu8); vstorent (dst, 0, m0); vstorent (dst, dst_bpl, m0); dst += sizeof (vu8); } } #if SIMD == CPU_FEATURE_SSE3 static always_inline void uloadxt (vu8 * left, vu8 * center, vu8 * right, const uint8_t * src, unsigned int offs, unsigned int dist) { src += offs; /* For details on lddqu vs. movdqu see http://www.intel.com/technology/itj/2004/ volume08issue01/art01_microarchitecture/p06_sse.htm. */ *left = _mm_lddqu_si128 ((const __m128i *)(src - (long) dist)); *center = vload (src, 0); /* movdqa */ *right = _mm_lddqu_si128 ((const __m128i *)(src + (long) dist)); } static always_inline void uload24t (vu8 * m4, vu8 * m2, vu8 * center, vu8 * p2, vu8 * p4, const uint8_t * src, unsigned int offs) { src += offs; *m4 = _mm_lddqu_si128 ((const __m128i *)(src - 4)); *m2 = _mm_lddqu_si128 ((const __m128i *)(src - 2)); *center = vload (src, 0); *p2 = _mm_lddqu_si128 ((const __m128i *)(src + 2)); *p4 = _mm_lddqu_si128 ((const __m128i *)(src + 4)); } #elif SIMD == CPU_FEATURE_SSE2 /* _mm_sxli_si128 is misdefined under gcc -O0. Arg 2 must be an immediate, not a variable which evaluates to one, not even a const variable. */ #define uloadxt(_left, _center, _right, _src, _offs, _dist) \ ({ \ vu8 *left = _left; \ vu8 *center = _center; \ vu8 *right = _right; \ const uint8_t *src = _src; \ const uint16_t *w; \ vu8 c; \ src += _offs; \ \ c = vload (src, 0); /* ponmlkji */ \ *center = c; \ \ switch (_dist) { \ case 2: \ w = (const uint16_t *) src; \ *left = _mm_insert_epi16 \ (_mm_slli_si128 (c, 2), w[-1], 0); \ *right = _mm_insert_epi16 \ (_mm_srli_si128 (c, 2), w[8], 7); \ break; \ \ case 8: \ c = _mm_shuffle_epi32 (c, _MM_SHUFFLE (1, 0, 3, 2)); \ /* lkjihgfe = (hgfedcba, lkjiponm) */ \ *left = _mm_unpackhi_epi64 (vload (src, -16), c); \ /* tsrqponm = (lkjiponm, xwvutsrq) */ \ *right = _mm_unpacklo_epi64 (c, vload (src, +16)); \ break; \ \ default: \ *left = vloadu (src, - (long)(_dist)); /* movdqu */ \ *right = vloadu (src, + (long)(_dist)); \ break; \ } \ }) #define uload24t(_m4, _m2, _center, _p2, _p4, _src, _offs) \ ({ \ vu8 *m4 = _m4; \ vu8 *m2 = _m2; \ vu8 *center = _center; \ vu8 *p2 = _p2; \ vu8 *p4 = _p4; \ const uint8_t *src = _src; \ const uint16_t *w; \ vu8 t1; \ \ src += _offs; \ \ w = (const uint16_t *) src; \ \ *center = vload (src, 0); \ \ /* XXX we don't use *center because these instructions mix \ with calculations, x86 has not enough registers to save \ the center value for later and gcc can't easily avoid \ register spilling. XXX May not apply to x86-64. */ \ \ t1 = _mm_slli_si128 (vload (src, 0), 2); \ t1 = _mm_insert_epi16 (t1, w[-1], 0); \ *m2 = t1; \ t1 = _mm_slli_si128 (t1, 2); \ *m4 = _mm_insert_epi16 (t1, w[-2], 0); \ \ t1 = _mm_srli_si128 (vload (src, 0), 2); \ t1 = _mm_insert_epi16 (t1, w[8], 7); \ *p2 = t1; \ t1 = _mm_srli_si128 (t1, 2); \ *p4 = _mm_insert_epi16 (t1, w[9], 7); \ }) #elif SIMD & (CPU_FEATURE_MMX | CPU_FEATURE_3DNOW | CPU_FEATURE_SSE_INT) static always_inline void uloadxt (vu8 * left, vu8 * center, vu8 * right, const uint8_t * src, unsigned int offs, unsigned int dist) { src += offs; /* MMX permits unaligned loads. There's a few cycle penalty when the load crosses a cache line boundary, but given 32 or 64 byte cache lines a shift-load probably doesn't pay. That aside we reduce register pressure. */ *left = vload (src, - (long) dist); *center = vload (src, (long) 0); *right = vload (src, + (long) dist); } static always_inline void uload24t (vu8 * m4, vu8 * m2, vu8 * center, vu8 * p2, vu8 * p4, const uint8_t * src, unsigned int offs) { src += offs; *m4 = vload (src, -4); *m2 = vload (src, -2); *center = vload (src, 0); *p2 = vload (src, +2); *p4 = vload (src, +4); } #endif /* SIMD switch */ #endif /* SIMD != CPU_FEATURE_ALTIVEC */ #define uload2t(_l, _c, _r, _s, _o) uloadxt (_l, _c, _r, _s, _o, 2) #define uload4t(_l, _c, _r, _s, _o) uloadxt (_l, _c, _r, _s, _o, 4) #define uload6t(_l, _c, _r, _s, _o) uloadxt (_l, _c, _r, _s, _o, 6) #define uload8t(_l, _c, _r, _s, _o) uloadxt (_l, _c, _r, _s, _o, 8) #else /* !SIMD */ static __inline__ void copy_line (uint8_t * dst, const uint8_t * src, unsigned int n_bytes) __attribute__ ((unused)); static __inline__ void copy_line_pair (uint8_t * dst, const uint8_t * src, unsigned int n_bytes, unsigned int dst_bpl) __attribute__ ((unused)); static __inline__ void copy_line (uint8_t * dst, const uint8_t * src, unsigned int n_bytes) { memcpy (dst, src, n_bytes); } static __inline__ void copy_line_pair (uint8_t * dst, const uint8_t * src, unsigned int n_bytes, unsigned int dst_bpl) { memcpy (dst, src, n_bytes); memcpy (dst + dst_bpl, src, n_bytes); } #endif /* !SIMD */ /* MSVC compatibility (will be removed after all the DScaler routines have been converted to vector intrinsics). */ #define _cdecl /* what's that? */ #define __cdecl /* __declspec(align(n)) -> __attribute__((aligned(n))) */ /* __declspec(dllexport) -> __attribute__(()) */ #define __declspec(x) __attribute__((x)) #define align(x) aligned(x) #define dllexport /* __asm emms; or __asm { emms } -> __asm__ (" emms\n") */ #define _asm #define __asm #define emms __asm__ __volatile__ (" emms\n"); #define __min MIN #define __max MAX #define WINAPI #define APIENTRY typedef int BOOL; /* for SETTINGS value pointer compatibility. */ typedef unsigned char BYTE; typedef unsigned short WORD; typedef unsigned int UINT; typedef int LONG; typedef int DWORD; typedef unsigned int ULONG; typedef int32_t __int32; typedef int64_t __int64; typedef void *LPVOID; typedef char *LPCSTR; typedef void *HWND; typedef void *HMODULE; typedef void *HANDLE; typedef void *HINSTANCE; typedef struct { } RECT; #ifndef FALSE # define FALSE 0 #endif #ifndef TRUE # define TRUE 1 #endif #ifndef NULL # define NULL ((void *) 0) #endif #define WM_APP 0 /* DScaler helpids.h */ enum { IDH_2FRAME, IDH_ADAPTIVE, IDH_BOB, IDH_BLENDEDCLIP, IDH_EVEN, IDH_GREEDY, IDH_GREEDY2, IDH_GREEDYHM, IDH_MOCOMP2, IDH_ODD, IDH_OLD_GAME, IDH_SCALER_BOB, IDH_TOMSMOCOMP, IDH_VIDEOBOB, IDH_VIDEOWEAVE, IDH_WEAVE, }; #endif /* WINDOWS_H */ zapping-0.10cvs6/plugins/deinterlace/DS_Control.h 644 764 144 141757 10260117455 15204 ///////////////////////////////////////////////////////////////////////////// // $Id: DS_Control.h,v 1.2 2005/06/28 00:51:57 mschimek Exp $ ///////////////////////////////////////////////////////////////////////////// // Copyright (c) 2000 John Adcock. All rights reserved. ///////////////////////////////////////////////////////////////////////////// // This header file is free software; you can redistribute it and/or modify it // under the terms of the GNU Library General Public License as published by // the Free Software Foundation; either version 2 of the License, or (at your // option) any later version. // // This software 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 Library General Public License for more details ///////////////////////////////////////////////////////////////////////////// // // Notes for writers of external apps // // To use control DScaler using an external app you can use SendMessage to // perform both commands and to get/set all the settings // // To perform commands use the WM_COMMAND message // e.g. SendMessage(hWndDScaler, WM_COMMAND, IDM_OSD_SHOW, 0); // // To get settings use the appropriate WM_XXX_GETVALUE // e.g. Brightness = SendMessage(hWndDScaler, WM_BT848_GETVALUE, BRIGHTNESS, 0); // // To set settings use the appropriate WM_XXX_SETVALUE // e.g. SendMessage(hWndDScaler, WM_BT848_SETVALUE, HUE, NewHueValue); // // To up settings use the appropriate WM_XXX_CHANGEVALUE // e.g. SendMessage(hWndDScaler, WM_BT848_CHANGEVALUE, HUE, INCREMENTVALUE); // // To down settings use the appropriate WM_XXX_CHANGEVALUE // e.g. SendMessage(hWndDScaler, WM_BT848_CHANGEVALUE, HUE, DECREMENTVALUE); // // To show settings use the appropriate WM_XXX_CHANGEVALUE // e.g. SendMessage(hWndDScaler, WM_BT848_CHANGEVALUE, HUE, DISPLAYVALUE); // // To reset settings to default use the appropriate WM_XXX_CHANGEVALUE // e.g. SendMessage(hWndDScaler, WM_BT848_CHANGEVALUE, HUE, RESETVALUE); // // To do the above operation without using the OSD use the ????VALUE_SILENT // e.g. SendMessage(hWndDScaler, WM_BT848_CHANGEVALUE, HUE, INCREMENTVALUE_SILENT); // // The DScaler window handle can be obtained using // hWndDScaler = FindWindow(DSCALER_APPNAME, NULL); // ///////////////////////////////////////////////////////////////////////////// // // Notes for DScaler developers // // This is the place to add settings for any new file you create // You should also update the LoadSettingsFromIni & SaveSettingsToIni // functions in Settings.h so that your setttings get loaded // ///////////////////////////////////////////////////////////////////////////// // Change Log // // Date Developer Changes // // 16 Jan 2001 John Adcock Moved all parts that could be used to // Control DScaler externally to this file // // 20 Feb 2001 Michael Samblanet Added new values for Aspect Control // (bounce & clipping Modes) // // 08 Jun 2001 Eric Schmidt Added bounce amplitude to ini // ///////////////////////////////////////////////////////////////////////////// // CVS Log // // $Log: DS_Control.h,v $ // Revision 1.2 2005/06/28 00:51:57 mschimek // Removed unused DScaler code. // // Revision 1.1.2.1 2005/06/17 02:54:20 mschimek // *** empty log message *** // // Revision 1.1 2005/01/08 14:54:22 mschimek // *** empty log message *** // // Revision 1.2 2005/01/08 10:03:12 michael // *** empty log message *** // // Revision 1.1 2004/11/14 15:35:15 michael // *** empty log message *** // // Revision 1.158 2004/07/12 20:17:21 to_see // Some minor fixes // // Revision 1.157 2004/04/24 08:54:18 atnak // reverted part of last change because there was no need for a new setting // variable for input timeout, used ChannelEnterTime instead // // Revision 1.156 2004/04/24 08:36:28 atnak // new: user customizable teletext page number input timeout // // Revision 1.155 2004/02/06 08:01:20 adcockj // Fixed a couple of minor issues with Torsten's changes // // Revision 1.154 2003/12/29 01:27:53 robmuller // Added AVI file splitting. // // Revision 1.153 2003/11/18 16:36:33 robmuller // Added option to disable the keyboard lock for dialog boxes. // // Revision 1.152 2003/11/11 22:16:30 robmuller // Add ability to include the performance statistics in a release build. // // Revision 1.151 2003/09/13 13:47:44 laurentg // New timeshift setting to enable/disable the warning message // // Revision 1.150 2003/08/02 12:01:43 laurentg // Two new settings to define how many channels to display in preview mode // // Revision 1.149 2003/07/30 03:24:34 atnak // Added NOHARDWAREMUTE to list of saved settings // // Revision 1.148 2003/07/18 09:39:53 adcockj // Added option to release processor during JT // // Revision 1.147 2003/07/02 21:43:16 laurentg // TimeShift settings // // Revision 1.146 2003/04/26 19:37:15 laurentg // New character string settings // // Revision 1.145 2003/04/26 16:04:13 laurentg // Character string settings // // Revision 1.144 2003/04/14 12:14:44 adcockj // Added new Colorimetry Filter // // Revision 1.143 2003/03/29 22:36:17 laurentg // New filter // // Revision 1.142 2003/03/25 13:07:18 laurentg // New settings for stills // // Revision 1.141 2003/03/22 13:10:23 laurentg // New filter from Michael Joubert // // Revision 1.140 2003/03/13 00:41:45 laurentg // New filter black & white // // Revision 1.139 2003/03/08 19:57:11 laurentg // New setting "always sleep" // // Revision 1.138 2003/02/26 20:52:03 laurentg // New timing setting MaxFieldShift // // Revision 1.137 2003/02/06 10:00:14 laurentg // Change resolution in full screen // // Revision 1.136 2003/02/05 16:39:29 laurentg // New option to stop capture when DScaler is minimized // // Revision 1.135 2003/02/05 14:40:07 laurentg // DScaler in Windows system tray (patch from Kristian Trenskow) // // Revision 1.134 2003/01/24 08:08:43 atnak // Changes to OSDB // // Revision 1.133 2003/01/18 10:53:57 laurentg // Overscan setting specific to calibration deleted // // Revision 1.132 2003/01/16 13:30:48 adcockj // Fixes for various settings problems reported by Laurent 15/Jan/2003 // // Revision 1.131 2003/01/13 13:56:28 adcockj // First attemp at SAA7134 setting groups // // Revision 1.130 2003/01/12 20:10:47 adcockj // Put analogue blanking setting in properly // // Revision 1.129 2003/01/10 17:37:40 adcockj // Interrim Check in of Settings rewrite // - Removed SETTINGSEX structures and flags // - Removed Seperate settings per channel code // - Removed Settings flags // - Cut away some unused features // // Revision 1.128 2003/01/08 19:57:40 laurentg // Analogue Blanking setting by source // // Revision 1.127 2003/01/08 00:23:09 atnak // Put back VBI upscale divisor // // Revision 1.126 2003/01/07 23:23:40 laurentg // New overscan settings // // Revision 1.125 2003/01/07 23:01:26 atnak // Removed an element from SAA7134_SETTINGS // // Revision 1.124 2003/01/04 13:34:27 laurentg // Settings for AR detection updated // // Revision 1.123 2003/01/02 16:24:14 adcockj // Corrected MoComp2 settings // // Revision 1.122 2003/01/02 13:14:59 adcockj // Added new plug-ins ready for developement by copying TomsMoComp and Gamma // // Revision 1.121 2003/01/01 21:07:10 atnak // Updated VT_SETTING // // Revision 1.120 2002/12/10 14:53:14 adcockj // Sound fixes for cx2388x // // Revision 1.119 2002/12/02 13:47:01 adcockj // Allow fine control over white crush settings // // Revision 1.118 2002/11/26 21:32:14 adcockj // Made new strange bob method optional // // Revision 1.117 2002/11/12 15:22:44 adcockj // Made new flag settings have default setting // Added pixel width for CX2388x cards // // Revision 1.116 2002/11/10 09:39:48 laurentg // Settings "Use OSD screen..." // // Revision 1.115 2002/11/10 05:12:19 atnak // Updated SAA7134SETTINGS // // Revision 1.114 2002/11/09 20:56:46 laurentg // New CX2388x settings // // Revision 1.113 2002/11/09 01:11:09 laurentg // New settings for the CX2388x chip // // Revision 1.112 2002/11/06 11:11:22 adcockj // Added new Settings and applied Laurent's filter setup suggestions // // Revision 1.111 2002/11/05 13:07:08 adcockj // Logo Killer Smoothing patch from Jochen Trenner // // Revision 1.110 2002/11/02 01:36:40 lindsey // Added new settings for adaptive noise; Changed a name for histogram filter // // Revision 1.109 2002/11/01 16:17:14 laurentg // New option to keep ratio when taking a still and saving it in a file // // Revision 1.108 2002/10/31 14:47:19 adcockj // Added Sharpness // // Revision 1.107 2002/10/31 14:03:32 adcockj // Added Analogue blanking option to aspect code // // Revision 1.106 2002/10/30 13:41:02 atnak // Added SINGLEKEYTELETEXTTOGGLE to DSCALER_SETTING // // Revision 1.105 2002/10/29 22:00:30 adcockj // Added EatlLinesAtTop setting for SDI on holo3d // // Revision 1.104 2002/10/29 15:24:22 robmuller // Remove smoothing setting from logo killer since it is not used anymore. // // Revision 1.103 2002/10/29 11:05:27 adcockj // Renamed CT2388x to CX2388x // // Revision 1.102 2002/10/29 03:07:56 atnak // Updated SAA7134_SETTING // // Revision 1.101 2002/10/28 17:50:01 adcockj // Fixes for channels combo // Reorganized scanning // // Revision 1.100 2002/10/28 12:04:56 atnak // Updated SAA7134_SETTING // // Revision 1.99 2002/10/27 12:08:50 laurentg // New setting to define the number of consecutive stills // // Revision 1.98 2002/10/26 17:46:01 laurentg // New option to take stills in memory // // Revision 1.97 2002/10/26 16:17:24 atnak // Updated SAA7134_SETTING // // Revision 1.96 2002/10/26 15:48:59 adcockj // Updated format enum to be consistent with DScaler // // Revision 1.95 2002/10/21 19:47:43 adcockj // Corrected settings list for cx2388x // // Revision 1.94 2002/10/21 16:07:26 adcockj // Added H & V delay options for CX2388x cards // // Revision 1.93 2002/10/21 07:29:21 adcockj // Added new option for reversing scroll wheel intent // // Revision 1.92 2002/10/15 18:32:01 kooiman // Added stereo detect interval for continuous scanning for stereo mode. // // Revision 1.91 2002/10/15 15:46:49 kooiman // Updated BT848_SETTING // // Revision 1.90 2002/09/26 06:05:21 kooiman // Added toolbar settings // // Revision 1.89 2002/09/16 19:34:18 adcockj // Fix for auto format change // // Revision 1.88 2002/09/11 18:19:35 adcockj // Prelimainary support for CX2388X based cards // // Revision 1.87 2002/09/06 15:08:10 kooiman // Mixer lines now source dependent. // // Revision 1.86 2002/08/29 23:53:40 lindsey // Added video mode setting to temporal comb filter // // Revision 1.85 2002/08/17 11:42:06 kooiman // Applied LogoKiller Filter Smoothing option from Jochen Trenner. // // Revision 1.84 2002/08/16 18:46:34 kooiman // Added setting entry for optional screen update delay during tuner frequency switch. // // Revision 1.83 2002/08/12 19:52:14 laurentg // Selection of video card to adjust DScaler settings // // Revision 1.82 2002/08/11 16:08:20 laurentg // New setting to choose between keep CPU for other applications or use full CPU for best results // // Revision 1.81 2002/08/09 13:27:54 laurentg // Processor speed and trade off settings moved from BT source settings to DScaler settings // // Revision 1.80 2002/08/07 19:13:23 adcockj // Added Colour Inversion Filter // // Revision 1.79 2002/08/07 09:42:12 kooiman // Add settings for 'save per channel' // // Revision 1.78 2002/08/07 00:47:30 lindsey // Added a switch for the use of prefetching in the temporal noise filter. // // Revision 1.77 2002/08/06 22:18:08 lindsey // Added constants for a prefetch option with many of the filters // // Revision 1.76 2002/08/03 00:16:01 laurentg // Value for WM_DI_TOMSMOCOMP_SETVALUE and WM_DI_TOMSMOCOMP_CHANGEVALUE updated to avoid conflicts // // Revision 1.75 2002/07/25 20:41:46 laurentg // Setting added to take still always in the same file // // Revision 1.74 2002/07/24 21:37:00 laurentg // Take cyclic stills // // Revision 1.73 2002/07/20 13:01:06 laurentg // New setting for vertical mirror // // Revision 1.72 2002/07/20 10:26:34 laurentg // New settings to select the wished OSD screens // // Revision 1.71 2002/07/19 15:25:09 laurentg // New settings (other settings) added in the tree settings + related menu items deleted // // Revision 1.70 2002/07/08 17:44:58 adcockj // Corrected Settings messages // // Revision 1.69 2002/07/08 13:53:35 trbarry // First cut at motion compensated deinterlace // // Revision 1.68 2002/07/02 20:00:05 adcockj // New setting for MSP input pin selection // // Revision 1.67 2002/06/24 21:45:42 laurentg // New option to use or not WSS data when doing AR detection // // Revision 1.66 2002/06/20 20:00:42 robmuller // Implemented videotext search highlighting. // // Revision 1.65 2002/06/18 19:46:05 adcockj // Changed appliaction Messages to use WM_APP instead of WM_USER // // Revision 1.64 2002/06/13 11:24:32 robmuller // Channel enter time is now configurable. // // Revision 1.63 2002/06/13 10:40:37 robmuller // Made anti plop mute delay configurable. // // Revision 1.62 2002/06/06 12:48:18 robmuller // Added settings for the Mirror filter. // // Revision 1.61 2002/06/05 20:53:49 adcockj // Default changes and settings fixes // // Revision 1.60 2002/05/29 18:44:56 robmuller // Added option to disable font anti-aliasing in Teletext. // // Revision 1.59 2002/05/27 20:17:05 robmuller // Patch #561180 by PietOO: // Autodetection of teletext code page. // // Revision 1.58 2002/05/26 09:21:48 robmuller // Patch #560680 by PietOO: // Added option to disable screensaver. // // Revision 1.57 2002/05/03 11:15:46 laurentg // New settings added to define the size of the pattern // // Revision 1.56 2002/05/02 20:13:35 laurentg // JPEG quality setting added // // Revision 1.55 2002/04/28 16:41:16 laurentg // New setting for aspect ratio detect // // Revision 1.54 2002/04/27 16:06:15 laurentg // Initial source // // Revision 1.53 2002/04/07 10:37:53 adcockj // Made audio source work per input // // Revision 1.52 2002/02/27 20:41:08 laurentg // Still settings // // Revision 1.51 2002/02/16 00:20:20 lindsey // Added constants for FLT_Histogram // // Revision 1.50 2002/02/09 02:48:14 laurentg // Overscan now stored in a setting of the source // // Revision 1.49 2002/02/01 20:25:24 robmuller // Added new option to FLT_TNoise. // // Revision 1.48 2002/01/22 14:50:10 robmuller // Added keyboard lock option. // // Revision 1.47 2002/01/05 23:05:39 lindsey // Consolidated two settings into one from FLT_TemporalComb // // Revision 1.46 2001/12/31 00:55:55 lindsey // Added settings for FLT_AdaptiveNoise // // Revision 1.45 2001/12/23 00:51:55 lindsey // Added constants for Gradual Noise filter // // Revision 1.44 2001/12/16 17:04:37 adcockj // Debug Log improvements // // Revision 1.43 2001/11/26 12:26:07 trbarry // Missed update first commit? // // Revision 1.42 2001/11/02 10:45:29 adcockj // Merge in code from Multiple card branch // // Revision 1.41 2001/10/18 16:20:39 adcockj // Made Color of blanking adjustable // // Revision 1.40 2001/09/25 22:24:04 laurentg // New control settings for calibration // // Revision 1.39 2001/09/12 14:32:45 tobbej // fix for invalid DEINTERLACE_METHOD.nSettings (nSettings was more that the real number of settings) // // Revision 1.38 2001/08/30 10:06:29 adcockj // Added support for extra settings in DI_OldGamne and FLT_TemporalComb // // Revision 1.37 2001/08/23 06:48:57 adcockj // Fixed control header for TemporalComb filter // // Revision 1.36 2001/08/15 17:45:41 laurentg // UseRGB ini parameter suppressed // // Revision 1.35 2001/08/14 11:36:03 adcockj // Mixer change to allow restore of initial mixer settings // // Revision 1.34.2.3 2001/08/21 16:42:15 adcockj // Per format/input settings and ini file fixes // // Revision 1.34.2.2 2001/08/20 16:14:18 adcockj // Massive tidy up of code to new structure // // Revision 1.34.2.1 2001/08/17 16:35:13 adcockj // Another interim check-in still doesn't compile. Getting closer ... // // Revision 1.34 2001/08/09 21:34:59 adcockj // Fixed bugs raise by Timo and Keld // // Revision 1.33 2001/08/08 08:54:31 adcockj // Added Delay option to film modes // Switched comb modes to use greedy (low) on bad cadence instead of doings it's own thing // // Revision 1.32 2001/08/06 22:33:48 laurentg // Little improvments for AR autodetection // // Revision 1.31 2001/08/03 12:27:41 adcockj // Added sharpness filter // // Revision 1.30 2001/08/02 16:43:05 adcockj // Added Debug level to LOG function // // Revision 1.29 2001/07/30 12:18:14 adcockj // Added new OldGame plug-in // // Revision 1.28 2001/07/27 16:11:31 adcockj // Added support for new Crash dialog // // Revision 1.27 2001/07/27 12:30:09 adcockj // Added Overlay Color controls (Thanks to Muljadi Budiman) // // Revision 1.26 2001/07/26 21:59:15 laurentg // New entry in OSD section of ini file // // Revision 1.25 2001/07/25 12:04:31 adcockj // Moved Control stuff into DS_Control.h // Added $Id and $Log to comment blocks as per standards // // Revision 1.24 2001/07/13 18:13:24 adcockj // Changed Mute to not be persisted and to work properly // // Revision 1.23 2001/07/13 16:15:43 adcockj // Changed lots of variables to match Coding standards // ///////////////////////////////////////////////////////////////////////////// #ifndef __DS_CONTROL_H___ #define __DS_CONTROL_H___ #define DSCALER_APPNAME "DScaler" ///////////////////////////////////////////////////////////////////////////// // Control Messages passed using WM_COMMAND ///////////////////////////////////////////////////////////////////////////// #ifdef DSCALER_EXTERNAL #define IDM_SAVE_SETTINGS_NOW 100 #define IDM_VT_RESET 261 #define IDM_RESET 280 #define IDM_TAKESTILL 485 #define IDM_OVERLAY_STOP 590 #define IDM_OVERLAY_START 591 #define IDM_HIDE_OSD 592 #define IDM_SHOW_OSD 593 // IDM_SET_OSD_TEXT the lParam must be the handle of a global atom #define IDM_SET_OSD_TEXT 594 #define IDM_FAST_REPAINT 599 #define IDM_ASPECT_FULLSCREEN 701 #define IDM_ASPECT_LETTERBOX 702 #define IDM_ASPECT_ANAMORPHIC 703 // Messages for the Video Format Menu #define IDM_TYPEFORMAT_PAL 1120 #define IDM_TYPEFORMAT_NTSC 1121 #define IDM_TYPEFORMAT_SECAM 1122 #define IDM_TYPEFORMAT_PAL_M 1123 #define IDM_TYPEFORMAT_PAL_N 1124 #define IDM_TYPEFORMAT_NTSC_JAPAN 1125 #define IDM_TYPEFORMAT_PAL60 1126 // Indexes for the Video Deinterlace Algorithms // to select a deinterlace method send a WM_COMMAND message // with the relevant index added to this message // e.g. To switch to adaptive // SendMessage(hWndDScaler, WM_COMMAND, IDM_FIRST_DEINTMETHOD + INDEX_ADAPTIVE, 0); #define IDM_FIRST_DEINTMETHOD 1900 ///////////////////////////////////////////////////////////////////////////// // For setting of certain values // enum eVideoFormat { VIDEOFORMAT_PAL_B = 0, VIDEOFORMAT_PAL_D, VIDEOFORMAT_PAL_G, VIDEOFORMAT_PAL_H, VIDEOFORMAT_PAL_I, VIDEOFORMAT_PAL_M, VIDEOFORMAT_PAL_N, VIDEOFORMAT_PAL_60, VIDEOFORMAT_PAL_N_COMBO, VIDEOFORMAT_SECAM_B, VIDEOFORMAT_SECAM_D, VIDEOFORMAT_SECAM_G, VIDEOFORMAT_SECAM_H, VIDEOFORMAT_SECAM_K, VIDEOFORMAT_SECAM_K1, VIDEOFORMAT_SECAM_L, VIDEOFORMAT_SECAM_L1, VIDEOFORMAT_NTSC_M, VIDEOFORMAT_NTSC_M_Japan, VIDEOFORMAT_NTSC_50, VIDEOFORMAT_LASTONE }; #endif // Indexes for the Video Deinterlace Algorithms #define INDEX_VIDEO_BOB 0 #define INDEX_VIDEO_WEAVE 1 #define INDEX_VIDEO_2FRAME 2 #define INDEX_WEAVE 3 #define INDEX_BOB 4 #define INDEX_SCALER_BOB 5 #define INDEX_EVEN_ONLY 13 #define INDEX_ODD_ONLY 14 #define INDEX_BLENDED_CLIP 15 #define INDEX_ADAPTIVE 16 #define INDEX_VIDEO_GREEDY 17 #define INDEX_VIDEO_GREEDY2FRAME 18 #define INDEX_VIDEO_GREEDYH 19 #define INDEX_OLD_GAME 20 #define INDEX_VIDEO_TOMSMOCOMP 21 #define INDEX_VIDEO_MOCOMP2 22 ///////////////////////////////////////////////////////////////////////////// // Allow callers to convert a WM code to do other operations ///////////////////////////////////////////////////////////////////////////// #define WM_CONVERT_TO_GETVALUE(x) (((x - WM_APP) % 100) + WM_APP) #define WM_CONVERT_TO_SETVALUE(x) ((((x - WM_APP) % 100) + 100) + WM_APP) #define WM_CONVERT_TO_CHANGEVALUE(x) ((((x - WM_APP) % 100) + 200) + WM_APP) ///////////////////////////////////////////////////////////////////////////// // Constants for WM_????_CHANGEVALUE messages ///////////////////////////////////////////////////////////////////////////// typedef enum { DISPLAY = 0, // Display OSD Value. ADJUSTUP, // Increase Value, with acceleration [display OSD] ADJUSTDOWN, // Decrease Value, with acceleration [display OSD] INCREMENT, // Increase Value by 1 [display OSD] DECREMENT, // Decrease Value by 1 [display OSD] RESET, // Reset Value to default [display OSD] TOGGLEBOOL, // Toggle a boolean setting [display OSD] ADJUSTUP_SILENT, // Same, but no OSD ADJUSTDOWN_SILENT, // Same, but no OSD INCREMENT_SILENT, // Same, but no OSD DECREMENT_SILENT, // Same, but no OSD RESET_SILENT, // Same, but no OSD TOGGLEBOOL_SILENT, // Same, but no OSD } eCHANGEVALUE; ///////////////////////////////////////////////////////////////////////////// // Control settings contained in AspectRatio.c ///////////////////////////////////////////////////////////////////////////// typedef enum { SOURCE_ASPECT = 0, CUSTOM_SOURCE_ASPECT, TARGET_ASPECT, CUSTOM_TARGET_ASPECT, ASPECT_MODE, LUMINANCETHRESHOLD, IGNORENONBLACKPIXELS, AUTODETECTASPECT, ZOOMINFRAMECOUNT, ASPECTHISTORYTIME, ASPECTCONSISTENCYTIME, VERTICALPOS, HORIZONTALPOS, CLIPPING, BOUNCE, BOUNCEPERIOD, DEFERSETOVERLAY, BOUNCETIMERPERIOD, BOUNCEAMPLITUDE, ORBIT, ORBITPERIODX, ORBITPERIODY, ORBITSIZE, ORBITTIMERPERIOD, AUTOSIZEWINDOW, SKIPPERCENT, XZOOMFACTOR, YZOOMFACTOR, XZOOMCENTER, YZOOMCENTER, CHROMARANGE, WAITFORVERTBLANKINDRAW, ZOOMOUTFRAMECOUNT, ALLOWGREATERTHANSCREEN, MASKGREYSHADE, USEWSS, DEFAULTSOURCEASPECT, DEFAULTASPECTMODE, ASPECT_SETTING_LASTONE, } ASPECT_SETTING; #define WM_ASPECT_GETVALUE (WM_APP + 1) #define WM_ASPECT_SETVALUE (WM_APP + 101) #define WM_ASPECT_CHANGEVALUE (WM_APP + 201) ///////////////////////////////////////////////////////////////////////////// // Control settings contained in Bt848.c ///////////////////////////////////////////////////////////////////////////// typedef enum { BRIGHTNESS = 0, CONTRAST, HUE, SATURATION, SATURATIONU, SATURATIONV, TOPOVERSCAN, BDELAY, BTAGCDISABLE, BTCRUSH, BTEVENCHROMAAGC, BTODDCHROMAAGC, BTEVENLUMAPEAK, BTODDLUMAPEAK, BTFULLLUMARANGE, BTEVENLUMADEC, BTODDLUMADEC, BTEVENCOMB, BTODDCOMB, BTCOLORBARS, BTGAMMACORRECTION, BTCORING, BTHORFILTER, BTVERTFILTER, BTCOLORKILL, BTWHITECRUSHUP, BTWHITECRUSHDOWN, CURRENTX, CUSTOMPIXELWIDTH, VIDEOSOURCE, TVFORMAT, HDELAY, VDELAY, REVERSEPOLARITY, CURRENTCARDTYPE, CURRENTTUNERTYPE, AUDIOSOURCE1, AUDIOCHANNEL, AUTOSTEREOSELECT, VOLUME, BASS, TREBLE, BALANCE, BT848SAVEPERINPUT_DISABLED, BT848SAVEPERFORMAT_DISABLED, AUDIOSOURCE2, AUDIOSOURCE3, AUDIOSOURCE4, AUDIOSOURCE5, AUDIOSOURCE6, USEINPUTPIN1, USEEQUALIZER, EQUALIZERBAND1, EQUALIZERBAND2, EQUALIZERBAND3, EQUALIZERBAND4, EQUALIZERBAND5, LOUDNESS, SUPERBASS, SPATIAL, AUTOVOLUMECORRECTION, AUDIOSTANDARDDETECT, AUDIOSTANDARDDETECTINTERVAL, AUDIOSTANDARDMANUAL, AUDIOSTANDARDMAJORCARRIER, AUDIOSTANDARDMINORCARRIER, AUDIOSTANDARDINSTATUSBAR, MSP34XXFLAGS, AUTOSTEREODETECTINTERVAL, BOTTOMOVERSCAN, LEFTOVERSCAN, RIGHTOVERSCAN, BT848_SETTING_LASTONE, } BT848_SETTING; #define WM_BT848_GETVALUE (WM_APP + 2) #define WM_BT848_SETVALUE (WM_APP + 102) #define WM_BT848_CHANGEVALUE (WM_APP + 202) ///////////////////////////////////////////////////////////////////////////// // Control settings contained in DScaler.c ///////////////////////////////////////////////////////////////////////////// typedef enum { STARTLEFT = 0, STARTTOP, STARTWIDTH, STARTHEIGHT, ALWAYSONTOP, ISFULLSCREEN, FORCEFULLSCREEN, SHOWSTATUSBAR, SHOWMENU, WINDOWPROCESSOR, THREADPROCESSOR, WINDOWPRIORITY, THREADPRIORITY, AUTOSAVESETTINGS, ALWAYSONTOPFULL, SHOWCRASHDIALOG, DISPLAYSPLASHSCREEN, AUTOHIDECURSOR, LOCKKEYBOARD, LOCKKEYBOARDMAINWINDOWONLY, SCREENSAVEROFF, AUTOCODEPAGE, VTANTIALIAS, INITIALSOURCE, CHANNELENTERTIME, PROCESSORSPEED, TRADEOFF, FULLCPU, VIDEOCARD, REVERSECHANNELSCROLLING, SINGLEKEYTELETEXTTOGGLE, MINTOTRAY, MINIMIZEHANDLING, RESOFULLSCREEN, PSTRIPRESO576I, PSTRIPRESO480I, SKINNAME, CHANNELPREVIEWWNBCOLS, CHANNELPREVIEWNBROWS, DSCALER_SETTING_LASTONE, } DSCALER_SETTING; #define WM_DSCALER_GETVALUE (WM_APP + 3) #define WM_DSCALER_SETVALUE (WM_APP + 103) #define WM_DSCALER_CHANGEVALUE (WM_APP + 203) ///////////////////////////////////////////////////////////////////////////// // Control settings contained in OutThreads.c ///////////////////////////////////////////////////////////////////////////// typedef enum { HURRYWHENLATE = 0, WAITFORFLIP, DOVERTICALFLIP, TUNERSWITCHSCREENUPDATEDELAY, DOACCURATEFLIPS, AUTODETECT, WAITFORVSYNC, DOJUDDERTERMINATORONVIDEO, OUTTHREADS_SETTING_LASTONE, } OUTTHREADS_SETTING; #define WM_OUTTHREADS_GETVALUE (WM_APP + 4) #define WM_OUTTHREADS_SETVALUE (WM_APP + 104) #define WM_OUTTHREADS_CHANGEVALUE (WM_APP + 204) ///////////////////////////////////////////////////////////////////////////// // Control settings contained in Other.c ///////////////////////////////////////////////////////////////////////////// typedef enum { BACKBUFFERS = 0, OVERLAYCOLOR, USEOVERLAYCONTROLS, OVERLAYBRIGHTNESS, OVERLAYCONTRAST, OVERLAYHUE, OVERLAYSATURATION, OVERLAYGAMMA, OVERLAYSHARPNESS, OTHER_SETTING_LASTONE, } OTHER_SETTING; #define WM_OTHER_GETVALUE (WM_APP + 5) #define WM_OTHER_SETVALUE (WM_APP + 105) #define WM_OTHER_CHANGEVALUE (WM_APP + 205) ///////////////////////////////////////////////////////////////////////////// // Control settings contained in FD_50Hz.c ///////////////////////////////////////////////////////////////////////////// typedef enum { PULLDOWNTHRESHHOLDLOW = 0, PULLDOWNTHRESHHOLDHIGH, PALFILMFALLBACKMODE, PALFILMREPEATCOUNT, PALFILMREPEATCOUNT2, MAXCALLSTOPALCOMB, PALBADCADENCEMODE, FD50_SETTING_LASTONE, } FD50_SETTING; #define WM_FD50_GETVALUE (WM_APP + 6) #define WM_FD50_SETVALUE (WM_APP + 106) #define WM_FD50_CHANGEVALUE (WM_APP + 206) ///////////////////////////////////////////////////////////////////////////// // Control settings contained in FD_50Hz.c ///////////////////////////////////////////////////////////////////////////// typedef enum { NTSCFILMFALLBACKMODE = 0, NTSCPULLDOWNREPEATCOUNT, NTSCPULLDOWNREPEATCOUNT2, THRESHOLD32PULLDOWN, THRESHOLDPULLDOWNMISMATCH, THRESHOLDPULLDOWNCOMB, FALLBACKTOVIDEO, PULLDOWNSWITCHINTERVAL, PULLDOWNSWITCHMAX, MAXCALLSTOCOMB, NTSCBADCADENCEMODE, FD60_SETTING_LASTONE, } FD60_SETTING; #define WM_FD60_GETVALUE (WM_APP + 7) #define WM_FD60_SETVALUE (WM_APP + 107) #define WM_FD60_CHANGEVALUE (WM_APP + 207) ///////////////////////////////////////////////////////////////////////////// // Control settings contained in FD_Common.c ///////////////////////////////////////////////////////////////////////////// typedef enum { BITSHIFT = 0, EDGEDETECT, JAGGIETHRESHOLD, DIFFTHRESHOLD, USECHROMA, FILMFLIPDELAY, FD_COMMON_SETTING_LASTONE, } FD_COMMON_SETTING; #define WM_FD_COMMON_GETVALUE (WM_APP + 8) #define WM_FD_COMMON_SETVALUE (WM_APP + 108) #define WM_FD_COMMON_CHANGEVALUE (WM_APP + 208) ///////////////////////////////////////////////////////////////////////////// // Control settings contained in FLT_TNoise.c ///////////////////////////////////////////////////////////////////////////// typedef enum { TEMPORALLUMINANCETHRESHOLD = 0, TEMPORALCHROMATHRESHOLD, TEMPORALNOISEPREFETCH, LOCKTHRESHOLDSTOGETHER, USETEMPORALNOISEFILTER, FLT_TNOISE_SETTING_LASTONE, } FLT_TNOISE_SETTING; #define WM_FLT_TNOISE_GETVALUE (WM_APP + 14) #define WM_FLT_TNOISE_SETVALUE (WM_APP + 114) #define WM_FLT_TNOISE_CHANGEVALUE (WM_APP + 214) ///////////////////////////////////////////////////////////////////////////// // Control settings contained in OSD.c ///////////////////////////////////////////////////////////////////////////// typedef enum { OSDB_USERDEFINED = -1, OSDB_TRANSPARENT = 0, OSDB_BLOCK, OSDB_SHADED, OSDB_LASTONE, } eOSDBackground; typedef enum { OSD_OUTLINECOLOR = 0, OSD_TEXTCOLOR, OSD_PERCENTAGESIZE, OSD_PERCENTAGESMALLSIZE, OSD_ANTIALIAS, OSD_BACKGROUND, OSD_OUTLINE, OSD_AUTOHIDE_SCREEN, OSD_USE_GENERAL_SCREEN, OSD_USE_STATISTICS_SCREEN, OSD_USE_WSS_SCREEN, OSD_USE_DEVELOPER_SCREEN, OSD_FONT, OSD_SETTING_LASTONE, } OSD_SETTING; #define WM_OSD_GETVALUE (WM_APP + 18) #define WM_OSD_SETVALUE (WM_APP + 118) #define WM_OSD_CHANGEVALUE (WM_APP + 218) ///////////////////////////////////////////////////////////////////////////// // Control settings contained in FLT_Gamma.c ///////////////////////////////////////////////////////////////////////////// typedef enum { GAMMAVALUE = 0, USESTOREDTABLE, USEGAMMAFILTER, BLACKLEVEL, WHITELEVEL, FLT_GAMMA_SETTING_LASTONE, } FLT_GAMMA_SETTING; #define WM_FLT_GAMMA_GETVALUE (WM_APP + 20) #define WM_FLT_GAMMA_SETVALUE (WM_APP + 120) #define WM_FLT_GAMMA_CHANGEVALUE (WM_APP + 220) ///////////////////////////////////////////////////////////////////////////// // Control settings contained in VBI.c ///////////////////////////////////////////////////////////////////////////// typedef enum { CAPTURE_VBI = 0, CLOSEDCAPTIONMODE, DOTELETEXT, DOVPS, DOWSS, SEARCHHIGHLIGHT, VBI_SETTING_LASTONE, } VBI_SETTING; #define WM_VBI_GETVALUE (WM_APP + 21) #define WM_VBI_SETVALUE (WM_APP + 121) #define WM_VBI_CHANGEVALUE (WM_APP + 221) ///////////////////////////////////////////////////////////////////////////// // Control settings contained in FLT_LinearCorrection.c ///////////////////////////////////////////////////////////////////////////// typedef enum { USELINEARCORRFILTER = 0, DOONLYMASKING, MASKTYPE, MASKPARAM1, MASKPARAM2, MASKPARAM3, MASKPARAM4, FLT_LINEAR_CORR_SETTING_LASTONE, } FLT_LINEAR_CORR_SETTING; #define WM_FLT_LINEAR_CORR_GETVALUE (WM_APP + 24) #define WM_FLT_LINEAR_CORR_SETVALUE (WM_APP + 124) #define WM_FLT_LINEAR_CORR_CHANGEVALUE (WM_APP + 224) ///////////////////////////////////////////////////////////////////////////// // Control settings contained in MixerDev.c ///////////////////////////////////////////////////////////////////////////// typedef enum { USEMIXER = 0, DESTINDEX, INPUT1INDEX, INPUT2INDEX, INPUT3INDEX, INPUT4INDEX, MIXERRESETONEXIT, INPUT5INDEX, INPUT6INDEX, MIXERNAME, NOHARDWAREMUTE, MIXERDEV_SETTING_LASTONE, } MIXERDEV_SETTING; #define WM_MIXERDEV_GETVALUE (WM_APP + 25) #define WM_MIXERDEV_SETVALUE (WM_APP + 125) #define WM_MIXERDEV_CHANGEVALUE (WM_APP + 225) ///////////////////////////////////////////////////////////////////////////// // Control settings contained in FieldTiming.c ///////////////////////////////////////////////////////////////////////////// typedef enum { AUTOFORMATDETECT = 0, FIFTY_HZ_FORMAT, SIXTY_HZ_FORMAT, FORMATCHANGETHRESHOLD, SLEEPINTERVAL, SLEEPSKIPFIELDS, SLEEPSKIPFIELDSLATE, MAXFIELDSHIFT, ALWAYSSLEEP, GIVEUPPROCDURINGJT, TIMING_SETTING_LASTONE, } TIMING_SETTING; #define WM_TIMING_GETVALUE (WM_APP + 26) #define WM_TIMING_SETVALUE (WM_APP + 126) #define WM_TIMING_CHANGEVALUE (WM_APP + 226) ///////////////////////////////////////////////////////////////////////////// // Control settings contained in Program.c ///////////////////////////////////////////////////////////////////////////// typedef enum { COUNTRYCODE = 0, CURRENTPROGRAM, SCANMODE, USEAFCWHILESCANNING, CHANNELS_SETTING_LASTONE, } CHANNELS_SETTING; #define WM_CHANNELS_GETVALUE (WM_APP + 27) #define WM_CHANNELS_SETVALUE (WM_APP + 127) #define WM_CHANNELS_CHANGEVALUE (WM_APP + 227) ///////////////////////////////////////////////////////////////////////////// // Control settings contained in Audio.c ///////////////////////////////////////////////////////////////////////////// typedef enum { SYSTEMINMUTE = 0, AUDIO_SETTING_LASTONE, } AUDIO_SETTING; #define WM_AUDIO_GETVALUE (WM_APP + 28) #define WM_AUDIO_SETVALUE (WM_APP + 128) #define WM_AUDIO_CHANGEVALUE (WM_APP + 228) ///////////////////////////////////////////////////////////////////////////// // Control settings contained in Debug.c ///////////////////////////////////////////////////////////////////////////// typedef enum { DEBUGLOG = 0, DEBUGLEVEL, DEBUGFLUSHAFTERWRITE, DEBUGLOGFILE, DEBUG_SETTING_LASTONE, } DEBUG_SETTING; #define WM_DEBUG_GETVALUE (WM_APP + 29) #define WM_DEBUG_SETVALUE (WM_APP + 129) #define WM_DEBUG_CHANGEVALUE (WM_APP + 229) ///////////////////////////////////////////////////////////////////////////// // Control settings contained in FLT_LogoKill.c ///////////////////////////////////////////////////////////////////////////// typedef enum { LOGOKILL_TOP = 0, LOGOKILL_LEFT, LOGOKILL_WIDTH, LOGOKILL_HEIGHT, LOGOKILL_MODE, LOGOKILL_MAX, LOGOKILL_USE_SMOOTHING, LOGOKILL_SMOOTHING_AMOUNT, USELOGOKILL, FLT_LOGOKILL_SETTING_LASTONE, } FLT_LOGOKILL_SETTING; #define WM_FLT_LOGOKILL_GETVALUE (WM_APP + 30) #define WM_FLT_LOGOKILL_SETVALUE (WM_APP + 130) #define WM_FLT_LOGOKILL_CHANGEVALUE (WM_APP + 230) ///////////////////////////////////////////////////////////////////////////// // Control settings contained in VT.c ///////////////////////////////////////////////////////////////////////////// typedef enum { VT_CODEPAGE = 0, VT_LANGUAGE_REGION, VT_SHOW_SUBCODE_OSD, VT_LINES_CACHINGCONTROL, VT_HIGH_GRANULARITY_CACHING, VT_SUBSTITUTE_ERROR_SPACES, VT_SUBTITLE_DUPLICATION_FILTER, VT_DOUBLEHEIGHT_SUBTITLES_FILTER, VT_SETTING_LASTONE, } VT_SETTING; #define WM_VT_GETVALUE (WM_APP + 31) #define WM_VT_SETVALUE (WM_APP + 131) #define WM_VT_CHANGEVALUE (WM_APP + 231) ///////////////////////////////////////////////////////////////////////////// // Control settings contained in FLT_Sharpness.c ///////////////////////////////////////////////////////////////////////////// typedef enum { SHARPNESS = 0, SHARPNESS_PREFETCH, USESHARPNESS, FLT_SHARPNESS_SETTING_LASTONE, } FLT_SHARPNESS_SETTING; #define WM_FLT_SHARPNESS_GETVALUE (WM_APP + 34) #define WM_FLT_SHARPNESS_SETVALUE (WM_APP + 134) #define WM_FLT_SHARPNESS_CHANGEVALUE (WM_APP + 234) ///////////////////////////////////////////////////////////////////////////// // Control settings contained in FLT_TemporalComb.c ///////////////////////////////////////////////////////////////////////////// typedef enum { TCOMB_MAX_PHASE_COLOR_DIFF = 0, TCOMB_PREFETCH, TCOMB_SHIMMER_HIST_PERCENT, TCOMB_SHIMMER_PERCENT, TCOMB_ACTIVATE, TCOMB_TRADE_SPEED_FOR_ACCURACY, TCOMB_VIDOE_MODE, FLT_TCOMB_SETTING_LASTONE, } FLT_TCOMB_SETTING; #define WM_FLT_TCOMB_GETVALUE (WM_APP + 35) #define WM_FLT_TCOMB_SETVALUE (WM_APP + 135) #define WM_FLT_TCOMB_CHANGEVALUE (WM_APP + 235) ///////////////////////////////////////////////////////////////////////////// // Control settings contained in Calibration.c ///////////////////////////////////////////////////////////////////////////// typedef enum { LEFT_SOURCE_CROPPING = 0, RIGHT_SOURCE_CROPPING, SHOW_RGB_DELTA, SHOW_YUV_DELTA, CALIBR_SETTING_LASTONE, } CALIBR_SETTING; #define WM_CALIBR_GETVALUE (WM_APP + 36) #define WM_CALIBR_SETVALUE (WM_APP + 136) #define WM_CALIBR_CHANGEVALUE (WM_APP + 236) ///////////////////////////////////////////////////////////////////////////// // Control settings contained in DVBT.c ///////////////////////////////////////////////////////////////////////////// typedef enum { DVBT_SETTING_LASTONE = 0, } DVBT_SETTING; #define WM_DVBT_GETVALUE (WM_APP + 37) #define WM_DVBT_SETVALUE (WM_APP + 137) #define WM_DVBT_CHANGEVALUE (WM_APP + 237) ///////////////////////////////////////////////////////////////////////////// // Control settings contained in FLT_GradualNoise.c ///////////////////////////////////////////////////////////////////////////// typedef enum { NOISE_REDUCTION = 0, GNOISE_PREFETCH, GNOISE_ACTIVATE, FLT_GNOISE_SETTING_LASTONE, } FLT_GNOISE_SETTING; #define WM_FLT_GNOISE_GETVALUE (WM_APP + 38) #define WM_FLT_GNOISE_SETVALUE (WM_APP + 138) #define WM_FLT_GNOISE_CHANGEVALUE (WM_APP + 238) ///////////////////////////////////////////////////////////////////////////// // Control settings contained in FLT_AdaptiveNoise.c ///////////////////////////////////////////////////////////////////////////// typedef enum { ANOISE_STABILITY = 0, ANOISE_PREFETCH, ANOISE_REDUCTION, ANOISE_LOCK_DOT, ANOISE_READOUT, ANOISE_ACTIVATE, ANOISE_INDICATOR, ANOISE_MOTION_MEMORY, ANOISE_DO_SPATIAL, ANOISE_SPATIAL, FLT_ANOISE_SETTING_LASTONE, } FLT_ANOISE_SETTING; #define WM_FLT_ANOISE_GETVALUE (WM_APP + 39) #define WM_FLT_ANOISE_SETVALUE (WM_APP + 139) #define WM_FLT_ANOISE_CHANGEVALUE (WM_APP + 239) ///////////////////////////////////////////////////////////////////////////// // Control settings contained in FLT_Histogram.c ///////////////////////////////////////////////////////////////////////////// typedef enum { HISTOGRAM_DISPLAY_MODE = 0, HISTOGRAM_PREFETCH, HISTOGRAM_ACTIVATE, HISTOGRAM_COMB_MODE, FLT_HISTOGRAM_SETTING_LASTONE, } FLT_HISTOGRAM_SETTING; #define WM_FLT_HISTOGRAM_GETVALUE (WM_APP + 40) #define WM_FLT_HISTOGRAM_SETVALUE (WM_APP + 140) #define WM_FLT_HISTOGRAM_CHANGEVALUE (WM_APP + 240) ///////////////////////////////////////////////////////////////////////////// // Control settings contained in StillSource.cpp ///////////////////////////////////////////////////////////////////////////// typedef enum { FORMATSAVING = 0, SLIDESHOWDELAY, JPEGQUALITY, PATTERNHEIGTH, PATTERNWIDTH, DELAYBETWEENSTILLS, SAVEINSAMEFILE, STILLSINMEMORY, NBCONSECUTIVESTILLS, KEEPORIGINALRATIO, OSDFORSTILLS, STILLPREVIEWWNBCOLS, STILLPREVIEWNBROWS, MAXMEMFORSTILLS, SAVINGPATH, STILL_SETTING_LASTONE, } STILL_SETTING; #define WM_STILL_GETVALUE (WM_APP + 41) #define WM_STILL_SETVALUE (WM_APP + 141) #define WM_STILL_CHANGEVALUE (WM_APP + 241) ///////////////////////////////////////////////////////////////////////////// // Control settings contained in FLT_Mirror.c ///////////////////////////////////////////////////////////////////////////// typedef enum { USEMIRROR, FLT_MIRROR_SETTING_LASTONE, } FLT_MIRROR_SETTING; #define WM_FLT_MIRROR_GETVALUE (WM_APP + 42) #define WM_FLT_MIRROR_SETVALUE (WM_APP + 142) #define WM_FLT_MIRROR_CHANGEVALUE (WM_APP + 242) ///////////////////////////////////////////////////////////////////////////// // Control settings contained in ProgramList.cpp ///////////////////////////////////////////////////////////////////////////// typedef enum { PRESWITCHMUTEDELAY, POSTSWITCHMUTEDELAY, ANTIPLOP_SETTING_LASTONE, } ANTIPLOP_SETTING; #define WM_ANTIPLOP_GETVALUE (WM_APP + 43) #define WM_ANTIPLOP_SETVALUE (WM_APP + 143) #define WM_ANTIPLOP_CHANGEVALUE (WM_APP + 243) ///////////////////////////////////////////////////////////////////////////// // Control settings for save per channel option ///////////////////////////////////////////////////////////////////////////// typedef enum { SETTINGSPERCHANNEL_BYCHANNEL = 0, SETTINGSPERCHANNEL_BYINPUT, SETTINGSPERCHANNEL_BYFORMAT, SETTINGSPERCHANNEL_SETTING_LASTONE, } SETTINGSPERCHANNEL_SETTING; #define WM_SETTINGSPERCHANNEL_GETVALUE (WM_APP + 45) #define WM_SETTINGSPERCHANNEL_SETVALUE (WM_APP + 145) #define WM_SETTINGSPERCHANNEL_CHANGEVALUE (WM_APP + 245) ///////////////////////////////////////////////////////////////////////////// // Control settings contained in FLT_Mirror.c ///////////////////////////////////////////////////////////////////////////// typedef enum { USEINVERSION, FLT_INVERSION_SETTING_LASTONE, } FLT_INVERSION_SETTING; #define WM_FLT_INVERSION_GETVALUE (WM_APP + 46) #define WM_FLT_INVERSION_SETVALUE (WM_APP + 146) #define WM_FLT_INVERSION_CHANGEVALUE (WM_APP + 246) ///////////////////////////////////////////////////////////////////////////// // Control settings contained in CX2388XSource.c ///////////////////////////////////////////////////////////////////////////// typedef enum { CX2388XBRIGHTNESS = 0, CX2388XCONTRAST, CX2388XHUE, CX2388XSATURATION, CX2388XSATURATIONU, CX2388XSATURATIONV, CX2388XTOPOVERSCAN, CX2388XVIDEOSOURCE, CX2388XTVFORMAT, CX2388XCARDTYPE, CX2388XTUNERTYPE, CX2388XSAVEPERINPUT_DISABLED, CX2388XSAVEPERFORMAT_DISABLED, CX2388XSAVETVFORMATPERINPUT_DISABLED, CX2388XISINPUTPROGRESSIVE, CX2388XFLIFILMDETECT, CX2388XHDELAY, CX2388XVDELAY, CX2388XEATLINESATTOP, CX2388XSHARPNESS, CX2388XLUMAAGC, CX2388XCHROMAAGC, CX2388XFASTSUBCARRIERLOCK, CX2388XWHITECRUSH, CX2388XLOWCOLORREMOVAL, CX2388XCOMBFILTER, CX2388XFULLLUMARANGE, CX2388XREMODULATION, CX2388XCHROMA2HCOMB, CX2388XFORCEREMODEXCESSCHROMA, CX2388XIFXINTERPOLATION, CX2388XCOMBRANGE, CX2388XSECONDCHROMADEMOD, CX2388XTHIRDCHROMADEMOD, CX2388XPIXELWIDTH, CX2388XCUSTOMPIXELWIDTH, CX2388XWHITECRUSHUP, CX2388XWHITECRUSHDOWN, CX2388XWHITECRUSHMAJSEL, CX2388XWHITECRUSHPERFRAME, CX2388XVOLUME, CX2388XBALANCE, CX2388XAUDIOTYPE, CX2388XSTEREOTYPE, CX2388XBOTTOMOVERSCAN, CX2388XLEFTOVERSCAN, CX2388XRIGHTOVERSCAN, CX2388XANALOGUEBLANKING, CX2388XSTARTSTOPDRIVER, CX2388XAUTOMUTEIFNOTUNERSIGNAL, CX2388X_SETTING_LASTONE, } CX2388X_SETTING; #define WM_CX2388X_GETVALUE (WM_APP + 47) #define WM_CX2388X_SETVALUE (WM_APP + 147) #define WM_CX2388X_CHANGEVALUE (WM_APP + 247) ///////////////////////////////////////////////////////////////////////////// // Control settings contained in FD_Prog.c ///////////////////////////////////////////////////////////////////////////// typedef enum { PROGTHRESHHOLDSTILL = 0, PROGTHRESHHOLDMOTION, PROGREPEATCOUNT, FDPROG_SETTING_LASTONE, } FDPROG_SETTING; #define WM_FDPROG_GETVALUE (WM_APP + 48) #define WM_FDPROG_SETVALUE (WM_APP + 148) #define WM_FDPROG_CHANGEVALUE (WM_APP + 248) ///////////////////////////////////////////////////////////////////////////// // Control settings contained in SAA7134Source.c ///////////////////////////////////////////////////////////////////////////// typedef enum { SAA7134BRIGHTNESS = 0, SAA7134CONTRAST, SAA7134SATURATION, SAA7134HUE, SAA7134TOPOVERSCAN, SAA7134PIXELWIDTH, SAA7134CUSTOMPIXELWIDTH, SAA7134VIDEOSOURCE, SAA7134TVFORMAT, SAA7134REVERSEPOLARITY, SAA7134CARDTYPE, SAA7134TUNERTYPE, SAA7134HPLLMODE, SAA7134WHITEPEAK, SAA7134COLORPEAK, SAA7134ADAPTIVECOMBFILTER, SAA7134HDELAY, SAA7134VDELAY, SAA7134AUDIOSTANDARD, SAA7134AUDIOCHANNEL, SAA7134AUDIOSAMPLERATE, SAA7134AUTOSTEREOSELECT, SAA7134VOLUME, SAA7134BASS, SAA7134TREBLE, SAA7134BALANCE, SAA7134AUDIOSOURCE, SAA7134CUSTOMAUDIOSTANDARD, SAA7134AUDIOSTANDARDCARRIER1, SAA7134AUDIOSTANDARDCARRIER2, SAA7134AUDIOSTANDARDCARRIER1MODE, SAA7134AUDIOSTANDARDCARRIER2MODE, SAA7134AUDIOSTANDARDCH1FMDEEMPH, SAA7134AUDIOSTANDARDCH2FMDEEMPH, SAA7134AUTOMATICVOLUMELEVEL, SAA7134VBIUPSCALEDIVISOR, SAA7134VBIDEBUGOVERLAY, SAA7134AUTOMATICGAINCONTROL, SAA7134GAINCONTROLLEVEL, SAA7134VIDEOMIRROR, SAA7134AUDIOLINE1VOLTAGE, SAA7134AUDIOLINE2VOLTAGE, SAA7134BOTTOMOVERSCAN, SAA7134LEFTOVERSCAN, SAA7134RIGHTOVERSCAN, SAA7134_SETTING_LASTONE, } SAA7134_SETTING; #define WM_SAA7134_GETVALUE (WM_APP + 49) #define WM_SAA7134_SETVALUE (WM_APP + 149) #define WM_SAA7134_CHANGEVALUE (WM_APP + 249) ///////////////////////////////////////////////////////////////////////////// // Control settings contained in ToolbarControl.cpp ///////////////////////////////////////////////////////////////////////////// typedef enum { TOOLBARS_SHOWTOOLBAR1 = 0, TOOLBARS_TOOLBAR1POSITION = 1, TOOLBARS_TOOLBARCHILD_POSITION = 2, TOOLBARS_TOOLBARCHILD_LASTONE = 42, TOOLBARS_SETTING_LASTONE, } TOOLBARS_SETTING; #define WM_TOOLBARS_GETVALUE (WM_APP + 50) #define WM_TOOLBARS_SETVALUE (WM_APP + 150) #define WM_TOOLBARS_CHANGEVALUE (WM_APP + 250) ///////////////////////////////////////////////////////////////////////////// // Control settings contained in FLT_Chroma.c ///////////////////////////////////////////////////////////////////////////// typedef enum { CHROMAHORZSHIFT = 0, CHROMAVERTSHIFT, LOWPASSCHROMAFILTER, USECHROMAFILTER, FLT_CHROMA_SETTING_LASTONE, } FLT_CHROMA_SETTING; #define WM_FLT_CHROMA_GETVALUE (WM_APP + 52) #define WM_FLT_CHROMA_SETVALUE (WM_APP + 152) #define WM_FLT_CHROMA_CHANGEVALUE (WM_APP + 252) ///////////////////////////////////////////////////////////////////////////// // Control settings contained in FLT_BlackWhite.c ///////////////////////////////////////////////////////////////////////////// typedef enum { USEBLACKWHITEFILTER = 0, FLT_BLACKWHITE_SETTING_LASTONE, } FLT_BLACKWHITE_SETTING; #define WM_FLT_BLACKWHITE_GETVALUE (WM_APP + 53) #define WM_FLT_BLACKWHITE_SETVALUE (WM_APP + 153) #define WM_FLT_BLACKWHITE_CHANGEVALUE (WM_APP + 253) ///////////////////////////////////////////////////////////////////////////// // Control settings contained in FLT_DScopeVIDEO.c ///////////////////////////////////////////////////////////////////////////// typedef enum { USE_DSVIDEO = 0, DSV_LINE, DSV_PLOTIINTENSITYINVERT, DSV_Y_SCALE, DSV_Y1_BASELINE, USE_GRID, DSV_GRIDCOLOR, DSV_GRIDINTENSITY, USE_BACKGROUND, USE_LINEMARKER, USE_PICTUREFILL, FLT_DSV_SETTING_LASTONE, } FLT_DSV_SETTING; #define WM_FLT_DSV_GETVALUE (WM_APP + 54) #define WM_FLT_DSV_SETVALUE (WM_APP + 154) #define WM_FLT_DSV_CHANGEVALUE (WM_APP + 254) ///////////////////////////////////////////////////////////////////////////// // Control settings contained in FLT_LuminChromaShift.c ///////////////////////////////////////////////////////////////////////////// typedef enum { USELUMINCHROMASHIFT = 0, SHIFTVALUE, FLT_LUMINCHROMASHIFT_SETTING_LASTONE, } FLT_LUMINCHROMASHIFT_SETTING; #define WM_FLT_LUMINCHROMASHIFT_GETVALUE (WM_APP + 55) #define WM_FLT_LUMINCHROMASHIFT_SETVALUE (WM_APP + 155) #define WM_FLT_LUMINCHROMASHIFT_CHANGEVALUE (WM_APP + 255) ///////////////////////////////////////////////////////////////////////////// // Control settings contained in FLT_Colorimetry.c ///////////////////////////////////////////////////////////////////////////// typedef enum { USECOLORIMETRY = 0, COLORIMETRYTYPE, FLT_COLORIMETRY_SETTING_LASTONE, } FLT_COLORIMETRY_SETTING; #define WM_FLT_COLORIMETRY_GETVALUE (WM_APP + 56) #define WM_FLT_COLORIMETRY_SETVALUE (WM_APP + 156) #define WM_FLT_COLORIMETRY_CHANGEVALUE (WM_APP + 256) ///////////////////////////////////////////////////////////////////////////// // Control settings contained in TimeShift.cpp ///////////////////////////////////////////////////////////////////////////// typedef enum { TIMESHIFTSAVINGPATH, TIMESHIFTSHOWWARNING, TIMESHIFTFILELIMIT, TIMESHIFT_SETTING_LASTONE, } TIMESHIFT_SETTING; #define WM_TIMESHIFT_GETVALUE (WM_APP + 57) #define WM_TIMESHIFT_SETVALUE (WM_APP + 157) #define WM_TIMESHIFT_CHANGEVALUE (WM_APP + 257) #endif zapping-0.10cvs6/plugins/deinterlace/DI_GreedyH/ 777 764 144 0 10443536356 14665 5zapping-0.10cvs6/plugins/deinterlace/DI_GreedyH/DI_GreedyHMPulldown.c 644 764 144 65133 10417055620 20611 /*/////////////////////////////////////////////////////////////////////////// // $Id: DI_GreedyHMPulldown.c,v 1.4 2006/04/12 01:44:48 mschimek Exp $ ///////////////////////////////////////////////////////////////////////////// // Copyright (c) 2001 Tom Barry. All rights reserved. // Copyright (C) 2005 Michael H. Schimek ///////////////////////////////////////////////////////////////////////////// // // This file is subject to the terms of the GNU General Public License as // published by the Free Software Foundation. A copy of this license is // included with this software distribution in the file COPYING. If you // do not have a copy, you may obtain a copy by writing to the Free // Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. // // This software 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 ///////////////////////////////////////////////////////////////////////////// // Change Log // // Date Developer Changes // // 01 Jul 2001 Tom Barry New Greedy (High Motion) // Deinterlace method // ///////////////////////////////////////////////////////////////////////////// // CVS Log // // $Log: DI_GreedyHMPulldown.c,v $ // Revision 1.4 2006/04/12 01:44:48 mschimek // s/CPU_FEATURE_SSE/CPU_FEATURE_SSE_INT. // // Revision 1.3 2005/06/28 00:46:10 mschimek // Converted to vector intrinsics. Added support for 3DNow, SSE2, x86-64 // and AltiVec. Removed ununsed DScaler code. Cleaned up. All options work // now. // // Revision 1.2.2.3 2005/05/31 02:40:34 mschimek // *** empty log message *** // // Revision 1.2.2.2 2005/05/17 19:58:32 mschimek // *** empty log message *** // // Revision 1.2.2.1 2005/05/05 09:46:00 mschimek // *** empty log message *** // // Revision 1.2 2005/01/20 01:38:33 mschimek // *** empty log message *** // // Revision 1.1 2005/01/08 14:54:23 mschimek // *** empty log message *** // // Revision 1.5 2001/11/25 04:33:37 trbarry // Fix for TDeinterlace_Info. Also release UN-Filter code, // 5-tap V & H sharp/soft filters optimized to reverse excessive // filtering (or EE?) // // Revision 1.4 2001/11/13 17:24:49 trbarry // Misc GreedyHMA Avisynth related changes. Also fix bug in Vertical // filter causing right hand garbage on screen. // // Revision 1.2 2001/07/25 12:04:31 adcockj // Moved Control stuff into DS_Control.h // Added $Id and $Log to comment blocks as per standards // ///////////////////////////////////////////////////////////////////////////*/ #include "windows.h" #include "DI_GreedyHM.h" extern int HistPtr; extern GR_PULLDOWN_INFO Hist[20]; #if !SIMD int HistPtr = 0; /* where we are in Queue */ /* a short history of pulldown stats */ GR_PULLDOWN_INFO Hist[20]; int UpdatePulldown(TDeinterlaceInfo * pInfo, int Comb, int Kontrast, int Motion) { int Prev = (HistPtr+20-1) % 20; /* prev entry ptr */ /* Last elem still in average at prev */ int Last = (Prev + 20+1-PDAVGLEN) % 20; int FlagMask = 0x000ffffe; /* trunc to 20 bits, turn off low */ /* note most values are updated delay 1, except input Comb */ if (Comb < Hist[HistPtr].Comb) { Hist[HistPtr].CombChoice = Comb; Hist[HistPtr].Flags = ((Hist[Prev].Flags << 1) & FlagMask) | 1; if (Hist[HistPtr].Comb > 0 && Kontrast > 0) { Hist[HistPtr].AvgChoice = 100 - 100 * Hist[HistPtr].CombChoice / Hist[HistPtr].Comb; } } else { Hist[HistPtr].CombChoice = Hist[HistPtr].Comb; Hist[HistPtr].Flags = (Hist[Prev].Flags << 1) & FlagMask; if (Comb > 0 && Kontrast > 0) { /* Hist[HistPtr].AvgChoice = 100 * (100 - 100 * Hist[HistPtr].CombChoice / Comb); */ Hist[HistPtr].AvgChoice = 100 - 100 * Hist[HistPtr].CombChoice / Comb; } } Hist[HistPtr].Kontrast = Kontrast; /* Kontrast calc'd in arrears */ Hist[HistPtr].Motion = Motion; /* Motion Calc'd in arrears */ Hist[HistPtr].Avg = Hist[Prev].Avg + Hist[HistPtr].AvgChoice - Hist[Last].AvgChoice; HistPtr = (1+HistPtr) % 20; /* bump for next time */ /* only fill in Comb for curr val, rest is garbage */ Hist[HistPtr].Comb = Comb; /* only fill in Comb for curr val, rest is garbage */ Hist[HistPtr].Kontrast = 0; /* only fill in Comb for curr val, rest is garbage */ Hist[HistPtr].Motion= 0; if (!(pInfo->PictureHistory[0]->Flags & PICTURE_INTERLACED_ODD)) { Hist[HistPtr].Flags2 = PD_ODD; } else { Hist[HistPtr].Flags2 = 0; } return 0; } #else /* SIMD */ /* copy 1 line from Fieldstore to overlay buffer */ void SIMD_NAME (FieldStoreCopy) (uint8_t * dst, const uint8_t * src, unsigned int n_bytes) { vu8 m0, m1, m2, m3; for (; n_bytes & -(sizeof (vu8) * 4); n_bytes -= sizeof (vu8) * 4) { m0 = vload (src, FS_FIELDS * sizeof (vu8) * 0); m1 = vload (src, FS_FIELDS * sizeof (vu8) * 1); m2 = vload (src, FS_FIELDS * sizeof (vu8) * 2); m3 = vload (src, FS_FIELDS * sizeof (vu8) * 3); src += FS_FIELDS * sizeof (vu8) * 4; vstorent (dst, 0 * sizeof (vu8), m0); vstorent (dst, 1 * sizeof (vu8), m1); vstorent (dst, 2 * sizeof (vu8), m2); vstorent (dst, 3 * sizeof (vu8), m3); dst += 4 * sizeof (vu8); } /* Remaining bytes, usually not needed. */ for (; n_bytes > 0; n_bytes -= sizeof (vu8)) { vstorent (dst, 0, vload (src, 0)); src += FS_FIELDS * sizeof (vu8); dst += sizeof (vu8); } } /* copy 1 line from Fieldstore to overlay buffer, merging with succeeding line. */ static void FieldStoreMerge (uint8_t * dst, const uint8_t * src1, const uint8_t * src2, unsigned int n_bytes) { vu8 m0, m1, m2, m3; for (; n_bytes & -(sizeof (vu8) * 4); n_bytes -= sizeof (vu8) * 4) { m0 = vload (src1, FS_FIELDS * sizeof (vu8) * 0); m1 = vload (src1, FS_FIELDS * sizeof (vu8) * 1); m2 = vload (src1, FS_FIELDS * sizeof (vu8) * 2); m3 = vload (src1, FS_FIELDS * sizeof (vu8) * 3); src1 += FS_FIELDS * sizeof (vu8) * 4; m0 = fast_vavgu8 (m0, vload (src2, FS_FIELDS * sizeof (vu8) * 0)); m1 = fast_vavgu8 (m1, vload (src2, FS_FIELDS * sizeof (vu8) * 1)); m2 = fast_vavgu8 (m2, vload (src2, FS_FIELDS * sizeof (vu8) * 2)); m3 = fast_vavgu8 (m3, vload (src2, FS_FIELDS * sizeof (vu8) * 3)); src2 += FS_FIELDS * sizeof (vu8) * 4; vstorent (dst, 0 * sizeof (vu8), m0); vstorent (dst, 1 * sizeof (vu8), m1); vstorent (dst, 2 * sizeof (vu8), m2); vstorent (dst, 3 * sizeof (vu8), m3); dst += 4 * sizeof (vu8); } /* Remaining bytes, usually not needed. */ for (; n_bytes > 0; n_bytes -= sizeof (vu8)) { m0 = fast_vavgu8 (vload (src1, 0), vload (src2, 0)); src1 += FS_FIELDS * sizeof (vu8); src2 += FS_FIELDS * sizeof (vu8); vstorent (dst, 0, m0); dst += sizeof (vu8); } } /* copy 1 line from Fieldstore to overlay buffer, merging with succeeding line and succeeding frame. */ static void FieldStoreMerge_V (uint8_t * dst, const uint8_t * src1, const uint8_t * src2, unsigned int n_bytes) { /* next/prev. field of same parity */ const unsigned int np = 2 * sizeof (vu8); vu8 m0, m1, m2, m3, m4, m5, m6, m7; for (; n_bytes & -(sizeof (vu8) * 4); n_bytes -= sizeof (vu8) * 4) { m0 = vload (src1, FS_FIELDS * sizeof (vu8) * 0); m1 = vload (src1, FS_FIELDS * sizeof (vu8) * 1); m2 = vload (src1, FS_FIELDS * sizeof (vu8) * 2); m3 = vload (src1, FS_FIELDS * sizeof (vu8) * 3); m4 = vload (src2, FS_FIELDS * sizeof (vu8) * 0); m5 = vload (src2, FS_FIELDS * sizeof (vu8) * 1); m6 = vload (src2, FS_FIELDS * sizeof (vu8) * 2); m7 = vload (src2, FS_FIELDS * sizeof (vu8) * 3); m0 = fast_vavgu8 (m0, vload (src1, FS_FIELDS * sizeof (vu8) * 0 + np)); m1 = fast_vavgu8 (m1, vload (src1, FS_FIELDS * sizeof (vu8) * 1 + np)); m2 = fast_vavgu8 (m2, vload (src1, FS_FIELDS * sizeof (vu8) * 2 + np)); m3 = fast_vavgu8 (m3, vload (src1, FS_FIELDS * sizeof (vu8) * 3 + np)); src1 += FS_FIELDS * sizeof (vu8) * 4; m4 = fast_vavgu8 (m4, vload (src2, FS_FIELDS * sizeof (vu8) * 0 + np)); m5 = fast_vavgu8 (m5, vload (src2, FS_FIELDS * sizeof (vu8) * 1 + np)); m6 = fast_vavgu8 (m6, vload (src2, FS_FIELDS * sizeof (vu8) * 2 + np)); m7 = fast_vavgu8 (m7, vload (src2, FS_FIELDS * sizeof (vu8) * 3 + np)); src2 += FS_FIELDS * sizeof (vu8) * 4; vstorent (dst, 0 * sizeof (vu8), fast_vavgu8 (m0, m4)); vstorent (dst, 1 * sizeof (vu8), fast_vavgu8 (m1, m5)); vstorent (dst, 2 * sizeof (vu8), fast_vavgu8 (m2, m6)); vstorent (dst, 3 * sizeof (vu8), fast_vavgu8 (m3, m7)); dst += 4 * sizeof (vu8); } /* Remaining bytes, usually not needed. */ for (; n_bytes > 0; n_bytes -= sizeof (vu8)) { m0 = fast_vavgu8 (vload (src1, 0), vload (src1, np)); src1 += FS_FIELDS * sizeof (vu8); m4 = fast_vavgu8 (vload (src2, 0), vload (src2, np)); src2 += FS_FIELDS * sizeof (vu8); vstorent (dst, 0, fast_vavgu8 (m0, m4)); dst += sizeof (vu8); } } static BOOL PullDown_InBetween (TDeinterlaceInfo * pInfo) { uint8_t *Dest; const uint8_t *pE; const uint8_t *pO; unsigned long EvenL; unsigned int height; Dest = pInfo->Overlay; /* EvenL = __min(FsPtr, FsPtrP2 = (FsPtr - 2) % 4); */ /* OddL = __min(FsPtrP = (FsPtr - 1) % 4, FsPtrP3 = (FsPtr - 3) % 4); */ EvenL = (FsPtr & 1) * sizeof (vu8); pE = (uint8_t *) FieldStore + EvenL; pO = (uint8_t *) FieldStore + (EvenL ^ (1 * sizeof (vu8))); if (pInfo->PictureHistory[0]->Flags & PICTURE_INTERLACED_ODD) SWAP (pE, pO); if (GreedyUseVSharpness) { for (height = pInfo->FieldHeight - 1; height > 0; --height) { FieldStoreMerge_V (Dest, pE, pO, pInfo->LineLength); Dest += pInfo->OverlayPitch; pE += FS_BYTES_PER_ROW; FieldStoreMerge_V (Dest, pO, pE, pInfo->LineLength); Dest += pInfo->OverlayPitch; pO += FS_BYTES_PER_ROW; } /* one more time but dup last line */ FieldStoreMerge_V (Dest, pE, pO, pInfo->LineLength); Dest += pInfo->OverlayPitch; FieldStoreMerge_V (Dest, pE, pO, pInfo->LineLength); } else { /* not vertical filter */ for (height = pInfo->FieldHeight; height > 0; --height) { FieldStoreMerge (Dest, pE, pE + 2 * sizeof (vu8), pInfo->LineLength); Dest += pInfo->OverlayPitch; pE += FS_BYTES_PER_ROW; FieldStoreMerge (Dest, pO, pO + 2 * sizeof (vu8), pInfo->LineLength); Dest += pInfo->OverlayPitch; pO += FS_BYTES_PER_ROW; } } vempty (); return TRUE; } /* Pulldown with vertical filter */ static BOOL PullDown_V (TDeinterlaceInfo * pInfo, BOOL SelectL2) { uint8_t *WeaveDest; /* dest for weave pixel */ uint8_t *CopyDest; /* other dest, copy or vertical filter */ const uint8_t *pL2; /* ptr into FieldStore[L2] */ const uint8_t *pFieldStoreBegin; const uint8_t *pFieldStoreEnd; long dL1; /* offset to FieldStore elem holding top known pixels */ long dL3; /* offset to FieldStore elem holding bottom known pxl */ long dL2; /* offset to FieldStore elem holding newest weave pixels */ long dCopySrc; unsigned int height; unsigned long dst_padding; unsigned long src_padding; pFieldStoreBegin = FieldStore; pFieldStoreEnd = pFieldStoreBegin + pInfo->FieldHeight * FS_BYTES_PER_ROW; /* set up pointers, offsets */ SIMD_NAME (SetFsPtrs)(&dL1, &dL2, &dL3, &dCopySrc, &CopyDest, &WeaveDest, pInfo); if (!SelectL2) { dL2 = FsPrevFrame (dL2); } pL2 = (const uint8_t *) FieldStore + dL2; dL1 -= dL2; /* now is signed offset from pL2 */ dL3 -= dL2; height = pInfo->FieldHeight; if (WeaveDest == pInfo->Overlay) { /* on first line may just copy first and last */ SIMD_NAME (FieldStoreCopy)(pInfo->Overlay, pFieldStoreBegin + dCopySrc, pInfo->LineLength); WeaveDest += pInfo->OverlayPitch * 2; /* CopyDest already OK */ pL2 += FS_BYTES_PER_ROW; --height; } dst_padding = pInfo->OverlayPitch * 2 - pInfo->LineLength; src_padding = FS_BYTES_PER_ROW - pInfo->LineLength * FS_FIELDS; for (; height > 0; --height) { unsigned int count; unsigned int l1o, l3o; l1o = dL1; l3o = dL3; if (pL2 + l1o < pFieldStoreBegin) l1o = l3o; /* first line */ if (pL2 + l3o >= pFieldStoreEnd) l3o = l1o; /* last line */ for (count = pInfo->LineLength / sizeof (vu8); count > 0; --count) { vu8 l1, l2, l3; l1 = vload (pL2, l1o); l2 = vload (pL2, 0); l3 = vload (pL2, l3o); vstorent (CopyDest, 0, fast_vavgu8 (l1, l2)); vstorent (WeaveDest, 0, fast_vavgu8 (l2, l3)); CopyDest += sizeof (vu8); WeaveDest += sizeof (vu8); pL2 += FS_FIELDS * sizeof (vu8); } WeaveDest += dst_padding; CopyDest += dst_padding; pL2 += src_padding; } vempty (); return TRUE; } static always_inline vu16 min255_sru6_u16 (vu16 mm0) { #if SIMD & (CPU_FEATURE_MMX | CPU_FEATURE_3DNOW) /* Faster emulation of vminu16 when one arg is const. */ return vminu16i (vsru16 (mm0, 6), 255); #elif SIMD & (CPU_FEATURE_SSE_INT | CPU_FEATURE_SSE2 | CPU_FEATURE_SSE3) /* Has no vminu16 but vmin16 is safe here. */ return (vu16) vmin16 (vsru16 (mm0, 6), vsplatu16_255); #elif SIMD == CPU_FEATURE_ALTIVEC return vec_min (vsru16 (mm0, 6), vsplatu16_255); #else # error Unknown SIMD ISA. return vzerou8 (); #endif } /* see comments in PullDown_VSharp() above */ static void PullDown_VSharp2 (uint8_t * dst, const uint8_t * src1, const uint8_t * src2, unsigned int n_bytes, v16 QA, v16 QB, v16 QC, int C) { vu8 Zi, Zj, Zk, Zl, Zm; vu16 mm0, mm1, mm2; unsigned int count; if (0 != C) { for (count = n_bytes / sizeof (vu8); count > 0; --count) { Zi = vload (src1, -FS_BYTES_PER_ROW); Zj = vload (src2, 0); Zk = vload (src1, 0); Zl = vload (src2, +FS_BYTES_PER_ROW); Zm = vload (src1, +FS_BYTES_PER_ROW); src1 += FS_FIELDS * sizeof (vu8); src2 += FS_FIELDS * sizeof (vu8); mm0 = (vu16) vmullo16 (yuyv2yy (Zk), QA); mm1 = (vu16) vmullo16 (yuyv2yy (fast_vavgu8 (Zj, Zl)), QB); mm2 = (vu16) vmullo16 (yuyv2yy (fast_vavgu8 (Zi, Zm)), QC); mm0 = vsubsu16 (mm0, vsubsu16 (mm1, mm2)); /* sub */ mm0 = min255_sru6_u16 (mm0); vstorent (dst, 0, recombine_yuyv (mm0, Zk)); dst += sizeof (vu8); } } else { for (count = n_bytes / sizeof (vu8); count > 0; --count) { Zj = vload (src2, 0); Zk = vload (src1, 0); Zl = vload (src2, +FS_BYTES_PER_ROW); src1 += FS_FIELDS * sizeof (vu8); src2 += FS_FIELDS * sizeof (vu8); mm0 = (vu16) vmullo16 (yuyv2yy (Zk), QA); mm1 = (vu16) vmullo16 (yuyv2yy (fast_vavgu8 (Zj, Zl)), QB); mm0 = min255_sru6_u16 (vsubsu16 (mm0, mm1)); vstorent (dst, 0, recombine_yuyv (mm0, Zk)); dst += sizeof (vu8); } } vempty (); } /* see comments in PullDown_VSharp() above */ static void PullDown_VSoft2 (uint8_t * dst, const uint8_t * src1, const uint8_t * src2, unsigned int n_bytes, v16 QA, v16 QB, v16 QC, int C) { vu8 Zi, Zj, Zk, Zl, Zm; vu16 mm0, mm1, mm2; unsigned int count; if (0 != C) { for (count = n_bytes / sizeof (vu8); count > 0; --count) { Zi = vload (src1, -FS_BYTES_PER_ROW); Zj = vload (src2, 0); Zk = vload (src1, 0); Zl = vload (src2, +FS_BYTES_PER_ROW); Zm = vload (src1, +FS_BYTES_PER_ROW); src1 += FS_FIELDS * sizeof (vu8); src2 += FS_FIELDS * sizeof (vu8); mm0 = vmullo16 (yuyv2yy (Zk), QA); mm1 = vmullo16 (yuyv2yy (fast_vavgu8 (Zj, Zl)), QB); mm2 = vmullo16 (yuyv2yy (fast_vavgu8 (Zi, Zm)), QC); mm0 = vaddsu16 (mm0, vaddsu16 (mm1, mm2)); /* add */ mm0 = min255_sru6_u16 (mm0); vstorent (dst, 0, recombine_yuyv (mm0, Zk)); dst += sizeof (vu8); } } else { for (count = n_bytes / sizeof (vu8); count > 0; --count) { Zj = vload (src2, 0); Zk = vload (src1, 0); Zl = vload (src2, +FS_BYTES_PER_ROW); src1 += FS_FIELDS * sizeof (vu8); src2 += FS_FIELDS * sizeof (vu8); mm0 = vmullo16 (yuyv2yy (Zk), QA); mm1 = vmullo16 (yuyv2yy (fast_vavgu8 (Zj, Zl)), QB); mm0 = vaddsu16 (mm0, mm1); mm0 = min255_sru6_u16 (mm0); vstorent (dst, 0, recombine_yuyv (mm0, Zk)); dst += sizeof (vu8); } } vempty (); } /* Add new Vertical Edge Enhancement optimized to reverse previous vertical filtering */ /* Assume that someone vertically filtered the video for interlace using a simple center weighted moving average, creating new pixels Z[k] from old pixels X[k] using a weighting factor w (0 < w < 1, w close to 1). Then we might be seeing: 1) Z[k] = w X[k] + .5 (1-w) (X[k-1] + X[k+1]) useful abbrevs to avoid typing: Z[k-2] == Zi, X[k-2] == Xi Z[k-1] == Zj, etc Z[k] == Zk, X[k] == Xk Z[k+1] == Zl, etc Z[k+2] == Zm, etc Q == .5 (1-w) / w, will need later # Q = .5 w=.5 so: 2) Zk = w Xk + .5 (1-w) (Xj + Xl) # Zk = .5 3 + .5 .5 (2 +2) = 2.5 But, if we wanted to solve for Xk 3) Xk = [ Zk - .5 (1-w) (Xj + Xl) ] / w # (2.5 - .25 (2+2))) / .5 = 3 4) Xk = Zk / w - Q (Xj + Xl) # 2.5 / .5 - .5 (2+2) = 3 5) Xj = Zj / w - Q (Xi + Xk) # 2 / .5 - .5 (1+3) = 2 6) Xl = Zl / w - Q (Xk + Xm) # 2 / .5 - .5 (3+1) = 2 and substituting for Xj and Xl in 4) from 5) and 6) 7) Xk = Zk / w - Q [ Zj / w - Q (Xi + Xk) + Zl / w - Q (Xk + Xm) ] # 2.5/.5 - .5 [2/.5 - .5(1+3) + 2/.5 - .5(3+1)] # 5 - .5[4 - 2 + 4 - 2] = 5 - .5[4] = 3 rearranging a bit 8) Xk = Zk / w - Q [ (Zj + Zl) / w - Q (Xi + Xm + 2 Xk) ] # 2.5/.5 - .5 [(2+2)/.5 - .5 (1 + 1 + 2 3)] # 5 - .5 [8 - .5 (8)] = 5 - .5 [4] = 3 9) Xk = Zk / w - Q (Zj + Zl) / w + Q^2 (Xi + Xm) + 2 Q^2 Xk # 2.5/.5 - .5 (2+2)/.5 + .25 (1+1) + 2 .25 3 # 5 - 4 + .5 + 1.5 = 3 moving all Xk terms to the left 10) (1 - 2 Q^2) Xk = Zk / w - Q (Zj + Zl) / w + Q^2 (Xi + Xm) # (1 - 2 .25)3 = 2.5/.5 - .5(2+2)/.5 + .25(1+1) # (.5)3 = 5 - 4 + .5 11) Xk = [ Zk / w - Q (Zj + Zl) / w + Q^2 (Xi + Xm) ] / (1 - 2 Q^2) # [2.5/.5 - .5(2+2)/.5 + .25(1+1)] / (1 - 2 .25) # [5 - 4 + .5] / .5 = 1.5/.5 = 3 12) Xk = Zk - Q (Zj + Zl) + w Q^2 (Xi + Xm) --------------------------------- w (1 - 2 Q^2) # [2.5 - .5(2+2) + .5 .25 (1+1)] / [.5 (1 - 2 .25)} # [2.5 - 2 + .25] / .5 (.5) # .75 / .25 = 3 but we'd like it in this form 13) Xk = A Zk - B avg(Zj,Zl) + C avg(Xi,Xm) where: 14) A = 1 / [w (1 - 2 Q^2)] # 1 / [.5 (1 - 2 .25)] = 1 / (.5 .5) = 4 15) B = 2 Q / [w (1 - 2 Q^2)] # 2 .5 / [.5 (1 - 2 .25)] = 1 / .25 = 4 16( C = 2 Q^2 / [1 - 2 Q^2] # 2 .25 / [1 - 2 .25] = .5 / .5 = 1 # from 13) 3 = 4 2.5 - 4 2 + 1 1 = 10 - 8 + 1 = 3 Note we still don't know the orig values of Xi but we are out of patience, CPU, and math ability so we just assume Xi=Zi for the remaining terms. Hopefully it will be close. */ static BOOL PullDown_VSharp (TDeinterlaceInfo * pInfo, BOOL SelectL2) { v16 QA; v16 QB; v16 QC; uint8_t *WeaveDest; /* dest for weave pixel */ uint8_t *CopyDest; /* other dest, copy or vertical filter */ const uint8_t *pFieldStore; const uint8_t *Src1; const uint8_t *Src2; long dL1; /* offset to FieldStore elem holding top known pixels */ long dL3; /* offset to FieldStore elem holding bottom known pxl */ long dL2; /* offset to FieldStore elem holding newest weave pixels */ long dCopySrc; unsigned int height; unsigned long dst2_offs; unsigned long src2_offs; int w = (GreedyVSharpnessAmt > 0) /* note-adj down for overflow */ /* overflow, use 38%, 0LineLength); SIMD_NAME (FieldStoreCopy)(WeaveDest, pFieldStore + dL2, pInfo->LineLength); { unsigned int last_row; last_row = pInfo->FieldHeight - 1; dst2_offs = 2 * last_row * pInfo->OverlayPitch; src2_offs = last_row * FS_BYTES_PER_ROW; } SIMD_NAME (FieldStoreCopy)(CopyDest + dst2_offs, pFieldStore + dCopySrc + src2_offs, pInfo->LineLength); SIMD_NAME (FieldStoreCopy)(WeaveDest + dst2_offs, pFieldStore + dL2 + src2_offs, pInfo->LineLength); CopyDest += 2 * pInfo->OverlayPitch; WeaveDest += 2 * pInfo->OverlayPitch; if (CopyDest < WeaveDest) { Src2 = pFieldStore + dCopySrc + FS_BYTES_PER_ROW; Src1 = pFieldStore + dL2; } else { Src2 = pFieldStore + dL2 + FS_BYTES_PER_ROW; Src1 = pFieldStore + dCopySrc; CopyDest = WeaveDest; } QA = vsplat16 (A); QC = vsplat16 (C); if (B < 0) { int MB = -B; QB = vsplat16 (MB); for (height = pInfo->FieldHeight - 2; height > 0; --height) { PullDown_VSoft2 (CopyDest, Src1, Src2, pInfo->LineLength, QA, QB, QC, C); CopyDest += pInfo->OverlayPitch; Src1 += FS_BYTES_PER_ROW; PullDown_VSoft2 (CopyDest, Src2, Src1, pInfo->LineLength, QA, QB, QC, C); CopyDest += pInfo->OverlayPitch; Src2 += FS_BYTES_PER_ROW; } } else { QB = vsplat16 (B); for (height = pInfo->FieldHeight - 2; height > 0; --height) { PullDown_VSharp2 (CopyDest, Src1, Src2, pInfo->LineLength, QA, QB, QC, C); CopyDest += pInfo->OverlayPitch; Src1 += FS_BYTES_PER_ROW; PullDown_VSharp2 (CopyDest, Src2, Src1, pInfo->LineLength, QA, QB, QC, C); CopyDest += pInfo->OverlayPitch; Src2 += FS_BYTES_PER_ROW; } } vempty (); return TRUE; } static const int PdMask2 = 0x0F * 0x21; /* 0b01111 x 2 */ static const int PdMask32 = 0x0F * 0x108421; /* 0b01111 x 5 */ static const int PdMerge2 = 0x05 * 0x21; /* 0b00101 x 2 */ static const int Pd32Pattern = 0x05 * 0x108421; /* 0b00101 x 5 */ static const int PdMask2b = 0x1B * 0x21; /* 0b11011 x 2 */ static const int PdMerge2b = 0x09 * 0x21; /* 0b01001 x 2 */ static always_inline int is_3_2_pattern (int flags) { return (((Pd32Pattern >> 0) == (flags & (PdMask32 >> 0))) | ((Pd32Pattern >> 1) == (flags & (PdMask32 >> 1))) | ((Pd32Pattern >> 2) == (flags & (PdMask32 >> 2))) | ((Pd32Pattern >> 3) == (flags & (PdMask32 >> 3))) | ((Pd32Pattern >> 4) == (flags & (PdMask32 >> 4)))); } static always_inline int is_2_2_pattern (int flags) { flags &= 0xFFFFF; return ((0x55555 == flags) | (0xAAAAA == flags)); } /* check if we should do pulldown, doit */ BOOL SIMD_NAME (CanDoPulldown) (TDeinterlaceInfo * pInfo) { int hPtr = (HistPtr + 20 - FsDelay) % 20; /* curr HistPtr adj for delay*/ int hPtrb = (HistPtr + 20 - 1) % 20; /* curr HistPtr delay 1 */ int FlagsW = Hist[hPtrb].Flags; if (!GreedyUsePulldown || Hist[hPtr].AvgChoice == 0 || Hist[hPtr].Avg == 0) { Hist[hPtr].Flags2 |= PD_VIDEO; /* flag did video, not pulldown */ return FALSE; } /* If Greedy Matching doesn't help enough or this field comb raises avg too much then no good. */ if (Hist[hPtr].Motion < GreedyLowMotionPdLvl * 10) { /* flag did pulldown due to low motion */ Hist[hPtr].Flags2 |= PD_LOW_MOTION; } else if (is_3_2_pattern (FlagsW)) { /* flag found 20 bit 3:2 pulldown pattern */ Hist[hPtr].Flags2 |= PD_32_PULLDOWN; } else if (0 && is_2_2_pattern (FlagsW)) { /* temp removed until it works better */ /* flag found 20 bit 2:2 pulldown pattern */ Hist[hPtr].Flags2 |= PD_22_PULLDOWN; } else if (1000 * Hist[hPtr].Avg < GreedyGoodPullDownLvl * PDAVGLEN * Hist[hPtr].Comb) { /* flag did video, not pulldown */ Hist[hPtr].Flags2 |= PD_VIDEO; return FALSE; } /* if (Hist[hPtr].CombChoice * PDAVGLEN * 100 > Hist[hPtr].AvgChoice * GreedyBadPullDownLvl) */ if (Hist[hPtr].CombChoice * 100 > Hist[hPtr].Kontrast * GreedyBadPullDownLvl) { /* flag bad pulldown, did video */ Hist[hPtr].Flags2 |= PD_BAD | PD_VIDEO; return FALSE; } /* We can do some sort of pulldown */ Hist[hPtr].Flags2 |= PD_PULLDOWN; /* trb 11/15/01 add new Inverse Filtering */ if (GreedyUseVSharpness && GreedyVSharpnessAmt) { /* Heck with it. Do old cheaper way for -100, gimmick */ if (GreedyVSharpnessAmt == -100) { return PullDown_V (pInfo, Hist[hPtr].Flags & 1); } else { return PullDown_VSharp (pInfo, Hist[hPtr].Flags & 1); } } if (GreedyUseInBetween) { /* for FsDelay == 2 do inbetween for (delay 1) flags 01x0101x01 pattern only */ if (FsDelay == 2) { if ((Hist[hPtrb].Flags & PdMask2b) == PdMerge2b) { Hist[hPtr].Flags2 |= PD_MERGED; return PullDown_InBetween (pInfo); } } else { /* for FsDelay == 1 do inbetween for flags x0101x0101 pattern only */ if ((Hist[hPtr].Flags & PdMask2) == PdMerge2) { Hist[hPtr].Flags2 |= PD_MERGED; return PullDown_InBetween (pInfo); } } } /* OK, do simple pulldown */ { uint8_t *WeaveDest; /* dest for weave pixel */ uint8_t *CopyDest; /* other dest, copy or vertical filter */ const uint8_t *pL2; /* ptr into FieldStore[L2] */ const uint8_t *pCS; /* ptr into FieldStore[CopySrc] */ long dL1; /* offset to FieldStore elem holding top known pixels */ long dL3; /* offset to FieldStore elem holding bottom known pxl */ long dL2; /* offset to FieldStore elem holding newest weave pixels */ long dCopySrc; unsigned int height; unsigned long dst_padding; unsigned long src_padding; /* set up pointers, offsets */ SIMD_NAME (SetFsPtrs)(&dL1, &dL2, &dL3, &dCopySrc, &CopyDest, &WeaveDest, pInfo); /* chk forward/backward Greedy Choice Flag for this field */ if (!(Hist[hPtr].Flags & 1)) { dL2 = FsPrevFrame (dL2); } pL2 = (const uint8_t *) FieldStore + dL2; pCS = (const uint8_t *) FieldStore + dCopySrc; dst_padding = 2 * pInfo->OverlayPitch; src_padding = FS_BYTES_PER_ROW; for (height = pInfo->FieldHeight; height > 0; --height) { SIMD_NAME (FieldStoreCopy)(CopyDest, pCS, pInfo->LineLength); CopyDest += dst_padding; pCS += src_padding; SIMD_NAME (FieldStoreCopy)(WeaveDest, pL2, pInfo->LineLength); WeaveDest += dst_padding; pL2 += src_padding; } } vempty (); return TRUE; } #endif /* SIMD */ /* Local Variables: c-basic-offset: 4 End: */ zapping-0.10cvs6/plugins/deinterlace/DI_GreedyH/DI_GreedyHF.c 644 764 144 13164 10260117034 17044 /*/////////////////////////////////////////////////////////////////////////// // $Id: DI_GreedyHF.c,v 1.2 2005/06/28 00:47:24 mschimek Exp $ ///////////////////////////////////////////////////////////////////////////// // Copyright (c) 2001 Tom Barry. All rights reserved. // Copyright (C) 2005 Michael H. Schimek ///////////////////////////////////////////////////////////////////////////// // // This file is subject to the terms of the GNU General Public License as // published by the Free Software Foundation. A copy of this license is // included with this software distribution in the file COPYING. If you // do not have a copy, you may obtain a copy by writing to the Free // Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. // // This software 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 // ///////////////////////////////////////////////////////////////////////////// // Change Log // // Date Developer Changes // // 01 Feb 2001 Tom Barry New Greedy (High Motion) // Deinterlace method // // 29 Jul 2001 Tom Barry Move CPU dependent code to // DI_GreedyHF.asm // ///////////////////////////////////////////////////////////////////////////// // CVS Log // // $Log: DI_GreedyHF.c,v $ // Revision 1.2 2005/06/28 00:47:24 mschimek // Converted to vector intrinsics. Added support for 3DNow, SSE2, x86-64 // and AltiVec. Removed ununsed DScaler code. Cleaned up. All options work // now. // // Revision 1.1.2.3 2005/06/17 02:54:20 mschimek // *** empty log message *** // // Revision 1.1.2.2 2005/05/31 02:40:34 mschimek // *** empty log message *** // // Revision 1.1.2.1 2005/05/05 09:46:00 mschimek // *** empty log message *** // // Revision 1.1 2005/01/08 14:54:23 mschimek // *** empty log message *** // // Revision 1.6 2001/07/30 21:50:32 trbarry // Use weave chroma for reduced chroma jitter. Fix DJR bug again. // Turn off Greedy Pulldown default. // // Revision 1.5 2001/07/30 18:18:59 trbarry // Fix new DJR bug // // Revision 1.4 2001/07/30 17:56:26 trbarry // Add Greedy High Motion MMX, K6-II, K6-III, and Celeron support. // Tweak defaults. // // Revision 1.3 2001/07/28 18:47:24 trbarry // Fix Sharpness with Median Filter // Increase Sharpness default to make obvious // Adjust deinterlace defaults for less jitter // // Revision 1.2 2001/07/25 12:04:31 adcockj // Moved Control stuff into DS_Control.h // Added $Id and $Log to comment blocks as per standards // ///////////////////////////////////////////////////////////////////////////*/ /* This is the first version of the Greedy High Motion Deinterlace method I wrote (and kept). It doesn't have many of the fancier options but I left it in because it's faster. It runs with a field delay of 1 in a single pass with no call needed to UpdateFieldStore. It will be called if no special options are needed. The logic is somewhat different than the other rtns. TRB 7/2001 This version has been modified to be compatible with other DScaler functions such as Auto Pulldown. It will now automatically be call if none of the UI check boxes are check and also if we are not running on an SSE capable machine (Athlon, Duron, P-III, fast Celeron). */ #include "windows.h" #include "DS_Deinterlace.h" #include "DI_GreedyHM.h" BOOL SIMD_NAME (DI_GreedyHF) (TDeinterlaceInfo * pInfo) { vu8 MaxCombW; vu8 MotionThresholdW; v16 MotionSenseW; uint8_t *Dest; const uint8_t *F2; const uint8_t *F3; const uint8_t *F4; unsigned int byte_width; unsigned int height; unsigned long dst_bpl; unsigned long src_bpl; MaxCombW = vsplatu8 (GreedyHMaxComb); /* In a saturated subtraction UVMask (255) clears the u, v bytes. */ MotionThresholdW = (vu8) vor ((v16) vsplat8 (GreedyMotionThreshold), UVMask); MotionSenseW = vsplat16 (GreedyMotionSense); byte_width = pInfo->LineLength; height = pInfo->FieldHeight; dst_bpl = pInfo->OverlayPitch; src_bpl = pInfo->InputPitch; /* dest src odd src even 0 F3.0 F4.0 1 { weave.0 (F4.n + F2.n + F3.n + F3.n+1) F3.0 2 { F3.1 weave.1 (F4.n + F2.n + F3.n-1 + F3.n) } 3 weave.1 F3.1 } 4 F3.2 weave.2 h-3 weave.h/2-2 F3.h/2-2 h-2 F3.h/2-1 weave.h/2-1 h-1 F4.h/2-1 F3.h/2-1 F4 this field F3 previous field, opposite parity F2 previous field, same parity F1 previous field, opposite parity h frame height */ Dest = (uint8_t *) pInfo->Overlay; F4 = (const uint8_t *) pInfo->PictureHistory[0]->pData; F3 = (const uint8_t *) pInfo->PictureHistory[1]->pData; F2 = (const uint8_t *) pInfo->PictureHistory[2]->pData; if (pInfo->PictureHistory[0]->Flags & PICTURE_INTERLACED_EVEN) { copy_line (Dest, F4, byte_width); Dest += dst_bpl; F4 += src_bpl; F2 += src_bpl; } copy_line (Dest, F3, byte_width); Dest += dst_bpl; for (height = pInfo->FieldHeight - 1; height > 0; --height) { GreedyHXCore (Dest, /* Curr */ F4, /* Above */ F3, /* Prev */ F2, byte_width, dst_bpl, src_bpl, /* src_incr */ sizeof (vu8), MaxCombW, MotionThresholdW, MotionSenseW, STORE_WEAVE_BELOW); Dest += dst_bpl * 2; F4 += src_bpl; F3 += src_bpl; F2 += src_bpl; } if (pInfo->PictureHistory[0]->Flags & PICTURE_INTERLACED_ODD) { copy_line (Dest, F4, byte_width); } vempty (); return TRUE; } /* Local Variables: c-basic-offset: 4 End: */ zapping-0.10cvs6/plugins/deinterlace/DI_GreedyH/DI_GreedyHM.c 644 764 144 55200 10417055632 17061 /*/////////////////////////////////////////////////////////////////////////// // $Id: DI_GreedyHM.c,v 1.3 2006/04/12 01:44:58 mschimek Exp $ ///////////////////////////////////////////////////////////////////////////// // Copyright (c) 2001 Tom Barry. All rights reserved. // Copyright (C) 2005 Michael H. Schimek ///////////////////////////////////////////////////////////////////////////// // // This file is subject to the terms of the GNU General Public License as // published by the Free Software Foundation. A copy of this license is // included with this software distribution in the file COPYING. If you // do not have a copy, you may obtain a copy by writing to the Free // Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. // // This software 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 ///////////////////////////////////////////////////////////////////////////// // Change Log // // Date Developer Changes // // 01 Feb 2001 Tom Barry New Greedy (High Motion) // Deinterlace method // ///////////////////////////////////////////////////////////////////////////// // CVS Log // // $Log: DI_GreedyHM.c,v $ // Revision 1.3 2006/04/12 01:44:58 mschimek // s/CPU_FEATURE_SSE/CPU_FEATURE_SSE_INT. // // Revision 1.2 2005/06/28 00:47:01 mschimek // Converted to vector intrinsics. Added support for 3DNow, SSE2, x86-64 // and AltiVec. Removed ununsed DScaler code. Cleaned up. All options work // now. // // Revision 1.1.2.4 2005/05/31 02:40:34 mschimek // *** empty log message *** // // Revision 1.1.2.3 2005/05/20 05:45:14 mschimek // *** empty log message *** // // Revision 1.1.2.2 2005/05/17 19:58:32 mschimek // *** empty log message *** // // Revision 1.1.2.1 2005/05/05 09:46:00 mschimek // *** empty log message *** // // Revision 1.1 2005/01/08 14:54:23 mschimek // *** empty log message *** // // Revision 1.10 2001/11/25 04:33:37 trbarry // Fix for TDeinterlace_Info. Also release UN-Filter code, 5-tap V & H // sharp/soft filters optimized to reverse excessive filtering (or EE?) // // Revision 1.9 2001/10/02 17:44:41 trbarry // Changes to be compatible with the Avisynth filter version // // Revision 1.8 2001/08/19 06:26:38 trbarry // Remove Greedy HM Low Motion Only option and files // // No longer needed // // Revision 1.7 2001/08/17 16:18:35 trbarry // Minor GreedyH performance Enh. // Only do pulldown calc when needed. // Will become more needed in future when calc more expensive. // // Revision 1.6 2001/08/01 00:37:41 trbarry // More chroma jitter fixes, tweak defaults // // Revision 1.5 2001/07/30 21:50:32 trbarry // Use weave chroma for reduced chroma jitter. Fix DJR bug again. // Turn off Greedy Pulldown default. // // Revision 1.4 2001/07/30 17:56:26 trbarry // Add Greedy High Motion MMX, K6-II, K6-III, and Celeron support. // Tweak defaults. // // Revision 1.3 2001/07/28 18:47:24 trbarry // Fix Sharpness with Median Filter // Increase Sharpness default to make obvious // Adjust deinterlace defaults for less jitter // // Revision 1.2 2001/07/25 12:04:31 adcockj // Moved Control stuff into DS_Control.h // Added $Id and $Log to comment blocks as per standards // ///////////////////////////////////////////////////////////////////////////*/ #include "windows.h" #include "DI_GreedyHM.h" #if !SIMD /* Note - actual default values below may be set in DI_GreedyHSETTINGS */ int GreedyHMaxComb = 5; /* max comb we allow past clip */ int GreedyMotionThreshold = 25; /* ignore changes < this */ int GreedyMotionSense = 30; /* how rapidly to bob when > Threshold */ int GreedyGoodPullDownLvl = 83; /* Best Comb avg / Comb Avg must be < thes */ /* No Pulldown if field comb / Best avg comb > this */ int GreedyBadPullDownLvl = 88; int GreedyHSharpnessAmt = 50; /* % H. sharpness to add or filter */ int GreedyVSharpnessAmt = 23; /* % V. sharpness to add or filter */ int GreedyMedianFilterAmt = 3; /* Don't filter if > this */ int GreedyLowMotionPdLvl = 9; /* Do PullDown on if motion < this */ BOOL GreedyUsePulldown = FALSE; BOOL GreedyUseInBetween = FALSE; BOOL GreedyUseMedianFilter = FALSE; BOOL GreedyUseVSharpness = FALSE; BOOL GreedyUseHSharpness = FALSE; BOOL GreedyTestMode = FALSE; /* Input video data is first copied to the FieldStore array, possibly doing edge enhancement and median filtering. Field store is layed out to improve register usage and cache performace during further deinterlace processing. Hopefully we will gain enough using it to make up for the cost of filling it in column order. Note array transposed (1000 cols, 240 rows, 1000 cols) */ uint8_t FieldStore[FS_SIZE]; unsigned int FsPtr = 0; unsigned int FsDelay = 1; #else /* SIMD */ /* return FS subscripts depending on delay (L2P not returned as that is always L2 ^ 2). */ BOOL SIMD_NAME (SetFsPtrs) (long * dL1, long * dL2, long * dL3, long * dCopySrc, uint8_t ** CopyDest, uint8_t ** WeaveDest, TDeinterlaceInfo * pInfo) { if (2 == FsDelay) { if (pInfo->PictureHistory[0]->Flags & PICTURE_INTERLACED_ODD) { /* Assume here we are doing median filtering so we are delaying by 2 fields. When we are doing Median filter we have to delay the display by 2 fields so at Time=5 we are displaying a screen for Time=3, For ODD fields we display an odd field and have the following, representing part of 1 column on the screen when Line=0, Time = 5, and W = the weave pixel we want to calc: Row Fields (at Time=1..5) Just got odd field 5, display odd frame 3 --- -------------------- 1 2 3 4 5 -1 . . L1 . x Not really any -1 row but we pretend at first 0 . L2P W L2 . We create the W pixel somehow, FsPtrP will point L2 1 . . L3 . x Odd Rows directly copied, FsPtrP2 will point to L3 */ /* The newest weave pixel */ *dL2 = ((FsPtr - 1) % 4) * sizeof (vu8); /* Bottom curr pixel offset is prev odd pixel */ *dL3 = *dL2 ^ (2 * sizeof (vu8)); /* Always copy from prev pixels */ *dCopySrc = *dL3; /* Top curr pixel offset, tricked on 1st line */ *dL1 = *dL3 - FS_BYTES_PER_ROW; *WeaveDest = pInfo->Overlay; /* where the weave pixel goes */ /* Dest for copy or vert filter pixel pixel */ *CopyDest = (uint8_t *) pInfo->Overlay + pInfo->OverlayPitch; } else { /* Row Fields (at Time=1..5) Just got even frame 4, display even frame 2 --- -------------------- 1 2 3 4 5 0 . L1 . x . Even Rows are directly copied, FsPtrP2 will point L1 1 L2P W L2 . . We create the W pixel somehow, FsPtrP will point L2 2 . L3 . x . Even Rows directly copied for Even fields */ /* The newest weave pixel */ *dL2 = ((FsPtr - 1) % 4) * sizeof (vu8); /* Top curr pixel subscript */ *dL1 = *dL2 ^ (2 * sizeof (vu8)); /* Always copy from prev pixels */ *dCopySrc = *dL1; /* Bottom curr pixel subscript, tricked on last line */ *dL3 = *dL1 + FS_BYTES_PER_ROW; /* Dest for weave pixel */ *WeaveDest = (uint8_t *) pInfo->Overlay + pInfo->OverlayPitch; /* Dest for copy or vert filter pixel pixel */ *CopyDest = pInfo->Overlay; } } else { /* Assume FsDelay = 1; */ if (pInfo->PictureHistory[0]->Flags & PICTURE_INTERLACED_ODD) { /* Assume here we are not doing median filtering so we are delaying only one field. When we are not doing Median filter we have to delay the display by 1 fields so at Time=5 we are displaying a screen for Time=4, For ODD fields we display an even field and have the following, representing part of 1 column on the screen when Line=0, Time = 5, and W = the weave pixel we want to calc: Row Fields (at Time=1..5) Just got odd frame 5, display even frame 4 --- -------------------- 1 2 3 4 5 0 x . L1 . Even Rows are directly copied, FsPtrP will point L1 1 L2P W L2 We create the W pixel somehow, PsPtr will point L2 2 x . L3 . Even Rows directly copied for Odd fields Note L3 not on last line, L1 used twice there */ /* The newest weave pixel */ *dL2 = FsPtr * sizeof (vu8); /* Top curr pixel subscript */ *dL1 = ((FsPtr - 1) % 4) * sizeof (vu8); /* Always copy from prev pixels */ *dCopySrc = *dL1; /* Bottom curr pixel subscript, tricked on last line */ *dL3 = *dL1 + FS_BYTES_PER_ROW; /* Dest for weave pixel */ *WeaveDest = (uint8_t *) pInfo->Overlay + pInfo->OverlayPitch; /* Dest for copy or vert filter pixel pixel */ *CopyDest = pInfo->Overlay; } else { /* Row Fields (at Time=1..5) Just got even frame 4, display odd frame 3 --- -------------------- 1 2 3 4 5 -1 L1 Not really any -1 row but we pretend at first 0 L2P W L2 We create the W pixel somehow, PsPtr will point to L2 1 L3 Odd Rows directly copied, FsPtrP will point to L3 */ /* The newest weave pixel */ *dL2 = FsPtr * sizeof (vu8); /* Bottom curr pixel offset is prev odd pixel */ *dL3 = ((FsPtr - 1) % 4) * sizeof (vu8); /* Always copy from prev pixels */ *dCopySrc = *dL3; /* Top curr pixel offset, tricked on 1st line */ *dL1 = *dL3 - FS_BYTES_PER_ROW; *WeaveDest = pInfo->Overlay; /* Dest for copy or vert filter pixel pixel */ *CopyDest = (uint8_t *) pInfo->Overlay + pInfo->OverlayPitch; } } return TRUE; } typedef union { vu32 v[2]; uint32_t a[2 * sizeof (vu32) / sizeof (uint32_t)]; } pd_sum_union; static always_inline void pulldown_sum (pd_sum_union * sum, vu8 prev, vu8 new, vu8 prev_next_row, vu8 prev2) { #if SIMD & (CPU_FEATURE_MMX | CPU_FEATURE_3DNOW) v16 prev_y, new_y; v16 comb, contr, motion; prev_y = yuyv2yy (prev); new_y = yuyv2yy (new); comb = vabsdiffu8 (prev_y, new_y); contr = vabsdiffu8 (prev_y, yuyv2yy (prev_next_row)); /* Adds high and low halves and combines to { contr, comb, contr, comb }. */ comb = vadd16 (vunpacklo16 (comb, contr), vunpackhi16 (comb, contr)); /* Adds high and low halves to { x, x, contr, comb }. */ comb = vadd16 (comb, vsru (comb, 32)); /* Extends low half to v32 and sums to { contr, comb }. */ sum->v[0] = vadd32 (sum->v[0], vunpacklo16 (comb, vzero16 ())); motion = vabsdiffu8 (new_y, yuyv2yy (prev2)); motion = vadd16 (motion, vsru (motion, 32)); /* Sums to { motion, motion }. */ sum->v[1] = vadd32 (sum->v[1], vunpacklo16 (motion, vzero16 ())); #elif SIMD == CPU_FEATURE_SSE_INT v16 prev_y, new_y; v32 comb, contr, motion; prev_y = yuyv2yy (prev); new_y = yuyv2yy (new); /* XXX wasting cycles because half the bytes are zero... */ comb = _mm_sad_pu8 (prev_y, new_y); contr = _mm_sad_pu8 (prev_y, yuyv2yy (prev_next_row)); /* Pixels from previous field, same row & col. */ motion = _mm_sad_pu8 (new_y, yuyv2yy (prev2)); /* Sums to { contr, comb }, { 0, motion }. */ sum->v[0] = vadd32 (sum->v[0], vunpacklo32 (comb, contr)); sum->v[1] = vadd32 (sum->v[1], motion); #elif SIMD & (CPU_FEATURE_SSE2 | CPU_FEATURE_SSE3) v16 prev_y, new_y; v32 comb, contr, motion; prev_y = yuyv2yy (prev); new_y = yuyv2yy (new); /* Yields { 0, comb, 0, comb }. */ comb = _mm_sad_epu8 (prev_y, new_y); contr = _mm_sad_epu8 (prev_y, yuyv2yy (prev_next_row)); /* Combine to { contr, comb, contr, comb }. */ comb = vor (comb, vsl (contr, 32)); /* Add high and low halves to { x, x, contr, comb }. */ comb = vadd32 (comb, vsru (comb, 64)); /* Yields { 0, motion, 0, motion }. */ motion = _mm_sad_epu8 (new_y, yuyv2yy (prev2)); /* { x, x, 0, motion } */ motion = vadd32 (motion, vsru (motion, 64)); /* Sums up to { 0, motion, contr, comb }, hopefully in a register. */ sum->v[0] = vadd32 (sum->v[0], vunpacklo64 (comb, motion)); #elif SIMD == CPU_FEATURE_ALTIVEC /* Note AVec is big endian (0xY0UaY1Va) and we compare Y values only. */ const vu8 sel1 = { 0x00, 0x02, 0x04, 0x06, 0x00, 0x02, 0x04, 0x06, 0x08, 0x0A, 0x0C, 0x0E, 0x08, 0x0A, 0x0C, 0x0E }; const vu8 sel2 = { 0x00, 0x02, 0x04, 0x06, 0x10, 0x12, 0x14, 0x16, 0x08, 0x0A, 0x0C, 0x0E, 0x18, 0x1A, 0x1C, 0x1E }; vu8 t1, t2; /* comb = absdiff (prev, new); contr = absdiff (prev, prev_next_row); */ t1 = vec_perm (prev, prev, sel1); t2 = vec_perm (new, prev_next_row, sel2); t1 = vabsdiffu8 (t1, t2); /* This sums t[0 .. 3], t[4 ... 7], t[8 ... 11], t[12 ... 15] giving { comb, contr, comb, contr }, and does an additional vadd32() to sum->v[0]. */ sum->v[0] = vec_sum4s (t1, sum->v[0]); t1 = vabsdiffu8 (new, prev2); t1 = (vu8) vsru16 ((vu16) t1, 8); /* throw away uv */ /* Sums to { motion, motion, motion, motion }. */ sum->v[1] = vec_sum4s (t1, sum->v[1]); #endif } static always_inline vu8 median_filter (vu8 prev, vu8 old, vu8 new) { vu8 flt, min, max, diff; vminmaxu8 (&min, &max, old, new); flt = vsatu8 (prev, min, max); /* decide if we want to use the filtered value, depending upon how much effect it has: absdiff (prev, flt) <= GMFA ? flt : prev */ diff = vabsdiffu8 (prev, flt); return vsel (vcmpleu8 (diff, (vu8) vsplat16 (GreedyMedianFilterAmt)), flt, prev); } static always_inline void loop_kernel (uint8_t ** fs, const uint8_t ** src, pd_sum_union * pd_sum, unsigned long FsPrev2, unsigned long FsPrev, unsigned long FsNewOld, unsigned int byte_width, v16 QHA, v16 QHB, v16 QHC, int use_sharpness, int use_softness, int use_pulldown, int use_median_filter) { if (use_sharpness) { int count; vu8 am, a0, a1; am = vzerou8 (); a0 = vload (*src, 0); for (count = byte_width / sizeof (vu8) - 1; count > 0; --count) { vu8 old, new, prev2, l, r; vu16 avg2, avg4, newy; a1 = vload (*src, sizeof (vu8)); last_column: /* get avg of -2 & +2 pixels */ vshiftu2x (&l, &r, am, a0, a1, 2); avg2 = vmullo16 (yuyv2yy (fast_vavgu8 (l, r)), QHB); /* get avg of -4 & +4 pixels */ vshiftu2x (&l, &r, am, a0, a1, 4); avg4 = vmullo16 (yuyv2yy (fast_vavgu8 (l, r)), QHC); /* get ratio of center pixel and combine */ newy = vmullo16 (yuyv2yy (a0), QHA); /* add in weighted average of Zj,Zl */ if (use_softness) newy = vaddsu16 (newy, vaddsu16 (avg2, avg4)); else newy = vsubsu16 (newy, vsubsu16 (avg2, avg4)); #if SIMD & (CPU_FEATURE_MMX | CPU_FEATURE_3DNOW) newy = vminu16i (vsru16 (newy, 6), 255); #elif SIMD == CPU_FEATURE_ALTIVEC newy = vec_min (vsru16 (newy, 6), vsplatu16_255); #else /* Should be vminu but vmin is ok. */ newy = vmin16 (vsru16 (newy, 6), vsplat16_255); #endif new = recombine_yuyv (newy, a0); am = a0; a0 = a1; old = vload (*fs, FsNewOld); /* save our sharp new value for next time */ vstore (*fs, FsNewOld, new); prev2 = vload (*fs, FsPrev2); if (use_pulldown) pulldown_sum (pd_sum, vload (*fs, FsPrev), new, vload (*fs, FsPrev + FS_BYTES_PER_ROW), prev2); if (use_median_filter) vstore (*fs, FsPrev2, median_filter (prev2, old, new)); *fs += FS_FIELDS * sizeof (vu8); *src += sizeof (vu8); } a1 = vzerou8 (); if (count >= 0) goto last_column; } else { unsigned int count; for (count = byte_width / sizeof (vu8); count > 0; --count) { vu8 old, new, prev2; /* no sharpness, just get curr value */ new = vload (*src, 0); old = vload (*fs, FsNewOld); /* save our sharp new value for next time */ vstore (*fs, FsNewOld, new); prev2 = vload (*fs, FsPrev2); if (use_pulldown) pulldown_sum (pd_sum, vload (*fs, FsPrev), new, vload (*fs, FsPrev + FS_BYTES_PER_ROW), prev2); if (use_median_filter) vstore (*fs, FsPrev2, median_filter (prev2, old, new)); *fs += FS_FIELDS * sizeof (vu8); *src += sizeof (vu8); } } } static always_inline BOOL DI_GrUpdtFS_template (TDeinterlaceInfo * pInfo, int use_sharpness, int use_softness, int use_pulldown, int use_median_filter) { pd_sum_union pd_sum; v16 QHA, QHB, QHC; uint8_t *fs; const uint8_t *src; unsigned long FsPrev2; unsigned long FsPrev; unsigned long FsNewOld; unsigned long fs_padding; unsigned long src_padding; unsigned int byte_width; unsigned int height; unsigned int skip; unsigned int end; if (NULL == pInfo->PictureHistory[0]->pData) return FALSE; { int w, Q, Q2, denom, A, B; /* For the math, see the comments on the PullDown_VSharp() function in the Pulldown code */ /* note-adj down for overflow */ if (GreedyHSharpnessAmt > 0) { /* overflow, use 38%, 0PictureHistory[0]->pData; /* MHS: FieldStore is organized as rows * (columns / gran) * fields * gran pixels, where gran = sizeof (vu8) / 2. */ /* Offset to prev pixel (this line) to be median filtered */ FsPrev2 = ((FsPtr - 1) % 4) * sizeof (vu8); /* FieldStore elem holding pixels from prev field line */ FsPrev = FsPtr * sizeof (vu8); FsPtr = (FsPtr + 1) % 4; /* NB this is a global */ /* Offset to Oldest odd pixel, will be replaced */ FsNewOld = FsPtr * sizeof (vu8); byte_width = pInfo->LineLength; fs_padding = FS_BYTES_PER_ROW - byte_width * FS_FIELDS; src_padding = pInfo->InputPitch - byte_width; height = pInfo->FieldHeight; skip = 0; end = 0; if (use_pulldown) { skip = height / 4; end = height - skip; } for (;;) { /* Don't collect pulldown data during first and last lines. */ for (; height > end; --height) { loop_kernel (&fs, &src, NULL, FsPrev2, FsPrev, FsNewOld, byte_width, QHA, QHB, QHC, use_sharpness, use_softness, /* use_pulldown */ FALSE, use_median_filter); fs += fs_padding; src += src_padding; } if (0 == height) break; pd_sum.v[0] = vzerou32 (); pd_sum.v[1] = vzerou32 (); for (; height > skip; --height) { loop_kernel (&fs, &src, &pd_sum, FsPrev2, FsPrev, FsNewOld, byte_width, QHA, QHB, QHC, use_sharpness, use_softness, /* use_pulldown */ TRUE, use_median_filter); fs += fs_padding; src += src_padding; } end = 0; } if (use_pulldown) { unsigned int scale; scale = (pInfo->FieldHeight - 2 * skip) * byte_width / 100; #if SIMD & (CPU_FEATURE_MMX | CPU_FEATURE_3DNOW) UpdatePulldown (pInfo, /* comb */ pd_sum.a[0] / scale, /* contrast */ pd_sum.a[1] / scale, /* motion */ (pd_sum.a[2] + pd_sum.a[3]) / scale); #elif SIMD & (CPU_FEATURE_SSE_INT | CPU_FEATURE_SSE2 | CPU_FEATURE_SSE3) UpdatePulldown (pInfo, /* comb */ pd_sum.a[0] / scale, /* contrast */ pd_sum.a[1] / scale, /* motion */ pd_sum.a[2] / scale); #elif SIMD == CPU_FEATURE_ALTIVEC /* motion + motion + motion + motion */ pd_sum.v[1] = (vu32) vec_sums ((v32) pd_sum.v[1], vzero32 ()); UpdatePulldown (pInfo, /* comb */ (pd_sum.a[0] + pd_sum.a[2]) / scale, /* contrast */ (pd_sum.a[1] + pd_sum.a[3]) / scale, /* motion */ pd_sum.a[7] / scale); #endif } vempty (); return TRUE; } #define DI_GrUpdtFS(suffix, mf, sh, pd, so) \ static BOOL \ DI_GrUpdtFS_ ## suffix (TDeinterlaceInfo * pInfo) \ { \ return DI_GrUpdtFS_template (pInfo, \ /* use_sharpness */ sh, \ /* use_softness */ so, \ /* use_pulldown */ pd, \ /* use_median_filter */ mf); \ } DI_GrUpdtFS (NM_NE_NP, 0, 0, 0, 0) DI_GrUpdtFS (NM_NE_P, 0, 0, 1, 0) DI_GrUpdtFS (NM_E_NP, 0, 1, 0, 0) DI_GrUpdtFS (NM_E_P, 0, 1, 1, 0) DI_GrUpdtFS (M_NE_NP, 1, 0, 0, 0) DI_GrUpdtFS (M_NE_P, 1, 0, 1, 0) DI_GrUpdtFS (M_E_NP, 1, 1, 0, 0) DI_GrUpdtFS (M_E_P, 1, 1, 1, 0) DI_GrUpdtFS (NM_E_NP_Soft, 0, 1, 0, 1) DI_GrUpdtFS (NM_E_P_Soft, 0, 1, 1, 1) DI_GrUpdtFS (M_E_NP_Soft, 1, 1, 0, 1) DI_GrUpdtFS (M_E_P_Soft, 1, 1, 1, 1) static BOOL UpdateFieldStore (TDeinterlaceInfo * pInfo) { if (GreedyUsePulldown) { if (GreedyUseMedianFilter && GreedyMedianFilterAmt > 0) { FsDelay = 2; if (GreedyUseHSharpness && GreedyHSharpnessAmt) { if (GreedyHSharpnessAmt > 0) { return DI_GrUpdtFS_M_E_P (pInfo); } else { return DI_GrUpdtFS_M_E_P_Soft (pInfo); } } else { return DI_GrUpdtFS_M_NE_P (pInfo); } } else { FsDelay = 1; if (GreedyUseHSharpness && GreedyHSharpnessAmt) { if (GreedyHSharpnessAmt > 0) { return DI_GrUpdtFS_NM_E_P (pInfo); } else { return DI_GrUpdtFS_NM_E_P_Soft (pInfo); } } else { return DI_GrUpdtFS_NM_NE_P (pInfo); } } } else { if (GreedyUseMedianFilter && GreedyMedianFilterAmt > 0) { FsDelay = 2; if (GreedyUseHSharpness && GreedyHSharpnessAmt > 0) { if (GreedyHSharpnessAmt > 0) { return DI_GrUpdtFS_M_E_NP (pInfo); } else { return DI_GrUpdtFS_M_E_NP_Soft (pInfo); } } else { return DI_GrUpdtFS_M_NE_NP (pInfo); } } else { FsDelay = 1; if (GreedyUseHSharpness && GreedyHSharpnessAmt > 0) { if (GreedyHSharpnessAmt > 0) { return DI_GrUpdtFS_NM_E_NP (pInfo); } else { return DI_GrUpdtFS_NM_E_NP_Soft (pInfo); } } else { return DI_GrUpdtFS_NM_NE_NP (pInfo); } } } return FALSE; } /* Greedy High Motion Deinterlace, internal routine */ BOOL SIMD_NAME (DI_GreedyHM) (TDeinterlaceInfo * pInfo) { if (!UpdateFieldStore (pInfo)) { return FALSE; } else { if (SIMD_NAME (CanDoPulldown)(pInfo)) { return TRUE; } else { if (GreedyUseHSharpness && GreedyHSharpnessAmt > 0) { return SIMD_NAME (DI_GreedyHM_V)(pInfo); } else { return SIMD_NAME (DI_GreedyHM_NV)(pInfo); } } } return TRUE; } #endif /* SIMD */ /* Local Variables: c-basic-offset: 4 End: */ zapping-0.10cvs6/plugins/deinterlace/DI_GreedyH/DI_GreedyHM.h 644 764 144 27165 10260116753 17075 /*/////////////////////////////////////////////////////////////////////////// // $Id: DI_GreedyHM.h,v 1.2 2005/06/28 00:46:35 mschimek Exp $ ///////////////////////////////////////////////////////////////////////////// // Copyright (c) 2001 Tom Barry. All rights reserved. // Copyright (c) 2005 Michael H. Schimek ///////////////////////////////////////////////////////////////////////////// // // This file is subject to the terms of the GNU General Public License as // published by the Free Software Foundation. A copy of this license is // included with this software distribution in the file COPYING. If you // do not have a copy, you may obtain a copy by writing to the Free // Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. // // This software 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 ///////////////////////////////////////////////////////////////////////////// // Change Log // // Date Developer Changes // // 01 Jul 2001 Tom Barry Added GreedyH Deinterlace method // ///////////////////////////////////////////////////////////////////////////// // // This member contains the meat of the Greedy (High Motion) deinterlace // method. It is written to not be particularly dependend upon either // DScaler or Windows. It would be nice to keep it that way if possible // as I'd like to also use it to port to other environments including // maybe Linux, DirectShow filters, batch utilites, and maybe VirtualDub // or TMPGEnc plug-ins. // // I'll add a bigger block of comments here from material I'll post on // the list. Basically this was made from ideas used in the Blended Clip // & Greedy (Low Motion) plug-in's. // // Then Edge Enhancement, Median Filtering, Vertical Filtering, Diagonal // Jaggie Reduction (DJR ;-) ), n:n pulldown matching, and In-Between // Frames were built on that. // // !!! THIS REQUIRES A FAST SSE BOX (Celeron, Athlon, P-III, or P4. !!! // It will just execute a copy of the old Greedy (Low Motion) if that is // not present. // ////////////////////////////////////////////////////////////////////////////*/ #include "DS_Deinterlace.h" extern int GreedyHMaxComb; extern int GreedyMotionThreshold; extern int GreedyMotionSense; extern int GreedyGoodPullDownLvl; extern int GreedyBadPullDownLvl; extern int GreedyHSharpnessAmt; extern int GreedyVSharpnessAmt; extern int GreedyMedianFilterAmt; extern int GreedyLowMotionPdLvl; extern BOOL GreedyUsePulldown; extern BOOL GreedyUseInBetween; extern BOOL GreedyUseMedianFilter; extern BOOL GreedyUseVSharpness; extern BOOL GreedyUseHSharpness; extern BOOL GreedyTestMode; typedef struct { int Comb; /* combs */ int CombChoice; /* val chosen by Greedy Choice */ int Kontrast; /* sum of all abs vertical diff in a field */ int Motion; /* sum of all abs vertical diff in a field */ int Avg; /* avg of last 10 combs (actually just a total) */ int AvgChoice; /* avgs of last 10 chosen combs (actually just a total) */ int Flags; /* a circlular history of last 20 Greedy choice flags */ int Flags2; /* various status flags, mostly for debugging */ } GR_PULLDOWN_INFO; #define PD_VIDEO (1 << 0) /* did video deinterlace for this frame */ #define PD_PULLDOWN (1 << 1) /* did pulldown */ #define PD_BAD (1 << 2) /* bad pulldown situation */ #define PD_LOW_MOTION (1 << 3) /* did pulldown due to low motion */ #define PD_MERGED (1 << 4) /* made an in between frame */ #define PD_32_PULLDOWN (1 << 5) /* is 3:2 pulldown */ #define PD_22_PULLDOWN (1 << 6) /* is 2:2 pulldown */ #define PD_ODD (1 << 7) /* is Odd Field */ /* Allow space for max 288 rows/field, plus a spare, and max 896 sceen cols (FS_MAX_WIDTH * FS_BYTES_PER_PIXEL should be a multiple of the cache line size). */ #define FS_MAX_WIDTH 896 #define FS_MAX_HEIGHT 289 /* Number of fields to buffer. Attention! this is hardcoded (grep FsPtr % 2, FsPtr % 4). */ #define FS_FIELDS 4 /* FieldStore is organized as rows * (columns / gran) * fields * gran pixels, where gran = sizeof (vu8) / 2 bpp. */ #define FS_BYTES_PER_PIXEL (FS_FIELDS * 2) /* YUYV */ /* Bytes to skip to get to next row. */ #define FS_BYTES_PER_ROW (FS_MAX_WIDTH * FS_BYTES_PER_PIXEL) /* Bytes in FieldStore array. */ #define FS_SIZE (FS_MAX_HEIGHT * FS_BYTES_PER_ROW) extern uint8_t FieldStore[FS_SIZE]; /* Current subscript (field) in FieldStore. */ extern unsigned int FsPtr; /* Display is delayed by n fields (1,2,3). */ extern unsigned int FsDelay; /* len of pulldown average, < len of queue */ #define PDAVGLEN 10 typedef void LINE_COPY_FUNC (uint8_t * dst, const uint8_t * src, unsigned int n_bytes); typedef BOOL SETFSPTRS_FUNC (long * dL1, long * dL2, long * dL3, long * dCopySrc, uint8_t ** CopyDest, uint8_t ** WeaveDest, TDeinterlaceInfo * pInfo); extern int UpdatePulldown(TDeinterlaceInfo * pInfo, int Comb, int Kontrast, int Motion); SIMD_FN_PROTOS (LINE_COPY_FUNC, FieldStoreCopy); SIMD_FN_PROTOS (DEINTERLACE_FUNC, DI_GreedyHF); SIMD_FN_PROTOS (DEINTERLACE_FUNC, DI_GreedyHM); SIMD_FN_PROTOS (DEINTERLACE_FUNC, DI_GreedyHM_V); SIMD_FN_PROTOS (DEINTERLACE_FUNC, DI_GreedyHM_NV); SIMD_FN_PROTOS (DEINTERLACE_FUNC, CanDoPulldown); SIMD_FN_PROTOS (SETFSPTRS_FUNC, SetFsPtrs); #if SIMD #define FsPrevFrame(dL2) ((dL2) ^ (2 * sizeof (vu8))) /* Some common routines. */ static always_inline vu8 recombine_yuyv (vu16 yy, vu8 yuyv) { #if SIMD == CPU_FEATURE_ALTIVEC vu8 sel = { 0x01, 0x11, 0x03, 0x13, 0x05, 0x15, 0x07, 0x17, 0x09, 0x19, 0x0B, 0x1B, 0x0D, 0x1D, 0x0F, 0x1F }; /* 0xY0UaY1Va */ return vec_perm ((vu8) yy, yuyv, sel); #else /* 0xVaY1UaY0 */ return vor (yy, vand (yuyv, UVMask)); #endif } /* For debugging. */ #define USE_JAGGIE_REDUCTION 1 #define USE_GREEDY_CHOICE 1 #define USE_CLIP 1 #define USE_BOB_BLEND 1 typedef enum { STORE_WEAVE_ABOVE, STORE_WEAVE_BELOW, STORE_L1WEAVE_L3WEAVE } ghxc_mode; /** * @param Curr Line of the current field. * @param Above Line above Curr (prev. field of opposite parity) * @param Prev Line of the previous frame (prev. field of same parity) * * This is a merge of GreedyDeLoop.asm which reads from FieldStore * (hence src_incr) and the GreedyHF.c loop core which reads from * PictureHistory. Dest stores in DI_GreedyHM_V() and DI_GreedyHM_NV() * have been integrated. * * Operation: * * WEAVE_ABOVE WEAVE_BELOW L1WEAVE_L3WEAVE * Dest weave weave weave + Below * Dest + dst_bpl Above Below weave + Above * * Below = Above + src_bpl. * weave = Curr + Prev + Above + Below. */ static always_inline void GreedyHXCore (uint8_t * Dest, const uint8_t * Curr, const uint8_t * Above, const uint8_t * Prev, unsigned int byte_width, unsigned long dst_bpl, unsigned long src_bpl, unsigned long src_incr, vu8 MaxCombW, vu8 MotionThresholdW, v16 MotionSenseW, ghxc_mode mode) { int count; vu8 am, a0, a1; /* previous, current, next column of Above + Below */ /* For ease of reading, the comments below assume that we're operating on an odd field (i.e., that InfoIsOdd is true). Assume the obvious for even lines. */ am = vzerou8 (); /* no data left hand of first column */ a0 = fast_vavgu8 (vload (Above, 0), vload (Above, src_bpl)); for (count = byte_width / sizeof (vu8) - 1; count > 0; --count) { vu8 above, below, curr, prev; vu8 weave, bob, motion; /* Merge line above and below. */ a1 = fast_vavgu8 (vload (Above, sizeof (vu8)), vload (Above, src_bpl + sizeof (vu8))); last_column: /* DJR - Diagonal Jaggie Reduction In the event that we are going to use an average (Bob) pixel we do not want a jagged stair step effect. To combat this we avg in the 2 horizontally adjacent pixels into the interpolated Bob mix. This will do horizontal smoothing for only the Bob'd pixels. */ if (USE_JAGGIE_REDUCTION) { vu8 l, c, r; vshiftu2x (&l, &r, am, a0, a1, 2); l = fast_vavgu8 (l, r); /* avg of next and prev. pixel */ c = fast_vavgu8 (a0, l); /* avg of center with adjacent */ /* Don't do any more averaging than needed for MMX. It hurts performance and causes rounding errors. */ if (SIMD != CPU_FEATURE_MMX) { l = vavgu8 (l, c); /* 1/4 center, 3/4 adjacent */ c = vavgu8 (c, l); /* 3/8 center, 5/8 adjacent */ } bob = c; } else { bob = a0; } am = a0; a0 = a1; curr = vload (Curr, 0); Curr += src_incr; prev = vload (Prev, 0); Prev += src_incr; /* Greedy Choice For a weave pixel candidate we choose whichever (preceding or following) pixel that would yield the lowest comb factor. This allows the possibilty of selecting choice pixels from 2 different field. */ if (USE_GREEDY_CHOICE) { /* use Curr or Prev depending upon which makes smaller comb: absdiff (prev, bob) <= absdiff (curr, bob) ? prev : curr. */ weave = vsel ((vu8) vcmpleu8 (vabsdiffu8 (prev, bob), vabsdiffu8 (curr, bob)), prev, curr); } else { weave = curr; } /* Let's measure movement, as how much the weave pixel has changed */ motion = vabsdiffu8 (curr, prev); /* MHS: We already had above, below in the previous iteration, but with few registers to save values reloading is faster. */ above = vload (Above, 0); below = vload (Above, src_bpl); Above += src_incr; /* Now lets clip our chosen value to be not outside of the range of the high/low range Above-BELOW by more than MaxComb. This allows some comb but limits the damages and also allows more detail than a boring oversmoothed clip. */ if (USE_CLIP) { vu8 min, max; vminmaxu8 (&min, &max, above, below); /* Allow the value to be above the high or below the low by amt of MaxComb. */ max = vaddsu8 (max, MaxCombW); min = vsubsu8 (min, MaxCombW); weave = vsatu8 (weave, min, max); } /* Blend weave pixel with bob pixel, depending on motion value. The ratio of bob/weave will be dependend upon apparent damage we expect from seeing large motion. */ if (USE_BOB_BLEND) { v16 weave_w, bob_w; vu16 sum; /* test Threshold, clear chroma bytes */ bob_w = (v16) vsubsu8 (motion, MotionThresholdW); bob_w = (v16) vmullo16 (bob_w, MotionSenseW); /* so the two sum to 256, weighted avg */ #if SIMD & (CPU_FEATURE_MMX | CPU_FEATURE_3DNOW) bob_w = (v16) vminu16i ((v16) bob_w, 256); #else bob_w = vmin16 (bob_w, vsplat16_256); #endif weave_w = vsub16 (vsplat16_256, bob_w); /* use more weave for less motion, more bob for large motion */ sum = vaddsu16 (vmullo16 (yuyv2yy (weave), weave_w), vmullo16 (yuyv2yy (bob), bob_w)); if (Z_BYTE_ORDER == Z_LITTLE_ENDIAN) { /* 0xVaY1UaY0 */ /* Div by 256 to get weighted avg and merge in chroma from weave pixels. */ weave = vor ((vu8) vsru16 (sum, 8), vand (weave, (vu8) UVMask)); } else { /* 0xY0UaY1Va */ weave = vsel ((vu8) YMask, (vu8) sum, weave); } } switch (mode) { case STORE_WEAVE_ABOVE: vstorent (Dest, dst_bpl, above); vstorent (Dest, 0, weave); break; case STORE_WEAVE_BELOW: vstorent (Dest, dst_bpl, below); vstorent (Dest, 0, weave); break; case STORE_L1WEAVE_L3WEAVE: vstorent (Dest, dst_bpl, fast_vavgu8 (above, weave)); vstorent (Dest, 0, fast_vavgu8 (below, weave)); break; } Dest += sizeof (vu8); } a1 = vzerou8 (); /* no data right of last column */ if (count >= 0) goto last_column; } #endif /* SIMD */ /* Local Variables: c-basic-offset: 4 End: */ zapping-0.10cvs6/plugins/deinterlace/DI_GreedyH/DI_GreedyH.c 644 764 144 27507 10442152124 16745 /*/////////////////////////////////////////////////////////////////////////// // $Id: DI_GreedyH.c,v 1.7 2006/06/09 01:52:20 mschimek Exp $ ///////////////////////////////////////////////////////////////////////////// // Copyright (c) 2001 Tom Barry. All rights reserved. // Copyright (C) 2005 Michael H. Schimek ///////////////////////////////////////////////////////////////////////////// // // This file is subject to the terms of the GNU General Public License as // published by the Free Software Foundation. A copy of this license is // included with this software distribution in the file COPYING. If you // do not have a copy, you may obtain a copy by writing to the Free // Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. // // This software 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 ///////////////////////////////////////////////////////////////////////////// // Change Log // // Date Developer Changes // // 16 Jan 2001 Tom Barry Added GreedyH Deinterlace method // ///////////////////////////////////////////////////////////////////////////// // // GreedyH.c is basically just a wrapper for the new Greedy (High Motion) // deinterlace method. This member handles all, or most of, the dependencies // on Windows, or the DScaler environment. That includes the User Interface // stuff to adjust parms or view the diagnostic pulldown trace. // // For details of the actual deinterlace algorithm, see member DI_GreedyHM.c. // // For details of the pulldown handling, see member DI_GreedyHMPulldown.c. // ////////////////////////////////////////////////////////////////////////////// // CVS Log // // $Log: DI_GreedyH.c,v $ // Revision 1.7 2006/06/09 01:52:20 mschimek // SSE version was not compiled because the SSE_INT checks were backwards. // // Revision 1.6 2006/04/12 01:45:07 mschimek // s/CPU_FEATURE_SSE/CPU_FEATURE_SSE_INT. // // Revision 1.5 2006/02/25 17:37:43 mschimek // *** empty log message *** // // Revision 1.4 2005/07/29 17:39:29 mschimek // *** empty log message *** // // Revision 1.3 2005/06/28 00:47:12 mschimek // Converted to vector intrinsics. Added support for 3DNow, SSE2, x86-64 // and AltiVec. Removed ununsed DScaler code. Cleaned up. All options work // now. // // Revision 1.2.2.4 2005/06/17 02:54:20 mschimek // *** empty log message *** // // Revision 1.2.2.3 2005/05/20 05:45:14 mschimek // *** empty log message *** // // Revision 1.2.2.2 2005/05/17 19:58:32 mschimek // *** empty log message *** // // Revision 1.2.2.1 2005/05/05 09:46:00 mschimek // *** empty log message *** // // Revision 1.2 2005/02/05 22:21:06 mschimek // Completed l18n. // // Revision 1.1 2005/01/08 14:35:29 mschimek // TomsMoCompMethod, MoComp2Method, VideoWeaveMethod, VideoBobMethod, // TwoFrameMethod, OldGameMethod, Greedy2FrameMethod, GreedyMethod, // DI_GreedyHSettings: Localized. // // Revision 1.16 2002/06/18 19:46:07 adcockj // Changed appliaction Messages to use WM_APP instead of WM_USER // // Revision 1.15 2002/06/13 12:10:24 adcockj // Move to new Setings dialog for filers, video deint and advanced settings // // Revision 1.14 2001/11/25 04:33:37 trbarry // Fix for TDeinterlace_Info. Also release UN-Filter code, 5-tap // V & H sharp/soft filters optimized to reverse excessive filtering (or EE?) // // Revision 1.13 2001/11/21 15:21:40 adcockj // Renamed DEINTERLACE_INFO to TDeinterlaceInfo in line with standards // Changed TDeinterlaceInfo structure to have history of pictures. // // Revision 1.12 2001/11/02 10:46:09 adcockj // Merge in code from Multiple card branch // // Revision 1.11 2001/08/21 09:39:12 adcockj // Removed references to deleted file // // Revision 1.10 2001/08/19 06:26:38 trbarry // Remove Greedy HM Low Motion Only option and files // // No longer needed // // Revision 1.9 2001/08/17 16:18:35 trbarry // Minor GreedyH performance Enh. // Only do pulldown calc when needed. // Will become more needed in future when calc more expensive. // // Revision 1.10 2001/08/19 06:26:38 trbarry // Remove Greedy HM Low Motion Only option and files // // No longer needed // // Revision 1.9 2001/08/17 16:18:35 trbarry // Minor GreedyH performance Enh. // Only do pulldown calc when needed. // Will become more needed in future when calc more expensive. // // Revision 1.8 2001/08/04 06:46:56 trbarry // Make Gui work with Large fonts, // Improve Pulldown // // Revision 1.7 2001/08/01 00:37:41 trbarry // More chroma jitter fixes, tweak defaults // // Revision 1.6 2001/07/30 21:50:32 trbarry // Use weave chroma for reduced chroma jitter. Fix DJR bug again. // Turn off Greedy Pulldown default. // // Revision 1.5 2001/07/30 17:56:26 trbarry // Add Greedy High Motion MMX, K6-II, K6-III, and Celeron support. // Tweak defaults. // // Revision 1.4 2001/07/28 18:47:24 trbarry // Fix Sharpness with Median Filter // Increase Sharpness default to make obvious // Adjust deinterlace defaults for less jitter // // Revision 1.3 2001/07/26 02:42:10 trbarry // Recognize Athlon CPU // // Revision 1.2 2001/07/25 12:04:31 adcockj // Moved Control stuff into DS_Control.h // Added $Id and $Log to comment blocks as per standards // ///////////////////////////////////////////////////////////////////////////*/ #include "windows.h" #include "DS_Deinterlace.h" #include "DI_GreedyHM.h" /*////////////////////////////////////////////////////////////////////////// // Start of Settings related code //////////////////////////////////////////////////////////////////////////*/ static BOOL DeinterlaceGreedyH (TDeinterlaceInfo * pInfo) { pInfo = pInfo; #if defined (CAN_COMPILE_ALTIVEC) if (cpu_features & CPU_FEATURE_ALTIVEC) { if (GreedyUseMedianFilter | GreedyUsePulldown | GreedyUseVSharpness | GreedyUseHSharpness) { return DI_GreedyHM_ALTIVEC (pInfo); } else { return DI_GreedyHF_ALTIVEC (pInfo); } } else #endif #if defined (CAN_COMPILE_SSE3) if (cpu_features & CPU_FEATURE_SSE3) { if (GreedyUseMedianFilter | GreedyUsePulldown | GreedyUseVSharpness | GreedyUseHSharpness) { return DI_GreedyHM_SSE3 (pInfo); } else { return DI_GreedyHF_SSE3 (pInfo); } } else #endif #if defined (CAN_COMPILE_SSE2) if (cpu_features & CPU_FEATURE_SSE2) { if (GreedyUseMedianFilter | GreedyUsePulldown | GreedyUseVSharpness | GreedyUseHSharpness) { return DI_GreedyHM_SSE2 (pInfo); } else { return DI_GreedyHF_SSE2 (pInfo); } } else #endif #if defined (CAN_COMPILE_SSE) if (cpu_features & CPU_FEATURE_SSE_INT) { if (GreedyUseMedianFilter | GreedyUsePulldown | GreedyUseVSharpness | GreedyUseHSharpness) { return DI_GreedyHM_SSE (pInfo); } else { return DI_GreedyHF_SSE (pInfo); } } else #endif /* Test mode: enable expensive features for tests. */ #if defined (CAN_COMPILE_3DNOW) if (cpu_features & CPU_FEATURE_3DNOW) { if (GreedyTestMode && (GreedyUseMedianFilter | GreedyUsePulldown | GreedyUseVSharpness | GreedyUseHSharpness)) { return DI_GreedyHM_3DNOW (pInfo); } else { return DI_GreedyHF_3DNOW (pInfo); } } else #endif #if defined (CAN_COMPILE_MMX) if (cpu_features & CPU_FEATURE_MMX) { if (GreedyTestMode && (GreedyUseMedianFilter | GreedyUsePulldown | GreedyUseVSharpness | GreedyUseHSharpness)) { return DI_GreedyHM_MMX (pInfo); } else { return DI_GreedyHF_MMX (pInfo); } } else #endif return FALSE; } static const SETTING DI_GreedyHSettings [] = { { N_("Max Comb"), SLIDER, 0, /* szDisplayName, TYPE, orig val */ &GreedyHMaxComb, 5, 0, /* *pValue, Default, Min */ 255, 1, 1, /* Max, Step, OSDDivider */ NULL, "Deinterlace", /* **pszList, Ini Section */ "GreedyMaxComb", NULL, /* Ini name, pfnOnChange */ }, { N_("Motion Threshold"), SLIDER, 0, &GreedyMotionThreshold, 25, 0, 255, 1, 1, NULL, "Deinterlace", "GreedyMotionThreshold", NULL, }, { N_("Motion Sense"), SLIDER, 0, &GreedyMotionSense, 30, 0, 255, 1, 1, NULL, "Deinterlace", "GreedyMotionSense", NULL, }, { N_("Good PullDown Lvl"), SLIDER, 0, &GreedyGoodPullDownLvl, 83, 0, 255, 1, 1, NULL, "Deinterlace", "GreedyGoodPullDownLvl", NULL, }, { N_("Bad PullDown Lvl"), SLIDER, 0, &GreedyBadPullDownLvl, 88, 0, 255, 1, 1, NULL, "Deinterlace", "GreedyBadPullDownLvl", NULL, }, { N_("H. Sharpness"), SLIDER, 0, &GreedyHSharpnessAmt, 50, -100, 100, 1, 1, NULL, "Deinterlace", "GreedyHSharpnessAmt", NULL, }, { N_("V. Sharpness"), SLIDER, 0, &GreedyVSharpnessAmt, 23, -100, 100, 1, 1, NULL, "Deinterlace", "GreedyVHSharpnessAmt", NULL, }, { N_("Median Filter"), SLIDER, 0, &GreedyMedianFilterAmt, 5, 0, 255, 1, 1, NULL, "Deinterlace", "GreedyMedianFilterAmt", NULL, }, { N_("High Comb Skip"), SLIDER, 0, &GreedyLowMotionPdLvl, 0, 0, 100, 1, 1, NULL, "Deinterlace", "GreedyLowMotionPdLvl", NULL, }, { N_("Auto Pull-Down"), ONOFF, 0, &GreedyUsePulldown, FALSE, 0, 1, 1, 1, NULL, "Deinterlace", "GreedyUsePulldown", NULL, }, { N_("In-Between Frames"), ONOFF, 0, &GreedyUseInBetween, FALSE, 0, 1, 1, 1, NULL, "Deinterlace", "GreedyUseInBetween", NULL, }, { N_("Median Filter"), ONOFF, 0, &GreedyUseMedianFilter, FALSE, 0, 1, 1, 1, NULL, "Deinterlace", "GreedyUseMedianFilter", NULL, }, { N_("V. Sharpness"), ONOFF, 0, &GreedyUseVSharpness, FALSE, 0, 1, 1, 1, NULL, "Deinterlace", "GreedyUseVSharpness", NULL, }, { N_("H. Sharpness"), ONOFF, 0, &GreedyUseHSharpness, FALSE, 0, 1, 1, 1, NULL, "Deinterlace", "GreedyUseHSharpness", NULL, }, { NULL, ONOFF, 0, &GreedyTestMode, FALSE, 0, 1, 1, 1, NULL, "Deinterlace", "GreedyTestMode", NULL, }, }; static const DEINTERLACE_METHOD GreedyHMethod = { sizeof (DEINTERLACE_METHOD), /* size of this struct */ DEINTERLACE_CURRENT_VERSION, /* curr version compiled */ N_("Video (Greedy, High Motion)"), /* What to display when selected */ "GreedyH", /* Short name */ FALSE, /* Is 1/2 height? */ FALSE, /* Is film mode? */ DeinterlaceGreedyH, /* Pointer to Algorithm function */ 50, /* flip frequency in 50Hz mode */ 60, /* flip frequency in 60Hz mode */ N_ELEMENTS (DI_GreedyHSettings), /* number of settings */ DI_GreedyHSettings, /* ptr to start of Settings[nSettings] */ INDEX_VIDEO_GREEDYH, /* Index Number (pos. in menu) should map*/ NULL, /* to old enum value and d should be unique */ 0, 0, 0, 3, /* how many fields are required to run this plug-in */ 0, /* Track number of mode Changes */ 0, /* Track Time in mode */ 0, /* the offset used by the external settings API */ NULL, /* Dll module so that we can unload the dll cleanly at the end */ 0, /* Menu Id used for this plug-in, 0 to auto allocate one */ FALSE, /* do we need FieldDiff filled in in info */ FALSE, /* do we need CombFactor filled in in info */ IDH_GREEDYHM, }; DEINTERLACE_METHOD * DI_GreedyH_GetDeinterlacePluginInfo (void) { DEINTERLACE_METHOD *m; DEINTERLACE_FUNC *f; m = NULL; f = NULL; #if defined (CAN_COMPILE_ALTIVEC) if (cpu_features & CPU_FEATURE_ALTIVEC) f = DeinterlaceGreedyH; #endif #if defined (CAN_COMPILE_SSE3) if (cpu_features & CPU_FEATURE_SSE3) f = DeinterlaceGreedyH; #endif #if defined (CAN_COMPILE_SSE2) if (cpu_features & CPU_FEATURE_SSE2) f = DeinterlaceGreedyH; #endif #if defined (CAN_COMPILE_SSE) if (cpu_features & CPU_FEATURE_SSE_INT) f = DeinterlaceGreedyH; #endif #if defined (CAN_COMPILE_3DNOW) if (cpu_features & CPU_FEATURE_3DNOW) f = DeinterlaceGreedyH; #endif #if defined (CAN_COMPILE_MMX) if (cpu_features & CPU_FEATURE_MMX) f = DeinterlaceGreedyH; #endif if (f) { m = malloc (sizeof (*m)); *m = GreedyHMethod; m->pfnAlgorithm = f; } return m; } /* Local Variables: c-basic-offset: 4 End: */ zapping-0.10cvs6/plugins/deinterlace/DI_GreedyH/Makefile.am 644 764 144 4152 10417055610 16705 ## Process this file with automake to produce Makefile.in # Note these are defaults, user CFLAGS take precedence. SIMD_CFLAGS = \ -I$(top_srcdir) \ -I$(top_srcdir)/plugins/deinterlace \ -O3 -fomit-frame-pointer -D_REENTRANT # We make extensive use of inline functions. The --param switches here # increase various inlining limits (gcc 3.4.x and later only). if HAVE_GCC_LIMITS SIMD_CFLAGS += \ --param max-inline-insns-single=50000 \ --param large-function-insns=150000 \ --param inline-unit-growth=30000 \ --param large-function-growth=30000 endif SIMD_SOURCES = \ DI_GreedyHF.c \ DI_GreedyHM.c DI_GreedyHM.h \ DI_GreedyHMPulldown.c \ DI_GreedyHM_V.c SIMD_LIBS = # x86 and x86-64 if CAN_COMPILE_MMX SIMD_LIBS += libDI_GreedyH_MMX.la libDI_GreedyH_MMX_la_CFLAGS = $(SIMD_CFLAGS) -mmmx -DSIMD=CPU_FEATURE_MMX libDI_GreedyH_MMX_la_SOURCES = $(SIMD_SOURCES) endif if CAN_COMPILE_3DNOW SIMD_LIBS += libDI_GreedyH_3DNOW.la libDI_GreedyH_3DNOW_la_CFLAGS = $(SIMD_CFLAGS) -m3dnow -DSIMD=CPU_FEATURE_3DNOW libDI_GreedyH_3DNOW_la_SOURCES = $(SIMD_SOURCES) endif if CAN_COMPILE_SSE SIMD_LIBS += libDI_GreedyH_SSE.la libDI_GreedyH_SSE_la_CFLAGS = $(SIMD_CFLAGS) -msse -DSIMD=CPU_FEATURE_SSE_INT libDI_GreedyH_SSE_la_SOURCES = $(SIMD_SOURCES) endif if CAN_COMPILE_SSE2 SIMD_LIBS += libDI_GreedyH_SSE2.la libDI_GreedyH_SSE2_la_CFLAGS = $(SIMD_CFLAGS) -msse2 -DSIMD=CPU_FEATURE_SSE2 libDI_GreedyH_SSE2_la_SOURCES = $(SIMD_SOURCES) endif if CAN_COMPILE_SSE3 SIMD_LIBS += libDI_GreedyH_SSE3.la libDI_GreedyH_SSE3_la_CFLAGS = $(SIMD_CFLAGS) -msse3 -DSIMD=CPU_FEATURE_SSE3 libDI_GreedyH_SSE3_la_SOURCES = $(SIMD_SOURCES) endif # powerpc if CAN_COMPILE_ALTIVEC SIMD_LIBS += libDI_GreedyH_ALTIVEC.la libDI_GreedyH_ALTIVEC_la_CFLAGS = \ $(SIMD_CFLAGS) \ -maltivec -mabi=altivec -DSIMD=CPU_FEATURE_ALTIVEC libDI_GreedyH_ALTIVEC_la_SOURCES = $(SIMD_SOURCES) endif libDI_GreedyH_la_CFLAGS = \ -I$(top_srcdir) \ -I$(top_srcdir)/plugins/deinterlace libDI_GreedyH_la_SOURCES = \ DI_GreedyH.c \ DI_GreedyHM.c DI_GreedyHM.h \ DI_GreedyHMPulldown.c libDI_GreedyH_la_LIBADD = \ $(SIMD_LIBS) noinst_LTLIBRARIES = \ $(SIMD_LIBS) \ libDI_GreedyH.la zapping-0.10cvs6/plugins/deinterlace/DI_GreedyH/Makefile.in 644 764 144 166622 10442575504 17000 # Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = ../../.. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ # We make extensive use of inline functions. The --param switches here # increase various inlining limits (gcc 3.4.x and later only). @HAVE_GCC_LIMITS_TRUE@am__append_1 = \ @HAVE_GCC_LIMITS_TRUE@ --param max-inline-insns-single=50000 \ @HAVE_GCC_LIMITS_TRUE@ --param large-function-insns=150000 \ @HAVE_GCC_LIMITS_TRUE@ --param inline-unit-growth=30000 \ @HAVE_GCC_LIMITS_TRUE@ --param large-function-growth=30000 # x86 and x86-64 @CAN_COMPILE_MMX_TRUE@am__append_2 = libDI_GreedyH_MMX.la @CAN_COMPILE_3DNOW_TRUE@am__append_3 = libDI_GreedyH_3DNOW.la @CAN_COMPILE_SSE_TRUE@am__append_4 = libDI_GreedyH_SSE.la @CAN_COMPILE_SSE2_TRUE@am__append_5 = libDI_GreedyH_SSE2.la @CAN_COMPILE_SSE3_TRUE@am__append_6 = libDI_GreedyH_SSE3.la # powerpc @CAN_COMPILE_ALTIVEC_TRUE@am__append_7 = libDI_GreedyH_ALTIVEC.la subdir = plugins/deinterlace/DI_GreedyH DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) @CAN_COMPILE_MMX_TRUE@am__DEPENDENCIES_1 = libDI_GreedyH_MMX.la @CAN_COMPILE_3DNOW_TRUE@am__DEPENDENCIES_2 = libDI_GreedyH_3DNOW.la @CAN_COMPILE_SSE_TRUE@am__DEPENDENCIES_3 = libDI_GreedyH_SSE.la @CAN_COMPILE_SSE2_TRUE@am__DEPENDENCIES_4 = libDI_GreedyH_SSE2.la @CAN_COMPILE_SSE3_TRUE@am__DEPENDENCIES_5 = libDI_GreedyH_SSE3.la @CAN_COMPILE_ALTIVEC_TRUE@am__DEPENDENCIES_6 = \ @CAN_COMPILE_ALTIVEC_TRUE@ libDI_GreedyH_ALTIVEC.la am__DEPENDENCIES_7 = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_2) \ $(am__DEPENDENCIES_3) $(am__DEPENDENCIES_4) \ $(am__DEPENDENCIES_5) $(am__DEPENDENCIES_6) libDI_GreedyH_la_DEPENDENCIES = $(am__DEPENDENCIES_7) am_libDI_GreedyH_la_OBJECTS = libDI_GreedyH_la-DI_GreedyH.lo \ libDI_GreedyH_la-DI_GreedyHM.lo \ libDI_GreedyH_la-DI_GreedyHMPulldown.lo libDI_GreedyH_la_OBJECTS = $(am_libDI_GreedyH_la_OBJECTS) libDI_GreedyH_3DNOW_la_LIBADD = am__libDI_GreedyH_3DNOW_la_SOURCES_DIST = DI_GreedyHF.c DI_GreedyHM.c \ DI_GreedyHM.h DI_GreedyHMPulldown.c DI_GreedyHM_V.c am__objects_1 = libDI_GreedyH_3DNOW_la-DI_GreedyHF.lo \ libDI_GreedyH_3DNOW_la-DI_GreedyHM.lo \ libDI_GreedyH_3DNOW_la-DI_GreedyHMPulldown.lo \ libDI_GreedyH_3DNOW_la-DI_GreedyHM_V.lo @CAN_COMPILE_3DNOW_TRUE@am_libDI_GreedyH_3DNOW_la_OBJECTS = \ @CAN_COMPILE_3DNOW_TRUE@ $(am__objects_1) libDI_GreedyH_3DNOW_la_OBJECTS = $(am_libDI_GreedyH_3DNOW_la_OBJECTS) @CAN_COMPILE_3DNOW_TRUE@am_libDI_GreedyH_3DNOW_la_rpath = libDI_GreedyH_ALTIVEC_la_LIBADD = am__libDI_GreedyH_ALTIVEC_la_SOURCES_DIST = DI_GreedyHF.c \ DI_GreedyHM.c DI_GreedyHM.h DI_GreedyHMPulldown.c \ DI_GreedyHM_V.c am__objects_2 = libDI_GreedyH_ALTIVEC_la-DI_GreedyHF.lo \ libDI_GreedyH_ALTIVEC_la-DI_GreedyHM.lo \ libDI_GreedyH_ALTIVEC_la-DI_GreedyHMPulldown.lo \ libDI_GreedyH_ALTIVEC_la-DI_GreedyHM_V.lo @CAN_COMPILE_ALTIVEC_TRUE@am_libDI_GreedyH_ALTIVEC_la_OBJECTS = \ @CAN_COMPILE_ALTIVEC_TRUE@ $(am__objects_2) libDI_GreedyH_ALTIVEC_la_OBJECTS = \ $(am_libDI_GreedyH_ALTIVEC_la_OBJECTS) @CAN_COMPILE_ALTIVEC_TRUE@am_libDI_GreedyH_ALTIVEC_la_rpath = libDI_GreedyH_MMX_la_LIBADD = am__libDI_GreedyH_MMX_la_SOURCES_DIST = DI_GreedyHF.c DI_GreedyHM.c \ DI_GreedyHM.h DI_GreedyHMPulldown.c DI_GreedyHM_V.c am__objects_3 = libDI_GreedyH_MMX_la-DI_GreedyHF.lo \ libDI_GreedyH_MMX_la-DI_GreedyHM.lo \ libDI_GreedyH_MMX_la-DI_GreedyHMPulldown.lo \ libDI_GreedyH_MMX_la-DI_GreedyHM_V.lo @CAN_COMPILE_MMX_TRUE@am_libDI_GreedyH_MMX_la_OBJECTS = \ @CAN_COMPILE_MMX_TRUE@ $(am__objects_3) libDI_GreedyH_MMX_la_OBJECTS = $(am_libDI_GreedyH_MMX_la_OBJECTS) @CAN_COMPILE_MMX_TRUE@am_libDI_GreedyH_MMX_la_rpath = libDI_GreedyH_SSE_la_LIBADD = am__libDI_GreedyH_SSE_la_SOURCES_DIST = DI_GreedyHF.c DI_GreedyHM.c \ DI_GreedyHM.h DI_GreedyHMPulldown.c DI_GreedyHM_V.c am__objects_4 = libDI_GreedyH_SSE_la-DI_GreedyHF.lo \ libDI_GreedyH_SSE_la-DI_GreedyHM.lo \ libDI_GreedyH_SSE_la-DI_GreedyHMPulldown.lo \ libDI_GreedyH_SSE_la-DI_GreedyHM_V.lo @CAN_COMPILE_SSE_TRUE@am_libDI_GreedyH_SSE_la_OBJECTS = \ @CAN_COMPILE_SSE_TRUE@ $(am__objects_4) libDI_GreedyH_SSE_la_OBJECTS = $(am_libDI_GreedyH_SSE_la_OBJECTS) @CAN_COMPILE_SSE_TRUE@am_libDI_GreedyH_SSE_la_rpath = libDI_GreedyH_SSE2_la_LIBADD = am__libDI_GreedyH_SSE2_la_SOURCES_DIST = DI_GreedyHF.c DI_GreedyHM.c \ DI_GreedyHM.h DI_GreedyHMPulldown.c DI_GreedyHM_V.c am__objects_5 = libDI_GreedyH_SSE2_la-DI_GreedyHF.lo \ libDI_GreedyH_SSE2_la-DI_GreedyHM.lo \ libDI_GreedyH_SSE2_la-DI_GreedyHMPulldown.lo \ libDI_GreedyH_SSE2_la-DI_GreedyHM_V.lo @CAN_COMPILE_SSE2_TRUE@am_libDI_GreedyH_SSE2_la_OBJECTS = \ @CAN_COMPILE_SSE2_TRUE@ $(am__objects_5) libDI_GreedyH_SSE2_la_OBJECTS = $(am_libDI_GreedyH_SSE2_la_OBJECTS) @CAN_COMPILE_SSE2_TRUE@am_libDI_GreedyH_SSE2_la_rpath = libDI_GreedyH_SSE3_la_LIBADD = am__libDI_GreedyH_SSE3_la_SOURCES_DIST = DI_GreedyHF.c DI_GreedyHM.c \ DI_GreedyHM.h DI_GreedyHMPulldown.c DI_GreedyHM_V.c am__objects_6 = libDI_GreedyH_SSE3_la-DI_GreedyHF.lo \ libDI_GreedyH_SSE3_la-DI_GreedyHM.lo \ libDI_GreedyH_SSE3_la-DI_GreedyHMPulldown.lo \ libDI_GreedyH_SSE3_la-DI_GreedyHM_V.lo @CAN_COMPILE_SSE3_TRUE@am_libDI_GreedyH_SSE3_la_OBJECTS = \ @CAN_COMPILE_SSE3_TRUE@ $(am__objects_6) libDI_GreedyH_SSE3_la_OBJECTS = $(am_libDI_GreedyH_SSE3_la_OBJECTS) @CAN_COMPILE_SSE3_TRUE@am_libDI_GreedyH_SSE3_la_rpath = DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ SOURCES = $(libDI_GreedyH_la_SOURCES) \ $(libDI_GreedyH_3DNOW_la_SOURCES) \ $(libDI_GreedyH_ALTIVEC_la_SOURCES) \ $(libDI_GreedyH_MMX_la_SOURCES) \ $(libDI_GreedyH_SSE_la_SOURCES) \ $(libDI_GreedyH_SSE2_la_SOURCES) \ $(libDI_GreedyH_SSE3_la_SOURCES) DIST_SOURCES = $(libDI_GreedyH_la_SOURCES) \ $(am__libDI_GreedyH_3DNOW_la_SOURCES_DIST) \ $(am__libDI_GreedyH_ALTIVEC_la_SOURCES_DIST) \ $(am__libDI_GreedyH_MMX_la_SOURCES_DIST) \ $(am__libDI_GreedyH_SSE_la_SOURCES_DIST) \ $(am__libDI_GreedyH_SSE2_la_SOURCES_DIST) \ $(am__libDI_GreedyH_SSE3_la_SOURCES_DIST) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ ARTS_CFLAGS = @ARTS_CFLAGS@ ARTS_LIBS = @ARTS_LIBS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BUILD_DEINTERLACE_PLUGIN_FALSE = @BUILD_DEINTERLACE_PLUGIN_FALSE@ BUILD_DEINTERLACE_PLUGIN_TRUE = @BUILD_DEINTERLACE_PLUGIN_TRUE@ BUILD_MAN_FALSE = @BUILD_MAN_FALSE@ BUILD_MAN_TRUE = @BUILD_MAN_TRUE@ CAN_COMPILE_3DNOW_FALSE = @CAN_COMPILE_3DNOW_FALSE@ CAN_COMPILE_3DNOW_TRUE = @CAN_COMPILE_3DNOW_TRUE@ CAN_COMPILE_ALTIVEC_FALSE = @CAN_COMPILE_ALTIVEC_FALSE@ CAN_COMPILE_ALTIVEC_TRUE = @CAN_COMPILE_ALTIVEC_TRUE@ CAN_COMPILE_MMX_FALSE = @CAN_COMPILE_MMX_FALSE@ CAN_COMPILE_MMX_TRUE = @CAN_COMPILE_MMX_TRUE@ CAN_COMPILE_SSE2_FALSE = @CAN_COMPILE_SSE2_FALSE@ CAN_COMPILE_SSE2_TRUE = @CAN_COMPILE_SSE2_TRUE@ CAN_COMPILE_SSE3_FALSE = @CAN_COMPILE_SSE3_FALSE@ CAN_COMPILE_SSE3_TRUE = @CAN_COMPILE_SSE3_TRUE@ CAN_COMPILE_SSE_FALSE = @CAN_COMPILE_SSE_FALSE@ CAN_COMPILE_SSE_TRUE = @CAN_COMPILE_SSE_TRUE@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCAS = @CCAS@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ COMMON_INCLUDES = @COMMON_INCLUDES@ CONSOLEHELPER_LOCATION = @CONSOLEHELPER_LOCATION@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFAULT_CFLAGS = @DEFAULT_CFLAGS@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ESD_LIBS = @ESD_LIBS@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ GCONF_SCHEMAS_INSTALL_FALSE = @GCONF_SCHEMAS_INSTALL_FALSE@ GCONF_SCHEMAS_INSTALL_TRUE = @GCONF_SCHEMAS_INSTALL_TRUE@ GCONF_SCHEMA_CONFIG_SOURCE = @GCONF_SCHEMA_CONFIG_SOURCE@ GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@ GDK_PIXBUF_CSOURCE = @GDK_PIXBUF_CSOURCE@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ HAVE_GCC_LIMITS_FALSE = @HAVE_GCC_LIMITS_FALSE@ HAVE_GCC_LIMITS_TRUE = @HAVE_GCC_LIMITS_TRUE@ HAVE_LIBZVBI_FALSE = @HAVE_LIBZVBI_FALSE@ HAVE_LIBZVBI_TRUE = @HAVE_LIBZVBI_TRUE@ HAVE_X86_FALSE = @HAVE_X86_FALSE@ HAVE_X86_TRUE = @HAVE_X86_TRUE@ HAVE_XMU_FALSE = @HAVE_XMU_FALSE@ HAVE_XMU_TRUE = @HAVE_XMU_TRUE@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ INTLTOOL_CAVES_RULE = @INTLTOOL_CAVES_RULE@ INTLTOOL_DESKTOP_RULE = @INTLTOOL_DESKTOP_RULE@ INTLTOOL_DIRECTORY_RULE = @INTLTOOL_DIRECTORY_RULE@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ INTLTOOL_ICONV = @INTLTOOL_ICONV@ INTLTOOL_KBD_RULE = @INTLTOOL_KBD_RULE@ INTLTOOL_KEYS_RULE = @INTLTOOL_KEYS_RULE@ INTLTOOL_MERGE = @INTLTOOL_MERGE@ INTLTOOL_MSGFMT = @INTLTOOL_MSGFMT@ INTLTOOL_MSGMERGE = @INTLTOOL_MSGMERGE@ INTLTOOL_OAF_RULE = @INTLTOOL_OAF_RULE@ INTLTOOL_PERL = @INTLTOOL_PERL@ INTLTOOL_PONG_RULE = @INTLTOOL_PONG_RULE@ INTLTOOL_PROP_RULE = @INTLTOOL_PROP_RULE@ INTLTOOL_SCHEMAS_RULE = @INTLTOOL_SCHEMAS_RULE@ INTLTOOL_SERVER_RULE = @INTLTOOL_SERVER_RULE@ INTLTOOL_SHEET_RULE = @INTLTOOL_SHEET_RULE@ INTLTOOL_SOUNDLIST_RULE = @INTLTOOL_SOUNDLIST_RULE@ INTLTOOL_THEME_RULE = @INTLTOOL_THEME_RULE@ INTLTOOL_UI_RULE = @INTLTOOL_UI_RULE@ INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ INTLTOOL_XAM_RULE = @INTLTOOL_XAM_RULE@ INTLTOOL_XGETTEXT = @INTLTOOL_XGETTEXT@ INTLTOOL_XML_NOMERGE_RULE = @INTLTOOL_XML_NOMERGE_RULE@ INTLTOOL_XML_RULE = @INTLTOOL_XML_RULE@ JPEG_LIB = @JPEG_LIB@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBXML_CFLAGS = @LIBXML_CFLAGS@ LIBXML_LIBS = @LIBXML_LIBS@ LIRC_LIB = @LIRC_LIB@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAKEINFO = @MAKEINFO@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ NEED_ZSFB_FALSE = @NEED_ZSFB_FALSE@ NEED_ZSFB_TRUE = @NEED_ZSFB_TRUE@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_CFLAGS = @PACKAGE_CFLAGS@ PACKAGE_LIBS = @PACKAGE_LIBS@ PACKAGE_LIB_DIR = @PACKAGE_LIB_DIR@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_PIXMAPS_DIR = @PACKAGE_PIXMAPS_DIR@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PACKAGE_VERSION_ID = @PACKAGE_VERSION_ID@ PATH_SEPARATOR = @PATH_SEPARATOR@ PG_CFLAGS = @PG_CFLAGS@ PKG_CONFIG = @PKG_CONFIG@ PLUGIN_DEFAULT_DIR = @PLUGIN_DEFAULT_DIR@ PLUGIN_DEFAULT_FLAGS = @PLUGIN_DEFAULT_FLAGS@ PNG_LIBS = @PNG_LIBS@ POFILES = @POFILES@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ PYTHON_LIBS = @PYTHON_LIBS@ PY_CFLAGS = @PY_CFLAGS@ PY_EXTRA_LIBS = @PY_EXTRA_LIBS@ PY_LIBS = @PY_LIBS@ PY_LIB_LOC = @PY_LIB_LOC@ RANLIB = @RANLIB@ RTE_LIBS = @RTE_LIBS@ SCROLLKEEPER_BUILD_REQUIRED = @SCROLLKEEPER_BUILD_REQUIRED@ SCROLLKEEPER_CONFIG = @SCROLLKEEPER_CONFIG@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ SUID_ZSFB_FALSE = @SUID_ZSFB_FALSE@ SUID_ZSFB_TRUE = @SUID_ZSFB_TRUE@ UNICODE_CFLAGS = @UNICODE_CFLAGS@ UNICODE_LIBS = @UNICODE_LIBS@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ WARN_CFLAGS = @WARN_CFLAGS@ XGETTEXT = @XGETTEXT@ XMLCATALOG = @XMLCATALOG@ XML_CATALOG_FILE = @XML_CATALOG_FILE@ XSLTPROC = @XSLTPROC@ X_CFLAGS = @X_CFLAGS@ X_DPMS_LIBS = @X_DPMS_LIBS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ X_XF86DGA_LIBS = @X_XF86DGA_LIBS@ X_XF86VMODE_LIBS = @X_XF86VMODE_LIBS@ X_XINERAMA_LIBS = @X_XINERAMA_LIBS@ X_XMU_LIBS = @X_XMU_LIBS@ X_XV_LIBS = @X_XV_LIBS@ ZSFB_GROUP = @ZSFB_GROUP@ ZSFB_OWNER = @ZSFB_OWNER@ ZVBI_CFLAGS = @ZVBI_CFLAGS@ ZVBI_LIBS = @ZVBI_LIBS@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_STRIP = @ac_ct_STRIP@ ac_pt_PKG_CONFIG = @ac_pt_PKG_CONFIG@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ datadir = @datadir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ python_val = @python_val@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ # Note these are defaults, user CFLAGS take precedence. SIMD_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/plugins/deinterlace -O3 \ -fomit-frame-pointer -D_REENTRANT $(am__append_1) SIMD_SOURCES = \ DI_GreedyHF.c \ DI_GreedyHM.c DI_GreedyHM.h \ DI_GreedyHMPulldown.c \ DI_GreedyHM_V.c SIMD_LIBS = $(am__append_2) $(am__append_3) $(am__append_4) \ $(am__append_5) $(am__append_6) $(am__append_7) @CAN_COMPILE_MMX_TRUE@libDI_GreedyH_MMX_la_CFLAGS = $(SIMD_CFLAGS) -mmmx -DSIMD=CPU_FEATURE_MMX @CAN_COMPILE_MMX_TRUE@libDI_GreedyH_MMX_la_SOURCES = $(SIMD_SOURCES) @CAN_COMPILE_3DNOW_TRUE@libDI_GreedyH_3DNOW_la_CFLAGS = $(SIMD_CFLAGS) -m3dnow -DSIMD=CPU_FEATURE_3DNOW @CAN_COMPILE_3DNOW_TRUE@libDI_GreedyH_3DNOW_la_SOURCES = $(SIMD_SOURCES) @CAN_COMPILE_SSE_TRUE@libDI_GreedyH_SSE_la_CFLAGS = $(SIMD_CFLAGS) -msse -DSIMD=CPU_FEATURE_SSE_INT @CAN_COMPILE_SSE_TRUE@libDI_GreedyH_SSE_la_SOURCES = $(SIMD_SOURCES) @CAN_COMPILE_SSE2_TRUE@libDI_GreedyH_SSE2_la_CFLAGS = $(SIMD_CFLAGS) -msse2 -DSIMD=CPU_FEATURE_SSE2 @CAN_COMPILE_SSE2_TRUE@libDI_GreedyH_SSE2_la_SOURCES = $(SIMD_SOURCES) @CAN_COMPILE_SSE3_TRUE@libDI_GreedyH_SSE3_la_CFLAGS = $(SIMD_CFLAGS) -msse3 -DSIMD=CPU_FEATURE_SSE3 @CAN_COMPILE_SSE3_TRUE@libDI_GreedyH_SSE3_la_SOURCES = $(SIMD_SOURCES) @CAN_COMPILE_ALTIVEC_TRUE@libDI_GreedyH_ALTIVEC_la_CFLAGS = \ @CAN_COMPILE_ALTIVEC_TRUE@ $(SIMD_CFLAGS) \ @CAN_COMPILE_ALTIVEC_TRUE@ -maltivec -mabi=altivec -DSIMD=CPU_FEATURE_ALTIVEC @CAN_COMPILE_ALTIVEC_TRUE@libDI_GreedyH_ALTIVEC_la_SOURCES = $(SIMD_SOURCES) libDI_GreedyH_la_CFLAGS = \ -I$(top_srcdir) \ -I$(top_srcdir)/plugins/deinterlace libDI_GreedyH_la_SOURCES = \ DI_GreedyH.c \ DI_GreedyHM.c DI_GreedyHM.h \ DI_GreedyHMPulldown.c libDI_GreedyH_la_LIBADD = \ $(SIMD_LIBS) noinst_LTLIBRARIES = \ $(SIMD_LIBS) \ libDI_GreedyH.la all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu plugins/deinterlace/DI_GreedyH/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu plugins/deinterlace/DI_GreedyH/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libDI_GreedyH.la: $(libDI_GreedyH_la_OBJECTS) $(libDI_GreedyH_la_DEPENDENCIES) $(LINK) $(libDI_GreedyH_la_LDFLAGS) $(libDI_GreedyH_la_OBJECTS) $(libDI_GreedyH_la_LIBADD) $(LIBS) libDI_GreedyH_3DNOW.la: $(libDI_GreedyH_3DNOW_la_OBJECTS) $(libDI_GreedyH_3DNOW_la_DEPENDENCIES) $(LINK) $(am_libDI_GreedyH_3DNOW_la_rpath) $(libDI_GreedyH_3DNOW_la_LDFLAGS) $(libDI_GreedyH_3DNOW_la_OBJECTS) $(libDI_GreedyH_3DNOW_la_LIBADD) $(LIBS) libDI_GreedyH_ALTIVEC.la: $(libDI_GreedyH_ALTIVEC_la_OBJECTS) $(libDI_GreedyH_ALTIVEC_la_DEPENDENCIES) $(LINK) $(am_libDI_GreedyH_ALTIVEC_la_rpath) $(libDI_GreedyH_ALTIVEC_la_LDFLAGS) $(libDI_GreedyH_ALTIVEC_la_OBJECTS) $(libDI_GreedyH_ALTIVEC_la_LIBADD) $(LIBS) libDI_GreedyH_MMX.la: $(libDI_GreedyH_MMX_la_OBJECTS) $(libDI_GreedyH_MMX_la_DEPENDENCIES) $(LINK) $(am_libDI_GreedyH_MMX_la_rpath) $(libDI_GreedyH_MMX_la_LDFLAGS) $(libDI_GreedyH_MMX_la_OBJECTS) $(libDI_GreedyH_MMX_la_LIBADD) $(LIBS) libDI_GreedyH_SSE.la: $(libDI_GreedyH_SSE_la_OBJECTS) $(libDI_GreedyH_SSE_la_DEPENDENCIES) $(LINK) $(am_libDI_GreedyH_SSE_la_rpath) $(libDI_GreedyH_SSE_la_LDFLAGS) $(libDI_GreedyH_SSE_la_OBJECTS) $(libDI_GreedyH_SSE_la_LIBADD) $(LIBS) libDI_GreedyH_SSE2.la: $(libDI_GreedyH_SSE2_la_OBJECTS) $(libDI_GreedyH_SSE2_la_DEPENDENCIES) $(LINK) $(am_libDI_GreedyH_SSE2_la_rpath) $(libDI_GreedyH_SSE2_la_LDFLAGS) $(libDI_GreedyH_SSE2_la_OBJECTS) $(libDI_GreedyH_SSE2_la_LIBADD) $(LIBS) libDI_GreedyH_SSE3.la: $(libDI_GreedyH_SSE3_la_OBJECTS) $(libDI_GreedyH_SSE3_la_DEPENDENCIES) $(LINK) $(am_libDI_GreedyH_SSE3_la_rpath) $(libDI_GreedyH_SSE3_la_LDFLAGS) $(libDI_GreedyH_SSE3_la_OBJECTS) $(libDI_GreedyH_SSE3_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libDI_GreedyH_3DNOW_la-DI_GreedyHF.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libDI_GreedyH_3DNOW_la-DI_GreedyHM.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libDI_GreedyH_3DNOW_la-DI_GreedyHMPulldown.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libDI_GreedyH_3DNOW_la-DI_GreedyHM_V.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libDI_GreedyH_ALTIVEC_la-DI_GreedyHF.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libDI_GreedyH_ALTIVEC_la-DI_GreedyHM.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libDI_GreedyH_ALTIVEC_la-DI_GreedyHMPulldown.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libDI_GreedyH_ALTIVEC_la-DI_GreedyHM_V.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libDI_GreedyH_MMX_la-DI_GreedyHF.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libDI_GreedyH_MMX_la-DI_GreedyHM.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libDI_GreedyH_MMX_la-DI_GreedyHMPulldown.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libDI_GreedyH_MMX_la-DI_GreedyHM_V.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libDI_GreedyH_SSE2_la-DI_GreedyHF.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libDI_GreedyH_SSE2_la-DI_GreedyHM.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libDI_GreedyH_SSE2_la-DI_GreedyHMPulldown.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libDI_GreedyH_SSE2_la-DI_GreedyHM_V.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libDI_GreedyH_SSE3_la-DI_GreedyHF.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libDI_GreedyH_SSE3_la-DI_GreedyHM.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libDI_GreedyH_SSE3_la-DI_GreedyHMPulldown.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libDI_GreedyH_SSE3_la-DI_GreedyHM_V.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libDI_GreedyH_SSE_la-DI_GreedyHF.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libDI_GreedyH_SSE_la-DI_GreedyHM.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libDI_GreedyH_SSE_la-DI_GreedyHMPulldown.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libDI_GreedyH_SSE_la-DI_GreedyHM_V.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libDI_GreedyH_la-DI_GreedyH.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libDI_GreedyH_la-DI_GreedyHM.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libDI_GreedyH_la-DI_GreedyHMPulldown.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< libDI_GreedyH_la-DI_GreedyH.lo: DI_GreedyH.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_GreedyH_la_CFLAGS) $(CFLAGS) -MT libDI_GreedyH_la-DI_GreedyH.lo -MD -MP -MF "$(DEPDIR)/libDI_GreedyH_la-DI_GreedyH.Tpo" -c -o libDI_GreedyH_la-DI_GreedyH.lo `test -f 'DI_GreedyH.c' || echo '$(srcdir)/'`DI_GreedyH.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libDI_GreedyH_la-DI_GreedyH.Tpo" "$(DEPDIR)/libDI_GreedyH_la-DI_GreedyH.Plo"; else rm -f "$(DEPDIR)/libDI_GreedyH_la-DI_GreedyH.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='DI_GreedyH.c' object='libDI_GreedyH_la-DI_GreedyH.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_GreedyH_la_CFLAGS) $(CFLAGS) -c -o libDI_GreedyH_la-DI_GreedyH.lo `test -f 'DI_GreedyH.c' || echo '$(srcdir)/'`DI_GreedyH.c libDI_GreedyH_la-DI_GreedyHM.lo: DI_GreedyHM.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_GreedyH_la_CFLAGS) $(CFLAGS) -MT libDI_GreedyH_la-DI_GreedyHM.lo -MD -MP -MF "$(DEPDIR)/libDI_GreedyH_la-DI_GreedyHM.Tpo" -c -o libDI_GreedyH_la-DI_GreedyHM.lo `test -f 'DI_GreedyHM.c' || echo '$(srcdir)/'`DI_GreedyHM.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libDI_GreedyH_la-DI_GreedyHM.Tpo" "$(DEPDIR)/libDI_GreedyH_la-DI_GreedyHM.Plo"; else rm -f "$(DEPDIR)/libDI_GreedyH_la-DI_GreedyHM.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='DI_GreedyHM.c' object='libDI_GreedyH_la-DI_GreedyHM.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_GreedyH_la_CFLAGS) $(CFLAGS) -c -o libDI_GreedyH_la-DI_GreedyHM.lo `test -f 'DI_GreedyHM.c' || echo '$(srcdir)/'`DI_GreedyHM.c libDI_GreedyH_la-DI_GreedyHMPulldown.lo: DI_GreedyHMPulldown.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_GreedyH_la_CFLAGS) $(CFLAGS) -MT libDI_GreedyH_la-DI_GreedyHMPulldown.lo -MD -MP -MF "$(DEPDIR)/libDI_GreedyH_la-DI_GreedyHMPulldown.Tpo" -c -o libDI_GreedyH_la-DI_GreedyHMPulldown.lo `test -f 'DI_GreedyHMPulldown.c' || echo '$(srcdir)/'`DI_GreedyHMPulldown.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libDI_GreedyH_la-DI_GreedyHMPulldown.Tpo" "$(DEPDIR)/libDI_GreedyH_la-DI_GreedyHMPulldown.Plo"; else rm -f "$(DEPDIR)/libDI_GreedyH_la-DI_GreedyHMPulldown.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='DI_GreedyHMPulldown.c' object='libDI_GreedyH_la-DI_GreedyHMPulldown.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_GreedyH_la_CFLAGS) $(CFLAGS) -c -o libDI_GreedyH_la-DI_GreedyHMPulldown.lo `test -f 'DI_GreedyHMPulldown.c' || echo '$(srcdir)/'`DI_GreedyHMPulldown.c libDI_GreedyH_3DNOW_la-DI_GreedyHF.lo: DI_GreedyHF.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_GreedyH_3DNOW_la_CFLAGS) $(CFLAGS) -MT libDI_GreedyH_3DNOW_la-DI_GreedyHF.lo -MD -MP -MF "$(DEPDIR)/libDI_GreedyH_3DNOW_la-DI_GreedyHF.Tpo" -c -o libDI_GreedyH_3DNOW_la-DI_GreedyHF.lo `test -f 'DI_GreedyHF.c' || echo '$(srcdir)/'`DI_GreedyHF.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libDI_GreedyH_3DNOW_la-DI_GreedyHF.Tpo" "$(DEPDIR)/libDI_GreedyH_3DNOW_la-DI_GreedyHF.Plo"; else rm -f "$(DEPDIR)/libDI_GreedyH_3DNOW_la-DI_GreedyHF.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='DI_GreedyHF.c' object='libDI_GreedyH_3DNOW_la-DI_GreedyHF.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_GreedyH_3DNOW_la_CFLAGS) $(CFLAGS) -c -o libDI_GreedyH_3DNOW_la-DI_GreedyHF.lo `test -f 'DI_GreedyHF.c' || echo '$(srcdir)/'`DI_GreedyHF.c libDI_GreedyH_3DNOW_la-DI_GreedyHM.lo: DI_GreedyHM.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_GreedyH_3DNOW_la_CFLAGS) $(CFLAGS) -MT libDI_GreedyH_3DNOW_la-DI_GreedyHM.lo -MD -MP -MF "$(DEPDIR)/libDI_GreedyH_3DNOW_la-DI_GreedyHM.Tpo" -c -o libDI_GreedyH_3DNOW_la-DI_GreedyHM.lo `test -f 'DI_GreedyHM.c' || echo '$(srcdir)/'`DI_GreedyHM.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libDI_GreedyH_3DNOW_la-DI_GreedyHM.Tpo" "$(DEPDIR)/libDI_GreedyH_3DNOW_la-DI_GreedyHM.Plo"; else rm -f "$(DEPDIR)/libDI_GreedyH_3DNOW_la-DI_GreedyHM.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='DI_GreedyHM.c' object='libDI_GreedyH_3DNOW_la-DI_GreedyHM.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_GreedyH_3DNOW_la_CFLAGS) $(CFLAGS) -c -o libDI_GreedyH_3DNOW_la-DI_GreedyHM.lo `test -f 'DI_GreedyHM.c' || echo '$(srcdir)/'`DI_GreedyHM.c libDI_GreedyH_3DNOW_la-DI_GreedyHMPulldown.lo: DI_GreedyHMPulldown.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_GreedyH_3DNOW_la_CFLAGS) $(CFLAGS) -MT libDI_GreedyH_3DNOW_la-DI_GreedyHMPulldown.lo -MD -MP -MF "$(DEPDIR)/libDI_GreedyH_3DNOW_la-DI_GreedyHMPulldown.Tpo" -c -o libDI_GreedyH_3DNOW_la-DI_GreedyHMPulldown.lo `test -f 'DI_GreedyHMPulldown.c' || echo '$(srcdir)/'`DI_GreedyHMPulldown.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libDI_GreedyH_3DNOW_la-DI_GreedyHMPulldown.Tpo" "$(DEPDIR)/libDI_GreedyH_3DNOW_la-DI_GreedyHMPulldown.Plo"; else rm -f "$(DEPDIR)/libDI_GreedyH_3DNOW_la-DI_GreedyHMPulldown.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='DI_GreedyHMPulldown.c' object='libDI_GreedyH_3DNOW_la-DI_GreedyHMPulldown.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_GreedyH_3DNOW_la_CFLAGS) $(CFLAGS) -c -o libDI_GreedyH_3DNOW_la-DI_GreedyHMPulldown.lo `test -f 'DI_GreedyHMPulldown.c' || echo '$(srcdir)/'`DI_GreedyHMPulldown.c libDI_GreedyH_3DNOW_la-DI_GreedyHM_V.lo: DI_GreedyHM_V.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_GreedyH_3DNOW_la_CFLAGS) $(CFLAGS) -MT libDI_GreedyH_3DNOW_la-DI_GreedyHM_V.lo -MD -MP -MF "$(DEPDIR)/libDI_GreedyH_3DNOW_la-DI_GreedyHM_V.Tpo" -c -o libDI_GreedyH_3DNOW_la-DI_GreedyHM_V.lo `test -f 'DI_GreedyHM_V.c' || echo '$(srcdir)/'`DI_GreedyHM_V.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libDI_GreedyH_3DNOW_la-DI_GreedyHM_V.Tpo" "$(DEPDIR)/libDI_GreedyH_3DNOW_la-DI_GreedyHM_V.Plo"; else rm -f "$(DEPDIR)/libDI_GreedyH_3DNOW_la-DI_GreedyHM_V.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='DI_GreedyHM_V.c' object='libDI_GreedyH_3DNOW_la-DI_GreedyHM_V.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_GreedyH_3DNOW_la_CFLAGS) $(CFLAGS) -c -o libDI_GreedyH_3DNOW_la-DI_GreedyHM_V.lo `test -f 'DI_GreedyHM_V.c' || echo '$(srcdir)/'`DI_GreedyHM_V.c libDI_GreedyH_ALTIVEC_la-DI_GreedyHF.lo: DI_GreedyHF.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_GreedyH_ALTIVEC_la_CFLAGS) $(CFLAGS) -MT libDI_GreedyH_ALTIVEC_la-DI_GreedyHF.lo -MD -MP -MF "$(DEPDIR)/libDI_GreedyH_ALTIVEC_la-DI_GreedyHF.Tpo" -c -o libDI_GreedyH_ALTIVEC_la-DI_GreedyHF.lo `test -f 'DI_GreedyHF.c' || echo '$(srcdir)/'`DI_GreedyHF.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libDI_GreedyH_ALTIVEC_la-DI_GreedyHF.Tpo" "$(DEPDIR)/libDI_GreedyH_ALTIVEC_la-DI_GreedyHF.Plo"; else rm -f "$(DEPDIR)/libDI_GreedyH_ALTIVEC_la-DI_GreedyHF.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='DI_GreedyHF.c' object='libDI_GreedyH_ALTIVEC_la-DI_GreedyHF.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_GreedyH_ALTIVEC_la_CFLAGS) $(CFLAGS) -c -o libDI_GreedyH_ALTIVEC_la-DI_GreedyHF.lo `test -f 'DI_GreedyHF.c' || echo '$(srcdir)/'`DI_GreedyHF.c libDI_GreedyH_ALTIVEC_la-DI_GreedyHM.lo: DI_GreedyHM.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_GreedyH_ALTIVEC_la_CFLAGS) $(CFLAGS) -MT libDI_GreedyH_ALTIVEC_la-DI_GreedyHM.lo -MD -MP -MF "$(DEPDIR)/libDI_GreedyH_ALTIVEC_la-DI_GreedyHM.Tpo" -c -o libDI_GreedyH_ALTIVEC_la-DI_GreedyHM.lo `test -f 'DI_GreedyHM.c' || echo '$(srcdir)/'`DI_GreedyHM.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libDI_GreedyH_ALTIVEC_la-DI_GreedyHM.Tpo" "$(DEPDIR)/libDI_GreedyH_ALTIVEC_la-DI_GreedyHM.Plo"; else rm -f "$(DEPDIR)/libDI_GreedyH_ALTIVEC_la-DI_GreedyHM.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='DI_GreedyHM.c' object='libDI_GreedyH_ALTIVEC_la-DI_GreedyHM.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_GreedyH_ALTIVEC_la_CFLAGS) $(CFLAGS) -c -o libDI_GreedyH_ALTIVEC_la-DI_GreedyHM.lo `test -f 'DI_GreedyHM.c' || echo '$(srcdir)/'`DI_GreedyHM.c libDI_GreedyH_ALTIVEC_la-DI_GreedyHMPulldown.lo: DI_GreedyHMPulldown.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_GreedyH_ALTIVEC_la_CFLAGS) $(CFLAGS) -MT libDI_GreedyH_ALTIVEC_la-DI_GreedyHMPulldown.lo -MD -MP -MF "$(DEPDIR)/libDI_GreedyH_ALTIVEC_la-DI_GreedyHMPulldown.Tpo" -c -o libDI_GreedyH_ALTIVEC_la-DI_GreedyHMPulldown.lo `test -f 'DI_GreedyHMPulldown.c' || echo '$(srcdir)/'`DI_GreedyHMPulldown.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libDI_GreedyH_ALTIVEC_la-DI_GreedyHMPulldown.Tpo" "$(DEPDIR)/libDI_GreedyH_ALTIVEC_la-DI_GreedyHMPulldown.Plo"; else rm -f "$(DEPDIR)/libDI_GreedyH_ALTIVEC_la-DI_GreedyHMPulldown.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='DI_GreedyHMPulldown.c' object='libDI_GreedyH_ALTIVEC_la-DI_GreedyHMPulldown.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_GreedyH_ALTIVEC_la_CFLAGS) $(CFLAGS) -c -o libDI_GreedyH_ALTIVEC_la-DI_GreedyHMPulldown.lo `test -f 'DI_GreedyHMPulldown.c' || echo '$(srcdir)/'`DI_GreedyHMPulldown.c libDI_GreedyH_ALTIVEC_la-DI_GreedyHM_V.lo: DI_GreedyHM_V.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_GreedyH_ALTIVEC_la_CFLAGS) $(CFLAGS) -MT libDI_GreedyH_ALTIVEC_la-DI_GreedyHM_V.lo -MD -MP -MF "$(DEPDIR)/libDI_GreedyH_ALTIVEC_la-DI_GreedyHM_V.Tpo" -c -o libDI_GreedyH_ALTIVEC_la-DI_GreedyHM_V.lo `test -f 'DI_GreedyHM_V.c' || echo '$(srcdir)/'`DI_GreedyHM_V.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libDI_GreedyH_ALTIVEC_la-DI_GreedyHM_V.Tpo" "$(DEPDIR)/libDI_GreedyH_ALTIVEC_la-DI_GreedyHM_V.Plo"; else rm -f "$(DEPDIR)/libDI_GreedyH_ALTIVEC_la-DI_GreedyHM_V.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='DI_GreedyHM_V.c' object='libDI_GreedyH_ALTIVEC_la-DI_GreedyHM_V.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_GreedyH_ALTIVEC_la_CFLAGS) $(CFLAGS) -c -o libDI_GreedyH_ALTIVEC_la-DI_GreedyHM_V.lo `test -f 'DI_GreedyHM_V.c' || echo '$(srcdir)/'`DI_GreedyHM_V.c libDI_GreedyH_MMX_la-DI_GreedyHF.lo: DI_GreedyHF.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_GreedyH_MMX_la_CFLAGS) $(CFLAGS) -MT libDI_GreedyH_MMX_la-DI_GreedyHF.lo -MD -MP -MF "$(DEPDIR)/libDI_GreedyH_MMX_la-DI_GreedyHF.Tpo" -c -o libDI_GreedyH_MMX_la-DI_GreedyHF.lo `test -f 'DI_GreedyHF.c' || echo '$(srcdir)/'`DI_GreedyHF.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libDI_GreedyH_MMX_la-DI_GreedyHF.Tpo" "$(DEPDIR)/libDI_GreedyH_MMX_la-DI_GreedyHF.Plo"; else rm -f "$(DEPDIR)/libDI_GreedyH_MMX_la-DI_GreedyHF.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='DI_GreedyHF.c' object='libDI_GreedyH_MMX_la-DI_GreedyHF.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_GreedyH_MMX_la_CFLAGS) $(CFLAGS) -c -o libDI_GreedyH_MMX_la-DI_GreedyHF.lo `test -f 'DI_GreedyHF.c' || echo '$(srcdir)/'`DI_GreedyHF.c libDI_GreedyH_MMX_la-DI_GreedyHM.lo: DI_GreedyHM.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_GreedyH_MMX_la_CFLAGS) $(CFLAGS) -MT libDI_GreedyH_MMX_la-DI_GreedyHM.lo -MD -MP -MF "$(DEPDIR)/libDI_GreedyH_MMX_la-DI_GreedyHM.Tpo" -c -o libDI_GreedyH_MMX_la-DI_GreedyHM.lo `test -f 'DI_GreedyHM.c' || echo '$(srcdir)/'`DI_GreedyHM.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libDI_GreedyH_MMX_la-DI_GreedyHM.Tpo" "$(DEPDIR)/libDI_GreedyH_MMX_la-DI_GreedyHM.Plo"; else rm -f "$(DEPDIR)/libDI_GreedyH_MMX_la-DI_GreedyHM.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='DI_GreedyHM.c' object='libDI_GreedyH_MMX_la-DI_GreedyHM.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_GreedyH_MMX_la_CFLAGS) $(CFLAGS) -c -o libDI_GreedyH_MMX_la-DI_GreedyHM.lo `test -f 'DI_GreedyHM.c' || echo '$(srcdir)/'`DI_GreedyHM.c libDI_GreedyH_MMX_la-DI_GreedyHMPulldown.lo: DI_GreedyHMPulldown.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_GreedyH_MMX_la_CFLAGS) $(CFLAGS) -MT libDI_GreedyH_MMX_la-DI_GreedyHMPulldown.lo -MD -MP -MF "$(DEPDIR)/libDI_GreedyH_MMX_la-DI_GreedyHMPulldown.Tpo" -c -o libDI_GreedyH_MMX_la-DI_GreedyHMPulldown.lo `test -f 'DI_GreedyHMPulldown.c' || echo '$(srcdir)/'`DI_GreedyHMPulldown.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libDI_GreedyH_MMX_la-DI_GreedyHMPulldown.Tpo" "$(DEPDIR)/libDI_GreedyH_MMX_la-DI_GreedyHMPulldown.Plo"; else rm -f "$(DEPDIR)/libDI_GreedyH_MMX_la-DI_GreedyHMPulldown.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='DI_GreedyHMPulldown.c' object='libDI_GreedyH_MMX_la-DI_GreedyHMPulldown.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_GreedyH_MMX_la_CFLAGS) $(CFLAGS) -c -o libDI_GreedyH_MMX_la-DI_GreedyHMPulldown.lo `test -f 'DI_GreedyHMPulldown.c' || echo '$(srcdir)/'`DI_GreedyHMPulldown.c libDI_GreedyH_MMX_la-DI_GreedyHM_V.lo: DI_GreedyHM_V.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_GreedyH_MMX_la_CFLAGS) $(CFLAGS) -MT libDI_GreedyH_MMX_la-DI_GreedyHM_V.lo -MD -MP -MF "$(DEPDIR)/libDI_GreedyH_MMX_la-DI_GreedyHM_V.Tpo" -c -o libDI_GreedyH_MMX_la-DI_GreedyHM_V.lo `test -f 'DI_GreedyHM_V.c' || echo '$(srcdir)/'`DI_GreedyHM_V.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libDI_GreedyH_MMX_la-DI_GreedyHM_V.Tpo" "$(DEPDIR)/libDI_GreedyH_MMX_la-DI_GreedyHM_V.Plo"; else rm -f "$(DEPDIR)/libDI_GreedyH_MMX_la-DI_GreedyHM_V.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='DI_GreedyHM_V.c' object='libDI_GreedyH_MMX_la-DI_GreedyHM_V.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_GreedyH_MMX_la_CFLAGS) $(CFLAGS) -c -o libDI_GreedyH_MMX_la-DI_GreedyHM_V.lo `test -f 'DI_GreedyHM_V.c' || echo '$(srcdir)/'`DI_GreedyHM_V.c libDI_GreedyH_SSE_la-DI_GreedyHF.lo: DI_GreedyHF.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_GreedyH_SSE_la_CFLAGS) $(CFLAGS) -MT libDI_GreedyH_SSE_la-DI_GreedyHF.lo -MD -MP -MF "$(DEPDIR)/libDI_GreedyH_SSE_la-DI_GreedyHF.Tpo" -c -o libDI_GreedyH_SSE_la-DI_GreedyHF.lo `test -f 'DI_GreedyHF.c' || echo '$(srcdir)/'`DI_GreedyHF.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libDI_GreedyH_SSE_la-DI_GreedyHF.Tpo" "$(DEPDIR)/libDI_GreedyH_SSE_la-DI_GreedyHF.Plo"; else rm -f "$(DEPDIR)/libDI_GreedyH_SSE_la-DI_GreedyHF.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='DI_GreedyHF.c' object='libDI_GreedyH_SSE_la-DI_GreedyHF.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_GreedyH_SSE_la_CFLAGS) $(CFLAGS) -c -o libDI_GreedyH_SSE_la-DI_GreedyHF.lo `test -f 'DI_GreedyHF.c' || echo '$(srcdir)/'`DI_GreedyHF.c libDI_GreedyH_SSE_la-DI_GreedyHM.lo: DI_GreedyHM.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_GreedyH_SSE_la_CFLAGS) $(CFLAGS) -MT libDI_GreedyH_SSE_la-DI_GreedyHM.lo -MD -MP -MF "$(DEPDIR)/libDI_GreedyH_SSE_la-DI_GreedyHM.Tpo" -c -o libDI_GreedyH_SSE_la-DI_GreedyHM.lo `test -f 'DI_GreedyHM.c' || echo '$(srcdir)/'`DI_GreedyHM.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libDI_GreedyH_SSE_la-DI_GreedyHM.Tpo" "$(DEPDIR)/libDI_GreedyH_SSE_la-DI_GreedyHM.Plo"; else rm -f "$(DEPDIR)/libDI_GreedyH_SSE_la-DI_GreedyHM.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='DI_GreedyHM.c' object='libDI_GreedyH_SSE_la-DI_GreedyHM.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_GreedyH_SSE_la_CFLAGS) $(CFLAGS) -c -o libDI_GreedyH_SSE_la-DI_GreedyHM.lo `test -f 'DI_GreedyHM.c' || echo '$(srcdir)/'`DI_GreedyHM.c libDI_GreedyH_SSE_la-DI_GreedyHMPulldown.lo: DI_GreedyHMPulldown.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_GreedyH_SSE_la_CFLAGS) $(CFLAGS) -MT libDI_GreedyH_SSE_la-DI_GreedyHMPulldown.lo -MD -MP -MF "$(DEPDIR)/libDI_GreedyH_SSE_la-DI_GreedyHMPulldown.Tpo" -c -o libDI_GreedyH_SSE_la-DI_GreedyHMPulldown.lo `test -f 'DI_GreedyHMPulldown.c' || echo '$(srcdir)/'`DI_GreedyHMPulldown.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libDI_GreedyH_SSE_la-DI_GreedyHMPulldown.Tpo" "$(DEPDIR)/libDI_GreedyH_SSE_la-DI_GreedyHMPulldown.Plo"; else rm -f "$(DEPDIR)/libDI_GreedyH_SSE_la-DI_GreedyHMPulldown.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='DI_GreedyHMPulldown.c' object='libDI_GreedyH_SSE_la-DI_GreedyHMPulldown.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_GreedyH_SSE_la_CFLAGS) $(CFLAGS) -c -o libDI_GreedyH_SSE_la-DI_GreedyHMPulldown.lo `test -f 'DI_GreedyHMPulldown.c' || echo '$(srcdir)/'`DI_GreedyHMPulldown.c libDI_GreedyH_SSE_la-DI_GreedyHM_V.lo: DI_GreedyHM_V.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_GreedyH_SSE_la_CFLAGS) $(CFLAGS) -MT libDI_GreedyH_SSE_la-DI_GreedyHM_V.lo -MD -MP -MF "$(DEPDIR)/libDI_GreedyH_SSE_la-DI_GreedyHM_V.Tpo" -c -o libDI_GreedyH_SSE_la-DI_GreedyHM_V.lo `test -f 'DI_GreedyHM_V.c' || echo '$(srcdir)/'`DI_GreedyHM_V.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libDI_GreedyH_SSE_la-DI_GreedyHM_V.Tpo" "$(DEPDIR)/libDI_GreedyH_SSE_la-DI_GreedyHM_V.Plo"; else rm -f "$(DEPDIR)/libDI_GreedyH_SSE_la-DI_GreedyHM_V.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='DI_GreedyHM_V.c' object='libDI_GreedyH_SSE_la-DI_GreedyHM_V.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_GreedyH_SSE_la_CFLAGS) $(CFLAGS) -c -o libDI_GreedyH_SSE_la-DI_GreedyHM_V.lo `test -f 'DI_GreedyHM_V.c' || echo '$(srcdir)/'`DI_GreedyHM_V.c libDI_GreedyH_SSE2_la-DI_GreedyHF.lo: DI_GreedyHF.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_GreedyH_SSE2_la_CFLAGS) $(CFLAGS) -MT libDI_GreedyH_SSE2_la-DI_GreedyHF.lo -MD -MP -MF "$(DEPDIR)/libDI_GreedyH_SSE2_la-DI_GreedyHF.Tpo" -c -o libDI_GreedyH_SSE2_la-DI_GreedyHF.lo `test -f 'DI_GreedyHF.c' || echo '$(srcdir)/'`DI_GreedyHF.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libDI_GreedyH_SSE2_la-DI_GreedyHF.Tpo" "$(DEPDIR)/libDI_GreedyH_SSE2_la-DI_GreedyHF.Plo"; else rm -f "$(DEPDIR)/libDI_GreedyH_SSE2_la-DI_GreedyHF.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='DI_GreedyHF.c' object='libDI_GreedyH_SSE2_la-DI_GreedyHF.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_GreedyH_SSE2_la_CFLAGS) $(CFLAGS) -c -o libDI_GreedyH_SSE2_la-DI_GreedyHF.lo `test -f 'DI_GreedyHF.c' || echo '$(srcdir)/'`DI_GreedyHF.c libDI_GreedyH_SSE2_la-DI_GreedyHM.lo: DI_GreedyHM.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_GreedyH_SSE2_la_CFLAGS) $(CFLAGS) -MT libDI_GreedyH_SSE2_la-DI_GreedyHM.lo -MD -MP -MF "$(DEPDIR)/libDI_GreedyH_SSE2_la-DI_GreedyHM.Tpo" -c -o libDI_GreedyH_SSE2_la-DI_GreedyHM.lo `test -f 'DI_GreedyHM.c' || echo '$(srcdir)/'`DI_GreedyHM.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libDI_GreedyH_SSE2_la-DI_GreedyHM.Tpo" "$(DEPDIR)/libDI_GreedyH_SSE2_la-DI_GreedyHM.Plo"; else rm -f "$(DEPDIR)/libDI_GreedyH_SSE2_la-DI_GreedyHM.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='DI_GreedyHM.c' object='libDI_GreedyH_SSE2_la-DI_GreedyHM.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_GreedyH_SSE2_la_CFLAGS) $(CFLAGS) -c -o libDI_GreedyH_SSE2_la-DI_GreedyHM.lo `test -f 'DI_GreedyHM.c' || echo '$(srcdir)/'`DI_GreedyHM.c libDI_GreedyH_SSE2_la-DI_GreedyHMPulldown.lo: DI_GreedyHMPulldown.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_GreedyH_SSE2_la_CFLAGS) $(CFLAGS) -MT libDI_GreedyH_SSE2_la-DI_GreedyHMPulldown.lo -MD -MP -MF "$(DEPDIR)/libDI_GreedyH_SSE2_la-DI_GreedyHMPulldown.Tpo" -c -o libDI_GreedyH_SSE2_la-DI_GreedyHMPulldown.lo `test -f 'DI_GreedyHMPulldown.c' || echo '$(srcdir)/'`DI_GreedyHMPulldown.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libDI_GreedyH_SSE2_la-DI_GreedyHMPulldown.Tpo" "$(DEPDIR)/libDI_GreedyH_SSE2_la-DI_GreedyHMPulldown.Plo"; else rm -f "$(DEPDIR)/libDI_GreedyH_SSE2_la-DI_GreedyHMPulldown.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='DI_GreedyHMPulldown.c' object='libDI_GreedyH_SSE2_la-DI_GreedyHMPulldown.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_GreedyH_SSE2_la_CFLAGS) $(CFLAGS) -c -o libDI_GreedyH_SSE2_la-DI_GreedyHMPulldown.lo `test -f 'DI_GreedyHMPulldown.c' || echo '$(srcdir)/'`DI_GreedyHMPulldown.c libDI_GreedyH_SSE2_la-DI_GreedyHM_V.lo: DI_GreedyHM_V.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_GreedyH_SSE2_la_CFLAGS) $(CFLAGS) -MT libDI_GreedyH_SSE2_la-DI_GreedyHM_V.lo -MD -MP -MF "$(DEPDIR)/libDI_GreedyH_SSE2_la-DI_GreedyHM_V.Tpo" -c -o libDI_GreedyH_SSE2_la-DI_GreedyHM_V.lo `test -f 'DI_GreedyHM_V.c' || echo '$(srcdir)/'`DI_GreedyHM_V.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libDI_GreedyH_SSE2_la-DI_GreedyHM_V.Tpo" "$(DEPDIR)/libDI_GreedyH_SSE2_la-DI_GreedyHM_V.Plo"; else rm -f "$(DEPDIR)/libDI_GreedyH_SSE2_la-DI_GreedyHM_V.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='DI_GreedyHM_V.c' object='libDI_GreedyH_SSE2_la-DI_GreedyHM_V.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_GreedyH_SSE2_la_CFLAGS) $(CFLAGS) -c -o libDI_GreedyH_SSE2_la-DI_GreedyHM_V.lo `test -f 'DI_GreedyHM_V.c' || echo '$(srcdir)/'`DI_GreedyHM_V.c libDI_GreedyH_SSE3_la-DI_GreedyHF.lo: DI_GreedyHF.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_GreedyH_SSE3_la_CFLAGS) $(CFLAGS) -MT libDI_GreedyH_SSE3_la-DI_GreedyHF.lo -MD -MP -MF "$(DEPDIR)/libDI_GreedyH_SSE3_la-DI_GreedyHF.Tpo" -c -o libDI_GreedyH_SSE3_la-DI_GreedyHF.lo `test -f 'DI_GreedyHF.c' || echo '$(srcdir)/'`DI_GreedyHF.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libDI_GreedyH_SSE3_la-DI_GreedyHF.Tpo" "$(DEPDIR)/libDI_GreedyH_SSE3_la-DI_GreedyHF.Plo"; else rm -f "$(DEPDIR)/libDI_GreedyH_SSE3_la-DI_GreedyHF.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='DI_GreedyHF.c' object='libDI_GreedyH_SSE3_la-DI_GreedyHF.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_GreedyH_SSE3_la_CFLAGS) $(CFLAGS) -c -o libDI_GreedyH_SSE3_la-DI_GreedyHF.lo `test -f 'DI_GreedyHF.c' || echo '$(srcdir)/'`DI_GreedyHF.c libDI_GreedyH_SSE3_la-DI_GreedyHM.lo: DI_GreedyHM.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_GreedyH_SSE3_la_CFLAGS) $(CFLAGS) -MT libDI_GreedyH_SSE3_la-DI_GreedyHM.lo -MD -MP -MF "$(DEPDIR)/libDI_GreedyH_SSE3_la-DI_GreedyHM.Tpo" -c -o libDI_GreedyH_SSE3_la-DI_GreedyHM.lo `test -f 'DI_GreedyHM.c' || echo '$(srcdir)/'`DI_GreedyHM.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libDI_GreedyH_SSE3_la-DI_GreedyHM.Tpo" "$(DEPDIR)/libDI_GreedyH_SSE3_la-DI_GreedyHM.Plo"; else rm -f "$(DEPDIR)/libDI_GreedyH_SSE3_la-DI_GreedyHM.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='DI_GreedyHM.c' object='libDI_GreedyH_SSE3_la-DI_GreedyHM.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_GreedyH_SSE3_la_CFLAGS) $(CFLAGS) -c -o libDI_GreedyH_SSE3_la-DI_GreedyHM.lo `test -f 'DI_GreedyHM.c' || echo '$(srcdir)/'`DI_GreedyHM.c libDI_GreedyH_SSE3_la-DI_GreedyHMPulldown.lo: DI_GreedyHMPulldown.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_GreedyH_SSE3_la_CFLAGS) $(CFLAGS) -MT libDI_GreedyH_SSE3_la-DI_GreedyHMPulldown.lo -MD -MP -MF "$(DEPDIR)/libDI_GreedyH_SSE3_la-DI_GreedyHMPulldown.Tpo" -c -o libDI_GreedyH_SSE3_la-DI_GreedyHMPulldown.lo `test -f 'DI_GreedyHMPulldown.c' || echo '$(srcdir)/'`DI_GreedyHMPulldown.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libDI_GreedyH_SSE3_la-DI_GreedyHMPulldown.Tpo" "$(DEPDIR)/libDI_GreedyH_SSE3_la-DI_GreedyHMPulldown.Plo"; else rm -f "$(DEPDIR)/libDI_GreedyH_SSE3_la-DI_GreedyHMPulldown.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='DI_GreedyHMPulldown.c' object='libDI_GreedyH_SSE3_la-DI_GreedyHMPulldown.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_GreedyH_SSE3_la_CFLAGS) $(CFLAGS) -c -o libDI_GreedyH_SSE3_la-DI_GreedyHMPulldown.lo `test -f 'DI_GreedyHMPulldown.c' || echo '$(srcdir)/'`DI_GreedyHMPulldown.c libDI_GreedyH_SSE3_la-DI_GreedyHM_V.lo: DI_GreedyHM_V.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_GreedyH_SSE3_la_CFLAGS) $(CFLAGS) -MT libDI_GreedyH_SSE3_la-DI_GreedyHM_V.lo -MD -MP -MF "$(DEPDIR)/libDI_GreedyH_SSE3_la-DI_GreedyHM_V.Tpo" -c -o libDI_GreedyH_SSE3_la-DI_GreedyHM_V.lo `test -f 'DI_GreedyHM_V.c' || echo '$(srcdir)/'`DI_GreedyHM_V.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libDI_GreedyH_SSE3_la-DI_GreedyHM_V.Tpo" "$(DEPDIR)/libDI_GreedyH_SSE3_la-DI_GreedyHM_V.Plo"; else rm -f "$(DEPDIR)/libDI_GreedyH_SSE3_la-DI_GreedyHM_V.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='DI_GreedyHM_V.c' object='libDI_GreedyH_SSE3_la-DI_GreedyHM_V.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDI_GreedyH_SSE3_la_CFLAGS) $(CFLAGS) -c -o libDI_GreedyH_SSE3_la-DI_GreedyHM_V.lo `test -f 'DI_GreedyHM_V.c' || echo '$(srcdir)/'`DI_GreedyHM_V.c mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool uninstall-info-am: ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-libtool distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-exec-am: install-info: install-info-am install-man: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-info-am .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLTLIBRARIES ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-exec \ install-exec-am install-info install-info-am install-man \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags uninstall uninstall-am \ uninstall-info-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: zapping-0.10cvs6/plugins/deinterlace/DI_GreedyH/DI_GreedyHM_V.c 644 764 144 13373 10260116706 17347 /*/////////////////////////////////////////////////////////////////////////// // $Id: DI_GreedyHM_V.c,v 1.2 2005/06/28 00:45:58 mschimek Exp $ ///////////////////////////////////////////////////////////////////////////// // Copyright (c) 2001 Tom Barry. All rights reserved. // Copyright (C) 2005 Michael H. Schimek ///////////////////////////////////////////////////////////////////////////// // // This file is subject to the terms of the GNU General Public License as // published by the Free Software Foundation. A copy of this license is // included with this software distribution in the file COPYING. If you // do not have a copy, you may obtain a copy by writing to the Free // Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. // // This software 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 // ///////////////////////////////////////////////////////////////////////////// // Change Log // // Date Developer Changes // // 01 Jul 2001 Tom Barry Break out Greedy (High Motion) // Deinterlace, w/Vert Filter // ///////////////////////////////////////////////////////////////////////////// // CVS Log // // $Log: DI_GreedyHM_V.c,v $ // Revision 1.2 2005/06/28 00:45:58 mschimek // Converted to vector intrinsics. Added support for 3DNow, SSE2, x86-64 // and AltiVec. Removed ununsed DScaler code. Cleaned up. All options work // now. // // Revision 1.1.2.4 2005/06/17 02:54:20 mschimek // *** empty log message *** // // Revision 1.1.2.3 2005/05/31 02:40:34 mschimek // *** empty log message *** // // Revision 1.1.2.2 2005/05/17 19:58:32 mschimek // *** empty log message *** // // Revision 1.1.2.1 2005/05/05 09:46:00 mschimek // *** empty log message *** // // Revision 1.1 2005/01/08 14:54:23 mschimek // *** empty log message *** // // Revision 1.5 2001/10/02 17:44:41 trbarry // Changes to be compatible with the Avisynth filter version // // Revision 1.4 2001/08/17 19:30:55 trbarry // Fix OBO error in GreedyH Vertical Filter // // Revision 1.3 2001/08/17 17:08:42 trbarry // GreedyH performance enhancement: // // Unroll loop to support Write Combining in Vertical Filter // (curiously this now peforms better than without V. Filter) // // Revision 1.2 2001/07/25 12:04:31 adcockj // Moved Control stuff into DS_Control.h // Added $Id and $Log to comment blocks as per standards // ///////////////////////////////////////////////////////////////////////////*/ /* This version handles Greedy High Motion with/without Vertical Filtering */ #include "windows.h" #include "DI_GreedyHM.h" #ifndef DI_GREEDYHM_V_ASSERT # define DI_GREEDYHM_V_ASSERT 0 #endif static always_inline BOOL DI_GreedyHM_V_template (TDeinterlaceInfo * pInfo, ghxc_mode mode) { vu8 MaxCombW; vu8 MotionThresholdW; v16 MotionSenseW; uint8_t *WeaveDest; /* dest for weave pixel */ uint8_t *CopyDest; /* other dest, copy or vertical filter */ const uint8_t *pL2; /* ptr into FieldStore[L2] */ const uint8_t *pFieldStoreBegin; const uint8_t *pFieldStoreEnd; long dL1; /* offset to FieldStore elem holding top known pixels */ long dL3; /* offset to FieldStore elem holding bottom known pxl */ long dL2; /* offset to FieldStore elem holding newest weave pixels */ long dCopySrc; unsigned int height; long dst_bpl; MaxCombW = vsplatu8 (GreedyHMaxComb); /* In a saturated subtraction UVMask clears the u, v bytes. */ MotionThresholdW = (vu8) vor ((v16) vsplat8 (GreedyMotionThreshold), UVMask); MotionSenseW = vsplat16 (GreedyMotionSense); pFieldStoreBegin = FieldStore; pFieldStoreEnd = FieldStore + pInfo->FieldHeight * FS_BYTES_PER_ROW; /* set up pointers, offsets */ SIMD_NAME (SetFsPtrs)(&dL1, &dL2, &dL3, &dCopySrc, &CopyDest, &WeaveDest, pInfo); /* Subscript to 1st of 2 possible weave pixels, our base addr */ dL2 &= 1 * sizeof (vu8); pL2 = pFieldStoreBegin + dL2; dL1 = dL1 - dL2; /* now is signed offset from pL2 */ dL3 = dL3 - dL2; height = pInfo->FieldHeight; if (WeaveDest == pInfo->Overlay) { /* on first line may just copy first and last */ SIMD_NAME (FieldStoreCopy)(WeaveDest, pFieldStoreBegin + dCopySrc, pInfo->LineLength); WeaveDest += 2 * pInfo->OverlayPitch; /* CopyDest already OK */ pL2 += FS_BYTES_PER_ROW; --height; } dst_bpl = CopyDest - WeaveDest; for (; height > 0; --height) { const uint8_t *pL1, *pL2P; long l1o, l3o; l1o = dL1; l3o = dL3; if (pL2 + l1o < pFieldStoreBegin) l1o = l3o; /* first line */ if (pL2 + l3o >= pFieldStoreEnd) l3o = l1o; /* last line */ pL1 = pL2 + l1o; pL2P = pL2 + FsPrevFrame (0); /* Field 0/1 -> 2/3 */ if (DI_GREEDYHM_V_ASSERT) { assert (pL1 >= pFieldStoreBegin && pL1 < pFieldStoreEnd); assert (pL2 >= pFieldStoreBegin && pL2 < pFieldStoreEnd); assert (pL2P >= pFieldStoreBegin && pL2P < pFieldStoreEnd); assert ((l3o - l1o) >= 0); } GreedyHXCore (WeaveDest, pL2, pL1, pL2P, pInfo->LineLength, dst_bpl, /* src_bpl = FS_BYTES_PER_ROW or 0 */ l3o - l1o, /* src_incr */ FS_FIELDS * sizeof (vu8), MaxCombW, MotionThresholdW, MotionSenseW, mode); WeaveDest += 2 * pInfo->OverlayPitch; pL2 += FS_BYTES_PER_ROW; } vempty (); return TRUE; } BOOL SIMD_NAME (DI_GreedyHM_NV) (TDeinterlaceInfo * pInfo) { /* No vertical averaging. */ return DI_GreedyHM_V_template (pInfo, STORE_WEAVE_ABOVE); } BOOL SIMD_NAME (DI_GreedyHM_V) (TDeinterlaceInfo * pInfo) { /* With vertical averaging. */ return DI_GreedyHM_V_template (pInfo, STORE_L1WEAVE_L3WEAVE); } /* Local Variables: c-basic-offset: 4 End: */ zapping-0.10cvs6/plugins/deinterlace/Makefile.am 644 764 144 1014 10327374516 15005 ## Process this file with automake to produce Makefile.in SUBDIRS = DI_GreedyH DI_Misc test plugindir = @PLUGIN_DEFAULT_DIR@ plugin_LTLIBRARIES = libdeinterlace.zapping.la AM_CFLAGS = \ @PLUGIN_DEFAULT_FLAGS@ \ -DZAPPING8 INCLUDES = \ -I$(top_srcdir) \ @COMMON_INCLUDES@ libdeinterlace_zapping_la_SOURCES = \ DS_ApiCommon.h \ DS_Control.h \ DS_Deinterlace.h \ main.c main.h \ preferences.c preferences.h \ windows.h libdeinterlace_zapping_la_LIBADD = \ DI_GreedyH/libDI_GreedyH.la \ DI_Misc/libDI_Misc.la zapping-0.10cvs6/plugins/deinterlace/Makefile.in 644 764 144 56050 10442575544 15052 # Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = ../.. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = plugins/deinterlace DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; am__installdirs = "$(DESTDIR)$(plugindir)" pluginLTLIBRARIES_INSTALL = $(INSTALL) LTLIBRARIES = $(plugin_LTLIBRARIES) libdeinterlace_zapping_la_DEPENDENCIES = DI_GreedyH/libDI_GreedyH.la \ DI_Misc/libDI_Misc.la am_libdeinterlace_zapping_la_OBJECTS = main.lo preferences.lo libdeinterlace_zapping_la_OBJECTS = \ $(am_libdeinterlace_zapping_la_OBJECTS) DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ SOURCES = $(libdeinterlace_zapping_la_SOURCES) DIST_SOURCES = $(libdeinterlace_zapping_la_SOURCES) RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-exec-recursive install-info-recursive \ install-recursive installcheck-recursive installdirs-recursive \ pdf-recursive ps-recursive uninstall-info-recursive \ uninstall-recursive ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ ARTS_CFLAGS = @ARTS_CFLAGS@ ARTS_LIBS = @ARTS_LIBS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BUILD_DEINTERLACE_PLUGIN_FALSE = @BUILD_DEINTERLACE_PLUGIN_FALSE@ BUILD_DEINTERLACE_PLUGIN_TRUE = @BUILD_DEINTERLACE_PLUGIN_TRUE@ BUILD_MAN_FALSE = @BUILD_MAN_FALSE@ BUILD_MAN_TRUE = @BUILD_MAN_TRUE@ CAN_COMPILE_3DNOW_FALSE = @CAN_COMPILE_3DNOW_FALSE@ CAN_COMPILE_3DNOW_TRUE = @CAN_COMPILE_3DNOW_TRUE@ CAN_COMPILE_ALTIVEC_FALSE = @CAN_COMPILE_ALTIVEC_FALSE@ CAN_COMPILE_ALTIVEC_TRUE = @CAN_COMPILE_ALTIVEC_TRUE@ CAN_COMPILE_MMX_FALSE = @CAN_COMPILE_MMX_FALSE@ CAN_COMPILE_MMX_TRUE = @CAN_COMPILE_MMX_TRUE@ CAN_COMPILE_SSE2_FALSE = @CAN_COMPILE_SSE2_FALSE@ CAN_COMPILE_SSE2_TRUE = @CAN_COMPILE_SSE2_TRUE@ CAN_COMPILE_SSE3_FALSE = @CAN_COMPILE_SSE3_FALSE@ CAN_COMPILE_SSE3_TRUE = @CAN_COMPILE_SSE3_TRUE@ CAN_COMPILE_SSE_FALSE = @CAN_COMPILE_SSE_FALSE@ CAN_COMPILE_SSE_TRUE = @CAN_COMPILE_SSE_TRUE@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCAS = @CCAS@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ COMMON_INCLUDES = @COMMON_INCLUDES@ CONSOLEHELPER_LOCATION = @CONSOLEHELPER_LOCATION@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFAULT_CFLAGS = @DEFAULT_CFLAGS@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ESD_LIBS = @ESD_LIBS@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ GCONF_SCHEMAS_INSTALL_FALSE = @GCONF_SCHEMAS_INSTALL_FALSE@ GCONF_SCHEMAS_INSTALL_TRUE = @GCONF_SCHEMAS_INSTALL_TRUE@ GCONF_SCHEMA_CONFIG_SOURCE = @GCONF_SCHEMA_CONFIG_SOURCE@ GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@ GDK_PIXBUF_CSOURCE = @GDK_PIXBUF_CSOURCE@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ HAVE_GCC_LIMITS_FALSE = @HAVE_GCC_LIMITS_FALSE@ HAVE_GCC_LIMITS_TRUE = @HAVE_GCC_LIMITS_TRUE@ HAVE_LIBZVBI_FALSE = @HAVE_LIBZVBI_FALSE@ HAVE_LIBZVBI_TRUE = @HAVE_LIBZVBI_TRUE@ HAVE_X86_FALSE = @HAVE_X86_FALSE@ HAVE_X86_TRUE = @HAVE_X86_TRUE@ HAVE_XMU_FALSE = @HAVE_XMU_FALSE@ HAVE_XMU_TRUE = @HAVE_XMU_TRUE@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ INTLTOOL_CAVES_RULE = @INTLTOOL_CAVES_RULE@ INTLTOOL_DESKTOP_RULE = @INTLTOOL_DESKTOP_RULE@ INTLTOOL_DIRECTORY_RULE = @INTLTOOL_DIRECTORY_RULE@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ INTLTOOL_ICONV = @INTLTOOL_ICONV@ INTLTOOL_KBD_RULE = @INTLTOOL_KBD_RULE@ INTLTOOL_KEYS_RULE = @INTLTOOL_KEYS_RULE@ INTLTOOL_MERGE = @INTLTOOL_MERGE@ INTLTOOL_MSGFMT = @INTLTOOL_MSGFMT@ INTLTOOL_MSGMERGE = @INTLTOOL_MSGMERGE@ INTLTOOL_OAF_RULE = @INTLTOOL_OAF_RULE@ INTLTOOL_PERL = @INTLTOOL_PERL@ INTLTOOL_PONG_RULE = @INTLTOOL_PONG_RULE@ INTLTOOL_PROP_RULE = @INTLTOOL_PROP_RULE@ INTLTOOL_SCHEMAS_RULE = @INTLTOOL_SCHEMAS_RULE@ INTLTOOL_SERVER_RULE = @INTLTOOL_SERVER_RULE@ INTLTOOL_SHEET_RULE = @INTLTOOL_SHEET_RULE@ INTLTOOL_SOUNDLIST_RULE = @INTLTOOL_SOUNDLIST_RULE@ INTLTOOL_THEME_RULE = @INTLTOOL_THEME_RULE@ INTLTOOL_UI_RULE = @INTLTOOL_UI_RULE@ INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ INTLTOOL_XAM_RULE = @INTLTOOL_XAM_RULE@ INTLTOOL_XGETTEXT = @INTLTOOL_XGETTEXT@ INTLTOOL_XML_NOMERGE_RULE = @INTLTOOL_XML_NOMERGE_RULE@ INTLTOOL_XML_RULE = @INTLTOOL_XML_RULE@ JPEG_LIB = @JPEG_LIB@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBXML_CFLAGS = @LIBXML_CFLAGS@ LIBXML_LIBS = @LIBXML_LIBS@ LIRC_LIB = @LIRC_LIB@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAKEINFO = @MAKEINFO@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ NEED_ZSFB_FALSE = @NEED_ZSFB_FALSE@ NEED_ZSFB_TRUE = @NEED_ZSFB_TRUE@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_CFLAGS = @PACKAGE_CFLAGS@ PACKAGE_LIBS = @PACKAGE_LIBS@ PACKAGE_LIB_DIR = @PACKAGE_LIB_DIR@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_PIXMAPS_DIR = @PACKAGE_PIXMAPS_DIR@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PACKAGE_VERSION_ID = @PACKAGE_VERSION_ID@ PATH_SEPARATOR = @PATH_SEPARATOR@ PG_CFLAGS = @PG_CFLAGS@ PKG_CONFIG = @PKG_CONFIG@ PLUGIN_DEFAULT_DIR = @PLUGIN_DEFAULT_DIR@ PLUGIN_DEFAULT_FLAGS = @PLUGIN_DEFAULT_FLAGS@ PNG_LIBS = @PNG_LIBS@ POFILES = @POFILES@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ PYTHON_LIBS = @PYTHON_LIBS@ PY_CFLAGS = @PY_CFLAGS@ PY_EXTRA_LIBS = @PY_EXTRA_LIBS@ PY_LIBS = @PY_LIBS@ PY_LIB_LOC = @PY_LIB_LOC@ RANLIB = @RANLIB@ RTE_LIBS = @RTE_LIBS@ SCROLLKEEPER_BUILD_REQUIRED = @SCROLLKEEPER_BUILD_REQUIRED@ SCROLLKEEPER_CONFIG = @SCROLLKEEPER_CONFIG@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ SUID_ZSFB_FALSE = @SUID_ZSFB_FALSE@ SUID_ZSFB_TRUE = @SUID_ZSFB_TRUE@ UNICODE_CFLAGS = @UNICODE_CFLAGS@ UNICODE_LIBS = @UNICODE_LIBS@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ WARN_CFLAGS = @WARN_CFLAGS@ XGETTEXT = @XGETTEXT@ XMLCATALOG = @XMLCATALOG@ XML_CATALOG_FILE = @XML_CATALOG_FILE@ XSLTPROC = @XSLTPROC@ X_CFLAGS = @X_CFLAGS@ X_DPMS_LIBS = @X_DPMS_LIBS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ X_XF86DGA_LIBS = @X_XF86DGA_LIBS@ X_XF86VMODE_LIBS = @X_XF86VMODE_LIBS@ X_XINERAMA_LIBS = @X_XINERAMA_LIBS@ X_XMU_LIBS = @X_XMU_LIBS@ X_XV_LIBS = @X_XV_LIBS@ ZSFB_GROUP = @ZSFB_GROUP@ ZSFB_OWNER = @ZSFB_OWNER@ ZVBI_CFLAGS = @ZVBI_CFLAGS@ ZVBI_LIBS = @ZVBI_LIBS@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_STRIP = @ac_ct_STRIP@ ac_pt_PKG_CONFIG = @ac_pt_PKG_CONFIG@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ datadir = @datadir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ python_val = @python_val@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ SUBDIRS = DI_GreedyH DI_Misc test plugindir = @PLUGIN_DEFAULT_DIR@ plugin_LTLIBRARIES = libdeinterlace.zapping.la AM_CFLAGS = \ @PLUGIN_DEFAULT_FLAGS@ \ -DZAPPING8 INCLUDES = \ -I$(top_srcdir) \ @COMMON_INCLUDES@ libdeinterlace_zapping_la_SOURCES = \ DS_ApiCommon.h \ DS_Control.h \ DS_Deinterlace.h \ main.c main.h \ preferences.c preferences.h \ windows.h libdeinterlace_zapping_la_LIBADD = \ DI_GreedyH/libDI_GreedyH.la \ DI_Misc/libDI_Misc.la all: all-recursive .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu plugins/deinterlace/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu plugins/deinterlace/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh install-pluginLTLIBRARIES: $(plugin_LTLIBRARIES) @$(NORMAL_INSTALL) test -z "$(plugindir)" || $(mkdir_p) "$(DESTDIR)$(plugindir)" @list='$(plugin_LTLIBRARIES)'; for p in $$list; do \ if test -f $$p; then \ f=$(am__strip_dir) \ echo " $(LIBTOOL) --mode=install $(pluginLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(plugindir)/$$f'"; \ $(LIBTOOL) --mode=install $(pluginLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(plugindir)/$$f"; \ else :; fi; \ done uninstall-pluginLTLIBRARIES: @$(NORMAL_UNINSTALL) @set -x; list='$(plugin_LTLIBRARIES)'; for p in $$list; do \ p=$(am__strip_dir) \ echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(plugindir)/$$p'"; \ $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(plugindir)/$$p"; \ done clean-pluginLTLIBRARIES: -test -z "$(plugin_LTLIBRARIES)" || rm -f $(plugin_LTLIBRARIES) @list='$(plugin_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libdeinterlace.zapping.la: $(libdeinterlace_zapping_la_OBJECTS) $(libdeinterlace_zapping_la_DEPENDENCIES) $(LINK) -rpath $(plugindir) $(libdeinterlace_zapping_la_LDFLAGS) $(libdeinterlace_zapping_la_OBJECTS) $(libdeinterlace_zapping_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/main.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/preferences.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool uninstall-info-am: # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" mostlyclean-recursive clean-recursive distclean-recursive \ maintainer-clean-recursive: @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(mkdir_p) "$(distdir)/$$subdir" \ || exit 1; \ distdir=`$(am__cd) $(distdir) && pwd`; \ top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ (cd $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$top_distdir" \ distdir="$$distdir/$$subdir" \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile $(LTLIBRARIES) installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(plugindir)"; do \ test -z "$$dir" || $(mkdir_p) "$$dir"; \ done install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic clean-libtool clean-pluginLTLIBRARIES \ mostlyclean-am distclean: distclean-recursive -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-libtool distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive info: info-recursive info-am: install-data-am: install-pluginLTLIBRARIES install-exec-am: install-info: install-info-recursive install-man: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-info-am uninstall-pluginLTLIBRARIES uninstall-info: uninstall-info-recursive .PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am \ clean clean-generic clean-libtool clean-pluginLTLIBRARIES \ clean-recursive ctags ctags-recursive distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-recursive distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-exec install-exec-am install-info \ install-info-am install-man install-pluginLTLIBRARIES \ install-strip installcheck installcheck-am installdirs \ installdirs-am maintainer-clean maintainer-clean-generic \ maintainer-clean-recursive mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool mostlyclean-recursive \ pdf pdf-am ps ps-am tags tags-recursive uninstall uninstall-am \ uninstall-info-am uninstall-pluginLTLIBRARIES # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: zapping-0.10cvs6/plugins/deinterlace/main.c 644 764 144 31106 10417055401 14053 /* * Zapping TV viewer * * Copyright (C) 2004 Michael H. Schimek * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* $Id: main.c,v 1.11 2006/04/12 01:42:25 mschimek Exp $ */ #include "site_def.h" #ifdef HAVE_CONFIG_H # include "config.h" #endif #include "common/intl-priv.h" #include "libtv/image_format.h" /* tv_memcpy() */ #include "src/properties.h" #include "src/plugin_common.h" #include "src/zgconf.h" #include "libtv/cpu.h" #include "preferences.h" #include "main.h" #define GCONF_DIR "/apps/zapping/plugins/deinterlace" #ifndef DI_MAIN_HEIGHT_DIV /* For tests. My CPU is too slow to run all methods at full height. */ # define DI_MAIN_HEIGHT_DIV 1 #endif DEINTERLACE_METHOD * deinterlace_methods[30]; static zf_consumer consumer; static gint capture_format_id = -1; static gboolean capturing; static gboolean active; static gboolean reverse_fields; typedef struct { TPicture tpicture; zf_buffer * buffer; } picture; static picture pictures[MAX_PICTURE_HISTORY]; static TDeinterlaceInfo info; static guint queue_len2; static guint field_count; static guint capture_width; static guint capture_height; static DEINTERLACE_METHOD * method; DEINTERLACE_METHOD * deinterlace_find_method (const gchar * name) { guint i; g_return_val_if_fail (NULL != name, NULL); for (i = 0; i < G_N_ELEMENTS (deinterlace_methods); ++i) if ((method = deinterlace_methods[i])) if (0 == g_ascii_strcasecmp (name, method->szName)) { return method; } return NULL; } static guint deinterlace (zimage * dst0, zimage * dst1) { const tv_video_standard *std; gboolean bottom_first; zf_buffer *b1; zf_buffer *b2; TPicture *tp; picture *p; capture_frame *cf; const zimage *src; guint n_frames; if (0) { fputc ('=', stderr); fflush (stderr); } std = tv_cur_video_standard (zapping->info); bottom_first = (std && (std->videostd_set & TV_VIDEOSTD_SET_NTSC)); bottom_first ^= reverse_fields; b1 = NULL; b2 = NULL; for (;;) { if (b2) { zf_send_empty_buffer (&consumer, b2); } b2 = b1; if (!(b1 = zf_recv_full_buffer (&consumer))) break; } if (!b2) return 0; cf = PARENT (b2, capture_frame, b); src = retrieve_frame (cf, TV_PIXFMT_YUYV, /* copy */ FALSE); if (!src) { zf_send_empty_buffer (&consumer, b2); return 0; } n_frames = 0; /* First field. */ tp = info.PictureHistory[queue_len2 - 1]; p = PARENT (tp, picture, tpicture); if (p->buffer) { zf_send_empty_buffer (&consumer, p->buffer); p->buffer = NULL; } memmove (info.PictureHistory + 1, info.PictureHistory + 0, ((G_N_ELEMENTS (info.PictureHistory) - 1) * sizeof (info.PictureHistory[0]))); info.PictureHistory[0] = tp; p->buffer = b2; if (bottom_first) { tp->pData = ((uint8_t *) src->img) + info.FrameWidth * 2; tp->Flags = PICTURE_INTERLACED_ODD; /* sic */ } else { tp->pData = src->img; tp->Flags = PICTURE_INTERLACED_EVEN; /* sic */ } tp->pData = ((uint8_t *) tp->pData) + (info.FrameWidth * capture_height * 2 * (DI_MAIN_HEIGHT_DIV - 1) / DI_MAIN_HEIGHT_DIV); tp->IsFirstInSeries = (0 == field_count); ++field_count; info.Overlay = dst0->img; if (field_count >= (guint) method->nFieldsRequired) { if (method->pfnAlgorithm (&info)) n_frames = 1; } /* Second field. */ tp = info.PictureHistory[queue_len2 - 1]; p = PARENT (tp, picture, tpicture); memmove (info.PictureHistory + 1, info.PictureHistory + 0, ((G_N_ELEMENTS (info.PictureHistory) - 1) * sizeof (info.PictureHistory[0]))); info.PictureHistory[0] = tp; if (bottom_first) { tp->pData = src->img; tp->Flags = PICTURE_INTERLACED_EVEN; /* sic */ } else { tp->pData = ((uint8_t *) src->img) + info.FrameWidth * 2; tp->Flags = PICTURE_INTERLACED_ODD; /* sic */ } tp->pData = ((uint8_t *) tp->pData) + (info.FrameWidth * capture_height * 2 * (DI_MAIN_HEIGHT_DIV - 1) / DI_MAIN_HEIGHT_DIV); tp->IsFirstInSeries = FALSE; ++field_count; if (n_frames > 0) info.Overlay = dst1->img; if (field_count >= (guint) method->nFieldsRequired) { if (method->pfnAlgorithm (&info)) ++n_frames; } return n_frames; } static gboolean stop_thread (void) { zf_buffer *b; guint i; for (i = 0; i < G_N_ELEMENTS (pictures); ++i) if (pictures[i].buffer) { zf_send_empty_buffer (&consumer, pictures[i].buffer); pictures[i].buffer = NULL; } field_count = 0; while ((b = zf_recv_full_buffer (&consumer))) zf_send_empty_buffer (&consumer, b); zf_rem_consumer (&consumer); if (-1 != capture_format_id) release_capture_format (capture_format_id); capture_format_id = -1; remove_display_filter (deinterlace); return TRUE; } static gboolean start_thread1 (void) { gchar *s; capture_mode old_mode; guint resolution; const tv_video_standard *std; guint display_height; guint i; if (0) fprintf (stderr, "Start deinterlace thread\n"); s = NULL; z_gconf_get_string (&s, GCONF_DIR "/method"); if (!s) return FALSE; method = deinterlace_find_method (s); g_free (s); s = NULL; if (!method) return FALSE; assert (NULL != method->pfnAlgorithm); s = NULL; z_gconf_get_string (&s, GCONF_DIR "/resolution"); resolution = 4; if (s) { gint i; /* Error ignored. */ gconf_string_to_enum (resolution_enum, s, &i); resolution = SATURATE (i, 1, 4); } if (0) fprintf (stderr, "Method %s (%s), resolution %u\n", _(method->szName), method->szName, resolution); old_mode = tv_get_capture_mode (zapping->info); if (CAPTURE_MODE_READ != old_mode) if (-1 == zmisc_switch_mode (zapping->display_mode, CAPTURE_MODE_READ, zapping->info, /* warnings */ TRUE)) { goto failure; } if ((std = tv_cur_video_standard (zapping->info))) { capture_width = (std->frame_width * resolution) >> 2; capture_height = std->frame_height; } else { capture_width = (768 * resolution) >> 2; capture_height = 576; } display_height = capture_height; if (method->bIsHalfHeight) display_height >>= 1; if (!add_display_filter (deinterlace, TV_PIXFMT_YUYV, capture_width, display_height / DI_MAIN_HEIGHT_DIV)) { g_warning ("Cannot add display filter\n"); goto failure1; } capture_format_id = request_capture_format (zapping->info, capture_width, capture_height, TV_PIXFMT_SET (TV_PIXFMT_YUYV), REQ_SIZE | REQ_PIXFMT); if (-1 == capture_format_id) { z_show_non_modal_message_dialog (/* parent */ NULL, GTK_MESSAGE_ERROR, _("Could not start deinterlace plugin"), _("Could not switch to capture format YUYV %u x %u."), capture_width, capture_height); goto failure2; } zf_add_consumer (&capture_fifo, &consumer); CLEAR (info); info.Version = DEINTERLACE_INFO_CURRENT_VERSION; for (i = 0; i < MAX_PICTURE_HISTORY; ++i) info.PictureHistory[i] = &pictures[i].tpicture; info.Overlay = NULL; info.OverlayPitch = capture_width * 2; info.LineLength = capture_width * 2; info.FrameWidth = capture_width; info.FrameHeight = capture_height / DI_MAIN_HEIGHT_DIV; info.FieldHeight = capture_height / 2 / DI_MAIN_HEIGHT_DIV; info.CpuFeatureFlags = 0; info.InputPitch = capture_width * 2 * 2; info.pMemcpy = (void *) tv_memcpy; /* XXX Not implemented yet. */ assert (!method->bNeedFieldDiff); assert (!method->bNeedCombFactor); queue_len2 = (method->nFieldsRequired + 1) & -2; g_assert (queue_len2 <= MAX_PICTURE_HISTORY); field_count = 0; return TRUE; failure2: remove_display_filter (deinterlace); failure1: /* Error ignored. */ zmisc_switch_mode (zapping->display_mode, old_mode, zapping->info, /* warnings */ FALSE); failure: return FALSE; } static void plugin_capture_stop (void) { if (active) stop_thread (); active = FALSE; capturing = FALSE; } static void plugin_capture_start (void) { capturing = TRUE; if (!active) active = start_thread1 (); } static void notify (GConfClient * client _unused_, guint cnxn_id _unused_, GConfEntry * entry _unused_, gpointer user_data _unused_) { if (0) fprintf(stderr, "Notify %d\n", capturing); if (capturing) { if (active) stop_thread (); active = start_thread1 (); } } static void plugin_close (void) { } static void properties_add (GtkDialog * dialog) { static SidebarEntry se = { .label = N_("Deinterlace"), .icon_name = "interlace48.png", .create = deinterlace_prefs_new, .cancel = (void (*)(GtkWidget *)) deinterlace_prefs_cancel, .help_link_id = "zapping-settings-deinterlace", }; static const SidebarGroup sg = { N_("Plugins"), &se, 1 }; standard_properties_add (dialog, &sg, 1, /* glade */ NULL); } extern int GreedyTestMode; static gboolean plugin_init (PluginBridge bridge _unused_, tveng_device_info * info _unused_) { static const property_handler ph = { .add = properties_add, }; append_property_handler (&ph); D(); #undef GET #define GET(x, y) \ do { \ DEINTERLACE_METHOD *method = DI_##y##_GetDeinterlacePluginInfo (); \ /* NULL if we have no scalar of cpu_features optimized implem. */ \ deinterlace_methods[INDEX_##x] = method; \ } while (0) GET (VIDEO_BOB, VideoBob); GET (VIDEO_WEAVE, VideoWeave); GET (VIDEO_2FRAME, TwoFrame); GET (WEAVE, Weave); GET (BOB, Bob); GET (SCALER_BOB, ScalerBob); GET (EVEN_ONLY, EvenOnly); GET (ODD_ONLY, OddOnly); /* No longer supported GET (BLENDED_CLIP, BlendedClip); */ /* To do GET (ADAPTIVE, Adaptive); */ GET (VIDEO_GREEDY, Greedy); GET (VIDEO_GREEDY2FRAME, Greedy2Frame); GET (VIDEO_GREEDYH, GreedyH); /* To do - bNeedCombFactor GET (OLD_GAME, OldGame); */ GET (VIDEO_TOMSMOCOMP, TomsMoComp); GET (VIDEO_MOCOMP2, MoComp2); D(); z_gconf_notify_add (GCONF_DIR "/method", notify, NULL); z_gconf_notify_add (GCONF_DIR "/resolution", notify, NULL); z_gconf_auto_update_bool (&reverse_fields, GCONF_DIR "/reverse_fields"); z_gconf_auto_update_bool (&GreedyTestMode, GCONF_DIR "/options/Deinterlace/GreedyTestMode"); return TRUE; } static void plugin_get_info (const gchar ** canonical_name, const gchar ** descriptive_name, const gchar ** description, const gchar ** short_description, const gchar ** author, const gchar ** version) { if (canonical_name) *canonical_name = "deinterlace"; if (descriptive_name) *descriptive_name = N_("Deinterlace plugin"); if (description) *description = ""; if (short_description) *short_description = ""; if (author) *author = ""; if (version) *version = "1.0"; } static struct plugin_misc_info * plugin_get_misc_info (void) { static struct plugin_misc_info returned_struct = { sizeof (struct plugin_misc_info), 6, /* plugin priority */ 0 /* category */ }; return &returned_struct; } gboolean plugin_get_symbol (const gchar * name, gint hash, gpointer * ptr) { static const struct plugin_exported_symbol symbols [] = { SYMBOL (plugin_close, 0x1234), SYMBOL (plugin_capture_stop, 0x1234), SYMBOL (plugin_capture_start, 0x1234), SYMBOL (plugin_get_info, 0x1234), SYMBOL (plugin_get_misc_info, 0x1234), SYMBOL (plugin_init, 0x1234), }; guint i; for (i = 0; i < N_ELEMENTS (symbols); ++i) if (0 == strcmp (symbols[i].symbol, name)) { if (symbols[i].hash != hash) { if (ptr) *ptr = GINT_TO_POINTER(0x3); /* hash collision code */ g_warning("Check error: \"%s\" in plugin %s " "has hash 0x%x vs. 0x%x", name, "teletext", symbols[i].hash, hash); return FALSE; } if (ptr) *ptr = symbols[i].ptr; return TRUE; } if (ptr) *ptr = GINT_TO_POINTER(0x2); return FALSE; } gint plugin_get_protocol (void) { return PLUGIN_PROTOCOL; } zapping-0.10cvs6/plugins/deinterlace/main.h 644 764 144 2066 10167772036 14057 /* * Zapping TV viewer * * Copyright (C) 2004 Michael H. Schimek * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* $Id: main.h,v 1.1 2005/01/08 14:54:22 mschimek Exp $ */ #ifndef MAIN_H #define MAIN_H #include "windows.h" #include "DS_Deinterlace.h" extern DEINTERLACE_METHOD * deinterlace_methods[30]; extern DEINTERLACE_METHOD * deinterlace_find_method (const gchar * name); #endif /* MAIN_H */ zapping-0.10cvs6/plugins/deinterlace/preferences.c 644 764 144 40564 10260320755 15443 /* * Zapping TV viewer * * Copyright (C) 2004 Michael H. Schimek * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* $Id: preferences.c,v 1.4 2005/06/28 19:15:57 mschimek Exp $ */ #ifdef HAVE_CONFIG_H # include "config.h" #endif #include "common/intl-priv.h" #include "src/zgconf.h" #include "main.h" #include "preferences.h" #define INDENT_COL 0 #define N_COLUMNS 2 #define GCONF_DIR "/apps/zapping/plugins/deinterlace" /* n/4 */ GConfEnumStringPair resolution_enum [] = { { 2, "low" }, { 3, "medium" }, { 4, "high" }, { 0, NULL } }; static const gchar * resolution_menu [] = { N_("Low"), N_("Medium"), N_("High"), NULL, }; static GObjectClass * parent_class; static void attach_label (GtkTable * table, guint row, const gchar * text) { GtkWidget *widget; widget = gtk_label_new_with_mnemonic (text); gtk_widget_show (widget); gtk_misc_set_alignment (GTK_MISC (widget), 0.0, 0.5); gtk_table_attach (table, widget, INDENT_COL, INDENT_COL + 1, row, row + 1, (GtkAttachOptions)(GTK_FILL), (GtkAttachOptions)(0), /* padding */ 0, 0); } static void attach_combo_box (GtkTable * table, guint row, const gchar ** option_menu, const gchar * gconf_key, const GConfEnumStringPair *lookup_table, const gchar * tooltip) { GtkWidget *widget; widget = z_gconf_combo_box_new (option_menu, gconf_key, lookup_table); gtk_widget_show (widget); if (tooltip) z_tooltip_set (widget, tooltip); gtk_table_attach (table, widget, INDENT_COL + 1, N_COLUMNS, row, row + 1, (GtkAttachOptions)(GTK_EXPAND | GTK_FILL), (GtkAttachOptions)(0), /* padding */ 0, 0); } static gchar * key_from_setting (const SETTING * setting) { gchar *key; g_return_val_if_fail (NULL != setting, NULL); g_return_val_if_fail (NULL != setting->szIniEntry, NULL); g_return_val_if_fail (NULL != setting->szIniSection, NULL); key = g_strconcat (GCONF_DIR "/options/", setting->szIniSection, "/", setting->szIniEntry, NULL); return key; } static void on_option_changed (GtkWidget * widget, gpointer user_data) { const SETTING *setting = user_data; gchar *key; if (!(key = key_from_setting (setting))) return; switch (setting->Type) { case ITEMFROMLIST: { gint index; index = gtk_combo_box_get_active (GTK_COMBO_BOX (widget)); if (index >= 0 && NULL != setting->pszList[index]) { /* Error ignored. */ z_gconf_set_string (key, setting->pszList[index]); *setting->pValue = index; } break; } default: g_assert_not_reached (); break; } g_free (key); key = NULL; } static void create_menu (GtkTable * table, guint row, const SETTING * setting, const gchar * key) { GtkWidget *widget; GtkComboBox *combo_box; GObject *object; widget = gtk_combo_box_new_text (); gtk_widget_show (widget); combo_box = GTK_COMBO_BOX (widget); { gchar *item_name; guint value; guint i; item_name = NULL; /* Error ignored. */ z_gconf_get_string (&item_name, key); if (!item_name) if (NULL != setting->pszList[0]) item_name = g_strdup (setting->pszList[0]); value = 0; for (i = setting->MinValue; i <= (guint) setting->MaxValue; ++i) { const gchar *name; if (!(name = setting->pszList[i])) break; if (item_name) if (0 == g_ascii_strcasecmp (item_name, name)) value = i; gtk_combo_box_append_text (combo_box, name); } g_free (item_name); gtk_combo_box_set_active (combo_box, value); } object = G_OBJECT (combo_box); z_signal_connect_const (object, "changed", G_CALLBACK (on_option_changed), setting); gtk_table_resize (table, row + 1, N_COLUMNS); attach_label (table, row, _(setting->szDisplayName)); gtk_table_attach (table, widget, INDENT_COL + 1, N_COLUMNS, row, row + 1, (GtkAttachOptions)(GTK_FILL | GTK_EXPAND), (GtkAttachOptions)(0), /* padding */ 0, 0); } static void create_slider (GtkTable * table, guint row, const SETTING * setting, const gchar * key) { GtkWidget *spinslider; spinslider = z_gconf_int_spinslider_new (setting->Default, setting->MinValue, setting->MaxValue, /* step_incr */ setting->StepValue, /* page_incr */ setting->StepValue, /* page_size */ setting->StepValue, key, (gint *) setting->pValue); gtk_widget_show (spinslider); gtk_table_resize (table, row + 1, N_COLUMNS); attach_label (table, row, _(setting->szDisplayName)); gtk_table_attach (table, spinslider, INDENT_COL + 1, N_COLUMNS, row, row + 1, (GtkAttachOptions)(GTK_FILL | GTK_EXPAND), (GtkAttachOptions)(0), /* padding */ 0, 0); } static void create_checkbutton (GtkTable * table, guint row, const SETTING * setting, const gchar * key) { GtkWidget *widget; widget = z_gconf_check_button_new (_(setting->szDisplayName), key, (gboolean *) setting->pValue, !!setting->Default); gtk_widget_show (widget); gtk_table_resize (table, row + 1, N_COLUMNS); gtk_table_attach (table, widget, INDENT_COL, N_COLUMNS, row, row + 1, (GtkAttachOptions)(GTK_FILL | GTK_EXPAND), (GtkAttachOptions)(0), /* padding */ 0, 0); } static GtkWidget * create_option_table (const DEINTERLACE_METHOD *method) { GtkTable *table; GtkWidget *widget; guint row; guint i; widget = gtk_table_new (/* rows */ 1, N_COLUMNS, /* homogeneous */ FALSE); table = GTK_TABLE (widget); gtk_table_set_row_spacings (table, 3); gtk_table_set_col_spacings (table, 12); row = 0; attach_label (table, row, _("_Resolution:")); attach_combo_box (table, row++, resolution_menu, GCONF_DIR "/resolution", resolution_enum, /* tooltip */ NULL); #if 0 /* TRANSLATORS: Relative display duration of the first and second field in deinterlace mode. */ attach_label (table, row, _("_Field Balance:")); attach_field_balance (table, row++, GCONF_DIR "/field_balance", /* tooltip */ NULL); #endif if (!method) return widget; for (i = 0; i < (guint) method->nSettings; ++i) { const SETTING *setting; gchar *key; if (!(setting = method->pSettings + i)) continue; key = NULL; if (!setting->szDisplayName) { /* Hidden option. */ continue; } switch (setting->Type) { case ONOFF: case YESNO: if (!(key = key_from_setting (setting))) break; create_checkbutton (table, row++, setting, key); break; case ITEMFROMLIST: if (!(key = key_from_setting (setting))) break; create_menu (table, row++, setting, key); break; case SLIDER: if (!(key = key_from_setting (setting))) break; create_slider (table, row++, setting, key); break; default: /* Ignored. */ break; } g_free (key); key = NULL; } return widget; } static gboolean load_options (const DEINTERLACE_METHOD *method) { guint i; g_return_val_if_fail (NULL != method, FALSE); for (i = 0; i < (guint) method->nSettings; ++i) { const SETTING *setting; gchar *key; if (!(setting = method->pSettings + i)) continue; key = NULL; switch (setting->Type) { case ONOFF: case YESNO: { gboolean active; if (!(key = key_from_setting (setting))) break; active = setting->Default; /* Error ignored. */ z_gconf_get_bool (&active, key); *setting->pValue = active; break; } case ITEMFROMLIST: { gchar *item; guint index; guint i; if (!(key = key_from_setting (setting))) break; item = NULL; /* Error ignored. */ z_gconf_get_string (&item, key); if (!item) if (setting->pszList[0]) item = g_strdup (setting->pszList[0]); index = 0; for (i = setting->MinValue; i <= (guint) setting->MaxValue; ++i) { const gchar *name; if (!(name = setting->pszList[i])) break; if (item) if (0 == g_ascii_strcasecmp (item, name)) index = i; } g_free (item); *setting->pValue = index; break; } case SLIDER: { gint value; if (!(key = key_from_setting (setting))) break; value = setting->Default; /* Error ignored. */ z_gconf_get_bool (&value, key); *setting->pValue = value; break; } default: /* Ignored. */ break; } g_free (key); key = NULL; } return TRUE; } void deinterlace_prefs_cancel (DeinterlacePrefs * prefs) { GError *error = NULL; gboolean success; gchar *item; DEINTERLACE_METHOD *method; g_return_if_fail (IS_DEINTERLACE_PREFS (prefs)); if (!prefs->change_set) return; /* Revert to old values. */ success = gconf_client_commit_change_set (gconf_client, prefs->change_set, /* remove_committed */ FALSE, &error); if (!success || error) { /* Error ignored. */ if (error) { printv ("Cannot revert deinterlace prefs: %s\n", error->message); g_error_free (error); error = NULL; } } item = NULL; /* Error ignored. */ z_gconf_get_string (&item, GCONF_DIR "/method"); /* Apply reverted gconf values. */ if ((method = deinterlace_find_method (item))) load_options (method); g_free (item); gtk_widget_destroy (GTK_WIDGET (prefs)); } static void on_method_changed (GtkComboBox * combo_box, gpointer user_data) { DeinterlacePrefs *prefs = DEINTERLACE_PREFS (user_data); gint active_item; g_return_if_fail (IS_DEINTERLACE_PREFS (prefs)); if (prefs->option_table) { gtk_widget_destroy (prefs->option_table); prefs->option_table = NULL; } active_item = gtk_combo_box_get_active (combo_box); if (active_item <= 0) { /* Error ignored. */ z_gconf_set_string (GCONF_DIR "/method", "disabled"); } else { const DEINTERLACE_METHOD *method; guint i; --active_item; for (i = 0; i < N_ELEMENTS (deinterlace_methods); ++i) { if (!(method = deinterlace_methods[i])) continue; if (0 == active_item) break; --active_item; } if (i < N_ELEMENTS (deinterlace_methods) && NULL != method && NULL != method->szName) { /* Error ignored. */ z_gconf_set_string (GCONF_DIR "/method", method->szName); prefs->option_table = create_option_table (method); gtk_widget_show (prefs->option_table); gtk_table_attach (&prefs->table, prefs->option_table, /* column */ 0, 0 + 1, /* row */ 1, 1 + 1, (GtkAttachOptions)(GTK_FILL | GTK_EXPAND), (GtkAttachOptions)(0), /* padding */ 0, 0); } else { /* Error ignored. */ z_gconf_set_string (GCONF_DIR "/method", "disabled"); } } } static void instance_finalize (GObject * object) { DeinterlacePrefs *prefs = DEINTERLACE_PREFS (object); if (prefs->change_set) { gconf_change_set_unref (prefs->change_set); prefs->change_set = NULL; } parent_class->finalize (object); } static GConfChangeSet * create_change_set (void) { GError *error = NULL; GConfChangeSet *change_set; gchar **keys; guint keys_capacity; guint keys_size; guint i; keys_capacity = 16; keys_size = 0; keys = g_new (char *, keys_capacity); keys[0] = NULL; for (i = 0; i < N_ELEMENTS (deinterlace_methods); ++i) { const DEINTERLACE_METHOD *method; guint j; if (!(method = deinterlace_methods[i])) continue; for (j = 0; j < (guint) method->nSettings; ++j) { const SETTING *setting; if (!(setting = method->pSettings + j)) continue; switch (setting->Type) { case ONOFF: case YESNO: case ITEMFROMLIST: case SLIDER: { gchar *key; if (!(key = key_from_setting (setting))) break; if (0) fprintf (stderr, " \n" " /schemas%s\n" " %s\n" " Zapping\n" " %u\n" " %ld\n" " \n", key, key, setting->Type, (long) setting->Default); if (keys_size + 1 >= keys_capacity) { keys_capacity *= 2; keys = g_renew (char *, keys, keys_capacity); } keys[keys_size++] = key; key = NULL; keys[keys_size] = NULL; break; } default: /* Ignored. */ break; } } } change_set = gconf_client_change_set_from_currentv (gconf_client, keys, &error); if (!change_set || error) { g_assert (NULL == change_set); if (error) { g_warning ("Cannot create deinterlace prefs change set:\n%s", error->message); g_error_free (error); error = NULL; } } g_strfreev (keys); return change_set; } static GtkWidget * attach_method_combo (DeinterlacePrefs * prefs, guint row) { GtkWidget *widget; GtkComboBox *combo_box; GObject *object; widget = gtk_combo_box_new_text (); gtk_widget_show (widget); combo_box = GTK_COMBO_BOX (widget); { gchar *item_name; guint item_counter; guint active_item; guint i; item_name = NULL; /* Error ignored. */ z_gconf_get_string (&item_name, GCONF_DIR "/method"); gtk_combo_box_append_text (combo_box, _("Disabled")); active_item = 0; /* disabled */ item_counter = 1; for (i = 0; i < N_ELEMENTS (deinterlace_methods); ++i) { const DEINTERLACE_METHOD *method; if (!(method = deinterlace_methods[i])) continue; if (item_name && 0 == active_item) if (0 == g_ascii_strcasecmp (item_name, method->szName)) active_item = item_counter; gtk_combo_box_append_text (combo_box, _(method->szName)); ++item_counter; } g_free (item_name); gtk_combo_box_set_active (combo_box, active_item); } object = G_OBJECT (combo_box); g_signal_connect (object, "changed", G_CALLBACK (on_method_changed), prefs); gtk_table_attach (&prefs->table, widget, 0, 0 + 1, row, row + 1, (GtkAttachOptions)(GTK_FILL | GTK_EXPAND), (GtkAttachOptions)(0), /* padding */ 0, 0); return widget; } static void instance_init (GTypeInstance * instance, gpointer g_class _unused_) { DeinterlacePrefs *prefs = (DeinterlacePrefs *) instance; GtkWidget *method_combo; gtk_table_resize (&prefs->table, /* rows */ 2, /* columns */ 1); gtk_table_set_homogeneous (&prefs->table, FALSE); gtk_container_set_border_width (GTK_CONTAINER (&prefs->table), 12); gtk_table_set_row_spacings (&prefs->table, 3); method_combo = attach_method_combo (prefs, /* row */ 0); /* Add options of current method. */ on_method_changed (GTK_COMBO_BOX (method_combo), prefs); prefs->change_set = create_change_set (); } GtkWidget * deinterlace_prefs_new (void) { return GTK_WIDGET (g_object_new (TYPE_DEINTERLACE_PREFS, NULL)); } static void class_init (gpointer g_class, gpointer class_data _unused_) { GObjectClass *object_class; object_class = G_OBJECT_CLASS (g_class); parent_class = g_type_class_peek_parent (g_class); object_class->finalize = instance_finalize; } GType deinterlace_prefs_get_type (void) { static GType type = 0; if (!type) { GTypeInfo info; CLEAR (info); info.class_size = sizeof (DeinterlacePrefsClass); info.class_init = class_init; info.instance_size = sizeof (DeinterlacePrefs); info.instance_init = instance_init; type = g_type_register_static (GTK_TYPE_TABLE, "DeinterlacePrefs", &info, (GTypeFlags) 0); } return type; } zapping-0.10cvs6/plugins/deinterlace/preferences.h 644 764 144 4172 10167772036 15434 /* * Zapping TV viewer * * Copyright (C) 2004 Michael H. Schimek * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* $Id: preferences.h,v 1.1 2005/01/08 14:54:22 mschimek Exp $ */ #ifndef PREFERENCES_H #define PREFERENCES_H #include #include G_BEGIN_DECLS #define TYPE_DEINTERLACE_PREFS (deinterlace_prefs_get_type ()) #define DEINTERLACE_PREFS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), \ TYPE_DEINTERLACE_PREFS, DeinterlacePrefs)) #define DEINTERLACE_PREFS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), \ TYPE_DEINTERLACE_PREFS, DeinterlacePrefsClass)) #define IS_DEINTERLACE_PREFS(obj) \ (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DEINTERLACE_PREFS)) #define IS_DEINTERLACE_PREFS_CLASS(klass) \ (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DEINTERLACE_PREFS)) #define DEINTERLACE_PREFS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), \ TYPE_DEINTERLACE_PREFS, DeinterlacePrefsClass)) typedef struct _DeinterlacePrefs DeinterlacePrefs; typedef struct _DeinterlacePrefsClass DeinterlacePrefsClass; struct _DeinterlacePrefs { GtkTable table; GtkWidget * option_table; GConfChangeSet * change_set; }; struct _DeinterlacePrefsClass { GtkTableClass parent_class; }; extern GConfEnumStringPair resolution_enum []; extern void deinterlace_prefs_cancel (DeinterlacePrefs * prefs); extern GType deinterlace_prefs_get_type (void) G_GNUC_CONST; extern GtkWidget * deinterlace_prefs_new (void); G_END_DECLS #endif /* PREFERENCES_H */ zapping-0.10cvs6/plugins/deinterlace/DS_ApiCommon.h 644 764 144 17256 10272464720 15425 /////////////////////////////////////////////////////////////////////////////// // $Id: DS_ApiCommon.h,v 1.4 2005/07/29 17:39:28 mschimek Exp $ /////////////////////////////////////////////////////////////////////////////// // Copyright (c) 2000 John Adcock. All rights reserved. ///////////////////////////////////////////////////////////////////////////// // This header file is free software; you can redistribute it and/or modify it // under the terms of the GNU Library General Public License as published by // the Free Software Foundation; either version 2 of the License, or (at your // option) any later version. // // This software 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 Library General Public License for more details /////////////////////////////////////////////////////////////////////////////// // Change Log // // Date Developer Changes // // 27 Mar 2001 John Adcock Separated code to support plug-ins // ///////////////////////////////////////////////////////////////////////////// // CVS Log // // $Log: DS_ApiCommon.h,v $ // Revision 1.4 2005/07/29 17:39:28 mschimek // *** empty log message *** // // Revision 1.3 2005/06/28 00:49:49 mschimek // Replaced longs by ints for proper operation on LP64 machines. Code // assumes option values cast to int. // // Revision 1.2.2.1 2005/05/20 05:45:13 mschimek // *** empty log message *** // // Revision 1.2 2005/03/30 21:30:52 mschimek // MEMCPY_FUNC: Source is const pointer. // _DEINTERLACE_METHOD: Constness fixes. // // Revision 1.1 2005/01/08 14:54:22 mschimek // *** empty log message *** // // Revision 1.2 2005/01/08 10:03:12 michael // *** empty log message *** // // Revision 1.1 2004/11/14 15:35:15 michael // *** empty log message *** // // Revision 1.17 2003/04/26 16:04:12 laurentg // Character string settings // // Revision 1.16 2002/09/29 10:14:14 adcockj // Fixed problem with history in OutThreads // // Revision 1.15 2001/11/29 17:30:51 adcockj // Reorgainised bt848 initilization // More Javadoc-ing // // Revision 1.14 2001/11/22 13:32:03 adcockj // Finished changes caused by changes to TDeinterlaceInfo - Compiles // // Revision 1.13 2001/11/21 15:21:39 adcockj // Renamed DEINTERLACE_INFO to TDeinterlaceInfo in line with standards // Changed TDeinterlaceInfo structure to have history of pictures. // // Revision 1.12 2001/11/10 10:36:27 pgubanov // Need to specify _cdecl on memcpy() - plugins assume cdecl while DShow filter assumes _stdcall // // Revision 1.11 2001/07/16 18:07:50 adcockj // Added Optimisation parameter to ini file saving // // Revision 1.10 2001/07/13 16:15:43 adcockj // Changed lots of variables to match Coding standards // ///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////// // This file contains #define directives that control compilation of CPU-specific // code, mostly deinterlacing functions. Turning these directives on requires // that you have Microsoft's "Processor Pack" patch installed on your build system. // The Processor Pack is available from Microsoft for free: // // http://msdn.microsoft.com/vstudio/downloads/ppack/ // // Note that compiling the code to use a processor-specific feature is safe even // if your PC doesn't have the feature in question; DScaler detects processor types // at startup and sets flags in the global "CpuFeatureFlags" (see cpu.h for // the list of flags) which the code uses to determine whether or not to use // each feature. /////////////////////////////////////////////////////////////////////////////// #ifndef __DS_APICOMON_H__ #define __DS_APICOMON_H__ 1 /////////////////////////////////////////////////////////////////////////////// // Definitions for the settings and new UI code /////////////////////////////////////////////////////////////////////////////// /** type of setting */ typedef enum { /// used when settings are depricated NOT_PRESENT = 0, // simple boolean setting ONOFF, // simple boolean setting YESNO, // select an item froma list ITEMFROMLIST, // select value using slider SLIDER, // character string CHARSTRING, } SETTING_TYPE; /** Function called when setting Value changes return Value indicates whether.rest of screen needs to be refreshed */ typedef BOOL (__cdecl SETTING_ONCHANGE)(int NewValue); /** A Dscaler setting that may be manipulated */ typedef struct { const char* szDisplayName; SETTING_TYPE Type; int LastSavedValue; int* pValue; int Default; int MinValue; int MaxValue; int StepValue; int OSDDivider; const char** pszList; const char* szIniSection; const char* szIniEntry; SETTING_ONCHANGE* pfnOnChange; } SETTING; /** Deinterlace functions return true if the overlay is ready to be displayed. */ typedef void (_cdecl MEMCPY_FUNC)(void* pOutput, const void* pInput, size_t nSize); #define MAX_PICTURE_HISTORY 10 #define PICTURE_PROGRESSIVE 0 #define PICTURE_INTERLACED_ODD 1 #define PICTURE_INTERLACED_EVEN 2 #define PICTURE_INTERLACED_MASK (PICTURE_INTERLACED_ODD | PICTURE_INTERLACED_EVEN) /** Structure containing a single field or frame from the source. This may be modified */ typedef struct { // pointer to the start of data for this picture BYTE* pData; // see PICTURE_ flags DWORD Flags; // is this the first picture in a new series // use this flag to indicate changes to any of the // paramters that are assumed to be fixed like // timings or pixel width BOOL IsFirstInSeries; } TPicture; #define DEINTERLACE_INFO_CURRENT_VERSION 400 /** Structure used to transfer all the information used by plugins around in one chunk */ typedef struct { /** set to version of this structure used to avoid crashing with incompatable versions */ DWORD Version; /** The most recent pictures PictureHistory[0] is always the most recent. Pointers are NULL if the picture in question isn't valid, e.g. because the program just started or a picture was skipped. */ TPicture* PictureHistory[MAX_PICTURE_HISTORY]; /// Current overlay buffer pointer. BYTE *Overlay; /// The part of the overlay that we actually show RECT SourceRect; /** which frame are we on now \todo remove this */ int CurrentFrame; /// Overlay pitch (number of bytes between scanlines). DWORD OverlayPitch; /** Number of bytes of actual data in each scanline. May be less than OverlayPitch since the overlay's scanlines might have alignment requirements. Generally equal to FrameWidth * 2. */ DWORD LineLength; /// Number of pixels in each scanline. int FrameWidth; /// Number of scanlines per frame. int FrameHeight; /** Number of scanlines per field. FrameHeight / 2, mostly for cleanliness so we don't have to keep dividing FrameHeight by 2. */ int FieldHeight; /// Results from the NTSC Field compare int FieldDiff; /// Results of the PAL Mode deinterlace detect int CombFactor; /// Function pointer to optimized memcpy function MEMCPY_FUNC* pMemcpy; /// What Type of CPU are we running int CpuFeatureFlags; /// Are we behind with processing BOOL bRunningLate; /// Are we behind with processing BOOL bMissedFrame; /// Do we want to flip accuratly BOOL bDoAccurateFlips; /// How big the source will end up RECT DestRect; /** distance between lines in image need not match the pixel width */ int InputPitch; } TDeinterlaceInfo; #endif zapping-0.10cvs6/plugins/Makefile.am 644 764 144 537 10326457435 12520 ## Process this file with automake to produce Makefile.in SUBDIRS = \ alirc \ screenshot \ mpeg # Presently it works only with V4L2 drivers. if BUILD_DEINTERLACE_PLUGIN SUBDIRS += deinterlace endif # Need libzvbi 0.2.x to build this module. if HAVE_LIBZVBI SUBDIRS += \ subtitle \ teletext endif # Not built this time: # lirc parrot template zapping-0.10cvs6/plugins/Makefile.in 644 764 144 45056 10442575461 12575 # Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = .. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ # Presently it works only with V4L2 drivers. @BUILD_DEINTERLACE_PLUGIN_TRUE@am__append_1 = deinterlace # Need libzvbi 0.2.x to build this module. @HAVE_LIBZVBI_TRUE@am__append_2 = \ @HAVE_LIBZVBI_TRUE@ subtitle \ @HAVE_LIBZVBI_TRUE@ teletext subdir = plugins DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-exec-recursive install-info-recursive \ install-recursive installcheck-recursive installdirs-recursive \ pdf-recursive ps-recursive uninstall-info-recursive \ uninstall-recursive ETAGS = etags CTAGS = ctags DIST_SUBDIRS = alirc screenshot mpeg deinterlace subtitle teletext DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ ARTS_CFLAGS = @ARTS_CFLAGS@ ARTS_LIBS = @ARTS_LIBS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BUILD_DEINTERLACE_PLUGIN_FALSE = @BUILD_DEINTERLACE_PLUGIN_FALSE@ BUILD_DEINTERLACE_PLUGIN_TRUE = @BUILD_DEINTERLACE_PLUGIN_TRUE@ BUILD_MAN_FALSE = @BUILD_MAN_FALSE@ BUILD_MAN_TRUE = @BUILD_MAN_TRUE@ CAN_COMPILE_3DNOW_FALSE = @CAN_COMPILE_3DNOW_FALSE@ CAN_COMPILE_3DNOW_TRUE = @CAN_COMPILE_3DNOW_TRUE@ CAN_COMPILE_ALTIVEC_FALSE = @CAN_COMPILE_ALTIVEC_FALSE@ CAN_COMPILE_ALTIVEC_TRUE = @CAN_COMPILE_ALTIVEC_TRUE@ CAN_COMPILE_MMX_FALSE = @CAN_COMPILE_MMX_FALSE@ CAN_COMPILE_MMX_TRUE = @CAN_COMPILE_MMX_TRUE@ CAN_COMPILE_SSE2_FALSE = @CAN_COMPILE_SSE2_FALSE@ CAN_COMPILE_SSE2_TRUE = @CAN_COMPILE_SSE2_TRUE@ CAN_COMPILE_SSE3_FALSE = @CAN_COMPILE_SSE3_FALSE@ CAN_COMPILE_SSE3_TRUE = @CAN_COMPILE_SSE3_TRUE@ CAN_COMPILE_SSE_FALSE = @CAN_COMPILE_SSE_FALSE@ CAN_COMPILE_SSE_TRUE = @CAN_COMPILE_SSE_TRUE@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCAS = @CCAS@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ COMMON_INCLUDES = @COMMON_INCLUDES@ CONSOLEHELPER_LOCATION = @CONSOLEHELPER_LOCATION@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFAULT_CFLAGS = @DEFAULT_CFLAGS@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ESD_LIBS = @ESD_LIBS@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ GCONF_SCHEMAS_INSTALL_FALSE = @GCONF_SCHEMAS_INSTALL_FALSE@ GCONF_SCHEMAS_INSTALL_TRUE = @GCONF_SCHEMAS_INSTALL_TRUE@ GCONF_SCHEMA_CONFIG_SOURCE = @GCONF_SCHEMA_CONFIG_SOURCE@ GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@ GDK_PIXBUF_CSOURCE = @GDK_PIXBUF_CSOURCE@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ HAVE_GCC_LIMITS_FALSE = @HAVE_GCC_LIMITS_FALSE@ HAVE_GCC_LIMITS_TRUE = @HAVE_GCC_LIMITS_TRUE@ HAVE_LIBZVBI_FALSE = @HAVE_LIBZVBI_FALSE@ HAVE_LIBZVBI_TRUE = @HAVE_LIBZVBI_TRUE@ HAVE_X86_FALSE = @HAVE_X86_FALSE@ HAVE_X86_TRUE = @HAVE_X86_TRUE@ HAVE_XMU_FALSE = @HAVE_XMU_FALSE@ HAVE_XMU_TRUE = @HAVE_XMU_TRUE@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ INTLTOOL_CAVES_RULE = @INTLTOOL_CAVES_RULE@ INTLTOOL_DESKTOP_RULE = @INTLTOOL_DESKTOP_RULE@ INTLTOOL_DIRECTORY_RULE = @INTLTOOL_DIRECTORY_RULE@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ INTLTOOL_ICONV = @INTLTOOL_ICONV@ INTLTOOL_KBD_RULE = @INTLTOOL_KBD_RULE@ INTLTOOL_KEYS_RULE = @INTLTOOL_KEYS_RULE@ INTLTOOL_MERGE = @INTLTOOL_MERGE@ INTLTOOL_MSGFMT = @INTLTOOL_MSGFMT@ INTLTOOL_MSGMERGE = @INTLTOOL_MSGMERGE@ INTLTOOL_OAF_RULE = @INTLTOOL_OAF_RULE@ INTLTOOL_PERL = @INTLTOOL_PERL@ INTLTOOL_PONG_RULE = @INTLTOOL_PONG_RULE@ INTLTOOL_PROP_RULE = @INTLTOOL_PROP_RULE@ INTLTOOL_SCHEMAS_RULE = @INTLTOOL_SCHEMAS_RULE@ INTLTOOL_SERVER_RULE = @INTLTOOL_SERVER_RULE@ INTLTOOL_SHEET_RULE = @INTLTOOL_SHEET_RULE@ INTLTOOL_SOUNDLIST_RULE = @INTLTOOL_SOUNDLIST_RULE@ INTLTOOL_THEME_RULE = @INTLTOOL_THEME_RULE@ INTLTOOL_UI_RULE = @INTLTOOL_UI_RULE@ INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ INTLTOOL_XAM_RULE = @INTLTOOL_XAM_RULE@ INTLTOOL_XGETTEXT = @INTLTOOL_XGETTEXT@ INTLTOOL_XML_NOMERGE_RULE = @INTLTOOL_XML_NOMERGE_RULE@ INTLTOOL_XML_RULE = @INTLTOOL_XML_RULE@ JPEG_LIB = @JPEG_LIB@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBXML_CFLAGS = @LIBXML_CFLAGS@ LIBXML_LIBS = @LIBXML_LIBS@ LIRC_LIB = @LIRC_LIB@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAKEINFO = @MAKEINFO@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ NEED_ZSFB_FALSE = @NEED_ZSFB_FALSE@ NEED_ZSFB_TRUE = @NEED_ZSFB_TRUE@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_CFLAGS = @PACKAGE_CFLAGS@ PACKAGE_LIBS = @PACKAGE_LIBS@ PACKAGE_LIB_DIR = @PACKAGE_LIB_DIR@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_PIXMAPS_DIR = @PACKAGE_PIXMAPS_DIR@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PACKAGE_VERSION_ID = @PACKAGE_VERSION_ID@ PATH_SEPARATOR = @PATH_SEPARATOR@ PG_CFLAGS = @PG_CFLAGS@ PKG_CONFIG = @PKG_CONFIG@ PLUGIN_DEFAULT_DIR = @PLUGIN_DEFAULT_DIR@ PLUGIN_DEFAULT_FLAGS = @PLUGIN_DEFAULT_FLAGS@ PNG_LIBS = @PNG_LIBS@ POFILES = @POFILES@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ PYTHON_LIBS = @PYTHON_LIBS@ PY_CFLAGS = @PY_CFLAGS@ PY_EXTRA_LIBS = @PY_EXTRA_LIBS@ PY_LIBS = @PY_LIBS@ PY_LIB_LOC = @PY_LIB_LOC@ RANLIB = @RANLIB@ RTE_LIBS = @RTE_LIBS@ SCROLLKEEPER_BUILD_REQUIRED = @SCROLLKEEPER_BUILD_REQUIRED@ SCROLLKEEPER_CONFIG = @SCROLLKEEPER_CONFIG@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ SUID_ZSFB_FALSE = @SUID_ZSFB_FALSE@ SUID_ZSFB_TRUE = @SUID_ZSFB_TRUE@ UNICODE_CFLAGS = @UNICODE_CFLAGS@ UNICODE_LIBS = @UNICODE_LIBS@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ WARN_CFLAGS = @WARN_CFLAGS@ XGETTEXT = @XGETTEXT@ XMLCATALOG = @XMLCATALOG@ XML_CATALOG_FILE = @XML_CATALOG_FILE@ XSLTPROC = @XSLTPROC@ X_CFLAGS = @X_CFLAGS@ X_DPMS_LIBS = @X_DPMS_LIBS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ X_XF86DGA_LIBS = @X_XF86DGA_LIBS@ X_XF86VMODE_LIBS = @X_XF86VMODE_LIBS@ X_XINERAMA_LIBS = @X_XINERAMA_LIBS@ X_XMU_LIBS = @X_XMU_LIBS@ X_XV_LIBS = @X_XV_LIBS@ ZSFB_GROUP = @ZSFB_GROUP@ ZSFB_OWNER = @ZSFB_OWNER@ ZVBI_CFLAGS = @ZVBI_CFLAGS@ ZVBI_LIBS = @ZVBI_LIBS@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_STRIP = @ac_ct_STRIP@ ac_pt_PKG_CONFIG = @ac_pt_PKG_CONFIG@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ datadir = @datadir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ python_val = @python_val@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ SUBDIRS = alirc screenshot mpeg $(am__append_1) $(am__append_2) all: all-recursive .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu plugins/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu plugins/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool uninstall-info-am: # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" mostlyclean-recursive clean-recursive distclean-recursive \ maintainer-clean-recursive: @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(mkdir_p) "$(distdir)/$$subdir" \ || exit 1; \ distdir=`$(am__cd) $(distdir) && pwd`; \ top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ (cd $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$top_distdir" \ distdir="$$distdir/$$subdir" \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile installdirs: installdirs-recursive installdirs-am: install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-recursive -rm -f Makefile distclean-am: clean-am distclean-generic distclean-libtool \ distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive info: info-recursive info-am: install-data-am: install-exec-am: install-info: install-info-recursive install-man: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-info-am uninstall-info: uninstall-info-recursive .PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am \ clean clean-generic clean-libtool clean-recursive ctags \ ctags-recursive distclean distclean-generic distclean-libtool \ distclean-recursive distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-exec install-exec-am install-info \ install-info-am install-man install-strip installcheck \ installcheck-am installdirs installdirs-am maintainer-clean \ maintainer-clean-generic maintainer-clean-recursive \ mostlyclean mostlyclean-generic mostlyclean-libtool \ mostlyclean-recursive pdf pdf-am ps ps-am tags tags-recursive \ uninstall uninstall-am uninstall-info-am # Not built this time: # lirc parrot template # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: zapping-0.10cvs6/plugins/subtitle/ 777 764 144 0 10443536364 12335 5zapping-0.10cvs6/plugins/subtitle/Makefile.am 644 764 144 1362 10327374467 14374 ## Process this file with automake to produce Makefile.in plugindir = @PLUGIN_DEFAULT_DIR@ plugin_LTLIBRARIES = libsubtitle.zapping.la AM_CFLAGS = \ @PLUGIN_DEFAULT_FLAGS@ \ -DZAPPING8 INCLUDES = \ -I$(top_srcdir) \ @COMMON_INCLUDES@ libsubtitle_zapping_la_SOURCES = \ view.c view.h \ main.c main.h \ preferences.c preferences.h libsubtitle_zapping_la_LIBADD = \ $(top_builddir)/libvbi/libvbi.la \ $(PTHREAD_LIB) \ $(PNG_LIB) \ $(UNICODE_LIBS) # Must prevent link conflict with libzvbi 0.2. great_rename: for file in *.c *.h; do \ sed "s/vbi_/vbi3_/g;s/VBI_/VBI3_/g" <$$file >tmp; \ mv tmp $$file; \ done great_emaner: for file in *.c *.h; do \ sed "s/vbi3_/vbi_/g;s/VBI3_/VBI_/g" <$$file >tmp; \ mv tmp $$file; \ done zapping-0.10cvs6/plugins/subtitle/Makefile.in 644 764 144 47120 10442575577 14432 # Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = ../.. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = plugins/subtitle DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; am__installdirs = "$(DESTDIR)$(plugindir)" pluginLTLIBRARIES_INSTALL = $(INSTALL) LTLIBRARIES = $(plugin_LTLIBRARIES) am__DEPENDENCIES_1 = libsubtitle_zapping_la_DEPENDENCIES = \ $(top_builddir)/libvbi/libvbi.la $(am__DEPENDENCIES_1) am_libsubtitle_zapping_la_OBJECTS = view.lo main.lo preferences.lo libsubtitle_zapping_la_OBJECTS = $(am_libsubtitle_zapping_la_OBJECTS) DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ SOURCES = $(libsubtitle_zapping_la_SOURCES) DIST_SOURCES = $(libsubtitle_zapping_la_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ ARTS_CFLAGS = @ARTS_CFLAGS@ ARTS_LIBS = @ARTS_LIBS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BUILD_DEINTERLACE_PLUGIN_FALSE = @BUILD_DEINTERLACE_PLUGIN_FALSE@ BUILD_DEINTERLACE_PLUGIN_TRUE = @BUILD_DEINTERLACE_PLUGIN_TRUE@ BUILD_MAN_FALSE = @BUILD_MAN_FALSE@ BUILD_MAN_TRUE = @BUILD_MAN_TRUE@ CAN_COMPILE_3DNOW_FALSE = @CAN_COMPILE_3DNOW_FALSE@ CAN_COMPILE_3DNOW_TRUE = @CAN_COMPILE_3DNOW_TRUE@ CAN_COMPILE_ALTIVEC_FALSE = @CAN_COMPILE_ALTIVEC_FALSE@ CAN_COMPILE_ALTIVEC_TRUE = @CAN_COMPILE_ALTIVEC_TRUE@ CAN_COMPILE_MMX_FALSE = @CAN_COMPILE_MMX_FALSE@ CAN_COMPILE_MMX_TRUE = @CAN_COMPILE_MMX_TRUE@ CAN_COMPILE_SSE2_FALSE = @CAN_COMPILE_SSE2_FALSE@ CAN_COMPILE_SSE2_TRUE = @CAN_COMPILE_SSE2_TRUE@ CAN_COMPILE_SSE3_FALSE = @CAN_COMPILE_SSE3_FALSE@ CAN_COMPILE_SSE3_TRUE = @CAN_COMPILE_SSE3_TRUE@ CAN_COMPILE_SSE_FALSE = @CAN_COMPILE_SSE_FALSE@ CAN_COMPILE_SSE_TRUE = @CAN_COMPILE_SSE_TRUE@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCAS = @CCAS@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ COMMON_INCLUDES = @COMMON_INCLUDES@ CONSOLEHELPER_LOCATION = @CONSOLEHELPER_LOCATION@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFAULT_CFLAGS = @DEFAULT_CFLAGS@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ESD_LIBS = @ESD_LIBS@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ GCONF_SCHEMAS_INSTALL_FALSE = @GCONF_SCHEMAS_INSTALL_FALSE@ GCONF_SCHEMAS_INSTALL_TRUE = @GCONF_SCHEMAS_INSTALL_TRUE@ GCONF_SCHEMA_CONFIG_SOURCE = @GCONF_SCHEMA_CONFIG_SOURCE@ GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@ GDK_PIXBUF_CSOURCE = @GDK_PIXBUF_CSOURCE@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ HAVE_GCC_LIMITS_FALSE = @HAVE_GCC_LIMITS_FALSE@ HAVE_GCC_LIMITS_TRUE = @HAVE_GCC_LIMITS_TRUE@ HAVE_LIBZVBI_FALSE = @HAVE_LIBZVBI_FALSE@ HAVE_LIBZVBI_TRUE = @HAVE_LIBZVBI_TRUE@ HAVE_X86_FALSE = @HAVE_X86_FALSE@ HAVE_X86_TRUE = @HAVE_X86_TRUE@ HAVE_XMU_FALSE = @HAVE_XMU_FALSE@ HAVE_XMU_TRUE = @HAVE_XMU_TRUE@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ INTLTOOL_CAVES_RULE = @INTLTOOL_CAVES_RULE@ INTLTOOL_DESKTOP_RULE = @INTLTOOL_DESKTOP_RULE@ INTLTOOL_DIRECTORY_RULE = @INTLTOOL_DIRECTORY_RULE@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ INTLTOOL_ICONV = @INTLTOOL_ICONV@ INTLTOOL_KBD_RULE = @INTLTOOL_KBD_RULE@ INTLTOOL_KEYS_RULE = @INTLTOOL_KEYS_RULE@ INTLTOOL_MERGE = @INTLTOOL_MERGE@ INTLTOOL_MSGFMT = @INTLTOOL_MSGFMT@ INTLTOOL_MSGMERGE = @INTLTOOL_MSGMERGE@ INTLTOOL_OAF_RULE = @INTLTOOL_OAF_RULE@ INTLTOOL_PERL = @INTLTOOL_PERL@ INTLTOOL_PONG_RULE = @INTLTOOL_PONG_RULE@ INTLTOOL_PROP_RULE = @INTLTOOL_PROP_RULE@ INTLTOOL_SCHEMAS_RULE = @INTLTOOL_SCHEMAS_RULE@ INTLTOOL_SERVER_RULE = @INTLTOOL_SERVER_RULE@ INTLTOOL_SHEET_RULE = @INTLTOOL_SHEET_RULE@ INTLTOOL_SOUNDLIST_RULE = @INTLTOOL_SOUNDLIST_RULE@ INTLTOOL_THEME_RULE = @INTLTOOL_THEME_RULE@ INTLTOOL_UI_RULE = @INTLTOOL_UI_RULE@ INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ INTLTOOL_XAM_RULE = @INTLTOOL_XAM_RULE@ INTLTOOL_XGETTEXT = @INTLTOOL_XGETTEXT@ INTLTOOL_XML_NOMERGE_RULE = @INTLTOOL_XML_NOMERGE_RULE@ INTLTOOL_XML_RULE = @INTLTOOL_XML_RULE@ JPEG_LIB = @JPEG_LIB@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBXML_CFLAGS = @LIBXML_CFLAGS@ LIBXML_LIBS = @LIBXML_LIBS@ LIRC_LIB = @LIRC_LIB@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAKEINFO = @MAKEINFO@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ NEED_ZSFB_FALSE = @NEED_ZSFB_FALSE@ NEED_ZSFB_TRUE = @NEED_ZSFB_TRUE@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_CFLAGS = @PACKAGE_CFLAGS@ PACKAGE_LIBS = @PACKAGE_LIBS@ PACKAGE_LIB_DIR = @PACKAGE_LIB_DIR@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_PIXMAPS_DIR = @PACKAGE_PIXMAPS_DIR@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PACKAGE_VERSION_ID = @PACKAGE_VERSION_ID@ PATH_SEPARATOR = @PATH_SEPARATOR@ PG_CFLAGS = @PG_CFLAGS@ PKG_CONFIG = @PKG_CONFIG@ PLUGIN_DEFAULT_DIR = @PLUGIN_DEFAULT_DIR@ PLUGIN_DEFAULT_FLAGS = @PLUGIN_DEFAULT_FLAGS@ PNG_LIBS = @PNG_LIBS@ POFILES = @POFILES@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ PYTHON_LIBS = @PYTHON_LIBS@ PY_CFLAGS = @PY_CFLAGS@ PY_EXTRA_LIBS = @PY_EXTRA_LIBS@ PY_LIBS = @PY_LIBS@ PY_LIB_LOC = @PY_LIB_LOC@ RANLIB = @RANLIB@ RTE_LIBS = @RTE_LIBS@ SCROLLKEEPER_BUILD_REQUIRED = @SCROLLKEEPER_BUILD_REQUIRED@ SCROLLKEEPER_CONFIG = @SCROLLKEEPER_CONFIG@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ SUID_ZSFB_FALSE = @SUID_ZSFB_FALSE@ SUID_ZSFB_TRUE = @SUID_ZSFB_TRUE@ UNICODE_CFLAGS = @UNICODE_CFLAGS@ UNICODE_LIBS = @UNICODE_LIBS@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ WARN_CFLAGS = @WARN_CFLAGS@ XGETTEXT = @XGETTEXT@ XMLCATALOG = @XMLCATALOG@ XML_CATALOG_FILE = @XML_CATALOG_FILE@ XSLTPROC = @XSLTPROC@ X_CFLAGS = @X_CFLAGS@ X_DPMS_LIBS = @X_DPMS_LIBS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ X_XF86DGA_LIBS = @X_XF86DGA_LIBS@ X_XF86VMODE_LIBS = @X_XF86VMODE_LIBS@ X_XINERAMA_LIBS = @X_XINERAMA_LIBS@ X_XMU_LIBS = @X_XMU_LIBS@ X_XV_LIBS = @X_XV_LIBS@ ZSFB_GROUP = @ZSFB_GROUP@ ZSFB_OWNER = @ZSFB_OWNER@ ZVBI_CFLAGS = @ZVBI_CFLAGS@ ZVBI_LIBS = @ZVBI_LIBS@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_STRIP = @ac_ct_STRIP@ ac_pt_PKG_CONFIG = @ac_pt_PKG_CONFIG@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ datadir = @datadir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ python_val = @python_val@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ plugindir = @PLUGIN_DEFAULT_DIR@ plugin_LTLIBRARIES = libsubtitle.zapping.la AM_CFLAGS = \ @PLUGIN_DEFAULT_FLAGS@ \ -DZAPPING8 INCLUDES = \ -I$(top_srcdir) \ @COMMON_INCLUDES@ libsubtitle_zapping_la_SOURCES = \ view.c view.h \ main.c main.h \ preferences.c preferences.h libsubtitle_zapping_la_LIBADD = \ $(top_builddir)/libvbi/libvbi.la \ $(PTHREAD_LIB) \ $(PNG_LIB) \ $(UNICODE_LIBS) all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu plugins/subtitle/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu plugins/subtitle/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh install-pluginLTLIBRARIES: $(plugin_LTLIBRARIES) @$(NORMAL_INSTALL) test -z "$(plugindir)" || $(mkdir_p) "$(DESTDIR)$(plugindir)" @list='$(plugin_LTLIBRARIES)'; for p in $$list; do \ if test -f $$p; then \ f=$(am__strip_dir) \ echo " $(LIBTOOL) --mode=install $(pluginLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(plugindir)/$$f'"; \ $(LIBTOOL) --mode=install $(pluginLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(plugindir)/$$f"; \ else :; fi; \ done uninstall-pluginLTLIBRARIES: @$(NORMAL_UNINSTALL) @set -x; list='$(plugin_LTLIBRARIES)'; for p in $$list; do \ p=$(am__strip_dir) \ echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(plugindir)/$$p'"; \ $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(plugindir)/$$p"; \ done clean-pluginLTLIBRARIES: -test -z "$(plugin_LTLIBRARIES)" || rm -f $(plugin_LTLIBRARIES) @list='$(plugin_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libsubtitle.zapping.la: $(libsubtitle_zapping_la_OBJECTS) $(libsubtitle_zapping_la_DEPENDENCIES) $(LINK) -rpath $(plugindir) $(libsubtitle_zapping_la_LDFLAGS) $(libsubtitle_zapping_la_OBJECTS) $(libsubtitle_zapping_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/main.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/preferences.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/view.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool uninstall-info-am: ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: for dir in "$(DESTDIR)$(plugindir)"; do \ test -z "$$dir" || $(mkdir_p) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-pluginLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-libtool distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-pluginLTLIBRARIES install-exec-am: install-info: install-info-am install-man: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-info-am uninstall-pluginLTLIBRARIES .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-pluginLTLIBRARIES ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-exec \ install-exec-am install-info install-info-am install-man \ install-pluginLTLIBRARIES install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags uninstall uninstall-am uninstall-info-am \ uninstall-pluginLTLIBRARIES # Must prevent link conflict with libzvbi 0.2. great_rename: for file in *.c *.h; do \ sed "s/vbi_/vbi3_/g;s/VBI_/VBI3_/g" <$$file >tmp; \ mv tmp $$file; \ done great_emaner: for file in *.c *.h; do \ sed "s/vbi3_/vbi_/g;s/VBI3_/VBI_/g" <$$file >tmp; \ mv tmp $$file; \ done # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: zapping-0.10cvs6/plugins/subtitle/main.c 644 764 144 7067 10305456045 13425 /* * Zapping TV viewer * * Copyright (C) 2000-2002 Iaki Garca Etxebarria * Copyright (C) 2000-2005 Michael H. Schimek * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* $Id: main.c,v 1.1 2005/09/01 01:40:53 mschimek Exp $ */ #ifdef HAVE_CONFIG_H # include "config.h" #endif #include "src/plugin_common.h" #include "src/properties.h" #include "preferences.h" #include "main.h" #include "view.h" GList * subtitle_views; static void plugin_close (void) { while (subtitle_views) gtk_widget_destroy (GTK_WIDGET (subtitle_views->data)); } static void properties_add (GtkDialog * dialog) { static SidebarEntry se = { .label = N_("Subtitles"), .icon_name = "subtitle48.png", .create = subtitle_prefs_new, .apply = (void (*)(GtkWidget *)) subtitle_prefs_apply, .cancel = (void (*)(GtkWidget *)) subtitle_prefs_cancel, .help_link_id = "zapping-settings-vbi", }; static const SidebarGroup sg = { N_("Plugins"), &se, 1 }; standard_properties_add (dialog, &sg, 1, /* glade */ NULL); } static gboolean plugin_init (PluginBridge bridge _unused_, tveng_device_info * info _unused_) { static const property_handler ph = { .add = properties_add, }; D(); append_property_handler (&ph); D(); return TRUE; } static void plugin_get_info (const gchar ** canonical_name, const gchar ** descriptive_name, const gchar ** description, const gchar ** short_description, const gchar ** author, const gchar ** version) { if (canonical_name) *canonical_name = "subtitle"; if (descriptive_name) *descriptive_name = N_("Subtitle plugin"); if (description) *description = ""; if (short_description) *short_description = ""; if (author) *author = ""; if (version) *version = "1.0"; } static struct plugin_misc_info * plugin_get_misc_info (void) { static struct plugin_misc_info returned_struct = { sizeof (struct plugin_misc_info), 6, /* plugin priority */ 0 /* category */ }; return &returned_struct; } gboolean plugin_get_symbol (const gchar * name, gint hash, gpointer * ptr) { static const struct plugin_exported_symbol symbols [] = { SYMBOL (plugin_close, 0x1234), SYMBOL (plugin_get_info, 0x1234), SYMBOL (plugin_get_misc_info, 0x1234), SYMBOL (plugin_init, 0x1234), SYMBOL2 (subtitle, view_new), }; guint i; for (i = 0; i < N_ELEMENTS (symbols); ++i) if (0 == strcmp (symbols[i].symbol, name)) { if (symbols[i].hash != hash) { if (ptr) *ptr = GINT_TO_POINTER(0x3); /* hash collision code */ g_warning("Check error: \"%s\" in plugin %s " "has hash 0x%x vs. 0x%x", name, "teletext", symbols[i].hash, hash); return FALSE; } if (ptr) *ptr = symbols[i].ptr; return TRUE; } if (ptr) *ptr = GINT_TO_POINTER(0x2); return FALSE; } gint plugin_get_protocol (void) { return PLUGIN_PROTOCOL; } zapping-0.10cvs6/plugins/subtitle/main.h 644 764 144 2266 10305456045 13426 /* * Zapping TV viewer * * Copyright (C) 2000-2002 Iaki Garca Etxebarria * Copyright (C) 2000-2005 Michael H. Schimek * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* $Id: main.h,v 1.1 2005/09/01 01:40:53 mschimek Exp $ */ #ifndef SUBTITLE_MAIN_H #define SUBTITLE_MAIN_H #ifdef HAVE_CONFIG_H # include "config.h" #endif extern GList * subtitle_views; extern gboolean plugin_get_symbol (const gchar * name, gint hash, gpointer * ptr); extern gint plugin_get_protocol (void); #endif /* SUBTITLE_MAIN_H */ zapping-0.10cvs6/plugins/subtitle/view.c 644 764 144 147413 10442152247 13512 /* * Zapping (TV viewer for the Gnome Desktop) * * Copyright (C) 2005 Michael H. Schimek * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* $Id: view.c,v 1.5 2006/06/09 01:53:43 mschimek Exp $ */ #ifdef HAVE_CONFIG_H # include "config.h" #endif #include #include #include "libvbi/vbi_decoder.h" #include "libvbi/exp-gfx.h" #include "src/i18n.h" #include "src/zmisc.h" #include "src/zgconf.h" #include "src/zvbi.h" #include "src/subtitle.h" #include "main.h" /* subtitle_views */ #include "preferences.h" #include "view.h" #include "src/remote.h" /* python_command_printf */ /* below video: e.g. video area += 20 % height, then add 20 % to subtitle rel_y. */ #ifndef HAVE_LRINT static long lrint (double x) { if (x < 0) return (long)(x - 0.5); else return (long)(x + 0.5); } #endif #define GCONF_DIR "/apps/zapping/plugins/subtitle" #define IS_CAPTION_PGNO(pgno) ((pgno) <= 8) #define IS_TELETEXT_PGNO(pgno) ((pgno) > 8) #define IS_CAPTION_PAGE(pg) (IS_CAPTION_PGNO ((pg)->pgno)) #define IS_TELETEXT_PAGE(pg) (IS_TELETEXT_PGNO ((pg)->pgno)) enum { POSITION_CHANGED, N_SIGNALS }; static GObjectClass * parent_class; static guint signals[N_SIGNALS]; static GdkCursor * cursor_normal; static GdkCursor * cursor_link; /* User options. */ static vbi3_charset_code default_charset = 0; static GdkInterpType interp_type = GDK_INTERP_BILINEAR; static gint brightness = 128; static gint contrast = 64; static vbi3_rgba default_foreground = -1; static vbi3_rgba default_background = 0; static gboolean padding = TRUE; static gboolean roll = TRUE; static gboolean show_dheight = TRUE; static void realloc_unscaled (SubtitleView * view, const vbi3_page * pg) { guint src_width; guint src_height; /* view->unscaled_pixbuf contains no image of view->pg. */ vbi3_page_unref (view->pg); view->pg = NULL; if (IS_TELETEXT_PAGE (pg)) { src_width = pg->columns * 12; src_height = pg->rows * 10; } else /* Caption */ { src_width = pg->columns * 16; src_height = pg->rows * 13; } if (view->unscaled_pixbuf) g_object_unref (G_OBJECT (view->unscaled_pixbuf)); view->unscaled_pixbuf = gdk_pixbuf_new (GDK_COLORSPACE_RGB, /* has_alpha */ TRUE, /* bits_per_sample */ 8, src_width, src_height); /* Translation of pixbuf parameters for vbi3_page_draw(). */ view->unscaled_format.width = src_width; view->unscaled_format.height = src_height; view->unscaled_format.offset = 0; view->unscaled_format.bytes_per_line = gdk_pixbuf_get_rowstride (view->unscaled_pixbuf); view->unscaled_format.size = view->unscaled_format.bytes_per_line * src_height; /* r8, g8, b8, a8 in memory. */ view->unscaled_format.pixfmt = VBI3_PIXFMT_RGBA24_LE; view->unscaled_format.color_space = VBI3_COLOR_SPACE_UNKNOWN; } static void draw_unscaled_page (SubtitleView * view, guint * first_row, guint * last_row, const vbi3_page * pg) { if (NULL == view->unscaled_pixbuf) realloc_unscaled (view, pg); if (NULL == view->pg || view->redraw_unscaled_full) { vbi3_bool success; /* All rows changed in view->unscaled_pixbuf. */ *first_row = 0; *last_row = pg->rows - 1; if (IS_TELETEXT_PAGE (pg)) { success = vbi3_page_draw_teletext (pg, gdk_pixbuf_get_pixels (view->unscaled_pixbuf), &view->unscaled_format, VBI3_BRIGHTNESS, brightness, VBI3_CONTRAST, contrast, VBI3_REVEAL, TRUE, VBI3_FLASH_ON, TRUE, VBI3_END); } else /* Caption */ { success = vbi3_page_draw_caption (pg, gdk_pixbuf_get_pixels (view->unscaled_pixbuf), &view->unscaled_format, VBI3_BRIGHTNESS, brightness, VBI3_CONTRAST, contrast, VBI3_END); } g_assert (success); view->redraw_unscaled_full = FALSE; } else { vbi3_char *dcp; const vbi3_char *scp; guint row_size; guint row; dcp = view->pg->text; scp = pg->text; row_size = sizeof (*scp) * pg->columns; *first_row = pg->rows; *last_row = 0; for (row = 0; row < pg->rows; ++row) { if (unlikely (0 != memcmp (dcp, scp, row_size))) { vbi3_bool success; *first_row = MIN (row, *first_row); *last_row = MAX (row, *last_row); if (IS_TELETEXT_PAGE (pg)) { success = vbi3_page_draw_teletext_region (pg, gdk_pixbuf_get_pixels (view->unscaled_pixbuf), &view->unscaled_format, /* x */ 0, /* y */ row * 10, /* column */ 0, row, pg->columns, /* n_rows */ 1, VBI3_BRIGHTNESS, brightness, VBI3_CONTRAST, contrast, VBI3_REVEAL, TRUE, VBI3_FLASH_ON, TRUE, VBI3_END); } else /* Caption */ { success = vbi3_page_draw_caption_region (pg, gdk_pixbuf_get_pixels (view->unscaled_pixbuf), &view->unscaled_format, /* x */ 0, /* y */ row * 13, /* column */ 0, row, pg->columns, /* n_rows */ 1, VBI3_BRIGHTNESS, brightness, VBI3_CONTRAST, contrast, VBI3_END); } g_assert (success); } dcp += pg->columns; scp += pg->columns; } } } static void text_position (const SubtitleView * view, GtkAllocation * position, const vbi3_page * pg, const GtkAllocation * video_bounds, const GtkAllocation * visible_bounds) { gdouble width; gdouble height; gdouble max_width; gdouble character_cell_height; gdouble roll_position; if (IS_TELETEXT_PAGE (pg)) { g_assert (pg->columns <= 768 / 16); g_assert (pg->rows <= 576 / 20); /* Maintain aspect if possible, otherwise squeeze horizontally. We can't adjust height instead because that would put the rows somewhere in the middle of the screen. */ width = pg->columns * video_bounds->height * (16 / 576.0); height = pg->rows * video_bounds->height * (20 / 576.0); max_width = pg->columns * visible_bounds->width * (16 / 768.0); } else /* Caption */ { g_assert (pg->columns <= 640 / 16); g_assert (pg->rows <= 480 / 26); width = pg->columns * video_bounds->height * (16 / 480.0); height = pg->rows * video_bounds->height * (26 / 480.0); max_width = pg->columns * visible_bounds->width * (16 / 640.0); } position->width = (gint)(MIN (width, max_width) * view->rel_size); position->height = (gint)(height * view->rel_size); position->width = MAX (16, position->width); position->height = MAX (16, position->height); character_cell_height = position->height / (gdouble) pg->rows; roll_position = floor ((view->roll_counter - 13) * character_cell_height * (1 / 26.0)); /* Center the view within visibility_bounds. */ position->x = lrint ((visible_bounds->x - ((position->width + 1) >> 1)) + view->rel_x * visible_bounds->width); position->y = lrint ((visible_bounds->y - ((position->height + 1) >> 1)) + view->rel_y * visible_bounds->height + roll_position); } static gboolean realloc_scaled (struct subt_image * image, const vbi3_page * pg, const GtkAllocation * alloc) { image->valid = FALSE; if (NULL == pg || alloc->width <= 0 || alloc->height <= 0) { if (image->pixbuf) { g_object_unref (G_OBJECT (image->pixbuf)); image->pixbuf = NULL; } return FALSE; } image->cell_width = alloc->width / (double) pg->columns; image->cell_height = alloc->height / (double) pg->rows; image->expose.width = 0; image->expose.height = 0; if (NULL != image->pixbuf) { if (alloc->width == gdk_pixbuf_get_width (image->pixbuf) && alloc->height == gdk_pixbuf_get_height (image->pixbuf)) return TRUE; g_object_unref (G_OBJECT (image->pixbuf)); } image->pixbuf = gdk_pixbuf_new (GDK_COLORSPACE_RGB, /* has_alpha */ TRUE, /* bits_per_sample */ 8, alloc->width, alloc->height); return TRUE; } static gboolean scale_image (SubtitleView * view, struct subt_image * image, guint first_row, guint last_row) { guint height; g_assert (NULL != view->pg); g_assert (NULL != view->unscaled_pixbuf); g_assert (NULL != image->pixbuf); if (!image->valid) { /* Redraw everything. */ first_row = 0; last_row = view->pg->rows - 1; } image->expose.x = 0; image->expose.y = lrint (first_row * image->cell_height - .5); if ((gint) image->expose.y < 0) image->expose.y = 0; image->expose.width = gdk_pixbuf_get_width (image->pixbuf); image->expose.height = lrint ((last_row + 1) * image->cell_height + .5); height = gdk_pixbuf_get_height (image->pixbuf); if ((guint) image->expose.height > height) image->expose.height = height; image->expose.height -= image->expose.y; if (image->expose.width <= 0 || image->expose.height <= 0) return FALSE; gdk_pixbuf_scale (/* src */ view->unscaled_pixbuf, /* dst */ image->pixbuf, /* dst_x */ image->expose.x, /* dst_y */ image->expose.y, /* dst_width */ image->expose.width, /* dst_height */ image->expose.height, /* offset_x */ 0, /* offset_y */ 0, /* scale_x */ (gdk_pixbuf_get_width (image->pixbuf) / (gdouble) view->unscaled_format.width), /* scale_y */ (gdk_pixbuf_get_height (image->pixbuf) / (gdouble) view->unscaled_format.height), interp_type); image->valid = TRUE; return TRUE; } static GdkPixbuf * get_image_ (SubtitleView * view, GdkRectangle * expose, guint width, guint height) { const vbi3_page *pg; GtkAllocation bounds; GtkAllocation position; struct subt_image *image; gint x2; gint y2; if (NULL == (pg = view->pg)) return NULL; bounds.x = 0; bounds.y = 0; bounds.width = width; bounds.height = height; image = &view->capture_scaled; if (NULL != image->pixbuf) { GObject *object = G_OBJECT (image->pixbuf); if (object->ref_count > 1) { g_object_unref (object); image->pixbuf = NULL; } } if (NULL == image->pixbuf || width != (guint) gdk_pixbuf_get_width (image->pixbuf) || height != (guint) gdk_pixbuf_get_height (image->pixbuf)) { realloc_scaled (image, pg, &bounds); } /* Set to all transparent black. */ gdk_pixbuf_fill (image->pixbuf, 0x00000000); text_position (view, &position, pg, /* video */ &bounds, /* visible */ &bounds); /* Clip position against bounds. */ x2 = position.x + position.width; y2 = position.y + position.height; if (x2 > 0 && position.x < (gint) bounds.width && y2 > 0 && position.y < (gint) bounds.height) { image->expose.x = MAX (0, position.x); image->expose.y = MAX (0, position.y); image->expose.width = MIN (x2, bounds.width) - image->expose.x; image->expose.height = MIN (y2, bounds.height) - image->expose.y; image->cell_width = position.width / (double) pg->columns; image->cell_height = position.height / (double) pg->rows; if (0) fprintf (stderr, "Unscaled %u,%u Scaled %u,%u Position %u,%u+%u,%u\n", view->unscaled_format.width, view->unscaled_format.height, bounds.width, bounds.height, position.x, position.y, position.width, position.height); gdk_pixbuf_scale (/* src */ view->unscaled_pixbuf, /* dst */ image->pixbuf, /* dst_x */ image->expose.x, /* dst_y */ image->expose.y, /* dst_width */ image->expose.width, /* dst_height */ image->expose.height, /* offset_x */ position.x, /* offset_y */ position.y, /* scale_x */ position.width / (gdouble) view->unscaled_format.width, /* scale_y */ position.height / (gdouble) view->unscaled_format.height, interp_type); } else { CLEAR (image->expose); } image->valid = TRUE; if (expose) *expose = image->expose; g_object_ref (G_OBJECT (image->pixbuf)); return image->pixbuf; } static GdkRegion * nontransparent_region (const vbi3_page * pg, const struct subt_image *image) { GdkRegion *region; GdkRectangle rect; const vbi3_char *cp; guint columns; guint row; uint64_t prev_mask; region = gdk_region_new (); cp = pg->text; columns = pg->columns; prev_mask = 0; g_assert (columns <= 63); for (row = 0; row < pg->rows; ++row) { guint column; uint64_t mask; column = 0; mask = 0; do { double y1, xr; gint y1a, y1b, y2a; guint start; uint64_t bridge; while (likely (VBI3_TRANSPARENT_SPACE == cp[column].opacity)) if (unlikely (++column >= columns)) goto end_of_row; start = column; while (likely (++column < columns)) if (unlikely (VBI3_TRANSPARENT_SPACE == cp[column].opacity)) break; mask |= (((uint64_t) 1 << (column - start)) - 1) << start; bridge = prev_mask & mask; xr = .5; y1 = row * image->cell_height; y1a = lrint (y1 + .5); y1b = lrint (y1 - .5); y2a = lrint (y1 + image->cell_height - .5); while (start < column) { guint i; for (i = start; i < column; ++i) if (0 != (bridge & ((uint64_t) 1 << i))) break; if (i > start) { rect.x = lrint (start * image->cell_width + xr); rect.y = y1a; rect.width = lrint (i * image->cell_width - .5) - rect.x; rect.height = y2a - rect.y; gdk_region_union_with_rect (region, &rect); xr = -.5; /* close gap between blocks */ } for (start = i; i < column; ++i) if (0 == (bridge & ((uint64_t) 1 << i))) break; if (i > start) { rect.x = lrint (start * image->cell_width + xr); /* Close gap between rows. One could also shift, intersect and union regions but I think this is faster. */ rect.y = y1b; rect.width = lrint (i * image->cell_width - .5) - rect.x; rect.height = y2a - rect.y; gdk_region_union_with_rect (region, &rect); start = i; xr = -.5; } } } while (column < columns); end_of_row: cp += columns; prev_mask = mask; } return region; } static void update_window (SubtitleView * view, gboolean reposition, gboolean reshape, gboolean rescale, guint first_row, guint last_row) { GtkAllocation text; const vbi3_page *pg; gdouble roll_position; GdkRectangle extents; GdkRectangle clip_rect; GdkRegion *region; gint indent; pg = view->pg; if (NULL == pg || 0 == view->visibility_bounds.width || 0 == view->visibility_bounds.height) { if (reposition) { text.x = view->visibility_bounds.x; text.y = view->visibility_bounds.y; text.width = 1; text.height = 1; GTK_WIDGET_CLASS (parent_class)->size_allocate (&view->darea.widget, &text); } return; } text = view->darea.widget.allocation; if (reposition) { GtkAllocation *bounds; bounds = view->have_video_bounds ? &view->video_bounds : &view->visibility_bounds; text_position (view, &text, pg, bounds, &view->visibility_bounds); } if (NULL == view->display_scaled.pixbuf || text.width != gdk_pixbuf_get_width (view->display_scaled.pixbuf) || text.height != gdk_pixbuf_get_height (view->display_scaled.pixbuf)) { realloc_scaled (&view->display_scaled, view->pg, &text); reshape = TRUE; /* scaled cell size changed */ rescale = TRUE; first_row = 0; last_row = view->pg->rows - 1; } else if (view->redraw_display_scaled) { rescale = TRUE; first_row = 0; last_row = view->pg->rows - 1; } if (rescale) { if (scale_image (view, &view->display_scaled, first_row, last_row)) { if (reshape) { if (view->region) gdk_region_destroy (view->region); if (0 /* transparent background */) { /* Create bitmap from scaled alpha, region from bitmap, rest as below. */ } else { view->region = nontransparent_region (view->pg, &view->display_scaled); } } #if 0 /* Set alpha to fully opaque. */ p = gdk_pixbuf_get_pixels (image->pixbuf); rowstride = gdk_pixbuf_get_rowstride (image->pixbuf); end = p + (image->expose.y + image->expose.height) * rowstride; p += image->expose.y * rowstride + 3; g_assert (0 == rowstride % 4); while (p < end) { *p = 0xFF; p += 4; } #endif } else /* wtf? */ { reshape = FALSE; rescale = FALSE; } } /* Make sure the subtitles are visible but do not reach across view->visibility_bounds. */ gdk_region_get_clipbox (view->region, &extents); clip_rect.x = 0; clip_rect.y = 0; /* Ignore empty extents with x, y zero. */ if (extents.width | extents.height) { clip_rect.width = text.width; clip_rect.height = text.height; if (extents.width > view->visibility_bounds.width) { /* Bugger! Won't fit, we center. */ indent = extents.x + ((extents.width - view->visibility_bounds.width + 1) >> 1); clip_rect.x = indent; clip_rect.width = view->visibility_bounds.width; goto limit_x; } else if (text.x + extents.x < view->visibility_bounds.x) { indent = extents.x; goto limit_x; } else if (text.x + extents.x + extents.width > view->visibility_bounds.x + view->visibility_bounds.width) { indent = - (view->visibility_bounds.width - extents.x - extents.width); limit_x: view->rel_x = (((text.width + 1) >> 1) - indent) / (gdouble) view->visibility_bounds.width; text.x = view->visibility_bounds.x - indent; reposition = TRUE; } if (extents.height > view->visibility_bounds.height) { indent = extents.y + ((extents.height - view->visibility_bounds.height + 1) >> 1); clip_rect.y = indent; clip_rect.height = view->visibility_bounds.height; goto limit_y; } else if (text.y + extents.y < view->visibility_bounds.y) { indent = extents.y; goto limit_y; } else if (text.y + extents.y + extents.height > view->visibility_bounds.y + view->visibility_bounds.height) { indent = - (view->visibility_bounds.height - extents.y - extents.height); limit_y: roll_position = floor ((view->roll_counter - 13) * view->display_scaled.cell_height * (1 / 26.0)); view->rel_y = (((text.height + 1) >> 1) - indent - roll_position) / (gdouble) view->visibility_bounds.height; text.y = view->visibility_bounds.y - indent; reposition = TRUE; } } region = view->region; if (clip_rect.x | clip_rect.y) { region = gdk_region_rectangle (&clip_rect); gdk_region_intersect (region, view->region); } /* Keep these calls together to reduce flicker. */ if (reposition | reshape) { gdk_window_shape_combine_region (view->darea.widget.window, region, /* offset_x */ 0, /* offset_y */ 0); } if (reposition) GTK_WIDGET_CLASS (parent_class)->size_allocate (&view->darea.widget, &text); if (rescale) { /* Scaled image changed, make it visible. If only the window moved the expose handler will redraw. */ gdk_draw_pixbuf (view->darea.widget.window, view->darea.widget.style->white_gc, view->display_scaled.pixbuf, /* src_x */ view->display_scaled.expose.x, /* src_y */ view->display_scaled.expose.y, /* dst_x */ view->display_scaled.expose.x, /* dst_y */ view->display_scaled.expose.y, view->display_scaled.expose.width, view->display_scaled.expose.height, GDK_RGB_DITHER_NONE, /* x_dither */ 0, /* y_dither */ 0); view->redraw_display_scaled = FALSE; } if (clip_rect.x | clip_rect.y) gdk_region_destroy (region); } static void redraw_unscaled (SubtitleView * view) { guint first_row; guint last_row; if (NULL == view->pg) return; view->redraw_unscaled_full = TRUE; if (view->moving | view->scaling) return; /* later */ draw_unscaled_page (view, &first_row, &last_row, view->pg); update_window (view, /* reposition */ FALSE, /* reshape */ FALSE, /* rescale */ TRUE, first_row, last_row); } static gboolean reset_rolling (SubtitleView * view, const vbi3_page * pg) { gint new_counter; view->roll_start = FALSE; view->rolling = FALSE; new_counter = 13; if (roll /* user option */ && view->roll_enable && NULL != pg && IS_CAPTION_PAGE (pg)) new_counter = 26 - 2; if (new_counter == view->roll_counter) return FALSE; view->roll_counter = new_counter; return TRUE; /* reposition the window */ } static void start_rolling_ (SubtitleView * view) { view->roll_start = TRUE; /* Actual start in show_page, since we must wait for new text (the top row disappearing after a CR) to avoid flicker. */ } static void set_rolling_ (SubtitleView * view, gboolean enable) { if (!enable) if (reset_rolling (view, view->pg)) update_window (view, /* reposition */ TRUE, /* reshape */ FALSE, /* rescale */ FALSE, /* first_row */ 0, /* last_row */ 0); view->roll_enable = enable; } static void show_page_ (SubtitleView * view, vbi3_page * pg) { guint first_row; guint last_row; gboolean reposition; if (view->moving | view->scaling) { /* Show this page when done. */ vbi3_page_unref (view->show_pg); view->show_pg = vbi3_page_ref (pg); return; } reposition = FALSE; if (NULL == view->pg || view->pg->columns != pg->columns || view->pg->rows != pg->rows) { realloc_unscaled (view, pg); if (!view->roll_start) reset_rolling (view, view->pg); /* Depends on pg. */ reposition |= TRUE; } if (view->roll_start) { reposition |= reset_rolling (view, view->pg); if (roll && view->roll_enable && IS_CAPTION_PAGE (pg)) { view->rolling = TRUE; } } draw_unscaled_page (view, &first_row, &last_row, pg); if (first_row > last_row) { /* No change between view->pg and pg. */ return; } /* view->unscaled_pixbuf contains image of pg. */ vbi3_page_unref (view->pg); view->pg = vbi3_page_ref (pg); update_window (view, reposition, /* reshape */ TRUE, /* rescale */ TRUE, first_row, last_row); } static void used_rows (const vbi3_page * pg, unsigned int * first_row, unsigned int * last_row) { const vbi3_char *cp; const vbi3_char *end; g_assert (NULL != pg); g_assert (NULL != first_row); g_assert (NULL != last_row); for (cp = pg->text, end = cp + pg->rows * pg->columns; cp < end; ++cp) if (VBI3_TRANSPARENT_SPACE != cp->opacity) break; if (cp >= end) { *first_row = pg->rows; *last_row = 0; return; } *first_row = (cp - pg->text) / pg->columns; SWAP (cp, end); while (--cp > end) if (VBI3_TRANSPARENT_SPACE != cp->opacity) break; *last_row = (cp - pg->text) / pg->columns; } static void shrink_double_height (vbi3_page * pg) { unsigned int first_row; unsigned int last_row; vbi3_char *t; vbi3_char *b; vbi3_char *dst; vbi3_char *end; unsigned int rows; unsigned int columns; int skip_columns; vbi3_char ts; used_rows (pg, &first_row, &last_row); rows = last_row - first_row + 1; if ((int) rows < 2) return; columns = pg->columns; skip_columns = pg->columns; if (first_row > pg->rows / 2) { t = pg->text + last_row * columns; end = pg->text + first_row * columns; skip_columns = -columns; } else { t = pg->text + first_row * columns; end = pg->text + (last_row + 1) * columns; } dst = t; b = t + skip_columns; while (rows >= 2) { int all_normal; int all_double_height; unsigned int i; all_normal = 0; all_double_height = 0; for (i = 0; i < columns; ++i) { all_normal |= VBI3_NORMAL_SIZE ^ t[i].size; all_double_height |= t[i].unicode ^ b[i].unicode; all_double_height |= t[i].background ^ b[i].background; all_double_height |= t[i].foreground ^ b[i].foreground; all_double_height |= t[i].opacity ^ b[i].opacity; all_double_height |= t[i].attr ^ b[i].attr; } if (0 == all_double_height) { for (i = 0; i < columns; ++i) { static const vbi3_size new_size [] = { [VBI3_NORMAL_SIZE] = VBI3_NORMAL_SIZE, [VBI3_DOUBLE_WIDTH] = VBI3_DOUBLE_WIDTH, [VBI3_DOUBLE_HEIGHT] = VBI3_NORMAL_SIZE, [VBI3_DOUBLE_SIZE] = VBI3_DOUBLE_WIDTH, [VBI3_OVER_TOP] = VBI3_OVER_TOP, [VBI3_OVER_BOTTOM] = VBI3_OVER_TOP, [VBI3_DOUBLE_HEIGHT2] = VBI3_NORMAL_SIZE, [VBI3_DOUBLE_SIZE2] = VBI3_DOUBLE_WIDTH, }; dst[i] = t[i]; dst[i].size = new_size[t[i].size]; } t += 2 * skip_columns; b += 2 * skip_columns; dst += skip_columns; rows -= 2; } else { memcpy (dst, t, sizeof (*dst) * columns); dst += skip_columns; if (0 == all_normal) { t += skip_columns; b += skip_columns; --rows; } else { /* Mixed size. */ memcpy (dst, b, sizeof (*dst) * columns); dst += skip_columns; t += 2 * skip_columns; b += 2 * skip_columns; rows -= 2; } } } if (1 == rows) { memcpy (dst, t, sizeof (*dst) * columns); dst += skip_columns; } CLEAR (ts); ts.opacity = VBI3_TRANSPARENT_SPACE; ts.foreground = VBI3_WHITE; ts.background = VBI3_BLACK; ts.unicode = 0x0020; if (skip_columns < 0) { for (dst += columns - 1; dst >= end;) *dst-- = ts; } else { while (dst < end) *dst++ = ts; } } static void change_opacity (vbi3_page * pg, vbi3_opacity opacity) { vbi3_opacity new_opacity [4]; vbi3_char *cp; vbi3_char *end; new_opacity[VBI3_TRANSPARENT_SPACE] = VBI3_TRANSPARENT_SPACE; new_opacity[VBI3_TRANSPARENT_FULL] = opacity; new_opacity[VBI3_TRANSLUCENT] = opacity; new_opacity[VBI3_OPAQUE] = opacity; end = pg->text + pg->rows * pg->columns; for (cp = pg->text; cp < end; ++cp) cp->opacity = new_opacity[cp->opacity]; } static vbi3_bool decoder_event_handler (const vbi3_event * ev, void * user_data) { SubtitleView *view = SUBTITLE_VIEW (user_data); switch (ev->type) { case VBI3_EVENT_CLOSE: gtk_widget_destroy (&view->darea.widget); break; case VBI3_EVENT_TIMER: if (view->moving | view->scaling) break; if (view->rolling && view->roll_counter >= 0) { update_window (view, /* reposition */ TRUE, /* reshape */ FALSE, /* rescale */ FALSE, /* first_row */ 0, /* last_row */ 0); view->roll_counter -= 2; } break; case VBI3_EVENT_TTX_PAGE: if (ev->ev.ttx_page.pgno == view->monitor_pgno) view->load_page (view, view->monitor_pgno); break; case VBI3_EVENT_CC_PAGE: if (ev->ev.caption.channel != view->monitor_pgno) return FALSE; /* pass on */ if (ev->ev.caption.flags & VBI3_START_ROLLING) view->start_rolling (view); view->load_page (view, view->monitor_pgno); break; default: break; } return FALSE; /* pass on */ } static gboolean load_page_ (SubtitleView * view, vbi3_pgno pgno) { vbi3_page *pg; vbi3_event_mask event_mask; if (view->moving | view->scaling) { vbi3_page_unref (view->show_pg); view->show_pg = NULL; view->load_pgno = pgno; return TRUE; } if (NULL == view->vbi) { if (NULL == (view->vbi = zvbi_get_object ())) return FALSE; } event_mask = 0; if (IS_TELETEXT_PGNO (pgno)) { /* Override charset code from channel config, if present. */ zvbi_cur_channel_get_ttx_encoding (&view->override_charset, pgno); if (VBI3_CHARSET_CODE_NONE != view->override_charset) { pg = vbi3_decoder_get_page (view->vbi, /* nk: current */ NULL, pgno, VBI_ANY_SUBNO, VBI3_HYPERLINKS, TRUE, /* TODO: VBI3_PDC_LINKS, TRUE, */ VBI3_WST_LEVEL, VBI_WST_LEVEL_1p5, VBI3_OVERRIDE_CHARSET_0, view->override_charset, VBI3_END); } else { pg = vbi3_decoder_get_page (view->vbi, /* nk: current */ NULL, pgno, VBI_ANY_SUBNO, VBI3_HYPERLINKS, TRUE, /* VBI3_PDC_LINKS, TRUE, */ VBI3_WST_LEVEL, VBI_WST_LEVEL_1p5, VBI3_DEFAULT_CHARSET_0, default_charset, VBI3_END); } event_mask = (VBI3_EVENT_CLOSE | VBI3_EVENT_TIMER | VBI3_EVENT_TTX_PAGE); } else /* Caption */ { pg = vbi3_decoder_get_page (view->vbi, /* nk: current */ NULL, pgno, /* subno */ 0, VBI3_DEFAULT_FOREGROUND, default_foreground | VBI3_RGBA (0, 0, 0), VBI3_DEFAULT_BACKGROUND, default_background | VBI3_RGBA (0, 0, 0), VBI3_PADDING, (vbi3_bool) padding, VBI3_END); event_mask = (VBI3_EVENT_CLOSE | VBI3_EVENT_TIMER | VBI3_EVENT_CC_PAGE); } if (!pg) return FALSE; vbi3_page_unref (view->show_pg); view->show_pg = NULL; if (!show_dheight && IS_TELETEXT_PAGE (pg)) shrink_double_height (pg); change_opacity (pg, VBI3_OPAQUE); view->show_page (view, pg); vbi3_page_unref (pg); return TRUE; } static gboolean monitor_page_ (SubtitleView * view, vbi3_pgno pgno) { vbi3_event_mask event_mask; if (NULL == view->vbi && (NULL == (view->vbi = zvbi_get_object ()))) return FALSE; view->monitor_pgno = pgno; /* Error ignored. When the page is not cached yet, we'll load it when it arrives. */ view->load_page (view, pgno); event_mask = 0; if (IS_TELETEXT_PGNO (pgno)) { event_mask = (VBI3_EVENT_CLOSE | VBI3_EVENT_TIMER | VBI3_EVENT_TTX_PAGE); } else /* Caption */ { event_mask = (VBI3_EVENT_CLOSE | VBI3_EVENT_TIMER | VBI3_EVENT_CC_PAGE); } /* Add an event handler or change its event mask (we need no Teletext events while displaying a Close Caption page and vice versa). */ if (!vbi3_decoder_add_event_handler (view->vbi, event_mask, decoder_event_handler, view)) { return FALSE; } return TRUE; } /* Configuration. */ static void set_charset_ (SubtitleView * view, vbi3_charset_code charset_code) { vbi3_page *pg; if (charset_code == view->override_charset) return; view->override_charset = charset_code; if (!(pg = view->pg)) return; if (IS_CAPTION_PAGE (pg)) return; /* Error ignored. */ zvbi_cur_channel_set_ttx_encoding (pg->pgno, charset_code); view->load_page (view, pg->pgno); } static void interp_type_notify (GConfClient * client, guint cnxn_id, GConfEntry * entry, gpointer user_data) { client = client; cnxn_id = cnxn_id; user_data = user_data; if (entry->value) { const gchar *s; gint enum_value; s = gconf_value_get_string (entry->value); if (s && gconf_string_to_enum (subtitle_interp_enum, s, &enum_value)) { GList *p; interp_type = (GdkInterpType) enum_value; for (p = g_list_first (subtitle_views); p; p = p->next) { SubtitleView *view = p->data; if (!view->pg) continue; if (view->moving | view->scaling) { view->redraw_display_scaled = TRUE; continue; } update_window (view, /* reposition */ FALSE, /* reshape */ FALSE, /* rescale */ TRUE, /* first_row */ 0, /* last_row */ view->pg->rows - 1); } } } } static void default_charset_notify (GConfClient * client, guint cnxn_id, GConfEntry * entry, gpointer user_data) { client = client; cnxn_id = cnxn_id; user_data = user_data; if (entry->value) { const gchar *s; gint enum_value; s = gconf_value_get_string (entry->value); if (s && gconf_string_to_enum (subtitle_charset_enum, s, &enum_value)) { GList *p; default_charset = enum_value; for (p = g_list_first (subtitle_views); p; p = p->next) { SubtitleView *view = p->data; vbi3_page *pg; if ((pg = view->pg) && IS_TELETEXT_PAGE (pg)) { view->load_page (view, pg->pgno); } } } } } static void redraw_unscaled_notify (GConfClient * client, guint cnxn_id, GConfEntry * entry, gpointer user_data) { gboolean success = FALSE; client = client; cnxn_id = cnxn_id; entry = entry; user_data = user_data; success |= z_gconf_get_int (&brightness, GCONF_DIR "/brightness"); success |= z_gconf_get_int (&contrast, GCONF_DIR "/contrast"); if (success) { GList *p; for (p = g_list_first (subtitle_views); p; p = p->next) { SubtitleView *view = p->data; redraw_unscaled (view); } } } static gboolean get_color (vbi3_rgba * rgba, const gchar * key) { GdkColor color; if (!z_gconf_get_color (&color, key)) return FALSE; *rgba = (((color.red & 0xFF00) >> 8) | (color.green & 0xFF00) | ((color.blue & 0xFF00) << 8)); return TRUE; } static void caption_reload_notify (GConfClient * client, guint cnxn_id, GConfEntry * entry, gpointer user_data) { gboolean success = FALSE; client = client; cnxn_id = cnxn_id; entry = entry; user_data = user_data; success |= z_gconf_get_bool (&padding, GCONF_DIR "/pad"); success |= get_color (&default_foreground, GCONF_DIR "/foreground"); success |= get_color (&default_background, GCONF_DIR "/background"); if (success) { GList *p; for (p = g_list_first (subtitle_views); p; p = p->next) { SubtitleView *view = p->data; vbi3_page *pg; if ((pg = view->pg) && IS_CAPTION_PAGE (pg)) { view->load_page (view, pg->pgno); } } } } static void show_dheight_notify (GConfClient * client, guint cnxn_id, GConfEntry * entry, gpointer user_data) { client = client; cnxn_id = cnxn_id; entry = entry; user_data = user_data; if (z_gconf_get_bool (&show_dheight, GCONF_DIR "/show_dheight")) { GList *p; for (p = g_list_first (subtitle_views); p; p = p->next) { SubtitleView *view = p->data; vbi3_page *pg; if ((pg = view->pg) && IS_TELETEXT_PAGE (pg)) { view->load_page (view, pg->pgno); } } } } static void roll_notify (GConfClient * client, guint cnxn_id, GConfEntry * entry, gpointer user_data) { client = client; cnxn_id = cnxn_id; entry = entry; user_data = user_data; if (z_gconf_get_bool (&roll, GCONF_DIR "/roll")) { GList *p; for (p = g_list_first (subtitle_views); p; p = p->next) { SubtitleView *view = p->data; if (reset_rolling (view, view->pg)) update_window (view, /* reposition */ TRUE, /* reshape */ FALSE, /* rescale */ FALSE, /* first_row */ 0, /* last_row */ 0); } } } /* Actions. */ static void disable_action (GtkAction * action, SubtitleView * view) { action = action; view = view; python_command_printf (NULL, "zapping.closed_caption(0)"); } static void reset_position_action (GtkAction * action, SubtitleView * view) { action = action; view->rel_x = 0.5; view->rel_y = 0.5; view->rel_size = 1.0; g_signal_emit (view, signals[POSITION_CHANGED], 0); update_window (view, /* reposition */ TRUE, /* reshape */ FALSE, /* rescale */ FALSE, /* first_row */ 0, /* last_row */ 0); } static void preferences_action (GtkAction * action, SubtitleView * view) { action = action; view = view; python_command_printf (NULL, "zapping.properties('Plugins','Subtitles')"); } static GtkActionEntry actions [] = { { "SubtitlePopupSubmenu", NULL, "Dummy", NULL, NULL, NULL }, { "SubtitleDisable", NULL, N_("_Disable"), NULL, NULL, G_CALLBACK (disable_action) }, { "SubtitleResetPosition", NULL, N_("_Reset position"), NULL, NULL, G_CALLBACK (reset_position_action) }, { "SubtitleEncodingSubmenu", NULL, N_("_Encoding"), NULL, NULL, NULL }, { "SubtitlePreferences", GTK_STOCK_PREFERENCES, NULL, NULL, NULL, G_CALLBACK (preferences_action) }, }; /* Menus. */ static const char * popup_menu_description = "" " " " " " " " " " " " " " " " " ""; static void on_encoding_menu_toggled (GtkCheckMenuItem * menu_item, zvbi_encoding_menu * em) { SubtitleView *view = SUBTITLE_VIEW (em->user_data); if (menu_item->active) view->set_charset (view, em->code); } static void create_popup_menu (SubtitleView * view, const GdkEventButton * event) { GError *error = NULL; GtkUIManager *ui_manager; GtkWidget *item; GtkWidget *widget; GtkWidget *popup_menu; gboolean success; ui_manager = gtk_ui_manager_new (); gtk_ui_manager_insert_action_group (ui_manager, view->action_group, APPEND); success = gtk_ui_manager_add_ui_from_string (ui_manager, popup_menu_description, NUL_TERMINATED, &error); if (!success || error) { if (error) { g_message ("Cannot build popup menu:\n%s", error->message); g_error_free (error); error = NULL; } exit (EXIT_FAILURE); } widget = gtk_ui_manager_get_widget (ui_manager, "/Popup/SubtitlePopupSubmenu"); popup_menu = gtk_menu_item_get_submenu (GTK_MENU_ITEM (widget)); item = gtk_ui_manager_get_widget (ui_manager, "/Popup/SubtitlePopupSubmenu/SubtitleEncodingSubmenu"); if (item) { if (view->pg && IS_TELETEXT_PGNO (view->pg->pgno)) { GtkMenu *menu; menu = zvbi_create_encoding_menu (on_encoding_menu_toggled, view); gtk_menu_item_set_submenu (GTK_MENU_ITEM (item), GTK_WIDGET (menu)); zvbi_encoding_menu_set_active (menu, view->override_charset); } else { gtk_widget_set_sensitive (item, FALSE); } } zvbi_menu_shell_insert_active_subtitle_pages (GTK_MENU_SHELL (popup_menu), /* position */ 2, view->monitor_pgno, /* separator_above */ TRUE, /* separator_below */ TRUE); gtk_menu_popup (GTK_MENU (popup_menu), /* parent_menu_shell */ NULL, /* parent_menu_item */ NULL, /* menu position func */ NULL, /* menu position data */ NULL, event->button, event->time); } /* Events. */ static void set_position_ (SubtitleView * view, gdouble x, gdouble y) { x = CLAMP (x, -2.0, +2.0); y = CLAMP (y, -2.0, +2.0); if (fabs (x - view->rel_x) >= 1 / 1024.0 || fabs (y - view->rel_y) >= 1 / 1024.0) { view->rel_x = x; view->rel_y = y; g_signal_emit (view, signals[POSITION_CHANGED], 0); update_window (view, /* reposition */ TRUE, /* reshape */ FALSE, /* rescale */ FALSE, /* first_row */ 0, /* last_row */ 0); } } static void set_size_ (SubtitleView * view, gdouble size) { size = CLAMP (size, 0.1, 2.0); if (fabs (size - view->rel_size) >= 1 / 1024.0) { view->rel_size = size; g_signal_emit (view, signals[POSITION_CHANGED], 0); /* Reshapes & rescales if necessary. */ update_window (view, /* reposition */ TRUE, /* reshape */ FALSE, /* rescale */ FALSE, /* first_row */ 0, /* last_row */ 0); } } /* Note on success you must vbi3_link_destroy. */ static gboolean link_from_pointer_position (SubtitleView * view, vbi3_link * lk, gint x, gint y) { GdkWindow *window; const vbi3_page *pg; gint width; gint height; guint row; guint column; vbi3_link_init (lk); if (x < 0 || y < 0) return FALSE; if (!(pg = view->pg)) return FALSE; if (!(window = view->darea.widget.window)) return FALSE; gdk_window_get_geometry (window, /* x */ NULL, /* y */ NULL, &width, &height, /* depth */ NULL); if (width <= 0 || height <= 0) return FALSE; column = (x * pg->columns) / width; row = (y * pg->rows) / height; return vbi3_page_get_hyperlink (pg, lk, column, row); } static gboolean motion_notify_event (GtkWidget * widget, GdkEventMotion * event) { SubtitleView *view = SUBTITLE_VIEW (widget); gint x; gint y; GdkModifierType mask; vbi3_link link; gboolean success; event = event; if (view->moving | view->scaling) { gint x; gint y; GdkModifierType mask; gdk_window_get_pointer (gdk_get_default_root_window (), &x, &y, &mask); if (x == view->last_mouse_x && y == view->last_mouse_y) return FALSE; /* pass on */ view->last_mouse_x = x; view->last_mouse_y = y; if (view->moving) { view->set_position (view, (view->move_offset_x + x) / (gdouble) view->visibility_bounds.width, (view->move_offset_y + y) / (gdouble) view->visibility_bounds.height); } else /* scaling */ { view->set_size (view, sqrt (fabs (x - view->scale_center_x) * fabs (y - view->scale_center_y)) * view->scale_factor); } return TRUE; /* handled */ } gdk_window_get_pointer (widget->window, &x, &y, &mask); success = link_from_pointer_position (view, &link, x, y); if (success) { switch (link.type) { case VBI3_LINK_PAGE: case VBI3_LINK_SUBPAGE: case VBI3_LINK_HTTP: case VBI3_LINK_FTP: case VBI3_LINK_EMAIL: gdk_window_set_cursor (widget->window, cursor_link); break; default: gdk_window_set_cursor (widget->window, cursor_normal); break; } vbi3_link_destroy (&link); } else { gdk_window_set_cursor (widget->window, cursor_normal); } return TRUE; /* handled */ } static gboolean button_release_event (GtkWidget * widget, GdkEventButton * event) { SubtitleView *view = SUBTITLE_VIEW (widget); event = event; if (view->moving | view->scaling) { vbi3_page *pg; vbi3_pgno pgno; view->moving = FALSE; view->scaling = FALSE; if (0 != (pgno = view->load_pgno)) { view->load_pgno = 0; view->load_page (view, pgno); } else if ((pg = view->show_pg)) { view->show_pg = NULL; view->show_page (view, pg); vbi3_page_unref (pg); } else if (view->redraw_unscaled_full) { redraw_unscaled (view); } else if (view->redraw_display_scaled) { update_window (view, /* reposition */ FALSE, /* reshape */ FALSE, /* rescale */ TRUE, /* first_row */ 0, /* last_row */ view->pg->rows - 1); } } return FALSE; /* pass on */ } static gint decimal_subno (vbi3_subno subno) { if (0 == subno || (guint) subno > 0x99) return -1; /* any */ else return vbi3_bcd2bin (subno); } static void scale_start (SubtitleView * view) { gint mouse_x; gint mouse_y; GdkModifierType mask; gint org_x; gint org_y; gdouble d; view->scaling = TRUE; gdk_window_get_pointer (gdk_get_default_root_window (), &mouse_x, &mouse_y, &mask); view->last_mouse_x = mouse_x; view->last_mouse_y = mouse_y; gdk_window_get_origin (view->darea.widget.window, &org_x, &org_y); view->scale_center_x = org_x + view->darea.widget.allocation.width / 2; view->scale_center_y = org_y + view->darea.widget.allocation.height / 2; d = sqrt (fabs (mouse_x - view->scale_center_x) * fabs (mouse_y - view->scale_center_y)); if (d < 10) { view->scaling = FALSE; return; } view->scale_factor = view->rel_size / d; } static void move_start (SubtitleView * view) { gint x; gint y; GdkModifierType mask; view->moving = TRUE; gdk_window_get_pointer (gdk_get_default_root_window (), &x, &y, &mask); view->last_mouse_x = x; view->last_mouse_y = y; view->move_offset_x = view->rel_x * view->visibility_bounds.width - x; view->move_offset_y = view->rel_y * view->visibility_bounds.height - y; } static gboolean button_press_event (GtkWidget * widget, GdkEventButton * event) { SubtitleView *view = SUBTITLE_VIEW (widget); gboolean r; r = FALSE; /* pass on */ switch (event->button) { case 1: /* left button */ case 2: /* middle button */ if (event->state & GDK_SHIFT_MASK) { scale_start (view); r = TRUE; /* handled */ } else if (event->state & (GDK_CONTROL_MASK | GDK_MOD1_MASK)) { move_start (view); r = TRUE; } else { vbi3_link link; gboolean success; success = link_from_pointer_position (view, &link, (gint) event->x, (gint) event->y); if (success) { switch (link.type) { case VBI3_LINK_PAGE: case VBI3_LINK_SUBPAGE: python_command_printf (widget, "zapping.ttx_open_new(%x,%d)", link.pgno, decimal_subno (link.subno)); r = TRUE; break; case VBI3_LINK_HTTP: case VBI3_LINK_FTP: case VBI3_LINK_EMAIL: z_url_show (NULL, link.url); r = TRUE; break; default: if (1 == event->button) move_start (view); else scale_start (view); r = TRUE; break; } vbi3_link_destroy (&link); } else { if (1 == event->button) move_start (view); else scale_start (view); r = TRUE; } } break; case 3: /* right button */ create_popup_menu (view, event); r = TRUE; break; default: break; } return r; } static gboolean expose_event (GtkWidget * widget, GdkEventExpose * event) { SubtitleView *view = SUBTITLE_VIEW (widget); if (view->display_scaled.pixbuf && view->display_scaled.valid) { gdk_draw_pixbuf (view->darea.widget.window, view->darea.widget.style->white_gc, view->display_scaled.pixbuf, /* src */ event->area.x, event->area.y, /* dst */ event->area.x, event->area.y, event->area.width, event->area.height, GDK_RGB_DITHER_NONE, /* x_dither */ 0, /* y_dither */ 0); } return TRUE; } /* Initialization. */ static void instance_finalize (GObject * object) { SubtitleView *view = SUBTITLE_VIEW (object); subtitle_views = g_list_remove (subtitle_views, view); if (NULL != view->vbi) vbi3_decoder_remove_event_handler (view->vbi, decoder_event_handler, view); if (view->region) { gdk_region_destroy (view->region); view->region = NULL; } if (view->capture_scaled.pixbuf) { g_object_unref (G_OBJECT (view->capture_scaled.pixbuf)); view->capture_scaled.pixbuf = NULL; } if (view->display_scaled.pixbuf) { g_object_unref (G_OBJECT (view->display_scaled.pixbuf)); view->display_scaled.pixbuf = NULL; } if (view->unscaled_pixbuf) { g_object_unref (G_OBJECT (view->unscaled_pixbuf)); view->unscaled_pixbuf = NULL; } vbi3_page_unref (view->show_pg); view->show_pg = NULL; vbi3_page_unref (view->pg); view->pg = NULL; parent_class->finalize (object); } static void set_video_bounds_ (SubtitleView * view, gint x, gint y, guint width, guint height) { if (0 == width || 0 == height) { view->have_video_bounds = FALSE; } else { view->video_bounds.x = x; view->video_bounds.y = y; view->video_bounds.width = width; view->video_bounds.height = height; view->have_video_bounds = TRUE; } } static void size_allocate (GtkWidget * widget, GtkAllocation * allocation) { SubtitleView *view = SUBTITLE_VIEW (widget); view->visibility_bounds = *allocation; /* Reshapes & rescales if necessary. */ update_window (view, /* reposition */ TRUE, /* reshape */ FALSE, /* rescale */ FALSE, /* first_row */ 0, /* last_row */ 0); } static void size_request (GtkWidget * widget, GtkRequisition * requisition) { widget = widget; /* We can scale to almost any size. */ requisition->width = 16; requisition->height = 16; } /* We cannot initialize this until the widget (and its parent GtkWindow) has a window. */ static void realize (GtkWidget * widget) { GTK_WIDGET_CLASS (parent_class)->realize (widget); /* No background, prevents flicker. */ gdk_window_set_back_pixmap (widget->window, NULL, FALSE); } static void instance_init (GTypeInstance * instance, gpointer g_class) { SubtitleView *view = (SubtitleView *) instance; GtkWidget *widget; g_class = g_class; view->action_group = gtk_action_group_new ("SubtitleViewActions"); #ifdef ENABLE_NLS gtk_action_group_set_translation_domain (view->action_group, GETTEXT_PACKAGE); #endif gtk_action_group_add_actions (view->action_group, actions, G_N_ELEMENTS (actions), view); view->rel_x = 0.5; view->rel_y = 0.5; view->rel_size = 1.0; view->roll_enable = TRUE; view->override_charset = VBI3_CHARSET_CODE_NONE; view->show_page = show_page_; view->load_page = load_page_; view->monitor_page = monitor_page_; view->start_rolling = start_rolling_; view->get_image = get_image_; view->set_position = set_position_; view->set_size = set_size_; view->set_charset = set_charset_; view->set_rolling = set_rolling_; view->set_video_bounds = set_video_bounds_; view->roll_counter = 13; widget = GTK_WIDGET (view); gtk_widget_add_events (widget, GDK_EXPOSURE_MASK | /* redraw */ GDK_POINTER_MOTION_MASK | /* cursor shape */ GDK_BUTTON_PRESS_MASK | /* links, selection */ GDK_BUTTON_RELEASE_MASK | /* selection */ 0); subtitle_views = g_list_append (subtitle_views, view); } GtkWidget * subtitle_view_new (void) { return GTK_WIDGET (g_object_new (TYPE_SUBTITLE_VIEW, NULL)); } static void class_init (gpointer g_class, gpointer class_data) { GObjectClass *object_class; GtkWidgetClass *widget_class; class_data = class_data; object_class = G_OBJECT_CLASS (g_class); widget_class = GTK_WIDGET_CLASS (g_class); parent_class = g_type_class_peek_parent (g_class); object_class->finalize = instance_finalize; widget_class->realize = realize; widget_class->size_request = size_request; widget_class->size_allocate = size_allocate; widget_class->expose_event = expose_event; widget_class->button_press_event = button_press_event; widget_class->button_release_event = button_release_event; widget_class->motion_notify_event = motion_notify_event; signals[POSITION_CHANGED] = g_signal_new ("z-position-changed", G_TYPE_FROM_CLASS (g_class), G_SIGNAL_RUN_LAST | G_SIGNAL_NO_RECURSE | G_SIGNAL_NO_HOOKS, G_STRUCT_OFFSET (SubtitleViewClass, position_changed), /* accumulator */ NULL, NULL, g_cclosure_marshal_VOID__VOID, /* return_type */ G_TYPE_NONE, /* n_params */ 0); cursor_normal = gdk_cursor_new (GDK_FLEUR); /* LEFT_PTR */ cursor_link = gdk_cursor_new (GDK_HAND2); /* Error ignored */ z_gconf_notify_add (GCONF_DIR "/default_charset", default_charset_notify, NULL); z_gconf_notify_add (GCONF_DIR "/interp_type", interp_type_notify, NULL); z_gconf_notify_add (GCONF_DIR "/brightness", redraw_unscaled_notify, NULL); z_gconf_notify_add (GCONF_DIR "/contrast", redraw_unscaled_notify, NULL); z_gconf_notify_add (GCONF_DIR "/pad", caption_reload_notify, NULL); z_gconf_notify_add (GCONF_DIR "/foreground", caption_reload_notify, NULL); z_gconf_notify_add (GCONF_DIR "/background", caption_reload_notify, NULL); z_gconf_notify_add (GCONF_DIR "/roll", roll_notify, NULL); z_gconf_notify_add (GCONF_DIR "/show_dheight", show_dheight_notify, NULL); } GType subtitle_view_get_type (void) { static GType type = 0; if (!type) { GTypeInfo info; CLEAR (info); info.class_size = sizeof (SubtitleViewClass); info.class_init = class_init; info.instance_size = sizeof (SubtitleView); info.instance_init = instance_init; type = g_type_register_static (GTK_TYPE_DRAWING_AREA, "SubtitleView", &info, (GTypeFlags) 0); } return type; } zapping-0.10cvs6/plugins/subtitle/view.h 644 764 144 11707 10305454746 13502 /* * Zapping (TV viewer for the Gnome Desktop) * * Copyright (C) 2005 Michael H. Schimek * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* $Id: view.h,v 1.1 2005/09/01 01:31:18 mschimek Exp $ */ #ifndef SUBTITLE_VIEW_H #define SUBTITLE_VIEW_H #ifdef HAVE_CONFIG_H # include "config.h" #endif #include #include "libvbi/page.h" #include "libvbi/lang.h" #include "libvbi/exp-gfx.h" #include "libvbi/vbi_decoder.h" G_BEGIN_DECLS #define TYPE_SUBTITLE_VIEW (subtitle_view_get_type ()) #define SUBTITLE_VIEW(obj) \ (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SUBTITLE_VIEW, SubtitleView)) #define SUBTITLE_VIEW_CLASS(klass) \ (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SUBTITLE_VIEW, SubtitleViewClass)) #define IS_SUBTITLE_VIEW(obj) \ (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SUBTITLE_VIEW)) #define IS_SUBTITLE_VIEW_CLASS(klass) \ (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SUBTITLE_VIEW)) #define SUBTITLE_VIEW_GET_CLASS(obj) \ (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SUBTITLE_VIEW, SubtitleViewClass)) typedef struct _SubtitleView SubtitleView; typedef struct _SubtitleViewClass SubtitleViewClass; struct subt_image { /* Scaled image of pg or NULL. */ GdkPixbuf * pixbuf; gboolean valid; /* Scaled character cell size. */ gdouble cell_width; gdouble cell_height; /* Shortcut: redraw only the changed area. */ GdkRectangle expose; }; struct _SubtitleView { GtkDrawingArea darea; /* Subtitle position (whole page, not just opaque text) relative to bounds. Default 0.5, 0.5. */ gdouble rel_x; gdouble rel_y; /* Subtitle size (whole page) relative to nominal size, which is some arbitrary fraction of bounds. Default 1.0. Must be > 0.0. */ gdouble rel_size; gboolean roll_enable; GtkActionGroup * action_group; vbi3_charset_code override_charset; void (* show_page) (SubtitleView * view, vbi3_page * pg); /* Current network, any subno. */ gboolean (* load_page) (SubtitleView * view, vbi3_pgno pgno); /* Current network, any subno. */ gboolean (* monitor_page) (SubtitleView * view, vbi3_pgno pgno); void (* start_rolling) (SubtitleView * view); GdkPixbuf * (* get_image) (SubtitleView * view, GdkRectangle * expose, guint width, guint height); void (* set_position) (SubtitleView * view, gdouble x, gdouble y); void (* set_size) (SubtitleView * view, gdouble size); void (* set_charset) (SubtitleView * view, vbi3_charset_code charset_code); void (* set_rolling) (SubtitleView * view, gboolean enable); void (* set_video_bounds) (SubtitleView * view, gint x, gint y, guint width, guint height); /*< private >*/ vbi3_decoder * vbi; vbi3_pgno monitor_pgno; /* The area allocated for subtitles. Actual size of the subtitle window is darea.widget.allocation, which can be larger or smaller. */ GtkAllocation visibility_bounds; /* Size and position of the video to scale the subtitles accordingly. If not given we use visibility_bounds. */ GtkAllocation video_bounds; gboolean have_video_bounds; /* Displayed page or NULL. */ vbi3_page * pg; guint first_opaque_row; guint last_opaque_row; /* Unscaled image of pg or NULL. */ GdkPixbuf * unscaled_pixbuf; vbi3_image_format unscaled_format; /* Scaled image of pg. */ struct subt_image capture_scaled; struct subt_image display_scaled; /* Non-transparent parts of darea. */ GdkRegion * region; /* Closed Caption rolling. */ gboolean roll_start; gboolean rolling; gint roll_counter; /* Interactive subtitle moving and scaling. */ gboolean moving; gboolean scaling; gint last_mouse_x; gint last_mouse_y; /* Load / show this page when done. */ vbi3_pgno load_pgno; vbi3_page * show_pg; /* Redraw / display the current page when done. */ gboolean redraw_unscaled_full; gboolean redraw_display_scaled; gint move_offset_x; gint move_offset_y; gint scale_center_x; gint scale_center_y; gdouble scale_factor; }; struct _SubtitleViewClass { GtkDrawingAreaClass parent_class; /* Signals. */ void (*position_changed)(SubtitleView *view); }; extern GType subtitle_view_get_type (void); extern GtkWidget * subtitle_view_new (void); G_END_DECLS #endif /* SUBTITLE_VIEW_H */ zapping-0.10cvs6/plugins/subtitle/preferences.c 644 764 144 31204 10371710664 15013 /* * Zapping TV viewer * * Copyright (C) 2000-2002 Iaki Garca Etxebarria * Copyright (C) 2000-2005 Michael H. Schimek * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* $Id: preferences.c,v 1.4 2006/02/06 18:13:08 mschimek Exp $ */ #ifdef HAVE_CONFIG_H # include "config.h" #endif #include "common/intl-priv.h" #include "src/zgconf.h" #include "src/zspinslider.h" #include "main.h" #include "preferences.h" #define GCONF_DIR "/apps/zapping/plugins/subtitle" #define INDENT_COL 2 static GObjectClass * parent_class; GConfEnumStringPair subtitle_charset_enum [] = { { 0, "western_and_central_europe" }, { 8, "eastern_europe" }, { 16, "western_europe_and_turkey" }, { 24, "central_and_southeast_europe" }, { 32, "cyrillic" }, { 48, "greek_and_turkish" }, { 64, "arabic" }, { 80, "hebrew_and_arabic" }, { 0, NULL } }; static const gchar * charset_menu [] = { N_("Western and Central Europe"), N_("Eastern Europe"), N_("Western Europe and Turkey"), N_("Central and Southeast Europe"), N_("Cyrillic"), N_("Greek and Turkish"), N_("Arabic"), N_("Hebrew and Arabic"), NULL, }; GConfEnumStringPair subtitle_interp_enum [] = { { GDK_INTERP_NEAREST, "nearest" }, { GDK_INTERP_TILES, "tiles" }, { GDK_INTERP_BILINEAR, "bilinear" }, { GDK_INTERP_HYPER, "hyper" }, { 0, NULL } }; static const gchar * interp_menu [] = { N_("Nearest (fast, low quality)"), N_("Tiles"), N_("Bilinear"), N_("Hyper (slow, high quality)"), NULL, }; static void attach_header (GtkTable * table, guint row, const gchar * text) { GtkWidget *widget; widget = gtk_label_new (text); gtk_widget_show (widget); gtk_label_set_use_markup (GTK_LABEL (widget), TRUE); gtk_misc_set_alignment (GTK_MISC (widget), 0, 0.5); gtk_table_attach (table, widget, /* column */ 0, 4, row, row + 1, (GtkAttachOptions)(GTK_EXPAND | GTK_FILL), (GtkAttachOptions)(0), /* padding */ 0, 3); } static void attach_label (GtkTable * table, guint row, const gchar * text) { GtkWidget *widget; widget = gtk_label_new_with_mnemonic (text); gtk_widget_show (widget); gtk_misc_set_alignment (GTK_MISC (widget), 0.0, 0.5); gtk_table_attach (table, widget, INDENT_COL, INDENT_COL + 1, row, row + 1, (GtkAttachOptions)(GTK_FILL), (GtkAttachOptions)(0), /* padding */ 0, 0); } static void attach_check_button (GtkTable * table, guint row, const gchar * label, const gchar * gconf_key, gboolean def_value, const gchar * tooltip) { GtkWidget *widget; widget = z_gconf_check_button_new (label, gconf_key, NULL, def_value); gtk_widget_show (widget); if (tooltip) z_tooltip_set (widget, tooltip); gtk_table_attach (table, widget, INDENT_COL + 1, INDENT_COL + 2, row, row + 1, (GtkAttachOptions)(GTK_EXPAND | GTK_FILL), (GtkAttachOptions)(0), /* padding */ 0, 0); } static void attach_combo_box (GtkTable * table, guint row, const gchar ** option_menu, const gchar * gconf_key, const GConfEnumStringPair *lookup_table, const gchar * tooltip) { GtkWidget *widget; widget = z_gconf_combo_box_new (option_menu, gconf_key, lookup_table); gtk_widget_show (widget); if (tooltip) z_tooltip_set (widget, tooltip); gtk_table_attach (table, widget, INDENT_COL + 1, INDENT_COL + 2, row, row + 1, (GtkAttachOptions)(GTK_EXPAND | GTK_FILL), (GtkAttachOptions)(0), /* padding */ 0, 0); } static gboolean get_color (vbi3_rgba * rgba, const gchar * key) { GdkColor color; if (!z_gconf_get_color (&color, key)) return FALSE; *rgba = (((color.red & 0xFF00) >> 8) | (color.green & 0xFF00) | ((color.blue & 0xFF00) << 8)); return TRUE; } static void on_color_set (GnomeColorPicker * colorpicker, guint arg1, guint arg2, guint arg3, guint arg4, gpointer user_data) { char buffer[40]; const gchar *gconf_key; colorpicker = colorpicker; arg4 = arg4; gconf_key = user_data; snprintf (buffer, sizeof (buffer), "#%02X%02X%02X", arg1 >> 8, arg2 >> 8, arg3 >> 8); /* Error ignored. */ z_gconf_set_string (gconf_key, buffer); } static void attach_color_picker (GtkTable * table, guint row, const gchar * title, const gchar * gconf_key, vbi3_rgba def_value, const gchar * tooltip) { GtkWidget *widget; GnomeColorPicker *color_picker; /* Error ignored. */ get_color (&def_value, gconf_key); widget = gnome_color_picker_new (); gtk_widget_show (widget); color_picker = GNOME_COLOR_PICKER (widget); gnome_color_picker_set_use_alpha (color_picker, FALSE); gnome_color_picker_set_i8 (color_picker, (def_value & 0xff), (def_value & 0xff00) >> 8, (def_value & 0xff0000) >> 16, 0); gnome_color_picker_set_title (color_picker, title); z_signal_connect_const (G_OBJECT (color_picker), "color-set", G_CALLBACK (on_color_set), gconf_key); if (tooltip) z_tooltip_set (widget, tooltip); gtk_table_attach (table, widget, INDENT_COL + 1, INDENT_COL + 2, row, row + 1, (GtkAttachOptions)(GTK_EXPAND | GTK_FILL), (GtkAttachOptions)(0), /* padding */ 0, 0); } void subtitle_prefs_apply (SubtitlePrefs * prefs) { prefs = prefs; } void subtitle_prefs_cancel (SubtitlePrefs * prefs) { GError *error = NULL; gboolean success; g_return_if_fail (IS_SUBTITLE_PREFS (prefs)); if (prefs->change_set) { /* Revert to old values. */ success = gconf_client_commit_change_set (gconf_client, prefs->change_set, /* remove_committed */ FALSE, &error); if (!success || error) { /* Error ignored. */ if (error) { printv ("Cannot revert Subtitle prefs: %s\n", error->message); g_error_free (error); error = NULL; } } } gtk_widget_destroy (GTK_WIDGET (prefs)); } static void on_control_changed (GtkWidget * adj, gpointer user_data) { gint value; switch (GPOINTER_TO_INT (user_data)) { case 0: value = GTK_ADJUSTMENT (adj)->value; /* Error ignored. */ z_gconf_set_int (GCONF_DIR "/brightness", SATURATE (value, 0, 255)); break; case 1: value = GTK_ADJUSTMENT (adj)->value; /* Error ignored. */ z_gconf_set_int (GCONF_DIR "/contrast", SATURATE (value, -128, +127)); break; } } static void instance_finalize (GObject * object) { SubtitlePrefs *prefs = SUBTITLE_PREFS (object); if (prefs->change_set) { gconf_change_set_unref (prefs->change_set); prefs->change_set = NULL; } parent_class->finalize (object); } static void instance_init (GTypeInstance * instance, gpointer g_class _unused_) { SubtitlePrefs *prefs = (SubtitlePrefs *) instance; GError *error = NULL; GtkWidget *widget; GtkObject *adj; guint row; gint value; gtk_table_resize (&prefs->table, /* rows */ 6, /* columns */ 4); gtk_table_set_homogeneous (&prefs->table, FALSE); gtk_container_set_border_width (GTK_CONTAINER (&prefs->table), 12); gtk_table_set_row_spacings (&prefs->table, 3); gtk_table_set_col_spacings (&prefs->table, 12); row = 0; attach_header (&prefs->table, row++, _("Teletext")); attach_label (&prefs->table, row, _("_Default encoding:")); attach_combo_box (&prefs->table, row++, charset_menu, GCONF_DIR "/default_charset", subtitle_charset_enum, _("Some stations fail to transmit a complete language " "identifier, so the Subtitle viewer may not display " "the correct font or national characters. You can " "select your geographical region here as an " "additional hint.")); attach_check_button (&prefs->table, row++, _("_Show double height characters"), GCONF_DIR "/show_dheight", TRUE, NULL); /* TRANSLATORS: Closed Caption is a captioning system used mainly in the USA, and on VHS/LD/DVD in other countries. Europe uses Teletext for caption and subtitle transmissions. */ attach_header (&prefs->table, row++, _("Closed Caption")); attach_label (&prefs->table, row, _("_Foreground:")); attach_color_picker (&prefs->table, row++, _("Closed Caption foreground color"), GCONF_DIR "/foreground", 0xFFFFFF, NULL); attach_label (&prefs->table, row, _("_Background:")); attach_color_picker (&prefs->table, row++, _("Closed Caption background color"), GCONF_DIR "/background", 0x000000, NULL); #if 0 attach_check_button (&prefs->table, row++, ("_Pad"), GCONF_DIR "/pad", FALSE, NULL); #endif attach_check_button (&prefs->table, row++, _("_Roll live caption"), GCONF_DIR "/roll", FALSE, NULL); attach_header (&prefs->table, row++, _("Display")); attach_label (&prefs->table, row, _("_Brightness:")); value = 128; z_gconf_get_int (&value, GCONF_DIR "/brightness"); adj = gtk_adjustment_new (value, /* min, max */ 0.0, 255.0, /* step */ 1, /* page incr, size */ 16, 16); widget = z_spinslider_new (GTK_ADJUSTMENT (adj), NULL, NULL, 128, 0); z_spinslider_set_int_value (Z_SPINSLIDER (widget), value); gtk_widget_show (widget); gtk_table_attach (&prefs->table, widget, INDENT_COL + 1, INDENT_COL + 2, row, row + 1, (GtkAttachOptions)(GTK_EXPAND | GTK_FILL), (GtkAttachOptions)(0), /* padding */ 0, 0); g_signal_connect (G_OBJECT (adj), "value-changed", G_CALLBACK (on_control_changed), GINT_TO_POINTER (0)); ++row; attach_label (&prefs->table, row, _("_Contrast:")); value = 64; z_gconf_get_int (&value, GCONF_DIR "/contrast"); adj = gtk_adjustment_new (value, /* min, max */ -128, +127, /* step */ 1, /* page incr, size */ 16, 16); widget = z_spinslider_new (GTK_ADJUSTMENT (adj), NULL, NULL, 64, 0); z_spinslider_set_int_value (Z_SPINSLIDER (widget), value); gtk_widget_show (widget); gtk_table_attach (&prefs->table, widget, INDENT_COL + 1, INDENT_COL + 2, row, row + 1, (GtkAttachOptions)(GTK_EXPAND | GTK_FILL), (GtkAttachOptions)(0), /* padding */ 0, 0); g_signal_connect (G_OBJECT (adj), "value-changed", G_CALLBACK (on_control_changed), GINT_TO_POINTER (0)); ++row; attach_label (&prefs->table, row, _("S_caling:")); attach_combo_box (&prefs->table, row++, interp_menu, GCONF_DIR "/interp_type", subtitle_interp_enum, _("Quality/speed trade-off when scaling and " "anti-aliasing the page.")); prefs->change_set = gconf_client_change_set_from_current (gconf_client, &error, GCONF_DIR "/default_charset", GCONF_DIR "/interp_type", GCONF_DIR "/brightness", GCONF_DIR "/contrast", GCONF_DIR "/foreground", GCONF_DIR "/background", GCONF_DIR "/pad", GCONF_DIR "/roll", GCONF_DIR "/show_dheight", NULL); if (!prefs->change_set || error) { g_assert (!prefs->change_set); if (error) { g_warning ("Cannot create Subtitle prefs change set:\n%s", error->message); g_error_free (error); error = NULL; } } } GtkWidget * subtitle_prefs_new (void) { return GTK_WIDGET (g_object_new (TYPE_SUBTITLE_PREFS, NULL)); } static void class_init (gpointer g_class, gpointer class_data _unused_) { GObjectClass *object_class; object_class = G_OBJECT_CLASS (g_class); parent_class = g_type_class_peek_parent (g_class); object_class->finalize = instance_finalize; } GType subtitle_prefs_get_type (void) { static GType type = 0; if (!type) { GTypeInfo info; CLEAR (info); info.class_size = sizeof (SubtitlePrefsClass); info.class_init = class_init; info.instance_size = sizeof (SubtitlePrefs); info.instance_init = instance_init; type = g_type_register_static (GTK_TYPE_TABLE, "SubtitlePrefs", &info, (GTypeFlags) 0); } return type; } zapping-0.10cvs6/plugins/subtitle/preferences.h 644 764 144 4437 10305456045 15005 /* * Zapping TV viewer * * Copyright (C) 2000-2002 Iaki Garca Etxebarria * Copyright (C) 2000-2005 Michael H. Schimek * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* $Id: preferences.h,v 1.1 2005/09/01 01:40:53 mschimek Exp $ */ #ifndef SUBTITLE_PREFERENCES_H #define SUBTITLE_PREFERENCES_H #include #include G_BEGIN_DECLS #define TYPE_SUBTITLE_PREFS (subtitle_prefs_get_type ()) #define SUBTITLE_PREFS(obj) \ (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SUBTITLE_PREFS, SubtitlePrefs)) #define SUBTITLE_PREFS_CLASS(klass) \ (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SUBTITLE_PREFS, SubtitlePrefsClass)) #define IS_SUBTITLE_PREFS(obj) \ (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SUBTITLE_PREFS)) #define IS_SUBTITLE_PREFS_CLASS(klass) \ (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SUBTITLE_PREFS)) #define SUBTITLE_PREFS_GET_CLASS(obj) \ (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SUBTITLE_PREFS, SubtitlePrefsClass)) typedef struct _SubtitlePrefs SubtitlePrefs; typedef struct _SubtitlePrefsClass SubtitlePrefsClass; struct _SubtitlePrefs { GtkTable table; GConfChangeSet * change_set; }; struct _SubtitlePrefsClass { GtkTableClass parent_class; }; extern GConfEnumStringPair subtitle_charset_enum []; extern GConfEnumStringPair subtitle_level_enum []; extern GConfEnumStringPair subtitle_interp_enum []; extern void subtitle_prefs_cancel (SubtitlePrefs * prefs); extern void subtitle_prefs_apply (SubtitlePrefs * prefs); extern GType subtitle_prefs_get_type (void) G_GNUC_CONST; extern GtkWidget * subtitle_prefs_new (void); G_END_DECLS #endif /* SUBTITLE_PREFERENCES_H */ zapping-0.10cvs6/plugins/screenshot/ 777 764 144 0 10443536352 12654 5zapping-0.10cvs6/plugins/screenshot/deint.c 644 764 144 4424 10305456044 14117 /* * Screenshot saving plugin for Zapping * Copyright (C) 2000-2001 Iaki Garca Etxebarria * Copyright (C) 2001 Michael H. Schimek * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include "screenshot.h" /* Deinterlace, simple version for now */ void screenshot_deinterlace (void * image, const tv_image_format * format, gint parity) { uint8_t *src1; uint8_t *src2; guint height; gint pair; if (format->height & 1) return; if (format->height < 6) return; if (parity) { src1 = (uint8_t *) image + 2 * format->bytes_per_line[0]; src2 = (uint8_t *) image; pair = -2 * format->bytes_per_line[0]; } else { src1 = (uint8_t *) image; src2 = (uint8_t *) image + 2 * format->bytes_per_line[0]; pair = +2 * format->bytes_per_line[0]; } for (height = format->height - 4; height > 0; height -= 2) { guint width; for (width = format->width; width > 0; --width) { const gint level = 8; gint d, d1, m1; d = src1[0] - src2[0]; d1 = d * d; d = src1[1] - src2[1]; d1 += d * d; d = src1[2] - src2[2]; d1 += d * d; if (d1 > (1 << (level / 3))) { d1 = MIN (d1, 1 << level); m1 = (1 << level) - d1; d = (src1[0] + src1[0 + pair] + 1) >> 1; src2[0] = (src2[0] * m1 + d * d1) >> level; d = (src1[1] + src1[1 + pair] + 1) >> 1; src2[1] = (src2[1] * m1 + d * d1) >> level; d = (src1[2] + src1[2 + pair] + 1) >> 1; src2[2] = (src2[2] * m1 + d * d1) >> level; } src1 += 3; src2 += 3; } src1 += format->bytes_per_line[0]; src2 += format->bytes_per_line[0]; } } zapping-0.10cvs6/plugins/screenshot/screenshot.glade2 644 764 144 60202 10324040464 16115 True GTK_WINDOW_TOPLEVEL GTK_WIN_POS_NONE False True False True False False GDK_WINDOW_TYPE_HINT_NORMAL GDK_GRAVITY_NORTH_WEST 6 True 5 2 False 3 12 True _Completion command: True False GTK_JUSTIFY_CENTER False False 0 0.5 0 0 screenshot_command 0 1 0 1 fill True screenshot_command_history 10 True Command to execute after the image has been saved True True True 0 True * False 1 2 0 1 True True _Grab on clicking OK True GTK_RELIEF_NORMAL True False False True 0 2 2 3 fill True True _Add toolbar button True GTK_RELIEF_NORMAL True True False True 0 2 4 5 fill True False 12 True _Skip True False GTK_JUSTIFY_LEFT False False 0.5 0.5 0 0 screenshot_skip 0 False False True True 1 0 True GTK_UPDATE_ALWAYS False False 0 0 9 1 1 1 0 False False True pictures before grabbing False False GTK_JUSTIFY_LEFT False False 0.5 0.5 0 0 0 False False 0 2 1 2 fill fill True True Grab full size image True GTK_RELIEF_NORMAL True False False True 0 2 3 4 fill 6 True Save Screenshot GTK_WINDOW_TOPLEVEL GTK_WIN_POS_NONE False True False True False False GDK_WINDOW_TYPE_HINT_DIALOG GDK_GRAVITY_NORTH_WEST True True False 8 True GTK_BUTTONBOX_END True True True gtk-preferences True GTK_RELIEF_NORMAL True 0 True True True gtk-cancel True GTK_RELIEF_NORMAL True -6 True True True gtk-ok True GTK_RELIEF_NORMAL True -5 0 False True GTK_PACK_END True 7 2 False 3 12 True _Save as: True False GTK_JUSTIFY_CENTER False False 0 0.5 0 0 entry 0 1 1 2 fill True screenshot_dest_file_history 10 Destination file False True True GTK_FILE_CHOOSER_ACTION_OPEN True True True True 0 True * False 1 2 1 2 True _Quality: True False GTK_JUSTIFY_CENTER False False 0 0.5 0 0 hscale1 0 1 4 5 fill True True True GTK_POS_TOP 0 GTK_UPDATE_CONTINUOUS False 0 0 100 1 10 0 1 2 4 5 fill fill True _Format: True False GTK_JUSTIFY_CENTER False False 0 0.5 0 0 optionmenu1 0 1 0 1 fill True True -1 True 1 2 0 1 fill True Preview 1 2 2 3 True False False GTK_JUSTIFY_CENTER False False 0.5 0.5 0 0 1 2 3 4 fill True _Deinterlace: True False GTK_JUSTIFY_CENTER False False 0 0.5 0 0 radiobutton4 0 1 5 6 fill True True 0 True True Off True GTK_RELIEF_NORMAL True True False True 0 False False True True Forward True GTK_RELIEF_NORMAL True False False True radiobutton4 0 False False True True Backward True GTK_RELIEF_NORMAL True False False True radiobutton4 0 False False 1 2 5 6 True True S_ubtitles True GTK_RELIEF_NORMAL True False False True 1 2 6 7 fill 0 True True zapping-0.10cvs6/plugins/screenshot/b_jpeg.c 644 764 144 13726 10305456044 14267 /* * Screenshot saving plugin for Zapping * Copyright (C) 2000-2001 Iaki Garca Etxebarria * Copyright (C) 2001 Michael H. Schimek * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include "screenshot.h" #ifdef HAVE_LIBJPEG /* avoid redefinition warning */ #undef HAVE_STDLIB_H #undef HAVE_STDDEF_H #undef HAVE_PROTOTYPES #include #if 0 #define PARENT(_ptr, _type, _member) \ ({ char *_p = (char *)(_ptr); (_p != 0) ? \ (_type *)(_p - offsetof (_type, _member)) : (_type *) 0; }) #endif struct backend_private { struct jpeg_compress_struct cinfo; /* Compression parameters */ struct jpeg_decompress_struct dinfo; /* Decompression parameters */ struct jpeg_destination_mgr dest; /* Output handler */ struct jpeg_source_mgr src; /* Input handler */ struct jpeg_error_mgr jerr; /* Error handler */ }; static void jpeg_mydest_init_destination (j_compress_ptr cinfo _unused_) { } static boolean jpeg_mydest_empty_output_buffer (j_compress_ptr cinfo) { backend_private *priv = PARENT(cinfo, backend_private, cinfo); screenshot_data *data = PARENT(priv, screenshot_data, private); data->io_flush (data, data->io_buffer_size); priv->dest.next_output_byte = (void *) data->io_buffer; priv->dest.free_in_buffer = data->io_buffer_size; return TRUE; } static void jpeg_mydest_term_destination (j_compress_ptr cinfo) { backend_private *priv = PARENT(cinfo, backend_private, cinfo); screenshot_data *data = PARENT(priv, screenshot_data, private); guint size = data->io_buffer_size - priv->dest.free_in_buffer; data->io_flush (data, size); } static void jpeg_mysrc_init_source (j_decompress_ptr cinfo _unused_) { } static boolean jpeg_mysrc_fill_input_buffer (j_decompress_ptr cinfo _unused_) { g_assert_not_reached (); return TRUE; } static void jpeg_mysrc_skip_input_data (j_decompress_ptr cinfo, long num_bytes) { backend_private *priv = PARENT(cinfo, backend_private, cinfo); g_assert (num_bytes < (long) priv->src.bytes_in_buffer); priv->src.next_input_byte += num_bytes; priv->src.bytes_in_buffer -= num_bytes; } static void jpeg_mysrc_term_source (j_decompress_ptr cinfo _unused_) { } static gboolean backend_init (screenshot_data *data, gboolean write, gint quality) { backend_private *priv = (backend_private *) &data->private; if (write) { /* Error handler XXX */ priv->cinfo.err = jpeg_std_error (&priv->jerr); jpeg_create_compress(&priv->cinfo); /* Output handler */ priv->dest.next_output_byte = (void *) data->io_buffer; priv->dest.free_in_buffer = data->io_buffer_size; priv->dest.init_destination = jpeg_mydest_init_destination; priv->dest.empty_output_buffer = jpeg_mydest_empty_output_buffer; priv->dest.term_destination = jpeg_mydest_term_destination; priv->cinfo.dest = &priv->dest; /* Compression parameters */ priv->cinfo.image_width = data->format.width; priv->cinfo.image_height = data->format.height; priv->cinfo.input_components = 3; priv->cinfo.in_color_space = JCS_RGB; jpeg_set_defaults (&priv->cinfo); jpeg_set_quality (&priv->cinfo, quality, TRUE); jpeg_start_compress (&priv->cinfo, TRUE); } else /* read */ { /* Error handler XXX */ priv->dinfo.err = jpeg_std_error (&priv->jerr); jpeg_create_decompress (&priv->dinfo); /* Input handler */ priv->src.next_input_byte = (void *) data->io_buffer; priv->src.bytes_in_buffer = data->io_buffer_used; priv->src.init_source = jpeg_mysrc_init_source; priv->src.fill_input_buffer = jpeg_mysrc_fill_input_buffer; priv->src.skip_input_data = jpeg_mysrc_skip_input_data; priv->src.resync_to_restart = jpeg_resync_to_restart; priv->src.term_source = jpeg_mysrc_term_source; priv->dinfo.src = &priv->src; /* Decompression parameters */ jpeg_read_header (&priv->dinfo, TRUE); jpeg_start_decompress (&priv->dinfo); } return TRUE; } static void backend_save (screenshot_data *data) { backend_private *priv = (backend_private *) &data->private; gchar *pixels; gint rowstride; pixels = (gchar *) data->data; rowstride = data->format.bytes_per_line[0]; /* NB lines is evaluated by parent thread to update the progress bar */ for (data->lines = 0; data->lines < data->format.height; data->lines++) { if (screenshot_close_everything || data->thread_abort) { data->thread_abort = TRUE; break; } jpeg_write_scanlines (&priv->cinfo, (JSAMPROW *) &pixels, 1); pixels += rowstride; } if (data->lines >= data->format.height) jpeg_finish_compress (&priv->cinfo); jpeg_destroy_compress (&priv->cinfo); } static void backend_load (screenshot_data *data, gchar *pixels, gint rowstride) { struct backend_private *priv = (backend_private *) &data->private; for (data->lines = 0; data->lines < data->format.height; data->lines++) { jpeg_read_scanlines (&priv->dinfo, (JSAMPROW *) &pixels, 1); pixels += rowstride; } jpeg_finish_decompress (&priv->dinfo); jpeg_destroy_decompress (&priv->dinfo); } screenshot_backend screenshot_backend_jpeg = { .keyword = "jpeg", .label = "JPEG", .extension = "jpeg", .sizeof_private = sizeof (backend_private), .quality = TRUE, .init = backend_init, .save = backend_save, .load = backend_load, }; #endif /* HAVE_LIBJPEG */ zapping-0.10cvs6/plugins/screenshot/Makefile.am 644 764 144 707 10327375017 14670 ## Process this file with automake to produce Makefile.in plugindir = @PLUGIN_DEFAULT_DIR@ plugin_LTLIBRARIES = libscreenshot.zapping.la EXTRA_DIST = screenshot.glade2 pkgdata_DATA = screenshot.glade2 AM_CFLAGS = \ @PLUGIN_DEFAULT_FLAGS@ \ -DZAPPING8 INCLUDES = \ -I$(top_srcdir) \ @COMMON_INCLUDES@ libscreenshot_zapping_la_SOURCES = \ screenshot.c screenshot.h \ deint.c \ b_jpeg.c b_ppm.c libscreenshot_zapping_la_LIBADD = \ $(JPEG_LIB) zapping-0.10cvs6/plugins/screenshot/Makefile.in 644 764 144 50261 10442575570 14745 # Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = ../.. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = plugins/screenshot DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; am__installdirs = "$(DESTDIR)$(plugindir)" "$(DESTDIR)$(pkgdatadir)" pluginLTLIBRARIES_INSTALL = $(INSTALL) LTLIBRARIES = $(plugin_LTLIBRARIES) am__DEPENDENCIES_1 = libscreenshot_zapping_la_DEPENDENCIES = $(am__DEPENDENCIES_1) am_libscreenshot_zapping_la_OBJECTS = screenshot.lo deint.lo b_jpeg.lo \ b_ppm.lo libscreenshot_zapping_la_OBJECTS = \ $(am_libscreenshot_zapping_la_OBJECTS) DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ SOURCES = $(libscreenshot_zapping_la_SOURCES) DIST_SOURCES = $(libscreenshot_zapping_la_SOURCES) pkgdataDATA_INSTALL = $(INSTALL_DATA) DATA = $(pkgdata_DATA) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ ARTS_CFLAGS = @ARTS_CFLAGS@ ARTS_LIBS = @ARTS_LIBS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BUILD_DEINTERLACE_PLUGIN_FALSE = @BUILD_DEINTERLACE_PLUGIN_FALSE@ BUILD_DEINTERLACE_PLUGIN_TRUE = @BUILD_DEINTERLACE_PLUGIN_TRUE@ BUILD_MAN_FALSE = @BUILD_MAN_FALSE@ BUILD_MAN_TRUE = @BUILD_MAN_TRUE@ CAN_COMPILE_3DNOW_FALSE = @CAN_COMPILE_3DNOW_FALSE@ CAN_COMPILE_3DNOW_TRUE = @CAN_COMPILE_3DNOW_TRUE@ CAN_COMPILE_ALTIVEC_FALSE = @CAN_COMPILE_ALTIVEC_FALSE@ CAN_COMPILE_ALTIVEC_TRUE = @CAN_COMPILE_ALTIVEC_TRUE@ CAN_COMPILE_MMX_FALSE = @CAN_COMPILE_MMX_FALSE@ CAN_COMPILE_MMX_TRUE = @CAN_COMPILE_MMX_TRUE@ CAN_COMPILE_SSE2_FALSE = @CAN_COMPILE_SSE2_FALSE@ CAN_COMPILE_SSE2_TRUE = @CAN_COMPILE_SSE2_TRUE@ CAN_COMPILE_SSE3_FALSE = @CAN_COMPILE_SSE3_FALSE@ CAN_COMPILE_SSE3_TRUE = @CAN_COMPILE_SSE3_TRUE@ CAN_COMPILE_SSE_FALSE = @CAN_COMPILE_SSE_FALSE@ CAN_COMPILE_SSE_TRUE = @CAN_COMPILE_SSE_TRUE@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCAS = @CCAS@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ COMMON_INCLUDES = @COMMON_INCLUDES@ CONSOLEHELPER_LOCATION = @CONSOLEHELPER_LOCATION@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFAULT_CFLAGS = @DEFAULT_CFLAGS@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ESD_LIBS = @ESD_LIBS@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ GCONF_SCHEMAS_INSTALL_FALSE = @GCONF_SCHEMAS_INSTALL_FALSE@ GCONF_SCHEMAS_INSTALL_TRUE = @GCONF_SCHEMAS_INSTALL_TRUE@ GCONF_SCHEMA_CONFIG_SOURCE = @GCONF_SCHEMA_CONFIG_SOURCE@ GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@ GDK_PIXBUF_CSOURCE = @GDK_PIXBUF_CSOURCE@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ HAVE_GCC_LIMITS_FALSE = @HAVE_GCC_LIMITS_FALSE@ HAVE_GCC_LIMITS_TRUE = @HAVE_GCC_LIMITS_TRUE@ HAVE_LIBZVBI_FALSE = @HAVE_LIBZVBI_FALSE@ HAVE_LIBZVBI_TRUE = @HAVE_LIBZVBI_TRUE@ HAVE_X86_FALSE = @HAVE_X86_FALSE@ HAVE_X86_TRUE = @HAVE_X86_TRUE@ HAVE_XMU_FALSE = @HAVE_XMU_FALSE@ HAVE_XMU_TRUE = @HAVE_XMU_TRUE@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ INTLTOOL_CAVES_RULE = @INTLTOOL_CAVES_RULE@ INTLTOOL_DESKTOP_RULE = @INTLTOOL_DESKTOP_RULE@ INTLTOOL_DIRECTORY_RULE = @INTLTOOL_DIRECTORY_RULE@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ INTLTOOL_ICONV = @INTLTOOL_ICONV@ INTLTOOL_KBD_RULE = @INTLTOOL_KBD_RULE@ INTLTOOL_KEYS_RULE = @INTLTOOL_KEYS_RULE@ INTLTOOL_MERGE = @INTLTOOL_MERGE@ INTLTOOL_MSGFMT = @INTLTOOL_MSGFMT@ INTLTOOL_MSGMERGE = @INTLTOOL_MSGMERGE@ INTLTOOL_OAF_RULE = @INTLTOOL_OAF_RULE@ INTLTOOL_PERL = @INTLTOOL_PERL@ INTLTOOL_PONG_RULE = @INTLTOOL_PONG_RULE@ INTLTOOL_PROP_RULE = @INTLTOOL_PROP_RULE@ INTLTOOL_SCHEMAS_RULE = @INTLTOOL_SCHEMAS_RULE@ INTLTOOL_SERVER_RULE = @INTLTOOL_SERVER_RULE@ INTLTOOL_SHEET_RULE = @INTLTOOL_SHEET_RULE@ INTLTOOL_SOUNDLIST_RULE = @INTLTOOL_SOUNDLIST_RULE@ INTLTOOL_THEME_RULE = @INTLTOOL_THEME_RULE@ INTLTOOL_UI_RULE = @INTLTOOL_UI_RULE@ INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ INTLTOOL_XAM_RULE = @INTLTOOL_XAM_RULE@ INTLTOOL_XGETTEXT = @INTLTOOL_XGETTEXT@ INTLTOOL_XML_NOMERGE_RULE = @INTLTOOL_XML_NOMERGE_RULE@ INTLTOOL_XML_RULE = @INTLTOOL_XML_RULE@ JPEG_LIB = @JPEG_LIB@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBXML_CFLAGS = @LIBXML_CFLAGS@ LIBXML_LIBS = @LIBXML_LIBS@ LIRC_LIB = @LIRC_LIB@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAKEINFO = @MAKEINFO@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ NEED_ZSFB_FALSE = @NEED_ZSFB_FALSE@ NEED_ZSFB_TRUE = @NEED_ZSFB_TRUE@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_CFLAGS = @PACKAGE_CFLAGS@ PACKAGE_LIBS = @PACKAGE_LIBS@ PACKAGE_LIB_DIR = @PACKAGE_LIB_DIR@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_PIXMAPS_DIR = @PACKAGE_PIXMAPS_DIR@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PACKAGE_VERSION_ID = @PACKAGE_VERSION_ID@ PATH_SEPARATOR = @PATH_SEPARATOR@ PG_CFLAGS = @PG_CFLAGS@ PKG_CONFIG = @PKG_CONFIG@ PLUGIN_DEFAULT_DIR = @PLUGIN_DEFAULT_DIR@ PLUGIN_DEFAULT_FLAGS = @PLUGIN_DEFAULT_FLAGS@ PNG_LIBS = @PNG_LIBS@ POFILES = @POFILES@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ PYTHON_LIBS = @PYTHON_LIBS@ PY_CFLAGS = @PY_CFLAGS@ PY_EXTRA_LIBS = @PY_EXTRA_LIBS@ PY_LIBS = @PY_LIBS@ PY_LIB_LOC = @PY_LIB_LOC@ RANLIB = @RANLIB@ RTE_LIBS = @RTE_LIBS@ SCROLLKEEPER_BUILD_REQUIRED = @SCROLLKEEPER_BUILD_REQUIRED@ SCROLLKEEPER_CONFIG = @SCROLLKEEPER_CONFIG@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ SUID_ZSFB_FALSE = @SUID_ZSFB_FALSE@ SUID_ZSFB_TRUE = @SUID_ZSFB_TRUE@ UNICODE_CFLAGS = @UNICODE_CFLAGS@ UNICODE_LIBS = @UNICODE_LIBS@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ WARN_CFLAGS = @WARN_CFLAGS@ XGETTEXT = @XGETTEXT@ XMLCATALOG = @XMLCATALOG@ XML_CATALOG_FILE = @XML_CATALOG_FILE@ XSLTPROC = @XSLTPROC@ X_CFLAGS = @X_CFLAGS@ X_DPMS_LIBS = @X_DPMS_LIBS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ X_XF86DGA_LIBS = @X_XF86DGA_LIBS@ X_XF86VMODE_LIBS = @X_XF86VMODE_LIBS@ X_XINERAMA_LIBS = @X_XINERAMA_LIBS@ X_XMU_LIBS = @X_XMU_LIBS@ X_XV_LIBS = @X_XV_LIBS@ ZSFB_GROUP = @ZSFB_GROUP@ ZSFB_OWNER = @ZSFB_OWNER@ ZVBI_CFLAGS = @ZVBI_CFLAGS@ ZVBI_LIBS = @ZVBI_LIBS@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_STRIP = @ac_ct_STRIP@ ac_pt_PKG_CONFIG = @ac_pt_PKG_CONFIG@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ datadir = @datadir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ python_val = @python_val@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ plugindir = @PLUGIN_DEFAULT_DIR@ plugin_LTLIBRARIES = libscreenshot.zapping.la EXTRA_DIST = screenshot.glade2 pkgdata_DATA = screenshot.glade2 AM_CFLAGS = \ @PLUGIN_DEFAULT_FLAGS@ \ -DZAPPING8 INCLUDES = \ -I$(top_srcdir) \ @COMMON_INCLUDES@ libscreenshot_zapping_la_SOURCES = \ screenshot.c screenshot.h \ deint.c \ b_jpeg.c b_ppm.c libscreenshot_zapping_la_LIBADD = \ $(JPEG_LIB) all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu plugins/screenshot/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu plugins/screenshot/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh install-pluginLTLIBRARIES: $(plugin_LTLIBRARIES) @$(NORMAL_INSTALL) test -z "$(plugindir)" || $(mkdir_p) "$(DESTDIR)$(plugindir)" @list='$(plugin_LTLIBRARIES)'; for p in $$list; do \ if test -f $$p; then \ f=$(am__strip_dir) \ echo " $(LIBTOOL) --mode=install $(pluginLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(plugindir)/$$f'"; \ $(LIBTOOL) --mode=install $(pluginLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(plugindir)/$$f"; \ else :; fi; \ done uninstall-pluginLTLIBRARIES: @$(NORMAL_UNINSTALL) @set -x; list='$(plugin_LTLIBRARIES)'; for p in $$list; do \ p=$(am__strip_dir) \ echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(plugindir)/$$p'"; \ $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(plugindir)/$$p"; \ done clean-pluginLTLIBRARIES: -test -z "$(plugin_LTLIBRARIES)" || rm -f $(plugin_LTLIBRARIES) @list='$(plugin_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libscreenshot.zapping.la: $(libscreenshot_zapping_la_OBJECTS) $(libscreenshot_zapping_la_DEPENDENCIES) $(LINK) -rpath $(plugindir) $(libscreenshot_zapping_la_LDFLAGS) $(libscreenshot_zapping_la_OBJECTS) $(libscreenshot_zapping_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b_jpeg.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b_ppm.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/deint.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/screenshot.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool uninstall-info-am: install-pkgdataDATA: $(pkgdata_DATA) @$(NORMAL_INSTALL) test -z "$(pkgdatadir)" || $(mkdir_p) "$(DESTDIR)$(pkgdatadir)" @list='$(pkgdata_DATA)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ f=$(am__strip_dir) \ echo " $(pkgdataDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(pkgdatadir)/$$f'"; \ $(pkgdataDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(pkgdatadir)/$$f"; \ done uninstall-pkgdataDATA: @$(NORMAL_UNINSTALL) @list='$(pkgdata_DATA)'; for p in $$list; do \ f=$(am__strip_dir) \ echo " rm -f '$(DESTDIR)$(pkgdatadir)/$$f'"; \ rm -f "$(DESTDIR)$(pkgdatadir)/$$f"; \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) $(DATA) installdirs: for dir in "$(DESTDIR)$(plugindir)" "$(DESTDIR)$(pkgdatadir)"; do \ test -z "$$dir" || $(mkdir_p) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-pluginLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-libtool distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-pkgdataDATA install-pluginLTLIBRARIES install-exec-am: install-info: install-info-am install-man: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-info-am uninstall-pkgdataDATA \ uninstall-pluginLTLIBRARIES .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-pluginLTLIBRARIES ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-exec \ install-exec-am install-info install-info-am install-man \ install-pkgdataDATA install-pluginLTLIBRARIES install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags uninstall uninstall-am uninstall-info-am \ uninstall-pkgdataDATA uninstall-pluginLTLIBRARIES # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: zapping-0.10cvs6/plugins/screenshot/b_ppm.c 644 764 144 4401 10167770254 14114 /* * Screenshot saving plugin for Zapping * Copyright (C) 2000-2001 Iaki Garca Etxebarria * Copyright (C) 2001 Michael H. Schimek * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include "screenshot.h" static gboolean backend_init (screenshot_data *data _unused_, gboolean write _unused_, gint quality _unused_) { return TRUE; } static void backend_save (screenshot_data *data) { gchar *src, *dest; guint src_bpl, dest_bpl, free, n; src = (gchar *) data->data; src_bpl = data->format.bytes_per_line[0]; dest = data->io_buffer; free = data->io_buffer_size; dest_bpl = data->format.width * 3; g_assert (free > 80 && free > (dest_bpl + 80)); n = snprintf (dest, 80, "P6 %d %d 255\n", data->format.width, data->format.height); dest += n; free -= n; /* NB lines is evaluated by parent thread to update the progress bar */ for (data->lines = 0; data->lines < data->format.height; data->lines++) { if (screenshot_close_everything || data->thread_abort) { data->thread_abort = TRUE; break; } if (free < dest_bpl) { data->io_flush (data, data->io_buffer_size - free); dest = data->io_buffer; free = data->io_buffer_size; } memcpy (dest, src, data->format.width * 3); src += src_bpl; dest += dest_bpl; free -= dest_bpl; } if (!data->thread_abort && free < data->io_buffer_size) data->io_flush (data, data->io_buffer_size - free); } screenshot_backend screenshot_backend_ppm = { .keyword = "ppm", .label = "PPM", .extension = "ppm", .quality = FALSE, .bpp_est = 3.0, .init = backend_init, .save = backend_save, }; zapping-0.10cvs6/plugins/screenshot/screenshot.c 644 764 144 126502 10305456044 15233 /* * Screenshot saving plugin for Zapping * Copyright (C) 2000, 2001 Iñaki García Etxebarria * Copyright (C) 2001, 2002 Michael H. Schimek * * 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 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* XXX gtk+ 2.3 GtkTimeout -> ?; GtkOptionMenu -> ? */ /* gdk_pixbuf_render_to_drawable */ #undef GTK_DISABLE_DEPRECATED #undef GDK_DISABLE_DEPRECATED #include "screenshot.h" #include "src/zgconf.h" #include "src/yuv2rgb.h" #include "src/properties.h" #include "src/fullscreen.h" #include /* previews */ #include #include /* This plugin was built from the template one. It does some thing that the template one doesn't, such as adding itself to the gui and adding help for the properties. */ /* This is the description of the plugin, change as appropiate */ static const gchar str_canonical_name[] = "screenshot"; static const gchar str_descriptive_name[] = N_("Screenshot saver"); static const gchar str_description[] = N_("With this plugin you can take screen shots of the program " "you are watching and save them in various formats."); static const gchar str_short_description[] = N_("This plugin takes screenshots of the video capture."); static const gchar str_author[] = "Iñaki García Etxebarria & Michael H. Schimek"; /* The format of the version string must be %d[[.%d[.%d]][other_things]], where the things between [] aren't needed, and if not present, 0 will be assumed */ static const gchar str_version[] = "0.8"; /* Set to TRUE when plugin_close is called */ gboolean screenshot_close_everything = FALSE; /* Number of threads currently running (so we can know when are all of them closed) */ static gint num_threads = 0; static tveng_device_info * zapping_info = NULL; /* Info about the video device */ /* * Options */ /* save_dir is no longer an option but still in conf, save_base remembers the file basename too. */ static gchar *screenshot_option_save_dir = NULL; static gchar *screenshot_option_save_base = NULL; static gchar *screenshot_option_command = NULL; static gboolean screenshot_option_grab_on_ok; static gint screenshot_option_skip; static gboolean screenshot_option_toolbutton; /* Dialog options */ static gchar *screenshot_option_format = NULL; static gint screenshot_option_quality; static gint screenshot_option_deint; static gboolean screenshot_option_subtitles; /* Properties handling code */ static void properties_add (GtkDialog *dialog); /* * plugin_read_frame interface */ static screenshot_data *grab_data; static int grab_countdown = 0; static struct screenshot_backend * backends[] = { #ifdef HAVE_LIBJPEG &screenshot_backend_jpeg, #endif &screenshot_backend_ppm, NULL }; /* Callback when the WM tries to destroy the progress window, cancel job. */ static gboolean on_progress_delete_event (GtkWidget *widget, GdkEvent *event, struct screenshot_data * data); gint plugin_get_protocol ( void ) { /* You don't need to modify this function */ return PLUGIN_PROTOCOL; } static void plugin_get_info (const gchar ** canonical_name, const gchar ** descriptive_name, const gchar ** description, const gchar ** short_description, const gchar ** author, const gchar ** version) { /* Usually, this one doesn't need modification either */ if (canonical_name) *canonical_name = _(str_canonical_name); if (descriptive_name) *descriptive_name = _(str_descriptive_name); if (description) *description = _(str_description); if (short_description) *short_description = _(str_short_description); if (author) *author = _(str_author); if (version) *version = _(str_version); } /* * Creative WebCam (ov511) grab button * Contributed by Sandino Flores Moreno * * tveng_ov511_get_button_state apparently can take some time, but * plugin_start must be called from the main thread. Thus we have a * thread reading the /proc entry and a 250 ms timeout that get notified * (nothing fancy, just a gboolean) and calls plugin_start. */ static guint ogb_timeout_id = NO_SOURCE_ID; static volatile gboolean ov511_clicked = FALSE; static volatile gboolean ov511_poll_quit = FALSE; static gboolean have_ov511_poll_thread = FALSE; static pthread_t ov511_poll_thread_id; static void * ov511_poll_thread (void *unused _unused_) { /* I know this while (!quit) isn't the best thing since sliced bread, but it's easy to do and will work just fine */ while (!ov511_poll_quit) switch (tveng_ov511_get_button_state(zapping_info)) { case 1: ov511_clicked = TRUE; /* clicked */ break; case 0: /* not clicked since last get_button_state */ break; default: /* sth has gone wrong, exit the thread */ return NULL; } return NULL; } static gboolean plugin_start (void); static gint ov511_grab_button_timeout (guint *timeout_id) { static gboolean first_run = TRUE; /* Startup. This has two uses. First we check that the ov511 controller is loaded and if loaded we clear any previous "clicked" flag */ if (first_run) { if (tveng_ov511_get_button_state(zapping_info) < 0) { *timeout_id = NO_SOURCE_ID; return FALSE; } have_ov511_poll_thread = (0 == pthread_create(&ov511_poll_thread_id, NULL, ov511_poll_thread, NULL)); first_run = FALSE; } /* only done afterwards */ if (ov511_clicked) { ov511_clicked = FALSE; plugin_start(); } return TRUE; /* Continue */ } static gboolean screenshot_grab (gint dialog); static screenshot_backend * find_backend (gchar *keyword) { gint i; if (keyword) for (i = 0; backends[i]; i++) if (strcmp(keyword, backends[i]->keyword) == 0) return backends[i]; g_assert (backends[0] != NULL); return backends[0]; } static PyObject* py_screenshot (PyObject *self _unused_, PyObject *args _unused_) { char *_format = NULL; int ok = ParseTuple (args, "|s", &_format); if (!ok) g_error ("py_screenshot(|s)"); if (_format) { struct screenshot_backend *backend = find_backend (_format); if (!backend) py_return_false; g_free (screenshot_option_format); screenshot_option_format = g_strdup (backend->keyword); } /* 1 = screenshot, 0 = quickshot */ screenshot_grab (1); py_return_true; } static PyObject* py_quickshot (PyObject *self _unused_, PyObject *args _unused_) { char *_format = NULL; int ok = ParseTuple (args, "|s", &_format); if (!ok) g_error ("py_quickshot(|s)"); if (_format) { struct screenshot_backend *backend = find_backend (_format); if (!backend) py_return_false; g_free (screenshot_option_format); screenshot_option_format = g_strdup (backend->keyword); } /* 1 = screenshot, 0 = quickshot */ screenshot_grab (0); py_return_true; } static gboolean plugin_init ( PluginBridge bridge _unused_, tveng_device_info * info ) { /* Register the plugin as interested in the properties dialog */ property_handler screenshot_handler = { add: properties_add }; D(); append_property_handler(&screenshot_handler); ogb_timeout_id = g_timeout_add (100 /* ms */, (GSourceFunc) ov511_grab_button_timeout, &ogb_timeout_id); zapping_info = info; D(); cmd_register ("screenshot", py_screenshot, METH_VARARGS, ("Screenshot dialog"), "zapping.screenshot()"); cmd_register ("quickshot", py_quickshot, METH_VARARGS, ("Screenshot"), "zapping.quickshot()", ("PPM Screenshot"), "zapping.quickshot('ppm')", ("JPEG Screenshot"), "zapping.quickshot('jpeg')"); return TRUE; } static void plugin_close(void) { screenshot_close_everything = TRUE; if (ogb_timeout_id != NO_SOURCE_ID) { g_source_remove (ogb_timeout_id); ogb_timeout_id = NO_SOURCE_ID; } if (have_ov511_poll_thread) { ov511_poll_quit = TRUE; pthread_join(ov511_poll_thread_id, NULL); have_ov511_poll_thread = FALSE; } while (num_threads) /* Wait until all threads exit cleanly */ { z_update_gui(); usleep(5000); } } static gboolean plugin_start (void) { screenshot_grab (0); return TRUE; } #define LOAD_CONFIG(_type, _def, _name, _descr) \ buffer = g_strconcat (root_key, #_name, NULL); \ zconf_create_##_type (_def, _descr, buffer); \ zconf_get_##_type (&screenshot_option_##_name, buffer); \ g_free (buffer); static void plugin_load_config (gchar *root_key) { gchar *buffer; gchar *default_save_dir; D(); default_save_dir = g_strconcat (g_get_home_dir (), "/shots", NULL); LOAD_CONFIG (string, default_save_dir, save_dir, "The directory where screenshot will be written to"); g_free (default_save_dir); LOAD_CONFIG (string, "shot", save_base, "Default filename of screenshots"); D(); LOAD_CONFIG (string, "", command, "Command to run after taking the screenshot"); if (!screenshot_option_command) screenshot_option_command = g_strdup (""); LOAD_CONFIG (boolean, FALSE, grab_on_ok, "Grab on clicking OK"); LOAD_CONFIG (int, 0, skip, "Skip pictures before grabbing"); LOAD_CONFIG (string, "jpeg", format, "File format"); D(); LOAD_CONFIG (int, 75, quality, "Quality of the compressed image"); LOAD_CONFIG (int, 0, deint, "Deinterlace mode"); LOAD_CONFIG (boolean, FALSE, subtitles, "Save with subtitles"); LOAD_CONFIG (boolean, TRUE, toolbutton, "Add toolbar button"); } #define SAVE_CONFIG(_type, _name) \ buffer = g_strconcat (root_key, #_name, NULL); \ zconf_set_##_type (screenshot_option_##_name, buffer); \ g_free (buffer); static void plugin_save_config (gchar * root_key) { gchar *buffer; SAVE_CONFIG (string, save_dir); g_free(screenshot_option_save_dir); screenshot_option_save_dir = NULL; SAVE_CONFIG (string, save_base); g_free(screenshot_option_save_base); screenshot_option_save_base = NULL; SAVE_CONFIG (string, command); g_free (screenshot_option_command); screenshot_option_command = NULL; SAVE_CONFIG (boolean, grab_on_ok); SAVE_CONFIG (int, skip); SAVE_CONFIG (string, format); g_free (screenshot_option_format); screenshot_option_format = NULL; SAVE_CONFIG (int, quality); SAVE_CONFIG (int, deint); SAVE_CONFIG (boolean, subtitles); SAVE_CONFIG (boolean, toolbutton); } static gboolean plugin_get_public_info (gint index, gpointer * ptr, const gchar ** symbol, const gchar ** description, const gchar ** type, gint * hash) { /* Export the conversion functions */ struct plugin_exported_symbol symbols[] = { }; gint num_exported_symbols = sizeof(symbols)/sizeof(struct plugin_exported_symbol); if ((index >= num_exported_symbols) || (index < 0)) return FALSE; if (ptr) *ptr = symbols[index].ptr; if (symbol) *symbol = symbols[index].symbol; if (description) *description = _(symbols[index].description); if (type) *type = symbols[index].type; if (hash) *hash = symbols[index].hash; return TRUE; /* Exported */ } /* Preferences */ #define SET_BOOL(_name) \ w = lookup_widget (page, "screenshot_" #_name); \ gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (w), \ screenshot_option_##_name); static void screenshot_setup (GtkWidget *page) { GtkWidget *w; gboolean full_size; w = lookup_widget (page, "screenshot_command"); gtk_entry_set_text (GTK_ENTRY (w), screenshot_option_command); full_size = FALSE; z_gconf_get_bool (&full_size, "/apps/zapping/plugins/screenshot/full_size"); w = lookup_widget (page, "screenshot_full_size"); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (w), full_size); SET_BOOL (grab_on_ok); w = lookup_widget (page, "screenshot_skip"); gtk_spin_button_set_value (GTK_SPIN_BUTTON (w), screenshot_option_skip); SET_BOOL (toolbutton); } #define GET_BOOL(_name) \ w = lookup_widget (page, "screenshot_" #_name); \ screenshot_option_##_name = \ gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (w)); static void plugin_add_gui (GnomeApp *); static void screenshot_apply (GtkWidget *page) { GtkWidget *w; w = lookup_widget (page, "screenshot_command"); g_free (screenshot_option_command); screenshot_option_command = g_strdup (gtk_entry_get_text (GTK_ENTRY (w))); w = lookup_widget (page, "screenshot_full_size"); z_gconf_set_bool ("/apps/zapping/plugins/screenshot/full_size", gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (w))); GET_BOOL (grab_on_ok); w = lookup_widget (page, "screenshot_skip"); screenshot_option_skip = gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (w)); GET_BOOL (toolbutton); plugin_add_gui (&zapping->app); } static void properties_add (GtkDialog *dialog) { SidebarEntry plugin_options[] = { { N_("Screenshot"), "gnome-digital-camera.png", "screenshot_prefs", screenshot_setup, screenshot_apply, .help_link_id = "zapping-settings-screenshot" } }; SidebarGroup groups[] = { { N_("Plugins"), plugin_options, G_N_ELEMENTS (plugin_options) } }; standard_properties_add(dialog, groups, G_N_ELEMENTS (groups), "screenshot.glade2"); } static void plugin_add_gui (GnomeApp * app _unused_) { GtkToolItem *tool_item; gpointer p; p = g_object_get_data (G_OBJECT (zapping), "screenshot_button"); if (p) { tool_item = GTK_TOOL_ITEM (p); } else { tool_item = gtk_tool_button_new (NULL, _("Screenshot")); gtk_tool_button_set_stock_id (GTK_TOOL_BUTTON (tool_item), "zapping-screenshot"); z_tooltip_set (GTK_WIDGET (tool_item), _("Take a screenshot")); z_signal_connect_python (G_OBJECT (tool_item), "clicked", "zapping.screenshot()"); gtk_toolbar_insert (zapping->toolbar, tool_item, APPEND); /* Set up the widget so we can find it later */ g_object_set_data (G_OBJECT (zapping), "screenshot_button", tool_item); } if (screenshot_option_toolbutton) gtk_widget_show (GTK_WIDGET (tool_item)); else gtk_widget_hide (GTK_WIDGET (tool_item)); } static void plugin_remove_gui (GnomeApp * app _unused_) { GtkWidget *button; button = GTK_WIDGET (g_object_get_data (G_OBJECT (zapping), "screenshot_button")); gtk_container_remove (GTK_CONTAINER (zapping->toolbar), button); } static struct plugin_misc_info * plugin_get_misc_info (void) { static struct plugin_misc_info returned_struct = { sizeof(struct plugin_misc_info), /* size of this struct */ -10, /* plugin priority, we must be executed with a fully processed image */ /* Category */ PLUGIN_CATEGORY_VIDEO_OUT | PLUGIN_CATEGORY_FILTER | PLUGIN_CATEGORY_GUI }; /* Tell that the template plugin should be run with a somewhat high priority (just to put an example) */ return (&returned_struct); } /* * And here starts the real work... :-) */ static void screenshot_destroy (screenshot_data *data) { if (!data) return; data->lines = 0; if (data->filename) { if (data->io_fp) unlink (data->filename); g_free (data->filename); } g_free (data->command); if (data->status_window) gtk_widget_destroy (data->status_window); g_free (data->io_buffer); data->io_buffer_size = 0; data->io_buffer_used = 0; data->io_flush = NULL; if (data->io_fp) fclose (data->io_fp); g_free (data->error); tv_delete_image (data->data); if (data->subtitles) g_object_unref (G_OBJECT (data->subtitles)); g_free (data->auto_filename); if (data->pixbuf) g_object_unref (G_OBJECT (data->pixbuf)); if (data->dialog) gtk_widget_destroy (data->dialog); g_free (data); } static screenshot_data * screenshot_new (void) { gint i; guint private_max = 0; for (i = 0; backends[i]; i++) if (backends[i]->sizeof_private > private_max) private_max = backends[i]->sizeof_private; return (screenshot_data *) g_malloc0 (sizeof (screenshot_data) + private_max); } static gboolean io_buffer_init (screenshot_data *data, guint size) { data->io_buffer = g_malloc (size); if (!data->io_buffer) return FALSE; data->io_buffer_size = size; data->io_buffer_used = 0; return TRUE; } static gboolean io_flush_stdio (screenshot_data *data, guint size) { if (data->thread_abort) return FALSE; if (fwrite (data->io_buffer, 1, size, data->io_fp) != size) { data->error = g_strconcat(_("Error while writing screenshot\n"), data->filename, "\n", strerror (errno), NULL); data->thread_abort = TRUE; return FALSE; } data->io_buffer_used += size; return TRUE; } static gboolean io_flush_memory (screenshot_data *data, guint size) { if (data->io_buffer_used > 0) { data->thread_abort = TRUE; return FALSE; /* output exceeds data->io_buffer_size */ } data->io_buffer_used = size; return TRUE; } static void execute_command (screenshot_data *data) { tveng_tuned_channel *tc; char *argv[10]; int argc = 0; char *env[10]; int envc = 0; /* Invoke through sh */ argv[argc++] = g_strdup ("sh"); argv[argc++] = g_strdup ("-c"); argv[argc++] = g_strdup (data->command); /* FIXME */ env[envc++] = g_strdup_printf ("SCREENSHOT_PATH=%s", data->filename); /* XXX thread safe? prolly not */ tc = tveng_tuned_channel_nth (global_channel_list, (guint) cur_tuned_channel); if (tc) { env[envc++] = g_strdup_printf ("CHANNEL_ALIAS=%s", tc->name); env[envc++] = g_strdup_printf ("CHANNEL_ID=%s", tc->rf_name); if (tv_cur_video_standard (zapping_info)) env[envc++] = g_strdup_printf ("CURRENT_STANDARD=%s", tv_cur_video_standard (zapping_info)->label); if (tv_cur_video_input (zapping_info)) env[envc++] = g_strdup_printf ("CURRENT_INPUT=%s", tv_cur_video_input (zapping_info)->label); } gnome_execute_async_with_env (NULL, argc, argv, envc, env); while (envc-- > 0) g_free (env[envc]); while (argc-- > 0) g_free (argv[argc]); } static void overlay_subtitles (screenshot_data * data) { uint8_t *dst; const uint8_t *src; guint subt_width; guint subt_height; guint width; guint height; guint dst_bpl; guint src_bpl; guint dst_padding; guint src_padding; guint row; if (NULL == data->subtitles) return; /* Subtitle image should have the same size as the video, but better safe than sorry. */ subt_width = gdk_pixbuf_get_width (data->subtitles); subt_height = gdk_pixbuf_get_height (data->subtitles); width = MIN (data->format.width, subt_width); height = MIN (data->format.height, subt_height); dst = data->data; dst_bpl = data->format.bytes_per_line[0]; dst += ((data->format.width - width + 1) >> 1) * 3 /* RGB */ + ((data->format.height - height + 1) >> 1) * dst_bpl; dst_padding = dst_bpl - width * 3; src = gdk_pixbuf_get_pixels (data->subtitles); src_bpl = gdk_pixbuf_get_rowstride (data->subtitles); src += ((subt_width - width + 1) >> 1) * 4 /* RGBA */ + ((subt_height - height + 1) >> 1) * src_bpl; src_padding = src_bpl - width * 4; for (row = 0; row < height; ++row) { guint column; for (column = 0; column < width; ++column) { /* R, G, B, A -> R, G, B */ if (0 != src[3]) { dst[0] = src[0]; dst[1] = src[1]; dst[2] = src[2]; } dst += 3; src += 4; } dst += dst_padding; src += src_padding; } } static void * screenshot_saving_thread (void *_data) { screenshot_data *data = (screenshot_data *) _data; if (screenshot_option_deint) switch (data->format.height) { case 480: case 576: screenshot_deinterlace (data->data, &data->format, /* parity */ screenshot_option_deint - 1); break; } if (screenshot_option_subtitles && data->subtitles) overlay_subtitles (data); data->backend->save (data); if (data->thread_abort || data->error) { unlink (data->filename); fclose (data->io_fp); } else if (fclose (data->io_fp) != 0) { data->error = g_strconcat(_("Error while writing screenshot\n"), data->filename, "\n", strerror(errno), NULL); unlink (data->filename); data->thread_abort = TRUE; } else if (data->command) { execute_command (data); } data->io_fp = NULL; data->status = 8; /* thread done */ return NULL; } static gboolean on_progress_delete_event (GtkWidget *widget _unused_, GdkEvent *event _unused_, screenshot_data *data) { data->thread_abort = TRUE; /* thread shall abort */ data->status_window = NULL; /* will be destroyed */ return FALSE; /* destroy window */ } static GtkWidget * create_status_window (screenshot_data *data) { GtkWidget *window; GtkWidget *vbox; GtkWidget *label; GtkWidget *progressbar; label = gtk_label_new (data->filename); gtk_widget_show (label); progressbar = gtk_progress_bar_new (); gtk_widget_show (progressbar); vbox = gtk_vbox_new (FALSE, 0); gtk_box_pack_start_defaults (GTK_BOX (vbox), label); gtk_box_pack_start_defaults (GTK_BOX (vbox), progressbar); gtk_widget_show (vbox); window = gtk_window_new (GTK_WINDOW_TOPLEVEL); gtk_container_add (GTK_CONTAINER (window), vbox); gtk_window_set_title (GTK_WINDOW (window), _("Saving...")); gtk_window_set_modal (GTK_WINDOW (window), FALSE); g_object_set_data (G_OBJECT (window), "progressbar", progressbar); g_signal_connect (G_OBJECT (window), "delete-event", (GtkSignalFunc) on_progress_delete_event, data); gtk_widget_show (window); return window; } static gboolean screenshot_save (screenshot_data * data) { gchar *dir_name; gchar *base_name; dir_name = g_path_get_dirname (data->filename); base_name = g_path_get_basename (data->filename); /* XXX zapping real parent? */ if (!z_build_path_with_alert (GTK_WINDOW (zapping), dir_name)) goto failure; if (!(data->io_fp = fopen (data->filename, "wb"))) { gchar *window_title; window_title = g_strdup_printf (_("Sorry, but I cannot write %s\n%s"), data->filename, strerror (errno)); ShowBox ("%s", GTK_MESSAGE_ERROR, window_title); g_free (window_title); goto failure; } if (!data->io_buffer) if (!io_buffer_init (data, 1 << 16)) goto failure; data->io_flush = io_flush_stdio; if (!data->backend->init (data, /* write */ TRUE, screenshot_option_quality)) goto failure; data->status_window = create_status_window (data); if (screenshot_option_command && screenshot_option_command[0]) { /* may change while saving */ data->command = g_strdup (screenshot_option_command); } data->thread_abort = FALSE; data->lines = 0; switch (pthread_create (&data->saving_thread, NULL, screenshot_saving_thread, data)) { case ENOMEM: ShowBox (_("Sorry, not enough resources to create a new thread"), GTK_MESSAGE_ERROR); goto failure; case EAGAIN: ShowBox (_("There are too many threads"), GTK_MESSAGE_ERROR); goto failure; case 0: num_threads++; grab_data = NULL; /* permit new request */ /* Funny bug: With small images encoding might finish before pthread_create returns, thus we must check that we aren't overwriting the finished status */ if (data->status != 8) data->status = 7; /* monitoring */ break; default: goto failure; } g_free (screenshot_option_save_dir); screenshot_option_save_dir = dir_name; g_free (screenshot_option_save_base); screenshot_option_save_base = base_name; return TRUE; failure: g_free (base_name); g_free (dir_name); return FALSE; } /* * Screenshot dialog */ /* Hardcoded */ #define PREVIEW_WIDTH 192 #define PREVIEW_HEIGHT 144 static void preview (screenshot_data *data) { void *old_image; void *tmp_image; tv_image_format old_format; const tv_pixel_format *pf; unsigned int h_offset; unsigned int v_offset; if (!data || !data->drawingarea || !data->pixbuf) return; old_image = data->data; old_format = data->format; tmp_image = NULL; if (screenshot_option_deint || (screenshot_option_subtitles && data->subtitles)) { /* Need a working copy. */ tmp_image = tv_new_image (data->data, &data->format); if (!tmp_image) return; data->data = tmp_image; } /* Apply cookie cutter. */ pf = data->format.pixel_format; h_offset = (((data->format.width - PREVIEW_WIDTH) >> 1) * pf->bits_per_pixel) >> 3; v_offset = (((data->format.height - PREVIEW_HEIGHT) >> 1) & (unsigned int) -1); /* top field first */ data->data = (uint8_t *) data->data + h_offset + v_offset * data->format.bytes_per_line[0]; data->format.width = PREVIEW_WIDTH; data->format.height = PREVIEW_HEIGHT; if (screenshot_option_deint) { screenshot_deinterlace (data, &data->format, /* parity */ screenshot_option_deint - 1); } if (screenshot_option_subtitles && data->subtitles) { overlay_subtitles (data); } if (data->backend->load) { if (!data->io_buffer) if (!io_buffer_init (data, PREVIEW_WIDTH * PREVIEW_HEIGHT * 4)) { // printf ("a\n"); goto restore; } data->io_flush = io_flush_memory; data->io_buffer_used = 0; if (!data->backend->init (data, /* write */ TRUE, screenshot_option_quality)) { // printf ("b\n"); goto restore; } data->backend->save (data); if (data->thread_abort) { // printf ("c\n"); goto restore; } data->size_est = data->io_buffer_used * (double)(old_format.width * old_format.height) / (double)(PREVIEW_WIDTH * PREVIEW_HEIGHT); if (!data->backend->init (data, /* write */ FALSE, 0)) { // printf ("d\n"); goto restore; } data->backend->load (data, (void *) gdk_pixbuf_get_pixels (data->pixbuf), gdk_pixbuf_get_rowstride (data->pixbuf)); } else /* backend doesn't support preview (lossless format?) */ { guint line, rowstride; gchar *s, *d; s = data->data; d = (void *) gdk_pixbuf_get_pixels (data->pixbuf); rowstride = gdk_pixbuf_get_rowstride (data->pixbuf); for (line = 0; line < data->format.height; line++) { memcpy (d, s, data->format.width * 3); s += data->format.bytes_per_line[0]; d += rowstride; } data->size_est = data->backend->bpp_est * (double)(old_format.width * old_format.height); } gtk_widget_set_size_request (data->drawingarea, PREVIEW_WIDTH, PREVIEW_HEIGHT); restore: free (tmp_image); data->format = old_format; data->data = old_image; } static gboolean on_drawingarea_expose_event (GtkWidget *widget _unused_, GdkEventExpose *event _unused_, screenshot_data *data) { gchar buf[80]; if (data->drawingarea && data->pixbuf) gdk_pixbuf_render_to_drawable (data->pixbuf, data->drawingarea->window, data->drawingarea->style->white_gc, 0, 0, 0, 0, PREVIEW_WIDTH, PREVIEW_HEIGHT, GDK_RGB_DITHER_NORMAL, 0, 0); if (data->size_label) { if (data->size_est < (double)(1 << 20)) snprintf (buf, sizeof(buf) - 1, _("appx %u KB"), (unsigned int)(data->size_est / (1 << 10))); else snprintf (buf, sizeof(buf) - 1, _("appx %.2f MB"), data->size_est / (double)(1 << 20)); gtk_label_set_text (GTK_LABEL (data->size_label), buf); } return FALSE; } static void on_subtitles_toggled (GtkToggleButton * toggle_button, screenshot_data * data) { screenshot_option_subtitles = gtk_toggle_button_get_active (toggle_button); preview (data); on_drawingarea_expose_event (NULL, NULL, data); } static gboolean on_deint_changed (GtkWidget * widget, screenshot_data * data) { gint new_deint = z_object_get_int_data (G_OBJECT (widget), "deint"); if (screenshot_option_deint == new_deint) return FALSE; screenshot_option_deint = new_deint; preview (data); on_drawingarea_expose_event (NULL, NULL, data); return FALSE; } static gboolean on_quality_changed (GtkWidget *widget, screenshot_data *data) { gint new_quality = GTK_ADJUSTMENT (widget)->value; if (screenshot_option_quality == new_quality) return FALSE; screenshot_option_quality = new_quality; preview (data); on_drawingarea_expose_event (NULL, NULL, data); return FALSE; } static void on_format_changed (GtkWidget *menu, screenshot_data *data) { GtkWidget *menu_item = gtk_menu_get_active (GTK_MENU (menu)); gchar *keyword; keyword = g_object_get_data (G_OBJECT (menu_item), "keyword"); data->backend = find_backend (keyword); g_assert (data->backend); g_free (screenshot_option_format); screenshot_option_format = g_strdup (data->backend->keyword); z_set_sensitive_with_tooltip (data->quality_slider, data->backend->quality, NULL, _("This format has no quality option")); z_electric_replace_extension (GTK_WIDGET (data->entry), data->backend->extension); preview (data); on_drawingarea_expose_event (NULL, NULL, data); } enum { SCREENSHOT_CONFIGURE = 666 /* Must match the value in the .glade2 file */ }; static gchar * default_filename (const screenshot_data *data) { if (NULL == screenshot_option_save_base || 0 == screenshot_option_save_base[0]) { g_free (screenshot_option_save_base); screenshot_option_save_base = g_strdup ("shot"); } return find_unused_name (screenshot_option_save_dir, screenshot_option_save_base, data->backend->extension); } static void build_dialog (screenshot_data *data) { GtkWidget *widget; GtkWidget *menu, *menu_item; GtkAdjustment *adj; guint default_item = 0; guint i; data->dialog = build_widget ("dialog1", "screenshot.glade2"); /* Format menu */ widget = lookup_widget (data->dialog, "optionmenu1"); if ((menu = gtk_option_menu_get_menu (GTK_OPTION_MENU (widget)))) gtk_widget_destroy (menu); menu = gtk_menu_new (); g_assert (backends[0] != NULL); for (i = 0; backends[i]; i++) { menu_item = gtk_menu_item_new_with_label (_(backends[i]->label)); z_object_set_const_data (G_OBJECT (menu_item), "keyword", backends[i]->keyword); gtk_widget_show (menu_item); gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_item); if (strcmp (screenshot_option_format, backends[i]->keyword) == 0) default_item = i; } gtk_option_menu_set_menu (GTK_OPTION_MENU (widget), menu); gtk_option_menu_set_history (GTK_OPTION_MENU (widget), default_item); g_signal_connect (G_OBJECT (GTK_OPTION_MENU (widget)->menu), "deactivate", G_CALLBACK (on_format_changed), data); data->backend = backends[default_item]; { gchar *filename; /* File entry */ data->entry = GTK_ENTRY (lookup_widget (data->dialog, "entry")); z_entry_emits_response (GTK_WIDGET (data->entry), GTK_DIALOG (data->dialog), GTK_RESPONSE_OK); gtk_dialog_set_default_response (GTK_DIALOG (data->dialog), GTK_RESPONSE_OK); filename = default_filename (data); data->auto_filename = g_path_get_basename (filename); gtk_entry_set_text (data->entry, filename); g_free (filename); g_object_set_data (G_OBJECT (data->entry), "basename", (gpointer) data->auto_filename); g_signal_connect (G_OBJECT (data->entry), "changed", G_CALLBACK (z_on_electric_filename), (gpointer) NULL); gtk_editable_select_region (GTK_EDITABLE (data->entry), 0, -1); } /* Preview */ if (1 && data->format.width >= PREVIEW_WIDTH && data->format.height >= PREVIEW_HEIGHT) { data->pixbuf = gdk_pixbuf_new (GDK_COLORSPACE_RGB, /* has_alpha */ FALSE, /* bits_per_sample */ 8, PREVIEW_WIDTH, PREVIEW_HEIGHT); data->drawingarea = lookup_widget (data->dialog, "drawingarea1"); data->size_label = lookup_widget (data->dialog, "label7"); gdk_window_set_back_pixmap (data->drawingarea->window, NULL, FALSE); preview (data); g_signal_connect (G_OBJECT (data->drawingarea), "expose-event", G_CALLBACK (on_drawingarea_expose_event), data); } else { GtkWidget *drawingarea = lookup_widget (data->dialog, "drawingarea1"); GtkWidget *size_label = lookup_widget (data->dialog, "label7"); gtk_widget_destroy (drawingarea); gtk_widget_destroy (size_label); data->pixbuf = NULL; data->drawingarea = NULL; data->size_label = NULL; } /* Quality slider */ data->quality_slider = lookup_widget (data->dialog, "hscale1"); adj = gtk_range_get_adjustment (GTK_RANGE (data->quality_slider)); gtk_adjustment_set_value (GTK_ADJUSTMENT (adj), screenshot_option_quality); g_signal_connect (G_OBJECT (adj), "value-changed", G_CALLBACK (on_quality_changed), data); z_set_sensitive_with_tooltip (data->quality_slider, data->backend->quality, NULL, _("This format has no quality option")); gtk_window_set_transient_for (GTK_WINDOW (data->dialog), GTK_WINDOW (zapping)); gtk_widget_grab_focus (GTK_WIDGET (data->entry)); /* Deinterlace */ if (data->format.height == 480 || data->format.height == 576) { widget = lookup_widget (data->dialog, "radiobutton4"); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (widget), (screenshot_option_deint == 0)); g_signal_connect (G_OBJECT (widget), "pressed", G_CALLBACK (on_deint_changed), data); widget = lookup_widget (data->dialog, "radiobutton2"); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (widget), (screenshot_option_deint == 1)); g_object_set_data (G_OBJECT (widget), "deint", (gpointer) 1); g_signal_connect (G_OBJECT (widget), "pressed", G_CALLBACK (on_deint_changed), data); widget = lookup_widget (data->dialog, "radiobutton3"); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (widget), (screenshot_option_deint == 2)); g_object_set_data (G_OBJECT (widget), "deint", (gpointer) 2); g_signal_connect (G_OBJECT (widget), "pressed", G_CALLBACK (on_deint_changed), data); } else { widget = lookup_widget (data->dialog, "hbox2"); z_set_sensitive_with_tooltip (widget, FALSE, NULL, _("Only useful with full size, unscaled picture (480 or 576 lines)")); } /* Subtitles */ widget = lookup_widget (data->dialog, "subtitles"); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (widget), screenshot_option_subtitles); if (data->subtitles) { g_signal_connect (G_OBJECT (widget), "toggled", G_CALLBACK (on_subtitles_toggled), data); } else { gtk_widget_set_sensitive (widget, FALSE); } } static gint format_request = -1; static void unrequest (void) { if (-1 != format_request) { release_capture_format (format_request); format_request = -1; } } /* * This timer callback controls the progress of image saving. * I [mhs] promise to never ever write something ugly like this * again in my whole life, but for now I see no easy way around. */ static gboolean screenshot_timeout (screenshot_data *data) { const gchar *filename; gpointer result; switch (data->status) { case 0: case 1: case 4: /* waiting for image */ if (data->lines-- <= 0) { unrequest (); grab_data = NULL; screenshot_destroy (data); return FALSE; /* remove */ } break; case 2: /* quick start */ data->backend = find_backend (screenshot_option_format); data->filename = default_filename (data); if (!screenshot_save (data)) { unrequest (); grab_data = NULL; screenshot_destroy (data); return FALSE; /* remove */ } break; case 3: /* dialog */ build_dialog (data); /* * -1 or 1 if cancelled. */ switch (gtk_dialog_run (GTK_DIALOG (data->dialog))) { case GTK_RESPONSE_OK: /* OK */ filename = gtk_entry_get_text (data->entry); if (filename) { data->filename = g_strdup (filename); gtk_widget_destroy (GTK_WIDGET (data->dialog)); data->dialog = NULL; if (screenshot_option_grab_on_ok) { data->status = 4; data->lines = 2000 / 50; /* abort after 2 sec */ grab_countdown = screenshot_option_skip + 1; } else if (!screenshot_save (data)) { unrequest (); grab_data = NULL; screenshot_destroy (data); return FALSE; /* remove */ } break; } /* fall through */ default: /* Cancel */ unrequest (); grab_data = NULL; screenshot_destroy (data); return FALSE; /* remove */ case SCREENSHOT_CONFIGURE: /* Configure */ { unrequest (); grab_data = NULL; screenshot_destroy (data); python_command_printf (/* GtkWidget */ NULL, "zapping.properties('%s', '%s')", _("Plugins"), _("Screenshot")); return FALSE; /* remove */ } } break; case 6: /* post-dialog data ready */ if (!screenshot_save (data)) { unrequest (); grab_data = NULL; screenshot_destroy (data); return FALSE; /* remove */ } break; case 7: /* monitoring */ if (data->status_window) { GtkWidget *progressbar; gfloat progress = data->lines / (gfloat) data->format.height; progressbar = g_object_get_data (G_OBJECT (data->status_window), "progressbar"); gtk_progress_bar_set_fraction (GTK_PROGRESS_BAR (progressbar), progress); } break; case 8: /* thread done */ pthread_join (data->saving_thread, &result); num_threads--; if (data->error) ShowBox("%s", GTK_MESSAGE_ERROR, data->error); /* fall through */ default: unrequest (); if (grab_data == data) grab_data = NULL; screenshot_destroy (data); return FALSE; /* remove the timer */ } return TRUE; /* resume */ } static gboolean copy_image (screenshot_data *data, capture_frame *frame) { zimage *image = retrieve_frame (frame, TV_PIXFMT_RGB24_LE, /* copy */ FALSE); if (!image) return FALSE; data->format = image->fmt; data->data = tv_new_image (image->img, &image->fmt); if (DISPLAY_MODE_FULLSCREEN == zapping->display_mode) { data->subtitles = fullscreen_get_subtitle_image (/* expose */ NULL, image->fmt.width, image->fmt.height); } else if (zapping->subtitles) { data->subtitles = zapping->subtitles->get_image (zapping->subtitles, /* expose */ NULL, image->fmt.width, image->fmt.height); } return (NULL != data->data); } static void plugin_read_frame (capture_frame *frame) { if (grab_data && grab_countdown > 0) if (grab_countdown-- == 1) { if (copy_image (grab_data, frame)) { unrequest (); grab_data->status += 2; /* data ready */ } else { grab_data->status = -1; /* timeout abort yourself */ } } } static gboolean screenshot_grab (gint dialog) { screenshot_data *data; if (grab_data) return FALSE; /* request pending */ data = screenshot_new (); grab_countdown = 0; grab_data = data; /* * Switch to capture mode if we aren't viewing Teletext * (associated with TVENG_NO_CAPTURE) */ if (CAPTURE_MODE_NONE != tv_get_capture_mode (zapping_info)) { guint width; guint height; gboolean full_size; if (CAPTURE_MODE_READ != tv_get_capture_mode (zapping_info)) zmisc_switch_mode (DISPLAY_MODE_WINDOW, CAPTURE_MODE_READ, zapping_info, /* warnings */ TRUE); if (tv_get_capture_mode (zapping_info) != CAPTURE_MODE_READ) { screenshot_destroy (data); return FALSE; /* unable to set the mode */ } width = 0; /* any */ height = 0; full_size = FALSE; z_gconf_get_bool (&full_size, "/apps/zapping/plugins/screenshot/full_size"); if (full_size) { const tv_video_standard *std; if ((std = tv_cur_video_standard (zapping->info))) { width = std->frame_width; height = std->frame_height; } } format_request = request_capture_format (zapping_info, width, height, TV_PIXFMT_SET (TV_PIXFMT_RGB24_LE), /* flags */ 0); if (-1 == format_request && 0 != width) { format_request = request_capture_format (zapping_info, 0, 0, TV_PIXFMT_SET (TV_PIXFMT_RGB24_LE), /* flags */ 0); } if (-1 == format_request) { /* FIXME: This and above we should restore whatever mode was present before */ return FALSE; } } #ifdef GNOME2_CONVERSION_COMPLETE #ifdef HAVE_LIBZVBI /* * Otherwise request TTX image * XXX Option: include subtitles */ else if (teletext mode && (pixbuf = ttxview_get_scaled_ttx_page (GTK_WIDGET (z_main_window ())))) { struct tveng_frame_format format; format.width = gdk_pixbuf_get_width (pixbuf); format.height = gdk_pixbuf_get_height (pixbuf); format.bpp = 4; format.depth = 32; format.pixformat = TVENG_PIX_RGB32; format.bytesperline = gdk_pixbuf_get_rowstride (pixbuf); if (!copy_image (data, gdk_pixbuf_get_pixels (pixbuf), &format)) { screenshot_destroy (data); return FALSE; } data->status = dialog + 2; /* image data is ready */ g_timeout_add (50, (GSourceFunc) screenshot_timeout, data); return TRUE; } #endif /* HAVE_LIBZVBI */ #endif /* conversion complete */ else return FALSE; grab_countdown = screenshot_option_skip + 1; data->status = dialog; /* wait for image data (event sub) */ data->lines = 2000 / 50; /* abort after 2 sec */ g_timeout_add (50, (GSourceFunc) screenshot_timeout, data); return TRUE; } /* Return FALSE if we aren't able to access a symbol, you should only need to edit the pointer table, not the code */ gboolean plugin_get_symbol(const gchar * name, gint hash, gpointer * ptr) { /* Usually this table is the only thing you will need to change */ struct plugin_exported_symbol table_of_symbols[] = { SYMBOL(plugin_init, 0x1234), SYMBOL(plugin_get_info, 0x1234), SYMBOL(plugin_close, 0x1234), SYMBOL(plugin_start, 0x1234), SYMBOL(plugin_load_config, 0x1234), SYMBOL(plugin_save_config, 0x1234), SYMBOL(plugin_read_frame, 0x1234), SYMBOL(plugin_get_public_info, 0x1234), SYMBOL(plugin_add_gui, 0x1234), SYMBOL(plugin_remove_gui, 0x1234), SYMBOL(plugin_get_misc_info, 0x1234) }; gint num_exported_symbols = sizeof(table_of_symbols)/sizeof(struct plugin_exported_symbol); gint i; /* Try to find the given symbol in the table of exported symbols of the plugin */ for (i=0; i typedef struct screenshot_data screenshot_data; typedef struct screenshot_backend screenshot_backend; typedef struct backend_private backend_private; struct screenshot_data { gint status; screenshot_backend * backend; GtkWidget * dialog; GtkWidget * drawingarea; GtkWidget * size_label; GtkWidget * quality_slider; GtkEntry * entry; GdkPixbuf * pixbuf; gchar * auto_filename; gdouble size_est; void * data; tv_image_format format; /* Format of the grabbed image */ GdkPixbuf * subtitles; gchar * io_buffer; guint io_buffer_size; /* Allocated */ guint io_buffer_used; gboolean (* io_flush)(screenshot_data *, guint); FILE * io_fp; gchar * error; pthread_t saving_thread; gboolean thread_abort; /* TRUE when the thread shall abort */ GtkWidget * status_window; /* Progressbar */ guint lines; /* Lines saved by thread (progress) */ gchar * command; /* To be executed on completion */ gchar * filename; /* The file we save */ gchar private[0]; /* Backend data */ }; struct screenshot_backend { const gchar * keyword; /* Canonical */ const gchar * label; /* gettext()ized */ const gchar * extension; guint sizeof_private; gboolean quality; /* Supports quality option? */ gdouble bpp_est; /* Static output size estimation */ /* if no preview supported */ gboolean (* init)(screenshot_data *data, gboolean write, gint quality); /* 0...100 */ void (* save)(screenshot_data *data); /* For preview, optional */ void (* load)(screenshot_data *data, gchar *pixels, gint rowstride); }; extern gboolean screenshot_close_everything; extern void screenshot_deinterlace (void * image, const tv_image_format * format, gint parity); /* * Encoding backends */ extern screenshot_backend screenshot_backend_jpeg; extern screenshot_backend screenshot_backend_ppm; zapping-0.10cvs6/COPYING 644 764 144 43122 10304524022 10052 GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) 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 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License. zapping-0.10cvs6/README.plugins 644 764 144 1106 10432663167 11353 Sorry there is no up to date documentation available. A review and rewrite of the plugin code will be necessary in the future to clean up and prepare for new features, in the course I'll properly document everything. Plugin naming and location -------------------------- The program will search for plugins in the following locations: * $(prefix)/lib/zapping/plugins, that is ./configure --prefix. * $HOME/.zapping/plugins, if that dir exists. * All dirs listed in the file $HOME/.zapping/plugin_dirs, if that file exists. Plugin names must end in ".zapping.so".