summaryrefslogtreecommitdiffstats
path: root/demux/demux.h
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-09-08 06:32:48 +0200
committerwm4 <wm4@nowhere>2013-09-08 06:32:48 +0200
commitba07000b886802909a52810568705897d600263a (patch)
tree5ea7bded083ba092999466b36985307f6a25d8a3 /demux/demux.h
parent1aae5981a7165f5236a9f3a1518ab2b6f7c7eae9 (diff)
downloadmpv-ba07000b886802909a52810568705897d600263a.tar.bz2
mpv-ba07000b886802909a52810568705897d600263a.tar.xz
demux: refactor tag handling
Make the code somewhat reuseable, instead of bound to a single demuxer instance. The plan is to add support for per-chapter tags later.
Diffstat (limited to 'demux/demux.h')
-rw-r--r--demux/demux.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/demux/demux.h b/demux/demux.h
index 6976982e15..00758ea012 100644
--- a/demux/demux.h
+++ b/demux/demux.h
@@ -111,6 +111,12 @@ typedef struct demuxer_desc {
int (*control)(struct demuxer *demuxer, int cmd, void *arg);
} demuxer_desc_t;
+struct mp_tags {
+ char **keys;
+ char **values;
+ int num_keys;
+};
+
typedef struct demux_chapter
{
int original_index;
@@ -185,8 +191,9 @@ typedef struct demuxer {
// If the file is a playlist file
struct playlist *playlist;
+ struct mp_tags *metadata;
+
void *priv; // demuxer-specific internal data
- char **info; // metadata
struct MPOpts *opts;
struct demuxer_params *params;
} demuxer_t;
@@ -282,4 +289,9 @@ double demux_packet_list_duration(struct demux_packet **pkts, int num_pkts);
struct demux_packet *demux_packet_list_fill(struct demux_packet **pkts,
int num_pkts, int *current);
+void mp_tags_set_str(struct mp_tags *tags, const char *key, const char *value);
+void mp_tags_set_bstr(struct mp_tags *tags, bstr key, bstr value);
+char *mp_tags_get_str(struct mp_tags *tags, const char *key);
+char *mp_tags_get_bstr(struct mp_tags *tags, bstr key);
+
#endif /* MPLAYER_DEMUXER_H */