@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
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);
*/
+/** @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:
return _data;
}
+ /** Length of one picture row in bytes */
int stride () const;
private:
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: