summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2012-08-22 16:18:04 +0100
committerCarl Hetherington <cth@carlh.net>2012-08-22 16:18:04 +0100
commit28ad2d566af1f59274fd1e16f6ba5da7479fc197 (patch)
treedc91c6dd67aa0eb2e2272ebee37f793c02880a2b
parente75aef94aa603f5fa464a2b01ad4a19ce9f72c41 (diff)
Comment tweaks.
-rw-r--r--doc/mainpage.txt6
-rw-r--r--src/argb_frame.h20
-rw-r--r--src/cpl.h7
3 files changed, 29 insertions, 4 deletions
diff --git a/doc/mainpage.txt b/doc/mainpage.txt
index f4394926..6f202556 100644
--- a/doc/mainpage.txt
+++ b/doc/mainpage.txt
@@ -115,12 +115,12 @@ do things like
@code
boost::shared_ptr<libdcp::PictureAsset> p = dcp.picture_asset ();
-boost::shared_ptr<libdcp::RGBAFrame> f = p->get_frame(42)->rgba_frame ();
+boost::shared_ptr<libdcp::ARGBFrame> f = p->get_frame(42)->rgba_frame ();
uint8_t* data = f->data ();
int size = f->size ();
@endcode
-This will extract the image of frame 42 from the DCP and make its RGBA data available
+This will extract the image of frame 42 from the DCP and make its ARGB data available
for examination.
Audio data is accessed in chunks equal in length to the duration of a video frame. To
@@ -134,7 +134,7 @@ uint8_t* data = f->data ();
int size = f->size ();
@endcode
-The returned data is interleaved 24-bit samples, so that
+The returned data are interleaved 24-bit samples, so that
@code
int left = data[0] | (data[1] << 8) | (data[2] << 16);
diff --git a/src/argb_frame.h b/src/argb_frame.h
index bc78b8fb..1adbbd14 100644
--- a/src/argb_frame.h
+++ b/src/argb_frame.h
@@ -17,11 +17,30 @@
*/
+/** @file src/argb_frame.h
+ * @brief Container for a single image from a picture asset.
+ */
+
#include <stdint.h>
namespace libdcp
{
+/** @class ARGBFrame
+ * @brief A single frame of picture data held in an ARGB buffer.
+ *
+ * The format of the data is:
+ *
+ * <pre>
+ * Byte /- 0 -------|- 1 --------|- 2 --------|- 3 --------|- 4 --------|- 5 --------| ...
+ * |(0, 0) Blue|(0, 0) Red |(0, 0) Blue |(0, 0) Alpha|(0, 1) Blue |(0, 1) Red | ...
+ * </pre>
+ *
+ * So that the first byte is the blue component of the pixel at x=0, y=0, the second
+ * is the red component, and so on.
+ *
+ * Lines are packed so that the second row directly follows the first.
+ */
class ARGBFrame
{
public:
@@ -32,6 +51,7 @@ public:
return _data;
}
+ /** Length of one picture row in bytes */
int stride () const;
private:
diff --git a/src/cpl.h b/src/cpl.h
index e06e2351..8f5682da 100644
--- a/src/cpl.h
+++ b/src/cpl.h
@@ -125,7 +125,12 @@ public:
std::string label_text;
};
-/** Class to parse a CPL */
+/** @class CPL
+ * @brief Class to parse a CPL
+ *
+ * This class is used to parse XML CPL files. It is rarely necessary
+ * for the caller to use it outside libdcp.
+ */
class CPL : public XMLFile
{
public: