summaryrefslogtreecommitdiff
path: root/src/lib/util.h
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2013-01-17 21:30:16 +0000
committerCarl Hetherington <cth@carlh.net>2013-01-17 21:30:16 +0000
commit39c65e47432c76a4e34aaea5317bd7362409aed0 (patch)
tree5bacc1d631de0a2b7f0aa492ddaf05a65e06d97c /src/lib/util.h
parent3882d34aed9dee417ceed93bf0bf5372b3970ff6 (diff)
Try to tidy up frame indexing; use DCP length obtained from the transcode to make the DCP.
Diffstat (limited to 'src/lib/util.h')
-rw-r--r--src/lib/util.h34
1 files changed, 4 insertions, 30 deletions
diff --git a/src/lib/util.h b/src/lib/util.h
index 1fd2c0150..c4940a5d7 100644
--- a/src/lib/util.h
+++ b/src/lib/util.h
@@ -29,6 +29,7 @@
#include <vector>
#include <boost/shared_ptr.hpp>
#include <boost/asio.hpp>
+#include <libdcp/util.h>
extern "C" {
#include <libavcodec/avcodec.h>
#include <libavfilter/avfilter.h>
@@ -99,33 +100,6 @@ enum ContentType {
VIDEO ///< content is a video
};
-/** @class Size
- * @brief Representation of the size of something */
-struct Size
-{
- /** Construct a zero Size */
- Size ()
- : width (0)
- , height (0)
- {}
-
- /** @param w Width.
- * @param h Height.
- */
- Size (int w, int h)
- : width (w)
- , height (h)
- {}
-
- /** width */
- int width;
- /** height */
- int height;
-};
-
-extern bool operator== (Size const & a, Size const & b);
-extern bool operator!= (Size const & a, Size const & b);
-
/** @struct Crop
* @brief A description of the crop of an image or video.
*/
@@ -195,14 +169,14 @@ struct Rect
return Position (x, y);
}
- Size size () const {
- return Size (width, height);
+ libdcp::Size size () const {
+ return libdcp::Size (width, height);
}
Rect intersection (Rect const & other) const;
};
-extern std::string crop_string (Position, Size);
+extern std::string crop_string (Position, libdcp::Size);
extern int dcp_audio_sample_rate (int);
extern int dcp_audio_channels (int);
extern std::string colour_lut_index_to_name (int index);