summaryrefslogtreecommitdiff
path: root/src/lib/ffmpeg_subtitle_stream.h
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2016-02-01 00:26:37 +0000
committerCarl Hetherington <cth@carlh.net>2016-02-01 00:26:37 +0000
commit22873931f874a87fcf6a0077eddbec0f97eb3423 (patch)
treecabf1595fd8814e62730e8d846ca4288682d5cdd /src/lib/ffmpeg_subtitle_stream.h
parent030c74f085718ea276c6e55a7a7c7de267a9ebf3 (diff)
Subtitle "to" times used to be stored against their "from" times.
Sadly an example shows that from times are not unique. This patch uses a hash of stuff from the first AVSubtitle as the key.
Diffstat (limited to 'src/lib/ffmpeg_subtitle_stream.h')
-rw-r--r--src/lib/ffmpeg_subtitle_stream.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/lib/ffmpeg_subtitle_stream.h b/src/lib/ffmpeg_subtitle_stream.h
index 0809b359a..6cd5318d0 100644
--- a/src/lib/ffmpeg_subtitle_stream.h
+++ b/src/lib/ffmpeg_subtitle_stream.h
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2013-2015 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2013-2016 Carl Hetherington <cth@carlh.net>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -27,15 +27,15 @@ public:
: FFmpegStream (n, i)
{}
- FFmpegSubtitleStream (cxml::ConstNodePtr);
+ FFmpegSubtitleStream (cxml::ConstNodePtr, int version);
void as_xml (xmlpp::Node *) const;
- void add_subtitle (ContentTimePeriod period);
+ void add_subtitle (std::string id, ContentTimePeriod period);
std::list<ContentTimePeriod> subtitles_during (ContentTimePeriod period, bool starting) const;
- ContentTime find_subtitle_to (ContentTime from) const;
+ ContentTime find_subtitle_to (std::string id) const;
void add_offset (ContentTime offset);
private:
- std::map<ContentTime, ContentTime> _subtitles;
+ std::map<std::string, ContentTimePeriod> _subtitles;
};