Commit Graph

931 Commits

Author SHA1 Message Date
diego 70c66c0476 Rename get_path.[ch] --> path.[ch].
These files now contain different functions related to path handling.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30943 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-03-20 23:38:27 +00:00
komh dd491c0d28 Define O_BINARY in stream/stream.h unless it is defined yet, and use it
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
2010-03-06 07:24:41 +00:00
komh b10a6917f4 Define HAVE_SETMODE conditionally, and use it in stream/stream_file.c instead
of platform specific predefined macros.



git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30829 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-03-04 14:46:44 +00:00
komh 9beeeb1a9e Add a VCD support for OS/2
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30819 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-03-03 14:32:29 +00:00
diego c106fe7751 Drop support for old-style DVB code.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30818 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-03-02 19:57:17 +00:00
reimar be23797ee7 Remove unused and useless define.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30815 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-03-01 21:09:17 +00:00
reimar 3fa6717fb9 Fix memleak due to strdup'd filename not being freed.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30814 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-03-01 20:38:33 +00:00
reimar cd4aa2aa30 Move functions into proper order to avoid extra declarations.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30813 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-03-01 20:33:47 +00:00
reimar 3ed38bacc4 Deduplicate code to set stream start_pos/end_pos.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30812 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-03-01 20:31:56 +00:00
reimar 4b7c452ce8 Set stream->pos correctly after seeking to a VCD title.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30811 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-03-01 20:22:18 +00:00
reimar ea139fadc1 Ensure that cue_current_pos.track is not set to an invalid value after
attempting to seek to e.g. track 0.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30810 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-03-01 20:20:13 +00:00
reimar 20fcc5c6ef Fix off-by-one error in chapter<->VCD track conversion.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30809 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-03-01 20:11:11 +00:00
reimar 4464a64ff7 Fix cue_read_toc_entry to also reject negative track numbers
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30808 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-03-01 20:07:37 +00:00
reimar 686565165f Implement cue:// track switching via chapter forward/backward like for audio CDs.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30807 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-03-01 19:59:54 +00:00
reimar 592af7cd2c Fix cue_vcd_get_track_end to not change the current position.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30806 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-03-01 19:57:42 +00:00
reimar f2740450d3 Avoid fd_bin and fd_cue global variables.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30805 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-03-01 19:35:18 +00:00
reimar 3fc8335a86 Avoid a global variable and a strcpy.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30804 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-03-01 19:25:52 +00:00
reimar 2b91c7f044 Reindent.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30803 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-03-01 19:21:59 +00:00
reimar 2a6755e10d Avoid code duplication and excessively deep nesting in cue_find_bin
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30802 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-03-01 19:20:32 +00:00
reimar 7d48f09b39 Use sizeof instead of hardcoded size.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30801 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-03-01 18:57:24 +00:00
reimar b20e08ed94 Extend stream_read_line to support reading lines from UTF-16 encoded files
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
2010-02-28 15:24:30 +00:00
reimar c89169f7b5 Move stream_read_line implementation from stream.h to stream.c,
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
2010-02-28 13:54:55 +00:00
reimar d8c02c2dd2 Simplify handling of 0-termination in stream_read_line
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30795 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-02-28 12:54:12 +00:00
reimar 2c8d69f185 Remove useless cast.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30794 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-02-28 11:30:35 +00:00
komh 35fbd55c0f Add cddb:// support for OS/2
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30788 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-02-28 03:26:18 +00:00
cehoyos d59123f10d Fix warning "missing braces around initializer".
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30782 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-02-27 23:23:34 +00:00
cehoyos 70b070baa2 Remove unused functions.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30781 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-02-27 23:14:44 +00:00
cehoyos d1b81c6c1c Fix cd_info_new() prototype.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30775 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-02-27 21:32:33 +00:00
reimar 827df51f1d Threaded cache fixes: do not free the stream_t struct twice on windows
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
2010-02-27 21:02:44 +00:00
cehoyos f47d90850d Remove unused static function streaming_stop().
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30765 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-02-27 20:13:21 +00:00
reimar 50fed7d1f9 Restructure #ifs to be clearer, also ensures that we return from the thread
proc instead of calling exit() on __MINGW32__.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30754 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-02-27 06:17:14 +00:00
diego b63759b175 Do not cast the results of malloc/calloc/realloc.
These functions return void*, which is compatible with any pointer,
so there is no need for casts.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30744 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-02-26 15:01:37 +00:00
reimar 72d18a204f Mark stream open filename parameter as const, the filename string is not
modified by these functions.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30739 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-02-25 22:47:04 +00:00
reimar b99077dc4c Remove unused function declaration.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30736 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-02-25 22:29:00 +00:00
reimar e522920697 Make local-only cddb functions static.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30735 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-02-25 22:27:53 +00:00
reimar bdf546c7c6 Remove declarations of functions now already declared in stream.h
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30733 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-02-25 22:19:32 +00:00
komh 16d8b08089 Define O_BINARY if it is undefined.
This removes a platform check for open().



git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30727 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-02-25 09:09:57 +00:00
diego 202fbbecdf Mark vcd_get_track_end () and vcd_read_toc() as static.
They are only used within the respective files.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30712 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-02-22 16:32:03 +00:00
diego c8a6c6385b Declare functions from network.c in network.h.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30698 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-02-22 13:50:48 +00:00
diego 638b2af889 Move struct streaming_control from network.h to stream.h, where it is used.
This will help in declaring some public functions where they really belong.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30697 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-02-22 13:27:58 +00:00
diego 3784d4f992 Remove commented-out declaration of non-existing function streaming_start.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30696 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-02-22 10:14:00 +00:00
diego f9c2ab17af Declare stream_fill_buffer() and stream_seek_long() unconditionally.
They are public functions that are unconditionally compiled, so they
should not be declared conditionally.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30691 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-02-21 23:30:34 +00:00
diego 326397d815 Add header for asf_mmst_streaming_start() instead of forward declaring it.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30690 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-02-21 23:26:16 +00:00
diego 49b8b80199 Add header for exported DVB-related functions.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30688 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-02-21 21:00:08 +00:00
diego d86a237bdd cosmetics: Move functions around to avoid forward declarations and #ifdefs.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30687 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-02-21 20:39:49 +00:00
diego 8ba6b4eaf9 cosmetics: Remove pointless empty lines at EOF.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30675 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-02-20 21:02:49 +00:00
diego d393029ce2 cosmetics: K&R coding style, indent with 4 spaces, no tabs
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30671 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-02-20 19:57:47 +00:00
reimar b1e549d7bc Print response headers as debugging output also for HTTP seeks.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30670 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-02-20 19:23:14 +00:00
reimar 4b36e2fd18 10l, fix a close() that should be a closesocket()
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30669 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-02-20 19:22:23 +00:00
reimar 9554a844e9 Do not discard stream buffer on eof, instead reuse it to slightly improve
format autodetection with -nocache and non-seekable streams.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30668 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-02-20 18:53:07 +00:00