Compute offset as we go rather than once every pass().
[dcpomatic.git] / src / lib / content.cc
index ff35eeab73969c49b39386f386660e3a2f464395..7afbf924f63912c5631caf1a8b138583ad3ca616 100644 (file)
@@ -1,19 +1,20 @@
 /*
     Copyright (C) 2013-2015 Carl Hetherington <cth@carlh.net>
 
-    This program is free software; you can redistribute it and/or modify
+    This file is part of DCP-o-matic.
+
+    DCP-o-matic is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
     the Free Software Foundation; either version 2 of the License, or
     (at your option) any later version.
 
-    This program is distributed in the hope that it will be useful,
+    DCP-o-matic is distributed in the hope that it will be useful,
     but WITHOUT ANY WARRANTY; without even the implied warranty of
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     GNU General Public License for more details.
 
     You should have received a copy of the GNU General Public License
-    along with this program; if not, write to the Free Software
-    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+    along with DCP-o-matic.  If not, see <http://www.gnu.org/licenses/>.
 
 */
 
@@ -338,3 +339,13 @@ Content::active_video_frame_rate () const
        DCPOMATIC_ASSERT (film);
        return film->active_frame_rate_change(position()).source;
 }
+
+void
+Content::add_properties (list<UserProperty>& p) const
+{
+       p.push_back (UserProperty (_("General"), _("Filename"), path(0).string ()));
+
+       if (_video_frame_rate) {
+               p.push_back (UserProperty (_("General"), _("Video frame rate"), raw_convert<string> (_video_frame_rate.get(), 5), _("frames per second")));
+       }
+}