⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 metadata.h

📁 在x86平台上运行不可信任代码的sandbox。
💻 H
📖 第 1 页 / 共 5 页
字号:
/** Set a seekpoint in a seektable. * * \param object     A pointer to an existing SEEKTABLE object. * \param point_num  Index into seekpoint array to set. * \param point      The point to set. * \assert *    \code object != NULL \endcode *    \code object->type == FLAC__METADATA_TYPE_SEEKTABLE \endcode *    \code object->data.seek_table.num_points > point_num \endcode */FLAC_API void FLAC__metadata_object_seektable_set_point(FLAC__StreamMetadata *object, unsigned point_num, FLAC__StreamMetadata_SeekPoint point);/** Insert a seekpoint into a seektable. * * \param object     A pointer to an existing SEEKTABLE object. * \param point_num  Index into seekpoint array to set. * \param point      The point to set. * \assert *    \code object != NULL \endcode *    \code object->type == FLAC__METADATA_TYPE_SEEKTABLE \endcode *    \code object->data.seek_table.num_points >= point_num \endcode * \retval FLAC__bool *    \c false if memory allocation error, else \c true. */FLAC_API FLAC__bool FLAC__metadata_object_seektable_insert_point(FLAC__StreamMetadata *object, unsigned point_num, FLAC__StreamMetadata_SeekPoint point);/** Delete a seekpoint from a seektable. * * \param object     A pointer to an existing SEEKTABLE object. * \param point_num  Index into seekpoint array to set. * \assert *    \code object != NULL \endcode *    \code object->type == FLAC__METADATA_TYPE_SEEKTABLE \endcode *    \code object->data.seek_table.num_points > point_num \endcode * \retval FLAC__bool *    \c false if memory allocation error, else \c true. */FLAC_API FLAC__bool FLAC__metadata_object_seektable_delete_point(FLAC__StreamMetadata *object, unsigned point_num);/** Check a seektable to see if it conforms to the FLAC specification. *  See the format specification for limits on the contents of the *  seektable. * * \param object  A pointer to an existing SEEKTABLE object. * \assert *    \code object != NULL \endcode *    \code object->type == FLAC__METADATA_TYPE_SEEKTABLE \endcode * \retval FLAC__bool *    \c false if seek table is illegal, else \c true. */FLAC_API FLAC__bool FLAC__metadata_object_seektable_is_legal(const FLAC__StreamMetadata *object);/** Append a number of placeholder points to the end of a seek table. * * \note * As with the other ..._seektable_template_... functions, you should * call FLAC__metadata_object_seektable_template_sort() when finished * to make the seek table legal. * * \param object  A pointer to an existing SEEKTABLE object. * \param num     The number of placeholder points to append. * \assert *    \code object != NULL \endcode *    \code object->type == FLAC__METADATA_TYPE_SEEKTABLE \endcode * \retval FLAC__bool *    \c false if memory allocation fails, else \c true. */FLAC_API FLAC__bool FLAC__metadata_object_seektable_template_append_placeholders(FLAC__StreamMetadata *object, unsigned num);/** Append a specific seek point template to the end of a seek table. * * \note * As with the other ..._seektable_template_... functions, you should * call FLAC__metadata_object_seektable_template_sort() when finished * to make the seek table legal. * * \param object  A pointer to an existing SEEKTABLE object. * \param sample_number  The sample number of the seek point template. * \assert *    \code object != NULL \endcode *    \code object->type == FLAC__METADATA_TYPE_SEEKTABLE \endcode * \retval FLAC__bool *    \c false if memory allocation fails, else \c true. */FLAC_API FLAC__bool FLAC__metadata_object_seektable_template_append_point(FLAC__StreamMetadata *object, FLAC__uint64 sample_number);/** Append specific seek point templates to the end of a seek table. * * \note * As with the other ..._seektable_template_... functions, you should * call FLAC__metadata_object_seektable_template_sort() when finished * to make the seek table legal. * * \param object  A pointer to an existing SEEKTABLE object. * \param sample_numbers  An array of sample numbers for the seek points. * \param num     The number of seek point templates to append. * \assert *    \code object != NULL \endcode *    \code object->type == FLAC__METADATA_TYPE_SEEKTABLE \endcode * \retval FLAC__bool *    \c false if memory allocation fails, else \c true. */FLAC_API FLAC__bool FLAC__metadata_object_seektable_template_append_points(FLAC__StreamMetadata *object, FLAC__uint64 sample_numbers[], unsigned num);/** Append a set of evenly-spaced seek point templates to the end of a *  seek table. * * \note * As with the other ..._seektable_template_... functions, you should * call FLAC__metadata_object_seektable_template_sort() when finished * to make the seek table legal. * * \param object  A pointer to an existing SEEKTABLE object. * \param num     The number of placeholder points to append. * \param total_samples  The total number of samples to be encoded; *                       the seekpoints will be spaced approximately *                       \a total_samples / \a num samples apart. * \assert *    \code object != NULL \endcode *    \code object->type == FLAC__METADATA_TYPE_SEEKTABLE \endcode * \retval FLAC__bool *    \c false if memory allocation fails, else \c true. */FLAC_API FLAC__bool FLAC__metadata_object_seektable_template_append_spaced_points(FLAC__StreamMetadata *object, unsigned num, FLAC__uint64 total_samples);/** Sort a seek table's seek points according to the format specification, *  removing duplicates. * * \param object   A pointer to a seek table to be sorted. * \param compact  If \c false, behaves like FLAC__format_seektable_sort(). *                 If \c true, duplicates are deleted and the seek table is *                 shrunk appropriately; the number of placeholder points *                 present in the seek table will be the same after the call *                 as before. * \assert *    \code object != NULL \endcode *    \code object->type == FLAC__METADATA_TYPE_SEEKTABLE \endcode * \retval FLAC__bool *    \c false if realloc() fails, else \c true. */FLAC_API FLAC__bool FLAC__metadata_object_seektable_template_sort(FLAC__StreamMetadata *object, FLAC__bool compact);/** Sets the vendor string in a VORBIS_COMMENT block. * *  For convenience, a trailing NUL is added to the entry if it doesn't have *  one already. * *  If \a copy is \c true, a copy of the entry is stored; otherwise, the object *  takes ownership of the \c entry.entry pointer. * *  \note If this function returns \c false, the caller still owns the *  pointer. * * \param object  A pointer to an existing VORBIS_COMMENT object. * \param entry   The entry to set the vendor string to. * \param copy    See above. * \assert *    \code object != NULL \endcode *    \code object->type == FLAC__METADATA_TYPE_VORBIS_COMMENT \endcode *    \code (entry.entry != NULL && entry.length > 0) || * (entry.entry == NULL && entry.length == 0) \endcode * \retval FLAC__bool *    \c false if memory allocation fails or \a entry does not comply with the *    Vorbis comment specification, else \c true. */FLAC_API FLAC__bool FLAC__metadata_object_vorbiscomment_set_vendor_string(FLAC__StreamMetadata *object, FLAC__StreamMetadata_VorbisComment_Entry entry, FLAC__bool copy);/** Resize the comment array. * *  If the size shrinks, elements will truncated; if it grows, new empty *  fields will be added to the end. * * \param object            A pointer to an existing VORBIS_COMMENT object. * \param new_num_comments  The desired length of the array; may be \c 0. * \assert *    \code object != NULL \endcode *    \code object->type == FLAC__METADATA_TYPE_VORBIS_COMMENT \endcode *    \code (object->data.vorbis_comment.comments == NULL && object->data.vorbis_comment.num_comments == 0) || * (object->data.vorbis_comment.comments != NULL && object->data.vorbis_comment.num_comments > 0) \endcode * \retval FLAC__bool *    \c false if memory allocation fails, else \c true. */FLAC_API FLAC__bool FLAC__metadata_object_vorbiscomment_resize_comments(FLAC__StreamMetadata *object, unsigned new_num_comments);/** Sets a comment in a VORBIS_COMMENT block. * *  For convenience, a trailing NUL is added to the entry if it doesn't have *  one already. * *  If \a copy is \c true, a copy of the entry is stored; otherwise, the object *  takes ownership of the \c entry.entry pointer. * *  \note If this function returns \c false, the caller still owns the *  pointer. * * \param object       A pointer to an existing VORBIS_COMMENT object. * \param comment_num  Index into comment array to set. * \param entry        The entry to set the comment to. * \param copy         See above. * \assert *    \code object != NULL \endcode *    \code object->type == FLAC__METADATA_TYPE_VORBIS_COMMENT \endcode *    \code comment_num < object->data.vorbis_comment.num_comments \endcode *    \code (entry.entry != NULL && entry.length > 0) || * (entry.entry == NULL && entry.length == 0) \endcode * \retval FLAC__bool *    \c false if memory allocation fails or \a entry does not comply with the *    Vorbis comment specification, else \c true. */FLAC_API FLAC__bool FLAC__metadata_object_vorbiscomment_set_comment(FLAC__StreamMetadata *object, unsigned comment_num, FLAC__StreamMetadata_VorbisComment_Entry entry, FLAC__bool copy);/** Insert a comment in a VORBIS_COMMENT block at the given index. * *  For convenience, a trailing NUL is added to the entry if it doesn't have *  one already. * *  If \a copy is \c true, a copy of the entry is stored; otherwise, the object *  takes ownership of the \c entry.entry pointer. * *  \note If this function returns \c false, the caller still owns the *  pointer. * * \param object       A pointer to an existing VORBIS_COMMENT object. * \param comment_num  The index at which to insert the comment.  The comments *                     at and after \a comment_num move right one position. *                     To append a comment to the end, set \a comment_num to *                     \c object->data.vorbis_comment.num_comments . * \param entry        The comment to insert. * \param copy         See above. * \assert *    \code object != NULL \endcode *    \code object->type == FLAC__METADATA_TYPE_VORBIS_COMMENT \endcode *    \code object->data.vorbis_comment.num_comments >= comment_num \endcode *    \code (entry.entry != NULL && entry.length > 0) || * (entry.entry == NULL && entry.length == 0 && copy == false) \endcode * \retval FLAC__bool *    \c false if memory allocation fails or \a entry does not comply with the *    Vorbis comment specification, else \c true. */FLAC_API FLAC__bool FLAC__metadata_object_vorbiscomment_insert_comment(FLAC__StreamMetadata *object, unsigned comment_num, FLAC__StreamMetadata_VorbisComment_Entry entry, FLAC__bool copy);/** Appends a comment to a VORBIS_COMMENT block. * *  For convenience, a trailing NUL is added to the entry if it doesn't have *  one already. * *  If \a copy is \c true, a copy of the entry is stored; otherwise, the object *  takes ownership of the \c entry.entry pointer. * *  \note If this function returns \c false, the caller still owns the *  pointer. * * \param object       A pointer to an existing VORBIS_COMMENT object. * \param entry        The comment to insert. * \param copy         See above. * \assert *    \code object != NULL \endcode *    \code object->type == FLAC__METADATA_TYPE_VORBIS_COMMENT \endcode *    \code (entry.entry != NULL && entry.length > 0) || * (entry.entry == NULL && entry.length == 0 && copy == false) \endcode * \retval FLAC__bool *    \c false if memory allocation fails or \a entry does not comply with the *    Vorbis comment specification, else \c true. */FLAC_API FLAC__bool FLAC__metadata_object_vorbiscomment_append_comment(FLAC__StreamMetadata *object, FLAC__StreamMetadata_VorbisComment_Entry entry, FLAC__bool copy);/** Replaces comments in a VORBIS_COMMENT block with a new one. * *  For convenience, a trailing NUL is added to the entry if it doesn't have *  one already. * *  Depending on the the value of \a all, either all or just the first comment *  whose field name(s) match the given entry's name will be replaced by the *  given entry.  If no comments match, \a entry will simply be appended. * *  If \a copy is \c true, a copy of the entry is stored; otherwise, the object *  takes ownership of the \c entry.entry pointer. * *  \note If this function returns \c false, the caller still owns the *  pointer. * * \param object       A pointer to an existing VORBIS_COMMENT object. * \param entry        The comment to insert. * \param all          If \c true, all comments whose field name matches *                     \a entry's field name will be removed, and \a entry will *                     be inserted at the position of the first matching *                     comment.  If \c false, only the first comment whose *                     field name matches \a entry's field name will be *                     replaced with \a entry. * \param copy         See above. * \assert *    \code object != NULL \endcode *    \code object->type == FLAC__METADATA_TYPE_VORBIS_COMMENT \endcode *    \code (entry.entry != NULL && entry.length > 0) || * (

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -