summaryrefslogtreecommitdiffstats
path: root/stream/dvb_tune.c
Commit message (Collapse)AuthorAgeFilesLines
* 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