VLC 4.0.0-dev
vlc_meta.h File Reference

This file defines functions and structures for stream meta-data in vlc. More...

Include dependency graph for vlc_meta.h:

Go to the source code of this file.

Data Structures

struct  meta_export_t
 

Macros

#define VLC_META_TYPE_COUNT   27
 
#define ITEM_PREPARSED   1
 
#define ITEM_ART_FETCHED   2
 
#define ITEM_ART_NOTFOUND   4
 
#define vlc_meta_SetTitle(meta, b)   vlc_meta_Set( meta, vlc_meta_Title, b )
 
#define vlc_meta_SetArtist(meta, b)   vlc_meta_Set( meta, vlc_meta_Artist, b )
 
#define vlc_meta_SetGenre(meta, b)   vlc_meta_Set( meta, vlc_meta_Genre, b )
 
#define vlc_meta_SetCopyright(meta, b)   vlc_meta_Set( meta, vlc_meta_Copyright, b )
 
#define vlc_meta_SetAlbum(meta, b)   vlc_meta_Set( meta, vlc_meta_Album, b )
 
#define vlc_meta_SetTrackNum(meta, b)   vlc_meta_Set( meta, vlc_meta_TrackNumber, b )
 
#define vlc_meta_SetDescription(meta, b)   vlc_meta_Set( meta, vlc_meta_Description, b )
 
#define vlc_meta_SetRating(meta, b)   vlc_meta_Set( meta, vlc_meta_Rating, b )
 
#define vlc_meta_SetDate(meta, b)   vlc_meta_Set( meta, vlc_meta_Date, b )
 
#define vlc_meta_SetSetting(meta, b)   vlc_meta_Set( meta, vlc_meta_Setting, b )
 
#define vlc_meta_SetURL(meta, b)   vlc_meta_Set( meta, vlc_meta_URL, 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_SetEncodedBy(meta, b)   vlc_meta_Set( meta, vlc_meta_EncodedBy, b )
 
#define vlc_meta_SetArtURL(meta, b)   vlc_meta_Set( meta, vlc_meta_ArtworkURL, b )
 
#define vlc_meta_SetTrackID(meta, b)   vlc_meta_Set( meta, vlc_meta_TrackID, b )
 
#define vlc_meta_SetTrackTotal(meta, b)   vlc_meta_Set( meta, vlc_meta_TrackTotal, b )
 
#define vlc_meta_SetDirector(meta, b)   vlc_meta_Set( meta, vlc_meta_Director, b )
 
#define vlc_meta_SetSeason(meta, b)   vlc_meta_Set( meta, vlc_meta_Season, b )
 
#define vlc_meta_SetEpisode(meta, b)   vlc_meta_Set( meta, vlc_meta_Episode, b )
 
#define vlc_meta_SetShowName(meta, b)   vlc_meta_Set( meta, vlc_meta_ShowName, b )
 
#define vlc_meta_SetActors(meta, b)   vlc_meta_Set( meta, vlc_meta_Actors, b )
 
#define vlc_meta_SetAlbumArtist(meta, b)   vlc_meta_Set( meta, vlc_meta_AlbumArtist, b )
 
#define vlc_meta_SetDiscNumber(meta, b)   vlc_meta_Set( meta, vlc_meta_DiscNumber, b )
 
#define VLC_META_TITLE   vlc_meta_TypeToLocalizedString( vlc_meta_Title )
 
#define VLC_META_ARTIST   vlc_meta_TypeToLocalizedString( vlc_meta_Artist )
 
#define VLC_META_GENRE   vlc_meta_TypeToLocalizedString( vlc_meta_Genre )
 
#define VLC_META_COPYRIGHT   vlc_meta_TypeToLocalizedString( vlc_meta_Copyright )
 
#define VLC_META_ALBUM   vlc_meta_TypeToLocalizedString( vlc_meta_Album )
 
#define VLC_META_TRACK_NUMBER   vlc_meta_TypeToLocalizedString( vlc_meta_TrackNumber )
 
#define VLC_META_DESCRIPTION   vlc_meta_TypeToLocalizedString( vlc_meta_Description )
 
#define VLC_META_RATING   vlc_meta_TypeToLocalizedString( vlc_meta_Rating )
 
#define VLC_META_DATE   vlc_meta_TypeToLocalizedString( vlc_meta_Date )
 
#define VLC_META_SETTING   vlc_meta_TypeToLocalizedString( vlc_meta_Setting )
 
#define VLC_META_URL   vlc_meta_TypeToLocalizedString( vlc_meta_URL )
 
#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_ENCODED_BY   vlc_meta_TypeToLocalizedString( vlc_meta_EncodedBy )
 
#define VLC_META_ART_URL   vlc_meta_TypeToLocalizedString( vlc_meta_ArtworkURL )
 
