From 725da5ed0bc6a2703ff4aacda8115cffd6879d62 Mon Sep 17 00:00:00 2001 From: Chris Tallon Date: Tue, 28 Jun 2005 22:16:29 +0000 Subject: [PATCH] Initial import --- COPYING | 340 +++ Makefile | 47 + afeed.cc | 92 + afeed.h | 54 + afeedr.cc | 73 + afeedr.h | 52 + audio.cc | 281 ++ audio.h | 89 + bogl.h | 17 + box.cc | 192 ++ box.h | 75 + callback.h | 30 + channel.cc | 36 + channel.h | 41 + command.cc | 393 +++ command.h | 88 + defines.h | 36 + demuxer.cc | 480 ++++ demuxer.h | 147 ++ directory.cc | 86 + directory.h | 55 + dsock.cc | 190 ++ dsock.h | 67 + fonts/helvB18-ISO8859-1.pcf | Bin 0 -> 16200 bytes fonts/helvB18.bdf | 4034 +++++++++++++++++++++++++++++ fonts/helvB18.cc | Bin 0 -> 240846 bytes fonts/helvB24-ISO8859-1.pcf | Bin 0 -> 19620 bytes fonts/helvB24.bdf | 4889 +++++++++++++++++++++++++++++++++++ fonts/helvB24.cc | Bin 0 -> 298697 bytes fonts/licence.txt | 876 +++++++ led.cc | 75 + led.h | 48 + list.cc | 170 ++ list.h | 66 + log.cc | 149 ++ log.h | 89 + main.cc | 399 +++ message.cc | 30 + message.h | 52 + messagequeue.cc | 38 + messagequeue.h | 46 + mtd.cc | 127 + mtd.h | 59 + node.cc | 46 + node.h | 37 + osd.cc | 111 + osd.h | 61 + other/licence.txt | 45 + other/vdr.jpg | Bin 0 -> 14359 bytes other/wallpaper.jpg | Bin 0 -> 14125 bytes player.cc | 497 ++++ player.h | 85 + playerradio.cc | 372 +++ playerradio.h | 76 + queue.cc | 79 + queue.h | 45 + recording.cc | 89 + recording.h | 49 + remote.cc | 124 + remote.h | 88 + stb.h | 220 ++ stream.cc | 128 + stream.h | 50 + surface.cc | 526 ++++ surface.h | 249 ++ tcp.cc | 403 +++ tcp.h | 69 + thread.cc | 92 + thread.h | 57 + vchannellist.cc | 210 ++ vchannellist.h | 58 + vchannelselect.cc | 129 + vchannelselect.h | 52 + vdr.cc | 608 +++++ vdr.h | 107 + vfeed.cc | 72 + vfeed.h | 51 + video.cc | 304 +++ video.h | 111 + view.cc | 123 + view.h | 74 + viewman.cc | 540 ++++ viewman.h | 82 + vinfo.cc | 69 + vinfo.h | 48 + vlivebanner.cc | 89 + vlivebanner.h | 46 + vmute.cc | 62 + vmute.h | 43 + vquestion.cc | 118 + vquestion.h | 59 + vradiolive.cc | 115 + vradiolive.h | 54 + vrecordinglist.cc | 350 +++ vrecordinglist.h | 63 + vrecordingmenu.cc | 171 ++ vrecordingmenu.h | 58 + vserverselect.cc | 81 + vserverselect.h | 47 + vvideolive.cc | 165 ++ vvideolive.h | 57 + vvideorec.cc | 122 + vvideorec.h | 47 + vvolume.cc | 85 + vvolume.h | 45 + vwallpaper.cc | 54 + vwallpaper.h | 48 + vwelcome.cc | 212 ++ vwelcome.h | 58 + wbutton.cc | 76 + wbutton.h | 45 + wjpeg.cc | 112 + wjpeg.h | 48 + wselectlist.cc | 171 ++ wselectlist.h | 60 + wsymbol.cc | 563 ++++ wsymbol.h | 55 + 117 files changed, 23723 insertions(+) create mode 100644 COPYING create mode 100644 Makefile create mode 100644 afeed.cc create mode 100644 afeed.h create mode 100644 afeedr.cc create mode 100644 afeedr.h create mode 100644 audio.cc create mode 100644 audio.h create mode 100644 bogl.h create mode 100644 box.cc create mode 100644 box.h create mode 100644 callback.h create mode 100644 channel.cc create mode 100644 channel.h create mode 100644 command.cc create mode 100644 command.h create mode 100644 defines.h create mode 100644 demuxer.cc create mode 100644 demuxer.h create mode 100644 directory.cc create mode 100644 directory.h create mode 100644 dsock.cc create mode 100644 dsock.h create mode 100644 fonts/helvB18-ISO8859-1.pcf create mode 100644 fonts/helvB18.bdf create mode 100644 fonts/helvB18.cc create mode 100644 fonts/helvB24-ISO8859-1.pcf create mode 100644 fonts/helvB24.bdf create mode 100644 fonts/helvB24.cc create mode 100644 fonts/licence.txt create mode 100644 led.cc create mode 100644 led.h create mode 100644 list.cc create mode 100644 list.h create mode 100644 log.cc create mode 100644 log.h create mode 100644 main.cc create mode 100644 message.cc create mode 100644 message.h create mode 100644 messagequeue.cc create mode 100644 messagequeue.h create mode 100644 mtd.cc create mode 100644 mtd.h create mode 100644 node.cc create mode 100644 node.h create mode 100644 osd.cc create mode 100644 osd.h create mode 100644 other/licence.txt create mode 100644 other/vdr.jpg create mode 100644 other/wallpaper.jpg create mode 100644 player.cc create mode 100644 player.h create mode 100644 playerradio.cc create mode 100644 playerradio.h create mode 100644 queue.cc create mode 100644 queue.h create mode 100644 recording.cc create mode 100644 recording.h create mode 100644 remote.cc create mode 100644 remote.h create mode 100644 stb.h create mode 100644 stream.cc create mode 100644 stream.h create mode 100644 surface.cc create mode 100644 surface.h create mode 100644 tcp.cc create mode 100644 tcp.h create mode 100644 thread.cc create mode 100644 thread.h create mode 100644 vchannellist.cc create mode 100644 vchannellist.h create mode 100644 vchannelselect.cc create mode 100644 vchannelselect.h create mode 100644 vdr.cc create mode 100644 vdr.h create mode 100644 vfeed.cc create mode 100644 vfeed.h create mode 100644 video.cc create mode 100644 video.h create mode 100644 view.cc create mode 100644 view.h create mode 100644 viewman.cc create mode 100644 viewman.h create mode 100644 vinfo.cc create mode 100644 vinfo.h create mode 100644 vlivebanner.cc create mode 100644 vlivebanner.h create mode 100644 vmute.cc create mode 100644 vmute.h create mode 100644 vquestion.cc create mode 100644 vquestion.h create mode 100644 vradiolive.cc create mode 100644 vradiolive.h create mode 100644 vrecordinglist.cc create mode 100644 vrecordinglist.h create mode 100644 vrecordingmenu.cc create mode 100644 vrecordingmenu.h create mode 100644 vserverselect.cc create mode 100644 vserverselect.h create mode 100644 vvideolive.cc create mode 100644 vvideolive.h create mode 100644 vvideorec.cc create mode 100644 vvideorec.h create mode 100644 vvolume.cc create mode 100644 vvolume.h create mode 100644 vwallpaper.cc create mode 100644 vwallpaper.h create mode 100644 vwelcome.cc create mode 100644 vwelcome.h create mode 100644 wbutton.cc create mode 100644 wbutton.h create mode 100644 wjpeg.cc create mode 100644 wjpeg.h create mode 100644 wselectlist.cc create mode 100644 wselectlist.h create mode 100644 wsymbol.cc create mode 100644 wsymbol.h diff --git a/COPYING b/COPYING new file mode 100644 index 0000000..3912109 --- /dev/null +++ b/COPYING @@ -0,0 +1,340 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 51 Franklin St, 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 St, 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. diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..aae4319 --- /dev/null +++ b/Makefile @@ -0,0 +1,47 @@ +CC = /opt/crosstool/powerpc-405-linux-gnu/gcc-2.95.3-glibc-2.2.5/bin/powerpc-405-linux-gnu-g++ +STRIP = /opt/crosstool/powerpc-405-linux-gnu/gcc-2.95.3-glibc-2.2.5/bin/powerpc-405-linux-gnu-strip +CXX = $(CC) +INCLUDES = -I../jpeg-6b +CXXFLAGS = -Wall -Woverloaded-virtual -Werror $(INCLUDES) +LDFLAGS = -Wall -static + +LIBPATHS = +LIBS = -lpthread -lrt +CROSSLIBS = ../jpeg-6b/libjpeg.a + +OBJECTS = main.o command.o log.o remote.o led.o mtd.o video.o audio.o tcp.o directory.o thread.o \ + player.o demuxer.o stream.o vfeed.o afeed.o afeedr.o osd.o surface.o viewman.o vdr.o dsock.o box.o \ + list.o queue.o node.o recording.o channel.o message.o playerradio.o messagequeue.o \ + view.o vinfo.o vwallpaper.o vvolume.o vrecordinglist.o vlivebanner.o vmute.o \ + vrecordingmenu.o vquestion.o vchannellist.o vwelcome.o vvideolive.o vvideorec.o vradiolive.o \ + vchannelselect.o vserverselect.o \ + wselectlist.o wjpeg.o wsymbol.o wbutton.o \ + fonts/helvB24.o fonts/helvB18.o + +.PHONY: clean fresh all install strip + +default: vompclient +fresh: clean all +all: vompclient + +clean: + rm -f *.o deps vompclient test *~ fonts/*.o fonts/*~ + +vompclient: $(OBJECTS) + $(CC) $(LDFLAGS) $(LIBPATHS) -o vompclient $(OBJECTS) $(CROSSLIBS) $(LIBS) + +strip: + $(STRIP) vompclient + +install: + rm /diskless/nfs/mvp/vompclient + cp vompclient /diskless/nfs/mvp + +dongle: strip + cp vompclient ../dongle + cd ../dongle ; ./go + +deps: Makefile + $(CC) -MM $(INCLUDES) $(OBJECTS:%.o=%.cc) > deps + +-include deps diff --git a/afeed.cc b/afeed.cc new file mode 100644 index 0000000..bfdfe1c --- /dev/null +++ b/afeed.cc @@ -0,0 +1,92 @@ +/* + Copyright 2004-2005 Chris Tallon + + This file is part of VOMP. + + VOMP 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. + + VOMP is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with VOMP; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#include "afeed.h" + +AFeed::AFeed(Callback* tcb) +: cb(*tcb) +{ + delayTime.tv_sec = 0; + delayTime.tv_nsec = 100000000; + audioEnabled = 1; +} + +int AFeed::init(int tfd) +{ + fd = tfd; + return 1; +} + +int AFeed::shutdown() +{ + // FIXME + return 1; +} + +void AFeed::disable() +{ + audioEnabled = 0; +} + +void AFeed::enable() +{ + audioEnabled = 1; +} + +int AFeed::start() +{ + return threadStart(); +} + +void AFeed::stop() +{ + threadCancel(); +} + +void AFeed::threadMethod() +{ + Log::getInstance()->log("AFeed", Log::DEBUG, "Started"); + + int alen; + + while(1) + { + if (audioEnabled) + { + alen = Demuxer::getInstance()->writeAudio(fd); // FIXME ? + + if (alen) + { + Log::getInstance()->log("AFeed", Log::DEBUG, "Written %i", alen); + cb.call(); + } + else + { + nanosleep(&delayTime, NULL); + } + } + else + { + Demuxer::getInstance()->flushAudio(); // FIXME, no delay here now +// if (demux_get_audio(demuxHandle, buffer, 1000) != 1000) nanosleep(&delayTime, NULL); + } + } +} + diff --git a/afeed.h b/afeed.h new file mode 100644 index 0000000..b858e96 --- /dev/null +++ b/afeed.h @@ -0,0 +1,54 @@ +/* + Copyright 2004-2005 Chris Tallon + + This file is part of VOMP. + + VOMP 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. + + VOMP is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with VOMP; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#ifndef AFEED_H +#define AFEED_H + +#include +#include + +#include "log.h" +#include "thread.h" +#include "demuxer.h" +#include "callback.h" + +class AFeed : public Thread +{ + public: + AFeed(Callback* tcb); + + int init(int fd); + int shutdown(); + + int start(); + void stop(); + void enable(); + void disable(); + + private: + void threadMethod(); + int audioEnabled; + int fd; + Callback& cb; + struct timespec delayTime; + +}; + +#endif diff --git a/afeedr.cc b/afeedr.cc new file mode 100644 index 0000000..1dd8a01 --- /dev/null +++ b/afeedr.cc @@ -0,0 +1,73 @@ +/* + Copyright 2004-2005 Chris Tallon + + This file is part of VOMP. + + VOMP 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. + + VOMP is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with VOMP; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#include "afeedr.h" + +AFeedR::AFeedR(Callback* tcb, Stream* tstream) +: cb(*tcb), stream(*tstream) +{ + delayTime.tv_sec = 0; + delayTime.tv_nsec = 100000000; +} + +int AFeedR::init(int tfd) +{ + fd = tfd; + return 1; +} + +int AFeedR::shutdown() +{ + // FIXME + return 1; +} + +int AFeedR::start() +{ + return threadStart(); +} + +void AFeedR::stop() +{ + threadCancel(); +} + +void AFeedR::threadMethod() +{ + Log::getInstance()->log("AFeedR", Log::DEBUG, "Started"); + + int alen; + + while(1) + { + alen = stream.drain(fd); + + if (alen) + { + Log::getInstance()->log("AFeedR", Log::DEBUG, "Written %i", alen); + cb.call(); + } + else + { + nanosleep(&delayTime, NULL); + } + } +} + diff --git a/afeedr.h b/afeedr.h new file mode 100644 index 0000000..eb94db2 --- /dev/null +++ b/afeedr.h @@ -0,0 +1,52 @@ +/* + Copyright 2004-2005 Chris Tallon + + This file is part of VOMP. + + VOMP 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. + + VOMP is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with VOMP; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#ifndef AFEEDR_H +#define AFEEDR_H + +#include +#include + +#include "log.h" +#include "thread.h" +#include "callback.h" +#include "stream.h" + +class AFeedR : public Thread +{ + public: + AFeedR(Callback* tcb, Stream* tstream); + + int init(int fd); + int shutdown(); + + int start(); + void stop(); + + private: + void threadMethod(); + int fd; + Callback& cb; + Stream& stream; + struct timespec delayTime; + +}; + +#endif diff --git a/audio.cc b/audio.cc new file mode 100644 index 0000000..bacdc8f --- /dev/null +++ b/audio.cc @@ -0,0 +1,281 @@ +/* + Copyright 2004-2005 Chris Tallon + + This file is part of VOMP. + + VOMP 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. + + VOMP is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with VOMP; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#include "audio.h" + +Audio* Audio::instance = NULL; + +Audio::Audio() +{ + if (instance) return; + instance = this; + initted = 0; + fdAudio = 0; + streamType = 0; + volume = 20; + muted = 0; + userMute = 0; + systemMute = 0; +} + +Audio::~Audio() +{ + instance = NULL; +} + +Audio* Audio::getInstance() +{ + return instance; +} + +int Audio::init(UCHAR streamType) +{ + if (initted) return 0; + initted = 1; + +// if ((fdAudio = open("/dev/adec_mpg", O_RDWR | O_NONBLOCK)) < 0) return 0; + if ((fdAudio = open("/dev/adec_mpg", O_WRONLY)) < 0) return 0; + + this->streamType = streamType; + + if (!initAllParams()) + { + shutdown(); + return 0; + } + + unMute(); + + return 1; +} + +int Audio::initAllParams() +{ + return (setStreamType(streamType) && setChannel() && setSource()); +} + +int Audio::shutdown() +{ + if (!initted) return 0; + initted = 0; + close(fdAudio); + return 1; +} + +int Audio::getFD() +{ + if (!initted) return 0; + + return fdAudio; +} + +int Audio::write(char *buf, int len) +{ + return 0; //write(fdAudio, buf, len); +} + +int Audio::setStreamType(UCHAR type) +{ + if (!initted) return 0; + + if (ioctl(fdAudio, AV_SET_AUD_STREAMTYPE, type) != 0) return 0; + return 1; +} + +int Audio::setChannel() +{ + if (!initted) return 0; + + if (ioctl(fdAudio, AV_SET_AUD_CHANNEL, 0) != 0) return 0; + return 1; +} + +int Audio::setSource() +{ + if (!initted) return 0; + + if (ioctl(fdAudio, AV_SET_AUD_SRC, 1) != 0) return 0; + return 1; +} + +int Audio::sync() +{ + if (!initted) return 0; + + if (ioctl(fdAudio, AV_SET_AUD_SYNC, 2) != 0) return 0; + return 1; +} + +int Audio::play() +{ + if (!initted) return 0; + + if (ioctl(fdAudio, AV_SET_AUD_PLAY, 0) != 0) return 0; + return 1; +} + +int Audio::stop() +{ + if (!initted) return 0; + + if (ioctl(fdAudio, AV_SET_AUD_RESET, 0x11) != 0) return 0; + return 1; +} + +int Audio::mute() +{ + if (!initted) return 0; + + if (ioctl(fdAudio, AV_SET_AUD_MUTE, 1) != 0) return 0; + Log::getInstance()->log("Audio", Log::DEBUG, "MUTE MUTE MUTE"); + + muted = 1; + return 1; +} + +int Audio::unMute() +{ + if (!initted) return 0; + + if (ioctl(fdAudio, AV_SET_AUD_MUTE, 0) != 0) return 0; + Log::getInstance()->log("Audio", Log::DEBUG, "MUTE OFF OFF OFF"); + + muted = 0; + return 1; +} + +int Audio::pause() +{ + if (!initted) return 0; + + if (ioctl(fdAudio, AV_SET_AUD_PAUSE, 1) != 0) return 0; + return 1; +} + +int Audio::unPause() +{ + if (!initted) return 0; + + if (ioctl(fdAudio, AV_SET_AUD_UNPAUSE, 1) != 0) return 0; + return 1; +} + +int Audio::reset() +{ + if (!initted) return 0; +//test(); + if (ioctl(fdAudio, AV_SET_AUD_RESET, 0x11) != 0) return 0; + if (ioctl(fdAudio, AV_SET_AUD_PLAY, 0) != 0) return 0; + + doMuting(); + return 1; +} + +int Audio::setVolume(int volume) +{ + // parameter: 0 for silence, 20 for full + + if ((volume < 0) || (volume > 20)) return 0; + + volume = 2 * (20 - volume); + + unsigned long vol = (volume << 24) | (volume << 16); + + Log::getInstance()->log("Audio", Log::DEBUG, "%lx", vol); + Log::getInstance()->log("Audio", Log::DEBUG, "%i", volume); + + if (ioctl(fdAudio, AV_SET_AUD_VOLUME, &vol) != 0) return 0; + return 1; +} + +int Audio::test() +{ + ULLONG stc = 0; + return ioctl(fdAudio, AV_SET_AUD_STC, &stc); +} + +int Audio::volumeUp() +{ + if (!initted) return 0; + if (volume == 20) return volume; + volume++; + setVolume(volume); + return volume; +} + +int Audio::volumeDown() +{ + if (!initted) return 0; + if (volume == 0) return 0; + volume--; + setVolume(volume); + return volume; +} + +int Audio::getVolume() +{ + if (!initted) return 0; + return volume; +} + +int Audio::toggleUserMute() +{ + if (!initted) return 0; + + if (userMute) + { + userMute = 0; + } + else + { + userMute = 1; + } + + doMuting(); + + return userMute; +} + +int Audio::systemMuteOn() +{ + systemMute = 1; + return doMuting(); +} + +int Audio::systemMuteOff() +{ + systemMute = 0; + return doMuting(); +} + +int Audio::doMuting() +{ + Log::getInstance()->log("Audio", Log::DEBUG, "doMuting: user=%i sys=%i", userMute, systemMute); + + + if (userMute || systemMute) + { + return mute(); + } + else + { + return unMute(); + } +} diff --git a/audio.h b/audio.h new file mode 100644 index 0000000..190513e --- /dev/null +++ b/audio.h @@ -0,0 +1,89 @@ +/* + Copyright 2004-2005 Chris Tallon + + This file is part of VOMP. + + VOMP 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. + + VOMP is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with VOMP; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +// Thanks to Jon Gettler and BtB for all the ioctl information + +#ifndef AUDIO_H +#define AUDIO_H + +#include +#include +#include +#include + +#include "defines.h" +#include "log.h" +#include "stb.h" + +class Audio +{ + public: + Audio(); + ~Audio(); + static Audio* getInstance(); + + int init(UCHAR streamType); + int shutdown(); + + // Audio stream type + const static UCHAR MPEG2_PES = 2; + const static UCHAR MPEG1_PES = 3; // unused + + int setStreamType(UCHAR streamType); + int setChannel(); + int setSource(); + int sync(); + int play(); + int stop(); + int pause(); + int unPause(); + int reset(); + int setVolume(int volume); + int volumeUp(); + int volumeDown(); + int getVolume(); + int toggleUserMute(); + int systemMuteOn(); + int systemMuteOff(); + int test(); + + int write(char *buf, int len); + + int getFD(); + + int doMuting(); + private: + static Audio* instance; + int initted; + int volume; + UCHAR muted; + UCHAR userMute; + UCHAR systemMute; + + int mute(); + int unMute(); + int initAllParams(); + + UCHAR streamType; + + int fdAudio; +}; + +#endif diff --git a/bogl.h b/bogl.h new file mode 100644 index 0000000..be7a623 --- /dev/null +++ b/bogl.h @@ -0,0 +1,17 @@ +#ifndef BOGL_H +#define BOGL_H + +/* + * This header file is here for font .c files that are created with the + * bdftobogl utility that comes with bogl. + */ + +typedef struct bogl_font { + char *name; /* Font name. */ + int height; /* Height in pixels. */ + unsigned long *content; /* 32-bit right-padded bitmap array. */ + short *offset; /* 256 offsets into content. */ + unsigned char *width; /* 256 character widths. */ +} osd_font_t; + +#endif /* BOGL_H */ diff --git a/box.cc b/box.cc new file mode 100644 index 0000000..b15980b --- /dev/null +++ b/box.cc @@ -0,0 +1,192 @@ +/* + Copyright 2004-2005 Chris Tallon + + This file is part of VOMP. + + VOMP 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. + + VOMP is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with VOMP; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#include "box.h" + +char Box::numBoxes = 0; + +Box::Box() +{ + height = 0; + width = 0; + screenX = 0; + screenY = 0; + + numBoxes++; + Log::getInstance()->log("Box", Log::DEBUG, "Construct, now %u", numBoxes); + + surface = Surface::getObject(Surface::BUFFER); +} + +Box::~Box() +{ + numBoxes--; + Log::getInstance()->log("Box", Log::DEBUG, "Destruct, now %u", numBoxes); +} + +void Box::draw() +{ +} + +void Box::setDimensions(int h, int w) +{ + height = h; + width = w; +} + +void Box::setScreenPos(int x, int y) +{ + screenX = x; + screenY = y; +} + +void Box::show() +{ + Log::getInstance()->log("Box", Log::DEBUG, "Show data %u %u %u %u", screenX, screenY, width, height); + surface->updateToScreen(screenX, screenY, width, height); +} + +void Box::showAll() +{ + Surface::bufferToScreen(); +} + +int Box::getScreenX() +{ + return screenX; +} + +int Box::getScreenY() +{ + return screenY; +} + +int Box::getWidth() +{ + return width; +} + +int Box::getHeight() +{ + return height; +} + +// Level 1 drawing functions + +void Box::fillColour(int r, int g, int b, int a) +{ + rectangle(0, 0, width, height, r, g, b, a); +} + +void Box::drawPara(char* text, int x, int y, int r, int g, int b) +{ + char line[256]; + int lineHeight = surface->getFontHeight() + 6; + + int lineWidth; + int thisCharWidth; + int textPos; + int linePos; + int ypos; + int printLine; + + textPos = 0; + ypos = y; + + while(1) + { + linePos = 0; + lineWidth = 0; + while(1) + { + printLine = 0; + + if (text[textPos] == '\0') break; + + if (text[textPos] == '\n') + { + textPos++; // ignore the \n + printLine = 1; + break; + } + + thisCharWidth = surface->getCharWidth(text[textPos]); + if ((lineWidth + thisCharWidth) > (width - (2 * paraMargin))) + { + // this character would break the right margin + if (text[textPos] == ' ') + { + // this char is a space, ignore and break + textPos++; + break; + } + else + { + // Need to go back to the last space in the line + while ((text[textPos] != ' ') && (linePos >= 0)) + { + textPos--; + linePos--; + } + // Now take the space we just found + textPos++; + break; + } + } + line[linePos++] = text[textPos]; + lineWidth += thisCharWidth; + textPos++; + } + + line[linePos++] = '\0'; + if (printLine || (linePos > 1)) // if some text was put in line + { + drawText(line, x, ypos, r, g, b); + ypos += lineHeight; + if (ypos > (height - lineHeight)) break; + } + else + { + break; + } + } +} + +// Level 0 drawing functions + +void Box::rectangle(int x1, int y1, int width, int height, int r, int g, int b, int a) +{ + surface->fillblt(screenX + x1, screenY + y1, width, height, surface->rgba(r, g, b, a)); +} + +void Box::drawText(char* text, int x, int y, int r, int g, int b) +{ + surface->drawText(text, screenX + x, screenY + y, r, g, b); +} + +void Box::drawTextRJ(char* text, int x, int y, int r, int g, int b) +{ + surface->drawTextRJ(text, screenX + x, screenY + y, r, g, b); +} + +void Box::drawPixel(int x, int y, int c) +{ + surface->drawPixel(screenX + x, screenY + y, c); +} diff --git a/box.h b/box.h new file mode 100644 index 0000000..ee80e49 --- /dev/null +++ b/box.h @@ -0,0 +1,75 @@ +/* + Copyright 2004-2005 Chris Tallon + + This file is part of VOMP. + + VOMP 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. + + VOMP is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with VOMP; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#ifndef BOX_H +#define BOX_H + +#include + +#include "log.h" +#include "surface.h" + +// Abstract ??????? +class Box +{ + public: + Box(); + virtual ~Box(); + + void setScreenPos(int x, int y); + void setDimensions(int h, int w); + void show(); + + virtual void draw(); + + // Drawing functions level 1 + void fillColour(int r, int g, int b, int a); + void drawPara(char* text, int x, int y, int r, int g, int b); + + // Drawing functions level 0 + void rectangle(int x1, int y1, int x2, int y2, int r, int g, int b, int a); + void drawText(char* text, int x, int y, int r, int g, int b); + void drawTextRJ(char* text, int x, int y, int r, int g, int b); + void drawPixel(int x, int y, int c); + + int getScreenX(); + int getScreenY(); + int getWidth(); + int getHeight(); + + static void showAll(); + + private: + + protected: + Surface* surface; + int width; + int height; + + int screenX; + int screenY; + + static char numBoxes; + + static const int paraMargin = 10; + +}; + +#endif diff --git a/callback.h b/callback.h new file mode 100644 index 0000000..3fbc2e0 --- /dev/null +++ b/callback.h @@ -0,0 +1,30 @@ +/* + Copyright 2004-2005 Chris Tallon + + This file is part of VOMP. + + VOMP 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. + + VOMP is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with VOMP; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#ifndef CALLBACK_H +#define CALLBACK_H + +class Callback +{ + public: + virtual void call()=0; +}; + +#endif diff --git a/channel.cc b/channel.cc new file mode 100644 index 0000000..cc01b23 --- /dev/null +++ b/channel.cc @@ -0,0 +1,36 @@ +/* + Copyright 2004-2005 Chris Tallon + + This file is part of VOMP. + + VOMP 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. + + VOMP is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with VOMP; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#include "channel.h" + +Channel::Channel() +{ + number = 0; + type = 0; + name = NULL; + + index = -1; +} + +Channel::~Channel() +{ + if (name) delete[] name; + index = -1; // just in case +} diff --git a/channel.h b/channel.h new file mode 100644 index 0000000..e17bdd3 --- /dev/null +++ b/channel.h @@ -0,0 +1,41 @@ +/* + Copyright 2004-2005 Chris Tallon + + This file is part of VOMP. + + VOMP 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. + + VOMP is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with VOMP; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#ifndef CHANNEL_H +#define CHANNEL_H + +#include + +#include "defines.h" + +class Channel +{ + public: + Channel(); + ~Channel(); + + ULONG number; + ULONG type; + char* name; + + int index; +}; + +#endif diff --git a/command.cc b/command.cc new file mode 100644 index 0000000..f438d88 --- /dev/null +++ b/command.cc @@ -0,0 +1,393 @@ +/* + Copyright 2004-2005 Chris Tallon + + This file is part of VOMP. + + VOMP 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. + + VOMP is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with VOMP; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#include "command.h" + +Command* Command::instance = NULL; + +Command::Command() +{ + if (instance) return; + instance = this; + initted = 0; + state = 0; +} + +Command::~Command() +{ + instance = NULL; +} + +Command* Command::getInstance() +{ + return instance; +} + +int Command::init() +{ + if (initted) return 0; + initted = 1; + + logger = Log::getInstance(); + viewman = ViewMan::getInstance(); + remote = Remote::getInstance(); + + if (!logger || !viewman || !remote) + { + initted = 0; + return 0; + } + + return 1; +} + +int Command::shutdown() +{ + if (!initted) return 0; + initted = 0; + return 1; +} + +void Command::stop() +{ + VDR::getInstance()->cancelFindingServer(); + irun = 0; +} + +void Command::run() +{ + if (!initted) return; + irun = 1; + + mainPid = getpid(); + + // moved from startup because surface delete doesn't work + + // just in case + Video::getInstance()->signalOn(); + Led::getInstance()->on(); + + // Blue background + View* v = new View(); + v->setDimensions(SCREENHEIGHT, SCREENWIDTH); + v->setBackgroundColour(0, 0, 150, 255); + v->draw(); + v->show(); + viewman->add(v); + viewman->removeView(v); + + // Wallpaper + VWallpaper* w = new VWallpaper(); + w->init("/wallpaper.jpg"); + w->draw(); + w->show(); + viewman->add(w); + + +// handleCommand(Remote::TWO); +// handleCommand(Remote::UP); +// handleCommand(Remote::PLAY); + +// handleCommand(Remote::DOWN); +// handleCommand(Remote::OK); + +// handleCommand(Remote::DOWN); +// handleCommand(Remote::DOWN); +// handleCommand(Remote::DOWN); +// handleCommand(Remote::OK); + + // state values: + // 0 = not connected + // 1 = got servers + // 2 = multiple servers, showing select box + // 3 = a server has been selected + // 4 = connected + // 5 = standby + + int selectServer; + UCHAR button = 0; + while(irun) + { + if (state != 4) // not really necessary, but chops out all the connecting rubbish if already connected + { + if (state == 0) + { + clearServerIPs(); + broadcastForServers(); + if (!irun) break; + state = 1; + } + + if (state == 1) + { + if (serverIPs.size() == 1) + { + selectServer = 0; + state = 3; + } + else + { + selectServer = -1; + state = 2; + VServerSelect* vs = new VServerSelect(&serverIPs, &selectServer); + vs->draw(); + vs->show(); + viewman->add(vs); + } + } + + if (state == 2) + { + // entering loop for 2nd time.. has a server been selected? + if (selectServer != -1) state = 3; + } + + if (state == 3) + { + Log::getInstance()->log("Command", Log::DEBUG, "Server selected: %i", selectServer); + + int success = connectToServer(selectServer); + clearServerIPs(); + + if (success) + { + VWelcome* vw = new VWelcome(); + vw->draw(); + vw->show(); + viewman->add(vw); + state = 4; + } + else + { + state = 0; + } + } + + if (state == 0) continue; + // state can't be 1 + // if state == 2 then drop to remote handling below + // state can't be 3 + // if state == 4 then drop through to main system, job done + } + + + button = remote->getButtonPress(2); // FIXME why is this set to 2 and not 0? so it can quit + if ((button == Remote::NONE) || (button == Remote::UNKNOWN)) continue; + + if (button != Remote::SIGNAL) handleCommand(button); + processMessageQueue(); + } +} + +void Command::postMessage(Message* m) +{ + MessageQueue::postMessage(m); + kill(mainPid, SIGURG); +} + +void Command::processMessage(Message* m) +{ + Log::getInstance()->log("Command", Log::DEBUG, "processing message %i", m->message); + + switch(m->message) + { + case Message::STANDBY: + { + doStandby(); + break; + } + case Message::STOP_PLAYBACK: + { + handleCommand(Remote::STOP); // an odd way of doing it, but so simple + break; + } + } +} + +void Command::clearServerIPs() +{ + // Clear the serverIPs vector + for(UINT k = 0; k < serverIPs.size(); k++) + { + delete[] serverIPs[k]; + } + serverIPs.clear(); +} + +void Command::handleCommand(int button) +{ + if (state == 5 && (button != Remote::POWER)) return; + + if (viewman->handleCommand(button)) return; + + // command was not handled + + switch(button) + { + case Remote::LEFT: + case Remote::RIGHT: + { + VVolume* v = new VVolume(); + v->handleCommand(button); // this will draw+show + viewman->add(v); + viewman->timedDelete(v, 2, 1); + return; + } + case Remote::MUTE: + { + VMute* v = new VMute(); + v->draw(); + v->show(); + viewman->add(v); + viewman->timedDelete(v, 2, 1); + return; + } + case Remote::POWER: + { + doStandby(); + return; + } + case Remote::RECORD: + { + Osd::getInstance()->screenShot("/out.jpg"); + return; + } + } +} + +void Command::broadcastForServers() +{ + VInfo* viewWait = new VInfo(); + viewWait->setDimensions(200, 400); + viewWait->setScreenPos(170, 200); + viewWait->setMainText("\n Locating server"); + viewWait->draw(); + viewWait->show(); + viewman->add(viewWait); + + + VDR* vdr = VDR::getInstance(); + vdr->findServers(serverIPs); + if (!irun) return; + viewman->removeView(viewWait); +} + +int Command::connectToServer(int vectorIndex) +{ + char a[60]; + struct timespec ts; + + VDR* vdr = VDR::getInstance(); + vdr->setServerIP(serverIPs[vectorIndex]); + + logger->log("Command", Log::NOTICE, "Connecting to server at %s", serverIPs[vectorIndex]); + + VInfo* viewWait = new VInfo(); + viewWait->setDimensions(200, 400); + viewWait->setScreenPos(170, 200); + viewWait->setMainText("\n Connecting to VDR"); + viewWait->draw(); + viewWait->show(); + viewman->add(viewWait); + + int success = vdr->connect(); + + if (success) + { + Log::getInstance()->log("Command", Log::DEBUG, "Connected ok, doing login"); + success = vdr->doLogin(); + + if (success) + { + strcpy(a, "\n Connected"); + ts.tv_sec = 0; + ts.tv_nsec = 500000000; + } + else + { + strcpy(a, "\n Login failed"); + ts.tv_sec = 3; + ts.tv_nsec = 0; + } + } + else + { + strcpy(a, "\n Connection failed"); + ts.tv_sec = 3; + ts.tv_nsec = 0; + } + + viewWait->setMainText(a); + viewWait->draw(); + viewWait->show(); + + if (irun) nanosleep(&ts, NULL); // only do the wait if we aren't shutting down + +/* + vdr->configSave("Section Name This Is blah blah blah 495834509725049375032end", "thekey with this space ", "1234value"); + sleep(10); + + char* conf = vdr->configLoad("fred", "bill"); + if (conf) + { + //printf("And the config value returned is %s\n", conf); + delete[] conf; + } + else + { + //printf("Conf value return is NULL :(\n"); + } +*/ + + viewman->removeView(viewWait); + + return success; +} + +void Command::doStandby() +{ + if (state == 5) + { + Video::getInstance()->signalOn(); + Led::getInstance()->on(); + state = 0; + } + else + { + ViewMan* viewman = ViewMan::getInstance(); + + viewman->removeAll(); + viewman->redrawAll(); + + + VDR::getInstance()->disconnect(); + Video::getInstance()->signalOff(); + Led::getInstance()->off(); + state = 5; + } +} + +void Command::doReboot() +{ + VDR::getInstance()->disconnect(); + // just kill it... + logger->log("Command", Log::NOTICE, "Reboot"); + reboot(LINUX_REBOOT_CMD_RESTART); +} diff --git a/command.h b/command.h new file mode 100644 index 0000000..6cef15a --- /dev/null +++ b/command.h @@ -0,0 +1,88 @@ +/* + Copyright 2004-2005 Chris Tallon + + This file is part of VOMP. + + VOMP 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. + + VOMP is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with VOMP; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#ifndef COMMAND_H +#define COMMAND_H + +#include // for reboot +#include +#include + +#include +#include + +#include + +#include "defines.h" +#include "log.h" +#include "viewman.h" +#include "led.h" +#include "video.h" +#include "remote.h" +#include "vdr.h" +#include "list.h" +#include "message.h" +#include "messagequeue.h" +#include "box.h" +#include "view.h" +#include "vinfo.h" +#include "vwallpaper.h" +#include "vvolume.h" +#include "vserverselect.h" +#include "vwelcome.h" +#include "vmute.h" + +class Command : public MessageQueue +{ + public: + Command(); + ~Command(); + static Command* getInstance(); + + int init(); + int shutdown(); + void run(); + void stop(); + void doReboot(); + void postMessage(Message* m); // override of MessageQueue::postMessage + + private: + void handleCommand(int); + void broadcastForServers(); + int connectToServer(int vectorIndex); + void doStandby(); + void clearServerIPs(); + + static Command* instance; + pid_t mainPid; + UCHAR initted; + UCHAR irun; + UCHAR state; + + std::vector serverIPs; + + Log* logger; + ViewMan* viewman; + Remote* remote; + + void processMessage(Message* m); +}; + +#endif diff --git a/defines.h b/defines.h new file mode 100644 index 0000000..8b3a337 --- /dev/null +++ b/defines.h @@ -0,0 +1,36 @@ +/* + Copyright 2004-2005 Chris Tallon + + This file is part of VOMP. + + VOMP 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. + + VOMP is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with VOMP; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#ifndef DEFINES_H +#define DEFINES_H + +typedef unsigned char UCHAR; +typedef unsigned short USHORT; +typedef unsigned int UINT; +typedef unsigned long ULONG; +typedef unsigned long long ULLONG; + +#define SCREENWIDTH 720 +#define SCREENHEIGHT 576 + +ULLONG htonll(ULLONG a); +ULLONG ntohll(ULLONG a); + +#endif diff --git a/demuxer.cc b/demuxer.cc new file mode 100644 index 0000000..b166173 --- /dev/null +++ b/demuxer.cc @@ -0,0 +1,480 @@ +/* + Copyright 2005 Mark Calderbank + + This file is part of VOMP. + + VOMP 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. + + VOMP is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with VOMP; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#include "demuxer.h" + +const int Demuxer::FrameRates[9] = { 0, 23, 24, 25, 29, 30, 50, 59, 60 }; + +Demuxer* Demuxer::instance = NULL; + +Demuxer::Demuxer() +{ + if (instance) return; + instance = this; + initted = 0; +} + +Demuxer::~Demuxer() +{ + shutdown(); + instance = NULL; +} + +Demuxer* Demuxer::getInstance() +{ + return instance; +} + +int Demuxer::init() +{ + if (!initted) + { + if ( videostream.init(demuxMemory) || + audiostream.init(demuxMemory) || + !(local_frame = (UCHAR *) malloc(0x10000))) + { + printf("failed to initialize demuxer\n"); + shutdown(); + return 1; + } + } + + reset(); + initted = 1; + return 0; +} + +void Demuxer::reset() +{ + flush(); + video_current = audio_current = -1; + horizontal_size = vertical_size = 0; + aspect_ratio = (enum AspectRatio) 0; + frame_rate = bit_rate = 0; +} + +int Demuxer::shutdown() +{ + videostream.shutdown(); + audiostream.shutdown(); + free(local_frame); + initted = 0; + return 1; +} + +void Demuxer::flush() +{ + videostream.flush(); + audiostream.flush(); + state_frametype = state_framepos = 0; + seek(); +} + +void Demuxer::flushAudio() +{ + audiostream.flush(); +} + +void Demuxer::seek() +{ + seeking = 1; +} + +void Demuxer::setAudioStream(int id) +{ + audio_current = id; +} + +void Demuxer::setVideoStream(int id) +{ + video_current = id; +} + +int Demuxer::scan(UCHAR *buf, int len) +{ + // Temporarily, just look for the lowest audio stream and return it + int ret = 0; + UCHAR byte; + int zeros = 0; + while (len > 1) + { + // We are searching for a string of bytes (0,0,1). + byte = *(buf++); --len; + + if (byte == 0) + { + ++zeros; continue; + } + if (zeros < 2 || byte != 1) + { + zeros = 0; continue; + } + zeros = 0; + // We have found the pattern (0,0,1). + // Check the next byte for the sub-frame type. + byte = *(buf++); --len; + if (byte >= 0xc0 && byte <= 0xdf) // Audio + if (ret == 0 || ret > byte) ret = byte; + } + return ret; +} + +int Demuxer::put(UCHAR* buf, int len) +{ + int ret = 0; // return number of bytes consumed + int parsed = 0; // number of bytes parsed by sub-function + int full; // sub-function sets this to tell us to exit early + inbuf = buf; // Initialize buffer pointer + + while (len) + { + full = 0; + switch (state_frametype) + { + case 0: // Search for frame + parsed = parse_find_frame(len); + break; + case FRAMETYPE_VID0 ... FRAMETYPE_VIDMAX: + parsed = parse_video_frame(len, &full); + break; + case FRAMETYPE_AUD0 ... FRAMETYPE_AUDMAX: + parsed = parse_audio_frame(len, &full); + break; + } + ret += parsed; len -= parsed; + if (full) // We have to exit early. + break; // out of while loop + } + Log::getInstance()->log( + "Demuxer", Log::DEBUG, "Put %d; took %d", ret + len, ret); + return ret; +} + +int Demuxer::parse_find_frame(int len) +{ + int ret = 0; // return number of bytes parsed + UCHAR byte; + + // In this function, state_framepos represents + // the number of fixed header bytes found so far. + if (state_framepos > 3 || state_framepos < 0) + { + // ERROR! + state_framepos = 0; + } + + while (len) + { + byte = *inbuf++; + ++ret; --len; + switch (state_framepos) + { + case 0: + case 1: + if (byte == 0) + ++state_framepos; + else + state_framepos = 0; + break; + case 2: + if (byte == 1) + ++state_framepos; + else if (byte != 0) + state_framepos = 0; + break; + default: + state_framepos = 0; // Set initial state for the new frame + switch (byte) + { + case 0: + state_framepos = 1; // Count this as a first header byte! + break; + case FRAMETYPE_VID0 ... FRAMETYPE_VIDMAX: + case FRAMETYPE_AUD0 ... FRAMETYPE_AUDMAX: + state_frametype = byte; + return ret; + } + // Not a recognised frame type. Go back to Old Kent Road. + break; + } + } + return ret; +} + +int Demuxer::parse_video_frame(int len, int* full) +{ + int ret = 0; // return number of bytes consumed + int stream_sent, bytes_remaining; + + switch(state_framepos) + { + case 0: // Brand new video frame. Set initial states. + state_stream_fill = 0; state_vid_parsed = 0; + // Create a local copy of the frame header + local_frame[0] = local_frame[1] = 0; local_frame[2] = 1; + local_frame[3] = state_frametype; + // If no video stream has been set, use this one. + if (video_current == -1) video_current = state_frametype; + // Get MSB of frame length and copy to local frame. + frame_length = *inbuf << 8; + local_frame[4] = *inbuf; + ++inbuf; ++state_framepos; ++ret; --len; + if (len == 0) return ret; + // FALL THROUGH TO NEXT BYTE IN STREAM + case 1: // Get LSB of frame length and copy to local frame. + frame_length += *inbuf; + local_frame[5] = *inbuf; + ++inbuf; ++state_framepos; ++ret; --len; + if (len == 0) return ret; + // FALL THROUGH TO NEXT BYTE IN STREAM + case 2: // First data byte + if (len >= frame_length // If we have the entire frame + && !state_vid_parsed) // and haven't parsed it yet + { + if (video_current == state_frametype) // and we're interested + parse_video_details(inbuf, frame_length); // then parse it + state_vid_parsed = 1; + } + } + // We are in the frame data + bytes_remaining = 2 + frame_length - state_framepos; + if (video_current != state_frametype) + { + // We don't want this frame. Throw it away. + if (len >= bytes_remaining) + { + inbuf += bytes_remaining; + ret += bytes_remaining; + state_frametype = state_framepos = 0; + return ret; + } + else + { + inbuf += len; ret += len; + state_framepos += len; + return ret; + } + } // No fall through here + + if (state_vid_parsed) + { + // We have already parsed the whole frame + if (seeking) // Still not found a sync point. Throw this frame away. + { + if (len >= bytes_remaining) + { + inbuf += bytes_remaining; + ret += bytes_remaining; + state_frametype = state_framepos = 0; + return ret; + } + else + { + inbuf += len; ret += len; return ret; + } + } // No fall through is allowed here + // Send frame header to stream + if (state_stream_fill < 6) + { + state_stream_fill += videostream.put(local_frame, + 6 - state_stream_fill); + if (state_stream_fill < 6) // stream is full! + { + *full = 1; return ret; + } + } + // Send all frame data we have to stream + if (len >= bytes_remaining) len = bytes_remaining; + stream_sent = videostream.put(inbuf, len); + inbuf += stream_sent; ret += stream_sent; + state_framepos += stream_sent; + state_stream_fill += stream_sent; + if (stream_sent != len) // stream is full! + { + *full = 1; return ret; + } + if (state_framepos == frame_length + 2) // frame done + { + state_frametype = state_framepos = 0; + } + return ret; + } // No fall through is allowed here + + // We haven't parsed the frame yet. It's arriving in pieces. + if (bytes_remaining) // There is data yet to copy to local_frame + { + if (len >= bytes_remaining) len = bytes_remaining; + memcpy(local_frame + state_framepos + 4, inbuf, len); + inbuf += len; ret += len; state_framepos += len; + if (len < bytes_remaining) // Not all arrived yet + return ret; + parse_video_details(local_frame+6, frame_length); + if (seeking) // Still not found a sync point. Ignore this frame. + return ret; + } + // We have the whole frame in local_frame. Send it to the stream. + state_stream_fill += videostream.put(local_frame, + 6 + frame_length - state_stream_fill); + if (state_stream_fill < frame_length + 6) // stream is full! + { + *full = 1; return ret; + } + state_frametype = state_framepos = 0; + return ret; +} + +int Demuxer::parse_audio_frame(int len, int* full) +{ + int ret = 0; // return number of bytes consumed + int stream_sent, bytes_remaining; + + switch(state_framepos) + { + case 0: // Brand new audio frame. Set initial states. + state_stream_fill = 0; + // Create a local copy of the frame header + local_frame[0] = local_frame[1] = 0; local_frame[2] = 1; + local_frame[3] = state_frametype; + // If no audio stream has been set, use this one. + if (audio_current == -1) audio_current = state_frametype; + // Get MSB of frame length and copy to local frame. + frame_length = *inbuf << 8; + local_frame[4] = *inbuf; + ++inbuf; ++state_framepos; ++ret; --len; + if (len == 0) return ret; + // FALL THROUGH TO NEXT BYTE IN STREAM + case 1: // Get LSB of frame length and copy to local frame. + frame_length += *inbuf; + local_frame[5] = *inbuf; + ++inbuf; ++state_framepos; ++ret; --len; + if (len == 0) return ret; + } + // We are in the frame data + bytes_remaining = 2 + frame_length - state_framepos; + if (audio_current != state_frametype) + { + // We don't want this frame. Throw it away. + if (len >= bytes_remaining) + { + inbuf += bytes_remaining; + ret += bytes_remaining; + state_frametype = state_framepos = 0; + return ret; + } + else + { + inbuf += len; ret += len; + state_framepos += len; + return ret; + } + } // No fall through is allowed here + + // Send frame header to stream + if (state_stream_fill < 6) + { + state_stream_fill += audiostream.put(local_frame, + 6 - state_stream_fill); + if (state_stream_fill < 6) // stream is full! + { + *full = 1; return ret; + } + } + // Send all frame data we have to stream + if (len >= bytes_remaining) len = bytes_remaining; + stream_sent = audiostream.put(inbuf, len); + inbuf += stream_sent; ret += stream_sent; + state_framepos += stream_sent; + state_stream_fill += stream_sent; + if (stream_sent != len) // stream is full! + { + *full = 1; return ret; + } + if (state_framepos == frame_length + 2) // frame done + { + state_frametype = state_framepos = 0; + } + return ret; +} + +void Demuxer::parse_video_details(UCHAR* buf, int len) +{ + UCHAR byte; + int zeros = 0; + while (len >= 8) // 8 is length of a GOP header + { + // We are searching for a string of bytes (0,0,1). + byte = *(buf++); --len; + + if (byte == 0) + { + ++zeros; continue; + } + if (zeros < 2 || byte != 1) + { + zeros = 0; continue; + } + zeros = 0; + // We have found the pattern (0,0,1). + // Check the next byte for the sub-frame type. + byte = *(buf++); --len; + switch (byte) + { + case 0x00: // Picture header + // 10 bits: temporal reference + // 3 bits: coding type (I/P/B) + // ... + if (len < 2) return; + if ( (buf[1] & 0x38) == 0x08 ) // I-frame + seeking = 0; + buf += 4; // Minimum length of picture header + len -= 4; + break; + case 0xb3: // Sequence header + // 12 bits: Horizontal size + // 12 bits: Vertical size + // 4 bits: Aspect ratio + // 4 bits: Frame rate code + // 18 bits: Bit rate value + // ... + if (len < 7) return; + horizontal_size = ((int)buf[0] << 4) | ((int)buf[1] >> 4); + vertical_size = (((int)buf[1] & 0xf) << 8) | (int)buf[2]; + aspect_ratio = (enum AspectRatio)(buf[3] >> 4); + frame_rate = buf[3] & 0x0f; + if (frame_rate >= 1 && frame_rate <= 8) + frame_rate = FrameRates[frame_rate]; + else + frame_rate = 0; + bit_rate = ((int)buf[4] << 10) | + ((int)buf[5] << 2) | + ((int)buf[6] >> 6); + seeking = 0; + buf += 8; // Minimum length of sequence header + len -= 8; + break; + case 0xb8: // Group header + // We're not going to bother parsing anything. + seeking = 0; + buf += 4; // Minimum length of group header + len -= 4; + break; + } + } +} diff --git a/demuxer.h b/demuxer.h new file mode 100644 index 0000000..2193c8e --- /dev/null +++ b/demuxer.h @@ -0,0 +1,147 @@ +/* + Copyright 2005 Mark Calderbank + + This file is part of VOMP. + + VOMP 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. + + VOMP is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with VOMP; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +/* + +Thanks goes to Jon Gettler of the MVPMC project and Stephen Rice for +the demuxer in mvpmc. It was used in the creation of this Demuxer, +however, no code was copied verbatim. + +*/ + + +#ifndef DEMUXER_H +#define DEMUXER_H + +#include +#include +#include "stream.h" +#include "log.h" +#include "defines.h" + +class Demuxer +{ + public: + Demuxer(); + ~Demuxer(); + static Demuxer* getInstance(); + int init(); + void reset(); + void flush(); + void flushAudio(); + void seek(); + void setVideoStream(int id); + void setAudioStream(int id); + int writeAudio(int fd) { return audiostream.drain(fd); } + int writeVideo(int fd) { return videostream.drain(fd); } + int scan(UCHAR* buf, int len); + int put(UCHAR* buf, int len); + + private: + static Demuxer* instance; + Stream videostream; + Stream audiostream; + int shutdown(); + int initted; + int seeking; + UCHAR* inbuf; + + int video_current, audio_current; + int state_frametype, state_framepos; + int state_stream_fill, state_vid_parsed; + int frame_length; + int parse_find_frame(int len); + int parse_video_frame(int len, int* full); + int parse_audio_frame(int len, int* full); + void parse_video_details(UCHAR* buf, int len); + + UCHAR* local_frame; + static const int demuxMemory = 2097152; + static const int Demuxer::FrameRates[9]; + + enum FRAMETYPE + { + FRAMETYPE_AUD0 = 0xc0, + FRAMETYPE_AUD1, + FRAMETYPE_AUD2, + FRAMETYPE_AUD3, + FRAMETYPE_AUD4, + FRAMETYPE_AUD5, + FRAMETYPE_AUD6, + FRAMETYPE_AUD7, + FRAMETYPE_AUD8, + FRAMETYPE_AUD9, + FRAMETYPE_AUD10, + FRAMETYPE_AUD11, + FRAMETYPE_AUD12, + FRAMETYPE_AUD13, + FRAMETYPE_AUD14, + FRAMETYPE_AUD15, + FRAMETYPE_AUD16, + FRAMETYPE_AUD17, + FRAMETYPE_AUD18, + FRAMETYPE_AUD19, + FRAMETYPE_AUD20, + FRAMETYPE_AUD21, + FRAMETYPE_AUD22, + FRAMETYPE_AUD23, + FRAMETYPE_AUD24, + FRAMETYPE_AUD25, + FRAMETYPE_AUD26, + FRAMETYPE_AUD27, + FRAMETYPE_AUD28, + FRAMETYPE_AUD29, + FRAMETYPE_AUD30, + FRAMETYPE_AUD31, + FRAMETYPE_AUDMAX = FRAMETYPE_AUD31, + + FRAMETYPE_VID0 = 0xe0, + FRAMETYPE_VID1, + FRAMETYPE_VID2, + FRAMETYPE_VID3, + FRAMETYPE_VID4, + FRAMETYPE_VID5, + FRAMETYPE_VID6, + FRAMETYPE_VID7, + FRAMETYPE_VID8, + FRAMETYPE_VID9, + FRAMETYPE_VID10, + FRAMETYPE_VID11, + FRAMETYPE_VID12, + FRAMETYPE_VID13, + FRAMETYPE_VID14, + FRAMETYPE_VID15, + FRAMETYPE_VIDMAX = FRAMETYPE_VID15 + }; + + enum AspectRatio + { + ASPECT_4_3 = 2, + ASPECT_16_9 = 3 + }; + + int horizontal_size; + int vertical_size; + enum AspectRatio aspect_ratio; + int frame_rate; + int bit_rate; +}; + +#endif diff --git a/directory.cc b/directory.cc new file mode 100644 index 0000000..b73b982 --- /dev/null +++ b/directory.cc @@ -0,0 +1,86 @@ +/* + Copyright 2004-2005 Chris Tallon + + This file is part of VOMP. + + VOMP 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. + + VOMP is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with VOMP; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#include "directory.h" + +ULONG Directory::totalSpace = 0; +ULONG Directory::freeSpace = 0; +ULONG Directory::usedPercent = 0; + +Directory::Directory() +{ + name = NULL; + dirList = new List(); + recList = new List(); + + isRoot = 0; + index = -1; +} + +Directory::~Directory() +{ + if (name) delete[] name; + index = -1; // just in case + + if (dirList) + { + while (!dirList->isEmpty()) + { + dirList->reset(); + delete (Directory*)dirList->remove(); + } + + delete dirList; + } + + if (recList) + { + while (!recList->isEmpty()) + { + recList->reset(); + delete (Recording*)recList->remove(); + } + + delete recList; + } +} + +void Directory::setName(char* newName) +{ + name = new char[strlen(newName) + 1]; + strcpy(name, newName); +} + +Directory* Directory::getDirByName(char* dirName) +{ + Directory* currentDir; + for(dirList->reset(); (currentDir = (Directory*)dirList->getCurrent()); dirList->next()) + { + if (!strcmp(dirName, currentDir->name)) return currentDir; + } + return NULL; +} + +ULONG Directory::getNumRecordings() +{ + return recList->getNumElements(); +} + +// FIXME make an add function in here that adds recs to the end of the list diff --git a/directory.h b/directory.h new file mode 100644 index 0000000..f9d0d3c --- /dev/null +++ b/directory.h @@ -0,0 +1,55 @@ +/* + Copyright 2004-2005 Chris Tallon + + This file is part of VOMP. + + VOMP 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. + + VOMP is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with VOMP; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#ifndef DIRECTORY_H +#define DIRECTORY_H + +#include + +#include "defines.h" +#include "list.h" +#include "recording.h" + +class Directory +{ + public: + Directory(); + ~Directory(); + + void setName(char* newName); + Directory* getDirByName(char* dirName); + void setFreeSpace(ULLONG); + ULONG getNumRecordings(); + + UCHAR isRoot; + char* name; + + int index; + + List* dirList; + List* recList; + + static ULONG totalSpace; + static ULONG freeSpace; + static ULONG usedPercent; + +}; + +#endif diff --git a/dsock.cc b/dsock.cc new file mode 100644 index 0000000..4acc89f --- /dev/null +++ b/dsock.cc @@ -0,0 +1,190 @@ +/* + Copyright 2004-2005 Chris Tallon + + This file is part of VOMP. + + VOMP 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. + + VOMP is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with VOMP; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#include "dsock.h" + +DatagramSocket::DatagramSocket(short port) +{ + theInstance = this; + myPort = port; + addrlen = sizeof(struct sockaddr); + + if ((socketnum = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP)) == -1) + { perror("socket"); exit(1); } + + myAddr.sin_family = AF_INET; // host byte order + myAddr.sin_port = htons(myPort); // short, network byte order + myAddr.sin_addr.s_addr = INADDR_ANY; // auto-fill with my IP + memset(&(myAddr.sin_zero), 0, 8); // zero the rest of the struct + + if (bind(socketnum, (struct sockaddr *)&myAddr, addrlen) == -1) + { perror("bind"); exit(1); } + + FD_ZERO(&readfds); + FD_SET(socketnum, &readfds); + tv.tv_sec = 0; + tv.tv_usec = 0; + + int allowed = 1; + setsockopt(socketnum, SOL_SOCKET, SO_BROADCAST, &allowed, sizeof(allowed)); +} + +DatagramSocket::~DatagramSocket() +{ + close(socketnum); +} + +DatagramSocket* DatagramSocket::theInstance = 0; +DatagramSocket* DatagramSocket::getInstance(void) +{ + return theInstance; +} + +unsigned char DatagramSocket::waitforMessage(unsigned char how) +{ + /* how = 0 - block + how = 1 - start new wait + how = 2 - continue wait + */ + + struct timeval* passToSelect = NULL; + + + if (how == 0) + { + passToSelect = NULL; + } + else if (how == 1) + { + tv.tv_sec = 1; + tv.tv_usec = 500000; + passToSelect = &tv; + } + else if (how == 2) + { + if ((tv.tv_sec == 0) && (tv.tv_usec == 0)) // protection in case timer = 0 + { + tv.tv_sec = 1; + tv.tv_usec = 500000; + } + passToSelect = &tv; + } + FD_ZERO(&readfds); + FD_SET(socketnum, &readfds); + + if (select(socketnum + 1, &readfds, NULL, NULL, passToSelect) <= 0) + { return 1; } + + if ((mlength = recvfrom(socketnum, buf, MAXBUFLEN, 0, + (struct sockaddr *)&theirAddr, &addrlen)) == -1) + { perror("recvfrom"); return 0; } + else + { + memset(&buf[mlength], 0, MAXBUFLEN - mlength); + strcpy(fromIPA, inet_ntoa(theirAddr.sin_addr)); + fromPort = ntohs(theirAddr.sin_port); + + if (DSOCKDEBUG) + { + //printf("%s:%i\tIN %i\t", fromIPA, fromPort, mlength); + int k; + for(k = 0; k < mlength; k++) + printf("%u ", (unsigned char)buf[k]); + printf("\n"); + } + return 2; + } + + /* Return 0, failure + Return 1, nothing happened, timer expired + Return 2, packet arrived (timer not expired) + */ +} + +int DatagramSocket::getDataLength(void) const +{ + return mlength; +} + +char *DatagramSocket::getData(void) { return buf; } +char *DatagramSocket::getFromIPA(void) { return fromIPA; } +short DatagramSocket::getFromPort(void) const { return fromPort; } + +void DatagramSocket::send(char *ipa, short port, char *message, int length) +{ + if (DSOCKDEBUG) + { + printf("%s:%i\tOUT %i\t", ipa, port, length); + int k; + uchar l; + for (k = 0; k < length; k++) + { l = (uchar)message[k]; printf("%u ", l); } + } + + int sentLength = 0; + + theirAddr.sin_family = AF_INET; // host byte order + theirAddr.sin_port = htons(port); // short, network byte order + struct in_addr tad; // temp struct tad needed to pass to theirAddr.sin_addr + tad.s_addr = inet_addr(ipa); + theirAddr.sin_addr = tad; // address + memset(&(theirAddr.sin_zero), 0, 8); // zero the rest of the struct + + errno = 0; + + sentLength = sendto(socketnum, message, length, 0, (struct sockaddr *)&theirAddr, addrlen); + if (sentLength == length) + { + if (DSOCKDEBUG) printf(" GOOD\n"); + } + else + { + if (DSOCKDEBUG) + { + printf(" --BAD--"); fflush(stdout); + } + sentLength = sendto(socketnum, message, length, 0, (struct sockaddr *)&theirAddr, addrlen); + if (sentLength == length) + { + if (DSOCKDEBUG) printf(" GOOD\n"); + } + else + { + if (DSOCKDEBUG && (sentLength != length)) + { + + printf(" -#-FAILED-#-\n"); + printf("--------------\n"); + printf("Sendto failure\n"); + printf("--------------\n"); + printf("%s:%i\tOUT %i %i ...\n", ipa, port, length, sentLength); + perror("Perror reports"); + printf("errno value: %d\n", errno); + printf("errno translated: %s\n", strerror(errno)); + // printf("h_errno value: %d\n", h_errno); + // printf("\nActual address: %s\n", inet_ntoa(tad)); + // printf("Actual port: %i\n", ntohs(theirAddr.sin_port)); + printf("continuing...\n\n"); + + } + } + } +} + diff --git a/dsock.h b/dsock.h new file mode 100644 index 0000000..110c31a --- /dev/null +++ b/dsock.h @@ -0,0 +1,67 @@ +/* + Copyright 2004-2005 Chris Tallon + + This file is part of VOMP. + + VOMP 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. + + VOMP is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with VOMP; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#ifndef DSOCK_H +#define DSOCK_H + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define MAXBUFLEN 2000 +typedef unsigned char uchar; + +class DatagramSocket +{ + public: + DatagramSocket(short); // port + ~DatagramSocket(); + static DatagramSocket* getInstance(void); + unsigned char waitforMessage(unsigned char); // int =0-block =1-new wait =2-continue wait + int getDataLength(void) const; + char *getData(void); // returns a pointer to the data + char *getFromIPA(void); // returns a pointer to from IP address + short getFromPort(void) const; + void send(char *, short, char *, int); // send wants: IP Address ddn style, port, + // data, length of data + private: + const static char DSOCKDEBUG = 0; + static DatagramSocket* theInstance; + int socketnum; // Socket descriptor + short myPort; // My port number + struct sockaddr_in myAddr; // My address + struct sockaddr_in theirAddr; // User address + socklen_t addrlen; // length of sockaddr struct + char buf[MAXBUFLEN]; // main data buffer + char fromIPA[20]; // from string (ip address) + short fromPort; // which port user sent on + int mlength; // length of message + struct timeval tv; + fd_set readfds; +}; + +#endif diff --git a/fonts/helvB18-ISO8859-1.pcf b/fonts/helvB18-ISO8859-1.pcf new file mode 100644 index 0000000000000000000000000000000000000000..ad032c3ef3b6c53511d3ead795abcf68323aacba GIT binary patch literal 16200 zcmb`Oe|S~(eaAn^jRqA2EohWqx25 zIYE9#2XY-H4lWuXHLt1=Vo|Tfl-sha} z%}EFlW6$I3e1CmDpYP}U`Fzh0t~q6!o7$(CSs7dn#}a1yDa)gFGv&P%X8dPYBlHsE z&(M&L>Yy!I$T2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aDwWN4-wWpfWmhNiGrdn-lXO2(pHf61?vvpHCU&w4}v*uhji(Gp;-^5pR zmTIL|;H$S#xR7bvl1*ECDxYr4rZ;zlwcy)6OYs$7K2vza+OwSnYs$5@rmUsAy(Qfy zYnfcL6|$*9i+wJg&snZ5Z5`Wl*3ptr^Qg^r=52FkTiOblE-R$Bp_A6Pf7X^kuql_# zwb9+032WJOpUHaD z%4C`{`KHcR>uhT#EPSq*#)A}oPv*5j*3;39c?(*xnL0ArX5tacS95NAn*~`>q_d>L znmY4jqN&@uiP)xm?vZrcCS^I@6a=F=lg_6L8D%5-0@HH&=FJ2$i0hWlOg5Wt&4tU( z=C)*-QdvHDbZN_{w`4R`y4hM&O?jf*oF?GppA2JzG?T+ZXOP}}n9EWt)zsOMw$@H< zkrY8{Z;7^nRuI^1N;flqN_(NCg?p{3LQ^NJBec%HFf7QC^SshcwI!9^98MW^7D}5S z2vlvDnA*^f+AwjOv*|9Y4MSU7icW1_v8=7LrOu_gP`NHtu8S$xm9*+Znfg$sJ|F|tdUIhQ+fq)4%ITOgsf)H&CX~s9GSLMR z#F>v{BbhW|XbY#yh2ptTJQp*Wiv&tq&6#Z(E`eMagw9a0GgR!1DR!1Ly2HVaAPC*1 WZY#YPQwt8B1N<9@htGw+YyE#^n^95# literal 0 HcmV?d00001 diff --git a/fonts/helvB18.bdf b/fonts/helvB18.bdf new file mode 100644 index 0000000..9df3e60 --- /dev/null +++ b/fonts/helvB18.bdf @@ -0,0 +1,4034 @@ +STARTFONT 2.1 +FONT -Adobe-Helvetica-Bold-R-Normal--18-180-75-75-P-103-ISO8859-1 +SIZE 18 75 75 +FONTBOUNDINGBOX 18 23 -1 -5 + +STARTPROPERTIES 28 +FOUNDRY "Adobe" +FAMILY_NAME "Helvetica" +WEIGHT_NAME "Bold" +SLANT "R" +SETWIDTH_NAME "Normal" +ADD_STYLE_NAME "" +PIXEL_SIZE 18 +POINT_SIZE 180 +RESOLUTION_X 75 +RESOLUTION_Y 75 +SPACING "P" +AVERAGE_WIDTH 103 +CHARSET_REGISTRY "ISO8859" +CHARSET_ENCODING "1" +CAP_HEIGHT 14 +X_HEIGHT 10 +FACE_NAME "Helvetica Bold" +COPYRIGHT "Copyright (c) 1984, 1987 Adobe Systems Incorporated. All Rights Reserved. Copyright (c) 1988, 1991 Digital Equipment Corporation. All Rights Reserved." +NOTICE "Helvetica is a trademark of Linotype-Hell AG and/or its subsidiaries. " +_DEC_DEVICE_FONTNAMES "PS=Helvetica-Bold" +RELATIVE_SETWIDTH 50 +RELATIVE_WEIGHT 70 +FULL_NAME "Helvetica Bold" +WEIGHT 10 +QUAD_WIDTH 11 +DEFAULT_CHAR 0 +FONT_DESCENT 5 +FONT_ASCENT 16 +ENDPROPERTIES + +CHARS 192 + +STARTCHAR defaultchar +ENCODING 0 +SWIDTH 722 0 +DWIDTH 13 0 +BBX 11 13 1 0 +BITMAP +AAA0 +0000 +8020 +0000 +8020 +0000 +8020 +0000 +8020 +0000 +8020 +0000 +AAA0 +ENDCHAR + +STARTCHAR space +ENCODING 32 +SWIDTH 278 0 +DWIDTH 5 0 +BBX 1 1 0 0 +BITMAP +00 +ENDCHAR + +STARTCHAR exclam +ENCODING 33 +SWIDTH 333 0 +DWIDTH 5 0 +BBX 3 14 1 0 +BITMAP +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +C0 +C0 +00 +E0 +E0 +E0 +ENDCHAR + +STARTCHAR quotedbl +ENCODING 34 +SWIDTH 474 0 +DWIDTH 8 0 +BBX 5 5 2 9 +BITMAP +D8 +D8 +D8 +D8 +90 +ENDCHAR + +STARTCHAR numbersign +ENCODING 35 +SWIDTH 556 0 +DWIDTH 11 0 +BBX 11 13 0 0 +BITMAP +0D80 +0D80 +0D80 +7FE0 +7FE0 +1B00 +1B00 +1B00 +FFC0 +FFC0 +3600 +3600 +3600 +ENDCHAR + +STARTCHAR dollar +ENCODING 36 +SWIDTH 556 0 +DWIDTH 10 0 +BBX 9 16 0 -2 +BITMAP +0800 +3E00 +7F00 +EB80 +EB80 +E800 +7800 +3E00 +0F00 +0B80 +EB80 +EB80 +7F00 +3E00 +0800 +0800 +ENDCHAR + +STARTCHAR percent +ENCODING 37 +SWIDTH 889 0 +DWIDTH 16 0 +BBX 13 13 1 0 +BITMAP +7860 +FC60 +CCC0 +CC80 +FD80 +7B00 +0200 +06F0 +0DF8 +0998 +1998 +31F8 +30F0 +ENDCHAR + +STARTCHAR ampersand +ENCODING 38 +SWIDTH 722 0 +DWIDTH 14 0 +BBX 13 13 1 0 +BITMAP +3E00 +7F00 +6300 +7300 +3E00 +7C60 +EE60 +C7E0 +C3C0 +C1C0 +E3E0 +7F70 +3E78 +ENDCHAR + +STARTCHAR quotesingle +ENCODING 39 +SWIDTH 238 0 +DWIDTH 4 0 +BBX 2 5 1 9 +BITMAP +C0 +C0 +C0 +C0 +80 +ENDCHAR + +STARTCHAR parenleft +ENCODING 40 +SWIDTH 333 0 +DWIDTH 7 0 +BBX 6 18 0 -4 +BITMAP +1C +38 +30 +70 +60 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +60 +70 +30 +38 +1C +ENDCHAR + +STARTCHAR parenright +ENCODING 41 +SWIDTH 333 0 +DWIDTH 7 0 +BBX 6 18 1 -4 +BITMAP +E0 +70 +30 +38 +18 +1C +1C +1C +1C +1C +1C +1C +1C +18 +38 +30 +70 +E0 +ENDCHAR + +STARTCHAR asterisk +ENCODING 42 +SWIDTH 389 0 +DWIDTH 9 0 +BBX 7 6 1 8 +BITMAP +10 +D6 +7C +38 +6C +44 +ENDCHAR + +STARTCHAR plus +ENCODING 43 +SWIDTH 584 0 +DWIDTH 11 0 +BBX 9 8 1 1 +BITMAP +1C00 +1C00 +1C00 +FF80 +FF80 +1C00 +1C00 +1C00 +ENDCHAR + +STARTCHAR comma +ENCODING 44 +SWIDTH 278 0 +DWIDTH 5 0 +BBX 3 5 1 -2 +BITMAP +E0 +E0 +E0 +60 +C0 +ENDCHAR + +STARTCHAR hyphen +ENCODING 45 +SWIDTH 333 0 +DWIDTH 7 0 +BBX 5 3 1 4 +BITMAP +F8 +F8 +F8 +ENDCHAR + +STARTCHAR period +ENCODING 46 +SWIDTH 278 0 +DWIDTH 5 0 +BBX 3 3 1 0 +BITMAP +E0 +E0 +E0 +ENDCHAR + +STARTCHAR slash +ENCODING 47 +SWIDTH 278 0 +DWIDTH 5 0 +BBX 5 14 0 0 +BITMAP +18 +18 +18 +10 +30 +30 +30 +20 +60 +60 +40 +C0 +C0 +C0 +ENDCHAR + +STARTCHAR zero +ENCODING 48 +SWIDTH 556 0 +DWIDTH 10 0 +BBX 9 13 0 0 +BITMAP +1C00 +7F00 +7700 +E380 +E380 +E380 +E380 +E380 +E380 +E380 +7700 +7F00 +1C00 +ENDCHAR + +STARTCHAR one +ENCODING 49 +SWIDTH 556 0 +DWIDTH 10 0 +BBX 6 13 1 0 +BITMAP +1C +3C +FC +FC +1C +1C +1C +1C +1C +1C +1C +1C +1C +ENDCHAR + +STARTCHAR two +ENCODING 50 +SWIDTH 556 0 +DWIDTH 10 0 +BBX 9 13 0 0 +BITMAP +3E00 +7F00 +E380 +E380 +0380 +0700 +1F00 +3E00 +7800 +7000 +E000 +FF80 +FF80 +ENDCHAR + +STARTCHAR three +ENCODING 51 +SWIDTH 556 0 +DWIDTH 10 0 +BBX 9 13 0 0 +BITMAP +3E00 +7F00 +E700 +E300 +0700 +1E00 +1F00 +0780 +0380 +E380 +E780 +7F00 +3E00 +ENDCHAR + +STARTCHAR four +ENCODING 52 +SWIDTH 556 0 +DWIDTH 10 0 +BBX 9 13 0 0 +BITMAP +0700 +0F00 +1F00 +3F00 +3700 +7700 +6700 +E700 +FF80 +FF80 +0700 +0700 +0700 +ENDCHAR + +STARTCHAR five +ENCODING 53 +SWIDTH 556 0 +DWIDTH 10 0 +BBX 9 13 0 0 +BITMAP +FF00 +FF00 +E000 +E000 +FE00 +FF00 +E780 +0380 +0380 +E380 +E780 +FF00 +7E00 +ENDCHAR + +STARTCHAR six +ENCODING 54 +SWIDTH 556 0 +DWIDTH 10 0 +BBX 9 13 0 0 +BITMAP +3E00 +7F00 +7300 +E000 +E000 +EE00 +FF00 +F380 +E380 +E380 +F380 +7F00 +3E00 +ENDCHAR + +STARTCHAR seven +ENCODING 55 +SWIDTH 556 0 +DWIDTH 10 0 +BBX 9 13 0 0 +BITMAP +FF80 +FF80 +0380 +0700 +0E00 +0E00 +1C00 +1C00 +3800 +3800 +7000 +7000 +7000 +ENDCHAR + +STARTCHAR eight +ENCODING 56 +SWIDTH 556 0 +DWIDTH 10 0 +BBX 9 13 0 0 +BITMAP +3E00 +7F00 +E380 +E380 +E380 +7F00 +3E00 +7700 +E380 +E380 +E380 +7F00 +3E00 +ENDCHAR + +STARTCHAR nine +ENCODING 57 +SWIDTH 556 0 +DWIDTH 10 0 +BBX 9 13 0 0 +BITMAP +3E00 +7F00 +E700 +E380 +C380 +C380 +E780 +7F80 +3D80 +0380 +E700 +FF00 +7C00 +ENDCHAR + +STARTCHAR colon +ENCODING 58 +SWIDTH 333 0 +DWIDTH 6 0 +BBX 3 10 2 0 +BITMAP +E0 +E0 +E0 +00 +00 +00 +00 +E0 +E0 +E0 +ENDCHAR + +STARTCHAR semicolon +ENCODING 59 +SWIDTH 333 0 +DWIDTH 6 0 +BBX 3 12 2 -2 +BITMAP +E0 +E0 +E0 +00 +00 +00 +00 +E0 +E0 +E0 +40 +80 +ENDCHAR + +STARTCHAR less +ENCODING 60 +SWIDTH 584 0 +DWIDTH 11 0 +BBX 9 9 1 0 +BITMAP +0380 +0F80 +3E00 +7800 +E000 +7800 +3E00 +0F80 +0380 +ENDCHAR + +STARTCHAR equal +ENCODING 61 +SWIDTH 584 0 +DWIDTH 10 0 +BBX 8 6 1 2 +BITMAP +FF +FF +00 +00 +FF +FF +ENDCHAR + +STARTCHAR greater +ENCODING 62 +SWIDTH 584 0 +DWIDTH 11 0 +BBX 9 9 1 0 +BITMAP +E000 +F800 +3E00 +0F00 +0380 +0F00 +3E00 +F800 +E000 +ENDCHAR + +STARTCHAR question +ENCODING 63 +SWIDTH 611 0 +DWIDTH 10 0 +BBX 8 14 1 0 +BITMAP +7E +FF +E7 +E7 +0E +1E +1C +38 +38 +38 +00 +38 +38 +38 +ENDCHAR + +STARTCHAR at +ENCODING 64 +SWIDTH 975 0 +DWIDTH 18 0 +BBX 16 17 1 -3 +BITMAP +07F0 +1FFC +3C1E +7006 +63B7 +E7F3 +C663 +CC63 +CCC3 +CCC6 +CCC6 +EFFC +E7B8 +7000 +3C00 +1FF0 +07F0 +ENDCHAR + +STARTCHAR A +ENCODING 65 +SWIDTH 722 0 +DWIDTH 13 0 +BBX 11 14 1 0 +BITMAP +0E00 +0E00 +1F00 +1F00 +1B00 +3B80 +3180 +3180 +71C0 +7FC0 +7FC0 +E0E0 +E0E0 +E0E0 +ENDCHAR + +STARTCHAR B +ENCODING 66 +SWIDTH 722 0 +DWIDTH 13 0 +BBX 11 14 1 0 +BITMAP +FE00 +FF80 +E3C0 +E1C0 +E1C0 +E380 +FF80 +FFC0 +E1E0 +E0E0 +E0E0 +E1E0 +FFC0 +FF00 +ENDCHAR + +STARTCHAR C +ENCODING 67 +SWIDTH 722 0 +DWIDTH 14 0 +BBX 12 14 1 0 +BITMAP +0F80 +3FE0 +78E0 +7070 +F070 +E000 +E000 +E000 +E000 +F070 +7070 +78E0 +3FE0 +0F80 +ENDCHAR + +STARTCHAR D +ENCODING 68 +SWIDTH 722 0 +DWIDTH 14 0 +BBX 12 14 1 0 +BITMAP +FF00 +FFC0 +E1E0 +E0E0 +E070 +E070 +E070 +E070 +E070 +E070 +E0E0 +E1E0 +FFC0 +FF00 +ENDCHAR + +STARTCHAR E +ENCODING 69 +SWIDTH 667 0 +DWIDTH 12 0 +BBX 10 14 1 0 +BITMAP +FFC0 +FFC0 +E000 +E000 +E000 +E000 +FF80 +FF80 +E000 +E000 +E000 +E000 +FFC0 +FFC0 +ENDCHAR + +STARTCHAR F +ENCODING 70 +SWIDTH 611 0 +DWIDTH 12 0 +BBX 10 14 1 0 +BITMAP +FFC0 +FFC0 +E000 +E000 +E000 +E000 +FF80 +FF80 +E000 +E000 +E000 +E000 +E000 +E000 +ENDCHAR + +STARTCHAR G +ENCODING 71 +SWIDTH 778 0 +DWIDTH 14 0 +BBX 12 14 1 0 +BITMAP +0F80 +3FE0 +78E0 +7070 +E070 +E000 +E000 +E3F0 +E3F0 +E070 +7070 +78F0 +3FF0 +1FB0 +ENDCHAR + +STARTCHAR H +ENCODING 72 +SWIDTH 722 0 +DWIDTH 13 0 +BBX 11 14 1 0 +BITMAP +E0E0 +E0E0 +E0E0 +E0E0 +E0E0 +E0E0 +FFE0 +FFE0 +E0E0 +E0E0 +E0E0 +E0E0 +E0E0 +E0E0 +ENDCHAR + +STARTCHAR I +ENCODING 73 +SWIDTH 278 0 +DWIDTH 5 0 +BBX 3 14 1 0 +BITMAP +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +ENDCHAR + +STARTCHAR J +ENCODING 74 +SWIDTH 556 0 +DWIDTH 10 0 +BBX 9 14 0 0 +BITMAP +0380 +0380 +0380 +0380 +0380 +0380 +0380 +0380 +0380 +E380 +E380 +F780 +7F00 +3E00 +ENDCHAR + +STARTCHAR K +ENCODING 75 +SWIDTH 722 0 +DWIDTH 14 0 +BBX 13 14 1 0 +BITMAP +E0F0 +E1E0 +E3C0 +E780 +EF00 +FE00 +FC00 +FE00 +EF00 +E780 +E3C0 +E1E0 +E0F0 +E078 +ENDCHAR + +STARTCHAR L +ENCODING 76 +SWIDTH 611 0 +DWIDTH 11 0 +BBX 9 14 1 0 +BITMAP +E000 +E000 +E000 +E000 +E000 +E000 +E000 +E000 +E000 +E000 +E000 +E000 +FF80 +FF80 +ENDCHAR + +STARTCHAR M +ENCODING 77 +SWIDTH 833 0 +DWIDTH 16 0 +BBX 14 14 1 0 +BITMAP +E01C +E01C +F03C +F03C +F87C +F87C +F87C +ECDC +ECDC +ECDC +E79C +E79C +E31C +E31C +ENDCHAR + +STARTCHAR N +ENCODING 78 +SWIDTH 722 0 +DWIDTH 14 0 +BBX 12 14 1 0 +BITMAP +E070 +F070 +F070 +F870 +FC70 +EC70 +EE70 +E670 +E770 +E370 +E1F0 +E1F0 +E0F0 +E070 +ENDCHAR + +STARTCHAR O +ENCODING 79 +SWIDTH 778 0 +DWIDTH 16 0 +BBX 14 14 1 0 +BITMAP +0FC0 +3FF0 +7878 +7038 +F03C +E01C +E01C +E01C +E01C +F03C +7038 +7878 +3FF0 +0FC0 +ENDCHAR + +STARTCHAR P +ENCODING 80 +SWIDTH 667 0 +DWIDTH 12 0 +BBX 10 14 1 0 +BITMAP +FE00 +FF80 +E3C0 +E1C0 +E1C0 +E3C0 +FF80 +FE00 +E000 +E000 +E000 +E000 +E000 +E000 +ENDCHAR + +STARTCHAR Q +ENCODING 81 +SWIDTH 778 0 +DWIDTH 16 0 +BBX 14 15 1 -1 +BITMAP +0FC0 +3FF0 +7878 +7038 +F03C +E01C +E01C +E01C +E01C +F19C +71D8 +78F8 +3FF0 +0FF8 +0018 +ENDCHAR + +STARTCHAR R +ENCODING 82 +SWIDTH 722 0 +DWIDTH 13 0 +BBX 11 14 1 0 +BITMAP +FF00 +FFC0 +E1E0 +E0E0 +E0E0 +E1E0 +FFC0 +FF80 +E1C0 +E0E0 +E0E0 +E0E0 +E0E0 +E0E0 +ENDCHAR + +STARTCHAR S +ENCODING 83 +SWIDTH 667 0 +DWIDTH 12 0 +BBX 10 14 1 0 +BITMAP +3F00 +7F80 +E3C0 +E1C0 +F000 +7C00 +3F00 +0F80 +03C0 +E1C0 +E1C0 +F3C0 +7F80 +3F00 +ENDCHAR + +STARTCHAR T +ENCODING 84 +SWIDTH 611 0 +DWIDTH 11 0 +BBX 11 14 0 0 +BITMAP +FFE0 +FFE0 +0E00 +0E00 +0E00 +0E00 +0E00 +0E00 +0E00 +0E00 +0E00 +0E00 +0E00 +0E00 +ENDCHAR + +STARTCHAR U +ENCODING 85 +SWIDTH 722 0 +DWIDTH 13 0 +BBX 11 14 1 0 +BITMAP +E0E0 +E0E0 +E0E0 +E0E0 +E0E0 +E0E0 +E0E0 +E0E0 +E0E0 +E0E0 +E0E0 +71C0 +7FC0 +1F00 +ENDCHAR + +STARTCHAR V +ENCODING 86 +SWIDTH 667 0 +DWIDTH 13 0 +BBX 11 14 1 0 +BITMAP +E0E0 +E0E0 +E0E0 +71C0 +71C0 +71C0 +3180 +3B80 +3B80 +1B00 +1F00 +1F00 +0E00 +0E00 +ENDCHAR + +STARTCHAR W +ENCODING 87 +SWIDTH 944 0 +DWIDTH 17 0 +BBX 15 14 1 0 +BITMAP +E38E +E38E +E38E +E38E +739C +739C +739C +76DC +36D8 +36D8 +3EF8 +1C70 +1C70 +1C70 +ENDCHAR + +STARTCHAR X +ENCODING 88 +SWIDTH 667 0 +DWIDTH 12 0 +BBX 12 14 0 0 +BITMAP +E070 +E070 +70E0 +79E0 +1980 +1F80 +0F00 +1F80 +1980 +39C0 +70E0 +70E0 +E070 +E070 +ENDCHAR + +STARTCHAR Y +ENCODING 89 +SWIDTH 667 0 +DWIDTH 13 0 +BBX 11 14 1 0 +BITMAP +E0E0 +E0E0 +E0E0 +71C0 +71C0 +3B80 +3B80 +1F00 +0E00 +0E00 +0E00 +0E00 +0E00 +0E00 +ENDCHAR + +STARTCHAR Z +ENCODING 90 +SWIDTH 611 0 +DWIDTH 11 0 +BBX 10 14 1 0 +BITMAP +FFC0 +FFC0 +01C0 +0380 +0700 +0700 +0E00 +1C00 +3800 +3800 +7000 +E000 +FFC0 +FFC0 +ENDCHAR + +STARTCHAR bracketleft +ENCODING 91 +SWIDTH 333 0 +DWIDTH 6 0 +BBX 5 18 1 -4 +BITMAP +F8 +F8 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +F8 +F8 +ENDCHAR + +STARTCHAR backslash +ENCODING 92 +SWIDTH 278 0 +DWIDTH 5 0 +BBX 5 14 0 0 +BITMAP +C0 +C0 +C0 +40 +60 +60 +60 +20 +30 +30 +10 +18 +18 +18 +ENDCHAR + +STARTCHAR bracketright +ENCODING 93 +SWIDTH 333 0 +DWIDTH 6 0 +BBX 5 18 0 -4 +BITMAP +F8 +F8 +38 +38 +38 +38 +38 +38 +38 +38 +38 +38 +38 +38 +38 +38 +F8 +F8 +ENDCHAR + +STARTCHAR asciicircum +ENCODING 94 +SWIDTH 584 0 +DWIDTH 10 0 +BBX 10 6 0 7 +BITMAP +0C00 +1E00 +3F00 +7380 +E1C0 +C0C0 +ENDCHAR + +STARTCHAR underscore +ENCODING 95 +SWIDTH 556 0 +DWIDTH 10 0 +BBX 10 2 0 -4 +BITMAP +FFC0 +FFC0 +ENDCHAR + +STARTCHAR grave +ENCODING 96 +SWIDTH 333 0 +DWIDTH 5 0 +BBX 5 3 0 11 +BITMAP +E0 +70 +38 +ENDCHAR + +STARTCHAR a +ENCODING 97 +SWIDTH 556 0 +DWIDTH 10 0 +BBX 8 10 1 0 +BITMAP +7C +FE +E7 +0F +3F +77 +E7 +E7 +FF +77 +ENDCHAR + +STARTCHAR b +ENCODING 98 +SWIDTH 611 0 +DWIDTH 12 0 +BBX 10 14 1 0 +BITMAP +E000 +E000 +E000 +E000 +EF00 +FF80 +F380 +E1C0 +E1C0 +E1C0 +E1C0 +F380 +FF80 +EF00 +ENDCHAR + +STARTCHAR c +ENCODING 99 +SWIDTH 556 0 +DWIDTH 10 0 +BBX 9 10 1 0 +BITMAP +1E00 +7F80 +7380 +E000 +E000 +E000 +E000 +7380 +7F80 +1E00 +ENDCHAR + +STARTCHAR d +ENCODING 100 +SWIDTH 611 0 +DWIDTH 12 0 +BBX 10 14 1 0 +BITMAP +01C0 +01C0 +01C0 +01C0 +3DC0 +7FC0 +73C0 +E1C0 +E1C0 +E1C0 +E1C0 +73C0 +7FC0 +3DC0 +ENDCHAR + +STARTCHAR e +ENCODING 101 +SWIDTH 556 0 +DWIDTH 11 0 +BBX 9 10 1 0 +BITMAP +1E00 +7F00 +7380 +E180 +FF80 +FF80 +E000 +7380 +7F80 +1E00 +ENDCHAR + +STARTCHAR f +ENCODING 102 +SWIDTH 333 0 +DWIDTH 7 0 +BBX 7 14 0 0 +BITMAP +1E +3E +38 +38 +FE +FE +38 +38 +38 +38 +38 +38 +38 +38 +ENDCHAR + +STARTCHAR g +ENCODING 103 +SWIDTH 611 0 +DWIDTH 12 0 +BBX 10 14 1 -4 +BITMAP +3DC0 +7FC0 +73C0 +E1C0 +E1C0 +E1C0 +E1C0 +73C0 +7FC0 +3DC0 +01C0 +7380 +7F80 +1E00 +ENDCHAR + +STARTCHAR h +ENCODING 104 +SWIDTH 611 0 +DWIDTH 11 0 +BBX 9 14 1 0 +BITMAP +E000 +E000 +E000 +E000 +EF00 +FF80 +F380 +E380 +E380 +E380 +E380 +E380 +E380 +E380 +ENDCHAR + +STARTCHAR i +ENCODING 105 +SWIDTH 278 0 +DWIDTH 5 0 +BBX 3 14 1 0 +BITMAP +E0 +E0 +00 +00 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +ENDCHAR + +STARTCHAR j +ENCODING 106 +SWIDTH 278 0 +DWIDTH 5 0 +BBX 5 18 -1 -4 +BITMAP +38 +38 +00 +00 +38 +38 +38 +38 +38 +38 +38 +38 +38 +38 +38 +38 +F8 +F0 +ENDCHAR + +STARTCHAR k +ENCODING 107 +SWIDTH 556 0 +DWIDTH 10 0 +BBX 9 14 1 0 +BITMAP +E000 +E000 +E000 +E000 +E700 +EE00 +FC00 +F800 +F800 +FC00 +EE00 +E700 +E780 +E380 +ENDCHAR + +STARTCHAR l +ENCODING 108 +SWIDTH 278 0 +DWIDTH 5 0 +BBX 3 14 1 0 +BITMAP +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +ENDCHAR + +STARTCHAR m +ENCODING 109 +SWIDTH 889 0 +DWIDTH 15 0 +BBX 13 10 1 0 +BITMAP +EE70 +FFF8 +F7B8 +E738 +E738 +E738 +E738 +E738 +E738 +E738 +ENDCHAR + +STARTCHAR n +ENCODING 110 +SWIDTH 611 0 +DWIDTH 11 0 +BBX 9 10 1 0 +BITMAP +EF00 +FF80 +F380 +E380 +E380 +E380 +E380 +E380 +E380 +E380 +ENDCHAR + +STARTCHAR o +ENCODING 111 +SWIDTH 611 0 +DWIDTH 12 0 +BBX 10 10 1 0 +BITMAP +1E00 +7F80 +7380 +E1C0 +E1C0 +E1C0 +E1C0 +7380 +7F80 +1E00 +ENDCHAR + +STARTCHAR p +ENCODING 112 +SWIDTH 611 0 +DWIDTH 12 0 +BBX 10 14 1 -4 +BITMAP +EF00 +FF80 +F380 +E1C0 +E1C0 +E1C0 +E1C0 +F380 +FF80 +EF00 +E000 +E000 +E000 +E000 +ENDCHAR + +STARTCHAR q +ENCODING 113 +SWIDTH 611 0 +DWIDTH 12 0 +BBX 10 14 1 -4 +BITMAP +3DC0 +7FC0 +73C0 +E1C0 +E1C0 +E1C0 +E1C0 +73C0 +7FC0 +3DC0 +01C0 +01C0 +01C0 +01C0 +ENDCHAR + +STARTCHAR r +ENCODING 114 +SWIDTH 389 0 +DWIDTH 7 0 +BBX 6 10 1 0 +BITMAP +EC +FC +FC +E0 +E0 +E0 +E0 +E0 +E0 +E0 +ENDCHAR + +STARTCHAR s +ENCODING 115 +SWIDTH 556 0 +DWIDTH 10 0 +BBX 8 10 1 0 +BITMAP +1E +7F +E7 +E0 +FE +3F +07 +E7 +FE +78 +ENDCHAR + +STARTCHAR t +ENCODING 116 +SWIDTH 333 0 +DWIDTH 6 0 +BBX 6 13 0 0 +BITMAP +70 +70 +70 +FC +FC +70 +70 +70 +70 +70 +70 +7C +3C +ENDCHAR + +STARTCHAR u +ENCODING 117 +SWIDTH 611 0 +DWIDTH 11 0 +BBX 9 10 1 0 +BITMAP +E380 +E380 +E380 +E380 +E380 +E380 +E380 +E780 +FF80 +7B80 +ENDCHAR + +STARTCHAR v +ENCODING 118 +SWIDTH 556 0 +DWIDTH 9 0 +BBX 9 10 0 0 +BITMAP +E380 +E380 +E380 +7700 +7700 +7700 +3E00 +3E00 +1C00 +1C00 +ENDCHAR + +STARTCHAR w +ENCODING 119 +SWIDTH 778 0 +DWIDTH 13 0 +BBX 13 10 0 0 +BITMAP +E738 +E738 +E738 +6730 +7770 +7570 +3DE0 +3DE0 +18C0 +18C0 +ENDCHAR + +STARTCHAR x +ENCODING 120 +SWIDTH 556 0 +DWIDTH 9 0 +BBX 9 10 0 0 +BITMAP +E380 +E380 +7700 +3E00 +1C00 +3E00 +7700 +7700 +E380 +E380 +ENDCHAR + +STARTCHAR y +ENCODING 121 +SWIDTH 556 0 +DWIDTH 9 0 +BBX 9 14 0 -4 +BITMAP +E380 +E380 +E380 +7700 +7700 +7700 +3E00 +3E00 +1C00 +1C00 +1C00 +1800 +7800 +7000 +ENDCHAR + +STARTCHAR z +ENCODING 122 +SWIDTH 500 0 +DWIDTH 10 0 +BBX 8 10 1 0 +BITMAP +FF +FF +07 +0E +1C +38 +70 +E0 +FF +FF +ENDCHAR + +STARTCHAR braceleft +ENCODING 123 +SWIDTH 389 0 +DWIDTH 8 0 +BBX 7 18 1 -4 +BITMAP +0E +1C +38 +38 +38 +38 +38 +70 +E0 +70 +38 +38 +38 +38 +38 +38 +1C +0E +ENDCHAR + +STARTCHAR bar +ENCODING 124 +SWIDTH 280 0 +DWIDTH 5 0 +BBX 2 18 1 -4 +BITMAP +C0 +C0 +C0 +C0 +C0 +C0 +C0 +C0 +C0 +C0 +C0 +C0 +C0 +C0 +C0 +C0 +C0 +C0 +ENDCHAR + +STARTCHAR braceright +ENCODING 125 +SWIDTH 389 0 +DWIDTH 8 0 +BBX 7 18 0 -4 +BITMAP +E0 +70 +38 +38 +38 +38 +38 +1C +0E +1C +38 +38 +38 +38 +38 +38 +70 +E0 +ENDCHAR + +STARTCHAR asciitilde +ENCODING 126 +SWIDTH 584 0 +DWIDTH 11 0 +BBX 9 3 1 4 +BITMAP +7980 +FF80 +CF00 +ENDCHAR + +STARTCHAR space +ENCODING 160 +SWIDTH 278 0 +DWIDTH 5 0 +BBX 1 1 0 0 +BITMAP +00 +ENDCHAR + +STARTCHAR exclamdown +ENCODING 161 +SWIDTH 333 0 +DWIDTH 6 0 +BBX 3 14 2 -4 +BITMAP +E0 +E0 +00 +00 +60 +60 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +ENDCHAR + +STARTCHAR cent +ENCODING 162 +SWIDTH 556 0 +DWIDTH 10 0 +BBX 8 14 1 -2 +BITMAP +02 +02 +3E +7F +E7 +C8 +C8 +D0 +D0 +E3 +7F +7E +40 +40 +ENDCHAR + +STARTCHAR sterling +ENCODING 163 +SWIDTH 556 0 +DWIDTH 11 0 +BBX 10 13 0 0 +BITMAP +1F00 +3FC0 +71C0 +7000 +7000 +3800 +7F00 +1C00 +1C00 +3800 +70C0 +FFC0 +EF80 +ENDCHAR + +STARTCHAR currency +ENCODING 164 +SWIDTH 556 0 +DWIDTH 11 0 +BBX 9 8 1 2 +BITMAP +C180 +FF80 +7700 +6300 +6300 +7700 +FF80 +C180 +ENDCHAR + +STARTCHAR yen +ENCODING 165 +SWIDTH 556 0 +DWIDTH 10 0 +BBX 9 13 0 0 +BITMAP +E380 +E380 +E380 +7700 +7700 +3E00 +FF80 +1C00 +FF80 +1C00 +1C00 +1C00 +1C00 +ENDCHAR + +STARTCHAR brokenbar +ENCODING 166 +SWIDTH 280 0 +DWIDTH 5 0 +BBX 2 17 1 -3 +BITMAP +C0 +C0 +C0 +C0 +C0 +C0 +C0 +00 +00 +00 +C0 +C0 +C0 +C0 +C0 +C0 +C0 +ENDCHAR + +STARTCHAR section +ENCODING 167 +SWIDTH 556 0 +DWIDTH 10 0 +BBX 8 18 1 -4 +BITMAP +3C +7E +C7 +C7 +E0 +78 +FC +C6 +C7 +E3 +73 +3F +0E +07 +E3 +E3 +7E +3C +ENDCHAR + +STARTCHAR dieresis +ENCODING 168 +SWIDTH 333 0 +DWIDTH 7 0 +BBX 5 2 1 11 +BITMAP +D8 +D8 +ENDCHAR + +STARTCHAR copyright +ENCODING 169 +SWIDTH 737 0 +DWIDTH 15 0 +BBX 13 13 1 0 +BITMAP +0F80 +38E0 +6030 +6730 +CD98 +D818 +9808 +D818 +CD98 +6730 +6030 +38E0 +0F80 +ENDCHAR + +STARTCHAR ordfeminine +ENCODING 170 +SWIDTH 370 0 +DWIDTH 8 0 +BBX 6 9 1 5 +BITMAP +78 +8C +7C +CC +CC +74 +00 +FC +FC +ENDCHAR + +STARTCHAR guillemotleft +ENCODING 171 +SWIDTH 556 0 +DWIDTH 11 0 +BBX 10 8 0 1 +BITMAP +1DC0 +3B80 +7700 +EE00 +EE00 +7700 +3B80 +1DC0 +ENDCHAR + +STARTCHAR logicalnot +ENCODING 172 +SWIDTH 584 0 +DWIDTH 11 0 +BBX 9 5 1 2 +BITMAP +FF80 +FF80 +0180 +0180 +0180 +ENDCHAR + +STARTCHAR hyphen +ENCODING 173 +SWIDTH 333 0 +DWIDTH 7 0 +BBX 5 3 1 4 +BITMAP +F8 +F8 +F8 +ENDCHAR + +STARTCHAR registered +ENCODING 174 +SWIDTH 737 0 +DWIDTH 15 0 +BBX 13 13 1 0 +BITMAP +0F80 +38E0 +6030 +6F90 +CCD8 +CCD8 +8F08 +CD98 +CD98 +6CF0 +6030 +38E0 +0F80 +ENDCHAR + +STARTCHAR macron +ENCODING 175 +SWIDTH 333 0 +DWIDTH 7 0 +BBX 5 2 1 12 +BITMAP +F8 +F8 +ENDCHAR + +STARTCHAR degree +ENCODING 176 +SWIDTH 400 0 +DWIDTH 7 0 +BBX 6 6 0 7 +BITMAP +78 +FC +CC +CC +FC +78 +ENDCHAR + +STARTCHAR plusminus +ENCODING 177 +SWIDTH 584 0 +DWIDTH 11 0 +BBX 9 9 1 0 +BITMAP +1C00 +1C00 +FF80 +FF80 +1C00 +1C00 +0000 +FF80 +FF80 +ENDCHAR + +STARTCHAR twosuperior +ENCODING 178 +SWIDTH 333 0 +DWIDTH 6 0 +BBX 6 8 0 5 +BITMAP +78 +FC +CC +1C +78 +E0 +FC +FC +ENDCHAR + +STARTCHAR threesuperior +ENCODING 179 +SWIDTH 333 0 +DWIDTH 6 0 +BBX 6 8 0 5 +BITMAP +78 +FC +CC +38 +3C +CC +FC +78 +ENDCHAR + +STARTCHAR acute +ENCODING 180 +SWIDTH 333 0 +DWIDTH 5 0 +BBX 5 3 0 11 +BITMAP +38 +70 +E0 +ENDCHAR + +STARTCHAR mu +ENCODING 181 +SWIDTH 611 0 +DWIDTH 11 0 +BBX 9 14 1 -4 +BITMAP +E380 +E380 +E380 +E380 +E380 +E380 +E380 +E780 +FF80 +FB80 +E000 +E000 +E000 +E000 +ENDCHAR + +STARTCHAR paragraph +ENCODING 182 +SWIDTH 556 0 +DWIDTH 10 0 +BBX 9 18 0 -4 +BITMAP +3F80 +7B00 +FB00 +FB00 +FB00 +FB00 +FB00 +7B00 +3B00 +1B00 +1B00 +1B00 +1B00 +1B00 +1B00 +1B00 +1B00 +1B00 +ENDCHAR + +STARTCHAR periodcentered +ENCODING 183 +SWIDTH 278 0 +DWIDTH 4 0 +BBX 2 2 1 4 +BITMAP +C0 +C0 +ENDCHAR + +STARTCHAR cedilla +ENCODING 184 +SWIDTH 333 0 +DWIDTH 7 0 +BBX 5 5 1 -5 +BITMAP +60 +70 +18 +F8 +F0 +ENDCHAR + +STARTCHAR onesuperior +ENCODING 185 +SWIDTH 333 0 +DWIDTH 6 0 +BBX 4 8 0 5 +BITMAP +30 +F0 +F0 +30 +30 +30 +30 +30 +ENDCHAR + +STARTCHAR ordmasculine +ENCODING 186 +SWIDTH 365 0 +DWIDTH 8 0 +BBX 6 9 1 5 +BITMAP +78 +CC +CC +CC +CC +78 +00 +FC +FC +ENDCHAR + +STARTCHAR guillemotright +ENCODING 187 +SWIDTH 556 0 +DWIDTH 11 0 +BBX 10 8 0 1 +BITMAP +EE00 +7700 +3B80 +1DC0 +1DC0 +3B80 +7700 +EE00 +ENDCHAR + +STARTCHAR onequarter +ENCODING 188 +SWIDTH 834 0 +DWIDTH 15 0 +BBX 14 13 0 0 +BITMAP +3060 +F060 +F0C0 +30C0 +3180 +3198 +3338 +3638 +0678 +0CD8 +0CFC +1818 +1818 +ENDCHAR + +STARTCHAR onehalf +ENCODING 189 +SWIDTH 834 0 +DWIDTH 15 0 +BBX 15 13 0 0 +BITMAP +3060 +F060 +F0C0 +30C0 +3180 +31BC +337E +3666 +060E +0C3C +0C70 +187E +187E +ENDCHAR + +STARTCHAR threequarters +ENCODING 190 +SWIDTH 834 0 +DWIDTH 15 0 +BBX 14 13 0 0 +BITMAP +7830 +FC30 +CC60 +3860 +3CC0 +CCD8 +FDB8 +7B38 +0378 +06D8 +06FC +0C18 +0C18 +ENDCHAR + +STARTCHAR questiondown +ENCODING 191 +SWIDTH 611 0 +DWIDTH 10 0 +BBX 8 14 1 -4 +BITMAP +1C +1C +00 +00 +1C +1C +1C +38 +78 +70 +E7 +E7 +FF +7E +ENDCHAR + +STARTCHAR Agrave +ENCODING 192 +SWIDTH 722 0 +DWIDTH 13 0 +BBX 11 18 1 0 +BITMAP +3800 +1C00 +0E00 +0000 +0E00 +0E00 +1F00 +1F00 +1B00 +3B80 +3180 +3180 +71C0 +7FC0 +7FC0 +E0E0 +E0E0 +E0E0 +ENDCHAR + +STARTCHAR Aacute +ENCODING 193 +SWIDTH 722 0 +DWIDTH 13 0 +BBX 11 18 1 0 +BITMAP +0380 +0700 +0E00 +0000 +0E00 +0E00 +1F00 +1F00 +1B00 +3B80 +3180 +3180 +71C0 +7FC0 +7FC0 +E0E0 +E0E0 +E0E0 +ENDCHAR + +STARTCHAR Acircumflex +ENCODING 194 +SWIDTH 722 0 +DWIDTH 13 0 +BBX 11 18 1 0 +BITMAP +0E00 +1F00 +3B80 +0000 +0E00 +0E00 +1F00 +1F00 +1B00 +3B80 +3180 +3180 +71C0 +7FC0 +7FC0 +E0E0 +E0E0 +E0E0 +ENDCHAR + +STARTCHAR Atilde +ENCODING 195 +SWIDTH 722 0 +DWIDTH 13 0 +BBX 11 18 1 0 +BITMAP +1D80 +3F80 +3700 +0000 +0E00 +0E00 +1F00 +1F00 +1B00 +3B80 +3180 +3180 +71C0 +7FC0 +7FC0 +E0E0 +E0E0 +E0E0 +ENDCHAR + +STARTCHAR Adieresis +ENCODING 196 +SWIDTH 722 0 +DWIDTH 13 0 +BBX 11 17 1 0 +BITMAP +1980 +1980 +0000 +0E00 +0E00 +1F00 +1F00 +1B00 +3B80 +3180 +3180 +71C0 +7FC0 +7FC0 +E0E0 +E0E0 +E0E0 +ENDCHAR + +STARTCHAR Aring +ENCODING 197 +SWIDTH 722 0 +DWIDTH 13 0 +BBX 11 17 1 0 +BITMAP +0E00 +1B00 +1B00 +0E00 +0E00 +1F00 +1F00 +1B00 +3B80 +3180 +3180 +71C0 +7FC0 +7FC0 +E0E0 +E0E0 +E0E0 +ENDCHAR + +STARTCHAR AE +ENCODING 198 +SWIDTH 1000 0 +DWIDTH 18 0 +BBX 16 14 1 0 +BITMAP +0FFF +0FFF +1F80 +1B80 +3B80 +3B80 +33FE +73FE +7380 +7F80 +FF80 +E380 +E3FF +E3FF +ENDCHAR + +STARTCHAR Ccedilla +ENCODING 199 +SWIDTH 722 0 +DWIDTH 14 0 +BBX 12 19 1 -5 +BITMAP +0F80 +3FE0 +78E0 +7070 +F070 +E000 +E000 +E000 +E000 +F070 +7070 +78E0 +3FE0 +0F80 +0C00 +0E00 +0300 +1F00 +1E00 +ENDCHAR + +STARTCHAR Egrave +ENCODING 200 +SWIDTH 667 0 +DWIDTH 12 0 +BBX 10 18 1 0 +BITMAP +3800 +1C00 +0E00 +0000 +FFC0 +FFC0 +E000 +E000 +E000 +E000 +FF80 +FF80 +E000 +E000 +E000 +E000 +FFC0 +FFC0 +ENDCHAR + +STARTCHAR Eacute +ENCODING 201 +SWIDTH 667 0 +DWIDTH 12 0 +BBX 10 18 1 0 +BITMAP +0380 +0700 +0E00 +0000 +FFC0 +FFC0 +E000 +E000 +E000 +E000 +FF80 +FF80 +E000 +E000 +E000 +E000 +FFC0 +FFC0 +ENDCHAR + +STARTCHAR Ecircumflex +ENCODING 202 +SWIDTH 667 0 +DWIDTH 12 0 +BBX 10 18 1 0 +BITMAP +0E00 +1F00 +3B80 +0000 +FFC0 +FFC0 +E000 +E000 +E000 +E000 +FF80 +FF80 +E000 +E000 +E000 +E000 +FFC0 +FFC0 +ENDCHAR + +STARTCHAR Edieresis +ENCODING 203 +SWIDTH 667 0 +DWIDTH 12 0 +BBX 10 17 1 0 +BITMAP +3300 +3300 +0000 +FFC0 +FFC0 +E000 +E000 +E000 +E000 +FF80 +FF80 +E000 +E000 +E000 +E000 +FFC0 +FFC0 +ENDCHAR + +STARTCHAR Igrave +ENCODING 204 +SWIDTH 278 0 +DWIDTH 5 0 +BBX 5 18 -1 0 +BITMAP +E0 +70 +38 +00 +38 +38 +38 +38 +38 +38 +38 +38 +38 +38 +38 +38 +38 +38 +ENDCHAR + +STARTCHAR Iacute +ENCODING 205 +SWIDTH 278 0 +DWIDTH 5 0 +BBX 5 18 1 0 +BITMAP +38 +70 +E0 +00 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +ENDCHAR + +STARTCHAR Icircumflex +ENCODING 206 +SWIDTH 278 0 +DWIDTH 5 0 +BBX 5 18 0 0 +BITMAP +20 +70 +D8 +00 +70 +70 +70 +70 +70 +70 +70 +70 +70 +70 +70 +70 +70 +70 +ENDCHAR + +STARTCHAR Idieresis +ENCODING 207 +SWIDTH 278 0 +DWIDTH 5 0 +BBX 5 17 0 0 +BITMAP +D8 +D8 +00 +70 +70 +70 +70 +70 +70 +70 +70 +70 +70 +70 +70 +70 +70 +ENDCHAR + +STARTCHAR Eth +ENCODING 208 +SWIDTH 722 0 +DWIDTH 14 0 +BBX 13 14 0 0 +BITMAP +7F80 +7FE0 +70F0 +7070 +7038 +7038 +FE38 +FE38 +7038 +7038 +7070 +70F0 +7FE0 +7F80 +ENDCHAR + +STARTCHAR Ntilde +ENCODING 209 +SWIDTH 722 0 +DWIDTH 14 0 +BBX 12 18 1 0 +BITMAP +0EC0 +1FC0 +1B80 +0000 +E070 +F070 +F070 +F870 +FC70 +EC70 +EE70 +E670 +E770 +E370 +E1F0 +E1F0 +E0F0 +E070 +ENDCHAR + +STARTCHAR Ograve +ENCODING 210 +SWIDTH 778 0 +DWIDTH 16 0 +BBX 14 18 1 0 +BITMAP +0E00 +0700 +0380 +0000 +0FC0 +3FF0 +7878 +7038 +F03C +E01C +E01C +E01C +E01C +F03C +7038 +7878 +3FF0 +0FC0 +ENDCHAR + +STARTCHAR Oacute +ENCODING 211 +SWIDTH 778 0 +DWIDTH 16 0 +BBX 14 18 1 0 +BITMAP +00E0 +01C0 +0380 +0000 +0FC0 +3FF0 +7878 +7038 +F03C +E01C +E01C +E01C +E01C +F03C +7038 +7878 +3FF0 +0FC0 +ENDCHAR + +STARTCHAR Ocircumflex +ENCODING 212 +SWIDTH 778 0 +DWIDTH 16 0 +BBX 14 18 1 0 +BITMAP +0380 +07C0 +0EE0 +0000 +0FC0 +3FF0 +7878 +7038 +F03C +E01C +E01C +E01C +E01C +F03C +7038 +7878 +3FF0 +0FC0 +ENDCHAR + +STARTCHAR Otilde +ENCODING 213 +SWIDTH 778 0 +DWIDTH 16 0 +BBX 14 18 1 0 +BITMAP +0760 +0FE0 +0DC0 +0000 +0FC0 +3FF0 +7878 +7038 +F03C +E01C +E01C +E01C +E01C +F03C +7038 +7878 +3FF0 +0FC0 +ENDCHAR + +STARTCHAR Odieresis +ENCODING 214 +SWIDTH 778 0 +DWIDTH 16 0 +BBX 14 17 1 0 +BITMAP +0CC0 +0CC0 +0000 +0FC0 +3FF0 +7878 +7038 +F03C +E01C +E01C +E01C +E01C +F03C +7038 +7878 +3FF0 +0FC0 +ENDCHAR + +STARTCHAR multiply +ENCODING 215 +SWIDTH 584 0 +DWIDTH 11 0 +BBX 10 8 0 1 +BITMAP +E1C0 +7380 +3F00 +1E00 +1E00 +3F00 +7380 +E1C0 +ENDCHAR + +STARTCHAR Oslash +ENCODING 216 +SWIDTH 778 0 +DWIDTH 16 0 +BBX 15 14 0 0 +BITMAP +07EE +1FFC +3C38 +387C +78EE +71CE +738E +770E +7E0E +7C1E +381C +7C3C +EFF8 +C7E0 +ENDCHAR + +STARTCHAR Ugrave +ENCODING 217 +SWIDTH 722 0 +DWIDTH 13 0 +BBX 11 18 1 0 +BITMAP +3800 +1C00 +0E00 +0000 +E0E0 +E0E0 +E0E0 +E0E0 +E0E0 +E0E0 +E0E0 +E0E0 +E0E0 +E0E0 +E0E0 +71C0 +7FC0 +1F00 +ENDCHAR + +STARTCHAR Uacute +ENCODING 218 +SWIDTH 722 0 +DWIDTH 13 0 +BBX 11 18 1 0 +BITMAP +0380 +0700 +0E00 +0000 +E0E0 +E0E0 +E0E0 +E0E0 +E0E0 +E0E0 +E0E0 +E0E0 +E0E0 +E0E0 +E0E0 +71C0 +7FC0 +1F00 +ENDCHAR + +STARTCHAR Ucircumflex +ENCODING 219 +SWIDTH 722 0 +DWIDTH 13 0 +BBX 11 18 1 0 +BITMAP +0E00 +1F00 +3B80 +0000 +E0E0 +E0E0 +E0E0 +E0E0 +E0E0 +E0E0 +E0E0 +E0E0 +E0E0 +E0E0 +E0E0 +71C0 +7FC0 +1F00 +ENDCHAR + +STARTCHAR Udieresis +ENCODING 220 +SWIDTH 722 0 +DWIDTH 13 0 +BBX 11 17 1 0 +BITMAP +1980 +1980 +0000 +E0E0 +E0E0 +E0E0 +E0E0 +E0E0 +E0E0 +E0E0 +E0E0 +E0E0 +E0E0 +E0E0 +71C0 +7FC0 +1F00 +ENDCHAR + +STARTCHAR Yacute +ENCODING 221 +SWIDTH 667 0 +DWIDTH 13 0 +BBX 11 18 1 0 +BITMAP +0380 +0700 +0E00 +0000 +E0E0 +E0E0 +E0E0 +71C0 +71C0 +3B80 +3B80 +1F00 +0E00 +0E00 +0E00 +0E00 +0E00 +0E00 +ENDCHAR + +STARTCHAR Thorn +ENCODING 222 +SWIDTH 667 0 +DWIDTH 12 0 +BBX 10 14 1 0 +BITMAP +E000 +E000 +E000 +FE00 +FF80 +E3C0 +E1C0 +E1C0 +E3C0 +FF80 +FE00 +E000 +E000 +E000 +ENDCHAR + +STARTCHAR germandbls +ENCODING 223 +SWIDTH 611 0 +DWIDTH 10 0 +BBX 8 14 1 0 +BITMAP +3C +7E +E7 +E7 +E7 +E7 +EE +EE +E7 +E7 +E7 +E7 +EF +EE +ENDCHAR + +STARTCHAR agrave +ENCODING 224 +SWIDTH 556 0 +DWIDTH 10 0 +BBX 8 14 1 0 +BITMAP +70 +38 +1C +00 +7C +FE +E7 +0F +3F +77 +E7 +E7 +FF +77 +ENDCHAR + +STARTCHAR aacute +ENCODING 225 +SWIDTH 556 0 +DWIDTH 10 0 +BBX 8 14 1 0 +BITMAP +0E +1C +38 +00 +7C +FE +E7 +0F +3F +77 +E7 +E7 +FF +77 +ENDCHAR + +STARTCHAR acircumflex +ENCODING 226 +SWIDTH 556 0 +DWIDTH 10 0 +BBX 8 14 1 0 +BITMAP +1C +3E +77 +00 +7C +FE +E7 +0F +3F +77 +E7 +E7 +FF +77 +ENDCHAR + +STARTCHAR atilde +ENCODING 227 +SWIDTH 556 0 +DWIDTH 10 0 +BBX 8 14 1 0 +BITMAP +3B +7F +6E +00 +7C +FE +E7 +0F +3F +77 +E7 +E7 +FF +77 +ENDCHAR + +STARTCHAR adieresis +ENCODING 228 +SWIDTH 556 0 +DWIDTH 10 0 +BBX 8 13 1 0 +BITMAP +36 +36 +00 +7C +FE +E7 +0F +3F +77 +E7 +E7 +FF +77 +ENDCHAR + +STARTCHAR aring +ENCODING 229 +SWIDTH 556 0 +DWIDTH 10 0 +BBX 8 14 1 0 +BITMAP +1C +36 +36 +1C +7C +FE +E7 +0F +3F +77 +E7 +E7 +FF +77 +ENDCHAR + +STARTCHAR ae +ENCODING 230 +SWIDTH 889 0 +DWIDTH 16 0 +BBX 14 10 1 0 +BITMAP +7CF0 +FFF8 +E71C +0F1C +3FFC +7700 +E700 +EF9C +FFFC +79F0 +ENDCHAR + +STARTCHAR ccedilla +ENCODING 231 +SWIDTH 556 0 +DWIDTH 10 0 +BBX 9 15 1 -5 +BITMAP +1E00 +7F80 +7380 +E000 +E000 +E000 +E000 +7380 +7F80 +1E00 +1800 +1C00 +0600 +3E00 +3C00 +ENDCHAR + +STARTCHAR egrave +ENCODING 232 +SWIDTH 556 0 +DWIDTH 11 0 +BBX 9 14 1 0 +BITMAP +3800 +1C00 +0E00 +0000 +1E00 +7F00 +7380 +E180 +FF80 +FF80 +E000 +7380 +7F80 +1E00 +ENDCHAR + +STARTCHAR eacute +ENCODING 233 +SWIDTH 556 0 +DWIDTH 11 0 +BBX 9 14 1 0 +BITMAP +0700 +0E00 +1C00 +0000 +1E00 +7F00 +7380 +E180 +FF80 +FF80 +E000 +7380 +7F80 +1E00 +ENDCHAR + +STARTCHAR ecircumflex +ENCODING 234 +SWIDTH 556 0 +DWIDTH 11 0 +BBX 9 14 1 0 +BITMAP +0E00 +1F00 +3B80 +0000 +1E00 +7F00 +7380 +E180 +FF80 +FF80 +E000 +7380 +7F80 +1E00 +ENDCHAR + +STARTCHAR edieresis +ENCODING 235 +SWIDTH 556 0 +DWIDTH 11 0 +BBX 9 13 1 0 +BITMAP +3300 +3300 +0000 +1E00 +7F00 +7380 +E180 +FF80 +FF80 +E000 +7380 +7F80 +1E00 +ENDCHAR + +STARTCHAR igrave +ENCODING 236 +SWIDTH 278 0 +DWIDTH 5 0 +BBX 5 14 0 0 +BITMAP +E0 +70 +38 +00 +70 +70 +70 +70 +70 +70 +70 +70 +70 +70 +ENDCHAR + +STARTCHAR iacute +ENCODING 237 +SWIDTH 278 0 +DWIDTH 5 0 +BBX 5 14 0 0 +BITMAP +38 +70 +E0 +00 +70 +70 +70 +70 +70 +70 +70 +70 +70 +70 +ENDCHAR + +STARTCHAR icircumflex +ENCODING 238 +SWIDTH 278 0 +DWIDTH 5 0 +BBX 7 14 -1 0 +BITMAP +38 +7C +EE +00 +38 +38 +38 +38 +38 +38 +38 +38 +38 +38 +ENDCHAR + +STARTCHAR idieresis +ENCODING 239 +SWIDTH 278 0 +DWIDTH 5 0 +BBX 5 13 0 0 +BITMAP +D8 +D8 +00 +70 +70 +70 +70 +70 +70 +70 +70 +70 +70 +ENDCHAR + +STARTCHAR eth +ENCODING 240 +SWIDTH 611 0 +DWIDTH 12 0 +BBX 10 14 1 0 +BITMAP +7000 +1F00 +7C00 +0600 +1F00 +7F80 +7380 +E1C0 +E1C0 +E1C0 +E1C0 +7380 +7F80 +1E00 +ENDCHAR + +STARTCHAR ntilde +ENCODING 241 +SWIDTH 611 0 +DWIDTH 11 0 +BBX 9 14 1 0 +BITMAP +3B00 +7F00 +6E00 +0000 +EF00 +FF80 +F380 +E380 +E380 +E380 +E380 +E380 +E380 +E380 +ENDCHAR + +STARTCHAR ograve +ENCODING 242 +SWIDTH 611 0 +DWIDTH 12 0 +BBX 10 14 1 0 +BITMAP +3800 +1C00 +0E00 +0000 +1E00 +7F80 +7380 +E1C0 +E1C0 +E1C0 +E1C0 +7380 +7F80 +1E00 +ENDCHAR + +STARTCHAR oacute +ENCODING 243 +SWIDTH 611 0 +DWIDTH 12 0 +BBX 10 14 1 0 +BITMAP +0700 +0E00 +1C00 +0000 +1E00 +7F80 +7380 +E1C0 +E1C0 +E1C0 +E1C0 +7380 +7F80 +1E00 +ENDCHAR + +STARTCHAR ocircumflex +ENCODING 244 +SWIDTH 611 0 +DWIDTH 12 0 +BBX 10 14 1 0 +BITMAP +0E00 +1F00 +3B80 +0000 +1E00 +7F80 +7380 +E1C0 +E1C0 +E1C0 +E1C0 +7380 +7F80 +1E00 +ENDCHAR + +STARTCHAR otilde +ENCODING 245 +SWIDTH 611 0 +DWIDTH 12 0 +BBX 10 14 1 0 +BITMAP +1D80 +3F80 +3700 +0000 +1E00 +7F80 +7380 +E1C0 +E1C0 +E1C0 +E1C0 +7380 +7F80 +1E00 +ENDCHAR + +STARTCHAR odieresis +ENCODING 246 +SWIDTH 611 0 +DWIDTH 12 0 +BBX 10 13 1 0 +BITMAP +3300 +3300 +0000 +1E00 +7F80 +7380 +E1C0 +E1C0 +E1C0 +E1C0 +7380 +7F80 +1E00 +ENDCHAR + +STARTCHAR divide +ENCODING 247 +SWIDTH 584 0 +DWIDTH 11 0 +BBX 9 8 1 1 +BITMAP +1C00 +1C00 +0000 +FF80 +FF80 +0000 +1C00 +1C00 +ENDCHAR + +STARTCHAR oslash +ENCODING 248 +SWIDTH 611 0 +DWIDTH 12 0 +BBX 12 10 0 0 +BITMAP +0F30 +3FE0 +38C0 +71E0 +77E0 +7EE0 +78E0 +31C0 +7FC0 +CF00 +ENDCHAR + +STARTCHAR ugrave +ENCODING 249 +SWIDTH 611 0 +DWIDTH 11 0 +BBX 9 14 1 0 +BITMAP +7000 +3800 +1C00 +0000 +E380 +E380 +E380 +E380 +E380 +E380 +E380 +E780 +FF80 +7B80 +ENDCHAR + +STARTCHAR uacute +ENCODING 250 +SWIDTH 611 0 +DWIDTH 11 0 +BBX 9 14 1 0 +BITMAP +0700 +0E00 +1C00 +0000 +E380 +E380 +E380 +E380 +E380 +E380 +E380 +E780 +FF80 +7B80 +ENDCHAR + +STARTCHAR ucircumflex +ENCODING 251 +SWIDTH 611 0 +DWIDTH 11 0 +BBX 9 14 1 0 +BITMAP +1C00 +3E00 +7700 +0000 +E380 +E380 +E380 +E380 +E380 +E380 +E380 +E780 +FF80 +7B80 +ENDCHAR + +STARTCHAR udieresis +ENCODING 252 +SWIDTH 611 0 +DWIDTH 11 0 +BBX 9 13 1 0 +BITMAP +3600 +3600 +0000 +E380 +E380 +E380 +E380 +E380 +E380 +E380 +E780 +FF80 +7B80 +ENDCHAR + +STARTCHAR yacute +ENCODING 253 +SWIDTH 556 0 +DWIDTH 9 0 +BBX 9 18 0 -4 +BITMAP +0700 +0E00 +1C00 +0000 +E380 +E380 +E380 +7700 +7700 +7700 +3E00 +3E00 +1C00 +1C00 +1C00 +1800 +7800 +7000 +ENDCHAR + +STARTCHAR thorn +ENCODING 254 +SWIDTH 611 0 +DWIDTH 12 0 +BBX 10 18 1 -4 +BITMAP +E000 +E000 +E000 +E000 +EF00 +FF80 +F380 +E1C0 +E1C0 +E1C0 +E1C0 +F380 +FF80 +EF00 +E000 +E000 +E000 +E000 +ENDCHAR + +STARTCHAR ydieresis +ENCODING 255 +SWIDTH 556 0 +DWIDTH 9 0 +BBX 9 17 0 -4 +BITMAP +3600 +3600 +0000 +E380 +E380 +E380 +7700 +7700 +7700 +3E00 +3E00 +1C00 +1C00 +1C00 +1800 +7800 +7000 +ENDCHAR + +ENDFONT diff --git a/fonts/helvB18.cc b/fonts/helvB18.cc new file mode 100644 index 0000000000000000000000000000000000000000..5da9b7f5cb70b0de232ff7d9c9a80a712631cf79 GIT binary patch literal 240846 zcmeHwXM-fSakjs{_bb+N6vY!~c6MiGX`h2^OU{<%Y+06X_jbv%sXLiGNu+{*i*wF7 z=bUrSIp-W-pb{SRpwQ@>-tF1D8S=K#)lU}+)rDuOF=+HtPaM4F{NDNVw;!C}IXHdk z;PlSLgZroVpLy=!{=I`&KY#b&)#s-N^ZCKy;_1Wn(~HA{*L=(;9vseQ$FDqi;;9?& zarfTYb8oqGe(* z=6tre`4OM+aqIQ*$<2Ax^5(lQo5 z1^xOr9Nap12dVoI)AVi!?>l>OHhcNgvEI|ux80i0pA6e)Z_O8R`{FIyed*Th$%D7u zz4IW-Bk~nDdp@s-sCR~c)z3S}M?GIyyR3JU~}}ABqGOdnbRMtdx(Bj|tSp9L?sF$US?cDYLGfWqD-2L{$fo zst%E=gsGUQ0z;ji0#O~u-r4Wth?;_@G+>M)A1~qlI!Yvs?uq_B)Xr1oe%{7$ zyL)cVQ}0eZHBTuOWl|w?Ix1&WlM&SuPZYmem60Tn_9!Kny1Ry<)XC0vGT%G)sCaa8 z8S~3)TcTPC!^Gs|GRjNPk7XpbmUDq;4 zEa$2BAf8$zp6ZTKb#MLVG|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jwjzj zLiHqnQ@oXA=1Gp!w~M(M;oMB9e$0gCNYJ@fM`lR#BqG(58M5O_vU9Dj%#a$Cnb4ex6{#~b zqxvzdD$t*P4p06UIxsrunO+pP# zuI6hZ+nitu|?08QTqK+XoIsN`~ecGBSrXwBvem|@P|mKt`y-9lhAz0obw|j zG+%NA{U{05my!(r7zx#x@&)L@RvzwzGUIA zkkEX|!e1q!`H~~}*GOo-WaO`t(0s|)=Ql`bzGUHVlF)p~!rvmH`ckg>Z#s?s?qu2DkW9VF zm-25(rp{#C-;vCG$sOSDqtFITg)sktgyu^|{v!#^mn{4z5}Ger_|GIXU$XFDNNB!f z;lGm5e97(pHximJ8Ts!d?D+CONZ9e^f0D4{%l{&w`cj(t-y~FLa^m_wBvWTfX#Ot= z)te0bKa#OGWl;3PUVL+yK^q1=UwH8RTh1Q5<@xi2JLea7@7;ZH_x?SaX?u46-U|;7 z&R=|R{`@^b9h}~O=D9as+`sqWApUuy%)gasw=a|3mpvKg+lC)$!(W}C8+1K5zxMz| QVa_h@(s1jOH-dHlABsh~Q~&?~ literal 0 HcmV?d00001 diff --git a/fonts/helvB24-ISO8859-1.pcf b/fonts/helvB24-ISO8859-1.pcf new file mode 100644 index 0000000000000000000000000000000000000000..6309e1e8424b13d798f22437983e46e6f189e4fa GIT binary patch literal 19620 zcmchfe{@vkna7`DQi6(LyH-&GiLI^HiUrX<@e=LbeDLfX3wrkz4-L<>4b+^-XPwOAn?RI;5JX_D%%b_dX9#_WdvA9dge!lO$ zcQQ;8fsoyM^11i@@jTD_ywCf-_r5cenb^9P>;yB5!6Y~sH`~s2T$pd=dSitde>MrB z7pQ-djC3ULf7~ohrY6i^fa2nMbi(`uIy8;dv!~4!;2V z1309FT>Ooy-omXoiP-t@q!QnRH%W{;2b|y6l9(Z_n@GsRaSP!VB|ZlSRCO+iuPCve z#8XO4hH>AyY3a%(3zpw*4Xv5ANxP}x=BCBBuU^t{bE7RvrZ*)!Q!NR*wXtd8qUNCV zQ<-$Dtyt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(SUEsdpXHwzaVt2_7@cMI1Yup1tR1MoO}6}}En1M`rzXskiL@&`YLe}P}XEAT7$ zFDSrofw^LD!!h`8I1VQmQ!cS_Pyyp%0ucKczQ^cJ>;j+WR+D!}(~_&5&V z#`OYYGmiGgJpqixxbMOX@UK8S&HU;KN(xa)i2y5GfVH~t^+8qmKuZCB8C#d$#66^vEI zm2eHr0@|*i?TSUv476QA+ZBvY1!GY`>?>%yg0?GYyW)#L+ZEq}gTP(C;z#fk_&NCS z8+ZeL$9K|Wt;uzXu5@S1h6InUY@#J;$?lePqRlpTW%wDBwP|bbYFnGkb)?p}TWcnr zMlPGoweSlimS`i@!7qvg!X2sh_35N#6S-u2I=QYhNV(rlu>`-6l1p{mVcB$7hqYwd z+7h;*C%YlpE^Dbwt97Ik9UJVfWG-Ww_M~;*nX%3dxg?L;Ojpj10QTB{z2Qi!G3alvR!C3DG+ltv@`bsNj%TGtUs z7uWS&sdPHomI=C@&aCGbf71MzOf+n{kJt;MS#+-PRCsOB4W{ABKy_uH zy0S!dWl`t$pt5;GCf9E3ll&Z0J1e`x6nf3ipgK{an+Tds6ix6eL4+Z}dW*uqXiGU6 zC?`vl8M<(4r2?5$AQLVS7iWHWD3nPOhW4PjOdy^K#4{x(Goe6Ht2MPL#S+K_LFft; ky8^|o62-2fMo&=L>4MNxEVkmln3Ov%;`|;M@i&A17q;gA$^ZZW literal 0 HcmV?d00001 diff --git a/fonts/helvB24.bdf b/fonts/helvB24.bdf new file mode 100644 index 0000000..971b857 --- /dev/null +++ b/fonts/helvB24.bdf @@ -0,0 +1,4889 @@ +STARTFONT 2.1 +FONT -Adobe-Helvetica-Bold-R-Normal--24-240-75-75-P-138-ISO8859-1 +SIZE 24 75 75 +FONTBOUNDINGBOX 24 29 -1 -5 + +STARTPROPERTIES 28 +FOUNDRY "Adobe" +FAMILY_NAME "Helvetica" +WEIGHT_NAME "Bold" +SLANT "R" +SETWIDTH_NAME "Normal" +ADD_STYLE_NAME "" +PIXEL_SIZE 24 +POINT_SIZE 240 +RESOLUTION_X 75 +RESOLUTION_Y 75 +SPACING "P" +AVERAGE_WIDTH 138 +CHARSET_REGISTRY "ISO8859" +CHARSET_ENCODING "1" +CAP_HEIGHT 19 +X_HEIGHT 14 +FACE_NAME "Helvetica Bold" +COPYRIGHT "Copyright (c) 1984, 1987 Adobe Systems Incorporated. All Rights Reserved. Copyright (c) 1988, 1991 Digital Equipment Corporation. All Rights Reserved." +NOTICE "Helvetica is a trademark of Linotype-Hell AG and/or its subsidiaries. " +_DEC_DEVICE_FONTNAMES "PS=Helvetica-Bold" +RELATIVE_SETWIDTH 50 +RELATIVE_WEIGHT 70 +FULL_NAME "Helvetica Bold" +WEIGHT 10 +QUAD_WIDTH 15 +DEFAULT_CHAR 0 +FONT_DESCENT 5 +FONT_ASCENT 22 +ENDPROPERTIES + +CHARS 192 + +STARTCHAR defaultchar +ENCODING 0 +SWIDTH 722 0 +DWIDTH 19 0 +BBX 15 19 2 0 +BITMAP +AAAA +0000 +8002 +0000 +8002 +0000 +8002 +0000 +8002 +0000 +8002 +0000 +8002 +0000 +8002 +0000 +8002 +0000 +AAAA +ENDCHAR + +STARTCHAR space +ENCODING 32 +SWIDTH 278 0 +DWIDTH 6 0 +BBX 1 1 0 0 +BITMAP +00 +ENDCHAR + +STARTCHAR exclam +ENCODING 33 +SWIDTH 333 0 +DWIDTH 7 0 +BBX 3 19 2 0 +BITMAP +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +00 +00 +E0 +E0 +E0 +ENDCHAR + +STARTCHAR quotedbl +ENCODING 34 +SWIDTH 474 0 +DWIDTH 9 0 +BBX 5 6 2 13 +BITMAP +D8 +D8 +D8 +D8 +D8 +90 +ENDCHAR + +STARTCHAR numbersign +ENCODING 35 +SWIDTH 556 0 +DWIDTH 14 0 +BBX 12 18 0 0 +BITMAP +0CC0 +0CC0 +0CC0 +0CC0 +0CC0 +7FF0 +7FF0 +1980 +1980 +1980 +1980 +FFE0 +FFE0 +3300 +3300 +3300 +3300 +3300 +ENDCHAR + +STARTCHAR dollar +ENCODING 36 +SWIDTH 556 0 +DWIDTH 13 0 +BBX 12 21 0 -2 +BITMAP +0600 +3F80 +7FC0 +F6E0 +E6E0 +E6E0 +F600 +7E00 +3E00 +0F00 +07C0 +07E0 +06F0 +E670 +E670 +E670 +F6F0 +7FE0 +1FC0 +0600 +0600 +ENDCHAR + +STARTCHAR percent +ENCODING 37 +SWIDTH 889 0 +DWIDTH 22 0 +BBX 21 18 0 0 +BITMAP +000700 +3E0700 +7F0E00 +E38E00 +C19C00 +C19C00 +E3B800 +7F3800 +3E7000 +007000 +00E3E0 +00E7F0 +01CE38 +01CC18 +038C18 +038E38 +0707F0 +0703E0 +ENDCHAR + +STARTCHAR ampersand +ENCODING 38 +SWIDTH 722 0 +DWIDTH 18 0 +BBX 16 18 1 0 +BITMAP +0F80 +1FC0 +3DE0 +38E0 +38E0 +38E0 +1DC0 +0F80 +1F00 +3F9C +7BDC +71FC +E0F8 +E070 +E0F8 +F1FC +7FCE +1F87 +ENDCHAR + +STARTCHAR quotesingle +ENCODING 39 +SWIDTH 238 0 +DWIDTH 6 0 +BBX 2 6 2 13 +BITMAP +C0 +C0 +C0 +C0 +C0 +80 +ENDCHAR + +STARTCHAR parenleft +ENCODING 40 +SWIDTH 333 0 +DWIDTH 8 0 +BBX 6 24 1 -5 +BITMAP +0C +1C +38 +38 +70 +70 +60 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +60 +70 +70 +38 +38 +1C +0C +ENDCHAR + +STARTCHAR parenright +ENCODING 41 +SWIDTH 333 0 +DWIDTH 8 0 +BBX 6 24 1 -5 +BITMAP +C0 +E0 +70 +70 +38 +38 +18 +1C +1C +1C +1C +1C +1C +1C +1C +1C +1C +18 +38 +38 +70 +70 +E0 +C0 +ENDCHAR + +STARTCHAR asterisk +ENCODING 42 +SWIDTH 389 0 +DWIDTH 10 0 +BBX 8 7 1 12 +BITMAP +18 +18 +DB +FF +3C +66 +66 +ENDCHAR + +STARTCHAR plus +ENCODING 43 +SWIDTH 584 0 +DWIDTH 15 0 +BBX 11 12 2 1 +BITMAP +0E00 +0E00 +0E00 +0E00 +0E00 +FFE0 +FFE0 +0E00 +0E00 +0E00 +0E00 +0E00 +ENDCHAR + +STARTCHAR comma +ENCODING 44 +SWIDTH 278 0 +DWIDTH 7 0 +BBX 3 6 2 -3 +BITMAP +E0 +E0 +E0 +60 +60 +C0 +ENDCHAR + +STARTCHAR hyphen +ENCODING 45 +SWIDTH 333 0 +DWIDTH 8 0 +BBX 7 3 0 6 +BITMAP +FE +FE +FE +ENDCHAR + +STARTCHAR period +ENCODING 46 +SWIDTH 278 0 +DWIDTH 7 0 +BBX 3 3 2 0 +BITMAP +E0 +E0 +E0 +ENDCHAR + +STARTCHAR slash +ENCODING 47 +SWIDTH 278 0 +DWIDTH 8 0 +BBX 8 19 0 0 +BITMAP +07 +07 +06 +06 +0E +0C +0C +1C +1C +18 +18 +38 +30 +30 +70 +60 +60 +E0 +E0 +ENDCHAR + +STARTCHAR zero +ENCODING 48 +SWIDTH 556 0 +DWIDTH 13 0 +BBX 12 18 0 0 +BITMAP +1F80 +3FC0 +79E0 +70E0 +70E0 +E070 +E070 +E070 +E070 +E070 +E070 +E070 +E070 +70E0 +70E0 +79E0 +3FC0 +1F80 +ENDCHAR + +STARTCHAR one +ENCODING 49 +SWIDTH 556 0 +DWIDTH 13 0 +BBX 7 18 2 0 +BITMAP +0E +0E +1E +FE +FE +0E +0E +0E +0E +0E +0E +0E +0E +0E +0E +0E +0E +0E +ENDCHAR + +STARTCHAR two +ENCODING 50 +SWIDTH 556 0 +DWIDTH 13 0 +BBX 12 18 0 0 +BITMAP +1F00 +7FC0 +71E0 +E0E0 +E070 +E070 +0070 +00E0 +01E0 +03C0 +0780 +1F00 +3C00 +7800 +F000 +E000 +FFF0 +FFF0 +ENDCHAR + +STARTCHAR three +ENCODING 51 +SWIDTH 556 0 +DWIDTH 13 0 +BBX 12 18 0 0 +BITMAP +1F00 +7FC0 +71C0 +E0E0 +E0E0 +E0E0 +00E0 +01C0 +0F80 +0FE0 +00E0 +0070 +0070 +E070 +E0F0 +71E0 +7FE0 +1F80 +ENDCHAR + +STARTCHAR four +ENCODING 52 +SWIDTH 556 0 +DWIDTH 13 0 +BBX 12 18 0 0 +BITMAP +01C0 +03C0 +03C0 +07C0 +07C0 +0DC0 +1DC0 +19C0 +31C0 +71C0 +61C0 +E1C0 +FFF0 +FFF0 +01C0 +01C0 +01C0 +01C0 +ENDCHAR + +STARTCHAR five +ENCODING 53 +SWIDTH 556 0 +DWIDTH 13 0 +BBX 12 18 0 0 +BITMAP +7FE0 +7FE0 +7000 +7000 +7000 +7000 +7F80 +7FC0 +71E0 +00E0 +0070 +0070 +0070 +E070 +E0F0 +F1E0 +7FC0 +1F80 +ENDCHAR + +STARTCHAR six +ENCODING 54 +SWIDTH 556 0 +DWIDTH 13 0 +BBX 12 18 0 0 +BITMAP +0F80 +3FE0 +78E0 +7070 +E070 +E000 +E000 +EF00 +FFC0 +F9E0 +F0E0 +E070 +E070 +E070 +70E0 +79E0 +3FC0 +1F80 +ENDCHAR + +STARTCHAR seven +ENCODING 55 +SWIDTH 556 0 +DWIDTH 13 0 +BBX 12 18 0 0 +BITMAP +FFF0 +FFF0 +00F0 +00E0 +01C0 +01C0 +0380 +0380 +0700 +0700 +0E00 +0E00 +1E00 +1C00 +1C00 +3C00 +3800 +3800 +ENDCHAR + +STARTCHAR eight +ENCODING 56 +SWIDTH 556 0 +DWIDTH 13 0 +BBX 12 18 0 0 +BITMAP +0F00 +3FC0 +39C0 +70E0 +70E0 +70E0 +70E0 +39C0 +1F80 +3FC0 +70E0 +E070 +E070 +E070 +E070 +70E0 +7FE0 +1F80 +ENDCHAR + +STARTCHAR nine +ENCODING 57 +SWIDTH 556 0 +DWIDTH 13 0 +BBX 12 18 0 0 +BITMAP +1F80 +7FC0 +79E0 +F0E0 +E070 +E070 +E070 +E070 +F0F0 +79F0 +7FF0 +1F70 +0070 +0070 +E0E0 +F3E0 +7FC0 +1F00 +ENDCHAR + +STARTCHAR colon +ENCODING 58 +SWIDTH 333 0 +DWIDTH 7 0 +BBX 3 14 2 0 +BITMAP +E0 +E0 +E0 +00 +00 +00 +00 +00 +00 +00 +00 +E0 +E0 +E0 +ENDCHAR + +STARTCHAR semicolon +ENCODING 59 +SWIDTH 333 0 +DWIDTH 7 0 +BBX 3 17 2 -3 +BITMAP +E0 +E0 +E0 +00 +00 +00 +00 +00 +00 +00 +00 +E0 +E0 +E0 +60 +60 +C0 +ENDCHAR + +STARTCHAR less +ENCODING 60 +SWIDTH 584 0 +DWIDTH 15 0 +BBX 13 12 0 1 +BITMAP +0038 +00F8 +03E0 +0F80 +3E00 +F000 +F000 +3E00 +0F80 +03E0 +00F8 +0038 +ENDCHAR + +STARTCHAR equal +ENCODING 61 +SWIDTH 584 0 +DWIDTH 14 0 +BBX 10 6 2 4 +BITMAP +FFC0 +FFC0 +0000 +0000 +FFC0 +FFC0 +ENDCHAR + +STARTCHAR greater +ENCODING 62 +SWIDTH 584 0 +DWIDTH 14 0 +BBX 13 12 0 1 +BITMAP +E000 +F800 +3E00 +0F80 +03E0 +0078 +0078 +03E0 +0F80 +3E00 +F800 +E000 +ENDCHAR + +STARTCHAR question +ENCODING 63 +SWIDTH 611 0 +DWIDTH 15 0 +BBX 11 19 2 0 +BITMAP +1F80 +7FC0 +79E0 +F0E0 +E0E0 +E1E0 +01C0 +03C0 +0780 +0700 +0E00 +0E00 +0E00 +0E00 +0000 +0000 +0E00 +0E00 +0E00 +ENDCHAR + +STARTCHAR at +ENCODING 64 +SWIDTH 975 0 +DWIDTH 24 0 +BBX 22 22 1 -4 +BITMAP +01FF00 +07FFC0 +0F81F0 +1E0078 +3C0038 +787D9C +70FF9C +F1C71C +E3871C +E30E1C +E70E38 +E70C38 +E71C70 +E71C70 +E39DE0 +F3FFC0 +71F700 +780000 +3C0000 +1F0700 +0FFF00 +03FC00 +ENDCHAR + +STARTCHAR A +ENCODING 65 +SWIDTH 722 0 +DWIDTH 18 0 +BBX 16 19 1 0 +BITMAP +03C0 +03C0 +07E0 +07E0 +0E60 +0E70 +0E70 +1C38 +1C38 +1C38 +381C +381C +3FFC +7FFE +700E +700E +E007 +E007 +E007 +ENDCHAR + +STARTCHAR B +ENCODING 66 +SWIDTH 722 0 +DWIDTH 18 0 +BBX 15 19 2 0 +BITMAP +FFE0 +FFF8 +E078 +E01C +E01C +E01C +E01C +E038 +FFF0 +FFF8 +E01C +E00E +E00E +E00E +E00E +E01E +E07C +FFF8 +FFE0 +ENDCHAR + +STARTCHAR C +ENCODING 67 +SWIDTH 722 0 +DWIDTH 18 0 +BBX 16 19 1 0 +BITMAP +07F0 +1FFC +3E3E +780F +7007 +F000 +E000 +E000 +E000 +E000 +E000 +E000 +E000 +F007 +7007 +780F +3E3E +1FFC +07F0 +ENDCHAR + +STARTCHAR D +ENCODING 68 +SWIDTH 722 0 +DWIDTH 19 0 +BBX 16 19 2 0 +BITMAP +FFE0 +FFF8 +E07C +E01E +E00E +E00F +E007 +E007 +E007 +E007 +E007 +E007 +E007 +E00F +E00E +E01E +E07C +FFF8 +FFE0 +ENDCHAR + +STARTCHAR E +ENCODING 69 +SWIDTH 667 0 +DWIDTH 16 0 +BBX 13 19 2 0 +BITMAP +FFF0 +FFF0 +E000 +E000 +E000 +E000 +E000 +E000 +FFE0 +FFE0 +E000 +E000 +E000 +E000 +E000 +E000 +E000 +FFF8 +FFF8 +ENDCHAR + +STARTCHAR F +ENCODING 70 +SWIDTH 611 0 +DWIDTH 15 0 +BBX 12 19 2 0 +BITMAP +FFF0 +FFF0 +E000 +E000 +E000 +E000 +E000 +E000 +FFE0 +FFE0 +E000 +E000 +E000 +E000 +E000 +E000 +E000 +E000 +E000 +ENDCHAR + +STARTCHAR G +ENCODING 71 +SWIDTH 778 0 +DWIDTH 19 0 +BBX 17 19 1 0 +BITMAP +07F000 +1FFC00 +3E3E00 +780F00 +700700 +F00000 +E00000 +E00000 +E00000 +E07F80 +E07F80 +E00380 +E00380 +F00380 +700780 +780F80 +3E3F80 +1FFB80 +07F180 +ENDCHAR + +STARTCHAR H +ENCODING 72 +SWIDTH 722 0 +DWIDTH 19 0 +BBX 15 19 2 0 +BITMAP +E00E +E00E +E00E +E00E +E00E +E00E +E00E +E00E +FFFE +FFFE +E00E +E00E +E00E +E00E +E00E +E00E +E00E +E00E +E00E +ENDCHAR + +STARTCHAR I +ENCODING 73 +SWIDTH 278 0 +DWIDTH 7 0 +BBX 3 19 2 0 +BITMAP +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +ENDCHAR + +STARTCHAR J +ENCODING 74 +SWIDTH 556 0 +DWIDTH 14 0 +BBX 11 19 1 0 +BITMAP +00E0 +00E0 +00E0 +00E0 +00E0 +00E0 +00E0 +00E0 +00E0 +00E0 +00E0 +00E0 +E0E0 +E0E0 +E0E0 +E0E0 +71E0 +7FC0 +3F80 +ENDCHAR + +STARTCHAR K +ENCODING 75 +SWIDTH 722 0 +DWIDTH 18 0 +BBX 16 19 2 0 +BITMAP +E03C +E078 +E0F0 +E1E0 +E3C0 +E780 +EF00 +FE00 +FE00 +FF00 +F780 +E3C0 +E1E0 +E0F0 +E078 +E03C +E01E +E00F +E007 +ENDCHAR + +STARTCHAR L +ENCODING 76 +SWIDTH 611 0 +DWIDTH 15 0 +BBX 12 19 2 0 +BITMAP +E000 +E000 +E000 +E000 +E000 +E000 +E000 +E000 +E000 +E000 +E000 +E000 +E000 +E000 +E000 +E000 +E000 +FFF0 +FFF0 +ENDCHAR + +STARTCHAR M +ENCODING 77 +SWIDTH 833 0 +DWIDTH 23 0 +BBX 19 19 2 0 +BITMAP +E000E0 +F001E0 +F001E0 +F803E0 +F803E0 +FC07E0 +EC06E0 +EE0EE0 +E60CE0 +E71CE0 +E71CE0 +E318E0 +E3B8E0 +E3B8E0 +E1F0E0 +E1F0E0 +E0E0E0 +E0E0E0 +E0E0E0 +ENDCHAR + +STARTCHAR N +ENCODING 78 +SWIDTH 722 0 +DWIDTH 19 0 +BBX 15 19 2 0 +BITMAP +E00E +F00E +F00E +F80E +F80E +FC0E +EE0E +EE0E +E70E +E38E +E38E +E1CE +E0CE +E0EE +E07E +E03E +E03E +E01E +E00E +ENDCHAR + +STARTCHAR O +ENCODING 79 +SWIDTH 778 0 +DWIDTH 19 0 +BBX 17 19 1 0 +BITMAP +07F000 +1FFC00 +3E3E00 +780F00 +700700 +F00780 +E00380 +E00380 +E00380 +E00380 +E00380 +E00380 +E00380 +F00780 +700700 +780F00 +3E3E00 +1FFC00 +07F000 +ENDCHAR + +STARTCHAR P +ENCODING 80 +SWIDTH 667 0 +DWIDTH 17 0 +BBX 14 19 2 0 +BITMAP +FFE0 +FFF8 +E038 +E01C +E01C +E01C +E01C +E038 +FFF8 +FFF0 +E000 +E000 +E000 +E000 +E000 +E000 +E000 +E000 +E000 +ENDCHAR + +STARTCHAR Q +ENCODING 81 +SWIDTH 778 0 +DWIDTH 19 0 +BBX 17 19 1 0 +BITMAP +07F000 +1FFC00 +3E3E00 +780F00 +700700 +F00780 +E00380 +E00380 +E00380 +E00380 +E00380 +E00380 +E00380 +F00780 +70F700 +787F00 +3E1E00 +1FFF00 +07F780 +ENDCHAR + +STARTCHAR R +ENCODING 82 +SWIDTH 722 0 +DWIDTH 17 0 +BBX 14 19 2 0 +BITMAP +FFE0 +FFF8 +E038 +E01C +E01C +E01C +E01C +E038 +FFF8 +FFF0 +E078 +E038 +E01C +E01C +E01C +E01C +E01C +E01C +E01C +ENDCHAR + +STARTCHAR S +ENCODING 83 +SWIDTH 667 0 +DWIDTH 17 0 +BBX 15 19 1 0 +BITMAP +07E0 +1FF8 +3C7C +781C +701C +7000 +7800 +3E00 +1FE0 +03F8 +007C +001E +000E +E00E +E00E +F01E +7C7C +3FF8 +0FE0 +ENDCHAR + +STARTCHAR T +ENCODING 84 +SWIDTH 611 0 +DWIDTH 15 0 +BBX 15 19 0 0 +BITMAP +FFFE +FFFE +0380 +0380 +0380 +0380 +0380 +0380 +0380 +0380 +0380 +0380 +0380 +0380 +0380 +0380 +0380 +0380 +0380 +ENDCHAR + +STARTCHAR U +ENCODING 85 +SWIDTH 722 0 +DWIDTH 19 0 +BBX 15 19 2 0 +BITMAP +E00E +E00E +E00E +E00E +E00E +E00E +E00E +E00E +E00E +E00E +E00E +E00E +E00E +E00E +F01E +701C +7C7C +3FF8 +0FE0 +ENDCHAR + +STARTCHAR V +ENCODING 86 +SWIDTH 667 0 +DWIDTH 18 0 +BBX 16 19 1 0 +BITMAP +E007 +E007 +F00F +700E +781E +381C +381C +3C3C +1C38 +1C38 +1E78 +0E70 +0E70 +0E70 +07E0 +07E0 +03C0 +03C0 +03C0 +ENDCHAR + +STARTCHAR W +ENCODING 87 +SWIDTH 944 0 +DWIDTH 23 0 +BBX 21 19 1 0 +BITMAP +E07038 +E07038 +E07038 +E07038 +70F870 +70F870 +70D870 +71DC70 +31DC60 +39DCE0 +398CE0 +3B8EE0 +1B8EC0 +1B8EC0 +1F07C0 +1F07C0 +0E0380 +0E0380 +0E0380 +ENDCHAR + +STARTCHAR X +ENCODING 88 +SWIDTH 667 0 +DWIDTH 18 0 +BBX 16 19 1 0 +BITMAP +E007 +F00F +781E +381C +1C38 +0E70 +0FF0 +07E0 +03C0 +03C0 +07E0 +0FF0 +0E70 +1C38 +3C3C +381C +700E +F00F +E007 +ENDCHAR + +STARTCHAR Y +ENCODING 89 +SWIDTH 667 0 +DWIDTH 17 0 +BBX 15 19 1 0 +BITMAP +E00E +F01E +701C +783C +3838 +3C78 +1C70 +1EF0 +0EE0 +0FE0 +07C0 +07C0 +0380 +0380 +0380 +0380 +0380 +0380 +0380 +ENDCHAR + +STARTCHAR Z +ENCODING 90 +SWIDTH 611 0 +DWIDTH 16 0 +BBX 14 19 1 0 +BITMAP +FFFC +FFFC +003C +0078 +00F0 +01E0 +01E0 +03C0 +0780 +0780 +0F00 +1E00 +1E00 +3C00 +3800 +7800 +F000 +FFFC +FFFC +ENDCHAR + +STARTCHAR bracketleft +ENCODING 91 +SWIDTH 333 0 +DWIDTH 8 0 +BBX 5 24 1 -5 +BITMAP +F8 +F8 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +F8 +F8 +ENDCHAR + +STARTCHAR backslash +ENCODING 92 +SWIDTH 278 0 +DWIDTH 8 0 +BBX 8 19 0 0 +BITMAP +E0 +E0 +60 +60 +70 +30 +30 +38 +38 +18 +18 +1C +0C +0C +0E +06 +06 +07 +07 +ENDCHAR + +STARTCHAR bracketright +ENCODING 93 +SWIDTH 333 0 +DWIDTH 8 0 +BBX 5 24 2 -5 +BITMAP +F8 +F8 +38 +38 +38 +38 +38 +38 +38 +38 +38 +38 +38 +38 +38 +38 +38 +38 +38 +38 +38 +38 +F8 +F8 +ENDCHAR + +STARTCHAR asciicircum +ENCODING 94 +SWIDTH 584 0 +DWIDTH 14 0 +BBX 11 9 1 10 +BITMAP +0E00 +0E00 +1F00 +1B00 +3B80 +71C0 +71C0 +E0E0 +E0E0 +ENDCHAR + +STARTCHAR underscore +ENCODING 95 +SWIDTH 556 0 +DWIDTH 14 0 +BBX 14 2 0 -5 +BITMAP +FFFC +FFFC +ENDCHAR + +STARTCHAR grave +ENCODING 96 +SWIDTH 333 0 +DWIDTH 8 0 +BBX 6 4 1 15 +BITMAP +E0 +70 +38 +1C +ENDCHAR + +STARTCHAR a +ENCODING 97 +SWIDTH 556 0 +DWIDTH 14 0 +BBX 12 14 1 0 +BITMAP +1F80 +3FC0 +71E0 +70E0 +00E0 +07E0 +3FE0 +7CE0 +F0E0 +E0E0 +E1E0 +F3E0 +7FF0 +3E70 +ENDCHAR + +STARTCHAR b +ENCODING 98 +SWIDTH 611 0 +DWIDTH 15 0 +BBX 12 19 2 0 +BITMAP +E000 +E000 +E000 +E000 +E000 +EF80 +FFC0 +F9E0 +F0E0 +E070 +E070 +E070 +E070 +E070 +E070 +F0E0 +F9E0 +FFC0 +EF80 +ENDCHAR + +STARTCHAR c +ENCODING 99 +SWIDTH 556 0 +DWIDTH 13 0 +BBX 11 14 1 0 +BITMAP +1F80 +3FC0 +79E0 +70E0 +E000 +E000 +E000 +E000 +E000 +E000 +70E0 +79E0 +3FC0 +1F80 +ENDCHAR + +STARTCHAR d +ENCODING 100 +SWIDTH 611 0 +DWIDTH 15 0 +BBX 12 19 1 0 +BITMAP +0070 +0070 +0070 +0070 +0070 +1F70 +3FF0 +79F0 +70F0 +E070 +E070 +E070 +E070 +E070 +E070 +70F0 +79F0 +3FF0 +1F70 +ENDCHAR + +STARTCHAR e +ENCODING 101 +SWIDTH 556 0 +DWIDTH 14 0 +BBX 12 14 1 0 +BITMAP +0F00 +3FC0 +79E0 +70E0 +E070 +E070 +FFF0 +FFF0 +E000 +E000 +7070 +78F0 +3FE0 +0F80 +ENDCHAR + +STARTCHAR f +ENCODING 102 +SWIDTH 333 0 +DWIDTH 9 0 +BBX 7 19 1 0 +BITMAP +1E +3E +38 +38 +38 +FE +FE +38 +38 +38 +38 +38 +38 +38 +38 +38 +38 +38 +38 +ENDCHAR + +STARTCHAR g +ENCODING 103 +SWIDTH 611 0 +DWIDTH 15 0 +BBX 12 19 1 -5 +BITMAP +1F70 +3FF0 +79F0 +70F0 +E070 +E070 +E070 +E070 +E070 +E070 +70F0 +79F0 +3FF0 +1F70 +0070 +E070 +F0E0 +7FE0 +1F80 +ENDCHAR + +STARTCHAR h +ENCODING 104 +SWIDTH 611 0 +DWIDTH 15 0 +BBX 11 19 2 0 +BITMAP +E000 +E000 +E000 +E000 +E000 +EF00 +FFC0 +F1C0 +E0E0 +E0E0 +E0E0 +E0E0 +E0E0 +E0E0 +E0E0 +E0E0 +E0E0 +E0E0 +E0E0 +ENDCHAR + +STARTCHAR i +ENCODING 105 +SWIDTH 278 0 +DWIDTH 7 0 +BBX 3 19 2 0 +BITMAP +E0 +E0 +E0 +00 +00 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +ENDCHAR + +STARTCHAR j +ENCODING 106 +SWIDTH 278 0 +DWIDTH 7 0 +BBX 5 24 0 -5 +BITMAP +38 +38 +38 +00 +00 +38 +38 +38 +38 +38 +38 +38 +38 +38 +38 +38 +38 +38 +38 +38 +38 +38 +F8 +F0 +ENDCHAR + +STARTCHAR k +ENCODING 107 +SWIDTH 556 0 +DWIDTH 14 0 +BBX 12 19 2 0 +BITMAP +E000 +E000 +E000 +E000 +E000 +E1E0 +E3C0 +E780 +EF00 +FE00 +FC00 +FE00 +EF00 +E700 +E780 +E3C0 +E1C0 +E1E0 +E0F0 +ENDCHAR + +STARTCHAR l +ENCODING 108 +SWIDTH 278 0 +DWIDTH 7 0 +BBX 3 19 2 0 +BITMAP +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +ENDCHAR + +STARTCHAR m +ENCODING 109 +SWIDTH 889 0 +DWIDTH 21 0 +BBX 17 14 2 0 +BITMAP +EF3E00 +FFFF00 +F3E780 +E1C380 +E1C380 +E1C380 +E1C380 +E1C380 +E1C380 +E1C380 +E1C380 +E1C380 +E1C380 +E1C380 +ENDCHAR + +STARTCHAR n +ENCODING 110 +SWIDTH 611 0 +DWIDTH 15 0 +BBX 11 14 2 0 +BITMAP +EF80 +FFC0 +F1C0 +E0E0 +E0E0 +E0E0 +E0E0 +E0E0 +E0E0 +E0E0 +E0E0 +E0E0 +E0E0 +E0E0 +ENDCHAR + +STARTCHAR o +ENCODING 111 +SWIDTH 611 0 +DWIDTH 14 0 +BBX 12 14 1 0 +BITMAP +0F00 +3FC0 +79E0 +70E0 +E070 +E070 +E070 +E070 +E070 +E070 +70E0 +79E0 +3FC0 +0F00 +ENDCHAR + +STARTCHAR p +ENCODING 112 +SWIDTH 611 0 +DWIDTH 15 0 +BBX 12 19 2 -5 +BITMAP +EF80 +FFC0 +F9E0 +F0E0 +E070 +E070 +E070 +E070 +E070 +E070 +F0E0 +F9E0 +FFC0 +EF80 +E000 +E000 +E000 +E000 +E000 +ENDCHAR + +STARTCHAR q +ENCODING 113 +SWIDTH 611 0 +DWIDTH 15 0 +BBX 12 19 1 -5 +BITMAP +1F70 +3FF0 +79F0 +70F0 +E070 +E070 +E070 +E070 +E070 +E070 +70F0 +79F0 +3FF0 +1F70 +0070 +0070 +0070 +0070 +0070 +ENDCHAR + +STARTCHAR r +ENCODING 114 +SWIDTH 389 0 +DWIDTH 10 0 +BBX 7 14 2 0 +BITMAP +E6 +EE +FE +F0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +ENDCHAR + +STARTCHAR s +ENCODING 115 +SWIDTH 556 0 +DWIDTH 13 0 +BBX 11 14 1 0 +BITMAP +3F00 +7F80 +F3C0 +E1C0 +E000 +FC00 +7F80 +0FC0 +01E0 +E0E0 +E0E0 +F1E0 +7FC0 +3F80 +ENDCHAR + +STARTCHAR t +ENCODING 116 +SWIDTH 333 0 +DWIDTH 9 0 +BBX 7 18 1 0 +BITMAP +38 +38 +38 +38 +FE +FE +38 +38 +38 +38 +38 +38 +38 +38 +38 +38 +3E +1E +ENDCHAR + +STARTCHAR u +ENCODING 117 +SWIDTH 611 0 +DWIDTH 15 0 +BBX 11 14 2 0 +BITMAP +E0E0 +E0E0 +E0E0 +E0E0 +E0E0 +E0E0 +E0E0 +E0E0 +E0E0 +E0E0 +E1E0 +73E0 +7EE0 +1CE0 +ENDCHAR + +STARTCHAR v +ENCODING 118 +SWIDTH 556 0 +DWIDTH 14 0 +BBX 12 14 1 0 +BITMAP +E070 +E070 +E070 +70E0 +70E0 +70E0 +39C0 +39C0 +39C0 +1F80 +1F80 +0F00 +0F00 +0F00 +ENDCHAR + +STARTCHAR w +ENCODING 119 +SWIDTH 778 0 +DWIDTH 19 0 +BBX 19 14 0 0 +BITMAP +E0E0E0 +E0E0E0 +60E0C0 +71F1C0 +71F1C0 +31B180 +33B980 +3BBB80 +1B1B00 +1F1F00 +1F1F00 +0E0E00 +0E0E00 +0E0E00 +ENDCHAR + +STARTCHAR x +ENCODING 120 +SWIDTH 556 0 +DWIDTH 13 0 +BBX 11 14 1 0 +BITMAP +E0E0 +F1E0 +71C0 +3B80 +3F80 +1F00 +0E00 +1F00 +1F00 +3B80 +7BC0 +71C0 +F1E0 +E0E0 +ENDCHAR + +STARTCHAR y +ENCODING 121 +SWIDTH 556 0 +DWIDTH 15 0 +BBX 13 19 1 -5 +BITMAP +E038 +E038 +7038 +7870 +3870 +3CF0 +1CE0 +1CE0 +0FC0 +0FC0 +07C0 +0780 +0380 +0380 +0700 +0700 +0E00 +3E00 +3C00 +ENDCHAR + +STARTCHAR z +ENCODING 122 +SWIDTH 500 0 +DWIDTH 13 0 +BBX 11 14 1 0 +BITMAP +FFE0 +FFE0 +01C0 +0380 +0780 +0F00 +0E00 +1E00 +3C00 +3800 +7000 +F000 +FFE0 +FFE0 +ENDCHAR + +STARTCHAR braceleft +ENCODING 123 +SWIDTH 389 0 +DWIDTH 10 0 +BBX 7 24 1 -5 +BITMAP +0E +1C +38 +38 +38 +38 +38 +38 +38 +38 +70 +E0 +E0 +70 +38 +38 +38 +38 +38 +38 +38 +38 +1C +0E +ENDCHAR + +STARTCHAR bar +ENCODING 124 +SWIDTH 280 0 +DWIDTH 7 0 +BBX 3 24 2 -5 +BITMAP +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +ENDCHAR + +STARTCHAR braceright +ENCODING 125 +SWIDTH 389 0 +DWIDTH 10 0 +BBX 7 24 2 -5 +BITMAP +E0 +70 +38 +38 +38 +38 +38 +38 +38 +38 +1C +0E +0E +1C +38 +38 +38 +38 +38 +38 +38 +38 +70 +E0 +ENDCHAR + +STARTCHAR asciitilde +ENCODING 126 +SWIDTH 584 0 +DWIDTH 14 0 +BBX 11 4 1 5 +BITMAP +78E0 +FEE0 +EFE0 +E3C0 +ENDCHAR + +STARTCHAR space +ENCODING 160 +SWIDTH 278 0 +DWIDTH 6 0 +BBX 1 1 0 0 +BITMAP +00 +ENDCHAR + +STARTCHAR exclamdown +ENCODING 161 +SWIDTH 333 0 +DWIDTH 7 0 +BBX 3 19 2 -5 +BITMAP +E0 +E0 +E0 +00 +00 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +ENDCHAR + +STARTCHAR cent +ENCODING 162 +SWIDTH 556 0 +DWIDTH 14 0 +BBX 11 18 1 -2 +BITMAP +0180 +0180 +1F80 +3FC0 +7BE0 +7360 +E300 +E600 +E600 +E600 +E600 +EC00 +ECE0 +7DE0 +7FC0 +3F80 +1800 +1800 +ENDCHAR + +STARTCHAR sterling +ENCODING 163 +SWIDTH 556 0 +DWIDTH 14 0 +BBX 13 18 0 0 +BITMAP +1F80 +3FC0 +70E0 +70E0 +7000 +7800 +3800 +1C00 +FFC0 +FFC0 +1C00 +1C00 +1C00 +3800 +3800 +7738 +FFF8 +F9F0 +ENDCHAR + +STARTCHAR currency +ENCODING 164 +SWIDTH 556 0 +DWIDTH 14 0 +BBX 12 12 1 3 +BITMAP +C030 +EF70 +7FE0 +39C0 +70E0 +70E0 +70E0 +70E0 +39C0 +7FE0 +EF70 +C030 +ENDCHAR + +STARTCHAR yen +ENCODING 165 +SWIDTH 556 0 +DWIDTH 14 0 +BBX 13 18 0 0 +BITMAP +E038 +E038 +7070 +7070 +38E0 +38E0 +1DC0 +1DC0 +7FF0 +7FF0 +0700 +7FF0 +7FF0 +0700 +0700 +0700 +0700 +0700 +ENDCHAR + +STARTCHAR brokenbar +ENCODING 166 +SWIDTH 280 0 +DWIDTH 7 0 +BBX 3 23 2 -4 +BITMAP +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +00 +00 +00 +00 +00 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +ENDCHAR + +STARTCHAR section +ENCODING 167 +SWIDTH 556 0 +DWIDTH 14 0 +BBX 12 24 1 -5 +BITMAP +1F80 +3FC0 +79E0 +70E0 +78E0 +3C00 +1E00 +7F00 +F780 +E3C0 +E1E0 +E0E0 +7070 +7870 +3C70 +1EE0 +0FC0 +0780 +03C0 +71E0 +70E0 +79E0 +3FC0 +1F80 +ENDCHAR + +STARTCHAR dieresis +ENCODING 168 +SWIDTH 333 0 +DWIDTH 9 0 +BBX 7 2 1 16 +BITMAP +EE +EE +ENDCHAR + +STARTCHAR copyright +ENCODING 169 +SWIDTH 737 0 +DWIDTH 19 0 +BBX 17 17 1 0 +BITMAP +07F000 +1E3C00 +380E00 +700700 +63E300 +E73380 +CE3180 +CE0180 +CE0180 +CE0180 +CE3180 +E73180 +63E300 +700700 +380E00 +1E3C00 +07F000 +ENDCHAR + +STARTCHAR ordfeminine +ENCODING 170 +SWIDTH 370 0 +DWIDTH 10 0 +BBX 8 12 1 7 +BITMAP +7C +FE +C6 +1E +7E +E6 +C6 +FF +7B +00 +FF +FF +ENDCHAR + +STARTCHAR guillemotleft +ENCODING 171 +SWIDTH 556 0 +DWIDTH 13 0 +BBX 10 8 1 3 +BITMAP +1DC0 +3B80 +7700 +EE00 +EE00 +7700 +3B80 +1DC0 +ENDCHAR + +STARTCHAR logicalnot +ENCODING 172 +SWIDTH 584 0 +DWIDTH 15 0 +BBX 12 7 1 4 +BITMAP +FFF0 +FFF0 +0030 +0030 +0030 +0030 +0030 +ENDCHAR + +STARTCHAR hyphen +ENCODING 173 +SWIDTH 333 0 +DWIDTH 8 0 +BBX 7 3 0 6 +BITMAP +FE +FE +FE +ENDCHAR + +STARTCHAR registered +ENCODING 174 +SWIDTH 737 0 +DWIDTH 19 0 +BBX 17 17 1 0 +BITMAP +07F000 +1E3C00 +380E00 +700700 +67E300 +E63380 +C63180 +C63180 +C7E180 +C6C180 +C66180 +E63180 +661B00 +700700 +380E00 +1E3C00 +07F000 +ENDCHAR + +STARTCHAR macron +ENCODING 175 +SWIDTH 333 0 +DWIDTH 9 0 +BBX 7 2 1 17 +BITMAP +FE +FE +ENDCHAR + +STARTCHAR degree +ENCODING 176 +SWIDTH 400 0 +DWIDTH 9 0 +BBX 8 7 0 11 +BITMAP +3C +66 +C3 +C3 +C3 +66 +3C +ENDCHAR + +STARTCHAR plusminus +ENCODING 177 +SWIDTH 584 0 +DWIDTH 15 0 +BBX 11 13 2 0 +BITMAP +0E00 +0E00 +0E00 +0E00 +FFE0 +FFE0 +0E00 +0E00 +0E00 +0E00 +0000 +FFE0 +FFE0 +ENDCHAR + +STARTCHAR twosuperior +ENCODING 178 +SWIDTH 333 0 +DWIDTH 7 0 +BBX 6 10 0 8 +BITMAP +78 +FC +CC +0C +1C +78 +E0 +C0 +FC +FC +ENDCHAR + +STARTCHAR threesuperior +ENCODING 179 +SWIDTH 333 0 +DWIDTH 7 0 +BBX 6 10 0 8 +BITMAP +78 +FC +CC +0C +38 +38 +0C +CC +FC +78 +ENDCHAR + +STARTCHAR acute +ENCODING 180 +SWIDTH 333 0 +DWIDTH 8 0 +BBX 6 4 1 15 +BITMAP +1C +38 +70 +E0 +ENDCHAR + +STARTCHAR mu +ENCODING 181 +SWIDTH 611 0 +DWIDTH 15 0 +BBX 11 19 2 -5 +BITMAP +E0E0 +E0E0 +E0E0 +E0E0 +E0E0 +E0E0 +E0E0 +E0E0 +E0E0 +E0E0 +E1E0 +F3E0 +FEE0 +ECE0 +E000 +E000 +E000 +E000 +E000 +ENDCHAR + +STARTCHAR paragraph +ENCODING 182 +SWIDTH 556 0 +DWIDTH 13 0 +BBX 11 24 1 -5 +BITMAP +0FE0 +3FE0 +7CC0 +7CC0 +FCC0 +FCC0 +FCC0 +FCC0 +FCC0 +7CC0 +7CC0 +3CC0 +1CC0 +0CC0 +0CC0 +0CC0 +0CC0 +0CC0 +0CC0 +0CC0 +0CC0 +0CC0 +0CC0 +0CC0 +ENDCHAR + +STARTCHAR periodcentered +ENCODING 183 +SWIDTH 278 0 +DWIDTH 7 0 +BBX 3 3 2 6 +BITMAP +E0 +E0 +E0 +ENDCHAR + +STARTCHAR cedilla +ENCODING 184 +SWIDTH 333 0 +DWIDTH 8 0 +BBX 6 6 1 -5 +BITMAP +70 +78 +1C +1C +FC +78 +ENDCHAR + +STARTCHAR onesuperior +ENCODING 185 +SWIDTH 333 0 +DWIDTH 7 0 +BBX 4 10 0 8 +BITMAP +30 +30 +F0 +F0 +30 +30 +30 +30 +30 +30 +ENDCHAR + +STARTCHAR ordmasculine +ENCODING 186 +SWIDTH 365 0 +DWIDTH 10 0 +BBX 8 12 1 7 +BITMAP +3C +7E +E7 +C3 +C3 +C3 +E7 +7E +3C +00 +FF +FF +ENDCHAR + +STARTCHAR guillemotright +ENCODING 187 +SWIDTH 556 0 +DWIDTH 13 0 +BBX 10 8 1 3 +BITMAP +EE00 +7700 +3B80 +1DC0 +1DC0 +3B80 +7700 +EE00 +ENDCHAR + +STARTCHAR onequarter +ENCODING 188 +SWIDTH 834 0 +DWIDTH 19 0 +BBX 17 18 1 0 +BITMAP +301800 +301800 +F03000 +F03000 +306000 +306000 +30C000 +30C000 +318600 +318E00 +031E00 +031E00 +063600 +066600 +0C7F80 +0C7F80 +180600 +180600 +ENDCHAR + +STARTCHAR onehalf +ENCODING 189 +SWIDTH 834 0 +DWIDTH 19 0 +BBX 16 18 1 0 +BITMAP +3018 +3018 +F030 +F030 +3060 +3060 +30C0 +30C0 +319E +31BF +0333 +0303 +0607 +061E +0C38 +0C30 +183F +183F +ENDCHAR + +STARTCHAR threequarters +ENCODING 190 +SWIDTH 834 0 +DWIDTH 19 0 +BBX 17 18 1 0 +BITMAP +781800 +FC1800 +CC3000 +0C3000 +386000 +386000 +0CC000 +CCC000 +FD8600 +798E00 +031E00 +031E00 +063600 +066600 +0C7F80 +0C7F80 +180600 +180600 +ENDCHAR + +STARTCHAR questiondown +ENCODING 191 +SWIDTH 611 0 +DWIDTH 15 0 +BBX 11 19 2 -5 +BITMAP +0E00 +0E00 +0E00 +0000 +0000 +0E00 +0E00 +0E00 +0E00 +1C00 +3C00 +7800 +7000 +F0E0 +E0E0 +E1E0 +F3C0 +7FC0 +3F00 +ENDCHAR + +STARTCHAR Agrave +ENCODING 192 +SWIDTH 722 0 +DWIDTH 18 0 +BBX 16 24 1 0 +BITMAP +0E00 +0700 +0380 +01C0 +0000 +03C0 +03C0 +07E0 +07E0 +0E60 +0E70 +0E70 +1C38 +1C38 +1C38 +381C +381C +3FFC +7FFE +700E +700E +E007 +E007 +E007 +ENDCHAR + +STARTCHAR Aacute +ENCODING 193 +SWIDTH 722 0 +DWIDTH 18 0 +BBX 16 24 1 0 +BITMAP +0038 +0070 +00E0 +01C0 +0000 +03C0 +03C0 +07E0 +07E0 +0E60 +0E70 +0E70 +1C38 +1C38 +1C38 +381C +381C +3FFC +7FFE +700E +700E +E007 +E007 +E007 +ENDCHAR + +STARTCHAR Acircumflex +ENCODING 194 +SWIDTH 722 0 +DWIDTH 18 0 +BBX 16 24 1 0 +BITMAP +01C0 +03E0 +0770 +0E38 +0000 +03C0 +03C0 +07E0 +07E0 +0E60 +0E70 +0E70 +1C38 +1C38 +1C38 +381C +381C +3FFC +7FFE +700E +700E +E007 +E007 +E007 +ENDCHAR + +STARTCHAR Atilde +ENCODING 195 +SWIDTH 722 0 +DWIDTH 18 0 +BBX 16 23 1 0 +BITMAP +0798 +0FF8 +0CF0 +0000 +03C0 +03C0 +07E0 +07E0 +0E60 +0E70 +0E70 +1C38 +1C38 +1C38 +381C +381C +3FFC +7FFE +700E +700E +E007 +E007 +E007 +ENDCHAR + +STARTCHAR Adieresis +ENCODING 196 +SWIDTH 722 0 +DWIDTH 18 0 +BBX 16 23 1 0 +BITMAP +0E70 +0E70 +0000 +0000 +03C0 +03C0 +07E0 +07E0 +0E60 +0E70 +0E70 +1C38 +1C38 +1C38 +381C +381C +3FFC +7FFE +700E +700E +E007 +E007 +E007 +ENDCHAR + +STARTCHAR Aring +ENCODING 197 +SWIDTH 722 0 +DWIDTH 18 0 +BBX 16 23 1 0 +BITMAP +03C0 +0660 +0660 +0660 +03C0 +03C0 +07E0 +07E0 +0E60 +0E70 +0E70 +1C38 +1C38 +1C38 +381C +381C +3FFC +7FFE +700E +700E +E007 +E007 +E007 +ENDCHAR + +STARTCHAR AE +ENCODING 198 +SWIDTH 1000 0 +DWIDTH 24 0 +BBX 22 19 1 0 +BITMAP +03FFF8 +03FFF8 +07F000 +067000 +0E7000 +0E7000 +0E7000 +1C7000 +1C7FF0 +1C7FF0 +387000 +387000 +3FF000 +7FF000 +707000 +707000 +E07000 +E07FFC +E07FFC +ENDCHAR + +STARTCHAR Ccedilla +ENCODING 199 +SWIDTH 722 0 +DWIDTH 18 0 +BBX 16 24 1 -5 +BITMAP +07F0 +1FFC +3E3E +780F +7007 +F000 +E000 +E000 +E000 +E000 +E000 +E000 +E000 +F007 +7007 +780F +3E3E +1FFC +07F0 +03C0 +00E0 +00E0 +07E0 +03C0 +ENDCHAR + +STARTCHAR Egrave +ENCODING 200 +SWIDTH 667 0 +DWIDTH 16 0 +BBX 13 24 2 0 +BITMAP +7000 +3800 +1C00 +0E00 +0000 +FFF0 +FFF0 +E000 +E000 +E000 +E000 +E000 +E000 +FFE0 +FFE0 +E000 +E000 +E000 +E000 +E000 +E000 +E000 +FFF8 +FFF8 +ENDCHAR + +STARTCHAR Eacute +ENCODING 201 +SWIDTH 667 0 +DWIDTH 16 0 +BBX 13 24 2 0 +BITMAP +00E0 +01C0 +0380 +0700 +0000 +FFF0 +FFF0 +E000 +E000 +E000 +E000 +E000 +E000 +FFE0 +FFE0 +E000 +E000 +E000 +E000 +E000 +E000 +E000 +FFF8 +FFF8 +ENDCHAR + +STARTCHAR Ecircumflex +ENCODING 202 +SWIDTH 667 0 +DWIDTH 16 0 +BBX 13 24 2 0 +BITMAP +0700 +0F80 +1DC0 +38E0 +0000 +FFF0 +FFF0 +E000 +E000 +E000 +E000 +E000 +E000 +FFE0 +FFE0 +E000 +E000 +E000 +E000 +E000 +E000 +E000 +FFF8 +FFF8 +ENDCHAR + +STARTCHAR Edieresis +ENCODING 203 +SWIDTH 667 0 +DWIDTH 16 0 +BBX 13 23 2 0 +BITMAP +39C0 +39C0 +0000 +0000 +FFF0 +FFF0 +E000 +E000 +E000 +E000 +E000 +E000 +FFE0 +FFE0 +E000 +E000 +E000 +E000 +E000 +E000 +E000 +FFF8 +FFF8 +ENDCHAR + +STARTCHAR Igrave +ENCODING 204 +SWIDTH 278 0 +DWIDTH 7 0 +BBX 6 24 0 0 +BITMAP +E0 +70 +38 +1C +00 +38 +38 +38 +38 +38 +38 +38 +38 +38 +38 +38 +38 +38 +38 +38 +38 +38 +38 +38 +ENDCHAR + +STARTCHAR Iacute +ENCODING 205 +SWIDTH 278 0 +DWIDTH 7 0 +BBX 6 24 2 0 +BITMAP +1C +38 +70 +E0 +00 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +ENDCHAR + +STARTCHAR Icircumflex +ENCODING 206 +SWIDTH 278 0 +DWIDTH 7 0 +BBX 9 24 -1 0 +BITMAP +1C00 +3E00 +7700 +E380 +0000 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +ENDCHAR + +STARTCHAR Idieresis +ENCODING 207 +SWIDTH 278 0 +DWIDTH 7 0 +BBX 7 23 0 0 +BITMAP +EE +EE +00 +00 +38 +38 +38 +38 +38 +38 +38 +38 +38 +38 +38 +38 +38 +38 +38 +38 +38 +38 +38 +ENDCHAR + +STARTCHAR Eth +ENCODING 208 +SWIDTH 722 0 +DWIDTH 19 0 +BBX 19 19 -1 0 +BITMAP +1FFC00 +1FFF00 +1C0F80 +1C03C0 +1C01C0 +1C01E0 +1C00E0 +1C00E0 +FFC0E0 +FFC0E0 +1C00E0 +1C00E0 +1C00E0 +1C01E0 +1C01C0 +1C03C0 +1C0F80 +1FFF00 +1FFC00 +ENDCHAR + +STARTCHAR Ntilde +ENCODING 209 +SWIDTH 722 0 +DWIDTH 19 0 +BBX 15 23 2 0 +BITMAP +0E30 +1FF0 +19E0 +0000 +E00E +F00E +F00E +F80E +F80E +FC0E +EE0E +EE0E +E70E +E38E +E38E +E1CE +E0CE +E0EE +E07E +E03E +E03E +E01E +E00E +ENDCHAR + +STARTCHAR Ograve +ENCODING 210 +SWIDTH 778 0 +DWIDTH 19 0 +BBX 17 24 1 0 +BITMAP +070000 +038000 +01C000 +00E000 +000000 +07F000 +1FFC00 +3E3E00 +780F00 +700700 +F00780 +E00380 +E00380 +E00380 +E00380 +E00380 +E00380 +E00380 +F00780 +700700 +780F00 +3E3E00 +1FFC00 +07F000 +ENDCHAR + +STARTCHAR Oacute +ENCODING 211 +SWIDTH 778 0 +DWIDTH 19 0 +BBX 17 24 1 0 +BITMAP +003800 +007000 +00E000 +01C000 +000000 +07F000 +1FFC00 +3E3E00 +780F00 +700700 +F00780 +E00380 +E00380 +E00380 +E00380 +E00380 +E00380 +E00380 +F00780 +700700 +780F00 +3E3E00 +1FFC00 +07F000 +ENDCHAR + +STARTCHAR Ocircumflex +ENCODING 212 +SWIDTH 778 0 +DWIDTH 19 0 +BBX 17 24 1 0 +BITMAP +01C000 +03E000 +077000 +0E3800 +000000 +07F000 +1FFC00 +3E3E00 +780F00 +700700 +F00780 +E00380 +E00380 +E00380 +E00380 +E00380 +E00380 +E00380 +F00780 +700700 +780F00 +3E3E00 +1FFC00 +07F000 +ENDCHAR + +STARTCHAR Otilde +ENCODING 213 +SWIDTH 778 0 +DWIDTH 19 0 +BBX 17 24 1 0 +BITMAP +079800 +0FF800 +0CF000 +000000 +000000 +07F000 +1FFC00 +3E3E00 +780F00 +700700 +F00780 +E00380 +E00380 +E00380 +E00380 +E00380 +E00380 +E00380 +F00780 +700700 +780F00 +3E3E00 +1FFC00 +07F000 +ENDCHAR + +STARTCHAR Odieresis +ENCODING 214 +SWIDTH 778 0 +DWIDTH 19 0 +BBX 17 23 1 0 +BITMAP +0E3800 +0E3800 +000000 +000000 +07F000 +1FFC00 +3E3E00 +780F00 +700700 +F00780 +E00380 +E00380 +E00380 +E00380 +E00380 +E00380 +E00380 +F00780 +700700 +780F00 +3E3E00 +1FFC00 +07F000 +ENDCHAR + +STARTCHAR multiply +ENCODING 215 +SWIDTH 584 0 +DWIDTH 15 0 +BBX 12 12 1 1 +BITMAP +4020 +E070 +70E0 +39C0 +1F80 +0F00 +0F00 +1F80 +39C0 +70E0 +E070 +4020 +ENDCHAR + +STARTCHAR Oslash +ENCODING 216 +SWIDTH 778 0 +DWIDTH 19 0 +BBX 19 19 0 0 +BITMAP +03F860 +0FFEE0 +1F1FC0 +3C0380 +380780 +780FC0 +701DC0 +7039C0 +7071C0 +70E1C0 +71C1C0 +7381C0 +7701C0 +7E03C0 +3C0380 +3C0780 +7F1F00 +EFFE00 +C3F800 +ENDCHAR + +STARTCHAR Ugrave +ENCODING 217 +SWIDTH 722 0 +DWIDTH 19 0 +BBX 15 24 2 0 +BITMAP +0E00 +0700 +0380 +01C0 +0000 +E00E +E00E +E00E +E00E +E00E +E00E +E00E +E00E +E00E +E00E +E00E +E00E +E00E +F01E +F01E +701C +7C7C +3FF8 +0FE0 +ENDCHAR + +STARTCHAR Uacute +ENCODING 218 +SWIDTH 722 0 +DWIDTH 19 0 +BBX 15 24 2 0 +BITMAP +0070 +00E0 +01C0 +0380 +0000 +E00E +E00E +E00E +E00E +E00E +E00E +E00E +E00E +E00E +E00E +E00E +E00E +E00E +F01E +F01E +701C +7C7C +3FF8 +0FE0 +ENDCHAR + +STARTCHAR Ucircumflex +ENCODING 219 +SWIDTH 722 0 +DWIDTH 19 0 +BBX 15 24 2 0 +BITMAP +0780 +0FC0 +1CE0 +3870 +0000 +E00E +E00E +E00E +E00E +E00E +E00E +E00E +E00E +E00E +E00E +E00E +E00E +E00E +F01E +F01E +701C +7C7C +3FF8 +0FE0 +ENDCHAR + +STARTCHAR Udieresis +ENCODING 220 +SWIDTH 722 0 +DWIDTH 19 0 +BBX 15 23 2 0 +BITMAP +1C70 +1C70 +0000 +0000 +E00E +E00E +E00E +E00E +E00E +E00E +E00E +E00E +E00E +E00E +E00E +E00E +E00E +F01E +F01E +701C +7C7C +3FF8 +0FE0 +ENDCHAR + +STARTCHAR Yacute +ENCODING 221 +SWIDTH 667 0 +DWIDTH 17 0 +BBX 15 24 1 0 +BITMAP +0070 +00E0 +01C0 +0380 +0000 +F01E +701C +783C +3838 +3C78 +1C70 +1EF0 +0EE0 +0FE0 +07C0 +07C0 +0380 +0380 +0380 +0380 +0380 +0380 +0380 +0380 +ENDCHAR + +STARTCHAR Thorn +ENCODING 222 +SWIDTH 667 0 +DWIDTH 17 0 +BBX 14 19 2 0 +BITMAP +E000 +E000 +E000 +E000 +FFE0 +FFF8 +E038 +E01C +E01C +E01C +E01C +E038 +FFF8 +FFF0 +E000 +E000 +E000 +E000 +E000 +ENDCHAR + +STARTCHAR germandbls +ENCODING 223 +SWIDTH 611 0 +DWIDTH 14 0 +BBX 11 19 2 0 +BITMAP +1E00 +7F80 +F380 +E1C0 +E1C0 +E1C0 +E1C0 +E380 +EF00 +EF80 +E3C0 +E1C0 +E0E0 +E0E0 +E0E0 +E0E0 +E1C0 +EFC0 +EF80 +ENDCHAR + +STARTCHAR agrave +ENCODING 224 +SWIDTH 556 0 +DWIDTH 14 0 +BBX 12 19 1 0 +BITMAP +1C00 +0E00 +0700 +0380 +0000 +1F80 +3FC0 +71E0 +70E0 +00E0 +07E0 +3FE0 +7CE0 +F0E0 +E0E0 +E1E0 +F3E0 +7FF0 +3E70 +ENDCHAR + +STARTCHAR aacute +ENCODING 225 +SWIDTH 556 0 +DWIDTH 14 0 +BBX 12 19 1 0 +BITMAP +01C0 +0380 +0700 +0E00 +0000 +1F80 +3FC0 +71E0 +70E0 +00E0 +07E0 +3FE0 +7CE0 +F0E0 +E0E0 +E1E0 +F3E0 +7FF0 +3E70 +ENDCHAR + +STARTCHAR acircumflex +ENCODING 226 +SWIDTH 556 0 +DWIDTH 14 0 +BBX 12 19 1 0 +BITMAP +0700 +0F80 +1DC0 +38E0 +0000 +1F80 +3FC0 +71E0 +70E0 +00E0 +07E0 +3FE0 +7CE0 +F0E0 +E0E0 +E1E0 +F3E0 +7FF0 +3E70 +ENDCHAR + +STARTCHAR atilde +ENCODING 227 +SWIDTH 556 0 +DWIDTH 14 0 +BBX 12 19 1 0 +BITMAP +1E60 +3FE0 +33C0 +0000 +0000 +1F80 +3FC0 +71E0 +70E0 +00E0 +07E0 +3FE0 +7CE0 +F0E0 +E0E0 +E1E0 +F3E0 +7FF0 +3E70 +ENDCHAR + +STARTCHAR adieresis +ENCODING 228 +SWIDTH 556 0 +DWIDTH 14 0 +BBX 12 18 1 0 +BITMAP +1DC0 +1DC0 +0000 +0000 +1F80 +3FC0 +71E0 +70E0 +00E0 +07E0 +3FE0 +7CE0 +F0E0 +E0E0 +E1E0 +F3E0 +7FF0 +3E70 +ENDCHAR + +STARTCHAR aring +ENCODING 229 +SWIDTH 556 0 +DWIDTH 14 0 +BBX 12 19 1 0 +BITMAP +0F00 +1980 +1980 +1980 +0F00 +1F80 +3FC0 +71E0 +70E0 +00E0 +07E0 +3FE0 +7CE0 +F0E0 +E0E0 +E1E0 +F3E0 +7FF0 +3E70 +ENDCHAR + +STARTCHAR ae +ENCODING 230 +SWIDTH 889 0 +DWIDTH 22 0 +BBX 20 14 1 0 +BITMAP +1F8F00 +3FFFC0 +71F9E0 +70F0E0 +00E070 +07E070 +3FFFF0 +7CFFF0 +F0E000 +E0E000 +E1F070 +F3F8F0 +7F3FE0 +3E0F80 +ENDCHAR + +STARTCHAR ccedilla +ENCODING 231 +SWIDTH 556 0 +DWIDTH 13 0 +BBX 11 19 1 -5 +BITMAP +1F80 +3FC0 +79E0 +70E0 +E000 +E000 +E000 +E000 +E000 +E000 +70E0 +79E0 +3FC0 +1F80 +1E00 +0700 +0700 +3F00 +1E00 +ENDCHAR + +STARTCHAR egrave +ENCODING 232 +SWIDTH 556 0 +DWIDTH 14 0 +BBX 12 19 1 0 +BITMAP +1C00 +0E00 +0700 +0380 +0000 +0F00 +3FC0 +79E0 +70E0 +E070 +E070 +FFF0 +FFF0 +E000 +E000 +7070 +78F0 +3FE0 +0F80 +ENDCHAR + +STARTCHAR eacute +ENCODING 233 +SWIDTH 556 0 +DWIDTH 14 0 +BBX 12 19 1 0 +BITMAP +01C0 +0380 +0700 +0E00 +0000 +0F00 +3FC0 +79E0 +70E0 +E070 +E070 +FFF0 +FFF0 +E000 +E000 +7070 +78F0 +3FE0 +0F80 +ENDCHAR + +STARTCHAR ecircumflex +ENCODING 234 +SWIDTH 556 0 +DWIDTH 14 0 +BBX 12 19 1 0 +BITMAP +0700 +0F80 +1DC0 +38E0 +0000 +0F00 +3FC0 +79E0 +70E0 +E070 +E070 +FFF0 +FFF0 +E000 +E000 +7070 +78F0 +3FE0 +0F80 +ENDCHAR + +STARTCHAR edieresis +ENCODING 235 +SWIDTH 556 0 +DWIDTH 14 0 +BBX 12 18 1 0 +BITMAP +39C0 +39C0 +0000 +0000 +0F00 +3FC0 +79E0 +70E0 +E070 +E070 +FFF0 +FFF0 +E000 +E000 +7070 +78F0 +3FE0 +0F80 +ENDCHAR + +STARTCHAR igrave +ENCODING 236 +SWIDTH 278 0 +DWIDTH 7 0 +BBX 6 19 1 0 +BITMAP +E0 +70 +38 +1C +00 +70 +70 +70 +70 +70 +70 +70 +70 +70 +70 +70 +70 +70 +70 +ENDCHAR + +STARTCHAR iacute +ENCODING 237 +SWIDTH 278 0 +DWIDTH 7 0 +BBX 6 19 1 0 +BITMAP +1C +38 +70 +E0 +00 +70 +70 +70 +70 +70 +70 +70 +70 +70 +70 +70 +70 +70 +70 +ENDCHAR + +STARTCHAR icircumflex +ENCODING 238 +SWIDTH 278 0 +DWIDTH 7 0 +BBX 9 19 -1 0 +BITMAP +1C00 +3E00 +7700 +E380 +0000 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +ENDCHAR + +STARTCHAR idieresis +ENCODING 239 +SWIDTH 278 0 +DWIDTH 7 0 +BBX 7 18 0 0 +BITMAP +EE +EE +00 +00 +38 +38 +38 +38 +38 +38 +38 +38 +38 +38 +38 +38 +38 +38 +ENDCHAR + +STARTCHAR eth +ENCODING 240 +SWIDTH 611 0 +DWIDTH 14 0 +BBX 12 19 1 0 +BITMAP +E000 +39C0 +1F00 +3E00 +C300 +0F80 +3FC0 +79E0 +70E0 +E070 +E070 +E070 +E070 +E070 +E070 +70E0 +79E0 +3FC0 +0F00 +ENDCHAR + +STARTCHAR ntilde +ENCODING 241 +SWIDTH 611 0 +DWIDTH 15 0 +BBX 11 19 2 0 +BITMAP +3CC0 +7FC0 +6780 +0000 +0000 +EF80 +FFC0 +F1C0 +E0E0 +E0E0 +E0E0 +E0E0 +E0E0 +E0E0 +E0E0 +E0E0 +E0E0 +E0E0 +E0E0 +ENDCHAR + +STARTCHAR ograve +ENCODING 242 +SWIDTH 611 0 +DWIDTH 14 0 +BBX 12 19 1 0 +BITMAP +1C00 +0E00 +0700 +0380 +0000 +0F00 +3FC0 +79E0 +70E0 +E070 +E070 +E070 +E070 +E070 +E070 +70E0 +79E0 +3FC0 +0F00 +ENDCHAR + +STARTCHAR oacute +ENCODING 243 +SWIDTH 611 0 +DWIDTH 14 0 +BBX 12 19 1 0 +BITMAP +01C0 +0380 +0700 +0E00 +0000 +0F00 +3FC0 +79E0 +70E0 +E070 +E070 +E070 +E070 +E070 +E070 +70E0 +79E0 +3FC0 +0F00 +ENDCHAR + +STARTCHAR ocircumflex +ENCODING 244 +SWIDTH 611 0 +DWIDTH 14 0 +BBX 12 19 1 0 +BITMAP +0700 +0F80 +1DC0 +38E0 +0000 +0F00 +3FC0 +79E0 +70E0 +E070 +E070 +E070 +E070 +E070 +E070 +70E0 +79E0 +3FC0 +0F00 +ENDCHAR + +STARTCHAR otilde +ENCODING 245 +SWIDTH 611 0 +DWIDTH 14 0 +BBX 12 19 1 0 +BITMAP +1E60 +3FE0 +33C0 +0000 +0000 +0F00 +3FC0 +79E0 +70E0 +E070 +E070 +E070 +E070 +E070 +E070 +70E0 +79E0 +3FC0 +0F00 +ENDCHAR + +STARTCHAR odieresis +ENCODING 246 +SWIDTH 611 0 +DWIDTH 14 0 +BBX 12 18 1 0 +BITMAP +1DC0 +1DC0 +0000 +0000 +0F00 +3FC0 +79E0 +70E0 +E070 +E070 +E070 +E070 +E070 +E070 +70E0 +79E0 +3FC0 +0F00 +ENDCHAR + +STARTCHAR divide +ENCODING 247 +SWIDTH 584 0 +DWIDTH 15 0 +BBX 11 12 2 1 +BITMAP +0E00 +0E00 +0E00 +0000 +0000 +FFE0 +FFE0 +0000 +0000 +0E00 +0E00 +0E00 +ENDCHAR + +STARTCHAR oslash +ENCODING 248 +SWIDTH 611 0 +DWIDTH 14 0 +BBX 14 14 0 0 +BITMAP +078C +1FF8 +3CF0 +3870 +70F8 +71F8 +73B8 +7738 +7E38 +7C38 +3870 +7CF0 +DFE0 +8780 +ENDCHAR + +STARTCHAR ugrave +ENCODING 249 +SWIDTH 611 0 +DWIDTH 15 0 +BBX 11 19 2 0 +BITMAP +3800 +1C00 +0E00 +0700 +0000 +E0E0 +E0E0 +E0E0 +E0E0 +E0E0 +E0E0 +E0E0 +E0E0 +E0E0 +E0E0 +E1E0 +73E0 +7EE0 +1CE0 +ENDCHAR + +STARTCHAR uacute +ENCODING 250 +SWIDTH 611 0 +DWIDTH 15 0 +BBX 11 19 2 0 +BITMAP +0380 +0700 +0E00 +1C00 +0000 +E0E0 +E0E0 +E0E0 +E0E0 +E0E0 +E0E0 +E0E0 +E0E0 +E0E0 +E0E0 +E1E0 +73E0 +7EE0 +1CE0 +ENDCHAR + +STARTCHAR ucircumflex +ENCODING 251 +SWIDTH 611 0 +DWIDTH 15 0 +BBX 11 19 2 0 +BITMAP +0E00 +1F00 +3B80 +71C0 +0000 +E0E0 +E0E0 +E0E0 +E0E0 +E0E0 +E0E0 +E0E0 +E0E0 +E0E0 +E0E0 +E1E0 +73E0 +7EE0 +1CE0 +ENDCHAR + +STARTCHAR udieresis +ENCODING 252 +SWIDTH 611 0 +DWIDTH 15 0 +BBX 11 18 2 0 +BITMAP +3B80 +3B80 +0000 +0000 +E0E0 +E0E0 +E0E0 +E0E0 +E0E0 +E0E0 +E0E0 +E0E0 +E0E0 +E0E0 +E1E0 +73E0 +7EE0 +1CE0 +ENDCHAR + +STARTCHAR yacute +ENCODING 253 +SWIDTH 556 0 +DWIDTH 15 0 +BBX 13 24 1 -5 +BITMAP +00E0 +01C0 +0380 +0700 +0000 +E038 +E038 +7038 +7870 +3870 +3CF0 +1CE0 +1CE0 +0FC0 +0FC0 +07C0 +0780 +0380 +0380 +0700 +0700 +0E00 +3E00 +3C00 +ENDCHAR + +STARTCHAR thorn +ENCODING 254 +SWIDTH 611 0 +DWIDTH 15 0 +BBX 12 24 2 -5 +BITMAP +E000 +E000 +E000 +E000 +E000 +EF80 +FFC0 +F9E0 +F0E0 +E070 +E070 +E070 +E070 +E070 +E070 +F0E0 +F9E0 +FFC0 +EF80 +E000 +E000 +E000 +E000 +E000 +ENDCHAR + +STARTCHAR ydieresis +ENCODING 255 +SWIDTH 556 0 +DWIDTH 15 0 +BBX 13 23 1 -5 +BITMAP +1CE0 +1CE0 +0000 +0000 +E038 +E038 +7038 +7870 +3870 +3CF0 +1CE0 +1CE0 +0FC0 +0FC0 +07C0 +0780 +0380 +0380 +0700 +0700 +0E00 +3E00 +3C00 +ENDCHAR + +ENDFONT diff --git a/fonts/helvB24.cc b/fonts/helvB24.cc new file mode 100644 index 0000000000000000000000000000000000000000..8ed2c3b25df3ee83c4522a16483b36bf3f5c72a3 GIT binary patch literal 298697 zcmeHwXM^OparXOpf5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B1;2dwmXip@(_T0B#XshC%+w0LSedLt`6o|601 zth9J){d|U%7Ee`v8Y?ZHT4_I>l@?D$KFdmrr~cah3|4wPCHLo8*^1}$th9Kl^KT-h zj}xo%Gg;~J6rO*9m92Qb$V!W+M(H6dJ)Yvyn^|e`)M9=XD?Of4li$KhkEdL?msn}> zR6k#4rNvW8^|M*&@f7Djhn1~(zLk|0PaPciTvmEKr80aTD?Og#CwDb{EEsS4J{BC5 z9#1%Z0`k`S&FBR1qWm)o<0^FkfnI~Sa3j=;^||-0a=Qtj|B&0DV{zS9FV1W`dDy4T6@>d z-se+I_K{#EmM>tX$5ZP37qZgprzpROl^#z~elaV(ev0x-SZVRpjJ}kWUOxr-WvsM# zrV2t#`{k@`)z7bBrN>j6_E)mf>!;AgSFzILDHQb8thD;6HeAP- z(&DMguP3FC^eQiX11l|_TJ~>brNvW~-^5Cbr@Hjbtn_$_^WVZsi>Gqkx3bdWsW!ij zl@?F6`R%Nj0KgCLmr(TYqW~Iebl|REui>F@ApJk=RQ;|Q% zN{gqC9R55heWX^e(J!#l<0)737g_1?6y-0m(&H)0UuLDpQj0zrjk6rzn4ul^#z~{uV1Oo|^k_v(nD*uL+7Ei68f6GdXry~E3 zm92RGJt=*pRhi)*SlNo_KeDnF&wpZNE1v(%%2qu8g_Rahy>S1^N{^@1&wpcOE1v(( zN{^=?|AUntPf`9SD?Of~{4Z8oJhhnr%}R@>D*uO-7Ee|FFDoscs{B7zN<4Ke^?hD? zQ<~device = device; + return 1; +} + +int Led::shutdown() +{ + if (!initted) return 0; + initted = 0; + device = 0; + return 1; +} + +int Led::on() +{ + if (!initted) return 0; + + int result = ioctl(device, IR_SET_LED, 0); + if (result >= 0) return 1; + else return 0; +} + +int Led::off() +{ + if (!initted) return 0; + + int result = ioctl(device, IR_SET_LED, 1); + if (result >= 0) return 1; + else return 0; +} diff --git a/led.h b/led.h new file mode 100644 index 0000000..4b67e0b --- /dev/null +++ b/led.h @@ -0,0 +1,48 @@ +/* + Copyright 2004-2005 Chris Tallon + + This file is part of VOMP. + + VOMP 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. + + VOMP is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with VOMP; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#ifndef LED_H +#define LED_H + +#include +#include + +#include "stb.h" + +class Led +{ + public: + Led(); + ~Led(); + static Led* getInstance(); + + int init(int device); + int shutdown(); + + int on(); + int off(); + + private: + static Led* instance; + int initted; + int device; +}; + +#endif diff --git a/list.cc b/list.cc new file mode 100644 index 0000000..39a049d --- /dev/null +++ b/list.cc @@ -0,0 +1,170 @@ +/* + Copyright 2004-2005 Chris Tallon + + This file is part of VOMP. + + VOMP 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. + + VOMP is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with VOMP; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#include "list.h" + +// ------ Constructor add delete get methods ------------------------------------- + +List::List(void) +{ + start = NULL; + current = NULL; + prev = NULL; + numElements = 0; +} + +List::~List() +{ + while (!isEmpty()) + { + reset(); + remove(); + } + numElements = 0; +} + +void List::add(void *newData) +{ + Node *temp = new Node(newData, current); + current = temp; + if (prev == 0) + start = current; + else + prev->setPtr(current); + ++numElements; +} + +void *List::getCurrent(void) const +{ + if (current == 0) return 0; + else return current->getData(); +} + +void *List::remove(void) +{ + if (current == 0) return 0; + Node *dN; + + if (prev == 0) + start = current->getPtr(); + else + prev->setPtr(current->getPtr()); + dN = current; + current = current->getPtr(); + + // saved a reference to the Node in dN and current points to where it should + // that's dN out of the list but it still needs to be deleted, and what it + // points to + + void *returnObject; + returnObject = dN->getData(); + delete dN; + --numElements; + return returnObject; +} + +void List::remove(void *removeThis) +{ + reset(); + while((!eol()) && (current->getData() != removeThis)) next(); + // Now use method above to actually remove the node and get the object + remove(); +} + +unsigned long int List::getNumElements() +{ + return numElements; +} + +// ------ Pointer shift methods ----------------------------------------------- + +void List::reset(void) +{ + current = start; + prev = 0; +} + +void List::next(void) +{ + if (current == 0) return; + prev = current; + current = current->getPtr(); +} + +// ------ Boolean methods ----------------------------------------------------- + +short List::isEmpty(void) const +{ + return (start == 0); +} + +short List::eol(void) const +{ + return (current == 0); +} + +// ------ Save / load methods method -------------------------------------------- + +void List::save(char *fileName, long int objectLength) +{ + FILE *f = fopen(fileName, "w"); + fwrite(&objectLength, sizeof(long int), 1, f); + + void *v; + reset(); + while(!eol()) + { + v = getCurrent(); + fwrite(v, objectLength, 1, f); + next(); + } + fclose(f); +} + +int List::load(char *fileName) +{ +int temp1 = 0; + + int readIn = 0; + long int objectLength = 0; + FILE *f = fopen(fileName, "r"); + if (!f) return readIn; + + if (fread(&objectLength, sizeof(long int), 1, f) != 1) + { + fclose(f); + return 0; + } + + void *temp = 0; + + while(1) + { + temp = malloc(objectLength); + if ((temp1=fread(temp, objectLength, 1, f)) < 1) break; + readIn++; + add(temp); + } + + // We allocated temp but then fread failed + free(temp); + fclose(f); + return readIn; +} diff --git a/list.h b/list.h new file mode 100644 index 0000000..e1a6451 --- /dev/null +++ b/list.h @@ -0,0 +1,66 @@ +/* + Copyright 2004-2005 Chris Tallon + + This file is part of VOMP. + + VOMP 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. + + VOMP is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with VOMP; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#ifndef LIST_H +#define LIST_H + +#include +#include +#include "node.h" + +class List +{ + public: + List(); + ~List(); + void add(void *); + void *getCurrent(void) const; + void *remove(void); // Removes node from current position from list + // and passes it back to be deleted + void remove(void *); // Removes node passed in from list, does not delete it + void reset(void); + void next(void); + short isEmpty(void) const; + short eol(void) const; + void save(char *, long int); + int load(char *); + unsigned long int getNumElements(); + + private: + Node *start; + Node *current; + Node *prev; + unsigned long int numElements; +}; + +/* The list class can not delete the object stored in the node object because + it does not know the length of it. All the node has is a void *. This is why + List always passes back the actual stored object to the calling method. +*/ + +/* Fixed memory hole, when delete List, it deletes any remaining Nodes but not + stored objects. That's just tuff. +*/ + +/* The new saving code will work as long as the objects don't contain any + pointers to other areas of memory. Only for use with self-contained objects! +*/ + +#endif diff --git a/log.cc b/log.cc new file mode 100644 index 0000000..6823f75 --- /dev/null +++ b/log.cc @@ -0,0 +1,149 @@ +/* + Copyright 2004-2005 Chris Tallon + Copyright 2003-2004 University Of Bradford + + This file is part of VOMP. + + VOMP 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. + + VOMP is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with VOMP; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#include "log.h" + +Log* Log::instance = NULL; + +Log::Log() +{ + if (instance) return; + instance = this; + logfile = NULL; + initted = 0; + logLevel = 0; +} + +Log::~Log() +{ + instance = NULL; +} + +Log* Log::getInstance() +{ + return instance; +} + +void Log::upLogLevel() +{ + if (logLevel == Log::DEBUG) + { + log("Log", logLevel, "Log level is at its highest already"); + return; + } + + logLevel++; + log("Log", logLevel, "Log level is now %i", logLevel); +} + +void Log::downLogLevel() +{ + if (logLevel == Log::CRAZY) + { + log("Log", logLevel, "Log level is at its lowest already"); + return; + } + + logLevel--; + log("Log", logLevel, "Log level is now %i", logLevel); +} + +int Log::init(int startLogLevel, char* fileName, int tenabled) +{ + initted = 1; + logLevel = startLogLevel; + enabled = tenabled; +// logfile = fopen(fileName, "a"); +// logfile = fopen(stdout, "a"); + logfile = stdout; + if (logfile) return 1; + else return 0; +} + +int Log::shutdown() +{ + if (!initted) return 1; + if (logfile) fclose(logfile); + return 1; +} + +int Log::log(char *fromModule, int level, char* message, ...) +{ + if (!instance || !logfile) return 0; + + if (!enabled) return 1; + if (level > logLevel) return 1; + + char buffer[151]; + int spaceLeft = 150; + + struct timeval tv; + gettimeofday(&tv, NULL); + struct tm* tm = gmtime(&tv.tv_sec); + spaceLeft -= strftime(buffer, spaceLeft, "%H:%M:%S.", tm); + spaceLeft -= snprintf(&buffer[150-spaceLeft], spaceLeft, "%06lu ", (unsigned long)tv.tv_usec); + + + char levelString[10]; + if (level == CRAZY) strcpy(levelString, "[CRAZY] "); + if (level == EMERG) strcpy(levelString, "[EMERG] "); + if (level == ALERT) strcpy(levelString, "[ALERT] "); + if (level == CRIT) strcpy(levelString, "[CRIT] "); + if (level == ERR) strcpy(levelString, "[ERR] "); + if (level == WARN) strcpy(levelString, "[WARN] "); + if (level == NOTICE) strcpy(levelString, "[notice]"); + if (level == INFO) strcpy(levelString, "[info] "); + if (level == DEBUG) strcpy(levelString, "[debug] "); + + spaceLeft -= snprintf(&buffer[150-spaceLeft], spaceLeft, "%s %s - ", levelString, fromModule); + + va_list ap; + va_start(ap, message); + spaceLeft = vsnprintf(&buffer[150-spaceLeft], spaceLeft, message, ap); + va_end(ap); + + int messageLength = strlen(buffer); + if (messageLength < 150) + { + buffer[messageLength] = '\n'; + buffer[messageLength+1] = '\0'; + } + else + { + buffer[149] = '\n'; + buffer[150] = '\0'; + } + + int success = fputs(buffer, logfile); + fflush(NULL); + + if (success != EOF) + return 1; + else + return 0; + +} + +int Log::status() +{ + if (instance && logfile) return 1; + else return 0; +} diff --git a/log.h b/log.h new file mode 100644 index 0000000..bf45f42 --- /dev/null +++ b/log.h @@ -0,0 +1,89 @@ +/* + Copyright 2004-2005 Chris Tallon + Copyright 2003-2004 University Of Bradford + + This file is part of VOMP. + + VOMP 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. + + VOMP is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with VOMP; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#ifndef LOG_H +#define LOG_H + +#include +#include +#include +#include +#include + +class Log +{ + public: + Log(); + ~Log(); + static Log* getInstance(); + + int init(int defaultLevel, char* fileName, int enabled); + int shutdown(); + int log(char *fromModule, int level, char *message, ...); + int status(); + void upLogLevel(); + void downLogLevel(); + + const static int CRAZY = 0; // mad crazy things that should never happen + const static int EMERG = 1; // human assist required NOW + const static int ALERT = 2; // system unusable, but happy to sit there + const static int CRIT = 3; // still working, but maybe about to die + const static int ERR = 4; // that response is not even listed... + const static int WARN = 5; // this could be a bad thing. still running tho + const static int NOTICE = 6; // significant good thing + const static int INFO = 7; // verbose good thing + const static int DEBUG = 8; // debug-level messages + + private: + static Log* instance; + int initted; + int logLevel; + int enabled; + + FILE *logfile; +}; + +#endif + +/* + +Documentation +------------- + +This class is intended to be instatiated once by the core. +For a one off use: + +Log::getInstance()->log("", Log::, ""); + +Or, a pointer can be stored and used: + +Log *myptr = Log::getInstance(); + +myptr->log("", Log::, ""); +myptr->log("", Log::, ""); + +Level usages are above. + +The message parameter in the log function can be used in the same way as printf, eg. + +myptr->log("", Log::, "Success: %s %i", stringpointer, integer); + +*/ diff --git a/main.cc b/main.cc new file mode 100644 index 0000000..92e53d1 --- /dev/null +++ b/main.cc @@ -0,0 +1,399 @@ +/* + Copyright 2004-2005 Chris Tallon + + This file is part of VOMP. + + VOMP 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. + + VOMP is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with VOMP; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#ifndef _GNU_SOURCE +#define _GNU_SOURCE +#endif + +#include +#include +#include +#include +#include +#include + +#include "defines.h" +#include "log.h" +#include "remote.h" +#include "led.h" +#include "mtd.h" +#include "video.h" +#include "audio.h" +#include "vdr.h" +#include "osd.h" +#include "viewman.h" +#include "command.h" + +void sighandler(int signal); +void shutdown(int code); + +// Global variables -------------------------------------------------------------------------------------------------- +int debugEnabled = 0; +Log* logger; +Remote* remote; +Mtd* mtd; +Led* led; +Osd* osd; +ViewMan* viewman; +Command* command; +VDR* vdr; +Video* video; +Audio* audio; + +int main(int argc, char** argv) +{ + if ((argc > 1) && (!strcmp(argv[1], "-d"))) debugEnabled = 1; + + + // Init global vars ------------------------------------------------------------------------------------------------ + + logger = new Log(); + remote = new Remote(); + mtd = new Mtd(); + led = new Led(); + osd = new Osd(); + vdr = new VDR(); + video = new Video(); + audio = new Audio(); + viewman = new ViewMan(); + command = new Command(); + + if (!logger || !remote || !mtd || !led || !osd || !video || !audio || !viewman || !command) + { + printf("Could not create objects. Memory problems?\n"); + shutdown(1); + } + + // Get logging module started -------------------------------------------------------------------------------------- + + if (!logger->init(Log::DEBUG, "dummy", debugEnabled)) + { + printf("Could not initialise log object. Aborting.\n"); + shutdown(1); + } + + logger->log("Core", Log::INFO, "Starting up..."); + + // Set up signal handling ------------------------------------------------------------------------------------------ + + sighandler_t sigtest; + + sigtest = signal(SIGPIPE, SIG_IGN); + if (sigtest == SIG_ERR) + { + logger->log("Core", Log::EMERG, "Could not set up signal handler for SIGPIPE. Aborting."); + shutdown(1); + } + sigtest = signal(SIGINT, sighandler); + if (sigtest == SIG_ERR) + { + logger->log("Core", Log::EMERG, "Could not set up signal handler for SIGINT. Aborting."); + shutdown(1); + } + sigtest = signal(SIGTERM, sighandler); + if (sigtest == SIG_ERR) + { + logger->log("Core", Log::EMERG, "Could not set up signal handler for SIGTERM. Aborting."); + shutdown(1); + } + sigtest = signal(SIGUSR1, sighandler); + if (sigtest == SIG_ERR) + { + logger->log("Core", Log::EMERG, "Could not set up signal handler for SIGUSR1. Aborting."); + shutdown(1); + } + sigtest = signal(SIGUSR2, sighandler); + if (sigtest == SIG_ERR) + { + logger->log("Core", Log::EMERG, "Could not set up signal handler for SIGUSR2. Aborting."); + shutdown(1); + } + sigtest = signal(SIGURG, sighandler); + if (sigtest == SIG_ERR) + { + logger->log("Core", Log::EMERG, "Could not set up signal handler for SIGURG. Aborting."); + shutdown(1); + } + + logger->log("Core", Log::INFO, "Signal handlers set up successfully"); + + + // Init modules ---------------------------------------------------------------------------------------------------- + int success; + + success = remote->init("/dev/rawir"); + if (success) + { + logger->log("Core", Log::INFO, "Remote module initialised"); + } + else + { + logger->log("Core", Log::EMERG, "Remote module failed to initialise"); + shutdown(1); + } + + success = led->init(remote->getDevice()); + if (success) + { + logger->log("Core", Log::INFO, "LED module initialised"); + } + else + { + logger->log("Core", Log::EMERG, "LED module failed to initialise"); + shutdown(1); + } + + success = mtd->init("/dev/mtd1"); + if (success) + { + logger->log("Core", Log::INFO, "Mtd module initialised"); + } + else + { + logger->log("Core", Log::EMERG, "Mtd module failed to initialise"); + shutdown(1); + } + + success = osd->init("/dev/stbgfx", SCREENHEIGHT, SCREENWIDTH, 1); + if (success) + { + logger->log("Core", Log::INFO, "OSD module initialised"); + } + else + { + logger->log("Core", Log::EMERG, "OSD module failed to initialise"); + shutdown(1); + } + + success = vdr->init(3024); + if (success) + { + logger->log("Core", Log::INFO, "VDR module initialised"); + } + else + { + logger->log("Core", Log::EMERG, "VDR module failed to initialise"); + shutdown(1); + } + + success = video->init(Video::PAL, Video::SCART, Video::ASPECT4X3, Video::NORMAL); + if (success) + { + logger->log("Core", Log::INFO, "Video module initialised"); + } + else + { + logger->log("Core", Log::EMERG, "Video module failed to initialise"); + shutdown(1); + } + + success = audio->init(Audio::MPEG2_PES); + if (success) + { + logger->log("Core", Log::INFO, "Audio module initialised"); + } + else + { + logger->log("Core", Log::EMERG, "Audio module failed to initialise"); + shutdown(1); + } + + success = viewman->init(); + if (success) + { + logger->log("Core", Log::INFO, "ViewMan module initialised"); + } + else + { + logger->log("Core", Log::EMERG, "ViewMan module failed to initialise"); + shutdown(1); + } + + success = command->init(); + if (success) + { + logger->log("Core", Log::INFO, "Command module initialised"); + } + else + { + logger->log("Core", Log::EMERG, "Command module failed to initialise"); + shutdown(1); + } + + // Other init ------------------------------------------------------------------------------------------------------ + + logger->log("Core", Log::NOTICE, "Startup successful"); + + // Run main loop --------------------------------------------------------------------------------------------------- + + // Ok, all major device components and other bits are loaded and ready + command->run(); + + // When that returns quit ------------------------------------------------------------------------------------------ + + shutdown(0); + return 0; +} + +// ------------------------------------------------------------------------------------------------------------------- + +void shutdown(int code) +{ + if (command) + { + command->shutdown(); + delete command; + logger->log("Core", Log::NOTICE, "Command module shut down"); + } + + if (viewman) + { + viewman->shutdown(); + delete viewman; + logger->log("Core", Log::NOTICE, "ViewMan module shut down"); + } + + if (audio) + { + audio->shutdown(); + delete audio; + logger->log("Core", Log::NOTICE, "Audio module shut down"); + } + + if (video) + { + video->shutdown(); + delete video; + logger->log("Core", Log::NOTICE, "Video module shut down"); + } + + if (vdr) + { + vdr->shutdown(); + delete vdr; + logger->log("Core", Log::NOTICE, "VDR module shut down"); + } + + if (osd) + { + osd->shutdown(); + delete osd; + logger->log("Core", Log::NOTICE, "OSD module shut down"); + } + + if (mtd) + { + mtd->shutdown(); + delete mtd; + logger->log("Core", Log::NOTICE, "MTD module shut down"); + } + + if (led) + { + led->shutdown(); + delete led; + logger->log("Core", Log::NOTICE, "LED module shut down"); + } + + if (remote) + { + remote->shutdown(); + delete remote; + logger->log("Core", Log::NOTICE, "Remote module shut down"); + } + + if (logger) + { + logger->log("Core", Log::NOTICE, "Log module shutting down... bye!\n\n"); + logger->shutdown(); + delete logger; + } + + exit(code); +} + +// ------------------------------------------------------------------------------------------------------------------- + +void sighandler(int signal) +{ + Log* logger = Log::getInstance(); + + logger->log("Core", Log::NOTICE, "Signal %i received", signal); + + switch (signal) + { + case SIGINT: + { + logger->log("Core", Log::NOTICE, "Interrupt signal, shutting down..."); + command->stop(); // FIXME this is probably not safe - use the messaging system / is that even safe? + break; + } + case SIGTERM: + { + logger->log("Core", Log::NOTICE, "Term signal, shutting down..."); + command->stop(); // FIXME this is probably not safe - use the messaging system / is that even safe? + break; + } + case SIGUSR1: + { + logger->log("Core", Log::DEBUG, "SIGUSR1 caught"); + logger->upLogLevel(); + break; + } + case SIGUSR2: + { + logger->log("Core", Log::DEBUG, "SIGUSR2 caught"); + logger->downLogLevel(); + break; + } + case SIGURG: + { + logger->log("Core", Log::DEBUG, "SIGURG caught"); + break; + } + } +} + +// ------------------------------------------------------------------------------------------------------------------- + +ULLONG ntohll(ULLONG a) +{ + return htonll(a); +} + +ULLONG htonll(ULLONG a) +{ + #if BYTE_ORDER == BIG_ENDIAN + return a; + #else + ULLONG b = 0; + + b = ((a << 56) & 0xFF00000000000000ULL) + | ((a << 40) & 0x00FF000000000000ULL) + | ((a << 24) & 0x0000FF0000000000ULL) + | ((a << 8) & 0x000000FF00000000ULL) + | ((a >> 8) & 0x00000000FF000000ULL) + | ((a >> 24) & 0x0000000000FF0000ULL) + | ((a >> 40) & 0x000000000000FF00ULL) + | ((a >> 56) & 0x00000000000000FFULL) ; + + return b; + #endif +} diff --git a/message.cc b/message.cc new file mode 100644 index 0000000..21e693d --- /dev/null +++ b/message.cc @@ -0,0 +1,30 @@ +/* + Copyright 2004-2005 Chris Tallon + + This file is part of VOMP. + + VOMP 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. + + VOMP is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with VOMP; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#include "message.h" + +Message::Message() +{ + from = NULL; + to = NULL; + message = 0; + parameter = 0; + tag = 0; +} diff --git a/message.h b/message.h new file mode 100644 index 0000000..523bf76 --- /dev/null +++ b/message.h @@ -0,0 +1,52 @@ +/* + Copyright 2004-2005 Chris Tallon + + This file is part of VOMP. + + VOMP 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. + + VOMP is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with VOMP; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#ifndef MESSAGE_H +#define MESSAGE_H + +#include +#include "defines.h" + +class View; + +class Message +{ + public: + Message(); + + void* from; + void* to; + ULONG message; + ULONG parameter; + ULONG tag; // use this for identifying which object / question is being replied to + + const static ULONG QUESTION_YES = 1; + const static ULONG CLOSE_ME = 2; + const static ULONG PLAY_SELECTED_RECORDING = 3; + const static ULONG DELETE_SELECTED_RECORDING = 4; + const static ULONG UPDATE_SCREEN = 5; + const static ULONG SWAP_ME_FOR = 6; + const static ULONG CHANNEL_CHANGE = 7; + const static ULONG RESUME_SELECTED_RECORDING = 8; + const static ULONG STANDBY = 9; + const static ULONG STOP_PLAYBACK = 10; +}; + +#endif diff --git a/messagequeue.cc b/messagequeue.cc new file mode 100644 index 0000000..5c4bbd9 --- /dev/null +++ b/messagequeue.cc @@ -0,0 +1,38 @@ +/* + Copyright 2004-2005 Chris Tallon + + This file is part of VOMP. + + VOMP 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. + + VOMP is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with VOMP; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#include "messagequeue.h" + +void MessageQueue::postMessage(Message* m) +{ + messages.store(m); + Log::getInstance()->log("MessageQueue", Log::DEBUG, "have stored message in queue"); +} + +void MessageQueue::processMessageQueue() +{ + Message *m; + while((m = (Message*)messages.retrieve())) + { + Log::getInstance()->log("MessageQueue", Log::DEBUG, "retrieved message from queue"); + processMessage(m); + delete m; + } +} diff --git a/messagequeue.h b/messagequeue.h new file mode 100644 index 0000000..6e36a9b --- /dev/null +++ b/messagequeue.h @@ -0,0 +1,46 @@ +/* + Copyright 2004-2005 Chris Tallon + + This file is part of VOMP. + + VOMP 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. + + VOMP is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with VOMP; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#ifndef MESSAGEQUEUE_H +#define MESSAGEQUEUE_H + +#include "queue.h" +#include "message.h" +#include "log.h" + +class MessageQueue +{ + public: + MessageQueue() {}; + virtual ~MessageQueue() {}; + + virtual void postMessage(Message* m); + + protected: + virtual void processMessageQueue(); + virtual void processMessage(Message* m)=0; + + Queue messages; + + private: + +}; + +#endif diff --git a/mtd.cc b/mtd.cc new file mode 100644 index 0000000..f5d900c --- /dev/null +++ b/mtd.cc @@ -0,0 +1,127 @@ +/* + Copyright 2004-2005 Chris Tallon + + This file is part of VOMP. + + VOMP 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. + + VOMP is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with VOMP; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#include "mtd.h" + +Mtd* Mtd::instance = NULL; + +Mtd::Mtd() +{ + if (instance) return; + instance = this; + initted = 0; +} + +Mtd::~Mtd() +{ + instance = NULL; +} + +Mtd* Mtd::getInstance() +{ + return instance; +} + +int Mtd::init(char* device) +{ + if (initted) return 0; + initted = 1; + + int fd; + + if ((fd = open(device, O_RDONLY)) < 0) + { + initted = 0; + return 0; + } + + if (read(fd, data, 8192) < 8192) + { + initted = 0; + return 0; + } + + close(fd); + + logit(); + + return 1; +} + +int Mtd::shutdown() +{ + if (!initted) return 0; + initted = 0; + return 1; +} + +short Mtd::getVideoMode() +{ + return data[2119]; +} + +short Mtd::getAspect() +{ + return data[2125]; +} + +short Mtd::getFlicker() +{ + return data[2124]; +} + +short Mtd::getBootLogoOutput() +{ + return data[2116]; +} + +short Mtd::getBootLogoDisplayVideoLeft() +{ + return data[2120]; +} + +short Mtd::getBootLogoDisplayVideoUpper() +{ + return data[2121]; +} + +short Mtd::getBootLogoDisplayVideoWidth() +{ + return data[2122]; +} + +short Mtd::getBootLogoDisplayVideoHeight() +{ + return data[2123]; +} + +void Mtd::logit() +{ + Log* logger = Log::getInstance(); + + logger->log("MTD", Log::DEBUG, "Mode: %i", getVideoMode()); + logger->log("MTD", Log::DEBUG, "Aspect: %i", getAspect()); + logger->log("MTD", Log::DEBUG, "Flicker: %i", getFlicker()); + logger->log("MTD", Log::DEBUG, "Bootlogo output: %i", getBootLogoOutput()); + logger->log("MTD", Log::DEBUG, "Bootlogo display video left: %i", getBootLogoDisplayVideoLeft()); + logger->log("MTD", Log::DEBUG, "Bootlogo display video upper: %i", getBootLogoDisplayVideoUpper()); + logger->log("MTD", Log::DEBUG, "Bootlogo display video width: %i", getBootLogoDisplayVideoWidth()); + logger->log("MTD", Log::DEBUG, "Bootlogo display video height: %i", getBootLogoDisplayVideoHeight()); +} diff --git a/mtd.h b/mtd.h new file mode 100644 index 0000000..c143222 --- /dev/null +++ b/mtd.h @@ -0,0 +1,59 @@ +/* + Copyright 2004-2005 Chris Tallon + + This file is part of VOMP. + + VOMP 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. + + VOMP is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with VOMP; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +// Information for this class taken from the mvpmc project - thanks + +#ifndef MTD_H +#define MTD_H + +#include +#include + +#include "log.h" + +class Mtd +{ + public: + Mtd(); + ~Mtd(); + static Mtd* getInstance(); + + int init(char* device); + int shutdown(); + + short getVideoMode(); + short getAspect(); + short getFlicker(); + short getBootLogoOutput(); + short getBootLogoDisplayVideoLeft(); + short getBootLogoDisplayVideoUpper(); + short getBootLogoDisplayVideoWidth(); + short getBootLogoDisplayVideoHeight(); + + void logit(); + + private: + static Mtd* instance; + int initted; + + short data[4096]; +}; + +#endif diff --git a/node.cc b/node.cc new file mode 100644 index 0000000..c99db45 --- /dev/null +++ b/node.cc @@ -0,0 +1,46 @@ +/* + Copyright 2004-2005 Chris Tallon + + This file is part of VOMP. + + VOMP 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. + + VOMP is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with VOMP; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#include "node.h" + +Node::Node(void *newData, Node *ptr) +{ + myData = newData; + ptrNext = ptr; +} + +Node::~Node() +{ +} + +void *Node::getData(void) +{ + return myData; +} + +Node *Node::getPtr(void) +{ + return ptrNext; +} + +void Node::setPtr(Node *newPtr) +{ + ptrNext = newPtr; +} diff --git a/node.h b/node.h new file mode 100644 index 0000000..50788dc --- /dev/null +++ b/node.h @@ -0,0 +1,37 @@ +/* + Copyright 2004-2005 Chris Tallon + + This file is part of VOMP. + + VOMP 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. + + VOMP is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with VOMP; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#ifndef NODE_H +#define NODE_H + +class Node +{ + public: + Node(void *, Node *); + ~Node(); + void *getData(void); + Node *getPtr(void); + void setPtr(Node *); + private: + void *myData; + Node *ptrNext; +}; + +#endif diff --git a/osd.cc b/osd.cc new file mode 100644 index 0000000..d325301 --- /dev/null +++ b/osd.cc @@ -0,0 +1,111 @@ +/* + Copyright 2004-2005 Chris Tallon + + This file is part of VOMP. + + VOMP 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. + + VOMP is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with VOMP; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#include "osd.h" + +Osd* Osd::instance = NULL; + +Osd::Osd() +{ + if (instance) return; + instance = this; + initted = 0; + + fdOsd = 0; + screen = NULL; + buffer = NULL; +} + +Osd::~Osd() +{ + if (initted) shutdown(); + instance = NULL; +} + +Osd* Osd::getInstance() +{ + return instance; +} + +int Osd::getFD() +{ + if (!initted) return 0; + return fdOsd; +} + +int Osd::getScreenHeight() +{ + return height; +} + +int Osd::getScreenWidth() +{ + return width; +} + +int Osd::init(char* device, int height, int width, int doubleBuffering) +{ + if (initted) return 0; + + fdOsd = open(device, O_RDWR); + if (!fdOsd) + { + Log::getInstance()->log("OSD", Log::DEBUG, "Could not open OSD device!"); + return 0; + } + + initted = 1; // must set this here or create surface won't work + + this->height = height; + this->width = width; + + Surface::initConversionTables(); + + screen = new Surface(fdOsd, Surface::SCREEN); + screen->create(height, width); + screen->display(); + + if (doubleBuffering) + { + buffer = new Surface(fdOsd, Surface::BUFFER); + buffer->create(height, width); + } + else + { + Surface::disableBuffer(); + } + + return 1; +} + +int Osd::shutdown() +{ + if (!initted) return 0; + initted = 0; + if (buffer) delete buffer; + delete screen; + close(fdOsd); + return 1; +} + +void Osd::screenShot(char* fileName) +{ + screen->screenShot(fileName); +} diff --git a/osd.h b/osd.h new file mode 100644 index 0000000..1c11504 --- /dev/null +++ b/osd.h @@ -0,0 +1,61 @@ +/* + Copyright 2004-2005 Chris Tallon + + This file is part of VOMP. + + VOMP 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. + + VOMP is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with VOMP; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#ifndef OSD_H +#define OSD_H + +#include +#include +#include + +#include "defines.h" +#include "log.h" +#include "surface.h" + +class Osd +{ + public: + Osd(); + ~Osd(); + static Osd* getInstance(); + + int init(char* device, int height, int width, int doubleBuffering); + int shutdown(); + + int getFD(); + int getScreenHeight(); + int getScreenWidth(); + + void screenShot(char* fileName); + + private: + static Osd* instance; + int initted; + + Surface* screen; + Surface* buffer; + + int fdOsd; + int width; + int height; + +}; + +#endif diff --git a/other/licence.txt b/other/licence.txt new file mode 100644 index 0000000..f780226 --- /dev/null +++ b/other/licence.txt @@ -0,0 +1,45 @@ +vdr.jpg is lifted from VDR's home page which states: +"Free project statement This is a FREE and completely non-commercial project. +Any information posted on these pages is freely available to anybody. All +source code published here is protected by the GNU general public licence." + +------------------------------------------------------------------ + +wallpaper.jpg is actually blue-bend.jpg from the KDE wallpapers. +It was taken from the debian package kdebase-data - the copyright +file is below. + +------------------------------------------------------------------ + +This package was debianized by Christopher L Cheney on +Tue, 16 Apr 2002 22:00:00 -0500. + +It was downloaded via CVS from cvs.kde.org + +Upstream Authors: Stephan Kulow and many others... + +License: + +All programs are either under the GPL or LGPL. On Debian systems, +the complete text of the GPL and LGPL licenses can be found in the +/usr/share/common-licenses/GPL and /usr/share/common-licenses/LGPL files. + +When in doubt, check the individual file, they should all have license +headings and other identifying marks. + +Artistic +-------- +kdcop, kdesu, klipper + +BSD +--- +drkonqi, kaddressbook, kicker, ksmserver, ksplash, kwin, legacyimport + +GPL +--- +kappfinder, kate, kcheckpass, kdeprint, kdm, kfind, khelpcenter, kmenuedit, +konqueror, konsole, kpager, kpersonalizer, kreadconfig, kstart, ksysguard, ktip + +LGPL +---- +kdebugdialog, kdesktop, khotkeys, kxkb, libkonq, nsplugins diff --git a/other/vdr.jpg b/other/vdr.jpg new file mode 100644 index 0000000000000000000000000000000000000000..37be1c9240a41d4551fd9bbbaea82b3c6110c897 GIT binary patch literal 14359 zcmbt)Q*ZT@-R?>lGw_vfjLs!^+I z)y0~#=2+{QAIl%x02C=PNihHr2n0xc9)OQ`0JgBBiGj0;F|nJ4vpKPfxe2kjq^!cn z8bJ7;$No?2pCtdM1pmDJ(F;I@0T=^*g9AYTFjOEoD)6HpKnMVUfr0-M2mH^1gMkG? zK|?@-fq%yFf&YpBPw?{$2@VYg0R@ElSOp+}e}+-OQ2+p7my9X*SW+0aVsOUPoq%{H z6gb(pa@!1>2+^i7i=Sk=NNY9GJMedt*SKWbI#Y>ck#=1}dk}H;7LItD;OgLg=RiTb zYr@NutQ(xP3HqQ|G`z^~r}JAgXLXA=hhJZ2oWA=;{4LFf+dOTwVai@P^IjQp?HhZm zW++#lt8_58WpIMY*F%%K|V>an6LLN0d0N2d-A#yfXFUbxv{$v)W%MnEa~ejcDp z2LP+Je$gH_bh*7SS-tUryGr1n|$E71JjO<^bphXjxYX7y#&RA~aoQ@uU zH?$r|<;M=9@TMbWdto-+uV_VwZJNmjd5la%0Ii>d8EF zSI(D#bh3iQ!&St2VSh_B?#?cKa=aV``Tr~Qe=a{kK!XARf`fk+{j=QvSx^v=&|u&& z03Zq`7BMP11`Z1=HoE}YCnR7#kpzSUd;cjrpBzM9LuIUmuSi$F9a}G*5keZxvCk7# z`~moNB(L|kh?ip2gMLDyzDVc=*=hXul>C2hdu1oHHp@$SSv1fgp)Y-r1J!?>9H2g} zkaK2s=V`}>dye4QqyFhkEEEi%t%F)**V?>DN!?|&Dz!n^KXgpZ9x*P^fNKoO|IAYo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)b)MRIbl|BD-rpqVEwK0Rd9(^9Gs?PRrT_FH#h*hw5BVMmi3FuY9H>H(x%^si z2;8=caKsh*mEe|0nBJq53r<+CLq^&d3nXpbjqK-A>LvH6yh(D);S)!5t~g9e@N6gn z{qMos@oaoAr;CffB7h%JlWwRS7M>tC>KBzt^^aA{con z1cWrV6b1NX#y$YV0_K2L`n0wXH3>cqo6=+F%fRMcYew?WHv`uxQe0C=`jdg`V>~q+ ciQkFll3etNf$}U`6+EXYpVP3_u8)=f2X_5|SpWb4 literal 0 HcmV?d00001 diff --git a/other/wallpaper.jpg b/other/wallpaper.jpg new file mode 100644 index 0000000000000000000000000000000000000000..ed56138ec4ebb2ec0244f1d129ea8c45314a392b GIT binary patch literal 14125 zcmdUW3s_TEm-aac;VLQ`5kWvuF`)tiK~z8k2tv5!0u&=yMMaVdiU?{b8noIPk&E1e zLWCsTRg@s0SZ|0oDkK3dYV<<~1&h=Ypo-R6C)iHspJ!&inP=vIzTq)Bd+)Q)$=>UI z*Spr<=lJR2r)S7?ny~hWMpDxVrp(~X=yogw)FyQiv@EnEG@8`pm3>* z?)xKx<2ku``2~eV!m@I)L|Rco?kNw%@vaN3KwI_dIy`Q}5sU zp1=5~{+F)?2H*ZVq8=R^|Lxs-Y+fjWpPbg8Gy8w$Wd!rW0W4ZN*t}5OZusDhvd44^j>M$Q(n& zj>w=A{*QbN%lM7~J^UF3b+}x8B#t=ZPbDlpDIg)@51iOGWYP0AF9V=fmd+3$Avceo z6ga}vqSNW9|8Md>IQ%P!mY)0{nm03%YM{BZNg03UTS=J!AvX+u9!1;=Y%HrxNo^*; zYe!#b)(omij14#7w=PW$LjZ<}i!LBGN!k!sVp#z(8fdkK=1A2OI0nPT+I{J)dS4RS zR8IUE?if#MbAv8s|K?-^9mkA5IoYwPjBn<%LI8#uj6;^5>>$z+5{&M@_30PHAu9x= zHiXCoOX3&-0yaV_$3_{*s`o(_nn+;s#AwXqhX2VB|NZe_Qq=pB*RYX5hG4fGCP}7N z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*93RGl@WSK@P z_e!++3pz+H7MkrT=RnwR!=Ov_7b5!xor5}TVo`NWQHzibYn_mc-NDY;17WwtHhjva zlV6>>s;+Vk4;~bLk-y%opNO6UkZ`wZoy0}~Eqv=qqG8$qdpHasQjmo0>WFgW`~^?^ zTMiu)N(1(@k#9GvtBjX&8?w+|X+&!!uFR7qo-ePh-4H4e(FsXMq4kjem0`aqA9y`` z6{4Re9j`2b&6vh0A4jRW+QDPB0z%{^@GggCqt!tUt-kV!PQuMnRT<}gT`0%UQ49-i zJ56)pf?4y6gpq)gFQ*yX5|sB(Rs;U@mqg!K z^j$gS&Q~{q1YVqGF!S6X3Y46w`aw1vXTK04^0UB8d5t6P)T)_pb>~D_W&Et)++FAZ z6Rv;Il@+$O1aymby}4#aOg#^&Hy^oBep3#{lI5Yz$Wtdx%UAagJZ z_V5d%)p~&(&_Gq>Gm+w)(N8$W0 zYL`{K+mIwazF|e!+IZORx$ES>OM8izgdUIP&W1>A=l*V(en~YNCaDy9Q;pYe=N*x( zltqw6CQ(8od8dQzf}JPu?nPO<1e9izx#+dIBo$bs>h`z#e8(^TaY230%g|I_Q# z+6lb{l-y`Oq}DOVVe7q1$SDKX#m9;}5POcZzaOs?e?G|OpkFKs);S0-zzUsxtX@;i z)ekI2nd{QWtK~r@hifjCs8RQvnRNG(QG>hmixZt%XY5wr7akK9vcau{?7|=rkN{>( z&T_Gc&|&9FNu=s?z@7enNBZCD3slsi&|^i~oty-iq~XF9#Z*+99V`+c8wdP@t&j7U zs%VFvx|n$^ks-^4g&jdQITS<;td`U9Rbot)`_mcNYrOwJpJ;eiN;X`k7Q^d{G!DE( z>>mto%Pb@|iA4qr6#inH^!J_UQ=uVn@9$Q!|1ALigZnZ~+3=W8)I~LpSLAovHa|JMTDe*oh@GR6Ku#)f|S>7N0p CsfMor literal 0 HcmV?d00001 diff --git a/player.cc b/player.cc new file mode 100644 index 0000000..d77d5aa --- /dev/null +++ b/player.cc @@ -0,0 +1,497 @@ +/* + Copyright 2004-2005 Chris Tallon + + This file is part of VOMP. + + VOMP 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. + + VOMP is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with VOMP; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#include "player.h" + +Player::Player(MessageQueue* messageQueue) +: vfeed(this), afeed(this) +{ + initted = 0; + commandMessageQueue = messageQueue; + + paused = 0; + playing = 0; + ffwd = 0; + fbwd = 0; + feedPosition = 0; + feedMode = MODE_NORMAL; + + streamLength = 0; + // FIXME - this might need settings back to zero for new live play depending on what is done with it +} + +Player::~Player() +{ + if (initted) shutdown(); +} + +int Player::init() +{ + if (initted) return 0; + + video = Video::getInstance(); + audio = Audio::getInstance(); + + if (demuxer.init()) // inverted + { + Log::getInstance()->log("Player", Log::ERR, "Demuxer failed to init"); + shutdown(); + return 0; + } + + vfeed.init(video->getFD()); + afeed.init(audio->getFD()); + + video->stop(); + video->blank(); + audio->stop(); + + startup = 0; + initted = 1; + return 1; +} + +int Player::shutdown() +{ + if (!initted) return 0; + initted = 0; + + Log::getInstance()->log("Player", Log::DEBUG, "Player shutdown..."); + + // copy of stop + if (playing) + { + playing = 0; + threadStop(); + video->stop(); + video->blank(); + audio->stop(); + vfeed.stop(); + afeed.stop(); + video->reset(); + demuxer.reset(); + feedPosition = 0; + } + + return 1; +} + +int Player::play() +{ + if (!initted) return 0; + + // If we are just paused, unpause! + if (paused) + { + togglePause(); + return 1; + } + + // If we are fast forwarding, set to normal + if (ffwd) + { + toggleFastForward(); + return 1; + } + + // If we are fast backwarding, set to normal + if (fbwd) + { + toggleFastBackward(); + return 1; + } + + // If we are already playing, bail // FIXME - resync? + if (playing) + { + Log::getInstance()->log("Player", Log::DEBUG, "DOING RESYNC"); + + vfeed.stop(); + afeed.stop(); + video->reset(); + audio->reset(); + demuxer.flush(); + demuxer.seek(); + vfeed.start(); + afeed.start(); + + + video->play(); + audio->play(); + video->sync(); + audio->sync(); + call(); + + return 1; + } + + // Standard play start + + audio->reset(); + video->reset(); + demuxer.reset(); + startup = 1; + +// ------------------------ This one works, but doesn't allow any pre-buffering. + threadStart(); + vfeed.start(); + afeed.start(); + video->play(); + audio->play(); + video->sync(); + audio->sync(); +// ------------------------ This one doesn't work, but it should, and would allow for prebuffering. + +/* + + threadStart(); + sleep(2); + +// struct timespec delay; +// delay.tv_sec = 1; +// delay.tv_nsec = 500000000; +// nanosleep(&delay, NULL); + + vfeed.start(); + afeed.start(); + video->play(); + audio->play(); + video->sync(); + audio->sync(); +*/ +// ------------------------------------------------------------------------------------------------ + + playing = 1; + return 1; +} + +void Player::stop() +{ + if (!initted) return; + if (!playing) return; + + if (ffwd || fbwd) + { + ffwd = 0; + fbwd = 0; + afeed.enable(); + video->unFastForward(); + audio->systemMuteOff(); + feedMode = MODE_NORMAL; + } + + playing = 0; + + threadStop(); + video->stop(); + video->blank(); + audio->stop(); + vfeed.stop(); + afeed.stop(); + video->reset(); + demuxer.reset(); + + feedPosition = 0; +} + +void Player::togglePause() +{ + if (!initted) return; + if (!playing) return; + + if (ffwd) toggleFastForward(); + if (fbwd) toggleFastBackward(); + + if (paused) + { + video->unPause(); + audio->unPause(); + paused = 0; + } + else + { + video->pause(); + audio->pause(); + paused = 1; + } +} + +void Player::test() +{ + Log::getInstance()->log("Player", Log::DEBUG, "PLAYER TEST"); + + video->test(); + +// static int flipflop = 0; + +// if (flipflop) video->setAspectRatio(Video::ASPECT16X9); +// else video->setAspectRatio(Video::ASPECT4X3); + +// flipflop = !flipflop; + +} + +void Player::test2() +{ + Log::getInstance()->log("Player", Log::DEBUG, "PLAYER TEST"); + + video->test2(); +} + +void Player::setPosition(ULLONG position) +{ + feedPosition = position; +} + +void Player::setLength(ULLONG length) +{ + streamLength = length; + Log::getInstance()->log("Player", Log::DEBUG, "Player has received length of %llu", streamLength); +} + +void Player::skipForward(int seconds) +{ + // skip forward 1 minute + Log::getInstance()->log("Player", Log::DEBUG, "SKIP FORWARD %i SECONDS", seconds); + + if (paused) togglePause(); + + ULLONG moveBy = seconds * 500000; + + threadStop(); + vfeed.stop(); + afeed.stop(); + video->stop(); + video->reset(); + audio->reset(); + audio->doMuting(); // ??? + demuxer.flush(); + feedPosition += moveBy; + + printf("Audio test %i\n", audio->test()); + + vfeed.start(); + afeed.start(); + threadStart(); + video->sync(); + audio->sync(); + video->play(); + audio->play(); + +} + +void Player::skipBackward(int seconds) +{ + // skip forward 1 minute + Log::getInstance()->log("Player", Log::DEBUG, "SKIP BACKWARD %i SECONDS", seconds); + + if (paused) togglePause(); + + ULLONG moveBy = seconds * 500000; + + threadStop(); + vfeed.stop(); + afeed.stop(); + video->stop(); + audio->stop(); + video->reset(); + audio->reset(); + audio->doMuting(); // ??? + demuxer.flush(); + if (feedPosition > moveBy) feedPosition -= moveBy; + vfeed.start(); + afeed.start(); + threadStart(); + video->play(); + audio->play(); + video->sync(); + audio->sync(); +} + +void Player::toggleFastForward() +{ + if (!initted) return; + if (!playing) return; + + if (paused) togglePause(); + if (fbwd) toggleFastBackward(); + + if (ffwd) + { + ffwd = 0; + afeed.enable(); + video->unFastForward(); + audio->reset(); + video->sync(); + audio->sync(); + audio->systemMuteOff(); + } + else + { + ffwd = 1; + afeed.disable(); + audio->systemMuteOn(); + video->fastForward(); + } +} + +void Player::toggleFastBackward() +{ + if (!initted) return; + if (!playing) return; + + if (paused) togglePause(); + if (ffwd) toggleFastForward(); + + if (fbwd) + { + fbwd = 0; + afeed.enable(); + audio->systemMuteOff(); + +// threadStop(); + feedMode = MODE_NORMAL; +// threadStart(); + } + else + { + fbwd = 1; + afeed.disable(); + audio->systemMuteOn(); + + threadStop(); + feedMode = MODE_BACKWARDS; + video->reset(); + video->play(); + demuxer.flush(); + threadStart(); + } +} + +void Player::jumpToPercent(int percent) +{ + threadStop(); + vfeed.stop(); + afeed.stop(); + video->stop(); + audio->stop(); + video->reset(); + audio->reset(); + demuxer.flush(); + demuxer.seek(); + feedPosition = streamLength * percent / 100; + vfeed.start(); + afeed.start(); + threadStart(); + video->play(); + audio->play(); + video->sync(); + audio->sync(); +} + + +void Player::call() +{ + threadSignalNoLock(); +} + +// Feed thread + +void Player::threadMethod() +{ + UCHAR buf[blockSize]; + int thisRead; + int writeLength; + int thisWrite; + + VDR* vdr = VDR::getInstance(); + + int askFor; + while(1) + { + thisRead = 0; + writeLength = 0; + thisWrite = 0; + + threadCheckExit(); + + // a bit hackey. this needs to be split to live and rec players + if (streamLength && (feedPosition >= streamLength)) break; + askFor = blockSize; + if (streamLength && ((feedPosition + blockSize) > streamLength)) + { + askFor = streamLength - feedPosition; + } + thisRead = vdr->getBlock(buf, feedPosition, askFor); + if (startup) + { + int a_stream = demuxer.scan(buf, thisRead); + demuxer.setAudioStream(a_stream); + Log::getInstance()->log("Player", Log::DEBUG, "Startup Audio stream chosen %x", a_stream); + startup = 0; + } + + if (feedMode == MODE_NORMAL) + { + feedPosition += thisRead; + } + else if (feedMode == MODE_BACKWARDS) + { + if (feedPosition >= 100000) + { + feedPosition -= 100000; + demuxer.seek(); + } + else + { + // got to the start of the recording.. revert to play mode? how? + feedPosition += thisRead; + } + } + + threadCheckExit(); + + while(writeLength < thisRead) + { + thisWrite = demuxer.put(buf + writeLength, thisRead - writeLength); + writeLength += thisWrite; + + if (!thisWrite) + { + Log::getInstance()->log("Player", Log::DEBUG, "DEMUXER FULL!!!"); + // demuxer is full and cant take anymore + threadWaitForSignal(); + Log::getInstance()->log("Player", Log::DEBUG, "BACK FROM WAIT"); + } + + threadCheckExit(); + } + } + + // end of recording + Log::getInstance()->log("Player", Log::DEBUG, "Recording playback ends"); + Message* m = new Message(); + m->message = Message::STOP_PLAYBACK; + Log::getInstance()->log("Player", Log::DEBUG, "Posting message..."); + commandMessageQueue->postMessage(m); + Log::getInstance()->log("Player", Log::DEBUG, "Message posted..."); + + +} diff --git a/player.h b/player.h new file mode 100644 index 0000000..ca9183b --- /dev/null +++ b/player.h @@ -0,0 +1,85 @@ +/* + Copyright 2004-2005 Chris Tallon + + This file is part of VOMP. + + VOMP 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. + + VOMP is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with VOMP; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#ifndef PLAYER_H +#define PLAYER_H + +#include + +#include "audio.h" +#include "video.h" +#include "demuxer.h" +#include "vfeed.h" +#include "afeed.h" +#include "remote.h" +#include "thread.h" +#include "vdr.h" +#include "callback.h" +#include "message.h" +#include "messagequeue.h" + +class Player : public Thread, public Callback +{ + public: + Player(MessageQueue* messageQueue); + virtual ~Player(); + + int init(); + int shutdown(); + + int play(); + void stop(); + void togglePause(); + void toggleFastForward(); + void toggleFastBackward(); + void jumpToPercent(int percent); + void skipForward(int seconds); + void skipBackward(int seconds); + void test(); + void test2(); + void call(); // for callback interface + void setPosition(ULLONG position); + void setLength(ULLONG length); + + void threadMethod(); + + private: + int initted; + MessageQueue* commandMessageQueue; + Video* video; + Audio* audio; + Demuxer demuxer; + int startup; + VFeed vfeed; + AFeed afeed; + ULLONG streamLength; + ULLONG feedPosition; + UCHAR feedMode; + const static UCHAR MODE_NORMAL = 1; + const static UCHAR MODE_BACKWARDS = 2; + const static int blockSize = 100000; + + UCHAR playing; // As in not stopped, (playing && paused) can == TRUE + UCHAR paused; // Must be in playing state as well + UCHAR ffwd; // Must be in playing state as well + UCHAR fbwd; // Must be in playing state as well +}; + +#endif diff --git a/playerradio.cc b/playerradio.cc new file mode 100644 index 0000000..b8f05ce --- /dev/null +++ b/playerradio.cc @@ -0,0 +1,372 @@ +/* + Copyright 2004-2005 Chris Tallon + + This file is part of VOMP. + + VOMP 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. + + VOMP is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with VOMP; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +// this is a total copy from player but with video stuff taken out +// most of this isn't used because it's designed for recording playback + + +#include "playerradio.h" + +PlayerRadio::PlayerRadio() +: afeedr(this, &stream) +{ + initted = 0; + + paused = 0; + playing = 0; + ffwd = 0; + fbwd = 0; + feedPosition = 0; + feedMode = MODE_NORMAL; + + streamLength = 0; + // FIXME - this might need settings back to zero for new live play depending on what is done with it +} + +PlayerRadio::~PlayerRadio() +{ + if (initted) shutdown(); +} + +int PlayerRadio::init() +{ + if (initted) return 0; + + audio = Audio::getInstance(); + stream.init(120000); + afeedr.init(audio->getFD()); + + audio->stop(); + + initted = 1; + return 1; +} + +int PlayerRadio::shutdown() +{ + if (!initted) return 0; + initted = 0; + + Log::getInstance()->log("PlayerRadio", Log::DEBUG, "PlayerRadio shutdown..."); + + // copy of stop + if (playing) + { + playing = 0; + threadStop(); + audio->stop(); + afeedr.stop(); + feedPosition = 0; + } + + return 1; +} + +int PlayerRadio::play() +{ + if (!initted) return 0; + + // If we are just paused, unpause! + if (paused) + { + togglePause(); + return 1; + } + + // If we are fast forwarding, set to normal + if (ffwd) + { + toggleFastForward(); + return 1; + } + + // If we are fast backwarding, set to normal + if (fbwd) + { + toggleFastBackward(); + return 1; + } + + // If we are already playing, bail // FIXME - resync? + if (playing) + { + Log::getInstance()->log("PlayerRadio", Log::DEBUG, "DOING RESYNC"); + + afeedr.stop(); + audio->reset(); + afeedr.start(); + + audio->play(); + call(); + + return 1; + } + + // Standard play start + + audio->reset(); + +/* +// ------------------------ This one works, but doesn't allow any pre-buffering. + threadStart(); + afeedr.start(); + audio->play(); + audio->sync(); + +// ------------------------ This one doesn't work, but it should, and would allow for prebuffering. +*/ + + threadStart(); + sleep(6); + +// struct timespec delay; +// delay.tv_sec = 1; +// delay.tv_nsec = 500000000; +// nanosleep(&delay, NULL); + + afeedr.start(); + audio->play(); +// audio->sync(); +// ------------------------------------------------------------------------------------------------ + + playing = 1; + return 1; +} + +void PlayerRadio::stop() +{ + if (!initted) return; + if (!playing) return; + playing = 0; + + threadCancel(); + audio->stop(); + afeedr.stop(); + + feedPosition = 0; +} + +void PlayerRadio::togglePause() +{ + if (!initted) return; + if (!playing) return; + + if (ffwd) toggleFastForward(); + if (fbwd) toggleFastBackward(); + + if (paused) + { + audio->unPause(); + paused = 0; + } + else + { + audio->pause(); + paused = 1; + } +} + +void PlayerRadio::setPosition(ULLONG position) +{ + feedPosition = position; +} + +void PlayerRadio::setLength(ULLONG length) +{ + streamLength = length; + Log::getInstance()->log("PlayerRadio", Log::DEBUG, "PlayerRadio has received length of %llu", streamLength); +} + +void PlayerRadio::skipForward() +{ + // skip forward 1 minute + Log::getInstance()->log("PlayerRadio", Log::DEBUG, "SKIP FORWARD 1 MINUTE"); + + if (paused) togglePause(); + + threadStop(); + afeedr.stop(); + audio->stop(); + audio->reset(); + audio->doMuting(); // ??? + feedPosition += 30000000; + afeedr.start(); + threadStart(); + audio->play(); +} + +void PlayerRadio::skipBackward() +{ + // skip forward 1 minute + Log::getInstance()->log("PlayerRadio", Log::DEBUG, "SKIP BACKWARD 1 MINUTE"); + + if (paused) togglePause(); + + threadStop(); + afeedr.stop(); + audio->stop(); + audio->reset(); + audio->doMuting(); // ??? + if (feedPosition > 30000000) feedPosition -= 30000000; + afeedr.start(); + threadStart(); + audio->play(); +} + +void PlayerRadio::toggleFastForward() +{ + if (!initted) return; + if (!playing) return; + + if (paused) togglePause(); + if (fbwd) toggleFastBackward(); + + if (ffwd) + { + ffwd = 0; +// afeedr.enable(); + audio->reset(); + audio->systemMuteOff(); + } + else + { + ffwd = 1; +// afeedr.disable(); + audio->systemMuteOn(); + } +} + +void PlayerRadio::toggleFastBackward() +{ + if (!initted) return; + if (!playing) return; + + if (paused) togglePause(); + if (ffwd) toggleFastForward(); + + if (fbwd) + { + fbwd = 0; +// afeedr.enable(); + audio->systemMuteOff(); + +// threadStop(); + feedMode = MODE_NORMAL; +// threadStart(); + } + else + { + fbwd = 1; +// afeedr.disable(); + audio->systemMuteOn(); + + threadStop(); + feedMode = MODE_BACKWARDS; + threadStart(); + } +} + +void PlayerRadio::jumpToPercent(int percent) +{ + threadStop(); + afeedr.stop(); + audio->stop(); + audio->reset(); + feedPosition = streamLength * percent / 100; + afeedr.start(); + threadStart(); + audio->play(); + audio->sync(); +} + + +void PlayerRadio::call() +{ + threadSignalNoLock(); +} + +// Feed thread + +void PlayerRadio::threadMethod() +{ + UCHAR buf[blockSize]; + int thisRead; + int writeLength; + int thisWrite; + + VDR* vdr = VDR::getInstance(); + + int askFor; + while(1) + { + thisRead = 0; + writeLength = 0; + thisWrite = 0; + + threadCheckExit(); + + // a bit hackey. this needs to be split to live and rec players + if (streamLength && (feedPosition >= streamLength)) break; + askFor = blockSize; + if (streamLength && ((feedPosition + blockSize) > streamLength)) + { + askFor = streamLength - feedPosition; + } + thisRead = vdr->getBlock(buf, feedPosition, askFor); + + if (feedMode == MODE_NORMAL) + { + feedPosition += thisRead; + } + else if (feedMode == MODE_BACKWARDS) + { + if (feedPosition >= 100000) + { + feedPosition -= 100000; + } + else + { + // got to the start of the recording.. revert to play mode? how? + feedPosition += thisRead; + } + } + + threadCheckExit(); + + while(writeLength < thisRead) + { + thisWrite = stream.put(buf + writeLength, thisRead - writeLength); + writeLength += thisWrite; + + if (!thisWrite) + { + Log::getInstance()->log("Player", Log::DEBUG, "RADIO OUTPUT STREAM FULL!!!"); + // stream is full and cant take anymore + threadWaitForSignal(); + Log::getInstance()->log("Player", Log::DEBUG, "BACK FROM WAIT"); + } + + threadCheckExit(); + } + + Log::getInstance()->log("PlayerRadio", Log::DEBUG, "Written audio"); + + } +} diff --git a/playerradio.h b/playerradio.h new file mode 100644 index 0000000..ba17295 --- /dev/null +++ b/playerradio.h @@ -0,0 +1,76 @@ +/* + Copyright 2004-2005 Chris Tallon + + This file is part of VOMP. + + VOMP 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. + + VOMP is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with VOMP; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#ifndef PLAYERRADIO_H +#define PLAYERRADIO_H + +#include + +#include "audio.h" +#include "afeedr.h" +#include "remote.h" +#include "thread.h" +#include "vdr.h" +#include "callback.h" +#include "stream.h" + +class PlayerRadio : public Thread, public Callback +{ + public: + PlayerRadio(); + virtual ~PlayerRadio(); + + int init(); + int shutdown(); + + int play(); + void stop(); + void togglePause(); + void toggleFastForward(); + void toggleFastBackward(); + void jumpToPercent(int percent); + void skipForward(); + void skipBackward(); + void call(); // for callback interface + void setPosition(ULLONG position); + void setLength(ULLONG length); + + void threadMethod(); + + private: + int initted; + Audio* audio; + int startup; + Stream stream; + AFeedR afeedr; + ULLONG streamLength; + ULLONG feedPosition; + UCHAR feedMode; + const static UCHAR MODE_NORMAL = 1; + const static UCHAR MODE_BACKWARDS = 2; + const static int blockSize = 30000; + + UCHAR playing; // As in not stopped, (playing && paused) can == TRUE + UCHAR paused; // Must be in playing state as well + UCHAR ffwd; // Must be in playing state as well + UCHAR fbwd; // Must be in playing state as well +}; + +#endif diff --git a/queue.cc b/queue.cc new file mode 100644 index 0000000..d33fa03 --- /dev/null +++ b/queue.cc @@ -0,0 +1,79 @@ +/* + Copyright 2004-2005 Chris Tallon + + This file is part of VOMP. + + VOMP 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. + + VOMP is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with VOMP; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#include "queue.h" + +// ------ Constructor add delete get methods ------------------------------------- + +Queue::Queue(void) +{ + start = NULL; + end = NULL; +} + +Queue::~Queue() +{ + while(!isEmpty()) retrieve(); +} + +void Queue::store(void *newData) +{ + Node *temp = new Node(newData, NULL); + if (temp == NULL) + { + // oh dear. + } + if (start == NULL) // add to empty queue + { + start = temp; + end = temp; + } + else // add to non-empty queue + { + end->setPtr(temp); + end = temp; + } +} + +void *Queue::retrieve(void) +{ + if (start == NULL) { return NULL; } // there was an exit EXIT here bug?!!?!? + if (start == end) // then we are removing the last node so set end to 0 + { + end = NULL; + } + void *toReturn = start->getData(); + Node *next = start->getPtr(); + delete start; + start = next; + return toReturn; +} + +void *Queue::peekNext(void) +{ + return start->getData(); +} + +// ------ Boolean methods ----------------------------------------------------- + +short Queue::isEmpty(void) const +{ + return (start == NULL); +} diff --git a/queue.h b/queue.h new file mode 100644 index 0000000..29cdd85 --- /dev/null +++ b/queue.h @@ -0,0 +1,45 @@ +/* + Copyright 2004-2005 Chris Tallon + + This file is part of VOMP. + + VOMP 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. + + VOMP is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with VOMP; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#ifndef QUEUE_H +#define QUEUE_H + +#include + +#include "node.h" + +class Queue +{ + public: + Queue(); + ~Queue(); + void store(void *); + void *retrieve(void); + short isEmpty(void) const; + void *peekNext(void); + + private: + Node *start; + Node *end; +}; + +/* The destructor deletes any remaining QNodes but not stored objects. */ + +#endif diff --git a/recording.cc b/recording.cc new file mode 100644 index 0000000..016ef5a --- /dev/null +++ b/recording.cc @@ -0,0 +1,89 @@ +/* + Copyright 2004-2005 Chris Tallon + + This file is part of VOMP. + + VOMP 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. + + VOMP is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with VOMP; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#include "recording.h" + +Recording::Recording() +{ + start = 0; + dirName = NULL; + progName = NULL; + fileName = NULL; + + index = -1; +} + +Recording::~Recording() +{ + if (dirName) delete[] dirName; + if (progName) delete[] progName; + if (fileName) delete[] fileName; + index = -1; // just in case +} + +int Recording::isInDir() +{ +// if (strstr(name, "~")) return 1; +// else return 0; + return (dirName != NULL); +} + +char* Recording::getDirName() +{ +/* char* sub = strstr(name, "~"); + if (!sub) return NULL; + + char* dirName = new char[sub - name + 1]; + memcpy(dirName, name, sub - name); + dirName[sub - name] = '\0'; + return dirName; +*/ + return dirName; +} + +char* Recording::getProgName() +{ + return progName; +} + +void Recording::setName(char* name) +{ + char* sub = strstr(name, "~"); + + if (sub) // Its in a dir + { + dirName = new char[sub - name + 1]; + memcpy(dirName, name, sub - name); + dirName[sub - name] = '\0'; + + sub++; + int sublen = strlen(sub); + progName = new char[sublen + 1]; + memcpy(progName, sub, strlen(sub)); + progName[sublen] = '\0'; + } + else + { + int len = strlen(name); + progName = new char[len + 1]; + memcpy(progName, name, len); + progName[len] = '\0'; + } +} diff --git a/recording.h b/recording.h new file mode 100644 index 0000000..57e0701 --- /dev/null +++ b/recording.h @@ -0,0 +1,49 @@ +/* + Copyright 2004-2005 Chris Tallon + + This file is part of VOMP. + + VOMP 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. + + VOMP is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with VOMP; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#ifndef RECORDING_H +#define RECORDING_H + +#include +#include + +class Recording +{ + public: + Recording(); + ~Recording(); + + void setName(char* name); + + int isInDir(); + char* getDirName(); + char* getProgName(); + + unsigned long start; + char* fileName; + + int index; + + private: + char* dirName; + char* progName; +}; + +#endif diff --git a/remote.cc b/remote.cc new file mode 100644 index 0000000..080bab8 --- /dev/null +++ b/remote.cc @@ -0,0 +1,124 @@ +/* + Copyright 2004-2005 Chris Tallon + + This file is part of VOMP. + + VOMP 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. + + VOMP is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with VOMP; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#include "remote.h" + +Remote* Remote::instance = NULL; + +Remote::Remote() +{ + if (instance) return; + instance = this; + initted = 0; + device = 0; + tv.tv_sec = 0; + tv.tv_usec = 0; +} + +Remote::~Remote() +{ + instance = NULL; +} + +Remote* Remote::getInstance() +{ + return instance; +} + +int Remote::init(char* devName) +{ + if (initted) return 0; + initted = 1; + + device = open(devName, O_RDONLY); + if (device < 0) + { + initted = 0; + return 0; + } + + return 1; +} + +int Remote::shutdown() +{ + if (!initted) return 0; + initted = 0; + close(device); + device = 0; + return 1; +} + +int Remote::getDevice() +{ + if (!initted) return 0; + return device; +} + +UCHAR Remote::getButtonPress(int waitType) +{ + /* how = 0 - block + how = 1 - start new wait + how = 2 - continue wait + */ + + unsigned long input; + struct timeval* passToSelect = NULL; + int retval; + fd_set readfds; + + if (waitType == 0) + { + passToSelect = NULL; + } + else if (waitType == 1) + { + tv.tv_sec = 1; + tv.tv_usec = 000000; + passToSelect = &tv; + } + else if (waitType == 2) + { + if ((tv.tv_sec == 0) && (tv.tv_usec == 0)) // protection in case timer = 0 + { + tv.tv_sec = 1; + tv.tv_usec = 000000; + } + passToSelect = &tv; + } + FD_ZERO(&readfds); + FD_SET(device, &readfds); + + retval = select(device + 1, &readfds, NULL, NULL, &tv); + // 0 = nothing happened + // 1 = data arrived (actually num of descriptors that changed) + // other value = signal or error + if (retval == 0) return NONE; + if (retval == -1) return SIGNAL; + + int count = read(device, &input, 4); + if (count == 4) + { + input = (0X00FF0000 & input) >> 16; + Log::getInstance()->log("Remote", Log::DEBUG, "Button %i", input); + return (UCHAR) input; + } + return UNKNOWN; +} diff --git a/remote.h b/remote.h new file mode 100644 index 0000000..440718c --- /dev/null +++ b/remote.h @@ -0,0 +1,88 @@ +/* + Copyright 2004-2005 Chris Tallon + + This file is part of VOMP. + + VOMP 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. + + VOMP is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with VOMP; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#ifndef REMOTE_H +#define REMOTE_H + +#include +#include +#include + +#include "defines.h" +#include "log.h" + +class Remote +{ + public: + Remote(); + ~Remote(); + static Remote* getInstance(); + + int init(char *devName); + int shutdown(); + int getDevice(); + UCHAR getButtonPress(int how); + + const static UCHAR ZERO = 0; + const static UCHAR ONE = 1; + const static UCHAR TWO = 2; + const static UCHAR THREE = 3; + const static UCHAR FOUR = 4; + const static UCHAR FIVE = 5; + const static UCHAR SIX = 6; + const static UCHAR SEVEN = 7; + const static UCHAR EIGHT = 8; + const static UCHAR NINE = 9; + const static UCHAR POWER = 61; + const static UCHAR GO = 59; + const static UCHAR BACK = 31; + const static UCHAR MENU = 13; + const static UCHAR RED = 11; + const static UCHAR GREEN = 46; + const static UCHAR YELLOW = 56; + const static UCHAR BLUE = 41; + const static UCHAR LEFT = 17; + const static UCHAR RIGHT = 16; + const static UCHAR UP = 32; + const static UCHAR DOWN = 33; + const static UCHAR MUTE = 15; + const static UCHAR OSD = 12; + const static UCHAR FULL = 60; + const static UCHAR REVERSE = 50; + const static UCHAR PLAY = 53; + const static UCHAR FORWARD = 52; + const static UCHAR RECORD = 55; + const static UCHAR STOP = 54; + const static UCHAR PAUSE = 48; + const static UCHAR SKIPBACK = 36; + const static UCHAR SKIPFORWARD = 30; + const static UCHAR OK = 37; + const static UCHAR NONE = 98; + const static UCHAR UNKNOWN = 99; + const static UCHAR SIGNAL = 100; + + private: + static Remote* instance; + int initted; + int device; + struct timeval tv; +}; + +#endif diff --git a/stb.h b/stb.h new file mode 100644 index 0000000..62e6873 --- /dev/null +++ b/stb.h @@ -0,0 +1,220 @@ +/* + + This file is modified by Chris Tallon from the original stb.h + in libav, from the mvpmc project. libav is licensed under the + Lesser General Public License. + + As per point 3 of the Lesser General Public License, I am + applying the General Public License to my copy of the library + and therefore to this file. The copyright notice below has been + changed accordingly. + +*/ + +/* + Copyright (C) 2004, BtB, Jon Gettler + http://mvpmc.sourceforge.net/ + + 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 file is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR 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 file; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + */ + + +#ifndef STB_H +#define STB_H + +/* + * $Id$ + * + * This describes the IBM STBx25xx/STBx30xxx hardware interface. + * + * Jon Gettler + */ + +#include + +typedef struct { + int arg; + int a; + int b; + int c; + int d; + int e; + int f; +} set_display_t; + + + +typedef struct { + unsigned long handle1; + unsigned long x; + unsigned long y; + unsigned long w; + unsigned long h; + unsigned long handle2; + unsigned long x1; + unsigned long y1; + unsigned long w1; + unsigned long h1; + unsigned long colour1; +} osd_blend_t; + +typedef struct { + unsigned long handle; + unsigned long x; + unsigned long y; + unsigned long w; + unsigned long h; + unsigned long colour1; + unsigned long colour2; + unsigned long colour3; + unsigned long colour4; + unsigned long colour5; + unsigned long colour6; + unsigned long colour7; + unsigned char c[2]; +} osd_afillblt_t; + +typedef struct { + unsigned long handle; + unsigned long left; + unsigned long top; + unsigned long right; + unsigned long bottom; +} osd_clip_rec_t; + +typedef struct { + int w; + int h; + int scale; + int x1; + int y; + int x; + int y2; + int x3; + int y3; + int x4; + int y4; +} vid_pos_regs_t; + +typedef struct { + int stc_b32; + int stc_b0; + int pts_b32; + int pts_b0; +} pts_sync_data_t; + +typedef struct { + int parm1; + int parm2; +} aud_sync_parms_t; + +typedef struct { + int aud_ctl0; + int aud_ctl1; + int aud_ctl2; +} aud_ctl_regs_t; + +typedef struct { + int denc0_cr1; + int denc1_cr1; + int dencmux; + int vid_disp_mode; +} vid_ctl_regs_t; + +struct vid_regs { + unsigned char dummy[44]; +}; + +typedef struct { + int nleft; + int state; +} vid_state_regs_t; + +typedef struct { + uint64_t stc; + uint64_t pts; +} sync_data_t; + + +/* + * /dev/adec_mpeg + */ +#define AV_SET_AUD_PLAY _IOW('a',2,int) +#define AV_SET_AUD_PAUSE _IOW('a',3,int) +#define AV_SET_AUD_UNPAUSE _IOW('a',4,int) +#define AV_SET_AUD_SRC _IOW('a',5,int) +#define AV_SET_AUD_MUTE _IOW('a',6,int) +#define AV_SET_AUD_CHANNEL _IOW('a',9,int) +#define AV_GET_AUD_INFO _IOR('a',10,int) +#define AV_SET_AUD_VOLUME _IOW('a',13,int) +#define AV_GET_AUD_VOLUME _IOR('a',14,int) +#define AV_SET_AUD_STREAMTYPE _IOW('a',15,int) +#define AV_SET_AUD_FORMAT _IOW('a',16,int) +#define AV_GET_AUD_SYNC _IOR('a',21,pts_sync_data_t*) +#define AV_SET_AUD_STC _IOW('a',22,uint64_t *) +#define AV_SET_AUD_SYNC _IOW('a',23,int) +#define AV_SET_AUD_DISABLE_SYNC _IOW('a',24,aud_sync_parms_t*) +#define AV_SET_AUD_RESET _IOW('a',26,int) +#define AV_SET_AUD_DAC_CLK _IOW('a',27,int) +#define AV_GET_AUD_REGS _IOW('a',28,aud_ctl_regs_t*) + +/* + * /dev/vdec_dev + */ + +// CJT +#define AV_SET_VID_STOP _IOW('v', 21, int) + + +#define AV_SET_VID_PLAY _IOW('v',22,int) +#define AV_SET_VID_FREEZE _IOW('v',23,int) +#define AV_SET_VID_RESUME _IOW('v',24,int) +#define AV_SET_VID_SRC _IOW('v',25,int) +#define AV_SET_VID_FB _IOW('v',26,int) +#define AV_GET_VID_STATE _IOR('v',27,vid_state_regs_t*) +#define AV_SET_VID_PAUSE _IOW('v',28,int) +#define AV_SET_VID_FFWD _IOW('v',29,int) +#define AV_SET_VID_SLOMO _IOW('v',30,int) +#define AV_SET_VID_BLANK _IOW('v',32,int) +#define AV_SET_VID_POSITION _IOW('v',36,vid_pos_regs_t*) +#define AV_SET_VID_SCALE_ON _IOW('v',37,int) +#define AV_SET_VID_SCALE_OFF _IOW('v',38,int) +#define AV_GET_VID_SYNC _IOR('v',39,int) +#define AV_SET_VID_STC _IOW('v',40,uint64_t *) +#define AV_SET_VID_RATIO _IOW('v',41,int) +#define AV_SET_VID_SYNC _IOW('v',42,int) +#define AV_SET_VID_DISABLE_SYNC _IOW('v',43,int) +#define AV_SET_VID_DISP_FMT _IOW('v',45,int) +#define AV_SET_VID_RESET _IOW('v',51,int) +#define AV_SET_VID_OUTPUT _IOW('v',57,int) +#define AV_SET_VID_MODE _IOW('v',58,int) +#define AV_GET_VID_REGS _IOR('v',61,struct vid_regs*) +#define AV_SET_VID_COLORBAR _IOW('v',62,int) +#define AV_SET_VID_DENC _IOW('v',63,int) +#define AV_CHK_SCART _IOW('v',64,int) + +/* + * screen device + */ +#define AV_GET_VID_INFO _IOR('s',44,int) + +/* + * /dev/rawir + */ +#define IR_SET_LED _IOW('i',21,int) + + +#endif /* STB_H */ diff --git a/stream.cc b/stream.cc new file mode 100644 index 0000000..116d8ea --- /dev/null +++ b/stream.cc @@ -0,0 +1,128 @@ +/* + Copyright 2005 Mark Calderbank + + This file is part of VOMP. + + VOMP 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. + + VOMP is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with VOMP; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#include "stream.h" + +Stream::Stream() +{ + initted = 0; +} + +Stream::~Stream() +{ + shutdown(); +} + +void Stream::shutdown() +{ + if (initted) { + free(outbuf); + } + initted = 0; +} + +int Stream::init(int bufsize) +{ + outbuf = (UCHAR*) malloc(bufsize); + if (!outbuf) return 1; + bufferSize = bufsize; + bufferHead = bufferTail = 0; + full = 0; + initted = 1; + return 0; +} + +void Stream::flush() +{ + bufferHead = bufferTail = 0; + full = 0; +} + +int Stream::put(UCHAR* inbuf, int len) +{ + int ret = 0; + int localTail = bufferTail; + if (len == 0 || (full)) return ret; + + if (bufferHead >= localTail) + { + // We have free rein to the end of the buffer + if (len < (bufferSize - bufferHead)) + { + // We won't reach the end of the buffer. + memcpy(outbuf + bufferHead, inbuf, len); + bufferHead += len; + ret += len; return ret; + } else + { + // We'll reach the end of the buffer and loop round. + memcpy(outbuf + bufferHead, inbuf, (bufferSize - bufferHead)); + inbuf += (bufferSize - bufferHead); + ret += (bufferSize - bufferHead); + len -= (bufferSize - bufferHead); + bufferHead = 0; + if (localTail == 0) full = 1; + if (len == 0 || (full)) return ret; + } + } + // We can advance the head up to the tail + // If we reach it, we are full. + if (len < (localTail - bufferHead)) + { + // We'll fall short of the tail. + memcpy(outbuf + bufferHead, inbuf, len); + bufferHead += len; + ret += len; return ret; + } else + { + // We'll hit the tail. + memcpy(outbuf + bufferHead, inbuf, (localTail - bufferHead)); + ret += (localTail - bufferHead); + bufferHead = localTail; full = 1; + return ret; + } +} + +int Stream::drain(int fd) +{ + int ret = 0; + int localHead = bufferHead; + int written; + if (localHead == bufferTail && (!full)) return ret; + + if (localHead <= bufferTail) + { + // Drain to the end of the buffer + written = write(fd, outbuf + bufferTail, (bufferSize - bufferTail)); + if (written < 0) return ret; + full = 0; + ret += written; + if (written == (bufferSize - bufferTail)) + bufferTail = 0; + else + bufferTail += written; + if (localHead == 0) return ret; + } + written = write(fd, outbuf + bufferTail, (localHead - bufferTail)); + if (written < 0) return ret; + ret += written; + bufferTail += written; + return ret; +} diff --git a/stream.h b/stream.h new file mode 100644 index 0000000..bb3b572 --- /dev/null +++ b/stream.h @@ -0,0 +1,50 @@ +/* + Copyright 2005 Mark Calderbank + + This file is part of VOMP. + + VOMP 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. + + VOMP is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with VOMP; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#ifndef STREAM_H +#define STREAM_H + +#include +#include +#include +#include "defines.h" + +class Stream +{ + public: + Stream(); + ~Stream(); + int init(int bufsize); + void shutdown(); + void flush(); + int put(UCHAR* inbuf, int len); + int drain(int fd); + + private: + + int initted; + UCHAR* outbuf; + int bufferSize; + int bufferHead; + int bufferTail; + int full; +}; + +#endif diff --git a/surface.cc b/surface.cc new file mode 100644 index 0000000..d550b30 --- /dev/null +++ b/surface.cc @@ -0,0 +1,526 @@ +/* + Copyright 2004-2005 Chris Tallon + Portions copyright 2004 Jon Gettler + + This file is part of VOMP. + + VOMP 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. + + VOMP is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with VOMP; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#include "surface.h" + +Surface* Surface::screen = NULL; +Surface* Surface::buffer = NULL; +int Surface::disableDoubleBuffering = 0; + +Surface::Surface(int fd, int id) +{ + if (id == SCREEN) screen = this; + if (id == BUFFER) buffer = this; + + fdOsd = fd; + memset(&surface, 0, sizeof(osd_surface_t)); + memset(&surface.sfc, 0, sizeof(stbgfx_sfc_t)); + memset(&surface.map, 0, sizeof(stbgfx_map_t)); + + font = &font_helvB18; +} + +Surface::~Surface() +{ + for (int i = 0; i < 3; i++) + { + if (surface.base[i]) munmap(surface.base[i], surface.map.map[i].size); + } + + int a; + + a = ioctl(fdOsd, GFX_FB_SFC_UNMAP, surface.sfc.handle); + if (a) Log::getInstance()->log("Surface", Log::ERR, "Surface unmap failed"); + + a = ioctl(fdOsd, GFX_FB_SFC_FREE, surface.sfc.handle); + if (a) Log::getInstance()->log("Surface", Log::ERR, "Surface destroy failed"); + +} + +void Surface::disableBuffer() +{ + disableDoubleBuffering = 1; +} + +Surface* Surface::getObject(int id) +{ + if (id == SCREEN) return screen; + if (disableDoubleBuffering) return screen; + if (id == BUFFER) return buffer; + return NULL; +} + +int Surface::create(int height, int width) +{ + int r = 0; + int displayNumber = 0; // mvpmc iterates 0->15 till it gets one that works? + + surface.sfc.width = width; + surface.sfc.height = height; + surface.sfc.flags = 0x3f1533; + + surface.sfc.unknown = -1; + + r = ioctl(fdOsd, GFX_FB_SET_OSD, &displayNumber); + if (r) return 0; + + r = ioctl(fdOsd, GFX_FB_OSD_SURFACE, &displayNumber); + if (r) return 0; + + r = ioctl(fdOsd, GFX_FB_SFC_ALLOC, &surface.sfc); + if (r) return 0; + + surface.map.map[0].unknown = surface.sfc.handle; + r = ioctl(fdOsd, GFX_FB_MAP, &surface.map); + if (r) return 0; + + surface.base[0] = (unsigned char *)mmap(NULL, surface.map.map[0].size, PROT_READ|PROT_WRITE, MAP_SHARED, fdOsd, surface.map.map[0].addr); + if (surface.base[0] == MAP_FAILED) return 0; + + surface.base[1] = (unsigned char *)mmap(NULL, surface.map.map[1].size, PROT_READ|PROT_WRITE, MAP_SHARED, fdOsd, surface.map.map[1].addr); + if (surface.base[1] == MAP_FAILED) return 0; + + surface.base[2] = (unsigned char *)mmap(NULL, surface.map.map[2].size, PROT_READ|PROT_WRITE, MAP_SHARED, fdOsd, surface.map.map[2].addr); + if (surface.base[2] == MAP_FAILED) return 0; + + surface.display.num = displayNumber; + r = ioctl(fdOsd, GFX_FB_MOVE_DISPLAY, &surface.display); + if (r) return 0; + + r = ioctl(fdOsd, GFX_FB_SET_DISPLAY, &surface.display); + if (r) return 0; + + return 1; +} + +void Surface::display() +{ + unsigned long fb_descriptor[2]; + + fb_descriptor[0] = surface.sfc.handle; + fb_descriptor[1] = 1; + + ioctl(fdOsd, GFX_FB_ATTACH, fb_descriptor); +} + +unsigned long Surface::getSurfaceHandle() +{ + return surface.sfc.handle; +} + +// ---------------------------------------------------------------------------- + +// Now for the drawing functions + +/* + * RGB to YUV conversion tables + */ +int Surface::conv_YB[256]; +int Surface::conv_YG[256]; +int Surface::conv_YR[256]; +int Surface::conv_UB[256]; +int Surface::conv_UG[256]; +int Surface::conv_UR[256]; +int Surface::conv_VB[256]; +int Surface::conv_VG[256]; +int Surface::conv_VR[256]; + +int Surface::conv_BY[256]; +int Surface::conv_GY[256]; +int Surface::conv_RY[256]; +int Surface::conv_BU[256]; +int Surface::conv_GU[256]; +int Surface::conv_RU[256]; +int Surface::conv_BV[256]; +int Surface::conv_GV[256]; +int Surface::conv_RV[256]; + +/* + * gfx_init() - initialize the RGB to YUV conversion tables + */ +void Surface::initConversionTables(void) +{ + int i; + + for (i=0; i<256; i++) { + conv_YB[i] = (int)(0.299 * (double)i); + conv_BY[i] = i; + } + for (i=0; i<256; i++) { + conv_YG[i] = (int)(0.587 * (double)i); + conv_GY[i] = i; + } + for (i=0; i<256; i++) { + conv_YR[i] = (int)(0.114 * (double)i); + conv_RY[i] = i; + } + + for (i=0; i<256; i++) { + conv_UB[i] = (int)(0.5 * (double)i); + conv_BU[i] = (int)(1.732 * (i - 128)); + } + for (i=0; i<256; i++) { + conv_UG[i] = (int)(-0.33126 * (double)i); + conv_GU[i] = (int)(-0.338 * (i - 128)); + } + for (i=0; i<256; i++) { + conv_UR[i] = (int)(-0.16874 * (double)i); + conv_RU[i] = 0; + } + + for (i=0; i<256; i++) { + conv_VB[i] = (int)(-0.08131 * (double)i); + conv_BV[i] = 0; + } + for (i=0; i<256; i++) { + conv_VG[i] = (int)(-0.41869 * (double)i); + conv_GV[i] = (int)(-0.698 * (i - 128)); + } + for (i=0; i<256; i++) { + conv_VR[i] = (int)(0.5 * (double)i); + conv_RV[i] = (int)(1.370 * ((double)i - 128)); + } +} + +/* + * rgb2yuv() - convert an RGB pixel to YUV + */ + //inline me? +void Surface::rgb2yuv(unsigned char r, unsigned char g, unsigned char b, unsigned char *y, unsigned char *u, unsigned char *v) +{ + int Y, U, V; + + Y = conv_YB[b] + conv_YG[g] + conv_YR[r]; + U = conv_UB[b] + conv_UG[g] + conv_UR[r] + 128; + V = conv_VB[b] + conv_VG[g] + conv_VR[r] + 128; + + if (Y > 255) + Y = 255; + else if (Y < 0) + Y = 0; + if (U > 255) + U = 255; + else if (U < 0) + U = 0; + if (V > 255) + V = 255; + else if (V < 0) + V = 0; + + *y = Y; + *u = U; + *v = V; +} + +int Surface::fillblt(int x, int y, int width, int height, unsigned int c) +{ + osd_fillblt_t fblt; + + fblt.handle = surface.sfc.handle; + fblt.x = x; + fblt.y = y; + fblt.width = width; + fblt.height = height; + fblt.colour = c; + + return ioctl(fdOsd, GFX_FB_OSD_FILLBLT, &fblt); +} + +void Surface::drawPixel(int x, int y, unsigned int c) +{ + int offset; + unsigned char r, g, b, a, Y, U, V; + unsigned int line, remainder; + + if ((x >= (int)surface.sfc.width) || (y >= (int)surface.sfc.height)) + return; + + c2rgba(c, &r, &g, &b, &a); + + rgb2yuv(r, g, b, &Y, &U, &V); + + remainder = (surface.sfc.width % 4); + if (remainder == 0) + line = surface.sfc.width; + else + line = surface.sfc.width + (4 - remainder); + + offset = (y * line) + x; + + *(surface.base[0] + offset) = Y; + *(surface.base[1] + (offset & 0xfffffffe)) = U; + *(surface.base[1] + (offset & 0xfffffffe) + 1) = V; + *(surface.base[2] + offset) = a; + +} + +void Surface::drawHorzLine(int x1, int x2, int y, unsigned int c) +{ + fillblt(x1, y, x2-x1, 1, c); +} + +void Surface::drawVertLine(int x, int y1, int y2, unsigned int c) +{ + fillblt(x, y1, 1, y2-y1, c); +} + +void Surface::bufferToScreen() // static, this is for Box::showAll +{ + if (disableDoubleBuffering) return; + buffer->updateToScreen(0, 0, buffer->surface.sfc.width, buffer->surface.sfc.height); +} + +int Surface::updateToScreen(int x, int y, int width, int height) // main method for all normal windows +{ + /* + With double buffering: + A view has buffer for its surface. this is buffer, copy area specified to screen + Without double buffering: + A view has screen for its surface. this is screen, all painting work has already been done. ignore + */ + + if (this == screen) return 0; + + return blt(fdOsd, surface.sfc.handle, x, y, width, height, screen->getSurfaceHandle(), x, y); +} + +int Surface::blt(int fd, unsigned long shandle, int sx, int sy, int width, int height, unsigned long dhandle, int dx, int dy) +{ + osd_bitblt_t fblt; + memset(&fblt, 0, sizeof(fblt)); + + fblt.dst_handle = dhandle; + fblt.dst_x = dx; + fblt.dst_y = dy; + + fblt.src_handle = shandle; + fblt.src_x = sx; + fblt.src_y = sy; + + fblt.width = width; + fblt.height = height; + + fblt.u1 = 1; + fblt.u2 = 0; + fblt.u3 = 0x0f; + + return ioctl(fd, GFX_FB_OSD_BITBLT, &fblt); +} + +int Surface::drawText(char* text, int x, int y, int r, int g, int b) +{ + int h, n, i; + int Y, X, cx; + unsigned long fg; + + fg = rgba(r, g, b, 255); + + n = strlen(text); + h = font->height; + + X = 0; + cx = 0; + for (i=0; icontent[font->offset[c]]; + int w = font->width[c]; + int pixels = 0; + + for (X=0; X> (32 - X)) & 0x1) + { + drawPixel(x+X+cx, y+Y, fg); + pixels++; + } + } + } + cx += w; + } + return 1; +} + +int Surface::drawTextRJ(char* text, int x, int y, int r, int g, int b) +{ + int i, n, w; + w = 0; + + n = strlen(text); + + for (i = 0; i < n; i++) + { + w += font->width[text[i]]; + } + + x -= w; + + if (x < 0) return 0; + else return drawText(text, x, y, r, g, b); +} + +int Surface::getCharWidth(char c) +{ + return font->width[c]; +} + +int Surface::getFontHeight() +{ + return font->height; +} + +void Surface::screenShot(char* fileName) +{ + Log* logger = Log::getInstance(); + + FILE* outfile = fopen(fileName, "w"); + if (outfile == NULL) + { + logger->log("Surface", Log::ERR, "Can't open JPEG"); + return; + } + logger->log("Surface", Log::DEBUG, "File opened %u %u", surface.sfc.height, surface.sfc.width); + + struct jpeg_compress_struct cinfo; + struct jpeg_error_mgr jerr; + cinfo.err = jpeg_std_error(&jerr); + jpeg_create_compress(&cinfo); + jpeg_stdio_dest(&cinfo, outfile); + cinfo.image_width = surface.sfc.width; + cinfo.image_height = surface.sfc.height; + cinfo.input_components = 3; + cinfo.in_color_space = JCS_RGB; + jpeg_set_defaults(&cinfo); + jpeg_start_compress(&cinfo, TRUE); + + + unsigned char row[surface.sfc.width * 3]; + unsigned char* prow = (unsigned char*)&row; + unsigned char r, g, b; + + while (cinfo.next_scanline < cinfo.image_height) + { + for(unsigned int i = 0; i < surface.sfc.width; i++) + { + readPixel(i, cinfo.next_scanline, &r, &g, &b); + row[i * 3] = r; + row[(i * 3) + 1] = g; + row[(i * 3) + 2] = b; + } + jpeg_write_scanlines(&cinfo, (JSAMPLE **)&prow, 1); + } + + jpeg_finish_compress(&cinfo); + jpeg_destroy_compress(&cinfo); + fclose(outfile); + logger->log("Surface", Log::DEBUG, "Jpeg saved"); +} + +void Surface::readPixel(int x, int y, unsigned char* r, unsigned char* g, unsigned char* b) +{ + int offset; + unsigned char a, Y, U, V; + unsigned int line, remainder; + + if (((unsigned int)x >= surface.sfc.width) || ((unsigned int)y >= surface.sfc.height)) return; + + remainder = (surface.sfc.width % 4); + if (remainder == 0) + line = surface.sfc.width; + else + line = surface.sfc.width + (4 - remainder); + + offset = (y * line) + x; + + Y = *(surface.base[0] + offset); + U = *(surface.base[1] + (offset & 0xfffffffe)); + V = *(surface.base[1] + (offset & 0xfffffffe) + 1); + a = *(surface.base[2] + offset); + + yuv2rgb(Y, U, V, r, g, b); +} + +void Surface::yuv2rgb(int y, int u, int v, unsigned char* pr, unsigned char* pg, unsigned char* pb) +{ + // from http://www.fourcc.org/index.php?http%3A//www.fourcc.org/fccyvrgb.php + +// unsigned int pixel32; +// unsigned char *pixel = (unsigned char *)&pixel32; + int r, g, b; + + + /* + One formula I found: (not the right one) + + R = 1.164(Y - 16) + 1.596(Cr - 128) + G = 1.164(Y - 16) - 0.813(Cr - 128) - 0.391(Cb - 128) + B = 1.164(Y - 16) + 2.018(Cb - 128) + + + r = (1.164 * (y - 16)) + + (2.018 * (v - 128)); + g = (1.164 * (y - 16)) + - (0.813 * (u - 128)) + - (0.391 * (v - 128)); + b = (1.164 * (y - 16)) + + (1.596 * (u - 128)); + + + Another formula I found: (seems to work) + + R = Y + 1.370705 (V-128) + G = Y - 0.698001 (V-128) - 0.337633 (U-128) + B = Y + 1.732446 (U-128) + */ + + r = (int)( y + (1.370705 * (v-128)) ); + g = (int)( y - (0.698001 * (v-128)) - (0.337633 * (u-128)) ); + b = (int)( y + (1.732446 * (u-128)) ); + + // Even with proper conversion, some values still need clipping. + if (r > 255) r = 255; + if (g > 255) g = 255; + if (b > 255) b = 255; + if (r < 0) r = 0; + if (g < 0) g = 0; + if (b < 0) b = 0; + + // Values only go from 0-220.. Why? +// pixel[0] = r * 220 / 256; +// pixel[1] = g * 220 / 256; +// pixel[2] = b * 220 / 256; +// pixel[3] = 0; + + *pr = (unsigned char) (r * 220 / 256); + *pg = (unsigned char) (g * 220 / 256); + *pb = (unsigned char) (b * 220 / 256); + + /* Debug + //printf("yuv2rgb(%i, %i, %i) -> %i, %i, %i (0x%x)\n", + y, u, v, + pixel[0], pixel[1], pixel[2], + pixel32); + */ + +// return pixel32; +} diff --git a/surface.h b/surface.h new file mode 100644 index 0000000..fde124d --- /dev/null +++ b/surface.h @@ -0,0 +1,249 @@ +/* + Copyright 2004-2005 Chris Tallon + Portions copyright 2004 Jon Gettler + + This file is part of VOMP. + + VOMP 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. + + VOMP is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with VOMP; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#ifndef SURFACE_H +#define SURFACE_H + +#include +#include +#include +#include +#include + +// Structures for surface management + +typedef struct +{ + unsigned long num; + unsigned long unknown[4]; + unsigned long width; + unsigned long height; + char unknown2; +} stbgfx_display_t; + +typedef struct +{ + unsigned long unknown; + unsigned long win_unknown; + unsigned long addr; + unsigned long size; + unsigned long unknown2; + unsigned long width; + unsigned long height; + unsigned long unknown3; + unsigned long unknown4; + unsigned long width2; + unsigned long unknown5; + unsigned long unknown6; +} stbgfx_map_item_t; + +typedef struct { + stbgfx_map_item_t map[3]; + unsigned long other[2]; +} stbgfx_map_t; + +typedef struct +{ + unsigned long handle; /* surface handle */ + unsigned long width; + unsigned long height; + unsigned long flags; + long unknown; //unsigned long + unsigned long depth; /* number of subplanes */ +} stbgfx_sfc_t; + +typedef struct +{ + stbgfx_display_t display; + stbgfx_map_t map; + stbgfx_sfc_t sfc; + unsigned char *base[3]; +} osd_surface_t; + + +// Structures for surface drawing + +typedef struct +{ + unsigned long handle; + unsigned long x; + unsigned long y; + unsigned long width; + unsigned long height; + unsigned long colour; +} osd_fillblt_t; + +typedef struct { + unsigned long dst_handle; + unsigned long dst_x; + unsigned long dst_y; + unsigned long width; + unsigned long height; + unsigned long src_handle; + unsigned long src_x; + unsigned long src_y; + unsigned long u1; + unsigned long u2; + unsigned char u3; +} osd_bitblt_t; + +// Font stuff + +typedef struct bogl_font { + char *name; /* Font name. */ + int height; /* Height in pixels. */ + unsigned long *content; /* 32-bit right-padded bitmap array. */ + short *offset; /* 256 offsets into content. */ + unsigned char *width; /* 256 character widths. */ +} osd_font_t; + +extern osd_font_t font_CaslonRoman_1_25; +extern osd_font_t font_helvB24; +extern osd_font_t font_helvB18; + +// Surface ioctls + +#define GFX_FB_SFC_ALLOC _IOWR(0xfb,1,int*) +#define GFX_FB_SFC_FREE _IOWR(0xfb,2,int) +#define GFX_FB_MAP _IOWR(0xfb,3,int*) +#define GFX_FB_SFC_UNMAP _IOWR(0xfb,4,int) +#define GFX_FB_SET_PAL_1 _IOWR(0xfb,5,int*) +#define GFX_FB_SET_PAL_2 _IOW(0xfb,6,int*) +#define GFX_FB_OSD_SURFACE _IO(0xfb,7) +#define GFX_FB_SFC_SET_SHARE _IOW(0xfb,8,int) +#define GFX_FB_OSD_CUR_SETATTR _IOW(0xfb,9,int*) +#define GFX_FB_ATTACH _IOW(0xfb,11,int) +#define GFX_FB_SFC_DETACH _IOW(0xfb,12,int*) +#define GFX_FB_MOVE_DISPLAY _IOWR(0xfb,13,int) +#define GFX_FB_SET_DISPLAY _IOW(0xfb,14,int) +#define GFX_FB_OSD_CUR_MOVE_1 _IOW(0xfb,15,int*) +#define GFX_FB_OSD_CUR_MOVE_2 _IOW(0xfb,16,int) +#define GFX_FB_SET_OSD _IOW(0xfb,18,int) +#define GFX_FB_SET_DISP_CTRL _IOW(0xfb,21,int*) +#define GFX_FB_GET_DISP_CTRL _IOWR(0xfb,22,int*) +#define GFX_FB_SET_VIS_DEV_CTL _IOWR(0xfb,23,int*) +#define GFX_FB_GET_VIS_DEV_CTL _IOWR(0xfb,24,int*) +#define GFX_FB_OSD_BITBLT _IOW(0xfb,51,osd_bitblt_t*) +#define GFX_FB_OSD_FILLBLT _IOW(0xfb,53,osd_fillblt_t*) +#define GFX_FB_OSD_ADVFILLBLT _IOW(0xfb,54,osd_afillblt_t*) +#define GFX_FB_OSD_BLEND _IOW(0xfb,55,int*) +#define GFX_FB_OSD_ADVBLEND _IOW(0xfb,56,int*) +#define GFX_FB_OSD_RESIZE _IOW(0xfb,58,int*) +#define GFX_FB_ENGINE_WAIT _IOW(0xfb,60,int) +#define GFX_FB_RESET_ENGINE _IO(0xfb,61) +#define GFX_FB_SET_ENGINE_MODE _IOW(0xfb,62,int) +#define GFX_FB_GET_ENGINE_MODE _IO(0xfb,63) +#define GFX_FB_GET_SFC_INFO _IO(0xfb,64,int*) +#define GFX_FB_OSD_SFC_CLIP _IOW(0xfb,65,osd_clip_rec_t*) +#define GFX_FB_OSD_COLOURKEY _IOW(0xfb,67,int*) +#define GFX_FB_GET_SFC_PSEUDO _IOWR(0xfb,68,int*) + +extern "C" +{ + #include +} + +#include "log.h" + +class Surface +{ + public: + Surface(int fd, int id); + ~Surface(); + + static Surface* getObject(int id); + + int create(int height, int width); + void display(); + unsigned long getSurfaceHandle(); + + int fillblt(int x, int y, int width, int height, unsigned int c); + void drawPixel(int x, int y, unsigned int c); + void drawHorzLine(int x1, int x2, int y, unsigned int c); + void drawVertLine(int x, int y1, int y2, unsigned int c); + int updateToScreen(int x, int y, int width, int height); + int drawText(char* text, int x, int y, int r, int g, int b); + int drawTextRJ(char* text, int x, int y, int r, int g, int b); + int getCharWidth(char c); + int getFontHeight(); + void readPixel(int x, int y, unsigned char* r, unsigned char* g, unsigned char* b); + void yuv2rgb(int y, int u, int v, unsigned char* pr, unsigned char* pg, unsigned char* pb); + void screenShot(char* fileName); + + static void initConversionTables(); + + static void disableBuffer(); + static void bufferToScreen(); + static int blt(int fd, unsigned long shandle, int sx, int sy, int width, int height, unsigned long dhandle, int dx, int dy); + + const static int SCREEN = 1; + const static int BUFFER = 2; + + // Implicit inlines + void c2rgba(unsigned long c, unsigned char *r, unsigned char *g, unsigned char *b, unsigned char *a) + { + *a = (c & 0xff000000) >> 24; + *r = (c & 0x00ff0000) >> 16; + *g = (c & 0x0000ff00) >> 8; + *b = (c & 0x000000ff); + } + + unsigned long rgba(unsigned char r, unsigned char g, unsigned char b, unsigned char a) + { + return (a<<24) | (r<<16) | (g<<8) | b; + + } + + private: + static Surface* screen; + static Surface* buffer; + static int disableDoubleBuffering; + + int fdOsd; + + osd_surface_t surface; + osd_font_t* font; + + void rgb2yuv(unsigned char r, unsigned char g, unsigned char b, unsigned char *y, unsigned char *u, unsigned char *v); + + static int conv_YB[256]; + static int conv_YG[256]; + static int conv_YR[256]; + static int conv_UB[256]; + static int conv_UG[256]; + static int conv_UR[256]; + static int conv_VB[256]; + static int conv_VG[256]; + static int conv_VR[256]; + + static int conv_BY[256]; + static int conv_GY[256]; + static int conv_RY[256]; + static int conv_BU[256]; + static int conv_GU[256]; + static int conv_RU[256]; + static int conv_BV[256]; + static int conv_GV[256]; + static int conv_RV[256]; + +}; + +#endif diff --git a/tcp.cc b/tcp.cc new file mode 100644 index 0000000..ef78c96 --- /dev/null +++ b/tcp.cc @@ -0,0 +1,403 @@ +/* + Copyright 2004-2005 Chris Tallon + Copyright 2003-2004 University Of Bradford + + This file is part of VOMP. + + VOMP 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. + + VOMP is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with VOMP; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#include "tcp.h" + +TCP::TCP() +{ + sock = 0; + connected = 0; + timeoutEnabled = 1; +} + +TCP::~TCP() +{ + if (connected) + { + close(sock); + Log::getInstance()->log("TCP", Log::DEBUG, "Have closed"); + } +} + +void TCP::disableTimeout() +{ + timeoutEnabled = 0; +} + +int TCP::connectTo(char* host, unsigned short port) +{ + sock = socket(PF_INET, SOCK_STREAM, 0); + if (sock == -1) return 0; + + struct sockaddr_in dest_addr; + dest_addr.sin_family = AF_INET; + dest_addr.sin_port = htons(port); + + if (!inet_aton(host, &dest_addr.sin_addr)) + { + close(sock); + return 0; + } + + memset(&(dest_addr.sin_zero), '\0', 8); + + // set non blocking + int oldflags = fcntl (sock, F_GETFL, 0); + oldflags |= O_NONBLOCK; + fcntl(sock, F_SETFL, oldflags); + + // ok, how to open a connection in non blocking mode (and therefore have a self set timeout!!) + + int success = connect(sock, (struct sockaddr *)&dest_addr, sizeof(struct sockaddr)); + + if (success == 0) // if by some miracle the connection succeeded in no time flat, just return! + { + connected = 1; + return 1; + } + + // first check errno for EINPROGRESS, otherwise it's a fail + // this doesn't work? + if (errno != EINPROGRESS) + { + close(sock); + return 0; + } + + // now do a timeout wait on writability on the socket + + fd_set connectSet; + struct timeval timeout; + FD_ZERO(&connectSet); + FD_SET(sock, &connectSet); + timeout.tv_sec = 10; + timeout.tv_usec = 0; + success = select(sock + 1, NULL, &connectSet, NULL, &timeout); + if (success < 1) + { + // timeout or error + close(sock); + return 0; + } + + // so the socket became available for writing. Contrary to expectation, this doesn't actually + // mean it connected... + + int soError; + socklen_t soErrorSize = sizeof(soError); + int gso = getsockopt(sock, SOL_SOCKET, SO_ERROR, &soError, &soErrorSize); + + if ((gso == 0) && (soError == 0)) + { + // success! + connected = 1; + return 1; + } + else + { + close(sock); + return 0; + } + +/* +The full documentation: + + EINPROGRESS + The socket is non-blocking and the connection can­ + not be completed immediately. It is possible to + select(2) or poll(2) for completion by selecting + the socket for writing. After select indicates + writability, use getsockopt(2) to read the SO_ERROR + option at level SOL_SOCKET to determine whether + connect completed successfully (SO_ERROR is zero) + or unsuccessfully (SO_ERROR is one of the usual + error codes listed here, explaining the reason for + the failure). +*/ +} + +void TCP::assignSocket(int tsocket) +{ + sock = tsocket; +} + +int TCP::isConnected() +{ + return connected; +} + +int TCP::sendPacket(void* buf, size_t count) +{ + size_t bytes_sent = 0; + int this_write; + int temp_write; + + while (bytes_sent < count) + { + do + { + temp_write = this_write = write(sock, buf, count - bytes_sent); +// Log::getInstance()->log("TCP", Log::DEBUG, "TCP has written %i bytes", temp_write); + } while ( (this_write < 0) && (errno == EINTR) ); + + + if (this_write <= 0) + { + return(this_write); + } + bytes_sent += this_write; + (unsigned char*)buf += this_write; + } + return(count); +} + +UCHAR* TCP::receivePacket() +{ + ULONG packetLength; + int success; + + success = readData((UCHAR*)&packetLength, sizeof(int)); + if (!success) return NULL; + + packetLength = ntohl(packetLength); + + if (packetLength > 200000) + { + Log::getInstance()->log("TCP", Log::ERR, "Received packet > 200000"); + return NULL; + } + if (packetLength == 0) + { + Log::getInstance()->log("TCP", Log::ERR, "Received packet len = 0"); + return NULL; + } + + UCHAR* buffer = (UCHAR*) malloc(packetLength); + + success = readData(buffer, packetLength); + + if (!success) + { + Log::getInstance()->log("TCP", Log::ERR, "readData failed"); + free(buffer); + close(sock); + connected = 0; + return NULL; + } + + dataLength = packetLength; + return buffer; +} + +int TCP::getDataLength() +{ + return dataLength; +} + +int TCP::readData(UCHAR* buffer, int totalBytes) +{ + + int bytesRead = 0; + int thisRead; + int readTries = 0; + int success; + fd_set readSet; + struct timeval timeout; + struct timeval* passToSelect; + + if (timeoutEnabled) passToSelect = &timeout; + else passToSelect = NULL; + + while(1) + { + FD_ZERO(&readSet); + FD_SET(sock, &readSet); + timeout.tv_sec = 10; + timeout.tv_usec = 0; + success = select(sock + 1, &readSet, NULL, NULL, passToSelect); + if (success < 1) + { + Log::getInstance()->log("TCP", Log::ERR, "Error or timeout"); + return 0; // error, or timeout + } + + thisRead = read(sock, &buffer[bytesRead], totalBytes - bytesRead); + if (!thisRead) + { + // if read returns 0 then connection is closed + // in non-blocking mode if read is called with no data available, it returns -1 + // and sets errno to EGAGAIN. but we use select so it wouldn't do that anyway. + Log::getInstance()->log("TCP", Log::ERR, "Detected connection closed"); + connected = 0; + return 0; + } + bytesRead += thisRead; + + if (bytesRead == totalBytes) + { + return 1; + } + else + { + if (++readTries == 100) + { + Log::getInstance()->log("TCP", Log::ERR, "Too many reads"); + return 0; + } + } + } +} + +void TCP::dump(unsigned char* data, ULONG size) +{ + printf("Size = %lu\n", size); + + ULONG c = 0; + while(c < size) + { + if ((size - c) > 15) + { + printf(" %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c\n", + data[c], data[c+1], data[c+2], data[c+3], data[c+4], data[c+5], data[c+6], data[c+7], + data[c+8], data[c+9], data[c+10], data[c+11], data[c+12], data[c+13], data[c+14], data[c+15], + dcc(data[c]), dcc(data[c+1]), dcc(data[c+2]), dcc(data[c+3]), dcc(data[c+4]), dcc(data[c+5]), dcc(data[c+6]), dcc(data[c+7]), + dcc(data[c+8]), dcc(data[c+9]), dcc(data[c+10]), dcc(data[c+11]), dcc(data[c+12]), dcc(data[c+13]), dcc(data[c+14]), dcc(data[c+15])); + c += 16; + } + else + { + switch (size - c) + { + case 15: + printf(" %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %c%c%c%c%c%c%c%c%c%c%c%c%c%c%c\n", + data[c], data[c+1], data[c+2], data[c+3], data[c+4], data[c+5], data[c+6], data[c+7], + data[c+8], data[c+9], data[c+10], data[c+11], data[c+12], data[c+13], data[c+14], + dcc(data[c]), dcc(data[c+1]), dcc(data[c+2]), dcc(data[c+3]), dcc(data[c+4]), dcc(data[c+5]), dcc(data[c+6]), dcc(data[c+7]), + dcc(data[c+8]), dcc(data[c+9]), dcc(data[c+10]), dcc(data[c+11]), dcc(data[c+12]), dcc(data[c+13]), dcc(data[c+14])); + c += 15; + break; + case 14: + printf(" %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %c%c%c%c%c%c%c%c%c%c%c%c%c%c\n", + data[c], data[c+1], data[c+2], data[c+3], data[c+4], data[c+5], data[c+6], data[c+7], + data[c+8], data[c+9], data[c+10], data[c+11], data[c+12], data[c+13], + dcc(data[c]), dcc(data[c+1]), dcc(data[c+2]), dcc(data[c+3]), dcc(data[c+4]), dcc(data[c+5]), dcc(data[c+6]), dcc(data[c+7]), + dcc(data[c+8]), dcc(data[c+9]), dcc(data[c+10]), dcc(data[c+11]), dcc(data[c+12]), dcc(data[c+13])); + c += 14; + break; + case 13: + printf(" %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %c%c%c%c%c%c%c%c%c%c%c%c%c\n", + data[c], data[c+1], data[c+2], data[c+3], data[c+4], data[c+5], data[c+6], data[c+7], + data[c+8], data[c+9], data[c+10], data[c+11], data[c+12], + dcc(data[c]), dcc(data[c+1]), dcc(data[c+2]), dcc(data[c+3]), dcc(data[c+4]), dcc(data[c+5]), dcc(data[c+6]), dcc(data[c+7]), + dcc(data[c+8]), dcc(data[c+9]), dcc(data[c+10]), dcc(data[c+11]), dcc(data[c+12])); + c += 13; + break; + case 12: + printf(" %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %c%c%c%c%c%c%c%c%c%c%c%c\n", + data[c], data[c+1], data[c+2], data[c+3], data[c+4], data[c+5], data[c+6], data[c+7], + data[c+8], data[c+9], data[c+10], data[c+11], + dcc(data[c]), dcc(data[c+1]), dcc(data[c+2]), dcc(data[c+3]), dcc(data[c+4]), dcc(data[c+5]), dcc(data[c+6]), dcc(data[c+7]), + dcc(data[c+8]), dcc(data[c+9]), dcc(data[c+10]), dcc(data[c+11])); + c += 12; + break; + case 11: + printf(" %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %c%c%c%c%c%c%c%c%c%c%c\n", + data[c], data[c+1], data[c+2], data[c+3], data[c+4], data[c+5], data[c+6], data[c+7], + data[c+8], data[c+9], data[c+10], + dcc(data[c]), dcc(data[c+1]), dcc(data[c+2]), dcc(data[c+3]), dcc(data[c+4]), dcc(data[c+5]), dcc(data[c+6]), dcc(data[c+7]), + dcc(data[c+8]), dcc(data[c+9]), dcc(data[c+10])); + c += 11; + break; + case 10: + printf(" %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %c%c%c%c%c%c%c%c%c%c\n", + data[c], data[c+1], data[c+2], data[c+3], data[c+4], data[c+5], data[c+6], data[c+7], + data[c+8], data[c+9], + dcc(data[c]), dcc(data[c+1]), dcc(data[c+2]), dcc(data[c+3]), dcc(data[c+4]), dcc(data[c+5]), dcc(data[c+6]), dcc(data[c+7]), + dcc(data[c+8]), dcc(data[c+9])); + c += 10; + break; + case 9: + printf(" %02X %02X %02X %02X %02X %02X %02X %02X %02X %c%c%c%c%c%c%c%c%c\n", + data[c], data[c+1], data[c+2], data[c+3], data[c+4], data[c+5], data[c+6], data[c+7], + data[c+8], + dcc(data[c]), dcc(data[c+1]), dcc(data[c+2]), dcc(data[c+3]), dcc(data[c+4]), dcc(data[c+5]), dcc(data[c+6]), dcc(data[c+7]), + dcc(data[c+8])); + c += 9; + break; + case 8: + printf(" %02X %02X %02X %02X %02X %02X %02X %02X %c%c%c%c%c%c%c%c\n", + data[c], data[c+1], data[c+2], data[c+3], data[c+4], data[c+5], data[c+6], data[c+7], + dcc(data[c]), dcc(data[c+1]), dcc(data[c+2]), dcc(data[c+3]), dcc(data[c+4]), dcc(data[c+5]), dcc(data[c+6]), dcc(data[c+7])); + c += 8; + break; + case 7: + printf(" %02X %02X %02X %02X %02X %02X %02X %c%c%c%c%c%c%c\n", + data[c], data[c+1], data[c+2], data[c+3], data[c+4], data[c+5], data[c+6], + dcc(data[c]), dcc(data[c+1]), dcc(data[c+2]), dcc(data[c+3]), dcc(data[c+4]), dcc(data[c+5]), dcc(data[c+6])); + c += 7; + break; + case 6: + printf(" %02X %02X %02X %02X %02X %02X %c%c%c%c%c%c\n", + data[c], data[c+1], data[c+2], data[c+3], data[c+4], data[c+5], + dcc(data[c]), dcc(data[c+1]), dcc(data[c+2]), dcc(data[c+3]), dcc(data[c+4]), dcc(data[c+5])); + c += 6; + break; + case 5: + printf(" %02X %02X %02X %02X %02X %c%c%c%c%c\n", + data[c], data[c+1], data[c+2], data[c+3], data[c+4], + dcc(data[c]), dcc(data[c+1]), dcc(data[c+2]), dcc(data[c+3]), dcc(data[c+4])); + c += 5; + break; + case 4: + printf(" %02X %02X %02X %02X %c%c%c%c\n", + data[c], data[c+1], data[c+2], data[c+3], + dcc(data[c]), dcc(data[c+1]), dcc(data[c+2]), dcc(data[c+3])); + c += 4; + break; + case 3: + printf(" %02X %02X %02X %c%c%c\n", + data[c], data[c+1], data[c+2], + dcc(data[c]), dcc(data[c+1]), dcc(data[c+2])); + c += 3; + break; + case 2: + printf(" %02X %02X %c%c\n", + data[c], data[c+1], + dcc(data[c]), dcc(data[c+1])); + c += 2; + break; + case 1: + printf(" %02X %c\n", + data[c], + dcc(data[c])); + c += 1; + break; + } + } + } +} + +UCHAR TCP::dcc(UCHAR c) +{ + if (isspace(c)) return ' '; + if (isprint(c)) return c; + return '.'; +} diff --git a/tcp.h b/tcp.h new file mode 100644 index 0000000..5eeed6b --- /dev/null +++ b/tcp.h @@ -0,0 +1,69 @@ +/* + Copyright 2004-2005 Chris Tallon + Copyright 2003-2004 University Of Bradford + + This file is part of VOMP. + + VOMP 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. + + VOMP is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with VOMP; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#ifndef TCP_H +#define TCP_H + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "defines.h" +#include "log.h" + +class TCP +{ + public: + TCP(); + ~TCP(); + + int connectTo(char *host, unsigned short port); + void assignSocket(int tsocket); + + int isConnected(); + void disableTimeout(); + + int sendPacket(void *, size_t size); + UCHAR* receivePacket(); + int getDataLength(); + + int readData(UCHAR* buffer, int totalBytes); + + static void dump(unsigned char* data, ULONG size); + + private: + int sock; + int connected; + int timeoutEnabled; + int dataLength; + + static UCHAR dcc(UCHAR c); +}; + +#endif diff --git a/thread.cc b/thread.cc new file mode 100644 index 0000000..75b4281 --- /dev/null +++ b/thread.cc @@ -0,0 +1,92 @@ +/* + Copyright 2004-2005 Chris Tallon + + This file is part of VOMP. + + VOMP 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. + + VOMP is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with VOMP; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#include "thread.h" + +// Undeclared functions, only for use in this file to start the thread +void threadInternalStart(void *arg) +{ + // I don't want signals + sigset_t sigset; + sigfillset(&sigset); + pthread_sigmask(SIG_BLOCK, &sigset, NULL); + + Thread *t = (Thread *)arg; + t->threadInternalStart2(); +} + +void Thread::threadInternalStart2() +{ + threadMethod(); +} + +int Thread::threadStart() +{ + pthread_cond_init(&threadCond, NULL); + pthread_mutex_init(&threadCondMutex, NULL); + + threadActive = 1; + if (pthread_create(&pthread, NULL, (void*(*)(void*))threadInternalStart, (void *)this) == -1) return 0; + return 1; +} + +void Thread::threadStop() +{ + threadActive = 0; + // Signal thread here in case it's waiting + threadSignal(); + pthread_join(pthread, NULL); +} + +void Thread::threadCancel() +{ + threadActive = 0; + pthread_cancel(pthread); + pthread_join(pthread, NULL); +} + +void Thread::threadCheckExit() +{ + if (!threadActive) pthread_exit(NULL); +} + +char Thread::threadIsActive() +{ + return threadActive; +} + +void Thread::threadSignal() +{ + pthread_mutex_lock(&threadCondMutex); + pthread_cond_signal(&threadCond); + pthread_mutex_unlock(&threadCondMutex); +} + +void Thread::threadSignalNoLock() +{ + pthread_cond_signal(&threadCond); +} + +void Thread::threadWaitForSignal() +{ + pthread_mutex_lock(&threadCondMutex); + pthread_cond_wait(&threadCond, &threadCondMutex); + pthread_mutex_unlock(&threadCondMutex); +} diff --git a/thread.h b/thread.h new file mode 100644 index 0000000..d57375a --- /dev/null +++ b/thread.h @@ -0,0 +1,57 @@ +/* + Copyright 2004-2005 Chris Tallon + + This file is part of VOMP. + + VOMP 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. + + VOMP is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with VOMP; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#ifndef THREAD_H +#define THREAD_H + +#include +#include + +class Thread +{ + protected: + // Override this method in derived classes + virtual void threadMethod()=0; + + // Methods to use from outside the thread + int threadStart(); // start the thread. threadMethod() will be called in derived class + void threadStop(); // stop the thread nicely. thread will be stopped when it next calls threadCheckExit() + void threadCancel(); // stop thread immediately. thread will be stopped at the next cancellation point + void threadSignal(); // releases a thread that has called threadWaitForSignal + void threadSignalNoLock(); // same as above but without locking guarantees. probably not a good idea. + char threadIsActive(); // returns 1 if thread has been started but not stop() or cancel() 'd + + // Methods to use from inside the thread + void threadCheckExit(); // terminates thread if threadStop() has been called + void threadWaitForSignal(); // pauses thread until threadSignal() is called + + // Internal bits and pieces + + private: + char threadActive; + pthread_t pthread; + pthread_cond_t threadCond; + pthread_mutex_t threadCondMutex; + + public: + void threadInternalStart2(); +}; + +#endif diff --git a/vchannellist.cc b/vchannellist.cc new file mode 100644 index 0000000..f1a818f --- /dev/null +++ b/vchannellist.cc @@ -0,0 +1,210 @@ +/* + Copyright 2004-2005 Chris Tallon + + This file is part of VOMP. + + VOMP 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. + + VOMP is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with VOMP; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#include "vchannellist.h" + +VChannelList::VChannelList(ULONG type) +{ + setScreenPos(80, 70); + setDimensions(420, 570); + + setBackgroundColour(0, 0, 100, 255); + setTitleBarOn(1); + + if (type == VDR::VIDEO) + { + setTitleText("Channels"); + } + else if (type == VDR::RADIO) + { + setTitleText("Radio Stations"); + } + setTitleBarColour(0, 0, 200, 255); + + sl.setScreenPos(screenX + 10, screenY + 30 + 5); + sl.setDimensions(height - 30 - 15 - 30, width - 20); +} + +VChannelList::~VChannelList() +{ + if (chanList) + { + while (!chanList->isEmpty()) + { + chanList->reset(); + delete (Channel*)chanList->remove(); + } + + delete chanList; + } +} + +void VChannelList::setList(List* tlist) +{ + char str[500]; + + chanList = tlist; + + Channel* chan; + int first = 1; + if (chanList) + { + chanList->reset(); + + while((chan = (Channel*)chanList->getCurrent())) + { + sprintf(str, "%lu. %s", chan->number, chan->name); + chan->index = sl.addOption(str, first); + first = 0; + chanList->next(); + } + } +} + +void VChannelList::draw() +{ + View::draw(); + sl.draw(); + + // Put the status stuff at the bottom + + WSymbol w; + + w.nextSymbol = WSymbol::UP; + w.setScreenPos(screenX + 20, screenY + 385); + w.draw(); + + w.nextSymbol = WSymbol::DOWN; + w.setScreenPos(screenX + 50, screenY + 385); + w.draw(); + + w.nextSymbol = WSymbol::SKIPBACK; + w.setScreenPos(screenX + 85, screenY + 385); + w.draw(); + + w.nextSymbol = WSymbol::SKIPFORWARD; + w.setScreenPos(screenX + 115, screenY + 385); + w.draw(); + + w.nextSymbol = WSymbol::PLAY; + w.setScreenPos(screenX + 150, screenY + 385); + w.draw(); + + doShowingBar(); +} + +void VChannelList::doShowingBar() +{ + int topOption = sl.getTopOption() + 1; + if (sl.getNumOptions() == 0) topOption = 0; + + char showing[200]; + sprintf(showing, "%i to %i of %i", topOption, sl.getBottomOption(), sl.getNumOptions()); + Box b; + b.setScreenPos(screenX + 220, screenY + 385); + b.setDimensions(25, 160); + b.fillColour(0, 0, 100, 255); + b.drawText(showing, 0, 0, 255, 255, 255); +} + +int VChannelList::handleCommand(int command) +{ + if (command == Remote::UP) + { + sl.up(); + sl.draw(); + + doShowingBar(); + show(); + return 2; + } + else if (command == Remote::DOWN) + { + sl.down(); + sl.draw(); + + doShowingBar(); + show(); + return 2; + } + else if (command == Remote::SKIPBACK) + { + sl.pageUp(); + sl.draw(); + + doShowingBar(); + show(); + return 2; + } + else if (command == Remote::SKIPFORWARD) + { + sl.pageDown(); + sl.draw(); + + doShowingBar(); + show(); + return 2; + } + else if (command == Remote::OK) + { + Channel* chan = NULL; + if (chanList) + { + int currentOption = sl.getCurrentOption(); + chanList->reset(); + + while((chan = (Channel*)chanList->getCurrent())) + { + if (currentOption == chan->index) break; + chanList->next(); + } + } + + if (chan == NULL) return 2; + + View* v = NULL; + +// stop radio +// if (chan->type == VDR::RADIO) return 2; + + if (chan->type == VDR::VIDEO) + { + v = new VVideoLive(chanList); + ((VVideoLive*)v)->setChannel(chan->number); + } + else if (chan->type == VDR::RADIO) + { + v = new VRadioLive(chanList); + ((VRadioLive*)v)->setChannel(chan->number); + } + + ViewMan::getInstance()->addNoLock(v); + v->draw(); + v->show(); + + return 2; + } + else if (command == Remote::BACK) + { + return 4; + } + // stop command getting to any more views + return 1; +} diff --git a/vchannellist.h b/vchannellist.h new file mode 100644 index 0000000..d45196c --- /dev/null +++ b/vchannellist.h @@ -0,0 +1,58 @@ +/* + Copyright 2004-2005 Chris Tallon + + This file is part of VOMP. + + VOMP 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. + + VOMP is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with VOMP; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#ifndef VCHANNELLIST_H +#define VCHANNELLIST_H + +#include +#include + +#include "view.h" +#include "list.h" +#include "wselectlist.h" +#include "remote.h" +#include "wsymbol.h" +#include "viewman.h" +#include "vdr.h" +#include "channel.h" +#include "vvideolive.h" +#include "vradiolive.h" + +class VChannelList : public View +{ + public: + VChannelList(ULONG type); + ~VChannelList(); + + void setList(List* chanList); + + int handleCommand(int command); + void draw(); + + private: + List* chanList; + ULONG type; + + WSelectList sl; + + void doShowingBar(); +}; + +#endif diff --git a/vchannelselect.cc b/vchannelselect.cc new file mode 100644 index 0000000..b9e3c17 --- /dev/null +++ b/vchannelselect.cc @@ -0,0 +1,129 @@ +/* + Copyright 2004-2005 Chris Tallon + + This file is part of VOMP. + + VOMP 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. + + VOMP is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with VOMP; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#include "vchannelselect.h" + +// this class only works as it does because the remote command +// values for the numbers are the numbers themselves ! + +VChannelSelect::VChannelSelect(VVideoLive* v, int command) +{ + setDimensions(30, 53); + setScreenPos(80, 60); + + setBackgroundColour(0, 0, 100, 255); + + first = -1; + second = -1; + third = command; + pos = 0; + + videoLive = v; +} + +void VChannelSelect::draw() +{ + View::draw(); + + // draw numbers + + char text[2]; + + switch(first) + { + case 0 ... 9: + { + sprintf(text, "%i", first); + drawText(text, 7, 5, 255, 255, 255); + break; + } + case -1: + { + drawText("_", 7, 5, 255, 255, 255); + break; + } + } + + switch(second) + { + case 0 ... 9: + { + sprintf(text, "%i", second); + drawText(text, 20, 5, 255, 255, 255); + break; + } + case -1: + { + drawText("_", 20, 5, 255, 255, 255); + break; + } + } + + switch(third) + { + case 0 ... 9: + { + sprintf(text, "%i", third); + drawText(text, 33, 5, 255, 255, 255); + break; + } + case -1: + { + drawText("_", 33, 5, 255, 255, 255); + break; + } + } +} + +int VChannelSelect::handleCommand(int command) +{ + switch(command) + { + case Remote::ZERO ... Remote::NINE: + { + if (pos == 1) first = second; + second = third; + third = command; + draw(); + show(); + if (pos == 1) + { + Message* m = new Message(); + m->from = this; + m->to = ViewMan::getInstance(); + m->message = Message::CLOSE_ME; + ViewMan::getInstance()->postMessage(m); + + m = new Message(); + m->from = this; + m->to = videoLive; + m->message = Message::CHANNEL_CHANGE; + m->parameter = (first * 100) + (second * 10) + third; + ViewMan::getInstance()->postMessage(m); + } + pos = 1; + + return 2; + } + } + + // allow command to drop through to other views + return 0; +} diff --git a/vchannelselect.h b/vchannelselect.h new file mode 100644 index 0000000..0c0461b --- /dev/null +++ b/vchannelselect.h @@ -0,0 +1,52 @@ +/* + Copyright 2004-2005 Chris Tallon + + This file is part of VOMP. + + VOMP 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. + + VOMP is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with VOMP; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#ifndef VCHANNELSELECT_H +#define VCHANNELSELECT_H + +#include + +#include "view.h" +#include "remote.h" +#include "vvideolive.h" +#include "message.h" +#include "viewman.h" + +class VVideoLive; + +class VChannelSelect : public View +{ + public: + VChannelSelect(VVideoLive* v, int command); + void draw(); + int handleCommand(int command); + + private: + int first; + int second; + int third; + + int pos; + + VVideoLive* videoLive; +}; + +#endif + diff --git a/vdr.cc b/vdr.cc new file mode 100644 index 0000000..6600856 --- /dev/null +++ b/vdr.cc @@ -0,0 +1,608 @@ +/* + Copyright 2004-2005 Chris Tallon + + This file is part of VOMP. + + VOMP 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. + + VOMP is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with VOMP; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#include "vdr.h" + +VDR* VDR::instance = NULL; + +VDR::VDR() +{ + if (instance) return; + instance = this; + initted = 0; + findingServer = 0; + tcp = NULL; + pthread_mutex_init(&mutex, NULL); +} + +VDR::~VDR() +{ + instance = NULL; + if (initted) shutdown(); +} + +VDR* VDR::getInstance() +{ + return instance; +} + +int VDR::init(int tport) +{ + if (initted) return 0; + initted = 1; + port = tport; + logger = Log::getInstance(); + return 1; +} + +int VDR::shutdown() +{ + if (!initted) return 0; + initted = 0; + disconnect(); + return 1; +} + +void VDR::findServers(std::vector& serverIPs) +{ + findingServer = 1; + char* message = "VOMP CLIENT"; + DatagramSocket ds(port); + + int haveAtLeastOne = 0; + char* newIP; + int retval; + int waitType = 1; + while(findingServer) + { + if (waitType == 1) + { + logger->log("Core", Log::NOTICE, "Broadcasting for server"); + ds.send("255.255.255.255", 3024, message, strlen(message)); + } + retval = ds.waitforMessage(waitType); + + if (retval == 2) // we got a reply + { + if (strcmp(ds.getData(), "VOMP SERVER")) // echo..... + { + waitType = 2; + } + else + { + newIP = new char[16]; + strcpy(newIP, ds.getFromIPA()); + serverIPs.push_back(newIP); + waitType = 2; + haveAtLeastOne = 1; + } + } + else + { + if (haveAtLeastOne) break; + waitType = 1; + } + } +} + +void VDR::cancelFindingServer() +{ + findingServer = 0; +} + +void VDR::setServerIP(char* newIP) +{ + strcpy(serverIP, newIP); +} + +int VDR::connect() +{ + if (tcp) delete tcp; + tcp = new TCP(); + return tcp->connectTo(serverIP, 3024); +} + +void VDR::disconnect() +{ + if (tcp) delete tcp; + tcp = NULL; +} + +long VDR::getSimpleReply() +{ + unsigned char* p = (unsigned char*)tcp->receivePacket(); + if (!p) return -1; + + Log::getInstance()->log("VDR", Log::DEBUG, "tcp data length = %i", tcp->getDataLength()); + + if (tcp->getDataLength() != 4) + { + free(p); + return -1; + } + + ULONG reply = ntohl(*(ULONG*)p); + + Log::getInstance()->log("VDR", Log::DEBUG, "VDR said %li", reply); + + free(p); + + return reply; +} + +char* VDR::getStringReply() +{ + unsigned char* p = (unsigned char*)tcp->receivePacket(); + if (!p) return NULL; + + int dataLength = tcp->getDataLength(); + + Log::getInstance()->log("VDR", Log::DEBUG, "Data length %u", dataLength); + + int count = 0; + + char* returnText; + int tLength; + + tLength = strlen((char*)&p[count]); + returnText = new char[tLength + 1]; + strcpy(returnText, (char*)&p[count]); + count += tLength + 1; + + free(p); + + return returnText; +} + +///////////////////////////////////////////////////////////////////////////// + +int VDR::doLogin() +{ + UCHAR buffer[8]; + + *(unsigned long*)&buffer[0] = htonl(4); + *(unsigned long*)&buffer[4] = htonl(VDR_LOGIN); + + pthread_mutex_lock(&mutex); + int a = tcp->sendPacket(buffer, 8); + if (a != 8) + { + pthread_mutex_unlock(&mutex); + return 0; + } + + // reply + + UCHAR* p = tcp->receivePacket(); + pthread_mutex_unlock(&mutex); + if (!p) return 0; + + unsigned long vdrTime = ntohl(*(unsigned long*)p); + Log::getInstance()->log("VDR", Log::DEBUG, "vdrtime = %lu", vdrTime); + + struct timespec currentTime; + currentTime.tv_sec = vdrTime; + currentTime.tv_nsec = 0; + int b = clock_settime(CLOCK_REALTIME, ¤tTime); + + Log::getInstance()->log("VDR", Log::DEBUG, "set clock = %u", b); + + free(p); + return 1; +} + +Directory* VDR::getRecordingsList() +{ + UCHAR buffer[8]; + + *(unsigned long*)&buffer[0] = htonl(4); + *(unsigned long*)&buffer[4] = htonl(VDR_GETRECORDINGLIST); + + pthread_mutex_lock(&mutex); + int a = tcp->sendPacket(buffer, 8); + if (a != 8) + { + pthread_mutex_unlock(&mutex); + return NULL; + } + + // reply + + unsigned char* p = (unsigned char*)tcp->receivePacket(); + pthread_mutex_unlock(&mutex); + if (!p) return 0; + + Directory* recDir = new Directory(); + recDir->setName("/"); + recDir->isRoot = 1; + + int dataLength = tcp->getDataLength(); + + Log::getInstance()->log("VDR", Log::DEBUG, "Data length %u", dataLength); + + int count = 0; + + Directory::totalSpace = (*(ULONG*)&p[count]); + count += sizeof(ULONG); + Directory::freeSpace = (*(ULONG*)&p[count]); + count += sizeof(ULONG); + Directory::usedPercent = (*(ULONG*)&p[count]); + count += sizeof(ULONG); + + int tLength; + + while (count < dataLength) + { + Recording* rec = new Recording(); + rec->start = ntohl(*(unsigned long*)&p[count]); + count += 4; + + tLength = strlen((char*)&p[count]); + rec->setName((char*)&p[count]); + +// rec->name = new char[tLength + 1]; +// strcpy(rec->name, (char*)&p[count]); + count += tLength + 1; + + tLength = strlen((char*)&p[count]); + rec->fileName = new char[tLength + 1]; + strcpy(rec->fileName, (char*)&p[count]); + count += tLength + 1; + + if(rec->isInDir()) + { + char* dirName = rec->getDirName(); + + Directory* d = recDir->getDirByName(dirName); + if (!d) + { + d = new Directory(); + d->setName(dirName); + Log::getInstance()->log("VDR", Log::DEBUG, "Added a new directory = %s", d->name); + recDir->dirList->add(d); + } + + d->recList->add(rec); + d->recList->next(); + } + else + { + recDir->recList->add(rec); + recDir->recList->next(); + } + + Log::getInstance()->log("VDR", Log::DEBUG, "Have added a recording to list. %lu %s", rec->start, rec->getProgName()); + } + + free(p); + + return recDir; +} + +int VDR::deleteRecording(char* fileName) +{ + unsigned long totalLength = 8 + strlen(fileName) + 1; + UCHAR buffer[totalLength]; + + *(unsigned long*)&buffer[0] = htonl(totalLength - 4); + *(unsigned long*)&buffer[4] = htonl(VDR_DELETERECORDING); + strcpy((char*)&buffer[8], fileName); + + pthread_mutex_lock(&mutex); + unsigned int a = tcp->sendPacket(buffer, totalLength); + if (a != totalLength) + { + pthread_mutex_unlock(&mutex); + return 0; + } + + int toReturn = getSimpleReply(); + pthread_mutex_unlock(&mutex); + return toReturn; +} + +char* VDR::getRecordingSummary(char* fileName) +{ + unsigned long totalLength = 8 + strlen(fileName) + 1; + UCHAR buffer[totalLength]; + + *(unsigned long*)&buffer[0] = htonl(totalLength - 4); + *(unsigned long*)&buffer[4] = htonl(VDR_GETSUMMARY); + strcpy((char*)&buffer[8], fileName); + + pthread_mutex_lock(&mutex); + unsigned int a = tcp->sendPacket(buffer, totalLength); + if (a != totalLength) + { + pthread_mutex_unlock(&mutex); + return NULL; + } + + char* toReturn = getStringReply(); + pthread_mutex_unlock(&mutex); + return toReturn; +} + +List* VDR::getChannelsList(ULONG type) +{ + UCHAR buffer[8]; + + *(unsigned long*)&buffer[0] = htonl(4); + *(unsigned long*)&buffer[4] = htonl(VDR_GETCHANNELLIST); + + pthread_mutex_lock(&mutex); + int a = tcp->sendPacket(buffer, 8); + if (a != 8) + { + pthread_mutex_unlock(&mutex); + return NULL; + } + + // reply + + unsigned char* p = (unsigned char*)tcp->receivePacket(); + pthread_mutex_unlock(&mutex); + if (!p) return NULL; + + List* chanList = new List(); + + int dataLength = tcp->getDataLength(); + + Log::getInstance()->log("VDR", Log::DEBUG, "Data length %u", dataLength); + + int count = 0; + + int tLength; + + while (count < dataLength) + { + Channel* chan = new Channel(); + chan->number = ntohl(*(unsigned long*)&p[count]); + count += 4; + chan->type = ntohl(*(unsigned long*)&p[count]); + count += 4; + + tLength = strlen((char*)&p[count]); + chan->name = new char[tLength + 1]; + strcpy(chan->name, (char*)&p[count]); + count += tLength + 1; + + if (chan->type == type) + { + chanList->add(chan); + chanList->next(); + Log::getInstance()->log("VDR", Log::DEBUG, "Have added a channel to list. %lu %lu %s", chan->number, chan->type, chan->name); + } + else + { + delete chan; + } + } + + free(p); + + return chanList; +} + +int VDR::streamChannel(ULONG number) +{ + UCHAR buffer[12]; + + *(unsigned long*)&buffer[0] = htonl(8); + *(unsigned long*)&buffer[4] = htonl(VDR_STREAMCHANNEL); + *(unsigned long*)&buffer[8] = htonl(number); + + pthread_mutex_lock(&mutex); + int a = tcp->sendPacket(buffer, 12); + + if (a != 12) + { + pthread_mutex_unlock(&mutex); + return 0; + } + + int toReturn = getSimpleReply(); + pthread_mutex_unlock(&mutex); + return toReturn; +} + +int VDR::stopStreaming() +{ + UCHAR buffer[8]; + + *(unsigned long*)&buffer[0] = htonl(4); + *(unsigned long*)&buffer[4] = htonl(VDR_STOPSTREAMING); + + pthread_mutex_lock(&mutex); + int a = tcp->sendPacket(buffer, 8); + + if (a != 8) + { + pthread_mutex_unlock(&mutex); + return 0; + } + + int toReturn = getSimpleReply(); + pthread_mutex_unlock(&mutex); + return toReturn; +} + +int VDR::getBlock(UCHAR* buf, ULLONG position, int amount) +{ + UCHAR buffer[20]; + + *(unsigned long*)&buffer[0] = htonl(16); + *(unsigned long*)&buffer[4] = htonl(VDR_GETBLOCK); + *(ULLONG*)&buffer[8] = htonll(position); + *(unsigned long*)&buffer[16] = htonl(amount); + + pthread_mutex_lock(&mutex); + int a = tcp->sendPacket(buffer, 20); + if (a != 20) + { + pthread_mutex_unlock(&mutex); + return 0; + } + + unsigned char* p = (unsigned char*)tcp->receivePacket(); + pthread_mutex_unlock(&mutex); + if (!p) return 0; + int dataLength = tcp->getDataLength(); + + memcpy(buf, p, dataLength); + free(p); + return dataLength; +} + +ULLONG VDR::streamRecording(Recording* rec) +{ + unsigned long totalLength = 8 + strlen(rec->fileName) + 1; + UCHAR buffer[totalLength]; + + *(unsigned long*)&buffer[0] = htonl(totalLength - 4); + *(unsigned long*)&buffer[4] = htonl(VDR_STREAMRECORDING); + strcpy((char*)&buffer[8], rec->fileName); + + pthread_mutex_lock(&mutex); + unsigned int a = tcp->sendPacket(buffer, totalLength); + if (a != totalLength) + { + pthread_mutex_unlock(&mutex); + return 0; + } + + unsigned char* p = (unsigned char*)tcp->receivePacket(); + pthread_mutex_unlock(&mutex); + if (!p) return 0; + + if (tcp->getDataLength() != 8) + { + free(p); + return 0; + } + + ULLONG recordingLength = ntohll(*(ULLONG*)p); + + Log::getInstance()->log("VDR", Log::DEBUG, "VDR said length is: %llu", recordingLength); + free(p); + + return recordingLength; +} + +int VDR::getChannelSchedule(ULONG number) +{ + UCHAR buffer[12]; + + *(unsigned long*)&buffer[0] = htonl(8); + *(unsigned long*)&buffer[4] = htonl(VDR_GETCHANNELSCHEDULE); + *(unsigned long*)&buffer[8] = htonl(number); + + pthread_mutex_lock(&mutex); + int a = tcp->sendPacket(buffer, 12); + + if (a != 12) + { + pthread_mutex_unlock(&mutex); + return -1; + } + + unsigned char* p = (unsigned char*)tcp->receivePacket(); + pthread_mutex_unlock(&mutex); + if (!p) return -1; + + int dataLength = tcp->getDataLength(); + + if (dataLength != 4) + { + free(p); + return -1; + } + + ULONG data = ntohl(*(ULONG*)p); + free(p); + + Log::getInstance()->log("VDR", Log::DEBUG, "Success got to end of getChannelSchedule %lu", data); + + return data; +} + +ULLONG VDR::getResumePoint(char* fileName) +{ + char* resumeString = configLoad("ResumeData", fileName); + if (!resumeString) return 0; + + ULLONG toReturn = strtoull(resumeString, NULL, 10); + delete[] resumeString; + return toReturn; +} + +int VDR::configSave(char* section, char* key, char* value) +{ + ULONG totalLength = 8 + strlen(section) + strlen(key) + strlen(value) + 3; // 8 for headers, 3 for nulls + UCHAR buffer[totalLength]; + + *(unsigned long*)&buffer[0] = htonl(totalLength - 4); + *(unsigned long*)&buffer[4] = htonl(VDR_CONFIGSAVE); + + int position = 8; + strcpy((char*)&buffer[position], section); + position += strlen(section) + 1; + strcpy((char*)&buffer[position], key); + position += strlen(key) + 1; + strcpy((char*)&buffer[position], value); + + pthread_mutex_lock(&mutex); + unsigned int a = tcp->sendPacket(buffer, totalLength); + if (a != totalLength) + { + pthread_mutex_unlock(&mutex); + return 0; + } + + int toReturn = getSimpleReply(); + pthread_mutex_unlock(&mutex); + return toReturn; +} + +char* VDR::configLoad(char* section, char* key) +{ + ULONG totalLength = 8 + strlen(section) + strlen(key) + 2; // 8 for headers, 2 for nulls + UCHAR buffer[totalLength]; + + *(unsigned long*)&buffer[0] = htonl(totalLength - 4); + *(unsigned long*)&buffer[4] = htonl(VDR_CONFIGLOAD); + + int position = 8; + strcpy((char*)&buffer[position], section); + position += strlen(section) + 1; + strcpy((char*)&buffer[position], key); + + pthread_mutex_lock(&mutex); + unsigned int a = tcp->sendPacket(buffer, totalLength); + if (a != totalLength) + { + pthread_mutex_unlock(&mutex); + return NULL; + } + + char* toReturn = getStringReply(); + pthread_mutex_unlock(&mutex); + return toReturn; +} diff --git a/vdr.h b/vdr.h new file mode 100644 index 0000000..9144a15 --- /dev/null +++ b/vdr.h @@ -0,0 +1,107 @@ +/* + Copyright 2004-2005 Chris Tallon + + This file is part of VOMP. + + VOMP 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. + + VOMP is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with VOMP; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#ifndef VDR_H +#define VDR_H + +#include +#include +#include +#include + +#include "defines.h" +#include "log.h" +#include "dsock.h" +#include "tcp.h" +#include "list.h" +#include "directory.h" +#include "recording.h" +#include "channel.h" + + // FIXME do some tcp connection error checking and kill it! + +class VDR +{ + public: + VDR(); + ~VDR(); + static VDR* getInstance(); + + int init(int port); + int shutdown(); + + void findServers(std::vector& serverIPs); + void cancelFindingServer(); + void setServerIP(char*); + int connect(); + void disconnect(); + ULLONG getResumePoint(char* fileName); // uses configLoad + + // protocol functions + + int doLogin(); + + Directory* getRecordingsList(); + char* getRecordingSummary(char* fileName); + int deleteRecording(char* fileName); + ULLONG streamRecording(Recording* rec); + + List* getChannelsList(ULONG type); + int streamChannel(ULONG number); + + int getBlock(UCHAR* buf, ULLONG position, int maxAmount); + int stopStreaming(); + int getChannelSchedule(ULONG number); + int configSave(char* section, char* key, char* value); + char* configLoad(char* section, char* key); + + // end + + const static ULONG VIDEO = 1; + const static ULONG RADIO = 2; + + private: + static VDR* instance; + Log* logger; + int initted; + int findingServer; + TCP* tcp; + int port; + char serverIP[16]; + pthread_mutex_t mutex; + + const static ULONG VDR_LOGIN = 1; + const static ULONG VDR_GETRECORDINGLIST = 2; + const static ULONG VDR_DELETERECORDING = 3; + const static ULONG VDR_GETSUMMARY = 4; + const static ULONG VDR_GETCHANNELLIST = 5; + const static ULONG VDR_STREAMCHANNEL = 6; + const static ULONG VDR_GETBLOCK = 7; + const static ULONG VDR_STOPSTREAMING = 8; + const static ULONG VDR_STREAMRECORDING = 9; + const static ULONG VDR_GETCHANNELSCHEDULE = 10; + const static ULONG VDR_CONFIGSAVE = 11; + const static ULONG VDR_CONFIGLOAD = 12; + + long getSimpleReply(); + char* getStringReply(); +}; + +#endif diff --git a/vfeed.cc b/vfeed.cc new file mode 100644 index 0000000..7dc9a1b --- /dev/null +++ b/vfeed.cc @@ -0,0 +1,72 @@ +/* + Copyright 2004-2005 Chris Tallon + + This file is part of VOMP. + + VOMP 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. + + VOMP is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with VOMP; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#include "vfeed.h" + +VFeed::VFeed(Callback* tcb) +: cb(*tcb) +{ + delayTime.tv_sec = 0; + delayTime.tv_nsec = 100000000; +} + +int VFeed::init(int tfd) +{ + fd = tfd; + return 1; +} + +int VFeed::shutdown() +{ + // FIXME + return 1; +} + +int VFeed::start() +{ + return threadStart(); +} + +void VFeed::stop() +{ + threadCancel(); +} + +void VFeed::threadMethod() +{ + Log::getInstance()->log("VFeed", Log::DEBUG, "Started"); + + int vlen; + + while(1) + { + vlen = Demuxer::getInstance()->writeVideo(fd); // FIXME + if (vlen) + { + Log::getInstance()->log("VFeed", Log::DEBUG, "Written %i", vlen); + cb.call(); + } + else + { + nanosleep(&delayTime, NULL); + } + } +} + diff --git a/vfeed.h b/vfeed.h new file mode 100644 index 0000000..2e7019b --- /dev/null +++ b/vfeed.h @@ -0,0 +1,51 @@ +/* + Copyright 2004-2005 Chris Tallon + + This file is part of VOMP. + + VOMP 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. + + VOMP is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with VOMP; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#ifndef VFEED_H +#define VFEED_H + +#include +#include + +#include "log.h" +#include "thread.h" +#include "demuxer.h" +#include "callback.h" + +class VFeed : public Thread +{ + public: + VFeed(Callback* tcb); + + int init(int fd); + int shutdown(); + + int start(); + void stop(); + + private: + void threadMethod(); + int fd; + Callback& cb; + struct timespec delayTime; + +}; + +#endif diff --git a/video.cc b/video.cc new file mode 100644 index 0000000..608f7b3 --- /dev/null +++ b/video.cc @@ -0,0 +1,304 @@ +/* + Copyright 2004-2005 Chris Tallon + + This file is part of VOMP. + + VOMP 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. + + VOMP is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with VOMP; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#include "video.h" + +Video* Video::instance = NULL; + +Video::Video() +{ + if (instance) return; + instance = this; + initted = 0; + + fdVideo = 0; + + format = 0; + connection = 0; + aspectRatio = 0; + mode = 0; +} + +Video::~Video() +{ + instance = NULL; +} + +Video* Video::getInstance() +{ + return instance; +} + +int Video::init(UCHAR format, UCHAR connection, UCHAR aspectRatio, UCHAR mode) +{ + if (initted) return 0; + initted = 1; + +// if ((fdVideo = open("/dev/vdec_dev", O_RDWR | O_NONBLOCK)) < 0) return 0; + if ((fdVideo = open("/dev/vdec_dev", O_WRONLY)) < 0) return 0; + + this->format = format; + this->connection = connection; + this->aspectRatio = aspectRatio; + this->mode = mode; + + if (!initAllParams()) + { + shutdown(); + return 0; + } + + attachFrameBuffer(); + stop(); + + return 1; +} + +int Video::initAllParams() +{ + return (setFormat(format) && setConnection(connection) && + setAspectRatio(aspectRatio) && setMode(mode) && setSource()); +} + +int Video::shutdown() +{ + if (!initted) return 0; + initted = 0; + close(fdVideo); + return 1; +} + +int Video::write(char *buf, int len) +{ + return 1;//write(fdVideo, buf, len); +} + +int Video::setFormat(UCHAR format) +{ + if (!initted) return 0; + if ((format != PAL) && (format != NTSC)) return 0; + + if (ioctl(fdVideo, AV_SET_VID_DISP_FMT, format) != 0) return 0; + this->format = format; + return 1; +} + +int Video::setConnection(UCHAR connection) +{ + if (!initted) return 0; + if ((connection != SCART) && (connection != COMPOSITE) && (connection != SVIDEO)) return 0; + + if (ioctl(fdVideo, AV_SET_VID_OUTPUT, connection) != 0) return 0; + this->connection = connection; + return 1; +} + +int Video::setAspectRatio(UCHAR aspectRatio) +{ + if (!initted) return 0; + if ((aspectRatio != ASPECT4X3) && (aspectRatio != ASPECT16X9)) return 0; + + if (ioctl(fdVideo, AV_SET_VID_RATIO, aspectRatio) != 0) return 0; + this->aspectRatio = aspectRatio; + return 1; +} + +int Video::setMode(UCHAR mode) +{ + if (!initted) return 0; + + if ((mode != NORMAL) && (mode != LETTERBOX) && (mode != UNKNOWN2) && (mode != QUARTER) && (mode != EIGHTH) + && (mode != ZOOM) && (mode != UNKNOWN6)) return 0; + +// mode = LETTERBOX; + + if (ioctl(fdVideo, AV_SET_VID_MODE, mode) != 0) return 0; + this->mode = mode; + return 1; +} + +int Video::test() +{ + return 0; + +// ULLONG stc = 0; +// return ioctl(fdVideo, AV_SET_VID_STC, &stc); +/* + // reset(); + return 1; +*/ +} + +int Video::test2() +{ + return 0; +} + + + +int Video::signalOff() +{ + if (ioctl(fdVideo, AV_SET_VID_DENC, 0) != 0) return 0; + return 1; +} + +int Video::signalOn() +{ + if (ioctl(fdVideo, AV_SET_VID_DENC, 1) != 0) return 0; + return 1; +} + +int Video::setSource() +{ + if (!initted) return 0; + + // What does this do... + if (ioctl(fdVideo, AV_SET_VID_SRC, 1) != 0) return 0; + return 1; +} + +int Video::setPosition(int x, int y) +{ + if (!initted) return 0; + + vid_pos_regs_t pos_d; + pos_d.x = x; + pos_d.y = y; + +/* +typedef struct { + int w; + int h; + int scale; + int x1; + int y; + int x; + int y2; + int x3; + int y3; + int x4; + int y4; +} vid_pos_regs_t; +*/ + +/* + pos_d.w = 100; + pos_d.h = 30; + pos_d.scale = 2; + pos_d.x1 = 0; + pos_d.y = 100; // Top left X + pos_d.x = 50; // Top left Y + pos_d.y2 = 30; + pos_d.x3 = 60; + pos_d.y3 = 90; + pos_d.x4 = 120; + pos_d.y4 = 150; +*/ + + if (ioctl(fdVideo, AV_SET_VID_POSITION, &pos_d) != 0) return 0; + return 1; +} + +int Video::sync() +{ + if (!initted) return 0; + + if (ioctl(fdVideo, AV_SET_VID_SYNC, 2) != 0) return 0; + return 1; +} + +int Video::play() +{ + if (!initted) return 0; + + if (ioctl(fdVideo, AV_SET_VID_PLAY, 0) != 0) return 0; + return 1; +} + +int Video::stop() +{ + if (!initted) return 0; + + if (ioctl(fdVideo, AV_SET_VID_STOP, 0) != 0) return 0; + return 1; +} + +int Video::reset() +{ + if (!initted) return 0; + + if (ioctl(fdVideo, AV_SET_VID_RESET, 0x11) != 0) return 0; + return 1; +} + +int Video::pause() +{ + if (!initted) return 0; + + if (ioctl(fdVideo, AV_SET_VID_PAUSE, 0) != 0) return 0; + return 1; +} + +int Video::unPause() +{ + if (!initted) return 0; + if (ioctl(fdVideo, AV_SET_VID_PLAY, 0) != 0) return 0; + return 1; +} + +int Video::fastForward() +{ + if (!initted) return 0; + + if (ioctl(fdVideo, AV_SET_VID_FFWD, 1) != 0) return 0; + return 1; +} + +int Video::unFastForward() +{ + if (!initted) return 0; + +// if (ioctl(fdVideo, AV_SET_VID_RESET, 0x11) != 0) return 0; // don't need this. + + if (ioctl(fdVideo, AV_SET_VID_PLAY, 0) != 0) return 0; + return 1; +} + +int Video::attachFrameBuffer() +{ + if (!initted) return 0; + + if (ioctl(fdVideo, AV_SET_VID_FB, 0) != 0) return 0; + return 1; +} + +int Video::blank(void) +{ + if (ioctl(fdVideo, AV_SET_VID_FB, 1) != 0) return 0; + if (ioctl(fdVideo, AV_SET_VID_FB, 0) != 0) return 0; + return 1; +} + +int Video::getFD() +{ + if (!initted) return 0; + + return fdVideo; +} diff --git a/video.h b/video.h new file mode 100644 index 0000000..ba6ff77 --- /dev/null +++ b/video.h @@ -0,0 +1,111 @@ +/* + Copyright 2004-2005 Chris Tallon + + This file is part of VOMP. + + VOMP 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. + + VOMP is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with VOMP; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +// Thanks to Jon Gettler and BtB of the MVPMC project for all the hardware information + + +#ifndef VIDEO_H +#define VIDEO_H + +// FIXME - check why so many things include unistd + +#include +#include +#include +#include + +#include "defines.h" +#include "stb.h" + +class Video +{ + public: + Video(); + ~Video(); + static Video* getInstance(); + + int init(UCHAR format, UCHAR connection, UCHAR aspectRatio, UCHAR mode); + int shutdown(); + + // Video formats - AV_SET_VID_DISP_FMT + const static UCHAR NTSC = 0; + const static UCHAR PAL = 1; + + // Video connections - AV_SET_VID_OUTPUT + const static UCHAR SCART = 0; + const static UCHAR COMPOSITE = 1; + const static UCHAR SVIDEO = 2; + + // Video aspect ratios - AV_SET_VID_RATIO + const static UCHAR ASPECT4X3 = 0; + const static UCHAR ASPECT16X9 = 1; + + // Video modes - AV_SET_VID_MODE + const static UCHAR NORMAL = 0; // If aspect==4:3, 4:3 unknown / 16:9 chop sides + // If aspect==16:9, 4:3 unknown / 16:9 stretch middle over all screen + const static UCHAR LETTERBOX = 1; // If aspect==4:3, 4:3 unknown / 16:9 letterbox at top of screen (!!) + // If aspect==16:9, 4:3 unknown / 16:9 proper 16:9 mode + const static UCHAR UNKNOWN2 = 2; + const static UCHAR QUARTER = 3; + const static UCHAR EIGHTH = 4; + const static UCHAR ZOOM = 5; + const static UCHAR UNKNOWN6 = 6; + + int setFormat(UCHAR format); + int setConnection(UCHAR connection); + int setAspectRatio(UCHAR aspectRatio); + int setMode(UCHAR mode); + int test(); + int test2(); + int setSource(); + int setPosition(int x, int y); + int sync(); + int play(); + int stop(); + int pause(); + int unPause(); + int fastForward(); + int unFastForward(); + int reset(); + int blank(); + int signalOn(); + int signalOff(); + + int attachFrameBuffer(); // What does this do? + + int write(char *buf, int len); + + int getFD(); + + private: + static Video* instance; + int initted; + + int initAllParams(); + + int fdVideo; + + UCHAR format; + UCHAR connection; + UCHAR aspectRatio; + UCHAR mode; +}; + +#endif diff --git a/view.cc b/view.cc new file mode 100644 index 0000000..e39115f --- /dev/null +++ b/view.cc @@ -0,0 +1,123 @@ +/* + Copyright 2004-2005 Chris Tallon + + This file is part of VOMP. + + VOMP 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. + + VOMP is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with VOMP; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#include "view.h" + +char View::numViews = 0; + +View::View() +{ + height = 0; + width = 0; + screenX = 0; + screenY = 0; + + delSec = 0; + delNSec = 0; + seconds = 0; + + backgroundR = 0; + backgroundG = 0; + backgroundB = 0; + backgroundA = 0; + + titleBarR = 0; + titleBarG = 0; + titleBarB = 0; + titleBarA = 0; + + titleBarOn = 0; + borderOn = 0; + + titleText = NULL; + + numViews++; + Log::getInstance()->log("View", Log::DEBUG, "Construct %p, now %u", this, numViews); +} + +View::~View() +{ + if (titleText) delete[] titleText; + + numViews--; + Log::getInstance()->log("View", Log::DEBUG, "Destruct, now %u", numViews); +} + +void View::setTitleText(char* takeText) +{ + int length = strlen(takeText); + titleText = new char[length + 1]; + strcpy(titleText, takeText); +} + +void View::draw() +{ + + if (borderOn) + { + rectangle(0, 0, width, height, titleBarR, titleBarG, titleBarB, titleBarA); + rectangle(5, 5, width-10, height-10, backgroundR, backgroundG, backgroundB, backgroundA); + } + else + { + fillColour(backgroundR, backgroundG, backgroundB, backgroundA); + } + + if (titleBarOn) + { + rectangle(0, 0, width, 30, titleBarR, titleBarG, titleBarB, titleBarA); + if (titleText) drawText(titleText, 5, 5, 255, 255, 255); + } +} + +int View::handleCommand(int command) +{ + return 0; +} + +void View::processMessage(Message* m) +{ +} + +void View::setBackgroundColour(UCHAR r, UCHAR g, UCHAR b, UCHAR a) +{ + backgroundR = r; + backgroundG = g; + backgroundB = b; + backgroundA = a; +} + +void View::setTitleBarColour(UCHAR r, UCHAR g, UCHAR b, UCHAR a) +{ + titleBarR = r; + titleBarG = g; + titleBarB = b; + titleBarA = a; +} + +void View::setTitleBarOn(UCHAR on) +{ + titleBarOn = on; +} + +void View::setBorderOn(UCHAR on) +{ + borderOn = on; +} diff --git a/view.h b/view.h new file mode 100644 index 0000000..d70d566 --- /dev/null +++ b/view.h @@ -0,0 +1,74 @@ +/* + Copyright 2004-2005 Chris Tallon + + This file is part of VOMP. + + VOMP 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. + + VOMP is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with VOMP; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#ifndef VIEW_H +#define VIEW_H + +#include + +#include "log.h" +#include "box.h" +#include "defines.h" +#include "message.h" + +class View : public Box +{ + public: + View(); + virtual ~View(); + + virtual void draw(); + virtual int handleCommand(int command); + + void setBorderOn(UCHAR on); + void setTitleBarOn(UCHAR on); + void setTitleText(char* title); + void setBackgroundColour(UCHAR r, UCHAR g, UCHAR b, UCHAR a); + void setTitleBarColour(UCHAR r, UCHAR g, UCHAR b, UCHAR a); + + // For use by ViewMan + long delSec; + long delNSec; + int seconds; + // + + virtual void processMessage(Message* m); + + private: + static char numViews; + + UCHAR backgroundR; + UCHAR backgroundG; + UCHAR backgroundB; + UCHAR backgroundA; + + UCHAR titleBarOn; + UCHAR borderOn; + + char* titleText; + + protected: + UCHAR titleBarR; + UCHAR titleBarG; + UCHAR titleBarB; + UCHAR titleBarA; +}; + +#endif diff --git a/viewman.cc b/viewman.cc new file mode 100644 index 0000000..4ab9ad4 --- /dev/null +++ b/viewman.cc @@ -0,0 +1,540 @@ +/* + Copyright 2004-2005 Chris Tallon + + This file is part of VOMP. + + VOMP 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. + + VOMP is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with VOMP; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#include "viewman.h" + +ViewMan* ViewMan::instance = NULL; + +ViewMan::ViewMan() +{ + if (instance) return; + instance = this; + initted = 0; + topView = 0; + resetThreadFlag = 0; + autoDeleteThreadRun = 0; + callFromThread = 0; +} + +ViewMan::~ViewMan() +{ + instance = NULL; +} + +ViewMan* ViewMan::getInstance() +{ + return instance; +} + +int ViewMan::init() +{ + if (initted) return 0; + pthread_mutex_init(&viewManLock, NULL); + pthread_cond_init(&autoDeleteThreadSignal, NULL); + if (!startAutoDeleteThread()) return 0; + initted = 1; + return 1; +} + +int ViewMan::shutdown() +{ + if (!initted) return 0; + + removeAll(); + + // get the lock here to ensure that the thread is waiting on the cond + pthread_mutex_lock(&viewManLock); + autoDeleteThreadRun = 0; + pthread_cond_signal(&autoDeleteThreadSignal); + pthread_mutex_unlock(&viewManLock); + pthread_join(autoDeleteThread, NULL); + initted = 0; + return 1; +} + +int ViewMan::add(View* v) +{ + if (!initted) return 0; + if (topView == 10) return 0; + + pthread_mutex_lock(&viewManLock); + + topView++; + views[topView] = v; + + resetThread(); + pthread_mutex_unlock(&viewManLock); + + return 1; +} + +int ViewMan::addNoLock(View* v) +{ + if (!initted) return 0; + if (topView == 10) return 0; + + topView++; + views[topView] = v; + + resetThread(); + + return 1; +} + + +// ---------------------------------------------------- REMOVE CODE + +int ViewMan::removeView(View* toDelete, int noLock, int noShow) +{ + if (!initted) return 0; + if (topView == 0) return 0; + + if (!noLock) pthread_mutex_lock(&viewManLock); + + Log::getInstance()->log("ViewMan", Log::DEBUG, "entering remove, %u topview", topView); + + int i; + int wasTopView = 0; + int slotTakenFrom = 0; + + if (toDelete == NULL) + { + toDelete = views[topView]; + i = topView; + wasTopView = 1; + } + else + { + // to be deleted view is more likely to be at the top + + + for (i = topView; i > 0; i--) + { + if (views[i] == toDelete) + { + if (i == topView) wasTopView = 1; + break; + } + } + + if (i == 0) + { + // not a View we have! + pthread_mutex_unlock(&viewManLock); + return 0; + } + } + + // Save the position we are deleting the view from + slotTakenFrom = i; + + // Shift the views on top down one + for(; i < topView; i++) + { + views[i] = views[i + 1]; + } + topView--; + + // Done. Now on to drawing. + + View* newTopBox = views[topView]; // just to make second optimisation easier + + // First optimisation. If there are no views left, don't do anything! + if (topView == 0) + { + Log::getInstance()->log("ViewMan", Log::DEBUG, "re-draw using optimisation 1"); + } + + // second optimisation. if view being deleted is entirely within the view underneath it, + // and was the top most box, + // only need to redraw the one underneath + else if ( wasTopView + && (toDelete->getScreenX() >= newTopBox->getScreenX()) + && (toDelete->getScreenY() >= newTopBox->getScreenY()) + && ((toDelete->getScreenX() + toDelete->getWidth()) <= (newTopBox->getScreenX() + newTopBox->getWidth())) + && ((toDelete->getScreenY() + toDelete->getHeight()) <= (newTopBox->getScreenY() + newTopBox->getHeight())) + ) + { + newTopBox->draw(); + newTopBox->show(); + Log::getInstance()->log("ViewMan", Log::DEBUG, "re-draw using optimisation 2"); + } + + // third optimisation. if the box being deleted is totally within one above it, don't do anything + else if ((slotTakenFrom <= topView) && isTotallyCovered(toDelete, slotTakenFrom)) + { + Log::getInstance()->log("ViewMan", Log::DEBUG, "re-draw using optimisation 3"); + } + + // no optimisations left, redo everything. + else + { + redrawAll(noShow); + Log::getInstance()->log("ViewMan", Log::DEBUG, "re-draw using no optimisation"); + } + + // Delete the view + delete toDelete; + + resetThread(); + if (!noLock) pthread_mutex_unlock(&viewManLock); + + return 1; +} + +int ViewMan::isTotallyCovered(View* toDelete, int slotTakenFrom) +{ + int todelx1 = toDelete->getScreenX(); + int todelx2 = toDelete->getScreenX() + toDelete->getWidth(); + int todely1 = toDelete->getScreenY(); + int todely2 = toDelete->getScreenY() + toDelete->getHeight(); + + int x1 = 999999; + int x2 = 0; + int y1 = 999999; + int y2 = 0; + + int currentx1; + int currentx2; + int currenty1; + int currenty2; + + for (int i = slotTakenFrom; i <= topView; i++) + { + currentx1 = views[i]->getScreenX(); + currentx2 = currentx1 + views[i]->getWidth(); + currenty1 = views[i]->getScreenY(); + currenty2 = currenty1 + views[i]->getHeight(); + +// printf("Iteration in tc before. i=%i x1=%i x2=%i y1=%i y2=%i cx1=%i cx2=%i cy1=%i cy2=%i\n", i, x1, x2, y1, y2, currentx1, currentx2, currenty1, currenty2); + + if (currentx1 < x1) x1 = currentx1; + if (currentx2 > x2) x2 = currentx2; + if (currenty1 < y1) y1 = currenty1; + if (currenty2 > y2) y2 = currenty2; + +// printf("Iteration in tc after . i=%i x1=%i x2=%i y1=%i y2=%i\n", i, x1, x2, y1, y2); + } + + // k, now x1 x2 y1 y2 contain the dimensions of the biggest box over the deleted slot + + if ( (x1 <= todelx1) + && (x2 >= todelx2) + && (y1 <= todely1) + && (y2 >= todely2) + ) + { + return 1; + } + else + { + return 0; + } +} + +void ViewMan::redrawAll(int noShow) +{ + for (int i = 1; i <= topView; i++) + { + views[i]->draw(); + } + + if (!noShow) Box::showAll(); +} + +// ---------------------------------------------------- END OF REMOVE CODE + + +void ViewMan::removeAll() +{ + pthread_mutex_lock(&viewManLock); + + // FIXME for don't delete wallpaper cos surface destroy doesn't work + + for (; topView > 1; topView--) + { + delete views[topView]; + } + + resetThread(); + pthread_mutex_unlock(&viewManLock); +} + +int ViewMan::handleCommand(UCHAR command) +{ + pthread_mutex_lock(&viewManLock); + + int retVal; + int retVal2 = 0; + int i; + + // handle command return values + // 0 - drop through to next view + // 1 - dont drop to next view, but not handled + // 2 - handled - stop command here + // 4 - handled - delete this view + + for (i=topView; i>0; i--) + { + retVal = views[i]->handleCommand(command); + if (retVal == 1) + { + // not handled but don't give to any more views + pthread_mutex_unlock(&viewManLock); + return 0; + } + + if (retVal == 2) + { + // command handled + if (views[i]->seconds) + { + struct timespec currentTime; + clock_gettime(CLOCK_REALTIME, ¤tTime); + views[i]->delSec = currentTime.tv_sec + views[i]->seconds; + views[i]->delNSec = currentTime.tv_nsec; + resetThread(); + } + pthread_mutex_unlock(&viewManLock); + retVal2 = 1; + break; + } + else if (retVal == 4) + { +// removeNoLock(views[i]); +// Box::showAll(); +// resetThread(); + removeView(views[i], 1); + pthread_mutex_unlock(&viewManLock); + retVal2 = 1; + break; + } + } + + Log::getInstance()->log("ViewMan", Log::DEBUG, "out of handlecommand code, now on to messages"); + + processMessageQueue(); + + pthread_mutex_unlock(&viewManLock); + return retVal2; +} + +void ViewMan::processMessage(Message* m) +{ + if (m->to != this) + { + for (int i = topView; i > 0; i--) + { + if (views[i] == m->to) + { + Log::getInstance()->log("ViewMan", Log::DEBUG, "sending message to view"); + Log::getInstance()->log("ViewMan", Log::DEBUG, "%p %p %lu", m->from, m->to, m->message); + views[i]->processMessage(m); + return; + } + } + } + + Log::getInstance()->log("ViewMan", Log::DEBUG, "it's for meeee!"); + + switch(m->message) + { + case Message::CLOSE_ME: + { + removeView((View*)m->from, 1, 1); + break; + } + case Message::UPDATE_SCREEN: + { + Box::showAll(); + break; + } + case Message::SWAP_ME_FOR: + { + View* toReplace = (View*) m->parameter; + + removeView((View*)m->from, 1, 1); + + topView++; + views[topView] = toReplace; + if (toReplace->seconds) + { + struct timespec currentTime; + clock_gettime(CLOCK_REALTIME, ¤tTime); + toReplace->delSec = currentTime.tv_sec + toReplace->seconds; + toReplace->delNSec = currentTime.tv_nsec; + } + toReplace->draw(); + Box::showAll(); + resetThread(); + break; + } + } +} + +int ViewMan::timedDelete(View* v, int seconds, int lock) +{ + int success; + + if (lock) pthread_mutex_lock(&viewManLock); + + struct timespec currentTime; + clock_gettime(CLOCK_REALTIME, ¤tTime); + + if (v) + { + if (seconds) + { + v->seconds = seconds; + v->delSec = currentTime.tv_sec + seconds; + v->delNSec = currentTime.tv_nsec; + } + else + { + // for cancelling the delete + v->seconds = 0; + v->delSec = 0; + v->delNSec = 0; + } + success = 1; + } + else + { + success = 0; + } + + resetThread(); + if (lock) pthread_mutex_unlock(&viewManLock); + + return success; +} + + +// THE THREAD CODE STARTS HERE ///////////////////////////////////////////////////////////// + +void ViewMan::resetThread() +{ + // must be called with mutex already locked + resetThreadFlag = 1; + pthread_cond_signal(&autoDeleteThreadSignal); +} + +// undeclared function +void startAutoDeleteThread2(void *arg) +{ + ViewMan *v = (ViewMan *)arg; + v->startAutoDeleteThread3(); +} +int ViewMan::startAutoDeleteThread() +{ + pthread_mutex_lock(&viewManLock); + resetThreadFlag = 1; + autoDeleteThreadRun = 1; + if (pthread_create(&autoDeleteThread, NULL, (void*(*)(void*))startAutoDeleteThread2, (void *)this) == -1) return 0; + return 1; +} + +void ViewMan::startAutoDeleteThread3() +{ + struct timespec nextTime; + View* nextToDelete = NULL; + + // I don't want signals + sigset_t sigset; + sigfillset(&sigset); + pthread_sigmask(SIG_BLOCK, &sigset, NULL); + + // locked here + + while(1) + { + if (resetThreadFlag) + { + resetThreadFlag = 0; + + // Work out the next View to be deleted + + nextTime.tv_sec = 0; + nextTime.tv_nsec = 0; + nextToDelete = NULL; + + for(int i = 1; i <= topView; i++) + { + if ((views[i]->delSec > 0) && (views[i]->delNSec > 0)) + { + if ((nextTime.tv_sec == 0) && (nextTime.tv_nsec == 0)) + { + nextTime.tv_sec = views[i]->delSec; + nextTime.tv_nsec = views[i]->delNSec; + nextToDelete = views[i]; + } + else + { + if (views[i]->delSec < nextTime.tv_sec) + { + nextTime.tv_sec = views[i]->delSec; + nextTime.tv_nsec = views[i]->delNSec; + nextToDelete = views[i]; + } + else if (views[i]->delSec == nextTime.tv_sec) + { + if (views[i]->delNSec < nextTime.tv_nsec) + { + nextTime.tv_sec = views[i]->delNSec; + nextTime.tv_nsec = views[i]->delNSec; + nextToDelete = views[i]; + } + } + } + } + // no case + } + // end + } + + if (nextTime.tv_sec == 0) + { + pthread_cond_wait(&autoDeleteThreadSignal, &viewManLock); + } + else + { + pthread_cond_timedwait(&autoDeleteThreadSignal, &viewManLock, &nextTime); + } + + // ok. we have been signalled or the time has run out + + // see if we have been signalled. we only get signalled if we + // are to reset the timer or if we are to die completely + if (!autoDeleteThreadRun) + { + pthread_exit(NULL); + // exiting thread with mutex locked + } + + if (resetThreadFlag) continue; + + // timer ran out + Log::getInstance()->log("ViewMan", Log::DEBUG, "About to remove %p", nextToDelete); + removeView(nextToDelete, 1); // enter this method with mutex locked + + resetThreadFlag = 1; + } +} + diff --git a/viewman.h b/viewman.h new file mode 100644 index 0000000..a742d51 --- /dev/null +++ b/viewman.h @@ -0,0 +1,82 @@ +/* + Copyright 2004-2005 Chris Tallon + + This file is part of VOMP. + + VOMP 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. + + VOMP is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with VOMP; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#ifndef VIEWMAN_H +#define VIEWMAN_H + +#include +#include +#include +#include + +#include "defines.h" +#include "view.h" +#include "message.h" +#include "messagequeue.h" + +class ViewMan : public MessageQueue +{ + public: + ViewMan(); + ~ViewMan(); + static ViewMan* getInstance(); + + int init(); + int shutdown(); + + // All these reset the thread + int add(View* v); + int addNoLock(View* v); + int removeView(View* toRemove = NULL, int noLock = 0, int noShow = 0); + void removeAll(); + void redrawAll(int noShow = 0); + + int handleCommand(UCHAR command); + int timedDelete(View* v, int seconds, int lock); + // + + // not for external use + void startAutoDeleteThread3(); + + private: + int isTotallyCovered(View* toDelete, int slotTakenFrom); + + static ViewMan* instance; + int initted; + + View* views[11]; + UCHAR topView; + + // Threading stuff + + int startAutoDeleteThread(); + pthread_mutex_t viewManLock; + pthread_t autoDeleteThread; + pthread_cond_t autoDeleteThreadSignal; + int resetThreadFlag; + int autoDeleteThreadRun; + int callFromThread; + void resetThread(); + + void processMessage(Message* m); + +}; + +#endif diff --git a/vinfo.cc b/vinfo.cc new file mode 100644 index 0000000..eb8a057 --- /dev/null +++ b/vinfo.cc @@ -0,0 +1,69 @@ +/* + Copyright 2004-2005 Chris Tallon + + This file is part of VOMP. + + VOMP 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. + + VOMP is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with VOMP; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#include "vinfo.h" + +VInfo::VInfo() +{ + mainText = NULL; + exitable = 0; + + setBackgroundColour(0, 0, 100, 255); + setTitleBarOn(1); + setTitleBarColour(0, 0, 200, 255); +} + +VInfo::~VInfo() +{ + if (mainText) delete[] mainText; +} + +void VInfo::setExitable() +{ + exitable = 1; +} + +void VInfo::setMainText(char* takeText) +{ + int length = strlen(takeText); + mainText = new char[length + 1]; + strcpy(mainText, takeText); +} + +void VInfo::draw() +{ + View::draw(); + + if (mainText) drawPara(mainText, 10, 45, 255, 255, 255); +} + +int VInfo::handleCommand(int command) +{ + switch(command) + { + case Remote::OK: + case Remote::BACK: + { + if (exitable) return 4; + } + } + + return 1; +} diff --git a/vinfo.h b/vinfo.h new file mode 100644 index 0000000..4c9ae37 --- /dev/null +++ b/vinfo.h @@ -0,0 +1,48 @@ +/* + Copyright 2004-2005 Chris Tallon + + This file is part of VOMP. + + VOMP 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. + + VOMP is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with VOMP; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#ifndef VINFO_H +#define VINFO_H + +#include +#include + +#include "defines.h" +#include "view.h" +#include "remote.h" + +class VInfo : public View +{ + public: + VInfo(); + ~VInfo(); + + void setMainText(char* title); + void setExitable(); + + int handleCommand(int command); + void draw(); + + private: + char* mainText; + UCHAR exitable; +}; + +#endif diff --git a/vlivebanner.cc b/vlivebanner.cc new file mode 100644 index 0000000..155b34a --- /dev/null +++ b/vlivebanner.cc @@ -0,0 +1,89 @@ +/* + Copyright 2004-2005 Chris Tallon + + This file is part of VOMP. + + VOMP 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. + + VOMP is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with VOMP; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#include "vlivebanner.h" + +VLiveBanner::VLiveBanner() +{ + setScreenPos(130, 370); + setDimensions(120, 500); + + setBackgroundColour(0, 0, 100, 255); + setTitleBarOn(1); + setTitleText("The channel name"); + setTitleBarColour(0, 0, 200, 255); + + sl.setScreenPos(screenX, screenY + 30); + sl.setDimensions(height - 60, width); +} + +VLiveBanner::~VLiveBanner() +{ +} + +void VLiveBanner::draw() +{ + int success = VDR::getInstance()->getChannelSchedule(1); + + if (!success) + { + sl.addOption("No channel data available", 1); + } + else + { + sl.addOption("This Programme", 1); + sl.addOption("The Next Programme", 0); + sl.addOption("The Programme after that", 0); + } + + View::draw(); + sl.draw(); + rectangle(0, height - 30, width, 30, titleBarR, titleBarG, titleBarB, titleBarA); +} + +int VLiveBanner::handleCommand(int command) +{ + switch (command) + { + case Remote::OK: + case Remote::BACK: + { + return 4; + } + case Remote::UP: + { + sl.up(); + sl.draw(); + + show(); + return 2; + } + case Remote::DOWN: + { + sl.down(); + sl.draw(); + + show(); + return 2; + } + } + + return 1; +} diff --git a/vlivebanner.h b/vlivebanner.h new file mode 100644 index 0000000..03267d5 --- /dev/null +++ b/vlivebanner.h @@ -0,0 +1,46 @@ +/* + Copyright 2004-2005 Chris Tallon + + This file is part of VOMP. + + VOMP 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. + + VOMP is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with VOMP; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#ifndef VLIVEBANNER_H +#define VLIVEBANNER_H + +#include +#include + +#include "view.h" +#include "remote.h" +#include "vdr.h" +#include "wselectlist.h" + +class VLiveBanner : public View +{ + public: + VLiveBanner(); + ~VLiveBanner(); + + int handleCommand(int command); + void draw(); + + private: + WSelectList sl; + +}; + +#endif diff --git a/vmute.cc b/vmute.cc new file mode 100644 index 0000000..00d6e24 --- /dev/null +++ b/vmute.cc @@ -0,0 +1,62 @@ +/* + Copyright 2004-2005 Chris Tallon + + This file is part of VOMP. + + VOMP 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. + + VOMP is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with VOMP; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#include "vmute.h" + +VMute::VMute() +{ + isMuted = Audio::getInstance()->toggleUserMute(); + + setDimensions(40, 40); + setScreenPos(600, 500); + + setBackgroundColour(0, 0, 100, 255); +} + +void VMute::draw() +{ + View::draw(); + + WSymbol* w = new WSymbol; + if (isMuted) w->nextSymbol = WSymbol::MUTE; + else w->nextSymbol = WSymbol::UNMUTE; + w->setScreenPos(screenX + 5, screenY + 5); + w->draw(); + + delete w; +} + +int VMute::handleCommand(int command) +{ + switch(command) + { + case Remote::MUTE: + { + isMuted = Audio::getInstance()->toggleUserMute(); + draw(); + show(); + // handled + return 2; + } + } + + // allow command to drop through to other views + return 0; +} diff --git a/vmute.h b/vmute.h new file mode 100644 index 0000000..b3d1f0c --- /dev/null +++ b/vmute.h @@ -0,0 +1,43 @@ +/* + Copyright 2004-2005 Chris Tallon + + This file is part of VOMP. + + VOMP 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. + + VOMP is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with VOMP; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#ifndef VMUTE_H +#define VMUTE_H + +#include + +#include "view.h" +#include "remote.h" +#include "audio.h" +#include "wsymbol.h" + +class VMute : public View +{ + public: + VMute(); + void draw(); + int handleCommand(int command); + + private: + int isMuted; +}; + +#endif + diff --git a/vquestion.cc b/vquestion.cc new file mode 100644 index 0000000..075ff25 --- /dev/null +++ b/vquestion.cc @@ -0,0 +1,118 @@ +/* + Copyright 2004-2005 Chris Tallon + + This file is part of VOMP. + + VOMP 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. + + VOMP is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with VOMP; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#include "vquestion.h" + +VQuestion::VQuestion() +{ + mainText = NULL; + selectedOption = NO; + + buttonYes.setText("Yes"); + buttonNo.setText("No"); + buttonNo.setActive(1); + +} + +VQuestion::~VQuestion() +{ + if (mainText) delete[] mainText; +} + +void VQuestion::setMainText(char* takeText) +{ + int length = strlen(takeText); + mainText = new char[length + 1]; + strcpy(mainText, takeText); +} + +void VQuestion::draw() +{ + View::draw(); + + buttonYes.setScreenPos(screenX + 40, screenY + 120); + buttonNo.setScreenPos(screenX + 140, screenY + 120); + + if (mainText) drawPara(mainText, 10, 45, 255, 255, 255); + buttonYes.draw(); + buttonNo.draw(); +} + +void VQuestion::swap() +{ + if (selectedOption == NO) + { + selectedOption = YES; + buttonYes.setActive(1); + buttonNo.setActive(0); + } + else if (selectedOption == YES) + { + selectedOption = NO; + buttonYes.setActive(0); + buttonNo.setActive(1); + } +} + +int VQuestion::handleCommand(int command) +{ + if (command == Remote::LEFT) + { + swap(); + draw(); + show(); + return 2; + } + else if (command == Remote::RIGHT) + { + swap(); + draw(); + show(); + return 2; + } + else if (command == Remote::BACK) + { + return 4; + } + else if (command == Remote::OK) + { + if (selectedOption != YES) return 4; + + Message* m = new Message(); + m->from = this; + m->to = questionReceiver; + m->message = Message::QUESTION_YES; + ViewMan::getInstance()->postMessage(m); + + return 4; + } + + return 1; +} + +void VQuestion::setParent(View* tquestionReceiver) +{ + questionReceiver = tquestionReceiver; +} + +void VQuestion::setDefault(UCHAR option) +{ + selectedOption = option; +} diff --git a/vquestion.h b/vquestion.h new file mode 100644 index 0000000..7a0b857 --- /dev/null +++ b/vquestion.h @@ -0,0 +1,59 @@ +/* + Copyright 2004-2005 Chris Tallon + + This file is part of VOMP. + + VOMP 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. + + VOMP is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with VOMP; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#ifndef VQUESTION_H +#define VQUESTION_H + +#include +#include + +#include "view.h" +#include "wbutton.h" +#include "remote.h" +#include "viewman.h" + +class VQuestion : public View +{ + public: + VQuestion(); + ~VQuestion(); + void setParent(View* tquestionReceiver); + void setDefault(UCHAR option); + void setMainText(char* title); + + int handleCommand(int command); + void draw(); + + const static UCHAR NO = 0; + const static UCHAR YES = 1; + + private: + char* mainText; + + void swap(); + + View* questionReceiver; + UCHAR selectedOption; + + WButton buttonYes; + WButton buttonNo; +}; + +#endif diff --git a/vradiolive.cc b/vradiolive.cc new file mode 100644 index 0000000..e941cff --- /dev/null +++ b/vradiolive.cc @@ -0,0 +1,115 @@ +/* + Copyright 2004-2005 Chris Tallon + + This file is part of VOMP. + + VOMP 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. + + VOMP is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with VOMP; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#include "vradiolive.h" + +VRadioLive::VRadioLive(List* tchanList) +{ + player = new PlayerRadio(); + player->init(); + vdr = VDR::getInstance(); + chanList = tchanList; + currentChannel = 0; + + setDimensions(100, 100); + setBackgroundColour(0, 0, 0, 255); +} + +VRadioLive::~VRadioLive() +{ + delete player; +} + +void VRadioLive::draw() +{ + View::draw(); +} + +int VRadioLive::handleCommand(int command) +{ + switch(command) + { + case Remote::STOP: + case Remote::BACK: + case Remote::MENU: + { + player->stop(); + vdr->stopStreaming(); + return 4; + } + case Remote::UP: + { + player->stop(); + vdr->stopStreaming(); + upChannel(); + vdr->streamChannel(currentChannel); + player->play(); + return 2; + } + case Remote::DOWN: + { + player->stop(); + vdr->stopStreaming(); + downChannel(); + vdr->streamChannel(currentChannel); + player->play(); + return 2; + } + } + + return 1; +} + +void VRadioLive::setChannel(int number) +{ + currentChannel = number; + vdr->streamChannel(currentChannel); + player->play(); +} + +void VRadioLive::upChannel() +{ + Channel* channel; + for(chanList->reset(); (channel = (Channel*)chanList->getCurrent()); chanList->next()) + { + if (channel->number == currentChannel) + { + chanList->next(); + channel = (Channel*)chanList->getCurrent(); + if (!channel) return; + currentChannel = channel->number; + } + } +} + +void VRadioLive::downChannel() +{ + Channel* channel; + Channel* prevChannel = NULL; + for(chanList->reset(); (channel = (Channel*)chanList->getCurrent()); chanList->next()) + { + if (channel->number == currentChannel) + { + if (!prevChannel) return; + currentChannel = prevChannel->number; + } + prevChannel = channel; + } +} diff --git a/vradiolive.h b/vradiolive.h new file mode 100644 index 0000000..00dc743 --- /dev/null +++ b/vradiolive.h @@ -0,0 +1,54 @@ +/* + Copyright 2004-2005 Chris Tallon + + This file is part of VOMP. + + VOMP 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. + + VOMP is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with VOMP; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#ifndef VRADIOLIVE_H +#define VRADIOLIVE_H + +#include + +#include "view.h" +#include "playerradio.h" +#include "vdr.h" +#include "list.h" +#include "channel.h" +#include "viewman.h" +#include "remote.h" + +class VRadioLive : public View +{ + public: + VRadioLive(List* chanList); + ~VRadioLive(); + void draw(); + int handleCommand(int command); + + void setChannel(int number); + + private: + VDR* vdr; + PlayerRadio* player; + List* chanList; + ULONG currentChannel; + + void upChannel(); + void downChannel(); +}; + +#endif diff --git a/vrecordinglist.cc b/vrecordinglist.cc new file mode 100644 index 0000000..91979a2 --- /dev/null +++ b/vrecordinglist.cc @@ -0,0 +1,350 @@ +/* + Copyright 2004-2005 Chris Tallon + + This file is part of VOMP. + + VOMP 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. + + VOMP is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with VOMP; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#include "vrecordinglist.h" + +VRecordingList::VRecordingList() +{ + setScreenPos(80, 70); + setDimensions(420, 570); + + setBackgroundColour(0, 0, 100, 255); + setTitleBarOn(1); + setTitleBarColour(0, 0, 200, 255); + + sl.setScreenPos(screenX + 10, screenY + 30 + 5); + sl.setDimensions(height - 30 - 15 - 30, width - 20); +} + +VRecordingList::~VRecordingList() +{ + // only delete the list if this is not a sub dir window + if (recDir->isRoot) delete recDir; +} + +void VRecordingList::setDir(Directory* tdir) +{ + recDir = tdir; + int first = 1; + + char tempA[300]; // FIXME this is guesswork! + char tempB[300]; // FIXME + struct tm* btime; + + char spaces[13]; + char theNumber[10]; + int theNumberLength; + + Directory* dir; + recDir->dirList->reset(); + while((dir = (Directory*)recDir->dirList->getCurrent())) + { + strcpy(spaces, " "); + theNumberLength = snprintf(theNumber, 9, "%lu", dir->getNumRecordings()); + + spaces[11 - theNumberLength] = '\0'; + + //snprintf(tempA, 299, " %s", dir->name); + snprintf(tempA, 299, " %s%s%s", theNumber, spaces, dir->name); + //int numSize = snprintf(tempA + + dir->index = sl.addOption(tempA, first); + first = 0; + recDir->dirList->next(); + } + + // temp FIXME + List* recList = recDir->recList; + + // FIXME convert the whole program to time_t's + + + Recording* rec; + recList->reset(); + while((rec = (Recording*)recList->getCurrent())) + { + btime = localtime((time_t*)&rec->start); + strftime(tempA, 299, "%0d/%0m %0H:%0M ", btime); + sprintf(tempB, "%s %s", tempA, rec->getProgName()); + rec->index = sl.addOption(tempB, first); + first = 0; + recList->next(); + } + + if (!recDir->isRoot) + { + snprintf(tempA, 299, "Recordings - %s", recDir->name); + setTitleText(tempA); + } + else + { + setTitleText("Recordings"); + } +} + +void VRecordingList::draw() +{ + View::draw(); + sl.draw(); + + // Put the status stuff at the bottom + + WSymbol w; + + w.nextSymbol = WSymbol::UP; + w.setScreenPos(screenX + 20, screenY + 385); + w.draw(); + + w.nextSymbol = WSymbol::DOWN; + w.setScreenPos(screenX + 50, screenY + 385); + w.draw(); + + w.nextSymbol = WSymbol::SKIPBACK; + w.setScreenPos(screenX + 85, screenY + 385); + w.draw(); + + w.nextSymbol = WSymbol::SKIPFORWARD; + w.setScreenPos(screenX + 115, screenY + 385); + w.draw(); + + w.nextSymbol = WSymbol::PLAY; + w.setScreenPos(screenX + 150, screenY + 385); + w.draw(); + + // FIXME Right justify this! + drawText("[ok] = menu", 450, 385, 255, 255, 255); + + doShowingBar(); + + char freeSpace[50]; + int gigFree = Directory::freeSpace / 1024; + snprintf(freeSpace, 49, "%lu%%, %iGB free", Directory::usedPercent, gigFree); + drawTextRJ(freeSpace, 560, 5, 255, 255, 255); +} + +void VRecordingList::doShowingBar() +{ + int topOption = sl.getTopOption() + 1; + if (sl.getNumOptions() == 0) topOption = 0; + + char showing[200]; + sprintf(showing, "%i to %i of %i", topOption, sl.getBottomOption(), sl.getNumOptions()); + Box b; + b.setScreenPos(screenX + 220, screenY + 385); + b.setDimensions(25, 160); + b.fillColour(0, 0, 100, 255); + b.drawText(showing, 0, 0, 255, 255, 255); +} + + + +void VRecordingList::processMessage(Message* m) +{ + Log::getInstance()->log("VRecordingList", Log::DEBUG, "Got message value %lu", m->message); + if (m->message == Message::DELETE_SELECTED_RECORDING) + { + Log::getInstance()->log("VRecordingList", Log::DEBUG, "Doing delete selected"); + doDeleteSelected(); + return; + } + + if (m->message == Message::PLAY_SELECTED_RECORDING) + { + doPlay(); + return; + } + + if (m->message == Message::RESUME_SELECTED_RECORDING) + { + doResume(); + return; + } +} + +void VRecordingList::doDeleteSelected() +{ + Recording* toDelete = getCurrentOptionRecording(); + + int saveIndex; + int saveTop; + + if (toDelete) + { + saveIndex = toDelete->index; + saveTop = sl.getTopOption(); + Log::getInstance()->log("VRecordingList", Log::DEBUG, "FOUND: %i %s %s\n", toDelete->index, toDelete->getProgName(), toDelete->fileName); + recDir->recList->remove(toDelete); + Log::getInstance()->log("VRecordingList", Log::DEBUG, "I have removed: %s %s\n", toDelete->getProgName(), toDelete->fileName); + + VDR* vdr = VDR::getInstance(); + vdr->deleteRecording(toDelete->fileName); + + delete toDelete; + + sl.clear(); + setDir(recDir); + sl.hintSetCurrent(saveIndex); + sl.hintSetTop(saveTop); + draw(); + } + + Message* m2 = new Message(); + m2->from = this; + m2->to = ViewMan::getInstance(); + m2->message = Message::UPDATE_SCREEN; + ViewMan::getInstance()->postMessage(m2); +} + +int VRecordingList::doPlay() +{ + Recording* toPlay = getCurrentOptionRecording(); + if (toPlay) + { + VVideoRec* vidrec = new VVideoRec(toPlay); + ViewMan::getInstance()->addNoLock(vidrec); + vidrec->draw(); + vidrec->show(); + vidrec->go(0); + return 1; + } + // should not get to here + return 0; +} + +int VRecordingList::doResume() +{ + Recording* toResume = getCurrentOptionRecording(); + if (toResume) + { + ULLONG position = VDR::getInstance()->getResumePoint(toResume->fileName); + + VVideoRec* vidrec = new VVideoRec(toResume); + ViewMan::getInstance()->addNoLock(vidrec); + vidrec->draw(); + vidrec->show(); + vidrec->go(position); + return 1; + } + // should not get to here + return 0; +} + +Recording* VRecordingList::getCurrentOptionRecording() +{ + Recording* current; + for(recDir->recList->reset(); (current = (Recording*)recDir->recList->getCurrent()); recDir->recList->next()) + { + if (current->index == sl.getCurrentOption()) return current; + } + return NULL; +} + +int VRecordingList::handleCommand(int command) +{ + if (command == Remote::UP) + { + sl.up(); + sl.draw(); + + doShowingBar(); + show(); + return 2; + } + else if (command == Remote::DOWN) + { + sl.down(); + sl.draw(); + + doShowingBar(); + show(); + return 2; + } + else if (command == Remote::SKIPBACK) + { + sl.pageUp(); + sl.draw(); + + doShowingBar(); + show(); + return 2; + } + else if (command == Remote::SKIPFORWARD) + { + sl.pageDown(); + sl.draw(); + + doShowingBar(); + show(); + return 2; + } + else if (command == Remote::OK) + { + if (sl.getNumOptions() == 0) return 2; + + // Check to see if it is a sub directory + Directory* curDir; + for(recDir->dirList->reset(); (curDir = (Directory*)recDir->dirList->getCurrent()); recDir->dirList->next()) + { + if (curDir->index == sl.getCurrentOption()) + { + VRecordingList* sub = new VRecordingList(); + sub->setDir(curDir); + ViewMan::getInstance()->addNoLock(sub); + + sub->draw(); + sub->show(); + + return 2; + } + } + + // check to see if it's a recording + Recording* current; + for(recDir->recList->reset(); (current = (Recording*)recDir->recList->getCurrent()); recDir->recList->next()) + { + if (current->index == sl.getCurrentOption()) + { + Log::getInstance()->log("VRecordingList", Log::DEBUG, "Found the option you pointed at. %s %s", current->getProgName(), current->fileName); + + VRecordingMenu* v = new VRecordingMenu(); + v->setParent(this); + v->setRecording(current); + ViewMan::getInstance()->addNoLock(v); + v->draw(); + v->show(); + return 2; + } + } + // should not get to here + return 1; + } + else if (command == Remote::BACK) + { + return 4; + } + else if (command == Remote::PLAY) + { + if (doPlay()) return 2; + return 1; + } + + // stop command getting to any more views + return 1; +} diff --git a/vrecordinglist.h b/vrecordinglist.h new file mode 100644 index 0000000..1d5425c --- /dev/null +++ b/vrecordinglist.h @@ -0,0 +1,63 @@ +/* + Copyright 2004-2005 Chris Tallon + + This file is part of VOMP. + + VOMP 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. + + VOMP is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with VOMP; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#ifndef VRECORDINGLIST_H +#define VRECORDINGLIST_H + +#include +#include + +#include "view.h" +#include "list.h" +#include "directory.h" +#include "recording.h" +#include "wselectlist.h" +#include "remote.h" +#include "wsymbol.h" +#include "viewman.h" +#include "vrecordingmenu.h" +#include "vdr.h" +#include "vvideorec.h" + +class VRecordingList : public View +{ + public: + VRecordingList(); + ~VRecordingList(); + + void setDir(Directory* dir); + + int handleCommand(int command); + void processMessage(Message* m); + void draw(); + + private: + Directory* recDir; + + WSelectList sl; + + void doShowingBar(); + void doDeleteSelected(); + int doPlay(); + int doResume(); + Recording* getCurrentOptionRecording(); +}; + +#endif diff --git a/vrecordingmenu.cc b/vrecordingmenu.cc new file mode 100644 index 0000000..fc434e3 --- /dev/null +++ b/vrecordingmenu.cc @@ -0,0 +1,171 @@ +/* + Copyright 2004-2005 Chris Tallon + + This file is part of VOMP. + + VOMP 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. + + VOMP is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with VOMP; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#include "vrecordingmenu.h" + +VRecordingMenu::VRecordingMenu() +{ + rec = NULL; + + setScreenPos(260, 190); + setDimensions(140, 200); + + setBackgroundColour(0, 0, 100, 255); + setTitleBarOn(1); + setBorderOn(1); + setTitleText("Programme menu"); + setTitleBarColour(0, 0, 200, 255); + + sl.setScreenPos(screenX + 10, screenY + 30 + 5); + sl.setDimensions(height - 30 - 15, width - 20); + sl.addOption("Play", 1); + sl.addOption("Resume", 0); + sl.addOption("Summary", 0); + sl.addOption("Delete", 0); +} + +VRecordingMenu::~VRecordingMenu() +{ +} + +void VRecordingMenu::setParent(VRecordingList* tvRecList) +{ + vRecList = tvRecList; +} + +void VRecordingMenu::setRecording(Recording* trec) +{ + rec = trec; +} + +void VRecordingMenu::draw() +{ + View::draw(); + sl.draw(); +} + +int VRecordingMenu::handleCommand(int command) +{ + if (command == Remote::UP) + { + sl.up(); + sl.draw(); + show(); + return 2; + } + else if (command == Remote::DOWN) + { + sl.down(); + sl.draw(); + show(); + return 2; + } + else if (command == Remote::OK) + { + if (sl.getCurrentOption() == 0) + { + Message* m = new Message(); + m->from = this; + m->to = vRecList; + m->message = Message::PLAY_SELECTED_RECORDING; + ViewMan::getInstance()->postMessage(m); + return 4; + } + + if (sl.getCurrentOption() == 1) + { + Message* m = new Message(); + m->from = this; + m->to = vRecList; + m->message = Message::RESUME_SELECTED_RECORDING; + ViewMan::getInstance()->postMessage(m); + return 4; + } + + if (sl.getCurrentOption() == 2) + { + char* summary = VDR::getInstance()->getRecordingSummary(rec->fileName); + + VInfo* vi = new VInfo(); + vi->setTitleText("Programme summary"); + vi->setBorderOn(1); + vi->setExitable(); + if (summary) vi->setMainText(summary); + else vi->setMainText("Summary unavailable"); + vi->setScreenPos(120, 130); + vi->setDimensions(300, 490); + + ViewMan::getInstance()->addNoLock(vi); + vi->draw(); + vi->show(); + + if (summary) delete[] summary; + + return 2; + } + else if (sl.getCurrentOption() == 3) + { + VQuestion* v = new VQuestion(); + v->setParent(this); + v->setBackgroundColour(0, 0, 100, 255); + v->setTitleBarColour(200, 0, 0, 255); + v->setTitleBarOn(1); + v->setBorderOn(1); + v->setTitleText("Delete recording"); + v->setMainText("Are you sure you want to delete this recording?"); + v->setDefault(VQuestion::NO); + v->setScreenPos(230, 160); + v->setDimensions(180, 260); + + ViewMan::getInstance()->addNoLock(v); + v->draw(); + v->show(); + return 2; + } + } + else if (command == Remote::BACK) + { + return 4; + } + + // stop command getting to any more views + return 1; +} + +void VRecordingMenu::processMessage(Message* m) +{ + if (m->message == Message::QUESTION_YES) + { + if (sl.getCurrentOption() == 3) + { + Message* m = new Message(); + m->from = this; + m->to = ViewMan::getInstance(); + m->message = Message::CLOSE_ME; + ViewMan::getInstance()->postMessage(m); + + m = new Message(); + m->from = this; + m->to = vRecList; + m->message = Message::DELETE_SELECTED_RECORDING; + ViewMan::getInstance()->postMessage(m); + } + } +} diff --git a/vrecordingmenu.h b/vrecordingmenu.h new file mode 100644 index 0000000..6fe269e --- /dev/null +++ b/vrecordingmenu.h @@ -0,0 +1,58 @@ +/* + Copyright 2004-2005 Chris Tallon + + This file is part of VOMP. + + VOMP 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. + + VOMP is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with VOMP; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#ifndef VRECORDINGMENU_H +#define VRECORDINGMENU_H + +#include +#include + +#include "view.h" +#include "recording.h" +#include "wselectlist.h" +#include "remote.h" +#include "vrecordinglist.h" +#include "vquestion.h" +#include "message.h" +#include "vinfo.h" +#include "vdr.h" + +class VRecordingList; + +class VRecordingMenu : public View +{ + public: + VRecordingMenu(); + ~VRecordingMenu(); + void setParent(VRecordingList* tvRecList); + void setRecording(Recording* rec); + + int handleCommand(int command); + void processMessage(Message* m); + void draw(); + + private: + + WSelectList sl; + VRecordingList* vRecList; + Recording* rec; +}; + +#endif diff --git a/vserverselect.cc b/vserverselect.cc new file mode 100644 index 0000000..8a96bdc --- /dev/null +++ b/vserverselect.cc @@ -0,0 +1,81 @@ +/* + Copyright 2004-2005 Chris Tallon + + This file is part of VOMP. + + VOMP 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. + + VOMP is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with VOMP; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#include "vserverselect.h" + +VServerSelect::VServerSelect(std::vector* serverIPs, int* tselectServer) +{ + // I tried the whole passing using a reference here, but + // the program segfaulted when settitletext tried to new + // a char array. so now we have the messy dereferencing... + // anyway, now it doesn't use a object wide reference. + selectServer = tselectServer; + + setDimensions(200, 300); + setScreenPos(220, 200); + setBackgroundColour(0, 0, 100, 255); + setTitleBarOn(1); + setTitleBarColour(0, 0, 200, 255); + setTitleText("Choose a VDR server"); + + sl.setScreenPos(screenX + 10, screenY + 30 + 5); + sl.setDimensions(height - 30 - 15, width - 20); + + sl.addOption((*serverIPs)[0], 1); + for(UINT k = 1; k < serverIPs->size(); k++) + { + sl.addOption((*serverIPs)[k], 0); + } +} + +VServerSelect::~VServerSelect() +{ +} + +void VServerSelect::draw() +{ + View::draw(); + sl.draw(); +} + +int VServerSelect::handleCommand(int command) +{ + if (command == Remote::UP) + { + sl.up(); + sl.draw(); + show(); + return 2; + } + else if (command == Remote::DOWN) + { + sl.down(); + sl.draw(); + show(); + return 2; + } + else if (command == Remote::OK) + { + *selectServer = sl.getCurrentOption(); + return 4; + } + + return 1; +} diff --git a/vserverselect.h b/vserverselect.h new file mode 100644 index 0000000..c00b9ff --- /dev/null +++ b/vserverselect.h @@ -0,0 +1,47 @@ +/* + Copyright 2004-2005 Chris Tallon + + This file is part of VOMP. + + VOMP 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. + + VOMP is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with VOMP; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#ifndef VSERVERSELECT_H +#define VSERVERSELECT_H + +#include +#include +#include + +#include "defines.h" +#include "view.h" +#include "remote.h" +#include "wselectlist.h" + +class VServerSelect : public View +{ + public: + VServerSelect(std::vector* tserverIPs, int* tselectServer); + ~VServerSelect(); + + int handleCommand(int command); + void draw(); + + private: + WSelectList sl; + int* selectServer; +}; + +#endif diff --git a/vvideolive.cc b/vvideolive.cc new file mode 100644 index 0000000..c6da0eb --- /dev/null +++ b/vvideolive.cc @@ -0,0 +1,165 @@ +/* + Copyright 2004-2005 Chris Tallon + + This file is part of VOMP. + + VOMP 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. + + VOMP is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with VOMP; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#include "vvideolive.h" + +VVideoLive::VVideoLive(List* tchanList) +{ + player = new Player(NULL); + player->init(); + vdr = VDR::getInstance(); + chanList = tchanList; + currentChannel = 0; + + setDimensions(SCREENHEIGHT, SCREENWIDTH); + setBackgroundColour(0, 0, 0, 0); +} + +VVideoLive::~VVideoLive() +{ + delete player; +} + +void VVideoLive::draw() +{ + View::draw(); +} + +int VVideoLive::handleCommand(int command) +{ + switch(command) + { + case Remote::PLAY: + { + player->play(); // do resync + return 2; + } + + case Remote::STOP: + case Remote::BACK: + case Remote::MENU: + { + player->stop(); + vdr->stopStreaming(); + return 4; + } + case Remote::UP: + { + player->stop(); + vdr->stopStreaming(); + upChannel(); + doBanner(); + vdr->streamChannel(currentChannel); + player->play(); + return 2; + } + case Remote::DOWN: + { + player->stop(); + vdr->stopStreaming(); + downChannel(); + doBanner(); + vdr->streamChannel(currentChannel); + player->play(); + return 2; + } + case Remote::OK: + { + doBanner(); + return 2; + } + + case Remote::ZERO ... Remote::NINE: + { + VChannelSelect* v = new VChannelSelect(this, command); + ViewMan::getInstance()->addNoLock(v); +// ViewMan::getInstance()->timedDelete(v, 4, 0); + v->draw(); + v->show(); + } + } + + return 1; +} + +void VVideoLive::processMessage(Message* m) +{ + if (m->message == Message::CHANNEL_CHANGE) + { + // check channel number is valid + Channel* channel; + for(chanList->reset(); (channel = (Channel*)chanList->getCurrent()); chanList->next()) + { + if (channel->number == m->parameter) + { + player->stop(); + vdr->stopStreaming(); + setChannel(channel->number); + } + } + } +} + +void VVideoLive::doBanner() +{ + VLiveBanner* v = new VLiveBanner(); + ViewMan::getInstance()->addNoLock(v); + ViewMan::getInstance()->timedDelete(v, 4, 0); + v->draw(); + v->show(); +} + +void VVideoLive::setChannel(int number) +{ + currentChannel = number; +// doBanner(); + vdr->streamChannel(currentChannel); + player->play(); +} + +void VVideoLive::upChannel() +{ + Channel* channel; + for(chanList->reset(); (channel = (Channel*)chanList->getCurrent()); chanList->next()) + { + if (channel->number == currentChannel) + { + chanList->next(); + channel = (Channel*)chanList->getCurrent(); + if (!channel) return; + currentChannel = channel->number; + } + } +} + +void VVideoLive::downChannel() +{ + Channel* channel; + Channel* prevChannel = NULL; + for(chanList->reset(); (channel = (Channel*)chanList->getCurrent()); chanList->next()) + { + if (channel->number == currentChannel) + { + if (!prevChannel) return; + currentChannel = prevChannel->number; + } + prevChannel = channel; + } +} diff --git a/vvideolive.h b/vvideolive.h new file mode 100644 index 0000000..5664871 --- /dev/null +++ b/vvideolive.h @@ -0,0 +1,57 @@ +/* + Copyright 2004-2005 Chris Tallon + + This file is part of VOMP. + + VOMP 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. + + VOMP is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with VOMP; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#ifndef VVIDEOLIVE_H +#define VVIDEOLIVE_H + +#include + +#include "view.h" +#include "player.h" +#include "vdr.h" +#include "list.h" +#include "channel.h" +#include "vlivebanner.h" +#include "viewman.h" +#include "vchannelselect.h" + +class VVideoLive : public View +{ + public: + VVideoLive(List* chanList); + ~VVideoLive(); + void draw(); + int handleCommand(int command); + void processMessage(Message* m); + + void setChannel(int number); + + private: + VDR* vdr; + Player* player; + List* chanList; + ULONG currentChannel; + + void upChannel(); + void downChannel(); + void doBanner(); +}; + +#endif diff --git a/vvideorec.cc b/vvideorec.cc new file mode 100644 index 0000000..a1e8af0 --- /dev/null +++ b/vvideorec.cc @@ -0,0 +1,122 @@ +/* + Copyright 2004-2005 Chris Tallon + + This file is part of VOMP. + + VOMP 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. + + VOMP is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with VOMP; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#include "vvideorec.h" + +VVideoRec::VVideoRec(Recording* rec) +{ + player = new Player(Command::getInstance()); + player->init(); + vdr = VDR::getInstance(); + + myRec = rec; + + setDimensions(SCREENHEIGHT, SCREENWIDTH); + setBackgroundColour(0, 0, 0, 0); +} + +VVideoRec::~VVideoRec() +{ + delete player; +} + +void VVideoRec::draw() +{ + View::draw(); +} + +void VVideoRec::go(ULLONG startPosition) +{ + ULLONG recLength = vdr->streamRecording(myRec); + + player->setLength(recLength); + player->setPosition(startPosition); + player->play(); +} + +int VVideoRec::handleCommand(int command) +{ + switch(command) + { + case Remote::PLAY: + { + player->play(); // do resync + return 2; + } + + case Remote::STOP: + case Remote::BACK: + case Remote::MENU: + { + player->stop(); + vdr->stopStreaming(); + return 4; + } + case Remote::PAUSE: + { + player->togglePause(); + return 2; + } + case Remote::SKIPFORWARD: + { + player->skipForward(60); + return 2; + } + case Remote::SKIPBACK: + { + player->skipBackward(60); + return 2; + } + case Remote::FORWARD: + { + player->toggleFastForward(); + return 2; + } + case Remote::YELLOW: + { + player->skipBackward(10); + return 2; + } + case Remote::BLUE: + { + player->skipForward(10); + return 2; + } +// case Remote::REVERSE: +// { +// player->toggleFastBackward(); +// return 2; +// } + + case Remote::ZERO: player->jumpToPercent(0); return 2; + case Remote::ONE: player->jumpToPercent(10); return 2; + case Remote::TWO: player->jumpToPercent(20); return 2; + case Remote::THREE: player->jumpToPercent(30); return 2; + case Remote::FOUR: player->jumpToPercent(40); return 2; + case Remote::FIVE: player->jumpToPercent(50); return 2; + case Remote::SIX: player->jumpToPercent(60); return 2; + case Remote::SEVEN: player->jumpToPercent(70); return 2; + case Remote::EIGHT: player->jumpToPercent(80); return 2; + case Remote::NINE: player->jumpToPercent(90); return 2; + + } + + return 1; +} diff --git a/vvideorec.h b/vvideorec.h new file mode 100644 index 0000000..42ac6ad --- /dev/null +++ b/vvideorec.h @@ -0,0 +1,47 @@ +/* + Copyright 2004-2005 Chris Tallon + + This file is part of VOMP. + + VOMP 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. + + VOMP is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with VOMP; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#ifndef VVIDEOREC_H +#define VVIDEOREC_H + +#include + +#include "view.h" +#include "player.h" +#include "vdr.h" +#include "recording.h" +#include "command.h" + +class VVideoRec : public View +{ + public: + VVideoRec(Recording* rec); + ~VVideoRec(); + void draw(); + int handleCommand(int command); + void go(ULLONG startPosition); + + private: + VDR* vdr; + Player* player; + Recording* myRec; +}; + +#endif diff --git a/vvolume.cc b/vvolume.cc new file mode 100644 index 0000000..d8cd838 --- /dev/null +++ b/vvolume.cc @@ -0,0 +1,85 @@ +/* + Copyright 2004-2005 Chris Tallon + + This file is part of VOMP. + + VOMP 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. + + VOMP is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with VOMP; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#include "vvolume.h" + +VVolume::VVolume() +{ + displayVolume = Audio::getInstance()->getVolume(); + + setDimensions(31, 227); + setScreenPos(100, 499); + + setBackgroundColour(0, 0, 100, 255); +} + +void VVolume::draw() +{ + View::draw(); + + WSymbol* w = new WSymbol; + w->nextSymbol = WSymbol::VOLUME2; + w->setScreenPos(103, 509); + w->draw(); + + int i = 0; + + for(; i < displayVolume; i++) + { + w->nextSymbol = WSymbol::VOLBAR; + w->setScreenPos(140 + (i * 9), 502); + w->draw(); + } + + for(; i < 20; i++) + { + w->nextSymbol = WSymbol::VOLDOT; + w->setScreenPos(140 + (i * 9), 512); + w->draw(); + } + + delete w; +} + +int VVolume::handleCommand(int command) +{ + switch(command) + { + case Remote::LEFT: + { + displayVolume = Audio::getInstance()->volumeDown(); + draw(); + show(); + // handled + return 2; + } + case Remote::RIGHT: + { + displayVolume = Audio::getInstance()->volumeUp(); + draw(); + show(); + // handled + return 2; + } + } + + // allow command to drop through to other views + return 0; +} diff --git a/vvolume.h b/vvolume.h new file mode 100644 index 0000000..a5ea0b7 --- /dev/null +++ b/vvolume.h @@ -0,0 +1,45 @@ +/* + Copyright 2004-2005 Chris Tallon + + This file is part of VOMP. + + VOMP 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. + + VOMP is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with VOMP; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#ifndef VVOLUME_H +#define VVOLUME_H + +#include + +#include "view.h" +#include "remote.h" +#include "audio.h" +#include "wsymbol.h" + +class VVolume : public View +{ + public: + VVolume(); + void draw(); + int handleCommand(int command); + + private: + int displayCommand; + int displayVolume; + +}; + +#endif + diff --git a/vwallpaper.cc b/vwallpaper.cc new file mode 100644 index 0000000..6b149f3 --- /dev/null +++ b/vwallpaper.cc @@ -0,0 +1,54 @@ +/* + Copyright 2004-2005 Chris Tallon + + This file is part of VOMP. + + VOMP 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. + + VOMP is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with VOMP; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#include "vwallpaper.h" + +VWallpaper::VWallpaper() +{ + +} + +VWallpaper::~VWallpaper() +{ + delete surface; +} + +void VWallpaper::init(char* name) +{ + jpeg.init(name); + + Osd* o = Osd::getInstance(); + setDimensions(o->getScreenHeight(), o->getScreenWidth()); + + // Now override the surface pointer found in Box to a seperate wallpaper surface + // but only for the wjpeg, not for this object + wallpaperSurface = new Surface(o->getFD(), 0); + wallpaperSurface->create(height, width); + + jpeg.overrideSurface(wallpaperSurface); + jpeg.draw(); +} + +void VWallpaper::draw() +{ + // we want to blit from wallpaperSurface to buffer (or screen if !doubleBuffer) + Surface::blt(Osd::getInstance()->getFD(), wallpaperSurface->getSurfaceHandle(), 0, 0, width, height, surface->getSurfaceHandle(), 0, 0); + // and the fd business here is terrible, but what can you do. +} diff --git a/vwallpaper.h b/vwallpaper.h new file mode 100644 index 0000000..0154ff3 --- /dev/null +++ b/vwallpaper.h @@ -0,0 +1,48 @@ +/* + Copyright 2004-2005 Chris Tallon + + This file is part of VOMP. + + VOMP 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. + + VOMP is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with VOMP; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#ifndef VWALLPAPER_H +#define VWALLPAPER_H + +#include +#include + +#include "view.h" +#include "wjpeg.h" + +#include "osd.h" +#include "surface.h" + +class VWallpaper : public View +{ + public: + VWallpaper(); + ~VWallpaper(); + + void init(char* file); + + void draw(); + + private: + Surface* wallpaperSurface; + WJpeg jpeg; +}; + +#endif diff --git a/vwelcome.cc b/vwelcome.cc new file mode 100644 index 0000000..1fb335e --- /dev/null +++ b/vwelcome.cc @@ -0,0 +1,212 @@ +/* + Copyright 2004-2005 Chris Tallon + + This file is part of VOMP. + + VOMP 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. + + VOMP is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with VOMP; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#include "vwelcome.h" + +VWelcome::VWelcome() +{ + setDimensions(190, 460); + setScreenPos(140, 170); + + setBackgroundColour(0, 0, 100, 255); + setTitleBarOn(1); + setTitleBarColour(0, 0, 200, 255); + setTitleText("Welcome"); + + sl.setScreenPos(screenX + 20, screenY + 40); + sl.setDimensions(130, 170); + + sl.addOption("1. Live TV", 1); + sl.addOption("2. Radio", 0); + sl.addOption("3. Recordings", 0); + sl.addOption("4. Stand by", 0); + sl.addOption("5. Reboot", 0); + + jpeg.setScreenPos(screenX + 240, screenY + 50); +} + +VWelcome::~VWelcome() +{ +} + +void VWelcome::draw() +{ + + View::draw(); + sl.draw(); + + char timeString[20]; + time_t t; + time(&t); + struct tm* tm = localtime(&t); + strftime(timeString, 19, "%H:%M", tm); + + drawTextRJ(timeString, 450, 5, 255, 255, 255); + + jpeg.init("/vdr.jpg"); + jpeg.draw(); +} + +int VWelcome::handleCommand(int command) +{ + if (command == Remote::UP) + { + sl.up(); + sl.draw(); + show(); + return 2; + } + else if (command == Remote::DOWN) + { + sl.down(); + sl.draw(); + show(); + return 2; + } + else if (command == Remote::ONE) + { + doChannelsList(); + return 2; + } + else if (command == Remote::TWO) + { + doRadioList(); + return 2; + } + else if (command == Remote::THREE) + { + doRecordingsList(); + return 2; + } + else if (command == Remote::FOUR) + { + Message* m = new Message(); + m->message = Message::STANDBY; + Command::getInstance()->postMessage(m); + return 4; + } + else if (command == Remote::FIVE) + { + Command::getInstance()->doReboot(); + } + else if (command == Remote::OK) + { + int option = sl.getCurrentOption(); + if (option == 0) + { + doChannelsList(); + return 2; + } + else if (option == 1) + { + doRadioList(); + return 2; + } + else if (option == 2) + { + doRecordingsList(); + return 2; + } + else if (option == 3) + { + Message* m = new Message(); + m->message = Message::STANDBY; + Command::getInstance()->postMessage(m); + return 4; + } + else if (option == 4) + { + Command::getInstance()->doReboot(); + return 2; + } + } + + return 1; +} + + +void VWelcome::doChannelsList() +{ + List* chanList = VDR::getInstance()->getChannelsList(VDR::VIDEO); + + if (chanList) + { + VChannelList* vchan = new VChannelList(VDR::VIDEO); + vchan->setList(chanList); + + ViewMan::getInstance()->addNoLock(vchan); + vchan->draw(); + vchan->show(); + +// Message* m = new Message(); +// m->from = this; +// m->to = ViewMan::getInstance(); +// m->message = Message::SWAP_ME_FOR; +// m->parameter = (ULONG)vchan; +// ViewMan::getInstance()->postMessage(m); + } +} + +void VWelcome::doRadioList() +{ + List* chanList = VDR::getInstance()->getChannelsList(VDR::RADIO); + + if (chanList) + { + VChannelList* vchan = new VChannelList(VDR::RADIO); + vchan->setList(chanList); + + ViewMan::getInstance()->addNoLock(vchan); + vchan->draw(); + vchan->show(); + } +} + +void VWelcome::doRecordingsList() +{ + ViewMan* viewman = ViewMan::getInstance(); + + VInfo* viewWait = new VInfo(); + viewWait->setDimensions(190, 460); + viewWait->setScreenPos(140, 170); + viewWait->setMainText("\n Downloading recordings list"); + viewWait->draw(); + viewWait->show(); + viewman->addNoLock(viewWait); + + + VDR* vdr = VDR::getInstance(); + Directory* recDir = vdr->getRecordingsList(); + + if (recDir) + { + VRecordingList* vrec = new VRecordingList(); + vrec->setDir(recDir); + + ViewMan::getInstance()->addNoLock(vrec); + + vrec->draw(); + vrec->show(); + } + + Log::getInstance()->log("VWelcome", Log::DEBUG, "possible delay start"); + viewman->removeView(viewWait, 1, 1); + Log::getInstance()->log("VWelcome", Log::DEBUG, "possible delay end"); +} diff --git a/vwelcome.h b/vwelcome.h new file mode 100644 index 0000000..fe5a52b --- /dev/null +++ b/vwelcome.h @@ -0,0 +1,58 @@ +/* + Copyright 2004-2005 Chris Tallon + + This file is part of VOMP. + + VOMP 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. + + VOMP is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with VOMP; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#ifndef VWELCOME_H +#define VWELCOME_H + +#include +#include + +#include "view.h" +#include "remote.h" +#include "wselectlist.h" +#include "wjpeg.h" +#include "viewman.h" +#include "vdr.h" +#include "directory.h" +#include "vchannellist.h" +#include "vrecordinglist.h" +#include "command.h" +#include "message.h" + +class VWelcome : public View +{ + public: + VWelcome(); + ~VWelcome(); + + int handleCommand(int command); + void draw(); + + private: + + WSelectList sl; + WJpeg jpeg; + + void doChannelsList(); + void doRadioList(); + void doRecordingsList(); +}; + +#endif diff --git a/wbutton.cc b/wbutton.cc new file mode 100644 index 0000000..ccf322f --- /dev/null +++ b/wbutton.cc @@ -0,0 +1,76 @@ +/* + Copyright 2004-2005 Chris Tallon + + This file is part of VOMP. + + VOMP 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. + + VOMP is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with VOMP; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#include "wbutton.h" + +WButton::WButton() +{ + int fontHeight = surface->getFontHeight(); + setDimensions(fontHeight, 70); + + mytext = NULL; + active = 0; +} + +WButton::~WButton() +{ + if (mytext) delete[] mytext; +} + +void WButton::setText(char* takeText) +{ + int length = strlen(takeText); + mytext = new char[length + 1]; + strcpy(mytext, takeText); +} + +void WButton::setActive(UCHAR tactive) +{ + active = tactive; +} + +void WButton::draw() +{ + UCHAR r1, g1, b1, r2, g2, b2; + + if (active) + { + r1 = 0; + g1 = 0; + b1 = 100; + r2 = 240; + g2 = 250; + b2 = 80; + } + else + { + r1 = 255; + g1 = 255; + b1 = 255; + r2 = 0; + g2 = 0; + b2 = 150; + } + + fillColour(r2, g2, b2, 255); + drawText(mytext, 0, 0, r1, g1, b1); + + +} diff --git a/wbutton.h b/wbutton.h new file mode 100644 index 0000000..f93c5c3 --- /dev/null +++ b/wbutton.h @@ -0,0 +1,45 @@ +/* + Copyright 2004-2005 Chris Tallon + + This file is part of VOMP. + + VOMP 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. + + VOMP is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with VOMP; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#ifndef WBUTTON_H +#define WBUTTON_H + +#include +#include + +#include "defines.h" +#include "box.h" + +class WButton : public Box +{ + public: + WButton(); + ~WButton(); + void setText(char* text); + void setActive(UCHAR tactive); + void draw(); + + private: + UCHAR active; + + char* mytext; +}; + +#endif diff --git a/wjpeg.cc b/wjpeg.cc new file mode 100644 index 0000000..6379c4e --- /dev/null +++ b/wjpeg.cc @@ -0,0 +1,112 @@ +/* + Copyright 2004-2005 Chris Tallon + + This file is part of VOMP. + + VOMP 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. + + VOMP is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with VOMP; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#include "wjpeg.h" + +int WJpeg::init(char* fileName) +{ + this->fileName = fileName; + return 1; +} + +void WJpeg::overrideSurface(Surface* newSurface) +{ + surface = newSurface; +} + +void WJpeg::draw() +{ + Log* logger = Log::getInstance(); + + logger->log("BJpeg", Log::DEBUG, "Here1"); + + FILE* infile = fopen(fileName, "r"); + if (infile == NULL) + { + logger->log("BJpeg", Log::ERR, "Can't open JPEG"); + return; + } + logger->log("BJpeg", Log::DEBUG, "File opened"); + + struct jpeg_decompress_struct cinfo; + struct jpeg_error_mgr jerr; + cinfo.err = jpeg_std_error(&jerr); + jpeg_create_decompress(&cinfo); + jpeg_stdio_src(&cinfo, infile); + jpeg_read_header(&cinfo, TRUE); + jpeg_start_decompress(&cinfo); + + logger->log("BJpeg", Log::DEBUG, "JPEG startup done"); + + // Init the surface + setDimensions(cinfo.output_height, cinfo.output_width); + + + // MAKE THE 2D ARRAY + + unsigned char* buffer = (unsigned char*)malloc(height * width * 3); + logger->log("BJpeg", Log::DEBUG, "Buffer allocated at %p", buffer); + + unsigned char* bufferPointers[height]; + for(int ps = 0; ps < height; ps++) bufferPointers[ps] = buffer + (ps * width * 3); + + logger->log("BJpeg", Log::DEBUG, "done array check"); + + int rowsread = 0; + while (cinfo.output_scanline < cinfo.output_height) + { + rowsread += jpeg_read_scanlines(&cinfo, &bufferPointers[rowsread], height); + } + + logger->log("BJpeg", Log::DEBUG, "Done all jpeg_read"); + + jpeg_finish_decompress(&cinfo); + jpeg_destroy_decompress(&cinfo); + + fclose(infile); + + logger->log("BJpeg", Log::DEBUG, "jpeg shutdown done, x, y %u %u", width, height); + + unsigned int c; + int x, y, xoff; + unsigned char* p; + + for (y = 0; y < height; y++) + { + p = bufferPointers[y]; + + for (x = 0; x < width; x++) + { + xoff = x * 3; + + c = ( (0xFF000000 ) + | (p[xoff ] << 16) + | (p[xoff + 1] << 8) + | (p[xoff + 2] ) ); + + surface->drawPixel(screenX + x, screenY + y, c); + } + } + + free(buffer); + logger->log("BJpeg", Log::DEBUG, "deleted buffer"); + +} + diff --git a/wjpeg.h b/wjpeg.h new file mode 100644 index 0000000..2b43df7 --- /dev/null +++ b/wjpeg.h @@ -0,0 +1,48 @@ +/* + Copyright 2004-2005 Chris Tallon + + This file is part of VOMP. + + VOMP 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. + + VOMP is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with VOMP; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#ifndef WJPEG_H +#define WJPEG_H + +#include +#include +extern "C" +{ + #include +} + +#include "log.h" +#include "box.h" +#include "surface.h" + +class WJpeg : public Box +{ + public: + + int init(char* fileName); + void draw(); + + void overrideSurface(Surface *newSurface); + + private: + char* fileName; +}; + +#endif diff --git a/wselectlist.cc b/wselectlist.cc new file mode 100644 index 0000000..de93a2e --- /dev/null +++ b/wselectlist.cc @@ -0,0 +1,171 @@ +/* + Copyright 2004-2005 Chris Tallon + + This file is part of VOMP. + + VOMP 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. + + VOMP is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with VOMP; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#include "wselectlist.h" + +WSelectList::WSelectList() +{ + numOptions = 0; + selectedOption = 0; + topOption = 0; + numOptionsDisplayable = 0; +} + +WSelectList::~WSelectList() +{ + clear(); +} + +void WSelectList::clear() +{ + for (int i = 0; i < numOptions; i++) + { + delete[] options[i]; + } + + numOptions = 0; + selectedOption = 0; + topOption = 0; + numOptionsDisplayable = 0; +} + +void WSelectList::hintSetCurrent(int index) +{ + selectedOption = index; + if (selectedOption >= numOptions) selectedOption = numOptions - 1; +} + +void WSelectList::hintSetTop(int index) +{ + topOption = index; +} + +int WSelectList::addOption(char* text, int selected) +{ + int thisNewOption = numOptions; + int length = strlen(text); + options[thisNewOption] = new char[length + 1]; + strcpy(options[thisNewOption], text); + if (selected) selectedOption = thisNewOption; + numOptions++; + return thisNewOption; +} + +void WSelectList::draw() +{ + int fontHeight = surface->getFontHeight(); + int ySeperation = fontHeight + 1; + + numOptionsDisplayable = (height - 5) / ySeperation; + + if (selectedOption == (topOption + numOptionsDisplayable)) topOption++; + if (selectedOption == (topOption - 1)) topOption--; + // if still not visible... + if ((selectedOption < topOption) || (selectedOption > (topOption + numOptionsDisplayable))) + { + topOption = selectedOption - (numOptionsDisplayable / 2); + } + + if (topOption < 0) topOption = 0; + + + + fillColour(0, 0, 100, 255); + + int ypos = 5; + for (int i = topOption; i < (topOption + numOptionsDisplayable); i++) + { + if (i == numOptions) return; + if ((ypos + ySeperation) > height) break; + + if (i == selectedOption) + { + rectangle(0, ypos, width, fontHeight, 240, 250, 80, 255); + drawText(options[i], 5, ypos, 0, 0, 0); + } + else + { + drawText(options[i], 5, ypos, 255, 255, 255); + } + ypos += ySeperation; + } +} + +void WSelectList::up() +{ + if (selectedOption > 0) + { + selectedOption--; + } + else + { + selectedOption = numOptions - 1; + } +} + +void WSelectList::down() +{ + if (selectedOption < numOptions - 1) + { + selectedOption++; + } + else + { + selectedOption = 0; + } +} + +void WSelectList::pageUp() +{ + topOption -= numOptionsDisplayable; + if (topOption < 0) topOption = 0; + + selectedOption = topOption; +} + +void WSelectList::pageDown() +{ + if ((topOption + numOptionsDisplayable) >= numOptions) return; + + topOption += numOptionsDisplayable; + selectedOption = topOption; +} + +int WSelectList::getTopOption() +{ + return topOption; +} + +int WSelectList::getNumOptions() +{ + return numOptions; +} + +int WSelectList::getBottomOption() +{ + int retval = topOption + numOptionsDisplayable; + if (retval > numOptions) return numOptions; + else return retval; +} + +int WSelectList::getCurrentOption() +{ + return selectedOption; +} diff --git a/wselectlist.h b/wselectlist.h new file mode 100644 index 0000000..3dca0b7 --- /dev/null +++ b/wselectlist.h @@ -0,0 +1,60 @@ +/* + Copyright 2004-2005 Chris Tallon + + This file is part of VOMP. + + VOMP 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. + + VOMP is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with VOMP; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#ifndef WSELECTLIST_H +#define WSELECTLIST_H + +#include +#include + +#include "box.h" + +class WSelectList : public Box +{ + public: + WSelectList(); + ~WSelectList(); + void clear(); + + int addOption(char* text, int selected); + void draw(); + + void down(); + void up(); + void pageUp(); + void pageDown(); + + int getTopOption(); + int getNumOptions(); + int getBottomOption(); + int getCurrentOption(); + + void hintSetCurrent(int index); + void hintSetTop(int index); + + private: + char* options[500]; + int numOptions; + int selectedOption; + int topOption; + int numOptionsDisplayable; +}; + +#endif diff --git a/wsymbol.cc b/wsymbol.cc new file mode 100644 index 0000000..4315f98 --- /dev/null +++ b/wsymbol.cc @@ -0,0 +1,563 @@ +/* + Copyright 2004-2005 Chris Tallon + + This file is part of VOMP. + + VOMP 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. + + VOMP is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with VOMP; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#include "wsymbol.h" + +UCHAR WSymbol::widths[] = { 2, 2, 4, 4, 1, 1, 3, 3, 3, 3, 3, 4, 4 }; +UCHAR WSymbol::heights[] = { 8, 8, 12, 12, 24, 4, 18, 18, 18, 18, 18, 30, 30 }; + +UCHAR WSymbol::symbols[] = { + +/* +00000000 00000011 +00000000 00001111 +00000000 00111111 +00000000 11111111 +00000011 11111111 +00001111 11111111 +00111111 11111111 +11111111 11111111 +*/ + +0x00, 0x03, +0x00, 0x0F, +0x00, 0x3F, +0x00, 0xFF, +0x03, 0xFF, +0x0F, 0xFF, +0x3F, 0xFF, +0xFF, 0xFF, + +/* +11111111 00000011 +00000000 00001111 +00000000 00111111 +00000000 11111111 +00000011 11111111 +00001111 11111111 +00111111 11111111 +11111111 11111111 +*/ + +0xFF, 0x03, +0x00, 0x0F, +0x00, 0x3F, +0x00, 0xFF, +0x03, 0xFF, +0x0F, 0xFF, +0x3F, 0xFF, +0xFF, 0xFF, + +/* +00000000 00000000 00000000 00000000 +00000000 00000000 00000000 00000000 +00000000 00000000 00000000 00000000 +00000000 00000000 00000000 00000000 +00000000 00000000 00000000 00000000 +00000000 00000000 00000000 00000000 +00000000 00000000 00000000 00000000 +00000000 00000000 00000000 00000000 +00000000 00000000 00000000 00000000 +00000000 00000000 00000000 00000000 +00000000 00000000 00000000 00000000 +00000000 00000000 00000000 00000000 +*/ + +0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, + +/* +00000000 00000000 00000000 00000011 +00000000 00000000 00000000 00011111 +00000000 00000000 00000000 11111111 +00000000 00000000 00000011 11111111 +00000000 00000000 00011111 11111111 +00000000 00000000 11111111 11111111 +00000000 00000011 11111111 11111111 +00000000 00011111 11111111 11111111 +00000000 11111111 11111111 11111111 +00000011 11111111 11111111 11111111 +00011111 11111111 11111111 11111111 +11111111 11111111 11111111 11111111 +*/ + +0x00, 0x00, 0x00, 0x03, +0x00, 0x00, 0x00, 0x1F, +0x00, 0x00, 0x00, 0xFF, +0x00, 0x00, 0x03, 0xFF, +0x00, 0x00, 0x1F, 0xFF, +0x00, 0x00, 0xFF, 0xFF, +0x00, 0x03, 0xFF, 0xFF, +0x00, 0x1F, 0xFF, 0xFF, +0x00, 0xFF, 0xFF, 0xFF, +0x03, 0xFF, 0xFF, 0xFF, +0x1F, 0xFF, 0xFF, 0xFF, +0xFF, 0xFF, 0xFF, 0xFF, + +/* +00001111 +00001111 +00001111 +00001111 +00001111 +00001111 +00001111 +00001111 +00001111 +00001111 +00001111 +00001111 +00001111 +00001111 +00001111 +00001111 +00001111 +00001111 +00001111 +00001111 +00001111 +00001111 +00001111 +00001111 +*/ + +0x0F, +0x0F, +0x0F, +0x0F, +0x0F, +0x0F, +0x0F, +0x0F, +0x0F, +0x0F, +0x0F, +0x0F, +0x0F, +0x0F, +0x0F, +0x0F, +0x0F, +0x0F, +0x0F, +0x0F, +0x0F, +0x0F, +0x0F, +0x0F, + +/* +00001111 +00001111 +00001111 +00001111 +*/ + +0x0F, +0x0F, +0x0F, +0x0F, + +/* +11000000 00000000 00110000 +11000000 00000000 11110000 +11000000 00000011 11110000 +11000000 00001111 11110000 +11000000 00111111 11110000 +11000000 11111111 11110000 +11000011 11111111 11110000 +11001111 11111111 11110000 +11111111 11111111 11110000 + +11111111 11111111 11110000 +11001111 11111111 11110000 +11000011 11111111 11110000 +11000000 11111111 11110000 +11000000 00111111 11110000 +11000000 00001111 11110000 +11000000 00000011 11110000 +11000000 00000000 11110000 +11000000 00000000 00110000 +*/ + +0xC0, 0x00, 0x30, +0xC0, 0x00, 0xF0, +0xC0, 0x03, 0xF0, +0xC0, 0x0F, 0xF0, +0xC0, 0x3F, 0xF0, +0xC0, 0xFF, 0xF0, +0xC3, 0xFF, 0xF0, +0xCF, 0xFF, 0xF0, +0xFF, 0xFF, 0xF0, + +0xFF, 0xFF, 0xF0, +0xCF, 0xFF, 0xF0, +0xC3, 0xFF, 0xF0, +0xC0, 0xFF, 0xF0, +0xC0, 0x3F, 0xF0, +0xC0, 0x0F, 0xF0, +0xC0, 0x03, 0xF0, +0xC0, 0x00, 0xF0, +0xC0, 0x00, 0x30, + +/* +11000000 00000000 00110000 +11110000 00000000 00110000 +11111100 00000000 00110000 +11111111 00000000 00110000 +11111111 11000000 00110000 +11111111 11110000 00110000 +11111111 11111100 00110000 +11111111 11111111 00110000 +11111111 11111111 11110000 + +11111111 11111111 11110000 +11111111 11111111 00110000 +11111111 11111100 00110000 +11111111 11110000 00110000 +11111111 11000000 00110000 +11111111 00000000 00110000 +11111100 00000000 00110000 +11110000 00000000 00110000 +11000000 00000000 00110000 +*/ + +0xC0, 0x00, 0x30, +0xF0, 0x00, 0x30, +0xFC, 0x00, 0x30, +0xFF, 0x00, 0x30, +0xFF, 0xC0, 0x30, +0xFF, 0xF0, 0x30, +0xFF, 0xFC, 0x30, +0xFF, 0xFF, 0x30, +0xFF, 0xFF, 0xF0, + +0xFF, 0xFF, 0xF0, +0xFF, 0xFF, 0x30, +0xFF, 0xFC, 0x30, +0xFF, 0xF0, 0x30, +0xFF, 0xC0, 0x30, +0xFF, 0x00, 0x30, +0xFC, 0x00, 0x30, +0xF0, 0x00, 0x30, +0xC0, 0x00, 0x30, + +/* +00000000 00000000 00000000 +00000000 00000000 00000000 +00000000 00000000 00000000 +00000000 00000000 00000000 +00000000 01100000 00000000 +00000000 11110000 00000000 +00000001 11111000 00000000 +00000001 11111000 00000000 +00000011 11111100 00000000 + +00000111 11111110 00000000 +00001111 11111111 00000000 +00011111 11111111 10000000 +00011111 11111111 10000000 +00111111 11111111 11000000 +01111111 11111111 11100000 +11111111 11111111 11110000 +00000000 00000000 00000000 +00000000 00000000 00000000 +*/ + +0x00, 0x00, 0x00, +0x00, 0x00, 0x00, +0x00, 0x00, 0x00, +0x00, 0x00, 0x00, +0x00, 0x60, 0x00, +0x00, 0xF0, 0x00, +0x01, 0xF8, 0x00, +0x01, 0xF8, 0x00, +0x03, 0xFC, 0x00, + +0x07, 0xFE, 0x00, +0x0F, 0xFF, 0x00, +0x1F, 0xFF, 0x80, +0x1F, 0xFF, 0x80, +0x3F, 0xFF, 0xC0, +0x7F, 0xFF, 0xE0, +0xFF, 0xFF, 0xF0, +0x00, 0x00, 0x00, +0x00, 0x00, 0x00, + +/* +00000000 00000000 00000000 +00000000 00000000 00000000 +00000000 00000000 00000000 +00000000 00000000 00000000 +11111111 11111111 11110000 +01111111 11111111 11100000 +00111111 11111111 11000000 +00011111 11111111 10000000 +00011111 11111111 10000000 + +00001111 11111111 00000000 +00000111 11111110 00000000 +00000011 11111100 00000000 +00000001 11111000 00000000 +00000001 11111000 00000000 +00000000 11110000 00000000 +00000000 01100000 00000000 +00000000 00000000 00000000 +00000000 00000000 00000000 +*/ + +0x00, 0x00, 0x00, +0x00, 0x00, 0x00, +0x00, 0x00, 0x00, +0x00, 0x00, 0x00, +0xFF, 0xFF, 0xF0, +0x7F, 0xFF, 0xE0, +0x3F, 0xFF, 0xC0, +0x1F, 0xFF, 0x80, +0x1F, 0xFF, 0x80, + +0x0F, 0xFF, 0x00, +0x07, 0xFE, 0x00, +0x03, 0xFC, 0x00, +0x01, 0xF8, 0x00, +0x01, 0xF8, 0x00, +0x00, 0xF0, 0x00, +0x00, 0x60, 0x00, +0x00, 0x00, 0x00, +0x00, 0x00, 0x00, + + +/* +11000000 00000000 00000000 +11110000 00000000 00000000 +11111100 00000000 00000000 +11111111 00000000 00000000 +11111111 11000000 00000000 +11111111 11110000 00000000 +11111111 11111100 00000000 +11111111 11111111 00000000 +11111111 11111111 11000000 + +11111111 11111111 11000000 +11111111 11111111 00000000 +11111111 11111100 00000000 +11111111 11110000 00000000 +11111111 11000000 00000000 +11111111 00000000 00000000 +11111100 00000000 00000000 +11110000 00000000 00000000 +11000000 00000000 00000000 +*/ + +0xC0, 0x00, 0x00, +0xF0, 0x00, 0x00, +0xFC, 0x00, 0x00, +0xFF, 0x00, 0x00, +0xFF, 0xC0, 0x00, +0xFF, 0xF0, 0x00, +0xFF, 0xFC, 0x00, +0xFF, 0xFF, 0x00, +0xFF, 0xFF, 0xC0, + +0xFF, 0xFF, 0xC0, +0xFF, 0xFF, 0x00, +0xFF, 0xFC, 0x00, +0xFF, 0xF0, 0x00, +0xFF, 0xC0, 0x00, +0xFF, 0x00, 0x00, +0xFC, 0x00, 0x00, +0xF0, 0x00, 0x00, +0xC0, 0x00, 0x00, + +/* +11000000 00000000 00000000 00001100 +01100000 00000000 11000000 00011000 +00110000 00000001 11000000 00110000 +00011000 00000011 11000000 01100000 +00001100 00000111 11000000 11000000 +00000110 00001111 11000001 10000000 +00000011 00011111 11000011 00000000 +00000001 10111111 11000110 00000000 +00000000 11111111 11001100 00000000 +00000000 11111111 11011000 00000000 +00001111 11111111 11110000 00000000 +00001111 11111111 11100000 00000000 +00001111 11111111 11000000 00000000 +00001111 11111111 11000000 00000000 +00001111 11111111 11000000 00000000 +00001111 11111111 11000000 00000000 +00001111 11111111 11000000 00000000 +00001111 11111111 11100000 00000000 +00001111 11111111 11110000 00000000 +00000000 11111111 11011000 00000000 +00000000 11111111 11001100 00000000 +00000001 10111111 11000110 00000000 +00000011 00011111 11000011 00000000 +00000110 00001111 11000001 10000000 +00001100 00000111 11000000 11000000 +00011000 00000011 11000000 01100000 +00110000 00000001 11000000 00110000 +01100000 00000000 11000000 00011000 +11000000 00000000 00000000 00001100 +00000000 00000000 00000000 00000000 +*/ + +0xC0, 0x00, 0x00, 0x0C, +0x60, 0x00, 0xC0, 0x18, +0x30, 0x01, 0xC0, 0x30, +0x18, 0x03, 0xC0, 0x60, +0x0C, 0x07, 0xC0, 0xC0, +0x06, 0x0F, 0xC1, 0x80, +0x03, 0x1F, 0xC3, 0x00, +0x01, 0xBF, 0xC6, 0x00, +0x00, 0xFF, 0xCC, 0x00, +0x00, 0xFF, 0xD8, 0x00, +0x0F, 0xFF, 0xF0, 0x00, +0x0F, 0xFF, 0xE0, 0x00, +0x0F, 0xFF, 0xC0, 0x00, +0x0F, 0xFF, 0xC0, 0x00, +0x0F, 0xFF, 0xC0, 0x00, +0x0F, 0xFF, 0xC0, 0x00, +0x0F, 0xFF, 0xC0, 0x00, +0x0F, 0xFF, 0xE0, 0x00, +0x0F, 0xFF, 0xF0, 0x00, +0x00, 0xFF, 0xD8, 0x00, +0x00, 0xFF, 0xCC, 0x00, +0x01, 0xBF, 0xC6, 0x00, +0x03, 0x1F, 0xC3, 0x00, +0x06, 0x0F, 0xC1, 0x80, +0x0C, 0x07, 0xC0, 0xC0, +0x18, 0x03, 0xC0, 0x60, +0x30, 0x01, 0xC0, 0x30, +0x60, 0x00, 0xC0, 0x18, +0xC0, 0x00, 0x00, 0x0C, +0x00, 0x00, 0x00, 0x00, + +/* +00000000 00000000 00000000 00000000 +00000000 00000000 11000000 00000000 +00000000 00000001 11000000 00000000 +00000000 00000011 11011111 10000000 +00000000 00000111 11011111 10000000 +00000000 00001111 11000000 00000000 +00000000 00011111 11000000 00000000 +00000000 00111111 11000000 00000000 +00000000 01111111 11011111 10000000 +00000000 11111111 11011111 10000000 +00001111 11111111 11000000 00000000 +00001111 11111111 11000000 00000000 +00001111 11111111 11000000 00000000 +00001111 11111111 11011111 10000000 +00001111 11111111 11011111 10000000 +00001111 11111111 11000000 00000000 +00001111 11111111 11000000 00000000 +00001111 11111111 11000000 00000000 +00001111 11111111 11011111 10000000 +00000000 11111111 11011111 10000000 +00000000 01111111 11000000 00000000 +00000000 00111111 11000000 00000000 +00000000 00011111 11000000 00000000 +00000000 00001111 11011111 10000000 +00000000 00000111 11011111 10000000 +00000000 00000011 11000000 00000000 +00000000 00000001 11000000 00000000 +00000000 00000000 11000000 00000000 +00000000 00000000 00000000 00000000 +00000000 00000000 00000000 00000000 +*/ + +0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0xC0, 0x00, +0x00, 0x01, 0xC0, 0x00, +0x00, 0x03, 0xDF, 0x80, +0x00, 0x07, 0xDF, 0x80, +0x00, 0x0F, 0xC0, 0x00, +0x00, 0x1F, 0xC0, 0x00, +0x00, 0x3F, 0xC0, 0x00, +0x00, 0x7F, 0xDF, 0x80, +0x00, 0xFF, 0xDF, 0x80, +0x0F, 0xFF, 0xC0, 0x00, +0x0F, 0xFF, 0xC0, 0x00, +0x0F, 0xFF, 0xC0, 0x00, +0x0F, 0xFF, 0xDF, 0x80, +0x0F, 0xFF, 0xDF, 0x80, +0x0F, 0xFF, 0xC0, 0x00, +0x0F, 0xFF, 0xC0, 0x00, +0x0F, 0xFF, 0xC0, 0x00, +0x0F, 0xFF, 0xDF, 0x80, +0x00, 0xFF, 0xDF, 0x80, +0x00, 0x7F, 0xC0, 0x00, +0x00, 0x3F, 0xC0, 0x00, +0x00, 0x1F, 0xC0, 0x00, +0x00, 0x0F, 0xDF, 0x80, +0x00, 0x07, 0xDF, 0x80, +0x00, 0x03, 0xC0, 0x00, +0x00, 0x01, 0xC0, 0x00, +0x00, 0x00, 0xC0, 0x00, +0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00 + + +}; + +WSymbol::WSymbol() +{ + nextSymbol = 0; +} + +void WSymbol::draw() +{ + int offset = 0; + for(int i = 0; i < nextSymbol; i++) + { + offset += (widths[i]) * heights[i]; + } + + UCHAR* base = symbols + offset; + int widthBytes = widths[nextSymbol]; + int widthBits = widthBytes * 8; + int height = heights[nextSymbol]; + + int x, y, bytesIn, bitsIn; + + for (y = 0; y < height; y++) + { + for (x = 0; x < widthBits; x++) + { + bytesIn = (y * widthBytes) + (int)(x / 8); + bitsIn = x % 8; + + if ((base[bytesIn] >> (7 - bitsIn)) & 0x01) + { + drawPixel(x, y, 0xFFFFFFFF); + } + } + } +} diff --git a/wsymbol.h b/wsymbol.h new file mode 100644 index 0000000..c7e66ea --- /dev/null +++ b/wsymbol.h @@ -0,0 +1,55 @@ +/* + Copyright 2004-2005 Chris Tallon + + This file is part of VOMP. + + VOMP 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. + + VOMP is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with VOMP; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#ifndef WSYMBOL_H +#define WSYMBOL_H + +#include "defines.h" +#include "box.h" + +class WSymbol : public Box +{ + public: + WSymbol(); + + void draw(); + UCHAR nextSymbol; + + const static UCHAR VOLUME = 0; + const static UCHAR TEST = 1; + const static UCHAR TEST2 = 2; + const static UCHAR VOLUME2 = 3; + const static UCHAR VOLBAR = 4; + const static UCHAR VOLDOT = 5; + const static UCHAR SKIPBACK = 6; + const static UCHAR SKIPFORWARD = 7; + const static UCHAR UP = 8; + const static UCHAR DOWN = 9; + const static UCHAR PLAY = 10; + const static UCHAR MUTE = 11; + const static UCHAR UNMUTE = 12; + + private: + static UCHAR symbols[]; + static UCHAR widths[]; + static UCHAR heights[]; +}; + +#endif -- 2.39.5