summaryrefslogtreecommitdiffstats
path: root/demux/demux.h
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2016-08-12 21:39:32 +0200
committerwm4 <wm4@nowhere>2016-08-12 21:39:32 +0200
commitb9ba9a898a9354b52c2154e25a0b5afcb359c5b1 (patch)
tree17c2ff9e075b26165de788e469fe40b44b2bfaba /demux/demux.h
parente2a54bb1ca319652b8c742877a313e378b24e407 (diff)
downloadmpv-b9ba9a898a9354b52c2154e25a0b5afcb359c5b1.tar.bz2
mpv-b9ba9a898a9354b52c2154e25a0b5afcb359c5b1.tar.xz
demux: add per-track metadata
...and ignore it. The main purpose is for retrieving per-track replaygain tags. Other than that per-track tags are not used or accessed by the playback core yet. The demuxer infrastructure is still not really good with that whole synchronization thing (at least in part due to being inherited from mplayer's single-threaded architecture). A convoluted mechanism is needed to transport the tags from demuxer thread to user thread. Two factors contribute to the complexity: tags can change during playback, and tracks (i.e. struct sh_stream) are not duplicated per thread. In particular, we update the way replaygain tags are retrieved. We first try to use per-track tags (common in Matroska) and global tags (effectively formats like mp3). This part fixes #3405.
Diffstat (limited to 'demux/demux.h')
-rw-r--r--demux/demux.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/demux/demux.h b/demux/demux.h
index 8470047f9d..07803d2838 100644
--- a/demux/demux.h
+++ b/demux/demux.h
@@ -210,7 +210,10 @@ typedef struct demuxer {
struct mp_log *log, *glog;
struct demuxer_params *params;
- struct demux_internal *in; // internal to demux.c
+ // internal to demux.c
+ struct demux_internal *in;
+ struct mp_tags **update_stream_tags;
+ int num_update_stream_tags;
// Since the demuxer can run in its own thread, and the stream is not
// thread-safe, only the demuxer is allowed to access the stream directly.
@@ -273,6 +276,8 @@ int demuxer_add_attachment(struct demuxer *demuxer, char *name,
char *type, void *data, size_t data_size);
int demuxer_add_chapter(demuxer_t *demuxer, char *name,
double pts, uint64_t demuxer_id);
+void demux_set_stream_tags(struct demuxer *demuxer, struct sh_stream *sh,
+ struct mp_tags *tags);
double demuxer_get_time_length(struct demuxer *demuxer);