VLC 4.0.0-dev
|
This file defines functions and structures for stream meta-data in vlc. More...
Go to the source code of this file.
Data Structures | |
struct | meta_export_t |
Typedefs | |
typedef enum vlc_meta_type_t | vlc_meta_type_t |
typedef struct meta_export_t | meta_export_t |
Functions | |
vlc_meta_t * | vlc_meta_New (void) |
vlc_meta constructor. | |
void | vlc_meta_Delete (vlc_meta_t *m) |
void | vlc_meta_SetWithPriority (vlc_meta_t *p_meta, vlc_meta_type_t meta_type, const char *psz_val, vlc_meta_priority_t priority) |
vlc_meta has two kinds of meta, the one in a table, and the one in a dictionary. | |
const char * | vlc_meta_Get (const vlc_meta_t *p_meta, vlc_meta_type_t meta_type) |
void | vlc_meta_SetExtraWithPriority (vlc_meta_t *m, const char *psz_name, const char *psz_value, vlc_meta_priority_t priority) |
set the meta extra | |
const char * | vlc_meta_GetExtra (const vlc_meta_t *m, const char *psz_name) |
unsigned | vlc_meta_GetExtraCount (const vlc_meta_t *m) |
char ** | vlc_meta_CopyExtraNames (const vlc_meta_t *m) |
Allocate a copy of all extra meta names and a table with it. | |
void | vlc_meta_Merge (vlc_meta_t *dst, const vlc_meta_t *src) |
Merging meta. | |
int | vlc_meta_GetStatus (vlc_meta_t *m) |
vlc_meta status (see vlc_meta_status_e) | |
void | vlc_meta_SetStatus (vlc_meta_t *m, int status) |
const char * | vlc_meta_TypeToString (vlc_meta_type_t meta_type) |
const char * | vlc_meta_TypeToLocalizedString (vlc_meta_type_t meta_type) |
Returns a localizes string describing the meta. | |
int | input_item_WriteMeta (vlc_object_t *, input_item_t *) |
This file defines functions and structures for stream meta-data in vlc.
#define ITEM_ART_FETCHED 2 |
#define ITEM_ART_NOTFOUND 4 |
#define ITEM_PREPARSED 1 |
#define VLC_META_ACTORS vlc_meta_TypeToLocalizedString( vlc_meta_Actors ) |
#define VLC_META_ALBUM vlc_meta_TypeToLocalizedString( vlc_meta_Album ) |
#define VLC_META_ALBUMARTIST vlc_meta_TypeToLocalizedString( vlc_meta_AlbumArtist ) |
#define VLC_META_ART_URL vlc_meta_TypeToLocalizedString( vlc_meta_ArtworkURL ) |
#define VLC_META_ARTIST vlc_meta_TypeToLocalizedString( vlc_meta_Artist ) |
#define VLC_META_COPYRIGHT vlc_meta_TypeToLocalizedString( vlc_meta_Copyright ) |
#define VLC_META_DATE vlc_meta_TypeToLocalizedString( vlc_meta_Date ) |
#define VLC_META_DESCRIPTION vlc_meta_TypeToLocalizedString( vlc_meta_Description ) |
#define VLC_META_DIRECTOR vlc_meta_TypeToLocalizedString( vlc_meta_Director ) |
#define VLC_META_DISCNUMBER vlc_meta_TypeToLocalizedString( vlc_meta_DiscNumber ) |
#define VLC_META_ENCODED_BY vlc_meta_TypeToLocalizedString( vlc_meta_EncodedBy ) |
#define VLC_META_EPISODE vlc_meta_TypeToLocalizedString( vlc_meta_Episode ) |
#define VLC_META_EXTRA_MB_ALBUMID "MB_ALBUMID" |
#define VLC_META_GENRE vlc_meta_TypeToLocalizedString( vlc_meta_Genre ) |
#define VLC_META_LANGUAGE vlc_meta_TypeToLocalizedString( vlc_meta_Language ) |
#define VLC_META_NOW_PLAYING vlc_meta_TypeToLocalizedString( vlc_meta_NowPlaying ) |
#define VLC_META_PUBLISHER vlc_meta_TypeToLocalizedString( vlc_meta_Publisher ) |
#define VLC_META_RATING vlc_meta_TypeToLocalizedString( vlc_meta_Rating ) |
#define VLC_META_SEASON vlc_meta_TypeToLocalizedString( vlc_meta_Season ) |
#define vlc_meta_Set | ( | meta, | |
meta_type, | |||
b | |||
) | vlc_meta_SetWithPriority( meta, meta_type, b, VLC_META_PRIORITY_BASIC ) |
#define vlc_meta_SetActors | ( | meta, | |
b | |||
) | vlc_meta_Set( meta, vlc_meta_Actors, b ) |
#define vlc_meta_SetAlbum | ( | meta, | |
b | |||
) | vlc_meta_Set( meta, vlc_meta_Album, b ) |
#define vlc_meta_SetAlbumArtist | ( | meta, | |
b | |||
) | vlc_meta_Set( meta, vlc_meta_AlbumArtist, b ) |
#define vlc_meta_SetArtist | ( | meta, | |
b | |||
) | vlc_meta_Set( meta, vlc_meta_Artist, b ) |
#define vlc_meta_SetArtURL | ( | meta, | |
b | |||
) | vlc_meta_Set( meta, vlc_meta_ArtworkURL, b ) |
#define vlc_meta_SetCopyright | ( | meta, | |
b | |||
) | vlc_meta_Set( meta, vlc_meta_Copyright, b ) |
#define vlc_meta_SetDate | ( | meta, | |
b | |||
) | vlc_meta_Set( meta, vlc_meta_Date, b ) |
#define vlc_meta_SetDescription | ( | meta, | |
b | |||
) | vlc_meta_Set( meta, vlc_meta_Description, b ) |
#define vlc_meta_SetDirector | ( | meta, | |
b | |||
) | vlc_meta_Set( meta, vlc_meta_Director, b ) |
#define vlc_meta_SetDiscNumber | ( | meta, | |
b | |||
) | vlc_meta_Set( meta, vlc_meta_DiscNumber, b ) |
#define vlc_meta_SetEncodedBy | ( | meta, | |
b | |||
) | vlc_meta_Set( meta, vlc_meta_EncodedBy, b ) |
#define vlc_meta_SetEpisode | ( | meta, | |
b | |||
) | vlc_meta_Set( meta, vlc_meta_Episode, b ) |
#define vlc_meta_SetExtra | ( | meta, | |
psz_name, | |||
psz_value | |||
) | vlc_meta_SetExtraWithPriority( meta, psz_name, psz_value, VLC_META_PRIORITY_BASIC ) |
#define vlc_meta_SetGenre | ( | meta, | |
b | |||
) | vlc_meta_Set( meta, vlc_meta_Genre, b ) |
#define vlc_meta_SetLanguage | ( | meta, | |
b | |||
) | vlc_meta_Set( meta, vlc_meta_Language, b ) |
#define vlc_meta_SetNowPlaying | ( | meta, | |
b | |||
) | vlc_meta_Set( meta, vlc_meta_NowPlaying, b ) |
#define vlc_meta_SetPublisher | ( | meta, | |
b | |||
) | vlc_meta_Set( meta, vlc_meta_Publisher, b ) |
#define vlc_meta_SetRating | ( | meta, | |
b | |||
) | vlc_meta_Set( meta, vlc_meta_Rating, b ) |
#define vlc_meta_SetSeason | ( | meta, | |
b | |||
) | vlc_meta_Set( meta, vlc_meta_Season, b ) |
#define vlc_meta_SetSetting | ( | meta, | |
b | |||
) | vlc_meta_Set( meta, vlc_meta_Setting, b ) |
#define vlc_meta_SetShowName | ( | meta, | |
b | |||
) | vlc_meta_Set( meta, vlc_meta_ShowName, b ) |
#define VLC_META_SETTING vlc_meta_TypeToLocalizedString( vlc_meta_Setting ) |
#define vlc_meta_SetTitle | ( | meta, | |
b | |||
) | vlc_meta_Set( meta, vlc_meta_Title, b ) |
#define vlc_meta_SetTrackID | ( | meta, | |
b | |||
) | vlc_meta_Set( meta, vlc_meta_TrackID, b ) |
#define vlc_meta_SetTrackNum | ( | meta, | |
b | |||
) | vlc_meta_Set( meta, vlc_meta_TrackNumber, b ) |
#define vlc_meta_SetTrackTotal | ( | meta, | |
b | |||
) | vlc_meta_Set( meta, vlc_meta_TrackTotal, b ) |
#define vlc_meta_SetURL | ( | meta, | |
b | |||
) | vlc_meta_Set( meta, vlc_meta_URL, b ) |
#define VLC_META_SHOW_NAME vlc_meta_TypeToLocalizedString( vlc_meta_ShowName ) |
#define VLC_META_TITLE vlc_meta_TypeToLocalizedString( vlc_meta_Title ) |
#define VLC_META_TRACK_NUMBER vlc_meta_TypeToLocalizedString( vlc_meta_TrackNumber ) |
#define VLC_META_TRACKID vlc_meta_TypeToLocalizedString( vlc_meta_TrackID ) |
#define VLC_META_TYPE_COUNT 27 |
#define VLC_META_URL vlc_meta_TypeToLocalizedString( vlc_meta_URL ) |
typedef struct meta_export_t meta_export_t |
typedef enum vlc_meta_type_t vlc_meta_type_t |
enum vlc_meta_priority_t |
enum vlc_meta_type_t |
int input_item_WriteMeta | ( | vlc_object_t * | obj, |
input_item_t * | p_item | ||
) |
References input_item_t::i_type, input_item_GetURI(), ITEM_TYPE_FILE, input_item_t::lock, module_need, module_unneed, msg_Err, meta_export_t::p_item, meta_export_t::psz_file, vlc_custom_create, VLC_EGENERIC, VLC_ENOMEM, vlc_mutex_lock(), vlc_mutex_unlock(), vlc_object_delete, VLC_SUCCESS, and vlc_uri2path().
char ** vlc_meta_CopyExtraNames | ( | const vlc_meta_t * | m | ) |
Allocate a copy of all extra meta names and a table with it.
Be sure to free both the returned pointers and its name.
References vlc_meta_t::extra_tags, and vlc_dictionary_all_keys().
Referenced by EsOutProgramMeta(), EsOutUpdateInfo(), and input_item_GetMetaExtraNames().
void vlc_meta_Delete | ( | vlc_meta_t * | m | ) |
References vlc_meta_t::extra_tags, vlc_meta_t::meta, vlc_meta_value::value, vlc_dictionary_clear(), vlc_meta_FreeExtraKey(), and VLC_META_TYPE_COUNT.
Referenced by CmdCleanControl(), decoder_Clean(), DecoderUpdateFormatLocked(), DeleteDecoder(), demux_PacketizerDestroy(), EsOutProgramMeta(), EsOutSend(), fingerprint_request_Delete(), Init(), input_item_Release(), InputSourceMeta(), InputUpdateMeta(), and ProgramDelete().
const char * vlc_meta_Get | ( | const vlc_meta_t * | p_meta, |
vlc_meta_type_t | meta_type | ||
) |
References vlc_meta_t::meta, and vlc_meta_value::value.
Referenced by ArtCachePath(), CheckArt(), CheckMeta(), CreateCacheKey(), EsOutMeta(), EsOutProgramEpg(), EsOutProgramGetMetaName(), EsOutProgramGetProgramName(), EsOutProgramMeta(), EsOutProgramSelect(), input_item_GetMetaLocked(), input_item_GetTitleFbName(), and input_item_MetaMatch().
const char * vlc_meta_GetExtra | ( | const vlc_meta_t * | m, |
const char * | psz_name | ||
) |
References vlc_meta_t::extra_tags, psz_name, vlc_meta_value::value, and vlc_dictionary_value_for_key().
Referenced by EsOutProgramMeta(), EsOutUpdateInfo(), input_item_GetMetaExtraLocked(), and vlc_audio_replay_gain_MergeFromMeta().
unsigned vlc_meta_GetExtraCount | ( | const vlc_meta_t * | m | ) |
References vlc_meta_t::extra_tags, and vlc_dictionary_keys_count().
Referenced by input_item_GetMetaExtraNames().
int vlc_meta_GetStatus | ( | vlc_meta_t * | m | ) |
vlc_meta status (see vlc_meta_status_e)
References vlc_meta_t::i_status.
Referenced by input_item_IsArtFetched(), input_item_IsPreparsed(), input_item_SetArtFetched(), input_item_SetArtNotFound(), and input_item_SetPreparsed().
void vlc_meta_Merge | ( | vlc_meta_t * | dst, |
const vlc_meta_t * | src | ||
) |
Merging meta.
References vlc_meta_t::extra_tags, vlc_meta_t::meta, vlc_meta_value::priority, strdup(), vlc_meta_value::value, vlc_dictionary_all_keys(), vlc_dictionary_remove_value_for_key(), vlc_dictionary_value_for_key(), vlc_meta_FreeExtraKey(), vlc_meta_InsertExtra(), and VLC_META_TYPE_COUNT.
Referenced by CmdInitControl(), EsOutMeta(), EsOutProgramMeta(), GetStatusLocked(), input_item_Copy(), and InputSourceMeta().
vlc_meta_t * vlc_meta_New | ( | void | ) |
vlc_meta constructor.
vlc_meta_Delete() will free the returned pointer.
References vlc_meta_t::extra_tags, vlc_meta_t::i_status, vlc_meta_t::meta, vlc_meta_value::priority, vlc_meta_value::value, vlc_dictionary_init(), VLC_META_PRIORITY_BASIC, and VLC_META_TYPE_COUNT.
Referenced by ArtCachePath(), CmdInitControl(), EsOutProgramEpg(), EsOutProgramMeta(), GetStatusLocked(), Init(), input_item_NewExt(), and InputUpdateMeta().
void vlc_meta_SetExtraWithPriority | ( | vlc_meta_t * | m, |
const char * | psz_name, | ||
const char * | psz_value, | ||
vlc_meta_priority_t | priority | ||
) |
set the meta extra
m | vlc_meta_t |
psz_name | meta extra name (nonnullable) |
psz_value | meta extra value (nullable) Removed from meta extra if set to NULL |
priority | metadata priority (in terms of vlc_meta_priority_t) |
References vlc_meta_t::extra_tags, kVLCDictionaryNotFound, vlc_meta_value::priority, psz_name, psz_value, vlc_dictionary_remove_value_for_key(), vlc_dictionary_value_for_key(), vlc_meta_FreeExtraKey(), and vlc_meta_InsertExtra().
void vlc_meta_SetStatus | ( | vlc_meta_t * | m, |
int | status | ||
) |
References vlc_meta_t::i_status.
Referenced by input_item_SetArtFetched(), input_item_SetArtNotFound(), and input_item_SetPreparsed().
void vlc_meta_SetWithPriority | ( | vlc_meta_t * | p_meta, |
vlc_meta_type_t | meta_type, | ||
const char * | psz_val, | ||
vlc_meta_priority_t | priority | ||
) |
vlc_meta has two kinds of meta, the one in a table, and the one in a dictionary.
FIXME - Why don't we merge those two?
References IsUTF8(), vlc_meta_t::meta, vlc_meta_value::priority, strdup(), and vlc_meta_value::value.
const char * vlc_meta_TypeToLocalizedString | ( | vlc_meta_type_t | meta_type | ) |
Returns a localizes string describing the meta.
References vlc_gettext(), and vlc_meta_TypeToString().
Referenced by EsOutProgramEpg(), and EsOutProgramMeta().
const char * vlc_meta_TypeToString | ( | vlc_meta_type_t | meta_type | ) |
References ARRAY_SIZE, N_, vlc_meta_Actors, vlc_meta_Album, vlc_meta_AlbumArtist, vlc_meta_Artist, vlc_meta_ArtworkURL, vlc_meta_Copyright, vlc_meta_Date, vlc_meta_Description, vlc_meta_Director, vlc_meta_DiscNumber, vlc_meta_DiscTotal, vlc_meta_EncodedBy, vlc_meta_Episode, vlc_meta_ESNowPlaying, vlc_meta_Genre, vlc_meta_Language, vlc_meta_NowPlaying, vlc_meta_Publisher, vlc_meta_Rating, vlc_meta_Season, vlc_meta_Setting, vlc_meta_ShowName, vlc_meta_Title, vlc_meta_TrackID, vlc_meta_TrackNumber, vlc_meta_TrackTotal, VLC_META_TYPE_COUNT, and vlc_meta_URL.
Referenced by vlc_meta_TypeToLocalizedString().