Version 1.0.0pre4

- Added 'Ca' code 201 for 'Cryptoworks, GOD-DIGITAL' to 'ca.conf' (thanks to
  Bernd Schweikert).
- Fixed avoiding the primary DVB interface in case Setup.PrimaryLimit is 0.
- Fixed handling CICAM settings if the first one of a DVB card was FTA.
- Fixed reacting on changes in CICAM settings (needed to restart VDR before).
- The "Blue" button in the "Main" menu now works as "Stop" button if a recording
  is currently being replayed.
- New command line option '-m' to mute audio of the primary DVB device at
  startup (suggested by Mirko Gnther).
- The new SVDRP command VOLU can be used to control the audio volume (suggested
  by Mirko Gnther).
- Fixed resetting 'mute' state when setting the volume to a non-zero value.
- Added log messages when deleting recordings in case the disk runs full while
  recording.
- Fixed closing a pipe (used for replaying Dolby Digital audio), which
  sometimes left 'zombie' processes behind (thanks to Werner Fink for helping
  to debug this one).
- Now starting the Dolby Digital output thread only if the recording actually
  contains Dolby Digital audio data (thanks to Werner Fink).
- Implemented OSD for Volume and Mute (works only if there is no other OSD
  activity, but this should be no problem for normal use).
- Changed the MANUAL description of the "Conditional Access" setup parameters
  to reflect the actual "CICAM DVBn m" notation in the "Setup" menu.
- The new Setup parameter "Use time from transponder" can be used to define which
  transponder shall be used to set the system time (see MANUAL for details).
  If you have been using the SetSystemTime option previously, you now MUST
  select a channel that you trust to have a reliable time base.
- Grouped the Setup parameters into several sub-menus, so that each group of
  parameters fits on a single screen - unless the height of the OSD has been
  set to a small value (based on code from Markus Lang).
- Changed the title of the "Main" menu to "VDR".
- Fixed displaying a system message while the replay mode is being shown.
- Physically removing a deleted recording if one with the same name shall be
  deleted again.
- The "Left" and "Right" keys are now used to page up and down in text displays
  (like the EPG descriptions or the results of commands executed from the
  "Commands" menu).
- Fixed high CPU usage in transfer mode.
- Replaced 'killproc' with 'killall' in 'runvdr', since apparently 'killproc'
  is not available by default on some Linux distributions, whereas 'killall' is.
  Please check if your system provides 'killall' - if it doesn't, please change
  this back in 'runvdr' and report this (thanks to Achim Lange).
- The "Commands" menu now automatically assigns number keys as hotkeys to the
  commands. If you have preceeded your commands with digits you may want to
  remove these from your 'commands.conf' file.
- The new Setup item "Restart" can be used to force a complete restart of VDR,
  including reloading the driver. Note that this can only work if VDR and the
  driver are wrapped into a mechanism that actually performs this action if VDR
  exits. The 'runvdr' script can be used for this purpose.
- Refined texts of the "Setup" menu.
This commit is contained in:
Klaus Schmidinger 2002-03-17 18:00:00 +01:00
parent a001a4bf97
commit 217fcb2680
23 changed files with 1654 additions and 590 deletions

View File

@ -91,9 +91,12 @@ Henning Holtschneider <hh@holtschneider.com>
Paulo Manuel Martins Lopes <pmml@netvita.pt>
for translating the OSD texts to the Portugese language
Markus Lang <markus.lang@nissan-db.de> and Ulrich Röder <dynamite@efr-net.de>
Markus Lang <pretender@gaze.de> and Ulrich Röder <dynamite@efr-net.de>
for making DiSEqC support configurable
Markus Lang <pretender@gaze.de>
for some initial code for grouping the Setup menu into several sub-menus
Jean-Claude Repetto <jc@repetto.org>
for translating the OSD texts to the French language
@ -146,6 +149,9 @@ Artur Skawina <skawina@geocities.com>
Werner Fink <werner@suse.de>
for making I/O more robust by handling EINTR
for fixing closing all unused file descriptors when opening a pipe
for helping to debug leftover 'zombie' processes when closing a pipe
for making the Dolby Digital thread start only if the recording actually
contains Dolby Digital data
Rolf Hakenes <hakenes@hippomi.de>
for providing 'libdtv' and adapting the EIT mechanisms to it
@ -217,3 +223,13 @@ Oleg Assovski <assen@bitcom.msk.ru>
Adrian Stabiszewski <as@nitegate.de>
for fixing the SVDRP GRAB command in case the video device can't be opened
Bernd Schweikert <bernd.schweikert@dit-gmbh.de>
for adding 'Ca' code 201 for 'Cryptoworks, GOD-DIGITAL' to 'ca.conf'
Mirko Günther <mi.guenther@ib-helms.de>
for suggesting the -m command line option
for suggesting the SVDRP command VOLU
Achim Lange <Achim_Lange@t-online.de>
for replacing 'killproc' with 'killall' in 'runvdr' to make it work on Debian

340
COPYING Normal file
View File

@ -0,0 +1,340 @@
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 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.

12
FORMATS
View File

@ -117,7 +117,7 @@ Video Disk Recorder File Formats
* commands.conf
This file contains the definitions of commands that can be executed from
the "Main" menus "Commands" option.
the "VDR" menu's "Commands" option.
Each line contains one command definition in the following format:
@ -134,13 +134,9 @@ Video Disk Recorder File Formats
Examples:
1 Check for new mail: /usr/local/bin/checkmail 2>&1
2 CPU status : /usr/local/bin/cpustatus 2>&1
3 Disk space : df -h | grep '/video' | awk '{ print 100 - $5 "% free"; }'
If the first non-blank character of the 'title' is a digit in the range
1..9, the command can be selected directly by pressing the respective numerical
key on the remote control.
Check for new mail: /usr/local/bin/checkmail 2>&1
CPU status : /usr/local/bin/cpustatus 2>&1
Disk space : df -h | grep '/video' | awk '{ print 100 - $5 "% free"; }'
* svdrphosts.conf

61
HISTORY
View File

@ -41,14 +41,14 @@ Video Disk Recorder Revision History
of the channel, with a prepended '@' character.
- Timers that are not given an explicit Name now use the channel name with
a prepended '@' character.
- If an instant recording is currently active, the Main menu now contains
- If an instant recording is currently active, the "Main" menu now contains
an option to stop that recording.
- Timers are now only processed when the Menu is not active. So after editing
a timer the effect will take place only after the menu has been closed.
In order to avoid missing a timer event by inadvertently leaving the menu
open, the menu will be closed automatically after about two minutes of
inactivity.
- If a recording is currently being replayed, the Main menu now contains an
- If a recording is currently being replayed, the "Main" menu now contains an
option to stop replaying.
- Displaying the recording DVB interface status in the decimal points of the
RCU display.
@ -424,7 +424,7 @@ Video Disk Recorder Revision History
- Fixed a memory leak in the EIT processor that happened when the system time
was set.
- Removed some redundant code from the cListBase destructor.
- Fixed internationalization of some Main menu texts.
- Fixed internationalization of some "Main" menu texts.
- Updated 'channels.conf' after the recent changes of Premiere World (thanks
to Axel Gruber).
- Redesigned the ring buffer to make it work with two separate threads for
@ -480,7 +480,7 @@ Video Disk Recorder Revision History
items the amount of visible information remained the same as before, though.
If your DVB card has even less memory (which would result in only the
channel switching display and the replay progress display being visible, but
no Main menu), try reducing the constant 'MenuLines' in dvbapi.h (currently
no "Main" menu), try reducing the constant 'MenuLines' in dvbapi.h (currently
'13') even further.
- There are two new setup parameters to define the "Default Priority" and
"Default Lifetime" when creating a new timer event.
@ -1066,3 +1066,56 @@ Video Disk Recorder Revision History
modes (besides the default "Free To Air" mode, which is always assumed to be
available on any DVB card).
- Updated French language texts (thanks to Jean-Claude Repetto).
2002-03-17: Version 1.0.0pre4
- Added 'Ca' code 201 for 'Cryptoworks, GOD-DIGITAL' to 'ca.conf' (thanks to
Bernd Schweikert).
- Fixed avoiding the primary DVB interface in case Setup.PrimaryLimit is 0.
- Fixed handling CICAM settings if the first one of a DVB card was FTA.
- Fixed reacting on changes in CICAM settings (needed to restart VDR before).
- The "Blue" button in the "Main" menu now works as "Stop" button if a recording
is currently being replayed.
- New command line option '-m' to mute audio of the primary DVB device at
startup (suggested by Mirko Günther).
- The new SVDRP command VOLU can be used to control the audio volume (suggested
by Mirko Günther).
- Fixed resetting 'mute' state when setting the volume to a non-zero value.
- Added log messages when deleting recordings in case the disk runs full while
recording.
- Fixed closing a pipe (used for replaying Dolby Digital audio), which
sometimes left 'zombie' processes behind (thanks to Werner Fink for helping
to debug this one).
- Now starting the Dolby Digital output thread only if the recording actually
contains Dolby Digital audio data (thanks to Werner Fink).
- Implemented OSD for Volume and Mute (works only if there is no other OSD
activity, but this should be no problem for normal use).
- Changed the MANUAL description of the "Conditional Access" setup parameters
to reflect the actual "CICAM DVBn m" notation in the "Setup" menu.
- The new Setup parameter "Use time from transponder" can be used to define which
transponder shall be used to set the system time (see MANUAL for details).
If you have been using the SetSystemTime option previously, you now MUST
select a channel that you trust to have a reliable time base.
- Grouped the Setup parameters into several sub-menus, so that each group of
parameters fits on a single screen - unless the height of the OSD has been
set to a small value (based on code from Markus Lang).
- Changed the title of the "Main" menu to "VDR".
- Fixed displaying a system message while the replay mode is being shown.
- Physically removing a deleted recording if one with the same name shall be
deleted again.
- The "Left" and "Right" keys are now used to page up and down in text displays
(like the EPG descriptions or the results of commands executed from the
"Commands" menu).
- Fixed high CPU usage in transfer mode.
- Replaced 'killproc' with 'killall' in 'runvdr', since apparently 'killproc'
is not available by default on some Linux distributions, whereas 'killall' is.
Please check if your system provides 'killall' - if it doesn't, please change
this back in 'runvdr' and report this (thanks to Achim Lange).
- The "Commands" menu now automatically assigns number keys as hotkeys to the
commands. If you have preceeded your commands with digits you may want to
remove these from your 'commands.conf' file.
- The new Setup item "Restart" can be used to force a complete restart of VDR,
including reloading the driver. Note that this can only work if VDR and the
driver are wrapped into a mechanism that actually performs this action if VDR
exits. The 'runvdr' script can be used for this purpose.
- Refined texts of the "Setup" menu.

309
MANUAL
View File

@ -8,20 +8,20 @@ Video Disk Recorder User's Manual
possible, several keys have different meanings in the various
modes:
Key Normal Main Channels Timers Edit/New Recordings Replay
Key Normal VDR Channels Timers Edit/New Recordings Replay
Up Ch up Crsr up Crsr up Crsr up Crsr up Crsr up Play
Down Ch down Crsr down Crsr down Crsr down Crsr down Crsr down Pause
Left Prev group - Page up Page up Decrement Page up Search back
Right Next group - Page down Page down Increment Page down Search forward
Ok Ch display Select Switch Edit Accept Play Progress disp.
Menu Menu on Menu off Menu off Menu off Menu off Menu off Menu on
Back - Menu off Main menu Main menu Discard Main menu Recordings menu
Red - Record Edit Edit - Play Jump
Green - Language New New - Rewind Skip -60s
Yellow - - Delete Delete - Delete Skip +60s
Blue - Resume Mark On/Off(1) - Summary Stop
0..9 Ch select - - - Numeric inp. - Editing
Up Ch up Crsr up Crsr up Crsr up Crsr up Crsr up Play
Down Ch down Crsr down Crsr down Crsr down Crsr down Crsr down Pause
Left Prev group - Page up Page up Decrement Page up Search back
Right Next group - Page down Page down Increment Page down Search forward
Ok Ch display Select Switch Edit Accept Play Progress disp.
Menu Menu on Menu off Menu off Menu off Menu off Menu off Menu on
Back - Menu off VDR menu VDR menu Discard VDR menu Recordings menu
Red - Record Edit Edit - Play Jump
Green - Language New New - Rewind Skip -60s
Yellow - - Delete Delete - Delete Skip +60s
Blue - Stop/Resume Mark On/Off(1) - Summary Stop
0..9 Ch select - - - Numeric inp. - Editing
Power Shutdown
Volume+ Volume up
@ -34,7 +34,7 @@ Video Disk Recorder User's Manual
* Navigating through the On Screen Menus
The "Main" menu can be called up with the "Menu" key of your remote
The "VDR" menu can be called up with the "Menu" key of your remote
control unit. The "Up" and "Down" keys are used to select a specific
item. The "Left" and "Right" keys can be used to change options, and
the numeric keys allow direct input of numeric data. The "Ok" key
@ -74,7 +74,7 @@ Video Disk Recorder User's Manual
The "Schedule" menu implements VDR's "Electronic Program Guide" (EPG).
Select "Schedule" from the "Main" menu and you get a list of all upcoming
Select "Schedule" from the "VDR" menu and you get a list of all upcoming
broadcasts on the current channel.
"Up" and "Down" can be used to scroll through this list, and pressing "Ok"
@ -135,7 +135,7 @@ Video Disk Recorder User's Manual
* Selecting language specific audio track
If the current channel provides different audio tracks (typically for
different languages), the "Green" button in the "Main" menu can be pressed
different languages), the "Green" button in the "VDR" menu can be pressed
to toggle between these. There can be two different audio PIDs per channel,
assuming that typically a channel broadcasts a country specific language
plus the movie's original soundtrack.
@ -157,7 +157,7 @@ Video Disk Recorder User's Manual
* Instant Recording
You can start recording the current channel by pressing the "Red" button
in the "Main" menu. This will create a timer event named "@channelname" that
in the "VDR" menu. This will create a timer event named "@channelname" that
starts at the current time and records for two hours.
If you want to modify the recording time you need to edit the timer.
Stop instant recording by pressing the "Menu" button and selecting
@ -176,17 +176,17 @@ Video Disk Recorder User's Manual
number of new recordings (as opposed to a recording's entry, which displays
the date and time of the recording).
If the setup parameter UseSubtitle was turned on when a recording took place,
VDR adds the "subtitle" (which is usually the name of the episode in case of
If the setup parameter "Use episode name" was turned on when a recording took place,
VDR adds the "Episode name" (which is usually the name of the episode in case of
a series) to the recording's name. The "Recordings" menu then displays all
recordings of a repeating timer in chronological order, since these are
usually the individual episodes of a series, which you may want to view in
the order in which they were broadcast.
Playback can be stopped via the "Main" menu by selecting "Stop replaying",
Playback can be stopped via the "VDR" menu by selecting "Stop replaying",
or by pressing the "Blue" button outside the menu.
A previously stopped playback session can be resumed by pressing the "Blue"
button in the "Main" menu.
button in the "VDR" menu.
* Replay Control
@ -322,10 +322,10 @@ Video Disk Recorder User's Manual
structure "/video/Sci-Fi/Star_Trek/Voyager". The '~' character has
been chosen for this since the file system's directory delimiter '/'
may be part of a regular programme name.
Repeating timers create recordings that contain the 'Subtitle'
Repeating timers create recordings that contain the 'Episode name'
information from the EPG data in their file name. Typically (on tv
stations that care about their viewers) this contains the episode
title of a series. The subtitle is appended to the timer's file name,
title of a series. The episode name is appended to the timer's file name,
separated by a '~' character, so that it results in all recordings
of this timer being collected in a common subdirectory.
If this field is left blank, the channel name will be used to form
@ -342,7 +342,7 @@ Video Disk Recorder User's Manual
the channel or replay another recording on that interface. However, if there
is an other DVB interface that is currently not recording and provides the
necessary conditional access facilities to continue the recording that is
currently being performed on the primary DVB interface, the Main menu will
currently being performed on the primary DVB interface, the "VDR" menu will
contain an option that allows you to stop recording on the primary DVB
interface. Select that option to stop the ongoing recording and thus free the
primary DVB interface to allow channel switching or replaying. The interrupted
@ -352,87 +352,60 @@ Video Disk Recorder User's Manual
* Parameters in the "Setup" menu
Select "Setup" from the "Main" menu to enter the setup menu. From there you can
Select "Setup" from the "VDR" menu to enter the setup menu. From there you can
modify the following system parameters (note that "boolean" values will be
displayed as "no" and "yes" in the "Setup" menu, while in the setup file they
are stored as '0' and '1', respectively):
OSDLanguage = 0 Defines the language used to display the OSD texts.
0 = Englisch
1 = Deutsch
2 = Slovenian
3 = Italian
4 = Dutch
5 = Portugese
6 = French
7 = Norwegian
OSD:
PrimaryDVB = 1 Defines the primary DVB interface (i.e. the one that
will display the menus and will react on input through
the remote control). Valid values range from '1' to the
number of installed DVB cards. If more than one DVB card
is installed and a recording is to be started, the
program will try to use a free DVB card that is different
from the primary DVB interface, so that the viewer will
be disturbed as little as possible.
Language = English Defines the language used to display the OSD texts.
ShowInfoOnChSwitch = 1 Turns the display of the current/next information on
Width = 52 The width and height of the OSD .
Height = 18 The valid ranges are width=40...56, height=12...21.
Message time = 1 The time (in seconds) how long an informational
message shall be displayed on the OSD. The valid range
is 1...60.
Channel info position = bottom
The position of the channel info window in the OSD
(either 'bottom' or 'top').
Info on channel switch = yes
Turns the display of the current/next information on
or off when switching the channel. The information is
always displayed when pressing the "Ok" button in
normal viewing mode.
MenuScrollPage = 1 0 = when pressing the "Down" ("Up") key while the cursor
is on the last (first) line of a list page, the
list is advanced by a full page and the cursor will
be at the top (bottom) of that page
1 = dto., but the cursor remains at the bottom (top) of
the page (this mode allows for faster scrolling
through long lists).
Scroll pages = yes yes = when pressing the "Down" ("Up") key while the cursor
is on the last (first) line of a list page, the
list is advanced by a full page and the cursor will
be at the top (bottom) of that page
no = dto., but the cursor remains at the bottom (top) of
the page (this mode allows for faster scrolling
through long lists).
MarkInstantRecord = 1 Defines whether an "instant recording" (started by
pressing the "Red" button in the "Main" menu) will be
marked with a '@' character to make it distinguishable
from timer recordings in the "Recordings" menu.
0 = instant recordings will not be marked
1 = instant recordings will be marked.
Sort timers = yes Turns sorting the timers in the "Timers" menu on/off.
Timers are sorted by ascending start times, with the
first one being the next timer that will start.
NameInstantRecord = TITLE-EPISODE
Defines how to name an instant recording. If the keywords
TITLE and/or EPISODE are present, they will be replaced
with the title and episode information from the EPG data
at the time of recording (if that data is available).
If this parameter is empty, the channel name will be used
by default.
Recording directories = yes
Turns displaying the Recordings menu as a hierarchical
directory structure on or off.
LnbSLOF = 11700 The switching frequency (in MHz) between low and high LOF
LnbFrequLo = 9750 The LNB's low and high local oscillator frequencies (in MHz)
LnbFrequHi = 10600 (these have no meaning for DVB-C receivers)
EPG:
DiSEqC = 1 Generally turns DiSEqC support on or off.
0 = disabled
1 = enabled
SetSystemTime = 0 Defines whether the system time will be set according to
the time received from the DVB data stream.
0 = system time will not be set
1 = system time wil be set
Note that this works only if VDR is running under a user
id that has permisson to set the system time.
MarginStart = 2 Defines how many minutes before the official start time
MarginStop = 10 of a broadcast VDR shall start recording, and how long
after the official end time it shall stop recording.
EPGScanTimeout = 5 The time (in hours) of user inactivity after which the
EPG scan timeout = 5 The time (in hours) of user inactivity after which the
DVB card in a single card system starts scanning channels
to keep the EPG up-to-date.
A value of '0' completely turns off scanning on both single
and multiple card systems.
EPGBugfixLevel = 2 Some tv stations transmit weirdly formatted EPG data.
EPG bugfix level = 2 Some tv stations transmit weirdly formatted EPG data.
VDR attempts to fix these bugs up to the given level:
0 = no EPG fixing
1 = basic fixing of text location (Title, Subtitle and
1 = basic fixing of text location (Title, Episode and
Extended Description)
2 = removal of excess whitespace and hyphens, mapping of
wrongly used characters
@ -443,15 +416,74 @@ Video Disk Recorder User's Manual
be fixed accordingly. Restart VDR if you want to make sure
all data is fixed.
SVDRPTimeout = 300 The time (in seconds) of inactivity on an open SVDRP
connection after which the connection is automatically
closed. Default is 300, a value of 0 means no timeout.
Set system time = no Defines whether the system time will be set according to
the time received from the DVB data stream.
Note that this works only if VDR is running under a user
id that has permisson to set the system time. You also
need to set the option "Use time from transponder" to a
channel that you trust to transmit a reliable time base
(not all channels seem to have access to a correct time
base...).
SortTimers = 1 Turns sorting the timers in the "Timers" menu on/off.
Timers are sorted by ascending start times, with the
first one being the next timer that will start.
Use time from transponder = 0
The frequency of the transponder that shall be used to
set the system time. The Setup menu will offer the full
list of channels, even if several of them are on the
same transponder. Also, when selecting a channel, saving
the Setup and opening the Setup menu again, there may be
a different channel listed here, since the first one
in 'channels.conf' that is on the given transponder will
be taken. Note that in order to set the system time from
the transponder data the option "Set system time" must also
be enabled.
PrimaryLimit = 0 The minimum priority a timer must have to be allowed to
DVB:
Primary DVB interface = 1
Defines the primary DVB interface (i.e. the one that
will display the menus and will react on input through
the remote control). Valid values range from '1' to the
number of installed DVB cards. If more than one DVB card
is installed and a recording is to be started, the
program will try to use a free DVB card that is different
from the primary DVB interface, so that the viewer will
be disturbed as little as possible.
Video format = 4:3 The video format (or aspect ratio) of the tv set in use
(4:3 or 16:9).
LNB:
SLOF = 11700 The switching frequency (in MHz) between low and
high LOF
Low LNB frequency = 9750 The LNB's low and high local oscillator frequencies
High LNB frequency = 10600 (in MHz, these have no meaning for DVB-C receivers)
Use DiSEqC = no Generally turns DiSEqC support on or off.
CICAM:
CICAM DVBn m Defines the "Conditional Access" capabilities of the DVB
card 'n'. Each DVB card can provide up to two CICAM
methods ('m' = [1, 2]).
In the 'setup.conf' file the value consists of the card
number, followed by a list of decryption method values
(defined in 'ca.conf').
For instance
CaCaps = 3 101 102
would define that card number 3 is able to decrypt
"Premiere World" and the "ORF".
Recording:
Margin at start = 2 Defines how many minutes before the official start time
Margin at stop = 10 of a broadcast VDR shall start recording, and how long
after the official end time it shall stop recording.
These margins are added automatically to timers that
are created from the EPG data.
Primary limit = 0 The minimum priority a timer must have to be allowed to
use the primary DVB interface, or to force another timer
with higher priority to use the primary DVB interface.
This is mainly useful for recordings that should take
@ -459,55 +491,67 @@ Video Disk Recorder User's Manual
never keep the user from viewing stuff on the primary
interface. On systems with only one DVB card, timers
with a priority below PrimaryLimit will never execute.
DefaultPriority = 50 The default Priority and Lifetime values used when
DefaultLifetime = 50 creating a new timer event. A Lifetime value of 99
Default priority = 50 The default Priority and Lifetime values used when
Default lifetime = 50 creating a new timer event. A Lifetime value of 99
means that this recording will never be deleted
automatically.
UseSubtitle = 1 Repeating timers use the EPG's 'Subtitle' information to
create recording file names in a hierarchical structure
Use episode name = yes Repeating timers use the EPG's 'Episode name' information
to create recording file names in a hierarchical structure
(for instance to gather all episodes of a series in a
common subdirectory). This parameter can be used to
control this.
0 = don't use the 'Subtitle'
1 = use it (and create subdirectories)
no = don't use the 'Episode name'
yes = use it (and create subdirectories)
RecordingDirs = 1 Turns displaying the Recordings menu as a hierarchical
directory structure on or off.
Mark instant recording = yes
Defines whether an "instant recording" (started by
pressing the "Red" button in the "VDR" menu) will be
marked with a '@' character to make it distinguishable
from timer recordings in the "Recordings" menu.
VideoFormat = 0 The video format (or aspect ratio) of the tv set in use.
0 = 4:3
1 = 16:9
Name instant recording = TITLE EPISODE
Defines how to name an instant recording. If the keywords
TITLE and/or EPISODE are present, they will be replaced
with the title and episode information from the EPG data
at the time of recording (if that data is available).
If this parameter is empty, the channel name will be used
by default.
RecordDolbyDigital = 1 Turns recording of the Dolby Digital audio channels on
Record Dolby Digital = yes
Turns recording of the Dolby Digital audio channels on
or off. This may be useful if you don't have the equipment
to replay Dolby Digital audio and want to save disk space.
ChannelInfoPos = 0 The position of the channel info window in the OSD.
0 = bottom
1 = top
OSDwidth = 52 The width and height of the OSD .
OSDheight = 18 The valid ranges are width=40...56, height=12...21.
OSDMessageTime = 1 The time (in seconds) how long an informational
message shall be displayed on the OSD. The valid range
is 1...60.
MaxVideoFileSize=2000 The maximum size of a single recorded video file in MB.
Max. video file size = 2000
The maximum size of a single recorded video file in MB.
The valid range is 100...2000. Default is 2000, but
you may want to use smaller values if you are planning
on archiving a recording to CD.
SplitEditedFiles = 0 During the actual editing process VDR writes the result
Split edited files = no
During the actual editing process VDR writes the result
into files that may grow up to MaxVideoFileSize. If you
prefer to have each marked sequence stored in a separate
file (named 001.vdr, 002.vdr, ...) you can set this
option to 1.
option to 'yes'.
MinEventTimeout=30 If the command line option '-s' has been set, VDR will
MinUserInactivity=120 automatically shutdown the computer if the next timer
Replay:
Multi speed mode = no Defines the function of the "Left" and "Right" keys in
replay mode. If set to 'no', one speed will be used, while
if set to 'yes' there will be three speeds for fast and slow
search, respectively.
Show replay mode = no Turns displaying the current replay mode on or off.
Miscellaneous:
Min. event timeout = 30
Min. user inactivity = 120
If the command line option '-s' has been set, VDR will
automatically shutdown the computer if the next timer
event is at least MinEventTimeout minutes in the future,
and the user has been inactive for at least
MinUserInactivity minutes. Setting MinUserInactivity
@ -515,30 +559,15 @@ Video Disk Recorder User's Manual
retaining the possibility to manually shutdown the
computer.
MultiSpeedMode = 0 Defines the function of the "Left" and "Right" keys in
replay mode. If set to 0, one speed will be used, while
if set to 1 there will be three speeds for fast and slow
search, respectively.
0 = off
1 = on
ShowReplayMode = 0 Turns displaying the current replay mode on or off.
0 = off
1 = on
CaCaps (no default) Defines the "Conditional Access Capabilities" of a DVB
card. The value consists of the card number, followed by
a list of decryption method values (defined in 'ca.conf').
For instance
CaCaps = 3 101 102
would define that card number 3 is able to decrypt
"Premiere World" and the "ORF".
SVDRP timeout = 300 The time (in seconds) of inactivity on an open SVDRP
connection after which the connection is automatically
closed. Default is 300, a value of 0 means no timeout.
* Executing system commands
The "Main" menu option "Commands" allows you to execute any system commands
The "VDR" menu option "Commands" allows you to execute any system commands
defined in the configuration file 'commands.conf' (see FORMATS for details).
The "Commands" option will only be present in the "Main" menu if a valid
The "Commands" option will only be present in the "VDR" menu if a valid
'commands.conf' file containing at least one command definition has been
found at program start.

View File

@ -14,6 +14,10 @@
101 Premiere World
102 ORF
# Cryptoworks
201 GOD-DIGITAL
# Special values to "hard code" a channel to a specific DVB card:
1 DVB 1

View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
* $Id: config.c 1.88 2002/03/03 16:04:21 kls Exp $
* $Id: config.c 1.91 2002/03/17 14:24:09 kls Exp $
*/
#include "config.h"
@ -811,7 +811,7 @@ cChannel *cChannels::GetByNumber(int Number)
{
cChannel *channel = (cChannel *)First();
while (channel) {
if (channel->number == Number)
if (!channel->groupSep && channel->number == Number)
return channel;
channel = (cChannel *)channel->Next();
}
@ -822,7 +822,7 @@ cChannel *cChannels::GetByServiceID(unsigned short ServiceId)
{
cChannel *channel = (cChannel *)First();
while (channel) {
if (channel->pnr == ServiceId)
if (!channel->groupSep && channel->pnr == ServiceId)
return channel;
channel = (cChannel *)channel->Next();
}
@ -931,6 +931,7 @@ cSetup::cSetup(void)
LnbFrequHi = 10600;
DiSEqC = 0;
SetSystemTime = 0;
TimeTransponder = 0;
MarginStart = 2;
MarginStop = 10;
EPGScanTimeout = 5;
@ -962,12 +963,16 @@ cSetup::cSetup(void)
void cSetup::PrintCaCaps(FILE *f, const char *Name)
{
for (int d = 0; d < MAXDVBAPI; d++) {
if (CaCaps[d][0]) {
fprintf(f, "CaCaps = %d", d + 1);
for (int i = 0; i < MAXCACAPS && CaCaps[d][i]; i++)
int written = 0;
for (int i = 0; i < MAXCACAPS; i++) {
if (CaCaps[d][i]) {
if (!written++)
fprintf(f, "CaCaps = %d", d + 1);
fprintf(f, " %d", CaCaps[d][i]);
}
}
if (written)
fprintf(f, "\n");
}
}
}
@ -1013,6 +1018,7 @@ bool cSetup::Parse(char *s)
else if (!strcasecmp(Name, "LnbFrequHi")) LnbFrequHi = atoi(Value);
else if (!strcasecmp(Name, "DiSEqC")) DiSEqC = atoi(Value);
else if (!strcasecmp(Name, "SetSystemTime")) SetSystemTime = atoi(Value);
else if (!strcasecmp(Name, "TimeTransponder")) TimeTransponder = atoi(Value);
else if (!strcasecmp(Name, "MarginStart")) MarginStart = atoi(Value);
else if (!strcasecmp(Name, "MarginStop")) MarginStop = atoi(Value);
else if (!strcasecmp(Name, "EPGScanTimeout")) EPGScanTimeout = atoi(Value);
@ -1094,6 +1100,7 @@ bool cSetup::Save(const char *FileName)
fprintf(f, "LnbFrequHi = %d\n", LnbFrequHi);
fprintf(f, "DiSEqC = %d\n", DiSEqC);
fprintf(f, "SetSystemTime = %d\n", SetSystemTime);
fprintf(f, "TimeTransponder = %d\n", TimeTransponder);
fprintf(f, "MarginStart = %d\n", MarginStart);
fprintf(f, "MarginStop = %d\n", MarginStop);
fprintf(f, "EPGScanTimeout = %d\n", EPGScanTimeout);

View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
* $Id: config.h 1.102 2002/03/03 16:04:43 kls Exp $
* $Id: config.h 1.105 2002/03/17 14:24:11 kls Exp $
*/
#ifndef __CONFIG_H
@ -19,7 +19,7 @@
#include "eit.h"
#include "tools.h"
#define VDRVERSION "1.0.0pre3"
#define VDRVERSION "1.0.0pre4"
#define MAXPRIORITY 99
#define MAXLIFETIME 99
@ -92,6 +92,8 @@ public:
void Set(eKeys Key, unsigned int Code);
};
#define ISTRANSPONDER(f1, f2) (abs((f1) - (f2)) < 4)
class cChannel : public cListObject {
private:
static char *buffer;
@ -340,6 +342,7 @@ public:
int LnbFrequHi;
int DiSEqC;
int SetSystemTime;
int TimeTransponder;
int MarginStart, MarginStop;
int EPGScanTimeout;
int EPGBugfixLevel;

View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
* $Id: dvbapi.c 1.154 2002/03/03 15:43:24 kls Exp $
* $Id: dvbapi.c 1.163 2002/03/16 14:20:47 kls Exp $
*/
#include "dvbapi.h"
@ -63,6 +63,9 @@ extern "C" {
// The maximum time to wait before giving up while catching up on an index file:
#define MAXINDEXCATCHUP 2 // seconds
// The default priority for non-primary DVB cards:
#define DEFAULTPRIORITY -2
#define CHECK(s) { if ((s) < 0) LOG_ERROR; } // used for 'ioctl()' calls
#define FATALERRNO (errno != EAGAIN && errno != EINTR)
@ -743,10 +746,6 @@ cPlayBuffer::cPlayBuffer(cDvbApi *DvbApi, int VideoDev, int AudioDev)
canToggleAudioTrack = false;
skipAC3bytes = false;
audioTrack = 0xC0;
if (cDvbApi::AudioCommand()) {
if (!dolbyDev.Open(cDvbApi::AudioCommand(), "w"))
esyslog(LOG_ERR, "ERROR: can't open pipe to audio command '%s'", cDvbApi::AudioCommand());
}
}
cPlayBuffer::~cPlayBuffer()
@ -755,7 +754,11 @@ cPlayBuffer::~cPlayBuffer()
void cPlayBuffer::PlayExternalDolby(const uchar *b, int MaxLength)
{
if (dolbyDev) {
if (cDvbApi::AudioCommand()) {
if (!dolbyDev && !dolbyDev.Open(cDvbApi::AudioCommand(), "w")) {
esyslog(LOG_ERR, "ERROR: can't open pipe to audio command '%s'", cDvbApi::AudioCommand());
return;
}
if (b[0] == 0x00 && b[1] == 0x00 && b[2] == 0x01) {
if (b[3] == 0xBD) { // dolby
int l = b[4] * 256 + b[5] + 6;
@ -1147,7 +1150,7 @@ void cReplayBuffer::StripAudioPackets(uchar *b, int Length, uchar Except)
int l = b[i + 4] * 256 + b[i + 5] + 6;
switch (c) {
case 0xBD: // dolby
if (Except && dolbyDev)
if (Except)
PlayExternalDolby(&b[i], Length - i);
// continue with deleting the data - otherwise it disturbs DVB replay
case 0xC0 ... 0xC1: // audio
@ -1408,7 +1411,7 @@ void cTransferBuffer::Output(void)
int r = Get(b, sizeof(b));
if (r > 0) {
uchar *p = b;
while (r > 0 && Busy()) {
while (r > 0 && Busy() && cFile::FileReadyForWriting(toDevice, 100)) {
int w = write(toDevice, p, r);
if (w > 0) {
p += w;
@ -1685,9 +1688,8 @@ cDvbApi::cDvbApi(int n)
transferBuffer = NULL;
transferringFromDvbApi = NULL;
ca = -1;
priority = -1;
priority = DEFAULTPRIORITY;
cardIndex = n;
SetCaCaps();
// Devices that are only present on DVB-C or DVB-S cards:
@ -1721,8 +1723,6 @@ cDvbApi::cDvbApi(int n)
if (fd_frontend >= 0 && fd_demuxv >= 0 && fd_demuxa1 >= 0 && fd_demuxa2 >= 0 && fd_demuxd1 >= 0 && fd_demuxd2 >= 0 && fd_demuxt >= 0) {
siProcessor = new cSIProcessor(OstName(DEV_OST_DEMUX, n));
if (!dvbApi[0]) // only the first one shall set the system time
siProcessor->SetUseTSTime(Setup.SetSystemTime);
FrontendInfo feinfo;
CHECK(ioctl(fd_frontend, FE_GET_INFO, &feinfo));
frontendType = feinfo.type;
@ -1749,7 +1749,7 @@ cDvbApi::cDvbApi(int n)
#endif
currentChannel = 1;
mute = false;
volume = MAXVOLUME;
volume = Setup.CurrentVolume;
}
cDvbApi::~cDvbApi()
@ -1848,8 +1848,10 @@ cDvbApi *cDvbApi::GetDvbApi(int Ca, int Priority)
void cDvbApi::SetCaCaps(void)
{
for (int i = 0; i < MAXCACAPS; i++)
caCaps[i] = Setup.CaCaps[CardIndex()][i];
for (int d = 0; d < NumDvbApis; d++) {
for (int i = 0; i < MAXCACAPS; i++)
dvbApi[d]->caCaps[i] = Setup.CaCaps[dvbApi[d]->CardIndex()][i];
}
}
int cDvbApi::ProvidesCa(int Ca)
@ -1867,8 +1869,6 @@ int cDvbApi::ProvidesCa(int Ca)
else
others++;
}
else
break;
}
return result ? result + others : 0;
}
@ -1906,6 +1906,7 @@ bool cDvbApi::Init(void)
isyslog(LOG_INFO, "found %d video device%s", NumDvbApis, NumDvbApis > 1 ? "s" : "");
else
esyslog(LOG_ERR, "ERROR: no video device found, giving up!");
SetCaCaps();
return NumDvbApis > 0;
}
@ -2321,6 +2322,11 @@ eSetChannelResult cDvbApi::SetChannel(int ChannelNumber, int Frequency, char Pol
CHECK(ioctl(fd_audio, AUDIO_CLEAR_BUFFER));
}
// Stop setting system time:
if (siProcessor)
siProcessor->SetCurrentTransponder(0);
// If this card can't receive this channel, we must not actually switch
// the channel here, because that would irritate the driver when we
// start replaying in Transfer Mode immediately after switching the channel:
@ -2472,6 +2478,11 @@ eSetChannelResult cDvbApi::SetChannel(int ChannelNumber, int Frequency, char Pol
CHECK(ioctl(fd_video, VIDEO_SET_BLANK, false));
}
// Start setting system time:
if (Result == scrOk && siProcessor)
siProcessor->SetCurrentTransponder(Frequency);
return Result;
}
@ -2567,7 +2578,7 @@ void cDvbApi::StopRecord(void)
delete recordBuffer;
recordBuffer = NULL;
ca = -1;
priority = -1;
priority = DEFAULTPRIORITY;
}
}
@ -2699,12 +2710,13 @@ bool cDvbApi::ToggleAudioTrack(void)
return false;
}
void cDvbApi::ToggleMute(void)
bool cDvbApi::ToggleMute(void)
{
int OldVolume = volume;
mute = !mute;
SetVolume(0, mute);
volume = OldVolume;
return mute;
}
void cDvbApi::SetVolume(int Volume, bool Absolute)
@ -2714,6 +2726,8 @@ void cDvbApi::SetVolume(int Volume, bool Absolute)
audioMixer_t am;
am.volume_left = am.volume_right = volume;
CHECK(ioctl(fd_audio, AUDIO_SET_MIXER, &am));
if (volume > 0)
mute = false;
}
}

View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
* $Id: dvbapi.h 1.64 2002/03/03 14:51:20 kls Exp $
* $Id: dvbapi.h 1.68 2002/03/10 10:50:00 kls Exp $
*/
#ifndef __DVBAPI_H
@ -43,7 +43,8 @@
#define MAXVIDEOFILESIZE 2000 // MB
#define MINVIDEOFILESIZE 100 // MB
#define MAXVOLUME 255
#define MAXVOLUME 255
#define VOLUMEDELTA 5 // used to increase/decrease the volume
const char *IndexToHMSF(int Index, bool WithFrame = false);
// Converts the given index to a string, optionally containing the frame number.
@ -125,8 +126,8 @@ public:
// recording and stop recording if necessary.
int CardIndex(void) { return cardIndex; }
// Returns the card index of this DvbApi (0 ... MAXDVBAPI - 1).
void SetCaCaps(void);
// Sets the CaCaps of this DVB device according to the Setup data.
static void SetCaCaps(void);
// Sets the CaCaps of all DVB devices according to the Setup data.
int ProvidesCa(int Ca);
// Checks whether this DVB device provides the given value in its
// caCaps. Returns 0 if the value is not provided, 1 if only this
@ -148,8 +149,6 @@ public:
private:
cSIProcessor *siProcessor;
public:
void SetUseTSTime(bool On) { if (siProcessor) siProcessor->SetUseTSTime(On); }
// Image Grab facilities
bool GrabImage(const char *FileName, bool Jpeg = true, int Quality = -1, int SizeX = -1, int SizeY = -1);
@ -307,8 +306,9 @@ private:
bool mute;
int volume;
public:
void ToggleMute(void);
// Turns the volume off or on.
bool IsMute(void) { return mute; }
bool ToggleMute(void);
// Turns the volume off or on and returns the new mute state.
void SetVolume(int Volume, bool Absolute = false);
// Sets the volume to the given value, either absolutely or relative to
// the current volume.

19
eit.c
View File

@ -16,7 +16,7 @@
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
* $Id: eit.c 1.39 2002/03/01 16:32:11 kls Exp $
* $Id: eit.c 1.41 2002/03/17 14:23:41 kls Exp $
***************************************************************************/
#include "eit.h"
@ -981,7 +981,6 @@ cSIProcessor::cSIProcessor(const char *FileName)
{
fileName = strdup(FileName);
masterSIProcessor = numSIProcessors == 0; // the first one becomes the 'master'
useTStime = false;
filters = NULL;
if (!numSIProcessors++) // the first one creates it
schedules = new cSchedules;
@ -1138,7 +1137,7 @@ void cSIProcessor::Action()
case 0x14:
if (buf[0] == 0x70)
{
if (useTStime)
if (Setup.SetSystemTime && Setup.TimeTransponder && ISTRANSPONDER(currentTransponder, Setup.TimeTransponder))
{
cTDT ctdt((tdt_t *)buf);
ctdt.SetSystemTime();
@ -1222,14 +1221,6 @@ bool cSIProcessor::AddFilter(u_char pid, u_char tid)
return false;
}
/** set whether local systems time should be
set by the received TDT or TOT packets */
bool cSIProcessor::SetUseTSTime(bool use)
{
useTStime = use;
return useTStime;
}
/** */
bool cSIProcessor::ShutDownFilters(void)
{
@ -1246,6 +1237,12 @@ bool cSIProcessor::ShutDownFilters(void)
return true; // there's no real 'boolean' to return here...
}
/** */
void cSIProcessor::SetCurrentTransponder(int CurrentTransponder)
{
currentTransponder = CurrentTransponder;
}
/** */
bool cSIProcessor::SetCurrentServiceID(unsigned short servid)
{

6
eit.h
View File

@ -16,7 +16,7 @@
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
* $Id: eit.h 1.15 2002/02/23 15:30:25 kls Exp $
* $Id: eit.h 1.16 2002/03/10 10:56:57 kls Exp $
***************************************************************************/
#ifndef __EIT_H
@ -139,7 +139,7 @@ private:
static cMutex schedulesMutex;
static const char *epgDataFileName;
bool masterSIProcessor;
bool useTStime;
int currentTransponder;
SIP_FILTER *filters;
char *fileName;
bool active;
@ -157,7 +157,7 @@ public:
// longer used, the cMutexLock must be destroyed.
static bool Read(FILE *f = NULL);
void SetStatus(bool On);
bool SetUseTSTime(bool use);
void SetCurrentTransponder(int CurrentTransponder);
bool SetCurrentServiceID(unsigned short servid);
};

692
i18n.c
View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
* $Id: i18n.c 1.59 2002/03/03 16:38:57 kls Exp $
* $Id: i18n.c 1.66 2002/03/17 13:50:43 kls Exp $
*
* Slovenian translations provided by Miha Setina <mihasetina@softhome.net>
* Italian translations provided by Alberto Carraro <bertocar@tin.it>
@ -46,6 +46,14 @@
* in the "Setup" menu.
* 5. Send the modified 'i18n.c' file to <kls@cadsoft.de> to have
* it included in the next version of VDR.
*
* In case an English phrase is used in more than one context (and might need
* different translations in other languages) it can be preceeded with an
* arbitrary string to describe its context, separated from the actual phrase
* by a '$' character (see for instance "Button$Stop" vs. "Stop").
* Of course this means that no English phrase may contain the '$' character!
* If this should ever become necessary, the existing '$' would have to be
* replaced with something different...
*/
#include "i18n.h"
@ -70,15 +78,15 @@ const tPhrase Phrases[] = {
"Suomi",
},
// Menu titles:
{ "Main",
"Hauptmenü",
"Glavni meni",
"Principale",
"Hoofdmenu",
"Principal",
"Menu",
"Hovedmeny",
"Valikko",
{ "VDR",
"VDR",
"VDR",
"VDR",
"VDR",
"VDR",
"VDR",
"VDR",
"VDR",
},
{ "Schedule",
"Programm",
@ -291,6 +299,16 @@ const tPhrase Phrases[] = {
"Spol tilbake",
"Takaisinkel.",
},
{ "Button$Stop",
"Beenden",
"", // TODO
"", // TODO
"", // TODO
"", // TODO
"", // TODO
"", // TODO
"", // TODO
},
{ "Resume",
"Weiter",
"Nadaljuj",
@ -351,7 +369,7 @@ const tPhrase Phrases[] = {
"Neste",
"Seuraava",
},
{ "Schedule",
{ "Button$Schedule",
"Programm",
"Urnik",
"Programma",
@ -366,7 +384,7 @@ const tPhrase Phrases[] = {
"Jezik",
"Linguaggio",
"Taal",
"", // TODO
"Linguagem", // TODO (correct?)
"Langue",
"Språk",
"Kieli",
@ -452,6 +470,26 @@ const tPhrase Phrases[] = {
"Avbryte redigering?",
"Peruutetaanko muokkaus?",
},
{ "Really restart?",
"Wirklich neu starten?",
"", // TODO
"", // TODO
"", // TODO
"", // TODO
"", // TODO
"", // TODO
"", // TODO
},
{ "Recording - restart anyway?",
"Aufnahme läuft - trotzdem neu starten?",
"", // TODO
"", // TODO
"", // TODO
"", // TODO
"", // TODO
"", // TODO
"", // TODO
},
{ "Recording - shut down anyway?",
"Aufnahme läuft - trotzdem ausschalten?",
"", // TODO
@ -835,29 +873,150 @@ const tPhrase Phrases[] = {
"", // TODO
"Kovalevy lähes täynnä!",
},
// Setup pages:
{ "OSD",
"OSD",
"", // TODO
"", // TODO
"", // TODO
"", // TODO
"", // TODO
"", // TODO
"", // TODO
},
{ "EPG",
"EPG",
"", // TODO
"", // TODO
"", // TODO
"", // TODO
"", // TODO
"", // TODO
"", // TODO
},
{ "DVB",
"DVB",
"", // TODO
"", // TODO
"", // TODO
"", // TODO
"", // TODO
"", // TODO
"", // TODO
},
{ "LNB",
"LNB",
"", // TODO
"", // TODO
"", // TODO
"", // TODO
"", // TODO
"", // TODO
"", // TODO
},
{ "CICAM",
"CICAM",
"", // TODO
"", // TODO
"", // TODO
"", // TODO
"", // TODO
"", // TODO
"", // TODO
},
{ "Recording",
"Aufnahme",
"", // TODO
"", // TODO
"", // TODO
"", // TODO
"", // TODO
"", // TODO
"", // TODO
},
{ "Replay",
"Wiedergabe",
"", // TODO
"", // TODO
"", // TODO
"", // TODO
"", // TODO
"", // TODO
"", // TODO
},
{ "Miscellaneous",
"Sonstiges",
"", // TODO
"", // TODO
"", // TODO
"", // TODO
"", // TODO
"", // TODO
"", // TODO
},
{ "Restart",
"Neustart",
"", // TODO
"", // TODO
"", // TODO
"", // TODO
"", // TODO
"", // TODO
"", // TODO
},
// Setup parameters:
{ "OSD-Language",
"OSD-Sprache",
"OSD-jezik",
"Linguaggio OSD",
"OSD-taal",
"Linguagem OSD",
"Langue OSD",
"OSD Språk",
"Näytön kieli",
{ "Setup.OSD$Language",
"Sprache",
"Jezik",
"Linguaggio",
"Taal",
"Linguagem", // TODO (correct?)
"Langue",
"Språk",
"Kieli",
},
{ "PrimaryDVB",
"Primäres Interface",
"Primarna naprava",
"Scheda DVB primaria",
"Eerste DVB kaart",
"DVB primario",
"Première carte DVB",
"Hoved DVB-enhet",
"Ensisij. vast.otin",
{ "Setup.OSD$Width",
"Breite",
"", // TODO
"", // TODO
"", // TODO
"", // TODO
"Largeur", //TODO (correct?)
"", // TODO
"Leveys", //TODO (correct?)
},
{ "ShowInfoOnChSwitch",
"Info zeigen",
{ "Setup.OSD$Height",
"Höhe",
"", // TODO
"", // TODO
"", // TODO
"", // TODO
"Hauteur", //TODO (correct?)
"", // TODO
"Korkeus", //TODO (correct?)
},
{ "Setup.OSD$Message time",
"Anzeigedauer für Nachrichten",
"", // TODO
"", // TODO
"", // TODO
"", // TODO
"Durée affichage écran",
"", // TODO
"Ilmoitusten näkymisaika",
},
{ "Setup.OSD$Channel info position",
"Kanal-Info Position",
"", // TODO
"", // TODO
"", // TODO
"", // TODO
"Position infos chaînes",
"", // TODO
"Kanavainfon sijainti",
},
{ "Setup.OSD$Info on channel switch",
"Info beim Kanalwechsel",
"Pokazi naziv kanala",
"Vis info nel cambio canale",
"Kanaal info tonen",
@ -866,7 +1025,7 @@ const tPhrase Phrases[] = {
"Info ved kanalskifte",
"Näytä kanavainfo",
},
{ "MenuScrollPage",
{ "Setup.OSD$Scroll pages",
"Seitenweise scrollen",
"Drsni meni",
"Scrolla pagina nel menu",
@ -876,127 +1035,7 @@ const tPhrase Phrases[] = {
"Rask rulling i menyer",
"Valikkojen rullaus",
},
{ "MarkInstantRecord",
"Direktaufz. markieren",
"Oznaci direktno snemanje",
"Marca la registrazione",
"Direkte opnamen markeren",
"Marca de gravacao",
"Enregistrement immédiat",
"Markere direkteopptak",
"Merkitse välitön nauh.",
},
{ "NameInstantRecord",
"Direktaufz. benennen",
"", // TODO
"", // TODO
"", // TODO
"", // TODO
"Noms enregistr. immédiats",
"", // TODO
"Nimeä välitön nauh.",
},
{ "LnbSLOF",
"LnbSLOF",
"LnbSLOF",
"LnbSLOF",
"LnbSLOF",
"LnbSLOF",
"Limite de bandes LNB",
"LO-grensefrekvens",
"LnbSLOF",
},
{ "LnbFrequLo",
"Untere LNB-Frequenz",
"Spodnja LNB-frek.",
"Freq LO LNB",
"Laagste LNB frequentie",
"Freq LO LNB",
"Fréquence basse LNB",
"LO-frekvens i lavbåndet",
"LO LNB taajuus",
},
{ "LnbFrequHi",
"Obere LNB-Frequenz",
"Zgornja LNB-frek.",
"Freq HI LNB",
"Hoogste LNB frequentie",
"Freq HI LNB",
"Fréquence haute LNB",
"LO-frekvens i høybåndet",
"HI LNB taajuus",
},
{ "DiSEqC",
"DiSEqC",
"DiSEqC",
"DiSEqC",
"DiSEqC",
"DiSEqC",
"DiSEqC",
"DiSEqC",
"DiSEqC",
},
{ "SetSystemTime",
"Systemzeit stellen",
"Sistemski cas",
"Setta orario auto",
"Systeem klok instellen",
"Ajustar relogio do sistema",
"Ajuster l'heure du système",
"Juster system-klokken",
"Vastaanota kellonaika",
},
{ "MarginStart",
"Zeitpuffer bei Anfang",
"Premor pred zacetkom",
"Min margine inizio",
"Tijd marge (begin)",
"Margem de inicio",
"Marge antérieure",
"Opptaks margin (start)",
"Aloitusmarginaali",
},
{ "MarginStop",
"Zeitpuffer bei Ende",
"Premor za koncem",
"Min margine fine",
"Tijd marge (eind)",
"Margem de fim",
"Marge postérieure",
"Opptaks margin (slutt)",
"Lopetusmarginaali",
},
{ "EPGScanTimeout",
"Zeit bis EPG Scan",
"Cas do EPG pregleda",
"Timeout EPG",
"EPG-scan Timeout",
"Timeout EPG",
"Temps maxi EPG",
"Ledig tid før EPG-søk",
"Ohjelmatied. odotusaika",
},
{ "EPGBugfixLevel",
"EPG Fehlerbereinigung",
"", // TODO
"", // TODO
"", // TODO
"", // TODO
"Niveau de correction EPG",
"", // TODO
"EPGBugfixLevel",
},
{ "SVDRPTimeout",
"SVDRP Timeout",
"", // TODO
"Timeout SVDRP",
"SVDRP Timeout",
"Timeout SVDRP",
"Temps maxi SVDRP",
"Ubrukt SVDRP-levetid",
"SVDRP odotusaika",
},
{ "SortTimers",
{ "Setup.OSD$Sort timers",
"Timer sortieren",
"", // TODO
"", // TODO
@ -1006,48 +1045,8 @@ const tPhrase Phrases[] = {
"", // TODO
"Järjestä ajastimet",
},
{ "PrimaryLimit",
"Primär-Limit",
"", // TODO
"", // TODO
"", // TODO
"Limite Primario",
"Première limite",
"Prioritets grense HovedDVB",
"PrimaryLimit",
},
{ "DefaultPriority",
"Default Priorität",
"", // TODO
"", // TODO
"", // TODO
"Prioridade por defeito",
"Priorité par défaut",
"Normal prioritet (Timer)",
"Oletusprioriteetti",
},
{ "DefaultLifetime",
"Default Lebensdauer",
"", // TODO
"", // TODO
"", // TODO
"Validade por defeito",
"Durée de vie par défaut",
"Normal levetid (Timer)",
"Oletus voimassaoloaika",
},
{ "UseSubtitle",
"Subtitle verwenden",
"", // TODO
"", // TODO
"", // TODO
"", // TODO
"Utiliser les sous-titres",
"", // TODO
"Tekstitys käytössä",
},
{ "RecordingDirs",
"Aufn. Verzeichnisse",
{ "Setup.OSD$Recording directories",
"Aufnahme Verzeichnisse",
"", // TODO
"", // TODO
"", // TODO
@ -1056,7 +1055,57 @@ const tPhrase Phrases[] = {
"", // TODO
"Nauhoitushakemistot",
},
{ "VideoFormat",
{ "Setup.EPG$EPG scan timeout",
"Zeit bis EPG Scan",
"Cas do EPG pregleda",
"Timeout EPG",
"EPG-scan Timeout",
"Timeout EPG",
"Temps maxi EPG",
"Ledig tid før EPG-søk",
"Ohjelmatied. odotusaika",
},
{ "Setup.EPG$EPG bugfix level",
"EPG Fehlerbereinigung",
"", // TODO
"", // TODO
"", // TODO
"", // TODO
"Niveau de correction EPG",
"", // TODO
"EPG Bugfix Level",
},
{ "Setup.EPG$Set system time",
"Systemzeit stellen",
"Sistemski cas",
"Setta orario auto",
"Systeem klok instellen",
"Ajustar relogio do sistema",
"Ajuster l'heure du système",
"Juster system-klokken",
"Vastaanota kellonaika",
},
{ "Setup.EPG$Use time from transponder",
"Transponder für Systemzeit",
"", // TODO
"", // TODO
"", // TODO
"", // TODO
"", // TODO
"", // TODO
"", // TODO
},
{ "Setup.DVB$Primary DVB interface",
"Primäres DVB Interface",
"Primarna naprava",
"Scheda DVB primaria",
"Eerste DVB kaart",
"DVB primario",
"Première carte DVB",
"Hoved DVB-enhet",
"Ensisij. vast.otin",
},
{ "Setup.DVB$Video format",
"Video Format",
"", // TODO
"", // TODO
@ -1066,8 +1115,138 @@ const tPhrase Phrases[] = {
"TV Format",
"Kuvamuoto",
},
{ "RecordDolbyDigital",
"Dolby Digital Ton aufz.",
{ "Setup.LNB$SLOF",
"SLOF",
"SLOF",
"SLOF",
"SLOF",
"SLOF",
"Limite de bandes LNB",
"LO-grensefrekvens",
"SLOF",
},
{ "Setup.LNB$Low LNB frequency",
"Untere LNB-Frequenz",
"Spodnja LNB-frek.",
"Freq LO LNB",
"Laagste LNB frequentie",
"Freq LO LNB",
"Fréquence basse LNB",
"LO-frekvens i lavbåndet",
"LO LNB taajuus",
},
{ "Setup.LNB$High LNB frequency",
"Obere LNB-Frequenz",
"Zgornja LNB-frek.",
"Freq HI LNB",
"Hoogste LNB frequentie",
"Freq HI LNB",
"Fréquence haute LNB",
"LO-frekvens i høybåndet",
"HI LNB taajuus",
},
{ "Setup.LNB$Use DiSEqC",
"DiSEqC benutzen",
"DiSEqC", // TODO
"DiSEqC", // TODO
"DiSEqC", // TODO
"DiSEqC", // TODO
"DiSEqC", // TODO
"DiSEqC", // TODO
"DiSEqC", // TODO
},
{ "Setup.CICAM$CICAM DVB",
"CICAM DVB",
"CICAM DVB",
"CICAM DVB",
"CICAM DVB",
"CICAM DVB",
"CICAM DVB",
"CICAM DVB",
"CICAM DVB",
},
{ "Setup.Recording$Margin at start",
"Zeitpuffer bei Anfang",
"Premor pred zacetkom",
"Min margine inizio",
"Tijd marge (begin)",
"Margem de inicio",
"Marge antérieure",
"Opptaks margin (start)",
"Aloitusmarginaali",
},
{ "Setup.Recording$Margin at stop",
"Zeitpuffer bei Ende",
"Premor za koncem",
"Min margine fine",
"Tijd marge (eind)",
"Margem de fim",
"Marge postérieure",
"Opptaks margin (slutt)",
"Lopetusmarginaali",
},
{ "Setup.Recording$Primary limit",
"Primär-Limit",
"", // TODO
"", // TODO
"", // TODO
"Limite Primario",
"Première limite",
"Prioritets grense HovedDVB",
"PrimaryLimit",
},
{ "Setup.Recording$Default priority",
"Default Priorität",
"", // TODO
"", // TODO
"", // TODO
"Prioridade por defeito",
"Priorité par défaut",
"Normal prioritet (Timer)",
"Oletusprioriteetti",
},
{ "Setup.Recording$Default lifetime",
"Default Lebensdauer",
"", // TODO
"", // TODO
"", // TODO
"Validade por defeito",
"Durée de vie par défaut",
"Normal levetid (Timer)",
"Oletus voimassaoloaika",
},
{ "Setup.Recording$Use episode name",
"Episodenname verwenden",
"", // TODO
"", // TODO
"", // TODO
"", // TODO
"Utiliser les sous-titres", // TODO (episode name!)
"", // TODO
"Tekstitys käytössä", // TODO (episode name!)
},
{ "Setup.Recording$Mark instant recording",
"Direktaufzeichnung markieren",
"Oznaci direktno snemanje",
"Marca la registrazione",
"Direkte opnamen markeren",
"Marca de gravacao",
"Enregistrement immédiat",
"Markere direkteopptak",
"Merkitse välitön nauh.",
},
{ "Setup.Recording$Name instant recording",
"Direktaufzeichnung benennen",
"", // TODO
"", // TODO
"", // TODO
"", // TODO
"Noms enregistr. immédiats",
"", // TODO
"Nimeä välitön nauh.",
},
{ "Setup.Recording$Record Dolby Digital",
"Dolby Digital Ton aufzeichnen",
"", // TODO
"", // TODO
"", // TODO
@ -1076,47 +1255,7 @@ const tPhrase Phrases[] = {
"", // TODO
"", // TODO
},
{ "ChannelInfoPos",
"Kanal Info Position",
"", // TODO
"", // TODO
"", // TODO
"", // TODO
"Position infos chaînes",
"", // TODO
"Kanavainfon sijainti",
},
{ "OSDwidth",
"OSD Breite",
"", // TODO
"", // TODO
"", // TODO
"", // TODO
"Largeur affichage",
"", // TODO
"Tekstinäytön leveys",
},
{ "OSDheight",
"OSD Höhe",
"", // TODO
"", // TODO
"", // TODO
"", // TODO
"Hauteur affichage",
"", // TODO
"Tekstinäytön korkeus",
},
{ "OSDMessageTime",
"OSD Nachricht Dauer",
"", // TODO
"", // TODO
"", // TODO
"", // TODO
"Durée affichage écran",
"", // TODO
"Ilmoitusten näkymisaika",
},
{ "MaxVideoFileSize",
{ "Setup.Recording$Max. video file size",
"Max. Video Dateigröße",
"", // TODO
"", // TODO
@ -1126,8 +1265,8 @@ const tPhrase Phrases[] = {
"", // TODO
"Maksimi tiedoston koko",
},
{ "SplitEditedFiles",
"Editierte Dateien zerteilen",
{ "Setup.Recording$Split edited files",
"Editierte Dateien aufteilen",
"", // TODO
"", // TODO
"", // TODO
@ -1136,27 +1275,7 @@ const tPhrase Phrases[] = {
"", // TODO
"Paloittele muokatut",
},
{ "MinEventTimeout",
"Mindest Event Pause",
"", // TODO
"", // TODO
"", // TODO
"", // TODO
"MinEventTimeout", // Too difficult to translate - read the manual!
"", // TODO
"Minimi tapahtuman odotus",
},
{ "MinUserInactivity",
"Mindest User Inaktivität",
"", // TODO
"", // TODO
"", // TODO
"", // TODO
"Durée minimale d'inactivité",
"", // TODO
"Minimi käyttäjän odotus",
},
{ "MultiSpeedMode",
{ "Setup.Replay$Multi speed mode",
"MultiSpeed Modus",
"", // TODO
"", // TODO
@ -1166,8 +1285,8 @@ const tPhrase Phrases[] = {
"", // TODO
"Moninopeustila",
},
{ "ShowReplayMode",
"Wiedergabe Status",
{ "Setup.Replay$Show replay mode",
"Wiedergabestatus anzeigen",
"", // TODO
"", // TODO
"", // TODO
@ -1176,6 +1295,36 @@ const tPhrase Phrases[] = {
"", // TODO
"Näytä toiston tila",
},
{ "Setup.Miscellaneous$Min. event timeout",
"Mindest Event Pause",
"", // TODO
"", // TODO
"", // TODO
"", // TODO
"MinEventTimeout", // Too difficult to translate - read the manual!
"", // TODO
"Minimi tapahtuman odotus",
},
{ "Setup.Miscellaneous$Min. user inactivity",
"Mindest Benutzer-Inaktivität",
"", // TODO
"", // TODO
"", // TODO
"", // TODO
"Durée minimale d'inactivité",
"", // TODO
"Minimi käyttäjän odotus",
},
{ "Setup.Miscellaneous$SVDRP timeout",
"SVDRP Timeout",
"", // TODO
"Timeout SVDRP",
"SVDRP Timeout",
"Timeout SVDRP",
"Temps maxi SVDRP",
"Ubrukt SVDRP-levetid",
"SVDRP odotusaika",
},
// The days of the week:
{ "MTWTFSS",
"MDMDFSS",
@ -1540,6 +1689,16 @@ const tPhrase Phrases[] = {
"", // TODO
"Hyppää:",
},
{ "Volume ", // note the trailing blank
"Lautstärke ",
"", // TODO
"", // TODO
"", // TODO
"", // TODO
"Volume ",
"", // TODO
"Äänenvoimakkuus ",
},
{ " Stop replaying", // note the leading blank!
" Wiedergabe beenden",
" Prekini ponavljanje",
@ -1645,7 +1804,8 @@ const char *tr(const char *s)
}
esyslog(LOG_ERR, "no translation found for '%s' in language %d (%s)\n", s, Setup.OSDLanguage, Phrases[0][Setup.OSDLanguage]);
}
return s;
const char *p = strchr(s, '$');
return p ? p + 1 : s;
}
const char * const * Languages(void)

532
menu.c
View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
* $Id: menu.c 1.160 2002/03/03 16:12:29 kls Exp $
* $Id: menu.c 1.172 2002/03/17 14:23:44 kls Exp $
*/
#include "menu.h"
@ -168,6 +168,47 @@ void cMenuEditChanItem::Set(void)
SetValue(buf);
}
// --- cMenuEditTranItem -----------------------------------------------------
class cMenuEditTranItem : public cMenuEditChanItem {
private:
int number;
int transponder;
public:
cMenuEditTranItem(const char *Name, int *Value);
virtual eOSState ProcessKey(eKeys Key);
};
cMenuEditTranItem::cMenuEditTranItem(const char *Name, int *Value)
:cMenuEditChanItem(Name, Value)
{
number = 0;
transponder = *Value;
cChannel *channel = Channels.First();
while (channel) {
if (!channel->groupSep && ISTRANSPONDER(channel->frequency, *Value)) {
number = channel->number;
break;
}
channel = (cChannel *)channel->Next();
}
*Value = number;
Set();
*Value = transponder;
}
eOSState cMenuEditTranItem::ProcessKey(eKeys Key)
{
*value = number;
eOSState state = cMenuEditChanItem::ProcessKey(Key);
number = *value;
cChannel *channel = Channels.GetByNumber(*value);
if (channel)
transponder = channel->frequency;
*value = transponder;
return state;
}
// --- cMenuEditDayItem ------------------------------------------------------
class cMenuEditDayItem : public cMenuEditIntItem {
@ -892,8 +933,8 @@ public:
virtual void Display(int Offset = -1, eDvbColor FgColor = clrWhite, eDvbColor BgColor = clrBackground);
bool CanScrollUp(void) { return offset > 0; }
bool CanScrollDown(void) { return h + offset < lines; }
void ScrollUp(void);
void ScrollDown(void);
void ScrollUp(bool Page);
void ScrollDown(bool Page);
virtual eOSState ProcessKey(eKeys Key);
};
@ -952,20 +993,20 @@ void cMenuTextItem::Display(int Offset, eDvbColor FgColor, eDvbColor BgColor)
if (CanScrollDown()) Interface->Write(x + w - 1, y + h - 1, "v", bgColor, fgColor);
}
void cMenuTextItem::ScrollUp(void)
void cMenuTextItem::ScrollUp(bool Page)
{
if (CanScrollUp()) {
Clear();
offset--;
offset = max(offset - (Page ? h : 1), 0);
Display();
}
}
void cMenuTextItem::ScrollDown(void)
void cMenuTextItem::ScrollDown(bool Page)
{
if (CanScrollDown()) {
Clear();
offset++;
offset = min(offset + (Page ? h : 1), lines - h);
Display();
}
}
@ -973,10 +1014,14 @@ void cMenuTextItem::ScrollDown(void)
eOSState cMenuTextItem::ProcessKey(eKeys Key)
{
switch (Key) {
case kLeft|k_Repeat:
case kLeft:
case kUp|k_Repeat:
case kUp: ScrollUp(); break;
case kUp: ScrollUp(NORMALKEY(Key) == kLeft); break;
case kRight|k_Repeat:
case kRight:
case kDown|k_Repeat:
case kDown: ScrollDown(); break;
case kDown: ScrollDown(NORMALKEY(Key) == kRight); break;
default: return osUnknown;
}
return osContinue;
@ -1394,7 +1439,7 @@ cMenuWhatsOn::cMenuWhatsOn(const cSchedules *Schedules, bool Now, int CurrentCha
currentChannel = CurrentChannelNr;
delete pArray;
SetHelp(tr("Record"), Now ? tr("Next") : tr("Now"), tr("Schedule"), tr("Switch"));
SetHelp(tr("Record"), Now ? tr("Next") : tr("Now"), tr("Button$Schedule"), tr("Switch"));
}
const cEventInfo *cMenuWhatsOn::ScheduleEventInfo(void)
@ -1876,84 +1921,45 @@ eOSState cMenuRecordings::ProcessKey(eKeys Key)
return state;
}
// --- cMenuSetup ------------------------------------------------------------
// --- cMenuSetupPage --------------------------------------------------------
class cMenuSetup : public cOsdMenu {
private:
class cMenuSetupPage : public cOsdMenu {
protected:
cSetup data;
int osdLanguage;
void Set(void);
void SetupTitle(const char *s);
virtual void Set(void) = 0;
public:
cMenuSetup(void);
cMenuSetupPage(void);
virtual eOSState ProcessKey(eKeys Key);
};
cMenuSetup::cMenuSetup(void)
:cOsdMenu("", 25)
cMenuSetupPage::cMenuSetupPage(void)
:cOsdMenu("", 30)
{
data = Setup;
osdLanguage = Setup.OSDLanguage;
Set();
}
void cMenuSetup::Set(void)
void cMenuSetupPage::SetupTitle(const char *s)
{
Clear();
SetTitle(tr("Setup"));
Add(new cMenuEditStraItem(tr("OSD-Language"), &data.OSDLanguage, NumLanguages, Languages()));
Add(new cMenuEditIntItem( tr("PrimaryDVB"), &data.PrimaryDVB, 1, cDvbApi::NumDvbApis));
Add(new cMenuEditBoolItem(tr("ShowInfoOnChSwitch"), &data.ShowInfoOnChSwitch));
Add(new cMenuEditBoolItem(tr("MenuScrollPage"), &data.MenuScrollPage));
Add(new cMenuEditBoolItem(tr("MarkInstantRecord"), &data.MarkInstantRecord));
Add(new cMenuEditStrItem( tr("NameInstantRecord"), data.NameInstantRecord, sizeof(data.NameInstantRecord), FileNameChars));
Add(new cMenuEditIntItem( tr("LnbSLOF"), &data.LnbSLOF));
Add(new cMenuEditIntItem( tr("LnbFrequLo"), &data.LnbFrequLo));
Add(new cMenuEditIntItem( tr("LnbFrequHi"), &data.LnbFrequHi));
Add(new cMenuEditBoolItem(tr("DiSEqC"), &data.DiSEqC));
Add(new cMenuEditBoolItem(tr("SetSystemTime"), &data.SetSystemTime));
Add(new cMenuEditIntItem( tr("MarginStart"), &data.MarginStart));
Add(new cMenuEditIntItem( tr("MarginStop"), &data.MarginStop));
Add(new cMenuEditIntItem( tr("EPGScanTimeout"), &data.EPGScanTimeout));
Add(new cMenuEditIntItem( tr("EPGBugfixLevel"), &data.EPGBugfixLevel, 0, MAXEPGBUGFIXLEVEL));
Add(new cMenuEditIntItem( tr("SVDRPTimeout"), &data.SVDRPTimeout));
Add(new cMenuEditBoolItem(tr("SortTimers"), &data.SortTimers));
Add(new cMenuEditIntItem( tr("PrimaryLimit"), &data.PrimaryLimit, 0, MAXPRIORITY));
Add(new cMenuEditIntItem( tr("DefaultPriority"), &data.DefaultPriority, 0, MAXPRIORITY));
Add(new cMenuEditIntItem( tr("DefaultLifetime"), &data.DefaultLifetime, 0, MAXLIFETIME));
Add(new cMenuEditBoolItem(tr("UseSubtitle"), &data.UseSubtitle));
Add(new cMenuEditBoolItem(tr("RecordingDirs"), &data.RecordingDirs));
Add(new cMenuEditBoolItem(tr("VideoFormat"), &data.VideoFormat, "4:3", "16:9"));
Add(new cMenuEditBoolItem(tr("RecordDolbyDigital"), &data.RecordDolbyDigital));
Add(new cMenuEditBoolItem(tr("ChannelInfoPos"), &data.ChannelInfoPos, tr("bottom"), tr("top")));
Add(new cMenuEditIntItem( tr("OSDwidth"), &data.OSDwidth, MINOSDWIDTH, MAXOSDWIDTH));
Add(new cMenuEditIntItem( tr("OSDheight"), &data.OSDheight, MINOSDHEIGHT, MAXOSDHEIGHT));
Add(new cMenuEditIntItem( tr("OSDMessageTime"), &data.OSDMessageTime, 1, 60));
Add(new cMenuEditIntItem( tr("MaxVideoFileSize"), &data.MaxVideoFileSize, MINVIDEOFILESIZE, MAXVIDEOFILESIZE));
Add(new cMenuEditBoolItem(tr("SplitEditedFiles"), &data.SplitEditedFiles));
Add(new cMenuEditIntItem( tr("MinEventTimeout"), &data.MinEventTimeout));
Add(new cMenuEditIntItem( tr("MinUserInactivity"), &data.MinUserInactivity));
Add(new cMenuEditBoolItem(tr("MultiSpeedMode"), &data.MultiSpeedMode));
Add(new cMenuEditBoolItem(tr("ShowReplayMode"), &data.ShowReplayMode));
for (int d = 0; d < cDvbApi::NumDvbApis; d++) {
for (int i = 0; i < 2; i++) {
char buffer[32];
snprintf(buffer, sizeof(buffer), "%s%d %d", tr("CICAM DVB"), d + 1, i + 1);
Add(new cMenuEditCaItem(buffer, &data.CaCaps[d][i]));
}
}
char buf[40]; // can't call tr() for more than one string at a time!
char *q = buf + snprintf(buf, sizeof(buf), "%s - ", tr("Setup"));
snprintf(q, sizeof(buf) - strlen(buf), "%s", tr(s));
SetTitle(buf);
}
eOSState cMenuSetup::ProcessKey(eKeys Key)
eOSState cMenuSetupPage::ProcessKey(eKeys Key)
{
eOSState state = cOsdMenu::ProcessKey(Key);
if (state == osUnknown) {
switch (Key) {
case kOk: state = (Setup.PrimaryDVB != data.PrimaryDVB) ? osSwitchDvb : osEnd;
cDvbApi::PrimaryDvbApi->SetUseTSTime(data.SetSystemTime);
case kOk: state = (Setup.PrimaryDVB != data.PrimaryDVB) ? osSwitchDvb : osBack;
cDvbApi::PrimaryDvbApi->SetVideoFormat(data.VideoFormat ? VIDEO_FORMAT_16_9 : VIDEO_FORMAT_4_3);
Setup = data;
Setup.Save();
cDvbApi::SetCaCaps();
break;
default: break;
}
@ -1969,6 +1975,235 @@ eOSState cMenuSetup::ProcessKey(eKeys Key)
return state;
}
// --- cMenuSetupOSD ---------------------------------------------------------
class cMenuSetupOSD : public cMenuSetupPage {
private:
virtual void Set(void);
public:
cMenuSetupOSD(void) { Set(); }
};
void cMenuSetupOSD::Set(void)
{
Clear();
SetupTitle("OSD");
Add(new cMenuEditStraItem(tr("Setup.OSD$Language"), &data.OSDLanguage, NumLanguages, Languages()));
Add(new cMenuEditIntItem( tr("Setup.OSD$Width"), &data.OSDwidth, MINOSDWIDTH, MAXOSDWIDTH));
Add(new cMenuEditIntItem( tr("Setup.OSD$Height"), &data.OSDheight, MINOSDHEIGHT, MAXOSDHEIGHT));
Add(new cMenuEditIntItem( tr("Setup.OSD$Message time"), &data.OSDMessageTime, 1, 60));
Add(new cMenuEditBoolItem(tr("Setup.OSD$Channel info position"), &data.ChannelInfoPos, tr("bottom"), tr("top")));
Add(new cMenuEditBoolItem(tr("Setup.OSD$Info on channel switch"), &data.ShowInfoOnChSwitch));
Add(new cMenuEditBoolItem(tr("Setup.OSD$Scroll pages"), &data.MenuScrollPage));
Add(new cMenuEditBoolItem(tr("Setup.OSD$Sort timers"), &data.SortTimers));
Add(new cMenuEditBoolItem(tr("Setup.OSD$Recording directories"), &data.RecordingDirs));
}
// --- cMenuSetupEPG ---------------------------------------------------------
class cMenuSetupEPG : public cMenuSetupPage {
private:
virtual void Set(void);
public:
cMenuSetupEPG(void) { Set(); }
};
void cMenuSetupEPG::Set(void)
{
Clear();
SetupTitle("EPG");
Add(new cMenuEditIntItem( tr("Setup.EPG$EPG scan timeout"), &data.EPGScanTimeout));
Add(new cMenuEditIntItem( tr("Setup.EPG$EPG bugfix level"), &data.EPGBugfixLevel, 0, MAXEPGBUGFIXLEVEL));
Add(new cMenuEditBoolItem(tr("Setup.EPG$Set system time"), &data.SetSystemTime));
Add(new cMenuEditTranItem(tr("Setup.EPG$Use time from transponder"), &data.TimeTransponder));
}
// --- cMenuSetupDVB ---------------------------------------------------------
class cMenuSetupDVB : public cMenuSetupPage {
private:
virtual void Set(void);
public:
cMenuSetupDVB(void) { Set(); }
};
void cMenuSetupDVB::Set(void)
{
Clear();
SetupTitle("DVB");
Add(new cMenuEditIntItem( tr("Setup.DVB$Primary DVB interface"), &data.PrimaryDVB, 1, cDvbApi::NumDvbApis));
Add(new cMenuEditBoolItem(tr("Setup.DVB$Video format"), &data.VideoFormat, "4:3", "16:9"));
}
// --- cMenuSetupLNB ---------------------------------------------------------
class cMenuSetupLNB : public cMenuSetupPage {
private:
virtual void Set(void);
public:
cMenuSetupLNB(void) { Set(); }
};
void cMenuSetupLNB::Set(void)
{
Clear();
SetupTitle("LNB");
Add(new cMenuEditIntItem( tr("Setup.LNB$SLOF"), &data.LnbSLOF));
Add(new cMenuEditIntItem( tr("Setup.LNB$Low LNB frequency"), &data.LnbFrequLo));
Add(new cMenuEditIntItem( tr("Setup.LNB$High LNB frequency"), &data.LnbFrequHi));
Add(new cMenuEditBoolItem(tr("Setup.LNB$Use DiSEqC"), &data.DiSEqC));
}
// --- cMenuSetupCICAM -------------------------------------------------------
class cMenuSetupCICAM : public cMenuSetupPage {
private:
virtual void Set(void);
public:
cMenuSetupCICAM(void) { Set(); }
};
void cMenuSetupCICAM::Set(void)
{
Clear();
SetupTitle("CICAM");
for (int d = 0; d < cDvbApi::NumDvbApis; d++) {
for (int i = 0; i < 2; i++) {
char buffer[32];
snprintf(buffer, sizeof(buffer), "%s%d %d", tr("Setup.CICAM$CICAM DVB"), d + 1, i + 1);
Add(new cMenuEditCaItem(buffer, &data.CaCaps[d][i]));
}
}
}
// --- cMenuSetupRecord ------------------------------------------------------
class cMenuSetupRecord : public cMenuSetupPage {
private:
virtual void Set(void);
public:
cMenuSetupRecord(void) { Set(); }
};
void cMenuSetupRecord::Set(void)
{
Clear();
SetupTitle("Recording");
Add(new cMenuEditIntItem( tr("Setup.Recording$Margin at start"), &data.MarginStart));
Add(new cMenuEditIntItem( tr("Setup.Recording$Margin at stop"), &data.MarginStop));
Add(new cMenuEditIntItem( tr("Setup.Recording$Primary limit"), &data.PrimaryLimit, 0, MAXPRIORITY));
Add(new cMenuEditIntItem( tr("Setup.Recording$Default priority"), &data.DefaultPriority, 0, MAXPRIORITY));
Add(new cMenuEditIntItem( tr("Setup.Recording$Default lifetime"), &data.DefaultLifetime, 0, MAXLIFETIME));
Add(new cMenuEditBoolItem(tr("Setup.Recording$Use episode name"), &data.UseSubtitle));
Add(new cMenuEditBoolItem(tr("Setup.Recording$Mark instant recording"), &data.MarkInstantRecord));
Add(new cMenuEditStrItem( tr("Setup.Recording$Name instant recording"), data.NameInstantRecord, sizeof(data.NameInstantRecord), FileNameChars));
Add(new cMenuEditBoolItem(tr("Setup.Recording$Record Dolby Digital"), &data.RecordDolbyDigital));
Add(new cMenuEditIntItem( tr("Setup.Recording$Max. video file size"), &data.MaxVideoFileSize, MINVIDEOFILESIZE, MAXVIDEOFILESIZE));
Add(new cMenuEditBoolItem(tr("Setup.Recording$Split edited files"), &data.SplitEditedFiles));
}
// --- cMenuSetupReplay ------------------------------------------------------
class cMenuSetupReplay : public cMenuSetupPage {
private:
virtual void Set(void);
public:
cMenuSetupReplay(void) { Set(); }
};
void cMenuSetupReplay::Set(void)
{
Clear();
SetupTitle("Replay");
Add(new cMenuEditBoolItem(tr("Setup.Replay$Multi speed mode"), &data.MultiSpeedMode));
Add(new cMenuEditBoolItem(tr("Setup.Replay$Show replay mode"), &data.ShowReplayMode));
}
// --- cMenuSetupMisc --------------------------------------------------------
class cMenuSetupMisc : public cMenuSetupPage {
private:
virtual void Set(void);
public:
cMenuSetupMisc(void) { Set(); }
};
void cMenuSetupMisc::Set(void)
{
Clear();
SetupTitle("Miscellaneous");
Add(new cMenuEditIntItem( tr("Setup.Miscellaneous$Min. event timeout"), &data.MinEventTimeout));
Add(new cMenuEditIntItem( tr("Setup.Miscellaneous$Min. user inactivity"), &data.MinUserInactivity));
Add(new cMenuEditIntItem( tr("Setup.Miscellaneous$SVDRP timeout"), &data.SVDRPTimeout));
}
// --- cMenuSetup ------------------------------------------------------------
class cMenuSetup : public cOsdMenu {
private:
virtual void Set(void);
eOSState Restart(void);
public:
cMenuSetup(void);
virtual eOSState ProcessKey(eKeys Key);
};
cMenuSetup::cMenuSetup(void)
:cOsdMenu("")
{
Set();
}
void cMenuSetup::Set(void)
{
Clear();
SetTitle(tr("Setup"));
SetHasHotkeys();
Add(new cOsdItem(hk(tr("OSD")), osUser1));
Add(new cOsdItem(hk(tr("EPG")), osUser2));
Add(new cOsdItem(hk(tr("DVB")), osUser3));
Add(new cOsdItem(hk(tr("LNB")), osUser4));
Add(new cOsdItem(hk(tr("CICAM")), osUser5));
Add(new cOsdItem(hk(tr("Recording")), osUser6));
Add(new cOsdItem(hk(tr("Replay")), osUser7));
Add(new cOsdItem(hk(tr("Miscellaneous")), osUser8));
Add(new cOsdItem(hk(tr("Restart")), osUser9));
}
eOSState cMenuSetup::Restart(void)
{
if (Interface->Confirm(cRecordControls::Active() ? tr("Recording - restart anyway?") : tr("Really restart?"))) {
cThread::EmergencyExit(true);
return osEnd;
}
return osContinue;
}
eOSState cMenuSetup::ProcessKey(eKeys Key)
{
int osdLanguage = Setup.OSDLanguage;
eOSState state = cOsdMenu::ProcessKey(Key);
switch (state) {
case osUser1: return AddSubMenu(new cMenuSetupOSD);
case osUser2: return AddSubMenu(new cMenuSetupEPG);
case osUser3: return AddSubMenu(new cMenuSetupDVB);
case osUser4: return AddSubMenu(new cMenuSetupLNB);
case osUser5: return AddSubMenu(new cMenuSetupCICAM);
case osUser6: return AddSubMenu(new cMenuSetupRecord);
case osUser7: return AddSubMenu(new cMenuSetupReplay);
case osUser8: return AddSubMenu(new cMenuSetupMisc);
case osUser9: return Restart();
default: ;
}
if (Setup.OSDLanguage != osdLanguage) {
Set();
if (!HasSubMenu())
Display();
}
return state;
}
// --- cMenuCommands ---------------------------------------------------------
class cMenuCommands : public cOsdMenu {
@ -1982,14 +2217,14 @@ public:
cMenuCommands::cMenuCommands(void)
:cOsdMenu(tr("Commands"))
{
SetHasHotkeys();
int i = 0;
cCommand *command;
while ((command = Commands.Get(i)) != NULL) {
Add(new cOsdItem(command->Title()));
Add(new cOsdItem(hk(command->Title())));
i++;
}
SetHasHotkeys();
}
eOSState cMenuCommands::Execute(void)
@ -2022,9 +2257,24 @@ eOSState cMenuCommands::ProcessKey(eKeys Key)
#define ON_PRIMARY_INTERFACE tr("on primary interface")
cMenuMain::cMenuMain(bool Replaying, eOSState State)
:cOsdMenu(tr("Main"))
:cOsdMenu("")
{
digit = 0;
replaying = Replaying;
Set();
// Initial submenus:
switch (State) {
case osRecordings: AddSubMenu(new cMenuRecordings(NULL, 0, true)); break;
default: break;
}
}
void cMenuMain::Set(void)
{
Clear();
//SetTitle("VDR"); // this is done below, including disk usage
SetHasHotkeys();
// Title with disk usage:
@ -2036,7 +2286,7 @@ cMenuMain::cMenuMain(bool Replaying, eOSState State)
int Minutes = int(double(FreeMB) / MB_PER_MINUTE);
int Hours = Minutes / 60;
Minutes %= 60;
snprintf(buffer, sizeof(buffer), "%s - Disk %d%% - %2d:%02d %s", tr("Main"), Percent, Hours, Minutes, tr("free"));
snprintf(buffer, sizeof(buffer), "%s - Disk %d%% - %2d:%02d %s", tr("VDR"), Percent, Hours, Minutes, tr("free"));
SetTitle(buffer);
// Basic menu items:
@ -2051,7 +2301,7 @@ cMenuMain::cMenuMain(bool Replaying, eOSState State)
// Replay control:
if (Replaying)
if (replaying)
Add(new cOsdItem(tr(" Stop replaying"), osStopReplay));
// Record control:
@ -2077,32 +2327,14 @@ cMenuMain::cMenuMain(bool Replaying, eOSState State)
// Color buttons:
SetHelp(tr("Record"), cDvbApi::PrimaryDvbApi->CanToggleAudioTrack() ? tr("Language") : NULL, NULL, cReplayControl::LastReplayed() ? tr("Resume") : NULL);
SetHelp(tr("Record"), cDvbApi::PrimaryDvbApi->CanToggleAudioTrack() ? tr("Language") : NULL, NULL, replaying ? tr("Button$Stop") : cReplayControl::LastReplayed() ? tr("Resume") : NULL);
Display();
lastActivity = time(NULL);
SetHasHotkeys();
// Initial submenus:
switch (State) {
case osRecordings: AddSubMenu(new cMenuRecordings(NULL, 0, true)); break;
default: break;
}
}
const char *cMenuMain::hk(const char *s)
{
static char buffer[32];
if (digit < 9) {
snprintf(buffer, sizeof(buffer), " %d %s", ++digit, s);
return buffer;
}
else
return s;
}
eOSState cMenuMain::ProcessKey(eKeys Key)
{
int osdLanguage = Setup.OSDLanguage;
eOSState state = cOsdMenu::ProcessKey(Key);
switch (state) {
@ -2143,13 +2375,19 @@ eOSState cMenuMain::ProcessKey(eKeys Key)
}
break;
case kBlue: if (!HasSubMenu())
state = osReplay;
state = replaying ? osStopReplay : osReplay;
break;
default: break;
}
}
if (Key != kNone)
if (Key != kNone) {
lastActivity = time(NULL);
if (Setup.OSDLanguage != osdLanguage) {
Set();
if (!HasSubMenu())
Display();
}
}
else if (time(NULL) - lastActivity > MENUTIMEOUT)
state = osEnd;
return state;
@ -2345,6 +2583,109 @@ eOSState cDisplayChannel::ProcessKey(eKeys Key)
return osEnd;
}
// --- cVolumeBar ------------------------------------------------------------
class cVolumeBar : public cBitmap {
public:
cVolumeBar(int Width, int Height, int Current, int Total, const char *Prompt = NULL);
};
cVolumeBar::cVolumeBar(int Width, int Height, int Current, int Total, const char *Prompt)
:cBitmap(Width, Height, 2)
{
int l = Prompt ? cBitmap::Width(Prompt) : 0;
int p = (Width - l) * Current / Total;
Text(0, 0, Prompt, clrGreen);
Fill(l, 0, p, Height - 1, clrGreen);
Fill(l + p, 0, Width - 1, Height - 1, clrWhite);
}
// --- cDisplayVolume --------------------------------------------------------
#define VOLUMETIMEOUT 1000 //ms
#define MUTETIMEOUT 5000 //ms
cDisplayVolume *cDisplayVolume::displayVolume = NULL;
cDisplayVolume::cDisplayVolume(void)
:cOsdBase(true)
{
displayVolume = this;
timeout = time_ms() + (cDvbApi::PrimaryDvbApi->IsMute() ? MUTETIMEOUT : VOLUMETIMEOUT);
Interface->Open(Setup.OSDwidth, -1);
Show();
}
cDisplayVolume::~cDisplayVolume()
{
Interface->Close();
displayVolume = NULL;
}
void cDisplayVolume::Show(void)
{
cDvbApi *dvbApi = cDvbApi::PrimaryDvbApi;
if (dvbApi->IsMute()) {
Interface->Fill(0, 0, Width(), 1, clrTransparent);
Interface->Write(0, 0, tr("Mute"), clrGreen);
}
else {
int Current = cDvbApi::CurrentVolume();
int Total = MAXVOLUME;
const char *Prompt = tr("Volume ");
#ifdef DEBUG_OSD
int l = strlen(Prompt);
int p = int(double(Width() - l) * Current / Total + 0.5);
Interface->Write(0, 0, Prompt, clrGreen);
Interface->Fill(l, 0, p, 1, clrGreen);
Interface->Fill(l + p, 0, Width() - l - p, 1, clrWhite);
#else
cVolumeBar VolumeBar(Width() * dvbApi->CellWidth(), dvbApi->LineHeight(), Current, Total, Prompt);
Interface->SetBitmap(0, 0, VolumeBar);
#endif
}
}
cDisplayVolume *cDisplayVolume::Create(void)
{
if (!displayVolume)
new cDisplayVolume;
return displayVolume;
}
void cDisplayVolume::Process(eKeys Key)
{
if (displayVolume)
displayVolume->ProcessKey(Key);
}
eOSState cDisplayVolume::ProcessKey(eKeys Key)
{
switch (Key) {
case kVolUp|k_Repeat:
case kVolUp:
case kVolDn|k_Repeat:
case kVolDn:
Show();
timeout = time_ms() + VOLUMETIMEOUT;
break;
case kMute:
if (cDvbApi::PrimaryDvbApi->IsMute()) {
Show();
timeout = time_ms() + MUTETIMEOUT;
}
else
timeout = 0;
break;
case kNone: break;
default: if ((Key & k_Release) == 0) {
Interface->PutKey(Key);
return osEnd;
}
}
return time_ms() < timeout ? osContinue : osEnd;
}
// --- cRecordControl --------------------------------------------------------
cRecordControl::cRecordControl(cDvbApi *DvbApi, cTimer *Timer)
@ -2666,6 +3007,8 @@ void cReplayControl::DisplayAtBottom(const char *s)
if (s) {
int w = dvbApi->WidthInCells(s);
int d = max(Width() - w, 0) / 2;
if (modeOnly) //XXX remove when displaying replay mode differently
Interface->Fill(0, -1, Interface->Width(), 1, clrTransparent); //XXX remove when displaying replay mode differently
Interface->Write(d, -1, s);
Interface->Flush();
}
@ -2685,8 +3028,11 @@ void cReplayControl::ShowMode(void)
if (NormalPlay)
return; // no need to do indicate ">" unless there was a different mode displayed before
// open small display
/*XXX change when displaying replay mode differently
Interface->Open(9, -1);
Interface->Clear();
XXX*/
Interface->Open(0, -1); //XXX remove when displaying replay mode differently
visible = modeOnly = true;
}

19
menu.h
View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
* $Id: menu.h 1.37 2002/02/24 12:40:37 kls Exp $
* $Id: menu.h 1.40 2002/03/16 09:51:10 kls Exp $
*/
#ifndef _MENU_H
@ -17,8 +17,8 @@
class cMenuMain : public cOsdMenu {
private:
time_t lastActivity;
int digit;
const char *hk(const char *s);
bool replaying;
void Set(void);
public:
cMenuMain(bool Replaying, eOSState State = osUnknown);
virtual eOSState ProcessKey(eKeys Key);
@ -40,6 +40,19 @@ public:
virtual eOSState ProcessKey(eKeys Key);
};
class cDisplayVolume : public cOsdBase {
private:
int timeout;
static cDisplayVolume *displayVolume;
void Show(void);
cDisplayVolume(void);
public:
virtual ~cDisplayVolume();
static cDisplayVolume *Create(void);
static void Process(eKeys Key);
eOSState ProcessKey(eKeys Key);
};
class cMenuRecordingItem;
class cMenuRecordings : public cOsdMenu {

19
osd.c
View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
* $Id: osd.c 1.20 2002/01/26 11:09:58 kls Exp $
* $Id: osd.c 1.21 2002/03/10 16:18:06 kls Exp $
*/
#include "osd.h"
@ -102,6 +102,23 @@ cOsdMenu::~cOsdMenu()
Interface->Close();
}
const char *cOsdMenu::hk(const char *s)
{
static char buffer[32];
if (digit < 9) {
snprintf(buffer, sizeof(buffer), " %d %s", ++digit, s);
return buffer;
}
else
return s;
}
void cOsdMenu::SetHasHotkeys(void)
{
hasHotkeys = true;
digit = 0;
}
void cOsdMenu::SetStatus(const char *s)
{
delete status;

16
osd.h
View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
* $Id: osd.h 1.26 2002/02/24 12:55:16 kls Exp $
* $Id: osd.h 1.27 2002/03/10 16:18:11 kls Exp $
*/
#ifndef __OSD_H
@ -33,6 +33,16 @@ enum eOSState { osUnknown,
osSwitchDvb,
osBack,
osEnd,
os_User, // the following values can be used locally
osUser1,
osUser2,
osUser3,
osUser4,
osUser5,
osUser6,
osUser7,
osUser8,
osUser9,
};
class cOsdItem : public cListObject {
@ -77,9 +87,12 @@ private:
cOsdMenu *subMenu;
const char *helpRed, *helpGreen, *helpYellow, *helpBlue;
const char *status;
int digit;
bool hasHotkeys;
protected:
bool visible;
const char *hk(const char *s);
void SetHasHotkeys(void);
virtual void Clear(void);
bool SpecialItem(int idx);
void SetCurrent(cOsdItem *Item);
@ -100,7 +113,6 @@ protected:
public:
cOsdMenu(const char *Title, int c0 = 0, int c1 = 0, int c2 = 0, int c3 = 0, int c4 = 0);
virtual ~cOsdMenu();
void SetHasHotkeys(void) { hasHotkeys = true; }
int Current(void) { return current; }
void Add(cOsdItem *Item, bool Current = false);
void Display(void);

View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
* $Id: recording.c 1.54 2002/02/24 11:21:42 kls Exp $
* $Id: recording.c 1.57 2002/03/16 12:17:44 kls Exp $
*/
#include "recording.h"
@ -86,6 +86,7 @@ void AssertFreeDiskSpace(int Priority)
if (!LockFile.Lock())
return;
// Remove the oldest file that has been "deleted":
isyslog(LOG_INFO, "low disk space while recording, trying to remove a deleted recording...");
cRecordings Recordings;
if (Recordings.Load(true)) {
cRecording *r = Recordings.First();
@ -101,12 +102,13 @@ void AssertFreeDiskSpace(int Priority)
}
}
// No "deleted" files to remove, so let's see if we can delete a recording:
isyslog(LOG_INFO, "...no deleted recording found, trying to delete an old recording...");
if (Recordings.Load(false)) {
cRecording *r = Recordings.First();
cRecording *r0 = NULL;
while (r) {
if (r->lifetime < MAXLIFETIME) { // recordings with MAXLIFETIME live forever
if ((r->lifetime == 0 && Priority > r->priority) || // the recording has guaranteed lifetime and the new recording has higher priority
if ((r->lifetime == 0 && Priority > r->priority) || // the recording has no guaranteed lifetime and the new recording has higher priority
(time(NULL) - r->start) / SECSINDAY > r->lifetime) { // the recording's guaranteed lifetime has expired
if (r0) {
if (r->priority < r0->priority || (r->priority == r0->priority && r->start < r0->start))
@ -122,6 +124,7 @@ void AssertFreeDiskSpace(int Priority)
return;
}
// Unable to free disk space, but there's nothing we can do about that...
isyslog(LOG_INFO, "...no old recording found, giving up");
Interface->Confirm(tr("Low disk space!"), 30);
}
LastFreeDiskCheck = time(NULL);
@ -551,6 +554,11 @@ bool cRecording::Delete(void)
char *ext = strrchr(NewName, '.');
if (strcmp(ext, RECEXT) == 0) {
strncpy(ext, DELEXT, strlen(ext));
if (access(NewName, F_OK) == 0) {
// the new name already exists, so let's remove that one first:
isyslog(LOG_INFO, "removing recording %s", NewName);
RemoveVideoFile(NewName);
}
isyslog(LOG_INFO, "deleting recording %s", FileName());
result = RenameVideoFile(FileName(), NewName);
}

6
runvdr
View File

@ -18,14 +18,14 @@
# See the main source file 'vdr.c' for copyright information and
# how to reach the author.
#
# $Id: runvdr 1.8 2001/07/27 07:35:19 kls Exp $
# $Id: runvdr 1.9 2002/03/16 16:22:12 kls Exp $
DVBDIR="../DVB/driver"
VDRPRG="./vdr"
VDRCMD="$VDRPRG -w 60 $*"
LSMOD="`/sbin/lsmod | grep -w '^dvb' | wc -l`"
KILLPROC="/sbin/killproc -TERM"
KILL="/usr/bin/killall -q -TERM"
# Load driver if it hasn't been loaded already:
if [ $LSMOD -eq 0 ] ; then
@ -37,7 +37,7 @@ while (true) do
if test $? -eq 0; then exit; fi
date
echo "restarting VDR"
$KILLPROC $VDRPRG
$KILL $VDRPRG
sleep 10
(cd $DVBDIR; make rmmod; make insmod)
date

33
svdrp.c
View File

@ -10,7 +10,7 @@
* and interact with the Video Disk Recorder - or write a full featured
* graphical interface that sits on top of an SVDRP connection.
*
* $Id: svdrp.c 1.33 2002/02/24 14:16:03 kls Exp $
* $Id: svdrp.c 1.34 2002/03/08 17:17:05 kls Exp $
*/
#include "svdrp.h"
@ -247,6 +247,12 @@ const char *HelpPages[] = {
" Updates a timer. Settings must be in the same format as returned\n"
" by the LSTT command. If a timer with the same channel, day, start\n"
" and stop time does not yet exists, it will be created.",
"VOLU [ <number> | + | - | mute ]\n"
" Set the audio volume to the given number (which is limited to the range\n"
" 0...255). If the special options '+' or '-' are given, the volume will\n"
" be turned up or down, respectively. The option 'mute' will toggle the\n"
" audio muting. If no option is given, the current audio volume level will\n"
" be returned.",
"QUIT\n"
" Exit vdr (SVDRP).\n"
" You can also hit Ctrl-D to exit.",
@ -920,6 +926,28 @@ void cSVDRP::CmdUPDT(const char *Option)
Reply(501, "Missing timer settings");
}
void cSVDRP::CmdVOLU(const char *Option)
{
if (*Option) {
if (isnumber(Option))
cDvbApi::PrimaryDvbApi->SetVolume(strtol(Option, NULL, 10), true);
else if (strcmp(Option, "+") == 0)
cDvbApi::PrimaryDvbApi->SetVolume(VOLUMEDELTA);
else if (strcmp(Option, "-") == 0)
cDvbApi::PrimaryDvbApi->SetVolume(-VOLUMEDELTA);
else if (strcasecmp(Option, "MUTE") == 0)
cDvbApi::PrimaryDvbApi->ToggleMute();
else {
Reply(501, "Unknown option: \"%s\"", Option);
return;
}
}
if (cDvbApi::PrimaryDvbApi->IsMute())
Reply(250, "Audio is mute");
else
Reply(250, "Audio volume is %d", cDvbApi::CurrentVolume());
}
#define CMD(c) (strcasecmp(Cmd, c) == 0)
void cSVDRP::Execute(char *Cmd)
@ -960,8 +988,9 @@ void cSVDRP::Execute(char *Cmd)
else if (CMD("NEWC")) CmdNEWC(s);
else if (CMD("NEWT")) CmdNEWT(s);
else if (CMD("NEXT")) CmdNEXT(s);
else if (CMD("UPDT")) CmdUPDT(s);
else if (CMD("PUTE")) CmdPUTE(s);
else if (CMD("UPDT")) CmdUPDT(s);
else if (CMD("VOLU")) CmdVOLU(s);
else if (CMD("QUIT")) Close();
else Reply(500, "Command unrecognized: \"%s\"", Cmd);
}

View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
* $Id: svdrp.h 1.14 2002/02/24 10:48:21 kls Exp $
* $Id: svdrp.h 1.15 2002/03/08 16:40:23 kls Exp $
*/
#ifndef __SVDRP_H
@ -73,6 +73,7 @@ private:
void CmdNEXT(const char *Option);
void CmdPUTE(const char *Option);
void CmdUPDT(const char *Option);
void CmdVOLU(const char *Option);
void Execute(char *Cmd);
public:
cSVDRP(int Port);

View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
* $Id: thread.c 1.18 2002/02/23 13:49:06 kls Exp $
* $Id: thread.c 1.19 2002/03/09 12:05:44 kls Exp $
*/
#include "thread.h"
@ -327,14 +327,21 @@ int cPipe::Close(void)
f = NULL;
}
if (pid >= 0) {
if (pid > 0) {
int status = 0;
struct rusage ru;
int i = 5;
while (ret == -1 && i > 0) {
usleep(1000);
ret = wait4(pid, &status, WNOHANG, &ru);
while (i > 0) {
ret = waitpid(pid, &status, WNOHANG);
if (ret < 0) {
if (errno != EINTR && errno != ECHILD) {
LOG_ERROR;
break;
}
}
else if (ret == pid)
break;
i--;
usleep(100000);
}
if (!i) {

28
vdr.c
View File

@ -22,7 +22,7 @@
*
* The project's page is at http://www.cadsoft.de/people/kls/vdr
*
* $Id: vdr.c 1.98 2002/03/03 14:56:03 kls Exp $
* $Id: vdr.c 1.101 2002/03/09 17:10:16 kls Exp $
*/
#include <getopt.h>
@ -50,8 +50,6 @@
#define SHUTDOWNWAIT 300 // seconds to wait in user prompt before automatic shutdown
#define MANUALSTART 600 // seconds the next timer must be in the future to assume manual start
#define VOLUMEDELTA 5 // used to increase/decrease the volume
static int Interrupted = 0;
static void SignalHandler(int signum)
@ -85,6 +83,7 @@ int main(int argc, char *argv[])
int SVDRPport = DEFAULTSVDRPPORT;
const char *ConfigDirectory = NULL;
bool DaemonMode = false;
bool MuteAudio = false;
int WatchdogTimeout = DEFAULTWATCHDOG;
const char *Terminal = NULL;
const char *Shutdown = NULL;
@ -97,6 +96,7 @@ int main(int argc, char *argv[])
{ "epgfile", required_argument, NULL, 'E' },
{ "help", no_argument, NULL, 'h' },
{ "log", required_argument, NULL, 'l' },
{ "mute", no_argument, NULL, 'm' },
{ "port", required_argument, NULL, 'p' },
{ "record", required_argument, NULL, 'r' },
{ "shutdown", required_argument, NULL, 's' },
@ -108,7 +108,7 @@ int main(int argc, char *argv[])
int c;
int option_index = 0;
while ((c = getopt_long(argc, argv, "a:c:dD:E:hl:p:r:s:t:v:w:", long_options, &option_index)) != -1) {
while ((c = getopt_long(argc, argv, "a:c:dD:E:hl:mp:r:s:t:v:w:", long_options, &option_index)) != -1) {
switch (c) {
case 'a': cDvbApi::SetAudioCommand(optarg);
break;
@ -143,6 +143,7 @@ int main(int argc, char *argv[])
" -l LEVEL, --log=LEVEL set log level (default: 3)\n"
" 0 = no logging, 1 = errors only,\n"
" 2 = errors and info, 3 = errors, info and debug\n"
" -m, --mute mute audio of the primary DVB device at startup\n"
" -p PORT, --port=PORT use PORT for SVDRP (default: %d)\n"
" 0 turns off SVDRP\n"
" -r CMD, --record=CMD call CMD before and after a recording\n"
@ -170,6 +171,8 @@ int main(int argc, char *argv[])
fprintf(stderr, "vdr: invalid log level: %s\n", optarg);
return 2;
break;
case 'm': MuteAudio = true;
break;
case 'p': if (isnumber(optarg))
SVDRPport = atoi(optarg);
else {
@ -269,7 +272,10 @@ int main(int argc, char *argv[])
cSIProcessor::Read();
Channels.SwitchTo(Setup.CurrentChannel);
cDvbApi::PrimaryDvbApi->SetVolume(Setup.CurrentVolume, true);
if (MuteAudio)
cDvbApi::PrimaryDvbApi->ToggleMute();
else
cDvbApi::PrimaryDvbApi->SetVolume(Setup.CurrentVolume, true);
cEITScanner EITScanner;
@ -351,10 +357,16 @@ int main(int argc, char *argv[])
case kVolUp:
case kVolDn|k_Repeat:
case kVolDn:
cDvbApi::PrimaryDvbApi->SetVolume(NORMALKEY(key) == kVolDn ? -VOLUMEDELTA : VOLUMEDELTA);
break;
case kMute:
cDvbApi::PrimaryDvbApi->ToggleMute();
if (key == kMute) {
if (!cDvbApi::PrimaryDvbApi->ToggleMute() && !Menu)
break; // no need to display "mute off"
}
else
cDvbApi::PrimaryDvbApi->SetVolume(NORMALKEY(key) == kVolDn ? -VOLUMEDELTA : VOLUMEDELTA);
if (!Menu && (!ReplayControl || !ReplayControl->Visible()))
Menu = cDisplayVolume::Create();
cDisplayVolume::Process(key);
break;
// Power off:
case kPower: isyslog(LOG_INFO, "Power button pressed");