summaryrefslogtreecommitdiffstats
path: root/stream/stream.h
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2019-11-07 15:28:50 +0100
committerwm4 <wm4@nowhere>2019-11-07 22:53:13 +0100
commitd3479018db4c8d61b2dca497a547615f02c2a42d (patch)
treefcedb02bdd42538337d540311bca4fe4c852f089 /stream/stream.h
parentf850d82e656a9add1bd286f901f18c5213580606 (diff)
downloadmpv-d3479018db4c8d61b2dca497a547615f02c2a42d.tar.bz2
mpv-d3479018db4c8d61b2dca497a547615f02c2a42d.tar.xz
stream: change buffer argument types from char* to void*
This is slightly better, although not much, and ultimately doesn't matter. The public API in stream_cb.h also uses char*, but can't change that.
Diffstat (limited to 'stream/stream.h')
-rw-r--r--stream/stream.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/stream/stream.h b/stream/stream.h
index 61c5e12303..081313cdc8 100644
--- a/stream/stream.h
+++ b/stream/stream.h
@@ -110,9 +110,9 @@ typedef struct stream {
const struct stream_info_st *info;
// Read
- int (*fill_buffer)(struct stream *s, char *buffer, int max_len);
+ int (*fill_buffer)(struct stream *s, void *buffer, int max_len);
// Write
- int (*write_buffer)(struct stream *s, char *buffer, int len);
+ int (*write_buffer)(struct stream *s, void *buffer, int len);
// Seek
int (*seek)(struct stream *s, int64_t pos);
// Control
@@ -177,7 +177,7 @@ typedef struct stream {
// Non-inline version of stream_read_char().
int stream_read_char_fallback(stream_t *s);
-int stream_write_buffer(stream_t *s, unsigned char *buf, int len);
+int stream_write_buffer(stream_t *s, void *buf, int len);
inline static int stream_read_char(stream_t *s)
{
@@ -195,9 +195,9 @@ inline static int64_t stream_tell(stream_t *s)
bool stream_skip(stream_t *s, int64_t len);
bool stream_seek(stream_t *s, int64_t pos);
-int stream_read(stream_t *s, char *mem, int total);
-int stream_read_partial(stream_t *s, char *buf, int buf_size);
-int stream_read_peek(stream_t *s, void* buf, int buf_size);
+int stream_read(stream_t *s, void *mem, int total);
+int stream_read_partial(stream_t *s, void *buf, int buf_size);
+int stream_read_peek(stream_t *s, void *buf, int buf_size);
void stream_drop_buffers(stream_t *s);
int64_t stream_get_size(stream_t *s);