| LibRhythmCat Reference Manual | ||||
|---|---|---|---|---|
| Top | Description | Object Hierarchy | ||||
#include <rclib-tag.h> struct RCLibTagMetadata; RCLibTagMetadata * rclib_tag_copy_data (const RCLibTagMetadata *mmd); void rclib_tag_free (RCLibTagMetadata *mmd); const gchar * rclib_tag_get_fallback_encoding (); gchar * rclib_tag_get_name_from_fpath (const gchar *filename); gchar * rclib_tag_get_name_from_uri (const gchar *uri); RCLibTagMetadata * rclib_tag_read_metadata (const gchar *uri); void rclib_tag_set_fallback_encoding (const gchar *encoding);
Process the tags (metadata) of music, and provide some data structures and functions for tag processing.
struct RCLibTagMetadata {
gint64 length;
gchar *uri;
guint tracknum;
guint bitrate;
gint samplerate;
gint channels;
gint year;
gchar *title;
gchar *artist;
gchar *album;
gchar *comment;
gchar *ftype;
gchar *genre;
gchar *emb_cue;
GstBuffer *image;
gboolean eos;
gboolean audio_flag;
gboolean video_flag;
gpointer user_data;
};
The structure for storing the music metadata.
| the length of the music | |
gchar * |
the URI of the music |
guint |
the track number of the music |
guint |
the bitrate of the music |
gint |
the sample rate of the music |
gint |
the channel number of the music |
gint |
the year of the music |
gchar * |
the title text of the music |
gchar * |
the artist text of the music |
gchar * |
the album text of the music |
gchar * |
the comment text of the music |
gchar * |
the file type of the music |
gchar * |
the genre of the music |
gchar * |
the embedded CUE data of the music |
GstBuffer * |
the GstBuffer which contains the cover image |
gboolean |
the EOS signal |
gboolean |
whether this file has audio |
gboolean |
whether this file has video |
gpointer |
the user data |
RCLibTagMetadata * rclib_tag_copy_data (const RCLibTagMetadata *mmd);
Copy the RCLibTagMetadata data from the given parameter.
|
the RCLibTagMetadata data to copy |
Returns : |
The copied data. [transfer full] |
void rclib_tag_free (RCLibTagMetadata *mmd);
Free the memory allocated for metadata struct (RCLibTagMetadata).
|
the metadata |
const gchar * rclib_tag_get_fallback_encoding ();
Get the fallback encoding for the tag reading.
Returns : |
The fallback encoding. |
gchar * rclib_tag_get_name_from_fpath (const gchar *filename);
Return the base-name without extension from a full path or file name.
|
the full path or file name |
Returns : |
The base-name without extension. |
gchar * rclib_tag_get_name_from_uri (const gchar *uri);
Return the base-name without extension from a URI.
|
the URI |
Returns : |
The base-name without extension. |
RCLibTagMetadata * rclib_tag_read_metadata (const gchar *uri);
Read tag (metadata) from given URI.
|
the URI of the music file |
Returns : |
The Metadata of the music, NULL if the file is not a music file, free after usage. |
void rclib_tag_set_fallback_encoding (const gchar *encoding);
Set the fallback encoding for tag (metadata) reading, notice that this setting will also affect the tag reading in the Core module.
|
the fallback encoding to set |