summaryrefslogtreecommitdiffstats
path: root/demux/demux.h
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-09-08 07:42:05 +0200
committerwm4 <wm4@nowhere>2013-09-08 07:43:23 +0200
commit35fd083828a57eb7ae995bd081dad88a8d64f75d (patch)
treeb6f377dceee9ad4f888bb44d0842a00fc4ee3d04 /demux/demux.h
parentba07000b886802909a52810568705897d600263a (diff)
downloadmpv-35fd083828a57eb7ae995bd081dad88a8d64f75d.tar.bz2
mpv-35fd083828a57eb7ae995bd081dad88a8d64f75d.tar.xz
demux: retrieve per-chapter metadata
Retrieve per-chapter metadata, but don't do much with it. We just make the metadata of the _current_ chapter available as chapter-metadata property. Returning the full chapter list with metadata would be no problem, except that the property interface isn't really good with structured data, so it's not available for now. Not sure if it's worth it, but it was requested via github issue #201.
Diffstat (limited to 'demux/demux.h')
-rw-r--r--demux/demux.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/demux/demux.h b/demux/demux.h
index 00758ea012..c42c964fa9 100644
--- a/demux/demux.h
+++ b/demux/demux.h
@@ -122,6 +122,8 @@ typedef struct demux_chapter
int original_index;
uint64_t start, end;
char *name;
+ struct mp_tags *metadata;
+ uint64_t demuxer_id; // for mapping to internal demuxer data structures
} demux_chapter_t;
struct matroska_data {
@@ -253,7 +255,9 @@ void demuxer_help(void);
int demuxer_add_attachment(struct demuxer *demuxer, struct bstr name,
struct bstr type, struct bstr data);
int demuxer_add_chapter(struct demuxer *demuxer, struct bstr name,
- uint64_t start, uint64_t end);
+ uint64_t start, uint64_t end, uint64_t demuxer_id);
+void demuxer_add_chapter_info(struct demuxer *demuxer, uint64_t demuxer_id,
+ bstr key, bstr value);
int demuxer_seek_chapter(struct demuxer *demuxer, int chapter,
double *seek_pts);
void demuxer_sort_chapters(demuxer_t *demuxer);