summaryrefslogtreecommitdiffstats
path: root/demux/demux.h
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-06-22 02:09:52 +0200
committerwm4 <wm4@nowhere>2013-06-25 00:11:56 +0200
commitcfa45c40dc0cfe44b699029168b62d4d3e16c288 (patch)
tree5a80d3b6e82711a5816c509e803c029b93342892 /demux/demux.h
parent1bfae45a88ac7c24b74a6f7ca6eb4aa27d20c653 (diff)
downloadmpv-cfa45c40dc0cfe44b699029168b62d4d3e16c288.tar.bz2
mpv-cfa45c40dc0cfe44b699029168b62d4d3e16c288.tar.xz
sub: add demux_libass wrapper, drop old hacks
demux_libass.c allows us to make subtitle format detection part of the normal file loading process. libass has no probe function, but trying to load the start of a file (the first 4 KB) is good enough. Hope that libass can even handle random binary input gracefully without printing stupid log messages, and that the libass parser doesn't accept too many non-ASS files as input. This doesn't handle the -subcp option correctly yet. This will be fixed later.
Diffstat (limited to 'demux/demux.h')
-rw-r--r--demux/demux.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/demux/demux.h b/demux/demux.h
index 9c10ca0201..f49a236b80 100644
--- a/demux/demux.h
+++ b/demux/demux.h
@@ -72,13 +72,13 @@ enum demuxer_type {
DEMUXER_TYPE_EDL,
DEMUXER_TYPE_CUE,
DEMUXER_TYPE_SUBREADER,
+ DEMUXER_TYPE_LIBASS,
/* Values after this are for internal use and can not be selected
* as demuxer type by the user (-demuxer option). */
DEMUXER_TYPE_END,
DEMUXER_TYPE_PLAYLIST,
- DEMUXER_TYPE_SUB,
};
enum timestamp_type {
@@ -217,6 +217,7 @@ struct demuxer_params {
unsigned char (*matroska_wanted_uids)[16];
int matroska_wanted_segment;
bool *matroska_was_valid;
+ struct ass_library *ass_library;
};
typedef struct demuxer {
@@ -307,9 +308,6 @@ static inline void *realloc_struct(void *ptr, size_t nmemb, size_t size)
return realloc(ptr, nmemb * size);
}
-demuxer_t *new_sub_pseudo_demuxer(struct MPOpts *opts);
-
-
void free_demuxer(struct demuxer *demuxer);
int demuxer_add_packet(demuxer_t *demuxer, struct sh_stream *stream,