From e5a9b792ecf08ddbcf3b674de3a00f7a919d1858 Mon Sep 17 00:00:00 2001 From: wm4 Date: Thu, 7 Nov 2019 15:54:34 +0100 Subject: 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. --- stream/stream.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'stream/stream.h') 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 -- cgit v1.2.3