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.
*/
*/
+/** @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);
fclose (f);
}
+/** File destructor */
File::~File ()
{
delete[] _data;
*/
+/** @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:
}
private:
- uint8_t* _data;
- int64_t _size;
+ uint8_t* _data; ///< file's data
+ int64_t _size; ///< data size in bytes
};
}
+
+#endif
*/
+/** @file src/mono_picture_mxf_writer.cc
+ * @brief MonoPictureMXFWriter class
+ */
+
#include "AS_DCP.h"
#include "KM_fileio.h"
#include "mono_picture_mxf_writer.h"
*/
+/** @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>
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().
*
};
}
+
+#endif
*/
+/** @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"
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)
std::string hash;
};
+/** @class PictureMXFWriter
+ * @brief Parent class for classes which write picture MXF files.
+ */
class PictureMXFWriter : public MXFWriter
{
public:
};
}
+
+#endif
}
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 <Reel> node
* e.g. MainPicture, MainSound etc.
*/
virtual std::string cpl_node_name () const = 0;
*/
+/** @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>
*/
+/** @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:
}
-
-
+#endif
*/
+/** @file src/reel_picture_asset.h
+ * @brief ReelPictureAsset class.
+ */
+
#include "content.h"
#include "reel_picture_asset.h"
#include "picture_mxf.h"
*/
+/** @file src/reel_picture_asset.h
+ * @brief ReelPictureAsset class.
+ */
+
#ifndef LIBDCP_REEL_PICTURE_ASSET_H
#define LIBDCP_REEL_PICTURE_ASSET_H
namespace dcp {
+/** @class ReelPictureAsset
+ * @brief Part of a Reel's description which refers to a picture MXF.
+ */
class ReelPictureAsset : public ReelAsset
{
public:
*/
+/** @file src/reel_sound_asset.cc
+ * @brief ReelSoundAsset class.
+ */
+
#include "reel_sound_asset.h"
#include <libcxml/cxml.h>
*/
+/** @file src/reel_sound_asset.h
+ * @brief ReelSoundAsset class.
+ */
+
#include "reel_asset.h"
#include "sound_mxf.h"
#include <boost/shared_ptr.hpp>
namespace dcp {
+/** @class ReelSoundAsset
+ * @brief Part of a Reel's description which refers to a sound MXF.
+ */
class ReelSoundAsset : public ReelAsset
{
public:
*/
+/** @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>
*/
+/** @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:
}
-
-
+#endif
+
*/
+/** @file src/reel_subtitle_asset.cc
+ * @brief ReelSubtitleAsset class.
+ */
+
#include "subtitle_content.h"
#include "reel_subtitle_asset.h"
*/
+/** @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:
};
}
+
+#endif
*/
+/** @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));
}
*/
+/** @file src/sound_frame.h
+ * @brief SoundFrame class.
+ */
+
#ifndef LIBDCP_SOUND_FRAME_H
#define LIBDCP_SOUND_FRAME_H
namespace dcp {
+/** @class SoundFrame
+ * @brief One ‘frame’ 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;
};
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>
class GammaLUT;
class XYZFrame;
+/** @struct Size
+ * @brief The integer, two-dimensional size of something.
+ */
struct Size
{
Size ()
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
{