Some doc improvements.
[libsub.git] / src / time_pair.h
index 85d79e53a11bf9cf6a23f1a91f72d8abf487e8c2..626548077ccad502e12f6a21c94609eb768f0d3a 100644 (file)
 
 */
 
+/** @file  src/time_pair.h
+ *  @brief TimePair class.
+ */
+
 #ifndef LIBSUB_TIME_PAIR_H
 #define LIBSUB_TIME_PAIR_H
 
@@ -32,6 +36,16 @@ namespace sub {
 class TimePair
 {
 public:
+       TimePair () {}
+       
+       TimePair (FrameTime t)
+               : _frame (t)
+       {}
+       
+       TimePair (MetricTime t)
+               : _metric (t)
+       {}
+       
        void set_frame (FrameTime t) {
                _frame = t;
                _metric = boost::optional<MetricTime> ();
@@ -50,8 +64,11 @@ public:
                return _metric;
        }
        
-       FrameTime  frame  (float frames_per_second) const;
-       MetricTime metric (float frames_per_second) const;
+       FrameTime  frame  (float fps) const;
+       MetricTime metric (float fps) const;
+
+       void add (FrameTime t, float fps);
+       void scale (float f, float fps);
 
        bool operator== (TimePair const & other) const;