diff options
author | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2010-10-27 19:04:04 +0000 |
---|---|---|
committer | Uoti Urpala <uau@glyph.nonexistent.invalid> | 2010-11-07 21:46:22 +0200 |
commit | f94717cdc4dfb35ac8dc3b5d593f6e523fdd621e (patch) | |
tree | 596d9111d6cf4f35eddeef339097d06f1ec417a0 /stream/stream.h | |
parent | c6fb4e2aa2f5a16aaa35411201c600c8ae801c38 (diff) | |
download | mpv-f94717cdc4dfb35ac8dc3b5d593f6e523fdd621e.tar.bz2 mpv-f94717cdc4dfb35ac8dc3b5d593f6e523fdd621e.tar.xz |
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
Diffstat (limited to 'stream/stream.h')
-rw-r--r-- | stream/stream.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/stream/stream.h b/stream/stream.h index 8e4b260ffb..6d56e2adab 100644 --- a/stream/stream.h +++ b/stream/stream.h @@ -344,6 +344,10 @@ void stream_set_interrupt_callback(int (*cb)(struct input_ctx*, int), /// Call the interrupt checking callback if there is one and /// wait for time milliseconds int stream_check_interrupt(int time); +/// Internal read function bypassing the stream buffer +int stream_read_internal(stream_t *s, void *buf, int len); +/// Internal seek function bypassing the stream buffer +int stream_seek_internal(stream_t *s, off_t newpos); extern int bluray_angle; extern int bluray_chapter; |