Comments / tweaks.
authorCarl Hetherington <cth@carlh.net>
Wed, 5 Feb 2014 12:59:12 +0000 (12:59 +0000)
committerCarl Hetherington <cth@carlh.net>
Wed, 5 Feb 2014 12:59:12 +0000 (12:59 +0000)
22 files changed:
doc/mainpage.txt
src/file.cc
src/file.h
src/mono_picture_mxf_writer.cc
src/mono_picture_mxf_writer.h
src/picture_mxf_writer.h
src/reel_asset.h
src/reel_mono_picture_asset.cc
src/reel_mono_picture_asset.h
src/reel_picture_asset.cc
src/reel_picture_asset.h
src/reel_sound_asset.cc
src/reel_sound_asset.h
src/reel_stereo_picture_asset.cc
src/reel_stereo_picture_asset.h
src/reel_subtitle_asset.cc
src/reel_subtitle_asset.h
src/sound_frame.cc
src/sound_frame.h
src/sound_mxf.cc
src/util.h
src/xyz_frame.h

index 1e8a8c11962d64611e6ed0016f37823875a5ab75..6e2f33974bb8c5d9a8efa8f4415fde984eab0de8 100644 (file)
@@ -20,7 +20,7 @@ An example of DCP creation is given in examples/make_dcp.cc.
 Reading existing DCPs
 --
 
-An example of DCP reading is given in example/read_dcp.cc.
+An example of DCP reading is given in examples/read_dcp.cc.
 */
 
 
index d39f93e0756bf4418637c2dfa75fd8f97c07fd64..aabda166fe84934c80645312a4aea400f754d7ab 100644 (file)
 
 */
 
+/** @file  src/file.cc
+ *  @brief File class.
+ */
+
 #include "file.h"
 #include "util.h"
 
 using namespace dcp;
 
+/** Read a file into memory.
+ *  @param file to read.
+ */
 File::File (boost::filesystem::path file)
 {
        _size = boost::filesystem::file_size (file);
@@ -32,6 +39,7 @@ File::File (boost::filesystem::path file)
        fclose (f);
 }
 
+/** File destructor */
 File::~File ()
 {
        delete[] _data;
index f2b992091d4e76d8c444e4b45afd92a1052a2d2e..b06cece00fa09655f3d6e16eb438f904a8f04325 100644 (file)
 
 */
 
+/** @file  src/file.h
+ *  @brief File class.
+ */
+
+#ifndef LIBDCP_FILE_H
+#define LIBDCP_FILE_H
+
 #include <boost/filesystem.hpp>
 
 namespace dcp {
 
+/** @class File
+ *  @brief Helper class which loads a file into memory.
+ */
 class File
 {
 public:
@@ -36,8 +46,10 @@ public:
        }
 
 private:
-       uint8_t* _data;
-       int64_t _size;
+       uint8_t* _data; ///< file's data
+       int64_t _size;  ///< data size in bytes
 };
 
 }
+
+#endif
index b32a79f5d07ddf0d8c6fbaae3355ec2d5a1bca17..5cc424e1572e28907c4ba2bfb959a9f8a50b05b1 100644 (file)
 
 */
 
+/** @file  src/mono_picture_mxf_writer.cc
+ *  @brief MonoPictureMXFWriter class
+ */
+
 #include "AS_DCP.h"
 #include "KM_fileio.h"
 #include "mono_picture_mxf_writer.h"
index a5e0b1b6f876e8dc5dbab7d3e808b758763c4a01..065171c2f3e8ff9005d6842628a06e1413830a46 100644 (file)
 
 */
 
+/** @file  src/mono_picture_mxf_writer.h
+ *  @brief MonoPictureMXFWriter class
+ */
+
+#ifndef LIBDCP_MONO_PICTURE_MXF_WRITER_H
+#define LIBDCP_MONO_PICTURE_MXF_WRITER_H
+
 #include "picture_mxf_writer.h"
 #include <boost/shared_ptr.hpp>
 #include <boost/utility.hpp>
