Commit Graph

81 Commits

Author SHA1 Message Date
mplayer-svn 76ce3b7d6e Replace 'q' printf length modifier by 'll'
'q' is just a deprecated synonym of 'll' that should no longer be used.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34224 b3059339-0415-0410-9bf9-f77b7e298cf2
Author: diego
2012-08-03 01:31:00 +02:00
wm4 7059c15f4a mplayer: rip out --capture support
While this was an interesting idea, it wasn't actually useful.
Basically it dumped the raw data (as requested by the demuxer) into a
file. The result is only useful if the file format was raw or maybe
some MPEG packet stream, but not with most modern file formats.
2012-08-02 23:22:52 +02:00
reimar 55def9cc1b stream: show negative seek position value in error message
Make "Invalid seek to negative position" message more useful by
printing the actual value.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33556 b3059339-0415-0410-9bf9-f77b7e298cf2
2011-07-06 09:30:04 +03:00
Clément Bœsch 6506d4ad84 cleanup: remove more warnings 2011-05-02 00:46:48 +03:00
Uoti Urpala 4c117849b3 stream.[ch], ass_mp: new stream function for whole-file reads
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.
2011-03-03 21:39:24 +02:00
Uoti Urpala 5177b24b25 cleanup: demuxer.[ch]: remove unused code, make functions static
Remove some unused lines from demuxer.h. Make some demuxer.c functions
static. Move new_ds_stream() declaration from demuxer.h to stream.h
(the function is defined in stream.c). Clean up some code in mplayer.c
that had commented-out free_demuxer_stream() calls.
2011-02-22 15:16:41 +02:00
reimar eb5765e96a stream.h: check against huge negative values in stream_seek()
Add validity check for stream_seek argument to avoid a integer
overflow for huge negative values that would break the internal state
of the stream buffer.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32702 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-12-16 06:22:19 +02:00
reimar 0792847d4a cache: read up to 64 KiB at once from stream_file
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
2010-11-14 12:24:11 +02:00
Clément Bœsch 6526bee39b options: move some demux options to option struct
Following options were moved: audiofile, audiofile-cache, subfile,
demuxer, audio-demuxer, sub-demuxer, [no]extbased.
2010-11-11 16:31:46 +02:00
reimar f94717cdc4 cache, stream: avoid extra memcpy when using cache
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
2010-11-07 21:46:22 +02:00
Uoti Urpala 3cb3bbbddc Add a simple capture feature (-capture)
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
2010-11-02 07:48:31 +02:00
reimar 837b6d245d cache: add sanity-check for sector size
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
2010-11-02 04:15:34 +02:00
diego 578ad534b3 configure: Rename "network" variable and option to "networking"
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
2010-11-02 04:14:44 +02:00
ben 6704008a46 stream_bluray: add unencrypted Blu-ray playback
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
2010-11-02 04:14:20 +02:00
reimar 27408d4f14 stream.h: support backswards stream_skip() within buffer
Never just ignore a backwards skip, even if the stream is not seekable
it might still be in a buffer.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31465 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-11-02 04:11:07 +02:00
Uoti Urpala 0e0d88ede9 Merge svn changes up to r31256 2010-05-30 16:39:41 +03:00
reimar 16e3978e1e Document time scale for stream_check_interrupt argument.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31253 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-05-28 18:45:25 +00:00
diego 5e71e43bb5 Drop pointless _st suffix from 'struct stream'.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31237 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-05-27 20:38:25 +00:00
Uoti Urpala de5566f0b5 stream.h: remove bad EOF check in stream_seek()
Also remove a redundant stream->eof = 0 in demuxer.c.
2010-05-22 06:40:34 +03:00
Uoti Urpala a2133d7684 options: move -chapter values to option struct
-chapter can optionally take a range with a start and an end. Add a
new option type which supports such values and use that instead of a
custom per-option function.

This commit also fixes a build configuration bug: before the
availability of the -chapter option depended on DVD functionality
being enabled in the binary, even though the option works with other
sources too.
2010-04-25 22:48:10 +03:00
Uoti Urpala 1d4d1bff82 stream_ffmpeg, demux_lavf: Use flv demuxer for rtmp streams
Use lavf's flv demuxer for rtmp/rtmps/... stream types. Letting
generic format probing handle this could work, but with the current
probing implementation it'd at least depend on not-really-guaranteed
details of the stream layer (probing different formats and then
decoding depends on seeking back in between; rtmp streams don't
support such seeking directly so would need to rely on details of
caching behavior).
2010-04-23 22:57:25 +03:00
Uoti Urpala 0269d22d32 Merge svn changes up to r30876 2010-03-10 03:18:42 +02:00
Uoti Urpala 4857965118 Merge svn changes up to r30815 2010-03-10 02:36:35 +02:00
Uoti Urpala bc1d0ca37d Merge svn changes up to r30798 2010-03-10 02:35:02 +02:00
Uoti Urpala e74708f619 Merge svn changes up to r30748 2010-03-10 01:50:55 +02:00
Uoti Urpala 194efde18f Merge svn changes up to r30702 2010-03-10 01:08:50 +02:00
Uoti Urpala 0dce155dd3 Merge svn changes up to r30694 2010-03-10 01:01:15 +02:00
Uoti Urpala 327463be52 Merge svn changes up to r30672 2010-03-10 00:34:16 +02:00
Uoti Urpala 12d3caebc7 Merge svn changes up to r30475 2010-03-09 19:18:43 +02: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
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 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
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 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
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
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
Uoti Urpala a0f08fbebb stream: improve EOF handling in seeks
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>.
2010-01-18 14:38:56 +02:00
Uoti Urpala 852570d342 Merge svn changes up to r30216 2010-01-08 02:39:39 +02:00
diego 00ad5d3fed Add a few missing header #includes and #defines.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30207 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-01-04 18:58:35 +00:00
Uoti Urpala 5995bc175a Merge svn changes up to r29962 2009-11-23 01:56:21 +02:00
reimar af2988cbce Finally rename the STREAM_SEEK define to MP_STREAM_SEEK, there are just too many
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
2009-11-22 15:18:21 +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
Uoti Urpala 0eb321bf2c Remove trailing whitespace from most files 2009-07-07 02:34:35 +03: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
Uoti Urpala 186e5a998c Merge svn changes up to r28641
Convert vo_x11_border (used in vo_gl/gl2 though the vo_gl_border
macro) to use a wrapper macro in old-style VOs which do not provide a
VO object argument. Before this function had an explicit global_vo
argument in vo_gl/gl2. New vo_vdpau uses it too so use the same
mechanism as most other functions.
2009-02-18 01:45:36 +02:00
diego 1b915e419e Replace double semicolon by single semicolon.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28611 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-02-16 02:00:29 +00:00
Uoti Urpala 0301309425 Merge svn changes up to 27824
Conflicts:
	cfg-common-opts.h
	libmpcodecs/dec_video.c
	libmpcodecs/vd.c
	libvo/x11_common.h
	mplayer.c
	stream/cache2.c
2008-10-25 05:12:34 +03:00