summaryrefslogtreecommitdiffstats
path: root/stream/stream_pvr.c
Commit message (Collapse)AuthorAgeFilesLines
* stream: drop PVR supportwm42015-12-101-1615/+0
| | | | | | | | | This is only for specific Hauppage cards. According to the comments in who is actively using this feature. Get it out of the way. Anyone who still wants to use this should complain. Keeping this code would not cause terribly much additional work, and it could be restored again. (But not if the request comes months later.)
* Update license headersMarcin Kurczewski2015-04-131-5/+4
| | | | Signed-off-by: wm4 <wm4@nowhere>
* stream_pvr: uncrustifywm42015-01-061-1306/+1188
| | | | Mostly automatic, with some manual changes.
* stream_pvr: sort channel list by --tv-channels orderwm42014-12-281-2/+25
| | | | | | | | | | Apparently this is what users would expect. Going the way of least resistance (in terms of messing with this old, rarely used code), sorting them by some kind of addition timestamp (called priority in the patch) is the easiest. Fixes #1390.
* stream_pvr: remove redundant log prefixeswm42014-12-261-103/+82
|
* stream_pvr: increase timeout, slightly better error reportingwm42014-12-261-5/+10
| | | | | | | An attempt to find out what's wrong with issue #1382. I don't even know why a timeout would be needed; for robustness with broken devices maybe?
* Do not call strerror()wm42014-11-261-19/+20
| | | | | | | | | | | | | | | | | | | | | | | | | ...because everything is terrible. strerror() is not documented as having to be thread-safe by POSIX and C11. (Which is pretty much bullshit, because both mandate threads and some form of thread-local storage - so there's no excuse why implementation couldn't implement this in a thread-safe way. Especially with C11 this is ridiculous, because there is no way to use threads and convert error numbers to strings at the same time!) Since we heavily use threads now, we should avoid unsafe functions like strerror(). strerror_r() is in POSIX, but GNU/glibc deliberately fucks it up and gives the function different semantics than the POSIX one. It's a bit of work to convince this piece of shit to expose the POSIX standard function, and not the messed up GNU one. strerror_l() is also in POSIX, but only since the 2008 standard, and thus is not widespread. The solution is using avlibc (libavutil, by its official name), which handles the unportable details for us, mostly. We avoid some pain.
* Silence some Coverity warningswm42014-11-211-0/+1
| | | | None of this really matters.
* build: include <strings.h> for strcasecmp()wm42014-07-101-0/+1
| | | | | | | It happens to work without strings.h on glibc or with _GNU_SOURCE, but the POSIX standard requires including <strings.h>. Hopefully fixes OSX build.
* 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.)
* stream: minor cleanupswm42014-06-221-1/+0
| | | | | Remove unused stream type constants. Move some now DVD specific crap to stream_dvd.c.
* Add more constwm42014-06-111-1/+1
| | | | | | | While I'm not very fond of "const", it's important for declarations (it decides whether a symbol is emitted in a read-only or read/write section). Fix all these cases, so we have writeable global data only when we really need.
* stream_pvr: remove global option variableswm42014-06-111-89/+82
|
* tv: remove global option variableswm42014-06-111-33/+36
| | | | | | Pretty much nothing changes, but using -tv-scan with suboptions doesn't work anymore (instead of "-tv-scan x" it's "-tv scan-x" now). Flat options ("-tv-scan-x") stay compatible.
* command: redo ancient TV/DVB/PVR commandswm42014-06-111-0/+25
| | | | | | | | | | | | | | | | | | Convert all these commands to properties. (Except tv_last_channel, not sure what to do with this.) Also, internally, don't access stream details directly, but dispatch commands with stream ctrls. Many of the new properties are a bit strange, because they're write- only. Also remove some OSD output these commands produced, because I couldn't be bothered to port these. In general, this makes everything much cleaner, and will also make it easier to e.g. move the demuxer to its own thread. Don't bother updating input.conf, but changes.rst documents how old commands map to the new ones. Mostly untested, due to lack of hardware.
* stream: remove chaos related to writeable streamswm42014-05-241-4/+1
| | | | | | | | | | For some reason, we support writeable streams. (Only encoding uses that, and the use of it looks messy enough that I want to replace it with FILE or avio today.) It's a chaos: most streams do not actually check the mode parameter like they should. Simplify it, and let streams signal availability of write mode by setting a flag in the stream info struct.
* stream_pvr: Fix fd check, -1 indicates invalid, not 0.reimar2014-01-231-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@36677 b3059339-0415-0410-9bf9-f77b7e298cf2
* stream_pvr: fix crash on initializationwm42014-01-031-0/+1
| | | | Fallout from the mp_msg conversions.
* stream: mp_msg conversionswm42013-12-211-138/+81
| | | | 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-1/+3
| | | | | | | | | | | | | | 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.
* stream: don't include linux/types.h in some fileswm42013-11-131-1/+0
| | | | | | Apparently this is not portable to FreeBSD. It turns out that we (probably) don't use any symbols defined by this header directly, so the includes are not needed.
* stream: fix url_options field, make protocols field not fixed lengthwm42013-08-261-3/+3
| | | | | | | | | | | | | | | | | | | | The way the url_options field was handled was not entirely sane: it's actually a flexible array member, so it points to garbage for streams which do not initialize this member (it just points to the data right after the struct, which is garbage in theory and practice). This was not actually a problem, since the field is only used if priv_size is set (due to how this stuff is used). But it doesn't allow setting priv_size only, which might be useful in some cases. Also, make the protocols array not a fixed size array. Most stream implementations have only 1 protocol prefix, but stream_lavf.c has over 10 (whitelists ffmpeg protocols). The high size of the fixed size protocol array wastes space, and it is _still_ annoying to add new prefixes to stream_lavf (have to bump the maximum length), so make it arbitrary length. The two changes (plus some more cosmetic changes) arte conflated into one, because it was annoying going over all the stream implementations.
* core: move contents to mpvcore (2/2)Stefano Pigozzi2013-08-061-1/+1
| | | | Followup commit. Fixes all the files references.
* stream: redo URL parsing, replace m_struct usage with m_configwm42013-08-021-3/+1
| | | | | | | | | | | | | Move the URL parsing code from m_option.c to stream.c, and simplify it dramatically. This code originates from times when http code used this, but now it's just relict from other stream implementations reusing this code. Remove the unused bits and simplify the rest. stream_vcd is insane, and the priv struct is different on every platform, so drop the URL parsing. This means you can't specify a track anymore, only the device. (Does anyone use stream_vcd? Not like this couldn't be fixed, but it doesn't seem worth the effort, especially because it'd require potentially touching platform specific code.)
* stream: remove useless author/comment fieldswm42013-07-121-3/+0
| | | | | | | | | These were printed only with -v. Most streams had them set to useless or redundant values, so it's just badly maintained bloat. Since we remove the "author" field too, and since this may have copyright implications, we add the contents of the author fields to the file headers, except if the name is already part of the file header.
* Cleanup some include statementswm42013-07-121-2/+3
|
* core: change open_stream and demux_open signaturewm42013-07-121-1/+1
| | | | | | | | | | | This removes the dependency on DEMUXER_TYPE_* and the file_format parameter from the stream open functions. Remove some of the playlist handling code. It looks like this was needed only for loading linked mov files with demux_mov (which was removed long ago). Delete a minor bit of dead network-related code from stream.c as well.
* 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.)
* stream_pvr: fix buffer overflowmplayer-svn2012-08-031-16/+13
| | | | | | | | | stream_pvr: Use sizeof() to get destination buffer size. The code in lines 382/384 used the wrong constant. Fixes bug #2066. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34895 b3059339-0415-0410-9bf9-f77b7e298cf2 Author: reimar
* stream_pvr: fix field size / snprintf size mismatchUoti Urpala2012-04-111-1/+1
| | | | | | | struct station_elem_s had a field "name[8]", but the rest of the code used PVR_STATION_NAME_SIZE as field size in snprintf and some other calls accessing the field. Change the field size to PVR_STATION_NAME_SIZE so it matches the accesses.
* stream_pvr: Replace <sys/fcntl.h> include by <fcntl.h>reimar2011-07-061-1/+1
| | | | | | | | Replace sys/fcntl.h include by fcntl.h include used everywhere else. Also fixes compilation with the Android NDK. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33584 b3059339-0415-0410-9bf9-f77b7e298cf2
* cleanup: don't check for NULL before free()diego2010-11-081-16/+6
| | | | | | patch by Clément Bœsch, ubitux gmail com git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32598 b3059339-0415-0410-9bf9-f77b7e298cf2
* Delete things related to old translation systemUoti Urpala2010-03-101-1/+0
| | | | | Remove the help/ subdirectory, configure code to create toplevel help_mp.h, and all the '#include "help_mp.h"' lines from .c files.
* Remove trailing whitespace from most filesUoti Urpala2009-07-071-85/+85
|
* 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
* Use standard license headers with standard formatting.diego2008-05-141-17/+20
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26769 b3059339-0415-0410-9bf9-f77b7e298cf2
* Mark all stream_info_t as constreimar2007-12-021-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25239 b3059339-0415-0410-9bf9-f77b7e298cf2
* cosmetics: typo fix UNSUPORTED --> UNSUPPORTEDdiego2007-08-281-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24277 b3059339-0415-0410-9bf9-f77b7e298cf2
* Removing global variables from tv://voroshil2007-07-291-33/+33
| | | | | | | | Step 7: replacing old globals with new structure in stream_pvr.c git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23908 b3059339-0415-0410-9bf9-f77b7e298cf2
* Avoid code duplication and ugly config.h hack by using av_strlcat/av_strlcpyreimar2007-07-051-8/+9
| | | | | | | instead of plain strlcat/strlcpy git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23723 b3059339-0415-0410-9bf9-f77b7e298cf2
* give credits to Sven for pvr channel navigationben2007-05-081-0/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23263 b3059339-0415-0410-9bf9-f77b7e298cf2
* support for PVR channel navigation (patch by Sven Gothel <sgothel at jausoft ↵ben2007-05-081-23/+760
| | | | | | dot com>) git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23262 b3059339-0415-0410-9bf9-f77b7e298cf2
* deprecated comment from the time the pvr code was half V4L2 and half IVTV ↵ben2007-04-301-2/+0
| | | | | | specific git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23184 b3059339-0415-0410-9bf9-f77b7e298cf2
* removed ivtv driver dependancy in favor of native V4L2 MPEG API (requires ↵ben2006-09-271-242/+264
| | | | | | Linux 2.6.18 and above) git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19998 b3059339-0415-0410-9bf9-f77b7e298cf2
* cosmetic renames because pvr support will soon be less ivtv driver dependantben2006-09-251-11/+11
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19982 b3059339-0415-0410-9bf9-f77b7e298cf2
* fix build on some old 2.6 kernels, patch by Gernot Hillierben2006-09-011-0/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19623 b3059339-0415-0410-9bf9-f77b7e298cf2
* correctly report audio inputben2006-08-031-10/+2
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19300 b3059339-0415-0410-9bf9-f77b7e298cf2
* introduce new 'stream' directory for all stream layer related components and ↵ben2006-07-311-0/+1026
split them from libmpdemux git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19277 b3059339-0415-0410-9bf9-f77b7e298cf2