summaryrefslogtreecommitdiffstats
path: root/stream/stream.c
Commit message (Collapse)AuthorAgeFilesLines
* stream.c: make some stream messages translatableib2011-06-291-6/+7
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33454 b3059339-0415-0410-9bf9-f77b7e298cf2
* cleanup: shut up more warningsClément Bœsch2011-05-061-1/+1
|
* Merge branch 'mplayer1_changes'Uoti Urpala2011-05-021-1/+23
|\
| * stream: try to reset stream once if read failsreimar2011-04-121-1/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When reading from a stream fails, try one more time after a reset. This should re-establish for example timed-out network connections. Fixes bug #1841. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32954 b3059339-0415-0410-9bf9-f77b7e298cf2 100l, fix incorrect len when retrying read. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32957 b3059339-0415-0410-9bf9-f77b7e298cf2 Improve stream reset on read error, should now fix bug #1841 in more cases, e.g. also with -cache. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32977 b3059339-0415-0410-9bf9-f77b7e298cf2 Add ugly hack to compensate DVDNAV's ugly hacks and fix seeking. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33122 b3059339-0415-0410-9bf9-f77b7e298cf2
| * stream: Make stream_write_buffer() check for short writesranma2011-04-121-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | stream.[ch], ass_mp: new stream function for whole-file readsUoti Urpala2011-03-031-0/+34
|/ | | | | | Add new stream_read_complete() function which reads the complete contents of file. Use that in ass_mp.c which had custom code to do the same.
* cleanup: don't check for NULL before free()diego2010-11-081-2/+2
| | | | | | patch by Clément Bœsch, ubitux gmail com git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32598 b3059339-0415-0410-9bf9-f77b7e298cf2
* cache, stream: avoid extra memcpy when using cachereimar2010-11-071-36/+53
| | | | | | | | | | Add a stream_read_internal() function that reads directly into a given buffer instead of the stream's internal one. Use this to read directly into cache memory, avoiding a memcpy(). This requires also adding a stream_seek_internal() as the normal seek function reads into the stream's buffer. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32559 b3059339-0415-0410-9bf9-f77b7e298cf2
* Add a simple capture feature (-capture)Uoti Urpala2010-11-021-0/+17
| | | | | | | | | | | | | | | | | If a specified key is pressed during playback, the current stream is captured to a file, similar to what -dumpstream achieves. original patch by Pásztor Szilárd, don tricon hu Taken from the following svn commits, but with several fixes and modifications (one obvious user-visible difference is that the default key binding is 'C', not 'c'): git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32524 b3059339-0415-0410-9bf9-f77b7e298cf2 git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32529 b3059339-0415-0410-9bf9-f77b7e298cf2 git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32530 b3059339-0415-0410-9bf9-f77b7e298cf2
* build: enable/disable all FFmpeg libraries togetherUoti Urpala2010-11-021-1/+1
| | | | | | | | | Enable all of libavcodec, libavformat, libswscale, and libpostproc together (libavutil is always required). based on svn commit by diego: git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32226 b3059339-0415-0410-9bf9-f77b7e298cf2
* stream: make stream_read_line() terminate line on EOFreimar2010-11-021-1/+1
| | | | | | | Make sure we return an "empty" line on eof, to make sure we get no buffer overflows in case some code fails to check the return value. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31999 b3059339-0415-0410-9bf9-f77b7e298cf2
* configure: Rename "network" variable and option to "networking"diego2010-11-021-4/+4
| | | | | | This avoids conflicts with the FFmpeg variable of the same name. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31749 b3059339-0415-0410-9bf9-f77b7e298cf2
* stream.c: add <libavutil/common.h> include needed for GET_UTF16reimar2010-11-021-0/+2
| | | | | | Patch by Erik Auerswald {auerswal unix-ag.uni-kl.de} git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31658 b3059339-0415-0410-9bf9-f77b7e298cf2
* stream_bluray: add unencrypted Blu-ray playbackben2010-11-021-0/+4
| | | | | | | Support for unencrypted Blu-ray playback through libbluray. Use it through: mplayer br:////path/to/disc git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31631 b3059339-0415-0410-9bf9-f77b7e298cf2
* Merge svn changes up to r31256Uoti Urpala2010-05-301-1/+5
|\
| * stream_check_interrupt should sleep even if no callback is set.reimar2010-05-281-1/+4
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31255 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r31226Uoti Urpala2010-05-301-1/+4
|\|
| * Retry reading even if we hit eof before.reimar2010-05-261-1/+4
| | | | | | | | | | | | | | This allows playing growing files even with a large cache. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31226 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r31004Uoti Urpala2010-04-261-2/+0
|\|
| * Remove commented-out #include of a non-existing file.diego2010-04-031-2/+0
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30992 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 r30815Uoti Urpala2010-03-101-5/+101
|\|
| * Extend stream_read_line to support reading lines from UTF-16 encoded filesreimar2010-02-281-5/+101
| | | | | | | | | | | | | | and use this to support reading UTF-16 encoded subtitle files in subreader.c git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30799 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r30798Uoti Urpala2010-03-101-0/+26
|\|
| * Move stream_read_line implementation from stream.h to stream.c,reimar2010-02-281-0/+26
| | | | | | | | | | | | | | | | it is not speed critical and the function call overhead is not relevant for its overall speed anyway. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30796 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r30748Uoti Urpala2010-03-101-4/+5
|\|
| * Mark stream open filename parameter as const, the filename string is notreimar2010-02-251-3/+3
| | | | | | | | | | | | | | modified by these functions. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30739 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r30672Uoti Urpala2010-03-101-4/+4
|\|
| * Do not discard stream buffer on eof, instead reuse it to slightly improvereimar2010-02-201-4/+4
| | | | | | | | | | | | | | format autodetection with -nocache and non-seekable streams. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30668 b3059339-0415-0410-9bf9-f77b7e298cf2
| * stream: Mark functions not used outside of their files as static.diego2010-02-161-3/+4
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30599 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 r30419Uoti Urpala2010-01-251-2/+0
|\|
| * Call cache-uninit unconditionally, it should always be safe to call.reimar2010-01-231-2/+0
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30403 b3059339-0415-0410-9bf9-f77b7e298cf2
* | stream: improve EOF handling in seeksUoti Urpala2010-01-181-6/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Reset stream 'eof' flag when a seek succeeds, and allow seeking to a position at or past EOF (in the sense that the seek succeeds and stream_tell() then returns that position). This fixes at least some demuxer problems where an attempt to read the index from the end of an incomplete file would set the 'eof' flag and cause subsequent reads to fail, even if failure to read the index would otherwise be nonfatal and demuxing could continue after seeking back. Partially based on a patch from Laurent <laurent.aml@gmail.com>.
* | Merge svn changes up to r29962Uoti Urpala2009-11-231-10/+15
|\|
| * Finally rename the STREAM_SEEK define to MP_STREAM_SEEK, there are just too manyreimar2009-11-221-4/+4
| | | | | | | | | | | | | | 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 malloc+memset -> callocreimar2009-11-171-4/+2
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29929 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Enable the read-based forward seek fallback also when CONFIG_NETWORK isreimar2009-11-171-2/+2
| | | | | | | | | | | | | | | | | | enabled. Enabling network support should not have side-effects on code not really related to networking. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29926 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Use fill_buffer if available also for STREAMTYPE_STREAMreimar2009-11-171-0/+3
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29925 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Add preliminary support for streaming via FFmpeg's URProtocol functions.reimar2009-11-171-0/+4
| | | | | | | | | | | | | | Basic playback tested for file and http protocols. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29923 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r29912Uoti Urpala2009-11-161-6/+4
|\|
| * The code for the non-networking case is the same whether networkingreimar2009-11-091-5/+2
| | | | | | | | | | | | | | support was enabled or no, so avoid duplicating it. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29861 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Factor out triplicated break statement.reimar2009-11-091-3/+4
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29860 b3059339-0415-0410-9bf9-f77b7e298cf2
| * whitespace cosmetics: Remove all trailing whitespace.diego2009-05-131-12/+12
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29305 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Remove trailing whitespace from most filesUoti Urpala2009-07-071-12/+12
| |
* | Translation system changes part 2: replace macros by stringsAmar Takhar2009-07-071-1/+1
| | | | | | | | | | Replace all MSGTR_ macros in the source by the corresponding English string.
* | Translation system changes part 1: wrap translated stringsAmar Takhar2009-07-071-1/+1
| | | | | | | | | | Replace mp_msg() calls which have a translated string as the format argument with mp_tmsg and add _() around all other translated strings.
* | Merge svn changes up to r28461Uoti Urpala2009-02-041-3/+3
|\|
| * Convert HAVE_WINSOCK2_H into a 0/1 definition.diego2009-02-011-3/+3
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28437 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r27514Uoti Urpala2008-09-031-6/+4
|\|
| * Move '#define closesocket close' preprocessor directive to a common placediego2008-09-011-4/+2
| | | | | | | | | | | | | | and put it under the proper '#ifndef HAVE_CLOSESOCKET' condition. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27505 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Revert moving closesocket definition and network headers to network.h.diego2008-08-311-1/+8
| | | | | | | | | | | | | | This caused lots of trouble on MinGW, we need a different solution. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27504 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Move duplicated '#define closesocket close' into network.h along withdiego2008-08-291-8/+1
| | | | | | | | | | | | | | network-related #include #ifdeffery. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27496 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Rename HAVE_WINSOCK preprocessor condition to HAVE_WINSOCK_H.diego2008-08-291-3/+3
| | | | | | | | | | | | | | | | | | 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
* | Merge svn changes up to r27441Uoti Urpala2008-08-081-12/+12
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: cfg-common-opts.h command.c configure input/input.c libmpcodecs/dec_video.c libmpcodecs/vd.c libmpdemux/stheader.h libvo/sub.c libvo/video_out.c libvo/vo_xv.c libvo/vosub_vidix.c libvo/x11_common.c libvo/x11_common.h mp_core.h mplayer.c stream/stream.h
| * Give a CONFIG_ prefix to preprocessor directives that lacked one anddiego2008-08-071-6/+6
| | | | | | | | | | | | | | change arbitrary prefixes to CONFIG_. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27429 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Rename a bunch of miscellaneous preprocessor directives.diego2008-08-071-3/+3
| | | | | | | | | | | | | | Switch them from a HAVE_ to a CONFIG_ prefix. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27423 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Change a bunch of video/audio-output-specific preprocessor directives fromdiego2008-08-031-3/+3
| | | | | | | | | | | | | | a HAVE_ prefix to a CONFIG_ prefix. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27402 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r27374Uoti Urpala2008-07-301-6/+6
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |