mirror of
https://github.com/claunia/flac.git
synced 2025-12-16 18:54:26 +00:00
add number-of-colors field to PICTURE metadata block
This commit is contained in:
@@ -837,6 +837,7 @@ namespace FLAC {
|
||||
FLAC__uint32 get_width() const;
|
||||
FLAC__uint32 get_height() const;
|
||||
FLAC__uint32 get_depth() const;
|
||||
FLAC__uint32 get_colors() const; ///< a return value of \c 0 means true-color, i.e. 2^depth colors
|
||||
FLAC__uint32 get_data_length() const;
|
||||
const FLAC__byte *get_data() const;
|
||||
|
||||
@@ -851,6 +852,7 @@ namespace FLAC {
|
||||
void set_width(FLAC__uint32 value) const;
|
||||
void set_height(FLAC__uint32 value) const;
|
||||
void set_depth(FLAC__uint32 value) const;
|
||||
void set_colors(FLAC__uint32 value) const; ///< a value of \c 0 means true-color, i.e. 2^depth colors
|
||||
|
||||
//! See FLAC__metadata_object_picture_set_data()
|
||||
bool set_data(const FLAC__byte *data, FLAC__uint32 data_length);
|
||||
@@ -937,8 +939,8 @@ namespace FLAC {
|
||||
FLACPP_API bool get_cuesheet(const char *filename, CueSheet *&cuesheet); //! See FLAC__metadata_get_cuesheet().
|
||||
FLACPP_API bool get_cuesheet(const char *filename, CueSheet &cuesheet); //! See FLAC__metadata_get_cuesheet().
|
||||
|
||||
FLACPP_API bool get_picture(const char *filename, Picture *&picture, ::FLAC__StreamMetadata_Picture_Type type, const char *mime_type, const FLAC__byte *description, unsigned max_width, unsigned max_height, unsigned max_depth); //! See FLAC__metadata_get_picture().
|
||||
FLACPP_API bool get_picture(const char *filename, Picture &picture, ::FLAC__StreamMetadata_Picture_Type type, const char *mime_type, const FLAC__byte *description, unsigned max_width, unsigned max_height, unsigned max_depth); //! See FLAC__metadata_get_picture().
|
||||
FLACPP_API bool get_picture(const char *filename, Picture *&picture, ::FLAC__StreamMetadata_Picture_Type type, const char *mime_type, const FLAC__byte *description, unsigned max_width, unsigned max_height, unsigned max_depth, unsigned max_colors); //! See FLAC__metadata_get_picture().
|
||||
FLACPP_API bool get_picture(const char *filename, Picture &picture, ::FLAC__StreamMetadata_Picture_Type type, const char *mime_type, const FLAC__byte *description, unsigned max_width, unsigned max_height, unsigned max_depth, unsigned max_colors); //! See FLAC__metadata_get_picture().
|
||||
|
||||
/* \} */
|
||||
|
||||
|
||||
@@ -767,6 +767,11 @@ typedef struct {
|
||||
FLAC__uint32 depth;
|
||||
/**< Picture's color depth in bits-per-pixel. */
|
||||
|
||||
FLAC__uint32 colors;
|
||||
/**< For indexed palettes (like GIF), picture's number of colors (the
|
||||
* number of palette entries), or \c 0 for non-indexed (i.e. 2^depth).
|
||||
*/
|
||||
|
||||
FLAC__uint32 data_length;
|
||||
/**< Length of binary picture data in bytes. */
|
||||
|
||||
@@ -781,6 +786,7 @@ extern FLAC_API const unsigned FLAC__STREAM_METADATA_PICTURE_DESCRIPTION_LENGTH_
|
||||
extern FLAC_API const unsigned FLAC__STREAM_METADATA_PICTURE_WIDTH_LEN; /**< == 32 (bits) */
|
||||
extern FLAC_API const unsigned FLAC__STREAM_METADATA_PICTURE_HEIGHT_LEN; /**< == 32 (bits) */
|
||||
extern FLAC_API const unsigned FLAC__STREAM_METADATA_PICTURE_DEPTH_LEN; /**< == 32 (bits) */
|
||||
extern FLAC_API const unsigned FLAC__STREAM_METADATA_PICTURE_COLORS_LEN; /**< == 32 (bits) */
|
||||
extern FLAC_API const unsigned FLAC__STREAM_METADATA_PICTURE_DATA_LENGTH_LEN; /**< == 32 (bits) */
|
||||
|
||||
|
||||
|
||||
@@ -216,6 +216,8 @@ FLAC_API FLAC__bool FLAC__metadata_get_cuesheet(const char *filename, FLAC__Stre
|
||||
* \c (unsigned)(-1) to mean "any height".
|
||||
* \param max_depth The maximum color depth in bits-per-pixel desired.
|
||||
* Use \c (unsigned)(-1) to mean "any depth".
|
||||
* \param max_colors The maximum number of colors desired. Use
|
||||
* \c (unsigned)(-1) to mean "any number of colors".
|
||||
* \assert
|
||||
* \code filename != NULL \endcode
|
||||
* \code picture != NULL \endcode
|
||||
@@ -226,7 +228,7 @@ FLAC_API FLAC__bool FLAC__metadata_get_cuesheet(const char *filename, FLAC__Stre
|
||||
* error, a file decoder error, or the file contained no PICTURE
|
||||
* block, and \a *picture will be set to \c NULL.
|
||||
*/
|
||||
FLAC_API FLAC__bool FLAC__metadata_get_picture(const char *filename, FLAC__StreamMetadata **picture, FLAC__StreamMetadata_Picture_Type type, const char *mime_type, const FLAC__byte *description, unsigned max_width, unsigned max_height, unsigned max_depth);
|
||||
FLAC_API FLAC__bool FLAC__metadata_get_picture(const char *filename, FLAC__StreamMetadata **picture, FLAC__StreamMetadata_Picture_Type type, const char *mime_type, const FLAC__byte *description, unsigned max_width, unsigned max_height, unsigned max_depth, unsigned max_colors);
|
||||
|
||||
/* \} */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user