summaryrefslogtreecommitdiffstats
path: root/stream/tvi_v4l2.c
Commit message (Collapse)AuthorAgeFilesLines
* tv: if timestamp is unset, return NOPTSwm42014-06-141-4/+4
| | | | | | Well, not sure if this really improves anything, but at least it's less of a WTF to the playback core than always returning the same timestamp for every frame.
* tv: remove some non-sensewm42014-06-141-2/+2
| | | | | | There's really no need to convert this to float and then back. This is mostly of cosmetic nature, double precision was probably enough to avoid rounding.
* tv: fix compilation without clock_gettime, don't claim to be MPlayerwm42014-06-141-1/+1
| | | | mp_msg() doesn't exist anymore in this form. Oops.
* tv: add missing header for clock_gettimewm42014-06-131-0/+1
| | | | | | | Not sure how this symbol becomes visible in glibc (probably accidental or mandatory recursive inclusion via the other standard or Linux- specific headers), but normally this include file is needed to get the symbol.
* tv: fix a hidden static variablewm42014-06-121-9/+9
|
* tv: use correct timestampsiive2014-06-121-12/+48
| | | | | | | | | | | | | | | | | | Squashed from the following mplayer-svn commits. The '#' is removed from the bug ID to prevent github from doing something stupid. Instead of adding the mplayer configure check for clock_gettime(), the POSIX identifiers are used for checking presence of the function. Use correct type of timestamps when recording from v4l2. Fix 2176 Patch by Jarek Czekalski <jarekczek at poczta onet pl>. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@37222 b3059339-0415-0410-9bf9-f77b7e298cf2 Allow building of v4l2 without clock_gettime(). Add overly verbose message in case monotone timestamps are required by the kernel. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@37223 b3059339-0415-0410-9bf9-f77b7e298cf2
* tv: remove printing of useless comment informationwm42014-06-111-2/+0
|
* tv: remove global option variableswm42014-06-111-11/+11
| | | | | | 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.
* tv: remove sysinfo() usagewm42014-05-301-10/+0
| | | | | | This call was used limited the buffer size if installed RAM was below 16 MB. This stopped being useful a decade ago. The check could also overflow on 32 bit systems. Just get rid of it.
* Kill all tabswm42014-04-131-5/+5
| | | | | | | | | | | 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).
* demux: mp_msg conversionswm42013-12-211-97/+98
| | | | | | | The TV code pretends to be part of stream/, but it's actually demuxer code too. The audio_in code is shared between the TV code and stream_radio.c, so stream_radio.c needs a small hack until stream.c is converted.
* Split mpvcore/ into common/, misc/, bstr/wm42013-12-171-1/+1
|
* Replace mp_tmsg, mp_dbg -> mp_msg, remove mp_gtext(), remove set_osd_tmsgwm42013-12-161-1/+1
| | | | | | | | | The tmsg stuff was for the internal gettext() based translation system, which nobody ever attempted to use and thus was removed. mp_gtext() and set_osd_tmsg() were also for this. mp_dbg was once enabled in debug mode only, but since we have log level for enabling debug messages, it seems utterly useless.
* tvi_v4l2: remove VBI stuffwm42013-11-131-100/+0
| | | | | | | | This used to be needed for teletext support. Teletext commit has been removed (see commit ebaaa41f), and it appears this code is inactive. It was just forgotten with the removal. Get rid of it completely. Untested. (Like all changes to the TV code.)
* tvi_v4l2: let libv4l2 convert to a known pixel formatbugmen0t2013-11-131-47/+58
| | | | | | | | | | | Signed-off-by: wm4 <wm4@nowhere> Significant modifications over the original patch by not overriding syscalls with macros ("#define open v4l2open") for fallback, but the other way around ("#define v4l2open open"). As consequence, the calls have to be replaced throughout the file. Untested, although the original patch probably was tested.
* 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.
* Remove sh_audio->samplesizewm42013-11-091-7/+0
| | | | | | | | | This member was redundant. sh_audio->sample_format indicates the sample size already. The TV code is a bit strange: the redundant sample size was part of the internal TV interface. Assume it's really redundant and not something else. The PCM decoder ignores the sample size anyway.
* configure: uniform the defines to #define HAVE_xxx (0|1)Stefano Pigozzi2013-11-031-4/+4
| | | | | | | | | | | | | | | | | | | | | The configure followed 5 different convetions of defines because the next guy always wanted to introduce a new better way to uniform it[1]. For an hypothetic feature 'hurr' you could have had: * #define HAVE_HURR 1 / #undef HAVE_DURR * #define HAVE_HURR / #undef HAVE_DURR * #define CONFIG_HURR 1 / #undef CONFIG_DURR * #define HAVE_HURR 1 / #define HAVE_DURR 0 * #define CONFIG_HURR 1 / #define CONFIG_DURR 0 All is now uniform and uses: * #define HAVE_HURR 1 * #define HAVE_DURR 0 We like definining to 0 as opposed to `undef` bcause it can help spot typos and is very helpful when doing big reorganizations in the code. [1]: http://xkcd.com/927/ related
* Fix some more -Wshadow warningswm42013-11-011-1/+1
| | | | | | These aren't printed with newer gcc or clang versions for some reason. All of them seem to be about local variables shadowing global functions.
* core: move contents to mpvcore (2/2)Stefano Pigozzi2013-08-061-1/+1
| | | | Followup commit. Fixes all the files references.
* Fix some -Wshadow warningswm42013-07-231-3/+2
| | | | | | In general, this warning can hint to actual bugs. We don't enable it yet, because it would conflict with some unmerged code, and we should check with clang too (this commit was done by testing with gcc).
* Fix some cppcheck / scan-build warningswm42013-05-061-27/+0
| | | | | | | | 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.)
* video: decouple internal pixel formats from FourCCswm42013-01-131-49/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | mplayer's video chain traditionally used FourCCs for pixel formats. For example, it used IMGFMT_YV12 for 4:2:0 YUV, which was defined to the string 'YV12' interpreted as unsigned int. Additionally, it used to encode information into the numeric values of some formats. The RGB formats had their bit depth and endian encoded into the least significant byte. Extended planar formats (420P10 etc.) had chroma shift, endian, and component bit depth encoded. (This has been removed in recent commits.) Replace the FourCC mess with a simple enum. Remove all the redundant formats like YV12/I420/IYUV. Replace some image format names by something more intuitive, most importantly IMGFMT_YV12 -> IMGFMT_420P. Add img_fourcc.h, which contains the old IDs for code that actually uses FourCCs. Change the way demuxers, that output raw video, identify the video format: they set either MP_FOURCC_RAWVIDEO or MP_FOURCC_IMGFMT to request the rawvideo decoder, and sh_video->imgfmt specifies the pixel format. Like the previous hack, this is supposed to avoid the need for a complete codecs.cfg entry per format, or other lookup tables. (Note that the RGB raw video FourCCs mostly rely on ffmpeg's mappings for NUT raw video, but this is still considered better than adding a raw video decoder - even if trivial, it would be full of annoying lookup tables.) The TV code has not been tested. Some corrective changes regarding endian and other image format flags creep in.
* Rename directories, move files (step 2 of 2)wm42012-11-121-3/+3
| | | | | | | | | | | | 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.)
* libaf: rename af_format.h to format.hwm42012-08-291-1/+1
| | | | | | | | | | af_format.h declares some symbols which are defined in format.c. The fact that af_format.c is a completely unrelated file is rather confusing. Having the header and implementation file use the same base name is more uniform. (af_format.c is the audio conversion filter, while af_format.h and format.c are about audio formats and their properties.) Also fix all source files which include this file.
* Remove teletext supportwm42012-08-031-69/+9
| | | | | | | | Teletext requires special OSD support. Because I can't even test teletext, I can't restore support for it. Since teletext can be considered ancient and obscure, and since it doesn't make sense to keep the remaining teletext code without being able to use it, I'm removing it.
* stream/tvi_v4l[2]: fix calculation of free RAM for buffersiive2011-07-061-8/+5
| | | | | | | | | | | | | | Do a proper calculation of free RAM to be used as V4L buffers. The code uses sysinfo to query the available RAM, however it used ancient form available in some early development 2.3.x kernels. Newer form reports the size in memory units (usually same as page size), as result the code would fall back on 2 buffers even on multi GB system. The commit does: Improve the check in configure to ensure that we do use sysinfo struct with present mem_unit. Use free RAM instead of total RAM (to avoid swapping). Tweak memory constants and simplify code. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33732 b3059339-0415-0410-9bf9-f77b7e298cf2
* stream/tvi_v4l2: Add V4L2 support for OpenBSD (and NetBSD)Uoti Urpala2011-06-291-0/+4
| | | | Patch by Brad <brad@comstyle.com>.
* stream/tvi_v4l2.c: simplify by using getfps helper functionreimar2011-01-311-9/+2
| | | | | | | Use getfps helper function everywhere, simplifies code and avoids a possible division by 0. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32755 b3059339-0415-0410-9bf9-f77b7e298cf2
* cleanup: don't check for NULL before free()diego2010-11-081-10/+5
| | | | | | patch by Clément Bœsch, ubitux gmail com git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32598 b3059339-0415-0410-9bf9-f77b7e298cf2
* Remove remaining %lf printf conversionsreimar2010-11-021-4/+4
| | | | | | Most cases are just code in comments. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32438 b3059339-0415-0410-9bf9-f77b7e298cf2
* stream/tv: move new_handle() function from header to tv.cdiego2010-11-021-2/+1
| | | | | | | Move TV input new_handle static function to tv.c and make it non-static. There is no need to duplicate the function in the binary. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32225 b3059339-0415-0410-9bf9-f77b7e298cf2
* stream/tv: move free_handle() from header to tv.cdiego2010-11-021-2/+2
| | | | | | | Move TV input free_handle static function to tv.c and make it non-static. There is no need to duplicate the function in the binary. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32174 b3059339-0415-0410-9bf9-f77b7e298cf2
* spelling fixessiretart2010-11-021-2/+2
| | | | | | | | | | Found by the Debian QA tool 'lintian' git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31913 b3059339-0415-0410-9bf9-f77b7e298cf2 reintroduce typo in genres.h that was fixed fixed r31913 to match the id3v2 spec git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31920 b3059339-0415-0410-9bf9-f77b7e298cf2
* tv.h: Change function pointer types to proper declarationsreimar2010-11-021-1/+1
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31388 b3059339-0415-0410-9bf9-f77b7e298cf2 Note that the code is still questionable after this commit - the shared data structure has pointers to "struct priv", but different files use different incompatible definitions for that struct.
* 100l, fix check for V4L2 capture capability flag.reimar2009-12-111-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29991 b3059339-0415-0410-9bf9-f77b7e298cf2
* Remove CONFIG_TV_TELETEXT.cehoyos2009-11-071-12/+0
| | | | | | | | DVB teletext support is nearly finished, it will be possible to read teletext from file, it will not be depending on reception any more. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29851 b3059339-0415-0410-9bf9-f77b7e298cf2
* Separate teletext from tv support.cehoyos2009-11-071-2/+3
| | | | | | | Path by Francesco Lavra, francescolavra interfree it git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29848 b3059339-0415-0410-9bf9-f77b7e298cf2
* Add MSGT_TELETEXT, rename TVI_CONTROL as VBI_CONTROL and fix some pathscehoyos2009-10-291-1/+1
| | | | | | | | | in comments. Based on a patch by Francesco Lavra, francescolavra interfree it git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29802 b3059339-0415-0410-9bf9-f77b7e298cf2
* Move teletext specific code from stream into libmpcodecs.cehoyos2009-10-291-0/+1
| | | | | | | Patch by Francesco Lavra, francescolavra interfree it git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29801 b3059339-0415-0410-9bf9-f77b7e298cf2
* whitespace cosmetics: Remove all trailing whitespace.diego2009-05-131-28/+28
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29305 b3059339-0415-0410-9bf9-f77b7e298cf2
* Make tvi_v4l2 print -1 as "Current input" if the ioctl to read it failed.reimar2009-04-101-0/+1
| | | | | | | Previously it printed (number of inputs + 1) which is needlessly confusing. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29161 b3059339-0415-0410-9bf9-f77b7e298cf2
* Add TVI_CONTROL_VID_SET_WIDTH_HEIGHT to set width and height together for v4l2,reimar2009-03-161-0/+8
| | | | | | | otherwise some drivers will always stay stuck in the lowest resolution. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28975 b3059339-0415-0410-9bf9-f77b7e298cf2
* 100l fix calculation of dropped frames, number of frames is time * fps, not ↵reimar2009-03-151-1/+1
| | | | | | time / fps. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28962 b3059339-0415-0410-9bf9-f77b7e298cf2
* Replace informal GPL notes by standard GPL header.diego2008-12-131-15/+25
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28140 b3059339-0415-0410-9bf9-f77b7e298cf2
* Rename HAVE_WINSOCK preprocessor condition to HAVE_WINSOCK_H.diego2008-08-291-0/+1
| | | | | | | | | This is what it is called in FFmpeg and more consistent with other names for similar conditionals. This fixes a potential compilation failure on MinGW, as described in Bugzilla #1262. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27493 b3059339-0415-0410-9bf9-f77b7e298cf2
* Introduce CONFIG_ALSA preprocessor directive for ALSA 0.9 and 1.x.diego2008-08-061-1/+1
| | | | | | | Use it in all the places that checked for either ALSA 0.9 or 1.x. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27422 b3059339-0415-0410-9bf9-f77b7e298cf2
* Rename some audio-output-related preprocessor directives.diego2008-08-051-1/+1
| | | | | | | Switch them from a HAVE_ prefix to a CONFIG_ prefix. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27419 b3059339-0415-0410-9bf9-f77b7e298cf2
* Change a bunch of video/audio-output-specific preprocessor directives fromdiego2008-08-031-6/+6
| | | | | | | a HAVE_ prefix to a CONFIG_ prefix. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27402 b3059339-0415-0410-9bf9-f77b7e298cf2
* Try to get frame rate information through VIDIOC_G_PARM ifvoroshil2008-06-301-0/+12
| | | | | | | | capture device driver (such as uvcvideo USB video driver) does not provide VIDIOC_G_STD ioctl. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27171 b3059339-0415-0410-9bf9-f77b7e298cf2
* Fix division by zero in tvi_v4l2 which occures when capture devicevoroshil2008-06-301-8/+18
| | | | | | | driver (such as uvcvideo USB video driver) does not provide VIDIOC_G_STD ioctl. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27170 b3059339-0415-0410-9bf9-f77b7e298cf2
* cosmetics: Remove useless parentheses from return statements.diego2008-05-161-2/+2
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26788 b3059339-0415-0410-9bf9-f77b7e298cf2
* typo fix: inited --> initializeddiego2008-02-141-9/+9
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25994 b3059339-0415-0410-9bf9-f77b7e298cf2
* Make all tvi_info_t constreimar2008-01-131-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25717 b3059339-0415-0410-9bf9-f77b7e298cf2
* Add missing call to audio_in_uninit in v4l2 tv driver.voroshil2007-11-131-0/+2
| | | | | | | | | | Without it, tv does not start on the second run when using mplayer in slave or idle mode. Patch by Stanislaw Jesmanowicz stan at jesmanowicz dot com git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25033 b3059339-0415-0410-9bf9-f77b7e298cf2
* After receiving EINTR 'read' syscall should be restarted.voroshil2007-10-161-0/+2
| | | | | | | | | | Fixes receiving teletext on some systems. Modified patch from Oldrich Jedlicka oldium dot pro at aenam dot cz git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24791 b3059339-0415-0410-9bf9-f77b7e298cf2
* Implement setting gain control for video devices (usually webcams)voroshil2007-09-181-1/+34
| | | | | | | in v4l2 tv:// driver. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24573 b3059339-0415-0410-9bf9-f77b7e298cf2
* Fix for:voroshil2007-09-081-1/+1
| | | | | | | | tvi_v4l2.c: In function 'start': tvi_v4l2.c:1453: warning: comparison between signed and unsigned git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24366 b3059339-0415-0410-9bf9-f77b7e298cf2
* Automatic TV channels scanning ability for MPlayer.voroshil2007-08-231-0/+8
| | | | | | | Code is based on patch from Otvos Attila oattila at chello dot hu git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24125 b3059339-0415-0410-9bf9-f77b7e298cf2
* Added missing newline.cehoyos2007-08-031-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23999 b3059339-0415-0410-9bf9-f77b7e298cf2
* Teletext supportvoroshil2007-07-291-0/+179
| | | | | | | | Part 3/5: grabbing raw VBI data git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23921 b3059339-0415-0410-9bf9-f77b7e298cf2
* Removing global variables from tv://voroshil2007-07-291-30/+30
| | | | | | | | Step 5: removing references to old globals from tvi_v4l2.c git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23906 b3059339-0415-0410-9bf9-f77b7e298cf2
* Removing global variables from tv://voroshil2007-07-291-5/+8
| | | | | | | Step 2: fixing tv subdrivers initialization. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23903 b3059339-0415-0410-9bf9-f77b7e298cf2
*