summaryrefslogtreecommitdiffstats
path: root/core/mp_core.h
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-06-04 00:29:29 +0200
committerwm4 <wm4@nowhere>2013-06-04 00:29:44 +0200
commit92ae48db0f91fbfcfbb1722fa81c922808f62d5a (patch)
treee32fe21b5f8c11ada7788768a76e2d9f7d061c66 /core/mp_core.h
parentdaf8ed831b4ae63cf0931cc3d6727956137f865f (diff)
parentc1ac97b99b3e80bbf84ed540178dd6689ead0b87 (diff)
downloadmpv-92ae48db0f91fbfcfbb1722fa81c922808f62d5a.tar.bz2
mpv-92ae48db0f91fbfcfbb1722fa81c922808f62d5a.tar.xz
Merge branch 'sub_mess'
This branch heavily refactors the subtitle code (both loading and rendering), and adds support for a few new formats through FFmpeg. We don't remove any of the old code yet. There are still some subtleties related to subreader.c to be resolved: code page detection & conversion, timing post-processing, UTF-16 subtitle support, support for the -subfps option. Also, SRT reading and loading ASS via libass should be turned into proper demuxers. (SRT is needed because Libav's is gravely broken, and we want ASS loading via libass to cover full libass format support. Both should be demuxers which are probed _before_ libavformat, so that all subtitles can be loaded through the demuxer infrastructure, and libavformat subtitles don't need to be treated in a special way.)
Diffstat (limited to 'core/mp_core.h')
-rw-r--r--core/mp_core.h17
1 files changed, 3 insertions, 14 deletions
diff --git a/core/mp_core.h b/core/mp_core.h
index 9e61c8ffa3..d7aa42e38d 100644
--- a/core/mp_core.h
+++ b/core/mp_core.h
@@ -22,8 +22,6 @@
#include <stdbool.h>
#include "core/options.h"
-#include "sub/subreader.h"
-#include "sub/find_subfiles.h"
#include "audio/mixer.h"
#include "demux/demux.h"
@@ -33,7 +31,6 @@
#define INITIALIZED_AO 2
#define INITIALIZED_VOL 4
#define INITIALIZED_GETCH2 8
-#define INITIALIZED_SPUDEC 32
#define INITIALIZED_STREAM 64
#define INITIALIZED_DEMUXER 512
#define INITIALIZED_ACODEC 1024
@@ -106,15 +103,9 @@ struct track {
// Invariant: (!demuxer && !stream) || stream->demuxer == demuxer
struct sh_stream *stream;
- // NOTE: demuxer subtitles, i.e. if stream!=NULL, do not use the following
- // fields. The data is stored in stream->sub this case.
-
- // External text subtitle using libass subtitle renderer.
- // The sh_sub is a dummy and doesn't belong to a demuxer.
- struct sh_sub *sh_sub;
-
- // External text subtitle using non-libass subtitle renderer.
- struct sub_data *subdata;
+ // For external subtitles, which are read fully on init. Do not attempt
+ // to read packets from them.
+ bool preloaded;
};
enum {
@@ -129,7 +120,6 @@ typedef struct MPContext {
struct osd_state *osd;
struct mp_osd_msg *osd_msg_stack;
char *terminal_osd_text;
- subtitle subs; // subtitle list used when reading subtitles from demuxer
int add_osd_seek_info; // bitfield of enum mp_osd_seek_info
double osd_visible; // for the osd bar only
@@ -299,7 +289,6 @@ extern int forced_subs_only;
void uninit_player(struct MPContext *mpctx, unsigned int mask);
void reinit_audio_chain(struct MPContext *mpctx);
-void init_vo_spudec(struct MPContext *mpctx);
double playing_audio_pts(struct MPContext *mpctx);
struct track *mp_add_subtitles(struct MPContext *mpctx, char *filename,
float fps, int noerr);