summaryrefslogtreecommitdiff
path: root/src/lib/subtitle_content.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/subtitle_content.h')
-rw-r--r--src/lib/subtitle_content.h14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/lib/subtitle_content.h b/src/lib/subtitle_content.h
index 388637688..b73119bdb 100644
--- a/src/lib/subtitle_content.h
+++ b/src/lib/subtitle_content.h
@@ -28,21 +28,28 @@ public:
static int const SUBTITLE_X_OFFSET;
static int const SUBTITLE_Y_OFFSET;
static int const SUBTITLE_SCALE;
+ static int const SUBTITLE_USE;
};
class SubtitleContent : public virtual Content
{
public:
SubtitleContent (boost::shared_ptr<const Film>, boost::filesystem::path);
- SubtitleContent (boost::shared_ptr<const Film>, boost::shared_ptr<const cxml::Node>, int version);
+ SubtitleContent (boost::shared_ptr<const Film>, cxml::ConstNodePtr, int version);
SubtitleContent (boost::shared_ptr<const Film>, std::vector<boost::shared_ptr<Content> >);
-
+
void as_xml (xmlpp::Node *) const;
+ void set_subtitle_use (bool);
void set_subtitle_x_offset (double);
void set_subtitle_y_offset (double);
void set_subtitle_scale (double);
+ bool subtitle_use () const {
+ boost::mutex::scoped_lock lm (_mutex);
+ return _subtitle_use;
+ }
+
double subtitle_x_offset () const {
boost::mutex::scoped_lock lm (_mutex);
return _subtitle_x_offset;
@@ -57,10 +64,11 @@ public:
boost::mutex::scoped_lock lm (_mutex);
return _subtitle_scale;
}
-
+
private:
friend class ffmpeg_pts_offset_test;
+ bool _subtitle_use;
/** x offset for placing subtitles, as a proportion of the container width;
* +ve is further right, -ve is further left.
*/