#define VLC_META_TRACKID   vlc_meta_TypeToLocalizedString( vlc_meta_TrackID )
 
#define VLC_META_DIRECTOR   vlc_meta_TypeToLocalizedString( vlc_meta_Director )
 
#define VLC_META_SEASON   vlc_meta_TypeToLocalizedString( vlc_meta_Season )
 
#define VLC_META_EPISODE   vlc_meta_TypeToLocalizedString( vlc_meta_Episode )
 
#define VLC_META_SHOW_NAME   vlc_meta_TypeToLocalizedString( vlc_meta_ShowName )
 
#define VLC_META_ACTORS   vlc_meta_TypeToLocalizedString( vlc_meta_Actors )
 
#define VLC_META_ALBUMARTIST   vlc_meta_TypeToLocalizedString( vlc_meta_AlbumArtist )
 
#define VLC_META_DISCNUMBER   vlc_meta_TypeToLocalizedString( vlc_meta_DiscNumber )
 
#define VLC_META_EXTRA_MB_ALBUMID   "MB_ALBUMID"
 

Typedefs

typedef enum vlc_meta_type_t vlc_meta_type_t
 
typedef struct meta_export_t meta_export_t
 

Enumerations

enum  vlc_meta_type_t {
  vlc_meta_Title , vlc_meta_Artist , vlc_meta_Genre , vlc_meta_Copyright ,
  vlc_meta_Album , vlc_meta_TrackNumber , vlc_meta_Description , vlc_meta_Rating ,
  vlc_meta_Date , vlc_meta_Setting , vlc_meta_URL , vlc_meta_Language ,
  vlc_meta_NowPlaying , vlc_meta_ESNowPlaying , vlc_meta_Publisher , vlc_meta_EncodedBy ,
  vlc_meta_ArtworkURL , vlc_meta_TrackID , vlc_meta_TrackTotal , vlc_meta_Director ,
  vlc_meta_Season , vlc_meta_Episode , vlc_meta_ShowName , vlc_meta_Actors ,
  vlc_meta_AlbumArtist , vlc_meta_DiscNumber , vlc_meta_DiscTotal
}
 

Functions

vlc_meta_tvlc_meta_New (void)
 vlc_meta constructor. More...
 
void vlc_meta_Delete (vlc_meta_t *m)
 
void vlc_meta_Set (vlc_meta_t *p_meta, vlc_meta_type_t meta_type, const char *psz_val)
 vlc_meta has two kinds of meta, the one in a table, and the one in a dictionary. More...
 
const char * vlc_meta_Get (const vlc_meta_t *p_meta, vlc_meta_type_t meta_type)
 
void vlc_meta_AddExtra (vlc_meta_t *m, const char *psz_name, const char *psz_value)
 
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. More...
 
void vlc_meta_Merge (vlc_meta_t *dst, const vlc_meta_t *src)
 Merging meta. More...
 
int vlc_meta_GetStatus (vlc_meta_t *m)
 vlc_meta status (see vlc_meta_status_e) More...
 
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. More...
 
int input_item_WriteMeta (vlc_object_t *, input_item_t *)
 

Detailed Description

This file defines functions and structures for stream meta-data in vlc.

Macro Definition Documentation

◆ ITEM_ART_FETCHED

#define ITEM_ART_FETCHED   2

◆ ITEM_ART_NOTFOUND

#define ITEM_ART_NOTFOUND   4

◆ ITEM_PREPARSED

#define ITEM_PREPARSED   1

◆ VLC_META_ACTORS

#define VLC_META_ACTORS   vlc_meta_TypeToLocalizedString( vlc_meta_Actors )

◆ VLC_META_ALBUM

#define VLC_META_ALBUM   vlc_meta_TypeToLocalizedString( vlc_meta_Album )

◆ VLC_META_ALBUMARTIST

#define VLC_META_ALBUMARTIST   vlc_meta_TypeToLocalizedString( vlc_meta_AlbumArtist )

◆ VLC_META_ART_URL

#define VLC_META_ART_URL   vlc_meta_TypeToLocalizedString( vlc_meta_ArtworkURL )

◆ VLC_META_ARTIST

#define VLC_META_ARTIST   vlc_meta_TypeToLocalizedString( vlc_meta_Artist )

◆ VLC_META_COPYRIGHT

#define VLC_META_COPYRIGHT   vlc_meta_TypeToLocalizedString( vlc_meta_Copyright )

◆ VLC_META_DATE

#define VLC_META_DATE   vlc_meta_TypeToLocalizedString( vlc_meta_Date )

◆ VLC_META_DESCRIPTION

#define VLC_META_DESCRIPTION   vlc_meta_TypeToLocalizedString( vlc_meta_Description )