@@ -26,7 +33,8 @@
 
 namespace dcp {
 
-/** A helper class for writing to MonoPictureMXFs.
+/** @class MonoPictureMXFWriter
+ *  @brief A helper class for writing to MonoPictureMXFs
  *
  *  Objects of this class can only be created with MonoPictureMXF::start_write().
  *
@@ -57,3 +65,5 @@ private:
 };
 
 }
+
+#endif
index f8c67ba9b33918f88d85105aab3b39d5116263f2..d1baa7ad3e34c8b5199575ec26604aa8be9ee004 100644 (file)
 
 */
 
+/** @file  src/picture_mxf_writer.h
+ *  @brief PictureMXFWriter and FrameInfo classes.
+ */
+
+#ifndef LIBDCP_PICTURE_MXF_WRITER_H
+#define LIBDCP_PICTURE_MXF_WRITER_H
+
 #include "metadata.h"
 #include "types.h"
 #include "mxf_writer.h"
@@ -30,7 +37,9 @@ namespace dcp {
 
 class PictureMXF;      
 
-/** Information about a single frame (either a monoscopic frame or a left *or* right eye stereoscopic frame) */        
+/** @class FrameInfo
+ *  @brief Information about a single frame (either a monoscopic frame or a left *or* right eye stereoscopic frame)
+ */
 struct FrameInfo
 {
        FrameInfo (uint64_t o, uint64_t s, std::string h)
@@ -50,6 +59,9 @@ struct FrameInfo
        std::string hash;
 };
 
+/** @class PictureMXFWriter
+ *  @brief Parent class for classes which write picture MXF files.
+ */
 class PictureMXFWriter : public MXFWriter
 {
 public:
@@ -69,3 +81,5 @@ protected:
 };
 
 }
+
+#endif
index b5e0537c4172f55c0638297dc05492c9e382e7c6..a71290ae1b86e91736be419e1032a6eb9706a133 100644 (file)
@@ -82,7 +82,7 @@ public:
        }
 
 protected:
-       /** @return the node name that this asset uses in the CPL's <Reel> node
+       /** @return the node name that this asset uses in the CPL's &lt;Reel&gt; node
         *  e.g. MainPicture, MainSound etc.
         */
        virtual std::string cpl_node_name () const = 0;
index 1a5d256db23aacfbda29b2bf04bc986743f6d98c..b4ed6301615b30e591c68c00bf9f4ebd7fccf7ff 100644 (file)
 
 */
 
+/** @file  src/reel_mono_picture_asset.cc
+ *  @brief ReelMonoPictureAsset class.
+ */
+
 #include "reel_mono_picture_asset.h"
 #include "mono_picture_mxf.h"
 #include <libcxml/cxml.h>
index 881bbec09c3d3963cfe8db05502710892e91499e..a25550a4132e957b0cf47f5823332f4307342c03 100644 (file)
 
 */
 
