aboutsummaryrefslogtreecommitdiffhomepage
path: root/stream/dvb_tune.c
Commit message (Collapse)AuthorAge
* dvb: Add multiple frontends support: MAX_FRONTENDS now 8.Gravatar rim2017-12-16
|
* dvb: Fixes for ATSC tuning.Gravatar Oliver Freyermuth2017-10-09
| | | | | | | | | 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.Gravatar Oliver Freyermuth2017-10-09
| | | | | | | | 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.Gravatar Oliver Freyermuth2017-10-09
| | | | Signed-off-by: Oliver Freyermuth <o.freyermuth@googlemail.com>
* dvb: Use more elaborate tuning for DVBv5 tuning.Gravatar Oliver Freyermuth2017-10-09
| | | | | | | | | 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-T2Gravatar ivan-832017-03-06
| | | | | | | | | | | | | | | | | | | | | | | | 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"Gravatar wm42017-02-14
| | | | | | | | 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-T2Gravatar ivan-832017-02-13
| | | | | | | | | | | | | | | | | | | | | | | | 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 whitespaceGravatar wm42016-01-22
|
* stream_dvb: add verbose output in non-DVBv5 querying.Gravatar Oliver Freyermuth2016-01-21
| | | | | May help in future debugging in case of old kernels with modern / obscure devices.
* stream_dvb: use DVBv5 API also for DVB-C tuning.Gravatar Oliver Freyermuth2016-01-21
| | | | | | | | | | | 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.Gravatar Oliver Freyermuth2016-01-21
| | | | | | | | 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.Gravatar Oliver Freyermuth2016-01-21
| | | | | | | | | 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.Gravatar Oliver Freyermuth2016-01-21
| | | | | | | | | 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.Gravatar Oliver Freyermuth2016-01-14
| | | | | | | | | 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 fdsGravatar Oliver Freyermuth2016-01-07
| | | | | | | 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 syntaxGravatar wm42015-02-11
| | | | Oops.
* dvb: uncrustifyGravatar wm42015-01-06
| | | | Mostly automatic, some manual changes.
* stream_dvb: Also demux PMT if possible, reactivate TPID parsing.Gravatar Oliver Freyermuth2015-01-06
| | | | | | | | | | | | 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.Gravatar Oliver Freyermuth2015-01-06
| | | | | | | 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.Gravatar Oliver Freyermuth2015-01-06
| | | | | | 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.Gravatar Oliver Freyermuth2015-01-06
| | | | | | | | | | | 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 usesGravatar wm42014-07-01
| | | | | | | | | | | | | | | | 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 tabsGravatar wm42014-04-13
| | | | | | | | | | | 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 conversionsGravatar wm42013-12-21
| | | | We also drop some slave mode stuff from stream_vcd.
* Split mpvcore/ into common/, misc/, bstr/Gravatar wm42013-12-17
|
* Use O_CLOEXEC when creating FDsGravatar wm42013-11-30
| | | | | | | | | | | | | | 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)Gravatar Stefano Pigozzi2013-08-06
| | | | Followup commit. Fixes all the files references.
* Fix some cppcheck / scan-build warningsGravatar wm42013-05-06
| | | | | | | | 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)Gravatar wm42012-11-12
| | | | | | | | | | | | 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 warningsGravatar Clément Bœsch2011-05-06
|
* Drop support for old-style DVB code.Gravatar diego2010-03-02
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30818 b3059339-0415-0410-9bf9-f77b7e298cf2
* Add header for exported DVB-related functions.Gravatar diego2010-02-21
| | | | 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.Gravatar diego2010-02-21
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30687 b3059339-0415-0410-9bf9-f77b7e298cf2
* cosmetics: Remove some pointless parentheses from return calls.Gravatar diego2009-10-08
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29759 b3059339-0415-0410-9bf9-f77b7e298cf2
* whitespace cosmetics: Remove all trailing whitespace.Gravatar diego2009-05-13
| | | | 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 ↵Gravatar nicodvb2008-11-05
| | | | | | 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) insteadGravatar reimar2008-11-04
| | | | | | | 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:Gravatar diego2008-10-24
| | | | | | | 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>'.Gravatar diego2008-08-14
| | | | | | | 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 fromGravatar diego2008-08-03
| | | | | | | 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 ↵Gravatar nicodvb2008-04-13
| | | | | | 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 staticGravatar reimar2008-01-13
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25722 b3059339-0415-0410-9bf9-f77b7e298cf2
* Make several arrays constGravatar reimar2008-01-13
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25721 b3059339-0415-0410-9bf9-f77b7e298cf2
* removed unused variables and parametersGravatar nicodvb2007-10-30
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24903 b3059339-0415-0410-9bf9-f77b7e298cf2
* Comment out unused variable, fixes the warning:Gravatar diego2007-10-30
| | | | | | | 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.hGravatar nicodvb2007-10-13
| | | | 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 ↵Gravatar nicodvb2007-01-09
| | | | | | ag or at git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21859 b3059339-0415-0410-9bf9-f77b7e298cf2
* reindentedGravatar nicodvb2007-01-06
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21843 b3059339-0415-0410-9bf9-f77b7e298cf2
* init to 0 feparams before tuningGravatar nicodvb2007-01-06
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21842 b3059339-0415-0410-9bf9-f77b7e298cf2