◆ VLC_META_DIRECTOR

#define VLC_META_DIRECTOR   vlc_meta_TypeToLocalizedString( vlc_meta_Director )

◆ VLC_META_DISCNUMBER

#define VLC_META_DISCNUMBER   vlc_meta_TypeToLocalizedString( vlc_meta_DiscNumber )

◆ VLC_META_ENCODED_BY

#define VLC_META_ENCODED_BY   vlc_meta_TypeToLocalizedString( vlc_meta_EncodedBy )

◆ VLC_META_EPISODE

#define VLC_META_EPISODE   vlc_meta_TypeToLocalizedString( vlc_meta_Episode )

◆ VLC_META_EXTRA_MB_ALBUMID

#define VLC_META_EXTRA_MB_ALBUMID   "MB_ALBUMID"

◆ VLC_META_GENRE

#define VLC_META_GENRE   vlc_meta_TypeToLocalizedString( vlc_meta_Genre )

◆ VLC_META_LANGUAGE

#define VLC_META_LANGUAGE   vlc_meta_TypeToLocalizedString( vlc_meta_Language )

◆ VLC_META_NOW_PLAYING

#define VLC_META_NOW_PLAYING   vlc_meta_TypeToLocalizedString( vlc_meta_NowPlaying )

◆ VLC_META_PUBLISHER

#define VLC_META_PUBLISHER   vlc_meta_TypeToLocalizedString( vlc_meta_Publisher )

◆ VLC_META_RATING

#define VLC_META_RATING   vlc_meta_TypeToLocalizedString( vlc_meta_Rating )

◆ VLC_META_SEASON

#define VLC_META_SEASON   vlc_meta_TypeToLocalizedString( vlc_meta_Season )

◆ vlc_meta_SetActors

#define vlc_meta_SetActors (   meta,
 
)    vlc_meta_Set( meta, vlc_meta_Actors, b )

◆ vlc_meta_SetAlbum

#define vlc_meta_SetAlbum (   meta,
 
)    vlc_meta_Set( meta, vlc_meta_Album, b )

◆ vlc_meta_SetAlbumArtist

#define vlc_meta_SetAlbumArtist (   meta,
 
)    vlc_meta_Set( meta, vlc_meta_AlbumArtist, b )

◆ vlc_meta_SetArtist

#define vlc_meta_SetArtist (   meta,
 
)    vlc_meta_Set( meta, vlc_meta_Artist, b )

◆ vlc_meta_SetArtURL

#define vlc_meta_SetArtURL (   meta,
 
)    vlc_meta_Set( meta, vlc_meta_ArtworkURL, b )

◆ vlc_meta_SetCopyright

#define vlc_meta_SetCopyright (   meta,
 
)    vlc_meta_Set( meta, vlc_meta_Copyright, b )

◆ vlc_meta_SetDate

#define vlc_meta_SetDate (   meta,
 
)    vlc_meta_Set( meta, vlc_meta_Date, b )

◆ vlc_meta_SetDescription

#define vlc_meta_SetDescription (   meta,
 
)    vlc_meta_Set( meta, vlc_meta_Description, b )

◆ vlc_meta_SetDirector

#define vlc_meta_SetDirector (   meta,
 
)    vlc_meta_Set( meta, vlc_meta_Director, b )

◆ vlc_meta_SetDiscNumber

#define vlc_meta_SetDiscNumber (   meta,
 
)    vlc_meta_Set( meta, vlc_meta_DiscNumber, b )

◆ vlc_meta_SetEncodedBy

#define vlc_meta_SetEncodedBy (   meta,
 
)    vlc_meta_Set( meta, vlc_meta_EncodedBy, b )

◆ vlc_meta_SetEpisode

#define vlc_meta_SetEpisode (   meta,
 
)    vlc_meta_Set( meta, vlc_meta_Episode, b )

◆ vlc_meta_SetGenre

#define vlc_meta_SetGenre (   meta,
 
)    vlc_meta_Set( meta, vlc_meta_Genre, b )

◆ vlc_meta_SetLanguage

#define vlc_meta_SetLanguage (   meta,
 
)    vlc_meta_Set( meta, vlc_meta_Language, b )

◆ vlc_meta_SetNowPlaying

#define vlc_meta_SetNowPlaying (   meta,
 
)    vlc_meta_Set( meta, vlc_meta_NowPlaying, b )

◆ vlc_meta_SetPublisher

#define vlc_meta_SetPublisher (   meta,
 
)    vlc_meta_Set( meta, vlc_meta_Publisher, b )

◆ vlc_meta_SetRating

#define vlc_meta_SetRating (   meta,
 
)    vlc_meta_Set( meta, vlc_meta_Rating, b )

