summaryrefslogtreecommitdiffstats
path: root/stream/cache2.c
Commit message (Collapse)AuthorAgeFilesLines
* cache: add sanity-check for sector sizereimar2010-11-021-1/+7
| | | | | | | Add sanity-check for sector size to avoid strange crashes if it is too large. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31914 b3059339-0415-0410-9bf9-f77b7e298cf2
* cache: Don't mess up current position if time-based seek failsreimar2010-11-021-1/+2
| | | | | | | | Avoid STREAM_CTRL_SEEK_TO_TIME messing up the current position for stream types which do not support it. Fixes seeking in local flv files. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31907 b3059339-0415-0410-9bf9-f77b7e298cf2
* cache: Use sigaction() instead of signal()reimar2010-11-021-3/+6
| | | | | | | | | | | Signal() has an unavoidable race-condition on "broken by backwards-compatibility" systems like Solaris. (Upon receiving a signal, the handler is reset to SIG_DFL, thus a second signal will kill the process. The problem could also be reduced by re-installing the handler inside the handler, but there's still a race-condition and the risk of the handler being called inside the handler). git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31738 b3059339-0415-0410-9bf9-f77b7e298cf2
* cache: Respect -cache-seek-min also for on-disk filesreimar2010-11-021-3/+5
| | | | | | | Should reduce issues with mp4/mov (playing those may involve a lot of seeking inside the file). git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31371 b3059339-0415-0410-9bf9-f77b7e298cf2
* Merge svn changes up to r31256Uoti Urpala2010-05-301-4/+31
|\
| * Fix typo in message.reimar2010-05-281-1/+1
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31256 b3059339-0415-0410-9bf9-f77b7e298cf2
| * 100l, stream_check_for_interrupt argument is not in usec,reimar2010-05-281-3/+3
| | | | | | | | | | | | | | so we would end up sleeping for 10s instead of 10ms. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31254 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Improve handling of cache process/thread hanging/being killed.reimar2010-05-281-3/+23
| | | | | | | | | | | | | | In particular allow a single STRG+C to quit MPlayer. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31251 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Fix cache process accidentally being killed by SIGUSR1.reimar2010-05-281-0/+7
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31250 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r31244Uoti Urpala2010-05-301-6/+6
|\|
| * Fix a bunch of typos in the stream cache code.diego2010-05-271-6/+6
| | | | | | | | | | | | | | patch by Giorgio Vazzana, mywing81 gmail com git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31242 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r31226Uoti Urpala2010-05-301-3/+11
|\|
| * Retry reading even if we hit eof before.reimar2010-05-261-2/+2
| | | | | | | | | | | | | | 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
| * Re-enable wakeup-on-signal for cache process.reimar2010-05-261-5/+10
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31224 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Disable waking the cache process up via a signal, itreimar2010-05-261-1/+4
| | | | | | | | | | | | | | currently causes read errors due to not handling EINTR. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31223 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r31211Uoti Urpala2010-05-301-45/+78
|\| | | | | | | | | The merged cache2.c changes are known to have problems. Will merge further fixes to them before merging this to the master branch.
| * Slightly reduce number of #ifsreimar2010-05-231-22/+20
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31204 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Use an extra define to simplify ifdefsreimar2010-05-231-14/+20
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31203 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Try reducing the #ifdef mess for the different cache variants.reimar2010-05-231-15/+13
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31202 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Extract the cache main loop into a separate function.reimar2010-05-231-14/+19
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31201 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Optimize cache behaviour for the many-consecutive-seeks case.reimar2010-05-231-1/+13
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31199 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Add code to wake up cache process when e.g. a seek is needed.reimar2010-05-231-0/+14
| | | | | | | | | | | | | | | | Dramatically reduces seeking times with lavf ogg demuxer. Needs a spearate implementation for the thread-based cache implementation. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31198 b3059339-0415-0410-9bf9-f77b7e298cf2
* | cosmetics: "struct vf_instance* vf" -> "struct vf_instance *vf"Uoti Urpala2010-05-291-3/+6
| | | | | | | | | | | | | | Change 'struct vf_instance' pointer arguments to more standard style as in the subject. Also some other minor formatting fixes. Patch by Diego Biurrun.
* | 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 r30798Uoti Urpala2010-03-101-11/+9
|\|
| * Threaded cache fixes: do not free the stream_t struct twice on windowsreimar2010-02-271-8/+6
| | | | | | | | | | | | | | | | and make sure the cache thread quits also for streams without a control function (e.g. http). git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30773 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Restructure #ifs to be clearer, also ensures that we return from the threadreimar2010-02-271-3/+3
| | | | | | | | | | | | | | proc instead of calling exit() on __MINGW32__. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30754 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Remove declarations of functions now already declared in stream.hreimar2010-02-251-3/+0
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30733 b3059339-0415-0410-9bf9-f77b7e298cf2
| * stream: Mark functions not used outside of their files as static.diego2010-02-161-3/+6
| | | | | | | | 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/+18
|\|
| * Add license header to all files missing it in the stream subdirectory.diego2010-01-301-0/+18
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30468 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Restore collapsed whitespace in output messagesUoti Urpala2010-03-071-1/+1
| | | | | | | | | | | | | | | | | | For some reason commit e306174952d42e1cd6cc5efc50ae6bb0410501bc, which replaced translation macro names with the corresponding English strings, also collapsed multiple consecutive space characters into one. Change most of these back. In a couple of cases the amount of whitespace is important for alignment, and for the rest it at least keeps the strings closer to the existing translations.
* | Merge svn changes up to r30419Uoti Urpala2010-01-251-7/+32
|\|
| * Always call cache_uninit to immediately free everything cache-related if wereimar2010-01-231-3/+10
| | | | | | | | | | | | | | fail to enable the cache. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30404 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Change code to allow playing a stream even if enabling the cache failedreimar2010-01-231-2/+5
| | | | | | | | | | | | | | while still handling it when the user aborts the cache fill. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30402 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Make cache_init static, it is not used outside this filereimar2010-01-231-1/+1
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30401 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Add an exit() to silence a gcc warning and ensure forked code will neverreimar2010-01-231-0/+2
| | | | | | | | | | | | | | leave the cache-loop function. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30397 b3059339-0415-0410-9bf9-f77b7e298cf2
| * 100l, shouldn't write to memory after freeing it.reimar2010-01-231-1/+2
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30396 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Reindent.reimar2010-01-231-3/+3
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30395 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Zero freed pointers.reimar2010-01-231-0/+3
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30394 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Check for fork failing and make sure cache_uninit always frees the cache datareimar2010-01-231-1/+10
| | | | | | | | | | | | | | even if fork failed. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30393 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r29962Uoti Urpala2009-11-231-2/+1
|\|
| * Deobfuscate the special hack to disable cache for live555.reimar2009-11-171-2/+1
| | | | | | | | | | | | | | | | | | Cache can not be used for it, since it does not provide any data stream, the data is provided to the demuxer "behind MPlayer's back". git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29930 b3059339-0415-0410-9bf9-f77b7e298cf2
| * whitespace cosmetics: Remove all trailing whitespace.diego2009-05-131-23/+23
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29305 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Remove the internal GUIAnton Khirnov2009-07-071-4/+0
| | | | | | | | | | | | | | | | | | The GUI is badly designed and too closely coupled to the internal details of other code. The GUI code is in bad shape and unmaintained for years. There is no indication that anyone would maintain it in the future either. Even if someone did volunteer to implement a better integrated GUI having the current code in the tree probably wouldn't help much. So get rid of it.
* | Remove trailing whitespace from most filesUoti Urpala2009-07-071-23/+23
| |
* | 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 r28065Uoti Urpala2008-12-021-4/+0
|\|
| * Move PTHREAD_CACHE define logic to configure.reimar2008-11-281-4/+0
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28048 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r27949Uoti Urpala2008-11-171-12/+32
|\| | | | | | | | | | | | | | | | | Conflicts: common.mak libvo/vo_xv.c libvo/x11_common.c libvo/x11_common.h stream/cache2.c
| * 100l, stream->cache_pid can not be used directly in pthread_create,reimar2008-11-151-1/+5
| | | | | | | | | | | | | | it has the wrong type. Luckily we currently do not need the value anyway. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27930 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Use pthreads for the cache on Cygwin, since _beginthread is not availablereimar2008-11-151-11/+27
| | | | | | | | | | | | | | | | and the previous CreateThread method would probably leak memory here, too. Also pthreads seems to be the official Cygwin threading API. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27928 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Include cache2.h in cache2.c, fixes an implicit declaration warning for ↵reimar2008-11-141-0/+1
| | | | | | | | | | | | cache_do_control git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27910 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to 27824Uoti Urpala2008-10-251-31/+28
|\| | | | | | | | | | | | | | | | | | | Conflicts: cfg-common-opts.h libmpcodecs/dec_video.c libmpcodecs/vd.c libvo/x11_common.h mplayer.c stream/cache2.c
| * Avoid CreateThread and especially TerminateThread since they cause a memleak.reimar2008-10-191-21/+18
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27804 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Remove useless casts.reimar2008-10-191-2/+2
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27803 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Revert declaring ThreadProc as void, it breaks the WINAPI.diego2008-10-161-2/+6
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27790 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Replace preprocessor check for WIN32 with checks for __MINGW32__ and __CYGWIN__.diego2008-10-131-10/+10
| | | | | | | | | | | | | | 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
| * Declare ThreadProc as void, it does not return anything, fixes the warning:diego2008-10-131-6/+2
| | | | | | | | | | | | | | stream/cache2.c:364: warning: control reaches end of non-void function git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27759 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Unconditionally #include osdep/shem.h, fixes the warnings on Cygwin:diego2008-10-131-1/+1
| | | | | | | | | | | | | | | | stream/cache2.c:244: warning: implicit declaration of function `shmem_alloc' stream/cache2.c:265: warning: implicit declaration of function `shmem_free' git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27757 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Include corresponding .h in some .c filesUoti Urpala2008-08-121-0/+1
| |
* | stream.h: Add 2 prototypes instead of declaring them in cache2.cUoti Urpala2008-08-121-3/