summaryrefslogtreecommitdiffstats
path: root/stream/dvb_tune.c
Commit message (Collapse)AuthorAgeFilesLines
* dvbin: do a big cleanup on code style and functionssfan52023-10-211-56/+50
|
* dvb_tune: remove use of time()sfan52023-10-211-4/+4
|
* dvbin: revise many log linessfan52023-10-211-38/+27
|
* stream/dvbin: add support for delivery system ISDB-TOliver Freyermuth2023-09-031-0/+2
| | | | | | This is similar to DVB-T, but requires slightly different treatment as there is no T/T2 differentiation. Use a new channels.conf.isdbt file as channels config file.
* various: drop unused #include "config.h"Thomas Weißschuh2023-02-201-1/+0
| | | | | | Most sources don't need config.h. The inclusion only leads to lots of unneeded recompilation if the configuration is changed.
* stream/dvb: remove some unused variablesDudemanguy2023-01-241-3/+0
| | | | Missed in b6b83805183618f3a46f2cc77d85dcff72ef6396.
* stream/dvb: drop support for DVB API before 5.8sfan52023-01-121-149/+11
| | | | | There is really no reason to keep the #ifdef mess around given that version is available since December 2012 (Linux 3.7).
* dvb: Add multiple frontends support: MAX_FRONTENDS now 8.rim2017-12-161-12/+13
|
* dvb: Fixes for ATSC tuning.Oliver Freyermuth2017-10-091-2/+3
| | | | | | | | | ATSC is a mix of terrestrial and cable, and depending on modulation is actually using DVBC_ANNEX_B. Thus, we need to override the delivery system depending on the modulation, channel by channel. Signed-off-by: Oliver Freyermuth <o.freyermuth@googlemail.com>
* dvb_tune: Pull out DVBv5 raw tuning part, add verbosity.Oliver Freyermuth2017-10-091-23/+24
| | | | | | | | Dump the complete raw tuning commands to allow for debugging on low level. Also, remove code duplication and some variable shadowing. Signed-off-by: Oliver Freyermuth <o.freyermuth@googlemail.com>
* dvb: Explicitly clear via DVBv5 before reverting to DVBv3.Oliver Freyermuth2017-10-091-2/+12
| | | | Signed-off-by: Oliver Freyermuth <o.freyermuth@googlemail.com>
* dvb: Use more elaborate tuning for DVBv5 tuning.Oliver Freyermuth2017-10-091-23/+111
| | | | | | | | | Also, in case tuning fails with timeout even though the ioctl was accepted by the device, fall back to DVBv3 tuning. This may go wrong for multi-delivery-system cards, so issue an error message in that case. Signed-off-by: Oliver Freyermuth <o.freyermuth@googlemail.com>
* dvb: add support for DVB-T2ivan-832017-03-061-251/+303
| | | | | | | | | | | | | | | | | | | | | | | | Probably does much more: + add support DVB-T2 * DVB params set to AUTO by default * MAX_CARDS: 4 -> 16 * DMX_SET_BUFFER_SIZE: 64kb -> 256kb + add DTV_CLEAR call before tune + add logic from https://github.com/olifre/mpv/commits/dvb-mixed-api-scan * rename type to delsys * single playlist per adapter * card -> adapter * fix channels order in playlist * update internal api * auto fallback to old DVB API on tune * fix DELSYS_SUPP_MASK value * remove tone - unused * add channel mem zeroize in config parser + add code from libdvbv5 for detect delivery systems * SYS_DVBC_ANNEX_AC replaced to SYS_DVBC_ANNEX_A + SYS_DVBC_ANNEX_C Signed-off-by: wm4 <wm4@nowhere>
* Revert "dvb: add support for DVB-T2"wm42017-02-141-301/+249
| | | | | | | | This reverts commit df91e492fd3365cf7db9c6ba4a721f8fcce0521c. Multiple issues such as weird code with undefined behavior (like (like conf_file*). The PR wasn't properly reviewed anyway (my error), so this commit should be reviewed and then merged again.
* dvb: add support for DVB-T2ivan-832017-02-131-249/+301
| | | | | | | | | | | | | | | | | | | | | | | | Probably does much more: + add support DVB-T2 * DVB params set to AUTO by default * MAX_CARDS: 4 -> 16 * DMX_SET_BUFFER_SIZE: 64kb -> 256kb + add DTV_CLEAR call before tune + add logic from https://github.com/olifre/mpv/commits/dvb-mixed-api-scan * rename type to delsys * single playlist per adapter * card -> adapter * fix channels order in playlist * update internal api * auto fallback to old DVB API on tune * fix DELSYS_SUPP_MASK value * remove tone - unused * add channel mem zeroize in config parser + add code from libdvbv5 for detect delivery systems * SYS_DVBC_ANNEX_AC replaced to SYS_DVBC_ANNEX_A + SYS_DVBC_ANNEX_C Signed-off-by: wm4 <wm4@nowhere>
* dvb: remove trailing whitespacewm42016-01-221-10/+10
|
* stream_dvb: add verbose output in non-DVBv5 querying.Oliver Freyermuth2016-01-211-1/+3
| | | | | May help in future debugging in case of old kernels with modern / obscure devices.
* stream_dvb: use DVBv5 API also for DVB-C tuning.Oliver Freyermuth2016-01-211-8/+39
| | | | | | | | | | | Using the new API is a necessity for multiple-delivery-system devices, since the old API does not offer a way to switch the delivery system of the card. This should in principle also be done for DVB-T / ATSC, especially since most DVB-T devices also support DVB-C, but I can not test such an implementation due to lack of hardware (currently) so it seems better to leave the existing, tested code-path in place for now.
* stream_dvb: improve messages on delivery-type detection.Oliver Freyermuth2016-01-211-10/+14
| | | | | | | | No need use use all capital letters, and don't warn if DVB-S2 is supported in addition since we handle that in DVB-S case already. Also, print the delivery system number for still unhandled delivery systems to simplify debugging.
* stream_dvb: don't requery tuner type, rely on initial query.Oliver Freyermuth2016-01-211-11/+9
| | | | | | | | | Saves one unnecessary additional ioctl per tuning by just reusing existing information. Should also fix the case of multiple supported delivery types since we now rely on the initial query from the chosen configuration after channel list parsing instead of requerying the device.
* stream_dvb: support frontends with multiple delivery systems.Oliver Freyermuth2016-01-211-10/+65
| | | | | | | | | Most common case would be DVB-C / DVB-T combination cards. Cards with multiple delivery systems are only supported starting from DVBv5 API (Kernel 2.6.38). In this case, we loop over all delivery systems and just treat them as different cards would be treated: They all get their own TUNER-type, channel-list parsing etc.
* dvb: rename dvb_config_t to dvb_state_t, keep config and state there.Oliver Freyermuth2016-01-141-24/+30
| | | | | | | | | The state-struct now contains everything which can be kept after initial initialization. This includes the channel-lists, configuration, device-fds and also information like current channel and current card. The dvb_priv_t is kept containing the mp-options, a pointer to the state and to the logger. After this restructuring, the state-struct contains all information which can be persisted across channel switching.
* dvb: cleanup dvb_params struct, remove some unneeded fdsOliver Freyermuth2016-01-071-4/+4
| | | | | | | One was just used as an alias, the other one (sec_fd) was not used at all. Signed-off-by: wm4 <wm4@nowhere>
* dvb_tune: fix invalid syntaxwm42015-02-111-1/+1
| | | | Oops.
* dvb: uncrustifywm42015-01-061-429/+410
| | | | Mostly automatic, some manual changes.
* stream_dvb: Also demux PMT if possible, reactivate TPID parsing.Oliver Freyermuth2015-01-061-0/+68
| | | | | | | | | | | | If VDR-channel-config is used, we know the service_id. Using that, PMT can be extracted from PAT (code for that inspired by szap-s2 again). For this, we need to demux PAT with a special filter-setup, and once PMT was found it can be added to the PID-list. PMT is only resolved the first time one tunes to a channel, then stored in the channel-list in memory. With PMT available, ffmpeg can safely decode the teletext-pids.
* dvb: Extend understanding of VDR channel config: stream_id, inversion.Oliver Freyermuth2015-01-061-5/+4
| | | | | | | Now also "stream ID" (for DVB-S2) and "inversion" are understood. The parameter-string can also provide information on FEC, rolloff etc. For DVB-S, "auto" which mpv uses by default should be fine, I can also confirm it works. For non-DVB-S cards, it might be useful to also parse this information in case of a vdr-channel list. As I have no such hardware and thus would have to do it blindly, I added a FIXME. Mostly complete vdr-channels.conf format documentation is at http://www.vdr-wiki.de/wiki/index.php/Channels.conf (german only).
* dvb: Extend dvb_channel struct, needs to know whether channel is S2.Oliver Freyermuth2015-01-061-10/+17
| | | | | | It contains now also a boolean which tells whether this is an DVB-S2 channel (not initialized yet - tbd in next commit). We could also pass through the type of the delivery system (would be more flexible), but the delivery-system-enum is only available with S2API, so this is more backwards-compatible. If someone has DVB-T2 / DVB-C2 hardware and extends the code to deal with it, this should be changed.
* dvb_tune: (DVB-S) Initial S2API support.Oliver Freyermuth2015-01-061-13/+79
| | | | | | | | | | | Also allows demuxers to buffer, and we explicitly discard stale QPSK events. Inspiration taken from the szap-s2 implementation. S2API is only used if available and for DVB-S cards - it might also be useful to have that for DVB-T2 / DVB-C2 tuning later, but I do not have the HW / no DVB-T2 broadcasting station nearby to test functionality. This should do no functional changes, only usage of the different API. The S2API is more extensible and a requirement for all the HD-deliveries (e.g. DVB-S2) and since 2.6.28 is the successor of the old API. Tuning to DVB-S2 channels actually already "works" like this if the delivery is hardcoded in - for a fully working implementation, the channels.conf.sat would need an additional field indicating the delivery type (VDR-type channels.conf have that). This commit also: - Cleans up some debug output. - Moves an unneeded usleep(100000) (only needed for diseqc switching for SAT) into the DVB-S-only part of the implementation.
* Audit and replace all ctype.h useswm42014-07-011-1/+0
| | | | | | | | | | | | | | | | Something like "char *s = ...; isdigit(s[0]);" triggers undefined behavior, because char can be signed, and thus s[0] can be a negative value. The is*() functions require unsigned char _or_ EOF. EOF is a special value outside of unsigned char range, thus the argument to the is*() functions can't be a char. This undefined behavior can actually trigger crashes if the implementation of these functions e.g. uses lookup tables, which are then indexed with out-of-range values. Replace all <ctype.h> uses with our own custom mp_is*() functions added with misc/ctype.h. As a bonus, these functions are locale-independent. (Although currently, we _require_ C locale for other reasons.)
* Kill all tabswm42014-04-131-184/+184
| | | | | | | | | | | I hate tabs. This replaces all tabs in all source files with spaces. The only exception is old-makefile. The replacement was made by running the GNU coreutils "expand" command on every file. Since the replacement was automatic, it's possible that some formatting was destroyed (but perhaps only if it was assuming that the end of a tab does not correspond to aligning the end to multiples of 8 spaces).
* stream: mp_msg conversionswm42013-12-211-56/+52
| | | | We also drop some slave mode stuff from stream_vcd.
* Split mpvcore/ into common/, misc/, bstr/wm42013-12-171-1/+1
|
* Use O_CLOEXEC when creating FDswm42013-11-301-4/+6
| | | | | | | | | | | | | | This is needed so that new processes (created with fork+exec) don't inherit open files, which can be important for a number of reasons. Since O_CLOEXEC is relatively new (POSIX.1-2008, before that Linux specific), we #define it to 0 in io.h to prevent compilation errors on older/crappy systems. At least this is the plan. input.c creates a pipe. For that, add a mp_set_cloexec() function (which is based on Weston's code in vo_wayland.c, but more correct). We could use pipe2() instead, but that is Linux specific. Technically, we have a race condition, but it won't matter.
* core: move contents to mpvcore (2/2)Stefano Pigozzi2013-08-061-1/+1
| | | | Followup commit. Fixes all the files references.
* Fix some cppcheck / scan-build warningswm42013-05-061-2/+2
| | | | | | | | These were found by the cppcheck and scan-build static analyzers. Most of these aren't interesting (the 2 previous commits fix some interesting cases found by these analyzers), and they don't nearly fix all warnings. (Most of the unfixed warnings are spam, things MPlayer never cared about, or false positives.)
* Rename directories, move files (step 2 of 2)wm42012-11-121-1/+1
| | | | | | | | | | | | Finish renaming directories and moving files. Adjust all include statements to make the previous commit compile. The two commits are separate, because git is bad at tracking renames and content changes at the same time. Also take this as an opportunity to remove the separation between "common" and "mplayer" sources in the Makefile. ("common" used to be shared between mplayer and mencoder.)
* cleanup: shut up more warningsClément Bœsch2011-05-061-1/+1
|
* Drop support for old-style DVB code.diego2010-03-021-290/+2
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30818 b3059339-0415-0410-9bf9-f77b7e298cf2
* Add header for exported DVB-related functions.diego2010-02-211-0/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30688 b3059339-0415-0410-9bf9-f77b7e298cf2
* cosmetics: Move functions around to avoid forward declarations and #ifdefs.diego2010-02-211-134/+119
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30687 b3059339-0415-0410-9bf9-f77b7e298cf2
* cosmetics: Remove some pointless parentheses from return calls.diego2009-10-081-4/+4
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29759 b3059339-0415-0410-9bf9-f77b7e298cf2
* whitespace cosmetics: Remove all trailing whitespace.diego2009-05-131-9/+9
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29305 b3059339-0415-0410-9bf9-f77b7e298cf2
* set to -1 fds that were closed; handle the sec_fd only if CONFIG_DVB_HEAD ↵nicodvb2008-11-051-3/+1
| | | | | | isn't defined; patch by Reimar git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27897 b3059339-0415-0410-9bf9-f77b7e298cf2
* Intialize unused fd variables to -1 (which is actually invalid) insteadreimar2008-11-041-1/+1
| | | | | | | of 0 (which is stdin and can cause weird side-effects). git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27893 b3059339-0415-0410-9bf9-f77b7e298cf2
* Conditionally declare a conditionally used variable, fixes the warning:diego2008-10-241-1/+4
| | | | | | | stream/dvb_tune.c:99: warning: unused variable 'sec_dev' git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27820 b3059339-0415-0410-9bf9-f77b7e298cf2
* Use '#include <poll.h>' instead of '#include <sys/poll.h>'.diego2008-08-141-1/+1
| | | | | | | It is the standard location as defined by the Open Group. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27463 b3059339-0415-0410-9bf9-f77b7e298cf2
* Change a bunch of video/audio-output-specific preprocessor directives fromdiego2008-08-031-19/+19
| | | | | | | a HAVE_ prefix to a CONFIG_ prefix. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27402 b3059339-0415-0410-9bf9-f77b7e298cf2
* in preparation for multi-frontend patch replaced file-static device names ↵nicodvb2008-04-131-17/+28
| | | | | | with sprintf() calls in 2 functions git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26433 b3059339-0415-0410-9bf9-f77b7e298cf2
* dvb_demuxdev etc. are only used in dvb_tune.c so make them staticreimar2008-01-131-6/+6
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25722 b3059339-0415-0410-9bf9-f77b7e298cf2
* Make several arrays constreimar2008-01-131-7/+7
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25721 b3059339-0415-0410-9bf9-f77b7e298cf2
* removed unused variables and parametersnicodvb2007-10-301-3/+2
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24903 b3059339-0415-0410-9bf9-f77b7e298cf2
* Comment out unused variable, fixes the warning:diego2007-10-301-1/+1
| | | | | | | dvb_tune.c:43: warning: 'dvb_secdev' defined but not used git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24889 b3059339-0415-0410-9bf9-f77b7e298cf2
* removed useless inclusion of error.hnicodvb2007-10-131-1/+0
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24767 b3059339-0415-0410-9bf9-f77b7e298cf2
* removed static declaration before non-instantiated struct; patch by cehoyos ↵nicodvb2007-01-091-1/+1
| | | | | | ag or at git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21859 b3059339-0415-0410-9bf9-f77b7e298cf2
* reindentednicodvb2007-01-061-16/+16
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21843 b3059339-0415-0410-9bf9-f77b7e298cf2
* init to 0 feparams before tuningnicodvb2007-01-061-0/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21842 b3059339-0415-0410-9bf9-f77b7e298cf2
* removed useless reporting codenicodvb2007-01-061-55/+3
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21834 b3059339-0415-0410-9bf9-f77b7e298cf2
* moved actual tuning code from check_status() to tune_it()nicodvb2007-01-061-18/+12
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21833 b3059339-0415-0410-9bf9-f77b7e298cf2
* reindentationnicodvb2006-12-301-13/+13
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21793 b3059339-0415-0410-9bf9-f77b7e298cf2
* introduce new 'stream' directory for all stream layer related components and ↵ben2006-07-311-0/+791
split them from libmpdemux git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19277 b3059339-0415-0410-9bf9-f77b7e298cf2