Commit Graph

33 Commits

Author SHA1 Message Date
reimar 7a6227a184 stream_pvr: Fix fd check, -1 indicates invalid, not 0.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@36677 b3059339-0415-0410-9bf9-f77b7e298cf2
2014-01-23 22:44:10 +01:00
wm4 6e6291dcfd stream_pvr: fix crash on initialization
Fallout from the mp_msg conversions.
2014-01-03 16:44:44 +01:00
wm4 0335011f11 stream: mp_msg conversions
We also drop some slave mode stuff from stream_vcd.
2013-12-21 21:43:16 +01:00
wm4 0112143fda Split mpvcore/ into common/, misc/, bstr/ 2013-12-17 02:39:45 +01:00
wm4 95cfe58e3d Use O_CLOEXEC when creating FDs
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.
2013-11-30 22:40:51 +01:00
wm4 05e2b1f513 stream: don't include linux/types.h in some files
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.
2013-11-13 20:59:50 +01:00
wm4 971e8456fc stream: fix url_options field, make protocols field not fixed length
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.
2013-08-26 10:09:45 +02:00
Stefano Pigozzi 406241005e core: move contents to mpvcore (2/2)
Followup commit. Fixes all the files references.
2013-08-06 22:52:31 +02:00
wm4 bc1d61cf42 stream: redo URL parsing, replace m_struct usage with m_config
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.)
2013-08-02 17:02:34 +02:00
wm4 f406482d84 stream: remove useless author/comment fields
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.
2013-07-12 22:16:27 +02:00
wm4 cb45b1c65b Cleanup some include statements 2013-07-12 22:16:26 +02:00
wm4 52c3eb6976 core: change open_stream and demux_open signature
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.
2013-07-12 21:56:40 +02:00
wm4 4873b32c59 Rename directories, move files (step 2 of 2)
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.)
2012-11-12 20:08:18 +01:00
mplayer-svn 2e2cb6c416 stream_pvr: fix buffer overflow
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
2012-08-03 03:34:38 +02:00
Uoti Urpala 74ad0b4284 stream_pvr: fix field size / snprintf size mismatch
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.
2012-04-11 03:56:30 +03:00
reimar 1054f89404 stream_pvr: Replace <sys/fcntl.h> include by <fcntl.h>
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
2011-07-06 09:55:33 +03:00
diego 12d3e0df99 cleanup: don't check for NULL before free()
patch by Clément Bœsch, ubitux gmail com

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32598 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-11-08 18:05:12 +02:00
Uoti Urpala 00323c06e2 Delete things related to old translation system
Remove the help/ subdirectory, configure code to create toplevel
help_mp.h, and all the '#include "help_mp.h"' lines from .c files.
2010-03-10 03:47:14 +02:00
Uoti Urpala 0eb321bf2c Remove trailing whitespace from most files 2009-07-07 02:34:35 +03:00
diego 511729a3a2 Use '#include <poll.h>' instead of '#include <sys/poll.h>'.
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
2008-08-14 15:54:53 +00:00
diego 0ecfcdce00 Use standard license headers with standard formatting.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26769 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-05-14 17:20:42 +00:00
reimar cd3d3369e1 Mark all stream_info_t as const
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25239 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-12-02 13:22:53 +00:00
diego 01d92a32ad cosmetics: typo fix UNSUPORTED --> UNSUPPORTED
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24277 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-08-28 22:38:45 +00:00
voroshil a890471f6d Removing global variables from tv://
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
2007-07-29 10:25:10 +00:00
reimar 4c4a1070fe Avoid code duplication and ugly config.h hack by using av_strlcat/av_strlcpy
instead of plain strlcat/strlcpy


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23723 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-07-05 22:01:07 +00:00
ben e705d3d7ab give credits to Sven for pvr channel navigation
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23263 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-05-08 12:21:50 +00:00
ben 18528f617b support for PVR channel navigation (patch by Sven Gothel <sgothel at jausoft dot com>)
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23262 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-05-08 12:20:46 +00:00
ben fe8a263f5d deprecated comment from the time the pvr code was half V4L2 and half IVTV specific
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23184 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-04-30 12:00:13 +00:00
ben a6bff74c78 removed ivtv driver dependancy in favor of native V4L2 MPEG API (requires Linux 2.6.18 and above)
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19998 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-09-27 20:26:38 +00:00
ben ed909ff5d5 cosmetic renames because pvr support will soon be less ivtv driver dependant
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19982 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-09-25 20:36:45 +00:00
ben 59a929e570 fix build on some old 2.6 kernels, patch by Gernot Hillier
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19623 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-09-01 16:38:07 +00:00
ben cbbbf761c3 correctly report audio input
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19300 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-08-03 18:59:37 +00:00
ben 49867bd432 introduce new 'stream' directory for all stream layer related components and split them from libmpdemux
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19277 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-07-31 17:39:17 +00:00