+/** @file  src/reel_mono_picture_asset.h
+ *  @brief ReelMonoPictureAsset class.
+ */
+
+#ifndef LIBDCP_REEL_MONO_PICTURE_ASSET_H
+#define LIBDCP_REEL_MONO_PICTURE_ASSET_H
+
 #include "reel_picture_asset.h"
 
 namespace dcp {
 
 class MonoPictureMXF;  
 
+/** @class ReelMonoPictureAsset
+ *  @brief Part of a Reel's description which refers to a monoscopic picture MXF.
+ */
 class ReelMonoPictureAsset : public ReelPictureAsset
 {
 public:
@@ -36,5 +46,4 @@ private:
 
 }
 
-       
-               
+#endif
index 673eb133fda7bd0c77944507be70cc54830a69a2..d1910bb3d2028e8304fdd7d513b8472c1fa4e6e2 100644 (file)
 
 */
 
+/** @file  src/reel_picture_asset.h
+ *  @brief ReelPictureAsset class.
+ */
+
 #include "content.h"
 #include "reel_picture_asset.h"
 #include "picture_mxf.h"
index b433ff88a9ca529fbc581f9c10b3fd54a860c8c1..547f3adae6fcad39947cf861fd763c8c7f78feb9 100644 (file)
 
 */
 
+/** @file  src/reel_picture_asset.h
+ *  @brief ReelPictureAsset class.
+ */
+
 #ifndef LIBDCP_REEL_PICTURE_ASSET_H
 #define LIBDCP_REEL_PICTURE_ASSET_H
 
@@ -25,6 +29,9 @@
 
 namespace dcp {
 
+/** @class ReelPictureAsset
+ *  @brief Part of a Reel's description which refers to a picture MXF.
+ */
 class ReelPictureAsset : public ReelAsset
 {
 public:
index b3bc049f7ae5f2c3962e66ad21f5f80b19203fbc..984434ddc26d93b8a49c59ac1f3309e8451afa8e 100644 (file)
 
 */
 
+/** @file  src/reel_sound_asset.cc
+ *  @brief ReelSoundAsset class.
+ */
+
 #include "reel_sound_asset.h"
 #include <libcxml/cxml.h>
 
index 27d2499f2acd98a53f1cf4861441cc4fdfdf7535..fb233016e3f63b3e112253b7e5e037db228644f1 100644 (file)
 
 */
 
+/** @file  src/reel_sound_asset.h
+ *  @brief ReelSoundAsset class.
+ */
+
 #include "reel_asset.h"
 #include "sound_mxf.h"
 #include <boost/shared_ptr.hpp>
@@ -24,6 +28,9 @@
 
 namespace dcp {
 
+/** @class ReelSoundAsset
+ *  @brief Part of a Reel's description which refers to a sound MXF.
+ */
 class ReelSoundAsset : public ReelAsset
 {
 public:
index 0df61175ff6127a6634441bbef42ccaf1ea29253..09178dc20c57846e36a0a008808a7d63e9f38404 100644 (file)
 
 */
 
+/** @file  src/reel_stereo_picture_asset.cc
+ *  @brief ReelStereoPictureAsset class.
+ */
+
 #include "reel_stereo_picture_asset.h"
 #include "stereo_picture_mxf.h"
 #include <libcxml/cxml.h>
index 56e357be0be3bb0f65e35c205e0ec5740143f0a0..57cc4da15e07b5a11f18f99e6def9122c9f99c18 100644 (file)
 
 */
 
+/** @file  src/reel_stereo_picture_asset.h
+ *  @brief ReelStereoPictureAsset class.
+ */
+
+#ifndef LIBDCP_REEL_STEREO_PICTURE_ASSET_H
+#define LIBDCP_REEL_STEREO_PICTURE_ASSET_H
+
 #include "reel_picture_asset.h"
 
 namespace dcp {
 
 class StereoPictureMXF;        
 
+/** @class ReelStereoPictureAsset
+ *  @brief Part of a Reel's description which refers to a stereoscopic picture MXF.
+ */
 class ReelStereoPictureAsset : public ReelPictureAsset
 {
 public:
@@ -37,5 +47,5 @@ private:
 
 }
 
-       
-               
+#endif
+
index b2e46f933eef02bdfb2e1aba80964dd9b3dde4bd..1c948200ac97edd7ccc6152a018746fce7357680 100644 (file)
 
 */
 
+/** @file  src/reel_subtitle_asset.cc
+ *  @brief ReelSubtitleAsset class.
+ */
+
 #include "subtitle_content.h"
 #include "reel_subtitle_asset.h"
 
index 429c9859d7524505ac157682000e1e188ef51995..5cdfac13a4d5a62417a70a061779e6b6fe1b8358 100644 (file)
 
 */
 
+/** @file  src/reel_subtitle_asset.h
+ *  @brief ReelSubtitleAsset class.
+ */
+
+#ifndef LIBDCP_REEL_SUBTITLE_ASSET_H
+#define LIBDCP_REEL_SUBTITLE_ASSET_H
+
 #include "reel_asset.h"
 
 namespace dcp {
 
 class SubtitleContent;
 
+/** @class ReelSubtitleAsset
+ *  @brief Part of a Reel's description which refers to a subtitle XML file.
+ */
 class ReelSubtitleAsset : public ReelAsset
 {
 public:
@@ -38,3 +48,5 @@ private:
 };
 
 }
+
+#endif
index 6471ee0a78d0b9358c4cf59b1f61a3206e604323..da0da194baf7f4df99997e29c009bf76e96ee3fc 100644 (file)
 
 */
 
+/** @file  src/sound_frame.cc
+ *  @brief SoundFrame class.
+ */
+
 #include "sound_frame.h"
 #include "exceptions.h"
 #include "AS_DCP.h"
 using namespace std;
 using namespace dcp;
 
-SoundFrame::SoundFrame (string mxf_path, int n, ASDCP::AESDecContext* c)
+SoundFrame::SoundFrame (boost::filesystem::path mxf_path, int n, ASDCP::AESDecContext* c)
 {
        ASDCP::PCM::MXFReader reader;
-       Kumu::Result_t r = reader.OpenRead (mxf_path.c_str());
+       Kumu::Result_t r = reader.OpenRead (mxf_path.file().c_str());
        if (ASDCP_FAILURE (r)) {
                boost::throw_exception (FileError ("could not open MXF file for reading", mxf_path, r));
        }
index e7b13885c9b1e5fc3691e9c5136e1b7ae478cb61..de58a034e3fd46cd10f53721d1f6a45006380d4b 100644 (file)
 
 */
 
+/** @file  src/sound_frame.h
+ *  @brief SoundFrame class.
+ */
+
 #ifndef LIBDCP_SOUND_FRAME_H
 #define LIBDCP_SOUND_FRAME_H
 
@@ -33,16 +37,20 @@ namespace ASDCP {
 
 namespace dcp {
 
+/** @class SoundFrame
+ *  @brief One &lsquo;frame&rsquo; of sound data from a MXF.
+ */
 class SoundFrame : public boost::noncopyable
 {
 public:
-       SoundFrame (std::string mxf_path, int n, ASDCP::AESDecContext *);
+       SoundFrame (boost::filesystem::path mxf_path, int n, ASDCP::AESDecContext *);
        ~SoundFrame ();
 
        uint8_t const * data () const;
        int size () const;
 
 private:
+       /** a buffer to hold the frame */
        ASDCP::PCM::FrameBuffer* _buffer;
 };
 
index f6613867373cd7de219fd48716d32f21b783a0bc..fa48a6c1ad79fd64a652eae525f87efe4cdfb638 100644 (file)
@@ -161,7 +161,7 @@ shared_ptr<const SoundFrame>
 SoundMXF::get_frame (int n) const
 {
        /* XXX: should add on entry point here? */
-       return shared_ptr<const SoundFrame> (new SoundFrame (file().string(), n, _decryption_context));
+       return shared_ptr<const SoundFrame> (new SoundFrame (file(), n, _decryption_context));
 }
 
 shared_ptr<SoundMXFWriter>
index 8db838ebc7c2adbfc6269f47be87bd193ad18bc4..2bfeb60ab9f3a5845a5a75d17802933fefd5ea1d 100644 (file)
@@ -45,6 +45,9 @@ class CertificateChain;
 class GammaLUT;
 class XYZFrame;
 
+/** @struct Size
+ *  @brief The integer, two-dimensional size of something.
+ */
 struct Size
 {
        Size ()
index fcaae891770df918bbabafa30664bae0fbeaff28..8ba829b2c6302ecde5e08ca3bc6c2b07ae6409f3 100644 (file)
 
 namespace dcp {
 
-/* @class XYZFrame
- * @brief An image in XYZ colour.
+/** @class XYZFrame
+ *  @brief An image in XYZ colour.
  *
- * This class is a thin wrapper of libopenjpeg's opj_image_t.
+ *  This class is a thin wrapper of libopenjpeg's opj_image_t.
  */
 class XYZFrame : public boost::noncopyable
 {