X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fvideo_content_scale.cc;h=137d78ad2ff7a9a2629c009bb278c495f60a8d3c;hb=232ddcc9892a7dfd54efa7533c27c4cfdf71bffd;hp=a1673d3deafc58ae84950eec58314783eaf14ac4;hpb=3828baf56467224f5d44049bf1e7a7ed11f43a05;p=dcpomatic.git diff --git a/src/lib/video_content_scale.cc b/src/lib/video_content_scale.cc index a1673d3de..137d78ad2 100644 --- a/src/lib/video_content_scale.cc +++ b/src/lib/video_content_scale.cc @@ -1,5 +1,5 @@ /* - Copyright (C) 2013-2015 Carl Hetherington + Copyright (C) 2013-2018 Carl Hetherington This file is part of DCP-o-matic. @@ -21,7 +21,6 @@ #include "video_content_scale.h" #include "video_content.h" #include "ratio.h" -#include "safe_stringstream.h" #include "util.h" #include #include @@ -85,22 +84,18 @@ VideoContentScale::as_xml (xmlpp::Node* node) const string VideoContentScale::id () const { - SafeStringStream s; - if (_ratio) { - s << _ratio->id (); - } else { - s << (_scale ? "S1" : "S0"); + return _ratio->id (); } - return s.str (); + return (_scale ? "S1" : "S0"); } string VideoContentScale::name () const { if (_ratio) { - return _ratio->nickname (); + return _ratio->image_nickname (); } if (_scale) { @@ -110,21 +105,6 @@ VideoContentScale::name () const return _("No scale"); } -VideoContentScale -VideoContentScale::from_id (string id) -{ - Ratio const * r = Ratio::from_id (id); - if (r) { - return VideoContentScale (r); - } - - if (id == "S0") { - return VideoContentScale (false); - } - - return VideoContentScale (true); -} - /** @param display_container Size of the container that we are displaying this content in. * @param film_container The size of the film's image. */