summaryrefslogtreecommitdiffstats
path: root/stream/stream_file.c
Commit message (Collapse)AuthorAgeFilesLines
* stream_file: print strerror() when failing to open a fileUoti Urpala2012-08-161-1/+3
| | | | | | | | | | stream_file always printed "File not found" if it could not open a file, even though this could be due to other reasons such as permission problems. Print strerror() information instead. This changes the output for "mplayer /etc/shadow" from File not found: '/etc/shadow' to Cannot open file '/etc/shadow': Permission denied
* Merge remote-tracking branch 'origin/master' into my_masterwm42012-03-161-0/+2
|\ | | | | | | | | | | | | | | Conflicts: command.c mp_core.h mplayer.c screenshot.c
| * windows support: unicode filenameswm42012-03-091-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Windows uses a legacy codepage for char* / runtime functions accepting char *. Using UTF-8 as the codepage with setlocale() is explicitly forbidden. Work this around by overriding the MSVCRT functions with wrapper macros, that assume UTF-8 and use "proper" API calls like _wopen etc. to deal with unicode filenames. All code that uses standard functions that take or return filenames must now include osdep/io.h. stat() can't be overridden, because MinGW-w64 itself defines "stat" as a macro. Change code to use use mp_stat() instead. This is not perfectly clean, but still somewhat sane, and much better than littering the rest of the mplayer code with MinGW specific hacks. It's also a bit fragile, but that's actually little different from the previous situation. Also, MinGW is unlikely to ever include a nice way of dealing with this.
* | stream: refuse to open directorieswm42012-02-191-0/+9
|/ | | | It's pointless.
* stream: Make stream_write_buffer() check for short writesranma2011-04-121-2/+10
| | | | | | | | | | | | | | | | | | | | None of the calling sites to stream_write_buffer were checking the return value to see if all bytes got written (nothing in current code actually calls it any more after MEncoder was removed). This was causing (very occasionally) problems with mencoder when using output pipes AND running under a sandbox or when being straced (ptrace is the culprit). Theoretically this problem can happen without pipes or ptrace. Only stream_file, stream_smb and stream_ffmpeg implement write_buffer and ffmpeg already handles this internally. Original patch by Sang-Uok Kum. Signed-off-by: Tobias Diedrich <ranma@google.com> git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32881 b3059339-0415-0410-9bf9-f77b7e298cf2
* cache: read up to 64 KiB at once from stream_filereimar2010-11-141-0/+1
| | | | | | | | | Make the file protocol read up to 64 KiB at once when the cache is used, assuming that files will generally be readable with high bandwidth. This should improve performance when playing e.g. from high-latency network shares. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32616 b3059339-0415-0410-9bf9-f77b7e298cf2
* stream_file: Simplify and document MinGW stdin hackreimar2010-11-021-3/+4
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31964 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.
* Merge svn changes up to r30876Uoti Urpala2010-03-101-2/+0
|\
| * Define O_BINARY in stream/stream.h unless it is defined yet, and use itkomh2010-03-061-2/+0
| | | | | | | | | | | | | | | | | | | | | | in other places. This removes platform specific checks and prevents repeated definitions of O_BINARY. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30850 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r30848Uoti Urpala2010-03-101-4/+4
|\|
| * Define HAVE_SETMODE conditionally, and use it in stream/stream_file.c insteadkomh2010-03-041-4/+4
| | | | | | | | | | | | | | | | of platform specific predefined macros. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30829 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r30663Uoti Urpala2010-03-101-1/+1
|\| | | | | | | | | | | | | Conflicts: gui/cfg.c libmpcodecs/vd_dmo.c mplayer.c
| * Replace platform preprocessor check by HAVE_DOS_PATHS.komh2010-02-191-1/+1
| | | | | | | | | | | | | | This is both more elegant and more portable. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30650 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r30475Uoti Urpala2010-03-091-0/+17
|\|
| * Add license header to all files missing it in the stream subdirectory.diego2010-01-301-0/+17
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30468 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r29962Uoti Urpala2009-11-231-1/+1
|\|
| * Finally rename the STREAM_SEEK define to MP_STREAM_SEEK, there are just too manyreimar2009-11-221-1/+1
| | | | | | | | | | | | | | name clashes, in particular with Windows headers (which define STREAM_SEEK as an enum type). git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29962 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r29412Uoti Urpala2009-07-071-3/+3
|\|
| * Files should be opened in binary mode on OS/2.diego2009-06-031-3/+3
| | | | | | | | | | | | | | patch by KO Myung-Hun, komh chollian net git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29346 b3059339-0415-0410-9bf9-f77b7e298cf2
| * whitespace cosmetics: Remove all trailing whitespace.diego2009-05-131-2/+2
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29305 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Remove trailing whitespace from most filesUoti Urpala2009-07-071-2/+2
| |
* | Translation system changes part 2: replace macros by stringsAmar Takhar2009-07-071-2/+2
| | | | | | | | | | Replace all MSGTR_ macros in the source by the corresponding English string.
* | Translation system changes part 1: wrap translated stringsAmar Takhar2009-07-071-2/+2
|/ | | | | Replace mp_msg() calls which have a translated string as the format argument with mp_tmsg and add _() around all other translated strings.
* Replace preprocessor check for WIN32 with checks for __MINGW32__ and __CYGWIN__.diego2008-10-131-1/+1
| | | | | | | This avoids a pointless indirection that only obscures what is really done. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27761 b3059339-0415-0410-9bf9-f77b7e298cf2
* Avoid a pointless special-case for opening a filereimar2008-02-241-4/+0
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26083 b3059339-0415-0410-9bf9-f77b7e298cf2
* Add support for DOS-style file:///x:/path paths.diego2008-02-201-0/+6
| | | | | | | patch by KO Myung-Hun, komh chollian net git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26037 b3059339-0415-0410-9bf9-f77b7e298cf2
* stream_opts should be constreimar2008-01-131-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25719 b3059339-0415-0410-9bf9-f77b7e298cf2
* stream_opts arrays should be constreimar2007-12-021-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25270 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-2/+2
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24277 b3059339-0415-0410-9bf9-f77b7e298cf2
* truncate mencoder's output file if it exists, instead of overwriting just ↵lorenm2007-03-051-1/+1
| | | | | | part of it. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22469 b3059339-0415-0410-9bf9-f77b7e298cf2
* fix compilation on the most delicious variant of unix (mingw) that lacks ↵nicodvb2006-12-211-2/+7
| | | | | | S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21721 b3059339-0415-0410-9bf9-f77b7e298cf2
* in WRITE mode open the output file with mode 0666; umask will filter itnicodvb2006-12-191-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21689 b3059339-0415-0410-9bf9-f77b7e298cf2
* implemented STREAM_CTRL_GET_SIZEnicodvb2006-12-181-0/+17
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21674 b3059339-0415-0410-9bf9-f77b7e298cf2
* in STREAM_WRITE mode open the stream with O_RDWR|O_CREAT, S_IRUSR|S_IWUSR ↵nicodvb2006-12-181-3/+6
| | | | | | and disable seek_forward for pipes git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21672 b3059339-0415-0410-9bf9-f77b7e298cf2
* introduce new 'stream' directory for all stream layer related components and ↵ben2006-07-311-0/+162
split them from libmpdemux git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19277 b3059339-0415-0410-9bf9-f77b7e298cf2