diff options
author | wm4 <wm4@nowhere> | 2013-11-19 22:26:35 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2013-11-19 22:39:04 +0100 |
commit | 04bdd7af72aa9ab5aa81e38ca85d3f40e76f16d4 (patch) | |
tree | 583e217b7f1b678e8911fcc897529ff8d6faeec2 /stream | |
parent | 50837129b231ae9a811abac2767af5fa6ced621b (diff) | |
download | mpv-04bdd7af72aa9ab5aa81e38ca85d3f40e76f16d4.tar.bz2 mpv-04bdd7af72aa9ab5aa81e38ca85d3f40e76f16d4.tar.xz |
timeline: add edl:// URIs
Questionable change from user perspective, but internally needed to
implement the next commit. Also useful for testing timeline stuff.
Diffstat (limited to 'stream')
-rw-r--r-- | stream/stream.c | 2 | ||||
-rw-r--r-- | stream/stream.h | 1 | ||||
-rw-r--r-- | stream/stream_edl.c | 21 |
3 files changed, 24 insertions, 0 deletions
diff --git a/stream/stream.c b/stream/stream.c index 3844721346..3febfa4189 100644 --- a/stream/stream.c +++ b/stream/stream.c @@ -78,6 +78,7 @@ extern const stream_info_t stream_info_dvd; extern const stream_info_t stream_info_bluray; extern const stream_info_t stream_info_rar_filter; extern const stream_info_t stream_info_rar_entry; +extern const stream_info_t stream_info_edl; static const stream_info_t *const stream_list[] = { #if HAVE_VCD @@ -114,6 +115,7 @@ static const stream_info_t *const stream_list[] = { &stream_info_memory, &stream_info_null, &stream_info_mf, + &stream_info_edl, &stream_info_rar_filter, &stream_info_rar_entry, &stream_info_file, diff --git a/stream/stream.h b/stream/stream.h index 651aa9a310..e4864f81b1 100644 --- a/stream/stream.h +++ b/stream/stream.h @@ -43,6 +43,7 @@ enum streamtype { STREAMTYPE_PVR, STREAMTYPE_TV, STREAMTYPE_MF, + STREAMTYPE_EDL, STREAMTYPE_AVDEVICE, }; diff --git a/stream/stream_edl.c b/stream/stream_edl.c new file mode 100644 index 0000000000..8f9c5a90af --- /dev/null +++ b/stream/stream_edl.c @@ -0,0 +1,21 @@ +// Dummy stream implementation to enable demux_edl, which is in turn a +// dummy demuxer implementation to enable tl_edl. + +#include "stream.h" + +static int s_open (struct stream *stream, int mode) +{ + if (mode != STREAM_READ) + return STREAM_ERROR; + + stream->type = STREAMTYPE_EDL; + stream->demuxer = "edl"; + + return STREAM_OK; +} + +const stream_info_t stream_info_edl = { + .name = "edl", + .open = s_open, + .protocols = (const char*[]){"edl", NULL}, +}; |