summaryrefslogtreecommitdiffstats
path: root/demux/demux.h
diff options
context:
space:
mode:
Diffstat (limited to 'demux/demux.h')
-rw-r--r--demux/demux.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/demux/demux.h b/demux/demux.h
index 3a4b7dd331..b8d5cb5ee0 100644
--- a/demux/demux.h
+++ b/demux/demux.h
@@ -111,7 +111,11 @@ typedef struct demuxer_desc {
// Return 0 on success, otherwise -1
int (*open)(struct demuxer *demuxer, enum demux_check check);
// The following functions are all optional
- int (*fill_buffer)(struct demuxer *demuxer); // 0 on EOF, otherwise 1
+ // Try to read a packet. Return false on EOF. If true is returned, the
+ // demuxer may set *pkt to a new packet (the reference goes to the caller).
+ // If *pkt is NULL (the value when this function is called), the call
+ // will be repeated.
+ bool (*read_packet)(struct demuxer *demuxer, struct demux_packet **pkt);
void (*close)(struct demuxer *demuxer);
void (*seek)(struct demuxer *demuxer, double rel_seek_secs, int flags);
int (*control)(struct demuxer *demuxer, int cmd, void *arg);
@@ -252,7 +256,6 @@ struct demux_free_async_state *demux_free_async(struct demuxer *demuxer);
void demux_free_async_force(struct demux_free_async_state *state);
bool demux_free_async_finish(struct demux_free_async_state *state);
-void demux_add_packet(struct sh_stream *stream, demux_packet_t *dp);
void demuxer_feed_caption(struct sh_stream *stream, demux_packet_t *dp);
struct demux_packet *demux_read_packet(struct sh_stream *sh);