summaryrefslogtreecommitdiffstats
path: root/demux/demux.h
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2017-06-20 13:57:58 +0200
committerwm4 <wm4@nowhere>2017-06-20 14:22:10 +0200
commit1890529857a3b963df476f53ca41faacab48a6d2 (patch)
treecad31a2b753e5aa2040dd8d8d8adc34ececebea0 /demux/demux.h
parent5bfbe6dfde01704979dd086d5184ea2e697cb510 (diff)
downloadmpv-1890529857a3b963df476f53ca41faacab48a6d2.tar.bz2
mpv-1890529857a3b963df476f53ca41faacab48a6d2.tar.xz
demux: get rid of DEMUXER_CTRL_GET_TIME_LENGTH
Similar purpose as f34e1a0deea45e. Somehow this is much more natural too, and needs less code. This breaks runtime updates to duration. This could easily be fixed, but no important demuxer does this anyway. Only demux_raw and demux_disc might (the latter for BD/DVD). For the latter it might actually have some importance when changing titles at runtime (I guess?), but guess what, I don't care.
Diffstat (limited to 'demux/demux.h')
-rw-r--r--demux/demux.h4
1 files changed, 1 insertions, 3 deletions
diff --git a/demux/demux.h b/demux/demux.h
index b1b83b3156..d3eed2bd28 100644
--- a/demux/demux.h
+++ b/demux/demux.h
@@ -32,7 +32,6 @@
enum demux_ctrl {
DEMUXER_CTRL_SWITCHED_TRACKS = 1,
- DEMUXER_CTRL_GET_TIME_LENGTH,
DEMUXER_CTRL_RESYNC,
DEMUXER_CTRL_IDENTIFY_PROGRAM,
DEMUXER_CTRL_STREAM_CTRL,
@@ -175,6 +174,7 @@ typedef struct demuxer {
bool seekable;
bool partially_seekable; // true if _maybe_ seekable; implies seekable=true
double start_time;
+ double duration; // -1 if unknown
// File format allows PTS resets (even if the current file is without)
bool ts_resets_possible;
// The file data was fully read, and there is no need to keep the stream
@@ -280,8 +280,6 @@ int demuxer_add_chapter(demuxer_t *demuxer, char *name,
void demux_set_stream_tags(struct demuxer *demuxer, struct sh_stream *sh,
struct mp_tags *tags);
-double demuxer_get_time_length(struct demuxer *demuxer);
-
int demux_stream_control(demuxer_t *demuxer, int ctrl, void *arg);
void demux_changed(demuxer_t *demuxer, int events);