◆ vlc_meta_SetSeason

#define vlc_meta_SetSeason (   meta,
 
)    vlc_meta_Set( meta, vlc_meta_Season, b )

◆ vlc_meta_SetSetting

#define vlc_meta_SetSetting (   meta,
 
)    vlc_meta_Set( meta, vlc_meta_Setting, b )

◆ vlc_meta_SetShowName

#define vlc_meta_SetShowName (   meta,
 
)    vlc_meta_Set( meta, vlc_meta_ShowName, b )

◆ VLC_META_SETTING

#define VLC_META_SETTING   vlc_meta_TypeToLocalizedString( vlc_meta_Setting )

◆ vlc_meta_SetTitle

#define vlc_meta_SetTitle (   meta,
 
)    vlc_meta_Set( meta, vlc_meta_Title, b )

◆ vlc_meta_SetTrackID

#define vlc_meta_SetTrackID (   meta,
 
)    vlc_meta_Set( meta, vlc_meta_TrackID, b )

◆ vlc_meta_SetTrackNum

#define vlc_meta_SetTrackNum (   meta,
 
)    vlc_meta_Set( meta, vlc_meta_TrackNumber, b )

◆ vlc_meta_SetTrackTotal

#define vlc_meta_SetTrackTotal (   meta,
 
)    vlc_meta_Set( meta, vlc_meta_TrackTotal, b )

◆ vlc_meta_SetURL

#define vlc_meta_SetURL (   meta,
 
)    vlc_meta_Set( meta, vlc_meta_URL, b )

◆ VLC_META_SHOW_NAME

#define VLC_META_SHOW_NAME   vlc_meta_TypeToLocalizedString( vlc_meta_ShowName )

◆ VLC_META_TITLE

#define VLC_META_TITLE   vlc_meta_TypeToLocalizedString( vlc_meta_Title )

◆ VLC_META_TRACK_NUMBER

#define VLC_META_TRACK_NUMBER   vlc_meta_TypeToLocalizedString( vlc_meta_TrackNumber )

◆ VLC_META_TRACKID

#define VLC_META_TRACKID   vlc_meta_TypeToLocalizedString( vlc_meta_TrackID )

◆ VLC_META_TYPE_COUNT

#define VLC_META_TYPE_COUNT   27

◆ VLC_META_URL

#define VLC_META_URL   vlc_meta_TypeToLocalizedString( vlc_meta_URL )

Typedef Documentation

◆ meta_export_t

typedef struct meta_export_t meta_export_t

◆ vlc_meta_type_t

Enumeration Type Documentation

◆ vlc_meta_type_t

Enumerator
vlc_meta_Title 
vlc_meta_Artist 
vlc_meta_Genre 
vlc_meta_Copyright 
vlc_meta_Album 
vlc_meta_TrackNumber 
vlc_meta_Description 
vlc_meta_Rating 
vlc_meta_Date 
vlc_meta_Setting 
vlc_meta_URL 
vlc_meta_Language 
vlc_meta_NowPlaying 
vlc_meta_ESNowPlaying 
vlc_meta_Publisher 
vlc_meta_EncodedBy 
vlc_meta_ArtworkURL 
vlc_meta_TrackID 
vlc_meta_TrackTotal 
vlc_meta_Director 
vlc_meta_Season 
vlc_meta_Episode 
vlc_meta_ShowName 
vlc_meta_Actors 
vlc_meta_AlbumArtist 
vlc_meta_DiscNumber 
vlc_meta_DiscTotal 

Function Documentation

◆ input_item_WriteMeta()

◆ vlc_meta_AddExtra()

◆ vlc_meta_CopyExtraNames()

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(), and EsOutUpdateInfo().

◆ vlc_meta_Delete()

◆ vlc_meta_Get()

◆ vlc_meta_GetExtra()

const char * vlc_meta_GetExtra ( const vlc_meta_t m,
const char *  psz_name 
)

◆ vlc_meta_GetExtraCount()

unsigned vlc_meta_GetExtraCount ( const vlc_meta_t m)

◆ vlc_meta_GetStatus()

int vlc_meta_GetStatus ( vlc_meta_t m)

◆ vlc_meta_Merge()

◆ vlc_meta_New()

◆ vlc_meta_Set()

void vlc_meta_Set ( vlc_meta_t p_meta,
vlc_meta_type_t  meta_type,
const char *  psz_val 
)

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::ppsz_meta, and strdup().

Referenced by EsOutProgramEpg(), input_item_SetMeta(), and InputMetaUser().

◆ vlc_meta_SetStatus()

void vlc_meta_SetStatus ( vlc_meta_t m,
int  status 
)

◆ vlc_meta_TypeToLocalizedString()

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().

◆ vlc_meta_TypeToString()