From e5d368553b47a566a83d4edce0a8f166db9509e6 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Mon, 27 Jan 2014 12:27:06 +0000 Subject: More tidying. --- src/certificates.h | 1 - src/content.cc | 14 +++++++------- src/kdm.h | 4 ++-- src/lut_cache.h | 2 +- src/mono_picture_mxf_writer.h | 6 +++--- src/object.h | 3 ++- src/signer.h | 2 +- src/sound_frame.h | 5 +++-- src/sound_mxf.cc | 14 +++++++------- src/stereo_picture_frame.cc | 6 +++--- src/stereo_picture_frame.h | 10 ++++++---- src/stereo_picture_mxf_writer.cc | 4 ++-- src/text.h | 6 +++++- src/xml.h | 2 +- src/xyz_frame.cc | 12 ++++++++++++ src/xyz_frame.h | 11 +++++++++-- 16 files changed, 64 insertions(+), 38 deletions(-) (limited to 'src') diff --git a/src/certificates.h b/src/certificates.h index 8cb570c0..96a8cbb7 100644 --- a/src/certificates.h +++ b/src/certificates.h @@ -26,7 +26,6 @@ #undef X509_NAME #include -#include #include #include #include diff --git a/src/content.cc b/src/content.cc index 06e2806d..85988a1a 100644 --- a/src/content.cc +++ b/src/content.cc @@ -17,16 +17,16 @@ */ -#include -#include -#include -#include -#include -#include "AS_DCP.h" -#include "KM_util.h" #include "content.h" #include "util.h" #include "metadata.h" +#include "AS_DCP.h" +#include "KM_util.h" +#include +#include +#include +#include +#include using namespace std; using namespace boost; diff --git a/src/kdm.h b/src/kdm.h index c4bd8c86..02395a72 100644 --- a/src/kdm.h +++ b/src/kdm.h @@ -24,11 +24,11 @@ #ifndef LIBDCP_KDM_H #define LIBDCP_KDM_H +#include "key.h" +#include "metadata.h" #include #include #include -#include "key.h" -#include "metadata.h" class kdm_key_test; diff --git a/src/lut_cache.h b/src/lut_cache.h index 0985a0c0..d1968579 100644 --- a/src/lut_cache.h +++ b/src/lut_cache.h @@ -24,7 +24,7 @@ #include template -class LUTCache +class LUTCache : public boost::noncopyable { public: boost::shared_ptr get (int bit_depth, float gamma) diff --git a/src/mono_picture_mxf_writer.h b/src/mono_picture_mxf_writer.h index 727fc688..a5e0b1b6 100644 --- a/src/mono_picture_mxf_writer.h +++ b/src/mono_picture_mxf_writer.h @@ -17,12 +17,12 @@ */ +#include "picture_mxf_writer.h" +#include +#include #include #include #include -#include -#include -#include "picture_mxf_writer.h" namespace dcp { diff --git a/src/object.h b/src/object.h index 1b99e363..82598c58 100644 --- a/src/object.h +++ b/src/object.h @@ -24,6 +24,7 @@ #ifndef LIBDCP_OBJECT_H #define LIBDCP_OBJECT_H +#include #include namespace dcp { @@ -31,7 +32,7 @@ namespace dcp { /** @class Object * @brief Some part of a DCP that has a UUID. */ -class Object +class Object : public boost::noncopyable { public: Object (); diff --git a/src/signer.h b/src/signer.h index 9ee5852b..32514fb3 100644 --- a/src/signer.h +++ b/src/signer.h @@ -35,7 +35,7 @@ namespace dcp { /** @class Signer * @brief A class which can sign XML files. */ -class Signer +class Signer : public boost::noncopyable { public: /** @param c Certificate chain to sign with. diff --git a/src/sound_frame.h b/src/sound_frame.h index eedfc477..e7b13885 100644 --- a/src/sound_frame.h +++ b/src/sound_frame.h @@ -20,8 +20,9 @@ #ifndef LIBDCP_SOUND_FRAME_H #define LIBDCP_SOUND_FRAME_H -#include +#include #include +#include namespace ASDCP { namespace PCM { @@ -32,7 +33,7 @@ namespace ASDCP { namespace dcp { -class SoundFrame +class SoundFrame : public boost::noncopyable { public: SoundFrame (std::string mxf_path, int n, ASDCP::AESDecContext *); diff --git a/src/sound_mxf.cc b/src/sound_mxf.cc index b97da94a..5ce72b1d 100644 --- a/src/sound_mxf.cc +++ b/src/sound_mxf.cc @@ -21,18 +21,18 @@ * @brief An asset made up of WAV files */ -#include -#include -#include -#include -#include -#include "KM_fileio.h" -#include "AS_DCP.h" #include "sound_mxf.h" #include "util.h" #include "exceptions.h" #include "sound_frame.h" #include "sound_mxf_writer.h" +#include "KM_fileio.h" +#include "AS_DCP.h" +#include +#include +#include +#include +#include using std::string; using std::stringstream; diff --git a/src/stereo_picture_frame.cc b/src/stereo_picture_frame.cc index b21c7902..f894281e 100644 --- a/src/stereo_picture_frame.cc +++ b/src/stereo_picture_frame.cc @@ -17,9 +17,6 @@ */ -#include -#include "AS_DCP.h" -#include "KM_fileio.h" #include "stereo_picture_frame.h" #include "exceptions.h" #include "argb_frame.h" @@ -27,6 +24,9 @@ #include "util.h" #include "gamma_lut.h" #include "rgb_xyz.h" +#include "AS_DCP.h" +#include "KM_fileio.h" +#include #define DCI_GAMMA 2.6 diff --git a/src/stereo_picture_frame.h b/src/stereo_picture_frame.h index fa7620fb..1fd05453 100644 --- a/src/stereo_picture_frame.h +++ b/src/stereo_picture_frame.h @@ -17,10 +17,12 @@ */ -#include -#include -#include #include "types.h" +#include +#include +#include +#include +#include namespace ASDCP { namespace JP2K { @@ -34,7 +36,7 @@ namespace dcp { class ARGBFrame; /** A single frame of a 3D (stereoscopic) picture asset */ -class StereoPictureFrame +class StereoPictureFrame : public boost::noncopyable { public: StereoPictureFrame (boost::filesystem::path mxf_path, int n); diff --git a/src/stereo_picture_mxf_writer.cc b/src/stereo_picture_mxf_writer.cc index 5c503098..d7344894 100644 --- a/src/stereo_picture_mxf_writer.cc +++ b/src/stereo_picture_mxf_writer.cc @@ -17,11 +17,11 @@ */ -#include "AS_DCP.h" -#include "KM_fileio.h" #include "stereo_picture_mxf_writer.h" #include "exceptions.h" #include "picture_mxf.h" +#include "AS_DCP.h" +#include "KM_fileio.h" #include "picture_mxf_writer_common.cc" diff --git a/src/text.h b/src/text.h index bbb99adb..3a44965d 100644 --- a/src/text.h +++ b/src/text.h @@ -33,14 +33,18 @@ namespace dcp { class Font; +/** @class Text + * @brief Parser for Text nodes from subtitle XML. + */ class Text { public: + /** Construct a default text node */ Text () : v_position (0) , v_align (TOP) {} - + Text (boost::shared_ptr node); float v_position; diff --git a/src/xml.h b/src/xml.h index 6af3c0c6..b89d8ccd 100644 --- a/src/xml.h +++ b/src/xml.h @@ -20,8 +20,8 @@ #ifndef LIBDCP_XML_H #define LIBDCP_XML_H -#include #include "exceptions.h" +#include namespace dcp { diff --git a/src/xyz_frame.cc b/src/xyz_frame.cc index 4c793f22..cba90883 100644 --- a/src/xyz_frame.cc +++ b/src/xyz_frame.cc @@ -17,6 +17,10 @@ */ +/** @file src/xyz_frame.cc + * @brief XZYFrame class. + */ + #include "xyz_frame.h" #include #include @@ -30,6 +34,9 @@ XYZFrame::XYZFrame (opj_image_t* image) assert (_opj_image->numcomps == 3); } +/** Construct a new XYZFrame with undefined contents. + * @param size Size for the frame in pixels. + */ XYZFrame::XYZFrame (Size size) { opj_image_cmptparm_t cmptparm[3]; @@ -58,11 +65,15 @@ XYZFrame::XYZFrame (Size size) _opj_image->y1 = size.height; } +/** XYZFrame destructor */ XYZFrame::~XYZFrame () { opj_image_destroy (_opj_image); } +/** @param c Component index (0, 1 or 2) + * @return Pointer to the data for component c. + */ int * XYZFrame::data (int c) const { @@ -70,6 +81,7 @@ XYZFrame::data (int c) const return _opj_image->comps[c].data; } +/** @return Size of the image in pixels */ dcp::Size XYZFrame::size () const { diff --git a/src/xyz_frame.h b/src/xyz_frame.h index e825b0a9..5319f9d4 100644 --- a/src/xyz_frame.h +++ b/src/xyz_frame.h @@ -17,12 +17,19 @@ */ -#include +/** @file src/xyz_frame.h + * @brief XZYFrame class. + */ + #include "util.h" +#include namespace dcp { -class XYZFrame +/* @class XYZFrame + * @brief An image in XYZ colour. + */ +class XYZFrame : public boost::noncopyable { public: XYZFrame (opj_image_t *); -- cgit v1.2.3