diff options
author | wm4 <wm4@nowhere> | 2019-11-07 15:54:34 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2019-11-07 22:53:13 +0100 |
commit | e5a9b792ecf08ddbcf3b674de3a00f7a919d1858 (patch) | |
tree | ead751b12d006d13f138867324b62dda62b8e77b /stream/stream.h | |
parent | ca75fedaf4dea19986159f1caa5ab9ebc202f9d4 (diff) | |
download | mpv-e5a9b792ecf08ddbcf3b674de3a00f7a919d1858.tar.bz2 mpv-e5a9b792ecf08ddbcf3b674de3a00f7a919d1858.tar.xz |
stream: replace STREAM_CTRL_GET_SIZE with a proper entrypoint
This is overlay convoluted as a stream control, and important enough to
warrant "first class" functionality.
Diffstat (limited to 'stream/stream.h')
-rw-r--r-- | stream/stream.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/stream/stream.h b/stream/stream.h index 081313cdc8..55db9c1314 100644 --- a/stream/stream.h +++ b/stream/stream.h @@ -48,8 +48,6 @@ #define STREAM_OK 1 enum stream_ctrl { - STREAM_CTRL_GET_SIZE = 1, - // Certain network protocols STREAM_CTRL_AVSEEK, STREAM_CTRL_HAS_AVSEEK, @@ -115,6 +113,8 @@ typedef struct stream { int (*write_buffer)(struct stream *s, void *buffer, int len); // Seek int (*seek)(struct stream *s, int64_t pos); + // Total stream size in bytes (negative if unavailable) + int64_t (*get_size)(struct stream *s); // Control int (*control)(struct stream *s, int cmd, void *arg); // Close |