diff options
author | wm4 <wm4@nowhere> | 2014-07-05 16:45:56 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2014-07-05 17:07:14 +0200 |
commit | 7e209185f1fa804dda4474de7246a4d85418315e (patch) | |
tree | ee709c1236297a8757186907f8236315d979d02e /demux/demux.h | |
parent | 58880c00eeca254a5391dd61a920081bb16bc2c1 (diff) |
demux, stream: change metadata notification
(Again.)
This time, we simply make it event-based, as it should be. This is done
for both demuxer metadata and stream metadata.
For some ogg-over-icy streams, 2 updates are reported on stream start.
This is because libavformat reports an update right on start, while
including the same info in the "static" metadata. I don't know if that's
a bug or a feature.
Diffstat (limited to 'demux/demux.h')
-rw-r--r-- | demux/demux.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/demux/demux.h b/demux/demux.h index df1762eb08..3929e23c94 100644 --- a/demux/demux.h +++ b/demux/demux.h @@ -87,6 +87,10 @@ enum demux_check { DEMUX_CHECK_NORMAL, // normal, safe detection }; +enum demux_event { + DEMUX_EVENT_METADATA = (1 << 0), +}; + #define MAX_SH_STREAMS 256 struct demuxer; @@ -181,6 +185,9 @@ typedef struct demuxer { bool ts_resets_possible; bool warned_queue_overflow; + // Bitmask of DEMUX_EVENT_* + int events; + struct sh_stream **streams; int num_streams; bool stream_autoselect; @@ -203,7 +210,8 @@ typedef struct demuxer { struct playlist *playlist; struct mp_tags *metadata; - char *previous_metadata; + + struct mp_tags *stream_metadata; void *priv; // demuxer-specific internal data struct MPOpts *opts; |