diff options
author | austriancoder <austriancoder> | 2005-08-15 17:18:40 +0000 |
---|---|---|
committer | austriancoder <austriancoder> | 2005-08-15 17:18:40 +0000 |
commit | 8955b4dfa419698ecb853bb8f1cdc1fe96d206d6 (patch) | |
tree | 2ec35c50a4c8feb54f6c6fe48710d6a48bfc2ea6 | |
parent | e4c44acfc5421d0794dcbc777202378f35a187e8 (diff) | |
download | vdr-plugin-dxr3-8955b4dfa419698ecb853bb8f1cdc1fe96d206d6.tar.gz vdr-plugin-dxr3-8955b4dfa419698ecb853bb8f1cdc1fe96d206d6.tar.bz2 |
HEAD should have files of 0.2.3 release
66 files changed, 0 insertions, 13172 deletions
diff --git a/CONTRIBUTORS b/CONTRIBUTORS deleted file mode 100644 index b9f7f47..0000000 --- a/CONTRIBUTORS +++ /dev/null @@ -1,30 +0,0 @@ -The following people have contributed to the development of this plugin in -one way or the another. Without their help, the plugin would not be as good -as it is now. - -Jon Burgess -Martin Cap -Stuart Daines -Martin Dauskardt -Peter Dittmann -Gavin Hamill -Paavo Hartikainen -Tobias Haustein -Stefan Hülswitt -Seppo Ingalsuo -Atte Manninen -Lars Neufurth (donated some money for Christian's DD 5.1 system) -Andre Neumann -Luca Olivetti -Richard P. -Miika Pekkarinen -Teemu Rantanen -Jarkko Santala -Marco Schlüßler -Stephan Skrodzki -Ville Skyttä -Mikko Tuumanen -Sascha Volkenandt -Kimmo Vuorinen - -Thank you very much :) diff --git a/COPYING b/COPYING deleted file mode 100644 index 3912109..0000000 --- a/COPYING +++ /dev/null @@ -1,340 +0,0 @@ - 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. - - <one line to give the program's name and a brief idea of what it does.> - Copyright (C) <year> <name of author> - - 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. - - <signature of Ty Coon>, 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/HISTORY b/HISTORY deleted file mode 100644 index b4288fe..0000000 --- a/HISTORY +++ /dev/null @@ -1,299 +0,0 @@ -VDR Plugin 'dxr3' Revision History ----------------------------------- - -2002-08-04: Version 0.0.1 - -- Initial revision. - -2002-11-10: Version 0.1.0 - -- Rewritten Audio/Video-sync engine -- Changed OSD colors (but still limited to four colors) - -2002-11-12: Version 0.1.1 - -- Changed Makefile (needed for vdr 1.1.15) -- The plugin should now work smoother under heavy system load (e.g. network traffic) - -2002-12-23: Version 0.1.2 -- Compiles now with gcc3.2. -- Fixed unsigned / signed bug in output thread (dxr3outputthread.c) which led -to sporadic resync (still frame and jump of about 1s). -- OSD is now as colorful as vdr with DVB-s -- OSD rescaling for channels with a lower horizontal resolution - -2002-12-29: Version 0.1.3 -- SPU write is now protected with a mutex by using the Dxr3AbstractionDevice. -- Fixed horizontal size detection. -- Added usleep call during still picture to reduce cpu load. -- Removed calls to WaitForSysClock in dxr3outputthread.c which led to problems -during replay on some systems (Thanks to Atte Manninen for reporting this). -- Did some minor changes to dxr3outputthread.c which hopefully will increase -reliability. -- Changed osd scale rule. Scaling now only happens if the horizontal size is -smaller than 700. - -2003-01-05: Version 0.1.4 -- Small bugfix in dxr3demuxdevice.c - -2003-02-19: Version 0.1.5 -- Support for MP3 plugin. -- Support for radio channels. Requested by Richard P. (???) who send me a - sample code ... thanks. -- Some fixes to get along with corrupt pes data (which should actually be - solved in a lower layer). Thanks to Teemu Rantanen. -- Changed sync buffer size during replay to reduce "jumps" in cutted streams. - Thanks to Atte Manninen for the idea. -- Support for still frame handling. Now it is possible to move the editing - marks with visible corresponding i-frames. Unfortunately this doesn't seem to - work with finish dvb streams. -- Some tuning to reduce cpu load during replay. - -2003-02-25: Version 0.1.6 -- Added black frames between channel switches (which solves the frozen picture - 'problem' when using the mp3-plugin, too). -- Increased thread priority of output threads which improves live stream - quality on my system (K6II 350). - -2003-03-23: Version 0.1.7 -- Added unix domain server interface to close and reopen dxr3 devices without - stopping vdr (see dxr3_ux_client.pl script on how to use this). - Requested by Atte Manninen. - Thanks to Atte Manninen and Teemu Rantanen for testing and fixing some problems. -- Added support for external player mode. -- Some cosmetic changes. -- Some changes to reduce cpu load. -- Added workaround handling for osd crash (driver patch necessary; patch with - em8300_patch.diff). - Thanks to Teemu Rantanen and Malcolm Caldwell for testing this. -- Added buffered output for mp3-plugin audio data. This seems to improve audio - quality significantly. -- Reduced count of audio errors (wrong data rate). -- Changed channel switch behavior (to remove audio disturbances => channel switching - is a little bit slower now). -- Added exception handling for defect pes streams. -- Added more checks by introducing a new pes parsing class. -- Fixed buffer overrun problem. Because of the missing pll control a buffer overrun - happens after staying for a long time on the same channel. In older version - the output stopped after a buffer overrun. Now the buffer will be cleared and - the output will continue after about a second. -- New buffer handling in PlayVideo. - -2003-03-23: Version 0.1.7a -- Bugfix in A/V-engine for audio output with less dropouts - -2003-04-28: Version 0.1.8 -- Added support for dvd-plugin (subtitles doesn't work properly so far). -- Added setup parameter to define the dxr3-card which shall be used by vdr - (thanks to Tobias Haustein). -- Added setup parameter to force letter box mode (for wrong aspect ratio coded - in pes-stream). This parameter is not saved. -- Added support for video format setup parameter (no WSS support). -- Fixed external player support (thanks to Seppo Ingalsuo). -- Added volume support (thanks to Teemu Rantanen). -- Fixed I-Frame display problem (cutting and fast forward/backwards in some streams). - Those who have problems with fast forward/backward might want to patch - vdr (use vdr_iframe_patch.diff / for vdr-1.1.29). -- Reduced memory consumption. -- Fixed problem with digital output setup parameter. -- Fixed wrong bit error detection. -- Changed bit error handling. - -2003-04-28: Version 0.1.8a -- Second trial to fix external player support (thanks to Jarkko Santala) - -2003-05-07: Version 0.1.9 -- Added support for AC3 streams (based on classes of - the AC3overDVB Patch maintained by Stefan Huelswitt). -- Added DXR3 main menu entry. It's now possible to: - - Reset DXR3-hardware. - - Toggle Force LetterBox. - - Switch to Digital Output. - - Switch to AC3 Output (when already listening to digital output). -- Added short ac3 information text on channel switch. -- Reduced analog audio disturbances. -- Fixed audio initialization problem. - -2003-05-07: Version 0.2.0 -- Fixed compatibility problem with vdr version 1.1.31 and higher. -- Fixed analog audio problem (spurious disturbances). -- Added first cut mpeg1 support: It works quite good with vcd plugin. As far as I know - this doesn't work reliable together with analog plugin. Thanks to Gavin Hamill for - testing support and investigations with analog plugin. - No osd scaling for mpeg1 at the moment. -- Changed channel switch behavior with respect to mpeg1 support (it doesn't seem - to be possible to switch between mpeg1 and mpeg2 without closing and reopening the - video device). -- Improved lib sync. - -2003-08-10: Version 0.2.1 -- Added setup entry to switch between ntsc and pal. This setting becomes active - after restarting vdr and reseting the dxr3 card, respectively. -- Fixed uninitialized variable m_audioMode in dxr3abstractiondevice.c. Thanks - to Jon Burgess. -- Fixed incorrect ioctl-problem. Thanks to Jon Burgess. -- Fixed wrong scaled osd problem when starting vdr without live stream. -- Fixed external player problem when return to dxr3 output after using ac3 output. - Thanks to Jarkko Santala for reporting this one. -- Fixed wrong assert-call. Thanks to Andre Neumann. - -2004-01-04: Version 0.2.2 - -- Some initialization fixes. Thanks to Jon Burgess. -- Added patch from Teemu Rantanen to emergency exit if - the plugin is not able to recover from dxr3 driver crash. -- Fixed some osd problems (Elchi, Games, etc.). -- Changed Makefile to support vdr-1.3.0. - -2004-06-22: Version 0.2.3-alpha1 (only for vdr-portal.de) - -- we are using now <linux/em8300.h> instead of "em8300.h" -- updated multichannelaudio.h/c with newest AC3overDVB-Patch-Source (0.2.6) -- switched to new osd routines for vdr-1.3.7 -- added dxr3singleton.h -- new interface to work with ffmpeg (chagned include to <avcodec.h>) -- added a lot of commments and cosmetic code cleanups -- using everywhere std::string - makes life nicer -- moved dxr3absdevice to dxr3interface -- rewritten some parts of dxr3interface -- added anti-glinsch-when-fast-forward-and-then-play-patch ;) -- killed DIAG and added a global logger, which is used only in - a few functions and not in every like DIAG -- removed cDxr3StatusMonitor - i dont know why we need this -- cleaned out unneeded includes -- fixed memory leak in cDxr3Interface::UploadMicroCode: - If uploading of the microcode failed, the allocated memory wasn't - freed. -- If we are changing the audiooutput now the plugin will call an overworked - AudioRepoen function, which does not shutdown the whole card. -- Things like VIDEOMODE and AUDIOMODE are now set only ONCE on plugin start! -- added check if memory in cDxr3SyncBuffer is allocated correct -- introced a 'ToDo-System'. - in every *.c file there can be something like this at the top of the file: - /* - ToDo: - - cDxr3SyncBuffer::Push: XXX This is only a workaround until a sufficient control algorithm is implemented - */ - - So it is easier to keep track of stuff, which needs more work. -- some small changes in dxr3colormanger.h/c -- some small changes in dxr3pesframe.h/c -- some small changes in spuenc.h/c -- killed spu_dump in spuenc.h/c -- renamed spuenc.h/c to dxr3interface_spu_encoder.h/c -- changed dxr3audiodecoder to support the new ffmpeg interface -- renamed dxr3absspu/dxr3absspulist to dxr3interace_spu/dxr3interace_spu_list -- volume control logarithmic instead of linear. - This is a more natural sounding way of controlling the - volume. Thanks to Jon Burgess <mplayer@jburgess.uklinux.net> -- added patch for DVD subtitles. Thanks to Stuart Daines <s.daines@ntlworld.com> -- fixed memory leak in dxr3osd.c - Thanks to Miika Pekkarinen <miipekk@ihme.org> -- added Tools namespace, which has a fixed Rgb2YCrCb function in it (dxr3tools.h) -- kicked out Cmd in dxr3osd.h/c -- added dxr3i18n.h/c -- added Portuguese language support - thanks to Paulo Lopes <pmml@netvita.pt> -- added Finnish language support - thanks to Hannu Savolainen <hannu@opensound.com> -- added Swedish language support - thanks to Tomas Prybil <tomas@prybil.se> -NOTE: I havent found time to include all of the languages, will be done in pre2 -- kicked out - i hope - some unneeded usleeps -- rewrote cSPUEncoder: Now we imitate the Cmd funtion form the dvb drivers. So - we can use now the normal osd functions form dvbosd.c :) -- added support for vdr-1.3.11 -- added videomode pal 60 - - -2004-07-29: Version 0.2.3-pre2 (now aviable on SourceForge) - -- fixed audio and video problems -- works now with vdr < 1.3.7 -- added YUV2Rgb int dxr3tools.h (for dxr3spudecoder) -- added some more debug infos in dxr3outputthread.c -- added const keyword in dxr3configdata.h -- added EM8300 include define in Makefile -- added debuglevels, so we can define how much we want to log -- assimilated spudecoder from vdr's dvbspu.c/h -> nice nav in dvds -- kicked out cDxr3InterfaceSpu from dxr3interface.c/h -- a little fix for cDxr3Interface::ResampleVolume -- kicked out dxr3interface_spu.c/h and dxr3interface_spu_list.c/h, because - the new spudecoder dont need it anymore. -- added dxr3cpu.c/h to get some infos about the cpu -- added dxr3memcpy.c/h to get a little speedup - i hope -- maybe a little audiofix: lastHeader in cDxr3AudioDecoder will now set to 0 - with the constr. and not via Init()-function. So there should be now some lesser - audio scratches. -- osd works now on every resolution (viva, viva plus,...) -- added main-menu-entry -- added in some parts some memory allocation tests -- added fix for Makefile from vdr-portal.de -> should compile on more machines :) -- added Tools::WriteInfoToOsd(...) - now some infos like "Releasing devices" are show - now on the osd again -- fixed dxr3osd_subpicutre.c - thanks to Paavo Hartikainen <pahartik@sci.fi> - - -2005-??-??: Version 0.3.0-cvs - -- fixed output of anamorphic video when tv aspect is configured to 16:9 in - DVB setup menu (Seppo Ingalsuo) -- rewrote i18n support, improved Finnish translation and other bits - (Christian Gmeiner, Ville Skyttä) -- fixed void cDxr3Interface::SetAudioDigitalPCM() (Stephan Skrodzki) -- dxr3memcpy.c/h: fix to support older compilers like gcc-2.95 - (Christian Gmeiner, Marco Schlüßler) -- dxr3memcpy.c/h: should now compile on alpha and powerpc - (bug #1000647, Christian Gmeiner, Paavo Hartikainen) -- added many comments into source (Christian Gmeiner) -- using doxygen for docs (Christian Gmeiner) -- we get now videomode from driver and set only a new one, if the wanted - one is different from the driver's default one (Christian Gmeiner) -- added functions to read and write registers directly with the plugin - (Christian Gmeiner) -- added basic dolby digital interface (Christian Gmeiner) -- made path to microcode configurable in Makefile (Sascha Volkenandt) -- made log dir configurable in Makefile (Christian Gmeiner, Martin Dauskardt) - You may also want to search and remove files called "dxr3plugin.log" as the - old plugin wrote them into the current working directory. -- better default directories in Makefile (Christian Gmeiner, vdr-wiki.de folks) -- extended cDxr3MemcpyBench::Rdtsc(uint32_t config_flags): support for - non-x86 archs, support for cpu's, which dont support rdtsc timing - (Christian Gmeiner) -- logger is now thread safe (Christian Gmeiner) -- rewrote cDxr3SpuDecoder: dropped software decoder, added hardware decoder, - so we make use of DVD-functions of the dxr3 - (Christian Gmeiner, Marco Schlüßler) -- checked Lock() and Unlock() in dxr3interface.c - hope everything is ok - else contact me (Christian Gmeiner) -- use std:: instead of namespace std - (bug #1044069, Christian Gmeiner, Ville Skyttä) -- renamed dxr3interface_spu_encoder.h/c to dxr3spuencoder.h/c - (Christian Gmeiner) -- removed extra log commands in dxr3outputthread.c (Christian Gmeiner) -- fixed #includes: moved #include "dxr3osd.h" from dxr3interface.h to - dxr3interface.c, removed not needed #includes (Christian Gmeiner) -- fixed OSD getting pink (bug #1022810, Christian Gmeiner) -- added support for VDR 1.3.13 and later (Luca Olivetti, Peter Dittmann) -- fixed checking of return falues when opening the em8300-* fifos - (Christian Gmeiner, Ville Skyttä) -- removed explicit linking with zlib (Christian Gmeiner) -- compiles now with 3.4.x gcc's (Christian Gmeiner, Ville Skyttä) -- use $CXX for generating dependencies instead of hardcoded g++ (Ville Skyttä) -- added descriptions to audio and video output threads - (#1112673, Ville Skyttä) -- fixed audio and video thread deletion in demux device destructor - (#1112674, Ville Skyttä) -- made "all" the default target in Makefile (Ville Skyttä) -- assume SSE support implies MMXEXT support, this enables optimized - memcpy routines on more systems (Ville Skyttä) -- avoid hang in pause mode with VDR >= 1.3.18 (Luca Olivetti) -- avoid high CPU usage in pause mode (Luca Olivetti, Klaus Schmidinger) -- improved GetSTC(): fixes DVB subtitles sync problems (Mikko Tuumanen) -- fix PIC and AMD64 problems in the cpuid code, kudos to ffmpeg - (Ville Skyttä, Jon Burgess) -- eliminate some compiler warnings (Ville Skyttä) -- set aspect ratio and audio mode to unknown when releasing devices, fixes - the setup eg. after returning from the MPlayer plugin - (Luca Olivetti, Kimmo Vuorinen) -- avoid crashing with some corrupted streams (Jon Burgess) -- clean up dead code for old VDR versions that hasn't worked for some time - anyway, VDR >= 1.3.8 is now required (Ville Skyttä) -- added Italian, Spanish and Catalan translations (Luca Olivetti) -- don't override OSD's {Save,Restore}Region with dummies (Luca Olivetti) diff --git a/INSTALL b/INSTALL deleted file mode 100644 index 4ee2b07..0000000 --- a/INSTALL +++ /dev/null @@ -1,31 +0,0 @@ -------------------------------------------------------------------------------- -NOTE: This is the CVS HEAD version of the DXR3 plugin. It is currently not - ready for general consumption; for example OSD is missing. You - probably want to use the vdr-dxr3-0-2 branch instead. Check out that - branch with: - cvs -z3 -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/dxr3plugin \ - co -r vdr-dxr3-0-2 dxr3 -------------------------------------------------------------------------------- - -Prerequisites: - -- Get the DXR3 drivers from http://sourceforge.net/projects/dxr3 , - install, configure, test and verify the installation. -- Install the (latest) VDR developer version, or at least >= 1.3.8. -- The plugin needs the libavcodec library from http://ffmpeg.sourceforge.net/ - -Installation: - -- Get the latest dxr3-plugin version from - http://sourceforge.net/projects/dxr3plugin/ -- Unpack the package into "PLUGINS/SRC" directory. -- Make a symbolic link to this dxr3-plugin (ln -s vdr_dxr3_x.x.x dxr3). -- Check FFMDIR and EM8300 in Makefile. -- Check extra settings in Makefile: -DMICROCODE, -DLOGPATH -- Call "make plugins" in the VDR root directory. -- Make sure your DXR3 driver modules are loaded and ready to run. -- Start VDR with "vdr -Pdxr3". - -Supplemental patches: - -- See the patches/ directory. diff --git a/Makefile b/Makefile deleted file mode 100644 index 8454e52..0000000 --- a/Makefile +++ /dev/null @@ -1,102 +0,0 @@ -# -# Makefile for a Video Disk Recorder plugin -# -# $Id: Makefile,v 1.17 2005/04/19 17:28:35 scop Exp $ - -# The official name of this plugin. -# This name will be used in the '-P...' option of VDR to load the plugin. -# By default the main source file also carries this name. -# -PLUGIN = dxr3 - -### The version number of this plugin (taken from the main source file): - -VERSION = $(shell grep 'static const char \*VERSION *=' $(PLUGIN).c | awk '{ print $$6 }' | sed -e 's/[";]//g') - -### The C++ compiler and options: - -CXX = g++ -CXXFLAGS = -O2 -Wall -Woverloaded-virtual - -### The directory environment: - -DVBDIR = ../../../DVB -VDRDIR = ../../.. -LIBDIR = ../../lib -TMPDIR = /tmp -FFMDIR = /usr/local/include/ffmpeg -EM8300 = /usr/include - -### Allow user defined options to overwrite defaults: - --include $(VDRDIR)/Make.config - -### The version number of VDR (taken from VDR's "config.h"): - -VDRVERSION = $(shell grep 'define VDRVERSION ' $(VDRDIR)/config.h | awk '{ print $$3 }' | sed -e 's/"//g') - -### The name of the distribution archive: - -ARCHIVE = $(PLUGIN)-$(VERSION) -PACKAGE = $(shell echo vdr-$(ARCHIVE) | sed -e 's/cvs$$/cvs'`date +%Y%m%d`/) - -### Includes and Defines (add further entries here): - -INCLUDES += -I$(VDRDIR)/include -I$(DVBDIR)/include -I$(FFMDIR) -I$(EM8300) -LIBS = -L$(FFMDIR)/libavcodec -lavcodec -ljpeg -DEFINES += -DPLUGIN_NAME_I18N='"$(PLUGIN)"' -DEFINES += -DSOCKET_CHMOD=0660 -DEFINES += -D_GNU_SOURCE - -# where is the microcode for the dxr3 located? -DEFINES += -DMICROCODE=\"/usr/share/misc/em8300.uc\" - -# where should we write our log? -DEFINES += -DLOGPATH=\"/video/\" # note: path must end with / - -### The object files (add further files here): - -OBJS = $(PLUGIN).o dxr3multichannelaudio.o dxr3sysclock.o dxr3colormanager.o dxr3syncbuffer.o dxr3audiodecoder.o \ -dxr3blackframe.o dxr3palettemanager.o dxr3nextpts.o dxr3pesframe.o dxr3demuxdevice.o dxr3configdata.o \ -dxr3log.o dxr3ffmpeg.o dxr3spuencoder.o dxr3i18n.o \ -dxr3interface.o dxr3device.o dxr3outputthread.o dxr3osd.o dxr3osd_subpicture.o dxr3spudecoder.o dxr3unixserversocket.o \ -dxr3cpu.o dxr3memcpy.o dxr3dolbydigital.o - -### Default target: - -all: libvdr-$(PLUGIN).so - -### Implicit rules: - -%.o: %.c - $(CXX) $(CXXFLAGS) -c $(DEFINES) $(INCLUDES) $< - -# Dependencies: - -MAKEDEP = $(CXX) -MM -MG -DEPFILE = .dependencies -$(DEPFILE): Makefile - @$(MAKEDEP) $(DEFINES) $(INCLUDES) $(OBJS:%.o=%.c) > $@ - --include $(DEPFILE) - -### Targets: - -libvdr-$(PLUGIN).so: $(OBJS) - $(CXX) $(CXXFLAGS) -shared $(OBJS) $(LIBS) -o $@ - @cp $@ $(LIBDIR)/$@.$(VDRVERSION) - -dist: clean - @-rm -rf $(TMPDIR)/$(ARCHIVE) - @mkdir $(TMPDIR)/$(ARCHIVE) - @cp -a * $(TMPDIR)/$(ARCHIVE) - @tar czf $(PACKAGE).tgz -C $(TMPDIR) \ - --owner=root --group=root --exclude CVS $(ARCHIVE) - @-rm -rf $(TMPDIR)/$(ARCHIVE) - @echo Distribution package created as $(PACKAGE).tgz - -clean: - @-rm -f $(OBJS) $(DEPFILE) *.so *.tgz core* *~ \#* - -#indent: -# emacs -batch --eval '(dolist (file command-line-args-left) (progn (find-file file) (c-indent-region (point-min) (point-max)) (save-buffer)))' *.h *.c @@ -1,19 +0,0 @@ -This is a "plugin" for the Video Disk Recorder (VDR). - -Written by: Kai Moeller <dxr3_av@schluenss.de>, - Stefan Schluenss <dxr3_osd@schluenss.de>, - Christian Gmeiner <christian at visual-page.de>, - ...and numerous others, see CONTRIBUTORS. - -Project's home page: http://sourceforge.net/projects/dxr3plugin/ - -Mailing lists: http://sourceforge.net/mail/?group_id=112648 - -Latest version available at: See project home page - -Description: DXR3/Hollywood+ MPEG decoder card plugin which - allows using such a card as primary interface - for VDR. - -See the file COPYING for license information. -For installation instructions, see the file INSTALL. @@ -1,22 +0,0 @@ -* set bcs -* clean unneeded log entries -* stillpicture -* grab screenshot -* add much more comments! -* rewrite some parts of plugin like - - demuxer - - palettemanger - - colormanger - - spuencoder -* osd via - - ffmpeg - - vga overlay - -* optimize (is it worth it?) - Rgb2YCrCb - YUV2Rgb - -* look at following parts - - dxr3unixserversocket - -* check VCD Plugin @@ -1,457 +0,0 @@ -/* -* dxr3.c: A plugin for the Video Disk Recorder -* -* See the README file for copyright information and how to reach the author. -* -* $Id: dxr3.c,v 1.7 2005/05/28 10:10:52 scop Exp $ -*/ - - -#include "dxr3vdrincludes.h" -#include "dxr3device.h" -#include "dxr3syncbuffer.h" -#include "dxr3configdata.h" -#include "dxr3interface.h" -#include "dxr3i18n.h" -#include "dxr3cpu.h" -#include "dxr3dolbydigital.h" -#include "dxr3.h" - -static const char *VERSION = "0.3.0-cvs"; -static const char *DESCRIPTION = "Hardware MPEG decoder"; -static const char *MAINMENUENTRY = "DXR3"; - -#if VDRVERSNUM && VDRVERSNUM < 10308 -#error "This version of the DXR3 plugin needs VDR version >= 1.3.8" -#endif - -// ================================== -// 'message-handler' for the main screen -eOSState cDxr3OsdItem::ProcessKey(eKeys Key) -{ - if (Key == kOk) - { - switch (m_item) - { - case DXR3_RESET_HARDWARE: - cDxr3Interface::Instance().ResetHardware(); - cDxr3Device::Instance().Reset(); - break; - - case DXR3_FORCE_LETTER_BOX: - cDxr3ConfigData::Instance().SetForceLetterBox(!cDxr3ConfigData::Instance().GetForceLetterBox()); - break; - - case DXR3_ANALOG_OUT: - cLog::Instance() << "Changing audio to analog\n"; - cDxr3ConfigData::Instance().SetUseDigitalOut(0); - cDxr3ConfigData::Instance().SetAc3OutPut(0); - cDxr3Device::Instance().Reset(); - break; - - case DXR3_DIGITAL_OUT: - cLog::Instance() << "Changing audio to digital\n"; - cDxr3ConfigData::Instance().SetUseDigitalOut(1); - cDxr3ConfigData::Instance().SetAc3OutPut(0); - cDxr3Device::Instance().Reset(); - break; - - case DXR3_AC3_OUT: - cLog::Instance() << "Changing audio to ac3\n"; - cDxr3ConfigData::Instance().SetAc3OutPut(!cDxr3ConfigData::Instance().GetAc3OutPut()); - cDxr3Device::Instance().Reset(); - break; - } - } - - return Key == kOk ? osBack : cOsdItem::ProcessKey(Key); -} - -// ================================== -// special osd item to change color settings -cDxr3OsdColorItem::cDxr3OsdColorItem(const char* Name, eDxr3ColorItem item) -:cMenuEditItem(Name), m_item(item) -{ - m_value = 0; - m_min = 0; - m_max = 32; - - // get vale from setup.conf - switch (m_item) - { - case DXR3_BRIGHTNESS: - m_value = cDxr3ConfigData::Instance().GetBrightness(); - break; - - case DXR3_CONTRAST: - m_value = cDxr3ConfigData::Instance().GetContrast(); - break; - - case DXR3_SATURATION: - m_value = cDxr3ConfigData::Instance().GetSaturation(); - break; - }; - - Set(); -} - -// ================================== -// react to keypresses -eOSState cDxr3OsdColorItem::ProcessKey(eKeys Key) -{ - eOSState state = cMenuEditItem::ProcessKey(Key); - - if (state == osUnknown) - { - int newValue = m_value; - Key = NORMALKEY(Key); - switch (Key) - { - case kNone: break; - case k0 ... k9: - if (fresh) - { - m_value = 0; - fresh = false; - } - newValue = m_value * 10 + (Key - k0); - break; - case kLeft: // TODO might want to increase the delta if repeated quickly? - newValue = m_value - 1; - fresh = true; - break; - case kRight: - newValue = m_value + 1; - fresh = true; - break; - default: - if (m_value < m_min) { m_value = m_min; Set(); } - if (m_value > m_max) { m_value = m_max; Set(); } - return state; - } - if ((!fresh || m_min <= newValue) && newValue <= m_max) - { - m_value = newValue; - Set(); - } - state = osContinue; - } - return state; -} - -// ================================== -// set caption and call hardware ioctl's -void cDxr3OsdColorItem::Set() -{ - // real value with rounding - int realValue = int(m_value * 31.25); - - char buf[16]; - snprintf(buf, sizeof(buf), "%s", "Hallo"); - SetValue(buf); -} - -/* -// ================================== -// special osd item to change color settings -cDxr3OsdColorItem::cDxr3OsdColorItem(const char* Name, eDxr3ColorItem item) -:cOsdItem(Name), m_item(item) -{ - // get vale from setup.conf - switch (m_item) - { - case DXR3_BRIGHTNESS: - m_value = cDxr3ConfigData::Instance().GetBrightness(); - break; - - case DXR3_CONTRAST: - m_value = cDxr3ConfigData::Instance().GetContrast(); - break; - - case DXR3_SATURATION: - m_value = cDxr3ConfigData::Instance().GetSaturation(); - break; - }; - - // allowed values: 0 - 32 - m_min = 0; - m_max = 32; - - m_name = strdup(Name); - m_caption = NULL; - - Set(); -} - -// ================================== -// set caption and call hardware ioctl's -void cDxr3OsdColorItem::Set() -{ -/* - SetValue(SettingBar[m_value]); - - // real value with rounding - int realValue = int(m_value * 31.25); - - switch (m_item) - { - case DXR3_BRIGHTNESS: - cDxr3Interface::Instance().SetBrightness(realValue); - cDxr3ConfigData::Instance().SetBrightness(m_value); - break; - - case DXR3_CONTRAST: - cDxr3Interface::Instance().SetContrast(realValue); - cDxr3ConfigData::Instance().SetContrast(m_value); - break; - - case DXR3_SATURATION: - cDxr3Interface::Instance().SetSaturation(realValue); - cDxr3ConfigData::Instance().SetSaturation(m_value); - break; - }; -*//* -} - -// ================================== -void cDxr3OsdColorItem::SetValue(const char *Value) -{ -/* - free(m_caption); - m_caption = strdup(Value); - char *buffer = NULL; - asprintf(&buffer, "%s:\t%s", m_name, m_caption); - SetText(buffer, false); - cStatus::MsgOsdCurrentItem(buffer); -*//* -} - -// ================================== -// react to keypresses -eOSState cDxr3OsdColorItem::ProcessKey(eKeys Key) -{ -/* - eOSState state = osUnknown; - - if (state == osUnknown) - { - int newValue = m_value; - Key = NORMALKEY(Key); - - switch (Key) - { - case kNone: - break; - - case k0 ... k9: - if (fresh) - { - m_value = 0; - fresh = false; - } - newValue = m_value * 10 + (Key - k0); - break; - - case kLeft: // TODO might want to increase the delta if repeated quickly? - newValue = m_value - 1; - fresh = true; - break; - - case kRight: - newValue = m_value + 1; - fresh = true; - break; - - default: - if (m_value < m_min) { m_value = m_min; Set(); } - if (m_value > m_max) { m_value = m_max; Set(); } - return state; - } - - if ((!fresh || m_min <= newValue) && newValue <= m_max) - { - m_value = newValue; - Set(); - } - state = osContinue; - } - return state; -*/ -//} - - -// ================================== -// the main menu of the plugin -cDxr3OsdMenu::cDxr3OsdMenu() : cOsdMenu(tr("DXR3 Adjustment")) -{ - b = 0; - c = 10; - s = 0; - - Clear(); - SetHasHotkeys(); - Add(new cDxr3OsdItem(tr("Reset DXR3 hardware"), DXR3_RESET_HARDWARE)); - Add(new cDxr3OsdItem(tr("Toggle force letterbox"), DXR3_FORCE_LETTER_BOX)); - - // switch between differen output modes - if (cDxr3ConfigData::Instance().GetUseDigitalOut()) - { - Add(new cDxr3OsdItem(tr("Switch to analog audio output"), DXR3_ANALOG_OUT)); - } - else - { - Add(new cDxr3OsdItem(tr("Switch to digital audio output"), DXR3_DIGITAL_OUT)); - } - - //SettingBar - Add(new cDxr3OsdColorItem(tr("Brightness"), DXR3_BRIGHTNESS)); -// Add(new cMenuEditStraItem(tr("Brightness"), &b, 33, SettingBar)); -// Add(new cMenuEditStraItem(tr("Contrast"), &c, 33, SettingBar)); -// Add(new cMenuEditStraItem(tr("Saturation"), &s, 33, SettingBar)); -} - - -// ================================== -// setup menu -cMenuSetupDxr3::cMenuSetupDxr3(void) -{ - newUseDigitalOut = cDxr3ConfigData::Instance().GetUseDigitalOut(); - Add(new cMenuEditBoolItem(tr("Digital audio output"), &newUseDigitalOut)); - newDxr3Card = cDxr3ConfigData::Instance().GetDxr3Card(); - Add(new cMenuEditIntItem(tr("Card number"), &newDxr3Card)); - newVideoMode = (int) cDxr3ConfigData::Instance().GetVideoMode(); - menuVideoModes[0] = tr("PAL"); - menuVideoModes[1] = tr("PAL60"); - menuVideoModes[2] = tr("NTSC"); - Add(new cMenuEditStraItem(tr("Video mode"), &newVideoMode, 3, menuVideoModes)); - newDebug = (int) cDxr3ConfigData::Instance().GetDebug(); - Add(new cMenuEditBoolItem(tr("Debug mode"), &newDebug)); - newDebugLevel = (int) cDxr3ConfigData::Instance().GetDebugLevel(); - menuDebugModes[0] = tr("low"); - menuDebugModes[1] = tr("everything"); - Add(new cMenuEditStraItem(tr("Debug level"), &newDebugLevel, 2, menuDebugModes)); -} - -// ================================== -// save menu values -void cMenuSetupDxr3::Store(void) -{ - SetupStore("UseDigitalOut", cDxr3ConfigData::Instance().SetUseDigitalOut(newUseDigitalOut)); - SetupStore("Dxr3Card", cDxr3ConfigData::Instance().SetDxr3Card(newDxr3Card)); - SetupStore("Dxr3VideoMode", cDxr3ConfigData::Instance().SetVideoMode((eVideoMode) newVideoMode)); - SetupStore("Dxr3Debug", cDxr3ConfigData::Instance().SetDebug(newDebug)); - SetupStore("Dxr3DebugLevel", cDxr3ConfigData::Instance().SetDebugLevel(newDebugLevel)); -} - -// ================================== -class cPluginDxr3 : public cPlugin -{ -private: - // Add any member variables or functions you may need here. -public: - cPluginDxr3(); - ~cPluginDxr3(); - const char *Version() { return VERSION; } - const char *Description() { return tr(DESCRIPTION); } - const char *CommandLineHelp(); - bool ProcessArgs(int argc, char *argv[]); - bool Initialize(); - bool Start(); - void Housekeeping(); - cMenuSetupPage *SetupMenu(); - bool SetupParse(const char *Name, const char *Value); - const char* MainMenuEntry(); - cOsdObject* MainMenuAction(); -}; - -// ================================== -cPluginDxr3::cPluginDxr3() -{ - // Initialize any member varaiables here. - // DON'T DO ANYTHING ELSE THAT MAY HAVE SIDE EFFECTS, REQUIRE GLOBAL - // VDR OBJECTS TO EXIST OR PRODUCE ANY OUTPUT! - cDxr3ConfigData::Instance(); -} - -// ================================== -cPluginDxr3::~cPluginDxr3() -{ -} - -// ================================== -const char *cPluginDxr3::CommandLineHelp() -{ - return NULL; -} - -// ================================== -bool cPluginDxr3::ProcessArgs(int argc, char *argv[]) -{ - return true; -} - -// ================================== -bool cPluginDxr3::Start() -{ - new cDxr3DolbyDigital(); - return true; -} - -// ================================== -bool cPluginDxr3::Initialize() -{ - RegisterI18n(Phrases); - - new cDxr3CPU(); - cDxr3Device::Instance(); - - return true; -} - -// ================================== -void cPluginDxr3::Housekeeping() -{ -} - -// ================================== -cMenuSetupPage* cPluginDxr3::SetupMenu() -{ - return new cMenuSetupDxr3(); -} - -// ================================== -bool cPluginDxr3::SetupParse(const char *Name, const char *Value) -{ - // Parse your own setup parameters and store their values. - if (!strcasecmp(Name, "UseDigitalOut")) { cDxr3ConfigData::Instance().SetUseDigitalOut(atoi(Value)); return true; } - if (!strcasecmp(Name, "Dxr3Card")) { cDxr3ConfigData::Instance().SetDxr3Card(atoi(Value)); return true; } - if (!strcasecmp(Name, "Dxr3Debug")) { cDxr3ConfigData::Instance().SetDebug(atoi(Value)); return true; } - if (!strcasecmp(Name, "Dxr3VideoMode")) { cDxr3ConfigData::Instance().SetVideoMode((eVideoMode) atoi(Value)); return true;} - if (!strcasecmp(Name, "Dxr3DebugLevel")) { cDxr3ConfigData::Instance().SetDebugLevel(atoi(Value)); return true;} - if (!strcasecmp(Name, "Dxr3Contrast")) { cDxr3ConfigData::Instance().SetContrast(atoi(Value)); return true;} - if (!strcasecmp(Name, "Dxr3Brightness")) { cDxr3ConfigData::Instance().SetBrightness(atoi(Value)); return true;} - if (!strcasecmp(Name, "Dxr3Saturation")) { cDxr3ConfigData::Instance().SetSaturation(atoi(Value)); return true;} - - return false; -} - -// ================================== -const char* cPluginDxr3::MainMenuEntry() -{ - return tr(MAINMENUENTRY); -} - -// ================================== -cOsdObject* cPluginDxr3::MainMenuAction() -{ - return new cDxr3OsdMenu; -} - -VDRPLUGINCREATOR(cPluginDxr3); // Don't touch this! - -// Local variables: -// mode: c++ -// c-file-style: "stroustrup" -// c-file-offsets: ((inline-open . 0)) -// indent-tabs-mode: t -// End: @@ -1,158 +0,0 @@ -#ifndef _DXR3_H_ -#define _DXR3_H_ - -// color setting bar -static const char *SettingBar[] = -{ - "[................................]", - "[|...............................]", - "[||..............................]", - "[|||.............................]", - "[||||............................]", - "[|||||...........................]", - "[||||||..........................]", - "[|||||||.........................]", - "[||||||||........................]", - "[|||||||||.......................]", - "[||||||||||......................]", - "[|||||||||||.....................]", - "[||||||||||||....................]", - "[|||||||||||||...................]", - "[||||||||||||||..................]", - "[|||||||||||||||.................]", - "[||||||||||||||||................]", - "[|||||||||||||||||...............]", - "[||||||||||||||||||..............]", - "[|||||||||||||||||||.............]", - "[||||||||||||||||||||............]", - "[|||||||||||||||||||||...........]", - "[||||||||||||||||||||||..........]", - "[|||||||||||||||||||||||.........]", - "[||||||||||||||||||||||||........]", - "[|||||||||||||||||||||||||.......]", - "[||||||||||||||||||||||||||......]", - "[|||||||||||||||||||||||||||.....]", - "[||||||||||||||||||||||||||||....]", - "[|||||||||||||||||||||||||||||...]", - "[||||||||||||||||||||||||||||||..]", - "[|||||||||||||||||||||||||||||||.]" - "[||||||||||||||||||||||||||||||||]" // 32 x | -}; - -// ================================== -// setup screen -class cMenuSetupDxr3 : public cMenuSetupPage -{ -public: - cMenuSetupDxr3(); - -protected: - virtual void Store(); - -private: - int newUseDigitalOut; - int newDxr3Card; - int newVideoMode; - int newDebug; - int newDebugLevel; - const char *menuVideoModes[3]; - const char *menuDebugModes[2]; -}; - - -// ================================== -enum eDxr3OsdItem -{ - DXR3_RESET_HARDWARE, - DXR3_FORCE_LETTER_BOX, - DXR3_DIGITAL_OUT, - DXR3_ANALOG_OUT, - DXR3_AC3_OUT -}; - -// ================================== -enum eDxr3ColorItem -{ - DXR3_BRIGHTNESS, - DXR3_CONTRAST, - DXR3_SATURATION -}; - -// ================================== -// osd item -class cDxr3OsdItem : public cOsdItem -{ -public: - cDxr3OsdItem(const char* text, eDxr3OsdItem item) : cOsdItem(text), m_item(item) {} - - // process fb input - eOSState ProcessKey(eKeys Key); - -protected: - eDxr3OsdItem m_item; -}; - -// ================================== -// used to change color settings -class cDxr3OsdColorItem : public cMenuEditItem -{ -public: - cDxr3OsdColorItem(const char* text, eDxr3ColorItem item); - virtual eOSState ProcessKey(eKeys Key); - -protected: - eDxr3ColorItem m_item; - int m_value; - int m_min; - int m_max; - - virtual void Set(); -}; - -/* -// ================================== -// used to change color settings -class cDxr3OsdColorItem : public cOsdItem//cMenuEditItem -{ -public: - cDxr3OsdColorItem(const char* text, eDxr3ColorItem item); - - cDxr3OsdColorItem::~cDxr3OsdColorItem() - { - free(m_name); - free(m_caption); - } - - eOSState ProcessKey(eKeys Key); - -protected: - eDxr3ColorItem m_item; - int m_value; - int m_min; - int m_max; - char* m_caption; - char* m_name; - - void Set(); - void SetValue(const char *Value); -}; -*/ - -// ================================== -// main screen -class cDxr3OsdMenu : public cOsdMenu -{ -public: - cDxr3OsdMenu(); - - int b,c,s; -}; - -#endif /*_DXR3_H_*/ - -// Local variables: -// mode: c++ -// c-file-style: "stroustrup" -// c-file-offsets: ((inline-open . 0)) -// indent-tabs-mode: t -// End: diff --git a/dxr3audiodecoder.c b/dxr3audiodecoder.c deleted file mode 100644 index 94bdb4e..0000000 --- a/dxr3audiodecoder.c +++ /dev/null @@ -1,302 +0,0 @@ -/* - * dxr3audiodecoder.c - * - * Copyright (C) 2002-2004 Kai Möller - * Copyright (C) 2004 Christian Gmeiner - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation; either version 2.1 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - */ - - -/* -ToDo: - - cDxr3AudioDecoder::Init: Why are we always reinit the codec? -*/ - - -#include <stdio.h> -#include "dxr3audiodecoder.h" -#include "dxr3pesframe.h" - -// ================================== -const int cLPCM_HEADER_LENGTH = 7; - -// ================================== -//! constructor -cDxr3AudioDecoder::cDxr3AudioDecoder() : m_RBuf(50000), m_AC3dtsDecoder(&m_RBuf) -{ - // default start values - m_DecoderOpened = false; - m_AudioSynched = false; - m_Volume = 255; - m_Codec.id = CODEC_ID_MP2; - - Init(); - - // setuo our header - m_LastHeader[0] = 0xFF; - m_LastHeader[1] = m_LastHeader[2] = m_LastHeader[3] = 0; -}; - -// ================================== -//! deconst. -cDxr3AudioDecoder::~cDxr3AudioDecoder() -{ - // close codec, if it is open - cDxr3Ffmepg::Instance().CloseCodec(m_Codec); -}; - -// ================================== -//! (re)init ffmpeg codec -void cDxr3AudioDecoder::Init() -{ - // (re)init codec - cDxr3Ffmepg::Instance().CloseCodec(m_Codec); - if (cDxr3Ffmepg::Instance().FindCodec(m_Codec)) - { - cDxr3Ffmepg::Instance().OpenCodec(m_Codec); - m_Rate = m_Channels = -1; - m_FrameSize = m_Codec.codec_context.frame_size; - m_DecoderOpened = true; - m_FoundHeader = false; - m_DecodeAudio = true; - } - else - { - m_DecoderOpened = false; - } -} - -// ================================== -//! decode given buffer -void cDxr3AudioDecoder::Decode(const uint8_t* buf, int length, uint32_t pts, cDxr3SyncBuffer &aBuf) -{ - if (!m_DecoderOpened) - { - // No decoder is open, so it - // is better to stop here. - return; - } - - int len; - int out_size; - - enum audioException - { - WRONG_LENGTH, - UNEXPECTED_PARAMETER_CHANGE - }; - - int i = 0; - for (i = 0; i < length-4 && !m_FoundHeader; i++) - { - unsigned int tempHead = *((unsigned int*)(buf+i)); - if (HeadCheck(tempHead)) - { - if ((buf[i+2] & 0xFC) != (m_LastHeader[2] & 0xFC)) - { - cLog::Instance() << "cDxr3AudioDecoder::Decode Found different audio header -> init\n"; - cLog::Instance() << "cDxr3AudioDecoder::Decode Old header 0x" << std::hex << *((uint32_t*) m_LastHeader) << " new header 0x" << *((uint32_t*) (buf+i)) << std::dec << "\n"; - - Init(); - m_LastHeader[0] = buf[i]; - m_LastHeader[1] = buf[i+1]; - m_LastHeader[2] = buf[i+2]; - m_LastHeader[3] = buf[i+3]; - } - m_FoundHeader = true; - } - } - - if (m_AudioSynched) - { - // no header found - m_DecodeAudio = true; - } - else - { - if (m_FoundHeader && pts) - { - m_DecodeAudio = true; - m_AudioSynched = true; - } - } - - try - { - while (length > 0 && m_DecodeAudio) - { - len = avcodec_decode_audio(&m_Codec.codec_context, (short *)(&m_PcmBuf), &out_size, - const_cast<uint8_t *>(buf), length); - if (len < 0 || out_size < 0) throw WRONG_LENGTH; - - if (m_Codec.codec_context.sample_rate != m_Rate) - { - cLog::Instance() << "cDxr3AudioDecoder::Decode Sample rate = " << m_Codec.codec_context.sample_rate << "\n"; - if (m_Rate != -1) throw UNEXPECTED_PARAMETER_CHANGE; - m_Rate = m_Codec.codec_context.sample_rate; - } - if (m_Codec.codec_context.channels != m_Channels+1 ) - { - if (m_Channels != -1) throw UNEXPECTED_PARAMETER_CHANGE; - m_Channels = (m_Codec.codec_context.channels == 2) ? 1 : 0; - cLog::Instance() << "cDxr3AudioDecoder::Decode channels = " << m_Codec.codec_context.channels << "\n"; - } - if (out_size) - { - cFixedLengthFrame* pTempFrame = aBuf.Push(m_PcmBuf, out_size, pts); - pTempFrame->SetChannelCount(m_Channels); - pTempFrame->SetDataRate(m_Rate); - } - length -= len; - buf += len; - } - } - catch (audioException ex) - { - switch (ex) - { - case WRONG_LENGTH: - cLog::Instance() << "cDxr3AudioDecoder::Decode wrong length\n"; - break; - - case UNEXPECTED_PARAMETER_CHANGE: - cLog::Instance() << "cDxr3AudioDecoder::Decode unexpected parameter change\n"; - break; - - default: - cLog::Instance() << "cDxr3AudioDecoder::Decode unexpeced exception\n"; - break; - } - dsyslog("cDxr3AudioDecoder::Decode skipping %d broken data bytes", length); - - Init(); - } -} - -// ================================== -//! decode lpcm -void cDxr3AudioDecoder::DecodeLpcm(const uint8_t* buf, int length, uint32_t pts, cDxr3SyncBuffer &aBuf) -{ - if (length > (cLPCM_HEADER_LENGTH + 2)) - { - uint8_t* pFrame = new uint8_t[length - cLPCM_HEADER_LENGTH]; - assert(!((length - cLPCM_HEADER_LENGTH) % 2)); // only even number of bytes are allowed - - for (int i = cLPCM_HEADER_LENGTH; i < length; i += 2) - { - pFrame[i - cLPCM_HEADER_LENGTH] = buf[i + 1]; - pFrame[i - cLPCM_HEADER_LENGTH + 1] = buf[i]; - } - - int codedSpeed = (buf[5] >> 4) & 0x03; - int speed = 0; - - switch (codedSpeed) - { - case 1: - speed = 96000; - break; - - case 2: - speed = 44100; - break; - - case 3: - speed = 32000; - break; - - default: - speed = 48000; - break; - } - - cFixedLengthFrame* pTempFrame = aBuf.Push(pFrame, length - cLPCM_HEADER_LENGTH, pts); - pTempFrame->SetChannelCount(1); - pTempFrame->SetDataRate(speed); - - delete[] pFrame; - } -} - -// ================================== -//! decode ac3 -void cDxr3AudioDecoder::DecodeAc3Dts(const uint8_t* pPes, const uint8_t* buf, int length, uint32_t pts, cDxr3SyncBuffer &aBuf) -{ - int headerLength = (int) (buf - pPes); - - uint8_t* pBuf = (uint8_t*) pPes; - m_AC3dtsDecoder.Check(pBuf + headerLength, length, pBuf); - m_AC3dtsDecoder.Encapsulate(pBuf + headerLength, length); - - cFrame* pFrame = 0; - while ((pFrame = m_RBuf.Get())) - { - if (pFrame && pFrame->Count()) - { - cDxr3PesFrame tempPes; - tempPes.ExtractNextFrame(pFrame->Data(), pFrame->Count()); - int pesHeaderLength = (int) (tempPes.GetEsStart() - tempPes.GetPesStart()); - uint8_t* pData = pFrame->Data() + pesHeaderLength + cLPCM_HEADER_LENGTH; - - for (int i = 0; i < pFrame->Count() - pesHeaderLength - cLPCM_HEADER_LENGTH; i += 2) - { - std::swap(pData[i], pData[i + 1]); - } - - aBuf.Push(pFrame->Data() + pesHeaderLength + cLPCM_HEADER_LENGTH, pFrame->Count() - pesHeaderLength - 7, tempPes.GetPts()); - if (pFrame) m_RBuf.Drop(pFrame); - } - } -} - -// ================================== -//! checking routine -bool cDxr3AudioDecoder::HeadCheck(unsigned long head) -{ - bool retval = false; - - uint8_t* phead = (uint8_t*) (&head); - if (phead[0] != 0xFF) - { - retval = false; - } - else if (phead[1] != 0xFC && phead[1] != 0xFE) - { - retval = false; - } - else if ((phead[2] & 0xF0) == 0xF0) - { - retval = false; - } - else if ((phead[2] & 0xC) == 0xC) - { - retval = false; - } - else - { - retval = true; - } - - return retval; -} - -// Local variables: -// mode: c++ -// c-file-style: "stroustrup" -// c-file-offsets: ((inline-open . 0)) -// indent-tabs-mode: t -// End: diff --git a/dxr3audiodecoder.h b/dxr3audiodecoder.h deleted file mode 100644 index 6519fac..0000000 --- a/dxr3audiodecoder.h +++ /dev/null @@ -1,87 +0,0 @@ -/* - * dxr3audiodecoder.h - * - * Copyright (C) 2002-2004 Kai Möller - * Copyright (C) 2004 Christian Gmeiner - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation; either version 2.1 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - */ - -#ifndef _DXR3_AUDIODECODER_H_ -#define _DXR3_AUDIODECODER_H_ - -#include <stdlib.h> -#include <stdint.h> - -#include "dxr3ffmpeg.h" -#include "dxr3syncbuffer.h" -#include "dxr3multichannelaudio.h" -#include "dxr3log.h" - -// ================================== -//! Decode given audiostream in usable audioformat -/*! - Here we can decode lpcm, ac3 and pcm to useable - bitstream for ffmpeg. ffmpeg will convert - the datastream into mp2. -*/ -class cDxr3AudioDecoder -{ -public: - cDxr3AudioDecoder(); - ~cDxr3AudioDecoder(); - - void Init(); - - void Decode(const uint8_t* buf, int length, uint32_t pts, cDxr3SyncBuffer &aBuf); - void DecodeLpcm(const uint8_t* buf, int length, uint32_t pts, cDxr3SyncBuffer &aBuf); - void DecodeAc3Dts(const uint8_t* pPes, const uint8_t* buf, int length, uint32_t pts, cDxr3SyncBuffer &aBuf); - - int GetRate() const { return m_Rate; } - int GetChannelCount() const { return m_Channels; } - int GetFrameSize() const { return m_FrameSize; } - void Reset() { m_AC3dtsDecoder.Clear(); m_RBuf.Clear(); } - -private: - bool HeadCheck(unsigned long head); - - struct Dxr3Codec m_Codec; - - cRingBufferFrame m_RBuf; - cMultichannelAudio m_AC3dtsDecoder; - - bool m_AudioSynched; - bool m_DecoderOpened; - uint8_t m_LastHeader[4]; - int m_Rate; - int m_Channels; - uint32_t m_FrameSize; - uint8_t m_PcmBuf[AVCODEC_MAX_AUDIO_FRAME_SIZE]; - int m_Volume; - bool m_FoundHeader; - bool m_DecodeAudio; - - cDxr3AudioDecoder(cDxr3AudioDecoder&); // no copy constructor -}; - -#endif /*_DXR3_AUDIODECODER_H_*/ - -// Local variables: -// mode: c++ -// c-file-style: "stroustrup" -// c-file-offsets: ((inline-open . 0)) -// indent-tabs-mode: t -// End: diff --git a/dxr3blackframe.c b/dxr3blackframe.c deleted file mode 100644 index 0a24a5e..0000000 --- a/dxr3blackframe.c +++ /dev/null @@ -1,1293 +0,0 @@ -/* - * dxr3blackframe.c - * - * Copyright (C) 2002-2004 Kai Möller - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation; either version 2.1 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - */ - -// ================================== -//! used when channel gets switched -char blackframe[] = - -{ 0x0, 0x0, 0x1, 0xb3, 0x2d, 0x2, 0x40, 0x23, 0x24, 0x9f, 0x23, 0x82, 0x10, 0x20, 0x20, 0x26, -0x20, 0x26, 0x2c, 0x2c, 0x2c, 0x2c, 0x2c, 0x2c, 0x34, 0x30, 0x34, 0x36, 0x36, 0x36, 0x34, -0x34, 0x34, 0x34, 0x36, 0x36, 0x36, 0x3a, 0x3a, 0x3a, 0x44, 0x44, 0x44, 0x3a, 0x3a, 0x3a, -0x36, 0x36, 0x3a, 0x3a, 0x40, 0x40, 0x44, 0x44, 0x4a, 0x4c, 0x4a, 0x46, 0x46, 0x44, 0x46, -0x4c, 0x4c, 0x50, 0x50, 0x50, 0x60, 0x60, 0x5c, 0x5c, 0x70, 0x70, 0x74, 0x8a, 0x8a, 0xa7, -0x10, 0x11, 0x11, 0x12, 0x12, 0x12, 0x13, 0x13, 0x13, 0x13, 0x14, 0x14, 0x14, 0x14, 0x14, -0x15, 0x15, 0x15, 0x15, 0x15, 0x15, 0x16, 0x16, 0x16, 0x16, 0x16, 0x16, 0x16, 0x17, 0x17, -0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x18, 0x18, 0x18, 0x19, 0x18, 0x18, 0x18, 0x19, 0x1a, -0x1a, 0x1a, 0x1a, 0x19, 0x1b, 0x1b, 0x1b, 0x1b, 0x1b, 0x1c, 0x1c, 0x1c, 0x1c, 0x1e, 0x1e, -0x1e, 0x1f, 0x1f, 0x21, 0x0, 0x0, 0x1, 0xb5, 0x14, 0x82, 0x0, 0x1, 0x0, 0x0, 0x0, -0x0, 0x1, 0xb8, 0x5a, 0x9, 0xc4, 0x80, 0x0, 0x0, 0x1, 0x0, 0x0, 0x4b, 0x9, 0xb0, -0x0, 0x0, 0x1, 0xb5, 0x8f, 0xff, 0xf7, 0x98, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, -0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0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, 0xd1, -0xa3, 0x46, 0x8c, 0x30, 0xda, 0x34, 0x68, 0xd1, 0x86, 0x1b, 0x46, 0x8d, 0x1a, 0x30, 0xc3, -0x68, 0xd1, 0xa3, 0x46, 0x18, 0x6d, 0x1a, 0x34, 0x68, 0xc3, 0xd, 0xa3, 0x46, 0x8d, 0x18, -0x61, 0xb4, 0x68, 0xd1, 0xa3, 0xc, 0x36, 0x8d, 0x1a, 0x34, 0x61, 0x86, 0xd1, 0xa3, 0x46, -0x8c, 0x30, 0xda, 0x34, 0x68, 0xd1, 0x86, 0x1b, 0x46, 0x8d, 0x1a, 0x30, 0xc3, 0x68, 0xd1, -0xa3, 0x46, 0x18, 0x6d, 0x1a, 0x34, 0x68, 0xc3, 0xd, 0xa3, 0x46, 0x8d, 0x18, 0x61, 0xb4, -0x68, 0xd1, 0xa3, 0xc, 0x36, 0x8d, 0x1a, 0x34, 0x61, 0x86, 0xd1, 0xa3, 0x46, 0x8c, 0x30, -0xda, 0x34, 0x68, 0xd1, 0x86, 0x1b, 0x46, 0x8d, 0x1a, 0x30, 0xc3, 0x68, 0xd1, 0xa3, 0x46, -0x18, 0x6d, 0x1a, 0x34, 0x68, 0xc3, 0xd, 0xa3, 0x46, 0x8d, 0x18, 0x61, 0xb4, 0x68, 0xd1, -0xa3, 0xc, 0x36, 0x8d, 0x1a, 0x34, 0x61, 0x86, 0xd1, 0xa3, 0x46, 0x8c, 0x30, 0xda, 0x34, -0x68, 0xd1, 0x86, 0x1b, 0x46, 0x8d, 0x1a, 0x30, 0xc3, 0x68, 0xd1, 0xa3, 0x46, 0x18, 0x6d, -0x1a, 0x34, 0x68, 0xc3, 0xd, 0xa3, 0x46, 0x8d, 0x18, 0x61, 0xb4, 0x68, 0xd1, 0xa3, 0xc, -0x36, 0x8d, 0x1a, 0x34, 0x61, 0x86, 0xd1, 0xa3, 0x46, 0x8c, 0x30, 0xda, 0x34, 0x68, 0xd1, -0x86, 0x1b, 0x46, 0x8d, 0x1a, 0x30, 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x34, 0x68, 0xd1, 0x86, 0x1b, 0x46, 0x8d, 0x1a, 0x30, 0xc3, 0x68, 0xd1, 0xa3, 0x46, -0x18, 0x6d, 0x1a, 0x34, 0x68, 0xc3, 0xd, 0xa3, 0x46, 0x8d, 0x18, 0x61, 0xb4, 0x68, 0xd1, -0xa3, 0xc, 0x36, 0x8d, 0x1a, 0x34, 0x61, 0x86, 0xd1, 0xa3, 0x46, 0x8c, 0x30, 0xda, 0x34, -0x68, 0xd1, 0x86, 0x1b, 0x46, 0x8d, 0x1a, 0x30, 0xc3, 0x68, 0xd1, 0xa3, 0x46, 0x18, 0x6d, -0x1a, 0x34, 0x68, 0xc3, 0xd, 0xa3, 0x46, 0x8d, 0x18, 0x61, 0xb4, 0x68, 0xd1, 0xa3, 0xc, -0x36, 0x8d, 0x1a, 0x34, 0x61, 0x86, 0xd1, 0xa3, 0x46, 0x8c, 0x30, 0xda, 0x34, 0x68, 0xd1, -0x86, 0x1b, 0x46, 0x8d, 0x1a, 0x30, 0xc3, 0x68, 0xd1, 0xa3, 0x46, 0x18, 0x6d, 0x1a, 0x34, -0x68, 0xc3, 0xd, 0xa3, 0x46, 0x8d, 0x18, 0x61, 0xb4, 0x68, 0xd1, 0xa3, 0xc, 0x36, 0x8d, -0x1a, 0x34, 0x61, 0x86, 0xd1, 0xa3, 0x46, 0x8c, 0x30, 0xda, 0x34, 0x68, 0xd1, 0x86, 0x1b, -0x46, 0x8d, 0x1a, 0x30, 0xc3, 0x68, 0xd1, 0xa3, 0x46, 0x18, 0x6d, 0x1a, 0x34, 0x68, 0xc3, -0xd, 0xa3, 0x46, 0x8d, 0x18, 0x61, 0xb4, 0x68, 0xd1, 0xa3, 0xc, 0x36, 0x8d, 0x1a, 0x34, -0x61, 0x86, 0xd1, 0xa3, 0x46, 0x8c, 0x30, 0xda, 0x34, 0x68, 0xd1, 0x86, 0x1b, 0x46, 0x8d, -0x1a, 0x30, 0xc3, 0x68, 0xd1, 0xa3, 0x46, 0x18, 0x6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0xd, 0xa3, 0x46, 0x8d, 0x18, 0x61, -0xb4, 0x68, 0xd1, 0xa3, 0xc, 0x36, 0x8d, 0x1a, 0x34, 0x61, 0x86, 0xd1, 0xa3, 0x46, 0x8c, -0x30, 0xda, 0x34, 0x68, 0xd1, 0x86, 0x1b, 0x46, 0x8d, 0x1a, 0x30, 0xc3, 0x68, 0xd1, 0xa3, -0x46, 0x18, 0x6d, 0x1a, 0x34, 0x68, 0xc3, 0xd, 0xa3, 0x46, 0x8d, 0x18, 0x61, 0xb4, 0x68, -0xd1, 0xa3, 0xc, 0x36, 0x8d, 0x1a, 0x34, 0x61, 0x86, 0xd1, 0xa3, 0x46, 0x8c, 0x30, 0xda, -0x34, 0x68, 0xd1, 0x86, 0x1b, 0x46, 0x8d, 0x1a, 0x30, 0xc3, 0x68, 0xd1, 0xa3, 0x46, 0x18, -0x6d, 0x1a, 0x34, 0x68, 0xc3, 0xd, 0xa3, 0x46, 0x8d, 0x18, 0x61, 0xb4, 0x68, 0xd1, 0xa3, -0xc, 0x36, 0x8d, 0x1a, 0x34, 0x61, 0x86, 0xd1, 0xa3, 0x46, 0x8c, 0x30, 0xda, 0x34, 0x68, -0xd1, 0x86, 0x1b, 0x46, 0x8d, 0x1a, 0x30, 0xc3, 0x68, 0xd1, 0xa3, 0x46, 0x18, 0x6d, 0x1a, -0x34, 0x68, 0xc3, 0xd, 0xa3, 0x46, 0x8d, 0x18, 0x61, 0xb4, 0x68, 0xd1, 0xa3, 0xc, 0x36, -0x8d, 0x1a, 0x34, 0x61, 0x86, 0xd1, 0xa3, 0x46, 0x8c, 0x30, 0xda, 0x34, 0x68, 0xd1, 0x86, -0x1b, 0x46, 0x8d, 0x1a, 0x30, 0xc3, 0x68, 0xd1, 0xa3, 0x46, 0x18, 0x6d, 0x1a, 0x34, 0x68, -0xc3, 0xd, 0xa3, 0x46, 0x8d, 0x18, 0x61, 0xb4, 0x68, 0xd1, 0xa3, 0xc, 0x36, 0x8d, 0x1a, -0x34, 0x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x34, 0x61, 0x86, 0xd1, 0xa3, 0x46, 0x8c, -0x30, 0xda, 0x34, 0x68, 0xd1, 0x86, 0x1b, 0x46, 0x8d, 0x1a, 0x30, 0xc3, 0x68, 0xd1, 0xa3, -0x46, 0x18, 0x6d, 0x1a, 0x34, 0x68, 0xc3, 0xd, 0xa3, 0x46, 0x8d, 0x18, 0x61, 0xb4, 0x68, -0xd1, 0xa3, 0xc, 0x36, 0x8d, 0x1a, 0x34, 0x61, 0x86, 0xd1, 0xa3, 0x46, 0x8c, 0x30, 0xda, -0x34, 0x68, 0xd1, 0x86, 0x1b, 0x46, 0x8d, 0x1a, 0x30, 0xc3, 0x68, 0xd1, 0xa3, 0x46, 0x18, -0x6d, 0x1a, 0x34, 0x68, 0xc3, 0xd, 0xa3, 0x46, 0x8d, 0x18, 0x61, 0xb4, 0x68, 0xd1, 0xa3, -0xc, 0x36, 0x8d, 0x1a, 0x34, 0x61, 0x86, 0xd1, 0xa3, 0x46, 0x8c, 0x30, 0xda, 0x34, 0x68, -0xd1, 0x86, 0x1b, 0x46, 0x8d, 0x1a, 0x30, 0xc3, 0x68, 0xd1, 0xa3, 0x46, 0x18, 0x6d, 0x1a, -0x34, 0x68, 0xc3, 0xd, 0xa3, 0x46, 0x8d, 0x18, 0x61, 0xb4, 0x68, 0xd1, 0xa3, 0xc, 0x36, -0x8d, 0x1a, 0x34, 0x61, 0x86, 0xd1, 0xa3, 0x46, 0x8c, 0x30, 0xda, 0x34, 0x68, 0xd1, 0x86, -0x1b, 0x46, 0x8d, 0x1a, 0x30, 0xc3, 0x68, 0xd1, 0xa3, 0x46, 0x18, 0x6d, 0x1a, 0x34, 0x68, -0xc3, 0xd, 0xa3, 0x46, 0x8d, 0x18, 0x61, 0xb4, 0x68, 0xd1, 0xa3, 0xc, 0x36, 0x8d, 0x1a, -0x34, 0x61, 0x86, 0xd1, 0xa3, 0x46, 0x8c, 0x30, 0xda, 0x34, 0x68, 0xd1, 0x86, 0x1b, 0x46, -0x8d,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a3, 0xc, 0x36, 0x8d, 0x1a, 0x34, 0x61, 0x86, 0xd1, 0xa3, 0x46, 0x8c, 0x30, 0xda, 0x34, -0x68, 0xd1, 0x86, 0x1b, 0x46, 0x8d, 0x1a, 0x30, 0xc3, 0x68, 0xd1, 0xa3, 0x46, 0x18, 0x6d, -0x1a, 0x34, 0x68, 0xc3, 0xd, 0xa3, 0x46, 0x8d, 0x18, 0x61, 0xb4, 0x68, 0xd1, 0xa3, 0xc, -0x36, 0x8d, 0x1a, 0x34, 0x61, 0x86, 0xd1, 0xa3, 0x46, 0x8c, 0x30, 0xda, 0x34, 0x68, 0xd1, -0x86, 0x1b, 0x46, 0x8d, 0x1a, 0x30, 0xc3, 0x68, 0xd1, 0xa3, 0x46, 0x18, 0x6d, 0x1a, 0x34, -0x68, 0xc3, 0xd, 0xa3, 0x46, 0x8d, 0x18, 0x61, 0xb4, 0x68, 0xd1, 0xa3, 0xc, 0x36, 0x8d, -0x1a, 0x34, 0x61, 0x86, 0xd1, 0xa3, 0x46, 0x8c, 0x30, 0xda, 0x34, 0x68, 0xd1, 0x86, 0x1b, -0x46, 0x8d, 0x1a, 0x30, 0xc3, 0x68, 0xd1, 0xa3, 0x46, 0x18, 0x6d, 0x1a, 0x34, 0x68, 0xc3, -0xd, 0xa3, 0x46, 0x8d, 0x18, 0x61, 0xb4, 0x68, 0xd1, 0xa3, 0xc, 0x36, 0x8d, 0x1a, 0x34, -0x61, 0x86, 0xd1, 0xa3, 0x46, 0x8c, 0x30, 0xda, 0x34, 0x68, 0xd1, 0x86, 0x1b, 0x46, 0x8d, -0x1a, 0x30, 0xc3, 0x68, 0xd1, 0xa3, 0x46, 0x18, 0x6d, 0x1a, 0x34, 0x68, 0xc3, 0xd, 0xa3, -0x46, 0x8d, 0x18, 0x61, 0xb4, 0x68, 0xd1, 0xa3, 0xc, 0x36, 0x8d, 0x1a, 0x34, 0x61, 0x86, -0xd1, 0xa3, 0x46, 0x8c, 0x30, 0xda, 0x34, 0x68, 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1f, 0x68, 0xd1, 0xa3, 0xc, 0x36, 0x8d, 0x1a, -0x34, 0x61, 0x86, 0xd1, 0xa3, 0x46, 0x8c, 0x30, 0xda, 0x34, 0x68, 0xd1, 0x86, 0x1b, 0x46, -0x8d, 0x1a, 0x30, 0xc3, 0x68, 0xd1, 0xa3, 0x46, 0x18, 0x6d, 0x1a, 0x34, 0x68, 0xc3, 0xd, -0xa3, 0x46, 0x8d, 0x18, 0x61, 0xb4, 0x68, 0xd1, 0xa3, 0xc, 0x36, 0x8d, 0x1a, 0x34, 0x61, -0x86, 0xd1, 0xa3, 0x46, 0x8c, 0x30, 0xda, 0x34, 0x68, 0xd1, 0x86, 0x1b, 0x46, 0x8d, 0x1a, -0x30, 0xc3, 0x68, 0xd1, 0xa3, 0x46, 0x18, 0x6d, 0x1a, 0x34, 0x68, 0xc3, 0xd, 0xa3, 0x46, -0x8d, 0x18, 0x61, 0xb4, 0x68, 0xd1, 0xa3, 0xc, 0x36, 0x8d, 0x1a, 0x34, 0x61, 0x86, 0xd1, -0xa3, 0x46, 0x8c, 0x30, 0xda, 0x34, 0x68, 0xd1, 0x86, 0x1b, 0x46, 0x8d, 0x1a, 0x30, 0xc3, -0x68, 0xd1, 0xa3, 0x46, 0x18, 0x6d, 0x1a, 0x34, 0x68, 0xc3, 0xd, 0xa3, 0x46, 0x8d, 0x18, -0x61, 0xb4, 0x68, 0xd1, 0xa3, 0xc, 0x36, 0x8d, 0x1a, 0x34, 0x61, 0x86, 0xd1, 0xa3, 0x46, -0x8c, 0x30, 0xda, 0x34, 0x68, 0xd1, 0x86, 0x1b, 0x46, 0x8d, 0x1a, 0x30, 0xc3, 0x68, 0xd1, -0xa3, 0x46, 0x18, 0x6d, 0x1a, 0x34, 0x68, 0xc3, 0xd, 0xa3, 0x46, 0x8d, 0x18, 0x61, 0xb4, -0x68, 0xd1, 0xa3, 0xc, 0x36, 0x8d, 0x1a, 0x34, 0x61, 0x86, 0xd1, 0xa3, 0x46, 0x8c, 0x30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0xa3, -0x46, 0x8d, 0x18, 0x61, 0xb4, 0x68, 0xd1, 0xa3, 0xc, 0x36, 0x8d, 0x1a, 0x34, 0x61, 0x86, -0xd1, 0xa3, 0x46, 0x8c, 0x30, 0xda, 0x34, 0x68, 0xd1, 0x86, 0x1b, 0x46, 0x8d, 0x1a, 0x30, -0xc3, 0x68, 0xd1, 0xa3, 0x46, 0x18, 0x6d, 0x1a, 0x34, 0x68, 0xc3, 0xd, 0xa3, 0x46, 0x8d, -0x18, 0x61, 0xb4, 0x68, 0xd1, 0xa3, 0xc, 0x36, 0x8d, 0x1a, 0x34, 0x61, 0x86, 0xd1, 0xa3, -0x46, 0x8c, 0x30, 0xda, 0x34, 0x68, 0xd1, 0x86, 0x1b, 0x46, 0x8d, 0x1a, 0x30, 0xc3, 0x68, -0xd1, 0xa3, 0x46, 0x18, 0x6d, 0x1a, 0x34, 0x68, 0xc3, 0xd, 0xa3, 0x46, 0x8d, 0x18, 0x61, -0xb4, 0x68, 0xd1, 0xa3, 0xc, 0x36, 0x8d, 0x1a, 0x34, 0x61, 0x86, 0xd1, 0xa3, 0x46, 0x8c, -0x30, 0xda, 0x34, 0x68, 0xd1, 0x86, 0x1b, 0x46, 0x8d, 0x1a, 0x30, 0xc3, 0x68, 0xd1, 0xa3, -0x46, 0x18, 0x6d, 0x1a, 0x34, 0x68, 0xc3, 0xd, 0xa3, 0x46, 0x8d, 0x18, 0x61, 0xb4, 0x68, -0xd1, 0xa3, 0xc, 0x36, 0x8d, 0x1a, 0x34, 0x61, 0x86, 0xd1, 0xa3, 0x46, 0x8c, 0x30, 0xda, -0x34, 0x68, 0xd1, 0x86, 0x1b, 0x46, 0x8d, 0x1a, 0x30, 0xc3, 0x68, 0xd1, 0xa3, 0x46, 0x18, -0x6d, 0x1a, 0x34, 0x68, 0xc3, 0xd, 0xa3, 0x46, 0x8d, 0x18, 0x61, 0xb4, 0x68, 0xd1, 0xa3, -0xc, 0x36, 0x8d, 0x1a, 0x34, 0x61, 0x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18, 0x6d, -0x1a, 0x34, 0x68, 0xc3, 0xd, 0xa3, 0x46, 0x8d, 0x18, 0x61, 0xb4, 0x68, 0xd1, 0xa3, 0xc, -0x36, 0x8d, 0x1a, 0x34, 0x61, 0x86, 0xd1, 0xa3, 0x46, 0x8c, 0x30, 0xda, 0x34, 0x68, 0xd1, -0x86, 0x1b, 0x46, 0x8d, 0x1a, 0x30, 0xc3, 0x68, 0xd1, 0xa3, 0x46, 0x18, 0x6d, 0x1a, 0x34, -0x68, 0xc3, 0xd, 0xa3, 0x46, 0x8d, 0x18, 0x61, 0xb4, 0x68, 0xd1, 0xa3, 0xc, 0x36, 0x8d, -0x1a, 0x34, 0x61, 0x86, 0xd1, 0xa3, 0x46, 0x8c, 0x30, 0xda, 0x34, 0x68, 0xd1, 0x86, 0x1b, -0x46, 0x8d, 0x1a, 0x30, 0xc3, 0x68, 0xd1, 0xa3, 0x46, 0x18, 0x6d, 0x1a, 0x34, 0x68, 0xc3, -0xd, 0xa3, 0x46, 0x8d, 0x18, 0x61, 0xb4, 0x68, 0xd1, 0xa3, 0xc, 0x36, 0x8d, 0x1a, 0x34, -0x61, 0x86, 0xd1, 0xa3, 0x46, 0x8c, 0x30, 0xda, 0x34, 0x68, 0xd1, 0x86, 0x1b, 0x46, 0x8d, -0x1a, 0x30, 0xc3, 0x68, 0xd1, 0xa3, 0x46, 0x18, 0x6d, 0x1a, 0x34, 0x68, 0xc3, 0xd, 0xa3, -0x46, 0x8d, 0x18, 0x61, 0xb4, 0x68, 0xd1, 0xa3, 0xc, 0x36, 0x8d, 0x1a, 0x34, 0x61, 0x86, -0xd1, 0xa3, 0x46, 0x8c, 0x30, 0xda, 0x34, 0x68, 0xd1, 0x86, 0x1b, 0x46, 0x8d, 0x1a, 0x30, -0xc3, 0x68, 0xd1, 0xa3, 0x46, 0x18, 0x6d, 0x1a, 0x34, 0x68, 0xc3, 0xd, 0xa3, 0x46, 0x8d, -0x18, 0x61, 0xb4, 0x68, 0xd1, 0xa3, 0xc, 0x36, 0x8d, 0x1a, 0x34, 0x61, 0x86, 0xd1, 0xa3, -0x46, 0x8c, 0x30, 0xda, 0x34, 0x68, 0xd1, 0x86, 0x1b, 0x46, 0x8d, 0x1a, 0x30, 0xc3, 0x0, -0x0, 0x0, 0x0, 0x0, 0x0 }; - -int blackframeLength = sizeof(blackframe); - -// Local variables: -// mode: c++ -// c-file-style: "stroustrup" -// c-file-offsets: ((inline-open . 0)) -// indent-tabs-mode: t -// End: diff --git a/dxr3colormanager.c b/dxr3colormanager.c deleted file mode 100644 index 93311ba..0000000 --- a/dxr3colormanager.c +++ /dev/null @@ -1,386 +0,0 @@ -/*************************************************************************** - dxr3colormanager.c - description - ------------------- - begin : Tue Oct 22 2002 - copyright : (C) 2002 by Stefan Schluenss - email : vdr@schluenss.de - ***************************************************************************/ - -/*************************************************************************** - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - ***************************************************************************/ -/** - * Background: - * Each encoded pixel in the SPU could have one of the values 0,1,2,3. * - * These values - - Pixelvalue Maps - to index - 0 --> 4 --> - - - * The SPU data definition allows highlighting of rectangular areas. They * - * are defined by a starting and ending row. Whithin these rows one could * - * define a starting column for using a new color palette mapping. This * - * mapping will be used til the end of the line or up to the next column * - * defintion. - * Look at the picture below: - * - Row Col=5 Col=16 - n-2 ............................... - n-1 ............................... - n .....-------------------------- <- Highligh region starts here - .....| 6,3,1,2 | 0,2,8,9 - .....| 6,3,1,2 | 0,2,8,9 - .....| 6,3,1,2 | 0,2,8,9 - n+4 .....-------------------------- <- Highligh region ends here - n+5 ............................... - n+6 ............................... - - In the above example one region (from n to n+4) is defined with two * - highlight sections - one from column 5 up to 15 and the second from 16 * - til the end of the line. -**/ - - -#include <assert.h> - -#include "dxr3colormanager.h" -#include "dxr3memcpy.h" -#include <stdio.h> -#include <string.h> - -// ================================== -//! constructor -cColorManager::cColorManager() -{ - NrOfRegions = 0; - isopen = false; - for(int i = 0; i < MAX_NO_OF_REGIONS; i++) - hlr[i] = NULL; -} - -// ================================== -cColorManager::~cColorManager() -{ - for (int i = 0; i < NrOfRegions; i++) - { - if (hlr[i]) - { - delete(hlr[i]); - } - } -} - -// ================================== -// Opens a new highlight region -void cColorManager::OpenRegion(int y, int NrOfSecToCopy) -{ - hlr[NrOfRegions] = new yRegion(); - hlr[NrOfRegions]->Y1 = y; - isopen = true; - - if (NrOfSecToCopy > 0) - { - for (int i = 0; i < NrOfSecToCopy; i++) - { - hlr[NrOfRegions]->Section[i] = hlr[NrOfRegions - 1]->Section[i]; - } - } -} - -// ================================== -// Closes the spu-highlight region -void cColorManager::CloseRegion(int y) -{ - - hlr[NrOfRegions]->Y2 = y; - isopen = false; - - if (hlr[NrOfRegions]->N != 0) // skip this region if there is no section defined - { - if (NrOfRegions < MAX_NO_OF_SECTIONS -1) - { - NrOfRegions++; - } - } - -} - -// ================================== -void cColorManager::EncodeColors(int width, int height, unsigned char* map, unsigned char* dmap) -{ - unsigned char color = 0xFF, ccol = 0xFF; - unsigned char ColorIndex = 0xFF; - unsigned char buffer[1024] = {0}; - - for (int y = 0; y < height; ++y) - { - color = 0xFF; - for(int x = 0; x < width; ++x) - { - ccol = map[y * width + x]; - if (ccol != 0) MaxY = y; - if (ccol != color) - { - color = ccol; // save this color - if (!AddColor(x,y,color, ColorIndex)) - { - // add this color to highlight regions - color = 0xFF; - x = -1; - } - else - { - // color successfully added - buffer[x] = ColorIndex; - } - } - else - { - buffer[x] = ColorIndex;//*(dmap+(y * width + x)) = ColorIndex; - } - } - dxr3_memcpy(dmap+y*width, buffer,width); - } -} - -// ================================== -unsigned char cColorManager::AddColor(int x, int y, unsigned char color, unsigned char &ColorIndex) { - static int yold = -1; - xSection* Section = 0; - int SectionIndex = 0; - - if (isopen) - { - // there is an opened highlight-region - Section = GetSection(x, SectionIndex); - - // checks whether we have a section defined on the formerly line on this x-position - if (Section != NULL) - { - // there was a section - if (!Section->HasColor(color, ColorIndex)) - { - // this color is new for this section - if (Section->AllColorsUsed()) - { - // no more free colors - if (yold != y) - { - CloseRegion(y-1); - // terminate region - return(0); - yold = y; - // open new region - OpenRegion(y,SectionIndex+1); - } - // create new section - Section = NewSection(x); - } - // and add new color - ColorIndex = Section->AddColor(color); - } - } - else - { - // no section found (but region already open) - - // terminate region - CloseRegion(y-1); - yold = y; - // open new region - OpenRegion(y); - // create new section - Section = NewSection(x); - // and add new color - ColorIndex = Section->AddColor(color); - } - } - else - { - // currently no region open - yold = y; - - // open new region - OpenRegion(y); - // create new section - Section = NewSection(x); - // and add new color - ColorIndex = Section->AddColor(color); - } - return(1); -} - -// ================================== -xSection *cColorManager::GetSection(int x, int &n) -{ - int i; - n = 0; - - // for every section in the current region - for (i = 0; i < hlr[NrOfRegions]->N; i++) - { - if ((x <= hlr[NrOfRegions]->Section[i]->X2) && (x >= hlr[NrOfRegions]->Section[i]->X1)) // x-pos is in section - { - n = i; - return (hlr[NrOfRegions]->Section[i]); - } - } - return(NULL); -} - -/** Adds a new highlight region beginning from FIRST to LAST column */ -/** -void cColorManager::AddRegion(int first, int last, unsigned int color, unsigned int opac) -{ - DIAG("AddRegion(%d %d %x %x)\n",first, last, color, opac); - hlr[NrOfRegions]->AddSection(first, last, color, opac); -} -**/ - -// ================================== -// convert into SPU - hope is correct description -unsigned char* cColorManager::GetSpuData(int& len) -{ - if (isopen) // there is an opened highlight-region - CloseRegion(MaxY); - - if (NrOfRegions != 0) - { - int ptr = 0; - spudata[ptr++] = 0x07; // CHG_COLCON command - spudata[ptr++] = 0x00; // total size of parameter area - spudata[ptr++] = 0x00; // will be filled later - - - for(int i = 0; i < NrOfRegions;i++) - { - spudata[ptr++] = (hlr[i]->Y1 >> 8) & 0x0f; - spudata[ptr++] = (hlr[i]->Y1 & 0xff); - spudata[ptr++] = ( ( (hlr[i]->N) & 0x0f) << 4) | ((hlr[i]->Y2 >> 8) & 0x0f); - spudata[ptr++] = (hlr[i]->Y2 & 0xff); - - for(int c = 0; c < hlr[i]->N; c++) - { - spudata[ptr++] = hlr[i]->Section[c]->X1 >> 8; - spudata[ptr++] = hlr[i]->Section[c]->X1 & 0xff; - spudata[ptr++] = (hlr[i]->Section[c]->Colors[3] << 4) | (hlr[i]->Section[c]->Colors[2] & 0x0F); - spudata[ptr++] = (hlr[i]->Section[c]->Colors[1] << 4) | (hlr[i]->Section[c]->Colors[0] & 0x0F); - - spudata[ptr++] = (hlr[i]->Section[c]->Opac[3] << 4) | hlr[i]->Section[c]->Opac[2]; - spudata[ptr++] = (hlr[i]->Section[c]->Opac[1] << 4) | hlr[i]->Section[c]->Opac[0]; - } - } - spudata[ptr++] = 0x0f; // termination of parameter block - spudata[ptr++] = 0xff; - spudata[ptr++] = 0xff; - spudata[ptr++] = 0xff; - int size = ptr - 1; - spudata[1] = size >> 8; - spudata[2] = size & 0xff; - - len = ptr; - } - else - len = 0; - -#if OSD_SPU_CM_DUMP - FILE *fp; - fp = fopen("CM.dump","a+"); - fprintf(fp,"len:%03d ",len); - for (int i = 0; i < len; i++) - fprintf(fp,"%02X",*(spudata+i)); - fprintf(fp,"\n"); - fclose(fp); -#endif - - return(spudata); -} - -// ================================== -xSection *cColorManager::NewSection(int x) -{ - xSection* sec = new xSection(x); - int N = hlr[NrOfRegions]->N; - - hlr[NrOfRegions]->Section[hlr[NrOfRegions]->N] = sec; - if (N > 0) - hlr[NrOfRegions]->Section[hlr[NrOfRegions]->N - 1]->X2 = x-1; - (hlr[NrOfRegions]->N)++; - - return(sec); -} - -/** -// No descriptions */ -/** -void HLRegion::AddSection(int first, int last, unsigned int color, unsigned int opac) -{ - DIAG(" AddSection %d,%d %X,%X\n",first, last, color, opac); - Region[N] = new ColRegion(first, last, color, opac); - assert(N<MAX_NO_OF_REGIONS -1); - N++; - DIAG("HL N:%d\n",N); -} -**/ - -// ================================== -xSection::xSection(int x) -{ - X1 = x; - X2 = 0xFFF; - NrOfColors = 0; - for (int i = 0; i < 4; i++) - { - Opac[i] = 0xFF; - Colors[i] = 0; - } -} - -// ================================== -unsigned char xSection::AddColor(unsigned int color) -{ - unsigned char ColorIndex = 0; - - if (NrOfColors <= 3) - { - Colors[NrOfColors] = color; - Opac[NrOfColors] = color >> 4; - ColorIndex = NrOfColors; - NrOfColors++; - } - return(ColorIndex); -} - -// ================================== -bool xSection::HasColor(unsigned int color, unsigned char &ColorIndex) -{ - for(int i = 0; i < NrOfColors; i++) - { - if (Colors[i] == color) - { - ColorIndex = i; - return (true); - } - } - return(false); -} - -/** No descriptions */ -void cColorManager::SetBgColor(unsigned int bgColor) -{ -// cColorManager::BgColor = bgColor; -} - -// Local variables: -// mode: c++ -// c-file-style: "stroustrup" -// c-file-offsets: ((inline-open . 0)) -// indent-tabs-mode: t -// End: diff --git a/dxr3colormanager.h b/dxr3colormanager.h deleted file mode 100644 index a194623..0000000 --- a/dxr3colormanager.h +++ /dev/null @@ -1,129 +0,0 @@ -/*************************************************************************** - dxr3colormanager.h - description - ------------------- - begin : Tue Oct 22 2002 - copyright : (C) 2002 by Stefan Schluenss - email : vdr@schluenss.de - ***************************************************************************/ - -/*************************************************************************** - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - ***************************************************************************/ - -#ifndef _DXR3COLORMANAGER_H_ -#define _DXR3COLORMANAGER_H_ -/* -// ================================== -struct rectangular_area -{ - rectangular_area() : m_startrow(0), m_endrow(0), m_startcol(0), m_endcol(0) {} - -private: - size_t m_startrow; - size_t m_endrow; - size_t m_startcol; - size_t m_endcol; - - unsigned int Colors[4]; - unsigned int Opac[4]; -} - - - -*/ - - - -/**SPU-ColorManager - *@author Stefan Schluenss -*/ - -#include <stdio.h> - -#define OSD_SPU_CM_DUMP 0 - -#define MAX_NO_OF_SECTIONS 15 -#define MAX_NO_OF_REGIONS 30 - - -// ================================== -class xSection -{ -public: - xSection(int x); - bool HasColor(unsigned int color, unsigned char &ColorIndex); - unsigned char AddColor(unsigned int color); - bool AllColorsUsed() {/*DIAG("AllColorsUsed: %d\n",NrOfColors)*/;if(NrOfColors >= 4) return(true); else return (false); }; - int X1; - int X2; - int NrOfColors; - unsigned int Colors[4]; - unsigned int Opac[4]; -}; - -// ================================== -class yRegion -{ -public: - yRegion(): Y1(0), Y2(0), N(0) {} - - /** No descriptions */ - void AddSection(int first, int last, unsigned int color, unsigned int opac); - int Y1; - int Y2; - int N; - - xSection* Section[MAX_NO_OF_SECTIONS]; -}; - -// ================================== -class cColorManager -{ -public: - cColorManager(); - ~cColorManager(); - - void EncodeColors(int width, int height, unsigned char* smap, unsigned char* dmap); - - /** Sets a new color on the OSD */ - unsigned char AddColor(int x, int y, unsigned char color, unsigned char &ColorIndex); - - /** encodes the color information as highlight spu data*/ - unsigned char* GetSpuData(int &len); - - /** Adds a new highlight region beginning from FIRST to LAST column */ -// void AddRegion(int first, int last, unsigned int color, unsigned int opac=0xFFFF); - - /** No descriptions */ - void SetBgColor(unsigned int bgColor); - -private: // Private attributes - yRegion *hlr[MAX_NO_OF_REGIONS]; - int NrOfRegions; - bool isopen; - unsigned char spudata[2*4096]; - unsigned int BgCol; - int MaxY; - - /** Opens a new highlight region */ - void OpenRegion(int y, int NrOfSecToCopy = 0); - /** Closes the spu-highlight region */ - void CloseRegion(int y); - - xSection* NewSection(int x); - xSection *GetSection(int x, int &n); -}; - -#endif /*_DXR3COLORMANAGER_H_*/ - -// Local variables: -// mode: c++ -// c-file-style: "stroustrup" -// c-file-offsets: ((inline-open . 0)) -// indent-tabs-mode: t -// End: diff --git a/dxr3configdata.c b/dxr3configdata.c deleted file mode 100644 index 0589dd5..0000000 --- a/dxr3configdata.c +++ /dev/null @@ -1,48 +0,0 @@ -/* - * dxr3configdata.c - * - * Copyright (C) 2002-2004 Kai Möller - * Copyright (C) 2004 Christian Gmeiner - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation; either version 2.1 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - */ - -#include "dxr3configdata.h" - -// ================================== -//! constructor -cDxr3ConfigData::cDxr3ConfigData() -{ - // set default values - m_Digitaloutput = 0; - m_AC3output = 0; - m_Card = 0; - m_ForceLetterbox = 0; - m_VideoMode = PAL; - m_MenuMode = SUBPICTURE; - m_Debug = 1; - m_DebugLevel = 0; - m_Brightness = 500; - m_Contrast = 500; - m_Saturation = 500; -} - -// Local variables: -// mode: c++ -// c-file-style: "stroustrup" -// c-file-offsets: ((inline-open . 0)) -// indent-tabs-mode: t -// End: diff --git a/dxr3configdata.h b/dxr3configdata.h deleted file mode 100644 index d39ca68..0000000 --- a/dxr3configdata.h +++ /dev/null @@ -1,117 +0,0 @@ -/* - * dxr3configdata.h - * - * Copyright (C) 2002-2004 Kai Möller - * Copyright (C) 2004 Christian Gmeiner - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation; either version 2.1 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - */ - -#ifndef _DXR3_CONFIGDATA_H_ -#define _DXR3_CONFIGDATA_H_ - -#include "dxr3singleton.h" - -// ================================== -//! possible video modes -enum eVideoMode -{ - PAL = 0, ///< use PAL as videomode - PAL60, ///< use PAL60 as videomode - NTSC ///< use NTSC as videomode -}; - -// ================================== -// possible menu modes -enum eMenuMode -{ - SUBPICTURE = 0, - MPEG -}; - -// ================================== -//! possible debug levels -enum eDebugLevel -{ - LOW = 0, ///< only log basic warings and errors - EVERYTHING ///< log everything - note logfile can become very big -}; - -// ================================== -//! global interface to access all config datas of this plugin -/* - With this singleton you can access very easy all possible - config settings of the plugin. -*/ -class cDxr3ConfigData : public Singleton<cDxr3ConfigData> -{ -public: - cDxr3ConfigData(); - ~cDxr3ConfigData() {} - - int GetUseDigitalOut() const { return m_Digitaloutput; } - int SetUseDigitalOut(int value) { return m_Digitaloutput = value; } - int GetDxr3Card() const { return m_Card; } - int SetDxr3Card(int value) { return m_Card = value; } - int GetForceLetterBox() const { return m_ForceLetterbox; } - int SetForceLetterBox(int value) { return m_ForceLetterbox = value; } - int GetAc3OutPut() const { return m_AC3output; } - int SetAc3OutPut(int value) { return m_AC3output = value;} - - eVideoMode GetVideoMode() const { return m_VideoMode;} - eVideoMode SetVideoMode(eVideoMode videoMode) { return m_VideoMode = videoMode;} - eMenuMode GetMenuMode() const { return m_MenuMode; } - eMenuMode SetMenuMode(eMenuMode menuMode) { return m_MenuMode = menuMode; } - - int GetDebug() const { return m_Debug; } - int SetDebug(int value) { return m_Debug = value; } - int GetDebugLevel() const { return m_DebugLevel; } - int SetDebugLevel(int value) { return m_DebugLevel = value; } - - // some little helpers to save some writing - int GetDebugLow() const { return (m_Debug && !m_DebugLevel); } - int GetDebugEverything() const { if (m_Debug && !m_DebugLevel) { return 1; } else { return 0; } } - - int GetBrightness() const { return m_Brightness; } - int SetBrightness(int value) { return m_Brightness = value; } - int GetContrast() const { return m_Contrast; } - int SetContrast(int value) { return m_Contrast = value; } - int GetSaturation() const { return m_Saturation; } - int SetSaturation(int value) { return m_Saturation = value; } - -protected: - eVideoMode m_VideoMode;///< videomode value - eMenuMode m_MenuMode; ///< menumode value - - int m_Digitaloutput; ///< digitaloutput value - int m_AC3output; ///< ac3output value - int m_Card; ///< card value - int m_ForceLetterbox; ///< forcebox value - int m_Debug; ///< debug value - int m_DebugLevel; ///< debug level value - int m_Brightness; ///< brightness value - int m_Contrast; ///< contrast value - int m_Saturation; ///< saturation value -}; - -#endif /*_DXR3_CONFIGDATA_H_*/ - -// Local variables: -// mode: c++ -// c-file-style: "stroustrup" -// c-file-offsets: ((inline-open . 0)) -// indent-tabs-mode: t -// End: diff --git a/dxr3cpu.c b/dxr3cpu.c deleted file mode 100644 index 6a51f0a..0000000 --- a/dxr3cpu.c +++ /dev/null @@ -1,153 +0,0 @@ -/* -* dxr3cpu.c -* -* Copyright (C) 2004 Christian Gmeiner -* -* Taken from Nesseia-Renderengine Copyright (C) 2003-2004 Christian Gmeiner -* -* This program is free software; you can redistribute it and/or -* modify it under the terms of the GNU Lesser General Public License -* as published by the Free Software Foundation; either version 2.1 -* of the License, or (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU Lesser General Public License -* along with this program; if not, write to the Free Software -* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -* -*/ - -#include "dxr3cpu.h" -#include "dxr3log.h" -#include "dxr3memcpy.h" - -// ================================== -//! constructor -cDxr3CPU::cDxr3CPU() -{ - unsigned long eax,ebx,edx,unused; - - // readout the vendor - Cpuid(0,eax,ebx,unused,edx); - - // set Vendor to "" - memset(m_Info.Vendor, 0, 16); - - // connect the single register values to the vendor string - // maybe there is an better solution - i will google :) - *(unsigned long *)(m_Info.Vendor) = ebx; - *(unsigned long *)(m_Info.Vendor + 4) = edx; - *(unsigned long *)(m_Info.Vendor + 8) = unused; - - // check the features - // could we get the needed infos? - if (Cpuid(1,eax,ebx,unused,edx)) - { - m_Info.MMX = ((edx & 1<<23) != 0); - m_Info.SSE = ((edx & 1<<25) != 0); - m_Info.SSE2= ((edx & 1<<26) != 0); - m_Info.RDTSC=((edx & 1<<4) != 0); /*0x10*/ - m_Info.HT = ((edx & 1<<28) !=0); // should we do here addinonal checks? - - // 3DNow is a litle bit harder to read out - // We read the ext. CPUID level 0x80000000 - if (Cpuid(0x80000000,eax,ebx,unused,edx)) - { - // now in eax there is the max. supported extended CPUID level - // we check if theres an extended CPUID level support - if (eax >= 0x80000001) - { - // If we can access the extended CPUID level 0x80000001 we get the - // edx register - if (Cpuid(0x80000001,eax,ebx,unused,edx)) - { - // Now we can mask some AMD specific cpu extensions - // 22 ... Extended MMX_MultimediaExtensions - m_Info.MMXEXT = ((edx & 1<<22) != 0); - m_Info.AMD64Bit = ((edx & 1<<29) != 0); - // 30 ... Extended 3DNOW_InstructionExtensions - m_Info.Now = ((edx & (1<<31)) != 0); - } - } - } - } - - // MPlayer, Xine-lib, Transcode: SSE implies MMXEXT - m_Info.MMXEXT = m_Info.MMXEXT || m_Info.SSE; - - // fill cabs - if (m_Info.MMX) - { - m_Info.caps |= CC_MMX; - } - - if (m_Info.MMXEXT) - { - m_Info.caps |= CC_MMXEXT; - } - - if (m_Info.SSE) - { - m_Info.caps |= CC_SSE; - } - - if (m_Info.Now) - { - m_Info.caps |= CC_3DNOW; - } - - // print some infos about cpu - cLog::Instance() << "cpu vendor: " << m_Info.Vendor << "\n"; - cLog::Instance() << "cpu extensions:\n"; - cLog::Instance() << "mmx: " << m_Info.MMX << "\n"; - cLog::Instance() << "mmx-ext: " << m_Info.MMXEXT << "\n"; - cLog::Instance() << "sse: " << m_Info.SSE << "\n"; - cLog::Instance() << "sse2: " << m_Info.SSE2 << "\n"; - cLog::Instance() << "3dnow: " << m_Info.Now << "\n"; - - // now we select the best memcpy mehtode - cDxr3MemcpyBench Benchmark(m_Info.caps); -} - -// ================================== -//! does the cpu support cpuid instructions -bool cDxr3CPU::CheckCPUIDPresence() -{ - // todo - return true; -} - -// ================================== -//! cpuid function -bool cDxr3CPU::Cpuid(unsigned long function, unsigned long& out_eax, unsigned long& out_ebx, unsigned long& out_ecx, unsigned long& out_edx) -{ - // This works with PIC/non-PIC, from ffmpeg (libavcodec/i386/cputest.c) - -#ifdef __x86_64__ -# define REG_b "rbx" -# define REG_S "rsi" -#else -# define REG_b "ebx" -# define REG_S "esi" -#endif - - __asm __volatile \ - ("mov %%"REG_b", %%"REG_S"\n\t" \ - "cpuid\n\t" \ - "xchg %%"REG_b", %%"REG_S \ - : "=a" (out_eax), "=S" (out_ebx), \ - "=c" (out_ecx), "=d" (out_edx) \ - : "0" (function)); - return true; -} - -// Local variables: -// mode: c++ -// c-file-style: "stroustrup" -// c-file-offsets: ((inline-open . 0)) -// indent-tabs-mode: t -// End: diff --git a/dxr3cpu.h b/dxr3cpu.h deleted file mode 100644 index c5d73d2..0000000 --- a/dxr3cpu.h +++ /dev/null @@ -1,113 +0,0 @@ -/* - * dxr3cpu.h - * - * Copyright (C) 2004 Christian Gmeiner - * - * Taken (modifized) from Nesseia-Renderengine Copyright (C) 2003-2004 Christian Gmeiner - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation; either version 2.1 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - */ - -#ifndef _DXR3_CPU_H_ -#define _DXR3_CPU_H_ - -#include <inttypes.h> -#include "dxr3singleton.h" - -// ================================== -//! all possible cabs -enum Cpu_cabs -{ - CC_MMX = 0x80000000, ///< Value for mmx - CC_3DNOW = 0x40000000, ///< Value for 3dnow - CC_MMXEXT = 0x20000000, ///< Value for mmx ext - CC_SSE = 0x10000000, ///< Value for sse - CC_SSE2 = 0x08000000 ///< Value for sse2 -}; - -// ================================== -//! easy and fast access to all infos -struct CPUInformation -{ - CPUInformation() - { - AMD = false; - INTEL = false; - MMX = false; - MMXEXT = false; - SSE = false; - SSE2 = false; - Now = false; - RDTSC = false; - HT = false; - AMD64Bit = false; - } - - char Vendor[16]; ///< vendorname - - bool AMD; ///< is it an AMD CPU? - bool INTEL; ///< is it an Intel CPU? - bool MMX; ///< is MMX-Technology supported? - bool MMXEXT; ///< are Extended MMX_MultimediaExtensions supported? - bool SSE; ///< is SSE-Technology supported? - bool SSE2; ///< is SSE2-Technology supported? - bool Now; ///< is 3DNow-Technology supported? - bool RDTSC; ///< is RDTSC-Technology supported? - bool HT; ///< is HyperThreading supported? - bool AMD64Bit; ///< is it a 64 bit machine? - - uint32_t caps; ///< all features represanted as caps -}; - -// ================================== -//! Grab some infos about the cpu(s) -/*! - If you want to know what the cpu of the - target machine can do, this class is for you :) - It is used intern for the math and memcpy part. -*/ -class cDxr3CPU : public Singleton<cDxr3CPU> -{ -public: - cDxr3CPU(); - ~cDxr3CPU() {} - - bool HasMMXSupport() const { return m_Info.MMX; } - bool HasSSESupport() const { return m_Info.SSE; } - bool HasSSE2Support() const { return m_Info.SSE2; } - bool Has3DNowSupport() const { return m_Info.Now; } - bool HasRDTSCSupport() const { return m_Info.RDTSC; } - bool HasHTSupport() const { return m_Info.HT; } - - inline CPUInformation GetInfos() const { return m_Info ;} - -private: - bool CheckCPUIDPresence(); - - // main function to get cpu(s) features - bool Cpuid(unsigned long function, unsigned long& out_eax, unsigned long& out_ebx, unsigned long& out_ecx, unsigned long& out_edx); - - CPUInformation m_Info; -}; - -#endif /*_DXR3_CPU_H_*/ - -// Local variables: -// mode: c++ -// c-file-style: "stroustrup" -// c-file-offsets: ((inline-open . 0)) -// indent-tabs-mode: t -// End: diff --git a/dxr3demuxdevice.c b/dxr3demuxdevice.c deleted file mode 100644 index a0bc9f6..0000000 --- a/dxr3demuxdevice.c +++ /dev/null @@ -1,674 +0,0 @@ -/* - * dxr3demuxdevice.c - * - * Copyright (C) 2002-2004 Kai Möller - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation; either version 2.1 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - */ - -#include <stdio.h> -#include <stdlib.h> -#include <stdint.h> -#include <unistd.h> -#include "dxr3demuxdevice.h" -#include <linux/em8300.h> -#include "dxr3log.h" -#include "dxr3pesframe.h" -#include "dxr3configdata.h" -#include "dxr3log.h" - -// ================================== -//! constructor -cDxr3DemuxDevice::cDxr3DemuxDevice(cDxr3Interface& dxr3Device) : -m_dxr3Device(dxr3Device), -m_aBuf(AUDIO_MAX_BUFFER_SIZE, AUIDO_MAX_FRAME_SIZE, m_dxr3Device), -m_vBuf(VIDEO_MAX_BUFFER_SIZE, VIDEO_MAX_FRAME_SIZE, m_dxr3Device) -{ - m_ReUseFrame = 1; - m_synchState = DXR3_DEMUX_UNSYNCHED; - m_demuxMode = DXR3_DEMUX_OFF_MODE; - m_pAudioThread = new cDxr3AudioOutThread(dxr3Device, m_aBuf); - if (!m_pAudioThread) - { - cLog::Instance() << "cDxr3DemuxDevice::cDxr3DemuxDevice: failed to allocate memory\n"; - exit(1); - } - m_pAudioThread->Start(); - - m_pVideoThread = new cDxr3VideoOutThread(dxr3Device, m_vBuf); - if (!m_pVideoThread) - { - cLog::Instance() << "cDxr3DemuxDevice::cDxr3DemuxDevice: failed to allocate memory\n"; - exit(1); - } - m_pVideoThread->Start(); - m_aDecoder.Init(); -} - -// ================================== -cDxr3DemuxDevice::cDxr3DemuxDevice() : // dummy constructor -m_dxr3Device(cDxr3Interface::Instance()), -m_aBuf(AUDIO_MAX_BUFFER_SIZE, AUIDO_MAX_FRAME_SIZE, m_dxr3Device), -m_vBuf(VIDEO_MAX_BUFFER_SIZE, VIDEO_MAX_FRAME_SIZE, m_dxr3Device) -{ - m_synchState = DXR3_DEMUX_UNSYNCHED; - m_demuxMode = DXR3_DEMUX_OFF_MODE; -} - -// ================================== -// deconstr. -cDxr3DemuxDevice::~cDxr3DemuxDevice() -{ - if (m_pVideoThread) - { - delete m_pVideoThread; - } - - if (m_pAudioThread) - { - delete m_pAudioThread; - } -} - -// ================================== -// stop demuxing process -void cDxr3DemuxDevice::Stop() -{ - m_dxr3Device.DisableVideo(); - m_dxr3Device.DisableAudio(); - m_vBuf.Clear(); - m_aBuf.Clear(); - m_vBuf.WakeUp(); - m_aBuf.WakeUp(); - m_aDecoder.Init(); - m_vBuf.WaitForReceiverStopped(); - m_aBuf.WaitForReceiverStopped(); - m_synchState = DXR3_DEMUX_UNSYNCHED; - m_demuxMode = DXR3_DEMUX_OFF_MODE; - - m_dxr3Device.PlayBlackFrame(); - m_dxr3Device.ReOpenAudio(); -} - -// ================================== -void cDxr3DemuxDevice::Resync() -{ - m_dxr3Device.DisableVideo(); - m_dxr3Device.DisableAudio(); - m_vBuf.Clear(); - m_aBuf.Clear(); - m_vBuf.WakeUp(); - m_aBuf.WakeUp(); - m_aDecoder.Init(); - m_vBuf.WaitForReceiverStopped(); - m_aBuf.WaitForReceiverStopped(); - m_synchState = DXR3_DEMUX_UNSYNCHED; - m_demuxMode = DXR3_DEMUX_OFF_MODE; -} - -// ================================== -void cDxr3DemuxDevice::Clear() -{ - m_dxr3Device.DisableVideo(); - m_dxr3Device.DisableAudio(); - m_vBuf.Clear(); - m_aBuf.Clear(); - m_vBuf.WakeUp(); - m_aBuf.WakeUp(); - m_aDecoder.Init(); - m_vBuf.WaitForReceiverStopped(); - m_aBuf.WaitForReceiverStopped(); - m_synchState = DXR3_DEMUX_UNSYNCHED; - m_demuxMode = DXR3_DEMUX_OFF_MODE; -} - -// ================================== -void cDxr3DemuxDevice::Init() -{ - m_vBuf.Clear(); - m_aBuf.Clear(); - m_synchState = DXR3_DEMUX_UNSYNCHED; - m_demuxMode = DXR3_DEMUX_OFF_MODE; - m_aDecoder.Init(); -} - -// ================================== -void cDxr3DemuxDevice::SetTvMode() -{ - m_synchState = DXR3_DEMUX_UNSYNCHED; - m_demuxMode = DXR3_DEMUX_TV_MODE; - m_aBuf.SetDemuxMode(DXR3_DEMUX_TV_MODE); - m_vBuf.SetDemuxMode(DXR3_DEMUX_TV_MODE); - m_aBuf.Start(); - m_vBuf.Start(); -} - -// ================================== -void cDxr3DemuxDevice::SetAudioOnlyMode() -{ - m_synchState = DXR3_DEMUX_UNSYNCHED; - m_demuxMode = DXR3_DEMUX_AUDIO_ONLY_MODE; - m_aBuf.SetDemuxMode(DXR3_DEMUX_REPLAY_MODE); - m_vBuf.SetDemuxMode(DXR3_DEMUX_REPLAY_MODE); - m_aBuf.Start(); - m_vBuf.Start(); -} - -// ================================== -void cDxr3DemuxDevice::SetReplayMode() -{ - if (m_demuxMode != DXR3_DEMUX_REPLAY_MODE) - { - if (m_demuxMode == DXR3_DEMUX_TRICK_MODE && m_trickState == DXR3_FREEZE) - { - m_dxr3Device.SetPlayMode(); - m_dxr3Device.SetSysClock(m_stopScr); - m_dxr3Device.EnableVideo(); - m_dxr3Device.EnableAudio(); - m_vBuf.Start(); - m_aBuf.Start(); - m_vBuf.WakeUp(); - m_aBuf.WakeUp(); - } - else - { - m_synchState = DXR3_DEMUX_UNSYNCHED; - m_aBuf.SetDemuxMode(DXR3_DEMUX_REPLAY_MODE); - m_vBuf.SetDemuxMode(DXR3_DEMUX_REPLAY_MODE); - } - } - m_demuxMode = DXR3_DEMUX_REPLAY_MODE; -} - -// ================================== -void cDxr3DemuxDevice::SetTrickMode(eDxr3TrickState trickState, int Speed) -{ - m_demuxMode = DXR3_DEMUX_TRICK_MODE; - m_trickState = trickState; - m_dxr3Device.DisableAudio(); - - if (m_demuxMode == DXR3_DEMUX_TRICK_MODE && m_trickState == DXR3_FREEZE) - { - m_stopScr = m_dxr3Device.GetSysClock(); - // m_dxr3Device.Pause(); - m_vBuf.Stop(); - m_aBuf.Stop(); - } - else - { - m_vBuf.Clear(); - m_aBuf.Clear(); - } - - m_ReUseFrame = 1;//Speed; -} - -// ================================== -void cDxr3DemuxDevice::SetVideoOnlyMode() -{ - m_demuxMode = DXR3_DEMUX_VIDEO_ONLY_MODE; - m_dxr3Device.DisableAudio(); - - if (m_demuxMode == DXR3_DEMUX_TRICK_MODE && m_trickState == DXR3_FREEZE) - { - m_stopScr = m_dxr3Device.GetSysClock(); - // m_dxr3Device.Pause(); - m_vBuf.Stop(); - m_aBuf.Stop(); - } - else - { - m_vBuf.Clear(); - m_aBuf.Clear(); - } - m_dxr3Device.SetPlayMode(); - -} - -// ================================== -void cDxr3DemuxDevice::StillPicture(const uint8_t* buf, int length) -{ - m_vBuf.Clear(); - m_aBuf.Clear(); - m_demuxMode = DXR3_DEMUX_TRICK_MODE; - m_trickState = DXR3_FREEZE; - m_dxr3Device.SingleStep(); - - cLog::Instance() << "StillPicture: len = " << length << "\n"; - - DemuxPes(buf, length); - DemuxPes(buf, length); - DemuxPes(buf, length); -} - -// ================================== -int cDxr3DemuxDevice::DemuxPes(const uint8_t* buf, int length, bool bAc3Dts) -{ - uint32_t pts = 0; - static uint32_t aPts = 0; - static uint32_t vPts = 0; - static uint32_t lastPts = 0; - static bool bPlaySuc = false; - static bool bPlayedFrame = false; - int origLength = length; - - int scr = 0; - int pcr = 0; - - scr = m_dxr3Device.GetSysClock(); - - // printf("vBuf size = %d\n", m_vBuf.Available()); - // printf("aBuf size = %d\n", m_aBuf.Available()); - /* - if (cDxr3ConfigData::Instance().GetAc3OutPut()) { - cDxr3AbsDevice::Instance().SetAudioDigitalAC3(); // !!! FIXME - } - */ - - if (m_pAudioThread->NeedResync() || m_pVideoThread->NeedResync()) - { - Resync(); - if (m_demuxMode == DXR3_DEMUX_REPLAY_MODE) - { - SetReplayMode(); - } - m_aBuf.Clear(); - m_vBuf.Clear(); - m_pAudioThread->ClearResyncRequest(); - m_pVideoThread->ClearResyncRequest(); - m_aDecoder.Reset(); - lastPts = 0; - aPts = 0; - vPts = 0; - bPlaySuc = false; - } - - if (m_demuxMode == DXR3_DEMUX_OFF_MODE) - { - m_demuxMode = DXR3_DEMUX_TV_MODE; - m_synchState = DXR3_DEMUX_UNSYNCHED; - - lastPts = 0; - aPts = 0; - vPts = 0; - bPlaySuc = false; - /* - if (cDxr3ConfigData::Instance().GetAc3OutPut()) { - cDxr3AbsDevice::Instance().SetAudioDigitalAC3(); // !!! FIXME - } - */ - } - - // find start code - try - { - cDxr3PesFrame pesFrame; - - pesFrame.ExtractNextFrame(buf, length); - - while (pesFrame.IsValid()) - { - if (pesFrame.GetEsLength() > (uint32_t) VIDEO_MAX_FRAME_SIZE) { throw (cDxr3PesFrame::PES_GENERAL_ERROR);}; - if (pesFrame.GetPts() != lastPts) - { - pts = lastPts = pesFrame.GetPts(); - } - else - { - pts = 0; - } - - if (pesFrame.GetPesDataType() == cDxr3PesFrame::PES_VIDEO_DATA) - { - // m_dxr3Device.PlayVideoFrame(pesFrame.GetEsStart(), (int) (pesFrame.GetEsLength())); - - if (m_demuxMode == DXR3_DEMUX_TRICK_MODE) - { - switch (pesFrame.GetFrameType()) - { - case I_FRAME: - cLog::Instance() << "i - frame\n"; - m_dxr3Device.SingleStep(); - bPlaySuc = true; - // if (bPlayedFrame) return length; - bPlayedFrame = true; - // usleep(30000); // otherwise there is problem with audio (driver bug?) - m_dxr3Device.SetHorizontalSize(pesFrame.GetHorizontalSize()); - m_dxr3Device.PlayVideoFrame(pesFrame.GetEsStart(), (int) (pesFrame.GetEsLength()), m_ReUseFrame); - break; - - case UNKNOWN_FRAME: - cLog::Instance() << "frame unknown\n"; - if (bPlaySuc) - { - m_dxr3Device.PlayVideoFrame(pesFrame.GetEsStart(), (int) (pesFrame.GetEsLength()), m_ReUseFrame); - } - break; - - default: - cLog::Instance() << "default frame\n"; - if (bPlaySuc) - { - m_dxr3Device.PlayVideoFrame(pesFrame.GetEsStart(), (int) (pesFrame.GetOffset()), m_ReUseFrame); - } - - bPlaySuc = false; - break; - } - - } - else if (m_demuxMode == DXR3_DEMUX_VIDEO_ONLY_MODE) - { - m_dxr3Device.PlayVideoFrame(pesFrame.GetEsStart(), (int) (pesFrame.GetEsLength())); - } - else if (m_synchState == DXR3_DEMUX_VIDEO_SYNCHED || m_synchState == DXR3_DEMUX_SYNCHED) - { - m_dxr3Device.SetHorizontalSize(pesFrame.GetHorizontalSize()); - while(!Poll(100)); - cFixedLengthFrame* pTempFrame = m_vBuf.Push(pesFrame.GetEsStart(), (int) (pesFrame.GetEsLength()), pts, ftVideo); - pTempFrame->SetAspectRatio(pesFrame.GetAspectRatio()); - - m_aBuf.WakeUp(); - - if (m_vBuf.GetFillLevel() > 5 && m_synchState != DXR3_DEMUX_SYNCHED) - { - m_synchState = DXR3_DEMUX_SYNCHED; - pcr = vPts - PRE_BUFFER_LENGTH; - m_dxr3Device.SetSysClock(pcr); - m_dxr3Device.SetPlayMode(); - m_dxr3Device.EnableVideo(); - m_dxr3Device.EnableAudio(); - m_vBuf.Start(); - m_aBuf.Start(); - } - } - else - { - if (pesFrame.GetFrameType() == I_FRAME) - { - vPts = pts; - - m_dxr3Device.SetHorizontalSize(pesFrame.GetHorizontalSize()); - cFixedLengthFrame* pTempFrame = m_vBuf.Push(pesFrame.GetEsStart(), (int) (pesFrame.GetEsLength()), pts, ftVideo); - pTempFrame->SetAspectRatio(pesFrame.GetAspectRatio()); - - if (m_synchState == DXR3_DEMUX_AUDIO_SYNCHED) - { - m_synchState = DXR3_DEMUX_SYNCHED; - } - else - { - m_synchState = DXR3_DEMUX_VIDEO_SYNCHED; - } - if (m_synchState == DXR3_DEMUX_SYNCHED) - { - if (!vPts) vPts = aPts; - if (aPts < vPts) - { - pcr = aPts - PRE_BUFFER_LENGTH; - } - else - { - pcr = vPts - PRE_BUFFER_LENGTH; - } - m_dxr3Device.SetSysClock(pcr); - m_dxr3Device.SetPlayMode(); - m_dxr3Device.EnableVideo(); - m_dxr3Device.EnableAudio(); - m_vBuf.Start(); - m_aBuf.Start(); - } - } - } - - } - else if (pesFrame.GetPesDataType() == cDxr3PesFrame::PES_AUDIO_DATA - && m_demuxMode != DXR3_DEMUX_VIDEO_ONLY_MODE - && !cDxr3ConfigData::Instance().GetAc3OutPut()) - { - if (m_synchState == DXR3_DEMUX_AUDIO_SYNCHED || m_synchState == DXR3_DEMUX_SYNCHED) - { - if (pts && m_synchState != DXR3_DEMUX_SYNCHED) - { - m_synchState = DXR3_DEMUX_SYNCHED; - pcr = aPts - PRE_BUFFER_LENGTH; - m_dxr3Device.SetSysClock(pcr); - m_dxr3Device.SetPlayMode(); - m_dxr3Device.EnableVideo(); - m_dxr3Device.EnableAudio(); - m_vBuf.Start(); - m_aBuf.Start(); - } - while(!Poll(100)); - m_aDecoder.Decode(pesFrame.GetEsStart(), (int) (pesFrame.GetEsLength()), pts, m_aBuf); - - } - else - { - if (pts) - { - aPts = pts; - - m_aDecoder.Decode(pesFrame.GetEsStart(), (int) (pesFrame.GetEsLength()), pts, m_aBuf); - - if (m_synchState == DXR3_DEMUX_VIDEO_SYNCHED) - { - m_synchState = DXR3_DEMUX_SYNCHED; - } - else - { - m_synchState = DXR3_DEMUX_AUDIO_SYNCHED; - } - if (m_synchState == DXR3_DEMUX_SYNCHED) - { - if (!vPts) vPts = aPts; - if (aPts < vPts) - { - pcr = aPts - PRE_BUFFER_LENGTH; - } - else - { - pcr = vPts - PRE_BUFFER_LENGTH; - } - m_dxr3Device.SetSysClock(pcr); - m_dxr3Device.SetPlayMode(); - m_dxr3Device.EnableVideo(); - m_dxr3Device.EnableAudio(); - m_vBuf.Start(); - m_aBuf.Start(); - } - } - } - } - else if (pesFrame.GetPesDataType() == cDxr3PesFrame::PES_PRIVATE_DATA - && m_demuxMode != DXR3_DEMUX_VIDEO_ONLY_MODE - && !cDxr3ConfigData::Instance().GetAc3OutPut() - && !bAc3Dts) - { - if (m_synchState == DXR3_DEMUX_AUDIO_SYNCHED || m_synchState == DXR3_DEMUX_SYNCHED) - { - m_aDecoder.DecodeLpcm(pesFrame.GetEsStart(), pesFrame.GetEsLength(), pts, m_aBuf); - } - else - { - if (pts) - { - aPts = pts; - m_aDecoder.DecodeLpcm(pesFrame.GetEsStart(), pesFrame.GetEsLength(), pts, m_aBuf); - - if (m_synchState == DXR3_DEMUX_VIDEO_SYNCHED) - { - m_synchState = DXR3_DEMUX_SYNCHED; - } - else - { - m_synchState = DXR3_DEMUX_AUDIO_SYNCHED; - } - if (m_synchState == DXR3_DEMUX_SYNCHED) - { - if (!vPts) vPts = aPts; - if (aPts < vPts) - { - pcr = aPts - PRE_BUFFER_LENGTH; - } - else - { - pcr = vPts - PRE_BUFFER_LENGTH; - } - m_dxr3Device.SetSysClock(pcr); - m_dxr3Device.SetPlayMode(); - m_dxr3Device.EnableVideo(); - m_dxr3Device.EnableAudio(); - m_vBuf.Start(); - m_aBuf.Start(); - } - } - } - } - else if (pesFrame.GetPesDataType() == cDxr3PesFrame::PES_PRIVATE_DATA - && m_demuxMode != DXR3_DEMUX_VIDEO_ONLY_MODE - && cDxr3ConfigData::Instance().GetAc3OutPut() - && bAc3Dts) - { - if (m_synchState == DXR3_DEMUX_AUDIO_SYNCHED || m_synchState == DXR3_DEMUX_SYNCHED) - { - m_aDecoder.DecodeAc3Dts(pesFrame.GetPesStart(), pesFrame.GetEsStart(), pesFrame.GetEsLength(), pts, m_aBuf); - } - else - { - if (pts) - { - aPts = pts; - m_aDecoder.DecodeAc3Dts(pesFrame.GetPesStart(), pesFrame.GetEsStart(), pesFrame.GetEsLength(), pts, m_aBuf); - - if (m_synchState == DXR3_DEMUX_VIDEO_SYNCHED) - { - m_synchState = DXR3_DEMUX_SYNCHED; - } - else - { - m_synchState = DXR3_DEMUX_AUDIO_SYNCHED; - } - if (m_synchState == DXR3_DEMUX_SYNCHED) - { - if (!vPts) vPts = aPts; - if (aPts < vPts) - { - pcr = aPts - PRE_BUFFER_LENGTH; - } - else - { - pcr = vPts - PRE_BUFFER_LENGTH; - } - m_dxr3Device.SetSysClock(pcr); - m_dxr3Device.SetPlayMode(); - m_dxr3Device.EnableVideo(); - m_dxr3Device.EnableAudio(); - m_vBuf.Start(); - m_aBuf.Start(); - } - } - } - - } - - if (pesFrame.IsValid()) - { - pesFrame.ExtractNextFrame(pesFrame.GetNextStart(), pesFrame.GetRemainingLength()); - } - - } - - length -= pesFrame.GetRemainingLength(); - - // if (m_demuxMode == DXR3_DEMUX_TRICK_MODE) return origLength; - return length; - } - catch (cDxr3PesFrame::ePesFrameError err) - { - dsyslog("cDxr3DemuxDevice::DemuxPes() ePesFrameError skipping data and resync"); - Resync(); - return origLength; - } - catch (cDxr3SyncBuffer::eSyncBufferException err) - { - Stop(); - return origLength; - } -} - -// ================================== -int cDxr3DemuxDevice::DemuxAudioPes(const uint8_t* buf, int length) -{ - static int syncCounter = 0; - int origLength = length; - - m_demuxMode = DXR3_DEMUX_AUDIO_ONLY_MODE; - m_aBuf.SetDemuxMode(DXR3_DEMUX_REPLAY_MODE); - m_vBuf.SetDemuxMode(DXR3_DEMUX_REPLAY_MODE); - - try - { - cDxr3PesFrame pesFrame; - - pesFrame.ExtractNextFrame(buf, length); - - while (pesFrame.IsValid()) - { - if (pesFrame.GetPesDataType() == cDxr3PesFrame::PES_PRIVATE_DATA) - { - if (m_synchState != DXR3_DEMUX_AUDIO_SYNCHED && syncCounter > 2) - { - m_synchState = DXR3_DEMUX_AUDIO_SYNCHED; - m_dxr3Device.SetPlayMode(); - m_dxr3Device.EnableVideo(); - m_dxr3Device.EnableAudio(); - m_vBuf.Start(); - m_aBuf.Start(); - } - if (m_synchState != DXR3_DEMUX_AUDIO_SYNCHED && syncCounter <= 2) - { - syncCounter++; - } - while (!m_aBuf.Poll(100)); - m_aDecoder.DecodeLpcm(pesFrame.GetEsStart(), pesFrame.GetEsLength(), 0, m_aBuf); - - } - - if (pesFrame.IsValid()) - { - pesFrame.ExtractNextFrame(pesFrame.GetNextStart(), pesFrame.GetRemainingLength()); - } - } - - length -= pesFrame.GetRemainingLength(); - - return length; - } - catch (cDxr3PesFrame::ePesFrameError err) - { - dsyslog("cDxr3DemuxDevice::DemuxAudioPes() ePesFrameError skipping data and resync"); - Stop(); - return origLength; - } -} - -// Local variables: -// mode: c++ -// c-file-style: "stroustrup" -// c-file-offsets: ((inline-open . 0)) -// indent-tabs-mode: t -// End: diff --git a/dxr3demuxdevice.h b/dxr3demuxdevice.h deleted file mode 100644 index 3eb15c3..0000000 --- a/dxr3demuxdevice.h +++ /dev/null @@ -1,91 +0,0 @@ -/* - * dxr3demuxdevice.h - * - * Copyright (C) 2002-2004 Kai Möller - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation; either version 2.1 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - */ - -#ifndef __DXR3_DEMUX_DEVICE_H -#define __DXR3_DEMUX_DEVICE_H - -#include "dxr3vdrincludes.h" -#include "dxr3generaldefines.h" -#include "dxr3syncbuffer.h" -#include "dxr3audiodecoder.h" -#include "dxr3outputthread.h" - -const int AUDIO_MAX_BUFFER_SIZE = 200; -const int VIDEO_MAX_BUFFER_SIZE = 500; - -const int AUIDO_MAX_FRAME_SIZE = 5000; -const int VIDEO_MAX_FRAME_SIZE = 3000; -const uint32_t PRE_BUFFER_LENGTH = 0; - -// ================================== -// extract video and audio -class cDxr3DemuxDevice -{ -public: - cDxr3DemuxDevice(); - cDxr3DemuxDevice(cDxr3Interface& dxr3Device); - ~cDxr3DemuxDevice(); - -public: - void Stop(void); - void Resync(void); - void Clear(void); - void Init(void); - void SetTvMode(void); - void SetAudioOnlyMode(void); - void SetVideoOnlyMode(void); - void SetReplayMode(void); - void SetTrickMode(eDxr3TrickState trickState, int Speed = 1); - - int DemuxPes(const uint8_t* buf, int length, bool bAc3Dts = false); - int DemuxAudioPes(const uint8_t* buf, int length); - void StillPicture(const uint8_t* buf, int length); - - eDxr3DemuxMode GetDemuxMode(void) { return m_demuxMode;}; - eDxr3TrickState GetTrickState(void) { return m_trickState;}; - bool Poll(int TimeoutMs){ return m_aBuf.Poll(TimeoutMs) && m_vBuf.Poll(TimeoutMs); }; - // { return m_demuxMode == DXR3_DEMUX_AUDIO_ONLY_MODE ? m_aBuf.Poll(TimeoutMs) : m_aBuf.Poll(TimeoutMs); }; - -protected: - cDxr3Interface& m_dxr3Device; - cDxr3SyncBuffer m_aBuf; - cDxr3SyncBuffer m_vBuf; - eDxr3DemuxSynchState m_synchState; - eDxr3DemuxMode m_demuxMode; - eDxr3TrickState m_trickState; - cDxr3AudioDecoder m_aDecoder; - cDxr3AudioOutThread* m_pAudioThread; - cDxr3VideoOutThread* m_pVideoThread; - uint32_t m_stopScr; - int m_ReUseFrame; // how often a frame should be used - -private: - cDxr3DemuxDevice(cDxr3DemuxDevice&); // no copy constructor -}; - -#endif // __DXR3_DEMUX_DEVICE_H - -// Local variables: -// mode: c++ -// c-file-style: "stroustrup" -// c-file-offsets: ((inline-open . 0)) -// indent-tabs-mode: t -// End: diff --git a/dxr3device.c b/dxr3device.c deleted file mode 100644 index 2e206aa..0000000 --- a/dxr3device.c +++ /dev/null @@ -1,500 +0,0 @@ -/* - * dxr3device.c - * - * Copyright (C) 2002-2004 Kai Möller - * Copyright (C) 2004 Christian Gmeiner - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation; either version 2.1 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - */ - -#include "dxr3device.h" -#include "dxr3configdata.h" -#include "dxr3interface.h" -#include "dxr3tools.h" -#include "dxr3log.h" -#include "dxr3osd.h" - -extern "C" -{ - #include <jpeglib.h> -} - -// ================================== -//! constructor -cDxr3Device::cDxr3Device() : m_DemuxDevice(cDxr3Interface::Instance()) -{ - m_Offset = 0; - m_strBuf.erase(m_strBuf.begin(), m_strBuf.end()); - m_spuDecoder = NULL; - m_AC3Present = false; - m_CalledBySet = false; -} - -// ================================== -cDxr3Device::~cDxr3Device() -{ - if (m_spuDecoder) - { - delete m_spuDecoder; - } -} - -// ================================== -void cDxr3Device::MakePrimaryDevice(bool On) -{ - new cDxr3OsdProvider(); -} - -// replaying -// ================================== -//! does we have an mpeg2 devocer? -bool cDxr3Device::HasDecoder() const -{ - // sure we have one ;) - return true; -} - -// ================================== -//! can we replay vdr recordings? -bool cDxr3Device::CanReplay() const -{ - // also sure... - return true; -} - -// ================================== -bool cDxr3Device::SetPlayMode(ePlayMode PlayMode) -{ - if (cDxr3ConfigData::Instance().GetDebug()) - { - switch (PlayMode) - { - case pmNone: - cLog::Instance() << "cDxr3Device::SetPlayMode audio/video from decoder\n"; - break; - - case pmAudioVideo: - cLog::Instance() << "cDxr3Device::SetPlayMode audio/video from player\n"; - break; - - case pmAudioOnly: - cLog::Instance() << "cDxr3Device::SetPlayMode audio only from player, video from decoder\n"; - break; - - case pmAudioOnlyBlack: - cLog::Instance() << "cDxr3Device::SetPlayMode audio only from player, no video (black screen)\n"; - break; - - case pmExtern_THIS_SHOULD_BE_AVOIDED: - cLog::Instance() << "cDxr3Device::SetPlayMode this should be avoided\n"; - break; - - case pmVideoOnly: - cLog::Instance() << "cDxr3Device::SetPlayMode video only from player, audio from decoder\n"; - break; - } - } - - if (PlayMode == pmExtern_THIS_SHOULD_BE_AVOIDED) - { - Tools::WriteInfoToOsd(tr("DXR3: releasing devices")); - cDxr3Interface::Instance().ExternalReleaseDevices(); - } - else - { - cDxr3Interface::Instance().ExternalReopenDevices(); - } - - // should this relay be here? - m_Offset = 0; - m_AC3Present = false; - m_strBuf.erase(m_strBuf.begin(), m_strBuf.end()); - - if (PlayMode == pmAudioOnlyBlack) - { - m_PlayMode = pmAudioOnly; - } - else - { - m_PlayMode = PlayMode; - } - - if (m_PlayMode == pmAudioVideo) - { - m_DemuxDevice.SetReplayMode(); - } - - if (m_PlayMode == pmNone) - { - m_DemuxDevice.Stop(); - } - - cLog::Instance() << "Setting audio mode..."; - - if (cDxr3ConfigData::Instance().GetUseDigitalOut()) - { - if (cDxr3ConfigData::Instance().GetAc3OutPut() && m_CalledBySet) - { - cDxr3Interface::Instance().SetAudioDigitalAC3(); // !!! FIXME - cLog::Instance() << "ac3\n"; - } - else - { - cDxr3Interface::Instance().SetAudioDigitalPCM(); - cDxr3ConfigData::Instance().SetAc3OutPut(0); - cLog::Instance() << "digital pcm\n"; - } - } - else - { - cDxr3Interface::Instance().SetAudioAnalog(); - cLog::Instance() << "analog\n"; - } - - return true; -} - -// ================================== -int64_t cDxr3Device::GetSTC() -{ - return cDxr3Interface::Instance().GetPts(); -} - -// ================================== -void cDxr3Device::TrickSpeed(int Speed) -{ - if (cDxr3ConfigData::Instance().GetDebug()) - { - cLog::Instance() << "cDxr3Device::TrickSpeed(int Speed): " << Speed << "\n"; - } - - - m_DemuxDevice.SetTrickMode(DXR3_FAST, Speed); - - -/* - switch (Speed) - { - case 6: - cLog::Instance() << "Trickspeed: 1x vorwärts\n"; - break; - - case 3: - cLog::Instance() << "Trickspeed: 2x vorwärts\n"; - break; - - case 1: - cLog::Instance() << "Trickspeed: 3x vorwärts\n"; - break; - }; -*/ -/* - 6 ... 1x vowärts - 3 ... 2x vowärts - 1 ... 2x vowärts - - 6 ... 1x rückwärts - 3 ... 2x rückwärts - 1 ... 3x rückwärts - - 8 ... 1x vorwörts, wenn Pause gedrückt -*/ - - /* -#define EM8300_PLAYMODE_PAUSED 1 -#define EM8300_PLAYMODE_SLOWFORWARDS 2 -#define EM8300_PLAYMODE_SLOWBACKWARDS 3 -#define EM8300_PLAYMODE_SINGLESTEP 4 - */ - /* - if (Speed == 8) - { - cDxr3Interface::Instance().SingleStep(); - } - else - { - m_DemuxDevice.SetTrickMode(DXR3_FAST); - }*/ -} - -// ================================== -//! clear our demux buffer -void cDxr3Device::Clear() -{ - m_DemuxDevice.Clear(); - m_Offset = 0; - m_strBuf.erase(m_strBuf.begin(), m_strBuf.end()); -} - -// ================================== -//! play a recording -void cDxr3Device::Play() -{ - m_DemuxDevice.SetReplayMode(); - m_Offset = 0; - ///< free buffer - m_strBuf.erase(m_strBuf.begin(), m_strBuf.end()); -} - -// ================================== -//! puts the device into "freeze frame" mode -void cDxr3Device::Freeze() -{ - m_DemuxDevice.SetTrickMode(DXR3_FREEZE); -} - -// ================================== -void cDxr3Device::Mute() -{ - m_DemuxDevice.SetTrickMode(DXR3_FAST); -} - -// ================================== -//! displays the given I-frame as a still picture. -void cDxr3Device::StillPicture(const uchar *Data, int Length) -{ - m_DemuxDevice.StillPicture(Data, Length); -} - -// ================================== -bool cDxr3Device::Poll(cPoller &Poller, int TimeoutMs) -{ - if ((m_DemuxDevice.GetDemuxMode() == DXR3_DEMUX_TRICK_MODE && - m_DemuxDevice.GetTrickState() == DXR3_FREEZE) || - cDxr3Interface::Instance().IsExternalReleased()) - { -#if VDRVERSNUM >= 10314 - cCondWait::SleepMs(TimeoutMs); -#else - usleep(TimeoutMs * 1000); -#endif - return false; - } - return m_DemuxDevice.Poll(TimeoutMs); // Poller.Poll(TimeoutMs); -} - -// ================================== -//! actually plays the given data block as video -int cDxr3Device::PlayVideo(const uchar *Data, int Length) -{ - int retLength = 0; - int origLength = Length; - - if ((m_DemuxDevice.GetDemuxMode() == DXR3_DEMUX_TRICK_MODE && - m_DemuxDevice.GetTrickState() == DXR3_FREEZE) || cDxr3Interface::Instance().IsExternalReleased()) - { - // Why is here so a huge time waster? - //usleep(1000000); - return -1; - } - - if (m_strBuf.length()) - { - m_strBuf.append((const char*)Data, Length); - - if (m_PlayMode == pmAudioOnly) - { - retLength = m_DemuxDevice.DemuxAudioPes((const uint8_t*)m_strBuf.data(), m_strBuf.length()); - } - else - { - retLength = m_DemuxDevice.DemuxPes((const uint8_t*)m_strBuf.data(), m_strBuf.length()); - } - } - else - { - if (m_PlayMode == pmAudioOnly) - { - retLength = m_DemuxDevice.DemuxAudioPes((const uint8_t*)Data, Length); - } - else - { - retLength = m_DemuxDevice.DemuxPes((const uint8_t*)Data, Length); - } - } - - Length -= retLength; - - if (m_strBuf.length()) - { - m_strBuf.erase(m_strBuf.length() - retLength, retLength); - } - else - { - if (Length) - { - m_strBuf.append((const char*)(Data + retLength), Length); - } - } - - return origLength; -} - -// ================================== -// plays additional audio streams, like Dolby Digital -#if VDRVERSNUM >= 10318 - int cDxr3Device::PlayAudio(const uchar *Data, int Length) -#else - void cDxr3Device::PlayAudio(const uchar *Data, int Length) -#endif -{ - int retLength = 0; -#if VDRVERSNUM >= 10318 - int origLength = Length; -#endif - - m_AC3Present = true; - - if ((m_DemuxDevice.GetDemuxMode() == DXR3_DEMUX_TRICK_MODE && - m_DemuxDevice.GetTrickState() == DXR3_FREEZE) || cDxr3Interface::Instance().IsExternalReleased()) - { - //usleep(1000000); - -#if VDRVERSNUM >= 10318 - return 0; -#else - return; -#endif - } - - if (m_strBuf.length()) - { - m_strBuf.append((const char*)Data, Length); - retLength = m_DemuxDevice.DemuxPes((const uint8_t*)m_strBuf.data(), m_strBuf.length(), true); - } - else - { - retLength = m_DemuxDevice.DemuxPes((const uint8_t*)Data, Length, true); - } - - Length -= retLength; - - if (m_strBuf.length()) - { - m_strBuf.erase(m_strBuf.length() - retLength, retLength); - } - else - { - if (Length) - { - m_strBuf.append((const char*)(Data + retLength), Length); - } - } - -#if VDRVERSNUM >= 10318 - return origLength; -#endif -} - -// addition functions -// ================================== -//! capture a single frame as an image -bool cDxr3Device::GrabImage(const char *FileName, bool Jpeg, int Quality, int SizeX, int SizeY) -{ - int w = SizeX; - int h = SizeY; - unsigned char *Data = new unsigned char[w*h*3]; - memset(Data, 0, w*h*3); - - // we could get a I-Frame and save it - //m_DemuxDevice.StillPicture(Data, 100*1024); - - isyslog("grabbing to %s (%s %d %d %d)", FileName, Jpeg ? "JPEG" : "PNM", Quality, w, h); - FILE *f = fopen(FileName, "wb"); - if (f) - { - if (Jpeg) - { - ///< write JPEG file: - struct jpeg_compress_struct cinfo; - struct jpeg_error_mgr jerr; - cinfo.err = jpeg_std_error(&jerr); - jpeg_create_compress(&cinfo); - jpeg_stdio_dest(&cinfo, f); - cinfo.image_width = w; - cinfo.image_height = h; - cinfo.input_components = 3; - cinfo.in_color_space = JCS_RGB; - - jpeg_set_defaults(&cinfo); - jpeg_set_quality(&cinfo, Quality, true); - jpeg_start_compress(&cinfo, true); - - int rs = w * 3; - JSAMPROW rp[h]; - for (int k = 0; k < h; k++) - { - rp[k] = &Data[rs * k]; - } - jpeg_write_scanlines(&cinfo, rp, h); - jpeg_finish_compress(&cinfo); - jpeg_destroy_compress(&cinfo); - - } - else - { - ///< write PNM file: - if (fprintf(f, "P6\n%d\n%d\n255\n", w, h) < 0 || - fwrite(Data, w * h * 3, 1, f) != 1) - { - LOG_ERROR_STR(FileName); - } - } - fclose(f); - } - else - { - return false; - } - - delete Data; - return true; -} - -// ================================== -void cDxr3Device::SetVideoFormat(bool VideoFormat16_9) -{ - if (cDxr3ConfigData::Instance().GetDebug()) - { - cLog::Instance() << "cDxr3Device::SetPlayMode(ePlayMode PlayMode)() done\n"; - } - // Do we need this function? -} - -// ================================== -//! sets volume for audio output -void cDxr3Device::SetVolumeDevice(int Volume) -{ - cDxr3Interface::Instance().SetVolume(Volume); -} - -// ================================== -// get spudecoder -cSpuDecoder *cDxr3Device::GetSpuDecoder(void) -{ - if (!m_spuDecoder && IsPrimaryDevice()) - { - m_spuDecoder = new cDxr3SpuDecoder(); - } - return m_spuDecoder; -} - -// Local variables: -// mode: c++ -// c-file-style: "stroustrup" -// c-file-offsets: ((inline-open . 0)) -// indent-tabs-mode: t -// End: diff --git a/dxr3device.h b/dxr3device.h deleted file mode 100644 index 15778a5..0000000 --- a/dxr3device.h +++ /dev/null @@ -1,98 +0,0 @@ -/* - * dxr3device.h - * - * Copyright (C) 2002-2004 Kai Möller - * Copyright (C) 2004 Christian Gmeiner - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation; either version 2.1 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - */ - -#ifndef _DXR3_DEVICE_H_ -#define _DXR3_DEVICE_H_ - -#include "dxr3interface.h" -#include "dxr3log.h" -#include "dxr3demuxdevice.h" -#include "dxr3spudecoder.h" -#include <string> - -// ================================== -// our device :) -/*! - cDxr3Device is the interface for VDR devices. - Is is the part, which VDR "talks" with our plugin. -*/ -class cDxr3Device : public cDevice, public Singleton<cDxr3Device> -{ -public: - cDxr3Device(); - cDxr3Device(cDxr3Interface& demuxDevice); - ~cDxr3Device(); - - virtual void MakePrimaryDevice(bool On); - - // replaying - virtual bool HasDecoder() const; - virtual bool CanReplay() const; - virtual bool SetPlayMode(ePlayMode PlayMode); - virtual int64_t GetSTC(); - virtual void TrickSpeed(int Speed); - virtual void Clear(); - virtual void Play(); - virtual void Freeze(); - virtual void Mute(); - virtual void StillPicture(const uchar *Data, int Length); - virtual bool Poll(cPoller &Poller, int TimeoutMs = 0); - virtual int PlayVideo(const uchar *Data, int Length); -#if VDRVERSNUM >= 10318 - virtual int PlayAudio(const uchar *Data, int Length); -#else - virtual void PlayAudio(const uchar *Data, int Length); -#endif - - // addition functions - virtual bool GrabImage(const char *FileName, bool Jpeg = true, int Quality = -1, int SizeX = -1, int SizeY = -1); - virtual void SetVideoFormat(bool VideoFormat16_9); - virtual void SetVolumeDevice(int Volume); - - // osd - virtual cSpuDecoder *GetSpuDecoder(); - - // helper function - void Reset() { m_CalledBySet = true; SetPlayMode(m_PlayMode); m_CalledBySet = false; } - -protected: - ePlayMode m_PlayMode; - cDxr3DemuxDevice m_DemuxDevice; - bool m_AC3Present; - bool m_CalledBySet; - std::string m_strBuf; - int m_Offset; - - //virtual bool SetPlayMode(ePlayMode PlayMode); - //uint8_t m_pBuffer[MAX_VIDEO_BUFFER_SIZE]; - //cDxr3StartStopThread* m_pStartStopThread; - cDxr3SpuDecoder* m_spuDecoder; -}; - -#endif /*_DXR3_DEVICE_H_*/ - -// Local variables: -// mode: c++ -// c-file-style: "stroustrup" -// c-file-offsets: ((inline-open . 0)) -// indent-tabs-mode: t -// End: diff --git a/dxr3dolbydigital.c b/dxr3dolbydigital.c deleted file mode 100644 index e92b752..0000000 --- a/dxr3dolbydigital.c +++ /dev/null @@ -1,65 +0,0 @@ -/* -* dxr3dolbydigital.c -* -* Copyright (C) 2004 Christian Gmeiner -* -* This program is free software; you can redistribute it and/or -* modify it under the terms of the GNU Lesser General Public License -* as published by the Free Software Foundation; either version 2.1 -* of the License, or (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU Lesser General Public License -* along with this program; if not, write to the Free Software -* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -* -*/ - -#include "dxr3dolbydigital.h" -#include "dxr3device.h" -#include "dxr3configdata.h" - -// ================================== -//! play -#if VDRVERSNUM > 10320 -void cDxr3DolbyDigital::Play(const uchar *Data, int Length, uchar Id) -// TODO: this fixes the build, but according to reports, there's no audio. -#else -void cDxr3DolbyDigital::Play(const uchar *Data, int Length) -#endif -{ - if (cDxr3ConfigData::Instance().GetUseDigitalOut()) - { - // call simply cDxr3Device::PlayAudio - cDxr3Device::Instance().PlayAudio(Data, Length); - } -} - -// ================================== -// -void cDxr3DolbyDigital::Mute(bool On) -{ -} - -// ================================== -// -void cDxr3DolbyDigital::Clear() -{ -} - -// ================================== -// -void cDxr3DolbyDigital::Action() -{ -} - -// Local variables: -// mode: c++ -// c-file-style: "stroustrup" -// c-file-offsets: ((inline-open . 0)) -// indent-tabs-mode: t -// End: diff --git a/dxr3dolbydigital.h b/dxr3dolbydigital.h deleted file mode 100644 index c347af3..0000000 --- a/dxr3dolbydigital.h +++ /dev/null @@ -1,56 +0,0 @@ -/* -* dxr3dolbydigital.h -* -* Copyright (C) 2004 Christian Gmeiner -* -* This program is free software; you can redistribute it and/or -* modify it under the terms of the GNU Lesser General Public License -* as published by the Free Software Foundation; either version 2.1 -* of the License, or (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU Lesser General Public License -* along with this program; if not, write to the Free Software -* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -* -*/ - -#ifndef _DXR3_DOLBYDIGITAL_H_ -#define _DXR3_DOLBYDIGITAL_H_ - -#include "dxr3vdrincludes.h" - -// ================================== -//! interface to vdr to output dolby digital via dxr3 -/* - With this class it is possible to listen real ac3 from - vdr :) -*/ -class cDxr3DolbyDigital : public cAudio, private cThread -{ -public: - cDxr3DolbyDigital() {} -#if VDRVERSNUM > 10320 - virtual void Play(const uchar *Data, int Length, uchar Id); -#else - virtual void Play(const uchar *Data, int Length); -#endif - virtual void Mute(bool On); - virtual void Clear(); - -private: - virtual void Action(); -}; - -#endif /*_DXR3_DOLBYDIGITAL_H_*/ - -// Local variables: -// mode: c++ -// c-file-style: "stroustrup" -// c-file-offsets: ((inline-open . 0)) -// indent-tabs-mode: t -// End: diff --git a/dxr3ffmpeg.c b/dxr3ffmpeg.c deleted file mode 100644 index 7c146ae..0000000 --- a/dxr3ffmpeg.c +++ /dev/null @@ -1,97 +0,0 @@ -/* - * dxr3ffmpeg.c - * - * Copyright (C) 2004 Christian Gmeiner - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation; either version 2.1 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - */ - -#include "dxr3ffmpeg.h" -#include "dxr3configdata.h" -#include "dxr3log.h" - -// ================================== -//! constructor -cDxr3Ffmepg::cDxr3Ffmepg() -{ - avcodec_init(); - avcodec_register_all(); -} - -// ================================== -//! look if Codec is supported by ffmpeg -bool cDxr3Ffmepg::FindCodec(struct Dxr3Codec& Codec) -{ - // find codec - Codec.codec = avcodec_find_decoder(Codec.id); - - if (!Codec.codec) - { - // codec is't supported by ffmpeg - if (cDxr3ConfigData::Instance().GetDebug()) - { - cLog::Instance() << "cDxr3Ffmepg::OpenCodec(struct Dxr3Codec& Codec) codec not found (" << Codec.id << ")\n"; - } - return false; - } - - // init codec_context - memset(&Codec.codec_context, 0, sizeof(Codec.codec_context)); - - return true; -} - -// ================================== -//! try to open Codec -bool cDxr3Ffmepg::OpenCodec(struct Dxr3Codec& Codec) -{ - // try to open codec - int result = avcodec_open(&Codec.codec_context, Codec.codec); - - if (result < 0) - { - // we could not open codec - if (cDxr3ConfigData::Instance().GetDebug()) - { - cLog::Instance() << "cDxr3Ffmepg::OpenCodec(struct Dxr3Codec& Codec) coudnt open codec (" << Codec.id << ")\n"; - } - return false; - } - else - { - Codec.Open = true; - } - - return true; -} - -// ================================== -//! close codec -void cDxr3Ffmepg::CloseCodec(struct Dxr3Codec& Codec) -{ - if (Codec.Open) - { - avcodec_close(&Codec.codec_context); - Codec.Open = false; - } -} - -// Local variables: -// mode: c++ -// c-file-style: "stroustrup" -// c-file-offsets: ((inline-open . 0)) -// indent-tabs-mode: t -// End: diff --git a/dxr3ffmpeg.h b/dxr3ffmpeg.h deleted file mode 100644 index c05c749..0000000 --- a/dxr3ffmpeg.h +++ /dev/null @@ -1,75 +0,0 @@ -/* - * dxr3ffmpeg.h - * - * Copyright (C) 2004 Christian Gmeiner - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation; either version 2.1 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - */ - -#ifndef _DXR3_FFMPEG_H_ -#define _DXR3_FFMPEG_H_ - -extern "C" -{ - #include <avcodec.h> -} - -#include <string.h> -#include "dxr3singleton.h" - -// ================================== -//! a codec used by this plugin -struct Dxr3Codec -{ - Dxr3Codec() : Open(false) {} - - AVCodec* codec; ///< ffmpeg's AVCodec - AVCodecContext codec_context; ///< ffmpeg's AVCodecContext - enum CodecID id; ///< id's from ffmpeg - like CODEC_ID_MP2 - bool Open; ///< is codec open? -}; - -// ================================== -// class to work with ffmpeg -/*! - With cDxr3Ffmepg you can easily handle as many - codecs as you want. - At the moment we need this only for - the audiodecoder, but in future i want to use - it for ohter nice stuff :) -*/ -class cDxr3Ffmepg : public Singleton<cDxr3Ffmepg> -{ -public: - cDxr3Ffmepg(); - ~cDxr3Ffmepg() {} - - bool FindCodec(struct Dxr3Codec& Codec); - bool OpenCodec(struct Dxr3Codec& Codec); - void CloseCodec(struct Dxr3Codec& Codec); - -private: - cDxr3Ffmepg(cDxr3Ffmepg&); // no copy constructor -}; - -#endif /*_DXR3_FFMPEG_H_*/ - -// Local variables: -// mode: c++ -// c-file-style: "stroustrup" -// c-file-offsets: ((inline-open . 0)) -// indent-tabs-mode: t -// End: diff --git a/dxr3generaldefines.h b/dxr3generaldefines.h deleted file mode 100644 index e0c1d35..0000000 --- a/dxr3generaldefines.h +++ /dev/null @@ -1,54 +0,0 @@ -/* - * dxr3generaldefines.h - * - * Copyright (C) 2002-2004 Kai Möller - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation; either version 2.1 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - */ - -#ifndef __DXR3_GENERAL_DEFINES_H -#define __DXR3_GENERAL_DEFINES_H - -enum eDxr3DemuxSynchState { - DXR3_DEMUX_AUDIO_SYNCHED, - DXR3_DEMUX_VIDEO_SYNCHED, - DXR3_DEMUX_SYNCHED, - DXR3_DEMUX_UNSYNCHED -}; - -enum eDxr3DemuxMode { - DXR3_DEMUX_TV_MODE, - DXR3_DEMUX_REPLAY_MODE, - DXR3_DEMUX_AUDIO_ONLY_MODE, - DXR3_DEMUX_VIDEO_ONLY_MODE, - DXR3_DEMUX_TRICK_MODE, - DXR3_DEMUX_OFF_MODE -}; - -enum eDxr3TrickState { - DXR3_FAST, - DXR3_SLOW, - DXR3_FREEZE, -}; - -#endif // __DXR3_GENERAL_DEFINES_H - -// Local variables: -// mode: c++ -// c-file-style: "stroustrup" -// c-file-offsets: ((inline-open . 0)) -// indent-tabs-mode: t -// End: diff --git a/dxr3i18n.c b/dxr3i18n.c deleted file mode 100644 index dddf504..0000000 --- a/dxr3i18n.c +++ /dev/null @@ -1,659 +0,0 @@ -/* - * dxr3i18n.c - * - * Copyright (C) 2004 Christian Gmeiner - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation; either version 2.1 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - */ - -#include "dxr3i18n.h" - -const char *i18n_name = 0; - -const tI18nPhrase Phrases[] = { - { - "DXR3", - "DXR3", - "", // Slovenski - "DXR3", - "", // Nederlands - "", // Português - "", // Français - "", // Norsk - "DXR3-toiminnot", - "", // Polski - "DXR3", - "", // ÅëëçíéêÜ (Greek) - "", // Svenska - "", // Românã - "", // Magyar - "DXR3", - "", // ÀãááÚØÙ (Russian) - "", // Hrvatski -#if VDRVERSNUM > 10312 - "", // Eesti -#if VDRVERSNUM > 10315 - "", // Dansk -#endif -#endif - }, - { - "Hardware MPEG decoder", - "", // Deutsch - "", // Slovenski - "Decoder MPEG Hardware", - "", // Nederlands - "", // Português - "", // Français - "", // Norsk - "MPEG-purkukortti", - "", // Polski - "Descodificador MPEG Hardware", - "", // ÅëëçíéêÜ (Greek) - "", // Svenska - "", // Românã - "", // Magyar - "Descodificador MPEG Hardware", - "", // ÀãááÚØÙ (Russian) - "", // Hrvatski -#if VDRVERSNUM > 10312 - "", // Eesti -#if VDRVERSNUM > 10315 - "", // Dansk -#endif -#endif - }, - { - "DXR3 Adjustment", - "DXR3 Einstellungen", - "", // Slovenski - "Opzioni DXR3", - "", // Nederlands - "", // Português - "", // Français - "", // Norsk - "DXR3-toiminnot", - "", // Polski - "Opciones DXR3", - "", // ÅëëçíéêÜ (Greek) - "", // Svenska - "", // Românã - "", // Magyar - "Opcions DXR3", - "", // ÀãááÚØÙ (Russian) - "", // Hrvatski -#if VDRVERSNUM > 10312 - "", // Eesti -#if VDRVERSNUM > 10315 - "", // Dansk -#endif -#endif - }, - { - "Digital audio output", - "Digitaler Audioausgang", - "", // Slovenski - "Uscita audio digitale", - "", // Nederlands - "", // Português - "", // Français - "", // Norsk - "Digitaalinen audioulostulo", - "", // Polski - "Salida audio digital", - "", // ÅëëçíéêÜ (Greek) - "", // Svenska - "", // Românã - "", // Magyar - "Sortida àudio digital", - "", // ÀãááÚØÙ (Russian) - "", // Hrvatski -#if VDRVERSNUM > 10312 - "", // Eesti -#if VDRVERSNUM > 10315 - "", // Dansk -#endif -#endif - }, - { - "Card number", - "Karte", - "", // Slovenski - "Scheda", - "", // Nederlands - "", // Português - "", // Français - "", // Norsk - "Kortin järjestysnumero", - "", // Polski - "Tarjeta", - "", // ÅëëçíéêÜ (Greek) - "", // Svenska - "", // Românã - "", // Magyar - "Targeta", - "", // ÀãááÚØÙ (Russian) - "", // Hrvatski -#if VDRVERSNUM > 10312 - "", // Eesti -#if VDRVERSNUM > 10315 - "", // Dansk -#endif -#endif - }, - { - "Video mode", - "Videomodus", - "", // Slovenski - "Modo Video", - "", // Nederlands - "", // Português - "", // Français - "", // Norsk - "Näyttötila", - "", // Polski - "Modalidad vídeo", - "", // ÅëëçíéêÜ (Greek) - "", // Svenska - "", // Românã - "", // Magyar - "Modalitat vídeo", - "", // ÀãááÚØÙ (Russian) - "", // Hrvatski -#if VDRVERSNUM > 10312 - "", // Eesti -#if VDRVERSNUM > 10315 - "", // Dansk -#endif -#endif - }, - { - "PAL", - "PAL", - "", // Slovenski - "PAL", - "", // Nederlands - "", // Português - "", // Français - "", // Norsk - "PAL", - "", // Polski - "PAL", - "", // ÅëëçíéêÜ (Greek) - "", // Svenska - "", // Românã - "", // Magyar - "PAL", - "", // ÀãááÚØÙ (Russian) - "", // Hrvatski -#if VDRVERSNUM > 10312 - "", // Eesti -#if VDRVERSNUM > 10315 - "", // Dansk -#endif -#endif - }, - { - "PAL60", - "PAL60", - "", // Slovenski - "PAL60", - "", // Nederlands - "", // Português - "", // Français - "", // Norsk - "PAL60", - "", // Polski - "PAL60", - "", // ÅëëçíéêÜ (Greek) - "", // Svenska - "", // Românã - "", // Magyar - "PAL60", - "", // ÀãááÚØÙ (Russian) - "", // Hrvatski -#if VDRVERSNUM > 10312 - "", // Eesti -#if VDRVERSNUM > 10315 - "", // Dansk -#endif -#endif - }, - { - "NTSC", - "NTSC", - "", // Slovenski - "NTSC", - "", // Nederlands - "", // Português - "", // Français - "", // Norsk - "NTSC", - "", // Polski - "NTSC", - "", // ÅëëçíéêÜ (Greek) - "", // Svenska - "", // Românã - "", // Magyar - "NTSC", - "", // ÀãááÚØÙ (Russian) - "", // Hrvatski -#if VDRVERSNUM > 10312 - "", // Eesti -#if VDRVERSNUM > 10315 - "", // Dansk -#endif -#endif - }, - { - "Reset DXR3 hardware", - "Reset DXR3 Hardware", - "", // Slovenski - "Reset hardware DXR3", - "", // Nederlands - "", // Português - "", // Français - "", // Norsk - "Palauta kortti alkutilaan", - "", // Polski - "Reset hardware DXR3", - "", // ÅëëçíéêÜ (Greek) - "", // Svenska - "", // Românã - "", // Magyar - "Reset hardware DXR3", - "", // ÀãááÚØÙ (Russian) - "", // Hrvatski -#if VDRVERSNUM > 10312 - "", // Eesti -#if VDRVERSNUM > 10315 - "", // Dansk -#endif -#endif - }, - { - "Toggle force letterbox", - "Letterbox erzwingen", - "", // Slovenski - "Commuta modo letterbox forzato ", - "", // Nederlands - "", // Português - "", // Français - "", // Norsk - "Letterbox-näyttötilan pakotus päälle/pois", - "", // Polski - "Conmuta modalidad letterbox forzada", - "", // ÅëëçíéêÜ (Greek) - "", // Svenska - "", // Românã - "", // Magyar - "Commuta modalitat letterbox forçada", - "", // ÀãááÚØÙ (Russian) - "", // Hrvatski -#if VDRVERSNUM > 10312 - "", // Eesti -#if VDRVERSNUM > 10315 - "", // Dansk -#endif -#endif - }, - { - "Switch to analog audio output", - "Analoge Ausgabe", - "", // Slovenski - "Seleziona uscita audio analogica", - "", // Nederlands - "", // Português - "", // Français - "", // Norsk - "Kytke analoginen audioulostulo", - "", // Polski - "Selecciona salida audio analógica", - "", // ÅëëçíéêÜ (Greek) - "", // Svenska - "", // Românã - "", // Magyar - "Selecciona sortida àudio analògica", - "", // ÀãááÚØÙ (Russian) - "", // Hrvatski -#if VDRVERSNUM > 10312 - "", // Eesti -#if VDRVERSNUM > 10315 - "", // Dansk -#endif -#endif - }, - { - "AC3 output on", - "AC3 Ausgabe Ein", - "", // Slovenski - "Attiva uscita AC3", - "", // Nederlands - "", // Português - "", // Français - "", // Norsk - "AC3-ulostulo päälle", - "", // Polski - "Activa salida AC3", - "", // ÅëëçíéêÜ (Greek) - "", // Svenska - "", // Românã - "", // Magyar - "Activa sortida AC3", - "", // ÀãááÚØÙ (Russian) - "", // Hrvatski -#if VDRVERSNUM > 10312 - "", // Eesti -#if VDRVERSNUM > 10315 - "", // Dansk -#endif -#endif - }, - { - "AC3 output off", - "AC3 Ausgabe Aus", - "", // Slovenski - "Disattiva uscita AC3", - "", // Nederlands - "", // Português - "", // Français - "", // Norsk - "AC3-ulostulo pois", - "", // Polski - "Desactiva salida AC3", - "", // ÅëëçíéêÜ (Greek) - "", // Svenska - "", // Românã - "", // Magyar - "Desactiva sortida AC3", - "", // ÀãááÚØÙ (Russian) - "", // Hrvatski -#if VDRVERSNUM > 10312 - "", // Eesti -#if VDRVERSNUM > 10315 - "", // Dansk -#endif -#endif - }, - { - "Switch to digital audio output", - "Digitaler Ausgang", - "", // Slovenski - "Seleziona uscita audio digitale", - "", // Nederlands - "", // Português - "", // Français - "", // Norsk - "Kytke digitaalinen audioulostulo", - "", // Polski - "Selecciona salida audio digital", - "", // ÅëëçíéêÜ (Greek) - "", // Svenska - "", // Românã - "", // Magyar - "Selecciona sortida àudio digital", - "", // ÀãááÚØÙ (Russian) - "", // Hrvatski -#if VDRVERSNUM > 10312 - "", // Eesti -#if VDRVERSNUM > 10315 - "", // Dansk -#endif -#endif - }, - { - "DXR3: releasing devices", - "DXR3: Releasing Devices", - "", // Slovenski - "DXR3: liberando dispositivo", - "", // Nederlands - "", // Português - "", // Français - "", // Norsk - "DXR3: vapautetaan laitteet", - "", // Polski - "DXR3: liberando dispositivo", - "", // ÅëëçíéêÜ (Greek) - "", // Svenska - "", // Românã - "", // Magyar - "DXR3: alliberant dispositiu", - "", // ÀãááÚØÙ (Russian) - "", // Hrvatski -#if VDRVERSNUM > 10312 - "", // Eesti -#if VDRVERSNUM > 10315 - "", // Dansk -#endif -#endif - }, - { - "Color settings", - "Farbeinstellungen", - "", // Slovenski - "Regolazioni colore", - "", // Nederlands - "", // Português - "", // Français - "", // Norsk - "Väriasetukset", - "", // Polski - "Ajustes color", - "", // ÅëëçíéêÜ (Greek) - "", // Svenska - "", // Românã - "", // Magyar - "Ajustaments color", - "", // ÀãááÚØÙ (Russian) - "", // Hrvatski -#if VDRVERSNUM > 10312 - "", // Eesti -#if VDRVERSNUM > 10315 - "", // Dansk -#endif -#endif - }, - { - "Brightness", - "Helligkeit", - "", // Slovenski - "Luminosità", - "", // Nederlands - "", // Português - "", // Français - "", // Norsk - "Kirkkaus", - "", // Polski - "Luminosidad", - "", // ÅëëçíéêÜ (Greek) - "", // Svenska - "", // Românã - "", // Magyar - "Lluminositat", - "", // ÀãááÚØÙ (Russian) - "", // Hrvatski -#if VDRVERSNUM > 10312 - "", // Eesti -#if VDRVERSNUM > 10315 - "", // Dansk -#endif -#endif - }, - { - "Contrast", - "Kontrast", - "", // Slovenski - "Contrasto", - "", // Nederlands - "", // Português - "", // Français - "", // Norsk - "Kontrasti", - "", // Polski - "Contraste", - "", // ÅëëçíéêÜ (Greek) - "", // Svenska - "", // Românã - "", // Magyar - "Contrast", - "", // ÀãááÚØÙ (Russian) - "", // Hrvatski -#if VDRVERSNUM > 10312 - "", // Eesti -#if VDRVERSNUM > 10315 - "", // Dansk -#endif -#endif - }, - { - "Saturation", - "Sättigung", - "", // Slovenski - "Saturazione", - "", // Nederlands - "", // Português - "", // Français - "", // Norsk - "Värikylläisyys", - "", // Polski - "Saturación", - "", // ÅëëçíéêÜ (Greek) - "", // Svenska - "", // Românã - "", // Magyar - "Saturació", - "", // ÀãááÚØÙ (Russian) - "", // Hrvatski -#if VDRVERSNUM > 10312 - "", // Eesti -#if VDRVERSNUM > 10315 - "", // Dansk -#endif -#endif - }, - { - "Debug mode", - "", // Deutsch - "", // Slovenski - "", // Italiano - "", // Nederlands - "", // Português - "", // Français - "", // Norsk - "Debug-tila", - "", // Polski - "", // Español - "", // ÅëëçíéêÜ (Greek) - "", // Svenska - "", // Românã - "", // Magyar - "", // Català - "", // ÀãááÚØÙ (Russian) - "", // Hrvatski -#if VDRVERSNUM > 10312 - "", // Eesti -#if VDRVERSNUM > 10315 - "", // Dansk -#endif -#endif - }, - { - "Debug level", - "", // Deutsch - "", // Slovenski - "", // Italiano - "", // Nederlands - "", // Português - "", // Français - "", // Norsk - "Debug-taso", - "", // Polski - "", // Español - "", // ÅëëçíéêÜ (Greek) - "", // Svenska - "", // Românã - "", // Magyar - "", // Català - "", // ÀãááÚØÙ (Russian) - "", // Hrvatski -#if VDRVERSNUM > 10312 - "", // Eesti -#if VDRVERSNUM > 10315 - "", // Dansk -#endif -#endif - }, - { - "low", - "", // Deutsch - "", // Slovenski - "", // Italiano - "", // Nederlands - "", // Português - "", // Français - "", // Norsk - "alhainen", - "", // Polski - "", // Español - "", // ÅëëçíéêÜ (Greek) - "", // Svenska - "", // Românã - "", // Magyar - "", // Català - "", // ÀãááÚØÙ (Russian) - "", // Hrvatski -#if VDRVERSNUM > 10312 - "", // Eesti -#if VDRVERSNUM > 10315 - "", // Dansk -#endif -#endif - }, - { - "everything", - "", // Deutsch - "", // Slovenski - "", // Italiano - "", // Nederlands - "", // Português - "", // Français - "", // Norsk - "kaikki", - "", // Polski - "", // Español - "", // ÅëëçíéêÜ (Greek) - "", // Svenska - "", // Românã - "", // Magyar - "", // Català - "", // ÀãááÚØÙ (Russian) - "", // Hrvatski -#if VDRVERSNUM > 10312 - "", // Eesti -#if VDRVERSNUM > 10315 - "", // Dansk -#endif -#endif - }, - { NULL } -}; - -// Local variables: -// mode: c++ -// c-file-style: "stroustrup" -// c-file-offsets: ((inline-open . 0)) -// indent-tabs-mode: t -// End: diff --git a/dxr3i18n.h b/dxr3i18n.h deleted file mode 100644 index 063e773..0000000 --- a/dxr3i18n.h +++ /dev/null @@ -1,36 +0,0 @@ -/* - * dxr3i18n.h - * - * Copyright (C) 2004 Christian Gmeiner - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation; either version 2.1 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - */ - -#ifndef _DXR3_I18N_H_ -#define _DXR3_I18N_H_ - -#include <vdr/i18n.h> - -extern const tI18nPhrase Phrases[]; - -#endif /*_DXR3_I18N_H_*/ - -// Local variables: -// mode: c++ -// c-file-style: "stroustrup" -// c-file-offsets: ((inline-open . 0)) -// indent-tabs-mode: t -// End: diff --git a/dxr3interface.c b/dxr3interface.c deleted file mode 100644 index 7957659..0000000 --- a/dxr3interface.c +++ /dev/null @@ -1,1391 +0,0 @@ -/* - * dxr3interface.c - * - * Copyright (C) 2002-2004 Kai Möller - * Copyright (C) 2004 Christian Gmeiner - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation; either version 2.1 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - */ - -#include <assert.h> -#include <math.h> -#include <sys/soundcard.h> - -#include "dxr3interface.h" -#include "dxr3syncbuffer.h" -#include "dxr3osd.h" - -// ================================== -const int LPCM_HEADER_LENGTH = 7; -const int ZEROBUFFER_SIZE = 4096; -uint8_t zerobuffer[ZEROBUFFER_SIZE] = {0}; -const uint32_t UNKNOWN_AUDIO_MODE = 9; // default, unused value - -// ================================== -//! default spu palette -static unsigned default_palette[16] = -{ - 0xe18080, 0x2b8080, 0x847b9c, 0x51ef5a, 0x7d8080, 0xb48080, - 0xa910a5, 0x6addca, 0xd29210, 0x1c76b8, 0x50505a, 0x30b86d, - 0x5d4792, 0x3dafa5, 0x718947, 0xeb8080 -}; - -// ================================== -//! helper function to generate name -static const char *Dxr3Name(const char *Name, int n) -{ - static char buffer[PATH_MAX]; - snprintf(buffer, sizeof(buffer), "/dev/em8300%s-%d", Name, n); - return buffer; -} - -// ================================== -//! helper function to open card #n -static int Dxr3Open(const char *Name, int n, int Mode) -{ - const char *FileName = Dxr3Name(Name, n); - int fd = open(FileName, Mode); - - if (fd < 0) - { - cLog::Instance() << "Unable to open " << FileName << "\n"; - } - return fd; -} - -// ================================== -//! constructor -cDxr3Interface::cDxr3Interface() : -m_fdControl(-1), m_fdVideo(-1), m_fdAudio(-1), m_fdSpu(-1) -{ - // open control stream - m_fdControl = Dxr3Open("", cDxr3ConfigData::Instance().GetDxr3Card(), O_WRONLY | O_SYNC); - if (m_fdControl < 0) - { - cLog::Instance() << "Please check if the dxr3 modules are loaded!\n"; - exit(1); - } - - // upload microcode to dxr3 - UploadMicroCode(); - - ///< open 'multimedia' streams - m_fdVideo = Dxr3Open("_mv", cDxr3ConfigData::Instance().GetDxr3Card(), O_WRONLY | O_SYNC); - m_fdAudio = Dxr3Open("_ma", cDxr3ConfigData::Instance().GetDxr3Card(), O_WRONLY | O_SYNC); - m_fdSpu = Dxr3Open("_sp", cDxr3ConfigData::Instance().GetDxr3Card(), O_WRONLY | O_SYNC); - - // everything ok? - if (m_fdVideo < 0 || m_fdAudio < 0 || m_fdSpu < 0) - { - cLog::Instance() << "Unable to open one of the 'multimedia' streams!\n"; - exit(1); - } - - // create clock - m_pClock = new cDxr3SysClock(m_fdControl, m_fdVideo, m_fdSpu); - - // everything ok? - if (!m_pClock) - { - cLog::Instance() << "Unable to allocate memory for m_pClock in cDxr3Interface\n"; - exit(1); - } - - // set default values - m_AudioActive = false; - m_VideoActive = false; - m_OverlayActive = false; - m_ExternalReleased = false; - m_volume = 255; - m_horizontal = 720; - m_audioChannelCount = UNKNOWN_CHANNEL_COUNT; - m_audioDataRate = 0; - m_audioSampleSize = 0; - - m_audioMode = UNKNOWN_AUDIO_MODE; - m_aspectRatio = UNKNOWN_ASPECT_RATIO; - m_spuMode = EM8300_SPUMODE_OFF; - - // configure device based on settings - ConfigureDevice(); - - // get bcs values from driver - ioctl(m_fdControl, EM8300_IOCTL_GETBCS, &m_bcs); - - if (cDxr3ConfigData::Instance().GetDebug()) - { - cLog::Instance() << "DXR3: brightness: " << m_bcs.brightness << "\n"; - cLog::Instance() << "DXR3: contrast: " << m_bcs.contrast << "\n"; - cLog::Instance() << "DXR3: saturation: " << m_bcs.saturation << "\n"; - } - - PlayBlackFrame(); - SetChannelCount(1); -} - -// ================================== -//! destructor -cDxr3Interface::~cDxr3Interface() -{ - // close filehandles - if (m_fdControl > -1) - { - close(m_fdControl); - } - if (m_fdVideo > -1) - { - close(m_fdVideo); - } - if (m_fdSpu > -1) - { - close(m_fdSpu); - } - if (m_fdAudio > -1) - { - close(m_fdAudio); - } - - // free some memory - if (m_pClock) - { - delete m_pClock; - } -} - -// main -// ================================== -void cDxr3Interface::Start() -{ -} - -// ================================== -void cDxr3Interface::Stop() -{ -} - -// audio -// ================================== -//! set audio output to analog -void cDxr3Interface::SetAudioAnalog() -{ - Lock(); - int ioval = 0; - - if (!m_ExternalReleased && m_audioMode != EM8300_AUDIOMODE_ANALOG) - { - int prevMode = m_audioMode; - m_audioMode = ioval = EM8300_AUDIOMODE_ANALOG; - if (ioctl(m_fdControl, EM8300_IOCTL_SET_AUDIOMODE, &ioval) < 0) - { - cLog::Instance() << "cDxr3AbsDevice::SetAudioAnalog Unable to set audiomode!\n"; - } - if (prevMode == EM8300_AUDIOMODE_DIGITALAC3) - { - ReOpenAudio(); - } - } - - Unlock(); -} - -// ================================== -//! set audio output to digital pcm -void cDxr3Interface::SetAudioDigitalPCM() -{ - Lock(); - int ioval = 0; - - if (!m_ExternalReleased && m_audioMode != EM8300_AUDIOMODE_DIGITALPCM) - { - int prevMode = m_audioMode; - m_audioMode = ioval = EM8300_AUDIOMODE_DIGITALPCM; - - if (ioctl(m_fdControl, EM8300_IOCTL_SET_AUDIOMODE, &ioval) < 0) - { - cLog::Instance() << "cDxr3AbsDevice::SetAudioAnalog Unable to set audiomode!\n"; - } - if (prevMode == EM8300_AUDIOMODE_DIGITALAC3) - { - ReOpenAudio(); - } - } - - Unlock(); -} - -// ================================== -//! set audio output to digital ac3 -void cDxr3Interface::SetAudioDigitalAC3() -{ - Lock(); - - if (m_audioMode != EM8300_AUDIOMODE_DIGITALAC3) - { - int ioval = 0; - - if (!m_ExternalReleased && m_audioMode != EM8300_AUDIOMODE_DIGITALAC3) - { - m_audioMode = ioval = EM8300_AUDIOMODE_DIGITALAC3; - if (ioctl(m_fdControl, EM8300_IOCTL_SET_AUDIOMODE, &ioval) < 0) - { - cLog::Instance() << "cDxr3AbsDevice::SetAudioAnalog Unable to set audiomode!\n"; - } - ReOpenAudio(); - } - } - - Unlock(); -} - -// ================================== -//! set audio speed -void cDxr3Interface::SetAudioSpeed(uint32_t speed) -{ - Lock(); - - if (m_audioDataRate != speed && speed != UNKNOWN_DATA_RATE) - { - if (!m_ExternalReleased) - { - if (m_audioMode != EM8300_AUDIOMODE_DIGITALAC3) - { - if (ioctl(m_fdAudio, SNDCTL_DSP_SPEED, &speed) < 0) - { - cLog::Instance() << "cDxr3AbsDevice::SetAudioSpeed Unable to set dsp speed\n"; - } - } - } - m_audioDataRate = speed; - } - - Unlock(); -} - -// ================================== -//! set number of channels -void cDxr3Interface::SetChannelCount(uint32_t count) -{ - Lock(); - - if (m_audioChannelCount != count && count != UNKNOWN_CHANNEL_COUNT) - { - if (!m_ExternalReleased) - { - if (m_audioMode != EM8300_AUDIOMODE_DIGITALAC3) - { - if (ioctl(m_fdAudio, SNDCTL_DSP_STEREO, &count) < 0) - { - cLog::Instance() << "cDxr3AbsDevice::SetChannelCount Unable to set channel count\n"; - } - } - } - m_audioChannelCount = count; - } - - Unlock(); -} - -// ================================== -//! set audio sample size -void cDxr3Interface::SetAudioSampleSize(uint32_t sampleSize) -{ - Lock(); - - if (!m_ExternalReleased) - { - if (ioctl(m_fdAudio, SNDCTL_DSP_SAMPLESIZE, sampleSize)) - { - cLog::Instance() <<"cDxr3AbsDevice::SetAudioSampleSize Unable to set audio sample size\n"; - } - } - m_audioSampleSize = sampleSize; - - Unlock(); -} - -// clock -// ================================== -void cDxr3Interface::SetSysClock(uint32_t scr) -{ - Lock(); - - if (!m_ExternalReleased) - { - m_pClock->SetSysClock(scr); - } - - Unlock(); -} - -// ================================== -uint32_t cDxr3Interface::GetSysClock() const -{ - Lock(); - - uint32_t ret = 0; - if (!m_ExternalReleased) - { - ret = m_pClock->GetSysClock(); - } - - Unlock(); - return ret; -} - -// ================================== -int64_t cDxr3Interface::GetPts() -{ - return m_lastSeenPts << 1; -} - -// ================================== -void cDxr3Interface::SetPts(uint32_t pts) -{ - Lock(); - - if (!m_ExternalReleased) - { - m_pClock->SetPts(pts); - } - - Unlock(); -} - -// ================================== -void cDxr3Interface::SetSpuPts(uint32_t pts) -{ - Lock(); - - pts = pts >> 1; - if (!m_ExternalReleased) - { - if (pts > m_pClock->GetSysClock() && pts - m_pClock->GetSysClock() < 100000) - { - m_pClock->SetSpuPts(pts); - } - } - - Unlock(); -} - -// state changes -// ================================== -//! enable subpicture processing of the dxr3 -void cDxr3Interface::EnableSPU() -{ - Lock(); - int ioval = 0; - - if (!m_ExternalReleased && m_spuMode != EM8300_SPUMODE_ON) - { - m_spuMode = ioval = EM8300_SPUMODE_ON; - if (ioctl(m_fdControl, EM8300_IOCTL_SET_SPUMODE, &ioval) < 0) - { - cLog::Instance() << "cDxr3Interface::EnableSPU Unable to set subpicture mode!\n"; - } - } - - Unlock(); -} - -// ================================== -//! disable subpicture proeccesing of the dxr3 -void cDxr3Interface::DisableSPU() -{ - Lock(); - - int ioval = 0; - - if (!m_ExternalReleased && m_spuMode != EM8300_SPUMODE_OFF) - { - m_spuMode = ioval = EM8300_SPUMODE_OFF; - if (ioctl(m_fdControl, EM8300_IOCTL_SET_SPUMODE, &ioval) < 0) - { - cLog::Instance() << "cDxr3Interface::DisableSPU Unable to set subpicture mode!\n"; - } - } - - Unlock(); -} - -// ================================== -//! disable audio output of dxr3 -void cDxr3Interface::DisableAudio() -{ - Lock(); - - m_AudioActive = false; - - // we write zero buffers to dxr3 - if (!m_ExternalReleased) - { - if (write(m_fdAudio, zerobuffer, ZEROBUFFER_SIZE) < 0) Resuscitation(); - if (write(m_fdAudio, zerobuffer, ZEROBUFFER_SIZE) < 0) Resuscitation(); - if (write(m_fdAudio, zerobuffer, ZEROBUFFER_SIZE) < 0) Resuscitation(); - if (write(m_fdAudio, zerobuffer, ZEROBUFFER_SIZE) < 0) Resuscitation(); - } - Unlock(); -} - -// ================================== -//! enable overlay mode of the dxr3 -void cDxr3Interface::EnableOverlay() -{ - Lock(); - - // first check if it is enabled already - if (m_OverlayActive) - { - return; - } - - /* - #define EM8300_OVERLAY_SIGNAL_ONLY 1 - #define EM8300_OVERLAY_SIGNAL_WITH_VGA 2 - #define EM8300_OVERLAY_VGA_ONLY 3 - */ - - int ioval = EM8300_OVERLAY_SIGNAL_WITH_VGA; - // set overlay signal mode - if (ioctl(m_fdControl, EM8300_IOCTL_OVERLAY_SIGNALMODE, &ioval) < 0) - { - //###### - cLog::Instance() << "Signalmode failed\n"; - return; - } - - // setup overlay screen - em8300_overlay_screen_t scr; - scr.xsize = 1024; - scr.ysize = 768; - - if (ioctl(m_fdControl, EM8300_IOCTL_OVERLAY_SETSCREEN, &scr) < 0) - { - //###### - cLog::Instance() << "Setting up screen failed\n"; - return; - } - - // setup overlay window - em8300_overlay_window_t win; - win.xpos = 0; - win.ypos = 0; - win.width = 1024; - win.height = 768; - - if (ioctl(m_fdControl, EM8300_IOCTL_OVERLAY_SETWINDOW, &win) < 0) - { - //###### - cLog::Instance() << "Setting up window failed\n"; - return; - } - - m_OverlayActive = true; - - Unlock(); -} - -// ================================== -//! disable overlay mode of the dxr3 -void cDxr3Interface::DisanleOverlay() -{ - Lock(); - - // is it already disabled - if (!m_OverlayActive) - { - return; - } - - Unlock(); -} - -// set/get functions -// ================================== -//! get aspect ratio -uint32_t cDxr3Interface::GetAspectRatio() const -{ - Lock(); - int ioval = 0; - - if (!m_ExternalReleased) - { - if (ioctl(m_fdControl, EM8300_IOCTL_GET_ASPECTRATIO, &ioval) < 0) - { - cLog::Instance() << "cDxr3Interface::GetAspectRatio Unable to get aspect ratio\n"; - } - } - - Unlock(); - return ioval; -} - -// ================================== -//! set aspect ratio -void cDxr3Interface::SetAspectRatio(uint32_t ratio) -{ - Lock(); - - static int requestCounter = 0; - - if (cDxr3ConfigData::Instance().GetForceLetterBox()) ratio = EM8300_ASPECTRATIO_16_9; - if (Setup.VideoFormat) ratio = EM8300_ASPECTRATIO_4_3; - - if (!m_ExternalReleased && ratio != UNKNOWN_ASPECT_RATIO) - { - if (ratio != m_aspectRatio && requestCounter > 50) - { - requestCounter = 0; - if (ioctl(m_fdControl, EM8300_IOCTL_SET_ASPECTRATIO, &ratio) < 0) - { - cLog::Instance() << "cDxr3Interface::SetAspectRatio Unable to set aspect ratio\n"; - } - else - { - m_aspectRatio = ratio; - } - } - else - { - if (ratio != m_aspectRatio) - { - ++requestCounter; - } - else - { - requestCounter = 0; - } - } - } - - Unlock(); -} - -// play functions -// ================================== -//! set playing mode and start sync engine -void cDxr3Interface::SetPlayMode() -{ - Lock(); - - em8300_register_t reg; - int ioval; - - if (!m_ExternalReleased) - { - ioval = EM8300_SUBDEVICE_AUDIO; - ioctl(m_fdControl, EM8300_IOCTL_FLUSH, &ioval); - fsync(m_fdVideo); - - - ioval = EM8300_PLAYMODE_PLAY; - if (ioctl(m_fdControl, EM8300_IOCTL_SET_PLAYMODE, &ioval) < 0) - { - cLog::Instance() << "cDxr3Interface::SetPlayMode Unable to set playmode!\n"; - } - reg.microcode_register = 1; - reg.reg = 0; - reg.val = MVCOMMAND_SYNC; - - if (ioctl(m_fdControl, EM8300_IOCTL_WRITEREG, ®) < 0) - { - cLog::Instance() << "cDxr3Interface::SetPlayMode Unable to start em8300 sync engine\n"; - } - } - - Unlock(); -} - -// ================================== -void cDxr3Interface::Pause() -{ - Lock(); - - int ioval = EM8300_PLAYMODE_PAUSED; - - if (!m_ExternalReleased) - { - if (ioctl(m_fdControl, EM8300_IOCTL_SET_PLAYMODE, &ioval) < 0) - { - cLog::Instance() << "cDxr3Interface::Pause Unable to set playmode!\n"; - } - } - - Unlock(); -} -// ================================== -void cDxr3Interface::SingleStep() -{ - Lock(); - - int ioval = EM8300_PLAYMODE_SINGLESTEP; - - if (!m_ExternalReleased) - { - if (ioctl(m_fdControl, EM8300_IOCTL_SET_PLAYMODE, &ioval) < 0) { - cLog::Instance() << "cDxr3Interface::SingleStep Unable to set playmode!\n"; - } - } - - Unlock(); -} - -// ================================== -void cDxr3Interface::PlayVideoFrame(cFixedLengthFrame* pFrame, int times) -{ - Lock(); - - int written = 0; - int count = 0; - - if (m_VideoActive) - { - if (!m_ExternalReleased) - { - for (int i = 0; i < times; i++) - { - if (times > 1) - { - cLog::Instance() << "times: " << times << "\n"; - } - - while (written < pFrame->GetCount() && count >= 0) - { - if ((count = write(m_fdVideo, pFrame->GetData() + written, pFrame->GetCount() - written)) < 0) - { - // an error occured - Resuscitation(); - } - written += count; - } - - // reset - written = 0; - } - } - SetAspectRatio(pFrame->GetAspectRatio()); - uint32_t pts = pFrame->GetPts(); - if (pts > 0) m_lastSeenPts = pts; - } - - Unlock(); -} - -// ================================== -void cDxr3Interface::PlayVideoFrame(const uint8_t* pBuf, int length, int times) -{ - Lock(); - - int written = 0; - - if (!m_ExternalReleased) - { - for (int i = 0; i < times; i++) - { - // if (write(m_fdVideo, pBuf, length) < 0) Resuscitation(); - - if ((written = write(m_fdVideo, pBuf, length) < 0)) Resuscitation(); - if (written != length) - { - cLog::Instance() << "cDxr3Interface::PlayVideoFrame(uint8_t* pBuf, int length): Not written = " << length - written << "\n"; - } - } - } - - Unlock(); -} - -// ================================== -void cDxr3Interface::PlayAudioFrame(cFixedLengthFrame* pFrame) -{ - Lock(); - - if (m_AudioActive) - { - SetAudioSpeed(pFrame->GetDataRate()); - SetChannelCount(pFrame->GetChannelCount()); - - if (!m_ExternalReleased) - { - int size = pFrame->GetCount(); - if (!cDxr3ConfigData::Instance().GetAc3OutPut()) ResampleVolume((short*)pFrame->GetData(), pFrame->GetCount()); - - write(m_fdAudio, pFrame->GetData(), size); - } - } - Unlock(); -} - -// ================================== -void cDxr3Interface::PlayAudioFrame(uint8_t* pBuf, int length) -{ - Lock(); - - int written = 0; - - if (!m_ExternalReleased) - { - if (!cDxr3ConfigData::Instance().GetAc3OutPut()) ResampleVolume((short*)pBuf, length); - - if ((written = write(m_fdAudio, pBuf, length) < 0)) Resuscitation(); - if (written != length) - { - cLog::Instance() << "cDxr3Interface::PlayAudioFrame(uint8_t* pBuf, int length): Not written = " << length - written << "\n"; - } - } - - Unlock(); -} - -// ================================== -void cDxr3Interface::PlayAudioLpcmFrame(uint8_t* pBuf, int length) -{ - Lock(); - - if (length > (LPCM_HEADER_LENGTH + 2)) - { - uint8_t* pFrame = new uint8_t[length - LPCM_HEADER_LENGTH]; - assert(!((length - LPCM_HEADER_LENGTH) % 2)); // only even number of bytes are allowed - - for (int i = LPCM_HEADER_LENGTH; i < length; i += 2) - { - pFrame[i - LPCM_HEADER_LENGTH] = pBuf[i + 1]; - pFrame[i - LPCM_HEADER_LENGTH + 1] = pBuf[i]; - } - - int codedSpeed = (pBuf[5] >> 4) & 0x03; - int speed = 0; - - switch (codedSpeed) - { - case 1: - speed = 96000; - break; - - case 2: - speed = 44100; - break; - - case 3: - speed = 32000; - break; - - default: - speed = 48000; - break; - } - - SetAudioSpeed(speed); - PlayAudioFrame(pFrame, length - LPCM_HEADER_LENGTH); - delete[] pFrame; - } - - Unlock(); -} - -// external device access -// ================================== -//! release devices, so mplayer-plugin, for instance, -//! can access the dxr3 -void cDxr3Interface::ExternalReleaseDevices() -{ - Lock(); - - if (!m_ExternalReleased) - { - if (m_fdControl > -1) close(m_fdControl); - if (m_fdVideo > -1) close(m_fdVideo); - if (m_fdSpu > -1) close(m_fdSpu); - if (m_fdAudio > -1) close(m_fdAudio); - m_fdControl = m_fdVideo = m_fdSpu = m_fdAudio = -1; - m_aspectRatio = UNKNOWN_ASPECT_RATIO; - m_audioMode = UNKNOWN_AUDIO_MODE; - - m_ExternalReleased = true; - - delete m_pClock; - m_pClock = 0; - } - - Unlock(); -} - -// ================================== -//! reopen devices for using in the dxr3 plugin -void cDxr3Interface::ExternalReopenDevices() -{ - Lock(); - - if (m_ExternalReleased) - { - // open control stream - m_fdControl = Dxr3Open("", cDxr3ConfigData::Instance().GetDxr3Card(), O_WRONLY | O_SYNC); - - // open 'multimedia' streams - m_fdVideo = Dxr3Open("_mv", cDxr3ConfigData::Instance().GetDxr3Card(), O_WRONLY | O_SYNC); - m_fdAudio = Dxr3Open("_ma", cDxr3ConfigData::Instance().GetDxr3Card(), O_WRONLY | O_SYNC); - m_fdSpu = Dxr3Open("_sp", cDxr3ConfigData::Instance().GetDxr3Card(), O_WRONLY | O_SYNC); - - if (m_fdControl < 0 || m_fdVideo < 0 || m_fdAudio < 0 || m_fdSpu <0) - { - ExternalReleaseDevices(); - } - else - { - m_pClock = new cDxr3SysClock(m_fdControl, m_fdVideo, m_fdSpu); - if (!m_pClock) - { - cLog::Instance() << "Unable to allocate memory for m_pClock in cDxr3Interface\n"; - exit(1); - } - - SetChannelCount(1); - m_ExternalReleased = false; - } - - Resuscitation(); - } - - Unlock(); -} - - -// tools -// ================================== -//! play black frame on tv -void cDxr3Interface::PlayBlackFrame() -{ - Lock(); - - extern char blackframe[]; - extern int blackframeLength; - - if (!m_ExternalReleased) - { - if (write(m_fdVideo, blackframe, blackframeLength) < 0) Resuscitation(); - if (write(m_fdVideo, blackframe, blackframeLength) < 0) Resuscitation(); - if (write(m_fdVideo, blackframe, blackframeLength) < 0) Resuscitation(); - } - m_horizontal = 720; - - Unlock(); -} - -// ================================== -void cDxr3Interface::ReOpenAudio() -{ - Lock(); - - if (!m_ExternalReleased) - { - if (m_fdAudio > -1) - { - int bufsize = 0; - ioctl(m_fdAudio, SNDCTL_DSP_GETODELAY, &bufsize); - usleep(bufsize / 192 * 1000); - - delete m_pClock; - close(m_fdAudio); - - m_fdAudio = Dxr3Open("_ma", cDxr3ConfigData::Instance().GetDxr3Card(), O_WRONLY | O_SYNC); - - uint32_t tmpAudioDataRate = m_audioDataRate; - uint32_t tmpAudioChannelCount = m_audioChannelCount; - m_audioDataRate = m_audioChannelCount = 0; - m_pClock = new cDxr3SysClock(m_fdControl, m_fdVideo, m_fdSpu); - SetAudioSpeed(tmpAudioDataRate); - SetChannelCount(tmpAudioChannelCount); - } - } - - Unlock(); -} - -// ================================== -//! uploadroutine for microcode -void cDxr3Interface::UploadMicroCode() -{ - Lock(); - - if (cDxr3ConfigData::Instance().GetDebug()) - { - cLog::Instance() << "cDxr3Interface::UploadMicroCode: uploading from " << MICROCODE << "..."; - } - - em8300_microcode_t em8300_microcode; - struct stat s; - - // try to open it - // MICROCODE comes from makefile - int UCODE = open(MICROCODE, O_RDONLY); - - if (UCODE <0) - { - cLog::Instance() << "Unable to open microcode file " << MICROCODE << " for reading\n"; - exit(1); - } - - if (fstat(UCODE, &s ) <0) - { - cLog::Instance() << "Unable to fstat ucode file\n"; - exit(1); - } - - // read microcode - em8300_microcode.ucode = new char[s.st_size]; - if (em8300_microcode.ucode == NULL) - { - cLog::Instance() << "Unable to malloc() space for ucode\n"; - exit(1); - } - - if (read(UCODE,em8300_microcode.ucode,s.st_size) < 1) - { - cLog::Instance() << "Unable to read data from microcode file\n"; - // free memory to avoid memory leak - delete [] (char*) em8300_microcode.ucode; - exit(1); - } - - close(UCODE); - - em8300_microcode.ucode_size = s.st_size; - - // upload it - if( ioctl(m_fdControl, EM8300_IOCTL_INIT, &em8300_microcode) == -1) - { - cLog::Instance() << "Microcode upload to failed!! \n"; - // free memory to avoid memory leak - delete [] (char*) em8300_microcode.ucode; - exit(1); - } - - // free memory to avoid memory leak - delete [] (char*) em8300_microcode.ucode; - - if (cDxr3ConfigData::Instance().GetDebug()) - { - cLog::Instance() << "...done\n"; - } - - Unlock(); -} - -// ================================== -//! config and setup device via ioctl calls -void cDxr3Interface::ConfigureDevice() -{ - Lock(); - - // get videomode from driver - uint32_t videomode_from_driver = 0; - - if (ioctl(m_fdControl, EM8300_IOCTL_GET_VIDEOMODE, &videomode_from_driver) == -1) - { - cLog::Instance() << "Unable to get videomode\n"; - exit(1); - } - - // set video mode - uint32_t videomode = 0; - if (cDxr3ConfigData::Instance().GetVideoMode() == PAL) - { - videomode = EM8300_VIDEOMODE_PAL; - if (cDxr3ConfigData::Instance().GetDebug()) - { - cLog::Instance() << "cDxr3Interface::ConfigureDevice: Videomode = PAL\n"; - } - } - else if (cDxr3ConfigData::Instance().GetVideoMode() == PAL60) - { - videomode = EM8300_VIDEOMODE_PAL60; - if (cDxr3ConfigData::Instance().GetDebug()) - { - cLog::Instance() << "cDxr3Interface::ConfigureDevice: Videomode = PAL60\n"; - } - } - else - { - videomode = EM8300_VIDEOMODE_NTSC; - if (cDxr3ConfigData::Instance().GetDebug()) - { - cLog::Instance() << "cDxr3Interface::ConfigureDevice: Videomode = NTSC\n"; - } - } - - // are the two videmodes different? - if (videomode_from_driver != videomode) - { - // make ioctl - if (ioctl(m_fdControl, EM8300_IOCTL_SET_VIDEOMODE, &videomode) == -1) - { - cLog::Instance() << "Unable to set videomode\n"; - exit(1); - } - } - - // set audio mode - if (!cDxr3ConfigData::Instance().GetUseDigitalOut()) - { - SetAudioAnalog(); - if (cDxr3ConfigData::Instance().GetDebug()) - { - cLog::Instance() << "cDxr3Interface::ConfigureDevice: Audiomode = Analog\n"; - } - } - - Unlock(); -} - -// ================================== -//! reset whole hardware -void cDxr3Interface::Resuscitation() -{ - Lock(); - - time_t startt = time(&startt); - time_t endt = 0; - m_ExternalReleased = true; - dsyslog("cDxr3Interface::Resuscitation Device failure detected"); - - UploadMicroCode(); - dsyslog("cDxr3Interface::Resuscitation Microcode upload successful"); - -// NonBlockingCloseOpen(); - m_ExternalReleased = false; - - endt = time(&endt); - - dsyslog("cDxr3Interface::Resuscitation Reopening devices took %d", (int)(endt - startt)); - - if (endt - startt > 4) - { - exit(1); - } - - ConfigureDevice(); - - Unlock(); -} - -// ================================== -//! pcm resampling funtcion -void cDxr3Interface::ResampleVolume(short* pcmbuf, int size) -{ - Lock(); - - if (m_volume == 0) - { - memset(pcmbuf, 0, size); - } - else if (m_volume != 255) - { - int factor = (int)pow (2.0, (double)m_volume/32 + 8.0) - 1; - //int factor = (int)pow (2.0, (double)m_volume/16) - 1; - for (int i = 0; i < size / (int)sizeof(short); i++) - { - pcmbuf[i] = (((int)pcmbuf[i]) * factor) / 65536; - } - } - - Unlock(); -} - -// ================================== -void cDxr3Interface::ClearOsd() -{ - Lock(); - - encodedata ed; - int controlstart= 0; - int x1 = 0; - int& i = ed.count = 0; - - // display duration... - ed.data[i++]= 0x00; - ed.data[i++]= 0x00; //durration before turn on command occurs - //in 90000/1024 units - // x1 - ed.data[i++]= x1 >> 8; //since this is the last command block, this - ed.data[i++]= x1 & 0xff; //points back to itself - - - // 0x01: start displaying - ed.data[i++]= 0x02; - - // 0xFF: end sequence - ed.data[i++]= 0xFF; - if (!i&1) - { - ed.data[i++]= 0xff; - } - - // x0 - ed.data[2]= (controlstart) >> 8; - ed.data[3]= (controlstart) & 0xff; - - // packet size - ed.data[0]= i >> 8; - ed.data[1]= i & 0xff; - - if (!m_ExternalReleased) - { - WriteSpu((const uint8_t*) &ed, (int) ed.count); - ClearButton(); - } - - Unlock(); - - // prevent osd to get pink - SetPalette(default_palette); // ok here? Has its own un/lock -} - -// ================================== -void cDxr3Interface::WriteSpu(const uint8_t* pBuf, int length) -{ - Lock(); - - if (!m_ExternalReleased) - { - if (write(m_fdSpu, pBuf, length) < 0) Resuscitation(); - } - - Unlock(); -} - -// ================================== -void cDxr3Interface::SetButton(uint16_t sx, uint16_t sy, uint16_t ex, uint16_t ey, uint32_t palette) -{ - Lock(); - - em8300_button_t button; - - button.color = palette >> 16; - button.contrast = palette & 0xFFFF; - button.top = sy; - button.bottom = ey; - button.left = sx; - button.right = ex; - - ioctl(m_fdSpu, EM8300_IOCTL_SPU_BUTTON, &button); - - Unlock(); -} - -// ================================== -void cDxr3Interface::ClearButton() -{ - Lock(); - - em8300_button_t button; - - button.color = 0; - button.contrast = 0; - button.top = 1; - button.bottom = 2; - button.left = 1; - button.right = 2; - - ioctl(m_fdSpu, EM8300_IOCTL_SPU_BUTTON, &button); - - Unlock(); -} - -// ================================== -void cDxr3Interface::SetPalette(unsigned int *pal) -{ - Lock(); - - ioctl(m_fdSpu, EM8300_IOCTL_SPU_SETPALETTE, (uint8_t*)pal); - - Unlock(); -} - -// helper functions for dxr3 main osd screen -// ================================== -//! reset dxr3 card -void cDxr3Interface::ResetHardware() -{ - Lock(); - - cLog::Instance() << "cDxr3Interface: Resetting DXR3 hardware\n"; - Resuscitation(); - - Unlock(); -} - -// set brightness/contrast/saturation -// ================================== -//! set brightness -void cDxr3Interface::SetBrightness(int value) -{ - Lock(); - - m_bcs.brightness = value; - - if (ioctl(m_fdControl, EM8300_IOCTL_SETBCS, &m_bcs) < 0) - { - cLog::Instance() << "cDxr3Interface::SetBrightness: Unable to set brightness to " << value << "\n"; - } - - Unlock(); -} - -// ================================== -//! set contrast -void cDxr3Interface::SetContrast(int value) -{ - Lock(); - - m_bcs.contrast = value; - - if (ioctl(m_fdControl, EM8300_IOCTL_SETBCS, &m_bcs) < 0) - { - cLog::Instance() << "cDxr3Interface::SetContrast: Unable to set contrast to " << value << "\n"; - } - - Unlock(); -} - -// ================================== -//! set saturation -void cDxr3Interface::SetSaturation(int value) -{ - Lock(); - - m_bcs.saturation = value; - - if (ioctl(m_fdControl, EM8300_IOCTL_SETBCS, &m_bcs) < 0) - { - cLog::Instance() << "cDxr3Interface::SetSaturation: Unable to set saturation to " << value << "\n"; - } - Unlock(); -} - -// access registers -// ================================== -//! read a register -long cDxr3Interface::ReadRegister(int registernum) -{ - Lock(); - - em8300_register_t reg; - - reg.microcode_register = 0; - reg.reg = registernum; - reg.val = 0; - - ioctl(m_fdControl, EM8300_IOCTL_READREG, ®); - return (reg.val); - - Unlock(); -} - -// ================================== -//! write a register -void cDxr3Interface::WriteRegister(int registernum, int val) -{ - Lock(); - - em8300_register_t reg; - - reg.microcode_register = 0; - reg.reg = registernum; - reg.val = val; - ioctl(m_fdControl, EM8300_IOCTL_WRITEREG, ®); - - Unlock(); -} - -// ================================== -//! grabs the current tv screen -void cDxr3Interface::GrabScreen(int w, int h, char** buf) -{ - -} - -// maybe we should copy this routine into em8300 driver -// ================================== -//! It appears that the follow routine copies length bytes to memory pointed to -//! by dst. -//! Most likely, pos contains some kind of buffer offset. -char cDxr3Interface::Dxr3CopyYUVData(int pos, int *dst, int length) -{ - int l1; - - for (l1 = 0x1000; (l1) ;--l1) - { - if (ReadRegister(0x1c1a) == 0) - break; - } - - if (l1 == 0) - { - //printf("Borked!\n"); - exit(0); - } - - WriteRegister(0x1c50, 8); - WriteRegister(0x1c51, pos & 0xffff); - WriteRegister(0x1c52, pos >>16); - WriteRegister(0x1c53, length); - WriteRegister(0x1c54, length); - WriteRegister(0x1c55, 0); - WriteRegister(0x1c56, 1); - WriteRegister(0x1c57, 1); - WriteRegister(0x1c58, pos & 0xffff); - WriteRegister(0x1c59, 0); - WriteRegister(0x1c5a, 1); - - int l2 = 0; - for (l2=0; l2 < (length>>2) ; ++l2) - { - *dst++ = ReadRegister(0x11800); - } - - switch (length % 4) - { - case 3: - *dst++ = ReadRegister(0x11000); - break; - - case 2: - *dst++ = ReadRegister(0x10800); - break; - - case 1: - *dst++ = ReadRegister(0x10000); - break; - } - - for (l1 = 0x1000; (l1) ; --l1) - { - if (ReadRegister(0x1c1a) == 0) - return 1; - } - - return 0; -} - -// ================================== -cMutex* cDxr3Interface::m_pMutex = new cMutex; - -// Local variables: -// mode: c++ -// c-file-style: "stroustrup" -// c-file-offsets: ((inline-open . 0)) -// indent-tabs-mode: t -// End: diff --git a/dxr3interface.h b/dxr3interface.h deleted file mode 100644 index 103e2b6..0000000 --- a/dxr3interface.h +++ /dev/null @@ -1,182 +0,0 @@ -/* - * dxr3interface.h - * - * Copyright (C) 2002-2004 Kai Möller - * Copyright (C) 2004 Christian Gmeiner - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation; either version 2.1 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - */ - -#ifndef _DXR3_INTERFACE_H_ -#define _DXR3_INTERFACE_H_ - -#include <stdlib.h> -#include <stdint.h> -#include <unistd.h> -#include <linux/em8300.h> -#include <sys/ioctl.h> - -#include "dxr3vdrincludes.h" -#include "dxr3log.h" -#include "dxr3configdata.h" -#include "dxr3sysclock.h" - -// ================================== -class cFixedLengthFrame; - -// ================================== -//! interafce to dxr3-card -/*! - cDxr3Interface is the interface to the dxr3 - driver and so to the card, - so this is the layer between plugin and driver. -*/ -class cDxr3Interface : public Singleton<cDxr3Interface> -{ -public: - cDxr3Interface(); - ~cDxr3Interface(); - - // main - void Start(); - void Stop(); - - // audio - void SetAudioAnalog(); - void SetAudioDigitalPCM(); - void SetAudioDigitalAC3(); - void SetVolume(int volume) { m_volume = volume;} - void SetAudioSpeed(uint32_t speed); - void SetChannelCount(uint32_t count); - void SetAudioSampleSize(uint32_t sampleSize); - - // clock - void SetSysClock(uint32_t scr); - uint32_t GetSysClock() const; - void SetPts(uint32_t pts); - void SetSpuPts(uint32_t pts); - int64_t GetPts(); - - // state changes - void EnableSPU(); - void DisableSPU(); - void EnableVideo() { m_VideoActive = true; } - void DisableVideo() { m_VideoActive = false; } - void EnableAudio() { m_AudioActive = true; } - void DisableAudio(); - void EnableOverlay(); - void DisanleOverlay(); - - // set/get functions - uint32_t GetAspectRatio() const; - void SetAspectRatio(uint32_t ratio); - uint32_t GetHorizontalSize() const { return m_horizontal; } - void SetHorizontalSize(uint32_t horizontal) { m_horizontal = horizontal;}; - - // play functions - void SetPlayMode(); - void Pause(); - void SingleStep(); - void PlayVideoFrame(cFixedLengthFrame* pFrame, int times = 1); - void PlayVideoFrame(const uint8_t* pBuf, int length, int times = 1); - void PlayAudioFrame(cFixedLengthFrame* pFrame); - void PlayAudioFrame(uint8_t* pBuf, int length); - void PlayAudioLpcmFrame(uint8_t* pBuf, int length); - - // external device access - void ExternalReleaseDevices(); - void ExternalReopenDevices(); - bool IsExternalReleased() const { return m_ExternalReleased; } - - // tools - void PlayBlackFrame(); - void ReOpenAudio(); - - // osd/spu - void ClearOsd(); - void WriteSpu(const uint8_t* pBuf, int length); - void SetButton(uint16_t sx, uint16_t sy, uint16_t ex, uint16_t ey, uint32_t palette); - void ClearButton(); - void SetPalette(unsigned int *pal = NULL); - - // overlay functions - - // helper functions for dxr3 main osd screen - void ResetHardware(); - - // set brightness/contrast/saturation - void SetBrightness(int value); - void SetContrast(int value); - void SetSaturation(int value); - -private: - // file handles - int m_fdControl; ///< filehandle for contol fifo of dxr3 card - int m_fdVideo; ///< filehandle for video fifo of dxr3 card - int m_fdAudio; ///< filehandle for audio fifo of dxr3 card - int m_fdSpu; ///< filehandle for spu fifo of dxr3 card - uint32_t m_lastSeenPts; - - // dxr3 clock - cDxr3SysClock* m_pClock; ///< clock used for sync - - uint32_t m_audioMode; ///< current used audiomode like analog or digital-PCM - uint32_t m_audioChannelCount; ///< how many channles has the current audiostream - uint32_t m_audioDataRate; ///< which rate is used for the current audiostream - uint32_t m_audioSampleSize; ///< how big is the sample size for the current audiostream - //int m_aspectDelayCounter; - uint32_t m_aspectRatio; ///< current used aspect ratio - uint32_t m_horizontal; ///< horizontal size of current videostream - bool m_ExternalReleased; ///< is dxr3 used by e.g. mplayer? - int m_volume; ///< volumevalue (0...255) - uint32_t m_spuMode; ///< is spu enabled or disabled? - bool m_AudioActive; ///< is audio active? - bool m_VideoActive; ///< is video active? - bool m_OverlayActive; ///< is overlay active? - - // bcs - em8300_bcs_t m_bcs; ///< BrightnessContrastSaturation values - - void UploadMicroCode(); - void ConfigureDevice(); - void ResampleVolume(short* pcmbuf, int size); - void Resuscitation(); - - // access registers - long ReadRegister(int registernum); - void WriteRegister(int registernum, int val); - - // grab screen - void GrabScreen(int w, int h, char** buf); - - // maybe we should copy this routine into em8300 driver - char Dxr3CopyYUVData(int pos, int *dst, int length); - -protected: - static cMutex* m_pMutex; ///< mutex for dxr3interface - - static void Lock() { cDxr3Interface::m_pMutex->Lock(); } - static void Unlock() { cDxr3Interface::m_pMutex->Unlock(); } -}; - -#endif /*_DXR3_INTERFACE_H_*/ - -// Local variables: -// mode: c++ -// c-file-style: "stroustrup" -// c-file-offsets: ((inline-open . 0)) -// indent-tabs-mode: t -// End: diff --git a/dxr3log.c b/dxr3log.c deleted file mode 100644 index 6fd5d44..0000000 --- a/dxr3log.c +++ /dev/null @@ -1,82 +0,0 @@ -/* - * dxr3log.c - * - * Copyright (C) 2004 Christian Gmeiner - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation; either version 2.1 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - */ - -#include "dxr3log.h" - -// ================================== -cMutex* cLog::m_pMutex = new cMutex; - -// ================================== -//! constructor -cLog::cLog() -{ - m_LogOpen = false; - m_ForeFlush = true; - - std::string Filename; - Filename = LOGPATH; - Filename += "dxr3plugin.log"; - - Open(Filename); -} - -// ================================== -//! constructor with filename -cLog::cLog(std::string Filename) -{ - m_LogOpen = false; - m_ForeFlush = true; - - Open(Filename); -} - -// ================================== -//! open log file -void cLog::Open(std::string Filename) -{ - Lock(); - m_LogStream.open(Filename.c_str()); - m_LogOpen = true; - Unlock(); -} - -// ================================== -//! close log file -void cLog::Close() -{ - Lock(); - if (m_LogOpen) - { - // close file now - m_LogStream.flush(); - m_LogStream.close(); - - m_LogOpen = false; - } - Unlock(); -} - -// Local variables: -// mode: c++ -// c-file-style: "stroustrup" -// c-file-offsets: ((inline-open . 0)) -// indent-tabs-mode: t -// End: diff --git a/dxr3log.h b/dxr3log.h deleted file mode 100644 index 070b941..0000000 --- a/dxr3log.h +++ /dev/null @@ -1,114 +0,0 @@ -/* - * dxr3log.h - * - * Copyright (C) 2004 Christian Gmeiner - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation; either version 2.1 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - */ - -#ifndef _DXR3_LOG_H_ -#define _DXR3_LOG_H_ - -#include <fstream> -#include <string> -#include "dxr3singleton.h" -#include "dxr3vdrincludes.h" - -// ================================== -//! A log class. -/*! - With this nice util dxr3plugin generates and mange a log file. In this - file the developer/enduser can find informations and can find errors, - problems and ohter stuff. - The logging class is now thread-safe! -*/ -class cLog : public Singleton<cLog> -{ -public: - cLog(); // use default log file - cLog(std::string FileName); - - ~cLog() { Close(); } - - void SetForceFlush(const bool v) { Lock(); m_ForeFlush = v; Unlock(); } - bool GetForceFlush() const { return m_ForeFlush; } - - // write type data to log file. - template <class Type> - inline cLog& operator << ( Type item ) - { - Lock(); - if (m_LogOpen) - { - m_LogStream << item; - if (m_ForeFlush) m_LogStream.flush(); - } - Unlock(); - return *this; - } - inline cLog& operator << ( size_t item ) - { - Lock(); - if (m_LogOpen) - { - m_LogStream << (unsigned int)item; - if (m_ForeFlush) m_LogStream.flush(); - } - Unlock(); - return *this; - } - inline cLog& operator << ( bool item ) - { - Lock(); - if (m_LogOpen) - { - if (item == true) - { - m_LogStream << "true"; - } - else - { - m_LogStream << "false"; - } - if (m_ForeFlush) m_LogStream.flush(); - } - Unlock(); - return *this; - } - -private: - std::ofstream m_LogStream; ///< Our logstream - bool m_LogOpen; ///< Is log open? - bool m_ForeFlush; ///< Do we want to flush log everytime? - - void Open(std::string Filename); // with this function we open our logfile - void Close(); // with this function we close our logfile - -protected: - static cMutex* m_pMutex; ///< mutex - - static void Lock() { cLog::m_pMutex->Lock(); } - static void Unlock() { cLog::m_pMutex->Unlock(); } -}; - -#endif /*_DXR3_LOG_H_*/ - -// Local variables: -// mode: c++ -// c-file-style: "stroustrup" -// c-file-offsets: ((inline-open . 0)) -// indent-tabs-mode: t -// End: diff --git a/dxr3memcpy.c b/dxr3memcpy.c deleted file mode 100644 index 83cbc58..0000000 --- a/dxr3memcpy.c +++ /dev/null @@ -1,450 +0,0 @@ -/* - * dxr3memcpy.c - * - * Copyright (C) 2004 Christian Gmeiner - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation; either version 2.1 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * - * Orgianal from xine: - * - * Copyright (C) 2001-2003 the xine project - * - * This file is part of xine, a free video player. - * - * These are the MMX/MMX2/SSE optimized versions of memcpy - * - * This code was adapted from Linux Kernel sources by Nick Kurshev to - * the mplayer program. (http://mplayer.sourceforge.net) - * - */ - -#include "dxr3log.h" -#include "dxr3cpu.h" -#include "dxr3memcpy.h" -#include <sys/times.h> -#include <limits.h> - - -// ================================== -//! our function pointer -void *(* dxr3_memcpy)(void *to, const void *from, size_t len); - -#if defined(__i386__) || defined(__x86_64__) -// ================================== -// for small memory blocks (<256 bytes) this version is faster -#define small_memcpy(to,from,n) { register unsigned long int dummy; __asm__ __volatile__("rep; movsb":"=&D"(to), "=&S"(from), "=&c"(dummy) :"0" (to), "1" (from),"2" (n) : "memory"); } -/* -// -- doesn't compile with 2.95 gcc -- -#define small_memcpy(to,from,n)\ -{\ -register unsigned long int dummy;\ -__asm__ __volatile__(\ - "rep; movsb"\ - :"=&D"(to), "=&S"(from), "=&c"(dummy)\ - :"0" (to), "1" (from),"2" (n)\ - : "memory");\ -} -*/ -// ================================== -//! linux kernel __memcpy (from: /include/asm/string.h) -static __inline__ void * __memcpy ( - void * to, - const void * from, - size_t n) -{ -int d0, d1, d2; - - if( n < 4 ) { - small_memcpy(to,from,n); - } - else - __asm__ __volatile__( - "rep ; movsl\n\t" - "testb $2,%b4\n\t" - "je 1f\n\t" - "movsw\n" - "1:\ttestb $1,%b4\n\t" - "je 2f\n\t" - "movsb\n" - "2:" - : "=&c" (d0), "=&D" (d1), "=&S" (d2) - :"0" (n/4), "q" (n),"1" ((long) to),"2" ((long) from) - : "memory"); - - return (to); -} - -#define SSE_MMREG_SIZE 16 -#define MMX_MMREG_SIZE 8 - -#define MMX1_MIN_LEN 0x800 /* 2K blocks */ -#define MIN_LEN 0x40 /* 64-byte blocks */ - - -// ================================== -/* SSE note: i tried to move 128 bytes a time instead of 64 but it -didn't make any measureable difference. i'm using 64 for the sake of -simplicity. [MF] */ -static void * sse_memcpy(void * to, const void * from, size_t len) -{ - void *retval; - size_t i; - retval = to; - - /* PREFETCH has effect even for MOVSB instruction ;) */ - __asm__ __volatile__ ( - " prefetchnta (%0)\n" - " prefetchnta 32(%0)\n" - " prefetchnta 64(%0)\n" - " prefetchnta 96(%0)\n" - " prefetchnta 128(%0)\n" - " prefetchnta 160(%0)\n" - " prefetchnta 192(%0)\n" - " prefetchnta 224(%0)\n" - " prefetchnta 256(%0)\n" - " prefetchnta 288(%0)\n" - : : "r" (from) ); - - if(len >= MIN_LEN) - { - register unsigned long int delta; - /* Align destinition to MMREG_SIZE -boundary */ - delta = ((unsigned long int)to)&(SSE_MMREG_SIZE-1); - if(delta) - { - delta=SSE_MMREG_SIZE-delta; - len -= delta; - small_memcpy(to, from, delta); - } - i = len >> 6; /* len/64 */ - len&=63; - if(((unsigned long)from) & 15) - /* if SRC is misaligned */ - for(; i>0; i--) - { - __asm__ __volatile__ ( - "prefetchnta 320(%0)\n" - "prefetchnta 352(%0)\n" - "movups (%0), %%xmm0\n" - "movups 16(%0), %%xmm1\n" - "movups 32(%0), %%xmm2\n" - "movups 48(%0), %%xmm3\n" - "movntps %%xmm0, (%1)\n" - "movntps %%xmm1, 16(%1)\n" - "movntps %%xmm2, 32(%1)\n" - "movntps %%xmm3, 48(%1)\n" - : : "r" (from), "r" (to) : "memory"); - from = ((const unsigned char *)from) + 64; - to = ((unsigned char *)to) + 64; - } - else - /* - Only if SRC is aligned on 16-byte boundary. - It allows to use movaps instead of movups, which required data - to be aligned or a general-protection exception (#GP) is generated. - */ - for(; i>0; i--) - { - __asm__ __volatile__ ( - "prefetchnta 320(%0)\n" - "prefetchnta 352(%0)\n" - "movaps (%0), %%xmm0\n" - "movaps 16(%0), %%xmm1\n" - "movaps 32(%0), %%xmm2\n" - "movaps 48(%0), %%xmm3\n" - "movntps %%xmm0, (%1)\n" - "movntps %%xmm1, 16(%1)\n" - "movntps %%xmm2, 32(%1)\n" - "movntps %%xmm3, 48(%1)\n" - : : "r" (from), "r" (to) : "memory"); - from = ((const unsigned char *)from) + 64; - to = ((unsigned char *)to) + 64; - } - /* since movntq is weakly-ordered, a "sfence" - * is needed to become ordered again. */ - __asm__ __volatile__ ("sfence": : :"memory"); - /* enables to use FPU */ - __asm__ __volatile__ ("emms": : :"memory"); - } - /* - * Now do the tail of the block - */ - if(len) __memcpy(to, from, len); - return retval; -} - -// ================================== -static void * mmx_memcpy(void * to, const void * from, size_t len) -{ - void *retval; - size_t i; - retval = to; - - if(len >= MMX1_MIN_LEN) - { - register unsigned long int delta; - /* Align destinition to MMREG_SIZE -boundary */ - delta = ((unsigned long int)to)&(MMX_MMREG_SIZE-1); - if(delta) - { - delta=MMX_MMREG_SIZE-delta; - len -= delta; - small_memcpy(to, from, delta); - } - i = len >> 6; /* len/64 */ - len&=63; - for(; i>0; i--) - { - __asm__ __volatile__ ( - "movq (%0), %%mm0\n" - "movq 8(%0), %%mm1\n" - "movq 16(%0), %%mm2\n" - "movq 24(%0), %%mm3\n" - "movq 32(%0), %%mm4\n" - "movq 40(%0), %%mm5\n" - "movq 48(%0), %%mm6\n" - "movq 56(%0), %%mm7\n" - "movq %%mm0, (%1)\n" - "movq %%mm1, 8(%1)\n" - "movq %%mm2, 16(%1)\n" - "movq %%mm3, 24(%1)\n" - "movq %%mm4, 32(%1)\n" - "movq %%mm5, 40(%1)\n" - "movq %%mm6, 48(%1)\n" - "movq %%mm7, 56(%1)\n" - : : "r" (from), "r" (to) : "memory"); - from = ((const unsigned char *)from) + 64; - to = ((unsigned char *)to) + 64; - } - __asm__ __volatile__ ("emms": : :"memory"); - } - /* - * Now do the tail of the block - */ - if(len) __memcpy(to, from, len); - return retval; -} - -// ================================== -static void * mmx2_memcpy(void * to, const void * from, size_t len) -{ - void *retval; - size_t i; - retval = to; - - /* PREFETCH has effect even for MOVSB instruction ;) */ - __asm__ __volatile__ ( - " prefetchnta (%0)\n" - " prefetchnta 32(%0)\n" - " prefetchnta 64(%0)\n" - " prefetchnta 96(%0)\n" - " prefetchnta 128(%0)\n" - " prefetchnta 160(%0)\n" - " prefetchnta 192(%0)\n" - " prefetchnta 224(%0)\n" - " prefetchnta 256(%0)\n" - " prefetchnta 288(%0)\n" - : : "r" (from) ); - - if(len >= MIN_LEN) - { - register unsigned long int delta; - /* Align destinition to MMREG_SIZE -boundary */ - delta = ((unsigned long int)to)&(MMX_MMREG_SIZE-1); - if(delta) - { - delta=MMX_MMREG_SIZE-delta; - len -= delta; - small_memcpy(to, from, delta); - } - i = len >> 6; /* len/64 */ - len&=63; - for(; i>0; i--) - { - __asm__ __volatile__ ( - "prefetchnta 320(%0)\n" - "prefetchnta 352(%0)\n" - "movq (%0), %%mm0\n" - "movq 8(%0), %%mm1\n" - "movq 16(%0), %%mm2\n" - "movq 24(%0), %%mm3\n" - "movq 32(%0), %%mm4\n" - "movq 40(%0), %%mm5\n" - "movq 48(%0), %%mm6\n" - "movq 56(%0), %%mm7\n" - "movntq %%mm0, (%1)\n" - "movntq %%mm1, 8(%1)\n" - "movntq %%mm2, 16(%1)\n" - "movntq %%mm3, 24(%1)\n" - "movntq %%mm4, 32(%1)\n" - "movntq %%mm5, 40(%1)\n" - "movntq %%mm6, 48(%1)\n" - "movntq %%mm7, 56(%1)\n" - : : "r" (from), "r" (to) : "memory"); - from = ((const unsigned char *)from) + 64; - to = ((unsigned char *)to) + 64; - } - /* since movntq is weakly-ordered, a "sfence" - * is needed to become ordered again. */ - __asm__ __volatile__ ("sfence": : :"memory"); - __asm__ __volatile__ ("emms": : :"memory"); - } - /* - * Now do the tail of the block - */ - if(len) __memcpy(to, from, len); - return retval; -} - -// ================================== -static void *linux_kernel_memcpy(void *to, const void *from, size_t len) { - return __memcpy(to,from,len); -} -#endif /* __i386__ || __x86_64__ */ - - -// ================================== -//! constr. -cDxr3MemcpyBench::cDxr3MemcpyBench(uint32_t config_flags) -{ - // - // add all aviable memcpy routines - // - - memcpy_routine routine; - - // glibc memcpy - routine.name = "glibc memcpy()"; - routine.function = memcpy; - routine.time = 0; - routine.cpu_require = 0; - m_methods.push_back(routine); - -#if defined(__i386__) || defined(__x86_64__) - - // linux_kernel_memcpy - routine.name = "linux_kernel_memcpy()"; - routine.function = linux_kernel_memcpy; - routine.cpu_require = 0; - m_methods.push_back(routine); - - // MMX optimized memcpy() - routine.name = "MMX optimized memcpy()"; - routine.function = mmx_memcpy; - routine.cpu_require = CC_MMX; - m_methods.push_back(routine); - - // MMXEXT optimized memcpy() - routine.name = "MMXEXT optimized memcpy()"; - routine.function = mmx2_memcpy; - routine.cpu_require = CC_MMXEXT; - m_methods.push_back(routine); - -#ifndef __FreeBSD__ - - // SSE optimized memcpy() - routine.name = "SSE optimized memcpy()"; - routine.function = sse_memcpy; - routine.cpu_require = CC_MMXEXT|CC_SSE; - m_methods.push_back(routine); - -#endif /* not __FreeBSD__ */ -#endif /* __i386__ || __x86_64__ */ - - // - // run benchmarking - // - - unsigned long long t = 0; - void *buf1, *buf2; - int j, best = -1; - - if ((buf1 = malloc(BUFSIZE)) == NULL) - return; - - if ((buf2 = malloc(BUFSIZE)) == NULL) - { - free(buf1); - return; - } - - cLog::Instance() << "\nBenchmarking memcpy() methods (smaller is better):\n"; - // make sure buffers are present on physical memory - memcpy(buf1,buf2,BUFSIZE); - - for (size_t i = 0; i < m_methods.size(); i++) - { - if ((config_flags & m_methods[i].cpu_require) != m_methods[i].cpu_require) - { - continue; - } - - // count 100 runs of the memcpy function - t = Rdtsc(config_flags); - for (j = 0; j < 50; j++) - { - m_methods[i].function(buf2,buf1,BUFSIZE); - m_methods[i].function(buf1,buf2,BUFSIZE); - } - t = Rdtsc(config_flags) - t; - - m_methods[i].time = t; - - cLog::Instance() << m_methods[i].name.c_str() << ": " << (unsigned long long)t << "\n"; - - if (best == -1 || t < m_methods[best].time) - { - best = i; - } - } - cLog::Instance() << "\nBest one: " << m_methods[best].name.c_str() << "\n\n"; - - dxr3_memcpy = m_methods[best].function; - - - // clear unused memory - free(buf1); - free(buf2); -} - -// ================================== -//! needed for exact timing -unsigned long long int cDxr3MemcpyBench::Rdtsc(uint32_t config_flags) -{ -#if defined(__i386__) || defined(__x86_64__) - // we need rdtsc support - if (config_flags && CC_MMX) - { - unsigned long long int x; - __asm__ volatile (".byte 0x0f, 0x31" : "=A" (x)); - return x; - } - else - { - return times(NULL); - } -#else - struct tms tp; - return times(&tp); -#endif /* __i386__ || __x86_64__ */ -} - -// Local variables: -// mode: c++ -// c-file-style: "stroustrup" -// c-file-offsets: ((inline-open . 0)) -// indent-tabs-mode: t -// End: diff --git a/dxr3memcpy.h b/dxr3memcpy.h deleted file mode 100644 index 8ee6601..0000000 --- a/dxr3memcpy.h +++ /dev/null @@ -1,99 +0,0 @@ -/* - * dxr3memcpy.h - * - * Copyright (C) 2004 Christian Gmeiner - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation; either version 2.1 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - */ - -/***************************************************************************** - * memcpy.h: functions and definitions of the MMX/MMX2/SSE optimized versions - * of memcpy - ***************************************************************************** - * Copyright (C) 2001 Keuleu - * - * 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 - ***************************************************************************** - * - * Original code: - * - * Copyright (C) 2000-2001 the xine project - * - * This file is part of xine, a unix video player. - * - *****************************************************************************/ - -#ifndef _DXR3MEMCPY_H_ -#define _DXR3MEMCPY_H_ - -#include "dxr3vdrincludes.h" - -// ================================== -/*! \def BUFSIZE - \brief size of buffers for benchmark :) -*/ -#define BUFSIZE 1024*1024 - -// ================================== -struct memcpy_routine -{ - std::string name; ///< name of memcpy methode - void *(* function)(void *to, const void *from, size_t len); ///< our memcopy methode - unsigned long long time; ///< needed time for banchmark - uint32_t cpu_require; ///< caps from dxr3cpu.h -}; - -// ================================== -//! Little class to do a nice benchmark -/* - Whith this class we can get the fastest memcyp - methode for target computer. -*/ -class cDxr3MemcpyBench -{ -public: - cDxr3MemcpyBench(uint32_t config_flags = 0); - -private: - unsigned long long int Rdtsc(uint32_t config_flags); - - std::vector<memcpy_routine> m_methods; ///< a std::vector with all methodes -}; - -// ================================== -//! optimized/fast memcpy -extern void *(* dxr3_memcpy)(void *to, const void *from, size_t len); - -#endif /*_DXR3MEMCPY_H_*/ - -// Local variables: -// mode: c++ -// c-file-style: "stroustrup" -// c-file-offsets: ((inline-open . 0)) -// indent-tabs-mode: t -// End: diff --git a/dxr3multichannelaudio.c b/dxr3multichannelaudio.c deleted file mode 100644 index 9a12d70..0000000 --- a/dxr3multichannelaudio.c +++ /dev/null @@ -1,651 +0,0 @@ -/* -* dxr3multichannelaudio.c: -* -* taken from the AC3overDVB Patch maintained by Stefan Huelswitt -* -* -*/ - -#include <malloc.h> -#include "dxr3multichannelaudio.h" -#include "dxr3log.h" -#include <vdr/ringbuffer.h> - -//#define DEBUG(x...) printf(x) -#define DEBUG(x...) - -//#define ED(x...) printf(x) -#define ED(x...) - -#define aAC3 0x80 -#define aDTS 0x88 -#define aLPCM 0xA0 -#define aMPEG 0xC0 - -#define aVDR 0x0B // VDR specific audio substream -#define aSPU 0x20 // SPU stream - -#define PES_HDR_SIZE 6 // length of PES header -#define PTS_SIZE 5 // length of PTS data -#define MAX_FRAMECOUNT 1536 // max. LPCM payload size - -#define SYNC_SIZE 7 // how many bytes we need to sync on a audio header - -#define AC3_SIZE 6144 // size of AC3 IEC paket -#define DTS_SIZE 2048 // size of DTS IEC paket -#define IEC_HDR_SIZE 8 // size of IEC header - -// --- cAudioEncapsulator ------------------------------------------------------ - -class cAudioEncapsulator { -private: - int totalSize, frameCount; - cFrame *frame; - uchar *frameData; - // - uchar syncBuff[SYNC_SIZE]; - int have, length, skipped; - // - uchar ptsFlags; - const uchar *ptsData; - int ptsDelay; - // - void NewFrame(uchar PTSflags, const uchar *PTSdata); - void SyncFound(const uchar *data); -protected: - int streamType; - cRingBufferFrame *ringBuffer; - int fillup, firstBurst; - bool mute, muteData; - // - void StartFrame(int size, uchar PTSflags, const uchar *PTSdata); - void FinishFrame(void); - void PutData(const uchar *data, int len); - void SendIECpause(int type, uchar PTSflags, const uchar *PTSdata); - // - virtual int SyncInfo(const uchar *data)=0; - virtual void StartIECFrame(const uchar *buf, int length, uchar PTSflags, const uchar *PTSdata)=0; - virtual void FinishIECFrame(void); -public: - cAudioEncapsulator(cRingBufferFrame *rb, int StreamType); - virtual ~cAudioEncapsulator(); - void Clear(void); - void Decode(const uchar *data, int len, uchar PTSflags, int PTSdelay, const uchar *PTSdata); - int StreamType() { return streamType; } - void Mute(bool Mute) { mute=Mute; } - }; - -cAudioEncapsulator::cAudioEncapsulator(cRingBufferFrame *rb, int StreamType) -{ - ringBuffer=rb; - streamType=StreamType; - frame=0; firstBurst=1; - Clear(); -} - -cAudioEncapsulator::~cAudioEncapsulator() -{ - delete frame; -} - -void cAudioEncapsulator::Clear(void) -{ - delete frame; - frame=0; frameCount=0; fillup=0; mute=muteData=false; - have=length=skipped=0; -} - -void cAudioEncapsulator::StartFrame(int size, uchar PTSflags, const uchar *PTSdata) -{ - if(frame) { - DEBUG("StartFrame() with unfinished frame!\n"); - FinishFrame(); - } - ED("StartFrame: size=%d ptsFlags=%d\n",size,PTSflags); - totalSize=size; - NewFrame(PTSflags,PTSdata); -} - -void cAudioEncapsulator::NewFrame(uchar PTSflags, const uchar *PTSdata) -{ - if(!totalSize) { - DEBUG("NewFrame: new frame requested, but totalSize=0\n"); - return; - } - static const int ptslen[] = { 0,0,PTS_SIZE,PTS_SIZE*2 }; - const int plen = ptslen[PTSflags]; - int len = std::min(totalSize, MAX_FRAMECOUNT); - ED("NewFrame: totalSize=%d frameCount=%d PTSflags=%d",totalSize,len,PTSflags); - totalSize -= len; - ED(" new totalSize=%d\n",totalSize); - len += (plen + 3 + 7); - frameCount = len+PES_HDR_SIZE; - frameData = MALLOC(uchar,frameCount); - if (frameData) { - frame = new cFrame(frameData, -frameCount, ftUnknown); - if (frame) { - uchar buf[10]; - // build the PES header - buf[0] = 0x00; - buf[1] = 0x00; - buf[2] = 0x01; - buf[3] = 0xBD; // PRIVATE_STREAM1 - buf[4] = (len >> 8) & 0xFF; - buf[5] = len & 0xFF; - buf[6] = 0x84; - buf[7] = plen ? (PTSflags << 6) : 0; - buf[8] = plen; - PutData(buf,9); - - if (plen) PutData(PTSdata,plen); - - // build LPCM header - buf[0] = aLPCM; // substream ID - buf[1] = 0xFF; - buf[2] = 0x00; - buf[3] = 0x00; - buf[4] = 0x00; - buf[5] = 0x00; - buf[6] = 0x81; - PutData(buf,7); - return; - } - else { free(frameData); frameData=0; } - } - esyslog("Failed to build frame for audio encapsulation"); -} - -void cAudioEncapsulator::FinishFrame(void) -{ - if (frameCount) { - DEBUG("FinishFrame() with frameCount>0\n"); - PutData(0,frameCount); - } - if (frame && frameData) { - ED("FinishFrame: totalSize=%d\n",totalSize); - if (!ringBuffer->Put(frame)) { - esyslog("Ringbuffer overflow. Encapsulated audio frame lost"); - delete frame; - } - } - frame=0; frameData=0; frameCount=0; -} - -void cAudioEncapsulator::PutData(const uchar *data, int len) -{ - if(!muteData) { - if(!frameData) DEBUG("PutData() without frame\n"); - while (frameData && len > 0) { - int l = std::min(len,frameCount); - if(data) { - memcpy(frameData,data,l); - data += l; - } - else memset(frameData,0,l); - frameData += l; len -= l; frameCount -= l; - - ED("PutData: %s=%d len=%d frameCount=%d\n",data?"put":"zero",l,len,frameCount); - if (!frameCount) { - FinishFrame(); - if (totalSize > 0) NewFrame(0,0); - } - } - } -} - -void cAudioEncapsulator::SendIECpause(int type, uchar PTSflags, const uchar *PTSdata) -{ - StartFrame(AC3_SIZE,PTSflags,PTSdata); - uchar burst[IEC_HDR_SIZE]; - // prepare IEC 60958 data frame - burst[0] = 0xF8; - burst[1] = 0x72; - burst[2] = 0x4E; - burst[3] = 0x1F; - - switch (type) { - default: - case 0: - burst[4] = 7 << 5; // null frame, stream = 7 - burst[5] = 0x00; - burst[6] = 0x00; // No data therein - burst[7] = 0x00; - break; - case 1: - burst[4] = 0x00; // Audio ES Channel empty, wait - burst[5] = 0x03; // for DD Decoder or pause - burst[6] = 0x00; // Trailing frame size is 32 bits payload - burst[7] = 0x20; - break; - case -1: - burst[4] = 0x01; // User stop, skip or error - burst[5] = 0x03; - burst[6] = 0x08; // Trailing frame size is zero - burst[7] = 0x00; - break; - } - PutData(burst,sizeof(burst)); - PutData(0,AC3_SIZE-sizeof(burst)); - FinishFrame(); - muteData = true; -} - -void cAudioEncapsulator::FinishIECFrame(void) -{ - if(!muteData) { - ED("FinishIECFrame: fillup=%d\n",fillup); - if (fillup) PutData(0,fillup); - FinishFrame(); - } - muteData=false; fillup=0; -} - -void cAudioEncapsulator::SyncFound(const uchar *data) -{ - if(skipped) { - DEBUG("Decode: skipped %d bytes\n",skipped); - ED("skipped: "); for(int k=-skipped ; k<0 ; k++) ED("%02x ",data[k]); - ED("\ndata: "); for(int k=0 ; k<24 ; k++) ED("%02x ",data[k]); - ED("\n"); - skipped=0; - } - uchar pf=0; - ED("Decode: sync found ptsFlags=%d ptsDelay=%d\n",ptsFlags,ptsDelay); - if(ptsFlags && ptsDelay<=1) { - pf=ptsFlags; ptsFlags=0; - } - if(firstBurst || mute) { - SendIECpause(1,pf,ptsData); - if(firstBurst && ++firstBurst>10) firstBurst=0; - } - else StartIECFrame(data,length,pf,ptsData); - PutData(data,SYNC_SIZE); - have = SYNC_SIZE; -} - -void cAudioEncapsulator::Decode(const uchar *data, int len, uchar PTSflags, int PTSdelay, const uchar *PTSdata) -{ - ED("Decode: enter length=%d have=%d len=%d PTSflags=%d PTSdelay=%d\n",length,have,len,PTSflags,PTSdelay); - if(PTSflags) { - // if we are close to the end of an audio frame, but are already receiving - // the start of the next frame, assume a corrupted stream and finish the - // incomplete frame. - if(length && length-have<20 && !PTSdelay && SyncInfo(data)) { - int miss=length-have; - DEBUG("Decode: incomplete frame (stream corrupt?). syncing to next. miss=%d\n",miss); - PutData(0,miss); - FinishIECFrame(); - length=have=0; - } -/* - // we only send PTS info if we're nearly at frame start, except - // if we're signaled to delay the PTS - if(length && have>40) { - if(PTSdelay) ED("Decode: PTS delayed\n"); - else { - DEBUG("Decode: PTS info dropped length=%d have=%d\n",length,have); - PTSflags=0; - } - } -*/ - ptsFlags=PTSflags; ptsData=PTSdata; ptsDelay=PTSdelay; -// ED("Decode: saved PTS flags=%d delay=%d\n",ptsFlags,ptsDelay); - } - -#if 0 - { - printf("Decode: len=%d\n",len); - for(int i=0 ; i<len ; ) { - printf("%04x:",i); - for(int j=0 ; j<16 && i<len ; j++) { - printf(" %02x",data[i++]); - } - printf("\n"); - } - } -#endif - - int used=0; - while (used < len) { - if (!length) { // we are still searching for a header sync - if (!have) { // buffer is empty, work without buffering - if (used+SYNC_SIZE < len) { - length=SyncInfo(&data[used]); - if (length) { - ED("Decode: sync found at offset %d (len=%d)\n",used,length); - SyncFound(&data[used]); - used += SYNC_SIZE; ptsDelay -= SYNC_SIZE; - continue; - } - else { used++; skipped++; } - } - else { // not enough data to try a sync, buffer the rest - ED("Decode: buffering started\n"); - have = len-used; - memcpy(syncBuff,&data[used],have); - used += have; ptsDelay -= have; - } - } - else { // unfortunaly buffer is not empty, so continue with buffering until sync found - int need=std::min(SYNC_SIZE-have,len-used); - if (need) { - memcpy(&syncBuff[have],&data[used],need); - have += need; used += need; ptsDelay -= need; - } - if (have==SYNC_SIZE) { - length=SyncInfo(syncBuff); - if (length) { - ED("Decode: (buffered) sync found at offset %d (len=%d)\n",used-7,length); - SyncFound(syncBuff); - continue; - } - else { - memmove(syncBuff,syncBuff+1,SYNC_SIZE-1); - have--; skipped++; - } - } - } - } - else { // we have a header sync and are copying data - int need = std::min(length-have,len-used); - if(need) { - ED("Decode: writing %d\n",need); - PutData(&data[used],need); - have += need; used += need; ptsDelay -= need; - if (have == length) { - FinishIECFrame(); - length = have = 0; - continue; - } - } - } - } - ED("Decode: leave length=%d have=%d len=%d used=%d\n",length,have,len,used); -} - -// --- cAudioEncapsulatorAC3 --------------------------------------------------- - -class cAudioEncapsulatorAC3 : public cAudioEncapsulator { -private: - virtual int SyncInfo(const uchar *buf); - virtual void StartIECFrame(const uchar *buf, int length, uchar PTSflags, const uchar *PTSdata); -public: - cAudioEncapsulatorAC3(cRingBufferFrame *rb, int StreamType); - }; - -cAudioEncapsulatorAC3::cAudioEncapsulatorAC3(cRingBufferFrame *rb, int StreamType) -:cAudioEncapsulator(rb, StreamType) -{} - -int cAudioEncapsulatorAC3::SyncInfo(const uchar *buf) -{ - static const int rate[] = { 32, 40, 48, 56, 64, 80, 96, 112, - 128, 160, 192, 224, 256, 320, 384, 448, - 512, 576, 640}; - - if ((buf[0] != 0x0B) || (buf[1] != 0x77)) /* syncword */ - return 0; - if (buf[5] >= 0x60) /* bsid >= 12 */ - return 0; - - int frmsizecod = buf[4] & 63; - if (frmsizecod >= 38) - return 0; - int bitrate = rate[frmsizecod >> 1]; - - switch (buf[4] & 0xC0) { - case 0: - return 4 * bitrate; - case 0x40: - return 2 * (320 * bitrate / 147 + (frmsizecod & 1)); - case 0x80: - return 6 * bitrate; - default: - return 0; - } -} - -void cAudioEncapsulatorAC3::StartIECFrame(const uchar *buf, int length, uchar PTSflags, const uchar *PTSdata) -{ - StartFrame(AC3_SIZE,PTSflags,PTSdata); - fillup = AC3_SIZE-IEC_HDR_SIZE-length; - - // prepare IEC 60958 data frame - uchar burst[IEC_HDR_SIZE]; - burst[0] = 0xF8; - burst[1] = 0x72; - burst[2] = 0x4E; - burst[3] = 0x1F; - burst[4] = (buf[5] & 0x07); // Pc1 - burst[5] = 0x01; // Pc2 AC-3 - burst[6] = ((length * 8) >> 8 ) & 0xFF; // Pd1 - burst[7] = (length * 8) & 0xFF; // Pd2 - PutData(burst,sizeof(burst)); -} - -// --- cAudioEncapsulatorDTS --------------------------------------------------- - -class cAudioEncapsulatorDTS : public cAudioEncapsulator { -private: - virtual int SyncInfo(const uchar *buf); - virtual void StartIECFrame(const uchar *buf, int length, uchar PTSflags, const uchar *PTSdata); -public: - cAudioEncapsulatorDTS(cRingBufferFrame *rb, int StreamType); - }; - -cAudioEncapsulatorDTS::cAudioEncapsulatorDTS(cRingBufferFrame *rb, int StreamType) -: cAudioEncapsulator(rb, StreamType) -{} - -int cAudioEncapsulatorDTS::SyncInfo(const uchar *buf) -{ - if ((buf[0] != 0x7F) || - (buf[1] != 0xfE) || - (buf[2] != 0x80) || - (buf[3] != 0x01)) return 0; - - int length = ((buf[5] & 0x03) << 12) | - ((buf[6] & 0xFF) << 4) | - ((buf[7] & 0xF0) >> 4); - - return length + 1; -} - -void cAudioEncapsulatorDTS::StartIECFrame(const uchar *buf, int length, uchar PTSflags, const uchar *PTSdata) -{ - uchar ac5_type = ((buf[4] & 0x01) << 6) | ((buf[5] >>2) & 0x3F); - uchar ac5_spdif_type; - switch(ac5_type) { - case 0x0F: - ac5_spdif_type = 0x0B; /* DTS */ - break; - case 0x1F: - ac5_spdif_type = 0x0C; /* DTS */ - break; - case 0x3F: - ac5_spdif_type = 0x0D; /* DTS */ - break; - default: - ac5_spdif_type = 0x00; /* DTS */ - esyslog("DTS: SPDIF type not detected: ac5 type = %X!\n", ac5_type); - break; - } - - if (length > DTS_SIZE-IEC_HDR_SIZE) { - DEBUG("DTS: length too long %d\n",length); - return; - } - - StartFrame(DTS_SIZE,PTSflags,PTSdata); - fillup = DTS_SIZE-IEC_HDR_SIZE-length; - - // prepare IEC 60958 data frame - uchar burst[IEC_HDR_SIZE]; - burst[0] = 0xF8; - burst[1] = 0x72; - burst[2] = 0x4E; - burst[3] = 0x1F; - burst[4] = 0x00; - burst[5] = ac5_spdif_type; /* DTS data */ - burst[6] = ((length * 8) >> 8 ) & 0xFF; /* ac5_length * 8 */ - burst[7] = (length * 8) & 0xFF; - PutData(burst,sizeof(burst)); -} - -// --- cMultichannelAudio ------------------------------------------------------ - -cMultichannelAudio::cMultichannelAudio(cRingBufferFrame *rb) -{ - encapsulator=0; ringBuffer=rb; - fixed=false; - if(!ringBuffer) DEBUG("multichannel: no ringbuffer!"); -} - -cMultichannelAudio::~cMultichannelAudio() -{ - delete encapsulator; -} - -void cMultichannelAudio::Clear() -{ - Lock(); - if(encapsulator) encapsulator->Clear(); - Unlock(); -} - -void cMultichannelAudio::Reset() -{ - Lock(); - delete encapsulator; encapsulator=0; - fixed=false; - Unlock(); -} - -/* -void cMultichannelAudio::Mute(bool Mute) -{ - Lock(); - if(encapsulator) encapsulator->Mute(Mute); - Unlock(); -} -*/ - -int cMultichannelAudio::Check(uchar *b, int length, uchar *header) -{ - Lock(); - int res=0; - ptsDelay=0; offset=0; ptsData=0; - - // get PTS information - ptsFlags=header[7]>>6; - if(ptsFlags) ptsData=&header[9]; - - // AC3 frames may span over multiple PES packets. Unfortunaly the continuation - // packets start with the aLPCM code sometimes. Some magic here to detect - // this case. - uchar subStreamType=b[0]; - if(subStreamType!=aVDR) subStreamType&=0xF8; - bool aligned=header[6]&4; - if(!aligned) { - uchar ost=encapsulator ? encapsulator->StreamType() : 0; - if(!ptsFlags) { - if((subStreamType!=aLPCM && subStreamType!=aSPU) || fixed) { - if(ost>0) { - ED("multichannel: crossing -> keep encapsulator\n"); - subStreamType=ost; - } - else { - ED("multichannel: crossing -> skip\n"); - res=1; goto out; // skip - } - } - } - else if(fixed && ost>0) { - ED("multichannel: fixed unaligned -> keep encapsulator\n"); - subStreamType=ost; - } - } - fixed=false; - - switch(subStreamType) { - case aDTS: - case aAC3: - offset=4; // skip the DVD stream infos - break; - default: - if(aligned || !ptsFlags) { - if(encapsulator) { - Reset(); - DEBUG("multichannel: interrupted encapsulator stream (unknown)\n"); - } - DEBUG("multichannel: unknown substream type %x (skipped)\n",subStreamType); - res=1; goto out; // skip - } - subStreamType=aVDR; - ED("multichannel: assuming aVDR for unknown substream type\n"); - // fall through - case aVDR: - fixed=true; - break; - case aLPCM: - if(encapsulator) { - Reset(); - DEBUG("multichannel: interrupted encapsulator stream (LPCM)\n"); - } - ED("multichannel: LPCM\n"); - res=2; goto out; // pass - case aSPU: - ED("multichannel: SPU stream (skipped)\n"); - res=1; goto out; // skip - } - - // If the SubStreamType has changed then select the right encapsulator - if(!encapsulator || encapsulator->StreamType()!=subStreamType) { - DEBUG("multichannel: new encapsulator %x\n",subStreamType); - Reset(); - switch(subStreamType) { - case aAC3: - case aVDR: // AC3 - encapsulator=new cAudioEncapsulatorAC3(ringBuffer,subStreamType); - break; - case aDTS: // Dts - encapsulator=new cAudioEncapsulatorDTS(ringBuffer,subStreamType); - break; - } - if(!encapsulator) { - DEBUG("multichannel: no encapsulator\n"); - res=1; goto out; // skip - } - } - -out: - ED("HEADER type=%x sub=%x ptsflags=%d length=%d\n",header[3],subStreamType,ptsFlags,length); - ED("head: "); for(int k=0 ; k<24 ; k++) ED("%02x ",header[k]); - ED("\ndata: "); for(int k=0 ; k<24 ; k++) ED("%02x ",b[k]); - ED("\n"); - - Unlock(); return res; -} - -void cMultichannelAudio::Encapsulate(uchar *b, int length) -{ - Lock(); - if(offset && ptsFlags) { // get start of the packet to which the PTS belong (DVD only) - if(offset>=2 && length>offset-2) ptsDelay|=b[offset-2]*256; - if(offset>=1 && length>offset-1) ptsDelay|=b[offset-1]; - } - if(length>=offset) { - if(encapsulator) - encapsulator->Decode(b+offset,length-offset,ptsFlags,ptsDelay,ptsData); - ptsFlags=0; ptsDelay=0; offset=0; ptsData=0; - } - else offset-=length; - Unlock(); -} - -// Local variables: -// mode: c++ -// c-file-style: "stroustrup" -// c-file-offsets: ((inline-open . 0)) -// indent-tabs-mode: t -// End: diff --git a/dxr3multichannelaudio.h b/dxr3multichannelaudio.h deleted file mode 100644 index fcd0594..0000000 --- a/dxr3multichannelaudio.h +++ /dev/null @@ -1,40 +0,0 @@ -#ifndef _DXR3MULTICHANNELAUDIO_H_ -#define _DXR3MULTICHANNELAUDIO_H_ - -#include "dxr3vdrincludes.h" - -class cAudioEncapsulator; -class cRingBufferFrame; - -// ================================== -// Based on AC3overDVB Patch maintained -// by Stefan Huelswitt -class cMultichannelAudio : public cMutex -{ -private: - cAudioEncapsulator *encapsulator; - cRingBufferFrame *ringBuffer; - int ptsFlags, ptsDelay, offset; - uchar *ptsData; - bool fixed; - -public: - cMultichannelAudio(cRingBufferFrame *rb); - virtual ~cMultichannelAudio(); - - int Check(uchar *b, int length, uchar *header); - int Offset(void) { return offset; } - void Encapsulate(uchar *b, int length); - void Clear(); - void Reset(); - //void Mute(bool Mute); -}; - -#endif /*_DXR3MULTICHANNELAUDIO_H_*/ - -// Local variables: -// mode: c++ -// c-file-style: "stroustrup" -// c-file-offsets: ((inline-open . 0)) -// indent-tabs-mode: t -// End: diff --git a/dxr3nextpts.c b/dxr3nextpts.c deleted file mode 100644 index b30751d..0000000 --- a/dxr3nextpts.c +++ /dev/null @@ -1,32 +0,0 @@ -/* - * dxr3nextpts.c - * - * Copyright (C) 2002-2004 Kai Möller - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation; either version 2.1 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - */ - -#include "dxr3nextpts.h" - -// ================================== -cMutex* cDxr3NextPts::m_pMutex = new cMutex; - -// Local variables: -// mode: c++ -// c-file-style: "stroustrup" -// c-file-offsets: ((inline-open . 0)) -// indent-tabs-mode: t -// End: diff --git a/dxr3nextpts.h b/dxr3nextpts.h deleted file mode 100644 index 03fddb0..0000000 --- a/dxr3nextpts.h +++ /dev/null @@ -1,62 +0,0 @@ -/* - * dxr3nextpts.h - * - * Copyright (C) 2002-2004 Kai Möller - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation; either version 2.1 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - */ - -#ifndef _DXR3NEXTPTS_H_ -#define _DXR3NEXTPTS_H_ - -#include <unistd.h> -#include <stdint.h> -#include "dxr3vdrincludes.h" -#include "dxr3singleton.h" - -// ================================== -// pts program time stamp -// damit wird ermittelt welches audio frame zu welchem bild gehört -class cDxr3NextPts : public Singleton<cDxr3NextPts> -{ -public: - cDxr3NextPts() {} - ~cDxr3NextPts() {} - - void SetNextPts(uint32_t pts) { Lock(); if (pts) m_nextPts = pts; Unlock(); } - uint32_t GetNextPts() { Lock(); uint32_t tmpPts = m_nextPts; Unlock(); return tmpPts;} - - void Clear() { Lock(); m_nextPts = 0; Unlock();} - -protected: - static cMutex* m_pMutex; - uint32_t m_nextPts; - - static void Lock() {cDxr3NextPts::m_pMutex->Lock();} - static void Unlock() {cDxr3NextPts::m_pMutex->Unlock();} - -private: - cDxr3NextPts(cDxr3NextPts&); // no copy constructor -}; - -#endif /*_DXR3NEXTPTS_H_*/ - -// Local variables: -// mode: c++ -// c-file-style: "stroustrup" -// c-file-offsets: ((inline-open . 0)) -// indent-tabs-mode: t -// End: diff --git a/dxr3osd.c b/dxr3osd.c deleted file mode 100644 index f5b7f32..0000000 --- a/dxr3osd.c +++ /dev/null @@ -1,44 +0,0 @@ -/* - * dxr3osd.c - * - * Copyright (C) 2002 Stefan Schluenss - * Copyright (C) 2004 Christian Gmeiner - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation; either version 2.1 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - */ - -#include <linux/em8300.h> -#include <signal.h> -#include <sys/ioctl.h> -#include <sys/unistd.h> - -#include "dxr3vdrincludes.h" -#include "dxr3osd.h" -#include "dxr3osd_subpicture.h" - -// ================================== -// ! create osd at (Left, Top) -cOsd *cDxr3OsdProvider::CreateOsd(int Left, int Top) -{ - return new cDxr3SubpictureOsd(Left, Top); -} - -// Local variables: -// mode: c++ -// c-file-style: "stroustrup" -// c-file-offsets: ((inline-open . 0)) -// indent-tabs-mode: t -// End: diff --git a/dxr3osd.h b/dxr3osd.h deleted file mode 100644 index bb7d735..0000000 --- a/dxr3osd.h +++ /dev/null @@ -1,23 +0,0 @@ -#ifndef _DXR3_OSD_H_ -#define _DXR3_OSD_H_ - -#include "dxr3vdrincludes.h" -#include "dxr3spuencoder.h" - -// ================================== -// osd plugin provider -class cDxr3OsdProvider : public cOsdProvider -{ -public: - cDxr3OsdProvider() {} - virtual cOsd *CreateOsd(int Left, int Top); -}; - -#endif /*_DXR3_OSD_H_*/ - -// Local variables: -// mode: c++ -// c-file-style: "stroustrup" -// c-file-offsets: ((inline-open . 0)) -// indent-tabs-mode: t -// End: diff --git a/dxr3osd_subpicture.c b/dxr3osd_subpicture.c deleted file mode 100644 index 8bbab3d..0000000 --- a/dxr3osd_subpicture.c +++ /dev/null @@ -1,166 +0,0 @@ -#include "dxr3osd_subpicture.h" - -#define MAXNUMWINDOWS 7 // OSD windows are counted 1...7 - -// ================================== -//! constructor -cDxr3SubpictureOsd::cDxr3SubpictureOsd(int Left, int Top) : cOsd(Left, Top) -{ - shown = false; - Spu = &cSPUEncoder::Instance(); - - // must clear all windows here to avoid flashing effects - doesn't work if done - // in Flush() only for the windows that are actually used... - for (int i = 0; i < MAXNUMWINDOWS; i++) - { - Spu->Cmd(OSD_SetWindow, 0, i + 1); - Spu->Cmd(OSD_Clear); - } - -} - -// ================================== -cDxr3SubpictureOsd::~cDxr3SubpictureOsd() -{ - if (shown) - { - cBitmap *Bitmap; - for (int i = 0; (Bitmap = GetBitmap(i)) != NULL; i++) - { - Spu->Cmd(OSD_SetWindow, 0, i + 1); - Spu->Cmd(OSD_Close); - } - } -} - -// ================================== -eOsdError cDxr3SubpictureOsd::CanHandleAreas(const tArea *Areas, int NumAreas) -{ - - eOsdError Result = cOsd::CanHandleAreas(Areas, NumAreas); - if (Result == oeOk) - { - if (NumAreas > MAXNUMWINDOWS) - { - return oeTooManyAreas; - } - - for (int i = 0; i < NumAreas; i++) - { - // at the moment we dont support 256 color palette - if (Areas[i].bpp != 1 && Areas[i].bpp != 2 && Areas[i].bpp != 4/* && Areas[i].bpp != 8*/) - { - return oeBppNotSupported; - } - - if ((Areas[i].Width() & (8 / Areas[i].bpp - 1)) != 0) - { - return oeWrongAlignment; - } - } - } - return Result; -} - -// ================================== -void cDxr3SubpictureOsd::Flush() -{ - cBitmap *Bitmap; - - for (int i = 0; (Bitmap = GetBitmap(i)) != NULL; i++) - { - Spu->Cmd(OSD_SetWindow, 0, i + 1); - - if (!shown) - { - Spu->Cmd(OSD_Open, Bitmap->Bpp(), Left() + Bitmap->X0(), Top() + Bitmap->Y0(), Left() + Bitmap->X0() + Bitmap->Width() - 1, Top() + Bitmap->Y0() + Bitmap->Height() - 1, (void *)1); // initially hidden! - } - - int x1 = 0, y1 = 0, x2 = 0, y2 = 0; - if (Bitmap->Dirty(x1, y1, x2, y2)) - { - //TODO Workaround: apparently the bitmap sent to the driver always has to be a multiple - //TODO of 8 bits wide, and (dx * dy) also has to be a multiple of 8. - //TODO Fix driver (should be able to handle any size bitmaps!) - - while ((x1 > 0 || x2 < Bitmap->Width() - 1) && ((x2 - x1) & 7) != 7) - { - if (x2 < Bitmap->Width() - 1) - { - x2++; - } - else if (x1 > 0) - { - x1--; - } - } - - //TODO "... / 2" <==> Bpp??? - while ((y1 > 0 || y2 < Bitmap->Height() - 1) && (((x2 - x1 + 1) * (y2 - y1 + 1) / 2) & 7) != 0) - { - if (y2 < Bitmap->Height() - 1) - { - y2++; - } - else if (y1 > 0) - { - y1--; - } - } - - while ((x1 > 0 || x2 < Bitmap->Width() - 1) && (((x2 - x1 + 1) * (y2 - y1 + 1) / 2) & 7) != 0) - { - if (x2 < Bitmap->Width() - 1) - { - x2++; - } - else if (x1 > 0) - { - x1--; - } - } - - // commit colors: - int NumColors; - const tColor *Colors = Bitmap->Colors(NumColors); - - if (Colors) - { - - // TODO this should be fixed in the driver! - tColor colors[NumColors]; - for (int i = 0; i < NumColors; i++) - { - // convert AARRGGBB to AABBGGRR (the driver expects the colors the wrong way): - colors[i] = (Colors[i] & 0xFF000000) | ((Colors[i] & 0x0000FF) << 16) | (Colors[i] & 0x00FF00) | ((Colors[i] & 0xFF0000) >> 16); - } - - Colors = colors; - //TODO end of stuff that should be fixed in the driver - Spu->Cmd(OSD_SetPalette, 0, NumColors - 1, 0, 0, 0, Colors); - } - // commit modified data: - //Spu->Cmd(OSD_SetBlock, Bitmap->Width(), x1, y1, x2, y2, Bitmap->Data(x1, y1)); - Spu->Cmd(OSD_SetBlock, Bitmap->Width(), x1, y1, x2, y2, Bitmap->Data(x1, y1)); - } - Bitmap->Clean(); - } - - if (!shown) - { - // Showing the windows in a separate loop to avoid seeing them come up one after another - for (int i = 0; (Bitmap = GetBitmap(i)) != NULL; i++) - { - Spu->Cmd(OSD_SetWindow, 0, i + 1); - Spu->Cmd(OSD_MoveWindow, 0, Left() + Bitmap->X0(), Top() + Bitmap->Y0()); - } - shown = true; - } -} - -// Local variables: -// mode: c++ -// c-file-style: "stroustrup" -// c-file-offsets: ((inline-open . 0)) -// indent-tabs-mode: t -// End: diff --git a/dxr3osd_subpicture.h b/dxr3osd_subpicture.h deleted file mode 100644 index 0f670d5..0000000 --- a/dxr3osd_subpicture.h +++ /dev/null @@ -1,31 +0,0 @@ -#ifndef _DXR3OSD_SUBPICTURE_H_ -#define _DXR3OSD_SUBPICTURE_H_ - -#include "dxr3vdrincludes.h" -#include "dxr3spuencoder.h" - -// ================================== -// osd interface -class cDxr3SubpictureOsd : public cOsd -{ -private: - cSPUEncoder* Spu; ///< interface to cSPUEncoder - bool shown; ///< is the osd shown? - -public: - cDxr3SubpictureOsd(int Left, int Top/*, int SpuDev*/); - ~cDxr3SubpictureOsd(); - - eOsdError CanHandleAreas(const tArea *Areas, int NumAreas); - - void Flush(); -}; - -#endif /*_DXR3OSD_SUBPICTURE_H_*/ - -// Local variables: -// mode: c++ -// c-file-style: "stroustrup" -// c-file-offsets: ((inline-open . 0)) -// indent-tabs-mode: t -// End: diff --git a/dxr3outputthread.c b/dxr3outputthread.c deleted file mode 100644 index 7c72612..0000000 --- a/dxr3outputthread.c +++ /dev/null @@ -1,235 +0,0 @@ -/* - * dxr3outputthread.c - * - * Copyright (C) 2002-2004 Kai Möller - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation; either version 2.1 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - */ - -#include <stdio.h> -#include <unistd.h> -#include <time.h> -#include <pthread.h> -#include "dxr3outputthread.h" -#include "dxr3log.h" - -// ================================== -const int AUDIO_OFFSET = 4500; -#define SCR m_dxr3Device.GetSysClock() -// ================================== - -// ================================== -//! constructor -cDxr3OutputThread::cDxr3OutputThread(cDxr3Interface& dxr3Device, cDxr3SyncBuffer& buffer) : -cThread(), m_dxr3Device(dxr3Device), m_buffer(buffer), m_bStopThread(false), m_bNeedResync(false) -{ -} - -// ================================== -//! send stop signal -void cDxr3OutputThread::SetStopSignal() -{ - Lock(); - m_bStopThread = true; - Unlock(); -} - -// ================================== -//! was stop signal send? -bool cDxr3OutputThread::GetStopSignal() -{ - bool ret = false; - Lock(); - ret = m_bStopThread; - Unlock(); - - return ret; -} - -// ================================== -//! constr. -cDxr3AudioOutThread::cDxr3AudioOutThread(cDxr3Interface& dxr3Device, cDxr3SyncBuffer& buffer) : -cDxr3OutputThread(dxr3Device, buffer) -{ - SetDescription("DXR3 audio output"); -} - -// ================================== -//! thread action -void cDxr3AudioOutThread::Action() -{ - bool resync = false; - uint32_t pts = 0; - - cLog::Instance() << "cDxr3AudioOutThread::Action Thread started\n"; - - sched_param temp; - temp.sched_priority = 2; - - if (!pthread_setschedparam(pthread_self(), SCHED_RR, &temp)) - { - cLog::Instance() << "cDxr3AudioOutThread::Action(): Error can't set priority\n"; - } - - while (!GetStopSignal()) - { - pts = 0; - cFixedLengthFrame* pNext = m_buffer.Get(); - - if (pNext) pts = pNext->GetPts(); - - if (pts && abs((int)pts-(int)SCR) > 30000 || m_dxr3Device.IsExternalReleased()) - { - m_buffer.Clear(); - m_bNeedResync = true; - } - else if (pNext) - { - if (!pts || pts < SCR) - { - if (!pts && resync) - { - continue; - } - else - { - resync = false; - } - - if (pts && (pts < SCR) && ((SCR - pts) > 5000)) - { - m_dxr3Device.SetSysClock(pts+ 1 * AUDIO_OFFSET); - m_dxr3Device.PlayAudioFrame(pNext); - if (m_buffer.IsPolled()) - { - m_buffer.Clear(); - m_bNeedResync = true; - } - } - else - { - m_dxr3Device.PlayAudioFrame(pNext); - m_buffer.Pop(); - } - } - else - { - if (abs((int)pts - (int)SCR) < (AUDIO_OFFSET )) - { - m_dxr3Device.PlayAudioFrame(pNext); - m_buffer.Pop(); - } - } - } - - if ((pts > SCR && abs((int)pts - (int)SCR) > AUDIO_OFFSET)) - { - usleep(10000); - } - } -} - -// ================================== -//! constr. -cDxr3VideoOutThread::cDxr3VideoOutThread(cDxr3Interface& dxr3Device, cDxr3SyncBuffer& buffer) : -cDxr3OutputThread(dxr3Device, buffer) -{ - SetDescription("DXR3 video output"); -} - -// ================================== -//! thread action -void cDxr3VideoOutThread::Action() -{ - uint32_t pts = 0; - static uint32_t lastPts = 0; - - cLog::Instance() << "cDxr3VideoOutThread::Action Thread started\n"; - - sched_param temp; - temp.sched_priority = 1; - - if (!pthread_setschedparam(pthread_self(), SCHED_RR, &temp)) - { - cLog::Instance() << "cDxr3VideoOutThread::Action(): Error can't set priority\n"; - } - - while (!GetStopSignal()) - { - cFixedLengthFrame* pNext = m_buffer.Get(); - if (pNext) - { - pts = pNext->GetPts(); - if (pts == lastPts) pts = 0; - - if (pts > SCR && abs((int)pts - (int)SCR) < 7500) - { - m_dxr3Device.SetPts(pts); - } - - if (!pts || pts < SCR) - { - if (m_buffer.Available()) - { - m_dxr3Device.PlayVideoFrame(pNext); - m_buffer.Pop(); - } - } - else - { - if ((pts > SCR) && abs((int)pts - (int)SCR) < 7500) - { - m_dxr3Device.SetPts(pts); - - if (m_buffer.Available() && pNext->GetData() && pNext->GetCount()) - { - m_dxr3Device.PlayVideoFrame(pNext); - m_buffer.Pop(); - } - } - else - { - if (pts < SCR) - { - m_dxr3Device.PlayVideoFrame(pNext); - m_buffer.Pop(); - } - } - } - - - if (m_dxr3Device.IsExternalReleased()) - { - m_bNeedResync = true; - m_buffer.Clear(); - } - - if ((pts > SCR && abs((int)pts - (int)SCR) > 7500 )) - { - usleep(10000); - } - } - } -} - -#undef SCR - -// Local variables: -// mode: c++ -// c-file-style: "stroustrup" -// c-file-offsets: ((inline-open . 0)) -// indent-tabs-mode: t -// End: diff --git a/dxr3outputthread.h b/dxr3outputthread.h deleted file mode 100644 index 1436ebc..0000000 --- a/dxr3outputthread.h +++ /dev/null @@ -1,91 +0,0 @@ -/* - * dxr3outputthread.h - * - * Copyright (C) 2002-2004 Kai Möller - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation; either version 2.1 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - */ - -#ifndef _DXR3OUTPUTTHREAD_H_ -#define _DXR3OUTPUTTHREAD_H_ - -#include "dxr3vdrincludes.h" -#include "dxr3syncbuffer.h" -#include "dxr3audiodecoder.h" - -// ================================== -class cDxr3OutputThread : public cThread -{ -public: - cDxr3OutputThread(cDxr3Interface& dxr3Device, cDxr3SyncBuffer& buffer); - virtual ~cDxr3OutputThread() {Cancel();}; - - // virtual void Start(void) {cThread::Start()}; - void SetStopSignal(); - bool NeedResync() { return m_bNeedResync;}; - void ClearResyncRequest() { m_bNeedResync = false;}; - -protected: - virtual void Action() = 0; - bool GetStopSignal(); - - cDxr3Interface& m_dxr3Device; - cDxr3SyncBuffer& m_buffer; - bool m_bStopThread; - bool m_bNeedResync; - -private: - cDxr3OutputThread(cDxr3OutputThread&); // no copy contructor -}; - -// ================================== -class cDxr3AudioOutThread : public cDxr3OutputThread -{ -public: - cDxr3AudioOutThread(cDxr3Interface& dxr3Device, cDxr3SyncBuffer& buffer); - virtual ~cDxr3AudioOutThread() {} - -protected: - void Action(); - -private: -// cDxr3AudioOutThread(); // no standard constructor - cDxr3AudioOutThread(cDxr3AudioOutThread&); // no copy constructor -}; - -// ================================== -class cDxr3VideoOutThread : public cDxr3OutputThread -{ -public: - cDxr3VideoOutThread(cDxr3Interface& dxr3Device, cDxr3SyncBuffer& buffer); - virtual ~cDxr3VideoOutThread() {} - -protected: - void Action(); - -private: -// cDxr3VideoOutThread(); // no standard constructor - cDxr3VideoOutThread(cDxr3VideoOutThread&); // no copy constructor -}; - -#endif /*_DXR3OUTPUTTHREAD_H_*/ - -// Local variables: -// mode: c++ -// c-file-style: "stroustrup" -// c-file-offsets: ((inline-open . 0)) -// indent-tabs-mode: t -// End: diff --git a/dxr3palettemanager.c b/dxr3palettemanager.c deleted file mode 100644 index 83641e1..0000000 --- a/dxr3palettemanager.c +++ /dev/null @@ -1,122 +0,0 @@ -/* - * dxr3palettemanager.c: - * - * See the main source file 'dxr3.c' for copyright information and - * how to reach the author. - * - */ - -/* - ToDo: - - cDxr3PaletteManager: Should we use here std::vector? -*/ - -#include <string.h> -#include "dxr3palettemanager.h" -#include "dxr3tools.h" - -// ================================== -//! constructor -cDxr3PaletteManager::cDxr3PaletteManager() -{ - memset(m_colors, 0, sizeof(int) * MAX_COLORS); - memset(m_users, 0, sizeof(int) * MAX_COLORS); - memset(m_pal, 0, sizeof(uint32_t) * MAX_COLORS); - m_changed = false; -}; - -// ================================== -void cDxr3PaletteManager::AddColor(int color) -{ - int freeIndex = MAX_COLORS; - bool found = false; - - for (int i = 0; i < MAX_COLORS && !found; ++i) - { - if (color == m_colors[i]) - { - if (m_users[i] == 0) m_changed = true; - ++m_users[i]; - found = true; - } - if (m_users[i] == 0 && freeIndex >= MAX_COLORS) - { - freeIndex = i; - } - } - if (!found && freeIndex < MAX_COLORS) - { - m_colors[freeIndex] = color; - m_users[freeIndex] = 1; - m_changed = true; - } -} - -// ================================== -void cDxr3PaletteManager::RemoveColor(int color) -{ - bool found = false; - for (int i = 0; i < MAX_COLORS && !found; ++i) - { - if (color == m_colors[i]) - { - if (m_users[i] > 0) --m_users[i]; - found = true; - } - } -} - -// ================================== -int cDxr3PaletteManager::GetIndex(int color) -{ - bool found = false; - int index = 0; - for (int i = 0; i < MAX_COLORS && !found; ++i) - { - if (color == m_colors[i]) - { - index = i; - found = true; - } - } - return index; -} - -// ================================== -int cDxr3PaletteManager::GetCount() -{ - return MAX_COLORS; -} - -// ================================== -int cDxr3PaletteManager::operator[](int index) -{ - assert(index < MAX_COLORS && index > 0); - return m_colors[index]; -} - -// ================================== -bool cDxr3PaletteManager::HasChanged() -{ - bool retval = m_changed; - m_changed = false; - return retval; -} - -// ================================== -uint32_t* cDxr3PaletteManager::GetPalette() -{ - for (int i = 0; i < MAX_COLORS; ++i) - { - m_pal[i] = Tools::Rgb2YCrCb(m_colors[i]); - } - - return m_pal; -} - -// Local variables: -// mode: c++ -// c-file-style: "stroustrup" -// c-file-offsets: ((inline-open . 0)) -// indent-tabs-mode: t -// End: diff --git a/dxr3palettemanager.h b/dxr3palettemanager.h deleted file mode 100644 index 7256853..0000000 --- a/dxr3palettemanager.h +++ /dev/null @@ -1,46 +0,0 @@ -/* - * dxr3palettemanager.h: - * - * See the main source file 'dxr3.c' for copyright information and - * how to reach the author. - * - */ - -#ifndef _DXR3PALETTEMANAGER_H_ -#define _DXR3PALETTEMANAGER_H_ - -#include <assert.h> -#include <stdlib.h> -#include <stdint.h> - -// ================================== -class cDxr3PaletteManager -{ -public: - cDxr3PaletteManager(); - ~cDxr3PaletteManager() {}; - - void AddColor(int color); - void RemoveColor(int color); - int GetCount(); - int operator[](int index); - int GetIndex(int color); - bool HasChanged(); - uint32_t* GetPalette(); - -private: - static const int MAX_COLORS = 16; - int m_colors[MAX_COLORS]; - uint32_t m_pal[MAX_COLORS]; - int m_users[MAX_COLORS]; - bool m_changed; -}; - -#endif /*_DXR3PALETTEMANAGER_H_*/ - -// Local variables: -// mode: c++ -// c-file-style: "stroustrup" -// c-file-offsets: ((inline-open . 0)) -// indent-tabs-mode: t -// End: diff --git a/dxr3pesframe.c b/dxr3pesframe.c deleted file mode 100644 index 4cde0b2..0000000 --- a/dxr3pesframe.c +++ /dev/null @@ -1,261 +0,0 @@ -/* - * dxr3pesframe.c - * - * Copyright (C) 2002-2004 Kai Möller - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation; either version 2.1 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - */ - - -#include "dxr3pesframe.h" -#include "dxr3log.h" - -#include <linux/em8300.h> -#include <stdio.h> -#include <sys/types.h> -#include <sys/stat.h> -#include <fcntl.h> - -// ================================== -bool cDxr3PesFrame::ExtractNextFrame(const uint8_t* pBuf, uint32_t length) throw (ePesFrameError) -{ - cDxr3SafeArray<uint8_t> pesArray((uint8_t*)pBuf, length); - uint32_t pos = 0; - m_pNextStart = pBuf; - m_remainingLength = length; - - InitData(); - - try - { - if (length > 9) - { - for (; pos + 9 < length && !IsPesHeader(pesArray.SubArray(pos, 4)); pos++); - if (pos + 9 >= length) - { - // Corrupt stream? - m_remainingLength = 0; - return m_bValid; - } - m_pPesStart = pBuf + pos; - - if ((pesArray[pos + 6] & 0xC0) == 0x80 /*|| (pesArray[pos + 6] & 0xC0) == 0x00*/) - { - if (pos + 9 + pesArray[pos + 8] < length) - { - m_pEsStart = pBuf + pos + 9 + pesArray[pos + 8]; - if ((((int)pesArray[pos + 4]) * (int)256 + (int)pesArray[pos + 5]) > 0) - { - m_esLength = ((int)pesArray[pos + 4]) * (int)256 + (int)pesArray[pos + 5] + (int)6 - (9 + (int)pesArray[pos + 8]); - if (pos + 9 + pesArray[pos + 8] + m_esLength <= length) - { - m_bValid = true; - m_pNextStart = m_pEsStart + m_esLength; - m_remainingLength = pBuf + length - (m_pEsStart + m_esLength); - if (pesArray[pos + 6] >> 6 == 2 && pesArray[pos + 7] >> 7 != 0) - { - ExtractPts(pesArray.SubArray(pos + 9, 5)); - } - if (m_pesDataType == PES_VIDEO_DATA) - { - int retval = ExtractVideoData(pesArray.SubArray(pos + 9 + pesArray[pos + 8], m_esLength)); - if (m_videoFrameType != UNKNOWN_FRAME && retval) m_offset = retval + pos + 9 + pesArray[pos + 8]; - } - } - } - } - } - else - { - uint32_t fpos = pos + 6; - m_esLength = ((int)pesArray[pos + 4]) * (int)256 + (int)pesArray[pos + 5]; - if (length >= pos + 6 + m_esLength) - { - while (pesArray[fpos] == 0xff) ++fpos; // skip stuffing bytes - if ((pesArray[fpos] & 0xC0) == 0x40) fpos += 2; // skip std buffer scale and size - if ((pesArray[fpos] & 0xF0) == 0x20) - { - // pts only - ExtractPts(pesArray.SubArray(fpos, 5)); - fpos += 5; - } - else if ((pesArray[fpos] & 0xF0) == 0x30) - { - // pts and dts - ExtractPts(pesArray.SubArray(fpos, 5)); - fpos += 10; - } - else - { - ++fpos; - } - - if (m_esLength) m_esLength = m_esLength - (fpos - pos - 6); - m_pEsStart = pBuf + fpos; - m_pNextStart = m_pEsStart + m_esLength; - m_remainingLength = pBuf + length - (m_pEsStart + m_esLength); - m_bValid = true; - if (m_pesDataType == PES_VIDEO_DATA) - { - int retval = ExtractVideoData(pesArray.SubArray(fpos, m_esLength)); - if (m_videoFrameType != UNKNOWN_FRAME && retval) m_offset = 0; - } - } - } - } - } - catch (cDxr3SafeArray<uint8_t>::eSafeArrayException ex) - { - m_bValid = false; - cLog::Instance() << "*** PES_GENERAL_ERROR ****\n"; - throw(PES_GENERAL_ERROR); - } - - return m_bValid; - -} - -// ================================== -int cDxr3PesFrame::ExtractVideoData(cDxr3SafeArray<uint8_t> esFrame) throw (cDxr3SafeArray<uint8_t>::eSafeArrayException) { - int retval = 0; - for (uint32_t i = 0; esFrame.GetLength() > (uint32_t) 8 && i < esFrame.GetLength() - 8; i++) - { - if (esFrame[i] == 0 && esFrame[i+1] == 0 && esFrame[i+2] == 1) - { - // start code - if ((esFrame[i + 3] & 0xFF) == 0x00) - { - // extract frame type - if (m_offset == 0) retval = i - ; - switch ((esFrame[ i + 5] >> 3) & 0x7) - { - case 0x1: - m_videoFrameType = I_FRAME; - break; - - case 0x2: - m_videoFrameType = P_FRAME; - break; - - case 0x3: - m_videoFrameType = B_FRAME; - break; - - default: - m_videoFrameType = UNKNOWN_FRAME; - break; - } - } - else if ((esFrame[i + 3] & 0xFF) == 0xB3) - { - // aspect ratio - switch ((esFrame[i + 7]) & 0xF0) - { - case 0x20: - m_staticAspectRatio = m_aspectRatio = ASPECTRATIO_4_3; - break; - - case 0x30: - m_staticAspectRatio = m_aspectRatio = ASPECTRATIO_16_9; - break; - - default: - break; - } - m_staticHorizontalSize = m_horizontalSize = (esFrame[i + 5] & 0xF0) >> 4 | esFrame[i + 4] << 4; - } - } - } - return retval; -} - -// ================================== -void cDxr3PesFrame::ExtractPts(cDxr3SafeArray<uint8_t> ptsData) throw (cDxr3SafeArray<uint8_t>::eSafeArrayException) -{ - m_pts = ((ptsData[0] >> 1) & 0x07) << 29; - m_pts |= ptsData[1] << 21; - m_pts |= (ptsData[2] >> 1) << 14; - m_pts |= ptsData[3] << 6; - m_pts |= ptsData[4] >> 2; -} - -// ================================== -bool cDxr3PesFrame::IsPesHeader(cDxr3SafeArray<uint8_t> header) throw (cDxr3SafeArray<uint8_t>::eSafeArrayException) -{ - bool ret = false; - - if (!header[0] && !header[1] && header[2] == 0x01 ) - { - ret = true; - switch (header[3]) - { - case 0xC0 ... 0xDF: // audio stream - m_pesDataType = PES_AUDIO_DATA; - break; - - case 0xE0 ... 0xEF: // video stream - m_pesDataType = PES_VIDEO_DATA; - break; - - case 0xBD: // private stream 1 - m_pesDataType = PES_PRIVATE_DATA; - break; - - case 0xBA: - ret = false; - break; - - case 0xBE: // padding stream - ret = false; - break; - - case 0xBC: // program stream map - case 0xBF: // private stream 2 - case 0xF0: // ECM stream - case 0xF1: // EMM stream - case 0xF2: // DSMCC stream - case 0xF3: // 13522 stream - case 0xF4: // H.22.1 type A - case 0xF5: // H.22.1 type B - case 0xF6: // H.22.1 type C - case 0xF7: // H.22.1 type D - case 0xF8: // H.22.1 type E - case 0xF9: // ancillary stream - case 0xFA ... 0xFE: // reserved data stream - case 0xFF: // program stream directory - break; - default: - ret = false; - break; - } - m_streamId = header[3]; - } - - return ret; -} - -// ================================== -uint32_t cDxr3PesFrame::m_staticAspectRatio = EM8300_ASPECTRATIO_4_3; -uint32_t cDxr3PesFrame::m_staticHorizontalSize = 720; -const uint32_t cDxr3PesFrame::MAX_PES_HEADER_SIZE = 184; - -// Local variables: -// mode: c++ -// c-file-style: "stroustrup" -// c-file-offsets: ((inline-open . 0)) -// indent-tabs-mode: t -// End: diff --git a/dxr3pesframe.h b/dxr3pesframe.h deleted file mode 100644 index fd5fa56..0000000 --- a/dxr3pesframe.h +++ /dev/null @@ -1,175 +0,0 @@ -/* - * dxr3pesframe.h - * - * Copyright (C) 2002-2004 Kai Möller - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation; either version 2.1 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - */ - -#ifndef _DXR3PESFRAME_H_ -#define _DXR3PESFRAME_H_ - -#include <assert.h> -#include <stdint.h> - -// ================================== -const int ASPECTRATIO_4_3 = 0; -const int ASPECTRATIO_16_9 = 1; - -// ================================== -enum eVideoFrameType -{ - I_FRAME, - P_FRAME, - B_FRAME, - UNKNOWN_FRAME -}; - -// ================================== -// XXX: Should we use here std:vector? -template <class T> -class cDxr3SafeArray -{ -public: - // ================================== - enum eSafeArrayException - { - SAFE_ARRAY_INDEX_OUT_OF_BOUND - }; - - cDxr3SafeArray(T* pBuf, uint32_t length) : m_pBuf(pBuf), m_length(length) {}; - cDxr3SafeArray(const cDxr3SafeArray& from) : m_pBuf(from.m_pBuf), m_length(from.m_length) {}; - virtual ~cDxr3SafeArray() {}; - - T& operator[](uint32_t index) throw (eSafeArrayException) { if (index >= m_length) throw(SAFE_ARRAY_INDEX_OUT_OF_BOUND); return m_pBuf[index];}; - cDxr3SafeArray SubArray(uint32_t offset, uint32_t length) { if (offset + length > m_length) throw(SAFE_ARRAY_INDEX_OUT_OF_BOUND); return cDxr3SafeArray(m_pBuf + offset, length);}; - - uint32_t GetLength(void) { return m_length; }; -protected: - T* m_pBuf; - uint32_t m_length; - -private: - cDxr3SafeArray(); // no standard constructor -}; - - -// ================================== -// pes - packetized elementary stream -class cDxr3PesFrame -{ -public: - - // ================================== - enum ePesDataType - { - PES_AUDIO_DATA, - PES_VIDEO_DATA, - PES_PRIVATE_DATA, - PES_UNKNOWN_DATA - }; - - // ================================== - enum ePesFrameError - { - PES_GENERAL_ERROR - }; - -public: - cDxr3PesFrame() : m_pesDataType(PES_UNKNOWN_DATA), m_bValid(false), m_pPesStart(0), m_pEsStart(0) - , m_esLength(0), m_pts(0), m_videoFrameType(UNKNOWN_FRAME), m_aspectRatio(m_staticAspectRatio) - , m_horizontalSize(m_staticHorizontalSize), m_streamId(0), m_pNextStart(0), m_remainingLength(0) - , m_offset(0) {}; - - virtual ~cDxr3PesFrame() {} - - bool ExtractNextFrame(const uint8_t* pBuf, uint32_t length) throw (ePesFrameError); - - ePesDataType GetPesDataType(void) const { assert(m_bValid); return m_pesDataType; }; - const uint8_t* GetPesStart(void) const { assert(m_bValid); return m_pPesStart; }; - const uint8_t* GetEsStart(void) const { assert(m_bValid); return m_pEsStart; }; - uint32_t GetEsLength(void) const { assert(m_bValid); return m_esLength; }; - - const uint8_t* GetNextStart(void) const { return m_pNextStart;}; - uint32_t GetRemainingLength(void) const { return m_remainingLength;}; - - uint32_t GetPts(void) const { assert(m_bValid); return m_pts; }; - - eVideoFrameType GetFrameType(void) const { assert(m_bValid); assert(m_pesDataType == PES_VIDEO_DATA); return m_videoFrameType;}; - uint32_t GetAspectRatio(void) const { assert(m_bValid); assert(m_pesDataType == PES_VIDEO_DATA); return m_aspectRatio;}; - uint32_t GetHorizontalSize(void) const { assert(m_bValid); assert(m_pesDataType == PES_VIDEO_DATA); return m_horizontalSize;}; - uint8_t GetStreamId(void) const { assert(m_bValid); assert(m_pesDataType == PES_VIDEO_DATA); return m_streamId;}; - int GetOffset(void) const { assert(m_bValid); return m_offset;}; - - bool IsValid(void) { return m_bValid; }; - -protected: - bool IsPesHeader(cDxr3SafeArray<uint8_t> header) throw (cDxr3SafeArray<uint8_t>::eSafeArrayException); - void ExtractPts(cDxr3SafeArray<uint8_t> ptsData) throw (cDxr3SafeArray<uint8_t>::eSafeArrayException); - int ExtractVideoData(cDxr3SafeArray<uint8_t> esFrame) throw (cDxr3SafeArray<uint8_t>::eSafeArrayException); - - void InitData(void) - { - m_pesDataType = PES_UNKNOWN_DATA; - m_bValid = false; - m_pPesStart = 0; - m_pEsStart = 0; - m_esLength = 0; - m_pts = 0; - m_videoFrameType = UNKNOWN_FRAME; - m_aspectRatio = m_staticAspectRatio; - m_horizontalSize = m_staticHorizontalSize; - m_streamId = 0; - m_pNextStart = 0; - m_remainingLength = 0; - m_offset = 0; - } - - ePesDataType m_pesDataType; - bool m_bValid; - const uint8_t* m_pPesStart; - const uint8_t* m_pEsStart; - uint32_t m_esLength; - uint32_t m_pts; - - eVideoFrameType m_videoFrameType; - uint32_t m_aspectRatio; - uint32_t m_horizontalSize; - uint8_t m_streamId; - - const uint8_t* m_pNextStart; - uint32_t m_remainingLength; - int m_offset; - - static uint32_t m_staticAspectRatio; - static uint32_t m_staticHorizontalSize; - -protected: - static const uint32_t MAX_PES_HEADER_SIZE; - -private: - cDxr3PesFrame(cDxr3PesFrame&); // no copy constructor - -}; - -#endif /*_DXR3PESFRAME_H_*/ - -// Local variables: -// mode: c++ -// c-file-style: "stroustrup" -// c-file-offsets: ((inline-open . 0)) -// indent-tabs-mode: t -// End: diff --git a/dxr3singleton.h b/dxr3singleton.h deleted file mode 100644 index cf85750..0000000 --- a/dxr3singleton.h +++ /dev/null @@ -1,53 +0,0 @@ -/* - * dxr3singleton.h - * - * Copyright (C) 2004 Christian Gmeiner - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation; either version 2.1 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - */ - -#ifndef _DXR3_SINGLETON_H_ -#define _DXR3_SINGLETON_H_ - -// ================================== -//! A singleton template. -/*! - Is a nice solution to use only - one instance of a class. -*/ -template<typename T> -class Singleton -{ - protected: - Singleton() {} - virtual ~Singleton() {} - - public: - static T& Instance() - { - static T m_Instance; - return m_Instance; - } -}; - -#endif /*_DXR3_SINGLETON_H_*/ - -// Local variables: -// mode: c++ -// c-file-style: "stroustrup" -// c-file-offsets: ((inline-open . 0)) -// indent-tabs-mode: t -// End: diff --git a/dxr3spudecoder.c b/dxr3spudecoder.c deleted file mode 100644 index 1589eae..0000000 --- a/dxr3spudecoder.c +++ /dev/null @@ -1,115 +0,0 @@ -/* - * dxr3spudecoder.c - * - * Copyright (C) 2004 Christian Gmeiner - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation; either version 2.1 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - */ - -#include "dxr3spudecoder.h" - -// ================================== -// ! constructor -cDxr3SpuDecoder::cDxr3SpuDecoder() : m_Interface(cDxr3Interface::Instance()), m_visible(false) -{ - m_ScaleMode = eSpuNormal; -} - -// ================================== -// ! send spu data to dxr3 -#if VDRVERSNUM >= 10318 -void cDxr3SpuDecoder::processSPU(uint32_t pts, uint8_t * buf, bool AllowedShow) -#else -void cDxr3SpuDecoder::processSPU(uint32_t pts, uint8_t * buf) -#endif -{ - // size are the first two bits of buf - // size = (buf[0] << 8) + buf[1] - - m_Interface.WriteSpu(buf, (buf[0] << 8) + buf[1]); - m_Interface.SetSpuPts(pts); -} - -// ================================== -// ! get scalemode -cSpuDecoder::eScaleMode cDxr3SpuDecoder::getScaleMode(void) -{ - return m_ScaleMode; -} - -// ================================== -// ! set scalemode - not needed -void cDxr3SpuDecoder::setScaleMode(cSpuDecoder::eScaleMode ScaleMode) -{ - m_ScaleMode = ScaleMode; -} - -// ================================== -// ! send palette to dxr3 -void cDxr3SpuDecoder::setPalette(uint32_t * pal) -{ - m_Interface.SetPalette(pal); -} - -// ================================== -// ! send highlight to dxr3 -void cDxr3SpuDecoder::setHighlight(uint16_t sx, uint16_t sy, uint16_t ex, uint16_t ey, uint32_t palette) -{ - m_Interface.SetButton(sx, sy, ex, ey, palette); -} - -// ================================== -// ! clear highlight -void cDxr3SpuDecoder::clearHighlight(void) -{ - m_Interface.ClearButton(); -} - -// ================================== -// ! draw nav, subtitles, ... -void cDxr3SpuDecoder::Draw(void) -{ - m_visible = true; -} - -// ================================== -// ! hide nav, subtitles, ... -void cDxr3SpuDecoder::Hide(void) -{ - m_visible = false; -} - -// ================================== -// ! clear highlight and osd -void cDxr3SpuDecoder::Empty(void) -{ - m_Interface.ClearOsd(); -} - -// ================================== -// ! set pts -int cDxr3SpuDecoder::setTime(uint32_t pts) -{ - m_Interface.SetSpuPts(pts); - return (pts == 0) ? 0 : 1; -} - -// Local variables: -// mode: c++ -// c-file-style: "stroustrup" -// c-file-offsets: ((inline-open . 0)) -// indent-tabs-mode: t -// End: diff --git a/dxr3spudecoder.h b/dxr3spudecoder.h deleted file mode 100644 index a8b771b..0000000 --- a/dxr3spudecoder.h +++ /dev/null @@ -1,72 +0,0 @@ -/* - * dxr3spudecoder.h - * - * Copyright (C) 2004 Christian Gmeiner - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation; either version 2.1 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - */ - -#ifndef _DXR3SPUDECODER_H_ -#define _DXR3SPUDECODER_H_ - -#include "dxr3vdrincludes.h" -#include "dxr3interface.h" - -// ================================== -//! spu decoder -/*! - cDxr3SpuDecoder is used to show DVD - navigation and subtitles. - We make here use of the DVD-Functions - of the dxr3 driver/card. -*/ -class cDxr3SpuDecoder : public cSpuDecoder -{ -public: - cDxr3SpuDecoder(); - ~cDxr3SpuDecoder() {} - - int setTime(uint32_t pts); - - cSpuDecoder::eScaleMode getScaleMode(void); - void setScaleMode(cSpuDecoder::eScaleMode ScaleMode); - void setPalette(uint32_t * pal); - void setHighlight(uint16_t sx, uint16_t sy, uint16_t ex, uint16_t ey, uint32_t palette); - void clearHighlight(); - void Empty(); - void Hide(); - void Draw(); - bool IsVisible() { return m_visible; } -#if VDRVERSNUM >= 10318 - void processSPU(uint32_t pts, uint8_t * buf, bool AllowedShow); -#else - void processSPU(uint32_t pts, uint8_t * buf); -#endif - -private: - cDxr3Interface& m_Interface; ///< interface to dxr3 driver - bool m_visible; ///< is anything visible (nav, osd, subtitles) - eScaleMode m_ScaleMode; -}; - -#endif /*_DXR3SPUDECODER_H_*/ - -// Local variables: -// mode: c++ -// c-file-style: "stroustrup" -// c-file-offsets: ((inline-open . 0)) -// indent-tabs-mode: t -// End: diff --git a/dxr3spuencoder.c b/dxr3spuencoder.c deleted file mode 100644 index b052600..0000000 --- a/dxr3spuencoder.c +++ /dev/null @@ -1,247 +0,0 @@ -/* - * dxr3spuencoder.c - encodes an OSD bitmap as subpicture - * - * Assimilated and adapted by - * Stefan Schluenss <dxr3_osd@schluenss.de> - * Nov. 2002 - * - * Based on the subpicture encoding routines from MPlayer and - * the information given by - * Samuel Hocevar - * Michel Lespinasse - * and http://members.aol.com/mpucoder/DVD/spu.html - * - * 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 -*/ - -#include "dxr3spuencoder.h" - -// ================================== -// dec. -cSpuData::~cSpuData() -{ - Clear(); -} - -// ================================== -// free buffer and set it to 0 -void cSpuData::Clear() -{ - if (data) - { - free(data); - count = malloc_size = 0; - } -} - -// ================================== -// wirte a byte to spu buffer -void cSpuData::WriteByte(uint8_t byte) -{ - if (count >= malloc_size) - { - data = (u_char*)realloc(data, malloc_size += 2048); - } - - data[count++] = byte; -} - -// ================================== -void cSpuData::WriteNibble(int *higher_nibble, uint8_t nibble) -{ -} - -// ================================== -void cSpuData::WriteRle(int *higher_nibble, int length, int color) -{ -} - - -// ================================== -cSPUEncoder::cSPUEncoder() -{ - m_lastwindow = 0; - - // clear osd - memset(m_OSD, 0x00 ,OSDWIDTH * OSDHEIGHT); -} - -// ================================== -// main function for the osd -// makes life nicer :) -int cSPUEncoder::Cmd(OSD_Command cmd, int color, int x0, int y0, int x1, int y1, const void *data) -{ - switch (cmd) - { - case OSD_SetWindow: - // (x0) set window with number 0<x0<8 as current - if (x0 < 8 && x0 > 0) - { - m_lastwindow = x0; - return 0; - } - - return -1; - break; - - case OSD_Open: - // (x0,y0,x1,y1,BitPerPixel[2/4/8](color&0x0F),mix[0..15](color&0xF0)) - // Opens OSD with this size and bit depth - // returns 0 on success, -1 on DRAM allocation error, -2 on "already open" - m_windows[m_lastwindow].x0 = x0; - m_windows[m_lastwindow].y0 = y0; - m_windows[m_lastwindow].x1 = x1; - m_windows[m_lastwindow].y1 = y1; - - // calculate new active osd area - CalculateActiveOsdArea(); - - return 0; - break; - - case OSD_SetPalette: - // Spu->Cmd(OSD_SetPalette, 0, NumColors - 1, 0, 0, 0, Colors); - // (firstcolor{color},lastcolor{x0},data) - // Set a number of entries in the palette - // sets the entries "firstcolor" through "lastcolor" from the array "data" - // data has 4 byte for each color: - // R,G,B, and a opacity value: 0->transparent, 1..254->mix, 255->pixel - - return 0; - break; - - case OSD_SetBlock: - // (x0,y0,x1,y1,increment{color},data) - // fills pixels x0,y0 through x1,y1 with the content of data[] - // inc contains the width of one line in the data block, - // inc<=0 uses blockwidth as linewidth - // returns 0 on success, -1 on clipping all pixel - - return 0; - break; - - case OSD_Close: - // clear colors from palettemanager - - // set windows position to 0 - m_windows[m_lastwindow].x0 = 0; - m_windows[m_lastwindow].y0 = 0; - m_windows[m_lastwindow].x1 = 0; - m_windows[m_lastwindow].y1 = 0; - - // calculate new active osd area - CalculateActiveOsdArea(); - - return 0; - break; - - case OSD_Clear: - // Sets all pixels to color 0 - // returns 0 on success - - // This should be done in cSPUEncoder::cSPUEncoder - - return 0; - break; - - // not needed - at the moment - case OSD_Show: - case OSD_Hide: - case OSD_Fill: - case OSD_SetColor: - case OSD_SetTrans: - case OSD_SetPixel: - case OSD_GetPixel: - case OSD_SetRow: - case OSD_FillRow: - case OSD_FillBlock: - case OSD_Line: - case OSD_Query: - case OSD_Test: - case OSD_Text: - case OSD_MoveWindow: - break; - }; - - return -1; -} - -// ================================== -// stamps window content into full osd bitmap -void cSPUEncoder::CopyBlockIntoOSD(int linewidth, int x0, int y0, int x1, int y1, u_char *data) -{ - int i; - int w; - u_char *cp; - u_char *sp = data; - - - // linewidth contains the width of one line in the data block, - // linewidth<=0 uses blockwidth as linewidth - if (linewidth <= 0) - { - w = m_windows[m_lastwindow].x1 - m_windows[m_lastwindow].x0; - } - else - { - w = linewidth; - } - - for (i = y0; i <= y1; ++i) - { - cp = &m_OSD[i*OSDWIDTH + x0]; - if ((cp+x1-x0+1) < &m_OSD[OSDWIDTH * OSDHEIGHT-1]) - { - for (int xx=0; xx <= (x1-x0); xx++) - { - *(cp+xx) = m_windows[m_lastwindow].colors[*(sp+xx) & 0x0f]; - } - } - else - { - continue; - } - sp += w; - } -} - -// ================================== -// we _only_ write usefull data -void cSPUEncoder::CalculateActiveOsdArea() -{ - // reset - m_active_osd.Reset(); - - // calculate - for (int i = 0; i < 8; i++) - { - m_active_osd.x0 = std::max(m_active_osd.x0, m_windows[i].x0); - m_active_osd.x1 = std::max(m_active_osd.x1, m_windows[i].y0); - m_active_osd.y0 = std::max(m_active_osd.y0, m_windows[i].x1); - m_active_osd.y1 = std::max(m_active_osd.y1, m_windows[i].y1); - } - - cLog::Instance() << "OSD x0: " << m_active_osd.x0 << "\n"; - cLog::Instance() << "OSD y0: " << m_active_osd.y0 << "\n"; - cLog::Instance() << "OSD x1: " << m_active_osd.x1 << "\n"; - cLog::Instance() << "OSD y1: " << m_active_osd.y1 << "\n"; -} - -// Local variables: -// mode: c++ -// c-file-style: "stroustrup" -// c-file-offsets: ((inline-open . 0)) -// indent-tabs-mode: t -// End: diff --git a/dxr3spuencoder.h b/dxr3spuencoder.h deleted file mode 100644 index b02ecf0..0000000 --- a/dxr3spuencoder.h +++ /dev/null @@ -1,210 +0,0 @@ -/* - * dxr3spuencoder.h - encodes an OSD bitmap as subpicture - * - * Assimilated and adapted by - * Stefan Schluenss <dxr3_osd@schluenss.de> - * Nov. 2002 - * - * Based on the subpicture encoding routines from MPlayer and - * the information given by - * Samuel Hocevar - * Michel Lespinasse - * and http://members.aol.com/mpucoder/DVD/spu.html - * - * 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 - -*/ - -#ifndef _DXR3_INTERFACE_SPU_ENCODER_ -#define _DXR3_INTERFACE_SPU_ENCODER_ - -#include <stdlib.h> -#include <linux/dvb/osd.h> -#include "dxr3vdrincludes.h" -#include "dxr3palettemanager.h" -#include "dxr3colormanager.h" -#include "dxr3interface.h" -#include "dxr3singleton.h" - -// ================================== -#define MAXWINDOWS 8 -#define DATASIZE 53220 -#define OSDWIDTH 720 -#define OSDWIDTH2 480 -#define OSDHEIGHT 576 - -// ================================== -// basic infos about one osd "window" -struct sOSD_Window -{ - size_t x0; - size_t y0; - size_t x1; - size_t y1; - - unsigned char colors[16]; - unsigned char opacity[16]; - - size_t NumColors; -}; - -// ================================== -// used to get active osd area -struct sRectal -{ - sRectal() { Reset(); } - - void Reset() - { - x0 = x1 = y0 = y1 = 0; - } - - - size_t x0; - size_t x1; - size_t y0; - size_t y1; -}; - -// ================================== -// our spu(data) with all needed routines -class cSpuData -{ -public: - cSpuData(): count(0), malloc_size(0) {} - ~cSpuData(); - - void Clear(); - u_char* GetData() const { return data; } - - // write operations - void WriteByte(uint8_t byte); - void WriteNibble(int *higher_nibble, uint8_t nibble); - void WriteRle(int *higher_nibble, int length, int color); - -private: - u_char *data; - size_t count; // the count of bytes written - size_t malloc_size; // size of data -}; - -// ================================== -class cSPUEncoder : public Singleton<cSPUEncoder> -{ -public: - cSPUEncoder(); - ~cSPUEncoder() {} - - int Cmd(OSD_Command cmd, int color = 0, int x0 = 0, int y0 = 0, int x1 = 0, int y1 = 0, const void *data = 0); - -private: - void CopyBlockIntoOSD(int linewidth, int x0,int y0, int x1, int y1, u_char *data); - - void CalculateActiveOsdArea(); - - - sOSD_Window m_windows[8]; - size_t m_lastwindow; - - // 'active' osd area - sRectal m_active_osd; - - // our osd :) - u_char m_OSD[OSDWIDTH * OSDHEIGHT]; -}; - -/* - -// ================================== -struct pixbuf -{ - int x, y; - u_int rgb[4]; - u_char* pixels; -}; -*/ -// ================================== -/* - -dxr3interface.c: In member function `void cDxr3Interface::ClearOsd()': -dxr3interface.c:984: error: `encodedata' undeclared (first use this function) -dxr3interface.c:984: error: (Each undeclared identifier is reported only once - for each function it appears in.) -dxr3interface.c:984: error: parse error before `;' token -dxr3interface.c:987: error: `ed' undeclared (first use this function) -make: *** [dxr3interface.o] Error 1 - - - !!Fix this!! - -*/ - -struct encodedata -{ - u_char data[DATASIZE]; - int count; // the count of bytes written - int oddstart; - int nibblewaiting; -}; -/* -// ================================== -class cSPUEncoder : public Singleton<cSPUEncoder> -{ -public: - cSPUEncoder(); - ~cSPUEncoder() {} - - int Cmd(OSD_Command cmd, int color = 0, int x0 = 0, int y0 = 0, int x1 = 0, int y1 = 0, const void *data = 0); - -private: - cSPUEncoder(cSPUEncoder&); // no copy constructor - - // helper functions - void CopyBlockIntoOSD(int linewidth, int x0,int y0, int x1, int y1, u_char *data); - void EncodePixelbufRle(int x, int y, int w, int h, u_char *inbuf, int stride, encodedata *ed); - void ScaleOSD(double fac, unsigned char* buf, unsigned char NumColors=4); - void encode_put_nibble(encodedata* ed, u_char nibble); - void encode_pixels(encodedata* ed, int color, int number); - void encode_eol(encodedata* ed); - void encode_do_row(encodedata* ed, pixbuf* pb, int row); - void encode_do_control(int x,int y, encodedata* ed, pixbuf* pb); - - void CalculateActiveOsdArea(); - - sOSD_Window m_windows[8]; - cDxr3PaletteManager m_palManager; - cColorManager* m_ColorManager; - encodedata m_encodeddata; - int m_lastwindow; - - // our osd :) - u_char OSD_Screen[OSDWIDTH * OSDHEIGHT]; - u_char OSD_Screen2[OSDWIDTH * OSDHEIGHT]; - u_char OSD_Screen3[OSDWIDTH * OSDHEIGHT]; - - // 'active' osd sizes - sRectal m_active_osd; -}; - -*/ - -#endif /*_DXR3_INTERFACE_SPU_ENCODER_*/ - -// Local variables: -// mode: c++ -// c-file-style: "stroustrup" -// c-file-offsets: ((inline-open . 0)) -// indent-tabs-mode: t -// End: diff --git a/dxr3syncbuffer.c b/dxr3syncbuffer.c deleted file mode 100644 index 29b8aa9..0000000 --- a/dxr3syncbuffer.c +++ /dev/null @@ -1,471 +0,0 @@ -/* - * dxr3syncbuffer.c - * - * Copyright (C) 2002-2004 Kai Möller - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation; either version 2.1 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - */ - -/* - ToDo: - - cDxr3SyncBuffer::Push: XXX This is only a workaround until a sufficient control algorithm is implemented -*/ - -#include <unistd.h> -#include "dxr3syncbuffer.h" -#include "dxr3memcpy.h" - -const int DXR3_MAX_VIDEO_FRAME_LENGTH = 4096; -const int DXR3_MAX_AUDIO_FRAME_LENGTH = 4096; - -// ================================== -//! constructor -cFixedLengthFrame::cFixedLengthFrame() : -m_count(0), m_length(0), m_pts(0), m_type(ftUnknown) { - - m_audioChannelCount = UNKNOWN_CHANNEL_COUNT; - m_audioDataRate = UNKNOWN_DATA_RATE; - m_videoAspectRatio = UNKNOWN_ASPECT_RATIO; -} - -// ================================== -cFixedLengthFrame::~cFixedLengthFrame() -{ - if (m_pData) - { - delete[] m_pData; - } -} - -// ================================== -// ! setup our frame -void cFixedLengthFrame::Init(uint32_t lenght) -{ - m_length = lenght; - m_pData = new uint8_t[lenght]; - - // allocation ok? - if (!m_pData) - { - cLog::Instance() << "Failed to allocate memory in cFixedLengthFrame (m_pData) - will stop now"; - exit(1); - } -} - -// ================================== -void cFixedLengthFrame::CopyFrame(const uint8_t* pStart, int length, uint32_t pts, eFrameType type) -{ - if (length > m_length) - { - delete[] m_pData; - m_pData = new uint8_t[length]; - m_length = length; - } - m_type = type; - m_count = length; - m_pts = pts; - dxr3_memcpy((void*) m_pData,(void*) pStart, length); -} - -// ================================== -uint8_t* cFixedLengthFrame::GetData(void) -{ - return m_pData; -} - -// ================================== -int cFixedLengthFrame::GetCount(void) -{ - return m_count; -} - -// ================================== -uint32_t cFixedLengthFrame::GetPts(void) -{ - return m_pts; -} - -// ================================== -void cFixedLengthFrame::SetPts(uint32_t pts) -{ - m_pts = pts; -} - -// ================================== -uint32_t cFixedLengthFrame::m_staticAudioChannelCount = 0; -uint32_t cFixedLengthFrame::m_staticAudioDataRate = 0; - - -// ================================== -//! constructor -cDxr3SyncBuffer::cDxr3SyncBuffer(int frameCount, int frameLength, cDxr3Interface& dxr3Device) : cRingBuffer(frameCount, true), m_dxr3Device(dxr3Device) -{ - m_pBuffer = new cFixedLengthFrame[frameCount]; - - // got we a valid m_pBuffer? - if (!m_pBuffer) - { - cLog::Instance() << "Failed to allocate memory in cDxr3SyncBuffer (m_pBuffer) - will stop now"; - exit(1); - } - - // init our new m_pBuffer; - for (int i = 0; i < frameCount; i++) - { - m_pBuffer[i].Init(frameLength); - } - - // set some default values - m_count = 0; - m_nextFree = 0; - m_next = 0; - m_bWaitPts = false; - m_waitPts = 0; - m_waitDelta = 0; - m_lastPts = 0; - m_bPutBlock = false; - m_bGetBlock = false; - m_bStartReceiver = false; - m_bStopped = false; - m_demuxMode = DXR3_DEMUX_TV_MODE; - m_bPollSync = false; - SetTimeouts(1000, 10); -} - -// ================================== -cDxr3SyncBuffer::~cDxr3SyncBuffer() -{ - if (m_pBuffer) - { - delete[] m_pBuffer; - } -} - -// ================================== -int cDxr3SyncBuffer::Available(void) -{ - int ret = 0; -#if VDRVERSNUM < 10313 - Lock(); -#endif - ret = m_count; -#if VDRVERSNUM < 10313 - Unlock(); -#endif - return ret; -} - -// ================================== -const int BUFFER_LIMIT = 5; -const int BUFFER_LIMIT_2 = 10; - -// ================================== -bool cDxr3SyncBuffer::Poll(int TimeoutMs) -{ - bool retVal = true; - uint32_t currTime = m_dxr3Device.GetSysClock(); - m_bPollSync = true; - if (m_demuxMode == DXR3_DEMUX_REPLAY_MODE) - { - if (Available() >= Size() - (Size()*BUFFER_LIMIT/100)) - { - m_bPollSync = true; - while ((Available() >= Size() - (Size()*BUFFER_LIMIT_2)/100) && ((m_dxr3Device.GetSysClock() - currTime) < ((uint32_t)TimeoutMs * (uint32_t)45))) - { - m_bPutBlock = true; - EnableGet(); - m_bWaitPts = false; - WaitForPut(); - } - if (Available() >= Size() - (Size()*BUFFER_LIMIT_2)/100) - { - retVal = false; - } - } - } - - return retVal; -} - -// ================================== -cFixedLengthFrame* cDxr3SyncBuffer::Push(const uint8_t* pStart, int length, uint32_t pts, eFrameType type) throw (eSyncBufferException) -{ - int lastIndex = 0; - - switch (m_demuxMode) - { - case DXR3_DEMUX_TRICK_MODE: - break; - - case DXR3_DEMUX_TV_MODE: - case DXR3_DEMUX_REPLAY_MODE: - default: - - while ((Available() >= Size() - (Size()*10)/100)) - { - m_bPutBlock = true; - EnableGet(); - m_bWaitPts = false; - WaitForPut(); - } - - #if VDRVERSNUM < 10313 - Lock(); - #endif - if (pts == m_lastPts) - { - pts = 0; - } - else - { - m_lastPts = pts; - } - lastIndex = m_nextFree; - m_pBuffer[m_nextFree].CopyFrame(pStart, length, pts, type); - m_pBuffer[m_nextFree].SetChannelCount(UNKNOWN_CHANNEL_COUNT); - m_pBuffer[m_nextFree].SetDataRate(UNKNOWN_DATA_RATE); - m_pBuffer[m_nextFree].SetAspectRatio(UNKNOWN_ASPECT_RATIO); - m_nextFree++; - m_count++; - m_nextFree %= Size(); - - if (m_nextFree == m_next) - { - cLog::Instance() << "Buffer overrun\n"; -// cLog::Instance() << "cDxr3SyncBuffer::Push m_demuxMode: " << (int)m_demuxMode << endl; -// cLog::Instance() << "cDxr3SyncBuffer::Push Available(): " << Available() << endl; -// cLog::Instance() << "cDxr3SyncBuffer::Push Size(): " << Size() << endl; - - Clear(); // XXX This is only a workaround until a sufficient control algorithm is implemented - throw(SYNC_BUFFER_OVERRUN); - } - if (!m_bWaitPts) - { - if (m_bStartReceiver) - { - EnableGet(); - } - } - else - { - if (m_waitPts < m_dxr3Device.GetSysClock() || - m_waitPts - m_dxr3Device.GetSysClock() < m_waitDelta) - { - EnableGet(); - m_bWaitPts = false; - } - } - #if VDRVERSNUM < 10313 - Unlock(); - #endif - break; - } - - return &m_pBuffer[lastIndex]; -} - -// ================================== -void cDxr3SyncBuffer::Pop(void) -{ -#if VDRVERSNUM < 10313 - Lock(); -#endif - if (m_count) - { - uint32_t nextPts = 0; - uint32_t tmpBuffer = m_next; - for (int i = 0; i < m_count && nextPts == 0; ++i) - { - if (tmpBuffer) tmpBuffer = --tmpBuffer ? tmpBuffer : (Size() - 1); - nextPts = m_pBuffer[tmpBuffer].GetPts(); - } - if (nextPts != 30) - { - cDxr3NextPts::Instance().SetNextPts(nextPts); - } - - m_next++; - m_count--; - m_next %= Size(); - if (m_next == m_nextFree) - { - m_next = m_nextFree = m_count = 0; - } - } - EnablePut(); -#if VDRVERSNUM < 10313 - Unlock(); -#endif -} - -// ================================== -cFixedLengthFrame* cDxr3SyncBuffer::Get(void) -{ - cFixedLengthFrame* pRet = 0; - - if (!m_bStopped) - { - while (!Available() || !m_bStartReceiver) - { - m_bGetBlock = true; - ReceiverStopped(); - WaitForGet(); - } - - #if VDRVERSNUM < 10313 - Lock(); - #endif - if (m_nextFree != m_next) - { - pRet = &m_pBuffer[m_next]; - } - #if VDRVERSNUM < 10313 - Unlock(); - #endif - } - else - { - WaitForGet(); - } - - return pRet; -} - -// ================================== -void cDxr3SyncBuffer::Clear(void) -{ -#if VDRVERSNUM < 10313 - Lock(); -#endif - m_next = 0; - m_nextFree = 0; - m_count = 0; - m_lastPts = 0; - m_bWaitPts = false; - m_bStartReceiver = false; - m_bPollSync = false; - if (m_bPutBlock) - { - EnablePut(); - m_bPutBlock = false; - } - cFixedLengthFrame::Clear(); - cDxr3NextPts::Instance().Clear(); -#if VDRVERSNUM < 10313 - Unlock(); -#endif -} - -// ================================== -void cDxr3SyncBuffer::WaitForSysClock(uint32_t pts, uint32_t delta) -{ - m_waitPts = pts; - m_waitDelta = delta; - if (!m_bPutBlock) - { - #if VDRVERSNUM < 10313 - Lock(); - #endif - m_bWaitPts = true; - #if VDRVERSNUM < 10313 - Unlock(); - #endif - m_bGetBlock = true; - ReceiverStopped(); - WaitForGet(); - } - else - { - usleep(1); //* (pts - pSysClock->GetSysClock())); - } -} - -// ================================== -void cDxr3SyncBuffer::WaitForNextPut(void) -{ - if (!m_bPutBlock) - { - m_bGetBlock = true; - ReceiverStopped(); - WaitForGet(); - } - else - { - usleep(1); - } -} - -// ================================== -void cDxr3SyncBuffer::Start(void) -{ - m_bStartReceiver = true; - m_bStopped = false; - if (Available()) - { - EnableGet(); - } -} - -// ================================== -void cDxr3SyncBuffer::WakeUp(void) -{ -#if VDRVERSNUM < 10313 - Lock(); -#endif - if (m_bStartReceiver == true) - { - if (!m_bWaitPts) - { - EnableGet(); - } - else - { - if (m_waitPts < m_dxr3Device.GetSysClock() || - m_waitPts - m_dxr3Device.GetSysClock() < m_waitDelta) - { - EnableGet(); - m_bWaitPts = false; - } - } - } -#if VDRVERSNUM < 10313 - Unlock(); -#endif -} - -// ================================== -void cDxr3SyncBuffer::WaitForReceiverStopped(void) -{ - if (!m_bGetBlock) - { - receiverStoppedMutex.Lock(); - receiverStopped.Wait(receiverStoppedMutex); - receiverStoppedMutex.Unlock(); - } -} - -// ================================== -void cDxr3SyncBuffer::ReceiverStopped(void) -{ - receiverStopped.Broadcast(); -} - -// Local variables: -// mode: c++ -// c-file-style: "stroustrup" -// c-file-offsets: ((inline-open . 0)) -// indent-tabs-mode: t -// End: diff --git a/dxr3syncbuffer.h b/dxr3syncbuffer.h deleted file mode 100644 index fe680d4..0000000 --- a/dxr3syncbuffer.h +++ /dev/null @@ -1,145 +0,0 @@ -/* - * dxr3syncbuffer.h - * - * Copyright (C) 2002-2004 Kai Möller - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation; either version 2.1 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - */ - -#ifndef _DXR3SYNCBUFFER_H_ -#define _DXR3SYNCBUFFER_H_ - -#include <stdint.h> - -#include "dxr3vdrincludes.h" -#include "dxr3interface.h" -#include "dxr3generaldefines.h" -#include "dxr3nextpts.h" -#include "dxr3log.h" - -// ================================== -const uint32_t UNKNOWN_CHANNEL_COUNT = 0xFFFFFFFF; -const uint32_t UNKNOWN_DATA_RATE = 0xFFFFFFFF; -const uint32_t UNKNOWN_ASPECT_RATIO = 0xFFFFFFFF; - -// ================================== -class cFixedLengthFrame -{ -public: - cFixedLengthFrame(); - ~cFixedLengthFrame(); - - void Init(uint32_t lenght); - - void CopyFrame(const uint8_t* pStart, int length, uint32_t pts, eFrameType type); - uint8_t* GetData(void); - int GetCount(void); - uint32_t GetPts(void); - void SetPts(uint32_t pts); - void SetChannelCount(uint32_t channelCount) {if (channelCount != UNKNOWN_CHANNEL_COUNT) m_staticAudioChannelCount = m_audioChannelCount = channelCount; else m_audioChannelCount = m_staticAudioChannelCount; }; - void SetDataRate(uint32_t dataRate) {if (m_audioDataRate != UNKNOWN_DATA_RATE) m_staticAudioDataRate = m_audioDataRate = dataRate; else m_audioDataRate = m_staticAudioDataRate;}; - void SetAspectRatio(uint32_t aspectRatio) {m_videoAspectRatio = aspectRatio;}; - uint32_t GetChannelCount(void) {return ((m_audioChannelCount == m_staticAudioChannelCount || !m_staticAudioChannelCount)? m_audioChannelCount : m_staticAudioChannelCount) ;}; - uint32_t GetDataRate(void) {return ((m_audioDataRate == m_staticAudioDataRate || !m_staticAudioDataRate) ? m_audioDataRate : m_staticAudioDataRate);}; - uint32_t GetAspectRatio(void) {return m_videoAspectRatio;}; - eFrameType GetFrameType(void) {return m_type;} - - static void Clear(void) {m_staticAudioDataRate = 0; m_staticAudioChannelCount = 0;}; - -protected: - uint8_t* m_pData; - int m_count; - int m_length; - uint32_t m_pts; - eFrameType m_type; - - uint32_t m_audioChannelCount; - uint32_t m_audioDataRate; - uint32_t m_videoAspectRatio; - - static uint32_t m_staticAudioChannelCount; - static uint32_t m_staticAudioDataRate; - -private: -// cFixedLengthFrame(); // you are not allowed to use this constructor - cFixedLengthFrame(cFixedLengthFrame&); // no copy constructor - -}; - -// ================================== -class cDxr3SyncBuffer : public cRingBuffer -{ -public: - enum eSyncBufferException - { - SYNC_BUFFER_OVERRUN - }; -public: - cDxr3SyncBuffer(int frameCount, int frameLength, cDxr3Interface& dxr3Device); - ~cDxr3SyncBuffer(); - - virtual int Available(void); - cFixedLengthFrame* Push(const uint8_t* pStart, int length, uint32_t pts, eFrameType type = ftUnknown) throw (eSyncBufferException); - void Pop(void); - cFixedLengthFrame* Get(void); - void Clear(void); - void Stop(void) { m_bStopped = true;}; - void Start(void); - void WaitForSysClock(uint32_t pts, uint32_t delta); - void WaitForNextPut(void); - void WakeUp(void); - void WaitForReceiverStopped(void); - void SetDemuxMode(eDxr3DemuxMode demuxMode) {m_demuxMode = demuxMode;}; - eDxr3DemuxMode GetDemuxMode(void) {return m_demuxMode;}; - bool Poll(int TimeoutMs); - bool IsPolled(void) { return m_bPollSync;}; - uint32_t GetFillLevel(void) { return Available() * 100 / Size();}; - -protected: - void ReceiverStopped(void); - - cFixedLengthFrame* m_pBuffer; - int m_count; - int m_nextFree; - int m_next; - bool m_bWaitPts; - bool m_bPutBlock; - bool m_bGetBlock; - bool m_bStartReceiver; - bool m_bStopped; - uint32_t m_waitPts; - uint32_t m_waitDelta; - uint32_t m_lastPts; - eDxr3DemuxMode m_demuxMode; - - cCondVar receiverStopped; - cMutex receiverStoppedMutex; - cDxr3Interface& m_dxr3Device; - bool m_bPollSync; - -private: - cDxr3SyncBuffer(); // you are not allowed to use this constructor - cDxr3SyncBuffer(cDxr3SyncBuffer&); // no constructor -}; - -#endif /*_DXR3SYNCBUFFER_H_*/ - -// Local variables: -// mode: c++ -// c-file-style: "stroustrup" -// c-file-offsets: ((inline-open . 0)) -// indent-tabs-mode: t -// End: diff --git a/dxr3sysclock.c b/dxr3sysclock.c deleted file mode 100644 index 189ac0b..0000000 --- a/dxr3sysclock.c +++ /dev/null @@ -1,77 +0,0 @@ -/* - * dxr3sysclock.c - * - * Copyright (C) 2002-2004 Kai Möller - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation; either version 2.1 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - */ - -#include <sys/ioctl.h> -#include "dxr3sysclock.h" - -// ================================== -void cDxr3SysClock::SetSysClock(uint32_t scr) -{ - uint32_t sc; - - mutex.Lock(); - ioctl(m_fdcontrol, EM8300_IOCTL_SCR_GET, &sc); - m_offset = scr - sc; - mutex.Unlock(); -} - -// ================================== -uint32_t cDxr3SysClock::GetSysClock(void) -{ - uint32_t sc; - uint32_t retval; - - mutex.Lock(); - ioctl(m_fdcontrol, EM8300_IOCTL_SCR_GET, &sc); - retval = sc + m_offset; - mutex.Unlock(); - - return retval; -} - -// ================================== -void cDxr3SysClock::SetPts(uint32_t pts) -{ - uint32_t newPts = 0; - - mutex.Lock(); - newPts = pts - m_offset; - ioctl(m_fdvideo, EM8300_IOCTL_VIDEO_SETPTS, &newPts); - mutex.Unlock(); -} - -// ================================== -void cDxr3SysClock::SetSpuPts(uint32_t pts) -{ - uint32_t newPts = 0; - - mutex.Lock(); - newPts = (pts - m_offset) << 1; // fix for DVD subtitles - ioctl(m_fdspu, EM8300_IOCTL_SPU_SETPTS, &newPts); - mutex.Unlock(); -} - -// Local variables: -// mode: c++ -// c-file-style: "stroustrup" -// c-file-offsets: ((inline-open . 0)) -// indent-tabs-mode: t -// End: diff --git a/dxr3sysclock.h b/dxr3sysclock.h deleted file mode 100644 index 75033e2..0000000 --- a/dxr3sysclock.h +++ /dev/null @@ -1,63 +0,0 @@ -/* - * dxr3sysclock.h - * - * Copyright (C) 2002-2004 Kai Möller - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation; either version 2.1 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - */ - -#ifndef _DXR3_SYSCLOCK_H_ -#define _DXR3_SYSCLOCK_H_ - -#include "dxr3vdrincludes.h" -#include <linux/em8300.h> - -// ================================== -// work with dxr3's clock -class cDxr3SysClock -{ -public: - cDxr3SysClock(int fd_control, int fd_video, int fd_spu) : m_fdcontrol(fd_control), - m_fdvideo(fd_video), m_fdspu(fd_spu), m_offset(0) {}; - - virtual ~cDxr3SysClock() {}; - -public: - void SetSysClock(uint32_t scr); - uint32_t GetSysClock(void); - void SetPts(uint32_t pts); - void SetSpuPts(uint32_t pts); - -protected: - int m_fdcontrol; - int m_fdvideo; - int m_fdspu; - uint32_t m_offset; - cMutex mutex; - -protected: - cDxr3SysClock(); // you are not allowed to use this contructor - cDxr3SysClock(cDxr3SysClock&); // no copy constructor -}; - -#endif /*_DXR3_SYSCLOCK_H_*/ - -// Local variables: -// mode: c++ -// c-file-style: "stroustrup" -// c-file-offsets: ((inline-open . 0)) -// indent-tabs-mode: t -// End: diff --git a/dxr3tools.h b/dxr3tools.h deleted file mode 100644 index e93d2fc..0000000 --- a/dxr3tools.h +++ /dev/null @@ -1,104 +0,0 @@ -/* - * dxr3tools.h - * - * Copyright (C) 2004 Christian Gmeiner - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation; either version 2.1 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - */ - -#ifndef _DXR3TOOLS_H_ -#define _DXR3TOOLS_H_ - -#include "dxr3vdrincludes.h" - -namespace Tools -{ - // ================================== - //! convert Rgb to CrCb - inline unsigned int Rgb2YCrCb(unsigned long rgb) - { - float Y,U,V; - float R,G,B; - unsigned int yuv = 0x0; - - B = ((rgb >> 16) & 0xFF); - G = ((rgb >> 8) & 0xFF); - R = (rgb & 0xFF); - - Y = (0.2578125 * R) + (0.50390625 * G) + (0.09765625 * B) + 16; - U = (0.4375 * R) - (0.3671875 * G) - (0.0703125 * B) + 128; - V =-(0.1484375 * R) - (0.2890625 * G) + (0.4375 * B) + 128; - - yuv = (int(Y) << 16) | (int(U) << 8) | int(V); - - return yuv; - } - - // ================================== - //! convert YUV to Rgb - inline unsigned int YUV2Rgb(unsigned int yuv_color) - { - int Y, Cb, Cr; - int Ey, Epb, Epr; - int Eg, Eb, Er; - - Y = (yuv_color >> 16) & 0xff; - Cb = (yuv_color) & 0xff; - Cr = (yuv_color >> 8) & 0xff; - - Ey = (Y - 16); - Epb = (Cb - 128); - Epr = (Cr - 128); - - Eg = (298 * Ey - 100 * Epb - 208 * Epr) / 256; - Eb = (298 * Ey + 516 * Epb) / 256; - Er = (298 * Ey + 408 * Epr) / 256; - - if (Eg > 255) - Eg = 255; - if (Eg < 0) - Eg = 0; - - if (Eb > 255) - Eb = 255; - if (Eb < 0) - Eb = 0; - - if (Er > 255) - Er = 255; - if (Er < 0) - Er = 0; - - return Eb | (Eg << 8) | (Er << 16); - } - - // ================================== - //! write a string via vdr to OSD - inline void WriteInfoToOsd(std::string x) - { - Skins.Message(mtInfo, x.c_str()); - } - -} - -#endif /*_DXR3TOOLS_H_*/ - -// Local variables: -// mode: c++ -// c-file-style: "stroustrup" -// c-file-offsets: ((inline-open . 0)) -// indent-tabs-mode: t -// End: diff --git a/dxr3unixserversocket.c b/dxr3unixserversocket.c deleted file mode 100644 index 00f9a6d..0000000 --- a/dxr3unixserversocket.c +++ /dev/null @@ -1,216 +0,0 @@ -/* - * dxr3unixserversocket.c - * - * Copyright (C) 2002-2004 Kai Möller - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation; either version 2.1 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - */ - -#include <sys/types.h> -#include <sys/stat.h> -#include <unistd.h> -#include <stdio.h> - -#include <iostream> -#include <cstring> -#include <string> - -#include "dxr3unixserversocket.h" -#include "dxr3interface.h" -#include "dxr3log.h" - -#ifndef SOCKET_CHMOD -#define SOCKET_CHMOD 0660 -#endif - -// ================================== -//! constructor -cDxr3UnixServerSocket::cDxr3UnixServerSocket(const char* pFileName, int backlog) -{ - m_bConnected = false; - m_backlog = backlog; - m_addr.sun_family = AF_UNIX; - m_msgSize = 0; - - m_pFileName = pFileName; - strcpy(m_addr.sun_path, pFileName); - unlink(pFileName); - - - m_fdServerSocket = socket(PF_UNIX, SOCK_STREAM, 0); - if (m_fdServerSocket > -1) - { - if (bind(m_fdServerSocket, (sockaddr*)&m_addr, (socklen_t)sizeof(m_addr))) { - cLog::Instance() << "cDxr3UnixServerSocket::cDxr3UnixServerSocket Error: binding socket failed\n"; - } - - if (listen(m_fdServerSocket, m_backlog)) - { - cLog::Instance() << "cDxr3UnixServerSocket::cDxr3UnixServerSocket Error: Listen failed\n"; - } - - if (chmod(m_pFileName, SOCKET_CHMOD)) - { - cLog::Instance() << "cDxr3UnixServerSocket::cDxr3UnixServerSocket Error: Chmod failed\n"; - } - } - else - { - cLog::Instance() << "cDxr3UnixServerSocket::cDxr3UnixServerSocket Error: Unable to create socket\n"; - } -} - -// ================================== -bool cDxr3UnixServerSocket::WaitForConnection() -{ - cLog::Instance() << "cDxr3UnixServerSocket::WaitForConnection Waiting ...\n"; - if (m_fdServerSocket > -1) - { - m_fdConnectionSocket = accept(m_fdServerSocket, 0, 0); - if (m_fdConnectionSocket > -1) - { - m_bConnected = true; - cLog::Instance() << "cDxr3UnixServerSocket::WaitForConnection Connected\n"; - } - else - { - m_bConnected = false; - cLog::Instance() << "cDxr3UnixServerSocket::WaitForConnection failed\n"; - } - } - else - { - m_bConnected = false; - } - return m_bConnected; -} - -// ================================== -bool cDxr3UnixServerSocket::GetNextMessage() -{ - bool ret = false; - m_msgSize = 0; - memset(m_msg, 0, MAX_REC_SIZE); - - if (m_bConnected) - { - m_msgSize = read(m_fdConnectionSocket, m_msg, MAX_REC_SIZE - 1); - if (m_msgSize <= 0) - { - m_msgSize = 0; - m_bConnected = 0; - close(m_fdConnectionSocket); - cLog::Instance() << "cDxr3UnixServerSocket::GetNextMessage failed/connection closed\n"; - } - else - { - ret = true; - } - } - - if (ret) ProcessMessage(); - - return ret; -} - -// ================================== -bool cDxr3UnixServerSocket::IsConnected() -{ - return m_bConnected; -} - -// ================================== -cDxr3UnixServerSocket::~cDxr3UnixServerSocket() -{ - close(m_fdConnectionSocket); - close(m_fdServerSocket); - unlink(m_pFileName); -} - -// ================================== -void cDxr3StartStopSocket::SendStatus() -{ - if (cDxr3Interface::Instance().IsExternalReleased()) - { - std::string res("CloseDxr3DeviceRsp\n"); - write(m_fdConnectionSocket, res.c_str(), res.size()); - } - else - { - std::string res("OpenDxr3DeviceRsp\n"); - write(m_fdConnectionSocket, res.c_str(), res.size()); - } -} - -// ================================== -void cDxr3StartStopSocket::ProcessMessage(void) -{ - cLog::Instance() << "cDxr3StartStopSocket::ProcessMessage Rec: " << (const char*) m_msg << "\n"; - - if (std::string((const char*)m_msg) == std::string("OpenDxr3DeviceCmd")) - { - cDxr3Interface::Instance().ExternalReopenDevices(); - SendStatus(); - } - else if (std::string((const char*)m_msg) == std::string("CloseDxr3DeviceCmd")) - { - cDxr3Interface::Instance().ExternalReleaseDevices(); - SendStatus(); - } - else if (std::string((const char*)m_msg) == std::string("StatusDxr3DeviceCmd")) - { - SendStatus(); - } - else if (std::string((const char *)m_msg) == std::string("SaveDxr3DeviceCmd")) - { - m_bSavedState = cDxr3Interface::Instance().IsExternalReleased(); - SendStatus(); - } - else if (std::string((const char *)m_msg) == std::string("RestoreDxr3DeviceCmd")) - { - if (m_bSavedState) - { - cDxr3Interface::Instance().ExternalReleaseDevices(); - } - else - { - cDxr3Interface::Instance().ExternalReopenDevices(); - } - SendStatus(); - } - else - { - std::string res("Error\n"); - write(m_fdConnectionSocket, res.c_str(), res.size()); - } -} - -// ================================== -void cDxr3StartStopThread::Action() -{ - cDxr3StartStopSocket mySocket; - while (mySocket.WaitForConnection()) - { - while (mySocket.GetNextMessage()); - } -} - -// Local variables: -// mode: c++ -// c-file-style: "stroustrup" -// c-file-offsets: ((inline-open . 0)) -// indent-tabs-mode: t -// End: diff --git a/dxr3unixserversocket.h b/dxr3unixserversocket.h deleted file mode 100644 index 32b5852..0000000 --- a/dxr3unixserversocket.h +++ /dev/null @@ -1,91 +0,0 @@ -/* - * dxr3unixserversocket.h - * - * Copyright (C) 2002-2004 Kai Möller - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation; either version 2.1 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - */ - -#ifndef __DXR3_UNIX_SERVER_SOCKET_H -#define __DXR3_UNIX_SERVER_SOCKET_H - -#include <stdint.h> -#include <sys/socket.h> -#include <sys/un.h> - - -#include "dxr3vdrincludes.h" - -class cDxr3UnixServerSocket { -public: - cDxr3UnixServerSocket(const char* pFileName = "/tmp/.dxr3-ux-sock", int backlog = 5); - virtual ~cDxr3UnixServerSocket(); - - bool WaitForConnection(void); - bool GetNextMessage(void); - bool IsConnected(void); -protected: - virtual void ProcessMessage(void) = 0; - - const char* m_pFileName; - bool m_bConnected; - int m_backlog; - int m_fdServerSocket; - int m_fdConnectionSocket; - sockaddr_un m_addr; - enum eDxr3socketMessageSize { MAX_REC_SIZE = 100 }; - uint8_t m_msg[MAX_REC_SIZE]; - uint8_t m_msgSize; - -private: - cDxr3UnixServerSocket(cDxr3UnixServerSocket&); // no copy constructor -}; - - -class cDxr3StartStopSocket : public cDxr3UnixServerSocket { -public: - cDxr3StartStopSocket() : m_bSavedState(false) {}; - virtual ~cDxr3StartStopSocket() {}; -protected: - void ProcessMessage(void); - void SendStatus(void); - - bool m_bSavedState; - -private: - cDxr3StartStopSocket(cDxr3StartStopSocket&); // no copy constructor -}; - - -class cDxr3StartStopThread : public cThread { -public: - cDxr3StartStopThread() {}; - virtual ~cDxr3StartStopThread() {}; -protected: - virtual void Action(void); - -private: - cDxr3StartStopThread(cDxr3StartStopThread&); // no copy constructor -}; - -#endif // __DXR3_UNIX_SERVER_SOCKET_H - -// Local variables: -// mode: c++ -// c-file-style: "stroustrup" -// c-file-offsets: ((inline-open . 0)) -// indent-tabs-mode: t -// End: diff --git a/dxr3vdrincludes.h b/dxr3vdrincludes.h deleted file mode 100644 index 23ce128..0000000 --- a/dxr3vdrincludes.h +++ /dev/null @@ -1,58 +0,0 @@ -/* - * dxr3vdrincludes.h - * - * Copyright (C) 2002-2004 Kai Möller - * Copyright (C) 2004 Christian Gmeiner - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation; either version 2.1 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - */ - -#ifndef _DXR3_VDRINCLUDES_H_ -#define _DXR3_VDRINCLUDES_H_ - -#include <string> -#include <algorithm> -#include <vector> - -#ifndef __STL_CONFIG_H -#define __STL_CONFIG_H -#define __DXR3_UNDEF_STL_CONFIG_AFTERWARDS -#endif - -// all includes from vdr -#include <vdr/osd.h> -#include <vdr/config.h> -#include <vdr/thread.h> -#include <vdr/ringbuffer.h> -#include <vdr/spu.h> -#include <vdr/tools.h> -#include <vdr/device.h> -#include <vdr/status.h> -#include <vdr/plugin.h> -#include <vdr/audio.h> - -#ifdef __DXR3_UNDEF_STL_CONFIG_AFTERWARDS -#undef __STL_CONFIG_H -#endif - -#endif /*_DXR3_VDRINCLUDES_H_*/ - -// Local variables: -// mode: c++ -// c-file-style: "stroustrup" -// c-file-offsets: ((inline-open . 0)) -// indent-tabs-mode: t -// End: diff --git a/patches/README b/patches/README deleted file mode 100644 index 29524fe..0000000 --- a/patches/README +++ /dev/null @@ -1 +0,0 @@ -See top of each patch for a description. diff --git a/patches/em8300-adv7170-wss.patch b/patches/em8300-adv7170-wss.patch deleted file mode 100644 index 4549676..0000000 --- a/patches/em8300-adv7170-wss.patch +++ /dev/null @@ -1,395 +0,0 @@ -Wide screen signaling (WSS) patch for the em8300 driver by Seppo Ingalsuo. -Apply to: em8300 driver sources -More info: http://sf.net/mailarchive/forum.php?thread_id=6061108&forum_id=7173 -Note: you'll probably want to apply vdr-dxr3-wss.patch too - in order to get VDR(-dxr3) to use this functionality. - - -Index: em8300setup/em8300setup.c -=================================================================== -RCS file: /cvsroot/dxr3/em8300/em8300setup/em8300setup.c,v -retrieving revision 1.3 -diff -u -r1.3 em8300setup.c ---- em8300setup/em8300setup.c 8 Mar 2005 01:14:31 -0000 1.3 -+++ em8300setup/em8300setup.c 24 May 2005 14:03:31 -0000 -@@ -112,7 +112,7 @@ - char ucode_file[200]; // bad hardcoded value ;-) - - /* Vars to hold desired setings - init to -1 so we can see which were requested to be set explicitly by the user and which should be left alone */ -- int tvmode=-1, aspect=-1, audio=-1, spu=-1, upload=0, display_only=0; -+ int tvmode=-1, aspect=-1, audio=-1, spu=-1, upload=0, display_only=0, wssmode=-1; - - - char * devs[] = {"/dev/em8300-0","/dev/em8300-1","/dev/em8300-2","/dev/em8300-3"}; -@@ -175,12 +175,45 @@ - upload=1; - printf("Using microcode file %s\n",ucode_file); - break; -+ case 'z': -+ switch (opt[2]) { -+ case '0': -+ wssmode = EM8300_WSS_OFF; -+ break; -+ case '1': -+ wssmode = EM8300_WSS_4_3; -+ break; -+ case '2': -+ wssmode = EM8300_WSS_14_9; -+ if (opt[3]=='l') wssmode = EM8300_WSS_14_9_LETTERBOX; -+ if (opt[3]=='t') wssmode = EM8300_WSS_14_9_LETTERBOX_TOP; -+ break; -+ case '3': -+ wssmode = EM8300_WSS_16_9; -+ if (opt[3]=='l') wssmode = EM8300_WSS_16_9_LETTERBOX; -+ if (opt[3]=='t') wssmode = EM8300_WSS_16_9_LETTERBOX_TOP; -+ if (opt[3]=='p') wssmode = EM8300_WSS_16P_9_LETTERBOX; -+ break; -+ default: -+ printf("Unknown option -z%c\n\n",opt[2]);; -+ exit(1); -+ } -+ break; - default: - printf("Unknown option -%c \n\n",opt[1]); - printf("Usage: em8300setup [-q]|[all other options]\n\nWhere options are one of the following (latter options will override previously\nspecified options for the same control):\n\n"); - printf(" -p, -p6, -n\tSet display mode to pal, pal60, ntsc\n"); - printf(" -a, -d, -3\tSet audio mode to analog, digitalpcm, digital ac3\n"); - printf(" -o, -w\tSet aspect ratio to normal[4:3], widescreen[16:9]\n"); -+ printf(" -z0\t\tSet WSS to disabled\n"); -+ printf(" -z1\t\tSet WSS to 4:3\n"); -+ printf(" -z2\t\tSet WSS to 14:9\n"); -+ printf(" -z2l\t\tSet WSS to 14:9 letterbox\n"); -+ printf(" -z2t\t\tSet WSS to 14:9 letterbox top\n"); -+ printf(" -z3\t\tSet WSS to 16:9\n"); -+ printf(" -z3l\t\tSet WSS to 16:9 letterbox\n"); -+ printf(" -z3t\t\tSet WSS to 16:9 letterbox top\n"); -+ printf(" -z3p\t\tSet WSS to >16:9 letterbox\n"); - printf(" -S, -s\tSet spu mode On(S), Off(s)\n"); - printf(" -f <filename>\tSpecify alternate location of microcode\n\t\t(Defaults to /usr/share/misc/em8300.uc)\n"); - printf(" -q\t\tQuery the current settings for all of the above and\n\t\texit without making any changes\n"); -@@ -270,6 +303,12 @@ - if(ioctl(DEV, EM8300_IOCTL_SET_ASPECTRATIO, &aspect) == -1) - check_errno("Unable to set aspect ratio"); - } -+ if(wssmode!=-1) { -+ printf("Setting WSS = %i\n",wssmode); -+ if(ioctl(DEV, EM8300_IOCTL_SET_WSS, &wssmode) == -1) -+ check_errno("Unable to set wss"); -+ } -+ - if(audio!=-1) { - printf("Setting audio = %i\n",audio); - if(ioctl(DEV, EM8300_IOCTL_SET_AUDIOMODE, &audio) == -1) -Index: include/linux/em8300.h -=================================================================== -RCS file: /cvsroot/dxr3/em8300/include/linux/em8300.h,v -retrieving revision 1.38 -diff -u -r1.38 em8300.h ---- include/linux/em8300.h 17 May 2005 19:25:53 -0000 1.38 -+++ include/linux/em8300.h 24 May 2005 14:03:32 -0000 -@@ -80,6 +80,7 @@ - #define EM8300_IOCTL_SCR_SETSPEED _IOW('C',17,unsigned) - #define EM8300_IOCTL_FLUSH _IOW('C',18,int) - #define EM8300_IOCTL_VBI _IOW('C',19,struct timeval) -+#define EM8300_IOCTL_SET_WSS _IOW('C',20,int) - - #define EM8300_OVERLAY_SIGNAL_ONLY 1 - #define EM8300_OVERLAY_SIGNAL_WITH_VGA 2 -@@ -97,6 +98,16 @@ - #define EM8300_ASPECTRATIO_16_9 1 - #define EM8300_ASPECTRATIO_LAST 1 - -+#define EM8300_WSS_OFF 0 -+#define EM8300_WSS_4_3 8 -+#define EM8300_WSS_14_9_LETTERBOX 1 -+#define EM8300_WSS_14_9_LETTERBOX_TOP 2 -+#define EM8300_WSS_16_9_LETTERBOX 11 -+#define EM8300_WSS_16_9_LETTERBOX_TOP 4 -+#define EM8300_WSS_16P_9_LETTERBOX 13 -+#define EM8300_WSS_14_9 14 -+#define EM8300_WSS_16_9 7 -+ - #define EM8300_VIDEOMODE_PAL 0 - #define EM8300_VIDEOMODE_PAL60 1 - #define EM8300_VIDEOMODE_NTSC 2 -@@ -454,6 +465,7 @@ - int em8300_control_ioctl(struct em8300_s *em, int cmd, unsigned long arg); - int em8300_ioctl_setvideomode(struct em8300_s *em, int mode); - int em8300_ioctl_setaspectratio(struct em8300_s *em, int ratio); -+int em8300_ioctl_setwss(struct em8300_s *em, int wsscode); - int em8300_ioctl_getstatus(struct em8300_s *em, char *usermsg); - int em8300_ioctl_init(struct em8300_s *em, em8300_microcode_t *useruc); - void em8300_ioctl_enable_videoout(struct em8300_s *em, int mode); -Index: modules/adv717x.c -=================================================================== -RCS file: /cvsroot/dxr3/em8300/modules/adv717x.c,v -retrieving revision 1.45 -diff -u -r1.45 adv717x.c ---- modules/adv717x.c 9 Apr 2005 20:23:54 -0000 1.45 -+++ modules/adv717x.c 24 May 2005 14:03:34 -0000 -@@ -112,6 +112,7 @@ - int pp_ntsc; - int pd_adj_pal; - int pd_adj_ntsc; -+ int wsscode; - - unsigned char config[32]; - int configlen; -@@ -298,6 +299,63 @@ - if (data->rgbmode) { - tmpconfig[3] |= 0x10; - } -+ -+ switch (data->wsscode) { -+ case 0x08: -+ /* 4:3 full */ -+ tmpconfig[22] = 0x80; -+ tmpconfig[23] = 0x00; -+ tmpconfig[24] = 0x08; -+ break; -+ case 0x01: -+ /* 14:9 letterbox center */ -+ tmpconfig[22] = 0x80; -+ tmpconfig[23] = 0x00; -+ tmpconfig[24] = 0x01; -+ break; -+ case 0x02: -+ /* 14:9 letterbox top */ -+ tmpconfig[22] = 0x80; -+ tmpconfig[23] = 0x00; -+ tmpconfig[24] = 0x02; -+ break; -+ case 0x0b: -+ /* 16:9 letterbox center */ -+ tmpconfig[22] = 0x80; -+ tmpconfig[23] = 0x00; -+ tmpconfig[24] = 0x0b; -+ break; -+ case 0x04: -+ /* 16:9 letterbox top */ -+ tmpconfig[22] = 0x80; -+ tmpconfig[23] = 0x00; -+ tmpconfig[24] = 0x04; -+ break; -+ case 0x0d: -+ /* >16:9 letterbox center */ -+ tmpconfig[22] = 0x80; -+ tmpconfig[23] = 0x00; -+ tmpconfig[24] = 0x0d; -+ break; -+ case 0x0e: -+ /* 14:9 full */ -+ tmpconfig[22] = 0x80; -+ tmpconfig[23] = 0x00; -+ tmpconfig[24] = 0x0e; -+ break; -+ case 0x07: -+ /* 16:9 full */ -+ tmpconfig[22] = 0x80; -+ tmpconfig[23] = 0x00; -+ tmpconfig[24] = 0x07; -+ break; -+ default: -+ tmpconfig[22] = 0x00; -+ tmpconfig[23] = 0x00; -+ tmpconfig[24] = 0x00; -+ break; -+ } -+ - break; - } - -@@ -440,6 +498,7 @@ - data->bars = color_bars[em->card_nr]; - data->rgbmode = 0; - data->enableoutput = 0; -+ data->wsscode = 0; - - adv717x_setmode(ENCODER_MODE_PAL60, client); - -@@ -549,6 +608,42 @@ - data->enableoutput = (long int) arg; - adv717x_update(client); - break; -+ case ENCODER_CMD_WSS_4_3: -+ data->wsscode = 8; -+ adv717x_update(client); -+ break; -+ case ENCODER_CMD_WSS_14_9_LETTERBOX: -+ data->wsscode = 1; -+ adv717x_update(client); -+ break; -+ case ENCODER_CMD_WSS_14_9_LETTERBOX_TOP: -+ data->wsscode = 2; -+ adv717x_update(client); -+ break; -+ case ENCODER_CMD_WSS_16_9_LETTERBOX: -+ data->wsscode = 11; -+ adv717x_update(client); -+ break; -+ case ENCODER_CMD_WSS_16_9_LETTERBOX_TOP: -+ data->wsscode = 4; -+ adv717x_update(client); -+ break; -+ case ENCODER_CMD_WSS_16P_9_LETTERBOX: -+ data->wsscode = 13; -+ adv717x_update(client); -+ break; -+ case ENCODER_CMD_WSS_14_9: -+ data->wsscode = 14; -+ adv717x_update(client); -+ break; -+ case ENCODER_CMD_WSS_16_9: -+ data->wsscode = 7; -+ adv717x_update(client); -+ break; -+ case ENCODER_CMD_WSS_OFF: -+ data->wsscode = 0; -+ adv717x_update(client); -+ break; - default: - return -EINVAL; - break; -Index: modules/em8300_ioctl.c -=================================================================== -RCS file: /cvsroot/dxr3/em8300/modules/em8300_ioctl.c,v -retrieving revision 1.48 -diff -u -r1.48 em8300_ioctl.c ---- modules/em8300_ioctl.c 23 May 2005 23:44:12 -0000 1.48 -+++ modules/em8300_ioctl.c 24 May 2005 14:03:35 -0000 -@@ -188,6 +188,18 @@ - } - break; - -+ case _IOC_NR(EM8300_IOCTL_SET_WSS): -+ if (!em->ucodeloaded) { -+ return -ENOTTY; -+ } -+ -+ if (_IOC_DIR(cmd) & _IOC_WRITE) { -+ get_user(val, (int *) arg); -+ em8300_ioctl_setwss(em, val); -+ } -+ -+ break; -+ - case _IOC_NR(EM8300_IOCTL_GET_AUDIOMODE): - if (!em->ucodeloaded) { - return -ENOTTY; -@@ -539,6 +551,52 @@ - return 0; - } - -+int em8300_ioctl_setwss(struct em8300_s *em, int wsscode) -+{ -+ int wsscmd; -+ -+ switch (wsscode) { -+ case EM8300_WSS_OFF: -+ wsscmd = ENCODER_CMD_WSS_OFF; -+ break; -+ case EM8300_WSS_4_3: -+ wsscmd = ENCODER_CMD_WSS_4_3; -+ break; -+ case EM8300_WSS_14_9_LETTERBOX: -+ wsscmd = ENCODER_CMD_WSS_14_9_LETTERBOX; -+ break; -+ case EM8300_WSS_14_9_LETTERBOX_TOP: -+ wsscmd = ENCODER_CMD_WSS_14_9_LETTERBOX_TOP; -+ break; -+ case EM8300_WSS_16_9_LETTERBOX: -+ wsscmd = ENCODER_CMD_WSS_16_9_LETTERBOX; -+ break; -+ case EM8300_WSS_16_9_LETTERBOX_TOP: -+ wsscmd = ENCODER_CMD_WSS_16_9_LETTERBOX_TOP; -+ break; -+ case EM8300_WSS_16P_9_LETTERBOX: -+ wsscmd = ENCODER_CMD_WSS_16P_9_LETTERBOX; -+ break; -+ case EM8300_WSS_14_9: -+ wsscmd = ENCODER_CMD_WSS_14_9; -+ break; -+ case EM8300_WSS_16_9: -+ wsscmd = ENCODER_CMD_WSS_16_9; -+ break; -+ default: -+ return -1; -+ } -+ -+ em8300_dicom_disable(em); -+ if (em->encoder) { -+ em->encoder->driver->command(em->encoder, wsscmd, (void *) 0 ); -+ } -+ -+ em8300_dicom_enable(em); -+ em8300_dicom_update(em); -+ return 0; -+} -+ - int em8300_ioctl_setplaymode(struct em8300_s *em, int mode) - { - switch (mode) { -Index: modules/encoder.h -=================================================================== -RCS file: /cvsroot/dxr3/em8300/modules/encoder.h,v -retrieving revision 1.8 -diff -u -r1.8 encoder.h ---- modules/encoder.h 14 Jan 2002 21:41:31 -0000 1.8 -+++ modules/encoder.h 24 May 2005 14:03:35 -0000 -@@ -13,6 +13,15 @@ - - #define ENCODER_CMD_SETMODE 1 - #define ENCODER_CMD_ENABLEOUTPUT 2 -+#define ENCODER_CMD_WSS_4_3 3 -+#define ENCODER_CMD_WSS_14_9_LETTERBOX 4 -+#define ENCODER_CMD_WSS_14_9_LETTERBOX_TOP 5 -+#define ENCODER_CMD_WSS_16_9_LETTERBOX 6 -+#define ENCODER_CMD_WSS_16_9_LETTERBOX_TOP 7 -+#define ENCODER_CMD_WSS_16P_9_LETTERBOX 8 -+#define ENCODER_CMD_WSS_14_9 9 -+#define ENCODER_CMD_WSS_16_9 10 -+#define ENCODER_CMD_WSS_OFF 11 - - #endif - -Index: em8300setup/em8300setup.1 -=================================================================== -RCS file: /cvsroot/dxr3/em8300/em8300setup/em8300setup.1,v -retrieving revision 1.2 -diff -u -r1.2 em8300setup.1 ---- em8300setup/em8300setup.1 28 Apr 2005 23:18:33 -0000 1.2 -+++ em8300setup/em8300setup.1 24 May 2005 14:03:31 -0000 -@@ -27,6 +27,33 @@ - \fB-o\fR, \fB-w\fR - Set aspect ratio to respectively normal (4:3) or wide-screen (16:9). - .TP -+\fB-z0\fR -+Set WSS to disabled. -+.TP -+\fB-z1\fR -+Set WSS to 4:3. -+.TP -+\fB-z2\fR -+Set WSS to 14:9. -+.TP -+\fB-z2l\fR -+Set WSS to 14:9 letterbox. -+.TP -+\fB-z2t\fR -+Set WSS to 14:9 letterbox top. -+.TP -+\fB-z3\fR -+Set WSS to 16:9. -+.TP -+\fB-z3l\fR -+Set WSS to 16:9 letterbox. -+.TP -+\fB-z3t\fR -+Set WSS to 16:9 letterbox top. -+.TP -+\fB-z3p\fR -+Set WSS to >16:9 letterbox. -+.TP - \fB-S\fR, \fB-s\fR - Set sub-pictures respectively on or off. - .TP diff --git a/patches/vdr-dxr3-wss.patch b/patches/vdr-dxr3-wss.patch deleted file mode 100644 index e39e186..0000000 --- a/patches/vdr-dxr3-wss.patch +++ /dev/null @@ -1,47 +0,0 @@ -Wide screen signaling (WSS) patch for vdr-dxr3 by Seppo Ingalsuo. -Apply to: vdr-dxr3 plugin sources -More info: http://thread.gmane.org/gmane.linux.vdr/17095 -Note: you'll probably want to apply em8300-adv7170-wss.patch too - in order to get support for this functionality in the driver. - - -Index: dxr3interface.c -=================================================================== -RCS file: /cvsroot/dxr3plugin/dxr3/dxr3interface.c,v -retrieving revision 1.28 -diff -u -r1.28 dxr3interface.c ---- dxr3interface.c 25 Apr 2005 18:21:19 -0000 1.28 -+++ dxr3interface.c 25 Apr 2005 18:21:47 -0000 -@@ -540,16 +540,30 @@ - Lock(); - - static int requestCounter = 0; -+ int wssmode; -+ int aspect; - - if (cDxr3ConfigData::Instance().GetForceLetterBox()) ratio = EM8300_ASPECTRATIO_16_9; -- if (Setup.VideoFormat) ratio = EM8300_ASPECTRATIO_4_3; - - if (!m_ExternalReleased && ratio != UNKNOWN_ASPECT_RATIO) - { - if (ratio != m_aspectRatio && requestCounter > 50) - { -+ if (Setup.VideoFormat) -+ { -+ aspect = EM8300_ASPECTRATIO_4_3; -+#ifdef EM8300_IOCTL_SET_WSS -+ if (ratio == EM8300_ASPECTRATIO_16_9) -+ wssmode = EM8300_WSS_16_9; -+ else -+ wssmode = EM8300_WSS_OFF; -+ ioctl(m_fdControl, EM8300_IOCTL_SET_WSS, &wssmode); -+#endif -+ } -+ else -+ aspect = ratio; - requestCounter = 0; -- if (ioctl(m_fdControl, EM8300_IOCTL_SET_ASPECTRATIO, &ratio) < 0) -+ if (ioctl(m_fdControl, EM8300_IOCTL_SET_ASPECTRATIO, &aspect) < 0) - { - cLog::Instance() << "cDxr3Interface::SetAspectRatio Unable to set aspect ratio\n"; - } diff --git a/patches/vdr-iframe.patch b/patches/vdr-iframe.patch deleted file mode 100644 index f73d89e..0000000 --- a/patches/vdr-iframe.patch +++ /dev/null @@ -1,19 +0,0 @@ -Workaround for I-frame display problems when cutting (still picture not -updating) and/or fast forward/backward in some streams. -Apply to: VDR sources -More info: http://www.schluenss.de/history.html - - ---- recording.c.orig 2005-02-12 12:17:47.000000000 +0200 -+++ recording.c 2005-03-14 23:01:32.370785864 +0200 -@@ -1017,8 +1017,8 @@ - FileOffset = &index[Index].offset; - if (Length) { - // all recordings end with a non-I_FRAME, so the following should be safe: -- int fn = index[Index + 1].number; -- int fo = index[Index + 1].offset; -+ int fn = index[Index + 2].number; -+ int fo = index[Index + 2].offset; - if (fn == *FileNumber) - *Length = fo - *FileOffset; - else { |