Commit Graph

32 Commits

Author SHA1 Message Date
diego 59e26907b6 Add license header to all files missing it in the stream subdirectory.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30468 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-01-30 22:26:47 +00:00
reimar 570f1f5dec Always call cache_uninit to immediately free everything cache-related if we
fail to enable the cache.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30404 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-01-23 12:27:13 +00:00
reimar 4e28b4bc9e Change code to allow playing a stream even if enabling the cache failed
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
2010-01-23 12:13:28 +00:00
reimar 0e86058912 Make cache_init static, it is not used outside this file
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30401 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-01-23 11:51:13 +00:00
reimar 567a8d69a4 Add an exit() to silence a gcc warning and ensure forked code will never
leave the cache-loop function.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30397 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-01-23 11:03:10 +00:00
reimar a2d8222f3d 100l, shouldn't write to memory after freeing it.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30396 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-01-23 11:00:13 +00:00
reimar 9869be806b Reindent.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30395 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-01-23 10:54:03 +00:00
reimar 3fae575483 Zero freed pointers.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30394 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-01-23 10:53:28 +00:00
reimar 7afaecc111 Check for fork failing and make sure cache_uninit always frees the cache data
even if fork failed.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30393 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-01-23 10:50:50 +00:00
reimar e02a2e7f08 Deobfuscate the special hack to disable cache for live555.
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
2009-11-17 19:23:55 +00:00
diego 6e9cbdc104 whitespace cosmetics: Remove all trailing whitespace.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29305 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-05-13 02:58:57 +00:00
reimar bd7e915bf5 Move PTHREAD_CACHE define logic to configure.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28048 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-11-28 17:04:36 +00:00
reimar 7ecf9a6d04 100l, stream->cache_pid can not be used directly in pthread_create,
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
2008-11-15 19:43:39 +00:00
reimar ca77ee41f0 Use pthreads for the cache on Cygwin, since _beginthread is not available
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
2008-11-15 19:08:50 +00:00
reimar 1f52c9ed8b Include cache2.h in cache2.c, fixes an implicit declaration warning for cache_do_control
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27910 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-11-14 19:29:04 +00:00
reimar 3d1f36e3e7 Avoid CreateThread and especially TerminateThread since they cause a memleak.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27804 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-10-19 18:05:45 +00:00
reimar 834d4c5b7b Remove useless casts.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27803 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-10-19 17:28:23 +00:00
diego 2195547220 Revert declaring ThreadProc as void, it breaks the WINAPI.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27790 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-10-16 19:24:21 +00:00
diego 4d644f513c Replace preprocessor check for WIN32 with checks for __MINGW32__ and __CYGWIN__.
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
2008-10-13 16:23:55 +00:00
diego 9214b77133 Declare ThreadProc as void, it does not return anything, fixes the warning:
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
2008-10-13 15:51:29 +00:00
diego c8808af5a0 Unconditionally #include osdep/shem.h, fixes the warnings on Cygwin:
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
2008-10-13 15:13:40 +00:00
diego 3b31fa5717 Rename two GUI-related preprocessor directives:
HAVE_NEW_GUI --> CONFIG_GUI, HAVE_GTK2_GUI --> CONFIG_GTK2


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27375 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-07-30 13:44:59 +00:00
reimar 9c6a2cb740 100l, fix wrong order of cases in cache_do_control
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26956 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-06-01 18:14:56 +00:00
reimar 09b97f4826 Handle NULL control function in cache_execute_control, fixes crash with http urls.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26929 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-05-30 15:20:42 +00:00
reimar 8e218ff329 Emulate STREAM_CTRL_GET_TIME_LENGTH if cache is used.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26879 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-05-26 18:46:13 +00:00
reimar 5560a0b358 Add basic support for stream controls with cache enabled.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26865 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-05-24 07:48:35 +00:00
albeu f481e7870b Remove the need for code using stream to export an mp_input_check_interrupt()
function. It also removes the compile-time dependency on input.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26358 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-04-09 00:36:28 +00:00
diego 23defac730 cache support for OS/2
patch by KO Myung-Hun, komh chollian net


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26109 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-02-28 16:35:47 +00:00
ulion 278692c1bf Fix stream_cache to use sector_size set in stream_t.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25473 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-12-20 11:36:53 +00:00
reimar bc41cde0b7 Make sure forked code does not try to display a GTK message box (and thus crashes)
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24717 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-10-07 08:41:31 +00:00
rathann 45defa1aa0 Fix a few gcc warnings, approved by Diego and Reimar.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22160 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-02-05 23:46:08 +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